@bentolabs/sdk 1.2.2 → 2.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,74 @@
1
+ "use strict";var BentoLabsSDKModule=(()=>{var Ct=Object.defineProperty,ya=Object.defineProperties,ba=Object.getOwnPropertyDescriptor,wa=Object.getOwnPropertyDescriptors,Sa=Object.getOwnPropertyNames,vt=Object.getOwnPropertySymbols;var Dr=Object.prototype.hasOwnProperty,Ss=Object.prototype.propertyIsEnumerable;var ws=(i,e,t)=>e in i?Ct(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,I=(i,e)=>{for(var t in e||(e={}))Dr.call(e,t)&&ws(i,t,e[t]);if(vt)for(var t of vt(e))Ss.call(e,t)&&ws(i,t,e[t]);return i},J=(i,e)=>ya(i,wa(e));var De=(i,e)=>{var t={};for(var r in i)Dr.call(i,r)&&e.indexOf(r)<0&&(t[r]=i[r]);if(i!=null&&vt)for(var r of vt(i))e.indexOf(r)<0&&Ss.call(i,r)&&(t[r]=i[r]);return t};var va=(i,e)=>{for(var t in e)Ct(i,t,{get:e[t],enumerable:!0})},Ca=(i,e,t,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of Sa(e))!Dr.call(i,s)&&s!==t&&Ct(i,s,{get:()=>e[s],enumerable:!(r=ba(e,s))||r.enumerable});return i};var Ia=i=>Ca(Ct({},"__esModule",{value:!0}),i);var id={};va(id,{BentoLabsSDK:()=>xr,default:()=>rd,generateSelector:()=>cs,generateSelectorFromElement:()=>je,generateSelectorFromHTML:()=>Er});var Ea=Object.defineProperty,xa=(i,e,t)=>e in i?Ea(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,b=(i,e,t)=>xa(i,typeof e!="symbol"?e+"":e,t),vs,Ra=Object.defineProperty,Ma=(i,e,t)=>e in i?Ra(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,Cs=(i,e,t)=>Ma(i,typeof e!="symbol"?e+"":e,t),Y=(i=>(i[i.Document=0]="Document",i[i.DocumentType=1]="DocumentType",i[i.Element=2]="Element",i[i.Text=3]="Text",i[i.CDATA=4]="CDATA",i[i.Comment=5]="Comment",i))(Y||{}),Is={Node:["childNodes","parentNode","parentElement","textContent","ownerDocument"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},Es={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},It={},Na=()=>!!globalThis.Zone;function Pi(i){if(It[i])return It[i];let e=globalThis[i],t=e.prototype,r=i in Is?Is[i]:void 0,s=!!(r&&r.every(l=>{var a,c;return!!((c=(a=Object.getOwnPropertyDescriptor(t,l))==null?void 0:a.get)!=null&&c.toString().includes("[native code]"))})),n=i in Es?Es[i]:void 0,o=!!(n&&n.every(l=>{var a;return typeof t[l]=="function"&&((a=t[l])==null?void 0:a.toString().includes("[native code]"))}));if(s&&o&&!Na())return It[i]=e.prototype,e.prototype;try{let l=document.createElement("iframe");document.body.appendChild(l);let a=l.contentWindow;if(!a)return e.prototype;let c=a[i].prototype;return document.body.removeChild(l),c?It[i]=c:t}catch(l){return t}}var Tr={};function be(i,e,t){var r;let s=`${i}.${String(t)}`;if(Tr[s])return Tr[s].call(e);let n=Pi(i),o=(r=Object.getOwnPropertyDescriptor(n,t))==null?void 0:r.get;return o?(Tr[s]=o,o.call(e)):e[t]}var kr={};function Sn(i,e,t){let r=`${i}.${String(t)}`;if(kr[r])return kr[r].bind(e);let n=Pi(i)[t];return typeof n!="function"?e[t]:(kr[r]=n,n.bind(e))}function Oa(i){return be("Node",i,"ownerDocument")}function Aa(i){return be("Node",i,"childNodes")}function Da(i){return be("Node",i,"parentNode")}function Ta(i){return be("Node",i,"parentElement")}function ka(i){return be("Node",i,"textContent")}function _a(i,e){return Sn("Node",i,"contains")(e)}function La(i){return Sn("Node",i,"getRootNode")()}function $a(i){return!i||!("host"in i)?null:be("ShadowRoot",i,"host")}function Pa(i){return i.styleSheets}function Fa(i){return!i||!("shadowRoot"in i)?null:be("Element",i,"shadowRoot")}function Ba(i,e){return be("Element",i,"querySelector")(e)}function Ua(i,e){return be("Element",i,"querySelectorAll")(e)}function za(){return Pi("MutationObserver").constructor}function Wa(i,e,t){try{if(!(e in i))return()=>{};let r=i[e],s=t(r);return typeof s=="function"&&(s.prototype=s.prototype||{},Object.defineProperties(s,{__rrweb_original__:{enumerable:!1,value:r}})),i[e]=s,()=>{i[e]=r}}catch(r){return()=>{}}}var Q={ownerDocument:Oa,childNodes:Aa,parentNode:Da,parentElement:Ta,textContent:ka,contains:_a,getRootNode:La,host:$a,styleSheets:Pa,shadowRoot:Fa,querySelector:Ba,querySelectorAll:Ua,mutationObserver:za,patch:Wa};function vn(i){return i.nodeType===i.ELEMENT_NODE}function Qe(i){let e=i&&"host"in i&&"mode"in i&&Q.host(i)||null;return!!(e&&"shadowRoot"in e&&Q.shadowRoot(e)===i)}function et(i){return Object.prototype.toString.call(i)==="[object ShadowRoot]"}function Va(i){return i.includes(" background-clip: text;")&&!i.includes(" -webkit-background-clip: text;")&&(i=i.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),i}function Ga(i){let{cssText:e}=i;if(e.split('"').length<3)return e;let t=["@import",`url(${JSON.stringify(i.href)})`];return i.layerName===""?t.push("layer"):i.layerName&&t.push(`layer(${i.layerName})`),i.supportsText&&t.push(`supports(${i.supportsText})`),i.media.length&&t.push(i.media.mediaText),t.join(" ")+";"}function Yr(i){try{let e=i.rules||i.cssRules;if(!e)return null;let t=i.href;!t&&i.ownerNode&&(t=i.ownerNode.baseURI);let r=Array.from(e,s=>Cn(s,t)).join("");return Va(r)}catch(e){return null}}function Cn(i,e){if(Ha(i)){let t;try{t=Yr(i.styleSheet)||Ga(i)}catch(r){t=i.cssText}return i.styleSheet.href?Qt(t,i.styleSheet.href):t}else{let t=i.cssText;return Ya(i)&&i.selectorText.includes(":")&&(t=ja(t)),e?Qt(t,e):t}}function ja(i){let e=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return i.replace(e,"$1\\$2")}function Ha(i){return"styleSheet"in i}function Ya(i){return"selectorText"in i}var qt=class{constructor(){Cs(this,"idNodeMap",new Map),Cs(this,"nodeMetaMap",new WeakMap)}getId(e){var t;if(!e)return-1;let r=(t=this.getMeta(e))==null?void 0:t.id;return r!=null?r:-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){let t=this.getId(e);this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach(r=>this.removeNodeFromMap(r))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){let r=t.id;this.idNodeMap.set(r,e),this.nodeMetaMap.set(e,t)}replace(e,t){let r=this.getNode(e);if(r){let s=this.nodeMetaMap.get(r);s&&this.nodeMetaMap.set(t,s)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function Ka(){return new qt}function rt({element:i,maskInputOptions:e,tagName:t,type:r,value:s,maskInputFn:n}){let o=s||"",l=r&&Me(r);return(e[t.toLowerCase()]||l&&e[l])&&(n?o=n(o,i):o="*".repeat(o.length)),o}function Me(i){return i.toLowerCase()}var xs="__rrweb_original__";function Xa(i){let e=i.getContext("2d");if(!e)return!0;let t=50;for(let r=0;r<i.width;r+=t)for(let s=0;s<i.height;s+=t){let n=e.getImageData,o=xs in n?n[xs]:n;if(new Uint32Array(o.call(e,r,s,Math.min(t,i.width-r),Math.min(t,i.height-s)).data.buffer).some(a=>a!==0))return!1}return!0}function it(i){let e=i.type;return i.hasAttribute("data-rr-is-password")?"password":e?Me(e):null}function In(i,e){var n;let t;try{t=new URL(i,e!=null?e:window.location.href)}catch(o){return null}let r=/\.([0-9a-z]+)(?:$)/i,s=t.pathname.match(r);return(n=s==null?void 0:s[1])!=null?n:null}function Za(i){let e="";return i.indexOf("//")>-1?e=i.split("/").slice(0,3).join("/"):e=i.split("/")[0],e=e.split("?")[0],e}var Ja=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,qa=/^(?:[a-z+]+:)?\/\//i,Qa=/^www\..*/i,el=/^(data:)([^,]*),(.*)/i;function Qt(i,e){return(i||"").replace(Ja,(t,r,s,n,o,l)=>{let a=s||o||l,c=r||n||"";if(!a)return t;if(qa.test(a)||Qa.test(a))return`url(${c}${a}${c})`;if(el.test(a))return`url(${c}${a}${c})`;if(a[0]==="/")return`url(${c}${Za(e)+a}${c})`;let u=e.split("/"),f=a.split("/");u.pop();for(let m of f)m!=="."&&(m===".."?u.pop():u.push(m));return`url(${c}${u.join("/")}${c})`})}function Et(i,e=!1){return e?i.replace(/(\/\*[^*]*\*\/)|[\s;]/g,""):i.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"").replace(/0px/g,"0")}function tl(i,e,t=!1){let r=Array.from(e.childNodes),s=[],n=0;if(r.length>1&&i&&typeof i=="string"){let o=Et(i,t),l=o.length/i.length;for(let a=1;a<r.length;a++)if(r[a].textContent&&typeof r[a].textContent=="string"){let c=Et(r[a].textContent,t),u=100,f=3;for(;f<c.length&&(c[f].match(/[a-zA-Z0-9]/)||c.indexOf(c.substring(0,f),1)!==-1);f++);for(;f<c.length;f++){let m=c.substring(0,f),g=o.split(m),p=-1;if(g.length===2)p=g[0].length;else if(g.length>2&&g[0]===""&&r[a-1].textContent!=="")p=o.indexOf(m,1);else if(g.length===1){if(m=m.substring(0,m.length-1),g=o.split(m),g.length<=1)return s.push(i),s;f=u+1}else f===c.length-1&&(p=o.indexOf(m));if(g.length>=2&&f>u){let d=r[a-1].textContent;if(d&&typeof d=="string"){let h=Et(d).length;p=o.indexOf(m,h)}p===-1&&(p=g[0].length)}if(p!==-1){let d=Math.floor(p/l);for(;d>0&&d<i.length;){if(n+=1,n>50*r.length)return s.push(i),s;let h=Et(i.substring(0,d),t);if(h.length===p){s.push(i.substring(0,d)),i=i.substring(d),o=o.substring(p);break}else h.length<p?d+=Math.max(1,Math.floor((p-h.length)/l)):d-=Math.max(1,Math.floor((h.length-p)*l))}break}}}}return s.push(i),s}function rl(i,e){return tl(i,e).join("/* rr_split */")}var il=1,sl=new RegExp("[^a-z0-9-_:]"),st=-2;function En(){return il++}function nl(i){if(i instanceof HTMLFormElement)return"form";let e=Me(i.tagName);return sl.test(e)?"div":e}var Te,Rs,ol=/^[^ \t\n\r\u000c]+/,al=/^[, \t\n\r\u000c]+/;function ll(i,e){if(e.trim()==="")return e;let t=0;function r(n){let o,l=n.exec(e.substring(t));return l?(o=l[0],t+=o.length,o):""}let s=[];for(;r(al),!(t>=e.length);){let n=r(ol);if(n.slice(-1)===",")n=Le(i,n.substring(0,n.length-1)),s.push(n);else{let o="";n=Le(i,n);let l=!1;for(;;){let a=e.charAt(t);if(a===""){s.push((n+o).trim());break}else if(l)a===")"&&(l=!1);else if(a===","){t+=1,s.push((n+o).trim());break}else a==="("&&(l=!0);o+=a,t+=1}}}return s.join(", ")}var Ms=new WeakMap;function Le(i,e){return!e||e.trim()===""?e:Fi(i,e)}function cl(i){return!!(i.tagName==="svg"||i.ownerSVGElement)}function Fi(i,e){let t=Ms.get(i);if(t||(t=i.createElement("a"),Ms.set(i,t)),!e)e="";else if(e.startsWith("blob:")||e.startsWith("data:"))return e;return t.setAttribute("href",e),t.href}function xn(i,e,t,r){return r&&(t==="src"||t==="href"&&!(e==="use"&&r[0]==="#")||t==="xlink:href"&&r[0]!=="#"||t==="background"&&["table","td","th"].includes(e)?Le(i,r):t==="srcset"?ll(i,r):t==="style"?Qt(r,Fi(i)):e==="object"&&t==="data"?Le(i,r):r)}function Rn(i,e,t){return["video","audio"].includes(i)&&e==="autoplay"}function ul(i,e,t){try{if(typeof e=="string"){if(i.classList.contains(e))return!0}else for(let r=i.classList.length;r--;){let s=i.classList[r];if(e.test(s))return!0}if(t)return i.matches(t)}catch(r){}return!1}function er(i,e,t){if(!i)return!1;if(i.nodeType!==i.ELEMENT_NODE)return t?er(Q.parentNode(i),e,t):!1;for(let r=i.classList.length;r--;){let s=i.classList[r];if(e.test(s))return!0}return t?er(Q.parentNode(i),e,t):!1}function Mn(i,e,t,r){let s;if(vn(i)){if(s=i,!Q.childNodes(s).length)return!1}else{if(Q.parentElement(i)===null)return!1;s=Q.parentElement(i)}try{if(typeof e=="string"){if(r){if(s.closest(`.${e}`))return!0}else if(s.classList.contains(e))return!0}else if(er(s,e,r))return!0;if(t){if(r){if(s.closest(t))return!0}else if(s.matches(t))return!0}}catch(n){}return!1}function hl(i,e,t){let r=i.contentWindow;if(!r)return;let s=!1,n;try{n=r.document.readyState}catch(l){return}if(n!=="complete"){let l=setTimeout(()=>{s||(e(),s=!0)},t);i.addEventListener("load",()=>{clearTimeout(l),s=!0,e()});return}let o="about:blank";if(r.location.href!==o||i.src===o||i.src==="")return setTimeout(e,0),i.addEventListener("load",e);i.addEventListener("load",e)}function fl(i,e,t){let r=!1,s;try{s=i.sheet}catch(o){return}if(s)return;let n=setTimeout(()=>{r||(e(),r=!0)},t);i.addEventListener("load",()=>{clearTimeout(n),r=!0,e()})}function dl(i,e){let{doc:t,mirror:r,blockClass:s,blockSelector:n,needsMask:o,inlineStylesheet:l,maskInputOptions:a={},maskTextFn:c,maskInputFn:u,dataURLOptions:f={},inlineImages:m,recordCanvas:g,keepIframeSrcFn:p,newlyAddedElement:d=!1,cssCaptured:h=!1}=e,w=pl(t,r);switch(i.nodeType){case i.DOCUMENT_NODE:return i.compatMode!=="CSS1Compat"?{type:Y.Document,childNodes:[],compatMode:i.compatMode}:{type:Y.Document,childNodes:[]};case i.DOCUMENT_TYPE_NODE:return{type:Y.DocumentType,name:i.name,publicId:i.publicId,systemId:i.systemId,rootId:w};case i.ELEMENT_NODE:return gl(i,{doc:t,blockClass:s,blockSelector:n,inlineStylesheet:l,maskInputOptions:a,maskInputFn:u,dataURLOptions:f,inlineImages:m,recordCanvas:g,keepIframeSrcFn:p,newlyAddedElement:d,rootId:w});case i.TEXT_NODE:return ml(i,{doc:t,needsMask:o,maskTextFn:c,rootId:w,cssCaptured:h});case i.CDATA_SECTION_NODE:return{type:Y.CDATA,textContent:"",rootId:w};case i.COMMENT_NODE:return{type:Y.Comment,textContent:Q.textContent(i)||"",rootId:w};default:return!1}}function pl(i,e){if(!e.hasNode(i))return;let t=e.getId(i);return t===1?void 0:t}function ml(i,e){let{needsMask:t,maskTextFn:r,rootId:s,cssCaptured:n}=e,o=Q.parentNode(i),l=o&&o.tagName,a="",c=l==="STYLE"?!0:void 0,u=l==="SCRIPT"?!0:void 0;return u?a="SCRIPT_PLACEHOLDER":n||(a=Q.textContent(i),c&&a&&(a=Qt(a,Fi(e.doc)))),!c&&!u&&a&&t&&(a=r?r(a,Q.parentElement(i)):a.replace(/[\S]/g,"*")),{type:Y.Text,textContent:a||"",rootId:s}}function gl(i,e){let{doc:t,blockClass:r,blockSelector:s,inlineStylesheet:n,maskInputOptions:o={},maskInputFn:l,dataURLOptions:a={},inlineImages:c,recordCanvas:u,keepIframeSrcFn:f,newlyAddedElement:m=!1,rootId:g}=e,p=ul(i,r,s),d=nl(i),h={},w=i.attributes.length;for(let y=0;y<w;y++){let S=i.attributes[y];Rn(d,S.name,S.value)||(h[S.name]=xn(t,d,Me(S.name),S.value))}if(d==="link"&&n){let y=Array.from(t.styleSheets).find(E=>E.href===i.href),S=null;y&&(S=Yr(y)),S&&(delete h.rel,delete h.href,h._cssText=S)}if(d==="style"&&i.sheet){let y=Yr(i.sheet);y&&(i.childNodes.length>1&&(y=rl(y,i)),h._cssText=y)}if(["input","textarea","select"].includes(d)){let y=i.value,S=i.checked;h.type!=="radio"&&h.type!=="checkbox"&&h.type!=="submit"&&h.type!=="button"&&y?h.value=rt({element:i,type:it(i),tagName:d,value:y,maskInputOptions:o,maskInputFn:l}):S&&(h.checked=S)}if(d==="option"&&(i.selected&&!o.select?h.selected=!0:delete h.selected),d==="dialog"&&i.open&&(h.rr_open_mode=i.matches("dialog:modal")?"modal":"non-modal"),d==="canvas"&&u){if(i.__context==="2d")Xa(i)||(h.rr_dataURL=i.toDataURL(a.type,a.quality));else if(!("__context"in i)){let y=i.toDataURL(a.type,a.quality),S=t.createElement("canvas");S.width=i.width,S.height=i.height;let E=S.toDataURL(a.type,a.quality);y!==E&&(h.rr_dataURL=y)}}if(d==="img"&&c){Te||(Te=t.createElement("canvas"),Rs=Te.getContext("2d"));let y=i,S=y.currentSrc||y.getAttribute("src")||"<unknown-src>",E=y.crossOrigin,A=()=>{y.removeEventListener("load",A);try{Te.width=y.naturalWidth,Te.height=y.naturalHeight,Rs.drawImage(y,0,0),h.rr_dataURL=Te.toDataURL(a.type,a.quality)}catch($){if(y.crossOrigin!=="anonymous"){y.crossOrigin="anonymous",y.complete&&y.naturalWidth!==0?A():y.addEventListener("load",A);return}else console.warn(`Cannot inline img src=${S}! Error: ${$}`)}y.crossOrigin==="anonymous"&&(E?h.crossOrigin=E:y.removeAttribute("crossorigin"))};y.complete&&y.naturalWidth!==0?A():y.addEventListener("load",A)}if(["audio","video"].includes(d)){let y=h;y.rr_mediaState=i.paused?"paused":"played",y.rr_mediaCurrentTime=i.currentTime,y.rr_mediaPlaybackRate=i.playbackRate,y.rr_mediaMuted=i.muted,y.rr_mediaLoop=i.loop,y.rr_mediaVolume=i.volume}if(m||(i.scrollLeft&&(h.rr_scrollLeft=i.scrollLeft),i.scrollTop&&(h.rr_scrollTop=i.scrollTop)),p){let{width:y,height:S}=i.getBoundingClientRect();h={class:h.class,rr_width:`${y}px`,rr_height:`${S}px`}}d==="iframe"&&!f(h.src)&&(i.contentDocument||(h.rr_src=h.src),delete h.src);let v;try{customElements.get(d)&&(v=!0)}catch(y){}return{type:Y.Element,tagName:d,attributes:h,childNodes:[],isSVG:cl(i)||void 0,needBlock:p,rootId:g,isCustom:v}}function F(i){return i==null?"":i.toLowerCase()}function Nn(i){return i===!0||i==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:i==="all",headMetaDescKeywords:i==="all",headTitleMutations:i==="all"}:i||{}}function yl(i,e){if(e.comment&&i.type===Y.Comment)return!0;if(i.type===Y.Element){if(e.script&&(i.tagName==="script"||i.tagName==="link"&&(i.attributes.rel==="preload"&&i.attributes.as==="script"||i.attributes.rel==="modulepreload")||i.tagName==="link"&&i.attributes.rel==="prefetch"&&typeof i.attributes.href=="string"&&In(i.attributes.href)==="js"))return!0;if(e.headFavicon&&(i.tagName==="link"&&i.attributes.rel==="shortcut icon"||i.tagName==="meta"&&(F(i.attributes.name).match(/^msapplication-tile(image|color)$/)||F(i.attributes.name)==="application-name"||F(i.attributes.rel)==="icon"||F(i.attributes.rel)==="apple-touch-icon"||F(i.attributes.rel)==="shortcut icon")))return!0;if(i.tagName==="meta"){if(e.headMetaDescKeywords&&F(i.attributes.name).match(/^description|keywords$/))return!0;if(e.headMetaSocial&&(F(i.attributes.property).match(/^(og|twitter|fb):/)||F(i.attributes.name).match(/^(og|twitter):/)||F(i.attributes.name)==="pinterest"))return!0;if(e.headMetaRobots&&(F(i.attributes.name)==="robots"||F(i.attributes.name)==="googlebot"||F(i.attributes.name)==="bingbot"))return!0;if(e.headMetaHttpEquiv&&i.attributes["http-equiv"]!==void 0)return!0;if(e.headMetaAuthorship&&(F(i.attributes.name)==="author"||F(i.attributes.name)==="generator"||F(i.attributes.name)==="framework"||F(i.attributes.name)==="publisher"||F(i.attributes.name)==="progid"||F(i.attributes.property).match(/^article:/)||F(i.attributes.property).match(/^product:/)))return!0;if(e.headMetaVerification&&(F(i.attributes.name)==="google-site-verification"||F(i.attributes.name)==="yandex-verification"||F(i.attributes.name)==="csrf-token"||F(i.attributes.name)==="p:domain_verify"||F(i.attributes.name)==="verify-v1"||F(i.attributes.name)==="verification"||F(i.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function $e(i,e){let{doc:t,mirror:r,blockClass:s,blockSelector:n,maskTextClass:o,maskTextSelector:l,skipChild:a=!1,inlineStylesheet:c=!0,maskInputOptions:u={},maskTextFn:f,maskInputFn:m,slimDOMOptions:g,dataURLOptions:p={},inlineImages:d=!1,recordCanvas:h=!1,onSerialize:w,onIframeLoad:v,iframeLoadTimeout:y=5e3,onStylesheetLoad:S,stylesheetLoadTimeout:E=5e3,keepIframeSrcFn:A=()=>!1,newlyAddedElement:$=!1,cssCaptured:D=!1}=e,{needsMask:P}=e,{preserveWhiteSpace:H=!0}=e;P||(P=Mn(i,o,l,P===void 0));let se=dl(i,{doc:t,mirror:r,blockClass:s,blockSelector:n,needsMask:P,inlineStylesheet:c,maskInputOptions:u,maskTextFn:f,maskInputFn:m,dataURLOptions:p,inlineImages:d,recordCanvas:h,keepIframeSrcFn:A,newlyAddedElement:$,cssCaptured:D});if(!se)return console.warn(i,"not serialized"),null;let re;r.hasNode(i)?re=r.getId(i):yl(se,g)||!H&&se.type===Y.Text&&!se.textContent.replace(/^\s+|\s+$/gm,"").length?re=st:re=En();let R=Object.assign(se,{id:re});if(r.add(i,R),re===st)return null;w&&w(i);let He=!a;if(R.type===Y.Element){He=He&&!R.needBlock,delete R.needBlock;let Z=Q.shadowRoot(i);Z&&et(Z)&&(R.isShadowHost=!0)}if((R.type===Y.Document||R.type===Y.Element)&&He){g.headWhitespace&&R.type===Y.Element&&R.tagName==="head"&&(H=!1);let Z={doc:t,mirror:r,blockClass:s,blockSelector:n,needsMask:P,maskTextClass:o,maskTextSelector:l,skipChild:a,inlineStylesheet:c,maskInputOptions:u,maskTextFn:f,maskInputFn:m,slimDOMOptions:g,dataURLOptions:p,inlineImages:d,recordCanvas:h,preserveWhiteSpace:H,onSerialize:w,onIframeLoad:v,iframeLoadTimeout:y,onStylesheetLoad:S,stylesheetLoadTimeout:E,keepIframeSrcFn:A,cssCaptured:!1};if(!(R.type===Y.Element&&R.tagName==="textarea"&&R.attributes.value!==void 0)){R.type===Y.Element&&R.attributes._cssText!==void 0&&typeof R.attributes._cssText=="string"&&(Z.cssCaptured=!0);for(let Ce of Array.from(Q.childNodes(i))){let ne=$e(Ce,Z);ne&&R.childNodes.push(ne)}}let ve=null;if(vn(i)&&(ve=Q.shadowRoot(i)))for(let Ce of Array.from(Q.childNodes(ve))){let ne=$e(Ce,Z);ne&&(et(ve)&&(ne.isShadow=!0),R.childNodes.push(ne))}}let Ye=Q.parentNode(i);return Ye&&Qe(Ye)&&et(Ye)&&(R.isShadow=!0),R.type===Y.Element&&R.tagName==="iframe"&&hl(i,()=>{let Z=i.contentDocument;if(Z&&v){let ve=$e(Z,{doc:Z,mirror:r,blockClass:s,blockSelector:n,needsMask:P,maskTextClass:o,maskTextSelector:l,skipChild:!1,inlineStylesheet:c,maskInputOptions:u,maskTextFn:f,maskInputFn:m,slimDOMOptions:g,dataURLOptions:p,inlineImages:d,recordCanvas:h,preserveWhiteSpace:H,onSerialize:w,onIframeLoad:v,iframeLoadTimeout:y,onStylesheetLoad:S,stylesheetLoadTimeout:E,keepIframeSrcFn:A});ve&&v(i,ve)}},y),R.type===Y.Element&&R.tagName==="link"&&typeof R.attributes.rel=="string"&&(R.attributes.rel==="stylesheet"||R.attributes.rel==="preload"&&typeof R.attributes.href=="string"&&In(R.attributes.href)==="css")&&fl(i,()=>{if(S){let Z=$e(i,{doc:t,mirror:r,blockClass:s,blockSelector:n,needsMask:P,maskTextClass:o,maskTextSelector:l,skipChild:!1,inlineStylesheet:c,maskInputOptions:u,maskTextFn:f,maskInputFn:m,slimDOMOptions:g,dataURLOptions:p,inlineImages:d,recordCanvas:h,preserveWhiteSpace:H,onSerialize:w,onIframeLoad:v,iframeLoadTimeout:y,onStylesheetLoad:S,stylesheetLoadTimeout:E,keepIframeSrcFn:A});Z&&S(i,Z)}},E),R}function bl(i,e){let{mirror:t=new qt,blockClass:r="rr-block",blockSelector:s=null,maskTextClass:n="rr-mask",maskTextSelector:o=null,inlineStylesheet:l=!0,inlineImages:a=!1,recordCanvas:c=!1,maskAllInputs:u=!1,maskTextFn:f,maskInputFn:m,slimDOM:g=!1,dataURLOptions:p,preserveWhiteSpace:d,onSerialize:h,onIframeLoad:w,iframeLoadTimeout:v,onStylesheetLoad:y,stylesheetLoadTimeout:S,keepIframeSrcFn:E=()=>!1}=e||{},A=u===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:u===!1?{password:!0}:u,$=Nn(g);return $e(i,{doc:i,mirror:t,blockClass:r,blockSelector:s,maskTextClass:n,maskTextSelector:o,skipChild:!1,inlineStylesheet:l,maskInputOptions:A,maskTextFn:f,maskInputFn:m,slimDOMOptions:$,dataURLOptions:p,inlineImages:a,recordCanvas:c,preserveWhiteSpace:d,onSerialize:h,onIframeLoad:w,iframeLoadTimeout:v,onStylesheetLoad:y,stylesheetLoadTimeout:S,keepIframeSrcFn:E,newlyAddedElement:!1})}var wl=/(max|min)-device-(width|height)/,nd=new RegExp(wl.source,"g");function Sl(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}function vl(i){if(i.__esModule)return i;var e=i.default;if(typeof e=="function"){var t=function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(i).forEach(function(r){var s=Object.getOwnPropertyDescriptor(i,r);Object.defineProperty(t,r,s.get?s:{enumerable:!0,get:function(){return i[r]}})}),t}var Bi={exports:{}},B=String,On=function(){return{isColorSupported:!1,reset:B,bold:B,dim:B,italic:B,underline:B,inverse:B,hidden:B,strikethrough:B,black:B,red:B,green:B,yellow:B,blue:B,magenta:B,cyan:B,white:B,gray:B,bgBlack:B,bgRed:B,bgGreen:B,bgYellow:B,bgBlue:B,bgMagenta:B,bgCyan:B,bgWhite:B}};Bi.exports=On();Bi.exports.createColors=On;var Cl=Bi.exports,Il={},El=Object.freeze(Object.defineProperty({__proto__:null,default:Il},Symbol.toStringTag,{value:"Module"})),ce=vl(El),Ns=Cl,Os=ce,Kr=class An extends Error{constructor(e,t,r,s,n,o){super(e),this.name="CssSyntaxError",this.reason=e,n&&(this.file=n),s&&(this.source=s),o&&(this.plugin=o),typeof t!="undefined"&&typeof r!="undefined"&&(typeof t=="number"?(this.line=t,this.column=r):(this.line=t.line,this.column=t.column,this.endLine=r.line,this.endColumn=r.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,An)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line!="undefined"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let t=this.source;e==null&&(e=Ns.isColorSupported),Os&&e&&(t=Os(t));let r=t.split(/\r?\n/),s=Math.max(this.line-3,0),n=Math.min(this.line+2,r.length),o=String(n).length,l,a;if(e){let{bold:c,gray:u,red:f}=Ns.createColors(!0);l=m=>c(f(m)),a=m=>u(m)}else l=a=c=>c;return r.slice(s,n).map((c,u)=>{let f=s+1+u,m=" "+(" "+f).slice(-o)+" | ";if(f===this.line){let g=a(m.replace(/\d/g," "))+c.slice(0,this.column-1).replace(/[^\t]/g," ");return l(">")+a(m)+c+`
2
+ `+g+l("^")}return" "+a(m)+c}).join(`
3
+ `)}toString(){let e=this.showSourceCode();return e&&(e=`
4
+
5
+ `+e+`
6
+ `),this.name+": "+this.message+e}},Ui=Kr;Kr.default=Kr;var pt={};pt.isClean=Symbol("isClean");pt.my=Symbol("my");var As={after:`
7
+ `,beforeClose:`
8
+ `,beforeComment:`
9
+ `,beforeDecl:`
10
+ `,beforeOpen:" ",beforeRule:`
11
+ `,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function xl(i){return i[0].toUpperCase()+i.slice(1)}var Xr=class{constructor(e){this.builder=e}atrule(e,t){let r="@"+e.name,s=e.params?this.rawValue(e,"params"):"";if(typeof e.raws.afterName!="undefined"?r+=e.raws.afterName:s&&(r+=" "),e.nodes)this.block(e,r+s);else{let n=(e.raws.between||"")+(t?";":"");this.builder(r+s+n,e)}}beforeAfter(e,t){let r;e.type==="decl"?r=this.raw(e,null,"beforeDecl"):e.type==="comment"?r=this.raw(e,null,"beforeComment"):t==="before"?r=this.raw(e,null,"beforeRule"):r=this.raw(e,null,"beforeClose");let s=e.parent,n=0;for(;s&&s.type!=="root";)n+=1,s=s.parent;if(r.includes(`
12
+ `)){let o=this.raw(e,null,"indent");if(o.length)for(let l=0;l<n;l++)r+=o}return r}block(e,t){let r=this.raw(e,"between","beforeOpen");this.builder(t+r+"{",e,"start");let s;e.nodes&&e.nodes.length?(this.body(e),s=this.raw(e,"after")):s=this.raw(e,"after","emptyBody"),s&&this.builder(s),this.builder("}",e,"end")}body(e){let t=e.nodes.length-1;for(;t>0&&e.nodes[t].type==="comment";)t-=1;let r=this.raw(e,"semicolon");for(let s=0;s<e.nodes.length;s++){let n=e.nodes[s],o=this.raw(n,"before");o&&this.builder(o),this.stringify(n,t!==s||r)}}comment(e){let t=this.raw(e,"left","commentLeft"),r=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+r+"*/",e)}decl(e,t){let r=this.raw(e,"between","colon"),s=e.prop+r+this.rawValue(e,"value");e.important&&(s+=e.raws.important||" !important"),t&&(s+=";"),this.builder(s,e)}document(e){this.body(e)}raw(e,t,r){let s;if(r||(r=t),t&&(s=e.raws[t],typeof s!="undefined"))return s;let n=e.parent;if(r==="before"&&(!n||n.type==="root"&&n.first===e||n&&n.type==="document"))return"";if(!n)return As[r];let o=e.root();if(o.rawCache||(o.rawCache={}),typeof o.rawCache[r]!="undefined")return o.rawCache[r];if(r==="before"||r==="after")return this.beforeAfter(e,r);{let l="raw"+xl(r);this[l]?s=this[l](o,e):o.walk(a=>{if(s=a.raws[t],typeof s!="undefined")return!1})}return typeof s=="undefined"&&(s=As[r]),o.rawCache[r]=s,s}rawBeforeClose(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length>0&&typeof r.raws.after!="undefined")return t=r.raws.after,t.includes(`
13
+ `)&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let r;return e.walkComments(s=>{if(typeof s.raws.before!="undefined")return r=s.raws.before,r.includes(`
14
+ `)&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r=="undefined"?r=this.raw(t,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeDecl(e,t){let r;return e.walkDecls(s=>{if(typeof s.raws.before!="undefined")return r=s.raws.before,r.includes(`
15
+ `)&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r=="undefined"?r=this.raw(t,null,"beforeRule"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeOpen(e){let t;return e.walk(r=>{if(r.type!=="decl"&&(t=r.raws.between,typeof t!="undefined"))return!1}),t}rawBeforeRule(e){let t;return e.walk(r=>{if(r.nodes&&(r.parent!==e||e.first!==r)&&typeof r.raws.before!="undefined")return t=r.raws.before,t.includes(`
16
+ `)&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls(r=>{if(typeof r.raws.between!="undefined")return t=r.raws.between.replace(/[^\s:]/g,""),!1}),t}rawEmptyBody(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length===0&&(t=r.raws.after,typeof t!="undefined"))return!1}),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk(r=>{let s=r.parent;if(s&&s!==e&&s.parent&&s.parent===e&&typeof r.raws.before!="undefined"){let n=r.raws.before.split(`
17
+ `);return t=n[n.length-1],t=t.replace(/\S/g,""),!1}}),t}rawSemicolon(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length&&r.last.type==="decl"&&(t=r.raws.semicolon,typeof t!="undefined"))return!1}),t}rawValue(e,t){let r=e[t],s=e.raws[t];return s&&s.value===r?s.raw:r}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}},Dn=Xr;Xr.default=Xr;var Rl=Dn;function Zr(i,e){new Rl(e).stringify(i)}var dr=Zr;Zr.default=Zr;var{isClean:xt,my:Ml}=pt,Nl=Ui,Ol=Dn,Al=dr;function Jr(i,e){let t=new i.constructor;for(let r in i){if(!Object.prototype.hasOwnProperty.call(i,r)||r==="proxyCache")continue;let s=i[r],n=typeof s;r==="parent"&&n==="object"?e&&(t[r]=e):r==="source"?t[r]=s:Array.isArray(s)?t[r]=s.map(o=>Jr(o,t)):(n==="object"&&s!==null&&(s=Jr(s)),t[r]=s)}return t}var qr=class{constructor(e={}){this.raws={},this[xt]=!1,this[Ml]=!0;for(let t in e)if(t==="nodes"){this.nodes=[];for(let r of e[t])typeof r.clone=="function"?this.append(r.clone()):this.append(r)}else this[t]=e[t]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let t in e)this[t]=e[t];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let t=Jr(this);for(let r in e)t[r]=e[r];return t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}error(e,t={}){if(this.source){let{end:r,start:s}=this.rangeBy(t);return this.source.input.error(e,{column:s.column,line:s.line},{column:r.column,line:r.line},t)}return new Nl(e)}getProxyProcessor(){return{get(e,t){return t==="proxyOf"?e:t==="root"?()=>e.root().toProxy():e[t]},set(e,t,r){return e[t]===r||(e[t]=r,(t==="prop"||t==="value"||t==="name"||t==="params"||t==="important"||t==="text")&&e.markDirty()),!0}}}markDirty(){if(this[xt]){this[xt]=!1;let e=this;for(;e=e.parent;)e[xt]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let r=this.source.start;if(e.index)r=this.positionInside(e.index,t);else if(e.word){t=this.toString();let s=t.indexOf(e.word);s!==-1&&(r=this.positionInside(s,t))}return r}positionInside(e,t){let r=t||this.toString(),s=this.source.start.column,n=this.source.start.line;for(let o=0;o<e;o++)r[o]===`
18
+ `?(s=1,n+=1):s+=1;return{column:s,line:n}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e){let t={column:this.source.start.column,line:this.source.start.line},r=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:t.column+1,line:t.line};if(e.word){let s=this.toString(),n=s.indexOf(e.word);n!==-1&&(t=this.positionInside(n,s),r=this.positionInside(n+e.word.length,s))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?r={column:e.end.column,line:e.end.line}:typeof e.endIndex=="number"?r=this.positionInside(e.endIndex):e.index&&(r=this.positionInside(e.index+1));return(r.line<t.line||r.line===t.line&&r.column<=t.column)&&(r={column:t.column+1,line:t.line}),{end:r,start:t}}raw(e,t){return new Ol().raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let t=this,r=!1;for(let s of e)s===this?r=!0:r?(this.parent.insertAfter(t,s),t=s):this.parent.insertBefore(t,s);r||this.remove()}return this}root(){let e=this;for(;e.parent&&e.parent.type!=="document";)e=e.parent;return e}toJSON(e,t){let r={},s=t==null;t=t||new Map;let n=0;for(let o in this){if(!Object.prototype.hasOwnProperty.call(this,o)||o==="parent"||o==="proxyCache")continue;let l=this[o];if(Array.isArray(l))r[o]=l.map(a=>typeof a=="object"&&a.toJSON?a.toJSON(null,t):a);else if(typeof l=="object"&&l.toJSON)r[o]=l.toJSON(null,t);else if(o==="source"){let a=t.get(l.input);a==null&&(a=n,t.set(l.input,n),n++),r[o]={end:l.end,inputId:a,start:l.start}}else r[o]=l}return s&&(r.inputs=[...t.keys()].map(o=>o.toJSON())),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=Al){e.stringify&&(e=e.stringify);let t="";return e(this,r=>{t+=r}),t}warn(e,t,r){let s={node:this};for(let n in r)s[n]=r[n];return e.warn(t,s)}get proxyOf(){return this}},pr=qr;qr.default=qr;var Dl=pr,Qr=class extends Dl{constructor(e){e&&typeof e.value!="undefined"&&typeof e.value!="string"&&(e=J(I({},e),{value:String(e.value)})),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}},mr=Qr;Qr.default=Qr;var Tl="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",kl=(i,e=21)=>(t=e)=>{let r="",s=t;for(;s--;)r+=i[Math.random()*i.length|0];return r},_l=(i=21)=>{let e="",t=i;for(;t--;)e+=Tl[Math.random()*64|0];return e},Ll={nanoid:_l,customAlphabet:kl},{SourceMapConsumer:Ds,SourceMapGenerator:Ts}=ce,{existsSync:$l,readFileSync:Pl}=ce,{dirname:_r,join:Fl}=ce;function Bl(i){return Buffer?Buffer.from(i,"base64").toString():window.atob(i)}var ei=class{constructor(e,t){if(t.map===!1)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let r=t.map?t.map.prev:void 0,s=this.loadMap(t.from,r);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=_r(this.mapFile)),s&&(this.text=s)}consumer(){return this.consumerCache||(this.consumerCache=new Ds(this.text)),this.consumerCache}decodeInline(e){let t=/^data:application\/json;charset=utf-?8;base64,/,r=/^data:application\/json;base64,/,s=/^data:application\/json;charset=utf-?8,/,n=/^data:application\/json,/;if(s.test(e)||n.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(t.test(e)||r.test(e))return Bl(e.substr(RegExp.lastMatch.length));let o=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+o)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return typeof e!="object"?!1:typeof e.mappings=="string"||typeof e._mappings=="string"||Array.isArray(e.sections)}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/gm);if(!t)return;let r=e.lastIndexOf(t.pop()),s=e.indexOf("*/",r);r>-1&&s>-1&&(this.annotation=this.getAnnotationURL(e.substring(r,s)))}loadFile(e){if(this.root=_r(e),$l(e))return this.mapFile=e,Pl(e,"utf-8").toString().trim()}loadMap(e,t){if(t===!1)return!1;if(t){if(typeof t=="string")return t;if(typeof t=="function"){let r=t(e);if(r){let s=this.loadFile(r);if(!s)throw new Error("Unable to load previous source map: "+r.toString());return s}}else{if(t instanceof Ds)return Ts.fromSourceMap(t).toString();if(t instanceof Ts)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let r=this.annotation;return e&&(r=Fl(_r(e),r)),this.loadFile(r)}}}startWith(e,t){return e?e.substr(0,t.length)===t:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}},Tn=ei;ei.default=ei;var{SourceMapConsumer:Ul,SourceMapGenerator:zl}=ce,{fileURLToPath:ks,pathToFileURL:Rt}=ce,{isAbsolute:ti,resolve:ri}=ce,{nanoid:Wl}=Ll,Lr=ce,_s=Ui,Vl=Tn,$r=Symbol("fromOffsetCache"),Gl=!!(Ul&&zl),Ls=!!(ri&&ti),tr=class{constructor(e,t={}){if(e===null||typeof e=="undefined"||typeof e=="object"&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),this.css[0]==="\uFEFF"||this.css[0]==="\uFFFE"?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(!Ls||/^\w+:\/\//.test(t.from)||ti(t.from)?this.file=t.from:this.file=ri(t.from)),Ls&&Gl){let r=new Vl(this.css,t);if(r.text){this.map=r;let s=r.consumer().file;!this.file&&s&&(this.file=this.mapResolve(s))}}this.file||(this.id="<input css "+Wl(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,r,s={}){let n,o,l;if(t&&typeof t=="object"){let c=t,u=r;if(typeof c.offset=="number"){let f=this.fromOffset(c.offset);t=f.line,r=f.col}else t=c.line,r=c.column;if(typeof u.offset=="number"){let f=this.fromOffset(u.offset);o=f.line,l=f.col}else o=u.line,l=u.column}else if(!r){let c=this.fromOffset(t);t=c.line,r=c.col}let a=this.origin(t,r,o,l);return a?n=new _s(e,a.endLine===void 0?a.line:{column:a.column,line:a.line},a.endLine===void 0?a.column:{column:a.endColumn,line:a.endLine},a.source,a.file,s.plugin):n=new _s(e,o===void 0?t:{column:r,line:t},o===void 0?r:{column:l,line:o},this.css,this.file,s.plugin),n.input={column:r,endColumn:l,endLine:o,line:t,source:this.css},this.file&&(Rt&&(n.input.url=Rt(this.file).toString()),n.input.file=this.file),n}fromOffset(e){let t,r;if(this[$r])r=this[$r];else{let n=this.css.split(`
19
+ `);r=new Array(n.length);let o=0;for(let l=0,a=n.length;l<a;l++)r[l]=o,o+=n[l].length+1;this[$r]=r}t=r[r.length-1];let s=0;if(e>=t)s=r.length-1;else{let n=r.length-2,o;for(;s<n;)if(o=s+(n-s>>1),e<r[o])n=o-1;else if(e>=r[o+1])s=o+1;else{s=o;break}}return{col:e-r[s]+1,line:s+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:ri(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,r,s){if(!this.map)return!1;let n=this.map.consumer(),o=n.originalPositionFor({column:t,line:e});if(!o.source)return!1;let l;typeof r=="number"&&(l=n.originalPositionFor({column:s,line:r}));let a;ti(o.source)?a=Rt(o.source):a=new URL(o.source,this.map.consumer().sourceRoot||Rt(this.map.mapFile));let c={column:o.column,endColumn:l&&l.column,endLine:l&&l.line,line:o.line,url:a.toString()};if(a.protocol==="file:")if(ks)c.file=ks(a);else throw new Error("file: protocol is not available in this PostCSS build");let u=n.sourceContentFor(o.source);return u&&(c.source=u),c}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])this[t]!=null&&(e[t]=this[t]);return this.map&&(e.map=I({},this.map),e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}},gr=tr;tr.default=tr;Lr&&Lr.registerInput&&Lr.registerInput(tr);var{SourceMapConsumer:kn,SourceMapGenerator:Ht}=ce,{dirname:Yt,relative:_n,resolve:Ln,sep:$n}=ce,{pathToFileURL:$s}=ce,jl=gr,Hl=!!(kn&&Ht),Yl=!!(Yt&&Ln&&_n&&$n),Kl=class{constructor(e,t,r,s){this.stringify=e,this.mapOpts=r.map||{},this.root=t,this.opts=r,this.css=s,this.originalCSS=s,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;this.isInline()?e="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?e=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?e=this.mapOpts.annotation(this.opts.to,this.root):e=this.outputFile()+".map";let t=`
20
+ `;this.css.includes(`\r
21
+ `)&&(t=`\r
22
+ `),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t=this.toUrl(this.path(e.file)),r=e.root||Yt(e.file),s;this.mapOpts.sourcesContent===!1?(s=new kn(e.text),s.sourcesContent&&(s.sourcesContent=null)):s=e.consumer(),this.map.applySourceMap(s,t,this.toUrl(this.path(r)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],e.type==="comment"&&e.text.indexOf("# sourceMappingURL=")===0&&this.root.removeChild(t)}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),Yl&&Hl&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,t=>{e+=t}),[e]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=Ht.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new Ht({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css="",this.map=new Ht({file:this.outputFile(),ignoreInvalidMapping:!0});let e=1,t=1,r="<no source>",s={generated:{column:0,line:0},original:{column:0,line:0},source:""},n,o;this.stringify(this.root,(l,a,c)=>{if(this.css+=l,a&&c!=="end"&&(s.generated.line=e,s.generated.column=t-1,a.source&&a.source.start?(s.source=this.sourcePath(a),s.original.line=a.source.start.line,s.original.column=a.source.start.column-1,this.map.addMapping(s)):(s.source=r,s.original.line=1,s.original.column=0,this.map.addMapping(s))),n=l.match(/\n/g),n?(e+=n.length,o=l.lastIndexOf(`
23
+ `),t=l.length-o):t+=l.length,a&&c!=="start"){let u=a.parent||{raws:{}};(!(a.type==="decl"||a.type==="atrule"&&!a.nodes)||a!==u.last||u.raws.semicolon)&&(a.source&&a.source.end?(s.source=this.sourcePath(a),s.original.line=a.source.end.line,s.original.column=a.source.end.column-1,s.generated.line=e,s.generated.column=t-2,this.map.addMapping(s)):(s.source=r,s.original.line=1,s.original.column=0,s.generated.line=e,s.generated.column=t-1,this.map.addMapping(s)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation!="undefined"?this.mapOpts.annotation:this.previous().length?this.previous().some(e=>e.annotation):!0}isInline(){if(typeof this.mapOpts.inline!="undefined")return this.mapOpts.inline;let e=this.mapOpts.annotation;return typeof e!="undefined"&&e!==!0?!1:this.previous().length?this.previous().some(t=>t.inline):!0}isMap(){return typeof this.opts.map!="undefined"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent!="undefined"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(e=>e.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute||e.charCodeAt(0)===60||/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let r=this.opts.to?Yt(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(r=Yt(Ln(r,this.mapOpts.annotation)));let s=_n(r,e);return this.memoizedPaths.set(e,s),s}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}});else{let e=new jl(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(t=>{if(t.source){let r=t.source.input.from;if(r&&!e[r]){e[r]=!0;let s=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(s,t.source.input.css)}}});else if(this.css){let t=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(t,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if($s){let r=$s(e).toString();return this.memoizedFileURLs.set(e,r),r}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;$n==="\\"&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}},Pn=Kl,Xl=pr,ii=class extends Xl{constructor(e){super(e),this.type="comment"}},yr=ii;ii.default=ii;var{isClean:Fn,my:Bn}=pt,Un=mr,zn=yr,Zl=pr,Wn,zi,Wi,Vn;function Gn(i){return i.map(e=>(e.nodes&&(e.nodes=Gn(e.nodes)),delete e.source,e))}function jn(i){if(i[Fn]=!1,i.proxyOf.nodes)for(let e of i.proxyOf.nodes)jn(e)}var ge=class Hn extends Zl{append(...e){for(let t of e){let r=this.normalize(t,this.last);for(let s of r)this.proxyOf.nodes.push(s)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t=this.getIterator(),r,s;for(;this.indexes[t]<this.proxyOf.nodes.length&&(r=this.indexes[t],s=e(this.proxyOf.nodes[r],r),s!==!1);)this.indexes[t]+=1;return delete this.indexes[t],s}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get(e,t){return t==="proxyOf"?e:e[t]?t==="each"||typeof t=="string"&&t.startsWith("walk")?(...r)=>e[t](...r.map(s=>typeof s=="function"?(n,o)=>s(n.toProxy(),o):s)):t==="every"||t==="some"?r=>e[t]((s,...n)=>r(s.toProxy(),...n)):t==="root"?()=>e.root().toProxy():t==="nodes"?e.nodes.map(r=>r.toProxy()):t==="first"||t==="last"?e[t].toProxy():e[t]:e[t]},set(e,t,r){return e[t]===r||(e[t]=r,(t==="name"||t==="params"||t==="selector")&&e.markDirty()),!0}}}index(e){return typeof e=="number"?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let r=this.index(e),s=this.normalize(t,this.proxyOf.nodes[r]).reverse();r=this.index(e);for(let o of s)this.proxyOf.nodes.splice(r+1,0,o);let n;for(let o in this.indexes)n=this.indexes[o],r<n&&(this.indexes[o]=n+s.length);return this.markDirty(),this}insertBefore(e,t){let r=this.index(e),s=r===0?"prepend":!1,n=this.normalize(t,this.proxyOf.nodes[r],s).reverse();r=this.index(e);for(let l of n)this.proxyOf.nodes.splice(r,0,l);let o;for(let l in this.indexes)o=this.indexes[l],r<=o&&(this.indexes[l]=o+n.length);return this.markDirty(),this}normalize(e,t){if(typeof e=="string")e=Gn(Wn(e).nodes);else if(typeof e=="undefined")e=[];else if(Array.isArray(e)){e=e.slice(0);for(let s of e)s.parent&&s.parent.removeChild(s,"ignore")}else if(e.type==="root"&&this.type!=="document"){e=e.nodes.slice(0);for(let s of e)s.parent&&s.parent.removeChild(s,"ignore")}else if(e.type)e=[e];else if(e.prop){if(typeof e.value=="undefined")throw new Error("Value field is missed in node creation");typeof e.value!="string"&&(e.value=String(e.value)),e=[new Un(e)]}else if(e.selector)e=[new zi(e)];else if(e.name)e=[new Wi(e)];else if(e.text)e=[new zn(e)];else throw new Error("Unknown node type in node creation");return e.map(s=>(s[Bn]||Hn.rebuild(s),s=s.proxyOf,s.parent&&s.parent.removeChild(s),s[Fn]&&jn(s),typeof s.raws.before=="undefined"&&t&&typeof t.raws.before!="undefined"&&(s.raws.before=t.raws.before.replace(/\S/g,"")),s.parent=this.proxyOf,s))}prepend(...e){e=e.reverse();for(let t of e){let r=this.normalize(t,this.first,"prepend").reverse();for(let s of r)this.proxyOf.nodes.unshift(s);for(let s in this.indexes)this.indexes[s]=this.indexes[s]+r.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);let t;for(let r in this.indexes)t=this.indexes[r],t>=e&&(this.indexes[r]=t-1);return this.markDirty(),this}replaceValues(e,t,r){return r||(r=t,t={}),this.walkDecls(s=>{t.props&&!t.props.includes(s.prop)||t.fast&&!s.value.includes(t.fast)||(s.value=s.value.replace(e,r))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,r)=>{let s;try{s=e(t,r)}catch(n){throw t.addToError(n)}return s!==!1&&t.walk&&(s=t.walk(e)),s})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((r,s)=>{if(r.type==="atrule"&&e.test(r.name))return t(r,s)}):this.walk((r,s)=>{if(r.type==="atrule"&&r.name===e)return t(r,s)}):(t=e,this.walk((r,s)=>{if(r.type==="atrule")return t(r,s)}))}walkComments(e){return this.walk((t,r)=>{if(t.type==="comment")return e(t,r)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((r,s)=>{if(r.type==="decl"&&e.test(r.prop))return t(r,s)}):this.walk((r,s)=>{if(r.type==="decl"&&r.prop===e)return t(r,s)}):(t=e,this.walk((r,s)=>{if(r.type==="decl")return t(r,s)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((r,s)=>{if(r.type==="rule"&&e.test(r.selector))return t(r,s)}):this.walk((r,s)=>{if(r.type==="rule"&&r.selector===e)return t(r,s)}):(t=e,this.walk((r,s)=>{if(r.type==="rule")return t(r,s)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}};ge.registerParse=i=>{Wn=i};ge.registerRule=i=>{zi=i};ge.registerAtRule=i=>{Wi=i};ge.registerRoot=i=>{Vn=i};var Ne=ge;ge.default=ge;ge.rebuild=i=>{i.type==="atrule"?Object.setPrototypeOf(i,Wi.prototype):i.type==="rule"?Object.setPrototypeOf(i,zi.prototype):i.type==="decl"?Object.setPrototypeOf(i,Un.prototype):i.type==="comment"?Object.setPrototypeOf(i,zn.prototype):i.type==="root"&&Object.setPrototypeOf(i,Vn.prototype),i[Bn]=!0,i.nodes&&i.nodes.forEach(e=>{ge.rebuild(e)})};var Jl=Ne,Yn,Kn,nt=class extends Jl{constructor(e){super(I({type:"document"},e)),this.nodes||(this.nodes=[])}toResult(e={}){return new Yn(new Kn,this,e).stringify()}};nt.registerLazyResult=i=>{Yn=i};nt.registerProcessor=i=>{Kn=i};var Vi=nt;nt.default=nt;var si=class{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let r=t.node.rangeBy(t);this.line=r.start.line,this.column=r.start.column,this.endLine=r.end.line,this.endColumn=r.end.column}for(let r in t)this[r]=t[r]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}},Xn=si;si.default=si;var ql=Xn,ni=class{constructor(e,t,r){this.processor=e,this.messages=[],this.root=t,this.opts=r,this.css=void 0,this.map=void 0}toString(){return this.css}warn(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let r=new ql(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>e.type==="warning")}get content(){return this.css}},Gi=ni;ni.default=ni;var Pr=39,Ps=34,Mt=92,Fs=47,Nt=10,Ke=32,Ot=12,At=9,Dt=13,Ql=91,ec=93,tc=40,rc=41,ic=123,sc=125,nc=59,oc=42,ac=58,lc=64,Tt=/[\t\n\f\r "#'()/;[\\\]{}]/g,kt=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,cc=/.[\r\n"'(/\\]/,Bs=/[\da-f]/i,uc=function(e,t={}){let r=e.css.valueOf(),s=t.ignoreErrors,n,o,l,a,c,u,f,m,g,p,d=r.length,h=0,w=[],v=[];function y(){return h}function S(D){throw e.error("Unclosed "+D,h)}function E(){return v.length===0&&h>=d}function A(D){if(v.length)return v.pop();if(h>=d)return;let P=D?D.ignoreUnclosed:!1;switch(n=r.charCodeAt(h),n){case Nt:case Ke:case At:case Dt:case Ot:{o=h;do o+=1,n=r.charCodeAt(o);while(n===Ke||n===Nt||n===At||n===Dt||n===Ot);p=["space",r.slice(h,o)],h=o-1;break}case Ql:case ec:case ic:case sc:case ac:case nc:case rc:{let H=String.fromCharCode(n);p=[H,H,h];break}case tc:{if(m=w.length?w.pop()[1]:"",g=r.charCodeAt(h+1),m==="url"&&g!==Pr&&g!==Ps&&g!==Ke&&g!==Nt&&g!==At&&g!==Ot&&g!==Dt){o=h;do{if(u=!1,o=r.indexOf(")",o+1),o===-1)if(s||P){o=h;break}else S("bracket");for(f=o;r.charCodeAt(f-1)===Mt;)f-=1,u=!u}while(u);p=["brackets",r.slice(h,o+1),h,o],h=o}else o=r.indexOf(")",h+1),a=r.slice(h,o+1),o===-1||cc.test(a)?p=["(","(",h]:(p=["brackets",a,h,o],h=o);break}case Pr:case Ps:{l=n===Pr?"'":'"',o=h;do{if(u=!1,o=r.indexOf(l,o+1),o===-1)if(s||P){o=h+1;break}else S("string");for(f=o;r.charCodeAt(f-1)===Mt;)f-=1,u=!u}while(u);p=["string",r.slice(h,o+1),h,o],h=o;break}case lc:{Tt.lastIndex=h+1,Tt.test(r),Tt.lastIndex===0?o=r.length-1:o=Tt.lastIndex-2,p=["at-word",r.slice(h,o+1),h,o],h=o;break}case Mt:{for(o=h,c=!0;r.charCodeAt(o+1)===Mt;)o+=1,c=!c;if(n=r.charCodeAt(o+1),c&&n!==Fs&&n!==Ke&&n!==Nt&&n!==At&&n!==Dt&&n!==Ot&&(o+=1,Bs.test(r.charAt(o)))){for(;Bs.test(r.charAt(o+1));)o+=1;r.charCodeAt(o+1)===Ke&&(o+=1)}p=["word",r.slice(h,o+1),h,o],h=o;break}default:{n===Fs&&r.charCodeAt(h+1)===oc?(o=r.indexOf("*/",h+2)+1,o===0&&(s||P?o=r.length:S("comment")),p=["comment",r.slice(h,o+1),h,o],h=o):(kt.lastIndex=h+1,kt.test(r),kt.lastIndex===0?o=r.length-1:o=kt.lastIndex-2,p=["word",r.slice(h,o+1),h,o],w.push(p),h=o);break}}return h++,p}function $(D){v.push(D)}return{back:$,endOfFile:E,nextToken:A,position:y}},Zn=Ne,rr=class extends Zn{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}},ji=rr;rr.default=rr;Zn.registerAtRule(rr);var Jn=Ne,qn,Qn,Fe=class extends Jn{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,r){let s=super.normalize(e);if(t){if(r==="prepend")this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let n of s)n.raws.before=t.raws.before}return s}removeChild(e,t){let r=this.index(e);return!t&&r===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(e)}toResult(e={}){return new qn(new Qn,this,e).stringify()}};Fe.registerLazyResult=i=>{qn=i};Fe.registerProcessor=i=>{Qn=i};var mt=Fe;Fe.default=Fe;Jn.registerRoot(Fe);var ot={comma(i){return ot.split(i,[","],!0)},space(i){let e=[" ",`
24
+ `," "];return ot.split(i,e)},split(i,e,t){let r=[],s="",n=!1,o=0,l=!1,a="",c=!1;for(let u of i)c?c=!1:u==="\\"?c=!0:l?u===a&&(l=!1):u==='"'||u==="'"?(l=!0,a=u):u==="("?o+=1:u===")"?o>0&&(o-=1):o===0&&e.includes(u)&&(n=!0),n?(s!==""&&r.push(s.trim()),s="",n=!1):s+=u;return(t||s!=="")&&r.push(s.trim()),r}},eo=ot;ot.default=ot;var to=Ne,hc=eo,ir=class extends to{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return hc.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,r=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(r)}},Hi=ir;ir.default=ir;to.registerRule(ir);var fc=mr,dc=uc,pc=yr,mc=ji,gc=mt,Us=Hi,zs={empty:!0,space:!0};function yc(i){for(let e=i.length-1;e>=0;e--){let t=i[e],r=t[3]||t[2];if(r)return r}}var bc=class{constructor(e){this.input=e,this.root=new gc,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t=new mc;t.name=e[1].slice(1),t.name===""&&this.unnamedAtrule(t,e),this.init(t,e[2]);let r,s,n,o=!1,l=!1,a=[],c=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),r=e[0],r==="("||r==="["?c.push(r==="("?")":"]"):r==="{"&&c.length>0?c.push("}"):r===c[c.length-1]&&c.pop(),c.length===0)if(r===";"){t.source.end=this.getPosition(e[2]),t.source.end.offset++,this.semicolon=!0;break}else if(r==="{"){l=!0;break}else if(r==="}"){if(a.length>0){for(n=a.length-1,s=a[n];s&&s[0]==="space";)s=a[--n];s&&(t.source.end=this.getPosition(s[3]||s[2]),t.source.end.offset++)}this.end(e);break}else a.push(e);else a.push(e);if(this.tokenizer.endOfFile()){o=!0;break}}t.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(t.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(t,"params",a),o&&(e=a[a.length-1],t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++,this.spaces=t.raws.between,t.raws.between="")):(t.raws.afterName="",t.params=""),l&&(t.nodes=[],this.current=t)}checkMissedSemicolon(e){let t=this.colon(e);if(t===!1)return;let r=0,s;for(let n=t-1;n>=0&&(s=e[n],!(s[0]!=="space"&&(r+=1,r===2)));n--);throw this.input.error("Missed semicolon",s[0]==="word"?s[3]+1:s[2])}colon(e){let t=0,r,s,n;for(let[o,l]of e.entries()){if(r=l,s=r[0],s==="("&&(t+=1),s===")"&&(t-=1),t===0&&s===":")if(!n)this.doubleColon(r);else{if(n[0]==="word"&&n[1]==="progid")continue;return o}n=r}return!1}comment(e){let t=new pc;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let r=e[1].slice(2,-2);if(/^\s*$/.test(r))t.text="",t.raws.left=r,t.raws.right="";else{let s=r.match(/^(\s*)([^]*\S)(\s*)$/);t.text=s[2],t.raws.left=s[1],t.raws.right=s[3]}}createTokenizer(){this.tokenizer=dc(this.input)}decl(e,t){let r=new fc;this.init(r,e[0][2]);let s=e[e.length-1];for(s[0]===";"&&(this.semicolon=!0,e.pop()),r.source.end=this.getPosition(s[3]||s[2]||yc(e)),r.source.end.offset++;e[0][0]!=="word";)e.length===1&&this.unknownWord(e),r.raws.before+=e.shift()[1];for(r.source.start=this.getPosition(e[0][2]),r.prop="";e.length;){let c=e[0][0];if(c===":"||c==="space"||c==="comment")break;r.prop+=e.shift()[1]}r.raws.between="";let n;for(;e.length;)if(n=e.shift(),n[0]===":"){r.raws.between+=n[1];break}else n[0]==="word"&&/\w/.test(n[1])&&this.unknownWord([n]),r.raws.between+=n[1];(r.prop[0]==="_"||r.prop[0]==="*")&&(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let o=[],l;for(;e.length&&(l=e[0][0],!(l!=="space"&&l!=="comment"));)o.push(e.shift());this.precheckMissedSemicolon(e);for(let c=e.length-1;c>=0;c--){if(n=e[c],n[1].toLowerCase()==="!important"){r.important=!0;let u=this.stringFrom(e,c);u=this.spacesFromEnd(e)+u,u!==" !important"&&(r.raws.important=u);break}else if(n[1].toLowerCase()==="important"){let u=e.slice(0),f="";for(let m=c;m>0;m--){let g=u[m][0];if(f.trim().indexOf("!")===0&&g!=="space")break;f=u.pop()[1]+f}f.trim().indexOf("!")===0&&(r.important=!0,r.raws.important=f,e=u)}if(n[0]!=="space"&&n[0]!=="comment")break}e.some(c=>c[0]!=="space"&&c[0]!=="comment")&&(r.raws.between+=o.map(c=>c[1]).join(""),o=[]),this.raw(r,"value",o.concat(e),t),r.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new Us;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let t=this.current.nodes[this.current.nodes.length-1];t&&t.type==="rule"&&!t.raws.ownSemicolon&&(t.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="",e.type!=="comment"&&(this.semicolon=!1)}other(e){let t=!1,r=null,s=!1,n=null,o=[],l=e[1].startsWith("--"),a=[],c=e;for(;c;){if(r=c[0],a.push(c),r==="("||r==="[")n||(n=c),o.push(r==="("?")":"]");else if(l&&s&&r==="{")n||(n=c),o.push("}");else if(o.length===0)if(r===";")if(s){this.decl(a,l);return}else break;else if(r==="{"){this.rule(a);return}else if(r==="}"){this.tokenizer.back(a.pop()),t=!0;break}else r===":"&&(s=!0);else r===o[o.length-1]&&(o.pop(),o.length===0&&(n=null));c=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),o.length>0&&this.unclosedBracket(n),t&&s){if(!l)for(;a.length&&(c=a[a.length-1][0],!(c!=="space"&&c!=="comment"));)this.tokenizer.back(a.pop());this.decl(a,l)}else this.unknownWord(a)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e);break}this.endFile()}precheckMissedSemicolon(){}raw(e,t,r,s){let n,o,l=r.length,a="",c=!0,u,f;for(let m=0;m<l;m+=1)n=r[m],o=n[0],o==="space"&&m===l-1&&!s?c=!1:o==="comment"?(f=r[m-1]?r[m-1][0]:"empty",u=r[m+1]?r[m+1][0]:"empty",!zs[f]&&!zs[u]?a.slice(-1)===","?c=!1:a+=n[1]:c=!1):a+=n[1];if(!c){let m=r.reduce((g,p)=>g+p[1],"");e.raws[t]={raw:m,value:a}}e[t]=a}rule(e){e.pop();let t=new Us;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],!(t!=="space"&&t!=="comment"));)r=e.pop()[1]+r;return r}spacesAndCommentsFromStart(e){let t,r="";for(;e.length&&(t=e[0][0],!(t!=="space"&&t!=="comment"));)r+=e.shift()[1];return r}spacesFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],t==="space");)r=e.pop()[1]+r;return r}stringFrom(e,t){let r="";for(let s=t;s<e.length;s++)r+=e[s][1];return e.splice(t,e.length-t),r}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word",{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}},wc=bc,Sc=Ne,vc=wc,Cc=gr;function sr(i,e){let t=new Cc(i,e),r=new vc(t);try{r.parse()}catch(s){throw s}return r.root}var Yi=sr;sr.default=sr;Sc.registerParse(sr);var{isClean:he,my:Ic}=pt,Ec=Pn,xc=dr,Rc=Ne,Mc=Vi;var Ws=Gi,Nc=Yi,Oc=mt,Ac={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},Dc={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},Tc={Once:!0,postcssPlugin:!0,prepare:!0},Be=0;function Xe(i){return typeof i=="object"&&typeof i.then=="function"}function ro(i){let e=!1,t=Ac[i.type];return i.type==="decl"?e=i.prop.toLowerCase():i.type==="atrule"&&(e=i.name.toLowerCase()),e&&i.append?[t,t+"-"+e,Be,t+"Exit",t+"Exit-"+e]:e?[t,t+"-"+e,t+"Exit",t+"Exit-"+e]:i.append?[t,Be,t+"Exit"]:[t,t+"Exit"]}function Vs(i){let e;return i.type==="document"?e=["Document",Be,"DocumentExit"]:i.type==="root"?e=["Root",Be,"RootExit"]:e=ro(i),{eventIndex:0,events:e,iterator:0,node:i,visitorIndex:0,visitors:[]}}function oi(i){return i[he]=!1,i.nodes&&i.nodes.forEach(e=>oi(e)),i}var ai={},Ue=class io{constructor(e,t,r){this.stringified=!1,this.processed=!1;let s;if(typeof t=="object"&&t!==null&&(t.type==="root"||t.type==="document"))s=oi(t);else if(t instanceof io||t instanceof Ws)s=oi(t.root),t.map&&(typeof r.map=="undefined"&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=t.map);else{let n=Nc;r.syntax&&(n=r.syntax.parse),r.parser&&(n=r.parser),n.parse&&(n=n.parse);try{s=n(t,r)}catch(o){this.processed=!0,this.error=o}s&&!s[Ic]&&Rc.rebuild(s)}this.result=new Ws(e,s,r),this.helpers=J(I({},ai),{postcss:ai,result:this.result}),this.plugins=this.processor.plugins.map(n=>typeof n=="object"&&n.prepare?I(I({},n),n.prepare(this.result)):n)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let r=this.result.lastPlugin;try{t&&t.addToError(e),this.error=e,e.name==="CssSyntaxError"&&!e.plugin?(e.plugin=r.postcssPlugin,e.setMessage()):r.postcssVersion}catch(s){console&&console.error&&console.error(s)}return e}prepareVisitors(){this.listeners={};let e=(t,r,s)=>{this.listeners[r]||(this.listeners[r]=[]),this.listeners[r].push([t,s])};for(let t of this.plugins)if(typeof t=="object")for(let r in t){if(!Dc[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!Tc[r])if(typeof t[r]=="object")for(let s in t[r])s==="*"?e(t,r,t[r][s]):e(t,r+"-"+s.toLowerCase(),t[r][s]);else typeof t[r]=="function"&&e(t,r,t[r])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let t=this.plugins[e],r=this.runOnRoot(t);if(Xe(r))try{await r}catch(s){throw this.handleError(s)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[he];){e[he]=!0;let t=[Vs(e)];for(;t.length>0;){let r=this.visitTick(t);if(Xe(r))try{await r}catch(s){let n=t[t.length-1].node;throw this.handleError(s,n)}}}if(this.listeners.OnceExit)for(let[t,r]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if(e.type==="document"){let s=e.nodes.map(n=>r(n,this.helpers));await Promise.all(s)}else await r(e,this.helpers)}catch(s){throw this.handleError(s)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if(typeof e=="object"&&e.Once){if(this.result.root.type==="document"){let t=this.result.root.nodes.map(r=>e.Once(r,this.helpers));return Xe(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}else if(typeof e=="function")return e(this.result.root,this.result)}catch(t){throw this.handleError(t)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=xc;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let s=new Ec(t,this.result.root,this.result.opts).generate();return this.result.css=s[0],this.result.map=s[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins){let t=this.runOnRoot(e);if(Xe(t))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[he];)e[he]=!0,this.walkSync(e);if(this.listeners.OnceExit)if(e.type==="document")for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,t){return this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[r,s]of e){this.result.lastPlugin=r;let n;try{n=s(t,this.helpers)}catch(o){throw this.handleError(o,t.proxyOf)}if(t.type!=="root"&&t.type!=="document"&&!t.parent)return!0;if(Xe(n))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:r,visitors:s}=t;if(r.type!=="root"&&r.type!=="document"&&!r.parent){e.pop();return}if(s.length>0&&t.visitorIndex<s.length){let[o,l]=s[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===s.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=o;try{return l(r.toProxy(),this.helpers)}catch(a){throw this.handleError(a,r)}}if(t.iterator!==0){let o=t.iterator,l;for(;l=r.nodes[r.indexes[o]];)if(r.indexes[o]+=1,!l[he]){l[he]=!0,e.push(Vs(l));return}t.iterator=0,delete r.indexes[o]}let n=t.events;for(;t.eventIndex<n.length;){let o=n[t.eventIndex];if(t.eventIndex+=1,o===Be){r.nodes&&r.nodes.length&&(r[he]=!0,t.iterator=r.getIterator());return}else if(this.listeners[o]){t.visitors=this.listeners[o];return}}e.pop()}walkSync(e){e[he]=!0;let t=ro(e);for(let r of t)if(r===Be)e.nodes&&e.each(s=>{s[he]||this.walkSync(s)});else{let s=this.listeners[r];if(s&&this.visitSync(s,e.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}};Ue.registerPostcss=i=>{ai=i};var so=Ue;Ue.default=Ue;Oc.registerLazyResult(Ue);Mc.registerLazyResult(Ue);var kc=Pn,_c=dr;var Lc=Yi,$c=Gi,li=class{constructor(e,t,r){t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=r,this._map=void 0;let s,n=_c;this.result=new $c(this._processor,s,this._opts),this.result.css=t;let o=this;Object.defineProperty(this.result,"root",{get(){return o.root}});let l=new kc(n,s,this._opts,t);if(l.isMap()){let[a,c]=l.generate();a&&(this.result.css=a),c&&(this.result.map=c)}else l.clearAnnotation(),this.result.css=l.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return this.async().then(e,t)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,t=Lc;try{e=t(this._css,this._opts)}catch(r){this.error=r}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}},Pc=li;li.default=li;var Fc=Pc,Bc=so,Uc=Vi,zc=mt,at=class{constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let r of e)if(r.postcss===!0?r=r():r.postcss&&(r=r.postcss),typeof r=="object"&&Array.isArray(r.plugins))t=t.concat(r.plugins);else if(typeof r=="object"&&r.postcssPlugin)t.push(r);else if(typeof r=="function")t.push(r);else if(!(typeof r=="object"&&(r.parse||r.stringify)))throw new Error(r+" is not a PostCSS plugin");return t}process(e,t={}){return!this.plugins.length&&!t.parser&&!t.stringifier&&!t.syntax?new Fc(this,e,t):new Bc(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}},Wc=at;at.default=at;zc.registerProcessor(at);Uc.registerProcessor(at);var Vc=mr,Gc=Tn,jc=yr,Hc=ji,Yc=gr,Kc=mt,Xc=Hi;function lt(i,e){if(Array.isArray(i))return i.map(o=>lt(o));let s=i,{inputs:t}=s,r=De(s,["inputs"]);if(t){e=[];for(let o of t){let l=J(I({},o),{__proto__:Yc.prototype});l.map&&(l.map=J(I({},l.map),{__proto__:Gc.prototype})),e.push(l)}}if(r.nodes&&(r.nodes=i.nodes.map(o=>lt(o,e))),r.source){let n=r.source,{inputId:o}=n,l=De(n,["inputId"]);r.source=l,o!=null&&(r.source.input=e[o])}if(r.type==="root")return new Kc(r);if(r.type==="decl")return new Vc(r);if(r.type==="rule")return new Xc(r);if(r.type==="comment")return new jc(r);if(r.type==="atrule")return new Hc(r);throw new Error("Unknown node type: "+i.type)}var Zc=lt;lt.default=lt;var Jc=Ui,no=mr,qc=so,Qc=Ne,Ki=Wc,eu=dr,tu=Zc,oo=Vi,ru=Xn,ao=yr,lo=ji,iu=Gi,su=gr,nu=Yi,ou=eo,co=Hi,uo=mt,au=pr;function k(...i){return i.length===1&&Array.isArray(i[0])&&(i=i[0]),new Ki(i)}k.plugin=function(e,t){let r=!1;function s(...o){console&&console.warn&&!r&&(r=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide:
25
+ https://evilmartians.com/chronicles/postcss-8-plugin-migration`),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(e+`: \u91CC\u9762 postcss.plugin \u88AB\u5F03\u7528. \u8FC1\u79FB\u6307\u5357:
26
+ https://www.w3ctech.com/topic/2226`));let l=t(...o);return l.postcssPlugin=e,l.postcssVersion=new Ki().version,l}let n;return Object.defineProperty(s,"postcss",{get(){return n||(n=s()),n}}),s.process=function(o,l,a){return k([s(a)]).process(o,l)},s};k.stringify=eu;k.parse=nu;k.fromJSON=tu;k.list=ou;k.comment=i=>new ao(i);k.atRule=i=>new lo(i);k.decl=i=>new no(i);k.rule=i=>new co(i);k.root=i=>new uo(i);k.document=i=>new oo(i);k.CssSyntaxError=Jc;k.Declaration=no;k.Container=Qc;k.Processor=Ki;k.Document=oo;k.Comment=ao;k.Warning=ru;k.AtRule=lo;k.Result=iu;k.Input=su;k.Rule=co;k.Root=uo;k.Node=au;qc.registerPostcss(k);var lu=k;k.default=k;var z=Sl(lu);z.stringify;z.fromJSON;z.plugin;z.parse;z.list;z.document;z.comment;z.atRule;z.rule;z.decl;z.root;z.CssSyntaxError;z.Declaration;z.Container;z.Processor;z.Document;z.Comment;z.Warning;z.AtRule;z.Result;z.Input;z.Rule;z.Root;z.Node;var cu=Object.defineProperty,uu=(i,e,t)=>e in i?cu(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,oe=(i,e,t)=>uu(i,typeof e!="symbol"?e+"":e,t);function hu(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}function fu(i){if(i.__esModule)return i;var e=i.default;if(typeof e=="function"){var t=function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(i).forEach(function(r){var s=Object.getOwnPropertyDescriptor(i,r);Object.defineProperty(t,r,s.get?s:{enumerable:!0,get:function(){return i[r]}})}),t}var Xi={exports:{}},U=String,ho=function(){return{isColorSupported:!1,reset:U,bold:U,dim:U,italic:U,underline:U,inverse:U,hidden:U,strikethrough:U,black:U,red:U,green:U,yellow:U,blue:U,magenta:U,cyan:U,white:U,gray:U,bgBlack:U,bgRed:U,bgGreen:U,bgYellow:U,bgBlue:U,bgMagenta:U,bgCyan:U,bgWhite:U}};Xi.exports=ho();Xi.exports.createColors=ho;var du=Xi.exports,pu={},mu=Object.freeze(Object.defineProperty({__proto__:null,default:pu},Symbol.toStringTag,{value:"Module"})),ue=fu(mu),Gs=du,js=ue,ci=class fo extends Error{constructor(e,t,r,s,n,o){super(e),this.name="CssSyntaxError",this.reason=e,n&&(this.file=n),s&&(this.source=s),o&&(this.plugin=o),typeof t!="undefined"&&typeof r!="undefined"&&(typeof t=="number"?(this.line=t,this.column=r):(this.line=t.line,this.column=t.column,this.endLine=r.line,this.endColumn=r.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,fo)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line!="undefined"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let t=this.source;e==null&&(e=Gs.isColorSupported),js&&e&&(t=js(t));let r=t.split(/\r?\n/),s=Math.max(this.line-3,0),n=Math.min(this.line+2,r.length),o=String(n).length,l,a;if(e){let{bold:c,gray:u,red:f}=Gs.createColors(!0);l=m=>c(f(m)),a=m=>u(m)}else l=a=c=>c;return r.slice(s,n).map((c,u)=>{let f=s+1+u,m=" "+(" "+f).slice(-o)+" | ";if(f===this.line){let g=a(m.replace(/\d/g," "))+c.slice(0,this.column-1).replace(/[^\t]/g," ");return l(">")+a(m)+c+`
27
+ `+g+l("^")}return" "+a(m)+c}).join(`
28
+ `)}toString(){let e=this.showSourceCode();return e&&(e=`
29
+
30
+ `+e+`
31
+ `),this.name+": "+this.message+e}},Zi=ci;ci.default=ci;var gt={};gt.isClean=Symbol("isClean");gt.my=Symbol("my");var Hs={after:`
32
+ `,beforeClose:`
33
+ `,beforeComment:`
34
+ `,beforeDecl:`
35
+ `,beforeOpen:" ",beforeRule:`
36
+ `,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function gu(i){return i[0].toUpperCase()+i.slice(1)}var ui=class{constructor(e){this.builder=e}atrule(e,t){let r="@"+e.name,s=e.params?this.rawValue(e,"params"):"";if(typeof e.raws.afterName!="undefined"?r+=e.raws.afterName:s&&(r+=" "),e.nodes)this.block(e,r+s);else{let n=(e.raws.between||"")+(t?";":"");this.builder(r+s+n,e)}}beforeAfter(e,t){let r;e.type==="decl"?r=this.raw(e,null,"beforeDecl"):e.type==="comment"?r=this.raw(e,null,"beforeComment"):t==="before"?r=this.raw(e,null,"beforeRule"):r=this.raw(e,null,"beforeClose");let s=e.parent,n=0;for(;s&&s.type!=="root";)n+=1,s=s.parent;if(r.includes(`
37
+ `)){let o=this.raw(e,null,"indent");if(o.length)for(let l=0;l<n;l++)r+=o}return r}block(e,t){let r=this.raw(e,"between","beforeOpen");this.builder(t+r+"{",e,"start");let s;e.nodes&&e.nodes.length?(this.body(e),s=this.raw(e,"after")):s=this.raw(e,"after","emptyBody"),s&&this.builder(s),this.builder("}",e,"end")}body(e){let t=e.nodes.length-1;for(;t>0&&e.nodes[t].type==="comment";)t-=1;let r=this.raw(e,"semicolon");for(let s=0;s<e.nodes.length;s++){let n=e.nodes[s],o=this.raw(n,"before");o&&this.builder(o),this.stringify(n,t!==s||r)}}comment(e){let t=this.raw(e,"left","commentLeft"),r=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+r+"*/",e)}decl(e,t){let r=this.raw(e,"between","colon"),s=e.prop+r+this.rawValue(e,"value");e.important&&(s+=e.raws.important||" !important"),t&&(s+=";"),this.builder(s,e)}document(e){this.body(e)}raw(e,t,r){let s;if(r||(r=t),t&&(s=e.raws[t],typeof s!="undefined"))return s;let n=e.parent;if(r==="before"&&(!n||n.type==="root"&&n.first===e||n&&n.type==="document"))return"";if(!n)return Hs[r];let o=e.root();if(o.rawCache||(o.rawCache={}),typeof o.rawCache[r]!="undefined")return o.rawCache[r];if(r==="before"||r==="after")return this.beforeAfter(e,r);{let l="raw"+gu(r);this[l]?s=this[l](o,e):o.walk(a=>{if(s=a.raws[t],typeof s!="undefined")return!1})}return typeof s=="undefined"&&(s=Hs[r]),o.rawCache[r]=s,s}rawBeforeClose(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length>0&&typeof r.raws.after!="undefined")return t=r.raws.after,t.includes(`
38
+ `)&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let r;return e.walkComments(s=>{if(typeof s.raws.before!="undefined")return r=s.raws.before,r.includes(`
39
+ `)&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r=="undefined"?r=this.raw(t,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeDecl(e,t){let r;return e.walkDecls(s=>{if(typeof s.raws.before!="undefined")return r=s.raws.before,r.includes(`
40
+ `)&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r=="undefined"?r=this.raw(t,null,"beforeRule"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeOpen(e){let t;return e.walk(r=>{if(r.type!=="decl"&&(t=r.raws.between,typeof t!="undefined"))return!1}),t}rawBeforeRule(e){let t;return e.walk(r=>{if(r.nodes&&(r.parent!==e||e.first!==r)&&typeof r.raws.before!="undefined")return t=r.raws.before,t.includes(`
41
+ `)&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls(r=>{if(typeof r.raws.between!="undefined")return t=r.raws.between.replace(/[^\s:]/g,""),!1}),t}rawEmptyBody(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length===0&&(t=r.raws.after,typeof t!="undefined"))return!1}),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk(r=>{let s=r.parent;if(s&&s!==e&&s.parent&&s.parent===e&&typeof r.raws.before!="undefined"){let n=r.raws.before.split(`
42
+ `);return t=n[n.length-1],t=t.replace(/\S/g,""),!1}}),t}rawSemicolon(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length&&r.last.type==="decl"&&(t=r.raws.semicolon,typeof t!="undefined"))return!1}),t}rawValue(e,t){let r=e[t],s=e.raws[t];return s&&s.value===r?s.raw:r}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}},po=ui;ui.default=ui;var yu=po;function hi(i,e){new yu(e).stringify(i)}var br=hi;hi.default=hi;var{isClean:_t,my:bu}=gt,wu=Zi,Su=po,vu=br;function fi(i,e){let t=new i.constructor;for(let r in i){if(!Object.prototype.hasOwnProperty.call(i,r)||r==="proxyCache")continue;let s=i[r],n=typeof s;r==="parent"&&n==="object"?e&&(t[r]=e):r==="source"?t[r]=s:Array.isArray(s)?t[r]=s.map(o=>fi(o,t)):(n==="object"&&s!==null&&(s=fi(s)),t[r]=s)}return t}var di=class{constructor(e={}){this.raws={},this[_t]=!1,this[bu]=!0;for(let t in e)if(t==="nodes"){this.nodes=[];for(let r of e[t])typeof r.clone=="function"?this.append(r.clone()):this.append(r)}else this[t]=e[t]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let t in e)this[t]=e[t];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let t=fi(this);for(let r in e)t[r]=e[r];return t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}error(e,t={}){if(this.source){let{end:r,start:s}=this.rangeBy(t);return this.source.input.error(e,{column:s.column,line:s.line},{column:r.column,line:r.line},t)}return new wu(e)}getProxyProcessor(){return{get(e,t){return t==="proxyOf"?e:t==="root"?()=>e.root().toProxy():e[t]},set(e,t,r){return e[t]===r||(e[t]=r,(t==="prop"||t==="value"||t==="name"||t==="params"||t==="important"||t==="text")&&e.markDirty()),!0}}}markDirty(){if(this[_t]){this[_t]=!1;let e=this;for(;e=e.parent;)e[_t]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let r=this.source.start;if(e.index)r=this.positionInside(e.index,t);else if(e.word){t=this.toString();let s=t.indexOf(e.word);s!==-1&&(r=this.positionInside(s,t))}return r}positionInside(e,t){let r=t||this.toString(),s=this.source.start.column,n=this.source.start.line;for(let o=0;o<e;o++)r[o]===`
43
+ `?(s=1,n+=1):s+=1;return{column:s,line:n}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e){let t={column:this.source.start.column,line:this.source.start.line},r=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:t.column+1,line:t.line};if(e.word){let s=this.toString(),n=s.indexOf(e.word);n!==-1&&(t=this.positionInside(n,s),r=this.positionInside(n+e.word.length,s))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?r={column:e.end.column,line:e.end.line}:typeof e.endIndex=="number"?r=this.positionInside(e.endIndex):e.index&&(r=this.positionInside(e.index+1));return(r.line<t.line||r.line===t.line&&r.column<=t.column)&&(r={column:t.column+1,line:t.line}),{end:r,start:t}}raw(e,t){return new Su().raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let t=this,r=!1;for(let s of e)s===this?r=!0:r?(this.parent.insertAfter(t,s),t=s):this.parent.insertBefore(t,s);r||this.remove()}return this}root(){let e=this;for(;e.parent&&e.parent.type!=="document";)e=e.parent;return e}toJSON(e,t){let r={},s=t==null;t=t||new Map;let n=0;for(let o in this){if(!Object.prototype.hasOwnProperty.call(this,o)||o==="parent"||o==="proxyCache")continue;let l=this[o];if(Array.isArray(l))r[o]=l.map(a=>typeof a=="object"&&a.toJSON?a.toJSON(null,t):a);else if(typeof l=="object"&&l.toJSON)r[o]=l.toJSON(null,t);else if(o==="source"){let a=t.get(l.input);a==null&&(a=n,t.set(l.input,n),n++),r[o]={end:l.end,inputId:a,start:l.start}}else r[o]=l}return s&&(r.inputs=[...t.keys()].map(o=>o.toJSON())),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=vu){e.stringify&&(e=e.stringify);let t="";return e(this,r=>{t+=r}),t}warn(e,t,r){let s={node:this};for(let n in r)s[n]=r[n];return e.warn(t,s)}get proxyOf(){return this}},wr=di;di.default=di;var Cu=wr,pi=class extends Cu{constructor(e){e&&typeof e.value!="undefined"&&typeof e.value!="string"&&(e=J(I({},e),{value:String(e.value)})),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}},Sr=pi;pi.default=pi;var Iu="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",Eu=(i,e=21)=>(t=e)=>{let r="",s=t;for(;s--;)r+=i[Math.random()*i.length|0];return r},xu=(i=21)=>{let e="",t=i;for(;t--;)e+=Iu[Math.random()*64|0];return e},Ru={nanoid:xu,customAlphabet:Eu},{SourceMapConsumer:Ys,SourceMapGenerator:Ks}=ue,{existsSync:Mu,readFileSync:Nu}=ue,{dirname:Fr,join:Ou}=ue;function Au(i){return Buffer?Buffer.from(i,"base64").toString():window.atob(i)}var mi=class{constructor(e,t){if(t.map===!1)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let r=t.map?t.map.prev:void 0,s=this.loadMap(t.from,r);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=Fr(this.mapFile)),s&&(this.text=s)}consumer(){return this.consumerCache||(this.consumerCache=new Ys(this.text)),this.consumerCache}decodeInline(e){let t=/^data:application\/json;charset=utf-?8;base64,/,r=/^data:application\/json;base64,/,s=/^data:application\/json;charset=utf-?8,/,n=/^data:application\/json,/;if(s.test(e)||n.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(t.test(e)||r.test(e))return Au(e.substr(RegExp.lastMatch.length));let o=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+o)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return typeof e!="object"?!1:typeof e.mappings=="string"||typeof e._mappings=="string"||Array.isArray(e.sections)}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/gm);if(!t)return;let r=e.lastIndexOf(t.pop()),s=e.indexOf("*/",r);r>-1&&s>-1&&(this.annotation=this.getAnnotationURL(e.substring(r,s)))}loadFile(e){if(this.root=Fr(e),Mu(e))return this.mapFile=e,Nu(e,"utf-8").toString().trim()}loadMap(e,t){if(t===!1)return!1;if(t){if(typeof t=="string")return t;if(typeof t=="function"){let r=t(e);if(r){let s=this.loadFile(r);if(!s)throw new Error("Unable to load previous source map: "+r.toString());return s}}else{if(t instanceof Ys)return Ks.fromSourceMap(t).toString();if(t instanceof Ks)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let r=this.annotation;return e&&(r=Ou(Fr(e),r)),this.loadFile(r)}}}startWith(e,t){return e?e.substr(0,t.length)===t:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}},mo=mi;mi.default=mi;var{SourceMapConsumer:Du,SourceMapGenerator:Tu}=ue,{fileURLToPath:Xs,pathToFileURL:Lt}=ue,{isAbsolute:gi,resolve:yi}=ue,{nanoid:ku}=Ru,Br=ue,Zs=Zi,_u=mo,Ur=Symbol("fromOffsetCache"),Lu=!!(Du&&Tu),Js=!!(yi&&gi),nr=class{constructor(e,t={}){if(e===null||typeof e=="undefined"||typeof e=="object"&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),this.css[0]==="\uFEFF"||this.css[0]==="\uFFFE"?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(!Js||/^\w+:\/\//.test(t.from)||gi(t.from)?this.file=t.from:this.file=yi(t.from)),Js&&Lu){let r=new _u(this.css,t);if(r.text){this.map=r;let s=r.consumer().file;!this.file&&s&&(this.file=this.mapResolve(s))}}this.file||(this.id="<input css "+ku(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,r,s={}){let n,o,l;if(t&&typeof t=="object"){let c=t,u=r;if(typeof c.offset=="number"){let f=this.fromOffset(c.offset);t=f.line,r=f.col}else t=c.line,r=c.column;if(typeof u.offset=="number"){let f=this.fromOffset(u.offset);o=f.line,l=f.col}else o=u.line,l=u.column}else if(!r){let c=this.fromOffset(t);t=c.line,r=c.col}let a=this.origin(t,r,o,l);return a?n=new Zs(e,a.endLine===void 0?a.line:{column:a.column,line:a.line},a.endLine===void 0?a.column:{column:a.endColumn,line:a.endLine},a.source,a.file,s.plugin):n=new Zs(e,o===void 0?t:{column:r,line:t},o===void 0?r:{column:l,line:o},this.css,this.file,s.plugin),n.input={column:r,endColumn:l,endLine:o,line:t,source:this.css},this.file&&(Lt&&(n.input.url=Lt(this.file).toString()),n.input.file=this.file),n}fromOffset(e){let t,r;if(this[Ur])r=this[Ur];else{let n=this.css.split(`
44
+ `);r=new Array(n.length);let o=0;for(let l=0,a=n.length;l<a;l++)r[l]=o,o+=n[l].length+1;this[Ur]=r}t=r[r.length-1];let s=0;if(e>=t)s=r.length-1;else{let n=r.length-2,o;for(;s<n;)if(o=s+(n-s>>1),e<r[o])n=o-1;else if(e>=r[o+1])s=o+1;else{s=o;break}}return{col:e-r[s]+1,line:s+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:yi(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,r,s){if(!this.map)return!1;let n=this.map.consumer(),o=n.originalPositionFor({column:t,line:e});if(!o.source)return!1;let l;typeof r=="number"&&(l=n.originalPositionFor({column:s,line:r}));let a;gi(o.source)?a=Lt(o.source):a=new URL(o.source,this.map.consumer().sourceRoot||Lt(this.map.mapFile));let c={column:o.column,endColumn:l&&l.column,endLine:l&&l.line,line:o.line,url:a.toString()};if(a.protocol==="file:")if(Xs)c.file=Xs(a);else throw new Error("file: protocol is not available in this PostCSS build");let u=n.sourceContentFor(o.source);return u&&(c.source=u),c}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])this[t]!=null&&(e[t]=this[t]);return this.map&&(e.map=I({},this.map),e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}},vr=nr;nr.default=nr;Br&&Br.registerInput&&Br.registerInput(nr);var{SourceMapConsumer:go,SourceMapGenerator:Kt}=ue,{dirname:Xt,relative:yo,resolve:bo,sep:wo}=ue,{pathToFileURL:qs}=ue,$u=vr,Pu=!!(go&&Kt),Fu=!!(Xt&&bo&&yo&&wo),Bu=class{constructor(e,t,r,s){this.stringify=e,this.mapOpts=r.map||{},this.root=t,this.opts=r,this.css=s,this.originalCSS=s,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;this.isInline()?e="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?e=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?e=this.mapOpts.annotation(this.opts.to,this.root):e=this.outputFile()+".map";let t=`
45
+ `;this.css.includes(`\r
46
+ `)&&(t=`\r
47
+ `),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t=this.toUrl(this.path(e.file)),r=e.root||Xt(e.file),s;this.mapOpts.sourcesContent===!1?(s=new go(e.text),s.sourcesContent&&(s.sourcesContent=null)):s=e.consumer(),this.map.applySourceMap(s,t,this.toUrl(this.path(r)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],e.type==="comment"&&e.text.indexOf("# sourceMappingURL=")===0&&this.root.removeChild(t)}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),Fu&&Pu&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,t=>{e+=t}),[e]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=Kt.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new Kt({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css="",this.map=new Kt({file:this.outputFile(),ignoreInvalidMapping:!0});let e=1,t=1,r="<no source>",s={generated:{column:0,line:0},original:{column:0,line:0},source:""},n,o;this.stringify(this.root,(l,a,c)=>{if(this.css+=l,a&&c!=="end"&&(s.generated.line=e,s.generated.column=t-1,a.source&&a.source.start?(s.source=this.sourcePath(a),s.original.line=a.source.start.line,s.original.column=a.source.start.column-1,this.map.addMapping(s)):(s.source=r,s.original.line=1,s.original.column=0,this.map.addMapping(s))),n=l.match(/\n/g),n?(e+=n.length,o=l.lastIndexOf(`
48
+ `),t=l.length-o):t+=l.length,a&&c!=="start"){let u=a.parent||{raws:{}};(!(a.type==="decl"||a.type==="atrule"&&!a.nodes)||a!==u.last||u.raws.semicolon)&&(a.source&&a.source.end?(s.source=this.sourcePath(a),s.original.line=a.source.end.line,s.original.column=a.source.end.column-1,s.generated.line=e,s.generated.column=t-2,this.map.addMapping(s)):(s.source=r,s.original.line=1,s.original.column=0,s.generated.line=e,s.generated.column=t-1,this.map.addMapping(s)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation!="undefined"?this.mapOpts.annotation:this.previous().length?this.previous().some(e=>e.annotation):!0}isInline(){if(typeof this.mapOpts.inline!="undefined")return this.mapOpts.inline;let e=this.mapOpts.annotation;return typeof e!="undefined"&&e!==!0?!1:this.previous().length?this.previous().some(t=>t.inline):!0}isMap(){return typeof this.opts.map!="undefined"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent!="undefined"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(e=>e.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute||e.charCodeAt(0)===60||/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let r=this.opts.to?Xt(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(r=Xt(bo(r,this.mapOpts.annotation)));let s=yo(r,e);return this.memoizedPaths.set(e,s),s}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}});else{let e=new $u(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(t=>{if(t.source){let r=t.source.input.from;if(r&&!e[r]){e[r]=!0;let s=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(s,t.source.input.css)}}});else if(this.css){let t=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(t,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(qs){let r=qs(e).toString();return this.memoizedFileURLs.set(e,r),r}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;wo==="\\"&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}},So=Bu,Uu=wr,bi=class extends Uu{constructor(e){super(e),this.type="comment"}},Cr=bi;bi.default=bi;var{isClean:vo,my:Co}=gt,Io=Sr,Eo=Cr,zu=wr,xo,Ji,qi,Ro;function Mo(i){return i.map(e=>(e.nodes&&(e.nodes=Mo(e.nodes)),delete e.source,e))}function No(i){if(i[vo]=!1,i.proxyOf.nodes)for(let e of i.proxyOf.nodes)No(e)}var ye=class Oo extends zu{append(...e){for(let t of e){let r=this.normalize(t,this.last);for(let s of r)this.proxyOf.nodes.push(s)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t=this.getIterator(),r,s;for(;this.indexes[t]<this.proxyOf.nodes.length&&(r=this.indexes[t],s=e(this.proxyOf.nodes[r],r),s!==!1);)this.indexes[t]+=1;return delete this.indexes[t],s}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get(e,t){return t==="proxyOf"?e:e[t]?t==="each"||typeof t=="string"&&t.startsWith("walk")?(...r)=>e[t](...r.map(s=>typeof s=="function"?(n,o)=>s(n.toProxy(),o):s)):t==="every"||t==="some"?r=>e[t]((s,...n)=>r(s.toProxy(),...n)):t==="root"?()=>e.root().toProxy():t==="nodes"?e.nodes.map(r=>r.toProxy()):t==="first"||t==="last"?e[t].toProxy():e[t]:e[t]},set(e,t,r){return e[t]===r||(e[t]=r,(t==="name"||t==="params"||t==="selector")&&e.markDirty()),!0}}}index(e){return typeof e=="number"?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let r=this.index(e),s=this.normalize(t,this.proxyOf.nodes[r]).reverse();r=this.index(e);for(let o of s)this.proxyOf.nodes.splice(r+1,0,o);let n;for(let o in this.indexes)n=this.indexes[o],r<n&&(this.indexes[o]=n+s.length);return this.markDirty(),this}insertBefore(e,t){let r=this.index(e),s=r===0?"prepend":!1,n=this.normalize(t,this.proxyOf.nodes[r],s).reverse();r=this.index(e);for(let l of n)this.proxyOf.nodes.splice(r,0,l);let o;for(let l in this.indexes)o=this.indexes[l],r<=o&&(this.indexes[l]=o+n.length);return this.markDirty(),this}normalize(e,t){if(typeof e=="string")e=Mo(xo(e).nodes);else if(typeof e=="undefined")e=[];else if(Array.isArray(e)){e=e.slice(0);for(let s of e)s.parent&&s.parent.removeChild(s,"ignore")}else if(e.type==="root"&&this.type!=="document"){e=e.nodes.slice(0);for(let s of e)s.parent&&s.parent.removeChild(s,"ignore")}else if(e.type)e=[e];else if(e.prop){if(typeof e.value=="undefined")throw new Error("Value field is missed in node creation");typeof e.value!="string"&&(e.value=String(e.value)),e=[new Io(e)]}else if(e.selector)e=[new Ji(e)];else if(e.name)e=[new qi(e)];else if(e.text)e=[new Eo(e)];else throw new Error("Unknown node type in node creation");return e.map(s=>(s[Co]||Oo.rebuild(s),s=s.proxyOf,s.parent&&s.parent.removeChild(s),s[vo]&&No(s),typeof s.raws.before=="undefined"&&t&&typeof t.raws.before!="undefined"&&(s.raws.before=t.raws.before.replace(/\S/g,"")),s.parent=this.proxyOf,s))}prepend(...e){e=e.reverse();for(let t of e){let r=this.normalize(t,this.first,"prepend").reverse();for(let s of r)this.proxyOf.nodes.unshift(s);for(let s in this.indexes)this.indexes[s]=this.indexes[s]+r.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);let t;for(let r in this.indexes)t=this.indexes[r],t>=e&&(this.indexes[r]=t-1);return this.markDirty(),this}replaceValues(e,t,r){return r||(r=t,t={}),this.walkDecls(s=>{t.props&&!t.props.includes(s.prop)||t.fast&&!s.value.includes(t.fast)||(s.value=s.value.replace(e,r))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,r)=>{let s;try{s=e(t,r)}catch(n){throw t.addToError(n)}return s!==!1&&t.walk&&(s=t.walk(e)),s})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((r,s)=>{if(r.type==="atrule"&&e.test(r.name))return t(r,s)}):this.walk((r,s)=>{if(r.type==="atrule"&&r.name===e)return t(r,s)}):(t=e,this.walk((r,s)=>{if(r.type==="atrule")return t(r,s)}))}walkComments(e){return this.walk((t,r)=>{if(t.type==="comment")return e(t,r)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((r,s)=>{if(r.type==="decl"&&e.test(r.prop))return t(r,s)}):this.walk((r,s)=>{if(r.type==="decl"&&r.prop===e)return t(r,s)}):(t=e,this.walk((r,s)=>{if(r.type==="decl")return t(r,s)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((r,s)=>{if(r.type==="rule"&&e.test(r.selector))return t(r,s)}):this.walk((r,s)=>{if(r.type==="rule"&&r.selector===e)return t(r,s)}):(t=e,this.walk((r,s)=>{if(r.type==="rule")return t(r,s)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}};ye.registerParse=i=>{xo=i};ye.registerRule=i=>{Ji=i};ye.registerAtRule=i=>{qi=i};ye.registerRoot=i=>{Ro=i};var Oe=ye;ye.default=ye;ye.rebuild=i=>{i.type==="atrule"?Object.setPrototypeOf(i,qi.prototype):i.type==="rule"?Object.setPrototypeOf(i,Ji.prototype):i.type==="decl"?Object.setPrototypeOf(i,Io.prototype):i.type==="comment"?Object.setPrototypeOf(i,Eo.prototype):i.type==="root"&&Object.setPrototypeOf(i,Ro.prototype),i[Co]=!0,i.nodes&&i.nodes.forEach(e=>{ye.rebuild(e)})};var Wu=Oe,Ao,Do,ct=class extends Wu{constructor(e){super(I({type:"document"},e)),this.nodes||(this.nodes=[])}toResult(e={}){return new Ao(new Do,this,e).stringify()}};ct.registerLazyResult=i=>{Ao=i};ct.registerProcessor=i=>{Do=i};var Qi=ct;ct.default=ct;var wi=class{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let r=t.node.rangeBy(t);this.line=r.start.line,this.column=r.start.column,this.endLine=r.end.line,this.endColumn=r.end.column}for(let r in t)this[r]=t[r]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}},To=wi;wi.default=wi;var Vu=To,Si=class{constructor(e,t,r){this.processor=e,this.messages=[],this.root=t,this.opts=r,this.css=void 0,this.map=void 0}toString(){return this.css}warn(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let r=new Vu(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>e.type==="warning")}get content(){return this.css}},es=Si;Si.default=Si;var zr=39,Qs=34,$t=92,en=47,Pt=10,Ze=32,Ft=12,Bt=9,Ut=13,Gu=91,ju=93,Hu=40,Yu=41,Ku=123,Xu=125,Zu=59,Ju=42,qu=58,Qu=64,zt=/[\t\n\f\r "#'()/;[\\\]{}]/g,Wt=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,eh=/.[\r\n"'(/\\]/,tn=/[\da-f]/i,th=function(e,t={}){let r=e.css.valueOf(),s=t.ignoreErrors,n,o,l,a,c,u,f,m,g,p,d=r.length,h=0,w=[],v=[];function y(){return h}function S(D){throw e.error("Unclosed "+D,h)}function E(){return v.length===0&&h>=d}function A(D){if(v.length)return v.pop();if(h>=d)return;let P=D?D.ignoreUnclosed:!1;switch(n=r.charCodeAt(h),n){case Pt:case Ze:case Bt:case Ut:case Ft:{o=h;do o+=1,n=r.charCodeAt(o);while(n===Ze||n===Pt||n===Bt||n===Ut||n===Ft);p=["space",r.slice(h,o)],h=o-1;break}case Gu:case ju:case Ku:case Xu:case qu:case Zu:case Yu:{let H=String.fromCharCode(n);p=[H,H,h];break}case Hu:{if(m=w.length?w.pop()[1]:"",g=r.charCodeAt(h+1),m==="url"&&g!==zr&&g!==Qs&&g!==Ze&&g!==Pt&&g!==Bt&&g!==Ft&&g!==Ut){o=h;do{if(u=!1,o=r.indexOf(")",o+1),o===-1)if(s||P){o=h;break}else S("bracket");for(f=o;r.charCodeAt(f-1)===$t;)f-=1,u=!u}while(u);p=["brackets",r.slice(h,o+1),h,o],h=o}else o=r.indexOf(")",h+1),a=r.slice(h,o+1),o===-1||eh.test(a)?p=["(","(",h]:(p=["brackets",a,h,o],h=o);break}case zr:case Qs:{l=n===zr?"'":'"',o=h;do{if(u=!1,o=r.indexOf(l,o+1),o===-1)if(s||P){o=h+1;break}else S("string");for(f=o;r.charCodeAt(f-1)===$t;)f-=1,u=!u}while(u);p=["string",r.slice(h,o+1),h,o],h=o;break}case Qu:{zt.lastIndex=h+1,zt.test(r),zt.lastIndex===0?o=r.length-1:o=zt.lastIndex-2,p=["at-word",r.slice(h,o+1),h,o],h=o;break}case $t:{for(o=h,c=!0;r.charCodeAt(o+1)===$t;)o+=1,c=!c;if(n=r.charCodeAt(o+1),c&&n!==en&&n!==Ze&&n!==Pt&&n!==Bt&&n!==Ut&&n!==Ft&&(o+=1,tn.test(r.charAt(o)))){for(;tn.test(r.charAt(o+1));)o+=1;r.charCodeAt(o+1)===Ze&&(o+=1)}p=["word",r.slice(h,o+1),h,o],h=o;break}default:{n===en&&r.charCodeAt(h+1)===Ju?(o=r.indexOf("*/",h+2)+1,o===0&&(s||P?o=r.length:S("comment")),p=["comment",r.slice(h,o+1),h,o],h=o):(Wt.lastIndex=h+1,Wt.test(r),Wt.lastIndex===0?o=r.length-1:o=Wt.lastIndex-2,p=["word",r.slice(h,o+1),h,o],w.push(p),h=o);break}}return h++,p}function $(D){v.push(D)}return{back:$,endOfFile:E,nextToken:A,position:y}},ko=Oe,or=class extends ko{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}},ts=or;or.default=or;ko.registerAtRule(or);var _o=Oe,Lo,$o,ze=class extends _o{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,r){let s=super.normalize(e);if(t){if(r==="prepend")this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let n of s)n.raws.before=t.raws.before}return s}removeChild(e,t){let r=this.index(e);return!t&&r===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(e)}toResult(e={}){return new Lo(new $o,this,e).stringify()}};ze.registerLazyResult=i=>{Lo=i};ze.registerProcessor=i=>{$o=i};var yt=ze;ze.default=ze;_o.registerRoot(ze);var ut={comma(i){return ut.split(i,[","],!0)},space(i){let e=[" ",`
49
+ `," "];return ut.split(i,e)},split(i,e,t){let r=[],s="",n=!1,o=0,l=!1,a="",c=!1;for(let u of i)c?c=!1:u==="\\"?c=!0:l?u===a&&(l=!1):u==='"'||u==="'"?(l=!0,a=u):u==="("?o+=1:u===")"?o>0&&(o-=1):o===0&&e.includes(u)&&(n=!0),n?(s!==""&&r.push(s.trim()),s="",n=!1):s+=u;return(t||s!=="")&&r.push(s.trim()),r}},Po=ut;ut.default=ut;var Fo=Oe,rh=Po,ar=class extends Fo{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return rh.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,r=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(r)}},rs=ar;ar.default=ar;Fo.registerRule(ar);var ih=Sr,sh=th,nh=Cr,oh=ts,ah=yt,rn=rs,sn={empty:!0,space:!0};function lh(i){for(let e=i.length-1;e>=0;e--){let t=i[e],r=t[3]||t[2];if(r)return r}}var ch=class{constructor(e){this.input=e,this.root=new ah,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t=new oh;t.name=e[1].slice(1),t.name===""&&this.unnamedAtrule(t,e),this.init(t,e[2]);let r,s,n,o=!1,l=!1,a=[],c=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),r=e[0],r==="("||r==="["?c.push(r==="("?")":"]"):r==="{"&&c.length>0?c.push("}"):r===c[c.length-1]&&c.pop(),c.length===0)if(r===";"){t.source.end=this.getPosition(e[2]),t.source.end.offset++,this.semicolon=!0;break}else if(r==="{"){l=!0;break}else if(r==="}"){if(a.length>0){for(n=a.length-1,s=a[n];s&&s[0]==="space";)s=a[--n];s&&(t.source.end=this.getPosition(s[3]||s[2]),t.source.end.offset++)}this.end(e);break}else a.push(e);else a.push(e);if(this.tokenizer.endOfFile()){o=!0;break}}t.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(t.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(t,"params",a),o&&(e=a[a.length-1],t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++,this.spaces=t.raws.between,t.raws.between="")):(t.raws.afterName="",t.params=""),l&&(t.nodes=[],this.current=t)}checkMissedSemicolon(e){let t=this.colon(e);if(t===!1)return;let r=0,s;for(let n=t-1;n>=0&&(s=e[n],!(s[0]!=="space"&&(r+=1,r===2)));n--);throw this.input.error("Missed semicolon",s[0]==="word"?s[3]+1:s[2])}colon(e){let t=0,r,s,n;for(let[o,l]of e.entries()){if(r=l,s=r[0],s==="("&&(t+=1),s===")"&&(t-=1),t===0&&s===":")if(!n)this.doubleColon(r);else{if(n[0]==="word"&&n[1]==="progid")continue;return o}n=r}return!1}comment(e){let t=new nh;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let r=e[1].slice(2,-2);if(/^\s*$/.test(r))t.text="",t.raws.left=r,t.raws.right="";else{let s=r.match(/^(\s*)([^]*\S)(\s*)$/);t.text=s[2],t.raws.left=s[1],t.raws.right=s[3]}}createTokenizer(){this.tokenizer=sh(this.input)}decl(e,t){let r=new ih;this.init(r,e[0][2]);let s=e[e.length-1];for(s[0]===";"&&(this.semicolon=!0,e.pop()),r.source.end=this.getPosition(s[3]||s[2]||lh(e)),r.source.end.offset++;e[0][0]!=="word";)e.length===1&&this.unknownWord(e),r.raws.before+=e.shift()[1];for(r.source.start=this.getPosition(e[0][2]),r.prop="";e.length;){let c=e[0][0];if(c===":"||c==="space"||c==="comment")break;r.prop+=e.shift()[1]}r.raws.between="";let n;for(;e.length;)if(n=e.shift(),n[0]===":"){r.raws.between+=n[1];break}else n[0]==="word"&&/\w/.test(n[1])&&this.unknownWord([n]),r.raws.between+=n[1];(r.prop[0]==="_"||r.prop[0]==="*")&&(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let o=[],l;for(;e.length&&(l=e[0][0],!(l!=="space"&&l!=="comment"));)o.push(e.shift());this.precheckMissedSemicolon(e);for(let c=e.length-1;c>=0;c--){if(n=e[c],n[1].toLowerCase()==="!important"){r.important=!0;let u=this.stringFrom(e,c);u=this.spacesFromEnd(e)+u,u!==" !important"&&(r.raws.important=u);break}else if(n[1].toLowerCase()==="important"){let u=e.slice(0),f="";for(let m=c;m>0;m--){let g=u[m][0];if(f.trim().indexOf("!")===0&&g!=="space")break;f=u.pop()[1]+f}f.trim().indexOf("!")===0&&(r.important=!0,r.raws.important=f,e=u)}if(n[0]!=="space"&&n[0]!=="comment")break}e.some(c=>c[0]!=="space"&&c[0]!=="comment")&&(r.raws.between+=o.map(c=>c[1]).join(""),o=[]),this.raw(r,"value",o.concat(e),t),r.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new rn;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let t=this.current.nodes[this.current.nodes.length-1];t&&t.type==="rule"&&!t.raws.ownSemicolon&&(t.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="",e.type!=="comment"&&(this.semicolon=!1)}other(e){let t=!1,r=null,s=!1,n=null,o=[],l=e[1].startsWith("--"),a=[],c=e;for(;c;){if(r=c[0],a.push(c),r==="("||r==="[")n||(n=c),o.push(r==="("?")":"]");else if(l&&s&&r==="{")n||(n=c),o.push("}");else if(o.length===0)if(r===";")if(s){this.decl(a,l);return}else break;else if(r==="{"){this.rule(a);return}else if(r==="}"){this.tokenizer.back(a.pop()),t=!0;break}else r===":"&&(s=!0);else r===o[o.length-1]&&(o.pop(),o.length===0&&(n=null));c=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),o.length>0&&this.unclosedBracket(n),t&&s){if(!l)for(;a.length&&(c=a[a.length-1][0],!(c!=="space"&&c!=="comment"));)this.tokenizer.back(a.pop());this.decl(a,l)}else this.unknownWord(a)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e);break}this.endFile()}precheckMissedSemicolon(){}raw(e,t,r,s){let n,o,l=r.length,a="",c=!0,u,f;for(let m=0;m<l;m+=1)n=r[m],o=n[0],o==="space"&&m===l-1&&!s?c=!1:o==="comment"?(f=r[m-1]?r[m-1][0]:"empty",u=r[m+1]?r[m+1][0]:"empty",!sn[f]&&!sn[u]?a.slice(-1)===","?c=!1:a+=n[1]:c=!1):a+=n[1];if(!c){let m=r.reduce((g,p)=>g+p[1],"");e.raws[t]={raw:m,value:a}}e[t]=a}rule(e){e.pop();let t=new rn;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],!(t!=="space"&&t!=="comment"));)r=e.pop()[1]+r;return r}spacesAndCommentsFromStart(e){let t,r="";for(;e.length&&(t=e[0][0],!(t!=="space"&&t!=="comment"));)r+=e.shift()[1];return r}spacesFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],t==="space");)r=e.pop()[1]+r;return r}stringFrom(e,t){let r="";for(let s=t;s<e.length;s++)r+=e[s][1];return e.splice(t,e.length-t),r}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word",{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}},uh=ch,hh=Oe,fh=uh,dh=vr;function lr(i,e){let t=new dh(i,e),r=new fh(t);try{r.parse()}catch(s){throw s}return r.root}var is=lr;lr.default=lr;hh.registerParse(lr);var{isClean:fe,my:ph}=gt,mh=So,gh=br,yh=Oe,bh=Qi;var nn=es,wh=is,Sh=yt,vh={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},Ch={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},Ih={Once:!0,postcssPlugin:!0,prepare:!0},We=0;function Je(i){return typeof i=="object"&&typeof i.then=="function"}function Bo(i){let e=!1,t=vh[i.type];return i.type==="decl"?e=i.prop.toLowerCase():i.type==="atrule"&&(e=i.name.toLowerCase()),e&&i.append?[t,t+"-"+e,We,t+"Exit",t+"Exit-"+e]:e?[t,t+"-"+e,t+"Exit",t+"Exit-"+e]:i.append?[t,We,t+"Exit"]:[t,t+"Exit"]}function on(i){let e;return i.type==="document"?e=["Document",We,"DocumentExit"]:i.type==="root"?e=["Root",We,"RootExit"]:e=Bo(i),{eventIndex:0,events:e,iterator:0,node:i,visitorIndex:0,visitors:[]}}function vi(i){return i[fe]=!1,i.nodes&&i.nodes.forEach(e=>vi(e)),i}var Ci={},Ve=class Uo{constructor(e,t,r){this.stringified=!1,this.processed=!1;let s;if(typeof t=="object"&&t!==null&&(t.type==="root"||t.type==="document"))s=vi(t);else if(t instanceof Uo||t instanceof nn)s=vi(t.root),t.map&&(typeof r.map=="undefined"&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=t.map);else{let n=wh;r.syntax&&(n=r.syntax.parse),r.parser&&(n=r.parser),n.parse&&(n=n.parse);try{s=n(t,r)}catch(o){this.processed=!0,this.error=o}s&&!s[ph]&&yh.rebuild(s)}this.result=new nn(e,s,r),this.helpers=J(I({},Ci),{postcss:Ci,result:this.result}),this.plugins=this.processor.plugins.map(n=>typeof n=="object"&&n.prepare?I(I({},n),n.prepare(this.result)):n)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let r=this.result.lastPlugin;try{t&&t.addToError(e),this.error=e,e.name==="CssSyntaxError"&&!e.plugin?(e.plugin=r.postcssPlugin,e.setMessage()):r.postcssVersion}catch(s){console&&console.error&&console.error(s)}return e}prepareVisitors(){this.listeners={};let e=(t,r,s)=>{this.listeners[r]||(this.listeners[r]=[]),this.listeners[r].push([t,s])};for(let t of this.plugins)if(typeof t=="object")for(let r in t){if(!Ch[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!Ih[r])if(typeof t[r]=="object")for(let s in t[r])s==="*"?e(t,r,t[r][s]):e(t,r+"-"+s.toLowerCase(),t[r][s]);else typeof t[r]=="function"&&e(t,r,t[r])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let t=this.plugins[e],r=this.runOnRoot(t);if(Je(r))try{await r}catch(s){throw this.handleError(s)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[fe];){e[fe]=!0;let t=[on(e)];for(;t.length>0;){let r=this.visitTick(t);if(Je(r))try{await r}catch(s){let n=t[t.length-1].node;throw this.handleError(s,n)}}}if(this.listeners.OnceExit)for(let[t,r]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if(e.type==="document"){let s=e.nodes.map(n=>r(n,this.helpers));await Promise.all(s)}else await r(e,this.helpers)}catch(s){throw this.handleError(s)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if(typeof e=="object"&&e.Once){if(this.result.root.type==="document"){let t=this.result.root.nodes.map(r=>e.Once(r,this.helpers));return Je(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}else if(typeof e=="function")return e(this.result.root,this.result)}catch(t){throw this.handleError(t)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=gh;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let s=new mh(t,this.result.root,this.result.opts).generate();return this.result.css=s[0],this.result.map=s[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins){let t=this.runOnRoot(e);if(Je(t))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[fe];)e[fe]=!0,this.walkSync(e);if(this.listeners.OnceExit)if(e.type==="document")for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,t){return this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[r,s]of e){this.result.lastPlugin=r;let n;try{n=s(t,this.helpers)}catch(o){throw this.handleError(o,t.proxyOf)}if(t.type!=="root"&&t.type!=="document"&&!t.parent)return!0;if(Je(n))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:r,visitors:s}=t;if(r.type!=="root"&&r.type!=="document"&&!r.parent){e.pop();return}if(s.length>0&&t.visitorIndex<s.length){let[o,l]=s[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===s.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=o;try{return l(r.toProxy(),this.helpers)}catch(a){throw this.handleError(a,r)}}if(t.iterator!==0){let o=t.iterator,l;for(;l=r.nodes[r.indexes[o]];)if(r.indexes[o]+=1,!l[fe]){l[fe]=!0,e.push(on(l));return}t.iterator=0,delete r.indexes[o]}let n=t.events;for(;t.eventIndex<n.length;){let o=n[t.eventIndex];if(t.eventIndex+=1,o===We){r.nodes&&r.nodes.length&&(r[fe]=!0,t.iterator=r.getIterator());return}else if(this.listeners[o]){t.visitors=this.listeners[o];return}}e.pop()}walkSync(e){e[fe]=!0;let t=Bo(e);for(let r of t)if(r===We)e.nodes&&e.each(s=>{s[fe]||this.walkSync(s)});else{let s=this.listeners[r];if(s&&this.visitSync(s,e.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}};Ve.registerPostcss=i=>{Ci=i};var zo=Ve;Ve.default=Ve;Sh.registerLazyResult(Ve);bh.registerLazyResult(Ve);var Eh=So,xh=br;var Rh=is,Mh=es,Ii=class{constructor(e,t,r){t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=r,this._map=void 0;let s,n=xh;this.result=new Mh(this._processor,s,this._opts),this.result.css=t;let o=this;Object.defineProperty(this.result,"root",{get(){return o.root}});let l=new Eh(n,s,this._opts,t);if(l.isMap()){let[a,c]=l.generate();a&&(this.result.css=a),c&&(this.result.map=c)}else l.clearAnnotation(),this.result.css=l.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return this.async().then(e,t)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,t=Rh;try{e=t(this._css,this._opts)}catch(r){this.error=r}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}},Nh=Ii;Ii.default=Ii;var Oh=Nh,Ah=zo,Dh=Qi,Th=yt,ht=class{constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let r of e)if(r.postcss===!0?r=r():r.postcss&&(r=r.postcss),typeof r=="object"&&Array.isArray(r.plugins))t=t.concat(r.plugins);else if(typeof r=="object"&&r.postcssPlugin)t.push(r);else if(typeof r=="function")t.push(r);else if(!(typeof r=="object"&&(r.parse||r.stringify)))throw new Error(r+" is not a PostCSS plugin");return t}process(e,t={}){return!this.plugins.length&&!t.parser&&!t.stringifier&&!t.syntax?new Oh(this,e,t):new Ah(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}},kh=ht;ht.default=ht;Th.registerProcessor(ht);Dh.registerProcessor(ht);var _h=Sr,Lh=mo,$h=Cr,Ph=ts,Fh=vr,Bh=yt,Uh=rs;function ft(i,e){if(Array.isArray(i))return i.map(o=>ft(o));let s=i,{inputs:t}=s,r=De(s,["inputs"]);if(t){e=[];for(let o of t){let l=J(I({},o),{__proto__:Fh.prototype});l.map&&(l.map=J(I({},l.map),{__proto__:Lh.prototype})),e.push(l)}}if(r.nodes&&(r.nodes=i.nodes.map(o=>ft(o,e))),r.source){let n=r.source,{inputId:o}=n,l=De(n,["inputId"]);r.source=l,o!=null&&(r.source.input=e[o])}if(r.type==="root")return new Bh(r);if(r.type==="decl")return new _h(r);if(r.type==="rule")return new Uh(r);if(r.type==="comment")return new $h(r);if(r.type==="atrule")return new Ph(r);throw new Error("Unknown node type: "+i.type)}var zh=ft;ft.default=ft;var Wh=Zi,Wo=Sr,Vh=zo,Gh=Oe,ss=kh,jh=br,Hh=zh,Vo=Qi,Yh=To,Go=Cr,jo=ts,Kh=es,Xh=vr,Zh=is,Jh=Po,Ho=rs,Yo=yt,qh=wr;function _(...i){return i.length===1&&Array.isArray(i[0])&&(i=i[0]),new ss(i)}_.plugin=function(e,t){let r=!1;function s(...o){console&&console.warn&&!r&&(r=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide:
50
+ https://evilmartians.com/chronicles/postcss-8-plugin-migration`),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(e+`: \u91CC\u9762 postcss.plugin \u88AB\u5F03\u7528. \u8FC1\u79FB\u6307\u5357:
51
+ https://www.w3ctech.com/topic/2226`));let l=t(...o);return l.postcssPlugin=e,l.postcssVersion=new ss().version,l}let n;return Object.defineProperty(s,"postcss",{get(){return n||(n=s()),n}}),s.process=function(o,l,a){return _([s(a)]).process(o,l)},s};_.stringify=jh;_.parse=Zh;_.fromJSON=Hh;_.list=Jh;_.comment=i=>new Go(i);_.atRule=i=>new jo(i);_.decl=i=>new Wo(i);_.rule=i=>new Ho(i);_.root=i=>new Yo(i);_.document=i=>new Vo(i);_.CssSyntaxError=Wh;_.Declaration=Wo;_.Container=Gh;_.Processor=ss;_.Document=Vo;_.Comment=Go;_.Warning=Yh;_.AtRule=jo;_.Result=Kh;_.Input=Xh;_.Rule=Ho;_.Root=Yo;_.Node=qh;Vh.registerPostcss(_);var Qh=_;_.default=_;var W=hu(Qh);W.stringify;W.fromJSON;W.plugin;W.parse;W.list;W.document;W.comment;W.atRule;W.rule;W.decl;W.root;W.CssSyntaxError;W.Declaration;W.Container;W.Processor;W.Document;W.Comment;W.Warning;W.AtRule;W.Result;W.Input;W.Rule;W.Root;W.Node;var Ei=class i{constructor(...e){oe(this,"parentElement",null),oe(this,"parentNode",null),oe(this,"ownerDocument"),oe(this,"firstChild",null),oe(this,"lastChild",null),oe(this,"previousSibling",null),oe(this,"nextSibling",null),oe(this,"ELEMENT_NODE",1),oe(this,"TEXT_NODE",3),oe(this,"nodeType"),oe(this,"nodeName"),oe(this,"RRNodeType")}get childNodes(){let e=[],t=this.firstChild;for(;t;)e.push(t),t=t.nextSibling;return e}contains(e){if(e instanceof i){if(e.ownerDocument!==this.ownerDocument)return!1;if(e===this)return!0}else return!1;for(;e.parentNode;){if(e.parentNode===this)return!0;e=e.parentNode}return!1}appendChild(e){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(e,t){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(e){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}};var an={Node:["childNodes","parentNode","parentElement","textContent","ownerDocument"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},ln={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},Vt={},ef=()=>!!globalThis.Zone;function ns(i){if(Vt[i])return Vt[i];let e=globalThis[i],t=e.prototype,r=i in an?an[i]:void 0,s=!!(r&&r.every(l=>{var a,c;return!!((c=(a=Object.getOwnPropertyDescriptor(t,l))==null?void 0:a.get)!=null&&c.toString().includes("[native code]"))})),n=i in ln?ln[i]:void 0,o=!!(n&&n.every(l=>{var a;return typeof t[l]=="function"&&((a=t[l])==null?void 0:a.toString().includes("[native code]"))}));if(s&&o&&!ef())return Vt[i]=e.prototype,e.prototype;try{let l=document.createElement("iframe");document.body.appendChild(l);let a=l.contentWindow;if(!a)return e.prototype;let c=a[i].prototype;return document.body.removeChild(l),c?Vt[i]=c:t}catch(l){return t}}var Wr={};function we(i,e,t){var r;let s=`${i}.${String(t)}`;if(Wr[s])return Wr[s].call(e);let n=ns(i),o=(r=Object.getOwnPropertyDescriptor(n,t))==null?void 0:r.get;return o?(Wr[s]=o,o.call(e)):e[t]}var Vr={};function Ko(i,e,t){let r=`${i}.${String(t)}`;if(Vr[r])return Vr[r].bind(e);let n=ns(i)[t];return typeof n!="function"?e[t]:(Vr[r]=n,n.bind(e))}function tf(i){return we("Node",i,"ownerDocument")}function rf(i){return we("Node",i,"childNodes")}function sf(i){return we("Node",i,"parentNode")}function nf(i){return we("Node",i,"parentElement")}function of(i){return we("Node",i,"textContent")}function af(i,e){return Ko("Node",i,"contains")(e)}function lf(i){return Ko("Node",i,"getRootNode")()}function cf(i){return!i||!("host"in i)?null:we("ShadowRoot",i,"host")}function uf(i){return i.styleSheets}function hf(i){return!i||!("shadowRoot"in i)?null:we("Element",i,"shadowRoot")}function ff(i,e){return we("Element",i,"querySelector")(e)}function df(i,e){return we("Element",i,"querySelectorAll")(e)}function Xo(){return ns("MutationObserver").constructor}function Ae(i,e,t){try{if(!(e in i))return()=>{};let r=i[e],s=t(r);return typeof s=="function"&&(s.prototype=s.prototype||{},Object.defineProperties(s,{__rrweb_original__:{enumerable:!1,value:r}})),i[e]=s,()=>{i[e]=r}}catch(r){return()=>{}}}var x={ownerDocument:tf,childNodes:rf,parentNode:sf,parentElement:nf,textContent:of,contains:af,getRootNode:lf,host:cf,styleSheets:uf,shadowRoot:hf,querySelector:ff,querySelectorAll:df,mutationObserver:Xo,patch:Ae};function ee(i,e,t=document){let r={capture:!0,passive:!0};return t.addEventListener(i,e,r),()=>t.removeEventListener(i,e,r)}var ke=`Please stop import mirror directly. Instead of that,\r
52
+ now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
53
+ or you can use record.mirror to access the mirror instance during recording.`,cn={map:{},getId(){return console.error(ke),-1},getNode(){return console.error(ke),null},removeNodeFromMap(){console.error(ke)},has(){return console.error(ke),!1},reset(){console.error(ke)}};typeof window!="undefined"&&window.Proxy&&window.Reflect&&(cn=new Proxy(cn,{get(i,e,t){return e==="map"&&console.error(ke),Reflect.get(i,e,t)}}));function dt(i,e,t={}){let r=null,s=0;return function(...n){let o=Date.now();!s&&t.leading===!1&&(s=o);let l=e-(o-s),a=this;l<=0||l>e?(r&&(clearTimeout(r),r=null),s=o,i.apply(a,n)):!r&&t.trailing!==!1&&(r=setTimeout(()=>{s=t.leading===!1?0:Date.now(),r=null,i.apply(a,n)},l))}}function Ir(i,e,t,r,s=window){let n=s.Object.getOwnPropertyDescriptor(i,e);return s.Object.defineProperty(i,e,r?t:{set(o){setTimeout(()=>{t.set.call(this,o)},0),n&&n.set&&n.set.call(this,o)}}),()=>Ir(i,e,n||{},!0)}var cr=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(cr=()=>new Date().getTime());function Zo(i){var e,t,r,s;let n=i.document;return{left:n.scrollingElement?n.scrollingElement.scrollLeft:i.pageXOffset!==void 0?i.pageXOffset:n.documentElement.scrollLeft||(n==null?void 0:n.body)&&((e=x.parentElement(n.body))==null?void 0:e.scrollLeft)||((t=n==null?void 0:n.body)==null?void 0:t.scrollLeft)||0,top:n.scrollingElement?n.scrollingElement.scrollTop:i.pageYOffset!==void 0?i.pageYOffset:(n==null?void 0:n.documentElement.scrollTop)||(n==null?void 0:n.body)&&((r=x.parentElement(n.body))==null?void 0:r.scrollTop)||((s=n==null?void 0:n.body)==null?void 0:s.scrollTop)||0}}function Jo(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function qo(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function Qo(i){return i?i.nodeType===i.ELEMENT_NODE?i:x.parentElement(i):null}function te(i,e,t,r){if(!i)return!1;let s=Qo(i);if(!s)return!1;try{if(typeof e=="string"){if(s.classList.contains(e)||r&&s.closest("."+e)!==null)return!0}else if(er(s,e,r))return!0}catch(n){}return!!(t&&(s.matches(t)||r&&s.closest(t)!==null))}function pf(i,e){return e.getId(i)!==-1}function Gr(i,e,t){return i.tagName==="TITLE"&&t.headTitleMutations?!0:e.getId(i)===st}function ea(i,e){if(Qe(i))return!1;let t=e.getId(i);if(!e.has(t))return!0;let r=x.parentNode(i);return r&&r.nodeType===i.DOCUMENT_NODE?!1:r?ea(r,e):!0}function xi(i){return!!i.changedTouches}function mf(i=window){"NodeList"in i&&!i.NodeList.prototype.forEach&&(i.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in i&&!i.DOMTokenList.prototype.forEach&&(i.DOMTokenList.prototype.forEach=Array.prototype.forEach)}function ta(i,e){return!!(i.nodeName==="IFRAME"&&e.getMeta(i))}function ra(i,e){return!!(i.nodeName==="LINK"&&i.nodeType===i.ELEMENT_NODE&&i.getAttribute&&i.getAttribute("rel")==="stylesheet"&&e.getMeta(i))}function Ri(i){return i?i instanceof Ei&&"shadowRoot"in i?!!i.shadowRoot:!!x.shadowRoot(i):!1}var Mi=class{constructor(){b(this,"id",1),b(this,"styleIDMap",new WeakMap),b(this,"idStyleMap",new Map)}getId(e){var t;return(t=this.styleIDMap.get(e))!=null?t:-1}has(e){return this.styleIDMap.has(e)}add(e,t){if(this.has(e))return this.getId(e);let r;return t===void 0?r=this.id++:r=t,this.styleIDMap.set(e,r),this.idStyleMap.set(r,e),r}getStyle(e){return this.idStyleMap.get(e)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}};function ia(i){var e;let t=null;return"getRootNode"in i&&((e=x.getRootNode(i))==null?void 0:e.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&x.host(x.getRootNode(i))&&(t=x.host(x.getRootNode(i))),t}function gf(i){let e=i,t;for(;t=ia(e);)e=t;return e}function yf(i){let e=x.ownerDocument(i);if(!e)return!1;let t=gf(i);return x.contains(e,t)}function sa(i){let e=x.ownerDocument(i);return e?x.contains(e,i)||yf(i):!1}function os(i){return!(!i||i.length>30||/\d{3,}/.test(i)||/^:r[a-z0-9]+:?$/i.test(i)||/^radix-/i.test(i)||/^headlessui-/i.test(i)||/^mui-/i.test(i)||/[a-f0-9]{8,}/i.test(i)||/^(sc|css|emotion|styled)-/i.test(i))}function bf(i){if(!i||i.startsWith("javascript:")||i.startsWith("data:"))return null;if(i.startsWith("#"))return i;try{return new URL(i,"http://x").pathname}catch(e){return i.split("?")[0].split("#")[0]}}function K(i){return i.replace(/\|/g,"%7C").replace(/=/g,"%3D")}function de(i,e){return i.length<=e?i:i.substring(0,e-3)+"..."}function wf(i){let e="";for(let t of Array.from(i.childNodes))t.nodeType===Node.TEXT_NODE&&(e+=t.textContent||"");return e.replace(/\s+/g," ").trim()}function Ni(i){return(i.textContent||"").replace(/\s+/g," ").trim()}function Sf(i){return Array.from(i.children).map(t=>t.tagName.toLowerCase()).join(",")}function vf(i){let e=5381;for(let t=0;t<i.length;t++)e=(e<<5)+e^i.charCodeAt(t);return(e>>>0).toString(16)}function me(i){if(i.parentElement)return i.parentElement;let e=i.getRootNode();return e instanceof ShadowRoot?e.host:null}function as(i){return i.hasAttribute("data-radix-portal")||i.hasAttribute("data-headlessui-portal")||i.hasAttribute("data-floating-ui-portal")||i.hasAttribute("data-portal")||i.id!==""&&i.id.toLowerCase().includes("portal")||i.classList.contains("portal")||i.getAttribute("role")==="dialog"}function Cf(i,e=5){let t=me(i),r=0;for(;t&&r<e;){if(as(t)){t=me(t);continue}let s=t.tagName.toLowerCase();if(t.id&&os(t.id))return`${s}#${t.id}`;let n=t.getAttribute("data-testid");if(n)return`${s}[data-testid=${n}]`;let o=t.getAttribute("data-id");if(o)return`${s}[data-id=${o}]`;let l=t.getAttribute("name");if(l)return`${s}[name=${l}]`;t=me(t),r++}return null}function If(i,e=15){let t=["header","nav","main","aside","footer","section","article"],r=me(i),s=0;for(;r&&s<e;){if(as(r)){r=me(r);continue}let n=r.tagName.toLowerCase();if(t.includes(n)){let o=r.getAttribute("aria-label");return o?`${n}[${o}]`:n}r=me(r),s++}return null}function Ef(i){let e=i.closest("form");return e?e.id&&os(e.id)?e.id:e.name?e.name:null:null}function xf(i,e=15){let t=me(i),r=0;for(;t&&r<e;){if(as(t)){t=me(t);continue}let s=t.getAttribute("role");if(s==="region"||s==="navigation"||s==="banner"||s==="main"||s==="contentinfo"||s==="complementary"){let n=t.getAttribute("aria-label");return n?`${s}[${n}]`:s}t=me(t),r++}return null}function Rf(i){let e=i.parentElement;if(!e)return 1;let t=i.tagName,r=Ni(i),s=0;for(let n of Array.from(e.children))if(n.tagName===t&&Ni(n)===r&&(s++,n===i))return s;return 1}function ls(i,e){let t=[],r=i.tagName.toLowerCase();t.push(r),e&&t.push(`page=${K(e)}`);let s=!1,n=Cf(i,5);if(n)t.push(`ancestor=${K(n)}`),s=!0;else{let y=If(i,15);if(y)t.push(`section=${K(y)}`),s=!0;else{let S=Ef(i);if(S)t.push(`form=${K(S)}`),s=!0;else{let E=xf(i,15);E&&(t.push(`region=${K(E)}`),s=!0)}}}let o=i.getAttribute("data-testid");o&&t.push(`testid=${K(de(o,50))}`);let l=i.getAttribute("data-test");l&&t.push(`test=${K(de(l,50))}`);let a=i.getAttribute("data-cy");a&&t.push(`cy=${K(de(a,50))}`);let c=i.id;c&&os(c)&&t.push(`id=${K(c)}`);let u=i.getAttribute("name");u&&t.push(`name=${K(de(u,50))}`);let f=i.getAttribute("type");f&&t.push(`type=${K(f.toLowerCase())}`);let m=i.getAttribute("role");m&&t.push(`role=${K(m)}`);let g=i.getAttribute("aria-label");g&&t.push(`label=${K(de(g,50))}`);let p=bf(i.getAttribute("href"));p&&t.push(`href=${K(p)}`);let d=i.getAttribute("placeholder");d&&t.push(`placeholder=${K(de(d,50))}`);let h=i.getAttribute("alt");h&&t.push(`alt=${K(de(h,50))}`);let w=i.getAttribute("title");if(w&&t.push(`title=${K(de(w,50))}`),["button","a","label","span","div","li","td","th","h1","h2","h3","h4","h5","h6","p"].includes(r)){let y=wf(i);y||(y=Ni(i)),y&&t.push(`text=${K(de(y,50))}`)}if(!s){let y=Rf(i);y>1&&t.push(`nth=${y}`)}if(t.length===1||t.length===2&&e){let y=Sf(i);if(y)t.push(`children=${y}`);else{let S=Array.from(i.attributes).map(E=>`${E.name}=${E.value}`).sort().join(";");t.push(`hash=${vf(r+S)}`)}}return t.join("|")}function je(i,e){let t=e!=null?e:typeof window!="undefined"?window.location.pathname:void 0;return ls(i,t)}function Er(i){let r=new DOMParser().parseFromString(i,"text/html").body.firstElementChild;if(!r)throw new Error("Invalid outerHTML: could not parse element");return ls(r)}function cs(i){return Er(i)}var Mf={maxTextLength:500,includeOuterHTML:!0,outerHTMLDepth:2,includeInputValues:!0};function Nf(i){let e="";for(let t of Array.from(i.childNodes))t.nodeType===Node.TEXT_NODE&&(e+=t.textContent||"");return e.trim()}function Of(i){return(i.textContent||"").trim()}function jr(i,e){return i.length<=e?i:i.substring(0,e-3)+"..."}function Af(i){let e=i.tagName.toUpperCase();return e==="INPUT"||e==="TEXTAREA"||e==="SELECT"}function na(i,e={}){var S;let t=I(I({},Mf),e.elementContextOptions),{isClickEvent:r=!1,maskInputOptions:s={},maskInputFn:n}=e,o=i.tagName.toLowerCase(),l=i,a={tagName:o},c=Nf(i),u=Of(i);c&&(a.directText=jr(c,t.maxTextLength)),u&&u!==c&&(a.fullText=jr(u,t.maxTextLength)),i.id&&(a.id=i.id),i.classList.length>0&&(a.classList=Array.from(i.classList));let f=i.getAttribute("name");f&&(a.name=f);let m=i.getAttribute("type");m&&(a.type=m.toLowerCase());let g=i.getAttribute("href");g&&(a.href=g);let p=i.getAttribute("role");p&&(a.role=p);let d=i.getAttribute("aria-label");d&&(a.ariaLabel=d);let h=i.getAttribute("data-testid");h&&(a.testId=h);let w=i.getAttribute("placeholder");w&&(a.placeholder=w);let v=i.getAttribute("title");v&&(a.title=v);let y=i.getAttribute("alt");if(y&&(a.alt=y),r)try{let E=(S=e.pathname)!=null?S:typeof window!="undefined"?window.location.pathname:void 0;a.bentoSelector=ls(i,E)}catch(E){}if(t.includeInputValues&&Af(i)){let E=i,A=it(l),$=E.value;$=rt({element:l,maskInputOptions:s,tagName:o,type:A,value:$,maskInputFn:n}),$&&(a.inputValue=jr($,t.maxTextLength))}return a}var O=(i=>(i[i.DomContentLoaded=0]="DomContentLoaded",i[i.Load=1]="Load",i[i.FullSnapshot=2]="FullSnapshot",i[i.IncrementalSnapshot=3]="IncrementalSnapshot",i[i.Meta=4]="Meta",i[i.Custom=5]="Custom",i[i.Plugin=6]="Plugin",i))(O||{}),M=(i=>(i[i.Mutation=0]="Mutation",i[i.MouseMove=1]="MouseMove",i[i.MouseInteraction=2]="MouseInteraction",i[i.Scroll=3]="Scroll",i[i.ViewportResize=4]="ViewportResize",i[i.Input=5]="Input",i[i.TouchMove=6]="TouchMove",i[i.MediaInteraction=7]="MediaInteraction",i[i.StyleSheetRule=8]="StyleSheetRule",i[i.CanvasMutation=9]="CanvasMutation",i[i.Font=10]="Font",i[i.Log=11]="Log",i[i.Drag=12]="Drag",i[i.StyleDeclaration=13]="StyleDeclaration",i[i.Selection=14]="Selection",i[i.AdoptedStyleSheet=15]="AdoptedStyleSheet",i[i.CustomElement=16]="CustomElement",i))(M||{}),q=(i=>(i[i.MouseUp=0]="MouseUp",i[i.MouseDown=1]="MouseDown",i[i.Click=2]="Click",i[i.ContextMenu=3]="ContextMenu",i[i.DblClick=4]="DblClick",i[i.Focus=5]="Focus",i[i.Blur=6]="Blur",i[i.TouchStart=7]="TouchStart",i[i.TouchMove_Departed=8]="TouchMove_Departed",i[i.TouchEnd=9]="TouchEnd",i[i.TouchCancel=10]="TouchCancel",i))(q||{}),pe=(i=>(i[i.Mouse=0]="Mouse",i[i.Pen=1]="Pen",i[i.Touch=2]="Touch",i))(pe||{}),Ge=(i=>(i[i["2D"]=0]="2D",i[i.WebGL=1]="WebGL",i[i.WebGL2=2]="WebGL2",i))(Ge||{}),_e=(i=>(i[i.Play=0]="Play",i[i.Pause=1]="Pause",i[i.Seeked=2]="Seeked",i[i.VolumeChange=3]="VolumeChange",i[i.RateChange=4]="RateChange",i))(_e||{});var oa=(i=>(i[i.Document=0]="Document",i[i.DocumentType=1]="DocumentType",i[i.Element=2]="Element",i[i.Text=3]="Text",i[i.CDATA=4]="CDATA",i[i.Comment=5]="Comment",i))(oa||{});function un(i){return"__ln"in i}var Oi=class{constructor(){b(this,"length",0),b(this,"head",null),b(this,"tail",null)}get(e){if(e>=this.length)throw new Error("Position outside of list range");let t=this.head;for(let r=0;r<e;r++)t=(t==null?void 0:t.next)||null;return t}addNode(e){let t={value:e,previous:null,next:null};if(e.__ln=t,e.previousSibling&&un(e.previousSibling)){let r=e.previousSibling.__ln.next;t.next=r,t.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=t,r&&(r.previous=t)}else if(e.nextSibling&&un(e.nextSibling)&&e.nextSibling.__ln.previous){let r=e.nextSibling.__ln.previous;t.previous=r,t.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=t,r&&(r.next=t)}else this.head&&(this.head.previous=t),t.next=this.head,this.head=t;t.next===null&&(this.tail=t),this.length++}removeNode(e){let t=e.__ln;this.head&&(t.previous?(t.previous.next=t.next,t.next?t.next.previous=t.previous:this.tail=t.previous):(this.head=t.next,this.head?this.head.previous=null:this.tail=null),e.__ln&&delete e.__ln,this.length--)}},hn=(i,e)=>`${i}@${e}`,Ai=class{constructor(){b(this,"frozen",!1),b(this,"locked",!1),b(this,"texts",[]),b(this,"attributes",[]),b(this,"attributeMap",new WeakMap),b(this,"removes",[]),b(this,"mapRemoves",[]),b(this,"movedMap",{}),b(this,"addedSet",new Set),b(this,"movedSet",new Set),b(this,"droppedSet",new Set),b(this,"removesSubTreeCache",new Set),b(this,"mutationCb"),b(this,"blockClass"),b(this,"blockSelector"),b(this,"maskTextClass"),b(this,"maskTextSelector"),b(this,"inlineStylesheet"),b(this,"maskInputOptions"),b(this,"maskTextFn"),b(this,"maskInputFn"),b(this,"keepIframeSrcFn"),b(this,"recordCanvas"),b(this,"inlineImages"),b(this,"slimDOMOptions"),b(this,"dataURLOptions"),b(this,"doc"),b(this,"mirror"),b(this,"iframeManager"),b(this,"stylesheetManager"),b(this,"shadowDomManager"),b(this,"canvasManager"),b(this,"processedNodeManager"),b(this,"unattachedDoc"),b(this,"processMutations",e=>{e.forEach(this.processMutation),this.emit()}),b(this,"emit",()=>{if(this.frozen||this.locked)return;let e=[],t=new Set,r=new Oi,s=a=>{let c=a,u=st;for(;u===st;)c=c&&c.nextSibling,u=c&&this.mirror.getId(c);return u},n=a=>{let c=x.parentNode(a);if(!c||!sa(a))return;let u=!1;if(a.nodeType===Node.TEXT_NODE){let p=c.tagName;if(p==="TEXTAREA")return;p==="STYLE"&&this.addedSet.has(c)&&(u=!0)}let f=Qe(c)?this.mirror.getId(ia(a)):this.mirror.getId(c),m=s(a);if(f===-1||m===-1)return r.addNode(a);let g=$e(a,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskTextClass:this.maskTextClass,maskTextSelector:this.maskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:p=>{ta(p,this.mirror)&&this.iframeManager.addIframe(p),ra(p,this.mirror)&&this.stylesheetManager.trackLinkElement(p),Ri(a)&&this.shadowDomManager.addShadowRoot(x.shadowRoot(a),this.doc)},onIframeLoad:(p,d)=>{this.iframeManager.attachIframe(p,d),this.shadowDomManager.observeAttachShadow(p)},onStylesheetLoad:(p,d)=>{this.stylesheetManager.attachLinkElement(p,d)},cssCaptured:u});g&&(e.push({parentId:f,nextId:m,node:g}),t.add(g.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(let a of this.movedSet)fn(this.removesSubTreeCache,a,this.mirror)&&!this.movedSet.has(x.parentNode(a))||n(a);for(let a of this.addedSet)!dn(this.droppedSet,a)&&!fn(this.removesSubTreeCache,a,this.mirror)||dn(this.movedSet,a)?n(a):this.droppedSet.add(a);let o=null;for(;r.length;){let a=null;if(o){let c=this.mirror.getId(x.parentNode(o.value)),u=s(o.value);c!==-1&&u!==-1&&(a=o)}if(!a){let c=r.tail;for(;c;){let u=c;if(c=c.previous,u){let f=this.mirror.getId(x.parentNode(u.value));if(s(u.value)===-1)continue;if(f!==-1){a=u;break}else{let g=u.value,p=x.parentNode(g);if(p&&p.nodeType===Node.DOCUMENT_FRAGMENT_NODE){let d=x.host(p);if(this.mirror.getId(d)!==-1){a=u;break}}}}}}if(!a){for(;r.head;)r.removeNode(r.head.value);break}o=a.previous,r.removeNode(a.value),n(a.value)}let l={texts:this.texts.map(a=>{let c=a.node,u=x.parentNode(c);return u&&u.tagName==="TEXTAREA"&&this.genTextAreaValueMutation(u),{id:this.mirror.getId(c),value:a.value}}).filter(a=>!t.has(a.id)).filter(a=>this.mirror.has(a.id)),attributes:this.attributes.map(a=>{let{attributes:c}=a;if(typeof c.style=="string"){let u=JSON.stringify(a.styleDiff),f=JSON.stringify(a._unchangedStyles);u.length<c.style.length&&(u+f).split("var(").length===c.style.split("var(").length&&(c.style=a.styleDiff)}return{id:this.mirror.getId(a.node),attributes:c}}).filter(a=>!t.has(a.id)).filter(a=>this.mirror.has(a.id)),removes:this.removes,adds:e};!l.texts.length&&!l.attributes.length&&!l.removes.length&&!l.adds.length||(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.removesSubTreeCache=new Set,this.movedMap={},this.mutationCb(l))}),b(this,"genTextAreaValueMutation",e=>{let t=this.attributeMap.get(e);t||(t={node:e,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(t),this.attributeMap.set(e,t));let r=Array.from(x.childNodes(e),s=>x.textContent(s)||"").join("");t.attributes.value=rt({element:e,maskInputOptions:this.maskInputOptions,tagName:e.tagName,type:it(e),value:r,maskInputFn:this.maskInputFn})}),b(this,"processMutation",e=>{if(!Gr(e.target,this.mirror,this.slimDOMOptions))switch(e.type){case"characterData":{let t=x.textContent(e.target);!te(e.target,this.blockClass,this.blockSelector,!1)&&t!==e.oldValue&&this.texts.push({value:Mn(e.target,this.maskTextClass,this.maskTextSelector,!0)&&t?this.maskTextFn?this.maskTextFn(t,Qo(e.target)):t.replace(/[\S]/g,"*"):t,node:e.target});break}case"attributes":{let t=e.target,r=e.attributeName,s=e.target.getAttribute(r);if(r==="value"){let o=it(t);s=rt({element:t,maskInputOptions:this.maskInputOptions,tagName:t.tagName,type:o,value:s,maskInputFn:this.maskInputFn})}if(te(e.target,this.blockClass,this.blockSelector,!1)||s===e.oldValue)return;let n=this.attributeMap.get(e.target);if(t.tagName==="IFRAME"&&r==="src"&&!this.keepIframeSrcFn(s))if(!t.contentDocument)r="rr_src";else return;if(n||(n={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(n),this.attributeMap.set(e.target,n)),r==="type"&&t.tagName==="INPUT"&&(e.oldValue||"").toLowerCase()==="password"&&t.setAttribute("data-rr-is-password","true"),!Rn(t.tagName,r))if(n.attributes[r]=xn(this.doc,Me(t.tagName),Me(r),s),r==="style"){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(l){this.unattachedDoc=this.doc}let o=this.unattachedDoc.createElement("span");e.oldValue&&o.setAttribute("style",e.oldValue);for(let l of Array.from(t.style)){let a=t.style.getPropertyValue(l),c=t.style.getPropertyPriority(l);a!==o.style.getPropertyValue(l)||c!==o.style.getPropertyPriority(l)?c===""?n.styleDiff[l]=a:n.styleDiff[l]=[a,c]:n._unchangedStyles[l]=[a,c]}for(let l of Array.from(o.style))t.style.getPropertyValue(l)===""&&(n.styleDiff[l]=!1)}else r==="open"&&t.tagName==="DIALOG"&&(t.matches("dialog:modal")?n.attributes.rr_open_mode="modal":n.attributes.rr_open_mode="non-modal");break}case"childList":{if(te(e.target,this.blockClass,this.blockSelector,!0))return;if(e.target.tagName==="TEXTAREA"){this.genTextAreaValueMutation(e.target);return}e.addedNodes.forEach(t=>this.genAdds(t,e.target)),e.removedNodes.forEach(t=>{let r=this.mirror.getId(t),s=Qe(e.target)?this.mirror.getId(x.host(e.target)):this.mirror.getId(e.target);te(e.target,this.blockClass,this.blockSelector,!1)||Gr(t,this.mirror,this.slimDOMOptions)||!pf(t,this.mirror)||(this.addedSet.has(t)?(Di(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&r===-1||ea(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[hn(r,s)]?Di(this.movedSet,t):(this.removes.push({parentId:s,id:r,isShadow:Qe(e.target)&&et(e.target)?!0:void 0}),Df(t,this.removesSubTreeCache))),this.mapRemoves.push(t))});break}}}),b(this,"genAdds",(e,t)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!(this.addedSet.has(e)||this.movedSet.has(e))){if(this.mirror.hasNode(e)){if(Gr(e,this.mirror,this.slimDOMOptions))return;this.movedSet.add(e);let r=null;t&&this.mirror.hasNode(t)&&(r=this.mirror.getId(t)),r&&r!==-1&&(this.movedMap[hn(this.mirror.getId(e),r)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);te(e,this.blockClass,this.blockSelector,!1)||(x.childNodes(e).forEach(r=>this.genAdds(r)),Ri(e)&&x.childNodes(x.shadowRoot(e)).forEach(r=>{this.processedNodeManager.add(r,this),this.genAdds(r,e)}))}})}init(e){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(t=>{this[t]=e[t]})}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}};function Di(i,e){i.delete(e),x.childNodes(e).forEach(t=>Di(i,t))}function Df(i,e){let t=[i];for(;t.length;){let r=t.pop();e.has(r)||(e.add(r),x.childNodes(r).forEach(s=>t.push(s)))}}function fn(i,e,t){return i.size===0?!1:Tf(i,e)}function Tf(i,e,t){let r=x.parentNode(e);return r?i.has(r):!1}function dn(i,e){return i.size===0?!1:aa(i,e)}function aa(i,e){let t=x.parentNode(e);return t?i.has(t)?!0:aa(i,t):!1}var tt;function kf(i){tt=i}function _f(){tt=void 0}var N=i=>tt?(...t)=>{try{return i(...t)}catch(r){if(tt&&tt(r)===!0)return;throw r}}:i,Re=[];function bt(i){try{if("composedPath"in i){let e=i.composedPath();if(e.length)return e[0]}else if("path"in i&&i.path.length)return i.path[0]}catch(e){}return i&&i.target}function la(i,e){let t=new Ai;Re.push(t),t.init(i);let r=new(Xo())(N(t.processMutations.bind(t)));return r.observe(e,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),r}function Lf({mousemoveCb:i,sampling:e,doc:t,mirror:r}){if(e.mousemove===!1)return()=>{};let s=typeof e.mousemove=="number"?e.mousemove:50,n=typeof e.mousemoveCallback=="number"?e.mousemoveCallback:500,o=[],l,a=dt(N(f=>{let m=Date.now()-l;i(o.map(g=>(g.timeOffset-=m,g)),f),o=[],l=null}),n),c=N(dt(N(f=>{let m=bt(f),{clientX:g,clientY:p}=xi(f)?f.changedTouches[0]:f;l||(l=cr()),o.push({x:g,y:p,id:r.getId(m),timeOffset:cr()-l}),a(typeof DragEvent!="undefined"&&f instanceof DragEvent?M.Drag:f instanceof MouseEvent?M.MouseMove:M.TouchMove)}),s,{trailing:!1})),u=[ee("mousemove",c,t),ee("touchmove",c,t),ee("drag",c,t)];return N(()=>{u.forEach(f=>f())})}function $f({mouseInteractionCb:i,doc:e,mirror:t,blockClass:r,blockSelector:s,sampling:n,captureElementContext:o,elementContextOptions:l,maskInputOptions:a,maskInputFn:c}){if(n.mouseInteraction===!1)return()=>{};let u=n.mouseInteraction===!0||n.mouseInteraction===void 0?{}:n.mouseInteraction,f=[],m=null,g=p=>d=>{let h=typeof window!="undefined"?window.location.pathname:void 0,w=bt(d);if(te(w,r,s,!0))return;let v=null,y=p;if("pointerType"in d){switch(d.pointerType){case"mouse":v=pe.Mouse;break;case"touch":v=pe.Touch;break;case"pen":v=pe.Pen;break}v===pe.Touch?q[p]===q.MouseDown?y="TouchStart":q[p]===q.MouseUp&&(y="TouchEnd"):pe.Pen}else xi(d)&&(v=pe.Touch);v!==null?(m=v,(y.startsWith("Touch")&&v===pe.Touch||y.startsWith("Mouse")&&v===pe.Mouse)&&(v=null)):q[p]===q.Click&&(v=m,m=null);let S=xi(d)?d.changedTouches[0]:d;if(!S)return;let E=t.getId(w),{clientX:A,clientY:$}=S,D;if(o&&w instanceof Element){let P=q[y]===q.Click;D=na(w,{elementContextOptions:l,isClickEvent:P,maskInputOptions:a,maskInputFn:c,pathname:h})}N(i)(I(I({type:q[y],id:E,x:A,y:$},v!==null&&{pointerType:v}),D&&{elementContext:D}))};return Object.keys(q).filter(p=>Number.isNaN(Number(p))&&!p.endsWith("_Departed")&&u[p]!==!1).forEach(p=>{let d=Me(p),h=g(p);if(window.PointerEvent)switch(q[p]){case q.MouseDown:case q.MouseUp:d=d.replace("mouse","pointer");break;case q.TouchStart:case q.TouchEnd:return}f.push(ee(d,h,e))}),N(()=>{f.forEach(p=>p())})}function ca({scrollCb:i,doc:e,mirror:t,blockClass:r,blockSelector:s,sampling:n}){let o=N(dt(N(l=>{let a=bt(l);if(!a||te(a,r,s,!0))return;let c=t.getId(a);if(a===e&&e.defaultView){let u=Zo(e.defaultView);i({id:c,x:u.left,y:u.top})}else i({id:c,x:a.scrollLeft,y:a.scrollTop})}),n.scroll||100));return ee("scroll",o,e)}function Pf({viewportResizeCb:i},{win:e}){let t=-1,r=-1,s=N(dt(N(()=>{let n=Jo(),o=qo();(t!==n||r!==o)&&(i({width:Number(o),height:Number(n)}),t=n,r=o)}),200));return ee("resize",s,e)}var Ff=["INPUT","TEXTAREA","SELECT"],pn=new WeakMap;function Bf({inputCb:i,doc:e,mirror:t,blockClass:r,blockSelector:s,ignoreClass:n,ignoreSelector:o,maskInputOptions:l,maskInputFn:a,sampling:c,userTriggeredOnInput:u,captureElementContext:f,elementContextOptions:m}){function g(S){let E=bt(S),A=S.isTrusted,$=E&&E.tagName;if(E&&$==="OPTION"&&(E=x.parentElement(E)),!E||!$||Ff.indexOf($)<0||te(E,r,s,!0)||E.classList.contains(n)||o&&E.matches(o))return;let D=E.value,P=!1,H=it(E)||"";H==="radio"||H==="checkbox"?P=E.checked:(l[$.toLowerCase()]||l[H])&&(D=rt({element:E,maskInputOptions:l,tagName:$,type:H,value:D,maskInputFn:a})),p(E,u?{text:D,isChecked:P,userTriggered:A}:{text:D,isChecked:P});let se=E.name;H==="radio"&&se&&P&&e.querySelectorAll(`input[type="radio"][name="${se}"]`).forEach(re=>{if(re!==E){let R=re.value;p(re,u?{text:R,isChecked:!P,userTriggered:!1}:{text:R,isChecked:!P})}})}function p(S,E){let A=pn.get(S);if(!A||A.text!==E.text||A.isChecked!==E.isChecked){pn.set(S,E);let $=t.getId(S),D;f&&S instanceof Element&&(D=na(S,{elementContextOptions:m,isClickEvent:!1,maskInputOptions:l,maskInputFn:a})),N(i)(I(J(I({},E),{id:$}),D&&{elementContext:D}))}}let h=(c.input==="last"?["change"]:["input","change"]).map(S=>ee(S,N(g),e)),w=e.defaultView;if(!w)return()=>{h.forEach(S=>S())};let v=w.Object.getOwnPropertyDescriptor(w.HTMLInputElement.prototype,"value"),y=[[w.HTMLInputElement.prototype,"value"],[w.HTMLInputElement.prototype,"checked"],[w.HTMLSelectElement.prototype,"value"],[w.HTMLTextAreaElement.prototype,"value"],[w.HTMLSelectElement.prototype,"selectedIndex"],[w.HTMLOptionElement.prototype,"selected"]];return v&&v.set&&h.push(...y.map(S=>Ir(S[0],S[1],{set(){N(g)({target:this,isTrusted:!1})}},!1,w))),N(()=>{h.forEach(S=>S())})}function ur(i){let e=[];function t(r,s){if(Gt("CSSGroupingRule")&&r.parentRule instanceof CSSGroupingRule||Gt("CSSMediaRule")&&r.parentRule instanceof CSSMediaRule||Gt("CSSSupportsRule")&&r.parentRule instanceof CSSSupportsRule||Gt("CSSConditionRule")&&r.parentRule instanceof CSSConditionRule){let o=Array.from(r.parentRule.cssRules).indexOf(r);s.unshift(o)}else if(r.parentStyleSheet){let o=Array.from(r.parentStyleSheet.cssRules).indexOf(r);s.unshift(o)}return s}return t(i,e)}function Ie(i,e,t){let r,s;return i?(i.ownerNode?r=e.getId(i.ownerNode):s=t.getId(i),{styleId:s,id:r}):{}}function Uf({styleSheetRuleCb:i,mirror:e,stylesheetManager:t},{win:r}){if(!r.CSSStyleSheet||!r.CSSStyleSheet.prototype)return()=>{};let s=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=new Proxy(s,{apply:N((u,f,m)=>{let[g,p]=m,{id:d,styleId:h}=Ie(f,e,t.styleMirror);return(d&&d!==-1||h&&h!==-1)&&i({id:d,styleId:h,adds:[{rule:g,index:p}]}),u.apply(f,m)})}),r.CSSStyleSheet.prototype.addRule=function(u,f,m=this.cssRules.length){let g=`${u} { ${f} }`;return r.CSSStyleSheet.prototype.insertRule.apply(this,[g,m])};let n=r.CSSStyleSheet.prototype.deleteRule;r.CSSStyleSheet.prototype.deleteRule=new Proxy(n,{apply:N((u,f,m)=>{let[g]=m,{id:p,styleId:d}=Ie(f,e,t.styleMirror);return(p&&p!==-1||d&&d!==-1)&&i({id:p,styleId:d,removes:[{index:g}]}),u.apply(f,m)})}),r.CSSStyleSheet.prototype.removeRule=function(u){return r.CSSStyleSheet.prototype.deleteRule.apply(this,[u])};let o;r.CSSStyleSheet.prototype.replace&&(o=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(o,{apply:N((u,f,m)=>{let[g]=m,{id:p,styleId:d}=Ie(f,e,t.styleMirror);return(p&&p!==-1||d&&d!==-1)&&i({id:p,styleId:d,replace:g}),u.apply(f,m)})}));let l;r.CSSStyleSheet.prototype.replaceSync&&(l=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(l,{apply:N((u,f,m)=>{let[g]=m,{id:p,styleId:d}=Ie(f,e,t.styleMirror);return(p&&p!==-1||d&&d!==-1)&&i({id:p,styleId:d,replaceSync:g}),u.apply(f,m)})}));let a={};jt("CSSGroupingRule")?a.CSSGroupingRule=r.CSSGroupingRule:(jt("CSSMediaRule")&&(a.CSSMediaRule=r.CSSMediaRule),jt("CSSConditionRule")&&(a.CSSConditionRule=r.CSSConditionRule),jt("CSSSupportsRule")&&(a.CSSSupportsRule=r.CSSSupportsRule));let c={};return Object.entries(a).forEach(([u,f])=>{c[u]={insertRule:f.prototype.insertRule,deleteRule:f.prototype.deleteRule},f.prototype.insertRule=new Proxy(c[u].insertRule,{apply:N((m,g,p)=>{let[d,h]=p,{id:w,styleId:v}=Ie(g.parentStyleSheet,e,t.styleMirror);return(w&&w!==-1||v&&v!==-1)&&i({id:w,styleId:v,adds:[{rule:d,index:[...ur(g),h||0]}]}),m.apply(g,p)})}),f.prototype.deleteRule=new Proxy(c[u].deleteRule,{apply:N((m,g,p)=>{let[d]=p,{id:h,styleId:w}=Ie(g.parentStyleSheet,e,t.styleMirror);return(h&&h!==-1||w&&w!==-1)&&i({id:h,styleId:w,removes:[{index:[...ur(g),d]}]}),m.apply(g,p)})})}),N(()=>{r.CSSStyleSheet.prototype.insertRule=s,r.CSSStyleSheet.prototype.deleteRule=n,o&&(r.CSSStyleSheet.prototype.replace=o),l&&(r.CSSStyleSheet.prototype.replaceSync=l),Object.entries(a).forEach(([u,f])=>{f.prototype.insertRule=c[u].insertRule,f.prototype.deleteRule=c[u].deleteRule})})}function ua({mirror:i,stylesheetManager:e},t){var r,s,n;let o=null;t.nodeName==="#document"?o=i.getId(t):o=i.getId(x.host(t));let l=t.nodeName==="#document"?(r=t.defaultView)==null?void 0:r.Document:(n=(s=t.ownerDocument)==null?void 0:s.defaultView)==null?void 0:n.ShadowRoot,a=l!=null&&l.prototype?Object.getOwnPropertyDescriptor(l==null?void 0:l.prototype,"adoptedStyleSheets"):void 0;return o===null||o===-1||!l||!a?()=>{}:(Object.defineProperty(t,"adoptedStyleSheets",{configurable:a.configurable,enumerable:a.enumerable,get(){var c;return(c=a.get)==null?void 0:c.call(this)},set(c){var u;let f=(u=a.set)==null?void 0:u.call(this,c);if(o!==null&&o!==-1)try{e.adoptStyleSheets(c,o)}catch(m){}return f}}),N(()=>{Object.defineProperty(t,"adoptedStyleSheets",{configurable:a.configurable,enumerable:a.enumerable,get:a.get,set:a.set})}))}function zf({styleDeclarationCb:i,mirror:e,ignoreCSSAttributes:t,stylesheetManager:r},{win:s}){let n=s.CSSStyleDeclaration.prototype.setProperty;s.CSSStyleDeclaration.prototype.setProperty=new Proxy(n,{apply:N((l,a,c)=>{var u;let[f,m,g]=c;if(t.has(f))return n.apply(a,[f,m,g]);let{id:p,styleId:d}=Ie((u=a.parentRule)==null?void 0:u.parentStyleSheet,e,r.styleMirror);return(p&&p!==-1||d&&d!==-1)&&i({id:p,styleId:d,set:{property:f,value:m,priority:g},index:ur(a.parentRule)}),l.apply(a,c)})});let o=s.CSSStyleDeclaration.prototype.removeProperty;return s.CSSStyleDeclaration.prototype.removeProperty=new Proxy(o,{apply:N((l,a,c)=>{var u;let[f]=c;if(t.has(f))return o.apply(a,[f]);let{id:m,styleId:g}=Ie((u=a.parentRule)==null?void 0:u.parentStyleSheet,e,r.styleMirror);return(m&&m!==-1||g&&g!==-1)&&i({id:m,styleId:g,remove:{property:f},index:ur(a.parentRule)}),l.apply(a,c)})}),N(()=>{s.CSSStyleDeclaration.prototype.setProperty=n,s.CSSStyleDeclaration.prototype.removeProperty=o})}function Wf({mediaInteractionCb:i,blockClass:e,blockSelector:t,mirror:r,sampling:s,doc:n}){let o=N(a=>dt(N(c=>{let u=bt(c);if(!u||te(u,e,t,!0))return;let{currentTime:f,volume:m,muted:g,playbackRate:p,loop:d}=u;i({type:a,id:r.getId(u),currentTime:f,volume:m,muted:g,playbackRate:p,loop:d})}),s.media||500)),l=[ee("play",o(_e.Play),n),ee("pause",o(_e.Pause),n),ee("seeked",o(_e.Seeked),n),ee("volumechange",o(_e.VolumeChange),n),ee("ratechange",o(_e.RateChange),n)];return N(()=>{l.forEach(a=>a())})}function Vf({fontCb:i,doc:e}){let t=e.defaultView;if(!t)return()=>{};let r=[],s=new WeakMap,n=t.FontFace;t.FontFace=function(a,c,u){let f=new n(a,c,u);return s.set(f,{family:a,buffer:typeof c!="string",descriptors:u,fontSource:typeof c=="string"?c:JSON.stringify(Array.from(new Uint8Array(c)))}),f};let o=Ae(e.fonts,"add",function(l){return function(a){return setTimeout(N(()=>{let c=s.get(a);c&&(i(c),s.delete(a))}),0),l.apply(this,[a])}});return r.push(()=>{t.FontFace=n}),r.push(o),N(()=>{r.forEach(l=>l())})}function Gf(i){let{doc:e,mirror:t,blockClass:r,blockSelector:s,selectionCb:n}=i,o=!0,l=N(()=>{let a=e.getSelection();if(!a||o&&(a!=null&&a.isCollapsed))return;o=a.isCollapsed||!1;let c=[],u=a.rangeCount||0;for(let f=0;f<u;f++){let m=a.getRangeAt(f),{startContainer:g,startOffset:p,endContainer:d,endOffset:h}=m;te(g,r,s,!0)||te(d,r,s,!0)||c.push({start:t.getId(g),startOffset:p,end:t.getId(d),endOffset:h})}n({ranges:c})});return l(),ee("selectionchange",l)}function jf({doc:i,customElementCb:e}){let t=i.defaultView;return!t||!t.customElements?()=>{}:Ae(t.customElements,"define",function(s){return function(n,o,l){try{e({define:{name:n}})}catch(a){console.warn(`Custom element callback failed for ${n}`)}return s.apply(this,[n,o,l])}})}function Hf(i,e){let{mutationCb:t,mousemoveCb:r,mouseInteractionCb:s,scrollCb:n,viewportResizeCb:o,inputCb:l,mediaInteractionCb:a,styleSheetRuleCb:c,styleDeclarationCb:u,canvasMutationCb:f,fontCb:m,selectionCb:g,customElementCb:p}=i;i.mutationCb=(...d)=>{e.mutation&&e.mutation(...d),t(...d)},i.mousemoveCb=(...d)=>{e.mousemove&&e.mousemove(...d),r(...d)},i.mouseInteractionCb=(...d)=>{e.mouseInteraction&&e.mouseInteraction(...d),s(...d)},i.scrollCb=(...d)=>{e.scroll&&e.scroll(...d),n(...d)},i.viewportResizeCb=(...d)=>{e.viewportResize&&e.viewportResize(...d),o(...d)},i.inputCb=(...d)=>{e.input&&e.input(...d),l(...d)},i.mediaInteractionCb=(...d)=>{e.mediaInteaction&&e.mediaInteaction(...d),a(...d)},i.styleSheetRuleCb=(...d)=>{e.styleSheetRule&&e.styleSheetRule(...d),c(...d)},i.styleDeclarationCb=(...d)=>{e.styleDeclaration&&e.styleDeclaration(...d),u(...d)},i.canvasMutationCb=(...d)=>{e.canvasMutation&&e.canvasMutation(...d),f(...d)},i.fontCb=(...d)=>{e.font&&e.font(...d),m(...d)},i.selectionCb=(...d)=>{e.selection&&e.selection(...d),g(...d)},i.customElementCb=(...d)=>{e.customElement&&e.customElement(...d),p(...d)}}function Yf(i,e={}){let t=i.doc.defaultView;if(!t)return()=>{};Hf(i,e);let r;i.recordDOM&&(r=la(i,i.doc));let s=Lf(i),n=$f(i),o=ca(i),l=Pf(i,{win:t}),a=Bf(i),c=Wf(i),u=()=>{},f=()=>{},m=()=>{},g=()=>{};i.recordDOM&&(u=Uf(i,{win:t}),f=ua(i,i.doc),m=zf(i,{win:t}),i.collectFonts&&(g=Vf(i)));let p=Gf(i),d=jf(i),h=[];for(let w of i.plugins)h.push(w.observer(w.callback,t,w.options));return N(()=>{Re.forEach(w=>w.reset()),r==null||r.disconnect(),s(),n(),o(),l(),a(),c(),u(),f(),m(),g(),p(),d(),h.forEach(w=>w())})}function Gt(i){return typeof window[i]!="undefined"}function jt(i){return!!(typeof window[i]!="undefined"&&window[i].prototype&&"insertRule"in window[i].prototype&&"deleteRule"in window[i].prototype)}var hr=class{constructor(e){b(this,"iframeIdToRemoteIdMap",new WeakMap),b(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=e}getId(e,t,r,s){let n=r||this.getIdToRemoteIdMap(e),o=s||this.getRemoteIdToIdMap(e),l=n.get(t);return l||(l=this.generateIdFn(),n.set(t,l),o.set(l,t)),l}getIds(e,t){let r=this.getIdToRemoteIdMap(e),s=this.getRemoteIdToIdMap(e);return t.map(n=>this.getId(e,n,r,s))}getRemoteId(e,t,r){let s=r||this.getRemoteIdToIdMap(e);if(typeof t!="number")return t;let n=s.get(t);return n||-1}getRemoteIds(e,t){let r=this.getRemoteIdToIdMap(e);return t.map(s=>this.getRemoteId(e,s,r))}reset(e){if(!e){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(e),this.iframeRemoteIdToIdMap.delete(e)}getIdToRemoteIdMap(e){let t=this.iframeIdToRemoteIdMap.get(e);return t||(t=new Map,this.iframeIdToRemoteIdMap.set(e,t)),t}getRemoteIdToIdMap(e){let t=this.iframeRemoteIdToIdMap.get(e);return t||(t=new Map,this.iframeRemoteIdToIdMap.set(e,t)),t}},Ti=class{constructor(e){b(this,"iframes",new WeakMap),b(this,"crossOriginIframeMap",new WeakMap),b(this,"crossOriginIframeMirror",new hr(En)),b(this,"crossOriginIframeStyleMirror"),b(this,"crossOriginIframeRootIdMap",new WeakMap),b(this,"mirror"),b(this,"mutationCb"),b(this,"wrappedEmit"),b(this,"loadListener"),b(this,"stylesheetManager"),b(this,"recordCrossOriginIframes"),this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new hr(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=e.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(e){this.iframes.set(e,!0),e.contentWindow&&this.crossOriginIframeMap.set(e.contentWindow,e)}addLoadListener(e){this.loadListener=e}attachIframe(e,t){var r,s;this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&((r=e.contentWindow)==null||r.addEventListener("message",this.handleMessage.bind(this))),(s=this.loadListener)==null||s.call(this,e),e.contentDocument&&e.contentDocument.adoptedStyleSheets&&e.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(e.contentDocument.adoptedStyleSheets,this.mirror.getId(e.contentDocument))}handleMessage(e){let t=e;if(t.data.type!=="rrweb"||t.origin!==t.data.origin||!e.source)return;let s=this.crossOriginIframeMap.get(e.source);if(!s)return;let n=this.transformCrossOriginEvent(s,t.data.event);n&&this.wrappedEmit(n,t.data.isCheckout)}transformCrossOriginEvent(e,t){var r;switch(t.type){case O.FullSnapshot:{this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e);let s=t.data.node.id;return this.crossOriginIframeRootIdMap.set(e,s),this.patchRootIdOnNode(t.data.node,s),{timestamp:t.timestamp,type:O.IncrementalSnapshot,data:{source:M.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case O.Meta:case O.Load:case O.DomContentLoaded:return!1;case O.Plugin:return t;case O.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case O.IncrementalSnapshot:switch(t.data.source){case M.Mutation:return t.data.adds.forEach(s=>{this.replaceIds(s,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(s.node,e);let n=this.crossOriginIframeRootIdMap.get(e);n&&this.patchRootIdOnNode(s.node,n)}),t.data.removes.forEach(s=>{this.replaceIds(s,e,["parentId","id"])}),t.data.attributes.forEach(s=>{this.replaceIds(s,e,["id"])}),t.data.texts.forEach(s=>{this.replaceIds(s,e,["id"])}),t;case M.Drag:case M.TouchMove:case M.MouseMove:return t.data.positions.forEach(s=>{this.replaceIds(s,e,["id"])}),t;case M.ViewportResize:return!1;case M.MediaInteraction:case M.MouseInteraction:case M.Scroll:case M.CanvasMutation:case M.Input:return this.replaceIds(t.data,e,["id"]),t;case M.StyleSheetRule:case M.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case M.Font:return t;case M.Selection:return t.data.ranges.forEach(s=>{this.replaceIds(s,e,["start","end"])}),t;case M.AdoptedStyleSheet:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleIds"]),(r=t.data.styles)==null||r.forEach(s=>{this.replaceStyleIds(s,e,["styleId"])}),t}}return!1}replace(e,t,r,s){for(let n of s)!Array.isArray(t[n])&&typeof t[n]!="number"||(Array.isArray(t[n])?t[n]=e.getIds(r,t[n]):t[n]=e.getId(r,t[n]));return t}replaceIds(e,t,r){return this.replace(this.crossOriginIframeMirror,e,t,r)}replaceStyleIds(e,t,r){return this.replace(this.crossOriginIframeStyleMirror,e,t,r)}replaceIdOnNode(e,t){this.replaceIds(e,t,["id","rootId"]),"childNodes"in e&&e.childNodes.forEach(r=>{this.replaceIdOnNode(r,t)})}patchRootIdOnNode(e,t){e.type!==oa.Document&&!e.rootId&&(e.rootId=t),"childNodes"in e&&e.childNodes.forEach(r=>{this.patchRootIdOnNode(r,t)})}},ki=class{constructor(e){b(this,"shadowDoms",new WeakSet),b(this,"mutationCb"),b(this,"scrollCb"),b(this,"bypassOptions"),b(this,"mirror"),b(this,"restoreHandlers",[]),this.mutationCb=e.mutationCb,this.scrollCb=e.scrollCb,this.bypassOptions=e.bypassOptions,this.mirror=e.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(e,t){if(!et(e)||this.shadowDoms.has(e))return;this.shadowDoms.add(e);let r=la(J(I({},this.bypassOptions),{doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),e);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push(ca(J(I({},this.bypassOptions),{scrollCb:this.scrollCb,doc:e,mirror:this.mirror}))),setTimeout(()=>{e.adoptedStyleSheets&&e.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,this.mirror.getId(x.host(e))),this.restoreHandlers.push(ua({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},e))},0)}observeAttachShadow(e){!e.contentWindow||!e.contentDocument||this.patchAttachShadow(e.contentWindow.Element,e.contentDocument)}patchAttachShadow(e,t){let r=this;this.restoreHandlers.push(Ae(e.prototype,"attachShadow",function(s){return function(n){let o=s.call(this,n),l=x.shadowRoot(this);return l&&sa(this)&&r.addShadowRoot(l,t),o}}))}reset(){this.restoreHandlers.forEach(e=>{try{e()}catch(t){}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}},Pe="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Kf=typeof Uint8Array=="undefined"?[]:new Uint8Array(256);for(qe=0;qe<Pe.length;qe++)Kf[Pe.charCodeAt(qe)]=qe;var qe,Xf=function(i){var e=new Uint8Array(i),t,r=e.length,s="";for(t=0;t<r;t+=3)s+=Pe[e[t]>>2],s+=Pe[(e[t]&3)<<4|e[t+1]>>4],s+=Pe[(e[t+1]&15)<<2|e[t+2]>>6],s+=Pe[e[t+2]&63];return r%3===2?s=s.substring(0,s.length-1)+"=":r%3===1&&(s=s.substring(0,s.length-2)+"=="),s};var mn=new Map;function Zf(i,e){let t=mn.get(i);return t||(t=new Map,mn.set(i,t)),t.has(e)||t.set(e,[]),t.get(e)}var ha=(i,e,t)=>{if(!i||!(da(i,e)||typeof i=="object"))return;let r=i.constructor.name,s=Zf(t,r),n=s.indexOf(i);return n===-1&&(n=s.length,s.push(i)),n};function Zt(i,e,t){if(i instanceof Array)return i.map(r=>Zt(r,e,t));if(i===null)return i;if(i instanceof Float32Array||i instanceof Float64Array||i instanceof Int32Array||i instanceof Uint32Array||i instanceof Uint8Array||i instanceof Uint16Array||i instanceof Int16Array||i instanceof Int8Array||i instanceof Uint8ClampedArray)return{rr_type:i.constructor.name,args:[Object.values(i)]};if(i instanceof ArrayBuffer){let r=i.constructor.name,s=Xf(i);return{rr_type:r,base64:s}}else{if(i instanceof DataView)return{rr_type:i.constructor.name,args:[Zt(i.buffer,e,t),i.byteOffset,i.byteLength]};if(i instanceof HTMLImageElement){let r=i.constructor.name,{src:s}=i;return{rr_type:r,src:s}}else if(i instanceof HTMLCanvasElement){let r="HTMLImageElement",s=i.toDataURL();return{rr_type:r,src:s}}else{if(i instanceof ImageData)return{rr_type:i.constructor.name,args:[Zt(i.data,e,t),i.width,i.height]};if(da(i,e)||typeof i=="object"){let r=i.constructor.name,s=ha(i,e,t);return{rr_type:r,index:s}}}}return i}var fa=(i,e,t)=>i.map(r=>Zt(r,e,t)),da=(i,e)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(s=>typeof e[s]=="function").find(s=>i instanceof e[s]);function Jf(i,e,t,r){let s=[],n=Object.getOwnPropertyNames(e.CanvasRenderingContext2D.prototype);for(let o of n)try{if(typeof e.CanvasRenderingContext2D.prototype[o]!="function")continue;let l=Ae(e.CanvasRenderingContext2D.prototype,o,function(a){return function(...c){return te(this.canvas,t,r,!0)||setTimeout(()=>{let u=fa(c,e,this);i(this.canvas,{type:Ge["2D"],property:o,args:u})},0),a.apply(this,c)}});s.push(l)}catch(l){let a=Ir(e.CanvasRenderingContext2D.prototype,o,{set(c){i(this.canvas,{type:Ge["2D"],property:o,args:[c],setter:!0})}});s.push(a)}return()=>{s.forEach(o=>o())}}function qf(i){return i==="experimental-webgl"?"webgl":i}function gn(i,e,t,r){let s=[];try{let n=Ae(i.HTMLCanvasElement.prototype,"getContext",function(o){return function(l,...a){if(!te(this,e,t,!0)){let c=qf(l);if("__context"in this||(this.__context=c),r&&["webgl","webgl2"].includes(c))if(a[0]&&typeof a[0]=="object"){let u=a[0];u.preserveDrawingBuffer||(u.preserveDrawingBuffer=!0)}else a.splice(0,1,{preserveDrawingBuffer:!0})}return o.apply(this,[l,...a])}});s.push(n)}catch(n){console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{s.forEach(n=>n())}}function yn(i,e,t,r,s,n){let o=[],l=Object.getOwnPropertyNames(i);for(let a of l)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(a))try{if(typeof i[a]!="function")continue;let c=Ae(i,a,function(u){return function(...f){let m=u.apply(this,f);if(ha(m,n,this),"tagName"in this.canvas&&!te(this.canvas,r,s,!0)){let g=fa(f,n,this),p={type:e,property:a,args:g};t(this.canvas,p)}return m}});o.push(c)}catch(c){let u=Ir(i,a,{set(f){t(this.canvas,{type:e,property:a,args:[f],setter:!0})}});o.push(u)}return o}function Qf(i,e,t,r){let s=[];return s.push(...yn(e.WebGLRenderingContext.prototype,Ge.WebGL,i,t,r,e)),typeof e.WebGL2RenderingContext!="undefined"&&s.push(...yn(e.WebGL2RenderingContext.prototype,Ge.WebGL2,i,t,r,e)),()=>{s.forEach(n=>n())}}var pa="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=",ed=i=>Uint8Array.from(atob(i),e=>e.charCodeAt(0)),bn=typeof window!="undefined"&&window.Blob&&new Blob([ed(pa)],{type:"text/javascript;charset=utf-8"});function td(i){let e;try{if(e=bn&&(window.URL||window.webkitURL).createObjectURL(bn),!e)throw"";let t=new Worker(e,{name:i==null?void 0:i.name});return t.addEventListener("error",()=>{(window.URL||window.webkitURL).revokeObjectURL(e)}),t}catch(t){return new Worker("data:text/javascript;base64,"+pa,{name:i==null?void 0:i.name})}finally{e&&(window.URL||window.webkitURL).revokeObjectURL(e)}}var _i=class{constructor(e){b(this,"pendingCanvasMutations",new Map),b(this,"rafStamps",{latestId:0,invokeId:null}),b(this,"mirror"),b(this,"mutationCb"),b(this,"resetObservers"),b(this,"frozen",!1),b(this,"locked",!1),b(this,"processMutation",(a,c)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(a)||this.pendingCanvasMutations.set(a,[]),this.pendingCanvasMutations.get(a).push(c)});let{sampling:t="all",win:r,blockClass:s,blockSelector:n,recordCanvas:o,dataURLOptions:l}=e;this.mutationCb=e.mutationCb,this.mirror=e.mirror,o&&t==="all"&&this.initCanvasMutationObserver(r,s,n),o&&typeof t=="number"&&this.initCanvasFPSObserver(t,r,s,n,{dataURLOptions:l})}reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}initCanvasFPSObserver(e,t,r,s,n){let o=gn(t,r,s,!0),l=new Map,a=new td;a.onmessage=p=>{let{id:d}=p.data;if(l.set(d,!1),!("base64"in p.data))return;let{base64:h,type:w,width:v,height:y}=p.data;this.mutationCb({id:d,type:Ge["2D"],commands:[{property:"clearRect",args:[0,0,v,y]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:h}],type:w}]},0,0]}]})};let c=1e3/e,u=0,f,m=()=>{let p=[];return t.document.querySelectorAll("canvas").forEach(d=>{te(d,r,s,!0)||p.push(d)}),p},g=p=>{if(u&&p-u<c){f=requestAnimationFrame(g);return}u=p,m().forEach(async d=>{var h;let w=this.mirror.getId(d);if(l.get(w)||d.width===0||d.height===0)return;if(l.set(w,!0),["webgl","webgl2"].includes(d.__context)){let y=d.getContext(d.__context);((h=y==null?void 0:y.getContextAttributes())==null?void 0:h.preserveDrawingBuffer)===!1&&y.clear(y.COLOR_BUFFER_BIT)}let v=await createImageBitmap(d);a.postMessage({id:w,bitmap:v,width:d.width,height:d.height,dataURLOptions:n.dataURLOptions},[v])}),f=requestAnimationFrame(g)};f=requestAnimationFrame(g),this.resetObservers=()=>{o(),cancelAnimationFrame(f)}}initCanvasMutationObserver(e,t,r){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();let s=gn(e,t,r,!1),n=Jf(this.processMutation.bind(this),e,t,r),o=Qf(this.processMutation.bind(this),e,t,r);this.resetObservers=()=>{s(),n(),o()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){let e=t=>{this.rafStamps.latestId=t,requestAnimationFrame(e)};requestAnimationFrame(e)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((e,t)=>{let r=this.mirror.getId(t);this.flushPendingCanvasMutationFor(t,r)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(e,t){if(this.frozen||this.locked)return;let r=this.pendingCanvasMutations.get(e);if(!r||t===-1)return;let s=r.map(o=>{let c=o,{type:l}=c;return De(c,["type"])}),{type:n}=r[0];this.mutationCb({id:t,type:n,commands:s}),this.pendingCanvasMutations.delete(e)}},Li=class{constructor(e){b(this,"trackedLinkElements",new WeakSet),b(this,"mutationCb"),b(this,"adoptedStyleSheetCb"),b(this,"styleMirror",new Mi),this.mutationCb=e.mutationCb,this.adoptedStyleSheetCb=e.adoptedStyleSheetCb}attachLinkElement(e,t){"_cssText"in t.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:t.attributes}]}),this.trackLinkElement(e)}trackLinkElement(e){this.trackedLinkElements.has(e)||(this.trackedLinkElements.add(e),this.trackStylesheetInLinkElement(e))}adoptStyleSheets(e,t){if(e.length===0)return;let r={id:t,styleIds:[]},s=[];for(let n of e){let o;this.styleMirror.has(n)?o=this.styleMirror.getId(n):(o=this.styleMirror.add(n),s.push({styleId:o,rules:Array.from(n.rules||CSSRule,(l,a)=>({rule:Cn(l,n.href),index:a}))})),r.styleIds.push(o)}s.length>0&&(r.styles=s),this.adoptedStyleSheetCb(r)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}},$i=class{constructor(){b(this,"nodeMap",new WeakMap),b(this,"active",!1)}inOtherBuffer(e,t){let r=this.nodeMap.get(e);return r&&Array.from(r).some(s=>s!==t)}add(e,t){this.active||(this.active=!0,requestAnimationFrame(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(t))}destroy(){}},j,Jt,Hr,fr=!1;try{if(Array.from([1],i=>i*2)[0]!==2){let i=document.createElement("iframe");document.body.appendChild(i),Array.from=((vs=i.contentWindow)==null?void 0:vs.Array.from)||Array.from,document.body.removeChild(i)}}catch(i){console.debug("Unable to override Array.from",i)}var le=Ka();function Se(i={}){let{emit:e,checkoutEveryNms:t,checkoutEveryNth:r,blockClass:s="rr-block",blockSelector:n=null,ignoreClass:o="rr-ignore",ignoreSelector:l=null,maskTextClass:a="rr-mask",maskTextSelector:c=null,inlineStylesheet:u=!0,maskAllInputs:f,maskInputOptions:m,slimDOMOptions:g,maskInputFn:p,maskTextFn:d,hooks:h,packFn:w,sampling:v={},dataURLOptions:y={},mousemoveWait:S,recordDOM:E=!0,recordCanvas:A=!1,recordCrossOriginIframes:$=!1,recordAfter:D=i.recordAfter==="DOMContentLoaded"?i.recordAfter:"load",userTriggeredOnInput:P=!1,collectFonts:H=!1,inlineImages:se=!1,plugins:re,keepIframeSrcFn:R=()=>!1,ignoreCSSAttributes:He=new Set([]),errorHandler:Ye,captureElementContext:Z=!1,elementContextOptions:ve={}}=i;kf(Ye);let Ce=$?window.parent===window:!0,ne=!1;if(!Ce)try{window.parent.document&&(ne=!1)}catch(T){ne=!0}if(Ce&&!e)throw new Error("emit function is required");if(!Ce&&!ne)return()=>{};S!==void 0&&v.mousemove===void 0&&(v.mousemove=S),le.reset();let Rr=f===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:m!==void 0?m:{password:!0},Mr=Nn(g),ma=I({maxTextLength:500,includeOuterHTML:!0,outerHTMLDepth:2,includeInputValues:!0},ve);mf();let ms,Nr=0,gs=T=>{for(let ae of re||[])ae.eventProcessor&&(T=ae.eventProcessor(T));return w&&!ne&&(T=w(T)),T};j=(T,ae)=>{var V;let G=T;if(G.timestamp=cr(),(V=Re[0])!=null&&V.isFrozen()&&G.type!==O.FullSnapshot&&!(G.type===O.IncrementalSnapshot&&G.data.source===M.Mutation)&&Re.forEach(ie=>ie.unfreeze()),Ce)e==null||e(gs(G),ae);else if(ne){let ie={type:"rrweb",event:gs(G),origin:window.location.origin,isCheckout:ae};window.parent.postMessage(ie,"*")}if(G.type===O.FullSnapshot)ms=G,Nr=0;else if(G.type===O.IncrementalSnapshot){if(G.data.source===M.Mutation&&G.data.isAttachIframe)return;Nr++;let ie=r&&Nr>=r,L=t&&G.timestamp-ms.timestamp>t;(ie||L)&&Jt(!0)}};let wt=T=>{j({type:O.IncrementalSnapshot,data:I({source:M.Mutation},T)})},ys=T=>j({type:O.IncrementalSnapshot,data:I({source:M.Scroll},T)}),bs=T=>j({type:O.IncrementalSnapshot,data:I({source:M.CanvasMutation},T)}),ga=T=>j({type:O.IncrementalSnapshot,data:I({source:M.AdoptedStyleSheet},T)}),Ee=new Li({mutationCb:wt,adoptedStyleSheetCb:ga}),xe=new Ti({mirror:le,mutationCb:wt,stylesheetManager:Ee,recordCrossOriginIframes:$,wrappedEmit:j});for(let T of re||[])T.getMirror&&T.getMirror({nodeMirror:le,crossOriginIframeMirror:xe.crossOriginIframeMirror,crossOriginIframeStyleMirror:xe.crossOriginIframeStyleMirror});let Or=new $i;Hr=new _i({recordCanvas:A,mutationCb:bs,win:window,blockClass:s,blockSelector:n,mirror:le,sampling:v.canvas,dataURLOptions:y});let St=new ki({mutationCb:wt,scrollCb:ys,bypassOptions:{blockClass:s,blockSelector:n,maskTextClass:a,maskTextSelector:c,inlineStylesheet:u,maskInputOptions:Rr,dataURLOptions:y,maskTextFn:d,maskInputFn:p,recordCanvas:A,inlineImages:se,sampling:v,slimDOMOptions:Mr,iframeManager:xe,stylesheetManager:Ee,canvasManager:Hr,keepIframeSrcFn:R,processedNodeManager:Or},mirror:le});Jt=(T=!1)=>{if(!E)return;j({type:O.Meta,data:{href:window.location.href,width:qo(),height:Jo()}},T),Ee.reset(),St.init(),Re.forEach(V=>V.lock());let ae=bl(document,{mirror:le,blockClass:s,blockSelector:n,maskTextClass:a,maskTextSelector:c,inlineStylesheet:u,maskAllInputs:Rr,maskTextFn:d,maskInputFn:p,slimDOM:Mr,dataURLOptions:y,recordCanvas:A,inlineImages:se,onSerialize:V=>{ta(V,le)&&xe.addIframe(V),ra(V,le)&&Ee.trackLinkElement(V),Ri(V)&&St.addShadowRoot(x.shadowRoot(V),document)},onIframeLoad:(V,G)=>{xe.attachIframe(V,G),St.observeAttachShadow(V)},onStylesheetLoad:(V,G)=>{Ee.attachLinkElement(V,G)},keepIframeSrcFn:R});if(!ae)return console.warn("Failed to snapshot the document");j({type:O.FullSnapshot,data:{node:ae,initialOffset:Zo(window)}},T),Re.forEach(V=>V.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&Ee.adoptStyleSheets(document.adoptedStyleSheets,le.getId(document))};try{let T=[],ae=G=>{var ie;return N(Yf)({mutationCb:wt,mousemoveCb:(L,Ar)=>j({type:O.IncrementalSnapshot,data:{source:Ar,positions:L}}),mouseInteractionCb:L=>j({type:O.IncrementalSnapshot,data:I({source:M.MouseInteraction},L)}),scrollCb:ys,viewportResizeCb:L=>j({type:O.IncrementalSnapshot,data:I({source:M.ViewportResize},L)}),inputCb:L=>j({type:O.IncrementalSnapshot,data:I({source:M.Input},L)}),mediaInteractionCb:L=>j({type:O.IncrementalSnapshot,data:I({source:M.MediaInteraction},L)}),styleSheetRuleCb:L=>j({type:O.IncrementalSnapshot,data:I({source:M.StyleSheetRule},L)}),styleDeclarationCb:L=>j({type:O.IncrementalSnapshot,data:I({source:M.StyleDeclaration},L)}),canvasMutationCb:bs,fontCb:L=>j({type:O.IncrementalSnapshot,data:I({source:M.Font},L)}),selectionCb:L=>{j({type:O.IncrementalSnapshot,data:I({source:M.Selection},L)})},customElementCb:L=>{j({type:O.IncrementalSnapshot,data:I({source:M.CustomElement},L)})},blockClass:s,ignoreClass:o,ignoreSelector:l,maskTextClass:a,maskTextSelector:c,maskInputOptions:Rr,inlineStylesheet:u,sampling:v,recordDOM:E,recordCanvas:A,inlineImages:se,userTriggeredOnInput:P,collectFonts:H,doc:G,maskInputFn:p,maskTextFn:d,keepIframeSrcFn:R,blockSelector:n,slimDOMOptions:Mr,dataURLOptions:y,mirror:le,iframeManager:xe,stylesheetManager:Ee,shadowDomManager:St,processedNodeManager:Or,canvasManager:Hr,ignoreCSSAttributes:He,captureElementContext:Z,elementContextOptions:ma,plugins:((ie=re==null?void 0:re.filter(L=>L.observer))==null?void 0:ie.map(L=>({observer:L.observer,options:L.options,callback:Ar=>j({type:O.Plugin,data:{plugin:L.name,payload:Ar}})})))||[]},h)};xe.addLoadListener(G=>{try{T.push(ae(G.contentDocument))}catch(ie){console.warn(ie)}});let V=()=>{Jt(),T.push(ae(document)),fr=!0};return["interactive","complete"].includes(document.readyState)?V():(T.push(ee("DOMContentLoaded",()=>{j({type:O.DomContentLoaded,data:{}}),D==="DOMContentLoaded"&&V()})),T.push(ee("load",()=>{j({type:O.Load,data:{}}),D==="load"&&V()},window))),()=>{T.forEach(G=>{try{G()}catch(ie){String(ie).toLowerCase().includes("cross-origin")||console.warn(ie)}}),Or.destroy(),fr=!1,_f()}}catch(T){console.warn(T)}}Se.addCustomEvent=(i,e)=>{if(!fr)throw new Error("please add custom event after start recording");j({type:O.Custom,data:{tag:i,payload:e}})};Se.freezePage=()=>{Re.forEach(i=>i.freeze())};Se.takeFullSnapshot=i=>{if(!fr)throw new Error("please take full snapshot after start recording");Jt(i)};Se.mirror=le;var wn;(function(i){i[i.NotStarted=0]="NotStarted",i[i.Running=1]="Running",i[i.Stopped=2]="Stopped"})(wn||(wn={}));var Fd=5*1e3;var{addCustomEvent:Bd}=Se,{freezePage:Ud}=Se,{takeFullSnapshot:zd}=Se;var X={DISTINCT_ID:"bentolabs_distinct_id",SUPER_PROPERTIES:"bentolabs_super_properties",OPTED_OUT:"bentolabs_opted_out",USER_PROPERTIES:"bentolabs_user_properties",IS_IDENTIFIED:"bentolabs_is_identified"},us=class{constructor(e){this.mode=e,this.memoryStorage=new Map}get(e){if(this.mode==="none")return null;if(this.mode==="memory")return this.memoryStorage.get(e)||null;if(this.mode==="localStorage"||this.mode==="localStorage+cookie")try{let t=localStorage.getItem(e);if(t!==null)return t}catch(t){}if(this.mode==="cookie"||this.mode==="localStorage+cookie")try{let t=document.cookie.split(";");for(let r of t){let[s,n]=r.trim().split("=");if(s===e)return decodeURIComponent(n)}}catch(t){}return null}set(e,t){if(this.mode!=="none"){if(this.mode==="memory"){this.memoryStorage.set(e,t);return}if(this.mode==="localStorage"||this.mode==="localStorage+cookie")try{localStorage.setItem(e,t)}catch(r){}if(this.mode==="cookie"||this.mode==="localStorage+cookie")try{let r=new Date;r.setFullYear(r.getFullYear()+1),document.cookie=`${e}=${encodeURIComponent(t)};expires=${r.toUTCString()};path=/;SameSite=Lax`}catch(r){}}}remove(e){if(this.mode!=="none"){if(this.mode==="memory"){this.memoryStorage.delete(e);return}if(this.mode==="localStorage"||this.mode==="localStorage+cookie")try{localStorage.removeItem(e)}catch(t){}if(this.mode==="cookie"||this.mode==="localStorage+cookie")try{document.cookie=`${e}=;expires=Thu, 01 Jan 1970 00:00:00 GMT;path=/`}catch(t){}}}clear(){if(this.mode==="memory"){this.memoryStorage.clear();return}Object.values(X).forEach(e=>this.remove(e))}},hs=class{constructor(e,t){this.logs=[];this.originalFetch=null;this.originalXHROpen=null;this.originalXHRSend=null;this.isMonitoring=!1;var r,s,n,o;this.options={skipUrls:e.skipUrls||["api.bentolabs.ai"],captureHeaders:(r=e.captureHeaders)!=null?r:!1,captureBody:(s=e.captureBody)!=null?s:!1,maxBodySize:(n=e.maxBodySize)!=null?n:5e3,sampleRate:(o=e.sampleRate)!=null?o:1},this.onCapture=t}start(){this.isMonitoring||typeof window=="undefined"||(this.isMonitoring=!0,this.interceptFetch(),this.interceptXHR())}stop(){this.isMonitoring&&(this.isMonitoring=!1,this.restoreFetch(),this.restoreXHR())}getLogs(){return[...this.logs]}clearLogs(){this.logs=[]}shouldSkip(e){return this.options.skipUrls.some(t=>e.includes(t))}shouldSample(){return Math.random()<this.options.sampleRate}sanitizeUrl(e){try{let t=new URL(e,window.location.origin);return["token","key","secret","password","auth","apikey","api_key"].forEach(s=>{t.searchParams.has(s)&&t.searchParams.set(s,"[REDACTED]")}),t.toString()}catch(t){return e}}interceptFetch(){if(typeof fetch=="undefined")return;this.originalFetch=fetch.bind(window);let e=this;window.fetch=async function(t,r){let s=typeof t=="string"?t:t instanceof URL?t.toString():t.url;if(e.shouldSkip(s)||!e.shouldSample())return e.originalFetch(t,r);let n=Date.now(),o=(r==null?void 0:r.method)||"GET";try{let l=await e.originalFetch(t,r),a=Date.now()-n,c={url:e.sanitizeUrl(s),method:o.toUpperCase(),status:l.status,duration:a,responseSize:parseInt(l.headers.get("content-length")||"0",10),initiator:"fetch",timestamp:Date.now()};return e.logs.push(c),e.logs.length>500&&e.logs.shift(),e.onCapture(c),l}catch(l){let a=Date.now()-n,c={url:e.sanitizeUrl(s),method:o.toUpperCase(),status:0,duration:a,responseSize:0,initiator:"fetch",error:l instanceof Error?l.message:"Unknown error",timestamp:Date.now()};throw e.logs.push(c),e.logs.length>500&&e.logs.shift(),e.onCapture(c),l}}}restoreFetch(){this.originalFetch&&typeof window!="undefined"&&(window.fetch=this.originalFetch,this.originalFetch=null)}interceptXHR(){if(typeof XMLHttpRequest=="undefined")return;this.originalXHROpen=XMLHttpRequest.prototype.open,this.originalXHRSend=XMLHttpRequest.prototype.send;let e=this;XMLHttpRequest.prototype.open=function(t,r,s,n,o){return this._bentoUrl=r.toString(),this._bentoMethod=t,this._bentoStartTime=0,e.originalXHROpen.call(this,t,r,s!=null?s:!0,n,o)},XMLHttpRequest.prototype.send=function(t){let r=this,s=r._bentoUrl;if(e.shouldSkip(s)||!e.shouldSample())return e.originalXHRSend.call(this,t);r._bentoStartTime=Date.now();let n=()=>{let o=Date.now()-r._bentoStartTime,l={url:e.sanitizeUrl(s),method:r._bentoMethod.toUpperCase(),status:r.status,duration:o,responseSize:parseInt(r.getResponseHeader("content-length")||"0",10),initiator:"xhr",timestamp:Date.now()};r.status===0&&(l.error="Request failed or was aborted"),e.logs.push(l),e.logs.length>500&&e.logs.shift(),e.onCapture(l)};return r.addEventListener("loadend",n),e.originalXHRSend.call(this,t)}}restoreXHR(){this.originalXHROpen&&(XMLHttpRequest.prototype.open=this.originalXHROpen,this.originalXHROpen=null),this.originalXHRSend&&(XMLHttpRequest.prototype.send=this.originalXHRSend,this.originalXHRSend=null)}},fs=class{constructor(e,t){this.logs=[];this.isMonitoring=!1;this.originalLocalStorage=null;this.originalSessionStorage=null;this.originalCookieDescriptor=null;var r,s,n;this.options={localStorage:(r=e.localStorage)!=null?r:!0,sessionStorage:(s=e.sessionStorage)!=null?s:!0,cookies:(n=e.cookies)!=null?n:!0,sensitiveKeys:e.sensitiveKeys||["password","token","secret","api_key","apikey","auth","credential"]},this.onCapture=t}start(){this.isMonitoring||typeof window=="undefined"||(this.isMonitoring=!0,this.options.localStorage&&this.interceptLocalStorage(),this.options.sessionStorage&&this.interceptSessionStorage(),this.options.cookies&&this.interceptCookies())}stop(){this.isMonitoring&&(this.isMonitoring=!1,this.restoreLocalStorage(),this.restoreSessionStorage(),this.restoreCookies())}getLogs(){return[...this.logs]}clearLogs(){this.logs=[]}isSensitiveKey(e){let t=e.toLowerCase();return this.options.sensitiveKeys.some(r=>t.includes(r.toLowerCase()))}addLog(e){this.isSensitiveKey(e.key)||e.key.startsWith("bentolabs_")||(this.logs.push(e),this.logs.length>500&&this.logs.shift(),this.onCapture(e))}interceptLocalStorage(){if(typeof localStorage=="undefined")return;let e=this;this.originalLocalStorage={setItem:localStorage.setItem.bind(localStorage),getItem:localStorage.getItem.bind(localStorage),removeItem:localStorage.removeItem.bind(localStorage),clear:localStorage.clear.bind(localStorage)},localStorage.setItem=function(t,r){return e.addLog({storageType:"localStorage",operation:"set",key:t,valueType:typeof r,timestamp:Date.now()}),e.originalLocalStorage.setItem(t,r)},localStorage.getItem=function(t){return e.addLog({storageType:"localStorage",operation:"get",key:t,timestamp:Date.now()}),e.originalLocalStorage.getItem(t)},localStorage.removeItem=function(t){return e.addLog({storageType:"localStorage",operation:"remove",key:t,timestamp:Date.now()}),e.originalLocalStorage.removeItem(t)},localStorage.clear=function(){return e.addLog({storageType:"localStorage",operation:"clear",key:"*",timestamp:Date.now()}),e.originalLocalStorage.clear()}}restoreLocalStorage(){this.originalLocalStorage&&typeof localStorage!="undefined"&&(localStorage.setItem=this.originalLocalStorage.setItem,localStorage.getItem=this.originalLocalStorage.getItem,localStorage.removeItem=this.originalLocalStorage.removeItem,localStorage.clear=this.originalLocalStorage.clear,this.originalLocalStorage=null)}interceptSessionStorage(){if(typeof sessionStorage=="undefined")return;let e=this;this.originalSessionStorage={setItem:sessionStorage.setItem.bind(sessionStorage),getItem:sessionStorage.getItem.bind(sessionStorage),removeItem:sessionStorage.removeItem.bind(sessionStorage),clear:sessionStorage.clear.bind(sessionStorage)},sessionStorage.setItem=function(t,r){return e.addLog({storageType:"sessionStorage",operation:"set",key:t,valueType:typeof r,timestamp:Date.now()}),e.originalSessionStorage.setItem(t,r)},sessionStorage.getItem=function(t){return e.addLog({storageType:"sessionStorage",operation:"get",key:t,timestamp:Date.now()}),e.originalSessionStorage.getItem(t)},sessionStorage.removeItem=function(t){return e.addLog({storageType:"sessionStorage",operation:"remove",key:t,timestamp:Date.now()}),e.originalSessionStorage.removeItem(t)},sessionStorage.clear=function(){return e.addLog({storageType:"sessionStorage",operation:"clear",key:"*",timestamp:Date.now()}),e.originalSessionStorage.clear()}}restoreSessionStorage(){this.originalSessionStorage&&typeof sessionStorage!="undefined"&&(sessionStorage.setItem=this.originalSessionStorage.setItem,sessionStorage.getItem=this.originalSessionStorage.getItem,sessionStorage.removeItem=this.originalSessionStorage.removeItem,sessionStorage.clear=this.originalSessionStorage.clear,this.originalSessionStorage=null)}interceptCookies(){if(typeof document=="undefined")return;let e=this,t=Object.getOwnPropertyDescriptor(Document.prototype,"cookie");t&&(this.originalCookieDescriptor=t,Object.defineProperty(document,"cookie",{get:function(){return e.originalCookieDescriptor.get.call(this)},set:function(r){let s=r.split("=")[0].trim();return e.addLog({storageType:"cookie",operation:"set",key:s,timestamp:Date.now()}),e.originalCookieDescriptor.set.call(this,r)},configurable:!0}))}restoreCookies(){this.originalCookieDescriptor&&typeof document!="undefined"&&(Object.defineProperty(document,"cookie",this.originalCookieDescriptor),this.originalCookieDescriptor=null)}},ds=class{constructor(e,t){this.logs=[];this.isMonitoring=!1;this.inStack=!1;this.originalConsole=null;this.originalOnError=null;this.originalOnUnhandledRejection=null;var r,s,n;this.options={levels:e.levels||["log","warn","error","info"],maxLogs:(r=e.maxLogs)!=null?r:500,maxPayloadSize:(s=e.maxPayloadSize)!=null?s:5e3,captureStackTrace:(n=e.captureStackTrace)!=null?n:!0},this.onCapture=t}start(){this.isMonitoring||typeof console=="undefined"||(this.isMonitoring=!0,this.interceptConsole(),this.interceptGlobalErrors())}stop(){this.isMonitoring&&(this.isMonitoring=!1,this.restoreConsole(),this.restoreGlobalErrors())}getLogs(){return[...this.logs]}clearLogs(){this.logs=[]}stringifyArg(e,t=new WeakSet){if(e===null)return"null";if(e===void 0)return"undefined";let r=typeof e;if(r==="string")return e;if(r==="number"||r==="boolean")return String(e);if(r==="function")return`[Function: ${e.name||"anonymous"}]`;if(r==="symbol")return e.toString();if(r==="object"){if(t.has(e))return"[Circular]";if(t.add(e),e instanceof Error)return`${e.name}: ${e.message}`;try{let s=JSON.stringify(e,(n,o)=>{if(typeof o=="object"&&o!==null){if(t.has(o))return"[Circular]";t.add(o)}return typeof o=="function"?`[Function: ${o.name||"anonymous"}]`:typeof o=="symbol"?o.toString():o});return s.length>this.options.maxPayloadSize?s.slice(0,this.options.maxPayloadSize)+"...":s}catch(s){return"[Object]"}}return String(e)}getStackTrace(){if(!this.options.captureStackTrace)return[];try{return(new Error().stack||"").split(`
54
+ `).slice(3).slice(0,5).map(r=>r.trim())}catch(e){return[]}}addLog(e,t){if(!this.inStack){this.inStack=!0;try{let r=t.map(n=>this.stringifyArg(n)),s={level:e,payload:r,trace:this.getStackTrace(),timestamp:Date.now()};this.logs.push(s),this.logs.length>this.options.maxLogs&&this.logs.shift(),this.onCapture(s)}finally{this.inStack=!1}}}interceptConsole(){let e=this;this.originalConsole={log:console.log.bind(console),warn:console.warn.bind(console),error:console.error.bind(console),info:console.info.bind(console),debug:console.debug.bind(console)};let t=this.options.levels;t.includes("log")&&(console.log=function(...r){return e.addLog("log",r),e.originalConsole.log(...r)}),t.includes("warn")&&(console.warn=function(...r){return e.addLog("warn",r),e.originalConsole.warn(...r)}),t.includes("error")&&(console.error=function(...r){return e.addLog("error",r),e.originalConsole.error(...r)}),t.includes("info")&&(console.info=function(...r){return e.addLog("info",r),e.originalConsole.info(...r)}),t.includes("debug")&&(console.debug=function(...r){return e.addLog("debug",r),e.originalConsole.debug(...r)})}restoreConsole(){this.originalConsole&&(console.log=this.originalConsole.log,console.warn=this.originalConsole.warn,console.error=this.originalConsole.error,console.info=this.originalConsole.info,console.debug=this.originalConsole.debug,this.originalConsole=null)}interceptGlobalErrors(){if(typeof window=="undefined")return;let e=this;this.originalOnError=window.onerror,window.onerror=function(t,r,s,n,o){return e.addLog("error",[`Uncaught error: ${t}`,`at ${r}:${s}:${n}`,(o==null?void 0:o.stack)||""]),e.originalOnError&&typeof e.originalOnError=="function"?e.originalOnError(t,r,s,n,o):!1},this.originalOnUnhandledRejection=window.onunhandledrejection,window.onunhandledrejection=function(t){e.addLog("error",[`Unhandled promise rejection: ${e.stringifyArg(t.reason)}`]),e.originalOnUnhandledRejection&&e.originalOnUnhandledRejection(t)}}restoreGlobalErrors(){typeof window!="undefined"&&(this.originalOnError!==null&&(window.onerror=this.originalOnError,this.originalOnError=null),this.originalOnUnhandledRejection!==null&&(window.onunhandledrejection=this.originalOnUnhandledRejection,this.originalOnUnhandledRejection=null))}},ps=class{constructor(e){this.sdk=e}set(e){this.sdk.capture("$set",{$set:e})}setOnce(e){this.sdk.capture("$set",{$set_once:e})}unset(e){this.sdk.capture("$set",{$unset:e})}},xr=class{constructor(){this.config={apiKey:"",endpoint:"",debug:!1,batchSize:50,batchInterval:1e4,enableRecording:!0,maxRetries:3,baseRetryDelay:1e3,enableCompression:!0,persistence:"localStorage+cookie",respect_dnt:!1,autocapture:!0,capture_pageview:!0,capture_pageleave:!0,capture_network:!0,networkOptions:{skipUrls:["api.bentolabs.ai"],captureHeaders:!1,captureBody:!1,maxBodySize:5e3,sampleRate:1},capture_storage:!0,storageOptions:{localStorage:!0,sessionStorage:!0,cookies:!0,sensitiveKeys:["password","token","secret","api_key","apikey","auth","credential"]},capture_console:!0,consoleOptions:{levels:["log","warn","error","info"],maxLogs:500,maxPayloadSize:5e3,captureStackTrace:!0}},this.sessionId="",this.events=[],this.isRecording=!1,this.batchTimer=null,this.retryTimer=null,this.isSending=!1,this.stopRecordingFn=null,this.distinctId="",this.identity={distinctId:null,properties:{},isIdentified:!1},this.superProperties={},this.persistence=null,this.initialized=!1,this.optedOut=!1,this.networkMonitor=null,this.storageMonitor=null,this.consoleMonitor=null,this.people=new ps(this),this.autocaptureCleanup=null}init(e,t){var n,o,l;(this.isRecording||this.stopRecordingFn)&&this.stopRecordingInternal();let r={endpoint:"https://api.bentolabs.ai",debug:!1,batchSize:100,batchInterval:5e3,enableRecording:!0,maxRetries:3,baseRetryDelay:1e3,enableCompression:!0,persistence:"localStorage+cookie",respect_dnt:!1,autocapture:!0,capture_pageview:!0,capture_pageleave:!0,capture_network:!0,networkOptions:{skipUrls:["api.bentolabs.ai"],captureHeaders:!1,captureBody:!1,maxBodySize:5e3,sampleRate:1},capture_storage:!0,storageOptions:{localStorage:!0,sessionStorage:!0,cookies:!0,sensitiveKeys:["password","token","secret","api_key","apikey","auth","credential"]},capture_console:!0,consoleOptions:{levels:["log","warn","error","info"],maxLogs:500,maxPayloadSize:5e3,captureStackTrace:!0}},s=J(I(I({},r),t),{networkOptions:I(I({},r.networkOptions),t==null?void 0:t.networkOptions),storageOptions:I(I({},r.storageOptions),t==null?void 0:t.storageOptions),consoleOptions:I(I({},r.consoleOptions),t==null?void 0:t.consoleOptions)});this.config={apiKey:e,endpoint:s.endpoint,debug:s.debug,batchSize:s.batchSize,batchInterval:s.batchInterval,enableRecording:s.enableRecording,maxRetries:s.maxRetries,baseRetryDelay:s.baseRetryDelay,enableCompression:(n=s.enableCompression)!=null?n:!0,persistence:s.persistence,respect_dnt:s.respect_dnt,autocapture:s.autocapture,capture_pageview:s.capture_pageview,capture_pageleave:s.capture_pageleave,capture_network:s.capture_network,networkOptions:s.networkOptions,capture_storage:s.capture_storage,storageOptions:s.storageOptions,capture_console:s.capture_console,consoleOptions:s.consoleOptions,bootstrap:s.bootstrap},this.config.respect_dnt&&this.isDNTEnabled()&&(this.config.debug&&console.log("[BentoLabsSDK] Do Not Track is enabled, opting out"),this.optedOut=!0),this.persistence=new us(this.config.persistence),this.loadPersistedState(),(o=this.config.bootstrap)!=null&&o.distinctID&&(this.distinctId=this.config.bootstrap.distinctID,this.identity.distinctId=this.config.bootstrap.distinctID,this.identity.isIdentified=(l=this.config.bootstrap.isIdentifiedID)!=null?l:!1,this.persistence.set(X.DISTINCT_ID,this.distinctId),this.identity.isIdentified&&this.persistence.set(X.IS_IDENTIFIED,"true")),this.distinctId||(this.distinctId=this.generateAnonymousId(),this.persistence.set(X.DISTINCT_ID,this.distinctId)),this.sessionId=this.generateSessionId(),this.initialized=!0,this.config.debug&&console.log("[BentoLabsSDK] Initialized with config:",{apiKey:e.substring(0,8)+"...",endpoint:this.config.endpoint,debug:this.config.debug,sessionId:this.sessionId,distinctId:this.distinctId}),this.startRecording(),this.startBatching(),this.config.autocapture&&this.setupAutocapture(),this.config.capture_pageview&&this.capture("$pageview",{$current_url:typeof window!="undefined"?window.location.href:"",$pathname:typeof window!="undefined"?window.location.pathname:"",$referrer:typeof document!="undefined"?document.referrer:""}),this.config.capture_pageleave&&typeof window!="undefined"&&window.addEventListener("beforeunload",this.handlePageLeave.bind(this)),this.config.capture_network&&this.startNetworkCapture(),this.config.capture_storage&&this.startStorageCapture(),this.config.capture_console&&this.startConsoleCapture()}identify(e,t){var s,n,o;if(!this.initialized){console.warn("[BentoLabsSDK] Cannot identify: SDK not initialized");return}let r=this.distinctId;this.distinctId=e,this.identity.distinctId=e,this.identity.isIdentified=!0,t&&(this.identity.properties=I(I({},this.identity.properties),t)),(s=this.persistence)==null||s.set(X.DISTINCT_ID,e),(n=this.persistence)==null||n.set(X.IS_IDENTIFIED,"true"),t&&((o=this.persistence)==null||o.set(X.USER_PROPERTIES,JSON.stringify(this.identity.properties))),this.capture("$identify",I({$anon_distinct_id:r},t)),this.config.debug&&console.log("[BentoLabsSDK] Identified user:",e)}reset(){var e,t;this.initialized&&(this.distinctId=this.generateAnonymousId(),this.identity={distinctId:null,properties:{},isIdentified:!1},this.superProperties={},(e=this.persistence)==null||e.clear(),(t=this.persistence)==null||t.set(X.DISTINCT_ID,this.distinctId),this.config.debug&&console.log("[BentoLabsSDK] Reset to anonymous:",this.distinctId))}getDistinctId(){return this.distinctId}register(e){var t;this.superProperties=I(I({},this.superProperties),e),(t=this.persistence)==null||t.set(X.SUPER_PROPERTIES,JSON.stringify(this.superProperties)),this.config.debug&&console.log("[BentoLabsSDK] Registered super properties:",e)}registerOnce(e){let t={};for(let[r,s]of Object.entries(e))r in this.superProperties||(t[r]=s);Object.keys(t).length>0&&this.register(t)}unregister(e){var t;delete this.superProperties[e],(t=this.persistence)==null||t.set(X.SUPER_PROPERTIES,JSON.stringify(this.superProperties)),this.config.debug&&console.log("[BentoLabsSDK] Unregistered super property:",e)}capture(e,t){if(!this.initialized){console.warn("[BentoLabsSDK] Cannot capture event: SDK not initialized");return}if(this.optedOut){this.config.debug&&console.log("[BentoLabsSDK] Event not captured (opted out):",e);return}let r={event:e,properties:J(I(I({},this.superProperties),t),{$current_url:typeof window!="undefined"?window.location.href:"",$pathname:typeof window!="undefined"?window.location.pathname:""}),$timestamp:Date.now(),$session_id:this.sessionId,$distinct_id:this.distinctId};this.addEvent({timestamp:r.$timestamp,type:`capture:${e}`,data:r,sessionId:this.sessionId}),this.config.debug&&console.log("[BentoLabsSDK] Captured event:",e,t)}trackCustomEvent(e,t){if(!this.sessionId){console.warn("[BentoLabsSDK] Cannot track event: SDK not initialized");return}this.capture(`custom:${e}`,t)}opt_out_capturing(){var e;this.optedOut=!0,(e=this.persistence)==null||e.set(X.OPTED_OUT,"true"),this.isRecording&&this.stopRecordingInternal(),this.stopNetworkCapture(),this.stopStorageCapture(),this.stopConsoleCapture(),this.config.debug&&console.log("[BentoLabsSDK] Opted out of capturing")}opt_in_capturing(){var e;this.optedOut=!1,(e=this.persistence)==null||e.remove(X.OPTED_OUT),this.initialized&&this.config.enableRecording&&this.startRecording(),this.config.capture_network&&this.startNetworkCapture(),this.config.capture_storage&&this.startStorageCapture(),this.config.capture_console&&this.startConsoleCapture(),this.config.debug&&console.log("[BentoLabsSDK] Opted back into capturing")}has_opted_out_capturing(){return this.optedOut}has_opted_in_capturing(){return!this.optedOut}startNetworkCapture(){this.networkMonitor||(this.networkMonitor=new hs(this.config.networkOptions,e=>{this.optedOut||this.capture("$network_request",e)}),this.networkMonitor.start(),this.config.debug&&console.log("[BentoLabsSDK] Network capture started"))}stopNetworkCapture(){this.networkMonitor&&(this.networkMonitor.stop(),this.networkMonitor=null,this.config.debug&&console.log("[BentoLabsSDK] Network capture stopped"))}startStorageCapture(){this.storageMonitor||(this.storageMonitor=new fs(this.config.storageOptions,e=>{this.optedOut||this.capture("$storage_event",e)}),this.storageMonitor.start(),this.config.debug&&console.log("[BentoLabsSDK] Storage capture started"))}stopStorageCapture(){this.storageMonitor&&(this.storageMonitor.stop(),this.storageMonitor=null,this.config.debug&&console.log("[BentoLabsSDK] Storage capture stopped"))}startConsoleCapture(){this.consoleMonitor||(this.consoleMonitor=new ds(this.config.consoleOptions,e=>{this.optedOut||this.capture("$console_log",e)}),this.consoleMonitor.start(),this.config.debug&&console.log("[BentoLabsSDK] Console capture started"))}stopConsoleCapture(){this.consoleMonitor&&(this.consoleMonitor.stop(),this.consoleMonitor=null,this.config.debug&&console.log("[BentoLabsSDK] Console capture stopped"))}getNetworkLogs(){var e;return((e=this.networkMonitor)==null?void 0:e.getLogs())||[]}getStorageLogs(){var e;return((e=this.storageMonitor)==null?void 0:e.getLogs())||[]}getConsoleLogs(){var e;return((e=this.consoleMonitor)==null?void 0:e.getLogs())||[]}stop(){this.config.debug&&console.log("[BentoLabsSDK] Stopping recording and batching"),this.stopRecordingInternal(),this.stopNetworkCapture(),this.stopStorageCapture(),this.stopConsoleCapture(),this.events.length>0&&this.sendBatch(),this.config.debug&&console.log("[BentoLabsSDK] Stopped successfully")}getSessionId(){return this.sessionId}isRecordingActive(){return this.isRecording}getConfig(){return{apiKey:this.config.apiKey?this.config.apiKey.substring(0,8)+"...":"",endpoint:this.config.endpoint,debug:this.config.debug,batchSize:this.config.batchSize,batchInterval:this.config.batchInterval,enableRecording:this.config.enableRecording,maxRetries:this.config.maxRetries,baseRetryDelay:this.config.baseRetryDelay,enableCompression:this.config.enableCompression,persistence:this.config.persistence,respect_dnt:this.config.respect_dnt,autocapture:this.config.autocapture,capture_pageview:this.config.capture_pageview,capture_pageleave:this.config.capture_pageleave,capture_network:this.config.capture_network,networkOptions:this.config.networkOptions,capture_storage:this.config.capture_storage,storageOptions:this.config.storageOptions,capture_console:this.config.capture_console,consoleOptions:this.config.consoleOptions}}getEventQueueLength(){return this.events.length}async flushEvents(){await this.sendBatch()}generateSessionId(){return`sess_${this.generateUUID()}`}generateAnonymousId(){return`anon_${this.generateUUID()}`}generateUUID(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){let t=Math.random()*16|0;return(e==="x"?t:t&3|8).toString(16)})}isDNTEnabled(){return typeof navigator=="undefined"?!1:navigator.doNotTrack==="1"||navigator.doNotTrack==="yes"}loadPersistedState(){if(!this.persistence)return;let e=this.persistence.get(X.DISTINCT_ID);e&&(this.distinctId=e,this.identity.distinctId=e),this.persistence.get(X.IS_IDENTIFIED)==="true"&&(this.identity.isIdentified=!0);let r=this.persistence.get(X.SUPER_PROPERTIES);if(r)try{this.superProperties=JSON.parse(r)}catch(o){this.superProperties={}}let s=this.persistence.get(X.USER_PROPERTIES);if(s)try{this.identity.properties=JSON.parse(s)}catch(o){this.identity.properties={}}this.persistence.get(X.OPTED_OUT)==="true"&&(this.optedOut=!0)}startRecording(){if(!this.config.enableRecording){this.config.debug&&console.log("[BentoLabsSDK] Recording disabled in configuration");return}if(this.optedOut){this.config.debug&&console.log("[BentoLabsSDK] Recording disabled (opted out)");return}this.config.debug&&console.log("[BentoLabsSDK] Starting recording for session:",this.sessionId);try{this.config.debug&&console.log("[BentoLabsSDK] Calling rrweb record()...");let e=Se({emit:t=>{this.config.debug&&console.log("[BentoLabsSDK] Event captured:",t.type),this.addEvent({timestamp:t.timestamp,type:t.type.toString(),data:t,sessionId:this.sessionId})},recordCanvas:!0,collectFonts:!0,plugins:[],captureElementContext:!0,elementContextOptions:{maxTextLength:500,includeOuterHTML:!0,outerHTMLDepth:2,includeInputValues:!0},maskInputOptions:{password:!0},sampling:{mousemove:!0,mouseInteraction:{click:!1,dblclick:!1},scroll:150,input:"last"},checkoutEveryNms:300*1e3});typeof e=="function"?(this.stopRecordingFn=e,this.isRecording=!0,this.config.debug&&console.log("[BentoLabsSDK] Recording started successfully")):(console.error("[BentoLabsSDK] rrweb record() did not return a stop function. Recording may not have started properly."),this.stopRecordingFn=null,this.isRecording=!1)}catch(e){console.error("[BentoLabsSDK] Failed to start recording:",e),this.isRecording=!1}}startBatching(){this.config.debug&&console.log("[BentoLabsSDK] Starting event batching"),this.batchTimer&&clearInterval(this.batchTimer),this.batchTimer=setInterval(()=>{this.sendBatch()},this.config.batchInterval),this.config.debug&&console.log(`[BentoLabsSDK] Batch timer set for ${this.config.batchInterval}ms intervals`)}addEvent(e){this.optedOut||(this.events.push(e),this.config.debug&&console.log("[BentoLabsSDK] Event added:",e.type),this.events.length>=this.config.batchSize&&!this.isSending&&(this.config.debug&&console.log(`[BentoLabsSDK] Batch size limit reached (${this.config.batchSize}), sending batch`),this.sendBatch()))}async sendBatch(){if(this.isSending){this.config.debug&&console.log("[BentoLabsSDK] Already sending, skipping batch");return}let e=Date.now(),t=this.events.filter(s=>"nextRetryTime"in s?e>=s.nextRetryTime:!0);if(t.length===0)return;this.isSending=!0,this.events=this.events.filter(s=>!t.includes(s));let r={sessionId:this.sessionId,events:t,timestamp:e,userAgent:typeof navigator!="undefined"?navigator.userAgent:"Unknown",url:typeof window!="undefined"?window.location.href:"Unknown",distinctId:this.distinctId};this.config.debug&&console.log(`[BentoLabsSDK] Sending batch with ${t.length} events`);try{let s=JSON.stringify(r),n=s,o={"Content-Type":"application/json",Authorization:`Bearer ${this.config.apiKey}`,"X-Session-ID":this.sessionId};if(this.config.enableCompression&&typeof CompressionStream!="undefined")try{let c=new TextEncoder().encode(s),u=new CompressionStream("gzip"),f=u.writable.getWriter();f.write(c),f.close();let m=[],g=u.readable.getReader(),p=await g.read();for(;!p.done;)m.push(p.value),p=await g.read();let d=m.reduce((v,y)=>v+y.length,0),h=new Uint8Array(d),w=0;for(let v of m)h.set(v,w),w+=v.length;if(n=new Blob([h],{type:"application/json"}),o["Content-Encoding"]="gzip",this.config.debug){let v=((1-h.length/c.length)*100).toFixed(1);console.log(`[BentoLabsSDK] Compressed payload: ${c.length} -> ${h.length} bytes (${v}% reduction)`)}}catch(a){this.config.debug&&console.warn("[BentoLabsSDK] Compression failed, sending uncompressed:",a)}let l=await fetch(`${this.config.endpoint}/events/`,{method:"POST",headers:o,body:n});if(!l.ok)throw new Error(`HTTP error! status: ${l.status}`);this.config.debug&&console.log("[BentoLabsSDK] Batch sent successfully")}catch(s){this.config.debug&&console.error("[BentoLabsSDK] Failed to send batch:",s);let n=t.map(a=>{let c="retryCount"in a?a.retryCount+1:1,u=this.config.baseRetryDelay*Math.pow(2,c-1);return J(I({},a),{retryCount:c,nextRetryTime:e+u})}),o=n.filter(a=>a.retryCount<=this.config.maxRetries),l=n.length-o.length;if(l>0&&this.config.debug&&console.log(`[BentoLabsSDK] Dropped ${l} events after max retries`),o.length>0&&(this.events.unshift(...o),this.config.debug)){let a=Math.min(...o.map(c=>c.nextRetryTime))-e;console.log(`[BentoLabsSDK] ${o.length} events re-queued for retry in ${a}ms`)}}finally{this.isSending=!1}}scheduleRetry(){this.retryTimer&&(clearTimeout(this.retryTimer),this.retryTimer=null);let e=Date.now(),t=this.events.filter(n=>"nextRetryTime"in n);if(t.length===0)return;let r=Math.min(...t.map(n=>n.nextRetryTime)),s=Math.max(0,r-e);this.config.debug&&console.log(`[BentoLabsSDK] Scheduling retry in ${s}ms`),this.retryTimer=setTimeout(()=>{this.sendBatch()},s)}stopRecordingInternal(){this.stopRecordingFn&&(this.stopRecordingFn(),this.stopRecordingFn=null),this.batchTimer&&(clearInterval(this.batchTimer),this.batchTimer=null),this.retryTimer&&(clearTimeout(this.retryTimer),this.retryTimer=null),this.autocaptureCleanup&&(this.autocaptureCleanup(),this.autocaptureCleanup=null),this.isRecording=!1}setupAutocapture(){if(typeof document=="undefined")return;let e=s=>{var u;let n=s.target;if(!n)return;let o=n.tagName.toLowerCase();if(!(["a","button","input","select","textarea"].includes(o)||n.getAttribute("role")==="button"||n.hasAttribute("data-bento-capture")))return;let c="";try{c=je(n)}catch(f){c=""}this.capture("$autocapture",{$event_type:"click",$element_tag:o,$element_text:((u=n.textContent)==null?void 0:u.slice(0,100))||"",$element_classes:n.className||"",$element_id:n.id||"",$bento_selector:c})},t=s=>{let n=s.target;if(!n)return;let o=n.tagName.toLowerCase();if(!["input","select","textarea"].includes(o)||n.type==="password")return;let l="";try{l=je(n)}catch(a){l=""}this.capture("$autocapture",{$event_type:"change",$element_tag:o,$element_type:n.type||"",$element_name:n.name||"",$element_id:n.id||"",$bento_selector:l})},r=s=>{let n=s.target;if(!n||n.tagName.toLowerCase()!=="form")return;let o="";try{o=je(n)}catch(l){o=""}this.capture("$autocapture",{$event_type:"submit",$element_tag:"form",$form_name:n.name||"",$form_id:n.id||"",$form_action:n.action||"",$bento_selector:o})};document.addEventListener("click",e,!0),document.addEventListener("change",t,!0),document.addEventListener("submit",r,!0),this.autocaptureCleanup=()=>{document.removeEventListener("click",e,!0),document.removeEventListener("change",t,!0),document.removeEventListener("submit",r,!0)},this.config.debug&&console.log("[BentoLabsSDK] Autocapture setup complete")}handlePageLeave(){if(this.capture("$pageleave",{$current_url:typeof window!="undefined"?window.location.href:"",$pathname:typeof window!="undefined"?window.location.pathname:""}),this.events.length>0&&typeof navigator!="undefined"&&navigator.sendBeacon){let e={sessionId:this.sessionId,events:this.events,timestamp:Date.now(),userAgent:navigator.userAgent,url:window.location.href,distinctId:this.distinctId};navigator.sendBeacon(`${this.config.endpoint}/events/`,new Blob([JSON.stringify(e)],{type:"application/json"})),this.events=[]}}},C=new xr;typeof window!="undefined"&&(window.BentoLabsSDK={init:C.init.bind(C),stop:C.stop.bind(C),getSessionId:C.getSessionId.bind(C),isRecordingActive:C.isRecordingActive.bind(C),getConfig:C.getConfig.bind(C),getEventQueueLength:C.getEventQueueLength.bind(C),flushEvents:C.flushEvents.bind(C),trackCustomEvent:C.trackCustomEvent.bind(C),generateSelector:cs,generateSelectorFromElement:je,generateSelectorFromHTML:Er,capture:C.capture.bind(C),identify:C.identify.bind(C),reset:C.reset.bind(C),getDistinctId:C.getDistinctId.bind(C),register:C.register.bind(C),registerOnce:C.registerOnce.bind(C),unregister:C.unregister.bind(C),opt_out_capturing:C.opt_out_capturing.bind(C),opt_in_capturing:C.opt_in_capturing.bind(C),has_opted_out_capturing:C.has_opted_out_capturing.bind(C),has_opted_in_capturing:C.has_opted_in_capturing.bind(C),people:C.people,startNetworkCapture:C.startNetworkCapture.bind(C),stopNetworkCapture:C.stopNetworkCapture.bind(C),startStorageCapture:C.startStorageCapture.bind(C),stopStorageCapture:C.stopStorageCapture.bind(C),startConsoleCapture:C.startConsoleCapture.bind(C),stopConsoleCapture:C.stopConsoleCapture.bind(C),getNetworkLogs:C.getNetworkLogs.bind(C),getStorageLogs:C.getStorageLogs.bind(C),getConsoleLogs:C.getConsoleLogs.bind(C)});var rd=C;return Ia(id);})();
55
+ /*! Bundled license information:
56
+
57
+ rrweb/dist/rrweb.js:
58
+ (*! *****************************************************************************
59
+ Copyright (c) Microsoft Corporation.
60
+
61
+ Permission to use, copy, modify, and/or distribute this software for any
62
+ purpose with or without fee is hereby granted.
63
+
64
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
65
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
66
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
67
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
68
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
69
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
70
+ PERFORMANCE OF THIS SOFTWARE.
71
+ ***************************************************************************** *)
72
+ */
73
+ window.BentoLabsSDK = BentoLabsSDKModule.default || BentoLabsSDKModule.BentoLabsSDK || BentoLabsSDKModule;
74
+ //# sourceMappingURL=index.browser.min.js.map