@posthog/rrweb-record 0.0.4 → 0.0.5
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 +6780 -6379
- package/dist/rrweb-record.cjs.map +1 -1
- package/dist/rrweb-record.js +6780 -6379
- package/dist/rrweb-record.js.map +1 -1
- package/dist/rrweb-record.umd.cjs +6778 -6387
- package/dist/rrweb-record.umd.cjs.map +2 -2
- package/dist/rrweb-record.umd.min.cjs +115 -40
- package/dist/rrweb-record.umd.min.cjs.map +3 -3
- package/package.json +2 -2
|
@@ -11,59 +11,134 @@
|
|
|
11
11
|
}(this, () => {
|
|
12
12
|
var exports = {};
|
|
13
13
|
var module = { exports };
|
|
14
|
-
"use strict";var zo=Object.defineProperty,Wo=Object.defineProperties;var Go=Object.getOwnPropertyDescriptors;var ft=Object.getOwnPropertySymbols;var Gs=Object.prototype.hasOwnProperty,Vs=Object.prototype.propertyIsEnumerable;var Ws=(s,e,t)=>e in s?zo(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,O=(s,e)=>{for(var t in e||(e={}))Gs.call(e,t)&&Ws(s,t,e[t]);if(ft)for(var t of ft(e))Vs.call(e,t)&&Ws(s,t,e[t]);return s},ee=(s,e)=>Wo(s,Go(e));var Oe=(s,e)=>{var t={};for(var r in s)Gs.call(s,r)&&e.indexOf(r)<0&&(t[r]=s[r]);if(s!=null&&ft)for(var r of ft(s))e.indexOf(r)<0&&Vs.call(s,r)&&(t[r]=s[r]);return t};Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var Vo=Object.defineProperty,jo=(s,e,t)=>e in s?Vo(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,w=(s,e,t)=>jo(s,typeof e!="symbol"?e+"":e,t),js,Ho=Object.defineProperty,Yo=(s,e,t)=>e in s?Ho(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,Hs=(s,e,t)=>Yo(s,typeof e!="symbol"?e+"":e,t),H=(s=>(s[s.Document=0]="Document",s[s.DocumentType=1]="DocumentType",s[s.Element=2]="Element",s[s.Text=3]="Text",s[s.CDATA=4]="CDATA",s[s.Comment=5]="Comment",s))(H||{});const Ys={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},Zs={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},pt={};function Zo(s){var e,t;const r=(t=(e=globalThis==null?void 0:globalThis.Zone)==null?void 0:e.__symbol__)==null?void 0:t.call(e,s);if(r&&globalThis[r])return globalThis[r]}function fs(s){if(pt[s])return pt[s];const e=Zo(s)||globalThis[s],t=e.prototype,r=s in Ys?Ys[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 Zs?Zs[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)return pt[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?pt[s]=u:t}catch(l){return t}}const mr={};function me(s,e,t){var r;const i=`${s}.${String(t)}`;if(mr[i])return mr[i].call(e);const n=fs(s),o=(r=Object.getOwnPropertyDescriptor(n,t))==null?void 0:r.get;return o?(mr[i]=o,o.call(e)):e[t]}const gr={};function ji(s,e,t){const r=`${s}.${String(t)}`;if(gr[r])return gr[r].bind(e);const n=fs(s)[t];return typeof n!="function"?e[t]:(gr[r]=n,n.bind(e))}function Jo(s){return me("Node",s,"childNodes")}function Xo(s){return me("Node",s,"parentNode")}function Ko(s){return me("Node",s,"parentElement")}function Qo(s){return me("Node",s,"textContent")}function qo(s,e){return ji("Node",s,"contains")(e)}function ea(s){return ji("Node",s,"getRootNode")()}function ta(s){return!s||!("host"in s)?null:me("ShadowRoot",s,"host")}function ra(s){return s.styleSheets}function sa(s){return!s||!("shadowRoot"in s)?null:me("Element",s,"shadowRoot")}function ia(s,e){return me("Element",s,"querySelector")(e)}function na(s,e){return me("Element",s,"querySelectorAll")(e)}function oa(){return fs("MutationObserver").constructor}function aa(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:Jo,parentNode:Xo,parentElement:Ko,textContent:Qo,contains:qo,getRootNode:ea,host:ta,styleSheets:ra,shadowRoot:sa,querySelector:ia,querySelectorAll:na,mutationObserver:oa,patch:aa};function Hi(s){return s.nodeType===s.ELEMENT_NODE}function je(s){const e=s&&"host"in s&&"mode"in s&&Z.host(s)||null;return!!(e&&"shadowRoot"in e&&Z.shadowRoot(e)===s)}function He(s){return Object.prototype.toString.call(s)==="[object ShadowRoot]"}function la(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 ua(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 kr(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=>Yi(i,t)).join("");return la(r)}catch(e){return null}}function Yi(s,e){if(ha(s)){let t;try{t=kr(s.styleSheet)||ua(s)}catch(r){t=s.cssText}return s.styleSheet.href?Wt(t,s.styleSheet.href):t}else{let t=s.cssText;return fa(s)&&s.selectorText.includes(":")&&(t=ca(t)),e?Wt(t,e):t}}function ca(s){const e=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return s.replace(e,"$1\\$2")}function ha(s){return"styleSheet"in s}function fa(s){return"selectorText"in s}class Zi{constructor(){Hs(this,"idNodeMap",new Map),Hs(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 pa(){return new Zi}function ps({element:s,maskInputOptions:e,tagName:t,type:r,value:i,maskInputFn:n}){let o=i||"";const l=r&&Ce(r);return(e[t.toLowerCase()]||l&&e[l])&&(n?o=n(o,s):o="*".repeat(o.length)),o}function Ce(s){return s.toLowerCase()}const Js="__rrweb_original__";function da(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=Js in n?n[Js]: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 ds(s){const e=s.type;return s.hasAttribute("data-rr-is-password")?"password":e?Ce(e):null}function Ji(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 ma(s){let e="";return s.indexOf("//")>-1?e=s.split("/").slice(0,3).join("/"):e=s.split("/")[0],e=e.split("?")[0],e}const ga=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,ya=/^(?:[a-z+]+:)?\/\//i,wa=/^www\..*/i,ba=/^(data:)([^,]*),(.*)/i;function Wt(s,e){return(s||"").replace(ga,(t,r,i,n,o,l)=>{const a=i||o||l,u=r||n||"";if(!a)return t;if(ya.test(a)||wa.test(a))return`url(${u}${a}${u})`;if(ba.test(a))return`url(${u}${a}${u})`;if(a[0]==="/")return`url(${u}${ma(e)+a}${u})`;const c=e.split("/"),h=a.split("/");c.pop();for(const m of h)m!=="."&&(m===".."?c.pop():c.push(m));return`url(${u}${c.join("/")}${u})`})}const yr=new Map,wr=new Map;function br(s){if(!yr.has(s)){const e=s.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"");yr.set(s,e)}return yr.get(s)}function Sa(s,e){const t=s;if(wr.has(s))return wr.get(s);const r=Array.from(e.childNodes),i=[];let n=0;if(r.length>1&&s&&typeof s=="string"){let o=br(s);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=br(r[a].textContent);let c=3;for(;c<u.length&&(u[c].match(/[a-zA-Z0-9]/)||u.indexOf(u.substring(0,c),1)!==-1);c++);for(;c<u.length;c++){const h=u.substring(0,c),m=o.split(h);let d=-1;if(m.length===2?d=o.indexOf(h):m.length>2&&m[0]===""&&r[a-1].textContent!==""&&(d=o.indexOf(h,1)),d!==-1){let g=Math.floor(d/l);for(;g>0&&g<s.length;){if(n+=1,n>50*r.length)return i.push(s),i;const p=br(s.substring(0,g));if(p.length===d){i.push(s.substring(0,g)),s=s.substring(g),o=o.substring(d);break}else p.length<d?g+=Math.max(1,Math.floor((d-p.length)/l)):g-=Math.max(1,Math.floor((p.length-d)*l))}break}}}}return i.push(s),t&&wr.set(t,i),i}function Ca(s,e){return Sa(s,e).join("/* rr_split */")}let va=1;const Ia=new RegExp("[^a-z0-9-_:]"),Ze=-2;function Xi(){return va++}function xa(s){if(s instanceof HTMLFormElement)return"form";const e=Ce(s.tagName);return Ia.test(e)?"div":e}let Re,Xs;const Oa=/^[^ \t\n\r\u000c]+/,Ra=/^[, \t\n\r\u000c]+/;function Ma(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(Ra),!(t>=e.length);){let n=r(Oa);if(n.slice(-1)===",")n=Ee(s,n.substring(0,n.length-1)),i.push(n);else{let o="";n=Ee(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 Ks=new WeakMap;function Ee(s,e){return!e||e.trim()===""?e:ms(s,e)}function Aa(s){return!!(s.tagName==="svg"||s.ownerSVGElement)}function ms(s,e){let t=Ks.get(s);if(t||(t=s.createElement("a"),Ks.set(s,t)),!e)e="";else if(e.startsWith("blob:")||e.startsWith("data:"))return e;return t.setAttribute("href",e),t.href}function Ki(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")?Ee(s,r):t==="srcset"?Ma(s,r):t==="style"?Wt(r,ms(s)):e==="object"&&t==="data"?Ee(s,r):r)}function Qi(s,e,t){return(s==="video"||s==="audio")&&e==="autoplay"}function Ea(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 Gt(s,e,t){if(!s)return!1;if(s.nodeType!==s.ELEMENT_NODE)return t?Gt(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?Gt(Z.parentNode(s),e,t):!1}function qi(s,e,t,r){let i;if(Hi(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(Gt(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 $a(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 Na(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 ka(s,e){const{doc:t,mirror:r,blockClass:i,blockSelector:n,needsMask:o,inlineStylesheet:l,maskInputOptions:a={},maskTextFn:u,maskInputFn:c,dataURLOptions:h={},inlineImages:m,recordCanvas:d,keepIframeSrcFn:g,newlyAddedElement:p=!1,cssCaptured:f=!1}=e,b=Pa(t,r);switch(s.nodeType){case s.DOCUMENT_NODE:return s.compatMode!=="CSS1Compat"?{type:H.Document,childNodes:[],compatMode:s.compatMode}:{type:H.Document,childNodes:[]};case s.DOCUMENT_TYPE_NODE:return{type:H.DocumentType,name:s.name,publicId:s.publicId,systemId:s.systemId,rootId:b};case s.ELEMENT_NODE:return La(s,{doc:t,blockClass:i,blockSelector:n,inlineStylesheet:l,maskInputOptions:a,maskInputFn:c,dataURLOptions:h,inlineImages:m,recordCanvas:d,keepIframeSrcFn:g,newlyAddedElement:p,rootId:b});case s.TEXT_NODE:return _a(s,{doc:t,needsMask:o,maskTextFn:u,rootId:b,cssCaptured:f});case s.CDATA_SECTION_NODE:return{type:H.CDATA,textContent:"",rootId:b};case s.COMMENT_NODE:return{type:H.Comment,textContent:Z.textContent(s)||"",rootId:b};default:return!1}}function Pa(s,e){if(!e.hasNode(s))return;const t=e.getId(s);return t===1?void 0:t}function _a(s,e){const{needsMask:t,maskTextFn:r,rootId:i,cssCaptured:n}=e,o=Z.parentNode(s),l=o&&o.tagName;let a="";const u=l==="STYLE"?!0:void 0,c=l==="SCRIPT"?!0:void 0;return c?a="SCRIPT_PLACEHOLDER":n||(a=Z.textContent(s),u&&a&&(a=Wt(a,ms(e.doc)))),!u&&!c&&a&&t&&(a=r?r(a,Z.parentElement(s)):a.replace(/[\S]/g,"*")),{type:H.Text,textContent:a||"",rootId:i}}function Qs(s,e){return Array.from(s.styleSheets).find(t=>t.href===e)}function Da(s){return s.href}function La(s,e){const{doc:t,blockClass:r,blockSelector:i,inlineStylesheet:n,maskInputOptions:o={},maskInputFn:l,dataURLOptions:a={},inlineImages:u,recordCanvas:c,keepIframeSrcFn:h,newlyAddedElement:m=!1,rootId:d}=e,g=Ea(s,r,i),p=xa(s);let f={};const b=s.attributes.length;for(let y=0;y<b;y++){const C=s.attributes[y];Qi(p,C.name,C.value)||(f[C.name]=Ki(t,p,Ce(C.name),C.value))}if(p==="link"&&n){const y=Da(s);if(y){let C=Qs(t,y);if(!C&&y.includes(".css")){const k=window.location.origin,G=y.replace(window.location.href,""),_=k+"/"+G;C=Qs(t,_)}let I=null;C&&(I=kr(C)),I&&(delete f.rel,delete f.href,f._cssText=I)}}if(p==="style"&&s.sheet){let y=kr(s.sheet);y&&(s.childNodes.length>1&&(y=Ca(y,s)),f._cssText=y)}if(p==="input"||p==="textarea"||p==="select"){const y=s.value,C=s.checked;f.type!=="radio"&&f.type!=="checkbox"&&f.type!=="submit"&&f.type!=="button"&&y?f.value=ps({element:s,type:ds(s),tagName:p,value:y,maskInputOptions:o,maskInputFn:l}):C&&(f.checked=C)}if(p==="option"&&(s.selected&&!o.select?f.selected=!0:delete f.selected),p==="dialog"&&s.open)try{f.rr_open_mode=s.matches("dialog:modal")?"modal":"non-modal"}catch(y){f.rr_open_mode="modal",f.ph_rr_could_not_detect_modal=!0}if(p==="canvas"&&c){if(s.__context==="2d")da(s)||(f.rr_dataURL=s.toDataURL(a.type,a.quality));else if(!("__context"in s)){const y=s.toDataURL(a.type,a.quality),C=t.createElement("canvas");C.width=s.width,C.height=s.height;const I=C.toDataURL(a.type,a.quality);y!==I&&(f.rr_dataURL=y)}}if(p==="img"&&u){Re||(Re=t.createElement("canvas"),Xs=Re.getContext("2d"));const y=s,C=y.currentSrc||y.getAttribute("src")||"<unknown-src>",I=y.crossOrigin,k=()=>{y.removeEventListener("load",k);try{Re.width=y.naturalWidth,Re.height=y.naturalHeight,Xs.drawImage(y,0,0),f.rr_dataURL=Re.toDataURL(a.type,a.quality)}catch(G){if(y.crossOrigin!=="anonymous"){y.crossOrigin="anonymous",y.complete&&y.naturalWidth!==0?k():y.addEventListener("load",k);return}else console.warn(`Cannot inline img src=${C}! Error: ${G}`)}y.crossOrigin==="anonymous"&&(I?f.crossOrigin=I:y.removeAttribute("crossorigin"))};y.complete&&y.naturalWidth!==0?k():y.addEventListener("load",k)}if(p==="audio"||p==="video"){const y=f;y.rr_mediaState=s.paused?"paused":"played",y.rr_mediaCurrentTime=s.currentTime,y.rr_mediaPlaybackRate=s.playbackRate,y.rr_mediaMuted=s.muted,y.rr_mediaLoop=s.loop,y.rr_mediaVolume=s.volume}if(m||(s.scrollLeft&&(f.rr_scrollLeft=s.scrollLeft),s.scrollTop&&(f.rr_scrollTop=s.scrollTop)),g){const{width:y,height:C}=s.getBoundingClientRect();f={class:f.class,rr_width:`${y}px`,rr_height:`${C}px`}}p==="iframe"&&!h(f.src)&&(s.contentDocument||(f.rr_src=f.src),delete f.src);let S;try{customElements.get(p)&&(S=!0)}catch(y){}return{type:H.Element,tagName:p,attributes:f,childNodes:[],isSVG:Aa(s)||void 0,needBlock:g,rootId:d,isCustom:S}}function D(s){return s==null?"":s.toLowerCase()}function Ta(s,e){if(e.comment&&s.type===H.Comment)return!0;if(s.type===H.Element){if(e.script&&(s.tagName==="script"||s.tagName==="link"&&(s.attributes.rel==="preload"||s.attributes.rel==="modulepreload")&&s.attributes.as==="script"||s.tagName==="link"&&s.attributes.rel==="prefetch"&&typeof s.attributes.href=="string"&&Ji(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 $e(s,e){const{doc:t,mirror:r,blockClass:i,blockSelector:n,maskTextClass:o,maskTextSelector:l,skipChild:a=!1,inlineStylesheet:u=!0,maskInputOptions:c={},maskTextFn:h,maskInputFn:m,slimDOMOptions:d,dataURLOptions:g={},inlineImages:p=!1,recordCanvas:f=!1,onSerialize:b,onIframeLoad:S,iframeLoadTimeout:y=5e3,onStylesheetLoad:C,stylesheetLoadTimeout:I=5e3,keepIframeSrcFn:k=()=>!1,newlyAddedElement:G=!1,cssCaptured:_=!1}=e;let{needsMask:V}=e,{preserveWhiteSpace:Y=!0}=e;V||(V=qi(s,o,l,V===void 0));const Q=ka(s,{doc:t,mirror:r,blockClass:i,blockSelector:n,needsMask:V,inlineStylesheet:u,maskInputOptions:c,maskTextFn:h,maskInputFn:m,dataURLOptions:g,inlineImages:p,recordCanvas:f,keepIframeSrcFn:k,newlyAddedElement:G,cssCaptured:_});if(!Q)return console.warn(s,"not serialized"),null;let oe;r.hasNode(s)?oe=r.getId(s):Ta(Q,d)||!Y&&Q.type===H.Text&&!Q.textContent.replace(/^\s+|\s+$/gm,"").length?oe=Ze:oe=Xi();const A=Object.assign(Q,{id:oe});if(r.add(s,A),oe===Ze)return null;b&&b(s);let Ue=!a;if(A.type===H.Element){Ue=Ue&&!A.needBlock,delete A.needBlock;const j=Z.shadowRoot(s);j&&He(j)&&(A.isShadowHost=!0)}if((A.type===H.Document||A.type===H.Element)&&Ue){d.headWhitespace&&A.type===H.Element&&A.tagName==="head"&&(Y=!1);const j={doc:t,mirror:r,blockClass:i,blockSelector:n,needsMask:V,maskTextClass:o,maskTextSelector:l,skipChild:a,inlineStylesheet:u,maskInputOptions:c,maskTextFn:h,maskInputFn:m,slimDOMOptions:d,dataURLOptions:g,inlineImages:p,recordCanvas:f,preserveWhiteSpace:Y,onSerialize:b,onIframeLoad:S,iframeLoadTimeout:y,onStylesheetLoad:C,stylesheetLoadTimeout:I,keepIframeSrcFn:k,cssCaptured:!1};if(!(A.type===H.Element&&A.tagName==="textarea"&&A.attributes.value!==void 0)){A.type===H.Element&&A.attributes._cssText!==void 0&&typeof A.attributes._cssText=="string"&&(j.cssCaptured=!0);for(const ye of Array.from(Z.childNodes(s))){const ae=$e(ye,j);ae&&A.childNodes.push(ae)}}let q=null;if(Hi(s)&&(q=Z.shadowRoot(s)))for(const ye of Array.from(Z.childNodes(q))){const ae=$e(ye,j);ae&&(He(q)&&(ae.isShadow=!0),A.childNodes.push(ae))}}const Be=Z.parentNode(s);return Be&&je(Be)&&He(Be)&&(A.isShadow=!0),A.type===H.Element&&A.tagName==="iframe"&&$a(s,()=>{const j=s.contentDocument;if(j&&S){const q=$e(j,{doc:j,mirror:r,blockClass:i,blockSelector:n,needsMask:V,maskTextClass:o,maskTextSelector:l,skipChild:!1,inlineStylesheet:u,maskInputOptions:c,maskTextFn:h,maskInputFn:m,slimDOMOptions:d,dataURLOptions:g,inlineImages:p,recordCanvas:f,preserveWhiteSpace:Y,onSerialize:b,onIframeLoad:S,iframeLoadTimeout:y,onStylesheetLoad:C,stylesheetLoadTimeout:I,keepIframeSrcFn:k});q&&S(s,q)}},y),A.type===H.Element&&A.tagName==="link"&&typeof A.attributes.rel=="string"&&(A.attributes.rel==="stylesheet"||A.attributes.rel==="preload"&&typeof A.attributes.href=="string"&&Ji(A.attributes.href)==="css")&&Na(s,()=>{if(C){const j=$e(s,{doc:t,mirror:r,blockClass:i,blockSelector:n,needsMask:V,maskTextClass:o,maskTextSelector:l,skipChild:!1,inlineStylesheet:u,maskInputOptions:c,maskTextFn:h,maskInputFn:m,slimDOMOptions:d,dataURLOptions:g,inlineImages:p,recordCanvas:f,preserveWhiteSpace:Y,onSerialize:b,onIframeLoad:S,iframeLoadTimeout:y,onStylesheetLoad:C,stylesheetLoadTimeout:I,keepIframeSrcFn:k});j&&C(s,j)}},I),A}function Fa(s,e){const{mirror:t=new Zi,blockClass:r="rr-block",blockSelector:i=null,maskTextClass:n="rr-mask",maskTextSelector:o=null,inlineStylesheet:l=!0,inlineImages:a=!1,recordCanvas:u=!1,maskAllInputs:c=!1,maskTextFn:h,maskInputFn:m,slimDOM:d=!1,dataURLOptions:g,preserveWhiteSpace:p,onSerialize:f,onIframeLoad:b,iframeLoadTimeout:S,onStylesheetLoad:y,stylesheetLoadTimeout:C,keepIframeSrcFn:I=()=>!1}=e||{};return $e(s,{doc:s,mirror:t,blockClass:r,blockSelector:i,maskTextClass:n,maskTextSelector:o,skipChild:!1,inlineStylesheet:l,maskInputOptions:c===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:c===!1?{password:!0}:c,maskTextFn:h,maskInputFn:m,slimDOMOptions:d===!0||d==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:d==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:d===!1?{}:d,dataURLOptions:g,inlineImages:a,recordCanvas:u,preserveWhiteSpace:p,onSerialize:f,onIframeLoad:b,iframeLoadTimeout:S,onStylesheetLoad:y,stylesheetLoadTimeout:C,keepIframeSrcFn:I,newlyAddedElement:!1})}function Ua(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}function Ba(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 gs={exports:{}},L=String,en=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}};gs.exports=en();gs.exports.createColors=en;var za=gs.exports;const Wa={},Ga=Object.freeze(Object.defineProperty({__proto__:null,default:Wa},Symbol.toStringTag,{value:"Module"})),ie=Ba(Ga);let qs=za,ei=ie,Pr=class tn 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,tn)}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=qs.isColorSupported),ei&&e&&(t=ei(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}=qs.createColors(!0);l=m=>u(h(m)),a=m=>c(m)}else l=a=u=>u;return r.slice(i,n).map((u,c)=>{let h=i+1+c,m=" "+(" "+h).slice(-o)+" | ";if(h===this.line){let d=a(m.replace(/\d/g," "))+u.slice(0,this.column-1).replace(/[^\t]/g," ");return l(">")+a(m)+u+`
|
|
15
|
-
`+
|
|
16
|
-
`)}toString(){let
|
|
14
|
+
"use strict";var wn=Object.defineProperty,bn=Object.defineProperties;var Sn=Object.getOwnPropertyDescriptors;var Ve=Object.getOwnPropertySymbols;var es=Object.prototype.hasOwnProperty,ts=Object.prototype.propertyIsEnumerable;var Zr=(e,t,r)=>t in e?wn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,L=(e,t)=>{for(var r in t||(t={}))es.call(t,r)&&Zr(e,r,t[r]);if(Ve)for(var r of Ve(t))ts.call(t,r)&&Zr(e,r,t[r]);return e},oe=(e,t)=>bn(e,Sn(t));var Ee=(e,t)=>{var r={};for(var a in e)es.call(e,a)&&t.indexOf(a)<0&&(r[a]=e[a]);if(e!=null&&Ve)for(var a of Ve(e))t.indexOf(a)<0&&ts.call(e,a)&&(r[a]=e[a]);return r};Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var vn=Object.defineProperty,Cn=(e,t,r)=>t in e?vn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,A=(e,t,r)=>Cn(e,typeof t!="symbol"?t+"":t,r),rs,xn=Object.defineProperty,Rn=(e,t,r)=>t in e?xn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ss=(e,t,r)=>Rn(e,typeof t!="symbol"?t+"":t,r),X=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))(X||{});const is={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},ns={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},He={};function On(e){var t,r;const a=(r=(t=globalThis==null?void 0:globalThis.Zone)==null?void 0:t.__symbol__)==null?void 0:r.call(t,e);if(a&&globalThis[a])return globalThis[a]}function kr(e){if(He[e])return He[e];const t=On(e)||globalThis[e],r=t.prototype,a=e in is?is[e]:void 0,s=!!(a&&a.every(m=>{var o,f;return!!((f=(o=Object.getOwnPropertyDescriptor(r,m))==null?void 0:o.get)!=null&&f.toString().includes("[native code]"))})),c=e in ns?ns[e]:void 0,p=!!(c&&c.every(m=>{var o;return typeof r[m]=="function"&&((o=r[m])==null?void 0:o.toString().includes("[native code]"))}));if(s&&p)return He[e]=t.prototype,t.prototype;try{const m=document.createElement("iframe");document.body.appendChild(m);const o=m.contentWindow;if(!o)return t.prototype;const f=o[e].prototype;return document.body.removeChild(m),f?He[e]=f:r}catch(m){return r}}const St={};function be(e,t,r){var a;const s=`${e}.${String(r)}`;if(St[s])return St[s].call(t);const c=kr(e),p=(a=Object.getOwnPropertyDescriptor(c,r))==null?void 0:a.get;return p?(St[s]=p,p.call(t)):t[r]}const vt={};function Ii(e,t,r){const a=`${e}.${String(r)}`;if(vt[a])return vt[a].bind(t);const c=kr(e)[r];return typeof c!="function"?t[r]:(vt[a]=c,c.bind(t))}function Mn(e){return be("Node",e,"childNodes")}function En(e){return be("Node",e,"parentNode")}function In(e){return be("Node",e,"parentElement")}function An(e){return be("Node",e,"textContent")}function Nn(e,t){return Ii("Node",e,"contains")(t)}function Pn(e){return Ii("Node",e,"getRootNode")()}function _n(e){return!e||!("host"in e)?null:be("ShadowRoot",e,"host")}function kn(e){return e.styleSheets}function Dn(e){return!e||!("shadowRoot"in e)?null:be("Element",e,"shadowRoot")}function Ln(e,t){return be("Element",e,"querySelector")(t)}function Tn(e,t){return be("Element",e,"querySelectorAll")(t)}function Fn(){return kr("MutationObserver").constructor}function Un(e,t,r){try{if(!(t in e))return()=>{};const a=e[t],s=r(a);return typeof s=="function"&&(s.prototype=s.prototype||{},Object.defineProperties(s,{__rrweb_original__:{enumerable:!1,value:a}})),e[t]=s,()=>{e[t]=a}}catch(a){return()=>{}}}const Z={childNodes:Mn,parentNode:En,parentElement:In,textContent:An,contains:Nn,getRootNode:Pn,host:_n,styleSheets:kn,shadowRoot:Dn,querySelector:Ln,querySelectorAll:Tn,mutationObserver:Fn,patch:Un};function Ai(e){return e.nodeType===e.ELEMENT_NODE}function Te(e){const t=e&&"host"in e&&"mode"in e&&Z.host(e)||null;return!!(t&&"shadowRoot"in t&&Z.shadowRoot(t)===e)}function Fe(e){return Object.prototype.toString.call(e)==="[object ShadowRoot]"}function $n(e){return e.includes(" background-clip: text;")&&!e.includes(" -webkit-background-clip: text;")&&(e=e.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),e}function zn(e){const{cssText:t}=e;if(t.split('"').length<3)return t;const r=["@import",`url(${JSON.stringify(e.href)})`];return e.layerName===""?r.push("layer"):e.layerName&&r.push(`layer(${e.layerName})`),e.supportsText&&r.push(`supports(${e.supportsText})`),e.media.length&&r.push(e.media.mediaText),r.join(" ")+";"}function Ar(e){try{const t=e.rules||e.cssRules;if(!t)return null;let r=e.href;!r&&e.ownerNode&&e.ownerNode.ownerDocument&&(r=e.ownerNode.ownerDocument.location.href);const a=Array.from(t,s=>Ni(s,r)).join("");return $n(a)}catch(t){return null}}function Ni(e,t){if(Bn(e)){let r;try{r=Ar(e.styleSheet)||zn(e)}catch(a){r=e.cssText}return e.styleSheet.href?st(r,e.styleSheet.href):r}else{let r=e.cssText;return qn(e)&&e.selectorText.includes(":")&&(r=Wn(r)),t?st(r,t):r}}function Wn(e){const t=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return e.replace(t,"$1\\$2")}function Bn(e){return"styleSheet"in e}function qn(e){return"selectorText"in e}class Pi{constructor(){ss(this,"idNodeMap",new Map),ss(this,"nodeMetaMap",new WeakMap)}getId(t){var r;if(!t)return-1;const a=(r=this.getMeta(t))==null?void 0:r.id;return a!=null?a:-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){const r=this.getId(t);this.idNodeMap.delete(r),t.childNodes&&t.childNodes.forEach(a=>this.removeNodeFromMap(a))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,r){const a=r.id;this.idNodeMap.set(a,t),this.nodeMetaMap.set(t,r)}replace(t,r){const a=this.getNode(t);if(a){const s=this.nodeMetaMap.get(a);s&&this.nodeMetaMap.set(r,s)}this.idNodeMap.set(t,r)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function jn(){return new Pi}function Dr({element:e,maskInputOptions:t,tagName:r,type:a,value:s,maskInputFn:c}){let p=s||"";const m=a&&xe(a);return(t[r.toLowerCase()]||m&&t[m])&&(c?p=c(p,e):p="*".repeat(p.length)),p}function xe(e){return e.toLowerCase()}const os="__rrweb_original__";function Vn(e){const t=e.getContext("2d");if(!t)return!0;const r=50;for(let a=0;a<e.width;a+=r)for(let s=0;s<e.height;s+=r){const c=t.getImageData,p=os in c?c[os]:c;if(new Uint32Array(p.call(t,a,s,Math.min(r,e.width-a),Math.min(r,e.height-s)).data.buffer).some(o=>o!==0))return!1}return!0}function Lr(e){const t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?xe(t):null}function _i(e,t){var c;let r;try{r=new URL(e,t!=null?t:window.location.href)}catch(p){return null}const a=/\.([0-9a-z]+)(?:$)/i,s=r.pathname.match(a);return(c=s==null?void 0:s[1])!=null?c:null}function Hn(e){let t="";return e.indexOf("//")>-1?t=e.split("/").slice(0,3).join("/"):t=e.split("/")[0],t=t.split("?")[0],t}const Gn=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,Jn=/^(?:[a-z+]+:)?\/\//i,Yn=/^www\..*/i,Qn=/^(data:)([^,]*),(.*)/i;function st(e,t){return(e||"").replace(Gn,(r,a,s,c,p,m)=>{const o=s||p||m,f=a||c||"";if(!o)return r;if(Jn.test(o)||Yn.test(o))return`url(${f}${o}${f})`;if(Qn.test(o))return`url(${f}${o}${f})`;if(o[0]==="/")return`url(${f}${Hn(t)+o}${f})`;const i=t.split("/"),h=o.split("/");i.pop();for(const l of h)l!=="."&&(l===".."?i.pop():i.push(l));return`url(${f}${i.join("/")}${f})`})}const Ct=new Map,xt=new Map;function Rt(e){if(!Ct.has(e)){const t=e.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"");Ct.set(e,t)}return Ct.get(e)}function Xn(e,t){const r=e;if(xt.has(e))return xt.get(e);const a=Array.from(t.childNodes),s=[];let c=0;if(a.length>1&&e&&typeof e=="string"){let p=Rt(e);const m=p.length/e.length;for(let o=1;o<a.length;o++)if(a[o].textContent&&typeof a[o].textContent=="string"){const f=Rt(a[o].textContent);let i=3;for(;i<f.length&&(f[i].match(/[a-zA-Z0-9]/)||f.indexOf(f.substring(0,i),1)!==-1);i++);for(;i<f.length;i++){const h=f.substring(0,i),l=p.split(h);let n=-1;if(l.length===2?n=p.indexOf(h):l.length>2&&l[0]===""&&a[o-1].textContent!==""&&(n=p.indexOf(h,1)),n!==-1){let d=Math.floor(n/m);for(;d>0&&d<e.length;){if(c+=1,c>50*a.length)return s.push(e),s;const u=Rt(e.substring(0,d));if(u.length===n){s.push(e.substring(0,d)),e=e.substring(d),p=p.substring(n);break}else u.length<n?d+=Math.max(1,Math.floor((n-u.length)/m)):d-=Math.max(1,Math.floor((u.length-n)*m))}break}}}}return s.push(e),r&&xt.set(r,s),s}function Kn(e,t){return Xn(e,t).join("/* rr_split */")}let Zn=1;const eo=new RegExp("[^a-z0-9-_:]"),$e=-2;function ki(){return Zn++}function to(e){if(e instanceof HTMLFormElement)return"form";const t=xe(e.tagName);return eo.test(t)?"div":t}let Ie,as;const ro=/^[^ \t\n\r\u000c]+/,so=/^[, \t\n\r\u000c]+/;function io(e,t){if(t.trim()==="")return t;let r=0;function a(c){let p;const m=c.exec(t.substring(r));return m?(p=m[0],r+=p.length,p):""}const s=[];for(;a(so),!(r>=t.length);){let c=a(ro);if(c.slice(-1)===",")c=Pe(e,c.substring(0,c.length-1)),s.push(c);else{let p="";c=Pe(e,c);let m=!1;for(;;){const o=t.charAt(r);if(o===""){s.push((c+p).trim());break}else if(m)o===")"&&(m=!1);else if(o===","){r+=1,s.push((c+p).trim());break}else o==="("&&(m=!0);p+=o,r+=1}}}return s.join(", ")}const ls=new WeakMap;function Pe(e,t){return!t||t.trim()===""?t:Tr(e,t)}function no(e){return!!(e.tagName==="svg"||e.ownerSVGElement)}function Tr(e,t){let r=ls.get(e);if(r||(r=e.createElement("a"),ls.set(e,r)),!t)t="";else if(t.startsWith("blob:")||t.startsWith("data:"))return t;return r.setAttribute("href",t),r.href}function Di(e,t,r,a){return a&&(r==="src"||r==="href"&&!(t==="use"&&a[0]==="#")||r==="xlink:href"&&a[0]!=="#"||r==="background"&&(t==="table"||t==="td"||t==="th")?Pe(e,a):r==="srcset"?io(e,a):r==="style"?st(a,Tr(e)):t==="object"&&r==="data"?Pe(e,a):a)}function Li(e,t,r){return(e==="video"||e==="audio")&&t==="autoplay"}function oo(e,t,r){try{if(typeof t=="string"){if(e.classList.contains(t))return!0}else for(let a=e.classList.length;a--;){const s=e.classList[a];if(t.test(s))return!0}if(r)return e.matches(r)}catch(a){}return!1}function it(e,t,r){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return r?it(Z.parentNode(e),t,r):!1;for(let a=e.classList.length;a--;){const s=e.classList[a];if(t.test(s))return!0}return r?it(Z.parentNode(e),t,r):!1}function Ti(e,t,r,a){let s;if(Ai(e)){if(s=e,!Z.childNodes(s).length)return!1}else{if(Z.parentElement(e)===null)return!1;s=Z.parentElement(e)}try{if(typeof t=="string"){if(a){if(s.closest(`.${t}`))return!0}else if(s.classList.contains(t))return!0}else if(it(s,t,a))return!0;if(r){if(a){if(s.closest(r))return!0}else if(s.matches(r))return!0}}catch(c){}return!1}function ao(e,t,r){const a=e.contentWindow;if(!a)return;let s=!1,c;try{c=a.document.readyState}catch(m){return}if(c!=="complete"){const m=setTimeout(()=>{s||(t(),s=!0)},r);e.addEventListener("load",()=>{clearTimeout(m),s=!0,t()});return}const p="about:blank";if(a.location.href!==p||e.src===p||e.src==="")return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}function lo(e,t,r){let a=!1,s;try{s=e.sheet}catch(p){return}if(s)return;const c=setTimeout(()=>{a||(t(),a=!0)},r);e.addEventListener("load",()=>{clearTimeout(c),a=!0,t()})}function uo(e,t){const{doc:r,mirror:a,blockClass:s,blockSelector:c,needsMask:p,inlineStylesheet:m,maskInputOptions:o={},maskTextFn:f,maskInputFn:i,dataURLOptions:h={},inlineImages:l,recordCanvas:n,keepIframeSrcFn:d,newlyAddedElement:u=!1,cssCaptured:g=!1}=t,v=co(r,a);switch(e.nodeType){case e.DOCUMENT_NODE:return e.compatMode!=="CSS1Compat"?{type:X.Document,childNodes:[],compatMode:e.compatMode}:{type:X.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:X.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:v};case e.ELEMENT_NODE:return po(e,{doc:r,blockClass:s,blockSelector:c,inlineStylesheet:m,maskInputOptions:o,maskInputFn:i,dataURLOptions:h,inlineImages:l,recordCanvas:n,keepIframeSrcFn:d,newlyAddedElement:u,rootId:v});case e.TEXT_NODE:return ho(e,{doc:r,needsMask:p,maskTextFn:f,rootId:v,cssCaptured:g});case e.CDATA_SECTION_NODE:return{type:X.CDATA,textContent:"",rootId:v};case e.COMMENT_NODE:return{type:X.Comment,textContent:Z.textContent(e)||"",rootId:v};default:return!1}}function co(e,t){if(!t.hasNode(e))return;const r=t.getId(e);return r===1?void 0:r}function ho(e,t){const{needsMask:r,maskTextFn:a,rootId:s,cssCaptured:c}=t,p=Z.parentNode(e),m=p&&p.tagName;let o="";const f=m==="STYLE"?!0:void 0,i=m==="SCRIPT"?!0:void 0;return i?o="SCRIPT_PLACEHOLDER":c||(o=Z.textContent(e),f&&o&&(o=st(o,Tr(t.doc)))),!f&&!i&&o&&r&&(o=a?a(o,Z.parentElement(e)):o.replace(/[\S]/g,"*")),{type:X.Text,textContent:o||"",rootId:s}}function us(e,t){return Array.from(e.styleSheets).find(r=>r.href===t)}function fo(e){return e.href}function po(e,t){const{doc:r,blockClass:a,blockSelector:s,inlineStylesheet:c,maskInputOptions:p={},maskInputFn:m,dataURLOptions:o={},inlineImages:f,recordCanvas:i,keepIframeSrcFn:h,newlyAddedElement:l=!1,rootId:n}=t,d=oo(e,a,s),u=to(e);let g={};const v=e.attributes.length;for(let b=0;b<v;b++){const x=e.attributes[b];Li(u,x.name,x.value)||(g[x.name]=Di(r,u,xe(x.name),x.value))}if(u==="link"&&c){const b=fo(e);if(b){let x=us(r,b);if(!x&&b.includes(".css")){const w=window.location.origin,C=b.replace(window.location.href,""),O=w+"/"+C;x=us(r,O)}let y=null;x&&(y=Ar(x)),y&&(delete g.rel,delete g.href,g._cssText=y)}}if(u==="style"&&e.sheet){let b=Ar(e.sheet);b&&(e.childNodes.length>1&&(b=Kn(b,e)),g._cssText=b)}if(u==="input"||u==="textarea"||u==="select"){const b=e.value,x=e.checked;g.type!=="radio"&&g.type!=="checkbox"&&g.type!=="submit"&&g.type!=="button"&&b?g.value=Dr({element:e,type:Lr(e),tagName:u,value:b,maskInputOptions:p,maskInputFn:m}):x&&(g.checked=x)}if(u==="option"&&(e.selected&&!p.select?g.selected=!0:delete g.selected),u==="dialog"&&e.open)try{g.rr_open_mode=e.matches("dialog:modal")?"modal":"non-modal"}catch(b){g.rr_open_mode="modal",g.ph_rr_could_not_detect_modal=!0}if(u==="canvas"&&i){if(e.__context==="2d")Vn(e)||(g.rr_dataURL=e.toDataURL(o.type,o.quality));else if(!("__context"in e)){const b=e.toDataURL(o.type,o.quality),x=r.createElement("canvas");x.width=e.width,x.height=e.height;const y=x.toDataURL(o.type,o.quality);b!==y&&(g.rr_dataURL=b)}}if(u==="img"&&f){Ie||(Ie=r.createElement("canvas"),as=Ie.getContext("2d"));const b=e,x=b.currentSrc||b.getAttribute("src")||"<unknown-src>",y=b.crossOrigin,w=()=>{b.removeEventListener("load",w);try{Ie.width=b.naturalWidth,Ie.height=b.naturalHeight,as.drawImage(b,0,0),g.rr_dataURL=Ie.toDataURL(o.type,o.quality)}catch(C){if(b.crossOrigin!=="anonymous"){b.crossOrigin="anonymous",b.complete&&b.naturalWidth!==0?w():b.addEventListener("load",w);return}else console.warn(`Cannot inline img src=${x}! Error: ${C}`)}b.crossOrigin==="anonymous"&&(y?g.crossOrigin=y:b.removeAttribute("crossorigin"))};b.complete&&b.naturalWidth!==0?w():b.addEventListener("load",w)}if(u==="audio"||u==="video"){const b=g;b.rr_mediaState=e.paused?"paused":"played",b.rr_mediaCurrentTime=e.currentTime,b.rr_mediaPlaybackRate=e.playbackRate,b.rr_mediaMuted=e.muted,b.rr_mediaLoop=e.loop,b.rr_mediaVolume=e.volume}if(l||(e.scrollLeft&&(g.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(g.rr_scrollTop=e.scrollTop)),d){const{width:b,height:x}=e.getBoundingClientRect();g={class:g.class,rr_width:`${b}px`,rr_height:`${x}px`}}u==="iframe"&&!h(g.src)&&(e.contentDocument||(g.rr_src=g.src),delete g.src);let S;try{customElements.get(u)&&(S=!0)}catch(b){}return{type:X.Element,tagName:u,attributes:g,childNodes:[],isSVG:no(e)||void 0,needBlock:d,rootId:n,isCustom:S}}function q(e){return e==null?"":e.toLowerCase()}function mo(e,t){if(t.comment&&e.type===X.Comment)return!0;if(e.type===X.Element){if(t.script&&(e.tagName==="script"||e.tagName==="link"&&(e.attributes.rel==="preload"||e.attributes.rel==="modulepreload")&&e.attributes.as==="script"||e.tagName==="link"&&e.attributes.rel==="prefetch"&&typeof e.attributes.href=="string"&&_i(e.attributes.href)==="js"))return!0;if(t.headFavicon&&(e.tagName==="link"&&e.attributes.rel==="shortcut icon"||e.tagName==="meta"&&(q(e.attributes.name).match(/^msapplication-tile(image|color)$/)||q(e.attributes.name)==="application-name"||q(e.attributes.rel)==="icon"||q(e.attributes.rel)==="apple-touch-icon"||q(e.attributes.rel)==="shortcut icon")))return!0;if(e.tagName==="meta"){if(t.headMetaDescKeywords&&q(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(q(e.attributes.property).match(/^(og|twitter|fb):/)||q(e.attributes.name).match(/^(og|twitter):/)||q(e.attributes.name)==="pinterest"))return!0;if(t.headMetaRobots&&(q(e.attributes.name)==="robots"||q(e.attributes.name)==="googlebot"||q(e.attributes.name)==="bingbot"))return!0;if(t.headMetaHttpEquiv&&e.attributes["http-equiv"]!==void 0)return!0;if(t.headMetaAuthorship&&(q(e.attributes.name)==="author"||q(e.attributes.name)==="generator"||q(e.attributes.name)==="framework"||q(e.attributes.name)==="publisher"||q(e.attributes.name)==="progid"||q(e.attributes.property).match(/^article:/)||q(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&(q(e.attributes.name)==="google-site-verification"||q(e.attributes.name)==="yandex-verification"||q(e.attributes.name)==="csrf-token"||q(e.attributes.name)==="p:domain_verify"||q(e.attributes.name)==="verify-v1"||q(e.attributes.name)==="verification"||q(e.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function _e(e,t){const{doc:r,mirror:a,blockClass:s,blockSelector:c,maskTextClass:p,maskTextSelector:m,skipChild:o=!1,inlineStylesheet:f=!0,maskInputOptions:i={},maskTextFn:h,maskInputFn:l,slimDOMOptions:n,dataURLOptions:d={},inlineImages:u=!1,recordCanvas:g=!1,onSerialize:v,onIframeLoad:S,iframeLoadTimeout:b=5e3,onStylesheetLoad:x,stylesheetLoadTimeout:y=5e3,keepIframeSrcFn:w=()=>!1,newlyAddedElement:C=!1,cssCaptured:O=!1}=t;let{needsMask:I}=t,{preserveWhiteSpace:M=!0}=t;I||(I=Ti(e,p,m,I===void 0));const _=uo(e,{doc:r,mirror:a,blockClass:s,blockSelector:c,needsMask:I,inlineStylesheet:f,maskInputOptions:i,maskTextFn:h,maskInputFn:l,dataURLOptions:d,inlineImages:u,recordCanvas:g,keepIframeSrcFn:w,newlyAddedElement:C,cssCaptured:O});if(!_)return console.warn(e,"not serialized"),null;let N;a.hasNode(e)?N=a.getId(e):mo(_,n)||!M&&_.type===X.Text&&!_.textContent.replace(/^\s+|\s+$/gm,"").length?N=$e:N=ki();const R=Object.assign(_,{id:N});if(a.add(e,R),N===$e)return null;v&&v(e);let le=!o;if(R.type===X.Element){le=le&&!R.needBlock,delete R.needBlock;const $=Z.shadowRoot(e);$&&Fe($)&&(R.isShadowHost=!0)}if((R.type===X.Document||R.type===X.Element)&&le){n.headWhitespace&&R.type===X.Element&&R.tagName==="head"&&(M=!1);const $={doc:r,mirror:a,blockClass:s,blockSelector:c,needsMask:I,maskTextClass:p,maskTextSelector:m,skipChild:o,inlineStylesheet:f,maskInputOptions:i,maskTextFn:h,maskInputFn:l,slimDOMOptions:n,dataURLOptions:d,inlineImages:u,recordCanvas:g,preserveWhiteSpace:M,onSerialize:v,onIframeLoad:S,iframeLoadTimeout:b,onStylesheetLoad:x,stylesheetLoadTimeout:y,keepIframeSrcFn:w,cssCaptured:!1};if(!(R.type===X.Element&&R.tagName==="textarea"&&R.attributes.value!==void 0)){R.type===X.Element&&R.attributes._cssText!==void 0&&typeof R.attributes._cssText=="string"&&($.cssCaptured=!0);for(const J of Array.from(Z.childNodes(e))){const K=_e(J,$);K&&R.childNodes.push(K)}}let U=null;if(Ai(e)&&(U=Z.shadowRoot(e)))for(const J of Array.from(Z.childNodes(U))){const K=_e(J,$);K&&(Fe(U)&&(K.isShadow=!0),R.childNodes.push(K))}}const ie=Z.parentNode(e);return ie&&Te(ie)&&Fe(ie)&&(R.isShadow=!0),R.type===X.Element&&R.tagName==="iframe"&&ao(e,()=>{const $=e.contentDocument;if($&&S){const U=_e($,{doc:$,mirror:a,blockClass:s,blockSelector:c,needsMask:I,maskTextClass:p,maskTextSelector:m,skipChild:!1,inlineStylesheet:f,maskInputOptions:i,maskTextFn:h,maskInputFn:l,slimDOMOptions:n,dataURLOptions:d,inlineImages:u,recordCanvas:g,preserveWhiteSpace:M,onSerialize:v,onIframeLoad:S,iframeLoadTimeout:b,onStylesheetLoad:x,stylesheetLoadTimeout:y,keepIframeSrcFn:w});U&&S(e,U)}},b),R.type===X.Element&&R.tagName==="link"&&typeof R.attributes.rel=="string"&&(R.attributes.rel==="stylesheet"||R.attributes.rel==="preload"&&typeof R.attributes.href=="string"&&_i(R.attributes.href)==="css")&&lo(e,()=>{if(x){const $=_e(e,{doc:r,mirror:a,blockClass:s,blockSelector:c,needsMask:I,maskTextClass:p,maskTextSelector:m,skipChild:!1,inlineStylesheet:f,maskInputOptions:i,maskTextFn:h,maskInputFn:l,slimDOMOptions:n,dataURLOptions:d,inlineImages:u,recordCanvas:g,preserveWhiteSpace:M,onSerialize:v,onIframeLoad:S,iframeLoadTimeout:b,onStylesheetLoad:x,stylesheetLoadTimeout:y,keepIframeSrcFn:w});$&&x(e,$)}},y),R}function go(e,t){const{mirror:r=new Pi,blockClass:a="rr-block",blockSelector:s=null,maskTextClass:c="rr-mask",maskTextSelector:p=null,inlineStylesheet:m=!0,inlineImages:o=!1,recordCanvas:f=!1,maskAllInputs:i=!1,maskTextFn:h,maskInputFn:l,slimDOM:n=!1,dataURLOptions:d,preserveWhiteSpace:u,onSerialize:g,onIframeLoad:v,iframeLoadTimeout:S,onStylesheetLoad:b,stylesheetLoadTimeout:x,keepIframeSrcFn:y=()=>!1}=t;return _e(e,{doc:e,mirror:r,blockClass:a,blockSelector:s,maskTextClass:c,maskTextSelector:p,skipChild:!1,inlineStylesheet:m,maskInputOptions:i===!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}:i===!1?{password:!0}:i,maskTextFn:h,maskInputFn:l,slimDOMOptions:n===!0||n==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:n==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:n===!1?{}:n,dataURLOptions:d,inlineImages:o,recordCanvas:f,preserveWhiteSpace:u,onSerialize:g,onIframeLoad:v,iframeLoadTimeout:S,onStylesheetLoad:b,stylesheetLoadTimeout:x,keepIframeSrcFn:y,newlyAddedElement:!1})}function yo(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function wo(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var r=function a(){return this instanceof a?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(a){var s=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(r,a,s.get?s:{enumerable:!0,get:function(){return e[a]}})}),r}var Ge={exports:{}},cs;function bo(){if(cs)return Ge.exports;cs=1;var e=String,t=function(){return{isColorSupported:!1,reset:e,bold:e,dim:e,italic:e,underline:e,inverse:e,hidden:e,strikethrough:e,black:e,red:e,green:e,yellow:e,blue:e,magenta:e,cyan:e,white:e,gray:e,bgBlack:e,bgRed:e,bgGreen:e,bgYellow:e,bgBlue:e,bgMagenta:e,bgCyan:e,bgWhite:e}};return Ge.exports=t(),Ge.exports.createColors=t,Ge.exports}const So={},vo=Object.freeze(Object.defineProperty({__proto__:null,default:So},Symbol.toStringTag,{value:"Module"})),he=wo(vo);var Ot,hs;function Fr(){if(hs)return Ot;hs=1;let e=bo(),t=he;class r extends Error{constructor(s,c,p,m,o,f){super(s),this.name="CssSyntaxError",this.reason=s,o&&(this.file=o),m&&(this.source=m),f&&(this.plugin=f),typeof c!="undefined"&&typeof p!="undefined"&&(typeof c=="number"?(this.line=c,this.column=p):(this.line=c.line,this.column=c.column,this.endLine=p.line,this.endColumn=p.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,r)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line!="undefined"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(s){if(!this.source)return"";let c=this.source;s==null&&(s=e.isColorSupported),t&&s&&(c=t(c));let p=c.split(/\r?\n/),m=Math.max(this.line-3,0),o=Math.min(this.line+2,p.length),f=String(o).length,i,h;if(s){let{bold:l,gray:n,red:d}=e.createColors(!0);i=u=>l(d(u)),h=u=>n(u)}else i=h=l=>l;return p.slice(m,o).map((l,n)=>{let d=m+1+n,u=" "+(" "+d).slice(-f)+" | ";if(d===this.line){let g=h(u.replace(/\d/g," "))+l.slice(0,this.column-1).replace(/[^\t]/g," ");return i(">")+h(u)+l+`
|
|
15
|
+
`+g+i("^")}return" "+h(u)+l}).join(`
|
|
16
|
+
`)}toString(){let s=this.showSourceCode();return s&&(s=`
|
|
17
17
|
|
|
18
|
-
`+
|
|
19
|
-
`),this.name+": "+this.message+
|
|
18
|
+
`+s+`
|
|
19
|
+
`),this.name+": "+this.message+s}}return Ot=r,r.default=r,Ot}var Je={},fs;function Ur(){return fs||(fs=1,Je.isClean=Symbol("isClean"),Je.my=Symbol("my")),Je}var Mt,ps;function Fi(){if(ps)return Mt;ps=1;const e={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
|
|
26
|
-
`)&&(
|
|
27
|
-
`)&&(
|
|
28
|
-
`)&&(
|
|
29
|
-
`)&&(
|
|
30
|
-
`);return
|
|
31
|
-
`?(
|
|
32
|
-
`);
|
|
24
|
+
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function t(a){return a[0].toUpperCase()+a.slice(1)}class r{constructor(s){this.builder=s}atrule(s,c){let p="@"+s.name,m=s.params?this.rawValue(s,"params"):"";if(typeof s.raws.afterName!="undefined"?p+=s.raws.afterName:m&&(p+=" "),s.nodes)this.block(s,p+m);else{let o=(s.raws.between||"")+(c?";":"");this.builder(p+m+o,s)}}beforeAfter(s,c){let p;s.type==="decl"?p=this.raw(s,null,"beforeDecl"):s.type==="comment"?p=this.raw(s,null,"beforeComment"):c==="before"?p=this.raw(s,null,"beforeRule"):p=this.raw(s,null,"beforeClose");let m=s.parent,o=0;for(;m&&m.type!=="root";)o+=1,m=m.parent;if(p.includes(`
|
|
25
|
+
`)){let f=this.raw(s,null,"indent");if(f.length)for(let i=0;i<o;i++)p+=f}return p}block(s,c){let p=this.raw(s,"between","beforeOpen");this.builder(c+p+"{",s,"start");let m;s.nodes&&s.nodes.length?(this.body(s),m=this.raw(s,"after")):m=this.raw(s,"after","emptyBody"),m&&this.builder(m),this.builder("}",s,"end")}body(s){let c=s.nodes.length-1;for(;c>0&&s.nodes[c].type==="comment";)c-=1;let p=this.raw(s,"semicolon");for(let m=0;m<s.nodes.length;m++){let o=s.nodes[m],f=this.raw(o,"before");f&&this.builder(f),this.stringify(o,c!==m||p)}}comment(s){let c=this.raw(s,"left","commentLeft"),p=this.raw(s,"right","commentRight");this.builder("/*"+c+s.text+p+"*/",s)}decl(s,c){let p=this.raw(s,"between","colon"),m=s.prop+p+this.rawValue(s,"value");s.important&&(m+=s.raws.important||" !important"),c&&(m+=";"),this.builder(m,s)}document(s){this.body(s)}raw(s,c,p){let m;if(p||(p=c),c&&(m=s.raws[c],typeof m!="undefined"))return m;let o=s.parent;if(p==="before"&&(!o||o.type==="root"&&o.first===s||o&&o.type==="document"))return"";if(!o)return e[p];let f=s.root();if(f.rawCache||(f.rawCache={}),typeof f.rawCache[p]!="undefined")return f.rawCache[p];if(p==="before"||p==="after")return this.beforeAfter(s,p);{let i="raw"+t(p);this[i]?m=this[i](f,s):f.walk(h=>{if(m=h.raws[c],typeof m!="undefined")return!1})}return typeof m=="undefined"&&(m=e[p]),f.rawCache[p]=m,m}rawBeforeClose(s){let c;return s.walk(p=>{if(p.nodes&&p.nodes.length>0&&typeof p.raws.after!="undefined")return c=p.raws.after,c.includes(`
|
|
26
|
+
`)&&(c=c.replace(/[^\n]+$/,"")),!1}),c&&(c=c.replace(/\S/g,"")),c}rawBeforeComment(s,c){let p;return s.walkComments(m=>{if(typeof m.raws.before!="undefined")return p=m.raws.before,p.includes(`
|
|
27
|
+
`)&&(p=p.replace(/[^\n]+$/,"")),!1}),typeof p=="undefined"?p=this.raw(c,null,"beforeDecl"):p&&(p=p.replace(/\S/g,"")),p}rawBeforeDecl(s,c){let p;return s.walkDecls(m=>{if(typeof m.raws.before!="undefined")return p=m.raws.before,p.includes(`
|
|
28
|
+
`)&&(p=p.replace(/[^\n]+$/,"")),!1}),typeof p=="undefined"?p=this.raw(c,null,"beforeRule"):p&&(p=p.replace(/\S/g,"")),p}rawBeforeOpen(s){let c;return s.walk(p=>{if(p.type!=="decl"&&(c=p.raws.between,typeof c!="undefined"))return!1}),c}rawBeforeRule(s){let c;return s.walk(p=>{if(p.nodes&&(p.parent!==s||s.first!==p)&&typeof p.raws.before!="undefined")return c=p.raws.before,c.includes(`
|
|
29
|
+
`)&&(c=c.replace(/[^\n]+$/,"")),!1}),c&&(c=c.replace(/\S/g,"")),c}rawColon(s){let c;return s.walkDecls(p=>{if(typeof p.raws.between!="undefined")return c=p.raws.between.replace(/[^\s:]/g,""),!1}),c}rawEmptyBody(s){let c;return s.walk(p=>{if(p.nodes&&p.nodes.length===0&&(c=p.raws.after,typeof c!="undefined"))return!1}),c}rawIndent(s){if(s.raws.indent)return s.raws.indent;let c;return s.walk(p=>{let m=p.parent;if(m&&m!==s&&m.parent&&m.parent===s&&typeof p.raws.before!="undefined"){let o=p.raws.before.split(`
|
|
30
|
+
`);return c=o[o.length-1],c=c.replace(/\S/g,""),!1}}),c}rawSemicolon(s){let c;return s.walk(p=>{if(p.nodes&&p.nodes.length&&p.last.type==="decl"&&(c=p.raws.semicolon,typeof c!="undefined"))return!1}),c}rawValue(s,c){let p=s[c],m=s.raws[c];return m&&m.value===p?m.raw:p}root(s){this.body(s),s.raws.after&&this.builder(s.raws.after)}rule(s){this.block(s,this.rawValue(s,"selector")),s.raws.ownSemicolon&&this.builder(s.raws.ownSemicolon,s,"end")}stringify(s,c){if(!this[s.type])throw new Error("Unknown AST node type "+s.type+". Maybe you need to change PostCSS stringifier.");this[s.type](s,c)}}return Mt=r,r.default=r,Mt}var Et,ds;function lt(){if(ds)return Et;ds=1;let e=Fi();function t(r,a){new e(a).stringify(r)}return Et=t,t.default=t,Et}var It,ms;function ut(){if(ms)return It;ms=1;let{isClean:e,my:t}=Ur(),r=Fr(),a=Fi(),s=lt();function c(m,o){let f=new m.constructor;for(let i in m){if(!Object.prototype.hasOwnProperty.call(m,i)||i==="proxyCache")continue;let h=m[i],l=typeof h;i==="parent"&&l==="object"?o&&(f[i]=o):i==="source"?f[i]=h:Array.isArray(h)?f[i]=h.map(n=>c(n,f)):(l==="object"&&h!==null&&(h=c(h)),f[i]=h)}return f}class p{constructor(o={}){this.raws={},this[e]=!1,this[t]=!0;for(let f in o)if(f==="nodes"){this.nodes=[];for(let i of o[f])typeof i.clone=="function"?this.append(i.clone()):this.append(i)}else this[f]=o[f]}addToError(o){if(o.postcssNode=this,o.stack&&this.source&&/\n\s{4}at /.test(o.stack)){let f=this.source;o.stack=o.stack.replace(/\n\s{4}at /,`$&${f.input.from}:${f.start.line}:${f.start.column}$&`)}return o}after(o){return this.parent.insertAfter(this,o),this}assign(o={}){for(let f in o)this[f]=o[f];return this}before(o){return this.parent.insertBefore(this,o),this}cleanRaws(o){delete this.raws.before,delete this.raws.after,o||delete this.raws.between}clone(o={}){let f=c(this);for(let i in o)f[i]=o[i];return f}cloneAfter(o={}){let f=this.clone(o);return this.parent.insertAfter(this,f),f}cloneBefore(o={}){let f=this.clone(o);return this.parent.insertBefore(this,f),f}error(o,f={}){if(this.source){let{end:i,start:h}=this.rangeBy(f);return this.source.input.error(o,{column:h.column,line:h.line},{column:i.column,line:i.line},f)}return new r(o)}getProxyProcessor(){return{get(o,f){return f==="proxyOf"?o:f==="root"?()=>o.root().toProxy():o[f]},set(o,f,i){return o[f]===i||(o[f]=i,(f==="prop"||f==="value"||f==="name"||f==="params"||f==="important"||f==="text")&&o.markDirty()),!0}}}markDirty(){if(this[e]){this[e]=!1;let o=this;for(;o=o.parent;)o[e]=!1}}next(){if(!this.parent)return;let o=this.parent.index(this);return this.parent.nodes[o+1]}positionBy(o,f){let i=this.source.start;if(o.index)i=this.positionInside(o.index,f);else if(o.word){f=this.toString();let h=f.indexOf(o.word);h!==-1&&(i=this.positionInside(h,f))}return i}positionInside(o,f){let i=f||this.toString(),h=this.source.start.column,l=this.source.start.line;for(let n=0;n<o;n++)i[n]===`
|
|
31
|
+
`?(h=1,l+=1):h+=1;return{column:h,line:l}}prev(){if(!this.parent)return;let o=this.parent.index(this);return this.parent.nodes[o-1]}rangeBy(o){let f={column:this.source.start.column,line:this.source.start.line},i=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:f.column+1,line:f.line};if(o.word){let h=this.toString(),l=h.indexOf(o.word);l!==-1&&(f=this.positionInside(l,h),i=this.positionInside(l+o.word.length,h))}else o.start?f={column:o.start.column,line:o.start.line}:o.index&&(f=this.positionInside(o.index)),o.end?i={column:o.end.column,line:o.end.line}:typeof o.endIndex=="number"?i=this.positionInside(o.endIndex):o.index&&(i=this.positionInside(o.index+1));return(i.line<f.line||i.line===f.line&&i.column<=f.column)&&(i={column:f.column+1,line:f.line}),{end:i,start:f}}raw(o,f){return new a().raw(this,o,f)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...o){if(this.parent){let f=this,i=!1;for(let h of o)h===this?i=!0:i?(this.parent.insertAfter(f,h),f=h):this.parent.insertBefore(f,h);i||this.remove()}return this}root(){let o=this;for(;o.parent&&o.parent.type!=="document";)o=o.parent;return o}toJSON(o,f){let i={},h=f==null;f=f||new Map;let l=0;for(let n in this){if(!Object.prototype.hasOwnProperty.call(this,n)||n==="parent"||n==="proxyCache")continue;let d=this[n];if(Array.isArray(d))i[n]=d.map(u=>typeof u=="object"&&u.toJSON?u.toJSON(null,f):u);else if(typeof d=="object"&&d.toJSON)i[n]=d.toJSON(null,f);else if(n==="source"){let u=f.get(d.input);u==null&&(u=l,f.set(d.input,l),l++),i[n]={end:d.end,inputId:u,start:d.start}}else i[n]=d}return h&&(i.inputs=[...f.keys()].map(n=>n.toJSON())),i}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(o=s){o.stringify&&(o=o.stringify);let f="";return o(this,i=>{f+=i}),f}warn(o,f,i){let h={node:this};for(let l in i)h[l]=i[l];return o.warn(f,h)}get proxyOf(){return this}}return It=p,p.default=p,It}var At,gs;function ct(){if(gs)return At;gs=1;let e=ut();class t extends e{constructor(a){a&&typeof a.value!="undefined"&&typeof a.value!="string"&&(a=oe(L({},a),{value:String(a.value)})),super(a),this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}}return At=t,t.default=t,At}var Nt,ys;function Co(){if(ys)return Nt;ys=1;let e="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";return Nt={nanoid:(a=21)=>{let s="",c=a;for(;c--;)s+=e[Math.random()*64|0];return s},customAlphabet:(a,s=21)=>(c=s)=>{let p="",m=c;for(;m--;)p+=a[Math.random()*a.length|0];return p}},Nt}var Pt,ws;function Ui(){if(ws)return Pt;ws=1;let{SourceMapConsumer:e,SourceMapGenerator:t}=he,{existsSync:r,readFileSync:a}=he,{dirname:s,join:c}=he;function p(o){return Buffer?Buffer.from(o,"base64").toString():window.atob(o)}class m{constructor(f,i){if(i.map===!1)return;this.loadAnnotation(f),this.inline=this.startWith(this.annotation,"data:");let h=i.map?i.map.prev:void 0,l=this.loadMap(i.from,h);!this.mapFile&&i.from&&(this.mapFile=i.from),this.mapFile&&(this.root=s(this.mapFile)),l&&(this.text=l)}consumer(){return this.consumerCache||(this.consumerCache=new e(this.text)),this.consumerCache}decodeInline(f){let i=/^data:application\/json;charset=utf-?8;base64,/,h=/^data:application\/json;base64,/,l=/^data:application\/json;charset=utf-?8,/,n=/^data:application\/json,/;if(l.test(f)||n.test(f))return decodeURIComponent(f.substr(RegExp.lastMatch.length));if(i.test(f)||h.test(f))return p(f.substr(RegExp.lastMatch.length));let d=f.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+d)}getAnnotationURL(f){return f.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(f){return typeof f!="object"?!1:typeof f.mappings=="string"||typeof f._mappings=="string"||Array.isArray(f.sections)}loadAnnotation(f){let i=f.match(/\/\*\s*# sourceMappingURL=/gm);if(!i)return;let h=f.lastIndexOf(i.pop()),l=f.indexOf("*/",h);h>-1&&l>-1&&(this.annotation=this.getAnnotationURL(f.substring(h,l)))}loadFile(f){if(this.root=s(f),r(f))return this.mapFile=f,a(f,"utf-8").toString().trim()}loadMap(f,i){if(i===!1)return!1;if(i){if(typeof i=="string")return i;if(typeof i=="function"){let h=i(f);if(h){let l=this.loadFile(h);if(!l)throw new Error("Unable to load previous source map: "+h.toString());return l}}else{if(i instanceof e)return t.fromSourceMap(i).toString();if(i instanceof t)return i.toString();if(this.isMap(i))return JSON.stringify(i);throw new Error("Unsupported previous source map format: "+i.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let h=this.annotation;return f&&(h=c(s(f),h)),this.loadFile(h)}}}startWith(f,i){return f?f.substr(0,i.length)===i:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}}return Pt=m,m.default=m,Pt}var _t,bs;function ht(){if(bs)return _t;bs=1;let{SourceMapConsumer:e,SourceMapGenerator:t}=he,{fileURLToPath:r,pathToFileURL:a}=he,{isAbsolute:s,resolve:c}=he,{nanoid:p}=Co(),m=he,o=Fr(),f=Ui(),i=Symbol("fromOffsetCache"),h=!!(e&&t),l=!!(c&&s);class n{constructor(u,g={}){if(u===null||typeof u=="undefined"||typeof u=="object"&&!u.toString)throw new Error(`PostCSS received ${u} instead of CSS string`);if(this.css=u.toString(),this.css[0]==="\uFEFF"||this.css[0]==="\uFFFE"?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,g.from&&(!l||/^\w+:\/\//.test(g.from)||s(g.from)?this.file=g.from:this.file=c(g.from)),l&&h){let v=new f(this.css,g);if(v.text){this.map=v;let S=v.consumer().file;!this.file&&S&&(this.file=this.mapResolve(S))}}this.file||(this.id="<input css "+p(6)+">"),this.map&&(this.map.file=this.from)}error(u,g,v,S={}){let b,x,y;if(g&&typeof g=="object"){let C=g,O=v;if(typeof C.offset=="number"){let I=this.fromOffset(C.offset);g=I.line,v=I.col}else g=C.line,v=C.column;if(typeof O.offset=="number"){let I=this.fromOffset(O.offset);x=I.line,y=I.col}else x=O.line,y=O.column}else if(!v){let C=this.fromOffset(g);g=C.line,v=C.col}let w=this.origin(g,v,x,y);return w?b=new o(u,w.endLine===void 0?w.line:{column:w.column,line:w.line},w.endLine===void 0?w.column:{column:w.endColumn,line:w.endLine},w.source,w.file,S.plugin):b=new o(u,x===void 0?g:{column:v,line:g},x===void 0?v:{column:y,line:x},this.css,this.file,S.plugin),b.input={column:v,endColumn:y,endLine:x,line:g,source:this.css},this.file&&(a&&(b.input.url=a(this.file).toString()),b.input.file=this.file),b}fromOffset(u){let g,v;if(this[i])v=this[i];else{let b=this.css.split(`
|
|
32
|
+
`);v=new Array(b.length);let x=0;for(let y=0,w=b.length;y<w;y++)v[y]=x,x+=b[y].length+1;this[i]=v}g=v[v.length-1];let S=0;if(u>=g)S=v.length-1;else{let b=v.length-2,x;for(;S<b;)if(x=S+(b-S>>1),u<v[x])b=x-1;else if(u>=v[x+1])S=x+1;else{S=x;break}}return{col:u-v[S]+1,line:S+1}}mapResolve(u){return/^\w+:\/\//.test(u)?u:c(this.map.consumer().sourceRoot||this.map.root||".",u)}origin(u,g,v,S){if(!this.map)return!1;let b=this.map.consumer(),x=b.originalPositionFor({column:g,line:u});if(!x.source)return!1;let y;typeof v=="number"&&(y=b.originalPositionFor({column:S,line:v}));let w;s(x.source)?w=a(x.source):w=new URL(x.source,this.map.consumer().sourceRoot||a(this.map.mapFile));let C={column:x.column,endColumn:y&&y.column,endLine:y&&y.line,line:x.line,url:w.toString()};if(w.protocol==="file:")if(r)C.file=r(w);else throw new Error("file: protocol is not available in this PostCSS build");let O=b.sourceContentFor(x.source);return O&&(C.source=O),C}toJSON(){let u={};for(let g of["hasBOM","css","file","id"])this[g]!=null&&(u[g]=this[g]);return this.map&&(u.map=L({},this.map),u.map.consumerCache&&(u.map.consumerCache=void 0)),u}get from(){return this.file||this.id}}return _t=n,n.default=n,m&&m.registerInput&&m.registerInput(n),_t}var kt,Ss;function $i(){if(Ss)return kt;Ss=1;let{SourceMapConsumer:e,SourceMapGenerator:t}=he,{dirname:r,relative:a,resolve:s,sep:c}=he,{pathToFileURL:p}=he,m=ht(),o=!!(e&&t),f=!!(r&&s&&a&&c);class i{constructor(l,n,d,u){this.stringify=l,this.mapOpts=d.map||{},this.root=n,this.opts=d,this.css=u,this.originalCSS=u,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let l;this.isInline()?l="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?l=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?l=this.mapOpts.annotation(this.opts.to,this.root):l=this.outputFile()+".map";let n=`
|
|
33
33
|
`;this.css.includes(`\r
|
|
34
|
-
`)&&(
|
|
35
|
-
`),this.css+=
|
|
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?Tt(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(r=Tt(an(r,this.mapOpts.annotation)));let i=on(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 cl(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(ai){let r=ai(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;ln==="\\"&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}};var un=pl;let dl=rr,Wr=class extends dl{constructor(e){super(e),this.type="comment"}};var nr=Wr;Wr.default=Wr;let{isClean:cn,my:hn}=it,fn=sr,pn=nr,ml=rr,dn,ws,bs,mn;function gn(s){return s.map(e=>(e.nodes&&(e.nodes=gn(e.nodes)),delete e.source,e))}function yn(s){if(s[cn]=!1,s.proxyOf.nodes)for(let e of s.proxyOf.nodes)yn(e)}let fe=class wn extends ml{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=gn(dn(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 fn(e)]}else if(e.selector)e=[new ws(e)];else if(e.name)e=[new bs(e)];else if(e.text)e=[new pn(e)];else throw new Error("Unknown node type in node creation");return e.map(i=>(i[hn]||wn.rebuild(i),i=i.proxyOf,i.parent&&i.parent.removeChild(i),i[cn]&&yn(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]}};fe.registerParse=s=>{dn=s};fe.registerRule=s=>{ws=s};fe.registerAtRule=s=>{bs=s};fe.registerRoot=s=>{mn=s};var ve=fe;fe.default=fe;fe.rebuild=s=>{s.type==="atrule"?Object.setPrototypeOf(s,bs.prototype):s.type==="rule"?Object.setPrototypeOf(s,ws.prototype):s.type==="decl"?Object.setPrototypeOf(s,fn.prototype):s.type==="comment"?Object.setPrototypeOf(s,pn.prototype):s.type==="root"&&Object.setPrototypeOf(s,mn.prototype),s[hn]=!0,s.nodes&&s.nodes.forEach(e=>{fe.rebuild(e)})};let gl=ve,bn,Sn,Je=class extends gl{constructor(e){super(O({type:"document"},e)),this.nodes||(this.nodes=[])}toResult(e={}){return new bn(new Sn,this,e).stringify()}};Je.registerLazyResult=s=>{bn=s};Je.registerProcessor=s=>{Sn=s};var Ss=Je;Je.default=Je;let Gr=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 Cn=Gr;Gr.default=Gr;let yl=Cn,Vr=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 yl(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>e.type==="warning")}get content(){return this.css}};var Cs=Vr;Vr.default=Vr;const Ir=39,li=34,gt=92,ui=47,yt=10,ze=32,wt=12,bt=9,St=13,wl=91,bl=93,Sl=40,Cl=41,vl=123,Il=125,xl=59,Ol=42,Rl=58,Ml=64,Ct=/[\t\n\f\r "#'()/;[\\\]{}]/g,vt=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,Al=/.[\r\n"'(/\\]/,ci=/[\da-f]/i;var El=function(e,t={}){let r=e.css.valueOf(),i=t.ignoreErrors,n,o,l,a,u,c,h,m,d,g,p=r.length,f=0,b=[],S=[];function y(){return f}function C(_){throw e.error("Unclosed "+_,f)}function I(){return S.length===0&&f>=p}function k(_){if(S.length)return S.pop();if(f>=p)return;let V=_?_.ignoreUnclosed:!1;switch(n=r.charCodeAt(f),n){case yt:case ze:case bt:case St:case wt:{o=f;do o+=1,n=r.charCodeAt(o);while(n===ze||n===yt||n===bt||n===St||n===wt);g=["space",r.slice(f,o)],f=o-1;break}case wl:case bl:case vl:case Il:case Rl:case xl:case Cl:{let Y=String.fromCharCode(n);g=[Y,Y,f];break}case Sl:{if(m=b.length?b.pop()[1]:"",d=r.charCodeAt(f+1),m==="url"&&d!==Ir&&d!==li&&d!==ze&&d!==yt&&d!==bt&&d!==wt&&d!==St){o=f;do{if(c=!1,o=r.indexOf(")",o+1),o===-1)if(i||V){o=f;break}else C("bracket");for(h=o;r.charCodeAt(h-1)===gt;)h-=1,c=!c}while(c);g=["brackets",r.slice(f,o+1),f,o],f=o}else o=r.indexOf(")",f+1),a=r.slice(f,o+1),o===-1||Al.test(a)?g=["(","(",f]:(g=["brackets",a,f,o],f=o);break}case Ir:case li:{l=n===Ir?"'":'"',o=f;do{if(c=!1,o=r.indexOf(l,o+1),o===-1)if(i||V){o=f+1;break}else C("string");for(h=o;r.charCodeAt(h-1)===gt;)h-=1,c=!c}while(c);g=["string",r.slice(f,o+1),f,o],f=o;break}case Ml:{Ct.lastIndex=f+1,Ct.test(r),Ct.lastIndex===0?o=r.length-1:o=Ct.lastIndex-2,g=["at-word",r.slice(f,o+1),f,o],f=o;break}case gt:{for(o=f,u=!0;r.charCodeAt(o+1)===gt;)o+=1,u=!u;if(n=r.charCodeAt(o+1),u&&n!==ui&&n!==ze&&n!==yt&&n!==bt&&n!==St&&n!==wt&&(o+=1,ci.test(r.charAt(o)))){for(;ci.test(r.charAt(o+1));)o+=1;r.charCodeAt(o+1)===ze&&(o+=1)}g=["word",r.slice(f,o+1),f,o],f=o;break}default:{n===ui&&r.charCodeAt(f+1)===Ol?(o=r.indexOf("*/",f+2)+1,o===0&&(i||V?o=r.length:C("comment")),g=["comment",r.slice(f,o+1),f,o],f=o):(vt.lastIndex=f+1,vt.test(r),vt.lastIndex===0?o=r.length-1:o=vt.lastIndex-2,g=["word",r.slice(f,o+1),f,o],b.push(g),f=o);break}}return f++,g}function G(_){S.push(_)}return{back:G,endOfFile:I,nextToken:k,position:y}};let vn=ve,jt=class extends vn{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 vs=jt;jt.default=jt;vn.registerAtRule(jt);let In=ve,xn,On,ke=class extends In{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 xn(new On,this,e).stringify()}};ke.registerLazyResult=s=>{xn=s};ke.registerProcessor=s=>{On=s};var nt=ke;ke.default=ke;In.registerRoot(ke);let Xe={comma(s){return Xe.split(s,[","],!0)},space(s){let e=[" ",`
|
|
37
|
-
`," "];return Xe.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 Rn=Xe;Xe.default=Xe;let Mn=ve,$l=Rn,Ht=class extends Mn{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return $l.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 Is=Ht;Ht.default=Ht;Mn.registerRule(Ht);let Nl=sr,kl=El,Pl=nr,_l=vs,Dl=nt,hi=Is;const fi={empty:!0,space:!0};function Ll(s){for(let e=s.length-1;e>=0;e--){let t=s[e],r=t[3]||t[2];if(r)return r}}let Tl=class{constructor(e){this.input=e,this.root=new Dl,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 _l;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 Pl;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=kl(this.input)}decl(e,t){let r=new Nl;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]||Ll(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 m=u;m>0;m--){let d=c[m][0];if(h.trim().indexOf("!")===0&&d!=="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 hi;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 m=0;m<l;m+=1)n=r[m],o=n[0],o==="space"&&m===l-1&&!i?u=!1:o==="comment"?(h=r[m-1]?r[m-1][0]:"empty",c=r[m+1]?r[m+1][0]:"empty",!fi[h]&&!fi[c]?a.slice(-1)===","?u=!1:a+=n[1]:u=!1):a+=n[1];if(!u){let m=r.reduce((d,g)=>d+g[1],"");e.raws[t]={raw:m,value:a}}e[t]=a}rule(e){e.pop();let t=new hi;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 Fl=Tl;let Ul=ve,Bl=Fl,zl=ir;function Yt(s,e){let t=new zl(s,e),r=new Bl(t);try{r.parse()}catch(i){throw i}return r.root}var xs=Yt;Yt.default=Yt;Ul.registerParse(Yt);let{isClean:ue,my:Wl}=it,Gl=un,Vl=tr,jl=ve,Hl=Ss;let pi=Cs,Yl=xs,Zl=nt;const Jl={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},Xl={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},Kl={Once:!0,postcssPlugin:!0,prepare:!0},Pe=0;function We(s){return typeof s=="object"&&typeof s.then=="function"}function An(s){let e=!1,t=Jl[s.type];return s.type==="decl"?e=s.prop.toLowerCase():s.type==="atrule"&&(e=s.name.toLowerCase()),e&&s.append?[t,t+"-"+e,Pe,t+"Exit",t+"Exit-"+e]:e?[t,t+"-"+e,t+"Exit",t+"Exit-"+e]:s.append?[t,Pe,t+"Exit"]:[t,t+"Exit"]}function di(s){let e;return s.type==="document"?e=["Document",Pe,"DocumentExit"]:s.type==="root"?e=["Root",Pe,"RootExit"]:e=An(s),{eventIndex:0,events:e,iterator:0,node:s,visitorIndex:0,visitors:[]}}function jr(s){return s[ue]=!1,s.nodes&&s.nodes.forEach(e=>jr(e)),s}let Hr={},_e=class En{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=jr(t);else if(t instanceof En||t instanceof pi)i=jr(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=Yl;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[Wl]&&jl.rebuild(i)}this.result=new pi(e,i,r),this.helpers=ee(O({},Hr),{postcss:Hr,result:this.result}),this.plugins=this.processor.plugins.map(n=>typeof n=="object"&&n.prepare?O(O({},n),n.prepare(this.result)):n)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let r=this.result.lastPlugin;try{t&&t.addToError(e),this.error=e,e.name==="CssSyntaxError"&&!e.plugin?(e.plugin=r.postcssPlugin,e.setMessage()):r.postcssVersion}catch(i){console&&console.error&&console.error(i)}return e}prepareVisitors(){this.listeners={};let e=(t,r,i)=>{this.listeners[r]||(this.listeners[r]=[]),this.listeners[r].push([t,i])};for(let t of this.plugins)if(typeof t=="object")for(let r in t){if(!Xl[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!Kl[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(We(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=[di(e)];for(;t.length>0;){let r=this.visitTick(t);if(We(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 We(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=Vl;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let i=new Gl(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(We(t))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[ue];)e[ue]=!0,this.walkSync(e);if(this.listeners.OnceExit)if(e.type==="document")for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,t){return this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[r,i]of e){this.result.lastPlugin=r;let n;try{n=i(t,this.helpers)}catch(o){throw this.handleError(o,t.proxyOf)}if(t.type!=="root"&&t.type!=="document"&&!t.parent)return!0;if(We(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[ue]){l[ue]=!0,e.push(di(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===Pe){r.nodes&&r.nodes.length&&(r[ue]=!0,t.iterator=r.getIterator());return}else if(this.listeners[o]){t.visitors=this.listeners[o];return}}e.pop()}walkSync(e){e[ue]=!0;let t=An(e);for(let r of t)if(r===Pe)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"}};_e.registerPostcss=s=>{Hr=s};var $n=_e;_e.default=_e;Zl.registerLazyResult(_e);Hl.registerLazyResult(_e);let Ql=un,ql=tr;let eu=xs;const tu=Cs;let Yr=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=ql;this.result=new tu(this._processor,i,this._opts),this.result.css=t;let o=this;Object.defineProperty(this.result,"root",{get(){return o.root}});let l=new Ql(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=eu;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 ru=Yr;Yr.default=Yr;let su=ru,iu=$n,nu=Ss,ou=nt,Ke=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 su(this,e,t):new iu(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var au=Ke;Ke.default=Ke;ou.registerProcessor(Ke);nu.registerProcessor(Ke);let lu=sr,uu=sn,cu=nr,hu=vs,fu=ir,pu=nt,du=Is;function Qe(s,e){if(Array.isArray(s))return s.map(o=>Qe(o));let i=s,{inputs:t}=i,r=Oe(i,["inputs"]);if(t){e=[];for(let o of t){let l=ee(O({},o),{__proto__:fu.prototype});l.map&&(l.map=ee(O({},l.map),{__proto__:uu.prototype})),e.push(l)}}if(r.nodes&&(r.nodes=s.nodes.map(o=>Qe(o,e))),r.source){let n=r.source,{inputId:o}=n,l=Oe(n,["inputId"]);r.source=l,o!=null&&(r.source.input=e[o])}if(r.type==="root")return new pu(r);if(r.type==="decl")return new lu(r);if(r.type==="rule")return new du(r);if(r.type==="comment")return new cu(r);if(r.type==="atrule")return new hu(r);throw new Error("Unknown node type: "+s.type)}var mu=Qe;Qe.default=Qe;let gu=ys,Nn=sr,yu=$n,wu=ve,Os=au,bu=tr,Su=mu,kn=Ss,Cu=Cn,Pn=nr,_n=vs,vu=Cs,Iu=ir,xu=xs,Ou=Rn,Dn=Is,Ln=nt,Ru=rr;function $(...s){return s.length===1&&Array.isArray(s[0])&&(s=s[0]),new Os(s)}$.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:
|
|
38
|
-
https://evilmartians.com/chronicles/postcss-8-plugin-migration`),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(
|
|
39
|
-
https://www.w3ctech.com/topic/2226`));let
|
|
40
|
-
`+
|
|
41
|
-
`)}toString(){let
|
|
34
|
+
`)&&(n=`\r
|
|
35
|
+
`),this.css+=n+"/*# sourceMappingURL="+l+" */"}applyPrevMaps(){for(let l of this.previous()){let n=this.toUrl(this.path(l.file)),d=l.root||r(l.file),u;this.mapOpts.sourcesContent===!1?(u=new e(l.text),u.sourcesContent&&(u.sourcesContent=null)):u=l.consumer(),this.map.applySourceMap(u,n,this.toUrl(this.path(d)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let l;for(let n=this.root.nodes.length-1;n>=0;n--)l=this.root.nodes[n],l.type==="comment"&&l.text.indexOf("# sourceMappingURL=")===0&&this.root.removeChild(n)}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),f&&o&&this.isMap())return this.generateMap();{let l="";return this.stringify(this.root,n=>{l+=n}),[l]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let l=this.previous()[0].consumer();l.file=this.outputFile(),this.map=t.fromSourceMap(l,{ignoreInvalidMapping:!0})}else this.map=new t({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css="",this.map=new t({file:this.outputFile(),ignoreInvalidMapping:!0});let l=1,n=1,d="<no source>",u={generated:{column:0,line:0},original:{column:0,line:0},source:""},g,v;this.stringify(this.root,(S,b,x)=>{if(this.css+=S,b&&x!=="end"&&(u.generated.line=l,u.generated.column=n-1,b.source&&b.source.start?(u.source=this.sourcePath(b),u.original.line=b.source.start.line,u.original.column=b.source.start.column-1,this.map.addMapping(u)):(u.source=d,u.original.line=1,u.original.column=0,this.map.addMapping(u))),g=S.match(/\n/g),g?(l+=g.length,v=S.lastIndexOf(`
|
|
36
|
+
`),n=S.length-v):n+=S.length,b&&x!=="start"){let y=b.parent||{raws:{}};(!(b.type==="decl"||b.type==="atrule"&&!b.nodes)||b!==y.last||y.raws.semicolon)&&(b.source&&b.source.end?(u.source=this.sourcePath(b),u.original.line=b.source.end.line,u.original.column=b.source.end.column-1,u.generated.line=l,u.generated.column=n-2,this.map.addMapping(u)):(u.source=d,u.original.line=1,u.original.column=0,u.generated.line=l,u.generated.column=n-1,this.map.addMapping(u)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation!="undefined"?this.mapOpts.annotation:this.previous().length?this.previous().some(l=>l.annotation):!0}isInline(){if(typeof this.mapOpts.inline!="undefined")return this.mapOpts.inline;let l=this.mapOpts.annotation;return typeof l!="undefined"&&l!==!0?!1:this.previous().length?this.previous().some(n=>n.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(l=>l.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(l){if(this.mapOpts.absolute||l.charCodeAt(0)===60||/^\w+:\/\//.test(l))return l;let n=this.memoizedPaths.get(l);if(n)return n;let d=this.opts.to?r(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(d=r(s(d,this.mapOpts.annotation)));let u=a(d,l);return this.memoizedPaths.set(l,u),u}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(l=>{if(l.source&&l.source.input.map){let n=l.source.input.map;this.previousMaps.includes(n)||this.previousMaps.push(n)}});else{let l=new m(this.originalCSS,this.opts);l.map&&this.previousMaps.push(l.map)}return this.previousMaps}setSourcesContent(){let l={};if(this.root)this.root.walk(n=>{if(n.source){let d=n.source.input.from;if(d&&!l[d]){l[d]=!0;let u=this.usesFileUrls?this.toFileUrl(d):this.toUrl(this.path(d));this.map.setSourceContent(u,n.source.input.css)}}});else if(this.css){let n=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(n,this.css)}}sourcePath(l){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(l.source.input.from):this.toUrl(this.path(l.source.input.from))}toBase64(l){return Buffer?Buffer.from(l).toString("base64"):window.btoa(unescape(encodeURIComponent(l)))}toFileUrl(l){let n=this.memoizedFileURLs.get(l);if(n)return n;if(p){let d=p(l).toString();return this.memoizedFileURLs.set(l,d),d}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(l){let n=this.memoizedURLs.get(l);if(n)return n;c==="\\"&&(l=l.replace(/\\/g,"/"));let d=encodeURI(l).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(l,d),d}}return kt=i,kt}var Dt,vs;function ft(){if(vs)return Dt;vs=1;let e=ut();class t extends e{constructor(a){super(a),this.type="comment"}}return Dt=t,t.default=t,Dt}var Lt,Cs;function Re(){if(Cs)return Lt;Cs=1;let{isClean:e,my:t}=Ur(),r=ct(),a=ft(),s=ut(),c,p,m,o;function f(l){return l.map(n=>(n.nodes&&(n.nodes=f(n.nodes)),delete n.source,n))}function i(l){if(l[e]=!1,l.proxyOf.nodes)for(let n of l.proxyOf.nodes)i(n)}class h extends s{append(...n){for(let d of n){let u=this.normalize(d,this.last);for(let g of u)this.proxyOf.nodes.push(g)}return this.markDirty(),this}cleanRaws(n){if(super.cleanRaws(n),this.nodes)for(let d of this.nodes)d.cleanRaws(n)}each(n){if(!this.proxyOf.nodes)return;let d=this.getIterator(),u,g;for(;this.indexes[d]<this.proxyOf.nodes.length&&(u=this.indexes[d],g=n(this.proxyOf.nodes[u],u),g!==!1);)this.indexes[d]+=1;return delete this.indexes[d],g}every(n){return this.nodes.every(n)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let n=this.lastEach;return this.indexes[n]=0,n}getProxyProcessor(){return{get(n,d){return d==="proxyOf"?n:n[d]?d==="each"||typeof d=="string"&&d.startsWith("walk")?(...u)=>n[d](...u.map(g=>typeof g=="function"?(v,S)=>g(v.toProxy(),S):g)):d==="every"||d==="some"?u=>n[d]((g,...v)=>u(g.toProxy(),...v)):d==="root"?()=>n.root().toProxy():d==="nodes"?n.nodes.map(u=>u.toProxy()):d==="first"||d==="last"?n[d].toProxy():n[d]:n[d]},set(n,d,u){return n[d]===u||(n[d]=u,(d==="name"||d==="params"||d==="selector")&&n.markDirty()),!0}}}index(n){return typeof n=="number"?n:(n.proxyOf&&(n=n.proxyOf),this.proxyOf.nodes.indexOf(n))}insertAfter(n,d){let u=this.index(n),g=this.normalize(d,this.proxyOf.nodes[u]).reverse();u=this.index(n);for(let S of g)this.proxyOf.nodes.splice(u+1,0,S);let v;for(let S in this.indexes)v=this.indexes[S],u<v&&(this.indexes[S]=v+g.length);return this.markDirty(),this}insertBefore(n,d){let u=this.index(n),g=u===0?"prepend":!1,v=this.normalize(d,this.proxyOf.nodes[u],g).reverse();u=this.index(n);for(let b of v)this.proxyOf.nodes.splice(u,0,b);let S;for(let b in this.indexes)S=this.indexes[b],u<=S&&(this.indexes[b]=S+v.length);return this.markDirty(),this}normalize(n,d){if(typeof n=="string")n=f(c(n).nodes);else if(typeof n=="undefined")n=[];else if(Array.isArray(n)){n=n.slice(0);for(let g of n)g.parent&&g.parent.removeChild(g,"ignore")}else if(n.type==="root"&&this.type!=="document"){n=n.nodes.slice(0);for(let g of n)g.parent&&g.parent.removeChild(g,"ignore")}else if(n.type)n=[n];else if(n.prop){if(typeof n.value=="undefined")throw new Error("Value field is missed in node creation");typeof n.value!="string"&&(n.value=String(n.value)),n=[new r(n)]}else if(n.selector)n=[new p(n)];else if(n.name)n=[new m(n)];else if(n.text)n=[new a(n)];else throw new Error("Unknown node type in node creation");return n.map(g=>(g[t]||h.rebuild(g),g=g.proxyOf,g.parent&&g.parent.removeChild(g),g[e]&&i(g),typeof g.raws.before=="undefined"&&d&&typeof d.raws.before!="undefined"&&(g.raws.before=d.raws.before.replace(/\S/g,"")),g.parent=this.proxyOf,g))}prepend(...n){n=n.reverse();for(let d of n){let u=this.normalize(d,this.first,"prepend").reverse();for(let g of u)this.proxyOf.nodes.unshift(g);for(let g in this.indexes)this.indexes[g]=this.indexes[g]+u.length}return this.markDirty(),this}push(n){return n.parent=this,this.proxyOf.nodes.push(n),this}removeAll(){for(let n of this.proxyOf.nodes)n.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(n){n=this.index(n),this.proxyOf.nodes[n].parent=void 0,this.proxyOf.nodes.splice(n,1);let d;for(let u in this.indexes)d=this.indexes[u],d>=n&&(this.indexes[u]=d-1);return this.markDirty(),this}replaceValues(n,d,u){return u||(u=d,d={}),this.walkDecls(g=>{d.props&&!d.props.includes(g.prop)||d.fast&&!g.value.includes(d.fast)||(g.value=g.value.replace(n,u))}),this.markDirty(),this}some(n){return this.nodes.some(n)}walk(n){return this.each((d,u)=>{let g;try{g=n(d,u)}catch(v){throw d.addToError(v)}return g!==!1&&d.walk&&(g=d.walk(n)),g})}walkAtRules(n,d){return d?n instanceof RegExp?this.walk((u,g)=>{if(u.type==="atrule"&&n.test(u.name))return d(u,g)}):this.walk((u,g)=>{if(u.type==="atrule"&&u.name===n)return d(u,g)}):(d=n,this.walk((u,g)=>{if(u.type==="atrule")return d(u,g)}))}walkComments(n){return this.walk((d,u)=>{if(d.type==="comment")return n(d,u)})}walkDecls(n,d){return d?n instanceof RegExp?this.walk((u,g)=>{if(u.type==="decl"&&n.test(u.prop))return d(u,g)}):this.walk((u,g)=>{if(u.type==="decl"&&u.prop===n)return d(u,g)}):(d=n,this.walk((u,g)=>{if(u.type==="decl")return d(u,g)}))}walkRules(n,d){return d?n instanceof RegExp?this.walk((u,g)=>{if(u.type==="rule"&&n.test(u.selector))return d(u,g)}):this.walk((u,g)=>{if(u.type==="rule"&&u.selector===n)return d(u,g)}):(d=n,this.walk((u,g)=>{if(u.type==="rule")return d(u,g)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}}return h.registerParse=l=>{c=l},h.registerRule=l=>{p=l},h.registerAtRule=l=>{m=l},h.registerRoot=l=>{o=l},Lt=h,h.default=h,h.rebuild=l=>{l.type==="atrule"?Object.setPrototypeOf(l,m.prototype):l.type==="rule"?Object.setPrototypeOf(l,p.prototype):l.type==="decl"?Object.setPrototypeOf(l,r.prototype):l.type==="comment"?Object.setPrototypeOf(l,a.prototype):l.type==="root"&&Object.setPrototypeOf(l,o.prototype),l[t]=!0,l.nodes&&l.nodes.forEach(n=>{h.rebuild(n)})},Lt}var Tt,xs;function $r(){if(xs)return Tt;xs=1;let e=Re(),t,r;class a extends e{constructor(c){super(L({type:"document"},c)),this.nodes||(this.nodes=[])}toResult(c={}){return new t(new r,this,c).stringify()}}return a.registerLazyResult=s=>{t=s},a.registerProcessor=s=>{r=s},Tt=a,a.default=a,Tt}var Ft,Rs;function zi(){if(Rs)return Ft;Rs=1;let e={};return Ft=function(r){e[r]||(e[r]=!0,typeof console!="undefined"&&console.warn&&console.warn(r))},Ft}var Ut,Os;function Wi(){if(Os)return Ut;Os=1;class e{constructor(r,a={}){if(this.type="warning",this.text=r,a.node&&a.node.source){let s=a.node.rangeBy(a);this.line=s.start.line,this.column=s.start.column,this.endLine=s.end.line,this.endColumn=s.end.column}for(let s in a)this[s]=a[s]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}}return Ut=e,e.default=e,Ut}var $t,Ms;function zr(){if(Ms)return $t;Ms=1;let e=Wi();class t{constructor(a,s,c){this.processor=a,this.messages=[],this.root=s,this.opts=c,this.css=void 0,this.map=void 0}toString(){return this.css}warn(a,s={}){s.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(s.plugin=this.lastPlugin.postcssPlugin);let c=new e(a,s);return this.messages.push(c),c}warnings(){return this.messages.filter(a=>a.type==="warning")}get content(){return this.css}}return $t=t,t.default=t,$t}var zt,Es;function xo(){if(Es)return zt;Es=1;const e=39,t=34,r=92,a=47,s=10,c=32,p=12,m=9,o=13,f=91,i=93,h=40,l=41,n=123,d=125,u=59,g=42,v=58,S=64,b=/[\t\n\f\r "#'()/;[\\\]{}]/g,x=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,y=/.[\r\n"'(/\\]/,w=/[\da-f]/i;return zt=function(O,I={}){let M=O.css.valueOf(),_=I.ignoreErrors,N,R,le,ie,$,U,J,K,Y,z,ge=M.length,E=0,pe=[],ne=[];function Le(){return E}function ee(P){throw O.error("Unclosed "+P,E)}function ue(){return ne.length===0&&E>=ge}function ve(P){if(ne.length)return ne.pop();if(E>=ge)return;let Q=P?P.ignoreUnclosed:!1;switch(N=M.charCodeAt(E),N){case s:case c:case m:case o:case p:{R=E;do R+=1,N=M.charCodeAt(R);while(N===c||N===s||N===m||N===o||N===p);z=["space",M.slice(E,R)],E=R-1;break}case f:case i:case n:case d:case v:case u:case l:{let W=String.fromCharCode(N);z=[W,W,E];break}case h:{if(K=pe.length?pe.pop()[1]:"",Y=M.charCodeAt(E+1),K==="url"&&Y!==e&&Y!==t&&Y!==c&&Y!==s&&Y!==m&&Y!==p&&Y!==o){R=E;do{if(U=!1,R=M.indexOf(")",R+1),R===-1)if(_||Q){R=E;break}else ee("bracket");for(J=R;M.charCodeAt(J-1)===r;)J-=1,U=!U}while(U);z=["brackets",M.slice(E,R+1),E,R],E=R}else R=M.indexOf(")",E+1),ie=M.slice(E,R+1),R===-1||y.test(ie)?z=["(","(",E]:(z=["brackets",ie,E,R],E=R);break}case e:case t:{le=N===e?"'":'"',R=E;do{if(U=!1,R=M.indexOf(le,R+1),R===-1)if(_||Q){R=E+1;break}else ee("string");for(J=R;M.charCodeAt(J-1)===r;)J-=1,U=!U}while(U);z=["string",M.slice(E,R+1),E,R],E=R;break}case S:{b.lastIndex=E+1,b.test(M),b.lastIndex===0?R=M.length-1:R=b.lastIndex-2,z=["at-word",M.slice(E,R+1),E,R],E=R;break}case r:{for(R=E,$=!0;M.charCodeAt(R+1)===r;)R+=1,$=!$;if(N=M.charCodeAt(R+1),$&&N!==a&&N!==c&&N!==s&&N!==m&&N!==o&&N!==p&&(R+=1,w.test(M.charAt(R)))){for(;w.test(M.charAt(R+1));)R+=1;M.charCodeAt(R+1)===c&&(R+=1)}z=["word",M.slice(E,R+1),E,R],E=R;break}default:{N===a&&M.charCodeAt(E+1)===g?(R=M.indexOf("*/",E+2)+1,R===0&&(_||Q?R=M.length:ee("comment")),z=["comment",M.slice(E,R+1),E,R],E=R):(x.lastIndex=E+1,x.test(M),x.lastIndex===0?R=M.length-1:R=x.lastIndex-2,z=["word",M.slice(E,R+1),E,R],pe.push(z),E=R);break}}return E++,z}function ye(P){ne.push(P)}return{back:ye,endOfFile:ue,nextToken:ve,position:Le}},zt}var Wt,Is;function Wr(){if(Is)return Wt;Is=1;let e=Re();class t extends e{constructor(a){super(a),this.type="atrule"}append(...a){return this.proxyOf.nodes||(this.nodes=[]),super.append(...a)}prepend(...a){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...a)}}return Wt=t,t.default=t,e.registerAtRule(t),Wt}var Bt,As;function We(){if(As)return Bt;As=1;let e=Re(),t,r;class a extends e{constructor(c){super(c),this.type="root",this.nodes||(this.nodes=[])}normalize(c,p,m){let o=super.normalize(c);if(p){if(m==="prepend")this.nodes.length>1?p.raws.before=this.nodes[1].raws.before:delete p.raws.before;else if(this.first!==p)for(let f of o)f.raws.before=p.raws.before}return o}removeChild(c,p){let m=this.index(c);return!p&&m===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[m].raws.before),super.removeChild(c)}toResult(c={}){return new t(new r,this,c).stringify()}}return a.registerLazyResult=s=>{t=s},a.registerProcessor=s=>{r=s},Bt=a,a.default=a,e.registerRoot(a),Bt}var qt,Ns;function Bi(){if(Ns)return qt;Ns=1;let e={comma(t){return e.split(t,[","],!0)},space(t){let r=[" ",`
|
|
37
|
+
`," "];return e.split(t,r)},split(t,r,a){let s=[],c="",p=!1,m=0,o=!1,f="",i=!1;for(let h of t)i?i=!1:h==="\\"?i=!0:o?h===f&&(o=!1):h==='"'||h==="'"?(o=!0,f=h):h==="("?m+=1:h===")"?m>0&&(m-=1):m===0&&r.includes(h)&&(p=!0),p?(c!==""&&s.push(c.trim()),c="",p=!1):c+=h;return(a||c!=="")&&s.push(c.trim()),s}};return qt=e,e.default=e,qt}var jt,Ps;function Br(){if(Ps)return jt;Ps=1;let e=Re(),t=Bi();class r extends e{constructor(s){super(s),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return t.comma(this.selector)}set selectors(s){let c=this.selector?this.selector.match(/,\s*/):null,p=c?c[0]:","+this.raw("between","beforeOpen");this.selector=s.join(p)}}return jt=r,r.default=r,e.registerRule(r),jt}var Vt,_s;function Ro(){if(_s)return Vt;_s=1;let e=ct(),t=xo(),r=ft(),a=Wr(),s=We(),c=Br();const p={empty:!0,space:!0};function m(f){for(let i=f.length-1;i>=0;i--){let h=f[i],l=h[3]||h[2];if(l)return l}}class o{constructor(i){this.input=i,this.root=new s,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:i,start:{column:1,line:1,offset:0}}}atrule(i){let h=new a;h.name=i[1].slice(1),h.name===""&&this.unnamedAtrule(h,i),this.init(h,i[2]);let l,n,d,u=!1,g=!1,v=[],S=[];for(;!this.tokenizer.endOfFile();){if(i=this.tokenizer.nextToken(),l=i[0],l==="("||l==="["?S.push(l==="("?")":"]"):l==="{"&&S.length>0?S.push("}"):l===S[S.length-1]&&S.pop(),S.length===0)if(l===";"){h.source.end=this.getPosition(i[2]),h.source.end.offset++,this.semicolon=!0;break}else if(l==="{"){g=!0;break}else if(l==="}"){if(v.length>0){for(d=v.length-1,n=v[d];n&&n[0]==="space";)n=v[--d];n&&(h.source.end=this.getPosition(n[3]||n[2]),h.source.end.offset++)}this.end(i);break}else v.push(i);else v.push(i);if(this.tokenizer.endOfFile()){u=!0;break}}h.raws.between=this.spacesAndCommentsFromEnd(v),v.length?(h.raws.afterName=this.spacesAndCommentsFromStart(v),this.raw(h,"params",v),u&&(i=v[v.length-1],h.source.end=this.getPosition(i[3]||i[2]),h.source.end.offset++,this.spaces=h.raws.between,h.raws.between="")):(h.raws.afterName="",h.params=""),g&&(h.nodes=[],this.current=h)}checkMissedSemicolon(i){let h=this.colon(i);if(h===!1)return;let l=0,n;for(let d=h-1;d>=0&&(n=i[d],!(n[0]!=="space"&&(l+=1,l===2)));d--);throw this.input.error("Missed semicolon",n[0]==="word"?n[3]+1:n[2])}colon(i){let h=0,l,n,d;for(let[u,g]of i.entries()){if(l=g,n=l[0],n==="("&&(h+=1),n===")"&&(h-=1),h===0&&n===":")if(!d)this.doubleColon(l);else{if(d[0]==="word"&&d[1]==="progid")continue;return u}d=l}return!1}comment(i){let h=new r;this.init(h,i[2]),h.source.end=this.getPosition(i[3]||i[2]),h.source.end.offset++;let l=i[1].slice(2,-2);if(/^\s*$/.test(l))h.text="",h.raws.left=l,h.raws.right="";else{let n=l.match(/^(\s*)([^]*\S)(\s*)$/);h.text=n[2],h.raws.left=n[1],h.raws.right=n[3]}}createTokenizer(){this.tokenizer=t(this.input)}decl(i,h){let l=new e;this.init(l,i[0][2]);let n=i[i.length-1];for(n[0]===";"&&(this.semicolon=!0,i.pop()),l.source.end=this.getPosition(n[3]||n[2]||m(i)),l.source.end.offset++;i[0][0]!=="word";)i.length===1&&this.unknownWord(i),l.raws.before+=i.shift()[1];for(l.source.start=this.getPosition(i[0][2]),l.prop="";i.length;){let S=i[0][0];if(S===":"||S==="space"||S==="comment")break;l.prop+=i.shift()[1]}l.raws.between="";let d;for(;i.length;)if(d=i.shift(),d[0]===":"){l.raws.between+=d[1];break}else d[0]==="word"&&/\w/.test(d[1])&&this.unknownWord([d]),l.raws.between+=d[1];(l.prop[0]==="_"||l.prop[0]==="*")&&(l.raws.before+=l.prop[0],l.prop=l.prop.slice(1));let u=[],g;for(;i.length&&(g=i[0][0],!(g!=="space"&&g!=="comment"));)u.push(i.shift());this.precheckMissedSemicolon(i);for(let S=i.length-1;S>=0;S--){if(d=i[S],d[1].toLowerCase()==="!important"){l.important=!0;let b=this.stringFrom(i,S);b=this.spacesFromEnd(i)+b,b!==" !important"&&(l.raws.important=b);break}else if(d[1].toLowerCase()==="important"){let b=i.slice(0),x="";for(let y=S;y>0;y--){let w=b[y][0];if(x.trim().indexOf("!")===0&&w!=="space")break;x=b.pop()[1]+x}x.trim().indexOf("!")===0&&(l.important=!0,l.raws.important=x,i=b)}if(d[0]!=="space"&&d[0]!=="comment")break}i.some(S=>S[0]!=="space"&&S[0]!=="comment")&&(l.raws.between+=u.map(S=>S[1]).join(""),u=[]),this.raw(l,"value",u.concat(i),h),l.value.includes(":")&&!h&&this.checkMissedSemicolon(i)}doubleColon(i){throw this.input.error("Double colon",{offset:i[2]},{offset:i[2]+i[1].length})}emptyRule(i){let h=new c;this.init(h,i[2]),h.selector="",h.raws.between="",this.current=h}end(i){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(i[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(i)}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(i){if(this.spaces+=i[1],this.current.nodes){let h=this.current.nodes[this.current.nodes.length-1];h&&h.type==="rule"&&!h.raws.ownSemicolon&&(h.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(i){let h=this.input.fromOffset(i);return{column:h.col,line:h.line,offset:i}}init(i,h){this.current.push(i),i.source={input:this.input,start:this.getPosition(h)},i.raws.before=this.spaces,this.spaces="",i.type!=="comment"&&(this.semicolon=!1)}other(i){let h=!1,l=null,n=!1,d=null,u=[],g=i[1].startsWith("--"),v=[],S=i;for(;S;){if(l=S[0],v.push(S),l==="("||l==="[")d||(d=S),u.push(l==="("?")":"]");else if(g&&n&&l==="{")d||(d=S),u.push("}");else if(u.length===0)if(l===";")if(n){this.decl(v,g);return}else break;else if(l==="{"){this.rule(v);return}else if(l==="}"){this.tokenizer.back(v.pop()),h=!0;break}else l===":"&&(n=!0);else l===u[u.length-1]&&(u.pop(),u.length===0&&(d=null));S=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(h=!0),u.length>0&&this.unclosedBracket(d),h&&n){if(!g)for(;v.length&&(S=v[v.length-1][0],!(S!=="space"&&S!=="comment"));)this.tokenizer.back(v.pop());this.decl(v,g)}else this.unknownWord(v)}parse(){let i;for(;!this.tokenizer.endOfFile();)switch(i=this.tokenizer.nextToken(),i[0]){case"space":this.spaces+=i[1];break;case";":this.freeSemicolon(i);break;case"}":this.end(i);break;case"comment":this.comment(i);break;case"at-word":this.atrule(i);break;case"{":this.emptyRule(i);break;default:this.other(i);break}this.endFile()}precheckMissedSemicolon(){}raw(i,h,l,n){let d,u,g=l.length,v="",S=!0,b,x;for(let y=0;y<g;y+=1)d=l[y],u=d[0],u==="space"&&y===g-1&&!n?S=!1:u==="comment"?(x=l[y-1]?l[y-1][0]:"empty",b=l[y+1]?l[y+1][0]:"empty",!p[x]&&!p[b]?v.slice(-1)===","?S=!1:v+=d[1]:S=!1):v+=d[1];if(!S){let y=l.reduce((w,C)=>w+C[1],"");i.raws[h]={raw:y,value:v}}i[h]=v}rule(i){i.pop();let h=new c;this.init(h,i[0][2]),h.raws.between=this.spacesAndCommentsFromEnd(i),this.raw(h,"selector",i),this.current=h}spacesAndCommentsFromEnd(i){let h,l="";for(;i.length&&(h=i[i.length-1][0],!(h!=="space"&&h!=="comment"));)l=i.pop()[1]+l;return l}spacesAndCommentsFromStart(i){let h,l="";for(;i.length&&(h=i[0][0],!(h!=="space"&&h!=="comment"));)l+=i.shift()[1];return l}spacesFromEnd(i){let h,l="";for(;i.length&&(h=i[i.length-1][0],h==="space");)l=i.pop()[1]+l;return l}stringFrom(i,h){let l="";for(let n=h;n<i.length;n++)l+=i[n][1];return i.splice(h,i.length-h),l}unclosedBlock(){let i=this.current.source.start;throw this.input.error("Unclosed block",i.line,i.column)}unclosedBracket(i){throw this.input.error("Unclosed bracket",{offset:i[2]},{offset:i[2]+1})}unexpectedClose(i){throw this.input.error("Unexpected }",{offset:i[2]},{offset:i[2]+1})}unknownWord(i){throw this.input.error("Unknown word",{offset:i[0][2]},{offset:i[0][2]+i[0][1].length})}unnamedAtrule(i,h){throw this.input.error("At-rule without name",{offset:h[2]},{offset:h[2]+h[1].length})}}return Vt=o,Vt}var Ht,ks;function qr(){if(ks)return Ht;ks=1;let e=Re(),t=Ro(),r=ht();function a(s,c){let p=new r(s,c),m=new t(p);try{m.parse()}catch(o){throw o}return m.root}return Ht=a,a.default=a,e.registerParse(a),Ht}var Gt,Ds;function qi(){if(Ds)return Gt;Ds=1;let{isClean:e,my:t}=Ur(),r=$i(),a=lt(),s=Re(),c=$r(),p=zi(),m=zr(),o=qr(),f=We();const i={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},h={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},l={Once:!0,postcssPlugin:!0,prepare:!0},n=0;function d(x){return typeof x=="object"&&typeof x.then=="function"}function u(x){let y=!1,w=i[x.type];return x.type==="decl"?y=x.prop.toLowerCase():x.type==="atrule"&&(y=x.name.toLowerCase()),y&&x.append?[w,w+"-"+y,n,w+"Exit",w+"Exit-"+y]:y?[w,w+"-"+y,w+"Exit",w+"Exit-"+y]:x.append?[w,n,w+"Exit"]:[w,w+"Exit"]}function g(x){let y;return x.type==="document"?y=["Document",n,"DocumentExit"]:x.type==="root"?y=["Root",n,"RootExit"]:y=u(x),{eventIndex:0,events:y,iterator:0,node:x,visitorIndex:0,visitors:[]}}function v(x){return x[e]=!1,x.nodes&&x.nodes.forEach(y=>v(y)),x}let S={};class b{constructor(y,w,C){this.stringified=!1,this.processed=!1;let O;if(typeof w=="object"&&w!==null&&(w.type==="root"||w.type==="document"))O=v(w);else if(w instanceof b||w instanceof m)O=v(w.root),w.map&&(typeof C.map=="undefined"&&(C.map={}),C.map.inline||(C.map.inline=!1),C.map.prev=w.map);else{let I=o;C.syntax&&(I=C.syntax.parse),C.parser&&(I=C.parser),I.parse&&(I=I.parse);try{O=I(w,C)}catch(M){this.processed=!0,this.error=M}O&&!O[t]&&s.rebuild(O)}this.result=new m(y,O,C),this.helpers=oe(L({},S),{postcss:S,result:this.result}),this.plugins=this.processor.plugins.map(I=>typeof I=="object"&&I.prepare?L(L({},I),I.prepare(this.result)):I)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(y){return this.async().catch(y)}finally(y){return this.async().then(y,y)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(y,w){let C=this.result.lastPlugin;try{w&&w.addToError(y),this.error=y,y.name==="CssSyntaxError"&&!y.plugin?(y.plugin=C.postcssPlugin,y.setMessage()):C.postcssVersion}catch(O){console&&console.error&&console.error(O)}return y}prepareVisitors(){this.listeners={};let y=(w,C,O)=>{this.listeners[C]||(this.listeners[C]=[]),this.listeners[C].push([w,O])};for(let w of this.plugins)if(typeof w=="object")for(let C in w){if(!h[C]&&/^[A-Z]/.test(C))throw new Error(`Unknown event ${C} in ${w.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!l[C])if(typeof w[C]=="object")for(let O in w[C])O==="*"?y(w,C,w[C][O]):y(w,C+"-"+O.toLowerCase(),w[C][O]);else typeof w[C]=="function"&&y(w,C,w[C])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let y=0;y<this.plugins.length;y++){let w=this.plugins[y],C=this.runOnRoot(w);if(d(C))try{await C}catch(O){throw this.handleError(O)}}if(this.prepareVisitors(),this.hasListener){let y=this.result.root;for(;!y[e];){y[e]=!0;let w=[g(y)];for(;w.length>0;){let C=this.visitTick(w);if(d(C))try{await C}catch(O){let I=w[w.length-1].node;throw this.handleError(O,I)}}}if(this.listeners.OnceExit)for(let[w,C]of this.listeners.OnceExit){this.result.lastPlugin=w;try{if(y.type==="document"){let O=y.nodes.map(I=>C(I,this.helpers));await Promise.all(O)}else await C(y,this.helpers)}catch(O){throw this.handleError(O)}}}return this.processed=!0,this.stringify()}runOnRoot(y){this.result.lastPlugin=y;try{if(typeof y=="object"&&y.Once){if(this.result.root.type==="document"){let w=this.result.root.nodes.map(C=>y.Once(C,this.helpers));return d(w[0])?Promise.all(w):w}return y.Once(this.result.root,this.helpers)}else if(typeof y=="function")return y(this.result.root,this.result)}catch(w){throw this.handleError(w)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let y=this.result.opts,w=a;y.syntax&&(w=y.syntax.stringify),y.stringifier&&(w=y.stringifier),w.stringify&&(w=w.stringify);let O=new r(w,this.result.root,this.result.opts).generate();return this.result.css=O[0],this.result.map=O[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 y of this.plugins){let w=this.runOnRoot(y);if(d(w))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let y=this.result.root;for(;!y[e];)y[e]=!0,this.walkSync(y);if(this.listeners.OnceExit)if(y.type==="document")for(let w of y.nodes)this.visitSync(this.listeners.OnceExit,w);else this.visitSync(this.listeners.OnceExit,y)}return this.result}then(y,w){return this.async().then(y,w)}toString(){return this.css}visitSync(y,w){for(let[C,O]of y){this.result.lastPlugin=C;let I;try{I=O(w,this.helpers)}catch(M){throw this.handleError(M,w.proxyOf)}if(w.type!=="root"&&w.type!=="document"&&!w.parent)return!0;if(d(I))throw this.getAsyncError()}}visitTick(y){let w=y[y.length-1],{node:C,visitors:O}=w;if(C.type!=="root"&&C.type!=="document"&&!C.parent){y.pop();return}if(O.length>0&&w.visitorIndex<O.length){let[M,_]=O[w.visitorIndex];w.visitorIndex+=1,w.visitorIndex===O.length&&(w.visitors=[],w.visitorIndex=0),this.result.lastPlugin=M;try{return _(C.toProxy(),this.helpers)}catch(N){throw this.handleError(N,C)}}if(w.iterator!==0){let M=w.iterator,_;for(;_=C.nodes[C.indexes[M]];)if(C.indexes[M]+=1,!_[e]){_[e]=!0,y.push(g(_));return}w.iterator=0,delete C.indexes[M]}let I=w.events;for(;w.eventIndex<I.length;){let M=I[w.eventIndex];if(w.eventIndex+=1,M===n){C.nodes&&C.nodes.length&&(C[e]=!0,w.iterator=C.getIterator());return}else if(this.listeners[M]){w.visitors=this.listeners[M];return}}y.pop()}walkSync(y){y[e]=!0;let w=u(y);for(let C of w)if(C===n)y.nodes&&y.each(O=>{O[e]||this.walkSync(O)});else{let O=this.listeners[C];if(O&&this.visitSync(O,y.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}}return b.registerPostcss=x=>{S=x},Gt=b,b.default=b,f.registerLazyResult(b),c.registerLazyResult(b),Gt}var Jt,Ls;function Oo(){if(Ls)return Jt;Ls=1;let e=$i(),t=lt(),r=zi(),a=qr();const s=zr();class c{constructor(m,o,f){o=o.toString(),this.stringified=!1,this._processor=m,this._css=o,this._opts=f,this._map=void 0;let i,h=t;this.result=new s(this._processor,i,this._opts),this.result.css=o;let l=this;Object.defineProperty(this.result,"root",{get(){return l.root}});let n=new e(h,i,this._opts,o);if(n.isMap()){let[d,u]=n.generate();d&&(this.result.css=d),u&&(this.result.map=u)}else n.clearAnnotation(),this.result.css=n.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(m){return this.async().catch(m)}finally(m){return this.async().then(m,m)}sync(){if(this.error)throw this.error;return this.result}then(m,o){return this.async().then(m,o)}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 m,o=a;try{m=o(this._css,this._opts)}catch(f){this.error=f}if(this.error)throw this.error;return this._root=m,m}get[Symbol.toStringTag](){return"NoWorkResult"}}return Jt=c,c.default=c,Jt}var Yt,Ts;function Mo(){if(Ts)return Yt;Ts=1;let e=Oo(),t=qi(),r=$r(),a=We();class s{constructor(p=[]){this.version="8.4.38",this.plugins=this.normalize(p)}normalize(p){let m=[];for(let o of p)if(o.postcss===!0?o=o():o.postcss&&(o=o.postcss),typeof o=="object"&&Array.isArray(o.plugins))m=m.concat(o.plugins);else if(typeof o=="object"&&o.postcssPlugin)m.push(o);else if(typeof o=="function")m.push(o);else if(!(typeof o=="object"&&(o.parse||o.stringify)))throw new Error(o+" is not a PostCSS plugin");return m}process(p,m={}){return!this.plugins.length&&!m.parser&&!m.stringifier&&!m.syntax?new e(this,p,m):new t(this,p,m)}use(p){return this.plugins=this.plugins.concat(this.normalize([p])),this}}return Yt=s,s.default=s,a.registerProcessor(s),r.registerProcessor(s),Yt}var Qt,Fs;function Eo(){if(Fs)return Qt;Fs=1;let e=ct(),t=Ui(),r=ft(),a=Wr(),s=ht(),c=We(),p=Br();function m(o,f){if(Array.isArray(o))return o.map(d=>m(d));let l=o,{inputs:i}=l,h=Ee(l,["inputs"]);if(i){f=[];for(let d of i){let u=oe(L({},d),{__proto__:s.prototype});u.map&&(u.map=oe(L({},u.map),{__proto__:t.prototype})),f.push(u)}}if(h.nodes&&(h.nodes=o.nodes.map(d=>m(d,f))),h.source){let n=h.source,{inputId:d}=n,u=Ee(n,["inputId"]);h.source=u,d!=null&&(h.source.input=f[d])}if(h.type==="root")return new c(h);if(h.type==="decl")return new e(h);if(h.type==="rule")return new p(h);if(h.type==="comment")return new r(h);if(h.type==="atrule")return new a(h);throw new Error("Unknown node type: "+o.type)}return Qt=m,m.default=m,Qt}var Xt,Us;function Io(){if(Us)return Xt;Us=1;let e=Fr(),t=ct(),r=qi(),a=Re(),s=Mo(),c=lt(),p=Eo(),m=$r(),o=Wi(),f=ft(),i=Wr(),h=zr(),l=ht(),n=qr(),d=Bi(),u=Br(),g=We(),v=ut();function S(...b){return b.length===1&&Array.isArray(b[0])&&(b=b[0]),new s(b)}return S.plugin=function(x,y){let w=!1;function C(...I){console&&console.warn&&!w&&(w=!0,console.warn(x+`: postcss.plugin was deprecated. Migration guide:
|
|
38
|
+
https://evilmartians.com/chronicles/postcss-8-plugin-migration`),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(x+`: \u91CC\u9762 postcss.plugin \u88AB\u5F03\u7528. \u8FC1\u79FB\u6307\u5357:
|
|
39
|
+
https://www.w3ctech.com/topic/2226`));let M=y(...I);return M.postcssPlugin=x,M.postcssVersion=new s().version,M}let O;return Object.defineProperty(C,"postcss",{get(){return O||(O=C()),O}}),C.process=function(I,M,_){return S([C(_)]).process(I,M)},C},S.stringify=c,S.parse=n,S.fromJSON=p,S.list=d,S.comment=b=>new f(b),S.atRule=b=>new i(b),S.decl=b=>new t(b),S.rule=b=>new u(b),S.root=b=>new g(b),S.document=b=>new m(b),S.CssSyntaxError=e,S.Declaration=t,S.Container=a,S.Processor=s,S.Document=m,S.Comment=f,S.Warning=o,S.AtRule=i,S.Result=h,S.Input=l,S.Rule=u,S.Root=g,S.Node=v,r.registerPostcss(S),Xt=S,S.default=S,Xt}var Ao=Io();const j=yo(Ao);j.stringify;j.fromJSON;j.plugin;j.parse;j.list;j.document;j.comment;j.atRule;j.rule;j.decl;j.root;j.CssSyntaxError;j.Declaration;j.Container;j.Processor;j.Document;j.Comment;j.Warning;j.AtRule;j.Result;j.Input;j.Rule;j.Root;j.Node;var No=Object.defineProperty,Po=(e,t,r)=>t in e?No(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ae=(e,t,r)=>Po(e,typeof t!="symbol"?t+"":t,r);function _o(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function ko(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var r=function a(){return this instanceof a?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(a){var s=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(r,a,s.get?s:{enumerable:!0,get:function(){return e[a]}})}),r}var Ye={exports:{}},$s;function Do(){if($s)return Ye.exports;$s=1;var e=String,t=function(){return{isColorSupported:!1,reset:e,bold:e,dim:e,italic:e,underline:e,inverse:e,hidden:e,strikethrough:e,black:e,red:e,green:e,yellow:e,blue:e,magenta:e,cyan:e,white:e,gray:e,bgBlack:e,bgRed:e,bgGreen:e,bgYellow:e,bgBlue:e,bgMagenta:e,bgCyan:e,bgWhite:e}};return Ye.exports=t(),Ye.exports.createColors=t,Ye.exports}const Lo={},To=Object.freeze(Object.defineProperty({__proto__:null,default:Lo},Symbol.toStringTag,{value:"Module"})),fe=ko(To);var Kt,zs;function jr(){if(zs)return Kt;zs=1;let e=Do(),t=fe;class r extends Error{constructor(s,c,p,m,o,f){super(s),this.name="CssSyntaxError",this.reason=s,o&&(this.file=o),m&&(this.source=m),f&&(this.plugin=f),typeof c!="undefined"&&typeof p!="undefined"&&(typeof c=="number"?(this.line=c,this.column=p):(this.line=c.line,this.column=c.column,this.endLine=p.line,this.endColumn=p.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,r)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line!="undefined"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(s){if(!this.source)return"";let c=this.source;s==null&&(s=e.isColorSupported),t&&s&&(c=t(c));let p=c.split(/\r?\n/),m=Math.max(this.line-3,0),o=Math.min(this.line+2,p.length),f=String(o).length,i,h;if(s){let{bold:l,gray:n,red:d}=e.createColors(!0);i=u=>l(d(u)),h=u=>n(u)}else i=h=l=>l;return p.slice(m,o).map((l,n)=>{let d=m+1+n,u=" "+(" "+d).slice(-f)+" | ";if(d===this.line){let g=h(u.replace(/\d/g," "))+l.slice(0,this.column-1).replace(/[^\t]/g," ");return i(">")+h(u)+l+`
|
|
40
|
+
`+g+i("^")}return" "+h(u)+l}).join(`
|
|
41
|
+
`)}toString(){let s=this.showSourceCode();return s&&(s=`
|
|
42
42
|
|
|
43
|
-
`+
|
|
44
|
-
`),this.name+": "+this.message+
|
|
43
|
+
`+s+`
|
|
44
|
+
`),this.name+": "+this.message+s}}return Kt=r,r.default=r,Kt}var Qe={},Ws;function Vr(){return Ws||(Ws=1,Qe.isClean=Symbol("isClean"),Qe.my=Symbol("my")),Qe}var Zt,Bs;function ji(){if(Bs)return Zt;Bs=1;const e={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
|
|
51
|
-
`)&&(
|
|
52
|
-
`)&&(
|
|
53
|
-
`)&&(
|
|
54
|
-
`)&&(
|
|
55
|
-
`);return
|
|
56
|
-
`?(
|
|
57
|
-
`);
|
|
49
|
+
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function t(a){return a[0].toUpperCase()+a.slice(1)}class r{constructor(s){this.builder=s}atrule(s,c){let p="@"+s.name,m=s.params?this.rawValue(s,"params"):"";if(typeof s.raws.afterName!="undefined"?p+=s.raws.afterName:m&&(p+=" "),s.nodes)this.block(s,p+m);else{let o=(s.raws.between||"")+(c?";":"");this.builder(p+m+o,s)}}beforeAfter(s,c){let p;s.type==="decl"?p=this.raw(s,null,"beforeDecl"):s.type==="comment"?p=this.raw(s,null,"beforeComment"):c==="before"?p=this.raw(s,null,"beforeRule"):p=this.raw(s,null,"beforeClose");let m=s.parent,o=0;for(;m&&m.type!=="root";)o+=1,m=m.parent;if(p.includes(`
|
|
50
|
+
`)){let f=this.raw(s,null,"indent");if(f.length)for(let i=0;i<o;i++)p+=f}return p}block(s,c){let p=this.raw(s,"between","beforeOpen");this.builder(c+p+"{",s,"start");let m;s.nodes&&s.nodes.length?(this.body(s),m=this.raw(s,"after")):m=this.raw(s,"after","emptyBody"),m&&this.builder(m),this.builder("}",s,"end")}body(s){let c=s.nodes.length-1;for(;c>0&&s.nodes[c].type==="comment";)c-=1;let p=this.raw(s,"semicolon");for(let m=0;m<s.nodes.length;m++){let o=s.nodes[m],f=this.raw(o,"before");f&&this.builder(f),this.stringify(o,c!==m||p)}}comment(s){let c=this.raw(s,"left","commentLeft"),p=this.raw(s,"right","commentRight");this.builder("/*"+c+s.text+p+"*/",s)}decl(s,c){let p=this.raw(s,"between","colon"),m=s.prop+p+this.rawValue(s,"value");s.important&&(m+=s.raws.important||" !important"),c&&(m+=";"),this.builder(m,s)}document(s){this.body(s)}raw(s,c,p){let m;if(p||(p=c),c&&(m=s.raws[c],typeof m!="undefined"))return m;let o=s.parent;if(p==="before"&&(!o||o.type==="root"&&o.first===s||o&&o.type==="document"))return"";if(!o)return e[p];let f=s.root();if(f.rawCache||(f.rawCache={}),typeof f.rawCache[p]!="undefined")return f.rawCache[p];if(p==="before"||p==="after")return this.beforeAfter(s,p);{let i="raw"+t(p);this[i]?m=this[i](f,s):f.walk(h=>{if(m=h.raws[c],typeof m!="undefined")return!1})}return typeof m=="undefined"&&(m=e[p]),f.rawCache[p]=m,m}rawBeforeClose(s){let c;return s.walk(p=>{if(p.nodes&&p.nodes.length>0&&typeof p.raws.after!="undefined")return c=p.raws.after,c.includes(`
|
|
51
|
+
`)&&(c=c.replace(/[^\n]+$/,"")),!1}),c&&(c=c.replace(/\S/g,"")),c}rawBeforeComment(s,c){let p;return s.walkComments(m=>{if(typeof m.raws.before!="undefined")return p=m.raws.before,p.includes(`
|
|
52
|
+
`)&&(p=p.replace(/[^\n]+$/,"")),!1}),typeof p=="undefined"?p=this.raw(c,null,"beforeDecl"):p&&(p=p.replace(/\S/g,"")),p}rawBeforeDecl(s,c){let p;return s.walkDecls(m=>{if(typeof m.raws.before!="undefined")return p=m.raws.before,p.includes(`
|
|
53
|
+
`)&&(p=p.replace(/[^\n]+$/,"")),!1}),typeof p=="undefined"?p=this.raw(c,null,"beforeRule"):p&&(p=p.replace(/\S/g,"")),p}rawBeforeOpen(s){let c;return s.walk(p=>{if(p.type!=="decl"&&(c=p.raws.between,typeof c!="undefined"))return!1}),c}rawBeforeRule(s){let c;return s.walk(p=>{if(p.nodes&&(p.parent!==s||s.first!==p)&&typeof p.raws.before!="undefined")return c=p.raws.before,c.includes(`
|
|
54
|
+
`)&&(c=c.replace(/[^\n]+$/,"")),!1}),c&&(c=c.replace(/\S/g,"")),c}rawColon(s){let c;return s.walkDecls(p=>{if(typeof p.raws.between!="undefined")return c=p.raws.between.replace(/[^\s:]/g,""),!1}),c}rawEmptyBody(s){let c;return s.walk(p=>{if(p.nodes&&p.nodes.length===0&&(c=p.raws.after,typeof c!="undefined"))return!1}),c}rawIndent(s){if(s.raws.indent)return s.raws.indent;let c;return s.walk(p=>{let m=p.parent;if(m&&m!==s&&m.parent&&m.parent===s&&typeof p.raws.before!="undefined"){let o=p.raws.before.split(`
|
|
55
|
+
`);return c=o[o.length-1],c=c.replace(/\S/g,""),!1}}),c}rawSemicolon(s){let c;return s.walk(p=>{if(p.nodes&&p.nodes.length&&p.last.type==="decl"&&(c=p.raws.semicolon,typeof c!="undefined"))return!1}),c}rawValue(s,c){let p=s[c],m=s.raws[c];return m&&m.value===p?m.raw:p}root(s){this.body(s),s.raws.after&&this.builder(s.raws.after)}rule(s){this.block(s,this.rawValue(s,"selector")),s.raws.ownSemicolon&&this.builder(s.raws.ownSemicolon,s,"end")}stringify(s,c){if(!this[s.type])throw new Error("Unknown AST node type "+s.type+". Maybe you need to change PostCSS stringifier.");this[s.type](s,c)}}return Zt=r,r.default=r,Zt}var er,qs;function pt(){if(qs)return er;qs=1;let e=ji();function t(r,a){new e(a).stringify(r)}return er=t,t.default=t,er}var tr,js;function dt(){if(js)return tr;js=1;let{isClean:e,my:t}=Vr(),r=jr(),a=ji(),s=pt();function c(m,o){let f=new m.constructor;for(let i in m){if(!Object.prototype.hasOwnProperty.call(m,i)||i==="proxyCache")continue;let h=m[i],l=typeof h;i==="parent"&&l==="object"?o&&(f[i]=o):i==="source"?f[i]=h:Array.isArray(h)?f[i]=h.map(n=>c(n,f)):(l==="object"&&h!==null&&(h=c(h)),f[i]=h)}return f}class p{constructor(o={}){this.raws={},this[e]=!1,this[t]=!0;for(let f in o)if(f==="nodes"){this.nodes=[];for(let i of o[f])typeof i.clone=="function"?this.append(i.clone()):this.append(i)}else this[f]=o[f]}addToError(o){if(o.postcssNode=this,o.stack&&this.source&&/\n\s{4}at /.test(o.stack)){let f=this.source;o.stack=o.stack.replace(/\n\s{4}at /,`$&${f.input.from}:${f.start.line}:${f.start.column}$&`)}return o}after(o){return this.parent.insertAfter(this,o),this}assign(o={}){for(let f in o)this[f]=o[f];return this}before(o){return this.parent.insertBefore(this,o),this}cleanRaws(o){delete this.raws.before,delete this.raws.after,o||delete this.raws.between}clone(o={}){let f=c(this);for(let i in o)f[i]=o[i];return f}cloneAfter(o={}){let f=this.clone(o);return this.parent.insertAfter(this,f),f}cloneBefore(o={}){let f=this.clone(o);return this.parent.insertBefore(this,f),f}error(o,f={}){if(this.source){let{end:i,start:h}=this.rangeBy(f);return this.source.input.error(o,{column:h.column,line:h.line},{column:i.column,line:i.line},f)}return new r(o)}getProxyProcessor(){return{get(o,f){return f==="proxyOf"?o:f==="root"?()=>o.root().toProxy():o[f]},set(o,f,i){return o[f]===i||(o[f]=i,(f==="prop"||f==="value"||f==="name"||f==="params"||f==="important"||f==="text")&&o.markDirty()),!0}}}markDirty(){if(this[e]){this[e]=!1;let o=this;for(;o=o.parent;)o[e]=!1}}next(){if(!this.parent)return;let o=this.parent.index(this);return this.parent.nodes[o+1]}positionBy(o,f){let i=this.source.start;if(o.index)i=this.positionInside(o.index,f);else if(o.word){f=this.toString();let h=f.indexOf(o.word);h!==-1&&(i=this.positionInside(h,f))}return i}positionInside(o,f){let i=f||this.toString(),h=this.source.start.column,l=this.source.start.line;for(let n=0;n<o;n++)i[n]===`
|
|
56
|
+
`?(h=1,l+=1):h+=1;return{column:h,line:l}}prev(){if(!this.parent)return;let o=this.parent.index(this);return this.parent.nodes[o-1]}rangeBy(o){let f={column:this.source.start.column,line:this.source.start.line},i=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:f.column+1,line:f.line};if(o.word){let h=this.toString(),l=h.indexOf(o.word);l!==-1&&(f=this.positionInside(l,h),i=this.positionInside(l+o.word.length,h))}else o.start?f={column:o.start.column,line:o.start.line}:o.index&&(f=this.positionInside(o.index)),o.end?i={column:o.end.column,line:o.end.line}:typeof o.endIndex=="number"?i=this.positionInside(o.endIndex):o.index&&(i=this.positionInside(o.index+1));return(i.line<f.line||i.line===f.line&&i.column<=f.column)&&(i={column:f.column+1,line:f.line}),{end:i,start:f}}raw(o,f){return new a().raw(this,o,f)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...o){if(this.parent){let f=this,i=!1;for(let h of o)h===this?i=!0:i?(this.parent.insertAfter(f,h),f=h):this.parent.insertBefore(f,h);i||this.remove()}return this}root(){let o=this;for(;o.parent&&o.parent.type!=="document";)o=o.parent;return o}toJSON(o,f){let i={},h=f==null;f=f||new Map;let l=0;for(let n in this){if(!Object.prototype.hasOwnProperty.call(this,n)||n==="parent"||n==="proxyCache")continue;let d=this[n];if(Array.isArray(d))i[n]=d.map(u=>typeof u=="object"&&u.toJSON?u.toJSON(null,f):u);else if(typeof d=="object"&&d.toJSON)i[n]=d.toJSON(null,f);else if(n==="source"){let u=f.get(d.input);u==null&&(u=l,f.set(d.input,l),l++),i[n]={end:d.end,inputId:u,start:d.start}}else i[n]=d}return h&&(i.inputs=[...f.keys()].map(n=>n.toJSON())),i}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(o=s){o.stringify&&(o=o.stringify);let f="";return o(this,i=>{f+=i}),f}warn(o,f,i){let h={node:this};for(let l in i)h[l]=i[l];return o.warn(f,h)}get proxyOf(){return this}}return tr=p,p.default=p,tr}var rr,Vs;function mt(){if(Vs)return rr;Vs=1;let e=dt();class t extends e{constructor(a){a&&typeof a.value!="undefined"&&typeof a.value!="string"&&(a=oe(L({},a),{value:String(a.value)})),super(a),this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}}return rr=t,t.default=t,rr}var sr,Hs;function Fo(){if(Hs)return sr;Hs=1;let e="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";return sr={nanoid:(a=21)=>{let s="",c=a;for(;c--;)s+=e[Math.random()*64|0];return s},customAlphabet:(a,s=21)=>(c=s)=>{let p="",m=c;for(;m--;)p+=a[Math.random()*a.length|0];return p}},sr}var ir,Gs;function Vi(){if(Gs)return ir;Gs=1;let{SourceMapConsumer:e,SourceMapGenerator:t}=fe,{existsSync:r,readFileSync:a}=fe,{dirname:s,join:c}=fe;function p(o){return Buffer?Buffer.from(o,"base64").toString():window.atob(o)}class m{constructor(f,i){if(i.map===!1)return;this.loadAnnotation(f),this.inline=this.startWith(this.annotation,"data:");let h=i.map?i.map.prev:void 0,l=this.loadMap(i.from,h);!this.mapFile&&i.from&&(this.mapFile=i.from),this.mapFile&&(this.root=s(this.mapFile)),l&&(this.text=l)}consumer(){return this.consumerCache||(this.consumerCache=new e(this.text)),this.consumerCache}decodeInline(f){let i=/^data:application\/json;charset=utf-?8;base64,/,h=/^data:application\/json;base64,/,l=/^data:application\/json;charset=utf-?8,/,n=/^data:application\/json,/;if(l.test(f)||n.test(f))return decodeURIComponent(f.substr(RegExp.lastMatch.length));if(i.test(f)||h.test(f))return p(f.substr(RegExp.lastMatch.length));let d=f.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+d)}getAnnotationURL(f){return f.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(f){return typeof f!="object"?!1:typeof f.mappings=="string"||typeof f._mappings=="string"||Array.isArray(f.sections)}loadAnnotation(f){let i=f.match(/\/\*\s*# sourceMappingURL=/gm);if(!i)return;let h=f.lastIndexOf(i.pop()),l=f.indexOf("*/",h);h>-1&&l>-1&&(this.annotation=this.getAnnotationURL(f.substring(h,l)))}loadFile(f){if(this.root=s(f),r(f))return this.mapFile=f,a(f,"utf-8").toString().trim()}loadMap(f,i){if(i===!1)return!1;if(i){if(typeof i=="string")return i;if(typeof i=="function"){let h=i(f);if(h){let l=this.loadFile(h);if(!l)throw new Error("Unable to load previous source map: "+h.toString());return l}}else{if(i instanceof e)return t.fromSourceMap(i).toString();if(i instanceof t)return i.toString();if(this.isMap(i))return JSON.stringify(i);throw new Error("Unsupported previous source map format: "+i.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let h=this.annotation;return f&&(h=c(s(f),h)),this.loadFile(h)}}}startWith(f,i){return f?f.substr(0,i.length)===i:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}}return ir=m,m.default=m,ir}var nr,Js;function gt(){if(Js)return nr;Js=1;let{SourceMapConsumer:e,SourceMapGenerator:t}=fe,{fileURLToPath:r,pathToFileURL:a}=fe,{isAbsolute:s,resolve:c}=fe,{nanoid:p}=Fo(),m=fe,o=jr(),f=Vi(),i=Symbol("fromOffsetCache"),h=!!(e&&t),l=!!(c&&s);class n{constructor(u,g={}){if(u===null||typeof u=="undefined"||typeof u=="object"&&!u.toString)throw new Error(`PostCSS received ${u} instead of CSS string`);if(this.css=u.toString(),this.css[0]==="\uFEFF"||this.css[0]==="\uFFFE"?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,g.from&&(!l||/^\w+:\/\//.test(g.from)||s(g.from)?this.file=g.from:this.file=c(g.from)),l&&h){let v=new f(this.css,g);if(v.text){this.map=v;let S=v.consumer().file;!this.file&&S&&(this.file=this.mapResolve(S))}}this.file||(this.id="<input css "+p(6)+">"),this.map&&(this.map.file=this.from)}error(u,g,v,S={}){let b,x,y;if(g&&typeof g=="object"){let C=g,O=v;if(typeof C.offset=="number"){let I=this.fromOffset(C.offset);g=I.line,v=I.col}else g=C.line,v=C.column;if(typeof O.offset=="number"){let I=this.fromOffset(O.offset);x=I.line,y=I.col}else x=O.line,y=O.column}else if(!v){let C=this.fromOffset(g);g=C.line,v=C.col}let w=this.origin(g,v,x,y);return w?b=new o(u,w.endLine===void 0?w.line:{column:w.column,line:w.line},w.endLine===void 0?w.column:{column:w.endColumn,line:w.endLine},w.source,w.file,S.plugin):b=new o(u,x===void 0?g:{column:v,line:g},x===void 0?v:{column:y,line:x},this.css,this.file,S.plugin),b.input={column:v,endColumn:y,endLine:x,line:g,source:this.css},this.file&&(a&&(b.input.url=a(this.file).toString()),b.input.file=this.file),b}fromOffset(u){let g,v;if(this[i])v=this[i];else{let b=this.css.split(`
|
|
57
|
+
`);v=new Array(b.length);let x=0;for(let y=0,w=b.length;y<w;y++)v[y]=x,x+=b[y].length+1;this[i]=v}g=v[v.length-1];let S=0;if(u>=g)S=v.length-1;else{let b=v.length-2,x;for(;S<b;)if(x=S+(b-S>>1),u<v[x])b=x-1;else if(u>=v[x+1])S=x+1;else{S=x;break}}return{col:u-v[S]+1,line:S+1}}mapResolve(u){return/^\w+:\/\//.test(u)?u:c(this.map.consumer().sourceRoot||this.map.root||".",u)}origin(u,g,v,S){if(!this.map)return!1;let b=this.map.consumer(),x=b.originalPositionFor({column:g,line:u});if(!x.source)return!1;let y;typeof v=="number"&&(y=b.originalPositionFor({column:S,line:v}));let w;s(x.source)?w=a(x.source):w=new URL(x.source,this.map.consumer().sourceRoot||a(this.map.mapFile));let C={column:x.column,endColumn:y&&y.column,endLine:y&&y.line,line:x.line,url:w.toString()};if(w.protocol==="file:")if(r)C.file=r(w);else throw new Error("file: protocol is not available in this PostCSS build");let O=b.sourceContentFor(x.source);return O&&(C.source=O),C}toJSON(){let u={};for(let g of["hasBOM","css","file","id"])this[g]!=null&&(u[g]=this[g]);return this.map&&(u.map=L({},this.map),u.map.consumerCache&&(u.map.consumerCache=void 0)),u}get from(){return this.file||this.id}}return nr=n,n.default=n,m&&m.registerInput&&m.registerInput(n),nr}var or,Ys;function Hi(){if(Ys)return or;Ys=1;let{SourceMapConsumer:e,SourceMapGenerator:t}=fe,{dirname:r,relative:a,resolve:s,sep:c}=fe,{pathToFileURL:p}=fe,m=gt(),o=!!(e&&t),f=!!(r&&s&&a&&c);class i{constructor(l,n,d,u){this.stringify=l,this.mapOpts=d.map||{},this.root=n,this.opts=d,this.css=u,this.originalCSS=u,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let l;this.isInline()?l="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?l=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?l=this.mapOpts.annotation(this.opts.to,this.root):l=this.outputFile()+".map";let n=`
|
|
58
58
|
`;this.css.includes(`\r
|
|
59
|
-
`)&&(
|
|
60
|
-
`),this.css+=
|
|
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?Ut(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(r=Ut(Gn(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 tc(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(Ii){let r=Ii(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;Vn==="\\"&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}};var jn=ic;let nc=ar,ss=class extends nc{constructor(e){super(e),this.type="comment"}};var cr=ss;ss.default=ss;let{isClean:Hn,my:Yn}=ot,Zn=lr,Jn=cr,oc=ar,Xn,As,Es,Kn;function Qn(s){return s.map(e=>(e.nodes&&(e.nodes=Qn(e.nodes)),delete e.source,e))}function qn(s){if(s[Hn]=!1,s.proxyOf.nodes)for(let e of s.proxyOf.nodes)qn(e)}let pe=class eo extends oc{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=Qn(Xn(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 Zn(e)]}else if(e.selector)e=[new As(e)];else if(e.name)e=[new Es(e)];else if(e.text)e=[new Jn(e)];else throw new Error("Unknown node type in node creation");return e.map(i=>(i[Yn]||eo.rebuild(i),i=i.proxyOf,i.parent&&i.parent.removeChild(i),i[Hn]&&qn(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]}};pe.registerParse=s=>{Xn=s};pe.registerRule=s=>{As=s};pe.registerAtRule=s=>{Es=s};pe.registerRoot=s=>{Kn=s};var Ie=pe;pe.default=pe;pe.rebuild=s=>{s.type==="atrule"?Object.setPrototypeOf(s,Es.prototype):s.type==="rule"?Object.setPrototypeOf(s,As.prototype):s.type==="decl"?Object.setPrototypeOf(s,Zn.prototype):s.type==="comment"?Object.setPrototypeOf(s,Jn.prototype):s.type==="root"&&Object.setPrototypeOf(s,Kn.prototype),s[Yn]=!0,s.nodes&&s.nodes.forEach(e=>{pe.rebuild(e)})};let ac=Ie,to,ro,qe=class extends ac{constructor(e){super(O({type:"document"},e)),this.nodes||(this.nodes=[])}toResult(e={}){return new to(new ro,this,e).stringify()}};qe.registerLazyResult=s=>{to=s};qe.registerProcessor=s=>{ro=s};var $s=qe;qe.default=qe;let is=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 so=is;is.default=is;let lc=so,ns=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 lc(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>e.type==="warning")}get content(){return this.css}};var Ns=ns;ns.default=ns;const Mr=39,xi=34,Ot=92,Oi=47,Rt=10,Ge=32,Mt=12,At=9,Et=13,uc=91,cc=93,hc=40,fc=41,pc=123,dc=125,mc=59,gc=42,yc=58,wc=64,$t=/[\t\n\f\r "#'()/;[\\\]{}]/g,Nt=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,bc=/.[\r\n"'(/\\]/,Ri=/[\da-f]/i;var Sc=function(e,t={}){let r=e.css.valueOf(),i=t.ignoreErrors,n,o,l,a,u,c,h,m,d,g,p=r.length,f=0,b=[],S=[];function y(){return f}function C(_){throw e.error("Unclosed "+_,f)}function I(){return S.length===0&&f>=p}function k(_){if(S.length)return S.pop();if(f>=p)return;let V=_?_.ignoreUnclosed:!1;switch(n=r.charCodeAt(f),n){case Rt:case Ge:case At:case Et:case Mt:{o=f;do o+=1,n=r.charCodeAt(o);while(n===Ge||n===Rt||n===At||n===Et||n===Mt);g=["space",r.slice(f,o)],f=o-1;break}case uc:case cc:case pc:case dc:case yc:case mc:case fc:{let Y=String.fromCharCode(n);g=[Y,Y,f];break}case hc:{if(m=b.length?b.pop()[1]:"",d=r.charCodeAt(f+1),m==="url"&&d!==Mr&&d!==xi&&d!==Ge&&d!==Rt&&d!==At&&d!==Mt&&d!==Et){o=f;do{if(c=!1,o=r.indexOf(")",o+1),o===-1)if(i||V){o=f;break}else C("bracket");for(h=o;r.charCodeAt(h-1)===Ot;)h-=1,c=!c}while(c);g=["brackets",r.slice(f,o+1),f,o],f=o}else o=r.indexOf(")",f+1),a=r.slice(f,o+1),o===-1||bc.test(a)?g=["(","(",f]:(g=["brackets",a,f,o],f=o);break}case Mr:case xi:{l=n===Mr?"'":'"',o=f;do{if(c=!1,o=r.indexOf(l,o+1),o===-1)if(i||V){o=f+1;break}else C("string");for(h=o;r.charCodeAt(h-1)===Ot;)h-=1,c=!c}while(c);g=["string",r.slice(f,o+1),f,o],f=o;break}case wc:{$t.lastIndex=f+1,$t.test(r),$t.lastIndex===0?o=r.length-1:o=$t.lastIndex-2,g=["at-word",r.slice(f,o+1),f,o],f=o;break}case Ot:{for(o=f,u=!0;r.charCodeAt(o+1)===Ot;)o+=1,u=!u;if(n=r.charCodeAt(o+1),u&&n!==Oi&&n!==Ge&&n!==Rt&&n!==At&&n!==Et&&n!==Mt&&(o+=1,Ri.test(r.charAt(o)))){for(;Ri.test(r.charAt(o+1));)o+=1;r.charCodeAt(o+1)===Ge&&(o+=1)}g=["word",r.slice(f,o+1),f,o],f=o;break}default:{n===Oi&&r.charCodeAt(f+1)===gc?(o=r.indexOf("*/",f+2)+1,o===0&&(i||V?o=r.length:C("comment")),g=["comment",r.slice(f,o+1),f,o],f=o):(Nt.lastIndex=f+1,Nt.test(r),Nt.lastIndex===0?o=r.length-1:o=Nt.lastIndex-2,g=["word",r.slice(f,o+1),f,o],b.push(g),f=o);break}}return f++,g}function G(_){S.push(_)}return{back:G,endOfFile:I,nextToken:k,position:y}};let io=Ie,Jt=class extends io{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 ks=Jt;Jt.default=Jt;io.registerAtRule(Jt);let no=Ie,oo,ao,De=class extends no{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 oo(new ao,this,e).stringify()}};De.registerLazyResult=s=>{oo=s};De.registerProcessor=s=>{ao=s};var at=De;De.default=De;no.registerRoot(De);let et={comma(s){return et.split(s,[","],!0)},space(s){let e=[" ",`
|
|
62
|
-
`," "];return et.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 lo=et;et.default=et;let uo=Ie,Cc=lo,Xt=class extends uo{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return Cc.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 Ps=Xt;Xt.default=Xt;uo.registerRule(Xt);let vc=lr,Ic=Sc,xc=cr,Oc=ks,Rc=at,Mi=Ps;const Ai={empty:!0,space:!0};function Mc(s){for(let e=s.length-1;e>=0;e--){let t=s[e],r=t[3]||t[2];if(r)return r}}let Ac=class{constructor(e){this.input=e,this.root=new Rc,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 Oc;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 xc;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=Ic(this.input)}decl(e,t){let r=new vc;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]||Mc(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 m=u;m>0;m--){let d=c[m][0];if(h.trim().indexOf("!")===0&&d!=="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 Mi;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 m=0;m<l;m+=1)n=r[m],o=n[0],o==="space"&&m===l-1&&!i?u=!1:o==="comment"?(h=r[m-1]?r[m-1][0]:"empty",c=r[m+1]?r[m+1][0]:"empty",!Ai[h]&&!Ai[c]?a.slice(-1)===","?u=!1:a+=n[1]:u=!1):a+=n[1];if(!u){let m=r.reduce((d,g)=>d+g[1],"");e.raws[t]={raw:m,value:a}}e[t]=a}rule(e){e.pop();let t=new Mi;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 Ec=Ac;let $c=Ie,Nc=Ec,kc=ur;function Kt(s,e){let t=new kc(s,e),r=new Nc(t);try{r.parse()}catch(i){throw i}return r.root}var _s=Kt;Kt.default=Kt;$c.registerParse(Kt);let{isClean:ce,my:Pc}=ot,_c=jn,Dc=or,Lc=Ie,Tc=$s;let Ei=Ns,Fc=_s,Uc=at;const Bc={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},zc={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},Wc={Once:!0,postcssPlugin:!0,prepare:!0},Le=0;function Ve(s){return typeof s=="object"&&typeof s.then=="function"}function co(s){let e=!1,t=Bc[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 $i(s){let e;return s.type==="document"?e=["Document",Le,"DocumentExit"]:s.type==="root"?e=["Root",Le,"RootExit"]:e=co(s),{eventIndex:0,events:e,iterator:0,node:s,visitorIndex:0,visitors:[]}}function os(s){return s[ce]=!1,s.nodes&&s.nodes.forEach(e=>os(e)),s}let as={},Te=class ho{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=os(t);else if(t instanceof ho||t instanceof Ei)i=os(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=Fc;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[Pc]&&Lc.rebuild(i)}this.result=new Ei(e,i,r),this.helpers=ee(O({},as),{postcss:as,result:this.result}),this.plugins=this.processor.plugins.map(n=>typeof n=="object"&&n.prepare?O(O({},n),n.prepare(this.result)):n)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let r=this.result.lastPlugin;try{t&&t.addToError(e),this.error=e,e.name==="CssSyntaxError"&&!e.plugin?(e.plugin=r.postcssPlugin,e.setMessage()):r.postcssVersion}catch(i){console&&console.error&&console.error(i)}return e}prepareVisitors(){this.listeners={};let e=(t,r,i)=>{this.listeners[r]||(this.listeners[r]=[]),this.listeners[r].push([t,i])};for(let t of this.plugins)if(typeof t=="object")for(let r in t){if(!zc[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!Wc[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(Ve(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=[$i(e)];for(;t.length>0;){let r=this.visitTick(t);if(Ve(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 Ve(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=Dc;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let i=new _c(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(Ve(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(Ve(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($i(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=co(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"}};Te.registerPostcss=s=>{as=s};var fo=Te;Te.default=Te;Uc.registerLazyResult(Te);Tc.registerLazyResult(Te);let Gc=jn,Vc=or;let jc=_s;const Hc=Ns;let ls=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=Vc;this.result=new Hc(this._processor,i,this._opts),this.result.css=t;let o=this;Object.defineProperty(this.result,"root",{get(){return o.root}});let l=new Gc(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=jc;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 Yc=ls;ls.default=ls;let Zc=Yc,Jc=fo,Xc=$s,Kc=at,tt=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 Zc(this,e,t):new Jc(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var Qc=tt;tt.default=tt;Kc.registerProcessor(tt);Xc.registerProcessor(tt);let qc=lr,eh=Bn,th=cr,rh=ks,sh=ur,ih=at,nh=Ps;function rt(s,e){if(Array.isArray(s))return s.map(o=>rt(o));let i=s,{inputs:t}=i,r=Oe(i,["inputs"]);if(t){e=[];for(let o of t){let l=ee(O({},o),{__proto__:sh.prototype});l.map&&(l.map=ee(O({},l.map),{__proto__:eh.prototype})),e.push(l)}}if(r.nodes&&(r.nodes=s.nodes.map(o=>rt(o,e))),r.source){let n=r.source,{inputId:o}=n,l=Oe(n,["inputId"]);r.source=l,o!=null&&(r.source.input=e[o])}if(r.type==="root")return new ih(r);if(r.type==="decl")return new qc(r);if(r.type==="rule")return new nh(r);if(r.type==="comment")return new th(r);if(r.type==="atrule")return new rh(r);throw new Error("Unknown node type: "+s.type)}var oh=rt;rt.default=rt;let ah=Ms,po=lr,lh=fo,uh=Ie,Ds=Qc,ch=or,hh=oh,mo=$s,fh=so,go=cr,yo=ks,ph=Ns,dh=ur,mh=_s,gh=lo,wo=Ps,bo=at,yh=ar;function N(...s){return s.length===1&&Array.isArray(s[0])&&(s=s[0]),new Ds(s)}N.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:
|
|
63
|
-
https://evilmartians.com/chronicles/postcss-8-plugin-migration`),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(
|
|
64
|
-
https://www.w3ctech.com/topic/2226`));let
|
|
59
|
+
`)&&(n=`\r
|
|
60
|
+
`),this.css+=n+"/*# sourceMappingURL="+l+" */"}applyPrevMaps(){for(let l of this.previous()){let n=this.toUrl(this.path(l.file)),d=l.root||r(l.file),u;this.mapOpts.sourcesContent===!1?(u=new e(l.text),u.sourcesContent&&(u.sourcesContent=null)):u=l.consumer(),this.map.applySourceMap(u,n,this.toUrl(this.path(d)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let l;for(let n=this.root.nodes.length-1;n>=0;n--)l=this.root.nodes[n],l.type==="comment"&&l.text.indexOf("# sourceMappingURL=")===0&&this.root.removeChild(n)}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),f&&o&&this.isMap())return this.generateMap();{let l="";return this.stringify(this.root,n=>{l+=n}),[l]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let l=this.previous()[0].consumer();l.file=this.outputFile(),this.map=t.fromSourceMap(l,{ignoreInvalidMapping:!0})}else this.map=new t({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css="",this.map=new t({file:this.outputFile(),ignoreInvalidMapping:!0});let l=1,n=1,d="<no source>",u={generated:{column:0,line:0},original:{column:0,line:0},source:""},g,v;this.stringify(this.root,(S,b,x)=>{if(this.css+=S,b&&x!=="end"&&(u.generated.line=l,u.generated.column=n-1,b.source&&b.source.start?(u.source=this.sourcePath(b),u.original.line=b.source.start.line,u.original.column=b.source.start.column-1,this.map.addMapping(u)):(u.source=d,u.original.line=1,u.original.column=0,this.map.addMapping(u))),g=S.match(/\n/g),g?(l+=g.length,v=S.lastIndexOf(`
|
|
61
|
+
`),n=S.length-v):n+=S.length,b&&x!=="start"){let y=b.parent||{raws:{}};(!(b.type==="decl"||b.type==="atrule"&&!b.nodes)||b!==y.last||y.raws.semicolon)&&(b.source&&b.source.end?(u.source=this.sourcePath(b),u.original.line=b.source.end.line,u.original.column=b.source.end.column-1,u.generated.line=l,u.generated.column=n-2,this.map.addMapping(u)):(u.source=d,u.original.line=1,u.original.column=0,u.generated.line=l,u.generated.column=n-1,this.map.addMapping(u)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation!="undefined"?this.mapOpts.annotation:this.previous().length?this.previous().some(l=>l.annotation):!0}isInline(){if(typeof this.mapOpts.inline!="undefined")return this.mapOpts.inline;let l=this.mapOpts.annotation;return typeof l!="undefined"&&l!==!0?!1:this.previous().length?this.previous().some(n=>n.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(l=>l.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(l){if(this.mapOpts.absolute||l.charCodeAt(0)===60||/^\w+:\/\//.test(l))return l;let n=this.memoizedPaths.get(l);if(n)return n;let d=this.opts.to?r(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(d=r(s(d,this.mapOpts.annotation)));let u=a(d,l);return this.memoizedPaths.set(l,u),u}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(l=>{if(l.source&&l.source.input.map){let n=l.source.input.map;this.previousMaps.includes(n)||this.previousMaps.push(n)}});else{let l=new m(this.originalCSS,this.opts);l.map&&this.previousMaps.push(l.map)}return this.previousMaps}setSourcesContent(){let l={};if(this.root)this.root.walk(n=>{if(n.source){let d=n.source.input.from;if(d&&!l[d]){l[d]=!0;let u=this.usesFileUrls?this.toFileUrl(d):this.toUrl(this.path(d));this.map.setSourceContent(u,n.source.input.css)}}});else if(this.css){let n=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(n,this.css)}}sourcePath(l){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(l.source.input.from):this.toUrl(this.path(l.source.input.from))}toBase64(l){return Buffer?Buffer.from(l).toString("base64"):window.btoa(unescape(encodeURIComponent(l)))}toFileUrl(l){let n=this.memoizedFileURLs.get(l);if(n)return n;if(p){let d=p(l).toString();return this.memoizedFileURLs.set(l,d),d}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(l){let n=this.memoizedURLs.get(l);if(n)return n;c==="\\"&&(l=l.replace(/\\/g,"/"));let d=encodeURI(l).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(l,d),d}}return or=i,or}var ar,Qs;function yt(){if(Qs)return ar;Qs=1;let e=dt();class t extends e{constructor(a){super(a),this.type="comment"}}return ar=t,t.default=t,ar}var lr,Xs;function Oe(){if(Xs)return lr;Xs=1;let{isClean:e,my:t}=Vr(),r=mt(),a=yt(),s=dt(),c,p,m,o;function f(l){return l.map(n=>(n.nodes&&(n.nodes=f(n.nodes)),delete n.source,n))}function i(l){if(l[e]=!1,l.proxyOf.nodes)for(let n of l.proxyOf.nodes)i(n)}class h extends s{append(...n){for(let d of n){let u=this.normalize(d,this.last);for(let g of u)this.proxyOf.nodes.push(g)}return this.markDirty(),this}cleanRaws(n){if(super.cleanRaws(n),this.nodes)for(let d of this.nodes)d.cleanRaws(n)}each(n){if(!this.proxyOf.nodes)return;let d=this.getIterator(),u,g;for(;this.indexes[d]<this.proxyOf.nodes.length&&(u=this.indexes[d],g=n(this.proxyOf.nodes[u],u),g!==!1);)this.indexes[d]+=1;return delete this.indexes[d],g}every(n){return this.nodes.every(n)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let n=this.lastEach;return this.indexes[n]=0,n}getProxyProcessor(){return{get(n,d){return d==="proxyOf"?n:n[d]?d==="each"||typeof d=="string"&&d.startsWith("walk")?(...u)=>n[d](...u.map(g=>typeof g=="function"?(v,S)=>g(v.toProxy(),S):g)):d==="every"||d==="some"?u=>n[d]((g,...v)=>u(g.toProxy(),...v)):d==="root"?()=>n.root().toProxy():d==="nodes"?n.nodes.map(u=>u.toProxy()):d==="first"||d==="last"?n[d].toProxy():n[d]:n[d]},set(n,d,u){return n[d]===u||(n[d]=u,(d==="name"||d==="params"||d==="selector")&&n.markDirty()),!0}}}index(n){return typeof n=="number"?n:(n.proxyOf&&(n=n.proxyOf),this.proxyOf.nodes.indexOf(n))}insertAfter(n,d){let u=this.index(n),g=this.normalize(d,this.proxyOf.nodes[u]).reverse();u=this.index(n);for(let S of g)this.proxyOf.nodes.splice(u+1,0,S);let v;for(let S in this.indexes)v=this.indexes[S],u<v&&(this.indexes[S]=v+g.length);return this.markDirty(),this}insertBefore(n,d){let u=this.index(n),g=u===0?"prepend":!1,v=this.normalize(d,this.proxyOf.nodes[u],g).reverse();u=this.index(n);for(let b of v)this.proxyOf.nodes.splice(u,0,b);let S;for(let b in this.indexes)S=this.indexes[b],u<=S&&(this.indexes[b]=S+v.length);return this.markDirty(),this}normalize(n,d){if(typeof n=="string")n=f(c(n).nodes);else if(typeof n=="undefined")n=[];else if(Array.isArray(n)){n=n.slice(0);for(let g of n)g.parent&&g.parent.removeChild(g,"ignore")}else if(n.type==="root"&&this.type!=="document"){n=n.nodes.slice(0);for(let g of n)g.parent&&g.parent.removeChild(g,"ignore")}else if(n.type)n=[n];else if(n.prop){if(typeof n.value=="undefined")throw new Error("Value field is missed in node creation");typeof n.value!="string"&&(n.value=String(n.value)),n=[new r(n)]}else if(n.selector)n=[new p(n)];else if(n.name)n=[new m(n)];else if(n.text)n=[new a(n)];else throw new Error("Unknown node type in node creation");return n.map(g=>(g[t]||h.rebuild(g),g=g.proxyOf,g.parent&&g.parent.removeChild(g),g[e]&&i(g),typeof g.raws.before=="undefined"&&d&&typeof d.raws.before!="undefined"&&(g.raws.before=d.raws.before.replace(/\S/g,"")),g.parent=this.proxyOf,g))}prepend(...n){n=n.reverse();for(let d of n){let u=this.normalize(d,this.first,"prepend").reverse();for(let g of u)this.proxyOf.nodes.unshift(g);for(let g in this.indexes)this.indexes[g]=this.indexes[g]+u.length}return this.markDirty(),this}push(n){return n.parent=this,this.proxyOf.nodes.push(n),this}removeAll(){for(let n of this.proxyOf.nodes)n.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(n){n=this.index(n),this.proxyOf.nodes[n].parent=void 0,this.proxyOf.nodes.splice(n,1);let d;for(let u in this.indexes)d=this.indexes[u],d>=n&&(this.indexes[u]=d-1);return this.markDirty(),this}replaceValues(n,d,u){return u||(u=d,d={}),this.walkDecls(g=>{d.props&&!d.props.includes(g.prop)||d.fast&&!g.value.includes(d.fast)||(g.value=g.value.replace(n,u))}),this.markDirty(),this}some(n){return this.nodes.some(n)}walk(n){return this.each((d,u)=>{let g;try{g=n(d,u)}catch(v){throw d.addToError(v)}return g!==!1&&d.walk&&(g=d.walk(n)),g})}walkAtRules(n,d){return d?n instanceof RegExp?this.walk((u,g)=>{if(u.type==="atrule"&&n.test(u.name))return d(u,g)}):this.walk((u,g)=>{if(u.type==="atrule"&&u.name===n)return d(u,g)}):(d=n,this.walk((u,g)=>{if(u.type==="atrule")return d(u,g)}))}walkComments(n){return this.walk((d,u)=>{if(d.type==="comment")return n(d,u)})}walkDecls(n,d){return d?n instanceof RegExp?this.walk((u,g)=>{if(u.type==="decl"&&n.test(u.prop))return d(u,g)}):this.walk((u,g)=>{if(u.type==="decl"&&u.prop===n)return d(u,g)}):(d=n,this.walk((u,g)=>{if(u.type==="decl")return d(u,g)}))}walkRules(n,d){return d?n instanceof RegExp?this.walk((u,g)=>{if(u.type==="rule"&&n.test(u.selector))return d(u,g)}):this.walk((u,g)=>{if(u.type==="rule"&&u.selector===n)return d(u,g)}):(d=n,this.walk((u,g)=>{if(u.type==="rule")return d(u,g)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}}return h.registerParse=l=>{c=l},h.registerRule=l=>{p=l},h.registerAtRule=l=>{m=l},h.registerRoot=l=>{o=l},lr=h,h.default=h,h.rebuild=l=>{l.type==="atrule"?Object.setPrototypeOf(l,m.prototype):l.type==="rule"?Object.setPrototypeOf(l,p.prototype):l.type==="decl"?Object.setPrototypeOf(l,r.prototype):l.type==="comment"?Object.setPrototypeOf(l,a.prototype):l.type==="root"&&Object.setPrototypeOf(l,o.prototype),l[t]=!0,l.nodes&&l.nodes.forEach(n=>{h.rebuild(n)})},lr}var ur,Ks;function Hr(){if(Ks)return ur;Ks=1;let e=Oe(),t,r;class a extends e{constructor(c){super(L({type:"document"},c)),this.nodes||(this.nodes=[])}toResult(c={}){return new t(new r,this,c).stringify()}}return a.registerLazyResult=s=>{t=s},a.registerProcessor=s=>{r=s},ur=a,a.default=a,ur}var cr,Zs;function Gi(){if(Zs)return cr;Zs=1;let e={};return cr=function(r){e[r]||(e[r]=!0,typeof console!="undefined"&&console.warn&&console.warn(r))},cr}var hr,ei;function Ji(){if(ei)return hr;ei=1;class e{constructor(r,a={}){if(this.type="warning",this.text=r,a.node&&a.node.source){let s=a.node.rangeBy(a);this.line=s.start.line,this.column=s.start.column,this.endLine=s.end.line,this.endColumn=s.end.column}for(let s in a)this[s]=a[s]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}}return hr=e,e.default=e,hr}var fr,ti;function Gr(){if(ti)return fr;ti=1;let e=Ji();class t{constructor(a,s,c){this.processor=a,this.messages=[],this.root=s,this.opts=c,this.css=void 0,this.map=void 0}toString(){return this.css}warn(a,s={}){s.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(s.plugin=this.lastPlugin.postcssPlugin);let c=new e(a,s);return this.messages.push(c),c}warnings(){return this.messages.filter(a=>a.type==="warning")}get content(){return this.css}}return fr=t,t.default=t,fr}var pr,ri;function Uo(){if(ri)return pr;ri=1;const e=39,t=34,r=92,a=47,s=10,c=32,p=12,m=9,o=13,f=91,i=93,h=40,l=41,n=123,d=125,u=59,g=42,v=58,S=64,b=/[\t\n\f\r "#'()/;[\\\]{}]/g,x=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,y=/.[\r\n"'(/\\]/,w=/[\da-f]/i;return pr=function(O,I={}){let M=O.css.valueOf(),_=I.ignoreErrors,N,R,le,ie,$,U,J,K,Y,z,ge=M.length,E=0,pe=[],ne=[];function Le(){return E}function ee(P){throw O.error("Unclosed "+P,E)}function ue(){return ne.length===0&&E>=ge}function ve(P){if(ne.length)return ne.pop();if(E>=ge)return;let Q=P?P.ignoreUnclosed:!1;switch(N=M.charCodeAt(E),N){case s:case c:case m:case o:case p:{R=E;do R+=1,N=M.charCodeAt(R);while(N===c||N===s||N===m||N===o||N===p);z=["space",M.slice(E,R)],E=R-1;break}case f:case i:case n:case d:case v:case u:case l:{let W=String.fromCharCode(N);z=[W,W,E];break}case h:{if(K=pe.length?pe.pop()[1]:"",Y=M.charCodeAt(E+1),K==="url"&&Y!==e&&Y!==t&&Y!==c&&Y!==s&&Y!==m&&Y!==p&&Y!==o){R=E;do{if(U=!1,R=M.indexOf(")",R+1),R===-1)if(_||Q){R=E;break}else ee("bracket");for(J=R;M.charCodeAt(J-1)===r;)J-=1,U=!U}while(U);z=["brackets",M.slice(E,R+1),E,R],E=R}else R=M.indexOf(")",E+1),ie=M.slice(E,R+1),R===-1||y.test(ie)?z=["(","(",E]:(z=["brackets",ie,E,R],E=R);break}case e:case t:{le=N===e?"'":'"',R=E;do{if(U=!1,R=M.indexOf(le,R+1),R===-1)if(_||Q){R=E+1;break}else ee("string");for(J=R;M.charCodeAt(J-1)===r;)J-=1,U=!U}while(U);z=["string",M.slice(E,R+1),E,R],E=R;break}case S:{b.lastIndex=E+1,b.test(M),b.lastIndex===0?R=M.length-1:R=b.lastIndex-2,z=["at-word",M.slice(E,R+1),E,R],E=R;break}case r:{for(R=E,$=!0;M.charCodeAt(R+1)===r;)R+=1,$=!$;if(N=M.charCodeAt(R+1),$&&N!==a&&N!==c&&N!==s&&N!==m&&N!==o&&N!==p&&(R+=1,w.test(M.charAt(R)))){for(;w.test(M.charAt(R+1));)R+=1;M.charCodeAt(R+1)===c&&(R+=1)}z=["word",M.slice(E,R+1),E,R],E=R;break}default:{N===a&&M.charCodeAt(E+1)===g?(R=M.indexOf("*/",E+2)+1,R===0&&(_||Q?R=M.length:ee("comment")),z=["comment",M.slice(E,R+1),E,R],E=R):(x.lastIndex=E+1,x.test(M),x.lastIndex===0?R=M.length-1:R=x.lastIndex-2,z=["word",M.slice(E,R+1),E,R],pe.push(z),E=R);break}}return E++,z}function ye(P){ne.push(P)}return{back:ye,endOfFile:ue,nextToken:ve,position:Le}},pr}var dr,si;function Jr(){if(si)return dr;si=1;let e=Oe();class t extends e{constructor(a){super(a),this.type="atrule"}append(...a){return this.proxyOf.nodes||(this.nodes=[]),super.append(...a)}prepend(...a){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...a)}}return dr=t,t.default=t,e.registerAtRule(t),dr}var mr,ii;function Be(){if(ii)return mr;ii=1;let e=Oe(),t,r;class a extends e{constructor(c){super(c),this.type="root",this.nodes||(this.nodes=[])}normalize(c,p,m){let o=super.normalize(c);if(p){if(m==="prepend")this.nodes.length>1?p.raws.before=this.nodes[1].raws.before:delete p.raws.before;else if(this.first!==p)for(let f of o)f.raws.before=p.raws.before}return o}removeChild(c,p){let m=this.index(c);return!p&&m===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[m].raws.before),super.removeChild(c)}toResult(c={}){return new t(new r,this,c).stringify()}}return a.registerLazyResult=s=>{t=s},a.registerProcessor=s=>{r=s},mr=a,a.default=a,e.registerRoot(a),mr}var gr,ni;function Yi(){if(ni)return gr;ni=1;let e={comma(t){return e.split(t,[","],!0)},space(t){let r=[" ",`
|
|
62
|
+
`," "];return e.split(t,r)},split(t,r,a){let s=[],c="",p=!1,m=0,o=!1,f="",i=!1;for(let h of t)i?i=!1:h==="\\"?i=!0:o?h===f&&(o=!1):h==='"'||h==="'"?(o=!0,f=h):h==="("?m+=1:h===")"?m>0&&(m-=1):m===0&&r.includes(h)&&(p=!0),p?(c!==""&&s.push(c.trim()),c="",p=!1):c+=h;return(a||c!=="")&&s.push(c.trim()),s}};return gr=e,e.default=e,gr}var yr,oi;function Yr(){if(oi)return yr;oi=1;let e=Oe(),t=Yi();class r extends e{constructor(s){super(s),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return t.comma(this.selector)}set selectors(s){let c=this.selector?this.selector.match(/,\s*/):null,p=c?c[0]:","+this.raw("between","beforeOpen");this.selector=s.join(p)}}return yr=r,r.default=r,e.registerRule(r),yr}var wr,ai;function $o(){if(ai)return wr;ai=1;let e=mt(),t=Uo(),r=yt(),a=Jr(),s=Be(),c=Yr();const p={empty:!0,space:!0};function m(f){for(let i=f.length-1;i>=0;i--){let h=f[i],l=h[3]||h[2];if(l)return l}}class o{constructor(i){this.input=i,this.root=new s,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:i,start:{column:1,line:1,offset:0}}}atrule(i){let h=new a;h.name=i[1].slice(1),h.name===""&&this.unnamedAtrule(h,i),this.init(h,i[2]);let l,n,d,u=!1,g=!1,v=[],S=[];for(;!this.tokenizer.endOfFile();){if(i=this.tokenizer.nextToken(),l=i[0],l==="("||l==="["?S.push(l==="("?")":"]"):l==="{"&&S.length>0?S.push("}"):l===S[S.length-1]&&S.pop(),S.length===0)if(l===";"){h.source.end=this.getPosition(i[2]),h.source.end.offset++,this.semicolon=!0;break}else if(l==="{"){g=!0;break}else if(l==="}"){if(v.length>0){for(d=v.length-1,n=v[d];n&&n[0]==="space";)n=v[--d];n&&(h.source.end=this.getPosition(n[3]||n[2]),h.source.end.offset++)}this.end(i);break}else v.push(i);else v.push(i);if(this.tokenizer.endOfFile()){u=!0;break}}h.raws.between=this.spacesAndCommentsFromEnd(v),v.length?(h.raws.afterName=this.spacesAndCommentsFromStart(v),this.raw(h,"params",v),u&&(i=v[v.length-1],h.source.end=this.getPosition(i[3]||i[2]),h.source.end.offset++,this.spaces=h.raws.between,h.raws.between="")):(h.raws.afterName="",h.params=""),g&&(h.nodes=[],this.current=h)}checkMissedSemicolon(i){let h=this.colon(i);if(h===!1)return;let l=0,n;for(let d=h-1;d>=0&&(n=i[d],!(n[0]!=="space"&&(l+=1,l===2)));d--);throw this.input.error("Missed semicolon",n[0]==="word"?n[3]+1:n[2])}colon(i){let h=0,l,n,d;for(let[u,g]of i.entries()){if(l=g,n=l[0],n==="("&&(h+=1),n===")"&&(h-=1),h===0&&n===":")if(!d)this.doubleColon(l);else{if(d[0]==="word"&&d[1]==="progid")continue;return u}d=l}return!1}comment(i){let h=new r;this.init(h,i[2]),h.source.end=this.getPosition(i[3]||i[2]),h.source.end.offset++;let l=i[1].slice(2,-2);if(/^\s*$/.test(l))h.text="",h.raws.left=l,h.raws.right="";else{let n=l.match(/^(\s*)([^]*\S)(\s*)$/);h.text=n[2],h.raws.left=n[1],h.raws.right=n[3]}}createTokenizer(){this.tokenizer=t(this.input)}decl(i,h){let l=new e;this.init(l,i[0][2]);let n=i[i.length-1];for(n[0]===";"&&(this.semicolon=!0,i.pop()),l.source.end=this.getPosition(n[3]||n[2]||m(i)),l.source.end.offset++;i[0][0]!=="word";)i.length===1&&this.unknownWord(i),l.raws.before+=i.shift()[1];for(l.source.start=this.getPosition(i[0][2]),l.prop="";i.length;){let S=i[0][0];if(S===":"||S==="space"||S==="comment")break;l.prop+=i.shift()[1]}l.raws.between="";let d;for(;i.length;)if(d=i.shift(),d[0]===":"){l.raws.between+=d[1];break}else d[0]==="word"&&/\w/.test(d[1])&&this.unknownWord([d]),l.raws.between+=d[1];(l.prop[0]==="_"||l.prop[0]==="*")&&(l.raws.before+=l.prop[0],l.prop=l.prop.slice(1));let u=[],g;for(;i.length&&(g=i[0][0],!(g!=="space"&&g!=="comment"));)u.push(i.shift());this.precheckMissedSemicolon(i);for(let S=i.length-1;S>=0;S--){if(d=i[S],d[1].toLowerCase()==="!important"){l.important=!0;let b=this.stringFrom(i,S);b=this.spacesFromEnd(i)+b,b!==" !important"&&(l.raws.important=b);break}else if(d[1].toLowerCase()==="important"){let b=i.slice(0),x="";for(let y=S;y>0;y--){let w=b[y][0];if(x.trim().indexOf("!")===0&&w!=="space")break;x=b.pop()[1]+x}x.trim().indexOf("!")===0&&(l.important=!0,l.raws.important=x,i=b)}if(d[0]!=="space"&&d[0]!=="comment")break}i.some(S=>S[0]!=="space"&&S[0]!=="comment")&&(l.raws.between+=u.map(S=>S[1]).join(""),u=[]),this.raw(l,"value",u.concat(i),h),l.value.includes(":")&&!h&&this.checkMissedSemicolon(i)}doubleColon(i){throw this.input.error("Double colon",{offset:i[2]},{offset:i[2]+i[1].length})}emptyRule(i){let h=new c;this.init(h,i[2]),h.selector="",h.raws.between="",this.current=h}end(i){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(i[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(i)}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(i){if(this.spaces+=i[1],this.current.nodes){let h=this.current.nodes[this.current.nodes.length-1];h&&h.type==="rule"&&!h.raws.ownSemicolon&&(h.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(i){let h=this.input.fromOffset(i);return{column:h.col,line:h.line,offset:i}}init(i,h){this.current.push(i),i.source={input:this.input,start:this.getPosition(h)},i.raws.before=this.spaces,this.spaces="",i.type!=="comment"&&(this.semicolon=!1)}other(i){let h=!1,l=null,n=!1,d=null,u=[],g=i[1].startsWith("--"),v=[],S=i;for(;S;){if(l=S[0],v.push(S),l==="("||l==="[")d||(d=S),u.push(l==="("?")":"]");else if(g&&n&&l==="{")d||(d=S),u.push("}");else if(u.length===0)if(l===";")if(n){this.decl(v,g);return}else break;else if(l==="{"){this.rule(v);return}else if(l==="}"){this.tokenizer.back(v.pop()),h=!0;break}else l===":"&&(n=!0);else l===u[u.length-1]&&(u.pop(),u.length===0&&(d=null));S=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(h=!0),u.length>0&&this.unclosedBracket(d),h&&n){if(!g)for(;v.length&&(S=v[v.length-1][0],!(S!=="space"&&S!=="comment"));)this.tokenizer.back(v.pop());this.decl(v,g)}else this.unknownWord(v)}parse(){let i;for(;!this.tokenizer.endOfFile();)switch(i=this.tokenizer.nextToken(),i[0]){case"space":this.spaces+=i[1];break;case";":this.freeSemicolon(i);break;case"}":this.end(i);break;case"comment":this.comment(i);break;case"at-word":this.atrule(i);break;case"{":this.emptyRule(i);break;default:this.other(i);break}this.endFile()}precheckMissedSemicolon(){}raw(i,h,l,n){let d,u,g=l.length,v="",S=!0,b,x;for(let y=0;y<g;y+=1)d=l[y],u=d[0],u==="space"&&y===g-1&&!n?S=!1:u==="comment"?(x=l[y-1]?l[y-1][0]:"empty",b=l[y+1]?l[y+1][0]:"empty",!p[x]&&!p[b]?v.slice(-1)===","?S=!1:v+=d[1]:S=!1):v+=d[1];if(!S){let y=l.reduce((w,C)=>w+C[1],"");i.raws[h]={raw:y,value:v}}i[h]=v}rule(i){i.pop();let h=new c;this.init(h,i[0][2]),h.raws.between=this.spacesAndCommentsFromEnd(i),this.raw(h,"selector",i),this.current=h}spacesAndCommentsFromEnd(i){let h,l="";for(;i.length&&(h=i[i.length-1][0],!(h!=="space"&&h!=="comment"));)l=i.pop()[1]+l;return l}spacesAndCommentsFromStart(i){let h,l="";for(;i.length&&(h=i[0][0],!(h!=="space"&&h!=="comment"));)l+=i.shift()[1];return l}spacesFromEnd(i){let h,l="";for(;i.length&&(h=i[i.length-1][0],h==="space");)l=i.pop()[1]+l;return l}stringFrom(i,h){let l="";for(let n=h;n<i.length;n++)l+=i[n][1];return i.splice(h,i.length-h),l}unclosedBlock(){let i=this.current.source.start;throw this.input.error("Unclosed block",i.line,i.column)}unclosedBracket(i){throw this.input.error("Unclosed bracket",{offset:i[2]},{offset:i[2]+1})}unexpectedClose(i){throw this.input.error("Unexpected }",{offset:i[2]},{offset:i[2]+1})}unknownWord(i){throw this.input.error("Unknown word",{offset:i[0][2]},{offset:i[0][2]+i[0][1].length})}unnamedAtrule(i,h){throw this.input.error("At-rule without name",{offset:h[2]},{offset:h[2]+h[1].length})}}return wr=o,wr}var br,li;function Qr(){if(li)return br;li=1;let e=Oe(),t=$o(),r=gt();function a(s,c){let p=new r(s,c),m=new t(p);try{m.parse()}catch(o){throw o}return m.root}return br=a,a.default=a,e.registerParse(a),br}var Sr,ui;function Qi(){if(ui)return Sr;ui=1;let{isClean:e,my:t}=Vr(),r=Hi(),a=pt(),s=Oe(),c=Hr(),p=Gi(),m=Gr(),o=Qr(),f=Be();const i={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},h={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},l={Once:!0,postcssPlugin:!0,prepare:!0},n=0;function d(x){return typeof x=="object"&&typeof x.then=="function"}function u(x){let y=!1,w=i[x.type];return x.type==="decl"?y=x.prop.toLowerCase():x.type==="atrule"&&(y=x.name.toLowerCase()),y&&x.append?[w,w+"-"+y,n,w+"Exit",w+"Exit-"+y]:y?[w,w+"-"+y,w+"Exit",w+"Exit-"+y]:x.append?[w,n,w+"Exit"]:[w,w+"Exit"]}function g(x){let y;return x.type==="document"?y=["Document",n,"DocumentExit"]:x.type==="root"?y=["Root",n,"RootExit"]:y=u(x),{eventIndex:0,events:y,iterator:0,node:x,visitorIndex:0,visitors:[]}}function v(x){return x[e]=!1,x.nodes&&x.nodes.forEach(y=>v(y)),x}let S={};class b{constructor(y,w,C){this.stringified=!1,this.processed=!1;let O;if(typeof w=="object"&&w!==null&&(w.type==="root"||w.type==="document"))O=v(w);else if(w instanceof b||w instanceof m)O=v(w.root),w.map&&(typeof C.map=="undefined"&&(C.map={}),C.map.inline||(C.map.inline=!1),C.map.prev=w.map);else{let I=o;C.syntax&&(I=C.syntax.parse),C.parser&&(I=C.parser),I.parse&&(I=I.parse);try{O=I(w,C)}catch(M){this.processed=!0,this.error=M}O&&!O[t]&&s.rebuild(O)}this.result=new m(y,O,C),this.helpers=oe(L({},S),{postcss:S,result:this.result}),this.plugins=this.processor.plugins.map(I=>typeof I=="object"&&I.prepare?L(L({},I),I.prepare(this.result)):I)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(y){return this.async().catch(y)}finally(y){return this.async().then(y,y)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(y,w){let C=this.result.lastPlugin;try{w&&w.addToError(y),this.error=y,y.name==="CssSyntaxError"&&!y.plugin?(y.plugin=C.postcssPlugin,y.setMessage()):C.postcssVersion}catch(O){console&&console.error&&console.error(O)}return y}prepareVisitors(){this.listeners={};let y=(w,C,O)=>{this.listeners[C]||(this.listeners[C]=[]),this.listeners[C].push([w,O])};for(let w of this.plugins)if(typeof w=="object")for(let C in w){if(!h[C]&&/^[A-Z]/.test(C))throw new Error(`Unknown event ${C} in ${w.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!l[C])if(typeof w[C]=="object")for(let O in w[C])O==="*"?y(w,C,w[C][O]):y(w,C+"-"+O.toLowerCase(),w[C][O]);else typeof w[C]=="function"&&y(w,C,w[C])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let y=0;y<this.plugins.length;y++){let w=this.plugins[y],C=this.runOnRoot(w);if(d(C))try{await C}catch(O){throw this.handleError(O)}}if(this.prepareVisitors(),this.hasListener){let y=this.result.root;for(;!y[e];){y[e]=!0;let w=[g(y)];for(;w.length>0;){let C=this.visitTick(w);if(d(C))try{await C}catch(O){let I=w[w.length-1].node;throw this.handleError(O,I)}}}if(this.listeners.OnceExit)for(let[w,C]of this.listeners.OnceExit){this.result.lastPlugin=w;try{if(y.type==="document"){let O=y.nodes.map(I=>C(I,this.helpers));await Promise.all(O)}else await C(y,this.helpers)}catch(O){throw this.handleError(O)}}}return this.processed=!0,this.stringify()}runOnRoot(y){this.result.lastPlugin=y;try{if(typeof y=="object"&&y.Once){if(this.result.root.type==="document"){let w=this.result.root.nodes.map(C=>y.Once(C,this.helpers));return d(w[0])?Promise.all(w):w}return y.Once(this.result.root,this.helpers)}else if(typeof y=="function")return y(this.result.root,this.result)}catch(w){throw this.handleError(w)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let y=this.result.opts,w=a;y.syntax&&(w=y.syntax.stringify),y.stringifier&&(w=y.stringifier),w.stringify&&(w=w.stringify);let O=new r(w,this.result.root,this.result.opts).generate();return this.result.css=O[0],this.result.map=O[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 y of this.plugins){let w=this.runOnRoot(y);if(d(w))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let y=this.result.root;for(;!y[e];)y[e]=!0,this.walkSync(y);if(this.listeners.OnceExit)if(y.type==="document")for(let w of y.nodes)this.visitSync(this.listeners.OnceExit,w);else this.visitSync(this.listeners.OnceExit,y)}return this.result}then(y,w){return this.async().then(y,w)}toString(){return this.css}visitSync(y,w){for(let[C,O]of y){this.result.lastPlugin=C;let I;try{I=O(w,this.helpers)}catch(M){throw this.handleError(M,w.proxyOf)}if(w.type!=="root"&&w.type!=="document"&&!w.parent)return!0;if(d(I))throw this.getAsyncError()}}visitTick(y){let w=y[y.length-1],{node:C,visitors:O}=w;if(C.type!=="root"&&C.type!=="document"&&!C.parent){y.pop();return}if(O.length>0&&w.visitorIndex<O.length){let[M,_]=O[w.visitorIndex];w.visitorIndex+=1,w.visitorIndex===O.length&&(w.visitors=[],w.visitorIndex=0),this.result.lastPlugin=M;try{return _(C.toProxy(),this.helpers)}catch(N){throw this.handleError(N,C)}}if(w.iterator!==0){let M=w.iterator,_;for(;_=C.nodes[C.indexes[M]];)if(C.indexes[M]+=1,!_[e]){_[e]=!0,y.push(g(_));return}w.iterator=0,delete C.indexes[M]}let I=w.events;for(;w.eventIndex<I.length;){let M=I[w.eventIndex];if(w.eventIndex+=1,M===n){C.nodes&&C.nodes.length&&(C[e]=!0,w.iterator=C.getIterator());return}else if(this.listeners[M]){w.visitors=this.listeners[M];return}}y.pop()}walkSync(y){y[e]=!0;let w=u(y);for(let C of w)if(C===n)y.nodes&&y.each(O=>{O[e]||this.walkSync(O)});else{let O=this.listeners[C];if(O&&this.visitSync(O,y.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}}return b.registerPostcss=x=>{S=x},Sr=b,b.default=b,f.registerLazyResult(b),c.registerLazyResult(b),Sr}var vr,ci;function zo(){if(ci)return vr;ci=1;let e=Hi(),t=pt(),r=Gi(),a=Qr();const s=Gr();class c{constructor(m,o,f){o=o.toString(),this.stringified=!1,this._processor=m,this._css=o,this._opts=f,this._map=void 0;let i,h=t;this.result=new s(this._processor,i,this._opts),this.result.css=o;let l=this;Object.defineProperty(this.result,"root",{get(){return l.root}});let n=new e(h,i,this._opts,o);if(n.isMap()){let[d,u]=n.generate();d&&(this.result.css=d),u&&(this.result.map=u)}else n.clearAnnotation(),this.result.css=n.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(m){return this.async().catch(m)}finally(m){return this.async().then(m,m)}sync(){if(this.error)throw this.error;return this.result}then(m,o){return this.async().then(m,o)}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 m,o=a;try{m=o(this._css,this._opts)}catch(f){this.error=f}if(this.error)throw this.error;return this._root=m,m}get[Symbol.toStringTag](){return"NoWorkResult"}}return vr=c,c.default=c,vr}var Cr,hi;function Wo(){if(hi)return Cr;hi=1;let e=zo(),t=Qi(),r=Hr(),a=Be();class s{constructor(p=[]){this.version="8.4.38",this.plugins=this.normalize(p)}normalize(p){let m=[];for(let o of p)if(o.postcss===!0?o=o():o.postcss&&(o=o.postcss),typeof o=="object"&&Array.isArray(o.plugins))m=m.concat(o.plugins);else if(typeof o=="object"&&o.postcssPlugin)m.push(o);else if(typeof o=="function")m.push(o);else if(!(typeof o=="object"&&(o.parse||o.stringify)))throw new Error(o+" is not a PostCSS plugin");return m}process(p,m={}){return!this.plugins.length&&!m.parser&&!m.stringifier&&!m.syntax?new e(this,p,m):new t(this,p,m)}use(p){return this.plugins=this.plugins.concat(this.normalize([p])),this}}return Cr=s,s.default=s,a.registerProcessor(s),r.registerProcessor(s),Cr}var xr,fi;function Bo(){if(fi)return xr;fi=1;let e=mt(),t=Vi(),r=yt(),a=Jr(),s=gt(),c=Be(),p=Yr();function m(o,f){if(Array.isArray(o))return o.map(d=>m(d));let l=o,{inputs:i}=l,h=Ee(l,["inputs"]);if(i){f=[];for(let d of i){let u=oe(L({},d),{__proto__:s.prototype});u.map&&(u.map=oe(L({},u.map),{__proto__:t.prototype})),f.push(u)}}if(h.nodes&&(h.nodes=o.nodes.map(d=>m(d,f))),h.source){let n=h.source,{inputId:d}=n,u=Ee(n,["inputId"]);h.source=u,d!=null&&(h.source.input=f[d])}if(h.type==="root")return new c(h);if(h.type==="decl")return new e(h);if(h.type==="rule")return new p(h);if(h.type==="comment")return new r(h);if(h.type==="atrule")return new a(h);throw new Error("Unknown node type: "+o.type)}return xr=m,m.default=m,xr}var Rr,pi;function qo(){if(pi)return Rr;pi=1;let e=jr(),t=mt(),r=Qi(),a=Oe(),s=Wo(),c=pt(),p=Bo(),m=Hr(),o=Ji(),f=yt(),i=Jr(),h=Gr(),l=gt(),n=Qr(),d=Yi(),u=Yr(),g=Be(),v=dt();function S(...b){return b.length===1&&Array.isArray(b[0])&&(b=b[0]),new s(b)}return S.plugin=function(x,y){let w=!1;function C(...I){console&&console.warn&&!w&&(w=!0,console.warn(x+`: postcss.plugin was deprecated. Migration guide:
|
|
63
|
+
https://evilmartians.com/chronicles/postcss-8-plugin-migration`),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(x+`: \u91CC\u9762 postcss.plugin \u88AB\u5F03\u7528. \u8FC1\u79FB\u6307\u5357:
|
|
64
|
+
https://www.w3ctech.com/topic/2226`));let M=y(...I);return M.postcssPlugin=x,M.postcssVersion=new s().version,M}let O;return Object.defineProperty(C,"postcss",{get(){return O||(O=C()),O}}),C.process=function(I,M,_){return S([C(_)]).process(I,M)},C},S.stringify=c,S.parse=n,S.fromJSON=p,S.list=d,S.comment=b=>new f(b),S.atRule=b=>new i(b),S.decl=b=>new t(b),S.rule=b=>new u(b),S.root=b=>new g(b),S.document=b=>new m(b),S.CssSyntaxError=e,S.Declaration=t,S.Container=a,S.Processor=s,S.Document=m,S.Comment=f,S.Warning=o,S.AtRule=i,S.Result=h,S.Input=l,S.Rule=u,S.Root=g,S.Node=v,r.registerPostcss(S),Rr=S,S.default=S,Rr}var jo=qo();const V=_o(jo);V.stringify;V.fromJSON;V.plugin;V.parse;V.list;V.document;V.comment;V.atRule;V.rule;V.decl;V.root;V.CssSyntaxError;V.Declaration;V.Container;V.Processor;V.Document;V.Comment;V.Warning;V.AtRule;V.Result;V.Input;V.Rule;V.Root;V.Node;class Xr{constructor(...t){ae(this,"parentElement",null),ae(this,"parentNode",null),ae(this,"ownerDocument"),ae(this,"firstChild",null),ae(this,"lastChild",null),ae(this,"previousSibling",null),ae(this,"nextSibling",null),ae(this,"ELEMENT_NODE",1),ae(this,"TEXT_NODE",3),ae(this,"nodeType"),ae(this,"nodeName"),ae(this,"RRNodeType")}get childNodes(){const t=[];let r=this.firstChild;for(;r;)t.push(r),r=r.nextSibling;return t}contains(t){if(t instanceof Xr){if(t.ownerDocument!==this.ownerDocument)return!1;if(t===this)return!0}else return!1;for(;t.parentNode;){if(t.parentNode===this)return!0;t=t.parentNode}return!1}appendChild(t){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(t,r){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(t){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}}const di={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},mi={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},Xe={};function Vo(e){var t,r;const a=(r=(t=globalThis==null?void 0:globalThis.Zone)==null?void 0:t.__symbol__)==null?void 0:r.call(t,e);if(a&&globalThis[a])return globalThis[a]}function Kr(e){if(Xe[e])return Xe[e];const t=Vo(e)||globalThis[e],r=t.prototype,a=e in di?di[e]:void 0,s=!!(a&&a.every(m=>{var o,f;return!!((f=(o=Object.getOwnPropertyDescriptor(r,m))==null?void 0:o.get)!=null&&f.toString().includes("[native code]"))})),c=e in mi?mi[e]:void 0,p=!!(c&&c.every(m=>{var o;return typeof r[m]=="function"&&((o=r[m])==null?void 0:o.toString().includes("[native code]"))}));if(s&&p)return Xe[e]=t.prototype,t.prototype;try{const m=document.createElement("iframe");document.body.appendChild(m);const o=m.contentWindow;if(!o)return t.prototype;const f=o[e].prototype;return document.body.removeChild(m),f?Xe[e]=f:r}catch(m){return r}}const Or={};function Se(e,t,r){var a;const s=`${e}.${String(r)}`;if(Or[s])return Or[s].call(t);const c=Kr(e),p=(a=Object.getOwnPropertyDescriptor(c,r))==null?void 0:a.get;return p?(Or[s]=p,p.call(t)):t[r]}const Mr={};function Xi(e,t,r){const a=`${e}.${String(r)}`;if(Mr[a])return Mr[a].bind(t);const c=Kr(e)[r];return typeof c!="function"?t[r]:(Mr[a]=c,c.bind(t))}function Ho(e){return Se("Node",e,"childNodes")}function Go(e){return Se("Node",e,"parentNode")}function Jo(e){return Se("Node",e,"parentElement")}function Yo(e){return Se("Node",e,"textContent")}function Qo(e,t){return Xi("Node",e,"contains")(t)}function Xo(e){return Xi("Node",e,"getRootNode")()}function Ko(e){return!e||!("host"in e)?null:Se("ShadowRoot",e,"host")}function Zo(e){return e.styleSheets}function ea(e){return!e||!("shadowRoot"in e)?null:Se("Element",e,"shadowRoot")}function ta(e,t){return Se("Element",e,"querySelector")(t)}function ra(e,t){return Se("Element",e,"querySelectorAll")(t)}function Ki(){return Kr("MutationObserver").constructor}function Me(e,t,r){try{if(!(t in e))return()=>{};const a=e[t],s=r(a);return typeof s=="function"&&(s.prototype=s.prototype||{},Object.defineProperties(s,{__rrweb_original__:{enumerable:!1,value:a}})),e[t]=s,()=>{e[t]=a}}catch(a){return()=>{}}}const k={childNodes:Ho,parentNode:Go,parentElement:Jo,textContent:Yo,contains:Qo,getRootNode:Xo,host:Ko,styleSheets:Zo,shadowRoot:ea,querySelector:ta,querySelectorAll:ra,mutationObserver:Ki,patch:Me};function te(e,t,r=document){const a={capture:!0,passive:!0};return r.addEventListener(e,t,a),()=>r.removeEventListener(e,t,a)}const Ae=`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 Pi={map:{},getId(){return console.error(Me),-1},getNode(){return console.error(Me),null},removeNodeFromMap(){console.error(Me)},has(){return console.error(Me),!1},reset(){console.error(Me)}};typeof window!="undefined"&&window.Proxy&&window.Reflect&&(Pi=new Proxy(Pi,{get(s,e,t){return e==="map"&&console.error(Me),Reflect.get(s,e,t)}}));function st(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 hr(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)}}),()=>hr(s,e,n||{},!0)}let Qt=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(Qt=()=>new Date().getTime());function vo(s){var e,t,r,i;const n=s.document;return{left:n.scrollingElement?n.scrollingElement.scrollLeft:s.pageXOffset!==void 0?s.pageXOffset:n.documentElement.scrollLeft||(n==null?void 0:n.body)&&((e=v.parentElement(n.body))==null?void 0:e.scrollLeft)||((t=n==null?void 0:n.body)==null?void 0:t.scrollLeft)||0,top:n.scrollingElement?n.scrollingElement.scrollTop:s.pageYOffset!==void 0?s.pageYOffset:(n==null?void 0:n.documentElement.scrollTop)||(n==null?void 0:n.body)&&((r=v.parentElement(n.body))==null?void 0:r.scrollTop)||((i=n==null?void 0:n.body)==null?void 0:i.scrollTop)||0}}function Io(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function xo(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function Oo(s){return s?s.nodeType===s.ELEMENT_NODE?s:v.parentElement(s):null}function X(s,e,t,r){if(!s)return!1;const i=Oo(s);if(!i)return!1;try{if(typeof e=="string"){if(i.classList.contains(e)||r&&i.closest("."+e)!==null)return!0}else if(Gt(i,e,r))return!0}catch(n){}return!!(t&&(i.matches(t)||r&&i.closest(t)!==null))}function Nh(s,e){return e.getId(s)!==-1}function $r(s,e,t){return s.tagName==="TITLE"&&t.headTitleMutations?!0:e.getId(s)===Ze}function Ro(s,e){if(je(s))return!1;const t=e.getId(s);if(!e.has(t))return!0;const r=v.parentNode(s);return r&&r.nodeType===s.DOCUMENT_NODE?!1:r?Ro(r,e):!0}function us(s){return!!s.changedTouches}function kh(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 Mo(s,e){return!!(s.nodeName==="IFRAME"&&e.getMeta(s))}function Ao(s,e){return!!(s.nodeName==="LINK"&&s.nodeType===s.ELEMENT_NODE&&s.getAttribute&&s.getAttribute("rel")==="stylesheet"&&e.getMeta(s))}function cs(s){return s?s instanceof Ls&&"shadowRoot"in s?!!s.shadowRoot:!!v.shadowRoot(s):!1}class Ph{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 Eo(s){var e;let t=null;return"getRootNode"in s&&((e=v.getRootNode(s))==null?void 0:e.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&v.host(v.getRootNode(s))&&(t=v.host(v.getRootNode(s))),t}function _h(s){let e=s,t;for(;t=Eo(e);)e=t;return e}function Dh(s){const e=s.ownerDocument;if(!e)return!1;const t=_h(s);return v.contains(e,t)}function $o(s){const e=s.ownerDocument;return e?v.contains(e,s)||Dh(s):!1}var M=(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))(M||{}),x=(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))(x||{}),K=(s=>(s[s.MouseUp=0]="MouseUp",s[s.MouseDown=1]="MouseDown",s[s.Click=2]="Click",s[s.ContextMenu=3]="ContextMenu",s[s.DblClick=4]="DblClick",s[s.Focus=5]="Focus",s[s.Blur=6]="Blur",s[s.TouchStart=7]="TouchStart",s[s.TouchMove_Departed=8]="TouchMove_Departed",s[s.TouchEnd=9]="TouchEnd",s[s.TouchCancel=10]="TouchCancel",s))(K||{}),he=(s=>(s[s.Mouse=0]="Mouse",s[s.Pen=1]="Pen",s[s.Touch=2]="Touch",s))(he||{}),Fe=(s=>(s[s["2D"]=0]="2D",s[s.WebGL=1]="WebGL",s[s.WebGL2=2]="WebGL2",s))(Fe||{}),Ae=(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))(Ae||{}),No=(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))(No||{});function _i(s){return"__ln"in s}class Lh{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&&_i(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&&_i(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 Di=(s,e)=>`${s}@${e}`;class Th{constructor(){w(this,"frozen",!1),w(this,"locked",!1),w(this,"texts",[]),w(this,"attributes",[]),w(this,"attributeMap",new WeakMap),w(this,"removes",[]),w(this,"mapRemoves",[]),w(this,"movedMap",{}),w(this,"addedSet",new Set),w(this,"movedSet",new Set),w(this,"droppedSet",new Set),w(this,"removesSubTreeCache",new Set),w(this,"mutationCb"),w(this,"blockClass"),w(this,"blockSelector"),w(this,"maskTextClass"),w(this,"maskTextSelector"),w(this,"inlineStylesheet"),w(this,"maskInputOptions"),w(this,"maskTextFn"),w(this,"maskInputFn"),w(this,"keepIframeSrcFn"),w(this,"recordCanvas"),w(this,"inlineImages"),w(this,"slimDOMOptions"),w(this,"dataURLOptions"),w(this,"doc"),w(this,"mirror"),w(this,"iframeManager"),w(this,"stylesheetManager"),w(this,"shadowDomManager"),w(this,"canvasManager"),w(this,"processedNodeManager"),w(this,"unattachedDoc"),w(this,"processMutations",e=>{e.forEach(this.processMutation),this.emit()}),w(this,"emit",()=>{if(this.frozen||this.locked)return;const e=[],t=new Set,r=new Lh,i=a=>{let u=a,c=Ze;for(;c===Ze;)u=u&&u.nextSibling,c=u&&this.mirror.getId(u);return c},n=a=>{const u=v.parentNode(a);if(!u||!$o(a))return;let c=!1;if(a.nodeType===Node.TEXT_NODE){const g=u.tagName;if(g==="TEXTAREA")return;g==="STYLE"&&this.addedSet.has(u)&&(c=!0)}const h=je(u)?this.mirror.getId(Eo(a)):this.mirror.getId(u),m=i(a);if(h===-1||m===-1)return r.addNode(a);const d=$e(a,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskTextClass:this.maskTextClass,maskTextSelector:this.maskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:g=>{Mo(g,this.mirror)&&this.iframeManager.addIframe(g),Ao(g,this.mirror)&&this.stylesheetManager.trackLinkElement(g),cs(a)&&this.shadowDomManager.addShadowRoot(v.shadowRoot(a),this.doc)},onIframeLoad:(g,p)=>{this.iframeManager.attachIframe(g,p),this.shadowDomManager.observeAttachShadow(g)},onStylesheetLoad:(g,p)=>{this.stylesheetManager.attachLinkElement(g,p)},cssCaptured:c});d&&(e.push({parentId:h,nextId:m,node:d}),t.add(d.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const a of this.movedSet)Li(this.removesSubTreeCache,a,this.mirror)&&!this.movedSet.has(v.parentNode(a))||n(a);for(const a of this.addedSet)!Ti(this.droppedSet,a)&&!Li(this.removesSubTreeCache,a,this.mirror)||Ti(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(v.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(v.parentNode(c.value));if(i(c.value)===-1)continue;if(h!==-1){a=c;break}else{const d=c.value,g=v.parentNode(d);if(g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const p=v.host(g);if(this.mirror.getId(p)!==-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=v.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)),t.attributes.value=Array.from(v.childNodes(e),r=>v.textContent(r)||"").join("")}),w(this,"processMutation",e=>{if(!$r(e.target,this.mirror,this.slimDOMOptions))switch(e.type){case"characterData":{const t=v.textContent(e.target);!X(e.target,this.blockClass,this.blockSelector,!1)&&t!==e.oldValue&&this.texts.push({value:qi(e.target,this.maskTextClass,this.maskTextSelector,!0)&&t?this.maskTextFn?this.maskTextFn(t,Oo(e.target)):t.replace(/[\S]/g,"*"):t,node:e.target});break}case"attributes":{const t=e.target;let r=e.attributeName,i=e.target.getAttribute(r);if(r==="value"){const o=ds(t);i=ps({element:t,maskInputOptions:this.maskInputOptions,tagName:t.tagName,type:o,value:i,maskInputFn:this.maskInputFn})}if(X(e.target,this.blockClass,this.blockSelector,!1)||i===e.oldValue)return;let n=this.attributeMap.get(e.target);if(t.tagName==="IFRAME"&&r==="src"&&!this.keepIframeSrcFn(i))if(!t.contentDocument)r="rr_src";else return;if(n||(n={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(n),this.attributeMap.set(e.target,n)),r==="type"&&t.tagName==="INPUT"&&(e.oldValue||"").toLowerCase()==="password"&&t.setAttribute("data-rr-is-password","true"),!Qi(t.tagName,r))if(n.attributes[r]=Ki(this.doc,Ce(t.tagName),Ce(r),i),r==="style"){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(l){this.unattachedDoc=this.doc}const o=this.unattachedDoc.createElement("span");e.oldValue&&o.setAttribute("style",e.oldValue);for(const l of Array.from(t.style)){const a=t.style.getPropertyValue(l),u=t.style.getPropertyPriority(l);a!==o.style.getPropertyValue(l)||u!==o.style.getPropertyPriority(l)?u===""?n.styleDiff[l]=a:n.styleDiff[l]=[a,u]:n._unchangedStyles[l]=[a,u]}for(const l of Array.from(o.style))t.style.getPropertyValue(l)===""&&(n.styleDiff[l]=!1)}else r==="open"&&t.tagName==="DIALOG"&&(t.matches("dialog:modal")?n.attributes.rr_open_mode="modal":n.attributes.rr_open_mode="non-modal");break}case"childList":{if(X(e.target,this.blockClass,this.blockSelector,!0))return;if(e.target.tagName==="TEXTAREA"){this.genTextAreaValueMutation(e.target);return}e.addedNodes.forEach(t=>this.genAdds(t,e.target)),e.removedNodes.forEach(t=>{const r=this.mirror.getId(t),i=je(e.target)?this.mirror.getId(v.host(e.target)):this.mirror.getId(e.target);X(e.target,this.blockClass,this.blockSelector,!1)||$r(t,this.mirror,this.slimDOMOptions)||!Nh(t,this.mirror)||(this.addedSet.has(t)?(hs(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&r===-1||Ro(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[Di(r,i)]?hs(this.movedSet,t):(this.removes.push({parentId:i,id:r,isShadow:je(e.target)&&He(e.target)?!0:void 0}),Fh(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($r(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[Di(this.mirror.getId(e),r)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);X(e,this.blockClass,this.blockSelector,!1)||(v.childNodes(e).forEach(r=>this.genAdds(r)),cs(e)&&v.childNodes(v.shadowRoot(e)).forEach(r=>{this.processedNodeManager.add(r,this),this.genAdds(r,e)}))}})}init(e){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(t=>{this[t]=e[t]})}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}}function hs(s,e){s.delete(e),v.childNodes(e).forEach(t=>hs(s,t))}function Fh(s,e){const t=[s];for(;t.length;){const r=t.pop();e.has(r)||(e.add(r),v.childNodes(r).forEach(i=>t.push(i)))}}function Li(s,e,t){return s.size===0?!1:Uh(s,e)}function Uh(s,e,t){const r=v.parentNode(e);return r?s.has(r):!1}function Ti(s,e){return s.size===0?!1:ko(s,e)}function ko(s,e){const t=v.parentNode(e);return t?s.has(t)?!0:ko(s,t):!1}let Ye;function Bh(s){Ye=s}function zh(){Ye=void 0}const R=s=>Ye?(...t)=>{try{return s(...t)}catch(r){if(Ye&&Ye(r)===!0)return;throw r}}:s,Se=[];function lt(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 Po(s,e){const t=new Th;Se.push(t),t.init(s);const r=new(Co())(R(t.processMutations.bind(t)));return r.observe(e,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),r}function Wh({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=st(R(h=>{const m=Date.now()-l;s(o.map(d=>(d.timeOffset-=m,d)),h),o=[],l=null}),n),u=R(st(R(h=>{const m=lt(h),{clientX:d,clientY:g}=us(h)?h.changedTouches[0]:h;l||(l=Qt()),o.push({x:d,y:g,id:r.getId(m),timeOffset:Qt()-l}),a(typeof DragEvent!="undefined"&&h instanceof DragEvent?x.Drag:h instanceof MouseEvent?x.MouseMove:x.TouchMove)}),i,{trailing:!1})),c=[J("mousemove",u,t),J("touchmove",u,t),J("drag",u,t)];return R(()=>{c.forEach(h=>h())})}function Gh({mouseInteractionCb:s,doc:e,mirror:t,blockClass:r,blockSelector:i,sampling:n}){if(n.mouseInteraction===!1)return()=>{};const o=n.mouseInteraction===!0||n.mouseInteraction===void 0?{}:n.mouseInteraction,l=[];let a=null;const u=c=>h=>{const m=lt(h);if(X(m,r,i,!0))return;let d=null,g=c;if("pointerType"in h){switch(h.pointerType){case"mouse":d=he.Mouse;break;case"touch":d=he.Touch;break;case"pen":d=he.Pen;break}d===he.Touch?K[c]===K.MouseDown?g="TouchStart":K[c]===K.MouseUp&&(g="TouchEnd"):he.Pen}else us(h)&&(d=he.Touch);d!==null?(a=d,(g.startsWith("Touch")&&d===he.Touch||g.startsWith("Mouse")&&d===he.Mouse)&&(d=null)):K[c]===K.Click&&(d=a,a=null);const p=us(h)?h.changedTouches[0]:h;if(!p)return;const f=t.getId(m),{clientX:b,clientY:S}=p;R(s)(O({type:K[g],id:f,x:b,y:S},d!==null&&{pointerType:d}))};return Object.keys(K).filter(c=>Number.isNaN(Number(c))&&!c.endsWith("_Departed")&&o[c]!==!1).forEach(c=>{let h=Ce(c);const m=u(c);if(window.PointerEvent)switch(K[c]){case K.MouseDown:case K.MouseUp:h=h.replace("mouse","pointer");break;case K.TouchStart:case K.TouchEnd:return}l.push(J(h,m,e))}),R(()=>{l.forEach(c=>c())})}function _o({scrollCb:s,doc:e,mirror:t,blockClass:r,blockSelector:i,sampling:n}){const o=R(st(R(l=>{const a=lt(l);if(!a||X(a,r,i,!0))return;const u=t.getId(a);if(a===e&&e.defaultView){const c=vo(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 J("scroll",o,e)}function Vh({viewportResizeCb:s},{win:e}){let t=-1,r=-1;const i=R(st(R(()=>{const n=Io(),o=xo();(t!==n||r!==o)&&(s({width:Number(o),height:Number(n)}),t=n,r=o)}),200));return J("resize",i,e)}const jh=["INPUT","TEXTAREA","SELECT"],Fi=new WeakMap;function Hh({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=lt(S);const C=S.isTrusted,I=y&&y.tagName;if(y&&I==="OPTION"&&(y=v.parentElement(y)),!y||!I||jh.indexOf(I)<0||X(y,r,i,!0)||y.classList.contains(n)||o&&y.matches(o))return;let k=y.value,G=!1;const _=ds(y)||"";_==="radio"||_==="checkbox"?G=y.checked:(l[I.toLowerCase()]||l[_])&&(k=ps({element:y,maskInputOptions:l,tagName:I,type:_,value:k,maskInputFn:a})),m(y,c?{text:k,isChecked:G,userTriggered:C}:{text:k,isChecked:G});const V=y.name;_==="radio"&&V&&G&&e.querySelectorAll(`input[type="radio"][name="${V}"]`).forEach(Y=>{if(Y!==y){const Q=Y.value;m(Y,c?{text:Q,isChecked:!G,userTriggered:!1}:{text:Q,isChecked:!G})}})}function m(S,y){const C=Fi.get(S);if(!C||C.text!==y.text||C.isChecked!==y.isChecked){Fi.set(S,y);const I=t.getId(S);R(s)(ee(O({},y),{id:I}))}}const g=(u.input==="last"?["change"]:["input","change"]).map(S=>J(S,R(h),e)),p=e.defaultView;if(!p)return()=>{g.forEach(S=>S())};const f=p.Object.getOwnPropertyDescriptor(p.HTMLInputElement.prototype,"value"),b=[[p.HTMLInputElement.prototype,"value"],[p.HTMLInputElement.prototype,"checked"],[p.HTMLSelectElement.prototype,"value"],[p.HTMLTextAreaElement.prototype,"value"],[p.HTMLSelectElement.prototype,"selectedIndex"],[p.HTMLOptionElement.prototype,"selected"]];return f&&f.set&&g.push(...b.map(S=>hr(S[0],S[1],{set(){R(h)({target:this,isTrusted:!1})}},!1,p))),R(()=>{g.forEach(S=>S())})}function qt(s){const e=[];function t(r,i){if(Pt("CSSGroupingRule")&&r.parentRule instanceof CSSGroupingRule||Pt("CSSMediaRule")&&r.parentRule instanceof CSSMediaRule||Pt("CSSSupportsRule")&&r.parentRule instanceof CSSSupportsRule||Pt("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 de(s,e,t){let r,i;return s?(s.ownerNode?r=e.getId(s.ownerNode):i=t.getId(s),{styleId:i,id:r}):{}}function Yh({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:R((c,h,m)=>{const[d,g]=m,{id:p,styleId:f}=de(h,e,t.styleMirror);return(p&&p!==-1||f&&f!==-1)&&s({id:p,styleId:f,adds:[{rule:d,index:g}]}),c.apply(h,m)})}),r.CSSStyleSheet.prototype.addRule=function(c,h,m=this.cssRules.length){const d=`${c} { ${h} }`;return r.CSSStyleSheet.prototype.insertRule.apply(this,[d,m])};const n=r.CSSStyleSheet.prototype.deleteRule;r.CSSStyleSheet.prototype.deleteRule=new Proxy(n,{apply:R((c,h,m)=>{const[d]=m,{id:g,styleId:p}=de(h,e,t.styleMirror);return(g&&g!==-1||p&&p!==-1)&&s({id:g,styleId:p,removes:[{index:d}]}),c.apply(h,m)})}),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:R((c,h,m)=>{const[d]=m,{id:g,styleId:p}=de(h,e,t.styleMirror);return(g&&g!==-1||p&&p!==-1)&&s({id:g,styleId:p,replace:d}),c.apply(h,m)})}));let l;r.CSSStyleSheet.prototype.replaceSync&&(l=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(l,{apply:R((c,h,m)=>{const[d]=m,{id:g,styleId:p}=de(h,e,t.styleMirror);return(g&&g!==-1||p&&p!==-1)&&s({id:g,styleId:p,replaceSync:d}),c.apply(h,m)})}));const a={};_t("CSSGroupingRule")?a.CSSGroupingRule=r.CSSGroupingRule:(_t("CSSMediaRule")&&(a.CSSMediaRule=r.CSSMediaRule),_t("CSSConditionRule")&&(a.CSSConditionRule=r.CSSConditionRule),_t("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:R((m,d,g)=>{const[p,f]=g,{id:b,styleId:S}=de(d.parentStyleSheet,e,t.styleMirror);return(b&&b!==-1||S&&S!==-1)&&s({id:b,styleId:S,adds:[{rule:p,index:[...qt(d),f||0]}]}),m.apply(d,g)})}),h.prototype.deleteRule=new Proxy(u[c].deleteRule,{apply:R((m,d,g)=>{const[p]=g,{id:f,styleId:b}=de(d.parentStyleSheet,e,t.styleMirror);return(f&&f!==-1||b&&b!==-1)&&s({id:f,styleId:b,removes:[{index:[...qt(d),p]}]}),m.apply(d,g)})})}),R(()=>{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 Do({mirror:s,stylesheetManager:e},t){var r,i,n;let o=null;t.nodeName==="#document"?o=s.getId(t):o=s.getId(v.host(t));const l=t.nodeName==="#document"?(r=t.defaultView)==null?void 0:r.Document:(n=(i=t.ownerDocument)==null?void 0:i.defaultView)==null?void 0:n.ShadowRoot,a=l!=null&&l.prototype?Object.getOwnPropertyDescriptor(l==null?void 0:l.prototype,"adoptedStyleSheets"):void 0;return o===null||o===-1||!l||!a?()=>{}:(Object.defineProperty(t,"adoptedStyleSheets",{configurable:a.configurable,enumerable:a.enumerable,get(){var 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(m){}return h}}),R(()=>{Object.defineProperty(t,"adoptedStyleSheets",{configurable:a.configurable,enumerable:a.enumerable,get:a.get,set:a.set})}))}function Zh({styleDeclarationCb:s,mirror:e,ignoreCSSAttributes:t,stylesheetManager:r},{win:i}){const n=i.CSSStyleDeclaration.prototype.setProperty;i.CSSStyleDeclaration.prototype.setProperty=new Proxy(n,{apply:R((l,a,u)=>{var c;const[h,m,d]=u;if(t.has(h))return n.apply(a,[h,m,d]);const{id:g,styleId:p}=de((c=a.parentRule)==null?void 0:c.parentStyleSheet,e,r.styleMirror);return(g&&g!==-1||p&&p!==-1)&&s({id:g,styleId:p,set:{property:h,value:m,priority:d},index:qt(a.parentRule)}),l.apply(a,u)})});const o=i.CSSStyleDeclaration.prototype.removeProperty;return i.CSSStyleDeclaration.prototype.removeProperty=new Proxy(o,{apply:R((l,a,u)=>{var c;const[h]=u;if(t.has(h))return o.apply(a,[h]);const{id:m,styleId:d}=de((c=a.parentRule)==null?void 0:c.parentStyleSheet,e,r.styleMirror);return(m&&m!==-1||d&&d!==-1)&&s({id:m,styleId:d,remove:{property:h},index:qt(a.parentRule)}),l.apply(a,u)})}),R(()=>{i.CSSStyleDeclaration.prototype.setProperty=n,i.CSSStyleDeclaration.prototype.removeProperty=o})}function Jh({mediaInteractionCb:s,blockClass:e,blockSelector:t,mirror:r,sampling:i,doc:n}){const o=R(a=>st(R(u=>{const c=lt(u);if(!c||X(c,e,t,!0))return;const{currentTime:h,volume:m,muted:d,playbackRate:g,loop:p}=c;s({type:a,id:r.getId(c),currentTime:h,volume:m,muted:d,playbackRate:g,loop:p})}),i.media||500)),l=[J("play",o(Ae.Play),n),J("pause",o(Ae.Pause),n),J("seeked",o(Ae.Seeked),n),J("volumechange",o(Ae.VolumeChange),n),J("ratechange",o(Ae.RateChange),n)];return R(()=>{l.forEach(a=>a())})}function Xh({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=xe(e.fonts,"add",function(l){return function(a){return setTimeout(R(()=>{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),R(()=>{r.forEach(l=>l())})}function Kh(s){const{doc:e,mirror:t,blockClass:r,blockSelector:i,selectionCb:n}=s;let o=!0;const l=R(()=>{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 m=a.getRangeAt(h),{startContainer:d,startOffset:g,endContainer:p,endOffset:f}=m;X(d,r,i,!0)||X(p,r,i,!0)||u.push({start:t.getId(d),startOffset:g,end:t.getId(p),endOffset:f})}n({ranges:u})});return l(),J("selectionchange",l)}function Qh({doc:s,customElementCb:e}){const t=s.defaultView;return!t||!t.customElements?()=>{}:xe(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 qh(s,e){const{mutationCb:t,mousemoveCb:r,mouseInteractionCb:i,scrollCb:n,viewportResizeCb:o,inputCb:l,mediaInteractionCb:a,styleSheetRuleCb:u,styleDeclarationCb:c,canvasMutationCb:h,fontCb:m,selectionCb:d,customElementCb:g}=s;s.mutationCb=(...p)=>{e.mutation&&e.mutation(...p),t(...p)},s.mousemoveCb=(...p)=>{e.mousemove&&e.mousemove(...p),r(...p)},s.mouseInteractionCb=(...p)=>{e.mouseInteraction&&e.mouseInteraction(...p),i(...p)},s.scrollCb=(...p)=>{e.scroll&&e.scroll(...p),n(...p)},s.viewportResizeCb=(...p)=>{e.viewportResize&&e.viewportResize(...p),o(...p)},s.inputCb=(...p)=>{e.input&&e.input(...p),l(...p)},s.mediaInteractionCb=(...p)=>{e.mediaInteaction&&e.mediaInteaction(...p),a(...p)},s.styleSheetRuleCb=(...p)=>{e.styleSheetRule&&e.styleSheetRule(...p),u(...p)},s.styleDeclarationCb=(...p)=>{e.styleDeclaration&&e.styleDeclaration(...p),c(...p)},s.canvasMutationCb=(...p)=>{e.canvasMutation&&e.canvasMutation(...p),h(...p)},s.fontCb=(...p)=>{e.font&&e.font(...p),m(...p)},s.selectionCb=(...p)=>{e.selection&&e.selection(...p),d(...p)},s.customElementCb=(...p)=>{e.customElement&&e.customElement(...p),g(...p)}}function ef(s,e={}){const t=s.doc.defaultView;if(!t)return()=>{};qh(s,e);let r;s.recordDOM&&(r=Po(s,s.doc));const i=Wh(s),n=Gh(s),o=_o(s),l=Vh(s,{win:t}),a=Hh(s),u=Jh(s);let c=()=>{},h=()=>{},m=()=>{},d=()=>{};s.recordDOM&&(c=Yh(s,{win:t}),h=Do(s,s.doc),m=Zh(s,{win:t}),s.collectFonts&&(d=Xh(s)));const g=Kh(s),p=Qh(s),f=[];for(const b of s.plugins)f.push(b.observer(b.callback,t,b.options));return R(()=>{Se.forEach(b=>b.reset()),r==null||r.disconnect(),i(),n(),o(),l(),a(),u(),c(),h(),m(),d(),g(),p(),f.forEach(b=>b())})}function Pt(s){return typeof window[s]!="undefined"}function _t(s){return!!(typeof window[s]!="undefined"&&window[s].prototype&&"insertRule"in window[s].prototype&&"deleteRule"in window[s].prototype)}class Ui{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 tf{constructor(e){w(this,"iframes",new WeakMap),w(this,"crossOriginIframeMap",new WeakMap),w(this,"crossOriginIframeMirror",new Ui(Xi)),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 Ui(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 M.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:M.IncrementalSnapshot,data:{source:x.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case M.Meta:case M.Load:case M.DomContentLoaded:return!1;case M.Plugin:return t;case M.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case M.IncrementalSnapshot:switch(t.data.source){case x.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 x.Drag:case x.TouchMove:case x.MouseMove:return t.data.positions.forEach(i=>{this.replaceIds(i,e,["id"])}),t;case x.ViewportResize:return!1;case x.MediaInteraction:case x.MouseInteraction:case x.Scroll:case x.CanvasMutation:case x.Input:return this.replaceIds(t.data,e,["id"]),t;case x.StyleSheetRule:case x.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case x.Font:return t;case x.Selection:return t.data.ranges.forEach(i=>{this.replaceIds(i,e,["start","end"])}),t;case x.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!==No.Document&&!e.rootId&&(e.rootId=t),"childNodes"in e&&e.childNodes.forEach(r=>{this.patchRootIdOnNode(r,t)})}}class rf{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(!He(e)||this.shadowDoms.has(e))return;this.shadowDoms.add(e);const r=Po(ee(O({},this.bypassOptions),{doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),e);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push(_o(ee(O({},this.bypassOptions),{scrollCb:this.scrollCb,doc:e,mirror:this.mirror}))),setTimeout(()=>{e.adoptedStyleSheets&&e.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,this.mirror.getId(v.host(e))),this.restoreHandlers.push(Do({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(xe(e.prototype,"attachShadow",function(i){return function(n){const o=i.call(this,n),l=v.shadowRoot(this);return l&&$o(this)&&r.addShadowRoot(l,t),o}}))}reset(){this.restoreHandlers.forEach(e=>{try{e()}catch(t){}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}var Ne="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",sf=typeof Uint8Array=="undefined"?[]:new Uint8Array(256);for(var Dt=0;Dt<Ne.length;Dt++)sf[Ne.charCodeAt(Dt)]=Dt;var nf=function(s){var e=new Uint8Array(s),t,r=e.length,i="";for(t=0;t<r;t+=3)i+=Ne[e[t]>>2],i+=Ne[(e[t]&3)<<4|e[t+1]>>4],i+=Ne[(e[t+1]&15)<<2|e[t+2]>>6],i+=Ne[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 Bi=new Map;function of(s,e){let t=Bi.get(s);return t||(t=new Map,Bi.set(s,t)),t.has(e)||t.set(e,[]),t.get(e)}const Lo=(s,e,t)=>{if(!s||!(Fo(s,e)||typeof s=="object"))return;const r=s.constructor.name,i=of(t,r);let n=i.indexOf(s);return n===-1&&(n=i.length,i.push(s)),n};function Bt(s,e,t){if(s instanceof Array)return s.map(r=>Bt(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=nf(s);return{rr_type:r,base64:i}}else{if(s instanceof DataView)return{rr_type:s.constructor.name,args:[Bt(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:[Bt(s.data,e,t),s.width,s.height]};if(Fo(s,e)||typeof s=="object"){const r=s.constructor.name,i=Lo(s,e,t);return{rr_type:r,index:i}}}}return s}const To=(s,e,t)=>s.map(r=>Bt(r,e,t)),Fo=(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 af(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=xe(e.CanvasRenderingContext2D.prototype,o,function(a){return function(...u){return X(this.canvas,t,r,!0)||setTimeout(()=>{const c=To(u,e,this);s(this.canvas,{type:Fe["2D"],property:o,args:c})},0),a.apply(this,u)}});i.push(l)}catch(l){const a=hr(e.CanvasRenderingContext2D.prototype,o,{set(u){s(this.canvas,{type:Fe["2D"],property:o,args:[u],setter:!0})}});i.push(a)}return()=>{i.forEach(o=>o())}}function lf(s){return s==="experimental-webgl"?"webgl":s}function zi(s,e,t,r){const i=[];try{const n=xe(s.HTMLCanvasElement.prototype,"getContext",function(o){return function(l,...a){if(!X(this,e,t,!0)){const u=lf(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 Wi(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=xe(s,a,function(c){return function(...h){const m=c.apply(this,h);if(Lo(m,n,this),"tagName"in this.canvas&&!X(this.canvas,r,i,!0)){const d=To(h,n,this),g={type:e,property:a,args:d};t(this.canvas,g)}return m}});o.push(u)}catch(u){const c=hr(s,a,{set(h){t(this.canvas,{type:e,property:a,args:[h],setter:!0})}});o.push(c)}return o}function uf(s,e,t,r){const i=[];return i.push(...Wi(e.WebGLRenderingContext.prototype,Fe.WebGL,s,t,r,e)),typeof e.WebGL2RenderingContext!="undefined"&&i.push(...Wi(e.WebGL2RenderingContext.prototype,Fe.WebGL2,s,t,r,e)),()=>{i.forEach(n=>n())}}const Uo="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=",cf=s=>Uint8Array.from(atob(s),e=>e.charCodeAt(0)),Gi=typeof window!="undefined"&&window.Blob&&new Blob([cf(Uo)],{type:"text/javascript;charset=utf-8"});function hf(s){let e;try{if(e=Gi&&(window.URL||window.webkitURL).createObjectURL(Gi),!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,"+Uo,{name:s==null?void 0:s.name})}finally{e&&(window.URL||window.webkitURL).revokeObjectURL(e)}}class ff{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=zi(t,r,i,!0),l=new Map,a=new hf;a.onmessage=g=>{const{id:p}=g.data;if(l.set(p,!1),!("base64"in g.data))return;const{base64:f,type:b,width:S,height:y}=g.data;this.mutationCb({id:p,type:Fe["2D"],commands:[{property:"clearRect",args:[0,0,S,y]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:f}],type:b}]},0,0]}]})};const u=1e3/e;let c=0,h;const m=()=>{const g=[],p=f=>{f.querySelectorAll("canvas").forEach(b=>{X(b,r,i,!0)||g.push(b)}),f.querySelectorAll("*").forEach(b=>{b.shadowRoot&&p(b.shadowRoot)})};return p(t.document),g},d=g=>{if(c&&g-c<u){h=requestAnimationFrame(d);return}c=g,m().forEach(async p=>{var f;const b=this.mirror.getId(p);if(l.get(b)||p.width===0||p.height===0)return;if(l.set(b,!0),["webgl","webgl2"].includes(p.__context)){const I=p.getContext(p.__context);((f=I==null?void 0:I.getContextAttributes())==null?void 0:f.preserveDrawingBuffer)===!1&&I.clear(I.COLOR_BUFFER_BIT)}const S=p.clientWidth||p.width,y=p.clientHeight||p.height,C=await createImageBitmap(p,{resizeWidth:S,resizeHeight:y});a.postMessage({id:b,bitmap:C,width:S,height:y,dataURLOptions:n.dataURLOptions},[C])}),h=requestAnimationFrame(d)};h=requestAnimationFrame(d),this.resetObservers=()=>{o(),cancelAnimationFrame(h)}}initCanvasMutationObserver(e,t,r){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const i=zi(e,t,r,!1),n=af(this.processMutation.bind(this),e,t,r),o=uf(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 Oe(u,["type"])}),{type:n}=r[0];this.mutationCb({id:t,type:n,commands:i}),this.pendingCanvasMutations.delete(e)}}class pf{constructor(e){w(this,"trackedLinkElements",new WeakSet),w(this,"mutationCb"),w(this,"adoptedStyleSheetCb"),w(this,"styleMirror",new Ph),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:Yi(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 df{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 W,zt,Nr,er=!1;try{if(Array.from([1],s=>s*2)[0]!==2){const s=document.createElement("iframe");document.body.appendChild(s),Array.from=((js=s.contentWindow)==null?void 0:js.Array.from)||Array.from,document.body.removeChild(s)}}catch(s){console.debug("Unable to override Array.from",s)}const se=pa();function ut(s={}){const{emit:e,checkoutEveryNms:t,checkoutEveryNth:r,blockClass:i="rr-block",blockSelector:n=null,ignoreClass:o="rr-ignore",ignoreSelector:l=null,maskTextClass:a="rr-mask",maskTextSelector:u=null,inlineStylesheet:c=!0,maskAllInputs:h,maskInputOptions:m,slimDOMOptions:d,maskInputFn:g,maskTextFn:p,hooks:f,packFn:b,sampling:S={},dataURLOptions:y={},mousemoveWait:C,recordDOM:I=!0,recordCanvas:k=!1,recordCrossOriginIframes:G=!1,recordAfter:_=s.recordAfter==="DOMContentLoaded"?s.recordAfter:"load",userTriggeredOnInput:V=!1,collectFonts:Y=!1,inlineImages:Q=!1,plugins:oe,keepIframeSrcFn:A=()=>!1,ignoreCSSAttributes:Ue=new Set([]),errorHandler:Be}=s;Bh(Be);const j=G?window.parent===window:!0;let q=!1;if(!j)try{window.parent.document&&(q=!1)}catch(E){q=!0}if(j&&!e)throw new Error("emit function is required");if(!j&&!q)return()=>{};C!==void 0&&S.mousemove===void 0&&(S.mousemove=C),se.reset();const ye=h===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:m!==void 0?m:{password:!0},ae=d===!0||d==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:d==="all",headMetaDescKeywords:d==="all",headTitleMutations:d==="all"}:d||{};kh();let Fs,fr=0;const Us=E=>{for(const re of oe||[])re.eventProcessor&&(E=re.eventProcessor(E));return b&&!q&&(E=b(E)),E};W=(E,re)=>{var B;const z=E;if(z.timestamp=Qt(),(B=Se[0])!=null&&B.isFrozen()&&z.type!==M.FullSnapshot&&!(z.type===M.IncrementalSnapshot&&z.data.source===x.Mutation)&&Se.forEach(le=>le.unfreeze()),j)e==null||e(Us(z),re);else if(q){const le={type:"rrweb",event:Us(z),origin:window.location.origin,isCheckout:re};window.parent.postMessage(le,"*")}if(z.type===M.FullSnapshot)Fs=z,fr=0;else if(z.type===M.IncrementalSnapshot){if(z.data.source===x.Mutation&&z.data.isAttachIframe)return;fr++;const le=r&&fr>=r,P=t&&z.timestamp-Fs.timestamp>t;(le||P)&&zt(!0)}};const ct=E=>{W({type:M.IncrementalSnapshot,data:O({source:x.Mutation},E)})},Bs=E=>W({type:M.IncrementalSnapshot,data:O({source:x.Scroll},E)}),zs=E=>W({type:M.IncrementalSnapshot,data:O({source:x.CanvasMutation},E)}),Bo=E=>W({type:M.IncrementalSnapshot,data:O({source:x.AdoptedStyleSheet},E)}),we=new pf({mutationCb:ct,adoptedStyleSheetCb:Bo}),be=new tf({mirror:se,mutationCb:ct,stylesheetManager:we,recordCrossOriginIframes:G,wrappedEmit:W});for(const E of oe||[])E.getMirror&&E.getMirror({nodeMirror:se,crossOriginIframeMirror:be.crossOriginIframeMirror,crossOriginIframeStyleMirror:be.crossOriginIframeStyleMirror});const pr=new df;Nr=new ff({recordCanvas:k,mutationCb:zs,win:window,blockClass:i,blockSelector:n,mirror:se,sampling:S.canvas,dataURLOptions:y});const ht=new rf({mutationCb:ct,scrollCb:Bs,bypassOptions:{blockClass:i,blockSelector:n,maskTextClass:a,maskTextSelector:u,inlineStylesheet:c,maskInputOptions:ye,dataURLOptions:y,maskTextFn:p,maskInputFn:g,recordCanvas:k,inlineImages:Q,sampling:S,slimDOMOptions:ae,iframeManager:be,stylesheetManager:we,canvasManager:Nr,keepIframeSrcFn:A,processedNodeManager:pr},mirror:se});zt=(E=!1)=>{if(!I)return;W({type:M.Meta,data:{href:window.location.href,width:xo(),height:Io()}},E),we.reset(),ht.init(),Se.forEach(B=>B.lock());const re=Fa(document,{mirror:se,blockClass:i,blockSelector:n,maskTextClass:a,maskTextSelector:u,inlineStylesheet:c,maskAllInputs:ye,maskTextFn:p,maskInputFn:g,slimDOM:ae,dataURLOptions:y,recordCanvas:k,inlineImages:Q,onSerialize:B=>{Mo(B,se)&&be.addIframe(B),Ao(B,se)&&we.trackLinkElement(B),cs(B)&&ht.addShadowRoot(v.shadowRoot(B),document)},onIframeLoad:(B,z)=>{be.attachIframe(B,z),ht.observeAttachShadow(B)},onStylesheetLoad:(B,z)=>{we.attachLinkElement(B,z)},keepIframeSrcFn:A});if(!re)return console.warn("Failed to snapshot the document");W({type:M.FullSnapshot,data:{node:re,initialOffset:vo(window)}},E),Se.forEach(B=>B.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&we.adoptStyleSheets(document.adoptedStyleSheets,se.getId(document))};try{const E=[],re=z=>{var le;return R(ef)({mutationCb:ct,mousemoveCb:(P,dr)=>W({type:M.IncrementalSnapshot,data:{source:dr,positions:P}}),mouseInteractionCb:P=>W({type:M.IncrementalSnapshot,data:O({source:x.MouseInteraction},P)}),scrollCb:Bs,viewportResizeCb:P=>W({type:M.IncrementalSnapshot,data:O({source:x.ViewportResize},P)}),inputCb:P=>W({type:M.IncrementalSnapshot,data:O({source:x.Input},P)}),mediaInteractionCb:P=>W({type:M.IncrementalSnapshot,data:O({source:x.MediaInteraction},P)}),styleSheetRuleCb:P=>W({type:M.IncrementalSnapshot,data:O({source:x.StyleSheetRule},P)}),styleDeclarationCb:P=>W({type:M.IncrementalSnapshot,data:O({source:x.StyleDeclaration},P)}),canvasMutationCb:zs,fontCb:P=>W({type:M.IncrementalSnapshot,data:O({source:x.Font},P)}),selectionCb:P=>{W({type:M.IncrementalSnapshot,data:O({source:x.Selection},P)})},customElementCb:P=>{W({type:M.IncrementalSnapshot,data:O({source:x.CustomElement},P)})},blockClass:i,ignoreClass:o,ignoreSelector:l,maskTextClass:a,maskTextSelector:u,maskInputOptions:ye,inlineStylesheet:c,sampling:S,recordDOM:I,recordCanvas:k,inlineImages:Q,userTriggeredOnInput:V,collectFonts:Y,doc:z,maskInputFn:g,maskTextFn:p,keepIframeSrcFn:A,blockSelector:n,slimDOMOptions:ae,dataURLOptions:y,mirror:se,iframeManager:be,stylesheetManager:we,shadowDomManager:ht,processedNodeManager:pr,canvasManager:Nr,ignoreCSSAttributes:Ue,plugins:((le=oe==null?void 0:oe.filter(P=>P.observer))==null?void 0:le.map(P=>({observer:P.observer,options:P.options,callback:dr=>W({type:M.Plugin,data:{plugin:P.name,payload:dr}})})))||[]},f)};be.addLoadListener(z=>{try{E.push(re(z.contentDocument))}catch(le){console.warn(le)}});const B=()=>{zt(),E.push(re(document)),er=!0};return document.readyState==="interactive"||document.readyState==="complete"?B():(E.push(J("DOMContentLoaded",()=>{W({type:M.DomContentLoaded,data:{}}),_==="DOMContentLoaded"&&B()})),E.push(J("load",()=>{W({type:M.Load,data:{}}),_==="load"&&B()},window))),()=>{E.forEach(z=>z()),pr.destroy(),er=!1,zh()}}catch(E){console.warn(E)}}ut.addCustomEvent=(s,e)=>{if(!er)throw new Error("please add custom event after start recording");W({type:M.Custom,data:{tag:s,payload:e}})};ut.freezePage=()=>{Se.forEach(s=>s.freeze())};ut.takeFullSnapshot=s=>{if(!er)throw new Error("please take full snapshot after start recording");zt(s)};ut.mirror=se;var Vi;(function(s){s[s.NotStarted=0]="NotStarted",s[s.Running=1]="Running",s[s.Stopped=2]="Stopped"})(Vi||(Vi={}));exports.record=ut;
|
|
66
|
+
or you can use record.mirror to access the mirror instance during recording.`;let gi={map:{},getId(){return console.error(Ae),-1},getNode(){return console.error(Ae),null},removeNodeFromMap(){console.error(Ae)},has(){return console.error(Ae),!1},reset(){console.error(Ae)}};typeof window!="undefined"&&window.Proxy&&window.Reflect&&(gi=new Proxy(gi,{get(e,t,r){return t==="map"&&console.error(Ae),Reflect.get(e,t,r)}}));function ze(e,t,r={}){let a=null,s=0;return function(...c){const p=Date.now();!s&&r.leading===!1&&(s=p);const m=t-(p-s),o=this;m<=0||m>t?(a&&(clearTimeout(a),a=null),s=p,e.apply(o,c)):!a&&r.trailing!==!1&&(a=setTimeout(()=>{s=r.leading===!1?0:Date.now(),a=null,e.apply(o,c)},m))}}function wt(e,t,r,a,s=window){const c=s.Object.getOwnPropertyDescriptor(e,t);return s.Object.defineProperty(e,t,a?r:{set(p){setTimeout(()=>{r.set.call(this,p)},0),c&&c.set&&c.set.call(this,p)}}),()=>wt(e,t,c||{},!0)}let nt=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(nt=()=>new Date().getTime());function Zi(e){var t,r,a,s;const c=e.document;return{left:c.scrollingElement?c.scrollingElement.scrollLeft:e.pageXOffset!==void 0?e.pageXOffset:c.documentElement.scrollLeft||(c==null?void 0:c.body)&&((t=k.parentElement(c.body))==null?void 0:t.scrollLeft)||((r=c==null?void 0:c.body)==null?void 0:r.scrollLeft)||0,top:c.scrollingElement?c.scrollingElement.scrollTop:e.pageYOffset!==void 0?e.pageYOffset:(c==null?void 0:c.documentElement.scrollTop)||(c==null?void 0:c.body)&&((a=k.parentElement(c.body))==null?void 0:a.scrollTop)||((s=c==null?void 0:c.body)==null?void 0:s.scrollTop)||0}}function en(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function tn(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function rn(e){return e?e.nodeType===e.ELEMENT_NODE?e:k.parentElement(e):null}function re(e,t,r,a){if(!e)return!1;const s=rn(e);if(!s)return!1;try{if(typeof t=="string"){if(s.classList.contains(t)||a&&s.closest("."+t)!==null)return!0}else if(it(s,t,a))return!0}catch(c){}return!!(r&&(s.matches(r)||a&&s.closest(r)!==null))}function sa(e,t){return t.getId(e)!==-1}function Er(e,t,r){return e.tagName==="TITLE"&&r.headTitleMutations?!0:t.getId(e)===$e}function sn(e,t){if(Te(e))return!1;const r=t.getId(e);if(!t.has(r))return!0;const a=k.parentNode(e);return a&&a.nodeType===e.DOCUMENT_NODE?!1:a?sn(a,t):!0}function Nr(e){return!!e.changedTouches}function ia(e=window){"NodeList"in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach)}function nn(e,t){return!!(e.nodeName==="IFRAME"&&t.getMeta(e))}function on(e,t){return!!(e.nodeName==="LINK"&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&e.getAttribute("rel")==="stylesheet"&&t.getMeta(e))}function Pr(e){return e?e instanceof Xr&&"shadowRoot"in e?!!e.shadowRoot:!!k.shadowRoot(e):!1}class na{constructor(){A(this,"id",1),A(this,"styleIDMap",new WeakMap),A(this,"idStyleMap",new Map)}getId(t){var r;return(r=this.styleIDMap.get(t))!=null?r:-1}has(t){return this.styleIDMap.has(t)}add(t,r){if(this.has(t))return this.getId(t);let a;return r===void 0?a=this.id++:a=r,this.styleIDMap.set(t,a),this.idStyleMap.set(a,t),a}getStyle(t){return this.idStyleMap.get(t)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}function an(e){var t;let r=null;return"getRootNode"in e&&((t=k.getRootNode(e))==null?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&k.host(k.getRootNode(e))&&(r=k.host(k.getRootNode(e))),r}function oa(e){let t=e,r;for(;r=an(t);)t=r;return t}function aa(e){const t=e.ownerDocument;if(!t)return!1;const r=oa(e);return k.contains(t,r)}function ln(e){const t=e.ownerDocument;return t?k.contains(t,e)||aa(e):!1}var F=(e=>(e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom",e[e.Plugin=6]="Plugin",e))(F||{}),D=(e=>(e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration",e[e.Selection=14]="Selection",e[e.AdoptedStyleSheet=15]="AdoptedStyleSheet",e[e.CustomElement=16]="CustomElement",e))(D||{}),se=(e=>(e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd",e[e.TouchCancel=10]="TouchCancel",e))(se||{}),me=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(me||{}),De=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(De||{}),Ne=(e=>(e[e.Play=0]="Play",e[e.Pause=1]="Pause",e[e.Seeked=2]="Seeked",e[e.VolumeChange=3]="VolumeChange",e[e.RateChange=4]="RateChange",e))(Ne||{}),un=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))(un||{});function yi(e){return"__ln"in e}class la{constructor(){A(this,"length",0),A(this,"head",null),A(this,"tail",null)}get(t){if(t>=this.length)throw new Error("Position outside of list range");let r=this.head;for(let a=0;a<t;a++)r=(r==null?void 0:r.next)||null;return r}addNode(t){const r={value:t,previous:null,next:null};if(t.__ln=r,t.previousSibling&&yi(t.previousSibling)){const a=t.previousSibling.__ln.next;r.next=a,r.previous=t.previousSibling.__ln,t.previousSibling.__ln.next=r,a&&(a.previous=r)}else if(t.nextSibling&&yi(t.nextSibling)&&t.nextSibling.__ln.previous){const a=t.nextSibling.__ln.previous;r.previous=a,r.next=t.nextSibling.__ln,t.nextSibling.__ln.previous=r,a&&(a.next=r)}else this.head&&(this.head.previous=r),r.next=this.head,this.head=r;r.next===null&&(this.tail=r),this.length++}removeNode(t){const r=t.__ln;this.head&&(r.previous?(r.previous.next=r.next,r.next?r.next.previous=r.previous:this.tail=r.previous):(this.head=r.next,this.head?this.head.previous=null:this.tail=null),t.__ln&&delete t.__ln,this.length--)}}const wi=(e,t)=>`${e}@${t}`;class ua{constructor(){A(this,"frozen",!1),A(this,"locked",!1),A(this,"texts",[]),A(this,"attributes",[]),A(this,"attributeMap",new WeakMap),A(this,"removes",[]),A(this,"mapRemoves",[]),A(this,"movedMap",{}),A(this,"addedSet",new Set),A(this,"movedSet",new Set),A(this,"droppedSet",new Set),A(this,"removesSubTreeCache",new Set),A(this,"mutationCb"),A(this,"blockClass"),A(this,"blockSelector"),A(this,"maskTextClass"),A(this,"maskTextSelector"),A(this,"inlineStylesheet"),A(this,"maskInputOptions"),A(this,"maskTextFn"),A(this,"maskInputFn"),A(this,"keepIframeSrcFn"),A(this,"recordCanvas"),A(this,"inlineImages"),A(this,"slimDOMOptions"),A(this,"dataURLOptions"),A(this,"doc"),A(this,"mirror"),A(this,"iframeManager"),A(this,"stylesheetManager"),A(this,"shadowDomManager"),A(this,"canvasManager"),A(this,"processedNodeManager"),A(this,"unattachedDoc"),A(this,"processMutations",t=>{t.forEach(this.processMutation),this.emit()}),A(this,"emit",()=>{if(this.frozen||this.locked)return;const t=[],r=new Set,a=new la,s=o=>{let f=o,i=$e;for(;i===$e;)f=f&&f.nextSibling,i=f&&this.mirror.getId(f);return i},c=o=>{const f=k.parentNode(o);if(!f||!ln(o))return;let i=!1;if(o.nodeType===Node.TEXT_NODE){const d=f.tagName;if(d==="TEXTAREA")return;d==="STYLE"&&this.addedSet.has(f)&&(i=!0)}const h=Te(f)?this.mirror.getId(an(o)):this.mirror.getId(f),l=s(o);if(h===-1||l===-1)return a.addNode(o);const n=_e(o,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskTextClass:this.maskTextClass,maskTextSelector:this.maskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:d=>{nn(d,this.mirror)&&this.iframeManager.addIframe(d),on(d,this.mirror)&&this.stylesheetManager.trackLinkElement(d),Pr(o)&&this.shadowDomManager.addShadowRoot(k.shadowRoot(o),this.doc)},onIframeLoad:(d,u)=>{this.iframeManager.attachIframe(d,u),this.shadowDomManager.observeAttachShadow(d)},onStylesheetLoad:(d,u)=>{this.stylesheetManager.attachLinkElement(d,u)},cssCaptured:i});n&&(t.push({parentId:h,nextId:l,node:n}),r.add(n.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const o of this.movedSet)bi(this.removesSubTreeCache,o,this.mirror)&&!this.movedSet.has(k.parentNode(o))||c(o);for(const o of this.addedSet)!Si(this.droppedSet,o)&&!bi(this.removesSubTreeCache,o,this.mirror)||Si(this.movedSet,o)?c(o):this.droppedSet.add(o);let p=null;for(;a.length;){let o=null;if(p){const f=this.mirror.getId(k.parentNode(p.value)),i=s(p.value);f!==-1&&i!==-1&&(o=p)}if(!o){let f=a.tail;for(;f;){const i=f;if(f=f.previous,i){const h=this.mirror.getId(k.parentNode(i.value));if(s(i.value)===-1)continue;if(h!==-1){o=i;break}else{const n=i.value,d=k.parentNode(n);if(d&&d.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const u=k.host(d);if(this.mirror.getId(u)!==-1){o=i;break}}}}}}if(!o){for(;a.head;)a.removeNode(a.head.value);break}p=o.previous,a.removeNode(o.value),c(o.value)}const m={texts:this.texts.map(o=>{const f=o.node,i=k.parentNode(f);return i&&i.tagName==="TEXTAREA"&&this.genTextAreaValueMutation(i),{id:this.mirror.getId(f),value:o.value}}).filter(o=>!r.has(o.id)).filter(o=>this.mirror.has(o.id)),attributes:this.attributes.map(o=>{const{attributes:f}=o;if(typeof f.style=="string"){const i=JSON.stringify(o.styleDiff),h=JSON.stringify(o._unchangedStyles);i.length<f.style.length&&(i+h).split("var(").length===f.style.split("var(").length&&(f.style=o.styleDiff)}return{id:this.mirror.getId(o.node),attributes:f}}).filter(o=>!r.has(o.id)).filter(o=>this.mirror.has(o.id)),removes:this.removes,adds:t};!m.texts.length&&!m.attributes.length&&!m.removes.length&&!m.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(m))}),A(this,"genTextAreaValueMutation",t=>{let r=this.attributeMap.get(t);r||(r={node:t,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(r),this.attributeMap.set(t,r)),r.attributes.value=Array.from(k.childNodes(t),a=>k.textContent(a)||"").join("")}),A(this,"processMutation",t=>{if(!Er(t.target,this.mirror,this.slimDOMOptions))switch(t.type){case"characterData":{const r=k.textContent(t.target);!re(t.target,this.blockClass,this.blockSelector,!1)&&r!==t.oldValue&&this.texts.push({value:Ti(t.target,this.maskTextClass,this.maskTextSelector,!0)&&r?this.maskTextFn?this.maskTextFn(r,rn(t.target)):r.replace(/[\S]/g,"*"):r,node:t.target});break}case"attributes":{const r=t.target;let a=t.attributeName,s=t.target.getAttribute(a);if(a==="value"){const p=Lr(r);s=Dr({element:r,maskInputOptions:this.maskInputOptions,tagName:r.tagName,type:p,value:s,maskInputFn:this.maskInputFn})}if(re(t.target,this.blockClass,this.blockSelector,!1)||s===t.oldValue)return;let c=this.attributeMap.get(t.target);if(r.tagName==="IFRAME"&&a==="src"&&!this.keepIframeSrcFn(s))if(!r.contentDocument)a="rr_src";else return;if(c||(c={node:t.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(c),this.attributeMap.set(t.target,c)),a==="type"&&r.tagName==="INPUT"&&(t.oldValue||"").toLowerCase()==="password"&&r.setAttribute("data-rr-is-password","true"),!Li(r.tagName,a))if(c.attributes[a]=Di(this.doc,xe(r.tagName),xe(a),s),a==="style"){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(m){this.unattachedDoc=this.doc}const p=this.unattachedDoc.createElement("span");t.oldValue&&p.setAttribute("style",t.oldValue);for(const m of Array.from(r.style)){const o=r.style.getPropertyValue(m),f=r.style.getPropertyPriority(m);o!==p.style.getPropertyValue(m)||f!==p.style.getPropertyPriority(m)?f===""?c.styleDiff[m]=o:c.styleDiff[m]=[o,f]:c._unchangedStyles[m]=[o,f]}for(const m of Array.from(p.style))r.style.getPropertyValue(m)===""&&(c.styleDiff[m]=!1)}else a==="open"&&r.tagName==="DIALOG"&&(r.matches("dialog:modal")?c.attributes.rr_open_mode="modal":c.attributes.rr_open_mode="non-modal");break}case"childList":{if(re(t.target,this.blockClass,this.blockSelector,!0))return;if(t.target.tagName==="TEXTAREA"){this.genTextAreaValueMutation(t.target);return}t.addedNodes.forEach(r=>this.genAdds(r,t.target)),t.removedNodes.forEach(r=>{const a=this.mirror.getId(r),s=Te(t.target)?this.mirror.getId(k.host(t.target)):this.mirror.getId(t.target);re(t.target,this.blockClass,this.blockSelector,!1)||Er(r,this.mirror,this.slimDOMOptions)||!sa(r,this.mirror)||(this.addedSet.has(r)?(_r(this.addedSet,r),this.droppedSet.add(r)):this.addedSet.has(t.target)&&a===-1||sn(t.target,this.mirror)||(this.movedSet.has(r)&&this.movedMap[wi(a,s)]?_r(this.movedSet,r):(this.removes.push({parentId:s,id:a,isShadow:Te(t.target)&&Fe(t.target)?!0:void 0}),ca(r,this.removesSubTreeCache))),this.mapRemoves.push(r))});break}}}),A(this,"genAdds",(t,r)=>{if(!this.processedNodeManager.inOtherBuffer(t,this)&&!(this.addedSet.has(t)||this.movedSet.has(t))){if(this.mirror.hasNode(t)){if(Er(t,this.mirror,this.slimDOMOptions))return;this.movedSet.add(t);let a=null;r&&this.mirror.hasNode(r)&&(a=this.mirror.getId(r)),a&&a!==-1&&(this.movedMap[wi(this.mirror.getId(t),a)]=!0)}else this.addedSet.add(t),this.droppedSet.delete(t);re(t,this.blockClass,this.blockSelector,!1)||(k.childNodes(t).forEach(a=>this.genAdds(a)),Pr(t)&&k.childNodes(k.shadowRoot(t)).forEach(a=>{this.processedNodeManager.add(a,this),this.genAdds(a,t)}))}})}init(t){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(r=>{this[r]=t[r]})}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}}function _r(e,t){e.delete(t),k.childNodes(t).forEach(r=>_r(e,r))}function ca(e,t){const r=[e];for(;r.length;){const a=r.pop();t.has(a)||(t.add(a),k.childNodes(a).forEach(s=>r.push(s)))}}function bi(e,t,r){return e.size===0?!1:ha(e,t)}function ha(e,t,r){const a=k.parentNode(t);return a?e.has(a):!1}function Si(e,t){return e.size===0?!1:cn(e,t)}function cn(e,t){const r=k.parentNode(t);return r?e.has(r)?!0:cn(e,r):!1}let Ue;function fa(e){Ue=e}function pa(){Ue=void 0}const T=e=>Ue?(...r)=>{try{return e(...r)}catch(a){if(Ue&&Ue(a)===!0)return;throw a}}:e,Ce=[];function qe(e){try{if("composedPath"in e){const t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0]}catch(t){}return e&&e.target}function hn(e,t){const r=new ua;Ce.push(r),r.init(e);const a=new(Ki())(T(r.processMutations.bind(r)));return a.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),a}function da({mousemoveCb:e,sampling:t,doc:r,mirror:a}){if(t.mousemove===!1)return()=>{};const s=typeof t.mousemove=="number"?t.mousemove:50,c=typeof t.mousemoveCallback=="number"?t.mousemoveCallback:500;let p=[],m;const o=ze(T(h=>{const l=Date.now()-m;e(p.map(n=>(n.timeOffset-=l,n)),h),p=[],m=null}),c),f=T(ze(T(h=>{const l=qe(h),{clientX:n,clientY:d}=Nr(h)?h.changedTouches[0]:h;m||(m=nt()),p.push({x:n,y:d,id:a.getId(l),timeOffset:nt()-m}),o(typeof DragEvent!="undefined"&&h instanceof DragEvent?D.Drag:h instanceof MouseEvent?D.MouseMove:D.TouchMove)}),s,{trailing:!1})),i=[te("mousemove",f,r),te("touchmove",f,r),te("drag",f,r)];return T(()=>{i.forEach(h=>h())})}function ma({mouseInteractionCb:e,doc:t,mirror:r,blockClass:a,blockSelector:s,sampling:c}){if(c.mouseInteraction===!1)return()=>{};const p=c.mouseInteraction===!0||c.mouseInteraction===void 0?{}:c.mouseInteraction,m=[];let o=null;const f=i=>h=>{const l=qe(h);if(re(l,a,s,!0))return;let n=null,d=i;if("pointerType"in h){switch(h.pointerType){case"mouse":n=me.Mouse;break;case"touch":n=me.Touch;break;case"pen":n=me.Pen;break}n===me.Touch?se[i]===se.MouseDown?d="TouchStart":se[i]===se.MouseUp&&(d="TouchEnd"):me.Pen}else Nr(h)&&(n=me.Touch);n!==null?(o=n,(d.startsWith("Touch")&&n===me.Touch||d.startsWith("Mouse")&&n===me.Mouse)&&(n=null)):se[i]===se.Click&&(n=o,o=null);const u=Nr(h)?h.changedTouches[0]:h;if(!u)return;const g=r.getId(l),{clientX:v,clientY:S}=u;T(e)(L({type:se[d],id:g,x:v,y:S},n!==null&&{pointerType:n}))};return Object.keys(se).filter(i=>Number.isNaN(Number(i))&&!i.endsWith("_Departed")&&p[i]!==!1).forEach(i=>{let h=xe(i);const l=f(i);if(window.PointerEvent)switch(se[i]){case se.MouseDown:case se.MouseUp:h=h.replace("mouse","pointer");break;case se.TouchStart:case se.TouchEnd:return}m.push(te(h,l,t))}),T(()=>{m.forEach(i=>i())})}function fn({scrollCb:e,doc:t,mirror:r,blockClass:a,blockSelector:s,sampling:c}){const p=T(ze(T(m=>{const o=qe(m);if(!o||re(o,a,s,!0))return;const f=r.getId(o);if(o===t&&t.defaultView){const i=Zi(t.defaultView);e({id:f,x:i.left,y:i.top})}else e({id:f,x:o.scrollLeft,y:o.scrollTop})}),c.scroll||100));return te("scroll",p,t)}function ga({viewportResizeCb:e},{win:t}){let r=-1,a=-1;const s=T(ze(T(()=>{const c=en(),p=tn();(r!==c||a!==p)&&(e({width:Number(p),height:Number(c)}),r=c,a=p)}),200));return te("resize",s,t)}const ya=["INPUT","TEXTAREA","SELECT"],vi=new WeakMap;function wa({inputCb:e,doc:t,mirror:r,blockClass:a,blockSelector:s,ignoreClass:c,ignoreSelector:p,maskInputOptions:m,maskInputFn:o,sampling:f,userTriggeredOnInput:i}){function h(S){let b=qe(S);const x=S.isTrusted,y=b&&b.tagName;if(b&&y==="OPTION"&&(b=k.parentElement(b)),!b||!y||ya.indexOf(y)<0||re(b,a,s,!0)||b.classList.contains(c)||p&&b.matches(p))return;let w=b.value,C=!1;const O=Lr(b)||"";O==="radio"||O==="checkbox"?C=b.checked:(m[y.toLowerCase()]||m[O])&&(w=Dr({element:b,maskInputOptions:m,tagName:y,type:O,value:w,maskInputFn:o})),l(b,i?{text:w,isChecked:C,userTriggered:x}:{text:w,isChecked:C});const I=b.name;O==="radio"&&I&&C&&t.querySelectorAll(`input[type="radio"][name="${I}"]`).forEach(M=>{if(M!==b){const _=M.value;l(M,i?{text:_,isChecked:!C,userTriggered:!1}:{text:_,isChecked:!C})}})}function l(S,b){const x=vi.get(S);if(!x||x.text!==b.text||x.isChecked!==b.isChecked){vi.set(S,b);const y=r.getId(S);T(e)(oe(L({},b),{id:y}))}}const d=(f.input==="last"?["change"]:["input","change"]).map(S=>te(S,T(h),t)),u=t.defaultView;if(!u)return()=>{d.forEach(S=>S())};const g=u.Object.getOwnPropertyDescriptor(u.HTMLInputElement.prototype,"value"),v=[[u.HTMLInputElement.prototype,"value"],[u.HTMLInputElement.prototype,"checked"],[u.HTMLSelectElement.prototype,"value"],[u.HTMLTextAreaElement.prototype,"value"],[u.HTMLSelectElement.prototype,"selectedIndex"],[u.HTMLOptionElement.prototype,"selected"]];return g&&g.set&&d.push(...v.map(S=>wt(S[0],S[1],{set(){T(h)({target:this,isTrusted:!1})}},!1,u))),T(()=>{d.forEach(S=>S())})}function ot(e){const t=[];function r(a,s){if(Ke("CSSGroupingRule")&&a.parentRule instanceof CSSGroupingRule||Ke("CSSMediaRule")&&a.parentRule instanceof CSSMediaRule||Ke("CSSSupportsRule")&&a.parentRule instanceof CSSSupportsRule||Ke("CSSConditionRule")&&a.parentRule instanceof CSSConditionRule){const p=Array.from(a.parentRule.cssRules).indexOf(a);s.unshift(p)}else if(a.parentStyleSheet){const p=Array.from(a.parentStyleSheet.cssRules).indexOf(a);s.unshift(p)}return s}return r(e,t)}function we(e,t,r){let a,s;return e?(e.ownerNode?a=t.getId(e.ownerNode):s=r.getId(e),{styleId:s,id:a}):{}}function ba({styleSheetRuleCb:e,mirror:t,stylesheetManager:r},{win:a}){if(!a.CSSStyleSheet||!a.CSSStyleSheet.prototype)return()=>{};const s=a.CSSStyleSheet.prototype.insertRule;a.CSSStyleSheet.prototype.insertRule=new Proxy(s,{apply:T((i,h,l)=>{const[n,d]=l,{id:u,styleId:g}=we(h,t,r.styleMirror);return(u&&u!==-1||g&&g!==-1)&&e({id:u,styleId:g,adds:[{rule:n,index:d}]}),i.apply(h,l)})}),a.CSSStyleSheet.prototype.addRule=function(i,h,l=this.cssRules.length){const n=`${i} { ${h} }`;return a.CSSStyleSheet.prototype.insertRule.apply(this,[n,l])};const c=a.CSSStyleSheet.prototype.deleteRule;a.CSSStyleSheet.prototype.deleteRule=new Proxy(c,{apply:T((i,h,l)=>{const[n]=l,{id:d,styleId:u}=we(h,t,r.styleMirror);return(d&&d!==-1||u&&u!==-1)&&e({id:d,styleId:u,removes:[{index:n}]}),i.apply(h,l)})}),a.CSSStyleSheet.prototype.removeRule=function(i){return a.CSSStyleSheet.prototype.deleteRule.apply(this,[i])};let p;a.CSSStyleSheet.prototype.replace&&(p=a.CSSStyleSheet.prototype.replace,a.CSSStyleSheet.prototype.replace=new Proxy(p,{apply:T((i,h,l)=>{const[n]=l,{id:d,styleId:u}=we(h,t,r.styleMirror);return(d&&d!==-1||u&&u!==-1)&&e({id:d,styleId:u,replace:n}),i.apply(h,l)})}));let m;a.CSSStyleSheet.prototype.replaceSync&&(m=a.CSSStyleSheet.prototype.replaceSync,a.CSSStyleSheet.prototype.replaceSync=new Proxy(m,{apply:T((i,h,l)=>{const[n]=l,{id:d,styleId:u}=we(h,t,r.styleMirror);return(d&&d!==-1||u&&u!==-1)&&e({id:d,styleId:u,replaceSync:n}),i.apply(h,l)})}));const o={};Ze("CSSGroupingRule")?o.CSSGroupingRule=a.CSSGroupingRule:(Ze("CSSMediaRule")&&(o.CSSMediaRule=a.CSSMediaRule),Ze("CSSConditionRule")&&(o.CSSConditionRule=a.CSSConditionRule),Ze("CSSSupportsRule")&&(o.CSSSupportsRule=a.CSSSupportsRule));const f={};return Object.entries(o).forEach(([i,h])=>{f[i]={insertRule:h.prototype.insertRule,deleteRule:h.prototype.deleteRule},h.prototype.insertRule=new Proxy(f[i].insertRule,{apply:T((l,n,d)=>{const[u,g]=d,{id:v,styleId:S}=we(n.parentStyleSheet,t,r.styleMirror);return(v&&v!==-1||S&&S!==-1)&&e({id:v,styleId:S,adds:[{rule:u,index:[...ot(n),g||0]}]}),l.apply(n,d)})}),h.prototype.deleteRule=new Proxy(f[i].deleteRule,{apply:T((l,n,d)=>{const[u]=d,{id:g,styleId:v}=we(n.parentStyleSheet,t,r.styleMirror);return(g&&g!==-1||v&&v!==-1)&&e({id:g,styleId:v,removes:[{index:[...ot(n),u]}]}),l.apply(n,d)})})}),T(()=>{a.CSSStyleSheet.prototype.insertRule=s,a.CSSStyleSheet.prototype.deleteRule=c,p&&(a.CSSStyleSheet.prototype.replace=p),m&&(a.CSSStyleSheet.prototype.replaceSync=m),Object.entries(o).forEach(([i,h])=>{h.prototype.insertRule=f[i].insertRule,h.prototype.deleteRule=f[i].deleteRule})})}function pn({mirror:e,stylesheetManager:t},r){var a,s,c;let p=null;r.nodeName==="#document"?p=e.getId(r):p=e.getId(k.host(r));const m=r.nodeName==="#document"?(a=r.defaultView)==null?void 0:a.Document:(c=(s=r.ownerDocument)==null?void 0:s.defaultView)==null?void 0:c.ShadowRoot,o=m!=null&&m.prototype?Object.getOwnPropertyDescriptor(m==null?void 0:m.prototype,"adoptedStyleSheets"):void 0;return p===null||p===-1||!m||!o?()=>{}:(Object.defineProperty(r,"adoptedStyleSheets",{configurable:o.configurable,enumerable:o.enumerable,get(){var f;return(f=o.get)==null?void 0:f.call(this)},set(f){var i;const h=(i=o.set)==null?void 0:i.call(this,f);if(p!==null&&p!==-1)try{t.adoptStyleSheets(f,p)}catch(l){}return h}}),T(()=>{Object.defineProperty(r,"adoptedStyleSheets",{configurable:o.configurable,enumerable:o.enumerable,get:o.get,set:o.set})}))}function Sa({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:r,stylesheetManager:a},{win:s}){const c=s.CSSStyleDeclaration.prototype.setProperty;s.CSSStyleDeclaration.prototype.setProperty=new Proxy(c,{apply:T((m,o,f)=>{var i;const[h,l,n]=f;if(r.has(h))return c.apply(o,[h,l,n]);const{id:d,styleId:u}=we((i=o.parentRule)==null?void 0:i.parentStyleSheet,t,a.styleMirror);return(d&&d!==-1||u&&u!==-1)&&e({id:d,styleId:u,set:{property:h,value:l,priority:n},index:ot(o.parentRule)}),m.apply(o,f)})});const p=s.CSSStyleDeclaration.prototype.removeProperty;return s.CSSStyleDeclaration.prototype.removeProperty=new Proxy(p,{apply:T((m,o,f)=>{var i;const[h]=f;if(r.has(h))return p.apply(o,[h]);const{id:l,styleId:n}=we((i=o.parentRule)==null?void 0:i.parentStyleSheet,t,a.styleMirror);return(l&&l!==-1||n&&n!==-1)&&e({id:l,styleId:n,remove:{property:h},index:ot(o.parentRule)}),m.apply(o,f)})}),T(()=>{s.CSSStyleDeclaration.prototype.setProperty=c,s.CSSStyleDeclaration.prototype.removeProperty=p})}function va({mediaInteractionCb:e,blockClass:t,blockSelector:r,mirror:a,sampling:s,doc:c}){const p=T(o=>ze(T(f=>{const i=qe(f);if(!i||re(i,t,r,!0))return;const{currentTime:h,volume:l,muted:n,playbackRate:d,loop:u}=i;e({type:o,id:a.getId(i),currentTime:h,volume:l,muted:n,playbackRate:d,loop:u})}),s.media||500)),m=[te("play",p(Ne.Play),c),te("pause",p(Ne.Pause),c),te("seeked",p(Ne.Seeked),c),te("volumechange",p(Ne.VolumeChange),c),te("ratechange",p(Ne.RateChange),c)];return T(()=>{m.forEach(o=>o())})}function Ca({fontCb:e,doc:t}){const r=t.defaultView;if(!r)return()=>{};const a=[],s=new WeakMap,c=r.FontFace;r.FontFace=function(o,f,i){const h=new c(o,f,i);return s.set(h,{family:o,buffer:typeof f!="string",descriptors:i,fontSource:typeof f=="string"?f:JSON.stringify(Array.from(new Uint8Array(f)))}),h};const p=Me(t.fonts,"add",function(m){return function(o){return setTimeout(T(()=>{const f=s.get(o);f&&(e(f),s.delete(o))}),0),m.apply(this,[o])}});return a.push(()=>{r.FontFace=c}),a.push(p),T(()=>{a.forEach(m=>m())})}function xa(e){const{doc:t,mirror:r,blockClass:a,blockSelector:s,selectionCb:c}=e;let p=!0;const m=T(()=>{const o=t.getSelection();if(!o||p&&(o!=null&&o.isCollapsed))return;p=o.isCollapsed||!1;const f=[],i=o.rangeCount||0;for(let h=0;h<i;h++){const l=o.getRangeAt(h),{startContainer:n,startOffset:d,endContainer:u,endOffset:g}=l;re(n,a,s,!0)||re(u,a,s,!0)||f.push({start:r.getId(n),startOffset:d,end:r.getId(u),endOffset:g})}c({ranges:f})});return m(),te("selectionchange",m)}function Ra({doc:e,customElementCb:t}){const r=e.defaultView;return!r||!r.customElements?()=>{}:Me(r.customElements,"define",function(s){return function(c,p,m){try{t({define:{name:c}})}catch(o){console.warn(`Custom element callback failed for ${c}`)}return s.apply(this,[c,p,m])}})}function Oa(e,t){const{mutationCb:r,mousemoveCb:a,mouseInteractionCb:s,scrollCb:c,viewportResizeCb:p,inputCb:m,mediaInteractionCb:o,styleSheetRuleCb:f,styleDeclarationCb:i,canvasMutationCb:h,fontCb:l,selectionCb:n,customElementCb:d}=e;e.mutationCb=(...u)=>{t.mutation&&t.mutation(...u),r(...u)},e.mousemoveCb=(...u)=>{t.mousemove&&t.mousemove(...u),a(...u)},e.mouseInteractionCb=(...u)=>{t.mouseInteraction&&t.mouseInteraction(...u),s(...u)},e.scrollCb=(...u)=>{t.scroll&&t.scroll(...u),c(...u)},e.viewportResizeCb=(...u)=>{t.viewportResize&&t.viewportResize(...u),p(...u)},e.inputCb=(...u)=>{t.input&&t.input(...u),m(...u)},e.mediaInteractionCb=(...u)=>{t.mediaInteaction&&t.mediaInteaction(...u),o(...u)},e.styleSheetRuleCb=(...u)=>{t.styleSheetRule&&t.styleSheetRule(...u),f(...u)},e.styleDeclarationCb=(...u)=>{t.styleDeclaration&&t.styleDeclaration(...u),i(...u)},e.canvasMutationCb=(...u)=>{t.canvasMutation&&t.canvasMutation(...u),h(...u)},e.fontCb=(...u)=>{t.font&&t.font(...u),l(...u)},e.selectionCb=(...u)=>{t.selection&&t.selection(...u),n(...u)},e.customElementCb=(...u)=>{t.customElement&&t.customElement(...u),d(...u)}}function Ma(e,t={}){const r=e.doc.defaultView;if(!r)return()=>{};Oa(e,t);let a;e.recordDOM&&(a=hn(e,e.doc));const s=da(e),c=ma(e),p=fn(e),m=ga(e,{win:r}),o=wa(e),f=va(e);let i=()=>{},h=()=>{},l=()=>{},n=()=>{};e.recordDOM&&(i=ba(e,{win:r}),h=pn(e,e.doc),l=Sa(e,{win:r}),e.collectFonts&&(n=Ca(e)));const d=xa(e),u=Ra(e),g=[];for(const v of e.plugins)g.push(v.observer(v.callback,r,v.options));return T(()=>{Ce.forEach(v=>v.reset()),a==null||a.disconnect(),s(),c(),p(),m(),o(),f(),i(),h(),l(),n(),d(),u(),g.forEach(v=>v())})}function Ke(e){return typeof window[e]!="undefined"}function Ze(e){return!!(typeof window[e]!="undefined"&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class Ci{constructor(t){A(this,"iframeIdToRemoteIdMap",new WeakMap),A(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=t}getId(t,r,a,s){const c=a||this.getIdToRemoteIdMap(t),p=s||this.getRemoteIdToIdMap(t);let m=c.get(r);return m||(m=this.generateIdFn(),c.set(r,m),p.set(m,r)),m}getIds(t,r){const a=this.getIdToRemoteIdMap(t),s=this.getRemoteIdToIdMap(t);return r.map(c=>this.getId(t,c,a,s))}getRemoteId(t,r,a){const s=a||this.getRemoteIdToIdMap(t);if(typeof r!="number")return r;const c=s.get(r);return c||-1}getRemoteIds(t,r){const a=this.getRemoteIdToIdMap(t);return r.map(s=>this.getRemoteId(t,s,a))}reset(t){if(!t){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(t),this.iframeRemoteIdToIdMap.delete(t)}getIdToRemoteIdMap(t){let r=this.iframeIdToRemoteIdMap.get(t);return r||(r=new Map,this.iframeIdToRemoteIdMap.set(t,r)),r}getRemoteIdToIdMap(t){let r=this.iframeRemoteIdToIdMap.get(t);return r||(r=new Map,this.iframeRemoteIdToIdMap.set(t,r)),r}}class Ea{constructor(t){A(this,"iframes",new WeakMap),A(this,"crossOriginIframeMap",new WeakMap),A(this,"crossOriginIframeMirror",new Ci(ki)),A(this,"crossOriginIframeStyleMirror"),A(this,"crossOriginIframeRootIdMap",new WeakMap),A(this,"mirror"),A(this,"mutationCb"),A(this,"wrappedEmit"),A(this,"loadListener"),A(this,"stylesheetManager"),A(this,"recordCrossOriginIframes"),this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new Ci(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=t.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(t){this.iframes.set(t,!0),t.contentWindow&&this.crossOriginIframeMap.set(t.contentWindow,t)}addLoadListener(t){this.loadListener=t}attachIframe(t,r){var a,s;this.mutationCb({adds:[{parentId:this.mirror.getId(t),nextId:null,node:r}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&((a=t.contentWindow)==null||a.addEventListener("message",this.handleMessage.bind(this))),(s=this.loadListener)==null||s.call(this,t),t.contentDocument&&t.contentDocument.adoptedStyleSheets&&t.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(t.contentDocument.adoptedStyleSheets,this.mirror.getId(t.contentDocument))}handleMessage(t){const r=t;if(r.data.type!=="rrweb"||r.origin!==r.data.origin||!t.source)return;const s=this.crossOriginIframeMap.get(t.source);if(!s)return;const c=this.transformCrossOriginEvent(s,r.data.event);c&&this.wrappedEmit(c,r.data.isCheckout)}transformCrossOriginEvent(t,r){var a;switch(r.type){case F.FullSnapshot:{this.crossOriginIframeMirror.reset(t),this.crossOriginIframeStyleMirror.reset(t),this.replaceIdOnNode(r.data.node,t);const s=r.data.node.id;return this.crossOriginIframeRootIdMap.set(t,s),this.patchRootIdOnNode(r.data.node,s),{timestamp:r.timestamp,type:F.IncrementalSnapshot,data:{source:D.Mutation,adds:[{parentId:this.mirror.getId(t),nextId:null,node:r.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case F.Meta:case F.Load:case F.DomContentLoaded:return!1;case F.Plugin:return r;case F.Custom:return this.replaceIds(r.data.payload,t,["id","parentId","previousId","nextId"]),r;case F.IncrementalSnapshot:switch(r.data.source){case D.Mutation:return r.data.adds.forEach(s=>{this.replaceIds(s,t,["parentId","nextId","previousId"]),this.replaceIdOnNode(s.node,t);const c=this.crossOriginIframeRootIdMap.get(t);c&&this.patchRootIdOnNode(s.node,c)}),r.data.removes.forEach(s=>{this.replaceIds(s,t,["parentId","id"])}),r.data.attributes.forEach(s=>{this.replaceIds(s,t,["id"])}),r.data.texts.forEach(s=>{this.replaceIds(s,t,["id"])}),r;case D.Drag:case D.TouchMove:case D.MouseMove:return r.data.positions.forEach(s=>{this.replaceIds(s,t,["id"])}),r;case D.ViewportResize:return!1;case D.MediaInteraction:case D.MouseInteraction:case D.Scroll:case D.CanvasMutation:case D.Input:return this.replaceIds(r.data,t,["id"]),r;case D.StyleSheetRule:case D.StyleDeclaration:return this.replaceIds(r.data,t,["id"]),this.replaceStyleIds(r.data,t,["styleId"]),r;case D.Font:return r;case D.Selection:return r.data.ranges.forEach(s=>{this.replaceIds(s,t,["start","end"])}),r;case D.AdoptedStyleSheet:return this.replaceIds(r.data,t,["id"]),this.replaceStyleIds(r.data,t,["styleIds"]),(a=r.data.styles)==null||a.forEach(s=>{this.replaceStyleIds(s,t,["styleId"])}),r}}return!1}replace(t,r,a,s){for(const c of s)!Array.isArray(r[c])&&typeof r[c]!="number"||(Array.isArray(r[c])?r[c]=t.getIds(a,r[c]):r[c]=t.getId(a,r[c]));return r}replaceIds(t,r,a){return this.replace(this.crossOriginIframeMirror,t,r,a)}replaceStyleIds(t,r,a){return this.replace(this.crossOriginIframeStyleMirror,t,r,a)}replaceIdOnNode(t,r){this.replaceIds(t,r,["id","rootId"]),"childNodes"in t&&t.childNodes.forEach(a=>{this.replaceIdOnNode(a,r)})}patchRootIdOnNode(t,r){t.type!==un.Document&&!t.rootId&&(t.rootId=r),"childNodes"in t&&t.childNodes.forEach(a=>{this.patchRootIdOnNode(a,r)})}}class Ia{constructor(t){A(this,"shadowDoms",new WeakSet),A(this,"mutationCb"),A(this,"scrollCb"),A(this,"bypassOptions"),A(this,"mirror"),A(this,"restoreHandlers",[]),this.mutationCb=t.mutationCb,this.scrollCb=t.scrollCb,this.bypassOptions=t.bypassOptions,this.mirror=t.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(t,r){if(!Fe(t)||this.shadowDoms.has(t))return;this.shadowDoms.add(t);const a=hn(oe(L({},this.bypassOptions),{doc:r,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),t);this.restoreHandlers.push(()=>a.disconnect()),this.restoreHandlers.push(fn(oe(L({},this.bypassOptions),{scrollCb:this.scrollCb,doc:t,mirror:this.mirror}))),setTimeout(()=>{t.adoptedStyleSheets&&t.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(t.adoptedStyleSheets,this.mirror.getId(k.host(t))),this.restoreHandlers.push(pn({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},t))},0)}observeAttachShadow(t){!t.contentWindow||!t.contentDocument||this.patchAttachShadow(t.contentWindow.Element,t.contentDocument)}patchAttachShadow(t,r){const a=this;this.restoreHandlers.push(Me(t.prototype,"attachShadow",function(s){return function(c){const p=s.call(this,c),m=k.shadowRoot(this);return m&&ln(this)&&a.addShadowRoot(m,r),p}}))}reset(){this.restoreHandlers.forEach(t=>{try{t()}catch(r){}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}var ke="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Aa=typeof Uint8Array=="undefined"?[]:new Uint8Array(256);for(var et=0;et<ke.length;et++)Aa[ke.charCodeAt(et)]=et;var Na=function(e){var t=new Uint8Array(e),r,a=t.length,s="";for(r=0;r<a;r+=3)s+=ke[t[r]>>2],s+=ke[(t[r]&3)<<4|t[r+1]>>4],s+=ke[(t[r+1]&15)<<2|t[r+2]>>6],s+=ke[t[r+2]&63];return a%3===2?s=s.substring(0,s.length-1)+"=":a%3===1&&(s=s.substring(0,s.length-2)+"=="),s};const xi=new Map;function Pa(e,t){let r=xi.get(e);return r||(r=new Map,xi.set(e,r)),r.has(t)||r.set(t,[]),r.get(t)}const dn=(e,t,r)=>{if(!e||!(gn(e,t)||typeof e=="object"))return;const a=e.constructor.name,s=Pa(r,a);let c=s.indexOf(e);return c===-1&&(c=s.length,s.push(e)),c};function tt(e,t,r){if(e instanceof Array)return e.map(a=>tt(a,t,r));if(e===null)return e;if(e instanceof Float32Array||e instanceof Float64Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Uint8Array||e instanceof Uint16Array||e instanceof Int16Array||e instanceof Int8Array||e instanceof Uint8ClampedArray)return{rr_type:e.constructor.name,args:[Object.values(e)]};if(e instanceof ArrayBuffer){const a=e.constructor.name,s=Na(e);return{rr_type:a,base64:s}}else{if(e instanceof DataView)return{rr_type:e.constructor.name,args:[tt(e.buffer,t,r),e.byteOffset,e.byteLength]};if(e instanceof HTMLImageElement){const a=e.constructor.name,{src:s}=e;return{rr_type:a,src:s}}else if(e instanceof HTMLCanvasElement){const a="HTMLImageElement",s=e.toDataURL();return{rr_type:a,src:s}}else{if(e instanceof ImageData)return{rr_type:e.constructor.name,args:[tt(e.data,t,r),e.width,e.height]};if(gn(e,t)||typeof e=="object"){const a=e.constructor.name,s=dn(e,t,r);return{rr_type:a,index:s}}}}return e}const mn=(e,t,r)=>e.map(a=>tt(a,t,r)),gn=(e,t)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(s=>typeof t[s]=="function").find(s=>e instanceof t[s]);function _a(e,t,r,a){const s=[],c=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype);for(const p of c)try{if(typeof t.CanvasRenderingContext2D.prototype[p]!="function")continue;const m=Me(t.CanvasRenderingContext2D.prototype,p,function(o){return function(...f){return re(this.canvas,r,a,!0)||setTimeout(()=>{const i=mn(f,t,this);e(this.canvas,{type:De["2D"],property:p,args:i})},0),o.apply(this,f)}});s.push(m)}catch(m){const o=wt(t.CanvasRenderingContext2D.prototype,p,{set(f){e(this.canvas,{type:De["2D"],property:p,args:[f],setter:!0})}});s.push(o)}return()=>{s.forEach(p=>p())}}function ka(e){return e==="experimental-webgl"?"webgl":e}function Ri(e,t,r,a){const s=[];try{const c=Me(e.HTMLCanvasElement.prototype,"getContext",function(p){return function(m,...o){if(!re(this,t,r,!0)){const f=ka(m);if("__context"in this||(this.__context=f),a&&["webgl","webgl2"].includes(f))if(o[0]&&typeof o[0]=="object"){const i=o[0];i.preserveDrawingBuffer||(i.preserveDrawingBuffer=!0)}else o.splice(0,1,{preserveDrawingBuffer:!0})}return p.apply(this,[m,...o])}});s.push(c)}catch(c){console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{s.forEach(c=>c())}}function Oi(e,t,r,a,s,c){const p=[],m=Object.getOwnPropertyNames(e);for(const o of m)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(o))try{if(typeof e[o]!="function")continue;const f=Me(e,o,function(i){return function(...h){const l=i.apply(this,h);if(dn(l,c,this),"tagName"in this.canvas&&!re(this.canvas,a,s,!0)){const n=mn(h,c,this),d={type:t,property:o,args:n};r(this.canvas,d)}return l}});p.push(f)}catch(f){const i=wt(e,o,{set(h){r(this.canvas,{type:t,property:o,args:[h],setter:!0})}});p.push(i)}return p}function Da(e,t,r,a){const s=[];return s.push(...Oi(t.WebGLRenderingContext.prototype,De.WebGL,e,r,a,t)),typeof t.WebGL2RenderingContext!="undefined"&&s.push(...Oi(t.WebGL2RenderingContext.prototype,De.WebGL2,e,r,a,t)),()=>{s.forEach(c=>c())}}const yn=`(function() {
|
|
67
|
+
"use strict";
|
|
68
|
+
var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
|
69
|
+
var lookup = typeof Uint8Array === "undefined" ? [] : new Uint8Array(256);
|
|
70
|
+
for (var i = 0; i < chars.length; i++) {
|
|
71
|
+
lookup[chars.charCodeAt(i)] = i;
|
|
72
|
+
}
|
|
73
|
+
var encode = function(arraybuffer) {
|
|
74
|
+
var bytes = new Uint8Array(arraybuffer), i2, len = bytes.length, base64 = "";
|
|
75
|
+
for (i2 = 0; i2 < len; i2 += 3) {
|
|
76
|
+
base64 += chars[bytes[i2] >> 2];
|
|
77
|
+
base64 += chars[(bytes[i2] & 3) << 4 | bytes[i2 + 1] >> 4];
|
|
78
|
+
base64 += chars[(bytes[i2 + 1] & 15) << 2 | bytes[i2 + 2] >> 6];
|
|
79
|
+
base64 += chars[bytes[i2 + 2] & 63];
|
|
80
|
+
}
|
|
81
|
+
if (len % 3 === 2) {
|
|
82
|
+
base64 = base64.substring(0, base64.length - 1) + "=";
|
|
83
|
+
} else if (len % 3 === 1) {
|
|
84
|
+
base64 = base64.substring(0, base64.length - 2) + "==";
|
|
85
|
+
}
|
|
86
|
+
return base64;
|
|
87
|
+
};
|
|
88
|
+
const lastBlobMap = /* @__PURE__ */ new Map();
|
|
89
|
+
const transparentBlobMap = /* @__PURE__ */ new Map();
|
|
90
|
+
async function getTransparentBlobFor(width, height, dataURLOptions) {
|
|
91
|
+
const id = \`\${width}-\${height}\`;
|
|
92
|
+
if ("OffscreenCanvas" in globalThis) {
|
|
93
|
+
if (transparentBlobMap.has(id)) return transparentBlobMap.get(id);
|
|
94
|
+
const offscreen = new OffscreenCanvas(width, height);
|
|
95
|
+
offscreen.getContext("2d");
|
|
96
|
+
const blob = await offscreen.convertToBlob(dataURLOptions);
|
|
97
|
+
const arrayBuffer = await blob.arrayBuffer();
|
|
98
|
+
const base64 = encode(arrayBuffer);
|
|
99
|
+
transparentBlobMap.set(id, base64);
|
|
100
|
+
return base64;
|
|
101
|
+
} else {
|
|
102
|
+
return "";
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
const worker = self;
|
|
106
|
+
worker.onmessage = async function(e) {
|
|
107
|
+
if ("OffscreenCanvas" in globalThis) {
|
|
108
|
+
const { id, bitmap, width, height, dataURLOptions } = e.data;
|
|
109
|
+
const transparentBase64 = getTransparentBlobFor(
|
|
110
|
+
width,
|
|
111
|
+
height,
|
|
112
|
+
dataURLOptions
|
|
113
|
+
);
|
|
114
|
+
const offscreen = new OffscreenCanvas(width, height);
|
|
115
|
+
const ctx = offscreen.getContext("2d");
|
|
116
|
+
ctx.drawImage(bitmap, 0, 0);
|
|
117
|
+
bitmap.close();
|
|
118
|
+
const blob = await offscreen.convertToBlob(dataURLOptions);
|
|
119
|
+
const type = blob.type;
|
|
120
|
+
const arrayBuffer = await blob.arrayBuffer();
|
|
121
|
+
const base64 = encode(arrayBuffer);
|
|
122
|
+
if (!lastBlobMap.has(id) && await transparentBase64 === base64) {
|
|
123
|
+
lastBlobMap.set(id, base64);
|
|
124
|
+
return worker.postMessage({ id });
|
|
125
|
+
}
|
|
126
|
+
if (lastBlobMap.get(id) === base64) return worker.postMessage({ id });
|
|
127
|
+
worker.postMessage({
|
|
128
|
+
id,
|
|
129
|
+
type,
|
|
130
|
+
base64,
|
|
131
|
+
width,
|
|
132
|
+
height
|
|
133
|
+
});
|
|
134
|
+
lastBlobMap.set(id, base64);
|
|
135
|
+
} else {
|
|
136
|
+
return worker.postMessage({ id: e.data.id });
|
|
137
|
+
}
|
|
138
|
+
};
|
|
139
|
+
})();
|
|
140
|
+
//# sourceMappingURL=image-bitmap-data-url-worker-IJpC7g_b.js.map
|
|
141
|
+
`,Mi=typeof self!="undefined"&&self.Blob&&new Blob([yn],{type:"text/javascript;charset=utf-8"});function La(e){let t;try{if(t=Mi&&(self.URL||self.webkitURL).createObjectURL(Mi),!t)throw"";const r=new Worker(t,{name:e==null?void 0:e.name});return r.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(t)}),r}catch(r){return new Worker("data:text/javascript;charset=utf-8,"+encodeURIComponent(yn),{name:e==null?void 0:e.name})}finally{t&&(self.URL||self.webkitURL).revokeObjectURL(t)}}class Ta{constructor(t){A(this,"pendingCanvasMutations",new Map),A(this,"rafStamps",{latestId:0,invokeId:null}),A(this,"mirror"),A(this,"mutationCb"),A(this,"resetObservers"),A(this,"frozen",!1),A(this,"locked",!1),A(this,"processMutation",(o,f)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(o)||this.pendingCanvasMutations.set(o,[]),this.pendingCanvasMutations.get(o).push(f)});const{sampling:r="all",win:a,blockClass:s,blockSelector:c,recordCanvas:p,dataURLOptions:m}=t;this.mutationCb=t.mutationCb,this.mirror=t.mirror,p&&r==="all"&&this.initCanvasMutationObserver(a,s,c),p&&typeof r=="number"&&this.initCanvasFPSObserver(r,a,s,c,{dataURLOptions:m})}reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}initCanvasFPSObserver(t,r,a,s,c){const p=Ri(r,a,s,!0),m=new Map,o=new La;o.onmessage=d=>{const{id:u}=d.data;if(m.set(u,!1),!("base64"in d.data))return;const{base64:g,type:v,width:S,height:b}=d.data;this.mutationCb({id:u,type:De["2D"],commands:[{property:"clearRect",args:[0,0,S,b]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:g}],type:v}]},0,0]}]})};const f=1e3/t;let i=0,h;const l=()=>{const d=[],u=g=>{g.querySelectorAll("canvas").forEach(v=>{re(v,a,s,!0)||d.push(v)}),g.querySelectorAll("*").forEach(v=>{v.shadowRoot&&u(v.shadowRoot)})};return u(r.document),d},n=d=>{if(i&&d-i<f){h=requestAnimationFrame(n);return}i=d,l().forEach(async u=>{var g;const v=this.mirror.getId(u);if(m.get(v)||u.width===0||u.height===0)return;if(m.set(v,!0),["webgl","webgl2"].includes(u.__context)){const y=u.getContext(u.__context);((g=y==null?void 0:y.getContextAttributes())==null?void 0:g.preserveDrawingBuffer)===!1&&y.clear(y.COLOR_BUFFER_BIT)}const S=u.clientWidth||u.width,b=u.clientHeight||u.height,x=await createImageBitmap(u,{resizeWidth:S,resizeHeight:b});o.postMessage({id:v,bitmap:x,width:S,height:b,dataURLOptions:c.dataURLOptions},[x])}),h=requestAnimationFrame(n)};h=requestAnimationFrame(n),this.resetObservers=()=>{p(),cancelAnimationFrame(h)}}initCanvasMutationObserver(t,r,a){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const s=Ri(t,r,a,!1),c=_a(this.processMutation.bind(this),t,r,a),p=Da(this.processMutation.bind(this),t,r,a);this.resetObservers=()=>{s(),c(),p()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){const t=r=>{this.rafStamps.latestId=r,requestAnimationFrame(t)};requestAnimationFrame(t)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((t,r)=>{const a=this.mirror.getId(r);this.flushPendingCanvasMutationFor(r,a)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(t,r){if(this.frozen||this.locked)return;const a=this.pendingCanvasMutations.get(t);if(!a||r===-1)return;const s=a.map(p=>{const f=p,{type:m}=f;return Ee(f,["type"])}),{type:c}=a[0];this.mutationCb({id:r,type:c,commands:s}),this.pendingCanvasMutations.delete(t)}}class Fa{constructor(t){A(this,"trackedLinkElements",new WeakSet),A(this,"mutationCb"),A(this,"adoptedStyleSheetCb"),A(this,"styleMirror",new na),this.mutationCb=t.mutationCb,this.adoptedStyleSheetCb=t.adoptedStyleSheetCb}attachLinkElement(t,r){"_cssText"in r.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:r.id,attributes:r.attributes}]}),this.trackLinkElement(t)}trackLinkElement(t){this.trackedLinkElements.has(t)||(this.trackedLinkElements.add(t),this.trackStylesheetInLinkElement(t))}adoptStyleSheets(t,r){if(t.length===0)return;const a={id:r,styleIds:[]},s=[];for(const c of t){let p;this.styleMirror.has(c)?p=this.styleMirror.getId(c):(p=this.styleMirror.add(c),s.push({styleId:p,rules:Array.from(c.rules||CSSRule,(m,o)=>({rule:Ni(m,c.href),index:o}))})),a.styleIds.push(p)}s.length>0&&(a.styles=s),this.adoptedStyleSheetCb(a)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(t){}}class Ua{constructor(){A(this,"nodeMap",new WeakMap),A(this,"active",!1)}inOtherBuffer(t,r){const a=this.nodeMap.get(t);return a&&Array.from(a).some(s=>s!==r)}add(t,r){this.active||(this.active=!0,requestAnimationFrame(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(t,(this.nodeMap.get(t)||new Set).add(r))}destroy(){}}let G,rt,Ir,at=!1;try{if(Array.from([1],e=>e*2)[0]!==2){const e=document.createElement("iframe");document.body.appendChild(e),Array.from=((rs=e.contentWindow)==null?void 0:rs.Array.from)||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}const ce=jn();function je(e={}){const{emit:t,checkoutEveryNms:r,checkoutEveryNth:a,blockClass:s="rr-block",blockSelector:c=null,ignoreClass:p="rr-ignore",ignoreSelector:m=null,maskTextClass:o="rr-mask",maskTextSelector:f=null,inlineStylesheet:i=!0,maskAllInputs:h,maskInputOptions:l,slimDOMOptions:n,maskInputFn:d,maskTextFn:u,hooks:g,packFn:v,sampling:S={},dataURLOptions:b={},mousemoveWait:x,recordDOM:y=!0,recordCanvas:w=!1,recordCrossOriginIframes:C=!1,recordAfter:O=e.recordAfter==="DOMContentLoaded"?e.recordAfter:"load",userTriggeredOnInput:I=!1,collectFonts:M=!1,inlineImages:_=!1,plugins:N,keepIframeSrcFn:R=()=>!1,ignoreCSSAttributes:le=new Set([]),errorHandler:ie}=e;fa(ie);const $=C?window.parent===window:!0;let U=!1;if(!$)try{window.parent.document&&(U=!1)}catch(P){U=!0}if($&&!t)throw new Error("emit function is required");if(!$&&!U)return()=>{};x!==void 0&&S.mousemove===void 0&&(S.mousemove=x),ce.reset();const J=h===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:l!==void 0?l:{password:!0},K=n===!0||n==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:n==="all",headMetaDescKeywords:n==="all",headTitleMutations:n==="all"}:n||{};ia();let Y,z=0;const ge=P=>{for(const Q of N||[])Q.eventProcessor&&(P=Q.eventProcessor(P));return v&&!U&&(P=v(P)),P};G=(P,Q)=>{var W;const H=P;if(H.timestamp=nt(),(W=Ce[0])!=null&&W.isFrozen()&&H.type!==F.FullSnapshot&&!(H.type===F.IncrementalSnapshot&&H.data.source===D.Mutation)&&Ce.forEach(de=>de.unfreeze()),$)t==null||t(ge(H),Q);else if(U){const de={type:"rrweb",event:ge(H),origin:window.location.origin,isCheckout:Q};window.parent.postMessage(de,"*")}if(H.type===F.FullSnapshot)Y=H,z=0;else if(H.type===F.IncrementalSnapshot){if(H.data.source===D.Mutation&&H.data.isAttachIframe)return;z++;const de=a&&z>=a,B=r&&H.timestamp-Y.timestamp>r;(de||B)&&rt(!0)}};const E=P=>{G({type:F.IncrementalSnapshot,data:L({source:D.Mutation},P)})},pe=P=>G({type:F.IncrementalSnapshot,data:L({source:D.Scroll},P)}),ne=P=>G({type:F.IncrementalSnapshot,data:L({source:D.CanvasMutation},P)}),Le=P=>G({type:F.IncrementalSnapshot,data:L({source:D.AdoptedStyleSheet},P)}),ee=new Fa({mutationCb:E,adoptedStyleSheetCb:Le}),ue=new Ea({mirror:ce,mutationCb:E,stylesheetManager:ee,recordCrossOriginIframes:C,wrappedEmit:G});for(const P of N||[])P.getMirror&&P.getMirror({nodeMirror:ce,crossOriginIframeMirror:ue.crossOriginIframeMirror,crossOriginIframeStyleMirror:ue.crossOriginIframeStyleMirror});const ve=new Ua;Ir=new Ta({recordCanvas:w,mutationCb:ne,win:window,blockClass:s,blockSelector:c,mirror:ce,sampling:S.canvas,dataURLOptions:b});const ye=new Ia({mutationCb:E,scrollCb:pe,bypassOptions:{blockClass:s,blockSelector:c,maskTextClass:o,maskTextSelector:f,inlineStylesheet:i,maskInputOptions:J,dataURLOptions:b,maskTextFn:u,maskInputFn:d,recordCanvas:w,inlineImages:_,sampling:S,slimDOMOptions:K,iframeManager:ue,stylesheetManager:ee,canvasManager:Ir,keepIframeSrcFn:R,processedNodeManager:ve},mirror:ce});rt=(P=!1)=>{if(!y)return;G({type:F.Meta,data:{href:window.location.href,width:tn(),height:en()}},P),ee.reset(),ye.init(),Ce.forEach(W=>W.lock());const Q=go(document,{mirror:ce,blockClass:s,blockSelector:c,maskTextClass:o,maskTextSelector:f,inlineStylesheet:i,maskAllInputs:J,maskTextFn:u,maskInputFn:d,slimDOM:K,dataURLOptions:b,recordCanvas:w,inlineImages:_,onSerialize:W=>{nn(W,ce)&&ue.addIframe(W),on(W,ce)&&ee.trackLinkElement(W),Pr(W)&&ye.addShadowRoot(k.shadowRoot(W),document)},onIframeLoad:(W,H)=>{ue.attachIframe(W,H),ye.observeAttachShadow(W)},onStylesheetLoad:(W,H)=>{ee.attachLinkElement(W,H)},keepIframeSrcFn:R});if(!Q)return console.warn("Failed to snapshot the document");G({type:F.FullSnapshot,data:{node:Q,initialOffset:Zi(window)}},P),Ce.forEach(W=>W.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&ee.adoptStyleSheets(document.adoptedStyleSheets,ce.getId(document))};try{const P=[],Q=H=>{var de;return T(Ma)({mutationCb:E,mousemoveCb:(B,bt)=>G({type:F.IncrementalSnapshot,data:{source:bt,positions:B}}),mouseInteractionCb:B=>G({type:F.IncrementalSnapshot,data:L({source:D.MouseInteraction},B)}),scrollCb:pe,viewportResizeCb:B=>G({type:F.IncrementalSnapshot,data:L({source:D.ViewportResize},B)}),inputCb:B=>G({type:F.IncrementalSnapshot,data:L({source:D.Input},B)}),mediaInteractionCb:B=>G({type:F.IncrementalSnapshot,data:L({source:D.MediaInteraction},B)}),styleSheetRuleCb:B=>G({type:F.IncrementalSnapshot,data:L({source:D.StyleSheetRule},B)}),styleDeclarationCb:B=>G({type:F.IncrementalSnapshot,data:L({source:D.StyleDeclaration},B)}),canvasMutationCb:ne,fontCb:B=>G({type:F.IncrementalSnapshot,data:L({source:D.Font},B)}),selectionCb:B=>{G({type:F.IncrementalSnapshot,data:L({source:D.Selection},B)})},customElementCb:B=>{G({type:F.IncrementalSnapshot,data:L({source:D.CustomElement},B)})},blockClass:s,ignoreClass:p,ignoreSelector:m,maskTextClass:o,maskTextSelector:f,maskInputOptions:J,inlineStylesheet:i,sampling:S,recordDOM:y,recordCanvas:w,inlineImages:_,userTriggeredOnInput:I,collectFonts:M,doc:H,maskInputFn:d,maskTextFn:u,keepIframeSrcFn:R,blockSelector:c,slimDOMOptions:K,dataURLOptions:b,mirror:ce,iframeManager:ue,stylesheetManager:ee,shadowDomManager:ye,processedNodeManager:ve,canvasManager:Ir,ignoreCSSAttributes:le,plugins:((de=N==null?void 0:N.filter(B=>B.observer))==null?void 0:de.map(B=>({observer:B.observer,options:B.options,callback:bt=>G({type:F.Plugin,data:{plugin:B.name,payload:bt}})})))||[]},g)};ue.addLoadListener(H=>{try{P.push(Q(H.contentDocument))}catch(de){console.warn(de)}});const W=()=>{rt(),P.push(Q(document)),at=!0};return document.readyState==="interactive"||document.readyState==="complete"?W():(P.push(te("DOMContentLoaded",()=>{G({type:F.DomContentLoaded,data:{}}),O==="DOMContentLoaded"&&W()})),P.push(te("load",()=>{G({type:F.Load,data:{}}),O==="load"&&W()},window))),()=>{P.forEach(H=>H()),ve.destroy(),at=!1,pa()}}catch(P){console.warn(P)}}je.addCustomEvent=(e,t)=>{if(!at)throw new Error("please add custom event after start recording");G({type:F.Custom,data:{tag:e,payload:t}})};je.freezePage=()=>{Ce.forEach(e=>e.freeze())};je.takeFullSnapshot=e=>{if(!at)throw new Error("please take full snapshot after start recording");rt(e)};je.mirror=ce;var Ei;(function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"})(Ei||(Ei={}));exports.record=je;
|
|
67
142
|
if (typeof module.exports == "object" && typeof exports == "object") {
|
|
68
143
|
var __cp = (to, from, except, desc) => {
|
|
69
144
|
if ((from && typeof from === "object") || typeof from === "function") {
|