@bworlds/launchkit 0.1.5 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,441 +1,2 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});var ja=Object.defineProperty,Ha=(s,e,t)=>e in s?ja(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,S=(s,e,t)=>Ha(s,typeof e!="symbol"?e+"":e,t),yi,Ga=Object.defineProperty,Va=(s,e,t)=>e in s?Ga(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,wi=(s,e,t)=>Va(s,typeof e!="symbol"?e+"":e,t),X=(s=>(s[s.Document=0]="Document",s[s.DocumentType=1]="DocumentType",s[s.Element=2]="Element",s[s.Text=3]="Text",s[s.CDATA=4]="CDATA",s[s.Comment=5]="Comment",s))(X||{});const bi={Node:["childNodes","parentNode","parentElement","textContent","ownerDocument"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},vi={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},yt={},Ya=()=>!!globalThis.Zone;function Fs(s){if(yt[s])return yt[s];const e=globalThis[s],t=e.prototype,r=s in bi?bi[s]:void 0,i=!!(r&&r.every(l=>{var a,u;return!!((u=(a=Object.getOwnPropertyDescriptor(t,l))==null?void 0:a.get)!=null&&u.toString().includes("[native code]"))})),n=s in vi?vi[s]:void 0,o=!!(n&&n.every(l=>{var a;return typeof t[l]=="function"&&((a=t[l])==null?void 0:a.toString().includes("[native code]"))}));if(i&&o&&!Ya())return yt[s]=e.prototype,e.prototype;try{const l=document.createElement("iframe");document.body.appendChild(l);const a=l.contentWindow;if(!a)return e.prototype;const u=a[s].prototype;return document.body.removeChild(l),u?yt[s]=u:t}catch{return t}}const Tr={};function ye(s,e,t){var r;const i=`${s}.${String(t)}`;if(Tr[i])return Tr[i].call(e);const n=Fs(s),o=(r=Object.getOwnPropertyDescriptor(n,t))==null?void 0:r.get;return o?(Tr[i]=o,o.call(e)):e[t]}const Pr={};function $n(s,e,t){const r=`${s}.${String(t)}`;if(Pr[r])return Pr[r].bind(e);const n=Fs(s)[t];return typeof n!="function"?e[t]:(Pr[r]=n,n.bind(e))}function Za(s){return ye("Node",s,"ownerDocument")}function Ja(s){return ye("Node",s,"childNodes")}function Xa(s){return ye("Node",s,"parentNode")}function Ka(s){return ye("Node",s,"parentElement")}function Qa(s){return ye("Node",s,"textContent")}function qa(s,e){return $n("Node",s,"contains")(e)}function el(s){return $n("Node",s,"getRootNode")()}function tl(s){return!s||!("host"in s)?null:ye("ShadowRoot",s,"host")}function rl(s){return s.styleSheets}function sl(s){return!s||!("shadowRoot"in s)?null:ye("Element",s,"shadowRoot")}function il(s,e){return ye("Element",s,"querySelector")(e)}function nl(s,e){return ye("Element",s,"querySelectorAll")(e)}function ol(){return Fs("MutationObserver").constructor}function al(s,e,t){try{if(!(e in s))return()=>{};const r=s[e],i=t(r);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),s[e]=i,()=>{s[e]=r}}catch{return()=>{}}}const K={ownerDocument:Za,childNodes:Ja,parentNode:Xa,parentElement:Ka,textContent:Qa,contains:qa,getRootNode:el,host:tl,styleSheets:rl,shadowRoot:sl,querySelector:il,querySelectorAll:nl,mutationObserver:ol,patch:al};function Nn(s){return s.nodeType===s.ELEMENT_NODE}function Xe(s){const e=s&&"host"in s&&"mode"in s&&K.host(s)||null;return!!(e&&"shadowRoot"in e&&K.shadowRoot(e)===s)}function Ke(s){return Object.prototype.toString.call(s)==="[object ShadowRoot]"}function ll(s){return s.includes(" background-clip: text;")&&!s.includes(" -webkit-background-clip: text;")&&(s=s.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),s}function ul(s){const{cssText:e}=s;if(e.split('"').length<3)return e;const t=["@import",`url(${JSON.stringify(s.href)})`];return s.layerName===""?t.push("layer"):s.layerName&&t.push(`layer(${s.layerName})`),s.supportsText&&t.push(`supports(${s.supportsText})`),s.media.length&&t.push(s.media.mediaText),t.join(" ")+";"}function Xr(s){try{const e=s.rules||s.cssRules;if(!e)return null;let t=s.href;!t&&s.ownerNode&&(t=s.ownerNode.baseURI);const r=Array.from(e,i=>Tn(i,t)).join("");return ll(r)}catch{return null}}function Tn(s,e){if(hl(s)){let t;try{t=Xr(s.styleSheet)||ul(s)}catch{t=s.cssText}return s.styleSheet.href?er(t,s.styleSheet.href):t}else{let t=s.cssText;return fl(s)&&s.selectorText.includes(":")&&(t=cl(t)),e?er(t,e):t}}function cl(s){const e=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return s.replace(e,"$1\\$2")}function hl(s){return"styleSheet"in s}function fl(s){return"selectorText"in s}class Pn{constructor(){wi(this,"idNodeMap",new Map),wi(this,"nodeMetaMap",new WeakMap)}getId(e){var t;return e?((t=this.getMeta(e))==null?void 0:t.id)??-1:-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){const t=this.getId(e);this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach(r=>this.removeNodeFromMap(r))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){const r=t.id;this.idNodeMap.set(r,e),this.nodeMetaMap.set(e,t)}replace(e,t){const r=this.getNode(e);if(r){const i=this.nodeMetaMap.get(r);i&&this.nodeMetaMap.set(t,i)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function pl(){return new Pn}function Qt({element:s,maskInputOptions:e,tagName:t,type:r,value:i,maskInputFn:n}){let o=i||"";const l=r&&Ie(r);return(e[t.toLowerCase()]||l&&e[l])&&(n?o=n(o,s):o="*".repeat(o.length)),o}function Ie(s){return s.toLowerCase()}const Si="__rrweb_original__";function dl(s){const e=s.getContext("2d");if(!e)return!0;const t=50;for(let r=0;r<s.width;r+=t)for(let i=0;i<s.height;i+=t){const n=e.getImageData,o=Si in n?n[Si]:n;if(new Uint32Array(o.call(e,r,i,Math.min(t,s.width-r),Math.min(t,s.height-i)).data.buffer).some(a=>a!==0))return!1}return!0}function qt(s){const e=s.type;return s.hasAttribute("data-rr-is-password")?"password":e?Ie(e):null}function Dn(s,e){let t;try{t=new URL(s,e??window.location.href)}catch{return null}const r=/\.([0-9a-z]+)(?:$)/i,i=t.pathname.match(r);return(i==null?void 0:i[1])??null}function ml(s){let e="";return s.indexOf("//")>-1?e=s.split("/").slice(0,3).join("/"):e=s.split("/")[0],e=e.split("?")[0],e}const gl=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,yl=/^(?:[a-z+]+:)?\/\//i,wl=/^www\..*/i,bl=/^(data:)([^,]*),(.*)/i;function er(s,e){return(s||"").replace(gl,(t,r,i,n,o,l)=>{const a=i||o||l,u=r||n||"";if(!a)return t;if(yl.test(a)||wl.test(a))return`url(${u}${a}${u})`;if(bl.test(a))return`url(${u}${a}${u})`;if(a[0]==="/")return`url(${u}${ml(e)+a}${u})`;const h=e.split("/"),c=a.split("/");h.pop();for(const p of c)p!=="."&&(p===".."?h.pop():h.push(p));return`url(${u}${h.join("/")}${u})`})}function wt(s,e=!1){return e?s.replace(/(\/\*[^*]*\*\/)|[\s;]/g,""):s.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"").replace(/0px/g,"0")}function vl(s,e,t=!1){const r=Array.from(e.childNodes),i=[];let n=0;if(r.length>1&&s&&typeof s=="string"){let o=wt(s,t);const l=o.length/s.length;for(let a=1;a<r.length;a++)if(r[a].textContent&&typeof r[a].textContent=="string"){const u=wt(r[a].textContent,t),h=100;let c=3;for(;c<u.length&&(u[c].match(/[a-zA-Z0-9]/)||u.indexOf(u.substring(0,c),1)!==-1);c++);for(;c<u.length;c++){let p=u.substring(0,c),d=o.split(p),g=-1;if(d.length===2)g=d[0].length;else if(d.length>2&&d[0]===""&&r[a-1].textContent!=="")g=o.indexOf(p,1);else if(d.length===1){if(p=p.substring(0,p.length-1),d=o.split(p),d.length<=1)return i.push(s),i;c=h+1}else c===u.length-1&&(g=o.indexOf(p));if(d.length>=2&&c>h){const m=r[a-1].textContent;if(m&&typeof m=="string"){const f=wt(m).length;g=o.indexOf(p,f)}g===-1&&(g=d[0].length)}if(g!==-1){let m=Math.floor(g/l);for(;m>0&&m<s.length;){if(n+=1,n>50*r.length)return i.push(s),i;const f=wt(s.substring(0,m),t);if(f.length===g){i.push(s.substring(0,m)),s=s.substring(m),o=o.substring(g);break}else f.length<g?m+=Math.max(1,Math.floor((g-f.length)/l)):m-=Math.max(1,Math.floor((f.length-g)*l))}break}}}}return i.push(s),i}function Sl(s,e){return vl(s,e).join("/* rr_split */")}let Cl=1;const _l=new RegExp("[^a-z0-9-_:]"),qe=-2;function Ln(){return Cl++}function xl(s){if(s instanceof HTMLFormElement)return"form";const e=Ie(s.tagName);return _l.test(e)?"div":e}let Ae,Ci;const Il=/^[^ \t\n\r\u000c]+/,Rl=/^[, \t\n\r\u000c]+/;function kl(s,e){if(e.trim()==="")return e;let t=0;function r(n){let o;const l=n.exec(e.substring(t));return l?(o=l[0],t+=o.length,o):""}const i=[];for(;r(Rl),!(t>=e.length);){let n=r(Il);if(n.slice(-1)===",")n=$e(s,n.substring(0,n.length-1)),i.push(n);else{let o="";n=$e(s,n);let l=!1;for(;;){const a=e.charAt(t);if(a===""){i.push((n+o).trim());break}else if(l)a===")"&&(l=!1);else if(a===","){t+=1,i.push((n+o).trim());break}else a==="("&&(l=!0);o+=a,t+=1}}}return i.join(", ")}const _i=new WeakMap;function $e(s,e){return!e||e.trim()===""?e:Us(s,e)}function El(s){return!!(s.tagName==="svg"||s.ownerSVGElement)}function Us(s,e){let t=_i.get(s);if(t||(t=s.createElement("a"),_i.set(s,t)),!e)e="";else if(e.startsWith("blob:")||e.startsWith("data:"))return e;return t.setAttribute("href",e),t.href}function Fn(s,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)?$e(s,r):t==="srcset"?kl(s,r):t==="style"?er(r,Us(s)):e==="object"&&t==="data"?$e(s,r):r)}function Un(s,e,t){return["video","audio"].includes(s)&&e==="autoplay"}function Al(s,e,t){try{if(typeof e=="string"){if(s.classList.contains(e))return!0}else for(let r=s.classList.length;r--;){const i=s.classList[r];if(e.test(i))return!0}if(t)return s.matches(t)}catch{}return!1}function tr(s,e,t){if(!s)return!1;if(s.nodeType!==s.ELEMENT_NODE)return t?tr(K.parentNode(s),e,t):!1;for(let r=s.classList.length;r--;){const i=s.classList[r];if(e.test(i))return!0}return t?tr(K.parentNode(s),e,t):!1}function Bn(s,e,t,r){let i;if(Nn(s)){if(i=s,!K.childNodes(i).length)return!1}else{if(K.parentElement(s)===null)return!1;i=K.parentElement(s)}try{if(typeof e=="string"){if(r){if(i.closest(`.${e}`))return!0}else if(i.classList.contains(e))return!0}else if(tr(i,e,r))return!0;if(t){if(r){if(i.closest(t))return!0}else if(i.matches(t))return!0}}catch{}return!1}function Ml(s,e,t){const r=s.contentWindow;if(!r)return;let i=!1,n;try{n=r.document.readyState}catch{return}if(n!=="complete"){const l=setTimeout(()=>{i||(e(),i=!0)},t);s.addEventListener("load",()=>{clearTimeout(l),i=!0,e()});return}const o="about:blank";if(r.location.href!==o||s.src===o||s.src==="")return setTimeout(e,0),s.addEventListener("load",e);s.addEventListener("load",e)}function Ol(s,e,t){let r=!1,i;try{i=s.sheet}catch{return}if(i)return;const n=setTimeout(()=>{r||(e(),r=!0)},t);s.addEventListener("load",()=>{clearTimeout(n),r=!0,e()})}function $l(s,e){const{doc:t,mirror:r,blockClass:i,blockSelector:n,needsMask:o,inlineStylesheet:l,maskInputOptions:a={},maskTextFn:u,maskInputFn:h,dataURLOptions:c={},inlineImages:p,recordCanvas:d,keepIframeSrcFn:g,newlyAddedElement:m=!1,cssCaptured:f=!1}=e,v=Nl(t,r);switch(s.nodeType){case s.DOCUMENT_NODE:return s.compatMode!=="CSS1Compat"?{type:X.Document,childNodes:[],compatMode:s.compatMode}:{type:X.Document,childNodes:[]};case s.DOCUMENT_TYPE_NODE:return{type:X.DocumentType,name:s.name,publicId:s.publicId,systemId:s.systemId,rootId:v};case s.ELEMENT_NODE:return Pl(s,{doc:t,blockClass:i,blockSelector:n,inlineStylesheet:l,maskInputOptions:a,maskInputFn:h,dataURLOptions:c,inlineImages:p,recordCanvas:d,keepIframeSrcFn:g,newlyAddedElement:m,rootId:v});case s.TEXT_NODE:return Tl(s,{doc:t,needsMask:o,maskTextFn:u,rootId:v,cssCaptured:f});case s.CDATA_SECTION_NODE:return{type:X.CDATA,textContent:"",rootId:v};case s.COMMENT_NODE:return{type:X.Comment,textContent:K.textContent(s)||"",rootId:v};default:return!1}}function Nl(s,e){if(!e.hasNode(s))return;const t=e.getId(s);return t===1?void 0:t}function Tl(s,e){const{needsMask:t,maskTextFn:r,rootId:i,cssCaptured:n}=e,o=K.parentNode(s),l=o&&o.tagName;let a="";const u=l==="STYLE"?!0:void 0,h=l==="SCRIPT"?!0:void 0;return h?a="SCRIPT_PLACEHOLDER":n||(a=K.textContent(s),u&&a&&(a=er(a,Us(e.doc)))),!u&&!h&&a&&t&&(a=r?r(a,K.parentElement(s)):a.replace(/[\S]/g,"*")),{type:X.Text,textContent:a||"",rootId:i}}function Pl(s,e){const{doc:t,blockClass:r,blockSelector:i,inlineStylesheet:n,maskInputOptions:o={},maskInputFn:l,dataURLOptions:a={},inlineImages:u,recordCanvas:h,keepIframeSrcFn:c,newlyAddedElement:p=!1,rootId:d}=e,g=Al(s,r,i),m=xl(s);let f={};const v=s.attributes.length;for(let y=0;y<v;y++){const C=s.attributes[y];Un(m,C.name,C.value)||(f[C.name]=Fn(t,m,Ie(C.name),C.value))}if(m==="link"&&n){const y=Array.from(t.styleSheets).find(I=>I.href===s.href);let C=null;y&&(C=Xr(y)),C&&(delete f.rel,delete f.href,f._cssText=C)}if(m==="style"&&s.sheet){let y=Xr(s.sheet);y&&(s.childNodes.length>1&&(y=Sl(y,s)),f._cssText=y)}if(["input","textarea","select"].includes(m)){const y=s.value,C=s.checked;f.type!=="radio"&&f.type!=="checkbox"&&f.type!=="submit"&&f.type!=="button"&&y?f.value=Qt({element:s,type:qt(s),tagName:m,value:y,maskInputOptions:o,maskInputFn:l}):C&&(f.checked=C)}if(m==="option"&&(s.selected&&!o.select?f.selected=!0:delete f.selected),m==="dialog"&&s.open&&(f.rr_open_mode=s.matches("dialog:modal")?"modal":"non-modal"),m==="canvas"&&h){if(s.__context==="2d")dl(s)||(f.rr_dataURL=s.toDataURL(a.type,a.quality));else if(!("__context"in s)){const y=s.toDataURL(a.type,a.quality),C=t.createElement("canvas");C.width=s.width,C.height=s.height;const I=C.toDataURL(a.type,a.quality);y!==I&&(f.rr_dataURL=y)}}if(m==="img"&&u){Ae||(Ae=t.createElement("canvas"),Ci=Ae.getContext("2d"));const y=s,C=y.currentSrc||y.getAttribute("src")||"<unknown-src>",I=y.crossOrigin,O=()=>{y.removeEventListener("load",O);try{Ae.width=y.naturalWidth,Ae.height=y.naturalHeight,Ci.drawImage(y,0,0),f.rr_dataURL=Ae.toDataURL(a.type,a.quality)}catch(B){if(y.crossOrigin!=="anonymous"){y.crossOrigin="anonymous",y.complete&&y.naturalWidth!==0?O():y.addEventListener("load",O);return}else console.warn(`Cannot inline img src=${C}! Error: ${B}`)}y.crossOrigin==="anonymous"&&(I?f.crossOrigin=I:y.removeAttribute("crossorigin"))};y.complete&&y.naturalWidth!==0?O():y.addEventListener("load",O)}if(["audio","video"].includes(m)){const y=f;y.rr_mediaState=s.paused?"paused":"played",y.rr_mediaCurrentTime=s.currentTime,y.rr_mediaPlaybackRate=s.playbackRate,y.rr_mediaMuted=s.muted,y.rr_mediaLoop=s.loop,y.rr_mediaVolume=s.volume}if(p||(s.scrollLeft&&(f.rr_scrollLeft=s.scrollLeft),s.scrollTop&&(f.rr_scrollTop=s.scrollTop)),g){const{width:y,height:C}=s.getBoundingClientRect();f={class:f.class,rr_width:`${y}px`,rr_height:`${C}px`}}m==="iframe"&&!c(f.src)&&(s.contentDocument||(f.rr_src=f.src),delete f.src);let b;try{customElements.get(m)&&(b=!0)}catch{}return{type:X.Element,tagName:m,attributes:f,childNodes:[],isSVG:El(s)||void 0,needBlock:g,rootId:d,isCustom:b}}function L(s){return s==null?"":s.toLowerCase()}function zn(s){return s===!0||s==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:s==="all",headMetaDescKeywords:s==="all",headTitleMutations:s==="all"}:s||{}}function Dl(s,e){if(e.comment&&s.type===X.Comment)return!0;if(s.type===X.Element){if(e.script&&(s.tagName==="script"||s.tagName==="link"&&(s.attributes.rel==="preload"&&s.attributes.as==="script"||s.attributes.rel==="modulepreload")||s.tagName==="link"&&s.attributes.rel==="prefetch"&&typeof s.attributes.href=="string"&&Dn(s.attributes.href)==="js"))return!0;if(e.headFavicon&&(s.tagName==="link"&&s.attributes.rel==="shortcut icon"||s.tagName==="meta"&&(L(s.attributes.name).match(/^msapplication-tile(image|color)$/)||L(s.attributes.name)==="application-name"||L(s.attributes.rel)==="icon"||L(s.attributes.rel)==="apple-touch-icon"||L(s.attributes.rel)==="shortcut icon")))return!0;if(s.tagName==="meta"){if(e.headMetaDescKeywords&&L(s.attributes.name).match(/^description|keywords$/))return!0;if(e.headMetaSocial&&(L(s.attributes.property).match(/^(og|twitter|fb):/)||L(s.attributes.name).match(/^(og|twitter):/)||L(s.attributes.name)==="pinterest"))return!0;if(e.headMetaRobots&&(L(s.attributes.name)==="robots"||L(s.attributes.name)==="googlebot"||L(s.attributes.name)==="bingbot"))return!0;if(e.headMetaHttpEquiv&&s.attributes["http-equiv"]!==void 0)return!0;if(e.headMetaAuthorship&&(L(s.attributes.name)==="author"||L(s.attributes.name)==="generator"||L(s.attributes.name)==="framework"||L(s.attributes.name)==="publisher"||L(s.attributes.name)==="progid"||L(s.attributes.property).match(/^article:/)||L(s.attributes.property).match(/^product:/)))return!0;if(e.headMetaVerification&&(L(s.attributes.name)==="google-site-verification"||L(s.attributes.name)==="yandex-verification"||L(s.attributes.name)==="csrf-token"||L(s.attributes.name)==="p:domain_verify"||L(s.attributes.name)==="verify-v1"||L(s.attributes.name)==="verification"||L(s.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function Ne(s,e){const{doc:t,mirror:r,blockClass:i,blockSelector:n,maskTextClass:o,maskTextSelector:l,skipChild:a=!1,inlineStylesheet:u=!0,maskInputOptions:h={},maskTextFn:c,maskInputFn:p,slimDOMOptions:d,dataURLOptions:g={},inlineImages:m=!1,recordCanvas:f=!1,onSerialize:v,onIframeLoad:b,iframeLoadTimeout:y=5e3,onStylesheetLoad:C,stylesheetLoadTimeout:I=5e3,keepIframeSrcFn:O=()=>!1,newlyAddedElement:B=!1,cssCaptured:T=!1}=e;let{needsMask:A}=e,{preserveWhiteSpace:z=!0}=e;A||(A=Bn(s,o,l,A===void 0));const re=$l(s,{doc:t,mirror:r,blockClass:i,blockSelector:n,needsMask:A,inlineStylesheet:u,maskInputOptions:h,maskTextFn:c,maskInputFn:p,dataURLOptions:g,inlineImages:m,recordCanvas:f,keepIframeSrcFn:O,newlyAddedElement:B,cssCaptured:T});if(!re)return console.warn(s,"not serialized"),null;let ue;r.hasNode(s)?ue=r.getId(s):Dl(re,d)||!z&&re.type===X.Text&&!re.textContent.replace(/^\s+|\s+$/gm,"").length?ue=qe:ue=Ln();const E=Object.assign(re,{id:ue});if(r.add(s,E),ue===qe)return null;v&&v(s);let He=!a;if(E.type===X.Element){He=He&&!E.needBlock,delete E.needBlock;const Z=K.shadowRoot(s);Z&&Ke(Z)&&(E.isShadowHost=!0)}if((E.type===X.Document||E.type===X.Element)&&He){d.headWhitespace&&E.type===X.Element&&E.tagName==="head"&&(z=!1);const Z={doc:t,mirror:r,blockClass:i,blockSelector:n,needsMask:A,maskTextClass:o,maskTextSelector:l,skipChild:a,inlineStylesheet:u,maskInputOptions:h,maskTextFn:c,maskInputFn:p,slimDOMOptions:d,dataURLOptions:g,inlineImages:m,recordCanvas:f,preserveWhiteSpace:z,onSerialize:v,onIframeLoad:b,iframeLoadTimeout:y,onStylesheetLoad:C,stylesheetLoadTimeout:I,keepIframeSrcFn:O,cssCaptured:!1};if(!(E.type===X.Element&&E.tagName==="textarea"&&E.attributes.value!==void 0)){E.type===X.Element&&E.attributes._cssText!==void 0&&typeof E.attributes._cssText=="string"&&(Z.cssCaptured=!0);for(const ve of Array.from(K.childNodes(s))){const ce=Ne(ve,Z);ce&&E.childNodes.push(ce)}}let se=null;if(Nn(s)&&(se=K.shadowRoot(s)))for(const ve of Array.from(K.childNodes(se))){const ce=Ne(ve,Z);ce&&(Ke(se)&&(ce.isShadow=!0),E.childNodes.push(ce))}}const Ge=K.parentNode(s);return Ge&&Xe(Ge)&&Ke(Ge)&&(E.isShadow=!0),E.type===X.Element&&E.tagName==="iframe"&&Ml(s,()=>{const Z=s.contentDocument;if(Z&&b){const se=Ne(Z,{doc:Z,mirror:r,blockClass:i,blockSelector:n,needsMask:A,maskTextClass:o,maskTextSelector:l,skipChild:!1,inlineStylesheet:u,maskInputOptions:h,maskTextFn:c,maskInputFn:p,slimDOMOptions:d,dataURLOptions:g,inlineImages:m,recordCanvas:f,preserveWhiteSpace:z,onSerialize:v,onIframeLoad:b,iframeLoadTimeout:y,onStylesheetLoad:C,stylesheetLoadTimeout:I,keepIframeSrcFn:O});se&&b(s,se)}},y),E.type===X.Element&&E.tagName==="link"&&typeof E.attributes.rel=="string"&&(E.attributes.rel==="stylesheet"||E.attributes.rel==="preload"&&typeof E.attributes.href=="string"&&Dn(E.attributes.href)==="css")&&Ol(s,()=>{if(C){const Z=Ne(s,{doc:t,mirror:r,blockClass:i,blockSelector:n,needsMask:A,maskTextClass:o,maskTextSelector:l,skipChild:!1,inlineStylesheet:u,maskInputOptions:h,maskTextFn:c,maskInputFn:p,slimDOMOptions:d,dataURLOptions:g,inlineImages:m,recordCanvas:f,preserveWhiteSpace:z,onSerialize:v,onIframeLoad:b,iframeLoadTimeout:y,onStylesheetLoad:C,stylesheetLoadTimeout:I,keepIframeSrcFn:O});Z&&C(s,Z)}},I),E}function Ll(s,e){const{mirror:t=new Pn,blockClass:r="rr-block",blockSelector:i=null,maskTextClass:n="rr-mask",maskTextSelector:o=null,inlineStylesheet:l=!0,inlineImages:a=!1,recordCanvas:u=!1,maskAllInputs:h=!1,maskTextFn:c,maskInputFn:p,slimDOM:d=!1,dataURLOptions:g,preserveWhiteSpace:m,onSerialize:f,onIframeLoad:v,iframeLoadTimeout:b,onStylesheetLoad:y,stylesheetLoadTimeout:C,keepIframeSrcFn:I=()=>!1}=e||{},O=h===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:h===!1?{password:!0}:h,B=zn(d);return Ne(s,{doc:s,mirror:t,blockClass:r,blockSelector:i,maskTextClass:n,maskTextSelector:o,skipChild:!1,inlineStylesheet:l,maskInputOptions:O,maskTextFn:c,maskInputFn:p,slimDOMOptions:B,dataURLOptions:g,inlineImages:a,recordCanvas:u,preserveWhiteSpace:m,onSerialize:f,onIframeLoad:v,iframeLoadTimeout:b,onStylesheetLoad:y,stylesheetLoadTimeout:C,keepIframeSrcFn:I,newlyAddedElement:!1})}function Fl(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}function Ul(s){if(s.__esModule)return s;var e=s.default;if(typeof e=="function"){var t=function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(s).forEach(function(r){var i=Object.getOwnPropertyDescriptor(s,r);Object.defineProperty(t,r,i.get?i:{enumerable:!0,get:function(){return s[r]}})}),t}var Bs={exports:{}},F=String,Wn=function(){return{isColorSupported:!1,reset:F,bold:F,dim:F,italic:F,underline:F,inverse:F,hidden:F,strikethrough:F,black:F,red:F,green:F,yellow:F,blue:F,magenta:F,cyan:F,white:F,gray:F,bgBlack:F,bgRed:F,bgGreen:F,bgYellow:F,bgBlue:F,bgMagenta:F,bgCyan:F,bgWhite:F}};Bs.exports=Wn();Bs.exports.createColors=Wn;var Bl=Bs.exports;const zl={},Wl=Object.freeze(Object.defineProperty({__proto__:null,default:zl},Symbol.toStringTag,{value:"Module"})),ae=Ul(Wl);let xi=Bl,Ii=ae,Kr=class jn extends Error{constructor(e,t,r,i,n,o){super(e),this.name="CssSyntaxError",this.reason=e,n&&(this.file=n),i&&(this.source=i),o&&(this.plugin=o),typeof t<"u"&&typeof r<"u"&&(typeof t=="number"?(this.line=t,this.column=r):(this.line=t.line,this.column=t.column,this.endLine=r.line,this.endColumn=r.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,jn)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let t=this.source;e==null&&(e=xi.isColorSupported),Ii&&e&&(t=Ii(t));let r=t.split(/\r?\n/),i=Math.max(this.line-3,0),n=Math.min(this.line+2,r.length),o=String(n).length,l,a;if(e){let{bold:u,gray:h,red:c}=xi.createColors(!0);l=p=>u(c(p)),a=p=>h(p)}else l=a=u=>u;return r.slice(i,n).map((u,h)=>{let c=i+1+h,p=" "+(" "+c).slice(-o)+" | ";if(c===this.line){let d=a(p.replace(/\d/g," "))+u.slice(0,this.column-1).replace(/[^\t]/g," ");return l(">")+a(p)+u+`
2
- `+d+l("^")}return" "+a(p)+u}).join(`
3
- `)}toString(){let e=this.showSourceCode();return e&&(e=`
4
-
5
- `+e+`
6
- `),this.name+": "+this.message+e}};var zs=Kr;Kr.default=Kr;var ut={};ut.isClean=Symbol("isClean");ut.my=Symbol("my");const Ri={after:`
7
- `,beforeClose:`
8
- `,beforeComment:`
9
- `,beforeDecl:`
10
- `,beforeOpen:" ",beforeRule:`
11
- `,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function jl(s){return s[0].toUpperCase()+s.slice(1)}let Qr=class{constructor(e){this.builder=e}atrule(e,t){let r="@"+e.name,i=e.params?this.rawValue(e,"params"):"";if(typeof e.raws.afterName<"u"?r+=e.raws.afterName:i&&(r+=" "),e.nodes)this.block(e,r+i);else{let n=(e.raws.between||"")+(t?";":"");this.builder(r+i+n,e)}}beforeAfter(e,t){let r;e.type==="decl"?r=this.raw(e,null,"beforeDecl"):e.type==="comment"?r=this.raw(e,null,"beforeComment"):t==="before"?r=this.raw(e,null,"beforeRule"):r=this.raw(e,null,"beforeClose");let i=e.parent,n=0;for(;i&&i.type!=="root";)n+=1,i=i.parent;if(r.includes(`
12
- `)){let o=this.raw(e,null,"indent");if(o.length)for(let l=0;l<n;l++)r+=o}return r}block(e,t){let r=this.raw(e,"between","beforeOpen");this.builder(t+r+"{",e,"start");let i;e.nodes&&e.nodes.length?(this.body(e),i=this.raw(e,"after")):i=this.raw(e,"after","emptyBody"),i&&this.builder(i),this.builder("}",e,"end")}body(e){let t=e.nodes.length-1;for(;t>0&&e.nodes[t].type==="comment";)t-=1;let r=this.raw(e,"semicolon");for(let i=0;i<e.nodes.length;i++){let n=e.nodes[i],o=this.raw(n,"before");o&&this.builder(o),this.stringify(n,t!==i||r)}}comment(e){let t=this.raw(e,"left","commentLeft"),r=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+r+"*/",e)}decl(e,t){let r=this.raw(e,"between","colon"),i=e.prop+r+this.rawValue(e,"value");e.important&&(i+=e.raws.important||" !important"),t&&(i+=";"),this.builder(i,e)}document(e){this.body(e)}raw(e,t,r){let i;if(r||(r=t),t&&(i=e.raws[t],typeof i<"u"))return i;let n=e.parent;if(r==="before"&&(!n||n.type==="root"&&n.first===e||n&&n.type==="document"))return"";if(!n)return Ri[r];let o=e.root();if(o.rawCache||(o.rawCache={}),typeof o.rawCache[r]<"u")return o.rawCache[r];if(r==="before"||r==="after")return this.beforeAfter(e,r);{let l="raw"+jl(r);this[l]?i=this[l](o,e):o.walk(a=>{if(i=a.raws[t],typeof i<"u")return!1})}return typeof i>"u"&&(i=Ri[r]),o.rawCache[r]=i,i}rawBeforeClose(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length>0&&typeof r.raws.after<"u")return t=r.raws.after,t.includes(`
13
- `)&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let r;return e.walkComments(i=>{if(typeof i.raws.before<"u")return r=i.raws.before,r.includes(`
14
- `)&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r>"u"?r=this.raw(t,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeDecl(e,t){let r;return e.walkDecls(i=>{if(typeof i.raws.before<"u")return r=i.raws.before,r.includes(`
15
- `)&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r>"u"?r=this.raw(t,null,"beforeRule"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeOpen(e){let t;return e.walk(r=>{if(r.type!=="decl"&&(t=r.raws.between,typeof t<"u"))return!1}),t}rawBeforeRule(e){let t;return e.walk(r=>{if(r.nodes&&(r.parent!==e||e.first!==r)&&typeof r.raws.before<"u")return t=r.raws.before,t.includes(`
16
- `)&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls(r=>{if(typeof r.raws.between<"u")return t=r.raws.between.replace(/[^\s:]/g,""),!1}),t}rawEmptyBody(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length===0&&(t=r.raws.after,typeof t<"u"))return!1}),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk(r=>{let i=r.parent;if(i&&i!==e&&i.parent&&i.parent===e&&typeof r.raws.before<"u"){let n=r.raws.before.split(`
17
- `);return t=n[n.length-1],t=t.replace(/\S/g,""),!1}}),t}rawSemicolon(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length&&r.last.type==="decl"&&(t=r.raws.semicolon,typeof t<"u"))return!1}),t}rawValue(e,t){let r=e[t],i=e.raws[t];return i&&i.value===r?i.raw:r}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}};var Hn=Qr;Qr.default=Qr;let Hl=Hn;function qr(s,e){new Hl(e).stringify(s)}var wr=qr;qr.default=qr;let{isClean:bt,my:Gl}=ut,Vl=zs,Yl=Hn,Zl=wr;function es(s,e){let t=new s.constructor;for(let r in s){if(!Object.prototype.hasOwnProperty.call(s,r)||r==="proxyCache")continue;let i=s[r],n=typeof i;r==="parent"&&n==="object"?e&&(t[r]=e):r==="source"?t[r]=i:Array.isArray(i)?t[r]=i.map(o=>es(o,t)):(n==="object"&&i!==null&&(i=es(i)),t[r]=i)}return t}let ts=class{constructor(e={}){this.raws={},this[bt]=!1,this[Gl]=!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=es(this);for(let r in e)t[r]=e[r];return t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}error(e,t={}){if(this.source){let{end:r,start:i}=this.rangeBy(t);return this.source.input.error(e,{column:i.column,line:i.line},{column:r.column,line:r.line},t)}return new Vl(e)}getProxyProcessor(){return{get(e,t){return t==="proxyOf"?e:t==="root"?()=>e.root().toProxy():e[t]},set(e,t,r){return e[t]===r||(e[t]=r,(t==="prop"||t==="value"||t==="name"||t==="params"||t==="important"||t==="text")&&e.markDirty()),!0}}}markDirty(){if(this[bt]){this[bt]=!1;let e=this;for(;e=e.parent;)e[bt]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let r=this.source.start;if(e.index)r=this.positionInside(e.index,t);else if(e.word){t=this.toString();let i=t.indexOf(e.word);i!==-1&&(r=this.positionInside(i,t))}return r}positionInside(e,t){let r=t||this.toString(),i=this.source.start.column,n=this.source.start.line;for(let o=0;o<e;o++)r[o]===`
18
- `?(i=1,n+=1):i+=1;return{column:i,line:n}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e){let t={column:this.source.start.column,line:this.source.start.line},r=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:t.column+1,line:t.line};if(e.word){let i=this.toString(),n=i.indexOf(e.word);n!==-1&&(t=this.positionInside(n,i),r=this.positionInside(n+e.word.length,i))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?r={column:e.end.column,line:e.end.line}:typeof e.endIndex=="number"?r=this.positionInside(e.endIndex):e.index&&(r=this.positionInside(e.index+1));return(r.line<t.line||r.line===t.line&&r.column<=t.column)&&(r={column:t.column+1,line:t.line}),{end:r,start:t}}raw(e,t){return new Yl().raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let t=this,r=!1;for(let i of e)i===this?r=!0:r?(this.parent.insertAfter(t,i),t=i):this.parent.insertBefore(t,i);r||this.remove()}return this}root(){let e=this;for(;e.parent&&e.parent.type!=="document";)e=e.parent;return e}toJSON(e,t){let r={},i=t==null;t=t||new Map;let n=0;for(let o in this){if(!Object.prototype.hasOwnProperty.call(this,o)||o==="parent"||o==="proxyCache")continue;let l=this[o];if(Array.isArray(l))r[o]=l.map(a=>typeof a=="object"&&a.toJSON?a.toJSON(null,t):a);else if(typeof l=="object"&&l.toJSON)r[o]=l.toJSON(null,t);else if(o==="source"){let a=t.get(l.input);a==null&&(a=n,t.set(l.input,n),n++),r[o]={end:l.end,inputId:a,start:l.start}}else r[o]=l}return i&&(r.inputs=[...t.keys()].map(o=>o.toJSON())),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=Zl){e.stringify&&(e=e.stringify);let t="";return e(this,r=>{t+=r}),t}warn(e,t,r){let i={node:this};for(let n in r)i[n]=r[n];return e.warn(t,i)}get proxyOf(){return this}};var br=ts;ts.default=ts;let Jl=br,rs=class extends Jl{constructor(e){e&&typeof e.value<"u"&&typeof e.value!="string"&&(e={...e,value:String(e.value)}),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}};var vr=rs;rs.default=rs;let Xl="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",Kl=(s=21)=>{let e="",t=s;for(;t--;)e+=Xl[Math.random()*64|0];return e};var Ql={nanoid:Kl};let{SourceMapConsumer:ki,SourceMapGenerator:Ei}=ae,{existsSync:ql,readFileSync:eu}=ae,{dirname:Dr,join:tu}=ae;function ru(s){return Buffer?Buffer.from(s,"base64").toString():window.atob(s)}let ss=class{constructor(e,t){if(t.map===!1)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let r=t.map?t.map.prev:void 0,i=this.loadMap(t.from,r);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=Dr(this.mapFile)),i&&(this.text=i)}consumer(){return this.consumerCache||(this.consumerCache=new ki(this.text)),this.consumerCache}decodeInline(e){let t=/^data:application\/json;charset=utf-?8;base64,/,r=/^data:application\/json;base64,/,i=/^data:application\/json;charset=utf-?8,/,n=/^data:application\/json,/;if(i.test(e)||n.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(t.test(e)||r.test(e))return ru(e.substr(RegExp.lastMatch.length));let o=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+o)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return typeof e!="object"?!1:typeof e.mappings=="string"||typeof e._mappings=="string"||Array.isArray(e.sections)}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/gm);if(!t)return;let r=e.lastIndexOf(t.pop()),i=e.indexOf("*/",r);r>-1&&i>-1&&(this.annotation=this.getAnnotationURL(e.substring(r,i)))}loadFile(e){if(this.root=Dr(e),ql(e))return this.mapFile=e,eu(e,"utf-8").toString().trim()}loadMap(e,t){if(t===!1)return!1;if(t){if(typeof t=="string")return t;if(typeof t=="function"){let r=t(e);if(r){let i=this.loadFile(r);if(!i)throw new Error("Unable to load previous source map: "+r.toString());return i}}else{if(t instanceof ki)return Ei.fromSourceMap(t).toString();if(t instanceof Ei)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=tu(Dr(e),r)),this.loadFile(r)}}}startWith(e,t){return e?e.substr(0,t.length)===t:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};var Gn=ss;ss.default=ss;let{SourceMapConsumer:su,SourceMapGenerator:iu}=ae,{fileURLToPath:Ai,pathToFileURL:vt}=ae,{isAbsolute:is,resolve:ns}=ae,{nanoid:nu}=Ql,Lr=ae,Mi=zs,ou=Gn,Fr=Symbol("fromOffsetCache"),au=!!(su&&iu),Oi=!!(ns&&is),rr=class{constructor(e,t={}){if(e===null||typeof e>"u"||typeof e=="object"&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),this.css[0]==="\uFEFF"||this.css[0]==="￾"?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(!Oi||/^\w+:\/\//.test(t.from)||is(t.from)?this.file=t.from:this.file=ns(t.from)),Oi&&au){let r=new ou(this.css,t);if(r.text){this.map=r;let i=r.consumer().file;!this.file&&i&&(this.file=this.mapResolve(i))}}this.file||(this.id="<input css "+nu(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,r,i={}){let n,o,l;if(t&&typeof t=="object"){let u=t,h=r;if(typeof u.offset=="number"){let c=this.fromOffset(u.offset);t=c.line,r=c.col}else t=u.line,r=u.column;if(typeof h.offset=="number"){let c=this.fromOffset(h.offset);o=c.line,l=c.col}else o=h.line,l=h.column}else if(!r){let u=this.fromOffset(t);t=u.line,r=u.col}let a=this.origin(t,r,o,l);return a?n=new Mi(e,a.endLine===void 0?a.line:{column:a.column,line:a.line},a.endLine===void 0?a.column:{column:a.endColumn,line:a.endLine},a.source,a.file,i.plugin):n=new Mi(e,o===void 0?t:{column:r,line:t},o===void 0?r:{column:l,line:o},this.css,this.file,i.plugin),n.input={column:r,endColumn:l,endLine:o,line:t,source:this.css},this.file&&(vt&&(n.input.url=vt(this.file).toString()),n.input.file=this.file),n}fromOffset(e){let t,r;if(this[Fr])r=this[Fr];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[Fr]=r}t=r[r.length-1];let i=0;if(e>=t)i=r.length-1;else{let n=r.length-2,o;for(;i<n;)if(o=i+(n-i>>1),e<r[o])n=o-1;else if(e>=r[o+1])i=o+1;else{i=o;break}}return{col:e-r[i]+1,line:i+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:ns(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,r,i){if(!this.map)return!1;let n=this.map.consumer(),o=n.originalPositionFor({column:t,line:e});if(!o.source)return!1;let l;typeof r=="number"&&(l=n.originalPositionFor({column:i,line:r}));let a;is(o.source)?a=vt(o.source):a=new URL(o.source,this.map.consumer().sourceRoot||vt(this.map.mapFile));let u={column:o.column,endColumn:l&&l.column,endLine:l&&l.line,line:o.line,url:a.toString()};if(a.protocol==="file:")if(Ai)u.file=Ai(a);else throw new Error("file: protocol is not available in this PostCSS build");let h=n.sourceContentFor(o.source);return h&&(u.source=h),u}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])this[t]!=null&&(e[t]=this[t]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}};var Sr=rr;rr.default=rr;Lr&&Lr.registerInput&&Lr.registerInput(rr);let{SourceMapConsumer:Vn,SourceMapGenerator:Wt}=ae,{dirname:jt,relative:Yn,resolve:Zn,sep:Jn}=ae,{pathToFileURL:$i}=ae,lu=Sr,uu=!!(Vn&&Wt),cu=!!(jt&&Zn&&Yn&&Jn),hu=class{constructor(e,t,r,i){this.stringify=e,this.mapOpts=r.map||{},this.root=t,this.opts=r,this.css=i,this.originalCSS=i,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;this.isInline()?e="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?e=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?e=this.mapOpts.annotation(this.opts.to,this.root):e=this.outputFile()+".map";let t=`
20
- `;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||jt(e.file),i;this.mapOpts.sourcesContent===!1?(i=new Vn(e.text),i.sourcesContent&&(i.sourcesContent=null)):i=e.consumer(),this.map.applySourceMap(i,t,this.toUrl(this.path(r)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],e.type==="comment"&&e.text.indexOf("# sourceMappingURL=")===0&&this.root.removeChild(t)}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),cu&&uu&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,t=>{e+=t}),[e]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=Wt.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new Wt({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css="",this.map=new Wt({file:this.outputFile(),ignoreInvalidMapping:!0});let e=1,t=1,r="<no source>",i={generated:{column:0,line:0},original:{column:0,line:0},source:""},n,o;this.stringify(this.root,(l,a,u)=>{if(this.css+=l,a&&u!=="end"&&(i.generated.line=e,i.generated.column=t-1,a.source&&a.source.start?(i.source=this.sourcePath(a),i.original.line=a.source.start.line,i.original.column=a.source.start.column-1,this.map.addMapping(i)):(i.source=r,i.original.line=1,i.original.column=0,this.map.addMapping(i))),n=l.match(/\n/g),n?(e+=n.length,o=l.lastIndexOf(`
23
- `),t=l.length-o):t+=l.length,a&&u!=="start"){let h=a.parent||{raws:{}};(!(a.type==="decl"||a.type==="atrule"&&!a.nodes)||a!==h.last||h.raws.semicolon)&&(a.source&&a.source.end?(i.source=this.sourcePath(a),i.original.line=a.source.end.line,i.original.column=a.source.end.column-1,i.generated.line=e,i.generated.column=t-2,this.map.addMapping(i)):(i.source=r,i.original.line=1,i.original.column=0,i.generated.line=e,i.generated.column=t-1,this.map.addMapping(i)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(e=>e.annotation):!0}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let e=this.mapOpts.annotation;return typeof e<"u"&&e!==!0?!1:this.previous().length?this.previous().some(t=>t.inline):!0}isMap(){return typeof this.opts.map<"u"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent<"u"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(e=>e.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute||e.charCodeAt(0)===60||/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let r=this.opts.to?jt(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(r=jt(Zn(r,this.mapOpts.annotation)));let i=Yn(r,e);return this.memoizedPaths.set(e,i),i}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}});else{let e=new lu(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(t=>{if(t.source){let r=t.source.input.from;if(r&&!e[r]){e[r]=!0;let i=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(i,t.source.input.css)}}});else if(this.css){let t=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(t,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if($i){let r=$i(e).toString();return this.memoizedFileURLs.set(e,r),r}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;Jn==="\\"&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}};var Xn=hu;let fu=br,os=class extends fu{constructor(e){super(e),this.type="comment"}};var Cr=os;os.default=os;let{isClean:Kn,my:Qn}=ut,qn=vr,eo=Cr,pu=br,to,Ws,js,ro;function so(s){return s.map(e=>(e.nodes&&(e.nodes=so(e.nodes)),delete e.source,e))}function io(s){if(s[Kn]=!1,s.proxyOf.nodes)for(let e of s.proxyOf.nodes)io(e)}let me=class no extends pu{append(...e){for(let t of e){let r=this.normalize(t,this.last);for(let i of r)this.proxyOf.nodes.push(i)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t=this.getIterator(),r,i;for(;this.indexes[t]<this.proxyOf.nodes.length&&(r=this.indexes[t],i=e(this.proxyOf.nodes[r],r),i!==!1);)this.indexes[t]+=1;return delete this.indexes[t],i}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get(e,t){return t==="proxyOf"?e:e[t]?t==="each"||typeof t=="string"&&t.startsWith("walk")?(...r)=>e[t](...r.map(i=>typeof i=="function"?(n,o)=>i(n.toProxy(),o):i)):t==="every"||t==="some"?r=>e[t]((i,...n)=>r(i.toProxy(),...n)):t==="root"?()=>e.root().toProxy():t==="nodes"?e.nodes.map(r=>r.toProxy()):t==="first"||t==="last"?e[t].toProxy():e[t]:e[t]},set(e,t,r){return e[t]===r||(e[t]=r,(t==="name"||t==="params"||t==="selector")&&e.markDirty()),!0}}}index(e){return typeof e=="number"?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let r=this.index(e),i=this.normalize(t,this.proxyOf.nodes[r]).reverse();r=this.index(e);for(let o of i)this.proxyOf.nodes.splice(r+1,0,o);let n;for(let o in this.indexes)n=this.indexes[o],r<n&&(this.indexes[o]=n+i.length);return this.markDirty(),this}insertBefore(e,t){let r=this.index(e),i=r===0?"prepend":!1,n=this.normalize(t,this.proxyOf.nodes[r],i).reverse();r=this.index(e);for(let l of n)this.proxyOf.nodes.splice(r,0,l);let o;for(let l in this.indexes)o=this.indexes[l],r<=o&&(this.indexes[l]=o+n.length);return this.markDirty(),this}normalize(e,t){if(typeof e=="string")e=so(to(e).nodes);else if(typeof e>"u")e=[];else if(Array.isArray(e)){e=e.slice(0);for(let i of e)i.parent&&i.parent.removeChild(i,"ignore")}else if(e.type==="root"&&this.type!=="document"){e=e.nodes.slice(0);for(let i of e)i.parent&&i.parent.removeChild(i,"ignore")}else if(e.type)e=[e];else if(e.prop){if(typeof e.value>"u")throw new Error("Value field is missed in node creation");typeof e.value!="string"&&(e.value=String(e.value)),e=[new qn(e)]}else if(e.selector)e=[new Ws(e)];else if(e.name)e=[new js(e)];else if(e.text)e=[new eo(e)];else throw new Error("Unknown node type in node creation");return e.map(i=>(i[Qn]||no.rebuild(i),i=i.proxyOf,i.parent&&i.parent.removeChild(i),i[Kn]&&io(i),typeof i.raws.before>"u"&&t&&typeof t.raws.before<"u"&&(i.raws.before=t.raws.before.replace(/\S/g,"")),i.parent=this.proxyOf,i))}prepend(...e){e=e.reverse();for(let t of e){let r=this.normalize(t,this.first,"prepend").reverse();for(let i of r)this.proxyOf.nodes.unshift(i);for(let i in this.indexes)this.indexes[i]=this.indexes[i]+r.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);let t;for(let r in this.indexes)t=this.indexes[r],t>=e&&(this.indexes[r]=t-1);return this.markDirty(),this}replaceValues(e,t,r){return r||(r=t,t={}),this.walkDecls(i=>{t.props&&!t.props.includes(i.prop)||t.fast&&!i.value.includes(t.fast)||(i.value=i.value.replace(e,r))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,r)=>{let i;try{i=e(t,r)}catch(n){throw t.addToError(n)}return i!==!1&&t.walk&&(i=t.walk(e)),i})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="atrule"&&e.test(r.name))return t(r,i)}):this.walk((r,i)=>{if(r.type==="atrule"&&r.name===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="atrule")return t(r,i)}))}walkComments(e){return this.walk((t,r)=>{if(t.type==="comment")return e(t,r)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="decl"&&e.test(r.prop))return t(r,i)}):this.walk((r,i)=>{if(r.type==="decl"&&r.prop===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="decl")return t(r,i)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="rule"&&e.test(r.selector))return t(r,i)}):this.walk((r,i)=>{if(r.type==="rule"&&r.selector===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="rule")return t(r,i)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}};me.registerParse=s=>{to=s};me.registerRule=s=>{Ws=s};me.registerAtRule=s=>{js=s};me.registerRoot=s=>{ro=s};var Re=me;me.default=me;me.rebuild=s=>{s.type==="atrule"?Object.setPrototypeOf(s,js.prototype):s.type==="rule"?Object.setPrototypeOf(s,Ws.prototype):s.type==="decl"?Object.setPrototypeOf(s,qn.prototype):s.type==="comment"?Object.setPrototypeOf(s,eo.prototype):s.type==="root"&&Object.setPrototypeOf(s,ro.prototype),s[Qn]=!0,s.nodes&&s.nodes.forEach(e=>{me.rebuild(e)})};let du=Re,oo,ao,et=class extends du{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new oo(new ao,this,e).stringify()}};et.registerLazyResult=s=>{oo=s};et.registerProcessor=s=>{ao=s};var Hs=et;et.default=et;let Ni={};var lo=function(e){Ni[e]||(Ni[e]=!0,typeof console<"u"&&console.warn&&console.warn(e))};let as=class{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let r=t.node.rangeBy(t);this.line=r.start.line,this.column=r.start.column,this.endLine=r.end.line,this.endColumn=r.end.column}for(let r in t)this[r]=t[r]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}};var uo=as;as.default=as;let mu=uo,ls=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 mu(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>e.type==="warning")}get content(){return this.css}};var Gs=ls;ls.default=ls;const Ur=39,Ti=34,St=92,Pi=47,Ct=10,Ve=32,_t=12,xt=9,It=13,gu=91,yu=93,wu=40,bu=41,vu=123,Su=125,Cu=59,_u=42,xu=58,Iu=64,Rt=/[\t\n\f\r "#'()/;[\\\]{}]/g,kt=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,Ru=/.[\r\n"'(/\\]/,Di=/[\da-f]/i;var ku=function(e,t={}){let r=e.css.valueOf(),i=t.ignoreErrors,n,o,l,a,u,h,c,p,d,g,m=r.length,f=0,v=[],b=[];function y(){return f}function C(T){throw e.error("Unclosed "+T,f)}function I(){return b.length===0&&f>=m}function O(T){if(b.length)return b.pop();if(f>=m)return;let A=T?T.ignoreUnclosed:!1;switch(n=r.charCodeAt(f),n){case Ct:case Ve:case xt:case It:case _t:{o=f;do o+=1,n=r.charCodeAt(o);while(n===Ve||n===Ct||n===xt||n===It||n===_t);g=["space",r.slice(f,o)],f=o-1;break}case gu:case yu:case vu:case Su:case xu:case Cu:case bu:{let z=String.fromCharCode(n);g=[z,z,f];break}case wu:{if(p=v.length?v.pop()[1]:"",d=r.charCodeAt(f+1),p==="url"&&d!==Ur&&d!==Ti&&d!==Ve&&d!==Ct&&d!==xt&&d!==_t&&d!==It){o=f;do{if(h=!1,o=r.indexOf(")",o+1),o===-1)if(i||A){o=f;break}else C("bracket");for(c=o;r.charCodeAt(c-1)===St;)c-=1,h=!h}while(h);g=["brackets",r.slice(f,o+1),f,o],f=o}else o=r.indexOf(")",f+1),a=r.slice(f,o+1),o===-1||Ru.test(a)?g=["(","(",f]:(g=["brackets",a,f,o],f=o);break}case Ur:case Ti:{l=n===Ur?"'":'"',o=f;do{if(h=!1,o=r.indexOf(l,o+1),o===-1)if(i||A){o=f+1;break}else C("string");for(c=o;r.charCodeAt(c-1)===St;)c-=1,h=!h}while(h);g=["string",r.slice(f,o+1),f,o],f=o;break}case Iu:{Rt.lastIndex=f+1,Rt.test(r),Rt.lastIndex===0?o=r.length-1:o=Rt.lastIndex-2,g=["at-word",r.slice(f,o+1),f,o],f=o;break}case St:{for(o=f,u=!0;r.charCodeAt(o+1)===St;)o+=1,u=!u;if(n=r.charCodeAt(o+1),u&&n!==Pi&&n!==Ve&&n!==Ct&&n!==xt&&n!==It&&n!==_t&&(o+=1,Di.test(r.charAt(o)))){for(;Di.test(r.charAt(o+1));)o+=1;r.charCodeAt(o+1)===Ve&&(o+=1)}g=["word",r.slice(f,o+1),f,o],f=o;break}default:{n===Pi&&r.charCodeAt(f+1)===_u?(o=r.indexOf("*/",f+2)+1,o===0&&(i||A?o=r.length:C("comment")),g=["comment",r.slice(f,o+1),f,o],f=o):(kt.lastIndex=f+1,kt.test(r),kt.lastIndex===0?o=r.length-1:o=kt.lastIndex-2,g=["word",r.slice(f,o+1),f,o],v.push(g),f=o);break}}return f++,g}function B(T){b.push(T)}return{back:B,endOfFile:I,nextToken:O,position:y}};let co=Re,sr=class extends co{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}};var Vs=sr;sr.default=sr;co.registerAtRule(sr);let ho=Re,fo,po,Pe=class extends ho{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,r){let i=super.normalize(e);if(t){if(r==="prepend")this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let n of i)n.raws.before=t.raws.before}return i}removeChild(e,t){let r=this.index(e);return!t&&r===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(e)}toResult(e={}){return new fo(new po,this,e).stringify()}};Pe.registerLazyResult=s=>{fo=s};Pe.registerProcessor=s=>{po=s};var ct=Pe;Pe.default=Pe;ho.registerRoot(Pe);let tt={comma(s){return tt.split(s,[","],!0)},space(s){let e=[" ",`
24
- `," "];return tt.split(s,e)},split(s,e,t){let r=[],i="",n=!1,o=0,l=!1,a="",u=!1;for(let h of s)u?u=!1:h==="\\"?u=!0:l?h===a&&(l=!1):h==='"'||h==="'"?(l=!0,a=h):h==="("?o+=1:h===")"?o>0&&(o-=1):o===0&&e.includes(h)&&(n=!0),n?(i!==""&&r.push(i.trim()),i="",n=!1):i+=h;return(t||i!=="")&&r.push(i.trim()),r}};var mo=tt;tt.default=tt;let go=Re,Eu=mo,ir=class extends go{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return Eu.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,r=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(r)}};var Ys=ir;ir.default=ir;go.registerRule(ir);let Au=vr,Mu=ku,Ou=Cr,$u=Vs,Nu=ct,Li=Ys;const Fi={empty:!0,space:!0};function Tu(s){for(let e=s.length-1;e>=0;e--){let t=s[e],r=t[3]||t[2];if(r)return r}}let Pu=class{constructor(e){this.input=e,this.root=new Nu,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 $u;t.name=e[1].slice(1),t.name===""&&this.unnamedAtrule(t,e),this.init(t,e[2]);let r,i,n,o=!1,l=!1,a=[],u=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),r=e[0],r==="("||r==="["?u.push(r==="("?")":"]"):r==="{"&&u.length>0?u.push("}"):r===u[u.length-1]&&u.pop(),u.length===0)if(r===";"){t.source.end=this.getPosition(e[2]),t.source.end.offset++,this.semicolon=!0;break}else if(r==="{"){l=!0;break}else if(r==="}"){if(a.length>0){for(n=a.length-1,i=a[n];i&&i[0]==="space";)i=a[--n];i&&(t.source.end=this.getPosition(i[3]||i[2]),t.source.end.offset++)}this.end(e);break}else a.push(e);else a.push(e);if(this.tokenizer.endOfFile()){o=!0;break}}t.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(t.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(t,"params",a),o&&(e=a[a.length-1],t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++,this.spaces=t.raws.between,t.raws.between="")):(t.raws.afterName="",t.params=""),l&&(t.nodes=[],this.current=t)}checkMissedSemicolon(e){let t=this.colon(e);if(t===!1)return;let r=0,i;for(let n=t-1;n>=0&&(i=e[n],!(i[0]!=="space"&&(r+=1,r===2)));n--);throw this.input.error("Missed semicolon",i[0]==="word"?i[3]+1:i[2])}colon(e){let t=0,r,i,n;for(let[o,l]of e.entries()){if(r=l,i=r[0],i==="("&&(t+=1),i===")"&&(t-=1),t===0&&i===":")if(!n)this.doubleColon(r);else{if(n[0]==="word"&&n[1]==="progid")continue;return o}n=r}return!1}comment(e){let t=new Ou;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let r=e[1].slice(2,-2);if(/^\s*$/.test(r))t.text="",t.raws.left=r,t.raws.right="";else{let i=r.match(/^(\s*)([^]*\S)(\s*)$/);t.text=i[2],t.raws.left=i[1],t.raws.right=i[3]}}createTokenizer(){this.tokenizer=Mu(this.input)}decl(e,t){let r=new Au;this.init(r,e[0][2]);let i=e[e.length-1];for(i[0]===";"&&(this.semicolon=!0,e.pop()),r.source.end=this.getPosition(i[3]||i[2]||Tu(e)),r.source.end.offset++;e[0][0]!=="word";)e.length===1&&this.unknownWord(e),r.raws.before+=e.shift()[1];for(r.source.start=this.getPosition(e[0][2]),r.prop="";e.length;){let u=e[0][0];if(u===":"||u==="space"||u==="comment")break;r.prop+=e.shift()[1]}r.raws.between="";let n;for(;e.length;)if(n=e.shift(),n[0]===":"){r.raws.between+=n[1];break}else n[0]==="word"&&/\w/.test(n[1])&&this.unknownWord([n]),r.raws.between+=n[1];(r.prop[0]==="_"||r.prop[0]==="*")&&(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let o=[],l;for(;e.length&&(l=e[0][0],!(l!=="space"&&l!=="comment"));)o.push(e.shift());this.precheckMissedSemicolon(e);for(let u=e.length-1;u>=0;u--){if(n=e[u],n[1].toLowerCase()==="!important"){r.important=!0;let h=this.stringFrom(e,u);h=this.spacesFromEnd(e)+h,h!==" !important"&&(r.raws.important=h);break}else if(n[1].toLowerCase()==="important"){let h=e.slice(0),c="";for(let p=u;p>0;p--){let d=h[p][0];if(c.trim().indexOf("!")===0&&d!=="space")break;c=h.pop()[1]+c}c.trim().indexOf("!")===0&&(r.important=!0,r.raws.important=c,e=h)}if(n[0]!=="space"&&n[0]!=="comment")break}e.some(u=>u[0]!=="space"&&u[0]!=="comment")&&(r.raws.between+=o.map(u=>u[1]).join(""),o=[]),this.raw(r,"value",o.concat(e),t),r.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new Li;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let t=this.current.nodes[this.current.nodes.length-1];t&&t.type==="rule"&&!t.raws.ownSemicolon&&(t.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="",e.type!=="comment"&&(this.semicolon=!1)}other(e){let t=!1,r=null,i=!1,n=null,o=[],l=e[1].startsWith("--"),a=[],u=e;for(;u;){if(r=u[0],a.push(u),r==="("||r==="[")n||(n=u),o.push(r==="("?")":"]");else if(l&&i&&r==="{")n||(n=u),o.push("}");else if(o.length===0)if(r===";")if(i){this.decl(a,l);return}else break;else if(r==="{"){this.rule(a);return}else if(r==="}"){this.tokenizer.back(a.pop()),t=!0;break}else r===":"&&(i=!0);else r===o[o.length-1]&&(o.pop(),o.length===0&&(n=null));u=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),o.length>0&&this.unclosedBracket(n),t&&i){if(!l)for(;a.length&&(u=a[a.length-1][0],!(u!=="space"&&u!=="comment"));)this.tokenizer.back(a.pop());this.decl(a,l)}else this.unknownWord(a)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e);break}this.endFile()}precheckMissedSemicolon(){}raw(e,t,r,i){let n,o,l=r.length,a="",u=!0,h,c;for(let p=0;p<l;p+=1)n=r[p],o=n[0],o==="space"&&p===l-1&&!i?u=!1:o==="comment"?(c=r[p-1]?r[p-1][0]:"empty",h=r[p+1]?r[p+1][0]:"empty",!Fi[c]&&!Fi[h]?a.slice(-1)===","?u=!1:a+=n[1]:u=!1):a+=n[1];if(!u){let p=r.reduce((d,g)=>d+g[1],"");e.raws[t]={raw:p,value:a}}e[t]=a}rule(e){e.pop();let t=new Li;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],!(t!=="space"&&t!=="comment"));)r=e.pop()[1]+r;return r}spacesAndCommentsFromStart(e){let t,r="";for(;e.length&&(t=e[0][0],!(t!=="space"&&t!=="comment"));)r+=e.shift()[1];return r}spacesFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],t==="space");)r=e.pop()[1]+r;return r}stringFrom(e,t){let r="";for(let i=t;i<e.length;i++)r+=e[i][1];return e.splice(t,e.length-t),r}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word",{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}};var Du=Pu;let Lu=Re,Fu=Du,Uu=Sr;function nr(s,e){let t=new Uu(s,e),r=new Fu(t);try{r.parse()}catch(i){throw process.env.NODE_ENV!=="production"&&i.name==="CssSyntaxError"&&e&&e.from&&(/\.scss$/i.test(e.from)?i.message+=`
25
- You tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser`:/\.sass/i.test(e.from)?i.message+=`
26
- You tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser`:/\.less$/i.test(e.from)&&(i.message+=`
27
- You tried to parse Less with the standard CSS parser; try again with the postcss-less parser`)),i}return r.root}var Zs=nr;nr.default=nr;Lu.registerParse(nr);let{isClean:he,my:Bu}=ut,zu=Xn,Wu=wr,ju=Re,Hu=Hs,Gu=lo,Ui=Gs,Vu=Zs,Yu=ct;const Zu={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},Ju={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},Xu={Once:!0,postcssPlugin:!0,prepare:!0},De=0;function Ye(s){return typeof s=="object"&&typeof s.then=="function"}function yo(s){let e=!1,t=Zu[s.type];return s.type==="decl"?e=s.prop.toLowerCase():s.type==="atrule"&&(e=s.name.toLowerCase()),e&&s.append?[t,t+"-"+e,De,t+"Exit",t+"Exit-"+e]:e?[t,t+"-"+e,t+"Exit",t+"Exit-"+e]:s.append?[t,De,t+"Exit"]:[t,t+"Exit"]}function Bi(s){let e;return s.type==="document"?e=["Document",De,"DocumentExit"]:s.type==="root"?e=["Root",De,"RootExit"]:e=yo(s),{eventIndex:0,events:e,iterator:0,node:s,visitorIndex:0,visitors:[]}}function us(s){return s[he]=!1,s.nodes&&s.nodes.forEach(e=>us(e)),s}let cs={},Le=class wo{constructor(e,t,r){this.stringified=!1,this.processed=!1;let i;if(typeof t=="object"&&t!==null&&(t.type==="root"||t.type==="document"))i=us(t);else if(t instanceof wo||t instanceof Ui)i=us(t.root),t.map&&(typeof r.map>"u"&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=t.map);else{let n=Vu;r.syntax&&(n=r.syntax.parse),r.parser&&(n=r.parser),n.parse&&(n=n.parse);try{i=n(t,r)}catch(o){this.processed=!0,this.error=o}i&&!i[Bu]&&ju.rebuild(i)}this.result=new Ui(e,i,r),this.helpers={...cs,postcss:cs,result:this.result},this.plugins=this.processor.plugins.map(n=>typeof n=="object"&&n.prepare?{...n,...n.prepare(this.result)}:n)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let r=this.result.lastPlugin;try{if(t&&t.addToError(e),this.error=e,e.name==="CssSyntaxError"&&!e.plugin)e.plugin=r.postcssPlugin,e.setMessage();else if(r.postcssVersion&&process.env.NODE_ENV!=="production"){let i=r.postcssPlugin,n=r.postcssVersion,o=this.result.processor.version,l=n.split("."),a=o.split(".");(l[0]!==a[0]||parseInt(l[1])>parseInt(a[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+o+", but "+i+" uses "+n+". Perhaps this is the source of the error below.")}}catch(i){console&&console.error&&console.error(i)}return e}prepareVisitors(){this.listeners={};let e=(t,r,i)=>{this.listeners[r]||(this.listeners[r]=[]),this.listeners[r].push([t,i])};for(let t of this.plugins)if(typeof t=="object")for(let r in t){if(!Ju[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!Xu[r])if(typeof t[r]=="object")for(let i in t[r])i==="*"?e(t,r,t[r][i]):e(t,r+"-"+i.toLowerCase(),t[r][i]);else typeof t[r]=="function"&&e(t,r,t[r])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let t=this.plugins[e],r=this.runOnRoot(t);if(Ye(r))try{await r}catch(i){throw this.handleError(i)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[he];){e[he]=!0;let t=[Bi(e)];for(;t.length>0;){let r=this.visitTick(t);if(Ye(r))try{await r}catch(i){let n=t[t.length-1].node;throw this.handleError(i,n)}}}if(this.listeners.OnceExit)for(let[t,r]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if(e.type==="document"){let i=e.nodes.map(n=>r(n,this.helpers));await Promise.all(i)}else await r(e,this.helpers)}catch(i){throw this.handleError(i)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if(typeof e=="object"&&e.Once){if(this.result.root.type==="document"){let t=this.result.root.nodes.map(r=>e.Once(r,this.helpers));return Ye(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=Wu;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let i=new zu(t,this.result.root,this.result.opts).generate();return this.result.css=i[0],this.result.map=i[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins){let t=this.runOnRoot(e);if(Ye(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 process.env.NODE_ENV!=="production"&&("from"in this.opts||Gu("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[r,i]of e){this.result.lastPlugin=r;let n;try{n=i(t,this.helpers)}catch(o){throw this.handleError(o,t.proxyOf)}if(t.type!=="root"&&t.type!=="document"&&!t.parent)return!0;if(Ye(n))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:r,visitors:i}=t;if(r.type!=="root"&&r.type!=="document"&&!r.parent){e.pop();return}if(i.length>0&&t.visitorIndex<i.length){let[o,l]=i[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===i.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=o;try{return l(r.toProxy(),this.helpers)}catch(a){throw this.handleError(a,r)}}if(t.iterator!==0){let o=t.iterator,l;for(;l=r.nodes[r.indexes[o]];)if(r.indexes[o]+=1,!l[he]){l[he]=!0,e.push(Bi(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===De){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=yo(e);for(let r of t)if(r===De)e.nodes&&e.each(i=>{i[he]||this.walkSync(i)});else{let i=this.listeners[r];if(i&&this.visitSync(i,e.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}};Le.registerPostcss=s=>{cs=s};var bo=Le;Le.default=Le;Yu.registerLazyResult(Le);Hu.registerLazyResult(Le);let Ku=Xn,Qu=wr,qu=lo,ec=Zs;const tc=Gs;let hs=class{constructor(e,t,r){t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=r,this._map=void 0;let i,n=Qu;this.result=new tc(this._processor,i,this._opts),this.result.css=t;let o=this;Object.defineProperty(this.result,"root",{get(){return o.root}});let l=new Ku(n,i,this._opts,t);if(l.isMap()){let[a,u]=l.generate();a&&(this.result.css=a),u&&(this.result.map=u)}else l.clearAnnotation(),this.result.css=l.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return process.env.NODE_ENV!=="production"&&("from"in this._opts||qu("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(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=ec;try{e=t(this._css,this._opts)}catch(r){this.error=r}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}};var rc=hs;hs.default=hs;let sc=rc,ic=bo,nc=Hs,oc=ct,rt=class{constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let r of e)if(r.postcss===!0?r=r():r.postcss&&(r=r.postcss),typeof r=="object"&&Array.isArray(r.plugins))t=t.concat(r.plugins);else if(typeof r=="object"&&r.postcssPlugin)t.push(r);else if(typeof r=="function")t.push(r);else if(typeof r=="object"&&(r.parse||r.stringify)){if(process.env.NODE_ENV!=="production")throw new Error("PostCSS syntaxes cannot be used as plugins. Instead, please use one of the syntax/parser/stringifier options as outlined in your PostCSS runner documentation.")}else throw new Error(r+" is not a PostCSS plugin");return t}process(e,t={}){return!this.plugins.length&&!t.parser&&!t.stringifier&&!t.syntax?new sc(this,e,t):new ic(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var ac=rt;rt.default=rt;oc.registerProcessor(rt);nc.registerProcessor(rt);let lc=vr,uc=Gn,cc=Cr,hc=Vs,fc=Sr,pc=ct,dc=Ys;function st(s,e){if(Array.isArray(s))return s.map(i=>st(i));let{inputs:t,...r}=s;if(t){e=[];for(let i of t){let n={...i,__proto__:fc.prototype};n.map&&(n.map={...n.map,__proto__:uc.prototype}),e.push(n)}}if(r.nodes&&(r.nodes=s.nodes.map(i=>st(i,e))),r.source){let{inputId:i,...n}=r.source;r.source=n,i!=null&&(r.source.input=e[i])}if(r.type==="root")return new pc(r);if(r.type==="decl")return new lc(r);if(r.type==="rule")return new dc(r);if(r.type==="comment")return new cc(r);if(r.type==="atrule")return new hc(r);throw new Error("Unknown node type: "+s.type)}var mc=st;st.default=st;let gc=zs,vo=vr,yc=bo,wc=Re,Js=ac,bc=wr,vc=mc,So=Hs,Sc=uo,Co=Cr,_o=Vs,Cc=Gs,_c=Sr,xc=Zs,Ic=mo,xo=Ys,Io=ct,Rc=br;function $(...s){return s.length===1&&Array.isArray(s[0])&&(s=s[0]),new Js(s)}$.plugin=function(e,t){let r=!1;function i(...o){console&&console.warn&&!r&&(r=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide:
28
- https://evilmartians.com/chronicles/postcss-8-plugin-migration`),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(e+`: 里面 postcss.plugin 被弃用. 迁移指南:
29
- https://www.w3ctech.com/topic/2226`));let l=t(...o);return l.postcssPlugin=e,l.postcssVersion=new Js().version,l}let n;return Object.defineProperty(i,"postcss",{get(){return n||(n=i()),n}}),i.process=function(o,l,a){return $([i(a)]).process(o,l)},i};$.stringify=bc;$.parse=xc;$.fromJSON=vc;$.list=Ic;$.comment=s=>new Co(s);$.atRule=s=>new _o(s);$.decl=s=>new vo(s);$.rule=s=>new xo(s);$.root=s=>new Io(s);$.document=s=>new So(s);$.CssSyntaxError=gc;$.Declaration=vo;$.Container=wc;$.Processor=Js;$.Document=So;$.Comment=Co;$.Warning=Sc;$.AtRule=_o;$.Result=Cc;$.Input=_c;$.Rule=xo;$.Root=Io;$.Node=Rc;yc.registerPostcss($);var kc=$;$.default=$;const W=Fl(kc);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 Ec=Object.defineProperty,Ac=(s,e,t)=>e in s?Ec(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,ie=(s,e,t)=>Ac(s,typeof e!="symbol"?e+"":e,t);function Mc(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}function Oc(s){if(s.__esModule)return s;var e=s.default;if(typeof e=="function"){var t=function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(s).forEach(function(r){var i=Object.getOwnPropertyDescriptor(s,r);Object.defineProperty(t,r,i.get?i:{enumerable:!0,get:function(){return s[r]}})}),t}var Xs={exports:{}},U=String,Ro=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}};Xs.exports=Ro();Xs.exports.createColors=Ro;var $c=Xs.exports;const Nc={},Tc=Object.freeze(Object.defineProperty({__proto__:null,default:Nc},Symbol.toStringTag,{value:"Module"})),le=Oc(Tc);let zi=$c,Wi=le,fs=class ko extends Error{constructor(e,t,r,i,n,o){super(e),this.name="CssSyntaxError",this.reason=e,n&&(this.file=n),i&&(this.source=i),o&&(this.plugin=o),typeof t<"u"&&typeof r<"u"&&(typeof t=="number"?(this.line=t,this.column=r):(this.line=t.line,this.column=t.column,this.endLine=r.line,this.endColumn=r.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,ko)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let t=this.source;e==null&&(e=zi.isColorSupported),Wi&&e&&(t=Wi(t));let r=t.split(/\r?\n/),i=Math.max(this.line-3,0),n=Math.min(this.line+2,r.length),o=String(n).length,l,a;if(e){let{bold:u,gray:h,red:c}=zi.createColors(!0);l=p=>u(c(p)),a=p=>h(p)}else l=a=u=>u;return r.slice(i,n).map((u,h)=>{let c=i+1+h,p=" "+(" "+c).slice(-o)+" | ";if(c===this.line){let d=a(p.replace(/\d/g," "))+u.slice(0,this.column-1).replace(/[^\t]/g," ");return l(">")+a(p)+u+`
30
- `+d+l("^")}return" "+a(p)+u}).join(`
31
- `)}toString(){let e=this.showSourceCode();return e&&(e=`
32
-
33
- `+e+`
34
- `),this.name+": "+this.message+e}};var Ks=fs;fs.default=fs;var ht={};ht.isClean=Symbol("isClean");ht.my=Symbol("my");const ji={after:`
35
- `,beforeClose:`
36
- `,beforeComment:`
37
- `,beforeDecl:`
38
- `,beforeOpen:" ",beforeRule:`
39
- `,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function Pc(s){return s[0].toUpperCase()+s.slice(1)}let ps=class{constructor(e){this.builder=e}atrule(e,t){let r="@"+e.name,i=e.params?this.rawValue(e,"params"):"";if(typeof e.raws.afterName<"u"?r+=e.raws.afterName:i&&(r+=" "),e.nodes)this.block(e,r+i);else{let n=(e.raws.between||"")+(t?";":"");this.builder(r+i+n,e)}}beforeAfter(e,t){let r;e.type==="decl"?r=this.raw(e,null,"beforeDecl"):e.type==="comment"?r=this.raw(e,null,"beforeComment"):t==="before"?r=this.raw(e,null,"beforeRule"):r=this.raw(e,null,"beforeClose");let i=e.parent,n=0;for(;i&&i.type!=="root";)n+=1,i=i.parent;if(r.includes(`
40
- `)){let o=this.raw(e,null,"indent");if(o.length)for(let l=0;l<n;l++)r+=o}return r}block(e,t){let r=this.raw(e,"between","beforeOpen");this.builder(t+r+"{",e,"start");let i;e.nodes&&e.nodes.length?(this.body(e),i=this.raw(e,"after")):i=this.raw(e,"after","emptyBody"),i&&this.builder(i),this.builder("}",e,"end")}body(e){let t=e.nodes.length-1;for(;t>0&&e.nodes[t].type==="comment";)t-=1;let r=this.raw(e,"semicolon");for(let i=0;i<e.nodes.length;i++){let n=e.nodes[i],o=this.raw(n,"before");o&&this.builder(o),this.stringify(n,t!==i||r)}}comment(e){let t=this.raw(e,"left","commentLeft"),r=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+r+"*/",e)}decl(e,t){let r=this.raw(e,"between","colon"),i=e.prop+r+this.rawValue(e,"value");e.important&&(i+=e.raws.important||" !important"),t&&(i+=";"),this.builder(i,e)}document(e){this.body(e)}raw(e,t,r){let i;if(r||(r=t),t&&(i=e.raws[t],typeof i<"u"))return i;let n=e.parent;if(r==="before"&&(!n||n.type==="root"&&n.first===e||n&&n.type==="document"))return"";if(!n)return ji[r];let o=e.root();if(o.rawCache||(o.rawCache={}),typeof o.rawCache[r]<"u")return o.rawCache[r];if(r==="before"||r==="after")return this.beforeAfter(e,r);{let l="raw"+Pc(r);this[l]?i=this[l](o,e):o.walk(a=>{if(i=a.raws[t],typeof i<"u")return!1})}return typeof i>"u"&&(i=ji[r]),o.rawCache[r]=i,i}rawBeforeClose(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length>0&&typeof r.raws.after<"u")return t=r.raws.after,t.includes(`
41
- `)&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let r;return e.walkComments(i=>{if(typeof i.raws.before<"u")return r=i.raws.before,r.includes(`
42
- `)&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r>"u"?r=this.raw(t,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeDecl(e,t){let r;return e.walkDecls(i=>{if(typeof i.raws.before<"u")return r=i.raws.before,r.includes(`
43
- `)&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r>"u"?r=this.raw(t,null,"beforeRule"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeOpen(e){let t;return e.walk(r=>{if(r.type!=="decl"&&(t=r.raws.between,typeof t<"u"))return!1}),t}rawBeforeRule(e){let t;return e.walk(r=>{if(r.nodes&&(r.parent!==e||e.first!==r)&&typeof r.raws.before<"u")return t=r.raws.before,t.includes(`
44
- `)&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls(r=>{if(typeof r.raws.between<"u")return t=r.raws.between.replace(/[^\s:]/g,""),!1}),t}rawEmptyBody(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length===0&&(t=r.raws.after,typeof t<"u"))return!1}),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk(r=>{let i=r.parent;if(i&&i!==e&&i.parent&&i.parent===e&&typeof r.raws.before<"u"){let n=r.raws.before.split(`
45
- `);return t=n[n.length-1],t=t.replace(/\S/g,""),!1}}),t}rawSemicolon(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length&&r.last.type==="decl"&&(t=r.raws.semicolon,typeof t<"u"))return!1}),t}rawValue(e,t){let r=e[t],i=e.raws[t];return i&&i.value===r?i.raw:r}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}};var Eo=ps;ps.default=ps;let Dc=Eo;function ds(s,e){new Dc(e).stringify(s)}var _r=ds;ds.default=ds;let{isClean:Et,my:Lc}=ht,Fc=Ks,Uc=Eo,Bc=_r;function ms(s,e){let t=new s.constructor;for(let r in s){if(!Object.prototype.hasOwnProperty.call(s,r)||r==="proxyCache")continue;let i=s[r],n=typeof i;r==="parent"&&n==="object"?e&&(t[r]=e):r==="source"?t[r]=i:Array.isArray(i)?t[r]=i.map(o=>ms(o,t)):(n==="object"&&i!==null&&(i=ms(i)),t[r]=i)}return t}let gs=class{constructor(e={}){this.raws={},this[Et]=!1,this[Lc]=!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=ms(this);for(let r in e)t[r]=e[r];return t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}error(e,t={}){if(this.source){let{end:r,start:i}=this.rangeBy(t);return this.source.input.error(e,{column:i.column,line:i.line},{column:r.column,line:r.line},t)}return new Fc(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[Et]){this[Et]=!1;let e=this;for(;e=e.parent;)e[Et]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let r=this.source.start;if(e.index)r=this.positionInside(e.index,t);else if(e.word){t=this.toString();let i=t.indexOf(e.word);i!==-1&&(r=this.positionInside(i,t))}return r}positionInside(e,t){let r=t||this.toString(),i=this.source.start.column,n=this.source.start.line;for(let o=0;o<e;o++)r[o]===`
46
- `?(i=1,n+=1):i+=1;return{column:i,line:n}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e){let t={column:this.source.start.column,line:this.source.start.line},r=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:t.column+1,line:t.line};if(e.word){let i=this.toString(),n=i.indexOf(e.word);n!==-1&&(t=this.positionInside(n,i),r=this.positionInside(n+e.word.length,i))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?r={column:e.end.column,line:e.end.line}:typeof e.endIndex=="number"?r=this.positionInside(e.endIndex):e.index&&(r=this.positionInside(e.index+1));return(r.line<t.line||r.line===t.line&&r.column<=t.column)&&(r={column:t.column+1,line:t.line}),{end:r,start:t}}raw(e,t){return new Uc().raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let t=this,r=!1;for(let i of e)i===this?r=!0:r?(this.parent.insertAfter(t,i),t=i):this.parent.insertBefore(t,i);r||this.remove()}return this}root(){let e=this;for(;e.parent&&e.parent.type!=="document";)e=e.parent;return e}toJSON(e,t){let r={},i=t==null;t=t||new Map;let n=0;for(let o in this){if(!Object.prototype.hasOwnProperty.call(this,o)||o==="parent"||o==="proxyCache")continue;let l=this[o];if(Array.isArray(l))r[o]=l.map(a=>typeof a=="object"&&a.toJSON?a.toJSON(null,t):a);else if(typeof l=="object"&&l.toJSON)r[o]=l.toJSON(null,t);else if(o==="source"){let a=t.get(l.input);a==null&&(a=n,t.set(l.input,n),n++),r[o]={end:l.end,inputId:a,start:l.start}}else r[o]=l}return i&&(r.inputs=[...t.keys()].map(o=>o.toJSON())),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=Bc){e.stringify&&(e=e.stringify);let t="";return e(this,r=>{t+=r}),t}warn(e,t,r){let i={node:this};for(let n in r)i[n]=r[n];return e.warn(t,i)}get proxyOf(){return this}};var xr=gs;gs.default=gs;let zc=xr,ys=class extends zc{constructor(e){e&&typeof e.value<"u"&&typeof e.value!="string"&&(e={...e,value:String(e.value)}),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}};var Ir=ys;ys.default=ys;let Wc="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",jc=(s=21)=>{let e="",t=s;for(;t--;)e+=Wc[Math.random()*64|0];return e};var Hc={nanoid:jc};let{SourceMapConsumer:Hi,SourceMapGenerator:Gi}=le,{existsSync:Gc,readFileSync:Vc}=le,{dirname:Br,join:Yc}=le;function Zc(s){return Buffer?Buffer.from(s,"base64").toString():window.atob(s)}let ws=class{constructor(e,t){if(t.map===!1)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let r=t.map?t.map.prev:void 0,i=this.loadMap(t.from,r);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=Br(this.mapFile)),i&&(this.text=i)}consumer(){return this.consumerCache||(this.consumerCache=new Hi(this.text)),this.consumerCache}decodeInline(e){let t=/^data:application\/json;charset=utf-?8;base64,/,r=/^data:application\/json;base64,/,i=/^data:application\/json;charset=utf-?8,/,n=/^data:application\/json,/;if(i.test(e)||n.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(t.test(e)||r.test(e))return Zc(e.substr(RegExp.lastMatch.length));let o=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+o)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return typeof e!="object"?!1:typeof e.mappings=="string"||typeof e._mappings=="string"||Array.isArray(e.sections)}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/gm);if(!t)return;let r=e.lastIndexOf(t.pop()),i=e.indexOf("*/",r);r>-1&&i>-1&&(this.annotation=this.getAnnotationURL(e.substring(r,i)))}loadFile(e){if(this.root=Br(e),Gc(e))return this.mapFile=e,Vc(e,"utf-8").toString().trim()}loadMap(e,t){if(t===!1)return!1;if(t){if(typeof t=="string")return t;if(typeof t=="function"){let r=t(e);if(r){let i=this.loadFile(r);if(!i)throw new Error("Unable to load previous source map: "+r.toString());return i}}else{if(t instanceof Hi)return Gi.fromSourceMap(t).toString();if(t instanceof Gi)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let r=this.annotation;return e&&(r=Yc(Br(e),r)),this.loadFile(r)}}}startWith(e,t){return e?e.substr(0,t.length)===t:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};var Ao=ws;ws.default=ws;let{SourceMapConsumer:Jc,SourceMapGenerator:Xc}=le,{fileURLToPath:Vi,pathToFileURL:At}=le,{isAbsolute:bs,resolve:vs}=le,{nanoid:Kc}=Hc,zr=le,Yi=Ks,Qc=Ao,Wr=Symbol("fromOffsetCache"),qc=!!(Jc&&Xc),Zi=!!(vs&&bs),or=class{constructor(e,t={}){if(e===null||typeof e>"u"||typeof e=="object"&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),this.css[0]==="\uFEFF"||this.css[0]==="￾"?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(!Zi||/^\w+:\/\//.test(t.from)||bs(t.from)?this.file=t.from:this.file=vs(t.from)),Zi&&qc){let r=new Qc(this.css,t);if(r.text){this.map=r;let i=r.consumer().file;!this.file&&i&&(this.file=this.mapResolve(i))}}this.file||(this.id="<input css "+Kc(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,r,i={}){let n,o,l;if(t&&typeof t=="object"){let u=t,h=r;if(typeof u.offset=="number"){let c=this.fromOffset(u.offset);t=c.line,r=c.col}else t=u.line,r=u.column;if(typeof h.offset=="number"){let c=this.fromOffset(h.offset);o=c.line,l=c.col}else o=h.line,l=h.column}else if(!r){let u=this.fromOffset(t);t=u.line,r=u.col}let a=this.origin(t,r,o,l);return a?n=new Yi(e,a.endLine===void 0?a.line:{column:a.column,line:a.line},a.endLine===void 0?a.column:{column:a.endColumn,line:a.endLine},a.source,a.file,i.plugin):n=new Yi(e,o===void 0?t:{column:r,line:t},o===void 0?r:{column:l,line:o},this.css,this.file,i.plugin),n.input={column:r,endColumn:l,endLine:o,line:t,source:this.css},this.file&&(At&&(n.input.url=At(this.file).toString()),n.input.file=this.file),n}fromOffset(e){let t,r;if(this[Wr])r=this[Wr];else{let n=this.css.split(`
47
- `);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[Wr]=r}t=r[r.length-1];let i=0;if(e>=t)i=r.length-1;else{let n=r.length-2,o;for(;i<n;)if(o=i+(n-i>>1),e<r[o])n=o-1;else if(e>=r[o+1])i=o+1;else{i=o;break}}return{col:e-r[i]+1,line:i+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:vs(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,r,i){if(!this.map)return!1;let n=this.map.consumer(),o=n.originalPositionFor({column:t,line:e});if(!o.source)return!1;let l;typeof r=="number"&&(l=n.originalPositionFor({column:i,line:r}));let a;bs(o.source)?a=At(o.source):a=new URL(o.source,this.map.consumer().sourceRoot||At(this.map.mapFile));let u={column:o.column,endColumn:l&&l.column,endLine:l&&l.line,line:o.line,url:a.toString()};if(a.protocol==="file:")if(Vi)u.file=Vi(a);else throw new Error("file: protocol is not available in this PostCSS build");let h=n.sourceContentFor(o.source);return h&&(u.source=h),u}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])this[t]!=null&&(e[t]=this[t]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}};var Rr=or;or.default=or;zr&&zr.registerInput&&zr.registerInput(or);let{SourceMapConsumer:Mo,SourceMapGenerator:Ht}=le,{dirname:Gt,relative:Oo,resolve:$o,sep:No}=le,{pathToFileURL:Ji}=le,eh=Rr,th=!!(Mo&&Ht),rh=!!(Gt&&$o&&Oo&&No),sh=class{constructor(e,t,r,i){this.stringify=e,this.mapOpts=r.map||{},this.root=t,this.opts=r,this.css=i,this.originalCSS=i,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;this.isInline()?e="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?e=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?e=this.mapOpts.annotation(this.opts.to,this.root):e=this.outputFile()+".map";let t=`
48
- `;this.css.includes(`\r
49
- `)&&(t=`\r
50
- `),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t=this.toUrl(this.path(e.file)),r=e.root||Gt(e.file),i;this.mapOpts.sourcesContent===!1?(i=new Mo(e.text),i.sourcesContent&&(i.sourcesContent=null)):i=e.consumer(),this.map.applySourceMap(i,t,this.toUrl(this.path(r)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],e.type==="comment"&&e.text.indexOf("# sourceMappingURL=")===0&&this.root.removeChild(t)}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),rh&&th&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,t=>{e+=t}),[e]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=Ht.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new Ht({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css="",this.map=new Ht({file:this.outputFile(),ignoreInvalidMapping:!0});let e=1,t=1,r="<no source>",i={generated:{column:0,line:0},original:{column:0,line:0},source:""},n,o;this.stringify(this.root,(l,a,u)=>{if(this.css+=l,a&&u!=="end"&&(i.generated.line=e,i.generated.column=t-1,a.source&&a.source.start?(i.source=this.sourcePath(a),i.original.line=a.source.start.line,i.original.column=a.source.start.column-1,this.map.addMapping(i)):(i.source=r,i.original.line=1,i.original.column=0,this.map.addMapping(i))),n=l.match(/\n/g),n?(e+=n.length,o=l.lastIndexOf(`
51
- `),t=l.length-o):t+=l.length,a&&u!=="start"){let h=a.parent||{raws:{}};(!(a.type==="decl"||a.type==="atrule"&&!a.nodes)||a!==h.last||h.raws.semicolon)&&(a.source&&a.source.end?(i.source=this.sourcePath(a),i.original.line=a.source.end.line,i.original.column=a.source.end.column-1,i.generated.line=e,i.generated.column=t-2,this.map.addMapping(i)):(i.source=r,i.original.line=1,i.original.column=0,i.generated.line=e,i.generated.column=t-1,this.map.addMapping(i)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(e=>e.annotation):!0}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let e=this.mapOpts.annotation;return typeof e<"u"&&e!==!0?!1:this.previous().length?this.previous().some(t=>t.inline):!0}isMap(){return typeof this.opts.map<"u"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent<"u"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(e=>e.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute||e.charCodeAt(0)===60||/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let r=this.opts.to?Gt(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(r=Gt($o(r,this.mapOpts.annotation)));let i=Oo(r,e);return this.memoizedPaths.set(e,i),i}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}});else{let e=new eh(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(t=>{if(t.source){let r=t.source.input.from;if(r&&!e[r]){e[r]=!0;let i=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(i,t.source.input.css)}}});else if(this.css){let t=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(t,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(Ji){let r=Ji(e).toString();return this.memoizedFileURLs.set(e,r),r}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;No==="\\"&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}};var To=sh;let ih=xr,Ss=class extends ih{constructor(e){super(e),this.type="comment"}};var kr=Ss;Ss.default=Ss;let{isClean:Po,my:Do}=ht,Lo=Ir,Fo=kr,nh=xr,Uo,Qs,qs,Bo;function zo(s){return s.map(e=>(e.nodes&&(e.nodes=zo(e.nodes)),delete e.source,e))}function Wo(s){if(s[Po]=!1,s.proxyOf.nodes)for(let e of s.proxyOf.nodes)Wo(e)}let ge=class jo extends nh{append(...e){for(let t of e){let r=this.normalize(t,this.last);for(let i of r)this.proxyOf.nodes.push(i)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t=this.getIterator(),r,i;for(;this.indexes[t]<this.proxyOf.nodes.length&&(r=this.indexes[t],i=e(this.proxyOf.nodes[r],r),i!==!1);)this.indexes[t]+=1;return delete this.indexes[t],i}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get(e,t){return t==="proxyOf"?e:e[t]?t==="each"||typeof t=="string"&&t.startsWith("walk")?(...r)=>e[t](...r.map(i=>typeof i=="function"?(n,o)=>i(n.toProxy(),o):i)):t==="every"||t==="some"?r=>e[t]((i,...n)=>r(i.toProxy(),...n)):t==="root"?()=>e.root().toProxy():t==="nodes"?e.nodes.map(r=>r.toProxy()):t==="first"||t==="last"?e[t].toProxy():e[t]:e[t]},set(e,t,r){return e[t]===r||(e[t]=r,(t==="name"||t==="params"||t==="selector")&&e.markDirty()),!0}}}index(e){return typeof e=="number"?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let r=this.index(e),i=this.normalize(t,this.proxyOf.nodes[r]).reverse();r=this.index(e);for(let o of i)this.proxyOf.nodes.splice(r+1,0,o);let n;for(let o in this.indexes)n=this.indexes[o],r<n&&(this.indexes[o]=n+i.length);return this.markDirty(),this}insertBefore(e,t){let r=this.index(e),i=r===0?"prepend":!1,n=this.normalize(t,this.proxyOf.nodes[r],i).reverse();r=this.index(e);for(let l of n)this.proxyOf.nodes.splice(r,0,l);let o;for(let l in this.indexes)o=this.indexes[l],r<=o&&(this.indexes[l]=o+n.length);return this.markDirty(),this}normalize(e,t){if(typeof e=="string")e=zo(Uo(e).nodes);else if(typeof e>"u")e=[];else if(Array.isArray(e)){e=e.slice(0);for(let i of e)i.parent&&i.parent.removeChild(i,"ignore")}else if(e.type==="root"&&this.type!=="document"){e=e.nodes.slice(0);for(let i of e)i.parent&&i.parent.removeChild(i,"ignore")}else if(e.type)e=[e];else if(e.prop){if(typeof e.value>"u")throw new Error("Value field is missed in node creation");typeof e.value!="string"&&(e.value=String(e.value)),e=[new Lo(e)]}else if(e.selector)e=[new Qs(e)];else if(e.name)e=[new qs(e)];else if(e.text)e=[new Fo(e)];else throw new Error("Unknown node type in node creation");return e.map(i=>(i[Do]||jo.rebuild(i),i=i.proxyOf,i.parent&&i.parent.removeChild(i),i[Po]&&Wo(i),typeof i.raws.before>"u"&&t&&typeof t.raws.before<"u"&&(i.raws.before=t.raws.before.replace(/\S/g,"")),i.parent=this.proxyOf,i))}prepend(...e){e=e.reverse();for(let t of e){let r=this.normalize(t,this.first,"prepend").reverse();for(let i of r)this.proxyOf.nodes.unshift(i);for(let i in this.indexes)this.indexes[i]=this.indexes[i]+r.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);let t;for(let r in this.indexes)t=this.indexes[r],t>=e&&(this.indexes[r]=t-1);return this.markDirty(),this}replaceValues(e,t,r){return r||(r=t,t={}),this.walkDecls(i=>{t.props&&!t.props.includes(i.prop)||t.fast&&!i.value.includes(t.fast)||(i.value=i.value.replace(e,r))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,r)=>{let i;try{i=e(t,r)}catch(n){throw t.addToError(n)}return i!==!1&&t.walk&&(i=t.walk(e)),i})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="atrule"&&e.test(r.name))return t(r,i)}):this.walk((r,i)=>{if(r.type==="atrule"&&r.name===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="atrule")return t(r,i)}))}walkComments(e){return this.walk((t,r)=>{if(t.type==="comment")return e(t,r)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="decl"&&e.test(r.prop))return t(r,i)}):this.walk((r,i)=>{if(r.type==="decl"&&r.prop===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="decl")return t(r,i)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="rule"&&e.test(r.selector))return t(r,i)}):this.walk((r,i)=>{if(r.type==="rule"&&r.selector===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="rule")return t(r,i)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}};ge.registerParse=s=>{Uo=s};ge.registerRule=s=>{Qs=s};ge.registerAtRule=s=>{qs=s};ge.registerRoot=s=>{Bo=s};var ke=ge;ge.default=ge;ge.rebuild=s=>{s.type==="atrule"?Object.setPrototypeOf(s,qs.prototype):s.type==="rule"?Object.setPrototypeOf(s,Qs.prototype):s.type==="decl"?Object.setPrototypeOf(s,Lo.prototype):s.type==="comment"?Object.setPrototypeOf(s,Fo.prototype):s.type==="root"&&Object.setPrototypeOf(s,Bo.prototype),s[Do]=!0,s.nodes&&s.nodes.forEach(e=>{ge.rebuild(e)})};let oh=ke,Ho,Go,it=class extends oh{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new Ho(new Go,this,e).stringify()}};it.registerLazyResult=s=>{Ho=s};it.registerProcessor=s=>{Go=s};var ei=it;it.default=it;let Xi={};var Vo=function(e){Xi[e]||(Xi[e]=!0,typeof console<"u"&&console.warn&&console.warn(e))};let Cs=class{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let r=t.node.rangeBy(t);this.line=r.start.line,this.column=r.start.column,this.endLine=r.end.line,this.endColumn=r.end.column}for(let r in t)this[r]=t[r]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}};var Yo=Cs;Cs.default=Cs;let ah=Yo,_s=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 ah(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>e.type==="warning")}get content(){return this.css}};var ti=_s;_s.default=_s;const jr=39,Ki=34,Mt=92,Qi=47,Ot=10,Ze=32,$t=12,Nt=9,Tt=13,lh=91,uh=93,ch=40,hh=41,fh=123,ph=125,dh=59,mh=42,gh=58,yh=64,Pt=/[\t\n\f\r "#'()/;[\\\]{}]/g,Dt=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,wh=/.[\r\n"'(/\\]/,qi=/[\da-f]/i;var bh=function(e,t={}){let r=e.css.valueOf(),i=t.ignoreErrors,n,o,l,a,u,h,c,p,d,g,m=r.length,f=0,v=[],b=[];function y(){return f}function C(T){throw e.error("Unclosed "+T,f)}function I(){return b.length===0&&f>=m}function O(T){if(b.length)return b.pop();if(f>=m)return;let A=T?T.ignoreUnclosed:!1;switch(n=r.charCodeAt(f),n){case Ot:case Ze:case Nt:case Tt:case $t:{o=f;do o+=1,n=r.charCodeAt(o);while(n===Ze||n===Ot||n===Nt||n===Tt||n===$t);g=["space",r.slice(f,o)],f=o-1;break}case lh:case uh:case fh:case ph:case gh:case dh:case hh:{let z=String.fromCharCode(n);g=[z,z,f];break}case ch:{if(p=v.length?v.pop()[1]:"",d=r.charCodeAt(f+1),p==="url"&&d!==jr&&d!==Ki&&d!==Ze&&d!==Ot&&d!==Nt&&d!==$t&&d!==Tt){o=f;do{if(h=!1,o=r.indexOf(")",o+1),o===-1)if(i||A){o=f;break}else C("bracket");for(c=o;r.charCodeAt(c-1)===Mt;)c-=1,h=!h}while(h);g=["brackets",r.slice(f,o+1),f,o],f=o}else o=r.indexOf(")",f+1),a=r.slice(f,o+1),o===-1||wh.test(a)?g=["(","(",f]:(g=["brackets",a,f,o],f=o);break}case jr:case Ki:{l=n===jr?"'":'"',o=f;do{if(h=!1,o=r.indexOf(l,o+1),o===-1)if(i||A){o=f+1;break}else C("string");for(c=o;r.charCodeAt(c-1)===Mt;)c-=1,h=!h}while(h);g=["string",r.slice(f,o+1),f,o],f=o;break}case yh:{Pt.lastIndex=f+1,Pt.test(r),Pt.lastIndex===0?o=r.length-1:o=Pt.lastIndex-2,g=["at-word",r.slice(f,o+1),f,o],f=o;break}case Mt:{for(o=f,u=!0;r.charCodeAt(o+1)===Mt;)o+=1,u=!u;if(n=r.charCodeAt(o+1),u&&n!==Qi&&n!==Ze&&n!==Ot&&n!==Nt&&n!==Tt&&n!==$t&&(o+=1,qi.test(r.charAt(o)))){for(;qi.test(r.charAt(o+1));)o+=1;r.charCodeAt(o+1)===Ze&&(o+=1)}g=["word",r.slice(f,o+1),f,o],f=o;break}default:{n===Qi&&r.charCodeAt(f+1)===mh?(o=r.indexOf("*/",f+2)+1,o===0&&(i||A?o=r.length:C("comment")),g=["comment",r.slice(f,o+1),f,o],f=o):(Dt.lastIndex=f+1,Dt.test(r),Dt.lastIndex===0?o=r.length-1:o=Dt.lastIndex-2,g=["word",r.slice(f,o+1),f,o],v.push(g),f=o);break}}return f++,g}function B(T){b.push(T)}return{back:B,endOfFile:I,nextToken:O,position:y}};let Zo=ke,ar=class extends Zo{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}};var ri=ar;ar.default=ar;Zo.registerAtRule(ar);let Jo=ke,Xo,Ko,Fe=class extends Jo{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,r){let i=super.normalize(e);if(t){if(r==="prepend")this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let n of i)n.raws.before=t.raws.before}return i}removeChild(e,t){let r=this.index(e);return!t&&r===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(e)}toResult(e={}){return new Xo(new Ko,this,e).stringify()}};Fe.registerLazyResult=s=>{Xo=s};Fe.registerProcessor=s=>{Ko=s};var ft=Fe;Fe.default=Fe;Jo.registerRoot(Fe);let nt={comma(s){return nt.split(s,[","],!0)},space(s){let e=[" ",`
52
- `," "];return nt.split(s,e)},split(s,e,t){let r=[],i="",n=!1,o=0,l=!1,a="",u=!1;for(let h of s)u?u=!1:h==="\\"?u=!0:l?h===a&&(l=!1):h==='"'||h==="'"?(l=!0,a=h):h==="("?o+=1:h===")"?o>0&&(o-=1):o===0&&e.includes(h)&&(n=!0),n?(i!==""&&r.push(i.trim()),i="",n=!1):i+=h;return(t||i!=="")&&r.push(i.trim()),r}};var Qo=nt;nt.default=nt;let qo=ke,vh=Qo,lr=class extends qo{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return vh.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,r=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(r)}};var si=lr;lr.default=lr;qo.registerRule(lr);let Sh=Ir,Ch=bh,_h=kr,xh=ri,Ih=ft,en=si;const tn={empty:!0,space:!0};function Rh(s){for(let e=s.length-1;e>=0;e--){let t=s[e],r=t[3]||t[2];if(r)return r}}let kh=class{constructor(e){this.input=e,this.root=new Ih,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 xh;t.name=e[1].slice(1),t.name===""&&this.unnamedAtrule(t,e),this.init(t,e[2]);let r,i,n,o=!1,l=!1,a=[],u=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),r=e[0],r==="("||r==="["?u.push(r==="("?")":"]"):r==="{"&&u.length>0?u.push("}"):r===u[u.length-1]&&u.pop(),u.length===0)if(r===";"){t.source.end=this.getPosition(e[2]),t.source.end.offset++,this.semicolon=!0;break}else if(r==="{"){l=!0;break}else if(r==="}"){if(a.length>0){for(n=a.length-1,i=a[n];i&&i[0]==="space";)i=a[--n];i&&(t.source.end=this.getPosition(i[3]||i[2]),t.source.end.offset++)}this.end(e);break}else a.push(e);else a.push(e);if(this.tokenizer.endOfFile()){o=!0;break}}t.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(t.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(t,"params",a),o&&(e=a[a.length-1],t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++,this.spaces=t.raws.between,t.raws.between="")):(t.raws.afterName="",t.params=""),l&&(t.nodes=[],this.current=t)}checkMissedSemicolon(e){let t=this.colon(e);if(t===!1)return;let r=0,i;for(let n=t-1;n>=0&&(i=e[n],!(i[0]!=="space"&&(r+=1,r===2)));n--);throw this.input.error("Missed semicolon",i[0]==="word"?i[3]+1:i[2])}colon(e){let t=0,r,i,n;for(let[o,l]of e.entries()){if(r=l,i=r[0],i==="("&&(t+=1),i===")"&&(t-=1),t===0&&i===":")if(!n)this.doubleColon(r);else{if(n[0]==="word"&&n[1]==="progid")continue;return o}n=r}return!1}comment(e){let t=new _h;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let r=e[1].slice(2,-2);if(/^\s*$/.test(r))t.text="",t.raws.left=r,t.raws.right="";else{let i=r.match(/^(\s*)([^]*\S)(\s*)$/);t.text=i[2],t.raws.left=i[1],t.raws.right=i[3]}}createTokenizer(){this.tokenizer=Ch(this.input)}decl(e,t){let r=new Sh;this.init(r,e[0][2]);let i=e[e.length-1];for(i[0]===";"&&(this.semicolon=!0,e.pop()),r.source.end=this.getPosition(i[3]||i[2]||Rh(e)),r.source.end.offset++;e[0][0]!=="word";)e.length===1&&this.unknownWord(e),r.raws.before+=e.shift()[1];for(r.source.start=this.getPosition(e[0][2]),r.prop="";e.length;){let u=e[0][0];if(u===":"||u==="space"||u==="comment")break;r.prop+=e.shift()[1]}r.raws.between="";let n;for(;e.length;)if(n=e.shift(),n[0]===":"){r.raws.between+=n[1];break}else n[0]==="word"&&/\w/.test(n[1])&&this.unknownWord([n]),r.raws.between+=n[1];(r.prop[0]==="_"||r.prop[0]==="*")&&(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let o=[],l;for(;e.length&&(l=e[0][0],!(l!=="space"&&l!=="comment"));)o.push(e.shift());this.precheckMissedSemicolon(e);for(let u=e.length-1;u>=0;u--){if(n=e[u],n[1].toLowerCase()==="!important"){r.important=!0;let h=this.stringFrom(e,u);h=this.spacesFromEnd(e)+h,h!==" !important"&&(r.raws.important=h);break}else if(n[1].toLowerCase()==="important"){let h=e.slice(0),c="";for(let p=u;p>0;p--){let d=h[p][0];if(c.trim().indexOf("!")===0&&d!=="space")break;c=h.pop()[1]+c}c.trim().indexOf("!")===0&&(r.important=!0,r.raws.important=c,e=h)}if(n[0]!=="space"&&n[0]!=="comment")break}e.some(u=>u[0]!=="space"&&u[0]!=="comment")&&(r.raws.between+=o.map(u=>u[1]).join(""),o=[]),this.raw(r,"value",o.concat(e),t),r.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new en;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let t=this.current.nodes[this.current.nodes.length-1];t&&t.type==="rule"&&!t.raws.ownSemicolon&&(t.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="",e.type!=="comment"&&(this.semicolon=!1)}other(e){let t=!1,r=null,i=!1,n=null,o=[],l=e[1].startsWith("--"),a=[],u=e;for(;u;){if(r=u[0],a.push(u),r==="("||r==="[")n||(n=u),o.push(r==="("?")":"]");else if(l&&i&&r==="{")n||(n=u),o.push("}");else if(o.length===0)if(r===";")if(i){this.decl(a,l);return}else break;else if(r==="{"){this.rule(a);return}else if(r==="}"){this.tokenizer.back(a.pop()),t=!0;break}else r===":"&&(i=!0);else r===o[o.length-1]&&(o.pop(),o.length===0&&(n=null));u=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),o.length>0&&this.unclosedBracket(n),t&&i){if(!l)for(;a.length&&(u=a[a.length-1][0],!(u!=="space"&&u!=="comment"));)this.tokenizer.back(a.pop());this.decl(a,l)}else this.unknownWord(a)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e);break}this.endFile()}precheckMissedSemicolon(){}raw(e,t,r,i){let n,o,l=r.length,a="",u=!0,h,c;for(let p=0;p<l;p+=1)n=r[p],o=n[0],o==="space"&&p===l-1&&!i?u=!1:o==="comment"?(c=r[p-1]?r[p-1][0]:"empty",h=r[p+1]?r[p+1][0]:"empty",!tn[c]&&!tn[h]?a.slice(-1)===","?u=!1:a+=n[1]:u=!1):a+=n[1];if(!u){let p=r.reduce((d,g)=>d+g[1],"");e.raws[t]={raw:p,value:a}}e[t]=a}rule(e){e.pop();let t=new en;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],!(t!=="space"&&t!=="comment"));)r=e.pop()[1]+r;return r}spacesAndCommentsFromStart(e){let t,r="";for(;e.length&&(t=e[0][0],!(t!=="space"&&t!=="comment"));)r+=e.shift()[1];return r}spacesFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],t==="space");)r=e.pop()[1]+r;return r}stringFrom(e,t){let r="";for(let i=t;i<e.length;i++)r+=e[i][1];return e.splice(t,e.length-t),r}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word",{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}};var Eh=kh;let Ah=ke,Mh=Eh,Oh=Rr;function ur(s,e){let t=new Oh(s,e),r=new Mh(t);try{r.parse()}catch(i){throw process.env.NODE_ENV!=="production"&&i.name==="CssSyntaxError"&&e&&e.from&&(/\.scss$/i.test(e.from)?i.message+=`
53
- You tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser`:/\.sass/i.test(e.from)?i.message+=`
54
- You tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser`:/\.less$/i.test(e.from)&&(i.message+=`
55
- You tried to parse Less with the standard CSS parser; try again with the postcss-less parser`)),i}return r.root}var ii=ur;ur.default=ur;Ah.registerParse(ur);let{isClean:fe,my:$h}=ht,Nh=To,Th=_r,Ph=ke,Dh=ei,Lh=Vo,rn=ti,Fh=ii,Uh=ft;const Bh={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},zh={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},Wh={Once:!0,postcssPlugin:!0,prepare:!0},Ue=0;function Je(s){return typeof s=="object"&&typeof s.then=="function"}function ea(s){let e=!1,t=Bh[s.type];return s.type==="decl"?e=s.prop.toLowerCase():s.type==="atrule"&&(e=s.name.toLowerCase()),e&&s.append?[t,t+"-"+e,Ue,t+"Exit",t+"Exit-"+e]:e?[t,t+"-"+e,t+"Exit",t+"Exit-"+e]:s.append?[t,Ue,t+"Exit"]:[t,t+"Exit"]}function sn(s){let e;return s.type==="document"?e=["Document",Ue,"DocumentExit"]:s.type==="root"?e=["Root",Ue,"RootExit"]:e=ea(s),{eventIndex:0,events:e,iterator:0,node:s,visitorIndex:0,visitors:[]}}function xs(s){return s[fe]=!1,s.nodes&&s.nodes.forEach(e=>xs(e)),s}let Is={},Be=class ta{constructor(e,t,r){this.stringified=!1,this.processed=!1;let i;if(typeof t=="object"&&t!==null&&(t.type==="root"||t.type==="document"))i=xs(t);else if(t instanceof ta||t instanceof rn)i=xs(t.root),t.map&&(typeof r.map>"u"&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=t.map);else{let n=Fh;r.syntax&&(n=r.syntax.parse),r.parser&&(n=r.parser),n.parse&&(n=n.parse);try{i=n(t,r)}catch(o){this.processed=!0,this.error=o}i&&!i[$h]&&Ph.rebuild(i)}this.result=new rn(e,i,r),this.helpers={...Is,postcss:Is,result:this.result},this.plugins=this.processor.plugins.map(n=>typeof n=="object"&&n.prepare?{...n,...n.prepare(this.result)}:n)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let r=this.result.lastPlugin;try{if(t&&t.addToError(e),this.error=e,e.name==="CssSyntaxError"&&!e.plugin)e.plugin=r.postcssPlugin,e.setMessage();else if(r.postcssVersion&&process.env.NODE_ENV!=="production"){let i=r.postcssPlugin,n=r.postcssVersion,o=this.result.processor.version,l=n.split("."),a=o.split(".");(l[0]!==a[0]||parseInt(l[1])>parseInt(a[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+o+", but "+i+" uses "+n+". Perhaps this is the source of the error below.")}}catch(i){console&&console.error&&console.error(i)}return e}prepareVisitors(){this.listeners={};let e=(t,r,i)=>{this.listeners[r]||(this.listeners[r]=[]),this.listeners[r].push([t,i])};for(let t of this.plugins)if(typeof t=="object")for(let r in t){if(!zh[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!Wh[r])if(typeof t[r]=="object")for(let i in t[r])i==="*"?e(t,r,t[r][i]):e(t,r+"-"+i.toLowerCase(),t[r][i]);else typeof t[r]=="function"&&e(t,r,t[r])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let t=this.plugins[e],r=this.runOnRoot(t);if(Je(r))try{await r}catch(i){throw this.handleError(i)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[fe];){e[fe]=!0;let t=[sn(e)];for(;t.length>0;){let r=this.visitTick(t);if(Je(r))try{await r}catch(i){let n=t[t.length-1].node;throw this.handleError(i,n)}}}if(this.listeners.OnceExit)for(let[t,r]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if(e.type==="document"){let i=e.nodes.map(n=>r(n,this.helpers));await Promise.all(i)}else await r(e,this.helpers)}catch(i){throw this.handleError(i)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if(typeof e=="object"&&e.Once){if(this.result.root.type==="document"){let t=this.result.root.nodes.map(r=>e.Once(r,this.helpers));return Je(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}else if(typeof e=="function")return e(this.result.root,this.result)}catch(t){throw this.handleError(t)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=Th;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let i=new Nh(t,this.result.root,this.result.opts).generate();return this.result.css=i[0],this.result.map=i[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins){let t=this.runOnRoot(e);if(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 process.env.NODE_ENV!=="production"&&("from"in this.opts||Lh("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[r,i]of e){this.result.lastPlugin=r;let n;try{n=i(t,this.helpers)}catch(o){throw this.handleError(o,t.proxyOf)}if(t.type!=="root"&&t.type!=="document"&&!t.parent)return!0;if(Je(n))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:r,visitors:i}=t;if(r.type!=="root"&&r.type!=="document"&&!r.parent){e.pop();return}if(i.length>0&&t.visitorIndex<i.length){let[o,l]=i[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===i.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=o;try{return l(r.toProxy(),this.helpers)}catch(a){throw this.handleError(a,r)}}if(t.iterator!==0){let o=t.iterator,l;for(;l=r.nodes[r.indexes[o]];)if(r.indexes[o]+=1,!l[fe]){l[fe]=!0,e.push(sn(l));return}t.iterator=0,delete r.indexes[o]}let n=t.events;for(;t.eventIndex<n.length;){let o=n[t.eventIndex];if(t.eventIndex+=1,o===Ue){r.nodes&&r.nodes.length&&(r[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=ea(e);for(let r of t)if(r===Ue)e.nodes&&e.each(i=>{i[fe]||this.walkSync(i)});else{let i=this.listeners[r];if(i&&this.visitSync(i,e.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}};Be.registerPostcss=s=>{Is=s};var ra=Be;Be.default=Be;Uh.registerLazyResult(Be);Dh.registerLazyResult(Be);let jh=To,Hh=_r,Gh=Vo,Vh=ii;const Yh=ti;let Rs=class{constructor(e,t,r){t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=r,this._map=void 0;let i,n=Hh;this.result=new Yh(this._processor,i,this._opts),this.result.css=t;let o=this;Object.defineProperty(this.result,"root",{get(){return o.root}});let l=new jh(n,i,this._opts,t);if(l.isMap()){let[a,u]=l.generate();a&&(this.result.css=a),u&&(this.result.map=u)}else l.clearAnnotation(),this.result.css=l.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return process.env.NODE_ENV!=="production"&&("from"in this._opts||Gh("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,t)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,t=Vh;try{e=t(this._css,this._opts)}catch(r){this.error=r}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}};var Zh=Rs;Rs.default=Rs;let Jh=Zh,Xh=ra,Kh=ei,Qh=ft,ot=class{constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let r of e)if(r.postcss===!0?r=r():r.postcss&&(r=r.postcss),typeof r=="object"&&Array.isArray(r.plugins))t=t.concat(r.plugins);else if(typeof r=="object"&&r.postcssPlugin)t.push(r);else if(typeof r=="function")t.push(r);else if(typeof r=="object"&&(r.parse||r.stringify)){if(process.env.NODE_ENV!=="production")throw new Error("PostCSS syntaxes cannot be used as plugins. Instead, please use one of the syntax/parser/stringifier options as outlined in your PostCSS runner documentation.")}else throw new Error(r+" is not a PostCSS plugin");return t}process(e,t={}){return!this.plugins.length&&!t.parser&&!t.stringifier&&!t.syntax?new Jh(this,e,t):new Xh(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var qh=ot;ot.default=ot;Qh.registerProcessor(ot);Kh.registerProcessor(ot);let ef=Ir,tf=Ao,rf=kr,sf=ri,nf=Rr,of=ft,af=si;function at(s,e){if(Array.isArray(s))return s.map(i=>at(i));let{inputs:t,...r}=s;if(t){e=[];for(let i of t){let n={...i,__proto__:nf.prototype};n.map&&(n.map={...n.map,__proto__:tf.prototype}),e.push(n)}}if(r.nodes&&(r.nodes=s.nodes.map(i=>at(i,e))),r.source){let{inputId:i,...n}=r.source;r.source=n,i!=null&&(r.source.input=e[i])}if(r.type==="root")return new of(r);if(r.type==="decl")return new ef(r);if(r.type==="rule")return new af(r);if(r.type==="comment")return new rf(r);if(r.type==="atrule")return new sf(r);throw new Error("Unknown node type: "+s.type)}var lf=at;at.default=at;let uf=Ks,sa=Ir,cf=ra,hf=ke,ni=qh,ff=_r,pf=lf,ia=ei,df=Yo,na=kr,oa=ri,mf=ti,gf=Rr,yf=ii,wf=Qo,aa=si,la=ft,bf=xr;function N(...s){return s.length===1&&Array.isArray(s[0])&&(s=s[0]),new ni(s)}N.plugin=function(e,t){let r=!1;function i(...o){console&&console.warn&&!r&&(r=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide:
56
- https://evilmartians.com/chronicles/postcss-8-plugin-migration`),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(e+`: 里面 postcss.plugin 被弃用. 迁移指南:
57
- https://www.w3ctech.com/topic/2226`));let l=t(...o);return l.postcssPlugin=e,l.postcssVersion=new ni().version,l}let n;return Object.defineProperty(i,"postcss",{get(){return n||(n=i()),n}}),i.process=function(o,l,a){return N([i(a)]).process(o,l)},i};N.stringify=ff;N.parse=yf;N.fromJSON=pf;N.list=wf;N.comment=s=>new na(s);N.atRule=s=>new oa(s);N.decl=s=>new sa(s);N.rule=s=>new aa(s);N.root=s=>new la(s);N.document=s=>new ia(s);N.CssSyntaxError=uf;N.Declaration=sa;N.Container=hf;N.Processor=ni;N.Document=ia;N.Comment=na;N.Warning=df;N.AtRule=oa;N.Result=mf;N.Input=gf;N.Rule=aa;N.Root=la;N.Node=bf;cf.registerPostcss(N);var vf=N;N.default=N;const j=Mc(vf);j.stringify;j.fromJSON;j.plugin;j.parse;j.list;j.document;j.comment;j.atRule;j.rule;j.decl;j.root;j.CssSyntaxError;j.Declaration;j.Container;j.Processor;j.Document;j.Comment;j.Warning;j.AtRule;j.Result;j.Input;j.Rule;j.Root;j.Node;class oi{constructor(...e){ie(this,"parentElement",null),ie(this,"parentNode",null),ie(this,"ownerDocument"),ie(this,"firstChild",null),ie(this,"lastChild",null),ie(this,"previousSibling",null),ie(this,"nextSibling",null),ie(this,"ELEMENT_NODE",1),ie(this,"TEXT_NODE",3),ie(this,"nodeType"),ie(this,"nodeName"),ie(this,"RRNodeType")}get childNodes(){const e=[];let t=this.firstChild;for(;t;)e.push(t),t=t.nextSibling;return e}contains(e){if(e instanceof oi){if(e.ownerDocument!==this.ownerDocument)return!1;if(e===this)return!0}else return!1;for(;e.parentNode;){if(e.parentNode===this)return!0;e=e.parentNode}return!1}appendChild(e){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(e,t){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(e){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}}const nn={Node:["childNodes","parentNode","parentElement","textContent","ownerDocument"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},on={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},Lt={},Sf=()=>!!globalThis.Zone;function ai(s){if(Lt[s])return Lt[s];const e=globalThis[s],t=e.prototype,r=s in nn?nn[s]:void 0,i=!!(r&&r.every(l=>{var a,u;return!!((u=(a=Object.getOwnPropertyDescriptor(t,l))==null?void 0:a.get)!=null&&u.toString().includes("[native code]"))})),n=s in on?on[s]:void 0,o=!!(n&&n.every(l=>{var a;return typeof t[l]=="function"&&((a=t[l])==null?void 0:a.toString().includes("[native code]"))}));if(i&&o&&!Sf())return Lt[s]=e.prototype,e.prototype;try{const l=document.createElement("iframe");document.body.appendChild(l);const a=l.contentWindow;if(!a)return e.prototype;const u=a[s].prototype;return document.body.removeChild(l),u?Lt[s]=u:t}catch{return t}}const Hr={};function we(s,e,t){var r;const i=`${s}.${String(t)}`;if(Hr[i])return Hr[i].call(e);const n=ai(s),o=(r=Object.getOwnPropertyDescriptor(n,t))==null?void 0:r.get;return o?(Hr[i]=o,o.call(e)):e[t]}const Gr={};function ua(s,e,t){const r=`${s}.${String(t)}`;if(Gr[r])return Gr[r].bind(e);const n=ai(s)[t];return typeof n!="function"?e[t]:(Gr[r]=n,n.bind(e))}function Cf(s){return we("Node",s,"ownerDocument")}function _f(s){return we("Node",s,"childNodes")}function xf(s){return we("Node",s,"parentNode")}function If(s){return we("Node",s,"parentElement")}function Rf(s){return we("Node",s,"textContent")}function kf(s,e){return ua("Node",s,"contains")(e)}function Ef(s){return ua("Node",s,"getRootNode")()}function Af(s){return!s||!("host"in s)?null:we("ShadowRoot",s,"host")}function Mf(s){return s.styleSheets}function Of(s){return!s||!("shadowRoot"in s)?null:we("Element",s,"shadowRoot")}function $f(s,e){return we("Element",s,"querySelector")(e)}function Nf(s,e){return we("Element",s,"querySelectorAll")(e)}function ca(){return ai("MutationObserver").constructor}function Ee(s,e,t){try{if(!(e in s))return()=>{};const r=s[e],i=t(r);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),s[e]=i,()=>{s[e]=r}}catch{return()=>{}}}const _={ownerDocument:Cf,childNodes:_f,parentNode:xf,parentElement:If,textContent:Rf,contains:kf,getRootNode:Ef,host:Af,styleSheets:Mf,shadowRoot:Of,querySelector:$f,querySelectorAll:Nf,mutationObserver:ca,patch:Ee};function Q(s,e,t=document){const r={capture:!0,passive:!0};return t.addEventListener(s,e,r),()=>t.removeEventListener(s,e,r)}const Me=`Please stop import mirror directly. Instead of that,\r
58
- now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
59
- or you can use record.mirror to access the mirror instance during recording.`;let an={map:{},getId(){return console.error(Me),-1},getNode(){return console.error(Me),null},removeNodeFromMap(){console.error(Me)},has(){return console.error(Me),!1},reset(){console.error(Me)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(an=new Proxy(an,{get(s,e,t){return e==="map"&&console.error(Me),Reflect.get(s,e,t)}}));function lt(s,e,t={}){let r=null,i=0;return function(...n){const o=Date.now();!i&&t.leading===!1&&(i=o);const l=e-(o-i),a=this;l<=0||l>e?(r&&(clearTimeout(r),r=null),i=o,s.apply(a,n)):!r&&t.trailing!==!1&&(r=setTimeout(()=>{i=t.leading===!1?0:Date.now(),r=null,s.apply(a,n)},l))}}function Er(s,e,t,r,i=window){const n=i.Object.getOwnPropertyDescriptor(s,e);return i.Object.defineProperty(s,e,r?t:{set(o){setTimeout(()=>{t.set.call(this,o)},0),n&&n.set&&n.set.call(this,o)}}),()=>Er(s,e,n||{},!0)}let cr=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(cr=()=>new Date().getTime());function ha(s){var e,t,r,i;const n=s.document;return{left:n.scrollingElement?n.scrollingElement.scrollLeft:s.pageXOffset!==void 0?s.pageXOffset:n.documentElement.scrollLeft||(n==null?void 0:n.body)&&((e=_.parentElement(n.body))==null?void 0:e.scrollLeft)||((t=n==null?void 0:n.body)==null?void 0:t.scrollLeft)||0,top:n.scrollingElement?n.scrollingElement.scrollTop:s.pageYOffset!==void 0?s.pageYOffset:(n==null?void 0:n.documentElement.scrollTop)||(n==null?void 0:n.body)&&((r=_.parentElement(n.body))==null?void 0:r.scrollTop)||((i=n==null?void 0:n.body)==null?void 0:i.scrollTop)||0}}function fa(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function pa(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function da(s){return s?s.nodeType===s.ELEMENT_NODE?s:_.parentElement(s):null}function q(s,e,t,r){if(!s)return!1;const i=da(s);if(!i)return!1;try{if(typeof e=="string"){if(i.classList.contains(e)||r&&i.closest("."+e)!==null)return!0}else if(tr(i,e,r))return!0}catch{}return!!(t&&(i.matches(t)||r&&i.closest(t)!==null))}function Tf(s,e){return e.getId(s)!==-1}function Vr(s,e,t){return s.tagName==="TITLE"&&t.headTitleMutations?!0:e.getId(s)===qe}function ma(s,e){if(Xe(s))return!1;const t=e.getId(s);if(!e.has(t))return!0;const r=_.parentNode(s);return r&&r.nodeType===s.DOCUMENT_NODE?!1:r?ma(r,e):!0}function ks(s){return!!s.changedTouches}function Pf(s=window){"NodeList"in s&&!s.NodeList.prototype.forEach&&(s.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in s&&!s.DOMTokenList.prototype.forEach&&(s.DOMTokenList.prototype.forEach=Array.prototype.forEach)}function ga(s,e){return!!(s.nodeName==="IFRAME"&&e.getMeta(s))}function ya(s,e){return!!(s.nodeName==="LINK"&&s.nodeType===s.ELEMENT_NODE&&s.getAttribute&&s.getAttribute("rel")==="stylesheet"&&e.getMeta(s))}function Es(s){return s?s instanceof oi&&"shadowRoot"in s?!!s.shadowRoot:!!_.shadowRoot(s):!1}class Df{constructor(){S(this,"id",1),S(this,"styleIDMap",new WeakMap),S(this,"idStyleMap",new Map)}getId(e){return this.styleIDMap.get(e)??-1}has(e){return this.styleIDMap.has(e)}add(e,t){if(this.has(e))return this.getId(e);let r;return t===void 0?r=this.id++:r=t,this.styleIDMap.set(e,r),this.idStyleMap.set(r,e),r}getStyle(e){return this.idStyleMap.get(e)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}function wa(s){var e;let t=null;return"getRootNode"in s&&((e=_.getRootNode(s))==null?void 0:e.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&_.host(_.getRootNode(s))&&(t=_.host(_.getRootNode(s))),t}function Lf(s){let e=s,t;for(;t=wa(e);)e=t;return e}function Ff(s){const e=_.ownerDocument(s);if(!e)return!1;const t=Lf(s);return _.contains(e,t)}function ba(s){const e=_.ownerDocument(s);return e?_.contains(e,s)||Ff(s):!1}var R=(s=>(s[s.DomContentLoaded=0]="DomContentLoaded",s[s.Load=1]="Load",s[s.FullSnapshot=2]="FullSnapshot",s[s.IncrementalSnapshot=3]="IncrementalSnapshot",s[s.Meta=4]="Meta",s[s.Custom=5]="Custom",s[s.Plugin=6]="Plugin",s))(R||{}),x=(s=>(s[s.Mutation=0]="Mutation",s[s.MouseMove=1]="MouseMove",s[s.MouseInteraction=2]="MouseInteraction",s[s.Scroll=3]="Scroll",s[s.ViewportResize=4]="ViewportResize",s[s.Input=5]="Input",s[s.TouchMove=6]="TouchMove",s[s.MediaInteraction=7]="MediaInteraction",s[s.StyleSheetRule=8]="StyleSheetRule",s[s.CanvasMutation=9]="CanvasMutation",s[s.Font=10]="Font",s[s.Log=11]="Log",s[s.Drag=12]="Drag",s[s.StyleDeclaration=13]="StyleDeclaration",s[s.Selection=14]="Selection",s[s.AdoptedStyleSheet=15]="AdoptedStyleSheet",s[s.CustomElement=16]="CustomElement",s))(x||{}),ee=(s=>(s[s.MouseUp=0]="MouseUp",s[s.MouseDown=1]="MouseDown",s[s.Click=2]="Click",s[s.ContextMenu=3]="ContextMenu",s[s.DblClick=4]="DblClick",s[s.Focus=5]="Focus",s[s.Blur=6]="Blur",s[s.TouchStart=7]="TouchStart",s[s.TouchMove_Departed=8]="TouchMove_Departed",s[s.TouchEnd=9]="TouchEnd",s[s.TouchCancel=10]="TouchCancel",s))(ee||{}),pe=(s=>(s[s.Mouse=0]="Mouse",s[s.Pen=1]="Pen",s[s.Touch=2]="Touch",s))(pe||{}),ze=(s=>(s[s["2D"]=0]="2D",s[s.WebGL=1]="WebGL",s[s.WebGL2=2]="WebGL2",s))(ze||{}),Oe=(s=>(s[s.Play=0]="Play",s[s.Pause=1]="Pause",s[s.Seeked=2]="Seeked",s[s.VolumeChange=3]="VolumeChange",s[s.RateChange=4]="RateChange",s))(Oe||{}),va=(s=>(s[s.Document=0]="Document",s[s.DocumentType=1]="DocumentType",s[s.Element=2]="Element",s[s.Text=3]="Text",s[s.CDATA=4]="CDATA",s[s.Comment=5]="Comment",s))(va||{});function ln(s){return"__ln"in s}class Uf{constructor(){S(this,"length",0),S(this,"head",null),S(this,"tail",null)}get(e){if(e>=this.length)throw new Error("Position outside of list range");let t=this.head;for(let r=0;r<e;r++)t=(t==null?void 0:t.next)||null;return t}addNode(e){const t={value:e,previous:null,next:null};if(e.__ln=t,e.previousSibling&&ln(e.previousSibling)){const r=e.previousSibling.__ln.next;t.next=r,t.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=t,r&&(r.previous=t)}else if(e.nextSibling&&ln(e.nextSibling)&&e.nextSibling.__ln.previous){const r=e.nextSibling.__ln.previous;t.previous=r,t.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=t,r&&(r.next=t)}else this.head&&(this.head.previous=t),t.next=this.head,this.head=t;t.next===null&&(this.tail=t),this.length++}removeNode(e){const t=e.__ln;this.head&&(t.previous?(t.previous.next=t.next,t.next?t.next.previous=t.previous:this.tail=t.previous):(this.head=t.next,this.head?this.head.previous=null:this.tail=null),e.__ln&&delete e.__ln,this.length--)}}const un=(s,e)=>`${s}@${e}`;class Bf{constructor(){S(this,"frozen",!1),S(this,"locked",!1),S(this,"texts",[]),S(this,"attributes",[]),S(this,"attributeMap",new WeakMap),S(this,"removes",[]),S(this,"mapRemoves",[]),S(this,"movedMap",{}),S(this,"addedSet",new Set),S(this,"movedSet",new Set),S(this,"droppedSet",new Set),S(this,"removesSubTreeCache",new Set),S(this,"mutationCb"),S(this,"blockClass"),S(this,"blockSelector"),S(this,"maskTextClass"),S(this,"maskTextSelector"),S(this,"inlineStylesheet"),S(this,"maskInputOptions"),S(this,"maskTextFn"),S(this,"maskInputFn"),S(this,"keepIframeSrcFn"),S(this,"recordCanvas"),S(this,"inlineImages"),S(this,"slimDOMOptions"),S(this,"dataURLOptions"),S(this,"doc"),S(this,"mirror"),S(this,"iframeManager"),S(this,"stylesheetManager"),S(this,"shadowDomManager"),S(this,"canvasManager"),S(this,"processedNodeManager"),S(this,"unattachedDoc"),S(this,"processMutations",e=>{e.forEach(this.processMutation),this.emit()}),S(this,"emit",()=>{if(this.frozen||this.locked)return;const e=[],t=new Set,r=new Uf,i=a=>{let u=a,h=qe;for(;h===qe;)u=u&&u.nextSibling,h=u&&this.mirror.getId(u);return h},n=a=>{const u=_.parentNode(a);if(!u||!ba(a))return;let h=!1;if(a.nodeType===Node.TEXT_NODE){const g=u.tagName;if(g==="TEXTAREA")return;g==="STYLE"&&this.addedSet.has(u)&&(h=!0)}const c=Xe(u)?this.mirror.getId(wa(a)):this.mirror.getId(u),p=i(a);if(c===-1||p===-1)return r.addNode(a);const d=Ne(a,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskTextClass:this.maskTextClass,maskTextSelector:this.maskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:g=>{ga(g,this.mirror)&&this.iframeManager.addIframe(g),ya(g,this.mirror)&&this.stylesheetManager.trackLinkElement(g),Es(a)&&this.shadowDomManager.addShadowRoot(_.shadowRoot(a),this.doc)},onIframeLoad:(g,m)=>{this.iframeManager.attachIframe(g,m),this.shadowDomManager.observeAttachShadow(g)},onStylesheetLoad:(g,m)=>{this.stylesheetManager.attachLinkElement(g,m)},cssCaptured:h});d&&(e.push({parentId:c,nextId:p,node:d}),t.add(d.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const a of this.movedSet)cn(this.removesSubTreeCache,a,this.mirror)&&!this.movedSet.has(_.parentNode(a))||n(a);for(const a of this.addedSet)!hn(this.droppedSet,a)&&!cn(this.removesSubTreeCache,a,this.mirror)||hn(this.movedSet,a)?n(a):this.droppedSet.add(a);let o=null;for(;r.length;){let a=null;if(o){const u=this.mirror.getId(_.parentNode(o.value)),h=i(o.value);u!==-1&&h!==-1&&(a=o)}if(!a){let u=r.tail;for(;u;){const h=u;if(u=u.previous,h){const c=this.mirror.getId(_.parentNode(h.value));if(i(h.value)===-1)continue;if(c!==-1){a=h;break}else{const d=h.value,g=_.parentNode(d);if(g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const m=_.host(g);if(this.mirror.getId(m)!==-1){a=h;break}}}}}}if(!a){for(;r.head;)r.removeNode(r.head.value);break}o=a.previous,r.removeNode(a.value),n(a.value)}const l={texts:this.texts.map(a=>{const u=a.node,h=_.parentNode(u);return h&&h.tagName==="TEXTAREA"&&this.genTextAreaValueMutation(h),{id:this.mirror.getId(u),value:a.value}}).filter(a=>!t.has(a.id)).filter(a=>this.mirror.has(a.id)),attributes:this.attributes.map(a=>{const{attributes:u}=a;if(typeof u.style=="string"){const h=JSON.stringify(a.styleDiff),c=JSON.stringify(a._unchangedStyles);h.length<u.style.length&&(h+c).split("var(").length===u.style.split("var(").length&&(u.style=a.styleDiff)}return{id:this.mirror.getId(a.node),attributes:u}}).filter(a=>!t.has(a.id)).filter(a=>this.mirror.has(a.id)),removes:this.removes,adds:e};!l.texts.length&&!l.attributes.length&&!l.removes.length&&!l.adds.length||(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.removesSubTreeCache=new Set,this.movedMap={},this.mutationCb(l))}),S(this,"genTextAreaValueMutation",e=>{let t=this.attributeMap.get(e);t||(t={node:e,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(t),this.attributeMap.set(e,t));const r=Array.from(_.childNodes(e),i=>_.textContent(i)||"").join("");t.attributes.value=Qt({element:e,maskInputOptions:this.maskInputOptions,tagName:e.tagName,type:qt(e),value:r,maskInputFn:this.maskInputFn})}),S(this,"processMutation",e=>{if(!Vr(e.target,this.mirror,this.slimDOMOptions))switch(e.type){case"characterData":{const t=_.textContent(e.target);!q(e.target,this.blockClass,this.blockSelector,!1)&&t!==e.oldValue&&this.texts.push({value:Bn(e.target,this.maskTextClass,this.maskTextSelector,!0)&&t?this.maskTextFn?this.maskTextFn(t,da(e.target)):t.replace(/[\S]/g,"*"):t,node:e.target});break}case"attributes":{const t=e.target;let r=e.attributeName,i=e.target.getAttribute(r);if(r==="value"){const o=qt(t);i=Qt({element:t,maskInputOptions:this.maskInputOptions,tagName:t.tagName,type:o,value:i,maskInputFn:this.maskInputFn})}if(q(e.target,this.blockClass,this.blockSelector,!1)||i===e.oldValue)return;let n=this.attributeMap.get(e.target);if(t.tagName==="IFRAME"&&r==="src"&&!this.keepIframeSrcFn(i))if(!t.contentDocument)r="rr_src";else return;if(n||(n={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(n),this.attributeMap.set(e.target,n)),r==="type"&&t.tagName==="INPUT"&&(e.oldValue||"").toLowerCase()==="password"&&t.setAttribute("data-rr-is-password","true"),!Un(t.tagName,r))if(n.attributes[r]=Fn(this.doc,Ie(t.tagName),Ie(r),i),r==="style"){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch{this.unattachedDoc=this.doc}const o=this.unattachedDoc.createElement("span");e.oldValue&&o.setAttribute("style",e.oldValue);for(const l of Array.from(t.style)){const a=t.style.getPropertyValue(l),u=t.style.getPropertyPriority(l);a!==o.style.getPropertyValue(l)||u!==o.style.getPropertyPriority(l)?u===""?n.styleDiff[l]=a:n.styleDiff[l]=[a,u]:n._unchangedStyles[l]=[a,u]}for(const l of Array.from(o.style))t.style.getPropertyValue(l)===""&&(n.styleDiff[l]=!1)}else r==="open"&&t.tagName==="DIALOG"&&(t.matches("dialog:modal")?n.attributes.rr_open_mode="modal":n.attributes.rr_open_mode="non-modal");break}case"childList":{if(q(e.target,this.blockClass,this.blockSelector,!0))return;if(e.target.tagName==="TEXTAREA"){this.genTextAreaValueMutation(e.target);return}e.addedNodes.forEach(t=>this.genAdds(t,e.target)),e.removedNodes.forEach(t=>{const r=this.mirror.getId(t),i=Xe(e.target)?this.mirror.getId(_.host(e.target)):this.mirror.getId(e.target);q(e.target,this.blockClass,this.blockSelector,!1)||Vr(t,this.mirror,this.slimDOMOptions)||!Tf(t,this.mirror)||(this.addedSet.has(t)?(As(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&r===-1||ma(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[un(r,i)]?As(this.movedSet,t):(this.removes.push({parentId:i,id:r,isShadow:Xe(e.target)&&Ke(e.target)?!0:void 0}),zf(t,this.removesSubTreeCache))),this.mapRemoves.push(t))});break}}}),S(this,"genAdds",(e,t)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!(this.addedSet.has(e)||this.movedSet.has(e))){if(this.mirror.hasNode(e)){if(Vr(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[un(this.mirror.getId(e),r)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);q(e,this.blockClass,this.blockSelector,!1)||(_.childNodes(e).forEach(r=>this.genAdds(r)),Es(e)&&_.childNodes(_.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 As(s,e){s.delete(e),_.childNodes(e).forEach(t=>As(s,t))}function zf(s,e){const t=[s];for(;t.length;){const r=t.pop();e.has(r)||(e.add(r),_.childNodes(r).forEach(i=>t.push(i)))}}function cn(s,e,t){return s.size===0?!1:Wf(s,e)}function Wf(s,e,t){const r=_.parentNode(e);return r?s.has(r):!1}function hn(s,e){return s.size===0?!1:Sa(s,e)}function Sa(s,e){const t=_.parentNode(e);return t?s.has(t)?!0:Sa(s,t):!1}let Qe;function jf(s){Qe=s}function Hf(){Qe=void 0}const k=s=>Qe?(...t)=>{try{return s(...t)}catch(r){if(Qe&&Qe(r)===!0)return;throw r}}:s,xe=[];function pt(s){try{if("composedPath"in s){const e=s.composedPath();if(e.length)return e[0]}else if("path"in s&&s.path.length)return s.path[0]}catch{}return s&&s.target}function Ca(s,e){const t=new Bf;xe.push(t),t.init(s);const r=new(ca())(k(t.processMutations.bind(t)));return r.observe(e,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),r}function Gf({mousemoveCb:s,sampling:e,doc:t,mirror:r}){if(e.mousemove===!1)return()=>{};const i=typeof e.mousemove=="number"?e.mousemove:50,n=typeof e.mousemoveCallback=="number"?e.mousemoveCallback:500;let o=[],l;const a=lt(k(c=>{const p=Date.now()-l;s(o.map(d=>(d.timeOffset-=p,d)),c),o=[],l=null}),n),u=k(lt(k(c=>{const p=pt(c),{clientX:d,clientY:g}=ks(c)?c.changedTouches[0]:c;l||(l=cr()),o.push({x:d,y:g,id:r.getId(p),timeOffset:cr()-l}),a(typeof DragEvent<"u"&&c instanceof DragEvent?x.Drag:c instanceof MouseEvent?x.MouseMove:x.TouchMove)}),i,{trailing:!1})),h=[Q("mousemove",u,t),Q("touchmove",u,t),Q("drag",u,t)];return k(()=>{h.forEach(c=>c())})}function Vf({mouseInteractionCb:s,doc:e,mirror:t,blockClass:r,blockSelector:i,sampling:n}){if(n.mouseInteraction===!1)return()=>{};const o=n.mouseInteraction===!0||n.mouseInteraction===void 0?{}:n.mouseInteraction,l=[];let a=null;const u=h=>c=>{const p=pt(c);if(q(p,r,i,!0))return;let d=null,g=h;if("pointerType"in c){switch(c.pointerType){case"mouse":d=pe.Mouse;break;case"touch":d=pe.Touch;break;case"pen":d=pe.Pen;break}d===pe.Touch?ee[h]===ee.MouseDown?g="TouchStart":ee[h]===ee.MouseUp&&(g="TouchEnd"):pe.Pen}else ks(c)&&(d=pe.Touch);d!==null?(a=d,(g.startsWith("Touch")&&d===pe.Touch||g.startsWith("Mouse")&&d===pe.Mouse)&&(d=null)):ee[h]===ee.Click&&(d=a,a=null);const m=ks(c)?c.changedTouches[0]:c;if(!m)return;const f=t.getId(p),{clientX:v,clientY:b}=m;k(s)({type:ee[g],id:f,x:v,y:b,...d!==null&&{pointerType:d}})};return Object.keys(ee).filter(h=>Number.isNaN(Number(h))&&!h.endsWith("_Departed")&&o[h]!==!1).forEach(h=>{let c=Ie(h);const p=u(h);if(window.PointerEvent)switch(ee[h]){case ee.MouseDown:case ee.MouseUp:c=c.replace("mouse","pointer");break;case ee.TouchStart:case ee.TouchEnd:return}l.push(Q(c,p,e))}),k(()=>{l.forEach(h=>h())})}function _a({scrollCb:s,doc:e,mirror:t,blockClass:r,blockSelector:i,sampling:n}){const o=k(lt(k(l=>{const a=pt(l);if(!a||q(a,r,i,!0))return;const u=t.getId(a);if(a===e&&e.defaultView){const h=ha(e.defaultView);s({id:u,x:h.left,y:h.top})}else s({id:u,x:a.scrollLeft,y:a.scrollTop})}),n.scroll||100));return Q("scroll",o,e)}function Yf({viewportResizeCb:s},{win:e}){let t=-1,r=-1;const i=k(lt(k(()=>{const n=fa(),o=pa();(t!==n||r!==o)&&(s({width:Number(o),height:Number(n)}),t=n,r=o)}),200));return Q("resize",i,e)}const Zf=["INPUT","TEXTAREA","SELECT"],fn=new WeakMap;function Jf({inputCb:s,doc:e,mirror:t,blockClass:r,blockSelector:i,ignoreClass:n,ignoreSelector:o,maskInputOptions:l,maskInputFn:a,sampling:u,userTriggeredOnInput:h}){function c(b){let y=pt(b);const C=b.isTrusted,I=y&&y.tagName;if(y&&I==="OPTION"&&(y=_.parentElement(y)),!y||!I||Zf.indexOf(I)<0||q(y,r,i,!0)||y.classList.contains(n)||o&&y.matches(o))return;let O=y.value,B=!1;const T=qt(y)||"";T==="radio"||T==="checkbox"?B=y.checked:(l[I.toLowerCase()]||l[T])&&(O=Qt({element:y,maskInputOptions:l,tagName:I,type:T,value:O,maskInputFn:a})),p(y,h?{text:O,isChecked:B,userTriggered:C}:{text:O,isChecked:B});const A=y.name;T==="radio"&&A&&B&&e.querySelectorAll(`input[type="radio"][name="${A}"]`).forEach(z=>{if(z!==y){const re=z.value;p(z,h?{text:re,isChecked:!B,userTriggered:!1}:{text:re,isChecked:!B})}})}function p(b,y){const C=fn.get(b);if(!C||C.text!==y.text||C.isChecked!==y.isChecked){fn.set(b,y);const I=t.getId(b);k(s)({...y,id:I})}}const g=(u.input==="last"?["change"]:["input","change"]).map(b=>Q(b,k(c),e)),m=e.defaultView;if(!m)return()=>{g.forEach(b=>b())};const f=m.Object.getOwnPropertyDescriptor(m.HTMLInputElement.prototype,"value"),v=[[m.HTMLInputElement.prototype,"value"],[m.HTMLInputElement.prototype,"checked"],[m.HTMLSelectElement.prototype,"value"],[m.HTMLTextAreaElement.prototype,"value"],[m.HTMLSelectElement.prototype,"selectedIndex"],[m.HTMLOptionElement.prototype,"selected"]];return f&&f.set&&g.push(...v.map(b=>Er(b[0],b[1],{set(){k(c)({target:this,isTrusted:!1})}},!1,m))),k(()=>{g.forEach(b=>b())})}function hr(s){const e=[];function t(r,i){if(Ft("CSSGroupingRule")&&r.parentRule instanceof CSSGroupingRule||Ft("CSSMediaRule")&&r.parentRule instanceof CSSMediaRule||Ft("CSSSupportsRule")&&r.parentRule instanceof CSSSupportsRule||Ft("CSSConditionRule")&&r.parentRule instanceof CSSConditionRule){const o=Array.from(r.parentRule.cssRules).indexOf(r);i.unshift(o)}else if(r.parentStyleSheet){const o=Array.from(r.parentStyleSheet.cssRules).indexOf(r);i.unshift(o)}return i}return t(s,e)}function be(s,e,t){let r,i;return s?(s.ownerNode?r=e.getId(s.ownerNode):i=t.getId(s),{styleId:i,id:r}):{}}function Xf({styleSheetRuleCb:s,mirror:e,stylesheetManager:t},{win:r}){if(!r.CSSStyleSheet||!r.CSSStyleSheet.prototype)return()=>{};const i=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=new Proxy(i,{apply:k((h,c,p)=>{const[d,g]=p,{id:m,styleId:f}=be(c,e,t.styleMirror);return(m&&m!==-1||f&&f!==-1)&&s({id:m,styleId:f,adds:[{rule:d,index:g}]}),h.apply(c,p)})}),r.CSSStyleSheet.prototype.addRule=function(h,c,p=this.cssRules.length){const d=`${h} { ${c} }`;return r.CSSStyleSheet.prototype.insertRule.apply(this,[d,p])};const n=r.CSSStyleSheet.prototype.deleteRule;r.CSSStyleSheet.prototype.deleteRule=new Proxy(n,{apply:k((h,c,p)=>{const[d]=p,{id:g,styleId:m}=be(c,e,t.styleMirror);return(g&&g!==-1||m&&m!==-1)&&s({id:g,styleId:m,removes:[{index:d}]}),h.apply(c,p)})}),r.CSSStyleSheet.prototype.removeRule=function(h){return r.CSSStyleSheet.prototype.deleteRule.apply(this,[h])};let o;r.CSSStyleSheet.prototype.replace&&(o=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(o,{apply:k((h,c,p)=>{const[d]=p,{id:g,styleId:m}=be(c,e,t.styleMirror);return(g&&g!==-1||m&&m!==-1)&&s({id:g,styleId:m,replace:d}),h.apply(c,p)})}));let l;r.CSSStyleSheet.prototype.replaceSync&&(l=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(l,{apply:k((h,c,p)=>{const[d]=p,{id:g,styleId:m}=be(c,e,t.styleMirror);return(g&&g!==-1||m&&m!==-1)&&s({id:g,styleId:m,replaceSync:d}),h.apply(c,p)})}));const a={};Ut("CSSGroupingRule")?a.CSSGroupingRule=r.CSSGroupingRule:(Ut("CSSMediaRule")&&(a.CSSMediaRule=r.CSSMediaRule),Ut("CSSConditionRule")&&(a.CSSConditionRule=r.CSSConditionRule),Ut("CSSSupportsRule")&&(a.CSSSupportsRule=r.CSSSupportsRule));const u={};return Object.entries(a).forEach(([h,c])=>{u[h]={insertRule:c.prototype.insertRule,deleteRule:c.prototype.deleteRule},c.prototype.insertRule=new Proxy(u[h].insertRule,{apply:k((p,d,g)=>{const[m,f]=g,{id:v,styleId:b}=be(d.parentStyleSheet,e,t.styleMirror);return(v&&v!==-1||b&&b!==-1)&&s({id:v,styleId:b,adds:[{rule:m,index:[...hr(d),f||0]}]}),p.apply(d,g)})}),c.prototype.deleteRule=new Proxy(u[h].deleteRule,{apply:k((p,d,g)=>{const[m]=g,{id:f,styleId:v}=be(d.parentStyleSheet,e,t.styleMirror);return(f&&f!==-1||v&&v!==-1)&&s({id:f,styleId:v,removes:[{index:[...hr(d),m]}]}),p.apply(d,g)})})}),k(()=>{r.CSSStyleSheet.prototype.insertRule=i,r.CSSStyleSheet.prototype.deleteRule=n,o&&(r.CSSStyleSheet.prototype.replace=o),l&&(r.CSSStyleSheet.prototype.replaceSync=l),Object.entries(a).forEach(([h,c])=>{c.prototype.insertRule=u[h].insertRule,c.prototype.deleteRule=u[h].deleteRule})})}function xa({mirror:s,stylesheetManager:e},t){var r,i,n;let o=null;t.nodeName==="#document"?o=s.getId(t):o=s.getId(_.host(t));const l=t.nodeName==="#document"?(r=t.defaultView)==null?void 0:r.Document:(n=(i=t.ownerDocument)==null?void 0:i.defaultView)==null?void 0:n.ShadowRoot,a=l!=null&&l.prototype?Object.getOwnPropertyDescriptor(l==null?void 0:l.prototype,"adoptedStyleSheets"):void 0;return o===null||o===-1||!l||!a?()=>{}:(Object.defineProperty(t,"adoptedStyleSheets",{configurable:a.configurable,enumerable:a.enumerable,get(){var u;return(u=a.get)==null?void 0:u.call(this)},set(u){var h;const c=(h=a.set)==null?void 0:h.call(this,u);if(o!==null&&o!==-1)try{e.adoptStyleSheets(u,o)}catch{}return c}}),k(()=>{Object.defineProperty(t,"adoptedStyleSheets",{configurable:a.configurable,enumerable:a.enumerable,get:a.get,set:a.set})}))}function Kf({styleDeclarationCb:s,mirror:e,ignoreCSSAttributes:t,stylesheetManager:r},{win:i}){const n=i.CSSStyleDeclaration.prototype.setProperty;i.CSSStyleDeclaration.prototype.setProperty=new Proxy(n,{apply:k((l,a,u)=>{var h;const[c,p,d]=u;if(t.has(c))return n.apply(a,[c,p,d]);const{id:g,styleId:m}=be((h=a.parentRule)==null?void 0:h.parentStyleSheet,e,r.styleMirror);return(g&&g!==-1||m&&m!==-1)&&s({id:g,styleId:m,set:{property:c,value:p,priority:d},index:hr(a.parentRule)}),l.apply(a,u)})});const o=i.CSSStyleDeclaration.prototype.removeProperty;return i.CSSStyleDeclaration.prototype.removeProperty=new Proxy(o,{apply:k((l,a,u)=>{var h;const[c]=u;if(t.has(c))return o.apply(a,[c]);const{id:p,styleId:d}=be((h=a.parentRule)==null?void 0:h.parentStyleSheet,e,r.styleMirror);return(p&&p!==-1||d&&d!==-1)&&s({id:p,styleId:d,remove:{property:c},index:hr(a.parentRule)}),l.apply(a,u)})}),k(()=>{i.CSSStyleDeclaration.prototype.setProperty=n,i.CSSStyleDeclaration.prototype.removeProperty=o})}function Qf({mediaInteractionCb:s,blockClass:e,blockSelector:t,mirror:r,sampling:i,doc:n}){const o=k(a=>lt(k(u=>{const h=pt(u);if(!h||q(h,e,t,!0))return;const{currentTime:c,volume:p,muted:d,playbackRate:g,loop:m}=h;s({type:a,id:r.getId(h),currentTime:c,volume:p,muted:d,playbackRate:g,loop:m})}),i.media||500)),l=[Q("play",o(Oe.Play),n),Q("pause",o(Oe.Pause),n),Q("seeked",o(Oe.Seeked),n),Q("volumechange",o(Oe.VolumeChange),n),Q("ratechange",o(Oe.RateChange),n)];return k(()=>{l.forEach(a=>a())})}function qf({fontCb:s,doc:e}){const t=e.defaultView;if(!t)return()=>{};const r=[],i=new WeakMap,n=t.FontFace;t.FontFace=function(a,u,h){const c=new n(a,u,h);return i.set(c,{family:a,buffer:typeof u!="string",descriptors:h,fontSource:typeof u=="string"?u:JSON.stringify(Array.from(new Uint8Array(u)))}),c};const o=Ee(e.fonts,"add",function(l){return function(a){return setTimeout(k(()=>{const u=i.get(a);u&&(s(u),i.delete(a))}),0),l.apply(this,[a])}});return r.push(()=>{t.FontFace=n}),r.push(o),k(()=>{r.forEach(l=>l())})}function ep(s){const{doc:e,mirror:t,blockClass:r,blockSelector:i,selectionCb:n}=s;let o=!0;const l=k(()=>{const a=e.getSelection();if(!a||o&&(a!=null&&a.isCollapsed))return;o=a.isCollapsed||!1;const u=[],h=a.rangeCount||0;for(let c=0;c<h;c++){const p=a.getRangeAt(c),{startContainer:d,startOffset:g,endContainer:m,endOffset:f}=p;q(d,r,i,!0)||q(m,r,i,!0)||u.push({start:t.getId(d),startOffset:g,end:t.getId(m),endOffset:f})}n({ranges:u})});return l(),Q("selectionchange",l)}function tp({doc:s,customElementCb:e}){const t=s.defaultView;return!t||!t.customElements?()=>{}:Ee(t.customElements,"define",function(i){return function(n,o,l){try{e({define:{name:n}})}catch{console.warn(`Custom element callback failed for ${n}`)}return i.apply(this,[n,o,l])}})}function rp(s,e){const{mutationCb:t,mousemoveCb:r,mouseInteractionCb:i,scrollCb:n,viewportResizeCb:o,inputCb:l,mediaInteractionCb:a,styleSheetRuleCb:u,styleDeclarationCb:h,canvasMutationCb:c,fontCb:p,selectionCb:d,customElementCb:g}=s;s.mutationCb=(...m)=>{e.mutation&&e.mutation(...m),t(...m)},s.mousemoveCb=(...m)=>{e.mousemove&&e.mousemove(...m),r(...m)},s.mouseInteractionCb=(...m)=>{e.mouseInteraction&&e.mouseInteraction(...m),i(...m)},s.scrollCb=(...m)=>{e.scroll&&e.scroll(...m),n(...m)},s.viewportResizeCb=(...m)=>{e.viewportResize&&e.viewportResize(...m),o(...m)},s.inputCb=(...m)=>{e.input&&e.input(...m),l(...m)},s.mediaInteractionCb=(...m)=>{e.mediaInteaction&&e.mediaInteaction(...m),a(...m)},s.styleSheetRuleCb=(...m)=>{e.styleSheetRule&&e.styleSheetRule(...m),u(...m)},s.styleDeclarationCb=(...m)=>{e.styleDeclaration&&e.styleDeclaration(...m),h(...m)},s.canvasMutationCb=(...m)=>{e.canvasMutation&&e.canvasMutation(...m),c(...m)},s.fontCb=(...m)=>{e.font&&e.font(...m),p(...m)},s.selectionCb=(...m)=>{e.selection&&e.selection(...m),d(...m)},s.customElementCb=(...m)=>{e.customElement&&e.customElement(...m),g(...m)}}function sp(s,e={}){const t=s.doc.defaultView;if(!t)return()=>{};rp(s,e);let r;s.recordDOM&&(r=Ca(s,s.doc));const i=Gf(s),n=Vf(s),o=_a(s),l=Yf(s,{win:t}),a=Jf(s),u=Qf(s);let h=()=>{},c=()=>{},p=()=>{},d=()=>{};s.recordDOM&&(h=Xf(s,{win:t}),c=xa(s,s.doc),p=Kf(s,{win:t}),s.collectFonts&&(d=qf(s)));const g=ep(s),m=tp(s),f=[];for(const v of s.plugins)f.push(v.observer(v.callback,t,v.options));return k(()=>{xe.forEach(v=>v.reset()),r==null||r.disconnect(),i(),n(),o(),l(),a(),u(),h(),c(),p(),d(),g(),m(),f.forEach(v=>v())})}function Ft(s){return typeof window[s]<"u"}function Ut(s){return!!(typeof window[s]<"u"&&window[s].prototype&&"insertRule"in window[s].prototype&&"deleteRule"in window[s].prototype)}class pn{constructor(e){S(this,"iframeIdToRemoteIdMap",new WeakMap),S(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=e}getId(e,t,r,i){const n=r||this.getIdToRemoteIdMap(e),o=i||this.getRemoteIdToIdMap(e);let l=n.get(t);return l||(l=this.generateIdFn(),n.set(t,l),o.set(l,t)),l}getIds(e,t){const r=this.getIdToRemoteIdMap(e),i=this.getRemoteIdToIdMap(e);return t.map(n=>this.getId(e,n,r,i))}getRemoteId(e,t,r){const i=r||this.getRemoteIdToIdMap(e);if(typeof t!="number")return t;const n=i.get(t);return n||-1}getRemoteIds(e,t){const r=this.getRemoteIdToIdMap(e);return t.map(i=>this.getRemoteId(e,i,r))}reset(e){if(!e){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(e),this.iframeRemoteIdToIdMap.delete(e)}getIdToRemoteIdMap(e){let t=this.iframeIdToRemoteIdMap.get(e);return t||(t=new Map,this.iframeIdToRemoteIdMap.set(e,t)),t}getRemoteIdToIdMap(e){let t=this.iframeRemoteIdToIdMap.get(e);return t||(t=new Map,this.iframeRemoteIdToIdMap.set(e,t)),t}}class ip{constructor(e){S(this,"iframes",new WeakMap),S(this,"crossOriginIframeMap",new WeakMap),S(this,"crossOriginIframeMirror",new pn(Ln)),S(this,"crossOriginIframeStyleMirror"),S(this,"crossOriginIframeRootIdMap",new WeakMap),S(this,"mirror"),S(this,"mutationCb"),S(this,"wrappedEmit"),S(this,"loadListener"),S(this,"stylesheetManager"),S(this,"recordCrossOriginIframes"),this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new pn(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=e.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(e){this.iframes.set(e,!0),e.contentWindow&&this.crossOriginIframeMap.set(e.contentWindow,e)}addLoadListener(e){this.loadListener=e}attachIframe(e,t){var r,i;this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&((r=e.contentWindow)==null||r.addEventListener("message",this.handleMessage.bind(this))),(i=this.loadListener)==null||i.call(this,e),e.contentDocument&&e.contentDocument.adoptedStyleSheets&&e.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(e.contentDocument.adoptedStyleSheets,this.mirror.getId(e.contentDocument))}handleMessage(e){const t=e;if(t.data.type!=="rrweb"||t.origin!==t.data.origin||!e.source)return;const i=this.crossOriginIframeMap.get(e.source);if(!i)return;const n=this.transformCrossOriginEvent(i,t.data.event);n&&this.wrappedEmit(n,t.data.isCheckout)}transformCrossOriginEvent(e,t){var r;switch(t.type){case R.FullSnapshot:{this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e);const i=t.data.node.id;return this.crossOriginIframeRootIdMap.set(e,i),this.patchRootIdOnNode(t.data.node,i),{timestamp:t.timestamp,type:R.IncrementalSnapshot,data:{source:x.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case R.Meta:case R.Load:case R.DomContentLoaded:return!1;case R.Plugin:return t;case R.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case R.IncrementalSnapshot:switch(t.data.source){case x.Mutation:return t.data.adds.forEach(i=>{this.replaceIds(i,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(i.node,e);const n=this.crossOriginIframeRootIdMap.get(e);n&&this.patchRootIdOnNode(i.node,n)}),t.data.removes.forEach(i=>{this.replaceIds(i,e,["parentId","id"])}),t.data.attributes.forEach(i=>{this.replaceIds(i,e,["id"])}),t.data.texts.forEach(i=>{this.replaceIds(i,e,["id"])}),t;case x.Drag:case x.TouchMove:case x.MouseMove:return t.data.positions.forEach(i=>{this.replaceIds(i,e,["id"])}),t;case x.ViewportResize:return!1;case x.MediaInteraction:case x.MouseInteraction:case x.Scroll:case x.CanvasMutation:case x.Input:return this.replaceIds(t.data,e,["id"]),t;case x.StyleSheetRule:case x.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case x.Font:return t;case x.Selection:return t.data.ranges.forEach(i=>{this.replaceIds(i,e,["start","end"])}),t;case x.AdoptedStyleSheet:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleIds"]),(r=t.data.styles)==null||r.forEach(i=>{this.replaceStyleIds(i,e,["styleId"])}),t}}return!1}replace(e,t,r,i){for(const n of i)!Array.isArray(t[n])&&typeof t[n]!="number"||(Array.isArray(t[n])?t[n]=e.getIds(r,t[n]):t[n]=e.getId(r,t[n]));return t}replaceIds(e,t,r){return this.replace(this.crossOriginIframeMirror,e,t,r)}replaceStyleIds(e,t,r){return this.replace(this.crossOriginIframeStyleMirror,e,t,r)}replaceIdOnNode(e,t){this.replaceIds(e,t,["id","rootId"]),"childNodes"in e&&e.childNodes.forEach(r=>{this.replaceIdOnNode(r,t)})}patchRootIdOnNode(e,t){e.type!==va.Document&&!e.rootId&&(e.rootId=t),"childNodes"in e&&e.childNodes.forEach(r=>{this.patchRootIdOnNode(r,t)})}}class np{constructor(e){S(this,"shadowDoms",new WeakSet),S(this,"mutationCb"),S(this,"scrollCb"),S(this,"bypassOptions"),S(this,"mirror"),S(this,"restoreHandlers",[]),this.mutationCb=e.mutationCb,this.scrollCb=e.scrollCb,this.bypassOptions=e.bypassOptions,this.mirror=e.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(e,t){if(!Ke(e)||this.shadowDoms.has(e))return;this.shadowDoms.add(e);const r=Ca({...this.bypassOptions,doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},e);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push(_a({...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(_.host(e))),this.restoreHandlers.push(xa({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},e))},0)}observeAttachShadow(e){!e.contentWindow||!e.contentDocument||this.patchAttachShadow(e.contentWindow.Element,e.contentDocument)}patchAttachShadow(e,t){const r=this;this.restoreHandlers.push(Ee(e.prototype,"attachShadow",function(i){return function(n){const o=i.call(this,n),l=_.shadowRoot(this);return l&&ba(this)&&r.addShadowRoot(l,t),o}}))}reset(){this.restoreHandlers.forEach(e=>{try{e()}catch{}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}var Te="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",op=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var Bt=0;Bt<Te.length;Bt++)op[Te.charCodeAt(Bt)]=Bt;var ap=function(s){var e=new Uint8Array(s),t,r=e.length,i="";for(t=0;t<r;t+=3)i+=Te[e[t]>>2],i+=Te[(e[t]&3)<<4|e[t+1]>>4],i+=Te[(e[t+1]&15)<<2|e[t+2]>>6],i+=Te[e[t+2]&63];return r%3===2?i=i.substring(0,i.length-1)+"=":r%3===1&&(i=i.substring(0,i.length-2)+"=="),i};const dn=new Map;function lp(s,e){let t=dn.get(s);return t||(t=new Map,dn.set(s,t)),t.has(e)||t.set(e,[]),t.get(e)}const Ia=(s,e,t)=>{if(!s||!(ka(s,e)||typeof s=="object"))return;const r=s.constructor.name,i=lp(t,r);let n=i.indexOf(s);return n===-1&&(n=i.length,i.push(s)),n};function Vt(s,e,t){if(s instanceof Array)return s.map(r=>Vt(r,e,t));if(s===null)return s;if(s instanceof Float32Array||s instanceof Float64Array||s instanceof Int32Array||s instanceof Uint32Array||s instanceof Uint8Array||s instanceof Uint16Array||s instanceof Int16Array||s instanceof Int8Array||s instanceof Uint8ClampedArray)return{rr_type:s.constructor.name,args:[Object.values(s)]};if(s instanceof ArrayBuffer){const r=s.constructor.name,i=ap(s);return{rr_type:r,base64:i}}else{if(s instanceof DataView)return{rr_type:s.constructor.name,args:[Vt(s.buffer,e,t),s.byteOffset,s.byteLength]};if(s instanceof HTMLImageElement){const r=s.constructor.name,{src:i}=s;return{rr_type:r,src:i}}else if(s instanceof HTMLCanvasElement){const r="HTMLImageElement",i=s.toDataURL();return{rr_type:r,src:i}}else{if(s instanceof ImageData)return{rr_type:s.constructor.name,args:[Vt(s.data,e,t),s.width,s.height]};if(ka(s,e)||typeof s=="object"){const r=s.constructor.name,i=Ia(s,e,t);return{rr_type:r,index:i}}}}return s}const Ra=(s,e,t)=>s.map(r=>Vt(r,e,t)),ka=(s,e)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(i=>typeof e[i]=="function").find(i=>s instanceof e[i]);function up(s,e,t,r){const i=[],n=Object.getOwnPropertyNames(e.CanvasRenderingContext2D.prototype);for(const o of n)try{if(typeof e.CanvasRenderingContext2D.prototype[o]!="function")continue;const l=Ee(e.CanvasRenderingContext2D.prototype,o,function(a){return function(...u){return q(this.canvas,t,r,!0)||setTimeout(()=>{const h=Ra(u,e,this);s(this.canvas,{type:ze["2D"],property:o,args:h})},0),a.apply(this,u)}});i.push(l)}catch{const l=Er(e.CanvasRenderingContext2D.prototype,o,{set(a){s(this.canvas,{type:ze["2D"],property:o,args:[a],setter:!0})}});i.push(l)}return()=>{i.forEach(o=>o())}}function cp(s){return s==="experimental-webgl"?"webgl":s}function mn(s,e,t,r){const i=[];try{const n=Ee(s.HTMLCanvasElement.prototype,"getContext",function(o){return function(l,...a){if(!q(this,e,t,!0)){const u=cp(l);if("__context"in this||(this.__context=u),r&&["webgl","webgl2"].includes(u))if(a[0]&&typeof a[0]=="object"){const h=a[0];h.preserveDrawingBuffer||(h.preserveDrawingBuffer=!0)}else a.splice(0,1,{preserveDrawingBuffer:!0})}return o.apply(this,[l,...a])}});i.push(n)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{i.forEach(n=>n())}}function gn(s,e,t,r,i,n){const o=[],l=Object.getOwnPropertyNames(s);for(const a of l)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(a))try{if(typeof s[a]!="function")continue;const u=Ee(s,a,function(h){return function(...c){const p=h.apply(this,c);if(Ia(p,n,this),"tagName"in this.canvas&&!q(this.canvas,r,i,!0)){const d=Ra(c,n,this),g={type:e,property:a,args:d};t(this.canvas,g)}return p}});o.push(u)}catch{const u=Er(s,a,{set(h){t(this.canvas,{type:e,property:a,args:[h],setter:!0})}});o.push(u)}return o}function hp(s,e,t,r){const i=[];return i.push(...gn(e.WebGLRenderingContext.prototype,ze.WebGL,s,t,r,e)),typeof e.WebGL2RenderingContext<"u"&&i.push(...gn(e.WebGL2RenderingContext.prototype,ze.WebGL2,s,t,r,e)),()=>{i.forEach(n=>n())}}const Ea="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=",fp=s=>Uint8Array.from(atob(s),e=>e.charCodeAt(0)),yn=typeof window<"u"&&window.Blob&&new Blob([fp(Ea)],{type:"text/javascript;charset=utf-8"});function pp(s){let e;try{if(e=yn&&(window.URL||window.webkitURL).createObjectURL(yn),!e)throw"";const t=new Worker(e,{name:s==null?void 0:s.name});return t.addEventListener("error",()=>{(window.URL||window.webkitURL).revokeObjectURL(e)}),t}catch{return new Worker("data:text/javascript;base64,"+Ea,{name:s==null?void 0:s.name})}finally{e&&(window.URL||window.webkitURL).revokeObjectURL(e)}}class dp{constructor(e){S(this,"pendingCanvasMutations",new Map),S(this,"rafStamps",{latestId:0,invokeId:null}),S(this,"mirror"),S(this,"mutationCb"),S(this,"resetObservers"),S(this,"frozen",!1),S(this,"locked",!1),S(this,"processMutation",(a,u)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(a)||this.pendingCanvasMutations.set(a,[]),this.pendingCanvasMutations.get(a).push(u)});const{sampling:t="all",win:r,blockClass:i,blockSelector:n,recordCanvas:o,dataURLOptions:l}=e;this.mutationCb=e.mutationCb,this.mirror=e.mirror,o&&t==="all"&&this.initCanvasMutationObserver(r,i,n),o&&typeof t=="number"&&this.initCanvasFPSObserver(t,r,i,n,{dataURLOptions:l})}reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}initCanvasFPSObserver(e,t,r,i,n){const o=mn(t,r,i,!0),l=new Map,a=new pp;a.onmessage=g=>{const{id:m}=g.data;if(l.set(m,!1),!("base64"in g.data))return;const{base64:f,type:v,width:b,height:y}=g.data;this.mutationCb({id:m,type:ze["2D"],commands:[{property:"clearRect",args:[0,0,b,y]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:f}],type:v}]},0,0]}]})};const u=1e3/e;let h=0,c;const p=()=>{const g=[];return t.document.querySelectorAll("canvas").forEach(m=>{q(m,r,i,!0)||g.push(m)}),g},d=g=>{if(h&&g-h<u){c=requestAnimationFrame(d);return}h=g,p().forEach(async m=>{var f;const v=this.mirror.getId(m);if(l.get(v)||m.width===0||m.height===0)return;if(l.set(v,!0),["webgl","webgl2"].includes(m.__context)){const y=m.getContext(m.__context);((f=y==null?void 0:y.getContextAttributes())==null?void 0:f.preserveDrawingBuffer)===!1&&y.clear(y.COLOR_BUFFER_BIT)}const b=await createImageBitmap(m);a.postMessage({id:v,bitmap:b,width:m.width,height:m.height,dataURLOptions:n.dataURLOptions},[b])}),c=requestAnimationFrame(d)};c=requestAnimationFrame(d),this.resetObservers=()=>{o(),cancelAnimationFrame(c)}}initCanvasMutationObserver(e,t,r){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const i=mn(e,t,r,!1),n=up(this.processMutation.bind(this),e,t,r),o=hp(this.processMutation.bind(this),e,t,r);this.resetObservers=()=>{i(),n(),o()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){const e=t=>{this.rafStamps.latestId=t,requestAnimationFrame(e)};requestAnimationFrame(e)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((e,t)=>{const r=this.mirror.getId(t);this.flushPendingCanvasMutationFor(t,r)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(e,t){if(this.frozen||this.locked)return;const r=this.pendingCanvasMutations.get(e);if(!r||t===-1)return;const i=r.map(o=>{const{type:l,...a}=o;return a}),{type:n}=r[0];this.mutationCb({id:t,type:n,commands:i}),this.pendingCanvasMutations.delete(e)}}class mp{constructor(e){S(this,"trackedLinkElements",new WeakSet),S(this,"mutationCb"),S(this,"adoptedStyleSheetCb"),S(this,"styleMirror",new Df),this.mutationCb=e.mutationCb,this.adoptedStyleSheetCb=e.adoptedStyleSheetCb}attachLinkElement(e,t){"_cssText"in t.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:t.attributes}]}),this.trackLinkElement(e)}trackLinkElement(e){this.trackedLinkElements.has(e)||(this.trackedLinkElements.add(e),this.trackStylesheetInLinkElement(e))}adoptStyleSheets(e,t){if(e.length===0)return;const r={id:t,styleIds:[]},i=[];for(const n of e){let o;this.styleMirror.has(n)?o=this.styleMirror.getId(n):(o=this.styleMirror.add(n),i.push({styleId:o,rules:Array.from(n.rules||CSSRule,(l,a)=>({rule:Tn(l,n.href),index:a}))})),r.styleIds.push(o)}i.length>0&&(r.styles=i),this.adoptedStyleSheetCb(r)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}}class gp{constructor(){S(this,"nodeMap",new WeakMap),S(this,"active",!1)}inOtherBuffer(e,t){const r=this.nodeMap.get(e);return r&&Array.from(r).some(i=>i!==t)}add(e,t){this.active||(this.active=!0,requestAnimationFrame(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(t))}destroy(){}}let V,Yt,Yr,fr=!1;try{if(Array.from([1],s=>s*2)[0]!==2){const s=document.createElement("iframe");document.body.appendChild(s),Array.from=((yi=s.contentWindow)==null?void 0:yi.Array.from)||Array.from,document.body.removeChild(s)}}catch(s){console.debug("Unable to override Array.from",s)}const oe=pl();function dt(s={}){const{emit:e,checkoutEveryNms:t,checkoutEveryNth:r,blockClass:i="rr-block",blockSelector:n=null,ignoreClass:o="rr-ignore",ignoreSelector:l=null,maskTextClass:a="rr-mask",maskTextSelector:u=null,inlineStylesheet:h=!0,maskAllInputs:c,maskInputOptions:p,slimDOMOptions:d,maskInputFn:g,maskTextFn:m,hooks:f,packFn:v,sampling:b={},dataURLOptions:y={},mousemoveWait:C,recordDOM:I=!0,recordCanvas:O=!1,recordCrossOriginIframes:B=!1,recordAfter:T=s.recordAfter==="DOMContentLoaded"?s.recordAfter:"load",userTriggeredOnInput:A=!1,collectFonts:z=!1,inlineImages:re=!1,plugins:ue,keepIframeSrcFn:E=()=>!1,ignoreCSSAttributes:He=new Set([]),errorHandler:Ge}=s;jf(Ge);const Z=B?window.parent===window:!0;let se=!1;if(!Z)try{window.parent.document&&(se=!1)}catch{se=!0}if(Z&&!e)throw new Error("emit function is required");if(!Z&&!se)return()=>{};C!==void 0&&b.mousemove===void 0&&(b.mousemove=C),oe.reset();const ve=c===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:p!==void 0?p:{password:!0},ce=zn(d);Pf();let pi,Or=0;const di=M=>{for(const ne of ue||[])ne.eventProcessor&&(M=ne.eventProcessor(M));return v&&!se&&(M=v(M)),M};V=(M,ne)=>{var H;const G=M;if(G.timestamp=cr(),(H=xe[0])!=null&&H.isFrozen()&&G.type!==R.FullSnapshot&&!(G.type===R.IncrementalSnapshot&&G.data.source===x.Mutation)&&xe.forEach(te=>te.unfreeze()),Z)e==null||e(di(G),ne);else if(se){const te={type:"rrweb",event:di(G),origin:window.location.origin,isCheckout:ne};window.parent.postMessage(te,"*")}if(G.type===R.FullSnapshot)pi=G,Or=0;else if(G.type===R.IncrementalSnapshot){if(G.data.source===x.Mutation&&G.data.isAttachIframe)return;Or++;const te=r&&Or>=r,P=t&&G.timestamp-pi.timestamp>t;(te||P)&&Yt(!0)}};const mt=M=>{V({type:R.IncrementalSnapshot,data:{source:x.Mutation,...M}})},mi=M=>V({type:R.IncrementalSnapshot,data:{source:x.Scroll,...M}}),gi=M=>V({type:R.IncrementalSnapshot,data:{source:x.CanvasMutation,...M}}),Wa=M=>V({type:R.IncrementalSnapshot,data:{source:x.AdoptedStyleSheet,...M}}),Se=new mp({mutationCb:mt,adoptedStyleSheetCb:Wa}),Ce=new ip({mirror:oe,mutationCb:mt,stylesheetManager:Se,recordCrossOriginIframes:B,wrappedEmit:V});for(const M of ue||[])M.getMirror&&M.getMirror({nodeMirror:oe,crossOriginIframeMirror:Ce.crossOriginIframeMirror,crossOriginIframeStyleMirror:Ce.crossOriginIframeStyleMirror});const $r=new gp;Yr=new dp({recordCanvas:O,mutationCb:gi,win:window,blockClass:i,blockSelector:n,mirror:oe,sampling:b.canvas,dataURLOptions:y});const gt=new np({mutationCb:mt,scrollCb:mi,bypassOptions:{blockClass:i,blockSelector:n,maskTextClass:a,maskTextSelector:u,inlineStylesheet:h,maskInputOptions:ve,dataURLOptions:y,maskTextFn:m,maskInputFn:g,recordCanvas:O,inlineImages:re,sampling:b,slimDOMOptions:ce,iframeManager:Ce,stylesheetManager:Se,canvasManager:Yr,keepIframeSrcFn:E,processedNodeManager:$r},mirror:oe});Yt=(M=!1)=>{if(!I)return;V({type:R.Meta,data:{href:window.location.href,width:pa(),height:fa()}},M),Se.reset(),gt.init(),xe.forEach(H=>H.lock());const ne=Ll(document,{mirror:oe,blockClass:i,blockSelector:n,maskTextClass:a,maskTextSelector:u,inlineStylesheet:h,maskAllInputs:ve,maskTextFn:m,maskInputFn:g,slimDOM:ce,dataURLOptions:y,recordCanvas:O,inlineImages:re,onSerialize:H=>{ga(H,oe)&&Ce.addIframe(H),ya(H,oe)&&Se.trackLinkElement(H),Es(H)&&gt.addShadowRoot(_.shadowRoot(H),document)},onIframeLoad:(H,G)=>{Ce.attachIframe(H,G),gt.observeAttachShadow(H)},onStylesheetLoad:(H,G)=>{Se.attachLinkElement(H,G)},keepIframeSrcFn:E});if(!ne)return console.warn("Failed to snapshot the document");V({type:R.FullSnapshot,data:{node:ne,initialOffset:ha(window)}},M),xe.forEach(H=>H.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&Se.adoptStyleSheets(document.adoptedStyleSheets,oe.getId(document))};try{const M=[],ne=G=>{var te;return k(sp)({mutationCb:mt,mousemoveCb:(P,Nr)=>V({type:R.IncrementalSnapshot,data:{source:Nr,positions:P}}),mouseInteractionCb:P=>V({type:R.IncrementalSnapshot,data:{source:x.MouseInteraction,...P}}),scrollCb:mi,viewportResizeCb:P=>V({type:R.IncrementalSnapshot,data:{source:x.ViewportResize,...P}}),inputCb:P=>V({type:R.IncrementalSnapshot,data:{source:x.Input,...P}}),mediaInteractionCb:P=>V({type:R.IncrementalSnapshot,data:{source:x.MediaInteraction,...P}}),styleSheetRuleCb:P=>V({type:R.IncrementalSnapshot,data:{source:x.StyleSheetRule,...P}}),styleDeclarationCb:P=>V({type:R.IncrementalSnapshot,data:{source:x.StyleDeclaration,...P}}),canvasMutationCb:gi,fontCb:P=>V({type:R.IncrementalSnapshot,data:{source:x.Font,...P}}),selectionCb:P=>{V({type:R.IncrementalSnapshot,data:{source:x.Selection,...P}})},customElementCb:P=>{V({type:R.IncrementalSnapshot,data:{source:x.CustomElement,...P}})},blockClass:i,ignoreClass:o,ignoreSelector:l,maskTextClass:a,maskTextSelector:u,maskInputOptions:ve,inlineStylesheet:h,sampling:b,recordDOM:I,recordCanvas:O,inlineImages:re,userTriggeredOnInput:A,collectFonts:z,doc:G,maskInputFn:g,maskTextFn:m,keepIframeSrcFn:E,blockSelector:n,slimDOMOptions:ce,dataURLOptions:y,mirror:oe,iframeManager:Ce,stylesheetManager:Se,shadowDomManager:gt,processedNodeManager:$r,canvasManager:Yr,ignoreCSSAttributes:He,plugins:((te=ue==null?void 0:ue.filter(P=>P.observer))==null?void 0:te.map(P=>({observer:P.observer,options:P.options,callback:Nr=>V({type:R.Plugin,data:{plugin:P.name,payload:Nr}})})))||[]},f)};Ce.addLoadListener(G=>{try{M.push(ne(G.contentDocument))}catch(te){console.warn(te)}});const H=()=>{Yt(),M.push(ne(document)),fr=!0};return["interactive","complete"].includes(document.readyState)?H():(M.push(Q("DOMContentLoaded",()=>{V({type:R.DomContentLoaded,data:{}}),T==="DOMContentLoaded"&&H()})),M.push(Q("load",()=>{V({type:R.Load,data:{}}),T==="load"&&H()},window))),()=>{M.forEach(G=>{try{G()}catch(te){String(te).toLowerCase().includes("cross-origin")||console.warn(te)}}),$r.destroy(),fr=!1,Hf()}}catch(M){console.warn(M)}}dt.addCustomEvent=(s,e)=>{if(!fr)throw new Error("please add custom event after start recording");V({type:R.Custom,data:{tag:s,payload:e}})};dt.freezePage=()=>{xe.forEach(s=>s.freeze())};dt.takeFullSnapshot=s=>{if(!fr)throw new Error("please take full snapshot after start recording");Yt(s)};dt.mirror=oe;var wn;(function(s){s[s.NotStarted=0]="NotStarted",s[s.Running=1]="Running",s[s.Stopped=2]="Stopped"})(wn||(wn={}));const yp=['input[type="password"]','input[type="credit-card"]','input[autocomplete="cc-number"]','input[autocomplete="cc-csc"]','input[autocomplete="cc-exp"]','input[autocomplete="cc-exp-month"]','input[autocomplete="cc-exp-year"]','input[autocomplete="new-password"]','input[autocomplete="current-password"]','input[name*="password"]','input[name*="passwd"]','input[name*="secret"]','input[name*="token"]','input[name*="apikey"]','input[name*="api_key"]','input[name*="api-key"]','input[name*="credit"]','input[name*="card"]','input[name*="cvv"]','input[name*="cvc"]','input[name*="ssn"]','input[id*="password"]','input[id*="secret"]','input[id*="token"]',"[data-private]","[data-mask]","[data-sensitive]"];function wp(){return yp.join(", ")}function bp(){return"[data-private-text], [data-mask-text]"}function vp(s){return s.matches(wp())}function Sp(s){return s?{maskAllInputs:!1,maskTextSelector:bp(),maskInputOptions:{password:!0},maskInputFn:(e,t)=>vp(t)?"*".repeat(Math.min(e.length,20)):e,blockSelector:"[data-recorder-block], [data-bw-recorder-ui], #bw-recorder-root",ignoreSelector:"[data-recorder-ignore]"}:{maskAllInputs:!1,maskTextSelector:null,maskInputOptions:{}}}const Cp=900*1e3,_p=30*1e3,xp=100;class Ip{constructor(e){this.state="idle",this.events=[],this.stopFn=null,this.startTime=0,this.pauseTime=0,this.totalPausedDuration=0,this.chunkIndex=0,this.maxDurationTimer=null,this.chunkTimer=null,this.uploader=null,this.metadata=null,this.onEventCallback=null,this.config={...e,maxDuration:e.maxDuration??Cp,maskInputs:e.maskInputs??!0}}setUploader(e){this.uploader=e}onEvent(e){this.onEventCallback=e}getState(){return this.state}getElapsedTime(){return this.state==="idle"||this.startTime===0?0:this.state==="paused"?this.pauseTime-this.startTime-this.totalPausedDuration:Date.now()-this.startTime-this.totalPausedDuration}getEvents(){return[...this.events]}async start(){var r,i;if(this.state!=="idle")throw new Error(`Cannot start recording: state is ${this.state}`);if(this.setState("recording"),this.startTime=Date.now(),this.events=[],this.chunkIndex=0,this.totalPausedDuration=0,this.metadata={url:window.location.href,userAgent:navigator.userAgent,viewport:{width:window.innerWidth,height:window.innerHeight},startedAt:this.startTime},this.uploader)try{await this.uploader.start(this.metadata)}catch(n){throw(i=(r=this.config).onError)==null||i.call(r,n),this.setState("idle"),n}const e=Sp(this.config.maskInputs),t=dt({emit:n=>this.handleEvent(n),maskAllInputs:e.maskAllInputs,maskTextSelector:e.maskTextSelector??void 0,maskInputFn:e.maskInputFn,blockSelector:e.blockSelector,recordCanvas:!0,collectFonts:!0,inlineStylesheet:!0,sampling:{mousemove:!0,mouseInteraction:!0,scroll:150,input:"last"}});this.stopFn=t??null,this.maxDurationTimer=setTimeout(()=>{this.stop()},this.config.maxDuration),this.chunkTimer=setInterval(()=>{this.flushChunk()},_p)}pause(){if(this.state!=="recording")throw new Error(`Cannot pause: state is ${this.state}`);this.setState("paused"),this.pauseTime=Date.now()}resume(){if(this.state!=="paused")throw new Error(`Cannot resume: state is ${this.state}`);this.totalPausedDuration+=Date.now()-this.pauseTime,this.setState("recording")}async stop(e=[]){var t,r,i,n;if(this.state==="idle"||this.state==="stopped")return null;if(this.maxDurationTimer&&(clearTimeout(this.maxDurationTimer),this.maxDurationTimer=null),this.chunkTimer&&(clearInterval(this.chunkTimer),this.chunkTimer=null),this.stopFn&&(this.stopFn(),this.stopFn=null),this.setState("stopped"),await this.flushChunk(),this.uploader)try{const o=await this.uploader.complete(this.getElapsedTime(),this.events.length,e);return(r=(t=this.config).onComplete)==null||r.call(t,o),o}catch(o){return(n=(i=this.config).onError)==null||n.call(i,o),null}return null}handleEvent(e){var t;this.state!=="paused"&&(this.events.push(e),(t=this.onEventCallback)==null||t.call(this,e),this.events.length>=xp&&this.flushChunk())}async flushChunk(){var t,r;if(this.events.length===0||!this.uploader)return;const e={index:this.chunkIndex++,events:[...this.events],timestamp:Date.now()};this.events=[];try{await this.uploader.uploadChunk(e)}catch(i){this.events=[...e.events,...this.events],this.chunkIndex--,(r=(t=this.config).onError)==null||r.call(t,i)}}setState(e){var t,r;this.state=e,(r=(t=this.config).onStateChange)==null||r.call(t,e)}reset(){this.stop(),this.state="idle",this.events=[],this.startTime=0,this.pauseTime=0,this.totalPausedDuration=0,this.chunkIndex=0,this.metadata=null}}class Rp{constructor(){this.markers=[],this.recordingStartTime=0,this.isRecording=!1,this.captureDebounceTimer=null}setStartTime(e){this.recordingStartTime=e,this.isRecording=!0}getMarkers(){return[...this.markers]}getCount(){return this.markers.length}capture(e){if(!this.isRecording||this.recordingStartTime===0)return null;const t={timestamp:Date.now()-this.recordingStartTime,eventType:e};return this.markers.push(t),console.log("[BWorlds Recorder] Screenshot marker added",{timestamp:t.timestamp,eventType:t.eventType,totalMarkers:this.markers.length}),t}captureDebounced(e,t=500){this.captureDebounceTimer&&clearTimeout(this.captureDebounceTimer),this.captureDebounceTimer=setTimeout(()=>{this.capture(e),this.captureDebounceTimer=null},t)}stop(){this.isRecording=!1,this.captureDebounceTimer&&(clearTimeout(this.captureDebounceTimer),this.captureDebounceTimer=null)}reset(){this.markers=[],this.recordingStartTime=0,this.isRecording=!1,this.captureDebounceTimer&&(clearTimeout(this.captureDebounceTimer),this.captureDebounceTimer=null)}}class kp{constructor(e){this.lastScrollY=0,this.viewportHeight=0,this.observers=[],this.isRecording=!1,this.hasInitialScreenshot=!1,this.handleScroll=()=>{if(!this.isRecording)return;const t=window.scrollY;Math.abs(t-this.lastScrollY)>this.viewportHeight*.5&&(this.lastScrollY=t,this.screenshotCapture.captureDebounced("scroll",500))},this.handleFormSubmit=t=>{this.isRecording&&this.triggerScreenshot("form_submit")},this.handleNavigation=()=>{this.isRecording&&setTimeout(()=>{this.triggerScreenshot("navigation")},500)},this.screenshotCapture=e,this.viewportHeight=window.innerHeight}start(){this.isRecording||(this.isRecording=!0,this.lastScrollY=window.scrollY,this.viewportHeight=window.innerHeight,this.hasInitialScreenshot=!1,this.setupModalDetection(),this.setupScrollDetection(),this.setupFormDetection(),this.setupNavigationDetection(),setTimeout(()=>{this.isRecording&&!this.hasInitialScreenshot&&(this.hasInitialScreenshot=!0,this.triggerScreenshot("load"))},500))}stop(){this.isRecording=!1,this.observers.forEach(e=>e.disconnect()),this.observers=[],window.removeEventListener("scroll",this.handleScroll),window.removeEventListener("popstate",this.handleNavigation)}handleRrwebEvent(e){this.isRecording&&e.type===R.IncrementalSnapshot&&e.data.source}triggerScreenshot(e){this.isRecording&&this.screenshotCapture.capture(e)}setupModalDetection(){const e=new MutationObserver(t=>{for(const r of t){if(r.type==="childList"){for(const i of r.addedNodes)if(i instanceof HTMLElement&&this.isModal(i)){setTimeout(()=>{this.triggerScreenshot("modal_open")},300);return}}if(r.type==="attributes"){const i=r.target;if(r.attributeName==="open"&&i.tagName==="DIALOG"&&i.hasAttribute("open")){setTimeout(()=>{this.triggerScreenshot("modal_open")},300);return}}}});e.observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["open","aria-hidden","aria-modal"]}),this.observers.push(e)}isModal(e){if(e.tagName.toLowerCase()==="dialog"||e.getAttribute("role")==="dialog"||e.getAttribute("role")==="alertdialog"||e.getAttribute("aria-modal")==="true")return!0;const r=e.className.toLowerCase(),i=["modal","dialog","overlay","popup","lightbox"];for(const o of i)if(r.includes(o))return!0;const n=window.getComputedStyle(e);if((n.position==="fixed"||n.position==="absolute")&&parseInt(n.zIndex)>100){const o=e.getBoundingClientRect(),l=window.innerWidth*window.innerHeight;if(o.width*o.height>l*.3)return!0}return!1}setupScrollDetection(){window.addEventListener("scroll",this.handleScroll,{passive:!0})}setupFormDetection(){document.addEventListener("submit",this.handleFormSubmit,!0)}setupNavigationDetection(){window.addEventListener("popstate",this.handleNavigation);const e=history.pushState.bind(history),t=history.replaceState.bind(history);history.pushState=(...r)=>{e(...r),this.handleNavigation()},history.replaceState=(...r)=>{t(...r),this.handleNavigation()}}destroy(){this.stop(),document.removeEventListener("submit",this.handleFormSubmit,!0)}}class Ep{constructor(){this.recordingId="",this.sessionToken="",this.metadata=null,this.chunks=[],this.screenshotMarkers=[]}async start(e){return this.recordingId=`rec_${Date.now()}_${Math.random().toString(36).substr(2,9)}`,this.sessionToken=`tok_${Math.random().toString(36).substr(2,16)}`,this.metadata=e,this.chunks=[],this.screenshotMarkers=[],console.log("[BWorlds Recorder] Recording started",{recordingId:this.recordingId,metadata:{url:e.url,viewport:e.viewport,startedAt:new Date(e.startedAt).toISOString()}}),{token:this.sessionToken,recordingId:this.recordingId,expiresAt:Date.now()+3600*1e3}}async uploadChunk(e){this.chunks.push(e),console.log("[BWorlds Recorder] Chunk uploaded",{recordingId:this.recordingId,chunkIndex:e.index,eventCount:e.events.length,totalEvents:this.chunks.reduce((t,r)=>t+r.events.length,0)})}async complete(e,t,r){this.screenshotMarkers=r;const i={recordingId:this.recordingId,playbackUrl:`https://app.bworlds.com/recordings/${this.recordingId}`,duration:e,eventCount:this.chunks.reduce((n,o)=>n+o.events.length,0),screenshotCount:r.length};return console.log("[BWorlds Recorder] Recording completed",{...i,metadata:this.metadata,screenshotMarkers:r.map(n=>({timestamp:n.timestamp,eventType:n.eventType}))}),console.log("[BWorlds Recorder] Recording data summary:",{chunks:this.chunks.length,screenshotMarkers:r.length,totalEvents:i.eventCount,duration:`${Math.round(e/1e3)}s`}),i}getData(){return{metadata:this.metadata,chunks:this.chunks,screenshotMarkers:this.screenshotMarkers}}}class Ap{constructor(e,t){this.sessionToken="",this.recordingId="",this.apiEndpoint=e,this.apiKey=t}async start(e){const t=await fetch(`${this.apiEndpoint}/api/recordings/start`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({api_key:this.apiKey,metadata:{url:e.url,user_agent:e.userAgent,viewport:e.viewport}})});if(!t.ok)throw new Error(`Failed to start recording: ${t.statusText}`);const r=await t.json();return this.sessionToken=r.session_token,this.recordingId=r.recording_id,{token:r.session_token,recordingId:r.recording_id,expiresAt:r.expires_at}}async uploadChunk(e){const t=await fetch(`${this.apiEndpoint}/api/recordings/${this.recordingId}/chunk`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${this.sessionToken}`},body:JSON.stringify({events:e.events,chunk_index:e.index})});if(!t.ok)throw new Error(`Failed to upload chunk: ${t.statusText}`)}async complete(e,t,r){const i=await fetch(`${this.apiEndpoint}/api/recordings/${this.recordingId}/complete`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${this.sessionToken}`},body:JSON.stringify({duration_ms:e,event_count:t,screenshot_markers:r.map(o=>({timestamp_ms:o.timestamp,event_type:o.eventType}))})});if(!i.ok)throw new Error(`Failed to complete recording: ${i.statusText}`);const n=await i.json();return{recordingId:this.recordingId,playbackUrl:n.playback_url,duration:e,eventCount:t,screenshotCount:r.length}}}var Ar,D,Aa,_e,bn,Ma,Oa,$a,li,Ms,Os,pr={},dr=[],Mp=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Mr=Array.isArray;function de(s,e){for(var t in e)s[t]=e[t];return s}function ui(s){s&&s.parentNode&&s.parentNode.removeChild(s)}function Op(s,e,t){var r,i,n,o={};for(n in e)n=="key"?r=e[n]:n=="ref"?i=e[n]:o[n]=e[n];if(arguments.length>2&&(o.children=arguments.length>3?Ar.call(arguments,2):t),typeof s=="function"&&s.defaultProps!=null)for(n in s.defaultProps)o[n]===void 0&&(o[n]=s.defaultProps[n]);return Zt(s,o,r,i,null)}function Zt(s,e,t,r,i){var n={type:s,props:e,key:t,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:i??++Aa,__i:-1,__u:0};return i==null&&D.vnode!=null&&D.vnode(n),n}function We(s){return s.children}function Jt(s,e){this.props=s,this.context=e}function je(s,e){if(e==null)return s.__?je(s.__,s.__i+1):null;for(var t;e<s.__k.length;e++)if((t=s.__k[e])!=null&&t.__e!=null)return t.__e;return typeof s.type=="function"?je(s):null}function $p(s){if(s.__P&&s.__d){var e=s.__v,t=e.__e,r=[],i=[],n=de({},e);n.__v=e.__v+1,D.vnode&&D.vnode(n),ci(s.__P,n,e,s.__n,s.__P.namespaceURI,32&e.__u?[t]:null,r,t??je(e),!!(32&e.__u),i),n.__v=e.__v,n.__.__k[n.__i]=n,Da(r,n,i),e.__e=e.__=null,n.__e!=t&&Na(n)}}function Na(s){if((s=s.__)!=null&&s.__c!=null)return s.__e=s.__c.base=null,s.__k.some(function(e){if(e!=null&&e.__e!=null)return s.__e=s.__c.base=e.__e}),Na(s)}function vn(s){(!s.__d&&(s.__d=!0)&&_e.push(s)&&!mr.__r++||bn!=D.debounceRendering)&&((bn=D.debounceRendering)||Ma)(mr)}function mr(){for(var s,e=1;_e.length;)_e.length>e&&_e.sort(Oa),s=_e.shift(),e=_e.length,$p(s);mr.__r=0}function Ta(s,e,t,r,i,n,o,l,a,u,h){var c,p,d,g,m,f,v,b=r&&r.__k||dr,y=e.length;for(a=Np(t,e,b,a,y),c=0;c<y;c++)(d=t.__k[c])!=null&&(p=d.__i!=-1&&b[d.__i]||pr,d.__i=c,f=ci(s,d,p,i,n,o,l,a,u,h),g=d.__e,d.ref&&p.ref!=d.ref&&(p.ref&&hi(p.ref,null,d),h.push(d.ref,d.__c||g,d)),m==null&&g!=null&&(m=g),(v=!!(4&d.__u))||p.__k===d.__k?a=Pa(d,a,s,v):typeof d.type=="function"&&f!==void 0?a=f:g&&(a=g.nextSibling),d.__u&=-7);return t.__e=m,a}function Np(s,e,t,r,i){var n,o,l,a,u,h=t.length,c=h,p=0;for(s.__k=new Array(i),n=0;n<i;n++)(o=e[n])!=null&&typeof o!="boolean"&&typeof o!="function"?(typeof o=="string"||typeof o=="number"||typeof o=="bigint"||o.constructor==String?o=s.__k[n]=Zt(null,o,null,null,null):Mr(o)?o=s.__k[n]=Zt(We,{children:o},null,null,null):o.constructor===void 0&&o.__b>0?o=s.__k[n]=Zt(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):s.__k[n]=o,a=n+p,o.__=s,o.__b=s.__b+1,l=null,(u=o.__i=Tp(o,t,a,c))!=-1&&(c--,(l=t[u])&&(l.__u|=2)),l==null||l.__v==null?(u==-1&&(i>h?p--:i<h&&p++),typeof o.type!="function"&&(o.__u|=4)):u!=a&&(u==a-1?p--:u==a+1?p++:(u>a?p--:p++,o.__u|=4))):s.__k[n]=null;if(c)for(n=0;n<h;n++)(l=t[n])!=null&&(2&l.__u)==0&&(l.__e==r&&(r=je(l)),Fa(l,l));return r}function Pa(s,e,t,r){var i,n;if(typeof s.type=="function"){for(i=s.__k,n=0;i&&n<i.length;n++)i[n]&&(i[n].__=s,e=Pa(i[n],e,t,r));return e}s.__e!=e&&(r&&(e&&s.type&&!e.parentNode&&(e=je(s)),t.insertBefore(s.__e,e||null)),e=s.__e);do e=e&&e.nextSibling;while(e!=null&&e.nodeType==8);return e}function Tp(s,e,t,r){var i,n,o,l=s.key,a=s.type,u=e[t],h=u!=null&&(2&u.__u)==0;if(u===null&&l==null||h&&l==u.key&&a==u.type)return t;if(r>(h?1:0)){for(i=t-1,n=t+1;i>=0||n<e.length;)if((u=e[o=i>=0?i--:n++])!=null&&(2&u.__u)==0&&l==u.key&&a==u.type)return o}return-1}function Sn(s,e,t){e[0]=="-"?s.setProperty(e,t??""):s[e]=t==null?"":typeof t!="number"||Mp.test(e)?t:t+"px"}function zt(s,e,t,r,i){var n,o;e:if(e=="style")if(typeof t=="string")s.style.cssText=t;else{if(typeof r=="string"&&(s.style.cssText=r=""),r)for(e in r)t&&e in t||Sn(s.style,e,"");if(t)for(e in t)r&&t[e]==r[e]||Sn(s.style,e,t[e])}else if(e[0]=="o"&&e[1]=="n")n=e!=(e=e.replace($a,"$1")),o=e.toLowerCase(),e=o in s||e=="onFocusOut"||e=="onFocusIn"?o.slice(2):e.slice(2),s.l||(s.l={}),s.l[e+n]=t,t?r?t.u=r.u:(t.u=li,s.addEventListener(e,n?Os:Ms,n)):s.removeEventListener(e,n?Os:Ms,n);else{if(i=="http://www.w3.org/2000/svg")e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(e!="width"&&e!="height"&&e!="href"&&e!="list"&&e!="form"&&e!="tabIndex"&&e!="download"&&e!="rowSpan"&&e!="colSpan"&&e!="role"&&e!="popover"&&e in s)try{s[e]=t??"";break e}catch{}typeof t=="function"||(t==null||t===!1&&e[4]!="-"?s.removeAttribute(e):s.setAttribute(e,e=="popover"&&t==1?"":t))}}function Cn(s){return function(e){if(this.l){var t=this.l[e.type+s];if(e.t==null)e.t=li++;else if(e.t<t.u)return;return t(D.event?D.event(e):e)}}}function ci(s,e,t,r,i,n,o,l,a,u){var h,c,p,d,g,m,f,v,b,y,C,I,O,B,T,A=e.type;if(e.constructor!==void 0)return null;128&t.__u&&(a=!!(32&t.__u),n=[l=e.__e=t.__e]),(h=D.__b)&&h(e);e:if(typeof A=="function")try{if(v=e.props,b="prototype"in A&&A.prototype.render,y=(h=A.contextType)&&r[h.__c],C=h?y?y.props.value:h.__:r,t.__c?f=(c=e.__c=t.__c).__=c.__E:(b?e.__c=c=new A(v,C):(e.__c=c=new Jt(v,C),c.constructor=A,c.render=Dp),y&&y.sub(c),c.state||(c.state={}),c.__n=r,p=c.__d=!0,c.__h=[],c._sb=[]),b&&c.__s==null&&(c.__s=c.state),b&&A.getDerivedStateFromProps!=null&&(c.__s==c.state&&(c.__s=de({},c.__s)),de(c.__s,A.getDerivedStateFromProps(v,c.__s))),d=c.props,g=c.state,c.__v=e,p)b&&A.getDerivedStateFromProps==null&&c.componentWillMount!=null&&c.componentWillMount(),b&&c.componentDidMount!=null&&c.__h.push(c.componentDidMount);else{if(b&&A.getDerivedStateFromProps==null&&v!==d&&c.componentWillReceiveProps!=null&&c.componentWillReceiveProps(v,C),e.__v==t.__v||!c.__e&&c.shouldComponentUpdate!=null&&c.shouldComponentUpdate(v,c.__s,C)===!1){e.__v!=t.__v&&(c.props=v,c.state=c.__s,c.__d=!1),e.__e=t.__e,e.__k=t.__k,e.__k.some(function(z){z&&(z.__=e)}),dr.push.apply(c.__h,c._sb),c._sb=[],c.__h.length&&o.push(c);break e}c.componentWillUpdate!=null&&c.componentWillUpdate(v,c.__s,C),b&&c.componentDidUpdate!=null&&c.__h.push(function(){c.componentDidUpdate(d,g,m)})}if(c.context=C,c.props=v,c.__P=s,c.__e=!1,I=D.__r,O=0,b)c.state=c.__s,c.__d=!1,I&&I(e),h=c.render(c.props,c.state,c.context),dr.push.apply(c.__h,c._sb),c._sb=[];else do c.__d=!1,I&&I(e),h=c.render(c.props,c.state,c.context),c.state=c.__s;while(c.__d&&++O<25);c.state=c.__s,c.getChildContext!=null&&(r=de(de({},r),c.getChildContext())),b&&!p&&c.getSnapshotBeforeUpdate!=null&&(m=c.getSnapshotBeforeUpdate(d,g)),B=h!=null&&h.type===We&&h.key==null?La(h.props.children):h,l=Ta(s,Mr(B)?B:[B],e,t,r,i,n,o,l,a,u),c.base=e.__e,e.__u&=-161,c.__h.length&&o.push(c),f&&(c.__E=c.__=null)}catch(z){if(e.__v=null,a||n!=null)if(z.then){for(e.__u|=a?160:128;l&&l.nodeType==8&&l.nextSibling;)l=l.nextSibling;n[n.indexOf(l)]=null,e.__e=l}else{for(T=n.length;T--;)ui(n[T]);$s(e)}else e.__e=t.__e,e.__k=t.__k,z.then||$s(e);D.__e(z,e,t)}else n==null&&e.__v==t.__v?(e.__k=t.__k,e.__e=t.__e):l=e.__e=Pp(t.__e,e,t,r,i,n,o,a,u);return(h=D.diffed)&&h(e),128&e.__u?void 0:l}function $s(s){s&&(s.__c&&(s.__c.__e=!0),s.__k&&s.__k.some($s))}function Da(s,e,t){for(var r=0;r<t.length;r++)hi(t[r],t[++r],t[++r]);D.__c&&D.__c(e,s),s.some(function(i){try{s=i.__h,i.__h=[],s.some(function(n){n.call(i)})}catch(n){D.__e(n,i.__v)}})}function La(s){return typeof s!="object"||s==null||s.__b>0?s:Mr(s)?s.map(La):de({},s)}function Pp(s,e,t,r,i,n,o,l,a){var u,h,c,p,d,g,m,f=t.props||pr,v=e.props,b=e.type;if(b=="svg"?i="http://www.w3.org/2000/svg":b=="math"?i="http://www.w3.org/1998/Math/MathML":i||(i="http://www.w3.org/1999/xhtml"),n!=null){for(u=0;u<n.length;u++)if((d=n[u])&&"setAttribute"in d==!!b&&(b?d.localName==b:d.nodeType==3)){s=d,n[u]=null;break}}if(s==null){if(b==null)return document.createTextNode(v);s=document.createElementNS(i,b,v.is&&v),l&&(D.__m&&D.__m(e,n),l=!1),n=null}if(b==null)f===v||l&&s.data==v||(s.data=v);else{if(n=n&&Ar.call(s.childNodes),!l&&n!=null)for(f={},u=0;u<s.attributes.length;u++)f[(d=s.attributes[u]).name]=d.value;for(u in f)d=f[u],u=="dangerouslySetInnerHTML"?c=d:u=="children"||u in v||u=="value"&&"defaultValue"in v||u=="checked"&&"defaultChecked"in v||zt(s,u,null,d,i);for(u in v)d=v[u],u=="children"?p=d:u=="dangerouslySetInnerHTML"?h=d:u=="value"?g=d:u=="checked"?m=d:l&&typeof d!="function"||f[u]===d||zt(s,u,d,f[u],i);if(h)l||c&&(h.__html==c.__html||h.__html==s.innerHTML)||(s.innerHTML=h.__html),e.__k=[];else if(c&&(s.innerHTML=""),Ta(e.type=="template"?s.content:s,Mr(p)?p:[p],e,t,r,b=="foreignObject"?"http://www.w3.org/1999/xhtml":i,n,o,n?n[0]:t.__k&&je(t,0),l,a),n!=null)for(u=n.length;u--;)ui(n[u]);l||(u="value",b=="progress"&&g==null?s.removeAttribute("value"):g!=null&&(g!==s[u]||b=="progress"&&!g||b=="option"&&g!=f[u])&&zt(s,u,g,f[u],i),u="checked",m!=null&&m!=s[u]&&zt(s,u,m,f[u],i))}return s}function hi(s,e,t){try{if(typeof s=="function"){var r=typeof s.__u=="function";r&&s.__u(),r&&e==null||(s.__u=s(e))}else s.current=e}catch(i){D.__e(i,t)}}function Fa(s,e,t){var r,i;if(D.unmount&&D.unmount(s),(r=s.ref)&&(r.current&&r.current!=s.__e||hi(r,null,e)),(r=s.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(n){D.__e(n,e)}r.base=r.__P=null}if(r=s.__k)for(i=0;i<r.length;i++)r[i]&&Fa(r[i],e,t||typeof s.type!="function");t||ui(s.__e),s.__c=s.__=s.__e=void 0}function Dp(s,e,t){return this.constructor(s,t)}function gr(s,e,t){var r,i,n,o;e==document&&(e=document.documentElement),D.__&&D.__(s,e),i=(r=!1)?null:e.__k,n=[],o=[],ci(e,s=e.__k=Op(We,null,[s]),i||pr,pr,e.namespaceURI,i?null:e.firstChild?Ar.call(e.childNodes):null,n,i?i.__e:e.firstChild,r,o),Da(n,s,o)}Ar=dr.slice,D={__e:function(s,e,t,r){for(var i,n,o;e=e.__;)if((i=e.__c)&&!i.__)try{if((n=i.constructor)&&n.getDerivedStateFromError!=null&&(i.setState(n.getDerivedStateFromError(s)),o=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(s,r||{}),o=i.__d),o)return i.__E=i}catch(l){s=l}throw s}},Aa=0,Jt.prototype.setState=function(s,e){var t;t=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=de({},this.state),typeof s=="function"&&(s=s(de({},t),this.props)),s&&de(t,s),s!=null&&this.__v&&(e&&this._sb.push(e),vn(this))},Jt.prototype.forceUpdate=function(s){this.__v&&(this.__e=!0,s&&this.__h.push(s),vn(this))},Jt.prototype.render=We,_e=[],Ma=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Oa=function(s,e){return s.__v.__b-e.__v.__b},mr.__r=0,$a=/(PointerCapture)$|Capture$/i,li=0,Ms=Cn(!1),Os=Cn(!0);var Lp=0;function w(s,e,t,r,i,n){e||(e={});var o,l,a=e;if("ref"in a)for(l in a={},e)l=="ref"?o=e[l]:a[l]=e[l];var u={type:s,props:a,key:t,ref:o,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--Lp,__i:-1,__u:0,__source:i,__self:n};if(typeof s=="function"&&(o=s.defaultProps))for(l in o)a[l]===void 0&&(a[l]=o[l]);return D.vnode&&D.vnode(u),u}const Ns="bw-recorder-styles",Fp=`
60
- .bw-recorder-toolbar {
61
- --bw-cream: #FAF7F2;
62
- --bw-cream-dim: #F0EBE0;
63
- --bw-charcoal: #1F1F23;
64
- --bw-coral: #E64C3C;
65
- --bw-coral-light: #EF6355;
66
- --bw-stone-200: #e7e5e4;
67
- --bw-stone-400: #a8a29e;
68
- --bw-stone-500: #78716c;
69
- position: fixed;
70
- z-index: 2147483647;
71
- font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
72
- font-size: 13px;
73
- line-height: 1;
74
- box-sizing: border-box;
75
- }
76
- .bw-recorder-toolbar * { box-sizing: border-box; }
77
- .bw-recorder-toolbar.bottom-right { bottom: 16px; right: 16px; }
78
- .bw-recorder-toolbar.bottom-left { bottom: 16px; left: 16px; }
79
- .bw-recorder-toolbar.top-right { top: 16px; right: 16px; }
80
- .bw-recorder-toolbar.top-left { top: 16px; left: 16px; }
81
- .bw-toolbar-container {
82
- display: flex;
83
- align-items: center;
84
- gap: 2px;
85
- background: var(--bw-cream);
86
- border: 1px solid var(--bw-stone-200);
87
- border-radius: 8px;
88
- padding: 4px;
89
- box-shadow: 0 2px 0 rgba(0, 0, 0, 0.1);
90
- }
91
- .bw-toolbar-status {
92
- display: flex;
93
- align-items: center;
94
- gap: 8px;
95
- padding: 0 12px 0 8px;
96
- border-right: 1px solid var(--bw-stone-200);
97
- min-width: 130px;
98
- }
99
- .bw-status-indicator {
100
- width: 8px;
101
- height: 8px;
102
- border-radius: 50%;
103
- background: var(--bw-stone-400);
104
- flex-shrink: 0;
105
- }
106
- .bw-status-indicator.recording {
107
- background: var(--bw-coral);
108
- animation: bw-pulse 1.5s ease-in-out infinite;
109
- }
110
- .bw-status-indicator.paused { background: var(--bw-stone-500); }
111
- @keyframes bw-pulse {
112
- 0%, 100% { opacity: 1; }
113
- 50% { opacity: 0.5; }
114
- }
115
- @keyframes bw-spin {
116
- 0% { transform: rotate(0deg); }
117
- 100% { transform: rotate(360deg); }
118
- }
119
- .bw-spin {
120
- animation: bw-spin 1s linear infinite;
121
- }
122
- .bw-saving {
123
- color: var(--bw-stone-500);
124
- }
125
- .bw-status-text {
126
- color: var(--bw-charcoal);
127
- font-weight: 500;
128
- font-size: 12px;
129
- }
130
- .bw-status-time {
131
- color: var(--bw-stone-500);
132
- font-variant-numeric: tabular-nums;
133
- font-size: 12px;
134
- min-width: 40px;
135
- }
136
- .bw-toolbar-btn {
137
- display: flex;
138
- align-items: center;
139
- justify-content: center;
140
- width: 32px;
141
- height: 32px;
142
- border: none;
143
- border-radius: 6px;
144
- background: transparent;
145
- color: var(--bw-charcoal);
146
- cursor: pointer;
147
- transition: all 0.15s ease;
148
- padding: 0;
149
- }
150
- .bw-toolbar-btn:hover { background: var(--bw-cream-dim); }
151
- .bw-toolbar-btn:active { transform: translateY(1px); }
152
- .bw-toolbar-btn:disabled { opacity: 0.4; cursor: not-allowed; }
153
- .bw-toolbar-btn:disabled:hover { background: transparent; }
154
- .bw-toolbar-btn svg { width: 16px; height: 16px; }
155
- .bw-toolbar-btn.primary { background: var(--bw-coral); color: white; }
156
- .bw-toolbar-btn.primary:hover { background: var(--bw-coral-light); }
157
- .bw-toolbar-btn.stop { color: var(--bw-coral); }
158
- .bw-toolbar-btn.stop:hover { background: rgba(230, 76, 60, 0.1); }
159
- .bw-toolbar-divider {
160
- width: 1px;
161
- height: 20px;
162
- background: var(--bw-stone-200);
163
- margin: 0 4px;
164
- }
165
- .bw-toolbar-logo {
166
- display: flex;
167
- align-items: center;
168
- padding: 0 8px 0 4px;
169
- color: var(--bw-stone-400);
170
- font-size: 11px;
171
- font-weight: 600;
172
- letter-spacing: 0.5px;
173
- text-transform: lowercase;
174
- }
175
- .bw-toolbar-idle {
176
- display: flex;
177
- align-items: center;
178
- gap: 8px;
179
- padding: 8px 12px;
180
- background: var(--bw-cream);
181
- border: 1px solid var(--bw-stone-200);
182
- border-radius: 8px;
183
- box-shadow: 0 2px 0 rgba(0, 0, 0, 0.1);
184
- cursor: pointer;
185
- transition: all 0.15s ease;
186
- }
187
- .bw-toolbar-idle:hover {
188
- background: var(--bw-cream-dim);
189
- box-shadow: 0 1px 0 rgba(0, 0, 0, 0.1);
190
- transform: translateY(1px);
191
- }
192
- .bw-toolbar-idle .bw-idle-icon {
193
- width: 10px;
194
- height: 10px;
195
- border-radius: 50%;
196
- background: var(--bw-coral);
197
- }
198
- .bw-toolbar-idle .bw-idle-text {
199
- color: var(--bw-charcoal);
200
- font-weight: 500;
201
- font-size: 12px;
202
- }
203
- .bw-toolbar-idle .bw-idle-logo {
204
- color: var(--bw-stone-400);
205
- font-size: 10px;
206
- font-weight: 600;
207
- margin-left: 4px;
208
- }
209
- .bw-toolbar-complete {
210
- display: flex;
211
- align-items: center;
212
- gap: 8px;
213
- padding: 8px 12px;
214
- background: var(--bw-cream);
215
- border: 1px solid var(--bw-stone-200);
216
- border-radius: 8px;
217
- box-shadow: 0 2px 0 rgba(0, 0, 0, 0.1);
218
- }
219
- .bw-toolbar-complete .bw-complete-icon { color: #2AA9A1; }
220
- .bw-toolbar-complete .bw-complete-icon svg { width: 16px; height: 16px; }
221
- .bw-toolbar-complete .bw-complete-text {
222
- color: var(--bw-charcoal);
223
- font-weight: 500;
224
- font-size: 12px;
225
- }
226
- .bw-toolbar-complete a {
227
- color: var(--bw-coral);
228
- text-decoration: none;
229
- font-weight: 500;
230
- }
231
- .bw-toolbar-complete a:hover { text-decoration: underline; }
232
- .bw-restart-btn {
233
- margin-left: 8px;
234
- padding: 4px 10px;
235
- background: var(--bw-cream-dim);
236
- border: 1px solid var(--bw-stone-200);
237
- border-radius: 4px;
238
- color: var(--bw-charcoal);
239
- font-size: 11px;
240
- font-weight: 500;
241
- cursor: pointer;
242
- transition: all 0.15s ease;
243
- }
244
- .bw-restart-btn:hover {
245
- background: var(--bw-stone-200);
246
- }
247
- .bw-restart-btn:active {
248
- transform: translateY(1px);
249
- }
250
-
251
- /* Invite Dialog Styles */
252
- .bw-invite-overlay {
253
- position: fixed;
254
- top: 0;
255
- left: 0;
256
- right: 0;
257
- bottom: 0;
258
- background: #1F1F23;
259
- display: flex;
260
- align-items: center;
261
- justify-content: center;
262
- z-index: 2147483646;
263
- font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
264
- box-sizing: border-box;
265
- }
266
- .bw-invite-overlay * { box-sizing: border-box; }
267
- .bw-invite-dialog {
268
- background: white;
269
- border-radius: 12px;
270
- padding: 32px;
271
- width: 100%;
272
- max-width: 360px;
273
- box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
274
- animation: bw-invite-fade-in 0.2s ease-out;
275
- }
276
- @keyframes bw-invite-fade-in {
277
- from { opacity: 0; transform: scale(0.95); }
278
- to { opacity: 1; transform: scale(1); }
279
- }
280
- .bw-invite-logo {
281
- display: flex;
282
- justify-content: center;
283
- margin-bottom: 24px;
284
- color: var(--bw-coral, #E64C3C);
285
- }
286
- .bw-invite-logo svg {
287
- width: 40px;
288
- height: 40px;
289
- }
290
- .bw-invite-title {
291
- text-align: center;
292
- font-size: 24px;
293
- font-weight: 600;
294
- color: #1F1F23;
295
- margin: 0 0 8px 0;
296
- }
297
- .bw-invite-subtitle {
298
- text-align: center;
299
- font-size: 14px;
300
- color: #6b7280;
301
- margin: 0 0 24px 0;
302
- line-height: 1.5;
303
- }
304
- .bw-invite-form {
305
- display: flex;
306
- flex-direction: column;
307
- gap: 12px;
308
- }
309
- .bw-invite-field {
310
- position: relative;
311
- }
312
- .bw-invite-input {
313
- width: 100%;
314
- padding: 12px 16px;
315
- font-size: 14px;
316
- border: 1px solid #e5e7eb;
317
- border-radius: 8px;
318
- background: white;
319
- color: #1F1F23;
320
- outline: none;
321
- transition: border-color 0.15s ease, box-shadow 0.15s ease;
322
- }
323
- .bw-invite-input:focus {
324
- border-color: var(--bw-coral, #E64C3C);
325
- box-shadow: 0 0 0 3px rgba(230, 76, 60, 0.1);
326
- }
327
- .bw-invite-input[readonly] {
328
- background: #f9fafb;
329
- color: #6b7280;
330
- cursor: not-allowed;
331
- }
332
- .bw-invite-input::placeholder {
333
- color: #9ca3af;
334
- }
335
- .bw-invite-input[type="password"] {
336
- padding-right: 44px;
337
- }
338
- .bw-invite-input[type="text"]:not([readonly]) {
339
- padding-right: 44px;
340
- }
341
- .bw-invite-eye-btn {
342
- position: absolute;
343
- right: 8px;
344
- top: 50%;
345
- transform: translateY(-50%);
346
- width: 32px;
347
- height: 32px;
348
- display: flex;
349
- align-items: center;
350
- justify-content: center;
351
- background: none;
352
- border: none;
353
- cursor: pointer;
354
- color: #9ca3af;
355
- border-radius: 4px;
356
- transition: color 0.15s ease;
357
- }
358
- .bw-invite-eye-btn:hover {
359
- color: #6b7280;
360
- }
361
- .bw-invite-eye-btn svg {
362
- width: 18px;
363
- height: 18px;
364
- }
365
- .bw-invite-submit {
366
- display: flex;
367
- align-items: center;
368
- justify-content: center;
369
- gap: 8px;
370
- width: 100%;
371
- padding: 12px 16px;
372
- font-size: 14px;
373
- font-weight: 500;
374
- color: white;
375
- background: #10b981;
376
- border: none;
377
- border-radius: 8px;
378
- cursor: pointer;
379
- transition: background 0.15s ease;
380
- margin-top: 4px;
381
- }
382
- .bw-invite-submit:hover:not(:disabled) {
383
- background: #059669;
384
- }
385
- .bw-invite-submit:disabled {
386
- opacity: 0.6;
387
- cursor: not-allowed;
388
- }
389
- .bw-invite-submit svg {
390
- width: 16px;
391
- height: 16px;
392
- }
393
- @keyframes bw-invite-spin {
394
- from { transform: rotate(0deg); }
395
- to { transform: rotate(360deg); }
396
- }
397
- .bw-invite-spin {
398
- animation: bw-invite-spin 1s linear infinite;
399
- }
400
- .bw-invite-login-text {
401
- text-align: center;
402
- font-size: 13px;
403
- color: #6b7280;
404
- margin: 20px 0 0 0;
405
- }
406
- .bw-invite-login-link {
407
- color: #10b981;
408
- text-decoration: none;
409
- font-weight: 500;
410
- }
411
- .bw-invite-login-link:hover {
412
- text-decoration: underline;
413
- }
414
- .bw-invite-success {
415
- display: flex;
416
- flex-direction: column;
417
- align-items: center;
418
- padding: 16px 0;
419
- animation: bw-invite-fade-in 0.3s ease-out;
420
- }
421
- .bw-invite-success-icon {
422
- color: #10b981;
423
- margin-bottom: 16px;
424
- }
425
- .bw-invite-success-icon svg {
426
- width: 48px;
427
- height: 48px;
428
- }
429
- .bw-invite-success-title {
430
- font-size: 20px;
431
- font-weight: 600;
432
- color: #1F1F23;
433
- margin: 0 0 4px 0;
434
- }
435
- .bw-invite-success-text {
436
- font-size: 14px;
437
- color: #6b7280;
438
- margin: 0;
439
- }
440
- `;let Xt=!1;function Ua(){if(Xt||typeof document>"u")return;if(document.getElementById(Ns)){Xt=!0;return}const s=document.createElement("style");s.id=Ns,s.textContent=Fp,document.head.appendChild(s),Xt=!0}function Up(){const s=document.getElementById(Ns);s&&(s.remove(),Xt=!1)}const Bp=()=>w("svg",{viewBox:"0 0 24 24",fill:"currentColor",stroke:"none",children:w("path",{d:"M8 5v14l11-7z"})}),zp=()=>w("svg",{viewBox:"0 0 24 24",fill:"currentColor",stroke:"none",children:w("path",{d:"M6 4h4v16H6V4zm8 0h4v16h-4V4z"})}),Wp=()=>w("svg",{viewBox:"0 0 24 24",fill:"currentColor",stroke:"none",children:w("path",{d:"M6 6h12v12H6z"})}),jp=()=>w("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2",children:[w("path",{d:"M23 19a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h4l2-3h6l2 3h4a2 2 0 0 1 2 2z"}),w("circle",{cx:"12",cy:"13",r:"4"})]}),Hp=()=>w("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2",children:w("path",{d:"M20 6L9 17l-5-5"})}),Gp=()=>w("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2",class:"bw-spin",children:w("path",{d:"M12 2v4m0 12v4m10-10h-4M6 12H2m15.07-5.07l-2.83 2.83M9.76 14.24l-2.83 2.83m11.14 0l-2.83-2.83M9.76 9.76L6.93 6.93"})});function Vp(s){const e=Math.floor(s/1e3),t=Math.floor(e/60),r=e%60;return`${t.toString().padStart(2,"0")}:${r.toString().padStart(2,"0")}`}function Yp({position:s,state:e,elapsedTime:t,result:r,onStart:i,onPause:n,onResume:o,onStop:l,onScreenshot:a,onRestart:u}){if(e==="idle")return w("div",{class:`bw-recorder-toolbar ${s}`,"data-bw-recorder-ui":!0,children:w("button",{class:"bw-toolbar-idle",onClick:i,type:"button",children:[w("span",{class:"bw-idle-icon"}),w("span",{class:"bw-idle-text",children:"Start Recording"}),w("span",{class:"bw-idle-logo",children:"bw"})]})});if(e==="stopped"&&r)return w("div",{class:`bw-recorder-toolbar ${s}`,"data-bw-recorder-ui":!0,children:w("div",{class:"bw-toolbar-complete",children:[w("span",{class:"bw-complete-icon",children:w(Hp,{})}),w("span",{class:"bw-complete-text",children:["Recording saved!"," ",w("a",{href:r.playbackUrl,target:"_blank",rel:"noopener noreferrer",children:"View"})]}),w("button",{class:"bw-restart-btn",onClick:u,type:"button",title:"Start new recording",children:"New"})]})});if(e==="stopped")return w("div",{class:`bw-recorder-toolbar ${s}`,"data-bw-recorder-ui":!0,children:w("div",{class:"bw-toolbar-complete",children:[w("span",{class:"bw-complete-icon bw-saving",children:w(Gp,{})}),w("span",{class:"bw-complete-text",children:"Saving..."})]})});const h=e==="recording",c=e==="paused";return w("div",{class:`bw-recorder-toolbar ${s}`,"data-bw-recorder-ui":!0,children:w("div",{class:"bw-toolbar-container",children:[w("div",{class:"bw-toolbar-status",children:[w("span",{class:`bw-status-indicator ${h?"recording":""} ${c?"paused":""}`}),w("span",{class:"bw-status-text",children:h?"Recording":"Paused"}),w("span",{class:"bw-status-time",children:Vp(t)})]}),w("button",{class:"bw-toolbar-btn",onClick:h?n:o,title:h?"Pause":"Resume",type:"button",children:h?w(zp,{}):w(Bp,{})}),w("button",{class:"bw-toolbar-btn stop",onClick:l,title:"Stop Recording",type:"button",children:w(Wp,{})}),w("div",{class:"bw-toolbar-divider"}),w("button",{class:"bw-toolbar-btn",onClick:a,title:"Take Screenshot",disabled:!h,type:"button",children:w(jp,{})}),w("div",{class:"bw-toolbar-divider"}),w("span",{class:"bw-toolbar-logo",children:"bw"})]})})}class Zp{constructor(e="bottom-right"){this.container=null,this.state="idle",this.elapsedTime=0,this.result=null,this.updateInterval=null,this.getElapsedTime=null,this.onStartCallback=null,this.onPauseCallback=null,this.onResumeCallback=null,this.onStopCallback=null,this.onScreenshotCallback=null,this.onRestartCallback=null,this.position=e}mount(){this.container||(Ua(),this.container=document.createElement("div"),this.container.id="bw-recorder-root",this.container.setAttribute("data-bw-recorder-ui",""),document.body.appendChild(this.container),this.render())}unmount(){this.updateInterval&&(clearInterval(this.updateInterval),this.updateInterval=null),this.container&&(gr(null,this.container),this.container.remove(),this.container=null),Up()}setCallbacks(e){this.onStartCallback=e.onStart??null,this.onPauseCallback=e.onPause??null,this.onResumeCallback=e.onResume??null,this.onStopCallback=e.onStop??null,this.onScreenshotCallback=e.onScreenshot??null,this.onRestartCallback=e.onRestart??null,this.getElapsedTime=e.getElapsedTime??null}setState(e){this.state=e,e==="recording"?this.startTimeUpdates():(e==="stopped"||e==="idle")&&this.stopTimeUpdates(),this.render()}setResult(e){this.result=e,this.render()}reset(){this.state="idle",this.result=null,this.elapsedTime=0,this.render()}startTimeUpdates(){this.updateInterval||(this.updateInterval=setInterval(()=>{this.getElapsedTime&&(this.elapsedTime=this.getElapsedTime(),this.render())},100))}stopTimeUpdates(){this.updateInterval&&(clearInterval(this.updateInterval),this.updateInterval=null)}render(){this.container&&gr(w(Yp,{position:this.position,state:this.state,elapsedTime:this.elapsedTime,result:this.result,onStart:()=>{var e;return(e=this.onStartCallback)==null?void 0:e.call(this)},onPause:()=>{var e;return(e=this.onPauseCallback)==null?void 0:e.call(this)},onResume:()=>{var e;return(e=this.onResumeCallback)==null?void 0:e.call(this)},onStop:()=>{var e;return(e=this.onStopCallback)==null?void 0:e.call(this)},onScreenshot:()=>{var e;return(e=this.onScreenshotCallback)==null?void 0:e.call(this)},onRestart:()=>{var e;return(e=this.onRestartCallback)==null?void 0:e.call(this)}}),this.container)}}var Ts,Y,Zr,_n,Ps=0,Ba=[],J=D,xn=J.__b,In=J.__r,Rn=J.diffed,kn=J.__c,En=J.unmount,An=J.__;function Jp(s,e){J.__h&&J.__h(Y,s,Ps||e),Ps=0;var t=Y.__H||(Y.__H={__:[],__h:[]});return s>=t.__.length&&t.__.push({}),t.__[s]}function Jr(s){return Ps=1,Xp(za,s)}function Xp(s,e,t){var r=Jp(Ts++,2);if(r.t=s,!r.__c&&(r.__=[za(void 0,e),function(l){var a=r.__N?r.__N[0]:r.__[0],u=r.t(a,l);a!==u&&(r.__N=[u,r.__[1]],r.__c.setState({}))}],r.__c=Y,!Y.__f)){var i=function(l,a,u){if(!r.__c.__H)return!0;var h=r.__c.__H.__.filter(function(p){return p.__c});if(h.every(function(p){return!p.__N}))return!n||n.call(this,l,a,u);var c=r.__c.props!==l;return h.some(function(p){if(p.__N){var d=p.__[0];p.__=p.__N,p.__N=void 0,d!==p.__[0]&&(c=!0)}}),n&&n.call(this,l,a,u)||c};Y.__f=!0;var n=Y.shouldComponentUpdate,o=Y.componentWillUpdate;Y.componentWillUpdate=function(l,a,u){if(this.__e){var h=n;n=void 0,i(l,a,u),n=h}o&&o.call(this,l,a,u)},Y.shouldComponentUpdate=i}return r.__N||r.__}function Kp(){for(var s;s=Ba.shift();){var e=s.__H;if(s.__P&&e)try{e.__h.some(Kt),e.__h.some(Ds),e.__h=[]}catch(t){e.__h=[],J.__e(t,s.__v)}}}J.__b=function(s){Y=null,xn&&xn(s)},J.__=function(s,e){s&&e.__k&&e.__k.__m&&(s.__m=e.__k.__m),An&&An(s,e)},J.__r=function(s){In&&In(s),Ts=0;var e=(Y=s.__c).__H;e&&(Zr===Y?(e.__h=[],Y.__h=[],e.__.some(function(t){t.__N&&(t.__=t.__N),t.u=t.__N=void 0})):(e.__h.some(Kt),e.__h.some(Ds),e.__h=[],Ts=0)),Zr=Y},J.diffed=function(s){Rn&&Rn(s);var e=s.__c;e&&e.__H&&(e.__H.__h.length&&(Ba.push(e)!==1&&_n===J.requestAnimationFrame||((_n=J.requestAnimationFrame)||Qp)(Kp)),e.__H.__.some(function(t){t.u&&(t.__H=t.u),t.u=void 0})),Zr=Y=null},J.__c=function(s,e){e.some(function(t){try{t.__h.some(Kt),t.__h=t.__h.filter(function(r){return!r.__||Ds(r)})}catch(r){e.some(function(i){i.__h&&(i.__h=[])}),e=[],J.__e(r,t.__v)}}),kn&&kn(s,e)},J.unmount=function(s){En&&En(s);var e,t=s.__c;t&&t.__H&&(t.__H.__.some(function(r){try{Kt(r)}catch(i){e=i}}),t.__H=void 0,e&&J.__e(e,t.__v))};var Mn=typeof requestAnimationFrame=="function";function Qp(s){var e,t=function(){clearTimeout(r),Mn&&cancelAnimationFrame(e),setTimeout(s)},r=setTimeout(t,35);Mn&&(e=requestAnimationFrame(t))}function Kt(s){var e=Y,t=s.__c;typeof t=="function"&&(s.__c=void 0,t()),Y=e}function Ds(s){var e=Y;s.__c=s.__(),Y=e}function za(s,e){return typeof e=="function"?e(s):e}const yr="bw_invite_completed",qp=()=>w("svg",{xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",children:[w("path",{d:"m15 12-8.373 8.373a1 1 0 1 1-3-3L12 9"}),w("path",{d:"m18 15 4-4"}),w("path",{d:"m21.5 11.5-1.914-1.914A2 2 0 0 1 19 8.172V7l-2.26-2.26a6 6 0 0 0-4.202-1.756L9 2.96l.92.82A6.18 6.18 0 0 1 12 8.4V10l2 2h1.172a2 2 0 0 1 1.414.586L18.5 14.5"})]}),ed=()=>w("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",children:[w("path",{d:"M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"}),w("circle",{cx:"12",cy:"12",r:"3"})]}),td=()=>w("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",children:[w("path",{d:"M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07a3 3 0 1 1-4.24-4.24"}),w("line",{x1:"1",y1:"1",x2:"23",y2:"23"})]}),rd=()=>w("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",children:[w("path",{d:"M22 11.08V12a10 10 0 1 1-5.93-9.14"}),w("polyline",{points:"22 4 12 14.01 9 11.01"})]}),sd=()=>w("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2",class:"bw-invite-spin",children:w("path",{d:"M12 2v4m0 12v4m10-10h-4M6 12H2m15.07-5.07l-2.83 2.83M9.76 14.24l-2.83 2.83m11.14 0l-2.83-2.83M9.76 9.76L6.93 6.93"})});function id({email:s,onComplete:e,onLogin:t}){const[r,i]=Jr("form"),[n,o]=Jr(""),[l,a]=Jr(!1),u=c=>{c.preventDefault(),n.trim()&&(i("loading"),setTimeout(()=>{i("success"),localStorage.setItem(yr,JSON.stringify({email:s,timestamp:Date.now()})),setTimeout(()=>{e()},1500)},1200))},h=c=>{c.preventDefault(),localStorage.setItem(yr,JSON.stringify({email:s,timestamp:Date.now()})),t()};return w("div",{class:"bw-invite-overlay","data-bw-launchkit-ui":!0,children:w("div",{class:"bw-invite-dialog",children:r==="success"?w("div",{class:"bw-invite-success",children:[w("div",{class:"bw-invite-success-icon",children:w(rd,{})}),w("h2",{class:"bw-invite-success-title",children:"You're in!"}),w("p",{class:"bw-invite-success-text",children:"Welcome aboard."})]}):w(We,{children:[w("div",{class:"bw-invite-logo",children:w(qp,{})}),w("h2",{class:"bw-invite-title",children:"Welcome"}),w("p",{class:"bw-invite-subtitle",children:"You've been invited. Set a password to continue."}),w("form",{class:"bw-invite-form",onSubmit:u,children:[w("div",{class:"bw-invite-field",children:w("input",{type:"email",value:s,readonly:!0,class:"bw-invite-input",placeholder:"Email address"})}),w("div",{class:"bw-invite-field",children:[w("input",{type:l?"text":"password",value:n,onInput:c=>o(c.target.value),class:"bw-invite-input",placeholder:"Password",disabled:r==="loading",autoFocus:!0}),w("button",{type:"button",class:"bw-invite-eye-btn",onClick:()=>a(!l),tabIndex:-1,children:l?w(td,{}):w(ed,{})})]}),w("button",{type:"submit",class:"bw-invite-submit",disabled:r==="loading"||!n.trim(),children:r==="loading"?w(We,{children:[w(sd,{}),w("span",{children:"Setting up..."})]}):"Continue"})]}),w("p",{class:"bw-invite-login-text",children:["Already have an account?"," ",w("a",{href:"#",onClick:h,class:"bw-invite-login-link",children:"Log in"})]})]})})})}class Ls{constructor(e){this.container=null,this.onCompleteCallback=null,this.handleComplete=()=>{var t;this.unmount(),(t=this.onCompleteCallback)==null||t.call(this)},this.handleLogin=()=>{var t;this.unmount(),(t=this.onCompleteCallback)==null||t.call(this)},this.email=e}static isCompleted(){return typeof localStorage>"u"?!1:localStorage.getItem(yr)!==null}static clearCompletion(){typeof localStorage>"u"||localStorage.removeItem(yr)}mount(){this.container||(Ua(),this.container=document.createElement("div"),this.container.id="bw-invite-root",this.container.setAttribute("data-bw-launchkit-ui",""),document.body.appendChild(this.container),this.render())}unmount(){this.container&&(gr(null,this.container),this.container.remove(),this.container=null)}onComplete(e){this.onCompleteCallback=e}render(){this.container&&gr(w(id,{email:this.email,onComplete:this.handleComplete,onLogin:this.handleLogin}),this.container)}}class fi{constructor(e){this.toolbar=null,this.isInitialized=!1;const t=e.onStateChange;this.config={apiEndpoint:"https://api.bworlds.com",maxDuration:900*1e3,maskInputs:!0,autoOpenPlayback:!0,toolbar:{enabled:!0,position:"bottom-right"},...e,onStateChange:n=>{this.handleStateChange(n),t==null||t(n)}},this.recorder=new Ip(this.config),this.screenshotMarker=new Rp,this.eventDetector=new kp(this.screenshotMarker);const i=this.config.apiEndpoint&&this.config.apiEndpoint!=="https://api.bworlds.com"?new Ap(this.config.apiEndpoint,this.config.apiKey):new Ep;this.recorder.setUploader(i),this.recorder.onEvent(n=>{this.eventDetector.handleRrwebEvent(n)})}init(){var e,t;if(!this.isInitialized&&(this.isInitialized=!0,((e=this.config.toolbar)==null?void 0:e.enabled)!==!1)){const r=((t=this.config.toolbar)==null?void 0:t.position)??"bottom-right";this.toolbar=new Zp(r),this.toolbar.setCallbacks({onStart:()=>this.start(),onPause:()=>this.pause(),onResume:()=>this.resume(),onStop:()=>this.stop(),onScreenshot:()=>this.screenshot(),onRestart:()=>this.restart(),getElapsedTime:()=>this.recorder.getElapsedTime()}),this.toolbar.mount()}}async start(){var e;await this.recorder.start(),this.screenshotMarker.setStartTime(Date.now()),this.eventDetector.start(),(e=this.toolbar)==null||e.setState("recording")}pause(){var e;this.recorder.pause(),(e=this.toolbar)==null||e.setState("paused")}resume(){var e;this.recorder.resume(),(e=this.toolbar)==null||e.setState("recording")}async stop(){var n,o,l;this.eventDetector.stop(),this.screenshotMarker.stop();const e=this.screenshotMarker.getMarkers(),t=await this.recorder.stop(e);if((n=this.toolbar)==null||n.setState("stopped"),t)return(o=this.toolbar)==null||o.setResult(t),this.config.autoOpenPlayback!==!1&&t.playbackUrl&&window.open(t.playbackUrl,"_blank"),t;const r=this.recorder.getEvents(),i={recordingId:`rec_${Date.now()}`,playbackUrl:"",duration:this.recorder.getElapsedTime(),eventCount:r.length,screenshotCount:e.length};return(l=this.toolbar)==null||l.setResult(i),i}screenshot(){this.screenshotMarker.capture("manual")}restart(){var e;this.eventDetector.destroy(),this.recorder.reset(),this.screenshotMarker.reset(),(e=this.toolbar)==null||e.reset()}getState(){return this.recorder.getState()}getElapsedTime(){return this.recorder.getElapsedTime()}destroy(){var e;this.eventDetector.destroy(),this.recorder.reset(),this.screenshotMarker.reset(),(e=this.toolbar)==null||e.unmount(),this.isInitialized=!1}handleStateChange(e){var t;(t=this.toolbar)==null||t.setState(e)}}const nd="_bw_record",od="_bw_invite";function ad(){return typeof window>"u"?null:new URLSearchParams(window.location.search).get(nd)}function ld(){return typeof window>"u"?null:new URLSearchParams(window.location.search).get(od)}function ud(s){if(Ls.isCompleted()){console.log("[BWorlds LaunchKit] Invite already completed");return}console.log("[BWorlds LaunchKit] Showing invite dialog for:",s);const e=new Ls(s);e.onComplete(()=>{console.log("[BWorlds LaunchKit] Invite flow completed")}),e.mount(),typeof window<"u"&&(window.__bwInviteDialog=e)}function cd(s){const t=new URLSearchParams(window.location.search).get("_bw_api")||"http://localhost:3941";console.log("[BWorlds Recorder] Initializing with endpoint:",t);const r=new fi({apiKey:s,apiEndpoint:t,onComplete:i=>{console.log("[BWorlds Recorder] Recording complete:",i.playbackUrl)},onError:i=>{console.error("[BWorlds Recorder] Error:",i)}});r.init(),typeof window<"u"&&(window.__bwRecorder=r)}function hd(){typeof window>"u"||(document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>On()):On())}function On(){const s=ad(),e=ld();e&&ud(e),s&&cd(s)}exports.DemoRecorder=fi;exports.InviteDialogController=Ls;exports.default=fi;exports.init=hd;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g="https://api.bworlds.co";let d=null;function v(e){d=e}async function E(e,n){if(!d)return;const t=`${d.apiEndpoint||g}${e}`;try{await fetch(t,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n),keepalive:!0})}catch{}}const y=300*1e3;let l=null,s=null;function I(e,n=y){l||(s=e,b(),l=setInterval(b,n))}function T(){l&&(clearInterval(l),l=null)}async function b(){s&&await E("/api/telemetry/heartbeat",{buildSlug:s})}const m=1e4,H=5;let o=[],u=null,c=null,f=!1,i=null,r=null;function L(e){f||(f=!0,c=e,i=window.onerror,window.onerror=(n,t,_,h,a)=>(w({message:String(n),stack:(a==null?void 0:a.stack)??null,url:t??window.location.href}),i?i.call(window,n,t,_,h,a):!1),r=n=>{const t=n.reason;w({message:(t==null?void 0:t.message)??String(t),stack:(t==null?void 0:t.stack)??null,url:window.location.href})},window.addEventListener("unhandledrejection",r),u=setInterval(p,m))}function A(){u&&(clearInterval(u),u=null),p(),window.onerror=i,r&&(window.removeEventListener("unhandledrejection",r),r=null),i=null,f=!1}function w(e){o.push(e),o.length>=H&&p()}function p(){if(o.length===0||!c)return;const e=o.splice(0);E("/api/telemetry/errors",{buildSlug:c,errors:e})}function C(e){typeof window>"u"||(document.readyState==="loading"?document.addEventListener("DOMContentLoaded",()=>S(e)):S(e))}function S(e){v({buildSlug:e.buildSlug,apiEndpoint:e.apiEndpoint}),e.enableHeartbeat!==!1&&I(e.buildSlug,e.heartbeatInterval),e.enableErrorCapture!==!1&&L(e.buildSlug)}function O(){T(),A()}exports.init=C;exports.stop=O;
441
2
  //# sourceMappingURL=launchkit.cjs.map