@sypnia/browser 0.0.0-stage → 0.1.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.
@@ -0,0 +1,152 @@
1
+ (function(){'use strict';var Ls="__sypniaRecorder";function $e(e,t){return !t||t.length===0?false:t.some(r=>{if(typeof r=="string"){let i=r.length>1?r.replace(/\/+$/,""):r;return e===i||e.startsWith(i==="/"?"/":`${i}/`)}return ko(r,e)})}function ko(e,t){return e.lastIndex=0,e.test(t)}function Fs(e){return typeof e=="string"&&/^[0-9a-f]{32}$/.test(e)}var To=Object.defineProperty,Do=(e,t,r)=>t in e?To(e,t,{enumerable:true,configurable:true,writable:true,value:r}):e[t]=r,O=(e,t,r)=>Do(e,typeof t!="symbol"?t+"":t,r),Us,Po=Object.defineProperty,Lo=(e,t,r)=>t in e?Po(e,t,{enumerable:true,configurable:true,writable:true,value:r}):e[t]=r,$s=(e,t,r)=>Lo(e,typeof t!="symbol"?t+"":t,r),K=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))(K||{}),Bs={Node:["childNodes","parentNode","parentElement","textContent","ownerDocument","firstChild","lastChild","nextSibling","previousSibling"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},Ws={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},rt={},an={},Fo=()=>!!globalThis.Zone;function ls(e){if(rt[e])return rt[e];let t=globalThis[e],r=t.prototype,i=e in Bs?Bs[e]:void 0,s=!!(i&&i.every(p=>{var u,d;return !!((d=(u=Object.getOwnPropertyDescriptor(r,p))==null?void 0:u.get)!=null&&d.toString().includes("[native code]"))})),a=e in Ws?Ws[e]:void 0,c=!!(a&&a.every(p=>{var u;return typeof r[p]=="function"&&((u=r[p])==null?void 0:u.toString().includes("[native code]"))}));if(s&&c&&!Fo())return rt[e]=t.prototype,t.prototype;try{let p=document.createElement("iframe");p.style.display="none",document.body.appendChild(p);let u=p.contentWindow;if(!u)return t.prototype;let d=u[e].prototype;if(!d)return p.remove(),r;let n=navigator.userAgent;return n.includes("Safari")&&!n.includes("Chrome")?(p.classList.add("rr-block"),p.setAttribute("__rrwebUntaintedMutationObserver",""),an[e]=()=>p.remove()):p.remove(),rt[e]=d}catch{return r}}var Ht={};function oe(e,t,r){var i,s;let a=(i=Ht[e])==null?void 0:i[r];if(a)return a.call(t);let c=ls(e),p=(s=Object.getOwnPropertyDescriptor(c,r))==null?void 0:s.get;return p?((Ht[e]||(Ht[e]={}))[r]=p,p.call(t)):t[r]}var jt={};function ln(e,t,r){let i=`${e}.${String(r)}`;if(jt[i])return jt[i].bind(t);let a=ls(e)[r];return typeof a!="function"?t[r]:(jt[i]=a,a.bind(t))}function Uo(e){return oe("Node",e,"ownerDocument")}function $o(e){return oe("Node",e,"childNodes")}function Bo(e){return oe("Node",e,"parentNode")}function Wo(e){return oe("Node",e,"parentElement")}function zo(e){return oe("Node",e,"textContent")}function qo(e){return oe("Node",e,"firstChild")}function Ho(e){return oe("Node",e,"lastChild")}function jo(e){return oe("Node",e,"nextSibling")}function Vo(e){return oe("Node",e,"previousSibling")}function Go(e,t){return ln("Node",e,"contains")(t)}function Yo(e){return ln("Node",e,"getRootNode")()}function Xo(e){return !e||!("host"in e)?null:oe("ShadowRoot",e,"host")}function Jo(e){return e.styleSheets}function Ko(e){return !e||!("shadowRoot"in e)?null:oe("Element",e,"shadowRoot")}function Qo(e,t){return oe("Element",e,"querySelector")(t)}function Zo(e,t){return oe("Element",e,"querySelectorAll")(t)}function ea(){return [ls("MutationObserver").constructor,an.MutationObserver??(()=>{})]}var un=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(un=()=>new Date().getTime());function ta(e,t,r){try{if(!(t in e))return ()=>{};let i=e[t],s=r(i);return typeof s=="function"&&(s.prototype=s.prototype||{},Object.defineProperties(s,{__rrweb_original__:{enumerable:!1,value:i}})),e[t]=s,()=>{e[t]=i;}}catch{return ()=>{}}}var Z={ownerDocument:Uo,childNodes:$o,parentNode:Bo,parentElement:Wo,textContent:zo,firstChild:qo,lastChild:Ho,nextSibling:jo,previousSibling:Vo,contains:Go,getRootNode:Yo,host:Xo,styleSheets:Jo,shadowRoot:Ko,querySelector:Qo,querySelectorAll:Zo,nowTimestamp:un,mutationObserverCtor:ea,patch:ta};function cn(e){return e.nodeType===e.ELEMENT_NODE}function We(e){let t=e&&"host"in e&&"mode"in e&&Z.host(e)||null;return !!(t&&"shadowRoot"in t&&Z.shadowRoot(t)===e)}function ze(e){return Object.prototype.toString.call(e)==="[object ShadowRoot]"}function ra(e){return e.includes(" background-clip: text;")&&!e.includes(" -webkit-background-clip: text;")&&(e=e.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),e}function sa(e){let{cssText:t}=e;if(t.split('"').length<3)return t;let r=["@import",`url(${JSON.stringify(e.href)})`];return e.layerName===""?r.push("layer"):e.layerName&&r.push(`layer(${e.layerName})`),e.supportsText&&r.push(`supports(${e.supportsText})`),e.media.length&&r.push(e.media.mediaText),r.join(" ")+";"}function Jr(e){try{let t=e.rules||e.cssRules;if(!t)return null;let r=e.href;!r&&e.ownerNode&&(r=e.ownerNode.baseURI);let i=Array.from(t,s=>hn(s,r)).join("");return ra(i)}catch{return null}}function hn(e,t){if(na(e)){let r;try{r=Jr(e.styleSheet)||sa(e);}catch{r=e.cssText;}return e.styleSheet.href?gt(r,e.styleSheet.href):r}else {let r=e.cssText;return oa(e)&&e.selectorText.includes(":")&&(r=ia(r)),t?gt(r,t):r}}function ia(e){let t=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return e.replace(t,"$1\\$2")}function na(e){return "styleSheet"in e}function oa(e){return "selectorText"in e}var dt=class{constructor(){$s(this,"idNodeMap",new Map),$s(this,"nodeMetaMap",new WeakMap);}getId(t){var r;return t?((r=this.getMeta(t))==null?void 0:r.id)??-1:-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){let r=this.getId(t);this.idNodeMap.delete(r),t.childNodes&&t.childNodes.forEach(i=>this.removeNodeFromMap(i));}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,r){let i=r.id;this.idNodeMap.set(i,t),this.nodeMetaMap.set(t,r);}replace(t,r){let i=this.getNode(t);if(i){let s=this.nodeMetaMap.get(i);s&&this.nodeMetaMap.set(r,s);}this.idNodeMap.set(t,r);}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap;}};function aa(){return new dt}function pt({element:e,maskInputOptions:t,tagName:r,type:i,value:s,maskInputFn:a}){let c=s||"",p=i&&ve(i);return (t[r.toLowerCase()]||p&&t[p])&&(a?c=a(c,e):c="*".repeat(c.length)),c}function ve(e){return e.toLowerCase()}var zs="__rrweb_original__";function la(e){let t=e.getContext("2d");if(!t)return true;let r=50;for(let i=0;i<e.width;i+=r)for(let s=0;s<e.height;s+=r){let a=t.getImageData,c=zs in a?a[zs]:a;if(new Uint32Array(c.call(t,i,s,Math.min(r,e.width-i),Math.min(r,e.height-s)).data.buffer).some(u=>u!==0))return false}return true}function mt(e){let t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?ve(t):null}function fn(e,t){let r;try{r=new URL(e,t??window.location.href);}catch{return null}let i=/\.([0-9a-z]+)(?:$)/i,s=r.pathname.match(i);return s?.[1]??null}function ua(e){let t="";return e.indexOf("//")>-1?t=e.split("/").slice(0,3).join("/"):t=e.split("/")[0],t=t.split("?")[0],t}var ca=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,ha=/^(?:[a-z+]+:)?\/\//i,fa=/^www\..*/i,da=/^(data:)([^,]*),(.*)/i;function gt(e,t){return (e||"").replace(ca,(r,i,s,a,c,p)=>{let u=s||c||p,d=i||a||"";if(!u)return r;if(ha.test(u)||fa.test(u))return `url(${d}${u}${d})`;if(da.test(u))return `url(${d}${u}${d})`;if(u[0]==="/")return `url(${d}${ua(t)+u}${d})`;let n=u.split("#")[0],f=u.substring(n.length),l=t.split("#")[0].split("/"),o=n.split("/");l.pop();for(let m of o)m!=="."&&(m===".."?l.pop():l.push(m));return `url(${d}${l.join("/")}${f}${d})`})}function st(e,t=false){return t?e.replace(/(\/\*[^*]*\*\/)|[\s;]/g,""):e.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"").replace(/0px/g,"0")}function pa(e,t,r=false){let i=Array.from(t.childNodes),s=[],a=0;if(i.length>1&&e&&typeof e=="string"){let c=st(e,r),p=c.length/e.length;for(let u=1;u<i.length;u++)if(i[u].textContent&&typeof i[u].textContent=="string"){let d=st(i[u].textContent,r),n=100,f=3;for(;f<d.length&&(d[f].match(/[a-zA-Z0-9]/)||d.indexOf(d.substring(0,f),1)!==-1);f++);for(;f<d.length;f++){let l=d.substring(0,f),o=c.split(l),m=-1;if(o.length===2)m=o[0].length;else if(o.length>2&&o[0]===""&&i[u-1].textContent!=="")m=c.indexOf(l,1);else if(o.length===1){if(l=l.substring(0,l.length-1),o=c.split(l),o.length<=1)return s.push(e),s;f=n+1;}else f===d.length-1&&(m=c.indexOf(l));if(o.length>=2&&f>n){let h=i[u-1].textContent;if(h&&typeof h=="string"){let g=st(h).length;m=c.indexOf(l,g);}m===-1&&(m=o[0].length);}if(m!==-1){let h=Math.floor(m/p);for(;h>0&&h<e.length;){if(a+=1,a>50*i.length)return s.push(e),s;let g=st(e.substring(0,h),r);if(g.length===m){s.push(e.substring(0,h)),e=e.substring(h),c=c.substring(m);break}else g.length<m?h+=Math.max(1,Math.floor((m-g.length)/p)):h-=Math.max(1,Math.floor((g.length-m)*p));}break}}}}return s.push(e),s}function ma(e,t){return pa(e,t).join("/* rr_split */")}var ga=1,ya=new RegExp("[^a-z0-9-_:]"),yt=-2;function dn(){return ga++}function wa(e){if(e instanceof HTMLFormElement)return "form";let t=ve(e.tagName);return ya.test(t)?"div":t}var Ae,qs,ba=/^[^ \t\n\r\u000c]+/,Sa=/^[, \t\n\r\u000c]+/;function va(e,t){if(t.trim()==="")return t;let r=0;function i(a){let c,p=a.exec(t.substring(r));return p?(c=p[0],r+=c.length,c):""}let s=[];for(;i(Sa),!(r>=t.length);){let a=i(ba);if(a.slice(-1)===",")a=_e(e,a.substring(0,a.length-1)),s.push(a);else {let c="";a=_e(e,a);let p=false;for(;;){let u=t.charAt(r);if(u===""){s.push((a+c).trim());break}else if(p)u===")"&&(p=false);else if(u===","){r+=1,s.push((a+c).trim());break}else u==="("&&(p=true);c+=u,r+=1;}}}return s.join(", ")}var Hs=new WeakMap;function _e(e,t){return !t||t.trim()===""?t:us(e,t)}function Ca(e){return !!(e.tagName==="svg"||e.ownerSVGElement)}function us(e,t){let r=Hs.get(e);if(r||(r=e.createElement("a"),Hs.set(e,r)),!t)t="";else if(t.startsWith("blob:")||t.startsWith("data:"))return t;return r.setAttribute("href",t),r.href}function pn(e,t,r,i){return i&&(r==="src"||r==="href"&&!(t==="use"&&i[0]==="#")||r==="xlink:href"&&i[0]!=="#"||r==="background"&&["table","td","th"].includes(t)?_e(e,i):r==="srcset"?va(e,i):r==="style"?gt(i,us(e)):t==="object"&&r==="data"?_e(e,i):i)}function mn(e,t,r){return ["video","audio"].includes(e)&&ve(t)==="autoplay"}function Ea(e,t,r){try{if(typeof t=="string"){if(e.classList.contains(t))return !0}else for(let i=e.classList.length;i--;){let s=e.classList[i];if(t.test(s))return !0}if(r)return e.matches(r)}catch{}return false}function wt(e,t,r){if(!e)return false;if(e.nodeType!==e.ELEMENT_NODE)return r?wt(Z.parentNode(e),t,r):false;for(let i=e.classList.length;i--;){let s=e.classList[i];if(t.test(s))return true}return r?wt(Z.parentNode(e),t,r):false}function gn(e,t,r,i){let s;if(cn(e)){if(s=e,!Z.childNodes(s).length)return false}else {if(Z.parentElement(e)===null)return false;s=Z.parentElement(e);}try{if(typeof t=="string"){if(i){if(s.closest(`.${t}`))return !0}else if(s.classList.contains(t))return !0}else if(wt(s,t,i))return !0;if(r){if(i){if(s.closest(r))return !0}else if(s.matches(r))return !0}}catch{}return false}function Ra(e,t,r){let i=e.contentWindow;if(!i)return;let s=false,a;try{a=i.document.readyState;}catch{return}if(a!=="complete"){let p=setTimeout(()=>{s||(t(),s=true);},r);e.addEventListener("load",()=>{clearTimeout(p),s=true,t();});return}let c="about:blank";if(i.location.href!==c||e.src===c||e.src==="")return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t);}function xa(e,t,r){let i=false,s;try{s=e.sheet;}catch{return}if(s)return;let a=setTimeout(()=>{i||(t(),i=true);},r);e.addEventListener("load",()=>{clearTimeout(a),i=true,t();});}function Ma(e,t){let{doc:r,mirror:i,blockClass:s,blockSelector:a,needsMask:c,inlineStylesheet:p,maskInputOptions:u={},maskTextFn:d,maskInputFn:n,dataURLOptions:f={},inlineImages:l,recordCanvas:o,keepIframeSrcFn:m,newlyAddedElement:h=false,cssCaptured:g=false}=t,v=Na(r,i);switch(e.nodeType){case e.DOCUMENT_NODE:return e.compatMode!=="CSS1Compat"?{type:K.Document,childNodes:[],compatMode:e.compatMode}:{type:K.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return {type:K.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:v};case e.ELEMENT_NODE:return Oa(e,{doc:r,blockClass:s,blockSelector:a,inlineStylesheet:p,maskInputOptions:u,maskInputFn:n,dataURLOptions:f,inlineImages:l,recordCanvas:o,keepIframeSrcFn:m,newlyAddedElement:h,rootId:v});case e.TEXT_NODE:return Aa(e,{doc:r,needsMask:c,maskTextFn:d,rootId:v,cssCaptured:g});case e.CDATA_SECTION_NODE:return {type:K.CDATA,textContent:"",rootId:v};case e.COMMENT_NODE:return {type:K.Comment,textContent:Z.textContent(e)||"",rootId:v};default:return false}}function Na(e,t){if(!t.hasNode(e))return;let r=t.getId(e);return r===1?void 0:r}function Aa(e,t){let{needsMask:r,maskTextFn:i,rootId:s,cssCaptured:a}=t,c=Z.parentNode(e),p=c&&c.tagName,u="",d=p==="STYLE"?true:void 0,n=p==="SCRIPT"?true:void 0;return n?u="SCRIPT_PLACEHOLDER":a||(u=Z.textContent(e),d&&u&&(u=gt(u,us(t.doc)))),!d&&!n&&u&&r&&(u=i?i(u,Z.parentElement(e)):u.replace(/[\S]/g,"*")),{type:K.Text,textContent:u||"",rootId:s}}function Oa(e,t){let{doc:r,blockClass:i,blockSelector:s,inlineStylesheet:a,maskInputOptions:c={},maskInputFn:p,dataURLOptions:u={},inlineImages:d,recordCanvas:n,keepIframeSrcFn:f,newlyAddedElement:l=false,rootId:o}=t,m=Ea(e,i,s),h=wa(e),g={},v=e.attributes.length;for(let S=0;S<v;S++){let E=e.attributes[S];mn(h,E.name,E.value)||(g[E.name]=pn(r,h,ve(E.name),E.value));}if(h==="link"&&a){let S=Array.from(r.styleSheets).find(w=>w.href===e.href),E=null;S&&(E=Jr(S)),E&&(delete g.rel,delete g.href,g._cssText=E);}if(h==="style"&&e.sheet){let S=Jr(e.sheet);S&&(e.childNodes.length>1&&(S=ma(S,e)),g._cssText=S);}if(["input","textarea","select"].includes(h)){let S=e.value,E=e.checked;g.type!=="radio"&&g.type!=="checkbox"&&g.type!=="submit"&&g.type!=="button"&&S?g.value=pt({element:e,type:mt(e),tagName:h,value:S,maskInputOptions:c,maskInputFn:p}):E&&(g.checked=E);}if(h==="option"&&(e.selected&&!c.select?g.selected=true:delete g.selected),h==="dialog"&&e.open&&(g.rr_open_mode=e.matches("dialog:modal")?"modal":"non-modal"),h==="canvas"&&n){if(e.__context==="2d")la(e)||(g.rr_dataURL=e.toDataURL(u.type,u.quality));else if(!("__context"in e)){let S=e.toDataURL(u.type,u.quality),E=r.createElement("canvas");E.width=e.width,E.height=e.height;let w=E.toDataURL(u.type,u.quality);S!==w&&(g.rr_dataURL=S);}}if(h==="img"&&d){Ae||(Ae=r.createElement("canvas"),qs=Ae.getContext("2d"));let S=e,E=S.currentSrc||S.getAttribute("src")||"<unknown-src>",w=S.crossOrigin,y=()=>{S.removeEventListener("load",y);try{Ae.width=S.naturalWidth,Ae.height=S.naturalHeight,qs.drawImage(S,0,0),g.rr_dataURL=Ae.toDataURL(u.type,u.quality);}catch(C){if(S.crossOrigin!=="anonymous"){S.crossOrigin="anonymous",S.complete&&S.naturalWidth!==0?y():S.addEventListener("load",y);return}else console.warn(`Cannot inline img src=${E}! Error: ${C}`);}S.crossOrigin==="anonymous"&&(w?g.crossOrigin=w:S.removeAttribute("crossorigin"));};S.complete&&S.naturalWidth!==0?y():S.addEventListener("load",y);}if(["audio","video"].includes(h)){let S=g;S.rr_mediaState=e.paused?"paused":"played",S.rr_mediaCurrentTime=e.currentTime,S.rr_mediaPlaybackRate=e.playbackRate,S.rr_mediaMuted=e.muted,S.rr_mediaLoop=e.loop,S.rr_mediaVolume=e.volume;}if(l||(e.scrollLeft&&(g.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(g.rr_scrollTop=e.scrollTop)),m){let{width:S,height:E}=e.getBoundingClientRect();g={class:g.class,rr_width:`${S}px`,rr_height:`${E}px`};}h==="iframe"&&!f(g.src)&&(e.contentDocument||(g.rr_src=g.src),delete g.src);let b;try{customElements.get(h)&&(b=!0);}catch{}return {type:K.Element,tagName:h,attributes:g,childNodes:[],isSVG:Ca(e)||void 0,needBlock:m,rootId:o,isCustom:b}}function q(e){return e==null?"":e.toLowerCase()}function yn(e){return e===true||e==="all"?{script:true,comment:true,headFavicon:true,headWhitespace:true,headMetaSocial:true,headMetaRobots:true,headMetaHttpEquiv:true,headMetaVerification:true,headMetaAuthorship:e==="all",headMetaDescKeywords:e==="all",headTitleMutations:e==="all"}:e||{}}function Ia(e,t){if(t.comment&&e.type===K.Comment)return true;if(e.type===K.Element){if(t.script&&(e.tagName==="script"||e.tagName==="link"&&(e.attributes.rel==="preload"&&e.attributes.as==="script"||e.attributes.rel==="modulepreload")||e.tagName==="link"&&e.attributes.rel==="prefetch"&&typeof e.attributes.href=="string"&&fn(e.attributes.href)==="js"))return true;if(t.headFavicon&&(e.tagName==="link"&&e.attributes.rel==="shortcut icon"||e.tagName==="meta"&&(q(e.attributes.name).match(/^msapplication-tile(image|color)$/)||q(e.attributes.name)==="application-name"||q(e.attributes.rel)==="icon"||q(e.attributes.rel)==="apple-touch-icon"||q(e.attributes.rel)==="shortcut icon")))return true;if(e.tagName==="meta"){if(t.headMetaDescKeywords&&q(e.attributes.name).match(/^description|keywords$/))return true;if(t.headMetaSocial&&(q(e.attributes.property).match(/^(og|twitter|fb):/)||q(e.attributes.name).match(/^(og|twitter):/)||q(e.attributes.name)==="pinterest"))return true;if(t.headMetaRobots&&(q(e.attributes.name)==="robots"||q(e.attributes.name)==="googlebot"||q(e.attributes.name)==="bingbot"))return true;if(t.headMetaHttpEquiv&&e.attributes["http-equiv"]!==void 0)return true;if(t.headMetaAuthorship&&(q(e.attributes.name)==="author"||q(e.attributes.name)==="generator"||q(e.attributes.name)==="framework"||q(e.attributes.name)==="publisher"||q(e.attributes.name)==="progid"||q(e.attributes.property).match(/^article:/)||q(e.attributes.property).match(/^product:/)))return true;if(t.headMetaVerification&&(q(e.attributes.name)==="google-site-verification"||q(e.attributes.name)==="yandex-verification"||q(e.attributes.name)==="csrf-token"||q(e.attributes.name)==="p:domain_verify"||q(e.attributes.name)==="verify-v1"||q(e.attributes.name)==="verification"||q(e.attributes.name)==="shopify-checkout-api-token"))return true}}return false}function ke(e,t){let{doc:r,mirror:i,blockClass:s,blockSelector:a,maskTextClass:c,maskTextSelector:p,skipChild:u=false,inlineStylesheet:d=true,maskInputOptions:n={},maskTextFn:f,maskInputFn:l,slimDOMOptions:o,dataURLOptions:m={},inlineImages:h=false,recordCanvas:g=false,onSerialize:v,onIframeLoad:b,iframeLoadTimeout:S=5e3,onStylesheetLoad:E,stylesheetLoadTimeout:w=5e3,keepIframeSrcFn:y=()=>false,newlyAddedElement:C=false,cssCaptured:x=false}=t,{needsMask:A}=t,{preserveWhiteSpace:M=true}=t;A||(A=gn(e,c,p,A===void 0));let _=Ma(e,{doc:r,mirror:i,blockClass:s,blockSelector:a,needsMask:A,inlineStylesheet:d,maskInputOptions:n,maskTextFn:f,maskInputFn:l,dataURLOptions:m,inlineImages:h,recordCanvas:g,keepIframeSrcFn:y,newlyAddedElement:C,cssCaptured:x});if(!_)return console.warn(e,"not serialized"),null;let I;i.hasNode(e)?I=i.getId(e):Ia(_,o)||!M&&_.type===K.Text&&!_.textContent.replace(/^\s+|\s+$/gm,"").length?I=yt:I=dn();let R=Object.assign(_,{id:I});if(i.add(e,R),I===yt)return null;v&&v(e);let ce=!u;if(R.type===K.Element){ce=ce&&!R.needBlock,delete R.needBlock;let $=Z.shadowRoot(e);$&&ze($)&&(R.isShadowHost=true);}if((R.type===K.Document||R.type===K.Element)&&ce){o.headWhitespace&&R.type===K.Element&&R.tagName==="head"&&(M=false);let $={doc:r,mirror:i,blockClass:s,blockSelector:a,needsMask:A,maskTextClass:c,maskTextSelector:p,skipChild:u,inlineStylesheet:d,maskInputOptions:n,maskTextFn:f,maskInputFn:l,slimDOMOptions:o,dataURLOptions:m,inlineImages:h,recordCanvas:g,preserveWhiteSpace:M,onSerialize:v,onIframeLoad:b,iframeLoadTimeout:S,onStylesheetLoad:E,stylesheetLoadTimeout:w,keepIframeSrcFn:y,cssCaptured:false};if(!(R.type===K.Element&&R.tagName==="textarea"&&R.attributes.value!==void 0)){R.type===K.Element&&R.attributes._cssText!==void 0&&typeof R.attributes._cssText=="string"&&($.cssCaptured=true);for(let Y of Array.from(Z.childNodes(e))){let Q=ke(Y,$);Q&&R.childNodes.push(Q);}}let U=null;if(cn(e)&&(U=Z.shadowRoot(e)))for(let Y of Array.from(Z.childNodes(U))){let Q=ke(Y,$);Q&&(ze(U)&&(Q.isShadow=true),R.childNodes.push(Q));}}let ie=Z.parentNode(e);return ie&&We(ie)&&ze(ie)&&(R.isShadow=true),R.type===K.Element&&R.tagName==="iframe"&&Ra(e,()=>{let $=e.contentDocument;if($&&b){let U=ke($,{doc:$,mirror:i,blockClass:s,blockSelector:a,needsMask:A,maskTextClass:c,maskTextSelector:p,skipChild:false,inlineStylesheet:d,maskInputOptions:n,maskTextFn:f,maskInputFn:l,slimDOMOptions:o,dataURLOptions:m,inlineImages:h,recordCanvas:g,preserveWhiteSpace:M,onSerialize:v,onIframeLoad:b,iframeLoadTimeout:S,onStylesheetLoad:E,stylesheetLoadTimeout:w,keepIframeSrcFn:y});U&&b(e,U);}},S),R.type===K.Element&&R.tagName==="link"&&typeof R.attributes.rel=="string"&&(R.attributes.rel==="stylesheet"||R.attributes.rel==="preload"&&typeof R.attributes.href=="string"&&fn(R.attributes.href)==="css")&&xa(e,()=>{if(E){let $=ke(e,{doc:r,mirror:i,blockClass:s,blockSelector:a,needsMask:A,maskTextClass:c,maskTextSelector:p,skipChild:false,inlineStylesheet:d,maskInputOptions:n,maskTextFn:f,maskInputFn:l,slimDOMOptions:o,dataURLOptions:m,inlineImages:h,recordCanvas:g,preserveWhiteSpace:M,onSerialize:v,onIframeLoad:b,iframeLoadTimeout:S,onStylesheetLoad:E,stylesheetLoadTimeout:w,keepIframeSrcFn:y});$&&E(e,$);}},w),R}function _a(e,t){let{mirror:r=new dt,blockClass:i="rr-block",blockSelector:s=null,maskTextClass:a="rr-mask",maskTextSelector:c=null,inlineStylesheet:p=true,inlineImages:u=false,recordCanvas:d=false,maskAllInputs:n=false,maskTextFn:f,maskInputFn:l,slimDOM:o=false,dataURLOptions:m,preserveWhiteSpace:h,onSerialize:g,onIframeLoad:v,iframeLoadTimeout:b,onStylesheetLoad:S,stylesheetLoadTimeout:E,keepIframeSrcFn:w=()=>false}=t,y=n===true?{color:true,date:true,"datetime-local":true,email:true,month:true,number:true,range:true,search:true,tel:true,text:true,time:true,url:true,week:true,textarea:true,select:true,password:true}:n===false?{password:true}:n,C=yn(o);return ke(e,{doc:e,mirror:r,blockClass:i,blockSelector:s,maskTextClass:a,maskTextSelector:c,skipChild:false,inlineStylesheet:p,maskInputOptions:y,maskTextFn:f,maskInputFn:l,slimDOMOptions:C,dataURLOptions:m,inlineImages:u,recordCanvas:d,preserveWhiteSpace:h,onSerialize:g,onIframeLoad:v,iframeLoadTimeout:b,onStylesheetLoad:S,stylesheetLoadTimeout:E,keepIframeSrcFn:w,newlyAddedElement:false})}function Ta(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Da(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var r=function i(){return this instanceof i?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype;}else r={};return Object.defineProperty(r,"__esModule",{value:true}),Object.keys(e).forEach(function(i){var s=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(r,i,s.get?s:{enumerable:true,get:function(){return e[i]}});}),r}var it={exports:{}},js;function Pa(){if(js)return it.exports;js=1;var e=String,t=function(){return {isColorSupported:false,reset:e,bold:e,dim:e,italic:e,underline:e,inverse:e,hidden:e,strikethrough:e,black:e,red:e,green:e,yellow:e,blue:e,magenta:e,cyan:e,white:e,gray:e,bgBlack:e,bgRed:e,bgGreen:e,bgYellow:e,bgBlue:e,bgMagenta:e,bgCyan:e,bgWhite:e}};return it.exports=t(),it.exports.createColors=t,it.exports}var La={},Fa=Object.freeze(Object.defineProperty({__proto__:null,default:La},Symbol.toStringTag,{value:"Module"})),de=Da(Fa),Vt,Vs;function cs(){if(Vs)return Vt;Vs=1;let e=Pa(),t=de;class r extends Error{constructor(s,a,c,p,u,d){super(s),this.name="CssSyntaxError",this.reason=s,u&&(this.file=u),p&&(this.source=p),d&&(this.plugin=d),typeof a<"u"&&typeof c<"u"&&(typeof a=="number"?(this.line=a,this.column=c):(this.line=a.line,this.column=a.column,this.endLine=c.line,this.endColumn=c.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,r);}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason;}showSourceCode(s){if(!this.source)return "";let a=this.source;s==null&&(s=e.isColorSupported),t&&s&&(a=t(a));let c=a.split(/\r?\n/),p=Math.max(this.line-3,0),u=Math.min(this.line+2,c.length),d=String(u).length,n,f;if(s){let{bold:l,gray:o,red:m}=e.createColors(true);n=h=>l(m(h)),f=h=>o(h);}else n=f=l=>l;return c.slice(p,u).map((l,o)=>{let m=p+1+o,h=" "+(" "+m).slice(-d)+" | ";if(m===this.line){let g=f(h.replace(/\d/g," "))+l.slice(0,this.column-1).replace(/[^\t]/g," ");return n(">")+f(h)+l+`
2
+ `+g+n("^")}return " "+f(h)+l}).join(`
3
+ `)}toString(){let s=this.showSourceCode();return s&&(s=`
4
+
5
+ `+s+`
6
+ `),this.name+": "+this.message+s}}return Vt=r,r.default=r,Vt}var nt={},Gs;function hs(){return Gs||(Gs=1,nt.isClean=Symbol("isClean"),nt.my=Symbol("my")),nt}var Gt,Ys;function wn(){if(Ys)return Gt;Ys=1;let e={after:`
7
+ `,beforeClose:`
8
+ `,beforeComment:`
9
+ `,beforeDecl:`
10
+ `,beforeOpen:" ",beforeRule:`
11
+ `,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:false};function t(i){return i[0].toUpperCase()+i.slice(1)}class r{constructor(s){this.builder=s;}atrule(s,a){let c="@"+s.name,p=s.params?this.rawValue(s,"params"):"";if(typeof s.raws.afterName<"u"?c+=s.raws.afterName:p&&(c+=" "),s.nodes)this.block(s,c+p);else {let u=(s.raws.between||"")+(a?";":"");this.builder(c+p+u,s);}}beforeAfter(s,a){let c;s.type==="decl"?c=this.raw(s,null,"beforeDecl"):s.type==="comment"?c=this.raw(s,null,"beforeComment"):a==="before"?c=this.raw(s,null,"beforeRule"):c=this.raw(s,null,"beforeClose");let p=s.parent,u=0;for(;p&&p.type!=="root";)u+=1,p=p.parent;if(c.includes(`
12
+ `)){let d=this.raw(s,null,"indent");if(d.length)for(let n=0;n<u;n++)c+=d;}return c}block(s,a){let c=this.raw(s,"between","beforeOpen");this.builder(a+c+"{",s,"start");let p;s.nodes&&s.nodes.length?(this.body(s),p=this.raw(s,"after")):p=this.raw(s,"after","emptyBody"),p&&this.builder(p),this.builder("}",s,"end");}body(s){let a=s.nodes.length-1;for(;a>0&&s.nodes[a].type==="comment";)a-=1;let c=this.raw(s,"semicolon");for(let p=0;p<s.nodes.length;p++){let u=s.nodes[p],d=this.raw(u,"before");d&&this.builder(d),this.stringify(u,a!==p||c);}}comment(s){let a=this.raw(s,"left","commentLeft"),c=this.raw(s,"right","commentRight");this.builder("/*"+a+s.text+c+"*/",s);}decl(s,a){let c=this.raw(s,"between","colon"),p=s.prop+c+this.rawValue(s,"value");s.important&&(p+=s.raws.important||" !important"),a&&(p+=";"),this.builder(p,s);}document(s){this.body(s);}raw(s,a,c){let p;if(c||(c=a),a&&(p=s.raws[a],typeof p<"u"))return p;let u=s.parent;if(c==="before"&&(!u||u.type==="root"&&u.first===s||u&&u.type==="document"))return "";if(!u)return e[c];let d=s.root();if(d.rawCache||(d.rawCache={}),typeof d.rawCache[c]<"u")return d.rawCache[c];if(c==="before"||c==="after")return this.beforeAfter(s,c);{let n="raw"+t(c);this[n]?p=this[n](d,s):d.walk(f=>{if(p=f.raws[a],typeof p<"u")return false});}return typeof p>"u"&&(p=e[c]),d.rawCache[c]=p,p}rawBeforeClose(s){let a;return s.walk(c=>{if(c.nodes&&c.nodes.length>0&&typeof c.raws.after<"u")return a=c.raws.after,a.includes(`
13
+ `)&&(a=a.replace(/[^\n]+$/,"")),false}),a&&(a=a.replace(/\S/g,"")),a}rawBeforeComment(s,a){let c;return s.walkComments(p=>{if(typeof p.raws.before<"u")return c=p.raws.before,c.includes(`
14
+ `)&&(c=c.replace(/[^\n]+$/,"")),false}),typeof c>"u"?c=this.raw(a,null,"beforeDecl"):c&&(c=c.replace(/\S/g,"")),c}rawBeforeDecl(s,a){let c;return s.walkDecls(p=>{if(typeof p.raws.before<"u")return c=p.raws.before,c.includes(`
15
+ `)&&(c=c.replace(/[^\n]+$/,"")),false}),typeof c>"u"?c=this.raw(a,null,"beforeRule"):c&&(c=c.replace(/\S/g,"")),c}rawBeforeOpen(s){let a;return s.walk(c=>{if(c.type!=="decl"&&(a=c.raws.between,typeof a<"u"))return false}),a}rawBeforeRule(s){let a;return s.walk(c=>{if(c.nodes&&(c.parent!==s||s.first!==c)&&typeof c.raws.before<"u")return a=c.raws.before,a.includes(`
16
+ `)&&(a=a.replace(/[^\n]+$/,"")),false}),a&&(a=a.replace(/\S/g,"")),a}rawColon(s){let a;return s.walkDecls(c=>{if(typeof c.raws.between<"u")return a=c.raws.between.replace(/[^\s:]/g,""),false}),a}rawEmptyBody(s){let a;return s.walk(c=>{if(c.nodes&&c.nodes.length===0&&(a=c.raws.after,typeof a<"u"))return false}),a}rawIndent(s){if(s.raws.indent)return s.raws.indent;let a;return s.walk(c=>{let p=c.parent;if(p&&p!==s&&p.parent&&p.parent===s&&typeof c.raws.before<"u"){let u=c.raws.before.split(`
17
+ `);return a=u[u.length-1],a=a.replace(/\S/g,""),false}}),a}rawSemicolon(s){let a;return s.walk(c=>{if(c.nodes&&c.nodes.length&&c.last.type==="decl"&&(a=c.raws.semicolon,typeof a<"u"))return false}),a}rawValue(s,a){let c=s[a],p=s.raws[a];return p&&p.value===c?p.raw:c}root(s){this.body(s),s.raws.after&&this.builder(s.raws.after);}rule(s){this.block(s,this.rawValue(s,"selector")),s.raws.ownSemicolon&&this.builder(s.raws.ownSemicolon,s,"end");}stringify(s,a){if(!this[s.type])throw new Error("Unknown AST node type "+s.type+". Maybe you need to change PostCSS stringifier.");this[s.type](s,a);}}return Gt=r,r.default=r,Gt}var Yt,Xs;function Ct(){if(Xs)return Yt;Xs=1;let e=wn();function t(r,i){new e(i).stringify(r);}return Yt=t,t.default=t,Yt}var Xt,Js;function Et(){if(Js)return Xt;Js=1;let{isClean:e,my:t}=hs(),r=cs(),i=wn(),s=Ct();function a(p,u){let d=new p.constructor;for(let n in p){if(!Object.prototype.hasOwnProperty.call(p,n)||n==="proxyCache")continue;let f=p[n],l=typeof f;n==="parent"&&l==="object"?u&&(d[n]=u):n==="source"?d[n]=f:Array.isArray(f)?d[n]=f.map(o=>a(o,d)):(l==="object"&&f!==null&&(f=a(f)),d[n]=f);}return d}class c{constructor(u={}){this.raws={},this[e]=false,this[t]=true;for(let d in u)if(d==="nodes"){this.nodes=[];for(let n of u[d])typeof n.clone=="function"?this.append(n.clone()):this.append(n);}else this[d]=u[d];}addToError(u){if(u.postcssNode=this,u.stack&&this.source&&/\n\s{4}at /.test(u.stack)){let d=this.source;u.stack=u.stack.replace(/\n\s{4}at /,`$&${d.input.from}:${d.start.line}:${d.start.column}$&`);}return u}after(u){return this.parent.insertAfter(this,u),this}assign(u={}){for(let d in u)this[d]=u[d];return this}before(u){return this.parent.insertBefore(this,u),this}cleanRaws(u){delete this.raws.before,delete this.raws.after,u||delete this.raws.between;}clone(u={}){let d=a(this);for(let n in u)d[n]=u[n];return d}cloneAfter(u={}){let d=this.clone(u);return this.parent.insertAfter(this,d),d}cloneBefore(u={}){let d=this.clone(u);return this.parent.insertBefore(this,d),d}error(u,d={}){if(this.source){let{end:n,start:f}=this.rangeBy(d);return this.source.input.error(u,{column:f.column,line:f.line},{column:n.column,line:n.line},d)}return new r(u)}getProxyProcessor(){return {get(u,d){return d==="proxyOf"?u:d==="root"?()=>u.root().toProxy():u[d]},set(u,d,n){return u[d]===n||(u[d]=n,(d==="prop"||d==="value"||d==="name"||d==="params"||d==="important"||d==="text")&&u.markDirty()),true}}}markDirty(){if(this[e]){this[e]=false;let u=this;for(;u=u.parent;)u[e]=false;}}next(){if(!this.parent)return;let u=this.parent.index(this);return this.parent.nodes[u+1]}positionBy(u,d){let n=this.source.start;if(u.index)n=this.positionInside(u.index,d);else if(u.word){d=this.toString();let f=d.indexOf(u.word);f!==-1&&(n=this.positionInside(f,d));}return n}positionInside(u,d){let n=d||this.toString(),f=this.source.start.column,l=this.source.start.line;for(let o=0;o<u;o++)n[o]===`
18
+ `?(f=1,l+=1):f+=1;return {column:f,line:l}}prev(){if(!this.parent)return;let u=this.parent.index(this);return this.parent.nodes[u-1]}rangeBy(u){let d={column:this.source.start.column,line:this.source.start.line},n=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:d.column+1,line:d.line};if(u.word){let f=this.toString(),l=f.indexOf(u.word);l!==-1&&(d=this.positionInside(l,f),n=this.positionInside(l+u.word.length,f));}else u.start?d={column:u.start.column,line:u.start.line}:u.index&&(d=this.positionInside(u.index)),u.end?n={column:u.end.column,line:u.end.line}:typeof u.endIndex=="number"?n=this.positionInside(u.endIndex):u.index&&(n=this.positionInside(u.index+1));return (n.line<d.line||n.line===d.line&&n.column<=d.column)&&(n={column:d.column+1,line:d.line}),{end:n,start:d}}raw(u,d){return new i().raw(this,u,d)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...u){if(this.parent){let d=this,n=false;for(let f of u)f===this?n=true:n?(this.parent.insertAfter(d,f),d=f):this.parent.insertBefore(d,f);n||this.remove();}return this}root(){let u=this;for(;u.parent&&u.parent.type!=="document";)u=u.parent;return u}toJSON(u,d){let n={},f=d==null;d=d||new Map;let l=0;for(let o in this){if(!Object.prototype.hasOwnProperty.call(this,o)||o==="parent"||o==="proxyCache")continue;let m=this[o];if(Array.isArray(m))n[o]=m.map(h=>typeof h=="object"&&h.toJSON?h.toJSON(null,d):h);else if(typeof m=="object"&&m.toJSON)n[o]=m.toJSON(null,d);else if(o==="source"){let h=d.get(m.input);h==null&&(h=l,d.set(m.input,l),l++),n[o]={end:m.end,inputId:h,start:m.start};}else n[o]=m;}return f&&(n.inputs=[...d.keys()].map(o=>o.toJSON())),n}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(u=s){u.stringify&&(u=u.stringify);let d="";return u(this,n=>{d+=n;}),d}warn(u,d,n){let f={node:this};for(let l in n)f[l]=n[l];return u.warn(d,f)}get proxyOf(){return this}}return Xt=c,c.default=c,Xt}var Jt,Ks;function Rt(){if(Ks)return Jt;Ks=1;let e=Et();class t extends e{constructor(i){i&&typeof i.value<"u"&&typeof i.value!="string"&&(i={...i,value:String(i.value)}),super(i),this.type="decl";}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}}return Jt=t,t.default=t,Jt}var Kt,Qs;function Ua(){if(Qs)return Kt;Qs=1;let e="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";return Kt={nanoid:(i=21)=>{let s="",a=i;for(;a--;)s+=e[Math.random()*64|0];return s},customAlphabet:(i,s=21)=>(a=s)=>{let c="",p=a;for(;p--;)c+=i[Math.random()*i.length|0];return c}},Kt}var Qt,Zs;function bn(){if(Zs)return Qt;Zs=1;let{SourceMapConsumer:e,SourceMapGenerator:t}=de,{existsSync:r,readFileSync:i}=de,{dirname:s,join:a}=de;function c(u){return Buffer?Buffer.from(u,"base64").toString():window.atob(u)}class p{constructor(d,n){if(n.map===false)return;this.loadAnnotation(d),this.inline=this.startWith(this.annotation,"data:");let f=n.map?n.map.prev:void 0,l=this.loadMap(n.from,f);!this.mapFile&&n.from&&(this.mapFile=n.from),this.mapFile&&(this.root=s(this.mapFile)),l&&(this.text=l);}consumer(){return this.consumerCache||(this.consumerCache=new e(this.text)),this.consumerCache}decodeInline(d){let n=/^data:application\/json;charset=utf-?8;base64,/,f=/^data:application\/json;base64,/,l=/^data:application\/json;charset=utf-?8,/,o=/^data:application\/json,/;if(l.test(d)||o.test(d))return decodeURIComponent(d.substr(RegExp.lastMatch.length));if(n.test(d)||f.test(d))return c(d.substr(RegExp.lastMatch.length));let m=d.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+m)}getAnnotationURL(d){return d.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(d){return typeof d!="object"?false:typeof d.mappings=="string"||typeof d._mappings=="string"||Array.isArray(d.sections)}loadAnnotation(d){let n=d.match(/\/\*\s*# sourceMappingURL=/gm);if(!n)return;let f=d.lastIndexOf(n.pop()),l=d.indexOf("*/",f);f>-1&&l>-1&&(this.annotation=this.getAnnotationURL(d.substring(f,l)));}loadFile(d){if(this.root=s(d),r(d))return this.mapFile=d,i(d,"utf-8").toString().trim()}loadMap(d,n){if(n===false)return false;if(n){if(typeof n=="string")return n;if(typeof n=="function"){let f=n(d);if(f){let l=this.loadFile(f);if(!l)throw new Error("Unable to load previous source map: "+f.toString());return l}}else {if(n instanceof e)return t.fromSourceMap(n).toString();if(n instanceof t)return n.toString();if(this.isMap(n))return JSON.stringify(n);throw new Error("Unsupported previous source map format: "+n.toString())}}else {if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let f=this.annotation;return d&&(f=a(s(d),f)),this.loadFile(f)}}}startWith(d,n){return d?d.substr(0,n.length)===n:false}withContent(){return !!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}}return Qt=p,p.default=p,Qt}var Zt,ei;function xt(){if(ei)return Zt;ei=1;let{SourceMapConsumer:e,SourceMapGenerator:t}=de,{fileURLToPath:r,pathToFileURL:i}=de,{isAbsolute:s,resolve:a}=de,{nanoid:c}=Ua(),p=de,u=cs(),d=bn(),n=Symbol("fromOffsetCache"),f=!!(e&&t),l=!!(a&&s);class o{constructor(h,g={}){if(h===null||typeof h>"u"||typeof h=="object"&&!h.toString)throw new Error(`PostCSS received ${h} instead of CSS string`);if(this.css=h.toString(),this.css[0]==="\uFEFF"||this.css[0]==="\uFFFE"?(this.hasBOM=true,this.css=this.css.slice(1)):this.hasBOM=false,g.from&&(!l||/^\w+:\/\//.test(g.from)||s(g.from)?this.file=g.from:this.file=a(g.from)),l&&f){let v=new d(this.css,g);if(v.text){this.map=v;let b=v.consumer().file;!this.file&&b&&(this.file=this.mapResolve(b));}}this.file||(this.id="<input css "+c(6)+">"),this.map&&(this.map.file=this.from);}error(h,g,v,b={}){let S,E,w;if(g&&typeof g=="object"){let C=g,x=v;if(typeof C.offset=="number"){let A=this.fromOffset(C.offset);g=A.line,v=A.col;}else g=C.line,v=C.column;if(typeof x.offset=="number"){let A=this.fromOffset(x.offset);E=A.line,w=A.col;}else E=x.line,w=x.column;}else if(!v){let C=this.fromOffset(g);g=C.line,v=C.col;}let y=this.origin(g,v,E,w);return y?S=new u(h,y.endLine===void 0?y.line:{column:y.column,line:y.line},y.endLine===void 0?y.column:{column:y.endColumn,line:y.endLine},y.source,y.file,b.plugin):S=new u(h,E===void 0?g:{column:v,line:g},E===void 0?v:{column:w,line:E},this.css,this.file,b.plugin),S.input={column:v,endColumn:w,endLine:E,line:g,source:this.css},this.file&&(i&&(S.input.url=i(this.file).toString()),S.input.file=this.file),S}fromOffset(h){let g,v;if(this[n])v=this[n];else {let S=this.css.split(`
19
+ `);v=new Array(S.length);let E=0;for(let w=0,y=S.length;w<y;w++)v[w]=E,E+=S[w].length+1;this[n]=v;}g=v[v.length-1];let b=0;if(h>=g)b=v.length-1;else {let S=v.length-2,E;for(;b<S;)if(E=b+(S-b>>1),h<v[E])S=E-1;else if(h>=v[E+1])b=E+1;else {b=E;break}}return {col:h-v[b]+1,line:b+1}}mapResolve(h){return /^\w+:\/\//.test(h)?h:a(this.map.consumer().sourceRoot||this.map.root||".",h)}origin(h,g,v,b){if(!this.map)return false;let S=this.map.consumer(),E=S.originalPositionFor({column:g,line:h});if(!E.source)return false;let w;typeof v=="number"&&(w=S.originalPositionFor({column:b,line:v}));let y;s(E.source)?y=i(E.source):y=new URL(E.source,this.map.consumer().sourceRoot||i(this.map.mapFile));let C={column:E.column,endColumn:w&&w.column,endLine:w&&w.line,line:E.line,url:y.toString()};if(y.protocol==="file:")if(r)C.file=r(y);else throw new Error("file: protocol is not available in this PostCSS build");let x=S.sourceContentFor(E.source);return x&&(C.source=x),C}toJSON(){let h={};for(let g of ["hasBOM","css","file","id"])this[g]!=null&&(h[g]=this[g]);return this.map&&(h.map={...this.map},h.map.consumerCache&&(h.map.consumerCache=void 0)),h}get from(){return this.file||this.id}}return Zt=o,o.default=o,p&&p.registerInput&&p.registerInput(o),Zt}var er,ti;function Sn(){if(ti)return er;ti=1;let{SourceMapConsumer:e,SourceMapGenerator:t}=de,{dirname:r,relative:i,resolve:s,sep:a}=de,{pathToFileURL:c}=de,p=xt(),u=!!(e&&t),d=!!(r&&s&&i&&a);class n{constructor(l,o,m,h){this.stringify=l,this.mapOpts=m.map||{},this.root=o,this.opts=m,this.css=h,this.originalCSS=h,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map;}addAnnotation(){let l;this.isInline()?l="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?l=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?l=this.mapOpts.annotation(this.opts.to,this.root):l=this.outputFile()+".map";let o=`
20
+ `;this.css.includes(`\r
21
+ `)&&(o=`\r
22
+ `),this.css+=o+"/*# sourceMappingURL="+l+" */";}applyPrevMaps(){for(let l of this.previous()){let o=this.toUrl(this.path(l.file)),m=l.root||r(l.file),h;this.mapOpts.sourcesContent===false?(h=new e(l.text),h.sourcesContent&&(h.sourcesContent=null)):h=l.consumer(),this.map.applySourceMap(h,o,this.toUrl(this.path(m)));}}clearAnnotation(){if(this.mapOpts.annotation!==false)if(this.root){let l;for(let o=this.root.nodes.length-1;o>=0;o--)l=this.root.nodes[o],l.type==="comment"&&l.text.indexOf("# sourceMappingURL=")===0&&this.root.removeChild(o);}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""));}generate(){if(this.clearAnnotation(),d&&u&&this.isMap())return this.generateMap();{let l="";return this.stringify(this.root,o=>{l+=o;}),[l]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let l=this.previous()[0].consumer();l.file=this.outputFile(),this.map=t.fromSourceMap(l,{ignoreInvalidMapping:true});}else this.map=new t({file:this.outputFile(),ignoreInvalidMapping:true}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css="",this.map=new t({file:this.outputFile(),ignoreInvalidMapping:true});let l=1,o=1,m="<no source>",h={generated:{column:0,line:0},original:{column:0,line:0},source:""},g,v;this.stringify(this.root,(b,S,E)=>{if(this.css+=b,S&&E!=="end"&&(h.generated.line=l,h.generated.column=o-1,S.source&&S.source.start?(h.source=this.sourcePath(S),h.original.line=S.source.start.line,h.original.column=S.source.start.column-1,this.map.addMapping(h)):(h.source=m,h.original.line=1,h.original.column=0,this.map.addMapping(h))),g=b.match(/\n/g),g?(l+=g.length,v=b.lastIndexOf(`
23
+ `),o=b.length-v):o+=b.length,S&&E!=="start"){let w=S.parent||{raws:{}};(!(S.type==="decl"||S.type==="atrule"&&!S.nodes)||S!==w.last||w.raws.semicolon)&&(S.source&&S.source.end?(h.source=this.sourcePath(S),h.original.line=S.source.end.line,h.original.column=S.source.end.column-1,h.generated.line=l,h.generated.column=o-2,this.map.addMapping(h)):(h.source=m,h.original.line=1,h.original.column=0,h.generated.line=l,h.generated.column=o-1,this.map.addMapping(h)));}});}isAnnotation(){return this.isInline()?true:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(l=>l.annotation):true}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let l=this.mapOpts.annotation;return typeof l<"u"&&l!==true?false:this.previous().length?this.previous().some(o=>o.inline):true}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(l=>l.withContent()):true}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(l){if(this.mapOpts.absolute||l.charCodeAt(0)===60||/^\w+:\/\//.test(l))return l;let o=this.memoizedPaths.get(l);if(o)return o;let m=this.opts.to?r(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(m=r(s(m,this.mapOpts.annotation)));let h=i(m,l);return this.memoizedPaths.set(l,h),h}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(l=>{if(l.source&&l.source.input.map){let o=l.source.input.map;this.previousMaps.includes(o)||this.previousMaps.push(o);}});else {let l=new p(this.originalCSS,this.opts);l.map&&this.previousMaps.push(l.map);}return this.previousMaps}setSourcesContent(){let l={};if(this.root)this.root.walk(o=>{if(o.source){let m=o.source.input.from;if(m&&!l[m]){l[m]=true;let h=this.usesFileUrls?this.toFileUrl(m):this.toUrl(this.path(m));this.map.setSourceContent(h,o.source.input.css);}}});else if(this.css){let o=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(o,this.css);}}sourcePath(l){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(l.source.input.from):this.toUrl(this.path(l.source.input.from))}toBase64(l){return Buffer?Buffer.from(l).toString("base64"):window.btoa(unescape(encodeURIComponent(l)))}toFileUrl(l){let o=this.memoizedFileURLs.get(l);if(o)return o;if(c){let m=c(l).toString();return this.memoizedFileURLs.set(l,m),m}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(l){let o=this.memoizedURLs.get(l);if(o)return o;a==="\\"&&(l=l.replace(/\\/g,"/"));let m=encodeURI(l).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(l,m),m}}return er=n,er}var tr,ri;function Mt(){if(ri)return tr;ri=1;let e=Et();class t extends e{constructor(i){super(i),this.type="comment";}}return tr=t,t.default=t,tr}var rr,si;function xe(){if(si)return rr;si=1;let{isClean:e,my:t}=hs(),r=Rt(),i=Mt(),s=Et(),a,c,p,u;function d(l){return l.map(o=>(o.nodes&&(o.nodes=d(o.nodes)),delete o.source,o))}function n(l){if(l[e]=false,l.proxyOf.nodes)for(let o of l.proxyOf.nodes)n(o);}class f extends s{append(...o){for(let m of o){let h=this.normalize(m,this.last);for(let g of h)this.proxyOf.nodes.push(g);}return this.markDirty(),this}cleanRaws(o){if(super.cleanRaws(o),this.nodes)for(let m of this.nodes)m.cleanRaws(o);}each(o){if(!this.proxyOf.nodes)return;let m=this.getIterator(),h,g;for(;this.indexes[m]<this.proxyOf.nodes.length&&(h=this.indexes[m],g=o(this.proxyOf.nodes[h],h),g!==false);)this.indexes[m]+=1;return delete this.indexes[m],g}every(o){return this.nodes.every(o)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let o=this.lastEach;return this.indexes[o]=0,o}getProxyProcessor(){return {get(o,m){return m==="proxyOf"?o:o[m]?m==="each"||typeof m=="string"&&m.startsWith("walk")?(...h)=>o[m](...h.map(g=>typeof g=="function"?(v,b)=>g(v.toProxy(),b):g)):m==="every"||m==="some"?h=>o[m]((g,...v)=>h(g.toProxy(),...v)):m==="root"?()=>o.root().toProxy():m==="nodes"?o.nodes.map(h=>h.toProxy()):m==="first"||m==="last"?o[m].toProxy():o[m]:o[m]},set(o,m,h){return o[m]===h||(o[m]=h,(m==="name"||m==="params"||m==="selector")&&o.markDirty()),true}}}index(o){return typeof o=="number"?o:(o.proxyOf&&(o=o.proxyOf),this.proxyOf.nodes.indexOf(o))}insertAfter(o,m){let h=this.index(o),g=this.normalize(m,this.proxyOf.nodes[h]).reverse();h=this.index(o);for(let b of g)this.proxyOf.nodes.splice(h+1,0,b);let v;for(let b in this.indexes)v=this.indexes[b],h<v&&(this.indexes[b]=v+g.length);return this.markDirty(),this}insertBefore(o,m){let h=this.index(o),g=h===0?"prepend":false,v=this.normalize(m,this.proxyOf.nodes[h],g).reverse();h=this.index(o);for(let S of v)this.proxyOf.nodes.splice(h,0,S);let b;for(let S in this.indexes)b=this.indexes[S],h<=b&&(this.indexes[S]=b+v.length);return this.markDirty(),this}normalize(o,m){if(typeof o=="string")o=d(a(o).nodes);else if(typeof o>"u")o=[];else if(Array.isArray(o)){o=o.slice(0);for(let g of o)g.parent&&g.parent.removeChild(g,"ignore");}else if(o.type==="root"&&this.type!=="document"){o=o.nodes.slice(0);for(let g of o)g.parent&&g.parent.removeChild(g,"ignore");}else if(o.type)o=[o];else if(o.prop){if(typeof o.value>"u")throw new Error("Value field is missed in node creation");typeof o.value!="string"&&(o.value=String(o.value)),o=[new r(o)];}else if(o.selector)o=[new c(o)];else if(o.name)o=[new p(o)];else if(o.text)o=[new i(o)];else throw new Error("Unknown node type in node creation");return o.map(g=>(g[t]||f.rebuild(g),g=g.proxyOf,g.parent&&g.parent.removeChild(g),g[e]&&n(g),typeof g.raws.before>"u"&&m&&typeof m.raws.before<"u"&&(g.raws.before=m.raws.before.replace(/\S/g,"")),g.parent=this.proxyOf,g))}prepend(...o){o=o.reverse();for(let m of o){let h=this.normalize(m,this.first,"prepend").reverse();for(let g of h)this.proxyOf.nodes.unshift(g);for(let g in this.indexes)this.indexes[g]=this.indexes[g]+h.length;}return this.markDirty(),this}push(o){return o.parent=this,this.proxyOf.nodes.push(o),this}removeAll(){for(let o of this.proxyOf.nodes)o.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(o){o=this.index(o),this.proxyOf.nodes[o].parent=void 0,this.proxyOf.nodes.splice(o,1);let m;for(let h in this.indexes)m=this.indexes[h],m>=o&&(this.indexes[h]=m-1);return this.markDirty(),this}replaceValues(o,m,h){return h||(h=m,m={}),this.walkDecls(g=>{m.props&&!m.props.includes(g.prop)||m.fast&&!g.value.includes(m.fast)||(g.value=g.value.replace(o,h));}),this.markDirty(),this}some(o){return this.nodes.some(o)}walk(o){return this.each((m,h)=>{let g;try{g=o(m,h);}catch(v){throw m.addToError(v)}return g!==false&&m.walk&&(g=m.walk(o)),g})}walkAtRules(o,m){return m?o instanceof RegExp?this.walk((h,g)=>{if(h.type==="atrule"&&o.test(h.name))return m(h,g)}):this.walk((h,g)=>{if(h.type==="atrule"&&h.name===o)return m(h,g)}):(m=o,this.walk((h,g)=>{if(h.type==="atrule")return m(h,g)}))}walkComments(o){return this.walk((m,h)=>{if(m.type==="comment")return o(m,h)})}walkDecls(o,m){return m?o instanceof RegExp?this.walk((h,g)=>{if(h.type==="decl"&&o.test(h.prop))return m(h,g)}):this.walk((h,g)=>{if(h.type==="decl"&&h.prop===o)return m(h,g)}):(m=o,this.walk((h,g)=>{if(h.type==="decl")return m(h,g)}))}walkRules(o,m){return m?o instanceof RegExp?this.walk((h,g)=>{if(h.type==="rule"&&o.test(h.selector))return m(h,g)}):this.walk((h,g)=>{if(h.type==="rule"&&h.selector===o)return m(h,g)}):(m=o,this.walk((h,g)=>{if(h.type==="rule")return m(h,g)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}}return f.registerParse=l=>{a=l;},f.registerRule=l=>{c=l;},f.registerAtRule=l=>{p=l;},f.registerRoot=l=>{u=l;},rr=f,f.default=f,f.rebuild=l=>{l.type==="atrule"?Object.setPrototypeOf(l,p.prototype):l.type==="rule"?Object.setPrototypeOf(l,c.prototype):l.type==="decl"?Object.setPrototypeOf(l,r.prototype):l.type==="comment"?Object.setPrototypeOf(l,i.prototype):l.type==="root"&&Object.setPrototypeOf(l,u.prototype),l[t]=true,l.nodes&&l.nodes.forEach(o=>{f.rebuild(o);});},rr}var sr,ii;function fs(){if(ii)return sr;ii=1;let e=xe(),t,r;class i extends e{constructor(a){super({type:"document",...a}),this.nodes||(this.nodes=[]);}toResult(a={}){return new t(new r,this,a).stringify()}}return i.registerLazyResult=s=>{t=s;},i.registerProcessor=s=>{r=s;},sr=i,i.default=i,sr}var ir,ni;function vn(){if(ni)return ir;ni=1;let e={};return ir=function(r){e[r]||(e[r]=true,typeof console<"u"&&console.warn&&console.warn(r));},ir}var nr,oi;function Cn(){if(oi)return nr;oi=1;class e{constructor(r,i={}){if(this.type="warning",this.text=r,i.node&&i.node.source){let s=i.node.rangeBy(i);this.line=s.start.line,this.column=s.start.column,this.endLine=s.end.line,this.endColumn=s.end.column;}for(let s in i)this[s]=i[s];}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}}return nr=e,e.default=e,nr}var or,ai;function ds(){if(ai)return or;ai=1;let e=Cn();class t{constructor(i,s,a){this.processor=i,this.messages=[],this.root=s,this.opts=a,this.css=void 0,this.map=void 0;}toString(){return this.css}warn(i,s={}){s.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(s.plugin=this.lastPlugin.postcssPlugin);let a=new e(i,s);return this.messages.push(a),a}warnings(){return this.messages.filter(i=>i.type==="warning")}get content(){return this.css}}return or=t,t.default=t,or}var ar,li;function $a(){if(li)return ar;li=1;let e=39,t=34,r=92,i=47,s=10,a=32,c=12,p=9,u=13,d=91,n=93,f=40,l=41,o=123,m=125,h=59,g=42,v=58,b=64,S=/[\t\n\f\r "#'()/;[\\\]{}]/g,E=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,w=/.[\r\n"'(/\\]/,y=/[\da-f]/i;return ar=function(x,A={}){let M=x.css.valueOf(),_=A.ignoreErrors,I,R,ce,ie,$,U,Y,Q,X,B,we=M.length,N=0,me=[],le=[];function Ue(){return N}function ee(k){throw x.error("Unclosed "+k,N)}function he(){return le.length===0&&N>=we}function Ee(k){if(le.length)return le.pop();if(N>=we)return;let J=k?k.ignoreUnclosed:false;switch(I=M.charCodeAt(N),I){case s:case a:case p:case u:case c:{R=N;do R+=1,I=M.charCodeAt(R);while(I===a||I===s||I===p||I===u||I===c);B=["space",M.slice(N,R)],N=R-1;break}case d:case n:case o:case m:case v:case h:case l:{let W=String.fromCharCode(I);B=[W,W,N];break}case f:{if(Q=me.length?me.pop()[1]:"",X=M.charCodeAt(N+1),Q==="url"&&X!==e&&X!==t&&X!==a&&X!==s&&X!==p&&X!==c&&X!==u){R=N;do{if(U=false,R=M.indexOf(")",R+1),R===-1)if(_||J){R=N;break}else ee("bracket");for(Y=R;M.charCodeAt(Y-1)===r;)Y-=1,U=!U;}while(U);B=["brackets",M.slice(N,R+1),N,R],N=R;}else R=M.indexOf(")",N+1),ie=M.slice(N,R+1),R===-1||w.test(ie)?B=["(","(",N]:(B=["brackets",ie,N,R],N=R);break}case e:case t:{ce=I===e?"'":'"',R=N;do{if(U=false,R=M.indexOf(ce,R+1),R===-1)if(_||J){R=N+1;break}else ee("string");for(Y=R;M.charCodeAt(Y-1)===r;)Y-=1,U=!U;}while(U);B=["string",M.slice(N,R+1),N,R],N=R;break}case b:{S.lastIndex=N+1,S.test(M),S.lastIndex===0?R=M.length-1:R=S.lastIndex-2,B=["at-word",M.slice(N,R+1),N,R],N=R;break}case r:{for(R=N,$=true;M.charCodeAt(R+1)===r;)R+=1,$=!$;if(I=M.charCodeAt(R+1),$&&I!==i&&I!==a&&I!==s&&I!==p&&I!==u&&I!==c&&(R+=1,y.test(M.charAt(R)))){for(;y.test(M.charAt(R+1));)R+=1;M.charCodeAt(R+1)===a&&(R+=1);}B=["word",M.slice(N,R+1),N,R],N=R;break}default:{I===i&&M.charCodeAt(N+1)===g?(R=M.indexOf("*/",N+2)+1,R===0&&(_||J?R=M.length:ee("comment")),B=["comment",M.slice(N,R+1),N,R],N=R):(E.lastIndex=N+1,E.test(M),E.lastIndex===0?R=M.length-1:R=E.lastIndex-2,B=["word",M.slice(N,R+1),N,R],me.push(B),N=R);break}}return N++,B}function be(k){le.push(k);}return {back:be,endOfFile:he,nextToken:Ee,position:Ue}},ar}var lr,ui;function ps(){if(ui)return lr;ui=1;let e=xe();class t extends e{constructor(i){super(i),this.type="atrule";}append(...i){return this.proxyOf.nodes||(this.nodes=[]),super.append(...i)}prepend(...i){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...i)}}return lr=t,t.default=t,e.registerAtRule(t),lr}var ur,ci;function Ve(){if(ci)return ur;ci=1;let e=xe(),t,r;class i extends e{constructor(a){super(a),this.type="root",this.nodes||(this.nodes=[]);}normalize(a,c,p){let u=super.normalize(a);if(c){if(p==="prepend")this.nodes.length>1?c.raws.before=this.nodes[1].raws.before:delete c.raws.before;else if(this.first!==c)for(let d of u)d.raws.before=c.raws.before;}return u}removeChild(a,c){let p=this.index(a);return !c&&p===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[p].raws.before),super.removeChild(a)}toResult(a={}){return new t(new r,this,a).stringify()}}return i.registerLazyResult=s=>{t=s;},i.registerProcessor=s=>{r=s;},ur=i,i.default=i,e.registerRoot(i),ur}var cr,hi;function En(){if(hi)return cr;hi=1;let e={comma(t){return e.split(t,[","],true)},space(t){let r=[" ",`
24
+ `," "];return e.split(t,r)},split(t,r,i){let s=[],a="",c=false,p=0,u=false,d="",n=false;for(let f of t)n?n=false:f==="\\"?n=true:u?f===d&&(u=false):f==='"'||f==="'"?(u=true,d=f):f==="("?p+=1:f===")"?p>0&&(p-=1):p===0&&r.includes(f)&&(c=true),c?(a!==""&&s.push(a.trim()),a="",c=false):a+=f;return (i||a!=="")&&s.push(a.trim()),s}};return cr=e,e.default=e,cr}var hr,fi;function ms(){if(fi)return hr;fi=1;let e=xe(),t=En();class r extends e{constructor(s){super(s),this.type="rule",this.nodes||(this.nodes=[]);}get selectors(){return t.comma(this.selector)}set selectors(s){let a=this.selector?this.selector.match(/,\s*/):null,c=a?a[0]:","+this.raw("between","beforeOpen");this.selector=s.join(c);}}return hr=r,r.default=r,e.registerRule(r),hr}var fr,di;function Ba(){if(di)return fr;di=1;let e=Rt(),t=$a(),r=Mt(),i=ps(),s=Ve(),a=ms(),c={empty:true,space:true};function p(d){for(let n=d.length-1;n>=0;n--){let f=d[n],l=f[3]||f[2];if(l)return l}}class u{constructor(n){this.input=n,this.root=new s,this.current=this.root,this.spaces="",this.semicolon=false,this.createTokenizer(),this.root.source={input:n,start:{column:1,line:1,offset:0}};}atrule(n){let f=new i;f.name=n[1].slice(1),f.name===""&&this.unnamedAtrule(f,n),this.init(f,n[2]);let l,o,m,h=false,g=false,v=[],b=[];for(;!this.tokenizer.endOfFile();){if(n=this.tokenizer.nextToken(),l=n[0],l==="("||l==="["?b.push(l==="("?")":"]"):l==="{"&&b.length>0?b.push("}"):l===b[b.length-1]&&b.pop(),b.length===0)if(l===";"){f.source.end=this.getPosition(n[2]),f.source.end.offset++,this.semicolon=true;break}else if(l==="{"){g=true;break}else if(l==="}"){if(v.length>0){for(m=v.length-1,o=v[m];o&&o[0]==="space";)o=v[--m];o&&(f.source.end=this.getPosition(o[3]||o[2]),f.source.end.offset++);}this.end(n);break}else v.push(n);else v.push(n);if(this.tokenizer.endOfFile()){h=true;break}}f.raws.between=this.spacesAndCommentsFromEnd(v),v.length?(f.raws.afterName=this.spacesAndCommentsFromStart(v),this.raw(f,"params",v),h&&(n=v[v.length-1],f.source.end=this.getPosition(n[3]||n[2]),f.source.end.offset++,this.spaces=f.raws.between,f.raws.between="")):(f.raws.afterName="",f.params=""),g&&(f.nodes=[],this.current=f);}checkMissedSemicolon(n){let f=this.colon(n);if(f===false)return;let l=0,o;for(let m=f-1;m>=0&&(o=n[m],!(o[0]!=="space"&&(l+=1,l===2)));m--);throw this.input.error("Missed semicolon",o[0]==="word"?o[3]+1:o[2])}colon(n){let f=0,l,o,m;for(let[h,g]of n.entries()){if(l=g,o=l[0],o==="("&&(f+=1),o===")"&&(f-=1),f===0&&o===":")if(!m)this.doubleColon(l);else {if(m[0]==="word"&&m[1]==="progid")continue;return h}m=l;}return false}comment(n){let f=new r;this.init(f,n[2]),f.source.end=this.getPosition(n[3]||n[2]),f.source.end.offset++;let l=n[1].slice(2,-2);if(/^\s*$/.test(l))f.text="",f.raws.left=l,f.raws.right="";else {let o=l.match(/^(\s*)([^]*\S)(\s*)$/);f.text=o[2],f.raws.left=o[1],f.raws.right=o[3];}}createTokenizer(){this.tokenizer=t(this.input);}decl(n,f){let l=new e;this.init(l,n[0][2]);let o=n[n.length-1];for(o[0]===";"&&(this.semicolon=true,n.pop()),l.source.end=this.getPosition(o[3]||o[2]||p(n)),l.source.end.offset++;n[0][0]!=="word";)n.length===1&&this.unknownWord(n),l.raws.before+=n.shift()[1];for(l.source.start=this.getPosition(n[0][2]),l.prop="";n.length;){let b=n[0][0];if(b===":"||b==="space"||b==="comment")break;l.prop+=n.shift()[1];}l.raws.between="";let m;for(;n.length;)if(m=n.shift(),m[0]===":"){l.raws.between+=m[1];break}else m[0]==="word"&&/\w/.test(m[1])&&this.unknownWord([m]),l.raws.between+=m[1];(l.prop[0]==="_"||l.prop[0]==="*")&&(l.raws.before+=l.prop[0],l.prop=l.prop.slice(1));let h=[],g;for(;n.length&&(g=n[0][0],!(g!=="space"&&g!=="comment"));)h.push(n.shift());this.precheckMissedSemicolon(n);for(let b=n.length-1;b>=0;b--){if(m=n[b],m[1].toLowerCase()==="!important"){l.important=true;let S=this.stringFrom(n,b);S=this.spacesFromEnd(n)+S,S!==" !important"&&(l.raws.important=S);break}else if(m[1].toLowerCase()==="important"){let S=n.slice(0),E="";for(let w=b;w>0;w--){let y=S[w][0];if(E.trim().indexOf("!")===0&&y!=="space")break;E=S.pop()[1]+E;}E.trim().indexOf("!")===0&&(l.important=true,l.raws.important=E,n=S);}if(m[0]!=="space"&&m[0]!=="comment")break}n.some(b=>b[0]!=="space"&&b[0]!=="comment")&&(l.raws.between+=h.map(b=>b[1]).join(""),h=[]),this.raw(l,"value",h.concat(n),f),l.value.includes(":")&&!f&&this.checkMissedSemicolon(n);}doubleColon(n){throw this.input.error("Double colon",{offset:n[2]},{offset:n[2]+n[1].length})}emptyRule(n){let f=new a;this.init(f,n[2]),f.selector="",f.raws.between="",this.current=f;}end(n){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=false,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(n[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(n);}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position());}freeSemicolon(n){if(this.spaces+=n[1],this.current.nodes){let f=this.current.nodes[this.current.nodes.length-1];f&&f.type==="rule"&&!f.raws.ownSemicolon&&(f.raws.ownSemicolon=this.spaces,this.spaces="");}}getPosition(n){let f=this.input.fromOffset(n);return {column:f.col,line:f.line,offset:n}}init(n,f){this.current.push(n),n.source={input:this.input,start:this.getPosition(f)},n.raws.before=this.spaces,this.spaces="",n.type!=="comment"&&(this.semicolon=false);}other(n){let f=false,l=null,o=false,m=null,h=[],g=n[1].startsWith("--"),v=[],b=n;for(;b;){if(l=b[0],v.push(b),l==="("||l==="[")m||(m=b),h.push(l==="("?")":"]");else if(g&&o&&l==="{")m||(m=b),h.push("}");else if(h.length===0)if(l===";")if(o){this.decl(v,g);return}else break;else if(l==="{"){this.rule(v);return}else if(l==="}"){this.tokenizer.back(v.pop()),f=true;break}else l===":"&&(o=true);else l===h[h.length-1]&&(h.pop(),h.length===0&&(m=null));b=this.tokenizer.nextToken();}if(this.tokenizer.endOfFile()&&(f=true),h.length>0&&this.unclosedBracket(m),f&&o){if(!g)for(;v.length&&(b=v[v.length-1][0],!(b!=="space"&&b!=="comment"));)this.tokenizer.back(v.pop());this.decl(v,g);}else this.unknownWord(v);}parse(){let n;for(;!this.tokenizer.endOfFile();)switch(n=this.tokenizer.nextToken(),n[0]){case "space":this.spaces+=n[1];break;case ";":this.freeSemicolon(n);break;case "}":this.end(n);break;case "comment":this.comment(n);break;case "at-word":this.atrule(n);break;case "{":this.emptyRule(n);break;default:this.other(n);break}this.endFile();}precheckMissedSemicolon(){}raw(n,f,l,o){let m,h,g=l.length,v="",b=true,S,E;for(let w=0;w<g;w+=1)m=l[w],h=m[0],h==="space"&&w===g-1&&!o?b=false:h==="comment"?(E=l[w-1]?l[w-1][0]:"empty",S=l[w+1]?l[w+1][0]:"empty",!c[E]&&!c[S]?v.slice(-1)===","?b=false:v+=m[1]:b=false):v+=m[1];if(!b){let w=l.reduce((y,C)=>y+C[1],"");n.raws[f]={raw:w,value:v};}n[f]=v;}rule(n){n.pop();let f=new a;this.init(f,n[0][2]),f.raws.between=this.spacesAndCommentsFromEnd(n),this.raw(f,"selector",n),this.current=f;}spacesAndCommentsFromEnd(n){let f,l="";for(;n.length&&(f=n[n.length-1][0],!(f!=="space"&&f!=="comment"));)l=n.pop()[1]+l;return l}spacesAndCommentsFromStart(n){let f,l="";for(;n.length&&(f=n[0][0],!(f!=="space"&&f!=="comment"));)l+=n.shift()[1];return l}spacesFromEnd(n){let f,l="";for(;n.length&&(f=n[n.length-1][0],f==="space");)l=n.pop()[1]+l;return l}stringFrom(n,f){let l="";for(let o=f;o<n.length;o++)l+=n[o][1];return n.splice(f,n.length-f),l}unclosedBlock(){let n=this.current.source.start;throw this.input.error("Unclosed block",n.line,n.column)}unclosedBracket(n){throw this.input.error("Unclosed bracket",{offset:n[2]},{offset:n[2]+1})}unexpectedClose(n){throw this.input.error("Unexpected }",{offset:n[2]},{offset:n[2]+1})}unknownWord(n){throw this.input.error("Unknown word",{offset:n[0][2]},{offset:n[0][2]+n[0][1].length})}unnamedAtrule(n,f){throw this.input.error("At-rule without name",{offset:f[2]},{offset:f[2]+f[1].length})}}return fr=u,fr}var dr,pi;function gs(){if(pi)return dr;pi=1;let e=xe(),t=Ba(),r=xt();function i(s,a){let c=new r(s,a),p=new t(c);try{p.parse();}catch(u){throw process.env.NODE_ENV!=="production"&&u.name==="CssSyntaxError"&&a&&a.from&&(/\.scss$/i.test(a.from)?u.message+=`
25
+ You tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser`:/\.sass/i.test(a.from)?u.message+=`
26
+ You tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser`:/\.less$/i.test(a.from)&&(u.message+=`
27
+ You tried to parse Less with the standard CSS parser; try again with the postcss-less parser`)),u}return p.root}return dr=i,i.default=i,e.registerParse(i),dr}var pr,mi;function Rn(){if(mi)return pr;mi=1;let{isClean:e,my:t}=hs(),r=Sn(),i=Ct(),s=xe(),a=fs(),c=vn(),p=ds(),u=gs(),d=Ve(),n={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},f={AtRule:true,AtRuleExit:true,Comment:true,CommentExit:true,Declaration:true,DeclarationExit:true,Document:true,DocumentExit:true,Once:true,OnceExit:true,postcssPlugin:true,prepare:true,Root:true,RootExit:true,Rule:true,RuleExit:true},l={Once:true,postcssPlugin:true,prepare:true},o=0;function m(E){return typeof E=="object"&&typeof E.then=="function"}function h(E){let w=false,y=n[E.type];return E.type==="decl"?w=E.prop.toLowerCase():E.type==="atrule"&&(w=E.name.toLowerCase()),w&&E.append?[y,y+"-"+w,o,y+"Exit",y+"Exit-"+w]:w?[y,y+"-"+w,y+"Exit",y+"Exit-"+w]:E.append?[y,o,y+"Exit"]:[y,y+"Exit"]}function g(E){let w;return E.type==="document"?w=["Document",o,"DocumentExit"]:E.type==="root"?w=["Root",o,"RootExit"]:w=h(E),{eventIndex:0,events:w,iterator:0,node:E,visitorIndex:0,visitors:[]}}function v(E){return E[e]=false,E.nodes&&E.nodes.forEach(w=>v(w)),E}let b={};class S{constructor(w,y,C){this.stringified=false,this.processed=false;let x;if(typeof y=="object"&&y!==null&&(y.type==="root"||y.type==="document"))x=v(y);else if(y instanceof S||y instanceof p)x=v(y.root),y.map&&(typeof C.map>"u"&&(C.map={}),C.map.inline||(C.map.inline=false),C.map.prev=y.map);else {let A=u;C.syntax&&(A=C.syntax.parse),C.parser&&(A=C.parser),A.parse&&(A=A.parse);try{x=A(y,C);}catch(M){this.processed=true,this.error=M;}x&&!x[t]&&s.rebuild(x);}this.result=new p(w,x,C),this.helpers={...b,postcss:b,result:this.result},this.plugins=this.processor.plugins.map(A=>typeof A=="object"&&A.prepare?{...A,...A.prepare(this.result)}:A);}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(w){return this.async().catch(w)}finally(w){return this.async().then(w,w)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(w,y){let C=this.result.lastPlugin;try{if(y&&y.addToError(w),this.error=w,w.name==="CssSyntaxError"&&!w.plugin)w.plugin=C.postcssPlugin,w.setMessage();else if(C.postcssVersion&&process.env.NODE_ENV!=="production"){let x=C.postcssPlugin,A=C.postcssVersion,M=this.result.processor.version,_=A.split("."),I=M.split(".");(_[0]!==I[0]||parseInt(_[1])>parseInt(I[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+M+", but "+x+" uses "+A+". Perhaps this is the source of the error below.");}}catch(x){console&&console.error&&console.error(x);}return w}prepareVisitors(){this.listeners={};let w=(y,C,x)=>{this.listeners[C]||(this.listeners[C]=[]),this.listeners[C].push([y,x]);};for(let y of this.plugins)if(typeof y=="object")for(let C in y){if(!f[C]&&/^[A-Z]/.test(C))throw new Error(`Unknown event ${C} in ${y.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!l[C])if(typeof y[C]=="object")for(let x in y[C])x==="*"?w(y,C,y[C][x]):w(y,C+"-"+x.toLowerCase(),y[C][x]);else typeof y[C]=="function"&&w(y,C,y[C]);}this.hasListener=Object.keys(this.listeners).length>0;}async runAsync(){this.plugin=0;for(let w=0;w<this.plugins.length;w++){let y=this.plugins[w],C=this.runOnRoot(y);if(m(C))try{await C;}catch(x){throw this.handleError(x)}}if(this.prepareVisitors(),this.hasListener){let w=this.result.root;for(;!w[e];){w[e]=true;let y=[g(w)];for(;y.length>0;){let C=this.visitTick(y);if(m(C))try{await C;}catch(x){let A=y[y.length-1].node;throw this.handleError(x,A)}}}if(this.listeners.OnceExit)for(let[y,C]of this.listeners.OnceExit){this.result.lastPlugin=y;try{if(w.type==="document"){let x=w.nodes.map(A=>C(A,this.helpers));await Promise.all(x);}else await C(w,this.helpers);}catch(x){throw this.handleError(x)}}}return this.processed=true,this.stringify()}runOnRoot(w){this.result.lastPlugin=w;try{if(typeof w=="object"&&w.Once){if(this.result.root.type==="document"){let y=this.result.root.nodes.map(C=>w.Once(C,this.helpers));return m(y[0])?Promise.all(y):y}return w.Once(this.result.root,this.helpers)}else if(typeof w=="function")return w(this.result.root,this.result)}catch(y){throw this.handleError(y)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=true,this.sync();let w=this.result.opts,y=i;w.syntax&&(y=w.syntax.stringify),w.stringifier&&(y=w.stringifier),y.stringify&&(y=y.stringify);let x=new r(y,this.result.root,this.result.opts).generate();return this.result.css=x[0],this.result.map=x[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=true,this.processing)throw this.getAsyncError();for(let w of this.plugins){let y=this.runOnRoot(w);if(m(y))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let w=this.result.root;for(;!w[e];)w[e]=true,this.walkSync(w);if(this.listeners.OnceExit)if(w.type==="document")for(let y of w.nodes)this.visitSync(this.listeners.OnceExit,y);else this.visitSync(this.listeners.OnceExit,w);}return this.result}then(w,y){return process.env.NODE_ENV!=="production"&&("from"in this.opts||c("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(w,y)}toString(){return this.css}visitSync(w,y){for(let[C,x]of w){this.result.lastPlugin=C;let A;try{A=x(y,this.helpers);}catch(M){throw this.handleError(M,y.proxyOf)}if(y.type!=="root"&&y.type!=="document"&&!y.parent)return true;if(m(A))throw this.getAsyncError()}}visitTick(w){let y=w[w.length-1],{node:C,visitors:x}=y;if(C.type!=="root"&&C.type!=="document"&&!C.parent){w.pop();return}if(x.length>0&&y.visitorIndex<x.length){let[M,_]=x[y.visitorIndex];y.visitorIndex+=1,y.visitorIndex===x.length&&(y.visitors=[],y.visitorIndex=0),this.result.lastPlugin=M;try{return _(C.toProxy(),this.helpers)}catch(I){throw this.handleError(I,C)}}if(y.iterator!==0){let M=y.iterator,_;for(;_=C.nodes[C.indexes[M]];)if(C.indexes[M]+=1,!_[e]){_[e]=true,w.push(g(_));return}y.iterator=0,delete C.indexes[M];}let A=y.events;for(;y.eventIndex<A.length;){let M=A[y.eventIndex];if(y.eventIndex+=1,M===o){C.nodes&&C.nodes.length&&(C[e]=true,y.iterator=C.getIterator());return}else if(this.listeners[M]){y.visitors=this.listeners[M];return}}w.pop();}walkSync(w){w[e]=true;let y=h(w);for(let C of y)if(C===o)w.nodes&&w.each(x=>{x[e]||this.walkSync(x);});else {let x=this.listeners[C];if(x&&this.visitSync(x,w.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return "LazyResult"}}return S.registerPostcss=E=>{b=E;},pr=S,S.default=S,d.registerLazyResult(S),a.registerLazyResult(S),pr}var mr,gi;function Wa(){if(gi)return mr;gi=1;let e=Sn(),t=Ct(),r=vn(),i=gs(),s=ds();class a{constructor(p,u,d){u=u.toString(),this.stringified=false,this._processor=p,this._css=u,this._opts=d,this._map=void 0;let n,f=t;this.result=new s(this._processor,n,this._opts),this.result.css=u;let l=this;Object.defineProperty(this.result,"root",{get(){return l.root}});let o=new e(f,n,this._opts,u);if(o.isMap()){let[m,h]=o.generate();m&&(this.result.css=m),h&&(this.result.map=h);}else o.clearAnnotation(),this.result.css=o.css;}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(p){return this.async().catch(p)}finally(p){return this.async().then(p,p)}sync(){if(this.error)throw this.error;return this.result}then(p,u){return process.env.NODE_ENV!=="production"&&("from"in this._opts||r("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(p,u)}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 p,u=i;try{p=u(this._css,this._opts);}catch(d){this.error=d;}if(this.error)throw this.error;return this._root=p,p}get[Symbol.toStringTag](){return "NoWorkResult"}}return mr=a,a.default=a,mr}var gr,yi;function za(){if(yi)return gr;yi=1;let e=Wa(),t=Rn(),r=fs(),i=Ve();class s{constructor(c=[]){this.version="8.4.38",this.plugins=this.normalize(c);}normalize(c){let p=[];for(let u of c)if(u.postcss===true?u=u():u.postcss&&(u=u.postcss),typeof u=="object"&&Array.isArray(u.plugins))p=p.concat(u.plugins);else if(typeof u=="object"&&u.postcssPlugin)p.push(u);else if(typeof u=="function")p.push(u);else if(typeof u=="object"&&(u.parse||u.stringify)){if(process.env.NODE_ENV!=="production")throw new Error("PostCSS syntaxes cannot be used as plugins. Instead, please use one of the syntax/parser/stringifier options as outlined in your PostCSS runner documentation.")}else throw new Error(u+" is not a PostCSS plugin");return p}process(c,p={}){return !this.plugins.length&&!p.parser&&!p.stringifier&&!p.syntax?new e(this,c,p):new t(this,c,p)}use(c){return this.plugins=this.plugins.concat(this.normalize([c])),this}}return gr=s,s.default=s,i.registerProcessor(s),r.registerProcessor(s),gr}var yr,wi;function qa(){if(wi)return yr;wi=1;let e=Rt(),t=bn(),r=Mt(),i=ps(),s=xt(),a=Ve(),c=ms();function p(u,d){if(Array.isArray(u))return u.map(l=>p(l));let{inputs:n,...f}=u;if(n){d=[];for(let l of n){let o={...l,__proto__:s.prototype};o.map&&(o.map={...o.map,__proto__:t.prototype}),d.push(o);}}if(f.nodes&&(f.nodes=u.nodes.map(l=>p(l,d))),f.source){let{inputId:l,...o}=f.source;f.source=o,l!=null&&(f.source.input=d[l]);}if(f.type==="root")return new a(f);if(f.type==="decl")return new e(f);if(f.type==="rule")return new c(f);if(f.type==="comment")return new r(f);if(f.type==="atrule")return new i(f);throw new Error("Unknown node type: "+u.type)}return yr=p,p.default=p,yr}var wr,bi;function Ha(){if(bi)return wr;bi=1;let e=cs(),t=Rt(),r=Rn(),i=xe(),s=za(),a=Ct(),c=qa(),p=fs(),u=Cn(),d=Mt(),n=ps(),f=ds(),l=xt(),o=gs(),m=En(),h=ms(),g=Ve(),v=Et();function b(...S){return S.length===1&&Array.isArray(S[0])&&(S=S[0]),new s(S)}return b.plugin=function(E,w){let y=false;function C(...A){console&&console.warn&&!y&&(y=true,console.warn(E+`: postcss.plugin was deprecated. Migration guide:
28
+ 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:
29
+ https://www.w3ctech.com/topic/2226`));let M=w(...A);return M.postcssPlugin=E,M.postcssVersion=new s().version,M}let x;return Object.defineProperty(C,"postcss",{get(){return x||(x=C()),x}}),C.process=function(A,M,_){return b([C(_)]).process(A,M)},C},b.stringify=a,b.parse=o,b.fromJSON=c,b.list=m,b.comment=S=>new d(S),b.atRule=S=>new n(S),b.decl=S=>new t(S),b.rule=S=>new h(S),b.root=S=>new g(S),b.document=S=>new p(S),b.CssSyntaxError=e,b.Declaration=t,b.Container=i,b.Processor=s,b.Document=p,b.Comment=d,b.Warning=u,b.AtRule=n,b.Result=f,b.Input=l,b.Rule=h,b.Root=g,b.Node=v,r.registerPostcss(b),wr=b,b.default=b,wr}var ja=Ha(),H=Ta(ja);H.stringify;H.fromJSON;H.plugin;H.parse;H.list;H.document;H.comment;H.atRule;H.rule;H.decl;H.root;H.CssSyntaxError;H.Declaration;H.Container;H.Processor;H.Document;H.Comment;H.Warning;H.AtRule;H.Result;H.Input;H.Rule;H.Root;H.Node;var Va=Object.defineProperty,Ga=(e,t,r)=>t in e?Va(e,t,{enumerable:true,configurable:true,writable:true,value:r}):e[t]=r,ue=(e,t,r)=>Ga(e,typeof t!="symbol"?t+"":t,r);Date.now().toString();function Ya(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Xa(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var r=function i(){return this instanceof i?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype;}else r={};return Object.defineProperty(r,"__esModule",{value:true}),Object.keys(e).forEach(function(i){var s=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(r,i,s.get?s:{enumerable:true,get:function(){return e[i]}});}),r}var ot={exports:{}},Si;function Ja(){if(Si)return ot.exports;Si=1;var e=String,t=function(){return {isColorSupported:false,reset:e,bold:e,dim:e,italic:e,underline:e,inverse:e,hidden:e,strikethrough:e,black:e,red:e,green:e,yellow:e,blue:e,magenta:e,cyan:e,white:e,gray:e,bgBlack:e,bgRed:e,bgGreen:e,bgYellow:e,bgBlue:e,bgMagenta:e,bgCyan:e,bgWhite:e}};return ot.exports=t(),ot.exports.createColors=t,ot.exports}var Ka={},Qa=Object.freeze(Object.defineProperty({__proto__:null,default:Ka},Symbol.toStringTag,{value:"Module"})),pe=Xa(Qa),br,vi;function ys(){if(vi)return br;vi=1;let e=Ja(),t=pe;class r extends Error{constructor(s,a,c,p,u,d){super(s),this.name="CssSyntaxError",this.reason=s,u&&(this.file=u),p&&(this.source=p),d&&(this.plugin=d),typeof a<"u"&&typeof c<"u"&&(typeof a=="number"?(this.line=a,this.column=c):(this.line=a.line,this.column=a.column,this.endLine=c.line,this.endColumn=c.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,r);}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason;}showSourceCode(s){if(!this.source)return "";let a=this.source;s==null&&(s=e.isColorSupported),t&&s&&(a=t(a));let c=a.split(/\r?\n/),p=Math.max(this.line-3,0),u=Math.min(this.line+2,c.length),d=String(u).length,n,f;if(s){let{bold:l,gray:o,red:m}=e.createColors(true);n=h=>l(m(h)),f=h=>o(h);}else n=f=l=>l;return c.slice(p,u).map((l,o)=>{let m=p+1+o,h=" "+(" "+m).slice(-d)+" | ";if(m===this.line){let g=f(h.replace(/\d/g," "))+l.slice(0,this.column-1).replace(/[^\t]/g," ");return n(">")+f(h)+l+`
30
+ `+g+n("^")}return " "+f(h)+l}).join(`
31
+ `)}toString(){let s=this.showSourceCode();return s&&(s=`
32
+
33
+ `+s+`
34
+ `),this.name+": "+this.message+s}}return br=r,r.default=r,br}var at={},Ci;function ws(){return Ci||(Ci=1,at.isClean=Symbol("isClean"),at.my=Symbol("my")),at}var Sr,Ei;function xn(){if(Ei)return Sr;Ei=1;let e={after:`
35
+ `,beforeClose:`
36
+ `,beforeComment:`
37
+ `,beforeDecl:`
38
+ `,beforeOpen:" ",beforeRule:`
39
+ `,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:false};function t(i){return i[0].toUpperCase()+i.slice(1)}class r{constructor(s){this.builder=s;}atrule(s,a){let c="@"+s.name,p=s.params?this.rawValue(s,"params"):"";if(typeof s.raws.afterName<"u"?c+=s.raws.afterName:p&&(c+=" "),s.nodes)this.block(s,c+p);else {let u=(s.raws.between||"")+(a?";":"");this.builder(c+p+u,s);}}beforeAfter(s,a){let c;s.type==="decl"?c=this.raw(s,null,"beforeDecl"):s.type==="comment"?c=this.raw(s,null,"beforeComment"):a==="before"?c=this.raw(s,null,"beforeRule"):c=this.raw(s,null,"beforeClose");let p=s.parent,u=0;for(;p&&p.type!=="root";)u+=1,p=p.parent;if(c.includes(`
40
+ `)){let d=this.raw(s,null,"indent");if(d.length)for(let n=0;n<u;n++)c+=d;}return c}block(s,a){let c=this.raw(s,"between","beforeOpen");this.builder(a+c+"{",s,"start");let p;s.nodes&&s.nodes.length?(this.body(s),p=this.raw(s,"after")):p=this.raw(s,"after","emptyBody"),p&&this.builder(p),this.builder("}",s,"end");}body(s){let a=s.nodes.length-1;for(;a>0&&s.nodes[a].type==="comment";)a-=1;let c=this.raw(s,"semicolon");for(let p=0;p<s.nodes.length;p++){let u=s.nodes[p],d=this.raw(u,"before");d&&this.builder(d),this.stringify(u,a!==p||c);}}comment(s){let a=this.raw(s,"left","commentLeft"),c=this.raw(s,"right","commentRight");this.builder("/*"+a+s.text+c+"*/",s);}decl(s,a){let c=this.raw(s,"between","colon"),p=s.prop+c+this.rawValue(s,"value");s.important&&(p+=s.raws.important||" !important"),a&&(p+=";"),this.builder(p,s);}document(s){this.body(s);}raw(s,a,c){let p;if(c||(c=a),a&&(p=s.raws[a],typeof p<"u"))return p;let u=s.parent;if(c==="before"&&(!u||u.type==="root"&&u.first===s||u&&u.type==="document"))return "";if(!u)return e[c];let d=s.root();if(d.rawCache||(d.rawCache={}),typeof d.rawCache[c]<"u")return d.rawCache[c];if(c==="before"||c==="after")return this.beforeAfter(s,c);{let n="raw"+t(c);this[n]?p=this[n](d,s):d.walk(f=>{if(p=f.raws[a],typeof p<"u")return false});}return typeof p>"u"&&(p=e[c]),d.rawCache[c]=p,p}rawBeforeClose(s){let a;return s.walk(c=>{if(c.nodes&&c.nodes.length>0&&typeof c.raws.after<"u")return a=c.raws.after,a.includes(`
41
+ `)&&(a=a.replace(/[^\n]+$/,"")),false}),a&&(a=a.replace(/\S/g,"")),a}rawBeforeComment(s,a){let c;return s.walkComments(p=>{if(typeof p.raws.before<"u")return c=p.raws.before,c.includes(`
42
+ `)&&(c=c.replace(/[^\n]+$/,"")),false}),typeof c>"u"?c=this.raw(a,null,"beforeDecl"):c&&(c=c.replace(/\S/g,"")),c}rawBeforeDecl(s,a){let c;return s.walkDecls(p=>{if(typeof p.raws.before<"u")return c=p.raws.before,c.includes(`
43
+ `)&&(c=c.replace(/[^\n]+$/,"")),false}),typeof c>"u"?c=this.raw(a,null,"beforeRule"):c&&(c=c.replace(/\S/g,"")),c}rawBeforeOpen(s){let a;return s.walk(c=>{if(c.type!=="decl"&&(a=c.raws.between,typeof a<"u"))return false}),a}rawBeforeRule(s){let a;return s.walk(c=>{if(c.nodes&&(c.parent!==s||s.first!==c)&&typeof c.raws.before<"u")return a=c.raws.before,a.includes(`
44
+ `)&&(a=a.replace(/[^\n]+$/,"")),false}),a&&(a=a.replace(/\S/g,"")),a}rawColon(s){let a;return s.walkDecls(c=>{if(typeof c.raws.between<"u")return a=c.raws.between.replace(/[^\s:]/g,""),false}),a}rawEmptyBody(s){let a;return s.walk(c=>{if(c.nodes&&c.nodes.length===0&&(a=c.raws.after,typeof a<"u"))return false}),a}rawIndent(s){if(s.raws.indent)return s.raws.indent;let a;return s.walk(c=>{let p=c.parent;if(p&&p!==s&&p.parent&&p.parent===s&&typeof c.raws.before<"u"){let u=c.raws.before.split(`
45
+ `);return a=u[u.length-1],a=a.replace(/\S/g,""),false}}),a}rawSemicolon(s){let a;return s.walk(c=>{if(c.nodes&&c.nodes.length&&c.last.type==="decl"&&(a=c.raws.semicolon,typeof a<"u"))return false}),a}rawValue(s,a){let c=s[a],p=s.raws[a];return p&&p.value===c?p.raw:c}root(s){this.body(s),s.raws.after&&this.builder(s.raws.after);}rule(s){this.block(s,this.rawValue(s,"selector")),s.raws.ownSemicolon&&this.builder(s.raws.ownSemicolon,s,"end");}stringify(s,a){if(!this[s.type])throw new Error("Unknown AST node type "+s.type+". Maybe you need to change PostCSS stringifier.");this[s.type](s,a);}}return Sr=r,r.default=r,Sr}var vr,Ri;function Nt(){if(Ri)return vr;Ri=1;let e=xn();function t(r,i){new e(i).stringify(r);}return vr=t,t.default=t,vr}var Cr,xi;function At(){if(xi)return Cr;xi=1;let{isClean:e,my:t}=ws(),r=ys(),i=xn(),s=Nt();function a(p,u){let d=new p.constructor;for(let n in p){if(!Object.prototype.hasOwnProperty.call(p,n)||n==="proxyCache")continue;let f=p[n],l=typeof f;n==="parent"&&l==="object"?u&&(d[n]=u):n==="source"?d[n]=f:Array.isArray(f)?d[n]=f.map(o=>a(o,d)):(l==="object"&&f!==null&&(f=a(f)),d[n]=f);}return d}class c{constructor(u={}){this.raws={},this[e]=false,this[t]=true;for(let d in u)if(d==="nodes"){this.nodes=[];for(let n of u[d])typeof n.clone=="function"?this.append(n.clone()):this.append(n);}else this[d]=u[d];}addToError(u){if(u.postcssNode=this,u.stack&&this.source&&/\n\s{4}at /.test(u.stack)){let d=this.source;u.stack=u.stack.replace(/\n\s{4}at /,`$&${d.input.from}:${d.start.line}:${d.start.column}$&`);}return u}after(u){return this.parent.insertAfter(this,u),this}assign(u={}){for(let d in u)this[d]=u[d];return this}before(u){return this.parent.insertBefore(this,u),this}cleanRaws(u){delete this.raws.before,delete this.raws.after,u||delete this.raws.between;}clone(u={}){let d=a(this);for(let n in u)d[n]=u[n];return d}cloneAfter(u={}){let d=this.clone(u);return this.parent.insertAfter(this,d),d}cloneBefore(u={}){let d=this.clone(u);return this.parent.insertBefore(this,d),d}error(u,d={}){if(this.source){let{end:n,start:f}=this.rangeBy(d);return this.source.input.error(u,{column:f.column,line:f.line},{column:n.column,line:n.line},d)}return new r(u)}getProxyProcessor(){return {get(u,d){return d==="proxyOf"?u:d==="root"?()=>u.root().toProxy():u[d]},set(u,d,n){return u[d]===n||(u[d]=n,(d==="prop"||d==="value"||d==="name"||d==="params"||d==="important"||d==="text")&&u.markDirty()),true}}}markDirty(){if(this[e]){this[e]=false;let u=this;for(;u=u.parent;)u[e]=false;}}next(){if(!this.parent)return;let u=this.parent.index(this);return this.parent.nodes[u+1]}positionBy(u,d){let n=this.source.start;if(u.index)n=this.positionInside(u.index,d);else if(u.word){d=this.toString();let f=d.indexOf(u.word);f!==-1&&(n=this.positionInside(f,d));}return n}positionInside(u,d){let n=d||this.toString(),f=this.source.start.column,l=this.source.start.line;for(let o=0;o<u;o++)n[o]===`
46
+ `?(f=1,l+=1):f+=1;return {column:f,line:l}}prev(){if(!this.parent)return;let u=this.parent.index(this);return this.parent.nodes[u-1]}rangeBy(u){let d={column:this.source.start.column,line:this.source.start.line},n=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:d.column+1,line:d.line};if(u.word){let f=this.toString(),l=f.indexOf(u.word);l!==-1&&(d=this.positionInside(l,f),n=this.positionInside(l+u.word.length,f));}else u.start?d={column:u.start.column,line:u.start.line}:u.index&&(d=this.positionInside(u.index)),u.end?n={column:u.end.column,line:u.end.line}:typeof u.endIndex=="number"?n=this.positionInside(u.endIndex):u.index&&(n=this.positionInside(u.index+1));return (n.line<d.line||n.line===d.line&&n.column<=d.column)&&(n={column:d.column+1,line:d.line}),{end:n,start:d}}raw(u,d){return new i().raw(this,u,d)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...u){if(this.parent){let d=this,n=false;for(let f of u)f===this?n=true:n?(this.parent.insertAfter(d,f),d=f):this.parent.insertBefore(d,f);n||this.remove();}return this}root(){let u=this;for(;u.parent&&u.parent.type!=="document";)u=u.parent;return u}toJSON(u,d){let n={},f=d==null;d=d||new Map;let l=0;for(let o in this){if(!Object.prototype.hasOwnProperty.call(this,o)||o==="parent"||o==="proxyCache")continue;let m=this[o];if(Array.isArray(m))n[o]=m.map(h=>typeof h=="object"&&h.toJSON?h.toJSON(null,d):h);else if(typeof m=="object"&&m.toJSON)n[o]=m.toJSON(null,d);else if(o==="source"){let h=d.get(m.input);h==null&&(h=l,d.set(m.input,l),l++),n[o]={end:m.end,inputId:h,start:m.start};}else n[o]=m;}return f&&(n.inputs=[...d.keys()].map(o=>o.toJSON())),n}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(u=s){u.stringify&&(u=u.stringify);let d="";return u(this,n=>{d+=n;}),d}warn(u,d,n){let f={node:this};for(let l in n)f[l]=n[l];return u.warn(d,f)}get proxyOf(){return this}}return Cr=c,c.default=c,Cr}var Er,Mi;function Ot(){if(Mi)return Er;Mi=1;let e=At();class t extends e{constructor(i){i&&typeof i.value<"u"&&typeof i.value!="string"&&(i={...i,value:String(i.value)}),super(i),this.type="decl";}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}}return Er=t,t.default=t,Er}var Rr,Ni;function Za(){if(Ni)return Rr;Ni=1;let e="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";return Rr={nanoid:(i=21)=>{let s="",a=i;for(;a--;)s+=e[Math.random()*64|0];return s},customAlphabet:(i,s=21)=>(a=s)=>{let c="",p=a;for(;p--;)c+=i[Math.random()*i.length|0];return c}},Rr}var xr,Ai;function Mn(){if(Ai)return xr;Ai=1;let{SourceMapConsumer:e,SourceMapGenerator:t}=pe,{existsSync:r,readFileSync:i}=pe,{dirname:s,join:a}=pe;function c(u){return Buffer?Buffer.from(u,"base64").toString():window.atob(u)}class p{constructor(d,n){if(n.map===false)return;this.loadAnnotation(d),this.inline=this.startWith(this.annotation,"data:");let f=n.map?n.map.prev:void 0,l=this.loadMap(n.from,f);!this.mapFile&&n.from&&(this.mapFile=n.from),this.mapFile&&(this.root=s(this.mapFile)),l&&(this.text=l);}consumer(){return this.consumerCache||(this.consumerCache=new e(this.text)),this.consumerCache}decodeInline(d){let n=/^data:application\/json;charset=utf-?8;base64,/,f=/^data:application\/json;base64,/,l=/^data:application\/json;charset=utf-?8,/,o=/^data:application\/json,/;if(l.test(d)||o.test(d))return decodeURIComponent(d.substr(RegExp.lastMatch.length));if(n.test(d)||f.test(d))return c(d.substr(RegExp.lastMatch.length));let m=d.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+m)}getAnnotationURL(d){return d.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(d){return typeof d!="object"?false:typeof d.mappings=="string"||typeof d._mappings=="string"||Array.isArray(d.sections)}loadAnnotation(d){let n=d.match(/\/\*\s*# sourceMappingURL=/gm);if(!n)return;let f=d.lastIndexOf(n.pop()),l=d.indexOf("*/",f);f>-1&&l>-1&&(this.annotation=this.getAnnotationURL(d.substring(f,l)));}loadFile(d){if(this.root=s(d),r(d))return this.mapFile=d,i(d,"utf-8").toString().trim()}loadMap(d,n){if(n===false)return false;if(n){if(typeof n=="string")return n;if(typeof n=="function"){let f=n(d);if(f){let l=this.loadFile(f);if(!l)throw new Error("Unable to load previous source map: "+f.toString());return l}}else {if(n instanceof e)return t.fromSourceMap(n).toString();if(n instanceof t)return n.toString();if(this.isMap(n))return JSON.stringify(n);throw new Error("Unsupported previous source map format: "+n.toString())}}else {if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let f=this.annotation;return d&&(f=a(s(d),f)),this.loadFile(f)}}}startWith(d,n){return d?d.substr(0,n.length)===n:false}withContent(){return !!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}}return xr=p,p.default=p,xr}var Mr,Oi;function It(){if(Oi)return Mr;Oi=1;let{SourceMapConsumer:e,SourceMapGenerator:t}=pe,{fileURLToPath:r,pathToFileURL:i}=pe,{isAbsolute:s,resolve:a}=pe,{nanoid:c}=Za(),p=pe,u=ys(),d=Mn(),n=Symbol("fromOffsetCache"),f=!!(e&&t),l=!!(a&&s);class o{constructor(h,g={}){if(h===null||typeof h>"u"||typeof h=="object"&&!h.toString)throw new Error(`PostCSS received ${h} instead of CSS string`);if(this.css=h.toString(),this.css[0]==="\uFEFF"||this.css[0]==="\uFFFE"?(this.hasBOM=true,this.css=this.css.slice(1)):this.hasBOM=false,g.from&&(!l||/^\w+:\/\//.test(g.from)||s(g.from)?this.file=g.from:this.file=a(g.from)),l&&f){let v=new d(this.css,g);if(v.text){this.map=v;let b=v.consumer().file;!this.file&&b&&(this.file=this.mapResolve(b));}}this.file||(this.id="<input css "+c(6)+">"),this.map&&(this.map.file=this.from);}error(h,g,v,b={}){let S,E,w;if(g&&typeof g=="object"){let C=g,x=v;if(typeof C.offset=="number"){let A=this.fromOffset(C.offset);g=A.line,v=A.col;}else g=C.line,v=C.column;if(typeof x.offset=="number"){let A=this.fromOffset(x.offset);E=A.line,w=A.col;}else E=x.line,w=x.column;}else if(!v){let C=this.fromOffset(g);g=C.line,v=C.col;}let y=this.origin(g,v,E,w);return y?S=new u(h,y.endLine===void 0?y.line:{column:y.column,line:y.line},y.endLine===void 0?y.column:{column:y.endColumn,line:y.endLine},y.source,y.file,b.plugin):S=new u(h,E===void 0?g:{column:v,line:g},E===void 0?v:{column:w,line:E},this.css,this.file,b.plugin),S.input={column:v,endColumn:w,endLine:E,line:g,source:this.css},this.file&&(i&&(S.input.url=i(this.file).toString()),S.input.file=this.file),S}fromOffset(h){let g,v;if(this[n])v=this[n];else {let S=this.css.split(`
47
+ `);v=new Array(S.length);let E=0;for(let w=0,y=S.length;w<y;w++)v[w]=E,E+=S[w].length+1;this[n]=v;}g=v[v.length-1];let b=0;if(h>=g)b=v.length-1;else {let S=v.length-2,E;for(;b<S;)if(E=b+(S-b>>1),h<v[E])S=E-1;else if(h>=v[E+1])b=E+1;else {b=E;break}}return {col:h-v[b]+1,line:b+1}}mapResolve(h){return /^\w+:\/\//.test(h)?h:a(this.map.consumer().sourceRoot||this.map.root||".",h)}origin(h,g,v,b){if(!this.map)return false;let S=this.map.consumer(),E=S.originalPositionFor({column:g,line:h});if(!E.source)return false;let w;typeof v=="number"&&(w=S.originalPositionFor({column:b,line:v}));let y;s(E.source)?y=i(E.source):y=new URL(E.source,this.map.consumer().sourceRoot||i(this.map.mapFile));let C={column:E.column,endColumn:w&&w.column,endLine:w&&w.line,line:E.line,url:y.toString()};if(y.protocol==="file:")if(r)C.file=r(y);else throw new Error("file: protocol is not available in this PostCSS build");let x=S.sourceContentFor(E.source);return x&&(C.source=x),C}toJSON(){let h={};for(let g of ["hasBOM","css","file","id"])this[g]!=null&&(h[g]=this[g]);return this.map&&(h.map={...this.map},h.map.consumerCache&&(h.map.consumerCache=void 0)),h}get from(){return this.file||this.id}}return Mr=o,o.default=o,p&&p.registerInput&&p.registerInput(o),Mr}var Nr,Ii;function Nn(){if(Ii)return Nr;Ii=1;let{SourceMapConsumer:e,SourceMapGenerator:t}=pe,{dirname:r,relative:i,resolve:s,sep:a}=pe,{pathToFileURL:c}=pe,p=It(),u=!!(e&&t),d=!!(r&&s&&i&&a);class n{constructor(l,o,m,h){this.stringify=l,this.mapOpts=m.map||{},this.root=o,this.opts=m,this.css=h,this.originalCSS=h,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map;}addAnnotation(){let l;this.isInline()?l="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?l=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?l=this.mapOpts.annotation(this.opts.to,this.root):l=this.outputFile()+".map";let o=`
48
+ `;this.css.includes(`\r
49
+ `)&&(o=`\r
50
+ `),this.css+=o+"/*# sourceMappingURL="+l+" */";}applyPrevMaps(){for(let l of this.previous()){let o=this.toUrl(this.path(l.file)),m=l.root||r(l.file),h;this.mapOpts.sourcesContent===false?(h=new e(l.text),h.sourcesContent&&(h.sourcesContent=null)):h=l.consumer(),this.map.applySourceMap(h,o,this.toUrl(this.path(m)));}}clearAnnotation(){if(this.mapOpts.annotation!==false)if(this.root){let l;for(let o=this.root.nodes.length-1;o>=0;o--)l=this.root.nodes[o],l.type==="comment"&&l.text.indexOf("# sourceMappingURL=")===0&&this.root.removeChild(o);}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""));}generate(){if(this.clearAnnotation(),d&&u&&this.isMap())return this.generateMap();{let l="";return this.stringify(this.root,o=>{l+=o;}),[l]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let l=this.previous()[0].consumer();l.file=this.outputFile(),this.map=t.fromSourceMap(l,{ignoreInvalidMapping:true});}else this.map=new t({file:this.outputFile(),ignoreInvalidMapping:true}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css="",this.map=new t({file:this.outputFile(),ignoreInvalidMapping:true});let l=1,o=1,m="<no source>",h={generated:{column:0,line:0},original:{column:0,line:0},source:""},g,v;this.stringify(this.root,(b,S,E)=>{if(this.css+=b,S&&E!=="end"&&(h.generated.line=l,h.generated.column=o-1,S.source&&S.source.start?(h.source=this.sourcePath(S),h.original.line=S.source.start.line,h.original.column=S.source.start.column-1,this.map.addMapping(h)):(h.source=m,h.original.line=1,h.original.column=0,this.map.addMapping(h))),g=b.match(/\n/g),g?(l+=g.length,v=b.lastIndexOf(`
51
+ `),o=b.length-v):o+=b.length,S&&E!=="start"){let w=S.parent||{raws:{}};(!(S.type==="decl"||S.type==="atrule"&&!S.nodes)||S!==w.last||w.raws.semicolon)&&(S.source&&S.source.end?(h.source=this.sourcePath(S),h.original.line=S.source.end.line,h.original.column=S.source.end.column-1,h.generated.line=l,h.generated.column=o-2,this.map.addMapping(h)):(h.source=m,h.original.line=1,h.original.column=0,h.generated.line=l,h.generated.column=o-1,this.map.addMapping(h)));}});}isAnnotation(){return this.isInline()?true:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(l=>l.annotation):true}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let l=this.mapOpts.annotation;return typeof l<"u"&&l!==true?false:this.previous().length?this.previous().some(o=>o.inline):true}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(l=>l.withContent()):true}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(l){if(this.mapOpts.absolute||l.charCodeAt(0)===60||/^\w+:\/\//.test(l))return l;let o=this.memoizedPaths.get(l);if(o)return o;let m=this.opts.to?r(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(m=r(s(m,this.mapOpts.annotation)));let h=i(m,l);return this.memoizedPaths.set(l,h),h}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(l=>{if(l.source&&l.source.input.map){let o=l.source.input.map;this.previousMaps.includes(o)||this.previousMaps.push(o);}});else {let l=new p(this.originalCSS,this.opts);l.map&&this.previousMaps.push(l.map);}return this.previousMaps}setSourcesContent(){let l={};if(this.root)this.root.walk(o=>{if(o.source){let m=o.source.input.from;if(m&&!l[m]){l[m]=true;let h=this.usesFileUrls?this.toFileUrl(m):this.toUrl(this.path(m));this.map.setSourceContent(h,o.source.input.css);}}});else if(this.css){let o=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(o,this.css);}}sourcePath(l){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(l.source.input.from):this.toUrl(this.path(l.source.input.from))}toBase64(l){return Buffer?Buffer.from(l).toString("base64"):window.btoa(unescape(encodeURIComponent(l)))}toFileUrl(l){let o=this.memoizedFileURLs.get(l);if(o)return o;if(c){let m=c(l).toString();return this.memoizedFileURLs.set(l,m),m}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(l){let o=this.memoizedURLs.get(l);if(o)return o;a==="\\"&&(l=l.replace(/\\/g,"/"));let m=encodeURI(l).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(l,m),m}}return Nr=n,Nr}var Ar,_i;function _t(){if(_i)return Ar;_i=1;let e=At();class t extends e{constructor(i){super(i),this.type="comment";}}return Ar=t,t.default=t,Ar}var Or,ki;function Me(){if(ki)return Or;ki=1;let{isClean:e,my:t}=ws(),r=Ot(),i=_t(),s=At(),a,c,p,u;function d(l){return l.map(o=>(o.nodes&&(o.nodes=d(o.nodes)),delete o.source,o))}function n(l){if(l[e]=false,l.proxyOf.nodes)for(let o of l.proxyOf.nodes)n(o);}class f extends s{append(...o){for(let m of o){let h=this.normalize(m,this.last);for(let g of h)this.proxyOf.nodes.push(g);}return this.markDirty(),this}cleanRaws(o){if(super.cleanRaws(o),this.nodes)for(let m of this.nodes)m.cleanRaws(o);}each(o){if(!this.proxyOf.nodes)return;let m=this.getIterator(),h,g;for(;this.indexes[m]<this.proxyOf.nodes.length&&(h=this.indexes[m],g=o(this.proxyOf.nodes[h],h),g!==false);)this.indexes[m]+=1;return delete this.indexes[m],g}every(o){return this.nodes.every(o)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let o=this.lastEach;return this.indexes[o]=0,o}getProxyProcessor(){return {get(o,m){return m==="proxyOf"?o:o[m]?m==="each"||typeof m=="string"&&m.startsWith("walk")?(...h)=>o[m](...h.map(g=>typeof g=="function"?(v,b)=>g(v.toProxy(),b):g)):m==="every"||m==="some"?h=>o[m]((g,...v)=>h(g.toProxy(),...v)):m==="root"?()=>o.root().toProxy():m==="nodes"?o.nodes.map(h=>h.toProxy()):m==="first"||m==="last"?o[m].toProxy():o[m]:o[m]},set(o,m,h){return o[m]===h||(o[m]=h,(m==="name"||m==="params"||m==="selector")&&o.markDirty()),true}}}index(o){return typeof o=="number"?o:(o.proxyOf&&(o=o.proxyOf),this.proxyOf.nodes.indexOf(o))}insertAfter(o,m){let h=this.index(o),g=this.normalize(m,this.proxyOf.nodes[h]).reverse();h=this.index(o);for(let b of g)this.proxyOf.nodes.splice(h+1,0,b);let v;for(let b in this.indexes)v=this.indexes[b],h<v&&(this.indexes[b]=v+g.length);return this.markDirty(),this}insertBefore(o,m){let h=this.index(o),g=h===0?"prepend":false,v=this.normalize(m,this.proxyOf.nodes[h],g).reverse();h=this.index(o);for(let S of v)this.proxyOf.nodes.splice(h,0,S);let b;for(let S in this.indexes)b=this.indexes[S],h<=b&&(this.indexes[S]=b+v.length);return this.markDirty(),this}normalize(o,m){if(typeof o=="string")o=d(a(o).nodes);else if(typeof o>"u")o=[];else if(Array.isArray(o)){o=o.slice(0);for(let g of o)g.parent&&g.parent.removeChild(g,"ignore");}else if(o.type==="root"&&this.type!=="document"){o=o.nodes.slice(0);for(let g of o)g.parent&&g.parent.removeChild(g,"ignore");}else if(o.type)o=[o];else if(o.prop){if(typeof o.value>"u")throw new Error("Value field is missed in node creation");typeof o.value!="string"&&(o.value=String(o.value)),o=[new r(o)];}else if(o.selector)o=[new c(o)];else if(o.name)o=[new p(o)];else if(o.text)o=[new i(o)];else throw new Error("Unknown node type in node creation");return o.map(g=>(g[t]||f.rebuild(g),g=g.proxyOf,g.parent&&g.parent.removeChild(g),g[e]&&n(g),typeof g.raws.before>"u"&&m&&typeof m.raws.before<"u"&&(g.raws.before=m.raws.before.replace(/\S/g,"")),g.parent=this.proxyOf,g))}prepend(...o){o=o.reverse();for(let m of o){let h=this.normalize(m,this.first,"prepend").reverse();for(let g of h)this.proxyOf.nodes.unshift(g);for(let g in this.indexes)this.indexes[g]=this.indexes[g]+h.length;}return this.markDirty(),this}push(o){return o.parent=this,this.proxyOf.nodes.push(o),this}removeAll(){for(let o of this.proxyOf.nodes)o.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(o){o=this.index(o),this.proxyOf.nodes[o].parent=void 0,this.proxyOf.nodes.splice(o,1);let m;for(let h in this.indexes)m=this.indexes[h],m>=o&&(this.indexes[h]=m-1);return this.markDirty(),this}replaceValues(o,m,h){return h||(h=m,m={}),this.walkDecls(g=>{m.props&&!m.props.includes(g.prop)||m.fast&&!g.value.includes(m.fast)||(g.value=g.value.replace(o,h));}),this.markDirty(),this}some(o){return this.nodes.some(o)}walk(o){return this.each((m,h)=>{let g;try{g=o(m,h);}catch(v){throw m.addToError(v)}return g!==false&&m.walk&&(g=m.walk(o)),g})}walkAtRules(o,m){return m?o instanceof RegExp?this.walk((h,g)=>{if(h.type==="atrule"&&o.test(h.name))return m(h,g)}):this.walk((h,g)=>{if(h.type==="atrule"&&h.name===o)return m(h,g)}):(m=o,this.walk((h,g)=>{if(h.type==="atrule")return m(h,g)}))}walkComments(o){return this.walk((m,h)=>{if(m.type==="comment")return o(m,h)})}walkDecls(o,m){return m?o instanceof RegExp?this.walk((h,g)=>{if(h.type==="decl"&&o.test(h.prop))return m(h,g)}):this.walk((h,g)=>{if(h.type==="decl"&&h.prop===o)return m(h,g)}):(m=o,this.walk((h,g)=>{if(h.type==="decl")return m(h,g)}))}walkRules(o,m){return m?o instanceof RegExp?this.walk((h,g)=>{if(h.type==="rule"&&o.test(h.selector))return m(h,g)}):this.walk((h,g)=>{if(h.type==="rule"&&h.selector===o)return m(h,g)}):(m=o,this.walk((h,g)=>{if(h.type==="rule")return m(h,g)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}}return f.registerParse=l=>{a=l;},f.registerRule=l=>{c=l;},f.registerAtRule=l=>{p=l;},f.registerRoot=l=>{u=l;},Or=f,f.default=f,f.rebuild=l=>{l.type==="atrule"?Object.setPrototypeOf(l,p.prototype):l.type==="rule"?Object.setPrototypeOf(l,c.prototype):l.type==="decl"?Object.setPrototypeOf(l,r.prototype):l.type==="comment"?Object.setPrototypeOf(l,i.prototype):l.type==="root"&&Object.setPrototypeOf(l,u.prototype),l[t]=true,l.nodes&&l.nodes.forEach(o=>{f.rebuild(o);});},Or}var Ir,Ti;function bs(){if(Ti)return Ir;Ti=1;let e=Me(),t,r;class i extends e{constructor(a){super({type:"document",...a}),this.nodes||(this.nodes=[]);}toResult(a={}){return new t(new r,this,a).stringify()}}return i.registerLazyResult=s=>{t=s;},i.registerProcessor=s=>{r=s;},Ir=i,i.default=i,Ir}var _r,Di;function An(){if(Di)return _r;Di=1;let e={};return _r=function(r){e[r]||(e[r]=true,typeof console<"u"&&console.warn&&console.warn(r));},_r}var kr,Pi;function On(){if(Pi)return kr;Pi=1;class e{constructor(r,i={}){if(this.type="warning",this.text=r,i.node&&i.node.source){let s=i.node.rangeBy(i);this.line=s.start.line,this.column=s.start.column,this.endLine=s.end.line,this.endColumn=s.end.column;}for(let s in i)this[s]=i[s];}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}}return kr=e,e.default=e,kr}var Tr,Li;function Ss(){if(Li)return Tr;Li=1;let e=On();class t{constructor(i,s,a){this.processor=i,this.messages=[],this.root=s,this.opts=a,this.css=void 0,this.map=void 0;}toString(){return this.css}warn(i,s={}){s.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(s.plugin=this.lastPlugin.postcssPlugin);let a=new e(i,s);return this.messages.push(a),a}warnings(){return this.messages.filter(i=>i.type==="warning")}get content(){return this.css}}return Tr=t,t.default=t,Tr}var Dr,Fi;function el(){if(Fi)return Dr;Fi=1;let e=39,t=34,r=92,i=47,s=10,a=32,c=12,p=9,u=13,d=91,n=93,f=40,l=41,o=123,m=125,h=59,g=42,v=58,b=64,S=/[\t\n\f\r "#'()/;[\\\]{}]/g,E=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,w=/.[\r\n"'(/\\]/,y=/[\da-f]/i;return Dr=function(x,A={}){let M=x.css.valueOf(),_=A.ignoreErrors,I,R,ce,ie,$,U,Y,Q,X,B,we=M.length,N=0,me=[],le=[];function Ue(){return N}function ee(k){throw x.error("Unclosed "+k,N)}function he(){return le.length===0&&N>=we}function Ee(k){if(le.length)return le.pop();if(N>=we)return;let J=k?k.ignoreUnclosed:false;switch(I=M.charCodeAt(N),I){case s:case a:case p:case u:case c:{R=N;do R+=1,I=M.charCodeAt(R);while(I===a||I===s||I===p||I===u||I===c);B=["space",M.slice(N,R)],N=R-1;break}case d:case n:case o:case m:case v:case h:case l:{let W=String.fromCharCode(I);B=[W,W,N];break}case f:{if(Q=me.length?me.pop()[1]:"",X=M.charCodeAt(N+1),Q==="url"&&X!==e&&X!==t&&X!==a&&X!==s&&X!==p&&X!==c&&X!==u){R=N;do{if(U=false,R=M.indexOf(")",R+1),R===-1)if(_||J){R=N;break}else ee("bracket");for(Y=R;M.charCodeAt(Y-1)===r;)Y-=1,U=!U;}while(U);B=["brackets",M.slice(N,R+1),N,R],N=R;}else R=M.indexOf(")",N+1),ie=M.slice(N,R+1),R===-1||w.test(ie)?B=["(","(",N]:(B=["brackets",ie,N,R],N=R);break}case e:case t:{ce=I===e?"'":'"',R=N;do{if(U=false,R=M.indexOf(ce,R+1),R===-1)if(_||J){R=N+1;break}else ee("string");for(Y=R;M.charCodeAt(Y-1)===r;)Y-=1,U=!U;}while(U);B=["string",M.slice(N,R+1),N,R],N=R;break}case b:{S.lastIndex=N+1,S.test(M),S.lastIndex===0?R=M.length-1:R=S.lastIndex-2,B=["at-word",M.slice(N,R+1),N,R],N=R;break}case r:{for(R=N,$=true;M.charCodeAt(R+1)===r;)R+=1,$=!$;if(I=M.charCodeAt(R+1),$&&I!==i&&I!==a&&I!==s&&I!==p&&I!==u&&I!==c&&(R+=1,y.test(M.charAt(R)))){for(;y.test(M.charAt(R+1));)R+=1;M.charCodeAt(R+1)===a&&(R+=1);}B=["word",M.slice(N,R+1),N,R],N=R;break}default:{I===i&&M.charCodeAt(N+1)===g?(R=M.indexOf("*/",N+2)+1,R===0&&(_||J?R=M.length:ee("comment")),B=["comment",M.slice(N,R+1),N,R],N=R):(E.lastIndex=N+1,E.test(M),E.lastIndex===0?R=M.length-1:R=E.lastIndex-2,B=["word",M.slice(N,R+1),N,R],me.push(B),N=R);break}}return N++,B}function be(k){le.push(k);}return {back:be,endOfFile:he,nextToken:Ee,position:Ue}},Dr}var Pr,Ui;function vs(){if(Ui)return Pr;Ui=1;let e=Me();class t extends e{constructor(i){super(i),this.type="atrule";}append(...i){return this.proxyOf.nodes||(this.nodes=[]),super.append(...i)}prepend(...i){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...i)}}return Pr=t,t.default=t,e.registerAtRule(t),Pr}var Lr,$i;function Ge(){if($i)return Lr;$i=1;let e=Me(),t,r;class i extends e{constructor(a){super(a),this.type="root",this.nodes||(this.nodes=[]);}normalize(a,c,p){let u=super.normalize(a);if(c){if(p==="prepend")this.nodes.length>1?c.raws.before=this.nodes[1].raws.before:delete c.raws.before;else if(this.first!==c)for(let d of u)d.raws.before=c.raws.before;}return u}removeChild(a,c){let p=this.index(a);return !c&&p===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[p].raws.before),super.removeChild(a)}toResult(a={}){return new t(new r,this,a).stringify()}}return i.registerLazyResult=s=>{t=s;},i.registerProcessor=s=>{r=s;},Lr=i,i.default=i,e.registerRoot(i),Lr}var Fr,Bi;function In(){if(Bi)return Fr;Bi=1;let e={comma(t){return e.split(t,[","],true)},space(t){let r=[" ",`
52
+ `," "];return e.split(t,r)},split(t,r,i){let s=[],a="",c=false,p=0,u=false,d="",n=false;for(let f of t)n?n=false:f==="\\"?n=true:u?f===d&&(u=false):f==='"'||f==="'"?(u=true,d=f):f==="("?p+=1:f===")"?p>0&&(p-=1):p===0&&r.includes(f)&&(c=true),c?(a!==""&&s.push(a.trim()),a="",c=false):a+=f;return (i||a!=="")&&s.push(a.trim()),s}};return Fr=e,e.default=e,Fr}var Ur,Wi;function Cs(){if(Wi)return Ur;Wi=1;let e=Me(),t=In();class r extends e{constructor(s){super(s),this.type="rule",this.nodes||(this.nodes=[]);}get selectors(){return t.comma(this.selector)}set selectors(s){let a=this.selector?this.selector.match(/,\s*/):null,c=a?a[0]:","+this.raw("between","beforeOpen");this.selector=s.join(c);}}return Ur=r,r.default=r,e.registerRule(r),Ur}var $r,zi;function tl(){if(zi)return $r;zi=1;let e=Ot(),t=el(),r=_t(),i=vs(),s=Ge(),a=Cs(),c={empty:true,space:true};function p(d){for(let n=d.length-1;n>=0;n--){let f=d[n],l=f[3]||f[2];if(l)return l}}class u{constructor(n){this.input=n,this.root=new s,this.current=this.root,this.spaces="",this.semicolon=false,this.createTokenizer(),this.root.source={input:n,start:{column:1,line:1,offset:0}};}atrule(n){let f=new i;f.name=n[1].slice(1),f.name===""&&this.unnamedAtrule(f,n),this.init(f,n[2]);let l,o,m,h=false,g=false,v=[],b=[];for(;!this.tokenizer.endOfFile();){if(n=this.tokenizer.nextToken(),l=n[0],l==="("||l==="["?b.push(l==="("?")":"]"):l==="{"&&b.length>0?b.push("}"):l===b[b.length-1]&&b.pop(),b.length===0)if(l===";"){f.source.end=this.getPosition(n[2]),f.source.end.offset++,this.semicolon=true;break}else if(l==="{"){g=true;break}else if(l==="}"){if(v.length>0){for(m=v.length-1,o=v[m];o&&o[0]==="space";)o=v[--m];o&&(f.source.end=this.getPosition(o[3]||o[2]),f.source.end.offset++);}this.end(n);break}else v.push(n);else v.push(n);if(this.tokenizer.endOfFile()){h=true;break}}f.raws.between=this.spacesAndCommentsFromEnd(v),v.length?(f.raws.afterName=this.spacesAndCommentsFromStart(v),this.raw(f,"params",v),h&&(n=v[v.length-1],f.source.end=this.getPosition(n[3]||n[2]),f.source.end.offset++,this.spaces=f.raws.between,f.raws.between="")):(f.raws.afterName="",f.params=""),g&&(f.nodes=[],this.current=f);}checkMissedSemicolon(n){let f=this.colon(n);if(f===false)return;let l=0,o;for(let m=f-1;m>=0&&(o=n[m],!(o[0]!=="space"&&(l+=1,l===2)));m--);throw this.input.error("Missed semicolon",o[0]==="word"?o[3]+1:o[2])}colon(n){let f=0,l,o,m;for(let[h,g]of n.entries()){if(l=g,o=l[0],o==="("&&(f+=1),o===")"&&(f-=1),f===0&&o===":")if(!m)this.doubleColon(l);else {if(m[0]==="word"&&m[1]==="progid")continue;return h}m=l;}return false}comment(n){let f=new r;this.init(f,n[2]),f.source.end=this.getPosition(n[3]||n[2]),f.source.end.offset++;let l=n[1].slice(2,-2);if(/^\s*$/.test(l))f.text="",f.raws.left=l,f.raws.right="";else {let o=l.match(/^(\s*)([^]*\S)(\s*)$/);f.text=o[2],f.raws.left=o[1],f.raws.right=o[3];}}createTokenizer(){this.tokenizer=t(this.input);}decl(n,f){let l=new e;this.init(l,n[0][2]);let o=n[n.length-1];for(o[0]===";"&&(this.semicolon=true,n.pop()),l.source.end=this.getPosition(o[3]||o[2]||p(n)),l.source.end.offset++;n[0][0]!=="word";)n.length===1&&this.unknownWord(n),l.raws.before+=n.shift()[1];for(l.source.start=this.getPosition(n[0][2]),l.prop="";n.length;){let b=n[0][0];if(b===":"||b==="space"||b==="comment")break;l.prop+=n.shift()[1];}l.raws.between="";let m;for(;n.length;)if(m=n.shift(),m[0]===":"){l.raws.between+=m[1];break}else m[0]==="word"&&/\w/.test(m[1])&&this.unknownWord([m]),l.raws.between+=m[1];(l.prop[0]==="_"||l.prop[0]==="*")&&(l.raws.before+=l.prop[0],l.prop=l.prop.slice(1));let h=[],g;for(;n.length&&(g=n[0][0],!(g!=="space"&&g!=="comment"));)h.push(n.shift());this.precheckMissedSemicolon(n);for(let b=n.length-1;b>=0;b--){if(m=n[b],m[1].toLowerCase()==="!important"){l.important=true;let S=this.stringFrom(n,b);S=this.spacesFromEnd(n)+S,S!==" !important"&&(l.raws.important=S);break}else if(m[1].toLowerCase()==="important"){let S=n.slice(0),E="";for(let w=b;w>0;w--){let y=S[w][0];if(E.trim().indexOf("!")===0&&y!=="space")break;E=S.pop()[1]+E;}E.trim().indexOf("!")===0&&(l.important=true,l.raws.important=E,n=S);}if(m[0]!=="space"&&m[0]!=="comment")break}n.some(b=>b[0]!=="space"&&b[0]!=="comment")&&(l.raws.between+=h.map(b=>b[1]).join(""),h=[]),this.raw(l,"value",h.concat(n),f),l.value.includes(":")&&!f&&this.checkMissedSemicolon(n);}doubleColon(n){throw this.input.error("Double colon",{offset:n[2]},{offset:n[2]+n[1].length})}emptyRule(n){let f=new a;this.init(f,n[2]),f.selector="",f.raws.between="",this.current=f;}end(n){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=false,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(n[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(n);}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position());}freeSemicolon(n){if(this.spaces+=n[1],this.current.nodes){let f=this.current.nodes[this.current.nodes.length-1];f&&f.type==="rule"&&!f.raws.ownSemicolon&&(f.raws.ownSemicolon=this.spaces,this.spaces="");}}getPosition(n){let f=this.input.fromOffset(n);return {column:f.col,line:f.line,offset:n}}init(n,f){this.current.push(n),n.source={input:this.input,start:this.getPosition(f)},n.raws.before=this.spaces,this.spaces="",n.type!=="comment"&&(this.semicolon=false);}other(n){let f=false,l=null,o=false,m=null,h=[],g=n[1].startsWith("--"),v=[],b=n;for(;b;){if(l=b[0],v.push(b),l==="("||l==="[")m||(m=b),h.push(l==="("?")":"]");else if(g&&o&&l==="{")m||(m=b),h.push("}");else if(h.length===0)if(l===";")if(o){this.decl(v,g);return}else break;else if(l==="{"){this.rule(v);return}else if(l==="}"){this.tokenizer.back(v.pop()),f=true;break}else l===":"&&(o=true);else l===h[h.length-1]&&(h.pop(),h.length===0&&(m=null));b=this.tokenizer.nextToken();}if(this.tokenizer.endOfFile()&&(f=true),h.length>0&&this.unclosedBracket(m),f&&o){if(!g)for(;v.length&&(b=v[v.length-1][0],!(b!=="space"&&b!=="comment"));)this.tokenizer.back(v.pop());this.decl(v,g);}else this.unknownWord(v);}parse(){let n;for(;!this.tokenizer.endOfFile();)switch(n=this.tokenizer.nextToken(),n[0]){case "space":this.spaces+=n[1];break;case ";":this.freeSemicolon(n);break;case "}":this.end(n);break;case "comment":this.comment(n);break;case "at-word":this.atrule(n);break;case "{":this.emptyRule(n);break;default:this.other(n);break}this.endFile();}precheckMissedSemicolon(){}raw(n,f,l,o){let m,h,g=l.length,v="",b=true,S,E;for(let w=0;w<g;w+=1)m=l[w],h=m[0],h==="space"&&w===g-1&&!o?b=false:h==="comment"?(E=l[w-1]?l[w-1][0]:"empty",S=l[w+1]?l[w+1][0]:"empty",!c[E]&&!c[S]?v.slice(-1)===","?b=false:v+=m[1]:b=false):v+=m[1];if(!b){let w=l.reduce((y,C)=>y+C[1],"");n.raws[f]={raw:w,value:v};}n[f]=v;}rule(n){n.pop();let f=new a;this.init(f,n[0][2]),f.raws.between=this.spacesAndCommentsFromEnd(n),this.raw(f,"selector",n),this.current=f;}spacesAndCommentsFromEnd(n){let f,l="";for(;n.length&&(f=n[n.length-1][0],!(f!=="space"&&f!=="comment"));)l=n.pop()[1]+l;return l}spacesAndCommentsFromStart(n){let f,l="";for(;n.length&&(f=n[0][0],!(f!=="space"&&f!=="comment"));)l+=n.shift()[1];return l}spacesFromEnd(n){let f,l="";for(;n.length&&(f=n[n.length-1][0],f==="space");)l=n.pop()[1]+l;return l}stringFrom(n,f){let l="";for(let o=f;o<n.length;o++)l+=n[o][1];return n.splice(f,n.length-f),l}unclosedBlock(){let n=this.current.source.start;throw this.input.error("Unclosed block",n.line,n.column)}unclosedBracket(n){throw this.input.error("Unclosed bracket",{offset:n[2]},{offset:n[2]+1})}unexpectedClose(n){throw this.input.error("Unexpected }",{offset:n[2]},{offset:n[2]+1})}unknownWord(n){throw this.input.error("Unknown word",{offset:n[0][2]},{offset:n[0][2]+n[0][1].length})}unnamedAtrule(n,f){throw this.input.error("At-rule without name",{offset:f[2]},{offset:f[2]+f[1].length})}}return $r=u,$r}var Br,qi;function Es(){if(qi)return Br;qi=1;let e=Me(),t=tl(),r=It();function i(s,a){let c=new r(s,a),p=new t(c);try{p.parse();}catch(u){throw process.env.NODE_ENV!=="production"&&u.name==="CssSyntaxError"&&a&&a.from&&(/\.scss$/i.test(a.from)?u.message+=`
53
+ You tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser`:/\.sass/i.test(a.from)?u.message+=`
54
+ You tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser`:/\.less$/i.test(a.from)&&(u.message+=`
55
+ You tried to parse Less with the standard CSS parser; try again with the postcss-less parser`)),u}return p.root}return Br=i,i.default=i,e.registerParse(i),Br}var Wr,Hi;function _n(){if(Hi)return Wr;Hi=1;let{isClean:e,my:t}=ws(),r=Nn(),i=Nt(),s=Me(),a=bs(),c=An(),p=Ss(),u=Es(),d=Ge(),n={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},f={AtRule:true,AtRuleExit:true,Comment:true,CommentExit:true,Declaration:true,DeclarationExit:true,Document:true,DocumentExit:true,Once:true,OnceExit:true,postcssPlugin:true,prepare:true,Root:true,RootExit:true,Rule:true,RuleExit:true},l={Once:true,postcssPlugin:true,prepare:true},o=0;function m(E){return typeof E=="object"&&typeof E.then=="function"}function h(E){let w=false,y=n[E.type];return E.type==="decl"?w=E.prop.toLowerCase():E.type==="atrule"&&(w=E.name.toLowerCase()),w&&E.append?[y,y+"-"+w,o,y+"Exit",y+"Exit-"+w]:w?[y,y+"-"+w,y+"Exit",y+"Exit-"+w]:E.append?[y,o,y+"Exit"]:[y,y+"Exit"]}function g(E){let w;return E.type==="document"?w=["Document",o,"DocumentExit"]:E.type==="root"?w=["Root",o,"RootExit"]:w=h(E),{eventIndex:0,events:w,iterator:0,node:E,visitorIndex:0,visitors:[]}}function v(E){return E[e]=false,E.nodes&&E.nodes.forEach(w=>v(w)),E}let b={};class S{constructor(w,y,C){this.stringified=false,this.processed=false;let x;if(typeof y=="object"&&y!==null&&(y.type==="root"||y.type==="document"))x=v(y);else if(y instanceof S||y instanceof p)x=v(y.root),y.map&&(typeof C.map>"u"&&(C.map={}),C.map.inline||(C.map.inline=false),C.map.prev=y.map);else {let A=u;C.syntax&&(A=C.syntax.parse),C.parser&&(A=C.parser),A.parse&&(A=A.parse);try{x=A(y,C);}catch(M){this.processed=true,this.error=M;}x&&!x[t]&&s.rebuild(x);}this.result=new p(w,x,C),this.helpers={...b,postcss:b,result:this.result},this.plugins=this.processor.plugins.map(A=>typeof A=="object"&&A.prepare?{...A,...A.prepare(this.result)}:A);}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(w){return this.async().catch(w)}finally(w){return this.async().then(w,w)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(w,y){let C=this.result.lastPlugin;try{if(y&&y.addToError(w),this.error=w,w.name==="CssSyntaxError"&&!w.plugin)w.plugin=C.postcssPlugin,w.setMessage();else if(C.postcssVersion&&process.env.NODE_ENV!=="production"){let x=C.postcssPlugin,A=C.postcssVersion,M=this.result.processor.version,_=A.split("."),I=M.split(".");(_[0]!==I[0]||parseInt(_[1])>parseInt(I[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+M+", but "+x+" uses "+A+". Perhaps this is the source of the error below.");}}catch(x){console&&console.error&&console.error(x);}return w}prepareVisitors(){this.listeners={};let w=(y,C,x)=>{this.listeners[C]||(this.listeners[C]=[]),this.listeners[C].push([y,x]);};for(let y of this.plugins)if(typeof y=="object")for(let C in y){if(!f[C]&&/^[A-Z]/.test(C))throw new Error(`Unknown event ${C} in ${y.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!l[C])if(typeof y[C]=="object")for(let x in y[C])x==="*"?w(y,C,y[C][x]):w(y,C+"-"+x.toLowerCase(),y[C][x]);else typeof y[C]=="function"&&w(y,C,y[C]);}this.hasListener=Object.keys(this.listeners).length>0;}async runAsync(){this.plugin=0;for(let w=0;w<this.plugins.length;w++){let y=this.plugins[w],C=this.runOnRoot(y);if(m(C))try{await C;}catch(x){throw this.handleError(x)}}if(this.prepareVisitors(),this.hasListener){let w=this.result.root;for(;!w[e];){w[e]=true;let y=[g(w)];for(;y.length>0;){let C=this.visitTick(y);if(m(C))try{await C;}catch(x){let A=y[y.length-1].node;throw this.handleError(x,A)}}}if(this.listeners.OnceExit)for(let[y,C]of this.listeners.OnceExit){this.result.lastPlugin=y;try{if(w.type==="document"){let x=w.nodes.map(A=>C(A,this.helpers));await Promise.all(x);}else await C(w,this.helpers);}catch(x){throw this.handleError(x)}}}return this.processed=true,this.stringify()}runOnRoot(w){this.result.lastPlugin=w;try{if(typeof w=="object"&&w.Once){if(this.result.root.type==="document"){let y=this.result.root.nodes.map(C=>w.Once(C,this.helpers));return m(y[0])?Promise.all(y):y}return w.Once(this.result.root,this.helpers)}else if(typeof w=="function")return w(this.result.root,this.result)}catch(y){throw this.handleError(y)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=true,this.sync();let w=this.result.opts,y=i;w.syntax&&(y=w.syntax.stringify),w.stringifier&&(y=w.stringifier),y.stringify&&(y=y.stringify);let x=new r(y,this.result.root,this.result.opts).generate();return this.result.css=x[0],this.result.map=x[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=true,this.processing)throw this.getAsyncError();for(let w of this.plugins){let y=this.runOnRoot(w);if(m(y))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let w=this.result.root;for(;!w[e];)w[e]=true,this.walkSync(w);if(this.listeners.OnceExit)if(w.type==="document")for(let y of w.nodes)this.visitSync(this.listeners.OnceExit,y);else this.visitSync(this.listeners.OnceExit,w);}return this.result}then(w,y){return process.env.NODE_ENV!=="production"&&("from"in this.opts||c("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(w,y)}toString(){return this.css}visitSync(w,y){for(let[C,x]of w){this.result.lastPlugin=C;let A;try{A=x(y,this.helpers);}catch(M){throw this.handleError(M,y.proxyOf)}if(y.type!=="root"&&y.type!=="document"&&!y.parent)return true;if(m(A))throw this.getAsyncError()}}visitTick(w){let y=w[w.length-1],{node:C,visitors:x}=y;if(C.type!=="root"&&C.type!=="document"&&!C.parent){w.pop();return}if(x.length>0&&y.visitorIndex<x.length){let[M,_]=x[y.visitorIndex];y.visitorIndex+=1,y.visitorIndex===x.length&&(y.visitors=[],y.visitorIndex=0),this.result.lastPlugin=M;try{return _(C.toProxy(),this.helpers)}catch(I){throw this.handleError(I,C)}}if(y.iterator!==0){let M=y.iterator,_;for(;_=C.nodes[C.indexes[M]];)if(C.indexes[M]+=1,!_[e]){_[e]=true,w.push(g(_));return}y.iterator=0,delete C.indexes[M];}let A=y.events;for(;y.eventIndex<A.length;){let M=A[y.eventIndex];if(y.eventIndex+=1,M===o){C.nodes&&C.nodes.length&&(C[e]=true,y.iterator=C.getIterator());return}else if(this.listeners[M]){y.visitors=this.listeners[M];return}}w.pop();}walkSync(w){w[e]=true;let y=h(w);for(let C of y)if(C===o)w.nodes&&w.each(x=>{x[e]||this.walkSync(x);});else {let x=this.listeners[C];if(x&&this.visitSync(x,w.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return "LazyResult"}}return S.registerPostcss=E=>{b=E;},Wr=S,S.default=S,d.registerLazyResult(S),a.registerLazyResult(S),Wr}var zr,ji;function rl(){if(ji)return zr;ji=1;let e=Nn(),t=Nt(),r=An(),i=Es(),s=Ss();class a{constructor(p,u,d){u=u.toString(),this.stringified=false,this._processor=p,this._css=u,this._opts=d,this._map=void 0;let n,f=t;this.result=new s(this._processor,n,this._opts),this.result.css=u;let l=this;Object.defineProperty(this.result,"root",{get(){return l.root}});let o=new e(f,n,this._opts,u);if(o.isMap()){let[m,h]=o.generate();m&&(this.result.css=m),h&&(this.result.map=h);}else o.clearAnnotation(),this.result.css=o.css;}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(p){return this.async().catch(p)}finally(p){return this.async().then(p,p)}sync(){if(this.error)throw this.error;return this.result}then(p,u){return process.env.NODE_ENV!=="production"&&("from"in this._opts||r("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(p,u)}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 p,u=i;try{p=u(this._css,this._opts);}catch(d){this.error=d;}if(this.error)throw this.error;return this._root=p,p}get[Symbol.toStringTag](){return "NoWorkResult"}}return zr=a,a.default=a,zr}var qr,Vi;function sl(){if(Vi)return qr;Vi=1;let e=rl(),t=_n(),r=bs(),i=Ge();class s{constructor(c=[]){this.version="8.4.38",this.plugins=this.normalize(c);}normalize(c){let p=[];for(let u of c)if(u.postcss===true?u=u():u.postcss&&(u=u.postcss),typeof u=="object"&&Array.isArray(u.plugins))p=p.concat(u.plugins);else if(typeof u=="object"&&u.postcssPlugin)p.push(u);else if(typeof u=="function")p.push(u);else if(typeof u=="object"&&(u.parse||u.stringify)){if(process.env.NODE_ENV!=="production")throw new Error("PostCSS syntaxes cannot be used as plugins. Instead, please use one of the syntax/parser/stringifier options as outlined in your PostCSS runner documentation.")}else throw new Error(u+" is not a PostCSS plugin");return p}process(c,p={}){return !this.plugins.length&&!p.parser&&!p.stringifier&&!p.syntax?new e(this,c,p):new t(this,c,p)}use(c){return this.plugins=this.plugins.concat(this.normalize([c])),this}}return qr=s,s.default=s,i.registerProcessor(s),r.registerProcessor(s),qr}var Hr,Gi;function il(){if(Gi)return Hr;Gi=1;let e=Ot(),t=Mn(),r=_t(),i=vs(),s=It(),a=Ge(),c=Cs();function p(u,d){if(Array.isArray(u))return u.map(l=>p(l));let{inputs:n,...f}=u;if(n){d=[];for(let l of n){let o={...l,__proto__:s.prototype};o.map&&(o.map={...o.map,__proto__:t.prototype}),d.push(o);}}if(f.nodes&&(f.nodes=u.nodes.map(l=>p(l,d))),f.source){let{inputId:l,...o}=f.source;f.source=o,l!=null&&(f.source.input=d[l]);}if(f.type==="root")return new a(f);if(f.type==="decl")return new e(f);if(f.type==="rule")return new c(f);if(f.type==="comment")return new r(f);if(f.type==="atrule")return new i(f);throw new Error("Unknown node type: "+u.type)}return Hr=p,p.default=p,Hr}var jr,Yi;function nl(){if(Yi)return jr;Yi=1;let e=ys(),t=Ot(),r=_n(),i=Me(),s=sl(),a=Nt(),c=il(),p=bs(),u=On(),d=_t(),n=vs(),f=Ss(),l=It(),o=Es(),m=In(),h=Cs(),g=Ge(),v=At();function b(...S){return S.length===1&&Array.isArray(S[0])&&(S=S[0]),new s(S)}return b.plugin=function(E,w){let y=false;function C(...A){console&&console.warn&&!y&&(y=true,console.warn(E+`: postcss.plugin was deprecated. Migration guide:
56
+ 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:
57
+ https://www.w3ctech.com/topic/2226`));let M=w(...A);return M.postcssPlugin=E,M.postcssVersion=new s().version,M}let x;return Object.defineProperty(C,"postcss",{get(){return x||(x=C()),x}}),C.process=function(A,M,_){return b([C(_)]).process(A,M)},C},b.stringify=a,b.parse=o,b.fromJSON=c,b.list=m,b.comment=S=>new d(S),b.atRule=S=>new n(S),b.decl=S=>new t(S),b.rule=S=>new h(S),b.root=S=>new g(S),b.document=S=>new p(S),b.CssSyntaxError=e,b.Declaration=t,b.Container=i,b.Processor=s,b.Document=p,b.Comment=d,b.Warning=u,b.AtRule=n,b.Result=f,b.Input=l,b.Rule=h,b.Root=g,b.Node=v,r.registerPostcss(b),jr=b,b.default=b,jr}var ol=nl(),j=Ya(ol);j.stringify;j.fromJSON;j.plugin;j.parse;j.list;j.document;j.comment;j.atRule;j.rule;j.decl;j.root;j.CssSyntaxError;j.Declaration;j.Container;j.Processor;j.Document;j.Comment;j.Warning;j.AtRule;j.Result;j.Input;j.Rule;j.Root;j.Node;var Kr=class e{constructor(...t){ue(this,"parentElement",null),ue(this,"parentNode",null),ue(this,"ownerDocument"),ue(this,"firstChild",null),ue(this,"lastChild",null),ue(this,"previousSibling",null),ue(this,"nextSibling",null),ue(this,"ELEMENT_NODE",1),ue(this,"TEXT_NODE",3),ue(this,"nodeType"),ue(this,"nodeName"),ue(this,"RRNodeType");}get childNodes(){let t=[],r=this.firstChild;for(;r;)t.push(r),r=r.nextSibling;return t}contains(t){if(t instanceof e){if(t.ownerDocument!==this.ownerDocument)return false;if(t===this)return true}else return false;for(;t.parentNode;){if(t.parentNode===this)return true;t=t.parentNode;}return false}appendChild(t){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(t,r){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(t){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return "RRNode"}};var Xi={Node:["childNodes","parentNode","parentElement","textContent","ownerDocument","firstChild","lastChild","nextSibling","previousSibling"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},Ji={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},lt={},kn={},al=()=>!!globalThis.Zone;function Rs(e){if(lt[e])return lt[e];let t=globalThis[e],r=t.prototype,i=e in Xi?Xi[e]:void 0,s=!!(i&&i.every(p=>{var u,d;return !!((d=(u=Object.getOwnPropertyDescriptor(r,p))==null?void 0:u.get)!=null&&d.toString().includes("[native code]"))})),a=e in Ji?Ji[e]:void 0,c=!!(a&&a.every(p=>{var u;return typeof r[p]=="function"&&((u=r[p])==null?void 0:u.toString().includes("[native code]"))}));if(s&&c&&!al())return lt[e]=t.prototype,t.prototype;try{let p=document.createElement("iframe");p.style.display="none",document.body.appendChild(p);let u=p.contentWindow;if(!u)return t.prototype;let d=u[e].prototype;if(!d)return p.remove(),r;let n=navigator.userAgent;return n.includes("Safari")&&!n.includes("Chrome")?(p.classList.add("rr-block"),p.setAttribute("__rrwebUntaintedMutationObserver",""),kn[e]=()=>p.remove()):p.remove(),lt[e]=d}catch{return r}}var Vr={};function ae(e,t,r){var i,s;let a=(i=Vr[e])==null?void 0:i[r];if(a)return a.call(t);let c=Rs(e),p=(s=Object.getOwnPropertyDescriptor(c,r))==null?void 0:s.get;return p?((Vr[e]||(Vr[e]={}))[r]=p,p.call(t)):t[r]}var Gr={};function Tn(e,t,r){let i=`${e}.${String(r)}`;if(Gr[i])return Gr[i].bind(t);let a=Rs(e)[r];return typeof a!="function"?t[r]:(Gr[i]=a,a.bind(t))}function ll(e){return ae("Node",e,"ownerDocument")}function ul(e){return ae("Node",e,"childNodes")}function cl(e){return ae("Node",e,"parentNode")}function hl(e){return ae("Node",e,"parentElement")}function fl(e){return ae("Node",e,"textContent")}function dl(e){return ae("Node",e,"firstChild")}function pl(e){return ae("Node",e,"lastChild")}function ml(e){return ae("Node",e,"nextSibling")}function gl(e){return ae("Node",e,"previousSibling")}function yl(e,t){return Tn("Node",e,"contains")(t)}function wl(e){return Tn("Node",e,"getRootNode")()}function bl(e){return !e||!("host"in e)?null:ae("ShadowRoot",e,"host")}function Sl(e){return e.styleSheets}function vl(e){return !e||!("shadowRoot"in e)?null:ae("Element",e,"shadowRoot")}function Cl(e,t){return ae("Element",e,"querySelector")(t)}function El(e,t){return ae("Element",e,"querySelectorAll")(t)}function Dn(){return [Rs("MutationObserver").constructor,kn.MutationObserver??(()=>{})]}var He=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(He=()=>new Date().getTime());function Ne(e,t,r){try{if(!(t in e))return ()=>{};let i=e[t],s=r(i);return typeof s=="function"&&(s.prototype=s.prototype||{},Object.defineProperties(s,{__rrweb_original__:{enumerable:!1,value:i}})),e[t]=s,()=>{e[t]=i;}}catch{return ()=>{}}}var T={ownerDocument:ll,childNodes:ul,parentNode:cl,parentElement:hl,textContent:fl,firstChild:dl,lastChild:pl,nextSibling:ml,previousSibling:gl,contains:yl,getRootNode:wl,host:bl,styleSheets:Sl,shadowRoot:vl,querySelector:Cl,querySelectorAll:El,nowTimestamp:He,mutationObserverCtor:Dn,patch:Ne};function te(e,t,r=document){let i={capture:true,passive:true};return r.addEventListener(e,t,i),()=>r.removeEventListener(e,t,i)}var Oe=`Please stop import mirror directly. Instead of that,\r
58
+ now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
59
+ or you can use record.mirror to access the mirror instance during recording.`,Ki={map:{},getId(){return console.error(Oe),-1},getNode(){return console.error(Oe),null},removeNodeFromMap(){console.error(Oe);},has(){return console.error(Oe),false},reset(){console.error(Oe);}};typeof window<"u"&&window.Proxy&&window.Reflect&&(Ki=new Proxy(Ki,{get(e,t,r){return t==="map"&&console.error(Oe),Reflect.get(e,t,r)}}));function je(e,t,r={}){let i=null,s=0;return function(...a){let c=Date.now();!s&&r.leading===false&&(s=c);let p=t-(c-s),u=this;p<=0||p>t?(i&&(clearTimeout(i),i=null),s=c,e.apply(u,a)):!i&&r.trailing!==false&&(i=setTimeout(()=>{s=r.leading===false?0:Date.now(),i=null,e.apply(u,a);},p));}}function kt(e,t,r,i,s=window){let a=s.Object.getOwnPropertyDescriptor(e,t);return s.Object.defineProperty(e,t,i?r:{set(c){setTimeout(()=>{r.set.call(this,c);},0),a&&a.set&&a.set.call(this,c);}}),()=>kt(e,t,a||{},true)}function Pn(e){var t,r,i,s;let a=e.document;return {left:a.scrollingElement?a.scrollingElement.scrollLeft:e.pageXOffset!==void 0?e.pageXOffset:a.documentElement.scrollLeft||a?.body&&((t=T.parentElement(a.body))==null?void 0:t.scrollLeft)||((r=a?.body)==null?void 0:r.scrollLeft)||0,top:a.scrollingElement?a.scrollingElement.scrollTop:e.pageYOffset!==void 0?e.pageYOffset:a?.documentElement.scrollTop||a?.body&&((i=T.parentElement(a.body))==null?void 0:i.scrollTop)||((s=a?.body)==null?void 0:s.scrollTop)||0}}function Ln(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function Fn(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function Un(e){return e?e.nodeType===e.ELEMENT_NODE?e:T.parentElement(e):null}function re(e,t,r,i){if(!e)return false;let s=Un(e);if(!s)return false;try{if(typeof t=="string"){if(s.classList.contains(t)||i&&s.closest("."+t)!==null)return !0}else if(wt(s,t,i))return !0}catch{}return !!(r&&(s.matches(r)||i&&s.closest(r)!==null))}function Rl(e,t){return t.getId(e)!==-1}function Yr(e,t,r){return e.tagName==="TITLE"&&r.headTitleMutations?true:t.getId(e)===yt}function $n(e,t){if(We(e))return false;let r=t.getId(e);if(!t.has(r))return true;let i=T.parentNode(e);return i&&i.nodeType===e.DOCUMENT_NODE?false:i?$n(i,t):true}function Qr(e){return !!e.changedTouches}function xl(e=window){"NodeList"in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach);}function Bn(e,t){return !!(e.nodeName==="IFRAME"&&t.getMeta(e))}function Wn(e,t){return !!(e.nodeName==="LINK"&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&e.getAttribute("rel")==="stylesheet"&&t.getMeta(e))}function Zr(e){return e?e instanceof Kr&&"shadowRoot"in e?!!e.shadowRoot:!!T.shadowRoot(e):false}var es=class{constructor(){O(this,"id",1),O(this,"styleIDMap",new WeakMap),O(this,"idStyleMap",new Map);}getId(t){return this.styleIDMap.get(t)??-1}has(t){return this.styleIDMap.has(t)}add(t,r){if(this.has(t))return this.getId(t);let i;return r===void 0?i=this.id++:i=r,this.styleIDMap.set(t,i),this.idStyleMap.set(i,t),i}getStyle(t){return this.idStyleMap.get(t)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1;}generateId(){return this.id++}};function zn(e){var t;let r=null;return "getRootNode"in e&&((t=T.getRootNode(e))==null?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&T.host(T.getRootNode(e))&&(r=T.host(T.getRootNode(e))),r}function Ml(e){let t=e,r;for(;r=zn(t);)t=r;return t}function Nl(e){let t=T.ownerDocument(e);if(!t)return false;let r=Ml(e);return T.contains(t,r)}function qn(e){let t=T.ownerDocument(e);return t?T.contains(t,e)||Nl(e):false}var F=(e=>(e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom",e[e.Plugin=6]="Plugin",e[e.Asset=7]="Asset",e))(F||{}),P=(e=>(e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration",e[e.Selection=14]="Selection",e[e.AdoptedStyleSheet=15]="AdoptedStyleSheet",e[e.CustomElement=16]="CustomElement",e))(P||{}),se=(e=>(e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd",e[e.TouchCancel=10]="TouchCancel",e))(se||{}),ge=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(ge||{}),De=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(De||{}),Ie=(e=>(e[e.Play=0]="Play",e[e.Pause=1]="Pause",e[e.Seeked=2]="Seeked",e[e.VolumeChange=3]="VolumeChange",e[e.RateChange=4]="RateChange",e))(Ie||{});var Hn=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))(Hn||{}),Qi=(e,t)=>`${e}@${t}`,ts=class{constructor(){O(this,"frozen",false),O(this,"locked",false),O(this,"texts",[]),O(this,"attributes",[]),O(this,"attributeMap",new WeakMap),O(this,"removes",[]),O(this,"mapRemoves",[]),O(this,"movedMap",{}),O(this,"addedSet",new Set),O(this,"movedSet",new Set),O(this,"droppedSet",new Set),O(this,"removesSubTreeCache",new Set),O(this,"mutationCb"),O(this,"blockClass"),O(this,"blockSelector"),O(this,"maskTextClass"),O(this,"maskTextSelector"),O(this,"inlineStylesheet"),O(this,"maskInputOptions"),O(this,"maskTextFn"),O(this,"maskInputFn"),O(this,"keepIframeSrcFn"),O(this,"recordCanvas"),O(this,"inlineImages"),O(this,"slimDOMOptions"),O(this,"dataURLOptions"),O(this,"doc"),O(this,"mirror"),O(this,"iframeManager"),O(this,"stylesheetManager"),O(this,"shadowDomManager"),O(this,"canvasManager"),O(this,"processedNodeManager"),O(this,"unattachedDoc"),O(this,"processMutations",t=>{t.forEach(this.processMutation),this.emit();}),O(this,"emit",()=>{if(this.frozen||this.locked)return;let t=[],r=new Set;for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(let l of this.movedSet){let o=T.parentNode(l);this.removesSubTreeCache.has(o)&&!this.movedSet.has(o)||this.addedSet.add(l);}let i=null,s=null,a=-1,c=null,p=false,u=new Set,d=this.addedSet.values(),n=d.next();for(;this.addedSet.size;){if(i!==null&&this.addedSet.has(T.previousSibling(i)))c=i,i=T.previousSibling(i);else {for(this.addedSet.has(n.value)||(n=d.next()),i=n.value;;){if(s=T.parentNode(i),this.addedSet.has(s)){i=s;continue}break}if(u.has(s))s=null;else if(s){if(qn(s)?(p=Zi(this.droppedSet,s)||this.removesSubTreeCache.has(s),p&&Zi(this.movedSet,i)&&(p=false)):p=true,this.addedSet.has(T.lastChild(s)))i=T.lastChild(s),c=null;else for(;;){if(c=T.nextSibling(i),this.addedSet.has(c)){i=c;continue}break}if(a=We(s)?this.mirror.getId(zn(i)):this.mirror.getId(s),a===-1&&s.nodeType===Node.DOCUMENT_FRAGMENT_NODE){let h=T.host(s);a=this.mirror.getId(h);}}}if(this.addedSet.delete(i),!s||a===-1){u.add(i);continue}else if(p){this.droppedSet.add(i);continue}let l=false;if(i.nodeType===Node.TEXT_NODE){let h=s.tagName;if(h==="TEXTAREA")continue;h==="STYLE"&&r.has(a)&&(l=true);}let o=c?this.mirror.getId(c):null;for(;o===yt;)c=c&&T.nextSibling(c),o=c&&this.mirror.getId(c);if(o===-1){console.warn("Couldn't record new node. Couldn't find mirror id for nextSibling:",c),i=null;continue}let m=ke(i,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskTextClass:this.maskTextClass,maskTextSelector:this.maskTextSelector,skipChild:true,newlyAddedElement:true,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:h=>{Bn(h,this.mirror)&&this.iframeManager.addIframe(h),Wn(h,this.mirror)&&this.stylesheetManager.trackLinkElement(h),Zr(i)&&this.shadowDomManager.addShadowRoot(T.shadowRoot(i),this.doc);},onIframeLoad:(h,g)=>{this.iframeManager.attachIframe(h,g),this.shadowDomManager.observeAttachShadow(h);},onStylesheetLoad:(h,g)=>{this.stylesheetManager.attachLinkElement(h,g);},cssCaptured:l});m&&(t.push({parentId:a,nextId:o,node:m}),r.add(m.id));}let f={texts:this.texts.map(l=>{let o=l.node,m=T.parentNode(o);return m&&m.tagName==="TEXTAREA"&&this.genTextAreaValueMutation(m),{id:this.mirror.getId(o),value:l.value}}).filter(l=>!r.has(l.id)).filter(l=>this.mirror.has(l.id)),attributes:this.attributes.map(l=>{let{attributes:o}=l;if(typeof o.style=="string"){let m=JSON.stringify(l.styleDiff),h=JSON.stringify(l._unchangedStyles);m.length<o.style.length&&(m+h).split("var(").length===o.style.split("var(").length&&(o.style=l.styleDiff);}return {id:this.mirror.getId(l.node),attributes:o}}).filter(l=>!r.has(l.id)).filter(l=>this.mirror.has(l.id)),removes:this.removes,adds:t};!f.texts.length&&!f.attributes.length&&!f.removes.length&&!f.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(f));}),O(this,"genTextAreaValueMutation",t=>{let r=this.attributeMap.get(t);r||(r={node:t,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(r),this.attributeMap.set(t,r));let i=Array.from(T.childNodes(t),s=>T.textContent(s)||"").join("");r.attributes.value=pt({element:t,maskInputOptions:this.maskInputOptions,tagName:t.tagName,type:mt(t),value:i,maskInputFn:this.maskInputFn});}),O(this,"processMutation",t=>{if(!Yr(t.target,this.mirror,this.slimDOMOptions))switch(t.type){case "characterData":{let r=T.textContent(t.target);!re(t.target,this.blockClass,this.blockSelector,false)&&r!==t.oldValue&&this.texts.push({value:gn(t.target,this.maskTextClass,this.maskTextSelector,true)&&r?this.maskTextFn?this.maskTextFn(r,Un(t.target)):r.replace(/[\S]/g,"*"):r,node:t.target});break}case "attributes":{let r=t.target,i=ve(r.tagName),s=t.attributeName,a=t.target.getAttribute(s);if(s==="value"){let p=mt(r);a=pt({element:r,maskInputOptions:this.maskInputOptions,tagName:r.tagName,type:p,value:a,maskInputFn:this.maskInputFn});}if(re(t.target,this.blockClass,this.blockSelector,false)||a===t.oldValue)return;let c=this.attributeMap.get(t.target);if(i==="iframe"&&s==="src"&&!this.keepIframeSrcFn(a))if(!r.contentDocument)s="rr_src";else return;if(c||(c={node:t.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(c),this.attributeMap.set(t.target,c)),s==="type"&&i==="input"&&(t.oldValue||"").toLowerCase()==="password"&&r.setAttribute("data-rr-is-password","true"),!mn(i,s))if(c.attributes[s]=pn(this.doc,i,ve(s),a),s==="style"){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument();}catch{this.unattachedDoc=this.doc;}let p=this.unattachedDoc.createElement("span");t.oldValue&&p.setAttribute("style",t.oldValue);for(let u of Array.from(r.style)){let d=r.style.getPropertyValue(u),n=r.style.getPropertyPriority(u);d!==p.style.getPropertyValue(u)||n!==p.style.getPropertyPriority(u)?n===""?c.styleDiff[u]=d:c.styleDiff[u]=[d,n]:c._unchangedStyles[u]=[d,n];}for(let u of Array.from(p.style))r.style.getPropertyValue(u)===""&&(c.styleDiff[u]=false);}else s==="open"&&r.tagName==="DIALOG"&&(r.matches("dialog:modal")?c.attributes.rr_open_mode="modal":c.attributes.rr_open_mode="non-modal");break}case "childList":{if(re(t.target,this.blockClass,this.blockSelector,true))return;if(t.target.tagName==="TEXTAREA"){this.genTextAreaValueMutation(t.target);return}t.addedNodes.forEach(r=>this.genAdds(r,t.target)),t.removedNodes.forEach(r=>{let i=this.mirror.getId(r),s=We(t.target)?this.mirror.getId(T.host(t.target)):this.mirror.getId(t.target);re(t.target,this.blockClass,this.blockSelector,false)||Yr(r,this.mirror,this.slimDOMOptions)||!Rl(r,this.mirror)||(this.addedSet.has(r)?(rs(this.addedSet,r),this.droppedSet.add(r)):this.addedSet.has(t.target)&&i===-1||$n(t.target,this.mirror)||(this.movedSet.has(r)&&this.movedMap[Qi(i,s)]?rs(this.movedSet,r):(this.removes.push({parentId:s,id:i,isShadow:We(t.target)&&ze(t.target)?true:void 0}),Al(r,this.removesSubTreeCache))),this.mapRemoves.push(r));});break}}}),O(this,"genAdds",(t,r)=>{if(!this.processedNodeManager.inOtherBuffer(t,this)&&!(this.addedSet.has(t)||this.movedSet.has(t))){if(this.mirror.hasNode(t)){if(Yr(t,this.mirror,this.slimDOMOptions))return;this.movedSet.add(t);let i=null;r&&this.mirror.hasNode(r)&&(i=this.mirror.getId(r)),i&&i!==-1&&(this.movedMap[Qi(this.mirror.getId(t),i)]=true);}else this.addedSet.add(t),this.droppedSet.delete(t);re(t,this.blockClass,this.blockSelector,false)||(T.childNodes(t).forEach(i=>this.genAdds(i)),Zr(t)&&T.childNodes(T.shadowRoot(t)).forEach(i=>{this.processedNodeManager.add(i,this),this.genAdds(i,t);}));}});}init(t){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(r=>{this[r]=t[r];});}freeze(){this.frozen=true,this.canvasManager.freeze();}unfreeze(){this.frozen=false,this.canvasManager.unfreeze(),this.emit();}isFrozen(){return this.frozen}lock(){this.locked=true,this.canvasManager.lock();}unlock(){this.locked=false,this.canvasManager.unlock(),this.emit();}reset(){this.shadowDomManager.reset(),this.canvasManager.reset();}};function rs(e,t){e.delete(t),T.childNodes(t).forEach(r=>rs(e,r));}function Al(e,t){let r=[e];for(;r.length;){let i=r.pop();t.has(i)||(t.add(i),T.childNodes(i).forEach(s=>r.push(s)));}}function Zi(e,t){return e.size===0?false:jn(e,t)}function jn(e,t){if(e.has(t))return true;let r=T.parentNode(t);return r?jn(e,r):false}var qe;function Ol(e){qe=e;}function Il(){qe=void 0;}var L=e=>qe?(...r)=>{try{return e(...r)}catch(i){if(qe&&qe(i)===true)return;throw i}}:e,Re=[];function Ye(e){try{if("composedPath"in e){let t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0]}catch{}return e&&e.target}function Vn(e,t){let r=new ts;Re.push(r),r.init(e);let[i,s]=Dn(),a=new i(L(r.processMutations.bind(r)));return a.observe(t,{attributes:true,attributeOldValue:true,characterData:true,characterDataOldValue:true,childList:true,subtree:true}),[a,s]}function _l({mousemoveCb:e,sampling:t,doc:r,mirror:i}){if(t.mousemove===false)return ()=>{};let s=typeof t.mousemove=="number"?t.mousemove:50,a=typeof t.mousemoveCallback=="number"?t.mousemoveCallback:500,c=[],p,u=je(L(f=>{let l=Date.now()-p;e(c.map(o=>(o.timeOffset-=l,o)),f),c=[],p=null;}),a),d=L(je(L(f=>{let l=Ye(f),{clientX:o,clientY:m}=Qr(f)?f.changedTouches[0]:f;p||(p=He()),c.push({x:o,y:m,id:i.getId(l),timeOffset:He()-p}),u(typeof DragEvent<"u"&&f instanceof DragEvent?P.Drag:f instanceof MouseEvent?P.MouseMove:P.TouchMove);}),s,{trailing:!1})),n=[te("mousemove",d,r),te("touchmove",d,r),te("drag",d,r)];return L(()=>{n.forEach(f=>f());})}function kl({mouseInteractionCb:e,doc:t,mirror:r,blockClass:i,blockSelector:s,sampling:a}){if(a.mouseInteraction===false)return ()=>{};let c=a.mouseInteraction===true||a.mouseInteraction===void 0?{}:a.mouseInteraction,p=[],u=null,d=n=>f=>{let l=Ye(f);if(re(l,i,s,true))return;let o=null,m=n;if("pointerType"in f){switch(f.pointerType){case "mouse":o=ge.Mouse;break;case "touch":o=ge.Touch;break;case "pen":o=ge.Pen;break}o===ge.Touch?se[n]===se.MouseDown?m="TouchStart":se[n]===se.MouseUp&&(m="TouchEnd"):ge.Pen;}else Qr(f)&&(o=ge.Touch);o!==null?(u=o,(m.startsWith("Touch")&&o===ge.Touch||m.startsWith("Mouse")&&o===ge.Mouse)&&(o=null)):se[n]===se.Click&&(o=u,u=null);let h=Qr(f)?f.changedTouches[0]:f;if(!h)return;let g=r.getId(l),{clientX:v,clientY:b}=h;L(e)({type:se[m],id:g,x:v,y:b,...o!==null&&{pointerType:o}});};return Object.keys(se).filter(n=>Number.isNaN(Number(n))&&!n.endsWith("_Departed")&&c[n]!==false).forEach(n=>{let f=ve(n),l=d(n);if(window.PointerEvent)switch(se[n]){case se.MouseDown:case se.MouseUp:f=f.replace("mouse","pointer");break;case se.TouchStart:case se.TouchEnd:return}p.push(te(f,l,t));}),L(()=>{p.forEach(n=>n());})}function Gn({scrollCb:e,doc:t,mirror:r,blockClass:i,blockSelector:s,sampling:a}){let c=L(je(L(p=>{let u=Ye(p);if(!u||re(u,i,s,!0))return;let d=r.getId(u);if(u===t&&t.defaultView){let n=Pn(t.defaultView);e({id:d,x:n.left,y:n.top});}else e({id:d,x:u.scrollLeft,y:u.scrollTop});}),a.scroll||100));return te("scroll",c,t)}function Tl({viewportResizeCb:e},{win:t}){let r=-1,i=-1,s=L(je(L(()=>{let a=Ln(),c=Fn();(r!==a||i!==c)&&(e({width:Number(c),height:Number(a)}),r=a,i=c);}),200));return te("resize",s,t)}var Dl=["INPUT","TEXTAREA","SELECT"],en=new WeakMap;function Pl({inputCb:e,doc:t,mirror:r,blockClass:i,blockSelector:s,ignoreClass:a,ignoreSelector:c,maskInputOptions:p,maskInputFn:u,sampling:d,userTriggeredOnInput:n}){function f(b){let S=Ye(b),E=b.isTrusted,w=S&&S.tagName;if(S&&w==="OPTION"&&(S=T.parentElement(S)),!S||!w||Dl.indexOf(w)<0||re(S,i,s,true)||S.classList.contains(a)||c&&S.matches(c))return;let y=S.value,C=false,x=mt(S)||"";x==="radio"||x==="checkbox"?C=S.checked:(p[w.toLowerCase()]||p[x])&&(y=pt({element:S,maskInputOptions:p,tagName:w,type:x,value:y,maskInputFn:u})),l(S,n?{text:y,isChecked:C,userTriggered:E}:{text:y,isChecked:C});let A=S.name;x==="radio"&&A&&C&&t.querySelectorAll(`input[type="radio"][name="${A}"]`).forEach(M=>{if(M!==S){let _=M.value;l(M,n?{text:_,isChecked:!C,userTriggered:false}:{text:_,isChecked:!C});}});}function l(b,S){let E=en.get(b);if(!E||E.text!==S.text||E.isChecked!==S.isChecked){en.set(b,S);let w=r.getId(b);L(e)({...S,id:w});}}let m=(d.input==="last"?["change"]:["input","change"]).map(b=>te(b,L(f),t)),h=t.defaultView;if(!h)return ()=>{m.forEach(b=>b());};let g=h.Object.getOwnPropertyDescriptor(h.HTMLInputElement.prototype,"value"),v=[[h.HTMLInputElement.prototype,"value"],[h.HTMLInputElement.prototype,"checked"],[h.HTMLSelectElement.prototype,"value"],[h.HTMLTextAreaElement.prototype,"value"],[h.HTMLSelectElement.prototype,"selectedIndex"],[h.HTMLOptionElement.prototype,"selected"]];return g&&g.set&&m.push(...v.map(b=>kt(b[0],b[1],{set(){L(f)({target:this,isTrusted:false});}},false,h))),L(()=>{m.forEach(b=>b());})}function bt(e){let t=[];function r(i,s){if(ut("CSSGroupingRule")&&i.parentRule instanceof CSSGroupingRule||ut("CSSMediaRule")&&i.parentRule instanceof CSSMediaRule||ut("CSSSupportsRule")&&i.parentRule instanceof CSSSupportsRule||ut("CSSConditionRule")&&i.parentRule instanceof CSSConditionRule){let c=Array.from(i.parentRule.cssRules).indexOf(i);return s.unshift(c),r(i.parentRule,s)}else if(i.parentStyleSheet){let c=Array.from(i.parentStyleSheet.cssRules).indexOf(i);s.unshift(c);}return s}return r(e,t)}function Se(e,t,r){let i,s;return e?(e.ownerNode?i=t.getId(e.ownerNode):s=r.getId(e),{styleId:s,id:i}):{}}function Ll({styleSheetRuleCb:e,mirror:t,stylesheetManager:r},{win:i}){if(!i.CSSStyleSheet||!i.CSSStyleSheet.prototype)return ()=>{};let s=i.CSSStyleSheet.prototype.insertRule;i.CSSStyleSheet.prototype.insertRule=new Proxy(s,{apply:L((n,f,l)=>{let[o,m]=l,{id:h,styleId:g}=Se(f,t,r.styleMirror);return (h&&h!==-1||g&&g!==-1)&&e({id:h,styleId:g,adds:[{rule:o,index:m}]}),n.apply(f,l)})}),i.CSSStyleSheet.prototype.addRule=function(n,f,l=this.cssRules.length){let o=`${n} { ${f} }`;return i.CSSStyleSheet.prototype.insertRule.apply(this,[o,l])};let a=i.CSSStyleSheet.prototype.deleteRule;i.CSSStyleSheet.prototype.deleteRule=new Proxy(a,{apply:L((n,f,l)=>{let[o]=l,{id:m,styleId:h}=Se(f,t,r.styleMirror);return (m&&m!==-1||h&&h!==-1)&&e({id:m,styleId:h,removes:[{index:o}]}),n.apply(f,l)})}),i.CSSStyleSheet.prototype.removeRule=function(n){return i.CSSStyleSheet.prototype.deleteRule.apply(this,[n])};let c;i.CSSStyleSheet.prototype.replace&&(c=i.CSSStyleSheet.prototype.replace,i.CSSStyleSheet.prototype.replace=new Proxy(c,{apply:L((n,f,l)=>{let[o]=l,{id:m,styleId:h}=Se(f,t,r.styleMirror);return (m&&m!==-1||h&&h!==-1)&&e({id:m,styleId:h,replace:o}),n.apply(f,l)})}));let p;i.CSSStyleSheet.prototype.replaceSync&&(p=i.CSSStyleSheet.prototype.replaceSync,i.CSSStyleSheet.prototype.replaceSync=new Proxy(p,{apply:L((n,f,l)=>{let[o]=l,{id:m,styleId:h}=Se(f,t,r.styleMirror);return (m&&m!==-1||h&&h!==-1)&&e({id:m,styleId:h,replaceSync:o}),n.apply(f,l)})}));let u={};ct("CSSGroupingRule")?u.CSSGroupingRule=i.CSSGroupingRule:(ct("CSSMediaRule")&&(u.CSSMediaRule=i.CSSMediaRule),ct("CSSConditionRule")&&(u.CSSConditionRule=i.CSSConditionRule),ct("CSSSupportsRule")&&(u.CSSSupportsRule=i.CSSSupportsRule));let d={};return Object.entries(u).forEach(([n,f])=>{d[n]={insertRule:f.prototype.insertRule,deleteRule:f.prototype.deleteRule},f.prototype.insertRule=new Proxy(d[n].insertRule,{apply:L((l,o,m)=>{let[h,g]=m,{id:v,styleId:b}=Se(o.parentStyleSheet,t,r.styleMirror);return (v&&v!==-1||b&&b!==-1)&&e({id:v,styleId:b,adds:[{rule:h,index:[...bt(o),g||0]}]}),l.apply(o,m)})}),f.prototype.deleteRule=new Proxy(d[n].deleteRule,{apply:L((l,o,m)=>{let[h]=m,{id:g,styleId:v}=Se(o.parentStyleSheet,t,r.styleMirror);return (g&&g!==-1||v&&v!==-1)&&e({id:g,styleId:v,removes:[{index:[...bt(o),h]}]}),l.apply(o,m)})});}),L(()=>{i.CSSStyleSheet.prototype.insertRule=s,i.CSSStyleSheet.prototype.deleteRule=a,c&&(i.CSSStyleSheet.prototype.replace=c),p&&(i.CSSStyleSheet.prototype.replaceSync=p),Object.entries(u).forEach(([n,f])=>{f.prototype.insertRule=d[n].insertRule,f.prototype.deleteRule=d[n].deleteRule;});})}function Yn({mirror:e,stylesheetManager:t},r){var i,s,a;let c=null;r.nodeName==="#document"?c=e.getId(r):c=e.getId(T.host(r));let p=r.nodeName==="#document"?(i=r.defaultView)==null?void 0:i.Document:(a=(s=r.ownerDocument)==null?void 0:s.defaultView)==null?void 0:a.ShadowRoot,u=p?.prototype?Object.getOwnPropertyDescriptor(p?.prototype,"adoptedStyleSheets"):void 0;return c===null||c===-1||!p||!u?()=>{}:(Object.defineProperty(r,"adoptedStyleSheets",{configurable:u.configurable,enumerable:u.enumerable,get(){var d;return (d=u.get)==null?void 0:d.call(this)},set(d){var n;let f=(n=u.set)==null?void 0:n.call(this,d);if(c!==null&&c!==-1)try{t.adoptStyleSheets(d,c);}catch{}return f}}),L(()=>{Object.defineProperty(r,"adoptedStyleSheets",{configurable:u.configurable,enumerable:u.enumerable,get:u.get,set:u.set});}))}function Fl({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:r,stylesheetManager:i},{win:s}){let a=s.CSSStyleDeclaration.prototype.setProperty;s.CSSStyleDeclaration.prototype.setProperty=new Proxy(a,{apply:L((p,u,d)=>{var n;let[f,l,o]=d;if(r.has(f))return a.apply(u,[f,l,o]);let{id:m,styleId:h}=Se((n=u.parentRule)==null?void 0:n.parentStyleSheet,t,i.styleMirror);return (m&&m!==-1||h&&h!==-1)&&e({id:m,styleId:h,set:{property:f,value:l,priority:o},index:bt(u.parentRule)}),p.apply(u,d)})});let c=s.CSSStyleDeclaration.prototype.removeProperty;return s.CSSStyleDeclaration.prototype.removeProperty=new Proxy(c,{apply:L((p,u,d)=>{var n;let[f]=d;if(r.has(f))return c.apply(u,[f]);let{id:l,styleId:o}=Se((n=u.parentRule)==null?void 0:n.parentStyleSheet,t,i.styleMirror);return (l&&l!==-1||o&&o!==-1)&&e({id:l,styleId:o,remove:{property:f},index:bt(u.parentRule)}),p.apply(u,d)})}),L(()=>{s.CSSStyleDeclaration.prototype.setProperty=a,s.CSSStyleDeclaration.prototype.removeProperty=c;})}function Ul({mediaInteractionCb:e,blockClass:t,blockSelector:r,mirror:i,sampling:s,doc:a}){let c=L(u=>je(L(d=>{let n=Ye(d);if(!n||re(n,t,r,!0))return;let{currentTime:f,volume:l,muted:o,playbackRate:m,loop:h}=n;e({type:u,id:i.getId(n),currentTime:f,volume:l,muted:o,playbackRate:m,loop:h});}),s.media||500)),p=[te("play",c(Ie.Play),a),te("pause",c(Ie.Pause),a),te("seeked",c(Ie.Seeked),a),te("volumechange",c(Ie.VolumeChange),a),te("ratechange",c(Ie.RateChange),a)];return L(()=>{p.forEach(u=>u());})}function $l({fontCb:e,doc:t}){let r=t.defaultView;if(!r)return ()=>{};let i=[],s=new WeakMap,a=r.FontFace;r.FontFace=function(u,d,n){let f=new a(u,d,n);return s.set(f,{family:u,buffer:typeof d!="string",descriptors:n,fontSource:typeof d=="string"?d:JSON.stringify(Array.from(new Uint8Array(d)))}),f};let c=Ne(t.fonts,"add",function(p){return function(u){return setTimeout(L(()=>{let d=s.get(u);d&&(e(d),s.delete(u));}),0),p.apply(this,[u])}});return i.push(()=>{r.FontFace=a;}),i.push(c),L(()=>{i.forEach(p=>p());})}function Bl(e){let{doc:t,mirror:r,blockClass:i,blockSelector:s,selectionCb:a}=e,c=true,p=L(()=>{let u=t.getSelection();if(!u||c&&u?.isCollapsed)return;c=u.isCollapsed||!1;let d=[],n=u.rangeCount||0;for(let f=0;f<n;f++){let l=u.getRangeAt(f),{startContainer:o,startOffset:m,endContainer:h,endOffset:g}=l;re(o,i,s,!0)||re(h,i,s,!0)||d.push({start:r.getId(o),startOffset:m,end:r.getId(h),endOffset:g});}a({ranges:d});});return p(),te("selectionchange",p)}function Wl({doc:e,customElementCb:t}){let r=e.defaultView;return !r||!r.customElements?()=>{}:Ne(r.customElements,"define",function(s){return function(a,c,p){try{t({define:{name:a}});}catch{console.warn(`Custom element callback failed for ${a}`);}return s.apply(this,[a,c,p])}})}function zl(e,t){let{mutationCb:r,mousemoveCb:i,mouseInteractionCb:s,scrollCb:a,viewportResizeCb:c,inputCb:p,mediaInteractionCb:u,styleSheetRuleCb:d,styleDeclarationCb:n,canvasMutationCb:f,fontCb:l,selectionCb:o,customElementCb:m}=e;e.mutationCb=(...h)=>{t.mutation&&t.mutation(...h),r(...h);},e.mousemoveCb=(...h)=>{t.mousemove&&t.mousemove(...h),i(...h);},e.mouseInteractionCb=(...h)=>{t.mouseInteraction&&t.mouseInteraction(...h),s(...h);},e.scrollCb=(...h)=>{t.scroll&&t.scroll(...h),a(...h);},e.viewportResizeCb=(...h)=>{t.viewportResize&&t.viewportResize(...h),c(...h);},e.inputCb=(...h)=>{t.input&&t.input(...h),p(...h);},e.mediaInteractionCb=(...h)=>{t.mediaInteaction&&t.mediaInteaction(...h),u(...h);},e.styleSheetRuleCb=(...h)=>{t.styleSheetRule&&t.styleSheetRule(...h),d(...h);},e.styleDeclarationCb=(...h)=>{t.styleDeclaration&&t.styleDeclaration(...h),n(...h);},e.canvasMutationCb=(...h)=>{t.canvasMutation&&t.canvasMutation(...h),f(...h);},e.fontCb=(...h)=>{t.font&&t.font(...h),l(...h);},e.selectionCb=(...h)=>{t.selection&&t.selection(...h),o(...h);},e.customElementCb=(...h)=>{t.customElement&&t.customElement(...h),m(...h);};}function ql(e,t={}){let r=e.doc.defaultView;if(!r)return ()=>{};zl(e,t);let i,s=()=>{};e.recordDOM&&([i,s]=Vn(e,e.doc));let a=_l(e),c=kl(e),p=Gn(e),u=Tl(e,{win:r}),d=Pl(e),n=Ul(e),f=()=>{},l=()=>{},o=()=>{},m=()=>{};e.recordDOM&&(f=Ll(e,{win:r}),l=Yn(e,e.doc),o=Fl(e,{win:r}),e.collectFonts&&(m=$l(e)));let h=Bl(e),g=Wl(e),v=[];for(let b of e.plugins)v.push(b.observer(b.callback,r,b.options));return L(()=>{Re.forEach(b=>b.reset()),i?.disconnect(),s(),a(),c(),p(),u(),d(),n(),f(),l(),o(),m(),h(),g(),v.forEach(b=>b());})}function ut(e){return typeof window[e]<"u"}function ct(e){return !!(typeof window[e]<"u"&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}var St=class{constructor(t){O(this,"iframeIdToRemoteIdMap",new WeakMap),O(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=t;}getId(t,r,i,s){let a=i||this.getIdToRemoteIdMap(t),c=s||this.getRemoteIdToIdMap(t),p=a.get(r);return p||(p=this.generateIdFn(),a.set(r,p),c.set(p,r)),p}getIds(t,r){let i=this.getIdToRemoteIdMap(t),s=this.getRemoteIdToIdMap(t);return r.map(a=>this.getId(t,a,i,s))}getRemoteId(t,r,i){let s=i||this.getRemoteIdToIdMap(t);if(typeof r!="number")return r;let a=s.get(r);return a||-1}getRemoteIds(t,r){let i=this.getRemoteIdToIdMap(t);return r.map(s=>this.getRemoteId(t,s,i))}reset(t){if(!t){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(t),this.iframeRemoteIdToIdMap.delete(t);}getIdToRemoteIdMap(t){let r=this.iframeIdToRemoteIdMap.get(t);return r||(r=new Map,this.iframeIdToRemoteIdMap.set(t,r)),r}getRemoteIdToIdMap(t){let r=this.iframeRemoteIdToIdMap.get(t);return r||(r=new Map,this.iframeRemoteIdToIdMap.set(t,r)),r}},ss=class{constructor(t){O(this,"iframes",new WeakMap),O(this,"crossOriginIframeMap",new WeakMap),O(this,"crossOriginIframeMirror",new St(dn)),O(this,"crossOriginIframeStyleMirror"),O(this,"crossOriginIframeRootIdMap",new WeakMap),O(this,"mirror"),O(this,"mutationCb"),O(this,"wrappedEmit"),O(this,"loadListener"),O(this,"stylesheetManager"),O(this,"recordCrossOriginIframes"),this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new St(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=t.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this));}addIframe(t){this.iframes.set(t,true),t.contentWindow&&this.crossOriginIframeMap.set(t.contentWindow,t);}addLoadListener(t){this.loadListener=t;}attachIframe(t,r){var i,s;this.mutationCb({adds:[{parentId:this.mirror.getId(t),nextId:null,node:r}],removes:[],texts:[],attributes:[],isAttachIframe:true}),this.recordCrossOriginIframes&&((i=t.contentWindow)==null||i.addEventListener("message",this.handleMessage.bind(this))),(s=this.loadListener)==null||s.call(this,t),t.contentDocument&&t.contentDocument.adoptedStyleSheets&&t.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(t.contentDocument.adoptedStyleSheets,this.mirror.getId(t.contentDocument));}handleMessage(t){let r=t;if(r.data.type!=="rrweb"||r.origin!==r.data.origin||!t.source)return;let s=this.crossOriginIframeMap.get(t.source);if(!s)return;let a=this.transformCrossOriginEvent(s,r.data.event);a&&this.wrappedEmit(a,r.data.isCheckout);}transformCrossOriginEvent(t,r){var i;switch(r.type){case F.FullSnapshot:{this.crossOriginIframeMirror.reset(t),this.crossOriginIframeStyleMirror.reset(t),this.replaceIdOnNode(r.data.node,t);let s=r.data.node.id;return this.crossOriginIframeRootIdMap.set(t,s),this.patchRootIdOnNode(r.data.node,s),{timestamp:r.timestamp,type:F.IncrementalSnapshot,data:{source:P.Mutation,adds:[{parentId:this.mirror.getId(t),nextId:null,node:r.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:true}}}case F.Meta:case F.Load:case F.DomContentLoaded:return false;case F.Plugin:return r;case F.Custom:return this.replaceIds(r.data.payload,t,["id","parentId","previousId","nextId"]),r;case F.IncrementalSnapshot:switch(r.data.source){case P.Mutation:return r.data.adds.forEach(s=>{this.replaceIds(s,t,["parentId","nextId","previousId"]),this.replaceIdOnNode(s.node,t);let a=this.crossOriginIframeRootIdMap.get(t);a&&this.patchRootIdOnNode(s.node,a);}),r.data.removes.forEach(s=>{this.replaceIds(s,t,["parentId","id"]);}),r.data.attributes.forEach(s=>{this.replaceIds(s,t,["id"]);}),r.data.texts.forEach(s=>{this.replaceIds(s,t,["id"]);}),r;case P.Drag:case P.TouchMove:case P.MouseMove:return r.data.positions.forEach(s=>{this.replaceIds(s,t,["id"]);}),r;case P.ViewportResize:return false;case P.MediaInteraction:case P.MouseInteraction:case P.Scroll:case P.CanvasMutation:case P.Input:return this.replaceIds(r.data,t,["id"]),r;case P.StyleSheetRule:case P.StyleDeclaration:return this.replaceIds(r.data,t,["id"]),this.replaceStyleIds(r.data,t,["styleId"]),r;case P.Font:return r;case P.Selection:return r.data.ranges.forEach(s=>{this.replaceIds(s,t,["start","end"]);}),r;case P.AdoptedStyleSheet:return this.replaceIds(r.data,t,["id"]),this.replaceStyleIds(r.data,t,["styleIds"]),(i=r.data.styles)==null||i.forEach(s=>{this.replaceStyleIds(s,t,["styleId"]);}),r}}return false}replace(t,r,i,s){for(let a of s)!Array.isArray(r[a])&&typeof r[a]!="number"||(Array.isArray(r[a])?r[a]=t.getIds(i,r[a]):r[a]=t.getId(i,r[a]));return r}replaceIds(t,r,i){return this.replace(this.crossOriginIframeMirror,t,r,i)}replaceStyleIds(t,r,i){return this.replace(this.crossOriginIframeStyleMirror,t,r,i)}replaceIdOnNode(t,r){this.replaceIds(t,r,["id","rootId"]),"childNodes"in t&&t.childNodes.forEach(i=>{this.replaceIdOnNode(i,r);});}patchRootIdOnNode(t,r){t.type!==Hn.Document&&!t.rootId&&(t.rootId=r),"childNodes"in t&&t.childNodes.forEach(i=>{this.patchRootIdOnNode(i,r);});}},is=class{constructor(t){O(this,"shadowDoms",new WeakSet),O(this,"mutationCb"),O(this,"scrollCb"),O(this,"bypassOptions"),O(this,"mirror"),O(this,"restoreHandlers",[]),this.mutationCb=t.mutationCb,this.scrollCb=t.scrollCb,this.bypassOptions=t.bypassOptions,this.mirror=t.mirror,this.init();}init(){this.reset(),this.patchAttachShadow(Element,document);}addShadowRoot(t,r){if(!ze(t)||this.shadowDoms.has(t))return;this.shadowDoms.add(t);let[i]=Vn({...this.bypassOptions,doc:r,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},t);this.restoreHandlers.push(()=>i.disconnect()),this.restoreHandlers.push(Gn({...this.bypassOptions,scrollCb:this.scrollCb,doc:t,mirror:this.mirror})),setTimeout(()=>{t.adoptedStyleSheets&&t.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(t.adoptedStyleSheets,this.mirror.getId(T.host(t))),this.restoreHandlers.push(Yn({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},t));},0);}observeAttachShadow(t){!t.contentWindow||!t.contentDocument||this.patchAttachShadow(t.contentWindow.Element,t.contentDocument);}patchAttachShadow(t,r){let i=this;this.restoreHandlers.push(Ne(t.prototype,"attachShadow",function(s){return function(a){let c=s.call(this,a),p=T.shadowRoot(this);return p&&qn(this)&&i.addShadowRoot(p,r),c}}));}reset(){this.restoreHandlers.forEach(t=>{try{t();}catch{}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet;}},Te="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Hl=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(Be=0;Be<Te.length;Be++)Hl[Te.charCodeAt(Be)]=Be;var Be,jl=function(e){var t=new Uint8Array(e),r,i=t.length,s="";for(r=0;r<i;r+=3)s+=Te[t[r]>>2],s+=Te[(t[r]&3)<<4|t[r+1]>>4],s+=Te[(t[r+1]&15)<<2|t[r+2]>>6],s+=Te[t[r+2]&63];return i%3===2?s=s.substring(0,s.length-1)+"=":i%3===1&&(s=s.substring(0,s.length-2)+"=="),s};var tn=new Map;function Vl(e,t){let r=tn.get(e);return r||(r=new Map,tn.set(e,r)),r.has(t)||r.set(t,[]),r.get(t)}var Xn=(e,t,r)=>{if(!e||!(Kn(e,t)||typeof e=="object"))return;let i=e.constructor.name,s=Vl(r,i),a=s.indexOf(e);return a===-1&&(a=s.length,s.push(e)),a};function ht(e,t,r){if(e instanceof Array)return e.map(i=>ht(i,t,r));if(e===null)return e;if(e instanceof Float32Array||e instanceof Float64Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Uint8Array||e instanceof Uint16Array||e instanceof Int16Array||e instanceof Int8Array||e instanceof Uint8ClampedArray)return {rr_type:e.constructor.name,args:[Object.values(e)]};if(e instanceof ArrayBuffer){let i=e.constructor.name,s=jl(e);return {rr_type:i,base64:s}}else {if(e instanceof DataView)return {rr_type:e.constructor.name,args:[ht(e.buffer,t,r),e.byteOffset,e.byteLength]};if(e instanceof HTMLImageElement){let i=e.constructor.name,{src:s}=e;return {rr_type:i,src:s}}else if(e instanceof HTMLCanvasElement){let i="HTMLImageElement",s=e.toDataURL();return {rr_type:i,src:s}}else {if(e instanceof ImageData)return {rr_type:e.constructor.name,args:[ht(e.data,t,r),e.width,e.height]};if(Kn(e,t)||typeof e=="object"){let i=e.constructor.name,s=Xn(e,t,r);return {rr_type:i,index:s}}}}return e}var Jn=(e,t,r)=>e.map(i=>ht(i,t,r)),Kn=(e,t)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(s=>typeof t[s]=="function").find(s=>e instanceof t[s]);function Gl(e,t,r,i){let s=[],a=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype);for(let c of a)try{if(typeof t.CanvasRenderingContext2D.prototype[c]!="function")continue;let p=Ne(t.CanvasRenderingContext2D.prototype,c,function(u){return function(...d){return re(this.canvas,r,i,!0)||setTimeout(()=>{let n=Jn(d,t,this);e(this.canvas,{type:De["2D"],property:c,args:n});},0),u.apply(this,d)}});s.push(p);}catch{let p=kt(t.CanvasRenderingContext2D.prototype,c,{set(u){e(this.canvas,{type:De["2D"],property:c,args:[u],setter:true});}});s.push(p);}return ()=>{s.forEach(c=>c());}}function Yl(e){return e==="experimental-webgl"?"webgl":e}function rn(e,t,r,i){let s=[];try{let a=Ne(e.HTMLCanvasElement.prototype,"getContext",function(c){return function(p,...u){if(!re(this,t,r,!0)){let d=Yl(p);if("__context"in this||(this.__context=d),i&&["webgl","webgl2"].includes(d))if(u[0]&&typeof u[0]=="object"){let n=u[0];n.preserveDrawingBuffer||(n.preserveDrawingBuffer=!0);}else u.splice(0,1,{preserveDrawingBuffer:!0});}return c.apply(this,[p,...u])}});s.push(a);}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext");}return ()=>{s.forEach(a=>a());}}function sn(e,t,r,i,s,a){let c=[],p=Object.getOwnPropertyNames(e);for(let u of p)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(u))try{if(typeof e[u]!="function")continue;let d=Ne(e,u,function(n){return function(...f){let l=n.apply(this,f);if(Xn(l,a,this),"tagName"in this.canvas&&!re(this.canvas,i,s,!0)){let o=Jn(f,a,this),m={type:t,property:u,args:o};r(this.canvas,m);}return l}});c.push(d);}catch{let d=kt(e,u,{set(n){r(this.canvas,{type:t,property:u,args:[n],setter:true});}});c.push(d);}return c}function Xl(e,t,r,i){let s=[];return typeof t.WebGLRenderingContext<"u"&&s.push(...sn(t.WebGLRenderingContext.prototype,De.WebGL,e,r,i,t)),typeof t.WebGL2RenderingContext<"u"&&s.push(...sn(t.WebGL2RenderingContext.prototype,De.WebGL2,e,r,i,t)),()=>{s.forEach(a=>a());}}var Qn=`(function() {
60
+ "use strict";
61
+ var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
62
+ var lookup = typeof Uint8Array === "undefined" ? [] : new Uint8Array(256);
63
+ for (var i = 0; i < chars.length; i++) {
64
+ lookup[chars.charCodeAt(i)] = i;
65
+ }
66
+ var encode = function(arraybuffer) {
67
+ var bytes = new Uint8Array(arraybuffer), i2, len = bytes.length, base64 = "";
68
+ for (i2 = 0; i2 < len; i2 += 3) {
69
+ base64 += chars[bytes[i2] >> 2];
70
+ base64 += chars[(bytes[i2] & 3) << 4 | bytes[i2 + 1] >> 4];
71
+ base64 += chars[(bytes[i2 + 1] & 15) << 2 | bytes[i2 + 2] >> 6];
72
+ base64 += chars[bytes[i2 + 2] & 63];
73
+ }
74
+ if (len % 3 === 2) {
75
+ base64 = base64.substring(0, base64.length - 1) + "=";
76
+ } else if (len % 3 === 1) {
77
+ base64 = base64.substring(0, base64.length - 2) + "==";
78
+ }
79
+ return base64;
80
+ };
81
+ const lastBlobMap = /* @__PURE__ */ new Map();
82
+ const transparentBlobMap = /* @__PURE__ */ new Map();
83
+ async function getTransparentBlobFor(width, height, dataURLOptions) {
84
+ const id = \`\${width}-\${height}\`;
85
+ if ("OffscreenCanvas" in globalThis) {
86
+ if (transparentBlobMap.has(id)) return transparentBlobMap.get(id);
87
+ const offscreen = new OffscreenCanvas(width, height);
88
+ offscreen.getContext("2d");
89
+ const blob = await offscreen.convertToBlob(dataURLOptions);
90
+ const arrayBuffer = await blob.arrayBuffer();
91
+ const base64 = encode(arrayBuffer);
92
+ transparentBlobMap.set(id, base64);
93
+ return base64;
94
+ } else {
95
+ return "";
96
+ }
97
+ }
98
+ const worker = self;
99
+ worker.onmessage = async function(e) {
100
+ if ("OffscreenCanvas" in globalThis) {
101
+ const { id, bitmap, width, height, dataURLOptions } = e.data;
102
+ const transparentBase64 = getTransparentBlobFor(
103
+ width,
104
+ height,
105
+ dataURLOptions
106
+ );
107
+ const offscreen = new OffscreenCanvas(width, height);
108
+ const ctx = offscreen.getContext("2d");
109
+ ctx.drawImage(bitmap, 0, 0);
110
+ bitmap.close();
111
+ const blob = await offscreen.convertToBlob(dataURLOptions);
112
+ const type = blob.type;
113
+ const arrayBuffer = await blob.arrayBuffer();
114
+ const base64 = encode(arrayBuffer);
115
+ if (!lastBlobMap.has(id) && await transparentBase64 === base64) {
116
+ lastBlobMap.set(id, base64);
117
+ return worker.postMessage({ id });
118
+ }
119
+ if (lastBlobMap.get(id) === base64) return worker.postMessage({ id });
120
+ worker.postMessage({
121
+ id,
122
+ type,
123
+ base64,
124
+ width,
125
+ height
126
+ });
127
+ lastBlobMap.set(id, base64);
128
+ } else {
129
+ return worker.postMessage({ id: e.data.id });
130
+ }
131
+ };
132
+ })();
133
+ //# sourceMappingURL=image-bitmap-data-url-worker-IJpC7g_b.js.map
134
+ `,nn=typeof self<"u"&&self.Blob&&new Blob([Qn],{type:"text/javascript;charset=utf-8"});function Jl(e){let t;try{if(t=nn&&(self.URL||self.webkitURL).createObjectURL(nn),!t)throw "";let r=new Worker(t,{name:e?.name});return r.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(t);}),r}catch{return new Worker("data:text/javascript;charset=utf-8,"+encodeURIComponent(Qn),{name:e?.name})}finally{t&&(self.URL||self.webkitURL).revokeObjectURL(t);}}var ns=class{constructor(t){O(this,"pendingCanvasMutations",new Map),O(this,"rafStamps",{latestId:0,invokeId:null}),O(this,"mirror"),O(this,"mutationCb"),O(this,"resetObservers"),O(this,"frozen",false),O(this,"locked",false),O(this,"processMutation",(u,d)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(u)||this.pendingCanvasMutations.set(u,[]),this.pendingCanvasMutations.get(u).push(d);});let{sampling:r="all",win:i,blockClass:s,blockSelector:a,recordCanvas:c,dataURLOptions:p}=t;this.mutationCb=t.mutationCb,this.mirror=t.mirror,c&&r==="all"&&this.initCanvasMutationObserver(i,s,a),c&&typeof r=="number"&&this.initCanvasFPSObserver(r,i,s,a,{dataURLOptions:p});}reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers();}freeze(){this.frozen=true;}unfreeze(){this.frozen=false;}lock(){this.locked=true;}unlock(){this.locked=false;}initCanvasFPSObserver(t,r,i,s,a){let c=rn(r,i,s,true),p=new Map,u=new Jl;u.onmessage=m=>{let{id:h}=m.data;if(p.set(h,false),!("base64"in m.data))return;let{base64:g,type:v,width:b,height:S}=m.data;this.mutationCb({id:h,type:De["2D"],commands:[{property:"clearRect",args:[0,0,b,S]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:g}],type:v}]},0,0]}]});};let d=1e3/t,n=0,f,l=()=>{let m=[];return r.document.querySelectorAll("canvas").forEach(h=>{re(h,i,s,true)||m.push(h);}),m},o=m=>{if(n&&m-n<d){f=requestAnimationFrame(o);return}n=m,l().forEach(async h=>{var g;let v=this.mirror.getId(h);if(p.get(v)||h.width===0||h.height===0)return;if(p.set(v,true),["webgl","webgl2"].includes(h.__context)){let S=h.getContext(h.__context);((g=S?.getContextAttributes())==null?void 0:g.preserveDrawingBuffer)===false&&S.clear(S.COLOR_BUFFER_BIT);}let b=await createImageBitmap(h);u.postMessage({id:v,bitmap:b,width:h.width,height:h.height,dataURLOptions:a.dataURLOptions},[b]);}),f=requestAnimationFrame(o);};f=requestAnimationFrame(o),this.resetObservers=()=>{c(),cancelAnimationFrame(f);};}initCanvasMutationObserver(t,r,i){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();let s=rn(t,r,i,false),a=Gl(this.processMutation.bind(this),t,r,i),c=Xl(this.processMutation.bind(this),t,r,i);this.resetObservers=()=>{s(),a(),c();};}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations());}startRAFTimestamping(){let t=r=>{this.rafStamps.latestId=r,requestAnimationFrame(t);};requestAnimationFrame(t);}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((t,r)=>{let i=this.mirror.getId(r);this.flushPendingCanvasMutationFor(r,i);}),requestAnimationFrame(()=>this.flushPendingCanvasMutations());}flushPendingCanvasMutationFor(t,r){if(this.frozen||this.locked)return;let i=this.pendingCanvasMutations.get(t);if(!i||r===-1)return;let s=i.map(c=>{let{type:p,...u}=c;return u}),{type:a}=i[0];this.mutationCb({id:r,type:a,commands:s}),this.pendingCanvasMutations.delete(t);}},os=class{constructor(t){O(this,"trackedLinkElements",new WeakSet),O(this,"mutationCb"),O(this,"adoptedStyleSheetCb"),O(this,"styleMirror",new es),this.mutationCb=t.mutationCb,this.adoptedStyleSheetCb=t.adoptedStyleSheetCb;}attachLinkElement(t,r){"_cssText"in r.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:r.id,attributes:r.attributes}]}),this.trackLinkElement(t);}trackLinkElement(t){this.trackedLinkElements.has(t)||(this.trackedLinkElements.add(t),this.trackStylesheetInLinkElement(t));}adoptStyleSheets(t,r){if(t.length===0)return;let i={id:r,styleIds:[]},s=[];for(let a of t){let c;this.styleMirror.has(a)?c=this.styleMirror.getId(a):(c=this.styleMirror.add(a),s.push({styleId:c,rules:Array.from(a.rules||CSSRule,(p,u)=>({rule:hn(p,a.href),index:u}))})),i.styleIds.push(c);}s.length>0&&(i.styles=s),this.adoptedStyleSheetCb(i);}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet;}trackStylesheetInLinkElement(t){}},as=class{constructor(){O(this,"nodeMap",new WeakMap),O(this,"active",false);}inOtherBuffer(t,r){let i=this.nodeMap.get(t);return i&&Array.from(i).some(s=>s!==r)}add(t,r){this.active||(this.active=true,requestAnimationFrame(()=>{this.nodeMap=new WeakMap,this.active=false;})),this.nodeMap.set(t,(this.nodeMap.get(t)||new Set).add(r));}destroy(){}},G,ft,Xr,vt=false;try{if(Array.from([1],e=>e*2)[0]!==2){let e=document.createElement("iframe");document.body.appendChild(e),Array.from=((Us=e.contentWindow)==null?void 0:Us.Array.from)||Array.from,document.body.removeChild(e);}}catch(e){console.debug("Unable to override Array.from",e);}var fe=aa();function ye(e={}){let{emit:t,checkoutEveryNms:r,checkoutEveryNth:i,blockClass:s="rr-block",blockSelector:a=null,ignoreClass:c="rr-ignore",ignoreSelector:p=null,maskTextClass:u="rr-mask",maskTextSelector:d=null,inlineStylesheet:n=true,maskAllInputs:f,maskInputOptions:l,slimDOMOptions:o,maskInputFn:m,maskTextFn:h,hooks:g,packFn:v,sampling:b={},dataURLOptions:S={},mousemoveWait:E,recordDOM:w=true,recordCanvas:y=false,recordCrossOriginIframes:C=false,recordAfter:x=e.recordAfter==="DOMContentLoaded"?e.recordAfter:"load",userTriggeredOnInput:A=false,collectFonts:M=false,inlineImages:_=false,plugins:I,keepIframeSrcFn:R=()=>false,ignoreCSSAttributes:ce=new Set([]),errorHandler:ie}=e;Ol(ie);let $=C?window.parent===window:true,U=false;if(!$)try{window.parent.document&&(U=!1);}catch{U=true;}if($&&!t)throw new Error("emit function is required");if(!$&&!U)return ()=>{};E!==void 0&&b.mousemove===void 0&&(b.mousemove=E),fe.reset();let Y=f===true?{color:true,date:true,"datetime-local":true,email:true,month:true,number:true,range:true,search:true,tel:true,text:true,time:true,url:true,week:true,textarea:true,select:true,password:true}:l!==void 0?l:{password:true},Q=yn(o);xl();let X,B=0,we=k=>{for(let J of I||[])J.eventProcessor&&(k=J.eventProcessor(k));return v&&!U&&(k=v(k)),k};G=(k,J)=>{var W;let V=k;if(V.timestamp=He(),(W=Re[0])!=null&&W.isFrozen()&&V.type!==F.FullSnapshot&&!(V.type===F.IncrementalSnapshot&&V.data.source===P.Mutation)&&Re.forEach(ne=>ne.unfreeze()),$)t?.(we(V),J);else if(U){let ne={type:"rrweb",event:we(V),origin:window.location.origin,isCheckout:J};window.parent.postMessage(ne,"*");}if(V.type===F.FullSnapshot)X=V,B=0;else if(V.type===F.IncrementalSnapshot){if(V.data.source===P.Mutation&&V.data.isAttachIframe)return;B++;let ne=i&&B>=i,z=r&&V.timestamp-X.timestamp>r;(ne||z)&&ft(true);}};let N=k=>{G({type:F.IncrementalSnapshot,data:{source:P.Mutation,...k}});},me=k=>G({type:F.IncrementalSnapshot,data:{source:P.Scroll,...k}}),le=k=>G({type:F.IncrementalSnapshot,data:{source:P.CanvasMutation,...k}}),Ue=k=>G({type:F.IncrementalSnapshot,data:{source:P.AdoptedStyleSheet,...k}}),ee=new os({mutationCb:N,adoptedStyleSheetCb:Ue}),he=new ss({mirror:fe,mutationCb:N,stylesheetManager:ee,recordCrossOriginIframes:C,wrappedEmit:G});for(let k of I||[])k.getMirror&&k.getMirror({nodeMirror:fe,crossOriginIframeMirror:he.crossOriginIframeMirror,crossOriginIframeStyleMirror:he.crossOriginIframeStyleMirror});let Ee=new as;Xr=new ns({recordCanvas:y,mutationCb:le,win:window,blockClass:s,blockSelector:a,mirror:fe,sampling:b.canvas,dataURLOptions:S});let be=new is({mutationCb:N,scrollCb:me,bypassOptions:{blockClass:s,blockSelector:a,maskTextClass:u,maskTextSelector:d,inlineStylesheet:n,maskInputOptions:Y,dataURLOptions:S,maskTextFn:h,maskInputFn:m,recordCanvas:y,inlineImages:_,sampling:b,slimDOMOptions:Q,iframeManager:he,stylesheetManager:ee,canvasManager:Xr,keepIframeSrcFn:R,processedNodeManager:Ee},mirror:fe});ft=(k=false)=>{if(!w)return;G({type:F.Meta,data:{href:window.location.href,width:Fn(),height:Ln()}},k),ee.reset(),be.init(),Re.forEach(W=>W.lock());let J=_a(document,{mirror:fe,blockClass:s,blockSelector:a,maskTextClass:u,maskTextSelector:d,inlineStylesheet:n,maskAllInputs:Y,maskTextFn:h,maskInputFn:m,slimDOM:Q,dataURLOptions:S,recordCanvas:y,inlineImages:_,onSerialize:W=>{Bn(W,fe)&&he.addIframe(W),Wn(W,fe)&&ee.trackLinkElement(W),Zr(W)&&be.addShadowRoot(T.shadowRoot(W),document);},onIframeLoad:(W,V)=>{he.attachIframe(W,V),be.observeAttachShadow(W);},onStylesheetLoad:(W,V)=>{ee.attachLinkElement(W,V);},keepIframeSrcFn:R});if(!J)return console.warn("Failed to snapshot the document");G({type:F.FullSnapshot,data:{node:J,initialOffset:Pn(window)}},k),Re.forEach(W=>W.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&ee.adoptStyleSheets(document.adoptedStyleSheets,fe.getId(document));};try{let k=[],J=V=>{var ne;return L(ql)({mutationCb:N,mousemoveCb:(z,zt)=>G({type:F.IncrementalSnapshot,data:{source:zt,positions:z}}),mouseInteractionCb:z=>G({type:F.IncrementalSnapshot,data:{source:P.MouseInteraction,...z}}),scrollCb:me,viewportResizeCb:z=>G({type:F.IncrementalSnapshot,data:{source:P.ViewportResize,...z}}),inputCb:z=>G({type:F.IncrementalSnapshot,data:{source:P.Input,...z}}),mediaInteractionCb:z=>G({type:F.IncrementalSnapshot,data:{source:P.MediaInteraction,...z}}),styleSheetRuleCb:z=>G({type:F.IncrementalSnapshot,data:{source:P.StyleSheetRule,...z}}),styleDeclarationCb:z=>G({type:F.IncrementalSnapshot,data:{source:P.StyleDeclaration,...z}}),canvasMutationCb:le,fontCb:z=>G({type:F.IncrementalSnapshot,data:{source:P.Font,...z}}),selectionCb:z=>{G({type:F.IncrementalSnapshot,data:{source:P.Selection,...z}});},customElementCb:z=>{G({type:F.IncrementalSnapshot,data:{source:P.CustomElement,...z}});},blockClass:s,ignoreClass:c,ignoreSelector:p,maskTextClass:u,maskTextSelector:d,maskInputOptions:Y,inlineStylesheet:n,sampling:b,recordDOM:w,recordCanvas:y,inlineImages:_,userTriggeredOnInput:A,collectFonts:M,doc:V,maskInputFn:m,maskTextFn:h,keepIframeSrcFn:R,blockSelector:a,slimDOMOptions:Q,dataURLOptions:S,mirror:fe,iframeManager:he,stylesheetManager:ee,shadowDomManager:be,processedNodeManager:Ee,canvasManager:Xr,ignoreCSSAttributes:ce,plugins:((ne=I?.filter(z=>z.observer))==null?void 0:ne.map(z=>({observer:z.observer,options:z.options,callback:zt=>G({type:F.Plugin,data:{plugin:z.name,payload:zt}})})))||[]},g)};he.addLoadListener(V=>{try{k.push(J(V.contentDocument));}catch(ne){console.warn(ne);}});let W=()=>{ft(),k.push(J(document)),vt=!0;};return ["interactive","complete"].includes(document.readyState)?W():(k.push(te("DOMContentLoaded",()=>{G({type:F.DomContentLoaded,data:{}}),x==="DOMContentLoaded"&&W();})),k.push(te("load",()=>{G({type:F.Load,data:{}}),x==="load"&&W();},window))),()=>{k.forEach(V=>{try{V();}catch(ne){String(ne).toLowerCase().includes("cross-origin")||console.warn(ne);}}),Ee.destroy(),vt=!1,Il();}}catch(k){console.warn(k);}}ye.addCustomEvent=(e,t)=>{if(!vt)throw new Error("please add custom event after start recording");G({type:F.Custom,data:{tag:e,payload:t}});};ye.freezePage=()=>{Re.forEach(e=>e.freeze());};ye.takeFullSnapshot=e=>{if(!vt)throw new Error("please take full snapshot after start recording");ft(e);};ye.mirror=fe;var on;(function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped";})(on||(on={}));var xs={replay:"sypnia:replay"};function Zn(e){try{return window.localStorage.getItem(e)}catch{return null}}function eo(e,t){try{return window.localStorage.setItem(e,t),!0}catch{return false}}function D(e){try{return e()}catch{return}}function to(e,t=2e3){let r=globalThis.requestIdleCallback;try{if(typeof r=="function"){r(e,{timeout:t});return}}catch{}setTimeout(e,0);}function ro(){return typeof CompressionStream=="function"&&typeof Response=="function"}async function so(e){let t=new TextEncoder().encode(e),r=new ReadableStream({start(i){i.enqueue(t),i.close();}});return new Response(r.pipeThrough(new CompressionStream("gzip"))).arrayBuffer()}function io(e,t){if(!e)return null;let r=Number(e);if(Number.isFinite(r))return Math.max(0,r*1e3);let i=Date.parse(e);return Number.isFinite(i)?Math.max(0,i-t):null}var no="[data-sypnia-mask]",oo="iframe, frame, object, embed, video, [data-sypnia-block]",Os='[contenteditable]:not([contenteditable="false"])',Kl=new Set(["access_token","refresh_token","token","code"]),Ql=["href","action","formaction"],Zl=["title","alt","placeholder","aria-label","aria-description","aria-valuetext","aria-placeholder","data-tooltip","data-tip","data-title","data-label"],eu=new Set(["data-sypnia-mask","data-sypnia-block","data-state","data-slot","data-side","data-align","data-orientation","data-disabled","data-highlighted","data-selected","data-active","data-variant","data-size","data-testid"]),tu=/^\s*(true|false)?\s*$/i,ru=/^(\s*(?:mailto|tel|sms):)([\s\S]*)$/i,su=new Set(["input","textarea","select"]),iu=(()=>{try{return new RegExp("[\\p{L}\\p{N}]","gu")}catch{return /[A-Za-z0-9\u00C0-\u024F\u0370-\u03FF\u0400-\u04FF]/g}})(),As=0,nu=2,ou=3,au=2,lu=3,uu=4,uo=0,cu=5,hu=new Set([1,6,12]),fu=14;function ao(e){try{return document.createDocumentFragment().querySelector(e),!0}catch{return false}}function co(e){let t=e.maskSelector?.trim()||null,r=e.blockSelector?.trim()||null,i=t!==null&&!ao(t),s=e.maskAllText||i;return {policy:s?2:1,all:s,maskSelector:t&&!i?`${no}, ${t}`:no,blockSelector:r&&ao(r)?`${oo}, ${r}`:oo}}function Je(e){return e.replace(iu,"*")}function Le(e){return "*".repeat(e.length)}function Dt(e,t){if(!e)return null;try{let r=e.nodeType===1?e:e.parentElement;return r?r.closest(t):null}catch{return null}}var du=e=>Le(e),pu=(e,t)=>Dt(t,Os)?Le(e):Je(e);function ho(e){return {maskAllInputs:true,maskInputFn:du,maskTextSelector:e.all?"*":`${e.maskSelector}, ${Os}`,maskTextFn:pu,blockSelector:e.blockSelector,inlineImages:false,inlineStylesheet:true,recordCanvas:false}}function mu(e){try{return decodeURIComponent(e.replace(/\+/g," ")).trim().toLowerCase()}catch{return e.trim().toLowerCase()}}function Ms(e){let t=e.split("&"),r=t.filter(i=>{let s=i.indexOf("=");return !Kl.has(mu(s>=0?i.slice(0,s):i))});return r.length===t.length?null:r.filter(Boolean).join("&")}function fo(e){if(!/[?#]/.test(e)||/^\s*(mailto|tel|sms):/i.test(e))return e;let t=e.indexOf("#"),r=t>=0?e.slice(0,t):e,i=t>=0?e.slice(t+1):null,s=r.indexOf("?"),a=false,c=s>=0?r.slice(0,s):r;if(s>=0){let p=r.slice(s+1),u=Ms(p);u!==null&&(a=true);let d=u??p;d&&(c+=`?${d}`);}if(i!==null){let p=i.indexOf("?"),u=i;if(p>=0){let d=Ms(i.slice(p+1));d!==null&&(a=true,u=d?`${i.slice(0,p)}?${d}`:i.slice(0,p));}else if(i.includes("=")){let d=Ms(i);d!==null&&(a=true,u=d);}u&&(c+=`#${u}`);}return a?c:e}function po(e,t,r){for(let a of Ql){let c=e[a];typeof c=="string"&&c&&(e[a]=fo(c));}if(su.has(t)&&"value"in e&&(t==="input"&&String(e.type??"").trim().toLowerCase()==="hidden"?delete e.value:typeof e.value=="string"&&(e.value=Le(e.value))),t==="option"&&delete e.selected,!r)return;for(let a of Object.keys(e)){let c=e[a];if(typeof c!="string"||!c)continue;let p=Zl.includes(a),u=a.startsWith("data-")&&!eu.has(a)&&!a.startsWith("data-rr");(p||u&&!tu.test(c))&&(e[a]=Je(c));}let i=e.href,s=typeof i=="string"?ru.exec(i):null;s&&(e.href=`${s[1]??""}${Je(s[2]??"")}`),delete e.checked,delete e.selected;}function gu(e,t,r){if(!e)return false;try{if((e.nodeType===9?e:e.ownerDocument)!==document)return !0;let i=r?e:e.parentNode??e.host??null;for(;i;){if(i.nodeType===11){i=i.host??null;continue}if(i.nodeType!==1){i=i.parentNode;continue}if(i.closest(t.blockSelector))return !0;let s=i.getRootNode();i=s.nodeType===11?s:null;}return !1}catch{return true}}function yu(e,t,r){if(Ke(e,"rr_width")||Ke(e,"rr_height"))return true;try{return t!==null&&t.nodeType===1&&t.matches(r.blockSelector)}catch{return false}}function wu(e,t){let r={};for(let i of ["rr_width","rr_height"])Ke(t,i)&&(r[i]=t?.[i]);e.attributes=r,e.childNodes=[],delete e.isShadowHost;}function Pe(e,t){if(!e||typeof t!="number")return null;try{return e(t)??null}catch{return null}}function Ke(e,t){return !!e&&Object.prototype.hasOwnProperty.call(e,t)}function bu(e){return Ke(e,"contenteditable")?String(e?.contenteditable).trim().toLowerCase()!=="false":false}function Tt(e,t){return {masked:t.all||Dt(e,t.maskSelector)!==null,editable:Dt(e,Os)!==null}}function lo(e,t,r,i){if(!e||typeof e!="object")return;let s=i??{masked:t.all,editable:false},a=[{node:e,context:s,parentTag:""}];for(;a.length>0;){let c=a.pop();if(!c)break;let{node:p,parentTag:u}=c,d=c.context,n="";if(p.type===nu){n=typeof p.tagName=="string"?p.tagName.toLowerCase():"";let l=p.attributes&&typeof p.attributes=="object"?p.attributes:void 0,o=Pe(r,p.id);if(yu(l,o,t)){wu(p,l);continue}let m=d.masked||Ke(l,"data-sypnia-mask")||o!==null&&Dt(o,t.maskSelector)!==null;d={masked:m,editable:d.editable||bu(l)},l&&po(l,n,m);}else if(p.type===ou&&typeof p.textContent=="string"&&p.textContent){let l=p.isStyle===true||u==="style"||u==="script";u==="textarea"||d.editable?p.textContent=Le(p.textContent):d.masked&&!l&&(p.textContent=Je(p.textContent));}let f=p.childNodes;if(Array.isArray(f)){f.some(l=>l?.type===As)&&(f=p.childNodes=f.filter(l=>l?.type!==As));for(let l=f.length-1;l>=0;l--){let o=f[l];o&&typeof o=="object"&&a.push({node:o,context:d,parentTag:n});}}}}var Xe=e=>Array.isArray(e)?e:[];function Su(e,t,r){let i=new Map,s=(a,c)=>{let p=`${String(a)}:${c?1:0}`,u=i.get(p);return u===void 0&&i.set(p,u=gu(Pe(r,a),t,c)),u};if(e.source===uo){let a=Xe(e.adds).filter(d=>!!d&&d.node?.type!==As&&!s(d.parentId,true)),c=Xe(e.removes).filter(d=>!!d&&!s(d.parentId,true)),p=Xe(e.attributes).filter(d=>!!d&&!s(d.id,true)),u=Xe(e.texts).filter(d=>!!d&&!s(d.id,true));return Array.isArray(e.adds)&&(e.adds=a),Array.isArray(e.removes)&&(e.removes=c),Array.isArray(e.attributes)&&(e.attributes=p),Array.isArray(e.texts)&&(e.texts=u),a.length+c.length+p.length+u.length===0}return typeof e.source=="number"&&hu.has(e.source)&&Array.isArray(e.positions)?(e.positions=e.positions.filter(a=>!!a&&!s(a.id,false)),e.positions.length===0):e.source===fu?Xe(e.ranges).some(a=>!a||s(a.start,false)||s(a.end,false)):s(e.id,false)}function Ns(e){try{return e&&e.nodeType===1?e.tagName.toLowerCase():""}catch{return ""}}function Is(e,t,r){if(!e||typeof e!="object")return true;let{type:i,data:s}=e;if(!s||typeof s!="object")return true;if(i===uu)return typeof s.href=="string"&&(s.href=fo(s.href)),true;if(i===au)return lo(s.node,t,r),true;if(i!==lu)return true;if(Su(s,t,r))return false;if(s.source===cu)return typeof s.text=="string"&&s.text&&(s.text=Le(s.text)),s.isChecked===true&&Tt(Pe(r,s.id),t).masked&&(s.isChecked=false),true;if(s.source!==uo)return true;for(let a of Array.isArray(s.adds)?s.adds:[]){if(!a||typeof a!="object")continue;let c=Pe(r,a.parentId),p=Tt(c,t);Ns(c)==="textarea"&&(p.editable=true),lo(a.node,t,r,p);}for(let a of Array.isArray(s.attributes)?s.attributes:[]){if(!a||!a.attributes||typeof a.attributes!="object")continue;let c=Pe(r,a.id);po(a.attributes,Ns(c)||"input",Tt(c,t).masked);}for(let a of Array.isArray(s.texts)?s.texts:[]){if(!a||typeof a.value!="string"||!a.value)continue;let c=Pe(r,a.id),p=Tt(c,t),u=Ns(c?.parentElement??null);p.editable||u==="textarea"?a.value=Le(a.value):p.masked&&u!=="style"&&u!=="script"&&(a.value=Je(a.value));}return true}var Pt=5,vu=["record","buffer","off"];function mo(e){return Array.isArray(e)?e.filter(t=>typeof t=="string"):[]}function Qe(e){let t=Zn(xs.replay);if(!t)return null;try{let r=JSON.parse(t);if(r.sid!==e||!Fs(e)||!vu.includes(r.mode))return null;let i=typeof r.seq=="number"&&Number.isInteger(r.seq)&&r.seq>=0?r.seq:0;return {sid:e,mode:r.mode,snapshots:r.snapshots===!0,seq:i,snaps:mo(r.snaps).slice(0,Pt),maskAllText:r.maskAllText===!0,blockedRoutes:mo(r.blockedRoutes),slowDown:r.slowDown&&typeof r.slowDown=="object"?r.slowDown:null}}catch{return null}}function Fe(e){let t=Qe(e.sid),r=e.mode,i=e.slowDown??null;if(t){t.seq>e.seq&&(e.seq=t.seq);for(let s of t.snaps)e.snaps.includes(s)||e.snaps.push(s);(t.mode==="off"||t.mode==="record"&&r==="buffer")&&(r=t.mode),i??=t.slowDown;}eo(xs.replay,JSON.stringify({...e,mode:r,snaps:e.snaps.slice(0,Pt),slowDown:i}));}var Ze=[1e3,4e3,15e3];var go=1e4,_s=2e5,yo=3e4,wo=10*6e4,ks=[0,5e3,15e3,6e4,5*6e4],et=720,bo=39e5,tt=5e6,Ce=6e4,So=2048,vo=1e4,Ts=5*6e4,Co=2e3,Lt=500,Eo=1e4,Ro=3e6;async function xo(e){try{let t=await e.json();return t&&typeof t=="object"?t:{}}catch{return {}}}function Mo(e){return e.slow_down&&typeof e.slow_down=="object"?e.slow_down:null}async function Cu(e,t){let r=e.status;if(e.ok)return {kind:"stored",slowDown:Mo(await xo(e))};let i=await xo(e),s=typeof i.error?.code=="string"?i.error.code:"";return r===429&&s==="limit_reached"?{kind:"limit",slowDown:Mo(i)}:r===408||r===429||r>=500?{kind:"retry",retryAfterMs:io(D(()=>e.headers.get("retry-after"))??null,t),throttled:r===429}:r===403&&s==="not_recordable"?{kind:"not_recordable"}:r===401||r===403?{kind:"refused"}:r===422?{kind:"session_full"}:{kind:"rejected"}}async function Ft(e){if(e.length<=So||!ro())return e;try{return await so(e)}catch{return e}}function Eu(e){return typeof e=="string"?e.length:e.byteLength}async function Ut(e,t,r,i){try{let s=await fetch(e,{method:"POST",keepalive:Eu(r)<=Ce,credentials:"omit",headers:{authorization:`Bearer ${t}`,"content-type":"application/json"},body:r});return await Cu(s,i())}catch{return {kind:"retry",retryAfterMs:null,throttled:false}}}function Ds(e,t,r){try{if(typeof navigator>"u"||typeof navigator.sendBeacon!="function")return !1;let i=`${e}${e.includes("?")?"&":"?"}key=${encodeURIComponent(t)}`;return navigator.sendBeacon(i,new Blob([r],{type:"text/plain;charset=UTF-8"}))}catch{return false}}var $t=class{constructor(t,r,i,s){this.url=t;this.key=r;this.now=i;this.events=s;this.parked=[];this.probe=null;this.failures=0;this.retryAt=0;this.encoding=new Set;}holding(){return this.parked.length>0||this.probe!==null}troubled(){return this.holding()||this.failures>0}send(t,r){if(r==="background"&&this.holding()){this.park(t,false);return}this.dispatch(t,r,0);}resendParked(t){if(this.parked.length===0)return;if(t==="closing"){for(let i of this.parked.splice(0))this.dispatch(i,t,Ze.length);return}if(this.probe||this.now()<this.retryAt)return;let r=this.parked.shift();r&&(this.probe=r,this.dispatch(r,"background",Ze.length));}beaconEncoding(){for(let t of this.encoding)!t.done&&t.body.length<=Ce&&Ds(this.url,this.key,t.body)&&this.accept(t,null);}clear(){this.probe=null;for(let t of this.parked.splice(0))this.lose(t,"failed");}dispatch(t,r,i){if(r==="closing"){if(t.body.length<=Ce&&Ds(this.url,this.key,t.body)){this.accept(t,null);return}this.attempt(t,t.body,i);return}if(r==="hidden"&&t.body.length<=Ce){this.attempt(t,t.body,i);return}this.encodeAndSend(t,i);}async encodeAndSend(t,r){t.encoded===void 0&&(this.encoding.add(t),t.encoded=await Ft(t.body),this.encoding.delete(t)),!t.done&&await this.attempt(t,t.encoded,r);}async attempt(t,r,i){let s=await Ut(this.url,this.key,r,this.now);if(!t.done)switch(s.kind){case "stored":this.accept(t,s.slowDown);return;case "rejected":this.lose(t,"rejected");return;case "refused":case "not_recordable":case "session_full":this.halt(t,s.kind,null);return;case "limit":this.halt(t,"limit",s.slowDown);return;case "retry":this.retryLater(t,r,i,s.retryAfterMs,s.throttled);}}retryLater(t,r,i,s,a){let c=Ze[i],p=this.parked.length>0||this.probe!==null&&this.probe!==t;if(c===void 0||a||s!==null||p){this.park(t,true,s);return}setTimeout(()=>{t.done||this.attempt(t,r,i+1);},c);}accept(t,r){if(t.done)return;t.done=true,this.encoding.delete(t),this.failures=0,this.retryAt=0;let i=t===this.probe;if(i&&(this.probe=null),D(()=>this.events.accepted(t,r)),!!i)for(let s of this.parked.splice(0))this.dispatch(s,"background",0);}lose(t,r){t.done||(t.done=true,this.encoding.delete(t),t===this.probe&&(this.probe=null),D(()=>this.events.lost(t,r)));}halt(t,r,i){t.done=true,t===this.probe&&(this.probe=null),D(()=>this.events.halted(t,r,i));}park(t,r,i=null){if(t.done)return;t===this.probe&&(this.probe=null);let s=this.parked.findIndex(c=>c.seq>t.seq);if(s<0?this.parked.push(t):this.parked.splice(s,0,t),r){let c=this.now();if(c>=this.retryAt){this.failures++;let p=Math.min(Ts,vo*2**(this.failures-1));this.retryAt=c+p*(.5+Math.random()/2);}i!==null&&(this.retryAt=Math.max(this.retryAt,c+Math.min(Ts,i)));}let a=this.parked.reduce((c,p)=>c+p.body.length,0);for(;a>tt&&this.parked.length>0;){let c=this.parked.shift();if(!c)break;a-=c.body.length,this.lose(c,"overflow");}}};var No=2,Ao=Ce-2e3;function Oo(e,t,r){return {emit:e,...ho(t),slimDOMOptions:"all",collectFonts:false,sampling:{mousemove:50,mouseInteraction:true,scroll:150,input:"last"},checkoutEveryNms:r?wo:yo,recordCrossOriginIframes:false,errorHandler:()=>true}}var Bt=class{constructor(t){this.options=t;this.decision=null;this.rules=null;this.rrweb=null;this.stopRrweb=null;this.active=false;this.loading=false;this.finished=false;this.timer=null;this.pending=null;this.queue=[];this.lostSeq=-1;this.sentFullSeq=-1;this.storedFullSeq=-1;this.owed=false;this.tries=0;this.resyncAt=0;this.resyncTimer=null;this.resyncing=false;this.previous=[];this.previousChars=0;this.current=[];this.currentChars=0;this.inCheckout=false;this.warnedKey=false;this.capture=null;this.lookup=t=>D(()=>this.rrweb?.record.mirror?.getNode(t)??null)??null;let{host:r}=t;this.uploads=new $t(`${r.endpoint}/v1/ingest/replay`,r.project,()=>r.now(),{accepted:(i,s)=>this.accepted(i,s),lost:(i,s)=>this.gap(i.seq,s,i.sid),halted:(i,s,a)=>this.halted(i,s,a)});}mode(){return this.decision?.mode??"off"}isRecording(){return this.stopRrweb!==null}start(t,r){try{if(this.decision!==t&&(this.finished=!1,this.queue=[],this.pending=null,this.uploads.clear(),this.resetResync()),this.decision=t,this.rules=r,t.mode==="off"||this.active||this.finished||t.seq>=et)return;this.active=!0,(this.options.idle??to)(()=>{this.load();});}catch{}}stop(){try{this.active=!1;let t=this.stopRrweb;this.stopRrweb=null,t&&D(t),this.stopTimer(),this.mode()==="record"&&this.uploadPending("background"),this.clearBuffers();}catch{}}onTrouble(){try{let t=this.decision;if(!t||t.mode!=="buffer"||this.finished)return;t.mode="record",Fe(t);let r=this.previous.concat(this.current);this.clearBuffers();for(let i of this.split(r,_s))this.queue.push(i);if(this.drain("background"),this.stopRrweb){let i=this.stopRrweb;this.stopRrweb=null,D(i),this.begin();}}catch{}}limit(){let t=this.decision;!t||this.finished||(t.seq<et&&this.gap(t.seq,"limit",t.sid),t.mode="off",Fe(t),this.pending=null,this.queue=[],this.finish());}flush(t){try{if(this.mode()!=="record")return;t==="closing"&&this.uploads.beaconEncoding(),this.uploadPending(t);}catch{}}async fullSnapshot(t){try{if(this.stopRrweb&&this.rrweb){let r={node:null};this.capture=r;try{this.rrweb.record.takeFullSnapshot?.(!1);}finally{this.capture=null;}return r.node}return this.rrweb??=await this.options.loadRrweb(),this.stopRrweb?this.fullSnapshot(t):this.oneFullSnapshot(this.rrweb,t)}catch{return null}}oneFullSnapshot(t,r){let i=null,s=c=>D(()=>t.record.mirror?.getNode(c)??null)??null,a=t.record({...Oo(()=>{},r,false),checkoutEveryNms:void 0,emit:c=>{c.type!==No||i!==null||(Is(c,r,s),i=c.data.node??null);}});return a&&D(a),i}async load(){if(!(!this.active||this.stopRrweb||this.loading)){this.loading=true;try{this.rrweb??=await this.options.loadRrweb();}catch{this.active=false;return}finally{this.loading=false;}this.active&&!this.stopRrweb&&this.begin();}}begin(){let t=this.rrweb,r=this.rules;if(!(!t||!r)){try{let i=this.mode()==="record";this.stopRrweb=t.record(Oo((s,a)=>this.onEvent(s,a),r,i))??null;}catch{this.stopRrweb=null;return}this.mode()==="record"&&this.startTimer();}}onEvent(t,r){try{if(!this.active||!this.decision||!this.rules||this.finished||!Is(t,this.rules,this.lookup))return;let i=JSON.stringify(t);if(!i)return;if(i.length>bo){this.finish();return}let s={json:i,ts:typeof t.timestamp=="number"?t.timestamp:this.options.host.now(),full:t.type===No};s.full&&this.capture&&(this.capture.node=t.data.node??null),this.decision.mode==="record"?this.record(s):this.buffer(s,r===!0);}catch{}}record(t){this.pending??=this.open(),this.pending.items.push(t),this.pending.chars+=t.json.length,this.pending.chars>=_s&&this.uploadPending("background");}buffer(t,r){r&&!this.inCheckout&&(this.previous=this.current,this.previousChars=this.currentChars,this.current=[],this.currentChars=0),this.inCheckout=r,this.current.push(t),this.currentChars+=t.json.length,this.previousChars+this.currentChars>tt&&(this.previous=[],this.previousChars=0),this.currentChars>tt&&(this.current=[],this.currentChars=0,this.inCheckout=false,this.takeFullSnapshot());}clearBuffers(){this.previous=[],this.previousChars=0,this.current=[],this.currentChars=0,this.inCheckout=false;}open(){let t=D(()=>this.options.host.page())??null;return {items:[],chars:0,route:t?.route??"",url:t?.url??"",vw:D(()=>window.innerWidth)||0,vh:D(()=>window.innerHeight)||0}}split(t,r,i){let s=[],a=null;for(let c of t)(a===null||a.items.length>0&&a.chars+c.json.length>r)&&(a=i?{...i,items:[],chars:0}:this.open(),s.push(a)),a.items.push(c),a.chars+=c.json.length;return s}startTimer(){this.timer||(this.timer=setInterval(()=>D(()=>this.uploadPending("background")),go));}stopTimer(){this.timer&&clearInterval(this.timer),this.timer=null;}finish(){this.finished||(this.finished=true,this.queue=[],this.pending=null,this.uploads.clear(),this.resetResync(),this.stop());}takeFullSnapshot(){setTimeout(()=>D(()=>this.rrweb?.record.takeFullSnapshot?.(!1)),0);}uploadPending(t){let r=this.pending;if(this.pending=null,r&&r.items.length>0){let i=t==="closing"&&r.chars>Ao?this.split(r.items,Ao,r):[r];this.queue.push(...i);}this.drain(t);}drain(t){let r=this.decision;if(!r||this.finished){this.queue=[];return}this.uploads.resendParked(t);let i=Qe(r.sid);for(i&&i.seq>r.seq&&(r.seq=i.seq);this.queue.length>0&&!(r.seq>=et);){let s=this.queue.shift();if(!s)break;let a=r.seq++;Fe(r);let c=this.upload(r.sid,a,s);c.full&&(this.sentFullSeq=Math.max(this.sentFullSeq,a)),this.uploads.send(c,t);}r.seq>=et&&this.finish();}upload(t,r,i){let s=i.items[0],a=i.items[i.items.length-1],c=i.items.some(d=>d.full),u=`${JSON.stringify({sid:t,seq:r,ts_start:s?.ts??0,ts_end:a?.ts??0,route:i.route,url:i.url,vw:i.vw,vh:i.vh,full:c,mask:this.rules?.policy??1}).slice(0,-1)},"events":[${i.items.map(d=>d.json).join(",")}]}`;return {sid:t,seq:r,body:u,route:i.route,full:c,done:false}}accepted(t,r){let{host:i}=this.options;if(D(()=>i.onChunk({sid:t.sid,seq:t.seq,bytes:t.body.length,mask:this.rules?.policy??1,full:t.full})),r&&D(()=>i.onSlowDown(r)),r?.replay===false){this.options.onLimit(r);return}t.sid===this.decision?.sid&&(t.full&&(this.storedFullSeq=Math.max(this.storedFullSeq,t.seq),t.seq>this.lostSeq&&this.resetResync()),this.maybeSnapshot());}halted(t,r,i){let{host:s}=this.options;switch(r){case "limit":i&&D(()=>s.onSlowDown(i)),this.options.onLimit(i);return;case "not_recordable":this.gap(t.seq,"rejected",t.sid),this.options.onRouteRefused(t.route);return;case "refused":this.gap(t.seq,"rejected",t.sid),this.warnedKey||(this.warnedKey=true,D(()=>console.warn("[sypnia] replay off: the engine refused the ingest key"))),this.finish();return;case "session_full":this.finish();}}gap(t,r,i){if(D(()=>this.options.host.onGap({sid:i,seq:t,reason:r,mask:this.rules?.policy??1})),r==="limit"||this.finished||this.decision?.sid!==i||this.mode()!=="record"||this.storedFullSeq>t||(this.lostSeq=Math.max(this.lostSeq,t),this.owed=true,this.fullOnItsWay()))return;let s=ks[this.tries];s===void 0||this.resyncTimer||(this.resyncAt=this.options.host.now()+s,this.resyncTimer=setTimeout(()=>{this.resyncTimer=null,D(()=>this.maybeSnapshot());},s));}fullOnItsWay(){if(this.resyncing||this.sentFullSeq>this.lostSeq)return true;let t=r=>!!r&&r.items.some(i=>i.full);return t(this.pending)||this.queue.some(t)}resetResync(){this.resyncTimer&&clearTimeout(this.resyncTimer),this.resyncTimer=null,this.owed=false,this.resyncing=false,this.tries=0,this.resyncAt=0,this.lostSeq=-1,this.sentFullSeq=-1,this.storedFullSeq=-1;}maybeSnapshot(){!this.owed||this.finished||!this.stopRrweb||this.mode()!=="record"||this.uploads.troubled()||this.tries>=ks.length||this.fullOnItsWay()||this.resyncTimer||this.options.host.now()<this.resyncAt||(this.tries++,this.resyncing=true,setTimeout(()=>D(()=>{this.resyncing=!1,!(!this.stopRrweb||this.finished||this.mode()!=="record")&&(this.uploadPending("background"),this.rrweb?.record.takeFullSnapshot?.(!1));}),0));}};function Io(e){return e<768?"mobile":e<1024?"tablet":"desktop"}var Wt=class{constructor(t){this.options=t;this.decision=null;this.rules=null;this.active=false;this.timer=null;this.taking=false;this.url=`${t.host.endpoint}/v1/ingest/snapshot`;}start(t,r){this.decision=t,this.rules=r,this.active=true;}stop(){this.active=false,this.clearTimer();}schedule(t){try{if(this.clearTimer(),!this.active||!this.eligible(t.route))return;this.timer=setTimeout(()=>this.whenQuiet(t,0),Co);}catch{}}eligible(t){let r=this.decision;return !r||!r.snapshots||!this.options.host.snapshots?false:r.snaps.length<Pt&&!r.snaps.includes(t)}clearTimer(){this.timer&&clearTimeout(this.timer),this.timer=null;}whenQuiet(t,r){if(this.timer=null,!this.active)return;let{host:i}=this.options,s=i.now()-(D(()=>i.lastMutationAt())??-1),a=D(()=>i.pendingRequests())??0;if((s<Lt||a>0)&&r<Eo){this.timer=setTimeout(()=>this.whenQuiet(t,r+Lt),Lt);return}this.take(t);}onPage(t){return D(()=>this.options.host.page())?.route===t.route}report(t,r,i){let s=this.rules?.policy??1;D(()=>this.options.host.onSnapshot(i?{sid:t,bytes:r,mask:s,skipped:i}:{sid:t,bytes:r,mask:s}));}async take(t){if(!this.taking){this.taking=true;try{let r=this.decision,i=this.rules;if(!r||!i||!this.active)return;for(let c of Qe(r.sid)?.snaps??[])r.snaps.includes(c)||r.snaps.push(c);if(!this.eligible(t.route)||!this.onPage(t))return;r.snaps.push(t.route),Fe(r);let s=await this.options.serialize(i);if(!s||!this.active||!this.onPage(t))return;let a=JSON.stringify(s);if(a.length>Ro){this.report(r.sid,a.length,"too_big");return}await this.send(t,r.sid,i,a);}catch{}finally{this.taking=false;}}}async send(t,r,i,s){let{host:a}=this.options,c=D(()=>window.innerWidth)||0,u=`${JSON.stringify({sid:r,route:t.route,url:t.url,dev:Io(c),vw:c,vh:D(()=>window.innerHeight)||0,ph:D(()=>document.documentElement.scrollHeight)||0,ts:a.now(),mask:i.policy,...a.environment?{env:a.environment}:{}}).slice(0,-1)},"snapshot":${s}}`,d=await Ut(this.url,a.project,await Ft(u),()=>a.now());if(d.kind!=="stored"&&d.kind!=="limit"){this.report(r,s.length,"upload_failed");return}let n=d.slowDown;this.report(r,s.length,d.kind==="limit"?"limit":void 0),n&&D(()=>a.onSlowDown(n)),(d.kind==="limit"||n?.replay===false)&&this.options.onLimit();}};var Ru=()=>Promise.resolve({record:ye}),Ps=class{constructor(t,r){this.host=t;this.decision=null;this.rules=null;this.blocked=false;this.refused=new Set;this.replay=new Bt({host:t,loadRrweb:r.loadRrweb??Ru,idle:r.idle,onRouteRefused:i=>this.refuseRoute(i),onLimit:()=>this.onReplayLimit()}),this.snapshots=new Wt({host:t,serialize:i=>this.replay.fullSnapshot(i),onLimit:()=>this.onReplayLimit()});}start(t){try{if(t.sid===this.decision?.sid)return;this.stop(),this.decision=t,this.rules=co({maskAllText:this.host.maskAllText||t.maskAllText,maskSelector:this.host.maskSelector,blockSelector:this.host.blockSelector});let r=this.host.page();this.blocked=r!==null&&this.isBlocked(r),this.blocked||this.resume(r);}catch{}}stop(){D(()=>this.replay.stop()),D(()=>this.snapshots.stop());}onTrouble(){this.blocked||this.replay.onTrouble();}onPage(t){try{let r=this.isBlocked(t);r!==this.blocked&&(this.blocked=r,r?this.stop():this.resume(null)),r||this.snapshots.schedule(t);}catch{}}onReplayLimit(){D(()=>this.replay.limit()),D(()=>this.snapshots.stop());}flush(t){this.replay.flush(t==="beacon"?"closing":"hidden");}resume(t){let{decision:r,rules:i}=this;!r||!i||(this.host.replay&&this.replay.start(r,i),this.snapshots.start(r,i),t&&this.snapshots.schedule(t));}isBlocked(t){let r=[...this.host.blockedRoutes,...this.decision?.blockedRoutes??[]],i=this.host.allowRoutes;return i.length>0&&!$e(t.url,i)&&!$e(t.route,i)?true:this.refused.has(t.route)||$e(t.route,r)||$e(t.url,r)}refuseRoute(t){this.refused.add(t);let r=D(()=>this.host.page());r&&this.onPage(r);}};function xu(e,t){return new Ps(e,t)}var _o=e=>xu(e,{});window[Ls]=_o;
135
+ /*! Bundled license information:
136
+
137
+ rrweb/dist/rrweb.js:
138
+ (*! *****************************************************************************
139
+ Copyright (c) Microsoft Corporation.
140
+
141
+ Permission to use, copy, modify, and/or distribute this software for any
142
+ purpose with or without fee is hereby granted.
143
+
144
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
145
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
146
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
147
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
148
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
149
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
150
+ PERFORMANCE OF THIS SOFTWARE.
151
+ ***************************************************************************** *)
152
+ */})();