tracebck-sdk 0.2.0 → 0.3.0
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/README.md +44 -4
- package/dist/index.cjs +22 -22
- package/dist/index.iife.js +22 -22
- package/dist/index.js +22 -22
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1,56 +1,56 @@
|
|
|
1
|
-
var Dr=Object.defineProperty;var ha=Object.getOwnPropertyDescriptor;var fa=Object.getOwnPropertyNames;var da=Object.prototype.hasOwnProperty;var pa=(s,e)=>{for(var t in e)Dr(s,t,{get:e[t],enumerable:!0})},ma=(s,e,t,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of fa(e))!da.call(s,i)&&i!==t&&Dr(s,i,{get:()=>e[i],enumerable:!(r=ha(e,i))||r.enumerable});return s};var ga=s=>ma(Dr({},"__esModule",{value:!0}),s);var Ff={};pa(Ff,{init:()=>Pf,startSession:()=>Lf,stopSession:()=>ua});module.exports=ga(Ff);var ya=Object.defineProperty,wa=(s,e,t)=>e in s?ya(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,w=(s,e,t)=>wa(s,typeof e!="symbol"?e+"":e,t),fi,ba=Object.defineProperty,Sa=(s,e,t)=>e in s?ba(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,di=(s,e,t)=>Sa(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||{}),pi={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},mi={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},vt={},va=()=>!!globalThis.Zone;function Ps(s){if(vt[s])return vt[s];let e=globalThis[s],t=e.prototype,r=s in pi?pi[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 mi?mi[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&&!va())return vt[s]=e.prototype,e.prototype;try{let l=document.createElement("iframe");document.body.appendChild(l);let a=l.contentWindow;if(!a)return e.prototype;let u=a[s].prototype;return document.body.removeChild(l),u?vt[s]=u:t}catch{return t}}var Tr={};function ge(s,e,t){var r;let i=`${s}.${String(t)}`;if(Tr[i])return Tr[i].call(e);let n=Ps(s),o=(r=Object.getOwnPropertyDescriptor(n,t))==null?void 0:r.get;return o?(Tr[i]=o,o.call(e)):e[t]}var _r={};function hn(s,e,t){let r=`${s}.${String(t)}`;if(_r[r])return _r[r].bind(e);let n=Ps(s)[t];return typeof n!="function"?e[t]:(_r[r]=n,n.bind(e))}function Ca(s){return ge("Node",s,"childNodes")}function Ia(s){return ge("Node",s,"parentNode")}function Ea(s){return ge("Node",s,"parentElement")}function xa(s){return ge("Node",s,"textContent")}function Ma(s,e){return hn("Node",s,"contains")(e)}function Na(s){return hn("Node",s,"getRootNode")()}function Ra(s){return!s||!("host"in s)?null:ge("ShadowRoot",s,"host")}function Aa(s){return s.styleSheets}function Oa(s){return!s||!("shadowRoot"in s)?null:ge("Element",s,"shadowRoot")}function Da(s,e){return ge("Element",s,"querySelector")(e)}function Ta(s,e){return ge("Element",s,"querySelectorAll")(e)}function _a(){return Ps("MutationObserver").constructor}var X={childNodes:Ca,parentNode:Ia,parentElement:Ea,textContent:xa,contains:Ma,getRootNode:Na,host:Ra,styleSheets:Aa,shadowRoot:Oa,querySelector:Da,querySelectorAll:Ta,mutationObserver:_a};function fn(s){return s.nodeType===s.ELEMENT_NODE}function qe(s){let e=s&&"host"in s&&"mode"in s&&X.host(s)||null;return!!(e&&"shadowRoot"in e&&X.shadowRoot(e)===s)}function Qe(s){return Object.prototype.toString.call(s)==="[object ShadowRoot]"}function ka(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 $a(s){let{cssText:e}=s;if(e.split('"').length<3)return e;let 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 Yr(s){try{let 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);let r=Array.from(e,i=>dn(i,t)).join("");return ka(r)}catch{return null}}function dn(s,e){if(La(s)){let t;try{t=Yr(s.styleSheet)||$a(s)}catch{t=s.cssText}return s.styleSheet.href?Jt(t,s.styleSheet.href):t}else{let t=s.cssText;return Fa(s)&&s.selectorText.includes(":")&&(t=Pa(t)),e?Jt(t,e):t}}function Pa(s){let e=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return s.replace(e,"$1\\$2")}function La(s){return"styleSheet"in s}function Fa(s){return"selectorText"in s}var Zt=class{constructor(){di(this,"idNodeMap",new Map),di(this,"nodeMetaMap",new WeakMap)}getId(e){var t;return e?((t=this.getMeta(e))==null?void 0:t.id)??-1:-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){let 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){let r=t.id;this.idNodeMap.set(r,e),this.nodeMetaMap.set(e,t)}replace(e,t){let r=this.getNode(e);if(r){let 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 Ua(){return new Zt}function Ls({element:s,maskInputOptions:e,tagName:t,type:r,value:i,maskInputFn:n}){let o=i||"",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()}var gi="__rrweb_original__";function Ba(s){let e=s.getContext("2d");if(!e)return!0;let t=50;for(let r=0;r<s.width;r+=t)for(let i=0;i<s.height;i+=t){let n=e.getImageData,o=gi in n?n[gi]: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 Fs(s){let e=s.type;return s.hasAttribute("data-rr-is-password")?"password":e?Ce(e):null}function pn(s,e){let t;try{t=new URL(s,e??window.location.href)}catch{return null}let r=/\.([0-9a-z]+)(?:$)/i,i=t.pathname.match(r);return i?.[1]??null}function Wa(s){let e="";return s.indexOf("//")>-1?e=s.split("/").slice(0,3).join("/"):e=s.split("/")[0],e=e.split("?")[0],e}var za=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,Va=/^(?:[a-z+]+:)?\/\//i,Ga=/^www\..*/i,Ha=/^(data:)([^,]*),(.*)/i;function Jt(s,e){return(s||"").replace(za,(t,r,i,n,o,l)=>{let a=i||o||l,u=r||n||"";if(!a)return t;if(Va.test(a)||Ga.test(a))return`url(${u}${a}${u})`;if(Ha.test(a))return`url(${u}${a}${u})`;if(a[0]==="/")return`url(${u}${Wa(e)+a}${u})`;let c=e.split("/"),h=a.split("/");c.pop();for(let p of h)p!=="."&&(p===".."?c.pop():c.push(p));return`url(${u}${c.join("/")}${u})`})}function kr(s){return s.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"")}function ja(s,e){let t=Array.from(e.childNodes),r=[];if(t.length>1&&s&&typeof s=="string"){let i=kr(s);for(let n=1;n<t.length;n++)if(t[n].textContent&&typeof t[n].textContent=="string"){let o=kr(t[n].textContent);for(let l=3;l<o.length;l++){let a=o.substring(0,l);if(i.split(a).length===2){let u=i.indexOf(a);for(let c=u;c<s.length;c++)if(kr(s.substring(0,c)).length===u){r.push(s.substring(0,c)),s=s.substring(c);break}break}}}}return r.push(s),r}function Ya(s,e){return ja(s,e).join("/* rr_split */")}var Xa=1,Za=new RegExp("[^a-z0-9-_:]"),tt=-2;function mn(){return Xa++}function Ja(s){if(s instanceof HTMLFormElement)return"form";let e=Ce(s.tagName);return Za.test(e)?"div":e}var Me,yi,Ka=/^[^ \t\n\r\u000c]+/,qa=/^[, \t\n\r\u000c]+/;function Qa(s,e){if(e.trim()==="")return e;let t=0;function r(n){let o,l=n.exec(e.substring(t));return l?(o=l[0],t+=o.length,o):""}let i=[];for(;r(qa),!(t>=e.length);){let n=r(Ka);if(n.slice(-1)===",")n=Ae(s,n.substring(0,n.length-1)),i.push(n);else{let o="";n=Ae(s,n);let l=!1;for(;;){let 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(", ")}var wi=new WeakMap;function Ae(s,e){return!e||e.trim()===""?e:Us(s,e)}function el(s){return!!(s.tagName==="svg"||s.ownerSVGElement)}function Us(s,e){let t=wi.get(s);if(t||(t=s.createElement("a"),wi.set(s,t)),!e)e="";else if(e.startsWith("blob:")||e.startsWith("data:"))return e;return t.setAttribute("href",e),t.href}function gn(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")?Ae(s,r):t==="srcset"?Qa(s,r):t==="style"?Jt(r,Us(s)):e==="object"&&t==="data"?Ae(s,r):r)}function yn(s,e,t){return(s==="video"||s==="audio")&&e==="autoplay"}function tl(s,e,t){try{if(typeof e=="string"){if(s.classList.contains(e))return!0}else for(let r=s.classList.length;r--;){let i=s.classList[r];if(e.test(i))return!0}if(t)return s.matches(t)}catch{}return!1}function Kt(s,e,t){if(!s)return!1;if(s.nodeType!==s.ELEMENT_NODE)return t?Kt(X.parentNode(s),e,t):!1;for(let r=s.classList.length;r--;){let i=s.classList[r];if(e.test(i))return!0}return t?Kt(X.parentNode(s),e,t):!1}function wn(s,e,t,r){let i;if(fn(s)){if(i=s,!X.childNodes(i).length)return!1}else{if(X.parentElement(s)===null)return!1;i=X.parentElement(s)}try{if(typeof e=="string"){if(r){if(i.closest(`.${e}`))return!0}else if(i.classList.contains(e))return!0}else if(Kt(i,e,r))return!0;if(t){if(r){if(i.closest(t))return!0}else if(i.matches(t))return!0}}catch{}return!1}function rl(s,e,t){let r=s.contentWindow;if(!r)return;let i=!1,n;try{n=r.document.readyState}catch{return}if(n!=="complete"){let l=setTimeout(()=>{i||(e(),i=!0)},t);s.addEventListener("load",()=>{clearTimeout(l),i=!0,e()});return}let 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 sl(s,e,t){let r=!1,i;try{i=s.sheet}catch{return}if(i)return;let n=setTimeout(()=>{r||(e(),r=!0)},t);s.addEventListener("load",()=>{clearTimeout(n),r=!0,e()})}function il(s,e){let{doc:t,mirror:r,blockClass:i,blockSelector:n,needsMask:o,inlineStylesheet:l,maskInputOptions:a={},maskTextFn:u,maskInputFn:c,dataURLOptions:h={},inlineImages:p,recordCanvas:m,keepIframeSrcFn:g,newlyAddedElement:d=!1,cssCaptured:f=!1}=e,b=nl(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 al(s,{doc:t,blockClass:i,blockSelector:n,inlineStylesheet:l,maskInputOptions:a,maskInputFn:c,dataURLOptions:h,inlineImages:p,recordCanvas:m,keepIframeSrcFn:g,newlyAddedElement:d,rootId:b});case s.TEXT_NODE:return ol(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:X.textContent(s)||"",rootId:b};default:return!1}}function nl(s,e){if(!e.hasNode(s))return;let t=e.getId(s);return t===1?void 0:t}function ol(s,e){let{needsMask:t,maskTextFn:r,rootId:i,cssCaptured:n}=e,o=X.parentNode(s),l=o&&o.tagName,a="",u=l==="STYLE"?!0:void 0,c=l==="SCRIPT"?!0:void 0;return c?a="SCRIPT_PLACEHOLDER":n||(a=X.textContent(s),u&&a&&(a=Jt(a,Us(e.doc)))),!u&&!c&&a&&t&&(a=r?r(a,X.parentElement(s)):a.replace(/[\S]/g,"*")),{type:H.Text,textContent:a||"",rootId:i}}function al(s,e){let{doc:t,blockClass:r,blockSelector:i,inlineStylesheet:n,maskInputOptions:o={},maskInputFn:l,dataURLOptions:a={},inlineImages:u,recordCanvas:c,keepIframeSrcFn:h,newlyAddedElement:p=!1,rootId:m}=e,g=tl(s,r,i),d=Ja(s),f={},b=s.attributes.length;for(let y=0;y<b;y++){let v=s.attributes[y];yn(d,v.name,v.value)||(f[v.name]=gn(t,d,Ce(v.name),v.value))}if(d==="link"&&n){let y=Array.from(t.styleSheets).find(O=>O.href===s.href),v=null;y&&(v=Yr(y)),v&&(delete f.rel,delete f.href,f._cssText=v)}if(d==="style"&&s.sheet){let y=Yr(s.sheet);y&&(s.childNodes.length>1&&(y=Ya(y,s)),f._cssText=y)}if(d==="input"||d==="textarea"||d==="select"){let y=s.value,v=s.checked;f.type!=="radio"&&f.type!=="checkbox"&&f.type!=="submit"&&f.type!=="button"&&y?f.value=Ls({element:s,type:Fs(s),tagName:d,value:y,maskInputOptions:o,maskInputFn:l}):v&&(f.checked=v)}if(d==="option"&&(s.selected&&!o.select?f.selected=!0:delete f.selected),d==="dialog"&&s.open&&(f.rr_open_mode=s.matches("dialog:modal")?"modal":"non-modal"),d==="canvas"&&c){if(s.__context==="2d")Ba(s)||(f.rr_dataURL=s.toDataURL(a.type,a.quality));else if(!("__context"in s)){let y=s.toDataURL(a.type,a.quality),v=t.createElement("canvas");v.width=s.width,v.height=s.height;let O=v.toDataURL(a.type,a.quality);y!==O&&(f.rr_dataURL=y)}}if(d==="img"&&u){Me||(Me=t.createElement("canvas"),yi=Me.getContext("2d"));let y=s,v=y.currentSrc||y.getAttribute("src")||"<unknown-src>",O=y.crossOrigin,_=()=>{y.removeEventListener("load",_);try{Me.width=y.naturalWidth,Me.height=y.naturalHeight,yi.drawImage(y,0,0),f.rr_dataURL=Me.toDataURL(a.type,a.quality)}catch(j){if(y.crossOrigin!=="anonymous"){y.crossOrigin="anonymous",y.complete&&y.naturalWidth!==0?_():y.addEventListener("load",_);return}else console.warn(`Cannot inline img src=${v}! Error: ${j}`)}y.crossOrigin==="anonymous"&&(O?f.crossOrigin=O:y.removeAttribute("crossorigin"))};y.complete&&y.naturalWidth!==0?_():y.addEventListener("load",_)}if(d==="audio"||d==="video"){let y=f;y.rr_mediaState=s.paused?"paused":"played",y.rr_mediaCurrentTime=s.currentTime,y.rr_mediaPlaybackRate=s.playbackRate,y.rr_mediaMuted=s.muted,y.rr_mediaLoop=s.loop,y.rr_mediaVolume=s.volume}if(p||(s.scrollLeft&&(f.rr_scrollLeft=s.scrollLeft),s.scrollTop&&(f.rr_scrollTop=s.scrollTop)),g){let{width:y,height:v}=s.getBoundingClientRect();f={class:f.class,rr_width:`${y}px`,rr_height:`${v}px`}}d==="iframe"&&!h(f.src)&&(s.contentDocument||(f.rr_src=f.src),delete f.src);let S;try{customElements.get(d)&&(S=!0)}catch{}return{type:H.Element,tagName:d,attributes:f,childNodes:[],isSVG:el(s)||void 0,needBlock:g,rootId:m,isCustom:S}}function T(s){return s==null?"":s.toLowerCase()}function ll(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"&&pn(s.attributes.href)==="js"))return!0;if(e.headFavicon&&(s.tagName==="link"&&s.attributes.rel==="shortcut icon"||s.tagName==="meta"&&(T(s.attributes.name).match(/^msapplication-tile(image|color)$/)||T(s.attributes.name)==="application-name"||T(s.attributes.rel)==="icon"||T(s.attributes.rel)==="apple-touch-icon"||T(s.attributes.rel)==="shortcut icon")))return!0;if(s.tagName==="meta"){if(e.headMetaDescKeywords&&T(s.attributes.name).match(/^description|keywords$/))return!0;if(e.headMetaSocial&&(T(s.attributes.property).match(/^(og|twitter|fb):/)||T(s.attributes.name).match(/^(og|twitter):/)||T(s.attributes.name)==="pinterest"))return!0;if(e.headMetaRobots&&(T(s.attributes.name)==="robots"||T(s.attributes.name)==="googlebot"||T(s.attributes.name)==="bingbot"))return!0;if(e.headMetaHttpEquiv&&s.attributes["http-equiv"]!==void 0)return!0;if(e.headMetaAuthorship&&(T(s.attributes.name)==="author"||T(s.attributes.name)==="generator"||T(s.attributes.name)==="framework"||T(s.attributes.name)==="publisher"||T(s.attributes.name)==="progid"||T(s.attributes.property).match(/^article:/)||T(s.attributes.property).match(/^product:/)))return!0;if(e.headMetaVerification&&(T(s.attributes.name)==="google-site-verification"||T(s.attributes.name)==="yandex-verification"||T(s.attributes.name)==="csrf-token"||T(s.attributes.name)==="p:domain_verify"||T(s.attributes.name)==="verify-v1"||T(s.attributes.name)==="verification"||T(s.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function Oe(s,e){let{doc:t,mirror:r,blockClass:i,blockSelector:n,maskTextClass:o,maskTextSelector:l,skipChild:a=!1,inlineStylesheet:u=!0,maskInputOptions:c={},maskTextFn:h,maskInputFn:p,slimDOMOptions:m,dataURLOptions:g={},inlineImages:d=!1,recordCanvas:f=!1,onSerialize:b,onIframeLoad:S,iframeLoadTimeout:y=5e3,onStylesheetLoad:v,stylesheetLoadTimeout:O=5e3,keepIframeSrcFn:_=()=>!1,newlyAddedElement:j=!1,cssCaptured:P=!1}=e,{needsMask:V}=e,{preserveWhiteSpace:Y=!0}=e;V||(V=wn(s,o,l,V===void 0));let q=il(s,{doc:t,mirror:r,blockClass:i,blockSelector:n,needsMask:V,inlineStylesheet:u,maskInputOptions:c,maskTextFn:h,maskInputFn:p,dataURLOptions:g,inlineImages:d,recordCanvas:f,keepIframeSrcFn:_,newlyAddedElement:j,cssCaptured:P});if(!q)return console.warn(s,"not serialized"),null;let ne;r.hasNode(s)?ne=r.getId(s):ll(q,m)||!Y&&q.type===H.Text&&!q.textContent.replace(/^\s+|\s+$/gm,"").length?ne=tt:ne=mn();let M=Object.assign(q,{id:ne});if(r.add(s,M),ne===tt)return null;b&&b(s);let He=!a;if(M.type===H.Element){He=He&&!M.needBlock,delete M.needBlock;let G=X.shadowRoot(s);G&&Qe(G)&&(M.isShadowHost=!0)}if((M.type===H.Document||M.type===H.Element)&&He){m.headWhitespace&&M.type===H.Element&&M.tagName==="head"&&(Y=!1);let G={doc:t,mirror:r,blockClass:i,blockSelector:n,needsMask:V,maskTextClass:o,maskTextSelector:l,skipChild:a,inlineStylesheet:u,maskInputOptions:c,maskTextFn:h,maskInputFn:p,slimDOMOptions:m,dataURLOptions:g,inlineImages:d,recordCanvas:f,preserveWhiteSpace:Y,onSerialize:b,onIframeLoad:S,iframeLoadTimeout:y,onStylesheetLoad:v,stylesheetLoadTimeout:O,keepIframeSrcFn:_,cssCaptured:!1};if(!(M.type===H.Element&&M.tagName==="textarea"&&M.attributes.value!==void 0)){M.type===H.Element&&M.attributes._cssText!==void 0&&typeof M.attributes._cssText=="string"&&(G.cssCaptured=!0);for(let we of Array.from(X.childNodes(s))){let oe=Oe(we,G);oe&&M.childNodes.push(oe)}}let Q=null;if(fn(s)&&(Q=X.shadowRoot(s)))for(let we of Array.from(X.childNodes(Q))){let oe=Oe(we,G);oe&&(Qe(Q)&&(oe.isShadow=!0),M.childNodes.push(oe))}}let je=X.parentNode(s);return je&&qe(je)&&Qe(je)&&(M.isShadow=!0),M.type===H.Element&&M.tagName==="iframe"&&rl(s,()=>{let G=s.contentDocument;if(G&&S){let Q=Oe(G,{doc:G,mirror:r,blockClass:i,blockSelector:n,needsMask:V,maskTextClass:o,maskTextSelector:l,skipChild:!1,inlineStylesheet:u,maskInputOptions:c,maskTextFn:h,maskInputFn:p,slimDOMOptions:m,dataURLOptions:g,inlineImages:d,recordCanvas:f,preserveWhiteSpace:Y,onSerialize:b,onIframeLoad:S,iframeLoadTimeout:y,onStylesheetLoad:v,stylesheetLoadTimeout:O,keepIframeSrcFn:_});Q&&S(s,Q)}},y),M.type===H.Element&&M.tagName==="link"&&typeof M.attributes.rel=="string"&&(M.attributes.rel==="stylesheet"||M.attributes.rel==="preload"&&typeof M.attributes.href=="string"&&pn(M.attributes.href)==="css")&&sl(s,()=>{if(v){let G=Oe(s,{doc:t,mirror:r,blockClass:i,blockSelector:n,needsMask:V,maskTextClass:o,maskTextSelector:l,skipChild:!1,inlineStylesheet:u,maskInputOptions:c,maskTextFn:h,maskInputFn:p,slimDOMOptions:m,dataURLOptions:g,inlineImages:d,recordCanvas:f,preserveWhiteSpace:Y,onSerialize:b,onIframeLoad:S,iframeLoadTimeout:y,onStylesheetLoad:v,stylesheetLoadTimeout:O,keepIframeSrcFn:_});G&&v(s,G)}},O),M}function ul(s,e){let{mirror:t=new Zt,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:p,slimDOM:m=!1,dataURLOptions:g,preserveWhiteSpace:d,onSerialize:f,onIframeLoad:b,iframeLoadTimeout:S,onStylesheetLoad:y,stylesheetLoadTimeout:v,keepIframeSrcFn:O=()=>!1}=e||{};return Oe(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:p,slimDOMOptions:m===!0||m==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:m==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:m===!1?{}:m,dataURLOptions:g,inlineImages:a,recordCanvas:u,preserveWhiteSpace:d,onSerialize:f,onIframeLoad:b,iframeLoadTimeout:S,onStylesheetLoad:y,stylesheetLoadTimeout:v,keepIframeSrcFn:O,newlyAddedElement:!1})}var cl=/(max|min)-device-(width|height)/,Bf=new RegExp(cl.source,"g");function hl(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}function fl(s){if(s.__esModule)return s;var e=s.default;if(typeof e=="function"){var t=function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(s).forEach(function(r){var i=Object.getOwnPropertyDescriptor(s,r);Object.defineProperty(t,r,i.get?i:{enumerable:!0,get:function(){return s[r]}})}),t}var Bs={exports:{}},k=String,bn=function(){return{isColorSupported:!1,reset:k,bold:k,dim:k,italic:k,underline:k,inverse:k,hidden:k,strikethrough:k,black:k,red:k,green:k,yellow:k,blue:k,magenta:k,cyan:k,white:k,gray:k,bgBlack:k,bgRed:k,bgGreen:k,bgYellow:k,bgBlue:k,bgMagenta:k,bgCyan:k,bgWhite:k}};Bs.exports=bn();Bs.exports.createColors=bn;var dl=Bs.exports,pl={},ml=Object.freeze(Object.defineProperty({__proto__:null,default:pl},Symbol.toStringTag,{value:"Module"})),se=fl(ml),bi=dl,Si=se,Xr=class Sn 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<"u"&&typeof r<"u"&&(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,Sn)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let t=this.source;e==null&&(e=bi.isColorSupported),Si&&e&&(t=Si(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}=bi.createColors(!0);l=p=>u(h(p)),a=p=>c(p)}else l=a=u=>u;return r.slice(i,n).map((u,c)=>{let h=i+1+c,p=" "+(" "+h).slice(-o)+" | ";if(h===this.line){let m=a(p.replace(/\d/g," "))+u.slice(0,this.column-1).replace(/[^\t]/g," ");return l(">")+a(p)+u+`
|
|
1
|
+
var kr=Object.defineProperty;var pa=Object.getOwnPropertyDescriptor;var ma=Object.getOwnPropertyNames;var ga=Object.prototype.hasOwnProperty;var ya=(s,e)=>{for(var t in e)kr(s,t,{get:e[t],enumerable:!0})},wa=(s,e,t,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of ma(e))!ga.call(s,i)&&i!==t&&kr(s,i,{get:()=>e[i],enumerable:!(r=pa(e,i))||r.enumerable});return s};var ba=s=>wa(kr({},"__esModule",{value:!0}),s);var zf={};ya(zf,{init:()=>Bf,startSession:()=>Wf,stopSession:()=>fa});module.exports=ba(zf);var va=Object.defineProperty,Sa=(s,e,t)=>e in s?va(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,w=(s,e,t)=>Sa(s,typeof e!="symbol"?e+"":e,t),mi,Ca=Object.defineProperty,Ea=(s,e,t)=>e in s?Ca(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,gi=(s,e,t)=>Ea(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||{}),yi={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},wi={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},Et={},Ia=()=>!!globalThis.Zone;function Fs(s){if(Et[s])return Et[s];let e=globalThis[s],t=e.prototype,r=s in yi?yi[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 wi?wi[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&&!Ia())return Et[s]=e.prototype,e.prototype;try{let l=document.createElement("iframe");document.body.appendChild(l);let a=l.contentWindow;if(!a)return e.prototype;let u=a[s].prototype;return document.body.removeChild(l),u?Et[s]=u:t}catch{return t}}var _r={};function ge(s,e,t){var r;let i=`${s}.${String(t)}`;if(_r[i])return _r[i].call(e);let n=Fs(s),o=(r=Object.getOwnPropertyDescriptor(n,t))==null?void 0:r.get;return o?(_r[i]=o,o.call(e)):e[t]}var $r={};function pn(s,e,t){let r=`${s}.${String(t)}`;if($r[r])return $r[r].bind(e);let n=Fs(s)[t];return typeof n!="function"?e[t]:($r[r]=n,n.bind(e))}function xa(s){return ge("Node",s,"childNodes")}function Ma(s){return ge("Node",s,"parentNode")}function Na(s){return ge("Node",s,"parentElement")}function Ra(s){return ge("Node",s,"textContent")}function Aa(s,e){return pn("Node",s,"contains")(e)}function Oa(s){return pn("Node",s,"getRootNode")()}function Da(s){return!s||!("host"in s)?null:ge("ShadowRoot",s,"host")}function Ta(s){return s.styleSheets}function ka(s){return!s||!("shadowRoot"in s)?null:ge("Element",s,"shadowRoot")}function _a(s,e){return ge("Element",s,"querySelector")(e)}function $a(s,e){return ge("Element",s,"querySelectorAll")(e)}function Pa(){return Fs("MutationObserver").constructor}var X={childNodes:xa,parentNode:Ma,parentElement:Na,textContent:Ra,contains:Aa,getRootNode:Oa,host:Da,styleSheets:Ta,shadowRoot:ka,querySelector:_a,querySelectorAll:$a,mutationObserver:Pa};function mn(s){return s.nodeType===s.ELEMENT_NODE}function Qe(s){let e=s&&"host"in s&&"mode"in s&&X.host(s)||null;return!!(e&&"shadowRoot"in e&&X.shadowRoot(e)===s)}function et(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 Fa(s){let{cssText:e}=s;if(e.split('"').length<3)return e;let 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 Zr(s){try{let 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);let r=Array.from(e,i=>gn(i,t)).join("");return La(r)}catch{return null}}function gn(s,e){if(Ba(s)){let t;try{t=Zr(s.styleSheet)||Fa(s)}catch{t=s.cssText}return s.styleSheet.href?Kt(t,s.styleSheet.href):t}else{let t=s.cssText;return Wa(s)&&s.selectorText.includes(":")&&(t=Ua(t)),e?Kt(t,e):t}}function Ua(s){let e=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return s.replace(e,"$1\\$2")}function Ba(s){return"styleSheet"in s}function Wa(s){return"selectorText"in s}var qt=class{constructor(){gi(this,"idNodeMap",new Map),gi(this,"nodeMetaMap",new WeakMap)}getId(e){var t;return e?((t=this.getMeta(e))==null?void 0:t.id)??-1:-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){let 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){let r=t.id;this.idNodeMap.set(r,e),this.nodeMetaMap.set(e,t)}replace(e,t){let r=this.getNode(e);if(r){let i=this.nodeMetaMap.get(r);i&&this.nodeMetaMap.set(t,i)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function za(){return new qt}function Us({element:s,maskInputOptions:e,tagName:t,type:r,value:i,maskInputFn:n}){let o=i||"",l=r&&Ee(r);return(e[t.toLowerCase()]||l&&e[l])&&(n?o=n(o,s):o="*".repeat(o.length)),o}function Ee(s){return s.toLowerCase()}var bi="__rrweb_original__";function Va(s){let e=s.getContext("2d");if(!e)return!0;let t=50;for(let r=0;r<s.width;r+=t)for(let i=0;i<s.height;i+=t){let n=e.getImageData,o=bi in n?n[bi]: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 Bs(s){let e=s.type;return s.hasAttribute("data-rr-is-password")?"password":e?Ee(e):null}function yn(s,e){let t;try{t=new URL(s,e??window.location.href)}catch{return null}let r=/\.([0-9a-z]+)(?:$)/i,i=t.pathname.match(r);return i?.[1]??null}function Ga(s){let e="";return s.indexOf("//")>-1?e=s.split("/").slice(0,3).join("/"):e=s.split("/")[0],e=e.split("?")[0],e}var Ha=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,ja=/^(?:[a-z+]+:)?\/\//i,Ya=/^www\..*/i,Xa=/^(data:)([^,]*),(.*)/i;function Kt(s,e){return(s||"").replace(Ha,(t,r,i,n,o,l)=>{let a=i||o||l,u=r||n||"";if(!a)return t;if(ja.test(a)||Ya.test(a))return`url(${u}${a}${u})`;if(Xa.test(a))return`url(${u}${a}${u})`;if(a[0]==="/")return`url(${u}${Ga(e)+a}${u})`;let c=e.split("/"),h=a.split("/");c.pop();for(let p of h)p!=="."&&(p===".."?c.pop():c.push(p));return`url(${u}${c.join("/")}${u})`})}function Pr(s){return s.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"")}function Za(s,e){let t=Array.from(e.childNodes),r=[];if(t.length>1&&s&&typeof s=="string"){let i=Pr(s);for(let n=1;n<t.length;n++)if(t[n].textContent&&typeof t[n].textContent=="string"){let o=Pr(t[n].textContent);for(let l=3;l<o.length;l++){let a=o.substring(0,l);if(i.split(a).length===2){let u=i.indexOf(a);for(let c=u;c<s.length;c++)if(Pr(s.substring(0,c)).length===u){r.push(s.substring(0,c)),s=s.substring(c);break}break}}}}return r.push(s),r}function Ja(s,e){return Za(s,e).join("/* rr_split */")}var qa=1,Ka=new RegExp("[^a-z0-9-_:]"),rt=-2;function wn(){return qa++}function Qa(s){if(s instanceof HTMLFormElement)return"form";let e=Ee(s.tagName);return Ka.test(e)?"div":e}var Ne,vi,el=/^[^ \t\n\r\u000c]+/,tl=/^[, \t\n\r\u000c]+/;function rl(s,e){if(e.trim()==="")return e;let t=0;function r(n){let o,l=n.exec(e.substring(t));return l?(o=l[0],t+=o.length,o):""}let i=[];for(;r(tl),!(t>=e.length);){let n=r(el);if(n.slice(-1)===",")n=Oe(s,n.substring(0,n.length-1)),i.push(n);else{let o="";n=Oe(s,n);let l=!1;for(;;){let 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(", ")}var Si=new WeakMap;function Oe(s,e){return!e||e.trim()===""?e:Ws(s,e)}function sl(s){return!!(s.tagName==="svg"||s.ownerSVGElement)}function Ws(s,e){let t=Si.get(s);if(t||(t=s.createElement("a"),Si.set(s,t)),!e)e="";else if(e.startsWith("blob:")||e.startsWith("data:"))return e;return t.setAttribute("href",e),t.href}function bn(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")?Oe(s,r):t==="srcset"?rl(s,r):t==="style"?Kt(r,Ws(s)):e==="object"&&t==="data"?Oe(s,r):r)}function vn(s,e,t){return(s==="video"||s==="audio")&&e==="autoplay"}function il(s,e,t){try{if(typeof e=="string"){if(s.classList.contains(e))return!0}else for(let r=s.classList.length;r--;){let i=s.classList[r];if(e.test(i))return!0}if(t)return s.matches(t)}catch{}return!1}function Qt(s,e,t){if(!s)return!1;if(s.nodeType!==s.ELEMENT_NODE)return t?Qt(X.parentNode(s),e,t):!1;for(let r=s.classList.length;r--;){let i=s.classList[r];if(e.test(i))return!0}return t?Qt(X.parentNode(s),e,t):!1}function Sn(s,e,t,r){let i;if(mn(s)){if(i=s,!X.childNodes(i).length)return!1}else{if(X.parentElement(s)===null)return!1;i=X.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(Qt(i,e,r))return!0;if(t){if(r){if(i.closest(t))return!0}else if(i.matches(t))return!0}}catch{}return!1}function nl(s,e,t){let r=s.contentWindow;if(!r)return;let i=!1,n;try{n=r.document.readyState}catch{return}if(n!=="complete"){let l=setTimeout(()=>{i||(e(),i=!0)},t);s.addEventListener("load",()=>{clearTimeout(l),i=!0,e()});return}let 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 ol(s,e,t){let r=!1,i;try{i=s.sheet}catch{return}if(i)return;let n=setTimeout(()=>{r||(e(),r=!0)},t);s.addEventListener("load",()=>{clearTimeout(n),r=!0,e()})}function al(s,e){let{doc:t,mirror:r,blockClass:i,blockSelector:n,needsMask:o,inlineStylesheet:l,maskInputOptions:a={},maskTextFn:u,maskInputFn:c,dataURLOptions:h={},inlineImages:p,recordCanvas:m,keepIframeSrcFn:g,newlyAddedElement:d=!1,cssCaptured:f=!1}=e,b=ll(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 cl(s,{doc:t,blockClass:i,blockSelector:n,inlineStylesheet:l,maskInputOptions:a,maskInputFn:c,dataURLOptions:h,inlineImages:p,recordCanvas:m,keepIframeSrcFn:g,newlyAddedElement:d,rootId:b});case s.TEXT_NODE:return ul(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:X.textContent(s)||"",rootId:b};default:return!1}}function ll(s,e){if(!e.hasNode(s))return;let t=e.getId(s);return t===1?void 0:t}function ul(s,e){let{needsMask:t,maskTextFn:r,rootId:i,cssCaptured:n}=e,o=X.parentNode(s),l=o&&o.tagName,a="",u=l==="STYLE"?!0:void 0,c=l==="SCRIPT"?!0:void 0;return c?a="SCRIPT_PLACEHOLDER":n||(a=X.textContent(s),u&&a&&(a=Kt(a,Ws(e.doc)))),!u&&!c&&a&&t&&(a=r?r(a,X.parentElement(s)):a.replace(/[\S]/g,"*")),{type:H.Text,textContent:a||"",rootId:i}}function cl(s,e){let{doc:t,blockClass:r,blockSelector:i,inlineStylesheet:n,maskInputOptions:o={},maskInputFn:l,dataURLOptions:a={},inlineImages:u,recordCanvas:c,keepIframeSrcFn:h,newlyAddedElement:p=!1,rootId:m}=e,g=il(s,r,i),d=Qa(s),f={},b=s.attributes.length;for(let y=0;y<b;y++){let S=s.attributes[y];vn(d,S.name,S.value)||(f[S.name]=bn(t,d,Ee(S.name),S.value))}if(d==="link"&&n){let y=Array.from(t.styleSheets).find(D=>D.href===s.href),S=null;y&&(S=Zr(y)),S&&(delete f.rel,delete f.href,f._cssText=S)}if(d==="style"&&s.sheet){let y=Zr(s.sheet);y&&(s.childNodes.length>1&&(y=Ja(y,s)),f._cssText=y)}if(d==="input"||d==="textarea"||d==="select"){let y=s.value,S=s.checked;f.type!=="radio"&&f.type!=="checkbox"&&f.type!=="submit"&&f.type!=="button"&&y?f.value=Us({element:s,type:Bs(s),tagName:d,value:y,maskInputOptions:o,maskInputFn:l}):S&&(f.checked=S)}if(d==="option"&&(s.selected&&!o.select?f.selected=!0:delete f.selected),d==="dialog"&&s.open&&(f.rr_open_mode=s.matches("dialog:modal")?"modal":"non-modal"),d==="canvas"&&c){if(s.__context==="2d")Va(s)||(f.rr_dataURL=s.toDataURL(a.type,a.quality));else if(!("__context"in s)){let y=s.toDataURL(a.type,a.quality),S=t.createElement("canvas");S.width=s.width,S.height=s.height;let D=S.toDataURL(a.type,a.quality);y!==D&&(f.rr_dataURL=y)}}if(d==="img"&&u){Ne||(Ne=t.createElement("canvas"),vi=Ne.getContext("2d"));let y=s,S=y.currentSrc||y.getAttribute("src")||"<unknown-src>",D=y.crossOrigin,_=()=>{y.removeEventListener("load",_);try{Ne.width=y.naturalWidth,Ne.height=y.naturalHeight,vi.drawImage(y,0,0),f.rr_dataURL=Ne.toDataURL(a.type,a.quality)}catch(j){if(y.crossOrigin!=="anonymous"){y.crossOrigin="anonymous",y.complete&&y.naturalWidth!==0?_():y.addEventListener("load",_);return}else console.warn(`Cannot inline img src=${S}! Error: ${j}`)}y.crossOrigin==="anonymous"&&(D?f.crossOrigin=D:y.removeAttribute("crossorigin"))};y.complete&&y.naturalWidth!==0?_():y.addEventListener("load",_)}if(d==="audio"||d==="video"){let y=f;y.rr_mediaState=s.paused?"paused":"played",y.rr_mediaCurrentTime=s.currentTime,y.rr_mediaPlaybackRate=s.playbackRate,y.rr_mediaMuted=s.muted,y.rr_mediaLoop=s.loop,y.rr_mediaVolume=s.volume}if(p||(s.scrollLeft&&(f.rr_scrollLeft=s.scrollLeft),s.scrollTop&&(f.rr_scrollTop=s.scrollTop)),g){let{width:y,height:S}=s.getBoundingClientRect();f={class:f.class,rr_width:`${y}px`,rr_height:`${S}px`}}d==="iframe"&&!h(f.src)&&(s.contentDocument||(f.rr_src=f.src),delete f.src);let v;try{customElements.get(d)&&(v=!0)}catch{}return{type:H.Element,tagName:d,attributes:f,childNodes:[],isSVG:sl(s)||void 0,needBlock:g,rootId:m,isCustom:v}}function k(s){return s==null?"":s.toLowerCase()}function hl(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"&&yn(s.attributes.href)==="js"))return!0;if(e.headFavicon&&(s.tagName==="link"&&s.attributes.rel==="shortcut icon"||s.tagName==="meta"&&(k(s.attributes.name).match(/^msapplication-tile(image|color)$/)||k(s.attributes.name)==="application-name"||k(s.attributes.rel)==="icon"||k(s.attributes.rel)==="apple-touch-icon"||k(s.attributes.rel)==="shortcut icon")))return!0;if(s.tagName==="meta"){if(e.headMetaDescKeywords&&k(s.attributes.name).match(/^description|keywords$/))return!0;if(e.headMetaSocial&&(k(s.attributes.property).match(/^(og|twitter|fb):/)||k(s.attributes.name).match(/^(og|twitter):/)||k(s.attributes.name)==="pinterest"))return!0;if(e.headMetaRobots&&(k(s.attributes.name)==="robots"||k(s.attributes.name)==="googlebot"||k(s.attributes.name)==="bingbot"))return!0;if(e.headMetaHttpEquiv&&s.attributes["http-equiv"]!==void 0)return!0;if(e.headMetaAuthorship&&(k(s.attributes.name)==="author"||k(s.attributes.name)==="generator"||k(s.attributes.name)==="framework"||k(s.attributes.name)==="publisher"||k(s.attributes.name)==="progid"||k(s.attributes.property).match(/^article:/)||k(s.attributes.property).match(/^product:/)))return!0;if(e.headMetaVerification&&(k(s.attributes.name)==="google-site-verification"||k(s.attributes.name)==="yandex-verification"||k(s.attributes.name)==="csrf-token"||k(s.attributes.name)==="p:domain_verify"||k(s.attributes.name)==="verify-v1"||k(s.attributes.name)==="verification"||k(s.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function De(s,e){let{doc:t,mirror:r,blockClass:i,blockSelector:n,maskTextClass:o,maskTextSelector:l,skipChild:a=!1,inlineStylesheet:u=!0,maskInputOptions:c={},maskTextFn:h,maskInputFn:p,slimDOMOptions:m,dataURLOptions:g={},inlineImages:d=!1,recordCanvas:f=!1,onSerialize:b,onIframeLoad:v,iframeLoadTimeout:y=5e3,onStylesheetLoad:S,stylesheetLoadTimeout:D=5e3,keepIframeSrcFn:_=()=>!1,newlyAddedElement:j=!1,cssCaptured:L=!1}=e,{needsMask:V}=e,{preserveWhiteSpace:Y=!0}=e;V||(V=Sn(s,o,l,V===void 0));let K=al(s,{doc:t,mirror:r,blockClass:i,blockSelector:n,needsMask:V,inlineStylesheet:u,maskInputOptions:c,maskTextFn:h,maskInputFn:p,dataURLOptions:g,inlineImages:d,recordCanvas:f,keepIframeSrcFn:_,newlyAddedElement:j,cssCaptured:L});if(!K)return console.warn(s,"not serialized"),null;let oe;r.hasNode(s)?oe=r.getId(s):hl(K,m)||!Y&&K.type===H.Text&&!K.textContent.replace(/^\s+|\s+$/gm,"").length?oe=rt:oe=wn();let M=Object.assign(K,{id:oe});if(r.add(s,M),oe===rt)return null;b&&b(s);let je=!a;if(M.type===H.Element){je=je&&!M.needBlock,delete M.needBlock;let G=X.shadowRoot(s);G&&et(G)&&(M.isShadowHost=!0)}if((M.type===H.Document||M.type===H.Element)&&je){m.headWhitespace&&M.type===H.Element&&M.tagName==="head"&&(Y=!1);let G={doc:t,mirror:r,blockClass:i,blockSelector:n,needsMask:V,maskTextClass:o,maskTextSelector:l,skipChild:a,inlineStylesheet:u,maskInputOptions:c,maskTextFn:h,maskInputFn:p,slimDOMOptions:m,dataURLOptions:g,inlineImages:d,recordCanvas:f,preserveWhiteSpace:Y,onSerialize:b,onIframeLoad:v,iframeLoadTimeout:y,onStylesheetLoad:S,stylesheetLoadTimeout:D,keepIframeSrcFn:_,cssCaptured:!1};if(!(M.type===H.Element&&M.tagName==="textarea"&&M.attributes.value!==void 0)){M.type===H.Element&&M.attributes._cssText!==void 0&&typeof M.attributes._cssText=="string"&&(G.cssCaptured=!0);for(let be of Array.from(X.childNodes(s))){let ae=De(be,G);ae&&M.childNodes.push(ae)}}let Q=null;if(mn(s)&&(Q=X.shadowRoot(s)))for(let be of Array.from(X.childNodes(Q))){let ae=De(be,G);ae&&(et(Q)&&(ae.isShadow=!0),M.childNodes.push(ae))}}let Ye=X.parentNode(s);return Ye&&Qe(Ye)&&et(Ye)&&(M.isShadow=!0),M.type===H.Element&&M.tagName==="iframe"&&nl(s,()=>{let G=s.contentDocument;if(G&&v){let Q=De(G,{doc:G,mirror:r,blockClass:i,blockSelector:n,needsMask:V,maskTextClass:o,maskTextSelector:l,skipChild:!1,inlineStylesheet:u,maskInputOptions:c,maskTextFn:h,maskInputFn:p,slimDOMOptions:m,dataURLOptions:g,inlineImages:d,recordCanvas:f,preserveWhiteSpace:Y,onSerialize:b,onIframeLoad:v,iframeLoadTimeout:y,onStylesheetLoad:S,stylesheetLoadTimeout:D,keepIframeSrcFn:_});Q&&v(s,Q)}},y),M.type===H.Element&&M.tagName==="link"&&typeof M.attributes.rel=="string"&&(M.attributes.rel==="stylesheet"||M.attributes.rel==="preload"&&typeof M.attributes.href=="string"&&yn(M.attributes.href)==="css")&&ol(s,()=>{if(S){let G=De(s,{doc:t,mirror:r,blockClass:i,blockSelector:n,needsMask:V,maskTextClass:o,maskTextSelector:l,skipChild:!1,inlineStylesheet:u,maskInputOptions:c,maskTextFn:h,maskInputFn:p,slimDOMOptions:m,dataURLOptions:g,inlineImages:d,recordCanvas:f,preserveWhiteSpace:Y,onSerialize:b,onIframeLoad:v,iframeLoadTimeout:y,onStylesheetLoad:S,stylesheetLoadTimeout:D,keepIframeSrcFn:_});G&&S(s,G)}},D),M}function fl(s,e){let{mirror:t=new qt,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:p,slimDOM:m=!1,dataURLOptions:g,preserveWhiteSpace:d,onSerialize:f,onIframeLoad:b,iframeLoadTimeout:v,onStylesheetLoad:y,stylesheetLoadTimeout:S,keepIframeSrcFn:D=()=>!1}=e||{};return De(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:p,slimDOMOptions:m===!0||m==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:m==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:m===!1?{}:m,dataURLOptions:g,inlineImages:a,recordCanvas:u,preserveWhiteSpace:d,onSerialize:f,onIframeLoad:b,iframeLoadTimeout:v,onStylesheetLoad:y,stylesheetLoadTimeout:S,keepIframeSrcFn:D,newlyAddedElement:!1})}var dl=/(max|min)-device-(width|height)/,Gf=new RegExp(dl.source,"g");function pl(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}function ml(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 zs={exports:{}},$=String,Cn=function(){return{isColorSupported:!1,reset:$,bold:$,dim:$,italic:$,underline:$,inverse:$,hidden:$,strikethrough:$,black:$,red:$,green:$,yellow:$,blue:$,magenta:$,cyan:$,white:$,gray:$,bgBlack:$,bgRed:$,bgGreen:$,bgYellow:$,bgBlue:$,bgMagenta:$,bgCyan:$,bgWhite:$}};zs.exports=Cn();zs.exports.createColors=Cn;var gl=zs.exports,yl={},wl=Object.freeze(Object.defineProperty({__proto__:null,default:yl},Symbol.toStringTag,{value:"Module"})),se=ml(wl),Ci=gl,Ei=se,Jr=class En 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<"u"&&typeof r<"u"&&(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,En)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let t=this.source;e==null&&(e=Ci.isColorSupported),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}=Ci.createColors(!0);l=p=>u(h(p)),a=p=>c(p)}else l=a=u=>u;return r.slice(i,n).map((u,c)=>{let h=i+1+c,p=" "+(" "+h).slice(-o)+" | ";if(h===this.line){let m=a(p.replace(/\d/g," "))+u.slice(0,this.column-1).replace(/[^\t]/g," ");return l(">")+a(p)+u+`
|
|
2
2
|
`+m+l("^")}return" "+a(p)+u}).join(`
|
|
3
3
|
`)}toString(){let e=this.showSourceCode();return e&&(e=`
|
|
4
4
|
|
|
5
5
|
`+e+`
|
|
6
|
-
`),this.name+": "+this.message+e}},
|
|
6
|
+
`),this.name+": "+this.message+e}},Vs=Jr;Jr.default=Jr;var ft={};ft.isClean=Symbol("isClean");ft.my=Symbol("my");var Ii={after:`
|
|
7
7
|
`,beforeClose:`
|
|
8
8
|
`,beforeComment:`
|
|
9
9
|
`,beforeDecl:`
|
|
10
10
|
`,beforeOpen:" ",beforeRule:`
|
|
11
|
-
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function
|
|
12
|
-
`)){let o=this.raw(e,null,"indent");if(o.length)for(let l=0;l<n;l++)r+=o}return r}block(e,t){let r=this.raw(e,"between","beforeOpen");this.builder(t+r+"{",e,"start");let i;e.nodes&&e.nodes.length?(this.body(e),i=this.raw(e,"after")):i=this.raw(e,"after","emptyBody"),i&&this.builder(i),this.builder("}",e,"end")}body(e){let t=e.nodes.length-1;for(;t>0&&e.nodes[t].type==="comment";)t-=1;let r=this.raw(e,"semicolon");for(let i=0;i<e.nodes.length;i++){let n=e.nodes[i],o=this.raw(n,"before");o&&this.builder(o),this.stringify(n,t!==i||r)}}comment(e){let t=this.raw(e,"left","commentLeft"),r=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+r+"*/",e)}decl(e,t){let r=this.raw(e,"between","colon"),i=e.prop+r+this.rawValue(e,"value");e.important&&(i+=e.raws.important||" !important"),t&&(i+=";"),this.builder(i,e)}document(e){this.body(e)}raw(e,t,r){let i;if(r||(r=t),t&&(i=e.raws[t],typeof i<"u"))return i;let n=e.parent;if(r==="before"&&(!n||n.type==="root"&&n.first===e||n&&n.type==="document"))return"";if(!n)return
|
|
11
|
+
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function bl(s){return s[0].toUpperCase()+s.slice(1)}var qr=class{constructor(e){this.builder=e}atrule(e,t){let r="@"+e.name,i=e.params?this.rawValue(e,"params"):"";if(typeof e.raws.afterName<"u"?r+=e.raws.afterName:i&&(r+=" "),e.nodes)this.block(e,r+i);else{let n=(e.raws.between||"")+(t?";":"");this.builder(r+i+n,e)}}beforeAfter(e,t){let r;e.type==="decl"?r=this.raw(e,null,"beforeDecl"):e.type==="comment"?r=this.raw(e,null,"beforeComment"):t==="before"?r=this.raw(e,null,"beforeRule"):r=this.raw(e,null,"beforeClose");let i=e.parent,n=0;for(;i&&i.type!=="root";)n+=1,i=i.parent;if(r.includes(`
|
|
12
|
+
`)){let o=this.raw(e,null,"indent");if(o.length)for(let l=0;l<n;l++)r+=o}return r}block(e,t){let r=this.raw(e,"between","beforeOpen");this.builder(t+r+"{",e,"start");let i;e.nodes&&e.nodes.length?(this.body(e),i=this.raw(e,"after")):i=this.raw(e,"after","emptyBody"),i&&this.builder(i),this.builder("}",e,"end")}body(e){let t=e.nodes.length-1;for(;t>0&&e.nodes[t].type==="comment";)t-=1;let r=this.raw(e,"semicolon");for(let i=0;i<e.nodes.length;i++){let n=e.nodes[i],o=this.raw(n,"before");o&&this.builder(o),this.stringify(n,t!==i||r)}}comment(e){let t=this.raw(e,"left","commentLeft"),r=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+r+"*/",e)}decl(e,t){let r=this.raw(e,"between","colon"),i=e.prop+r+this.rawValue(e,"value");e.important&&(i+=e.raws.important||" !important"),t&&(i+=";"),this.builder(i,e)}document(e){this.body(e)}raw(e,t,r){let i;if(r||(r=t),t&&(i=e.raws[t],typeof i<"u"))return i;let n=e.parent;if(r==="before"&&(!n||n.type==="root"&&n.first===e||n&&n.type==="document"))return"";if(!n)return Ii[r];let o=e.root();if(o.rawCache||(o.rawCache={}),typeof o.rawCache[r]<"u")return o.rawCache[r];if(r==="before"||r==="after")return this.beforeAfter(e,r);{let l="raw"+bl(r);this[l]?i=this[l](o,e):o.walk(a=>{if(i=a.raws[t],typeof i<"u")return!1})}return typeof i>"u"&&(i=Ii[r]),o.rawCache[r]=i,i}rawBeforeClose(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length>0&&typeof r.raws.after<"u")return t=r.raws.after,t.includes(`
|
|
13
13
|
`)&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let r;return e.walkComments(i=>{if(typeof i.raws.before<"u")return r=i.raws.before,r.includes(`
|
|
14
14
|
`)&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r>"u"?r=this.raw(t,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeDecl(e,t){let r;return e.walkDecls(i=>{if(typeof i.raws.before<"u")return r=i.raws.before,r.includes(`
|
|
15
15
|
`)&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r>"u"?r=this.raw(t,null,"beforeRule"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeOpen(e){let t;return e.walk(r=>{if(r.type!=="decl"&&(t=r.raws.between,typeof t<"u"))return!1}),t}rawBeforeRule(e){let t;return e.walk(r=>{if(r.nodes&&(r.parent!==e||e.first!==r)&&typeof r.raws.before<"u")return t=r.raws.before,t.includes(`
|
|
16
16
|
`)&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls(r=>{if(typeof r.raws.between<"u")return t=r.raws.between.replace(/[^\s:]/g,""),!1}),t}rawEmptyBody(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length===0&&(t=r.raws.after,typeof t<"u"))return!1}),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk(r=>{let i=r.parent;if(i&&i!==e&&i.parent&&i.parent===e&&typeof r.raws.before<"u"){let n=r.raws.before.split(`
|
|
17
|
-
`);return t=n[n.length-1],t=t.replace(/\S/g,""),!1}}),t}rawSemicolon(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length&&r.last.type==="decl"&&(t=r.raws.semicolon,typeof t<"u"))return!1}),t}rawValue(e,t){let r=e[t],i=e.raws[t];return i&&i.value===r?i.raw:r}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}},
|
|
18
|
-
`?(i=1,n+=1):i+=1;return{column:i,line:n}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e){let t={column:this.source.start.column,line:this.source.start.line},r=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:t.column+1,line:t.line};if(e.word){let i=this.toString(),n=i.indexOf(e.word);n!==-1&&(t=this.positionInside(n,i),r=this.positionInside(n+e.word.length,i))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?r={column:e.end.column,line:e.end.line}:typeof e.endIndex=="number"?r=this.positionInside(e.endIndex):e.index&&(r=this.positionInside(e.index+1));return(r.line<t.line||r.line===t.line&&r.column<=t.column)&&(r={column:t.column+1,line:t.line}),{end:r,start:t}}raw(e,t){return new
|
|
19
|
-
`);r=new Array(n.length);let o=0;for(let l=0,a=n.length;l<a;l++)r[l]=o,o+=n[l].length+1;this[
|
|
17
|
+
`);return t=n[n.length-1],t=t.replace(/\S/g,""),!1}}),t}rawSemicolon(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length&&r.last.type==="decl"&&(t=r.raws.semicolon,typeof t<"u"))return!1}),t}rawValue(e,t){let r=e[t],i=e.raws[t];return i&&i.value===r?i.raw:r}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}},In=qr;qr.default=qr;var vl=In;function Kr(s,e){new vl(e).stringify(s)}var fr=Kr;Kr.default=Kr;var{isClean:It,my:Sl}=ft,Cl=Vs,El=In,Il=fr;function Qr(s,e){let t=new s.constructor;for(let r in s){if(!Object.prototype.hasOwnProperty.call(s,r)||r==="proxyCache")continue;let i=s[r],n=typeof i;r==="parent"&&n==="object"?e&&(t[r]=e):r==="source"?t[r]=i:Array.isArray(i)?t[r]=i.map(o=>Qr(o,t)):(n==="object"&&i!==null&&(i=Qr(i)),t[r]=i)}return t}var es=class{constructor(e={}){this.raws={},this[It]=!1,this[Sl]=!0;for(let t in e)if(t==="nodes"){this.nodes=[];for(let r of e[t])typeof r.clone=="function"?this.append(r.clone()):this.append(r)}else this[t]=e[t]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let t in e)this[t]=e[t];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let t=Qr(this);for(let r in e)t[r]=e[r];return t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}error(e,t={}){if(this.source){let{end:r,start:i}=this.rangeBy(t);return this.source.input.error(e,{column:i.column,line:i.line},{column:r.column,line:r.line},t)}return new Cl(e)}getProxyProcessor(){return{get(e,t){return t==="proxyOf"?e:t==="root"?()=>e.root().toProxy():e[t]},set(e,t,r){return e[t]===r||(e[t]=r,(t==="prop"||t==="value"||t==="name"||t==="params"||t==="important"||t==="text")&&e.markDirty()),!0}}}markDirty(){if(this[It]){this[It]=!1;let e=this;for(;e=e.parent;)e[It]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let r=this.source.start;if(e.index)r=this.positionInside(e.index,t);else if(e.word){t=this.toString();let i=t.indexOf(e.word);i!==-1&&(r=this.positionInside(i,t))}return r}positionInside(e,t){let r=t||this.toString(),i=this.source.start.column,n=this.source.start.line;for(let o=0;o<e;o++)r[o]===`
|
|
18
|
+
`?(i=1,n+=1):i+=1;return{column:i,line:n}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e){let t={column:this.source.start.column,line:this.source.start.line},r=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:t.column+1,line:t.line};if(e.word){let i=this.toString(),n=i.indexOf(e.word);n!==-1&&(t=this.positionInside(n,i),r=this.positionInside(n+e.word.length,i))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?r={column:e.end.column,line:e.end.line}:typeof e.endIndex=="number"?r=this.positionInside(e.endIndex):e.index&&(r=this.positionInside(e.index+1));return(r.line<t.line||r.line===t.line&&r.column<=t.column)&&(r={column:t.column+1,line:t.line}),{end:r,start:t}}raw(e,t){return new El().raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let t=this,r=!1;for(let i of e)i===this?r=!0:r?(this.parent.insertAfter(t,i),t=i):this.parent.insertBefore(t,i);r||this.remove()}return this}root(){let e=this;for(;e.parent&&e.parent.type!=="document";)e=e.parent;return e}toJSON(e,t){let r={},i=t==null;t=t||new Map;let n=0;for(let o in this){if(!Object.prototype.hasOwnProperty.call(this,o)||o==="parent"||o==="proxyCache")continue;let l=this[o];if(Array.isArray(l))r[o]=l.map(a=>typeof a=="object"&&a.toJSON?a.toJSON(null,t):a);else if(typeof l=="object"&&l.toJSON)r[o]=l.toJSON(null,t);else if(o==="source"){let a=t.get(l.input);a==null&&(a=n,t.set(l.input,n),n++),r[o]={end:l.end,inputId:a,start:l.start}}else r[o]=l}return i&&(r.inputs=[...t.keys()].map(o=>o.toJSON())),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=Il){e.stringify&&(e=e.stringify);let t="";return e(this,r=>{t+=r}),t}warn(e,t,r){let i={node:this};for(let n in r)i[n]=r[n];return e.warn(t,i)}get proxyOf(){return this}},dr=es;es.default=es;var xl=dr,ts=class extends xl{constructor(e){e&&typeof e.value<"u"&&typeof e.value!="string"&&(e={...e,value:String(e.value)}),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}},pr=ts;ts.default=ts;var Ml="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",Nl=(s,e=21)=>(t=e)=>{let r="",i=t;for(;i--;)r+=s[Math.random()*s.length|0];return r},Rl=(s=21)=>{let e="",t=s;for(;t--;)e+=Ml[Math.random()*64|0];return e},Al={nanoid:Rl,customAlphabet:Nl},{SourceMapConsumer:xi,SourceMapGenerator:Mi}=se,{existsSync:Ol,readFileSync:Dl}=se,{dirname:Lr,join:Tl}=se;function kl(s){return Buffer?Buffer.from(s,"base64").toString():window.atob(s)}var rs=class{constructor(e,t){if(t.map===!1)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let r=t.map?t.map.prev:void 0,i=this.loadMap(t.from,r);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=Lr(this.mapFile)),i&&(this.text=i)}consumer(){return this.consumerCache||(this.consumerCache=new xi(this.text)),this.consumerCache}decodeInline(e){let t=/^data:application\/json;charset=utf-?8;base64,/,r=/^data:application\/json;base64,/,i=/^data:application\/json;charset=utf-?8,/,n=/^data:application\/json,/;if(i.test(e)||n.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(t.test(e)||r.test(e))return kl(e.substr(RegExp.lastMatch.length));let o=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+o)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return typeof e!="object"?!1:typeof e.mappings=="string"||typeof e._mappings=="string"||Array.isArray(e.sections)}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/gm);if(!t)return;let r=e.lastIndexOf(t.pop()),i=e.indexOf("*/",r);r>-1&&i>-1&&(this.annotation=this.getAnnotationURL(e.substring(r,i)))}loadFile(e){if(this.root=Lr(e),Ol(e))return this.mapFile=e,Dl(e,"utf-8").toString().trim()}loadMap(e,t){if(t===!1)return!1;if(t){if(typeof t=="string")return t;if(typeof t=="function"){let r=t(e);if(r){let i=this.loadFile(r);if(!i)throw new Error("Unable to load previous source map: "+r.toString());return i}}else{if(t instanceof xi)return Mi.fromSourceMap(t).toString();if(t instanceof Mi)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let r=this.annotation;return e&&(r=Tl(Lr(e),r)),this.loadFile(r)}}}startWith(e,t){return e?e.substr(0,t.length)===t:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}},xn=rs;rs.default=rs;var{SourceMapConsumer:_l,SourceMapGenerator:$l}=se,{fileURLToPath:Ni,pathToFileURL:xt}=se,{isAbsolute:ss,resolve:is}=se,{nanoid:Pl}=Al,Fr=se,Ri=Vs,Ll=xn,Ur=Symbol("fromOffsetCache"),Fl=!!(_l&&$l),Ai=!!(is&&ss),er=class{constructor(e,t={}){if(e===null||typeof e>"u"||typeof e=="object"&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),this.css[0]==="\uFEFF"||this.css[0]==="\uFFFE"?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(!Ai||/^\w+:\/\//.test(t.from)||ss(t.from)?this.file=t.from:this.file=is(t.from)),Ai&&Fl){let r=new Ll(this.css,t);if(r.text){this.map=r;let i=r.consumer().file;!this.file&&i&&(this.file=this.mapResolve(i))}}this.file||(this.id="<input css "+Pl(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,r,i={}){let n,o,l;if(t&&typeof t=="object"){let u=t,c=r;if(typeof u.offset=="number"){let h=this.fromOffset(u.offset);t=h.line,r=h.col}else t=u.line,r=u.column;if(typeof c.offset=="number"){let h=this.fromOffset(c.offset);o=h.line,l=h.col}else o=c.line,l=c.column}else if(!r){let u=this.fromOffset(t);t=u.line,r=u.col}let a=this.origin(t,r,o,l);return a?n=new Ri(e,a.endLine===void 0?a.line:{column:a.column,line:a.line},a.endLine===void 0?a.column:{column:a.endColumn,line:a.endLine},a.source,a.file,i.plugin):n=new Ri(e,o===void 0?t:{column:r,line:t},o===void 0?r:{column:l,line:o},this.css,this.file,i.plugin),n.input={column:r,endColumn:l,endLine:o,line:t,source:this.css},this.file&&(xt&&(n.input.url=xt(this.file).toString()),n.input.file=this.file),n}fromOffset(e){let t,r;if(this[Ur])r=this[Ur];else{let n=this.css.split(`
|
|
19
|
+
`);r=new Array(n.length);let o=0;for(let l=0,a=n.length;l<a;l++)r[l]=o,o+=n[l].length+1;this[Ur]=r}t=r[r.length-1];let i=0;if(e>=t)i=r.length-1;else{let n=r.length-2,o;for(;i<n;)if(o=i+(n-i>>1),e<r[o])n=o-1;else if(e>=r[o+1])i=o+1;else{i=o;break}}return{col:e-r[i]+1,line:i+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:is(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,r,i){if(!this.map)return!1;let n=this.map.consumer(),o=n.originalPositionFor({column:t,line:e});if(!o.source)return!1;let l;typeof r=="number"&&(l=n.originalPositionFor({column:i,line:r}));let a;ss(o.source)?a=xt(o.source):a=new URL(o.source,this.map.consumer().sourceRoot||xt(this.map.mapFile));let u={column:o.column,endColumn:l&&l.column,endLine:l&&l.line,line:o.line,url:a.toString()};if(a.protocol==="file:")if(Ni)u.file=Ni(a);else throw new Error("file: protocol is not available in this PostCSS build");let c=n.sourceContentFor(o.source);return c&&(u.source=c),u}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])this[t]!=null&&(e[t]=this[t]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}},mr=er;er.default=er;Fr&&Fr.registerInput&&Fr.registerInput(er);var{SourceMapConsumer:Mn,SourceMapGenerator:Ht}=se,{dirname:jt,relative:Nn,resolve:Rn,sep:An}=se,{pathToFileURL:Oi}=se,Ul=mr,Bl=!!(Mn&&Ht),Wl=!!(jt&&Rn&&Nn&&An),zl=class{constructor(e,t,r,i){this.stringify=e,this.mapOpts=r.map||{},this.root=t,this.opts=r,this.css=i,this.originalCSS=i,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;this.isInline()?e="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?e=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?e=this.mapOpts.annotation(this.opts.to,this.root):e=this.outputFile()+".map";let t=`
|
|
20
20
|
`;this.css.includes(`\r
|
|
21
21
|
`)&&(t=`\r
|
|
22
|
-
`),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t=this.toUrl(this.path(e.file)),r=e.root||
|
|
23
|
-
`),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<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(e=>e.annotation):!0}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let e=this.mapOpts.annotation;return typeof e<"u"&&e!==!0?!1:this.previous().length?this.previous().some(t=>t.inline):!0}isMap(){return typeof this.opts.map<"u"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent<"u"?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?Gt(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(r=Gt(xn(r,this.mapOpts.annotation)));let i=En(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 Pl(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(Ni){let r=Ni(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;Mn==="\\"&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}},Nn=Ul,Bl=hr,ss=class extends Bl{constructor(e){super(e),this.type="comment"}},pr=ss;ss.default=ss;var{isClean:Rn,my:An}=ht,On=fr,Dn=pr,Wl=hr,Tn,zs,Vs,_n;function kn(s){return s.map(e=>(e.nodes&&(e.nodes=kn(e.nodes)),delete e.source,e))}function $n(s){if(s[Rn]=!1,s.proxyOf.nodes)for(let e of s.proxyOf.nodes)$n(e)}var he=class Pn extends Wl{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=kn(Tn(e).nodes);else if(typeof e>"u")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>"u")throw new Error("Value field is missed in node creation");typeof e.value!="string"&&(e.value=String(e.value)),e=[new On(e)]}else if(e.selector)e=[new zs(e)];else if(e.name)e=[new Vs(e)];else if(e.text)e=[new Dn(e)];else throw new Error("Unknown node type in node creation");return e.map(i=>(i[An]||Pn.rebuild(i),i=i.proxyOf,i.parent&&i.parent.removeChild(i),i[Rn]&&$n(i),typeof i.raws.before>"u"&&t&&typeof t.raws.before<"u"&&(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]}};he.registerParse=s=>{Tn=s};he.registerRule=s=>{zs=s};he.registerAtRule=s=>{Vs=s};he.registerRoot=s=>{_n=s};var Ie=he;he.default=he;he.rebuild=s=>{s.type==="atrule"?Object.setPrototypeOf(s,Vs.prototype):s.type==="rule"?Object.setPrototypeOf(s,zs.prototype):s.type==="decl"?Object.setPrototypeOf(s,On.prototype):s.type==="comment"?Object.setPrototypeOf(s,Dn.prototype):s.type==="root"&&Object.setPrototypeOf(s,_n.prototype),s[An]=!0,s.nodes&&s.nodes.forEach(e=>{he.rebuild(e)})};var zl=Ie,Ln,Fn,rt=class extends zl{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new Ln(new Fn,this,e).stringify()}};rt.registerLazyResult=s=>{Ln=s};rt.registerProcessor=s=>{Fn=s};var Gs=rt;rt.default=rt;var 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}},Un=is;is.default=is;var Vl=Un,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 Vl(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>e.type==="warning")}get content(){return this.css}},Hs=ns;ns.default=ns;var Fr=39,Ri=34,Et=92,Ai=47,xt=10,Ye=32,Mt=12,Nt=9,Rt=13,Gl=91,Hl=93,jl=40,Yl=41,Xl=123,Zl=125,Jl=59,Kl=42,ql=58,Ql=64,At=/[\t\n\f\r "#'()/;[\\\]{}]/g,Ot=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,eu=/.[\r\n"'(/\\]/,Oi=/[\da-f]/i,tu=function(e,t={}){let r=e.css.valueOf(),i=t.ignoreErrors,n,o,l,a,u,c,h,p,m,g,d=r.length,f=0,b=[],S=[];function y(){return f}function v(P){throw e.error("Unclosed "+P,f)}function O(){return S.length===0&&f>=d}function _(P){if(S.length)return S.pop();if(f>=d)return;let V=P?P.ignoreUnclosed:!1;switch(n=r.charCodeAt(f),n){case xt:case Ye:case Nt:case Rt:case Mt:{o=f;do o+=1,n=r.charCodeAt(o);while(n===Ye||n===xt||n===Nt||n===Rt||n===Mt);g=["space",r.slice(f,o)],f=o-1;break}case Gl:case Hl:case Xl:case Zl:case ql:case Jl:case Yl:{let Y=String.fromCharCode(n);g=[Y,Y,f];break}case jl:{if(p=b.length?b.pop()[1]:"",m=r.charCodeAt(f+1),p==="url"&&m!==Fr&&m!==Ri&&m!==Ye&&m!==xt&&m!==Nt&&m!==Mt&&m!==Rt){o=f;do{if(c=!1,o=r.indexOf(")",o+1),o===-1)if(i||V){o=f;break}else v("bracket");for(h=o;r.charCodeAt(h-1)===Et;)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||eu.test(a)?g=["(","(",f]:(g=["brackets",a,f,o],f=o);break}case Fr:case Ri:{l=n===Fr?"'":'"',o=f;do{if(c=!1,o=r.indexOf(l,o+1),o===-1)if(i||V){o=f+1;break}else v("string");for(h=o;r.charCodeAt(h-1)===Et;)h-=1,c=!c}while(c);g=["string",r.slice(f,o+1),f,o],f=o;break}case Ql:{At.lastIndex=f+1,At.test(r),At.lastIndex===0?o=r.length-1:o=At.lastIndex-2,g=["at-word",r.slice(f,o+1),f,o],f=o;break}case Et:{for(o=f,u=!0;r.charCodeAt(o+1)===Et;)o+=1,u=!u;if(n=r.charCodeAt(o+1),u&&n!==Ai&&n!==Ye&&n!==xt&&n!==Nt&&n!==Rt&&n!==Mt&&(o+=1,Oi.test(r.charAt(o)))){for(;Oi.test(r.charAt(o+1));)o+=1;r.charCodeAt(o+1)===Ye&&(o+=1)}g=["word",r.slice(f,o+1),f,o],f=o;break}default:{n===Ai&&r.charCodeAt(f+1)===Kl?(o=r.indexOf("*/",f+2)+1,o===0&&(i||V?o=r.length:v("comment")),g=["comment",r.slice(f,o+1),f,o],f=o):(Ot.lastIndex=f+1,Ot.test(r),Ot.lastIndex===0?o=r.length-1:o=Ot.lastIndex-2,g=["word",r.slice(f,o+1),f,o],b.push(g),f=o);break}}return f++,g}function j(P){S.push(P)}return{back:j,endOfFile:O,nextToken:_,position:y}},Bn=Ie,Qt=class extends Bn{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)}},js=Qt;Qt.default=Qt;Bn.registerAtRule(Qt);var Wn=Ie,zn,Vn,Te=class extends Wn{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 zn(new Vn,this,e).stringify()}};Te.registerLazyResult=s=>{zn=s};Te.registerProcessor=s=>{Vn=s};var ft=Te;Te.default=Te;Wn.registerRoot(Te);var st={comma(s){return st.split(s,[","],!0)},space(s){let e=[" ",`
|
|
24
|
-
`," "];return st.split(s,e)},split(s,e,t){let r=[],i="",n=!1,o=0,l=!1,a="",u=!1;for(let c of s)u?u=!1:c==="\\"?u=!0:l?c===a&&(l=!1):c==='"'||c==="'"?(l=!0,a=c):c==="("?o+=1:c===")"?o>0&&(o-=1):o===0&&e.includes(c)&&(n=!0),n?(i!==""&&r.push(i.trim()),i="",n=!1):i+=c;return(t||i!=="")&&r.push(i.trim()),r}},Gn=st;st.default=st;var Hn=Ie,ru=Gn,er=class extends Hn{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return ru.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,r=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(r)}},Ys=er;er.default=er;Hn.registerRule(er);var su=fr,iu=tu,nu=pr,ou=js,au=ft,Di=Ys,Ti={empty:!0,space:!0};function lu(s){for(let e=s.length-1;e>=0;e--){let t=s[e],r=t[3]||t[2];if(r)return r}}var uu=class{constructor(e){this.input=e,this.root=new au,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t=new ou;t.name=e[1].slice(1),t.name===""&&this.unnamedAtrule(t,e),this.init(t,e[2]);let r,i,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 nu;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let r=e[1].slice(2,-2);if(/^\s*$/.test(r))t.text="",t.raws.left=r,t.raws.right="";else{let i=r.match(/^(\s*)([^]*\S)(\s*)$/);t.text=i[2],t.raws.left=i[1],t.raws.right=i[3]}}createTokenizer(){this.tokenizer=iu(this.input)}decl(e,t){let r=new su;this.init(r,e[0][2]);let i=e[e.length-1];for(i[0]===";"&&(this.semicolon=!0,e.pop()),r.source.end=this.getPosition(i[3]||i[2]||lu(e)),r.source.end.offset++;e[0][0]!=="word";)e.length===1&&this.unknownWord(e),r.raws.before+=e.shift()[1];for(r.source.start=this.getPosition(e[0][2]),r.prop="";e.length;){let u=e[0][0];if(u===":"||u==="space"||u==="comment")break;r.prop+=e.shift()[1]}r.raws.between="";let n;for(;e.length;)if(n=e.shift(),n[0]===":"){r.raws.between+=n[1];break}else n[0]==="word"&&/\w/.test(n[1])&&this.unknownWord([n]),r.raws.between+=n[1];(r.prop[0]==="_"||r.prop[0]==="*")&&(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let o=[],l;for(;e.length&&(l=e[0][0],!(l!=="space"&&l!=="comment"));)o.push(e.shift());this.precheckMissedSemicolon(e);for(let u=e.length-1;u>=0;u--){if(n=e[u],n[1].toLowerCase()==="!important"){r.important=!0;let c=this.stringFrom(e,u);c=this.spacesFromEnd(e)+c,c!==" !important"&&(r.raws.important=c);break}else if(n[1].toLowerCase()==="important"){let c=e.slice(0),h="";for(let p=u;p>0;p--){let m=c[p][0];if(h.trim().indexOf("!")===0&&m!=="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 Di;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let t=this.current.nodes[this.current.nodes.length-1];t&&t.type==="rule"&&!t.raws.ownSemicolon&&(t.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="",e.type!=="comment"&&(this.semicolon=!1)}other(e){let t=!1,r=null,i=!1,n=null,o=[],l=e[1].startsWith("--"),a=[],u=e;for(;u;){if(r=u[0],a.push(u),r==="("||r==="[")n||(n=u),o.push(r==="("?")":"]");else if(l&&i&&r==="{")n||(n=u),o.push("}");else if(o.length===0)if(r===";")if(i){this.decl(a,l);return}else break;else if(r==="{"){this.rule(a);return}else if(r==="}"){this.tokenizer.back(a.pop()),t=!0;break}else r===":"&&(i=!0);else r===o[o.length-1]&&(o.pop(),o.length===0&&(n=null));u=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),o.length>0&&this.unclosedBracket(n),t&&i){if(!l)for(;a.length&&(u=a[a.length-1][0],!(u!=="space"&&u!=="comment"));)this.tokenizer.back(a.pop());this.decl(a,l)}else this.unknownWord(a)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e);break}this.endFile()}precheckMissedSemicolon(){}raw(e,t,r,i){let n,o,l=r.length,a="",u=!0,c,h;for(let p=0;p<l;p+=1)n=r[p],o=n[0],o==="space"&&p===l-1&&!i?u=!1:o==="comment"?(h=r[p-1]?r[p-1][0]:"empty",c=r[p+1]?r[p+1][0]:"empty",!Ti[h]&&!Ti[c]?a.slice(-1)===","?u=!1:a+=n[1]:u=!1):a+=n[1];if(!u){let p=r.reduce((m,g)=>m+g[1],"");e.raws[t]={raw:p,value:a}}e[t]=a}rule(e){e.pop();let t=new Di;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})}},cu=uu,hu=Ie,fu=cu,du=dr;function tr(s,e){let t=new du(s,e),r=new fu(t);try{r.parse()}catch(i){throw i}return r.root}var Xs=tr;tr.default=tr;hu.registerParse(tr);var{isClean:le,my:pu}=ht,mu=Nn,gu=cr,yu=Ie,wu=Gs;var _i=Hs,bu=Xs,Su=ft,vu={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},Cu={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},Iu={Once:!0,postcssPlugin:!0,prepare:!0},_e=0;function Xe(s){return typeof s=="object"&&typeof s.then=="function"}function jn(s){let e=!1,t=vu[s.type];return s.type==="decl"?e=s.prop.toLowerCase():s.type==="atrule"&&(e=s.name.toLowerCase()),e&&s.append?[t,t+"-"+e,_e,t+"Exit",t+"Exit-"+e]:e?[t,t+"-"+e,t+"Exit",t+"Exit-"+e]:s.append?[t,_e,t+"Exit"]:[t,t+"Exit"]}function ki(s){let e;return s.type==="document"?e=["Document",_e,"DocumentExit"]:s.type==="root"?e=["Root",_e,"RootExit"]:e=jn(s),{eventIndex:0,events:e,iterator:0,node:s,visitorIndex:0,visitors:[]}}function os(s){return s[le]=!1,s.nodes&&s.nodes.forEach(e=>os(e)),s}var as={},ke=class Yn{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 Yn||t instanceof _i)i=os(t.root),t.map&&(typeof r.map>"u"&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=t.map);else{let n=bu;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[pu]&&yu.rebuild(i)}this.result=new _i(e,i,r),this.helpers={...as,postcss:as,result:this.result},this.plugins=this.processor.plugins.map(n=>typeof n=="object"&&n.prepare?{...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(!Cu[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!Iu[r])if(typeof t[r]=="object")for(let i in t[r])i==="*"?e(t,r,t[r][i]):e(t,r+"-"+i.toLowerCase(),t[r][i]);else typeof t[r]=="function"&&e(t,r,t[r])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let t=this.plugins[e],r=this.runOnRoot(t);if(Xe(r))try{await r}catch(i){throw this.handleError(i)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[le];){e[le]=!0;let t=[ki(e)];for(;t.length>0;){let r=this.visitTick(t);if(Xe(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 Xe(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}else if(typeof e=="function")return e(this.result.root,this.result)}catch(t){throw this.handleError(t)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=gu;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let i=new mu(t,this.result.root,this.result.opts).generate();return this.result.css=i[0],this.result.map=i[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins){let t=this.runOnRoot(e);if(Xe(t))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[le];)e[le]=!0,this.walkSync(e);if(this.listeners.OnceExit)if(e.type==="document")for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,t){return this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[r,i]of e){this.result.lastPlugin=r;let n;try{n=i(t,this.helpers)}catch(o){throw this.handleError(o,t.proxyOf)}if(t.type!=="root"&&t.type!=="document"&&!t.parent)return!0;if(Xe(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[le]){l[le]=!0,e.push(ki(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===_e){r.nodes&&r.nodes.length&&(r[le]=!0,t.iterator=r.getIterator());return}else if(this.listeners[o]){t.visitors=this.listeners[o];return}}e.pop()}walkSync(e){e[le]=!0;let t=jn(e);for(let r of t)if(r===_e)e.nodes&&e.each(i=>{i[le]||this.walkSync(i)});else{let i=this.listeners[r];if(i&&this.visitSync(i,e.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}};ke.registerPostcss=s=>{as=s};var Xn=ke;ke.default=ke;Su.registerLazyResult(ke);wu.registerLazyResult(ke);var Eu=Nn,xu=cr;var Mu=Xs,Nu=Hs,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=xu;this.result=new Nu(this._processor,i,this._opts),this.result.css=t;let o=this;Object.defineProperty(this.result,"root",{get(){return o.root}});let l=new Eu(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=Mu;try{e=t(this._css,this._opts)}catch(r){this.error=r}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}},Ru=ls;ls.default=ls;var Au=Ru,Ou=Xn,Du=Gs,Tu=ft,it=class{constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let r of e)if(r.postcss===!0?r=r():r.postcss&&(r=r.postcss),typeof r=="object"&&Array.isArray(r.plugins))t=t.concat(r.plugins);else if(typeof r=="object"&&r.postcssPlugin)t.push(r);else if(typeof r=="function")t.push(r);else if(!(typeof r=="object"&&(r.parse||r.stringify)))throw new Error(r+" is not a PostCSS plugin");return t}process(e,t={}){return!this.plugins.length&&!t.parser&&!t.stringifier&&!t.syntax?new Au(this,e,t):new Ou(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}},_u=it;it.default=it;Tu.registerProcessor(it);Du.registerProcessor(it);var ku=fr,$u=Cn,Pu=pr,Lu=js,Fu=dr,Uu=ft,Bu=Ys;function nt(s,e){if(Array.isArray(s))return s.map(i=>nt(i));let{inputs:t,...r}=s;if(t){e=[];for(let i of t){let n={...i,__proto__:Fu.prototype};n.map&&(n.map={...n.map,__proto__:$u.prototype}),e.push(n)}}if(r.nodes&&(r.nodes=s.nodes.map(i=>nt(i,e))),r.source){let{inputId:i,...n}=r.source;r.source=n,i!=null&&(r.source.input=e[i])}if(r.type==="root")return new Uu(r);if(r.type==="decl")return new ku(r);if(r.type==="rule")return new Bu(r);if(r.type==="comment")return new Pu(r);if(r.type==="atrule")return new Lu(r);throw new Error("Unknown node type: "+s.type)}var Wu=nt;nt.default=nt;var zu=Ws,Zn=fr,Vu=Xn,Gu=Ie,Zs=_u,Hu=cr,ju=Wu,Jn=Gs,Yu=Un,Kn=pr,qn=js,Xu=Hs,Zu=dr,Ju=Xs,Ku=Gn,Qn=Ys,eo=ft,qu=hr;function R(...s){return s.length===1&&Array.isArray(s[0])&&(s=s[0]),new Zs(s)}R.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:
|
|
22
|
+
`),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t=this.toUrl(this.path(e.file)),r=e.root||jt(e.file),i;this.mapOpts.sourcesContent===!1?(i=new Mn(e.text),i.sourcesContent&&(i.sourcesContent=null)):i=e.consumer(),this.map.applySourceMap(i,t,this.toUrl(this.path(r)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],e.type==="comment"&&e.text.indexOf("# sourceMappingURL=")===0&&this.root.removeChild(t)}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),Wl&&Bl&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,t=>{e+=t}),[e]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=Ht.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new Ht({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 Ht({file:this.outputFile(),ignoreInvalidMapping:!0});let e=1,t=1,r="<no source>",i={generated:{column:0,line:0},original:{column:0,line:0},source:""},n,o;this.stringify(this.root,(l,a,u)=>{if(this.css+=l,a&&u!=="end"&&(i.generated.line=e,i.generated.column=t-1,a.source&&a.source.start?(i.source=this.sourcePath(a),i.original.line=a.source.start.line,i.original.column=a.source.start.column-1,this.map.addMapping(i)):(i.source=r,i.original.line=1,i.original.column=0,this.map.addMapping(i))),n=l.match(/\n/g),n?(e+=n.length,o=l.lastIndexOf(`
|
|
23
|
+
`),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<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(e=>e.annotation):!0}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let e=this.mapOpts.annotation;return typeof e<"u"&&e!==!0?!1:this.previous().length?this.previous().some(t=>t.inline):!0}isMap(){return typeof this.opts.map<"u"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent<"u"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(e=>e.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute||e.charCodeAt(0)===60||/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let r=this.opts.to?jt(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(r=jt(Rn(r,this.mapOpts.annotation)));let i=Nn(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 Ul(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(Oi){let r=Oi(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;An==="\\"&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}},On=zl,Vl=dr,ns=class extends Vl{constructor(e){super(e),this.type="comment"}},gr=ns;ns.default=ns;var{isClean:Dn,my:Tn}=ft,kn=pr,_n=gr,Gl=dr,$n,Gs,Hs,Pn;function Ln(s){return s.map(e=>(e.nodes&&(e.nodes=Ln(e.nodes)),delete e.source,e))}function Fn(s){if(s[Dn]=!1,s.proxyOf.nodes)for(let e of s.proxyOf.nodes)Fn(e)}var fe=class Un extends Gl{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=Ln($n(e).nodes);else if(typeof e>"u")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>"u")throw new Error("Value field is missed in node creation");typeof e.value!="string"&&(e.value=String(e.value)),e=[new kn(e)]}else if(e.selector)e=[new Gs(e)];else if(e.name)e=[new Hs(e)];else if(e.text)e=[new _n(e)];else throw new Error("Unknown node type in node creation");return e.map(i=>(i[Tn]||Un.rebuild(i),i=i.proxyOf,i.parent&&i.parent.removeChild(i),i[Dn]&&Fn(i),typeof i.raws.before>"u"&&t&&typeof t.raws.before<"u"&&(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=>{$n=s};fe.registerRule=s=>{Gs=s};fe.registerAtRule=s=>{Hs=s};fe.registerRoot=s=>{Pn=s};var Ie=fe;fe.default=fe;fe.rebuild=s=>{s.type==="atrule"?Object.setPrototypeOf(s,Hs.prototype):s.type==="rule"?Object.setPrototypeOf(s,Gs.prototype):s.type==="decl"?Object.setPrototypeOf(s,kn.prototype):s.type==="comment"?Object.setPrototypeOf(s,_n.prototype):s.type==="root"&&Object.setPrototypeOf(s,Pn.prototype),s[Tn]=!0,s.nodes&&s.nodes.forEach(e=>{fe.rebuild(e)})};var Hl=Ie,Bn,Wn,st=class extends Hl{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new Bn(new Wn,this,e).stringify()}};st.registerLazyResult=s=>{Bn=s};st.registerProcessor=s=>{Wn=s};var js=st;st.default=st;var os=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}},zn=os;os.default=os;var jl=zn,as=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 jl(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>e.type==="warning")}get content(){return this.css}},Ys=as;as.default=as;var Br=39,Di=34,Mt=92,Ti=47,Nt=10,Xe=32,Rt=12,At=9,Ot=13,Yl=91,Xl=93,Zl=40,Jl=41,ql=123,Kl=125,Ql=59,eu=42,tu=58,ru=64,Dt=/[\t\n\f\r "#'()/;[\\\]{}]/g,Tt=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,su=/.[\r\n"'(/\\]/,ki=/[\da-f]/i,iu=function(e,t={}){let r=e.css.valueOf(),i=t.ignoreErrors,n,o,l,a,u,c,h,p,m,g,d=r.length,f=0,b=[],v=[];function y(){return f}function S(L){throw e.error("Unclosed "+L,f)}function D(){return v.length===0&&f>=d}function _(L){if(v.length)return v.pop();if(f>=d)return;let V=L?L.ignoreUnclosed:!1;switch(n=r.charCodeAt(f),n){case Nt:case Xe:case At:case Ot:case Rt:{o=f;do o+=1,n=r.charCodeAt(o);while(n===Xe||n===Nt||n===At||n===Ot||n===Rt);g=["space",r.slice(f,o)],f=o-1;break}case Yl:case Xl:case ql:case Kl:case tu:case Ql:case Jl:{let Y=String.fromCharCode(n);g=[Y,Y,f];break}case Zl:{if(p=b.length?b.pop()[1]:"",m=r.charCodeAt(f+1),p==="url"&&m!==Br&&m!==Di&&m!==Xe&&m!==Nt&&m!==At&&m!==Rt&&m!==Ot){o=f;do{if(c=!1,o=r.indexOf(")",o+1),o===-1)if(i||V){o=f;break}else S("bracket");for(h=o;r.charCodeAt(h-1)===Mt;)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||su.test(a)?g=["(","(",f]:(g=["brackets",a,f,o],f=o);break}case Br:case Di:{l=n===Br?"'":'"',o=f;do{if(c=!1,o=r.indexOf(l,o+1),o===-1)if(i||V){o=f+1;break}else S("string");for(h=o;r.charCodeAt(h-1)===Mt;)h-=1,c=!c}while(c);g=["string",r.slice(f,o+1),f,o],f=o;break}case ru:{Dt.lastIndex=f+1,Dt.test(r),Dt.lastIndex===0?o=r.length-1:o=Dt.lastIndex-2,g=["at-word",r.slice(f,o+1),f,o],f=o;break}case Mt:{for(o=f,u=!0;r.charCodeAt(o+1)===Mt;)o+=1,u=!u;if(n=r.charCodeAt(o+1),u&&n!==Ti&&n!==Xe&&n!==Nt&&n!==At&&n!==Ot&&n!==Rt&&(o+=1,ki.test(r.charAt(o)))){for(;ki.test(r.charAt(o+1));)o+=1;r.charCodeAt(o+1)===Xe&&(o+=1)}g=["word",r.slice(f,o+1),f,o],f=o;break}default:{n===Ti&&r.charCodeAt(f+1)===eu?(o=r.indexOf("*/",f+2)+1,o===0&&(i||V?o=r.length:S("comment")),g=["comment",r.slice(f,o+1),f,o],f=o):(Tt.lastIndex=f+1,Tt.test(r),Tt.lastIndex===0?o=r.length-1:o=Tt.lastIndex-2,g=["word",r.slice(f,o+1),f,o],b.push(g),f=o);break}}return f++,g}function j(L){v.push(L)}return{back:j,endOfFile:D,nextToken:_,position:y}},Vn=Ie,tr=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)}},Xs=tr;tr.default=tr;Vn.registerAtRule(tr);var Gn=Ie,Hn,jn,ke=class extends Gn{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 Hn(new jn,this,e).stringify()}};ke.registerLazyResult=s=>{Hn=s};ke.registerProcessor=s=>{jn=s};var dt=ke;ke.default=ke;Gn.registerRoot(ke);var it={comma(s){return it.split(s,[","],!0)},space(s){let e=[" ",`
|
|
24
|
+
`," "];return it.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}},Yn=it;it.default=it;var Xn=Ie,nu=Yn,rr=class extends Xn{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return nu.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)}},Zs=rr;rr.default=rr;Xn.registerRule(rr);var ou=pr,au=iu,lu=gr,uu=Xs,cu=dt,_i=Zs,$i={empty:!0,space:!0};function hu(s){for(let e=s.length-1;e>=0;e--){let t=s[e],r=t[3]||t[2];if(r)return r}}var fu=class{constructor(e){this.input=e,this.root=new cu,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 uu;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 lu;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=au(this.input)}decl(e,t){let r=new ou;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]||hu(e)),r.source.end.offset++;e[0][0]!=="word";)e.length===1&&this.unknownWord(e),r.raws.before+=e.shift()[1];for(r.source.start=this.getPosition(e[0][2]),r.prop="";e.length;){let u=e[0][0];if(u===":"||u==="space"||u==="comment")break;r.prop+=e.shift()[1]}r.raws.between="";let n;for(;e.length;)if(n=e.shift(),n[0]===":"){r.raws.between+=n[1];break}else n[0]==="word"&&/\w/.test(n[1])&&this.unknownWord([n]),r.raws.between+=n[1];(r.prop[0]==="_"||r.prop[0]==="*")&&(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let o=[],l;for(;e.length&&(l=e[0][0],!(l!=="space"&&l!=="comment"));)o.push(e.shift());this.precheckMissedSemicolon(e);for(let u=e.length-1;u>=0;u--){if(n=e[u],n[1].toLowerCase()==="!important"){r.important=!0;let c=this.stringFrom(e,u);c=this.spacesFromEnd(e)+c,c!==" !important"&&(r.raws.important=c);break}else if(n[1].toLowerCase()==="important"){let c=e.slice(0),h="";for(let p=u;p>0;p--){let m=c[p][0];if(h.trim().indexOf("!")===0&&m!=="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 _i;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let t=this.current.nodes[this.current.nodes.length-1];t&&t.type==="rule"&&!t.raws.ownSemicolon&&(t.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="",e.type!=="comment"&&(this.semicolon=!1)}other(e){let t=!1,r=null,i=!1,n=null,o=[],l=e[1].startsWith("--"),a=[],u=e;for(;u;){if(r=u[0],a.push(u),r==="("||r==="[")n||(n=u),o.push(r==="("?")":"]");else if(l&&i&&r==="{")n||(n=u),o.push("}");else if(o.length===0)if(r===";")if(i){this.decl(a,l);return}else break;else if(r==="{"){this.rule(a);return}else if(r==="}"){this.tokenizer.back(a.pop()),t=!0;break}else r===":"&&(i=!0);else r===o[o.length-1]&&(o.pop(),o.length===0&&(n=null));u=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),o.length>0&&this.unclosedBracket(n),t&&i){if(!l)for(;a.length&&(u=a[a.length-1][0],!(u!=="space"&&u!=="comment"));)this.tokenizer.back(a.pop());this.decl(a,l)}else this.unknownWord(a)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e);break}this.endFile()}precheckMissedSemicolon(){}raw(e,t,r,i){let n,o,l=r.length,a="",u=!0,c,h;for(let p=0;p<l;p+=1)n=r[p],o=n[0],o==="space"&&p===l-1&&!i?u=!1:o==="comment"?(h=r[p-1]?r[p-1][0]:"empty",c=r[p+1]?r[p+1][0]:"empty",!$i[h]&&!$i[c]?a.slice(-1)===","?u=!1:a+=n[1]:u=!1):a+=n[1];if(!u){let p=r.reduce((m,g)=>m+g[1],"");e.raws[t]={raw:p,value:a}}e[t]=a}rule(e){e.pop();let t=new _i;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})}},du=fu,pu=Ie,mu=du,gu=mr;function sr(s,e){let t=new gu(s,e),r=new mu(t);try{r.parse()}catch(i){throw i}return r.root}var Js=sr;sr.default=sr;pu.registerParse(sr);var{isClean:ue,my:yu}=ft,wu=On,bu=fr,vu=Ie,Su=js;var Pi=Ys,Cu=Js,Eu=dt,Iu={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},xu={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},Mu={Once:!0,postcssPlugin:!0,prepare:!0},_e=0;function Ze(s){return typeof s=="object"&&typeof s.then=="function"}function Zn(s){let e=!1,t=Iu[s.type];return s.type==="decl"?e=s.prop.toLowerCase():s.type==="atrule"&&(e=s.name.toLowerCase()),e&&s.append?[t,t+"-"+e,_e,t+"Exit",t+"Exit-"+e]:e?[t,t+"-"+e,t+"Exit",t+"Exit-"+e]:s.append?[t,_e,t+"Exit"]:[t,t+"Exit"]}function Li(s){let e;return s.type==="document"?e=["Document",_e,"DocumentExit"]:s.type==="root"?e=["Root",_e,"RootExit"]:e=Zn(s),{eventIndex:0,events:e,iterator:0,node:s,visitorIndex:0,visitors:[]}}function ls(s){return s[ue]=!1,s.nodes&&s.nodes.forEach(e=>ls(e)),s}var us={},$e=class Jn{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=ls(t);else if(t instanceof Jn||t instanceof Pi)i=ls(t.root),t.map&&(typeof r.map>"u"&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=t.map);else{let n=Cu;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[yu]&&vu.rebuild(i)}this.result=new Pi(e,i,r),this.helpers={...us,postcss:us,result:this.result},this.plugins=this.processor.plugins.map(n=>typeof n=="object"&&n.prepare?{...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(!xu[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!Mu[r])if(typeof t[r]=="object")for(let i in t[r])i==="*"?e(t,r,t[r][i]):e(t,r+"-"+i.toLowerCase(),t[r][i]);else typeof t[r]=="function"&&e(t,r,t[r])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let t=this.plugins[e],r=this.runOnRoot(t);if(Ze(r))try{await r}catch(i){throw this.handleError(i)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[ue];){e[ue]=!0;let t=[Li(e)];for(;t.length>0;){let r=this.visitTick(t);if(Ze(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 Ze(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}else if(typeof e=="function")return e(this.result.root,this.result)}catch(t){throw this.handleError(t)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=bu;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let i=new wu(t,this.result.root,this.result.opts).generate();return this.result.css=i[0],this.result.map=i[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins){let t=this.runOnRoot(e);if(Ze(t))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[ue];)e[ue]=!0,this.walkSync(e);if(this.listeners.OnceExit)if(e.type==="document")for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,t){return this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[r,i]of e){this.result.lastPlugin=r;let 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(Ze(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(Li(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===_e){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=Zn(e);for(let r of t)if(r===_e)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=>{us=s};var qn=$e;$e.default=$e;Eu.registerLazyResult($e);Su.registerLazyResult($e);var Nu=On,Ru=fr;var Au=Js,Ou=Ys,cs=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=Ru;this.result=new Ou(this._processor,i,this._opts),this.result.css=t;let o=this;Object.defineProperty(this.result,"root",{get(){return o.root}});let l=new Nu(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=Au;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"}},Du=cs;cs.default=cs;var Tu=Du,ku=qn,_u=js,$u=dt,nt=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 Tu(this,e,t):new ku(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}},Pu=nt;nt.default=nt;$u.registerProcessor(nt);_u.registerProcessor(nt);var Lu=pr,Fu=xn,Uu=gr,Bu=Xs,Wu=mr,zu=dt,Vu=Zs;function ot(s,e){if(Array.isArray(s))return s.map(i=>ot(i));let{inputs:t,...r}=s;if(t){e=[];for(let i of t){let n={...i,__proto__:Wu.prototype};n.map&&(n.map={...n.map,__proto__:Fu.prototype}),e.push(n)}}if(r.nodes&&(r.nodes=s.nodes.map(i=>ot(i,e))),r.source){let{inputId:i,...n}=r.source;r.source=n,i!=null&&(r.source.input=e[i])}if(r.type==="root")return new zu(r);if(r.type==="decl")return new Lu(r);if(r.type==="rule")return new Vu(r);if(r.type==="comment")return new Uu(r);if(r.type==="atrule")return new Bu(r);throw new Error("Unknown node type: "+s.type)}var Gu=ot;ot.default=ot;var Hu=Vs,Kn=pr,ju=qn,Yu=Ie,qs=Pu,Xu=fr,Zu=Gu,Qn=js,Ju=zn,eo=gr,to=Xs,qu=Ys,Ku=mr,Qu=Js,ec=Yn,ro=Zs,so=dt,tc=dr;function R(...s){return s.length===1&&Array.isArray(s[0])&&(s=s[0]),new qs(s)}R.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:
|
|
25
25
|
https://evilmartians.com/chronicles/postcss-8-plugin-migration`),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(e+`: \u91CC\u9762 postcss.plugin \u88AB\u5F03\u7528. \u8FC1\u79FB\u6307\u5357:
|
|
26
|
-
https://www.w3ctech.com/topic/2226`));let l=t(...o);return l.postcssPlugin=e,l.postcssVersion=new
|
|
26
|
+
https://www.w3ctech.com/topic/2226`));let l=t(...o);return l.postcssPlugin=e,l.postcssVersion=new qs().version,l}let n;return Object.defineProperty(i,"postcss",{get(){return n||(n=i()),n}}),i.process=function(o,l,a){return R([i(a)]).process(o,l)},i};R.stringify=Xu;R.parse=Qu;R.fromJSON=Zu;R.list=ec;R.comment=s=>new eo(s);R.atRule=s=>new to(s);R.decl=s=>new Kn(s);R.rule=s=>new ro(s);R.root=s=>new so(s);R.document=s=>new Qn(s);R.CssSyntaxError=Hu;R.Declaration=Kn;R.Container=Yu;R.Processor=qs;R.Document=Qn;R.Comment=eo;R.Warning=Ju;R.AtRule=to;R.Result=qu;R.Input=Ku;R.Rule=ro;R.Root=so;R.Node=tc;ju.registerPostcss(R);var rc=R;R.default=R;var F=pl(rc);F.stringify;F.fromJSON;F.plugin;F.parse;F.list;F.document;F.comment;F.atRule;F.rule;F.decl;F.root;F.CssSyntaxError;F.Declaration;F.Container;F.Processor;F.Document;F.Comment;F.Warning;F.AtRule;F.Result;F.Input;F.Rule;F.Root;F.Node;var sc=Object.defineProperty,ic=(s,e,t)=>e in s?sc(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,ee=(s,e,t)=>ic(s,typeof e!="symbol"?e+"":e,t);function nc(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}function oc(s){if(s.__esModule)return s;var e=s.default;if(typeof e=="function"){var t=function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(s).forEach(function(r){var i=Object.getOwnPropertyDescriptor(s,r);Object.defineProperty(t,r,i.get?i:{enumerable:!0,get:function(){return s[r]}})}),t}var Ks={exports:{}},P=String,io=function(){return{isColorSupported:!1,reset:P,bold:P,dim:P,italic:P,underline:P,inverse:P,hidden:P,strikethrough:P,black:P,red:P,green:P,yellow:P,blue:P,magenta:P,cyan:P,white:P,gray:P,bgBlack:P,bgRed:P,bgGreen:P,bgYellow:P,bgBlue:P,bgMagenta:P,bgCyan:P,bgWhite:P}};Ks.exports=io();Ks.exports.createColors=io;var ac=Ks.exports,lc={},uc=Object.freeze(Object.defineProperty({__proto__:null,default:lc},Symbol.toStringTag,{value:"Module"})),ie=oc(uc),Fi=ac,Ui=ie,hs=class no 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<"u"&&typeof r<"u"&&(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,no)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let t=this.source;e==null&&(e=Fi.isColorSupported),Ui&&e&&(t=Ui(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}=Fi.createColors(!0);l=p=>u(h(p)),a=p=>c(p)}else l=a=u=>u;return r.slice(i,n).map((u,c)=>{let h=i+1+c,p=" "+(" "+h).slice(-o)+" | ";if(h===this.line){let m=a(p.replace(/\d/g," "))+u.slice(0,this.column-1).replace(/[^\t]/g," ");return l(">")+a(p)+u+`
|
|
27
27
|
`+m+l("^")}return" "+a(p)+u}).join(`
|
|
28
28
|
`)}toString(){let e=this.showSourceCode();return e&&(e=`
|
|
29
29
|
|
|
30
30
|
`+e+`
|
|
31
|
-
`),this.name+": "+this.message+e}},
|
|
31
|
+
`),this.name+": "+this.message+e}},Qs=hs;hs.default=hs;var pt={};pt.isClean=Symbol("isClean");pt.my=Symbol("my");var Bi={after:`
|
|
32
32
|
`,beforeClose:`
|
|
33
33
|
`,beforeComment:`
|
|
34
34
|
`,beforeDecl:`
|
|
35
35
|
`,beforeOpen:" ",beforeRule:`
|
|
36
|
-
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function
|
|
37
|
-
`)){let o=this.raw(e,null,"indent");if(o.length)for(let l=0;l<n;l++)r+=o}return r}block(e,t){let r=this.raw(e,"between","beforeOpen");this.builder(t+r+"{",e,"start");let i;e.nodes&&e.nodes.length?(this.body(e),i=this.raw(e,"after")):i=this.raw(e,"after","emptyBody"),i&&this.builder(i),this.builder("}",e,"end")}body(e){let t=e.nodes.length-1;for(;t>0&&e.nodes[t].type==="comment";)t-=1;let r=this.raw(e,"semicolon");for(let i=0;i<e.nodes.length;i++){let n=e.nodes[i],o=this.raw(n,"before");o&&this.builder(o),this.stringify(n,t!==i||r)}}comment(e){let t=this.raw(e,"left","commentLeft"),r=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+r+"*/",e)}decl(e,t){let r=this.raw(e,"between","colon"),i=e.prop+r+this.rawValue(e,"value");e.important&&(i+=e.raws.important||" !important"),t&&(i+=";"),this.builder(i,e)}document(e){this.body(e)}raw(e,t,r){let i;if(r||(r=t),t&&(i=e.raws[t],typeof i<"u"))return i;let n=e.parent;if(r==="before"&&(!n||n.type==="root"&&n.first===e||n&&n.type==="document"))return"";if(!n)return
|
|
36
|
+
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function cc(s){return s[0].toUpperCase()+s.slice(1)}var fs=class{constructor(e){this.builder=e}atrule(e,t){let r="@"+e.name,i=e.params?this.rawValue(e,"params"):"";if(typeof e.raws.afterName<"u"?r+=e.raws.afterName:i&&(r+=" "),e.nodes)this.block(e,r+i);else{let n=(e.raws.between||"")+(t?";":"");this.builder(r+i+n,e)}}beforeAfter(e,t){let r;e.type==="decl"?r=this.raw(e,null,"beforeDecl"):e.type==="comment"?r=this.raw(e,null,"beforeComment"):t==="before"?r=this.raw(e,null,"beforeRule"):r=this.raw(e,null,"beforeClose");let i=e.parent,n=0;for(;i&&i.type!=="root";)n+=1,i=i.parent;if(r.includes(`
|
|
37
|
+
`)){let o=this.raw(e,null,"indent");if(o.length)for(let l=0;l<n;l++)r+=o}return r}block(e,t){let r=this.raw(e,"between","beforeOpen");this.builder(t+r+"{",e,"start");let i;e.nodes&&e.nodes.length?(this.body(e),i=this.raw(e,"after")):i=this.raw(e,"after","emptyBody"),i&&this.builder(i),this.builder("}",e,"end")}body(e){let t=e.nodes.length-1;for(;t>0&&e.nodes[t].type==="comment";)t-=1;let r=this.raw(e,"semicolon");for(let i=0;i<e.nodes.length;i++){let n=e.nodes[i],o=this.raw(n,"before");o&&this.builder(o),this.stringify(n,t!==i||r)}}comment(e){let t=this.raw(e,"left","commentLeft"),r=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+r+"*/",e)}decl(e,t){let r=this.raw(e,"between","colon"),i=e.prop+r+this.rawValue(e,"value");e.important&&(i+=e.raws.important||" !important"),t&&(i+=";"),this.builder(i,e)}document(e){this.body(e)}raw(e,t,r){let i;if(r||(r=t),t&&(i=e.raws[t],typeof i<"u"))return i;let n=e.parent;if(r==="before"&&(!n||n.type==="root"&&n.first===e||n&&n.type==="document"))return"";if(!n)return Bi[r];let o=e.root();if(o.rawCache||(o.rawCache={}),typeof o.rawCache[r]<"u")return o.rawCache[r];if(r==="before"||r==="after")return this.beforeAfter(e,r);{let l="raw"+cc(r);this[l]?i=this[l](o,e):o.walk(a=>{if(i=a.raws[t],typeof i<"u")return!1})}return typeof i>"u"&&(i=Bi[r]),o.rawCache[r]=i,i}rawBeforeClose(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length>0&&typeof r.raws.after<"u")return t=r.raws.after,t.includes(`
|
|
38
38
|
`)&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let r;return e.walkComments(i=>{if(typeof i.raws.before<"u")return r=i.raws.before,r.includes(`
|
|
39
39
|
`)&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r>"u"?r=this.raw(t,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeDecl(e,t){let r;return e.walkDecls(i=>{if(typeof i.raws.before<"u")return r=i.raws.before,r.includes(`
|
|
40
40
|
`)&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r>"u"?r=this.raw(t,null,"beforeRule"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeOpen(e){let t;return e.walk(r=>{if(r.type!=="decl"&&(t=r.raws.between,typeof t<"u"))return!1}),t}rawBeforeRule(e){let t;return e.walk(r=>{if(r.nodes&&(r.parent!==e||e.first!==r)&&typeof r.raws.before<"u")return t=r.raws.before,t.includes(`
|
|
41
41
|
`)&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls(r=>{if(typeof r.raws.between<"u")return t=r.raws.between.replace(/[^\s:]/g,""),!1}),t}rawEmptyBody(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length===0&&(t=r.raws.after,typeof t<"u"))return!1}),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk(r=>{let i=r.parent;if(i&&i!==e&&i.parent&&i.parent===e&&typeof r.raws.before<"u"){let n=r.raws.before.split(`
|
|
42
|
-
`);return t=n[n.length-1],t=t.replace(/\S/g,""),!1}}),t}rawSemicolon(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length&&r.last.type==="decl"&&(t=r.raws.semicolon,typeof t<"u"))return!1}),t}rawValue(e,t){let r=e[t],i=e.raws[t];return i&&i.value===r?i.raw:r}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}},
|
|
43
|
-
`?(i=1,n+=1):i+=1;return{column:i,line:n}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e){let t={column:this.source.start.column,line:this.source.start.line},r=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:t.column+1,line:t.line};if(e.word){let i=this.toString(),n=i.indexOf(e.word);n!==-1&&(t=this.positionInside(n,i),r=this.positionInside(n+e.word.length,i))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?r={column:e.end.column,line:e.end.line}:typeof e.endIndex=="number"?r=this.positionInside(e.endIndex):e.index&&(r=this.positionInside(e.index+1));return(r.line<t.line||r.line===t.line&&r.column<=t.column)&&(r={column:t.column+1,line:t.line}),{end:r,start:t}}raw(e,t){return new
|
|
44
|
-
`);r=new Array(n.length);let o=0;for(let l=0,a=n.length;l<a;l++)r[l]=o,o+=n[l].length+1;this[
|
|
42
|
+
`);return t=n[n.length-1],t=t.replace(/\S/g,""),!1}}),t}rawSemicolon(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length&&r.last.type==="decl"&&(t=r.raws.semicolon,typeof t<"u"))return!1}),t}rawValue(e,t){let r=e[t],i=e.raws[t];return i&&i.value===r?i.raw:r}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}},oo=fs;fs.default=fs;var hc=oo;function ds(s,e){new hc(e).stringify(s)}var yr=ds;ds.default=ds;var{isClean:kt,my:fc}=pt,dc=Qs,pc=oo,mc=yr;function ps(s,e){let t=new s.constructor;for(let r in s){if(!Object.prototype.hasOwnProperty.call(s,r)||r==="proxyCache")continue;let i=s[r],n=typeof i;r==="parent"&&n==="object"?e&&(t[r]=e):r==="source"?t[r]=i:Array.isArray(i)?t[r]=i.map(o=>ps(o,t)):(n==="object"&&i!==null&&(i=ps(i)),t[r]=i)}return t}var ms=class{constructor(e={}){this.raws={},this[kt]=!1,this[fc]=!0;for(let t in e)if(t==="nodes"){this.nodes=[];for(let r of e[t])typeof r.clone=="function"?this.append(r.clone()):this.append(r)}else this[t]=e[t]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let t in e)this[t]=e[t];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let t=ps(this);for(let r in e)t[r]=e[r];return t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}error(e,t={}){if(this.source){let{end:r,start:i}=this.rangeBy(t);return this.source.input.error(e,{column:i.column,line:i.line},{column:r.column,line:r.line},t)}return new dc(e)}getProxyProcessor(){return{get(e,t){return t==="proxyOf"?e:t==="root"?()=>e.root().toProxy():e[t]},set(e,t,r){return e[t]===r||(e[t]=r,(t==="prop"||t==="value"||t==="name"||t==="params"||t==="important"||t==="text")&&e.markDirty()),!0}}}markDirty(){if(this[kt]){this[kt]=!1;let e=this;for(;e=e.parent;)e[kt]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let r=this.source.start;if(e.index)r=this.positionInside(e.index,t);else if(e.word){t=this.toString();let i=t.indexOf(e.word);i!==-1&&(r=this.positionInside(i,t))}return r}positionInside(e,t){let r=t||this.toString(),i=this.source.start.column,n=this.source.start.line;for(let o=0;o<e;o++)r[o]===`
|
|
43
|
+
`?(i=1,n+=1):i+=1;return{column:i,line:n}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e){let t={column:this.source.start.column,line:this.source.start.line},r=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:t.column+1,line:t.line};if(e.word){let i=this.toString(),n=i.indexOf(e.word);n!==-1&&(t=this.positionInside(n,i),r=this.positionInside(n+e.word.length,i))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?r={column:e.end.column,line:e.end.line}:typeof e.endIndex=="number"?r=this.positionInside(e.endIndex):e.index&&(r=this.positionInside(e.index+1));return(r.line<t.line||r.line===t.line&&r.column<=t.column)&&(r={column:t.column+1,line:t.line}),{end:r,start:t}}raw(e,t){return new pc().raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let t=this,r=!1;for(let i of e)i===this?r=!0:r?(this.parent.insertAfter(t,i),t=i):this.parent.insertBefore(t,i);r||this.remove()}return this}root(){let e=this;for(;e.parent&&e.parent.type!=="document";)e=e.parent;return e}toJSON(e,t){let r={},i=t==null;t=t||new Map;let n=0;for(let o in this){if(!Object.prototype.hasOwnProperty.call(this,o)||o==="parent"||o==="proxyCache")continue;let l=this[o];if(Array.isArray(l))r[o]=l.map(a=>typeof a=="object"&&a.toJSON?a.toJSON(null,t):a);else if(typeof l=="object"&&l.toJSON)r[o]=l.toJSON(null,t);else if(o==="source"){let a=t.get(l.input);a==null&&(a=n,t.set(l.input,n),n++),r[o]={end:l.end,inputId:a,start:l.start}}else r[o]=l}return i&&(r.inputs=[...t.keys()].map(o=>o.toJSON())),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=mc){e.stringify&&(e=e.stringify);let t="";return e(this,r=>{t+=r}),t}warn(e,t,r){let i={node:this};for(let n in r)i[n]=r[n];return e.warn(t,i)}get proxyOf(){return this}},wr=ms;ms.default=ms;var gc=wr,gs=class extends gc{constructor(e){e&&typeof e.value<"u"&&typeof e.value!="string"&&(e={...e,value:String(e.value)}),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}},br=gs;gs.default=gs;var yc="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",wc=(s,e=21)=>(t=e)=>{let r="",i=t;for(;i--;)r+=s[Math.random()*s.length|0];return r},bc=(s=21)=>{let e="",t=s;for(;t--;)e+=yc[Math.random()*64|0];return e},vc={nanoid:bc,customAlphabet:wc},{SourceMapConsumer:Wi,SourceMapGenerator:zi}=ie,{existsSync:Sc,readFileSync:Cc}=ie,{dirname:Wr,join:Ec}=ie;function Ic(s){return Buffer?Buffer.from(s,"base64").toString():window.atob(s)}var ys=class{constructor(e,t){if(t.map===!1)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let r=t.map?t.map.prev:void 0,i=this.loadMap(t.from,r);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=Wr(this.mapFile)),i&&(this.text=i)}consumer(){return this.consumerCache||(this.consumerCache=new Wi(this.text)),this.consumerCache}decodeInline(e){let t=/^data:application\/json;charset=utf-?8;base64,/,r=/^data:application\/json;base64,/,i=/^data:application\/json;charset=utf-?8,/,n=/^data:application\/json,/;if(i.test(e)||n.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(t.test(e)||r.test(e))return Ic(e.substr(RegExp.lastMatch.length));let o=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+o)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return typeof e!="object"?!1:typeof e.mappings=="string"||typeof e._mappings=="string"||Array.isArray(e.sections)}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/gm);if(!t)return;let r=e.lastIndexOf(t.pop()),i=e.indexOf("*/",r);r>-1&&i>-1&&(this.annotation=this.getAnnotationURL(e.substring(r,i)))}loadFile(e){if(this.root=Wr(e),Sc(e))return this.mapFile=e,Cc(e,"utf-8").toString().trim()}loadMap(e,t){if(t===!1)return!1;if(t){if(typeof t=="string")return t;if(typeof t=="function"){let r=t(e);if(r){let i=this.loadFile(r);if(!i)throw new Error("Unable to load previous source map: "+r.toString());return i}}else{if(t instanceof Wi)return zi.fromSourceMap(t).toString();if(t instanceof zi)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let r=this.annotation;return e&&(r=Ec(Wr(e),r)),this.loadFile(r)}}}startWith(e,t){return e?e.substr(0,t.length)===t:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}},ao=ys;ys.default=ys;var{SourceMapConsumer:xc,SourceMapGenerator:Mc}=ie,{fileURLToPath:Vi,pathToFileURL:_t}=ie,{isAbsolute:ws,resolve:bs}=ie,{nanoid:Nc}=vc,zr=ie,Gi=Qs,Rc=ao,Vr=Symbol("fromOffsetCache"),Ac=!!(xc&&Mc),Hi=!!(bs&&ws),ir=class{constructor(e,t={}){if(e===null||typeof e>"u"||typeof e=="object"&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),this.css[0]==="\uFEFF"||this.css[0]==="\uFFFE"?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(!Hi||/^\w+:\/\//.test(t.from)||ws(t.from)?this.file=t.from:this.file=bs(t.from)),Hi&&Ac){let r=new Rc(this.css,t);if(r.text){this.map=r;let i=r.consumer().file;!this.file&&i&&(this.file=this.mapResolve(i))}}this.file||(this.id="<input css "+Nc(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,r,i={}){let n,o,l;if(t&&typeof t=="object"){let u=t,c=r;if(typeof u.offset=="number"){let h=this.fromOffset(u.offset);t=h.line,r=h.col}else t=u.line,r=u.column;if(typeof c.offset=="number"){let h=this.fromOffset(c.offset);o=h.line,l=h.col}else o=c.line,l=c.column}else if(!r){let u=this.fromOffset(t);t=u.line,r=u.col}let a=this.origin(t,r,o,l);return a?n=new Gi(e,a.endLine===void 0?a.line:{column:a.column,line:a.line},a.endLine===void 0?a.column:{column:a.endColumn,line:a.endLine},a.source,a.file,i.plugin):n=new Gi(e,o===void 0?t:{column:r,line:t},o===void 0?r:{column:l,line:o},this.css,this.file,i.plugin),n.input={column:r,endColumn:l,endLine:o,line:t,source:this.css},this.file&&(_t&&(n.input.url=_t(this.file).toString()),n.input.file=this.file),n}fromOffset(e){let t,r;if(this[Vr])r=this[Vr];else{let n=this.css.split(`
|
|
44
|
+
`);r=new Array(n.length);let o=0;for(let l=0,a=n.length;l<a;l++)r[l]=o,o+=n[l].length+1;this[Vr]=r}t=r[r.length-1];let i=0;if(e>=t)i=r.length-1;else{let n=r.length-2,o;for(;i<n;)if(o=i+(n-i>>1),e<r[o])n=o-1;else if(e>=r[o+1])i=o+1;else{i=o;break}}return{col:e-r[i]+1,line:i+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:bs(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,r,i){if(!this.map)return!1;let n=this.map.consumer(),o=n.originalPositionFor({column:t,line:e});if(!o.source)return!1;let l;typeof r=="number"&&(l=n.originalPositionFor({column:i,line:r}));let a;ws(o.source)?a=_t(o.source):a=new URL(o.source,this.map.consumer().sourceRoot||_t(this.map.mapFile));let u={column:o.column,endColumn:l&&l.column,endLine:l&&l.line,line:o.line,url:a.toString()};if(a.protocol==="file:")if(Vi)u.file=Vi(a);else throw new Error("file: protocol is not available in this PostCSS build");let c=n.sourceContentFor(o.source);return c&&(u.source=c),u}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])this[t]!=null&&(e[t]=this[t]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}},vr=ir;ir.default=ir;zr&&zr.registerInput&&zr.registerInput(ir);var{SourceMapConsumer:lo,SourceMapGenerator:Yt}=ie,{dirname:Xt,relative:uo,resolve:co,sep:ho}=ie,{pathToFileURL:ji}=ie,Oc=vr,Dc=!!(lo&&Yt),Tc=!!(Xt&&co&&uo&&ho),kc=class{constructor(e,t,r,i){this.stringify=e,this.mapOpts=r.map||{},this.root=t,this.opts=r,this.css=i,this.originalCSS=i,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;this.isInline()?e="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?e=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?e=this.mapOpts.annotation(this.opts.to,this.root):e=this.outputFile()+".map";let t=`
|
|
45
45
|
`;this.css.includes(`\r
|
|
46
46
|
`)&&(t=`\r
|
|
47
|
-
`),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t=this.toUrl(this.path(e.file)),r=e.root||
|
|
48
|
-
`),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<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(e=>e.annotation):!0}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let e=this.mapOpts.annotation;return typeof e<"u"&&e!==!0?!1:this.previous().length?this.previous().some(t=>t.inline):!0}isMap(){return typeof this.opts.map<"u"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent<"u"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(e=>e.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute||e.charCodeAt(0)===60||/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let r=this.opts.to?jt(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(r=jt(ao(r,this.mapOpts.annotation)));let i=oo(r,e);return this.memoizedPaths.set(e,i),i}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}});else{let e=new Nc(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(t=>{if(t.source){let r=t.source.input.from;if(r&&!e[r]){e[r]=!0;let i=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(i,t.source.input.css)}}});else if(this.css){let t=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(t,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(Vi){let r=Vi(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;lo==="\\"&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}},uo=Oc,Dc=gr,ws=class extends Dc{constructor(e){super(e),this.type="comment"}},br=ws;ws.default=ws;var{isClean:co,my:ho}=dt,fo=yr,po=br,Tc=gr,mo,qs,Qs,go;function yo(s){return s.map(e=>(e.nodes&&(e.nodes=yo(e.nodes)),delete e.source,e))}function wo(s){if(s[co]=!1,s.proxyOf.nodes)for(let e of s.proxyOf.nodes)wo(e)}var fe=class bo extends Tc{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=yo(mo(e).nodes);else if(typeof e>"u")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>"u")throw new Error("Value field is missed in node creation");typeof e.value!="string"&&(e.value=String(e.value)),e=[new fo(e)]}else if(e.selector)e=[new qs(e)];else if(e.name)e=[new Qs(e)];else if(e.text)e=[new po(e)];else throw new Error("Unknown node type in node creation");return e.map(i=>(i[ho]||bo.rebuild(i),i=i.proxyOf,i.parent&&i.parent.removeChild(i),i[co]&&wo(i),typeof i.raws.before>"u"&&t&&typeof t.raws.before<"u"&&(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=>{mo=s};fe.registerRule=s=>{qs=s};fe.registerAtRule=s=>{Qs=s};fe.registerRoot=s=>{go=s};var Ee=fe;fe.default=fe;fe.rebuild=s=>{s.type==="atrule"?Object.setPrototypeOf(s,Qs.prototype):s.type==="rule"?Object.setPrototypeOf(s,qs.prototype):s.type==="decl"?Object.setPrototypeOf(s,fo.prototype):s.type==="comment"?Object.setPrototypeOf(s,po.prototype):s.type==="root"&&Object.setPrototypeOf(s,go.prototype),s[ho]=!0,s.nodes&&s.nodes.forEach(e=>{fe.rebuild(e)})};var _c=Ee,So,vo,ot=class extends _c{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new So(new vo,this,e).stringify()}};ot.registerLazyResult=s=>{So=s};ot.registerProcessor=s=>{vo=s};var ei=ot;ot.default=ot;var bs=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}},Co=bs;bs.default=bs;var kc=Co,Ss=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 kc(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>e.type==="warning")}get content(){return this.css}},ti=Ss;Ss.default=Ss;var zr=39,Gi=34,_t=92,Hi=47,kt=10,Ze=32,$t=12,Pt=9,Lt=13,$c=91,Pc=93,Lc=40,Fc=41,Uc=123,Bc=125,Wc=59,zc=42,Vc=58,Gc=64,Ft=/[\t\n\f\r "#'()/;[\\\]{}]/g,Ut=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,Hc=/.[\r\n"'(/\\]/,ji=/[\da-f]/i,jc=function(e,t={}){let r=e.css.valueOf(),i=t.ignoreErrors,n,o,l,a,u,c,h,p,m,g,d=r.length,f=0,b=[],S=[];function y(){return f}function v(P){throw e.error("Unclosed "+P,f)}function O(){return S.length===0&&f>=d}function _(P){if(S.length)return S.pop();if(f>=d)return;let V=P?P.ignoreUnclosed:!1;switch(n=r.charCodeAt(f),n){case kt:case Ze:case Pt:case Lt:case $t:{o=f;do o+=1,n=r.charCodeAt(o);while(n===Ze||n===kt||n===Pt||n===Lt||n===$t);g=["space",r.slice(f,o)],f=o-1;break}case $c:case Pc:case Uc:case Bc:case Vc:case Wc:case Fc:{let Y=String.fromCharCode(n);g=[Y,Y,f];break}case Lc:{if(p=b.length?b.pop()[1]:"",m=r.charCodeAt(f+1),p==="url"&&m!==zr&&m!==Gi&&m!==Ze&&m!==kt&&m!==Pt&&m!==$t&&m!==Lt){o=f;do{if(c=!1,o=r.indexOf(")",o+1),o===-1)if(i||V){o=f;break}else v("bracket");for(h=o;r.charCodeAt(h-1)===_t;)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||Hc.test(a)?g=["(","(",f]:(g=["brackets",a,f,o],f=o);break}case zr:case Gi:{l=n===zr?"'":'"',o=f;do{if(c=!1,o=r.indexOf(l,o+1),o===-1)if(i||V){o=f+1;break}else v("string");for(h=o;r.charCodeAt(h-1)===_t;)h-=1,c=!c}while(c);g=["string",r.slice(f,o+1),f,o],f=o;break}case Gc:{Ft.lastIndex=f+1,Ft.test(r),Ft.lastIndex===0?o=r.length-1:o=Ft.lastIndex-2,g=["at-word",r.slice(f,o+1),f,o],f=o;break}case _t:{for(o=f,u=!0;r.charCodeAt(o+1)===_t;)o+=1,u=!u;if(n=r.charCodeAt(o+1),u&&n!==Hi&&n!==Ze&&n!==kt&&n!==Pt&&n!==Lt&&n!==$t&&(o+=1,ji.test(r.charAt(o)))){for(;ji.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===Hi&&r.charCodeAt(f+1)===zc?(o=r.indexOf("*/",f+2)+1,o===0&&(i||V?o=r.length:v("comment")),g=["comment",r.slice(f,o+1),f,o],f=o):(Ut.lastIndex=f+1,Ut.test(r),Ut.lastIndex===0?o=r.length-1:o=Ut.lastIndex-2,g=["word",r.slice(f,o+1),f,o],b.push(g),f=o);break}}return f++,g}function j(P){S.push(P)}return{back:j,endOfFile:O,nextToken:_,position:y}},Io=Ee,sr=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)}},ri=sr;sr.default=sr;Io.registerAtRule(sr);var Eo=Ee,xo,Mo,$e=class extends Eo{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 xo(new Mo,this,e).stringify()}};$e.registerLazyResult=s=>{xo=s};$e.registerProcessor=s=>{Mo=s};var pt=$e;$e.default=$e;Eo.registerRoot($e);var at={comma(s){return at.split(s,[","],!0)},space(s){let e=[" ",`
|
|
49
|
-
`," "];return at.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}},No=at;at.default=at;var Ro=Ee,Yc=No,ir=class extends Ro{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return Yc.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)}},si=ir;ir.default=ir;Ro.registerRule(ir);var Xc=yr,Zc=jc,Jc=br,Kc=ri,qc=pt,Yi=si,Xi={empty:!0,space:!0};function Qc(s){for(let e=s.length-1;e>=0;e--){let t=s[e],r=t[3]||t[2];if(r)return r}}var eh=class{constructor(e){this.input=e,this.root=new qc,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 Kc;t.name=e[1].slice(1),t.name===""&&this.unnamedAtrule(t,e),this.init(t,e[2]);let r,i,n,o=!1,l=!1,a=[],u=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),r=e[0],r==="("||r==="["?u.push(r==="("?")":"]"):r==="{"&&u.length>0?u.push("}"):r===u[u.length-1]&&u.pop(),u.length===0)if(r===";"){t.source.end=this.getPosition(e[2]),t.source.end.offset++,this.semicolon=!0;break}else if(r==="{"){l=!0;break}else if(r==="}"){if(a.length>0){for(n=a.length-1,i=a[n];i&&i[0]==="space";)i=a[--n];i&&(t.source.end=this.getPosition(i[3]||i[2]),t.source.end.offset++)}this.end(e);break}else a.push(e);else a.push(e);if(this.tokenizer.endOfFile()){o=!0;break}}t.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(t.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(t,"params",a),o&&(e=a[a.length-1],t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++,this.spaces=t.raws.between,t.raws.between="")):(t.raws.afterName="",t.params=""),l&&(t.nodes=[],this.current=t)}checkMissedSemicolon(e){let t=this.colon(e);if(t===!1)return;let r=0,i;for(let n=t-1;n>=0&&(i=e[n],!(i[0]!=="space"&&(r+=1,r===2)));n--);throw this.input.error("Missed semicolon",i[0]==="word"?i[3]+1:i[2])}colon(e){let t=0,r,i,n;for(let[o,l]of e.entries()){if(r=l,i=r[0],i==="("&&(t+=1),i===")"&&(t-=1),t===0&&i===":")if(!n)this.doubleColon(r);else{if(n[0]==="word"&&n[1]==="progid")continue;return o}n=r}return!1}comment(e){let t=new Jc;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let r=e[1].slice(2,-2);if(/^\s*$/.test(r))t.text="",t.raws.left=r,t.raws.right="";else{let i=r.match(/^(\s*)([^]*\S)(\s*)$/);t.text=i[2],t.raws.left=i[1],t.raws.right=i[3]}}createTokenizer(){this.tokenizer=Zc(this.input)}decl(e,t){let r=new Xc;this.init(r,e[0][2]);let i=e[e.length-1];for(i[0]===";"&&(this.semicolon=!0,e.pop()),r.source.end=this.getPosition(i[3]||i[2]||Qc(e)),r.source.end.offset++;e[0][0]!=="word";)e.length===1&&this.unknownWord(e),r.raws.before+=e.shift()[1];for(r.source.start=this.getPosition(e[0][2]),r.prop="";e.length;){let u=e[0][0];if(u===":"||u==="space"||u==="comment")break;r.prop+=e.shift()[1]}r.raws.between="";let n;for(;e.length;)if(n=e.shift(),n[0]===":"){r.raws.between+=n[1];break}else n[0]==="word"&&/\w/.test(n[1])&&this.unknownWord([n]),r.raws.between+=n[1];(r.prop[0]==="_"||r.prop[0]==="*")&&(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let o=[],l;for(;e.length&&(l=e[0][0],!(l!=="space"&&l!=="comment"));)o.push(e.shift());this.precheckMissedSemicolon(e);for(let u=e.length-1;u>=0;u--){if(n=e[u],n[1].toLowerCase()==="!important"){r.important=!0;let c=this.stringFrom(e,u);c=this.spacesFromEnd(e)+c,c!==" !important"&&(r.raws.important=c);break}else if(n[1].toLowerCase()==="important"){let c=e.slice(0),h="";for(let p=u;p>0;p--){let m=c[p][0];if(h.trim().indexOf("!")===0&&m!=="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 Yi;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let t=this.current.nodes[this.current.nodes.length-1];t&&t.type==="rule"&&!t.raws.ownSemicolon&&(t.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="",e.type!=="comment"&&(this.semicolon=!1)}other(e){let t=!1,r=null,i=!1,n=null,o=[],l=e[1].startsWith("--"),a=[],u=e;for(;u;){if(r=u[0],a.push(u),r==="("||r==="[")n||(n=u),o.push(r==="("?")":"]");else if(l&&i&&r==="{")n||(n=u),o.push("}");else if(o.length===0)if(r===";")if(i){this.decl(a,l);return}else break;else if(r==="{"){this.rule(a);return}else if(r==="}"){this.tokenizer.back(a.pop()),t=!0;break}else r===":"&&(i=!0);else r===o[o.length-1]&&(o.pop(),o.length===0&&(n=null));u=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),o.length>0&&this.unclosedBracket(n),t&&i){if(!l)for(;a.length&&(u=a[a.length-1][0],!(u!=="space"&&u!=="comment"));)this.tokenizer.back(a.pop());this.decl(a,l)}else this.unknownWord(a)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e);break}this.endFile()}precheckMissedSemicolon(){}raw(e,t,r,i){let n,o,l=r.length,a="",u=!0,c,h;for(let p=0;p<l;p+=1)n=r[p],o=n[0],o==="space"&&p===l-1&&!i?u=!1:o==="comment"?(h=r[p-1]?r[p-1][0]:"empty",c=r[p+1]?r[p+1][0]:"empty",!Xi[h]&&!Xi[c]?a.slice(-1)===","?u=!1:a+=n[1]:u=!1):a+=n[1];if(!u){let p=r.reduce((m,g)=>m+g[1],"");e.raws[t]={raw:p,value:a}}e[t]=a}rule(e){e.pop();let t=new Yi;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})}},th=eh,rh=Ee,sh=th,ih=wr;function nr(s,e){let t=new ih(s,e),r=new sh(t);try{r.parse()}catch(i){throw i}return r.root}var ii=nr;nr.default=nr;rh.registerParse(nr);var{isClean:ue,my:nh}=dt,oh=uo,ah=mr,lh=Ee,uh=ei;var Zi=ti,ch=ii,hh=pt,fh={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},dh={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},ph={Once:!0,postcssPlugin:!0,prepare:!0},Pe=0;function Je(s){return typeof s=="object"&&typeof s.then=="function"}function Ao(s){let e=!1,t=fh[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 Ji(s){let e;return s.type==="document"?e=["Document",Pe,"DocumentExit"]:s.type==="root"?e=["Root",Pe,"RootExit"]:e=Ao(s),{eventIndex:0,events:e,iterator:0,node:s,visitorIndex:0,visitors:[]}}function vs(s){return s[ue]=!1,s.nodes&&s.nodes.forEach(e=>vs(e)),s}var Cs={},Le=class Oo{constructor(e,t,r){this.stringified=!1,this.processed=!1;let i;if(typeof t=="object"&&t!==null&&(t.type==="root"||t.type==="document"))i=vs(t);else if(t instanceof Oo||t instanceof Zi)i=vs(t.root),t.map&&(typeof r.map>"u"&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=t.map);else{let n=ch;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[nh]&&lh.rebuild(i)}this.result=new Zi(e,i,r),this.helpers={...Cs,postcss:Cs,result:this.result},this.plugins=this.processor.plugins.map(n=>typeof n=="object"&&n.prepare?{...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(!dh[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!ph[r])if(typeof t[r]=="object")for(let i in t[r])i==="*"?e(t,r,t[r][i]):e(t,r+"-"+i.toLowerCase(),t[r][i]);else typeof t[r]=="function"&&e(t,r,t[r])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let t=this.plugins[e],r=this.runOnRoot(t);if(Je(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=[Ji(e)];for(;t.length>0;){let r=this.visitTick(t);if(Je(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 Je(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=ah;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let i=new oh(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(Je(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(Je(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(Ji(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=Ao(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"}};Le.registerPostcss=s=>{Cs=s};var Do=Le;Le.default=Le;hh.registerLazyResult(Le);uh.registerLazyResult(Le);var mh=uo,gh=mr;var yh=ii,wh=ti,Is=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=gh;this.result=new wh(this._processor,i,this._opts),this.result.css=t;let o=this;Object.defineProperty(this.result,"root",{get(){return o.root}});let l=new mh(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=yh;try{e=t(this._css,this._opts)}catch(r){this.error=r}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}},bh=Is;Is.default=Is;var Sh=bh,vh=Do,Ch=ei,Ih=pt,lt=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 Sh(this,e,t):new vh(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}},Eh=lt;lt.default=lt;Ih.registerProcessor(lt);Ch.registerProcessor(lt);var xh=yr,Mh=io,Nh=br,Rh=ri,Ah=wr,Oh=pt,Dh=si;function ut(s,e){if(Array.isArray(s))return s.map(i=>ut(i));let{inputs:t,...r}=s;if(t){e=[];for(let i of t){let n={...i,__proto__:Ah.prototype};n.map&&(n.map={...n.map,__proto__:Mh.prototype}),e.push(n)}}if(r.nodes&&(r.nodes=s.nodes.map(i=>ut(i,e))),r.source){let{inputId:i,...n}=r.source;r.source=n,i!=null&&(r.source.input=e[i])}if(r.type==="root")return new Oh(r);if(r.type==="decl")return new xh(r);if(r.type==="rule")return new Dh(r);if(r.type==="comment")return new Nh(r);if(r.type==="atrule")return new Rh(r);throw new Error("Unknown node type: "+s.type)}var Th=ut;ut.default=ut;var _h=Ks,To=yr,kh=Do,$h=Ee,ni=Eh,Ph=mr,Lh=Th,_o=ei,Fh=Co,ko=br,$o=ri,Uh=ti,Bh=wr,Wh=ii,zh=No,Po=si,Lo=pt,Vh=gr;function A(...s){return s.length===1&&Array.isArray(s[0])&&(s=s[0]),new ni(s)}A.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:
|
|
47
|
+
`),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t=this.toUrl(this.path(e.file)),r=e.root||Xt(e.file),i;this.mapOpts.sourcesContent===!1?(i=new lo(e.text),i.sourcesContent&&(i.sourcesContent=null)):i=e.consumer(),this.map.applySourceMap(i,t,this.toUrl(this.path(r)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],e.type==="comment"&&e.text.indexOf("# sourceMappingURL=")===0&&this.root.removeChild(t)}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),Tc&&Dc&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,t=>{e+=t}),[e]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=Yt.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new Yt({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 Yt({file:this.outputFile(),ignoreInvalidMapping:!0});let e=1,t=1,r="<no source>",i={generated:{column:0,line:0},original:{column:0,line:0},source:""},n,o;this.stringify(this.root,(l,a,u)=>{if(this.css+=l,a&&u!=="end"&&(i.generated.line=e,i.generated.column=t-1,a.source&&a.source.start?(i.source=this.sourcePath(a),i.original.line=a.source.start.line,i.original.column=a.source.start.column-1,this.map.addMapping(i)):(i.source=r,i.original.line=1,i.original.column=0,this.map.addMapping(i))),n=l.match(/\n/g),n?(e+=n.length,o=l.lastIndexOf(`
|
|
48
|
+
`),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<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(e=>e.annotation):!0}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let e=this.mapOpts.annotation;return typeof e<"u"&&e!==!0?!1:this.previous().length?this.previous().some(t=>t.inline):!0}isMap(){return typeof this.opts.map<"u"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent<"u"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(e=>e.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute||e.charCodeAt(0)===60||/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let r=this.opts.to?Xt(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(r=Xt(co(r,this.mapOpts.annotation)));let i=uo(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 Oc(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(ji){let r=ji(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;ho==="\\"&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}},fo=kc,_c=wr,vs=class extends _c{constructor(e){super(e),this.type="comment"}},Sr=vs;vs.default=vs;var{isClean:po,my:mo}=pt,go=br,yo=Sr,$c=wr,wo,ei,ti,bo;function vo(s){return s.map(e=>(e.nodes&&(e.nodes=vo(e.nodes)),delete e.source,e))}function So(s){if(s[po]=!1,s.proxyOf.nodes)for(let e of s.proxyOf.nodes)So(e)}var de=class Co extends $c{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=vo(wo(e).nodes);else if(typeof e>"u")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>"u")throw new Error("Value field is missed in node creation");typeof e.value!="string"&&(e.value=String(e.value)),e=[new go(e)]}else if(e.selector)e=[new ei(e)];else if(e.name)e=[new ti(e)];else if(e.text)e=[new yo(e)];else throw new Error("Unknown node type in node creation");return e.map(i=>(i[mo]||Co.rebuild(i),i=i.proxyOf,i.parent&&i.parent.removeChild(i),i[po]&&So(i),typeof i.raws.before>"u"&&t&&typeof t.raws.before<"u"&&(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]}};de.registerParse=s=>{wo=s};de.registerRule=s=>{ei=s};de.registerAtRule=s=>{ti=s};de.registerRoot=s=>{bo=s};var xe=de;de.default=de;de.rebuild=s=>{s.type==="atrule"?Object.setPrototypeOf(s,ti.prototype):s.type==="rule"?Object.setPrototypeOf(s,ei.prototype):s.type==="decl"?Object.setPrototypeOf(s,go.prototype):s.type==="comment"?Object.setPrototypeOf(s,yo.prototype):s.type==="root"&&Object.setPrototypeOf(s,bo.prototype),s[mo]=!0,s.nodes&&s.nodes.forEach(e=>{de.rebuild(e)})};var Pc=xe,Eo,Io,at=class extends Pc{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new Eo(new Io,this,e).stringify()}};at.registerLazyResult=s=>{Eo=s};at.registerProcessor=s=>{Io=s};var ri=at;at.default=at;var Ss=class{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let r=t.node.rangeBy(t);this.line=r.start.line,this.column=r.start.column,this.endLine=r.end.line,this.endColumn=r.end.column}for(let r in t)this[r]=t[r]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}},xo=Ss;Ss.default=Ss;var Lc=xo,Cs=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}},si=Cs;Cs.default=Cs;var Gr=39,Yi=34,$t=92,Xi=47,Pt=10,Je=32,Lt=12,Ft=9,Ut=13,Fc=91,Uc=93,Bc=40,Wc=41,zc=123,Vc=125,Gc=59,Hc=42,jc=58,Yc=64,Bt=/[\t\n\f\r "#'()/;[\\\]{}]/g,Wt=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,Xc=/.[\r\n"'(/\\]/,Zi=/[\da-f]/i,Zc=function(e,t={}){let r=e.css.valueOf(),i=t.ignoreErrors,n,o,l,a,u,c,h,p,m,g,d=r.length,f=0,b=[],v=[];function y(){return f}function S(L){throw e.error("Unclosed "+L,f)}function D(){return v.length===0&&f>=d}function _(L){if(v.length)return v.pop();if(f>=d)return;let V=L?L.ignoreUnclosed:!1;switch(n=r.charCodeAt(f),n){case Pt:case Je:case Ft:case Ut:case Lt:{o=f;do o+=1,n=r.charCodeAt(o);while(n===Je||n===Pt||n===Ft||n===Ut||n===Lt);g=["space",r.slice(f,o)],f=o-1;break}case Fc:case Uc:case zc:case Vc:case jc:case Gc:case Wc:{let Y=String.fromCharCode(n);g=[Y,Y,f];break}case Bc:{if(p=b.length?b.pop()[1]:"",m=r.charCodeAt(f+1),p==="url"&&m!==Gr&&m!==Yi&&m!==Je&&m!==Pt&&m!==Ft&&m!==Lt&&m!==Ut){o=f;do{if(c=!1,o=r.indexOf(")",o+1),o===-1)if(i||V){o=f;break}else S("bracket");for(h=o;r.charCodeAt(h-1)===$t;)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||Xc.test(a)?g=["(","(",f]:(g=["brackets",a,f,o],f=o);break}case Gr:case Yi:{l=n===Gr?"'":'"',o=f;do{if(c=!1,o=r.indexOf(l,o+1),o===-1)if(i||V){o=f+1;break}else S("string");for(h=o;r.charCodeAt(h-1)===$t;)h-=1,c=!c}while(c);g=["string",r.slice(f,o+1),f,o],f=o;break}case Yc:{Bt.lastIndex=f+1,Bt.test(r),Bt.lastIndex===0?o=r.length-1:o=Bt.lastIndex-2,g=["at-word",r.slice(f,o+1),f,o],f=o;break}case $t:{for(o=f,u=!0;r.charCodeAt(o+1)===$t;)o+=1,u=!u;if(n=r.charCodeAt(o+1),u&&n!==Xi&&n!==Je&&n!==Pt&&n!==Ft&&n!==Ut&&n!==Lt&&(o+=1,Zi.test(r.charAt(o)))){for(;Zi.test(r.charAt(o+1));)o+=1;r.charCodeAt(o+1)===Je&&(o+=1)}g=["word",r.slice(f,o+1),f,o],f=o;break}default:{n===Xi&&r.charCodeAt(f+1)===Hc?(o=r.indexOf("*/",f+2)+1,o===0&&(i||V?o=r.length:S("comment")),g=["comment",r.slice(f,o+1),f,o],f=o):(Wt.lastIndex=f+1,Wt.test(r),Wt.lastIndex===0?o=r.length-1:o=Wt.lastIndex-2,g=["word",r.slice(f,o+1),f,o],b.push(g),f=o);break}}return f++,g}function j(L){v.push(L)}return{back:j,endOfFile:D,nextToken:_,position:y}},Mo=xe,nr=class extends Mo{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)}},ii=nr;nr.default=nr;Mo.registerAtRule(nr);var No=xe,Ro,Ao,Pe=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 Ro(new Ao,this,e).stringify()}};Pe.registerLazyResult=s=>{Ro=s};Pe.registerProcessor=s=>{Ao=s};var mt=Pe;Pe.default=Pe;No.registerRoot(Pe);var lt={comma(s){return lt.split(s,[","],!0)},space(s){let e=[" ",`
|
|
49
|
+
`," "];return lt.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}},Oo=lt;lt.default=lt;var Do=xe,Jc=Oo,or=class extends Do{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return Jc.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)}},ni=or;or.default=or;Do.registerRule(or);var qc=br,Kc=Zc,Qc=Sr,eh=ii,th=mt,Ji=ni,qi={empty:!0,space:!0};function rh(s){for(let e=s.length-1;e>=0;e--){let t=s[e],r=t[3]||t[2];if(r)return r}}var sh=class{constructor(e){this.input=e,this.root=new th,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 eh;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 Qc;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=Kc(this.input)}decl(e,t){let r=new qc;this.init(r,e[0][2]);let i=e[e.length-1];for(i[0]===";"&&(this.semicolon=!0,e.pop()),r.source.end=this.getPosition(i[3]||i[2]||rh(e)),r.source.end.offset++;e[0][0]!=="word";)e.length===1&&this.unknownWord(e),r.raws.before+=e.shift()[1];for(r.source.start=this.getPosition(e[0][2]),r.prop="";e.length;){let u=e[0][0];if(u===":"||u==="space"||u==="comment")break;r.prop+=e.shift()[1]}r.raws.between="";let n;for(;e.length;)if(n=e.shift(),n[0]===":"){r.raws.between+=n[1];break}else n[0]==="word"&&/\w/.test(n[1])&&this.unknownWord([n]),r.raws.between+=n[1];(r.prop[0]==="_"||r.prop[0]==="*")&&(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let o=[],l;for(;e.length&&(l=e[0][0],!(l!=="space"&&l!=="comment"));)o.push(e.shift());this.precheckMissedSemicolon(e);for(let u=e.length-1;u>=0;u--){if(n=e[u],n[1].toLowerCase()==="!important"){r.important=!0;let c=this.stringFrom(e,u);c=this.spacesFromEnd(e)+c,c!==" !important"&&(r.raws.important=c);break}else if(n[1].toLowerCase()==="important"){let c=e.slice(0),h="";for(let p=u;p>0;p--){let m=c[p][0];if(h.trim().indexOf("!")===0&&m!=="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 Ji;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let t=this.current.nodes[this.current.nodes.length-1];t&&t.type==="rule"&&!t.raws.ownSemicolon&&(t.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="",e.type!=="comment"&&(this.semicolon=!1)}other(e){let t=!1,r=null,i=!1,n=null,o=[],l=e[1].startsWith("--"),a=[],u=e;for(;u;){if(r=u[0],a.push(u),r==="("||r==="[")n||(n=u),o.push(r==="("?")":"]");else if(l&&i&&r==="{")n||(n=u),o.push("}");else if(o.length===0)if(r===";")if(i){this.decl(a,l);return}else break;else if(r==="{"){this.rule(a);return}else if(r==="}"){this.tokenizer.back(a.pop()),t=!0;break}else r===":"&&(i=!0);else r===o[o.length-1]&&(o.pop(),o.length===0&&(n=null));u=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),o.length>0&&this.unclosedBracket(n),t&&i){if(!l)for(;a.length&&(u=a[a.length-1][0],!(u!=="space"&&u!=="comment"));)this.tokenizer.back(a.pop());this.decl(a,l)}else this.unknownWord(a)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e);break}this.endFile()}precheckMissedSemicolon(){}raw(e,t,r,i){let n,o,l=r.length,a="",u=!0,c,h;for(let p=0;p<l;p+=1)n=r[p],o=n[0],o==="space"&&p===l-1&&!i?u=!1:o==="comment"?(h=r[p-1]?r[p-1][0]:"empty",c=r[p+1]?r[p+1][0]:"empty",!qi[h]&&!qi[c]?a.slice(-1)===","?u=!1:a+=n[1]:u=!1):a+=n[1];if(!u){let p=r.reduce((m,g)=>m+g[1],"");e.raws[t]={raw:p,value:a}}e[t]=a}rule(e){e.pop();let t=new Ji;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})}},ih=sh,nh=xe,oh=ih,ah=vr;function ar(s,e){let t=new ah(s,e),r=new oh(t);try{r.parse()}catch(i){throw i}return r.root}var oi=ar;ar.default=ar;nh.registerParse(ar);var{isClean:ce,my:lh}=pt,uh=fo,ch=yr,hh=xe,fh=ri;var Ki=si,dh=oi,ph=mt,mh={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},gh={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},yh={Once:!0,postcssPlugin:!0,prepare:!0},Le=0;function qe(s){return typeof s=="object"&&typeof s.then=="function"}function To(s){let e=!1,t=mh[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 Qi(s){let e;return s.type==="document"?e=["Document",Le,"DocumentExit"]:s.type==="root"?e=["Root",Le,"RootExit"]:e=To(s),{eventIndex:0,events:e,iterator:0,node:s,visitorIndex:0,visitors:[]}}function Es(s){return s[ce]=!1,s.nodes&&s.nodes.forEach(e=>Es(e)),s}var Is={},Fe=class ko{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=Es(t);else if(t instanceof ko||t instanceof Ki)i=Es(t.root),t.map&&(typeof r.map>"u"&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=t.map);else{let n=dh;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[lh]&&hh.rebuild(i)}this.result=new Ki(e,i,r),this.helpers={...Is,postcss:Is,result:this.result},this.plugins=this.processor.plugins.map(n=>typeof n=="object"&&n.prepare?{...n,...n.prepare(this.result)}:n)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let r=this.result.lastPlugin;try{t&&t.addToError(e),this.error=e,e.name==="CssSyntaxError"&&!e.plugin?(e.plugin=r.postcssPlugin,e.setMessage()):r.postcssVersion}catch(i){console&&console.error&&console.error(i)}return e}prepareVisitors(){this.listeners={};let e=(t,r,i)=>{this.listeners[r]||(this.listeners[r]=[]),this.listeners[r].push([t,i])};for(let t of this.plugins)if(typeof t=="object")for(let r in t){if(!gh[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!yh[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(qe(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=[Qi(e)];for(;t.length>0;){let r=this.visitTick(t);if(qe(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 qe(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=ch;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let i=new uh(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(qe(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(qe(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(Qi(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=To(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"}};Fe.registerPostcss=s=>{Is=s};var _o=Fe;Fe.default=Fe;ph.registerLazyResult(Fe);fh.registerLazyResult(Fe);var wh=fo,bh=yr;var vh=oi,Sh=si,xs=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=bh;this.result=new Sh(this._processor,i,this._opts),this.result.css=t;let o=this;Object.defineProperty(this.result,"root",{get(){return o.root}});let l=new wh(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=vh;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"}},Ch=xs;xs.default=xs;var Eh=Ch,Ih=_o,xh=ri,Mh=mt,ut=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 Eh(this,e,t):new Ih(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}},Nh=ut;ut.default=ut;Mh.registerProcessor(ut);xh.registerProcessor(ut);var Rh=br,Ah=ao,Oh=Sr,Dh=ii,Th=vr,kh=mt,_h=ni;function ct(s,e){if(Array.isArray(s))return s.map(i=>ct(i));let{inputs:t,...r}=s;if(t){e=[];for(let i of t){let n={...i,__proto__:Th.prototype};n.map&&(n.map={...n.map,__proto__:Ah.prototype}),e.push(n)}}if(r.nodes&&(r.nodes=s.nodes.map(i=>ct(i,e))),r.source){let{inputId:i,...n}=r.source;r.source=n,i!=null&&(r.source.input=e[i])}if(r.type==="root")return new kh(r);if(r.type==="decl")return new Rh(r);if(r.type==="rule")return new _h(r);if(r.type==="comment")return new Oh(r);if(r.type==="atrule")return new Dh(r);throw new Error("Unknown node type: "+s.type)}var $h=ct;ct.default=ct;var Ph=Qs,$o=br,Lh=_o,Fh=xe,ai=Nh,Uh=yr,Bh=$h,Po=ri,Wh=xo,Lo=Sr,Fo=ii,zh=si,Vh=vr,Gh=oi,Hh=Oo,Uo=ni,Bo=mt,jh=wr;function A(...s){return s.length===1&&Array.isArray(s[0])&&(s=s[0]),new ai(s)}A.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:
|
|
50
50
|
https://evilmartians.com/chronicles/postcss-8-plugin-migration`),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(e+`: \u91CC\u9762 postcss.plugin \u88AB\u5F03\u7528. \u8FC1\u79FB\u6307\u5357:
|
|
51
|
-
https://www.w3ctech.com/topic/2226`));let l=t(...o);return l.postcssPlugin=e,l.postcssVersion=new
|
|
51
|
+
https://www.w3ctech.com/topic/2226`));let l=t(...o);return l.postcssPlugin=e,l.postcssVersion=new ai().version,l}let n;return Object.defineProperty(i,"postcss",{get(){return n||(n=i()),n}}),i.process=function(o,l,a){return A([i(a)]).process(o,l)},i};A.stringify=Uh;A.parse=Gh;A.fromJSON=Bh;A.list=Hh;A.comment=s=>new Lo(s);A.atRule=s=>new Fo(s);A.decl=s=>new $o(s);A.rule=s=>new Uo(s);A.root=s=>new Bo(s);A.document=s=>new Po(s);A.CssSyntaxError=Ph;A.Declaration=$o;A.Container=Fh;A.Processor=ai;A.Document=Po;A.Comment=Lo;A.Warning=Wh;A.AtRule=Fo;A.Result=zh;A.Input=Vh;A.Rule=Uo;A.Root=Bo;A.Node=jh;Lh.registerPostcss(A);var Yh=A;A.default=A;var U=nc(Yh);U.stringify;U.fromJSON;U.plugin;U.parse;U.list;U.document;U.comment;U.atRule;U.rule;U.decl;U.root;U.CssSyntaxError;U.Declaration;U.Container;U.Processor;U.Document;U.Comment;U.Warning;U.AtRule;U.Result;U.Input;U.Rule;U.Root;U.Node;var Ms=class s{constructor(...e){ee(this,"parentElement",null),ee(this,"parentNode",null),ee(this,"ownerDocument"),ee(this,"firstChild",null),ee(this,"lastChild",null),ee(this,"previousSibling",null),ee(this,"nextSibling",null),ee(this,"ELEMENT_NODE",1),ee(this,"TEXT_NODE",3),ee(this,"nodeType"),ee(this,"nodeName"),ee(this,"RRNodeType")}get childNodes(){let e=[],t=this.firstChild;for(;t;)e.push(t),t=t.nextSibling;return e}contains(e){if(e instanceof s){if(e.ownerDocument!==this.ownerDocument)return!1;if(e===this)return!0}else return!1;for(;e.parentNode;){if(e.parentNode===this)return!0;e=e.parentNode}return!1}appendChild(e){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(e,t){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(e){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}};var en={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},tn={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},zt={},Xh=()=>!!globalThis.Zone;function li(s){if(zt[s])return zt[s];let e=globalThis[s],t=e.prototype,r=s in en?en[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 tn?tn[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&&!Xh())return zt[s]=e.prototype,e.prototype;try{let l=document.createElement("iframe");document.body.appendChild(l);let a=l.contentWindow;if(!a)return e.prototype;let u=a[s].prototype;return document.body.removeChild(l),u?zt[s]=u:t}catch{return t}}var Hr={};function ye(s,e,t){var r;let i=`${s}.${String(t)}`;if(Hr[i])return Hr[i].call(e);let n=li(s),o=(r=Object.getOwnPropertyDescriptor(n,t))==null?void 0:r.get;return o?(Hr[i]=o,o.call(e)):e[t]}var jr={};function Wo(s,e,t){let r=`${s}.${String(t)}`;if(jr[r])return jr[r].bind(e);let n=li(s)[t];return typeof n!="function"?e[t]:(jr[r]=n,n.bind(e))}function Zh(s){return ye("Node",s,"childNodes")}function Jh(s){return ye("Node",s,"parentNode")}function qh(s){return ye("Node",s,"parentElement")}function Kh(s){return ye("Node",s,"textContent")}function Qh(s,e){return Wo("Node",s,"contains")(e)}function ef(s){return Wo("Node",s,"getRootNode")()}function tf(s){return!s||!("host"in s)?null:ye("ShadowRoot",s,"host")}function rf(s){return s.styleSheets}function sf(s){return!s||!("shadowRoot"in s)?null:ye("Element",s,"shadowRoot")}function nf(s,e){return ye("Element",s,"querySelector")(e)}function of(s,e){return ye("Element",s,"querySelectorAll")(e)}function zo(){return li("MutationObserver").constructor}var C={childNodes:Zh,parentNode:Jh,parentElement:qh,textContent:Kh,contains:Qh,getRootNode:ef,host:tf,styleSheets:rf,shadowRoot:sf,querySelector:nf,querySelectorAll:of,mutationObserver:zo};function Z(s,e,t=document){let r={capture:!0,passive:!0};return t.addEventListener(s,e,r),()=>t.removeEventListener(s,e,r)}var Re=`Please stop import mirror directly. Instead of that,\r
|
|
52
52
|
now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
|
|
53
|
-
or you can use record.mirror to access the mirror instance during recording.`,Qi={map:{},getId(){return console.error(Ne),-1},getNode(){return console.error(Ne),null},removeNodeFromMap(){console.error(Ne)},has(){return console.error(Ne),!1},reset(){console.error(Ne)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(Qi=new Proxy(Qi,{get(s,e,t){return e==="map"&&console.error(Ne),Reflect.get(s,e,t)}}));function ct(s,e,t={}){let r=null,i=0;return function(...n){let o=Date.now();!i&&t.leading===!1&&(i=o);let 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 Sr(s,e,t,r,i=window){let 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)}}),()=>Sr(s,e,n||{},!0)}function Ue(s,e,t){try{if(!(e in s))return()=>{};let 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{return()=>{}}}var or=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(or=()=>new Date().getTime());function Bo(s){var e,t,r,i;let n=s.document;return{left:n.scrollingElement?n.scrollingElement.scrollLeft:s.pageXOffset!==void 0?s.pageXOffset:n.documentElement.scrollLeft||n?.body&&((e=C.parentElement(n.body))==null?void 0:e.scrollLeft)||((t=n?.body)==null?void 0:t.scrollLeft)||0,top:n.scrollingElement?n.scrollingElement.scrollTop:s.pageYOffset!==void 0?s.pageYOffset:n?.documentElement.scrollTop||n?.body&&((r=C.parentElement(n.body))==null?void 0:r.scrollTop)||((i=n?.body)==null?void 0:i.scrollTop)||0}}function Wo(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function zo(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function Vo(s){return s?s.nodeType===s.ELEMENT_NODE?s:C.parentElement(s):null}function J(s,e,t,r){if(!s)return!1;let i=Vo(s);if(!i)return!1;try{if(typeof e=="string"){if(i.classList.contains(e)||r&&i.closest("."+e)!==null)return!0}else if(Kt(i,e,r))return!0}catch{}return!!(t&&(i.matches(t)||r&&i.closest(t)!==null))}function sf(s,e){return e.getId(s)!==-1}function Hr(s,e,t){return s.tagName==="TITLE"&&t.headTitleMutations?!0:e.getId(s)===tt}function Go(s,e){if(qe(s))return!1;let t=e.getId(s);if(!e.has(t))return!0;let r=C.parentNode(s);return r&&r.nodeType===s.DOCUMENT_NODE?!1:r?Go(r,e):!0}function xs(s){return!!s.changedTouches}function nf(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 Ho(s,e){return!!(s.nodeName==="IFRAME"&&e.getMeta(s))}function jo(s,e){return!!(s.nodeName==="LINK"&&s.nodeType===s.ELEMENT_NODE&&s.getAttribute&&s.getAttribute("rel")==="stylesheet"&&e.getMeta(s))}function Ms(s){return s?s instanceof Es&&"shadowRoot"in s?!!s.shadowRoot:!!C.shadowRoot(s):!1}var Ns=class{constructor(){w(this,"id",1),w(this,"styleIDMap",new WeakMap),w(this,"idStyleMap",new Map)}getId(e){return this.styleIDMap.get(e)??-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 Yo(s){var e;let t=null;return"getRootNode"in s&&((e=C.getRootNode(s))==null?void 0:e.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&C.host(C.getRootNode(s))&&(t=C.host(C.getRootNode(s))),t}function of(s){let e=s,t;for(;t=Yo(e);)e=t;return e}function af(s){let e=s.ownerDocument;if(!e)return!1;let t=of(s);return C.contains(e,t)}function Xo(s){let e=s.ownerDocument;return e?C.contains(e,s)||af(s):!1}var x=(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))(x||{}),I=(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))(I||{}),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||{}),ce=(s=>(s[s.Mouse=0]="Mouse",s[s.Pen=1]="Pen",s[s.Touch=2]="Touch",s))(ce||{}),Fe=(s=>(s[s["2D"]=0]="2D",s[s.WebGL=1]="WebGL",s[s.WebGL2=2]="WebGL2",s))(Fe||{}),Re=(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))(Re||{});var Zo=(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))(Zo||{});function en(s){return"__ln"in s}var Rs=class{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?.next||null;return t}addNode(e){let t={value:e,previous:null,next:null};if(e.__ln=t,e.previousSibling&&en(e.previousSibling)){let 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&&en(e.nextSibling)&&e.nextSibling.__ln.previous){let 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){let 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--)}},tn=(s,e)=>`${s}@${e}`,As=class{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;let e=[],t=new Set,r=new Rs,i=a=>{let u=a,c=tt;for(;c===tt;)u=u&&u.nextSibling,c=u&&this.mirror.getId(u);return c},n=a=>{let u=C.parentNode(a);if(!u||!Xo(a))return;let c=!1;if(a.nodeType===Node.TEXT_NODE){let g=u.tagName;if(g==="TEXTAREA")return;g==="STYLE"&&this.addedSet.has(u)&&(c=!0)}let h=qe(u)?this.mirror.getId(Yo(a)):this.mirror.getId(u),p=i(a);if(h===-1||p===-1)return r.addNode(a);let m=Oe(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=>{Ho(g,this.mirror)&&this.iframeManager.addIframe(g),jo(g,this.mirror)&&this.stylesheetManager.trackLinkElement(g),Ms(a)&&this.shadowDomManager.addShadowRoot(C.shadowRoot(a),this.doc)},onIframeLoad:(g,d)=>{this.iframeManager.attachIframe(g,d),this.shadowDomManager.observeAttachShadow(g)},onStylesheetLoad:(g,d)=>{this.stylesheetManager.attachLinkElement(g,d)},cssCaptured:c});m&&(e.push({parentId:h,nextId:p,node:m}),t.add(m.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(let a of this.movedSet)rn(this.removesSubTreeCache,a,this.mirror)&&!this.movedSet.has(C.parentNode(a))||n(a);for(let a of this.addedSet)!sn(this.droppedSet,a)&&!rn(this.removesSubTreeCache,a,this.mirror)||sn(this.movedSet,a)?n(a):this.droppedSet.add(a);let o=null;for(;r.length;){let a=null;if(o){let u=this.mirror.getId(C.parentNode(o.value)),c=i(o.value);u!==-1&&c!==-1&&(a=o)}if(!a){let u=r.tail;for(;u;){let c=u;if(u=u.previous,c){let h=this.mirror.getId(C.parentNode(c.value));if(i(c.value)===-1)continue;if(h!==-1){a=c;break}else{let m=c.value,g=C.parentNode(m);if(g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE){let d=C.host(g);if(this.mirror.getId(d)!==-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)}let l={texts:this.texts.map(a=>{let u=a.node,c=C.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=>{let{attributes:u}=a;if(typeof u.style=="string"){let 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(C.childNodes(e),r=>C.textContent(r)||"").join("")}),w(this,"processMutation",e=>{if(!Hr(e.target,this.mirror,this.slimDOMOptions))switch(e.type){case"characterData":{let t=C.textContent(e.target);!J(e.target,this.blockClass,this.blockSelector,!1)&&t!==e.oldValue&&this.texts.push({value:wn(e.target,this.maskTextClass,this.maskTextSelector,!0)&&t?this.maskTextFn?this.maskTextFn(t,Vo(e.target)):t.replace(/[\S]/g,"*"):t,node:e.target});break}case"attributes":{let t=e.target,r=e.attributeName,i=e.target.getAttribute(r);if(r==="value"){let o=Fs(t);i=Ls({element:t,maskInputOptions:this.maskInputOptions,tagName:t.tagName,type:o,value:i,maskInputFn:this.maskInputFn})}if(J(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"),!yn(t.tagName,r))if(n.attributes[r]=gn(this.doc,Ce(t.tagName),Ce(r),i),r==="style"){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch{this.unattachedDoc=this.doc}let o=this.unattachedDoc.createElement("span");e.oldValue&&o.setAttribute("style",e.oldValue);for(let l of Array.from(t.style)){let 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(let 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(J(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=>{let r=this.mirror.getId(t),i=qe(e.target)?this.mirror.getId(C.host(e.target)):this.mirror.getId(e.target);J(e.target,this.blockClass,this.blockSelector,!1)||Hr(t,this.mirror,this.slimDOMOptions)||!sf(t,this.mirror)||(this.addedSet.has(t)?(Os(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&r===-1||Go(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[tn(r,i)]?Os(this.movedSet,t):(this.removes.push({parentId:i,id:r,isShadow:qe(e.target)&&Qe(e.target)?!0:void 0}),lf(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(Hr(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[tn(this.mirror.getId(e),r)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);J(e,this.blockClass,this.blockSelector,!1)||(C.childNodes(e).forEach(r=>this.genAdds(r)),Ms(e)&&C.childNodes(C.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 Os(s,e){s.delete(e),C.childNodes(e).forEach(t=>Os(s,t))}function lf(s,e){let t=[s];for(;t.length;){let r=t.pop();e.has(r)||(e.add(r),C.childNodes(r).forEach(i=>t.push(i)))}}function rn(s,e,t){return s.size===0?!1:uf(s,e)}function uf(s,e,t){let r=C.parentNode(e);return r?s.has(r):!1}function sn(s,e){return s.size===0?!1:Jo(s,e)}function Jo(s,e){let t=C.parentNode(e);return t?s.has(t)?!0:Jo(s,t):!1}var et;function cf(s){et=s}function hf(){et=void 0}var E=s=>et?(...t)=>{try{return s(...t)}catch(r){if(et&&et(r)===!0)return;throw r}}:s,ve=[];function mt(s){try{if("composedPath"in s){let e=s.composedPath();if(e.length)return e[0]}else if("path"in s&&s.path.length)return s.path[0]}catch{}return s&&s.target}function Ko(s,e){let t=new As;ve.push(t),t.init(s);let r=new(Uo())(E(t.processMutations.bind(t)));return r.observe(e,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),r}function ff({mousemoveCb:s,sampling:e,doc:t,mirror:r}){if(e.mousemove===!1)return()=>{};let i=typeof e.mousemove=="number"?e.mousemove:50,n=typeof e.mousemoveCallback=="number"?e.mousemoveCallback:500,o=[],l,a=ct(E(h=>{let p=Date.now()-l;s(o.map(m=>(m.timeOffset-=p,m)),h),o=[],l=null}),n),u=E(ct(E(h=>{let p=mt(h),{clientX:m,clientY:g}=xs(h)?h.changedTouches[0]:h;l||(l=or()),o.push({x:m,y:g,id:r.getId(p),timeOffset:or()-l}),a(typeof DragEvent<"u"&&h instanceof DragEvent?I.Drag:h instanceof MouseEvent?I.MouseMove:I.TouchMove)}),i,{trailing:!1})),c=[Z("mousemove",u,t),Z("touchmove",u,t),Z("drag",u,t)];return E(()=>{c.forEach(h=>h())})}function df({mouseInteractionCb:s,doc:e,mirror:t,blockClass:r,blockSelector:i,sampling:n}){if(n.mouseInteraction===!1)return()=>{};let o=n.mouseInteraction===!0||n.mouseInteraction===void 0?{}:n.mouseInteraction,l=[],a=null,u=c=>h=>{let p=mt(h);if(J(p,r,i,!0))return;let m=null,g=c;if("pointerType"in h){switch(h.pointerType){case"mouse":m=ce.Mouse;break;case"touch":m=ce.Touch;break;case"pen":m=ce.Pen;break}m===ce.Touch?K[c]===K.MouseDown?g="TouchStart":K[c]===K.MouseUp&&(g="TouchEnd"):ce.Pen}else xs(h)&&(m=ce.Touch);m!==null?(a=m,(g.startsWith("Touch")&&m===ce.Touch||g.startsWith("Mouse")&&m===ce.Mouse)&&(m=null)):K[c]===K.Click&&(m=a,a=null);let d=xs(h)?h.changedTouches[0]:h;if(!d)return;let f=t.getId(p),{clientX:b,clientY:S}=d;E(s)({type:K[g],id:f,x:b,y:S,...m!==null&&{pointerType:m}})};return Object.keys(K).filter(c=>Number.isNaN(Number(c))&&!c.endsWith("_Departed")&&o[c]!==!1).forEach(c=>{let h=Ce(c),p=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(Z(h,p,e))}),E(()=>{l.forEach(c=>c())})}function qo({scrollCb:s,doc:e,mirror:t,blockClass:r,blockSelector:i,sampling:n}){let o=E(ct(E(l=>{let a=mt(l);if(!a||J(a,r,i,!0))return;let u=t.getId(a);if(a===e&&e.defaultView){let c=Bo(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 Z("scroll",o,e)}function pf({viewportResizeCb:s},{win:e}){let t=-1,r=-1,i=E(ct(E(()=>{let n=Wo(),o=zo();(t!==n||r!==o)&&(s({width:Number(o),height:Number(n)}),t=n,r=o)}),200));return Z("resize",i,e)}var mf=["INPUT","TEXTAREA","SELECT"],nn=new WeakMap;function gf({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=mt(S),v=S.isTrusted,O=y&&y.tagName;if(y&&O==="OPTION"&&(y=C.parentElement(y)),!y||!O||mf.indexOf(O)<0||J(y,r,i,!0)||y.classList.contains(n)||o&&y.matches(o))return;let _=y.value,j=!1,P=Fs(y)||"";P==="radio"||P==="checkbox"?j=y.checked:(l[O.toLowerCase()]||l[P])&&(_=Ls({element:y,maskInputOptions:l,tagName:O,type:P,value:_,maskInputFn:a})),p(y,c?{text:_,isChecked:j,userTriggered:v}:{text:_,isChecked:j});let V=y.name;P==="radio"&&V&&j&&e.querySelectorAll(`input[type="radio"][name="${V}"]`).forEach(Y=>{if(Y!==y){let q=Y.value;p(Y,c?{text:q,isChecked:!j,userTriggered:!1}:{text:q,isChecked:!j})}})}function p(S,y){let v=nn.get(S);if(!v||v.text!==y.text||v.isChecked!==y.isChecked){nn.set(S,y);let O=t.getId(S);E(s)({...y,id:O})}}let g=(u.input==="last"?["change"]:["input","change"]).map(S=>Z(S,E(h),e)),d=e.defaultView;if(!d)return()=>{g.forEach(S=>S())};let f=d.Object.getOwnPropertyDescriptor(d.HTMLInputElement.prototype,"value"),b=[[d.HTMLInputElement.prototype,"value"],[d.HTMLInputElement.prototype,"checked"],[d.HTMLSelectElement.prototype,"value"],[d.HTMLTextAreaElement.prototype,"value"],[d.HTMLSelectElement.prototype,"selectedIndex"],[d.HTMLOptionElement.prototype,"selected"]];return f&&f.set&&g.push(...b.map(S=>Sr(S[0],S[1],{set(){E(h)({target:this,isTrusted:!1})}},!1,d))),E(()=>{g.forEach(S=>S())})}function ar(s){let e=[];function t(r,i){if(Wt("CSSGroupingRule")&&r.parentRule instanceof CSSGroupingRule||Wt("CSSMediaRule")&&r.parentRule instanceof CSSMediaRule||Wt("CSSSupportsRule")&&r.parentRule instanceof CSSSupportsRule||Wt("CSSConditionRule")&&r.parentRule instanceof CSSConditionRule){let o=Array.from(r.parentRule.cssRules).indexOf(r);i.unshift(o)}else if(r.parentStyleSheet){let o=Array.from(r.parentStyleSheet.cssRules).indexOf(r);i.unshift(o)}return i}return t(s,e)}function me(s,e,t){let r,i;return s?(s.ownerNode?r=e.getId(s.ownerNode):i=t.getId(s),{styleId:i,id:r}):{}}function yf({styleSheetRuleCb:s,mirror:e,stylesheetManager:t},{win:r}){if(!r.CSSStyleSheet||!r.CSSStyleSheet.prototype)return()=>{};let i=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=new Proxy(i,{apply:E((c,h,p)=>{let[m,g]=p,{id:d,styleId:f}=me(h,e,t.styleMirror);return(d&&d!==-1||f&&f!==-1)&&s({id:d,styleId:f,adds:[{rule:m,index:g}]}),c.apply(h,p)})}),r.CSSStyleSheet.prototype.addRule=function(c,h,p=this.cssRules.length){let m=`${c} { ${h} }`;return r.CSSStyleSheet.prototype.insertRule.apply(this,[m,p])};let n=r.CSSStyleSheet.prototype.deleteRule;r.CSSStyleSheet.prototype.deleteRule=new Proxy(n,{apply:E((c,h,p)=>{let[m]=p,{id:g,styleId:d}=me(h,e,t.styleMirror);return(g&&g!==-1||d&&d!==-1)&&s({id:g,styleId:d,removes:[{index:m}]}),c.apply(h,p)})}),r.CSSStyleSheet.prototype.removeRule=function(c){return r.CSSStyleSheet.prototype.deleteRule.apply(this,[c])};let o;r.CSSStyleSheet.prototype.replace&&(o=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(o,{apply:E((c,h,p)=>{let[m]=p,{id:g,styleId:d}=me(h,e,t.styleMirror);return(g&&g!==-1||d&&d!==-1)&&s({id:g,styleId:d,replace:m}),c.apply(h,p)})}));let l;r.CSSStyleSheet.prototype.replaceSync&&(l=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(l,{apply:E((c,h,p)=>{let[m]=p,{id:g,styleId:d}=me(h,e,t.styleMirror);return(g&&g!==-1||d&&d!==-1)&&s({id:g,styleId:d,replaceSync:m}),c.apply(h,p)})}));let a={};zt("CSSGroupingRule")?a.CSSGroupingRule=r.CSSGroupingRule:(zt("CSSMediaRule")&&(a.CSSMediaRule=r.CSSMediaRule),zt("CSSConditionRule")&&(a.CSSConditionRule=r.CSSConditionRule),zt("CSSSupportsRule")&&(a.CSSSupportsRule=r.CSSSupportsRule));let 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:E((p,m,g)=>{let[d,f]=g,{id:b,styleId:S}=me(m.parentStyleSheet,e,t.styleMirror);return(b&&b!==-1||S&&S!==-1)&&s({id:b,styleId:S,adds:[{rule:d,index:[...ar(m),f||0]}]}),p.apply(m,g)})}),h.prototype.deleteRule=new Proxy(u[c].deleteRule,{apply:E((p,m,g)=>{let[d]=g,{id:f,styleId:b}=me(m.parentStyleSheet,e,t.styleMirror);return(f&&f!==-1||b&&b!==-1)&&s({id:f,styleId:b,removes:[{index:[...ar(m),d]}]}),p.apply(m,g)})})}),E(()=>{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 Qo({mirror:s,stylesheetManager:e},t){var r,i,n;let o=null;t.nodeName==="#document"?o=s.getId(t):o=s.getId(C.host(t));let 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?.prototype?Object.getOwnPropertyDescriptor(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;let h=(c=a.set)==null?void 0:c.call(this,u);if(o!==null&&o!==-1)try{e.adoptStyleSheets(u,o)}catch{}return h}}),E(()=>{Object.defineProperty(t,"adoptedStyleSheets",{configurable:a.configurable,enumerable:a.enumerable,get:a.get,set:a.set})}))}function wf({styleDeclarationCb:s,mirror:e,ignoreCSSAttributes:t,stylesheetManager:r},{win:i}){let n=i.CSSStyleDeclaration.prototype.setProperty;i.CSSStyleDeclaration.prototype.setProperty=new Proxy(n,{apply:E((l,a,u)=>{var c;let[h,p,m]=u;if(t.has(h))return n.apply(a,[h,p,m]);let{id:g,styleId:d}=me((c=a.parentRule)==null?void 0:c.parentStyleSheet,e,r.styleMirror);return(g&&g!==-1||d&&d!==-1)&&s({id:g,styleId:d,set:{property:h,value:p,priority:m},index:ar(a.parentRule)}),l.apply(a,u)})});let o=i.CSSStyleDeclaration.prototype.removeProperty;return i.CSSStyleDeclaration.prototype.removeProperty=new Proxy(o,{apply:E((l,a,u)=>{var c;let[h]=u;if(t.has(h))return o.apply(a,[h]);let{id:p,styleId:m}=me((c=a.parentRule)==null?void 0:c.parentStyleSheet,e,r.styleMirror);return(p&&p!==-1||m&&m!==-1)&&s({id:p,styleId:m,remove:{property:h},index:ar(a.parentRule)}),l.apply(a,u)})}),E(()=>{i.CSSStyleDeclaration.prototype.setProperty=n,i.CSSStyleDeclaration.prototype.removeProperty=o})}function bf({mediaInteractionCb:s,blockClass:e,blockSelector:t,mirror:r,sampling:i,doc:n}){let o=E(a=>ct(E(u=>{let c=mt(u);if(!c||J(c,e,t,!0))return;let{currentTime:h,volume:p,muted:m,playbackRate:g,loop:d}=c;s({type:a,id:r.getId(c),currentTime:h,volume:p,muted:m,playbackRate:g,loop:d})}),i.media||500)),l=[Z("play",o(Re.Play),n),Z("pause",o(Re.Pause),n),Z("seeked",o(Re.Seeked),n),Z("volumechange",o(Re.VolumeChange),n),Z("ratechange",o(Re.RateChange),n)];return E(()=>{l.forEach(a=>a())})}function Sf({fontCb:s,doc:e}){let t=e.defaultView;if(!t)return()=>{};let r=[],i=new WeakMap,n=t.FontFace;t.FontFace=function(a,u,c){let 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};let o=Ue(e.fonts,"add",function(l){return function(a){return setTimeout(E(()=>{let u=i.get(a);u&&(s(u),i.delete(a))}),0),l.apply(this,[a])}});return r.push(()=>{t.FontFace=n}),r.push(o),E(()=>{r.forEach(l=>l())})}function vf(s){let{doc:e,mirror:t,blockClass:r,blockSelector:i,selectionCb:n}=s,o=!0,l=E(()=>{let a=e.getSelection();if(!a||o&&a?.isCollapsed)return;o=a.isCollapsed||!1;let u=[],c=a.rangeCount||0;for(let h=0;h<c;h++){let p=a.getRangeAt(h),{startContainer:m,startOffset:g,endContainer:d,endOffset:f}=p;J(m,r,i,!0)||J(d,r,i,!0)||u.push({start:t.getId(m),startOffset:g,end:t.getId(d),endOffset:f})}n({ranges:u})});return l(),Z("selectionchange",l)}function Cf({doc:s,customElementCb:e}){let t=s.defaultView;return!t||!t.customElements?()=>{}:Ue(t.customElements,"define",function(i){return function(n,o,l){try{e({define:{name:n}})}catch{console.warn(`Custom element callback failed for ${n}`)}return i.apply(this,[n,o,l])}})}function If(s,e){let{mutationCb:t,mousemoveCb:r,mouseInteractionCb:i,scrollCb:n,viewportResizeCb:o,inputCb:l,mediaInteractionCb:a,styleSheetRuleCb:u,styleDeclarationCb:c,canvasMutationCb:h,fontCb:p,selectionCb:m,customElementCb:g}=s;s.mutationCb=(...d)=>{e.mutation&&e.mutation(...d),t(...d)},s.mousemoveCb=(...d)=>{e.mousemove&&e.mousemove(...d),r(...d)},s.mouseInteractionCb=(...d)=>{e.mouseInteraction&&e.mouseInteraction(...d),i(...d)},s.scrollCb=(...d)=>{e.scroll&&e.scroll(...d),n(...d)},s.viewportResizeCb=(...d)=>{e.viewportResize&&e.viewportResize(...d),o(...d)},s.inputCb=(...d)=>{e.input&&e.input(...d),l(...d)},s.mediaInteractionCb=(...d)=>{e.mediaInteaction&&e.mediaInteaction(...d),a(...d)},s.styleSheetRuleCb=(...d)=>{e.styleSheetRule&&e.styleSheetRule(...d),u(...d)},s.styleDeclarationCb=(...d)=>{e.styleDeclaration&&e.styleDeclaration(...d),c(...d)},s.canvasMutationCb=(...d)=>{e.canvasMutation&&e.canvasMutation(...d),h(...d)},s.fontCb=(...d)=>{e.font&&e.font(...d),p(...d)},s.selectionCb=(...d)=>{e.selection&&e.selection(...d),m(...d)},s.customElementCb=(...d)=>{e.customElement&&e.customElement(...d),g(...d)}}function Ef(s,e={}){let t=s.doc.defaultView;if(!t)return()=>{};If(s,e);let r;s.recordDOM&&(r=Ko(s,s.doc));let i=ff(s),n=df(s),o=qo(s),l=pf(s,{win:t}),a=gf(s),u=bf(s),c=()=>{},h=()=>{},p=()=>{},m=()=>{};s.recordDOM&&(c=yf(s,{win:t}),h=Qo(s,s.doc),p=wf(s,{win:t}),s.collectFonts&&(m=Sf(s)));let g=vf(s),d=Cf(s),f=[];for(let b of s.plugins)f.push(b.observer(b.callback,t,b.options));return E(()=>{ve.forEach(b=>b.reset()),r?.disconnect(),i(),n(),o(),l(),a(),u(),c(),h(),p(),m(),g(),d(),f.forEach(b=>b())})}function Wt(s){return typeof window[s]<"u"}function zt(s){return!!(typeof window[s]<"u"&&window[s].prototype&&"insertRule"in window[s].prototype&&"deleteRule"in window[s].prototype)}var lr=class{constructor(e){w(this,"iframeIdToRemoteIdMap",new WeakMap),w(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=e}getId(e,t,r,i){let n=r||this.getIdToRemoteIdMap(e),o=i||this.getRemoteIdToIdMap(e),l=n.get(t);return l||(l=this.generateIdFn(),n.set(t,l),o.set(l,t)),l}getIds(e,t){let r=this.getIdToRemoteIdMap(e),i=this.getRemoteIdToIdMap(e);return t.map(n=>this.getId(e,n,r,i))}getRemoteId(e,t,r){let i=r||this.getRemoteIdToIdMap(e);if(typeof t!="number")return t;let n=i.get(t);return n||-1}getRemoteIds(e,t){let 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}},Ds=class{constructor(e){w(this,"iframes",new WeakMap),w(this,"crossOriginIframeMap",new WeakMap),w(this,"crossOriginIframeMirror",new lr(mn)),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 lr(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){let t=e;if(t.data.type!=="rrweb"||t.origin!==t.data.origin||!e.source)return;let i=this.crossOriginIframeMap.get(e.source);if(!i)return;let n=this.transformCrossOriginEvent(i,t.data.event);n&&this.wrappedEmit(n,t.data.isCheckout)}transformCrossOriginEvent(e,t){var r;switch(t.type){case x.FullSnapshot:{this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e);let i=t.data.node.id;return this.crossOriginIframeRootIdMap.set(e,i),this.patchRootIdOnNode(t.data.node,i),{timestamp:t.timestamp,type:x.IncrementalSnapshot,data:{source:I.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case x.Meta:case x.Load:case x.DomContentLoaded:return!1;case x.Plugin:return t;case x.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case x.IncrementalSnapshot:switch(t.data.source){case I.Mutation:return t.data.adds.forEach(i=>{this.replaceIds(i,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(i.node,e);let 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 I.Drag:case I.TouchMove:case I.MouseMove:return t.data.positions.forEach(i=>{this.replaceIds(i,e,["id"])}),t;case I.ViewportResize:return!1;case I.MediaInteraction:case I.MouseInteraction:case I.Scroll:case I.CanvasMutation:case I.Input:return this.replaceIds(t.data,e,["id"]),t;case I.StyleSheetRule:case I.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case I.Font:return t;case I.Selection:return t.data.ranges.forEach(i=>{this.replaceIds(i,e,["start","end"])}),t;case I.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(let 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!==Zo.Document&&!e.rootId&&(e.rootId=t),"childNodes"in e&&e.childNodes.forEach(r=>{this.patchRootIdOnNode(r,t)})}},Ts=class{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(!Qe(e)||this.shadowDoms.has(e))return;this.shadowDoms.add(e);let r=Ko({...this.bypassOptions,doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},e);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push(qo({...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(C.host(e))),this.restoreHandlers.push(Qo({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},e))},0)}observeAttachShadow(e){!e.contentWindow||!e.contentDocument||this.patchAttachShadow(e.contentWindow.Element,e.contentDocument)}patchAttachShadow(e,t){let r=this;this.restoreHandlers.push(Ue(e.prototype,"attachShadow",function(i){return function(n){let o=i.call(this,n),l=C.shadowRoot(this);return l&&Xo(this)&&r.addShadowRoot(l,t),o}}))}reset(){this.restoreHandlers.forEach(e=>{try{e()}catch{}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}},De="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",xf=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(Ke=0;Ke<De.length;Ke++)xf[De.charCodeAt(Ke)]=Ke;var Ke,Mf=function(s){var e=new Uint8Array(s),t,r=e.length,i="";for(t=0;t<r;t+=3)i+=De[e[t]>>2],i+=De[(e[t]&3)<<4|e[t+1]>>4],i+=De[(e[t+1]&15)<<2|e[t+2]>>6],i+=De[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};var on=new Map;function Nf(s,e){let t=on.get(s);return t||(t=new Map,on.set(s,t)),t.has(e)||t.set(e,[]),t.get(e)}var ea=(s,e,t)=>{if(!s||!(ra(s,e)||typeof s=="object"))return;let r=s.constructor.name,i=Nf(t,r),n=i.indexOf(s);return n===-1&&(n=i.length,i.push(s)),n};function Yt(s,e,t){if(s instanceof Array)return s.map(r=>Yt(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){let r=s.constructor.name,i=Mf(s);return{rr_type:r,base64:i}}else{if(s instanceof DataView)return{rr_type:s.constructor.name,args:[Yt(s.buffer,e,t),s.byteOffset,s.byteLength]};if(s instanceof HTMLImageElement){let r=s.constructor.name,{src:i}=s;return{rr_type:r,src:i}}else if(s instanceof HTMLCanvasElement){let r="HTMLImageElement",i=s.toDataURL();return{rr_type:r,src:i}}else{if(s instanceof ImageData)return{rr_type:s.constructor.name,args:[Yt(s.data,e,t),s.width,s.height]};if(ra(s,e)||typeof s=="object"){let r=s.constructor.name,i=ea(s,e,t);return{rr_type:r,index:i}}}}return s}var ta=(s,e,t)=>s.map(r=>Yt(r,e,t)),ra=(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 Rf(s,e,t,r){let i=[],n=Object.getOwnPropertyNames(e.CanvasRenderingContext2D.prototype);for(let o of n)try{if(typeof e.CanvasRenderingContext2D.prototype[o]!="function")continue;let l=Ue(e.CanvasRenderingContext2D.prototype,o,function(a){return function(...u){return J(this.canvas,t,r,!0)||setTimeout(()=>{let c=ta(u,e,this);s(this.canvas,{type:Fe["2D"],property:o,args:c})},0),a.apply(this,u)}});i.push(l)}catch{let l=Sr(e.CanvasRenderingContext2D.prototype,o,{set(a){s(this.canvas,{type:Fe["2D"],property:o,args:[a],setter:!0})}});i.push(l)}return()=>{i.forEach(o=>o())}}function Af(s){return s==="experimental-webgl"?"webgl":s}function an(s,e,t,r){let i=[];try{let n=Ue(s.HTMLCanvasElement.prototype,"getContext",function(o){return function(l,...a){if(!J(this,e,t,!0)){let u=Af(l);if("__context"in this||(this.__context=u),r&&["webgl","webgl2"].includes(u))if(a[0]&&typeof a[0]=="object"){let 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{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{i.forEach(n=>n())}}function ln(s,e,t,r,i,n){let o=[],l=Object.getOwnPropertyNames(s);for(let a of l)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(a))try{if(typeof s[a]!="function")continue;let u=Ue(s,a,function(c){return function(...h){let p=c.apply(this,h);if(ea(p,n,this),"tagName"in this.canvas&&!J(this.canvas,r,i,!0)){let m=ta(h,n,this),g={type:e,property:a,args:m};t(this.canvas,g)}return p}});o.push(u)}catch{let u=Sr(s,a,{set(c){t(this.canvas,{type:e,property:a,args:[c],setter:!0})}});o.push(u)}return o}function Of(s,e,t,r){let i=[];return i.push(...ln(e.WebGLRenderingContext.prototype,Fe.WebGL,s,t,r,e)),typeof e.WebGL2RenderingContext<"u"&&i.push(...ln(e.WebGL2RenderingContext.prototype,Fe.WebGL2,s,t,r,e)),()=>{i.forEach(n=>n())}}var sa="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=",Df=s=>Uint8Array.from(atob(s),e=>e.charCodeAt(0)),un=typeof window<"u"&&window.Blob&&new Blob([Df(sa)],{type:"text/javascript;charset=utf-8"});function Tf(s){let e;try{if(e=un&&(window.URL||window.webkitURL).createObjectURL(un),!e)throw"";let t=new Worker(e,{name:s?.name});return t.addEventListener("error",()=>{(window.URL||window.webkitURL).revokeObjectURL(e)}),t}catch{return new Worker("data:text/javascript;base64,"+sa,{name:s?.name})}finally{e&&(window.URL||window.webkitURL).revokeObjectURL(e)}}var _s=class{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)});let{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){let o=an(t,r,i,!0),l=new Map,a=new Tf;a.onmessage=g=>{let{id:d}=g.data;if(l.set(d,!1),!("base64"in g.data))return;let{base64:f,type:b,width:S,height:y}=g.data;this.mutationCb({id:d,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]}]})};let u=1e3/e,c=0,h,p=()=>{let g=[];return t.document.querySelectorAll("canvas").forEach(d=>{J(d,r,i,!0)||g.push(d)}),g},m=g=>{if(c&&g-c<u){h=requestAnimationFrame(m);return}c=g,p().forEach(async d=>{var f;let b=this.mirror.getId(d);if(l.get(b)||d.width===0||d.height===0)return;if(l.set(b,!0),["webgl","webgl2"].includes(d.__context)){let y=d.getContext(d.__context);((f=y?.getContextAttributes())==null?void 0:f.preserveDrawingBuffer)===!1&&y.clear(y.COLOR_BUFFER_BIT)}let S=await createImageBitmap(d);a.postMessage({id:b,bitmap:S,width:d.width,height:d.height,dataURLOptions:n.dataURLOptions},[S])}),h=requestAnimationFrame(m)};h=requestAnimationFrame(m),this.resetObservers=()=>{o(),cancelAnimationFrame(h)}}initCanvasMutationObserver(e,t,r){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();let i=an(e,t,r,!1),n=Rf(this.processMutation.bind(this),e,t,r),o=Of(this.processMutation.bind(this),e,t,r);this.resetObservers=()=>{i(),n(),o()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){let e=t=>{this.rafStamps.latestId=t,requestAnimationFrame(e)};requestAnimationFrame(e)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((e,t)=>{let r=this.mirror.getId(t);this.flushPendingCanvasMutationFor(t,r)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(e,t){if(this.frozen||this.locked)return;let r=this.pendingCanvasMutations.get(e);if(!r||t===-1)return;let i=r.map(o=>{let{type:l,...a}=o;return a}),{type:n}=r[0];this.mutationCb({id:t,type:n,commands:i}),this.pendingCanvasMutations.delete(e)}},ks=class{constructor(e){w(this,"trackedLinkElements",new WeakSet),w(this,"mutationCb"),w(this,"adoptedStyleSheetCb"),w(this,"styleMirror",new Ns),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;let r={id:t,styleIds:[]},i=[];for(let 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:dn(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){}},$s=class{constructor(){w(this,"nodeMap",new WeakMap),w(this,"active",!1)}inOtherBuffer(e,t){let 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(){}},z,Xt,jr,ur=!1;try{if(Array.from([1],s=>s*2)[0]!==2){let s=document.createElement("iframe");document.body.appendChild(s),Array.from=((fi=s.contentWindow)==null?void 0:fi.Array.from)||Array.from,document.body.removeChild(s)}}catch(s){console.debug("Unable to override Array.from",s)}var re=Ua();function de(s={}){let{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:p,slimDOMOptions:m,maskInputFn:g,maskTextFn:d,hooks:f,packFn:b,sampling:S={},dataURLOptions:y={},mousemoveWait:v,recordDOM:O=!0,recordCanvas:_=!1,recordCrossOriginIframes:j=!1,recordAfter:P=s.recordAfter==="DOMContentLoaded"?s.recordAfter:"load",userTriggeredOnInput:V=!1,collectFonts:Y=!1,inlineImages:q=!1,plugins:ne,keepIframeSrcFn:M=()=>!1,ignoreCSSAttributes:He=new Set([]),errorHandler:je}=s;cf(je);let G=j?window.parent===window:!0,Q=!1;if(!G)try{window.parent.document&&(Q=!1)}catch{Q=!0}if(G&&!e)throw new Error("emit function is required");if(!G&&!Q)return()=>{};v!==void 0&&S.mousemove===void 0&&(S.mousemove=v),re.reset();let we=h===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:p!==void 0?p:{password:!0},oe=m===!0||m==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:m==="all",headMetaDescKeywords:m==="all",headTitleMutations:m==="all"}:m||{};nf();let li,Rr=0,ui=N=>{for(let te of ne||[])te.eventProcessor&&(N=te.eventProcessor(N));return b&&!Q&&(N=b(N)),N};z=(N,te)=>{var B;let W=N;if(W.timestamp=or(),(B=ve[0])!=null&&B.isFrozen()&&W.type!==x.FullSnapshot&&!(W.type===x.IncrementalSnapshot&&W.data.source===I.Mutation)&&ve.forEach(ae=>ae.unfreeze()),G)e?.(ui(W),te);else if(Q){let ae={type:"rrweb",event:ui(W),origin:window.location.origin,isCheckout:te};window.parent.postMessage(ae,"*")}if(W.type===x.FullSnapshot)li=W,Rr=0;else if(W.type===x.IncrementalSnapshot){if(W.data.source===I.Mutation&&W.data.isAttachIframe)return;Rr++;let ae=r&&Rr>=r,D=t&&W.timestamp-li.timestamp>t;(ae||D)&&Xt(!0)}};let bt=N=>{z({type:x.IncrementalSnapshot,data:{source:I.Mutation,...N}})},ci=N=>z({type:x.IncrementalSnapshot,data:{source:I.Scroll,...N}}),hi=N=>z({type:x.IncrementalSnapshot,data:{source:I.CanvasMutation,...N}}),ca=N=>z({type:x.IncrementalSnapshot,data:{source:I.AdoptedStyleSheet,...N}}),be=new ks({mutationCb:bt,adoptedStyleSheetCb:ca}),Se=new Ds({mirror:re,mutationCb:bt,stylesheetManager:be,recordCrossOriginIframes:j,wrappedEmit:z});for(let N of ne||[])N.getMirror&&N.getMirror({nodeMirror:re,crossOriginIframeMirror:Se.crossOriginIframeMirror,crossOriginIframeStyleMirror:Se.crossOriginIframeStyleMirror});let Ar=new $s;jr=new _s({recordCanvas:_,mutationCb:hi,win:window,blockClass:i,blockSelector:n,mirror:re,sampling:S.canvas,dataURLOptions:y});let St=new Ts({mutationCb:bt,scrollCb:ci,bypassOptions:{blockClass:i,blockSelector:n,maskTextClass:a,maskTextSelector:u,inlineStylesheet:c,maskInputOptions:we,dataURLOptions:y,maskTextFn:d,maskInputFn:g,recordCanvas:_,inlineImages:q,sampling:S,slimDOMOptions:oe,iframeManager:Se,stylesheetManager:be,canvasManager:jr,keepIframeSrcFn:M,processedNodeManager:Ar},mirror:re});Xt=(N=!1)=>{if(!O)return;z({type:x.Meta,data:{href:window.location.href,width:zo(),height:Wo()}},N),be.reset(),St.init(),ve.forEach(B=>B.lock());let te=ul(document,{mirror:re,blockClass:i,blockSelector:n,maskTextClass:a,maskTextSelector:u,inlineStylesheet:c,maskAllInputs:we,maskTextFn:d,maskInputFn:g,slimDOM:oe,dataURLOptions:y,recordCanvas:_,inlineImages:q,onSerialize:B=>{Ho(B,re)&&Se.addIframe(B),jo(B,re)&&be.trackLinkElement(B),Ms(B)&&St.addShadowRoot(C.shadowRoot(B),document)},onIframeLoad:(B,W)=>{Se.attachIframe(B,W),St.observeAttachShadow(B)},onStylesheetLoad:(B,W)=>{be.attachLinkElement(B,W)},keepIframeSrcFn:M});if(!te)return console.warn("Failed to snapshot the document");z({type:x.FullSnapshot,data:{node:te,initialOffset:Bo(window)}},N),ve.forEach(B=>B.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&be.adoptStyleSheets(document.adoptedStyleSheets,re.getId(document))};try{let N=[],te=W=>{var ae;return E(Ef)({mutationCb:bt,mousemoveCb:(D,Or)=>z({type:x.IncrementalSnapshot,data:{source:Or,positions:D}}),mouseInteractionCb:D=>z({type:x.IncrementalSnapshot,data:{source:I.MouseInteraction,...D}}),scrollCb:ci,viewportResizeCb:D=>z({type:x.IncrementalSnapshot,data:{source:I.ViewportResize,...D}}),inputCb:D=>z({type:x.IncrementalSnapshot,data:{source:I.Input,...D}}),mediaInteractionCb:D=>z({type:x.IncrementalSnapshot,data:{source:I.MediaInteraction,...D}}),styleSheetRuleCb:D=>z({type:x.IncrementalSnapshot,data:{source:I.StyleSheetRule,...D}}),styleDeclarationCb:D=>z({type:x.IncrementalSnapshot,data:{source:I.StyleDeclaration,...D}}),canvasMutationCb:hi,fontCb:D=>z({type:x.IncrementalSnapshot,data:{source:I.Font,...D}}),selectionCb:D=>{z({type:x.IncrementalSnapshot,data:{source:I.Selection,...D}})},customElementCb:D=>{z({type:x.IncrementalSnapshot,data:{source:I.CustomElement,...D}})},blockClass:i,ignoreClass:o,ignoreSelector:l,maskTextClass:a,maskTextSelector:u,maskInputOptions:we,inlineStylesheet:c,sampling:S,recordDOM:O,recordCanvas:_,inlineImages:q,userTriggeredOnInput:V,collectFonts:Y,doc:W,maskInputFn:g,maskTextFn:d,keepIframeSrcFn:M,blockSelector:n,slimDOMOptions:oe,dataURLOptions:y,mirror:re,iframeManager:Se,stylesheetManager:be,shadowDomManager:St,processedNodeManager:Ar,canvasManager:jr,ignoreCSSAttributes:He,plugins:((ae=ne?.filter(D=>D.observer))==null?void 0:ae.map(D=>({observer:D.observer,options:D.options,callback:Or=>z({type:x.Plugin,data:{plugin:D.name,payload:Or}})})))||[]},f)};Se.addLoadListener(W=>{try{N.push(te(W.contentDocument))}catch(ae){console.warn(ae)}});let B=()=>{Xt(),N.push(te(document)),ur=!0};return document.readyState==="interactive"||document.readyState==="complete"?B():(N.push(Z("DOMContentLoaded",()=>{z({type:x.DomContentLoaded,data:{}}),P==="DOMContentLoaded"&&B()})),N.push(Z("load",()=>{z({type:x.Load,data:{}}),P==="load"&&B()},window))),()=>{N.forEach(W=>W()),Ar.destroy(),ur=!1,hf()}}catch(N){console.warn(N)}}de.addCustomEvent=(s,e)=>{if(!ur)throw new Error("please add custom event after start recording");z({type:x.Custom,data:{tag:s,payload:e}})};de.freezePage=()=>{ve.forEach(s=>s.freeze())};de.takeFullSnapshot=s=>{if(!ur)throw new Error("please take full snapshot after start recording");Xt(s)};de.mirror=re;var cn;(function(s){s[s.NotStarted=0]="NotStarted",s[s.Running=1]="Running",s[s.Stopped=2]="Stopped"})(cn||(cn={}));var bd=5*1e3;var{addCustomEvent:vr}=de,{freezePage:Sd}=de,{takeFullSnapshot:vd}=de;var Cr=100*1024,_f=["json","text","xml","urlencoded","javascript"],xe=null,We=null,ze=null,gt=null,xr=null,oa=!1,Be=(...s)=>{oa&&console.log("[Tracebck:Network]",...s)},Ir=s=>{if(!s)return!1;let e=s.toLowerCase();return _f.some(t=>e.includes(t))},Er=(s,e)=>{if(!s)return{body:null,truncated:!1};let t=typeof s=="string"?s:JSON.stringify(s);return t.length<=e?{body:t,truncated:!1}:{body:t.slice(0,e),truncated:!0}},ia=s=>{if(!xr)return!0;try{return!s.startsWith(xr)}catch{return!0}},na=s=>{let e={};return s instanceof Headers?s.forEach((t,r)=>{e[r]=t}):typeof s=="object"&&Object.assign(e,s),e};function aa(s,e=!1){typeof window>"u"||(xr=s,oa=e,window.fetch&&!xe&&(xe=window.fetch,window.fetch=async function(...t){let[r,i={}]=t,n=typeof r=="string"?r:r.url;if(!ia(n))return xe.apply(this,t);let o=Date.now(),l=(i.method||"GET").toUpperCase(),a=na(i.headers||{}),u=null,c=!1;if(i.body&&Ir(a["content-type"])){let h=Er(i.body,Cr);u=h.body,c=h.truncated}try{let h=await xe.apply(this,t),p=Date.now()-o,m=h.clone(),g=na(m.headers),d=null,f=!1;if(Ir(g["content-type"]))try{let b=await m.text(),S=Er(b,Cr);d=S.body,f=S.truncated}catch{}try{vr("network-request",{method:l,url:n,statusCode:h.status,startTime:o,duration:p,requestHeaders:a,requestBody:u,requestBodyTruncated:c,responseHeaders:g,responseBody:d,responseBodyTruncated:f,initiator:"fetch"}),Be(`${l} ${n} \u2192 ${h.status} (${p}ms)`)}catch(b){Be("Failed to emit custom event:",b.message)}return h}catch(h){let p=Date.now()-o;try{vr("network-request",{method:l,url:n,statusCode:0,startTime:o,duration:p,requestHeaders:a,requestBody:u,requestBodyTruncated:c,error:h.message,initiator:"fetch"}),Be(`${l} ${n} \u2192 ERROR (${p}ms)`)}catch(m){Be("Failed to emit custom event:",m.message)}throw h}}),window.XMLHttpRequest&&!We&&(We=XMLHttpRequest.prototype.open,ze=XMLHttpRequest.prototype.send,gt=XMLHttpRequest.prototype.setRequestHeader,XMLHttpRequest.prototype.open=function(t,r,...i){return this._tracebck={method:t.toUpperCase(),url:typeof r=="string"?r:r.toString(),startTime:null,requestHeaders:{},shouldCapture:ia(typeof r=="string"?r:r.toString())},We.apply(this,[t,r,...i])},XMLHttpRequest.prototype.setRequestHeader=function(t,r){return this._tracebck?.requestHeaders&&(this._tracebck.requestHeaders[t]=r),gt.apply(this,arguments)},XMLHttpRequest.prototype.send=function(t){if(!this._tracebck||!this._tracebck.shouldCapture)return ze.apply(this,arguments);let r=this._tracebck;r.startTime=Date.now();let i=null,n=!1;if(t&&Ir(r.requestHeaders["content-type"])){let o=Er(t,Cr);i=o.body,n=o.truncated}return this.addEventListener("loadend",function(){let o=Date.now()-r.startTime,l={};try{let c=this.getAllResponseHeaders();c&&c.trim().split(/[\r\n]+/).forEach(h=>{let p=h.split(": "),m=p.shift(),g=p.join(": ");m&&(l[m]=g)})}catch{}let a=null,u=!1;if(this.responseText&&Ir(l["content-type"])){let c=Er(this.responseText,Cr);a=c.body,u=c.truncated}try{vr("network-request",{method:r.method,url:r.url,statusCode:this.status,startTime:r.startTime,duration:o,requestHeaders:r.requestHeaders,requestBody:i,requestBodyTruncated:n,responseHeaders:l,responseBody:a,responseBodyTruncated:u,initiator:"xhr"}),Be(`${r.method} ${r.url} \u2192 ${this.status} (${o}ms) [XHR]`)}catch(c){Be("Failed to emit custom event:",c.message)}}),ze.apply(this,arguments)}))}function la(){xe&&(window.fetch=xe,xe=null),We&&(XMLHttpRequest.prototype.open=We,We=null),ze&&(XMLHttpRequest.prototype.send=ze,ze=null),gt&&(XMLHttpRequest.prototype.setRequestHeader=gt,gt=null),xr=null}var kf="https://api.tracebck.dev/v1",U={apiKey:null,endpoint:kf,debug:!1,flushInterval:5e3,maskAllInputs:!1,captureNetwork:!0,options:{}},pe=null,Mr=null,Ve=[],Nr=null,ai=!1,Ge=(...s)=>{U.debug&&console.log("[Tracebck]",...s)},yt=(...s)=>{console.warn("[Tracebck]",...s)},$f=200;function Pf({apiKey:s,endpoint:e,debug:t,flushInterval:r,maskAllInputs:i,captureNetwork:n,options:o}){if(!s){console.error("[Tracebck] apiKey is required");return}U.apiKey=s,e&&(U.endpoint=e.replace(/\/$/,"")),typeof t=="boolean"&&(U.debug=t),typeof r=="number"&&(U.flushInterval=r),typeof i=="boolean"&&(U.maskAllInputs=i),typeof n=="boolean"&&(U.captureNetwork=n),typeof o=="object"&&(U.options=o),Ge("Initialized with",{endpoint:U.endpoint,debug:U.debug}),typeof window<"u"&&(window.addEventListener("pagehide",()=>wt(!0)),window.addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&wt(!0)}))}async function Lf({identifier:s,metadata:e}={}){if(!U.apiKey){yt("Cannot start session: API Key is missing. Call init() first.");return}if(pe&&(Ge("Stopping previous session before starting a new one..."),await ua()),!s||!s.value){yt("Identifier value is required to start a session.");return}let t={type:s.type||"custom",value:s.value};Ge("Starting session for:",t.value);try{let r=await fetch(`${U.endpoint}/sessions`,{method:"POST",headers:{"Content-Type":"application/json","x-api-key":U.apiKey},body:JSON.stringify({identifier:t,metadata:{url:window.location.href,referrer:document.referrer,userAgent:navigator.userAgent,language:navigator.language,resolution:`${window.innerWidth}x${window.innerHeight}`,...e}})});if(!r.ok){let n=await r.json().catch(()=>({}));throw new Error(n.error||`Server responded with ${r.status}`)}pe=(await r.json()).sessionId,Mr=de({emit(n){Ve.push(n),Ve.length>=$f&&wt()},sampling:{mousemove:!0,scroll:150,input:"last"},maskAllInputs:U.maskAllInputs,checkoutEveryNms:2*60*1e3,...U.options}),Nr=setInterval(wt,U.flushInterval),U.captureNetwork&&aa(U.endpoint,U.debug),Ge("Session started:",pe)}catch(r){yt("Could not start session:",r.message)}}async function ua(){if(pe){Nr&&clearInterval(Nr),Mr&&Mr(),la(),await wt(!0);try{await fetch(`${U.endpoint}/sessions/${pe}/stop`,{method:"POST",headers:{"x-api-key":U.apiKey},keepalive:!0})}catch{}Ge("Session stopped:",pe),pe=null,Mr=null,Ve=[],Nr=null}}async function wt(s=!1){if(!pe||Ve.length===0||ai&&!s)return;ai=!0;let e=[...Ve];Ve=[];try{(await fetch(`${U.endpoint}/sessions/${pe}/events`,{method:"POST",headers:{"Content-Type":"application/json","x-api-key":U.apiKey},body:JSON.stringify({events:e}),keepalive:s})).ok?Ge("Events flushed:",e.length):yt("Failed to flush events")}catch(t){yt("Error flushing events:",t.message)}finally{ai=!1}}
|
|
53
|
+
or you can use record.mirror to access the mirror instance during recording.`,rn={map:{},getId(){return console.error(Re),-1},getNode(){return console.error(Re),null},removeNodeFromMap(){console.error(Re)},has(){return console.error(Re),!1},reset(){console.error(Re)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(rn=new Proxy(rn,{get(s,e,t){return e==="map"&&console.error(Re),Reflect.get(s,e,t)}}));function ht(s,e,t={}){let r=null,i=0;return function(...n){let o=Date.now();!i&&t.leading===!1&&(i=o);let 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 Cr(s,e,t,r,i=window){let 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)}}),()=>Cr(s,e,n||{},!0)}function Be(s,e,t){try{if(!(e in s))return()=>{};let 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{return()=>{}}}var lr=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(lr=()=>new Date().getTime());function Vo(s){var e,t,r,i;let n=s.document;return{left:n.scrollingElement?n.scrollingElement.scrollLeft:s.pageXOffset!==void 0?s.pageXOffset:n.documentElement.scrollLeft||n?.body&&((e=C.parentElement(n.body))==null?void 0:e.scrollLeft)||((t=n?.body)==null?void 0:t.scrollLeft)||0,top:n.scrollingElement?n.scrollingElement.scrollTop:s.pageYOffset!==void 0?s.pageYOffset:n?.documentElement.scrollTop||n?.body&&((r=C.parentElement(n.body))==null?void 0:r.scrollTop)||((i=n?.body)==null?void 0:i.scrollTop)||0}}function Go(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function Ho(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function jo(s){return s?s.nodeType===s.ELEMENT_NODE?s:C.parentElement(s):null}function J(s,e,t,r){if(!s)return!1;let i=jo(s);if(!i)return!1;try{if(typeof e=="string"){if(i.classList.contains(e)||r&&i.closest("."+e)!==null)return!0}else if(Qt(i,e,r))return!0}catch{}return!!(t&&(i.matches(t)||r&&i.closest(t)!==null))}function af(s,e){return e.getId(s)!==-1}function Yr(s,e,t){return s.tagName==="TITLE"&&t.headTitleMutations?!0:e.getId(s)===rt}function Yo(s,e){if(Qe(s))return!1;let t=e.getId(s);if(!e.has(t))return!0;let r=C.parentNode(s);return r&&r.nodeType===s.DOCUMENT_NODE?!1:r?Yo(r,e):!0}function Ns(s){return!!s.changedTouches}function lf(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 Xo(s,e){return!!(s.nodeName==="IFRAME"&&e.getMeta(s))}function Zo(s,e){return!!(s.nodeName==="LINK"&&s.nodeType===s.ELEMENT_NODE&&s.getAttribute&&s.getAttribute("rel")==="stylesheet"&&e.getMeta(s))}function Rs(s){return s?s instanceof Ms&&"shadowRoot"in s?!!s.shadowRoot:!!C.shadowRoot(s):!1}var As=class{constructor(){w(this,"id",1),w(this,"styleIDMap",new WeakMap),w(this,"idStyleMap",new Map)}getId(e){return this.styleIDMap.get(e)??-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 Jo(s){var e;let t=null;return"getRootNode"in s&&((e=C.getRootNode(s))==null?void 0:e.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&C.host(C.getRootNode(s))&&(t=C.host(C.getRootNode(s))),t}function uf(s){let e=s,t;for(;t=Jo(e);)e=t;return e}function cf(s){let e=s.ownerDocument;if(!e)return!1;let t=uf(s);return C.contains(e,t)}function qo(s){let e=s.ownerDocument;return e?C.contains(e,s)||cf(s):!1}var x=(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))(x||{}),E=(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))(E||{}),q=(s=>(s[s.MouseUp=0]="MouseUp",s[s.MouseDown=1]="MouseDown",s[s.Click=2]="Click",s[s.ContextMenu=3]="ContextMenu",s[s.DblClick=4]="DblClick",s[s.Focus=5]="Focus",s[s.Blur=6]="Blur",s[s.TouchStart=7]="TouchStart",s[s.TouchMove_Departed=8]="TouchMove_Departed",s[s.TouchEnd=9]="TouchEnd",s[s.TouchCancel=10]="TouchCancel",s))(q||{}),he=(s=>(s[s.Mouse=0]="Mouse",s[s.Pen=1]="Pen",s[s.Touch=2]="Touch",s))(he||{}),Ue=(s=>(s[s["2D"]=0]="2D",s[s.WebGL=1]="WebGL",s[s.WebGL2=2]="WebGL2",s))(Ue||{}),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||{});var Ko=(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))(Ko||{});function sn(s){return"__ln"in s}var Os=class{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?.next||null;return t}addNode(e){let t={value:e,previous:null,next:null};if(e.__ln=t,e.previousSibling&&sn(e.previousSibling)){let 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&&sn(e.nextSibling)&&e.nextSibling.__ln.previous){let 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){let 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--)}},nn=(s,e)=>`${s}@${e}`,Ds=class{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;let e=[],t=new Set,r=new Os,i=a=>{let u=a,c=rt;for(;c===rt;)u=u&&u.nextSibling,c=u&&this.mirror.getId(u);return c},n=a=>{let u=C.parentNode(a);if(!u||!qo(a))return;let c=!1;if(a.nodeType===Node.TEXT_NODE){let g=u.tagName;if(g==="TEXTAREA")return;g==="STYLE"&&this.addedSet.has(u)&&(c=!0)}let h=Qe(u)?this.mirror.getId(Jo(a)):this.mirror.getId(u),p=i(a);if(h===-1||p===-1)return r.addNode(a);let m=De(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=>{Xo(g,this.mirror)&&this.iframeManager.addIframe(g),Zo(g,this.mirror)&&this.stylesheetManager.trackLinkElement(g),Rs(a)&&this.shadowDomManager.addShadowRoot(C.shadowRoot(a),this.doc)},onIframeLoad:(g,d)=>{this.iframeManager.attachIframe(g,d),this.shadowDomManager.observeAttachShadow(g)},onStylesheetLoad:(g,d)=>{this.stylesheetManager.attachLinkElement(g,d)},cssCaptured:c});m&&(e.push({parentId:h,nextId:p,node:m}),t.add(m.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(let a of this.movedSet)on(this.removesSubTreeCache,a,this.mirror)&&!this.movedSet.has(C.parentNode(a))||n(a);for(let a of this.addedSet)!an(this.droppedSet,a)&&!on(this.removesSubTreeCache,a,this.mirror)||an(this.movedSet,a)?n(a):this.droppedSet.add(a);let o=null;for(;r.length;){let a=null;if(o){let u=this.mirror.getId(C.parentNode(o.value)),c=i(o.value);u!==-1&&c!==-1&&(a=o)}if(!a){let u=r.tail;for(;u;){let c=u;if(u=u.previous,c){let h=this.mirror.getId(C.parentNode(c.value));if(i(c.value)===-1)continue;if(h!==-1){a=c;break}else{let m=c.value,g=C.parentNode(m);if(g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE){let d=C.host(g);if(this.mirror.getId(d)!==-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)}let l={texts:this.texts.map(a=>{let u=a.node,c=C.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=>{let{attributes:u}=a;if(typeof u.style=="string"){let 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(C.childNodes(e),r=>C.textContent(r)||"").join("")}),w(this,"processMutation",e=>{if(!Yr(e.target,this.mirror,this.slimDOMOptions))switch(e.type){case"characterData":{let t=C.textContent(e.target);!J(e.target,this.blockClass,this.blockSelector,!1)&&t!==e.oldValue&&this.texts.push({value:Sn(e.target,this.maskTextClass,this.maskTextSelector,!0)&&t?this.maskTextFn?this.maskTextFn(t,jo(e.target)):t.replace(/[\S]/g,"*"):t,node:e.target});break}case"attributes":{let t=e.target,r=e.attributeName,i=e.target.getAttribute(r);if(r==="value"){let o=Bs(t);i=Us({element:t,maskInputOptions:this.maskInputOptions,tagName:t.tagName,type:o,value:i,maskInputFn:this.maskInputFn})}if(J(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"),!vn(t.tagName,r))if(n.attributes[r]=bn(this.doc,Ee(t.tagName),Ee(r),i),r==="style"){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch{this.unattachedDoc=this.doc}let o=this.unattachedDoc.createElement("span");e.oldValue&&o.setAttribute("style",e.oldValue);for(let l of Array.from(t.style)){let 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(let 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(J(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=>{let r=this.mirror.getId(t),i=Qe(e.target)?this.mirror.getId(C.host(e.target)):this.mirror.getId(e.target);J(e.target,this.blockClass,this.blockSelector,!1)||Yr(t,this.mirror,this.slimDOMOptions)||!af(t,this.mirror)||(this.addedSet.has(t)?(Ts(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&r===-1||Yo(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[nn(r,i)]?Ts(this.movedSet,t):(this.removes.push({parentId:i,id:r,isShadow:Qe(e.target)&&et(e.target)?!0:void 0}),hf(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(Yr(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[nn(this.mirror.getId(e),r)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);J(e,this.blockClass,this.blockSelector,!1)||(C.childNodes(e).forEach(r=>this.genAdds(r)),Rs(e)&&C.childNodes(C.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 Ts(s,e){s.delete(e),C.childNodes(e).forEach(t=>Ts(s,t))}function hf(s,e){let t=[s];for(;t.length;){let r=t.pop();e.has(r)||(e.add(r),C.childNodes(r).forEach(i=>t.push(i)))}}function on(s,e,t){return s.size===0?!1:ff(s,e)}function ff(s,e,t){let r=C.parentNode(e);return r?s.has(r):!1}function an(s,e){return s.size===0?!1:Qo(s,e)}function Qo(s,e){let t=C.parentNode(e);return t?s.has(t)?!0:Qo(s,t):!1}var tt;function df(s){tt=s}function pf(){tt=void 0}var I=s=>tt?(...t)=>{try{return s(...t)}catch(r){if(tt&&tt(r)===!0)return;throw r}}:s,Ce=[];function gt(s){try{if("composedPath"in s){let e=s.composedPath();if(e.length)return e[0]}else if("path"in s&&s.path.length)return s.path[0]}catch{}return s&&s.target}function ea(s,e){let t=new Ds;Ce.push(t),t.init(s);let r=new(zo())(I(t.processMutations.bind(t)));return r.observe(e,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),r}function mf({mousemoveCb:s,sampling:e,doc:t,mirror:r}){if(e.mousemove===!1)return()=>{};let i=typeof e.mousemove=="number"?e.mousemove:50,n=typeof e.mousemoveCallback=="number"?e.mousemoveCallback:500,o=[],l,a=ht(I(h=>{let p=Date.now()-l;s(o.map(m=>(m.timeOffset-=p,m)),h),o=[],l=null}),n),u=I(ht(I(h=>{let p=gt(h),{clientX:m,clientY:g}=Ns(h)?h.changedTouches[0]:h;l||(l=lr()),o.push({x:m,y:g,id:r.getId(p),timeOffset:lr()-l}),a(typeof DragEvent<"u"&&h instanceof DragEvent?E.Drag:h instanceof MouseEvent?E.MouseMove:E.TouchMove)}),i,{trailing:!1})),c=[Z("mousemove",u,t),Z("touchmove",u,t),Z("drag",u,t)];return I(()=>{c.forEach(h=>h())})}function gf({mouseInteractionCb:s,doc:e,mirror:t,blockClass:r,blockSelector:i,sampling:n}){if(n.mouseInteraction===!1)return()=>{};let o=n.mouseInteraction===!0||n.mouseInteraction===void 0?{}:n.mouseInteraction,l=[],a=null,u=c=>h=>{let p=gt(h);if(J(p,r,i,!0))return;let m=null,g=c;if("pointerType"in h){switch(h.pointerType){case"mouse":m=he.Mouse;break;case"touch":m=he.Touch;break;case"pen":m=he.Pen;break}m===he.Touch?q[c]===q.MouseDown?g="TouchStart":q[c]===q.MouseUp&&(g="TouchEnd"):he.Pen}else Ns(h)&&(m=he.Touch);m!==null?(a=m,(g.startsWith("Touch")&&m===he.Touch||g.startsWith("Mouse")&&m===he.Mouse)&&(m=null)):q[c]===q.Click&&(m=a,a=null);let d=Ns(h)?h.changedTouches[0]:h;if(!d)return;let f=t.getId(p),{clientX:b,clientY:v}=d;I(s)({type:q[g],id:f,x:b,y:v,...m!==null&&{pointerType:m}})};return Object.keys(q).filter(c=>Number.isNaN(Number(c))&&!c.endsWith("_Departed")&&o[c]!==!1).forEach(c=>{let h=Ee(c),p=u(c);if(window.PointerEvent)switch(q[c]){case q.MouseDown:case q.MouseUp:h=h.replace("mouse","pointer");break;case q.TouchStart:case q.TouchEnd:return}l.push(Z(h,p,e))}),I(()=>{l.forEach(c=>c())})}function ta({scrollCb:s,doc:e,mirror:t,blockClass:r,blockSelector:i,sampling:n}){let o=I(ht(I(l=>{let a=gt(l);if(!a||J(a,r,i,!0))return;let u=t.getId(a);if(a===e&&e.defaultView){let 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 Z("scroll",o,e)}function yf({viewportResizeCb:s},{win:e}){let t=-1,r=-1,i=I(ht(I(()=>{let n=Go(),o=Ho();(t!==n||r!==o)&&(s({width:Number(o),height:Number(n)}),t=n,r=o)}),200));return Z("resize",i,e)}var wf=["INPUT","TEXTAREA","SELECT"],ln=new WeakMap;function bf({inputCb:s,doc:e,mirror:t,blockClass:r,blockSelector:i,ignoreClass:n,ignoreSelector:o,maskInputOptions:l,maskInputFn:a,sampling:u,userTriggeredOnInput:c}){function h(v){let y=gt(v),S=v.isTrusted,D=y&&y.tagName;if(y&&D==="OPTION"&&(y=C.parentElement(y)),!y||!D||wf.indexOf(D)<0||J(y,r,i,!0)||y.classList.contains(n)||o&&y.matches(o))return;let _=y.value,j=!1,L=Bs(y)||"";L==="radio"||L==="checkbox"?j=y.checked:(l[D.toLowerCase()]||l[L])&&(_=Us({element:y,maskInputOptions:l,tagName:D,type:L,value:_,maskInputFn:a})),p(y,c?{text:_,isChecked:j,userTriggered:S}:{text:_,isChecked:j});let V=y.name;L==="radio"&&V&&j&&e.querySelectorAll(`input[type="radio"][name="${V}"]`).forEach(Y=>{if(Y!==y){let K=Y.value;p(Y,c?{text:K,isChecked:!j,userTriggered:!1}:{text:K,isChecked:!j})}})}function p(v,y){let S=ln.get(v);if(!S||S.text!==y.text||S.isChecked!==y.isChecked){ln.set(v,y);let D=t.getId(v);I(s)({...y,id:D})}}let g=(u.input==="last"?["change"]:["input","change"]).map(v=>Z(v,I(h),e)),d=e.defaultView;if(!d)return()=>{g.forEach(v=>v())};let f=d.Object.getOwnPropertyDescriptor(d.HTMLInputElement.prototype,"value"),b=[[d.HTMLInputElement.prototype,"value"],[d.HTMLInputElement.prototype,"checked"],[d.HTMLSelectElement.prototype,"value"],[d.HTMLTextAreaElement.prototype,"value"],[d.HTMLSelectElement.prototype,"selectedIndex"],[d.HTMLOptionElement.prototype,"selected"]];return f&&f.set&&g.push(...b.map(v=>Cr(v[0],v[1],{set(){I(h)({target:this,isTrusted:!1})}},!1,d))),I(()=>{g.forEach(v=>v())})}function ur(s){let e=[];function t(r,i){if(Vt("CSSGroupingRule")&&r.parentRule instanceof CSSGroupingRule||Vt("CSSMediaRule")&&r.parentRule instanceof CSSMediaRule||Vt("CSSSupportsRule")&&r.parentRule instanceof CSSSupportsRule||Vt("CSSConditionRule")&&r.parentRule instanceof CSSConditionRule){let o=Array.from(r.parentRule.cssRules).indexOf(r);i.unshift(o)}else if(r.parentStyleSheet){let o=Array.from(r.parentStyleSheet.cssRules).indexOf(r);i.unshift(o)}return i}return t(s,e)}function me(s,e,t){let r,i;return s?(s.ownerNode?r=e.getId(s.ownerNode):i=t.getId(s),{styleId:i,id:r}):{}}function vf({styleSheetRuleCb:s,mirror:e,stylesheetManager:t},{win:r}){if(!r.CSSStyleSheet||!r.CSSStyleSheet.prototype)return()=>{};let i=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=new Proxy(i,{apply:I((c,h,p)=>{let[m,g]=p,{id:d,styleId:f}=me(h,e,t.styleMirror);return(d&&d!==-1||f&&f!==-1)&&s({id:d,styleId:f,adds:[{rule:m,index:g}]}),c.apply(h,p)})}),r.CSSStyleSheet.prototype.addRule=function(c,h,p=this.cssRules.length){let m=`${c} { ${h} }`;return r.CSSStyleSheet.prototype.insertRule.apply(this,[m,p])};let n=r.CSSStyleSheet.prototype.deleteRule;r.CSSStyleSheet.prototype.deleteRule=new Proxy(n,{apply:I((c,h,p)=>{let[m]=p,{id:g,styleId:d}=me(h,e,t.styleMirror);return(g&&g!==-1||d&&d!==-1)&&s({id:g,styleId:d,removes:[{index:m}]}),c.apply(h,p)})}),r.CSSStyleSheet.prototype.removeRule=function(c){return r.CSSStyleSheet.prototype.deleteRule.apply(this,[c])};let o;r.CSSStyleSheet.prototype.replace&&(o=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(o,{apply:I((c,h,p)=>{let[m]=p,{id:g,styleId:d}=me(h,e,t.styleMirror);return(g&&g!==-1||d&&d!==-1)&&s({id:g,styleId:d,replace:m}),c.apply(h,p)})}));let l;r.CSSStyleSheet.prototype.replaceSync&&(l=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(l,{apply:I((c,h,p)=>{let[m]=p,{id:g,styleId:d}=me(h,e,t.styleMirror);return(g&&g!==-1||d&&d!==-1)&&s({id:g,styleId:d,replaceSync:m}),c.apply(h,p)})}));let a={};Gt("CSSGroupingRule")?a.CSSGroupingRule=r.CSSGroupingRule:(Gt("CSSMediaRule")&&(a.CSSMediaRule=r.CSSMediaRule),Gt("CSSConditionRule")&&(a.CSSConditionRule=r.CSSConditionRule),Gt("CSSSupportsRule")&&(a.CSSSupportsRule=r.CSSSupportsRule));let 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:I((p,m,g)=>{let[d,f]=g,{id:b,styleId:v}=me(m.parentStyleSheet,e,t.styleMirror);return(b&&b!==-1||v&&v!==-1)&&s({id:b,styleId:v,adds:[{rule:d,index:[...ur(m),f||0]}]}),p.apply(m,g)})}),h.prototype.deleteRule=new Proxy(u[c].deleteRule,{apply:I((p,m,g)=>{let[d]=g,{id:f,styleId:b}=me(m.parentStyleSheet,e,t.styleMirror);return(f&&f!==-1||b&&b!==-1)&&s({id:f,styleId:b,removes:[{index:[...ur(m),d]}]}),p.apply(m,g)})})}),I(()=>{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 ra({mirror:s,stylesheetManager:e},t){var r,i,n;let o=null;t.nodeName==="#document"?o=s.getId(t):o=s.getId(C.host(t));let 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?.prototype?Object.getOwnPropertyDescriptor(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;let h=(c=a.set)==null?void 0:c.call(this,u);if(o!==null&&o!==-1)try{e.adoptStyleSheets(u,o)}catch{}return h}}),I(()=>{Object.defineProperty(t,"adoptedStyleSheets",{configurable:a.configurable,enumerable:a.enumerable,get:a.get,set:a.set})}))}function Sf({styleDeclarationCb:s,mirror:e,ignoreCSSAttributes:t,stylesheetManager:r},{win:i}){let n=i.CSSStyleDeclaration.prototype.setProperty;i.CSSStyleDeclaration.prototype.setProperty=new Proxy(n,{apply:I((l,a,u)=>{var c;let[h,p,m]=u;if(t.has(h))return n.apply(a,[h,p,m]);let{id:g,styleId:d}=me((c=a.parentRule)==null?void 0:c.parentStyleSheet,e,r.styleMirror);return(g&&g!==-1||d&&d!==-1)&&s({id:g,styleId:d,set:{property:h,value:p,priority:m},index:ur(a.parentRule)}),l.apply(a,u)})});let o=i.CSSStyleDeclaration.prototype.removeProperty;return i.CSSStyleDeclaration.prototype.removeProperty=new Proxy(o,{apply:I((l,a,u)=>{var c;let[h]=u;if(t.has(h))return o.apply(a,[h]);let{id:p,styleId:m}=me((c=a.parentRule)==null?void 0:c.parentStyleSheet,e,r.styleMirror);return(p&&p!==-1||m&&m!==-1)&&s({id:p,styleId:m,remove:{property:h},index:ur(a.parentRule)}),l.apply(a,u)})}),I(()=>{i.CSSStyleDeclaration.prototype.setProperty=n,i.CSSStyleDeclaration.prototype.removeProperty=o})}function Cf({mediaInteractionCb:s,blockClass:e,blockSelector:t,mirror:r,sampling:i,doc:n}){let o=I(a=>ht(I(u=>{let c=gt(u);if(!c||J(c,e,t,!0))return;let{currentTime:h,volume:p,muted:m,playbackRate:g,loop:d}=c;s({type:a,id:r.getId(c),currentTime:h,volume:p,muted:m,playbackRate:g,loop:d})}),i.media||500)),l=[Z("play",o(Ae.Play),n),Z("pause",o(Ae.Pause),n),Z("seeked",o(Ae.Seeked),n),Z("volumechange",o(Ae.VolumeChange),n),Z("ratechange",o(Ae.RateChange),n)];return I(()=>{l.forEach(a=>a())})}function Ef({fontCb:s,doc:e}){let t=e.defaultView;if(!t)return()=>{};let r=[],i=new WeakMap,n=t.FontFace;t.FontFace=function(a,u,c){let 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};let o=Be(e.fonts,"add",function(l){return function(a){return setTimeout(I(()=>{let u=i.get(a);u&&(s(u),i.delete(a))}),0),l.apply(this,[a])}});return r.push(()=>{t.FontFace=n}),r.push(o),I(()=>{r.forEach(l=>l())})}function If(s){let{doc:e,mirror:t,blockClass:r,blockSelector:i,selectionCb:n}=s,o=!0,l=I(()=>{let a=e.getSelection();if(!a||o&&a?.isCollapsed)return;o=a.isCollapsed||!1;let u=[],c=a.rangeCount||0;for(let h=0;h<c;h++){let p=a.getRangeAt(h),{startContainer:m,startOffset:g,endContainer:d,endOffset:f}=p;J(m,r,i,!0)||J(d,r,i,!0)||u.push({start:t.getId(m),startOffset:g,end:t.getId(d),endOffset:f})}n({ranges:u})});return l(),Z("selectionchange",l)}function xf({doc:s,customElementCb:e}){let t=s.defaultView;return!t||!t.customElements?()=>{}:Be(t.customElements,"define",function(i){return function(n,o,l){try{e({define:{name:n}})}catch{console.warn(`Custom element callback failed for ${n}`)}return i.apply(this,[n,o,l])}})}function Mf(s,e){let{mutationCb:t,mousemoveCb:r,mouseInteractionCb:i,scrollCb:n,viewportResizeCb:o,inputCb:l,mediaInteractionCb:a,styleSheetRuleCb:u,styleDeclarationCb:c,canvasMutationCb:h,fontCb:p,selectionCb:m,customElementCb:g}=s;s.mutationCb=(...d)=>{e.mutation&&e.mutation(...d),t(...d)},s.mousemoveCb=(...d)=>{e.mousemove&&e.mousemove(...d),r(...d)},s.mouseInteractionCb=(...d)=>{e.mouseInteraction&&e.mouseInteraction(...d),i(...d)},s.scrollCb=(...d)=>{e.scroll&&e.scroll(...d),n(...d)},s.viewportResizeCb=(...d)=>{e.viewportResize&&e.viewportResize(...d),o(...d)},s.inputCb=(...d)=>{e.input&&e.input(...d),l(...d)},s.mediaInteractionCb=(...d)=>{e.mediaInteaction&&e.mediaInteaction(...d),a(...d)},s.styleSheetRuleCb=(...d)=>{e.styleSheetRule&&e.styleSheetRule(...d),u(...d)},s.styleDeclarationCb=(...d)=>{e.styleDeclaration&&e.styleDeclaration(...d),c(...d)},s.canvasMutationCb=(...d)=>{e.canvasMutation&&e.canvasMutation(...d),h(...d)},s.fontCb=(...d)=>{e.font&&e.font(...d),p(...d)},s.selectionCb=(...d)=>{e.selection&&e.selection(...d),m(...d)},s.customElementCb=(...d)=>{e.customElement&&e.customElement(...d),g(...d)}}function Nf(s,e={}){let t=s.doc.defaultView;if(!t)return()=>{};Mf(s,e);let r;s.recordDOM&&(r=ea(s,s.doc));let i=mf(s),n=gf(s),o=ta(s),l=yf(s,{win:t}),a=bf(s),u=Cf(s),c=()=>{},h=()=>{},p=()=>{},m=()=>{};s.recordDOM&&(c=vf(s,{win:t}),h=ra(s,s.doc),p=Sf(s,{win:t}),s.collectFonts&&(m=Ef(s)));let g=If(s),d=xf(s),f=[];for(let b of s.plugins)f.push(b.observer(b.callback,t,b.options));return I(()=>{Ce.forEach(b=>b.reset()),r?.disconnect(),i(),n(),o(),l(),a(),u(),c(),h(),p(),m(),g(),d(),f.forEach(b=>b())})}function Vt(s){return typeof window[s]<"u"}function Gt(s){return!!(typeof window[s]<"u"&&window[s].prototype&&"insertRule"in window[s].prototype&&"deleteRule"in window[s].prototype)}var cr=class{constructor(e){w(this,"iframeIdToRemoteIdMap",new WeakMap),w(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=e}getId(e,t,r,i){let n=r||this.getIdToRemoteIdMap(e),o=i||this.getRemoteIdToIdMap(e),l=n.get(t);return l||(l=this.generateIdFn(),n.set(t,l),o.set(l,t)),l}getIds(e,t){let r=this.getIdToRemoteIdMap(e),i=this.getRemoteIdToIdMap(e);return t.map(n=>this.getId(e,n,r,i))}getRemoteId(e,t,r){let i=r||this.getRemoteIdToIdMap(e);if(typeof t!="number")return t;let n=i.get(t);return n||-1}getRemoteIds(e,t){let 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}},ks=class{constructor(e){w(this,"iframes",new WeakMap),w(this,"crossOriginIframeMap",new WeakMap),w(this,"crossOriginIframeMirror",new cr(wn)),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 cr(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){let t=e;if(t.data.type!=="rrweb"||t.origin!==t.data.origin||!e.source)return;let i=this.crossOriginIframeMap.get(e.source);if(!i)return;let n=this.transformCrossOriginEvent(i,t.data.event);n&&this.wrappedEmit(n,t.data.isCheckout)}transformCrossOriginEvent(e,t){var r;switch(t.type){case x.FullSnapshot:{this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e);let i=t.data.node.id;return this.crossOriginIframeRootIdMap.set(e,i),this.patchRootIdOnNode(t.data.node,i),{timestamp:t.timestamp,type:x.IncrementalSnapshot,data:{source:E.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case x.Meta:case x.Load:case x.DomContentLoaded:return!1;case x.Plugin:return t;case x.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case x.IncrementalSnapshot:switch(t.data.source){case E.Mutation:return t.data.adds.forEach(i=>{this.replaceIds(i,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(i.node,e);let 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 E.Drag:case E.TouchMove:case E.MouseMove:return t.data.positions.forEach(i=>{this.replaceIds(i,e,["id"])}),t;case E.ViewportResize:return!1;case E.MediaInteraction:case E.MouseInteraction:case E.Scroll:case E.CanvasMutation:case E.Input:return this.replaceIds(t.data,e,["id"]),t;case E.StyleSheetRule:case E.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case E.Font:return t;case E.Selection:return t.data.ranges.forEach(i=>{this.replaceIds(i,e,["start","end"])}),t;case E.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(let 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!==Ko.Document&&!e.rootId&&(e.rootId=t),"childNodes"in e&&e.childNodes.forEach(r=>{this.patchRootIdOnNode(r,t)})}},_s=class{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(!et(e)||this.shadowDoms.has(e))return;this.shadowDoms.add(e);let r=ea({...this.bypassOptions,doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},e);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push(ta({...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(C.host(e))),this.restoreHandlers.push(ra({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){let r=this;this.restoreHandlers.push(Be(e.prototype,"attachShadow",function(i){return function(n){let o=i.call(this,n),l=C.shadowRoot(this);return l&&qo(this)&&r.addShadowRoot(l,t),o}}))}reset(){this.restoreHandlers.forEach(e=>{try{e()}catch{}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}},Te="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Rf=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(Ke=0;Ke<Te.length;Ke++)Rf[Te.charCodeAt(Ke)]=Ke;var Ke,Af=function(s){var e=new Uint8Array(s),t,r=e.length,i="";for(t=0;t<r;t+=3)i+=Te[e[t]>>2],i+=Te[(e[t]&3)<<4|e[t+1]>>4],i+=Te[(e[t+1]&15)<<2|e[t+2]>>6],i+=Te[e[t+2]&63];return r%3===2?i=i.substring(0,i.length-1)+"=":r%3===1&&(i=i.substring(0,i.length-2)+"=="),i};var un=new Map;function Of(s,e){let t=un.get(s);return t||(t=new Map,un.set(s,t)),t.has(e)||t.set(e,[]),t.get(e)}var sa=(s,e,t)=>{if(!s||!(na(s,e)||typeof s=="object"))return;let r=s.constructor.name,i=Of(t,r),n=i.indexOf(s);return n===-1&&(n=i.length,i.push(s)),n};function Zt(s,e,t){if(s instanceof Array)return s.map(r=>Zt(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){let r=s.constructor.name,i=Af(s);return{rr_type:r,base64:i}}else{if(s instanceof DataView)return{rr_type:s.constructor.name,args:[Zt(s.buffer,e,t),s.byteOffset,s.byteLength]};if(s instanceof HTMLImageElement){let r=s.constructor.name,{src:i}=s;return{rr_type:r,src:i}}else if(s instanceof HTMLCanvasElement){let r="HTMLImageElement",i=s.toDataURL();return{rr_type:r,src:i}}else{if(s instanceof ImageData)return{rr_type:s.constructor.name,args:[Zt(s.data,e,t),s.width,s.height]};if(na(s,e)||typeof s=="object"){let r=s.constructor.name,i=sa(s,e,t);return{rr_type:r,index:i}}}}return s}var ia=(s,e,t)=>s.map(r=>Zt(r,e,t)),na=(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 Df(s,e,t,r){let i=[],n=Object.getOwnPropertyNames(e.CanvasRenderingContext2D.prototype);for(let o of n)try{if(typeof e.CanvasRenderingContext2D.prototype[o]!="function")continue;let l=Be(e.CanvasRenderingContext2D.prototype,o,function(a){return function(...u){return J(this.canvas,t,r,!0)||setTimeout(()=>{let c=ia(u,e,this);s(this.canvas,{type:Ue["2D"],property:o,args:c})},0),a.apply(this,u)}});i.push(l)}catch{let l=Cr(e.CanvasRenderingContext2D.prototype,o,{set(a){s(this.canvas,{type:Ue["2D"],property:o,args:[a],setter:!0})}});i.push(l)}return()=>{i.forEach(o=>o())}}function Tf(s){return s==="experimental-webgl"?"webgl":s}function cn(s,e,t,r){let i=[];try{let n=Be(s.HTMLCanvasElement.prototype,"getContext",function(o){return function(l,...a){if(!J(this,e,t,!0)){let u=Tf(l);if("__context"in this||(this.__context=u),r&&["webgl","webgl2"].includes(u))if(a[0]&&typeof a[0]=="object"){let 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{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{i.forEach(n=>n())}}function hn(s,e,t,r,i,n){let o=[],l=Object.getOwnPropertyNames(s);for(let a of l)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(a))try{if(typeof s[a]!="function")continue;let u=Be(s,a,function(c){return function(...h){let p=c.apply(this,h);if(sa(p,n,this),"tagName"in this.canvas&&!J(this.canvas,r,i,!0)){let m=ia(h,n,this),g={type:e,property:a,args:m};t(this.canvas,g)}return p}});o.push(u)}catch{let u=Cr(s,a,{set(c){t(this.canvas,{type:e,property:a,args:[c],setter:!0})}});o.push(u)}return o}function kf(s,e,t,r){let i=[];return i.push(...hn(e.WebGLRenderingContext.prototype,Ue.WebGL,s,t,r,e)),typeof e.WebGL2RenderingContext<"u"&&i.push(...hn(e.WebGL2RenderingContext.prototype,Ue.WebGL2,s,t,r,e)),()=>{i.forEach(n=>n())}}var oa="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=",_f=s=>Uint8Array.from(atob(s),e=>e.charCodeAt(0)),fn=typeof window<"u"&&window.Blob&&new Blob([_f(oa)],{type:"text/javascript;charset=utf-8"});function $f(s){let e;try{if(e=fn&&(window.URL||window.webkitURL).createObjectURL(fn),!e)throw"";let t=new Worker(e,{name:s?.name});return t.addEventListener("error",()=>{(window.URL||window.webkitURL).revokeObjectURL(e)}),t}catch{return new Worker("data:text/javascript;base64,"+oa,{name:s?.name})}finally{e&&(window.URL||window.webkitURL).revokeObjectURL(e)}}var $s=class{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)});let{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){let o=cn(t,r,i,!0),l=new Map,a=new $f;a.onmessage=g=>{let{id:d}=g.data;if(l.set(d,!1),!("base64"in g.data))return;let{base64:f,type:b,width:v,height:y}=g.data;this.mutationCb({id:d,type:Ue["2D"],commands:[{property:"clearRect",args:[0,0,v,y]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:f}],type:b}]},0,0]}]})};let u=1e3/e,c=0,h,p=()=>{let g=[];return t.document.querySelectorAll("canvas").forEach(d=>{J(d,r,i,!0)||g.push(d)}),g},m=g=>{if(c&&g-c<u){h=requestAnimationFrame(m);return}c=g,p().forEach(async d=>{var f;let b=this.mirror.getId(d);if(l.get(b)||d.width===0||d.height===0)return;if(l.set(b,!0),["webgl","webgl2"].includes(d.__context)){let y=d.getContext(d.__context);((f=y?.getContextAttributes())==null?void 0:f.preserveDrawingBuffer)===!1&&y.clear(y.COLOR_BUFFER_BIT)}let v=await createImageBitmap(d);a.postMessage({id:b,bitmap:v,width:d.width,height:d.height,dataURLOptions:n.dataURLOptions},[v])}),h=requestAnimationFrame(m)};h=requestAnimationFrame(m),this.resetObservers=()=>{o(),cancelAnimationFrame(h)}}initCanvasMutationObserver(e,t,r){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();let i=cn(e,t,r,!1),n=Df(this.processMutation.bind(this),e,t,r),o=kf(this.processMutation.bind(this),e,t,r);this.resetObservers=()=>{i(),n(),o()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){let e=t=>{this.rafStamps.latestId=t,requestAnimationFrame(e)};requestAnimationFrame(e)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((e,t)=>{let r=this.mirror.getId(t);this.flushPendingCanvasMutationFor(t,r)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(e,t){if(this.frozen||this.locked)return;let r=this.pendingCanvasMutations.get(e);if(!r||t===-1)return;let i=r.map(o=>{let{type:l,...a}=o;return a}),{type:n}=r[0];this.mutationCb({id:t,type:n,commands:i}),this.pendingCanvasMutations.delete(e)}},Ps=class{constructor(e){w(this,"trackedLinkElements",new WeakSet),w(this,"mutationCb"),w(this,"adoptedStyleSheetCb"),w(this,"styleMirror",new As),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;let r={id:t,styleIds:[]},i=[];for(let 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:gn(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){}},Ls=class{constructor(){w(this,"nodeMap",new WeakMap),w(this,"active",!1)}inOtherBuffer(e,t){let 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(){}},z,Jt,Xr,hr=!1;try{if(Array.from([1],s=>s*2)[0]!==2){let s=document.createElement("iframe");document.body.appendChild(s),Array.from=((mi=s.contentWindow)==null?void 0:mi.Array.from)||Array.from,document.body.removeChild(s)}}catch(s){console.debug("Unable to override Array.from",s)}var re=za();function pe(s={}){let{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:p,slimDOMOptions:m,maskInputFn:g,maskTextFn:d,hooks:f,packFn:b,sampling:v={},dataURLOptions:y={},mousemoveWait:S,recordDOM:D=!0,recordCanvas:_=!1,recordCrossOriginIframes:j=!1,recordAfter:L=s.recordAfter==="DOMContentLoaded"?s.recordAfter:"load",userTriggeredOnInput:V=!1,collectFonts:Y=!1,inlineImages:K=!1,plugins:oe,keepIframeSrcFn:M=()=>!1,ignoreCSSAttributes:je=new Set([]),errorHandler:Ye}=s;df(Ye);let G=j?window.parent===window:!0,Q=!1;if(!G)try{window.parent.document&&(Q=!1)}catch{Q=!0}if(G&&!e)throw new Error("emit function is required");if(!G&&!Q)return()=>{};S!==void 0&&v.mousemove===void 0&&(v.mousemove=S),re.reset();let be=h===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:p!==void 0?p:{password:!0},ae=m===!0||m==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:m==="all",headMetaDescKeywords:m==="all",headTitleMutations:m==="all"}:m||{};lf();let hi,Or=0,fi=N=>{for(let te of oe||[])te.eventProcessor&&(N=te.eventProcessor(N));return b&&!Q&&(N=b(N)),N};z=(N,te)=>{var B;let W=N;if(W.timestamp=lr(),(B=Ce[0])!=null&&B.isFrozen()&&W.type!==x.FullSnapshot&&!(W.type===x.IncrementalSnapshot&&W.data.source===E.Mutation)&&Ce.forEach(le=>le.unfreeze()),G)e?.(fi(W),te);else if(Q){let le={type:"rrweb",event:fi(W),origin:window.location.origin,isCheckout:te};window.parent.postMessage(le,"*")}if(W.type===x.FullSnapshot)hi=W,Or=0;else if(W.type===x.IncrementalSnapshot){if(W.data.source===E.Mutation&&W.data.isAttachIframe)return;Or++;let le=r&&Or>=r,T=t&&W.timestamp-hi.timestamp>t;(le||T)&&Jt(!0)}};let St=N=>{z({type:x.IncrementalSnapshot,data:{source:E.Mutation,...N}})},di=N=>z({type:x.IncrementalSnapshot,data:{source:E.Scroll,...N}}),pi=N=>z({type:x.IncrementalSnapshot,data:{source:E.CanvasMutation,...N}}),da=N=>z({type:x.IncrementalSnapshot,data:{source:E.AdoptedStyleSheet,...N}}),ve=new Ps({mutationCb:St,adoptedStyleSheetCb:da}),Se=new ks({mirror:re,mutationCb:St,stylesheetManager:ve,recordCrossOriginIframes:j,wrappedEmit:z});for(let N of oe||[])N.getMirror&&N.getMirror({nodeMirror:re,crossOriginIframeMirror:Se.crossOriginIframeMirror,crossOriginIframeStyleMirror:Se.crossOriginIframeStyleMirror});let Dr=new Ls;Xr=new $s({recordCanvas:_,mutationCb:pi,win:window,blockClass:i,blockSelector:n,mirror:re,sampling:v.canvas,dataURLOptions:y});let Ct=new _s({mutationCb:St,scrollCb:di,bypassOptions:{blockClass:i,blockSelector:n,maskTextClass:a,maskTextSelector:u,inlineStylesheet:c,maskInputOptions:be,dataURLOptions:y,maskTextFn:d,maskInputFn:g,recordCanvas:_,inlineImages:K,sampling:v,slimDOMOptions:ae,iframeManager:Se,stylesheetManager:ve,canvasManager:Xr,keepIframeSrcFn:M,processedNodeManager:Dr},mirror:re});Jt=(N=!1)=>{if(!D)return;z({type:x.Meta,data:{href:window.location.href,width:Ho(),height:Go()}},N),ve.reset(),Ct.init(),Ce.forEach(B=>B.lock());let te=fl(document,{mirror:re,blockClass:i,blockSelector:n,maskTextClass:a,maskTextSelector:u,inlineStylesheet:c,maskAllInputs:be,maskTextFn:d,maskInputFn:g,slimDOM:ae,dataURLOptions:y,recordCanvas:_,inlineImages:K,onSerialize:B=>{Xo(B,re)&&Se.addIframe(B),Zo(B,re)&&ve.trackLinkElement(B),Rs(B)&&Ct.addShadowRoot(C.shadowRoot(B),document)},onIframeLoad:(B,W)=>{Se.attachIframe(B,W),Ct.observeAttachShadow(B)},onStylesheetLoad:(B,W)=>{ve.attachLinkElement(B,W)},keepIframeSrcFn:M});if(!te)return console.warn("Failed to snapshot the document");z({type:x.FullSnapshot,data:{node:te,initialOffset:Vo(window)}},N),Ce.forEach(B=>B.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&ve.adoptStyleSheets(document.adoptedStyleSheets,re.getId(document))};try{let N=[],te=W=>{var le;return I(Nf)({mutationCb:St,mousemoveCb:(T,Tr)=>z({type:x.IncrementalSnapshot,data:{source:Tr,positions:T}}),mouseInteractionCb:T=>z({type:x.IncrementalSnapshot,data:{source:E.MouseInteraction,...T}}),scrollCb:di,viewportResizeCb:T=>z({type:x.IncrementalSnapshot,data:{source:E.ViewportResize,...T}}),inputCb:T=>z({type:x.IncrementalSnapshot,data:{source:E.Input,...T}}),mediaInteractionCb:T=>z({type:x.IncrementalSnapshot,data:{source:E.MediaInteraction,...T}}),styleSheetRuleCb:T=>z({type:x.IncrementalSnapshot,data:{source:E.StyleSheetRule,...T}}),styleDeclarationCb:T=>z({type:x.IncrementalSnapshot,data:{source:E.StyleDeclaration,...T}}),canvasMutationCb:pi,fontCb:T=>z({type:x.IncrementalSnapshot,data:{source:E.Font,...T}}),selectionCb:T=>{z({type:x.IncrementalSnapshot,data:{source:E.Selection,...T}})},customElementCb:T=>{z({type:x.IncrementalSnapshot,data:{source:E.CustomElement,...T}})},blockClass:i,ignoreClass:o,ignoreSelector:l,maskTextClass:a,maskTextSelector:u,maskInputOptions:be,inlineStylesheet:c,sampling:v,recordDOM:D,recordCanvas:_,inlineImages:K,userTriggeredOnInput:V,collectFonts:Y,doc:W,maskInputFn:g,maskTextFn:d,keepIframeSrcFn:M,blockSelector:n,slimDOMOptions:ae,dataURLOptions:y,mirror:re,iframeManager:Se,stylesheetManager:ve,shadowDomManager:Ct,processedNodeManager:Dr,canvasManager:Xr,ignoreCSSAttributes:je,plugins:((le=oe?.filter(T=>T.observer))==null?void 0:le.map(T=>({observer:T.observer,options:T.options,callback:Tr=>z({type:x.Plugin,data:{plugin:T.name,payload:Tr}})})))||[]},f)};Se.addLoadListener(W=>{try{N.push(te(W.contentDocument))}catch(le){console.warn(le)}});let B=()=>{Jt(),N.push(te(document)),hr=!0};return document.readyState==="interactive"||document.readyState==="complete"?B():(N.push(Z("DOMContentLoaded",()=>{z({type:x.DomContentLoaded,data:{}}),L==="DOMContentLoaded"&&B()})),N.push(Z("load",()=>{z({type:x.Load,data:{}}),L==="load"&&B()},window))),()=>{N.forEach(W=>W()),Dr.destroy(),hr=!1,pf()}}catch(N){console.warn(N)}}pe.addCustomEvent=(s,e)=>{if(!hr)throw new Error("please add custom event after start recording");z({type:x.Custom,data:{tag:s,payload:e}})};pe.freezePage=()=>{Ce.forEach(s=>s.freeze())};pe.takeFullSnapshot=s=>{if(!hr)throw new Error("please take full snapshot after start recording");Jt(s)};pe.mirror=re;var dn;(function(s){s[s.NotStarted=0]="NotStarted",s[s.Running=1]="Running",s[s.Stopped=2]="Stopped"})(dn||(dn={}));var Ed=5*1e3;var{addCustomEvent:Er}=pe,{freezePage:Id}=pe,{takeFullSnapshot:xd}=pe;var Ir=100*1024,Pf=["json","text","xml","urlencoded","javascript"],Lf=["authorization","cookie","set-cookie","proxy-authorization","x-api-key","x-csrf-token","x-csrftoken","x-xsrf-token"],Me=null,ze=null,Ve=null,wt=null,Nr=null,ua=!1,ui=[],we=null,We=(...s)=>{ua&&console.log("[Tracebck:Network]",...s)},xr=s=>{if(!s)return!1;let e=s.toLowerCase();return Pf.some(t=>e.includes(t))},Mr=(s,e)=>{if(!s)return{body:null,truncated:!1};let t=typeof s=="string"?s:JSON.stringify(s);return t.length<=e?{body:t,truncated:!1}:{body:t.slice(0,e),truncated:!0}},yt=s=>{let e={};for(let[t,r]of Object.entries(s))Lf.includes(t.toLowerCase())||(e[t]=r);return e},aa=s=>{if(Nr&&s.startsWith(Nr))return!1;for(let e of ui)if(e instanceof RegExp){if(e.test(s))return!1}else if(s.includes(e))return!1;return!0},la=s=>{let e={};return s instanceof Headers?s.forEach((t,r)=>{e[r]=t}):typeof s=="object"&&Object.assign(e,s),e};function ca({sdkEndpoint:s,debug:e=!1,denyUrls:t=[],sanitizeRequest:r=null}){typeof window>"u"||(Nr=s,ua=e,ui=t,we=r,window.fetch&&!Me&&(Me=window.fetch,window.fetch=async function(...i){let[n,o={}]=i,l=typeof n=="string"?n:n.url;if(!aa(l))return Me.apply(this,i);let a=Date.now(),u=(o.method||"GET").toUpperCase(),c=la(o.headers||{}),h=null,p=!1;if(o.body&&xr(c["content-type"])){let m=Mr(o.body,Ir);h=m.body,p=m.truncated}try{let m=await Me.apply(this,i),g=Date.now()-a,d=m.clone(),f=la(d.headers),b=null,v=!1;if(xr(f["content-type"]))try{let y=await d.text(),S=Mr(y,Ir);b=S.body,v=S.truncated}catch{}try{let y={method:u,url:l,statusCode:m.status,startTime:a,duration:g,requestHeaders:yt(c),requestBody:h,requestBodyTruncated:p,responseHeaders:yt(f),responseBody:b,responseBodyTruncated:v,initiator:"fetch"},S=we?we(y):y;S&&(Er("network-request",S),We(`${u} ${l} \u2192 ${m.status} (${g}ms)`))}catch(y){We("Failed to emit custom event:",y.message)}return m}catch(m){let g=Date.now()-a;try{let d={method:u,url:l,statusCode:0,startTime:a,duration:g,requestHeaders:yt(c),requestBody:h,requestBodyTruncated:p,error:m.message,initiator:"fetch"},f=we?we(d):d;f&&(Er("network-request",f),We(`${u} ${l} \u2192 ERROR (${g}ms)`))}catch(d){We("Failed to emit custom event:",d.message)}throw m}}),window.XMLHttpRequest&&!ze&&(ze=XMLHttpRequest.prototype.open,Ve=XMLHttpRequest.prototype.send,wt=XMLHttpRequest.prototype.setRequestHeader,XMLHttpRequest.prototype.open=function(i,n,...o){return this._tracebck={method:i.toUpperCase(),url:typeof n=="string"?n:n.toString(),startTime:null,requestHeaders:{},shouldCapture:aa(typeof n=="string"?n:n.toString())},ze.apply(this,[i,n,...o])},XMLHttpRequest.prototype.setRequestHeader=function(i,n){return this._tracebck?.requestHeaders&&(this._tracebck.requestHeaders[i]=n),wt.apply(this,arguments)},XMLHttpRequest.prototype.send=function(i){if(!this._tracebck||!this._tracebck.shouldCapture)return Ve.apply(this,arguments);let n=this._tracebck;n.startTime=Date.now();let o=null,l=!1;if(i&&xr(n.requestHeaders["content-type"])){let a=Mr(i,Ir);o=a.body,l=a.truncated}return this.addEventListener("loadend",function(){let a=Date.now()-n.startTime,u={};try{let p=this.getAllResponseHeaders();p&&p.trim().split(/[\r\n]+/).forEach(m=>{let g=m.split(": "),d=g.shift(),f=g.join(": ");d&&(u[d]=f)})}catch{}let c=null,h=!1;if(this.responseText&&xr(u["content-type"])){let p=Mr(this.responseText,Ir);c=p.body,h=p.truncated}try{let p={method:n.method,url:n.url,statusCode:this.status,startTime:n.startTime,duration:a,requestHeaders:yt(n.requestHeaders),requestBody:o,requestBodyTruncated:l,responseHeaders:yt(u),responseBody:c,responseBodyTruncated:h,initiator:"xhr"},m=we?we(p):p;m&&(Er("network-request",m),We(`${n.method} ${n.url} \u2192 ${this.status} (${a}ms) [XHR]`))}catch(p){We("Failed to emit custom event:",p.message)}}),Ve.apply(this,arguments)}))}function ha(){Me&&(window.fetch=Me,Me=null),ze&&(XMLHttpRequest.prototype.open=ze,ze=null),Ve&&(XMLHttpRequest.prototype.send=Ve,Ve=null),wt&&(XMLHttpRequest.prototype.setRequestHeader=wt,wt=null),Nr=null,ui=[],we=null}var Ff="https://api.tracebck.dev/v1",O={apiKey:null,endpoint:Ff,debug:!1,flushInterval:5e3,maskAllInputs:!1,captureNetwork:!0,networkDenyUrls:[],sanitizeRequest:null,options:{}},ne=null,Rr=null,Ge=[],Ar=null,ci=!1,He=(...s)=>{O.debug&&console.log("[Tracebck]",...s)},bt=(...s)=>{console.warn("[Tracebck]",...s)},Uf=200;function Bf({apiKey:s,endpoint:e,debug:t,flushInterval:r,maskAllInputs:i,captureNetwork:n,networkDenyUrls:o,sanitizeRequest:l,options:a}){if(!s){console.error("[Tracebck] apiKey is required");return}O.apiKey=s,e&&(O.endpoint=e.replace(/\/$/,"")),typeof t=="boolean"&&(O.debug=t),typeof r=="number"&&(O.flushInterval=r),typeof i=="boolean"&&(O.maskAllInputs=i),typeof n=="boolean"&&(O.captureNetwork=n),Array.isArray(o)&&(O.networkDenyUrls=o),typeof l=="function"&&(O.sanitizeRequest=l),typeof a=="object"&&(O.options=a),He("Initialized with",{endpoint:O.endpoint,debug:O.debug}),typeof window<"u"&&(window.addEventListener("pagehide",()=>{if(vt(!0),ne)try{fetch(`${O.endpoint}/sessions/${ne}/stop`,{method:"POST",headers:{"x-api-key":O.apiKey},keepalive:!0})}catch{}}),window.addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&vt(!0)}))}async function Wf({identifier:s,metadata:e}={}){if(!O.apiKey){bt("Cannot start session: API Key is missing. Call init() first.");return}if(ne&&(He("Stopping previous session before starting a new one..."),await fa()),!s||!s.value){bt("Identifier value is required to start a session.");return}let t={type:s.type||"custom",value:s.value};He("Starting session for:",t.value);try{let r=await fetch(`${O.endpoint}/sessions`,{method:"POST",headers:{"Content-Type":"application/json","x-api-key":O.apiKey},body:JSON.stringify({identifier:t,metadata:{url:window.location.href,referrer:document.referrer,userAgent:navigator.userAgent,language:navigator.language,resolution:`${window.innerWidth}x${window.innerHeight}`,...e}})});if(!r.ok){let n=await r.json().catch(()=>({}));throw new Error(n.error||`Server responded with ${r.status}`)}ne=(await r.json()).sessionId,Rr=pe({emit(n){Ge.push(n),Ge.length>=Uf&&vt()},sampling:{mousemove:!0,scroll:150,input:"last"},maskAllInputs:O.maskAllInputs,maskTextClass:"tracebck-mask",blockClass:"tracebck-block",ignoreClass:"tracebck-ignore",checkoutEveryNms:2*60*1e3,...O.options}),Ar=setInterval(vt,O.flushInterval),O.captureNetwork&&ca({sdkEndpoint:O.endpoint,debug:O.debug,denyUrls:O.networkDenyUrls,sanitizeRequest:O.sanitizeRequest}),He("Session started:",ne)}catch(r){bt("Could not start session:",r.message)}}async function fa(){if(ne){Ar&&clearInterval(Ar),Rr&&Rr(),ha(),await vt(!0);try{await fetch(`${O.endpoint}/sessions/${ne}/stop`,{method:"POST",headers:{"x-api-key":O.apiKey},keepalive:!0})}catch{}He("Session stopped:",ne),ne=null,Rr=null,Ge=[],Ar=null}}async function vt(s=!1){if(!ne||Ge.length===0||ci&&!s)return;ci=!0;let e=[...Ge];Ge=[];try{(await fetch(`${O.endpoint}/sessions/${ne}/events`,{method:"POST",headers:{"Content-Type":"application/json","x-api-key":O.apiKey},body:JSON.stringify({events:e}),keepalive:s})).ok?He("Events flushed:",e.length):bt("Failed to flush events")}catch(t){bt("Error flushing events:",t.message)}finally{ci=!1}}
|
|
54
54
|
/*! Bundled license information:
|
|
55
55
|
|
|
56
56
|
rrweb/dist/rrweb.js:
|