ghostplay-sdk 0.1.9 → 0.2.1

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,10 +1,64 @@
1
- var GhostplaySDK=(function(exports){'use strict';var gt=(t=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(t,{get:(e,r)=>(typeof require<"u"?require:e)[r]}):t)(function(t){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')});var Lt={apiUrl:"https://api.ghostplay.dev/v1",maskAllInputs:true,recordNetwork:true,recordConsole:true,trackPerformance:true,trackRageClicks:true,trackNavigation:true,flushIntervalMs:5e3,flushMaxBytes:5e4};function Bt(t){if(!t.projectId)throw new Error("[Ghostplay] projectId is required");if(!t.projectId.startsWith("gp_"))throw new Error('[Ghostplay] projectId must start with "gp_"');return {...Lt,...t}}function Cr(){let t=Date.now().toString(36),e=Math.random().toString(36).substring(2,10);return `gs_${t}_${e}`}var Oe=class{constructor(e){this.projectId=e;this.session=null;}start(){return this.session={id:Cr(),projectId:this.projectId,startedAt:Date.now(),tags:[],metadata:{}},this.session}current(){if(!this.session)throw new Error("[Ghostplay] No active session");return this.session}identify(e,r){let n=this.current();n.userId=e,n.userTraits=r;}addTag(e){let r=this.current();r.tags.includes(e)||r.tags.push(e);}setMetadata(e){let r=this.current();r.metadata={...r.metadata,...e};}end(){this.session=null;}};var F;(function(t){t[t.Document=0]="Document",t[t.DocumentType=1]="DocumentType",t[t.Element=2]="Element",t[t.Text=3]="Text",t[t.CDATA=4]="CDATA",t[t.Comment=5]="Comment";})(F||(F={}));function Sr(t){return t.nodeType===t.ELEMENT_NODE}function ge(t){var e=t?.host;return e?.shadowRoot===t}function he(t){return Object.prototype.toString.call(t)==="[object ShadowRoot]"}function br(t){return t.includes(" background-clip: text;")&&!t.includes(" -webkit-background-clip: text;")&&(t=t.replace(" background-clip: text;"," -webkit-background-clip: text; background-clip: text;")),t}function mt(t){try{var e=t.rules||t.cssRules;return e?br(Array.from(e).map(vt).join("")):null}catch{return null}}function vt(t){var e=t.cssText;if(Ar(t))try{e=mt(t.styleSheet)||e;}catch{}return e}function Ar(t){return "styleSheet"in t}var Ut=(function(){function t(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap;}return t.prototype.getId=function(e){var r;if(!e)return -1;var n=(r=this.getMeta(e))===null||r===void 0?void 0:r.id;return n??-1},t.prototype.getNode=function(e){return this.idNodeMap.get(e)||null},t.prototype.getIds=function(){return Array.from(this.idNodeMap.keys())},t.prototype.getMeta=function(e){return this.nodeMetaMap.get(e)||null},t.prototype.removeNodeFromMap=function(e){var r=this,n=this.getId(e);this.idNodeMap.delete(n),e.childNodes&&e.childNodes.forEach(function(o){return r.removeNodeFromMap(o)});},t.prototype.has=function(e){return this.idNodeMap.has(e)},t.prototype.hasNode=function(e){return this.nodeMetaMap.has(e)},t.prototype.add=function(e,r){var n=r.id;this.idNodeMap.set(n,e),this.nodeMetaMap.set(e,r);},t.prototype.replace=function(e,r){var n=this.getNode(e);if(n){var o=this.nodeMetaMap.get(n);o&&this.nodeMetaMap.set(r,o);}this.idNodeMap.set(e,r);},t.prototype.reset=function(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap;},t})();function Ht(){return new Ut}function we(t){var e=t.maskInputOptions,r=t.tagName,n=t.type,o=t.value,i=t.maskInputFn,a=o||"";return (e[r.toLowerCase()]||e[n])&&(i?a=i(a):a="*".repeat(a.length)),a}var Gt="__rrweb_original__";function kr(t){var e=t.getContext("2d");if(!e)return true;for(var r=50,n=0;n<t.width;n+=r)for(var o=0;o<t.height;o+=r){var i=e.getImageData,a=Gt in i?i[Gt]:i,s=new Uint32Array(a.call(e,n,o,Math.min(r,t.width-n),Math.min(r,t.height-o)).data.buffer);if(s.some(function(c){return c!==0}))return false}return true}var wr=1,Er=new RegExp("[^a-z0-9-_:]"),fe=-2;function It(){return wr++}function Mr(t){if(t instanceof HTMLFormElement)return "form";var e=t.tagName.toLowerCase().trim();return Er.test(e)?"div":e}function Tr(t){return t.cssRules?Array.from(t.cssRules).map(function(e){return e.cssText||""}).join(""):""}function Rr(t){var e="";return t.indexOf("//")>-1?e=t.split("/").slice(0,3).join("/"):e=t.split("/")[0],e=e.split("?")[0],e}var Ie,Wt,Nr=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,Or=/^(?!www\.|(?:http|ftp)s?:\/\/|[A-Za-z]:\\|\/\/|#).*/,xr=/^(data:)([^,]*),(.*)/i;function xe(t,e){return (t||"").replace(Nr,function(r,n,o,i,a,s){var c=o||a||s,l=n||i||"";if(!c)return r;if(!Or.test(c)||xr.test(c))return "url(".concat(l).concat(c).concat(l,")");if(c[0]==="/")return "url(".concat(l).concat(Rr(e)+c).concat(l,")");var d=e.split("/"),u=c.split("/");d.pop();for(var h=0,f=u;h<f.length;h++){var p=f[h];p!=="."&&(p===".."?d.pop():d.push(p));}return "url(".concat(l).concat(d.join("/")).concat(l,")")})}var Dr=/^[^ \t\n\r\u000c]+/,Fr=/^[, \t\n\r\u000c]+/;function Lr(t,e){if(e.trim()==="")return e;var r=0;function n(l){var d,u=l.exec(e.substring(r));return u?(d=u[0],r+=d.length,d):""}for(var o=[];n(Fr),!(r>=e.length);){var i=n(Dr);if(i.slice(-1)===",")i=ye(t,i.substring(0,i.length-1)),o.push(i);else {var a="";i=ye(t,i);for(var s=false;;){var c=e.charAt(r);if(c===""){o.push((i+a).trim());break}else if(s)c===")"&&(s=false);else if(c===","){r+=1,o.push((i+a).trim());break}else c==="("&&(s=true);a+=c,r+=1;}}}return o.join(", ")}function ye(t,e){if(!e||e.trim()==="")return e;var r=t.createElement("a");return r.href=e,r.href}function Br(t){return !!(t.tagName==="svg"||t.ownerSVGElement)}function yt(){var t=document.createElement("a");return t.href="",t.href}function Ct(t,e,r,n){return r==="src"||r==="href"&&n&&!(e==="use"&&n[0]==="#")||r==="xlink:href"&&n&&n[0]!=="#"||r==="background"&&n&&(e==="table"||e==="td"||e==="th")?ye(t,n):r==="srcset"&&n?Lr(t,n):r==="style"&&n?xe(n,yt()):e==="object"&&r==="data"&&n?ye(t,n):n}function Gr(t,e,r){if(typeof e=="string"){if(t.classList.contains(e))return true}else for(var n=t.classList.length;n--;){var o=t.classList[n];if(e.test(o))return true}return r?t.matches(r):false}function ke(t,e,r){if(!t)return false;if(t.nodeType!==t.ELEMENT_NODE)return r?ke(t.parentNode,e,r):false;for(var n=t.classList.length;n--;){var o=t.classList[n];if(e.test(o))return true}return r?ke(t.parentNode,e,r):false}function St(t,e,r){var n=t.nodeType===t.ELEMENT_NODE?t:t.parentElement;if(n===null)return false;if(typeof e=="string"){if(n.classList.contains(e)||n.closest(".".concat(e)))return true}else if(ke(n,e,true))return true;return !!(r&&(n.matches(r)||n.closest(r)))}function Wr(t,e,r){var n=t.contentWindow;if(n){var o=false,i;try{i=n.document.readyState;}catch{return}if(i!=="complete"){var a=setTimeout(function(){o||(e(),o=true);},r);t.addEventListener("load",function(){clearTimeout(a),o=true,e();});return}var s="about:blank";if(n.location.href!==s||t.src===s||t.src==="")return setTimeout(e,0),t.addEventListener("load",e);t.addEventListener("load",e);}}function Ur(t,e,r){var n=false,o;try{o=t.sheet;}catch{return}if(!o){var i=setTimeout(function(){n||(e(),n=true);},r);t.addEventListener("load",function(){clearTimeout(i),n=true,e();});}}function Hr(t,e){var r=e.doc,n=e.mirror,o=e.blockClass,i=e.blockSelector,a=e.maskTextClass,s=e.maskTextSelector,c=e.inlineStylesheet,l=e.maskInputOptions,d=l===void 0?{}:l,u=e.maskTextFn,h=e.maskInputFn,f=e.dataURLOptions,p=f===void 0?{}:f,v=e.inlineImages,S=e.recordCanvas,y=e.keepIframeSrcFn,g=e.newlyAddedElement,m=g===void 0?false:g,k=Vr(r,n);switch(t.nodeType){case t.DOCUMENT_NODE:return t.compatMode!=="CSS1Compat"?{type:F.Document,childNodes:[],compatMode:t.compatMode}:{type:F.Document,childNodes:[]};case t.DOCUMENT_TYPE_NODE:return {type:F.DocumentType,name:t.name,publicId:t.publicId,systemId:t.systemId,rootId:k};case t.ELEMENT_NODE:return Zr(t,{doc:r,blockClass:o,blockSelector:i,inlineStylesheet:c,maskInputOptions:d,maskInputFn:h,dataURLOptions:p,inlineImages:v,recordCanvas:S,keepIframeSrcFn:y,newlyAddedElement:m,rootId:k});case t.TEXT_NODE:return _r(t,{maskTextClass:a,maskTextSelector:s,maskTextFn:u,rootId:k});case t.CDATA_SECTION_NODE:return {type:F.CDATA,textContent:"",rootId:k};case t.COMMENT_NODE:return {type:F.Comment,textContent:t.textContent||"",rootId:k};default:return false}}function Vr(t,e){if(e.hasNode(t)){var r=e.getId(t);return r===1?void 0:r}}function _r(t,e){var r,n=e.maskTextClass,o=e.maskTextSelector,i=e.maskTextFn,a=e.rootId,s=t.parentNode&&t.parentNode.tagName,c=t.textContent,l=s==="STYLE"?true:void 0,d=s==="SCRIPT"?true:void 0;if(l&&c){try{t.nextSibling||t.previousSibling||!((r=t.parentNode.sheet)===null||r===void 0)&&r.cssRules&&(c=Tr(t.parentNode.sheet));}catch(u){console.warn("Cannot get CSS styles from text's parentNode. Error: ".concat(u),t);}c=xe(c,yt());}return d&&(c="SCRIPT_PLACEHOLDER"),!l&&!d&&c&&St(t,n,o)&&(c=i?i(c):c.replace(/[\S]/g,"*")),{type:F.Text,textContent:c||"",isStyle:l,rootId:a}}function Zr(t,e){for(var r=e.doc,n=e.blockClass,o=e.blockSelector,i=e.inlineStylesheet,a=e.maskInputOptions,s=a===void 0?{}:a,c=e.maskInputFn,l=e.dataURLOptions,d=l===void 0?{}:l,u=e.inlineImages,h=e.recordCanvas,f=e.keepIframeSrcFn,p=e.newlyAddedElement,v=p===void 0?false:p,S=e.rootId,y=Gr(t,n,o),g=Mr(t),m={},k=t.attributes.length,W=0;W<k;W++){var L=t.attributes[W];m[L.name]=Ct(r,g,L.name,L.value);}if(g==="link"&&i){var B=Array.from(r.styleSheets).find(function(Y){return Y.href===t.href}),w=null;B&&(w=mt(B)),w&&(delete m.rel,delete m.href,m._cssText=xe(w,B.href));}if(g==="style"&&t.sheet&&!(t.innerText||t.textContent||"").trim().length){var w=mt(t.sheet);w&&(m._cssText=xe(w,yt()));}if(g==="input"||g==="textarea"||g==="select"){var P=t.value,z=t.checked;m.type!=="radio"&&m.type!=="checkbox"&&m.type!=="submit"&&m.type!=="button"&&P?m.value=we({type:m.type,tagName:g,value:P,maskInputOptions:s,maskInputFn:c}):z&&(m.checked=z);}if(g==="option"&&(t.selected&&!s.select?m.selected=true:delete m.selected),g==="canvas"&&h){if(t.__context==="2d")kr(t)||(m.rr_dataURL=t.toDataURL(d.type,d.quality));else if(!("__context"in t)){var J=t.toDataURL(d.type,d.quality),Q=document.createElement("canvas");Q.width=t.width,Q.height=t.height;var q=Q.toDataURL(d.type,d.quality);J!==q&&(m.rr_dataURL=J);}}if(g==="img"&&u){Ie||(Ie=r.createElement("canvas"),Wt=Ie.getContext("2d"));var x=t,K=x.crossOrigin;x.crossOrigin="anonymous";var X=function(){try{Ie.width=x.naturalWidth,Ie.height=x.naturalHeight,Wt.drawImage(x,0,0),m.rr_dataURL=Ie.toDataURL(d.type,d.quality);}catch(Y){console.warn("Cannot inline img src=".concat(x.currentSrc,"! Error: ").concat(Y));}K?m.crossOrigin=K:x.removeAttribute("crossorigin");};x.complete&&x.naturalWidth!==0?X():x.onload=X;}if((g==="audio"||g==="video")&&(m.rr_mediaState=t.paused?"paused":"played",m.rr_mediaCurrentTime=t.currentTime),v||(t.scrollLeft&&(m.rr_scrollLeft=t.scrollLeft),t.scrollTop&&(m.rr_scrollTop=t.scrollTop)),y){var ne=t.getBoundingClientRect(),se=ne.width,V=ne.height;m={class:m.class,rr_width:"".concat(se,"px"),rr_height:"".concat(V,"px")};}return g==="iframe"&&!f(m.src)&&(t.contentDocument||(m.rr_src=m.src),delete m.src),{type:F.Element,tagName:g,attributes:m,childNodes:[],isSVG:Br(t)||void 0,needBlock:y,rootId:S}}function E(t){return t===void 0?"":t.toLowerCase()}function Pr(t,e){if(e.comment&&t.type===F.Comment)return true;if(t.type===F.Element){if(e.script&&(t.tagName==="script"||t.tagName==="link"&&t.attributes.rel==="preload"&&t.attributes.as==="script"||t.tagName==="link"&&t.attributes.rel==="prefetch"&&typeof t.attributes.href=="string"&&t.attributes.href.endsWith(".js")))return true;if(e.headFavicon&&(t.tagName==="link"&&t.attributes.rel==="shortcut icon"||t.tagName==="meta"&&(E(t.attributes.name).match(/^msapplication-tile(image|color)$/)||E(t.attributes.name)==="application-name"||E(t.attributes.rel)==="icon"||E(t.attributes.rel)==="apple-touch-icon"||E(t.attributes.rel)==="shortcut icon")))return true;if(t.tagName==="meta"){if(e.headMetaDescKeywords&&E(t.attributes.name).match(/^description|keywords$/))return true;if(e.headMetaSocial&&(E(t.attributes.property).match(/^(og|twitter|fb):/)||E(t.attributes.name).match(/^(og|twitter):/)||E(t.attributes.name)==="pinterest"))return true;if(e.headMetaRobots&&(E(t.attributes.name)==="robots"||E(t.attributes.name)==="googlebot"||E(t.attributes.name)==="bingbot"))return true;if(e.headMetaHttpEquiv&&t.attributes["http-equiv"]!==void 0)return true;if(e.headMetaAuthorship&&(E(t.attributes.name)==="author"||E(t.attributes.name)==="generator"||E(t.attributes.name)==="framework"||E(t.attributes.name)==="publisher"||E(t.attributes.name)==="progid"||E(t.attributes.property).match(/^article:/)||E(t.attributes.property).match(/^product:/)))return true;if(e.headMetaVerification&&(E(t.attributes.name)==="google-site-verification"||E(t.attributes.name)==="yandex-verification"||E(t.attributes.name)==="csrf-token"||E(t.attributes.name)==="p:domain_verify"||E(t.attributes.name)==="verify-v1"||E(t.attributes.name)==="verification"||E(t.attributes.name)==="shopify-checkout-api-token"))return true}}return false}function pe(t,e){var r=e.doc,n=e.mirror,o=e.blockClass,i=e.blockSelector,a=e.maskTextClass,s=e.maskTextSelector,c=e.skipChild,l=c===void 0?false:c,d=e.inlineStylesheet,u=d===void 0?true:d,h=e.maskInputOptions,f=h===void 0?{}:h,p=e.maskTextFn,v=e.maskInputFn,S=e.slimDOMOptions,y=e.dataURLOptions,g=y===void 0?{}:y,m=e.inlineImages,k=m===void 0?false:m,W=e.recordCanvas,L=W===void 0?false:W,B=e.onSerialize,w=e.onIframeLoad,P=e.iframeLoadTimeout,z=P===void 0?5e3:P,J=e.onStylesheetLoad,Q=e.stylesheetLoadTimeout,q=Q===void 0?5e3:Q,x=e.keepIframeSrcFn,K=x===void 0?function(){return false}:x,X=e.newlyAddedElement,ne=X===void 0?false:X,se=e.preserveWhiteSpace,V=se===void 0?true:se,Y=Hr(t,{doc:r,mirror:n,blockClass:o,blockSelector:i,maskTextClass:a,maskTextSelector:s,inlineStylesheet:u,maskInputOptions:f,maskTextFn:p,maskInputFn:v,dataURLOptions:g,inlineImages:k,recordCanvas:L,keepIframeSrcFn:K,newlyAddedElement:ne});if(!Y)return console.warn(t,"not serialized"),null;var le;n.hasNode(t)?le=n.getId(t):Pr(Y,S)||!V&&Y.type===F.Text&&!Y.isStyle&&!Y.textContent.replace(/^\s+|\s+$/gm,"").length?le=fe:le=It();var O=Object.assign(Y,{id:le});if(n.add(t,O),le===fe)return null;B&&B(t);var $=!l;if(O.type===F.Element){$=$&&!O.needBlock,delete O.needBlock;var oe=t.shadowRoot;oe&&he(oe)&&(O.isShadowHost=true);}if((O.type===F.Document||O.type===F.Element)&&$){S.headWhitespace&&O.type===F.Element&&O.tagName==="head"&&(V=false);for(var ve={doc:r,mirror:n,blockClass:o,blockSelector:i,maskTextClass:a,maskTextSelector:s,skipChild:l,inlineStylesheet:u,maskInputOptions:f,maskTextFn:p,maskInputFn:v,slimDOMOptions:S,dataURLOptions:g,inlineImages:k,recordCanvas:L,preserveWhiteSpace:V,onSerialize:B,onIframeLoad:w,iframeLoadTimeout:z,onStylesheetLoad:J,stylesheetLoadTimeout:q,keepIframeSrcFn:K},I=0,U=Array.from(t.childNodes);I<U.length;I++){var _=U[I],M=pe(_,ve);M&&O.childNodes.push(M);}if(Sr(t)&&t.shadowRoot)for(var j=0,A=Array.from(t.shadowRoot.childNodes);j<A.length;j++){var _=A[j],M=pe(_,ve);M&&(he(t.shadowRoot)&&(M.isShadow=true),O.childNodes.push(M));}}return t.parentNode&&ge(t.parentNode)&&he(t.parentNode)&&(O.isShadow=true),O.type===F.Element&&O.tagName==="iframe"&&Wr(t,function(){var Z=t.contentDocument;if(Z&&w){var Ae=pe(Z,{doc:Z,mirror:n,blockClass:o,blockSelector:i,maskTextClass:a,maskTextSelector:s,skipChild:false,inlineStylesheet:u,maskInputOptions:f,maskTextFn:p,maskInputFn:v,slimDOMOptions:S,dataURLOptions:g,inlineImages:k,recordCanvas:L,preserveWhiteSpace:V,onSerialize:B,onIframeLoad:w,iframeLoadTimeout:z,onStylesheetLoad:J,stylesheetLoadTimeout:q,keepIframeSrcFn:K});Ae&&w(t,Ae);}},z),O.type===F.Element&&O.tagName==="link"&&O.attributes.rel==="stylesheet"&&Ur(t,function(){if(J){var Z=pe(t,{doc:r,mirror:n,blockClass:o,blockSelector:i,maskTextClass:a,maskTextSelector:s,skipChild:false,inlineStylesheet:u,maskInputOptions:f,maskTextFn:p,maskInputFn:v,slimDOMOptions:S,dataURLOptions:g,inlineImages:k,recordCanvas:L,preserveWhiteSpace:V,onSerialize:B,onIframeLoad:w,iframeLoadTimeout:z,onStylesheetLoad:J,stylesheetLoadTimeout:q,keepIframeSrcFn:K});Z&&J(t,Z);}},q),O}function Vt(t,e){var r=e||{},n=r.mirror,o=n===void 0?new Ut:n,i=r.blockClass,a=i===void 0?"rr-block":i,s=r.blockSelector,c=s===void 0?null:s,l=r.maskTextClass,d=l===void 0?"rr-mask":l,u=r.maskTextSelector,h=u===void 0?null:u,f=r.inlineStylesheet,p=f===void 0?true:f,v=r.inlineImages,S=v===void 0?false:v,y=r.recordCanvas,g=y===void 0?false:y,m=r.maskAllInputs,k=m===void 0?false:m,W=r.maskTextFn,L=r.maskInputFn,B=r.slimDOM,w=B===void 0?false:B,P=r.dataURLOptions,z=r.preserveWhiteSpace,J=r.onSerialize,Q=r.onIframeLoad,q=r.iframeLoadTimeout,x=r.onStylesheetLoad,K=r.stylesheetLoadTimeout,X=r.keepIframeSrcFn,ne=X===void 0?function(){return false}:X,se=k===true?{color:true,date:true,"datetime-local":true,email:true,month:true,number:true,range:true,search:true,tel:true,text:true,time:true,url:true,week:true,textarea:true,select:true,password:true}:k===false?{password:true}:k,V=w===true||w==="all"?{script:true,comment:true,headFavicon:true,headWhitespace:true,headMetaDescKeywords:w==="all",headMetaSocial:true,headMetaRobots:true,headMetaHttpEquiv:true,headMetaAuthorship:true,headMetaVerification:true}:w===false?{}:w;return pe(t,{doc:t,mirror:o,blockClass:a,blockSelector:c,maskTextClass:d,maskTextSelector:h,skipChild:false,inlineStylesheet:p,maskInputOptions:se,maskTextFn:W,maskInputFn:L,slimDOMOptions:V,dataURLOptions:P,inlineImages:S,recordCanvas:g,preserveWhiteSpace:z,onSerialize:J,onIframeLoad:Q,iframeLoadTimeout:q,onStylesheetLoad:x,stylesheetLoadTimeout:K,keepIframeSrcFn:ne,newlyAddedElement:false})}function G(t,e,r=document){let n={capture:true,passive:true};return r.addEventListener(t,e,n),()=>r.removeEventListener(t,e,n)}var Ce=`Please stop import mirror directly. Instead of that,\r
1
+ var GhostplaySDK=(function(exports){'use strict';var yi={apiUrl:"https://api.ghostplay.dev/v1",maskAllInputs:true,recordNetwork:true,recordConsole:true,trackPerformance:true,trackRageClicks:true,trackNavigation:true,flushIntervalMs:5e3,flushMaxBytes:5e4};function vi(s){if(!s.projectId)throw new Error("[Ghostplay] projectId is required");if(!s.projectId.startsWith("gp_"))throw new Error('[Ghostplay] projectId must start with "gp_"');return {...yi,...s}}function wa(){let s=Date.now().toString(36),e=Math.random().toString(36).substring(2,10);return `gs_${s}_${e}`}var mt=class{constructor(e){this.projectId=e;this.session=null;}start(){return this.session={id:wa(),projectId:this.projectId,startedAt:Date.now(),tags:[],metadata:{}},this.session}current(){if(!this.session)throw new Error("[Ghostplay] No active session");return this.session}identify(e,t){let r=this.current();r.userId=e,r.userTraits=t;}addTag(e){let t=this.current();t.tags.includes(e)||t.tags.push(e);}setMetadata(e){let t=this.current();t.metadata={...t.metadata,...e};}end(){this.session=null;}};var ba=Object.defineProperty,Sa=(s,e,t)=>e in s?ba(s,e,{enumerable:true,configurable:true,writable:true,value:t}):s[e]=t,v=(s,e,t)=>Sa(s,typeof e!="symbol"?e+"":e,t),wi,Ca=Object.defineProperty,Ea=(s,e,t)=>e in s?Ca(s,e,{enumerable:true,configurable:true,writable:true,value:t}):s[e]=t,bi=(s,e,t)=>Ea(s,typeof e!="symbol"?e+"":e,t),j=(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))(j||{}),Si={Node:["childNodes","parentNode","parentElement","textContent","ownerDocument"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},Ci={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},gt={},Ia=()=>!!globalThis.Zone;function Gs(s){if(gt[s])return gt[s];let e=globalThis[s],t=e.prototype,r=s in Si?Si[s]:void 0,i=!!(r&&r.every(l=>{var a,c;return !!((c=(a=Object.getOwnPropertyDescriptor(t,l))==null?void 0:a.get)!=null&&c.toString().includes("[native code]"))})),n=s in Ci?Ci[s]:void 0,o=!!(n&&n.every(l=>{var a;return typeof t[l]=="function"&&((a=t[l])==null?void 0:a.toString().includes("[native code]"))}));if(i&&o&&!Ia())return gt[s]=e.prototype,e.prototype;try{let l=document.createElement("iframe");document.body.appendChild(l);let a=l.contentWindow;if(!a)return e.prototype;let c=a[s].prototype;return document.body.removeChild(l),c?gt[s]=c:t}catch{return t}}var Br={};function ge(s,e,t){var r;let i=`${s}.${String(t)}`;if(Br[i])return Br[i].call(e);let n=Gs(s),o=(r=Object.getOwnPropertyDescriptor(n,t))==null?void 0:r.get;return o?(Br[i]=o,o.call(e)):e[t]}var Ur={};function bn(s,e,t){let r=`${s}.${String(t)}`;if(Ur[r])return Ur[r].bind(e);let n=Gs(s)[t];return typeof n!="function"?e[t]:(Ur[r]=n,n.bind(e))}function xa(s){return ge("Node",s,"ownerDocument")}function Na(s){return ge("Node",s,"childNodes")}function Ma(s){return ge("Node",s,"parentNode")}function Ra(s){return ge("Node",s,"parentElement")}function Aa(s){return ge("Node",s,"textContent")}function Oa(s,e){return bn("Node",s,"contains")(e)}function Da(s){return bn("Node",s,"getRootNode")()}function Ta(s){return !s||!("host"in s)?null:ge("ShadowRoot",s,"host")}function ka(s){return s.styleSheets}function _a(s){return !s||!("shadowRoot"in s)?null:ge("Element",s,"shadowRoot")}function Pa(s,e){return ge("Element",s,"querySelector")(e)}function La(s,e){return ge("Element",s,"querySelectorAll")(e)}function $a(){return Gs("MutationObserver").constructor}function Fa(s,e,t){try{if(!(e in s))return ()=>{};let r=s[e],i=t(r);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),s[e]=i,()=>{s[e]=r;}}catch{return ()=>{}}}var Z={ownerDocument:xa,childNodes:Na,parentNode:Ma,parentElement:Ra,textContent:Aa,contains:Oa,getRootNode:Da,host:Ta,styleSheets:ka,shadowRoot:_a,querySelector:Pa,querySelectorAll:La,mutationObserver:$a,patch:Fa};function Sn(s){return s.nodeType===s.ELEMENT_NODE}function Ye(s){let e=s&&"host"in s&&"mode"in s&&Z.host(s)||null;return !!(e&&"shadowRoot"in e&&Z.shadowRoot(e)===s)}function Ze(s){return Object.prototype.toString.call(s)==="[object ShadowRoot]"}function Ba(s){return s.includes(" background-clip: text;")&&!s.includes(" -webkit-background-clip: text;")&&(s=s.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),s}function Ua(s){let{cssText:e}=s;if(e.split('"').length<3)return e;let t=["@import",`url(${JSON.stringify(s.href)})`];return s.layerName===""?t.push("layer"):s.layerName&&t.push(`layer(${s.layerName})`),s.supportsText&&t.push(`supports(${s.supportsText})`),s.media.length&&t.push(s.media.mediaText),t.join(" ")+";"}function Qr(s){try{let e=s.rules||s.cssRules;if(!e)return null;let t=s.href;!t&&s.ownerNode&&(t=s.ownerNode.baseURI);let r=Array.from(e,i=>Cn(i,t)).join("");return Ba(r)}catch{return null}}function Cn(s,e){if(Ga(s)){let t;try{t=Qr(s.styleSheet)||Ua(s);}catch{t=s.cssText;}return s.styleSheet.href?Zt(t,s.styleSheet.href):t}else {let t=s.cssText;return za(s)&&s.selectorText.includes(":")&&(t=Wa(t)),e?Zt(t,e):t}}function Wa(s){let e=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return s.replace(e,"$1\\$2")}function Ga(s){return "styleSheet"in s}function za(s){return "selectorText"in s}var Ht=class{constructor(){bi(this,"idNodeMap",new Map),bi(this,"nodeMetaMap",new WeakMap);}getId(e){var t;return e?((t=this.getMeta(e))==null?void 0:t.id)??-1:-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){let t=this.getId(e);this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach(r=>this.removeNodeFromMap(r));}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){let r=t.id;this.idNodeMap.set(r,e),this.nodeMetaMap.set(e,t);}replace(e,t){let r=this.getNode(e);if(r){let i=this.nodeMetaMap.get(r);i&&this.nodeMetaMap.set(t,i);}this.idNodeMap.set(e,t);}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap;}};function Va(){return new Ht}function jt({element:s,maskInputOptions:e,tagName:t,type:r,value:i,maskInputFn:n}){let o=i||"",l=r&&Ee(r);return (e[t.toLowerCase()]||l&&e[l])&&(n?o=n(o,s):o="*".repeat(o.length)),o}function Ee(s){return s.toLowerCase()}var Ei="__rrweb_original__";function Ha(s){let e=s.getContext("2d");if(!e)return true;let t=50;for(let r=0;r<s.width;r+=t)for(let i=0;i<s.height;i+=t){let n=e.getImageData,o=Ei in n?n[Ei]: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 false}return true}function Yt(s){let e=s.type;return s.hasAttribute("data-rr-is-password")?"password":e?Ee(e):null}function En(s,e){let t;try{t=new URL(s,e??window.location.href);}catch{return null}let r=/\.([0-9a-z]+)(?:$)/i,i=t.pathname.match(r);return i?.[1]??null}function ja(s){let e="";return s.indexOf("//")>-1?e=s.split("/").slice(0,3).join("/"):e=s.split("/")[0],e=e.split("?")[0],e}var Ya=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,Za=/^(?:[a-z+]+:)?\/\//i,Xa=/^www\..*/i,Ja=/^(data:)([^,]*),(.*)/i;function Zt(s,e){return (s||"").replace(Ya,(t,r,i,n,o,l)=>{let a=i||o||l,c=r||n||"";if(!a)return t;if(Za.test(a)||Xa.test(a))return `url(${c}${a}${c})`;if(Ja.test(a))return `url(${c}${a}${c})`;if(a[0]==="/")return `url(${c}${ja(e)+a}${c})`;let u=e.split("/"),h=a.split("/");u.pop();for(let p of h)p!=="."&&(p===".."?u.pop():u.push(p));return `url(${c}${u.join("/")}${c})`})}function yt(s,e=false){return e?s.replace(/(\/\*[^*]*\*\/)|[\s;]/g,""):s.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"").replace(/0px/g,"0")}function Ka(s,e,t=false){let r=Array.from(e.childNodes),i=[],n=0;if(r.length>1&&s&&typeof s=="string"){let o=yt(s,t),l=o.length/s.length;for(let a=1;a<r.length;a++)if(r[a].textContent&&typeof r[a].textContent=="string"){let c=yt(r[a].textContent,t),u=100,h=3;for(;h<c.length&&(c[h].match(/[a-zA-Z0-9]/)||c.indexOf(c.substring(0,h),1)!==-1);h++);for(;h<c.length;h++){let p=c.substring(0,h),g=o.split(p),m=-1;if(g.length===2)m=g[0].length;else if(g.length>2&&g[0]===""&&r[a-1].textContent!=="")m=o.indexOf(p,1);else if(g.length===1){if(p=p.substring(0,p.length-1),g=o.split(p),g.length<=1)return i.push(s),i;h=u+1;}else h===c.length-1&&(m=o.indexOf(p));if(g.length>=2&&h>u){let d=r[a-1].textContent;if(d&&typeof d=="string"){let f=yt(d).length;m=o.indexOf(p,f);}m===-1&&(m=g[0].length);}if(m!==-1){let d=Math.floor(m/l);for(;d>0&&d<s.length;){if(n+=1,n>50*r.length)return i.push(s),i;let f=yt(s.substring(0,d),t);if(f.length===m){i.push(s.substring(0,d)),s=s.substring(d),o=o.substring(m);break}else f.length<m?d+=Math.max(1,Math.floor((m-f.length)/l)):d-=Math.max(1,Math.floor((f.length-m)*l));}break}}}}return i.push(s),i}function qa(s,e){return Ka(s,e).join("/* rr_split */")}var Qa=1,el=new RegExp("[^a-z0-9-_:]"),Je=-2;function In(){return Qa++}function tl(s){if(s instanceof HTMLFormElement)return "form";let e=Ee(s.tagName);return el.test(e)?"div":e}var Me,Ii,rl=/^[^ \t\n\r\u000c]+/,sl=/^[, \t\n\r\u000c]+/;function il(s,e){if(e.trim()==="")return e;let t=0;function r(n){let o,l=n.exec(e.substring(t));return l?(o=l[0],t+=o.length,o):""}let i=[];for(;r(sl),!(t>=e.length);){let n=r(rl);if(n.slice(-1)===",")n=Oe(s,n.substring(0,n.length-1)),i.push(n);else {let o="";n=Oe(s,n);let l=false;for(;;){let a=e.charAt(t);if(a===""){i.push((n+o).trim());break}else if(l)a===")"&&(l=false);else if(a===","){t+=1,i.push((n+o).trim());break}else a==="("&&(l=true);o+=a,t+=1;}}}return i.join(", ")}var xi=new WeakMap;function Oe(s,e){return !e||e.trim()===""?e:zs(s,e)}function nl(s){return !!(s.tagName==="svg"||s.ownerSVGElement)}function zs(s,e){let t=xi.get(s);if(t||(t=s.createElement("a"),xi.set(s,t)),!e)e="";else if(e.startsWith("blob:")||e.startsWith("data:"))return e;return t.setAttribute("href",e),t.href}function xn(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)?Oe(s,r):t==="srcset"?il(s,r):t==="style"?Zt(r,zs(s)):e==="object"&&t==="data"?Oe(s,r):r)}function Nn(s,e,t){return ["video","audio"].includes(s)&&e==="autoplay"}function ol(s,e,t){try{if(typeof e=="string"){if(s.classList.contains(e))return !0}else for(let r=s.classList.length;r--;){let i=s.classList[r];if(e.test(i))return !0}if(t)return s.matches(t)}catch{}return false}function Xt(s,e,t){if(!s)return false;if(s.nodeType!==s.ELEMENT_NODE)return t?Xt(Z.parentNode(s),e,t):false;for(let r=s.classList.length;r--;){let i=s.classList[r];if(e.test(i))return true}return t?Xt(Z.parentNode(s),e,t):false}function Mn(s,e,t,r){let i;if(Sn(s)){if(i=s,!Z.childNodes(i).length)return false}else {if(Z.parentElement(s)===null)return false;i=Z.parentElement(s);}try{if(typeof e=="string"){if(r){if(i.closest(`.${e}`))return !0}else if(i.classList.contains(e))return !0}else if(Xt(i,e,r))return !0;if(t){if(r){if(i.closest(t))return !0}else if(i.matches(t))return !0}}catch{}return false}function al(s,e,t){let r=s.contentWindow;if(!r)return;let i=false,n;try{n=r.document.readyState;}catch{return}if(n!=="complete"){let l=setTimeout(()=>{i||(e(),i=true);},t);s.addEventListener("load",()=>{clearTimeout(l),i=true,e();});return}let o="about:blank";if(r.location.href!==o||s.src===o||s.src==="")return setTimeout(e,0),s.addEventListener("load",e);s.addEventListener("load",e);}function ll(s,e,t){let r=false,i;try{i=s.sheet;}catch{return}if(i)return;let n=setTimeout(()=>{r||(e(),r=true);},t);s.addEventListener("load",()=>{clearTimeout(n),r=true,e();});}function cl(s,e){let{doc:t,mirror:r,blockClass:i,blockSelector:n,needsMask:o,inlineStylesheet:l,maskInputOptions:a={},maskTextFn:c,maskInputFn:u,dataURLOptions:h={},inlineImages:p,recordCanvas:g,keepIframeSrcFn:m,newlyAddedElement:d=false,cssCaptured:f=false}=e,w=ul(t,r);switch(s.nodeType){case s.DOCUMENT_NODE:return s.compatMode!=="CSS1Compat"?{type:j.Document,childNodes:[],compatMode:s.compatMode}:{type:j.Document,childNodes:[]};case s.DOCUMENT_TYPE_NODE:return {type:j.DocumentType,name:s.name,publicId:s.publicId,systemId:s.systemId,rootId:w};case s.ELEMENT_NODE:return fl(s,{doc:t,blockClass:i,blockSelector:n,inlineStylesheet:l,maskInputOptions:a,maskInputFn:u,dataURLOptions:h,inlineImages:p,recordCanvas:g,keepIframeSrcFn:m,newlyAddedElement:d,rootId:w});case s.TEXT_NODE:return hl(s,{doc:t,needsMask:o,maskTextFn:c,rootId:w,cssCaptured:f});case s.CDATA_SECTION_NODE:return {type:j.CDATA,textContent:"",rootId:w};case s.COMMENT_NODE:return {type:j.Comment,textContent:Z.textContent(s)||"",rootId:w};default:return false}}function ul(s,e){if(!e.hasNode(s))return;let t=e.getId(s);return t===1?void 0:t}function hl(s,e){let{needsMask:t,maskTextFn:r,rootId:i,cssCaptured:n}=e,o=Z.parentNode(s),l=o&&o.tagName,a="",c=l==="STYLE"?true:void 0,u=l==="SCRIPT"?true:void 0;return u?a="SCRIPT_PLACEHOLDER":n||(a=Z.textContent(s),c&&a&&(a=Zt(a,zs(e.doc)))),!c&&!u&&a&&t&&(a=r?r(a,Z.parentElement(s)):a.replace(/[\S]/g,"*")),{type:j.Text,textContent:a||"",rootId:i}}function fl(s,e){let{doc:t,blockClass:r,blockSelector:i,inlineStylesheet:n,maskInputOptions:o={},maskInputFn:l,dataURLOptions:a={},inlineImages:c,recordCanvas:u,keepIframeSrcFn:h,newlyAddedElement:p=false,rootId:g}=e,m=ol(s,r,i),d=tl(s),f={},w=s.attributes.length;for(let y=0;y<w;y++){let S=s.attributes[y];Nn(d,S.name,S.value)||(f[S.name]=xn(t,d,Ee(S.name),S.value));}if(d==="link"&&n){let y=Array.from(t.styleSheets).find(O=>O.href===s.href),S=null;y&&(S=Qr(y)),S&&(delete f.rel,delete f.href,f._cssText=S);}if(d==="style"&&s.sheet){let y=Qr(s.sheet);y&&(s.childNodes.length>1&&(y=qa(y,s)),f._cssText=y);}if(["input","textarea","select"].includes(d)){let y=s.value,S=s.checked;f.type!=="radio"&&f.type!=="checkbox"&&f.type!=="submit"&&f.type!=="button"&&y?f.value=jt({element:s,type:Yt(s),tagName:d,value:y,maskInputOptions:o,maskInputFn:l}):S&&(f.checked=S);}if(d==="option"&&(s.selected&&!o.select?f.selected=true:delete f.selected),d==="dialog"&&s.open&&(f.rr_open_mode=s.matches("dialog:modal")?"modal":"non-modal"),d==="canvas"&&u){if(s.__context==="2d")Ha(s)||(f.rr_dataURL=s.toDataURL(a.type,a.quality));else if(!("__context"in s)){let y=s.toDataURL(a.type,a.quality),S=t.createElement("canvas");S.width=s.width,S.height=s.height;let O=S.toDataURL(a.type,a.quality);y!==O&&(f.rr_dataURL=y);}}if(d==="img"&&c){Me||(Me=t.createElement("canvas"),Ii=Me.getContext("2d"));let y=s,S=y.currentSrc||y.getAttribute("src")||"<unknown-src>",O=y.crossOrigin,T=()=>{y.removeEventListener("load",T);try{Me.width=y.naturalWidth,Me.height=y.naturalHeight,Ii.drawImage(y,0,0),f.rr_dataURL=Me.toDataURL(a.type,a.quality);}catch(V){if(y.crossOrigin!=="anonymous"){y.crossOrigin="anonymous",y.complete&&y.naturalWidth!==0?T():y.addEventListener("load",T);return}else console.warn(`Cannot inline img src=${S}! Error: ${V}`);}y.crossOrigin==="anonymous"&&(O?f.crossOrigin=O:y.removeAttribute("crossorigin"));};y.complete&&y.naturalWidth!==0?T():y.addEventListener("load",T);}if(["audio","video"].includes(d)){let y=f;y.rr_mediaState=s.paused?"paused":"played",y.rr_mediaCurrentTime=s.currentTime,y.rr_mediaPlaybackRate=s.playbackRate,y.rr_mediaMuted=s.muted,y.rr_mediaLoop=s.loop,y.rr_mediaVolume=s.volume;}if(p||(s.scrollLeft&&(f.rr_scrollLeft=s.scrollLeft),s.scrollTop&&(f.rr_scrollTop=s.scrollTop)),m){let{width:y,height:S}=s.getBoundingClientRect();f={class:f.class,rr_width:`${y}px`,rr_height:`${S}px`};}d==="iframe"&&!h(f.src)&&(s.contentDocument||(f.rr_src=f.src),delete f.src);let b;try{customElements.get(d)&&(b=!0);}catch{}return {type:j.Element,tagName:d,attributes:f,childNodes:[],isSVG:nl(s)||void 0,needBlock:m,rootId:g,isCustom:b}}function k(s){return s==null?"":s.toLowerCase()}function Rn(s){return s===true||s==="all"?{script:true,comment:true,headFavicon:true,headWhitespace:true,headMetaSocial:true,headMetaRobots:true,headMetaHttpEquiv:true,headMetaVerification:true,headMetaAuthorship:s==="all",headMetaDescKeywords:s==="all",headTitleMutations:s==="all"}:s||{}}function dl(s,e){if(e.comment&&s.type===j.Comment)return true;if(s.type===j.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"&&En(s.attributes.href)==="js"))return true;if(e.headFavicon&&(s.tagName==="link"&&s.attributes.rel==="shortcut icon"||s.tagName==="meta"&&(k(s.attributes.name).match(/^msapplication-tile(image|color)$/)||k(s.attributes.name)==="application-name"||k(s.attributes.rel)==="icon"||k(s.attributes.rel)==="apple-touch-icon"||k(s.attributes.rel)==="shortcut icon")))return true;if(s.tagName==="meta"){if(e.headMetaDescKeywords&&k(s.attributes.name).match(/^description|keywords$/))return true;if(e.headMetaSocial&&(k(s.attributes.property).match(/^(og|twitter|fb):/)||k(s.attributes.name).match(/^(og|twitter):/)||k(s.attributes.name)==="pinterest"))return true;if(e.headMetaRobots&&(k(s.attributes.name)==="robots"||k(s.attributes.name)==="googlebot"||k(s.attributes.name)==="bingbot"))return true;if(e.headMetaHttpEquiv&&s.attributes["http-equiv"]!==void 0)return true;if(e.headMetaAuthorship&&(k(s.attributes.name)==="author"||k(s.attributes.name)==="generator"||k(s.attributes.name)==="framework"||k(s.attributes.name)==="publisher"||k(s.attributes.name)==="progid"||k(s.attributes.property).match(/^article:/)||k(s.attributes.property).match(/^product:/)))return true;if(e.headMetaVerification&&(k(s.attributes.name)==="google-site-verification"||k(s.attributes.name)==="yandex-verification"||k(s.attributes.name)==="csrf-token"||k(s.attributes.name)==="p:domain_verify"||k(s.attributes.name)==="verify-v1"||k(s.attributes.name)==="verification"||k(s.attributes.name)==="shopify-checkout-api-token"))return true}}return false}function De(s,e){let{doc:t,mirror:r,blockClass:i,blockSelector:n,maskTextClass:o,maskTextSelector:l,skipChild:a=false,inlineStylesheet:c=true,maskInputOptions:u={},maskTextFn:h,maskInputFn:p,slimDOMOptions:g,dataURLOptions:m={},inlineImages:d=false,recordCanvas:f=false,onSerialize:w,onIframeLoad:b,iframeLoadTimeout:y=5e3,onStylesheetLoad:S,stylesheetLoadTimeout:O=5e3,keepIframeSrcFn:T=()=>false,newlyAddedElement:V=false,cssCaptured:L=false}=e,{needsMask:z}=e,{preserveWhiteSpace:Y=true}=e;z||(z=Mn(s,o,l,z===void 0));let Q=cl(s,{doc:t,mirror:r,blockClass:i,blockSelector:n,needsMask:z,inlineStylesheet:c,maskInputOptions:u,maskTextFn:h,maskInputFn:p,dataURLOptions:m,inlineImages:d,recordCanvas:f,keepIframeSrcFn:T,newlyAddedElement:V,cssCaptured:L});if(!Q)return console.warn(s,"not serialized"),null;let ae;r.hasNode(s)?ae=r.getId(s):dl(Q,g)||!Y&&Q.type===j.Text&&!Q.textContent.replace(/^\s+|\s+$/gm,"").length?ae=Je:ae=In();let N=Object.assign(Q,{id:ae});if(r.add(s,N),ae===Je)return null;w&&w(s);let Ue=!a;if(N.type===j.Element){Ue=Ue&&!N.needBlock,delete N.needBlock;let H=Z.shadowRoot(s);H&&Ze(H)&&(N.isShadowHost=true);}if((N.type===j.Document||N.type===j.Element)&&Ue){g.headWhitespace&&N.type===j.Element&&N.tagName==="head"&&(Y=false);let H={doc:t,mirror:r,blockClass:i,blockSelector:n,needsMask:z,maskTextClass:o,maskTextSelector:l,skipChild:a,inlineStylesheet:c,maskInputOptions:u,maskTextFn:h,maskInputFn:p,slimDOMOptions:g,dataURLOptions:m,inlineImages:d,recordCanvas:f,preserveWhiteSpace:Y,onSerialize:w,onIframeLoad:b,iframeLoadTimeout:y,onStylesheetLoad:S,stylesheetLoadTimeout:O,keepIframeSrcFn:T,cssCaptured:false};if(!(N.type===j.Element&&N.tagName==="textarea"&&N.attributes.value!==void 0)){N.type===j.Element&&N.attributes._cssText!==void 0&&typeof N.attributes._cssText=="string"&&(H.cssCaptured=true);for(let we of Array.from(Z.childNodes(s))){let le=De(we,H);le&&N.childNodes.push(le);}}let ee=null;if(Sn(s)&&(ee=Z.shadowRoot(s)))for(let we of Array.from(Z.childNodes(ee))){let le=De(we,H);le&&(Ze(ee)&&(le.isShadow=true),N.childNodes.push(le));}}let We=Z.parentNode(s);return We&&Ye(We)&&Ze(We)&&(N.isShadow=true),N.type===j.Element&&N.tagName==="iframe"&&al(s,()=>{let H=s.contentDocument;if(H&&b){let ee=De(H,{doc:H,mirror:r,blockClass:i,blockSelector:n,needsMask:z,maskTextClass:o,maskTextSelector:l,skipChild:false,inlineStylesheet:c,maskInputOptions:u,maskTextFn:h,maskInputFn:p,slimDOMOptions:g,dataURLOptions:m,inlineImages:d,recordCanvas:f,preserveWhiteSpace:Y,onSerialize:w,onIframeLoad:b,iframeLoadTimeout:y,onStylesheetLoad:S,stylesheetLoadTimeout:O,keepIframeSrcFn:T});ee&&b(s,ee);}},y),N.type===j.Element&&N.tagName==="link"&&typeof N.attributes.rel=="string"&&(N.attributes.rel==="stylesheet"||N.attributes.rel==="preload"&&typeof N.attributes.href=="string"&&En(N.attributes.href)==="css")&&ll(s,()=>{if(S){let H=De(s,{doc:t,mirror:r,blockClass:i,blockSelector:n,needsMask:z,maskTextClass:o,maskTextSelector:l,skipChild:false,inlineStylesheet:c,maskInputOptions:u,maskTextFn:h,maskInputFn:p,slimDOMOptions:g,dataURLOptions:m,inlineImages:d,recordCanvas:f,preserveWhiteSpace:Y,onSerialize:w,onIframeLoad:b,iframeLoadTimeout:y,onStylesheetLoad:S,stylesheetLoadTimeout:O,keepIframeSrcFn:T});H&&S(s,H);}},O),N}function pl(s,e){let{mirror:t=new Ht,blockClass:r="rr-block",blockSelector:i=null,maskTextClass:n="rr-mask",maskTextSelector:o=null,inlineStylesheet:l=true,inlineImages:a=false,recordCanvas:c=false,maskAllInputs:u=false,maskTextFn:h,maskInputFn:p,slimDOM:g=false,dataURLOptions:m,preserveWhiteSpace:d,onSerialize:f,onIframeLoad:w,iframeLoadTimeout:b,onStylesheetLoad:y,stylesheetLoadTimeout:S,keepIframeSrcFn:O=()=>false}=e||{},T=u===true?{color:true,date:true,"datetime-local":true,email:true,month:true,number:true,range:true,search:true,tel:true,text:true,time:true,url:true,week:true,textarea:true,select:true,password:true}:u===false?{password:true}:u,V=Rn(g);return De(s,{doc:s,mirror:t,blockClass:r,blockSelector:i,maskTextClass:n,maskTextSelector:o,skipChild:false,inlineStylesheet:l,maskInputOptions:T,maskTextFn:h,maskInputFn:p,slimDOMOptions:V,dataURLOptions:m,inlineImages:a,recordCanvas:c,preserveWhiteSpace:d,onSerialize:f,onIframeLoad:w,iframeLoadTimeout:b,onStylesheetLoad:y,stylesheetLoadTimeout:S,keepIframeSrcFn:O,newlyAddedElement:false})}function gl(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}function yl(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:true}),Object.keys(s).forEach(function(r){var i=Object.getOwnPropertyDescriptor(s,r);Object.defineProperty(t,r,i.get?i:{enumerable:true,get:function(){return s[r]}});}),t}var Vs={exports:{}},_=String,An=function(){return {isColorSupported:false,reset:_,bold:_,dim:_,italic:_,underline:_,inverse:_,hidden:_,strikethrough:_,black:_,red:_,green:_,yellow:_,blue:_,magenta:_,cyan:_,white:_,gray:_,bgBlack:_,bgRed:_,bgGreen:_,bgYellow:_,bgBlue:_,bgMagenta:_,bgCyan:_,bgWhite:_}};Vs.exports=An();Vs.exports.createColors=An;var vl=Vs.exports,wl={},bl=Object.freeze(Object.defineProperty({__proto__:null,default:wl},Symbol.toStringTag,{value:"Module"})),ie=yl(bl),Ni=vl,Mi=ie,es=class On 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,On);}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=Ni.isColorSupported),Mi&&e&&(t=Mi(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:c,gray:u,red:h}=Ni.createColors(true);l=p=>c(h(p)),a=p=>u(p);}else l=a=c=>c;return r.slice(i,n).map((c,u)=>{let h=i+1+u,p=" "+(" "+h).slice(-o)+" | ";if(h===this.line){let g=a(p.replace(/\d/g," "))+c.slice(0,this.column-1).replace(/[^\t]/g," ");return l(">")+a(p)+c+`
2
+ `+g+l("^")}return " "+a(p)+c}).join(`
3
+ `)}toString(){let e=this.showSourceCode();return e&&(e=`
4
+
5
+ `+e+`
6
+ `),this.name+": "+this.message+e}},Hs=es;es.default=es;var ot={};ot.isClean=Symbol("isClean");ot.my=Symbol("my");var Ri={after:`
7
+ `,beforeClose:`
8
+ `,beforeComment:`
9
+ `,beforeDecl:`
10
+ `,beforeOpen:" ",beforeRule:`
11
+ `,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:false};function Sl(s){return s[0].toUpperCase()+s.slice(1)}var ts=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"+Sl(r);this[l]?i=this[l](o,e):o.walk(a=>{if(i=a.raws[t],typeof i<"u")return false});}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]+$/,"")),false}),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]+$/,"")),false}),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]+$/,"")),false}),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 false}),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]+$/,"")),false}),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,""),false}),t}rawEmptyBody(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length===0&&(t=r.raws.after,typeof t<"u"))return false}),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,""),false}}),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 false}),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);}},Dn=ts;ts.default=ts;var Cl=Dn;function rs(s,e){new Cl(e).stringify(s);}var lr=rs;rs.default=rs;var{isClean:vt,my:El}=ot,Il=Hs,xl=Dn,Nl=lr;function ss(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=>ss(o,t)):(n==="object"&&i!==null&&(i=ss(i)),t[r]=i);}return t}var is=class{constructor(e={}){this.raws={},this[vt]=false,this[El]=true;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=ss(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 Il(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()),true}}}markDirty(){if(this[vt]){this[vt]=false;let e=this;for(;e=e.parent;)e[vt]=false;}}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 xl().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=false;for(let i of e)i===this?r=true: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=Nl){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}},cr=is;is.default=is;var Ml=cr,ns=class extends Ml{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]==="$"}},ur=ns;ns.default=ns;var Rl="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",Ol=(s=21)=>{let e="",t=s;for(;t--;)e+=Rl[Math.random()*64|0];return e},Dl={nanoid:Ol},{SourceMapConsumer:Ai,SourceMapGenerator:Oi}=ie,{existsSync:Tl,readFileSync:kl}=ie,{dirname:Wr,join:_l}=ie;function Pl(s){return Buffer?Buffer.from(s,"base64").toString():window.atob(s)}var os=class{constructor(e,t){if(t.map===false)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let r=t.map?t.map.prev:void 0,i=this.loadMap(t.from,r);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=Wr(this.mapFile)),i&&(this.text=i);}consumer(){return this.consumerCache||(this.consumerCache=new Ai(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 Pl(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"?false:typeof e.mappings=="string"||typeof e._mappings=="string"||Array.isArray(e.sections)}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/gm);if(!t)return;let r=e.lastIndexOf(t.pop()),i=e.indexOf("*/",r);r>-1&&i>-1&&(this.annotation=this.getAnnotationURL(e.substring(r,i)));}loadFile(e){if(this.root=Wr(e),Tl(e))return this.mapFile=e,kl(e,"utf-8").toString().trim()}loadMap(e,t){if(t===false)return false;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 Ai)return Oi.fromSourceMap(t).toString();if(t instanceof Oi)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=_l(Wr(e),r)),this.loadFile(r)}}}startWith(e,t){return e?e.substr(0,t.length)===t:false}withContent(){return !!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}},Tn=os;os.default=os;var{SourceMapConsumer:Ll,SourceMapGenerator:$l}=ie,{fileURLToPath:Di,pathToFileURL:wt}=ie,{isAbsolute:as,resolve:ls}=ie,{nanoid:Fl}=Dl,Gr=ie,Ti=Hs,Bl=Tn,zr=Symbol("fromOffsetCache"),Ul=!!(Ll&&$l),ki=!!(ls&&as),Jt=class{constructor(e,t={}){if(e===null||typeof e>"u"||typeof e=="object"&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),this.css[0]==="\uFEFF"||this.css[0]==="\uFFFE"?(this.hasBOM=true,this.css=this.css.slice(1)):this.hasBOM=false,t.from&&(!ki||/^\w+:\/\//.test(t.from)||as(t.from)?this.file=t.from:this.file=ls(t.from)),ki&&Ul){let r=new Bl(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 "+Fl(6)+">"),this.map&&(this.map.file=this.from);}error(e,t,r,i={}){let n,o,l;if(t&&typeof t=="object"){let c=t,u=r;if(typeof c.offset=="number"){let h=this.fromOffset(c.offset);t=h.line,r=h.col;}else t=c.line,r=c.column;if(typeof u.offset=="number"){let h=this.fromOffset(u.offset);o=h.line,l=h.col;}else o=u.line,l=u.column;}else if(!r){let c=this.fromOffset(t);t=c.line,r=c.col;}let a=this.origin(t,r,o,l);return a?n=new Ti(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 Ti(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&&(wt&&(n.input.url=wt(this.file).toString()),n.input.file=this.file),n}fromOffset(e){let t,r;if(this[zr])r=this[zr];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[zr]=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:ls(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,r,i){if(!this.map)return false;let n=this.map.consumer(),o=n.originalPositionFor({column:t,line:e});if(!o.source)return false;let l;typeof r=="number"&&(l=n.originalPositionFor({column:i,line:r}));let a;as(o.source)?a=wt(o.source):a=new URL(o.source,this.map.consumer().sourceRoot||wt(this.map.mapFile));let c={column:o.column,endColumn:l&&l.column,endLine:l&&l.line,line:o.line,url:a.toString()};if(a.protocol==="file:")if(Di)c.file=Di(a);else throw new Error("file: protocol is not available in this PostCSS build");let u=n.sourceContentFor(o.source);return u&&(c.source=u),c}toJSON(){let e={};for(let t of ["hasBOM","css","file","id"])this[t]!=null&&(e[t]=this[t]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}},hr=Jt;Jt.default=Jt;Gr&&Gr.registerInput&&Gr.registerInput(Jt);var{SourceMapConsumer:kn,SourceMapGenerator:Bt}=ie,{dirname:Ut,relative:_n,resolve:Pn,sep:Ln}=ie,{pathToFileURL:_i}=ie,Wl=hr,Gl=!!(kn&&Bt),zl=!!(Ut&&Pn&&_n&&Ln),Vl=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||Ut(e.file),i;this.mapOpts.sourcesContent===false?(i=new kn(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!==false)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(),zl&&Gl&&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=Bt.fromSourceMap(e,{ignoreInvalidMapping:true});}else this.map=new Bt({file:this.outputFile(),ignoreInvalidMapping:true}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css="",this.map=new Bt({file:this.outputFile(),ignoreInvalidMapping:true});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,c)=>{if(this.css+=l,a&&c!=="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&&c!=="start"){let u=a.parent||{raws:{}};(!(a.type==="decl"||a.type==="atrule"&&!a.nodes)||a!==u.last||u.raws.semicolon)&&(a.source&&a.source.end?(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()?true:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(e=>e.annotation):true}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let e=this.mapOpts.annotation;return typeof e<"u"&&e!==true?false:this.previous().length?this.previous().some(t=>t.inline):true}isMap(){return typeof this.opts.map<"u"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent<"u"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(e=>e.withContent()):true}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute||e.charCodeAt(0)===60||/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let r=this.opts.to?Ut(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(r=Ut(Pn(r,this.mapOpts.annotation)));let i=_n(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 Wl(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]=true;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;Ln==="\\"&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}},$n=Vl,Hl=cr,cs=class extends Hl{constructor(e){super(e),this.type="comment";}},fr=cs;cs.default=cs;var{isClean:Fn,my:Bn}=ot,Un=ur,Wn=fr,jl=cr,Gn,js,Ys,zn;function Vn(s){return s.map(e=>(e.nodes&&(e.nodes=Vn(e.nodes)),delete e.source,e))}function Hn(s){if(s[Fn]=false,s.proxyOf.nodes)for(let e of s.proxyOf.nodes)Hn(e);}var pe=class jn extends jl{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!==false);)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()),true}}}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":false,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=Vn(Gn(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 Un(e)];}else if(e.selector)e=[new js(e)];else if(e.name)e=[new Ys(e)];else if(e.text)e=[new Wn(e)];else throw new Error("Unknown node type in node creation");return e.map(i=>(i[Bn]||jn.rebuild(i),i=i.proxyOf,i.parent&&i.parent.removeChild(i),i[Fn]&&Hn(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!==false&&t.walk&&(i=t.walk(e)),i})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="atrule"&&e.test(r.name))return t(r,i)}):this.walk((r,i)=>{if(r.type==="atrule"&&r.name===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="atrule")return t(r,i)}))}walkComments(e){return this.walk((t,r)=>{if(t.type==="comment")return e(t,r)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="decl"&&e.test(r.prop))return t(r,i)}):this.walk((r,i)=>{if(r.type==="decl"&&r.prop===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="decl")return t(r,i)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((r,i)=>{if(r.type==="rule"&&e.test(r.selector))return t(r,i)}):this.walk((r,i)=>{if(r.type==="rule"&&r.selector===e)return t(r,i)}):(t=e,this.walk((r,i)=>{if(r.type==="rule")return t(r,i)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}};pe.registerParse=s=>{Gn=s;};pe.registerRule=s=>{js=s;};pe.registerAtRule=s=>{Ys=s;};pe.registerRoot=s=>{zn=s;};var Ie=pe;pe.default=pe;pe.rebuild=s=>{s.type==="atrule"?Object.setPrototypeOf(s,Ys.prototype):s.type==="rule"?Object.setPrototypeOf(s,js.prototype):s.type==="decl"?Object.setPrototypeOf(s,Un.prototype):s.type==="comment"?Object.setPrototypeOf(s,Wn.prototype):s.type==="root"&&Object.setPrototypeOf(s,zn.prototype),s[Bn]=true,s.nodes&&s.nodes.forEach(e=>{pe.rebuild(e);});};var Yl=Ie,Yn,Zn,Ke=class extends Yl{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[]);}toResult(e={}){return new Yn(new Zn,this,e).stringify()}};Ke.registerLazyResult=s=>{Yn=s;};Ke.registerProcessor=s=>{Zn=s;};var Zs=Ke;Ke.default=Ke;var Pi={},Xn=function(e){Pi[e]||(Pi[e]=true,typeof console<"u"&&console.warn&&console.warn(e));},us=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}},Jn=us;us.default=us;var Zl=Jn,hs=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 Zl(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>e.type==="warning")}get content(){return this.css}},Xs=hs;hs.default=hs;var Vr=39,Li=34,bt=92,$i=47,St=10,Ge=32,Ct=12,Et=9,It=13,Xl=91,Jl=93,Kl=40,ql=41,Ql=123,ec=125,tc=59,rc=42,sc=58,ic=64,xt=/[\t\n\f\r "#'()/;[\\\]{}]/g,Nt=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,nc=/.[\r\n"'(/\\]/,Fi=/[\da-f]/i,oc=function(e,t={}){let r=e.css.valueOf(),i=t.ignoreErrors,n,o,l,a,c,u,h,p,g,m,d=r.length,f=0,w=[],b=[];function y(){return f}function S(L){throw e.error("Unclosed "+L,f)}function O(){return b.length===0&&f>=d}function T(L){if(b.length)return b.pop();if(f>=d)return;let z=L?L.ignoreUnclosed:false;switch(n=r.charCodeAt(f),n){case St:case Ge:case Et:case It:case Ct:{o=f;do o+=1,n=r.charCodeAt(o);while(n===Ge||n===St||n===Et||n===It||n===Ct);m=["space",r.slice(f,o)],f=o-1;break}case Xl:case Jl:case Ql:case ec:case sc:case tc:case ql:{let Y=String.fromCharCode(n);m=[Y,Y,f];break}case Kl:{if(p=w.length?w.pop()[1]:"",g=r.charCodeAt(f+1),p==="url"&&g!==Vr&&g!==Li&&g!==Ge&&g!==St&&g!==Et&&g!==Ct&&g!==It){o=f;do{if(u=false,o=r.indexOf(")",o+1),o===-1)if(i||z){o=f;break}else S("bracket");for(h=o;r.charCodeAt(h-1)===bt;)h-=1,u=!u;}while(u);m=["brackets",r.slice(f,o+1),f,o],f=o;}else o=r.indexOf(")",f+1),a=r.slice(f,o+1),o===-1||nc.test(a)?m=["(","(",f]:(m=["brackets",a,f,o],f=o);break}case Vr:case Li:{l=n===Vr?"'":'"',o=f;do{if(u=false,o=r.indexOf(l,o+1),o===-1)if(i||z){o=f+1;break}else S("string");for(h=o;r.charCodeAt(h-1)===bt;)h-=1,u=!u;}while(u);m=["string",r.slice(f,o+1),f,o],f=o;break}case ic:{xt.lastIndex=f+1,xt.test(r),xt.lastIndex===0?o=r.length-1:o=xt.lastIndex-2,m=["at-word",r.slice(f,o+1),f,o],f=o;break}case bt:{for(o=f,c=true;r.charCodeAt(o+1)===bt;)o+=1,c=!c;if(n=r.charCodeAt(o+1),c&&n!==$i&&n!==Ge&&n!==St&&n!==Et&&n!==It&&n!==Ct&&(o+=1,Fi.test(r.charAt(o)))){for(;Fi.test(r.charAt(o+1));)o+=1;r.charCodeAt(o+1)===Ge&&(o+=1);}m=["word",r.slice(f,o+1),f,o],f=o;break}default:{n===$i&&r.charCodeAt(f+1)===rc?(o=r.indexOf("*/",f+2)+1,o===0&&(i||z?o=r.length:S("comment")),m=["comment",r.slice(f,o+1),f,o],f=o):(Nt.lastIndex=f+1,Nt.test(r),Nt.lastIndex===0?o=r.length-1:o=Nt.lastIndex-2,m=["word",r.slice(f,o+1),f,o],w.push(m),f=o);break}}return f++,m}function V(L){b.push(L);}return {back:V,endOfFile:O,nextToken:T,position:y}},Kn=Ie,Kt=class extends Kn{constructor(e){super(e),this.type="atrule";}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}},Js=Kt;Kt.default=Kt;Kn.registerAtRule(Kt);var qn=Ie,Qn,eo,ke=class extends qn{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 Qn(new eo,this,e).stringify()}};ke.registerLazyResult=s=>{Qn=s;};ke.registerProcessor=s=>{eo=s;};var at=ke;ke.default=ke;qn.registerRoot(ke);var qe={comma(s){return qe.split(s,[","],true)},space(s){let e=[" ",`
24
+ `," "];return qe.split(s,e)},split(s,e,t){let r=[],i="",n=false,o=0,l=false,a="",c=false;for(let u of s)c?c=false:u==="\\"?c=true:l?u===a&&(l=false):u==='"'||u==="'"?(l=true,a=u):u==="("?o+=1:u===")"?o>0&&(o-=1):o===0&&e.includes(u)&&(n=true),n?(i!==""&&r.push(i.trim()),i="",n=false):i+=u;return (t||i!=="")&&r.push(i.trim()),r}},to=qe;qe.default=qe;var ro=Ie,ac=to,qt=class extends ro{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[]);}get selectors(){return ac.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);}},Ks=qt;qt.default=qt;ro.registerRule(qt);var lc=ur,cc=oc,uc=fr,hc=Js,fc=at,Bi=Ks,Ui={empty:true,space:true};function dc(s){for(let e=s.length-1;e>=0;e--){let t=s[e],r=t[3]||t[2];if(r)return r}}var pc=class{constructor(e){this.input=e,this.root=new fc,this.current=this.root,this.spaces="",this.semicolon=false,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}};}atrule(e){let t=new hc;t.name=e[1].slice(1),t.name===""&&this.unnamedAtrule(t,e),this.init(t,e[2]);let r,i,n,o=false,l=false,a=[],c=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),r=e[0],r==="("||r==="["?c.push(r==="("?")":"]"):r==="{"&&c.length>0?c.push("}"):r===c[c.length-1]&&c.pop(),c.length===0)if(r===";"){t.source.end=this.getPosition(e[2]),t.source.end.offset++,this.semicolon=true;break}else if(r==="{"){l=true;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=true;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===false)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 false}comment(e){let t=new uc;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=cc(this.input);}decl(e,t){let r=new lc;this.init(r,e[0][2]);let i=e[e.length-1];for(i[0]===";"&&(this.semicolon=true,e.pop()),r.source.end=this.getPosition(i[3]||i[2]||dc(e)),r.source.end.offset++;e[0][0]!=="word";)e.length===1&&this.unknownWord(e),r.raws.before+=e.shift()[1];for(r.source.start=this.getPosition(e[0][2]),r.prop="";e.length;){let c=e[0][0];if(c===":"||c==="space"||c==="comment")break;r.prop+=e.shift()[1];}r.raws.between="";let n;for(;e.length;)if(n=e.shift(),n[0]===":"){r.raws.between+=n[1];break}else n[0]==="word"&&/\w/.test(n[1])&&this.unknownWord([n]),r.raws.between+=n[1];(r.prop[0]==="_"||r.prop[0]==="*")&&(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let o=[],l;for(;e.length&&(l=e[0][0],!(l!=="space"&&l!=="comment"));)o.push(e.shift());this.precheckMissedSemicolon(e);for(let c=e.length-1;c>=0;c--){if(n=e[c],n[1].toLowerCase()==="!important"){r.important=true;let u=this.stringFrom(e,c);u=this.spacesFromEnd(e)+u,u!==" !important"&&(r.raws.important=u);break}else if(n[1].toLowerCase()==="important"){let u=e.slice(0),h="";for(let p=c;p>0;p--){let g=u[p][0];if(h.trim().indexOf("!")===0&&g!=="space")break;h=u.pop()[1]+h;}h.trim().indexOf("!")===0&&(r.important=true,r.raws.important=h,e=u);}if(n[0]!=="space"&&n[0]!=="comment")break}e.some(c=>c[0]!=="space"&&c[0]!=="comment")&&(r.raws.between+=o.map(c=>c[1]).join(""),o=[]),this.raw(r,"value",o.concat(e),t),r.value.includes(":")&&!t&&this.checkMissedSemicolon(e);}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new Bi;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=false,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=false);}other(e){let t=false,r=null,i=false,n=null,o=[],l=e[1].startsWith("--"),a=[],c=e;for(;c;){if(r=c[0],a.push(c),r==="("||r==="[")n||(n=c),o.push(r==="("?")":"]");else if(l&&i&&r==="{")n||(n=c),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=true;break}else r===":"&&(i=true);else r===o[o.length-1]&&(o.pop(),o.length===0&&(n=null));c=this.tokenizer.nextToken();}if(this.tokenizer.endOfFile()&&(t=true),o.length>0&&this.unclosedBracket(n),t&&i){if(!l)for(;a.length&&(c=a[a.length-1][0],!(c!=="space"&&c!=="comment"));)this.tokenizer.back(a.pop());this.decl(a,l);}else this.unknownWord(a);}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case "space":this.spaces+=e[1];break;case ";":this.freeSemicolon(e);break;case "}":this.end(e);break;case "comment":this.comment(e);break;case "at-word":this.atrule(e);break;case "{":this.emptyRule(e);break;default:this.other(e);break}this.endFile();}precheckMissedSemicolon(){}raw(e,t,r,i){let n,o,l=r.length,a="",c=true,u,h;for(let p=0;p<l;p+=1)n=r[p],o=n[0],o==="space"&&p===l-1&&!i?c=false:o==="comment"?(h=r[p-1]?r[p-1][0]:"empty",u=r[p+1]?r[p+1][0]:"empty",!Ui[h]&&!Ui[u]?a.slice(-1)===","?c=false:a+=n[1]:c=false):a+=n[1];if(!c){let p=r.reduce((g,m)=>g+m[1],"");e.raws[t]={raw:p,value:a};}e[t]=a;}rule(e){e.pop();let t=new Bi;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})}},mc=pc,gc=Ie,yc=mc,vc=hr;function Qt(s,e){let t=new vc(s,e),r=new yc(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 qs=Qt;Qt.default=Qt;gc.registerParse(Qt);var{isClean:ce,my:wc}=ot,bc=$n,Sc=lr,Cc=Ie,Ec=Zs,Ic=Xn,Wi=Xs,xc=qs,Nc=at,Mc={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},Rc={AtRule:true,AtRuleExit:true,Comment:true,CommentExit:true,Declaration:true,DeclarationExit:true,Document:true,DocumentExit:true,Once:true,OnceExit:true,postcssPlugin:true,prepare:true,Root:true,RootExit:true,Rule:true,RuleExit:true},Ac={Once:true,postcssPlugin:true,prepare:true},_e=0;function ze(s){return typeof s=="object"&&typeof s.then=="function"}function so(s){let e=false,t=Mc[s.type];return s.type==="decl"?e=s.prop.toLowerCase():s.type==="atrule"&&(e=s.name.toLowerCase()),e&&s.append?[t,t+"-"+e,_e,t+"Exit",t+"Exit-"+e]:e?[t,t+"-"+e,t+"Exit",t+"Exit-"+e]:s.append?[t,_e,t+"Exit"]:[t,t+"Exit"]}function Gi(s){let e;return s.type==="document"?e=["Document",_e,"DocumentExit"]:s.type==="root"?e=["Root",_e,"RootExit"]:e=so(s),{eventIndex:0,events:e,iterator:0,node:s,visitorIndex:0,visitors:[]}}function fs(s){return s[ce]=false,s.nodes&&s.nodes.forEach(e=>fs(e)),s}var ds={},Pe=class io{constructor(e,t,r){this.stringified=false,this.processed=false;let i;if(typeof t=="object"&&t!==null&&(t.type==="root"||t.type==="document"))i=fs(t);else if(t instanceof io||t instanceof Wi)i=fs(t.root),t.map&&(typeof r.map>"u"&&(r.map={}),r.map.inline||(r.map.inline=false),r.map.prev=t.map);else {let n=xc;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=true,this.error=o;}i&&!i[wc]&&Cc.rebuild(i);}this.result=new Wi(e,i,r),this.helpers={...ds,postcss:ds,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(!Rc[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!Ac[r])if(typeof t[r]=="object")for(let i in t[r])i==="*"?e(t,r,t[r][i]):e(t,r+"-"+i.toLowerCase(),t[r][i]);else typeof t[r]=="function"&&e(t,r,t[r]);}this.hasListener=Object.keys(this.listeners).length>0;}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let t=this.plugins[e],r=this.runOnRoot(t);if(ze(r))try{await r;}catch(i){throw this.handleError(i)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[ce];){e[ce]=true;let t=[Gi(e)];for(;t.length>0;){let r=this.visitTick(t);if(ze(r))try{await r;}catch(i){let n=t[t.length-1].node;throw this.handleError(i,n)}}}if(this.listeners.OnceExit)for(let[t,r]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if(e.type==="document"){let i=e.nodes.map(n=>r(n,this.helpers));await Promise.all(i);}else await r(e,this.helpers);}catch(i){throw this.handleError(i)}}}return this.processed=true,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if(typeof e=="object"&&e.Once){if(this.result.root.type==="document"){let t=this.result.root.nodes.map(r=>e.Once(r,this.helpers));return ze(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}else if(typeof e=="function")return e(this.result.root,this.result)}catch(t){throw this.handleError(t)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=true,this.sync();let e=this.result.opts,t=Sc;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let i=new bc(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=true,this.processing)throw this.getAsyncError();for(let e of this.plugins){let t=this.runOnRoot(e);if(ze(t))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[ce];)e[ce]=true,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||Ic("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 true;if(ze(n))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:r,visitors:i}=t;if(r.type!=="root"&&r.type!=="document"&&!r.parent){e.pop();return}if(i.length>0&&t.visitorIndex<i.length){let[o,l]=i[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===i.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=o;try{return l(r.toProxy(),this.helpers)}catch(a){throw this.handleError(a,r)}}if(t.iterator!==0){let o=t.iterator,l;for(;l=r.nodes[r.indexes[o]];)if(r.indexes[o]+=1,!l[ce]){l[ce]=true,e.push(Gi(l));return}t.iterator=0,delete r.indexes[o];}let n=t.events;for(;t.eventIndex<n.length;){let o=n[t.eventIndex];if(t.eventIndex+=1,o===_e){r.nodes&&r.nodes.length&&(r[ce]=true,t.iterator=r.getIterator());return}else if(this.listeners[o]){t.visitors=this.listeners[o];return}}e.pop();}walkSync(e){e[ce]=true;let t=so(e);for(let r of t)if(r===_e)e.nodes&&e.each(i=>{i[ce]||this.walkSync(i);});else {let i=this.listeners[r];if(i&&this.visitSync(i,e.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return "LazyResult"}};Pe.registerPostcss=s=>{ds=s;};var no=Pe;Pe.default=Pe;Nc.registerLazyResult(Pe);Ec.registerLazyResult(Pe);var Oc=$n,Dc=lr,Tc=Xn,kc=qs,_c=Xs,ps=class{constructor(e,t,r){t=t.toString(),this.stringified=false,this._processor=e,this._css=t,this._opts=r,this._map=void 0;let i,n=Dc;this.result=new _c(this._processor,i,this._opts),this.result.css=t;let o=this;Object.defineProperty(this.result,"root",{get(){return o.root}});let l=new Oc(n,i,this._opts,t);if(l.isMap()){let[a,c]=l.generate();a&&(this.result.css=a),c&&(this.result.map=c);}else l.clearAnnotation(),this.result.css=l.css;}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return process.env.NODE_ENV!=="production"&&("from"in this._opts||Tc("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=kc;try{e=t(this._css,this._opts);}catch(r){this.error=r;}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return "NoWorkResult"}},Pc=ps;ps.default=ps;var Lc=Pc,$c=no,Fc=Zs,Bc=at,Qe=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===true?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 Lc(this,e,t):new $c(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}},Uc=Qe;Qe.default=Qe;Bc.registerProcessor(Qe);Fc.registerProcessor(Qe);var Wc=ur,Gc=Tn,zc=fr,Vc=Js,Hc=hr,jc=at,Yc=Ks;function et(s,e){if(Array.isArray(s))return s.map(i=>et(i));let{inputs:t,...r}=s;if(t){e=[];for(let i of t){let n={...i,__proto__:Hc.prototype};n.map&&(n.map={...n.map,__proto__:Gc.prototype}),e.push(n);}}if(r.nodes&&(r.nodes=s.nodes.map(i=>et(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 jc(r);if(r.type==="decl")return new Wc(r);if(r.type==="rule")return new Yc(r);if(r.type==="comment")return new zc(r);if(r.type==="atrule")return new Vc(r);throw new Error("Unknown node type: "+s.type)}var Zc=et;et.default=et;var Xc=Hs,oo=ur,Jc=no,Kc=Ie,Qs=Uc,qc=lr,Qc=Zc,ao=Zs,eu=Jn,lo=fr,co=Js,tu=Xs,ru=hr,su=qs,iu=to,uo=Ks,ho=at,nu=cr;function R(...s){return s.length===1&&Array.isArray(s[0])&&(s=s[0]),new Qs(s)}R.plugin=function(e,t){let r=false;function i(...o){console&&console.warn&&!r&&(r=true,console.warn(e+`: postcss.plugin was deprecated. Migration guide:
28
+ https://evilmartians.com/chronicles/postcss-8-plugin-migration`),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(e+`: \u91CC\u9762 postcss.plugin \u88AB\u5F03\u7528. \u8FC1\u79FB\u6307\u5357:
29
+ https://www.w3ctech.com/topic/2226`));let l=t(...o);return l.postcssPlugin=e,l.postcssVersion=new Qs().version,l}let n;return Object.defineProperty(i,"postcss",{get(){return n||(n=i()),n}}),i.process=function(o,l,a){return R([i(a)]).process(o,l)},i};R.stringify=qc;R.parse=su;R.fromJSON=Qc;R.list=iu;R.comment=s=>new lo(s);R.atRule=s=>new co(s);R.decl=s=>new oo(s);R.rule=s=>new uo(s);R.root=s=>new ho(s);R.document=s=>new ao(s);R.CssSyntaxError=Xc;R.Declaration=oo;R.Container=Kc;R.Processor=Qs;R.Document=ao;R.Comment=lo;R.Warning=eu;R.AtRule=co;R.Result=tu;R.Input=ru;R.Rule=uo;R.Root=ho;R.Node=nu;Jc.registerPostcss(R);var ou=R;R.default=R;var $=gl(ou);$.stringify;$.fromJSON;$.plugin;$.parse;$.list;$.document;$.comment;$.atRule;$.rule;$.decl;$.root;$.CssSyntaxError;$.Declaration;$.Container;$.Processor;$.Document;$.Comment;$.Warning;$.AtRule;$.Result;$.Input;$.Rule;$.Root;$.Node;var au=Object.defineProperty,lu=(s,e,t)=>e in s?au(s,e,{enumerable:true,configurable:true,writable:true,value:t}):s[e]=t,te=(s,e,t)=>lu(s,typeof e!="symbol"?e+"":e,t);function cu(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}function uu(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:true}),Object.keys(s).forEach(function(r){var i=Object.getOwnPropertyDescriptor(s,r);Object.defineProperty(t,r,i.get?i:{enumerable:true,get:function(){return s[r]}});}),t}var ei={exports:{}},P=String,fo=function(){return {isColorSupported:false,reset:P,bold:P,dim:P,italic:P,underline:P,inverse:P,hidden:P,strikethrough:P,black:P,red:P,green:P,yellow:P,blue:P,magenta:P,cyan:P,white:P,gray:P,bgBlack:P,bgRed:P,bgGreen:P,bgYellow:P,bgBlue:P,bgMagenta:P,bgCyan:P,bgWhite:P}};ei.exports=fo();ei.exports.createColors=fo;var hu=ei.exports,fu={},du=Object.freeze(Object.defineProperty({__proto__:null,default:fu},Symbol.toStringTag,{value:"Module"})),ne=uu(du),zi=hu,Vi=ne,ms=class po 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,po);}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),Vi&&e&&(t=Vi(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:c,gray:u,red:h}=zi.createColors(true);l=p=>c(h(p)),a=p=>u(p);}else l=a=c=>c;return r.slice(i,n).map((c,u)=>{let h=i+1+u,p=" "+(" "+h).slice(-o)+" | ";if(h===this.line){let g=a(p.replace(/\d/g," "))+c.slice(0,this.column-1).replace(/[^\t]/g," ");return l(">")+a(p)+c+`
30
+ `+g+l("^")}return " "+a(p)+c}).join(`
31
+ `)}toString(){let e=this.showSourceCode();return e&&(e=`
32
+
33
+ `+e+`
34
+ `),this.name+": "+this.message+e}},ti=ms;ms.default=ms;var lt={};lt.isClean=Symbol("isClean");lt.my=Symbol("my");var Hi={after:`
35
+ `,beforeClose:`
36
+ `,beforeComment:`
37
+ `,beforeDecl:`
38
+ `,beforeOpen:" ",beforeRule:`
39
+ `,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:false};function pu(s){return s[0].toUpperCase()+s.slice(1)}var gs=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 Hi[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"+pu(r);this[l]?i=this[l](o,e):o.walk(a=>{if(i=a.raws[t],typeof i<"u")return false});}return typeof i>"u"&&(i=Hi[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]+$/,"")),false}),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]+$/,"")),false}),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]+$/,"")),false}),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 false}),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]+$/,"")),false}),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,""),false}),t}rawEmptyBody(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length===0&&(t=r.raws.after,typeof t<"u"))return false}),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,""),false}}),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 false}),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);}},mo=gs;gs.default=gs;var mu=mo;function ys(s,e){new mu(e).stringify(s);}var dr=ys;ys.default=ys;var{isClean:Mt,my:gu}=lt,yu=ti,vu=mo,wu=dr;function vs(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=>vs(o,t)):(n==="object"&&i!==null&&(i=vs(i)),t[r]=i);}return t}var ws=class{constructor(e={}){this.raws={},this[Mt]=false,this[gu]=true;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=vs(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 yu(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()),true}}}markDirty(){if(this[Mt]){this[Mt]=false;let e=this;for(;e=e.parent;)e[Mt]=false;}}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 vu().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=false;for(let i of e)i===this?r=true: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=wu){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}},pr=ws;ws.default=ws;var bu=pr,bs=class extends bu{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]==="$"}},mr=bs;bs.default=bs;var Su="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",Eu=(s=21)=>{let e="",t=s;for(;t--;)e+=Su[Math.random()*64|0];return e},Iu={nanoid:Eu},{SourceMapConsumer:ji,SourceMapGenerator:Yi}=ne,{existsSync:xu,readFileSync:Nu}=ne,{dirname:Hr,join:Mu}=ne;function Ru(s){return Buffer?Buffer.from(s,"base64").toString():window.atob(s)}var Ss=class{constructor(e,t){if(t.map===false)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=Hr(this.mapFile)),i&&(this.text=i);}consumer(){return this.consumerCache||(this.consumerCache=new ji(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"?false: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=Hr(e),xu(e))return this.mapFile=e,Nu(e,"utf-8").toString().trim()}loadMap(e,t){if(t===false)return false;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 ji)return Yi.fromSourceMap(t).toString();if(t instanceof Yi)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=Mu(Hr(e),r)),this.loadFile(r)}}}startWith(e,t){return e?e.substr(0,t.length)===t:false}withContent(){return !!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}},go=Ss;Ss.default=Ss;var{SourceMapConsumer:Au,SourceMapGenerator:Ou}=ne,{fileURLToPath:Zi,pathToFileURL:Rt}=ne,{isAbsolute:Cs,resolve:Es}=ne,{nanoid:Du}=Iu,jr=ne,Xi=ti,Tu=go,Yr=Symbol("fromOffsetCache"),ku=!!(Au&&Ou),Ji=!!(Es&&Cs),er=class{constructor(e,t={}){if(e===null||typeof e>"u"||typeof e=="object"&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),this.css[0]==="\uFEFF"||this.css[0]==="\uFFFE"?(this.hasBOM=true,this.css=this.css.slice(1)):this.hasBOM=false,t.from&&(!Ji||/^\w+:\/\//.test(t.from)||Cs(t.from)?this.file=t.from:this.file=Es(t.from)),Ji&&ku){let r=new Tu(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 "+Du(6)+">"),this.map&&(this.map.file=this.from);}error(e,t,r,i={}){let n,o,l;if(t&&typeof t=="object"){let c=t,u=r;if(typeof c.offset=="number"){let h=this.fromOffset(c.offset);t=h.line,r=h.col;}else t=c.line,r=c.column;if(typeof u.offset=="number"){let h=this.fromOffset(u.offset);o=h.line,l=h.col;}else o=u.line,l=u.column;}else if(!r){let c=this.fromOffset(t);t=c.line,r=c.col;}let a=this.origin(t,r,o,l);return a?n=new Xi(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 Xi(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&&(Rt&&(n.input.url=Rt(this.file).toString()),n.input.file=this.file),n}fromOffset(e){let t,r;if(this[Yr])r=this[Yr];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[Yr]=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:Es(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,r,i){if(!this.map)return false;let n=this.map.consumer(),o=n.originalPositionFor({column:t,line:e});if(!o.source)return false;let l;typeof r=="number"&&(l=n.originalPositionFor({column:i,line:r}));let a;Cs(o.source)?a=Rt(o.source):a=new URL(o.source,this.map.consumer().sourceRoot||Rt(this.map.mapFile));let c={column:o.column,endColumn:l&&l.column,endLine:l&&l.line,line:o.line,url:a.toString()};if(a.protocol==="file:")if(Zi)c.file=Zi(a);else throw new Error("file: protocol is not available in this PostCSS build");let u=n.sourceContentFor(o.source);return u&&(c.source=u),c}toJSON(){let e={};for(let t of ["hasBOM","css","file","id"])this[t]!=null&&(e[t]=this[t]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}},gr=er;er.default=er;jr&&jr.registerInput&&jr.registerInput(er);var{SourceMapConsumer:yo,SourceMapGenerator:Wt}=ne,{dirname:Gt,relative:vo,resolve:wo,sep:bo}=ne,{pathToFileURL:Ki}=ne,_u=gr,Pu=!!(yo&&Wt),Lu=!!(Gt&&wo&&vo&&bo),$u=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===false?(i=new yo(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!==false)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(),Lu&&Pu&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,t=>{e+=t;}),[e]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=Wt.fromSourceMap(e,{ignoreInvalidMapping:true});}else this.map=new Wt({file:this.outputFile(),ignoreInvalidMapping:true}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css="",this.map=new Wt({file:this.outputFile(),ignoreInvalidMapping:true});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,c)=>{if(this.css+=l,a&&c!=="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&&c!=="start"){let u=a.parent||{raws:{}};(!(a.type==="decl"||a.type==="atrule"&&!a.nodes)||a!==u.last||u.raws.semicolon)&&(a.source&&a.source.end?(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()?true:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(e=>e.annotation):true}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let e=this.mapOpts.annotation;return typeof e<"u"&&e!==true?false:this.previous().length?this.previous().some(t=>t.inline):true}isMap(){return typeof this.opts.map<"u"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent<"u"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(e=>e.withContent()):true}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(wo(r,this.mapOpts.annotation)));let i=vo(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 _u(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map);}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(t=>{if(t.source){let r=t.source.input.from;if(r&&!e[r]){e[r]=true;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(Ki){let r=Ki(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;bo==="\\"&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}},So=$u,Fu=pr,Is=class extends Fu{constructor(e){super(e),this.type="comment";}},yr=Is;Is.default=Is;var{isClean:Co,my:Eo}=lt,Io=mr,xo=yr,Bu=pr,No,ri,si,Mo;function Ro(s){return s.map(e=>(e.nodes&&(e.nodes=Ro(e.nodes)),delete e.source,e))}function Ao(s){if(s[Co]=false,s.proxyOf.nodes)for(let e of s.proxyOf.nodes)Ao(e);}var me=class Oo extends Bu{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!==false);)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()),true}}}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":false,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=Ro(No(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 Io(e)];}else if(e.selector)e=[new ri(e)];else if(e.name)e=[new si(e)];else if(e.text)e=[new xo(e)];else throw new Error("Unknown node type in node creation");return e.map(i=>(i[Eo]||Oo.rebuild(i),i=i.proxyOf,i.parent&&i.parent.removeChild(i),i[Co]&&Ao(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!==false&&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=>{No=s;};me.registerRule=s=>{ri=s;};me.registerAtRule=s=>{si=s;};me.registerRoot=s=>{Mo=s;};var xe=me;me.default=me;me.rebuild=s=>{s.type==="atrule"?Object.setPrototypeOf(s,si.prototype):s.type==="rule"?Object.setPrototypeOf(s,ri.prototype):s.type==="decl"?Object.setPrototypeOf(s,Io.prototype):s.type==="comment"?Object.setPrototypeOf(s,xo.prototype):s.type==="root"&&Object.setPrototypeOf(s,Mo.prototype),s[Eo]=true,s.nodes&&s.nodes.forEach(e=>{me.rebuild(e);});};var Uu=xe,Do,To,tt=class extends Uu{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[]);}toResult(e={}){return new Do(new To,this,e).stringify()}};tt.registerLazyResult=s=>{Do=s;};tt.registerProcessor=s=>{To=s;};var ii=tt;tt.default=tt;var qi={},ko=function(e){qi[e]||(qi[e]=true,typeof console<"u"&&console.warn&&console.warn(e));},xs=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}},_o=xs;xs.default=xs;var Wu=_o,Ns=class{constructor(e,t,r){this.processor=e,this.messages=[],this.root=t,this.opts=r,this.css=void 0,this.map=void 0;}toString(){return this.css}warn(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let r=new Wu(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>e.type==="warning")}get content(){return this.css}},ni=Ns;Ns.default=Ns;var Zr=39,Qi=34,At=92,en=47,Ot=10,Ve=32,Dt=12,Tt=9,kt=13,Gu=91,zu=93,Vu=40,Hu=41,ju=123,Yu=125,Zu=59,Xu=42,Ju=58,Ku=64,_t=/[\t\n\f\r "#'()/;[\\\]{}]/g,Pt=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,qu=/.[\r\n"'(/\\]/,tn=/[\da-f]/i,Qu=function(e,t={}){let r=e.css.valueOf(),i=t.ignoreErrors,n,o,l,a,c,u,h,p,g,m,d=r.length,f=0,w=[],b=[];function y(){return f}function S(L){throw e.error("Unclosed "+L,f)}function O(){return b.length===0&&f>=d}function T(L){if(b.length)return b.pop();if(f>=d)return;let z=L?L.ignoreUnclosed:false;switch(n=r.charCodeAt(f),n){case Ot:case Ve:case Tt:case kt:case Dt:{o=f;do o+=1,n=r.charCodeAt(o);while(n===Ve||n===Ot||n===Tt||n===kt||n===Dt);m=["space",r.slice(f,o)],f=o-1;break}case Gu:case zu:case ju:case Yu:case Ju:case Zu:case Hu:{let Y=String.fromCharCode(n);m=[Y,Y,f];break}case Vu:{if(p=w.length?w.pop()[1]:"",g=r.charCodeAt(f+1),p==="url"&&g!==Zr&&g!==Qi&&g!==Ve&&g!==Ot&&g!==Tt&&g!==Dt&&g!==kt){o=f;do{if(u=false,o=r.indexOf(")",o+1),o===-1)if(i||z){o=f;break}else S("bracket");for(h=o;r.charCodeAt(h-1)===At;)h-=1,u=!u;}while(u);m=["brackets",r.slice(f,o+1),f,o],f=o;}else o=r.indexOf(")",f+1),a=r.slice(f,o+1),o===-1||qu.test(a)?m=["(","(",f]:(m=["brackets",a,f,o],f=o);break}case Zr:case Qi:{l=n===Zr?"'":'"',o=f;do{if(u=false,o=r.indexOf(l,o+1),o===-1)if(i||z){o=f+1;break}else S("string");for(h=o;r.charCodeAt(h-1)===At;)h-=1,u=!u;}while(u);m=["string",r.slice(f,o+1),f,o],f=o;break}case Ku:{_t.lastIndex=f+1,_t.test(r),_t.lastIndex===0?o=r.length-1:o=_t.lastIndex-2,m=["at-word",r.slice(f,o+1),f,o],f=o;break}case At:{for(o=f,c=true;r.charCodeAt(o+1)===At;)o+=1,c=!c;if(n=r.charCodeAt(o+1),c&&n!==en&&n!==Ve&&n!==Ot&&n!==Tt&&n!==kt&&n!==Dt&&(o+=1,tn.test(r.charAt(o)))){for(;tn.test(r.charAt(o+1));)o+=1;r.charCodeAt(o+1)===Ve&&(o+=1);}m=["word",r.slice(f,o+1),f,o],f=o;break}default:{n===en&&r.charCodeAt(f+1)===Xu?(o=r.indexOf("*/",f+2)+1,o===0&&(i||z?o=r.length:S("comment")),m=["comment",r.slice(f,o+1),f,o],f=o):(Pt.lastIndex=f+1,Pt.test(r),Pt.lastIndex===0?o=r.length-1:o=Pt.lastIndex-2,m=["word",r.slice(f,o+1),f,o],w.push(m),f=o);break}}return f++,m}function V(L){b.push(L);}return {back:V,endOfFile:O,nextToken:T,position:y}},Po=xe,tr=class extends Po{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)}},oi=tr;tr.default=tr;Po.registerAtRule(tr);var Lo=xe,$o,Fo,Le=class extends Lo{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 $o(new Fo,this,e).stringify()}};Le.registerLazyResult=s=>{$o=s;};Le.registerProcessor=s=>{Fo=s;};var ct=Le;Le.default=Le;Lo.registerRoot(Le);var rt={comma(s){return rt.split(s,[","],true)},space(s){let e=[" ",`
52
+ `," "];return rt.split(s,e)},split(s,e,t){let r=[],i="",n=false,o=0,l=false,a="",c=false;for(let u of s)c?c=false:u==="\\"?c=true:l?u===a&&(l=false):u==='"'||u==="'"?(l=true,a=u):u==="("?o+=1:u===")"?o>0&&(o-=1):o===0&&e.includes(u)&&(n=true),n?(i!==""&&r.push(i.trim()),i="",n=false):i+=u;return (t||i!=="")&&r.push(i.trim()),r}},Bo=rt;rt.default=rt;var Uo=xe,eh=Bo,rr=class extends Uo{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[]);}get selectors(){return eh.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);}},ai=rr;rr.default=rr;Uo.registerRule(rr);var th=mr,rh=Qu,sh=yr,ih=oi,nh=ct,rn=ai,sn={empty:true,space:true};function oh(s){for(let e=s.length-1;e>=0;e--){let t=s[e],r=t[3]||t[2];if(r)return r}}var ah=class{constructor(e){this.input=e,this.root=new nh,this.current=this.root,this.spaces="",this.semicolon=false,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}};}atrule(e){let t=new ih;t.name=e[1].slice(1),t.name===""&&this.unnamedAtrule(t,e),this.init(t,e[2]);let r,i,n,o=false,l=false,a=[],c=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),r=e[0],r==="("||r==="["?c.push(r==="("?")":"]"):r==="{"&&c.length>0?c.push("}"):r===c[c.length-1]&&c.pop(),c.length===0)if(r===";"){t.source.end=this.getPosition(e[2]),t.source.end.offset++,this.semicolon=true;break}else if(r==="{"){l=true;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=true;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===false)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 false}comment(e){let t=new sh;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=rh(this.input);}decl(e,t){let r=new th;this.init(r,e[0][2]);let i=e[e.length-1];for(i[0]===";"&&(this.semicolon=true,e.pop()),r.source.end=this.getPosition(i[3]||i[2]||oh(e)),r.source.end.offset++;e[0][0]!=="word";)e.length===1&&this.unknownWord(e),r.raws.before+=e.shift()[1];for(r.source.start=this.getPosition(e[0][2]),r.prop="";e.length;){let c=e[0][0];if(c===":"||c==="space"||c==="comment")break;r.prop+=e.shift()[1];}r.raws.between="";let n;for(;e.length;)if(n=e.shift(),n[0]===":"){r.raws.between+=n[1];break}else n[0]==="word"&&/\w/.test(n[1])&&this.unknownWord([n]),r.raws.between+=n[1];(r.prop[0]==="_"||r.prop[0]==="*")&&(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let o=[],l;for(;e.length&&(l=e[0][0],!(l!=="space"&&l!=="comment"));)o.push(e.shift());this.precheckMissedSemicolon(e);for(let c=e.length-1;c>=0;c--){if(n=e[c],n[1].toLowerCase()==="!important"){r.important=true;let u=this.stringFrom(e,c);u=this.spacesFromEnd(e)+u,u!==" !important"&&(r.raws.important=u);break}else if(n[1].toLowerCase()==="important"){let u=e.slice(0),h="";for(let p=c;p>0;p--){let g=u[p][0];if(h.trim().indexOf("!")===0&&g!=="space")break;h=u.pop()[1]+h;}h.trim().indexOf("!")===0&&(r.important=true,r.raws.important=h,e=u);}if(n[0]!=="space"&&n[0]!=="comment")break}e.some(c=>c[0]!=="space"&&c[0]!=="comment")&&(r.raws.between+=o.map(c=>c[1]).join(""),o=[]),this.raw(r,"value",o.concat(e),t),r.value.includes(":")&&!t&&this.checkMissedSemicolon(e);}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new rn;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t;}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=false,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=false);}other(e){let t=false,r=null,i=false,n=null,o=[],l=e[1].startsWith("--"),a=[],c=e;for(;c;){if(r=c[0],a.push(c),r==="("||r==="[")n||(n=c),o.push(r==="("?")":"]");else if(l&&i&&r==="{")n||(n=c),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=true;break}else r===":"&&(i=true);else r===o[o.length-1]&&(o.pop(),o.length===0&&(n=null));c=this.tokenizer.nextToken();}if(this.tokenizer.endOfFile()&&(t=true),o.length>0&&this.unclosedBracket(n),t&&i){if(!l)for(;a.length&&(c=a[a.length-1][0],!(c!=="space"&&c!=="comment"));)this.tokenizer.back(a.pop());this.decl(a,l);}else this.unknownWord(a);}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case "space":this.spaces+=e[1];break;case ";":this.freeSemicolon(e);break;case "}":this.end(e);break;case "comment":this.comment(e);break;case "at-word":this.atrule(e);break;case "{":this.emptyRule(e);break;default:this.other(e);break}this.endFile();}precheckMissedSemicolon(){}raw(e,t,r,i){let n,o,l=r.length,a="",c=true,u,h;for(let p=0;p<l;p+=1)n=r[p],o=n[0],o==="space"&&p===l-1&&!i?c=false:o==="comment"?(h=r[p-1]?r[p-1][0]:"empty",u=r[p+1]?r[p+1][0]:"empty",!sn[h]&&!sn[u]?a.slice(-1)===","?c=false:a+=n[1]:c=false):a+=n[1];if(!c){let p=r.reduce((g,m)=>g+m[1],"");e.raws[t]={raw:p,value:a};}e[t]=a;}rule(e){e.pop();let t=new rn;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t;}spacesAndCommentsFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],!(t!=="space"&&t!=="comment"));)r=e.pop()[1]+r;return r}spacesAndCommentsFromStart(e){let t,r="";for(;e.length&&(t=e[0][0],!(t!=="space"&&t!=="comment"));)r+=e.shift()[1];return r}spacesFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],t==="space");)r=e.pop()[1]+r;return r}stringFrom(e,t){let r="";for(let 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})}},lh=ah,ch=xe,uh=lh,hh=gr;function sr(s,e){let t=new hh(s,e),r=new uh(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 li=sr;sr.default=sr;ch.registerParse(sr);var{isClean:ue,my:fh}=lt,dh=So,ph=dr,mh=xe,gh=ii,yh=ko,nn=ni,vh=li,wh=ct,bh={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},Sh={AtRule:true,AtRuleExit:true,Comment:true,CommentExit:true,Declaration:true,DeclarationExit:true,Document:true,DocumentExit:true,Once:true,OnceExit:true,postcssPlugin:true,prepare:true,Root:true,RootExit:true,Rule:true,RuleExit:true},Ch={Once:true,postcssPlugin:true,prepare:true},$e=0;function He(s){return typeof s=="object"&&typeof s.then=="function"}function Wo(s){let e=false,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,$e,t+"Exit",t+"Exit-"+e]:e?[t,t+"-"+e,t+"Exit",t+"Exit-"+e]:s.append?[t,$e,t+"Exit"]:[t,t+"Exit"]}function on(s){let e;return s.type==="document"?e=["Document",$e,"DocumentExit"]:s.type==="root"?e=["Root",$e,"RootExit"]:e=Wo(s),{eventIndex:0,events:e,iterator:0,node:s,visitorIndex:0,visitors:[]}}function Ms(s){return s[ue]=false,s.nodes&&s.nodes.forEach(e=>Ms(e)),s}var Rs={},Fe=class Go{constructor(e,t,r){this.stringified=false,this.processed=false;let i;if(typeof t=="object"&&t!==null&&(t.type==="root"||t.type==="document"))i=Ms(t);else if(t instanceof Go||t instanceof nn)i=Ms(t.root),t.map&&(typeof r.map>"u"&&(r.map={}),r.map.inline||(r.map.inline=false),r.map.prev=t.map);else {let n=vh;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=true,this.error=o;}i&&!i[fh]&&mh.rebuild(i);}this.result=new nn(e,i,r),this.helpers={...Rs,postcss:Rs,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(!Sh[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!Ch[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(He(r))try{await r;}catch(i){throw this.handleError(i)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[ue];){e[ue]=true;let t=[on(e)];for(;t.length>0;){let r=this.visitTick(t);if(He(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=true,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 He(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=true,this.sync();let e=this.result.opts,t=ph;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let i=new dh(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=true,this.processing)throw this.getAsyncError();for(let e of this.plugins){let t=this.runOnRoot(e);if(He(t))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[ue];)e[ue]=true,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||yh("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 true;if(He(n))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:r,visitors:i}=t;if(r.type!=="root"&&r.type!=="document"&&!r.parent){e.pop();return}if(i.length>0&&t.visitorIndex<i.length){let[o,l]=i[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===i.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=o;try{return l(r.toProxy(),this.helpers)}catch(a){throw this.handleError(a,r)}}if(t.iterator!==0){let o=t.iterator,l;for(;l=r.nodes[r.indexes[o]];)if(r.indexes[o]+=1,!l[ue]){l[ue]=true,e.push(on(l));return}t.iterator=0,delete r.indexes[o];}let n=t.events;for(;t.eventIndex<n.length;){let o=n[t.eventIndex];if(t.eventIndex+=1,o===$e){r.nodes&&r.nodes.length&&(r[ue]=true,t.iterator=r.getIterator());return}else if(this.listeners[o]){t.visitors=this.listeners[o];return}}e.pop();}walkSync(e){e[ue]=true;let t=Wo(e);for(let r of t)if(r===$e)e.nodes&&e.each(i=>{i[ue]||this.walkSync(i);});else {let i=this.listeners[r];if(i&&this.visitSync(i,e.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return "LazyResult"}};Fe.registerPostcss=s=>{Rs=s;};var zo=Fe;Fe.default=Fe;wh.registerLazyResult(Fe);gh.registerLazyResult(Fe);var Eh=So,Ih=dr,xh=ko,Nh=li,Mh=ni,As=class{constructor(e,t,r){t=t.toString(),this.stringified=false,this._processor=e,this._css=t,this._opts=r,this._map=void 0;let i,n=Ih;this.result=new Mh(this._processor,i,this._opts),this.result.css=t;let o=this;Object.defineProperty(this.result,"root",{get(){return o.root}});let l=new Eh(n,i,this._opts,t);if(l.isMap()){let[a,c]=l.generate();a&&(this.result.css=a),c&&(this.result.map=c);}else l.clearAnnotation(),this.result.css=l.css;}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return process.env.NODE_ENV!=="production"&&("from"in this._opts||xh("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=Nh;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"}},Rh=As;As.default=As;var Ah=Rh,Oh=zo,Dh=ii,Th=ct,st=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===true?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 Ah(this,e,t):new Oh(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}},kh=st;st.default=st;Th.registerProcessor(st);Dh.registerProcessor(st);var _h=mr,Ph=go,Lh=yr,$h=oi,Fh=gr,Bh=ct,Uh=ai;function it(s,e){if(Array.isArray(s))return s.map(i=>it(i));let{inputs:t,...r}=s;if(t){e=[];for(let i of t){let n={...i,__proto__:Fh.prototype};n.map&&(n.map={...n.map,__proto__:Ph.prototype}),e.push(n);}}if(r.nodes&&(r.nodes=s.nodes.map(i=>it(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 Bh(r);if(r.type==="decl")return new _h(r);if(r.type==="rule")return new Uh(r);if(r.type==="comment")return new Lh(r);if(r.type==="atrule")return new $h(r);throw new Error("Unknown node type: "+s.type)}var Wh=it;it.default=it;var Gh=ti,Vo=mr,zh=zo,Vh=xe,ci=kh,Hh=dr,jh=Wh,Ho=ii,Yh=_o,jo=yr,Yo=oi,Zh=ni,Xh=gr,Jh=li,Kh=Bo,Zo=ai,Xo=ct,qh=pr;function A(...s){return s.length===1&&Array.isArray(s[0])&&(s=s[0]),new ci(s)}A.plugin=function(e,t){let r=false;function i(...o){console&&console.warn&&!r&&(r=true,console.warn(e+`: postcss.plugin was deprecated. Migration guide:
56
+ https://evilmartians.com/chronicles/postcss-8-plugin-migration`),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(e+`: \u91CC\u9762 postcss.plugin \u88AB\u5F03\u7528. \u8FC1\u79FB\u6307\u5357:
57
+ https://www.w3ctech.com/topic/2226`));let l=t(...o);return l.postcssPlugin=e,l.postcssVersion=new ci().version,l}let n;return Object.defineProperty(i,"postcss",{get(){return n||(n=i()),n}}),i.process=function(o,l,a){return A([i(a)]).process(o,l)},i};A.stringify=Hh;A.parse=Jh;A.fromJSON=jh;A.list=Kh;A.comment=s=>new jo(s);A.atRule=s=>new Yo(s);A.decl=s=>new Vo(s);A.rule=s=>new Zo(s);A.root=s=>new Xo(s);A.document=s=>new Ho(s);A.CssSyntaxError=Gh;A.Declaration=Vo;A.Container=Vh;A.Processor=ci;A.Document=Ho;A.Comment=jo;A.Warning=Yh;A.AtRule=Yo;A.Result=Zh;A.Input=Xh;A.Rule=Zo;A.Root=Xo;A.Node=qh;zh.registerPostcss(A);var Qh=A;A.default=A;var F=cu(Qh);F.stringify;F.fromJSON;F.plugin;F.parse;F.list;F.document;F.comment;F.atRule;F.rule;F.decl;F.root;F.CssSyntaxError;F.Declaration;F.Container;F.Processor;F.Document;F.Comment;F.Warning;F.AtRule;F.Result;F.Input;F.Rule;F.Root;F.Node;var Os=class s{constructor(...e){te(this,"parentElement",null),te(this,"parentNode",null),te(this,"ownerDocument"),te(this,"firstChild",null),te(this,"lastChild",null),te(this,"previousSibling",null),te(this,"nextSibling",null),te(this,"ELEMENT_NODE",1),te(this,"TEXT_NODE",3),te(this,"nodeType"),te(this,"nodeName"),te(this,"RRNodeType");}get childNodes(){let e=[],t=this.firstChild;for(;t;)e.push(t),t=t.nextSibling;return e}contains(e){if(e instanceof s){if(e.ownerDocument!==this.ownerDocument)return false;if(e===this)return true}else return false;for(;e.parentNode;){if(e.parentNode===this)return true;e=e.parentNode;}return false}appendChild(e){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(e,t){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(e){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return "RRNode"}};var an={Node:["childNodes","parentNode","parentElement","textContent","ownerDocument"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},ln={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},Lt={},ef=()=>!!globalThis.Zone;function ui(s){if(Lt[s])return Lt[s];let e=globalThis[s],t=e.prototype,r=s in an?an[s]:void 0,i=!!(r&&r.every(l=>{var a,c;return !!((c=(a=Object.getOwnPropertyDescriptor(t,l))==null?void 0:a.get)!=null&&c.toString().includes("[native code]"))})),n=s in ln?ln[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&&!ef())return Lt[s]=e.prototype,e.prototype;try{let l=document.createElement("iframe");document.body.appendChild(l);let a=l.contentWindow;if(!a)return e.prototype;let c=a[s].prototype;return document.body.removeChild(l),c?Lt[s]=c:t}catch{return t}}var Xr={};function ye(s,e,t){var r;let i=`${s}.${String(t)}`;if(Xr[i])return Xr[i].call(e);let n=ui(s),o=(r=Object.getOwnPropertyDescriptor(n,t))==null?void 0:r.get;return o?(Xr[i]=o,o.call(e)):e[t]}var Jr={};function Jo(s,e,t){let r=`${s}.${String(t)}`;if(Jr[r])return Jr[r].bind(e);let n=ui(s)[t];return typeof n!="function"?e[t]:(Jr[r]=n,n.bind(e))}function tf(s){return ye("Node",s,"ownerDocument")}function rf(s){return ye("Node",s,"childNodes")}function sf(s){return ye("Node",s,"parentNode")}function nf(s){return ye("Node",s,"parentElement")}function of(s){return ye("Node",s,"textContent")}function af(s,e){return Jo("Node",s,"contains")(e)}function lf(s){return Jo("Node",s,"getRootNode")()}function cf(s){return !s||!("host"in s)?null:ye("ShadowRoot",s,"host")}function uf(s){return s.styleSheets}function hf(s){return !s||!("shadowRoot"in s)?null:ye("Element",s,"shadowRoot")}function ff(s,e){return ye("Element",s,"querySelector")(e)}function df(s,e){return ye("Element",s,"querySelectorAll")(e)}function Ko(){return ui("MutationObserver").constructor}function Ne(s,e,t){try{if(!(e in s))return ()=>{};let r=s[e],i=t(r);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),s[e]=i,()=>{s[e]=r;}}catch{return ()=>{}}}var C={ownerDocument:tf,childNodes:rf,parentNode:sf,parentElement:nf,textContent:of,contains:af,getRootNode:lf,host:cf,styleSheets:uf,shadowRoot:hf,querySelector:ff,querySelectorAll:df,mutationObserver:Ko,patch:Ne};function X(s,e,t=document){let r={capture:true,passive:true};return t.addEventListener(s,e,r),()=>t.removeEventListener(s,e,r)}var Re=`Please stop import mirror directly. Instead of that,\r
2
58
  now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
3
- or you can use record.mirror to access the mirror instance during recording.`,_t={map:{},getId(){return console.error(Ce),-1},getNode(){return console.error(Ce),null},removeNodeFromMap(){console.error(Ce);},has(){return console.error(Ce),false},reset(){console.error(Ce);}};typeof window<"u"&&window.Proxy&&window.Reflect&&(_t=new Proxy(_t,{get(t,e,r){return e==="map"&&console.error(Ce),Reflect.get(t,e,r)}}));function Se(t,e,r={}){let n=null,o=0;return function(...i){let a=Date.now();!o&&r.leading===false&&(o=a);let s=e-(a-o),c=this;s<=0||s>e?(n&&(clearTimeout(n),n=null),o=a,t.apply(c,i)):!n&&r.trailing!==false&&(n=setTimeout(()=>{o=r.leading===false?0:Date.now(),n=null,t.apply(c,i);},s));}}function me(t,e,r,n,o=window){let i=o.Object.getOwnPropertyDescriptor(t,e);return o.Object.defineProperty(t,e,n?r:{set(a){setTimeout(()=>{r.set.call(this,a);},0),i&&i.set&&i.set.call(this,a);}}),()=>me(t,e,i||{},true)}function ee(t,e,r){try{if(!(e in t))return ()=>{};let n=t[e],o=r(n);return typeof o=="function"&&(o.prototype=o.prototype||{},Object.defineProperties(o,{__rrweb_original__:{enumerable:!1,value:n}})),t[e]=o,()=>{t[e]=n;}}catch{return ()=>{}}}function Fe(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function Le(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function T(t,e,r,n){if(!t)return false;let o=t.nodeType===t.ELEMENT_NODE?t:t.parentElement;if(!o)return false;if(typeof e=="string"){if(o.classList.contains(e)||n&&o.closest("."+e)!==null)return true}else if(ke(o,e,n))return true;return !!(r&&(t.matches(r)||n&&o.closest(r)!==null))}function Zt(t,e){return e.getId(t)!==-1}function Be(t,e){return e.getId(t)===fe}function bt(t,e){if(ge(t))return false;let r=e.getId(t);return e.has(r)?t.parentNode&&t.parentNode.nodeType===t.DOCUMENT_NODE?false:t.parentNode?bt(t.parentNode,e):true:true}function At(t){return !!t.changedTouches}function Pt(t=window){"NodeList"in t&&!t.NodeList.prototype.forEach&&(t.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in t&&!t.DOMTokenList.prototype.forEach&&(t.DOMTokenList.prototype.forEach=Array.prototype.forEach),Node.prototype.contains||(Node.prototype.contains=(...e)=>{let r=e[0];if(!(0 in e))throw new TypeError("1 argument is required");do if(this===r)return true;while(r=r&&r.parentNode);return false});}function Ge(t,e){return !!(t.nodeName==="IFRAME"&&e.getMeta(t))}function We(t,e){return !!(t.nodeName==="LINK"&&t.nodeType===t.ELEMENT_NODE&&t.getAttribute&&t.getAttribute("rel")==="stylesheet"&&e.getMeta(t))}function Ue(t){return !!t?.shadowRoot}var De=class{constructor(){this.id=1,this.styleIDMap=new WeakMap,this.idStyleMap=new Map;}getId(e){var r;return (r=this.styleIDMap.get(e))!==null&&r!==void 0?r:-1}has(e){return this.styleIDMap.has(e)}add(e,r){if(this.has(e))return this.getId(e);let n;return r===void 0?n=this.id++:n=r,this.styleIDMap.set(e,n),this.idStyleMap.set(n,e),n}getStyle(e){return this.idStyleMap.get(e)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1;}generateId(){return this.id++}};var b=(t=>(t[t.DomContentLoaded=0]="DomContentLoaded",t[t.Load=1]="Load",t[t.FullSnapshot=2]="FullSnapshot",t[t.IncrementalSnapshot=3]="IncrementalSnapshot",t[t.Meta=4]="Meta",t[t.Custom=5]="Custom",t[t.Plugin=6]="Plugin",t))(b||{}),C=(t=>(t[t.Mutation=0]="Mutation",t[t.MouseMove=1]="MouseMove",t[t.MouseInteraction=2]="MouseInteraction",t[t.Scroll=3]="Scroll",t[t.ViewportResize=4]="ViewportResize",t[t.Input=5]="Input",t[t.TouchMove=6]="TouchMove",t[t.MediaInteraction=7]="MediaInteraction",t[t.StyleSheetRule=8]="StyleSheetRule",t[t.CanvasMutation=9]="CanvasMutation",t[t.Font=10]="Font",t[t.Log=11]="Log",t[t.Drag=12]="Drag",t[t.StyleDeclaration=13]="StyleDeclaration",t[t.Selection=14]="Selection",t[t.AdoptedStyleSheet=15]="AdoptedStyleSheet",t))(C||{}),He=(t=>(t[t.MouseUp=0]="MouseUp",t[t.MouseDown=1]="MouseDown",t[t.Click=2]="Click",t[t.ContextMenu=3]="ContextMenu",t[t.DblClick=4]="DblClick",t[t.Focus=5]="Focus",t[t.Blur=6]="Blur",t[t.TouchStart=7]="TouchStart",t[t.TouchMove_Departed=8]="TouchMove_Departed",t[t.TouchEnd=9]="TouchEnd",t[t.TouchCancel=10]="TouchCancel",t))(He||{}),ae=(t=>(t[t["2D"]=0]="2D",t[t.WebGL=1]="WebGL",t[t.WebGL2=2]="WebGL2",t))(ae||{});function zt(t){return "__ln"in t}var kt=class{constructor(){this.length=0,this.head=null;}get(e){if(e>=this.length)throw new Error("Position outside of list range");let r=this.head;for(let n=0;n<e;n++)r=r?.next||null;return r}addNode(e){let r={value:e,previous:null,next:null};if(e.__ln=r,e.previousSibling&&zt(e.previousSibling)){let n=e.previousSibling.__ln.next;r.next=n,r.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=r,n&&(n.previous=r);}else if(e.nextSibling&&zt(e.nextSibling)&&e.nextSibling.__ln.previous){let n=e.nextSibling.__ln.previous;r.previous=n,r.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=r,n&&(n.next=r);}else this.head&&(this.head.previous=r),r.next=this.head,this.head=r;this.length++;}removeNode(e){let r=e.__ln;this.head&&(r.previous?(r.previous.next=r.next,r.next&&(r.next.previous=r.previous)):(this.head=r.next,this.head&&(this.head.previous=null)),e.__ln&&delete e.__ln,this.length--);}},Kt=(t,e)=>`${t}@${e}`,Ve=class{constructor(){this.frozen=false,this.locked=false,this.texts=[],this.attributes=[],this.removes=[],this.mapRemoves=[],this.movedMap={},this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.processMutations=e=>{e.forEach(this.processMutation),this.emit();},this.emit=()=>{if(this.frozen||this.locked)return;let e=[],r=new kt,n=s=>{let c=s,l=fe;for(;l===fe;)c=c&&c.nextSibling,l=c&&this.mirror.getId(c);return l},o=s=>{var c,l,d,u;let h=null;((l=(c=s.getRootNode)===null||c===void 0?void 0:c.call(s))===null||l===void 0?void 0:l.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&s.getRootNode().host&&(h=s.getRootNode().host);let f=h;for(;((u=(d=f?.getRootNode)===null||d===void 0?void 0:d.call(f))===null||u===void 0?void 0:u.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&f.getRootNode().host;)f=f.getRootNode().host;let p=!this.doc.contains(s)&&(!f||!this.doc.contains(f));if(!s.parentNode||p)return;let v=ge(s.parentNode)?this.mirror.getId(h):this.mirror.getId(s.parentNode),S=n(s);if(v===-1||S===-1)return r.addNode(s);let y=pe(s,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskTextClass:this.maskTextClass,maskTextSelector:this.maskTextSelector,skipChild:true,newlyAddedElement:true,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:g=>{Ge(g,this.mirror)&&this.iframeManager.addIframe(g),We(g,this.mirror)&&this.stylesheetManager.trackLinkElement(g),Ue(s)&&this.shadowDomManager.addShadowRoot(s.shadowRoot,this.doc);},onIframeLoad:(g,m)=>{this.iframeManager.attachIframe(g,m),this.shadowDomManager.observeAttachShadow(g);},onStylesheetLoad:(g,m)=>{this.stylesheetManager.attachLinkElement(g,m);}});y&&e.push({parentId:v,nextId:S,node:y});};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(let s of Array.from(this.movedSet.values()))Yt(this.removes,s,this.mirror)&&!this.movedSet.has(s.parentNode)||o(s);for(let s of Array.from(this.addedSet.values()))!jt(this.droppedSet,s)&&!Yt(this.removes,s,this.mirror)||jt(this.movedSet,s)?o(s):this.droppedSet.add(s);let i=null;for(;r.length;){let s=null;if(i){let c=this.mirror.getId(i.value.parentNode),l=n(i.value);c!==-1&&l!==-1&&(s=i);}if(!s)for(let c=r.length-1;c>=0;c--){let l=r.get(c);if(l){let d=this.mirror.getId(l.value.parentNode);if(n(l.value)===-1)continue;if(d!==-1){s=l;break}else {let h=l.value;if(h.parentNode&&h.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){let f=h.parentNode.host;if(this.mirror.getId(f)!==-1){s=l;break}}}}}if(!s){for(;r.head;)r.removeNode(r.head.value);break}i=s.previous,r.removeNode(s.value),o(s.value);}let a={texts:this.texts.map(s=>({id:this.mirror.getId(s.node),value:s.value})).filter(s=>this.mirror.has(s.id)),attributes:this.attributes.map(s=>({id:this.mirror.getId(s.node),attributes:s.attributes})).filter(s=>this.mirror.has(s.id)),removes:this.removes,adds:e};!a.texts.length&&!a.attributes.length&&!a.removes.length&&!a.adds.length||(this.texts=[],this.attributes=[],this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.movedMap={},this.mutationCb(a));},this.processMutation=e=>{if(!Be(e.target,this.mirror))switch(e.type){case "characterData":{let r=e.target.textContent;!T(e.target,this.blockClass,this.blockSelector,false)&&r!==e.oldValue&&this.texts.push({value:St(e.target,this.maskTextClass,this.maskTextSelector)&&r?this.maskTextFn?this.maskTextFn(r):r.replace(/[\S]/g,"*"):r,node:e.target});break}case "attributes":{let r=e.target,n=e.target.getAttribute(e.attributeName);if(e.attributeName==="value"&&(n=we({maskInputOptions:this.maskInputOptions,tagName:e.target.tagName,type:e.target.getAttribute("type"),value:n,maskInputFn:this.maskInputFn})),T(e.target,this.blockClass,this.blockSelector,false)||n===e.oldValue)return;let o=this.attributes.find(i=>i.node===e.target);if(r.tagName==="IFRAME"&&e.attributeName==="src"&&!this.keepIframeSrcFn(n))if(!r.contentDocument)e.attributeName="rr_src";else return;if(o||(o={node:e.target,attributes:{}},this.attributes.push(o)),e.attributeName==="style"){let i=this.doc.createElement("span");e.oldValue&&i.setAttribute("style",e.oldValue),(o.attributes.style===void 0||o.attributes.style===null)&&(o.attributes.style={});let a=o.attributes.style;for(let s of Array.from(r.style)){let c=r.style.getPropertyValue(s),l=r.style.getPropertyPriority(s);(c!==i.style.getPropertyValue(s)||l!==i.style.getPropertyPriority(s))&&(l===""?a[s]=c:a[s]=[c,l]);}for(let s of Array.from(i.style))r.style.getPropertyValue(s)===""&&(a[s]=false);}else o.attributes[e.attributeName]=Ct(this.doc,r.tagName,e.attributeName,n);break}case "childList":{if(T(e.target,this.blockClass,this.blockSelector,true))return;e.addedNodes.forEach(r=>this.genAdds(r,e.target)),e.removedNodes.forEach(r=>{let n=this.mirror.getId(r),o=ge(e.target)?this.mirror.getId(e.target.host):this.mirror.getId(e.target);T(e.target,this.blockClass,this.blockSelector,false)||Be(r,this.mirror)||!Zt(r,this.mirror)||(this.addedSet.has(r)?(wt(this.addedSet,r),this.droppedSet.add(r)):this.addedSet.has(e.target)&&n===-1||bt(e.target,this.mirror)||(this.movedSet.has(r)&&this.movedMap[Kt(n,o)]?wt(this.movedSet,r):this.removes.push({parentId:o,id:n,isShadow:ge(e.target)&&he(e.target)?true:void 0})),this.mapRemoves.push(r));});break}}},this.genAdds=(e,r)=>{if(this.mirror.hasNode(e)){if(Be(e,this.mirror))return;this.movedSet.add(e);let n=null;r&&this.mirror.hasNode(r)&&(n=this.mirror.getId(r)),n&&n!==-1&&(this.movedMap[Kt(this.mirror.getId(e),n)]=true);}else this.addedSet.add(e),this.droppedSet.delete(e);T(e,this.blockClass,this.blockSelector,false)||e.childNodes.forEach(n=>this.genAdds(n));};}init(e){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager"].forEach(r=>{this[r]=e[r];});}freeze(){this.frozen=true,this.canvasManager.freeze();}unfreeze(){this.frozen=false,this.canvasManager.unfreeze(),this.emit();}isFrozen(){return this.frozen}lock(){this.locked=true,this.canvasManager.lock();}unlock(){this.locked=false,this.canvasManager.unlock(),this.emit();}reset(){this.shadowDomManager.reset(),this.canvasManager.reset();}};function wt(t,e){t.delete(e),e.childNodes.forEach(r=>wt(t,r));}function Yt(t,e,r){return t.length===0?false:Jt(t,e,r)}function Jt(t,e,r){let{parentNode:n}=e;if(!n)return false;let o=r.getId(n);return t.some(i=>i.id===o)?true:Jt(t,n,r)}function jt(t,e){return t.size===0?false:Qt(t,e)}function Qt(t,e){let{parentNode:r}=e;return r?t.has(r)?true:Qt(t,r):false}var de=[],$t=typeof CSSGroupingRule<"u",er=typeof CSSMediaRule<"u",tr=typeof CSSSupportsRule<"u",rr=typeof CSSConditionRule<"u";function Ee(t){try{if("composedPath"in t){let e=t.composedPath();if(e.length)return e[0]}else if("path"in t&&t.path.length)return t.path[0];return t.target}catch{return t.target}}function Et(t,e){var r,n;let o=new Ve;de.push(o),o.init(t);let i=window.MutationObserver||window.__rrMutationObserver,a=(n=(r=window?.Zone)===null||r===void 0?void 0:r.__symbol__)===null||n===void 0?void 0:n.call(r,"MutationObserver");a&&window[a]&&(i=window[a]);let s=new i(o.processMutations.bind(o));return s.observe(e,{attributes:true,attributeOldValue:true,characterData:true,characterDataOldValue:true,childList:true,subtree:true}),s}function Kr({mousemoveCb:t,sampling:e,doc:r,mirror:n}){if(e.mousemove===false)return ()=>{};let o=typeof e.mousemove=="number"?e.mousemove:50,i=typeof e.mousemoveCallback=="number"?e.mousemoveCallback:500,a=[],s,c=Se(u=>{let h=Date.now()-s;t(a.map(f=>(f.timeOffset-=h,f)),u),a=[],s=null;},i),l=Se(u=>{let h=Ee(u),{clientX:f,clientY:p}=At(u)?u.changedTouches[0]:u;s||(s=Date.now()),a.push({x:f,y:p,id:n.getId(h),timeOffset:Date.now()-s}),c(typeof DragEvent<"u"&&u instanceof DragEvent?C.Drag:u instanceof MouseEvent?C.MouseMove:C.TouchMove);},o,{trailing:false}),d=[G("mousemove",l,r),G("touchmove",l,r),G("drag",l,r)];return ()=>{d.forEach(u=>u());}}function Yr({mouseInteractionCb:t,doc:e,mirror:r,blockClass:n,blockSelector:o,sampling:i}){if(i.mouseInteraction===false)return ()=>{};let a=i.mouseInteraction===true||i.mouseInteraction===void 0?{}:i.mouseInteraction,s=[],c=l=>d=>{let u=Ee(d);if(T(u,n,o,true))return;let h=At(d)?d.changedTouches[0]:d;if(!h)return;let f=r.getId(u),{clientX:p,clientY:v}=h;t({type:He[l],id:f,x:p,y:v});};return Object.keys(He).filter(l=>Number.isNaN(Number(l))&&!l.endsWith("_Departed")&&a[l]!==false).forEach(l=>{let d=l.toLowerCase(),u=c(l);s.push(G(d,u,e));}),()=>{s.forEach(l=>l());}}function Mt({scrollCb:t,doc:e,mirror:r,blockClass:n,blockSelector:o,sampling:i}){let a=Se(s=>{let c=Ee(s);if(!c||T(c,n,o,true))return;let l=r.getId(c);if(c===e){let d=e.scrollingElement||e.documentElement;t({id:l,x:d.scrollLeft,y:d.scrollTop});}else t({id:l,x:c.scrollLeft,y:c.scrollTop});},i.scroll||100);return G("scroll",a,e)}function jr({viewportResizeCb:t}){let e=-1,r=-1,n=Se(()=>{let o=Fe(),i=Le();(e!==o||r!==i)&&(t({width:Number(i),height:Number(o)}),e=o,r=i);},200);return G("resize",n,window)}function qt(t,e){let r=Object.assign({},t);return e||delete r.userTriggered,r}var Jr=["INPUT","TEXTAREA","SELECT"],Xt=new WeakMap;function Qr({inputCb:t,doc:e,mirror:r,blockClass:n,blockSelector:o,ignoreClass:i,maskInputOptions:a,maskInputFn:s,sampling:c,userTriggeredOnInput:l}){function d(y){let g=Ee(y),m=y.isTrusted;if(g&&g.tagName==="OPTION"&&(g=g.parentElement),!g||!g.tagName||Jr.indexOf(g.tagName)<0||T(g,n,o,true))return;let k=g.type;if(g.classList.contains(i))return;let W=g.value,L=false;k==="radio"||k==="checkbox"?L=g.checked:(a[g.tagName.toLowerCase()]||a[k])&&(W=we({maskInputOptions:a,tagName:g.tagName,type:k,value:W,maskInputFn:s})),u(g,qt({text:W,isChecked:L,userTriggered:m},l));let B=g.name;k==="radio"&&B&&L&&e.querySelectorAll(`input[type="radio"][name="${B}"]`).forEach(w=>{w!==g&&u(w,qt({text:w.value,isChecked:!L,userTriggered:false},l));});}function u(y,g){let m=Xt.get(y);if(!m||m.text!==g.text||m.isChecked!==g.isChecked){Xt.set(y,g);let k=r.getId(y);t(Object.assign(Object.assign({},g),{id:k}));}}let f=(c.input==="last"?["change"]:["input","change"]).map(y=>G(y,d,e)),p=e.defaultView;if(!p)return ()=>{f.forEach(y=>y());};let v=p.Object.getOwnPropertyDescriptor(p.HTMLInputElement.prototype,"value"),S=[[p.HTMLInputElement.prototype,"value"],[p.HTMLInputElement.prototype,"checked"],[p.HTMLSelectElement.prototype,"value"],[p.HTMLTextAreaElement.prototype,"value"],[p.HTMLSelectElement.prototype,"selectedIndex"],[p.HTMLOptionElement.prototype,"selected"]];return v&&v.set&&f.push(...S.map(y=>me(y[0],y[1],{set(){d({target:this});}},false,p))),()=>{f.forEach(y=>y());}}function _e(t){let e=[];function r(n,o){if($t&&n.parentRule instanceof CSSGroupingRule||er&&n.parentRule instanceof CSSMediaRule||tr&&n.parentRule instanceof CSSSupportsRule||rr&&n.parentRule instanceof CSSConditionRule){let a=Array.from(n.parentRule.cssRules).indexOf(n);o.unshift(a);}else if(n.parentStyleSheet){let a=Array.from(n.parentStyleSheet.cssRules).indexOf(n);o.unshift(a);}return o}return r(t,e)}function ce(t,e,r){let n,o;return t?(t.ownerNode?n=e.getId(t.ownerNode):o=r.getId(t),{styleId:o,id:n}):{}}function qr({styleSheetRuleCb:t,mirror:e,stylesheetManager:r},{win:n}){let o=n.CSSStyleSheet.prototype.insertRule;n.CSSStyleSheet.prototype.insertRule=function(d,u){let{id:h,styleId:f}=ce(this,e,r.styleMirror);return (h&&h!==-1||f&&f!==-1)&&t({id:h,styleId:f,adds:[{rule:d,index:u}]}),o.apply(this,[d,u])};let i=n.CSSStyleSheet.prototype.deleteRule;n.CSSStyleSheet.prototype.deleteRule=function(d){let{id:u,styleId:h}=ce(this,e,r.styleMirror);return (u&&u!==-1||h&&h!==-1)&&t({id:u,styleId:h,removes:[{index:d}]}),i.apply(this,[d])};let a;n.CSSStyleSheet.prototype.replace&&(a=n.CSSStyleSheet.prototype.replace,n.CSSStyleSheet.prototype.replace=function(d){let{id:u,styleId:h}=ce(this,e,r.styleMirror);return (u&&u!==-1||h&&h!==-1)&&t({id:u,styleId:h,replace:d}),a.apply(this,[d])});let s;n.CSSStyleSheet.prototype.replaceSync&&(s=n.CSSStyleSheet.prototype.replaceSync,n.CSSStyleSheet.prototype.replaceSync=function(d){let{id:u,styleId:h}=ce(this,e,r.styleMirror);return (u&&u!==-1||h&&h!==-1)&&t({id:u,styleId:h,replaceSync:d}),s.apply(this,[d])});let c={};$t?c.CSSGroupingRule=n.CSSGroupingRule:(er&&(c.CSSMediaRule=n.CSSMediaRule),rr&&(c.CSSConditionRule=n.CSSConditionRule),tr&&(c.CSSSupportsRule=n.CSSSupportsRule));let l={};return Object.entries(c).forEach(([d,u])=>{l[d]={insertRule:u.prototype.insertRule,deleteRule:u.prototype.deleteRule},u.prototype.insertRule=function(h,f){let{id:p,styleId:v}=ce(this.parentStyleSheet,e,r.styleMirror);return (p&&p!==-1||v&&v!==-1)&&t({id:p,styleId:v,adds:[{rule:h,index:[..._e(this),f||0]}]}),l[d].insertRule.apply(this,[h,f])},u.prototype.deleteRule=function(h){let{id:f,styleId:p}=ce(this.parentStyleSheet,e,r.styleMirror);return (f&&f!==-1||p&&p!==-1)&&t({id:f,styleId:p,removes:[{index:[..._e(this),h]}]}),l[d].deleteRule.apply(this,[h])};}),()=>{n.CSSStyleSheet.prototype.insertRule=o,n.CSSStyleSheet.prototype.deleteRule=i,a&&(n.CSSStyleSheet.prototype.replace=a),s&&(n.CSSStyleSheet.prototype.replaceSync=s),Object.entries(c).forEach(([d,u])=>{u.prototype.insertRule=l[d].insertRule,u.prototype.deleteRule=l[d].deleteRule;});}}function Tt({mirror:t,stylesheetManager:e},r){var n,o,i;let a=null;r.nodeName==="#document"?a=t.getId(r):a=t.getId(r.host);let s=r.nodeName==="#document"?(n=r.defaultView)===null||n===void 0?void 0:n.Document:(i=(o=r.ownerDocument)===null||o===void 0?void 0:o.defaultView)===null||i===void 0?void 0:i.ShadowRoot,c=Object.getOwnPropertyDescriptor(s?.prototype,"adoptedStyleSheets");return a===null||a===-1||!s||!c?()=>{}:(Object.defineProperty(r,"adoptedStyleSheets",{configurable:c.configurable,enumerable:c.enumerable,get(){var l;return (l=c.get)===null||l===void 0?void 0:l.call(this)},set(l){var d;let u=(d=c.set)===null||d===void 0?void 0:d.call(this,l);if(a!==null&&a!==-1)try{e.adoptStyleSheets(l,a);}catch{}return u}}),()=>{Object.defineProperty(r,"adoptedStyleSheets",{configurable:c.configurable,enumerable:c.enumerable,get:c.get,set:c.set});})}function Xr({styleDeclarationCb:t,mirror:e,ignoreCSSAttributes:r,stylesheetManager:n},{win:o}){let i=o.CSSStyleDeclaration.prototype.setProperty;o.CSSStyleDeclaration.prototype.setProperty=function(s,c,l){var d;if(r.has(s))return i.apply(this,[s,c,l]);let{id:u,styleId:h}=ce((d=this.parentRule)===null||d===void 0?void 0:d.parentStyleSheet,e,n.styleMirror);return (u&&u!==-1||h&&h!==-1)&&t({id:u,styleId:h,set:{property:s,value:c,priority:l},index:_e(this.parentRule)}),i.apply(this,[s,c,l])};let a=o.CSSStyleDeclaration.prototype.removeProperty;return o.CSSStyleDeclaration.prototype.removeProperty=function(s){var c;if(r.has(s))return a.apply(this,[s]);let{id:l,styleId:d}=ce((c=this.parentRule)===null||c===void 0?void 0:c.parentStyleSheet,e,n.styleMirror);return (l&&l!==-1||d&&d!==-1)&&t({id:l,styleId:d,remove:{property:s},index:_e(this.parentRule)}),a.apply(this,[s])},()=>{o.CSSStyleDeclaration.prototype.setProperty=i,o.CSSStyleDeclaration.prototype.removeProperty=a;}}function $r({mediaInteractionCb:t,blockClass:e,blockSelector:r,mirror:n,sampling:o}){let i=s=>Se(c=>{let l=Ee(c);if(!l||T(l,e,r,true))return;let{currentTime:d,volume:u,muted:h,playbackRate:f}=l;t({type:s,id:n.getId(l),currentTime:d,volume:u,muted:h,playbackRate:f});},o.media||500),a=[G("play",i(0)),G("pause",i(1)),G("seeked",i(2)),G("volumechange",i(3)),G("ratechange",i(4))];return ()=>{a.forEach(s=>s());}}function en({fontCb:t,doc:e}){let r=e.defaultView;if(!r)return ()=>{};let n=[],o=new WeakMap,i=r.FontFace;r.FontFace=function(c,l,d){let u=new i(c,l,d);return o.set(u,{family:c,buffer:typeof l!="string",descriptors:d,fontSource:typeof l=="string"?l:JSON.stringify(Array.from(new Uint8Array(l)))}),u};let a=ee(e.fonts,"add",function(s){return function(c){return setTimeout(()=>{let l=o.get(c);l&&(t(l),o.delete(c));},0),s.apply(this,[c])}});return n.push(()=>{r.FontFace=i;}),n.push(a),()=>{n.forEach(s=>s());}}function tn(t){let{doc:e,mirror:r,blockClass:n,blockSelector:o,selectionCb:i}=t,a=true,s=()=>{let c=e.getSelection();if(!c||a&&c?.isCollapsed)return;a=c.isCollapsed||false;let l=[],d=c.rangeCount||0;for(let u=0;u<d;u++){let h=c.getRangeAt(u),{startContainer:f,startOffset:p,endContainer:v,endOffset:S}=h;T(f,n,o,true)||T(v,n,o,true)||l.push({start:r.getId(f),startOffset:p,end:r.getId(v),endOffset:S});}i({ranges:l});};return s(),G("selectionchange",s)}function rn(t,e){let{mutationCb:r,mousemoveCb:n,mouseInteractionCb:o,scrollCb:i,viewportResizeCb:a,inputCb:s,mediaInteractionCb:c,styleSheetRuleCb:l,styleDeclarationCb:d,canvasMutationCb:u,fontCb:h,selectionCb:f}=t;t.mutationCb=(...p)=>{e.mutation&&e.mutation(...p),r(...p);},t.mousemoveCb=(...p)=>{e.mousemove&&e.mousemove(...p),n(...p);},t.mouseInteractionCb=(...p)=>{e.mouseInteraction&&e.mouseInteraction(...p),o(...p);},t.scrollCb=(...p)=>{e.scroll&&e.scroll(...p),i(...p);},t.viewportResizeCb=(...p)=>{e.viewportResize&&e.viewportResize(...p),a(...p);},t.inputCb=(...p)=>{e.input&&e.input(...p),s(...p);},t.mediaInteractionCb=(...p)=>{e.mediaInteaction&&e.mediaInteaction(...p),c(...p);},t.styleSheetRuleCb=(...p)=>{e.styleSheetRule&&e.styleSheetRule(...p),l(...p);},t.styleDeclarationCb=(...p)=>{e.styleDeclaration&&e.styleDeclaration(...p),d(...p);},t.canvasMutationCb=(...p)=>{e.canvasMutation&&e.canvasMutation(...p),u(...p);},t.fontCb=(...p)=>{e.font&&e.font(...p),h(...p);},t.selectionCb=(...p)=>{e.selection&&e.selection(...p),f(...p);};}function nr(t,e={}){let r=t.doc.defaultView;if(!r)return ()=>{};rn(t,e);let n=Et(t,t.doc),o=Kr(t),i=Yr(t),a=Mt(t),s=jr(t),c=Qr(t),l=$r(t),d=qr(t,{win:r}),u=Tt(t,t.doc),h=Xr(t,{win:r}),f=t.collectFonts?en(t):()=>{},p=tn(t),v=[];for(let S of t.plugins)v.push(S.observer(S.callback,r,S.options));return ()=>{de.forEach(S=>S.reset()),n.disconnect(),o(),i(),a(),s(),c(),l(),d(),u(),h(),f(),p(),v.forEach(S=>S());}}var Me=class{constructor(e){this.generateIdFn=e,this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;}getId(e,r,n,o){let i=n||this.getIdToRemoteIdMap(e),a=o||this.getRemoteIdToIdMap(e),s=i.get(r);return s||(s=this.generateIdFn(),i.set(r,s),a.set(s,r)),s}getIds(e,r){let n=this.getIdToRemoteIdMap(e),o=this.getRemoteIdToIdMap(e);return r.map(i=>this.getId(e,i,n,o))}getRemoteId(e,r,n){let o=n||this.getRemoteIdToIdMap(e);if(typeof r!="number")return r;let i=o.get(r);return i||-1}getRemoteIds(e,r){let n=this.getRemoteIdToIdMap(e);return r.map(o=>this.getRemoteId(e,o,n))}reset(e){if(!e){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(e),this.iframeRemoteIdToIdMap.delete(e);}getIdToRemoteIdMap(e){let r=this.iframeIdToRemoteIdMap.get(e);return r||(r=new Map,this.iframeIdToRemoteIdMap.set(e,r)),r}getRemoteIdToIdMap(e){let r=this.iframeRemoteIdToIdMap.get(e);return r||(r=new Map,this.iframeRemoteIdToIdMap.set(e,r)),r}};var Ze=class{constructor(e){this.iframes=new WeakMap,this.crossOriginIframeMap=new WeakMap,this.crossOriginIframeMirror=new Me(It),this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new Me(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,true),e.contentWindow&&this.crossOriginIframeMap.set(e.contentWindow,e);}addLoadListener(e){this.loadListener=e;}attachIframe(e,r){var n;this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:r}],removes:[],texts:[],attributes:[],isAttachIframe:true}),(n=this.loadListener)===null||n===void 0||n.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){if(e.data.type==="rrweb"){if(!e.source)return;let n=this.crossOriginIframeMap.get(e.source);if(!n)return;let o=this.transformCrossOriginEvent(n,e.data.event);o&&this.wrappedEmit(o,e.data.isCheckout);}}transformCrossOriginEvent(e,r){var n;switch(r.type){case b.FullSnapshot:return this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(r.data.node,e),{timestamp:r.timestamp,type:b.IncrementalSnapshot,data:{source:C.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:r.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:true}};case b.Meta:case b.Load:case b.DomContentLoaded:return false;case b.Plugin:return r;case b.Custom:return this.replaceIds(r.data.payload,e,["id","parentId","previousId","nextId"]),r;case b.IncrementalSnapshot:switch(r.data.source){case C.Mutation:return r.data.adds.forEach(o=>{this.replaceIds(o,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(o.node,e);}),r.data.removes.forEach(o=>{this.replaceIds(o,e,["parentId","id"]);}),r.data.attributes.forEach(o=>{this.replaceIds(o,e,["id"]);}),r.data.texts.forEach(o=>{this.replaceIds(o,e,["id"]);}),r;case C.Drag:case C.TouchMove:case C.MouseMove:return r.data.positions.forEach(o=>{this.replaceIds(o,e,["id"]);}),r;case C.ViewportResize:return false;case C.MediaInteraction:case C.MouseInteraction:case C.Scroll:case C.CanvasMutation:case C.Input:return this.replaceIds(r.data,e,["id"]),r;case C.StyleSheetRule:case C.StyleDeclaration:return this.replaceIds(r.data,e,["id"]),this.replaceStyleIds(r.data,e,["styleId"]),r;case C.Font:return r;case C.Selection:return r.data.ranges.forEach(o=>{this.replaceIds(o,e,["start","end"]);}),r;case C.AdoptedStyleSheet:return this.replaceIds(r.data,e,["id"]),this.replaceStyleIds(r.data,e,["styleIds"]),(n=r.data.styles)===null||n===void 0||n.forEach(o=>{this.replaceStyleIds(o,e,["styleId"]);}),r}}}replace(e,r,n,o){for(let i of o)!Array.isArray(r[i])&&typeof r[i]!="number"||(Array.isArray(r[i])?r[i]=e.getIds(n,r[i]):r[i]=e.getId(n,r[i]));return r}replaceIds(e,r,n){return this.replace(this.crossOriginIframeMirror,e,r,n)}replaceStyleIds(e,r,n){return this.replace(this.crossOriginIframeStyleMirror,e,r,n)}replaceIdOnNode(e,r){this.replaceIds(e,r,["id"]),"childNodes"in e&&e.childNodes.forEach(n=>{this.replaceIdOnNode(n,r);});}};var Pe=class{constructor(e){this.shadowDoms=new WeakSet,this.restorePatches=[],this.mutationCb=e.mutationCb,this.scrollCb=e.scrollCb,this.bypassOptions=e.bypassOptions,this.mirror=e.mirror;let r=this;this.restorePatches.push(ee(Element.prototype,"attachShadow",function(n){return function(o){let i=n.call(this,o);return this.shadowRoot&&r.addShadowRoot(this.shadowRoot,this.ownerDocument),i}}));}addShadowRoot(e,r){he(e)&&(this.shadowDoms.has(e)||(this.shadowDoms.add(e),Et(Object.assign(Object.assign({},this.bypassOptions),{doc:r,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),e),Mt(Object.assign(Object.assign({},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(e.host)),Tt({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},e);},0)));}observeAttachShadow(e){if(e.contentWindow){let r=this;this.restorePatches.push(ee(e.contentWindow.HTMLElement.prototype,"attachShadow",function(n){return function(o){let i=n.call(this,o);return this.shadowRoot&&r.addShadowRoot(this.shadowRoot,e.contentDocument),i}}));}}reset(){this.restorePatches.forEach(e=>e()),this.shadowDoms=new WeakSet;}};function or(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]]);return r}function ir(t,e,r,n){function o(i){return i instanceof r?i:new r(function(a){a(i);})}return new(r||(r=Promise))(function(i,a){function s(d){try{l(n.next(d));}catch(u){a(u);}}function c(d){try{l(n.throw(d));}catch(u){a(u);}}function l(d){d.done?i(d.value):o(d.value).then(s,c);}l((n=n.apply(t,[])).next());})}var be="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",nn=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(Te=0;Te<be.length;Te++)nn[be.charCodeAt(Te)]=Te;var Te,sr=function(t){var e=new Uint8Array(t),r,n=e.length,o="";for(r=0;r<n;r+=3)o+=be[e[r]>>2],o+=be[(e[r]&3)<<4|e[r+1]>>4],o+=be[(e[r+1]&15)<<2|e[r+2]>>6],o+=be[e[r+2]&63];return n%3===2?o=o.substring(0,o.length-1)+"=":n%3===1&&(o=o.substring(0,o.length-2)+"=="),o};var ar=new Map;function on(t,e){let r=ar.get(t);return r||(r=new Map,ar.set(t,r)),r.has(e)||r.set(e,[]),r.get(e)}var Rt=(t,e,r)=>{if(!t||!(lr(t,e)||typeof t=="object"))return;let n=t.constructor.name,o=on(r,n),i=o.indexOf(t);return i===-1&&(i=o.length,o.push(t)),i};function ze(t,e,r){if(t instanceof Array)return t.map(n=>ze(n,e,r));if(t===null)return t;if(t instanceof Float32Array||t instanceof Float64Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Uint8Array||t instanceof Uint16Array||t instanceof Int16Array||t instanceof Int8Array||t instanceof Uint8ClampedArray)return {rr_type:t.constructor.name,args:[Object.values(t)]};if(t instanceof ArrayBuffer){let n=t.constructor.name,o=sr(t);return {rr_type:n,base64:o}}else {if(t instanceof DataView)return {rr_type:t.constructor.name,args:[ze(t.buffer,e,r),t.byteOffset,t.byteLength]};if(t instanceof HTMLImageElement){let n=t.constructor.name,{src:o}=t;return {rr_type:n,src:o}}else if(t instanceof HTMLCanvasElement){let n="HTMLImageElement",o=t.toDataURL();return {rr_type:n,src:o}}else {if(t instanceof ImageData)return {rr_type:t.constructor.name,args:[ze(t.data,e,r),t.width,t.height]};if(lr(t,e)||typeof t=="object"){let n=t.constructor.name,o=Rt(t,e,r);return {rr_type:n,index:o}}}}return t}var Ke=(t,e,r)=>[...t].map(n=>ze(n,e,r)),lr=(t,e)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(o=>typeof e[o]=="function").find(o=>t instanceof e[o]);function cr(t,e,r,n){let o=[],i=Object.getOwnPropertyNames(e.CanvasRenderingContext2D.prototype);for(let a of i)try{if(typeof e.CanvasRenderingContext2D.prototype[a]!="function")continue;let s=ee(e.CanvasRenderingContext2D.prototype,a,function(c){return function(...l){return T(this.canvas,r,n,!0)||setTimeout(()=>{let d=Ke([...l],e,this);t(this.canvas,{type:ae["2D"],property:a,args:d});},0),c.apply(this,l)}});o.push(s);}catch{let c=me(e.CanvasRenderingContext2D.prototype,a,{set(l){t(this.canvas,{type:ae["2D"],property:a,args:[l],setter:true});}});o.push(c);}return ()=>{o.forEach(a=>a());}}function Nt(t,e,r){let n=[];try{let o=ee(t.HTMLCanvasElement.prototype,"getContext",function(i){return function(a,...s){return T(this,e,r,!0)||"__context"in this||(this.__context=a),i.apply(this,[a,...s])}});n.push(o);}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext");}return ()=>{n.forEach(o=>o());}}function dr(t,e,r,n,o,i,a){let s=[],c=Object.getOwnPropertyNames(t);for(let l of c)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(l))try{if(typeof t[l]!="function")continue;let d=ee(t,l,function(u){return function(...h){let f=u.apply(this,h);if(Rt(f,a,this),!T(this.canvas,n,o,!0)){let p=Ke([...h],a,this),v={type:e,property:l,args:p};r(this.canvas,v);}return f}});s.push(d);}catch{let u=me(t,l,{set(h){r(this.canvas,{type:e,property:l,args:[h],setter:true});}});s.push(u);}return s}function ur(t,e,r,n,o){let i=[];return i.push(...dr(e.WebGLRenderingContext.prototype,ae.WebGL,t,r,n,o,e)),typeof e.WebGL2RenderingContext<"u"&&i.push(...dr(e.WebGL2RenderingContext.prototype,ae.WebGL2,t,r,n,o,e)),()=>{i.forEach(a=>a());}}var Ot=null;try{pr=typeof module<"u"&&typeof module.require=="function"&&module.require("worker_threads")||typeof __non_webpack_require__=="function"&&__non_webpack_require__("worker_threads")||typeof gt=="function"&&gt("worker_threads"),Ot=pr.Worker;}catch{}var pr;function sn(t,e){return Buffer.from(t,"base64").toString("utf8")}function hr(t,e,r){var i=sn(t),a=i.indexOf(`
4
- `,10)+1,s=i.substring(a)+("");return function(l){return new Ot(s,Object.assign({},l,{eval:true}))}}function an(t,e){var r=atob(t);return r}function ln(t,e,r){var i=an(t),a=i.indexOf(`
5
- `,10)+1,s=i.substring(a)+(""),c=new Blob([s],{type:"application/javascript"});return URL.createObjectURL(c)}function fr(t,e,r){var n;return function(i){return n=n||ln(t),new Worker(n,i)}}var cn=Object.prototype.toString.call(typeof process<"u"?process:0)==="[object process]";function gr(){return cn}function mr(t,e,r){return gr()?hr(t):fr(t)}var vr=mr("Lyogcm9sbHVwLXBsdWdpbi13ZWItd29ya2VyLWxvYWRlciAqLwooZnVuY3Rpb24gKCkgewogICAgJ3VzZSBzdHJpY3QnOwoKICAgIC8qISAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKg0KICAgIENvcHlyaWdodCAoYykgTWljcm9zb2Z0IENvcnBvcmF0aW9uLg0KDQogICAgUGVybWlzc2lvbiB0byB1c2UsIGNvcHksIG1vZGlmeSwgYW5kL29yIGRpc3RyaWJ1dGUgdGhpcyBzb2Z0d2FyZSBmb3IgYW55DQogICAgcHVycG9zZSB3aXRoIG9yIHdpdGhvdXQgZmVlIGlzIGhlcmVieSBncmFudGVkLg0KDQogICAgVEhFIFNPRlRXQVJFIElTIFBST1ZJREVEICJBUyBJUyIgQU5EIFRIRSBBVVRIT1IgRElTQ0xBSU1TIEFMTCBXQVJSQU5USUVTIFdJVEgNCiAgICBSRUdBUkQgVE8gVEhJUyBTT0ZUV0FSRSBJTkNMVURJTkcgQUxMIElNUExJRUQgV0FSUkFOVElFUyBPRiBNRVJDSEFOVEFCSUxJVFkNCiAgICBBTkQgRklUTkVTUy4gSU4gTk8gRVZFTlQgU0hBTEwgVEhFIEFVVEhPUiBCRSBMSUFCTEUgRk9SIEFOWSBTUEVDSUFMLCBESVJFQ1QsDQogICAgSU5ESVJFQ1QsIE9SIENPTlNFUVVFTlRJQUwgREFNQUdFUyBPUiBBTlkgREFNQUdFUyBXSEFUU09FVkVSIFJFU1VMVElORyBGUk9NDQogICAgTE9TUyBPRiBVU0UsIERBVEEgT1IgUFJPRklUUywgV0hFVEhFUiBJTiBBTiBBQ1RJT04gT0YgQ09OVFJBQ1QsIE5FR0xJR0VOQ0UgT1INCiAgICBPVEhFUiBUT1JUSU9VUyBBQ1RJT04sIEFSSVNJTkcgT1VUIE9GIE9SIElOIENPTk5FQ1RJT04gV0lUSCBUSEUgVVNFIE9SDQogICAgUEVSRk9STUFOQ0UgT0YgVEhJUyBTT0ZUV0FSRS4NCiAgICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLw0KDQogICAgZnVuY3Rpb24gX19hd2FpdGVyKHRoaXNBcmcsIF9hcmd1bWVudHMsIFAsIGdlbmVyYXRvcikgew0KICAgICAgICBmdW5jdGlvbiBhZG9wdCh2YWx1ZSkgeyByZXR1cm4gdmFsdWUgaW5zdGFuY2VvZiBQID8gdmFsdWUgOiBuZXcgUChmdW5jdGlvbiAocmVzb2x2ZSkgeyByZXNvbHZlKHZhbHVlKTsgfSk7IH0NCiAgICAgICAgcmV0dXJuIG5ldyAoUCB8fCAoUCA9IFByb21pc2UpKShmdW5jdGlvbiAocmVzb2x2ZSwgcmVqZWN0KSB7DQogICAgICAgICAgICBmdW5jdGlvbiBmdWxmaWxsZWQodmFsdWUpIHsgdHJ5IHsgc3RlcChnZW5lcmF0b3IubmV4dCh2YWx1ZSkpOyB9IGNhdGNoIChlKSB7IHJlamVjdChlKTsgfSB9DQogICAgICAgICAgICBmdW5jdGlvbiByZWplY3RlZCh2YWx1ZSkgeyB0cnkgeyBzdGVwKGdlbmVyYXRvclsidGhyb3ciXSh2YWx1ZSkpOyB9IGNhdGNoIChlKSB7IHJlamVjdChlKTsgfSB9DQogICAgICAgICAgICBmdW5jdGlvbiBzdGVwKHJlc3VsdCkgeyByZXN1bHQuZG9uZSA/IHJlc29sdmUocmVzdWx0LnZhbHVlKSA6IGFkb3B0KHJlc3VsdC52YWx1ZSkudGhlbihmdWxmaWxsZWQsIHJlamVjdGVkKTsgfQ0KICAgICAgICAgICAgc3RlcCgoZ2VuZXJhdG9yID0gZ2VuZXJhdG9yLmFwcGx5KHRoaXNBcmcsIF9hcmd1bWVudHMgfHwgW10pKS5uZXh0KCkpOw0KICAgICAgICB9KTsNCiAgICB9CgogICAgLyoKICAgICAqIGJhc2U2NC1hcnJheWJ1ZmZlciAxLjAuMSA8aHR0cHM6Ly9naXRodWIuY29tL25pa2xhc3ZoL2Jhc2U2NC1hcnJheWJ1ZmZlcj4KICAgICAqIENvcHlyaWdodCAoYykgMjAyMSBOaWtsYXMgdm9uIEhlcnR6ZW4gPGh0dHBzOi8vaGVydHplbi5jb20+CiAgICAgKiBSZWxlYXNlZCB1bmRlciBNSVQgTGljZW5zZQogICAgICovCiAgICB2YXIgY2hhcnMgPSAnQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyc7CiAgICAvLyBVc2UgYSBsb29rdXAgdGFibGUgdG8gZmluZCB0aGUgaW5kZXguCiAgICB2YXIgbG9va3VwID0gdHlwZW9mIFVpbnQ4QXJyYXkgPT09ICd1bmRlZmluZWQnID8gW10gOiBuZXcgVWludDhBcnJheSgyNTYpOwogICAgZm9yICh2YXIgaSA9IDA7IGkgPCBjaGFycy5sZW5ndGg7IGkrKykgewogICAgICAgIGxvb2t1cFtjaGFycy5jaGFyQ29kZUF0KGkpXSA9IGk7CiAgICB9CiAgICB2YXIgZW5jb2RlID0gZnVuY3Rpb24gKGFycmF5YnVmZmVyKSB7CiAgICAgICAgdmFyIGJ5dGVzID0gbmV3IFVpbnQ4QXJyYXkoYXJyYXlidWZmZXIpLCBpLCBsZW4gPSBieXRlcy5sZW5ndGgsIGJhc2U2NCA9ICcnOwogICAgICAgIGZvciAoaSA9IDA7IGkgPCBsZW47IGkgKz0gMykgewogICAgICAgICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaV0gPj4gMl07CiAgICAgICAgICAgIGJhc2U2NCArPSBjaGFyc1soKGJ5dGVzW2ldICYgMykgPDwgNCkgfCAoYnl0ZXNbaSArIDFdID4+IDQpXTsKICAgICAgICAgICAgYmFzZTY0ICs9IGNoYXJzWygoYnl0ZXNbaSArIDFdICYgMTUpIDw8IDIpIHwgKGJ5dGVzW2kgKyAyXSA+PiA2KV07CiAgICAgICAgICAgIGJhc2U2NCArPSBjaGFyc1tieXRlc1tpICsgMl0gJiA2M107CiAgICAgICAgfQogICAgICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgICAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgJz0nOwogICAgICAgIH0KICAgICAgICBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgICAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgJz09JzsKICAgICAgICB9CiAgICAgICAgcmV0dXJuIGJhc2U2NDsKICAgIH07CgogICAgY29uc3QgbGFzdEJsb2JNYXAgPSBuZXcgTWFwKCk7DQogICAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gbmV3IE1hcCgpOw0KICAgIGZ1bmN0aW9uIGdldFRyYW5zcGFyZW50QmxvYkZvcih3aWR0aCwgaGVpZ2h0LCBkYXRhVVJMT3B0aW9ucykgew0KICAgICAgICByZXR1cm4gX19hd2FpdGVyKHRoaXMsIHZvaWQgMCwgdm9pZCAwLCBmdW5jdGlvbiogKCkgew0KICAgICAgICAgICAgY29uc3QgaWQgPSBgJHt3aWR0aH0tJHtoZWlnaHR9YDsNCiAgICAgICAgICAgIGlmICgnT2Zmc2NyZWVuQ2FudmFzJyBpbiBnbG9iYWxUaGlzKSB7DQogICAgICAgICAgICAgICAgaWYgKHRyYW5zcGFyZW50QmxvYk1hcC5oYXMoaWQpKQ0KICAgICAgICAgICAgICAgICAgICByZXR1cm4gdHJhbnNwYXJlbnRCbG9iTWFwLmdldChpZCk7DQogICAgICAgICAgICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsNCiAgICAgICAgICAgICAgICBvZmZzY3JlZW4uZ2V0Q29udGV4dCgnMmQnKTsNCiAgICAgICAgICAgICAgICBjb25zdCBibG9iID0geWllbGQgb2Zmc2NyZWVuLmNvbnZlcnRUb0Jsb2IoZGF0YVVSTE9wdGlvbnMpOw0KICAgICAgICAgICAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0geWllbGQgYmxvYi5hcnJheUJ1ZmZlcigpOw0KICAgICAgICAgICAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7DQogICAgICAgICAgICAgICAgdHJhbnNwYXJlbnRCbG9iTWFwLnNldChpZCwgYmFzZTY0KTsNCiAgICAgICAgICAgICAgICByZXR1cm4gYmFzZTY0Ow0KICAgICAgICAgICAgfQ0KICAgICAgICAgICAgZWxzZSB7DQogICAgICAgICAgICAgICAgcmV0dXJuICcnOw0KICAgICAgICAgICAgfQ0KICAgICAgICB9KTsNCiAgICB9DQogICAgY29uc3Qgd29ya2VyID0gc2VsZjsNCiAgICB3b3JrZXIub25tZXNzYWdlID0gZnVuY3Rpb24gKGUpIHsNCiAgICAgICAgcmV0dXJuIF9fYXdhaXRlcih0aGlzLCB2b2lkIDAsIHZvaWQgMCwgZnVuY3Rpb24qICgpIHsNCiAgICAgICAgICAgIGlmICgnT2Zmc2NyZWVuQ2FudmFzJyBpbiBnbG9iYWxUaGlzKSB7DQogICAgICAgICAgICAgICAgY29uc3QgeyBpZCwgYml0bWFwLCB3aWR0aCwgaGVpZ2h0LCBkYXRhVVJMT3B0aW9ucyB9ID0gZS5kYXRhOw0KICAgICAgICAgICAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zKTsNCiAgICAgICAgICAgICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOw0KICAgICAgICAgICAgICAgIGNvbnN0IGN0eCA9IG9mZnNjcmVlbi5nZXRDb250ZXh0KCcyZCcpOw0KICAgICAgICAgICAgICAgIGN0eC5kcmF3SW1hZ2UoYml0bWFwLCAwLCAwKTsNCiAgICAgICAgICAgICAgICBiaXRtYXAuY2xvc2UoKTsNCiAgICAgICAgICAgICAgICBjb25zdCBibG9iID0geWllbGQgb2Zmc2NyZWVuLmNvbnZlcnRUb0Jsb2IoZGF0YVVSTE9wdGlvbnMpOw0KICAgICAgICAgICAgICAgIGNvbnN0IHR5cGUgPSBibG9iLnR5cGU7DQogICAgICAgICAgICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSB5aWVsZCBibG9iLmFycmF5QnVmZmVyKCk7DQogICAgICAgICAgICAgICAgY29uc3QgYmFzZTY0ID0gZW5jb2RlKGFycmF5QnVmZmVyKTsNCiAgICAgICAgICAgICAgICBpZiAoIWxhc3RCbG9iTWFwLmhhcyhpZCkgJiYgKHlpZWxkIHRyYW5zcGFyZW50QmFzZTY0KSA9PT0gYmFzZTY0KSB7DQogICAgICAgICAgICAgICAgICAgIGxhc3RCbG9iTWFwLnNldChpZCwgYmFzZTY0KTsNCiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHdvcmtlci5wb3N0TWVzc2FnZSh7IGlkIH0pOw0KICAgICAgICAgICAgICAgIH0NCiAgICAgICAgICAgICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KQ0KICAgICAgICAgICAgICAgICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7DQogICAgICAgICAgICAgICAgd29ya2VyLnBvc3RNZXNzYWdlKHsNCiAgICAgICAgICAgICAgICAgICAgaWQsDQogICAgICAgICAgICAgICAgICAgIHR5cGUsDQogICAgICAgICAgICAgICAgICAgIGJhc2U2NCwNCiAgICAgICAgICAgICAgICAgICAgd2lkdGgsDQogICAgICAgICAgICAgICAgICAgIGhlaWdodCwNCiAgICAgICAgICAgICAgICB9KTsNCiAgICAgICAgICAgICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7DQogICAgICAgICAgICB9DQogICAgICAgICAgICBlbHNlIHsNCiAgICAgICAgICAgICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsNCiAgICAgICAgICAgIH0NCiAgICAgICAgfSk7DQogICAgfTsKCn0pKCk7Cgo=");var Ye=class{constructor(e){this.pendingCanvasMutations=new Map,this.rafStamps={latestId:0,invokeId:null},this.frozen=false,this.locked=false,this.processMutation=(c,l)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(c)||this.pendingCanvasMutations.set(c,[]),this.pendingCanvasMutations.get(c).push(l);};let{sampling:r="all",win:n,blockClass:o,blockSelector:i,recordCanvas:a,dataURLOptions:s}=e;this.mutationCb=e.mutationCb,this.mirror=e.mirror,a&&r==="all"&&this.initCanvasMutationObserver(n,o,i),a&&typeof r=="number"&&this.initCanvasFPSObserver(r,n,o,i,{dataURLOptions:s});}reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers();}freeze(){this.frozen=true;}unfreeze(){this.frozen=false;}lock(){this.locked=true;}unlock(){this.locked=false;}initCanvasFPSObserver(e,r,n,o,i){let a=Nt(r,n,o),s=new Map,c=new vr;c.onmessage=p=>{let{id:v}=p.data;if(s.set(v,false),!("base64"in p.data))return;let{base64:S,type:y,width:g,height:m}=p.data;this.mutationCb({id:v,type:ae["2D"],commands:[{property:"clearRect",args:[0,0,g,m]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:S}],type:y}]},0,0]}]});};let l=1e3/e,d=0,u,h=()=>{let p=[];return r.document.querySelectorAll("canvas").forEach(v=>{T(v,n,o,true)||p.push(v);}),p},f=p=>{if(d&&p-d<l){u=requestAnimationFrame(f);return}d=p,h().forEach(v=>ir(this,void 0,void 0,function*(){var S;let y=this.mirror.getId(v);if(s.get(y))return;if(s.set(y,true),["webgl","webgl2"].includes(v.__context)){let m=v.getContext(v.__context);((S=m?.getContextAttributes())===null||S===void 0?void 0:S.preserveDrawingBuffer)===false&&m?.clear(m.COLOR_BUFFER_BIT);}let g=yield createImageBitmap(v);c.postMessage({id:y,bitmap:g,width:v.width,height:v.height,dataURLOptions:i.dataURLOptions},[g]);})),u=requestAnimationFrame(f);};u=requestAnimationFrame(f),this.resetObservers=()=>{a(),cancelAnimationFrame(u);};}initCanvasMutationObserver(e,r,n){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();let o=Nt(e,r,n),i=cr(this.processMutation.bind(this),e,r,n),a=ur(this.processMutation.bind(this),e,r,n,this.mirror);this.resetObservers=()=>{o(),i(),a();};}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations());}startRAFTimestamping(){let e=r=>{this.rafStamps.latestId=r,requestAnimationFrame(e);};requestAnimationFrame(e);}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((e,r)=>{let n=this.mirror.getId(r);this.flushPendingCanvasMutationFor(r,n);}),requestAnimationFrame(()=>this.flushPendingCanvasMutations());}flushPendingCanvasMutationFor(e,r){if(this.frozen||this.locked)return;let n=this.pendingCanvasMutations.get(e);if(!n||r===-1)return;let o=n.map(a=>or(a,["type"])),{type:i}=n[0];this.mutationCb({id:r,type:i,commands:o}),this.pendingCanvasMutations.delete(e);}};var je=class{constructor(e){this.trackedLinkElements=new WeakSet,this.styleMirror=new De,this.mutationCb=e.mutationCb,this.adoptedStyleSheetCb=e.adoptedStyleSheetCb;}attachLinkElement(e,r){"_cssText"in r.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:r.id,attributes:r.attributes}]}),this.trackLinkElement(e);}trackLinkElement(e){this.trackedLinkElements.has(e)||(this.trackedLinkElements.add(e),this.trackStylesheetInLinkElement(e));}adoptStyleSheets(e,r){if(e.length===0)return;let n={id:r,styleIds:[]},o=[];for(let i of e){let a;if(this.styleMirror.has(i))a=this.styleMirror.getId(i);else {a=this.styleMirror.add(i);let s=Array.from(i.rules||CSSRule);o.push({styleId:a,rules:s.map((c,l)=>({rule:vt(c),index:l}))});}n.styleIds.push(a);}o.length>0&&(n.styles=o),this.adoptedStyleSheetCb(n);}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet;}trackStylesheetInLinkElement(e){}};function D(t){return Object.assign(Object.assign({},t),{timestamp:Date.now()})}var R,Je,xt,Qe=false,te=Ht();function ue(t={}){let{emit:e,checkoutEveryNms:r,checkoutEveryNth:n,blockClass:o="rr-block",blockSelector:i=null,ignoreClass:a="rr-ignore",maskTextClass:s="rr-mask",maskTextSelector:c=null,inlineStylesheet:l=true,maskAllInputs:d,maskInputOptions:u,slimDOMOptions:h,maskInputFn:f,maskTextFn:p,hooks:v,packFn:S,sampling:y={},dataURLOptions:g={},mousemoveWait:m,recordCanvas:k=false,recordCrossOriginIframes:W=false,userTriggeredOnInput:L=false,collectFonts:B=false,inlineImages:w=false,plugins:P,keepIframeSrcFn:z=()=>false,ignoreCSSAttributes:J=new Set([])}=t,Q=W?window.parent===window:true,q=false;if(!Q)try{window.parent.document,q=!1;}catch{q=true;}if(Q&&!e)throw new Error("emit function is required");m!==void 0&&y.mousemove===void 0&&(y.mousemove=m),te.reset();let x=d===true?{color:true,date:true,"datetime-local":true,email:true,month:true,number:true,range:true,search:true,tel:true,text:true,time:true,url:true,week:true,textarea:true,select:true,password:true}:u!==void 0?u:{password:true},K=h===true||h==="all"?{script:true,comment:true,headFavicon:true,headWhitespace:true,headMetaSocial:true,headMetaRobots:true,headMetaHttpEquiv:true,headMetaVerification:true,headMetaAuthorship:h==="all",headMetaDescKeywords:h==="all"}:h||{};Pt();let X,ne=0,se=I=>{for(let U of P||[])U.eventProcessor&&(I=U.eventProcessor(I));return S&&(I=S(I)),I};R=(I,U)=>{var _;if(!((_=de[0])===null||_===void 0)&&_.isFrozen()&&I.type!==b.FullSnapshot&&!(I.type===b.IncrementalSnapshot&&I.data.source===C.Mutation)&&de.forEach(M=>M.unfreeze()),Q)e?.(se(I),U);else if(q){let M={type:"rrweb",event:se(I),isCheckout:U};window.parent.postMessage(M,"*");}if(I.type===b.FullSnapshot)X=I,ne=0;else if(I.type===b.IncrementalSnapshot){if(I.data.source===C.Mutation&&I.data.isAttachIframe)return;ne++;let M=n&&ne>=n,j=r&&I.timestamp-X.timestamp>r;(M||j)&&Je(true);}};let V=I=>{R(D({type:b.IncrementalSnapshot,data:Object.assign({source:C.Mutation},I)}));},Y=I=>R(D({type:b.IncrementalSnapshot,data:Object.assign({source:C.Scroll},I)})),le=I=>R(D({type:b.IncrementalSnapshot,data:Object.assign({source:C.CanvasMutation},I)})),O=I=>R(D({type:b.IncrementalSnapshot,data:Object.assign({source:C.AdoptedStyleSheet},I)})),$=new je({mutationCb:V,adoptedStyleSheetCb:O}),oe=new Ze({mirror:te,mutationCb:V,stylesheetManager:$,recordCrossOriginIframes:W,wrappedEmit:R});for(let I of P||[])I.getMirror&&I.getMirror({nodeMirror:te,crossOriginIframeMirror:oe.crossOriginIframeMirror,crossOriginIframeStyleMirror:oe.crossOriginIframeStyleMirror});xt=new Ye({recordCanvas:k,mutationCb:le,win:window,blockClass:o,blockSelector:i,mirror:te,sampling:y.canvas,dataURLOptions:g});let ve=new Pe({mutationCb:V,scrollCb:Y,bypassOptions:{blockClass:o,blockSelector:i,maskTextClass:s,maskTextSelector:c,inlineStylesheet:l,maskInputOptions:x,dataURLOptions:g,maskTextFn:p,maskInputFn:f,recordCanvas:k,inlineImages:w,sampling:y,slimDOMOptions:K,iframeManager:oe,stylesheetManager:$,canvasManager:xt,keepIframeSrcFn:z},mirror:te});Je=(I=false)=>{var U,_,M,j,A,Z;R(D({type:b.Meta,data:{href:window.location.href,width:Le(),height:Fe()}}),I),$.reset(),de.forEach(H=>H.lock());let Ae=Vt(document,{mirror:te,blockClass:o,blockSelector:i,maskTextClass:s,maskTextSelector:c,inlineStylesheet:l,maskAllInputs:x,maskTextFn:p,slimDOM:K,dataURLOptions:g,recordCanvas:k,inlineImages:w,onSerialize:H=>{Ge(H,te)&&oe.addIframe(H),We(H,te)&&$.trackLinkElement(H),Ue(H)&&ve.addShadowRoot(H.shadowRoot,document);},onIframeLoad:(H,ft)=>{oe.attachIframe(H,ft),ve.observeAttachShadow(H);},onStylesheetLoad:(H,ft)=>{$.attachLinkElement(H,ft);},keepIframeSrcFn:z});if(!Ae)return console.warn("Failed to snapshot the document");R(D({type:b.FullSnapshot,data:{node:Ae,initialOffset:{left:window.pageXOffset!==void 0?window.pageXOffset:document?.documentElement.scrollLeft||((_=(U=document?.body)===null||U===void 0?void 0:U.parentElement)===null||_===void 0?void 0:_.scrollLeft)||((M=document?.body)===null||M===void 0?void 0:M.scrollLeft)||0,top:window.pageYOffset!==void 0?window.pageYOffset:document?.documentElement.scrollTop||((A=(j=document?.body)===null||j===void 0?void 0:j.parentElement)===null||A===void 0?void 0:A.scrollTop)||((Z=document?.body)===null||Z===void 0?void 0:Z.scrollTop)||0}}})),de.forEach(H=>H.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&$.adoptStyleSheets(document.adoptedStyleSheets,te.getId(document));};try{let I=[];I.push(G("DOMContentLoaded",()=>{R(D({type:b.DomContentLoaded,data:{}}));}));let U=M=>{var j;return nr({mutationCb:V,mousemoveCb:(A,Z)=>R(D({type:b.IncrementalSnapshot,data:{source:Z,positions:A}})),mouseInteractionCb:A=>R(D({type:b.IncrementalSnapshot,data:Object.assign({source:C.MouseInteraction},A)})),scrollCb:Y,viewportResizeCb:A=>R(D({type:b.IncrementalSnapshot,data:Object.assign({source:C.ViewportResize},A)})),inputCb:A=>R(D({type:b.IncrementalSnapshot,data:Object.assign({source:C.Input},A)})),mediaInteractionCb:A=>R(D({type:b.IncrementalSnapshot,data:Object.assign({source:C.MediaInteraction},A)})),styleSheetRuleCb:A=>R(D({type:b.IncrementalSnapshot,data:Object.assign({source:C.StyleSheetRule},A)})),styleDeclarationCb:A=>R(D({type:b.IncrementalSnapshot,data:Object.assign({source:C.StyleDeclaration},A)})),canvasMutationCb:le,fontCb:A=>R(D({type:b.IncrementalSnapshot,data:Object.assign({source:C.Font},A)})),selectionCb:A=>{R(D({type:b.IncrementalSnapshot,data:Object.assign({source:C.Selection},A)}));},blockClass:o,ignoreClass:a,maskTextClass:s,maskTextSelector:c,maskInputOptions:x,inlineStylesheet:l,sampling:y,recordCanvas:k,inlineImages:w,userTriggeredOnInput:L,collectFonts:B,doc:M,maskInputFn:f,maskTextFn:p,keepIframeSrcFn:z,blockSelector:i,slimDOMOptions:K,dataURLOptions:g,mirror:te,iframeManager:oe,stylesheetManager:$,shadowDomManager:ve,canvasManager:xt,ignoreCSSAttributes:J,plugins:((j=P?.filter(A=>A.observer))===null||j===void 0?void 0:j.map(A=>({observer:A.observer,options:A.options,callback:Z=>R(D({type:b.Plugin,data:{plugin:A.name,payload:Z}}))})))||[]},v)};oe.addLoadListener(M=>{I.push(U(M.contentDocument));});let _=()=>{Je(),I.push(U(document)),Qe=!0;};return document.readyState==="interactive"||document.readyState==="complete"?_():I.push(G("load",()=>{R(D({type:b.Load,data:{}})),_();},window)),()=>{I.forEach(M=>M()),Qe=!1;}}catch(I){console.warn(I);}}ue.addCustomEvent=(t,e)=>{if(!Qe)throw new Error("please add custom event after start recording");R(D({type:b.Custom,data:{tag:t,payload:e}}));};ue.freezePage=()=>{de.forEach(t=>t.freeze());};ue.takeFullSnapshot=t=>{if(!Qe)throw new Error("please take full snapshot after start recording");Je(t);};ue.mirror=te;function dn(){if(!(typeof document>"u"))try{let t=document.createElement("iframe");return t.style.display="none",t.setAttribute("aria-hidden","true"),t.setAttribute("data-ghostplay","mo"),document.documentElement.appendChild(t),t.contentWindow?.MutationObserver}catch{return}}var qe=class{constructor(e,r,n){this.sessionId=e;this.emit=r;this.rrwebConfig=n;this.stopFn=null;}start(){let e=window.MutationObserver,r=dn();r&&(window.MutationObserver=r),this.stopFn=ue({...this.rrwebConfig,emit:n=>{this.emit({type:"rrweb",timestamp:n.timestamp,sessionId:this.sessionId,data:n});}})??null,window.MutationObserver=e;}takeFullSnapshot(){this.stopFn&&ue.takeFullSnapshot();}stop(){this.stopFn&&(this.stopFn(),this.stopFn=null);}};var Xe=class{constructor(e,r){this.sessionId=e;this.emit=r;this.onErrorHandler=null;this.onRejectionHandler=null;this.previousOnError=null;}start(){this.previousOnError=window.onerror,this.onErrorHandler=(e,r,n,o,i)=>{let a={message:String(e),stack:i?.stack,source:r??void 0,lineno:n??void 0,colno:o??void 0,type:"onerror"};return this.emit({type:"error",timestamp:Date.now(),sessionId:this.sessionId,data:a}),this.previousOnError?this.previousOnError.call(window,e,r,n,o,i):false},this.onRejectionHandler=e=>{let r=e.reason,n={message:r instanceof Error?r.message:String(r),stack:r instanceof Error?r.stack:void 0,type:"unhandledrejection"};this.emit({type:"error",timestamp:Date.now(),sessionId:this.sessionId,data:n});},window.onerror=this.onErrorHandler,window.addEventListener("unhandledrejection",this.onRejectionHandler);}stop(){this.previousOnError?window.onerror=this.previousOnError:window.onerror=null,this.onRejectionHandler&&window.removeEventListener("unhandledrejection",this.onRejectionHandler),this.onErrorHandler=null,this.onRejectionHandler=null;}};var un=/ghostplay\.dev/;var $e=class{constructor(e,r){this.sessionId=e;this.emit=r;this.originalFetch=null;this.active=false;}start(){this.active=true,this.patchFetch();}stop(){this.active=false,this.restoreFetch();}patchFetch(){this.originalFetch=globalThis.fetch;let e=this;globalThis.fetch=async function(r,n){let o=typeof r=="string"?r:r instanceof URL?r.toString():r.url,i=n?.method??"GET";if(un.test(o))return e.originalFetch.call(globalThis,r,n);let a=Date.now(),s=pn(n?.headers),c=hn(n?.body);try{let l=await e.originalFetch.call(globalThis,r,n);if(e.active){let d={};l.headers.forEach((f,p)=>{d[p]=f;});let u;try{let f=l.headers.get("content-type")??"";if(f.includes("json")||f.includes("text")){let v=await l.clone().text();u=v.length>1048576?v.substring(0,1048576)+"...[truncated]":v;}}catch{}let h={method:i.toUpperCase(),url:o,status:l.status,statusText:l.statusText,requestHeaders:s,responseHeaders:d,requestBody:c,responseBody:u,startTime:a,endTime:Date.now(),duration:Date.now()-a};e.emit({type:"network",timestamp:a,sessionId:e.sessionId,data:h});}return l}catch(l){if(e.active){let d={method:i.toUpperCase(),url:o,requestHeaders:s,requestBody:c,startTime:a,endTime:Date.now(),duration:Date.now()-a};e.emit({type:"network",timestamp:a,sessionId:e.sessionId,data:d});}throw l}};}restoreFetch(){this.originalFetch&&(globalThis.fetch=this.originalFetch,this.originalFetch=null);}};function pn(t){let e={};if(!t)return e;if(t instanceof Headers)t.forEach((r,n)=>{e[n]=r;});else if(Array.isArray(t))for(let[r,n]of t)e[r]=n;else for(let[r,n]of Object.entries(t))e[r]=n;return e}function hn(t){if(t){if(typeof t=="string")return t.length>1048576?t.substring(0,1048576)+"...[truncated]":t;if(t instanceof URLSearchParams)return t.toString()}}var Ir=["log","warn","error","info","debug"],et=class{constructor(e,r){this.sessionId=e;this.emit=r;this.originals={};}start(){for(let e of Ir)this.originals[e]=console[e].bind(console),console[e]=(...r)=>{let n={level:e,args:r.map(o=>this.serialize(o))};this.emit({type:"console",timestamp:Date.now(),sessionId:this.sessionId,data:n}),this.originals[e]?.(...r);};}stop(){for(let e of Ir)this.originals[e]&&(console[e]=this.originals[e]);this.originals={};}serialize(e){if(e instanceof Error)return {__type:"Error",message:e.message,stack:e.stack};if(typeof e=="object"&&e!==null)try{return JSON.stringify(e),e}catch{return String(e)}return e}};var fn={LCP:[1e3,4e3],FID:[100,300],CLS:[.1,.25],TTFB:[800,1800],INP:[200,500]},tt=class{constructor(e,r){this.sessionId=e;this.emit=r;this.observers=[];}start(){typeof PerformanceObserver>"u"||(this.observeLCP(),this.observeFID(),this.observeCLS(),this.observeTTFB(),this.observeINP());}stop(){this.observers.forEach(e=>e.disconnect()),this.observers=[];}handleMetric(e,r){let[n,o]=fn[e],i=r<=n?"good":r<=o?"needs-improvement":"poor";this.emit({type:"performance",timestamp:Date.now(),sessionId:this.sessionId,data:{metric:e,value:r,rating:i}});}observeLCP(){try{let e=new PerformanceObserver(r=>{let n=r.getEntries(),o=n[n.length-1];o&&this.handleMetric("LCP",o.startTime);});e.observe({type:"largest-contentful-paint",buffered:!0}),this.observers.push(e);}catch{}}observeFID(){try{let e=new PerformanceObserver(r=>{let o=r.getEntries()[0];o&&this.handleMetric("FID",o.processingStart-o.startTime);});e.observe({type:"first-input",buffered:!0}),this.observers.push(e);}catch{}}observeCLS(){let e=0;try{let r=new PerformanceObserver(n=>{for(let o of n.getEntries())o.hadRecentInput||(e+=o.value);this.handleMetric("CLS",e);});r.observe({type:"layout-shift",buffered:!0}),this.observers.push(r);}catch{}}observeTTFB(){try{let e=new PerformanceObserver(r=>{let n=r.getEntries()[0];n&&this.handleMetric("TTFB",n.responseStart);});e.observe({type:"navigation",buffered:!0}),this.observers.push(e);}catch{}}observeINP(){try{let e=new PerformanceObserver(r=>{for(let n of r.getEntries())this.handleMetric("INP",n.duration);});e.observe({type:"event",buffered:!0}),this.observers.push(e);}catch{}}};var rt=class{constructor(e,r){this.sessionId=e;this.emit=r;this.clickHandler=null;this.recentClicks=[];}start(){this.clickHandler=e=>{let r=e.target;if(!r)return;let n=Date.now(),o=this.recentClicks.find(i=>i.element===r);if(o||(o={element:r,timestamps:[]},this.recentClicks.push(o)),o.timestamps.push(n),o.timestamps=o.timestamps.filter(i=>n-i<1e3),o.timestamps.length>=3){let i={selector:this.getSelector(r),clickCount:o.timestamps.length,x:e.clientX,y:e.clientY};this.emit({type:"rage-click",timestamp:n,sessionId:this.sessionId,data:i}),o.timestamps=[];}this.recentClicks=this.recentClicks.filter(i=>i.timestamps.length>0);},document.addEventListener("click",this.clickHandler,true);}stop(){this.clickHandler&&(document.removeEventListener("click",this.clickHandler,true),this.clickHandler=null),this.recentClicks=[];}getSelector(e){if(e.id)return `#${e.id}`;let r=e.getAttribute("data-testid");if(r)return `[data-testid="${r}"]`;let n=e.tagName.toLowerCase(),o=e.className?`.${e.className.split(" ").filter(Boolean).join(".")}`:"";return `${n}${o}`}};var nt=class{constructor(e=50){this.maxSize=e;this.trail=[];}add(e,r,n){let o={category:e,message:r};n&&(o.data=n),this.trail.push(o),this.trail.length>this.maxSize&&(this.trail=this.trail.slice(-this.maxSize));}getTrail(){return [...this.trail]}clear(){this.trail=[];}};var ot=class{constructor(e,r){this.sessionId=e;this.emit=r;this.currentUrl="";this.originalPushState=null;this.originalReplaceState=null;this.popstateHandler=null;this.hashchangeHandler=null;}start(){this.currentUrl=window.location.href,this.emitNavigation(null,this.currentUrl,"initial"),this.originalPushState=history.pushState.bind(history),history.pushState=(...e)=>{this.originalPushState(...e),this.handleUrlChange("pushState");},this.originalReplaceState=history.replaceState.bind(history),history.replaceState=(...e)=>{this.originalReplaceState(...e),this.handleUrlChange("replaceState");},this.popstateHandler=()=>this.handleUrlChange("popstate"),window.addEventListener("popstate",this.popstateHandler),this.hashchangeHandler=()=>this.handleUrlChange("hashchange"),window.addEventListener("hashchange",this.hashchangeHandler);}stop(){this.originalPushState&&(history.pushState=this.originalPushState,this.originalPushState=null),this.originalReplaceState&&(history.replaceState=this.originalReplaceState,this.originalReplaceState=null),this.popstateHandler&&(window.removeEventListener("popstate",this.popstateHandler),this.popstateHandler=null),this.hashchangeHandler&&(window.removeEventListener("hashchange",this.hashchangeHandler),this.hashchangeHandler=null);}handleUrlChange(e){let r=window.location.href;if(r!==this.currentUrl){let n=this.currentUrl;this.currentUrl=r,this.emitNavigation(n,r,e);}}emitNavigation(e,r,n){let o={from:e,to:r,trigger:n};this.emit({type:"navigation",timestamp:Date.now(),sessionId:this.sessionId,data:o});}};var gn=["set-cookie"],it=class{constructor(e){this.options=e;}sanitizeNetworkEvent(e){let r={...e},n=this.options.networkSanitize;return r.responseHeaders&&(r.responseHeaders=this.filterHeaders(r.responseHeaders,gn)),n&&(r.requestHeaders&&n.denyHeaders.length>0&&(r.requestHeaders=this.filterHeaders(r.requestHeaders,n.denyHeaders)),r.responseHeaders&&n.denyHeaders.length>0&&(r.responseHeaders=this.filterHeaders(r.responseHeaders,n.denyHeaders)),n.denyBodyUrls.length>0&&this.urlMatchesDeny(e.url,n.denyBodyUrls)&&(r.requestBody&&(r.requestBody="[REDACTED]"),r.responseBody&&(r.responseBody="[REDACTED]"))),r}filterHeaders(e,r){let n=r.map(i=>i.toLowerCase()),o={};for(let[i,a]of Object.entries(e))n.includes(i.toLowerCase())||(o[i]=a);return o}urlMatchesDeny(e,r){return r.some(n=>new RegExp("^"+n.replace(/\*/g,".*")+"$").test(e))}};var st=class{constructor(e){this.config=e;this.buffer=[];this.bufferBytes=0;this.flushTimer=null;}start(){this.flushTimer=setInterval(()=>{this.flush();},this.config.flushIntervalMs);}stop(){this.flushTimer&&(clearInterval(this.flushTimer),this.flushTimer=null),this.flush();}send(e){let r=JSON.stringify(e).length;this.buffer.push(e),this.bufferBytes+=r,this.bufferBytes>=this.config.flushMaxBytes&&this.flush();}flush(){if(this.buffer.length===0)return;let e=this.buffer;this.buffer=[],this.bufferBytes=0;let r={projectId:this.config.projectId,sessionId:this.config.sessionId,events:e,sentAt:Date.now()},n=JSON.stringify(r),o=`${this.config.apiUrl}/events`,i=n.length<6e4;try{fetch(o,{method:"POST",headers:{"Content-Type":"application/json","x-project-id":this.config.projectId},body:n,keepalive:i}).then(a=>{a.ok||console.warn(`[Ghostplay] Event batch rejected (${a.status})`);}).catch(()=>{this.sendBeacon(o,n);});}catch{this.sendBeacon(o,n);}}sendBeacon(e,r){typeof navigator<"u"&&navigator.sendBeacon&&navigator.sendBeacon(e,new Blob([r],{type:"application/json"}));}};var mn="0.1.0",N=null,re=null,Re=null,at=null,lt=null,ct=null,dt=null,ut=null,pt=null,ht=null,Dt=null,Ne=null;function Ft(){if(!re)throw new Error("[Ghostplay] SDK not initialized. Call Ghostplay.init() first.")}function ie(t){pt&&t.type!=="rrweb"&&pt.add(t.type==="error"?"error":t.type==="network"?"network":t.type==="rage-click"?"click":"custom",`${t.type}: ${JSON.stringify(t.data).substring(0,100)}`),Ne?.send(t);}function vn(t){yr(),N=Bt(t),re=new Oe(N.projectId);let e=re.start();Dt=new it({networkSanitize:N.networkSanitize}),Ne=new st({apiUrl:N.apiUrl,projectId:N.projectId,sessionId:e.id,flushIntervalMs:N.flushIntervalMs,flushMaxBytes:N.flushMaxBytes}),Ne.start(),pt=new nt,Re=new qe(e.id,ie,{maskAllInputs:N.maskAllInputs,...N.maskInputSelector?{maskInputSelector:N.maskInputSelector}:{},...N.blockSelector?{blockSelector:N.blockSelector}:{},...N.ignoreSelector?{ignoreSelector:N.ignoreSelector}:{},...N.rrwebConfig});let r=()=>{Re?.start(),setTimeout(()=>Re?.takeFullSnapshot(),3e3);};document.readyState==="complete"?requestAnimationFrame(()=>requestAnimationFrame(r)):window.addEventListener("load",()=>requestAnimationFrame(r),{once:true}),at=new Xe(e.id,ie),at.start(),N.recordNetwork&&(lt=new $e(e.id,n=>{let o=Dt.sanitizeNetworkEvent(n.data);ie({...n,data:o});}),lt.start()),N.recordConsole&&(ct=new et(e.id,ie),ct.start()),N.trackPerformance&&(dt=new tt(e.id,ie),dt.start()),N.trackRageClicks&&(ut=new rt(e.id,ie),ut.start()),N.trackNavigation&&(ht=new ot(e.id,ie),ht.start());}function In(t,e){Ft(),re.identify(t,e),ie({type:"identify",timestamp:Date.now(),sessionId:re.current().id,data:{userId:t,traits:e}});}function yn(t){Ft(),re.addTag(t),ie({type:"tag",timestamp:Date.now(),sessionId:re.current().id,data:{tag:t}});}function Cn(t){Ft(),re.setMetadata(t),ie({type:"metadata",timestamp:Date.now(),sessionId:re.current().id,data:t});}function yr(){Re?.stop(),at?.stop(),lt?.stop(),ct?.stop(),dt?.stop(),ut?.stop(),ht?.stop(),Ne?.stop(),re?.end(),Re=null,at=null,lt=null,ct=null,dt=null,ut=null,ht=null,Ne=null,re=null,pt=null,Dt=null,N=null;}var Sn={VERSION:mn,init:vn,identify:In,tag:yn,setMetadata:Cn,stop:yr},hi=Sn;/*! Bundled license information:
59
+ or you can use record.mirror to access the mirror instance during recording.`,cn={map:{},getId(){return console.error(Re),-1},getNode(){return console.error(Re),null},removeNodeFromMap(){console.error(Re);},has(){return console.error(Re),false},reset(){console.error(Re);}};typeof window<"u"&&window.Proxy&&window.Reflect&&(cn=new Proxy(cn,{get(s,e,t){return e==="map"&&console.error(Re),Reflect.get(s,e,t)}}));function nt(s,e,t={}){let r=null,i=0;return function(...n){let o=Date.now();!i&&t.leading===false&&(i=o);let l=e-(o-i),a=this;l<=0||l>e?(r&&(clearTimeout(r),r=null),i=o,s.apply(a,n)):!r&&t.trailing!==false&&(r=setTimeout(()=>{i=t.leading===false?0:Date.now(),r=null,s.apply(a,n);},l));}}function vr(s,e,t,r,i=window){let n=i.Object.getOwnPropertyDescriptor(s,e);return i.Object.defineProperty(s,e,r?t:{set(o){setTimeout(()=>{t.set.call(this,o);},0),n&&n.set&&n.set.call(this,o);}}),()=>vr(s,e,n||{},true)}var ir=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(ir=()=>new Date().getTime());function qo(s){var e,t,r,i;let n=s.document;return {left:n.scrollingElement?n.scrollingElement.scrollLeft:s.pageXOffset!==void 0?s.pageXOffset:n.documentElement.scrollLeft||n?.body&&((e=C.parentElement(n.body))==null?void 0:e.scrollLeft)||((t=n?.body)==null?void 0:t.scrollLeft)||0,top:n.scrollingElement?n.scrollingElement.scrollTop:s.pageYOffset!==void 0?s.pageYOffset:n?.documentElement.scrollTop||n?.body&&((r=C.parentElement(n.body))==null?void 0:r.scrollTop)||((i=n?.body)==null?void 0:i.scrollTop)||0}}function Qo(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function ea(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function ta(s){return s?s.nodeType===s.ELEMENT_NODE?s:C.parentElement(s):null}function J(s,e,t,r){if(!s)return false;let i=ta(s);if(!i)return false;try{if(typeof e=="string"){if(i.classList.contains(e)||r&&i.closest("."+e)!==null)return !0}else if(Xt(i,e,r))return !0}catch{}return !!(t&&(i.matches(t)||r&&i.closest(t)!==null))}function pf(s,e){return e.getId(s)!==-1}function Kr(s,e,t){return s.tagName==="TITLE"&&t.headTitleMutations?true:e.getId(s)===Je}function ra(s,e){if(Ye(s))return false;let t=e.getId(s);if(!e.has(t))return true;let r=C.parentNode(s);return r&&r.nodeType===s.DOCUMENT_NODE?false:r?ra(r,e):true}function Ds(s){return !!s.changedTouches}function mf(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 sa(s,e){return !!(s.nodeName==="IFRAME"&&e.getMeta(s))}function ia(s,e){return !!(s.nodeName==="LINK"&&s.nodeType===s.ELEMENT_NODE&&s.getAttribute&&s.getAttribute("rel")==="stylesheet"&&e.getMeta(s))}function Ts(s){return s?s instanceof Os&&"shadowRoot"in s?!!s.shadowRoot:!!C.shadowRoot(s):false}var ks=class{constructor(){v(this,"id",1),v(this,"styleIDMap",new WeakMap),v(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 na(s){var e;let t=null;return "getRootNode"in s&&((e=C.getRootNode(s))==null?void 0:e.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&C.host(C.getRootNode(s))&&(t=C.host(C.getRootNode(s))),t}function gf(s){let e=s,t;for(;t=na(e);)e=t;return e}function yf(s){let e=C.ownerDocument(s);if(!e)return false;let t=gf(s);return C.contains(e,t)}function oa(s){let e=C.ownerDocument(s);return e?C.contains(e,s)||yf(s):false}var x=(s=>(s[s.DomContentLoaded=0]="DomContentLoaded",s[s.Load=1]="Load",s[s.FullSnapshot=2]="FullSnapshot",s[s.IncrementalSnapshot=3]="IncrementalSnapshot",s[s.Meta=4]="Meta",s[s.Custom=5]="Custom",s[s.Plugin=6]="Plugin",s))(x||{}),E=(s=>(s[s.Mutation=0]="Mutation",s[s.MouseMove=1]="MouseMove",s[s.MouseInteraction=2]="MouseInteraction",s[s.Scroll=3]="Scroll",s[s.ViewportResize=4]="ViewportResize",s[s.Input=5]="Input",s[s.TouchMove=6]="TouchMove",s[s.MediaInteraction=7]="MediaInteraction",s[s.StyleSheetRule=8]="StyleSheetRule",s[s.CanvasMutation=9]="CanvasMutation",s[s.Font=10]="Font",s[s.Log=11]="Log",s[s.Drag=12]="Drag",s[s.StyleDeclaration=13]="StyleDeclaration",s[s.Selection=14]="Selection",s[s.AdoptedStyleSheet=15]="AdoptedStyleSheet",s[s.CustomElement=16]="CustomElement",s))(E||{}),K=(s=>(s[s.MouseUp=0]="MouseUp",s[s.MouseDown=1]="MouseDown",s[s.Click=2]="Click",s[s.ContextMenu=3]="ContextMenu",s[s.DblClick=4]="DblClick",s[s.Focus=5]="Focus",s[s.Blur=6]="Blur",s[s.TouchStart=7]="TouchStart",s[s.TouchMove_Departed=8]="TouchMove_Departed",s[s.TouchEnd=9]="TouchEnd",s[s.TouchCancel=10]="TouchCancel",s))(K||{}),de=(s=>(s[s.Mouse=0]="Mouse",s[s.Pen=1]="Pen",s[s.Touch=2]="Touch",s))(de||{}),Be=(s=>(s[s["2D"]=0]="2D",s[s.WebGL=1]="WebGL",s[s.WebGL2=2]="WebGL2",s))(Be||{}),Ae=(s=>(s[s.Play=0]="Play",s[s.Pause=1]="Pause",s[s.Seeked=2]="Seeked",s[s.VolumeChange=3]="VolumeChange",s[s.RateChange=4]="RateChange",s))(Ae||{});var aa=(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))(aa||{});function un(s){return "__ln"in s}var _s=class{constructor(){v(this,"length",0),v(this,"head",null),v(this,"tail",null);}get(e){if(e>=this.length)throw new Error("Position outside of list range");let t=this.head;for(let r=0;r<e;r++)t=t?.next||null;return t}addNode(e){let t={value:e,previous:null,next:null};if(e.__ln=t,e.previousSibling&&un(e.previousSibling)){let r=e.previousSibling.__ln.next;t.next=r,t.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=t,r&&(r.previous=t);}else if(e.nextSibling&&un(e.nextSibling)&&e.nextSibling.__ln.previous){let r=e.nextSibling.__ln.previous;t.previous=r,t.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=t,r&&(r.next=t);}else this.head&&(this.head.previous=t),t.next=this.head,this.head=t;t.next===null&&(this.tail=t),this.length++;}removeNode(e){let t=e.__ln;this.head&&(t.previous?(t.previous.next=t.next,t.next?t.next.previous=t.previous:this.tail=t.previous):(this.head=t.next,this.head?this.head.previous=null:this.tail=null),e.__ln&&delete e.__ln,this.length--);}},hn=(s,e)=>`${s}@${e}`,Ps=class{constructor(){v(this,"frozen",false),v(this,"locked",false),v(this,"texts",[]),v(this,"attributes",[]),v(this,"attributeMap",new WeakMap),v(this,"removes",[]),v(this,"mapRemoves",[]),v(this,"movedMap",{}),v(this,"addedSet",new Set),v(this,"movedSet",new Set),v(this,"droppedSet",new Set),v(this,"removesSubTreeCache",new Set),v(this,"mutationCb"),v(this,"blockClass"),v(this,"blockSelector"),v(this,"maskTextClass"),v(this,"maskTextSelector"),v(this,"inlineStylesheet"),v(this,"maskInputOptions"),v(this,"maskTextFn"),v(this,"maskInputFn"),v(this,"keepIframeSrcFn"),v(this,"recordCanvas"),v(this,"inlineImages"),v(this,"slimDOMOptions"),v(this,"dataURLOptions"),v(this,"doc"),v(this,"mirror"),v(this,"iframeManager"),v(this,"stylesheetManager"),v(this,"shadowDomManager"),v(this,"canvasManager"),v(this,"processedNodeManager"),v(this,"unattachedDoc"),v(this,"processMutations",e=>{e.forEach(this.processMutation),this.emit();}),v(this,"emit",()=>{if(this.frozen||this.locked)return;let e=[],t=new Set,r=new _s,i=a=>{let c=a,u=Je;for(;u===Je;)c=c&&c.nextSibling,u=c&&this.mirror.getId(c);return u},n=a=>{let c=C.parentNode(a);if(!c||!oa(a))return;let u=false;if(a.nodeType===Node.TEXT_NODE){let m=c.tagName;if(m==="TEXTAREA")return;m==="STYLE"&&this.addedSet.has(c)&&(u=true);}let h=Ye(c)?this.mirror.getId(na(a)):this.mirror.getId(c),p=i(a);if(h===-1||p===-1)return r.addNode(a);let g=De(a,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskTextClass:this.maskTextClass,maskTextSelector:this.maskTextSelector,skipChild:true,newlyAddedElement:true,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:m=>{sa(m,this.mirror)&&this.iframeManager.addIframe(m),ia(m,this.mirror)&&this.stylesheetManager.trackLinkElement(m),Ts(a)&&this.shadowDomManager.addShadowRoot(C.shadowRoot(a),this.doc);},onIframeLoad:(m,d)=>{this.iframeManager.attachIframe(m,d),this.shadowDomManager.observeAttachShadow(m);},onStylesheetLoad:(m,d)=>{this.stylesheetManager.attachLinkElement(m,d);},cssCaptured:u});g&&(e.push({parentId:h,nextId:p,node:g}),t.add(g.id));};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(let a of this.movedSet)fn(this.removesSubTreeCache,a,this.mirror)&&!this.movedSet.has(C.parentNode(a))||n(a);for(let a of this.addedSet)!dn(this.droppedSet,a)&&!fn(this.removesSubTreeCache,a,this.mirror)||dn(this.movedSet,a)?n(a):this.droppedSet.add(a);let o=null;for(;r.length;){let a=null;if(o){let c=this.mirror.getId(C.parentNode(o.value)),u=i(o.value);c!==-1&&u!==-1&&(a=o);}if(!a){let c=r.tail;for(;c;){let u=c;if(c=c.previous,u){let h=this.mirror.getId(C.parentNode(u.value));if(i(u.value)===-1)continue;if(h!==-1){a=u;break}else {let g=u.value,m=C.parentNode(g);if(m&&m.nodeType===Node.DOCUMENT_FRAGMENT_NODE){let d=C.host(m);if(this.mirror.getId(d)!==-1){a=u;break}}}}}}if(!a){for(;r.head;)r.removeNode(r.head.value);break}o=a.previous,r.removeNode(a.value),n(a.value);}let l={texts:this.texts.map(a=>{let c=a.node,u=C.parentNode(c);return u&&u.tagName==="TEXTAREA"&&this.genTextAreaValueMutation(u),{id:this.mirror.getId(c),value:a.value}}).filter(a=>!t.has(a.id)).filter(a=>this.mirror.has(a.id)),attributes:this.attributes.map(a=>{let{attributes:c}=a;if(typeof c.style=="string"){let u=JSON.stringify(a.styleDiff),h=JSON.stringify(a._unchangedStyles);u.length<c.style.length&&(u+h).split("var(").length===c.style.split("var(").length&&(c.style=a.styleDiff);}return {id:this.mirror.getId(a.node),attributes:c}}).filter(a=>!t.has(a.id)).filter(a=>this.mirror.has(a.id)),removes:this.removes,adds:e};!l.texts.length&&!l.attributes.length&&!l.removes.length&&!l.adds.length||(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.removesSubTreeCache=new Set,this.movedMap={},this.mutationCb(l));}),v(this,"genTextAreaValueMutation",e=>{let t=this.attributeMap.get(e);t||(t={node:e,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(t),this.attributeMap.set(e,t));let r=Array.from(C.childNodes(e),i=>C.textContent(i)||"").join("");t.attributes.value=jt({element:e,maskInputOptions:this.maskInputOptions,tagName:e.tagName,type:Yt(e),value:r,maskInputFn:this.maskInputFn});}),v(this,"processMutation",e=>{if(!Kr(e.target,this.mirror,this.slimDOMOptions))switch(e.type){case "characterData":{let t=C.textContent(e.target);!J(e.target,this.blockClass,this.blockSelector,false)&&t!==e.oldValue&&this.texts.push({value:Mn(e.target,this.maskTextClass,this.maskTextSelector,true)&&t?this.maskTextFn?this.maskTextFn(t,ta(e.target)):t.replace(/[\S]/g,"*"):t,node:e.target});break}case "attributes":{let t=e.target,r=e.attributeName,i=e.target.getAttribute(r);if(r==="value"){let o=Yt(t);i=jt({element:t,maskInputOptions:this.maskInputOptions,tagName:t.tagName,type:o,value:i,maskInputFn:this.maskInputFn});}if(J(e.target,this.blockClass,this.blockSelector,false)||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"),!Nn(t.tagName,r))if(n.attributes[r]=xn(this.doc,Ee(t.tagName),Ee(r),i),r==="style"){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument();}catch{this.unattachedDoc=this.doc;}let o=this.unattachedDoc.createElement("span");e.oldValue&&o.setAttribute("style",e.oldValue);for(let l of Array.from(t.style)){let a=t.style.getPropertyValue(l),c=t.style.getPropertyPriority(l);a!==o.style.getPropertyValue(l)||c!==o.style.getPropertyPriority(l)?c===""?n.styleDiff[l]=a:n.styleDiff[l]=[a,c]:n._unchangedStyles[l]=[a,c];}for(let l of Array.from(o.style))t.style.getPropertyValue(l)===""&&(n.styleDiff[l]=false);}else r==="open"&&t.tagName==="DIALOG"&&(t.matches("dialog:modal")?n.attributes.rr_open_mode="modal":n.attributes.rr_open_mode="non-modal");break}case "childList":{if(J(e.target,this.blockClass,this.blockSelector,true))return;if(e.target.tagName==="TEXTAREA"){this.genTextAreaValueMutation(e.target);return}e.addedNodes.forEach(t=>this.genAdds(t,e.target)),e.removedNodes.forEach(t=>{let r=this.mirror.getId(t),i=Ye(e.target)?this.mirror.getId(C.host(e.target)):this.mirror.getId(e.target);J(e.target,this.blockClass,this.blockSelector,false)||Kr(t,this.mirror,this.slimDOMOptions)||!pf(t,this.mirror)||(this.addedSet.has(t)?(Ls(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&r===-1||ra(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[hn(r,i)]?Ls(this.movedSet,t):(this.removes.push({parentId:i,id:r,isShadow:Ye(e.target)&&Ze(e.target)?true:void 0}),vf(t,this.removesSubTreeCache))),this.mapRemoves.push(t));});break}}}),v(this,"genAdds",(e,t)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!(this.addedSet.has(e)||this.movedSet.has(e))){if(this.mirror.hasNode(e)){if(Kr(e,this.mirror,this.slimDOMOptions))return;this.movedSet.add(e);let r=null;t&&this.mirror.hasNode(t)&&(r=this.mirror.getId(t)),r&&r!==-1&&(this.movedMap[hn(this.mirror.getId(e),r)]=true);}else this.addedSet.add(e),this.droppedSet.delete(e);J(e,this.blockClass,this.blockSelector,false)||(C.childNodes(e).forEach(r=>this.genAdds(r)),Ts(e)&&C.childNodes(C.shadowRoot(e)).forEach(r=>{this.processedNodeManager.add(r,this),this.genAdds(r,e);}));}});}init(e){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(t=>{this[t]=e[t];});}freeze(){this.frozen=true,this.canvasManager.freeze();}unfreeze(){this.frozen=false,this.canvasManager.unfreeze(),this.emit();}isFrozen(){return this.frozen}lock(){this.locked=true,this.canvasManager.lock();}unlock(){this.locked=false,this.canvasManager.unlock(),this.emit();}reset(){this.shadowDomManager.reset(),this.canvasManager.reset();}};function Ls(s,e){s.delete(e),C.childNodes(e).forEach(t=>Ls(s,t));}function vf(s,e){let t=[s];for(;t.length;){let r=t.pop();e.has(r)||(e.add(r),C.childNodes(r).forEach(i=>t.push(i)));}}function fn(s,e,t){return s.size===0?false:wf(s,e)}function wf(s,e,t){let r=C.parentNode(e);return r?s.has(r):false}function dn(s,e){return s.size===0?false:la(s,e)}function la(s,e){let t=C.parentNode(e);return t?s.has(t)?true:la(s,t):false}var Xe;function bf(s){Xe=s;}function Sf(){Xe=void 0;}var I=s=>Xe?(...t)=>{try{return s(...t)}catch(r){if(Xe&&Xe(r)===true)return;throw r}}:s,Ce=[];function ut(s){try{if("composedPath"in s){let e=s.composedPath();if(e.length)return e[0]}else if("path"in s&&s.path.length)return s.path[0]}catch{}return s&&s.target}function ca(s,e){let t=new Ps;Ce.push(t),t.init(s);let r=new(Ko())(I(t.processMutations.bind(t)));return r.observe(e,{attributes:true,attributeOldValue:true,characterData:true,characterDataOldValue:true,childList:true,subtree:true}),r}function Cf({mousemoveCb:s,sampling:e,doc:t,mirror:r}){if(e.mousemove===false)return ()=>{};let i=typeof e.mousemove=="number"?e.mousemove:50,n=typeof e.mousemoveCallback=="number"?e.mousemoveCallback:500,o=[],l,a=nt(I(h=>{let p=Date.now()-l;s(o.map(g=>(g.timeOffset-=p,g)),h),o=[],l=null;}),n),c=I(nt(I(h=>{let p=ut(h),{clientX:g,clientY:m}=Ds(h)?h.changedTouches[0]:h;l||(l=ir()),o.push({x:g,y:m,id:r.getId(p),timeOffset:ir()-l}),a(typeof DragEvent<"u"&&h instanceof DragEvent?E.Drag:h instanceof MouseEvent?E.MouseMove:E.TouchMove);}),i,{trailing:!1})),u=[X("mousemove",c,t),X("touchmove",c,t),X("drag",c,t)];return I(()=>{u.forEach(h=>h());})}function Ef({mouseInteractionCb:s,doc:e,mirror:t,blockClass:r,blockSelector:i,sampling:n}){if(n.mouseInteraction===false)return ()=>{};let o=n.mouseInteraction===true||n.mouseInteraction===void 0?{}:n.mouseInteraction,l=[],a=null,c=u=>h=>{let p=ut(h);if(J(p,r,i,true))return;let g=null,m=u;if("pointerType"in h){switch(h.pointerType){case "mouse":g=de.Mouse;break;case "touch":g=de.Touch;break;case "pen":g=de.Pen;break}g===de.Touch?K[u]===K.MouseDown?m="TouchStart":K[u]===K.MouseUp&&(m="TouchEnd"):de.Pen;}else Ds(h)&&(g=de.Touch);g!==null?(a=g,(m.startsWith("Touch")&&g===de.Touch||m.startsWith("Mouse")&&g===de.Mouse)&&(g=null)):K[u]===K.Click&&(g=a,a=null);let d=Ds(h)?h.changedTouches[0]:h;if(!d)return;let f=t.getId(p),{clientX:w,clientY:b}=d;I(s)({type:K[m],id:f,x:w,y:b,...g!==null&&{pointerType:g}});};return Object.keys(K).filter(u=>Number.isNaN(Number(u))&&!u.endsWith("_Departed")&&o[u]!==false).forEach(u=>{let h=Ee(u),p=c(u);if(window.PointerEvent)switch(K[u]){case K.MouseDown:case K.MouseUp:h=h.replace("mouse","pointer");break;case K.TouchStart:case K.TouchEnd:return}l.push(X(h,p,e));}),I(()=>{l.forEach(u=>u());})}function ua({scrollCb:s,doc:e,mirror:t,blockClass:r,blockSelector:i,sampling:n}){let o=I(nt(I(l=>{let a=ut(l);if(!a||J(a,r,i,!0))return;let c=t.getId(a);if(a===e&&e.defaultView){let u=qo(e.defaultView);s({id:c,x:u.left,y:u.top});}else s({id:c,x:a.scrollLeft,y:a.scrollTop});}),n.scroll||100));return X("scroll",o,e)}function If({viewportResizeCb:s},{win:e}){let t=-1,r=-1,i=I(nt(I(()=>{let n=Qo(),o=ea();(t!==n||r!==o)&&(s({width:Number(o),height:Number(n)}),t=n,r=o);}),200));return X("resize",i,e)}var xf=["INPUT","TEXTAREA","SELECT"],pn=new WeakMap;function Nf({inputCb:s,doc:e,mirror:t,blockClass:r,blockSelector:i,ignoreClass:n,ignoreSelector:o,maskInputOptions:l,maskInputFn:a,sampling:c,userTriggeredOnInput:u}){function h(b){let y=ut(b),S=b.isTrusted,O=y&&y.tagName;if(y&&O==="OPTION"&&(y=C.parentElement(y)),!y||!O||xf.indexOf(O)<0||J(y,r,i,true)||y.classList.contains(n)||o&&y.matches(o))return;let T=y.value,V=false,L=Yt(y)||"";L==="radio"||L==="checkbox"?V=y.checked:(l[O.toLowerCase()]||l[L])&&(T=jt({element:y,maskInputOptions:l,tagName:O,type:L,value:T,maskInputFn:a})),p(y,u?{text:T,isChecked:V,userTriggered:S}:{text:T,isChecked:V});let z=y.name;L==="radio"&&z&&V&&e.querySelectorAll(`input[type="radio"][name="${z}"]`).forEach(Y=>{if(Y!==y){let Q=Y.value;p(Y,u?{text:Q,isChecked:!V,userTriggered:false}:{text:Q,isChecked:!V});}});}function p(b,y){let S=pn.get(b);if(!S||S.text!==y.text||S.isChecked!==y.isChecked){pn.set(b,y);let O=t.getId(b);I(s)({...y,id:O});}}let m=(c.input==="last"?["change"]:["input","change"]).map(b=>X(b,I(h),e)),d=e.defaultView;if(!d)return ()=>{m.forEach(b=>b());};let f=d.Object.getOwnPropertyDescriptor(d.HTMLInputElement.prototype,"value"),w=[[d.HTMLInputElement.prototype,"value"],[d.HTMLInputElement.prototype,"checked"],[d.HTMLSelectElement.prototype,"value"],[d.HTMLTextAreaElement.prototype,"value"],[d.HTMLSelectElement.prototype,"selectedIndex"],[d.HTMLOptionElement.prototype,"selected"]];return f&&f.set&&m.push(...w.map(b=>vr(b[0],b[1],{set(){I(h)({target:this,isTrusted:false});}},false,d))),I(()=>{m.forEach(b=>b());})}function nr(s){let e=[];function t(r,i){if($t("CSSGroupingRule")&&r.parentRule instanceof CSSGroupingRule||$t("CSSMediaRule")&&r.parentRule instanceof CSSMediaRule||$t("CSSSupportsRule")&&r.parentRule instanceof CSSSupportsRule||$t("CSSConditionRule")&&r.parentRule instanceof CSSConditionRule){let o=Array.from(r.parentRule.cssRules).indexOf(r);i.unshift(o);}else if(r.parentStyleSheet){let o=Array.from(r.parentStyleSheet.cssRules).indexOf(r);i.unshift(o);}return i}return t(s,e)}function ve(s,e,t){let r,i;return s?(s.ownerNode?r=e.getId(s.ownerNode):i=t.getId(s),{styleId:i,id:r}):{}}function Mf({styleSheetRuleCb:s,mirror:e,stylesheetManager:t},{win:r}){if(!r.CSSStyleSheet||!r.CSSStyleSheet.prototype)return ()=>{};let i=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=new Proxy(i,{apply:I((u,h,p)=>{let[g,m]=p,{id:d,styleId:f}=ve(h,e,t.styleMirror);return (d&&d!==-1||f&&f!==-1)&&s({id:d,styleId:f,adds:[{rule:g,index:m}]}),u.apply(h,p)})}),r.CSSStyleSheet.prototype.addRule=function(u,h,p=this.cssRules.length){let g=`${u} { ${h} }`;return r.CSSStyleSheet.prototype.insertRule.apply(this,[g,p])};let n=r.CSSStyleSheet.prototype.deleteRule;r.CSSStyleSheet.prototype.deleteRule=new Proxy(n,{apply:I((u,h,p)=>{let[g]=p,{id:m,styleId:d}=ve(h,e,t.styleMirror);return (m&&m!==-1||d&&d!==-1)&&s({id:m,styleId:d,removes:[{index:g}]}),u.apply(h,p)})}),r.CSSStyleSheet.prototype.removeRule=function(u){return r.CSSStyleSheet.prototype.deleteRule.apply(this,[u])};let o;r.CSSStyleSheet.prototype.replace&&(o=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(o,{apply:I((u,h,p)=>{let[g]=p,{id:m,styleId:d}=ve(h,e,t.styleMirror);return (m&&m!==-1||d&&d!==-1)&&s({id:m,styleId:d,replace:g}),u.apply(h,p)})}));let l;r.CSSStyleSheet.prototype.replaceSync&&(l=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(l,{apply:I((u,h,p)=>{let[g]=p,{id:m,styleId:d}=ve(h,e,t.styleMirror);return (m&&m!==-1||d&&d!==-1)&&s({id:m,styleId:d,replaceSync:g}),u.apply(h,p)})}));let a={};Ft("CSSGroupingRule")?a.CSSGroupingRule=r.CSSGroupingRule:(Ft("CSSMediaRule")&&(a.CSSMediaRule=r.CSSMediaRule),Ft("CSSConditionRule")&&(a.CSSConditionRule=r.CSSConditionRule),Ft("CSSSupportsRule")&&(a.CSSSupportsRule=r.CSSSupportsRule));let c={};return Object.entries(a).forEach(([u,h])=>{c[u]={insertRule:h.prototype.insertRule,deleteRule:h.prototype.deleteRule},h.prototype.insertRule=new Proxy(c[u].insertRule,{apply:I((p,g,m)=>{let[d,f]=m,{id:w,styleId:b}=ve(g.parentStyleSheet,e,t.styleMirror);return (w&&w!==-1||b&&b!==-1)&&s({id:w,styleId:b,adds:[{rule:d,index:[...nr(g),f||0]}]}),p.apply(g,m)})}),h.prototype.deleteRule=new Proxy(c[u].deleteRule,{apply:I((p,g,m)=>{let[d]=m,{id:f,styleId:w}=ve(g.parentStyleSheet,e,t.styleMirror);return (f&&f!==-1||w&&w!==-1)&&s({id:f,styleId:w,removes:[{index:[...nr(g),d]}]}),p.apply(g,m)})});}),I(()=>{r.CSSStyleSheet.prototype.insertRule=i,r.CSSStyleSheet.prototype.deleteRule=n,o&&(r.CSSStyleSheet.prototype.replace=o),l&&(r.CSSStyleSheet.prototype.replaceSync=l),Object.entries(a).forEach(([u,h])=>{h.prototype.insertRule=c[u].insertRule,h.prototype.deleteRule=c[u].deleteRule;});})}function ha({mirror:s,stylesheetManager:e},t){var r,i,n;let o=null;t.nodeName==="#document"?o=s.getId(t):o=s.getId(C.host(t));let l=t.nodeName==="#document"?(r=t.defaultView)==null?void 0:r.Document:(n=(i=t.ownerDocument)==null?void 0:i.defaultView)==null?void 0:n.ShadowRoot,a=l?.prototype?Object.getOwnPropertyDescriptor(l?.prototype,"adoptedStyleSheets"):void 0;return o===null||o===-1||!l||!a?()=>{}:(Object.defineProperty(t,"adoptedStyleSheets",{configurable:a.configurable,enumerable:a.enumerable,get(){var c;return (c=a.get)==null?void 0:c.call(this)},set(c){var u;let h=(u=a.set)==null?void 0:u.call(this,c);if(o!==null&&o!==-1)try{e.adoptStyleSheets(c,o);}catch{}return h}}),I(()=>{Object.defineProperty(t,"adoptedStyleSheets",{configurable:a.configurable,enumerable:a.enumerable,get:a.get,set:a.set});}))}function Rf({styleDeclarationCb:s,mirror:e,ignoreCSSAttributes:t,stylesheetManager:r},{win:i}){let n=i.CSSStyleDeclaration.prototype.setProperty;i.CSSStyleDeclaration.prototype.setProperty=new Proxy(n,{apply:I((l,a,c)=>{var u;let[h,p,g]=c;if(t.has(h))return n.apply(a,[h,p,g]);let{id:m,styleId:d}=ve((u=a.parentRule)==null?void 0:u.parentStyleSheet,e,r.styleMirror);return (m&&m!==-1||d&&d!==-1)&&s({id:m,styleId:d,set:{property:h,value:p,priority:g},index:nr(a.parentRule)}),l.apply(a,c)})});let o=i.CSSStyleDeclaration.prototype.removeProperty;return i.CSSStyleDeclaration.prototype.removeProperty=new Proxy(o,{apply:I((l,a,c)=>{var u;let[h]=c;if(t.has(h))return o.apply(a,[h]);let{id:p,styleId:g}=ve((u=a.parentRule)==null?void 0:u.parentStyleSheet,e,r.styleMirror);return (p&&p!==-1||g&&g!==-1)&&s({id:p,styleId:g,remove:{property:h},index:nr(a.parentRule)}),l.apply(a,c)})}),I(()=>{i.CSSStyleDeclaration.prototype.setProperty=n,i.CSSStyleDeclaration.prototype.removeProperty=o;})}function Af({mediaInteractionCb:s,blockClass:e,blockSelector:t,mirror:r,sampling:i,doc:n}){let o=I(a=>nt(I(c=>{let u=ut(c);if(!u||J(u,e,t,!0))return;let{currentTime:h,volume:p,muted:g,playbackRate:m,loop:d}=u;s({type:a,id:r.getId(u),currentTime:h,volume:p,muted:g,playbackRate:m,loop:d});}),i.media||500)),l=[X("play",o(Ae.Play),n),X("pause",o(Ae.Pause),n),X("seeked",o(Ae.Seeked),n),X("volumechange",o(Ae.VolumeChange),n),X("ratechange",o(Ae.RateChange),n)];return I(()=>{l.forEach(a=>a());})}function Of({fontCb:s,doc:e}){let t=e.defaultView;if(!t)return ()=>{};let r=[],i=new WeakMap,n=t.FontFace;t.FontFace=function(a,c,u){let h=new n(a,c,u);return i.set(h,{family:a,buffer:typeof c!="string",descriptors:u,fontSource:typeof c=="string"?c:JSON.stringify(Array.from(new Uint8Array(c)))}),h};let o=Ne(e.fonts,"add",function(l){return function(a){return setTimeout(I(()=>{let c=i.get(a);c&&(s(c),i.delete(a));}),0),l.apply(this,[a])}});return r.push(()=>{t.FontFace=n;}),r.push(o),I(()=>{r.forEach(l=>l());})}function Df(s){let{doc:e,mirror:t,blockClass:r,blockSelector:i,selectionCb:n}=s,o=true,l=I(()=>{let a=e.getSelection();if(!a||o&&a?.isCollapsed)return;o=a.isCollapsed||!1;let c=[],u=a.rangeCount||0;for(let h=0;h<u;h++){let p=a.getRangeAt(h),{startContainer:g,startOffset:m,endContainer:d,endOffset:f}=p;J(g,r,i,!0)||J(d,r,i,!0)||c.push({start:t.getId(g),startOffset:m,end:t.getId(d),endOffset:f});}n({ranges:c});});return l(),X("selectionchange",l)}function Tf({doc:s,customElementCb:e}){let t=s.defaultView;return !t||!t.customElements?()=>{}:Ne(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 kf(s,e){let{mutationCb:t,mousemoveCb:r,mouseInteractionCb:i,scrollCb:n,viewportResizeCb:o,inputCb:l,mediaInteractionCb:a,styleSheetRuleCb:c,styleDeclarationCb:u,canvasMutationCb:h,fontCb:p,selectionCb:g,customElementCb:m}=s;s.mutationCb=(...d)=>{e.mutation&&e.mutation(...d),t(...d);},s.mousemoveCb=(...d)=>{e.mousemove&&e.mousemove(...d),r(...d);},s.mouseInteractionCb=(...d)=>{e.mouseInteraction&&e.mouseInteraction(...d),i(...d);},s.scrollCb=(...d)=>{e.scroll&&e.scroll(...d),n(...d);},s.viewportResizeCb=(...d)=>{e.viewportResize&&e.viewportResize(...d),o(...d);},s.inputCb=(...d)=>{e.input&&e.input(...d),l(...d);},s.mediaInteractionCb=(...d)=>{e.mediaInteaction&&e.mediaInteaction(...d),a(...d);},s.styleSheetRuleCb=(...d)=>{e.styleSheetRule&&e.styleSheetRule(...d),c(...d);},s.styleDeclarationCb=(...d)=>{e.styleDeclaration&&e.styleDeclaration(...d),u(...d);},s.canvasMutationCb=(...d)=>{e.canvasMutation&&e.canvasMutation(...d),h(...d);},s.fontCb=(...d)=>{e.font&&e.font(...d),p(...d);},s.selectionCb=(...d)=>{e.selection&&e.selection(...d),g(...d);},s.customElementCb=(...d)=>{e.customElement&&e.customElement(...d),m(...d);};}function _f(s,e={}){let t=s.doc.defaultView;if(!t)return ()=>{};kf(s,e);let r;s.recordDOM&&(r=ca(s,s.doc));let i=Cf(s),n=Ef(s),o=ua(s),l=If(s,{win:t}),a=Nf(s),c=Af(s),u=()=>{},h=()=>{},p=()=>{},g=()=>{};s.recordDOM&&(u=Mf(s,{win:t}),h=ha(s,s.doc),p=Rf(s,{win:t}),s.collectFonts&&(g=Of(s)));let m=Df(s),d=Tf(s),f=[];for(let w of s.plugins)f.push(w.observer(w.callback,t,w.options));return I(()=>{Ce.forEach(w=>w.reset()),r?.disconnect(),i(),n(),o(),l(),a(),c(),u(),h(),p(),g(),m(),d(),f.forEach(w=>w());})}function $t(s){return typeof window[s]<"u"}function Ft(s){return !!(typeof window[s]<"u"&&window[s].prototype&&"insertRule"in window[s].prototype&&"deleteRule"in window[s].prototype)}var or=class{constructor(e){v(this,"iframeIdToRemoteIdMap",new WeakMap),v(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=e;}getId(e,t,r,i){let n=r||this.getIdToRemoteIdMap(e),o=i||this.getRemoteIdToIdMap(e),l=n.get(t);return l||(l=this.generateIdFn(),n.set(t,l),o.set(l,t)),l}getIds(e,t){let r=this.getIdToRemoteIdMap(e),i=this.getRemoteIdToIdMap(e);return t.map(n=>this.getId(e,n,r,i))}getRemoteId(e,t,r){let i=r||this.getRemoteIdToIdMap(e);if(typeof t!="number")return t;let n=i.get(t);return n||-1}getRemoteIds(e,t){let r=this.getRemoteIdToIdMap(e);return t.map(i=>this.getRemoteId(e,i,r))}reset(e){if(!e){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(e),this.iframeRemoteIdToIdMap.delete(e);}getIdToRemoteIdMap(e){let t=this.iframeIdToRemoteIdMap.get(e);return t||(t=new Map,this.iframeIdToRemoteIdMap.set(e,t)),t}getRemoteIdToIdMap(e){let t=this.iframeRemoteIdToIdMap.get(e);return t||(t=new Map,this.iframeRemoteIdToIdMap.set(e,t)),t}},$s=class{constructor(e){v(this,"iframes",new WeakMap),v(this,"crossOriginIframeMap",new WeakMap),v(this,"crossOriginIframeMirror",new or(In)),v(this,"crossOriginIframeStyleMirror"),v(this,"crossOriginIframeRootIdMap",new WeakMap),v(this,"mirror"),v(this,"mutationCb"),v(this,"wrappedEmit"),v(this,"loadListener"),v(this,"stylesheetManager"),v(this,"recordCrossOriginIframes"),this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new or(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,true),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:true}),this.recordCrossOriginIframes&&((r=e.contentWindow)==null||r.addEventListener("message",this.handleMessage.bind(this))),(i=this.loadListener)==null||i.call(this,e),e.contentDocument&&e.contentDocument.adoptedStyleSheets&&e.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(e.contentDocument.adoptedStyleSheets,this.mirror.getId(e.contentDocument));}handleMessage(e){let t=e;if(t.data.type!=="rrweb"||t.origin!==t.data.origin||!e.source)return;let i=this.crossOriginIframeMap.get(e.source);if(!i)return;let n=this.transformCrossOriginEvent(i,t.data.event);n&&this.wrappedEmit(n,t.data.isCheckout);}transformCrossOriginEvent(e,t){var r;switch(t.type){case x.FullSnapshot:{this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e);let i=t.data.node.id;return this.crossOriginIframeRootIdMap.set(e,i),this.patchRootIdOnNode(t.data.node,i),{timestamp:t.timestamp,type:x.IncrementalSnapshot,data:{source:E.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:true}}}case x.Meta:case x.Load:case x.DomContentLoaded:return false;case x.Plugin:return t;case x.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case x.IncrementalSnapshot:switch(t.data.source){case E.Mutation:return t.data.adds.forEach(i=>{this.replaceIds(i,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(i.node,e);let n=this.crossOriginIframeRootIdMap.get(e);n&&this.patchRootIdOnNode(i.node,n);}),t.data.removes.forEach(i=>{this.replaceIds(i,e,["parentId","id"]);}),t.data.attributes.forEach(i=>{this.replaceIds(i,e,["id"]);}),t.data.texts.forEach(i=>{this.replaceIds(i,e,["id"]);}),t;case E.Drag:case E.TouchMove:case E.MouseMove:return t.data.positions.forEach(i=>{this.replaceIds(i,e,["id"]);}),t;case E.ViewportResize:return false;case E.MediaInteraction:case E.MouseInteraction:case E.Scroll:case E.CanvasMutation:case E.Input:return this.replaceIds(t.data,e,["id"]),t;case E.StyleSheetRule:case E.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case E.Font:return t;case E.Selection:return t.data.ranges.forEach(i=>{this.replaceIds(i,e,["start","end"]);}),t;case E.AdoptedStyleSheet:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleIds"]),(r=t.data.styles)==null||r.forEach(i=>{this.replaceStyleIds(i,e,["styleId"]);}),t}}return false}replace(e,t,r,i){for(let n of i)!Array.isArray(t[n])&&typeof t[n]!="number"||(Array.isArray(t[n])?t[n]=e.getIds(r,t[n]):t[n]=e.getId(r,t[n]));return t}replaceIds(e,t,r){return this.replace(this.crossOriginIframeMirror,e,t,r)}replaceStyleIds(e,t,r){return this.replace(this.crossOriginIframeStyleMirror,e,t,r)}replaceIdOnNode(e,t){this.replaceIds(e,t,["id","rootId"]),"childNodes"in e&&e.childNodes.forEach(r=>{this.replaceIdOnNode(r,t);});}patchRootIdOnNode(e,t){e.type!==aa.Document&&!e.rootId&&(e.rootId=t),"childNodes"in e&&e.childNodes.forEach(r=>{this.patchRootIdOnNode(r,t);});}},Fs=class{constructor(e){v(this,"shadowDoms",new WeakSet),v(this,"mutationCb"),v(this,"scrollCb"),v(this,"bypassOptions"),v(this,"mirror"),v(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(!Ze(e)||this.shadowDoms.has(e))return;this.shadowDoms.add(e);let r=ca({...this.bypassOptions,doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},e);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push(ua({...this.bypassOptions,scrollCb:this.scrollCb,doc:e,mirror:this.mirror})),setTimeout(()=>{e.adoptedStyleSheets&&e.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,this.mirror.getId(C.host(e))),this.restoreHandlers.push(ha({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},e));},0);}observeAttachShadow(e){!e.contentWindow||!e.contentDocument||this.patchAttachShadow(e.contentWindow.Element,e.contentDocument);}patchAttachShadow(e,t){let r=this;this.restoreHandlers.push(Ne(e.prototype,"attachShadow",function(i){return function(n){let o=i.call(this,n),l=C.shadowRoot(this);return l&&oa(this)&&r.addShadowRoot(l,t),o}}));}reset(){this.restoreHandlers.forEach(e=>{try{e();}catch{}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet;}},Te="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Pf=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(je=0;je<Te.length;je++)Pf[Te.charCodeAt(je)]=je;var je,Lf=function(s){var e=new Uint8Array(s),t,r=e.length,i="";for(t=0;t<r;t+=3)i+=Te[e[t]>>2],i+=Te[(e[t]&3)<<4|e[t+1]>>4],i+=Te[(e[t+1]&15)<<2|e[t+2]>>6],i+=Te[e[t+2]&63];return r%3===2?i=i.substring(0,i.length-1)+"=":r%3===1&&(i=i.substring(0,i.length-2)+"=="),i};var mn=new Map;function $f(s,e){let t=mn.get(s);return t||(t=new Map,mn.set(s,t)),t.has(e)||t.set(e,[]),t.get(e)}var fa=(s,e,t)=>{if(!s||!(pa(s,e)||typeof s=="object"))return;let r=s.constructor.name,i=$f(t,r),n=i.indexOf(s);return n===-1&&(n=i.length,i.push(s)),n};function zt(s,e,t){if(s instanceof Array)return s.map(r=>zt(r,e,t));if(s===null)return s;if(s instanceof Float32Array||s instanceof Float64Array||s instanceof Int32Array||s instanceof Uint32Array||s instanceof Uint8Array||s instanceof Uint16Array||s instanceof Int16Array||s instanceof Int8Array||s instanceof Uint8ClampedArray)return {rr_type:s.constructor.name,args:[Object.values(s)]};if(s instanceof ArrayBuffer){let r=s.constructor.name,i=Lf(s);return {rr_type:r,base64:i}}else {if(s instanceof DataView)return {rr_type:s.constructor.name,args:[zt(s.buffer,e,t),s.byteOffset,s.byteLength]};if(s instanceof HTMLImageElement){let r=s.constructor.name,{src:i}=s;return {rr_type:r,src:i}}else if(s instanceof HTMLCanvasElement){let r="HTMLImageElement",i=s.toDataURL();return {rr_type:r,src:i}}else {if(s instanceof ImageData)return {rr_type:s.constructor.name,args:[zt(s.data,e,t),s.width,s.height]};if(pa(s,e)||typeof s=="object"){let r=s.constructor.name,i=fa(s,e,t);return {rr_type:r,index:i}}}}return s}var da=(s,e,t)=>s.map(r=>zt(r,e,t)),pa=(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 Ff(s,e,t,r){let i=[],n=Object.getOwnPropertyNames(e.CanvasRenderingContext2D.prototype);for(let o of n)try{if(typeof e.CanvasRenderingContext2D.prototype[o]!="function")continue;let l=Ne(e.CanvasRenderingContext2D.prototype,o,function(a){return function(...c){return J(this.canvas,t,r,!0)||setTimeout(()=>{let u=da(c,e,this);s(this.canvas,{type:Be["2D"],property:o,args:u});},0),a.apply(this,c)}});i.push(l);}catch{let l=vr(e.CanvasRenderingContext2D.prototype,o,{set(a){s(this.canvas,{type:Be["2D"],property:o,args:[a],setter:true});}});i.push(l);}return ()=>{i.forEach(o=>o());}}function Bf(s){return s==="experimental-webgl"?"webgl":s}function gn(s,e,t,r){let i=[];try{let n=Ne(s.HTMLCanvasElement.prototype,"getContext",function(o){return function(l,...a){if(!J(this,e,t,!0)){let c=Bf(l);if("__context"in this||(this.__context=c),r&&["webgl","webgl2"].includes(c))if(a[0]&&typeof a[0]=="object"){let u=a[0];u.preserveDrawingBuffer||(u.preserveDrawingBuffer=!0);}else a.splice(0,1,{preserveDrawingBuffer:!0});}return o.apply(this,[l,...a])}});i.push(n);}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext");}return ()=>{i.forEach(n=>n());}}function yn(s,e,t,r,i,n){let o=[],l=Object.getOwnPropertyNames(s);for(let a of l)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(a))try{if(typeof s[a]!="function")continue;let c=Ne(s,a,function(u){return function(...h){let p=u.apply(this,h);if(fa(p,n,this),"tagName"in this.canvas&&!J(this.canvas,r,i,!0)){let g=da(h,n,this),m={type:e,property:a,args:g};t(this.canvas,m);}return p}});o.push(c);}catch{let c=vr(s,a,{set(u){t(this.canvas,{type:e,property:a,args:[u],setter:true});}});o.push(c);}return o}function Uf(s,e,t,r){let i=[];return i.push(...yn(e.WebGLRenderingContext.prototype,Be.WebGL,s,t,r,e)),typeof e.WebGL2RenderingContext<"u"&&i.push(...yn(e.WebGL2RenderingContext.prototype,Be.WebGL2,s,t,r,e)),()=>{i.forEach(n=>n());}}var ma="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=",Wf=s=>Uint8Array.from(atob(s),e=>e.charCodeAt(0)),vn=typeof window<"u"&&window.Blob&&new Blob([Wf(ma)],{type:"text/javascript;charset=utf-8"});function Gf(s){let e;try{if(e=vn&&(window.URL||window.webkitURL).createObjectURL(vn),!e)throw "";let t=new Worker(e,{name:s?.name});return t.addEventListener("error",()=>{(window.URL||window.webkitURL).revokeObjectURL(e);}),t}catch{return new Worker("data:text/javascript;base64,"+ma,{name:s?.name})}finally{e&&(window.URL||window.webkitURL).revokeObjectURL(e);}}var Bs=class{constructor(e){v(this,"pendingCanvasMutations",new Map),v(this,"rafStamps",{latestId:0,invokeId:null}),v(this,"mirror"),v(this,"mutationCb"),v(this,"resetObservers"),v(this,"frozen",false),v(this,"locked",false),v(this,"processMutation",(a,c)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(a)||this.pendingCanvasMutations.set(a,[]),this.pendingCanvasMutations.get(a).push(c);});let{sampling:t="all",win:r,blockClass: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=true;}unfreeze(){this.frozen=false;}lock(){this.locked=true;}unlock(){this.locked=false;}initCanvasFPSObserver(e,t,r,i,n){let o=gn(t,r,i,true),l=new Map,a=new Gf;a.onmessage=m=>{let{id:d}=m.data;if(l.set(d,false),!("base64"in m.data))return;let{base64:f,type:w,width:b,height:y}=m.data;this.mutationCb({id:d,type:Be["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:w}]},0,0]}]});};let c=1e3/e,u=0,h,p=()=>{let m=[];return t.document.querySelectorAll("canvas").forEach(d=>{J(d,r,i,true)||m.push(d);}),m},g=m=>{if(u&&m-u<c){h=requestAnimationFrame(g);return}u=m,p().forEach(async d=>{var f;let w=this.mirror.getId(d);if(l.get(w)||d.width===0||d.height===0)return;if(l.set(w,true),["webgl","webgl2"].includes(d.__context)){let y=d.getContext(d.__context);((f=y?.getContextAttributes())==null?void 0:f.preserveDrawingBuffer)===false&&y.clear(y.COLOR_BUFFER_BIT);}let b=await createImageBitmap(d);a.postMessage({id:w,bitmap:b,width:d.width,height:d.height,dataURLOptions:n.dataURLOptions},[b]);}),h=requestAnimationFrame(g);};h=requestAnimationFrame(g),this.resetObservers=()=>{o(),cancelAnimationFrame(h);};}initCanvasMutationObserver(e,t,r){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();let i=gn(e,t,r,false),n=Ff(this.processMutation.bind(this),e,t,r),o=Uf(this.processMutation.bind(this),e,t,r);this.resetObservers=()=>{i(),n(),o();};}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations());}startRAFTimestamping(){let e=t=>{this.rafStamps.latestId=t,requestAnimationFrame(e);};requestAnimationFrame(e);}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((e,t)=>{let r=this.mirror.getId(t);this.flushPendingCanvasMutationFor(t,r);}),requestAnimationFrame(()=>this.flushPendingCanvasMutations());}flushPendingCanvasMutationFor(e,t){if(this.frozen||this.locked)return;let r=this.pendingCanvasMutations.get(e);if(!r||t===-1)return;let i=r.map(o=>{let{type:l,...a}=o;return a}),{type:n}=r[0];this.mutationCb({id:t,type:n,commands:i}),this.pendingCanvasMutations.delete(e);}},Us=class{constructor(e){v(this,"trackedLinkElements",new WeakSet),v(this,"mutationCb"),v(this,"adoptedStyleSheetCb"),v(this,"styleMirror",new ks),this.mutationCb=e.mutationCb,this.adoptedStyleSheetCb=e.adoptedStyleSheetCb;}attachLinkElement(e,t){"_cssText"in t.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:t.attributes}]}),this.trackLinkElement(e);}trackLinkElement(e){this.trackedLinkElements.has(e)||(this.trackedLinkElements.add(e),this.trackStylesheetInLinkElement(e));}adoptStyleSheets(e,t){if(e.length===0)return;let r={id:t,styleIds:[]},i=[];for(let n of e){let o;this.styleMirror.has(n)?o=this.styleMirror.getId(n):(o=this.styleMirror.add(n),i.push({styleId:o,rules:Array.from(n.rules||CSSRule,(l,a)=>({rule:Cn(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){}},Ws=class{constructor(){v(this,"nodeMap",new WeakMap),v(this,"active",false);}inOtherBuffer(e,t){let r=this.nodeMap.get(e);return r&&Array.from(r).some(i=>i!==t)}add(e,t){this.active||(this.active=true,requestAnimationFrame(()=>{this.nodeMap=new WeakMap,this.active=false;})),this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(t));}destroy(){}},W,Vt,qr,ar=false;try{if(Array.from([1],s=>s*2)[0]!==2){let s=document.createElement("iframe");document.body.appendChild(s),Array.from=((wi=s.contentWindow)==null?void 0:wi.Array.from)||Array.from,document.body.removeChild(s);}}catch(s){console.debug("Unable to override Array.from",s);}var se=Va();function he(s={}){let{emit:e,checkoutEveryNms:t,checkoutEveryNth:r,blockClass:i="rr-block",blockSelector:n=null,ignoreClass:o="rr-ignore",ignoreSelector:l=null,maskTextClass:a="rr-mask",maskTextSelector:c=null,inlineStylesheet:u=true,maskAllInputs:h,maskInputOptions:p,slimDOMOptions:g,maskInputFn:m,maskTextFn:d,hooks:f,packFn:w,sampling:b={},dataURLOptions:y={},mousemoveWait:S,recordDOM:O=true,recordCanvas:T=false,recordCrossOriginIframes:V=false,recordAfter:L=s.recordAfter==="DOMContentLoaded"?s.recordAfter:"load",userTriggeredOnInput:z=false,collectFonts:Y=false,inlineImages:Q=false,plugins:ae,keepIframeSrcFn:N=()=>false,ignoreCSSAttributes:Ue=new Set([]),errorHandler:We}=s;bf(We);let H=V?window.parent===window:true,ee=false;if(!H)try{window.parent.document&&(ee=!1);}catch{ee=true;}if(H&&!e)throw new Error("emit function is required");if(!H&&!ee)return ()=>{};S!==void 0&&b.mousemove===void 0&&(b.mousemove=S),se.reset();let we=h===true?{color:true,date:true,"datetime-local":true,email:true,month:true,number:true,range:true,search:true,tel:true,text:true,time:true,url:true,week:true,textarea:true,select:true,password:true}:p!==void 0?p:{password:true},le=Rn(g);mf();let di,Lr=0,pi=M=>{for(let re of ae||[])re.eventProcessor&&(M=re.eventProcessor(M));return w&&!ee&&(M=w(M)),M};W=(M,re)=>{var B;let U=M;if(U.timestamp=ir(),(B=Ce[0])!=null&&B.isFrozen()&&U.type!==x.FullSnapshot&&!(U.type===x.IncrementalSnapshot&&U.data.source===E.Mutation)&&Ce.forEach(q=>q.unfreeze()),H)e?.(pi(U),re);else if(ee){let q={type:"rrweb",event:pi(U),origin:window.location.origin,isCheckout:re};window.parent.postMessage(q,"*");}if(U.type===x.FullSnapshot)di=U,Lr=0;else if(U.type===x.IncrementalSnapshot){if(U.data.source===E.Mutation&&U.data.isAttachIframe)return;Lr++;let q=r&&Lr>=r,D=t&&U.timestamp-di.timestamp>t;(q||D)&&Vt(true);}};let dt=M=>{W({type:x.IncrementalSnapshot,data:{source:E.Mutation,...M}});},mi=M=>W({type:x.IncrementalSnapshot,data:{source:E.Scroll,...M}}),gi=M=>W({type:x.IncrementalSnapshot,data:{source:E.CanvasMutation,...M}}),va=M=>W({type:x.IncrementalSnapshot,data:{source:E.AdoptedStyleSheet,...M}}),be=new Us({mutationCb:dt,adoptedStyleSheetCb:va}),Se=new $s({mirror:se,mutationCb:dt,stylesheetManager:be,recordCrossOriginIframes:V,wrappedEmit:W});for(let M of ae||[])M.getMirror&&M.getMirror({nodeMirror:se,crossOriginIframeMirror:Se.crossOriginIframeMirror,crossOriginIframeStyleMirror:Se.crossOriginIframeStyleMirror});let $r=new Ws;qr=new Bs({recordCanvas:T,mutationCb:gi,win:window,blockClass:i,blockSelector:n,mirror:se,sampling:b.canvas,dataURLOptions:y});let pt=new Fs({mutationCb:dt,scrollCb:mi,bypassOptions:{blockClass:i,blockSelector:n,maskTextClass:a,maskTextSelector:c,inlineStylesheet:u,maskInputOptions:we,dataURLOptions:y,maskTextFn:d,maskInputFn:m,recordCanvas:T,inlineImages:Q,sampling:b,slimDOMOptions:le,iframeManager:Se,stylesheetManager:be,canvasManager:qr,keepIframeSrcFn:N,processedNodeManager:$r},mirror:se});Vt=(M=false)=>{if(!O)return;W({type:x.Meta,data:{href:window.location.href,width:ea(),height:Qo()}},M),be.reset(),pt.init(),Ce.forEach(B=>B.lock());let re=pl(document,{mirror:se,blockClass:i,blockSelector:n,maskTextClass:a,maskTextSelector:c,inlineStylesheet:u,maskAllInputs:we,maskTextFn:d,maskInputFn:m,slimDOM:le,dataURLOptions:y,recordCanvas:T,inlineImages:Q,onSerialize:B=>{sa(B,se)&&Se.addIframe(B),ia(B,se)&&be.trackLinkElement(B),Ts(B)&&pt.addShadowRoot(C.shadowRoot(B),document);},onIframeLoad:(B,U)=>{Se.attachIframe(B,U),pt.observeAttachShadow(B);},onStylesheetLoad:(B,U)=>{be.attachLinkElement(B,U);},keepIframeSrcFn:N});if(!re)return console.warn("Failed to snapshot the document");W({type:x.FullSnapshot,data:{node:re,initialOffset:qo(window)}},M),Ce.forEach(B=>B.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&be.adoptStyleSheets(document.adoptedStyleSheets,se.getId(document));};try{let M=[],re=U=>{var q;return I(_f)({mutationCb:dt,mousemoveCb:(D,Fr)=>W({type:x.IncrementalSnapshot,data:{source:Fr,positions:D}}),mouseInteractionCb:D=>W({type:x.IncrementalSnapshot,data:{source:E.MouseInteraction,...D}}),scrollCb:mi,viewportResizeCb:D=>W({type:x.IncrementalSnapshot,data:{source:E.ViewportResize,...D}}),inputCb:D=>W({type:x.IncrementalSnapshot,data:{source:E.Input,...D}}),mediaInteractionCb:D=>W({type:x.IncrementalSnapshot,data:{source:E.MediaInteraction,...D}}),styleSheetRuleCb:D=>W({type:x.IncrementalSnapshot,data:{source:E.StyleSheetRule,...D}}),styleDeclarationCb:D=>W({type:x.IncrementalSnapshot,data:{source:E.StyleDeclaration,...D}}),canvasMutationCb:gi,fontCb:D=>W({type:x.IncrementalSnapshot,data:{source:E.Font,...D}}),selectionCb:D=>{W({type:x.IncrementalSnapshot,data:{source:E.Selection,...D}});},customElementCb:D=>{W({type:x.IncrementalSnapshot,data:{source:E.CustomElement,...D}});},blockClass:i,ignoreClass:o,ignoreSelector:l,maskTextClass:a,maskTextSelector:c,maskInputOptions:we,inlineStylesheet:u,sampling:b,recordDOM:O,recordCanvas:T,inlineImages:Q,userTriggeredOnInput:z,collectFonts:Y,doc:U,maskInputFn:m,maskTextFn:d,keepIframeSrcFn:N,blockSelector:n,slimDOMOptions:le,dataURLOptions:y,mirror:se,iframeManager:Se,stylesheetManager:be,shadowDomManager:pt,processedNodeManager:$r,canvasManager:qr,ignoreCSSAttributes:Ue,plugins:((q=ae?.filter(D=>D.observer))==null?void 0:q.map(D=>({observer:D.observer,options:D.options,callback:Fr=>W({type:x.Plugin,data:{plugin:D.name,payload:Fr}})})))||[]},f)};Se.addLoadListener(U=>{try{M.push(re(U.contentDocument));}catch(q){console.warn(q);}});let B=()=>{Vt(),M.push(re(document)),ar=!0;};return ["interactive","complete"].includes(document.readyState)?B():(M.push(X("DOMContentLoaded",()=>{W({type:x.DomContentLoaded,data:{}}),L==="DOMContentLoaded"&&B();})),M.push(X("load",()=>{W({type:x.Load,data:{}}),L==="load"&&B();},window))),()=>{M.forEach(U=>{try{U();}catch(q){String(q).toLowerCase().includes("cross-origin")||console.warn(q);}}),$r.destroy(),ar=!1,Sf();}}catch(M){console.warn(M);}}he.addCustomEvent=(s,e)=>{if(!ar)throw new Error("please add custom event after start recording");W({type:x.Custom,data:{tag:s,payload:e}});};he.freezePage=()=>{Ce.forEach(s=>s.freeze());};he.takeFullSnapshot=s=>{if(!ar)throw new Error("please take full snapshot after start recording");Vt(s);};he.mirror=se;var wn;(function(s){s[s.NotStarted=0]="NotStarted",s[s.Running=1]="Running",s[s.Stopped=2]="Stopped";})(wn||(wn={}));var{addCustomEvent:Fd}=he,{freezePage:Bd}=he,{takeFullSnapshot:Ud}=he;var wr=class{constructor(e,t,r){this.sessionId=e;this.emit=t;this.rrwebConfig=r;this.stopFn=null;}start(){this.stopFn=he({...this.rrwebConfig,emit:e=>{this.emit({type:"rrweb",timestamp:e.timestamp,sessionId:this.sessionId,data:e});}})??null;}takeFullSnapshot(){this.stopFn&&he.takeFullSnapshot();}stop(){this.stopFn&&(this.stopFn(),this.stopFn=null);}};var br=class{constructor(e,t){this.sessionId=e;this.emit=t;this.onErrorHandler=null;this.onRejectionHandler=null;this.previousOnError=null;}start(){this.previousOnError=window.onerror,this.onErrorHandler=(e,t,r,i,n)=>{let o={message:String(e),stack:n?.stack,source:t??void 0,lineno:r??void 0,colno:i??void 0,type:"onerror"};return this.emit({type:"error",timestamp:Date.now(),sessionId:this.sessionId,data:o}),this.previousOnError?this.previousOnError.call(window,e,t,r,i,n):false},this.onRejectionHandler=e=>{let t=e.reason,r={message:t instanceof Error?t.message:String(t),stack:t instanceof Error?t.stack:void 0,type:"unhandledrejection"};this.emit({type:"error",timestamp:Date.now(),sessionId:this.sessionId,data:r});},window.onerror=this.onErrorHandler,window.addEventListener("unhandledrejection",this.onRejectionHandler);}stop(){this.previousOnError?window.onerror=this.previousOnError:window.onerror=null,this.onRejectionHandler&&window.removeEventListener("unhandledrejection",this.onRejectionHandler),this.onErrorHandler=null,this.onRejectionHandler=null;}};var zf=/ghostplay\.dev/;var Sr=class{constructor(e,t){this.sessionId=e;this.emit=t;this.originalFetch=null;this.active=false;}start(){this.active=true,this.patchFetch();}stop(){this.active=false,this.restoreFetch();}patchFetch(){this.originalFetch=globalThis.fetch;let e=this;globalThis.fetch=async function(t,r){let i=typeof t=="string"?t:t instanceof URL?t.toString():t.url,n=r?.method??"GET";if(zf.test(i))return e.originalFetch.call(globalThis,t,r);let o=Date.now(),l=Vf(r?.headers),a=Hf(r?.body);try{let c=await e.originalFetch.call(globalThis,t,r);if(e.active){let u={};c.headers.forEach((g,m)=>{u[m]=g;});let h;try{let g=c.headers.get("content-type")??"";if(g.includes("json")||g.includes("text")){let d=await c.clone().text();h=d.length>1048576?d.substring(0,1048576)+"...[truncated]":d;}}catch{}let p={method:n.toUpperCase(),url:i,status:c.status,statusText:c.statusText,requestHeaders:l,responseHeaders:u,requestBody:a,responseBody:h,startTime:o,endTime:Date.now(),duration:Date.now()-o};e.emit({type:"network",timestamp:o,sessionId:e.sessionId,data:p}),c.status>=500&&e.emit({type:"error",timestamp:Date.now(),sessionId:e.sessionId,data:{message:`HTTP ${c.status}: ${n.toUpperCase()} ${i}`,type:"onerror",source:"network-interceptor"}});}return c}catch(c){if(e.active){let u=Date.now(),h={method:n.toUpperCase(),url:i,requestHeaders:l,requestBody:a,startTime:o,endTime:u,duration:u-o};e.emit({type:"network",timestamp:o,sessionId:e.sessionId,data:h});let p=c instanceof Error?c.message:String(c);e.emit({type:"error",timestamp:u,sessionId:e.sessionId,data:{message:`Network error: ${n.toUpperCase()} ${i} \u2014 ${p}`,type:"onerror",source:"network-interceptor"}});}throw c}};}restoreFetch(){this.originalFetch&&(globalThis.fetch=this.originalFetch,this.originalFetch=null);}};function Vf(s){let e={};if(!s)return e;if(s instanceof Headers)s.forEach((t,r)=>{e[r]=t;});else if(Array.isArray(s))for(let[t,r]of s)e[t]=r;else for(let[t,r]of Object.entries(s))e[t]=r;return e}function Hf(s){if(s){if(typeof s=="string")return s.length>1048576?s.substring(0,1048576)+"...[truncated]":s;if(s instanceof URLSearchParams)return s.toString()}}var ga=["log","warn","error","info","debug"],Cr=class{constructor(e,t){this.sessionId=e;this.emit=t;this.originals={};}start(){for(let e of ga)this.originals[e]=console[e].bind(console),console[e]=(...t)=>{let r={level:e,args:t.map(i=>this.serialize(i))};this.emit({type:"console",timestamp:Date.now(),sessionId:this.sessionId,data:r}),this.originals[e]?.(...t);};}stop(){for(let e of ga)this.originals[e]&&(console[e]=this.originals[e]);this.originals={};}serialize(e){if(e instanceof Error)return {__type:"Error",message:e.message,stack:e.stack};if(typeof e=="object"&&e!==null)try{return JSON.stringify(e),e}catch{return String(e)}return e}};var jf={LCP:[1e3,4e3],FID:[100,300],CLS:[.1,.25],TTFB:[800,1800],INP:[200,500]},Er=class{constructor(e,t){this.sessionId=e;this.emit=t;this.observers=[];}start(){typeof PerformanceObserver>"u"||(this.observeLCP(),this.observeFID(),this.observeCLS(),this.observeTTFB(),this.observeINP());}stop(){this.observers.forEach(e=>e.disconnect()),this.observers=[];}handleMetric(e,t){let[r,i]=jf[e],n=t<=r?"good":t<=i?"needs-improvement":"poor";this.emit({type:"performance",timestamp:Date.now(),sessionId:this.sessionId,data:{metric:e,value:t,rating:n}});}observeLCP(){try{let e=new PerformanceObserver(t=>{let r=t.getEntries(),i=r[r.length-1];i&&this.handleMetric("LCP",i.startTime);});e.observe({type:"largest-contentful-paint",buffered:!0}),this.observers.push(e);}catch{}}observeFID(){try{let e=new PerformanceObserver(t=>{let i=t.getEntries()[0];i&&this.handleMetric("FID",i.processingStart-i.startTime);});e.observe({type:"first-input",buffered:!0}),this.observers.push(e);}catch{}}observeCLS(){let e=0;try{let t=new PerformanceObserver(r=>{for(let i of r.getEntries())i.hadRecentInput||(e+=i.value);this.handleMetric("CLS",e);});t.observe({type:"layout-shift",buffered:!0}),this.observers.push(t);}catch{}}observeTTFB(){try{let e=new PerformanceObserver(t=>{let r=t.getEntries()[0];r&&this.handleMetric("TTFB",r.responseStart);});e.observe({type:"navigation",buffered:!0}),this.observers.push(e);}catch{}}observeINP(){try{let e=new PerformanceObserver(t=>{for(let r of t.getEntries())this.handleMetric("INP",r.duration);});e.observe({type:"event",buffered:!0}),this.observers.push(e);}catch{}}};var Ir=class{constructor(e,t){this.sessionId=e;this.emit=t;this.clickHandler=null;this.recentClicks=[];}start(){this.clickHandler=e=>{let t=e.target;if(!t)return;let r=Date.now(),i=this.recentClicks.find(n=>n.element===t);if(i||(i={element:t,timestamps:[]},this.recentClicks.push(i)),i.timestamps.push(r),i.timestamps=i.timestamps.filter(n=>r-n<1e3),i.timestamps.length>=3){let n={selector:this.getSelector(t),clickCount:i.timestamps.length,x:e.clientX,y:e.clientY};this.emit({type:"rage-click",timestamp:r,sessionId:this.sessionId,data:n}),i.timestamps=[];}this.recentClicks=this.recentClicks.filter(n=>n.timestamps.length>0);},document.addEventListener("click",this.clickHandler,true);}stop(){this.clickHandler&&(document.removeEventListener("click",this.clickHandler,true),this.clickHandler=null),this.recentClicks=[];}getSelector(e){if(e.id)return `#${e.id}`;let t=e.getAttribute("data-testid");if(t)return `[data-testid="${t}"]`;let r=e.tagName.toLowerCase(),i=e.className?`.${e.className.split(" ").filter(Boolean).join(".")}`:"";return `${r}${i}`}};var xr=class{constructor(e=50){this.maxSize=e;this.trail=[];}add(e,t,r){let i={category:e,message:t};r&&(i.data=r),this.trail.push(i),this.trail.length>this.maxSize&&(this.trail=this.trail.slice(-this.maxSize));}getTrail(){return [...this.trail]}clear(){this.trail=[];}};var Nr=class{constructor(e,t){this.sessionId=e;this.emit=t;this.currentUrl="";this.originalPushState=null;this.originalReplaceState=null;this.popstateHandler=null;this.hashchangeHandler=null;}start(){this.currentUrl=window.location.href,this.emitNavigation(null,this.currentUrl,"initial"),this.originalPushState=history.pushState.bind(history),history.pushState=(...e)=>{this.originalPushState(...e),this.handleUrlChange("pushState");},this.originalReplaceState=history.replaceState.bind(history),history.replaceState=(...e)=>{this.originalReplaceState(...e),this.handleUrlChange("replaceState");},this.popstateHandler=()=>this.handleUrlChange("popstate"),window.addEventListener("popstate",this.popstateHandler),this.hashchangeHandler=()=>this.handleUrlChange("hashchange"),window.addEventListener("hashchange",this.hashchangeHandler);}stop(){this.originalPushState&&(history.pushState=this.originalPushState,this.originalPushState=null),this.originalReplaceState&&(history.replaceState=this.originalReplaceState,this.originalReplaceState=null),this.popstateHandler&&(window.removeEventListener("popstate",this.popstateHandler),this.popstateHandler=null),this.hashchangeHandler&&(window.removeEventListener("hashchange",this.hashchangeHandler),this.hashchangeHandler=null);}handleUrlChange(e){let t=window.location.href;if(t!==this.currentUrl){let r=this.currentUrl;this.currentUrl=t,this.emitNavigation(r,t,e);}}emitNavigation(e,t,r){let i={from:e,to:t,trigger:r};this.emit({type:"navigation",timestamp:Date.now(),sessionId:this.sessionId,data:i});}};var Yf=["set-cookie"],Mr=class{constructor(e){this.options=e;}sanitizeNetworkEvent(e){let t={...e},r=this.options.networkSanitize;return t.responseHeaders&&(t.responseHeaders=this.filterHeaders(t.responseHeaders,Yf)),r&&(t.requestHeaders&&r.denyHeaders.length>0&&(t.requestHeaders=this.filterHeaders(t.requestHeaders,r.denyHeaders)),t.responseHeaders&&r.denyHeaders.length>0&&(t.responseHeaders=this.filterHeaders(t.responseHeaders,r.denyHeaders)),r.denyBodyUrls.length>0&&this.urlMatchesDeny(e.url,r.denyBodyUrls)&&(t.requestBody&&(t.requestBody="[REDACTED]"),t.responseBody&&(t.responseBody="[REDACTED]"))),t}filterHeaders(e,t){let r=t.map(n=>n.toLowerCase()),i={};for(let[n,o]of Object.entries(e))r.includes(n.toLowerCase())||(i[n]=o);return i}urlMatchesDeny(e,t){return t.some(r=>new RegExp("^"+r.replace(/\*/g,".*")+"$").test(e))}};var Rr=class{constructor(e){this.config=e;this.buffer=[];this.bufferBytes=0;this.flushTimer=null;}start(){this.flushTimer=setInterval(()=>{this.flush();},this.config.flushIntervalMs);}stop(){this.flushTimer&&(clearInterval(this.flushTimer),this.flushTimer=null),this.flush();}send(e){let t=JSON.stringify(e).length;this.buffer.push(e),this.bufferBytes+=t,this.bufferBytes>=this.config.flushMaxBytes&&this.flush();}flush(){if(this.buffer.length===0)return;let e=this.buffer;this.buffer=[],this.bufferBytes=0;let t={projectId:this.config.projectId,sessionId:this.config.sessionId,events:e,sentAt:Date.now()},r=JSON.stringify(t),i=`${this.config.apiUrl}/events`,n=r.length<6e4;try{fetch(i,{method:"POST",headers:{"Content-Type":"application/json","x-project-id":this.config.projectId},body:r,keepalive:n}).then(o=>{o.ok||console.warn(`[Ghostplay] Event batch rejected (${o.status})`);}).catch(()=>{this.sendBeacon(i,r);});}catch{this.sendBeacon(i,r);}}sendBeacon(e,t){typeof navigator<"u"&&navigator.sendBeacon&&navigator.sendBeacon(e,new Blob([t],{type:"application/json"}));}};var Zf="0.1.0",G=null,oe=null,ht=null,Ar=null,Or=null,Dr=null,Tr=null,kr=null,_r=null,Pr=null,hi=null,ft=null;function fi(){if(!oe)throw new Error("[Ghostplay] SDK not initialized. Call Ghostplay.init() first.")}function fe(s){_r&&s.type!=="rrweb"&&_r.add(s.type==="error"?"error":s.type==="network"?"network":s.type==="rage-click"?"click":"custom",`${s.type}: ${JSON.stringify(s.data).substring(0,100)}`),ft?.send(s);}function Xf(s){ya(),G=vi(s),oe=new mt(G.projectId);let e=oe.start();hi=new Mr({networkSanitize:G.networkSanitize}),ft=new Rr({apiUrl:G.apiUrl,projectId:G.projectId,sessionId:e.id,flushIntervalMs:G.flushIntervalMs,flushMaxBytes:G.flushMaxBytes}),ft.start(),_r=new xr,ht=new wr(e.id,fe,{maskAllInputs:G.maskAllInputs,...G.maskInputSelector?{maskInputSelector:G.maskInputSelector}:{},...G.blockSelector?{blockSelector:G.blockSelector}:{},...G.ignoreSelector?{ignoreSelector:G.ignoreSelector}:{},...G.rrwebConfig});let t=()=>{ht?.start(),setTimeout(()=>ht?.takeFullSnapshot(),3e3);};document.readyState==="complete"?requestAnimationFrame(()=>requestAnimationFrame(t)):window.addEventListener("load",()=>requestAnimationFrame(t),{once:true}),Ar=new br(e.id,fe),Ar.start(),G.recordNetwork&&(Or=new Sr(e.id,r=>{let i=hi.sanitizeNetworkEvent(r.data);fe({...r,data:i});}),Or.start()),G.recordConsole&&(Dr=new Cr(e.id,fe),Dr.start()),G.trackPerformance&&(Tr=new Er(e.id,fe),Tr.start()),G.trackRageClicks&&(kr=new Ir(e.id,fe),kr.start()),G.trackNavigation&&(Pr=new Nr(e.id,fe),Pr.start());}function Jf(s,e){fi(),oe.identify(s,e),fe({type:"identify",timestamp:Date.now(),sessionId:oe.current().id,data:{userId:s,traits:e}});}function Kf(s){fi(),oe.addTag(s),fe({type:"tag",timestamp:Date.now(),sessionId:oe.current().id,data:{tag:s}});}function qf(s){fi(),oe.setMetadata(s),fe({type:"metadata",timestamp:Date.now(),sessionId:oe.current().id,data:s});}function ya(){ht?.stop(),Ar?.stop(),Or?.stop(),Dr?.stop(),Tr?.stop(),kr?.stop(),Pr?.stop(),ft?.stop(),oe?.end(),ht=null,Ar=null,Or=null,Dr=null,Tr=null,kr=null,Pr=null,ft=null,oe=null,_r=null,hi=null,G=null;}var Qf={VERSION:Zf,init:Xf,identify:Jf,tag:Kf,setMetadata:qf,stop:ya},hp=Qf;/*! Bundled license information:
6
60
 
7
- rrweb/es/rrweb/ext/tslib/tslib.es6.js:
61
+ rrweb/dist/rrweb.js:
8
62
  (*! *****************************************************************************
9
63
  Copyright (c) Microsoft Corporation.
10
64
 
@@ -19,5 +73,5 @@ rrweb/es/rrweb/ext/tslib/tslib.es6.js:
19
73
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
20
74
  PERFORMANCE OF THIS SOFTWARE.
21
75
  ***************************************************************************** *)
22
- */exports.Ghostplay=Sn;exports.VERSION=mn;exports.default=hi;Object.defineProperty(exports,'__esModule',{value:true});return exports;})({});//# sourceMappingURL=index.global.js.map
76
+ */exports.Ghostplay=Qf;exports.VERSION=Zf;exports.default=hp;Object.defineProperty(exports,'__esModule',{value:true});return exports;})({});//# sourceMappingURL=index.global.js.map
23
77
  //# sourceMappingURL=index.global.js.map