posthog-js 1.429.0 → 1.429.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.
- package/dist/all-external-dependencies.js +1 -1
- package/dist/array.full.es5.js +1 -1
- package/dist/array.full.js +1 -1
- package/dist/array.full.no-external.js +1 -1
- package/dist/array.js +1 -1
- package/dist/array.no-external.js +1 -1
- package/dist/customizations.full.js +1 -1
- package/dist/customizations.js +1 -1
- package/dist/default-extensions.js +1 -1
- package/dist/extension-bundles.js +1 -1
- package/dist/lazy-recorder.js +1 -1
- package/dist/main.js +1 -1
- package/dist/module.full.js +1 -1
- package/dist/module.full.no-external.js +1 -1
- package/dist/module.js +1 -1
- package/dist/module.mjs +1 -1
- package/dist/module.no-external.js +1 -1
- package/dist/module.slim.js +1 -1
- package/dist/module.slim.no-external.js +1 -1
- package/dist/posthog-recorder.js +1 -1
- package/dist/rrweb.js +1 -1
- package/dist/rrweb.js.map +1 -1
- package/lib/package.json +1 -1
- package/package.json +4 -4
package/dist/rrweb.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var t=["inputId"],e=["inputId"],r=["type"];function i(t,e,r,i,n,s,o){try{var a=t[s](o),h=a.value}catch(t){return void r(t)}a.done?e(h):Promise.resolve(h).then(i,n)}function n(t){return function(){var e=this,r=arguments;return new Promise(function(n,s){var o=t.apply(e,r);function a(t){i(o,n,s,a,h,"next",t)}function h(t){i(o,n,s,a,h,"throw",t)}a(void 0)})}}function s(t,e){if(null==t)return{};var r={};for(var i in t)if({}.hasOwnProperty.call(t,i)){if(-1!==e.indexOf(i))continue;r[i]=t[i]}return r}function o(){return o=Object.assign?Object.assign.bind():function(t){for(var e=1;arguments.length>e;e++){var r=arguments[e];for(var i in r)({}).hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t},o.apply(null,arguments)}var a=Object.defineProperty,h=(t,e)=>{var r={};for(var i in t)a(r,i,{get:t[i],enumerable:!0});return e||a(r,Symbol.toStringTag,{value:"Module"}),r},u=function(t){return 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",t}({});function l(t,e){return-1!==t.indexOf(e)}"Mobile".toLowerCase(),"Tablet".toLowerCase(),new RegExp("Xbox","i"),new RegExp("Nintendo","i"),new RegExp("PlayStation","i"),new RegExp("Windows","i"),Date,Date;var f={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot"],MutationObserver:[]},c={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:["querySelector","querySelectorAll"],MutationObserver:["constructor"]},v={};function d(t){if(v[t])return v[t];var e=function(t){var e,r,i=null===(e=globalThis)||void 0===e||null===(e=e.Zone)||void 0===e||null===(r=e.__symbol__)||void 0===r?void 0:r.call(e,t);return i&&globalThis[i]?globalThis[i]:void 0}(t)||globalThis[t],r=e.prototype,i=t in f?f[t]:void 0,n=Boolean(i&&i.every(t=>{var e;return Boolean(null===(e=Object.getOwnPropertyDescriptor(r,t))||void 0===e||null===(e=e.get)||void 0===e?void 0:e.toString().includes("[native code]"))})),s=t in c?c[t]:void 0,o=Boolean(s&&s.every(t=>{var e;return"function"==typeof r[t]&&(null===(e=r[t])||void 0===e?void 0:e.toString().includes("[native code]"))}));if(n&&o)return v[t]=e.prototype,e.prototype;var a=document.createElement("iframe");a.style.display="none";var h,u=!1;try{document.body.appendChild(a);var d=a.contentWindow;if(!d)return e.prototype;var p=d[t].prototype;return p?(l(h=navigator.userAgent,"AppleWebKit")&&!l(h,"Chrome")&&(a.classList.add("rr-block","ph-no-capture"),a.setAttribute("__rrwebUntaintedPrototype",t),u=!0),v[t]=p):r}catch(t){return r}finally{!u&&a.parentNode&&document.body.removeChild(a)}}var p=Object.create(null);function m(t,e,r){var i,n=p[t],s=n[r];if(s)return s.call(e);var o=d(t),a=null===(i=Object.getOwnPropertyDescriptor(o,r))||void 0===i?void 0:i.get;return a?(n[r]=a,a.call(e)):e[r]}p.Node=Object.create(null),p.ShadowRoot=Object.create(null),p.MutationObserver=Object.create(null),p.Element=Object.create(null);var y,g={};function w(t,e,r){var i=t+"."+String(r);if(g[i])return g[i].bind(e);var n=d(t)[r];return"function"!=typeof n?e[r]:(g[i]=n,n.bind(e))}var b={childNodes:t=>m("Node",t,"childNodes"),parentNode:t=>m("Node",t,"parentNode"),parentElement:t=>m("Node",t,"parentElement"),textContent:t=>m("Node",t,"textContent"),isConnected(t){if(void 0===y){var e,r=null===(e=Object.getOwnPropertyDescriptor(d("Node"),"isConnected"))||void 0===e?void 0:e.get;y=(null==r?void 0:r.toString().includes("[native code]"))?r:null}return null==y?void 0:y.call(t)},contains:(t,e)=>w("Node",t,"contains")(e),getRootNode:t=>w("Node",t,"getRootNode")(),host:t=>t&&"host"in t?m("ShadowRoot",t,"host"):null,styleSheets:t=>t.styleSheets,shadowRoot:t=>t&&"shadowRoot"in t?m("Element",t,"shadowRoot"):null,querySelector:(t,e)=>w("Element",t,"querySelector")(e),querySelectorAll:(t,e)=>w("Element",t,"querySelectorAll")(e),mutationObserver:()=>d("MutationObserver").constructor,patch(t,e,r){try{if(!(e in t))return()=>{};var i=t[e],n={next:i},s=r(function(){for(var t=arguments.length,e=new Array(t),r=0;t>r;r++)e[r]=arguments[r];return n.next.apply(this,e)});return"function"==typeof s&&(s.prototype=s.prototype||{},Object.defineProperties(s,{__rrweb_original__:{enumerable:!1,value:i},__rrweb_layer__:{enumerable:!1,value:n}})),t[e]=s,()=>{if(t[e]!==s)for(var r=t=>{var e;return"function"==typeof t?null!==(e=t.__rrweb_layer__)&&void 0!==e?e:t.__posthog_layer__:void 0},i=t[e],o=r(i);o;){if(o.next===s)return void(o.next=n.next);o=r(i=o.next)}else t[e]=n.next}}catch(t){return()=>{}}}};function S(){try{if("undefined"!=typeof performance&&performance.now)return performance.now()}catch(t){}return Date.now()}var k=0,C=0;function M(){k+=1}function x(){return k}function A(){return C}function E(t,e){return(e!==k||t>6e4)&&(C+=1,!0)}var R=0,I=0,T=0,O={durationMs:0,stylesheetMs:0,nodeCount:0,cssRuleCount:0,nonDeferrableCssRuleCount:0,deferredStylesheetCount:0},D=null,N=null,_=[],L=0,F=0,P={slowestBatchMs:0},B={deferredCount:0,failedCount:0,abandonedCount:0,totalMs:0,slowestSliceMs:0};function j(t){(R+=1)>1||(O={durationMs:0,stylesheetMs:0,nodeCount:0,cssRuleCount:0,nonDeferrableCssRuleCount:0,deferredStylesheetCount:0},_=[],L=0,N=(t=>t&&t>0?t:null)(t),I=S(),T=k)}function U(){return 0===R?D||{durationMs:0,stylesheetMs:0,nodeCount:0,cssRuleCount:0,nonDeferrableCssRuleCount:0,deferredStylesheetCount:0}:(R-=1)>0?O:(O.durationMs=S()-I,O.deferredStylesheetCount=L,B.deferredCount+=L,N=null,E(O.durationMs,T)?O:D=O)}function W(){return D}function H(t,e,r){var i=t.length;if(r>=32)return i;for(var n=0;t.length>n;n++){var s=t[n];try{var o=s.cssRules;if(o&&o.length)i+=H(o,e,r+1);else if(e&&s.styleSheet){var a=s.styleSheet;if(!e.has(a)){e.add(a);var h=a.rules||a.cssRules;h&&(i+=H(h,e,r+1))}}}catch(t){}}return i}function G(t){if(0!==R){var e=H(t,null,0);O.cssRuleCount+=e,F>0&&(O.nonDeferrableCssRuleCount+=e)}}function z(t){F+=1;try{return t()}finally{F-=1}}function V(t){R>0&&(O.stylesheetMs+=t)}function Y(t){if(0===R||null===N)return!1;var e=O.cssRuleCount-O.nonDeferrableCssRuleCount;return e>=N||e+function(t){try{var e=t&&(t.rules||t.cssRules);if(!e)return 0;var r=new WeakSet;return r.add(t),H(e,r,0)}catch(t){return 0}}(t)>N}function q(){B.failedCount+=1}function Z(t){t>0&&(B.abandonedCount+=t)}function J(){return o({},B)}function X(){return o({},P)}function K(){R=0,I=0,T=0,k=0,C=0,O={durationMs:0,stylesheetMs:0,nodeCount:0,cssRuleCount:0,nonDeferrableCssRuleCount:0,deferredStylesheetCount:0},D=null,N=null,_=[],L=0,F=0,P={slowestBatchMs:0},B={deferredCount:0,failedCount:0,abandonedCount:0,totalMs:0,slowestSliceMs:0}}function Q(t){return Q="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Q(t)}function tt(t,e,r){return(e=function(t){var e=function(t){if("object"!=Q(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Q(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Q(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function et(t){return t.nodeType===t.ELEMENT_NODE}function rt(t){var e=t&&"host"in t&&"mode"in t&&b.host(t)||null;return Boolean(e&&"shadowRoot"in e&&b.shadowRoot(e)===t)}function it(t){try{return t.attachShadow({mode:"open"}),!0}catch(t){return!1}}function nt(t){return"[object ShadowRoot]"==={}.toString.call(t)}function st(t){return t.includes(" background-clip: text;")&&!t.includes(" -webkit-background-clip: text;")&&(t=t.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),t}function ot(t){var e=t.cssText;if(3>e.split('"').length)return e;var r=["@import","url("+JSON.stringify(t.href)+")"];return""===t.layerName?r.push("layer"):t.layerName&&r.push("layer("+t.layerName+")"),t.supportsText&&r.push("supports("+t.supportsText+")"),t.media.length&&r.push(t.media.mediaText),r.join(" ")+";"}var at=0;function ht(t){var e=0===at,r=e?S():0;at+=1;try{var i=t.rules||t.cssRules;if(!i)return null;G(i);var n=t.href;return!n&&t.ownerNode&&(n=t.ownerNode.baseURI),st(Array.from(i,t=>ut(t,n)).join(""))}catch(t){return null}finally{at-=1,e&&V(S()-r)}}function ut(t,e){if(ft(t)){var r;try{r=ht(t.styleSheet)||ot(t)}catch(e){r=t.cssText}try{var i;if(r&&(null===(i=t.styleSheet)||void 0===i?void 0:i.href))return It(r,t.styleSheet.href)}catch(t){}return r}var n=t.cssText;return ct(t)&&t.selectorText.includes(":")&&(n=lt(n)),e?It(n,e):n}function lt(t){return t.replace(/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm,"$1\\$2")}function ft(t){return"styleSheet"in t}function ct(t){return"selectorText"in t}var vt=/^-?[A-Za-z_][\w-]*$/,dt=/^-?[A-Za-z_][\w-]*(\.-?[A-Za-z_][\w-]*)*$/;function pt(t){var e=[],r=!1,i=null,n=new Map;function s(t){var n=e.pop();if("group"===n.kind){if(null===t){for(;e.length>0&&"group"===e[e.length-1].kind;)e.pop();return void s(null)}var a=e[e.length-1];return a.parts.push(t),void(a.index+=1)}if(!n.importRule)return r=!0,void(i=t);o(e[e.length-1],n.importRule,t)}function o(t,e,r){try{var i;try{i=r||ot(e)}catch(t){i=e.cssText}try{var n;i&&(null===(n=e.styleSheet)||void 0===n?void 0:n.href)&&(i=It(i,e.styleSheet.href))}catch(t){}i&&t.parts.push(i),t.index+=1}catch(t){s(null)}}function a(t){var r=t.rules[t.index];if("sheet"===t.kind&&ft(r)){var i=n.get(r);return null===i?(t.parts.push(r.cssText),void(t.index+=1)):i?void e.push({kind:"sheet",sheet:i.sheet,rules:i.rules,sheetHref:i.sheetHref,index:0,parts:[],importRule:r}):void o(t,r,null)}if(!function(t,r){try{var i=function(t){var e=t;if(!e.cssRules||0===e.cssRules.length)return null;if(e.media&&"string"==typeof e.media.mediaText)return"@media "+e.media.mediaText+" {";if(ct(t)){if("number"==typeof e.type&&1!==e.type)return null;var r=e.style?e.style.cssText:"";return t.selectorText+" {"+(r?" "+r:"")}if("containerName"in e)return"string"!=typeof e.containerQuery||e.containerName&&!vt.test(e.containerName)?null:"@container "+(e.containerName?e.containerName+" ":"")+e.containerQuery+" {";if("string"==typeof e.conditionText){var i="";try{var n;i=(null===(n=t.constructor)||void 0===n?void 0:n.name)||""}catch(t){return null}return""===i||"Object"===i||"CSSSupportsRule"===i?"@supports "+e.conditionText+" {":null}return"string"==typeof e.name?"keyText"in e.cssRules[0]?vt.test(e.name)?"@keyframes "+e.name+" {":null:""===e.name?"@layer {":dt.test(e.name)?"@layer "+e.name+" {":null:null}(t);if(null===i)return!1;var n=r.sheetHref;return e.push({kind:"group",rules:Array.from(t.cssRules),sheetHref:n,index:0,parts:[],prelude:n?It(i,n):i,fixColons:"sheet"===r.kind&&ct(t)&&t.selectorText.includes(":")}),!0}catch(t){return!1}}(r,t)){var s=r.cssText;"sheet"===t.kind&&ct(r)&&r.selectorText.includes(":")&&(s=lt(s)),t.parts.push(t.sheetHref?It(s,t.sheetHref):s),t.index+=1}}return function(t){try{var r=t.rules||t.cssRules;if(!r)return!1;G(r);var i=t.href;!i&&t.ownerNode&&(i=t.ownerNode.baseURI);var s=Array.from(r);return e.push({kind:"sheet",sheet:t,rules:s,sheetHref:i,index:0,parts:[],importRule:null}),function(t,e){for(var r=[{sheet:e,rules:t,index:0}],i=function(){var t=r[r.length-1];if(t.index>=t.rules.length)return r.pop(),0;var e=t.rules[t.index];if(t.index+=1,!ft(e)||n.has(e))return 0;var i=null;try{i=e.styleSheet}catch(t){return n.set(e,null),0}if(!i||r.some(t=>t.sheet===i))return 0;try{var s=i.rules||i.cssRules;if(!s)return 0;G(s);var o=i.href;!o&&i.ownerNode&&(o=i.ownerNode.baseURI);var a=Array.from(s);n.set(e,{sheet:i,rules:a,sheetHref:o}),r.push({sheet:i,rules:a,index:0})}catch(t){}};r.length>0;)i()}(s,t),!0}catch(t){return!1}}(t)||(r=!0),{advance(t){if(r)return!0;var n=S(),o=t>0?t:1;try{for(;!r&&o>0;){var h=e[e.length-1];if(h.rules.length>h.index){o-=1;try{a(h)}catch(t){s(null)}}else{var u=null;try{if("group"===h.kind){var l=h.prelude+h.parts.join("")+"}";u=h.fixColons?lt(l):l}else u=st(h.parts.join(""))}catch(t){}s(u)}}}catch(t){r=!0,i=null}finally{V(S()-n)}return r},text:()=>r?i:null,remainingRules(){if(r)return 0;var t=0;for(var i of e)t+=i.rules.length-i.index;return t}}}var mt=class{constructor(){tt(this,"idNodeMap",new Map),tt(this,"nodeMetaMap",new WeakMap)}getId(t){var e,r;return t&&null!==(e=null===(r=this.getMeta(t))||void 0===r?void 0:r.id)&&void 0!==e?e:-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){var e=this.getId(t);if(this.idNodeMap.delete(e),t.childNodes&&t.childNodes.forEach(t=>this.removeNodeFromMap(t)),et(t)){var r=b.shadowRoot(t);r&&this.removeNodeFromMap(r),"IFRAME"===t.nodeName&&t.contentDocument&&this.removeNodeFromMap(t.contentDocument)}}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,e){this.idNodeMap.set(e.id,t),this.nodeMetaMap.set(t,e)}replace(t,e){var r=this.getNode(t);if(r){var i=this.nodeMetaMap.get(r);i&&this.nodeMetaMap.set(e,i)}this.idNodeMap.set(t,e)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function yt(){return new mt}function gt(t){var e=t.element,r=t.maskInputOptions,i=t.tagName,n=t.type,s=t.maskInputFn,o=t.value||"",a=n&&wt(n);return(r[i.toLowerCase()]||a&&r[a])&&(o=s?s(o,e):"*".repeat(o.length)),o}function wt(t){return t.toLowerCase()}var bt=new Set(["rr_width","rr_height","rr_left","rr_top","rr_position","rr_transform","rr_display","rr_scrollleft","rr_scrolltop","rr_mediastate","rr_open_mode"]);function St(t){var e=t.element,r=t.name,i=t.value,n=t.maskAttributeFn,s=t.isGenerated;return i?t.maskAllElementAttributes?void 0!==s&&s&&bt.has(wt(r))?i:"*".repeat(i.length):n?n(r,i,e):i:i}var kt="__rrweb_original__";function Ct(t){try{var e=t.type;return t.hasAttribute("data-rr-is-password")?"password":e?wt(e):null}catch(t){return null}}function Mt(t,e){var r,i;try{i=new URL(t,null!=e?e:window.location.href)}catch(t){return null}var n=i.pathname.match(/\.([0-9a-z]+)(?:$)/i);return null!==(r=null==n?void 0:n[1])&&void 0!==r?r:null}var xt=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,At=/^(?:[a-z+]+:)?\/\//i,Et=/^www\..*/i,Rt=/^(data:)([^,]*),(.*)/i;function It(t,e){return(t||"").replace(xt,(t,r,i,n,s,o)=>{var a,h=i||s||o,u=r||n||"";if(!h)return t;if(At.test(h)||Et.test(h))return"url("+u+h+u+")";if(Rt.test(h))return"url("+u+h+u+")";if("/"===h[0])return"url("+u+(((a=e).indexOf("//")>-1?a.split("/").slice(0,3).join("/"):a.split("/")[0]).split("?")[0]+h)+u+")";var l=e.split("/"),f=h.split("/");for(var c of(l.pop(),f))"."!==c&&(".."===c?l.pop():l.push(c));return"url("+u+l.join("/")+u+")"})}var Tt=new Map,Ot=Object.create,Dt=Object.defineProperty,Nt=Object.getOwnPropertyDescriptor,_t=Object.getOwnPropertyNames,Lt=Object.getPrototypeOf,Ft={}.hasOwnProperty,Pt=(t,e)=>()=>(e||(t((e={exports:{}}).exports,e),t=null),e.exports),Bt=(t,e,r)=>(r=null!=t?Ot(Lt(t)):{},((t,e,r,i)=>{if(e&&"object"==typeof e||"function"==typeof e)for(var n,s=_t(e),o=0,a=s.length;a>o;o++)Ft.call(t,n=s[o])||void 0===n||Dt(t,n,{get:(t=>e[t]).bind(null,n),enumerable:!(i=Nt(e,n))||i.enumerable});return t})(!e&&t&&t.__esModule&&Ft.call(t,"default")?r:Dt(r,"default",{value:t,enumerable:!0}),t)),jt=new RegExp(/(max|min)-device-(width|height)/.source,"g"),Ut={postcssPlugin:"postcss-custom-selectors",prepare(){return{postcssPlugin:"postcss-custom-selectors",AtRule(t){t.params.match(jt)&&(t.params=t.params.replace(jt,"$1-$2"))}}}},Wt={postcssPlugin:"postcss-hover-classes",prepare(){var t=[];return{Rule(e){-1===t.indexOf(e)&&(t.push(e),e.selectors.forEach(function(t){if(t.includes(":hover")){var r=t.replace(new RegExp("(?<!\\\\):hover","g"),".\\:hover");r!==t&&(e.selector+=",\n"+r)}}))}}}},Ht=Pt((t,e)=>{var r=String,i=function(){return{isColorSupported:!1,reset:r,bold:r,dim:r,italic:r,underline:r,inverse:r,hidden:r,strikethrough:r,black:r,red:r,green:r,yellow:r,blue:r,magenta:r,cyan:r,white:r,gray:r,bgBlack:r,bgRed:r,bgGreen:r,bgYellow:r,bgBlue:r,bgMagenta:r,bgCyan:r,bgWhite:r,blackBright:r,redBright:r,greenBright:r,yellowBright:r,blueBright:r,magentaBright:r,cyanBright:r,whiteBright:r,bgBlackBright:r,bgRedBright:r,bgGreenBright:r,bgYellowBright:r,bgBlueBright:r,bgMagentaBright:r,bgCyanBright:r,bgWhiteBright:r}};e.exports=i(),e.exports.createColors=i}),Gt=Pt((t,e)=>{e.exports={}}),zt=Pt((t,e)=>{var r=Ht(),i=Gt(),n=class t extends Error{constructor(e,r,i,n,s,o){super(e),this.name="CssSyntaxError",this.reason=e,s&&(this.file=s),n&&(this.source=n),o&&(this.plugin=o),void 0!==r&&void 0!==i&&("number"==typeof r?(this.line=r,this.column=i):(this.line=r.line,this.column=r.column,this.endLine=i.line,this.endColumn=i.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,t)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",void 0!==this.line&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(t){if(!this.source)return"";var e=this.source;null==t&&(t=r.isColorSupported);var n=t=>t,s=t=>t,o=t=>t;if(t){var a=r.createColors(!0),h=a.bold,u=a.gray,l=a.red;s=t=>h(l(t)),n=t=>u(t),i&&(o=t=>i(t))}var f=e.split(/\r?\n/),c=Math.max(this.line-3,0),v=Math.min(this.line+2,f.length),d=String(v).length;return f.slice(c,v).map((t,e)=>{var r=c+1+e,i=" "+(" "+r).slice(-d)+" | ";if(r===this.line){if(t.length>160){var a=Math.max(0,this.column-20),h=Math.max(this.column+20,this.endColumn+20),u=t.slice(a,h),l=n(i.replace(/\d/g," "))+t.slice(0,Math.min(this.column-1,19)).replace(/[^\t]/g," ");return s(">")+n(i)+o(u)+"\n "+l+s("^")}var f=n(i.replace(/\d/g," "))+t.slice(0,this.column-1).replace(/[^\t]/g," ");return s(">")+n(i)+o(t)+"\n "+f+s("^")}return" "+n(i)+o(t)}).join("\n")}toString(){var t=this.showSourceCode();return t&&(t="\n\n"+t+"\n"),this.name+": "+this.message+t}};e.exports=n,n.default=n}),Vt=Pt((t,e)=>{var r=/(<)(\/?style\b)/gi,i=/(<)(!--)/g,n=/[\t\n\f\r "#'()/;[\\\]{}]/;function s(t){return"string"!=typeof t?t:t.includes("<")?t.replace(r,"\\3c $2").replace(i,"\\3c $2"):t}var o={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function a(t,e){var r="@"+e.name,i=e.params?t.rawValue(e,"params"):"",s=e.raws.afterName;return void 0===s?s=i?" ":"":""===s&&i&&!n.test(i[0])&&(s=" "),r+s+i}function h(t,e,r){for(var i=r.nodes,n=i.length-1;n>0&&"comment"===i[n].type;)n-=1;for(var s=t.raw(r,"semicolon"),o="document"===r.type,a=i.length-1;a>=0;a--){var h=i[a],u=n!==a||s;!u&&i.length-1>a&&("atrule"===h.type&&!h.nodes||"decl"===h.type&&h.prop.startsWith("--"))&&(u=!0),e.push({document:o,node:h,semicolon:u})}}function u(t,e,r,i){var n=t.raw(r,"between","beforeOpen");t.builder(s(i+n)+"{",r,"start");var o=r.nodes&&r.nodes.length,a=()=>{var e=o?t.raw(r,"after"):t.raw(r,"after","emptyBody");e&&t.builder(s(e)),t.builder("}",r,"end"),"rule"===r.type&&r.raws.ownSemicolon&&t.builder(s(r.raws.ownSemicolon),r,"end")};o?(e.push(a),h(t,e,r)):a()}var l=class t{constructor(t){this.builder=t}atrule(t,e){var r=a(this,t);t.nodes?this.block(t,r):this.builder(s(r+((t.raws.between||"")+(e?";":""))),t)}beforeAfter(t,e){var r;r=this.raw(t,null,"decl"===t.type?"beforeDecl":"comment"===t.type?"beforeComment":"before"===e?"beforeRule":"beforeClose");for(var i=t.parent,n=0;i&&"root"!==i.type;)n+=1,i=i.parent;if(r.includes("\n")){var s=this.raw(t,null,"indent");if(s.length)for(var o=0;n>o;o++)r+=s}return r}block(t,e){var r,i=this.raw(t,"between","beforeOpen");this.builder(s(e+i)+"{",t,"start"),t.nodes&&t.nodes.length?(this.body(t),r=this.raw(t,"after")):r=this.raw(t,"after","emptyBody"),r&&this.builder(s(r)),this.builder("}",t,"end")}body(e){var r=t.prototype,i=["atrule","block","body","rule","stringify"].every(t=>this[t]===r[t]),n=[];for(h(this,n,e);n.length>0;){var o=n.pop();if("function"!=typeof o){var l=o.node,f=this.raw(l,"before");f&&this.builder(o.document?f:s(f)),i&&"rule"===l.type?u(this,n,l,this.rawValue(l,"selector")):i&&"atrule"===l.type&&l.nodes?u(this,n,l,a(this,l)):this.stringify(l,o.semicolon)}else o()}}comment(t){var e=this.raw(t,"left","commentLeft"),r=this.raw(t,"right","commentRight");this.builder(s("/*"+e+t.text+r+"*/"),t)}decl(t,e){var r=t.raws,i=this.raw(t,"between","colon"),n=t.prop+i+this.rawValue(t,"value");t.important&&(n+=r.important||" !important"),e&&(n+=";"),this.builder(s(n),t)}document(t){this.body(t)}raw(t,e,r){var i;if(r||(r=e),e&&void 0!==(i=t.raws[e]))return i;var n=t.parent;if("before"===r){if(!n||"root"===n.type&&n.first===t)return"";if(n&&"document"===n.type)return""}if(!n)return o[r];var s=t.root(),a=s.rawCache||(s.rawCache={});if(void 0!==a[r])return a[r];if("before"===r||"after"===r)return this.beforeAfter(t,r);var h,u="raw"+((h=r)[0].toUpperCase()+h.slice(1));return this[u]?i=this[u](s,t):s.walk(t=>{if(void 0!==(i=t.raws[e]))return!1}),void 0===i&&(i=o[r]),a[r]=i,i}rawBeforeClose(t){var e;return t.walk(t=>{if(t.nodes&&t.nodes.length>0&&void 0!==t.raws.after)return(e=t.raws.after).includes("\n")&&(e=e.replace(/[^\n]+$/,"")),!1}),e&&(e=e.replace(/\S/g,"")),e}rawBeforeComment(t,e){var r;return t.walkComments(t=>{if(void 0!==t.raws.before)return(r=t.raws.before).includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1}),void 0===r?r=this.raw(e,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeDecl(t,e){var r;return t.walkDecls(t=>{if(void 0!==t.raws.before)return(r=t.raws.before).includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1}),void 0===r?r=this.raw(e,null,"beforeRule"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeOpen(t){var e;return t.walk(t=>{if("decl"!==t.type&&void 0!==(e=t.raws.between))return!1}),e}rawBeforeRule(t){var e;return t.walk(r=>{if(r.nodes&&(r.parent!==t||t.first!==r)&&void 0!==r.raws.before)return(e=r.raws.before).includes("\n")&&(e=e.replace(/[^\n]+$/,"")),!1}),e&&(e=e.replace(/\S/g,"")),e}rawColon(t){var e;return t.walkDecls(t=>{if(void 0!==t.raws.between)return e=t.raws.between.replace(/[^\s:]/g,""),!1}),e}rawEmptyBody(t){var e;return t.walk(t=>{if(t.nodes&&0===t.nodes.length&&void 0!==(e=t.raws.after))return!1}),e}rawIndent(t){return t.raws.indent?t.raws.indent:(t.walk(r=>{var i=r.parent;if(i&&i!==t&&i.parent&&i.parent===t&&void 0!==r.raws.before){var n=r.raws.before.split("\n");return e=(e=n[n.length-1]).replace(/\S/g,""),!1}}),e);var e}rawSemicolon(t){var e;return t.walk(t=>{if(t.nodes&&t.nodes.length&&"decl"===t.last.type&&void 0!==(e=t.raws.semicolon))return!1}),e}rawValue(t,e){var r=t[e],i=t.raws[e];return i&&i.value===r?i.raw:r}root(t){if(t.source&&t.source.input.hasBOM&&this.builder("\ufeff",t,"start"),this.body(t),t.raws.after){var e=t.raws.after;this.builder(t.parent&&"document"===t.parent.type?e:s(e))}}rule(t){this.block(t,this.rawValue(t,"selector")),t.raws.ownSemicolon&&this.builder(s(t.raws.ownSemicolon),t,"end")}stringify(t,e){if(!this[t.type])throw new Error("Unknown AST node type "+t.type+". Maybe you need to change PostCSS stringifier.");this[t.type](t,e)}};e.exports=l,l.default=l}),$t=Pt((t,e)=>{var r=Vt();function i(t,e){new r(e).stringify(t)}e.exports=i,i.default=i}),Yt=Pt((t,e)=>{e.exports.isClean=Symbol("isClean"),e.exports.my=Symbol("my")}),qt=Pt((t,e)=>{var r=zt(),i=Vt(),n=$t(),s=Yt(),o=s.isClean,a=s.my;function h(t,e){if(e&&void 0!==e.offset)return e.offset;for(var r=1,i=1,n=0,s=0;t.length>s;s++){if(i===e.line&&r===e.column){n=s;break}"\n"===t[s]?(r=1,i+=1):r+=1}return n}var u=class t{get proxyOf(){return this}constructor(t){for(var e of(void 0===t&&(t={}),this.raws={},this[o]=!1,this[a]=!0,Object.keys(t)))if("__proto__"!==e)if("nodes"===e)for(var r of(this.nodes=[],t[e]))this.append("function"==typeof r.clone&&r.parent?r.clone():r);else this[e]=t[e]}addToError(t){if(t.postcssNode=this,t.stack&&this.source&&/\n\s{4}at /.test(t.stack)){var e=this.source;t.stack=t.stack.replace(/\n\s{4}at /,"$&"+e.input.from+":"+e.start.line+":"+e.start.column+"$&")}return t}after(t){return this.parent.insertAfter(this,t),this}assign(t){for(var e in void 0===t&&(t={}),t)this[e]=t[e];return this}before(t){return this.parent.insertBefore(this,t),this}cleanRaws(t){delete this.raws.before,delete this.raws.after,t||delete this.raws.between}clone(t){void 0===t&&(t={});var e=function(t){for(var e=new t.constructor,r=[[t,e,void 0]];r.length>0;){var i=r.pop(),n=i[0],s=i[1],o=i[2];for(var a in n)if({}.hasOwnProperty.call(n,a)&&"proxyCache"!==a){var h=n[a],u=typeof h;if("parent"===a&&"object"===u)o&&(s[a]=o);else if("source"===a)s[a]=h;else if(Array.isArray(h)){var l=[];for(var f of(s[a]=l,h)){var c=new f.constructor;l.push(c),r.push([f,c,s])}}else{if("object"===u&&null!==h){var v=new h.constructor;r.push([h,v,void 0]),h=v}s[a]=h}}}return e}(this);for(var r in t)e[r]=t[r];return e}cloneAfter(t){void 0===t&&(t={});var e=this.clone(t);return this.parent.insertAfter(this,e),e}cloneBefore(t){void 0===t&&(t={});var e=this.clone(t);return this.parent.insertBefore(this,e),e}error(t,e){if(void 0===e&&(e={}),this.source){var i=this.rangeBy(e),n=i.end,s=i.start;return this.source.input.error(t,{column:s.column,line:s.line},{column:n.column,line:n.line},e)}return new r(t)}getProxyProcessor(){return{get(t,e){return"proxyOf"===e?t:"root"===e?()=>t.root().toProxy():t[e]},set(t,e,r){return t[e]===r||(t[e]=r,"prop"!==e&&"value"!==e&&"name"!==e&&"params"!==e&&"important"!==e&&"text"!==e||t.markDirty()),!0}}}markClean(){this[o]=!0}markDirty(){if(this[o]){this[o]=!1;for(var t=this;t=t.parent;)t[o]=!1}}next(){if(this.parent){var t=this.parent.index(this);return this.parent.nodes[t+1]}}positionBy(t){void 0===t&&(t={});var e="document"in this.source.input?this.source.input.document:this.source.input.css,r={column:this.source.start.column,line:this.source.start.line,offset:h(e,this.source.start)};if(t.index)r=this.positionInside(t.index);else if(t.word){var i=e.slice(h(e,this.source.start),h(e,this.source.end)).indexOf(t.word);-1!==i&&(r=this.positionInside(i))}return r}positionInside(t){for(var e=this.source.start.column,r=this.source.start.line,i=("document"in this.source.input?this.source.input.document:this.source.input.css),n=h(i,this.source.start),s=n+t,o=n;s>o;o++)"\n"===i[o]?(e=1,r+=1):e+=1;return{column:e,line:r,offset:s}}prev(){if(this.parent){var t=this.parent.index(this);return this.parent.nodes[t-1]}}rangeBy(t){void 0===t&&(t={});var e="document"in this.source.input?this.source.input.document:this.source.input.css,r={column:this.source.start.column,line:this.source.start.line,offset:h(e,this.source.start)},i=this.source.end?{column:this.source.end.column+1,line:this.source.end.line,offset:"number"==typeof this.source.end.offset?this.source.end.offset:h(e,this.source.end)+1}:{column:r.column+1,line:r.line,offset:r.offset+1};if(t.word){var n=e.slice(h(e,this.source.start),h(e,this.source.end)).indexOf(t.word);-1!==n&&(r=this.positionInside(n),i=this.positionInside(n+t.word.length))}else t.start?r={column:t.start.column,line:t.start.line,offset:h(e,t.start)}:"number"==typeof t.index&&(r=this.positionInside(t.index)),t.end?i={column:t.end.column,line:t.end.line,offset:h(e,t.end)}:"number"==typeof t.endIndex?i=this.positionInside(t.endIndex):"number"==typeof t.index&&(i=this.positionInside(t.index+1));return(r.line>i.line||i.line===r.line&&r.column>=i.column)&&(i={column:r.column+1,line:r.line,offset:r.offset+1}),{end:i,start:r}}raw(t,e){return(new i).raw(this,t,e)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(){if(this.parent){for(var t=this,e=!1,r=arguments.length,i=new Array(r),n=0;r>n;n++)i[n]=arguments[n];for(var s of i)s===this?e=!0:e?(this.parent.insertAfter(t,s),t=s):this.parent.insertBefore(t,s);e||this.remove()}return this}root(){for(var t=this;t.parent&&"document"!==t.parent.type;)t=t.parent;return t}toJSON(e,r){var i=null==r;r=r||new Map;for(var n=[],s=[[this,n,0]],o=0;s.length>o;o++){var a=s[o],h=a[0],u=a[1],l=a[2],f={};for(var c in u[l]=f,h)if({}.hasOwnProperty.call(h,c)&&"parent"!==c&&"proxyCache"!==c){var v=h[c];if(Array.isArray(v)){var d=[];f[c]=d;for(var p=0;v.length>p;p++){var m=v[p];"object"==typeof m&&m.toJSON?m.toJSON===t.prototype.toJSON?s.push([m,d,p]):d[p]=m.toJSON(null,r):d[p]=m}}else if("object"==typeof v&&v.toJSON)v.toJSON===t.prototype.toJSON?s.push([v,f,c]):f[c]=v.toJSON(null,r);else if("source"===c){if(null==v)continue;var y=r.get(v.input);null==y&&r.set(v.input,y=r.size),f[c]={end:v.end,inputId:y,start:v.start}}else f[c]=v}}var g=n[0];return i&&(g.inputs=[...r.keys()].map(t=>t.toJSON())),g}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(t){void 0===t&&(t=n),t.stringify&&(t=t.stringify);var e="";return t(this,t=>{e+=t}),e}warn(t,e,r){void 0===r&&(r={});var i={node:this};for(var n in r)i[n]=r[n];return t.warn(e,i)}};e.exports=u,u.default=u}),Zt=Pt((t,e)=>{var r=qt(),i=class extends r{constructor(t){super(t),this.type="comment"}};e.exports=i,i.default=i}),Jt=Pt((t,e)=>{var r=qt(),i=class extends r{get variable(){return this.prop.startsWith("--")||"$"===this.prop[0]}constructor(t){t&&void 0!==t.value&&"string"!=typeof t.value&&(t=o({},t,{value:String(t.value)})),super(t),this.type="decl"}};e.exports=i,i.default=i}),Xt=Pt((t,e)=>{var r,i,n,s,o=Zt(),a=Jt(),h=qt(),u=Yt(),l=u.isClean,f=u.my,c=class t extends h{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]}append(){for(var t=arguments.length,e=new Array(t),r=0;t>r;r++)e[r]=arguments[r];for(var i of e)for(var n of this.normalize(i,this.last))this.proxyOf.nodes.push(n);return this.markDirty(),this}cleanRaws(e){for(var r=[this];r.length>0;){var i=r.pop();if(i===this||i.cleanRaws===t.prototype.cleanRaws){if(h.prototype.cleanRaws.call(i,e),i.nodes)for(var n of i.nodes)r.push(n)}else i.cleanRaws(e)}}each(t){if(this.proxyOf.nodes){for(var e,r,i=this.getIterator();this.proxyOf.nodes.length>this.indexes[i]&&!1!==(r=t(this.proxyOf.nodes[e=this.indexes[i]],e));)this.indexes[i]+=1;return delete this.indexes[i],r}}every(t){return this.nodes.every(t)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;var t=this.lastEach;return this.indexes[t]=0,t}getProxyProcessor(){return{get(t,e){return"proxyOf"===e?t:t[e]?"each"===e||"string"==typeof e&&e.startsWith("walk")?function(){for(var r=arguments.length,i=new Array(r),n=0;r>n;n++)i[n]=arguments[n];return t[e](...i.map(t=>"function"==typeof t?(e,r)=>t(e.toProxy(),r):t))}:"every"===e||"some"===e?r=>t[e](function(t){for(var e=arguments.length,i=new Array(e>1?e-1:0),n=1;e>n;n++)i[n-1]=arguments[n];return r(t.toProxy(),...i)}):"root"===e?()=>t.root().toProxy():"nodes"===e?t.nodes.map(t=>t.toProxy()):"first"===e||"last"===e?t[e].toProxy():t[e]:t[e]},set(t,e,r){return t[e]===r||(t[e]=r,"name"!==e&&"params"!==e&&"selector"!==e||t.markDirty()),!0}}}index(t){return"number"==typeof t?t:(t.proxyOf&&(t=t.proxyOf),this.proxyOf.nodes.indexOf(t))}insertAfter(t,e){var r,i=this.index(t),n=this.normalize(e,this.proxyOf.nodes[i]).reverse();for(var s of(i=this.index(t),n))this.proxyOf.nodes.splice(i+1,0,s);for(var o in this.indexes)(r=this.indexes[o])>i&&(this.indexes[o]=r+n.length);return this.markDirty(),this}insertBefore(t,e){var r,i=this.index(t),n=this.normalize(e,this.proxyOf.nodes[i],0===i&&"prepend").reverse();for(var s of(i=this.index(t),n))this.proxyOf.nodes.splice(i,0,s);for(var o in this.indexes)i>(r=this.indexes[o])||(this.indexes[o]=r+n.length);return this.markDirty(),this}normalize(e,n){if("string"==typeof e)e=function(t){for(var e=t.slice();e.length>0;){var r=e.pop();if(delete r.source,r.nodes)for(var i of(r.nodes=r.nodes.slice(),r.nodes))e.push(i)}return t.slice()}(i(e).nodes);else if(void 0===e)e=[];else if(Array.isArray(e))for(var h of e=e.slice(0))h.parent&&h.parent.removeChild(h,"ignore");else if("root"===e.type&&"document"!==this.type)for(var u of e=e.nodes.slice(0))u.parent&&u.parent.removeChild(u,"ignore");else if(e.type)e=[e];else if(e.prop){if(void 0===e.value)throw new Error("Value field is missed in node creation");"string"!=typeof e.value&&(e.value=String(e.value)),e=[new a(e)]}else if(e.selector||e.selectors)e=[new s(e)];else if(e.name)e=[new r(e)];else{if(!e.text)throw new Error("Unknown node type in node creation");e=[new o(e)]}return e.map(e=>(e[f]||t.rebuild(e),(e=e.proxyOf).parent&&e.parent.removeChild(e),e[l]&&function(t){for(var e=[t];e.length>0;){var r=e.pop();if(r[l]=!1,r.proxyOf.nodes)for(var i of r.proxyOf.nodes)e.push(i)}}(e),e.raws||(e.raws={}),void 0===e.raws.before&&n&&void 0!==n.raws.before&&(e.raws.before=n.raws.before.replace(/\S/g,"")),e.parent=this.proxyOf,e))}prepend(){for(var t=arguments.length,e=new Array(t),r=0;t>r;r++)e[r]=arguments[r];for(var i of e=e.reverse()){var n=this.normalize(i,this.first,"prepend").reverse();for(var s of n)this.proxyOf.nodes.unshift(s);for(var o in this.indexes)this.indexes[o]=this.indexes[o]+n.length}return this.markDirty(),this}push(t){return t.parent=this,this.proxyOf.nodes.push(t),this}removeAll(){for(var t of this.proxyOf.nodes)t.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(t){var e;for(var r in t=this.index(t),this.proxyOf.nodes[t].parent=void 0,this.proxyOf.nodes.splice(t,1),this.indexes)t>(e=this.indexes[r])||(this.indexes[r]=e-1);return this.markDirty(),this}replaceValues(t,e,r){return r||(r=e,e={}),this.walkDecls(i=>{e.props&&!e.props.includes(i.prop)||e.fast&&!i.value.includes(e.fast)||(i.value=i.value.replace(t,r))}),this.markDirty(),this}some(t){return this.nodes.some(t)}walk(t){if(this.proxyOf.nodes)for(var e=[{iterator:this.getIterator(),node:this.proxyOf}];e.length>0;){var r=e[e.length-1],i=r.iterator,n=r.node,s=n.indexes[i];if(n.proxyOf.nodes.length>s){var o=n.proxyOf.nodes[s],a=void 0;try{a=t(o,s)}catch(t){throw o.addToError(t)}if(!1===a){for(var h of e)delete h.node.indexes[h.iterator];return!1}o.walk&&o.proxyOf.nodes?e.push({iterator:o.getIterator(),node:o}):n.indexes[i]+=1}else{delete n.indexes[i],e.pop();var u=e[e.length-1];u&&(u.node.indexes[u.iterator]+=1)}}}walkAtRules(t,e){return e?t instanceof RegExp?this.walk((r,i)=>{if("atrule"===r.type&&t.test(r.name))return e(r,i)}):this.walk((r,i)=>{if("atrule"===r.type&&r.name===t)return e(r,i)}):(e=t,this.walk((t,r)=>{if("atrule"===t.type)return e(t,r)}))}walkComments(t){return this.walk((e,r)=>{if("comment"===e.type)return t(e,r)})}walkDecls(t,e){return e?t instanceof RegExp?this.walk((r,i)=>{if("decl"===r.type&&t.test(r.prop))return e(r,i)}):this.walk((r,i)=>{if("decl"===r.type&&r.prop===t)return e(r,i)}):(e=t,this.walk((t,r)=>{if("decl"===t.type)return e(t,r)}))}walkRules(t,e){return e?t instanceof RegExp?this.walk((r,i)=>{if("rule"===r.type&&t.test(r.selector))return e(r,i)}):this.walk((r,i)=>{if("rule"===r.type&&r.selector===t)return e(r,i)}):(e=t,this.walk((t,r)=>{if("rule"===t.type)return e(t,r)}))}};c.registerParse=t=>{i=t},c.registerRule=t=>{s=t},c.registerAtRule=t=>{r=t},c.registerRoot=t=>{n=t},e.exports=c,c.default=c,c.rebuild=t=>{for(var e=[t];e.length>0;){var i=e.pop();if("atrule"===i.type?Object.setPrototypeOf(i,r.prototype):"rule"===i.type?Object.setPrototypeOf(i,s.prototype):"decl"===i.type?Object.setPrototypeOf(i,a.prototype):"comment"===i.type?Object.setPrototypeOf(i,o.prototype):"root"===i.type&&Object.setPrototypeOf(i,n.prototype),i[f]=!0,i.nodes)for(var h of i.nodes)e.push(h)}}}),Kt=Pt((t,e)=>{var r=Xt(),i=class extends r{constructor(t){super(t),this.type="atrule"}append(){return this.proxyOf.nodes||(this.nodes=[]),super.append(...arguments)}prepend(){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...arguments)}};e.exports=i,i.default=i,r.registerAtRule(i)}),Qt=Pt((t,e)=>{var r,i,n=Xt(),s=class extends n{constructor(t){super(o({type:"document"},t)),this.nodes||(this.nodes=[])}toResult(t){return void 0===t&&(t={}),new r(new i,this,t).stringify()}};s.registerLazyResult=t=>{r=t},s.registerProcessor=t=>{i=t},e.exports=s,s.default=s}),te=Pt((t,e)=>{e.exports={nanoid(t){void 0===t&&(t=21);for(var e="",r=0|t;r-- >0;)e+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return e},customAlphabet:(t,e)=>(void 0===e&&(e=21),function(r){void 0===r&&(r=e);for(var i="",n=0|r;n-- >0;)i+=t[Math.random()*t.length|0];return i})}}),ee=Pt((t,e)=>{var r=Gt(),i=r.existsSync,n=r.readFileSync,s=Gt(),o=s.dirname,a=s.isAbsolute,h=s.join,u=s.relative,l=s.sep,f=Gt(),c=f.SourceMapConsumer,v=f.SourceMapGenerator,d=class{constructor(t,e){if(!1!==e.map){e.unsafeMap&&(this.unsafeMap=!0),this.loadAnnotation(t),this.inline=this.startWith(this.annotation,"data:");var r=this.loadMap(e.from,e.map?e.map.prev:void 0);!this.mapFile&&e.from&&(this.mapFile=e.from),this.mapFile&&(this.root=o(this.mapFile)),r&&(this.text=r)}}consumer(){return this.consumerCache||(this.consumerCache=new c(this.json||this.text)),this.consumerCache}decodeInline(t){var e=t.match(/^data:application\/json;charset=utf-?8,/)||t.match(/^data:application\/json,/);if(e)return decodeURIComponent(t.substr(e[0].length));var r,i=t.match(/^data:application\/json;charset=utf-?8;base64,/)||t.match(/^data:application\/json;base64,/);if(i)return r=t.substr(i[0].length),Buffer?Buffer.from(r,"base64").toString():window.atob(r);var n=t.slice(22);throw n=n.slice(0,n.indexOf(",")),new Error("Unsupported source map encoding "+n)}getAnnotationURL(t){return t.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(t){return"object"==typeof t&&("string"==typeof t.mappings||"string"==typeof t._mappings||Array.isArray(t.sections))}loadAnnotation(t){var e=t.match(/\/\*\s*# sourceMappingURL=/g);if(e){var r=t.lastIndexOf(e.pop()),i=t.indexOf("*/",r);r>-1&&i>-1&&(this.annotation=this.getAnnotationURL(t.substring(r,i)))}}loadFile(t,e,r){if(!r&&!this.unsafeMap){if(!/\.map$/i.test(t))return;if(!e)return;var s=u(o(e),t);if(".."===s||s.startsWith(".."+l)||a(s))return}if(this.root=o(t),i(t))return this.mapFile=t,n(t,"utf-8").toString().trim()}loadMap(t,e){if(!1===e)return!1;if(e){if("string"==typeof e)return e;if("function"!=typeof e){if(e instanceof c)return v.fromSourceMap(e).toString();if(e instanceof v)return e.toString();if(this.isMap(e))return JSON.stringify(e);throw new Error("Unsupported previous source map format: "+e.toString())}var r=e(t);if(r){var i=this.loadFile(r,t,!0);if(!i)throw new Error("Unable to load previous source map: "+r.toString());return i}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){var n=this.annotation;t&&(n=h(o(t),n));var s=this.loadFile(n,t,!1);if(s)try{this.json=JSON.parse(s.replace(/^\)]}'[^\n]*\n/,""))}catch(t){return}return s}}}startWith(t,e){return!!t&&t.substr(0,e.length)===e}withContent(){return!(!this.consumer().sourcesContent||0>=this.consumer().sourcesContent.length)}};e.exports=d,d.default=d}),re=Pt((t,e)=>{var r=te().nanoid,i=Gt(),n=i.isAbsolute,s=i.resolve,a=Gt(),h=a.SourceMapConsumer,u=a.SourceMapGenerator,l=Gt(),f=l.fileURLToPath,c=l.pathToFileURL,v=zt(),d=ee(),p=Gt(),m=Symbol("lineToIndexCache"),y=Boolean(h&&u),g=Boolean(s&&n);function w(t){if(t[m])return t[m];for(var e=t.css.split("\n"),r=new Array(e.length),i=0,n=0,s=e.length;s>n;n++)r[n]=i,i+=e[n].length+1;return t[m]=r,r}var b=class{get from(){return this.file||this.id}constructor(t,e){if(void 0===e&&(e={}),null==t||"object"==typeof t&&!t.toString)throw new Error("PostCSS received "+t+" instead of CSS string");if(this.css=t.toString(),"\ufeff"===this.css[0]||""===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,this.document=this.css,e.document&&(this.document=e.document.toString()),e.from&&(this.file=!g||/^\w+:\/\//.test(e.from)||n(e.from)?e.from:s(e.from)),g&&y){var i=new d(this.css,e);if(i.text){this.map=i;var o=i.consumer().file;!this.file&&o&&(this.file=this.mapResolve(o))}}this.file||(this.id="<input css "+r(6)+">"),this.map&&(this.map.file=this.from)}error(t,e,r,i){var n,s,o,a,h;if(void 0===i&&(i={}),e&&"object"==typeof e){var u=e,l=r;if("number"==typeof u.offset){var f=this.fromOffset(a=u.offset);e=f.line,r=f.col}else a=this.fromLineAndColumn(e=u.line,r=u.column);if("number"==typeof l.offset){var d=this.fromOffset(o=l.offset);s=d.line,n=d.col}else s=l.line,n=l.column,o=this.fromLineAndColumn(l.line,l.column)}else if(r)a=this.fromLineAndColumn(e,r);else{var p=this.fromOffset(a=e);e=p.line,r=p.col}var m=this.origin(e,r,s,n);return(h=m?new v(t,void 0===m.endLine?m.line:{column:m.column,line:m.line},void 0===m.endLine?m.column:{column:m.endColumn,line:m.endLine},m.source,m.file,i.plugin):new v(t,void 0===s?e:{column:r,line:e},void 0===s?r:{column:n,line:s},this.css,this.file,i.plugin)).input={column:r,endColumn:n,endLine:s,endOffset:o,line:e,offset:a,source:this.css},this.file&&(c&&(h.input.url=c(this.file).toString()),h.input.file=this.file),h}fromLineAndColumn(t,e){return w(this)[t-1]+e-1}fromOffset(t){var e=w(this),r=0;if(e[e.length-1]>t)for(var i,n=e.length-2;n>r;)if(e[i=r+(n-r>>1)]>t)n=i-1;else{if(e[i+1]>t){r=i;break}r=i+1}else r=e.length-1;return{col:t-e[r]+1,line:r+1}}mapResolve(t){return/^\w+:\/\//.test(t)?t:s(this.map.consumer().sourceRoot||this.map.root||".",t)}origin(t,e,r,i){if(!this.map)return!1;var s,o,a=this.map.consumer(),h=a.originalPositionFor({column:e-1,line:t});if(!h.source)return!1;if("number"==typeof r){var u=a.originalPositionFor({column:i-1,line:r});u.source&&(s=u)}o=n(h.source)?c(h.source):new URL(h.source,this.map.consumer().sourceRoot||c(this.map.mapFile));var l={column:h.column+1,endColumn:s&&s.column+1,endLine:s&&s.line,line:h.line,url:o.toString()};if("file:"===o.protocol){if(!f)throw new Error("file: protocol is not available in this PostCSS build");l.file=f(o)}var v=a.sourceContentFor(h.source);return v&&(l.source=v),l}toJSON(){var t={};for(var e of["hasBOM","css","file","id"])null!=this[e]&&(t[e]=this[e]);return this.map&&(t.map=o({},this.map),t.map.consumerCache&&(t.map.consumerCache=void 0)),t}};e.exports=b,b.default=b,p&&p.registerInput&&p.registerInput(b)}),ie=Pt((t,e)=>{var r,i,n=Xt(),s=class extends n{constructor(t){super(t),this.type="root",this.nodes||(this.nodes=[])}normalize(t,e,r){var i=new Set;for(var n of Array.isArray(t)?t:[t])n&&"object"==typeof n&&!n.parent&&n.raws&&void 0!==n.raws.before&&i.add(n.raws);var s=super.normalize(t);if(e)if("prepend"===r)this.nodes.length>1?e.raws.before=this.nodes[1].raws.before:delete e.raws.before;else if(this.first!==e)for(var o of s)i.has(o.raws)||(o.raws.before=e.raws.before);return s}removeChild(t,e){var r=this.index(t);return!e&&0===r&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(t)}toResult(t){return void 0===t&&(t={}),new r(new i,this,t).stringify()}};s.registerLazyResult=t=>{r=t},s.registerProcessor=t=>{i=t},e.exports=s,s.default=s,n.registerRoot(s)}),ne=Pt((t,e)=>{var r={comma(t){return r.split(t,[","],!0)},space(t){return r.split(t,[" ","\n","\t"])},split(t,e,r){var i=[],n="",s=!1,o=0,a=!1,h="",u=!1;for(var l of t)u?u=!1:"\\"===l?u=!0:a?l===h&&(a=!1):'"'===l||"'"===l?(a=!0,h=l):"("===l?o+=1:")"===l?o>0&&(o-=1):0===o&&e.includes(l)&&(s=!0),s?(""!==n&&i.push(n.trim()),n="",s=!1):n+=l;return(r||""!==n)&&i.push(n.trim()),i}};e.exports=r,r.default=r}),se=Pt((t,e)=>{var r=Xt(),i=ne(),n=class extends r{get selectors(){return i.comma(this.selector)}set selectors(t){var e=this.selector?this.selector.match(/,\s*/):null,r=e?e[0]:","+this.raw("between","beforeOpen");this.selector=t.join(r)}constructor(t){super(t),this.type="rule",this.nodes||(this.nodes=[])}};e.exports=n,n.default=n,r.registerRule(n)}),oe=Pt((e,r)=>{var i=Kt(),n=Zt(),a=Jt(),h=re(),u=ee(),l=ie(),f=se();function c(t,e){return t.inputs?t.inputs.map(t=>{var e=o({},t,{__proto__:h.prototype});return e.map&&(e.map=o({},e.map,{__proto__:u.prototype})),e}):e}function v(e,r,h){var u,c=o({},e);if(delete c.inputs,delete c.nodes,c.source){var v=c.source,d=v.inputId;c.source=s(v,t),null!=d&&(c.source.input=r[d])}if("root"===c.type)u=new l(c);else if("decl"===c.type)u=new a(c);else if("rule"===c.type)u=new f(c);else if("comment"===c.type)u=new n(c);else{if("atrule"!==c.type)throw new Error("Unknown node type: "+e.type);u=new i(c)}if(h)for(var p of(u.nodes=h,h))p.parent=u;return u}function d(t,e){if(Array.isArray(t))return t.map(t=>d(t));for(var r,i=[{childIndex:0,children:[],inputs:c(t,e),json:t}];i.length>0;){var n=i[i.length-1],s=n.json.nodes;if(s&&s.length>n.childIndex){var o=s[n.childIndex];n.childIndex+=1,i.push({childIndex:0,children:[],inputs:c(o,n.inputs),json:o})}else{i.pop();var a=v(n.json,n.inputs,s?n.children:void 0);i.length>0?i[i.length-1].children.push(a):r=a}}return r}r.exports=d,d.default=d}),ae=Pt((t,e)=>{var r=Gt(),i=r.dirname,n=r.relative,s=r.resolve,o=r.sep,a=Gt(),h=a.SourceMapConsumer,u=a.SourceMapGenerator,l=Gt().pathToFileURL,f=re(),c=Boolean(h&&u),v=Boolean(i&&s&&n&&o);e.exports=class{constructor(t,e,r,i){this.stringify=t,this.mapOpts=r.map||{},this.root=e,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(){var t;t=this.isInline()?"data:application/json;base64,"+this.toBase64(this.map.toString()):"string"==typeof this.mapOpts.annotation?this.mapOpts.annotation:"function"==typeof this.mapOpts.annotation?this.mapOpts.annotation(this.opts.to,this.root):this.outputFile()+".map";var e="\n";this.css.includes("\r\n")&&(e="\r\n"),this.css+=e+"/*# sourceMappingURL="+t+" */"}applyPrevMaps(){for(var t of this.previous()){var e=this.toUrl(this.path(t.file)),r=t.root||i(t.file),n=void 0;!1===this.mapOpts.sourcesContent?(n=new h(t.text)).sourcesContent&&(n.sourcesContent=null):n=t.consumer(),this.map.applySourceMap(n,e,this.toUrl(this.path(r)))}}clearAnnotation(){if(!1!==this.mapOpts.annotation)if(this.root)for(var t,e=this.root.nodes.length-1;e>=0;e--)"comment"===(t=this.root.nodes[e]).type&&t.text.startsWith("# sourceMappingURL=")&&this.root.removeChild(e);else if(this.css)for(var r;-1!==(r=this.css.lastIndexOf("/*#"));){var i=this.css.indexOf("*/",r+3);if(-1===i)break;for(;r>0&&"\n"===this.css[r-1];)r--;this.css=this.css.slice(0,r)+this.css.slice(i+2)}}generate(){if(this.clearAnnotation(),v&&c&&this.isMap())return this.generateMap();var t="";return this.stringify(this.root,e=>{t+=e}),[t]}generateMap(){if(this.root)this.generateString();else if(1===this.previous().length){var t=this.previous()[0].consumer();t.file=this.outputFile(),this.map=u.fromSourceMap(t,{ignoreInvalidMapping:!0})}else this.map=new u({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css="",this.map=new u({file:this.outputFile(),ignoreInvalidMapping:!0});var t,e,r=1,i=1,n="<no source>",s={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,(o,a,h)=>{if(this.css+=o,a&&"end"!==h&&(s.generated.line=r,s.generated.column=i-1,a.source&&a.source.start?(s.source=this.sourcePath(a),s.original.line=a.source.start.line,s.original.column=a.source.start.column-1,this.map.addMapping(s)):(s.source=n,s.original.line=1,s.original.column=0,this.map.addMapping(s))),(e=o.match(/\n/g))?(r+=e.length,t=o.lastIndexOf("\n"),i=o.length-t):i+=o.length,a&&"start"!==h){var u=a.parent||{raws:{}};("decl"!==a.type&&("atrule"!==a.type||a.nodes)||a!==u.last||u.raws.semicolon)&&(a.source&&a.source.end?(s.source=this.sourcePath(a),s.original.line=a.source.end.line,s.original.column=a.source.end.column-1,s.generated.line=r,s.generated.column=i-2,this.map.addMapping(s)):(s.source=n,s.original.line=1,s.original.column=0,s.generated.line=r,s.generated.column=i-1,this.map.addMapping(s)))}})}isAnnotation(){return!!this.isInline()||(void 0!==this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some(t=>t.annotation))}isInline(){if(void 0!==this.mapOpts.inline)return this.mapOpts.inline;var t=this.mapOpts.annotation;return(void 0===t||!0===t)&&(!this.previous().length||this.previous().some(t=>t.inline))}isMap(){return void 0!==this.opts.map?!!this.opts.map:this.previous().length>0}isSourcesContent(){return void 0!==this.mapOpts.sourcesContent?this.mapOpts.sourcesContent:!this.previous().length||this.previous().some(t=>t.withContent())}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(t){if(this.mapOpts.absolute)return t;if(60===t.charCodeAt(0))return t;if(/^\w+:\/\//.test(t))return t;var e=this.memoizedPaths.get(t);if(e)return e;var r=this.opts.to?i(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(r=i(s(r,this.mapOpts.annotation)));var o=n(r,t);return this.memoizedPaths.set(t,o),o}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(t=>{if(t.source&&t.source.input.map){var e=t.source.input.map;this.previousMaps.includes(e)||this.previousMaps.push(e)}});else{var t=new f(this.originalCSS,this.opts);t.map&&this.previousMaps.push(t.map)}return this.previousMaps}setSourcesContent(){var t={};if(this.root)this.root.walk(e=>{if(e.source){var r=e.source.input.from;if(r&&!t[r]){t[r]=!0;var i=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(i,e.source.input.css)}}});else if(this.css){var e=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(e,this.css)}}sourcePath(t){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(t.source.input.from):this.toUrl(this.path(t.source.input.from))}toBase64(t){return Buffer?Buffer.from(t).toString("base64"):window.btoa(unescape(encodeURIComponent(t)))}toFileUrl(t){var e=this.memoizedFileURLs.get(t);if(e)return e;if(l){var r=l(t).toString();return this.memoizedFileURLs.set(t,r),r}throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(t){var e=this.memoizedURLs.get(t);if(e)return e;"\\"===o&&(t=t.replace(/\\/g,"/"));var r=encodeURI(t).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(t,r),r}}}),he=Pt((t,e)=>{var r="'".charCodeAt(0),i='"'.charCodeAt(0),n="\\".charCodeAt(0),s="/".charCodeAt(0),o="\n".charCodeAt(0),a=" ".charCodeAt(0),h="\f".charCodeAt(0),u="\t".charCodeAt(0),l="\r".charCodeAt(0),f="[".charCodeAt(0),c="]".charCodeAt(0),v="(".charCodeAt(0),d=")".charCodeAt(0),p="{".charCodeAt(0),m="}".charCodeAt(0),y=";".charCodeAt(0),g="*".charCodeAt(0),w=":".charCodeAt(0),b="@".charCodeAt(0),S=/[\t\n\f\r "#'()/;[\\\]{}]/g,k=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,C=/.[\r\n"'(/\\]/,M=/[\da-f]/i;e.exports=function(t,e){void 0===e&&(e={});var x,A,E,R,I,T,O,D,N,_,L=t.css.valueOf(),F=e.ignoreErrors,P=L.length,B=0,j=[],U=[],W=-1;function H(e){throw t.error("Unclosed "+e,B)}return{back(t){U.push(t)},endOfFile:()=>0===U.length&&B>=P,nextToken(t){if(U.length)return U.pop();if(P>B){var e=!!t&&t.ignoreUnclosed;switch(x=L.charCodeAt(B)){case o:case a:case u:case l:case h:R=B;do{x=L.charCodeAt(R+=1)}while(x===a||x===o||x===u||x===l||x===h);T=["space",L.slice(B,R)],B=R-1;break;case f:case c:case p:case m:case w:case y:case d:var G=String.fromCharCode(x);T=[G,G,B];break;case v:if(_=j.length?j.pop()[1]:"",N=L.charCodeAt(B+1),"url"===_&&N!==r&&N!==i&&N!==a&&N!==o&&N!==u&&N!==h&&N!==l){R=B;do{if(O=!1,-1===(R=L.indexOf(")",R+1))){if(F||e){R=B;break}H("bracket")}for(D=R;L.charCodeAt(D-1)===n;)D-=1,O=!O}while(O);T=["brackets",L.slice(B,R+1),B,R],B=R}else B>W?(R=L.indexOf(")",B+1),A=L.slice(B,R+1),-1===R||C.test(A)?(W=-1===R?P:R,T=["(","(",B]):(T=["brackets",A,B,R],B=R)):T=["(","(",B];break;case r:case i:I=x===r?"'":'"',R=B;do{if(O=!1,-1===(R=L.indexOf(I,R+1))){if(F||e){R=B+1;break}H("string")}for(D=R;L.charCodeAt(D-1)===n;)D-=1,O=!O}while(O);T=["string",L.slice(B,R+1),B,R],B=R;break;case b:S.lastIndex=B+1,S.test(L),T=["at-word",L.slice(B,1+(R=0===S.lastIndex?L.length-1:S.lastIndex-2)),B,R],B=R;break;case n:for(R=B,E=!0;L.charCodeAt(R+1)===n;)R+=1,E=!E;if(x=L.charCodeAt(R+1),E&&x!==s&&x!==a&&x!==o&&x!==u&&x!==l&&x!==h&&M.test(L.charAt(R+=1))){for(;M.test(L.charAt(R+1));)R+=1;L.charCodeAt(R+1)===a&&(R+=1)}T=["word",L.slice(B,R+1),B,R],B=R;break;default:x===s&&L.charCodeAt(B+1)===g?(0===(R=L.indexOf("*/",B+2)+1)&&(F||e?R=L.length:H("comment")),T=["comment",L.slice(B,R+1),B,R],B=R):(k.lastIndex=B+1,k.test(L),T=["word",L.slice(B,1+(R=0===k.lastIndex?L.length-1:k.lastIndex-2)),B,R],j.push(T),B=R)}return B++,T}},position:()=>B}}}),ue=Pt((t,e)=>{var r=Kt(),i=Zt(),n=Jt(),s=ie(),o=se(),a=he(),h={empty:!0,space:!0};function u(t,e,r){for(var i="",n=e;r>n;n++)i+=t[n][1];return i}e.exports=class{constructor(t){this.input=t,this.root=new s,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:t,start:{column:1,line:1,offset:0}}}atrule(t){var e,i,n,s=new r;s.name=t[1].slice(1),""===s.name&&this.unnamedAtrule(s,t),this.init(s,t[2]);for(var o=!1,a=!1,h=[],u=[];!this.tokenizer.endOfFile();){if("("===(e=(t=this.tokenizer.nextToken())[0])||"["===e?u.push("("===e?")":"]"):"{"===e&&u.length>0?u.push("}"):e===u[u.length-1]&&u.pop(),0===u.length){if(";"===e){s.source.end=this.getPosition(t[2]),s.source.end.offset++,this.semicolon=!0;break}if("{"===e){a=!0;break}if("}"===e){if(h.length>0){for(i=h[n=h.length-1];i&&"space"===i[0];)i=h[--n];i&&(s.source.end=this.getPosition(i[3]||i[2]),s.source.end.offset++)}this.end(t);break}h.push(t)}else h.push(t);if(this.tokenizer.endOfFile()){o=!0;break}}s.raws.between=this.spacesAndCommentsFromEnd(h),h.length?(s.raws.afterName=this.spacesAndCommentsFromStart(h),this.raw(s,"params",h),o&&(s.source.end=this.getPosition((t=h[h.length-1])[3]||t[2]),s.source.end.offset++,this.spaces=s.raws.between,s.raws.between="")):(s.raws.afterName="",s.params=""),a&&(s.nodes=[],this.current=s)}checkMissedSemicolon(t){var e=this.colon(t);if(!1!==e){for(var r,i=0,n=e-1;n>=0&&("space"===(r=t[n])[0]||2!==(i+=1));n--);throw this.input.error("Missed semicolon","word"===r[0]?r[3]+1:r[2])}}colon(t){var e,r,i,n=0;for(var s of t.entries()){var o=s[0];if("("===(i=(r=s[1])[0])&&(n+=1),")"===i&&(n-=1),0===n&&":"===i){if(e){if("word"===e[0]&&"progid"===e[1])continue;return o}this.doubleColon(r)}e=r}return!1}comment(t){var e=new i;this.init(e,t[2]),e.source.end=this.getPosition(t[3]||t[2]),e.source.end.offset++;var r=t[1].slice(2,-2);if(r.trim()){var n=r.match(/^(\s*)([^]*\S)(\s*)$/);e.text=n[2],e.raws.left=n[1],e.raws.right=n[3]}else e.text="",e.raws.left=r,e.raws.right=""}createTokenizer(){this.tokenizer=a(this.input)}decl(t,e){var r=new n;this.init(r,t[0][2]);var i=t[t.length-1];";"===i[0]&&(this.semicolon=!0,t.pop()),r.source.end=this.getPosition(i[3]||i[2]||function(t){for(var e=t.length-1;e>=0;e--){var r=t[e],i=r[3]||r[2];if(i)return i}}(t)),r.source.end.offset++;for(var s=0;"word"!==t[s][0];)s===t.length-1&&this.unknownWord([t[s]]),s++;r.raws.before+=u(t,0,s),r.source.start=this.getPosition(t[s][2]);for(var o=s;t.length>s;){var a=t[s][0];if(":"===a||"space"===a||"comment"===a)break;s++}r.prop=u(t,o,s);for(var h,l=s;t.length>s&&(h=t[s],s++,":"!==h[0]);)"word"===h[0]&&/\w/.test(h[1])&&this.unknownWord([h]);r.raws.between=u(t,l,s),"_"!==r.prop[0]&&"*"!==r.prop[0]||(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));for(var f=s;t.length>s;){var c=t[s][0];if("space"!==c&&"comment"!==c)break;s++}var v=t.slice(f,s);t=t.slice(s),this.precheckMissedSemicolon(t);for(var d=t.length-1;d>=0;d--){if("!important"===(h=t[d])[1].toLowerCase()){r.important=!0;var p=this.stringFrom(t,d);" !important"!==(p=this.spacesFromEnd(t)+p)&&(r.raws.important=p);break}if("important"===h[1].toLowerCase()){for(var m=t.slice(0),y="",g=d;g>0;g--){var w=m[g][0];if(y.trim().startsWith("!")&&"space"!==w)break;y=m.pop()[1]+y}y.trim().startsWith("!")&&(r.important=!0,r.raws.important=y,t=m)}if("space"!==h[0]&&"comment"!==h[0])break}t.some(t=>"space"!==t[0]&&"comment"!==t[0])&&(r.raws.between+=v.map(t=>t[1]).join(""),v=[]),this.raw(r,"value",v.concat(t),e),r.value.includes(":")&&!e&&this.checkMissedSemicolon(t)}doubleColon(t){throw this.input.error("Double colon",{offset:t[2]},{offset:t[2]+t[1].length})}emptyRule(t){var e=new o;this.init(e,t[2]),e.selector="",e.raws.between="",this.current=e}end(t){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(t[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(t)}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(t){if(this.spaces+=t[1],this.current.nodes){var e=this.current.nodes[this.current.nodes.length-1];e&&"rule"===e.type&&!e.raws.ownSemicolon&&(e.raws.ownSemicolon=this.spaces,this.spaces="",e.source.end=this.getPosition(t[2]),e.source.end.offset+=e.raws.ownSemicolon.length)}}getPosition(t){var e=this.input.fromOffset(t);return{column:e.col,line:e.line,offset:t}}init(t,e){this.current.push(t),t.source={input:this.input,start:this.getPosition(e)},t.raws.before=this.spaces,this.spaces="","comment"!==t.type&&(this.semicolon=!1)}other(t){for(var e=!1,r=null,i=!1,n=null,s=[],o=t[1].startsWith("--"),a=[],h=t;h;){if(r=h[0],a.push(h),"("===r||"["===r)n||(n=h),s.push("("===r?")":"]");else if(o&&i&&"{"===r)n||(n=h),s.push("}");else if(0===s.length){if(";"===r){if(i)return void this.decl(a,o);break}if("{"===r)return void this.rule(a);if("}"===r){this.tokenizer.back(a.pop()),e=!0;break}":"===r&&(i=!0)}else r===s[s.length-1]&&(s.pop(),0===s.length&&(n=null));h=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(e=!0),s.length>0&&this.unclosedBracket(n),e&&i){if(!o)for(;a.length&&("space"===(h=a[a.length-1][0])||"comment"===h);)this.tokenizer.back(a.pop());this.decl(a,o)}else this.unknownWord(a)}parse(){for(var t;!this.tokenizer.endOfFile();)switch((t=this.tokenizer.nextToken())[0]){case"space":this.spaces+=t[1];break;case";":this.freeSemicolon(t);break;case"}":this.end(t);break;case"comment":this.comment(t);break;case"at-word":this.atrule(t);break;case"{":this.emptyRule(t);break;default:this.other(t)}this.endFile()}precheckMissedSemicolon(){}raw(t,e,r,i){for(var n,s,o=r.length,a="",u=!0,l=0;o>l;l+=1)"space"!==(s=(n=r[l])[0])||l!==o-1||i?"comment"===s&&(h[r[l-1]?r[l-1][0]:"empty"]||h[r[l+1]?r[l+1][0]:"empty"]||","===a.slice(-1))?u=!1:a+=n[1]:u=!1;if(!u){var f=r.reduce((t,e)=>t+e[1],"");t.raws[e]={raw:f,value:a}}t[e]=a}rule(t){t.pop();var e=new o;this.init(e,t[0][2]),e.raws.between=this.spacesAndCommentsFromEnd(t),this.raw(e,"selector",t),this.current=e}spacesAndCommentsFromEnd(t){for(var e,r="";t.length&&("space"===(e=t[t.length-1][0])||"comment"===e);)r=t.pop()[1]+r;return r}spacesAndCommentsFromStart(t){for(var e,r="";t.length&&("space"===(e=t[0][0])||"comment"===e);)r+=t.shift()[1];return r}spacesFromEnd(t){for(var e="";t.length&&"space"===t[t.length-1][0];)e=t.pop()[1]+e;return e}stringFrom(t,e){for(var r="",i=e;t.length>i;i++)r+=t[i][1];return t.splice(e,t.length-e),r}unclosedBlock(){var t=this.current.source.start;throw this.input.error("Unclosed block",t.line,t.column)}unclosedBracket(t){throw this.input.error("Unclosed bracket",{offset:t[2]},{offset:t[2]+1})}unexpectedClose(t){throw this.input.error("Unexpected }",{offset:t[2]},{offset:t[2]+1})}unknownWord(t){throw this.input.error("Unknown word "+t[0][1],{offset:t[0][2]},{offset:t[0][2]+t[0][1].length})}unnamedAtrule(t,e){throw this.input.error("At-rule without name",{offset:e[2]},{offset:e[2]+e[1].length})}}}),le=Pt((t,e)=>{var r=Xt(),i=re(),n=ue();function s(t,e){var r=new n(new i(t,e));try{r.parse()}catch(t){throw"CssSyntaxError"===t.name&&e&&e.from&&(/\.scss$/i.test(e.from)?t.message+="\nYou tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser":/\.sass/i.test(e.from)?t.message+="\nYou tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser":/\.less$/i.test(e.from)&&(t.message+="\nYou tried to parse Less with the standard CSS parser; try again with the postcss-less parser")),t}return r.root}e.exports=s,s.default=s,r.registerParse(s)}),fe=Pt((t,e)=>{var r=Xt(),i=Yt().my,n=class{constructor(t,e){if(void 0===e&&(e={}),this.type="warning",this.text=t,e.node&&e.node.source){e.node[i]||r.rebuild(e.node);var n=e.node.rangeBy(e);this.line=n.start.line,this.column=n.start.column,this.endLine=n.end.line,this.endColumn=n.end.column}for(var s in e)this[s]=e[s]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}};e.exports=n,n.default=n}),ce=Pt((t,e)=>{var r=fe(),i=class{get content(){return this.css}constructor(t,e,r){this.processor=t,this.messages=[],this.root=e,this.opts=r,this.css="",this.map=void 0}toString(){return this.css}warn(t,e){void 0===e&&(e={}),e.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(e.plugin=this.lastPlugin.postcssPlugin);var i=new r(t,e);return this.messages.push(i),i}warnings(){return this.messages.filter(t=>"warning"===t.type)}};e.exports=i,i.default=i}),ve=Pt((t,e)=>{var r={};e.exports=function(t){r[t]||(r[t]=!0,"undefined"!=typeof console&&console.warn&&console.warn(t))}}),de=Pt((t,e)=>{var r=Xt(),i=Qt(),s=ae(),a=le(),h=ce(),u=ie(),l=$t(),f=Yt(),c=f.isClean,v=f.my,d=ve(),p={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},m={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},y={Once:!0,postcssPlugin:!0,prepare:!0};function g(t){return"object"==typeof t&&"function"==typeof t.then}function w(t){var e=!1,r=p[t.type];return"decl"===t.type?e=t.prop.toLowerCase():"atrule"===t.type&&(e=t.name.toLowerCase()),e&&t.append?[r,r+"-"+e,0,r+"Exit",r+"Exit-"+e]:e?[r,r+"-"+e,r+"Exit",r+"Exit-"+e]:t.append?[r,0,r+"Exit"]:[r,r+"Exit"]}function b(t){return{eventIndex:0,events:"document"===t.type?["Document",0,"DocumentExit"]:"root"===t.type?["Root",0,"RootExit"]:w(t),iterator:0,node:t,visitorIndex:0,visitors:[]}}function S(t){for(var e=[t];e.length>0;){var r=e.pop();if(r[c]=!1,r.nodes)for(var i of r.nodes)e.push(i)}return t}var k={},C=class t{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"}constructor(e,i,n){var s;if(this.stringified=!1,this.processed=!1,"object"!=typeof i||null===i||"root"!==i.type&&"document"!==i.type)if(i instanceof t||i instanceof h)s=S(i.root),i.map&&(void 0===n.map&&(n.map={}),n.map.inline||(n.map.inline=!1),n.map.prev=i.map);else{var u=a;n.syntax&&(u=n.syntax.parse),n.parser&&(u=n.parser),u.parse&&(u=u.parse);try{s=u(i,n)}catch(t){this.processed=!0,this.error=t}s&&!s[v]&&r.rebuild(s)}else s=S(i);this.result=new h(e,s,n),this.helpers=o({},k,{postcss:k,result:this.result}),this.plugins=this.processor.plugins.map(t=>"object"==typeof t&&t.prepare?o({},t,t.prepare(this.result)):t)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(t){return this.async().catch(t)}finally(t){return this.async().then(t,t)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(t,e){var r=this.result.lastPlugin;try{if(e&&e.addToError(t),this.error=t,"CssSyntaxError"!==t.name||t.plugin){if(r.postcssVersion){var i=r.postcssPlugin,n=r.postcssVersion,s=this.result.processor.version,o=n.split("."),a=s.split(".");(o[0]!==a[0]||parseInt(o[1])>parseInt(a[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+s+", but "+i+" uses "+n+". Perhaps this is the source of the error below.")}}else t.plugin=r.postcssPlugin,t.setMessage()}catch(t){console&&console.error&&console.error(t)}return t}prepareVisitors(){this.listeners={};var t=(t,e,r)=>{this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push([t,r])};for(var e of this.plugins)if("object"==typeof e)for(var r in e){if(!m[r]&&/^[A-Z]/.test(r))throw new Error("Unknown event "+r+" in "+e.postcssPlugin+". Try to update PostCSS ("+this.processor.version+" now).");if(!y[r])if("object"==typeof e[r])for(var i in e[r])t(e,"*"===i?r:r+"-"+i.toLowerCase(),e[r][i]);else"function"==typeof e[r]&&t(e,r,e[r])}this.hasListener=Object.keys(this.listeners).length>0}runAsync(){var t=this;return n(function*(){t.plugin=0;for(var e=0;t.plugins.length>e;e++){var r=t.runOnRoot(t.plugins[e]);if(g(r))try{yield r}catch(e){throw t.handleError(e)}}if(t.prepareVisitors(),t.hasListener){for(var i=t.result.root;!i[c];){i[c]=!0;for(var n=[b(i)];n.length>0;){var s=t.visitTick(n);if(g(s))try{yield s}catch(e){throw t.handleError(e,n[n.length-1].node)}}}if(t.listeners.OnceExit){var o=function*(){var e=a[1];t.result.lastPlugin=a[0];try{if("document"===i.type){var r=i.nodes.map(r=>e(r,t.helpers));yield Promise.all(r)}else yield e(i,t.helpers)}catch(e){throw t.handleError(e)}};for(var a of t.listeners.OnceExit)yield*o()}}return t.processed=!0,t.stringify()})()}runOnRoot(t){this.result.lastPlugin=t;try{if("object"==typeof t&&t.Once){if("document"===this.result.root.type){var e=this.result.root.nodes.map(e=>t.Once(e,this.helpers));return g(e[0])?Promise.all(e):e}return t.Once(this.result.root,this.helpers)}if("function"==typeof t)return t(this.result.root,this.result)}catch(t){throw this.handleError(t)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();var t=this.result.opts,e=l;t.syntax&&(e=t.syntax.stringify),t.stringifier&&(e=t.stringifier),e.stringify&&(e=e.stringify);var r=this.result.root.source;if(void 0===t.map&&!(r&&r.input&&r.input.map)){var i="";return e(this.result.root,t=>{i+=t}),this.result.css=i,this.result}var n=new s(e,this.result.root,this.result.opts).generate();return this.result.css=n[0],this.result.map=n[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(var t of this.plugins)if(g(this.runOnRoot(t)))throw this.getAsyncError();if(this.prepareVisitors(),this.hasListener){for(var e=this.result.root;!e[c];)e[c]=!0,this.walkSync(e);if(this.listeners.OnceExit)if("document"===e.type)for(var r of e.nodes)this.visitSync(this.listeners.OnceExit,r);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(t,e){return"from"in this.opts||d("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(t,e)}toString(){return this.css}visitSync(t,e){for(var r of t){var i=r[1];this.result.lastPlugin=r[0];var n=void 0;try{n=i(e,this.helpers)}catch(t){throw this.handleError(t,e.proxyOf)}if("root"!==e.type&&"document"!==e.type&&!e.parent)return!0;if(g(n))throw this.getAsyncError()}}visitTick(t){var e=t[t.length-1],r=e.node,i=e.visitors;if("root"===r.type||"document"===r.type||r.parent){if(i.length>0&&i.length>e.visitorIndex){var n=i[e.visitorIndex],s=n[0],o=n[1];e.visitorIndex+=1,e.visitorIndex===i.length&&(e.visitors=[],e.visitorIndex=0),this.result.lastPlugin=s;try{return o(r.toProxy(),this.helpers)}catch(t){throw this.handleError(t,r)}}if(0!==e.iterator){for(var a,h=e.iterator;a=r.nodes[r.indexes[h]];)if(r.indexes[h]+=1,!a[c])return a[c]=!0,void t.push(b(a));e.iterator=0,delete r.indexes[h]}for(var u=e.events;u.length>e.eventIndex;){var l=u[e.eventIndex];if(e.eventIndex+=1,0===l)return void(r.nodes&&r.nodes.length&&(r[c]=!0,e.iterator=r.getIterator()));if(this.listeners[l])return void(e.visitors=this.listeners[l])}t.pop()}else t.pop()}walkSync(t){t[c]=!0;for(var e=[{eventIndex:0,events:w(t),iterator:0,node:t}];e.length>0;){var r=e[e.length-1],i=r.node;if(0!==r.iterator){for(var n=r.iterator,s=void 0,o=!1;s=i.nodes[i.indexes[n]];)if(i.indexes[n]+=1,!s[c]){s[c]=!0,e.push({eventIndex:0,events:w(s),iterator:0,node:s}),o=!0;break}if(o)continue;r.iterator=0,delete i.indexes[n]}if(r.events.length>r.eventIndex){var a=r.events[r.eventIndex];if(r.eventIndex+=1,0===a)i.nodes&&i.nodes.length&&(r.iterator=i.getIterator());else{var h=this.listeners[a];h&&this.visitSync(h,i.toProxy())&&e.pop()}}else e.pop()}}warnings(){return this.sync().warnings()}};C.registerPostcss=t=>{k=t},e.exports=C,C.default=C,u.registerLazyResult(C),i.registerLazyResult(C)}),pe=Pt((t,e)=>{var r=ae(),i=le(),n=ce(),s=$t(),o=ve(),a=class{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;var t,e=i;try{t=e(this._css,this._opts)}catch(t){this.error=t}if(this.error)throw this.error;return this._root=t,t}get[Symbol.toStringTag](){return"NoWorkResult"}constructor(t,e,i){e=e.toString(),this.stringified=!1,this._processor=t,this._css=e,this._opts=i,this._map=void 0;var o=s;this.result=new n(this._processor,void 0,this._opts),this.result.css=e;var a=this;Object.defineProperty(this.result,"root",{get(){return a.root}});var h=new r(o,void 0,this._opts,e);if(h.isMap()){var u=h.generate(),l=u[0],f=u[1];l&&(this.result.css=l),f&&(this.result.map=f)}else h.clearAnnotation(),this.result.css=h.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(t){return this.async().catch(t)}finally(t){return this.async().then(t,t)}sync(){if(this.error)throw this.error;return this.result}then(t,e){return"from"in this._opts||o("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(t,e)}toString(){return this._css}warnings(){return[]}};e.exports=a,a.default=a}),me=Pt((t,e)=>{var r=Qt(),i=de(),n=pe(),s=ie(),o=class{constructor(t){void 0===t&&(t=[]),this.version="8.5.24",this.plugins=this.normalize(t)}normalize(t){var e=[];for(var r of t)if(!0===r.postcss?r=r():r.postcss&&(r=r.postcss),"object"==typeof r&&Array.isArray(r.plugins))e=e.concat(r.plugins);else if("object"==typeof r&&r.postcssPlugin)e.push(r);else{if("function"!=typeof r)throw"object"==typeof r&&(r.parse||r.stringify)?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."):new Error(r+" is not a PostCSS plugin");e.push(r)}return e}process(t,e){return void 0===e&&(e={}),this.plugins.length||e.parser||e.stringifier||e.syntax?new i(this,t,e):new n(this,t,e)}use(t){return this.plugins=this.plugins.concat(this.normalize([t])),this}};e.exports=o,o.default=o,s.registerProcessor(o),r.registerProcessor(o)}),ye=Pt((t,e)=>{var r=Kt(),i=Zt(),n=Xt(),s=zt(),o=Jt(),a=Qt(),h=oe(),u=re(),l=de(),f=ne(),c=qt(),v=le(),d=me(),p=ce(),m=ie(),y=se(),g=$t(),w=fe();function b(){for(var t=arguments.length,e=new Array(t),r=0;t>r;r++)e[r]=arguments[r];return 1===e.length&&Array.isArray(e[0])&&(e=e[0]),new d(e)}b.plugin=function(t,e){var r,i=!1;function n(){console&&console.warn&&!i&&(i=!0,console.warn(t+": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration"),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(t+": 里面 postcss.plugin 被弃用. 迁移指南:\nhttps://www.w3ctech.com/topic/2226"));var r=e(...arguments);return r.postcssPlugin=t,r.postcssVersion=(new d).version,r}return Object.defineProperty(n,"postcss",{get(){return r||(r=n()),r}}),n.process=function(t,e,r){return b([n(r)]).process(t,e)},n},b.stringify=g,b.parse=v,b.fromJSON=h,b.list=f,b.comment=t=>new i(t),b.atRule=t=>new r(t),b.decl=t=>new o(t),b.rule=t=>new y(t),b.root=t=>new m(t),b.document=t=>new a(t),b.CssSyntaxError=s,b.Declaration=o,b.Container=n,b.Processor=d,b.Document=a,b.Comment=i,b.Warning=w,b.AtRule=r,b.Result=p,b.Input=u,b.Rule=y,b.Root=m,b.Node=c,l.registerPostcss(b),e.exports=b,b.default=b}),ge=Pt((t,e)=>{var r=Zt(),i=ue(),n=he();e.exports=class extends i{checkMissedSemicolon(){}comment(t){var e=new r;this.init(e,t[2]);var i=this.input.fromOffset(t[3])||this.input.fromOffset(this.input.css.length-1);e.source.end={column:i.col,line:i.line,offset:t[3]+1};var n=t[1].slice(2);if("*/"===n.slice(-2)&&(n=n.slice(0,-2)),/^\s*$/.test(n))e.text="",e.raws.left=n,e.raws.right="";else{var s=n.match(/^(\s*)([^]*\S)(\s*)$/);e.text=s[2],e.raws.left=s[1],e.raws.right=s[3]}}createTokenizer(){this.tokenizer=n(this.input,{ignoreErrors:!0})}decl(t){t.length>1&&t.some(t=>"word"===t[0])&&super.decl(t)}doubleColon(){}endFile(){for(this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces;this.current.parent;)this.current=this.current.parent,this.current.raws.after="";this.root.source.end=this.getPosition(this.tokenizer.position())}precheckMissedSemicolon(t){var e=this.colon(t);if(!1!==e){var r,i;for(r=e-1;r>=0&&"word"!==t[r][0];r--);if(0!==r&&r>=0){for(i=r-1;i>=0;i--)if("space"!==t[i][0]){i+=1;break}var n=t.slice(r),s=t.slice(i,r);t.splice(i,t.length-i),this.spaces=s.map(t=>t[1]).join(""),this.decl(n)}}}unclosedBracket(){}unexpectedClose(){this.current.raws.after+="}"}unknownWord(t){this.spaces+=t.map(t=>t[1]).join("")}unnamedAtrule(t){t.name=""}}}),we=Bt(Pt((t,e)=>{var r=ye().Input,i=ge();e.exports=function(t,e){var n=new i(new r(t,e));return n.parse(),n.root}})(),1),be=Bt(ye(),1).default,Se={script:"noscript",altglyph:"altGlyph",altglyphdef:"altGlyphDef",altglyphitem:"altGlyphItem",animatecolor:"animateColor",animatemotion:"animateMotion",animatetransform:"animateTransform",clippath:"clipPath",feblend:"feBlend",fecolormatrix:"feColorMatrix",fecomponenttransfer:"feComponentTransfer",fecomposite:"feComposite",feconvolvematrix:"feConvolveMatrix",fediffuselighting:"feDiffuseLighting",fedisplacementmap:"feDisplacementMap",fedistantlight:"feDistantLight",fedropshadow:"feDropShadow",feflood:"feFlood",fefunca:"feFuncA",fefuncb:"feFuncB",fefuncg:"feFuncG",fefuncr:"feFuncR",fegaussianblur:"feGaussianBlur",feimage:"feImage",femerge:"feMerge",femergenode:"feMergeNode",femorphology:"feMorphology",feoffset:"feOffset",fepointlight:"fePointLight",fespecularlighting:"feSpecularLighting",fespotlight:"feSpotLight",fetile:"feTile",feturbulence:"feTurbulence",foreignobject:"foreignObject",glyphref:"glyphRef",lineargradient:"linearGradient",radialgradient:"radialGradient"};function ke(t,e){var r=null==e?void 0:e.stylesWithHoverClass.get(t);if(r)return r;var i=t;try{i=be([Ut,Wt]).process(t,{parser:we.default}).css}catch(t){console.warn("Failed to adapt css for replay",t)}return null==e||e.stylesWithHoverClass.set(t,i),i}function Ce(){return{stylesWithHoverClass:new Map}}var Me=new Set(["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"]),xe=new Set,Ae=new Set;function Ee(t,e){var r,i=e.doc,n=e.mirror,s=e.skipChild,o=void 0!==s&&s,a=e.hackCss,h=void 0===a||a,l=e.afterAppend,f=e.cache,c=null;if(n.has(t.id)){var v=n.getNode(t.id);if(function(t,e){return!(!t||!e||t.type!==e.type)&&(t.type===u.Document?t.compatMode===e.compatMode:t.type===u.DocumentType?t.name===e.name&&t.publicId===e.publicId&&t.systemId===e.systemId:t.type===u.Comment||t.type===u.Text||t.type===u.CDATA?t.textContent===e.textContent:t.type===u.Element&&t.tagName===e.tagName&&JSON.stringify(t.attributes)===JSON.stringify(e.attributes)&&t.isSVG===e.isSVG&&t.needBlock===e.needBlock)}(n.getMeta(v),t))return n.getNode(t.id);c=v}var d=function(t,e){var r=e.doc,i=e.hackCss,n=e.cache;switch(t.type){case u.Document:return r.implementation.createDocument(null,"",null);case u.DocumentType:return r.implementation.createDocumentType(t.name||"html",t.publicId,t.systemId);case u.Element:var s,o=function(t){var e=Se[t.tagName]?Se[t.tagName]:t.tagName;return"link"===e&&t.attributes._cssText&&(e="style"),e}(t);if(t.isSVG)s=r.createElementNS("http://www.w3.org/2000/svg",o);else{var a;if(t.isCustom&&(null===(a=r.defaultView)||void 0===a?void 0:a.customElements)&&function(t){if("string"!=typeof t||0===t.length)return!1;if(Me.has(t))return!1;if(!t.includes("-"))return!1;var e=t.charCodeAt(0);return e>=97&&122>=e}(t.tagName)&&!r.defaultView.customElements.get(t.tagName))try{r.defaultView.customElements.define(t.tagName,class extends r.defaultView.HTMLElement{})}catch(e){xe.has(t.tagName)||(xe.add(t.tagName),console.warn("rrweb: failed to register custom element",t.tagName,e))}s=r.createElement(o)}var h={};for(var l in t.attributes)if({}.hasOwnProperty.call(t.attributes,l)){var f=t.attributes[l];if(("option"!==o||"selected"!==l||!1!==f)&&null!==f)if(!0===f&&(f=""),l.startsWith("rr_"))h[l]=f;else{var c="textarea"===o&&"value"===l,v="style"===o&&"_cssText"===l;if(v&&i&&"string"==typeof f&&(f=ke(f,n)),!c&&!v||"string"!=typeof f)try{if(t.isSVG&&"xlink:href"===l)s.setAttributeNS("http://www.w3.org/1999/xlink",l,f.toString());else if("onload"===l||"onclick"===l||"onmouse"===l.substring(0,7))s.setAttribute("_"+l,f.toString());else{if("meta"===o&&"Content-Security-Policy"===t.attributes["http-equiv"]&&"content"===l){s.setAttribute("csp-content",f.toString());continue}"link"===o&&("preload"===t.attributes.rel&&"script"===t.attributes.as||"modulepreload"===t.attributes.rel)||"link"===o&&"prefetch"===t.attributes.rel&&"string"==typeof t.attributes.href&&"js"===Mt(t.attributes.href)||("img"===o&&t.attributes.srcset&&t.attributes.rr_dataURL?s.setAttribute("rrweb-original-srcset",t.attributes.srcset):s.setAttribute(l,f.toString()))}}catch(t){}else s.appendChild(r.createTextNode(f)),t.childNodes=[]}}var d=!("static"!==h.rr_position&&"relative"!==h.rr_position&&"sticky"!==h.rr_position||void 0!==h.rr_transform&&"none"!==h.rr_transform);if(d&&"string"==typeof h.rr_display){var p=h.rr_display;s.style.setProperty("display","inline"===p?"inline-block":p)}var m=function(){var e=h[y];if("canvas"===o&&"rr_dataURL"===y){var i=r.createElement("img");i.onload=()=>{var t=s.getContext("2d");t&&t.drawImage(i,0,0,i.width,i.height)},i.src=e.toString(),s.RRNodeType&&(s.rr_dataURL=e.toString())}else if("img"===o&&"rr_dataURL"===y){var n=s;n.currentSrc.startsWith("data:")||(n.setAttribute("rrweb-original-src",t.attributes.src),n.src=e.toString())}if("rr_width"===y)s.style.setProperty("width",e.toString());else if("rr_height"===y)s.style.setProperty("height",e.toString());else if("rr_left"===y)d||(s.style.setProperty("left",e.toString()),s.style.setProperty("position","absolute"));else if("rr_top"===y)d||(s.style.setProperty("top",e.toString()),s.style.setProperty("position","absolute"));else if("rr_mediaCurrentTime"===y&&"number"==typeof e)s.currentTime=e;else if("rr_mediaState"===y)switch(e){case"played":s.play().catch(t=>console.warn("media playback error",t));break;case"paused":s.pause()}else"rr_mediaPlaybackRate"===y&&"number"==typeof e?s.playbackRate=e:"rr_mediaMuted"===y&&"boolean"==typeof e?s.muted=e:"rr_mediaLoop"===y&&"boolean"==typeof e?s.loop=e:"rr_mediaVolume"===y&&"number"==typeof e?s.volume=e:"rr_open_mode"===y&&s.setAttribute("rr_open_mode",e)};for(var y in h)m();if(t.isShadowHost)if(s.shadowRoot)for(;s.shadowRoot.firstChild;)s.shadowRoot.removeChild(s.shadowRoot.firstChild);else it(s)||Ae.has(o)||(Ae.add(o),console.warn("rrweb: browser refused a shadow root on",o));return s;case u.Text:return function(t,e){if("SCRIPT_PLACEHOLDER"===t.textContent)return e.doc.createTextNode("");var r=t.textContent;if(t.isStyle&&e.hackCss)try{r=ke(t.textContent,e.cache)}catch(t){}return e.doc.createTextNode(r)}(t,{cache:n,doc:r,hackCss:i});case u.CDATA:return""===t.textContent.trim()?null:r.createCDATASection(t.textContent);case u.Comment:return r.createComment(t.textContent);default:return null}}(t,{doc:i,hackCss:h,cache:f});if(!d)return null;if(null==c||null===(r=c.parentNode)||void 0===r||r.removeChild(c),t.rootId&&n.getNode(t.rootId)!==i&&n.replace(t.rootId,i),t.type===u.Document&&(i.close(),i.open(),"BackCompat"===t.compatMode&&t.childNodes&&t.childNodes[0].type!==u.DocumentType&&i.write(t.childNodes[0].type===u.Element&&"xmlns"in t.childNodes[0].attributes&&"http://www.w3.org/1999/xhtml"===t.childNodes[0].attributes.xmlns?'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">':'<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">'),d=i),n.add(d,t),(t.type===u.Document||t.type===u.Element)&&!o){var p=function(){if(m.isShadow&&t.isShadowHost&&et(d)&&!d.shadowRoot)return 0;var e=Ee(m,{doc:i,mirror:n,skipChild:!1,hackCss:h,afterAppend:l,cache:f});if(!e)return console.warn("Failed to rebuild",m),0;if(m.isShadow&&et(d)&&d.shadowRoot)d.shadowRoot.appendChild(e);else if(t.type===u.Document&&m.type==u.Element){var r=e,s=null;r.childNodes.forEach(t=>{"BODY"===t.nodeName&&(s=t)}),s?(r.removeChild(s),d.appendChild(e),r.appendChild(s)):d.appendChild(e)}else if(t.type===u.Document&&m.type===u.DocumentType){var o=d.doctype;o&&d.removeChild(o),d.firstChild&&1===d.firstChild.nodeType?d.insertBefore(e,d.firstChild):d.appendChild(e)}else d.appendChild(e);l&&l(e,m.id)};for(var m of t.childNodes)p()}return d}var Re,Ie,Te=1,Oe=new RegExp("[^a-z0-9-_:]");function De(){return Te++}var Ne=/^[^ \t\n\r\u000c]+/,_e=/^[, \t\n\r\u000c]+/,Le=new WeakMap;function Fe(t,e){return e&&""!==e.trim()?Pe(t,e):e}function Pe(t,e){var r=Le.get(t);if(r||(r=t.createElement("a"),Le.set(t,r)),e){if(e.startsWith("blob:")||e.startsWith("data:"))return e}else e="";return r.setAttribute("href",e),r.href}function Be(t,e){return(null==e?void 0:e.maxBase64ImageLength)?function(t,e){return e&&t.length>e?"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgogIDxkZWZzPgogICAgPHBhdHRlcm4gaWQ9InN0cmlwZXMiIHBhdHRlcm5Vbml0cz0idXNlclNwYWNlT25Vc2UiIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+CiAgICAgIDxyZWN0IHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgZmlsbD0iYmxhY2siLz4KICAgICAgPHBhdGggZD0iTTggMEgxNkwwIDE2VjhMOCAwWiIgZmlsbD0iIzJEMkQyRCIvPgogICAgICA8cGF0aCBkPSJNMTYgOFYxNkg4TDE2IDhaIiBmaWxsPSIjMkQyRDJEIi8+CiAgICA8L3BhdHRlcm4+CiAgPC9kZWZzPgogIDxyZWN0IHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjc3RyaXBlcykiLz4KPC9zdmc+Cg==":t}(t,e.maxBase64ImageLength):t}function je(t,e,r,i,n,s){if(!i)return i;if("src"===r||"href"===r&&("use"!==e||"#"!==i[0])){if("link"===e&&n){var o,a=null===(o=n.sheet)||void 0===o?void 0:o.href;if(a)return a}var h=Fe(t,i);if(h.startsWith("data:")){if("img"===e&&n){var u=h;return((null==s?void 0:s.type)||void 0!==(null==s?void 0:s.quality))&&(u=function(t,e,r,i){if(1e5>e.length)return e;if(!t.complete||0===t.naturalWidth)return e;if(t.naturalWidth>4096||t.naturalHeight>4096)return e;var n=Tt.get(e);if(n&&n.type===r&&n.quality===i)return n.result;try{var s=document.createElement("canvas");s.width=t.naturalWidth,s.height=t.naturalHeight;var o=s.getContext("2d");if(!o)return e;o.drawImage(t,0,0);var a=s.toDataURL(r||"image/webp",null!=i?i:.4),h=e.length>a.length?a:e;if(Tt.size>=10){var u=Tt.keys().next().value;void 0!==u&&Tt.delete(u)}return Tt.set(e,{type:r,quality:i,result:h}),h}catch(t){return e}}(n,h,s.type,s.quality)),Be(u,s)}if("image"===e)return Be(h,s)}return h}if("xlink:href"===r&&"#"!==i[0]){var l=Fe(t,i);return"image"===e&&l.startsWith("data:")?Be(l,s):l}return"background"!==r||"table"!==e&&"td"!==e&&"th"!==e?"srcset"===r?function(t,e){if(""===e.trim())return e;var r=0;function i(t){var i,n=t.exec(e.substring(r));return n?(r+=(i=n[0]).length,i):""}for(var n=[];i(_e),e.length>r;){var s=i(Ne);if(","===s.slice(-1))s=Fe(t,s.substring(0,s.length-1)),n.push(s);else{var o="";s=Fe(t,s);for(var a=!1;;){var h=e.charAt(r);if(""===h){n.push((s+o).trim());break}if(a)")"===h&&(a=!1);else{if(","===h){r+=1,n.push((s+o).trim());break}"("===h&&(a=!0)}o+=h,r+=1}}}return n.join(", ")}(t,i):"style"===r?It(i,Pe(t)):"object"===e&&"data"===r?Fe(t,i):i:Fe(t,i)}function Ue(t,e,r){return("video"===t||"audio"===t)&&"autoplay"===e}function We(t,e,r){if(!t)return!1;if(t.nodeType!==t.ELEMENT_NODE)return!!r&&We(b.parentNode(t),e,r);for(var i=t.classList.length;i--;)if(e.test(t.classList[i]))return!0;return!!r&&We(b.parentNode(t),e,r)}function He(t,e,r,i){var n;if(et(t)){if(!b.childNodes(n=t).length)return!1}else{if(null===b.parentElement(t))return!1;n=b.parentElement(t)}try{if("string"==typeof e){if(i){if(n.closest("."+e))return!0}else if(n.classList.contains(e))return!0}else if(We(n,e,i))return!0;if(r)if(i){if(n.closest(r))return!0}else if(n.matches(r))return!0}catch(t){}return!1}function Ge(t,e,r){var i=t.removeEventListener;"function"==typeof i&&i.call(t,e,r)}var ze=new Map;function Ve(t,e){return Array.from(t.styleSheets).find(t=>t.href===e)}function $e(t){return null==t?"":t.toLowerCase()}var Ye=!1,qe=!1;function Ze(){return qe}function Je(){qe=!1,Ye=!1}function Xe(t,e){var r=e.doc,i=e.mirror,n=e.blockClass,s=e.blockSelector,o=e.maskTextClass,a=e.maskTextSelector,h=e.skipChild,l=void 0!==h&&h,f=e.inlineStylesheet,c=void 0===f||f,v=e.maskInputOptions,d=void 0===v?{}:v,p=e.maskTextFn,m=e.maskInputFn,y=e.maskAllElementAttributes,g=void 0!==y&&y,w=e.maskAttributeFn,S=e.slimDOMOptions,k=e.dataURLOptions,C=void 0===k?{}:k,M=e.inlineImages,x=void 0!==M&&M,A=e.recordCanvas,E=void 0!==A&&A,I=e.canvasMaskingConfigured,T=e.onSerialize,D=e.onIframeLoad,N=e.iframeLoadTimeout,F=void 0===N?5e3:N,P=e.onIframeListenerRegistered,B=e.onStylesheetLoad,j=e.stylesheetLoadTimeout,U=void 0===j?5e3:j,W=e.keepIframeSrcFn,H=void 0===W?()=>!1:W,G=e.newlyAddedElement,V=void 0!==G&&G,q=e.depth,Z=void 0===q?0:q,J=e.maxDepth,X=void 0===J?50:J,K=e.needsMask,Q=e.preserveWhiteSpace,tt=void 0===Q||Q;if(Z>=X)return qe=!0,Ye||(Ye=!0,console.warn("[rrweb-snapshot] DOM tree depth exceeded max depth of "+X+". Children beyond this depth will not be recorded. This may indicate deeply nested DOM structures.")),null;K||(K=He(t,o,a,void 0===K)),R>0&&(O.nodeCount+=1);var it,st=function(t,e){var r=e.doc,i=e.blockClass,n=e.blockSelector,s=e.needsMask,o=e.inlineStylesheet,a=e.maskInputOptions,h=void 0===a?{}:a,l=e.maskTextFn,f=e.maskInputFn,c=e.maskAllElementAttributes,v=void 0!==c&&c,d=e.maskAttributeFn,p=e.dataURLOptions,m=void 0===p?{}:p,y=e.inlineImages,g=e.recordCanvas,w=e.canvasMaskingConfigured,S=e.keepIframeSrcFn,k=e.newlyAddedElement,C=void 0!==k&&k,M=function(t,e){if(e.hasNode(t)){var r=e.getId(t);return 1===r?void 0:r}}(r,e.mirror);switch(t.nodeType){case t.DOCUMENT_NODE:return"CSS1Compat"!==t.compatMode?{type:u.Document,childNodes:[],compatMode:t.compatMode}:{type:u.Document,childNodes:[]};case t.DOCUMENT_TYPE_NODE:return{type:u.DocumentType,name:t.name,publicId:t.publicId,systemId:t.systemId,rootId:M};case t.ELEMENT_NODE:return function(t,e){for(var r=e.doc,i=e.inlineStylesheet,n=e.maskInputOptions,s=void 0===n?{}:n,o=e.maskInputFn,a=e.maskAllElementAttributes,h=void 0!==a&&a,l=e.maskAttributeFn,f=e.dataURLOptions,c=void 0===f?{}:f,v=e.inlineImages,d=e.recordCanvas,p=e.canvasMaskingConfigured,m=e.keepIframeSrcFn,y=e.newlyAddedElement,g=void 0!==y&&y,w=e.rootId,S=function(t,e,r){try{if("string"==typeof e){if(t.classList.contains(e))return!0}else for(var i=t.classList.length;i--;)if(e.test(t.classList[i]))return!0;if(r)return t.matches(r)}catch(t){}return!1}(t,e.blockClass,e.blockSelector),k=function(t){if(t instanceof HTMLFormElement)return"form";var e=wt(t.tagName);return Oe.test(e)?"div":e}(t),C=new Set,M={},x=t.attributes.length,A=0;x>A;A++){var E=t.attributes[A];Ue(k,E.name)||(M[E.name]=je(r,k,wt(E.name),E.value,t,c))}if("link"===k&&i&&!S){var I=t.sheet;if(!I){var T=function(t){return t.href}(t);T&&!(I=Ve(r,T))&&T.includes(".css")&&(I=Ve(r,window.location.origin+"/"+T.replace(window.location.href,"")))}var O=null;I&&(Y(I)?R>0&&(_.push(t),L+=1):O=ht(I)),O&&(delete M.rel,delete M.href,M._cssText=O)}if("style"===k&&t.sheet&&!(t.innerText||b.textContent(t)||"").trim().length){var D=z(()=>ht(t.sheet));D&&(M._cssText=D)}if("input"===k||"textarea"===k||"select"===k){var N=t.value,F=t.checked;"radio"!==M.type&&"checkbox"!==M.type&&"submit"!==M.type&&"button"!==M.type&&N?M.value=gt({element:t,type:Ct(t),tagName:k,value:N,maskInputOptions:s,maskInputFn:o}):F&&(M.checked=F)}if("option"===k&&(t.selected&&!s.select?M.selected=!0:delete M.selected),"dialog"===k&&t.open){try{M.rr_open_mode=t.matches("dialog:modal")?"modal":"non-modal"}catch(t){M.rr_open_mode="modal",M.ph_rr_could_not_detect_modal=!0}C.add("rr_open_mode")}if("canvas"===k&&d&&!(null==p?void 0:p()))if("2d"===t.__context)(function(t){var e=t.getContext("2d");if(!e)return!0;for(var r=0;t.width>r;r+=50)for(var i=0;t.height>i;i+=50){var n=e.getImageData;if(new Uint32Array((kt in n?n[kt]:n).call(e,r,i,Math.min(50,t.width-r),Math.min(50,t.height-i)).data.buffer).some(t=>0!==t))return!1}return!0})(t)||(M.rr_dataURL=t.toDataURL(c.type,c.quality));else if(!("__context"in t)){var P=t.toDataURL(c.type,c.quality),B=r.createElement("canvas");B.width=t.width,B.height=t.height,P!==B.toDataURL(c.type,c.quality)&&(M.rr_dataURL=P)}var j,U,W=!1;if("img"===k&&v){Re||(Re=r.createElement("canvas"),Ie=Re.getContext("2d"));var H=t,G=H.currentSrc||H.getAttribute("src")||"<unknown-src>",V=H.crossOrigin,q=(e,r)=>W?St({element:t,name:e,value:r,maskAllElementAttributes:h,maskAttributeFn:l}):r,Z=()=>{Ge(H,"load",Z);try{Re.width=H.naturalWidth,Re.height=H.naturalHeight,Ie.drawImage(H,0,0);var t=Re.toDataURL(c.type,c.quality);M.rr_dataURL=q("rr_dataURL",t)}catch(t){if("anonymous"!==H.crossOrigin)return H.crossOrigin="anonymous",void(H.complete&&0!==H.naturalWidth?Z():H.addEventListener("load",Z));console.warn("Cannot inline img src="+G+"! Error: "+t)}"anonymous"===H.crossOrigin&&(V?M.crossOrigin=q("crossOrigin",V):H.removeAttribute("crossorigin"))};H.complete&&0!==H.naturalWidth?Z():H.addEventListener("load",Z)}if("audio"===k||"video"===k){var J=M;J.rr_mediaState=t.paused?"paused":"played",C.add("rr_mediaState"),J.rr_mediaCurrentTime=t.currentTime,J.rr_mediaPlaybackRate=t.playbackRate,J.rr_mediaMuted=t.muted,J.rr_mediaLoop=t.loop,J.rr_mediaVolume=t.volume}if(g||(t.scrollLeft&&(M.rr_scrollLeft=t.scrollLeft),t.scrollTop&&(M.rr_scrollTop=t.scrollTop)),S){var X,K,Q,tt=t.getBoundingClientRect(),et=tt.width,rt=tt.height,it=tt.left,nt=tt.top,st=null===(X=r.defaultView)||void 0===X?void 0:X.getComputedStyle(t);M={class:M.class,rr_width:et+"px",rr_height:rt+"px",rr_left:Math.floor(it+((null===(K=r.defaultView)||void 0===K?void 0:K.scrollX)||0))+"px",rr_top:Math.floor(nt+((null===(Q=r.defaultView)||void 0===Q?void 0:Q.scrollY)||0))+"px"},C.add("rr_width"),C.add("rr_height"),C.add("rr_left"),C.add("rr_top"),st&&(M.rr_position=st.position||"static",C.add("rr_position"),st.transform&&"none"!==st.transform&&(M.rr_transform=st.transform,C.add("rr_transform")),st.display&&st.display.startsWith("inline")&&(M.rr_display=st.display,C.add("rr_display")))}if("iframe"!==k||m(M.src)||(t.contentDocument||(M.rr_src=M.src),delete M.src),h||l)for(var ot of Object.entries(M)){var at=ot[0],ut=ot[1];"string"!=typeof ut&&null!==ut||(M[at]=St({element:t,name:at,value:ut,maskAllElementAttributes:h,maskAttributeFn:l,isGenerated:C.has(at)}))}W=!0;try{customElements.get(k)&&(j=!0)}catch(t){}return{type:u.Element,tagName:k,attributes:M,childNodes:[],isSVG:(U=t,Boolean("svg"===U.tagName||U.ownerSVGElement)||void 0),needBlock:S,rootId:w,isCustom:j}}(t,{doc:r,blockClass:i,blockSelector:n,inlineStylesheet:o,maskInputOptions:h,maskInputFn:f,maskAllElementAttributes:v,maskAttributeFn:d,dataURLOptions:m,inlineImages:y,recordCanvas:g,canvasMaskingConfigured:w,keepIframeSrcFn:S,newlyAddedElement:C,rootId:M});case t.TEXT_NODE:return function(t,e){var r=e.needsMask,i=e.maskTextFn,n=e.rootId,s=b.parentNode(t),o=s&&s.tagName,a=b.textContent(t),h="STYLE"===o||void 0,l="SCRIPT"===o||void 0;if(h&&a){try{var f;if(t.nextSibling||t.previousSibling);else if(Y(s.sheet));else if(null===(f=s.sheet)||void 0===f?void 0:f.cssRules){var c=ht(s.sheet);c&&!/(?:^|[\s;{}])-?[a-zA-Z][\w-]*\s*:\s*;/.test(c)&&(a=c)}}catch(e){console.warn("Cannot get CSS styles from text's parentNode. Error: "+e,t)}a=It(a,Pe(e.doc))}return l&&(a="SCRIPT_PLACEHOLDER"),!h&&!l&&a&&r&&(a=i?i(a,b.parentElement(t)):a.replace(/[\S]/g,"*")),{type:u.Text,textContent:a||"",isStyle:h,rootId:n}}(t,{doc:r,needsMask:s,maskTextFn:l,rootId:M});case t.CDATA_SECTION_NODE:return{type:u.CDATA,textContent:"",rootId:M};case t.COMMENT_NODE:return{type:u.Comment,textContent:b.textContent(t)||"",rootId:M};default:return!1}}(t,{doc:r,mirror:i,blockClass:n,blockSelector:s,needsMask:K,inlineStylesheet:c,maskInputOptions:d,maskTextFn:p,maskInputFn:m,maskAllElementAttributes:g,maskAttributeFn:w,dataURLOptions:C,inlineImages:x,recordCanvas:E,canvasMaskingConfigured:I,keepIframeSrcFn:H,newlyAddedElement:V});if(!st)return console.warn(t,"not serialized"),null;it=i.hasNode(t)?i.getId(t):!function(t,e){if(e.comment&&t.type===u.Comment)return!0;if(t.type===u.Element){if(e.script&&("script"===t.tagName||"link"===t.tagName&&("preload"===t.attributes.rel&&"script"===t.attributes.as||"modulepreload"===t.attributes.rel)||"link"===t.tagName&&"prefetch"===t.attributes.rel&&"string"==typeof t.attributes.href&&"js"===Mt(t.attributes.href)))return!0;if(e.headFavicon&&("link"===t.tagName&&"shortcut icon"===t.attributes.rel||"meta"===t.tagName&&($e(t.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===$e(t.attributes.name)||["icon","apple-touch-icon","shortcut icon"].includes($e(t.attributes.rel)))))return!0;if("meta"===t.tagName){if(e.headMetaDescKeywords&&$e(t.attributes.name).match(/^description|keywords$/))return!0;if(e.headMetaSocial&&($e(t.attributes.property).match(/^(og|twitter|fb):/)||$e(t.attributes.name).match(/^(og|twitter):/)||"pinterest"===$e(t.attributes.name)))return!0;if(e.headMetaRobots&&["robots","googlebot","bingbot"].includes($e(t.attributes.name)))return!0;if(e.headMetaHttpEquiv&&void 0!==t.attributes["http-equiv"])return!0;if(e.headMetaAuthorship&&(["author","generator","framework","publisher","progid"].includes($e(t.attributes.name))||$e(t.attributes.property).match(/^article:/)||$e(t.attributes.property).match(/^product:/)))return!0;if(e.headMetaVerification&&["google-site-verification","yandex-verification","csrf-token","p:domain_verify","verify-v1","verification","shopify-checkout-api-token"].includes($e(t.attributes.name)))return!0}}return!1}(st,S)&&(tt||st.type!==u.Text||st.isStyle||st.textContent.replace(/^\s+|\s+$/gm,"").length)?De():-2;var ot=Object.assign(st,{id:it});if(i.add(t,ot),-2===it)return null;T&&T(t);var at=!l;if(ot.type===u.Element){at=at&&!ot.needBlock,delete ot.needBlock;var ut=b.shadowRoot(t);ut&&nt(ut)&&(ot.isShadowHost=!0)}if((ot.type===u.Document||ot.type===u.Element)&&at){S.headWhitespace&&ot.type===u.Element&&"head"===ot.tagName&&(tt=!1);var lt={doc:r,mirror:i,blockClass:n,blockSelector:s,needsMask:K,maskTextClass:o,maskTextSelector:a,skipChild:l,inlineStylesheet:c,maskInputOptions:d,maskTextFn:p,maskInputFn:m,maskAllElementAttributes:g,maskAttributeFn:w,slimDOMOptions:S,dataURLOptions:C,inlineImages:x,recordCanvas:E,canvasMaskingConfigured:I,preserveWhiteSpace:tt,onSerialize:T,onIframeLoad:D,iframeLoadTimeout:F,onIframeListenerRegistered:P,onStylesheetLoad:B,stylesheetLoadTimeout:U,keepIframeSrcFn:H,depth:Z+1,maxDepth:X};if(ot.type===u.Element&&"textarea"===ot.tagName&&void 0!==ot.attributes.value);else for(var ft of Array.from(b.childNodes(t))){var ct=Xe(ft,lt);ct&&ot.childNodes.push(ct)}var vt=null;if(et(t)&&(vt=b.shadowRoot(t)))for(var dt of Array.from(b.childNodes(vt))){var pt=Xe(dt,lt);pt&&(nt(vt)&&(pt.isShadow=!0),ot.childNodes.push(pt))}}var mt=b.parentNode(t);if(mt&&rt(mt)&&nt(mt)&&(ot.isShadow=!0),ot.type===u.Element&&"iframe"===ot.tagName){var yt=function(t,e,r){var i,n=()=>{},s=t.contentWindow;if(!s)return n;try{i=s.document.readyState}catch(t){return n}var o=()=>e();if("complete"!==i){var a=!1,h=null,u=()=>{a||(a=!0,null!==h&&(clearTimeout(h),h=null),Ge(t,"load",l),t.addEventListener("load",o),e())},l=()=>u();return h=setTimeout(u,r),t.addEventListener("load",l),()=>{null!==h&&(clearTimeout(h),h=null),a?Ge(t,"load",o):(a=!0,Ge(t,"load",l))}}var f,c="about:blank";try{f=s.location.href}catch(t){return n}if(f!==c||t.src===c||""===t.src){var v=setTimeout(e,0);return t.addEventListener("load",o),()=>{clearTimeout(v),Ge(t,"load",o)}}return t.addEventListener("load",o),()=>{Ge(t,"load",o)}}(t,()=>{var e=t.contentDocument;if(e&&D){var r=Xe(e,{doc:e,mirror:i,blockClass:n,blockSelector:s,needsMask:K,maskTextClass:o,maskTextSelector:a,skipChild:!1,inlineStylesheet:c,maskInputOptions:d,maskTextFn:p,maskInputFn:m,maskAllElementAttributes:g,maskAttributeFn:w,slimDOMOptions:S,dataURLOptions:C,inlineImages:x,recordCanvas:E,canvasMaskingConfigured:I,preserveWhiteSpace:tt,onSerialize:T,onIframeLoad:D,iframeLoadTimeout:F,onIframeListenerRegistered:P,onStylesheetLoad:B,stylesheetLoadTimeout:U,keepIframeSrcFn:H,depth:Z+1,maxDepth:X});r&&D(t,r)}},F);null==P||P(t,yt)}return ot.type===u.Element&&"link"===ot.tagName&&"stylesheet"===ot.attributes.rel&&function(e,h,u){if(!ze.has(e)){var l;try{l=e.sheet}catch(t){return}if(!l){var f=new AbortController,v=!1,y=()=>{if(!v){v=!0;try{(()=>{if(B){var e=Xe(t,{doc:r,mirror:i,blockClass:n,blockSelector:s,needsMask:K,maskTextClass:o,maskTextSelector:a,skipChild:!1,inlineStylesheet:c,maskInputOptions:d,maskTextFn:p,maskInputFn:m,maskAllElementAttributes:g,maskAttributeFn:w,slimDOMOptions:S,dataURLOptions:C,inlineImages:x,recordCanvas:E,canvasMaskingConfigured:I,preserveWhiteSpace:tt,onSerialize:T,onIframeLoad:D,iframeLoadTimeout:F,onStylesheetLoad:B,stylesheetLoadTimeout:U,keepIframeSrcFn:H,depth:Z,maxDepth:X});e&&B(t,e)}})()}finally{ze.delete(e),f.abort()}}},b=setTimeout(y,u);f.signal.addEventListener("abort",()=>clearTimeout(b),{once:!0}),e.addEventListener("load",y,{signal:f.signal,once:!0}),ze.set(e,f)}}}(t,0,U),ot}function Ke(t){return!0===t||"all"===t?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===t,headMetaDescKeywords:"all"===t,headTitleMutations:"all"===t}:!1===t?{}:t}function Qe(t,e){return-1!==t.indexOf(e)}"Mobile".toLowerCase(),"Tablet".toLowerCase(),new RegExp("Xbox","i"),new RegExp("Nintendo","i"),new RegExp("PlayStation","i"),new RegExp("Windows","i"),Date,Date;var tr={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot"],MutationObserver:[]},er={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:["querySelector","querySelectorAll"],MutationObserver:["constructor"]},rr={};function ir(t){if(rr[t])return rr[t];var e=function(t){var e,r,i=null===(e=globalThis)||void 0===e||null===(e=e.Zone)||void 0===e||null===(r=e.__symbol__)||void 0===r?void 0:r.call(e,t);return i&&globalThis[i]?globalThis[i]:void 0}(t)||globalThis[t],r=e.prototype,i=t in tr?tr[t]:void 0,n=Boolean(i&&i.every(t=>{var e;return Boolean(null===(e=Object.getOwnPropertyDescriptor(r,t))||void 0===e||null===(e=e.get)||void 0===e?void 0:e.toString().includes("[native code]"))})),s=t in er?er[t]:void 0,o=Boolean(s&&s.every(t=>{var e;return"function"==typeof r[t]&&(null===(e=r[t])||void 0===e?void 0:e.toString().includes("[native code]"))}));if(n&&o)return rr[t]=e.prototype,e.prototype;var a=document.createElement("iframe");a.style.display="none";var h,u=!1;try{document.body.appendChild(a);var l=a.contentWindow;if(!l)return e.prototype;var f=l[t].prototype;return f?(Qe(h=navigator.userAgent,"AppleWebKit")&&!Qe(h,"Chrome")&&(a.classList.add("rr-block","ph-no-capture"),a.setAttribute("__rrwebUntaintedPrototype",t),u=!0),rr[t]=f):r}catch(t){return r}finally{!u&&a.parentNode&&document.body.removeChild(a)}}var nr=Object.create(null);function sr(t,e,r){var i,n=nr[t],s=n[r];if(s)return s.call(e);var o=ir(t),a=null===(i=Object.getOwnPropertyDescriptor(o,r))||void 0===i?void 0:i.get;return a?(n[r]=a,a.call(e)):e[r]}nr.Node=Object.create(null),nr.ShadowRoot=Object.create(null),nr.MutationObserver=Object.create(null),nr.Element=Object.create(null);var or,ar={};function hr(t,e,r){var i=t+"."+String(r);if(ar[i])return ar[i].bind(e);var n=ir(t)[r];return"function"!=typeof n?e[r]:(ar[i]=n,n.bind(e))}var ur={childNodes:t=>sr("Node",t,"childNodes"),parentNode:t=>sr("Node",t,"parentNode"),parentElement:t=>sr("Node",t,"parentElement"),textContent:t=>sr("Node",t,"textContent"),isConnected(t){if(void 0===or){var e,r=null===(e=Object.getOwnPropertyDescriptor(ir("Node"),"isConnected"))||void 0===e?void 0:e.get;or=(null==r?void 0:r.toString().includes("[native code]"))?r:null}return null==or?void 0:or.call(t)},contains:(t,e)=>hr("Node",t,"contains")(e),getRootNode:t=>hr("Node",t,"getRootNode")(),host:t=>t&&"host"in t?sr("ShadowRoot",t,"host"):null,styleSheets:t=>t.styleSheets,shadowRoot:t=>t&&"shadowRoot"in t?sr("Element",t,"shadowRoot"):null,querySelector:(t,e)=>hr("Element",t,"querySelector")(e),querySelectorAll:(t,e)=>hr("Element",t,"querySelectorAll")(e),mutationObserver:()=>ir("MutationObserver").constructor,patch(t,e,r){try{if(!(e in t))return()=>{};var i=t[e],n={next:i},s=r(function(){for(var t=arguments.length,e=new Array(t),r=0;t>r;r++)e[r]=arguments[r];return n.next.apply(this,e)});return"function"==typeof s&&(s.prototype=s.prototype||{},Object.defineProperties(s,{__rrweb_original__:{enumerable:!1,value:i},__rrweb_layer__:{enumerable:!1,value:n}})),t[e]=s,()=>{if(t[e]!==s)for(var r=t=>{var e;return"function"==typeof t?null!==(e=t.__rrweb_layer__)&&void 0!==e?e:t.__posthog_layer__:void 0},i=t[e],o=r(i);o;){if(o.next===s)return void(o.next=n.next);o=r(i=o.next)}else t[e]=n.next}}catch(t){return()=>{}}}};function lr(t){return lr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},lr(t)}function fr(t,e,r){return(e=function(t){var e=function(t){if("object"!=lr(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=lr(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==lr(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function cr(t){try{return t.attachShadow({mode:"open"}),!0}catch(t){return!1}}var vr=class{constructor(){fr(this,"idNodeMap",new Map),fr(this,"nodeMetaMap",new WeakMap)}getId(t){var e,r;return t&&null!==(e=null===(r=this.getMeta(t))||void 0===r?void 0:r.id)&&void 0!==e?e:-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){var e=this.getId(t);if(this.idNodeMap.delete(e),t.childNodes&&t.childNodes.forEach(t=>this.removeNodeFromMap(t)),function(t){return t.nodeType===t.ELEMENT_NODE}(t)){var r=ur.shadowRoot(t);r&&this.removeNodeFromMap(r),"IFRAME"===t.nodeName&&t.contentDocument&&this.removeNodeFromMap(t.contentDocument)}}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,e){this.idNodeMap.set(e.id,t),this.nodeMetaMap.set(t,e)}replace(t,e){var r=this.getNode(t);if(r){var i=this.nodeMetaMap.get(r);i&&this.nodeMetaMap.set(e,i)}this.idNodeMap.set(t,e)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}},dr=(t,e)=>()=>(e||(t((e={exports:{}}).exports,e),t=null),e.exports);new RegExp(/(max|min)-device-(width|height)/.source,"g");var pr=dr((t,e)=>{var r=String,i=function(){return{isColorSupported:!1,reset:r,bold:r,dim:r,italic:r,underline:r,inverse:r,hidden:r,strikethrough:r,black:r,red:r,green:r,yellow:r,blue:r,magenta:r,cyan:r,white:r,gray:r,bgBlack:r,bgRed:r,bgGreen:r,bgYellow:r,bgBlue:r,bgMagenta:r,bgCyan:r,bgWhite:r,blackBright:r,redBright:r,greenBright:r,yellowBright:r,blueBright:r,magentaBright:r,cyanBright:r,whiteBright:r,bgBlackBright:r,bgRedBright:r,bgGreenBright:r,bgYellowBright:r,bgBlueBright:r,bgMagentaBright:r,bgCyanBright:r,bgWhiteBright:r}};e.exports=i(),e.exports.createColors=i}),mr=dr((t,e)=>{e.exports={}}),yr=dr((t,e)=>{var r=pr(),i=mr(),n=class t extends Error{constructor(e,r,i,n,s,o){super(e),this.name="CssSyntaxError",this.reason=e,s&&(this.file=s),n&&(this.source=n),o&&(this.plugin=o),void 0!==r&&void 0!==i&&("number"==typeof r?(this.line=r,this.column=i):(this.line=r.line,this.column=r.column,this.endLine=i.line,this.endColumn=i.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,t)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",void 0!==this.line&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(t){if(!this.source)return"";var e=this.source;null==t&&(t=r.isColorSupported);var n=t=>t,s=t=>t,o=t=>t;if(t){var a=r.createColors(!0),h=a.bold,u=a.gray,l=a.red;s=t=>h(l(t)),n=t=>u(t),i&&(o=t=>i(t))}var f=e.split(/\r?\n/),c=Math.max(this.line-3,0),v=Math.min(this.line+2,f.length),d=String(v).length;return f.slice(c,v).map((t,e)=>{var r=c+1+e,i=" "+(" "+r).slice(-d)+" | ";if(r===this.line){if(t.length>160){var a=Math.max(0,this.column-20),h=Math.max(this.column+20,this.endColumn+20),u=t.slice(a,h),l=n(i.replace(/\d/g," "))+t.slice(0,Math.min(this.column-1,19)).replace(/[^\t]/g," ");return s(">")+n(i)+o(u)+"\n "+l+s("^")}var f=n(i.replace(/\d/g," "))+t.slice(0,this.column-1).replace(/[^\t]/g," ");return s(">")+n(i)+o(t)+"\n "+f+s("^")}return" "+n(i)+o(t)}).join("\n")}toString(){var t=this.showSourceCode();return t&&(t="\n\n"+t+"\n"),this.name+": "+this.message+t}};e.exports=n,n.default=n}),gr=dr((t,e)=>{var r=/(<)(\/?style\b)/gi,i=/(<)(!--)/g,n=/[\t\n\f\r "#'()/;[\\\]{}]/;function s(t){return"string"!=typeof t?t:t.includes("<")?t.replace(r,"\\3c $2").replace(i,"\\3c $2"):t}var o={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function a(t,e){var r="@"+e.name,i=e.params?t.rawValue(e,"params"):"",s=e.raws.afterName;return void 0===s?s=i?" ":"":""===s&&i&&!n.test(i[0])&&(s=" "),r+s+i}function h(t,e,r){for(var i=r.nodes,n=i.length-1;n>0&&"comment"===i[n].type;)n-=1;for(var s=t.raw(r,"semicolon"),o="document"===r.type,a=i.length-1;a>=0;a--){var h=i[a],u=n!==a||s;!u&&i.length-1>a&&("atrule"===h.type&&!h.nodes||"decl"===h.type&&h.prop.startsWith("--"))&&(u=!0),e.push({document:o,node:h,semicolon:u})}}function u(t,e,r,i){var n=t.raw(r,"between","beforeOpen");t.builder(s(i+n)+"{",r,"start");var o=r.nodes&&r.nodes.length,a=()=>{var e=o?t.raw(r,"after"):t.raw(r,"after","emptyBody");e&&t.builder(s(e)),t.builder("}",r,"end"),"rule"===r.type&&r.raws.ownSemicolon&&t.builder(s(r.raws.ownSemicolon),r,"end")};o?(e.push(a),h(t,e,r)):a()}var l=class t{constructor(t){this.builder=t}atrule(t,e){var r=a(this,t);t.nodes?this.block(t,r):this.builder(s(r+((t.raws.between||"")+(e?";":""))),t)}beforeAfter(t,e){var r;r=this.raw(t,null,"decl"===t.type?"beforeDecl":"comment"===t.type?"beforeComment":"before"===e?"beforeRule":"beforeClose");for(var i=t.parent,n=0;i&&"root"!==i.type;)n+=1,i=i.parent;if(r.includes("\n")){var s=this.raw(t,null,"indent");if(s.length)for(var o=0;n>o;o++)r+=s}return r}block(t,e){var r,i=this.raw(t,"between","beforeOpen");this.builder(s(e+i)+"{",t,"start"),t.nodes&&t.nodes.length?(this.body(t),r=this.raw(t,"after")):r=this.raw(t,"after","emptyBody"),r&&this.builder(s(r)),this.builder("}",t,"end")}body(e){var r=t.prototype,i=["atrule","block","body","rule","stringify"].every(t=>this[t]===r[t]),n=[];for(h(this,n,e);n.length>0;){var o=n.pop();if("function"!=typeof o){var l=o.node,f=this.raw(l,"before");f&&this.builder(o.document?f:s(f)),i&&"rule"===l.type?u(this,n,l,this.rawValue(l,"selector")):i&&"atrule"===l.type&&l.nodes?u(this,n,l,a(this,l)):this.stringify(l,o.semicolon)}else o()}}comment(t){var e=this.raw(t,"left","commentLeft"),r=this.raw(t,"right","commentRight");this.builder(s("/*"+e+t.text+r+"*/"),t)}decl(t,e){var r=t.raws,i=this.raw(t,"between","colon"),n=t.prop+i+this.rawValue(t,"value");t.important&&(n+=r.important||" !important"),e&&(n+=";"),this.builder(s(n),t)}document(t){this.body(t)}raw(t,e,r){var i;if(r||(r=e),e&&void 0!==(i=t.raws[e]))return i;var n=t.parent;if("before"===r){if(!n||"root"===n.type&&n.first===t)return"";if(n&&"document"===n.type)return""}if(!n)return o[r];var s=t.root(),a=s.rawCache||(s.rawCache={});if(void 0!==a[r])return a[r];if("before"===r||"after"===r)return this.beforeAfter(t,r);var h,u="raw"+((h=r)[0].toUpperCase()+h.slice(1));return this[u]?i=this[u](s,t):s.walk(t=>{if(void 0!==(i=t.raws[e]))return!1}),void 0===i&&(i=o[r]),a[r]=i,i}rawBeforeClose(t){var e;return t.walk(t=>{if(t.nodes&&t.nodes.length>0&&void 0!==t.raws.after)return(e=t.raws.after).includes("\n")&&(e=e.replace(/[^\n]+$/,"")),!1}),e&&(e=e.replace(/\S/g,"")),e}rawBeforeComment(t,e){var r;return t.walkComments(t=>{if(void 0!==t.raws.before)return(r=t.raws.before).includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1}),void 0===r?r=this.raw(e,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeDecl(t,e){var r;return t.walkDecls(t=>{if(void 0!==t.raws.before)return(r=t.raws.before).includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1}),void 0===r?r=this.raw(e,null,"beforeRule"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeOpen(t){var e;return t.walk(t=>{if("decl"!==t.type&&void 0!==(e=t.raws.between))return!1}),e}rawBeforeRule(t){var e;return t.walk(r=>{if(r.nodes&&(r.parent!==t||t.first!==r)&&void 0!==r.raws.before)return(e=r.raws.before).includes("\n")&&(e=e.replace(/[^\n]+$/,"")),!1}),e&&(e=e.replace(/\S/g,"")),e}rawColon(t){var e;return t.walkDecls(t=>{if(void 0!==t.raws.between)return e=t.raws.between.replace(/[^\s:]/g,""),!1}),e}rawEmptyBody(t){var e;return t.walk(t=>{if(t.nodes&&0===t.nodes.length&&void 0!==(e=t.raws.after))return!1}),e}rawIndent(t){return t.raws.indent?t.raws.indent:(t.walk(r=>{var i=r.parent;if(i&&i!==t&&i.parent&&i.parent===t&&void 0!==r.raws.before){var n=r.raws.before.split("\n");return e=(e=n[n.length-1]).replace(/\S/g,""),!1}}),e);var e}rawSemicolon(t){var e;return t.walk(t=>{if(t.nodes&&t.nodes.length&&"decl"===t.last.type&&void 0!==(e=t.raws.semicolon))return!1}),e}rawValue(t,e){var r=t[e],i=t.raws[e];return i&&i.value===r?i.raw:r}root(t){if(t.source&&t.source.input.hasBOM&&this.builder("\ufeff",t,"start"),this.body(t),t.raws.after){var e=t.raws.after;this.builder(t.parent&&"document"===t.parent.type?e:s(e))}}rule(t){this.block(t,this.rawValue(t,"selector")),t.raws.ownSemicolon&&this.builder(s(t.raws.ownSemicolon),t,"end")}stringify(t,e){if(!this[t.type])throw new Error("Unknown AST node type "+t.type+". Maybe you need to change PostCSS stringifier.");this[t.type](t,e)}};e.exports=l,l.default=l}),wr=dr((t,e)=>{var r=gr();function i(t,e){new r(e).stringify(t)}e.exports=i,i.default=i}),br=dr((t,e)=>{e.exports.isClean=Symbol("isClean"),e.exports.my=Symbol("my")}),Sr=dr((t,e)=>{var r=yr(),i=gr(),n=wr(),s=br(),o=s.isClean,a=s.my;function h(t,e){if(e&&void 0!==e.offset)return e.offset;for(var r=1,i=1,n=0,s=0;t.length>s;s++){if(i===e.line&&r===e.column){n=s;break}"\n"===t[s]?(r=1,i+=1):r+=1}return n}var u=class t{get proxyOf(){return this}constructor(t){for(var e of(void 0===t&&(t={}),this.raws={},this[o]=!1,this[a]=!0,Object.keys(t)))if("__proto__"!==e)if("nodes"===e)for(var r of(this.nodes=[],t[e]))this.append("function"==typeof r.clone&&r.parent?r.clone():r);else this[e]=t[e]}addToError(t){if(t.postcssNode=this,t.stack&&this.source&&/\n\s{4}at /.test(t.stack)){var e=this.source;t.stack=t.stack.replace(/\n\s{4}at /,"$&"+e.input.from+":"+e.start.line+":"+e.start.column+"$&")}return t}after(t){return this.parent.insertAfter(this,t),this}assign(t){for(var e in void 0===t&&(t={}),t)this[e]=t[e];return this}before(t){return this.parent.insertBefore(this,t),this}cleanRaws(t){delete this.raws.before,delete this.raws.after,t||delete this.raws.between}clone(t){void 0===t&&(t={});var e=function(t){for(var e=new t.constructor,r=[[t,e,void 0]];r.length>0;){var i=r.pop(),n=i[0],s=i[1],o=i[2];for(var a in n)if({}.hasOwnProperty.call(n,a)&&"proxyCache"!==a){var h=n[a],u=typeof h;if("parent"===a&&"object"===u)o&&(s[a]=o);else if("source"===a)s[a]=h;else if(Array.isArray(h)){var l=[];for(var f of(s[a]=l,h)){var c=new f.constructor;l.push(c),r.push([f,c,s])}}else{if("object"===u&&null!==h){var v=new h.constructor;r.push([h,v,void 0]),h=v}s[a]=h}}}return e}(this);for(var r in t)e[r]=t[r];return e}cloneAfter(t){void 0===t&&(t={});var e=this.clone(t);return this.parent.insertAfter(this,e),e}cloneBefore(t){void 0===t&&(t={});var e=this.clone(t);return this.parent.insertBefore(this,e),e}error(t,e){if(void 0===e&&(e={}),this.source){var i=this.rangeBy(e),n=i.end,s=i.start;return this.source.input.error(t,{column:s.column,line:s.line},{column:n.column,line:n.line},e)}return new r(t)}getProxyProcessor(){return{get(t,e){return"proxyOf"===e?t:"root"===e?()=>t.root().toProxy():t[e]},set(t,e,r){return t[e]===r||(t[e]=r,"prop"!==e&&"value"!==e&&"name"!==e&&"params"!==e&&"important"!==e&&"text"!==e||t.markDirty()),!0}}}markClean(){this[o]=!0}markDirty(){if(this[o]){this[o]=!1;for(var t=this;t=t.parent;)t[o]=!1}}next(){if(this.parent){var t=this.parent.index(this);return this.parent.nodes[t+1]}}positionBy(t){void 0===t&&(t={});var e="document"in this.source.input?this.source.input.document:this.source.input.css,r={column:this.source.start.column,line:this.source.start.line,offset:h(e,this.source.start)};if(t.index)r=this.positionInside(t.index);else if(t.word){var i=e.slice(h(e,this.source.start),h(e,this.source.end)).indexOf(t.word);-1!==i&&(r=this.positionInside(i))}return r}positionInside(t){for(var e=this.source.start.column,r=this.source.start.line,i=("document"in this.source.input?this.source.input.document:this.source.input.css),n=h(i,this.source.start),s=n+t,o=n;s>o;o++)"\n"===i[o]?(e=1,r+=1):e+=1;return{column:e,line:r,offset:s}}prev(){if(this.parent){var t=this.parent.index(this);return this.parent.nodes[t-1]}}rangeBy(t){void 0===t&&(t={});var e="document"in this.source.input?this.source.input.document:this.source.input.css,r={column:this.source.start.column,line:this.source.start.line,offset:h(e,this.source.start)},i=this.source.end?{column:this.source.end.column+1,line:this.source.end.line,offset:"number"==typeof this.source.end.offset?this.source.end.offset:h(e,this.source.end)+1}:{column:r.column+1,line:r.line,offset:r.offset+1};if(t.word){var n=e.slice(h(e,this.source.start),h(e,this.source.end)).indexOf(t.word);-1!==n&&(r=this.positionInside(n),i=this.positionInside(n+t.word.length))}else t.start?r={column:t.start.column,line:t.start.line,offset:h(e,t.start)}:"number"==typeof t.index&&(r=this.positionInside(t.index)),t.end?i={column:t.end.column,line:t.end.line,offset:h(e,t.end)}:"number"==typeof t.endIndex?i=this.positionInside(t.endIndex):"number"==typeof t.index&&(i=this.positionInside(t.index+1));return(r.line>i.line||i.line===r.line&&r.column>=i.column)&&(i={column:r.column+1,line:r.line,offset:r.offset+1}),{end:i,start:r}}raw(t,e){return(new i).raw(this,t,e)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(){if(this.parent){for(var t=this,e=!1,r=arguments.length,i=new Array(r),n=0;r>n;n++)i[n]=arguments[n];for(var s of i)s===this?e=!0:e?(this.parent.insertAfter(t,s),t=s):this.parent.insertBefore(t,s);e||this.remove()}return this}root(){for(var t=this;t.parent&&"document"!==t.parent.type;)t=t.parent;return t}toJSON(e,r){var i=null==r;r=r||new Map;for(var n=[],s=[[this,n,0]],o=0;s.length>o;o++){var a=s[o],h=a[0],u=a[1],l=a[2],f={};for(var c in u[l]=f,h)if({}.hasOwnProperty.call(h,c)&&"parent"!==c&&"proxyCache"!==c){var v=h[c];if(Array.isArray(v)){var d=[];f[c]=d;for(var p=0;v.length>p;p++){var m=v[p];"object"==typeof m&&m.toJSON?m.toJSON===t.prototype.toJSON?s.push([m,d,p]):d[p]=m.toJSON(null,r):d[p]=m}}else if("object"==typeof v&&v.toJSON)v.toJSON===t.prototype.toJSON?s.push([v,f,c]):f[c]=v.toJSON(null,r);else if("source"===c){if(null==v)continue;var y=r.get(v.input);null==y&&r.set(v.input,y=r.size),f[c]={end:v.end,inputId:y,start:v.start}}else f[c]=v}}var g=n[0];return i&&(g.inputs=[...r.keys()].map(t=>t.toJSON())),g}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(t){void 0===t&&(t=n),t.stringify&&(t=t.stringify);var e="";return t(this,t=>{e+=t}),e}warn(t,e,r){void 0===r&&(r={});var i={node:this};for(var n in r)i[n]=r[n];return t.warn(e,i)}};e.exports=u,u.default=u}),kr=dr((t,e)=>{var r=Sr(),i=class extends r{constructor(t){super(t),this.type="comment"}};e.exports=i,i.default=i}),Cr=dr((t,e)=>{var r=Sr(),i=class extends r{get variable(){return this.prop.startsWith("--")||"$"===this.prop[0]}constructor(t){t&&void 0!==t.value&&"string"!=typeof t.value&&(t=o({},t,{value:String(t.value)})),super(t),this.type="decl"}};e.exports=i,i.default=i}),Mr=dr((t,e)=>{var r,i,n,s,o=kr(),a=Cr(),h=Sr(),u=br(),l=u.isClean,f=u.my,c=class t extends h{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]}append(){for(var t=arguments.length,e=new Array(t),r=0;t>r;r++)e[r]=arguments[r];for(var i of e)for(var n of this.normalize(i,this.last))this.proxyOf.nodes.push(n);return this.markDirty(),this}cleanRaws(e){for(var r=[this];r.length>0;){var i=r.pop();if(i===this||i.cleanRaws===t.prototype.cleanRaws){if(h.prototype.cleanRaws.call(i,e),i.nodes)for(var n of i.nodes)r.push(n)}else i.cleanRaws(e)}}each(t){if(this.proxyOf.nodes){for(var e,r,i=this.getIterator();this.proxyOf.nodes.length>this.indexes[i]&&!1!==(r=t(this.proxyOf.nodes[e=this.indexes[i]],e));)this.indexes[i]+=1;return delete this.indexes[i],r}}every(t){return this.nodes.every(t)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;var t=this.lastEach;return this.indexes[t]=0,t}getProxyProcessor(){return{get(t,e){return"proxyOf"===e?t:t[e]?"each"===e||"string"==typeof e&&e.startsWith("walk")?function(){for(var r=arguments.length,i=new Array(r),n=0;r>n;n++)i[n]=arguments[n];return t[e](...i.map(t=>"function"==typeof t?(e,r)=>t(e.toProxy(),r):t))}:"every"===e||"some"===e?r=>t[e](function(t){for(var e=arguments.length,i=new Array(e>1?e-1:0),n=1;e>n;n++)i[n-1]=arguments[n];return r(t.toProxy(),...i)}):"root"===e?()=>t.root().toProxy():"nodes"===e?t.nodes.map(t=>t.toProxy()):"first"===e||"last"===e?t[e].toProxy():t[e]:t[e]},set(t,e,r){return t[e]===r||(t[e]=r,"name"!==e&&"params"!==e&&"selector"!==e||t.markDirty()),!0}}}index(t){return"number"==typeof t?t:(t.proxyOf&&(t=t.proxyOf),this.proxyOf.nodes.indexOf(t))}insertAfter(t,e){var r,i=this.index(t),n=this.normalize(e,this.proxyOf.nodes[i]).reverse();for(var s of(i=this.index(t),n))this.proxyOf.nodes.splice(i+1,0,s);for(var o in this.indexes)(r=this.indexes[o])>i&&(this.indexes[o]=r+n.length);return this.markDirty(),this}insertBefore(t,e){var r,i=this.index(t),n=this.normalize(e,this.proxyOf.nodes[i],0===i&&"prepend").reverse();for(var s of(i=this.index(t),n))this.proxyOf.nodes.splice(i,0,s);for(var o in this.indexes)i>(r=this.indexes[o])||(this.indexes[o]=r+n.length);return this.markDirty(),this}normalize(e,n){if("string"==typeof e)e=function(t){for(var e=t.slice();e.length>0;){var r=e.pop();if(delete r.source,r.nodes)for(var i of(r.nodes=r.nodes.slice(),r.nodes))e.push(i)}return t.slice()}(i(e).nodes);else if(void 0===e)e=[];else if(Array.isArray(e))for(var h of e=e.slice(0))h.parent&&h.parent.removeChild(h,"ignore");else if("root"===e.type&&"document"!==this.type)for(var u of e=e.nodes.slice(0))u.parent&&u.parent.removeChild(u,"ignore");else if(e.type)e=[e];else if(e.prop){if(void 0===e.value)throw new Error("Value field is missed in node creation");"string"!=typeof e.value&&(e.value=String(e.value)),e=[new a(e)]}else if(e.selector||e.selectors)e=[new s(e)];else if(e.name)e=[new r(e)];else{if(!e.text)throw new Error("Unknown node type in node creation");e=[new o(e)]}return e.map(e=>(e[f]||t.rebuild(e),(e=e.proxyOf).parent&&e.parent.removeChild(e),e[l]&&function(t){for(var e=[t];e.length>0;){var r=e.pop();if(r[l]=!1,r.proxyOf.nodes)for(var i of r.proxyOf.nodes)e.push(i)}}(e),e.raws||(e.raws={}),void 0===e.raws.before&&n&&void 0!==n.raws.before&&(e.raws.before=n.raws.before.replace(/\S/g,"")),e.parent=this.proxyOf,e))}prepend(){for(var t=arguments.length,e=new Array(t),r=0;t>r;r++)e[r]=arguments[r];for(var i of e=e.reverse()){var n=this.normalize(i,this.first,"prepend").reverse();for(var s of n)this.proxyOf.nodes.unshift(s);for(var o in this.indexes)this.indexes[o]=this.indexes[o]+n.length}return this.markDirty(),this}push(t){return t.parent=this,this.proxyOf.nodes.push(t),this}removeAll(){for(var t of this.proxyOf.nodes)t.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(t){var e;for(var r in t=this.index(t),this.proxyOf.nodes[t].parent=void 0,this.proxyOf.nodes.splice(t,1),this.indexes)t>(e=this.indexes[r])||(this.indexes[r]=e-1);return this.markDirty(),this}replaceValues(t,e,r){return r||(r=e,e={}),this.walkDecls(i=>{e.props&&!e.props.includes(i.prop)||e.fast&&!i.value.includes(e.fast)||(i.value=i.value.replace(t,r))}),this.markDirty(),this}some(t){return this.nodes.some(t)}walk(t){if(this.proxyOf.nodes)for(var e=[{iterator:this.getIterator(),node:this.proxyOf}];e.length>0;){var r=e[e.length-1],i=r.iterator,n=r.node,s=n.indexes[i];if(n.proxyOf.nodes.length>s){var o=n.proxyOf.nodes[s],a=void 0;try{a=t(o,s)}catch(t){throw o.addToError(t)}if(!1===a){for(var h of e)delete h.node.indexes[h.iterator];return!1}o.walk&&o.proxyOf.nodes?e.push({iterator:o.getIterator(),node:o}):n.indexes[i]+=1}else{delete n.indexes[i],e.pop();var u=e[e.length-1];u&&(u.node.indexes[u.iterator]+=1)}}}walkAtRules(t,e){return e?t instanceof RegExp?this.walk((r,i)=>{if("atrule"===r.type&&t.test(r.name))return e(r,i)}):this.walk((r,i)=>{if("atrule"===r.type&&r.name===t)return e(r,i)}):(e=t,this.walk((t,r)=>{if("atrule"===t.type)return e(t,r)}))}walkComments(t){return this.walk((e,r)=>{if("comment"===e.type)return t(e,r)})}walkDecls(t,e){return e?t instanceof RegExp?this.walk((r,i)=>{if("decl"===r.type&&t.test(r.prop))return e(r,i)}):this.walk((r,i)=>{if("decl"===r.type&&r.prop===t)return e(r,i)}):(e=t,this.walk((t,r)=>{if("decl"===t.type)return e(t,r)}))}walkRules(t,e){return e?t instanceof RegExp?this.walk((r,i)=>{if("rule"===r.type&&t.test(r.selector))return e(r,i)}):this.walk((r,i)=>{if("rule"===r.type&&r.selector===t)return e(r,i)}):(e=t,this.walk((t,r)=>{if("rule"===t.type)return e(t,r)}))}};c.registerParse=t=>{i=t},c.registerRule=t=>{s=t},c.registerAtRule=t=>{r=t},c.registerRoot=t=>{n=t},e.exports=c,c.default=c,c.rebuild=t=>{for(var e=[t];e.length>0;){var i=e.pop();if("atrule"===i.type?Object.setPrototypeOf(i,r.prototype):"rule"===i.type?Object.setPrototypeOf(i,s.prototype):"decl"===i.type?Object.setPrototypeOf(i,a.prototype):"comment"===i.type?Object.setPrototypeOf(i,o.prototype):"root"===i.type&&Object.setPrototypeOf(i,n.prototype),i[f]=!0,i.nodes)for(var h of i.nodes)e.push(h)}}}),xr=dr((t,e)=>{var r=Mr(),i=class extends r{constructor(t){super(t),this.type="atrule"}append(){return this.proxyOf.nodes||(this.nodes=[]),super.append(...arguments)}prepend(){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...arguments)}};e.exports=i,i.default=i,r.registerAtRule(i)}),Ar=dr((t,e)=>{var r,i,n=Mr(),s=class extends n{constructor(t){super(o({type:"document"},t)),this.nodes||(this.nodes=[])}toResult(t){return void 0===t&&(t={}),new r(new i,this,t).stringify()}};s.registerLazyResult=t=>{r=t},s.registerProcessor=t=>{i=t},e.exports=s,s.default=s}),Er=dr((t,e)=>{e.exports={nanoid(t){void 0===t&&(t=21);for(var e="",r=0|t;r-- >0;)e+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return e},customAlphabet:(t,e)=>(void 0===e&&(e=21),function(r){void 0===r&&(r=e);for(var i="",n=0|r;n-- >0;)i+=t[Math.random()*t.length|0];return i})}}),Rr=dr((t,e)=>{var r=mr(),i=r.existsSync,n=r.readFileSync,s=mr(),o=s.dirname,a=s.isAbsolute,h=s.join,u=s.relative,l=s.sep,f=mr(),c=f.SourceMapConsumer,v=f.SourceMapGenerator,d=class{constructor(t,e){if(!1!==e.map){e.unsafeMap&&(this.unsafeMap=!0),this.loadAnnotation(t),this.inline=this.startWith(this.annotation,"data:");var r=this.loadMap(e.from,e.map?e.map.prev:void 0);!this.mapFile&&e.from&&(this.mapFile=e.from),this.mapFile&&(this.root=o(this.mapFile)),r&&(this.text=r)}}consumer(){return this.consumerCache||(this.consumerCache=new c(this.json||this.text)),this.consumerCache}decodeInline(t){var e=t.match(/^data:application\/json;charset=utf-?8,/)||t.match(/^data:application\/json,/);if(e)return decodeURIComponent(t.substr(e[0].length));var r,i=t.match(/^data:application\/json;charset=utf-?8;base64,/)||t.match(/^data:application\/json;base64,/);if(i)return r=t.substr(i[0].length),Buffer?Buffer.from(r,"base64").toString():window.atob(r);var n=t.slice(22);throw n=n.slice(0,n.indexOf(",")),new Error("Unsupported source map encoding "+n)}getAnnotationURL(t){return t.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(t){return"object"==typeof t&&("string"==typeof t.mappings||"string"==typeof t._mappings||Array.isArray(t.sections))}loadAnnotation(t){var e=t.match(/\/\*\s*# sourceMappingURL=/g);if(e){var r=t.lastIndexOf(e.pop()),i=t.indexOf("*/",r);r>-1&&i>-1&&(this.annotation=this.getAnnotationURL(t.substring(r,i)))}}loadFile(t,e,r){if(!r&&!this.unsafeMap){if(!/\.map$/i.test(t))return;if(!e)return;var s=u(o(e),t);if(".."===s||s.startsWith(".."+l)||a(s))return}if(this.root=o(t),i(t))return this.mapFile=t,n(t,"utf-8").toString().trim()}loadMap(t,e){if(!1===e)return!1;if(e){if("string"==typeof e)return e;if("function"!=typeof e){if(e instanceof c)return v.fromSourceMap(e).toString();if(e instanceof v)return e.toString();if(this.isMap(e))return JSON.stringify(e);throw new Error("Unsupported previous source map format: "+e.toString())}var r=e(t);if(r){var i=this.loadFile(r,t,!0);if(!i)throw new Error("Unable to load previous source map: "+r.toString());return i}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){var n=this.annotation;t&&(n=h(o(t),n));var s=this.loadFile(n,t,!1);if(s)try{this.json=JSON.parse(s.replace(/^\)]}'[^\n]*\n/,""))}catch(t){return}return s}}}startWith(t,e){return!!t&&t.substr(0,e.length)===e}withContent(){return!(!this.consumer().sourcesContent||0>=this.consumer().sourcesContent.length)}};e.exports=d,d.default=d}),Ir=dr((t,e)=>{var r=Er().nanoid,i=mr(),n=i.isAbsolute,s=i.resolve,a=mr(),h=a.SourceMapConsumer,u=a.SourceMapGenerator,l=mr(),f=l.fileURLToPath,c=l.pathToFileURL,v=yr(),d=Rr(),p=mr(),m=Symbol("lineToIndexCache"),y=Boolean(h&&u),g=Boolean(s&&n);function w(t){if(t[m])return t[m];for(var e=t.css.split("\n"),r=new Array(e.length),i=0,n=0,s=e.length;s>n;n++)r[n]=i,i+=e[n].length+1;return t[m]=r,r}var b=class{get from(){return this.file||this.id}constructor(t,e){if(void 0===e&&(e={}),null==t||"object"==typeof t&&!t.toString)throw new Error("PostCSS received "+t+" instead of CSS string");if(this.css=t.toString(),"\ufeff"===this.css[0]||""===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,this.document=this.css,e.document&&(this.document=e.document.toString()),e.from&&(this.file=!g||/^\w+:\/\//.test(e.from)||n(e.from)?e.from:s(e.from)),g&&y){var i=new d(this.css,e);if(i.text){this.map=i;var o=i.consumer().file;!this.file&&o&&(this.file=this.mapResolve(o))}}this.file||(this.id="<input css "+r(6)+">"),this.map&&(this.map.file=this.from)}error(t,e,r,i){var n,s,o,a,h;if(void 0===i&&(i={}),e&&"object"==typeof e){var u=e,l=r;if("number"==typeof u.offset){var f=this.fromOffset(a=u.offset);e=f.line,r=f.col}else a=this.fromLineAndColumn(e=u.line,r=u.column);if("number"==typeof l.offset){var d=this.fromOffset(o=l.offset);s=d.line,n=d.col}else s=l.line,n=l.column,o=this.fromLineAndColumn(l.line,l.column)}else if(r)a=this.fromLineAndColumn(e,r);else{var p=this.fromOffset(a=e);e=p.line,r=p.col}var m=this.origin(e,r,s,n);return(h=m?new v(t,void 0===m.endLine?m.line:{column:m.column,line:m.line},void 0===m.endLine?m.column:{column:m.endColumn,line:m.endLine},m.source,m.file,i.plugin):new v(t,void 0===s?e:{column:r,line:e},void 0===s?r:{column:n,line:s},this.css,this.file,i.plugin)).input={column:r,endColumn:n,endLine:s,endOffset:o,line:e,offset:a,source:this.css},this.file&&(c&&(h.input.url=c(this.file).toString()),h.input.file=this.file),h}fromLineAndColumn(t,e){return w(this)[t-1]+e-1}fromOffset(t){var e=w(this),r=0;if(e[e.length-1]>t)for(var i,n=e.length-2;n>r;)if(e[i=r+(n-r>>1)]>t)n=i-1;else{if(e[i+1]>t){r=i;break}r=i+1}else r=e.length-1;return{col:t-e[r]+1,line:r+1}}mapResolve(t){return/^\w+:\/\//.test(t)?t:s(this.map.consumer().sourceRoot||this.map.root||".",t)}origin(t,e,r,i){if(!this.map)return!1;var s,o,a=this.map.consumer(),h=a.originalPositionFor({column:e-1,line:t});if(!h.source)return!1;if("number"==typeof r){var u=a.originalPositionFor({column:i-1,line:r});u.source&&(s=u)}o=n(h.source)?c(h.source):new URL(h.source,this.map.consumer().sourceRoot||c(this.map.mapFile));var l={column:h.column+1,endColumn:s&&s.column+1,endLine:s&&s.line,line:h.line,url:o.toString()};if("file:"===o.protocol){if(!f)throw new Error("file: protocol is not available in this PostCSS build");l.file=f(o)}var v=a.sourceContentFor(h.source);return v&&(l.source=v),l}toJSON(){var t={};for(var e of["hasBOM","css","file","id"])null!=this[e]&&(t[e]=this[e]);return this.map&&(t.map=o({},this.map),t.map.consumerCache&&(t.map.consumerCache=void 0)),t}};e.exports=b,b.default=b,p&&p.registerInput&&p.registerInput(b)}),Tr=dr((t,e)=>{var r,i,n=Mr(),s=class extends n{constructor(t){super(t),this.type="root",this.nodes||(this.nodes=[])}normalize(t,e,r){var i=new Set;for(var n of Array.isArray(t)?t:[t])n&&"object"==typeof n&&!n.parent&&n.raws&&void 0!==n.raws.before&&i.add(n.raws);var s=super.normalize(t);if(e)if("prepend"===r)this.nodes.length>1?e.raws.before=this.nodes[1].raws.before:delete e.raws.before;else if(this.first!==e)for(var o of s)i.has(o.raws)||(o.raws.before=e.raws.before);return s}removeChild(t,e){var r=this.index(t);return!e&&0===r&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(t)}toResult(t){return void 0===t&&(t={}),new r(new i,this,t).stringify()}};s.registerLazyResult=t=>{r=t},s.registerProcessor=t=>{i=t},e.exports=s,s.default=s,n.registerRoot(s)}),Or=dr((t,e)=>{var r={comma(t){return r.split(t,[","],!0)},space(t){return r.split(t,[" ","\n","\t"])},split(t,e,r){var i=[],n="",s=!1,o=0,a=!1,h="",u=!1;for(var l of t)u?u=!1:"\\"===l?u=!0:a?l===h&&(a=!1):'"'===l||"'"===l?(a=!0,h=l):"("===l?o+=1:")"===l?o>0&&(o-=1):0===o&&e.includes(l)&&(s=!0),s?(""!==n&&i.push(n.trim()),n="",s=!1):n+=l;return(r||""!==n)&&i.push(n.trim()),i}};e.exports=r,r.default=r}),Dr=dr((t,e)=>{var r=Mr(),i=Or(),n=class extends r{get selectors(){return i.comma(this.selector)}set selectors(t){var e=this.selector?this.selector.match(/,\s*/):null,r=e?e[0]:","+this.raw("between","beforeOpen");this.selector=t.join(r)}constructor(t){super(t),this.type="rule",this.nodes||(this.nodes=[])}};e.exports=n,n.default=n,r.registerRule(n)}),Nr=dr((t,r)=>{var i=xr(),n=kr(),a=Cr(),h=Ir(),u=Rr(),l=Tr(),f=Dr();function c(t,e){return t.inputs?t.inputs.map(t=>{var e=o({},t,{__proto__:h.prototype});return e.map&&(e.map=o({},e.map,{__proto__:u.prototype})),e}):e}function v(t,r,h){var u,c=o({},t);if(delete c.inputs,delete c.nodes,c.source){var v=c.source,d=v.inputId;c.source=s(v,e),null!=d&&(c.source.input=r[d])}if("root"===c.type)u=new l(c);else if("decl"===c.type)u=new a(c);else if("rule"===c.type)u=new f(c);else if("comment"===c.type)u=new n(c);else{if("atrule"!==c.type)throw new Error("Unknown node type: "+t.type);u=new i(c)}if(h)for(var p of(u.nodes=h,h))p.parent=u;return u}function d(t,e){if(Array.isArray(t))return t.map(t=>d(t));for(var r,i=[{childIndex:0,children:[],inputs:c(t,e),json:t}];i.length>0;){var n=i[i.length-1],s=n.json.nodes;if(s&&s.length>n.childIndex){var o=s[n.childIndex];n.childIndex+=1,i.push({childIndex:0,children:[],inputs:c(o,n.inputs),json:o})}else{i.pop();var a=v(n.json,n.inputs,s?n.children:void 0);i.length>0?i[i.length-1].children.push(a):r=a}}return r}r.exports=d,d.default=d}),_r=dr((t,e)=>{var r=mr(),i=r.dirname,n=r.relative,s=r.resolve,o=r.sep,a=mr(),h=a.SourceMapConsumer,u=a.SourceMapGenerator,l=mr().pathToFileURL,f=Ir(),c=Boolean(h&&u),v=Boolean(i&&s&&n&&o);e.exports=class{constructor(t,e,r,i){this.stringify=t,this.mapOpts=r.map||{},this.root=e,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(){var t;t=this.isInline()?"data:application/json;base64,"+this.toBase64(this.map.toString()):"string"==typeof this.mapOpts.annotation?this.mapOpts.annotation:"function"==typeof this.mapOpts.annotation?this.mapOpts.annotation(this.opts.to,this.root):this.outputFile()+".map";var e="\n";this.css.includes("\r\n")&&(e="\r\n"),this.css+=e+"/*# sourceMappingURL="+t+" */"}applyPrevMaps(){for(var t of this.previous()){var e=this.toUrl(this.path(t.file)),r=t.root||i(t.file),n=void 0;!1===this.mapOpts.sourcesContent?(n=new h(t.text)).sourcesContent&&(n.sourcesContent=null):n=t.consumer(),this.map.applySourceMap(n,e,this.toUrl(this.path(r)))}}clearAnnotation(){if(!1!==this.mapOpts.annotation)if(this.root)for(var t,e=this.root.nodes.length-1;e>=0;e--)"comment"===(t=this.root.nodes[e]).type&&t.text.startsWith("# sourceMappingURL=")&&this.root.removeChild(e);else if(this.css)for(var r;-1!==(r=this.css.lastIndexOf("/*#"));){var i=this.css.indexOf("*/",r+3);if(-1===i)break;for(;r>0&&"\n"===this.css[r-1];)r--;this.css=this.css.slice(0,r)+this.css.slice(i+2)}}generate(){if(this.clearAnnotation(),v&&c&&this.isMap())return this.generateMap();var t="";return this.stringify(this.root,e=>{t+=e}),[t]}generateMap(){if(this.root)this.generateString();else if(1===this.previous().length){var t=this.previous()[0].consumer();t.file=this.outputFile(),this.map=u.fromSourceMap(t,{ignoreInvalidMapping:!0})}else this.map=new u({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css="",this.map=new u({file:this.outputFile(),ignoreInvalidMapping:!0});var t,e,r=1,i=1,n="<no source>",s={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,(o,a,h)=>{if(this.css+=o,a&&"end"!==h&&(s.generated.line=r,s.generated.column=i-1,a.source&&a.source.start?(s.source=this.sourcePath(a),s.original.line=a.source.start.line,s.original.column=a.source.start.column-1,this.map.addMapping(s)):(s.source=n,s.original.line=1,s.original.column=0,this.map.addMapping(s))),(e=o.match(/\n/g))?(r+=e.length,t=o.lastIndexOf("\n"),i=o.length-t):i+=o.length,a&&"start"!==h){var u=a.parent||{raws:{}};("decl"!==a.type&&("atrule"!==a.type||a.nodes)||a!==u.last||u.raws.semicolon)&&(a.source&&a.source.end?(s.source=this.sourcePath(a),s.original.line=a.source.end.line,s.original.column=a.source.end.column-1,s.generated.line=r,s.generated.column=i-2,this.map.addMapping(s)):(s.source=n,s.original.line=1,s.original.column=0,s.generated.line=r,s.generated.column=i-1,this.map.addMapping(s)))}})}isAnnotation(){return!!this.isInline()||(void 0!==this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some(t=>t.annotation))}isInline(){if(void 0!==this.mapOpts.inline)return this.mapOpts.inline;var t=this.mapOpts.annotation;return(void 0===t||!0===t)&&(!this.previous().length||this.previous().some(t=>t.inline))}isMap(){return void 0!==this.opts.map?!!this.opts.map:this.previous().length>0}isSourcesContent(){return void 0!==this.mapOpts.sourcesContent?this.mapOpts.sourcesContent:!this.previous().length||this.previous().some(t=>t.withContent())}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(t){if(this.mapOpts.absolute)return t;if(60===t.charCodeAt(0))return t;if(/^\w+:\/\//.test(t))return t;var e=this.memoizedPaths.get(t);if(e)return e;var r=this.opts.to?i(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(r=i(s(r,this.mapOpts.annotation)));var o=n(r,t);return this.memoizedPaths.set(t,o),o}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(t=>{if(t.source&&t.source.input.map){var e=t.source.input.map;this.previousMaps.includes(e)||this.previousMaps.push(e)}});else{var t=new f(this.originalCSS,this.opts);t.map&&this.previousMaps.push(t.map)}return this.previousMaps}setSourcesContent(){var t={};if(this.root)this.root.walk(e=>{if(e.source){var r=e.source.input.from;if(r&&!t[r]){t[r]=!0;var i=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(i,e.source.input.css)}}});else if(this.css){var e=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(e,this.css)}}sourcePath(t){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(t.source.input.from):this.toUrl(this.path(t.source.input.from))}toBase64(t){return Buffer?Buffer.from(t).toString("base64"):window.btoa(unescape(encodeURIComponent(t)))}toFileUrl(t){var e=this.memoizedFileURLs.get(t);if(e)return e;if(l){var r=l(t).toString();return this.memoizedFileURLs.set(t,r),r}throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(t){var e=this.memoizedURLs.get(t);if(e)return e;"\\"===o&&(t=t.replace(/\\/g,"/"));var r=encodeURI(t).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(t,r),r}}}),Lr=dr((t,e)=>{var r="'".charCodeAt(0),i='"'.charCodeAt(0),n="\\".charCodeAt(0),s="/".charCodeAt(0),o="\n".charCodeAt(0),a=" ".charCodeAt(0),h="\f".charCodeAt(0),u="\t".charCodeAt(0),l="\r".charCodeAt(0),f="[".charCodeAt(0),c="]".charCodeAt(0),v="(".charCodeAt(0),d=")".charCodeAt(0),p="{".charCodeAt(0),m="}".charCodeAt(0),y=";".charCodeAt(0),g="*".charCodeAt(0),w=":".charCodeAt(0),b="@".charCodeAt(0),S=/[\t\n\f\r "#'()/;[\\\]{}]/g,k=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,C=/.[\r\n"'(/\\]/,M=/[\da-f]/i;e.exports=function(t,e){void 0===e&&(e={});var x,A,E,R,I,T,O,D,N,_,L=t.css.valueOf(),F=e.ignoreErrors,P=L.length,B=0,j=[],U=[],W=-1;function H(e){throw t.error("Unclosed "+e,B)}return{back(t){U.push(t)},endOfFile:()=>0===U.length&&B>=P,nextToken(t){if(U.length)return U.pop();if(P>B){var e=!!t&&t.ignoreUnclosed;switch(x=L.charCodeAt(B)){case o:case a:case u:case l:case h:R=B;do{x=L.charCodeAt(R+=1)}while(x===a||x===o||x===u||x===l||x===h);T=["space",L.slice(B,R)],B=R-1;break;case f:case c:case p:case m:case w:case y:case d:var G=String.fromCharCode(x);T=[G,G,B];break;case v:if(_=j.length?j.pop()[1]:"",N=L.charCodeAt(B+1),"url"===_&&N!==r&&N!==i&&N!==a&&N!==o&&N!==u&&N!==h&&N!==l){R=B;do{if(O=!1,-1===(R=L.indexOf(")",R+1))){if(F||e){R=B;break}H("bracket")}for(D=R;L.charCodeAt(D-1)===n;)D-=1,O=!O}while(O);T=["brackets",L.slice(B,R+1),B,R],B=R}else B>W?(R=L.indexOf(")",B+1),A=L.slice(B,R+1),-1===R||C.test(A)?(W=-1===R?P:R,T=["(","(",B]):(T=["brackets",A,B,R],B=R)):T=["(","(",B];break;case r:case i:I=x===r?"'":'"',R=B;do{if(O=!1,-1===(R=L.indexOf(I,R+1))){if(F||e){R=B+1;break}H("string")}for(D=R;L.charCodeAt(D-1)===n;)D-=1,O=!O}while(O);T=["string",L.slice(B,R+1),B,R],B=R;break;case b:S.lastIndex=B+1,S.test(L),T=["at-word",L.slice(B,1+(R=0===S.lastIndex?L.length-1:S.lastIndex-2)),B,R],B=R;break;case n:for(R=B,E=!0;L.charCodeAt(R+1)===n;)R+=1,E=!E;if(x=L.charCodeAt(R+1),E&&x!==s&&x!==a&&x!==o&&x!==u&&x!==l&&x!==h&&M.test(L.charAt(R+=1))){for(;M.test(L.charAt(R+1));)R+=1;L.charCodeAt(R+1)===a&&(R+=1)}T=["word",L.slice(B,R+1),B,R],B=R;break;default:x===s&&L.charCodeAt(B+1)===g?(0===(R=L.indexOf("*/",B+2)+1)&&(F||e?R=L.length:H("comment")),T=["comment",L.slice(B,R+1),B,R],B=R):(k.lastIndex=B+1,k.test(L),T=["word",L.slice(B,1+(R=0===k.lastIndex?L.length-1:k.lastIndex-2)),B,R],j.push(T),B=R)}return B++,T}},position:()=>B}}}),Fr=dr((t,e)=>{var r=xr(),i=kr(),n=Cr(),s=Tr(),o=Dr(),a=Lr(),h={empty:!0,space:!0};function u(t,e,r){for(var i="",n=e;r>n;n++)i+=t[n][1];return i}e.exports=class{constructor(t){this.input=t,this.root=new s,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:t,start:{column:1,line:1,offset:0}}}atrule(t){var e,i,n,s=new r;s.name=t[1].slice(1),""===s.name&&this.unnamedAtrule(s,t),this.init(s,t[2]);for(var o=!1,a=!1,h=[],u=[];!this.tokenizer.endOfFile();){if("("===(e=(t=this.tokenizer.nextToken())[0])||"["===e?u.push("("===e?")":"]"):"{"===e&&u.length>0?u.push("}"):e===u[u.length-1]&&u.pop(),0===u.length){if(";"===e){s.source.end=this.getPosition(t[2]),s.source.end.offset++,this.semicolon=!0;break}if("{"===e){a=!0;break}if("}"===e){if(h.length>0){for(i=h[n=h.length-1];i&&"space"===i[0];)i=h[--n];i&&(s.source.end=this.getPosition(i[3]||i[2]),s.source.end.offset++)}this.end(t);break}h.push(t)}else h.push(t);if(this.tokenizer.endOfFile()){o=!0;break}}s.raws.between=this.spacesAndCommentsFromEnd(h),h.length?(s.raws.afterName=this.spacesAndCommentsFromStart(h),this.raw(s,"params",h),o&&(s.source.end=this.getPosition((t=h[h.length-1])[3]||t[2]),s.source.end.offset++,this.spaces=s.raws.between,s.raws.between="")):(s.raws.afterName="",s.params=""),a&&(s.nodes=[],this.current=s)}checkMissedSemicolon(t){var e=this.colon(t);if(!1!==e){for(var r,i=0,n=e-1;n>=0&&("space"===(r=t[n])[0]||2!==(i+=1));n--);throw this.input.error("Missed semicolon","word"===r[0]?r[3]+1:r[2])}}colon(t){var e,r,i,n=0;for(var s of t.entries()){var o=s[0];if("("===(i=(r=s[1])[0])&&(n+=1),")"===i&&(n-=1),0===n&&":"===i){if(e){if("word"===e[0]&&"progid"===e[1])continue;return o}this.doubleColon(r)}e=r}return!1}comment(t){var e=new i;this.init(e,t[2]),e.source.end=this.getPosition(t[3]||t[2]),e.source.end.offset++;var r=t[1].slice(2,-2);if(r.trim()){var n=r.match(/^(\s*)([^]*\S)(\s*)$/);e.text=n[2],e.raws.left=n[1],e.raws.right=n[3]}else e.text="",e.raws.left=r,e.raws.right=""}createTokenizer(){this.tokenizer=a(this.input)}decl(t,e){var r=new n;this.init(r,t[0][2]);var i=t[t.length-1];";"===i[0]&&(this.semicolon=!0,t.pop()),r.source.end=this.getPosition(i[3]||i[2]||function(t){for(var e=t.length-1;e>=0;e--){var r=t[e],i=r[3]||r[2];if(i)return i}}(t)),r.source.end.offset++;for(var s=0;"word"!==t[s][0];)s===t.length-1&&this.unknownWord([t[s]]),s++;r.raws.before+=u(t,0,s),r.source.start=this.getPosition(t[s][2]);for(var o=s;t.length>s;){var a=t[s][0];if(":"===a||"space"===a||"comment"===a)break;s++}r.prop=u(t,o,s);for(var h,l=s;t.length>s&&(h=t[s],s++,":"!==h[0]);)"word"===h[0]&&/\w/.test(h[1])&&this.unknownWord([h]);r.raws.between=u(t,l,s),"_"!==r.prop[0]&&"*"!==r.prop[0]||(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));for(var f=s;t.length>s;){var c=t[s][0];if("space"!==c&&"comment"!==c)break;s++}var v=t.slice(f,s);t=t.slice(s),this.precheckMissedSemicolon(t);for(var d=t.length-1;d>=0;d--){if("!important"===(h=t[d])[1].toLowerCase()){r.important=!0;var p=this.stringFrom(t,d);" !important"!==(p=this.spacesFromEnd(t)+p)&&(r.raws.important=p);break}if("important"===h[1].toLowerCase()){for(var m=t.slice(0),y="",g=d;g>0;g--){var w=m[g][0];if(y.trim().startsWith("!")&&"space"!==w)break;y=m.pop()[1]+y}y.trim().startsWith("!")&&(r.important=!0,r.raws.important=y,t=m)}if("space"!==h[0]&&"comment"!==h[0])break}t.some(t=>"space"!==t[0]&&"comment"!==t[0])&&(r.raws.between+=v.map(t=>t[1]).join(""),v=[]),this.raw(r,"value",v.concat(t),e),r.value.includes(":")&&!e&&this.checkMissedSemicolon(t)}doubleColon(t){throw this.input.error("Double colon",{offset:t[2]},{offset:t[2]+t[1].length})}emptyRule(t){var e=new o;this.init(e,t[2]),e.selector="",e.raws.between="",this.current=e}end(t){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(t[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(t)}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(t){if(this.spaces+=t[1],this.current.nodes){var e=this.current.nodes[this.current.nodes.length-1];e&&"rule"===e.type&&!e.raws.ownSemicolon&&(e.raws.ownSemicolon=this.spaces,this.spaces="",e.source.end=this.getPosition(t[2]),e.source.end.offset+=e.raws.ownSemicolon.length)}}getPosition(t){var e=this.input.fromOffset(t);return{column:e.col,line:e.line,offset:t}}init(t,e){this.current.push(t),t.source={input:this.input,start:this.getPosition(e)},t.raws.before=this.spaces,this.spaces="","comment"!==t.type&&(this.semicolon=!1)}other(t){for(var e=!1,r=null,i=!1,n=null,s=[],o=t[1].startsWith("--"),a=[],h=t;h;){if(r=h[0],a.push(h),"("===r||"["===r)n||(n=h),s.push("("===r?")":"]");else if(o&&i&&"{"===r)n||(n=h),s.push("}");else if(0===s.length){if(";"===r){if(i)return void this.decl(a,o);break}if("{"===r)return void this.rule(a);if("}"===r){this.tokenizer.back(a.pop()),e=!0;break}":"===r&&(i=!0)}else r===s[s.length-1]&&(s.pop(),0===s.length&&(n=null));h=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(e=!0),s.length>0&&this.unclosedBracket(n),e&&i){if(!o)for(;a.length&&("space"===(h=a[a.length-1][0])||"comment"===h);)this.tokenizer.back(a.pop());this.decl(a,o)}else this.unknownWord(a)}parse(){for(var t;!this.tokenizer.endOfFile();)switch((t=this.tokenizer.nextToken())[0]){case"space":this.spaces+=t[1];break;case";":this.freeSemicolon(t);break;case"}":this.end(t);break;case"comment":this.comment(t);break;case"at-word":this.atrule(t);break;case"{":this.emptyRule(t);break;default:this.other(t)}this.endFile()}precheckMissedSemicolon(){}raw(t,e,r,i){for(var n,s,o=r.length,a="",u=!0,l=0;o>l;l+=1)"space"!==(s=(n=r[l])[0])||l!==o-1||i?"comment"===s&&(h[r[l-1]?r[l-1][0]:"empty"]||h[r[l+1]?r[l+1][0]:"empty"]||","===a.slice(-1))?u=!1:a+=n[1]:u=!1;if(!u){var f=r.reduce((t,e)=>t+e[1],"");t.raws[e]={raw:f,value:a}}t[e]=a}rule(t){t.pop();var e=new o;this.init(e,t[0][2]),e.raws.between=this.spacesAndCommentsFromEnd(t),this.raw(e,"selector",t),this.current=e}spacesAndCommentsFromEnd(t){for(var e,r="";t.length&&("space"===(e=t[t.length-1][0])||"comment"===e);)r=t.pop()[1]+r;return r}spacesAndCommentsFromStart(t){for(var e,r="";t.length&&("space"===(e=t[0][0])||"comment"===e);)r+=t.shift()[1];return r}spacesFromEnd(t){for(var e="";t.length&&"space"===t[t.length-1][0];)e=t.pop()[1]+e;return e}stringFrom(t,e){for(var r="",i=e;t.length>i;i++)r+=t[i][1];return t.splice(e,t.length-e),r}unclosedBlock(){var t=this.current.source.start;throw this.input.error("Unclosed block",t.line,t.column)}unclosedBracket(t){throw this.input.error("Unclosed bracket",{offset:t[2]},{offset:t[2]+1})}unexpectedClose(t){throw this.input.error("Unexpected }",{offset:t[2]},{offset:t[2]+1})}unknownWord(t){throw this.input.error("Unknown word "+t[0][1],{offset:t[0][2]},{offset:t[0][2]+t[0][1].length})}unnamedAtrule(t,e){throw this.input.error("At-rule without name",{offset:e[2]},{offset:e[2]+e[1].length})}}}),Pr=dr((t,e)=>{var r=Mr(),i=Ir(),n=Fr();function s(t,e){var r=new n(new i(t,e));try{r.parse()}catch(t){throw"CssSyntaxError"===t.name&&e&&e.from&&(/\.scss$/i.test(e.from)?t.message+="\nYou tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser":/\.sass/i.test(e.from)?t.message+="\nYou tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser":/\.less$/i.test(e.from)&&(t.message+="\nYou tried to parse Less with the standard CSS parser; try again with the postcss-less parser")),t}return r.root}e.exports=s,s.default=s,r.registerParse(s)}),Br=dr((t,e)=>{var r=Mr(),i=br().my,n=class{constructor(t,e){if(void 0===e&&(e={}),this.type="warning",this.text=t,e.node&&e.node.source){e.node[i]||r.rebuild(e.node);var n=e.node.rangeBy(e);this.line=n.start.line,this.column=n.start.column,this.endLine=n.end.line,this.endColumn=n.end.column}for(var s in e)this[s]=e[s]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}};e.exports=n,n.default=n}),jr=dr((t,e)=>{var r=Br(),i=class{get content(){return this.css}constructor(t,e,r){this.processor=t,this.messages=[],this.root=e,this.opts=r,this.css="",this.map=void 0}toString(){return this.css}warn(t,e){void 0===e&&(e={}),e.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(e.plugin=this.lastPlugin.postcssPlugin);var i=new r(t,e);return this.messages.push(i),i}warnings(){return this.messages.filter(t=>"warning"===t.type)}};e.exports=i,i.default=i}),Ur=dr((t,e)=>{var r={};e.exports=function(t){r[t]||(r[t]=!0,"undefined"!=typeof console&&console.warn&&console.warn(t))}}),Wr=dr((t,e)=>{var r=Mr(),i=Ar(),s=_r(),a=Pr(),h=jr(),u=Tr(),l=wr(),f=br(),c=f.isClean,v=f.my,d=Ur(),p={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},m={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},y={Once:!0,postcssPlugin:!0,prepare:!0};function g(t){return"object"==typeof t&&"function"==typeof t.then}function w(t){var e=!1,r=p[t.type];return"decl"===t.type?e=t.prop.toLowerCase():"atrule"===t.type&&(e=t.name.toLowerCase()),e&&t.append?[r,r+"-"+e,0,r+"Exit",r+"Exit-"+e]:e?[r,r+"-"+e,r+"Exit",r+"Exit-"+e]:t.append?[r,0,r+"Exit"]:[r,r+"Exit"]}function b(t){return{eventIndex:0,events:"document"===t.type?["Document",0,"DocumentExit"]:"root"===t.type?["Root",0,"RootExit"]:w(t),iterator:0,node:t,visitorIndex:0,visitors:[]}}function S(t){for(var e=[t];e.length>0;){var r=e.pop();if(r[c]=!1,r.nodes)for(var i of r.nodes)e.push(i)}return t}var k={},C=class t{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"}constructor(e,i,n){var s;if(this.stringified=!1,this.processed=!1,"object"!=typeof i||null===i||"root"!==i.type&&"document"!==i.type)if(i instanceof t||i instanceof h)s=S(i.root),i.map&&(void 0===n.map&&(n.map={}),n.map.inline||(n.map.inline=!1),n.map.prev=i.map);else{var u=a;n.syntax&&(u=n.syntax.parse),n.parser&&(u=n.parser),u.parse&&(u=u.parse);try{s=u(i,n)}catch(t){this.processed=!0,this.error=t}s&&!s[v]&&r.rebuild(s)}else s=S(i);this.result=new h(e,s,n),this.helpers=o({},k,{postcss:k,result:this.result}),this.plugins=this.processor.plugins.map(t=>"object"==typeof t&&t.prepare?o({},t,t.prepare(this.result)):t)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(t){return this.async().catch(t)}finally(t){return this.async().then(t,t)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(t,e){var r=this.result.lastPlugin;try{if(e&&e.addToError(t),this.error=t,"CssSyntaxError"!==t.name||t.plugin){if(r.postcssVersion){var i=r.postcssPlugin,n=r.postcssVersion,s=this.result.processor.version,o=n.split("."),a=s.split(".");(o[0]!==a[0]||parseInt(o[1])>parseInt(a[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+s+", but "+i+" uses "+n+". Perhaps this is the source of the error below.")}}else t.plugin=r.postcssPlugin,t.setMessage()}catch(t){console&&console.error&&console.error(t)}return t}prepareVisitors(){this.listeners={};var t=(t,e,r)=>{this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push([t,r])};for(var e of this.plugins)if("object"==typeof e)for(var r in e){if(!m[r]&&/^[A-Z]/.test(r))throw new Error("Unknown event "+r+" in "+e.postcssPlugin+". Try to update PostCSS ("+this.processor.version+" now).");if(!y[r])if("object"==typeof e[r])for(var i in e[r])t(e,"*"===i?r:r+"-"+i.toLowerCase(),e[r][i]);else"function"==typeof e[r]&&t(e,r,e[r])}this.hasListener=Object.keys(this.listeners).length>0}runAsync(){var t=this;return n(function*(){t.plugin=0;for(var e=0;t.plugins.length>e;e++){var r=t.runOnRoot(t.plugins[e]);if(g(r))try{yield r}catch(e){throw t.handleError(e)}}if(t.prepareVisitors(),t.hasListener){for(var i=t.result.root;!i[c];){i[c]=!0;for(var n=[b(i)];n.length>0;){var s=t.visitTick(n);if(g(s))try{yield s}catch(e){throw t.handleError(e,n[n.length-1].node)}}}if(t.listeners.OnceExit){var o=function*(){var e=a[1];t.result.lastPlugin=a[0];try{if("document"===i.type){var r=i.nodes.map(r=>e(r,t.helpers));yield Promise.all(r)}else yield e(i,t.helpers)}catch(e){throw t.handleError(e)}};for(var a of t.listeners.OnceExit)yield*o()}}return t.processed=!0,t.stringify()})()}runOnRoot(t){this.result.lastPlugin=t;try{if("object"==typeof t&&t.Once){if("document"===this.result.root.type){var e=this.result.root.nodes.map(e=>t.Once(e,this.helpers));return g(e[0])?Promise.all(e):e}return t.Once(this.result.root,this.helpers)}if("function"==typeof t)return t(this.result.root,this.result)}catch(t){throw this.handleError(t)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();var t=this.result.opts,e=l;t.syntax&&(e=t.syntax.stringify),t.stringifier&&(e=t.stringifier),e.stringify&&(e=e.stringify);var r=this.result.root.source;if(void 0===t.map&&!(r&&r.input&&r.input.map)){var i="";return e(this.result.root,t=>{i+=t}),this.result.css=i,this.result}var n=new s(e,this.result.root,this.result.opts).generate();return this.result.css=n[0],this.result.map=n[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(var t of this.plugins)if(g(this.runOnRoot(t)))throw this.getAsyncError();if(this.prepareVisitors(),this.hasListener){for(var e=this.result.root;!e[c];)e[c]=!0,this.walkSync(e);if(this.listeners.OnceExit)if("document"===e.type)for(var r of e.nodes)this.visitSync(this.listeners.OnceExit,r);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(t,e){return"from"in this.opts||d("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(t,e)}toString(){return this.css}visitSync(t,e){for(var r of t){var i=r[1];this.result.lastPlugin=r[0];var n=void 0;try{n=i(e,this.helpers)}catch(t){throw this.handleError(t,e.proxyOf)}if("root"!==e.type&&"document"!==e.type&&!e.parent)return!0;if(g(n))throw this.getAsyncError()}}visitTick(t){var e=t[t.length-1],r=e.node,i=e.visitors;if("root"===r.type||"document"===r.type||r.parent){if(i.length>0&&i.length>e.visitorIndex){var n=i[e.visitorIndex],s=n[0],o=n[1];e.visitorIndex+=1,e.visitorIndex===i.length&&(e.visitors=[],e.visitorIndex=0),this.result.lastPlugin=s;try{return o(r.toProxy(),this.helpers)}catch(t){throw this.handleError(t,r)}}if(0!==e.iterator){for(var a,h=e.iterator;a=r.nodes[r.indexes[h]];)if(r.indexes[h]+=1,!a[c])return a[c]=!0,void t.push(b(a));e.iterator=0,delete r.indexes[h]}for(var u=e.events;u.length>e.eventIndex;){var l=u[e.eventIndex];if(e.eventIndex+=1,0===l)return void(r.nodes&&r.nodes.length&&(r[c]=!0,e.iterator=r.getIterator()));if(this.listeners[l])return void(e.visitors=this.listeners[l])}t.pop()}else t.pop()}walkSync(t){t[c]=!0;for(var e=[{eventIndex:0,events:w(t),iterator:0,node:t}];e.length>0;){var r=e[e.length-1],i=r.node;if(0!==r.iterator){for(var n=r.iterator,s=void 0,o=!1;s=i.nodes[i.indexes[n]];)if(i.indexes[n]+=1,!s[c]){s[c]=!0,e.push({eventIndex:0,events:w(s),iterator:0,node:s}),o=!0;break}if(o)continue;r.iterator=0,delete i.indexes[n]}if(r.events.length>r.eventIndex){var a=r.events[r.eventIndex];if(r.eventIndex+=1,0===a)i.nodes&&i.nodes.length&&(r.iterator=i.getIterator());else{var h=this.listeners[a];h&&this.visitSync(h,i.toProxy())&&e.pop()}}else e.pop()}}warnings(){return this.sync().warnings()}};C.registerPostcss=t=>{k=t},e.exports=C,C.default=C,u.registerLazyResult(C),i.registerLazyResult(C)}),Hr=dr((t,e)=>{var r=_r(),i=Pr(),n=jr(),s=wr(),o=Ur(),a=class{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;var t,e=i;try{t=e(this._css,this._opts)}catch(t){this.error=t}if(this.error)throw this.error;return this._root=t,t}get[Symbol.toStringTag](){return"NoWorkResult"}constructor(t,e,i){e=e.toString(),this.stringified=!1,this._processor=t,this._css=e,this._opts=i,this._map=void 0;var o=s;this.result=new n(this._processor,void 0,this._opts),this.result.css=e;var a=this;Object.defineProperty(this.result,"root",{get(){return a.root}});var h=new r(o,void 0,this._opts,e);if(h.isMap()){var u=h.generate(),l=u[0],f=u[1];l&&(this.result.css=l),f&&(this.result.map=f)}else h.clearAnnotation(),this.result.css=h.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(t){return this.async().catch(t)}finally(t){return this.async().then(t,t)}sync(){if(this.error)throw this.error;return this.result}then(t,e){return"from"in this._opts||o("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(t,e)}toString(){return this._css}warnings(){return[]}};e.exports=a,a.default=a}),Gr=dr((t,e)=>{var r=Ar(),i=Wr(),n=Hr(),s=Tr(),o=class{constructor(t){void 0===t&&(t=[]),this.version="8.5.24",this.plugins=this.normalize(t)}normalize(t){var e=[];for(var r of t)if(!0===r.postcss?r=r():r.postcss&&(r=r.postcss),"object"==typeof r&&Array.isArray(r.plugins))e=e.concat(r.plugins);else if("object"==typeof r&&r.postcssPlugin)e.push(r);else{if("function"!=typeof r)throw"object"==typeof r&&(r.parse||r.stringify)?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."):new Error(r+" is not a PostCSS plugin");e.push(r)}return e}process(t,e){return void 0===e&&(e={}),this.plugins.length||e.parser||e.stringifier||e.syntax?new i(this,t,e):new n(this,t,e)}use(t){return this.plugins=this.plugins.concat(this.normalize([t])),this}};e.exports=o,o.default=o,s.registerProcessor(o),r.registerProcessor(o)}),zr=dr((t,e)=>{var r=xr(),i=kr(),n=Mr(),s=yr(),o=Cr(),a=Ar(),h=Nr(),u=Ir(),l=Wr(),f=Or(),c=Sr(),v=Pr(),d=Gr(),p=jr(),m=Tr(),y=Dr(),g=wr(),w=Br();function b(){for(var t=arguments.length,e=new Array(t),r=0;t>r;r++)e[r]=arguments[r];return 1===e.length&&Array.isArray(e[0])&&(e=e[0]),new d(e)}b.plugin=function(t,e){var r,i=!1;function n(){console&&console.warn&&!i&&(i=!0,console.warn(t+": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration"),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(t+": 里面 postcss.plugin 被弃用. 迁移指南:\nhttps://www.w3ctech.com/topic/2226"));var r=e(...arguments);return r.postcssPlugin=t,r.postcssVersion=(new d).version,r}return Object.defineProperty(n,"postcss",{get(){return r||(r=n()),r}}),n.process=function(t,e,r){return b([n(r)]).process(t,e)},n},b.stringify=g,b.parse=v,b.fromJSON=h,b.list=f,b.comment=t=>new i(t),b.atRule=t=>new r(t),b.decl=t=>new o(t),b.rule=t=>new y(t),b.root=t=>new m(t),b.document=t=>new a(t),b.CssSyntaxError=s,b.Declaration=o,b.Container=n,b.Processor=d,b.Document=a,b.Comment=i,b.Warning=w,b.AtRule=r,b.Result=p,b.Input=u,b.Rule=y,b.Root=m,b.Node=c,l.registerPostcss(b),e.exports=b,b.default=b}),Vr=dr((t,e)=>{var r=kr(),i=Fr(),n=Lr();e.exports=class extends i{checkMissedSemicolon(){}comment(t){var e=new r;this.init(e,t[2]);var i=this.input.fromOffset(t[3])||this.input.fromOffset(this.input.css.length-1);e.source.end={column:i.col,line:i.line,offset:t[3]+1};var n=t[1].slice(2);if("*/"===n.slice(-2)&&(n=n.slice(0,-2)),/^\s*$/.test(n))e.text="",e.raws.left=n,e.raws.right="";else{var s=n.match(/^(\s*)([^]*\S)(\s*)$/);e.text=s[2],e.raws.left=s[1],e.raws.right=s[3]}}createTokenizer(){this.tokenizer=n(this.input,{ignoreErrors:!0})}decl(t){t.length>1&&t.some(t=>"word"===t[0])&&super.decl(t)}doubleColon(){}endFile(){for(this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces;this.current.parent;)this.current=this.current.parent,this.current.raws.after="";this.root.source.end=this.getPosition(this.tokenizer.position())}precheckMissedSemicolon(t){var e=this.colon(t);if(!1!==e){var r,i;for(r=e-1;r>=0&&"word"!==t[r][0];r--);if(0!==r&&r>=0){for(i=r-1;i>=0;i--)if("space"!==t[i][0]){i+=1;break}var n=t.slice(r),s=t.slice(i,r);t.splice(i,t.length-i),this.spaces=s.map(t=>t[1]).join(""),this.decl(n)}}}unclosedBracket(){}unexpectedClose(){this.current.raws.after+="}"}unknownWord(t){this.spaces+=t.map(t=>t[1]).join("")}unnamedAtrule(t){t.name=""}}});dr((t,e)=>{var r=zr().Input,i=Vr();e.exports=function(t,e){var n=new i(new r(t,e));return n.parse(),n.root}})(),zr();var $r=function(t){return 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",t}({});function Yr(t){var e=[];for(var r in t){var i=t[r];if("string"==typeof i){var n=Kr(r);e.push(n+": "+i+";")}}return e.join(" ")}var qr=/-([a-z])/g,Zr=/^--[a-zA-Z0-9-]+$/,Jr=t=>Zr.test(t)?t:t.replace(qr,(t,e)=>e?e.toUpperCase():""),Xr=/\B([A-Z])/g,Kr=t=>t.replace(Xr,"-$1").toLowerCase();function Qr(t){return Qr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Qr(t)}function ti(t,e,r){return(e=function(t){var e=function(t){if("object"!=Qr(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Qr(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Qr(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var ei=class t{constructor(){ti(this,"parentElement",null),ti(this,"parentNode",null),ti(this,"ownerDocument",void 0),ti(this,"firstChild",null),ti(this,"lastChild",null),ti(this,"previousSibling",null),ti(this,"nextSibling",null),ti(this,"ELEMENT_NODE",1),ti(this,"TEXT_NODE",3),ti(this,"nodeType",void 0),ti(this,"nodeName",void 0),ti(this,"RRNodeType",void 0)}get childNodes(){for(var t=[],e=this.firstChild;e;)t.push(e),e=e.nextSibling;return t}contains(e){if(!(e instanceof t))return!1;if(e.ownerDocument!==this.ownerDocument)return!1;if(e===this)return!0;for(;e.parentNode;){if(e.parentNode===this)return!0;e=e.parentNode}return!1}appendChild(t){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(t,e){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(t){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}},ri=class t extends ei{constructor(){for(var t=arguments.length,e=new Array(t),r=0;t>r;r++)e[r]=arguments[r];super(e),ti(this,"nodeType",9),ti(this,"nodeName","#document"),ti(this,"compatMode","CSS1Compat"),ti(this,"RRNodeType",$r.Document),ti(this,"textContent",null),this.ownerDocument=this}get documentElement(){return this.childNodes.find(t=>t.RRNodeType===$r.Element&&"HTML"===t.tagName)||null}get body(){var t;return(null===(t=this.documentElement)||void 0===t?void 0:t.childNodes.find(t=>t.RRNodeType===$r.Element&&"BODY"===t.tagName))||null}get head(){var t;return(null===(t=this.documentElement)||void 0===t?void 0:t.childNodes.find(t=>t.RRNodeType===$r.Element&&"HEAD"===t.tagName))||null}get implementation(){return this}get firstElementChild(){return this.documentElement}appendChild(t){var e=t.RRNodeType;if((e===$r.Element||e===$r.DocumentType)&&this.childNodes.some(t=>t.RRNodeType===e))throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': Only one "+(e===$r.Element?"RRElement":"RRDoctype")+" on RRDocument allowed.");var r=fi(this,t);return r.parentElement=null,r}insertBefore(t,e){var r=t.RRNodeType;if((r===$r.Element||r===$r.DocumentType)&&this.childNodes.some(t=>t.RRNodeType===r))throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': Only one "+(r===$r.Element?"RRElement":"RRDoctype")+" on RRDocument allowed.");var i=ci(this,t,e);return i.parentElement=null,i}removeChild(t){return vi(this,t)}open(){this.firstChild=null,this.lastChild=null}close(){}write(t){var e;if('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">'===t?e="-//W3C//DTD XHTML 1.0 Transitional//EN":'<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">'===t&&(e="-//W3C//DTD HTML 4.0 Transitional//EN"),e){var r=this.createDocumentType("html",e,"");this.open(),this.appendChild(r)}}createDocument(e,r,i){return new t}createDocumentType(t,e,r){var i=new ii(t,e,r);return i.ownerDocument=this,i}createElement(t){var e=new ni(t);return e.ownerDocument=this,e}createElementNS(t,e){return this.createElement(e)}createTextNode(t){var e=new ai(t);return e.ownerDocument=this,e}createComment(t){var e=new hi(t);return e.ownerDocument=this,e}createCDATASection(t){var e=new ui(t);return e.ownerDocument=this,e}toString(){return"RRDocument"}},ii=class extends ei{constructor(t,e,r){super(),ti(this,"nodeType",10),ti(this,"RRNodeType",$r.DocumentType),ti(this,"name",void 0),ti(this,"publicId",void 0),ti(this,"systemId",void 0),ti(this,"textContent",null),this.name=t,this.publicId=e,this.systemId=r,this.nodeName=t}toString(){return"RRDocumentType"}},ni=class extends ei{constructor(t){super(),ti(this,"nodeType",1),ti(this,"RRNodeType",$r.Element),ti(this,"tagName",void 0),ti(this,"attributes",{}),ti(this,"shadowRoot",null),ti(this,"scrollLeft",void 0),ti(this,"scrollTop",void 0),this.tagName=t.toUpperCase(),this.nodeName=t.toUpperCase()}get textContent(){var t="";return this.childNodes.forEach(e=>t+=e.textContent),t}set textContent(t){this.firstChild=null,this.lastChild=null,this.appendChild(this.ownerDocument.createTextNode(t))}get classList(){return new li(this.attributes.class,t=>{this.attributes.class=t})}get id(){return this.attributes.id||""}get className(){return this.attributes.class||""}get style(){var t,e,r=this.attributes.style?(t={},e=/:(.+)/,this.attributes.style.replace(/\/\*.*?\*\//g,"").split(/;(?![^(]*\))/g).forEach(function(r){if(r){var i=r.split(e);i.length>1&&(t[Jr(i[0].trim())]=i[1].trim())}}),t):{},i=/\B([A-Z])/g;return r.setProperty=(t,e,n)=>{if(!i.test(t)){var s=Jr(t);e?r[s]=e:delete r[s],"important"===n&&(r[s]+=" !important"),this.attributes.style=Yr(r)}},r.removeProperty=t=>{if(i.test(t))return"";var e=Jr(t),n=r[e]||"";return delete r[e],this.attributes.style=Yr(r),n},r}getAttribute(t){return void 0===this.attributes[t]?null:this.attributes[t]}setAttribute(t,e){this.attributes[t]=e}setAttributeNS(t,e,r){this.setAttribute(e,r)}removeAttribute(t){delete this.attributes[t]}appendChild(t){return fi(this,t)}insertBefore(t,e){return ci(this,t,e)}removeChild(t){return vi(this,t)}attachShadow(t){var e=this.ownerDocument.createElement("SHADOWROOT");return this.shadowRoot=e,e}dispatchEvent(t){return!0}toString(){var t="";for(var e in this.attributes)t+=e+'="'+this.attributes[e]+'" ';return this.tagName+" "+t}},si=class extends ni{constructor(){super(...arguments),ti(this,"currentTime",void 0),ti(this,"volume",void 0),ti(this,"paused",void 0),ti(this,"muted",void 0),ti(this,"playbackRate",void 0),ti(this,"loop",void 0)}attachShadow(t){throw new Error("RRDomException: Failed to execute 'attachShadow' on 'RRElement': This RRElement does not support attachShadow")}play(){this.paused=!1}pause(){this.paused=!0}},oi=class extends ni{constructor(){super(...arguments),ti(this,"tagName","DIALOG"),ti(this,"nodeName","DIALOG")}get isModal(){return"modal"===this.getAttribute("rr_open_mode")}get open(){return null!==this.getAttribute("open")}close(){this.removeAttribute("open"),this.removeAttribute("rr_open_mode")}show(){this.setAttribute("open",""),this.setAttribute("rr_open_mode","non-modal")}showModal(){this.setAttribute("open",""),this.setAttribute("rr_open_mode","modal")}},ai=class extends ei{constructor(t){super(),ti(this,"nodeType",3),ti(this,"nodeName","#text"),ti(this,"RRNodeType",$r.Text),ti(this,"data",void 0),this.data=t}get textContent(){return this.data}set textContent(t){this.data=t}toString(){return"RRText text="+JSON.stringify(this.data)}},hi=class extends ei{constructor(t){super(),ti(this,"nodeType",8),ti(this,"nodeName","#comment"),ti(this,"RRNodeType",$r.Comment),ti(this,"data",void 0),this.data=t}get textContent(){return this.data}set textContent(t){this.data=t}toString(){return"RRComment text="+JSON.stringify(this.data)}},ui=class extends ei{constructor(t){super(),ti(this,"nodeName","#cdata-section"),ti(this,"nodeType",4),ti(this,"RRNodeType",$r.CDATA),ti(this,"data",void 0),this.data=t}get textContent(){return this.data}set textContent(t){this.data=t}toString(){return"RRCDATASection data="+JSON.stringify(this.data)}},li=class{constructor(t,e){var r=this;if(ti(this,"onChange",void 0),ti(this,"classes",[]),ti(this,"add",function(){for(var t=arguments.length,e=new Array(t),i=0;t>i;i++)e[i]=arguments[i];for(var n of e){var s=String(n);0>r.classes.indexOf(s)&&r.classes.push(s)}r.onChange&&r.onChange(r.classes.join(" "))}),ti(this,"remove",function(){for(var t=arguments.length,e=new Array(t),i=0;t>i;i++)e[i]=arguments[i];r.classes=r.classes.filter(t=>-1===e.indexOf(t)),r.onChange&&r.onChange(r.classes.join(" "))}),t){var i=t.trim().split(/\s+/);this.classes.push(...i)}this.onChange=e}};function fi(t,e){return e.parentNode&&e.parentNode.removeChild(e),t.lastChild?(t.lastChild.nextSibling=e,e.previousSibling=t.lastChild):(t.firstChild=e,e.previousSibling=null),t.lastChild=e,e.nextSibling=null,e.parentNode=t,e.parentElement=t,e.ownerDocument=t.ownerDocument,e}function ci(t,e,r){if(!r)return fi(t,e);if(r.parentNode!==t)throw new Error("Failed to execute 'insertBefore' on 'RRNode': The RRNode before which the new node is to be inserted is not a child of this RRNode.");return e===r||(e.parentNode&&e.parentNode.removeChild(e),e.previousSibling=r.previousSibling,r.previousSibling=e,e.nextSibling=r,e.previousSibling?e.previousSibling.nextSibling=e:t.firstChild=e,e.parentElement=t,e.parentNode=t,e.ownerDocument=t.ownerDocument),e}function vi(t,e){if(e.parentNode!==t)throw new Error("Failed to execute 'removeChild' on 'RRNode': The RRNode to be removed is not a child of this RRNode.");return e.previousSibling?e.previousSibling.nextSibling=e.nextSibling:t.firstChild=e.nextSibling,e.nextSibling?e.nextSibling.previousSibling=e.previousSibling:t.lastChild=e.previousSibling,e.previousSibling=null,e.nextSibling=null,e.parentElement=null,e.parentNode=null,e}var di=function(t){return t[t.PLACEHOLDER=0]="PLACEHOLDER",t[t.ELEMENT_NODE=1]="ELEMENT_NODE",t[t.ATTRIBUTE_NODE=2]="ATTRIBUTE_NODE",t[t.TEXT_NODE=3]="TEXT_NODE",t[t.CDATA_SECTION_NODE=4]="CDATA_SECTION_NODE",t[t.ENTITY_REFERENCE_NODE=5]="ENTITY_REFERENCE_NODE",t[t.ENTITY_NODE=6]="ENTITY_NODE",t[t.PROCESSING_INSTRUCTION_NODE=7]="PROCESSING_INSTRUCTION_NODE",t[t.COMMENT_NODE=8]="COMMENT_NODE",t[t.DOCUMENT_NODE=9]="DOCUMENT_NODE",t[t.DOCUMENT_TYPE_NODE=10]="DOCUMENT_TYPE_NODE",t[t.DOCUMENT_FRAGMENT_NODE=11]="DOCUMENT_FRAGMENT_NODE",t}({}),pi={svg:"http://www.w3.org/2000/svg","xlink:href":"http://www.w3.org/1999/xlink",xmlns:"http://www.w3.org/2000/xmlns/"},mi={altglyph:"altGlyph",altglyphdef:"altGlyphDef",altglyphitem:"altGlyphItem",animatecolor:"animateColor",animatemotion:"animateMotion",animatetransform:"animateTransform",clippath:"clipPath",feblend:"feBlend",fecolormatrix:"feColorMatrix",fecomponenttransfer:"feComponentTransfer",fecomposite:"feComposite",feconvolvematrix:"feConvolveMatrix",fediffuselighting:"feDiffuseLighting",fedisplacementmap:"feDisplacementMap",fedistantlight:"feDistantLight",fedropshadow:"feDropShadow",feflood:"feFlood",fefunca:"feFuncA",fefuncb:"feFuncB",fefuncg:"feFuncG",fefuncr:"feFuncR",fegaussianblur:"feGaussianBlur",feimage:"feImage",femerge:"feMerge",femergenode:"feMergeNode",femorphology:"feMorphology",feoffset:"feOffset",fepointlight:"fePointLight",fespecularlighting:"feSpecularLighting",fespotlight:"feSpotLight",fetile:"feTile",feturbulence:"feTurbulence",foreignobject:"foreignObject",glyphref:"glyphRef",lineargradient:"linearGradient",radialgradient:"radialGradient"},yi=null;function gi(t,e,r,i){void 0===i&&(i=e.mirror||e.ownerDocument.mirror),t=function(t,e,r,i){if(r.afterAppend&&!yi&&(yi=new WeakSet,setTimeout(()=>{yi=null},0)),!ki(t,e)){var n,s=Si(e,r.mirror,i);null===(n=t.parentNode)||void 0===n||n.replaceChild(s,t),t=s}switch(e.RRNodeType){case $r.Document:if(!Ci(t,e,r.mirror,i)){var o=i.getMeta(e);o&&(r.mirror.removeNodeFromMap(t),t.close(),t.open(),r.mirror.add(t,o),null==yi||yi.add(t))}break;case $r.Element:var a=t,h=e;switch(h.tagName){case"IFRAME":var u=t.contentDocument;if(!u)break;gi(u,e.contentDocument,r,i)}h.shadowRoot&&(a.shadowRoot||cr(a))&&bi(a.shadowRoot,h.shadowRoot,r,i),function(t,e,r){var i=t.attributes,n=e.attributes;for(var s in n){var o=n[s],a=r.getMeta(e);if((null==a?void 0:a.isSVG)&&pi[s])t.setAttributeNS(pi[s],s,o);else if("CANVAS"===e.tagName&&"rr_dataURL"===s)wi(t,o);else{if("IFRAME"===e.tagName&&"srcdoc"===s)continue;try{t.getAttribute(s)!==o&&t.setAttribute(s,o)}catch(t){console.warn(t)}}}for(var h of Array.from(i)){var u=h.name;u in n||t.removeAttribute(u)}e.scrollLeft&&(t.scrollLeft=e.scrollLeft),e.scrollTop&&(t.scrollTop=e.scrollTop)}(a,h,i)}return t}(t,e,r,i),bi(t,e,r,i),function(t,e,r){switch(e.RRNodeType){case $r.Document:var i=e.scrollData;i&&r.applyScroll(i,!0);break;case $r.Element:var n=t,s=e;switch(s.scrollData&&r.applyScroll(s.scrollData,!0),s.inputData&&r.applyInput(s.inputData),s.tagName){case"AUDIO":case"VIDEO":var o=t,a=s;void 0!==a.paused&&(a.paused?o.pause():o.play()),void 0!==a.muted&&(o.muted=a.muted),void 0!==a.volume&&(o.volume=a.volume),void 0!==a.currentTime&&(o.currentTime=a.currentTime),void 0!==a.playbackRate&&(o.playbackRate=a.playbackRate),void 0!==a.loop&&(o.loop=a.loop);break;case"CANVAS":var h=e;null!==h.rr_dataURL&&wi(n,h.rr_dataURL),h.canvasMutations.forEach(e=>r.applyCanvas(e.event,e.mutation,t));break;case"STYLE":var u=n.sheet;u&&e.rules.forEach(t=>r.applyStyleSheetMutation(t,u));break;case"DIALOG":var l=n,f=s,c=l.open,v=l.matches("dialog:modal"),d=f.open,p=f.isModal,m=v!==p,y=c!==d;if((m||c&&y)&&l.close(),d&&(y||m))try{p?l.showModal():l.show()}catch(t){console.warn(t)}}break;case $r.Text:case $r.Comment:case $r.CDATA:t.textContent!==e.data&&(t.textContent=e.data)}var g;(null==yi?void 0:yi.has(t))&&(yi.delete(t),null===(g=r.afterAppend)||void 0===g||g.call(r,t,r.mirror.getId(t)))}(t,e,r)}function wi(t,e){var r=t.ownerDocument.createElement("img");r.onload=()=>{var e=t.getContext("2d");e&&e.drawImage(r,0,0,r.width,r.height)},r.src=e}function bi(t,e,r,i){var n=Array.from(t.childNodes),s=e.childNodes;if(0!==n.length||0!==s.length){for(var o=0,a=n.length-1,h=0,u=s.length-1,l=n[o],f=n[a],c=s[h],v=s[u],d=void 0,p=void 0;a>=o&&u>=h;)if(void 0===l)l=n[++o];else if(void 0===f)f=n[--a];else if(Ci(l,c,r.mirror,i))l=n[++o],c=s[++h];else if(Ci(f,v,r.mirror,i))f=n[--a],v=s[--u];else if(Ci(l,v,r.mirror,i)){try{t.insertBefore(l,f.nextSibling)}catch(t){console.warn(t)}l=n[++o],v=s[--u]}else if(Ci(f,c,r.mirror,i)){try{t.insertBefore(f,l)}catch(t){console.warn(t)}f=n[--a],c=s[++h]}else{if(!d){d={};for(var m=o;a>=m;m++){var y=n[m];y&&r.mirror.hasNode(y)&&(d[r.mirror.getId(y)]=m)}}var g=n[p=d[i.getId(c)]];if(void 0!==p&&g&&Ci(g,c,r.mirror,i)){try{t.insertBefore(g,l)}catch(t){console.warn(t)}n[p]=void 0}else{var w=Si(c,r.mirror,i);"#document"===t.nodeName&&l&&(w.nodeType===w.DOCUMENT_TYPE_NODE&&l.nodeType===l.DOCUMENT_TYPE_NODE||w.nodeType===w.ELEMENT_NODE&&l.nodeType===l.ELEMENT_NODE)&&(t.removeChild(l),r.mirror.removeNodeFromMap(l),l=n[++o]);try{t.insertBefore(w,l||null)}catch(t){console.warn(t)}}c=s[++h]}if(o>a){var b=s[u+1],S=null;for(b&&(S=r.mirror.getNode(i.getId(b)));u>=h;++h){var k=Si(s[h],r.mirror,i);try{t.insertBefore(k,S)}catch(t){console.warn(t)}}}else if(h>u)for(;a>=o;o++){var C=n[o];if(C&&C.parentNode===t)try{t.removeChild(C),r.mirror.removeNodeFromMap(C)}catch(t){console.warn(t)}}for(var M=t.firstChild,x=e.firstChild;null!==M&&null!==x;)gi(M,x,r,i),M=M.nextSibling,x=x.nextSibling}}function Si(t,e,r){var i=r.getId(t),n=r.getMeta(t),s=null;if(i>-1&&(s=e.getNode(i)),null!==s&&ki(s,t))return s;switch(t.RRNodeType){case $r.Document:s=new Document;break;case $r.DocumentType:s=document.implementation.createDocumentType(t.name,t.publicId,t.systemId);break;case $r.Element:var a=t.tagName.toLowerCase();a=mi[a]||a,s=n&&"isSVG"in n&&(null==n?void 0:n.isSVG)?document.createElementNS(pi.svg,a):document.createElement(t.tagName);break;case $r.Text:s=document.createTextNode(t.data);break;case $r.Comment:s=document.createComment(t.data);break;case $r.CDATA:s=document.createCDATASection(t.data)}n&&e.add(s,o({},n));try{null==yi||yi.add(s)}catch(t){}return s}function ki(t,e){return t.nodeType===e.nodeType&&(t.nodeType!==t.ELEMENT_NODE||t.tagName.toUpperCase()===e.tagName)}function Ci(t,e,r,i){var n=r.getId(t),s=i.getId(e);return-1!==n&&n===s&&ki(t,e)}var Mi=class t extends ri{get unserializedId(){return this.u--}constructor(t){super(),ti(this,"UNSERIALIZED_STARTING_ID",-2),ti(this,"_unserializedId",this.UNSERIALIZED_STARTING_ID),ti(this,"mirror",new Fi),ti(this,"scrollData",null),t&&(this.mirror=t)}createDocument(e,r,i){return new t}createDocumentType(t,e,r){var i=new xi(t,e,r);return i.ownerDocument=this,i}createElement(t){var e,r=t.toUpperCase();switch(r){case"AUDIO":case"VIDEO":e=new Ei(r);break;case"IFRAME":e=new Oi(r,this.mirror);break;case"CANVAS":e=new Ii(r);break;case"STYLE":e=new Ti(r);break;case"DIALOG":e=new Ri(r);break;default:e=new Ai(r)}return e.ownerDocument=this,e}createComment(t){var e=new Ni(t);return e.ownerDocument=this,e}createCDATASection(t){var e=new _i(t);return e.ownerDocument=this,e}createTextNode(t){var e=new Di(t);return e.ownerDocument=this,e}destroyTree(){this.firstChild=null,this.lastChild=null,this.mirror.reset()}open(){super.open(),this.u=this.UNSERIALIZED_STARTING_ID}},xi=ii,Ai=class extends ni{constructor(){super(...arguments),ti(this,"inputData",null),ti(this,"scrollData",null)}},Ei=class extends si{},Ri=class extends oi{},Ii=class extends Ai{constructor(){super(...arguments),ti(this,"rr_dataURL",null),ti(this,"canvasMutations",[])}getContext(){return null}},Ti=class extends Ai{constructor(){super(...arguments),ti(this,"rules",[])}},Oi=class extends Ai{constructor(t,e){super(t),ti(this,"contentDocument",new Mi),this.contentDocument.mirror=e}},Di=ai,Ni=hi,_i=ui;function Li(t,e,r,i){var n,s;switch(t.nodeType){case di.DOCUMENT_NODE:i&&"IFRAME"===i.nodeName?n=i.contentDocument:(n=e).compatMode=t.compatMode;break;case di.DOCUMENT_TYPE_NODE:n=e.createDocumentType(t.name,t.publicId,t.systemId);break;case di.ELEMENT_NODE:var a=t,h=(s=a)instanceof HTMLFormElement?"FORM":s.tagName.toUpperCase(),u=n=e.createElement(h);for(var l of Array.from(a.attributes))u.attributes[l.name]=l.value;a.scrollLeft&&(u.scrollLeft=a.scrollLeft),a.scrollTop&&(u.scrollTop=a.scrollTop);break;case di.TEXT_NODE:n=e.createTextNode(t.textContent||"");break;case di.CDATA_SECTION_NODE:n=e.createCDATASection(t.data);break;case di.COMMENT_NODE:n=e.createComment(t.textContent||"");break;case di.DOCUMENT_FRAGMENT_NODE:var f=i;if(!cr(f))return null;n=f.shadowRoot;break;default:return null}var c=r.getMeta(t);return e instanceof Mi&&(c||(c=Pi(n,e.unserializedId),r.add(t,c)),e.mirror.add(n,o({},c))),n}var Fi=class{constructor(){ti(this,"idNodeMap",new Map),ti(this,"nodeMetaMap",new WeakMap)}getId(t){var e,r;return t&&null!==(e=null===(r=this.getMeta(t))||void 0===r?void 0:r.id)&&void 0!==e?e:-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){var e=this.getId(t);this.idNodeMap.delete(e),t.childNodes&&t.childNodes.forEach(t=>this.removeNodeFromMap(t))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,e){this.idNodeMap.set(e.id,t),this.nodeMetaMap.set(t,e)}replace(t,e){var r=this.getNode(t);if(r){var i=this.nodeMetaMap.get(r);i&&this.nodeMetaMap.set(e,i)}this.idNodeMap.set(t,e)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function Pi(t,e){switch(t.RRNodeType){case $r.Document:return{id:e,type:t.RRNodeType,childNodes:[]};case $r.DocumentType:return{id:e,type:t.RRNodeType,name:t.name,publicId:t.publicId,systemId:t.systemId};case $r.Element:return{id:e,type:t.RRNodeType,tagName:t.tagName.toLowerCase(),attributes:{},childNodes:[]};case $r.Text:case $r.Comment:return{id:e,type:t.RRNodeType,textContent:t.textContent||""};case $r.CDATA:return{id:e,type:t.RRNodeType,textContent:""}}}function Bi(t,e){return-1!==t.indexOf(e)}"Mobile".toLowerCase(),"Tablet".toLowerCase(),new RegExp("Xbox","i"),new RegExp("Nintendo","i"),new RegExp("PlayStation","i"),new RegExp("Windows","i"),Date,Date;var ji={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot"],MutationObserver:[]},Ui={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:["querySelector","querySelectorAll"],MutationObserver:["constructor"]},Wi={};function Hi(t){if(Wi[t])return Wi[t];var e=function(t){var e,r,i=null===(e=globalThis)||void 0===e||null===(e=e.Zone)||void 0===e||null===(r=e.__symbol__)||void 0===r?void 0:r.call(e,t);return i&&globalThis[i]?globalThis[i]:void 0}(t)||globalThis[t],r=e.prototype,i=t in ji?ji[t]:void 0,n=Boolean(i&&i.every(t=>{var e;return Boolean(null===(e=Object.getOwnPropertyDescriptor(r,t))||void 0===e||null===(e=e.get)||void 0===e?void 0:e.toString().includes("[native code]"))})),s=t in Ui?Ui[t]:void 0,o=Boolean(s&&s.every(t=>{var e;return"function"==typeof r[t]&&(null===(e=r[t])||void 0===e?void 0:e.toString().includes("[native code]"))}));if(n&&o)return Wi[t]=e.prototype,e.prototype;var a=document.createElement("iframe");a.style.display="none";var h,u=!1;try{document.body.appendChild(a);var l=a.contentWindow;if(!l)return e.prototype;var f=l[t].prototype;return f?(Bi(h=navigator.userAgent,"AppleWebKit")&&!Bi(h,"Chrome")&&(a.classList.add("rr-block","ph-no-capture"),a.setAttribute("__rrwebUntaintedPrototype",t),u=!0),Wi[t]=f):r}catch(t){return r}finally{!u&&a.parentNode&&document.body.removeChild(a)}}var Gi=Object.create(null);function zi(t,e,r){var i,n=Gi[t],s=n[r];if(s)return s.call(e);var o=Hi(t),a=null===(i=Object.getOwnPropertyDescriptor(o,r))||void 0===i?void 0:i.get;return a?(n[r]=a,a.call(e)):e[r]}Gi.Node=Object.create(null),Gi.ShadowRoot=Object.create(null),Gi.MutationObserver=Object.create(null),Gi.Element=Object.create(null);var Vi,$i={};function Yi(t,e,r){var i=t+"."+String(r);if($i[i])return $i[i].bind(e);var n=Hi(t)[r];return"function"!=typeof n?e[r]:($i[i]=n,n.bind(e))}function qi(){return Hi("MutationObserver").constructor}function Zi(t,e,r){try{if(!(e in t))return()=>{};var i=t[e],n={next:i},s=r(function(){for(var t=arguments.length,e=new Array(t),r=0;t>r;r++)e[r]=arguments[r];return n.next.apply(this,e)});return"function"==typeof s&&(s.prototype=s.prototype||{},Object.defineProperties(s,{__rrweb_original__:{enumerable:!1,value:i},__rrweb_layer__:{enumerable:!1,value:n}})),t[e]=s,()=>{if(t[e]!==s)for(var r=t=>{var e;return"function"==typeof t?null!==(e=t.__rrweb_layer__)&&void 0!==e?e:t.__posthog_layer__:void 0},i=t[e],o=r(i);o;){if(o.next===s)return void(o.next=n.next);o=r(i=o.next)}else t[e]=n.next}}catch(t){return()=>{}}}var Ji={childNodes:t=>zi("Node",t,"childNodes"),parentNode:t=>zi("Node",t,"parentNode"),parentElement:t=>zi("Node",t,"parentElement"),textContent:t=>zi("Node",t,"textContent"),isConnected(t){if(void 0===Vi){var e,r=null===(e=Object.getOwnPropertyDescriptor(Hi("Node"),"isConnected"))||void 0===e?void 0:e.get;Vi=(null==r?void 0:r.toString().includes("[native code]"))?r:null}return null==Vi?void 0:Vi.call(t)},contains:(t,e)=>Yi("Node",t,"contains")(e),getRootNode:t=>Yi("Node",t,"getRootNode")(),host:t=>t&&"host"in t?zi("ShadowRoot",t,"host"):null,styleSheets:t=>t.styleSheets,shadowRoot:t=>t&&"shadowRoot"in t?zi("Element",t,"shadowRoot"):null,querySelector:(t,e)=>Yi("Element",t,"querySelector")(e),querySelectorAll:(t,e)=>Yi("Element",t,"querySelectorAll")(e),mutationObserver:qi,patch:Zi};function Xi(t){return Xi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Xi(t)}function Ki(t,e,r){return(e=function(t){var e=function(t){if("object"!=Xi(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Xi(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Xi(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Qi=h({StyleSheetMirror:()=>In,_mirror:()=>on,callAllSafely:()=>nn,callSafely:()=>rn,closestElementOfNode:()=>vn,getBaseDimension:()=>Mn,getNestedRule:()=>An,getPositionsAndIndex:()=>En,getRootShadowHost:()=>On,getShadowHost:()=>Tn,getWindowHeight:()=>fn,getWindowScroll:()=>ln,getWindowWidth:()=>cn,hasShadowRoot:()=>xn,hookSetter:()=>hn,inDom:()=>Nn,isAncestorRemoved:()=>yn,isBlocked:()=>dn,isIgnored:()=>mn,isSerialized:()=>pn,isSerializedIframe:()=>kn,isSerializedStylesheet:()=>Cn,iterateResolveTree:()=>Sn,legacy_isTouchEvent:()=>gn,nowTimestamp:()=>un,on:()=>tn,polyfill:()=>wn,queueToResolveTrees:()=>bn,removeEventListenerSafely:()=>en,shadowHostInDom:()=>Dn,throttle:()=>an,uniqueTextMutations:()=>Rn});function tn(t,e,r){void 0===r&&(r=document);var i={capture:!0,passive:!0};return r.addEventListener(t,e,i),()=>en(r,t,e,i)}function en(t,e,r,i){rn(()=>{var n=t.removeEventListener;"function"==typeof n&&(void 0!==i?n.call(t,e,r,i):n.call(t,e,r))})}function rn(t){try{t()}catch(t){if(!(t instanceof DOMException&&"SecurityError"===t.name))throw t}}function nn(t){t.forEach(t=>{if("function"==typeof t)try{t()}catch(t){}})}var sn="Please stop import mirror directly. Instead of that,\r\nnow you can use replayer.getMirror() to access the mirror instance of a replayer,\r\nor you can use record.mirror to access the mirror instance during recording.",on={map:{},getId(){return console.error(sn),-1},getNode(){return console.error(sn),null},removeNodeFromMap(){console.error(sn)},has(){return console.error(sn),!1},reset(){console.error(sn)}};function an(t,e,r){void 0===r&&(r={});var i=null,n=0;return function(){for(var s=arguments.length,o=new Array(s),a=0;s>a;a++)o[a]=arguments[a];var h=Date.now();n||!1!==r.leading||(n=h);var u=e-(h-n),l=this;0>=u||u>e?(i&&(clearTimeout(i),i=null),n=h,t.apply(l,o)):i||!1===r.trailing||(i=setTimeout(()=>{n=!1===r.leading?0:Date.now(),i=null,t.apply(l,o)},u))}}function hn(t,e,r,i,n){void 0===n&&(n=window);var s=n.Object.getOwnPropertyDescriptor(t,e);return n.Object.defineProperty(t,e,i?r:{set(t){if(setTimeout(()=>{try{r.set.call(this,t)}catch(t){}},0),s&&s.set){if(s.get)try{s.get.call(this)}catch(t){return}s.set.call(this,t)}}}),()=>hn(t,e,s||{},!0)}"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(on=new Proxy(on,{get(t,e,r){return"map"===e&&console.error(sn),Reflect.get(t,e,r)}}));var un=Date.now;function ln(t){var e,r,i,n,s=t.document;return{left:s.scrollingElement?s.scrollingElement.scrollLeft:void 0!==t.pageXOffset?t.pageXOffset:s.documentElement.scrollLeft||(null==s?void 0:s.body)&&(null===(e=Ji.parentElement(s.body))||void 0===e?void 0:e.scrollLeft)||(null==s||null===(r=s.body)||void 0===r?void 0:r.scrollLeft)||0,top:s.scrollingElement?s.scrollingElement.scrollTop:void 0!==t.pageYOffset?t.pageYOffset:(null==s?void 0:s.documentElement.scrollTop)||(null==s?void 0:s.body)&&(null===(i=Ji.parentElement(s.body))||void 0===i?void 0:i.scrollTop)||(null==s||null===(n=s.body)||void 0===n?void 0:n.scrollTop)||0}}function fn(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function cn(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function vn(t){return t?t.nodeType===t.ELEMENT_NODE?t:Ji.parentElement(t):null}function dn(t,e,r,i){if(!t)return!1;var n=vn(t);if(!n)return!1;try{if("string"==typeof e){if(n.classList.contains(e))return!0;if(i&&null!==n.closest("."+e))return!0}else if(We(n,e,i))return!0}catch(t){}if(r){if(n.matches(r))return!0;if(i&&null!==n.closest(r))return!0}return!1}function pn(t,e){return-1!==e.getId(t)}function mn(t,e,r){return!("TITLE"!==t.tagName||!r.headTitleMutations)||-2===e.getId(t)}function yn(t,e){if(rt(t))return!1;var r=e.getId(t);if(!e.has(r))return!0;var i=Ji.parentNode(t);return(!i||i.nodeType!==t.DOCUMENT_NODE)&&(!i||yn(i,e))}function gn(t){return Boolean(t.changedTouches)}function wn(t){void 0===t&&(t=window),"NodeList"in t&&!t.NodeList.prototype.forEach&&(t.NodeList.prototype.forEach=[].forEach),"DOMTokenList"in t&&!t.DOMTokenList.prototype.forEach&&(t.DOMTokenList.prototype.forEach=[].forEach)}function bn(t){var e={},r=(t,r)=>{var i={value:t,parent:r,children:[]};return e[t.node.id]=i,i},i=[];for(var n of t){var s=n.nextId,o=n.parentId;if(s&&s in e){var a=e[s];if(a.parent){var h=a.parent.children.indexOf(a);a.parent.children.splice(h,0,r(n,a.parent))}else{var u=i.indexOf(a);i.splice(u,0,r(n,null))}}else if(o in e){var l=e[o];l.children.push(r(n,l))}else i.push(r(n,null))}return i}function Sn(t,e){e(t.value);for(var r=t.children.length-1;r>=0;r--)Sn(t.children[r],e)}function kn(t,e){return Boolean("IFRAME"===t.nodeName&&e.getMeta(t))}function Cn(t,e){return Boolean("LINK"===t.nodeName&&t.nodeType===t.ELEMENT_NODE&&t.getAttribute&&"stylesheet"===t.getAttribute("rel")&&e.getMeta(t))}function Mn(t,e){var r,i=null===(r=t.ownerDocument)||void 0===r||null===(r=r.defaultView)||void 0===r?void 0:r.frameElement;if(!i||i===e)return{x:0,y:0,relativeScale:1,absoluteScale:1};var n=i.getBoundingClientRect(),s=Mn(i,e),o=n.height/i.clientHeight;return{x:n.x*s.relativeScale+s.x,y:n.y*s.relativeScale+s.y,relativeScale:o,absoluteScale:s.absoluteScale*o}}function xn(t){return!!t&&(t instanceof ei&&"shadowRoot"in t?Boolean(t.shadowRoot):Boolean(Ji.shadowRoot(t)))}function An(t,e){var r=null==t?void 0:t[e[0]];return r?1===e.length?r:An(r.cssRules,e.slice(1)):null}function En(t){var e=[...t];return{positions:e,index:e.pop()}}function Rn(t){for(var e=new Set,r=[],i=t.length;i--;){var n=t[i];e.has(n.id)||(r.push(n),e.add(n.id))}return r}/[1-9][0-9]{12}/.test(Date.now().toString())||(un=()=>(new Date).getTime());var In=class{constructor(){Ki(this,"id",1),Ki(this,"styleIDMap",new WeakMap),Ki(this,"idStyleMap",new Map)}getId(t){var e;return null!==(e=this.styleIDMap.get(t))&&void 0!==e?e:-1}has(t){return this.styleIDMap.has(t)}add(t,e){return this.has(t)?this.getId(t):(r=void 0===e?this.id++:e,this.styleIDMap.set(t,r),this.idStyleMap.set(r,t),r);var r}getStyle(t){return this.idStyleMap.get(t)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}};function Tn(t){var e,r=null;return"getRootNode"in t&&(null===(e=Ji.getRootNode(t))||void 0===e?void 0:e.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&Ji.host(Ji.getRootNode(t))&&(r=Ji.host(Ji.getRootNode(t))),r}function On(t){for(var e,r=t;e=Tn(r);)r=e;return r}function Dn(t){var e=t.ownerDocument;if(!e)return!1;var r=On(t);return Ji.contains(e,r)}function Nn(t){var e=t.ownerDocument;if(!e)return!1;if(Ji.contains(e,t))return!0;var r=Ji.isConnected(t);return"boolean"==typeof r?r:Dn(t)}var _n=function(t){return 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}({}),Ln="rrweb/fullscreen",Fn=function(t){return 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[t.CustomElement=16]="CustomElement",t}({}),Pn=function(t){return 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}({}),Bn=function(t){return t[t.Mouse=0]="Mouse",t[t.Pen=1]="Pen",t[t.Touch=2]="Touch",t}({}),jn=function(t){return t[t["2D"]=0]="2D",t[t.WebGL=1]="WebGL",t[t.WebGL2=2]="WebGL2",t}({}),Un=function(t){return t[t.Play=0]="Play",t[t.Pause=1]="Pause",t[t.Seeked=2]="Seeked",t[t.VolumeChange=3]="VolumeChange",t[t.RateChange=4]="RateChange",t}({}),Wn=function(t){return t.Start="start",t.Pause="pause",t.Resume="resume",t.Resize="resize",t.Finish="finish",t.FullsnapshotRebuilded="fullsnapshot-rebuilded",t.LoadStylesheetStart="load-stylesheet-start",t.LoadStylesheetEnd="load-stylesheet-end",t.SkipStart="skip-start",t.SkipEnd="skip-end",t.MouseInteraction="mouse-interaction",t.EventCast="event-cast",t.CustomEvent="custom-event",t.Flush="flush",t.StateChange="state-change",t.PlayBack="play-back",t.Destroy="destroy",t}({}),Hn=function(t){return 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",t}({});function Gn(t){return"__ln"in t}var zn,Vn=class{constructor(){Ki(this,"length",0),Ki(this,"head",null),Ki(this,"tail",null)}get(t){if(t>=this.length)throw new Error("Position outside of list range");for(var e=this.head,r=0;t>r;r++)e=(null==e?void 0:e.next)||null;return e}addNode(t){var e={value:t,previous:null,next:null};if(t.__ln=e,t.previousSibling&&Gn(t.previousSibling)){var r=t.previousSibling.__ln.next;e.next=r,e.previous=t.previousSibling.__ln,t.previousSibling.__ln.next=e,r&&(r.previous=e)}else if(t.nextSibling&&Gn(t.nextSibling)&&t.nextSibling.__ln.previous){var i=t.nextSibling.__ln.previous;e.previous=i,e.next=t.nextSibling.__ln,t.nextSibling.__ln.previous=e,i&&(i.next=e)}else this.head&&(this.head.previous=e),e.next=this.head,this.head=e;null===e.next&&(this.tail=e),this.length++}removeNode(t){var e=t.__ln;this.head&&(e.previous?(e.previous.next=e.next,e.next?e.next.previous=e.previous:this.tail=e.previous):(this.head=e.next,this.head?this.head.previous=null:this.tail=null),t.__ln&&delete t.__ln,this.length--)}},$n=(t,e)=>t+"@"+e,Yn=class{constructor(){Ki(this,"frozen",!1),Ki(this,"locked",!1),Ki(this,"texts",[]),Ki(this,"attributes",[]),Ki(this,"attributeMap",new WeakMap),Ki(this,"generatedAttributes",new WeakMap),Ki(this,"removes",[]),Ki(this,"mapRemoves",new Set),Ki(this,"movedMap",{}),Ki(this,"addedSet",new Set),Ki(this,"movedSet",new Set),Ki(this,"droppedSet",new Set),Ki(this,"removesSubTreeCache",new Set),Ki(this,"mutationCb",void 0),Ki(this,"blockClass",void 0),Ki(this,"blockSelector",void 0),Ki(this,"maskTextClass",void 0),Ki(this,"maskTextSelector",void 0),Ki(this,"inlineStylesheet",void 0),Ki(this,"maskInputOptions",void 0),Ki(this,"maskTextFn",void 0),Ki(this,"maskInputFn",void 0),Ki(this,"maskAllElementAttributes",void 0),Ki(this,"maskAttributeFn",void 0),Ki(this,"keepIframeSrcFn",void 0),Ki(this,"recordCanvas",void 0),Ki(this,"canvasMaskingConfigured",void 0),Ki(this,"inlineImages",void 0),Ki(this,"slimDOMOptions",void 0),Ki(this,"dataURLOptions",void 0),Ki(this,"doc",void 0),Ki(this,"mirror",void 0),Ki(this,"iframeManager",void 0),Ki(this,"stylesheetManager",void 0),Ki(this,"shadowDomManager",void 0),Ki(this,"canvasManager",void 0),Ki(this,"processedNodeManager",void 0),Ki(this,"unattachedDoc",void 0),Ki(this,"canvasManagerReleased",!1),Ki(this,"processMutations",t=>{t.forEach(this.processMutation),this.emit()}),Ki(this,"emit",()=>{if(!this.frozen&&!this.locked){var t,e,r=S(),i=x();try{this.processBufferedMutations()}finally{t=S()-r,e=i,R>0||E(t,null!=e?e:k)||t>P.slowestBatchMs&&(P.slowestBatchMs=t)}}}),Ki(this,"processBufferedMutations",()=>{var t,e=[],r=new Set,i=new Vn,n=t=>{for(var e=t,r=-2;-2===r;)r=(e=e&&e.nextSibling)&&this.mirror.getId(e);return r},s=s=>{var o=Ji.parentNode(s);if(o&&Nn(s)&&"TEXTAREA"!==o.tagName&&!this.isBlockedAtEmission(o)){var a=rt(o)?this.mirror.getId(Tn(s)):this.mirror.getId(o),h=n(s);if(-1===a||-1===h)return i.addNode(s);null!=t||(t={doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskTextClass:this.maskTextClass,maskTextSelector:this.maskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,maskAllElementAttributes:this.maskAllElementAttributes,maskAttributeFn:this.maskAttributeFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,canvasMaskingConfigured:this.canvasMaskingConfigured,inlineImages:this.inlineImages,onSerialize:t=>{kn(t,this.mirror)&&this.iframeManager.addIframe(t),Cn(t,this.mirror)&&this.stylesheetManager.trackLinkElement(t),xn(t)&&!dn(t,this.blockClass,this.blockSelector,!0)&&this.shadowDomManager.addShadowRoot(Ji.shadowRoot(t),this.doc)},onIframeLoad:(t,e)=>{this.iframeManager.attachIframe(t,e),this.shadowDomManager.observeAttachShadow(t)},onIframeListenerRegistered:(t,e)=>{this.iframeManager.registerLoadListenerDisposer(t,e)},onStylesheetLoad:(t,e)=>{this.stylesheetManager.attachLinkElement(t,e)}});var u=Xe(s,t);u&&(e.push({parentId:a,nextId:h,node:u}),r.add(u.id))}};for(var o of this.mapRemoves)this.mapRemoves.delete(o),this.mirror.removeNodeFromMap(o);for(var a of this.movedSet)Zn(this.removesSubTreeCache,a)&&!this.movedSet.has(Ji.parentNode(a))||s(a);for(var h of this.addedSet)Jn(this.droppedSet,h)||Zn(this.removesSubTreeCache,h)?Jn(this.movedSet,h)?s(h):this.droppedSet.add(h):s(h);for(var u=null;i.length;){var l=null;if(u){var f=this.mirror.getId(Ji.parentNode(u.value)),c=n(u.value);-1!==f&&-1!==c&&(l=u)}if(!l)for(var v=i.tail;v;){var d=v;if(v=v.previous,d){var p=this.mirror.getId(Ji.parentNode(d.value));if(-1===n(d.value))continue;if(-1!==p){l=d;break}var m=Ji.parentNode(d.value);if(m&&m.nodeType===Node.DOCUMENT_FRAGMENT_NODE){var y=Ji.host(m);if(-1!==this.mirror.getId(y)){l=d;break}}}}if(!l){for(;i.head;)i.removeNode(i.head.value);break}u=l.previous,i.removeNode(l.value),s(l.value)}var g={texts:this.texts.filter(t=>!this.isBlockedAtEmission(t.node)).map(t=>{var e=t.node,r=Ji.parentNode(e);return r&&"TEXTAREA"===r.tagName&&this.genTextAreaValueMutation(r),{id:this.mirror.getId(e),value:t.value}}).filter(t=>!r.has(t.id)).filter(t=>this.mirror.has(t.id)),attributes:this.attributes.filter(t=>!this.isBlockedAtEmission(t.node)).map(t=>{var e=t.attributes;if(!this.maskAllElementAttributes&&!this.maskAttributeFn&&"string"==typeof e.style){var r=JSON.stringify(t.styleDiff),i=JSON.stringify(t._unchangedStyles);e.style.length>r.length&&(r+i).split("var(").length===e.style.split("var(").length&&(e.style=t.styleDiff)}if(this.maskAllElementAttributes||this.maskAttributeFn)for(var n of Object.entries(e)){var s,o=n[0],a=n[1];"string"!=typeof a&&null!==a||(e[o]=St({element:t.node,name:o,value:a,maskAllElementAttributes:this.maskAllElementAttributes,maskAttributeFn:this.maskAttributeFn,isGenerated:null===(s=this.generatedAttributes.get(t.node))||void 0===s?void 0:s.has(o)}))}return{id:this.mirror.getId(t.node),attributes:e}}).filter(t=>!r.has(t.id)).filter(t=>this.mirror.has(t.id)),removes:this.removes,adds:e};this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.generatedAttributes=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.removesSubTreeCache=new Set,this.movedMap={},(g.texts.length||g.attributes.length||g.removes.length||g.adds.length)&&this.mutationCb(g)}),Ki(this,"bufferBelongsToIframe",t=>this.doc===t.contentDocument),Ki(this,"genTextAreaValueMutation",t=>{var e=this.attributeMap.get(t);e||(this.attributes.push(e={node:t,attributes:{},styleDiff:{},_unchangedStyles:{}}),this.attributeMap.set(t,e));var r=Array.from(Ji.childNodes(t),t=>Ji.textContent(t)||"").join("");e.attributes.value=gt({element:t,maskInputOptions:this.maskInputOptions,tagName:t.tagName,type:Ct(t),value:r,maskInputFn:this.maskInputFn})}),Ki(this,"processMutation",t=>{if(!mn(t.target,this.mirror,this.slimDOMOptions))switch(t.type){case"characterData":var e=Ji.textContent(t.target);dn(t.target,this.blockClass,this.blockSelector,!1)||e===t.oldValue||this.texts.push({value:He(t.target,this.maskTextClass,this.maskTextSelector,!0)&&e?this.maskTextFn?this.maskTextFn(e,vn(t.target)):e.replace(/[\S]/g,"*"):e,node:t.target});break;case"attributes":var r,i=t.target,n=t.attributeName,s=null!==(r=t.attributeNamespace)&&void 0!==r?r:null,o=function(t,e,r){if(!r)return e;var i=t.getAttributeNodeNS(r,e);if(i)return i.name;if("http://www.w3.org/1999/xlink"===r)return"xlink:"+e;if("http://www.w3.org/XML/1998/namespace"===r)return"xml:"+e;if("http://www.w3.org/2000/xmlns/"===r)return"xmlns"===e?e:"xmlns:"+e;var n=t.lookupPrefix(r);return n?n+":"+e:e}(i,n,s),a=s?i.getAttributeNS(s,n):t.target.getAttribute(n);if("value"===o){var h=i,u=Ct(h);a=gt({element:h,maskInputOptions:this.maskInputOptions,tagName:i.tagName,type:u,value:a,maskInputFn:this.maskInputFn})}if(dn(t.target,this.blockClass,this.blockSelector,!1)||a===t.oldValue)return;var l=this.attributeMap.get(t.target),f="IFRAME"===i.tagName&&"src"===o;if(f&&!this.keepIframeSrcFn(a)&&i.contentDocument)return;if(l||(this.attributes.push(l={node:t.target,attributes:{},styleDiff:{},_unchangedStyles:{}}),this.attributeMap.set(t.target,l)),"type"===o&&"INPUT"===i.tagName&&"password"===(t.oldValue||"").toLowerCase()&&i.setAttribute("data-rr-is-password","true"),!Ue(i.tagName,o)){var c,v=je(this.doc,wt(i.tagName),wt(o),a,i,this.dataURLOptions);if(f&&!this.keepIframeSrcFn(a)&&(o="rr_src"),l.attributes[o]=v,null===(c=this.generatedAttributes.get(t.target))||void 0===c||c.delete(o),"style"===o){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(t){this.unattachedDoc=this.doc}var d=this.unattachedDoc.createElement("span"),p=i.style;for(var m of(t.oldValue&&(d.style.cssText=t.oldValue),Array.from(p))){var y=p.getPropertyValue(m),g=p.getPropertyPriority(m);y!==d.style.getPropertyValue(m)||g!==d.style.getPropertyPriority(m)?l.styleDiff[m]=""===g?y:[y,g]:l._unchangedStyles[m]=[y,g]}for(var w of Array.from(d.style))""===p.getPropertyValue(w)&&(l.styleDiff[w]=!1)}else if("open"===o&&"DIALOG"===i.tagName){l.attributes.rr_open_mode=i.matches("dialog:modal")?"modal":"non-modal";var b=this.generatedAttributes.get(t.target);b||this.generatedAttributes.set(t.target,b=new Set),b.add("rr_open_mode")}}break;case"childList":if(dn(t.target,this.blockClass,this.blockSelector,!0))return;if("TEXTAREA"===t.target.tagName)return void this.genTextAreaValueMutation(t.target);t.addedNodes.forEach(e=>this.genAdds(e,t.target)),t.removedNodes.forEach(e=>{var r=this.mirror.getId(e),i=rt(t.target)?this.mirror.getId(Ji.host(t.target)):this.mirror.getId(t.target);dn(t.target,this.blockClass,this.blockSelector,!1)||mn(e,this.mirror,this.slimDOMOptions)||!pn(e,this.mirror)||(this.addedSet.has(e)?(qn(this.addedSet,e),this.droppedSet.add(e)):this.addedSet.has(t.target)&&-1===r||yn(t.target,this.mirror)||(this.movedSet.has(e)&&this.movedMap[$n(r,i)]?qn(this.movedSet,e):(this.removes.push({parentId:i,id:r,isShadow:!(!rt(t.target)||!nt(t.target))||void 0}),function(t,e){for(var r=[t];r.length;){var i=r.pop();e.has(i)||(e.add(i),Ji.childNodes(i).forEach(t=>r.push(t)))}}(e,this.removesSubTreeCache))),this.mapRemoves.add(e))})}}),Ki(this,"genAdds",(t,e)=>{if(!this.processedNodeManager.inOtherBuffer(t,this)){if(this.addedSet.has(t))return this.addedSet.delete(t),void this.addedSet.add(t);if(!this.movedSet.has(t)){if(this.mirror.hasNode(t)){if(mn(t,this.mirror,this.slimDOMOptions))return;this.movedSet.add(t);var r=null;e&&this.mirror.hasNode(e)&&(r=this.mirror.getId(e)),r&&-1!==r&&(this.movedMap[$n(this.mirror.getId(t),r)]=!0)}else this.addedSet.add(t),this.droppedSet.delete(t);if(!dn(t,this.blockClass,this.blockSelector,!1)){if(t.nodeType===t.TEXT_NODE)return;for(var i=Ji.childNodes(t),n=0,s=i.length;s>n;n++){var o=i[n];o&&this.genAdds(o)}if(xn(t))for(var a=Ji.childNodes(Ji.shadowRoot(t)),h=0,u=a.length;u>h;h++){var l=a[h];l&&(this.processedNodeManager.add(l,this),this.genAdds(l,t))}}}}})}init(t){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","maskAllElementAttributes","maskAttributeFn","keepIframeSrcFn","recordCanvas","canvasMaskingConfigured","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(e=>{this[e]=t[e]}),this.canvasManager.acquire()}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.releaseCanvasManager()}releaseCanvasManager(){this.canvasManagerReleased||(this.canvasManagerReleased=!0,this.canvasManager.reset())}bufferDoc(){return this.doc}destroy(){for(var t of this.mapRemoves)this.mapRemoves.delete(t),this.mirror.removeNodeFromMap(t)}isBlockedAtEmission(t){for(var e=this.blockClass,r=e&&"string"!=typeof e&&(e.global||e.sticky)?new RegExp(e):null;t;){if(r&&(r.lastIndex=0),dn(t,r||e,this.blockSelector,!0))return!0;var i="getRootNode"in t?Ji.getRootNode(t):null;t=(null==i?void 0:i.nodeType)===Node.DOCUMENT_FRAGMENT_NODE?Ji.host(i):null}return!1}};function qn(t,e){for(var r=[e];r.length;){var i=r.pop();if(t.delete(i),i.nodeType!==i.TEXT_NODE)for(var n=Ji.childNodes(i),s=0,o=n.length;o>s;s++){var a=n[s];a&&r.push(a)}}}function Zn(t,e,r){return 0!==t.size&&function(t,e){var r=Ji.parentNode(e);return!!r&&t.has(r)}(t,e)}function Jn(t,e){if(0===t.size)return!1;for(var r=Ji.parentNode(e);r;){if(t.has(r))return!0;r=Ji.parentNode(r)}return!1}var Xn=function(t,e){return void 0===e&&(e="rrweb"),zn?function(){try{return t(...arguments)}catch(t){if(zn&&!0===zn(t,e))return;throw t}}:t},Kn=[];function Qn(t){try{if("composedPath"in t){var e=t.composedPath();if(e.length)return e[0]}else if("path"in t&&t.path.length)return t.path[0]}catch(t){}return t&&t.target}function ts(t,e){var r,i=new Yn;i.init(t);try{r=new(qi())(Xn(i.processMutations.bind(i)));var n={attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0};return t.attributeFilter&&t.attributeFilter.length>0&&(n.attributeFilter=t.attributeFilter),r.observe(e,n),Kn.push(i),{observer:r,buffer:i}}catch(t){try{null==r||r.disconnect(),i.destroy(),i.reset()}catch(t){}throw t}}function es(t){var e=t.scrollCb,r=t.doc,i=t.mirror,n=t.blockClass,s=t.blockSelector,o=t.sampling,a=new Map,h=t=>{var o=Qn(t);if(o&&!dn(o,n,s,!0)){var h,u,l=i.getId(o);if(o===r&&r.defaultView){var f=ln(r.defaultView);h=f.left,u=f.top}else h=o.scrollLeft,u=o.scrollTop;var c=h+","+u;a.get(l)!==c&&(a.set(l,c),e({id:l,x:h,y:u}))}},u=[tn("scroll",Xn(an(Xn(t=>h(t)),o.scroll||100)),r)];return"onscrollend"in r&&u.push(tn("scrollend",Xn(h),r)),()=>u.forEach(t=>t())}function rs(t,e){for(var r=Kn.length-1;r>=0;r--){var i=Kn[r];if(i){var n=i.bufferBelongsToIframe(t);!n&&e&&e.has(i.bufferDoc())&&(n=!0),n&&(i.reset(),Kn.splice(r,1))}}}var is=["INPUT","TEXTAREA","SELECT"],ns=new WeakMap;function ss(t){return function t(e,r){if(us("CSSGroupingRule")&&e.parentRule instanceof CSSGroupingRule||us("CSSMediaRule")&&e.parentRule instanceof CSSMediaRule||us("CSSSupportsRule")&&e.parentRule instanceof CSSSupportsRule||us("CSSConditionRule")&&e.parentRule instanceof CSSConditionRule){var i=Array.from(e.parentRule.cssRules).indexOf(e);return r.unshift(i),t(e.parentRule,r)}if(e.parentStyleSheet){var n=Array.from(e.parentStyleSheet.cssRules).indexOf(e);r.unshift(n)}return r}(t,[])}function os(t,e,r){var i,n;return t?(t.ownerNode?i=e.getId(t.ownerNode):n=r.getId(t),{styleId:n,id:i}):{}}function as(t,e){var r,i,n,s=t.stylesheetManager;n=t.mirror.getId("#document"===e.nodeName?e:Ji.host(e));var o="#document"===e.nodeName?null===(r=e.defaultView)||void 0===r?void 0:r.Document:null===(i=e.ownerDocument)||void 0===i||null===(i=i.defaultView)||void 0===i?void 0:i.ShadowRoot,a=(null==o?void 0:o.prototype)?Object.getOwnPropertyDescriptor(null==o?void 0:o.prototype,"adoptedStyleSheets"):void 0;return null!==n&&-1!==n&&o&&a?(Object.defineProperty(e,"adoptedStyleSheets",{configurable:a.configurable,enumerable:a.enumerable,get(){var t;return null===(t=a.get)||void 0===t?void 0:t.call(this)},set(t){var e;try{var r;e=null===(r=a.set)||void 0===r?void 0:r.call(this,t)}catch(t){if(t&&"object"==typeof t&&"NotAllowedError"===t.name)return;throw t}if(null!==n&&-1!==n)try{s.adoptStyleSheets(t,n)}catch(t){}return e}}),Xn(()=>{Object.defineProperty(e,"adoptedStyleSheets",{configurable:a.configurable,enumerable:a.enumerable,get:a.get,set:a.set})})):()=>{}}function hs(t,e){void 0===e&&(e={});var r,i,n=t.doc.defaultView;if(!n)return()=>{};!function(t,e){var r=t.mutationCb,i=t.mousemoveCb,n=t.mouseInteractionCb,s=t.scrollCb,o=t.viewportResizeCb,a=t.inputCb,h=t.mediaInteractionCb,u=t.styleSheetRuleCb,l=t.styleDeclarationCb,f=t.canvasMutationCb,c=t.fontCb,v=t.selectionCb,d=t.customElementCb;t.mutationCb=function(){e.mutation&&e.mutation(...arguments),r(...arguments)},t.mousemoveCb=function(){e.mousemove&&e.mousemove(...arguments),i(...arguments)},t.mouseInteractionCb=function(){e.mouseInteraction&&e.mouseInteraction(...arguments),n(...arguments)},t.scrollCb=function(){e.scroll&&e.scroll(...arguments),s(...arguments)},t.viewportResizeCb=function(){e.viewportResize&&e.viewportResize(...arguments),o(...arguments)},t.inputCb=function(){e.input&&e.input(...arguments),a(...arguments)},t.mediaInteractionCb=function(){e.mediaInteaction&&e.mediaInteaction(...arguments),h(...arguments)},t.styleSheetRuleCb=function(){e.styleSheetRule&&e.styleSheetRule(...arguments),u(...arguments)},t.styleDeclarationCb=function(){e.styleDeclaration&&e.styleDeclaration(...arguments),l(...arguments)},t.canvasMutationCb=function(){e.canvasMutation&&e.canvasMutation(...arguments),f(...arguments)},t.fontCb=function(){e.font&&e.font(...arguments),c(...arguments)},t.selectionCb=function(){e.selection&&e.selection(...arguments),v(...arguments)},t.customElementCb=function(){e.customElement&&e.customElement(...arguments),d(...arguments)}}(t,e);var s,a,h,u,l=[],f=Xn(()=>{try{if(i)try{i.destroy(),i.reset()}finally{var e=Kn.indexOf(i);-1!==e&&Kn.splice(e,1)}t.shadowDomManager.resetForDoc(t.doc),null==r||r.disconnect()}finally{nn(l)}});try{if(t.recordDOM){var c=ts(t,t.doc);r=c.observer,i=c.buffer}if(l.push(function(t){var e=t.mousemoveCb,r=t.sampling,i=t.doc,n=t.mirror;if(!1===r.mousemove)return()=>{};var s,o="number"==typeof r.mousemove?r.mousemove:50,a="number"==typeof r.mousemoveCallback?r.mousemoveCallback:500,h=[],u=an(Xn(t=>{var r=Date.now()-s;e(h.map(t=>(t.timeOffset-=r,t)),t),h=[],s=null}),a),l=Xn(an(Xn(t=>{var e=Qn(t),r=gn(t)?t.changedTouches[0]:t,i=r.clientX,o=r.clientY;s||(s=un()),h.push({x:i,y:o,id:n.getId(e),timeOffset:un()-s}),u("undefined"!=typeof DragEvent&&t instanceof DragEvent?Fn.Drag:t instanceof MouseEvent?Fn.MouseMove:Fn.TouchMove)}),o,{trailing:!1})),f=[tn("mousemove",l,i),tn("touchmove",l,i),tn("drag",l,i)];return Xn(()=>{f.forEach(t=>t())})}(t)),l.push(function(t){var e=t.mouseInteractionCb,r=t.doc,i=t.mirror,n=t.blockClass,s=t.blockSelector,a=t.sampling;if(!1===a.mouseInteraction)return()=>{};var h=!0===a.mouseInteraction||void 0===a.mouseInteraction?{}:a.mouseInteraction,u=[],l=null;return Object.keys(Pn).filter(t=>Number.isNaN(Number(t))&&!t.endsWith("_Departed")&&!1!==h[t]).forEach(t=>{var a=wt(t),h=(t=>r=>{var a=Qn(r);if(!dn(a,n,s,!0)){var h=null,u=t;if("pointerType"in r){switch(r.pointerType){case"mouse":h=Bn.Mouse;break;case"touch":h=Bn.Touch;break;case"pen":h=Bn.Pen}h===Bn.Touch&&(Pn[t]===Pn.MouseDown?u="TouchStart":Pn[t]===Pn.MouseUp&&(u="TouchEnd"))}else gn(r)&&(h=Bn.Touch);null!==h?(l=h,(u.startsWith("Touch")&&h===Bn.Touch||u.startsWith("Mouse")&&h===Bn.Mouse)&&(h=null)):Pn[t]===Pn.Click&&(h=l,l=null);var f=gn(r)?r.changedTouches[0]:r;if(f){var c=i.getId(a),v=f.clientX,d=f.clientY;Xn(e)(o({type:Pn[u],id:c,x:v,y:d},null!==h&&{pointerType:h}))}}})(t);if(window.PointerEvent)switch(Pn[t]){case Pn.MouseDown:case Pn.MouseUp:a=a.replace("mouse","pointer");break;case Pn.TouchStart:case Pn.TouchEnd:return}u.push(tn(a,h,r))}),Xn(()=>{u.forEach(t=>t())})}(t)),l.push(es(t)),l.push((s=t.viewportResizeCb,a=n,h=-1,u=-1,tn("resize",Xn(an(Xn(()=>{var t=fn(),e=cn();h===t&&u===e||(s({width:Number(e),height:Number(t)}),h=t,u=e)}),200)),a))),l.push(function(t){var e=t.inputCb,r=t.doc,i=t.mirror,n=t.blockClass,s=t.blockSelector,a=t.ignoreClass,h=t.ignoreSelector,u=t.maskInputOptions,l=t.maskInputFn,f=t.userTriggeredOnInput;function c(t){var e=Qn(t),i=t.isTrusted,o=r.defaultView;if(!e||!o||e instanceof o.HTMLElement){var c=e&&e.tagName;if(e&&"OPTION"===c&&(e=Ji.parentElement(e)),e&&c&&is.indexOf(c)>=0&&!dn(e,n,s,!0)&&!(e.classList.contains(a)||h&&e.matches(h))){var d=e.value,p=!1,m=Ct(e)||"";"radio"===m||"checkbox"===m?p=e.checked:(u[c.toLowerCase()]||u[m])&&(d=gt({element:e,maskInputOptions:u,tagName:c,type:m,value:d,maskInputFn:l})),v(e,f?{text:d,isChecked:p,userTriggered:i}:{text:d,isChecked:p});var y=e.name;"radio"===m&&y&&p&&r.querySelectorAll('input[type="radio"][name="'+y+'"]').forEach(t=>{if(t!==e){var r=t.value;v(t,f?{text:r,isChecked:!p,userTriggered:!1}:{text:r,isChecked:!p})}})}}}function v(t,r){var n=ns.get(t);if(!n||n.text!==r.text||n.isChecked!==r.isChecked){ns.set(t,r);var s=i.getId(t);Xn(e)(o({},r,{id:s}))}}var d=("last"===t.sampling.input?["change"]:["input","change"]).map(t=>tn(t,Xn(c),r)),p=r.defaultView;if(!p)return()=>{d.forEach(t=>t())};var m=p.Object.getOwnPropertyDescriptor(p.HTMLInputElement.prototype,"value");return m&&m.set&&d.push(...[[p.HTMLInputElement.prototype,"value"],[p.HTMLInputElement.prototype,"checked"],[p.HTMLSelectElement.prototype,"value"],[p.HTMLTextAreaElement.prototype,"value"],[p.HTMLSelectElement.prototype,"selectedIndex"],[p.HTMLOptionElement.prototype,"selected"]].map(t=>hn(t[0],t[1],{set(){Xn(c)({target:this,isTrusted:!1})}},!1,p))),Xn(()=>{nn(d)})}(t)),l.push(function(t){var e=t.mediaInteractionCb,r=t.blockClass,i=t.blockSelector,n=t.mirror,s=t.sampling,o=t.doc,a=Xn(t=>an(Xn(s=>{var o=Qn(s);if(o&&!dn(o,r,i,!0)){var a=o.currentTime,h=o.volume,u=o.muted,l=o.playbackRate,f=o.loop;e({type:t,id:n.getId(o),currentTime:a,volume:h,muted:u,playbackRate:l,loop:f})}}),s.media||500)),h=[tn("play",a(Un.Play),o),tn("pause",a(Un.Pause),o),tn("seeked",a(Un.Seeked),o),tn("volumechange",a(Un.VolumeChange),o),tn("ratechange",a(Un.RateChange),o)];return Xn(()=>{h.forEach(t=>t())})}(t)),t.recordDOM){var v=function(t){var e=new Map,r=new Set,i=!0,n=t=>{if(i)try{t()}catch(t){}},s=t=>{var r,i=e.get(t);if(i){for(;null===(r=i[0])||void 0===r?void 0:r.ready;){var s=i.shift();(null==s?void 0:s.emit)&&n(s.emit)}0===i.length&&e.delete(t)}};return{queueMutation(t,r){if(t){var i=e.get(t);i?(i.push({emit:r,ready:!0}),s(t)):n(r)}else n(r)},queuePendingMutation(o,a,h){if(!i)return()=>{};var u=e.get(o);u||e.set(o,u=[]);var l={emit:a,ready:!1};u.push(l);var f,c=!1,v=!1,d=()=>{c||v||(c=!0,void 0!==f&&r.delete(f),l.ready=!0,l.emit=void 0,s(o))};try{f=t.setTimeout(d,5e3),c||v?t.clearTimeout(f):r.add(f)}catch(t){d()}return e=>{!v&&i&&(v=!0,void 0!==f&&(t.clearTimeout(f),r.delete(f)),c?e&&n(h):(l.ready=!0,e||(l.emit=void 0),s(o)))}},reset(){i=!1,r.forEach(e=>t.clearTimeout(e)),r.clear(),e.clear()}}}(n);l.push(v.reset),l.push(function(t,e){var r=t.styleSheetRuleCb,i=t.mirror,n=t.stylesheetManager,s=e.win,o=e.mutationQueue;if(!s.CSSStyleSheet||!s.CSSStyleSheet.prototype)return()=>{};var a=s.CSSStyleSheet.prototype.insertRule;s.CSSStyleSheet.prototype.insertRule=new Proxy(a,{apply:Xn((t,e,s)=>{var a=s[0],h=t.apply(e,s);n.onCssomSheetMutation(e);var u=os(e,i,n.styleMirror),l=u.id,f=u.styleId;return(l&&-1!==l||f&&-1!==f)&&o.queueMutation(e,()=>r({id:l,styleId:f,adds:[{rule:a,index:h}]})),h},"host")}),s.CSSStyleSheet.prototype.addRule=function(t,e,r){return void 0===r&&(r=this.cssRules.length),s.CSSStyleSheet.prototype.insertRule.apply(this,[t+" { "+e+" }",r])};var h,u,l=s.CSSStyleSheet.prototype.deleteRule;s.CSSStyleSheet.prototype.deleteRule=new Proxy(l,{apply:Xn((t,e,s)=>{var a=s[0],h=t.apply(e,s);n.onCssomSheetMutation(e);var u=os(e,i,n.styleMirror),l=u.id,f=u.styleId;return(l&&-1!==l||f&&-1!==f)&&o.queueMutation(e,()=>r({id:l,styleId:f,removes:[{index:a}]})),h},"host")}),s.CSSStyleSheet.prototype.removeRule=function(t){return s.CSSStyleSheet.prototype.deleteRule.apply(this,[t])},s.CSSStyleSheet.prototype.replace&&(h=s.CSSStyleSheet.prototype.replace,s.CSSStyleSheet.prototype.replace=new Proxy(h,{apply:Xn((t,e,s)=>{var a=s[0],h=t.apply(e,s);try{var u=null==h?void 0:h.then;if(e.ownerNode||!h||"function"!=typeof u)return h;n.onCssomSheetMutation(e);var l=os(e,i,n.styleMirror),f=l.id,c=l.styleId;if(!(f&&-1!==f||c&&-1!==c))return h;var v=o.queuePendingMutation(e,()=>r({id:f,styleId:c,replace:a}),()=>{var t=ht(e);null!==t&&r({id:f,styleId:c,replace:t})});try{u.call(h,()=>v(!0),()=>v(!1))}catch(t){v(!1)}}catch(t){}return h},"host")})),s.CSSStyleSheet.prototype.replaceSync&&(u=s.CSSStyleSheet.prototype.replaceSync,s.CSSStyleSheet.prototype.replaceSync=new Proxy(u,{apply:Xn((t,e,s)=>{var a=s[0],h=t.apply(e,s);n.onCssomSheetMutation(e);var u=os(e,i,n.styleMirror),l=u.id,f=u.styleId;return(l&&-1!==l||f&&-1!==f)&&o.queueMutation(e,()=>r({id:l,styleId:f,replaceSync:a})),h},"host")}));var f={};ls("CSSGroupingRule")?f.CSSGroupingRule=s.CSSGroupingRule:(ls("CSSMediaRule")&&(f.CSSMediaRule=s.CSSMediaRule),ls("CSSConditionRule")&&(f.CSSConditionRule=s.CSSConditionRule),ls("CSSSupportsRule")&&(f.CSSSupportsRule=s.CSSSupportsRule));var c={};return Object.entries(f).forEach(t=>{var e=t[0],s=t[1];c[e]={insertRule:s.prototype.insertRule,deleteRule:s.prototype.deleteRule},s.prototype.insertRule=new Proxy(c[e].insertRule,{apply:Xn((t,e,s)=>{var a=s[0],h=t.apply(e,s);n.onCssomSheetMutation(e.parentStyleSheet);var u=os(e.parentStyleSheet,i,n.styleMirror),l=u.id,f=u.styleId;if(e.parentStyleSheet&&(l&&-1!==l||f&&-1!==f)){var c=[...ss(e),h];o.queueMutation(e.parentStyleSheet,()=>r({id:l,styleId:f,adds:[{rule:a,index:c}]}))}return h},"host")}),s.prototype.deleteRule=new Proxy(c[e].deleteRule,{apply:Xn((t,e,s)=>{var a=s[0],h=t.apply(e,s);n.onCssomSheetMutation(e.parentStyleSheet);var u=os(e.parentStyleSheet,i,n.styleMirror),l=u.id,f=u.styleId;if(e.parentStyleSheet&&(l&&-1!==l||f&&-1!==f)){var c=[...ss(e),a];o.queueMutation(e.parentStyleSheet,()=>r({id:l,styleId:f,removes:[{index:c}]}))}return h},"host")})}),Xn(()=>{s.CSSStyleSheet.prototype.insertRule=a,s.CSSStyleSheet.prototype.deleteRule=l,h&&(s.CSSStyleSheet.prototype.replace=h),u&&(s.CSSStyleSheet.prototype.replaceSync=u),Object.entries(f).forEach(t=>{var e=t[0],r=t[1];r.prototype.insertRule=c[e].insertRule,r.prototype.deleteRule=c[e].deleteRule})})}(t,{win:n,mutationQueue:v})),l.push(as(t,t.doc)),l.push(function(t,e){var r=t.styleDeclarationCb,i=t.mirror,n=t.ignoreCSSAttributes,s=t.stylesheetManager,o=e.win,a=e.mutationQueue,h=o.CSSStyleDeclaration.prototype.setProperty;o.CSSStyleDeclaration.prototype.setProperty=new Proxy(h,{apply:Xn((t,e,o)=>{var h,u=o[0],l=o[1],f=o[2],c=t.apply(e,o);if(n.has(u))return c;var v=null===(h=e.parentRule)||void 0===h?void 0:h.parentStyleSheet;s.onCssomSheetMutation(v);var d=os(v,i,s.styleMirror),p=d.id,m=d.styleId;if(p&&-1!==p||m&&-1!==m){var y=ss(e.parentRule);a.queueMutation(v,()=>r({id:p,styleId:m,set:{property:u,value:l,priority:f},index:y}))}return c},"host")});var u=o.CSSStyleDeclaration.prototype.removeProperty;return o.CSSStyleDeclaration.prototype.removeProperty=new Proxy(u,{apply:Xn((t,e,o)=>{var h,u=o[0],l=t.apply(e,o);if(n.has(u))return l;var f=null===(h=e.parentRule)||void 0===h?void 0:h.parentStyleSheet;s.onCssomSheetMutation(f);var c=os(f,i,s.styleMirror),v=c.id,d=c.styleId;if(v&&-1!==v||d&&-1!==d){var p=ss(e.parentRule);a.queueMutation(f,()=>r({id:v,styleId:d,remove:{property:u},index:p}))}return l},"host")}),Xn(()=>{o.CSSStyleDeclaration.prototype.setProperty=h,o.CSSStyleDeclaration.prototype.removeProperty=u})}(t,{win:n,mutationQueue:v})),t.collectFonts&&l.push(function(t){var e=t.fontCb,r=t.doc,i=r.defaultView;if(!i)return()=>{};var n=[],s=new WeakMap,o=i.FontFace;i.FontFace=function(t,e,r){var i=new o(t,e,r);return s.set(i,{family:t,buffer:"string"!=typeof e,descriptors:r,fontSource:"string"==typeof e?e:JSON.stringify(Array.from(new Uint8Array(e)))}),i};var a=Zi(r.fonts,"add",function(t){return function(r){return setTimeout(Xn(()=>{var t=s.get(r);t&&(e(t),s.delete(r))}),0),t.apply(this,[r])}});return n.push(()=>{i.FontFace=o}),n.push(a),Xn(()=>{n.forEach(t=>t())})}(t))}for(var d of(l.push(function(t){var e=t.doc,r=t.mirror,i=t.blockClass,n=t.blockSelector,s=t.selectionCb,o=!0,a=Xn(()=>{var t=e.getSelection();if(!(!t||o&&(null==t?void 0:t.isCollapsed))){o=t.isCollapsed||!1;for(var a=[],h=t.rangeCount||0,u=0;h>u;u++){var l=t.getRangeAt(u),f=l.startContainer,c=l.startOffset,v=l.endContainer,d=l.endOffset;dn(f,i,n,!0)||dn(v,i,n,!0)||a.push({start:r.getId(f),startOffset:c,end:r.getId(v),endOffset:d})}s({ranges:a})}});return a(),tn("selectionchange",a)}(t)),l.push(function(t){var e=t.customElementCb,r=t.doc.defaultView;return r&&r.customElements?Zi(r.customElements,"define",function(t){return function(r,i,n){try{e({define:{name:r}})}catch(t){console.warn("Custom element callback failed for "+r)}return t.apply(this,[r,i,n])}}):()=>{}}(t)),t.plugins))l.push(d.observer(d.callback,n,d.options))}catch(t){try{f()}catch(t){}throw t}return f}function us(t){return void 0!==window[t]}function ls(t){return Boolean(void 0!==window[t]&&window[t].prototype&&"insertRule"in window[t].prototype&&"deleteRule"in window[t].prototype)}var fs=class{constructor(t){Ki(this,"generateIdFn",void 0),Ki(this,"iframeRemoteIdToLocalIdMap",new WeakMap),Ki(this,"iframeLocalIdToRemoteIdMap",new WeakMap),this.generateIdFn=t}getId(t,e,r,i){if(0>e)return e;var n=r||this.getRemoteIdToLocalIdMap(t),s=i||this.getLocalIdToRemoteIdMap(t),o=n.get(e);return void 0===o&&(o=this.generateIdFn(),n.set(e,o),s.set(o,e)),o}getIds(t,e){var r=this.getRemoteIdToLocalIdMap(t),i=this.getLocalIdToRemoteIdMap(t);return e.map(e=>this.getId(t,e,r,i))}getRemoteId(t,e,r){var i;return"number"!=typeof e||0>e?e:null!==(i=(r||this.getLocalIdToRemoteIdMap(t)).get(e))&&void 0!==i?i:-1}getRemoteIds(t,e){var r=this.getLocalIdToRemoteIdMap(t);return e.map(e=>this.getRemoteId(t,e,r))}reset(t){if(!t)return this.iframeRemoteIdToLocalIdMap=new WeakMap,void(this.iframeLocalIdToRemoteIdMap=new WeakMap);this.iframeRemoteIdToLocalIdMap.delete(t),this.iframeLocalIdToRemoteIdMap.delete(t)}getRemoteIdToLocalIdMap(t){var e=this.iframeRemoteIdToLocalIdMap.get(t);return e||this.iframeRemoteIdToLocalIdMap.set(t,e=new Map),e}getLocalIdToRemoteIdMap(t){var e=this.iframeLocalIdToRemoteIdMap.get(t);return e||this.iframeLocalIdToRemoteIdMap.set(t,e=new Map),e}},cs=class{constructor(t){Ki(this,"iframes",new WeakMap),Ki(this,"crossOriginIframeMap",new WeakMap),Ki(this,"crossOriginIframeMirror",new fs(De)),Ki(this,"crossOriginIframeStyleMirror",void 0),Ki(this,"crossOriginIframeRootIdMap",new WeakMap),Ki(this,"mirror",void 0),Ki(this,"mutationCb",void 0),Ki(this,"wrappedEmit",void 0),Ki(this,"loadListener",void 0),Ki(this,"pageHideListener",void 0),Ki(this,"stylesheetManager",void 0),Ki(this,"recordCrossOriginIframes",void 0),Ki(this,"messageHandler",void 0),Ki(this,"nestedIframeListeners",new Map),Ki(this,"attachedWindows",new WeakMap),Ki(this,"attachedDocuments",new WeakMap),Ki(this,"attachedIframes",new Map),Ki(this,"loadListenerDisposers",new WeakMap),Ki(this,"iframeElementsById",new Map),Ki(this,"pageHideHandlers",new WeakMap),this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new fs(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=t.mirror,this.messageHandler=this.handleMessage.bind(this),this.recordCrossOriginIframes&&window.addEventListener("message",this.messageHandler)}addIframe(t){this.iframes.set(t,!0),t.contentWindow&&this.crossOriginIframeMap.set(t.contentWindow,t)}registerLoadListenerDisposer(t,e){var r=this.loadListenerDisposers.get(t);r||this.loadListenerDisposers.set(t,r=new Set),r.add(e);var i=this.mirror.getId(t);-1!==i&&this.iframeElementsById.set(i,t)}getIframeElementById(t){var e,r,i;return null!==(e=null!==(r=null===(i=this.attachedIframes.get(t))||void 0===i?void 0:i.element)&&void 0!==r?r:this.iframeElementsById.get(t))&&void 0!==e?e:null}forgetIframeId(t){this.attachedIframes.delete(t),this.iframeElementsById.delete(t)}disposeLoadListeners(t){var e=this.loadListenerDisposers.get(t);e&&(e.forEach(t=>rn(t)),this.loadListenerDisposers.delete(t))}removePageHideListener(t){var e=this.pageHideHandlers.get(t);e&&(e.forEach(t=>{en(t.win,"pagehide",t.handler)}),this.pageHideHandlers.delete(t))}addLoadListener(t){this.loadListener=t}addPageHideListener(t){this.pageHideListener=t}removeLoadListener(){this.loadListener=void 0}trackIframeContent(t,e){var r=this.mirror.getId(t);return this.attachedIframes.set(r,{element:t,content:e}),r}attachIframe(t,e){var r,i=this.trackIframeContent(t,e);if(t.contentDocument){var n=this.attachedDocuments.get(t);n||this.attachedDocuments.set(t,n=new Set),n.add(t.contentDocument)}this.mutationCb({adds:[{parentId:i,nextId:null,node:e}],removes:[],texts:[],attributes:[],isAttachIframe:!0});var s=t.contentWindow;if(this.recordCrossOriginIframes&&s&&!this.nestedIframeListeners.has(s)){var o=this.handleMessage.bind(this);rn(()=>{s.addEventListener("message",o),this.nestedIframeListeners.set(s,o);var e=this.attachedWindows.get(t);e||this.attachedWindows.set(t,e=new Set),e.add(s)})}rn(()=>{var e=t.contentWindow;if(e){var r=this.pageHideHandlers.get(t);if(r)for(var i of r)if(i.win===e)return;var n=()=>{var e;null===(e=this.pageHideListener)||void 0===e||e.call(this,t),t.contentDocument&&this.mirror.removeNodeFromMap(t.contentDocument)};e.addEventListener("pagehide",n),r||this.pageHideHandlers.set(t,r=new Set),r.add({win:e,handler:n})}}),null===(r=this.loadListener)||void 0===r||r.call(this,t),t.contentDocument&&t.contentDocument.adoptedStyleSheets&&t.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(t.contentDocument.adoptedStyleSheets,this.mirror.getId(t.contentDocument))}handleMessage(t){var e=t;if("rrweb"===e.data.type&&e.origin===e.data.origin&&t.source){var r=this.crossOriginIframeMap.get(t.source);if(r){var i=this.transformCrossOriginEvent(r,e.data.event);i&&this.wrappedEmit(i,e.data.isCheckout)}}}transformCrossOriginEvent(t,e){switch(e.type){case _n.FullSnapshot:this.crossOriginIframeMirror.reset(t),this.crossOriginIframeStyleMirror.reset(t),this.replaceIdOnNode(e.data.node,t);var r=e.data.node.id;return this.crossOriginIframeRootIdMap.set(t,r),this.patchRootIdOnNode(e.data.node,r),this.trackIframeContent(t,e.data.node),{timestamp:e.timestamp,type:_n.IncrementalSnapshot,data:{source:Fn.Mutation,adds:[{parentId:this.mirror.getId(t),nextId:null,node:e.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}};case _n.Meta:case _n.Load:case _n.DomContentLoaded:return!1;case _n.Plugin:return e;case _n.Custom:return this.replaceIds(e.data.payload,t,["id","parentId","previousId","nextId"]),e;case _n.IncrementalSnapshot:switch(e.data.source){case Fn.Mutation:return e.data.adds.forEach(e=>{this.replaceIds(e,t,["parentId","nextId","previousId"]),this.replaceIdOnNode(e.node,t);var r=this.crossOriginIframeRootIdMap.get(t);r&&this.patchRootIdOnNode(e.node,r)}),e.data.removes.forEach(e=>{this.replaceIds(e,t,["parentId","id"])}),e.data.attributes.forEach(e=>{this.replaceIds(e,t,["id"])}),e.data.texts.forEach(e=>{this.replaceIds(e,t,["id"])}),e;case Fn.Drag:case Fn.TouchMove:case Fn.MouseMove:return e.data.positions.forEach(e=>{this.replaceIds(e,t,["id"])}),e;case Fn.ViewportResize:return!1;case Fn.MediaInteraction:case Fn.MouseInteraction:case Fn.Scroll:case Fn.CanvasMutation:case Fn.Input:return this.replaceIds(e.data,t,["id"]),e;case Fn.StyleSheetRule:case Fn.StyleDeclaration:return this.replaceIds(e.data,t,["id"]),this.replaceStyleIds(e.data,t,["styleId"]),e;case Fn.Font:return e;case Fn.Selection:return e.data.ranges.forEach(e=>{this.replaceIds(e,t,["start","end"])}),e;case Fn.AdoptedStyleSheet:var i;return this.replaceIds(e.data,t,["id"]),this.replaceStyleIds(e.data,t,["styleIds"]),null===(i=e.data.styles)||void 0===i||i.forEach(e=>{this.replaceStyleIds(e,t,["styleId"])}),e}}return!1}replace(t,e,r,i){for(var n of i)(Array.isArray(e[n])||"number"==typeof e[n])&&(e[n]=Array.isArray(e[n])?t.getIds(r,e[n]):t.getId(r,e[n]));return e}replaceIds(t,e,r){return this.replace(this.crossOriginIframeMirror,t,e,r)}replaceStyleIds(t,e,r){return this.replace(this.crossOriginIframeStyleMirror,t,e,r)}replaceIdOnNode(t,e){this.replaceIds(t,e,["id","rootId"]),"childNodes"in t&&t.childNodes.forEach(t=>{this.replaceIdOnNode(t,e)})}patchRootIdOnNode(t,e){t.type===Hn.Document||t.rootId||(t.rootId=e),"childNodes"in t&&t.childNodes.forEach(t=>{this.patchRootIdOnNode(t,e)})}removeIframeById(t){var e=this.attachedIframes.get(t),r=(null==e?void 0:e.element)||this.iframeElementsById.get(t)||this.mirror.getNode(t);if(this.iframeElementsById.delete(t),r){var i=r.contentWindow,n=this.attachedWindows.get(r);n&&(n.forEach(t=>{var e=this.nestedIframeListeners.get(t);e&&(en(t,"message",e),this.nestedIframeListeners.delete(t)),this.crossOriginIframeMap.delete(t)}),this.attachedWindows.delete(r)),i&&this.nestedIframeListeners.has(i)&&(en(i,"message",this.nestedIframeListeners.get(i)),this.nestedIframeListeners.delete(i)),i&&this.crossOriginIframeMap.delete(i),this.iframes.delete(r),this.disposeLoadListeners(r),this.removePageHideListener(r);var s=this.attachedDocuments.get(r);s&&(s.forEach(t=>{rn(()=>this.mirror.removeNodeFromMap(t))}),rn(()=>rs(r,s)),this.attachedDocuments.delete(r))}e&&this.attachedIframes.delete(t)}cleanupDetachedIframes(){if(0!==this.attachedIframes.size){var t=[];this.attachedIframes.forEach((e,r)=>{this.mirror.has(r)||t.push(r)}),t.forEach(t=>this.removeIframeById(t))}}reattachIframes(){this.attachedIframes.forEach((t,e)=>{var r=t.content;this.mirror.has(e)?this.mutationCb({adds:[{parentId:e,nextId:null,node:r}],removes:[],texts:[],attributes:[],isAttachIframe:!0}):this.attachedIframes.delete(e)})}destroy(){this.recordCrossOriginIframes&&en(window,"message",this.messageHandler),this.nestedIframeListeners.forEach((t,e)=>{en(e,"message",t)}),this.nestedIframeListeners.clear();var t=new Set;this.iframeElementsById.forEach(e=>t.add(e)),this.attachedIframes.forEach(e=>t.add(e.element)),t.forEach(t=>{this.disposeLoadListeners(t),this.removePageHideListener(t)}),this.crossOriginIframeMirror.reset(),this.crossOriginIframeStyleMirror.reset(),this.attachedIframes.clear(),this.crossOriginIframeMap=new WeakMap,this.iframes=new WeakMap,this.crossOriginIframeRootIdMap=new WeakMap,this.loadListenerDisposers=new WeakMap,this.pageHideHandlers=new WeakMap,this.attachedDocuments=new WeakMap,this.attachedWindows=new WeakMap,this.iframeElementsById=new Map}},vs=class{constructor(t){Ki(this,"shadowDoms",new WeakSet),Ki(this,"mutationCb",void 0),Ki(this,"scrollCb",void 0),Ki(this,"bypassOptions",void 0),Ki(this,"mirror",void 0),Ki(this,"restoreHandlers",[]),this.mutationCb=t.mutationCb,this.scrollCb=t.scrollCb,this.bypassOptions=t.bypassOptions,this.mirror=t.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(t,e){var r,i;if(nt(t)&&!this.shadowDoms.has(t)){this.shadowDoms.add(t);var n=null!==(r=null===(i=Ji.host(t))||void 0===i?void 0:i.ownerDocument)&&void 0!==r?r:e,s=ts(o({},this.bypassOptions,{doc:n,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),t),a=s.observer,h=s.buffer;this.restoreHandlers.push({doc:n,handler(){a.disconnect(),h.destroy(),h.releaseCanvasManager();var t=Kn.indexOf(h);-1!==t&&Kn.splice(t,1)}}),this.restoreHandlers.push({doc:n,handler:es(o({},this.bypassOptions,{scrollCb:this.scrollCb,doc:t,mirror:this.mirror}))}),setTimeout(()=>{t.adoptedStyleSheets&&t.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(t.adoptedStyleSheets,this.mirror.getId(Ji.host(t))),this.restoreHandlers.push({doc:n,handler:as({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},t)})},0)}}observeAttachShadow(t){t.contentWindow&&t.contentDocument&&this.patchAttachShadow(t.contentWindow.Element,t.contentDocument)}patchAttachShadow(t,e){var r=this;this.restoreHandlers.push({doc:e,handler:Zi(t.prototype,"attachShadow",function(t){return function(i){var n=t.call(this,i),s=Ji.shadowRoot(this);return s&&Nn(this)&&r.addShadowRoot(s,e),n}})})}reset(){this.restoreHandlers.forEach(t=>{var e=t.handler;try{e()}catch(t){}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}resetForDoc(t){var e=[];for(var r of this.restoreHandlers)if(r.doc===t)try{r.handler()}catch(t){}else e.push(r);this.restoreHandlers=e}},ds="skip-frame";function ps(t){if("object"!=typeof t||null===t)return!1;var e=t.y,r=t.width,i=t.height;return Number.isFinite(t.x)&&Number.isFinite(e)&&Number.isFinite(r)&&Number.isFinite(i)&&r>=0&&i>=0}for(var ms="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ys="undefined"==typeof Uint8Array?[]:new Uint8Array(256),gs=0;64>gs;gs++)ys[ms.charCodeAt(gs)]=gs;var ws=function(t){var e,r=new Uint8Array(t),i=r.length,n="";for(e=0;i>e;e+=3)n+=ms[r[e]>>2],n+=ms[(3&r[e])<<4|r[e+1]>>4],n+=ms[(15&r[e+1])<<2|r[e+2]>>6],n+=ms[63&r[e+2]];return i%3==2?n=n.substring(0,n.length-1)+"=":i%3==1&&(n=n.substring(0,n.length-2)+"=="),n},bs=new Map,Ss=(t,e,r)=>{if(t&&(Ms(t,e)||"object"==typeof t)){var i=function(t,e){var r=bs.get(t);return r||bs.set(t,r=new Map),r.has(e)||r.set(e,[]),r.get(e)}(r,t.constructor.name),n=i.indexOf(t);return-1===n&&(n=i.length,i.push(t)),n}};function ks(t,e,r,i){return t instanceof Array?t.map(t=>ks(t,e,r,i)):null===t?t: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?{rr_type:t.constructor.name,args:[Object.values(t)]}:t instanceof ArrayBuffer?{rr_type:t.constructor.name,base64:ws(t)}:t instanceof DataView?{rr_type:t.constructor.name,args:[ks(t.buffer,e,r,i),t.byteOffset,t.byteLength]}:t instanceof HTMLImageElement?{rr_type:t.constructor.name,src:t.src}:t instanceof HTMLCanvasElement?{rr_type:"HTMLImageElement",src:t.toDataURL(i.type,i.quality)}:t instanceof ImageData?{rr_type:t.constructor.name,args:[ks(t.data,e,r,i),t.width,t.height]}:Ms(t,e)||"object"==typeof t?{rr_type:t.constructor.name,index:Ss(t,e,r)}:t}var Cs=(t,e,r,i)=>t.map(t=>ks(t,e,r,i)),Ms=(t,e)=>{var r=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(t=>"function"==typeof e[t]);return Boolean(r.find(r=>t instanceof e[r]))},xs=["webgl","webgl2"];function As(t){return"nodeType"in t}function Es(t,e,r,i){var n=[];try{if(i){var s=function(t,e,r){var i=t.GPUCanvasContext;if((null==i?void 0:i.prototype)&&"function"==typeof i.prototype.configure)return Zi(i.prototype,"configure",function(i){return function(n){var s=function(t){var e=t.canvas;return e&&"object"==typeof e?e:null}(this);if(!s||As(s)&&dn(s,e,r,!0))return i.call(this,n);As(s)&&!("__context"in s)&&(s.__context="webgpu");var a=function(t){var e=t.GPUTextureUsage;return e?e.COPY_SRC|e.RENDER_ATTACHMENT:null}(t);return i.call(this,null!==a&&n?o({},n,{usage:"number"==typeof n.usage?n.usage|a:a}):n)}})}(t,e,r);s&&n.push(s)}var a=Zi(t.HTMLCanvasElement.prototype,"getContext",function(t){return function(n){for(var s=function(t){return"experimental-webgl"===t?"webgl":t}(n),o=arguments.length,a=new Array(o>1?o-1:0),h=1;o>h;h++)a[h-1]=arguments[h];if(!dn(this,e,r,!0)&&("__context"in this||(this.__context=s),i&&xs.includes(s)))if(a[0]&&"object"==typeof a[0]){var u=a[0];u.preserveDrawingBuffer||(u.preserveDrawingBuffer=!0)}else a.splice(0,1,{preserveDrawingBuffer:!0});return t.apply(this,[n,...a])}});n.push(a)}catch(t){console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{n.forEach(t=>t())}}function Rs(t,e,r,i,n,s,o){var a=[],h=Object.getOwnPropertyNames(t),u=function(h){if(["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(h))return 0;try{if("function"!=typeof t[h])return 0;var u=Zi(t,h,function(t){return function(){for(var a=arguments.length,u=new Array(a),l=0;a>l;l++)u[l]=arguments[l];var f=t.apply(this,u);if(Ss(f,s,this),this.canvas&&"tagName"in this.canvas&&!dn(this.canvas,i,n,!0)){var c={type:e,property:h,args:Cs(u,s,this,o)};r(this.canvas,c)}return f}});a.push(u)}catch(s){var l=hn(t,h,{set(t){this.canvas&&"tagName"in this.canvas&&!dn(this.canvas,i,n,!0)&&r(this.canvas,{type:e,property:h,args:[t],setter:!0})}});a.push(l)}};for(var l of h)u(l);return a}var Is='(function() {\n\t//#region ../../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/base64-arraybuffer/1.0.2/f63fa6b5c318cf1c9f6bdd1d4292ad2f15f76f2ec78475025a2d44070e896fe9/node_modules/base64-arraybuffer/dist/base64-arraybuffer.es5.js\n\tvar chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";\n\tvar lookup = typeof Uint8Array === "undefined" ? [] : /* @__PURE__ */ new Uint8Array(256);\n\tfor (var i = 0; i < chars.length; i++) lookup[chars.charCodeAt(i)] = i;\n\tvar encode = function(arraybuffer) {\n\t\tvar bytes = new Uint8Array(arraybuffer), i, len = bytes.length, base64 = "";\n\t\tfor (i = 0; i < len; i += 3) {\n\t\t\tbase64 += chars[bytes[i] >> 2];\n\t\t\tbase64 += chars[(bytes[i] & 3) << 4 | bytes[i + 1] >> 4];\n\t\t\tbase64 += chars[(bytes[i + 1] & 15) << 2 | bytes[i + 2] >> 6];\n\t\t\tbase64 += chars[bytes[i + 2] & 63];\n\t\t}\n\t\tif (len % 3 === 2) base64 = base64.substring(0, base64.length - 1) + "=";\n\t\telse if (len % 3 === 1) base64 = base64.substring(0, base64.length - 2) + "==";\n\t\treturn base64;\n\t};\n\t//#endregion\n\t//#region src/record/workers/image-bitmap-data-url-worker.ts\n\tconst lastFingerprintMap = /* @__PURE__ */ new Map();\n\tconst transparentFingerprintMap = /* @__PURE__ */ new Map();\n\tconst lastSentAtMap = /* @__PURE__ */ new Map();\n\tconst PROVIDER_KEYFRAME_INTERVAL_MS = 3e4;\n\tfunction hashPixels(data) {\n\t\tconst view = new Uint32Array(data.buffer, data.byteOffset, data.byteLength >>> 2);\n\t\tlet primaryHash = 2166136261;\n\t\tlet secondaryHash = 2654435769;\n\t\tfor (let i = 0; i < view.length; i++) {\n\t\t\tprimaryHash ^= view[i];\n\t\t\tprimaryHash = Math.imul(primaryHash, 16777619);\n\t\t\tsecondaryHash ^= view[i];\n\t\t\tsecondaryHash = Math.imul(secondaryHash, 2246822507);\n\t\t}\n\t\treturn `${(primaryHash >>> 0).toString(16)}:${(secondaryHash >>> 0).toString(16)}`;\n\t}\n\tfunction frameFingerprint(width, height, data) {\n\t\treturn `${width}x${height}:${hashPixels(data)}`;\n\t}\n\tfunction transparentFingerprint(width, height) {\n\t\tconst pixelCount = width * height;\n\t\tlet hash = transparentFingerprintMap.get(pixelCount);\n\t\tif (hash === void 0) {\n\t\t\thash = hashPixels(new Uint8ClampedArray(pixelCount * 4));\n\t\t\ttransparentFingerprintMap.set(pixelCount, hash);\n\t\t}\n\t\treturn `${width}x${height}:${hash}`;\n\t}\n\tconst worker = self;\n\tlet reusableCanvas = null;\n\tlet reusableCtx = null;\n\tworker.onmessage = async function(e) {\n\t\tif ("resetFrameDedup" in e.data) {\n\t\t\tlastFingerprintMap.clear();\n\t\t\treturn;\n\t\t}\n\t\tif ("OffscreenCanvas" in globalThis) {\n\t\t\tconst { id, bitmap, width, height, displayWidth, displayHeight, dataURLOptions, maskRegions } = e.data;\n\t\t\ttry {\n\t\t\t\tif (!reusableCanvas || reusableCanvas.width !== width || reusableCanvas.height !== height) {\n\t\t\t\t\treusableCanvas = new OffscreenCanvas(width, height);\n\t\t\t\t\treusableCtx = reusableCanvas.getContext("2d", { willReadFrequently: true });\n\t\t\t\t}\n\t\t\t\tconst ctx = reusableCtx;\n\t\t\t\tctx.clearRect(0, 0, width, height);\n\t\t\t\tctx.drawImage(bitmap, 0, 0);\n\t\t\t\tbitmap.close();\n\t\t\t\tif (maskRegions) {\n\t\t\t\t\tctx.fillStyle = "black";\n\t\t\t\t\tfor (const region of maskRegions) ctx.fillRect(region.x, region.y, region.width, region.height);\n\t\t\t\t}\n\t\t\t\tconst fingerprint = frameFingerprint(width, height, ctx.getImageData(0, 0, width, height).data);\n\t\t\t\tif (fingerprint === (lastFingerprintMap.get(id) ?? transparentFingerprint(width, height))) {\n\t\t\t\t\tconst lastSentAt = lastSentAtMap.get(id);\n\t\t\t\t\tif (!(maskRegions !== void 0 && lastSentAt !== void 0 && Date.now() - lastSentAt >= PROVIDER_KEYFRAME_INTERVAL_MS)) return worker.postMessage({ id });\n\t\t\t\t}\n\t\t\t\tconst blob = await reusableCanvas.convertToBlob(dataURLOptions);\n\t\t\t\tconst arrayBuffer = await blob.arrayBuffer();\n\t\t\t\tworker.postMessage({\n\t\t\t\t\tid,\n\t\t\t\t\ttype: blob.type,\n\t\t\t\t\tbase64: encode(arrayBuffer),\n\t\t\t\t\tdisplayWidth,\n\t\t\t\t\tdisplayHeight\n\t\t\t\t});\n\t\t\t\tlastFingerprintMap.set(id, fingerprint);\n\t\t\t\tlastSentAtMap.set(id, Date.now());\n\t\t\t} catch {\n\t\t\t\tworker.postMessage({ id });\n\t\t\t}\n\t\t} else {\n\t\t\te.data.bitmap.close();\n\t\t\treturn worker.postMessage({ id: e.data.id });\n\t\t}\n\t};\n\t//#endregion\n})();\n',Ts="undefined"!=typeof self&&self.Blob&&new Blob(["(self.URL || self.webkitURL).revokeObjectURL(self.location.href);",Is],{type:"text/javascript;charset=utf-8"});function Os(t){var e;try{if(!(e=Ts&&(self.URL||self.webkitURL).createObjectURL(Ts)))throw"";var r=new Worker(e,{name:null==t?void 0:t.name});return r.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(e)}),r}catch(e){return new Worker("data:text/javascript;charset=utf-8,"+encodeURIComponent(Is),{name:null==t?void 0:t.name})}}var Ds,Ns,_s,Ls=class{onFullSnapshot(){var t;null===(t=this.resetFrameDedup)||void 0===t||t.call(this)}acquire(){this.refCount+=1}reset(){this.refCount>0&&(this.refCount-=1),this.refCount>0||this.teardown()}teardown(){this.torndown||(this.torndown=!0,this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers(),null!==this.rafIdTimestamp&&(cancelAnimationFrame(this.rafIdTimestamp),this.rafIdTimestamp=null),null!==this.rafIdFlush&&(cancelAnimationFrame(this.rafIdFlush),this.rafIdFlush=null))}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}constructor(t){Ki(this,"pendingCanvasMutations",new Map),Ki(this,"rafStamps",{latestId:0,invokeId:null}),Ki(this,"mirror",void 0),Ki(this,"mutationCb",void 0),Ki(this,"resetObservers",void 0),Ki(this,"frozen",!1),Ki(this,"locked",!1),Ki(this,"rafIdTimestamp",null),Ki(this,"rafIdFlush",null),Ki(this,"refCount",0),Ki(this,"torndown",!1),Ki(this,"resetFrameDedup",null),Ki(this,"processMutation",(t,e)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(t)||this.pendingCanvasMutations.set(t,[]),this.pendingCanvasMutations.get(t).push(e)});var e=t.sampling,r=void 0===e?"all":e,i=t.win,n=t.blockClass,s=t.blockSelector,o=t.recordCanvas,a=t.dataURLOptions,h=t.resolutionScale,u=t.canvasMasking;this.mutationCb=t.mutationCb,this.mirror=t.mirror,o&&"all"===r&&this.initCanvasMutationObserver(i,n,s,a),o&&"number"==typeof r&&this.initCanvasFPSObserver(r,i,n,s,{dataURLOptions:a,resolutionScale:h,canvasMasking:u})}initCanvasFPSObserver(t,e,r,i,s){var o=this;if("OffscreenCanvas"in e){var a,h="number"==typeof s.resolutionScale&&Number.isFinite(s.resolutionScale)?Math.min(1,Math.max(.1,s.resolutionScale)):1,u=Es(e,r,i,!0),l=new Map;try{a=new Os}catch(t){return}var f=!1;a.onerror=()=>{var t;f=!0,cancelAnimationFrame(c),null===(t=a.terminate)||void 0===t||t.call(a),this.resetFrameDedup=null},this.resetFrameDedup=()=>{a.postMessage({resetFrameDedup:!0})},a.onmessage=t=>{var e=t.data.id;if(l.set(e,!1),"base64"in t.data){var r=t.data,i=r.displayWidth,n=r.displayHeight;this.mutationCb({id:e,type:jn["2D"],commands:[{property:"clearRect",args:[0,0,i,n]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:r.base64}],type:r.type}]},0,0,i,n]}],displayWidth:i,displayHeight:n})}};var c,v=1e3/t,d=0,p=t=>{var u,m;f||(d&&v>t-d||(d=t,(u=[],m=t=>{try{t.querySelectorAll("canvas").forEach(t=>{dn(t,r,i,!0)||u.push(t)}),t.querySelectorAll("*").forEach(t=>{t.shadowRoot&&m(t.shadowRoot)})}catch(t){}},m(e.document),u).forEach(function(){var t=n(function*(t){var e=o.mirror.getId(t);if(!l.get(e)&&0!==t.width&&0!==t.height){l.set(e,!0);try{if(["webgl","webgl2"].includes(t.__context)){var r,i,n=t.getContext(t.__context);if(null==n||null===(r=n.isContextLost)||void 0===r?void 0:r.call(n))return void l.set(e,!1);!1===(null==n||null===(i=n.getContextAttributes())||void 0===i?void 0:i.preserveDrawingBuffer)&&n.clear(n.COLOR_BUFFER_BIT)}var u=t.clientWidth||t.width,f=t.clientHeight||t.height,c=Math.max(1,Math.round(u*h)),v=Math.max(1,Math.round(f*h)),d=function(t,e,r,i,n,s){if(t&&"function"==typeof t.regionsFn){var o;try{o=t.regionsFn(e)}catch(t){return ds}if(void 0!==o){if(!Array.isArray(o)||!o.every(ps))return ds;var a=r/n,h=i/s;return o.filter(t=>t.width>0&&t.height>0).map(t=>{var e=Math.floor(t.x*a),r=Math.floor(t.y*h);return{x:e,y:r,width:Math.ceil((t.x+t.width)*a)-e,height:Math.ceil((t.y+t.height)*h)-r}})}}}(s.canvasMasking,t,c,v,u,f);if("skip-frame"===d)return void l.set(e,!1);var p=yield createImageBitmap(t,1>h?{resizeWidth:c,resizeHeight:v,resizeQuality:"medium"}:{resizeWidth:c,resizeHeight:v});a.postMessage({id:e,bitmap:p,width:c,height:v,displayWidth:u,displayHeight:f,dataURLOptions:s.dataURLOptions,maskRegions:d},[p])}catch(t){l.set(e,!1)}}});return function(e){return t.apply(this,arguments)}}())),c=requestAnimationFrame(p))};c=requestAnimationFrame(p),this.resetObservers=()=>{var t;u(),cancelAnimationFrame(c),null===(t=a.terminate)||void 0===t||t.call(a),this.resetFrameDedup=null}}}initCanvasMutationObserver(t,e,r,i){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();var n=Es(t,e,r,!1),s=function(t,e,r,i,n){var s=[],o=Object.getOwnPropertyNames(e.CanvasRenderingContext2D.prototype),a=function(o){try{if("function"!=typeof e.CanvasRenderingContext2D.prototype[o])return 1;var a=Zi(e.CanvasRenderingContext2D.prototype,o,function(s){return function(){for(var a=arguments.length,h=new Array(a),u=0;a>u;u++)h[u]=arguments[u];return dn(this.canvas,r,i,!0)||setTimeout(()=>{var r=Cs(h,e,this,n);t(this.canvas,{type:jn["2D"],property:o,args:r})},0),s.apply(this,h)}});s.push(a)}catch(n){var h=hn(e.CanvasRenderingContext2D.prototype,o,{set(e){dn(this.canvas,r,i,!0)||t(this.canvas,{type:jn["2D"],property:o,args:[e],setter:!0})}});s.push(h)}};for(var h of o)if(a(h))continue;return()=>{s.forEach(t=>t())}}(this.processMutation.bind(this),t,e,r,i),o=function(t,e,r,i,n){var s=[];return void 0!==e.WebGLRenderingContext&&s.push(...Rs(e.WebGLRenderingContext.prototype,jn.WebGL,t,r,i,e,n)),void 0!==e.WebGL2RenderingContext&&s.push(...Rs(e.WebGL2RenderingContext.prototype,jn.WebGL2,t,r,i,e,n)),()=>{s.forEach(t=>t())}}(this.processMutation.bind(this),t,e,r,i);this.resetObservers=()=>{n(),s(),o()}}startPendingCanvasMutationFlusher(){this.rafIdFlush=requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){var t=e=>{this.rafStamps.latestId=e,this.rafIdTimestamp=requestAnimationFrame(t)};this.rafIdTimestamp=requestAnimationFrame(t)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((t,e)=>{var r=this.mirror.getId(e);this.flushPendingCanvasMutationFor(e,r)}),this.rafIdFlush=requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(t,e){if(!this.frozen&&!this.locked){var i=this.pendingCanvasMutations.get(t);if(i&&-1!==e){var n=i.map(t=>s(t,r));this.mutationCb({id:e,type:i[0].type,commands:n}),this.pendingCanvasMutations.delete(t)}}}},Fs=class{constructor(t){var e;Ki(this,"trackedLinkElements",new WeakSet),Ki(this,"pendingDeferredSheets",new Set),Ki(this,"mutationCb",void 0),Ki(this,"adoptedStyleSheetCb",void 0),Ki(this,"maskAllElementAttributes",void 0),Ki(this,"maskAttributeFn",void 0),Ki(this,"styleMirror",new In),this.mutationCb=t.mutationCb,this.adoptedStyleSheetCb=t.adoptedStyleSheetCb,this.maskAllElementAttributes=null!==(e=t.maskAllElementAttributes)&&void 0!==e&&e,this.maskAttributeFn=t.maskAttributeFn}attachLinkElement(t,e){"_cssText"in e.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:e.id,attributes:e.attributes}]}),this.trackLinkElement(t)}beginDeferredLinkInlining(t,e){if(-1===e||!t.isConnected)return null;var r=null,i=null;try{(i=t.sheet)&&(r=pt(i))}catch(t){}if(!r||!i)return q(),null;var n=r,s=!1,o={sheet:i,invalidate(){s=!0}};this.pendingDeferredSheets.add(o);var a=!1;return{advance:r=>{if(a)return!0;var h,u,l=S(),f=x(),c=!0;try{if(s)return a=!0,q(),!0;if(!n.advance(r))return c=!1,!1;a=!0;var v=n.text();if(!t.isConnected)return!0;var d=null;try{d=t.sheet}catch(t){}return d!==i?(q(),!0):v?(this.emitCssTextMutation(t,e,v),!0):(q(),!0)}finally{c&&this.pendingDeferredSheets.delete(o),E(h=S()-l,null!=(u=f)?u:k)||(B.totalMs+=h,h>B.slowestSliceMs&&(B.slowestSliceMs=h))}},remainingRules:()=>n.remainingRules(),discard:()=>{this.pendingDeferredSheets.delete(o)}}}onCssomSheetMutation(t){if(t&&0!==this.pendingDeferredSheets.size)for(var e of this.pendingDeferredSheets)e.sheet===t&&(this.pendingDeferredSheets.delete(e),e.invalidate())}inlineDeferredLinkElement(t,e){var r;null===(r=this.beginDeferredLinkInlining(t,e))||void 0===r||r.advance(1/0)}emitCssTextMutation(t,e,r){this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:e,attributes:{_cssText:St({element:t,name:"_cssText",value:r,maskAllElementAttributes:this.maskAllElementAttributes,maskAttributeFn:this.maskAttributeFn})}}]})}trackLinkElement(t){this.trackedLinkElements.has(t)||(this.trackedLinkElements.add(t),this.trackStylesheetInLinkElement(t))}adoptStyleSheets(t,e){var r=this;if(0!==t.length){var i={id:e,styleIds:[]},n=[],s=function(t){var e;if(r.styleMirror.has(t))e=r.styleMirror.getId(t);else{var s=r.styleMirror.add(t);e=s;var o=S();try{z(()=>{try{var e=t.rules||t.cssRules;e&&G(e)}catch(t){}n.push({styleId:s,rules:Array.from(t.rules||CSSRule,(e,r)=>({rule:ut(e,t.href),index:r}))})})}finally{V(S()-o)}}i.styleIds.push(e)};for(var o of t)s(o);n.length>0&&(i.styles=n),this.adoptedStyleSheetCb(i)}}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet,this.pendingDeferredSheets.clear(),ze.forEach(t=>t.abort()),ze.clear()}trackStylesheetInLinkElement(t){}},Ps=class{constructor(){Ki(this,"nodeMap",new WeakMap),Ki(this,"active",!1)}inOtherBuffer(t,e){var r=this.nodeMap.get(t);return r&&Array.from(r).some(t=>t!==e)}add(t,e){this.active||(this.active=!0,requestAnimationFrame(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(t,(this.nodeMap.get(t)||new Set).add(e))}destroy(){}},Bs=!1;try{if(2!==Array.from([1],t=>2*t)[0]){var js,Us=document.createElement("iframe");document.body.appendChild(Us),Array.from=(null===(js=Us.contentWindow)||void 0===js?void 0:js.Array.from)||Array.from,document.body.removeChild(Us)}}catch(t){console.debug("Unable to override Array.from",t)}var Ws=yt(),Hs=new Set([Fn.Mutation,Fn.MediaInteraction,Fn.StyleSheetRule,Fn.CanvasMutation,Fn.Font,Fn.Log,Fn.StyleDeclaration,Fn.AdoptedStyleSheet]);function Gs(t){var e=window;if("function"==typeof e.requestIdleCallback){var r=e.requestIdleCallback(t,{timeout:2e3});return{cancel(){var t;return null===(t=e.cancelIdleCallback)||void 0===t?void 0:t.call(e,r)}}}var i=setTimeout(t,250);return{cancel:()=>clearTimeout(i)}}function zs(t){var e;void 0===t&&(t={});var r=t,i=r.emit,n=r.checkoutEveryNms,s=r.checkoutEveryNth,a=r.blockClass,h=void 0===a?"rr-block":a,u=r.blockSelector,l=void 0===u?null:u,f=r.ignoreClass,c=void 0===f?"rr-ignore":f,v=r.ignoreSelector,d=void 0===v?null:v,p=r.maskTextClass,m=void 0===p?"rr-mask":p,y=r.maskTextSelector,g=void 0===y?null:y,w=r.inlineStylesheet,b=void 0===w||w,S=r.inlineStylesheetBudgetRules,k=r.maskAllInputs,C=r.maskInputOptions,x=r.slimDOMOptions,A=r.maskInputFn,E=r.maskTextFn,R=r.maskAllElementAttributes,I=void 0!==R&&R,T=r.maskAttributeFn,O=r.hooks,D=r.packFn,N=r.sampling,L=void 0===N?{}:N,F=r.dataURLOptions,P=void 0===F?{}:F,B=r.canvasResolutionScale,W=r.canvasMasking,H=r.mousemoveWait,G=r.recordDOM,z=void 0===G||G,V=r.recordCanvas,Y=void 0!==V&&V,q=r.recordCrossOriginIframes,J=void 0!==q&&q,X=r.recordAfter,K=void 0===X?"DOMContentLoaded"===t.recordAfter?t.recordAfter:"load":X,Q=r.userTriggeredOnInput,tt=void 0!==Q&&Q,et=r.collectFonts,rt=void 0!==et&&et,it=r.inlineImages,nt=void 0!==it&&it,st=r.plugins,ot=r.keepIframeSrcFn,at=void 0===ot?()=>!1:ot,ht=r.ignoreCSSAttributes,ut=void 0===ht?new Set([]):ht,lt=r.attributeFilter;zn=r.errorHandler;var ft=o({type:"image/webp",quality:.4,maxBase64ImageLength:1048576},P),ct=!J||window.parent===window,vt=!1;if(!ct)try{window.parent.document&&(vt=!1)}catch(t){vt=!0}if(ct&&!i)throw new Error("emit function is required");if(!ct&&!vt)return()=>{};void 0!==H&&void 0===L.mousemove&&(L.mousemove=H),Ws.reset();var dt,pt=!0===k?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:void 0!==C?C:{password:!0},yt=Ke(void 0!==x&&x);wn();var gt,wt,bt=0,St=new Map,kt=t=>{for(var e of st||[])e.eventProcessor&&(t=e.eventProcessor(t));return D&&!vt&&(t=D(t)),t};Ds=(t,e)=>{var r,o=t;if(o.timestamp=un(),!(null===(r=Kn[0])||void 0===r?void 0:r.isFrozen())||o.type===_n.FullSnapshot||o.type===_n.IncrementalSnapshot&&Hs.has(o.data.source)||Kn.forEach(t=>t.unfreeze()),ct)null==i||i(kt(o),e);else if(vt){var a={type:"rrweb",event:kt(o),origin:window.location.origin,isCheckout:e};window.parent.postMessage(a,"*")}if(o.type===_n.FullSnapshot)dt=o,bt=0;else if(o.type===_n.IncrementalSnapshot){if(o.data.source===Fn.Mutation&&o.data.isAttachIframe)return;bt++,(s&&bt>=s||n&&o.timestamp-dt.timestamp>n)&&Ns(!0)}};var Ct=t=>{if(t.removes&&t.removes.length>0){var e=t.adds.length>0?new Set(t.adds.map(t=>t.node.id)):null,r=new Set;if(t.adds.length>0)for(var i of t.adds){var n=Ws.getNode(i.node.id);n&&"IFRAME"===n.nodeName&&r.add(n)}t.removes.forEach(t=>{var i=t.id;if(!e||!e.has(i)){var n=Et.getIframeElementById(i);n&&r.has(n)?Et.forgetIframeId(i):(null==gt||gt(i),Et.removeIframeById(i))}}),null==wt||wt(),Et.cleanupDetachedIframes()}Ds({type:_n.IncrementalSnapshot,data:o({source:Fn.Mutation},t)})},Mt=t=>Ds({type:_n.IncrementalSnapshot,data:o({source:Fn.Scroll},t)}),xt=t=>Ds({type:_n.IncrementalSnapshot,data:o({source:Fn.CanvasMutation},t)}),At=new Fs({mutationCb:Ct,adoptedStyleSheetCb:t=>Ds({type:_n.IncrementalSnapshot,data:o({source:Fn.AdoptedStyleSheet},t)}),maskAllElementAttributes:I,maskAttributeFn:T}),Et=new cs({mirror:Ws,mutationCb:Ct,stylesheetManager:At,recordCrossOriginIframes:J,wrappedEmit:Ds});for(var Rt of st||[])Rt.getMirror&&Rt.getMirror({nodeMirror:Ws,crossOriginIframeMirror:Et.crossOriginIframeMirror,crossOriginIframeStyleMirror:Et.crossOriginIframeStyleMirror});var It=new Ps,Tt=null==W?void 0:W.configured;_s=new Ls({recordCanvas:Y,mutationCb:xt,win:window,blockClass:h,blockSelector:l,mirror:Ws,sampling:L.canvas,dataURLOptions:ft,resolutionScale:B,canvasMasking:W});var Ot=new vs({mutationCb:Ct,scrollCb:Mt,bypassOptions:{blockClass:h,blockSelector:l,maskTextClass:m,maskTextSelector:g,inlineStylesheet:b,maskInputOptions:pt,dataURLOptions:ft,maskTextFn:E,maskInputFn:A,maskAllElementAttributes:I,maskAttributeFn:T,recordCanvas:Y,canvasMaskingConfigured:Tt,inlineImages:nt,sampling:L,slimDOMOptions:yt,iframeManager:Et,stylesheetManager:At,canvasManager:_s,keepIframeSrcFn:at,processedNodeManager:It,attributeFilter:lt},mirror:Ws});Ns=function(t){if(void 0===t&&(t=!1),z){j(S);try{Ds({type:_n.Meta,data:{href:window.location.href,width:cn(),height:fn()}},t),null==e||e.cancel(),e=void 0,At.reset(),Ot.init(),Kn.forEach(t=>t.lock());var r,i=null;try{i=function(t,e){var r=e||{},i=r.mirror,n=void 0===i?new mt:i,s=r.blockClass,o=void 0===s?"rr-block":s,a=r.blockSelector,h=void 0===a?null:a,u=r.maskTextClass,l=void 0===u?"rr-mask":u,f=r.maskTextSelector,c=void 0===f?null:f,v=r.inlineStylesheet,d=void 0===v||v,p=r.inlineImages,m=void 0!==p&&p,y=r.recordCanvas,g=void 0!==y&&y,w=r.canvasMaskingConfigured,b=r.maskAllInputs,S=void 0!==b&&b,k=r.maskTextFn,C=r.maskInputFn,M=r.maskAllElementAttributes,x=void 0!==M&&M,A=r.maskAttributeFn,E=r.slimDOM,R=r.dataURLOptions,I=r.preserveWhiteSpace,T=r.onSerialize,O=r.onIframeLoad,D=r.iframeLoadTimeout,N=r.onIframeListenerRegistered,_=r.onStylesheetLoad,L=r.stylesheetLoadTimeout,F=r.keepIframeSrcFn,P=void 0===F?()=>!1:F,B=r.maxDepth,W=r.inlineStylesheetBudgetRules,H=!0===S?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:!1===S?{password:!0}:S,G=Ke(void 0!==E&&E);j(W);try{return Xe(t,{doc:t,mirror:n,blockClass:o,blockSelector:h,maskTextClass:l,maskTextSelector:c,skipChild:!1,inlineStylesheet:d,maskInputOptions:H,maskTextFn:k,maskInputFn:C,maskAllElementAttributes:x,maskAttributeFn:A,slimDOMOptions:G,dataURLOptions:R,inlineImages:m,recordCanvas:g,canvasMaskingConfigured:w,preserveWhiteSpace:I,onSerialize:T,onIframeLoad:O,iframeLoadTimeout:D,onIframeListenerRegistered:N,onStylesheetLoad:_,stylesheetLoadTimeout:L,keepIframeSrcFn:P,newlyAddedElement:!1,maxDepth:B})}finally{U()}}(document,{mirror:Ws,blockClass:h,blockSelector:l,maskTextClass:m,maskTextSelector:g,inlineStylesheet:b,maskAllInputs:pt,inlineStylesheetBudgetRules:S,maskTextFn:E,maskInputFn:A,maskAllElementAttributes:I,maskAttributeFn:T,slimDOM:yt,dataURLOptions:ft,recordCanvas:Y,canvasMaskingConfigured:Tt,inlineImages:nt,onSerialize(t){kn(t,Ws)&&Et.addIframe(t),Cn(t,Ws)&&At.trackLinkElement(t),xn(t)&&Ot.addShadowRoot(Ji.shadowRoot(t),document)},onIframeLoad(t,e){Et.attachIframe(t,e),Ot.observeAttachShadow(t)},onIframeListenerRegistered(t,e){Et.registerLoadListenerDisposer(t,e)},onStylesheetLoad(t,e){At.attachLinkElement(t,e)},keepIframeSrcFn:at})}finally{s=_,_=[],r=s}if(!i)return console.warn("Failed to snapshot the document");if(Ds({type:_n.FullSnapshot,data:{node:i,initialOffset:ln(window)}},t),Kn.forEach(t=>t.unlock()),_s.onFullSnapshot(),r.length){var n=function(t,e,r){var i=!1,n=null,s=0,o=null,a=()=>null!==o||t.length>s,h=()=>{var r=t[s];t[s]=null,s+=1,r&&rn(()=>{o=e.beginDeferredLinkInlining(r,Ws.getId(r))})},u=()=>{if(o){var t=o,e=!0;rn(()=>{e=t.advance(200)}),e&&(o=null)}},l=()=>{o||h(),u()},f=t=>{if(n=null,!i){var e=0;do{try{l()}catch(t){null==o||o.discard(),o=null,Z(1)}e+=1}while(!i&&a()&&(t?!t.didTimeout&&t.timeRemaining()>5:10>e));i||(a()?n=Gs(f):r())}};return n=Gs(f),{cancel(){i=!0,null==o||o.discard(),o=null,null==n||n.cancel(),n=null},flush(){if(!i){i=!0,null==n||n.cancel(),n=null;for(var e=0,l=0;a()&&50>e;){o||h();var f=o;if(f)if(Math.floor(f.remainingRules()/200)+1>50-e)f.discard(),o=null,l+=1;else{try{u()}catch(t){null==o||o.discard(),o=null,l+=1}e+=1}}if(a()||l>0){for(var c=l+(null!==o?1:0),v=s;t.length>v;v++)null!==t[v]&&(c+=1);Z(c),null==o||o.discard(),o=null}r()}}}}(r,At,()=>{e===n&&(e=void 0)});e=n}J&&Et.reattachIframes(),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&At.adoptStyleSheets(document.adoptedStyleSheets,Ws.getId(document))}finally{U()}var s}};try{var Dt=[];for(var Nt of(Dt.push(tn("pagehide",()=>{try{null==e||e.flush()}catch(t){}e=void 0},window)),["visibilitychange","freeze","resume"]))Dt.push(tn(Nt,M,document));gt=t=>{var e=St.get(t);e&&(e.forEach(t=>{rn(t);var e=Dt.indexOf(t);-1!==e&&Dt.splice(e,1)}),St.delete(t))},wt=()=>{for(var t of St){var e=t[0],r=Ws.getNode(e);if(r)try{r.contentDocument&&r.contentDocument.defaultView||null==gt||gt(e)}catch(t){null==gt||gt(e)}else null==gt||gt(e)}};var _t=t=>{var e;return Xn(hs)({mutationCb:Ct,mousemoveCb:(t,e)=>Ds({type:_n.IncrementalSnapshot,data:{source:e,positions:t}}),mouseInteractionCb:t=>Ds({type:_n.IncrementalSnapshot,data:o({source:Fn.MouseInteraction},t)}),scrollCb:Mt,viewportResizeCb:t=>Ds({type:_n.IncrementalSnapshot,data:o({source:Fn.ViewportResize},t)}),inputCb:t=>Ds({type:_n.IncrementalSnapshot,data:o({source:Fn.Input},t)}),mediaInteractionCb:t=>Ds({type:_n.IncrementalSnapshot,data:o({source:Fn.MediaInteraction},t)}),styleSheetRuleCb:t=>Ds({type:_n.IncrementalSnapshot,data:o({source:Fn.StyleSheetRule},t)}),styleDeclarationCb:t=>Ds({type:_n.IncrementalSnapshot,data:o({source:Fn.StyleDeclaration},t)}),canvasMutationCb:xt,fontCb:t=>Ds({type:_n.IncrementalSnapshot,data:o({source:Fn.Font},t)}),selectionCb(t){Ds({type:_n.IncrementalSnapshot,data:o({source:Fn.Selection},t)})},customElementCb(t){Ds({type:_n.IncrementalSnapshot,data:o({source:Fn.CustomElement},t)})},blockClass:h,ignoreClass:c,ignoreSelector:d,maskTextClass:m,maskTextSelector:g,maskInputOptions:pt,inlineStylesheet:b,sampling:L,recordDOM:z,recordCanvas:Y,canvasMaskingConfigured:Tt,inlineImages:nt,userTriggeredOnInput:tt,collectFonts:rt,doc:t,maskInputFn:A,maskTextFn:E,maskAllElementAttributes:I,maskAttributeFn:T,keepIframeSrcFn:at,blockSelector:l,slimDOMOptions:yt,dataURLOptions:ft,mirror:Ws,iframeManager:Et,stylesheetManager:At,shadowDomManager:Ot,processedNodeManager:It,canvasManager:_s,ignoreCSSAttributes:ut,attributeFilter:lt,plugins:(null==st||null===(e=st.filter(t=>t.observer))||void 0===e?void 0:e.map(t=>({observer:t.observer,options:t.options,callback:e=>Ds({type:_n.Plugin,data:{plugin:t.name,payload:e}})})))||[]},O)};Et.addLoadListener(t=>{try{var e=Ws.getId(t),r=_t(t.contentDocument);if("function"==typeof r&&(Dt.push(r),-1!==e)){var i=St.get(e);i||St.set(e,i=new Set),i.add(r)}}catch(t){console.warn(t)}}),Et.addPageHideListener(t=>{var e=Ws.getId(t);null==gt||gt(e),rs(t)});var Lt=-1,Ft=t=>Ds({type:_n.Custom,data:{tag:Ln,payload:t}}),Pt=()=>{var t,e,r,i,n=document,s=null!==(t=null!==(e=null!==(r=null!==(i=n.fullscreenElement)&&void 0!==i?i:n.webkitFullscreenElement)&&void 0!==r?r:n.mozFullScreenElement)&&void 0!==e?e:n.msFullscreenElement)&&void 0!==t?t:null,o=s?Ws.getId(s):-1;o!==Lt&&(-1!==Lt&&Ft({id:Lt,enter:!1}),Lt=o,-1!==o&&Ft({id:o,enter:!0}))},Bt=()=>{Ns();var t=_t(document);"function"==typeof t&&Dt.push(t),Dt.push(tn("fullscreenchange",Pt)),Dt.push(tn("webkitfullscreenchange",Pt)),Dt.push(tn("mozfullscreenchange",Pt)),Dt.push(tn("MSFullscreenChange",Pt)),Bs=!0};return["interactive","complete"].includes(document.readyState)?Bt():(Dt.push(tn("DOMContentLoaded",()=>{Ds({type:_n.DomContentLoaded,data:{}}),"DOMContentLoaded"===K&&Bt()})),Dt.push(tn("load",()=>{Ds({type:_n.Load,data:{}}),"load"===K&&Bt()},window))),()=>{try{null==e||e.flush()}catch(t){}e=void 0,nn(Dt),It.destroy(),Et.removeLoadListener(),Et.destroy(),St.clear(),Ot.reset(),Ws.reset(),Bs=!1,zn=void 0}}catch(t){console.warn(t)}}zs.addCustomEvent=(t,e)=>{if(!Bs)throw new Error("please add custom event after start recording");Ds({type:_n.Custom,data:{tag:t,payload:e}})},zs.freezePage=()=>{Kn.forEach(t=>t.freeze())},zs.takeFullSnapshot=t=>{if(!Bs)throw new Error("please take full snapshot after start recording");Ns(t)},zs.mirror=Ws;var Vs=h({default:()=>$s});function $s(t){return{all:t=t||new Map,on(e,r){var i=t.get(e);i?i.push(r):t.set(e,[r])},off(e,r){var i=t.get(e);i&&(r?i.splice(i.indexOf(r)>>>0,1):t.set(e,[]))},emit(e,r){var i=t.get(e);i&&i.slice().map(function(t){t(r)}),(i=t.get("*"))&&i.slice().map(function(t){t(e,r)})}}}function Ys(t,e){if(void 0===t&&(t=window),void 0===e&&(e=document),!("scrollBehavior"in e.documentElement.style)||!0===t.__forceSmoothScrollPolyfill__){var r,i=t.HTMLElement||t.Element,n={scroll:t.scroll||t.scrollTo,scrollBy:t.scrollBy,elementScroll:i.prototype.scroll||a,scrollIntoView:i.prototype.scrollIntoView},s=t.performance&&t.performance.now?t.performance.now.bind(t.performance):Date.now,o=(r=t.navigator.userAgent,new RegExp(["MSIE ","Trident/","Edge/"].join("|")).test(r)?1:0);t.scroll=t.scrollTo=function(){void 0!==arguments[0]&&(!0!==h(arguments[0])?v.call(t,e.body,void 0!==arguments[0].left?~~arguments[0].left:t.scrollX||t.pageXOffset,void 0!==arguments[0].top?~~arguments[0].top:t.scrollY||t.pageYOffset):n.scroll.call(t,void 0!==arguments[0].left?arguments[0].left:"object"!=typeof arguments[0]?arguments[0]:t.scrollX||t.pageXOffset,void 0!==arguments[0].top?arguments[0].top:void 0!==arguments[1]?arguments[1]:t.scrollY||t.pageYOffset))},t.scrollBy=function(){void 0!==arguments[0]&&(h(arguments[0])?n.scrollBy.call(t,void 0!==arguments[0].left?arguments[0].left:"object"!=typeof arguments[0]?arguments[0]:0,void 0!==arguments[0].top?arguments[0].top:void 0!==arguments[1]?arguments[1]:0):v.call(t,e.body,~~arguments[0].left+(t.scrollX||t.pageXOffset),~~arguments[0].top+(t.scrollY||t.pageYOffset)))},i.prototype.scroll=i.prototype.scrollTo=function(){if(void 0!==arguments[0])if(!0!==h(arguments[0])){var t=arguments[0].left,e=arguments[0].top;v.call(this,this,void 0===t?this.scrollLeft:~~t,void 0===e?this.scrollTop:~~e)}else{if("number"==typeof arguments[0]&&void 0===arguments[1])throw new SyntaxError("Value could not be converted");n.elementScroll.call(this,void 0!==arguments[0].left?~~arguments[0].left:"object"!=typeof arguments[0]?~~arguments[0]:this.scrollLeft,void 0!==arguments[0].top?~~arguments[0].top:void 0!==arguments[1]?~~arguments[1]:this.scrollTop)}},i.prototype.scrollBy=function(){void 0!==arguments[0]&&(!0!==h(arguments[0])?this.scroll({left:~~arguments[0].left+this.scrollLeft,top:~~arguments[0].top+this.scrollTop,behavior:arguments[0].behavior}):n.elementScroll.call(this,void 0!==arguments[0].left?~~arguments[0].left+this.scrollLeft:~~arguments[0]+this.scrollLeft,void 0!==arguments[0].top?~~arguments[0].top+this.scrollTop:~~arguments[1]+this.scrollTop))},i.prototype.scrollIntoView=function(){if(!0!==h(arguments[0])){var r=function(t){for(;t!==e.body&&!1===f(t);)t=t.parentNode||t.host;return t}(this),i=r.getBoundingClientRect(),s=this.getBoundingClientRect();r!==e.body?(v.call(this,r,r.scrollLeft+s.left-i.left,r.scrollTop+s.top-i.top),"fixed"!==t.getComputedStyle(r).position&&t.scrollBy({left:i.left,top:i.top,behavior:"smooth"})):t.scrollBy({left:s.left,top:s.top,behavior:"smooth"})}else n.scrollIntoView.call(this,void 0===arguments[0]||arguments[0])}}function a(t,e){this.scrollLeft=t,this.scrollTop=e}function h(t){if(null===t||"object"!=typeof t||void 0===t.behavior||"auto"===t.behavior||"instant"===t.behavior)return!0;if("object"==typeof t&&"smooth"===t.behavior)return!1;throw new TypeError("behavior member of ScrollOptions "+t.behavior+" is not a valid value for enumeration ScrollBehavior.")}function u(t,e){return"Y"===e?t.scrollHeight>t.clientHeight+o:"X"===e?t.scrollWidth>t.clientWidth+o:void 0}function l(e,r){var i=t.getComputedStyle(e,null)["overflow"+r];return"auto"===i||"scroll"===i}function f(t){var e=u(t,"Y")&&l(t,"Y"),r=u(t,"X")&&l(t,"X");return e||r}function c(e){var r,i,n,o=(s()-e.startTime)/468;o=o>1?1:o,r=.5*(1-Math.cos(Math.PI*o)),e.method.call(e.scrollable,i=e.startX+(e.x-e.startX)*r,n=e.startY+(e.y-e.startY)*r),i===e.x&&n===e.y||t.requestAnimationFrame(c.bind(t,e))}function v(r,i,o){var h,u,l,f,v=s();r===e.body?(h=t,u=t.scrollX||t.pageXOffset,l=t.scrollY||t.pageYOffset,f=n.scroll):(h=r,u=r.scrollLeft,l=r.scrollTop,f=a),c({scrollable:h,method:f,startTime:v,startX:u,startY:l,x:i,y:o})}}var qs,Zs=class{constructor(t,e){void 0===t&&(t=[]),Ki(this,"timeOffset",0),Ki(this,"speed",void 0),Ki(this,"actions",void 0),Ki(this,"raf",null),Ki(this,"lastTimestamp",void 0),this.actions=t,this.speed=e.speed}addAction(t){var e=!0===this.raf;if(this.actions.length&&this.actions[this.actions.length-1].delay>t.delay){var r=this.findActionIndex(t);this.actions.splice(r,0,t)}else this.actions.push(t);e&&(this.raf=requestAnimationFrame(this.rafCheck.bind(this)))}start(){this.timeOffset=0,this.lastTimestamp=performance.now(),this.raf=requestAnimationFrame(this.rafCheck.bind(this))}rafCheck(){var t=performance.now();for(this.timeOffset+=(t-this.lastTimestamp)*this.speed,this.lastTimestamp=t;this.actions.length;){var e=this.actions[0];if(e.delay>this.timeOffset)break;this.actions.shift(),e.doAction()}this.raf=0>=this.actions.length||requestAnimationFrame(this.rafCheck.bind(this))}clear(){this.raf&&(!0!==this.raf&&cancelAnimationFrame(this.raf),this.raf=null),this.actions.length=0}setSpeed(t){this.speed=t}isActive(){return null!==this.raf}findActionIndex(t){for(var e=0,r=this.actions.length-1;r>=e;){var i=Math.floor((e+r)/2);if(t.delay>this.actions[i].delay)e=i+1;else{if(t.delay>=this.actions[i].delay)return i+1;r=i-1}}return e}};function Js(t){var e=null==t?void 0:t.timeOffset;return"number"!=typeof e||Number.isNaN(e)?void 0:e}function Xs(t){var e=t.positions;if(Array.isArray(e)&&e.length)return Js(e[0])}function Ks(t,e){if(t.type===_n.IncrementalSnapshot&&t.data.source===Fn.MouseMove){var r=Xs(t.data);if(void 0!==r){var i=t.timestamp+r;return t.delay=i-e,i-e}}return t.delay=t.timestamp-e,t.delay}function Qs(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var i,n,s=r.call(t),o=[];try{for(;(void 0===e||e-- >0)&&!(i=s.next()).done;)o.push(i.value)}catch(t){n={error:t}}finally{try{i&&!i.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}return o}!function(t){t[t.NotStarted=0]="NotStarted",t[t.Running=1]="Running",t[t.Stopped=2]="Stopped"}(qs||(qs={}));var to={type:"xstate.init"};function eo(t){return void 0===t?[]:[].concat(t)}function ro(t){return{type:"xstate.assign",assignment:t}}function io(t,e){return"string"==typeof(t="string"==typeof t&&e&&e[t]?e[t]:t)?{type:t}:"function"==typeof t?{type:t.name,exec:t}:t}function no(t){return function(e){return t===e}}function so(t){return"string"==typeof t?{type:t}:t}function oo(t,e){return{value:t,context:e,actions:[],changed:!1,matches:no(t)}}function ao(t,e,r){var i=e,n=!1;return[t.filter(function(t){if("xstate.assign"===t.type){n=!0;var e=Object.assign({},i);return"function"==typeof t.assignment?e=t.assignment(i,r):Object.keys(t.assignment).forEach(function(n){e[n]="function"==typeof t.assignment[n]?t.assignment[n](i,r):t.assignment[n]}),i=e,!1}return!0}),i,n]}function ho(t,e){void 0===e&&(e={});var r=Qs(ao(eo(t.states[t.initial].entry).map(function(t){return io(t,e.actions)}),t.context,to),2),i={config:t,it:e,initialState:{value:t.initial,actions:r[0],context:r[1],matches:no(t.initial)},transition(e,r){var n,s,o="string"==typeof e?{value:e,context:t.context}:e,a=o.value,h=o.context,u=so(r),l=t.states[a];if(l.on){var f=eo(l.on[u.type]);try{for(var c=function(t){var e="function"==typeof Symbol&&t[Symbol.iterator],r=0;return e?e.call(t):{next:()=>(t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t})}}(f),v=c.next();!v.done;v=c.next()){var d=v.value;if(void 0===d)return oo(a,h);var p="string"==typeof d?{target:d}:d,m=p.target,y=void 0===m?a:m,g=p.actions,w=void 0===g?[]:g,b=p.cond;if((void 0===b?function(){return!0}:b)(h,u)){var S=Qs(ao([].concat(l.exit,w,t.states[y].entry).filter(function(t){return t}).map(function(t){return io(t,i.it.actions)}),h,u),3),k=S[0];return{value:y,context:S[1],actions:k,changed:y!==a||k.length>0||S[2],matches:no(y)}}}}catch(t){n={error:t}}finally{try{v&&!v.done&&(s=c.return)&&s.call(c)}finally{if(n)throw n.error}}}return oo(a,h)}};return i}var uo=function(t,e){return t.actions.forEach(function(r){var i=r.exec;return i&&i(t.context,e)})};function lo(t){var e=t.initialState,r=qs.NotStarted,i=new Set,n={l:t,send(n){r===qs.Running&&(e=t.transition(e,n),uo(e,so(n)),i.forEach(function(t){return t(e)}))},subscribe:t=>(i.add(t),t(e),{unsubscribe:()=>i.delete(t)}),start(i){if(i){var s="object"==typeof i?i:{context:t.config.context,value:i};e={value:s.value,actions:[],context:s.context,matches:no(s.value)}}return r=qs.Running,uo(e,to),n},stop:()=>(r=qs.Stopped,i.clear(),n),get state(){return e},get status(){return r}};return n}function fo(t,e){for(var r=t.length-1;r>=0;r--){var i=t[r];if(i.type===_n.Meta&&e>=i.timestamp)return t.slice(r)}return t}var co=new Map;function vo(t,e){var r=co.get(t);return r||co.set(t,r=new Map),r.has(e)||r.set(e,[]),r.get(e)}function po(t,e,r){return function(){var i=n(function*(i){if(i&&"object"==typeof i&&"rr_type"in i){if(r&&(r.isUnchanged=!1),"ImageBitmap"===i.rr_type&&"args"in i){var n=yield po(t,e,r)(i.args);return yield createImageBitmap.apply(null,n)}if("index"in i){if(r||null===e)return i;var s=i.index;return vo(e,i.rr_type)[s]}if("args"in i){var o=i.args;return new(0,window[i.rr_type])(...yield Promise.all(o.map(po(t,e,r))))}if("base64"in i)return function(t){var e,r,i,n,s,o=.75*t.length,a=t.length,h=0;"="===t[t.length-1]&&(o--,"="===t[t.length-2]&&o--);var u=new ArrayBuffer(o),l=new Uint8Array(u);for(e=0;a>e;e+=4)r=ys[t.charCodeAt(e)],i=ys[t.charCodeAt(e+1)],n=ys[t.charCodeAt(e+2)],s=ys[t.charCodeAt(e+3)],l[h++]=r<<2|i>>4,l[h++]=(15&i)<<4|n>>2,l[h++]=(3&n)<<6|63&s;return u}(i.base64);if("src"in i){var a=t.get(i.src);if(a)return a;var h=new Image;return h.src=i.src,t.set(i.src,h),h}if("data"in i&&"Blob"===i.rr_type){var u=yield Promise.all(i.data.map(po(t,e,r)));return new Blob(u,{type:i.type})}}else if(Array.isArray(i))return yield Promise.all(i.map(po(t,e,r)));return i});return function(t){return i.apply(this,arguments)}}()}var mo=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject"];function yo(t){return go.apply(this,arguments)}function go(){return go=n(function*(t){var e=t.mutation,r=t.target,i=t.type,n=t.imageMap,s=t.errorHandler;try{var o=function(t,e){try{return e===jn.WebGL?t.getContext("webgl")||t.getContext("experimental-webgl"):t.getContext("webgl2")}catch(t){return null}}(r,i);if(!o)return;if(e.setter)return void(o[e.property]=e.args[0]);var a=o[e.property],h=yield Promise.all(e.args.map(po(n,o)));!function(t,e){if(null==e?void 0:e.constructor){var r=e.constructor.name;if(mo.includes(r)){var i=vo(t,r);i.includes(e)||i.push(e)}}}(o,a.apply(o,h))}catch(t){s(e,t)}}),go.apply(this,arguments)}function wo(){return wo=n(function*(t){var e=t.event,r=t.mutations,i=t.imageMap,s=t.errorHandler,o=t.target.getContext("2d");if(o){var a=r.map(function(){var t=n(function*(t){return Promise.all(t.args.map(po(i,o)))});return function(e){return t.apply(this,arguments)}}());(yield Promise.all(a)).forEach((t,n)=>{var a=r[n];try{if(a.setter)return void(o[a.property]=a.args[0]);var h=o[a.property];"drawImage"===a.property&&"string"==typeof a.args[0]?(i.get(e),h.apply(o,a.args)):h.apply(o,t)}catch(t){s(a,t)}})}else s(r[0],new Error("Canvas context is null"))}),wo.apply(this,arguments)}function bo(t){return So.apply(this,arguments)}function So(){return So=n(function*(t){var e=t.event,r=t.mutation,i=t.target,n=t.imageMap,s=t.canvasEventMap,o=t.errorHandler;try{var a=s.get(e)||r,h="commands"in a?a.commands:[a];if([jn.WebGL,jn.WebGL2].includes(r.type)){for(var u=0;h.length>u;u++){var l=h[u];yield yo({mutation:l,type:r.type,target:i,imageMap:n,errorHandler:o})}return}yield function(t){return wo.apply(this,arguments)}({event:e,mutations:h,target:i,imageMap:n,errorHandler:o})}catch(t){o(r,t)}}),So.apply(this,arguments)}var ko=["AUDIO","VIDEO"],Co=class{constructor(t){Ki(this,"mediaMap",new Map),Ki(this,"warn",void 0),Ki(this,"service",void 0),Ki(this,"speedService",void 0),Ki(this,"emitter",void 0),Ki(this,"getCurrentTime",void 0),Ki(this,"metadataCallbackMap",new Map),this.warn=t.warn,this.service=t.service,this.speedService=t.speedService,this.emitter=t.emitter,this.getCurrentTime=t.getCurrentTime,this.emitter.on(Wn.Start,this.start.bind(this)),this.emitter.on(Wn.SkipStart,this.start.bind(this)),this.emitter.on(Wn.Pause,this.pause.bind(this)),this.emitter.on(Wn.Finish,this.pause.bind(this)),this.speedService.subscribe(()=>{this.syncAllMediaElements()})}syncAllMediaElements(t){void 0===t&&(t={pause:!1}),this.mediaMap.forEach((e,r)=>{this.syncTargetWithState(r),t.pause&&r.pause()})}start(){this.syncAllMediaElements()}pause(){this.syncAllMediaElements({pause:!0})}seekTo(t){var e=t.target,r=t.mediaState;if(r.isPlaying){var i=(t.time-r.lastInteractionTimeOffset)/1e3*r.playbackRate,n="duration"in e&&e.duration;if(Number.isNaN(n))return void this.waitForMetadata(e);var s=r.currentTimeAtLastInteraction+i;e.loop&&!1!==n&&(s%=n),e.currentTime=s}else e.pause(),e.currentTime=r.currentTimeAtLastInteraction}waitForMetadata(t){if(!this.metadataCallbackMap.has(t)&&"addEventListener"in t){var e=()=>{this.metadataCallbackMap.delete(t);var e=this.mediaMap.get(t);e&&this.seekTo({time:this.getCurrentTime(),target:t,mediaState:e})};this.metadataCallbackMap.set(t,e),t.addEventListener("loadedmetadata",e,{once:!0})}}getMediaStateFromMutation(t){var e,r,i,n,s,o=t.target,a=t.timeOffset,h=t.mutation,u=this.mediaMap.get(o),l=h.type,f=h.playbackRate,c=h.currentTime,v=h.muted,d=h.volume,p=h.loop;return{isPlaying:l===Un.Play||l!==Un.Pause&&((null==u?void 0:u.isPlaying)||null!==o.getAttribute("autoplay")),currentTimeAtLastInteraction:null!==(e=null!=c?c:null==u?void 0:u.currentTimeAtLastInteraction)&&void 0!==e?e:0,lastInteractionTimeOffset:a,playbackRate:null!==(r=null!=f?f:null==u?void 0:u.playbackRate)&&void 0!==r?r:1,volume:null!==(i=null!=d?d:null==u?void 0:u.volume)&&void 0!==i?i:1,muted:null!==(n=null!=v?v:null==u?void 0:u.muted)&&void 0!==n?n:null===o.getAttribute("muted"),loop:null!==(s=null!=p?p:null==u?void 0:u.loop)&&void 0!==s?s:null===o.getAttribute("loop")}}syncTargetWithState(t){var e=this.mediaMap.get(t);if(e){var r=e.muted,i=e.loop,n=e.volume,s=e.isPlaying,o=this.service.state.matches("paused"),a=e.playbackRate*this.speedService.state.context.timer.speed;try{this.seekTo({time:this.getCurrentTime(),target:t,mediaState:e}),t.volume!==n&&(t.volume=n),t.muted=r,t.loop=i,t.playbackRate!==a&&(t.playbackRate=a),s&&!o?t.play():t.pause()}catch(t){this.warn("Failed to replay media interactions: "+(t.message||t))}}}addMediaElements(t,e,r){if(this.isSupportedMediaElement(t)){var i=t,n=r.getMeta(i);if(n&&"attributes"in n){var s,o=this.service.state.matches("paused"),a=n.attributes;(s=a.rr_mediaState?"played"===a.rr_mediaState:null!==i.getAttribute("autoplay"))&&o&&i.pause();var h=1;"number"==typeof a.rr_mediaPlaybackRate&&(h=a.rr_mediaPlaybackRate);var u;u="boolean"==typeof a.rr_mediaMuted?a.rr_mediaMuted:null!==i.getAttribute("muted");var l;l="boolean"==typeof a.rr_mediaLoop?a.rr_mediaLoop:null!==i.getAttribute("loop");var f=1;"number"==typeof a.rr_mediaVolume&&(f=a.rr_mediaVolume);var c=0;"number"==typeof a.rr_mediaCurrentTime&&(c=a.rr_mediaCurrentTime),this.mediaMap.set(i,{isPlaying:s,currentTimeAtLastInteraction:c,lastInteractionTimeOffset:e,playbackRate:h,volume:f,muted:u,loop:l}),this.syncTargetWithState(i)}}}mediaMutation(t){var e=t.target,r=t.timeOffset,i=t.mutation;ko.includes(e.nodeName)&&(this.mediaMap.set(e,this.getMediaStateFromMutation({target:e,timeOffset:r,mutation:i})),this.syncTargetWithState(e))}isSupportedMediaElement(t){return ko.includes(t.nodeName)}reset(){this.mediaMap.clear()}};function Mo(t,e){if(!("DIALOG"!==t.nodeName||t instanceof ei)){var r=t,i=r.open,n=i&&r.matches("dialog:modal"),s=r.getAttribute("rr_open_mode"),o="string"==typeof(null==e?void 0:e.attributes.open)||"string"==typeof r.getAttribute("open"),a="modal"===s;(!i||n&&"non-modal"===s||!n&&a)&&(r.isConnected?(i&&r.close(),o&&(a?r.showModal():r.show())):console.warn("dialog is not attached to the dom",r))}}var xo=$s||Vs,Ao="[replayer]",Eo={duration:500,lineCap:"round",lineWidth:3,strokeStyle:"red"};function Ro(t){return t.type==_n.IncrementalSnapshot&&(t.data.source==Fn.TouchMove||t.data.source==Fn.MouseInteraction&&t.data.type==Pn.TouchStart)}var Io=class{get timer(){return this.service.state.context.timer}constructor(t,e){var r=this;if(Ki(this,"wrapper",void 0),Ki(this,"iframe",void 0),Ki(this,"service",void 0),Ki(this,"speedService",void 0),Ki(this,"config",void 0),Ki(this,"usingVirtualDom",!1),Ki(this,"virtualDom",new Mi),Ki(this,"mouse",void 0),Ki(this,"mouseTail",null),Ki(this,"tailPositions",[]),Ki(this,"emitter",xo()),Ki(this,"nextUserInteractionEvent",void 0),Ki(this,"legacy_missingNodeRetryMap",{}),Ki(this,"cache",Ce()),Ki(this,"imageMap",new Map),Ki(this,"canvasEventMap",new Map),Ki(this,"mirror",yt()),Ki(this,"styleMirror",new In),Ki(this,"pendingAdoptedStyleSheets",new Map),Ki(this,"lastAdoptedStyleIds",new Map),Ki(this,"adoptedStyleSheetTokens",new Map),Ki(this,"mediaManager",void 0),Ki(this,"firstFullSnapshot",null),Ki(this,"newDocumentQueue",[]),Ki(this,"mousePos",null),Ki(this,"touchActive",null),Ki(this,"lastMouseDownEvent",null),Ki(this,"lastHoveredRootNode",void 0),Ki(this,"lastSelectionData",null),Ki(this,"lastScrollMap",new Map),Ki(this,"constructedStyleMutations",[]),Ki(this,"adoptedStyleSheets",[]),Ki(this,"emitterHandlers",[]),Ki(this,"serviceSubscription",void 0),Ki(this,"speedServiceSubscription",void 0),Ki(this,"timeouts",new Set),Ki(this,"applyGeneration",0),Ki(this,"seekRebuildInFlight",!1),Ki(this,"styleSheetLoadListeners",new Map),Ki(this,"handleResize",t=>{for(var e of(this.iframe.style.display="inherit",[this.mouseTail,this.iframe]))e&&(e.setAttribute("width",String(t.width)),e.setAttribute("height",String(t.height)))}),Ki(this,"shouldCastInSyncMode",t=>{switch(t.type){case _n.DomContentLoaded:case _n.Load:return!1;case _n.Custom:return t.data.tag===Ln;default:return!0}}),Ki(this,"applyEvents",(t,e)=>{var r,i=++this.applyGeneration;this.seekRebuildInFlight=!0,this.discardStaleFlushBuffers(),function(t){var e,r=t.events,i=t.castEvent,n=t.yieldBudgetMs,s=t.schedule,o=t.isCancelled,a=t.onComplete,h=null!==(e=t.now)&&void 0!==e?e:()=>performance.now(),u=0,l=t=>{if(t||!o()){var e=(()=>{for(var t=n>0?h()+n:1/0;r.length>u;){if(i(r[u]),u++,o())return!1;if(h()>=t)break}return u>=r.length})();o()||(e?a(t):s(()=>l(!1)))}};l(!0)}({events:t.filter(this.shouldCastInSyncMode),castEvent:t=>this.getCastFn(t,!0)(),yieldBudgetMs:null!==(r=this.config.seekYieldBudgetMs)&&void 0!==r?r:0,schedule:t=>{this.addTimeout(t,0)},isCancelled:()=>i!==this.applyGeneration,onComplete:t=>{this.seekRebuildInFlight=!1,this.emitter.emit(Wn.Flush),t||this.service.state.matches("playing")?e():this.service.state.matches("paused")&&(this.timer.clear(),this.timer.timeOffset=0)}})}),Ki(this,"getCastFn",function(t,e){var i;switch(void 0===e&&(e=!1),t.type){case _n.DomContentLoaded:case _n.Load:break;case _n.Custom:i=()=>{e||r.emitter.emit(Wn.CustomEvent,t),"rrweb/fullscreen"===t.data.tag&&r.applyFullscreen(t.data.payload)};break;case _n.Meta:i=()=>r.emitter.emit(Wn.Resize,{width:t.data.width,height:t.data.height});break;case _n.FullSnapshot:i=()=>{var i;if(r.clearFullscreen(),r.firstFullSnapshot){if(r.firstFullSnapshot===t)return void(r.firstFullSnapshot=!0)}else r.firstFullSnapshot=!0;r.mediaManager.reset(),r.styleMirror.reset(),r.pendingAdoptedStyleSheets.clear(),r.lastAdoptedStyleIds.clear(),r.adoptedStyleSheetTokens.clear(),r.rebuildFullSnapshot(t,e),null===(i=r.iframe.contentWindow)||void 0===i||i.scrollTo(o({},t.data.initialOffset,{behavior:"instant"}))};break;case _n.IncrementalSnapshot:i=()=>{if(r.applyIncremental(t,e),!e&&(t===r.nextUserInteractionEvent&&(r.nextUserInteractionEvent=null,r.backToNormal()),r.config.skipInactive&&!r.nextUserInteractionEvent)){for(var i of r.service.state.context.events)if(i.timestamp>t.timestamp&&r.isUserInteraction(i)){i.delay-t.delay>r.config.inactivePeriodThreshold*r.speedService.state.context.timer.speed&&(r.nextUserInteractionEvent=i);break}if(r.nextUserInteractionEvent){var n={speed:Math.min(Math.round((r.nextUserInteractionEvent.delay-t.delay)/5e3),r.config.maxSpeed)};r.speedService.send({type:"FAST_FORWARD",payload:n}),r.emitter.emit(Wn.SkipStart,n)}}}}return()=>{for(var n of(i&&i(),r.config.plugins||[]))n.handler&&n.handler(t,e,{replayer:r});r.service.send({type:"CAST_EVENT",payload:{event:t}});var s=r.service.state.context.events.length-1;if(!r.config.liveMode&&t===r.service.state.context.events[s]){var o=r.applyGeneration,a=()=>{o===r.applyGeneration&&(r.seekRebuildInFlight?r.addTimeout(a,50):r.service.state.context.events.length-1>s||(r.backToNormal(),r.service.send("END"),r.emitter.emit(Wn.Finish)))},h=50;if(t.type===_n.IncrementalSnapshot&&t.data.source===Fn.MouseMove){var u=Xs(t.data);void 0!==u&&(h+=Math.max(0,-u))}setTimeout(a,h)}r.emitter.emit(Wn.EventCast,t)}}),!(null==e?void 0:e.liveMode)&&2>t.length)throw new Error("Replayer need at least 2 events.");var i={speed:1,maxSpeed:360,root:document.body,loadTimeout:0,skipInactive:!1,inactivePeriodThreshold:1e4,showWarning:!0,showDebug:!1,blockClass:"rr-block",liveMode:!1,insertStyleRules:[],triggerFocus:!0,UNSAFE_replayCanvas:!1,pauseAnimation:!0,mouseTail:Eo,useVirtualDom:!0,seekYieldBudgetMs:0,logger:console};for(var n of(this.config=Object.assign({},i,e),this.handleResize=this.handleResize.bind(this),this.getCastFn=this.getCastFn.bind(this),this.applyEvents=this.applyEvents.bind(this),this.addEmitterHandler(Wn.Resize,this.handleResize),this.setupDom(),this.config.plugins||[]))n.getMirror&&n.getMirror({nodeMirror:this.mirror});this.addEmitterHandler(Wn.Flush,()=>{if(this.usingVirtualDom){var t={mirror:this.mirror,applyCanvas:(t,e,r)=>{bo({event:t,mutation:e,target:r,imageMap:this.imageMap,canvasEventMap:this.canvasEventMap,errorHandler:this.warnCanvasMutationFailed.bind(this)})},applyInput:this.applyInput.bind(this),applyScroll:this.applyScroll.bind(this),applyStyleSheetMutation:(t,e)=>{t.source===Fn.StyleSheetRule?this.applyStyleSheetRule(t,e):t.source===Fn.StyleDeclaration&&this.applyStyleDeclaration(t,e)},afterAppend:(t,e)=>{for(var r of this.config.plugins||[])r.onBuild&&r.onBuild(t,{id:e,replayer:this})}};if(this.iframe.contentDocument)try{gi(this.iframe.contentDocument,this.virtualDom,t,this.virtualDom.mirror)}catch(t){this.warn(t)}if(this.virtualDom.destroyTree(),this.usingVirtualDom=!1,Object.keys(this.legacy_missingNodeRetryMap).length)for(var e in this.legacy_missingNodeRetryMap)try{var r=this.legacy_missingNodeRetryMap[e],i=Si(r.node,this.mirror,this.virtualDom.mirror);gi(i,r.node,t,this.virtualDom.mirror),r.node=i}catch(t){this.warn(t)}this.constructedStyleMutations.forEach(t=>{this.applyStyleSheetMutation(t)}),this.constructedStyleMutations=[],this.adoptedStyleSheets.forEach(t=>{this.applyAdoptedStyleSheet(t)}),this.adoptedStyleSheets=[],this.pendingAdoptedStyleSheets.forEach((t,e)=>{this.applyAdoptedStyleSheet({source:Fn.AdoptedStyleSheet,id:e,styleIds:t})})}if(this.mousePos&&(this.moveAndHover(this.mousePos.x,this.mousePos.y,this.mousePos.id,!0,this.mousePos.debugData),this.mousePos=null),!0===this.touchActive?this.mouse.classList.add("touch-active"):!1===this.touchActive&&this.mouse.classList.remove("touch-active"),this.touchActive=null,this.lastMouseDownEvent){var n=this.lastMouseDownEvent;n[0].dispatchEvent(n[1])}this.lastMouseDownEvent=null,this.lastSelectionData&&(this.applySelection(this.lastSelectionData),this.lastSelectionData=null),this.lastScrollMap.size&&(this.lastScrollMap.forEach(t=>{this.applyScroll(t,!0)}),this.lastScrollMap.clear())}),this.addEmitterHandler(Wn.PlayBack,()=>{this.firstFullSnapshot=null,this.mirror.reset(),this.styleMirror.reset(),this.pendingAdoptedStyleSheets.clear(),this.lastAdoptedStyleIds.clear(),this.adoptedStyleSheetTokens.clear(),this.mediaManager.reset(),this.lastScrollMap.clear()});var s,a,h,u,l,f=new Zs([],{speed:this.config.speed});this.service=(s={events:t.map(t=>e&&e.unpackFn?e.unpackFn(t):t).sort((t,e)=>t.timestamp-e.timestamp),timer:f,timeOffset:0,baselineTime:0,lastPlayedEvent:null},h=(a={getCastFn:this.getCastFn,applyEvents:this.applyEvents,emitter:this.emitter}).getCastFn,u=a.applyEvents,l=a.emitter,lo(ho({id:"player",context:s,initial:"paused",states:{playing:{on:{PAUSE:{target:"paused",actions:["pause"]},CAST_EVENT:{target:"playing",actions:"castEvent"},END:{target:"paused",actions:["resetLastPlayedEvent","pause"]},RESET_LAST_PLAYED:{target:"playing",actions:["resetLastPlayedEvent"]},ADD_EVENT:{target:"playing",actions:["addEvent"]}}},paused:{on:{PLAY:{target:"playing",actions:["recordTimeOffset","play"]},RESET_LAST_PLAYED:{target:"paused",actions:["resetLastPlayedEvent"]},CAST_EVENT:{target:"paused",actions:"castEvent"},TO_LIVE:{target:"live",actions:["startLive"]},ADD_EVENT:{target:"paused",actions:["addEvent"]}}},live:{on:{ADD_EVENT:{target:"live",actions:["addEvent"]},CAST_EVENT:{target:"live",actions:["castEvent"]}}}}},{actions:{castEvent:ro({lastPlayedEvent:(t,e)=>"CAST_EVENT"===e.type?e.payload.event:t.lastPlayedEvent}),recordTimeOffset:ro((t,e)=>{var r=t.timeOffset;return"payload"in e&&"timeOffset"in e.payload&&(r=e.payload.timeOffset),o({},t,{timeOffset:r,baselineTime:t.events[0].timestamp+r})}),play(t){var e=t.timer,r=t.events,i=t.baselineTime,n=t.lastPlayedEvent;for(var s of(e.clear(),e.timeOffset=0,r))Ks(s,i);var o=fo(r,i),a=o.some(t=>t.type===_n.FullSnapshot&&t.timestamp===i),f=null==n?void 0:n.timestamp;if((null==n?void 0:n.type)===_n.IncrementalSnapshot&&n.data.source===Fn.MouseMove){var c=Xs(n.data);void 0!==c&&(f=n.timestamp+c)}(f||0)>i&&l.emit(Wn.PlayBack);var v=new Array;for(var d of o)(!f||f>=i||d.timestamp>f&&d!==n)&&(i>d.timestamp||a&&d.timestamp===i&&(d.type===_n.Meta||d.type===_n.FullSnapshot))&&v.push(d);u(v,()=>{var r=function(){if(i>s.timestamp||a&&s.timestamp===i&&(s.type===_n.Meta||s.type===_n.FullSnapshot))return 0;if(f&&i>f&&s===n)return 0;var t=h(s,!1);e.addAction({doAction(){t()},delay:s.delay})};for(var s of fo(t.events,i))r();e.start()})},pause(t){t.timer.clear()},resetLastPlayedEvent:ro(t=>o({},t,{lastPlayedEvent:null})),startLive:ro({baselineTime:(t,e)=>(t.timer.start(),"TO_LIVE"===e.type&&e.payload.baselineTime?e.payload.baselineTime:Date.now())}),addEvent:ro((t,e)=>{var r=t.baselineTime,i=t.timer,n=t.events;if("ADD_EVENT"===e.type){var s=e.payload.event;Ks(s,r);var a=n.length-1;if(n[a]&&n[a].timestamp>s.timestamp){for(var u=-1,l=0;a>=l;){var f=Math.floor((l+a)/2);n[f].timestamp>s.timestamp?a=f-1:l=f+1}-1===u&&(u=l),n.splice(u,0,s)}else n.push(s);if(r>s.timestamp)e.payload.applyPastEventSynchronously&&h(s,!0)();else if(i.isActive()){var c=h(s,!1);i.addAction({doAction(){c()},delay:s.delay})}}return o({},t,{events:n})})}}))),this.service.start(),this.serviceSubscription=this.service.subscribe(t=>{this.emitter.emit(Wn.StateChange,{player:t})}),this.speedService=function(t){return lo(ho({id:"speed",context:t,initial:"normal",states:{normal:{on:{FAST_FORWARD:{target:"skipping",actions:["recordSpeed","setSpeed"]},SET_SPEED:{target:"normal",actions:["setSpeed"]}}},skipping:{on:{BACK_TO_NORMAL:{target:"normal",actions:["restoreSpeed"]},SET_SPEED:{target:"normal",actions:["setSpeed"]}}}}},{actions:{setSpeed(t,e){"payload"in e&&t.timer.setSpeed(e.payload.speed)},recordSpeed:ro({normalSpeed(t){return t.timer.speed}}),restoreSpeed(t){t.timer.setSpeed(t.normalSpeed)}}}))}({normalSpeed:-1,timer:f}),this.speedService.start(),this.speedServiceSubscription=this.speedService.subscribe(t=>{this.emitter.emit(Wn.StateChange,{speed:t})}),this.mediaManager=new Co({warn:this.warn.bind(this),service:this.service,speedService:this.speedService,emitter:this.emitter,getCurrentTime:this.getCurrentTime.bind(this)});var c=this.service.state.context.events.find(t=>t.type===_n.Meta),v=this.service.state.context.events.find(t=>t.type===_n.FullSnapshot);if(c){var d=c.data,p=d.width,m=d.height;this.addTimeout(()=>{this.emitter.emit(Wn.Resize,{width:p,height:m})},0)}v&&this.addTimeout(()=>{var t;this.firstFullSnapshot||(this.firstFullSnapshot=v,this.rebuildFullSnapshot(v),null===(t=this.iframe.contentWindow)||void 0===t||t.scrollTo(o({},v.data.initialOffset,{behavior:"instant"})))},1),this.service.state.context.events.find(Ro)&&this.mouse.classList.add("touch-device")}on(t,e){return this.emitter.on(t,e),this}off(t,e){return this.emitter.off(t,e),this}addEmitterHandler(t,e){this.emitter.on(t,e),this.emitterHandlers.push({event:t,handler:e})}addTimeout(t,e){var r=setTimeout(()=>{this.timeouts.delete(r),t()},e);return this.timeouts.add(r),r}setConfig(t){Object.keys(t).forEach(e=>{this.config[e]=t[e]}),this.config.skipInactive||this.backToNormal(),void 0!==t.speed&&this.speedService.send({type:"SET_SPEED",payload:{speed:t.speed}}),void 0!==t.mouseTail&&(!1===t.mouseTail?this.mouseTail&&(this.mouseTail.style.display="none"):(this.mouseTail||(this.mouseTail=document.createElement("canvas"),this.mouseTail.width=Number.parseFloat(this.iframe.width),this.mouseTail.height=Number.parseFloat(this.iframe.height),this.mouseTail.classList.add("replayer-mouse-tail"),this.wrapper.insertBefore(this.mouseTail,this.iframe)),this.mouseTail.style.display="inherit"))}getMetaData(){var t=this.service.state.context.events[0],e=this.service.state.context.events[this.service.state.context.events.length-1];return{startTime:t.timestamp,endTime:e.timestamp,totalTime:e.timestamp-t.timestamp}}getCurrentTime(){return this.timer.timeOffset+this.getTimeOffset()}getTimeOffset(){var t=this.service.state.context;return t.baselineTime-t.events[0].timestamp}getMirror(){return this.mirror}play(t){var e;void 0===t&&(t=0),this.seekRebuildInFlight&&this.service.send({type:"RESET_LAST_PLAYED"}),this.service.state.matches("paused")||this.service.send({type:"PAUSE"}),this.service.send({type:"PLAY",payload:{timeOffset:t}}),null===(e=this.iframe.contentDocument)||void 0===e||null===(e=e.getElementsByTagName("html")[0])||void 0===e||e.classList.remove("rrweb-paused"),this.emitter.emit(Wn.Start)}pause(t){var e;void 0===t&&this.service.state.matches("playing")&&this.service.send({type:"PAUSE"}),"number"==typeof t&&(this.play(t),this.service.send({type:"PAUSE"})),null===(e=this.iframe.contentDocument)||void 0===e||null===(e=e.getElementsByTagName("html")[0])||void 0===e||e.classList.add("rrweb-paused"),this.emitter.emit(Wn.Pause)}resume(t){void 0===t&&(t=0),this.warn("The 'resume' was deprecated in 1.0. Please use 'play' method which has the same interface."),this.play(t),this.emitter.emit(Wn.Resume)}destroy(){var t,e;this.wrapper&&this.wrapper.parentNode&&(this.pause(),this.emitterHandlers.forEach(t=>{this.emitter.off(t.event,t.handler)}),this.emitterHandlers=[],null===(t=this.serviceSubscription)||void 0===t||t.unsubscribe(),null===(e=this.speedServiceSubscription)||void 0===e||e.unsubscribe(),this.serviceSubscription=void 0,this.speedServiceSubscription=void 0,this.service.stop(),this.speedService.stop(),this.timeouts.forEach(t=>clearTimeout(t)),this.timeouts.clear(),this.styleSheetLoadListeners.forEach((t,e)=>{e.removeEventListener("load",t)}),this.styleSheetLoadListeners.clear(),this.imageMap.clear(),this.canvasEventMap.clear(),this.mirror.reset(),this.styleMirror.reset(),this.pendingAdoptedStyleSheets.clear(),this.lastAdoptedStyleIds.clear(),this.adoptedStyleSheetTokens.clear(),this.mediaManager.reset(),this.resetCache(),this.config.root.removeChild(this.wrapper),this.emitter.emit(Wn.Destroy))}startLive(t){this.applyGeneration++,this.seekRebuildInFlight&&(this.seekRebuildInFlight=!1,this.emitter.emit(Wn.Flush),this.service.send({type:"RESET_LAST_PLAYED"}),this.service.state.matches("playing")&&this.service.send({type:"PAUSE"})),this.service.send({type:"TO_LIVE",payload:{baselineTime:t}})}addEvent(t){var e=this.config.unpackFn?this.config.unpackFn(t):t;Ro(e)&&this.mouse.classList.add("touch-device"),Promise.resolve().then(()=>this.service.send({type:"ADD_EVENT",payload:{event:e,applyPastEventSynchronously:this.config.liveMode}}))}enableInteract(){this.iframe.setAttribute("scrolling","auto"),this.iframe.style.pointerEvents="auto"}disableInteract(){this.iframe.setAttribute("scrolling","no"),this.iframe.style.pointerEvents="none"}resetCache(){this.cache=Ce()}setupDom(){this.wrapper=document.createElement("div"),this.wrapper.classList.add("replayer-wrapper"),this.config.root.appendChild(this.wrapper),this.mouse=document.createElement("div"),this.mouse.classList.add("replayer-mouse"),this.wrapper.appendChild(this.mouse),!1!==this.config.mouseTail&&(this.mouseTail=document.createElement("canvas"),this.mouseTail.classList.add("replayer-mouse-tail"),this.mouseTail.style.display="inherit",this.wrapper.appendChild(this.mouseTail)),this.iframe=document.createElement("iframe");var t=["allow-same-origin"];this.config.UNSAFE_replayCanvas&&t.push("allow-scripts"),this.iframe.style.display="none",this.iframe.setAttribute("sandbox",t.join(" ")),this.disableInteract(),this.wrapper.appendChild(this.iframe),this.iframe.contentWindow&&this.iframe.contentDocument&&(Ys(this.iframe.contentWindow,this.iframe.contentDocument),wn(this.iframe.contentWindow))}applyFullscreen(t){var e=t;if(e&&"number"==typeof e.id&&"boolean"==typeof e.enter){var r=this.mirror.getNode(e.id);if(r&&r.nodeType===Node.ELEMENT_NODE){var i=r;e.enter?i.setAttribute("rr_fullscreen",""):i.removeAttribute("rr_fullscreen")}}}clearFullscreen(){var t;null===(t=this.iframe.contentDocument)||void 0===t||t.querySelectorAll("[rr_fullscreen]").forEach(t=>t.removeAttribute("rr_fullscreen"))}discardStaleFlushBuffers(){this.lastScrollMap.clear(),this.mousePos=null,this.touchActive=null,this.lastMouseDownEvent=null,this.lastSelectionData=null,this.constructedStyleMutations=[],this.adoptedStyleSheets=[]}rebuildFullSnapshot(t,e){var r=this;if(void 0===e&&(e=!1),!this.iframe.contentDocument)return this.warn("Looks like your replayer has been destroyed.");Object.keys(this.legacy_missingNodeRetryMap).length&&this.warn("Found unresolved missing node map",this.legacy_missingNodeRetryMap),this.legacy_missingNodeRetryMap={};var i=[],n=new Set,s=(e,r)=>{for(var s of("DIALOG"===e.nodeName&&n.add(e),this.collectIframeAndAttachDocument(i,e),this.mediaManager.isSupportedMediaElement(e)&&this.mediaManager.addMediaElements(e,t.timestamp-this.service.state.context.events[0].timestamp,this.mirror),this.config.plugins||[]))s.onBuild&&s.onBuild(e,{id:r,replayer:this})};this.usingVirtualDom&&(this.virtualDom.destroyTree(),this.usingVirtualDom=!1),this.mirror.reset(),function(t,e){var r=e.doc,i=e.onVisit,n=e.hackCss,s=void 0===n||n,o=e.afterAppend,a=e.cache,h=e.mirror,l=void 0===h?new mt:h,f=Ee(t,{doc:r,mirror:l,skipChild:!1,hackCss:s,afterAppend:o,cache:a});(function(t,e){function r(t){e(t)}for(var i of t.getIds())t.has(i)&&r(t.getNode(i))})(l,t=>{i&&i(t),function(t,e){var r=e.getMeta(t);if((null==r?void 0:r.type)===u.Element){var i=t;for(var n in r.attributes)if({}.hasOwnProperty.call(r.attributes,n)&&n.startsWith("rr_")){var s=r.attributes[n];"rr_scrollLeft"===n&&(i.scrollLeft=s),"rr_scrollTop"===n&&(i.scrollTop=s)}}}(t,l)})}(t.data.node,{doc:this.iframe.contentDocument,afterAppend:s,cache:this.cache,mirror:this.mirror}),s(this.iframe.contentDocument,t.data.node.id);var o=function(){var t=a.mutationInQueue;r.attachDocumentToIframe(t,a.builtNode),r.newDocumentQueue=r.newDocumentQueue.filter(e=>e!==t)};for(var a of i)o();var h=this.iframe.contentDocument;this.insertStyleRules(h.documentElement,h.head),n.forEach(t=>Mo(t)),this.service.state.matches("playing")||this.iframe.contentDocument.getElementsByTagName("html")[0].classList.add("rrweb-paused"),this.emitter.emit(Wn.FullsnapshotRebuilded,t),e||this.waitForStylesheetLoad(),this.config.UNSAFE_replayCanvas&&this.preloadAllImages()}insertStyleRules(t,e){var r,i=(r=this.config.blockClass,["."+r+" { background: currentColor }","noscript { display: none !important; }","[rr_fullscreen] { position: fixed !important; inset: 0 !important; width: 100% !important; height: 100% !important; margin: 0 !important; max-width: none !important; max-height: none !important; z-index: 2147483647 !important; }"]).concat(this.config.insertStyleRules);if(this.config.pauseAnimation&&i.push("html.rrweb-paused *, html.rrweb-paused *:before, html.rrweb-paused *:after { animation-play-state: paused !important; }"),this.usingVirtualDom){var n=this.virtualDom.createElement("style");this.virtualDom.mirror.add(n,Pi(n,this.virtualDom.unserializedId)),t.insertBefore(n,e),n.rules.push({source:Fn.StyleSheetRule,adds:i.map((t,e)=>({rule:t,index:e}))})}else{var s=document.createElement("style");t.insertBefore(s,e);for(var o=0;i.length>o;o++){var a;null===(a=s.sheet)||void 0===a||a.insertRule(i[o],o)}}}attachDocumentToIframe(t,e){var r=this,i=this.usingVirtualDom?this.virtualDom.mirror:this.mirror,n=[],s=new Set,o=(t,r)=>{"DIALOG"===t.nodeName&&s.add(t),this.collectIframeAndAttachDocument(n,t);var o=i.getMeta(t);if((null==o?void 0:o.type)===Hn.Element&&"HTML"===(null==o?void 0:o.tagName.toUpperCase())){var a=e.contentDocument;this.insertStyleRules(a.documentElement,a.head)}if(!this.usingVirtualDom)for(var h of this.config.plugins||[])h.onBuild&&h.onBuild(t,{id:r,replayer:this})};Ee(t.node,{doc:e.contentDocument,mirror:i,hackCss:!0,skipChild:!1,afterAppend:o,cache:this.cache}),o(e.contentDocument,t.node.id);var a=function(){var t=h.mutationInQueue;r.attachDocumentToIframe(t,h.builtNode),r.newDocumentQueue=r.newDocumentQueue.filter(e=>e!==t)};for(var h of n)a();s.forEach(t=>Mo(t))}collectIframeAndAttachDocument(t,e){if(kn(e,this.mirror)){var r=this.newDocumentQueue.find(t=>t.parentId===this.mirror.getId(e));r&&t.push({mutationInQueue:r,builtNode:e})}}waitForStylesheetLoad(){var t,e=null===(t=this.iframe.contentDocument)||void 0===t?void 0:t.head;if(e){var r,i=new Set,n=this.service.state,s=()=>{n=this.service.state};this.emitter.on(Wn.Start,s),this.emitter.on(Wn.Pause,s);var o=()=>{this.emitter.off(Wn.Start,s),this.emitter.off(Wn.Pause,s)};e.querySelectorAll('link[rel="stylesheet"]').forEach(t=>{t.sheet||(i.add(t),t.addEventListener("load",()=>{i.delete(t),0===i.size&&-1!==r&&(n.matches("playing")&&this.play(this.getCurrentTime()),this.emitter.emit(Wn.LoadStylesheetEnd),r&&clearTimeout(r),o())}))}),i.size>0&&(this.service.send({type:"PAUSE"}),this.emitter.emit(Wn.LoadStylesheetStart),r=setTimeout(()=>{n.matches("playing")&&this.play(this.getCurrentTime()),r=-1,o()},this.config.loadTimeout))}}preloadAllImages(){var t=this;return n(function*(){var e=[],r=function*(r){r.type===_n.IncrementalSnapshot&&r.data.source===Fn.CanvasMutation&&(e.push(t.deserializeAndPreloadCanvasEvents(r.data,r)),("commands"in r.data?r.data.commands:[r.data]).forEach(e=>{t.preloadImages(e,r)}))};for(var i of t.service.state.context.events)yield*r(i);return Promise.all(e)})()}preloadImages(t,e){if("drawImage"===t.property&&"string"==typeof t.args[0]&&!this.imageMap.has(e)){var r=document.createElement("canvas"),i=r.getContext("2d"),n=null==i?void 0:i.createImageData(r.width,r.height);null==i||i.putImageData(n,0,0)}}deserializeAndPreloadCanvasEvents(t,e){var r=this;return n(function*(){if(!r.canvasEventMap.has(e)){var i={isUnchanged:!0};if("commands"in t){var s=yield Promise.all(t.commands.map(function(){var t=n(function*(t){var e=yield Promise.all(t.args.map(po(r.imageMap,null,i)));return o({},t,{args:e})});return function(e){return t.apply(this,arguments)}}()));!1===i.isUnchanged&&r.canvasEventMap.set(e,o({},t,{commands:s}))}else{var a=yield Promise.all(t.args.map(po(r.imageMap,null,i)));!1===i.isUnchanged&&r.canvasEventMap.set(e,o({},t,{args:a}))}}})()}applyIncremental(t,e){var r=t.data;switch(r.source){case Fn.Mutation:try{this.applyMutation(r,e)}catch(t){this.warn("Exception in mutation "+(t.message||t),r)}break;case Fn.Drag:case Fn.TouchMove:case Fn.MouseMove:if(!Array.isArray(r.positions)||!r.positions.length)break;if(e){var i=r.positions[r.positions.length-1];this.mousePos={x:i.x,y:i.y,id:i.id,debugData:r}}else{var n;r.positions.forEach(i=>{var n=Js(i);void 0!==n&&this.timer.addAction({doAction:()=>{this.moveAndHover(i.x,i.y,i.id,e,r)},delay:n+t.timestamp-this.service.state.context.baselineTime})}),this.timer.addAction({doAction(){},delay:t.delay-(null!==(n=Xs(r))&&void 0!==n?n:0)})}break;case Fn.MouseInteraction:if(-1===r.id)break;var s=new Event(wt(Pn[r.type])),o=this.mirror.getNode(r.id);if(!o)return this.debugNodeNotFound(r,r.id);this.emitter.emit(Wn.MouseInteraction,{type:r.type,target:o});var a=this.config.triggerFocus;switch(r.type){case Pn.Blur:"blur"in o&&o.blur();break;case Pn.Focus:a&&o.focus&&o.focus({preventScroll:!0});break;case Pn.Click:case Pn.TouchStart:case Pn.TouchEnd:case Pn.MouseDown:case Pn.MouseUp:e?(r.type===Pn.TouchStart?this.touchActive=!0:r.type===Pn.TouchEnd&&(this.touchActive=!1),r.type===Pn.MouseDown?this.lastMouseDownEvent=[o,s]:r.type===Pn.MouseUp&&(this.lastMouseDownEvent=null),this.mousePos={x:r.x||0,y:r.y||0,id:r.id,debugData:r}):(r.type===Pn.TouchStart&&(this.tailPositions.length=0),this.moveAndHover(r.x||0,r.y||0,r.id,e,r),r.type===Pn.Click?(this.mouse.classList.remove("active"),this.mouse.classList.add("active")):r.type===Pn.TouchStart?this.mouse.classList.add("touch-active"):r.type===Pn.TouchEnd?this.mouse.classList.remove("touch-active"):o.dispatchEvent(s));break;case Pn.TouchCancel:e?this.touchActive=!1:this.mouse.classList.remove("touch-active");break;default:o.dispatchEvent(s)}break;case Fn.Scroll:if(-1===r.id)break;if(e&&this.lastScrollMap.set(r.id,r),this.usingVirtualDom){var h=this.virtualDom.mirror.getNode(r.id);if(!h)return this.debugNodeNotFound(r,r.id);h.scrollData=r;break}this.applyScroll(r,e);break;case Fn.ViewportResize:this.emitter.emit(Wn.Resize,{width:r.width,height:r.height});break;case Fn.Input:if(-1===r.id)break;if(this.usingVirtualDom){var u=this.virtualDom.mirror.getNode(r.id);if(!u)return this.debugNodeNotFound(r,r.id);u.inputData=r;break}this.applyInput(r);break;case Fn.MediaInteraction:var l=this.usingVirtualDom?this.virtualDom.mirror.getNode(r.id):this.mirror.getNode(r.id);if(!l)return this.debugNodeNotFound(r,r.id);this.mediaManager.mediaMutation({target:l,timeOffset:t.timestamp-this.service.state.context.events[0].timestamp,mutation:r});break;case Fn.StyleSheetRule:case Fn.StyleDeclaration:var f;this.usingVirtualDom?r.styleId?this.constructedStyleMutations.push(r):r.id&&(null===(f=this.virtualDom.mirror.getNode(r.id))||void 0===f||f.rules.push(r)):this.applyStyleSheetMutation(r);break;case Fn.CanvasMutation:if(!this.config.UNSAFE_replayCanvas)return;if(this.usingVirtualDom){var c=this.virtualDom.mirror.getNode(r.id);if(!c)return this.debugNodeNotFound(r,r.id);c.canvasMutations.push({event:t,mutation:r})}else{var v=this.mirror.getNode(r.id);if(!v)return this.debugNodeNotFound(r,r.id);bo({event:t,mutation:r,target:v,imageMap:this.imageMap,canvasEventMap:this.canvasEventMap,errorHandler:this.warnCanvasMutationFailed.bind(this)})}break;case Fn.Font:try{var d,p=new FontFace(r.family,r.buffer?new Uint8Array(JSON.parse(r.fontSource)):r.fontSource,r.descriptors);null===(d=this.iframe.contentDocument)||void 0===d||d.fonts.add(p)}catch(t){this.warn(t)}break;case Fn.Selection:if(e){this.lastSelectionData=r;break}this.applySelection(r);break;case Fn.AdoptedStyleSheet:this.usingVirtualDom?this.adoptedStyleSheets.push(r):this.applyAdoptedStyleSheet(r)}}applyMutation(t,e){var r,i,n,s=this;if(this.config.useVirtualDom&&!this.usingVirtualDom&&e&&(this.usingVirtualDom=!0,r=this.iframe.contentDocument,n=this.virtualDom,void 0===(i=this.mirror)&&(i=new vr),void 0===n&&(n=new Mi),function t(e,r){var s=Li(e,n,i,r);if(null!==s)if("IFRAME"!==(null==r?void 0:r.nodeName)&&e.nodeType!==di.DOCUMENT_FRAGMENT_NODE&&(null==r||r.appendChild(s),s.parentNode=r,s.parentElement=r),"IFRAME"===e.nodeName){var o=e.contentDocument;o&&t(o,s)}else e.nodeType!==di.DOCUMENT_NODE&&e.nodeType!==di.ELEMENT_NODE&&e.nodeType!==di.DOCUMENT_FRAGMENT_NODE||(e.nodeType===di.ELEMENT_NODE&&e.shadowRoot&&t(e.shadowRoot,s),e.childNodes.forEach(e=>t(e,s)))}(r,null),Object.keys(this.legacy_missingNodeRetryMap).length))for(var a in this.legacy_missingNodeRetryMap)try{var h=this.legacy_missingNodeRetryMap[a],u=Li(h.node,this.virtualDom,this.mirror);u&&(h.node=u)}catch(t){this.warn(t)}var l=this.usingVirtualDom?this.virtualDom.mirror:this.mirror;t.removes.filter(e=>!!l.getNode(e.id)||(this.warnNodeNotFound(t,e.id),!1)).forEach(e=>{var r=l.getNode(e.id);if(r){var i=l.getNode(e.parentId);if(!i)return this.warnNodeNotFound(t,e.parentId);if(e.isShadow&&xn(i)&&(i=i.shadowRoot),l.removeNodeFromMap(r),i)try{var n;i.removeChild(r),this.usingVirtualDom&&"#text"===r.nodeName&&"STYLE"===i.nodeName&&(null===(n=i.rules)||void 0===n?void 0:n.length)>0&&(i.rules=[])}catch(e){if(!(e instanceof DOMException))throw e;this.warn("parent could not remove child in mutation",i,r,t)}}});var f=o({},this.legacy_missingNodeRetryMap),c=[],v=e=>{var r;if(!this.iframe.contentDocument)return this.warn("Looks like your replayer has been destroyed.");var i=l.getNode(e.parentId);if(!i)return e.node.type===Hn.Document?this.newDocumentQueue.push(e):t.adds.some(t=>t.node.id===e.parentId)?c.push(e):void 0;if(e.node.isShadow){var n;if(xn(i))i=i.shadowRoot;else{if(!it(i))return this.warn("Parent does not support shadow root, skipping mutation",e);i=i.shadowRoot}var s=null!==(n=this.lastAdoptedStyleIds.get(e.parentId))&&void 0!==n?n:this.pendingAdoptedStyleSheets.get(e.parentId);s&&(this.usingVirtualDom?this.pendingAdoptedStyleSheets.set(e.parentId,s):this.applyAdoptedStyleSheet({source:Fn.AdoptedStyleSheet,id:e.parentId,styleIds:s}))}var o=null,a=null;if(e.previousId&&(o=l.getNode(e.previousId)),e.nextId&&(a=l.getNode(e.nextId)),!e.node.rootId||l.getNode(e.node.rootId)){var h=e.node.rootId?l.getNode(e.node.rootId):this.usingVirtualDom?this.virtualDom:this.iframe.contentDocument;if(kn(i,l))this.attachDocumentToIframe(e,i);else{var u=(t,e)=>{if(!this.usingVirtualDom)for(var r of(Mo(t),this.config.plugins||[]))r.onBuild&&r.onBuild(t,{id:e,replayer:this})},v=Ee(e.node,{doc:h,mirror:l,skipChild:!0,hackCss:!0,cache:this.cache,afterAppend:u});if(-1!==e.previousId&&-1!==e.nextId){var d=l.getMeta(i);if(d&&d.type===Hn.Element&&e.node.type===Hn.Text){var p=Array.isArray(i.childNodes)?i.childNodes:Array.from(i.childNodes);if("textarea"===d.tagName)for(var m of p)m.nodeType===i.TEXT_NODE&&i.removeChild(m);else if("style"===d.tagName&&1===p.length)for(var y of p)y.nodeType!==i.TEXT_NODE||l.hasNode(y)||(v.textContent=y.textContent,i.removeChild(y))}else if((null==d?void 0:d.type)===Hn.Document){var g,w=i;e.node.type===Hn.DocumentType&&(null===(g=w.childNodes[0])||void 0===g?void 0:g.nodeType)===Node.DOCUMENT_TYPE_NODE&&w.removeChild(w.childNodes[0]),"HTML"===v.nodeName&&w.documentElement&&w.removeChild(w.documentElement)}if(o&&o.nextSibling&&o.nextSibling.parentNode?i.insertBefore(v,o.nextSibling):a&&a.parentNode?i.contains(a)?i.insertBefore(v,a):i.insertBefore(v,null):i.appendChild(v),u(v,e.node.id),this.usingVirtualDom&&"#text"===v.nodeName&&"STYLE"===i.nodeName&&(null===(r=i.rules)||void 0===r?void 0:r.length)>0&&(i.rules=[]),kn(v,this.mirror)){var b=this.mirror.getId(v),S=this.newDocumentQueue.find(t=>t.parentId===b);S&&(this.attachDocumentToIframe(S,v),this.newDocumentQueue=this.newDocumentQueue.filter(t=>t!==S))}(e.previousId||e.nextId)&&this.legacy_resolveMissingNode(f,i,v,e)}else f[e.node.id]={node:v,mutation:e}}}};t.adds.forEach(t=>{v(t)});for(var d=performance.now();c.length;){var p=bn(c);if(c.length=0,performance.now()-d>150){this.warn("Timeout in the loop, please check the resolve tree data:",p);break}for(var m of p)l.getNode(m.value.parentId)?Sn(m,t=>{v(t)}):this.debug("Drop resolve tree since there is no parent for the root node.",m)}Object.keys(f).length&&Object.assign(this.legacy_missingNodeRetryMap,f),Rn(t.texts).forEach(e=>{var r=l.getNode(e.id);if(!r){if(t.removes.find(t=>t.id===e.id))return;return this.warnNodeNotFound(t,e.id)}if(r.textContent=e.value,this.usingVirtualDom){var i,n=r.parentNode;(null==n||null===(i=n.rules)||void 0===i?void 0:i.length)>0&&(n.rules=[])}}),t.attributes.forEach(e=>{var r=l.getNode(e.id);if(!r){if(t.removes.find(t=>t.id===e.id))return;return this.warnNodeNotFound(t,e.id)}var i,n,a=function(){if("string"==typeof h){var t=e.attributes[h];if(null===t)r.removeAttribute(h),"open"===h&&function(t,e){if(!("DIALOG"!==t.nodeName||t instanceof ei)){var r=t;r.isConnected?null===e.attributes.open&&(r.removeAttribute("open"),r.removeAttribute("rr_open_mode")):console.warn("dialog is not attached to the dom",r)}}(r,e);else if("string"==typeof t)try{if("_cssText"===h&&("LINK"===r.nodeName||"STYLE"===r.nodeName))try{var a=l.getMeta(r),u=r.nextSibling,f=r.parentNode,c=Ee(o({},a,{attributes:o({},a.attributes,e.attributes)}),{doc:r.ownerDocument,mirror:l,skipChild:!0,hackCss:!0,cache:s.cache});if(Object.assign(a.attributes,e.attributes),c&&f)return r.parentNode===f&&f.removeChild(r),f.insertBefore(c,u),l.replace(e.id,c),1}catch(t){}if("value"===h&&"TEXTAREA"===r.nodeName){var v=r;v.childNodes.forEach(t=>v.removeChild(t));var d=null===(n=r.ownerDocument)||void 0===n?void 0:n.createTextNode(t);d&&v.appendChild(d)}else"xlink:href"===h&&(null===(i=l.getMeta(r))||void 0===i?void 0:i.isSVG)?r.setAttributeNS("http://www.w3.org/1999/xlink",h,t):r.setAttribute(h,t);"rr_open_mode"===h&&"DIALOG"===r.nodeName&&Mo(r,e)}catch(t){s.warn("An error occurred may due to the checkout feature.",t)}else if("style"===h){var p=t,m=r;for(var y in p)if(!1===p[y])m.style.removeProperty(y);else if(p[y]instanceof Array){var g=p[y];m.style.setProperty(y,g[0],g[1])}else m.style.setProperty(y,p[y])}}};for(var h in e.attributes)if(a())break})}applyScroll(t,e){var r=this.mirror.getNode(t.id);if(!r)return this.debugNodeNotFound(t,t.id);var i,n=this.mirror.getMeta(r);if(r===this.iframe.contentDocument)null===(i=this.iframe.contentWindow)||void 0===i||i.scrollTo({top:t.y,left:t.x,behavior:e?"instant":"smooth"});else if((null==n?void 0:n.type)===Hn.Document){var s;null===(s=r.defaultView)||void 0===s||s.scrollTo({top:t.y,left:t.x,behavior:e?"instant":"smooth"})}else try{r.scrollTo({top:t.y,left:t.x,behavior:e?"instant":"smooth"})}catch(t){}}applyInput(t){var e=this.mirror.getNode(t.id);if(!e)return this.debugNodeNotFound(t,t.id);try{e.checked=t.isChecked,e.value=t.text}catch(t){}}applySelection(t){try{var e=new Set,r=t.ranges.map(t=>{var r=t.startOffset,i=t.end,n=t.endOffset,s=this.mirror.getNode(t.start),o=this.mirror.getNode(i);if(s&&o){var a=new Range;a.setStart(s,r),a.setEnd(o,n);var h=s.ownerDocument,u=null==h?void 0:h.getSelection();return u&&e.add(u),{range:a,selection:u}}});e.forEach(t=>t.removeAllRanges()),r.forEach(t=>{var e;return t&&(null===(e=t.selection)||void 0===e?void 0:e.addRange(t.range))})}catch(t){}}applyStyleSheetMutation(t){var e,r=null;t.styleId?r=this.styleMirror.getStyle(t.styleId):t.id&&(r=(null===(e=this.mirror.getNode(t.id))||void 0===e?void 0:e.sheet)||null),r&&(t.source===Fn.StyleSheetRule?this.applyStyleSheetRule(t,r):t.source===Fn.StyleDeclaration&&this.applyStyleDeclaration(t,r))}applyStyleSheetRule(t,e){var r,i;if(null===(r=t.adds)||void 0===r||r.forEach(t=>{var r=t.rule,i=t.index;try{if(Array.isArray(i)){var n=En(i),s=n.index,o=An(e.cssRules,n.positions);null==o||o.insertRule(r,s)}else{var a=void 0===i?void 0:Math.min(i,e.cssRules.length);null==e||e.insertRule(r,a)}}catch(t){}}),null===(i=t.removes)||void 0===i||i.forEach(t=>{var r=t.index;try{if(Array.isArray(r)){var i=En(r),n=i.index,s=An(e.cssRules,i.positions);null==s||s.deleteRule(n||0)}else null==e||e.deleteRule(r)}catch(t){}}),"string"==typeof t.replace)try{var n;null===(n=e.replace)||void 0===n||n.call(e,t.replace)}catch(t){}if("string"==typeof t.replaceSync)try{var s;null===(s=e.replaceSync)||void 0===s||s.call(e,t.replaceSync)}catch(t){}}applyStyleDeclaration(t,e){if(t.set){var r,i=An(e.rules,t.index);null==i||null===(r=i.style)||void 0===r||r.setProperty(t.set.property,t.set.value,t.set.priority)}if(t.remove){var n,s=An(e.rules,t.index);null==s||null===(n=s.style)||void 0===n||n.removeProperty(t.remove.property)}}applyAdoptedStyleSheet(t){var e;this.lastAdoptedStyleIds.set(t.id,t.styleIds);var r=this.mirror.getNode(t.id);if(r){var i={};this.adoptedStyleSheetTokens.set(t.id,i),null===(e=t.styles)||void 0===e||e.forEach(t=>{var e,i=null,n=null;if(n="#document"===r.nodeName?r.defaultView:(null===(e=r.ownerDocument)||void 0===e?void 0:e.defaultView)||null)try{i=new n.CSSStyleSheet,this.styleMirror.add(i,t.styleId),this.applyStyleSheetRule({source:Fn.StyleSheetRule,adds:t.rules},i)}catch(t){}});var n=0,s=(e,r)=>{if(this.adoptedStyleSheetTokens.get(t.id)===i){var o=r.map(t=>this.styleMirror.getStyle(t)).filter(t=>null!==t),a=!1;try{xn(e)?(e.shadowRoot.adoptedStyleSheets=o,a=!0):"#document"===e.nodeName&&(e.adoptedStyleSheets=o,a=!0)}catch(t){}a?this.pendingAdoptedStyleSheets.delete(t.id):this.pendingAdoptedStyleSheets.set(t.id,r),a&&o.length===r.length||n>=10||(this.addTimeout(()=>s(e,r),0+100*n),n++)}};s(r,t.styleIds)}}legacy_resolveMissingNode(t,e,r,i){var n=i.previousId,s=i.nextId,o=n&&t[n],a=s&&t[s];if(o){var h=o.node,u=o.mutation;e.insertBefore(h,r),delete t[u.node.id],delete this.legacy_missingNodeRetryMap[u.node.id],(u.previousId||u.nextId)&&this.legacy_resolveMissingNode(t,e,h,u)}if(a){var l=a.node,f=a.mutation;e.insertBefore(l,r.nextSibling),delete t[f.node.id],delete this.legacy_missingNodeRetryMap[f.node.id],(f.previousId||f.nextId)&&this.legacy_resolveMissingNode(t,e,l,f)}}moveAndHover(t,e,r,i,n){var s=this.mirror.getNode(r);if(!s)return this.debugNodeNotFound(n,r);var o=Mn(s,this.iframe),a=t*o.absoluteScale+o.x,h=e*o.absoluteScale+o.y;this.mouse.style.left=a+"px",this.mouse.style.top=h+"px",i||this.drawMouseTail({x:a,y:h}),this.hoverElements(s)}drawMouseTail(t){if(this.mouseTail){var e=!0===this.config.mouseTail?Eo:Object.assign({},Eo,this.config.mouseTail),r=e.lineCap,i=e.lineWidth,n=e.strokeStyle,s=e.duration,o=()=>{if(this.mouseTail){var t=this.mouseTail.getContext("2d");t&&this.tailPositions.length&&(t.clearRect(0,0,this.mouseTail.width,this.mouseTail.height),t.beginPath(),t.lineWidth=i,t.lineCap=r,t.strokeStyle=n,t.moveTo(this.tailPositions[0].x,this.tailPositions[0].y),this.tailPositions.forEach(e=>t.lineTo(e.x,e.y)),t.stroke())}};this.tailPositions.push(t),o(),setTimeout(()=>{this.tailPositions=this.tailPositions.filter(e=>e!==t),o()},s/this.speedService.state.context.timer.speed)}}hoverElements(t){var e;null===(e=this.lastHoveredRootNode||this.iframe.contentDocument)||void 0===e||e.querySelectorAll(".\\:hover").forEach(t=>{t.classList.remove(":hover")});var r=t.getRootNode();this.lastHoveredRootNode=r.nodeType===Node.DOCUMENT_NODE||r.nodeType===Node.DOCUMENT_FRAGMENT_NODE?r:void 0;for(var i=t.nodeType===Node.ELEMENT_NODE?t:t.parentElement;i;)i.classList.add(":hover"),i=i.parentElement}isUserInteraction(t){return t.type===_n.IncrementalSnapshot&&t.data.source>Fn.Mutation&&Fn.Input>=t.data.source}backToNormal(){this.nextUserInteractionEvent=null,this.speedService.state.matches("normal")||(this.speedService.send({type:"BACK_TO_NORMAL"}),this.emitter.emit(Wn.SkipEnd,{speed:this.speedService.state.context.normalSpeed}))}warnNodeNotFound(t,e){this.warn("Node with id '"+e+"' not found. ",t)}warnCanvasMutationFailed(t,e){this.warn("Has error on canvas update",e,"canvas mutation:",t)}debugNodeNotFound(t,e){this.debug("Node with id '"+e+"' not found. ",t)}warn(){if(this.config.showWarning){for(var t=arguments.length,e=new Array(t),r=0;t>r;r++)e[r]=arguments[r];this.config.logger.warn(Ao,...e)}}debug(){if(this.config.showDebug){for(var t=arguments.length,e=new Array(t),r=0;t>r;r++)e[r]=arguments[r];this.config.logger.log(Ao,...e)}}},To=zs.addCustomEvent,Oo=zs.freezePage,Do=zs.takeFullSnapshot;export{_n as EventType,Fn as IncrementalSource,Pn as MouseInteractions,Io as Replayer,Wn as ReplayerEvents,To as addCustomEvent,bo as canvasMutation,Oo as freezePage,J as getDeferredStylesheetStats,A as getDiscardedDurationSamples,W as getLastSnapshotCost,X as getMutationCost,on as mirror,zs as record,Je as resetMaxDepthState,K as resetSnapshotCostState,Do as takeFullSnapshot,Qi as utils,Ze as wasMaxDepthReached};
|
|
1
|
+
var t=["inputId"],e=["inputId"],r=["type"];function i(t,e,r,i,n,s,o){try{var a=t[s](o),h=a.value}catch(t){return void r(t)}a.done?e(h):Promise.resolve(h).then(i,n)}function n(t){return function(){var e=this,r=arguments;return new Promise(function(n,s){var o=t.apply(e,r);function a(t){i(o,n,s,a,h,"next",t)}function h(t){i(o,n,s,a,h,"throw",t)}a(void 0)})}}function s(t,e){if(null==t)return{};var r={};for(var i in t)if({}.hasOwnProperty.call(t,i)){if(-1!==e.indexOf(i))continue;r[i]=t[i]}return r}function o(){return o=Object.assign?Object.assign.bind():function(t){for(var e=1;arguments.length>e;e++){var r=arguments[e];for(var i in r)({}).hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t},o.apply(null,arguments)}var a=Object.defineProperty,h=(t,e)=>{var r={};for(var i in t)a(r,i,{get:t[i],enumerable:!0});return e||a(r,Symbol.toStringTag,{value:"Module"}),r},u=function(t){return 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",t}({});function l(t,e){return-1!==t.indexOf(e)}"Mobile".toLowerCase(),"Tablet".toLowerCase(),new RegExp("Xbox","i"),new RegExp("Nintendo","i"),new RegExp("PlayStation","i"),new RegExp("Windows","i"),Date,Date;var f={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot"],MutationObserver:[]},c={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:["querySelector","querySelectorAll"],MutationObserver:["constructor"]},v={};function d(t){if(v[t])return v[t];var e=function(t){var e,r,i=null===(e=globalThis)||void 0===e||null===(e=e.Zone)||void 0===e||null===(r=e.__symbol__)||void 0===r?void 0:r.call(e,t);return i&&globalThis[i]?globalThis[i]:void 0}(t)||globalThis[t],r=e.prototype,i=t in f?f[t]:void 0,n=Boolean(i&&i.every(t=>{var e;return Boolean(null===(e=Object.getOwnPropertyDescriptor(r,t))||void 0===e||null===(e=e.get)||void 0===e?void 0:e.toString().includes("[native code]"))})),s=t in c?c[t]:void 0,o=Boolean(s&&s.every(t=>{var e;return"function"==typeof r[t]&&(null===(e=r[t])||void 0===e?void 0:e.toString().includes("[native code]"))}));if(n&&o)return v[t]=e.prototype,e.prototype;var a=document.createElement("iframe");a.style.display="none";var h,u=!1;try{document.body.appendChild(a);var d=a.contentWindow;if(!d)return e.prototype;var p=d[t].prototype;return p?(l(h=navigator.userAgent,"AppleWebKit")&&!l(h,"Chrome")&&(a.classList.add("rr-block","ph-no-capture"),a.setAttribute("__rrwebUntaintedPrototype",t),u=!0),v[t]=p):r}catch(t){return r}finally{!u&&a.parentNode&&document.body.removeChild(a)}}var p=Object.create(null);function m(t,e,r){var i,n=p[t],s=n[r];if(s)return s.call(e);var o=d(t),a=null===(i=Object.getOwnPropertyDescriptor(o,r))||void 0===i?void 0:i.get;return a?(n[r]=a,a.call(e)):e[r]}p.Node=Object.create(null),p.ShadowRoot=Object.create(null),p.MutationObserver=Object.create(null),p.Element=Object.create(null);var y,g={};function w(t,e,r){var i=t+"."+String(r);if(g[i])return g[i].bind(e);var n=d(t)[r];return"function"!=typeof n?e[r]:(g[i]=n,n.bind(e))}var b={childNodes:t=>m("Node",t,"childNodes"),parentNode:t=>m("Node",t,"parentNode"),parentElement:t=>m("Node",t,"parentElement"),textContent:t=>m("Node",t,"textContent"),isConnected(t){if(void 0===y){var e,r=null===(e=Object.getOwnPropertyDescriptor(d("Node"),"isConnected"))||void 0===e?void 0:e.get;y=(null==r?void 0:r.toString().includes("[native code]"))?r:null}return null==y?void 0:y.call(t)},contains:(t,e)=>w("Node",t,"contains")(e),getRootNode:t=>w("Node",t,"getRootNode")(),host:t=>t&&"host"in t?m("ShadowRoot",t,"host"):null,styleSheets:t=>t.styleSheets,shadowRoot:t=>t&&"shadowRoot"in t?m("Element",t,"shadowRoot"):null,querySelector:(t,e)=>w("Element",t,"querySelector")(e),querySelectorAll:(t,e)=>w("Element",t,"querySelectorAll")(e),mutationObserver:()=>d("MutationObserver").constructor,patch(t,e,r){try{if(!(e in t))return()=>{};var i=t[e],n={next:i},s=r(function(){for(var t=arguments.length,e=new Array(t),r=0;t>r;r++)e[r]=arguments[r];return n.next.apply(this,e)});return"function"==typeof s&&(s.prototype=s.prototype||{},Object.defineProperties(s,{__rrweb_original__:{enumerable:!1,value:i},__rrweb_layer__:{enumerable:!1,value:n}})),t[e]=s,()=>{if(t[e]!==s)for(var r=t=>{var e;return"function"==typeof t?null!==(e=t.__rrweb_layer__)&&void 0!==e?e:t.__posthog_layer__:void 0},i=t[e],o=r(i);o;){if(o.next===s)return void(o.next=n.next);o=r(i=o.next)}else t[e]=n.next}}catch(t){return()=>{}}}};function S(){try{if("undefined"!=typeof performance&&performance.now)return performance.now()}catch(t){}return Date.now()}var k=0,C=0;function M(){k+=1}function x(){return k}function A(){return C}function E(t,e){return(e!==k||t>6e4)&&(C+=1,!0)}var R=0,I=0,T=0,O={durationMs:0,stylesheetMs:0,nodeCount:0,cssRuleCount:0,nonDeferrableCssRuleCount:0,deferredStylesheetCount:0},D=null,N=null,_=[],L=0,F=0,P={slowestBatchMs:0},B={deferredCount:0,failedCount:0,abandonedCount:0,totalMs:0,slowestSliceMs:0};function j(t){(R+=1)>1||(O={durationMs:0,stylesheetMs:0,nodeCount:0,cssRuleCount:0,nonDeferrableCssRuleCount:0,deferredStylesheetCount:0},_=[],L=0,N=(t=>t&&t>0?t:null)(t),I=S(),T=k)}function U(){return 0===R?D||{durationMs:0,stylesheetMs:0,nodeCount:0,cssRuleCount:0,nonDeferrableCssRuleCount:0,deferredStylesheetCount:0}:(R-=1)>0?O:(O.durationMs=S()-I,O.deferredStylesheetCount=L,B.deferredCount+=L,N=null,E(O.durationMs,T)?O:D=O)}function W(){return D}function H(t,e,r){var i=t.length;if(r>=32)return i;for(var n=0;t.length>n;n++){var s=t[n];try{var o=s.cssRules;if(o&&o.length)i+=H(o,e,r+1);else if(e&&s.styleSheet){var a=s.styleSheet;if(!e.has(a)){e.add(a);var h=a.rules||a.cssRules;h&&(i+=H(h,e,r+1))}}}catch(t){}}return i}function G(t){if(0!==R){var e=H(t,null,0);O.cssRuleCount+=e,F>0&&(O.nonDeferrableCssRuleCount+=e)}}function z(t){F+=1;try{return t()}finally{F-=1}}function V(t){R>0&&(O.stylesheetMs+=t)}function Y(t){if(0===R||null===N)return!1;var e=O.cssRuleCount-O.nonDeferrableCssRuleCount;return e>=N||e+function(t){try{var e=t&&(t.rules||t.cssRules);if(!e)return 0;var r=new WeakSet;return r.add(t),H(e,r,0)}catch(t){return 0}}(t)>N}function q(){B.failedCount+=1}function Z(t){t>0&&(B.abandonedCount+=t)}function J(){return o({},B)}function X(){return o({},P)}function K(){R=0,I=0,T=0,k=0,C=0,O={durationMs:0,stylesheetMs:0,nodeCount:0,cssRuleCount:0,nonDeferrableCssRuleCount:0,deferredStylesheetCount:0},D=null,N=null,_=[],L=0,F=0,P={slowestBatchMs:0},B={deferredCount:0,failedCount:0,abandonedCount:0,totalMs:0,slowestSliceMs:0}}function Q(t){return Q="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Q(t)}function tt(t,e,r){return(e=function(t){var e=function(t){if("object"!=Q(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Q(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Q(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function et(t){return t.nodeType===t.ELEMENT_NODE}function rt(t){var e=t&&"host"in t&&"mode"in t&&b.host(t)||null;return Boolean(e&&"shadowRoot"in e&&b.shadowRoot(e)===t)}function it(t){try{return t.attachShadow({mode:"open"}),!0}catch(t){return!1}}function nt(t){return"[object ShadowRoot]"==={}.toString.call(t)}function st(t){return t.includes(" background-clip: text;")&&!t.includes(" -webkit-background-clip: text;")&&(t=t.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),t}function ot(t){var e=t.cssText;if(3>e.split('"').length)return e;var r=["@import","url("+JSON.stringify(t.href)+")"];return""===t.layerName?r.push("layer"):t.layerName&&r.push("layer("+t.layerName+")"),t.supportsText&&r.push("supports("+t.supportsText+")"),t.media.length&&r.push(t.media.mediaText),r.join(" ")+";"}var at=0;function ht(t){var e=0===at,r=e?S():0;at+=1;try{var i=t.rules||t.cssRules;if(!i)return null;G(i);var n=t.href;return!n&&t.ownerNode&&(n=t.ownerNode.baseURI),st(Array.from(i,t=>ut(t,n)).join(""))}catch(t){return null}finally{at-=1,e&&V(S()-r)}}function ut(t,e){if(ft(t)){var r;try{r=ht(t.styleSheet)||ot(t)}catch(e){r=t.cssText}try{var i;if(r&&(null===(i=t.styleSheet)||void 0===i?void 0:i.href))return It(r,t.styleSheet.href)}catch(t){}return r}var n=t.cssText;return ct(t)&&t.selectorText.includes(":")&&(n=lt(n)),e?It(n,e):n}function lt(t){return t.replace(/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm,"$1\\$2")}function ft(t){return"styleSheet"in t}function ct(t){return"selectorText"in t}var vt=/^-?[A-Za-z_][\w-]*$/,dt=/^-?[A-Za-z_][\w-]*(\.-?[A-Za-z_][\w-]*)*$/;function pt(t){var e=[],r=!1,i=null,n=new Map;function s(t){var n=e.pop();if("group"===n.kind){if(null===t){for(;e.length>0&&"group"===e[e.length-1].kind;)e.pop();return void s(null)}var a=e[e.length-1];return a.parts.push(t),void(a.index+=1)}if(!n.importRule)return r=!0,void(i=t);o(e[e.length-1],n.importRule,t)}function o(t,e,r){try{var i;try{i=r||ot(e)}catch(t){i=e.cssText}try{var n;i&&(null===(n=e.styleSheet)||void 0===n?void 0:n.href)&&(i=It(i,e.styleSheet.href))}catch(t){}i&&t.parts.push(i),t.index+=1}catch(t){s(null)}}function a(t){var r=t.rules[t.index];if("sheet"===t.kind&&ft(r)){var i=n.get(r);return null===i?(t.parts.push(r.cssText),void(t.index+=1)):i?void e.push({kind:"sheet",sheet:i.sheet,rules:i.rules,sheetHref:i.sheetHref,index:0,parts:[],importRule:r}):void o(t,r,null)}if(!function(t,r){try{var i=function(t){var e=t;if(!e.cssRules||0===e.cssRules.length)return null;if(e.media&&"string"==typeof e.media.mediaText)return"@media "+e.media.mediaText+" {";if(ct(t)){if("number"==typeof e.type&&1!==e.type)return null;var r=e.style?e.style.cssText:"";return t.selectorText+" {"+(r?" "+r:"")}if("containerName"in e)return"string"!=typeof e.containerQuery||e.containerName&&!vt.test(e.containerName)?null:"@container "+(e.containerName?e.containerName+" ":"")+e.containerQuery+" {";if("string"==typeof e.conditionText){var i="";try{var n;i=(null===(n=t.constructor)||void 0===n?void 0:n.name)||""}catch(t){return null}return""===i||"Object"===i||"CSSSupportsRule"===i?"@supports "+e.conditionText+" {":null}return"string"==typeof e.name?"keyText"in e.cssRules[0]?vt.test(e.name)?"@keyframes "+e.name+" {":null:""===e.name?"@layer {":dt.test(e.name)?"@layer "+e.name+" {":null:null}(t);if(null===i)return!1;var n=r.sheetHref;return e.push({kind:"group",rules:Array.from(t.cssRules),sheetHref:n,index:0,parts:[],prelude:n?It(i,n):i,fixColons:"sheet"===r.kind&&ct(t)&&t.selectorText.includes(":")}),!0}catch(t){return!1}}(r,t)){var s=r.cssText;"sheet"===t.kind&&ct(r)&&r.selectorText.includes(":")&&(s=lt(s)),t.parts.push(t.sheetHref?It(s,t.sheetHref):s),t.index+=1}}return function(t){try{var r=t.rules||t.cssRules;if(!r)return!1;G(r);var i=t.href;!i&&t.ownerNode&&(i=t.ownerNode.baseURI);var s=Array.from(r);return e.push({kind:"sheet",sheet:t,rules:s,sheetHref:i,index:0,parts:[],importRule:null}),function(t,e){for(var r=[{sheet:e,rules:t,index:0}],i=function(){var t=r[r.length-1];if(t.index>=t.rules.length)return r.pop(),0;var e=t.rules[t.index];if(t.index+=1,!ft(e)||n.has(e))return 0;var i=null;try{i=e.styleSheet}catch(t){return n.set(e,null),0}if(!i||r.some(t=>t.sheet===i))return 0;try{var s=i.rules||i.cssRules;if(!s)return 0;G(s);var o=i.href;!o&&i.ownerNode&&(o=i.ownerNode.baseURI);var a=Array.from(s);n.set(e,{sheet:i,rules:a,sheetHref:o}),r.push({sheet:i,rules:a,index:0})}catch(t){}};r.length>0;)i()}(s,t),!0}catch(t){return!1}}(t)||(r=!0),{advance(t){if(r)return!0;var n=S(),o=t>0?t:1;try{for(;!r&&o>0;){var h=e[e.length-1];if(h.rules.length>h.index){o-=1;try{a(h)}catch(t){s(null)}}else{var u=null;try{if("group"===h.kind){var l=h.prelude+h.parts.join("")+"}";u=h.fixColons?lt(l):l}else u=st(h.parts.join(""))}catch(t){}s(u)}}}catch(t){r=!0,i=null}finally{V(S()-n)}return r},text:()=>r?i:null,remainingRules(){if(r)return 0;var t=0;for(var i of e)t+=i.rules.length-i.index;return t}}}var mt=class{constructor(){tt(this,"idNodeMap",new Map),tt(this,"nodeMetaMap",new WeakMap)}getId(t){var e,r;return t&&null!==(e=null===(r=this.getMeta(t))||void 0===r?void 0:r.id)&&void 0!==e?e:-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){var e=this.getId(t);if(this.idNodeMap.delete(e),t.childNodes&&t.childNodes.forEach(t=>this.removeNodeFromMap(t)),et(t)){var r=b.shadowRoot(t);r&&this.removeNodeFromMap(r),"IFRAME"===t.nodeName&&t.contentDocument&&this.removeNodeFromMap(t.contentDocument)}}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,e){this.idNodeMap.set(e.id,t),this.nodeMetaMap.set(t,e)}replace(t,e){var r=this.getNode(t);if(r){var i=this.nodeMetaMap.get(r);i&&this.nodeMetaMap.set(e,i)}this.idNodeMap.set(t,e)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function yt(){return new mt}function gt(t){var e=t.element,r=t.maskInputOptions,i=t.tagName,n=t.type,s=t.maskInputFn,o=t.value||"",a=n&&wt(n);return(r[i.toLowerCase()]||a&&r[a])&&(o=s?s(o,e):"*".repeat(o.length)),o}function wt(t){return t.toLowerCase()}var bt=new Set(["rr_width","rr_height","rr_left","rr_top","rr_position","rr_transform","rr_display","rr_scrollleft","rr_scrolltop","rr_mediastate","rr_open_mode"]);function St(t){var e=t.element,r=t.name,i=t.value,n=t.maskAttributeFn,s=t.isGenerated;return i?t.maskAllElementAttributes?void 0!==s&&s&&bt.has(wt(r))?i:"*".repeat(i.length):n?n(r,i,e):i:i}var kt="__rrweb_original__";function Ct(t){try{var e=t.type;return t.hasAttribute("data-rr-is-password")?"password":e?wt(e):null}catch(t){return null}}function Mt(t,e){var r,i;try{i=new URL(t,null!=e?e:window.location.href)}catch(t){return null}var n=i.pathname.match(/\.([0-9a-z]+)(?:$)/i);return null!==(r=null==n?void 0:n[1])&&void 0!==r?r:null}var xt=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,At=/^(?:[a-z+]+:)?\/\//i,Et=/^www\..*/i,Rt=/^(data:)([^,]*),(.*)/i;function It(t,e){return(t||"").replace(xt,(t,r,i,n,s,o)=>{var a,h=i||s||o,u=r||n||"";if(!h)return t;if(At.test(h)||Et.test(h))return"url("+u+h+u+")";if(Rt.test(h))return"url("+u+h+u+")";if("/"===h[0])return"url("+u+(((a=e).indexOf("//")>-1?a.split("/").slice(0,3).join("/"):a.split("/")[0]).split("?")[0]+h)+u+")";var l=e.split("/"),f=h.split("/");for(var c of(l.pop(),f))"."!==c&&(".."===c?l.pop():l.push(c));return"url("+u+l.join("/")+u+")"})}var Tt=new Map,Ot=Object.create,Dt=Object.defineProperty,Nt=Object.getOwnPropertyDescriptor,_t=Object.getOwnPropertyNames,Lt=Object.getPrototypeOf,Ft={}.hasOwnProperty,Pt=(t,e)=>()=>(e||(t((e={exports:{}}).exports,e),t=null),e.exports),Bt=(t,e,r)=>(r=null!=t?Ot(Lt(t)):{},((t,e,r,i)=>{if(e&&"object"==typeof e||"function"==typeof e)for(var n,s=_t(e),o=0,a=s.length;a>o;o++)Ft.call(t,n=s[o])||void 0===n||Dt(t,n,{get:(t=>e[t]).bind(null,n),enumerable:!(i=Nt(e,n))||i.enumerable});return t})(!e&&t&&t.__esModule&&Ft.call(t,"default")?r:Dt(r,"default",{value:t,enumerable:!0}),t)),jt=new RegExp(/(max|min)-device-(width|height)/.source,"g"),Ut={postcssPlugin:"postcss-custom-selectors",prepare(){return{postcssPlugin:"postcss-custom-selectors",AtRule(t){t.params.match(jt)&&(t.params=t.params.replace(jt,"$1-$2"))}}}},Wt={postcssPlugin:"postcss-hover-classes",prepare(){var t=[];return{Rule(e){-1===t.indexOf(e)&&(t.push(e),e.selectors.forEach(function(t){if(t.includes(":hover")){var r=t.replace(new RegExp("(?<!\\\\):hover","g"),".\\:hover");r!==t&&(e.selector+=",\n"+r)}}))}}}},Ht=Pt((t,e)=>{var r=String,i=function(){return{isColorSupported:!1,reset:r,bold:r,dim:r,italic:r,underline:r,inverse:r,hidden:r,strikethrough:r,black:r,red:r,green:r,yellow:r,blue:r,magenta:r,cyan:r,white:r,gray:r,bgBlack:r,bgRed:r,bgGreen:r,bgYellow:r,bgBlue:r,bgMagenta:r,bgCyan:r,bgWhite:r,blackBright:r,redBright:r,greenBright:r,yellowBright:r,blueBright:r,magentaBright:r,cyanBright:r,whiteBright:r,bgBlackBright:r,bgRedBright:r,bgGreenBright:r,bgYellowBright:r,bgBlueBright:r,bgMagentaBright:r,bgCyanBright:r,bgWhiteBright:r}};e.exports=i(),e.exports.createColors=i}),Gt=Pt((t,e)=>{e.exports={}}),zt=Pt((t,e)=>{var r=Ht(),i=Gt(),n=class t extends Error{constructor(e,r,i,n,s,o){super(e),this.name="CssSyntaxError",this.reason=e,s&&(this.file=s),n&&(this.source=n),o&&(this.plugin=o),void 0!==r&&void 0!==i&&("number"==typeof r?(this.line=r,this.column=i):(this.line=r.line,this.column=r.column,this.endLine=i.line,this.endColumn=i.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,t)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",void 0!==this.line&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(t){if(!this.source)return"";var e=this.source;null==t&&(t=r.isColorSupported);var n=t=>t,s=t=>t,o=t=>t;if(t){var a=r.createColors(!0),h=a.bold,u=a.gray,l=a.red;s=t=>h(l(t)),n=t=>u(t),i&&(o=t=>i(t))}var f=e.split(/\r?\n/),c=Math.max(this.line-3,0),v=Math.min(this.line+2,f.length),d=String(v).length;return f.slice(c,v).map((t,e)=>{var r=c+1+e,i=" "+(" "+r).slice(-d)+" | ";if(r===this.line){if(t.length>160){var a=Math.max(0,this.column-20),h=Math.max(this.column+20,this.endColumn+20),u=t.slice(a,h),l=n(i.replace(/\d/g," "))+t.slice(0,Math.min(this.column-1,19)).replace(/[^\t]/g," ");return s(">")+n(i)+o(u)+"\n "+l+s("^")}var f=n(i.replace(/\d/g," "))+t.slice(0,this.column-1).replace(/[^\t]/g," ");return s(">")+n(i)+o(t)+"\n "+f+s("^")}return" "+n(i)+o(t)}).join("\n")}toString(){var t=this.showSourceCode();return t&&(t="\n\n"+t+"\n"),this.name+": "+this.message+t}};e.exports=n,n.default=n}),Vt=Pt((t,e)=>{var r=/(<)(\/?style\b)/gi,i=/(<)(!--)/g,n=/[\t\n\f\r "#'()/;[\\\]{}]/;function s(t){return"string"!=typeof t?t:t.includes("<")?t.replace(r,"\\3c $2").replace(i,"\\3c $2"):t}var o={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function a(t,e){var r="@"+e.name,i=e.params?t.rawValue(e,"params"):"",s=e.raws.afterName;return void 0===s?s=i?" ":"":""===s&&i&&!n.test(i[0])&&(s=" "),r+s+i}function h(t,e,r){for(var i=r.nodes,n=i.length-1;n>0&&"comment"===i[n].type;)n-=1;for(var s=t.raw(r,"semicolon"),o="document"===r.type,a=i.length-1;a>=0;a--){var h=i[a],u=n!==a||s;!u&&i.length-1>a&&("atrule"===h.type&&!h.nodes||"decl"===h.type&&h.prop.startsWith("--"))&&(u=!0),e.push({document:o,node:h,semicolon:u})}}function u(t,e,r,i){var n=t.raw(r,"between","beforeOpen");t.builder(s(i+n)+"{",r,"start");var o=r.nodes&&r.nodes.length,a=()=>{var e=o?t.raw(r,"after"):t.raw(r,"after","emptyBody");e&&t.builder(s(e)),t.builder("}",r,"end"),"rule"===r.type&&r.raws.ownSemicolon&&t.builder(s(r.raws.ownSemicolon),r,"end")};o?(e.push(a),h(t,e,r)):a()}var l=class t{constructor(t){this.builder=t}atrule(t,e){var r=a(this,t);t.nodes?this.block(t,r):this.builder(s(r+((t.raws.between||"")+(e?";":""))),t)}beforeAfter(t,e){var r;r=this.raw(t,null,"decl"===t.type?"beforeDecl":"comment"===t.type?"beforeComment":"before"===e?"beforeRule":"beforeClose");for(var i=t.parent,n=0;i&&"root"!==i.type;)n+=1,i=i.parent;if(r.includes("\n")){var s=this.raw(t,null,"indent");if(s.length)for(var o=0;n>o;o++)r+=s}return r}block(t,e){var r,i=this.raw(t,"between","beforeOpen");this.builder(s(e+i)+"{",t,"start"),t.nodes&&t.nodes.length?(this.body(t),r=this.raw(t,"after")):r=this.raw(t,"after","emptyBody"),r&&this.builder(s(r)),this.builder("}",t,"end")}body(e){var r=t.prototype,i=["atrule","block","body","rule","stringify"].every(t=>this[t]===r[t]),n=[];for(h(this,n,e);n.length>0;){var o=n.pop();if("function"!=typeof o){var l=o.node,f=this.raw(l,"before");f&&this.builder(o.document?f:s(f)),i&&"rule"===l.type?u(this,n,l,this.rawValue(l,"selector")):i&&"atrule"===l.type&&l.nodes?u(this,n,l,a(this,l)):this.stringify(l,o.semicolon)}else o()}}comment(t){var e=this.raw(t,"left","commentLeft"),r=this.raw(t,"right","commentRight");this.builder(s("/*"+e+t.text+r+"*/"),t)}decl(t,e){var r=t.raws,i=this.raw(t,"between","colon"),n=t.prop+i+this.rawValue(t,"value");t.important&&(n+=r.important||" !important"),e&&(n+=";"),this.builder(s(n),t)}document(t){this.body(t)}raw(t,e,r){var i;if(r||(r=e),e&&void 0!==(i=t.raws[e]))return i;var n=t.parent;if("before"===r){if(!n||"root"===n.type&&n.first===t)return"";if(n&&"document"===n.type)return""}if(!n)return o[r];var s=t.root(),a=s.rawCache||(s.rawCache={});if(void 0!==a[r])return a[r];if("before"===r||"after"===r)return this.beforeAfter(t,r);var h,u="raw"+((h=r)[0].toUpperCase()+h.slice(1));return this[u]?i=this[u](s,t):s.walk(t=>{if(void 0!==(i=t.raws[e]))return!1}),void 0===i&&(i=o[r]),a[r]=i,i}rawBeforeClose(t){var e;return t.walk(t=>{if(t.nodes&&t.nodes.length>0&&void 0!==t.raws.after)return(e=t.raws.after).includes("\n")&&(e=e.replace(/[^\n]+$/,"")),!1}),e&&(e=e.replace(/\S/g,"")),e}rawBeforeComment(t,e){var r;return t.walkComments(t=>{if(void 0!==t.raws.before)return(r=t.raws.before).includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1}),void 0===r?r=this.raw(e,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeDecl(t,e){var r;return t.walkDecls(t=>{if(void 0!==t.raws.before)return(r=t.raws.before).includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1}),void 0===r?r=this.raw(e,null,"beforeRule"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeOpen(t){var e;return t.walk(t=>{if("decl"!==t.type&&void 0!==(e=t.raws.between))return!1}),e}rawBeforeRule(t){var e;return t.walk(r=>{if(r.nodes&&(r.parent!==t||t.first!==r)&&void 0!==r.raws.before)return(e=r.raws.before).includes("\n")&&(e=e.replace(/[^\n]+$/,"")),!1}),e&&(e=e.replace(/\S/g,"")),e}rawColon(t){var e;return t.walkDecls(t=>{if(void 0!==t.raws.between)return e=t.raws.between.replace(/[^\s:]/g,""),!1}),e}rawEmptyBody(t){var e;return t.walk(t=>{if(t.nodes&&0===t.nodes.length&&void 0!==(e=t.raws.after))return!1}),e}rawIndent(t){return t.raws.indent?t.raws.indent:(t.walk(r=>{var i=r.parent;if(i&&i!==t&&i.parent&&i.parent===t&&void 0!==r.raws.before){var n=r.raws.before.split("\n");return e=(e=n[n.length-1]).replace(/\S/g,""),!1}}),e);var e}rawSemicolon(t){var e;return t.walk(t=>{if(t.nodes&&t.nodes.length&&"decl"===t.last.type&&void 0!==(e=t.raws.semicolon))return!1}),e}rawValue(t,e){var r=t[e],i=t.raws[e];return i&&i.value===r?i.raw:r}root(t){if(t.source&&t.source.input.hasBOM&&this.builder("\ufeff",t,"start"),this.body(t),t.raws.after){var e=t.raws.after;this.builder(t.parent&&"document"===t.parent.type?e:s(e))}}rule(t){this.block(t,this.rawValue(t,"selector")),t.raws.ownSemicolon&&this.builder(s(t.raws.ownSemicolon),t,"end")}stringify(t,e){if(!this[t.type])throw new Error("Unknown AST node type "+t.type+". Maybe you need to change PostCSS stringifier.");this[t.type](t,e)}};e.exports=l,l.default=l}),$t=Pt((t,e)=>{var r=Vt();function i(t,e){new r(e).stringify(t)}e.exports=i,i.default=i}),Yt=Pt((t,e)=>{e.exports.isClean=Symbol("isClean"),e.exports.my=Symbol("my")}),qt=Pt((t,e)=>{var r=zt(),i=Vt(),n=$t(),s=Yt(),o=s.isClean,a=s.my;function h(t,e){if(e&&void 0!==e.offset)return e.offset;for(var r=1,i=1,n=0,s=0;t.length>s;s++){if(i===e.line&&r===e.column){n=s;break}"\n"===t[s]?(r=1,i+=1):r+=1}return n}var u=class t{get proxyOf(){return this}constructor(t){for(var e of(void 0===t&&(t={}),this.raws={},this[o]=!1,this[a]=!0,Object.keys(t)))if("__proto__"!==e)if("nodes"===e)for(var r of(this.nodes=[],t[e]))this.append("function"==typeof r.clone&&r.parent?r.clone():r);else this[e]=t[e]}addToError(t){if(t.postcssNode=this,t.stack&&this.source&&/\n\s{4}at /.test(t.stack)){var e=this.source;t.stack=t.stack.replace(/\n\s{4}at /,"$&"+e.input.from+":"+e.start.line+":"+e.start.column+"$&")}return t}after(t){return this.parent.insertAfter(this,t),this}assign(t){for(var e in void 0===t&&(t={}),t)this[e]=t[e];return this}before(t){return this.parent.insertBefore(this,t),this}cleanRaws(t){delete this.raws.before,delete this.raws.after,t||delete this.raws.between}clone(t){void 0===t&&(t={});var e=function(t){for(var e=new t.constructor,r=[[t,e,void 0]];r.length>0;){var i=r.pop(),n=i[0],s=i[1],o=i[2];for(var a in n)if({}.hasOwnProperty.call(n,a)&&"proxyCache"!==a){var h=n[a],u=typeof h;if("parent"===a&&"object"===u)o&&(s[a]=o);else if("source"===a)s[a]=h;else if(Array.isArray(h)){var l=[];for(var f of(s[a]=l,h)){var c=new f.constructor;l.push(c),r.push([f,c,s])}}else{if("object"===u&&null!==h){var v=new h.constructor;r.push([h,v,void 0]),h=v}s[a]=h}}}return e}(this);for(var r in t)e[r]=t[r];return e}cloneAfter(t){void 0===t&&(t={});var e=this.clone(t);return this.parent.insertAfter(this,e),e}cloneBefore(t){void 0===t&&(t={});var e=this.clone(t);return this.parent.insertBefore(this,e),e}error(t,e){if(void 0===e&&(e={}),this.source){var i=this.rangeBy(e),n=i.end,s=i.start;return this.source.input.error(t,{column:s.column,line:s.line},{column:n.column,line:n.line},e)}return new r(t)}getProxyProcessor(){return{get(t,e){return"proxyOf"===e?t:"root"===e?()=>t.root().toProxy():t[e]},set(t,e,r){return t[e]===r||(t[e]=r,"prop"!==e&&"value"!==e&&"name"!==e&&"params"!==e&&"important"!==e&&"text"!==e||t.markDirty()),!0}}}markClean(){this[o]=!0}markDirty(){if(this[o]){this[o]=!1;for(var t=this;t=t.parent;)t[o]=!1}}next(){if(this.parent){var t=this.parent.index(this);return this.parent.nodes[t+1]}}positionBy(t){void 0===t&&(t={});var e="document"in this.source.input?this.source.input.document:this.source.input.css,r={column:this.source.start.column,line:this.source.start.line,offset:h(e,this.source.start)};if(t.index)r=this.positionInside(t.index);else if(t.word){var i=e.slice(h(e,this.source.start),h(e,this.source.end)).indexOf(t.word);-1!==i&&(r=this.positionInside(i))}return r}positionInside(t){for(var e=this.source.start.column,r=this.source.start.line,i=("document"in this.source.input?this.source.input.document:this.source.input.css),n=h(i,this.source.start),s=n+t,o=n;s>o;o++)"\n"===i[o]?(e=1,r+=1):e+=1;return{column:e,line:r,offset:s}}prev(){if(this.parent){var t=this.parent.index(this);return this.parent.nodes[t-1]}}rangeBy(t){void 0===t&&(t={});var e="document"in this.source.input?this.source.input.document:this.source.input.css,r={column:this.source.start.column,line:this.source.start.line,offset:h(e,this.source.start)},i=this.source.end?{column:this.source.end.column+1,line:this.source.end.line,offset:"number"==typeof this.source.end.offset?this.source.end.offset:h(e,this.source.end)+1}:{column:r.column+1,line:r.line,offset:r.offset+1};if(t.word){var n=e.slice(h(e,this.source.start),h(e,this.source.end)).indexOf(t.word);-1!==n&&(r=this.positionInside(n),i=this.positionInside(n+t.word.length))}else t.start?r={column:t.start.column,line:t.start.line,offset:h(e,t.start)}:"number"==typeof t.index&&(r=this.positionInside(t.index)),t.end?i={column:t.end.column,line:t.end.line,offset:h(e,t.end)}:"number"==typeof t.endIndex?i=this.positionInside(t.endIndex):"number"==typeof t.index&&(i=this.positionInside(t.index+1));return(r.line>i.line||i.line===r.line&&r.column>=i.column)&&(i={column:r.column+1,line:r.line,offset:r.offset+1}),{end:i,start:r}}raw(t,e){return(new i).raw(this,t,e)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(){if(this.parent){for(var t=this,e=!1,r=arguments.length,i=new Array(r),n=0;r>n;n++)i[n]=arguments[n];for(var s of i)s===this?e=!0:e?(this.parent.insertAfter(t,s),t=s):this.parent.insertBefore(t,s);e||this.remove()}return this}root(){for(var t=this;t.parent&&"document"!==t.parent.type;)t=t.parent;return t}toJSON(e,r){var i=null==r;r=r||new Map;for(var n=[],s=[[this,n,0]],o=0;s.length>o;o++){var a=s[o],h=a[0],u=a[1],l=a[2],f={};for(var c in u[l]=f,h)if({}.hasOwnProperty.call(h,c)&&"parent"!==c&&"proxyCache"!==c){var v=h[c];if(Array.isArray(v)){var d=[];f[c]=d;for(var p=0;v.length>p;p++){var m=v[p];"object"==typeof m&&m.toJSON?m.toJSON===t.prototype.toJSON?s.push([m,d,p]):d[p]=m.toJSON(null,r):d[p]=m}}else if("object"==typeof v&&v.toJSON)v.toJSON===t.prototype.toJSON?s.push([v,f,c]):f[c]=v.toJSON(null,r);else if("source"===c){if(null==v)continue;var y=r.get(v.input);null==y&&r.set(v.input,y=r.size),f[c]={end:v.end,inputId:y,start:v.start}}else f[c]=v}}var g=n[0];return i&&(g.inputs=[...r.keys()].map(t=>t.toJSON())),g}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(t){void 0===t&&(t=n),t.stringify&&(t=t.stringify);var e="";return t(this,t=>{e+=t}),e}warn(t,e,r){void 0===r&&(r={});var i={node:this};for(var n in r)i[n]=r[n];return t.warn(e,i)}};e.exports=u,u.default=u}),Zt=Pt((t,e)=>{var r=qt(),i=class extends r{constructor(t){super(t),this.type="comment"}};e.exports=i,i.default=i}),Jt=Pt((t,e)=>{var r=qt(),i=class extends r{get variable(){return this.prop.startsWith("--")||"$"===this.prop[0]}constructor(t){t&&void 0!==t.value&&"string"!=typeof t.value&&(t=o({},t,{value:String(t.value)})),super(t),this.type="decl"}};e.exports=i,i.default=i}),Xt=Pt((t,e)=>{var r,i,n,s,o=Zt(),a=Jt(),h=qt(),u=Yt(),l=u.isClean,f=u.my,c=class t extends h{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]}append(){for(var t=arguments.length,e=new Array(t),r=0;t>r;r++)e[r]=arguments[r];for(var i of e)for(var n of this.normalize(i,this.last))this.proxyOf.nodes.push(n);return this.markDirty(),this}cleanRaws(e){for(var r=[this];r.length>0;){var i=r.pop();if(i===this||i.cleanRaws===t.prototype.cleanRaws){if(h.prototype.cleanRaws.call(i,e),i.nodes)for(var n of i.nodes)r.push(n)}else i.cleanRaws(e)}}each(t){if(this.proxyOf.nodes){for(var e,r,i=this.getIterator();this.proxyOf.nodes.length>this.indexes[i]&&!1!==(r=t(this.proxyOf.nodes[e=this.indexes[i]],e));)this.indexes[i]+=1;return delete this.indexes[i],r}}every(t){return this.nodes.every(t)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;var t=this.lastEach;return this.indexes[t]=0,t}getProxyProcessor(){return{get(t,e){return"proxyOf"===e?t:t[e]?"each"===e||"string"==typeof e&&e.startsWith("walk")?function(){for(var r=arguments.length,i=new Array(r),n=0;r>n;n++)i[n]=arguments[n];return t[e](...i.map(t=>"function"==typeof t?(e,r)=>t(e.toProxy(),r):t))}:"every"===e||"some"===e?r=>t[e](function(t){for(var e=arguments.length,i=new Array(e>1?e-1:0),n=1;e>n;n++)i[n-1]=arguments[n];return r(t.toProxy(),...i)}):"root"===e?()=>t.root().toProxy():"nodes"===e?t.nodes.map(t=>t.toProxy()):"first"===e||"last"===e?t[e].toProxy():t[e]:t[e]},set(t,e,r){return t[e]===r||(t[e]=r,"name"!==e&&"params"!==e&&"selector"!==e||t.markDirty()),!0}}}index(t){return"number"==typeof t?t:(t.proxyOf&&(t=t.proxyOf),this.proxyOf.nodes.indexOf(t))}insertAfter(t,e){var r,i=this.index(t),n=this.normalize(e,this.proxyOf.nodes[i]).reverse();for(var s of(i=this.index(t),n))this.proxyOf.nodes.splice(i+1,0,s);for(var o in this.indexes)(r=this.indexes[o])>i&&(this.indexes[o]=r+n.length);return this.markDirty(),this}insertBefore(t,e){var r,i=this.index(t),n=this.normalize(e,this.proxyOf.nodes[i],0===i&&"prepend").reverse();for(var s of(i=this.index(t),n))this.proxyOf.nodes.splice(i,0,s);for(var o in this.indexes)i>(r=this.indexes[o])||(this.indexes[o]=r+n.length);return this.markDirty(),this}normalize(e,n){if("string"==typeof e)e=function(t){for(var e=t.slice();e.length>0;){var r=e.pop();if(delete r.source,r.nodes)for(var i of(r.nodes=r.nodes.slice(),r.nodes))e.push(i)}return t.slice()}(i(e).nodes);else if(void 0===e)e=[];else if(Array.isArray(e))for(var h of e=e.slice(0))h.parent&&h.parent.removeChild(h,"ignore");else if("root"===e.type&&"document"!==this.type)for(var u of e=e.nodes.slice(0))u.parent&&u.parent.removeChild(u,"ignore");else if(e.type)e=[e];else if(e.prop){if(void 0===e.value)throw new Error("Value field is missed in node creation");"string"!=typeof e.value&&(e.value=String(e.value)),e=[new a(e)]}else if(e.selector||e.selectors)e=[new s(e)];else if(e.name)e=[new r(e)];else{if(!e.text)throw new Error("Unknown node type in node creation");e=[new o(e)]}return e.map(e=>(e[f]||t.rebuild(e),(e=e.proxyOf).parent&&e.parent.removeChild(e),e[l]&&function(t){for(var e=[t];e.length>0;){var r=e.pop();if(r[l]=!1,r.proxyOf.nodes)for(var i of r.proxyOf.nodes)e.push(i)}}(e),e.raws||(e.raws={}),void 0===e.raws.before&&n&&void 0!==n.raws.before&&(e.raws.before=n.raws.before.replace(/\S/g,"")),e.parent=this.proxyOf,e))}prepend(){for(var t=arguments.length,e=new Array(t),r=0;t>r;r++)e[r]=arguments[r];for(var i of e=e.reverse()){var n=this.normalize(i,this.first,"prepend").reverse();for(var s of n)this.proxyOf.nodes.unshift(s);for(var o in this.indexes)this.indexes[o]=this.indexes[o]+n.length}return this.markDirty(),this}push(t){return t.parent=this,this.proxyOf.nodes.push(t),this}removeAll(){for(var t of this.proxyOf.nodes)t.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(t){var e;for(var r in t=this.index(t),this.proxyOf.nodes[t].parent=void 0,this.proxyOf.nodes.splice(t,1),this.indexes)t>(e=this.indexes[r])||(this.indexes[r]=e-1);return this.markDirty(),this}replaceValues(t,e,r){return r||(r=e,e={}),this.walkDecls(i=>{e.props&&!e.props.includes(i.prop)||e.fast&&!i.value.includes(e.fast)||(i.value=i.value.replace(t,r))}),this.markDirty(),this}some(t){return this.nodes.some(t)}walk(t){if(this.proxyOf.nodes)for(var e=[{iterator:this.getIterator(),node:this.proxyOf}];e.length>0;){var r=e[e.length-1],i=r.iterator,n=r.node,s=n.indexes[i];if(n.proxyOf.nodes.length>s){var o=n.proxyOf.nodes[s],a=void 0;try{a=t(o,s)}catch(t){throw o.addToError(t)}if(!1===a){for(var h of e)delete h.node.indexes[h.iterator];return!1}o.walk&&o.proxyOf.nodes?e.push({iterator:o.getIterator(),node:o}):n.indexes[i]+=1}else{delete n.indexes[i],e.pop();var u=e[e.length-1];u&&(u.node.indexes[u.iterator]+=1)}}}walkAtRules(t,e){return e?t instanceof RegExp?this.walk((r,i)=>{if("atrule"===r.type&&t.test(r.name))return e(r,i)}):this.walk((r,i)=>{if("atrule"===r.type&&r.name===t)return e(r,i)}):(e=t,this.walk((t,r)=>{if("atrule"===t.type)return e(t,r)}))}walkComments(t){return this.walk((e,r)=>{if("comment"===e.type)return t(e,r)})}walkDecls(t,e){return e?t instanceof RegExp?this.walk((r,i)=>{if("decl"===r.type&&t.test(r.prop))return e(r,i)}):this.walk((r,i)=>{if("decl"===r.type&&r.prop===t)return e(r,i)}):(e=t,this.walk((t,r)=>{if("decl"===t.type)return e(t,r)}))}walkRules(t,e){return e?t instanceof RegExp?this.walk((r,i)=>{if("rule"===r.type&&t.test(r.selector))return e(r,i)}):this.walk((r,i)=>{if("rule"===r.type&&r.selector===t)return e(r,i)}):(e=t,this.walk((t,r)=>{if("rule"===t.type)return e(t,r)}))}};c.registerParse=t=>{i=t},c.registerRule=t=>{s=t},c.registerAtRule=t=>{r=t},c.registerRoot=t=>{n=t},e.exports=c,c.default=c,c.rebuild=t=>{for(var e=[t];e.length>0;){var i=e.pop();if("atrule"===i.type?Object.setPrototypeOf(i,r.prototype):"rule"===i.type?Object.setPrototypeOf(i,s.prototype):"decl"===i.type?Object.setPrototypeOf(i,a.prototype):"comment"===i.type?Object.setPrototypeOf(i,o.prototype):"root"===i.type&&Object.setPrototypeOf(i,n.prototype),i[f]=!0,i.nodes)for(var h of i.nodes)e.push(h)}}}),Kt=Pt((t,e)=>{var r=Xt(),i=class extends r{constructor(t){super(t),this.type="atrule"}append(){return this.proxyOf.nodes||(this.nodes=[]),super.append(...arguments)}prepend(){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...arguments)}};e.exports=i,i.default=i,r.registerAtRule(i)}),Qt=Pt((t,e)=>{var r,i,n=Xt(),s=class extends n{constructor(t){super(o({type:"document"},t)),this.nodes||(this.nodes=[])}toResult(t){return void 0===t&&(t={}),new r(new i,this,t).stringify()}};s.registerLazyResult=t=>{r=t},s.registerProcessor=t=>{i=t},e.exports=s,s.default=s}),te=Pt((t,e)=>{e.exports={nanoid(t){void 0===t&&(t=21);for(var e="",r=0|t;r-- >0;)e+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return e},customAlphabet:(t,e)=>(void 0===e&&(e=21),function(r){void 0===r&&(r=e);for(var i="",n=0|r;n-- >0;)i+=t[Math.random()*t.length|0];return i})}}),ee=Pt((t,e)=>{var r=Gt(),i=r.existsSync,n=r.readFileSync,s=Gt(),o=s.dirname,a=s.isAbsolute,h=s.join,u=s.relative,l=s.sep,f=Gt(),c=f.SourceMapConsumer,v=f.SourceMapGenerator,d=class{constructor(t,e){if(!1!==e.map){e.unsafeMap&&(this.unsafeMap=!0),this.loadAnnotation(t),this.inline=this.startWith(this.annotation,"data:");var r=this.loadMap(e.from,e.map?e.map.prev:void 0);!this.mapFile&&e.from&&(this.mapFile=e.from),this.mapFile&&(this.root=o(this.mapFile)),r&&(this.text=r)}}consumer(){return this.consumerCache||(this.consumerCache=new c(this.json||this.text)),this.consumerCache}decodeInline(t){var e=t.match(/^data:application\/json;charset=utf-?8,/)||t.match(/^data:application\/json,/);if(e)return decodeURIComponent(t.substr(e[0].length));var r,i=t.match(/^data:application\/json;charset=utf-?8;base64,/)||t.match(/^data:application\/json;base64,/);if(i)return r=t.substr(i[0].length),Buffer?Buffer.from(r,"base64").toString():window.atob(r);var n=t.slice(22);throw n=n.slice(0,n.indexOf(",")),new Error("Unsupported source map encoding "+n)}getAnnotationURL(t){return t.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(t){return"object"==typeof t&&("string"==typeof t.mappings||"string"==typeof t._mappings||Array.isArray(t.sections))}loadAnnotation(t){var e=t.match(/\/\*\s*# sourceMappingURL=/g);if(e){var r=t.lastIndexOf(e.pop()),i=t.indexOf("*/",r);r>-1&&i>-1&&(this.annotation=this.getAnnotationURL(t.substring(r,i)))}}loadFile(t,e,r){if(!r&&!this.unsafeMap){if(!/\.map$/i.test(t))return;if(!e)return;var s=u(o(e),t);if(".."===s||s.startsWith(".."+l)||a(s))return}if(this.root=o(t),i(t))return this.mapFile=t,n(t,"utf-8").toString().trim()}loadMap(t,e){if(!1===e)return!1;if(e){if("string"==typeof e)return e;if("function"!=typeof e){if(e instanceof c)return v.fromSourceMap(e).toString();if(e instanceof v)return e.toString();if(this.isMap(e))return JSON.stringify(e);throw new Error("Unsupported previous source map format: "+e.toString())}var r=e(t);if(r){var i=this.loadFile(r,t,!0);if(!i)throw new Error("Unable to load previous source map: "+r.toString());return i}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){var n=this.annotation;t&&(n=h(o(t),n));var s=this.loadFile(n,t,!1);if(s)try{this.json=JSON.parse(s.replace(/^\)]}'[^\n]*\n/,""))}catch(t){return}return s}}}startWith(t,e){return!!t&&t.substr(0,e.length)===e}withContent(){return!(!this.consumer().sourcesContent||0>=this.consumer().sourcesContent.length)}};e.exports=d,d.default=d}),re=Pt((t,e)=>{var r=te().nanoid,i=Gt(),n=i.isAbsolute,s=i.resolve,a=Gt(),h=a.SourceMapConsumer,u=a.SourceMapGenerator,l=Gt(),f=l.fileURLToPath,c=l.pathToFileURL,v=zt(),d=ee(),p=Gt(),m=Symbol("lineToIndexCache"),y=Boolean(h&&u),g=Boolean(s&&n);function w(t){if(t[m])return t[m];for(var e=t.css.split("\n"),r=new Array(e.length),i=0,n=0,s=e.length;s>n;n++)r[n]=i,i+=e[n].length+1;return t[m]=r,r}var b=class{get from(){return this.file||this.id}constructor(t,e){if(void 0===e&&(e={}),null==t||"object"==typeof t&&!t.toString)throw new Error("PostCSS received "+t+" instead of CSS string");if(this.css=t.toString(),"\ufeff"===this.css[0]||""===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,this.document=this.css,e.document&&(this.document=e.document.toString()),e.from&&(this.file=!g||/^\w+:\/\//.test(e.from)||n(e.from)?e.from:s(e.from)),g&&y){var i=new d(this.css,e);if(i.text){this.map=i;var o=i.consumer().file;!this.file&&o&&(this.file=this.mapResolve(o))}}this.file||(this.id="<input css "+r(6)+">"),this.map&&(this.map.file=this.from)}error(t,e,r,i){var n,s,o,a,h;if(void 0===i&&(i={}),e&&"object"==typeof e){var u=e,l=r;if("number"==typeof u.offset){var f=this.fromOffset(a=u.offset);e=f.line,r=f.col}else a=this.fromLineAndColumn(e=u.line,r=u.column);if("number"==typeof l.offset){var d=this.fromOffset(o=l.offset);s=d.line,n=d.col}else s=l.line,n=l.column,o=this.fromLineAndColumn(l.line,l.column)}else if(r)a=this.fromLineAndColumn(e,r);else{var p=this.fromOffset(a=e);e=p.line,r=p.col}var m=this.origin(e,r,s,n);return(h=m?new v(t,void 0===m.endLine?m.line:{column:m.column,line:m.line},void 0===m.endLine?m.column:{column:m.endColumn,line:m.endLine},m.source,m.file,i.plugin):new v(t,void 0===s?e:{column:r,line:e},void 0===s?r:{column:n,line:s},this.css,this.file,i.plugin)).input={column:r,endColumn:n,endLine:s,endOffset:o,line:e,offset:a,source:this.css},this.file&&(c&&(h.input.url=c(this.file).toString()),h.input.file=this.file),h}fromLineAndColumn(t,e){return w(this)[t-1]+e-1}fromOffset(t){var e=w(this),r=0;if(e[e.length-1]>t)for(var i,n=e.length-2;n>r;)if(e[i=r+(n-r>>1)]>t)n=i-1;else{if(e[i+1]>t){r=i;break}r=i+1}else r=e.length-1;return{col:t-e[r]+1,line:r+1}}mapResolve(t){return/^\w+:\/\//.test(t)?t:s(this.map.consumer().sourceRoot||this.map.root||".",t)}origin(t,e,r,i){if(!this.map)return!1;var s,o,a=this.map.consumer(),h=a.originalPositionFor({column:e-1,line:t});if(!h.source)return!1;if("number"==typeof r){var u=a.originalPositionFor({column:i-1,line:r});u.source&&(s=u)}o=n(h.source)?c(h.source):new URL(h.source,this.map.consumer().sourceRoot||c(this.map.mapFile));var l={column:h.column+1,endColumn:s&&s.column+1,endLine:s&&s.line,line:h.line,url:o.toString()};if("file:"===o.protocol){if(!f)throw new Error("file: protocol is not available in this PostCSS build");l.file=f(o)}var v=a.sourceContentFor(h.source);return v&&(l.source=v),l}toJSON(){var t={};for(var e of["hasBOM","css","file","id"])null!=this[e]&&(t[e]=this[e]);return this.map&&(t.map=o({},this.map),t.map.consumerCache&&(t.map.consumerCache=void 0)),t}};e.exports=b,b.default=b,p&&p.registerInput&&p.registerInput(b)}),ie=Pt((t,e)=>{var r,i,n=Xt(),s=class extends n{constructor(t){super(t),this.type="root",this.nodes||(this.nodes=[])}normalize(t,e,r){var i=new Set;for(var n of Array.isArray(t)?t:[t])n&&"object"==typeof n&&!n.parent&&n.raws&&void 0!==n.raws.before&&i.add(n.raws);var s=super.normalize(t);if(e)if("prepend"===r)this.nodes.length>1?e.raws.before=this.nodes[1].raws.before:delete e.raws.before;else if(this.first!==e)for(var o of s)i.has(o.raws)||(o.raws.before=e.raws.before);return s}removeChild(t,e){var r=this.index(t);return!e&&0===r&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(t)}toResult(t){return void 0===t&&(t={}),new r(new i,this,t).stringify()}};s.registerLazyResult=t=>{r=t},s.registerProcessor=t=>{i=t},e.exports=s,s.default=s,n.registerRoot(s)}),ne=Pt((t,e)=>{var r={comma(t){return r.split(t,[","],!0)},space(t){return r.split(t,[" ","\n","\t"])},split(t,e,r){var i=[],n="",s=!1,o=0,a=!1,h="",u=!1;for(var l of t)u?u=!1:"\\"===l?u=!0:a?l===h&&(a=!1):'"'===l||"'"===l?(a=!0,h=l):"("===l?o+=1:")"===l?o>0&&(o-=1):0===o&&e.includes(l)&&(s=!0),s?(""!==n&&i.push(n.trim()),n="",s=!1):n+=l;return(r||""!==n)&&i.push(n.trim()),i}};e.exports=r,r.default=r}),se=Pt((t,e)=>{var r=Xt(),i=ne(),n=class extends r{get selectors(){return i.comma(this.selector)}set selectors(t){var e=this.selector?this.selector.match(/,\s*/):null,r=e?e[0]:","+this.raw("between","beforeOpen");this.selector=t.join(r)}constructor(t){super(t),this.type="rule",this.nodes||(this.nodes=[])}};e.exports=n,n.default=n,r.registerRule(n)}),oe=Pt((e,r)=>{var i=Kt(),n=Zt(),a=Jt(),h=re(),u=ee(),l=ie(),f=se();function c(t,e){return t.inputs?t.inputs.map(t=>{var e=o({},t,{__proto__:h.prototype});return e.map&&(e.map=o({},e.map,{__proto__:u.prototype})),e}):e}function v(e,r,h){var u,c=o({},e);if(delete c.inputs,delete c.nodes,c.source){var v=c.source,d=v.inputId;c.source=s(v,t),null!=d&&(c.source.input=r[d])}if("root"===c.type)u=new l(c);else if("decl"===c.type)u=new a(c);else if("rule"===c.type)u=new f(c);else if("comment"===c.type)u=new n(c);else{if("atrule"!==c.type)throw new Error("Unknown node type: "+e.type);u=new i(c)}if(h)for(var p of(u.nodes=h,h))p.parent=u;return u}function d(t,e){if(Array.isArray(t))return t.map(t=>d(t));for(var r,i=[{childIndex:0,children:[],inputs:c(t,e),json:t}];i.length>0;){var n=i[i.length-1],s=n.json.nodes;if(s&&s.length>n.childIndex){var o=s[n.childIndex];n.childIndex+=1,i.push({childIndex:0,children:[],inputs:c(o,n.inputs),json:o})}else{i.pop();var a=v(n.json,n.inputs,s?n.children:void 0);i.length>0?i[i.length-1].children.push(a):r=a}}return r}r.exports=d,d.default=d}),ae=Pt((t,e)=>{var r=Gt(),i=r.dirname,n=r.relative,s=r.resolve,o=r.sep,a=Gt(),h=a.SourceMapConsumer,u=a.SourceMapGenerator,l=Gt().pathToFileURL,f=re(),c=Boolean(h&&u),v=Boolean(i&&s&&n&&o);e.exports=class{constructor(t,e,r,i){this.stringify=t,this.mapOpts=r.map||{},this.root=e,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(){var t;t=this.isInline()?"data:application/json;base64,"+this.toBase64(this.map.toString()):"string"==typeof this.mapOpts.annotation?this.mapOpts.annotation:"function"==typeof this.mapOpts.annotation?this.mapOpts.annotation(this.opts.to,this.root):this.outputFile()+".map";var e="\n";this.css.includes("\r\n")&&(e="\r\n"),this.css+=e+"/*# sourceMappingURL="+t+" */"}applyPrevMaps(){for(var t of this.previous()){var e=this.toUrl(this.path(t.file)),r=t.root||i(t.file),n=void 0;!1===this.mapOpts.sourcesContent?(n=new h(t.text)).sourcesContent&&(n.sourcesContent=null):n=t.consumer(),this.map.applySourceMap(n,e,this.toUrl(this.path(r)))}}clearAnnotation(){if(!1!==this.mapOpts.annotation)if(this.root)for(var t,e=this.root.nodes.length-1;e>=0;e--)"comment"===(t=this.root.nodes[e]).type&&t.text.startsWith("# sourceMappingURL=")&&this.root.removeChild(e);else if(this.css)for(var r;-1!==(r=this.css.lastIndexOf("/*#"));){var i=this.css.indexOf("*/",r+3);if(-1===i)break;for(;r>0&&"\n"===this.css[r-1];)r--;this.css=this.css.slice(0,r)+this.css.slice(i+2)}}generate(){if(this.clearAnnotation(),v&&c&&this.isMap())return this.generateMap();var t="";return this.stringify(this.root,e=>{t+=e}),[t]}generateMap(){if(this.root)this.generateString();else if(1===this.previous().length){var t=this.previous()[0].consumer();t.file=this.outputFile(),this.map=u.fromSourceMap(t,{ignoreInvalidMapping:!0})}else this.map=new u({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css="",this.map=new u({file:this.outputFile(),ignoreInvalidMapping:!0});var t,e,r=1,i=1,n="<no source>",s={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,(o,a,h)=>{if(this.css+=o,a&&"end"!==h&&(s.generated.line=r,s.generated.column=i-1,a.source&&a.source.start?(s.source=this.sourcePath(a),s.original.line=a.source.start.line,s.original.column=a.source.start.column-1,this.map.addMapping(s)):(s.source=n,s.original.line=1,s.original.column=0,this.map.addMapping(s))),(e=o.match(/\n/g))?(r+=e.length,t=o.lastIndexOf("\n"),i=o.length-t):i+=o.length,a&&"start"!==h){var u=a.parent||{raws:{}};("decl"!==a.type&&("atrule"!==a.type||a.nodes)||a!==u.last||u.raws.semicolon)&&(a.source&&a.source.end?(s.source=this.sourcePath(a),s.original.line=a.source.end.line,s.original.column=a.source.end.column-1,s.generated.line=r,s.generated.column=i-2,this.map.addMapping(s)):(s.source=n,s.original.line=1,s.original.column=0,s.generated.line=r,s.generated.column=i-1,this.map.addMapping(s)))}})}isAnnotation(){return!!this.isInline()||(void 0!==this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some(t=>t.annotation))}isInline(){if(void 0!==this.mapOpts.inline)return this.mapOpts.inline;var t=this.mapOpts.annotation;return(void 0===t||!0===t)&&(!this.previous().length||this.previous().some(t=>t.inline))}isMap(){return void 0!==this.opts.map?!!this.opts.map:this.previous().length>0}isSourcesContent(){return void 0!==this.mapOpts.sourcesContent?this.mapOpts.sourcesContent:!this.previous().length||this.previous().some(t=>t.withContent())}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(t){if(this.mapOpts.absolute)return t;if(60===t.charCodeAt(0))return t;if(/^\w+:\/\//.test(t))return t;var e=this.memoizedPaths.get(t);if(e)return e;var r=this.opts.to?i(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(r=i(s(r,this.mapOpts.annotation)));var o=n(r,t);return this.memoizedPaths.set(t,o),o}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(t=>{if(t.source&&t.source.input.map){var e=t.source.input.map;this.previousMaps.includes(e)||this.previousMaps.push(e)}});else{var t=new f(this.originalCSS,this.opts);t.map&&this.previousMaps.push(t.map)}return this.previousMaps}setSourcesContent(){var t={};if(this.root)this.root.walk(e=>{if(e.source){var r=e.source.input.from;if(r&&!t[r]){t[r]=!0;var i=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(i,e.source.input.css)}}});else if(this.css){var e=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(e,this.css)}}sourcePath(t){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(t.source.input.from):this.toUrl(this.path(t.source.input.from))}toBase64(t){return Buffer?Buffer.from(t).toString("base64"):window.btoa(unescape(encodeURIComponent(t)))}toFileUrl(t){var e=this.memoizedFileURLs.get(t);if(e)return e;if(l){var r=l(t).toString();return this.memoizedFileURLs.set(t,r),r}throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(t){var e=this.memoizedURLs.get(t);if(e)return e;"\\"===o&&(t=t.replace(/\\/g,"/"));var r=encodeURI(t).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(t,r),r}}}),he=Pt((t,e)=>{var r="'".charCodeAt(0),i='"'.charCodeAt(0),n="\\".charCodeAt(0),s="/".charCodeAt(0),o="\n".charCodeAt(0),a=" ".charCodeAt(0),h="\f".charCodeAt(0),u="\t".charCodeAt(0),l="\r".charCodeAt(0),f="[".charCodeAt(0),c="]".charCodeAt(0),v="(".charCodeAt(0),d=")".charCodeAt(0),p="{".charCodeAt(0),m="}".charCodeAt(0),y=";".charCodeAt(0),g="*".charCodeAt(0),w=":".charCodeAt(0),b="@".charCodeAt(0),S=/[\t\n\f\r "#'()/;[\\\]{}]/g,k=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,C=/.[\r\n"'(/\\]/,M=/[\da-f]/i;e.exports=function(t,e){void 0===e&&(e={});var x,A,E,R,I,T,O,D,N,_,L=t.css.valueOf(),F=e.ignoreErrors,P=L.length,B=0,j=[],U=[],W=-1;function H(e){throw t.error("Unclosed "+e,B)}return{back(t){U.push(t)},endOfFile:()=>0===U.length&&B>=P,nextToken(t){if(U.length)return U.pop();if(P>B){var e=!!t&&t.ignoreUnclosed;switch(x=L.charCodeAt(B)){case o:case a:case u:case l:case h:R=B;do{x=L.charCodeAt(R+=1)}while(x===a||x===o||x===u||x===l||x===h);T=["space",L.slice(B,R)],B=R-1;break;case f:case c:case p:case m:case w:case y:case d:var G=String.fromCharCode(x);T=[G,G,B];break;case v:if(_=j.length?j.pop()[1]:"",N=L.charCodeAt(B+1),"url"===_&&N!==r&&N!==i&&N!==a&&N!==o&&N!==u&&N!==h&&N!==l){R=B;do{if(O=!1,-1===(R=L.indexOf(")",R+1))){if(F||e){R=B;break}H("bracket")}for(D=R;L.charCodeAt(D-1)===n;)D-=1,O=!O}while(O);T=["brackets",L.slice(B,R+1),B,R],B=R}else B>W?(R=L.indexOf(")",B+1),A=L.slice(B,R+1),-1===R||C.test(A)?(W=-1===R?P:R,T=["(","(",B]):(T=["brackets",A,B,R],B=R)):T=["(","(",B];break;case r:case i:I=x===r?"'":'"',R=B;do{if(O=!1,-1===(R=L.indexOf(I,R+1))){if(F||e){R=B+1;break}H("string")}for(D=R;L.charCodeAt(D-1)===n;)D-=1,O=!O}while(O);T=["string",L.slice(B,R+1),B,R],B=R;break;case b:S.lastIndex=B+1,S.test(L),T=["at-word",L.slice(B,1+(R=0===S.lastIndex?L.length-1:S.lastIndex-2)),B,R],B=R;break;case n:for(R=B,E=!0;L.charCodeAt(R+1)===n;)R+=1,E=!E;if(x=L.charCodeAt(R+1),E&&x!==s&&x!==a&&x!==o&&x!==u&&x!==l&&x!==h&&M.test(L.charAt(R+=1))){for(;M.test(L.charAt(R+1));)R+=1;L.charCodeAt(R+1)===a&&(R+=1)}T=["word",L.slice(B,R+1),B,R],B=R;break;default:x===s&&L.charCodeAt(B+1)===g?(0===(R=L.indexOf("*/",B+2)+1)&&(F||e?R=L.length:H("comment")),T=["comment",L.slice(B,R+1),B,R],B=R):(k.lastIndex=B+1,k.test(L),T=["word",L.slice(B,1+(R=0===k.lastIndex?L.length-1:k.lastIndex-2)),B,R],j.push(T),B=R)}return B++,T}},position:()=>B}}}),ue=Pt((t,e)=>{var r=Kt(),i=Zt(),n=Jt(),s=ie(),o=se(),a=he(),h={empty:!0,space:!0};function u(t,e,r){for(var i="",n=e;r>n;n++)i+=t[n][1];return i}e.exports=class{constructor(t){this.input=t,this.root=new s,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:t,start:{column:1,line:1,offset:0}}}atrule(t){var e,i,n,s=new r;s.name=t[1].slice(1),""===s.name&&this.unnamedAtrule(s,t),this.init(s,t[2]);for(var o=!1,a=!1,h=[],u=[];!this.tokenizer.endOfFile();){if("("===(e=(t=this.tokenizer.nextToken())[0])||"["===e?u.push("("===e?")":"]"):"{"===e&&u.length>0?u.push("}"):e===u[u.length-1]&&u.pop(),0===u.length){if(";"===e){s.source.end=this.getPosition(t[2]),s.source.end.offset++,this.semicolon=!0;break}if("{"===e){a=!0;break}if("}"===e){if(h.length>0){for(i=h[n=h.length-1];i&&"space"===i[0];)i=h[--n];i&&(s.source.end=this.getPosition(i[3]||i[2]),s.source.end.offset++)}this.end(t);break}h.push(t)}else h.push(t);if(this.tokenizer.endOfFile()){o=!0;break}}s.raws.between=this.spacesAndCommentsFromEnd(h),h.length?(s.raws.afterName=this.spacesAndCommentsFromStart(h),this.raw(s,"params",h),o&&(s.source.end=this.getPosition((t=h[h.length-1])[3]||t[2]),s.source.end.offset++,this.spaces=s.raws.between,s.raws.between="")):(s.raws.afterName="",s.params=""),a&&(s.nodes=[],this.current=s)}checkMissedSemicolon(t){var e=this.colon(t);if(!1!==e){for(var r,i=0,n=e-1;n>=0&&("space"===(r=t[n])[0]||2!==(i+=1));n--);throw this.input.error("Missed semicolon","word"===r[0]?r[3]+1:r[2])}}colon(t){var e,r,i,n=0;for(var s of t.entries()){var o=s[0];if("("===(i=(r=s[1])[0])&&(n+=1),")"===i&&(n-=1),0===n&&":"===i){if(e){if("word"===e[0]&&"progid"===e[1])continue;return o}this.doubleColon(r)}e=r}return!1}comment(t){var e=new i;this.init(e,t[2]),e.source.end=this.getPosition(t[3]||t[2]),e.source.end.offset++;var r=t[1].slice(2,-2);if(r.trim()){var n=r.match(/^(\s*)([^]*\S)(\s*)$/);e.text=n[2],e.raws.left=n[1],e.raws.right=n[3]}else e.text="",e.raws.left=r,e.raws.right=""}createTokenizer(){this.tokenizer=a(this.input)}decl(t,e){var r=new n;this.init(r,t[0][2]);var i=t[t.length-1];";"===i[0]&&(this.semicolon=!0,t.pop()),r.source.end=this.getPosition(i[3]||i[2]||function(t){for(var e=t.length-1;e>=0;e--){var r=t[e],i=r[3]||r[2];if(i)return i}}(t)),r.source.end.offset++;for(var s=0;"word"!==t[s][0];)s===t.length-1&&this.unknownWord([t[s]]),s++;r.raws.before+=u(t,0,s),r.source.start=this.getPosition(t[s][2]);for(var o=s;t.length>s;){var a=t[s][0];if(":"===a||"space"===a||"comment"===a)break;s++}r.prop=u(t,o,s);for(var h,l=s;t.length>s&&(h=t[s],s++,":"!==h[0]);)"word"===h[0]&&/\w/.test(h[1])&&this.unknownWord([h]);r.raws.between=u(t,l,s),"_"!==r.prop[0]&&"*"!==r.prop[0]||(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));for(var f=s;t.length>s;){var c=t[s][0];if("space"!==c&&"comment"!==c)break;s++}var v=t.slice(f,s);t=t.slice(s),this.precheckMissedSemicolon(t);for(var d=t.length-1;d>=0;d--){if("!important"===(h=t[d])[1].toLowerCase()){r.important=!0;var p=this.stringFrom(t,d);" !important"!==(p=this.spacesFromEnd(t)+p)&&(r.raws.important=p);break}if("important"===h[1].toLowerCase()){for(var m=t.slice(0),y="",g=d;g>0;g--){var w=m[g][0];if(y.trim().startsWith("!")&&"space"!==w)break;y=m.pop()[1]+y}y.trim().startsWith("!")&&(r.important=!0,r.raws.important=y,t=m)}if("space"!==h[0]&&"comment"!==h[0])break}t.some(t=>"space"!==t[0]&&"comment"!==t[0])&&(r.raws.between+=v.map(t=>t[1]).join(""),v=[]),this.raw(r,"value",v.concat(t),e),r.value.includes(":")&&!e&&this.checkMissedSemicolon(t)}doubleColon(t){throw this.input.error("Double colon",{offset:t[2]},{offset:t[2]+t[1].length})}emptyRule(t){var e=new o;this.init(e,t[2]),e.selector="",e.raws.between="",this.current=e}end(t){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(t[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(t)}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(t){if(this.spaces+=t[1],this.current.nodes){var e=this.current.nodes[this.current.nodes.length-1];e&&"rule"===e.type&&!e.raws.ownSemicolon&&(e.raws.ownSemicolon=this.spaces,this.spaces="",e.source.end=this.getPosition(t[2]),e.source.end.offset+=e.raws.ownSemicolon.length)}}getPosition(t){var e=this.input.fromOffset(t);return{column:e.col,line:e.line,offset:t}}init(t,e){this.current.push(t),t.source={input:this.input,start:this.getPosition(e)},t.raws.before=this.spaces,this.spaces="","comment"!==t.type&&(this.semicolon=!1)}other(t){for(var e=!1,r=null,i=!1,n=null,s=[],o=t[1].startsWith("--"),a=[],h=t;h;){if(r=h[0],a.push(h),"("===r||"["===r)n||(n=h),s.push("("===r?")":"]");else if(o&&i&&"{"===r)n||(n=h),s.push("}");else if(0===s.length){if(";"===r){if(i)return void this.decl(a,o);break}if("{"===r)return void this.rule(a);if("}"===r){this.tokenizer.back(a.pop()),e=!0;break}":"===r&&(i=!0)}else r===s[s.length-1]&&(s.pop(),0===s.length&&(n=null));h=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(e=!0),s.length>0&&this.unclosedBracket(n),e&&i){if(!o)for(;a.length&&("space"===(h=a[a.length-1][0])||"comment"===h);)this.tokenizer.back(a.pop());this.decl(a,o)}else this.unknownWord(a)}parse(){for(var t;!this.tokenizer.endOfFile();)switch((t=this.tokenizer.nextToken())[0]){case"space":this.spaces+=t[1];break;case";":this.freeSemicolon(t);break;case"}":this.end(t);break;case"comment":this.comment(t);break;case"at-word":this.atrule(t);break;case"{":this.emptyRule(t);break;default:this.other(t)}this.endFile()}precheckMissedSemicolon(){}raw(t,e,r,i){for(var n,s,o=r.length,a="",u=!0,l=0;o>l;l+=1)"space"!==(s=(n=r[l])[0])||l!==o-1||i?"comment"===s&&(h[r[l-1]?r[l-1][0]:"empty"]||h[r[l+1]?r[l+1][0]:"empty"]||","===a.slice(-1))?u=!1:a+=n[1]:u=!1;if(!u){var f=r.reduce((t,e)=>t+e[1],"");t.raws[e]={raw:f,value:a}}t[e]=a}rule(t){t.pop();var e=new o;this.init(e,t[0][2]),e.raws.between=this.spacesAndCommentsFromEnd(t),this.raw(e,"selector",t),this.current=e}spacesAndCommentsFromEnd(t){for(var e,r="";t.length&&("space"===(e=t[t.length-1][0])||"comment"===e);)r=t.pop()[1]+r;return r}spacesAndCommentsFromStart(t){for(var e,r="";t.length&&("space"===(e=t[0][0])||"comment"===e);)r+=t.shift()[1];return r}spacesFromEnd(t){for(var e="";t.length&&"space"===t[t.length-1][0];)e=t.pop()[1]+e;return e}stringFrom(t,e){for(var r="",i=e;t.length>i;i++)r+=t[i][1];return t.splice(e,t.length-e),r}unclosedBlock(){var t=this.current.source.start;throw this.input.error("Unclosed block",t.line,t.column)}unclosedBracket(t){throw this.input.error("Unclosed bracket",{offset:t[2]},{offset:t[2]+1})}unexpectedClose(t){throw this.input.error("Unexpected }",{offset:t[2]},{offset:t[2]+1})}unknownWord(t){throw this.input.error("Unknown word "+t[0][1],{offset:t[0][2]},{offset:t[0][2]+t[0][1].length})}unnamedAtrule(t,e){throw this.input.error("At-rule without name",{offset:e[2]},{offset:e[2]+e[1].length})}}}),le=Pt((t,e)=>{var r=Xt(),i=re(),n=ue();function s(t,e){var r=new n(new i(t,e));try{r.parse()}catch(t){throw"CssSyntaxError"===t.name&&e&&e.from&&(/\.scss$/i.test(e.from)?t.message+="\nYou tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser":/\.sass/i.test(e.from)?t.message+="\nYou tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser":/\.less$/i.test(e.from)&&(t.message+="\nYou tried to parse Less with the standard CSS parser; try again with the postcss-less parser")),t}return r.root}e.exports=s,s.default=s,r.registerParse(s)}),fe=Pt((t,e)=>{var r=Xt(),i=Yt().my,n=class{constructor(t,e){if(void 0===e&&(e={}),this.type="warning",this.text=t,e.node&&e.node.source){e.node[i]||r.rebuild(e.node);var n=e.node.rangeBy(e);this.line=n.start.line,this.column=n.start.column,this.endLine=n.end.line,this.endColumn=n.end.column}for(var s in e)this[s]=e[s]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}};e.exports=n,n.default=n}),ce=Pt((t,e)=>{var r=fe(),i=class{get content(){return this.css}constructor(t,e,r){this.processor=t,this.messages=[],this.root=e,this.opts=r,this.css="",this.map=void 0}toString(){return this.css}warn(t,e){void 0===e&&(e={}),e.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(e.plugin=this.lastPlugin.postcssPlugin);var i=new r(t,e);return this.messages.push(i),i}warnings(){return this.messages.filter(t=>"warning"===t.type)}};e.exports=i,i.default=i}),ve=Pt((t,e)=>{var r={};e.exports=function(t){r[t]||(r[t]=!0,"undefined"!=typeof console&&console.warn&&console.warn(t))}}),de=Pt((t,e)=>{var r=Xt(),i=Qt(),s=ae(),a=le(),h=ce(),u=ie(),l=$t(),f=Yt(),c=f.isClean,v=f.my,d=ve(),p={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},m={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},y={Once:!0,postcssPlugin:!0,prepare:!0};function g(t){return"object"==typeof t&&"function"==typeof t.then}function w(t){var e=!1,r=p[t.type];return"decl"===t.type?e=t.prop.toLowerCase():"atrule"===t.type&&(e=t.name.toLowerCase()),e&&t.append?[r,r+"-"+e,0,r+"Exit",r+"Exit-"+e]:e?[r,r+"-"+e,r+"Exit",r+"Exit-"+e]:t.append?[r,0,r+"Exit"]:[r,r+"Exit"]}function b(t){return{eventIndex:0,events:"document"===t.type?["Document",0,"DocumentExit"]:"root"===t.type?["Root",0,"RootExit"]:w(t),iterator:0,node:t,visitorIndex:0,visitors:[]}}function S(t){for(var e=[t];e.length>0;){var r=e.pop();if(r[c]=!1,r.nodes)for(var i of r.nodes)e.push(i)}return t}var k={},C=class t{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"}constructor(e,i,n){var s;if(this.stringified=!1,this.processed=!1,"object"!=typeof i||null===i||"root"!==i.type&&"document"!==i.type)if(i instanceof t||i instanceof h)s=S(i.root),i.map&&(void 0===n.map&&(n.map={}),n.map.inline||(n.map.inline=!1),n.map.prev=i.map);else{var u=a;n.syntax&&(u=n.syntax.parse),n.parser&&(u=n.parser),u.parse&&(u=u.parse);try{s=u(i,n)}catch(t){this.processed=!0,this.error=t}s&&!s[v]&&r.rebuild(s)}else s=S(i);this.result=new h(e,s,n),this.helpers=o({},k,{postcss:k,result:this.result}),this.plugins=this.processor.plugins.map(t=>"object"==typeof t&&t.prepare?o({},t,t.prepare(this.result)):t)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(t){return this.async().catch(t)}finally(t){return this.async().then(t,t)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(t,e){var r=this.result.lastPlugin;try{if(e&&e.addToError(t),this.error=t,"CssSyntaxError"!==t.name||t.plugin){if(r.postcssVersion){var i=r.postcssPlugin,n=r.postcssVersion,s=this.result.processor.version,o=n.split("."),a=s.split(".");(o[0]!==a[0]||parseInt(o[1])>parseInt(a[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+s+", but "+i+" uses "+n+". Perhaps this is the source of the error below.")}}else t.plugin=r.postcssPlugin,t.setMessage()}catch(t){console&&console.error&&console.error(t)}return t}prepareVisitors(){this.listeners={};var t=(t,e,r)=>{this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push([t,r])};for(var e of this.plugins)if("object"==typeof e)for(var r in e){if(!m[r]&&/^[A-Z]/.test(r))throw new Error("Unknown event "+r+" in "+e.postcssPlugin+". Try to update PostCSS ("+this.processor.version+" now).");if(!y[r])if("object"==typeof e[r])for(var i in e[r])t(e,"*"===i?r:r+"-"+i.toLowerCase(),e[r][i]);else"function"==typeof e[r]&&t(e,r,e[r])}this.hasListener=Object.keys(this.listeners).length>0}runAsync(){var t=this;return n(function*(){t.plugin=0;for(var e=0;t.plugins.length>e;e++){var r=t.runOnRoot(t.plugins[e]);if(g(r))try{yield r}catch(e){throw t.handleError(e)}}if(t.prepareVisitors(),t.hasListener){for(var i=t.result.root;!i[c];){i[c]=!0;for(var n=[b(i)];n.length>0;){var s=t.visitTick(n);if(g(s))try{yield s}catch(e){throw t.handleError(e,n[n.length-1].node)}}}if(t.listeners.OnceExit){var o=function*(){var e=a[1];t.result.lastPlugin=a[0];try{if("document"===i.type){var r=i.nodes.map(r=>e(r,t.helpers));yield Promise.all(r)}else yield e(i,t.helpers)}catch(e){throw t.handleError(e)}};for(var a of t.listeners.OnceExit)yield*o()}}return t.processed=!0,t.stringify()})()}runOnRoot(t){this.result.lastPlugin=t;try{if("object"==typeof t&&t.Once){if("document"===this.result.root.type){var e=this.result.root.nodes.map(e=>t.Once(e,this.helpers));return g(e[0])?Promise.all(e):e}return t.Once(this.result.root,this.helpers)}if("function"==typeof t)return t(this.result.root,this.result)}catch(t){throw this.handleError(t)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();var t=this.result.opts,e=l;t.syntax&&(e=t.syntax.stringify),t.stringifier&&(e=t.stringifier),e.stringify&&(e=e.stringify);var r=this.result.root.source;if(void 0===t.map&&!(r&&r.input&&r.input.map)){var i="";return e(this.result.root,t=>{i+=t}),this.result.css=i,this.result}var n=new s(e,this.result.root,this.result.opts).generate();return this.result.css=n[0],this.result.map=n[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(var t of this.plugins)if(g(this.runOnRoot(t)))throw this.getAsyncError();if(this.prepareVisitors(),this.hasListener){for(var e=this.result.root;!e[c];)e[c]=!0,this.walkSync(e);if(this.listeners.OnceExit)if("document"===e.type)for(var r of e.nodes)this.visitSync(this.listeners.OnceExit,r);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(t,e){return"from"in this.opts||d("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(t,e)}toString(){return this.css}visitSync(t,e){for(var r of t){var i=r[1];this.result.lastPlugin=r[0];var n=void 0;try{n=i(e,this.helpers)}catch(t){throw this.handleError(t,e.proxyOf)}if("root"!==e.type&&"document"!==e.type&&!e.parent)return!0;if(g(n))throw this.getAsyncError()}}visitTick(t){var e=t[t.length-1],r=e.node,i=e.visitors;if("root"===r.type||"document"===r.type||r.parent){if(i.length>0&&i.length>e.visitorIndex){var n=i[e.visitorIndex],s=n[0],o=n[1];e.visitorIndex+=1,e.visitorIndex===i.length&&(e.visitors=[],e.visitorIndex=0),this.result.lastPlugin=s;try{return o(r.toProxy(),this.helpers)}catch(t){throw this.handleError(t,r)}}if(0!==e.iterator){for(var a,h=e.iterator;a=r.nodes[r.indexes[h]];)if(r.indexes[h]+=1,!a[c])return a[c]=!0,void t.push(b(a));e.iterator=0,delete r.indexes[h]}for(var u=e.events;u.length>e.eventIndex;){var l=u[e.eventIndex];if(e.eventIndex+=1,0===l)return void(r.nodes&&r.nodes.length&&(r[c]=!0,e.iterator=r.getIterator()));if(this.listeners[l])return void(e.visitors=this.listeners[l])}t.pop()}else t.pop()}walkSync(t){t[c]=!0;for(var e=[{eventIndex:0,events:w(t),iterator:0,node:t}];e.length>0;){var r=e[e.length-1],i=r.node;if(0!==r.iterator){for(var n=r.iterator,s=void 0,o=!1;s=i.nodes[i.indexes[n]];)if(i.indexes[n]+=1,!s[c]){s[c]=!0,e.push({eventIndex:0,events:w(s),iterator:0,node:s}),o=!0;break}if(o)continue;r.iterator=0,delete i.indexes[n]}if(r.events.length>r.eventIndex){var a=r.events[r.eventIndex];if(r.eventIndex+=1,0===a)i.nodes&&i.nodes.length&&(r.iterator=i.getIterator());else{var h=this.listeners[a];h&&this.visitSync(h,i.toProxy())&&e.pop()}}else e.pop()}}warnings(){return this.sync().warnings()}};C.registerPostcss=t=>{k=t},e.exports=C,C.default=C,u.registerLazyResult(C),i.registerLazyResult(C)}),pe=Pt((t,e)=>{var r=ae(),i=le(),n=ce(),s=$t(),o=ve(),a=class{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;var t,e=i;try{t=e(this._css,this._opts)}catch(t){this.error=t}if(this.error)throw this.error;return this._root=t,t}get[Symbol.toStringTag](){return"NoWorkResult"}constructor(t,e,i){e=e.toString(),this.stringified=!1,this._processor=t,this._css=e,this._opts=i,this._map=void 0;var o=s;this.result=new n(this._processor,void 0,this._opts),this.result.css=e;var a=this;Object.defineProperty(this.result,"root",{get(){return a.root}});var h=new r(o,void 0,this._opts,e);if(h.isMap()){var u=h.generate(),l=u[0],f=u[1];l&&(this.result.css=l),f&&(this.result.map=f)}else h.clearAnnotation(),this.result.css=h.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(t){return this.async().catch(t)}finally(t){return this.async().then(t,t)}sync(){if(this.error)throw this.error;return this.result}then(t,e){return"from"in this._opts||o("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(t,e)}toString(){return this._css}warnings(){return[]}};e.exports=a,a.default=a}),me=Pt((t,e)=>{var r=Qt(),i=de(),n=pe(),s=ie(),o=class{constructor(t){void 0===t&&(t=[]),this.version="8.5.24",this.plugins=this.normalize(t)}normalize(t){var e=[];for(var r of t)if(!0===r.postcss?r=r():r.postcss&&(r=r.postcss),"object"==typeof r&&Array.isArray(r.plugins))e=e.concat(r.plugins);else if("object"==typeof r&&r.postcssPlugin)e.push(r);else{if("function"!=typeof r)throw"object"==typeof r&&(r.parse||r.stringify)?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."):new Error(r+" is not a PostCSS plugin");e.push(r)}return e}process(t,e){return void 0===e&&(e={}),this.plugins.length||e.parser||e.stringifier||e.syntax?new i(this,t,e):new n(this,t,e)}use(t){return this.plugins=this.plugins.concat(this.normalize([t])),this}};e.exports=o,o.default=o,s.registerProcessor(o),r.registerProcessor(o)}),ye=Pt((t,e)=>{var r=Kt(),i=Zt(),n=Xt(),s=zt(),o=Jt(),a=Qt(),h=oe(),u=re(),l=de(),f=ne(),c=qt(),v=le(),d=me(),p=ce(),m=ie(),y=se(),g=$t(),w=fe();function b(){for(var t=arguments.length,e=new Array(t),r=0;t>r;r++)e[r]=arguments[r];return 1===e.length&&Array.isArray(e[0])&&(e=e[0]),new d(e)}b.plugin=function(t,e){var r,i=!1;function n(){console&&console.warn&&!i&&(i=!0,console.warn(t+": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration"),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(t+": 里面 postcss.plugin 被弃用. 迁移指南:\nhttps://www.w3ctech.com/topic/2226"));var r=e(...arguments);return r.postcssPlugin=t,r.postcssVersion=(new d).version,r}return Object.defineProperty(n,"postcss",{get(){return r||(r=n()),r}}),n.process=function(t,e,r){return b([n(r)]).process(t,e)},n},b.stringify=g,b.parse=v,b.fromJSON=h,b.list=f,b.comment=t=>new i(t),b.atRule=t=>new r(t),b.decl=t=>new o(t),b.rule=t=>new y(t),b.root=t=>new m(t),b.document=t=>new a(t),b.CssSyntaxError=s,b.Declaration=o,b.Container=n,b.Processor=d,b.Document=a,b.Comment=i,b.Warning=w,b.AtRule=r,b.Result=p,b.Input=u,b.Rule=y,b.Root=m,b.Node=c,l.registerPostcss(b),e.exports=b,b.default=b}),ge=Pt((t,e)=>{var r=Zt(),i=ue(),n=he();e.exports=class extends i{checkMissedSemicolon(){}comment(t){var e=new r;this.init(e,t[2]);var i=this.input.fromOffset(t[3])||this.input.fromOffset(this.input.css.length-1);e.source.end={column:i.col,line:i.line,offset:t[3]+1};var n=t[1].slice(2);if("*/"===n.slice(-2)&&(n=n.slice(0,-2)),/^\s*$/.test(n))e.text="",e.raws.left=n,e.raws.right="";else{var s=n.match(/^(\s*)([^]*\S)(\s*)$/);e.text=s[2],e.raws.left=s[1],e.raws.right=s[3]}}createTokenizer(){this.tokenizer=n(this.input,{ignoreErrors:!0})}decl(t){t.length>1&&t.some(t=>"word"===t[0])&&super.decl(t)}doubleColon(){}endFile(){for(this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces;this.current.parent;)this.current=this.current.parent,this.current.raws.after="";this.root.source.end=this.getPosition(this.tokenizer.position())}precheckMissedSemicolon(t){var e=this.colon(t);if(!1!==e){var r,i;for(r=e-1;r>=0&&"word"!==t[r][0];r--);if(0!==r&&r>=0){for(i=r-1;i>=0;i--)if("space"!==t[i][0]){i+=1;break}var n=t.slice(r),s=t.slice(i,r);t.splice(i,t.length-i),this.spaces=s.map(t=>t[1]).join(""),this.decl(n)}}}unclosedBracket(){}unexpectedClose(){this.current.raws.after+="}"}unknownWord(t){this.spaces+=t.map(t=>t[1]).join("")}unnamedAtrule(t){t.name=""}}}),we=Bt(Pt((t,e)=>{var r=ye().Input,i=ge();e.exports=function(t,e){var n=new i(new r(t,e));return n.parse(),n.root}})(),1),be=Bt(ye(),1).default,Se={script:"noscript",altglyph:"altGlyph",altglyphdef:"altGlyphDef",altglyphitem:"altGlyphItem",animatecolor:"animateColor",animatemotion:"animateMotion",animatetransform:"animateTransform",clippath:"clipPath",feblend:"feBlend",fecolormatrix:"feColorMatrix",fecomponenttransfer:"feComponentTransfer",fecomposite:"feComposite",feconvolvematrix:"feConvolveMatrix",fediffuselighting:"feDiffuseLighting",fedisplacementmap:"feDisplacementMap",fedistantlight:"feDistantLight",fedropshadow:"feDropShadow",feflood:"feFlood",fefunca:"feFuncA",fefuncb:"feFuncB",fefuncg:"feFuncG",fefuncr:"feFuncR",fegaussianblur:"feGaussianBlur",feimage:"feImage",femerge:"feMerge",femergenode:"feMergeNode",femorphology:"feMorphology",feoffset:"feOffset",fepointlight:"fePointLight",fespecularlighting:"feSpecularLighting",fespotlight:"feSpotLight",fetile:"feTile",feturbulence:"feTurbulence",foreignobject:"foreignObject",glyphref:"glyphRef",lineargradient:"linearGradient",radialgradient:"radialGradient"};function ke(t,e){var r=null==e?void 0:e.stylesWithHoverClass.get(t);if(r)return r;var i=t;try{i=be([Ut,Wt]).process(t,{parser:we.default}).css}catch(t){console.warn("Failed to adapt css for replay",t)}return null==e||e.stylesWithHoverClass.set(t,i),i}function Ce(){return{stylesWithHoverClass:new Map}}var Me=new Set(["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"]),xe=new Set,Ae=new Set;function Ee(t,e){var r,i=e.doc,n=e.mirror,s=e.skipChild,o=void 0!==s&&s,a=e.hackCss,h=void 0===a||a,l=e.afterAppend,f=e.cache,c=null;if(n.has(t.id)){var v=n.getNode(t.id);if(function(t,e){return!(!t||!e||t.type!==e.type)&&(t.type===u.Document?t.compatMode===e.compatMode:t.type===u.DocumentType?t.name===e.name&&t.publicId===e.publicId&&t.systemId===e.systemId:t.type===u.Comment||t.type===u.Text||t.type===u.CDATA?t.textContent===e.textContent:t.type===u.Element&&t.tagName===e.tagName&&JSON.stringify(t.attributes)===JSON.stringify(e.attributes)&&t.isSVG===e.isSVG&&t.needBlock===e.needBlock)}(n.getMeta(v),t))return n.getNode(t.id);c=v}var d=function(t,e){var r=e.doc,i=e.hackCss,n=e.cache;switch(t.type){case u.Document:return r.implementation.createDocument(null,"",null);case u.DocumentType:return r.implementation.createDocumentType(t.name||"html",t.publicId,t.systemId);case u.Element:var s,o=function(t){var e=Se[t.tagName]?Se[t.tagName]:t.tagName;return"link"===e&&t.attributes._cssText&&(e="style"),e}(t);if(t.isSVG)s=r.createElementNS("http://www.w3.org/2000/svg",o);else{var a;if(t.isCustom&&(null===(a=r.defaultView)||void 0===a?void 0:a.customElements)&&function(t){if("string"!=typeof t||0===t.length)return!1;if(Me.has(t))return!1;if(!t.includes("-"))return!1;var e=t.charCodeAt(0);return e>=97&&122>=e}(t.tagName)&&!r.defaultView.customElements.get(t.tagName))try{r.defaultView.customElements.define(t.tagName,class extends r.defaultView.HTMLElement{})}catch(e){xe.has(t.tagName)||(xe.add(t.tagName),console.warn("rrweb: failed to register custom element",t.tagName,e))}s=r.createElement(o)}var h={};for(var l in t.attributes)if({}.hasOwnProperty.call(t.attributes,l)){var f=t.attributes[l];if(("option"!==o||"selected"!==l||!1!==f)&&null!==f)if(!0===f&&(f=""),l.startsWith("rr_"))h[l]=f;else{var c="textarea"===o&&"value"===l,v="style"===o&&"_cssText"===l;if(v&&i&&"string"==typeof f&&(f=ke(f,n)),!c&&!v||"string"!=typeof f)try{if(t.isSVG&&"xlink:href"===l)s.setAttributeNS("http://www.w3.org/1999/xlink",l,f.toString());else if("onload"===l||"onclick"===l||"onmouse"===l.substring(0,7))s.setAttribute("_"+l,f.toString());else{if("meta"===o&&"Content-Security-Policy"===t.attributes["http-equiv"]&&"content"===l){s.setAttribute("csp-content",f.toString());continue}"link"===o&&("preload"===t.attributes.rel&&"script"===t.attributes.as||"modulepreload"===t.attributes.rel)||"link"===o&&"prefetch"===t.attributes.rel&&"string"==typeof t.attributes.href&&"js"===Mt(t.attributes.href)||("img"===o&&t.attributes.srcset&&t.attributes.rr_dataURL?s.setAttribute("rrweb-original-srcset",t.attributes.srcset):s.setAttribute(l,f.toString()))}}catch(t){}else s.appendChild(r.createTextNode(f)),t.childNodes=[]}}var d=!("static"!==h.rr_position&&"relative"!==h.rr_position&&"sticky"!==h.rr_position||void 0!==h.rr_transform&&"none"!==h.rr_transform);if(d&&"string"==typeof h.rr_display){var p=h.rr_display;s.style.setProperty("display","inline"===p?"inline-block":p)}var m=function(){var e=h[y];if("canvas"===o&&"rr_dataURL"===y){var i=r.createElement("img");i.onload=()=>{var t=s.getContext("2d");t&&t.drawImage(i,0,0,i.width,i.height)},i.src=e.toString(),s.RRNodeType&&(s.rr_dataURL=e.toString())}else if("img"===o&&"rr_dataURL"===y){var n=s;n.currentSrc.startsWith("data:")||(n.setAttribute("rrweb-original-src",t.attributes.src),n.src=e.toString())}if("rr_width"===y)s.style.setProperty("width",e.toString());else if("rr_height"===y)s.style.setProperty("height",e.toString());else if("rr_left"===y)d||(s.style.setProperty("left",e.toString()),s.style.setProperty("position","absolute"));else if("rr_top"===y)d||(s.style.setProperty("top",e.toString()),s.style.setProperty("position","absolute"));else if("rr_mediaCurrentTime"===y&&"number"==typeof e)s.currentTime=e;else if("rr_mediaState"===y)switch(e){case"played":s.play().catch(t=>console.warn("media playback error",t));break;case"paused":s.pause()}else"rr_mediaPlaybackRate"===y&&"number"==typeof e?s.playbackRate=e:"rr_mediaMuted"===y&&"boolean"==typeof e?s.muted=e:"rr_mediaLoop"===y&&"boolean"==typeof e?s.loop=e:"rr_mediaVolume"===y&&"number"==typeof e?s.volume=e:"rr_open_mode"===y&&s.setAttribute("rr_open_mode",e)};for(var y in h)m();if(t.isShadowHost)if(s.shadowRoot)for(;s.shadowRoot.firstChild;)s.shadowRoot.removeChild(s.shadowRoot.firstChild);else it(s)||Ae.has(o)||(Ae.add(o),console.warn("rrweb: browser refused a shadow root on",o));return"input"!==o&&"textarea"!==o||s.setAttribute("autocomplete","off"),s;case u.Text:return function(t,e){if("SCRIPT_PLACEHOLDER"===t.textContent)return e.doc.createTextNode("");var r=t.textContent;if(t.isStyle&&e.hackCss)try{r=ke(t.textContent,e.cache)}catch(t){}return e.doc.createTextNode(r)}(t,{cache:n,doc:r,hackCss:i});case u.CDATA:return""===t.textContent.trim()?null:r.createCDATASection(t.textContent);case u.Comment:return r.createComment(t.textContent);default:return null}}(t,{doc:i,hackCss:h,cache:f});if(!d)return null;if(null==c||null===(r=c.parentNode)||void 0===r||r.removeChild(c),t.rootId&&n.getNode(t.rootId)!==i&&n.replace(t.rootId,i),t.type===u.Document&&(i.close(),i.open(),"BackCompat"===t.compatMode&&t.childNodes&&t.childNodes[0].type!==u.DocumentType&&i.write(t.childNodes[0].type===u.Element&&"xmlns"in t.childNodes[0].attributes&&"http://www.w3.org/1999/xhtml"===t.childNodes[0].attributes.xmlns?'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">':'<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">'),d=i),n.add(d,t),(t.type===u.Document||t.type===u.Element)&&!o){var p=function(){if(m.isShadow&&t.isShadowHost&&et(d)&&!d.shadowRoot)return 0;var e=Ee(m,{doc:i,mirror:n,skipChild:!1,hackCss:h,afterAppend:l,cache:f});if(!e)return console.warn("Failed to rebuild",m),0;if(m.isShadow&&et(d)&&d.shadowRoot)d.shadowRoot.appendChild(e);else if(t.type===u.Document&&m.type==u.Element){var r=e,s=null;r.childNodes.forEach(t=>{"BODY"===t.nodeName&&(s=t)}),s?(r.removeChild(s),d.appendChild(e),r.appendChild(s)):d.appendChild(e)}else if(t.type===u.Document&&m.type===u.DocumentType){var o=d.doctype;o&&d.removeChild(o),d.firstChild&&1===d.firstChild.nodeType?d.insertBefore(e,d.firstChild):d.appendChild(e)}else d.appendChild(e);l&&l(e,m.id)};for(var m of t.childNodes)p()}return d}var Re,Ie,Te=1,Oe=new RegExp("[^a-z0-9-_:]");function De(){return Te++}var Ne=/^[^ \t\n\r\u000c]+/,_e=/^[, \t\n\r\u000c]+/,Le=new WeakMap;function Fe(t,e){return e&&""!==e.trim()?Pe(t,e):e}function Pe(t,e){var r=Le.get(t);if(r||(r=t.createElement("a"),Le.set(t,r)),e){if(e.startsWith("blob:")||e.startsWith("data:"))return e}else e="";return r.setAttribute("href",e),r.href}function Be(t,e){return(null==e?void 0:e.maxBase64ImageLength)?function(t,e){return e&&t.length>e?"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgogIDxkZWZzPgogICAgPHBhdHRlcm4gaWQ9InN0cmlwZXMiIHBhdHRlcm5Vbml0cz0idXNlclNwYWNlT25Vc2UiIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+CiAgICAgIDxyZWN0IHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgZmlsbD0iYmxhY2siLz4KICAgICAgPHBhdGggZD0iTTggMEgxNkwwIDE2VjhMOCAwWiIgZmlsbD0iIzJEMkQyRCIvPgogICAgICA8cGF0aCBkPSJNMTYgOFYxNkg4TDE2IDhaIiBmaWxsPSIjMkQyRDJEIi8+CiAgICA8L3BhdHRlcm4+CiAgPC9kZWZzPgogIDxyZWN0IHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjc3RyaXBlcykiLz4KPC9zdmc+Cg==":t}(t,e.maxBase64ImageLength):t}function je(t,e,r,i,n,s){if(!i)return i;if("src"===r||"href"===r&&("use"!==e||"#"!==i[0])){if("link"===e&&n){var o,a=null===(o=n.sheet)||void 0===o?void 0:o.href;if(a)return a}var h=Fe(t,i);if(h.startsWith("data:")){if("img"===e&&n){var u=h;return((null==s?void 0:s.type)||void 0!==(null==s?void 0:s.quality))&&(u=function(t,e,r,i){if(1e5>e.length)return e;if(!t.complete||0===t.naturalWidth)return e;if(t.naturalWidth>4096||t.naturalHeight>4096)return e;var n=Tt.get(e);if(n&&n.type===r&&n.quality===i)return n.result;try{var s=document.createElement("canvas");s.width=t.naturalWidth,s.height=t.naturalHeight;var o=s.getContext("2d");if(!o)return e;o.drawImage(t,0,0);var a=s.toDataURL(r||"image/webp",null!=i?i:.4),h=e.length>a.length?a:e;if(Tt.size>=10){var u=Tt.keys().next().value;void 0!==u&&Tt.delete(u)}return Tt.set(e,{type:r,quality:i,result:h}),h}catch(t){return e}}(n,h,s.type,s.quality)),Be(u,s)}if("image"===e)return Be(h,s)}return h}if("xlink:href"===r&&"#"!==i[0]){var l=Fe(t,i);return"image"===e&&l.startsWith("data:")?Be(l,s):l}return"background"!==r||"table"!==e&&"td"!==e&&"th"!==e?"srcset"===r?function(t,e){if(""===e.trim())return e;var r=0;function i(t){var i,n=t.exec(e.substring(r));return n?(r+=(i=n[0]).length,i):""}for(var n=[];i(_e),e.length>r;){var s=i(Ne);if(","===s.slice(-1))s=Fe(t,s.substring(0,s.length-1)),n.push(s);else{var o="";s=Fe(t,s);for(var a=!1;;){var h=e.charAt(r);if(""===h){n.push((s+o).trim());break}if(a)")"===h&&(a=!1);else{if(","===h){r+=1,n.push((s+o).trim());break}"("===h&&(a=!0)}o+=h,r+=1}}}return n.join(", ")}(t,i):"style"===r?It(i,Pe(t)):"object"===e&&"data"===r?Fe(t,i):i:Fe(t,i)}function Ue(t,e,r){return("video"===t||"audio"===t)&&"autoplay"===e}function We(t,e,r){if(!t)return!1;if(t.nodeType!==t.ELEMENT_NODE)return!!r&&We(b.parentNode(t),e,r);for(var i=t.classList.length;i--;)if(e.test(t.classList[i]))return!0;return!!r&&We(b.parentNode(t),e,r)}function He(t,e,r,i){var n;if(et(t)){if(!b.childNodes(n=t).length)return!1}else{if(null===b.parentElement(t))return!1;n=b.parentElement(t)}try{if("string"==typeof e){if(i){if(n.closest("."+e))return!0}else if(n.classList.contains(e))return!0}else if(We(n,e,i))return!0;if(r)if(i){if(n.closest(r))return!0}else if(n.matches(r))return!0}catch(t){}return!1}function Ge(t,e,r){var i=t.removeEventListener;"function"==typeof i&&i.call(t,e,r)}var ze=new Map;function Ve(t,e){return Array.from(t.styleSheets).find(t=>t.href===e)}function $e(t){return null==t?"":t.toLowerCase()}var Ye=!1,qe=!1;function Ze(){return qe}function Je(){qe=!1,Ye=!1}function Xe(t,e){var r=e.doc,i=e.mirror,n=e.blockClass,s=e.blockSelector,o=e.maskTextClass,a=e.maskTextSelector,h=e.skipChild,l=void 0!==h&&h,f=e.inlineStylesheet,c=void 0===f||f,v=e.maskInputOptions,d=void 0===v?{}:v,p=e.maskTextFn,m=e.maskInputFn,y=e.maskAllElementAttributes,g=void 0!==y&&y,w=e.maskAttributeFn,S=e.slimDOMOptions,k=e.dataURLOptions,C=void 0===k?{}:k,M=e.inlineImages,x=void 0!==M&&M,A=e.recordCanvas,E=void 0!==A&&A,I=e.canvasMaskingConfigured,T=e.onSerialize,D=e.onIframeLoad,N=e.iframeLoadTimeout,F=void 0===N?5e3:N,P=e.onIframeListenerRegistered,B=e.onStylesheetLoad,j=e.stylesheetLoadTimeout,U=void 0===j?5e3:j,W=e.keepIframeSrcFn,H=void 0===W?()=>!1:W,G=e.newlyAddedElement,V=void 0!==G&&G,q=e.depth,Z=void 0===q?0:q,J=e.maxDepth,X=void 0===J?50:J,K=e.needsMask,Q=e.preserveWhiteSpace,tt=void 0===Q||Q;if(Z>=X)return qe=!0,Ye||(Ye=!0,console.warn("[rrweb-snapshot] DOM tree depth exceeded max depth of "+X+". Children beyond this depth will not be recorded. This may indicate deeply nested DOM structures.")),null;K||(K=He(t,o,a,void 0===K)),R>0&&(O.nodeCount+=1);var it,st=function(t,e){var r=e.doc,i=e.blockClass,n=e.blockSelector,s=e.needsMask,o=e.inlineStylesheet,a=e.maskInputOptions,h=void 0===a?{}:a,l=e.maskTextFn,f=e.maskInputFn,c=e.maskAllElementAttributes,v=void 0!==c&&c,d=e.maskAttributeFn,p=e.dataURLOptions,m=void 0===p?{}:p,y=e.inlineImages,g=e.recordCanvas,w=e.canvasMaskingConfigured,S=e.keepIframeSrcFn,k=e.newlyAddedElement,C=void 0!==k&&k,M=function(t,e){if(e.hasNode(t)){var r=e.getId(t);return 1===r?void 0:r}}(r,e.mirror);switch(t.nodeType){case t.DOCUMENT_NODE:return"CSS1Compat"!==t.compatMode?{type:u.Document,childNodes:[],compatMode:t.compatMode}:{type:u.Document,childNodes:[]};case t.DOCUMENT_TYPE_NODE:return{type:u.DocumentType,name:t.name,publicId:t.publicId,systemId:t.systemId,rootId:M};case t.ELEMENT_NODE:return function(t,e){for(var r=e.doc,i=e.inlineStylesheet,n=e.maskInputOptions,s=void 0===n?{}:n,o=e.maskInputFn,a=e.maskAllElementAttributes,h=void 0!==a&&a,l=e.maskAttributeFn,f=e.dataURLOptions,c=void 0===f?{}:f,v=e.inlineImages,d=e.recordCanvas,p=e.canvasMaskingConfigured,m=e.keepIframeSrcFn,y=e.newlyAddedElement,g=void 0!==y&&y,w=e.rootId,S=function(t,e,r){try{if("string"==typeof e){if(t.classList.contains(e))return!0}else for(var i=t.classList.length;i--;)if(e.test(t.classList[i]))return!0;if(r)return t.matches(r)}catch(t){}return!1}(t,e.blockClass,e.blockSelector),k=function(t){if(t instanceof HTMLFormElement)return"form";var e=wt(t.tagName);return Oe.test(e)?"div":e}(t),C=new Set,M={},x=t.attributes.length,A=0;x>A;A++){var E=t.attributes[A];Ue(k,E.name)||(M[E.name]=je(r,k,wt(E.name),E.value,t,c))}if("link"===k&&i&&!S){var I=t.sheet;if(!I){var T=function(t){return t.href}(t);T&&!(I=Ve(r,T))&&T.includes(".css")&&(I=Ve(r,window.location.origin+"/"+T.replace(window.location.href,"")))}var O=null;I&&(Y(I)?R>0&&(_.push(t),L+=1):O=ht(I)),O&&(delete M.rel,delete M.href,M._cssText=O)}if("style"===k&&t.sheet&&!(t.innerText||b.textContent(t)||"").trim().length){var D=z(()=>ht(t.sheet));D&&(M._cssText=D)}if("input"===k||"textarea"===k||"select"===k){var N=t.value,F=t.checked;"radio"!==M.type&&"checkbox"!==M.type&&"submit"!==M.type&&"button"!==M.type&&N?M.value=gt({element:t,type:Ct(t),tagName:k,value:N,maskInputOptions:s,maskInputFn:o}):F&&(M.checked=F)}if("option"===k&&(t.selected&&!s.select?M.selected=!0:delete M.selected),"dialog"===k&&t.open){try{M.rr_open_mode=t.matches("dialog:modal")?"modal":"non-modal"}catch(t){M.rr_open_mode="modal",M.ph_rr_could_not_detect_modal=!0}C.add("rr_open_mode")}if("canvas"===k&&d&&!(null==p?void 0:p()))if("2d"===t.__context)(function(t){var e=t.getContext("2d");if(!e)return!0;for(var r=0;t.width>r;r+=50)for(var i=0;t.height>i;i+=50){var n=e.getImageData;if(new Uint32Array((kt in n?n[kt]:n).call(e,r,i,Math.min(50,t.width-r),Math.min(50,t.height-i)).data.buffer).some(t=>0!==t))return!1}return!0})(t)||(M.rr_dataURL=t.toDataURL(c.type,c.quality));else if(!("__context"in t)){var P=t.toDataURL(c.type,c.quality),B=r.createElement("canvas");B.width=t.width,B.height=t.height,P!==B.toDataURL(c.type,c.quality)&&(M.rr_dataURL=P)}var j,U,W=!1;if("img"===k&&v){Re||(Re=r.createElement("canvas"),Ie=Re.getContext("2d"));var H=t,G=H.currentSrc||H.getAttribute("src")||"<unknown-src>",V=H.crossOrigin,q=(e,r)=>W?St({element:t,name:e,value:r,maskAllElementAttributes:h,maskAttributeFn:l}):r,Z=()=>{Ge(H,"load",Z);try{Re.width=H.naturalWidth,Re.height=H.naturalHeight,Ie.drawImage(H,0,0);var t=Re.toDataURL(c.type,c.quality);M.rr_dataURL=q("rr_dataURL",t)}catch(t){if("anonymous"!==H.crossOrigin)return H.crossOrigin="anonymous",void(H.complete&&0!==H.naturalWidth?Z():H.addEventListener("load",Z));console.warn("Cannot inline img src="+G+"! Error: "+t)}"anonymous"===H.crossOrigin&&(V?M.crossOrigin=q("crossOrigin",V):H.removeAttribute("crossorigin"))};H.complete&&0!==H.naturalWidth?Z():H.addEventListener("load",Z)}if("audio"===k||"video"===k){var J=M;J.rr_mediaState=t.paused?"paused":"played",C.add("rr_mediaState"),J.rr_mediaCurrentTime=t.currentTime,J.rr_mediaPlaybackRate=t.playbackRate,J.rr_mediaMuted=t.muted,J.rr_mediaLoop=t.loop,J.rr_mediaVolume=t.volume}if(g||(t.scrollLeft&&(M.rr_scrollLeft=t.scrollLeft),t.scrollTop&&(M.rr_scrollTop=t.scrollTop)),S){var X,K,Q,tt=t.getBoundingClientRect(),et=tt.width,rt=tt.height,it=tt.left,nt=tt.top,st=null===(X=r.defaultView)||void 0===X?void 0:X.getComputedStyle(t);M={class:M.class,rr_width:et+"px",rr_height:rt+"px",rr_left:Math.floor(it+((null===(K=r.defaultView)||void 0===K?void 0:K.scrollX)||0))+"px",rr_top:Math.floor(nt+((null===(Q=r.defaultView)||void 0===Q?void 0:Q.scrollY)||0))+"px"},C.add("rr_width"),C.add("rr_height"),C.add("rr_left"),C.add("rr_top"),st&&(M.rr_position=st.position||"static",C.add("rr_position"),st.transform&&"none"!==st.transform&&(M.rr_transform=st.transform,C.add("rr_transform")),st.display&&st.display.startsWith("inline")&&(M.rr_display=st.display,C.add("rr_display")))}if("iframe"!==k||m(M.src)||(t.contentDocument||(M.rr_src=M.src),delete M.src),h||l)for(var ot of Object.entries(M)){var at=ot[0],ut=ot[1];"string"!=typeof ut&&null!==ut||(M[at]=St({element:t,name:at,value:ut,maskAllElementAttributes:h,maskAttributeFn:l,isGenerated:C.has(at)}))}W=!0;try{customElements.get(k)&&(j=!0)}catch(t){}return{type:u.Element,tagName:k,attributes:M,childNodes:[],isSVG:(U=t,Boolean("svg"===U.tagName||U.ownerSVGElement)||void 0),needBlock:S,rootId:w,isCustom:j}}(t,{doc:r,blockClass:i,blockSelector:n,inlineStylesheet:o,maskInputOptions:h,maskInputFn:f,maskAllElementAttributes:v,maskAttributeFn:d,dataURLOptions:m,inlineImages:y,recordCanvas:g,canvasMaskingConfigured:w,keepIframeSrcFn:S,newlyAddedElement:C,rootId:M});case t.TEXT_NODE:return function(t,e){var r=e.needsMask,i=e.maskTextFn,n=e.rootId,s=b.parentNode(t),o=s&&s.tagName,a=b.textContent(t),h="STYLE"===o||void 0,l="SCRIPT"===o||void 0;if(h&&a){try{var f;if(t.nextSibling||t.previousSibling);else if(Y(s.sheet));else if(null===(f=s.sheet)||void 0===f?void 0:f.cssRules){var c=ht(s.sheet);c&&!/(?:^|[\s;{}])-?[a-zA-Z][\w-]*\s*:\s*;/.test(c)&&(a=c)}}catch(e){console.warn("Cannot get CSS styles from text's parentNode. Error: "+e,t)}a=It(a,Pe(e.doc))}return l&&(a="SCRIPT_PLACEHOLDER"),!h&&!l&&a&&r&&(a=i?i(a,b.parentElement(t)):a.replace(/[\S]/g,"*")),{type:u.Text,textContent:a||"",isStyle:h,rootId:n}}(t,{doc:r,needsMask:s,maskTextFn:l,rootId:M});case t.CDATA_SECTION_NODE:return{type:u.CDATA,textContent:"",rootId:M};case t.COMMENT_NODE:return{type:u.Comment,textContent:b.textContent(t)||"",rootId:M};default:return!1}}(t,{doc:r,mirror:i,blockClass:n,blockSelector:s,needsMask:K,inlineStylesheet:c,maskInputOptions:d,maskTextFn:p,maskInputFn:m,maskAllElementAttributes:g,maskAttributeFn:w,dataURLOptions:C,inlineImages:x,recordCanvas:E,canvasMaskingConfigured:I,keepIframeSrcFn:H,newlyAddedElement:V});if(!st)return console.warn(t,"not serialized"),null;it=i.hasNode(t)?i.getId(t):!function(t,e){if(e.comment&&t.type===u.Comment)return!0;if(t.type===u.Element){if(e.script&&("script"===t.tagName||"link"===t.tagName&&("preload"===t.attributes.rel&&"script"===t.attributes.as||"modulepreload"===t.attributes.rel)||"link"===t.tagName&&"prefetch"===t.attributes.rel&&"string"==typeof t.attributes.href&&"js"===Mt(t.attributes.href)))return!0;if(e.headFavicon&&("link"===t.tagName&&"shortcut icon"===t.attributes.rel||"meta"===t.tagName&&($e(t.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===$e(t.attributes.name)||["icon","apple-touch-icon","shortcut icon"].includes($e(t.attributes.rel)))))return!0;if("meta"===t.tagName){if(e.headMetaDescKeywords&&$e(t.attributes.name).match(/^description|keywords$/))return!0;if(e.headMetaSocial&&($e(t.attributes.property).match(/^(og|twitter|fb):/)||$e(t.attributes.name).match(/^(og|twitter):/)||"pinterest"===$e(t.attributes.name)))return!0;if(e.headMetaRobots&&["robots","googlebot","bingbot"].includes($e(t.attributes.name)))return!0;if(e.headMetaHttpEquiv&&void 0!==t.attributes["http-equiv"])return!0;if(e.headMetaAuthorship&&(["author","generator","framework","publisher","progid"].includes($e(t.attributes.name))||$e(t.attributes.property).match(/^article:/)||$e(t.attributes.property).match(/^product:/)))return!0;if(e.headMetaVerification&&["google-site-verification","yandex-verification","csrf-token","p:domain_verify","verify-v1","verification","shopify-checkout-api-token"].includes($e(t.attributes.name)))return!0}}return!1}(st,S)&&(tt||st.type!==u.Text||st.isStyle||st.textContent.replace(/^\s+|\s+$/gm,"").length)?De():-2;var ot=Object.assign(st,{id:it});if(i.add(t,ot),-2===it)return null;T&&T(t);var at=!l;if(ot.type===u.Element){at=at&&!ot.needBlock,delete ot.needBlock;var ut=b.shadowRoot(t);ut&&nt(ut)&&(ot.isShadowHost=!0)}if((ot.type===u.Document||ot.type===u.Element)&&at){S.headWhitespace&&ot.type===u.Element&&"head"===ot.tagName&&(tt=!1);var lt={doc:r,mirror:i,blockClass:n,blockSelector:s,needsMask:K,maskTextClass:o,maskTextSelector:a,skipChild:l,inlineStylesheet:c,maskInputOptions:d,maskTextFn:p,maskInputFn:m,maskAllElementAttributes:g,maskAttributeFn:w,slimDOMOptions:S,dataURLOptions:C,inlineImages:x,recordCanvas:E,canvasMaskingConfigured:I,preserveWhiteSpace:tt,onSerialize:T,onIframeLoad:D,iframeLoadTimeout:F,onIframeListenerRegistered:P,onStylesheetLoad:B,stylesheetLoadTimeout:U,keepIframeSrcFn:H,depth:Z+1,maxDepth:X};if(ot.type===u.Element&&"textarea"===ot.tagName&&void 0!==ot.attributes.value);else for(var ft of Array.from(b.childNodes(t))){var ct=Xe(ft,lt);ct&&ot.childNodes.push(ct)}var vt=null;if(et(t)&&(vt=b.shadowRoot(t)))for(var dt of Array.from(b.childNodes(vt))){var pt=Xe(dt,lt);pt&&(nt(vt)&&(pt.isShadow=!0),ot.childNodes.push(pt))}}var mt=b.parentNode(t);if(mt&&rt(mt)&&nt(mt)&&(ot.isShadow=!0),ot.type===u.Element&&"iframe"===ot.tagName){var yt=function(t,e,r){var i,n=()=>{},s=t.contentWindow;if(!s)return n;try{i=s.document.readyState}catch(t){return n}var o=()=>e();if("complete"!==i){var a=!1,h=null,u=()=>{a||(a=!0,null!==h&&(clearTimeout(h),h=null),Ge(t,"load",l),t.addEventListener("load",o),e())},l=()=>u();return h=setTimeout(u,r),t.addEventListener("load",l),()=>{null!==h&&(clearTimeout(h),h=null),a?Ge(t,"load",o):(a=!0,Ge(t,"load",l))}}var f,c="about:blank";try{f=s.location.href}catch(t){return n}if(f!==c||t.src===c||""===t.src){var v=setTimeout(e,0);return t.addEventListener("load",o),()=>{clearTimeout(v),Ge(t,"load",o)}}return t.addEventListener("load",o),()=>{Ge(t,"load",o)}}(t,()=>{var e=t.contentDocument;if(e&&D){var r=Xe(e,{doc:e,mirror:i,blockClass:n,blockSelector:s,needsMask:K,maskTextClass:o,maskTextSelector:a,skipChild:!1,inlineStylesheet:c,maskInputOptions:d,maskTextFn:p,maskInputFn:m,maskAllElementAttributes:g,maskAttributeFn:w,slimDOMOptions:S,dataURLOptions:C,inlineImages:x,recordCanvas:E,canvasMaskingConfigured:I,preserveWhiteSpace:tt,onSerialize:T,onIframeLoad:D,iframeLoadTimeout:F,onIframeListenerRegistered:P,onStylesheetLoad:B,stylesheetLoadTimeout:U,keepIframeSrcFn:H,depth:Z+1,maxDepth:X});r&&D(t,r)}},F);null==P||P(t,yt)}return ot.type===u.Element&&"link"===ot.tagName&&"stylesheet"===ot.attributes.rel&&function(e,h,u){if(!ze.has(e)){var l;try{l=e.sheet}catch(t){return}if(!l){var f=new AbortController,v=!1,y=()=>{if(!v){v=!0;try{(()=>{if(B){var e=Xe(t,{doc:r,mirror:i,blockClass:n,blockSelector:s,needsMask:K,maskTextClass:o,maskTextSelector:a,skipChild:!1,inlineStylesheet:c,maskInputOptions:d,maskTextFn:p,maskInputFn:m,maskAllElementAttributes:g,maskAttributeFn:w,slimDOMOptions:S,dataURLOptions:C,inlineImages:x,recordCanvas:E,canvasMaskingConfigured:I,preserveWhiteSpace:tt,onSerialize:T,onIframeLoad:D,iframeLoadTimeout:F,onStylesheetLoad:B,stylesheetLoadTimeout:U,keepIframeSrcFn:H,depth:Z,maxDepth:X});e&&B(t,e)}})()}finally{ze.delete(e),f.abort()}}},b=setTimeout(y,u);f.signal.addEventListener("abort",()=>clearTimeout(b),{once:!0}),e.addEventListener("load",y,{signal:f.signal,once:!0}),ze.set(e,f)}}}(t,0,U),ot}function Ke(t){return!0===t||"all"===t?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===t,headMetaDescKeywords:"all"===t,headTitleMutations:"all"===t}:!1===t?{}:t}function Qe(t,e){return-1!==t.indexOf(e)}"Mobile".toLowerCase(),"Tablet".toLowerCase(),new RegExp("Xbox","i"),new RegExp("Nintendo","i"),new RegExp("PlayStation","i"),new RegExp("Windows","i"),Date,Date;var tr={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot"],MutationObserver:[]},er={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:["querySelector","querySelectorAll"],MutationObserver:["constructor"]},rr={};function ir(t){if(rr[t])return rr[t];var e=function(t){var e,r,i=null===(e=globalThis)||void 0===e||null===(e=e.Zone)||void 0===e||null===(r=e.__symbol__)||void 0===r?void 0:r.call(e,t);return i&&globalThis[i]?globalThis[i]:void 0}(t)||globalThis[t],r=e.prototype,i=t in tr?tr[t]:void 0,n=Boolean(i&&i.every(t=>{var e;return Boolean(null===(e=Object.getOwnPropertyDescriptor(r,t))||void 0===e||null===(e=e.get)||void 0===e?void 0:e.toString().includes("[native code]"))})),s=t in er?er[t]:void 0,o=Boolean(s&&s.every(t=>{var e;return"function"==typeof r[t]&&(null===(e=r[t])||void 0===e?void 0:e.toString().includes("[native code]"))}));if(n&&o)return rr[t]=e.prototype,e.prototype;var a=document.createElement("iframe");a.style.display="none";var h,u=!1;try{document.body.appendChild(a);var l=a.contentWindow;if(!l)return e.prototype;var f=l[t].prototype;return f?(Qe(h=navigator.userAgent,"AppleWebKit")&&!Qe(h,"Chrome")&&(a.classList.add("rr-block","ph-no-capture"),a.setAttribute("__rrwebUntaintedPrototype",t),u=!0),rr[t]=f):r}catch(t){return r}finally{!u&&a.parentNode&&document.body.removeChild(a)}}var nr=Object.create(null);function sr(t,e,r){var i,n=nr[t],s=n[r];if(s)return s.call(e);var o=ir(t),a=null===(i=Object.getOwnPropertyDescriptor(o,r))||void 0===i?void 0:i.get;return a?(n[r]=a,a.call(e)):e[r]}nr.Node=Object.create(null),nr.ShadowRoot=Object.create(null),nr.MutationObserver=Object.create(null),nr.Element=Object.create(null);var or,ar={};function hr(t,e,r){var i=t+"."+String(r);if(ar[i])return ar[i].bind(e);var n=ir(t)[r];return"function"!=typeof n?e[r]:(ar[i]=n,n.bind(e))}var ur={childNodes:t=>sr("Node",t,"childNodes"),parentNode:t=>sr("Node",t,"parentNode"),parentElement:t=>sr("Node",t,"parentElement"),textContent:t=>sr("Node",t,"textContent"),isConnected(t){if(void 0===or){var e,r=null===(e=Object.getOwnPropertyDescriptor(ir("Node"),"isConnected"))||void 0===e?void 0:e.get;or=(null==r?void 0:r.toString().includes("[native code]"))?r:null}return null==or?void 0:or.call(t)},contains:(t,e)=>hr("Node",t,"contains")(e),getRootNode:t=>hr("Node",t,"getRootNode")(),host:t=>t&&"host"in t?sr("ShadowRoot",t,"host"):null,styleSheets:t=>t.styleSheets,shadowRoot:t=>t&&"shadowRoot"in t?sr("Element",t,"shadowRoot"):null,querySelector:(t,e)=>hr("Element",t,"querySelector")(e),querySelectorAll:(t,e)=>hr("Element",t,"querySelectorAll")(e),mutationObserver:()=>ir("MutationObserver").constructor,patch(t,e,r){try{if(!(e in t))return()=>{};var i=t[e],n={next:i},s=r(function(){for(var t=arguments.length,e=new Array(t),r=0;t>r;r++)e[r]=arguments[r];return n.next.apply(this,e)});return"function"==typeof s&&(s.prototype=s.prototype||{},Object.defineProperties(s,{__rrweb_original__:{enumerable:!1,value:i},__rrweb_layer__:{enumerable:!1,value:n}})),t[e]=s,()=>{if(t[e]!==s)for(var r=t=>{var e;return"function"==typeof t?null!==(e=t.__rrweb_layer__)&&void 0!==e?e:t.__posthog_layer__:void 0},i=t[e],o=r(i);o;){if(o.next===s)return void(o.next=n.next);o=r(i=o.next)}else t[e]=n.next}}catch(t){return()=>{}}}};function lr(t){return lr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},lr(t)}function fr(t,e,r){return(e=function(t){var e=function(t){if("object"!=lr(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=lr(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==lr(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function cr(t){try{return t.attachShadow({mode:"open"}),!0}catch(t){return!1}}var vr=class{constructor(){fr(this,"idNodeMap",new Map),fr(this,"nodeMetaMap",new WeakMap)}getId(t){var e,r;return t&&null!==(e=null===(r=this.getMeta(t))||void 0===r?void 0:r.id)&&void 0!==e?e:-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){var e=this.getId(t);if(this.idNodeMap.delete(e),t.childNodes&&t.childNodes.forEach(t=>this.removeNodeFromMap(t)),function(t){return t.nodeType===t.ELEMENT_NODE}(t)){var r=ur.shadowRoot(t);r&&this.removeNodeFromMap(r),"IFRAME"===t.nodeName&&t.contentDocument&&this.removeNodeFromMap(t.contentDocument)}}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,e){this.idNodeMap.set(e.id,t),this.nodeMetaMap.set(t,e)}replace(t,e){var r=this.getNode(t);if(r){var i=this.nodeMetaMap.get(r);i&&this.nodeMetaMap.set(e,i)}this.idNodeMap.set(t,e)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}},dr=(t,e)=>()=>(e||(t((e={exports:{}}).exports,e),t=null),e.exports);new RegExp(/(max|min)-device-(width|height)/.source,"g");var pr=dr((t,e)=>{var r=String,i=function(){return{isColorSupported:!1,reset:r,bold:r,dim:r,italic:r,underline:r,inverse:r,hidden:r,strikethrough:r,black:r,red:r,green:r,yellow:r,blue:r,magenta:r,cyan:r,white:r,gray:r,bgBlack:r,bgRed:r,bgGreen:r,bgYellow:r,bgBlue:r,bgMagenta:r,bgCyan:r,bgWhite:r,blackBright:r,redBright:r,greenBright:r,yellowBright:r,blueBright:r,magentaBright:r,cyanBright:r,whiteBright:r,bgBlackBright:r,bgRedBright:r,bgGreenBright:r,bgYellowBright:r,bgBlueBright:r,bgMagentaBright:r,bgCyanBright:r,bgWhiteBright:r}};e.exports=i(),e.exports.createColors=i}),mr=dr((t,e)=>{e.exports={}}),yr=dr((t,e)=>{var r=pr(),i=mr(),n=class t extends Error{constructor(e,r,i,n,s,o){super(e),this.name="CssSyntaxError",this.reason=e,s&&(this.file=s),n&&(this.source=n),o&&(this.plugin=o),void 0!==r&&void 0!==i&&("number"==typeof r?(this.line=r,this.column=i):(this.line=r.line,this.column=r.column,this.endLine=i.line,this.endColumn=i.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,t)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",void 0!==this.line&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(t){if(!this.source)return"";var e=this.source;null==t&&(t=r.isColorSupported);var n=t=>t,s=t=>t,o=t=>t;if(t){var a=r.createColors(!0),h=a.bold,u=a.gray,l=a.red;s=t=>h(l(t)),n=t=>u(t),i&&(o=t=>i(t))}var f=e.split(/\r?\n/),c=Math.max(this.line-3,0),v=Math.min(this.line+2,f.length),d=String(v).length;return f.slice(c,v).map((t,e)=>{var r=c+1+e,i=" "+(" "+r).slice(-d)+" | ";if(r===this.line){if(t.length>160){var a=Math.max(0,this.column-20),h=Math.max(this.column+20,this.endColumn+20),u=t.slice(a,h),l=n(i.replace(/\d/g," "))+t.slice(0,Math.min(this.column-1,19)).replace(/[^\t]/g," ");return s(">")+n(i)+o(u)+"\n "+l+s("^")}var f=n(i.replace(/\d/g," "))+t.slice(0,this.column-1).replace(/[^\t]/g," ");return s(">")+n(i)+o(t)+"\n "+f+s("^")}return" "+n(i)+o(t)}).join("\n")}toString(){var t=this.showSourceCode();return t&&(t="\n\n"+t+"\n"),this.name+": "+this.message+t}};e.exports=n,n.default=n}),gr=dr((t,e)=>{var r=/(<)(\/?style\b)/gi,i=/(<)(!--)/g,n=/[\t\n\f\r "#'()/;[\\\]{}]/;function s(t){return"string"!=typeof t?t:t.includes("<")?t.replace(r,"\\3c $2").replace(i,"\\3c $2"):t}var o={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function a(t,e){var r="@"+e.name,i=e.params?t.rawValue(e,"params"):"",s=e.raws.afterName;return void 0===s?s=i?" ":"":""===s&&i&&!n.test(i[0])&&(s=" "),r+s+i}function h(t,e,r){for(var i=r.nodes,n=i.length-1;n>0&&"comment"===i[n].type;)n-=1;for(var s=t.raw(r,"semicolon"),o="document"===r.type,a=i.length-1;a>=0;a--){var h=i[a],u=n!==a||s;!u&&i.length-1>a&&("atrule"===h.type&&!h.nodes||"decl"===h.type&&h.prop.startsWith("--"))&&(u=!0),e.push({document:o,node:h,semicolon:u})}}function u(t,e,r,i){var n=t.raw(r,"between","beforeOpen");t.builder(s(i+n)+"{",r,"start");var o=r.nodes&&r.nodes.length,a=()=>{var e=o?t.raw(r,"after"):t.raw(r,"after","emptyBody");e&&t.builder(s(e)),t.builder("}",r,"end"),"rule"===r.type&&r.raws.ownSemicolon&&t.builder(s(r.raws.ownSemicolon),r,"end")};o?(e.push(a),h(t,e,r)):a()}var l=class t{constructor(t){this.builder=t}atrule(t,e){var r=a(this,t);t.nodes?this.block(t,r):this.builder(s(r+((t.raws.between||"")+(e?";":""))),t)}beforeAfter(t,e){var r;r=this.raw(t,null,"decl"===t.type?"beforeDecl":"comment"===t.type?"beforeComment":"before"===e?"beforeRule":"beforeClose");for(var i=t.parent,n=0;i&&"root"!==i.type;)n+=1,i=i.parent;if(r.includes("\n")){var s=this.raw(t,null,"indent");if(s.length)for(var o=0;n>o;o++)r+=s}return r}block(t,e){var r,i=this.raw(t,"between","beforeOpen");this.builder(s(e+i)+"{",t,"start"),t.nodes&&t.nodes.length?(this.body(t),r=this.raw(t,"after")):r=this.raw(t,"after","emptyBody"),r&&this.builder(s(r)),this.builder("}",t,"end")}body(e){var r=t.prototype,i=["atrule","block","body","rule","stringify"].every(t=>this[t]===r[t]),n=[];for(h(this,n,e);n.length>0;){var o=n.pop();if("function"!=typeof o){var l=o.node,f=this.raw(l,"before");f&&this.builder(o.document?f:s(f)),i&&"rule"===l.type?u(this,n,l,this.rawValue(l,"selector")):i&&"atrule"===l.type&&l.nodes?u(this,n,l,a(this,l)):this.stringify(l,o.semicolon)}else o()}}comment(t){var e=this.raw(t,"left","commentLeft"),r=this.raw(t,"right","commentRight");this.builder(s("/*"+e+t.text+r+"*/"),t)}decl(t,e){var r=t.raws,i=this.raw(t,"between","colon"),n=t.prop+i+this.rawValue(t,"value");t.important&&(n+=r.important||" !important"),e&&(n+=";"),this.builder(s(n),t)}document(t){this.body(t)}raw(t,e,r){var i;if(r||(r=e),e&&void 0!==(i=t.raws[e]))return i;var n=t.parent;if("before"===r){if(!n||"root"===n.type&&n.first===t)return"";if(n&&"document"===n.type)return""}if(!n)return o[r];var s=t.root(),a=s.rawCache||(s.rawCache={});if(void 0!==a[r])return a[r];if("before"===r||"after"===r)return this.beforeAfter(t,r);var h,u="raw"+((h=r)[0].toUpperCase()+h.slice(1));return this[u]?i=this[u](s,t):s.walk(t=>{if(void 0!==(i=t.raws[e]))return!1}),void 0===i&&(i=o[r]),a[r]=i,i}rawBeforeClose(t){var e;return t.walk(t=>{if(t.nodes&&t.nodes.length>0&&void 0!==t.raws.after)return(e=t.raws.after).includes("\n")&&(e=e.replace(/[^\n]+$/,"")),!1}),e&&(e=e.replace(/\S/g,"")),e}rawBeforeComment(t,e){var r;return t.walkComments(t=>{if(void 0!==t.raws.before)return(r=t.raws.before).includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1}),void 0===r?r=this.raw(e,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeDecl(t,e){var r;return t.walkDecls(t=>{if(void 0!==t.raws.before)return(r=t.raws.before).includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1}),void 0===r?r=this.raw(e,null,"beforeRule"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeOpen(t){var e;return t.walk(t=>{if("decl"!==t.type&&void 0!==(e=t.raws.between))return!1}),e}rawBeforeRule(t){var e;return t.walk(r=>{if(r.nodes&&(r.parent!==t||t.first!==r)&&void 0!==r.raws.before)return(e=r.raws.before).includes("\n")&&(e=e.replace(/[^\n]+$/,"")),!1}),e&&(e=e.replace(/\S/g,"")),e}rawColon(t){var e;return t.walkDecls(t=>{if(void 0!==t.raws.between)return e=t.raws.between.replace(/[^\s:]/g,""),!1}),e}rawEmptyBody(t){var e;return t.walk(t=>{if(t.nodes&&0===t.nodes.length&&void 0!==(e=t.raws.after))return!1}),e}rawIndent(t){return t.raws.indent?t.raws.indent:(t.walk(r=>{var i=r.parent;if(i&&i!==t&&i.parent&&i.parent===t&&void 0!==r.raws.before){var n=r.raws.before.split("\n");return e=(e=n[n.length-1]).replace(/\S/g,""),!1}}),e);var e}rawSemicolon(t){var e;return t.walk(t=>{if(t.nodes&&t.nodes.length&&"decl"===t.last.type&&void 0!==(e=t.raws.semicolon))return!1}),e}rawValue(t,e){var r=t[e],i=t.raws[e];return i&&i.value===r?i.raw:r}root(t){if(t.source&&t.source.input.hasBOM&&this.builder("\ufeff",t,"start"),this.body(t),t.raws.after){var e=t.raws.after;this.builder(t.parent&&"document"===t.parent.type?e:s(e))}}rule(t){this.block(t,this.rawValue(t,"selector")),t.raws.ownSemicolon&&this.builder(s(t.raws.ownSemicolon),t,"end")}stringify(t,e){if(!this[t.type])throw new Error("Unknown AST node type "+t.type+". Maybe you need to change PostCSS stringifier.");this[t.type](t,e)}};e.exports=l,l.default=l}),wr=dr((t,e)=>{var r=gr();function i(t,e){new r(e).stringify(t)}e.exports=i,i.default=i}),br=dr((t,e)=>{e.exports.isClean=Symbol("isClean"),e.exports.my=Symbol("my")}),Sr=dr((t,e)=>{var r=yr(),i=gr(),n=wr(),s=br(),o=s.isClean,a=s.my;function h(t,e){if(e&&void 0!==e.offset)return e.offset;for(var r=1,i=1,n=0,s=0;t.length>s;s++){if(i===e.line&&r===e.column){n=s;break}"\n"===t[s]?(r=1,i+=1):r+=1}return n}var u=class t{get proxyOf(){return this}constructor(t){for(var e of(void 0===t&&(t={}),this.raws={},this[o]=!1,this[a]=!0,Object.keys(t)))if("__proto__"!==e)if("nodes"===e)for(var r of(this.nodes=[],t[e]))this.append("function"==typeof r.clone&&r.parent?r.clone():r);else this[e]=t[e]}addToError(t){if(t.postcssNode=this,t.stack&&this.source&&/\n\s{4}at /.test(t.stack)){var e=this.source;t.stack=t.stack.replace(/\n\s{4}at /,"$&"+e.input.from+":"+e.start.line+":"+e.start.column+"$&")}return t}after(t){return this.parent.insertAfter(this,t),this}assign(t){for(var e in void 0===t&&(t={}),t)this[e]=t[e];return this}before(t){return this.parent.insertBefore(this,t),this}cleanRaws(t){delete this.raws.before,delete this.raws.after,t||delete this.raws.between}clone(t){void 0===t&&(t={});var e=function(t){for(var e=new t.constructor,r=[[t,e,void 0]];r.length>0;){var i=r.pop(),n=i[0],s=i[1],o=i[2];for(var a in n)if({}.hasOwnProperty.call(n,a)&&"proxyCache"!==a){var h=n[a],u=typeof h;if("parent"===a&&"object"===u)o&&(s[a]=o);else if("source"===a)s[a]=h;else if(Array.isArray(h)){var l=[];for(var f of(s[a]=l,h)){var c=new f.constructor;l.push(c),r.push([f,c,s])}}else{if("object"===u&&null!==h){var v=new h.constructor;r.push([h,v,void 0]),h=v}s[a]=h}}}return e}(this);for(var r in t)e[r]=t[r];return e}cloneAfter(t){void 0===t&&(t={});var e=this.clone(t);return this.parent.insertAfter(this,e),e}cloneBefore(t){void 0===t&&(t={});var e=this.clone(t);return this.parent.insertBefore(this,e),e}error(t,e){if(void 0===e&&(e={}),this.source){var i=this.rangeBy(e),n=i.end,s=i.start;return this.source.input.error(t,{column:s.column,line:s.line},{column:n.column,line:n.line},e)}return new r(t)}getProxyProcessor(){return{get(t,e){return"proxyOf"===e?t:"root"===e?()=>t.root().toProxy():t[e]},set(t,e,r){return t[e]===r||(t[e]=r,"prop"!==e&&"value"!==e&&"name"!==e&&"params"!==e&&"important"!==e&&"text"!==e||t.markDirty()),!0}}}markClean(){this[o]=!0}markDirty(){if(this[o]){this[o]=!1;for(var t=this;t=t.parent;)t[o]=!1}}next(){if(this.parent){var t=this.parent.index(this);return this.parent.nodes[t+1]}}positionBy(t){void 0===t&&(t={});var e="document"in this.source.input?this.source.input.document:this.source.input.css,r={column:this.source.start.column,line:this.source.start.line,offset:h(e,this.source.start)};if(t.index)r=this.positionInside(t.index);else if(t.word){var i=e.slice(h(e,this.source.start),h(e,this.source.end)).indexOf(t.word);-1!==i&&(r=this.positionInside(i))}return r}positionInside(t){for(var e=this.source.start.column,r=this.source.start.line,i=("document"in this.source.input?this.source.input.document:this.source.input.css),n=h(i,this.source.start),s=n+t,o=n;s>o;o++)"\n"===i[o]?(e=1,r+=1):e+=1;return{column:e,line:r,offset:s}}prev(){if(this.parent){var t=this.parent.index(this);return this.parent.nodes[t-1]}}rangeBy(t){void 0===t&&(t={});var e="document"in this.source.input?this.source.input.document:this.source.input.css,r={column:this.source.start.column,line:this.source.start.line,offset:h(e,this.source.start)},i=this.source.end?{column:this.source.end.column+1,line:this.source.end.line,offset:"number"==typeof this.source.end.offset?this.source.end.offset:h(e,this.source.end)+1}:{column:r.column+1,line:r.line,offset:r.offset+1};if(t.word){var n=e.slice(h(e,this.source.start),h(e,this.source.end)).indexOf(t.word);-1!==n&&(r=this.positionInside(n),i=this.positionInside(n+t.word.length))}else t.start?r={column:t.start.column,line:t.start.line,offset:h(e,t.start)}:"number"==typeof t.index&&(r=this.positionInside(t.index)),t.end?i={column:t.end.column,line:t.end.line,offset:h(e,t.end)}:"number"==typeof t.endIndex?i=this.positionInside(t.endIndex):"number"==typeof t.index&&(i=this.positionInside(t.index+1));return(r.line>i.line||i.line===r.line&&r.column>=i.column)&&(i={column:r.column+1,line:r.line,offset:r.offset+1}),{end:i,start:r}}raw(t,e){return(new i).raw(this,t,e)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(){if(this.parent){for(var t=this,e=!1,r=arguments.length,i=new Array(r),n=0;r>n;n++)i[n]=arguments[n];for(var s of i)s===this?e=!0:e?(this.parent.insertAfter(t,s),t=s):this.parent.insertBefore(t,s);e||this.remove()}return this}root(){for(var t=this;t.parent&&"document"!==t.parent.type;)t=t.parent;return t}toJSON(e,r){var i=null==r;r=r||new Map;for(var n=[],s=[[this,n,0]],o=0;s.length>o;o++){var a=s[o],h=a[0],u=a[1],l=a[2],f={};for(var c in u[l]=f,h)if({}.hasOwnProperty.call(h,c)&&"parent"!==c&&"proxyCache"!==c){var v=h[c];if(Array.isArray(v)){var d=[];f[c]=d;for(var p=0;v.length>p;p++){var m=v[p];"object"==typeof m&&m.toJSON?m.toJSON===t.prototype.toJSON?s.push([m,d,p]):d[p]=m.toJSON(null,r):d[p]=m}}else if("object"==typeof v&&v.toJSON)v.toJSON===t.prototype.toJSON?s.push([v,f,c]):f[c]=v.toJSON(null,r);else if("source"===c){if(null==v)continue;var y=r.get(v.input);null==y&&r.set(v.input,y=r.size),f[c]={end:v.end,inputId:y,start:v.start}}else f[c]=v}}var g=n[0];return i&&(g.inputs=[...r.keys()].map(t=>t.toJSON())),g}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(t){void 0===t&&(t=n),t.stringify&&(t=t.stringify);var e="";return t(this,t=>{e+=t}),e}warn(t,e,r){void 0===r&&(r={});var i={node:this};for(var n in r)i[n]=r[n];return t.warn(e,i)}};e.exports=u,u.default=u}),kr=dr((t,e)=>{var r=Sr(),i=class extends r{constructor(t){super(t),this.type="comment"}};e.exports=i,i.default=i}),Cr=dr((t,e)=>{var r=Sr(),i=class extends r{get variable(){return this.prop.startsWith("--")||"$"===this.prop[0]}constructor(t){t&&void 0!==t.value&&"string"!=typeof t.value&&(t=o({},t,{value:String(t.value)})),super(t),this.type="decl"}};e.exports=i,i.default=i}),Mr=dr((t,e)=>{var r,i,n,s,o=kr(),a=Cr(),h=Sr(),u=br(),l=u.isClean,f=u.my,c=class t extends h{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]}append(){for(var t=arguments.length,e=new Array(t),r=0;t>r;r++)e[r]=arguments[r];for(var i of e)for(var n of this.normalize(i,this.last))this.proxyOf.nodes.push(n);return this.markDirty(),this}cleanRaws(e){for(var r=[this];r.length>0;){var i=r.pop();if(i===this||i.cleanRaws===t.prototype.cleanRaws){if(h.prototype.cleanRaws.call(i,e),i.nodes)for(var n of i.nodes)r.push(n)}else i.cleanRaws(e)}}each(t){if(this.proxyOf.nodes){for(var e,r,i=this.getIterator();this.proxyOf.nodes.length>this.indexes[i]&&!1!==(r=t(this.proxyOf.nodes[e=this.indexes[i]],e));)this.indexes[i]+=1;return delete this.indexes[i],r}}every(t){return this.nodes.every(t)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;var t=this.lastEach;return this.indexes[t]=0,t}getProxyProcessor(){return{get(t,e){return"proxyOf"===e?t:t[e]?"each"===e||"string"==typeof e&&e.startsWith("walk")?function(){for(var r=arguments.length,i=new Array(r),n=0;r>n;n++)i[n]=arguments[n];return t[e](...i.map(t=>"function"==typeof t?(e,r)=>t(e.toProxy(),r):t))}:"every"===e||"some"===e?r=>t[e](function(t){for(var e=arguments.length,i=new Array(e>1?e-1:0),n=1;e>n;n++)i[n-1]=arguments[n];return r(t.toProxy(),...i)}):"root"===e?()=>t.root().toProxy():"nodes"===e?t.nodes.map(t=>t.toProxy()):"first"===e||"last"===e?t[e].toProxy():t[e]:t[e]},set(t,e,r){return t[e]===r||(t[e]=r,"name"!==e&&"params"!==e&&"selector"!==e||t.markDirty()),!0}}}index(t){return"number"==typeof t?t:(t.proxyOf&&(t=t.proxyOf),this.proxyOf.nodes.indexOf(t))}insertAfter(t,e){var r,i=this.index(t),n=this.normalize(e,this.proxyOf.nodes[i]).reverse();for(var s of(i=this.index(t),n))this.proxyOf.nodes.splice(i+1,0,s);for(var o in this.indexes)(r=this.indexes[o])>i&&(this.indexes[o]=r+n.length);return this.markDirty(),this}insertBefore(t,e){var r,i=this.index(t),n=this.normalize(e,this.proxyOf.nodes[i],0===i&&"prepend").reverse();for(var s of(i=this.index(t),n))this.proxyOf.nodes.splice(i,0,s);for(var o in this.indexes)i>(r=this.indexes[o])||(this.indexes[o]=r+n.length);return this.markDirty(),this}normalize(e,n){if("string"==typeof e)e=function(t){for(var e=t.slice();e.length>0;){var r=e.pop();if(delete r.source,r.nodes)for(var i of(r.nodes=r.nodes.slice(),r.nodes))e.push(i)}return t.slice()}(i(e).nodes);else if(void 0===e)e=[];else if(Array.isArray(e))for(var h of e=e.slice(0))h.parent&&h.parent.removeChild(h,"ignore");else if("root"===e.type&&"document"!==this.type)for(var u of e=e.nodes.slice(0))u.parent&&u.parent.removeChild(u,"ignore");else if(e.type)e=[e];else if(e.prop){if(void 0===e.value)throw new Error("Value field is missed in node creation");"string"!=typeof e.value&&(e.value=String(e.value)),e=[new a(e)]}else if(e.selector||e.selectors)e=[new s(e)];else if(e.name)e=[new r(e)];else{if(!e.text)throw new Error("Unknown node type in node creation");e=[new o(e)]}return e.map(e=>(e[f]||t.rebuild(e),(e=e.proxyOf).parent&&e.parent.removeChild(e),e[l]&&function(t){for(var e=[t];e.length>0;){var r=e.pop();if(r[l]=!1,r.proxyOf.nodes)for(var i of r.proxyOf.nodes)e.push(i)}}(e),e.raws||(e.raws={}),void 0===e.raws.before&&n&&void 0!==n.raws.before&&(e.raws.before=n.raws.before.replace(/\S/g,"")),e.parent=this.proxyOf,e))}prepend(){for(var t=arguments.length,e=new Array(t),r=0;t>r;r++)e[r]=arguments[r];for(var i of e=e.reverse()){var n=this.normalize(i,this.first,"prepend").reverse();for(var s of n)this.proxyOf.nodes.unshift(s);for(var o in this.indexes)this.indexes[o]=this.indexes[o]+n.length}return this.markDirty(),this}push(t){return t.parent=this,this.proxyOf.nodes.push(t),this}removeAll(){for(var t of this.proxyOf.nodes)t.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(t){var e;for(var r in t=this.index(t),this.proxyOf.nodes[t].parent=void 0,this.proxyOf.nodes.splice(t,1),this.indexes)t>(e=this.indexes[r])||(this.indexes[r]=e-1);return this.markDirty(),this}replaceValues(t,e,r){return r||(r=e,e={}),this.walkDecls(i=>{e.props&&!e.props.includes(i.prop)||e.fast&&!i.value.includes(e.fast)||(i.value=i.value.replace(t,r))}),this.markDirty(),this}some(t){return this.nodes.some(t)}walk(t){if(this.proxyOf.nodes)for(var e=[{iterator:this.getIterator(),node:this.proxyOf}];e.length>0;){var r=e[e.length-1],i=r.iterator,n=r.node,s=n.indexes[i];if(n.proxyOf.nodes.length>s){var o=n.proxyOf.nodes[s],a=void 0;try{a=t(o,s)}catch(t){throw o.addToError(t)}if(!1===a){for(var h of e)delete h.node.indexes[h.iterator];return!1}o.walk&&o.proxyOf.nodes?e.push({iterator:o.getIterator(),node:o}):n.indexes[i]+=1}else{delete n.indexes[i],e.pop();var u=e[e.length-1];u&&(u.node.indexes[u.iterator]+=1)}}}walkAtRules(t,e){return e?t instanceof RegExp?this.walk((r,i)=>{if("atrule"===r.type&&t.test(r.name))return e(r,i)}):this.walk((r,i)=>{if("atrule"===r.type&&r.name===t)return e(r,i)}):(e=t,this.walk((t,r)=>{if("atrule"===t.type)return e(t,r)}))}walkComments(t){return this.walk((e,r)=>{if("comment"===e.type)return t(e,r)})}walkDecls(t,e){return e?t instanceof RegExp?this.walk((r,i)=>{if("decl"===r.type&&t.test(r.prop))return e(r,i)}):this.walk((r,i)=>{if("decl"===r.type&&r.prop===t)return e(r,i)}):(e=t,this.walk((t,r)=>{if("decl"===t.type)return e(t,r)}))}walkRules(t,e){return e?t instanceof RegExp?this.walk((r,i)=>{if("rule"===r.type&&t.test(r.selector))return e(r,i)}):this.walk((r,i)=>{if("rule"===r.type&&r.selector===t)return e(r,i)}):(e=t,this.walk((t,r)=>{if("rule"===t.type)return e(t,r)}))}};c.registerParse=t=>{i=t},c.registerRule=t=>{s=t},c.registerAtRule=t=>{r=t},c.registerRoot=t=>{n=t},e.exports=c,c.default=c,c.rebuild=t=>{for(var e=[t];e.length>0;){var i=e.pop();if("atrule"===i.type?Object.setPrototypeOf(i,r.prototype):"rule"===i.type?Object.setPrototypeOf(i,s.prototype):"decl"===i.type?Object.setPrototypeOf(i,a.prototype):"comment"===i.type?Object.setPrototypeOf(i,o.prototype):"root"===i.type&&Object.setPrototypeOf(i,n.prototype),i[f]=!0,i.nodes)for(var h of i.nodes)e.push(h)}}}),xr=dr((t,e)=>{var r=Mr(),i=class extends r{constructor(t){super(t),this.type="atrule"}append(){return this.proxyOf.nodes||(this.nodes=[]),super.append(...arguments)}prepend(){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...arguments)}};e.exports=i,i.default=i,r.registerAtRule(i)}),Ar=dr((t,e)=>{var r,i,n=Mr(),s=class extends n{constructor(t){super(o({type:"document"},t)),this.nodes||(this.nodes=[])}toResult(t){return void 0===t&&(t={}),new r(new i,this,t).stringify()}};s.registerLazyResult=t=>{r=t},s.registerProcessor=t=>{i=t},e.exports=s,s.default=s}),Er=dr((t,e)=>{e.exports={nanoid(t){void 0===t&&(t=21);for(var e="",r=0|t;r-- >0;)e+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return e},customAlphabet:(t,e)=>(void 0===e&&(e=21),function(r){void 0===r&&(r=e);for(var i="",n=0|r;n-- >0;)i+=t[Math.random()*t.length|0];return i})}}),Rr=dr((t,e)=>{var r=mr(),i=r.existsSync,n=r.readFileSync,s=mr(),o=s.dirname,a=s.isAbsolute,h=s.join,u=s.relative,l=s.sep,f=mr(),c=f.SourceMapConsumer,v=f.SourceMapGenerator,d=class{constructor(t,e){if(!1!==e.map){e.unsafeMap&&(this.unsafeMap=!0),this.loadAnnotation(t),this.inline=this.startWith(this.annotation,"data:");var r=this.loadMap(e.from,e.map?e.map.prev:void 0);!this.mapFile&&e.from&&(this.mapFile=e.from),this.mapFile&&(this.root=o(this.mapFile)),r&&(this.text=r)}}consumer(){return this.consumerCache||(this.consumerCache=new c(this.json||this.text)),this.consumerCache}decodeInline(t){var e=t.match(/^data:application\/json;charset=utf-?8,/)||t.match(/^data:application\/json,/);if(e)return decodeURIComponent(t.substr(e[0].length));var r,i=t.match(/^data:application\/json;charset=utf-?8;base64,/)||t.match(/^data:application\/json;base64,/);if(i)return r=t.substr(i[0].length),Buffer?Buffer.from(r,"base64").toString():window.atob(r);var n=t.slice(22);throw n=n.slice(0,n.indexOf(",")),new Error("Unsupported source map encoding "+n)}getAnnotationURL(t){return t.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(t){return"object"==typeof t&&("string"==typeof t.mappings||"string"==typeof t._mappings||Array.isArray(t.sections))}loadAnnotation(t){var e=t.match(/\/\*\s*# sourceMappingURL=/g);if(e){var r=t.lastIndexOf(e.pop()),i=t.indexOf("*/",r);r>-1&&i>-1&&(this.annotation=this.getAnnotationURL(t.substring(r,i)))}}loadFile(t,e,r){if(!r&&!this.unsafeMap){if(!/\.map$/i.test(t))return;if(!e)return;var s=u(o(e),t);if(".."===s||s.startsWith(".."+l)||a(s))return}if(this.root=o(t),i(t))return this.mapFile=t,n(t,"utf-8").toString().trim()}loadMap(t,e){if(!1===e)return!1;if(e){if("string"==typeof e)return e;if("function"!=typeof e){if(e instanceof c)return v.fromSourceMap(e).toString();if(e instanceof v)return e.toString();if(this.isMap(e))return JSON.stringify(e);throw new Error("Unsupported previous source map format: "+e.toString())}var r=e(t);if(r){var i=this.loadFile(r,t,!0);if(!i)throw new Error("Unable to load previous source map: "+r.toString());return i}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){var n=this.annotation;t&&(n=h(o(t),n));var s=this.loadFile(n,t,!1);if(s)try{this.json=JSON.parse(s.replace(/^\)]}'[^\n]*\n/,""))}catch(t){return}return s}}}startWith(t,e){return!!t&&t.substr(0,e.length)===e}withContent(){return!(!this.consumer().sourcesContent||0>=this.consumer().sourcesContent.length)}};e.exports=d,d.default=d}),Ir=dr((t,e)=>{var r=Er().nanoid,i=mr(),n=i.isAbsolute,s=i.resolve,a=mr(),h=a.SourceMapConsumer,u=a.SourceMapGenerator,l=mr(),f=l.fileURLToPath,c=l.pathToFileURL,v=yr(),d=Rr(),p=mr(),m=Symbol("lineToIndexCache"),y=Boolean(h&&u),g=Boolean(s&&n);function w(t){if(t[m])return t[m];for(var e=t.css.split("\n"),r=new Array(e.length),i=0,n=0,s=e.length;s>n;n++)r[n]=i,i+=e[n].length+1;return t[m]=r,r}var b=class{get from(){return this.file||this.id}constructor(t,e){if(void 0===e&&(e={}),null==t||"object"==typeof t&&!t.toString)throw new Error("PostCSS received "+t+" instead of CSS string");if(this.css=t.toString(),"\ufeff"===this.css[0]||""===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,this.document=this.css,e.document&&(this.document=e.document.toString()),e.from&&(this.file=!g||/^\w+:\/\//.test(e.from)||n(e.from)?e.from:s(e.from)),g&&y){var i=new d(this.css,e);if(i.text){this.map=i;var o=i.consumer().file;!this.file&&o&&(this.file=this.mapResolve(o))}}this.file||(this.id="<input css "+r(6)+">"),this.map&&(this.map.file=this.from)}error(t,e,r,i){var n,s,o,a,h;if(void 0===i&&(i={}),e&&"object"==typeof e){var u=e,l=r;if("number"==typeof u.offset){var f=this.fromOffset(a=u.offset);e=f.line,r=f.col}else a=this.fromLineAndColumn(e=u.line,r=u.column);if("number"==typeof l.offset){var d=this.fromOffset(o=l.offset);s=d.line,n=d.col}else s=l.line,n=l.column,o=this.fromLineAndColumn(l.line,l.column)}else if(r)a=this.fromLineAndColumn(e,r);else{var p=this.fromOffset(a=e);e=p.line,r=p.col}var m=this.origin(e,r,s,n);return(h=m?new v(t,void 0===m.endLine?m.line:{column:m.column,line:m.line},void 0===m.endLine?m.column:{column:m.endColumn,line:m.endLine},m.source,m.file,i.plugin):new v(t,void 0===s?e:{column:r,line:e},void 0===s?r:{column:n,line:s},this.css,this.file,i.plugin)).input={column:r,endColumn:n,endLine:s,endOffset:o,line:e,offset:a,source:this.css},this.file&&(c&&(h.input.url=c(this.file).toString()),h.input.file=this.file),h}fromLineAndColumn(t,e){return w(this)[t-1]+e-1}fromOffset(t){var e=w(this),r=0;if(e[e.length-1]>t)for(var i,n=e.length-2;n>r;)if(e[i=r+(n-r>>1)]>t)n=i-1;else{if(e[i+1]>t){r=i;break}r=i+1}else r=e.length-1;return{col:t-e[r]+1,line:r+1}}mapResolve(t){return/^\w+:\/\//.test(t)?t:s(this.map.consumer().sourceRoot||this.map.root||".",t)}origin(t,e,r,i){if(!this.map)return!1;var s,o,a=this.map.consumer(),h=a.originalPositionFor({column:e-1,line:t});if(!h.source)return!1;if("number"==typeof r){var u=a.originalPositionFor({column:i-1,line:r});u.source&&(s=u)}o=n(h.source)?c(h.source):new URL(h.source,this.map.consumer().sourceRoot||c(this.map.mapFile));var l={column:h.column+1,endColumn:s&&s.column+1,endLine:s&&s.line,line:h.line,url:o.toString()};if("file:"===o.protocol){if(!f)throw new Error("file: protocol is not available in this PostCSS build");l.file=f(o)}var v=a.sourceContentFor(h.source);return v&&(l.source=v),l}toJSON(){var t={};for(var e of["hasBOM","css","file","id"])null!=this[e]&&(t[e]=this[e]);return this.map&&(t.map=o({},this.map),t.map.consumerCache&&(t.map.consumerCache=void 0)),t}};e.exports=b,b.default=b,p&&p.registerInput&&p.registerInput(b)}),Tr=dr((t,e)=>{var r,i,n=Mr(),s=class extends n{constructor(t){super(t),this.type="root",this.nodes||(this.nodes=[])}normalize(t,e,r){var i=new Set;for(var n of Array.isArray(t)?t:[t])n&&"object"==typeof n&&!n.parent&&n.raws&&void 0!==n.raws.before&&i.add(n.raws);var s=super.normalize(t);if(e)if("prepend"===r)this.nodes.length>1?e.raws.before=this.nodes[1].raws.before:delete e.raws.before;else if(this.first!==e)for(var o of s)i.has(o.raws)||(o.raws.before=e.raws.before);return s}removeChild(t,e){var r=this.index(t);return!e&&0===r&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(t)}toResult(t){return void 0===t&&(t={}),new r(new i,this,t).stringify()}};s.registerLazyResult=t=>{r=t},s.registerProcessor=t=>{i=t},e.exports=s,s.default=s,n.registerRoot(s)}),Or=dr((t,e)=>{var r={comma(t){return r.split(t,[","],!0)},space(t){return r.split(t,[" ","\n","\t"])},split(t,e,r){var i=[],n="",s=!1,o=0,a=!1,h="",u=!1;for(var l of t)u?u=!1:"\\"===l?u=!0:a?l===h&&(a=!1):'"'===l||"'"===l?(a=!0,h=l):"("===l?o+=1:")"===l?o>0&&(o-=1):0===o&&e.includes(l)&&(s=!0),s?(""!==n&&i.push(n.trim()),n="",s=!1):n+=l;return(r||""!==n)&&i.push(n.trim()),i}};e.exports=r,r.default=r}),Dr=dr((t,e)=>{var r=Mr(),i=Or(),n=class extends r{get selectors(){return i.comma(this.selector)}set selectors(t){var e=this.selector?this.selector.match(/,\s*/):null,r=e?e[0]:","+this.raw("between","beforeOpen");this.selector=t.join(r)}constructor(t){super(t),this.type="rule",this.nodes||(this.nodes=[])}};e.exports=n,n.default=n,r.registerRule(n)}),Nr=dr((t,r)=>{var i=xr(),n=kr(),a=Cr(),h=Ir(),u=Rr(),l=Tr(),f=Dr();function c(t,e){return t.inputs?t.inputs.map(t=>{var e=o({},t,{__proto__:h.prototype});return e.map&&(e.map=o({},e.map,{__proto__:u.prototype})),e}):e}function v(t,r,h){var u,c=o({},t);if(delete c.inputs,delete c.nodes,c.source){var v=c.source,d=v.inputId;c.source=s(v,e),null!=d&&(c.source.input=r[d])}if("root"===c.type)u=new l(c);else if("decl"===c.type)u=new a(c);else if("rule"===c.type)u=new f(c);else if("comment"===c.type)u=new n(c);else{if("atrule"!==c.type)throw new Error("Unknown node type: "+t.type);u=new i(c)}if(h)for(var p of(u.nodes=h,h))p.parent=u;return u}function d(t,e){if(Array.isArray(t))return t.map(t=>d(t));for(var r,i=[{childIndex:0,children:[],inputs:c(t,e),json:t}];i.length>0;){var n=i[i.length-1],s=n.json.nodes;if(s&&s.length>n.childIndex){var o=s[n.childIndex];n.childIndex+=1,i.push({childIndex:0,children:[],inputs:c(o,n.inputs),json:o})}else{i.pop();var a=v(n.json,n.inputs,s?n.children:void 0);i.length>0?i[i.length-1].children.push(a):r=a}}return r}r.exports=d,d.default=d}),_r=dr((t,e)=>{var r=mr(),i=r.dirname,n=r.relative,s=r.resolve,o=r.sep,a=mr(),h=a.SourceMapConsumer,u=a.SourceMapGenerator,l=mr().pathToFileURL,f=Ir(),c=Boolean(h&&u),v=Boolean(i&&s&&n&&o);e.exports=class{constructor(t,e,r,i){this.stringify=t,this.mapOpts=r.map||{},this.root=e,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(){var t;t=this.isInline()?"data:application/json;base64,"+this.toBase64(this.map.toString()):"string"==typeof this.mapOpts.annotation?this.mapOpts.annotation:"function"==typeof this.mapOpts.annotation?this.mapOpts.annotation(this.opts.to,this.root):this.outputFile()+".map";var e="\n";this.css.includes("\r\n")&&(e="\r\n"),this.css+=e+"/*# sourceMappingURL="+t+" */"}applyPrevMaps(){for(var t of this.previous()){var e=this.toUrl(this.path(t.file)),r=t.root||i(t.file),n=void 0;!1===this.mapOpts.sourcesContent?(n=new h(t.text)).sourcesContent&&(n.sourcesContent=null):n=t.consumer(),this.map.applySourceMap(n,e,this.toUrl(this.path(r)))}}clearAnnotation(){if(!1!==this.mapOpts.annotation)if(this.root)for(var t,e=this.root.nodes.length-1;e>=0;e--)"comment"===(t=this.root.nodes[e]).type&&t.text.startsWith("# sourceMappingURL=")&&this.root.removeChild(e);else if(this.css)for(var r;-1!==(r=this.css.lastIndexOf("/*#"));){var i=this.css.indexOf("*/",r+3);if(-1===i)break;for(;r>0&&"\n"===this.css[r-1];)r--;this.css=this.css.slice(0,r)+this.css.slice(i+2)}}generate(){if(this.clearAnnotation(),v&&c&&this.isMap())return this.generateMap();var t="";return this.stringify(this.root,e=>{t+=e}),[t]}generateMap(){if(this.root)this.generateString();else if(1===this.previous().length){var t=this.previous()[0].consumer();t.file=this.outputFile(),this.map=u.fromSourceMap(t,{ignoreInvalidMapping:!0})}else this.map=new u({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css="",this.map=new u({file:this.outputFile(),ignoreInvalidMapping:!0});var t,e,r=1,i=1,n="<no source>",s={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,(o,a,h)=>{if(this.css+=o,a&&"end"!==h&&(s.generated.line=r,s.generated.column=i-1,a.source&&a.source.start?(s.source=this.sourcePath(a),s.original.line=a.source.start.line,s.original.column=a.source.start.column-1,this.map.addMapping(s)):(s.source=n,s.original.line=1,s.original.column=0,this.map.addMapping(s))),(e=o.match(/\n/g))?(r+=e.length,t=o.lastIndexOf("\n"),i=o.length-t):i+=o.length,a&&"start"!==h){var u=a.parent||{raws:{}};("decl"!==a.type&&("atrule"!==a.type||a.nodes)||a!==u.last||u.raws.semicolon)&&(a.source&&a.source.end?(s.source=this.sourcePath(a),s.original.line=a.source.end.line,s.original.column=a.source.end.column-1,s.generated.line=r,s.generated.column=i-2,this.map.addMapping(s)):(s.source=n,s.original.line=1,s.original.column=0,s.generated.line=r,s.generated.column=i-1,this.map.addMapping(s)))}})}isAnnotation(){return!!this.isInline()||(void 0!==this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some(t=>t.annotation))}isInline(){if(void 0!==this.mapOpts.inline)return this.mapOpts.inline;var t=this.mapOpts.annotation;return(void 0===t||!0===t)&&(!this.previous().length||this.previous().some(t=>t.inline))}isMap(){return void 0!==this.opts.map?!!this.opts.map:this.previous().length>0}isSourcesContent(){return void 0!==this.mapOpts.sourcesContent?this.mapOpts.sourcesContent:!this.previous().length||this.previous().some(t=>t.withContent())}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(t){if(this.mapOpts.absolute)return t;if(60===t.charCodeAt(0))return t;if(/^\w+:\/\//.test(t))return t;var e=this.memoizedPaths.get(t);if(e)return e;var r=this.opts.to?i(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(r=i(s(r,this.mapOpts.annotation)));var o=n(r,t);return this.memoizedPaths.set(t,o),o}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(t=>{if(t.source&&t.source.input.map){var e=t.source.input.map;this.previousMaps.includes(e)||this.previousMaps.push(e)}});else{var t=new f(this.originalCSS,this.opts);t.map&&this.previousMaps.push(t.map)}return this.previousMaps}setSourcesContent(){var t={};if(this.root)this.root.walk(e=>{if(e.source){var r=e.source.input.from;if(r&&!t[r]){t[r]=!0;var i=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(i,e.source.input.css)}}});else if(this.css){var e=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(e,this.css)}}sourcePath(t){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(t.source.input.from):this.toUrl(this.path(t.source.input.from))}toBase64(t){return Buffer?Buffer.from(t).toString("base64"):window.btoa(unescape(encodeURIComponent(t)))}toFileUrl(t){var e=this.memoizedFileURLs.get(t);if(e)return e;if(l){var r=l(t).toString();return this.memoizedFileURLs.set(t,r),r}throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(t){var e=this.memoizedURLs.get(t);if(e)return e;"\\"===o&&(t=t.replace(/\\/g,"/"));var r=encodeURI(t).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(t,r),r}}}),Lr=dr((t,e)=>{var r="'".charCodeAt(0),i='"'.charCodeAt(0),n="\\".charCodeAt(0),s="/".charCodeAt(0),o="\n".charCodeAt(0),a=" ".charCodeAt(0),h="\f".charCodeAt(0),u="\t".charCodeAt(0),l="\r".charCodeAt(0),f="[".charCodeAt(0),c="]".charCodeAt(0),v="(".charCodeAt(0),d=")".charCodeAt(0),p="{".charCodeAt(0),m="}".charCodeAt(0),y=";".charCodeAt(0),g="*".charCodeAt(0),w=":".charCodeAt(0),b="@".charCodeAt(0),S=/[\t\n\f\r "#'()/;[\\\]{}]/g,k=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,C=/.[\r\n"'(/\\]/,M=/[\da-f]/i;e.exports=function(t,e){void 0===e&&(e={});var x,A,E,R,I,T,O,D,N,_,L=t.css.valueOf(),F=e.ignoreErrors,P=L.length,B=0,j=[],U=[],W=-1;function H(e){throw t.error("Unclosed "+e,B)}return{back(t){U.push(t)},endOfFile:()=>0===U.length&&B>=P,nextToken(t){if(U.length)return U.pop();if(P>B){var e=!!t&&t.ignoreUnclosed;switch(x=L.charCodeAt(B)){case o:case a:case u:case l:case h:R=B;do{x=L.charCodeAt(R+=1)}while(x===a||x===o||x===u||x===l||x===h);T=["space",L.slice(B,R)],B=R-1;break;case f:case c:case p:case m:case w:case y:case d:var G=String.fromCharCode(x);T=[G,G,B];break;case v:if(_=j.length?j.pop()[1]:"",N=L.charCodeAt(B+1),"url"===_&&N!==r&&N!==i&&N!==a&&N!==o&&N!==u&&N!==h&&N!==l){R=B;do{if(O=!1,-1===(R=L.indexOf(")",R+1))){if(F||e){R=B;break}H("bracket")}for(D=R;L.charCodeAt(D-1)===n;)D-=1,O=!O}while(O);T=["brackets",L.slice(B,R+1),B,R],B=R}else B>W?(R=L.indexOf(")",B+1),A=L.slice(B,R+1),-1===R||C.test(A)?(W=-1===R?P:R,T=["(","(",B]):(T=["brackets",A,B,R],B=R)):T=["(","(",B];break;case r:case i:I=x===r?"'":'"',R=B;do{if(O=!1,-1===(R=L.indexOf(I,R+1))){if(F||e){R=B+1;break}H("string")}for(D=R;L.charCodeAt(D-1)===n;)D-=1,O=!O}while(O);T=["string",L.slice(B,R+1),B,R],B=R;break;case b:S.lastIndex=B+1,S.test(L),T=["at-word",L.slice(B,1+(R=0===S.lastIndex?L.length-1:S.lastIndex-2)),B,R],B=R;break;case n:for(R=B,E=!0;L.charCodeAt(R+1)===n;)R+=1,E=!E;if(x=L.charCodeAt(R+1),E&&x!==s&&x!==a&&x!==o&&x!==u&&x!==l&&x!==h&&M.test(L.charAt(R+=1))){for(;M.test(L.charAt(R+1));)R+=1;L.charCodeAt(R+1)===a&&(R+=1)}T=["word",L.slice(B,R+1),B,R],B=R;break;default:x===s&&L.charCodeAt(B+1)===g?(0===(R=L.indexOf("*/",B+2)+1)&&(F||e?R=L.length:H("comment")),T=["comment",L.slice(B,R+1),B,R],B=R):(k.lastIndex=B+1,k.test(L),T=["word",L.slice(B,1+(R=0===k.lastIndex?L.length-1:k.lastIndex-2)),B,R],j.push(T),B=R)}return B++,T}},position:()=>B}}}),Fr=dr((t,e)=>{var r=xr(),i=kr(),n=Cr(),s=Tr(),o=Dr(),a=Lr(),h={empty:!0,space:!0};function u(t,e,r){for(var i="",n=e;r>n;n++)i+=t[n][1];return i}e.exports=class{constructor(t){this.input=t,this.root=new s,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:t,start:{column:1,line:1,offset:0}}}atrule(t){var e,i,n,s=new r;s.name=t[1].slice(1),""===s.name&&this.unnamedAtrule(s,t),this.init(s,t[2]);for(var o=!1,a=!1,h=[],u=[];!this.tokenizer.endOfFile();){if("("===(e=(t=this.tokenizer.nextToken())[0])||"["===e?u.push("("===e?")":"]"):"{"===e&&u.length>0?u.push("}"):e===u[u.length-1]&&u.pop(),0===u.length){if(";"===e){s.source.end=this.getPosition(t[2]),s.source.end.offset++,this.semicolon=!0;break}if("{"===e){a=!0;break}if("}"===e){if(h.length>0){for(i=h[n=h.length-1];i&&"space"===i[0];)i=h[--n];i&&(s.source.end=this.getPosition(i[3]||i[2]),s.source.end.offset++)}this.end(t);break}h.push(t)}else h.push(t);if(this.tokenizer.endOfFile()){o=!0;break}}s.raws.between=this.spacesAndCommentsFromEnd(h),h.length?(s.raws.afterName=this.spacesAndCommentsFromStart(h),this.raw(s,"params",h),o&&(s.source.end=this.getPosition((t=h[h.length-1])[3]||t[2]),s.source.end.offset++,this.spaces=s.raws.between,s.raws.between="")):(s.raws.afterName="",s.params=""),a&&(s.nodes=[],this.current=s)}checkMissedSemicolon(t){var e=this.colon(t);if(!1!==e){for(var r,i=0,n=e-1;n>=0&&("space"===(r=t[n])[0]||2!==(i+=1));n--);throw this.input.error("Missed semicolon","word"===r[0]?r[3]+1:r[2])}}colon(t){var e,r,i,n=0;for(var s of t.entries()){var o=s[0];if("("===(i=(r=s[1])[0])&&(n+=1),")"===i&&(n-=1),0===n&&":"===i){if(e){if("word"===e[0]&&"progid"===e[1])continue;return o}this.doubleColon(r)}e=r}return!1}comment(t){var e=new i;this.init(e,t[2]),e.source.end=this.getPosition(t[3]||t[2]),e.source.end.offset++;var r=t[1].slice(2,-2);if(r.trim()){var n=r.match(/^(\s*)([^]*\S)(\s*)$/);e.text=n[2],e.raws.left=n[1],e.raws.right=n[3]}else e.text="",e.raws.left=r,e.raws.right=""}createTokenizer(){this.tokenizer=a(this.input)}decl(t,e){var r=new n;this.init(r,t[0][2]);var i=t[t.length-1];";"===i[0]&&(this.semicolon=!0,t.pop()),r.source.end=this.getPosition(i[3]||i[2]||function(t){for(var e=t.length-1;e>=0;e--){var r=t[e],i=r[3]||r[2];if(i)return i}}(t)),r.source.end.offset++;for(var s=0;"word"!==t[s][0];)s===t.length-1&&this.unknownWord([t[s]]),s++;r.raws.before+=u(t,0,s),r.source.start=this.getPosition(t[s][2]);for(var o=s;t.length>s;){var a=t[s][0];if(":"===a||"space"===a||"comment"===a)break;s++}r.prop=u(t,o,s);for(var h,l=s;t.length>s&&(h=t[s],s++,":"!==h[0]);)"word"===h[0]&&/\w/.test(h[1])&&this.unknownWord([h]);r.raws.between=u(t,l,s),"_"!==r.prop[0]&&"*"!==r.prop[0]||(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));for(var f=s;t.length>s;){var c=t[s][0];if("space"!==c&&"comment"!==c)break;s++}var v=t.slice(f,s);t=t.slice(s),this.precheckMissedSemicolon(t);for(var d=t.length-1;d>=0;d--){if("!important"===(h=t[d])[1].toLowerCase()){r.important=!0;var p=this.stringFrom(t,d);" !important"!==(p=this.spacesFromEnd(t)+p)&&(r.raws.important=p);break}if("important"===h[1].toLowerCase()){for(var m=t.slice(0),y="",g=d;g>0;g--){var w=m[g][0];if(y.trim().startsWith("!")&&"space"!==w)break;y=m.pop()[1]+y}y.trim().startsWith("!")&&(r.important=!0,r.raws.important=y,t=m)}if("space"!==h[0]&&"comment"!==h[0])break}t.some(t=>"space"!==t[0]&&"comment"!==t[0])&&(r.raws.between+=v.map(t=>t[1]).join(""),v=[]),this.raw(r,"value",v.concat(t),e),r.value.includes(":")&&!e&&this.checkMissedSemicolon(t)}doubleColon(t){throw this.input.error("Double colon",{offset:t[2]},{offset:t[2]+t[1].length})}emptyRule(t){var e=new o;this.init(e,t[2]),e.selector="",e.raws.between="",this.current=e}end(t){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(t[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(t)}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(t){if(this.spaces+=t[1],this.current.nodes){var e=this.current.nodes[this.current.nodes.length-1];e&&"rule"===e.type&&!e.raws.ownSemicolon&&(e.raws.ownSemicolon=this.spaces,this.spaces="",e.source.end=this.getPosition(t[2]),e.source.end.offset+=e.raws.ownSemicolon.length)}}getPosition(t){var e=this.input.fromOffset(t);return{column:e.col,line:e.line,offset:t}}init(t,e){this.current.push(t),t.source={input:this.input,start:this.getPosition(e)},t.raws.before=this.spaces,this.spaces="","comment"!==t.type&&(this.semicolon=!1)}other(t){for(var e=!1,r=null,i=!1,n=null,s=[],o=t[1].startsWith("--"),a=[],h=t;h;){if(r=h[0],a.push(h),"("===r||"["===r)n||(n=h),s.push("("===r?")":"]");else if(o&&i&&"{"===r)n||(n=h),s.push("}");else if(0===s.length){if(";"===r){if(i)return void this.decl(a,o);break}if("{"===r)return void this.rule(a);if("}"===r){this.tokenizer.back(a.pop()),e=!0;break}":"===r&&(i=!0)}else r===s[s.length-1]&&(s.pop(),0===s.length&&(n=null));h=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(e=!0),s.length>0&&this.unclosedBracket(n),e&&i){if(!o)for(;a.length&&("space"===(h=a[a.length-1][0])||"comment"===h);)this.tokenizer.back(a.pop());this.decl(a,o)}else this.unknownWord(a)}parse(){for(var t;!this.tokenizer.endOfFile();)switch((t=this.tokenizer.nextToken())[0]){case"space":this.spaces+=t[1];break;case";":this.freeSemicolon(t);break;case"}":this.end(t);break;case"comment":this.comment(t);break;case"at-word":this.atrule(t);break;case"{":this.emptyRule(t);break;default:this.other(t)}this.endFile()}precheckMissedSemicolon(){}raw(t,e,r,i){for(var n,s,o=r.length,a="",u=!0,l=0;o>l;l+=1)"space"!==(s=(n=r[l])[0])||l!==o-1||i?"comment"===s&&(h[r[l-1]?r[l-1][0]:"empty"]||h[r[l+1]?r[l+1][0]:"empty"]||","===a.slice(-1))?u=!1:a+=n[1]:u=!1;if(!u){var f=r.reduce((t,e)=>t+e[1],"");t.raws[e]={raw:f,value:a}}t[e]=a}rule(t){t.pop();var e=new o;this.init(e,t[0][2]),e.raws.between=this.spacesAndCommentsFromEnd(t),this.raw(e,"selector",t),this.current=e}spacesAndCommentsFromEnd(t){for(var e,r="";t.length&&("space"===(e=t[t.length-1][0])||"comment"===e);)r=t.pop()[1]+r;return r}spacesAndCommentsFromStart(t){for(var e,r="";t.length&&("space"===(e=t[0][0])||"comment"===e);)r+=t.shift()[1];return r}spacesFromEnd(t){for(var e="";t.length&&"space"===t[t.length-1][0];)e=t.pop()[1]+e;return e}stringFrom(t,e){for(var r="",i=e;t.length>i;i++)r+=t[i][1];return t.splice(e,t.length-e),r}unclosedBlock(){var t=this.current.source.start;throw this.input.error("Unclosed block",t.line,t.column)}unclosedBracket(t){throw this.input.error("Unclosed bracket",{offset:t[2]},{offset:t[2]+1})}unexpectedClose(t){throw this.input.error("Unexpected }",{offset:t[2]},{offset:t[2]+1})}unknownWord(t){throw this.input.error("Unknown word "+t[0][1],{offset:t[0][2]},{offset:t[0][2]+t[0][1].length})}unnamedAtrule(t,e){throw this.input.error("At-rule without name",{offset:e[2]},{offset:e[2]+e[1].length})}}}),Pr=dr((t,e)=>{var r=Mr(),i=Ir(),n=Fr();function s(t,e){var r=new n(new i(t,e));try{r.parse()}catch(t){throw"CssSyntaxError"===t.name&&e&&e.from&&(/\.scss$/i.test(e.from)?t.message+="\nYou tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser":/\.sass/i.test(e.from)?t.message+="\nYou tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser":/\.less$/i.test(e.from)&&(t.message+="\nYou tried to parse Less with the standard CSS parser; try again with the postcss-less parser")),t}return r.root}e.exports=s,s.default=s,r.registerParse(s)}),Br=dr((t,e)=>{var r=Mr(),i=br().my,n=class{constructor(t,e){if(void 0===e&&(e={}),this.type="warning",this.text=t,e.node&&e.node.source){e.node[i]||r.rebuild(e.node);var n=e.node.rangeBy(e);this.line=n.start.line,this.column=n.start.column,this.endLine=n.end.line,this.endColumn=n.end.column}for(var s in e)this[s]=e[s]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}};e.exports=n,n.default=n}),jr=dr((t,e)=>{var r=Br(),i=class{get content(){return this.css}constructor(t,e,r){this.processor=t,this.messages=[],this.root=e,this.opts=r,this.css="",this.map=void 0}toString(){return this.css}warn(t,e){void 0===e&&(e={}),e.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(e.plugin=this.lastPlugin.postcssPlugin);var i=new r(t,e);return this.messages.push(i),i}warnings(){return this.messages.filter(t=>"warning"===t.type)}};e.exports=i,i.default=i}),Ur=dr((t,e)=>{var r={};e.exports=function(t){r[t]||(r[t]=!0,"undefined"!=typeof console&&console.warn&&console.warn(t))}}),Wr=dr((t,e)=>{var r=Mr(),i=Ar(),s=_r(),a=Pr(),h=jr(),u=Tr(),l=wr(),f=br(),c=f.isClean,v=f.my,d=Ur(),p={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},m={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},y={Once:!0,postcssPlugin:!0,prepare:!0};function g(t){return"object"==typeof t&&"function"==typeof t.then}function w(t){var e=!1,r=p[t.type];return"decl"===t.type?e=t.prop.toLowerCase():"atrule"===t.type&&(e=t.name.toLowerCase()),e&&t.append?[r,r+"-"+e,0,r+"Exit",r+"Exit-"+e]:e?[r,r+"-"+e,r+"Exit",r+"Exit-"+e]:t.append?[r,0,r+"Exit"]:[r,r+"Exit"]}function b(t){return{eventIndex:0,events:"document"===t.type?["Document",0,"DocumentExit"]:"root"===t.type?["Root",0,"RootExit"]:w(t),iterator:0,node:t,visitorIndex:0,visitors:[]}}function S(t){for(var e=[t];e.length>0;){var r=e.pop();if(r[c]=!1,r.nodes)for(var i of r.nodes)e.push(i)}return t}var k={},C=class t{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"}constructor(e,i,n){var s;if(this.stringified=!1,this.processed=!1,"object"!=typeof i||null===i||"root"!==i.type&&"document"!==i.type)if(i instanceof t||i instanceof h)s=S(i.root),i.map&&(void 0===n.map&&(n.map={}),n.map.inline||(n.map.inline=!1),n.map.prev=i.map);else{var u=a;n.syntax&&(u=n.syntax.parse),n.parser&&(u=n.parser),u.parse&&(u=u.parse);try{s=u(i,n)}catch(t){this.processed=!0,this.error=t}s&&!s[v]&&r.rebuild(s)}else s=S(i);this.result=new h(e,s,n),this.helpers=o({},k,{postcss:k,result:this.result}),this.plugins=this.processor.plugins.map(t=>"object"==typeof t&&t.prepare?o({},t,t.prepare(this.result)):t)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(t){return this.async().catch(t)}finally(t){return this.async().then(t,t)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(t,e){var r=this.result.lastPlugin;try{if(e&&e.addToError(t),this.error=t,"CssSyntaxError"!==t.name||t.plugin){if(r.postcssVersion){var i=r.postcssPlugin,n=r.postcssVersion,s=this.result.processor.version,o=n.split("."),a=s.split(".");(o[0]!==a[0]||parseInt(o[1])>parseInt(a[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+s+", but "+i+" uses "+n+". Perhaps this is the source of the error below.")}}else t.plugin=r.postcssPlugin,t.setMessage()}catch(t){console&&console.error&&console.error(t)}return t}prepareVisitors(){this.listeners={};var t=(t,e,r)=>{this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push([t,r])};for(var e of this.plugins)if("object"==typeof e)for(var r in e){if(!m[r]&&/^[A-Z]/.test(r))throw new Error("Unknown event "+r+" in "+e.postcssPlugin+". Try to update PostCSS ("+this.processor.version+" now).");if(!y[r])if("object"==typeof e[r])for(var i in e[r])t(e,"*"===i?r:r+"-"+i.toLowerCase(),e[r][i]);else"function"==typeof e[r]&&t(e,r,e[r])}this.hasListener=Object.keys(this.listeners).length>0}runAsync(){var t=this;return n(function*(){t.plugin=0;for(var e=0;t.plugins.length>e;e++){var r=t.runOnRoot(t.plugins[e]);if(g(r))try{yield r}catch(e){throw t.handleError(e)}}if(t.prepareVisitors(),t.hasListener){for(var i=t.result.root;!i[c];){i[c]=!0;for(var n=[b(i)];n.length>0;){var s=t.visitTick(n);if(g(s))try{yield s}catch(e){throw t.handleError(e,n[n.length-1].node)}}}if(t.listeners.OnceExit){var o=function*(){var e=a[1];t.result.lastPlugin=a[0];try{if("document"===i.type){var r=i.nodes.map(r=>e(r,t.helpers));yield Promise.all(r)}else yield e(i,t.helpers)}catch(e){throw t.handleError(e)}};for(var a of t.listeners.OnceExit)yield*o()}}return t.processed=!0,t.stringify()})()}runOnRoot(t){this.result.lastPlugin=t;try{if("object"==typeof t&&t.Once){if("document"===this.result.root.type){var e=this.result.root.nodes.map(e=>t.Once(e,this.helpers));return g(e[0])?Promise.all(e):e}return t.Once(this.result.root,this.helpers)}if("function"==typeof t)return t(this.result.root,this.result)}catch(t){throw this.handleError(t)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();var t=this.result.opts,e=l;t.syntax&&(e=t.syntax.stringify),t.stringifier&&(e=t.stringifier),e.stringify&&(e=e.stringify);var r=this.result.root.source;if(void 0===t.map&&!(r&&r.input&&r.input.map)){var i="";return e(this.result.root,t=>{i+=t}),this.result.css=i,this.result}var n=new s(e,this.result.root,this.result.opts).generate();return this.result.css=n[0],this.result.map=n[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(var t of this.plugins)if(g(this.runOnRoot(t)))throw this.getAsyncError();if(this.prepareVisitors(),this.hasListener){for(var e=this.result.root;!e[c];)e[c]=!0,this.walkSync(e);if(this.listeners.OnceExit)if("document"===e.type)for(var r of e.nodes)this.visitSync(this.listeners.OnceExit,r);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(t,e){return"from"in this.opts||d("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(t,e)}toString(){return this.css}visitSync(t,e){for(var r of t){var i=r[1];this.result.lastPlugin=r[0];var n=void 0;try{n=i(e,this.helpers)}catch(t){throw this.handleError(t,e.proxyOf)}if("root"!==e.type&&"document"!==e.type&&!e.parent)return!0;if(g(n))throw this.getAsyncError()}}visitTick(t){var e=t[t.length-1],r=e.node,i=e.visitors;if("root"===r.type||"document"===r.type||r.parent){if(i.length>0&&i.length>e.visitorIndex){var n=i[e.visitorIndex],s=n[0],o=n[1];e.visitorIndex+=1,e.visitorIndex===i.length&&(e.visitors=[],e.visitorIndex=0),this.result.lastPlugin=s;try{return o(r.toProxy(),this.helpers)}catch(t){throw this.handleError(t,r)}}if(0!==e.iterator){for(var a,h=e.iterator;a=r.nodes[r.indexes[h]];)if(r.indexes[h]+=1,!a[c])return a[c]=!0,void t.push(b(a));e.iterator=0,delete r.indexes[h]}for(var u=e.events;u.length>e.eventIndex;){var l=u[e.eventIndex];if(e.eventIndex+=1,0===l)return void(r.nodes&&r.nodes.length&&(r[c]=!0,e.iterator=r.getIterator()));if(this.listeners[l])return void(e.visitors=this.listeners[l])}t.pop()}else t.pop()}walkSync(t){t[c]=!0;for(var e=[{eventIndex:0,events:w(t),iterator:0,node:t}];e.length>0;){var r=e[e.length-1],i=r.node;if(0!==r.iterator){for(var n=r.iterator,s=void 0,o=!1;s=i.nodes[i.indexes[n]];)if(i.indexes[n]+=1,!s[c]){s[c]=!0,e.push({eventIndex:0,events:w(s),iterator:0,node:s}),o=!0;break}if(o)continue;r.iterator=0,delete i.indexes[n]}if(r.events.length>r.eventIndex){var a=r.events[r.eventIndex];if(r.eventIndex+=1,0===a)i.nodes&&i.nodes.length&&(r.iterator=i.getIterator());else{var h=this.listeners[a];h&&this.visitSync(h,i.toProxy())&&e.pop()}}else e.pop()}}warnings(){return this.sync().warnings()}};C.registerPostcss=t=>{k=t},e.exports=C,C.default=C,u.registerLazyResult(C),i.registerLazyResult(C)}),Hr=dr((t,e)=>{var r=_r(),i=Pr(),n=jr(),s=wr(),o=Ur(),a=class{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;var t,e=i;try{t=e(this._css,this._opts)}catch(t){this.error=t}if(this.error)throw this.error;return this._root=t,t}get[Symbol.toStringTag](){return"NoWorkResult"}constructor(t,e,i){e=e.toString(),this.stringified=!1,this._processor=t,this._css=e,this._opts=i,this._map=void 0;var o=s;this.result=new n(this._processor,void 0,this._opts),this.result.css=e;var a=this;Object.defineProperty(this.result,"root",{get(){return a.root}});var h=new r(o,void 0,this._opts,e);if(h.isMap()){var u=h.generate(),l=u[0],f=u[1];l&&(this.result.css=l),f&&(this.result.map=f)}else h.clearAnnotation(),this.result.css=h.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(t){return this.async().catch(t)}finally(t){return this.async().then(t,t)}sync(){if(this.error)throw this.error;return this.result}then(t,e){return"from"in this._opts||o("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(t,e)}toString(){return this._css}warnings(){return[]}};e.exports=a,a.default=a}),Gr=dr((t,e)=>{var r=Ar(),i=Wr(),n=Hr(),s=Tr(),o=class{constructor(t){void 0===t&&(t=[]),this.version="8.5.24",this.plugins=this.normalize(t)}normalize(t){var e=[];for(var r of t)if(!0===r.postcss?r=r():r.postcss&&(r=r.postcss),"object"==typeof r&&Array.isArray(r.plugins))e=e.concat(r.plugins);else if("object"==typeof r&&r.postcssPlugin)e.push(r);else{if("function"!=typeof r)throw"object"==typeof r&&(r.parse||r.stringify)?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."):new Error(r+" is not a PostCSS plugin");e.push(r)}return e}process(t,e){return void 0===e&&(e={}),this.plugins.length||e.parser||e.stringifier||e.syntax?new i(this,t,e):new n(this,t,e)}use(t){return this.plugins=this.plugins.concat(this.normalize([t])),this}};e.exports=o,o.default=o,s.registerProcessor(o),r.registerProcessor(o)}),zr=dr((t,e)=>{var r=xr(),i=kr(),n=Mr(),s=yr(),o=Cr(),a=Ar(),h=Nr(),u=Ir(),l=Wr(),f=Or(),c=Sr(),v=Pr(),d=Gr(),p=jr(),m=Tr(),y=Dr(),g=wr(),w=Br();function b(){for(var t=arguments.length,e=new Array(t),r=0;t>r;r++)e[r]=arguments[r];return 1===e.length&&Array.isArray(e[0])&&(e=e[0]),new d(e)}b.plugin=function(t,e){var r,i=!1;function n(){console&&console.warn&&!i&&(i=!0,console.warn(t+": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration"),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(t+": 里面 postcss.plugin 被弃用. 迁移指南:\nhttps://www.w3ctech.com/topic/2226"));var r=e(...arguments);return r.postcssPlugin=t,r.postcssVersion=(new d).version,r}return Object.defineProperty(n,"postcss",{get(){return r||(r=n()),r}}),n.process=function(t,e,r){return b([n(r)]).process(t,e)},n},b.stringify=g,b.parse=v,b.fromJSON=h,b.list=f,b.comment=t=>new i(t),b.atRule=t=>new r(t),b.decl=t=>new o(t),b.rule=t=>new y(t),b.root=t=>new m(t),b.document=t=>new a(t),b.CssSyntaxError=s,b.Declaration=o,b.Container=n,b.Processor=d,b.Document=a,b.Comment=i,b.Warning=w,b.AtRule=r,b.Result=p,b.Input=u,b.Rule=y,b.Root=m,b.Node=c,l.registerPostcss(b),e.exports=b,b.default=b}),Vr=dr((t,e)=>{var r=kr(),i=Fr(),n=Lr();e.exports=class extends i{checkMissedSemicolon(){}comment(t){var e=new r;this.init(e,t[2]);var i=this.input.fromOffset(t[3])||this.input.fromOffset(this.input.css.length-1);e.source.end={column:i.col,line:i.line,offset:t[3]+1};var n=t[1].slice(2);if("*/"===n.slice(-2)&&(n=n.slice(0,-2)),/^\s*$/.test(n))e.text="",e.raws.left=n,e.raws.right="";else{var s=n.match(/^(\s*)([^]*\S)(\s*)$/);e.text=s[2],e.raws.left=s[1],e.raws.right=s[3]}}createTokenizer(){this.tokenizer=n(this.input,{ignoreErrors:!0})}decl(t){t.length>1&&t.some(t=>"word"===t[0])&&super.decl(t)}doubleColon(){}endFile(){for(this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces;this.current.parent;)this.current=this.current.parent,this.current.raws.after="";this.root.source.end=this.getPosition(this.tokenizer.position())}precheckMissedSemicolon(t){var e=this.colon(t);if(!1!==e){var r,i;for(r=e-1;r>=0&&"word"!==t[r][0];r--);if(0!==r&&r>=0){for(i=r-1;i>=0;i--)if("space"!==t[i][0]){i+=1;break}var n=t.slice(r),s=t.slice(i,r);t.splice(i,t.length-i),this.spaces=s.map(t=>t[1]).join(""),this.decl(n)}}}unclosedBracket(){}unexpectedClose(){this.current.raws.after+="}"}unknownWord(t){this.spaces+=t.map(t=>t[1]).join("")}unnamedAtrule(t){t.name=""}}});dr((t,e)=>{var r=zr().Input,i=Vr();e.exports=function(t,e){var n=new i(new r(t,e));return n.parse(),n.root}})(),zr();var $r=function(t){return 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",t}({});function Yr(t){var e=[];for(var r in t){var i=t[r];if("string"==typeof i){var n=Kr(r);e.push(n+": "+i+";")}}return e.join(" ")}var qr=/-([a-z])/g,Zr=/^--[a-zA-Z0-9-]+$/,Jr=t=>Zr.test(t)?t:t.replace(qr,(t,e)=>e?e.toUpperCase():""),Xr=/\B([A-Z])/g,Kr=t=>t.replace(Xr,"-$1").toLowerCase();function Qr(t){return Qr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Qr(t)}function ti(t,e,r){return(e=function(t){var e=function(t){if("object"!=Qr(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Qr(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Qr(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var ei=class t{constructor(){ti(this,"parentElement",null),ti(this,"parentNode",null),ti(this,"ownerDocument",void 0),ti(this,"firstChild",null),ti(this,"lastChild",null),ti(this,"previousSibling",null),ti(this,"nextSibling",null),ti(this,"ELEMENT_NODE",1),ti(this,"TEXT_NODE",3),ti(this,"nodeType",void 0),ti(this,"nodeName",void 0),ti(this,"RRNodeType",void 0)}get childNodes(){for(var t=[],e=this.firstChild;e;)t.push(e),e=e.nextSibling;return t}contains(e){if(!(e instanceof t))return!1;if(e.ownerDocument!==this.ownerDocument)return!1;if(e===this)return!0;for(;e.parentNode;){if(e.parentNode===this)return!0;e=e.parentNode}return!1}appendChild(t){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(t,e){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(t){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}},ri=class t extends ei{constructor(){for(var t=arguments.length,e=new Array(t),r=0;t>r;r++)e[r]=arguments[r];super(e),ti(this,"nodeType",9),ti(this,"nodeName","#document"),ti(this,"compatMode","CSS1Compat"),ti(this,"RRNodeType",$r.Document),ti(this,"textContent",null),this.ownerDocument=this}get documentElement(){return this.childNodes.find(t=>t.RRNodeType===$r.Element&&"HTML"===t.tagName)||null}get body(){var t;return(null===(t=this.documentElement)||void 0===t?void 0:t.childNodes.find(t=>t.RRNodeType===$r.Element&&"BODY"===t.tagName))||null}get head(){var t;return(null===(t=this.documentElement)||void 0===t?void 0:t.childNodes.find(t=>t.RRNodeType===$r.Element&&"HEAD"===t.tagName))||null}get implementation(){return this}get firstElementChild(){return this.documentElement}appendChild(t){var e=t.RRNodeType;if((e===$r.Element||e===$r.DocumentType)&&this.childNodes.some(t=>t.RRNodeType===e))throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': Only one "+(e===$r.Element?"RRElement":"RRDoctype")+" on RRDocument allowed.");var r=fi(this,t);return r.parentElement=null,r}insertBefore(t,e){var r=t.RRNodeType;if((r===$r.Element||r===$r.DocumentType)&&this.childNodes.some(t=>t.RRNodeType===r))throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': Only one "+(r===$r.Element?"RRElement":"RRDoctype")+" on RRDocument allowed.");var i=ci(this,t,e);return i.parentElement=null,i}removeChild(t){return vi(this,t)}open(){this.firstChild=null,this.lastChild=null}close(){}write(t){var e;if('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">'===t?e="-//W3C//DTD XHTML 1.0 Transitional//EN":'<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">'===t&&(e="-//W3C//DTD HTML 4.0 Transitional//EN"),e){var r=this.createDocumentType("html",e,"");this.open(),this.appendChild(r)}}createDocument(e,r,i){return new t}createDocumentType(t,e,r){var i=new ii(t,e,r);return i.ownerDocument=this,i}createElement(t){var e=new ni(t);return e.ownerDocument=this,e}createElementNS(t,e){return this.createElement(e)}createTextNode(t){var e=new ai(t);return e.ownerDocument=this,e}createComment(t){var e=new hi(t);return e.ownerDocument=this,e}createCDATASection(t){var e=new ui(t);return e.ownerDocument=this,e}toString(){return"RRDocument"}},ii=class extends ei{constructor(t,e,r){super(),ti(this,"nodeType",10),ti(this,"RRNodeType",$r.DocumentType),ti(this,"name",void 0),ti(this,"publicId",void 0),ti(this,"systemId",void 0),ti(this,"textContent",null),this.name=t,this.publicId=e,this.systemId=r,this.nodeName=t}toString(){return"RRDocumentType"}},ni=class extends ei{constructor(t){super(),ti(this,"nodeType",1),ti(this,"RRNodeType",$r.Element),ti(this,"tagName",void 0),ti(this,"attributes",{}),ti(this,"shadowRoot",null),ti(this,"scrollLeft",void 0),ti(this,"scrollTop",void 0),this.tagName=t.toUpperCase(),this.nodeName=t.toUpperCase()}get textContent(){var t="";return this.childNodes.forEach(e=>t+=e.textContent),t}set textContent(t){this.firstChild=null,this.lastChild=null,this.appendChild(this.ownerDocument.createTextNode(t))}get classList(){return new li(this.attributes.class,t=>{this.attributes.class=t})}get id(){return this.attributes.id||""}get className(){return this.attributes.class||""}get style(){var t,e,r=this.attributes.style?(t={},e=/:(.+)/,this.attributes.style.replace(/\/\*.*?\*\//g,"").split(/;(?![^(]*\))/g).forEach(function(r){if(r){var i=r.split(e);i.length>1&&(t[Jr(i[0].trim())]=i[1].trim())}}),t):{},i=/\B([A-Z])/g;return r.setProperty=(t,e,n)=>{if(!i.test(t)){var s=Jr(t);e?r[s]=e:delete r[s],"important"===n&&(r[s]+=" !important"),this.attributes.style=Yr(r)}},r.removeProperty=t=>{if(i.test(t))return"";var e=Jr(t),n=r[e]||"";return delete r[e],this.attributes.style=Yr(r),n},r}getAttribute(t){return void 0===this.attributes[t]?null:this.attributes[t]}setAttribute(t,e){this.attributes[t]=e}setAttributeNS(t,e,r){this.setAttribute(e,r)}removeAttribute(t){delete this.attributes[t]}appendChild(t){return fi(this,t)}insertBefore(t,e){return ci(this,t,e)}removeChild(t){return vi(this,t)}attachShadow(t){var e=this.ownerDocument.createElement("SHADOWROOT");return this.shadowRoot=e,e}dispatchEvent(t){return!0}toString(){var t="";for(var e in this.attributes)t+=e+'="'+this.attributes[e]+'" ';return this.tagName+" "+t}},si=class extends ni{constructor(){super(...arguments),ti(this,"currentTime",void 0),ti(this,"volume",void 0),ti(this,"paused",void 0),ti(this,"muted",void 0),ti(this,"playbackRate",void 0),ti(this,"loop",void 0)}attachShadow(t){throw new Error("RRDomException: Failed to execute 'attachShadow' on 'RRElement': This RRElement does not support attachShadow")}play(){this.paused=!1}pause(){this.paused=!0}},oi=class extends ni{constructor(){super(...arguments),ti(this,"tagName","DIALOG"),ti(this,"nodeName","DIALOG")}get isModal(){return"modal"===this.getAttribute("rr_open_mode")}get open(){return null!==this.getAttribute("open")}close(){this.removeAttribute("open"),this.removeAttribute("rr_open_mode")}show(){this.setAttribute("open",""),this.setAttribute("rr_open_mode","non-modal")}showModal(){this.setAttribute("open",""),this.setAttribute("rr_open_mode","modal")}},ai=class extends ei{constructor(t){super(),ti(this,"nodeType",3),ti(this,"nodeName","#text"),ti(this,"RRNodeType",$r.Text),ti(this,"data",void 0),this.data=t}get textContent(){return this.data}set textContent(t){this.data=t}toString(){return"RRText text="+JSON.stringify(this.data)}},hi=class extends ei{constructor(t){super(),ti(this,"nodeType",8),ti(this,"nodeName","#comment"),ti(this,"RRNodeType",$r.Comment),ti(this,"data",void 0),this.data=t}get textContent(){return this.data}set textContent(t){this.data=t}toString(){return"RRComment text="+JSON.stringify(this.data)}},ui=class extends ei{constructor(t){super(),ti(this,"nodeName","#cdata-section"),ti(this,"nodeType",4),ti(this,"RRNodeType",$r.CDATA),ti(this,"data",void 0),this.data=t}get textContent(){return this.data}set textContent(t){this.data=t}toString(){return"RRCDATASection data="+JSON.stringify(this.data)}},li=class{constructor(t,e){var r=this;if(ti(this,"onChange",void 0),ti(this,"classes",[]),ti(this,"add",function(){for(var t=arguments.length,e=new Array(t),i=0;t>i;i++)e[i]=arguments[i];for(var n of e){var s=String(n);0>r.classes.indexOf(s)&&r.classes.push(s)}r.onChange&&r.onChange(r.classes.join(" "))}),ti(this,"remove",function(){for(var t=arguments.length,e=new Array(t),i=0;t>i;i++)e[i]=arguments[i];r.classes=r.classes.filter(t=>-1===e.indexOf(t)),r.onChange&&r.onChange(r.classes.join(" "))}),t){var i=t.trim().split(/\s+/);this.classes.push(...i)}this.onChange=e}};function fi(t,e){return e.parentNode&&e.parentNode.removeChild(e),t.lastChild?(t.lastChild.nextSibling=e,e.previousSibling=t.lastChild):(t.firstChild=e,e.previousSibling=null),t.lastChild=e,e.nextSibling=null,e.parentNode=t,e.parentElement=t,e.ownerDocument=t.ownerDocument,e}function ci(t,e,r){if(!r)return fi(t,e);if(r.parentNode!==t)throw new Error("Failed to execute 'insertBefore' on 'RRNode': The RRNode before which the new node is to be inserted is not a child of this RRNode.");return e===r||(e.parentNode&&e.parentNode.removeChild(e),e.previousSibling=r.previousSibling,r.previousSibling=e,e.nextSibling=r,e.previousSibling?e.previousSibling.nextSibling=e:t.firstChild=e,e.parentElement=t,e.parentNode=t,e.ownerDocument=t.ownerDocument),e}function vi(t,e){if(e.parentNode!==t)throw new Error("Failed to execute 'removeChild' on 'RRNode': The RRNode to be removed is not a child of this RRNode.");return e.previousSibling?e.previousSibling.nextSibling=e.nextSibling:t.firstChild=e.nextSibling,e.nextSibling?e.nextSibling.previousSibling=e.previousSibling:t.lastChild=e.previousSibling,e.previousSibling=null,e.nextSibling=null,e.parentElement=null,e.parentNode=null,e}var di=function(t){return t[t.PLACEHOLDER=0]="PLACEHOLDER",t[t.ELEMENT_NODE=1]="ELEMENT_NODE",t[t.ATTRIBUTE_NODE=2]="ATTRIBUTE_NODE",t[t.TEXT_NODE=3]="TEXT_NODE",t[t.CDATA_SECTION_NODE=4]="CDATA_SECTION_NODE",t[t.ENTITY_REFERENCE_NODE=5]="ENTITY_REFERENCE_NODE",t[t.ENTITY_NODE=6]="ENTITY_NODE",t[t.PROCESSING_INSTRUCTION_NODE=7]="PROCESSING_INSTRUCTION_NODE",t[t.COMMENT_NODE=8]="COMMENT_NODE",t[t.DOCUMENT_NODE=9]="DOCUMENT_NODE",t[t.DOCUMENT_TYPE_NODE=10]="DOCUMENT_TYPE_NODE",t[t.DOCUMENT_FRAGMENT_NODE=11]="DOCUMENT_FRAGMENT_NODE",t}({}),pi={svg:"http://www.w3.org/2000/svg","xlink:href":"http://www.w3.org/1999/xlink",xmlns:"http://www.w3.org/2000/xmlns/"},mi={altglyph:"altGlyph",altglyphdef:"altGlyphDef",altglyphitem:"altGlyphItem",animatecolor:"animateColor",animatemotion:"animateMotion",animatetransform:"animateTransform",clippath:"clipPath",feblend:"feBlend",fecolormatrix:"feColorMatrix",fecomponenttransfer:"feComponentTransfer",fecomposite:"feComposite",feconvolvematrix:"feConvolveMatrix",fediffuselighting:"feDiffuseLighting",fedisplacementmap:"feDisplacementMap",fedistantlight:"feDistantLight",fedropshadow:"feDropShadow",feflood:"feFlood",fefunca:"feFuncA",fefuncb:"feFuncB",fefuncg:"feFuncG",fefuncr:"feFuncR",fegaussianblur:"feGaussianBlur",feimage:"feImage",femerge:"feMerge",femergenode:"feMergeNode",femorphology:"feMorphology",feoffset:"feOffset",fepointlight:"fePointLight",fespecularlighting:"feSpecularLighting",fespotlight:"feSpotLight",fetile:"feTile",feturbulence:"feTurbulence",foreignobject:"foreignObject",glyphref:"glyphRef",lineargradient:"linearGradient",radialgradient:"radialGradient"},yi=null;function gi(t,e,r,i){void 0===i&&(i=e.mirror||e.ownerDocument.mirror),t=function(t,e,r,i){if(r.afterAppend&&!yi&&(yi=new WeakSet,setTimeout(()=>{yi=null},0)),!ki(t,e)){var n,s=Si(e,r.mirror,i);null===(n=t.parentNode)||void 0===n||n.replaceChild(s,t),t=s}switch(e.RRNodeType){case $r.Document:if(!Ci(t,e,r.mirror,i)){var o=i.getMeta(e);o&&(r.mirror.removeNodeFromMap(t),t.close(),t.open(),r.mirror.add(t,o),null==yi||yi.add(t))}break;case $r.Element:var a=t,h=e;switch(h.tagName){case"IFRAME":var u=t.contentDocument;if(!u)break;gi(u,e.contentDocument,r,i)}h.shadowRoot&&(a.shadowRoot||cr(a))&&bi(a.shadowRoot,h.shadowRoot,r,i),function(t,e,r){var i=t.attributes,n=e.attributes;for(var s in n){var o=n[s],a=r.getMeta(e);if((null==a?void 0:a.isSVG)&&pi[s])t.setAttributeNS(pi[s],s,o);else if("CANVAS"===e.tagName&&"rr_dataURL"===s)wi(t,o);else{if("IFRAME"===e.tagName&&"srcdoc"===s)continue;try{t.getAttribute(s)!==o&&t.setAttribute(s,o)}catch(t){console.warn(t)}}}for(var h of Array.from(i)){var u=h.name;u in n||t.removeAttribute(u)}e.scrollLeft&&(t.scrollLeft=e.scrollLeft),e.scrollTop&&(t.scrollTop=e.scrollTop)}(a,h,i)}return t}(t,e,r,i),bi(t,e,r,i),function(t,e,r){switch(e.RRNodeType){case $r.Document:var i=e.scrollData;i&&r.applyScroll(i,!0);break;case $r.Element:var n=t,s=e;switch(s.scrollData&&r.applyScroll(s.scrollData,!0),s.inputData&&r.applyInput(s.inputData),s.tagName){case"AUDIO":case"VIDEO":var o=t,a=s;void 0!==a.paused&&(a.paused?o.pause():o.play()),void 0!==a.muted&&(o.muted=a.muted),void 0!==a.volume&&(o.volume=a.volume),void 0!==a.currentTime&&(o.currentTime=a.currentTime),void 0!==a.playbackRate&&(o.playbackRate=a.playbackRate),void 0!==a.loop&&(o.loop=a.loop);break;case"CANVAS":var h=e;null!==h.rr_dataURL&&wi(n,h.rr_dataURL),h.canvasMutations.forEach(e=>r.applyCanvas(e.event,e.mutation,t));break;case"STYLE":var u=n.sheet;u&&e.rules.forEach(t=>r.applyStyleSheetMutation(t,u));break;case"DIALOG":var l=n,f=s,c=l.open,v=l.matches("dialog:modal"),d=f.open,p=f.isModal,m=v!==p,y=c!==d;if((m||c&&y)&&l.close(),d&&(y||m))try{p?l.showModal():l.show()}catch(t){console.warn(t)}}break;case $r.Text:case $r.Comment:case $r.CDATA:t.textContent!==e.data&&(t.textContent=e.data)}var g;(null==yi?void 0:yi.has(t))&&(yi.delete(t),null===(g=r.afterAppend)||void 0===g||g.call(r,t,r.mirror.getId(t)))}(t,e,r)}function wi(t,e){var r=t.ownerDocument.createElement("img");r.onload=()=>{var e=t.getContext("2d");e&&e.drawImage(r,0,0,r.width,r.height)},r.src=e}function bi(t,e,r,i){var n=Array.from(t.childNodes),s=e.childNodes;if(0!==n.length||0!==s.length){for(var o=0,a=n.length-1,h=0,u=s.length-1,l=n[o],f=n[a],c=s[h],v=s[u],d=void 0,p=void 0;a>=o&&u>=h;)if(void 0===l)l=n[++o];else if(void 0===f)f=n[--a];else if(Ci(l,c,r.mirror,i))l=n[++o],c=s[++h];else if(Ci(f,v,r.mirror,i))f=n[--a],v=s[--u];else if(Ci(l,v,r.mirror,i)){try{t.insertBefore(l,f.nextSibling)}catch(t){console.warn(t)}l=n[++o],v=s[--u]}else if(Ci(f,c,r.mirror,i)){try{t.insertBefore(f,l)}catch(t){console.warn(t)}f=n[--a],c=s[++h]}else{if(!d){d={};for(var m=o;a>=m;m++){var y=n[m];y&&r.mirror.hasNode(y)&&(d[r.mirror.getId(y)]=m)}}var g=n[p=d[i.getId(c)]];if(void 0!==p&&g&&Ci(g,c,r.mirror,i)){try{t.insertBefore(g,l)}catch(t){console.warn(t)}n[p]=void 0}else{var w=Si(c,r.mirror,i);"#document"===t.nodeName&&l&&(w.nodeType===w.DOCUMENT_TYPE_NODE&&l.nodeType===l.DOCUMENT_TYPE_NODE||w.nodeType===w.ELEMENT_NODE&&l.nodeType===l.ELEMENT_NODE)&&(t.removeChild(l),r.mirror.removeNodeFromMap(l),l=n[++o]);try{t.insertBefore(w,l||null)}catch(t){console.warn(t)}}c=s[++h]}if(o>a){var b=s[u+1],S=null;for(b&&(S=r.mirror.getNode(i.getId(b)));u>=h;++h){var k=Si(s[h],r.mirror,i);try{t.insertBefore(k,S)}catch(t){console.warn(t)}}}else if(h>u)for(;a>=o;o++){var C=n[o];if(C&&C.parentNode===t)try{t.removeChild(C),r.mirror.removeNodeFromMap(C)}catch(t){console.warn(t)}}for(var M=t.firstChild,x=e.firstChild;null!==M&&null!==x;)gi(M,x,r,i),M=M.nextSibling,x=x.nextSibling}}function Si(t,e,r){var i=r.getId(t),n=r.getMeta(t),s=null;if(i>-1&&(s=e.getNode(i)),null!==s&&ki(s,t))return s;switch(t.RRNodeType){case $r.Document:s=new Document;break;case $r.DocumentType:s=document.implementation.createDocumentType(t.name,t.publicId,t.systemId);break;case $r.Element:var a=t.tagName.toLowerCase();a=mi[a]||a,s=n&&"isSVG"in n&&(null==n?void 0:n.isSVG)?document.createElementNS(pi.svg,a):document.createElement(t.tagName);break;case $r.Text:s=document.createTextNode(t.data);break;case $r.Comment:s=document.createComment(t.data);break;case $r.CDATA:s=document.createCDATASection(t.data)}n&&e.add(s,o({},n));try{null==yi||yi.add(s)}catch(t){}return s}function ki(t,e){return t.nodeType===e.nodeType&&(t.nodeType!==t.ELEMENT_NODE||t.tagName.toUpperCase()===e.tagName)}function Ci(t,e,r,i){var n=r.getId(t),s=i.getId(e);return-1!==n&&n===s&&ki(t,e)}var Mi=class t extends ri{get unserializedId(){return this.u--}constructor(t){super(),ti(this,"UNSERIALIZED_STARTING_ID",-2),ti(this,"_unserializedId",this.UNSERIALIZED_STARTING_ID),ti(this,"mirror",new Fi),ti(this,"scrollData",null),t&&(this.mirror=t)}createDocument(e,r,i){return new t}createDocumentType(t,e,r){var i=new xi(t,e,r);return i.ownerDocument=this,i}createElement(t){var e,r=t.toUpperCase();switch(r){case"AUDIO":case"VIDEO":e=new Ei(r);break;case"IFRAME":e=new Oi(r,this.mirror);break;case"CANVAS":e=new Ii(r);break;case"STYLE":e=new Ti(r);break;case"DIALOG":e=new Ri(r);break;default:e=new Ai(r)}return e.ownerDocument=this,e}createComment(t){var e=new Ni(t);return e.ownerDocument=this,e}createCDATASection(t){var e=new _i(t);return e.ownerDocument=this,e}createTextNode(t){var e=new Di(t);return e.ownerDocument=this,e}destroyTree(){this.firstChild=null,this.lastChild=null,this.mirror.reset()}open(){super.open(),this.u=this.UNSERIALIZED_STARTING_ID}},xi=ii,Ai=class extends ni{constructor(){super(...arguments),ti(this,"inputData",null),ti(this,"scrollData",null)}},Ei=class extends si{},Ri=class extends oi{},Ii=class extends Ai{constructor(){super(...arguments),ti(this,"rr_dataURL",null),ti(this,"canvasMutations",[])}getContext(){return null}},Ti=class extends Ai{constructor(){super(...arguments),ti(this,"rules",[])}},Oi=class extends Ai{constructor(t,e){super(t),ti(this,"contentDocument",new Mi),this.contentDocument.mirror=e}},Di=ai,Ni=hi,_i=ui;function Li(t,e,r,i){var n,s;switch(t.nodeType){case di.DOCUMENT_NODE:i&&"IFRAME"===i.nodeName?n=i.contentDocument:(n=e).compatMode=t.compatMode;break;case di.DOCUMENT_TYPE_NODE:n=e.createDocumentType(t.name,t.publicId,t.systemId);break;case di.ELEMENT_NODE:var a=t,h=(s=a)instanceof HTMLFormElement?"FORM":s.tagName.toUpperCase(),u=n=e.createElement(h);for(var l of Array.from(a.attributes))u.attributes[l.name]=l.value;a.scrollLeft&&(u.scrollLeft=a.scrollLeft),a.scrollTop&&(u.scrollTop=a.scrollTop);break;case di.TEXT_NODE:n=e.createTextNode(t.textContent||"");break;case di.CDATA_SECTION_NODE:n=e.createCDATASection(t.data);break;case di.COMMENT_NODE:n=e.createComment(t.textContent||"");break;case di.DOCUMENT_FRAGMENT_NODE:var f=i;if(!cr(f))return null;n=f.shadowRoot;break;default:return null}var c=r.getMeta(t);return e instanceof Mi&&(c||(c=Pi(n,e.unserializedId),r.add(t,c)),e.mirror.add(n,o({},c))),n}var Fi=class{constructor(){ti(this,"idNodeMap",new Map),ti(this,"nodeMetaMap",new WeakMap)}getId(t){var e,r;return t&&null!==(e=null===(r=this.getMeta(t))||void 0===r?void 0:r.id)&&void 0!==e?e:-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){var e=this.getId(t);this.idNodeMap.delete(e),t.childNodes&&t.childNodes.forEach(t=>this.removeNodeFromMap(t))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,e){this.idNodeMap.set(e.id,t),this.nodeMetaMap.set(t,e)}replace(t,e){var r=this.getNode(t);if(r){var i=this.nodeMetaMap.get(r);i&&this.nodeMetaMap.set(e,i)}this.idNodeMap.set(t,e)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function Pi(t,e){switch(t.RRNodeType){case $r.Document:return{id:e,type:t.RRNodeType,childNodes:[]};case $r.DocumentType:return{id:e,type:t.RRNodeType,name:t.name,publicId:t.publicId,systemId:t.systemId};case $r.Element:return{id:e,type:t.RRNodeType,tagName:t.tagName.toLowerCase(),attributes:{},childNodes:[]};case $r.Text:case $r.Comment:return{id:e,type:t.RRNodeType,textContent:t.textContent||""};case $r.CDATA:return{id:e,type:t.RRNodeType,textContent:""}}}function Bi(t,e){return-1!==t.indexOf(e)}"Mobile".toLowerCase(),"Tablet".toLowerCase(),new RegExp("Xbox","i"),new RegExp("Nintendo","i"),new RegExp("PlayStation","i"),new RegExp("Windows","i"),Date,Date;var ji={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot"],MutationObserver:[]},Ui={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:["querySelector","querySelectorAll"],MutationObserver:["constructor"]},Wi={};function Hi(t){if(Wi[t])return Wi[t];var e=function(t){var e,r,i=null===(e=globalThis)||void 0===e||null===(e=e.Zone)||void 0===e||null===(r=e.__symbol__)||void 0===r?void 0:r.call(e,t);return i&&globalThis[i]?globalThis[i]:void 0}(t)||globalThis[t],r=e.prototype,i=t in ji?ji[t]:void 0,n=Boolean(i&&i.every(t=>{var e;return Boolean(null===(e=Object.getOwnPropertyDescriptor(r,t))||void 0===e||null===(e=e.get)||void 0===e?void 0:e.toString().includes("[native code]"))})),s=t in Ui?Ui[t]:void 0,o=Boolean(s&&s.every(t=>{var e;return"function"==typeof r[t]&&(null===(e=r[t])||void 0===e?void 0:e.toString().includes("[native code]"))}));if(n&&o)return Wi[t]=e.prototype,e.prototype;var a=document.createElement("iframe");a.style.display="none";var h,u=!1;try{document.body.appendChild(a);var l=a.contentWindow;if(!l)return e.prototype;var f=l[t].prototype;return f?(Bi(h=navigator.userAgent,"AppleWebKit")&&!Bi(h,"Chrome")&&(a.classList.add("rr-block","ph-no-capture"),a.setAttribute("__rrwebUntaintedPrototype",t),u=!0),Wi[t]=f):r}catch(t){return r}finally{!u&&a.parentNode&&document.body.removeChild(a)}}var Gi=Object.create(null);function zi(t,e,r){var i,n=Gi[t],s=n[r];if(s)return s.call(e);var o=Hi(t),a=null===(i=Object.getOwnPropertyDescriptor(o,r))||void 0===i?void 0:i.get;return a?(n[r]=a,a.call(e)):e[r]}Gi.Node=Object.create(null),Gi.ShadowRoot=Object.create(null),Gi.MutationObserver=Object.create(null),Gi.Element=Object.create(null);var Vi,$i={};function Yi(t,e,r){var i=t+"."+String(r);if($i[i])return $i[i].bind(e);var n=Hi(t)[r];return"function"!=typeof n?e[r]:($i[i]=n,n.bind(e))}function qi(){return Hi("MutationObserver").constructor}function Zi(t,e,r){try{if(!(e in t))return()=>{};var i=t[e],n={next:i},s=r(function(){for(var t=arguments.length,e=new Array(t),r=0;t>r;r++)e[r]=arguments[r];return n.next.apply(this,e)});return"function"==typeof s&&(s.prototype=s.prototype||{},Object.defineProperties(s,{__rrweb_original__:{enumerable:!1,value:i},__rrweb_layer__:{enumerable:!1,value:n}})),t[e]=s,()=>{if(t[e]!==s)for(var r=t=>{var e;return"function"==typeof t?null!==(e=t.__rrweb_layer__)&&void 0!==e?e:t.__posthog_layer__:void 0},i=t[e],o=r(i);o;){if(o.next===s)return void(o.next=n.next);o=r(i=o.next)}else t[e]=n.next}}catch(t){return()=>{}}}var Ji={childNodes:t=>zi("Node",t,"childNodes"),parentNode:t=>zi("Node",t,"parentNode"),parentElement:t=>zi("Node",t,"parentElement"),textContent:t=>zi("Node",t,"textContent"),isConnected(t){if(void 0===Vi){var e,r=null===(e=Object.getOwnPropertyDescriptor(Hi("Node"),"isConnected"))||void 0===e?void 0:e.get;Vi=(null==r?void 0:r.toString().includes("[native code]"))?r:null}return null==Vi?void 0:Vi.call(t)},contains:(t,e)=>Yi("Node",t,"contains")(e),getRootNode:t=>Yi("Node",t,"getRootNode")(),host:t=>t&&"host"in t?zi("ShadowRoot",t,"host"):null,styleSheets:t=>t.styleSheets,shadowRoot:t=>t&&"shadowRoot"in t?zi("Element",t,"shadowRoot"):null,querySelector:(t,e)=>Yi("Element",t,"querySelector")(e),querySelectorAll:(t,e)=>Yi("Element",t,"querySelectorAll")(e),mutationObserver:qi,patch:Zi};function Xi(t){return Xi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Xi(t)}function Ki(t,e,r){return(e=function(t){var e=function(t){if("object"!=Xi(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Xi(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Xi(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Qi=h({StyleSheetMirror:()=>In,_mirror:()=>on,callAllSafely:()=>nn,callSafely:()=>rn,closestElementOfNode:()=>vn,getBaseDimension:()=>Mn,getNestedRule:()=>An,getPositionsAndIndex:()=>En,getRootShadowHost:()=>On,getShadowHost:()=>Tn,getWindowHeight:()=>fn,getWindowScroll:()=>ln,getWindowWidth:()=>cn,hasShadowRoot:()=>xn,hookSetter:()=>hn,inDom:()=>Nn,isAncestorRemoved:()=>yn,isBlocked:()=>dn,isIgnored:()=>mn,isSerialized:()=>pn,isSerializedIframe:()=>kn,isSerializedStylesheet:()=>Cn,iterateResolveTree:()=>Sn,legacy_isTouchEvent:()=>gn,nowTimestamp:()=>un,on:()=>tn,polyfill:()=>wn,queueToResolveTrees:()=>bn,removeEventListenerSafely:()=>en,shadowHostInDom:()=>Dn,throttle:()=>an,uniqueTextMutations:()=>Rn});function tn(t,e,r){void 0===r&&(r=document);var i={capture:!0,passive:!0};return r.addEventListener(t,e,i),()=>en(r,t,e,i)}function en(t,e,r,i){rn(()=>{var n=t.removeEventListener;"function"==typeof n&&(void 0!==i?n.call(t,e,r,i):n.call(t,e,r))})}function rn(t){try{t()}catch(t){if(!(t instanceof DOMException&&"SecurityError"===t.name))throw t}}function nn(t){t.forEach(t=>{if("function"==typeof t)try{t()}catch(t){}})}var sn="Please stop import mirror directly. Instead of that,\r\nnow you can use replayer.getMirror() to access the mirror instance of a replayer,\r\nor you can use record.mirror to access the mirror instance during recording.",on={map:{},getId(){return console.error(sn),-1},getNode(){return console.error(sn),null},removeNodeFromMap(){console.error(sn)},has(){return console.error(sn),!1},reset(){console.error(sn)}};function an(t,e,r){void 0===r&&(r={});var i=null,n=0;return function(){for(var s=arguments.length,o=new Array(s),a=0;s>a;a++)o[a]=arguments[a];var h=Date.now();n||!1!==r.leading||(n=h);var u=e-(h-n),l=this;0>=u||u>e?(i&&(clearTimeout(i),i=null),n=h,t.apply(l,o)):i||!1===r.trailing||(i=setTimeout(()=>{n=!1===r.leading?0:Date.now(),i=null,t.apply(l,o)},u))}}function hn(t,e,r,i,n){void 0===n&&(n=window);var s=n.Object.getOwnPropertyDescriptor(t,e);return n.Object.defineProperty(t,e,i?r:{set(t){if(setTimeout(()=>{try{r.set.call(this,t)}catch(t){}},0),s&&s.set){if(s.get)try{s.get.call(this)}catch(t){return}s.set.call(this,t)}}}),()=>hn(t,e,s||{},!0)}"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(on=new Proxy(on,{get(t,e,r){return"map"===e&&console.error(sn),Reflect.get(t,e,r)}}));var un=Date.now;function ln(t){var e,r,i,n,s=t.document;return{left:s.scrollingElement?s.scrollingElement.scrollLeft:void 0!==t.pageXOffset?t.pageXOffset:s.documentElement.scrollLeft||(null==s?void 0:s.body)&&(null===(e=Ji.parentElement(s.body))||void 0===e?void 0:e.scrollLeft)||(null==s||null===(r=s.body)||void 0===r?void 0:r.scrollLeft)||0,top:s.scrollingElement?s.scrollingElement.scrollTop:void 0!==t.pageYOffset?t.pageYOffset:(null==s?void 0:s.documentElement.scrollTop)||(null==s?void 0:s.body)&&(null===(i=Ji.parentElement(s.body))||void 0===i?void 0:i.scrollTop)||(null==s||null===(n=s.body)||void 0===n?void 0:n.scrollTop)||0}}function fn(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function cn(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function vn(t){return t?t.nodeType===t.ELEMENT_NODE?t:Ji.parentElement(t):null}function dn(t,e,r,i){if(!t)return!1;var n=vn(t);if(!n)return!1;try{if("string"==typeof e){if(n.classList.contains(e))return!0;if(i&&null!==n.closest("."+e))return!0}else if(We(n,e,i))return!0}catch(t){}if(r){if(n.matches(r))return!0;if(i&&null!==n.closest(r))return!0}return!1}function pn(t,e){return-1!==e.getId(t)}function mn(t,e,r){return!("TITLE"!==t.tagName||!r.headTitleMutations)||-2===e.getId(t)}function yn(t,e){if(rt(t))return!1;var r=e.getId(t);if(!e.has(r))return!0;var i=Ji.parentNode(t);return(!i||i.nodeType!==t.DOCUMENT_NODE)&&(!i||yn(i,e))}function gn(t){return Boolean(t.changedTouches)}function wn(t){void 0===t&&(t=window),"NodeList"in t&&!t.NodeList.prototype.forEach&&(t.NodeList.prototype.forEach=[].forEach),"DOMTokenList"in t&&!t.DOMTokenList.prototype.forEach&&(t.DOMTokenList.prototype.forEach=[].forEach)}function bn(t){var e={},r=(t,r)=>{var i={value:t,parent:r,children:[]};return e[t.node.id]=i,i},i=[];for(var n of t){var s=n.nextId,o=n.parentId;if(s&&s in e){var a=e[s];if(a.parent){var h=a.parent.children.indexOf(a);a.parent.children.splice(h,0,r(n,a.parent))}else{var u=i.indexOf(a);i.splice(u,0,r(n,null))}}else if(o in e){var l=e[o];l.children.push(r(n,l))}else i.push(r(n,null))}return i}function Sn(t,e){e(t.value);for(var r=t.children.length-1;r>=0;r--)Sn(t.children[r],e)}function kn(t,e){return Boolean("IFRAME"===t.nodeName&&e.getMeta(t))}function Cn(t,e){return Boolean("LINK"===t.nodeName&&t.nodeType===t.ELEMENT_NODE&&t.getAttribute&&"stylesheet"===t.getAttribute("rel")&&e.getMeta(t))}function Mn(t,e){var r,i=null===(r=t.ownerDocument)||void 0===r||null===(r=r.defaultView)||void 0===r?void 0:r.frameElement;if(!i||i===e)return{x:0,y:0,relativeScale:1,absoluteScale:1};var n=i.getBoundingClientRect(),s=Mn(i,e),o=n.height/i.clientHeight;return{x:n.x*s.relativeScale+s.x,y:n.y*s.relativeScale+s.y,relativeScale:o,absoluteScale:s.absoluteScale*o}}function xn(t){return!!t&&(t instanceof ei&&"shadowRoot"in t?Boolean(t.shadowRoot):Boolean(Ji.shadowRoot(t)))}function An(t,e){var r=null==t?void 0:t[e[0]];return r?1===e.length?r:An(r.cssRules,e.slice(1)):null}function En(t){var e=[...t];return{positions:e,index:e.pop()}}function Rn(t){for(var e=new Set,r=[],i=t.length;i--;){var n=t[i];e.has(n.id)||(r.push(n),e.add(n.id))}return r}/[1-9][0-9]{12}/.test(Date.now().toString())||(un=()=>(new Date).getTime());var In=class{constructor(){Ki(this,"id",1),Ki(this,"styleIDMap",new WeakMap),Ki(this,"idStyleMap",new Map)}getId(t){var e;return null!==(e=this.styleIDMap.get(t))&&void 0!==e?e:-1}has(t){return this.styleIDMap.has(t)}add(t,e){return this.has(t)?this.getId(t):(r=void 0===e?this.id++:e,this.styleIDMap.set(t,r),this.idStyleMap.set(r,t),r);var r}getStyle(t){return this.idStyleMap.get(t)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}};function Tn(t){var e,r=null;return"getRootNode"in t&&(null===(e=Ji.getRootNode(t))||void 0===e?void 0:e.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&Ji.host(Ji.getRootNode(t))&&(r=Ji.host(Ji.getRootNode(t))),r}function On(t){for(var e,r=t;e=Tn(r);)r=e;return r}function Dn(t){var e=t.ownerDocument;if(!e)return!1;var r=On(t);return Ji.contains(e,r)}function Nn(t){var e=t.ownerDocument;if(!e)return!1;if(Ji.contains(e,t))return!0;var r=Ji.isConnected(t);return"boolean"==typeof r?r:Dn(t)}var _n=function(t){return 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}({}),Ln="rrweb/fullscreen",Fn=function(t){return 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[t.CustomElement=16]="CustomElement",t}({}),Pn=function(t){return 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}({}),Bn=function(t){return t[t.Mouse=0]="Mouse",t[t.Pen=1]="Pen",t[t.Touch=2]="Touch",t}({}),jn=function(t){return t[t["2D"]=0]="2D",t[t.WebGL=1]="WebGL",t[t.WebGL2=2]="WebGL2",t}({}),Un=function(t){return t[t.Play=0]="Play",t[t.Pause=1]="Pause",t[t.Seeked=2]="Seeked",t[t.VolumeChange=3]="VolumeChange",t[t.RateChange=4]="RateChange",t}({}),Wn=function(t){return t.Start="start",t.Pause="pause",t.Resume="resume",t.Resize="resize",t.Finish="finish",t.FullsnapshotRebuilded="fullsnapshot-rebuilded",t.LoadStylesheetStart="load-stylesheet-start",t.LoadStylesheetEnd="load-stylesheet-end",t.SkipStart="skip-start",t.SkipEnd="skip-end",t.MouseInteraction="mouse-interaction",t.EventCast="event-cast",t.CustomEvent="custom-event",t.Flush="flush",t.StateChange="state-change",t.PlayBack="play-back",t.Destroy="destroy",t}({}),Hn=function(t){return 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",t}({});function Gn(t){return"__ln"in t}var zn,Vn=class{constructor(){Ki(this,"length",0),Ki(this,"head",null),Ki(this,"tail",null)}get(t){if(t>=this.length)throw new Error("Position outside of list range");for(var e=this.head,r=0;t>r;r++)e=(null==e?void 0:e.next)||null;return e}addNode(t){var e={value:t,previous:null,next:null};if(t.__ln=e,t.previousSibling&&Gn(t.previousSibling)){var r=t.previousSibling.__ln.next;e.next=r,e.previous=t.previousSibling.__ln,t.previousSibling.__ln.next=e,r&&(r.previous=e)}else if(t.nextSibling&&Gn(t.nextSibling)&&t.nextSibling.__ln.previous){var i=t.nextSibling.__ln.previous;e.previous=i,e.next=t.nextSibling.__ln,t.nextSibling.__ln.previous=e,i&&(i.next=e)}else this.head&&(this.head.previous=e),e.next=this.head,this.head=e;null===e.next&&(this.tail=e),this.length++}removeNode(t){var e=t.__ln;this.head&&(e.previous?(e.previous.next=e.next,e.next?e.next.previous=e.previous:this.tail=e.previous):(this.head=e.next,this.head?this.head.previous=null:this.tail=null),t.__ln&&delete t.__ln,this.length--)}},$n=(t,e)=>t+"@"+e,Yn=class{constructor(){Ki(this,"frozen",!1),Ki(this,"locked",!1),Ki(this,"texts",[]),Ki(this,"attributes",[]),Ki(this,"attributeMap",new WeakMap),Ki(this,"generatedAttributes",new WeakMap),Ki(this,"removes",[]),Ki(this,"mapRemoves",new Set),Ki(this,"movedMap",{}),Ki(this,"addedSet",new Set),Ki(this,"movedSet",new Set),Ki(this,"droppedSet",new Set),Ki(this,"removesSubTreeCache",new Set),Ki(this,"mutationCb",void 0),Ki(this,"blockClass",void 0),Ki(this,"blockSelector",void 0),Ki(this,"maskTextClass",void 0),Ki(this,"maskTextSelector",void 0),Ki(this,"inlineStylesheet",void 0),Ki(this,"maskInputOptions",void 0),Ki(this,"maskTextFn",void 0),Ki(this,"maskInputFn",void 0),Ki(this,"maskAllElementAttributes",void 0),Ki(this,"maskAttributeFn",void 0),Ki(this,"keepIframeSrcFn",void 0),Ki(this,"recordCanvas",void 0),Ki(this,"canvasMaskingConfigured",void 0),Ki(this,"inlineImages",void 0),Ki(this,"slimDOMOptions",void 0),Ki(this,"dataURLOptions",void 0),Ki(this,"doc",void 0),Ki(this,"mirror",void 0),Ki(this,"iframeManager",void 0),Ki(this,"stylesheetManager",void 0),Ki(this,"shadowDomManager",void 0),Ki(this,"canvasManager",void 0),Ki(this,"processedNodeManager",void 0),Ki(this,"unattachedDoc",void 0),Ki(this,"canvasManagerReleased",!1),Ki(this,"processMutations",t=>{t.forEach(this.processMutation),this.emit()}),Ki(this,"emit",()=>{if(!this.frozen&&!this.locked){var t,e,r=S(),i=x();try{this.processBufferedMutations()}finally{t=S()-r,e=i,R>0||E(t,null!=e?e:k)||t>P.slowestBatchMs&&(P.slowestBatchMs=t)}}}),Ki(this,"processBufferedMutations",()=>{var t,e=[],r=new Set,i=new Vn,n=t=>{for(var e=t,r=-2;-2===r;)r=(e=e&&e.nextSibling)&&this.mirror.getId(e);return r},s=s=>{var o=Ji.parentNode(s);if(o&&Nn(s)&&"TEXTAREA"!==o.tagName&&!this.isBlockedAtEmission(o)){var a=rt(o)?this.mirror.getId(Tn(s)):this.mirror.getId(o),h=n(s);if(-1===a||-1===h)return i.addNode(s);null!=t||(t={doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskTextClass:this.maskTextClass,maskTextSelector:this.maskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,maskAllElementAttributes:this.maskAllElementAttributes,maskAttributeFn:this.maskAttributeFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,canvasMaskingConfigured:this.canvasMaskingConfigured,inlineImages:this.inlineImages,onSerialize:t=>{kn(t,this.mirror)&&this.iframeManager.addIframe(t),Cn(t,this.mirror)&&this.stylesheetManager.trackLinkElement(t),xn(t)&&!dn(t,this.blockClass,this.blockSelector,!0)&&this.shadowDomManager.addShadowRoot(Ji.shadowRoot(t),this.doc)},onIframeLoad:(t,e)=>{this.iframeManager.attachIframe(t,e),this.shadowDomManager.observeAttachShadow(t)},onIframeListenerRegistered:(t,e)=>{this.iframeManager.registerLoadListenerDisposer(t,e)},onStylesheetLoad:(t,e)=>{this.stylesheetManager.attachLinkElement(t,e)}});var u=Xe(s,t);u&&(e.push({parentId:a,nextId:h,node:u}),r.add(u.id))}};for(var o of this.mapRemoves)this.mapRemoves.delete(o),this.mirror.removeNodeFromMap(o);for(var a of this.movedSet)Zn(this.removesSubTreeCache,a)&&!this.movedSet.has(Ji.parentNode(a))||s(a);for(var h of this.addedSet)Jn(this.droppedSet,h)||Zn(this.removesSubTreeCache,h)?Jn(this.movedSet,h)?s(h):this.droppedSet.add(h):s(h);for(var u=null;i.length;){var l=null;if(u){var f=this.mirror.getId(Ji.parentNode(u.value)),c=n(u.value);-1!==f&&-1!==c&&(l=u)}if(!l)for(var v=i.tail;v;){var d=v;if(v=v.previous,d){var p=this.mirror.getId(Ji.parentNode(d.value));if(-1===n(d.value))continue;if(-1!==p){l=d;break}var m=Ji.parentNode(d.value);if(m&&m.nodeType===Node.DOCUMENT_FRAGMENT_NODE){var y=Ji.host(m);if(-1!==this.mirror.getId(y)){l=d;break}}}}if(!l){for(;i.head;)i.removeNode(i.head.value);break}u=l.previous,i.removeNode(l.value),s(l.value)}var g={texts:this.texts.filter(t=>!this.isBlockedAtEmission(t.node)).map(t=>{var e=t.node,r=Ji.parentNode(e);return r&&"TEXTAREA"===r.tagName&&this.genTextAreaValueMutation(r),{id:this.mirror.getId(e),value:t.value}}).filter(t=>!r.has(t.id)).filter(t=>this.mirror.has(t.id)),attributes:this.attributes.filter(t=>!this.isBlockedAtEmission(t.node)).map(t=>{var e=t.attributes;if(!this.maskAllElementAttributes&&!this.maskAttributeFn&&"string"==typeof e.style){var r=JSON.stringify(t.styleDiff),i=JSON.stringify(t._unchangedStyles);e.style.length>r.length&&(r+i).split("var(").length===e.style.split("var(").length&&(e.style=t.styleDiff)}if(this.maskAllElementAttributes||this.maskAttributeFn)for(var n of Object.entries(e)){var s,o=n[0],a=n[1];"string"!=typeof a&&null!==a||(e[o]=St({element:t.node,name:o,value:a,maskAllElementAttributes:this.maskAllElementAttributes,maskAttributeFn:this.maskAttributeFn,isGenerated:null===(s=this.generatedAttributes.get(t.node))||void 0===s?void 0:s.has(o)}))}return{id:this.mirror.getId(t.node),attributes:e}}).filter(t=>!r.has(t.id)).filter(t=>this.mirror.has(t.id)),removes:this.removes,adds:e};this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.generatedAttributes=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.removesSubTreeCache=new Set,this.movedMap={},(g.texts.length||g.attributes.length||g.removes.length||g.adds.length)&&this.mutationCb(g)}),Ki(this,"bufferBelongsToIframe",t=>this.doc===t.contentDocument),Ki(this,"genTextAreaValueMutation",t=>{var e=this.attributeMap.get(t);e||(this.attributes.push(e={node:t,attributes:{},styleDiff:{},_unchangedStyles:{}}),this.attributeMap.set(t,e));var r=Array.from(Ji.childNodes(t),t=>Ji.textContent(t)||"").join("");e.attributes.value=gt({element:t,maskInputOptions:this.maskInputOptions,tagName:t.tagName,type:Ct(t),value:r,maskInputFn:this.maskInputFn})}),Ki(this,"processMutation",t=>{if(!mn(t.target,this.mirror,this.slimDOMOptions))switch(t.type){case"characterData":var e=Ji.textContent(t.target);dn(t.target,this.blockClass,this.blockSelector,!1)||e===t.oldValue||this.texts.push({value:He(t.target,this.maskTextClass,this.maskTextSelector,!0)&&e?this.maskTextFn?this.maskTextFn(e,vn(t.target)):e.replace(/[\S]/g,"*"):e,node:t.target});break;case"attributes":var r,i=t.target,n=t.attributeName,s=null!==(r=t.attributeNamespace)&&void 0!==r?r:null,o=function(t,e,r){if(!r)return e;var i=t.getAttributeNodeNS(r,e);if(i)return i.name;if("http://www.w3.org/1999/xlink"===r)return"xlink:"+e;if("http://www.w3.org/XML/1998/namespace"===r)return"xml:"+e;if("http://www.w3.org/2000/xmlns/"===r)return"xmlns"===e?e:"xmlns:"+e;var n=t.lookupPrefix(r);return n?n+":"+e:e}(i,n,s),a=s?i.getAttributeNS(s,n):t.target.getAttribute(n);if("value"===o){var h=i,u=Ct(h);a=gt({element:h,maskInputOptions:this.maskInputOptions,tagName:i.tagName,type:u,value:a,maskInputFn:this.maskInputFn})}if(dn(t.target,this.blockClass,this.blockSelector,!1)||a===t.oldValue)return;var l=this.attributeMap.get(t.target),f="IFRAME"===i.tagName&&"src"===o;if(f&&!this.keepIframeSrcFn(a)&&i.contentDocument)return;if(l||(this.attributes.push(l={node:t.target,attributes:{},styleDiff:{},_unchangedStyles:{}}),this.attributeMap.set(t.target,l)),"type"===o&&"INPUT"===i.tagName&&"password"===(t.oldValue||"").toLowerCase()&&i.setAttribute("data-rr-is-password","true"),!Ue(i.tagName,o)){var c,v=je(this.doc,wt(i.tagName),wt(o),a,i,this.dataURLOptions);if(f&&!this.keepIframeSrcFn(a)&&(o="rr_src"),l.attributes[o]=v,null===(c=this.generatedAttributes.get(t.target))||void 0===c||c.delete(o),"style"===o){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(t){this.unattachedDoc=this.doc}var d=this.unattachedDoc.createElement("span"),p=i.style;for(var m of(t.oldValue&&(d.style.cssText=t.oldValue),Array.from(p))){var y=p.getPropertyValue(m),g=p.getPropertyPriority(m);y!==d.style.getPropertyValue(m)||g!==d.style.getPropertyPriority(m)?l.styleDiff[m]=""===g?y:[y,g]:l._unchangedStyles[m]=[y,g]}for(var w of Array.from(d.style))""===p.getPropertyValue(w)&&(l.styleDiff[w]=!1)}else if("open"===o&&"DIALOG"===i.tagName){l.attributes.rr_open_mode=i.matches("dialog:modal")?"modal":"non-modal";var b=this.generatedAttributes.get(t.target);b||this.generatedAttributes.set(t.target,b=new Set),b.add("rr_open_mode")}}break;case"childList":if(dn(t.target,this.blockClass,this.blockSelector,!0))return;if("TEXTAREA"===t.target.tagName)return void this.genTextAreaValueMutation(t.target);t.addedNodes.forEach(e=>this.genAdds(e,t.target)),t.removedNodes.forEach(e=>{var r=this.mirror.getId(e),i=rt(t.target)?this.mirror.getId(Ji.host(t.target)):this.mirror.getId(t.target);dn(t.target,this.blockClass,this.blockSelector,!1)||mn(e,this.mirror,this.slimDOMOptions)||!pn(e,this.mirror)||(this.addedSet.has(e)?(qn(this.addedSet,e),this.droppedSet.add(e)):this.addedSet.has(t.target)&&-1===r||yn(t.target,this.mirror)||(this.movedSet.has(e)&&this.movedMap[$n(r,i)]?qn(this.movedSet,e):(this.removes.push({parentId:i,id:r,isShadow:!(!rt(t.target)||!nt(t.target))||void 0}),function(t,e){for(var r=[t];r.length;){var i=r.pop();e.has(i)||(e.add(i),Ji.childNodes(i).forEach(t=>r.push(t)))}}(e,this.removesSubTreeCache))),this.mapRemoves.add(e))})}}),Ki(this,"genAdds",(t,e)=>{if(!this.processedNodeManager.inOtherBuffer(t,this)){if(this.addedSet.has(t))return this.addedSet.delete(t),void this.addedSet.add(t);if(!this.movedSet.has(t)){if(this.mirror.hasNode(t)){if(mn(t,this.mirror,this.slimDOMOptions))return;this.movedSet.add(t);var r=null;e&&this.mirror.hasNode(e)&&(r=this.mirror.getId(e)),r&&-1!==r&&(this.movedMap[$n(this.mirror.getId(t),r)]=!0)}else this.addedSet.add(t),this.droppedSet.delete(t);if(!dn(t,this.blockClass,this.blockSelector,!1)){if(t.nodeType===t.TEXT_NODE)return;for(var i=Ji.childNodes(t),n=0,s=i.length;s>n;n++){var o=i[n];o&&this.genAdds(o)}if(xn(t))for(var a=Ji.childNodes(Ji.shadowRoot(t)),h=0,u=a.length;u>h;h++){var l=a[h];l&&(this.processedNodeManager.add(l,this),this.genAdds(l,t))}}}}})}init(t){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","maskAllElementAttributes","maskAttributeFn","keepIframeSrcFn","recordCanvas","canvasMaskingConfigured","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(e=>{this[e]=t[e]}),this.canvasManager.acquire()}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.releaseCanvasManager()}releaseCanvasManager(){this.canvasManagerReleased||(this.canvasManagerReleased=!0,this.canvasManager.reset())}bufferDoc(){return this.doc}destroy(){for(var t of this.mapRemoves)this.mapRemoves.delete(t),this.mirror.removeNodeFromMap(t)}isBlockedAtEmission(t){for(var e=this.blockClass,r=e&&"string"!=typeof e&&(e.global||e.sticky)?new RegExp(e):null;t;){if(r&&(r.lastIndex=0),dn(t,r||e,this.blockSelector,!0))return!0;var i="getRootNode"in t?Ji.getRootNode(t):null;t=(null==i?void 0:i.nodeType)===Node.DOCUMENT_FRAGMENT_NODE?Ji.host(i):null}return!1}};function qn(t,e){for(var r=[e];r.length;){var i=r.pop();if(t.delete(i),i.nodeType!==i.TEXT_NODE)for(var n=Ji.childNodes(i),s=0,o=n.length;o>s;s++){var a=n[s];a&&r.push(a)}}}function Zn(t,e,r){return 0!==t.size&&function(t,e){var r=Ji.parentNode(e);return!!r&&t.has(r)}(t,e)}function Jn(t,e){if(0===t.size)return!1;for(var r=Ji.parentNode(e);r;){if(t.has(r))return!0;r=Ji.parentNode(r)}return!1}var Xn=function(t,e){return void 0===e&&(e="rrweb"),zn?function(){try{return t(...arguments)}catch(t){if(zn&&!0===zn(t,e))return;throw t}}:t},Kn=[];function Qn(t){try{if("composedPath"in t){var e=t.composedPath();if(e.length)return e[0]}else if("path"in t&&t.path.length)return t.path[0]}catch(t){}return t&&t.target}function ts(t,e){var r,i=new Yn;i.init(t);try{r=new(qi())(Xn(i.processMutations.bind(i)));var n={attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0};return t.attributeFilter&&t.attributeFilter.length>0&&(n.attributeFilter=t.attributeFilter),r.observe(e,n),Kn.push(i),{observer:r,buffer:i}}catch(t){try{null==r||r.disconnect(),i.destroy(),i.reset()}catch(t){}throw t}}function es(t){var e=t.scrollCb,r=t.doc,i=t.mirror,n=t.blockClass,s=t.blockSelector,o=t.sampling,a=new Map,h=t=>{var o=Qn(t);if(o&&!dn(o,n,s,!0)){var h,u,l=i.getId(o);if(o===r&&r.defaultView){var f=ln(r.defaultView);h=f.left,u=f.top}else h=o.scrollLeft,u=o.scrollTop;var c=h+","+u;a.get(l)!==c&&(a.set(l,c),e({id:l,x:h,y:u}))}},u=[tn("scroll",Xn(an(Xn(t=>h(t)),o.scroll||100)),r)];return"onscrollend"in r&&u.push(tn("scrollend",Xn(h),r)),()=>u.forEach(t=>t())}function rs(t,e){for(var r=Kn.length-1;r>=0;r--){var i=Kn[r];if(i){var n=i.bufferBelongsToIframe(t);!n&&e&&e.has(i.bufferDoc())&&(n=!0),n&&(i.reset(),Kn.splice(r,1))}}}var is=["INPUT","TEXTAREA","SELECT"],ns=new WeakMap;function ss(t){return function t(e,r){if(us("CSSGroupingRule")&&e.parentRule instanceof CSSGroupingRule||us("CSSMediaRule")&&e.parentRule instanceof CSSMediaRule||us("CSSSupportsRule")&&e.parentRule instanceof CSSSupportsRule||us("CSSConditionRule")&&e.parentRule instanceof CSSConditionRule){var i=Array.from(e.parentRule.cssRules).indexOf(e);return r.unshift(i),t(e.parentRule,r)}if(e.parentStyleSheet){var n=Array.from(e.parentStyleSheet.cssRules).indexOf(e);r.unshift(n)}return r}(t,[])}function os(t,e,r){var i,n;return t?(t.ownerNode?i=e.getId(t.ownerNode):n=r.getId(t),{styleId:n,id:i}):{}}function as(t,e){var r,i,n,s=t.stylesheetManager;n=t.mirror.getId("#document"===e.nodeName?e:Ji.host(e));var o="#document"===e.nodeName?null===(r=e.defaultView)||void 0===r?void 0:r.Document:null===(i=e.ownerDocument)||void 0===i||null===(i=i.defaultView)||void 0===i?void 0:i.ShadowRoot,a=(null==o?void 0:o.prototype)?Object.getOwnPropertyDescriptor(null==o?void 0:o.prototype,"adoptedStyleSheets"):void 0;return null!==n&&-1!==n&&o&&a?(Object.defineProperty(e,"adoptedStyleSheets",{configurable:a.configurable,enumerable:a.enumerable,get(){var t;return null===(t=a.get)||void 0===t?void 0:t.call(this)},set(t){var e;try{var r;e=null===(r=a.set)||void 0===r?void 0:r.call(this,t)}catch(t){if(t&&"object"==typeof t&&"NotAllowedError"===t.name)return;throw t}if(null!==n&&-1!==n)try{s.adoptStyleSheets(t,n)}catch(t){}return e}}),Xn(()=>{Object.defineProperty(e,"adoptedStyleSheets",{configurable:a.configurable,enumerable:a.enumerable,get:a.get,set:a.set})})):()=>{}}function hs(t,e){void 0===e&&(e={});var r,i,n=t.doc.defaultView;if(!n)return()=>{};!function(t,e){var r=t.mutationCb,i=t.mousemoveCb,n=t.mouseInteractionCb,s=t.scrollCb,o=t.viewportResizeCb,a=t.inputCb,h=t.mediaInteractionCb,u=t.styleSheetRuleCb,l=t.styleDeclarationCb,f=t.canvasMutationCb,c=t.fontCb,v=t.selectionCb,d=t.customElementCb;t.mutationCb=function(){e.mutation&&e.mutation(...arguments),r(...arguments)},t.mousemoveCb=function(){e.mousemove&&e.mousemove(...arguments),i(...arguments)},t.mouseInteractionCb=function(){e.mouseInteraction&&e.mouseInteraction(...arguments),n(...arguments)},t.scrollCb=function(){e.scroll&&e.scroll(...arguments),s(...arguments)},t.viewportResizeCb=function(){e.viewportResize&&e.viewportResize(...arguments),o(...arguments)},t.inputCb=function(){e.input&&e.input(...arguments),a(...arguments)},t.mediaInteractionCb=function(){e.mediaInteaction&&e.mediaInteaction(...arguments),h(...arguments)},t.styleSheetRuleCb=function(){e.styleSheetRule&&e.styleSheetRule(...arguments),u(...arguments)},t.styleDeclarationCb=function(){e.styleDeclaration&&e.styleDeclaration(...arguments),l(...arguments)},t.canvasMutationCb=function(){e.canvasMutation&&e.canvasMutation(...arguments),f(...arguments)},t.fontCb=function(){e.font&&e.font(...arguments),c(...arguments)},t.selectionCb=function(){e.selection&&e.selection(...arguments),v(...arguments)},t.customElementCb=function(){e.customElement&&e.customElement(...arguments),d(...arguments)}}(t,e);var s,a,h,u,l=[],f=Xn(()=>{try{if(i)try{i.destroy(),i.reset()}finally{var e=Kn.indexOf(i);-1!==e&&Kn.splice(e,1)}t.shadowDomManager.resetForDoc(t.doc),null==r||r.disconnect()}finally{nn(l)}});try{if(t.recordDOM){var c=ts(t,t.doc);r=c.observer,i=c.buffer}if(l.push(function(t){var e=t.mousemoveCb,r=t.sampling,i=t.doc,n=t.mirror;if(!1===r.mousemove)return()=>{};var s,o="number"==typeof r.mousemove?r.mousemove:50,a="number"==typeof r.mousemoveCallback?r.mousemoveCallback:500,h=[],u=an(Xn(t=>{var r=Date.now()-s;e(h.map(t=>(t.timeOffset-=r,t)),t),h=[],s=null}),a),l=Xn(an(Xn(t=>{var e=Qn(t),r=gn(t)?t.changedTouches[0]:t,i=r.clientX,o=r.clientY;s||(s=un()),h.push({x:i,y:o,id:n.getId(e),timeOffset:un()-s}),u("undefined"!=typeof DragEvent&&t instanceof DragEvent?Fn.Drag:t instanceof MouseEvent?Fn.MouseMove:Fn.TouchMove)}),o,{trailing:!1})),f=[tn("mousemove",l,i),tn("touchmove",l,i),tn("drag",l,i)];return Xn(()=>{f.forEach(t=>t())})}(t)),l.push(function(t){var e=t.mouseInteractionCb,r=t.doc,i=t.mirror,n=t.blockClass,s=t.blockSelector,a=t.sampling;if(!1===a.mouseInteraction)return()=>{};var h=!0===a.mouseInteraction||void 0===a.mouseInteraction?{}:a.mouseInteraction,u=[],l=null;return Object.keys(Pn).filter(t=>Number.isNaN(Number(t))&&!t.endsWith("_Departed")&&!1!==h[t]).forEach(t=>{var a=wt(t),h=(t=>r=>{var a=Qn(r);if(!dn(a,n,s,!0)){var h=null,u=t;if("pointerType"in r){switch(r.pointerType){case"mouse":h=Bn.Mouse;break;case"touch":h=Bn.Touch;break;case"pen":h=Bn.Pen}h===Bn.Touch&&(Pn[t]===Pn.MouseDown?u="TouchStart":Pn[t]===Pn.MouseUp&&(u="TouchEnd"))}else gn(r)&&(h=Bn.Touch);null!==h?(l=h,(u.startsWith("Touch")&&h===Bn.Touch||u.startsWith("Mouse")&&h===Bn.Mouse)&&(h=null)):Pn[t]===Pn.Click&&(h=l,l=null);var f=gn(r)?r.changedTouches[0]:r;if(f){var c=i.getId(a),v=f.clientX,d=f.clientY;Xn(e)(o({type:Pn[u],id:c,x:v,y:d},null!==h&&{pointerType:h}))}}})(t);if(window.PointerEvent)switch(Pn[t]){case Pn.MouseDown:case Pn.MouseUp:a=a.replace("mouse","pointer");break;case Pn.TouchStart:case Pn.TouchEnd:return}u.push(tn(a,h,r))}),Xn(()=>{u.forEach(t=>t())})}(t)),l.push(es(t)),l.push((s=t.viewportResizeCb,a=n,h=-1,u=-1,tn("resize",Xn(an(Xn(()=>{var t=fn(),e=cn();h===t&&u===e||(s({width:Number(e),height:Number(t)}),h=t,u=e)}),200)),a))),l.push(function(t){var e=t.inputCb,r=t.doc,i=t.mirror,n=t.blockClass,s=t.blockSelector,a=t.ignoreClass,h=t.ignoreSelector,u=t.maskInputOptions,l=t.maskInputFn,f=t.userTriggeredOnInput;function c(t){var e=Qn(t),i=t.isTrusted,o=r.defaultView;if(!e||!o||e instanceof o.HTMLElement){var c=e&&e.tagName;if(e&&"OPTION"===c&&(e=Ji.parentElement(e)),e&&c&&is.indexOf(c)>=0&&!dn(e,n,s,!0)&&!(e.classList.contains(a)||h&&e.matches(h))){var d=e.value,p=!1,m=Ct(e)||"";"radio"===m||"checkbox"===m?p=e.checked:(u[c.toLowerCase()]||u[m])&&(d=gt({element:e,maskInputOptions:u,tagName:c,type:m,value:d,maskInputFn:l})),v(e,f?{text:d,isChecked:p,userTriggered:i}:{text:d,isChecked:p});var y=e.name;"radio"===m&&y&&p&&r.querySelectorAll('input[type="radio"][name="'+y+'"]').forEach(t=>{if(t!==e){var r=t.value;v(t,f?{text:r,isChecked:!p,userTriggered:!1}:{text:r,isChecked:!p})}})}}}function v(t,r){var n=ns.get(t);if(!n||n.text!==r.text||n.isChecked!==r.isChecked){ns.set(t,r);var s=i.getId(t);Xn(e)(o({},r,{id:s}))}}var d=("last"===t.sampling.input?["change"]:["input","change"]).map(t=>tn(t,Xn(c),r)),p=r.defaultView;if(!p)return()=>{d.forEach(t=>t())};var m=p.Object.getOwnPropertyDescriptor(p.HTMLInputElement.prototype,"value");return m&&m.set&&d.push(...[[p.HTMLInputElement.prototype,"value"],[p.HTMLInputElement.prototype,"checked"],[p.HTMLSelectElement.prototype,"value"],[p.HTMLTextAreaElement.prototype,"value"],[p.HTMLSelectElement.prototype,"selectedIndex"],[p.HTMLOptionElement.prototype,"selected"]].map(t=>hn(t[0],t[1],{set(){Xn(c)({target:this,isTrusted:!1})}},!1,p))),Xn(()=>{nn(d)})}(t)),l.push(function(t){var e=t.mediaInteractionCb,r=t.blockClass,i=t.blockSelector,n=t.mirror,s=t.sampling,o=t.doc,a=Xn(t=>an(Xn(s=>{var o=Qn(s);if(o&&!dn(o,r,i,!0)){var a=o.currentTime,h=o.volume,u=o.muted,l=o.playbackRate,f=o.loop;e({type:t,id:n.getId(o),currentTime:a,volume:h,muted:u,playbackRate:l,loop:f})}}),s.media||500)),h=[tn("play",a(Un.Play),o),tn("pause",a(Un.Pause),o),tn("seeked",a(Un.Seeked),o),tn("volumechange",a(Un.VolumeChange),o),tn("ratechange",a(Un.RateChange),o)];return Xn(()=>{h.forEach(t=>t())})}(t)),t.recordDOM){var v=function(t){var e=new Map,r=new Set,i=!0,n=t=>{if(i)try{t()}catch(t){}},s=t=>{var r,i=e.get(t);if(i){for(;null===(r=i[0])||void 0===r?void 0:r.ready;){var s=i.shift();(null==s?void 0:s.emit)&&n(s.emit)}0===i.length&&e.delete(t)}};return{queueMutation(t,r){if(t){var i=e.get(t);i?(i.push({emit:r,ready:!0}),s(t)):n(r)}else n(r)},queuePendingMutation(o,a,h){if(!i)return()=>{};var u=e.get(o);u||e.set(o,u=[]);var l={emit:a,ready:!1};u.push(l);var f,c=!1,v=!1,d=()=>{c||v||(c=!0,void 0!==f&&r.delete(f),l.ready=!0,l.emit=void 0,s(o))};try{f=t.setTimeout(d,5e3),c||v?t.clearTimeout(f):r.add(f)}catch(t){d()}return e=>{!v&&i&&(v=!0,void 0!==f&&(t.clearTimeout(f),r.delete(f)),c?e&&n(h):(l.ready=!0,e||(l.emit=void 0),s(o)))}},reset(){i=!1,r.forEach(e=>t.clearTimeout(e)),r.clear(),e.clear()}}}(n);l.push(v.reset),l.push(function(t,e){var r=t.styleSheetRuleCb,i=t.mirror,n=t.stylesheetManager,s=e.win,o=e.mutationQueue;if(!s.CSSStyleSheet||!s.CSSStyleSheet.prototype)return()=>{};var a=s.CSSStyleSheet.prototype.insertRule;s.CSSStyleSheet.prototype.insertRule=new Proxy(a,{apply:Xn((t,e,s)=>{var a=s[0],h=t.apply(e,s);n.onCssomSheetMutation(e);var u=os(e,i,n.styleMirror),l=u.id,f=u.styleId;return(l&&-1!==l||f&&-1!==f)&&o.queueMutation(e,()=>r({id:l,styleId:f,adds:[{rule:a,index:h}]})),h},"host")}),s.CSSStyleSheet.prototype.addRule=function(t,e,r){return void 0===r&&(r=this.cssRules.length),s.CSSStyleSheet.prototype.insertRule.apply(this,[t+" { "+e+" }",r])};var h,u,l=s.CSSStyleSheet.prototype.deleteRule;s.CSSStyleSheet.prototype.deleteRule=new Proxy(l,{apply:Xn((t,e,s)=>{var a=s[0],h=t.apply(e,s);n.onCssomSheetMutation(e);var u=os(e,i,n.styleMirror),l=u.id,f=u.styleId;return(l&&-1!==l||f&&-1!==f)&&o.queueMutation(e,()=>r({id:l,styleId:f,removes:[{index:a}]})),h},"host")}),s.CSSStyleSheet.prototype.removeRule=function(t){return s.CSSStyleSheet.prototype.deleteRule.apply(this,[t])},s.CSSStyleSheet.prototype.replace&&(h=s.CSSStyleSheet.prototype.replace,s.CSSStyleSheet.prototype.replace=new Proxy(h,{apply:Xn((t,e,s)=>{var a=s[0],h=t.apply(e,s);try{var u=null==h?void 0:h.then;if(e.ownerNode||!h||"function"!=typeof u)return h;n.onCssomSheetMutation(e);var l=os(e,i,n.styleMirror),f=l.id,c=l.styleId;if(!(f&&-1!==f||c&&-1!==c))return h;var v=o.queuePendingMutation(e,()=>r({id:f,styleId:c,replace:a}),()=>{var t=ht(e);null!==t&&r({id:f,styleId:c,replace:t})});try{u.call(h,()=>v(!0),()=>v(!1))}catch(t){v(!1)}}catch(t){}return h},"host")})),s.CSSStyleSheet.prototype.replaceSync&&(u=s.CSSStyleSheet.prototype.replaceSync,s.CSSStyleSheet.prototype.replaceSync=new Proxy(u,{apply:Xn((t,e,s)=>{var a=s[0],h=t.apply(e,s);n.onCssomSheetMutation(e);var u=os(e,i,n.styleMirror),l=u.id,f=u.styleId;return(l&&-1!==l||f&&-1!==f)&&o.queueMutation(e,()=>r({id:l,styleId:f,replaceSync:a})),h},"host")}));var f={};ls("CSSGroupingRule")?f.CSSGroupingRule=s.CSSGroupingRule:(ls("CSSMediaRule")&&(f.CSSMediaRule=s.CSSMediaRule),ls("CSSConditionRule")&&(f.CSSConditionRule=s.CSSConditionRule),ls("CSSSupportsRule")&&(f.CSSSupportsRule=s.CSSSupportsRule));var c={};return Object.entries(f).forEach(t=>{var e=t[0],s=t[1];c[e]={insertRule:s.prototype.insertRule,deleteRule:s.prototype.deleteRule},s.prototype.insertRule=new Proxy(c[e].insertRule,{apply:Xn((t,e,s)=>{var a=s[0],h=t.apply(e,s);n.onCssomSheetMutation(e.parentStyleSheet);var u=os(e.parentStyleSheet,i,n.styleMirror),l=u.id,f=u.styleId;if(e.parentStyleSheet&&(l&&-1!==l||f&&-1!==f)){var c=[...ss(e),h];o.queueMutation(e.parentStyleSheet,()=>r({id:l,styleId:f,adds:[{rule:a,index:c}]}))}return h},"host")}),s.prototype.deleteRule=new Proxy(c[e].deleteRule,{apply:Xn((t,e,s)=>{var a=s[0],h=t.apply(e,s);n.onCssomSheetMutation(e.parentStyleSheet);var u=os(e.parentStyleSheet,i,n.styleMirror),l=u.id,f=u.styleId;if(e.parentStyleSheet&&(l&&-1!==l||f&&-1!==f)){var c=[...ss(e),a];o.queueMutation(e.parentStyleSheet,()=>r({id:l,styleId:f,removes:[{index:c}]}))}return h},"host")})}),Xn(()=>{s.CSSStyleSheet.prototype.insertRule=a,s.CSSStyleSheet.prototype.deleteRule=l,h&&(s.CSSStyleSheet.prototype.replace=h),u&&(s.CSSStyleSheet.prototype.replaceSync=u),Object.entries(f).forEach(t=>{var e=t[0],r=t[1];r.prototype.insertRule=c[e].insertRule,r.prototype.deleteRule=c[e].deleteRule})})}(t,{win:n,mutationQueue:v})),l.push(as(t,t.doc)),l.push(function(t,e){var r=t.styleDeclarationCb,i=t.mirror,n=t.ignoreCSSAttributes,s=t.stylesheetManager,o=e.win,a=e.mutationQueue,h=o.CSSStyleDeclaration.prototype.setProperty;o.CSSStyleDeclaration.prototype.setProperty=new Proxy(h,{apply:Xn((t,e,o)=>{var h,u=o[0],l=o[1],f=o[2],c=t.apply(e,o);if(n.has(u))return c;var v=null===(h=e.parentRule)||void 0===h?void 0:h.parentStyleSheet;s.onCssomSheetMutation(v);var d=os(v,i,s.styleMirror),p=d.id,m=d.styleId;if(p&&-1!==p||m&&-1!==m){var y=ss(e.parentRule);a.queueMutation(v,()=>r({id:p,styleId:m,set:{property:u,value:l,priority:f},index:y}))}return c},"host")});var u=o.CSSStyleDeclaration.prototype.removeProperty;return o.CSSStyleDeclaration.prototype.removeProperty=new Proxy(u,{apply:Xn((t,e,o)=>{var h,u=o[0],l=t.apply(e,o);if(n.has(u))return l;var f=null===(h=e.parentRule)||void 0===h?void 0:h.parentStyleSheet;s.onCssomSheetMutation(f);var c=os(f,i,s.styleMirror),v=c.id,d=c.styleId;if(v&&-1!==v||d&&-1!==d){var p=ss(e.parentRule);a.queueMutation(f,()=>r({id:v,styleId:d,remove:{property:u},index:p}))}return l},"host")}),Xn(()=>{o.CSSStyleDeclaration.prototype.setProperty=h,o.CSSStyleDeclaration.prototype.removeProperty=u})}(t,{win:n,mutationQueue:v})),t.collectFonts&&l.push(function(t){var e=t.fontCb,r=t.doc,i=r.defaultView;if(!i)return()=>{};var n=[],s=new WeakMap,o=i.FontFace;i.FontFace=function(t,e,r){var i=new o(t,e,r);return s.set(i,{family:t,buffer:"string"!=typeof e,descriptors:r,fontSource:"string"==typeof e?e:JSON.stringify(Array.from(new Uint8Array(e)))}),i};var a=Zi(r.fonts,"add",function(t){return function(r){return setTimeout(Xn(()=>{var t=s.get(r);t&&(e(t),s.delete(r))}),0),t.apply(this,[r])}});return n.push(()=>{i.FontFace=o}),n.push(a),Xn(()=>{n.forEach(t=>t())})}(t))}for(var d of(l.push(function(t){var e=t.doc,r=t.mirror,i=t.blockClass,n=t.blockSelector,s=t.selectionCb,o=!0,a=Xn(()=>{var t=e.getSelection();if(!(!t||o&&(null==t?void 0:t.isCollapsed))){o=t.isCollapsed||!1;for(var a=[],h=t.rangeCount||0,u=0;h>u;u++){var l=t.getRangeAt(u),f=l.startContainer,c=l.startOffset,v=l.endContainer,d=l.endOffset;dn(f,i,n,!0)||dn(v,i,n,!0)||a.push({start:r.getId(f),startOffset:c,end:r.getId(v),endOffset:d})}s({ranges:a})}});return a(),tn("selectionchange",a)}(t)),l.push(function(t){var e=t.customElementCb,r=t.doc.defaultView;return r&&r.customElements?Zi(r.customElements,"define",function(t){return function(r,i,n){try{e({define:{name:r}})}catch(t){console.warn("Custom element callback failed for "+r)}return t.apply(this,[r,i,n])}}):()=>{}}(t)),t.plugins))l.push(d.observer(d.callback,n,d.options))}catch(t){try{f()}catch(t){}throw t}return f}function us(t){return void 0!==window[t]}function ls(t){return Boolean(void 0!==window[t]&&window[t].prototype&&"insertRule"in window[t].prototype&&"deleteRule"in window[t].prototype)}var fs=class{constructor(t){Ki(this,"generateIdFn",void 0),Ki(this,"iframeRemoteIdToLocalIdMap",new WeakMap),Ki(this,"iframeLocalIdToRemoteIdMap",new WeakMap),this.generateIdFn=t}getId(t,e,r,i){if(0>e)return e;var n=r||this.getRemoteIdToLocalIdMap(t),s=i||this.getLocalIdToRemoteIdMap(t),o=n.get(e);return void 0===o&&(o=this.generateIdFn(),n.set(e,o),s.set(o,e)),o}getIds(t,e){var r=this.getRemoteIdToLocalIdMap(t),i=this.getLocalIdToRemoteIdMap(t);return e.map(e=>this.getId(t,e,r,i))}getRemoteId(t,e,r){var i;return"number"!=typeof e||0>e?e:null!==(i=(r||this.getLocalIdToRemoteIdMap(t)).get(e))&&void 0!==i?i:-1}getRemoteIds(t,e){var r=this.getLocalIdToRemoteIdMap(t);return e.map(e=>this.getRemoteId(t,e,r))}reset(t){if(!t)return this.iframeRemoteIdToLocalIdMap=new WeakMap,void(this.iframeLocalIdToRemoteIdMap=new WeakMap);this.iframeRemoteIdToLocalIdMap.delete(t),this.iframeLocalIdToRemoteIdMap.delete(t)}getRemoteIdToLocalIdMap(t){var e=this.iframeRemoteIdToLocalIdMap.get(t);return e||this.iframeRemoteIdToLocalIdMap.set(t,e=new Map),e}getLocalIdToRemoteIdMap(t){var e=this.iframeLocalIdToRemoteIdMap.get(t);return e||this.iframeLocalIdToRemoteIdMap.set(t,e=new Map),e}},cs=class{constructor(t){Ki(this,"iframes",new WeakMap),Ki(this,"crossOriginIframeMap",new WeakMap),Ki(this,"crossOriginIframeMirror",new fs(De)),Ki(this,"crossOriginIframeStyleMirror",void 0),Ki(this,"crossOriginIframeRootIdMap",new WeakMap),Ki(this,"mirror",void 0),Ki(this,"mutationCb",void 0),Ki(this,"wrappedEmit",void 0),Ki(this,"loadListener",void 0),Ki(this,"pageHideListener",void 0),Ki(this,"stylesheetManager",void 0),Ki(this,"recordCrossOriginIframes",void 0),Ki(this,"messageHandler",void 0),Ki(this,"nestedIframeListeners",new Map),Ki(this,"attachedWindows",new WeakMap),Ki(this,"attachedDocuments",new WeakMap),Ki(this,"attachedIframes",new Map),Ki(this,"loadListenerDisposers",new WeakMap),Ki(this,"iframeElementsById",new Map),Ki(this,"pageHideHandlers",new WeakMap),this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new fs(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=t.mirror,this.messageHandler=this.handleMessage.bind(this),this.recordCrossOriginIframes&&window.addEventListener("message",this.messageHandler)}addIframe(t){this.iframes.set(t,!0),t.contentWindow&&this.crossOriginIframeMap.set(t.contentWindow,t)}registerLoadListenerDisposer(t,e){var r=this.loadListenerDisposers.get(t);r||this.loadListenerDisposers.set(t,r=new Set),r.add(e);var i=this.mirror.getId(t);-1!==i&&this.iframeElementsById.set(i,t)}getIframeElementById(t){var e,r,i;return null!==(e=null!==(r=null===(i=this.attachedIframes.get(t))||void 0===i?void 0:i.element)&&void 0!==r?r:this.iframeElementsById.get(t))&&void 0!==e?e:null}forgetIframeId(t){this.attachedIframes.delete(t),this.iframeElementsById.delete(t)}disposeLoadListeners(t){var e=this.loadListenerDisposers.get(t);e&&(e.forEach(t=>rn(t)),this.loadListenerDisposers.delete(t))}removePageHideListener(t){var e=this.pageHideHandlers.get(t);e&&(e.forEach(t=>{en(t.win,"pagehide",t.handler)}),this.pageHideHandlers.delete(t))}addLoadListener(t){this.loadListener=t}addPageHideListener(t){this.pageHideListener=t}removeLoadListener(){this.loadListener=void 0}trackIframeContent(t,e){var r=this.mirror.getId(t);return this.attachedIframes.set(r,{element:t,content:e}),r}attachIframe(t,e){var r,i=this.trackIframeContent(t,e);if(t.contentDocument){var n=this.attachedDocuments.get(t);n||this.attachedDocuments.set(t,n=new Set),n.add(t.contentDocument)}this.mutationCb({adds:[{parentId:i,nextId:null,node:e}],removes:[],texts:[],attributes:[],isAttachIframe:!0});var s=t.contentWindow;if(this.recordCrossOriginIframes&&s&&!this.nestedIframeListeners.has(s)){var o=this.handleMessage.bind(this);rn(()=>{s.addEventListener("message",o),this.nestedIframeListeners.set(s,o);var e=this.attachedWindows.get(t);e||this.attachedWindows.set(t,e=new Set),e.add(s)})}rn(()=>{var e=t.contentWindow;if(e){var r=this.pageHideHandlers.get(t);if(r)for(var i of r)if(i.win===e)return;var n=()=>{var e;null===(e=this.pageHideListener)||void 0===e||e.call(this,t),t.contentDocument&&this.mirror.removeNodeFromMap(t.contentDocument)};e.addEventListener("pagehide",n),r||this.pageHideHandlers.set(t,r=new Set),r.add({win:e,handler:n})}}),null===(r=this.loadListener)||void 0===r||r.call(this,t),t.contentDocument&&t.contentDocument.adoptedStyleSheets&&t.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(t.contentDocument.adoptedStyleSheets,this.mirror.getId(t.contentDocument))}handleMessage(t){var e=t;if("rrweb"===e.data.type&&e.origin===e.data.origin&&t.source){var r=this.crossOriginIframeMap.get(t.source);if(r){var i=this.transformCrossOriginEvent(r,e.data.event);i&&this.wrappedEmit(i,e.data.isCheckout)}}}transformCrossOriginEvent(t,e){switch(e.type){case _n.FullSnapshot:this.crossOriginIframeMirror.reset(t),this.crossOriginIframeStyleMirror.reset(t),this.replaceIdOnNode(e.data.node,t);var r=e.data.node.id;return this.crossOriginIframeRootIdMap.set(t,r),this.patchRootIdOnNode(e.data.node,r),this.trackIframeContent(t,e.data.node),{timestamp:e.timestamp,type:_n.IncrementalSnapshot,data:{source:Fn.Mutation,adds:[{parentId:this.mirror.getId(t),nextId:null,node:e.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}};case _n.Meta:case _n.Load:case _n.DomContentLoaded:return!1;case _n.Plugin:return e;case _n.Custom:return this.replaceIds(e.data.payload,t,["id","parentId","previousId","nextId"]),e;case _n.IncrementalSnapshot:switch(e.data.source){case Fn.Mutation:return e.data.adds.forEach(e=>{this.replaceIds(e,t,["parentId","nextId","previousId"]),this.replaceIdOnNode(e.node,t);var r=this.crossOriginIframeRootIdMap.get(t);r&&this.patchRootIdOnNode(e.node,r)}),e.data.removes.forEach(e=>{this.replaceIds(e,t,["parentId","id"])}),e.data.attributes.forEach(e=>{this.replaceIds(e,t,["id"])}),e.data.texts.forEach(e=>{this.replaceIds(e,t,["id"])}),e;case Fn.Drag:case Fn.TouchMove:case Fn.MouseMove:return e.data.positions.forEach(e=>{this.replaceIds(e,t,["id"])}),e;case Fn.ViewportResize:return!1;case Fn.MediaInteraction:case Fn.MouseInteraction:case Fn.Scroll:case Fn.CanvasMutation:case Fn.Input:return this.replaceIds(e.data,t,["id"]),e;case Fn.StyleSheetRule:case Fn.StyleDeclaration:return this.replaceIds(e.data,t,["id"]),this.replaceStyleIds(e.data,t,["styleId"]),e;case Fn.Font:return e;case Fn.Selection:return e.data.ranges.forEach(e=>{this.replaceIds(e,t,["start","end"])}),e;case Fn.AdoptedStyleSheet:var i;return this.replaceIds(e.data,t,["id"]),this.replaceStyleIds(e.data,t,["styleIds"]),null===(i=e.data.styles)||void 0===i||i.forEach(e=>{this.replaceStyleIds(e,t,["styleId"])}),e}}return!1}replace(t,e,r,i){for(var n of i)(Array.isArray(e[n])||"number"==typeof e[n])&&(e[n]=Array.isArray(e[n])?t.getIds(r,e[n]):t.getId(r,e[n]));return e}replaceIds(t,e,r){return this.replace(this.crossOriginIframeMirror,t,e,r)}replaceStyleIds(t,e,r){return this.replace(this.crossOriginIframeStyleMirror,t,e,r)}replaceIdOnNode(t,e){this.replaceIds(t,e,["id","rootId"]),"childNodes"in t&&t.childNodes.forEach(t=>{this.replaceIdOnNode(t,e)})}patchRootIdOnNode(t,e){t.type===Hn.Document||t.rootId||(t.rootId=e),"childNodes"in t&&t.childNodes.forEach(t=>{this.patchRootIdOnNode(t,e)})}removeIframeById(t){var e=this.attachedIframes.get(t),r=(null==e?void 0:e.element)||this.iframeElementsById.get(t)||this.mirror.getNode(t);if(this.iframeElementsById.delete(t),r){var i=r.contentWindow,n=this.attachedWindows.get(r);n&&(n.forEach(t=>{var e=this.nestedIframeListeners.get(t);e&&(en(t,"message",e),this.nestedIframeListeners.delete(t)),this.crossOriginIframeMap.delete(t)}),this.attachedWindows.delete(r)),i&&this.nestedIframeListeners.has(i)&&(en(i,"message",this.nestedIframeListeners.get(i)),this.nestedIframeListeners.delete(i)),i&&this.crossOriginIframeMap.delete(i),this.iframes.delete(r),this.disposeLoadListeners(r),this.removePageHideListener(r);var s=this.attachedDocuments.get(r);s&&(s.forEach(t=>{rn(()=>this.mirror.removeNodeFromMap(t))}),rn(()=>rs(r,s)),this.attachedDocuments.delete(r))}e&&this.attachedIframes.delete(t)}cleanupDetachedIframes(){if(0!==this.attachedIframes.size){var t=[];this.attachedIframes.forEach((e,r)=>{this.mirror.has(r)||t.push(r)}),t.forEach(t=>this.removeIframeById(t))}}reattachIframes(){this.attachedIframes.forEach((t,e)=>{var r=t.content;this.mirror.has(e)?this.mutationCb({adds:[{parentId:e,nextId:null,node:r}],removes:[],texts:[],attributes:[],isAttachIframe:!0}):this.attachedIframes.delete(e)})}destroy(){this.recordCrossOriginIframes&&en(window,"message",this.messageHandler),this.nestedIframeListeners.forEach((t,e)=>{en(e,"message",t)}),this.nestedIframeListeners.clear();var t=new Set;this.iframeElementsById.forEach(e=>t.add(e)),this.attachedIframes.forEach(e=>t.add(e.element)),t.forEach(t=>{this.disposeLoadListeners(t),this.removePageHideListener(t)}),this.crossOriginIframeMirror.reset(),this.crossOriginIframeStyleMirror.reset(),this.attachedIframes.clear(),this.crossOriginIframeMap=new WeakMap,this.iframes=new WeakMap,this.crossOriginIframeRootIdMap=new WeakMap,this.loadListenerDisposers=new WeakMap,this.pageHideHandlers=new WeakMap,this.attachedDocuments=new WeakMap,this.attachedWindows=new WeakMap,this.iframeElementsById=new Map}},vs=class{constructor(t){Ki(this,"shadowDoms",new WeakSet),Ki(this,"mutationCb",void 0),Ki(this,"scrollCb",void 0),Ki(this,"bypassOptions",void 0),Ki(this,"mirror",void 0),Ki(this,"restoreHandlers",[]),this.mutationCb=t.mutationCb,this.scrollCb=t.scrollCb,this.bypassOptions=t.bypassOptions,this.mirror=t.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(t,e){var r,i;if(nt(t)&&!this.shadowDoms.has(t)){this.shadowDoms.add(t);var n=null!==(r=null===(i=Ji.host(t))||void 0===i?void 0:i.ownerDocument)&&void 0!==r?r:e,s=ts(o({},this.bypassOptions,{doc:n,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),t),a=s.observer,h=s.buffer;this.restoreHandlers.push({doc:n,handler(){a.disconnect(),h.destroy(),h.releaseCanvasManager();var t=Kn.indexOf(h);-1!==t&&Kn.splice(t,1)}}),this.restoreHandlers.push({doc:n,handler:es(o({},this.bypassOptions,{scrollCb:this.scrollCb,doc:t,mirror:this.mirror}))}),setTimeout(()=>{t.adoptedStyleSheets&&t.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(t.adoptedStyleSheets,this.mirror.getId(Ji.host(t))),this.restoreHandlers.push({doc:n,handler:as({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},t)})},0)}}observeAttachShadow(t){t.contentWindow&&t.contentDocument&&this.patchAttachShadow(t.contentWindow.Element,t.contentDocument)}patchAttachShadow(t,e){var r=this;this.restoreHandlers.push({doc:e,handler:Zi(t.prototype,"attachShadow",function(t){return function(i){var n=t.call(this,i),s=Ji.shadowRoot(this);return s&&Nn(this)&&r.addShadowRoot(s,e),n}})})}reset(){this.restoreHandlers.forEach(t=>{var e=t.handler;try{e()}catch(t){}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}resetForDoc(t){var e=[];for(var r of this.restoreHandlers)if(r.doc===t)try{r.handler()}catch(t){}else e.push(r);this.restoreHandlers=e}},ds="skip-frame";function ps(t){if("object"!=typeof t||null===t)return!1;var e=t.y,r=t.width,i=t.height;return Number.isFinite(t.x)&&Number.isFinite(e)&&Number.isFinite(r)&&Number.isFinite(i)&&r>=0&&i>=0}for(var ms="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ys="undefined"==typeof Uint8Array?[]:new Uint8Array(256),gs=0;64>gs;gs++)ys[ms.charCodeAt(gs)]=gs;var ws=function(t){var e,r=new Uint8Array(t),i=r.length,n="";for(e=0;i>e;e+=3)n+=ms[r[e]>>2],n+=ms[(3&r[e])<<4|r[e+1]>>4],n+=ms[(15&r[e+1])<<2|r[e+2]>>6],n+=ms[63&r[e+2]];return i%3==2?n=n.substring(0,n.length-1)+"=":i%3==1&&(n=n.substring(0,n.length-2)+"=="),n},bs=new Map,Ss=(t,e,r)=>{if(t&&(Ms(t,e)||"object"==typeof t)){var i=function(t,e){var r=bs.get(t);return r||bs.set(t,r=new Map),r.has(e)||r.set(e,[]),r.get(e)}(r,t.constructor.name),n=i.indexOf(t);return-1===n&&(n=i.length,i.push(t)),n}};function ks(t,e,r,i){return t instanceof Array?t.map(t=>ks(t,e,r,i)):null===t?t: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?{rr_type:t.constructor.name,args:[Object.values(t)]}:t instanceof ArrayBuffer?{rr_type:t.constructor.name,base64:ws(t)}:t instanceof DataView?{rr_type:t.constructor.name,args:[ks(t.buffer,e,r,i),t.byteOffset,t.byteLength]}:t instanceof HTMLImageElement?{rr_type:t.constructor.name,src:t.src}:t instanceof HTMLCanvasElement?{rr_type:"HTMLImageElement",src:t.toDataURL(i.type,i.quality)}:t instanceof ImageData?{rr_type:t.constructor.name,args:[ks(t.data,e,r,i),t.width,t.height]}:Ms(t,e)||"object"==typeof t?{rr_type:t.constructor.name,index:Ss(t,e,r)}:t}var Cs=(t,e,r,i)=>t.map(t=>ks(t,e,r,i)),Ms=(t,e)=>{var r=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(t=>"function"==typeof e[t]);return Boolean(r.find(r=>t instanceof e[r]))},xs=["webgl","webgl2"];function As(t){return"nodeType"in t}function Es(t,e,r,i){var n=[];try{if(i){var s=function(t,e,r){var i=t.GPUCanvasContext;if((null==i?void 0:i.prototype)&&"function"==typeof i.prototype.configure)return Zi(i.prototype,"configure",function(i){return function(n){var s=function(t){var e=t.canvas;return e&&"object"==typeof e?e:null}(this);if(!s||As(s)&&dn(s,e,r,!0))return i.call(this,n);As(s)&&!("__context"in s)&&(s.__context="webgpu");var a=function(t){var e=t.GPUTextureUsage;return e?e.COPY_SRC|e.RENDER_ATTACHMENT:null}(t);return i.call(this,null!==a&&n?o({},n,{usage:"number"==typeof n.usage?n.usage|a:a}):n)}})}(t,e,r);s&&n.push(s)}var a=Zi(t.HTMLCanvasElement.prototype,"getContext",function(t){return function(n){for(var s=function(t){return"experimental-webgl"===t?"webgl":t}(n),o=arguments.length,a=new Array(o>1?o-1:0),h=1;o>h;h++)a[h-1]=arguments[h];if(!dn(this,e,r,!0)&&("__context"in this||(this.__context=s),i&&xs.includes(s)))if(a[0]&&"object"==typeof a[0]){var u=a[0];u.preserveDrawingBuffer||(u.preserveDrawingBuffer=!0)}else a.splice(0,1,{preserveDrawingBuffer:!0});return t.apply(this,[n,...a])}});n.push(a)}catch(t){console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{n.forEach(t=>t())}}function Rs(t,e,r,i,n,s,o){var a=[],h=Object.getOwnPropertyNames(t),u=function(h){if(["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(h))return 0;try{if("function"!=typeof t[h])return 0;var u=Zi(t,h,function(t){return function(){for(var a=arguments.length,u=new Array(a),l=0;a>l;l++)u[l]=arguments[l];var f=t.apply(this,u);if(Ss(f,s,this),this.canvas&&"tagName"in this.canvas&&!dn(this.canvas,i,n,!0)){var c={type:e,property:h,args:Cs(u,s,this,o)};r(this.canvas,c)}return f}});a.push(u)}catch(s){var l=hn(t,h,{set(t){this.canvas&&"tagName"in this.canvas&&!dn(this.canvas,i,n,!0)&&r(this.canvas,{type:e,property:h,args:[t],setter:!0})}});a.push(l)}};for(var l of h)u(l);return a}var Is='(function() {\n\t//#region ../../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/base64-arraybuffer/1.0.2/f63fa6b5c318cf1c9f6bdd1d4292ad2f15f76f2ec78475025a2d44070e896fe9/node_modules/base64-arraybuffer/dist/base64-arraybuffer.es5.js\n\tvar chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";\n\tvar lookup = typeof Uint8Array === "undefined" ? [] : /* @__PURE__ */ new Uint8Array(256);\n\tfor (var i = 0; i < chars.length; i++) lookup[chars.charCodeAt(i)] = i;\n\tvar encode = function(arraybuffer) {\n\t\tvar bytes = new Uint8Array(arraybuffer), i, len = bytes.length, base64 = "";\n\t\tfor (i = 0; i < len; i += 3) {\n\t\t\tbase64 += chars[bytes[i] >> 2];\n\t\t\tbase64 += chars[(bytes[i] & 3) << 4 | bytes[i + 1] >> 4];\n\t\t\tbase64 += chars[(bytes[i + 1] & 15) << 2 | bytes[i + 2] >> 6];\n\t\t\tbase64 += chars[bytes[i + 2] & 63];\n\t\t}\n\t\tif (len % 3 === 2) base64 = base64.substring(0, base64.length - 1) + "=";\n\t\telse if (len % 3 === 1) base64 = base64.substring(0, base64.length - 2) + "==";\n\t\treturn base64;\n\t};\n\t//#endregion\n\t//#region src/record/workers/image-bitmap-data-url-worker.ts\n\tconst lastFingerprintMap = /* @__PURE__ */ new Map();\n\tconst transparentFingerprintMap = /* @__PURE__ */ new Map();\n\tconst lastSentAtMap = /* @__PURE__ */ new Map();\n\tconst PROVIDER_KEYFRAME_INTERVAL_MS = 3e4;\n\tfunction hashPixels(data) {\n\t\tconst view = new Uint32Array(data.buffer, data.byteOffset, data.byteLength >>> 2);\n\t\tlet primaryHash = 2166136261;\n\t\tlet secondaryHash = 2654435769;\n\t\tfor (let i = 0; i < view.length; i++) {\n\t\t\tprimaryHash ^= view[i];\n\t\t\tprimaryHash = Math.imul(primaryHash, 16777619);\n\t\t\tsecondaryHash ^= view[i];\n\t\t\tsecondaryHash = Math.imul(secondaryHash, 2246822507);\n\t\t}\n\t\treturn `${(primaryHash >>> 0).toString(16)}:${(secondaryHash >>> 0).toString(16)}`;\n\t}\n\tfunction frameFingerprint(width, height, data) {\n\t\treturn `${width}x${height}:${hashPixels(data)}`;\n\t}\n\tfunction transparentFingerprint(width, height) {\n\t\tconst pixelCount = width * height;\n\t\tlet hash = transparentFingerprintMap.get(pixelCount);\n\t\tif (hash === void 0) {\n\t\t\thash = hashPixels(new Uint8ClampedArray(pixelCount * 4));\n\t\t\ttransparentFingerprintMap.set(pixelCount, hash);\n\t\t}\n\t\treturn `${width}x${height}:${hash}`;\n\t}\n\tconst worker = self;\n\tlet reusableCanvas = null;\n\tlet reusableCtx = null;\n\tworker.onmessage = async function(e) {\n\t\tif ("resetFrameDedup" in e.data) {\n\t\t\tlastFingerprintMap.clear();\n\t\t\treturn;\n\t\t}\n\t\tif ("OffscreenCanvas" in globalThis) {\n\t\t\tconst { id, bitmap, width, height, displayWidth, displayHeight, dataURLOptions, maskRegions } = e.data;\n\t\t\ttry {\n\t\t\t\tif (!reusableCanvas || reusableCanvas.width !== width || reusableCanvas.height !== height) {\n\t\t\t\t\treusableCanvas = new OffscreenCanvas(width, height);\n\t\t\t\t\treusableCtx = reusableCanvas.getContext("2d", { willReadFrequently: true });\n\t\t\t\t}\n\t\t\t\tconst ctx = reusableCtx;\n\t\t\t\tctx.clearRect(0, 0, width, height);\n\t\t\t\tctx.drawImage(bitmap, 0, 0);\n\t\t\t\tbitmap.close();\n\t\t\t\tif (maskRegions) {\n\t\t\t\t\tctx.fillStyle = "black";\n\t\t\t\t\tfor (const region of maskRegions) ctx.fillRect(region.x, region.y, region.width, region.height);\n\t\t\t\t}\n\t\t\t\tconst fingerprint = frameFingerprint(width, height, ctx.getImageData(0, 0, width, height).data);\n\t\t\t\tif (fingerprint === (lastFingerprintMap.get(id) ?? transparentFingerprint(width, height))) {\n\t\t\t\t\tconst lastSentAt = lastSentAtMap.get(id);\n\t\t\t\t\tif (!(maskRegions !== void 0 && lastSentAt !== void 0 && Date.now() - lastSentAt >= PROVIDER_KEYFRAME_INTERVAL_MS)) return worker.postMessage({ id });\n\t\t\t\t}\n\t\t\t\tconst blob = await reusableCanvas.convertToBlob(dataURLOptions);\n\t\t\t\tconst arrayBuffer = await blob.arrayBuffer();\n\t\t\t\tworker.postMessage({\n\t\t\t\t\tid,\n\t\t\t\t\ttype: blob.type,\n\t\t\t\t\tbase64: encode(arrayBuffer),\n\t\t\t\t\tdisplayWidth,\n\t\t\t\t\tdisplayHeight\n\t\t\t\t});\n\t\t\t\tlastFingerprintMap.set(id, fingerprint);\n\t\t\t\tlastSentAtMap.set(id, Date.now());\n\t\t\t} catch {\n\t\t\t\tworker.postMessage({ id });\n\t\t\t}\n\t\t} else {\n\t\t\te.data.bitmap.close();\n\t\t\treturn worker.postMessage({ id: e.data.id });\n\t\t}\n\t};\n\t//#endregion\n})();\n',Ts="undefined"!=typeof self&&self.Blob&&new Blob(["(self.URL || self.webkitURL).revokeObjectURL(self.location.href);",Is],{type:"text/javascript;charset=utf-8"});function Os(t){var e;try{if(!(e=Ts&&(self.URL||self.webkitURL).createObjectURL(Ts)))throw"";var r=new Worker(e,{name:null==t?void 0:t.name});return r.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(e)}),r}catch(e){return new Worker("data:text/javascript;charset=utf-8,"+encodeURIComponent(Is),{name:null==t?void 0:t.name})}}var Ds,Ns,_s,Ls=class{onFullSnapshot(){var t;null===(t=this.resetFrameDedup)||void 0===t||t.call(this)}acquire(){this.refCount+=1}reset(){this.refCount>0&&(this.refCount-=1),this.refCount>0||this.teardown()}teardown(){this.torndown||(this.torndown=!0,this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers(),null!==this.rafIdTimestamp&&(cancelAnimationFrame(this.rafIdTimestamp),this.rafIdTimestamp=null),null!==this.rafIdFlush&&(cancelAnimationFrame(this.rafIdFlush),this.rafIdFlush=null))}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}constructor(t){Ki(this,"pendingCanvasMutations",new Map),Ki(this,"rafStamps",{latestId:0,invokeId:null}),Ki(this,"mirror",void 0),Ki(this,"mutationCb",void 0),Ki(this,"resetObservers",void 0),Ki(this,"frozen",!1),Ki(this,"locked",!1),Ki(this,"rafIdTimestamp",null),Ki(this,"rafIdFlush",null),Ki(this,"refCount",0),Ki(this,"torndown",!1),Ki(this,"resetFrameDedup",null),Ki(this,"processMutation",(t,e)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(t)||this.pendingCanvasMutations.set(t,[]),this.pendingCanvasMutations.get(t).push(e)});var e=t.sampling,r=void 0===e?"all":e,i=t.win,n=t.blockClass,s=t.blockSelector,o=t.recordCanvas,a=t.dataURLOptions,h=t.resolutionScale,u=t.canvasMasking;this.mutationCb=t.mutationCb,this.mirror=t.mirror,o&&"all"===r&&this.initCanvasMutationObserver(i,n,s,a),o&&"number"==typeof r&&this.initCanvasFPSObserver(r,i,n,s,{dataURLOptions:a,resolutionScale:h,canvasMasking:u})}initCanvasFPSObserver(t,e,r,i,s){var o=this;if("OffscreenCanvas"in e){var a,h="number"==typeof s.resolutionScale&&Number.isFinite(s.resolutionScale)?Math.min(1,Math.max(.1,s.resolutionScale)):1,u=Es(e,r,i,!0),l=new Map;try{a=new Os}catch(t){return}var f=!1;a.onerror=()=>{var t;f=!0,cancelAnimationFrame(c),null===(t=a.terminate)||void 0===t||t.call(a),this.resetFrameDedup=null},this.resetFrameDedup=()=>{a.postMessage({resetFrameDedup:!0})},a.onmessage=t=>{var e=t.data.id;if(l.set(e,!1),"base64"in t.data){var r=t.data,i=r.displayWidth,n=r.displayHeight;this.mutationCb({id:e,type:jn["2D"],commands:[{property:"clearRect",args:[0,0,i,n]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:r.base64}],type:r.type}]},0,0,i,n]}],displayWidth:i,displayHeight:n})}};var c,v=1e3/t,d=0,p=t=>{var u,m;f||(d&&v>t-d||(d=t,(u=[],m=t=>{try{t.querySelectorAll("canvas").forEach(t=>{dn(t,r,i,!0)||u.push(t)}),t.querySelectorAll("*").forEach(t=>{t.shadowRoot&&m(t.shadowRoot)})}catch(t){}},m(e.document),u).forEach(function(){var t=n(function*(t){var e=o.mirror.getId(t);if(!l.get(e)&&0!==t.width&&0!==t.height){l.set(e,!0);try{if(["webgl","webgl2"].includes(t.__context)){var r,i,n=t.getContext(t.__context);if(null==n||null===(r=n.isContextLost)||void 0===r?void 0:r.call(n))return void l.set(e,!1);!1===(null==n||null===(i=n.getContextAttributes())||void 0===i?void 0:i.preserveDrawingBuffer)&&n.clear(n.COLOR_BUFFER_BIT)}var u=t.clientWidth||t.width,f=t.clientHeight||t.height,c=Math.max(1,Math.round(u*h)),v=Math.max(1,Math.round(f*h)),d=function(t,e,r,i,n,s){if(t&&"function"==typeof t.regionsFn){var o;try{o=t.regionsFn(e)}catch(t){return ds}if(void 0!==o){if(!Array.isArray(o)||!o.every(ps))return ds;var a=r/n,h=i/s;return o.filter(t=>t.width>0&&t.height>0).map(t=>{var e=Math.floor(t.x*a),r=Math.floor(t.y*h);return{x:e,y:r,width:Math.ceil((t.x+t.width)*a)-e,height:Math.ceil((t.y+t.height)*h)-r}})}}}(s.canvasMasking,t,c,v,u,f);if("skip-frame"===d)return void l.set(e,!1);var p=yield createImageBitmap(t,1>h?{resizeWidth:c,resizeHeight:v,resizeQuality:"medium"}:{resizeWidth:c,resizeHeight:v});a.postMessage({id:e,bitmap:p,width:c,height:v,displayWidth:u,displayHeight:f,dataURLOptions:s.dataURLOptions,maskRegions:d},[p])}catch(t){l.set(e,!1)}}});return function(e){return t.apply(this,arguments)}}())),c=requestAnimationFrame(p))};c=requestAnimationFrame(p),this.resetObservers=()=>{var t;u(),cancelAnimationFrame(c),null===(t=a.terminate)||void 0===t||t.call(a),this.resetFrameDedup=null}}}initCanvasMutationObserver(t,e,r,i){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();var n=Es(t,e,r,!1),s=function(t,e,r,i,n){var s=[],o=Object.getOwnPropertyNames(e.CanvasRenderingContext2D.prototype),a=function(o){try{if("function"!=typeof e.CanvasRenderingContext2D.prototype[o])return 1;var a=Zi(e.CanvasRenderingContext2D.prototype,o,function(s){return function(){for(var a=arguments.length,h=new Array(a),u=0;a>u;u++)h[u]=arguments[u];return dn(this.canvas,r,i,!0)||setTimeout(()=>{var r=Cs(h,e,this,n);t(this.canvas,{type:jn["2D"],property:o,args:r})},0),s.apply(this,h)}});s.push(a)}catch(n){var h=hn(e.CanvasRenderingContext2D.prototype,o,{set(e){dn(this.canvas,r,i,!0)||t(this.canvas,{type:jn["2D"],property:o,args:[e],setter:!0})}});s.push(h)}};for(var h of o)if(a(h))continue;return()=>{s.forEach(t=>t())}}(this.processMutation.bind(this),t,e,r,i),o=function(t,e,r,i,n){var s=[];return void 0!==e.WebGLRenderingContext&&s.push(...Rs(e.WebGLRenderingContext.prototype,jn.WebGL,t,r,i,e,n)),void 0!==e.WebGL2RenderingContext&&s.push(...Rs(e.WebGL2RenderingContext.prototype,jn.WebGL2,t,r,i,e,n)),()=>{s.forEach(t=>t())}}(this.processMutation.bind(this),t,e,r,i);this.resetObservers=()=>{n(),s(),o()}}startPendingCanvasMutationFlusher(){this.rafIdFlush=requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){var t=e=>{this.rafStamps.latestId=e,this.rafIdTimestamp=requestAnimationFrame(t)};this.rafIdTimestamp=requestAnimationFrame(t)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((t,e)=>{var r=this.mirror.getId(e);this.flushPendingCanvasMutationFor(e,r)}),this.rafIdFlush=requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(t,e){if(!this.frozen&&!this.locked){var i=this.pendingCanvasMutations.get(t);if(i&&-1!==e){var n=i.map(t=>s(t,r));this.mutationCb({id:e,type:i[0].type,commands:n}),this.pendingCanvasMutations.delete(t)}}}},Fs=class{constructor(t){var e;Ki(this,"trackedLinkElements",new WeakSet),Ki(this,"pendingDeferredSheets",new Set),Ki(this,"mutationCb",void 0),Ki(this,"adoptedStyleSheetCb",void 0),Ki(this,"maskAllElementAttributes",void 0),Ki(this,"maskAttributeFn",void 0),Ki(this,"styleMirror",new In),this.mutationCb=t.mutationCb,this.adoptedStyleSheetCb=t.adoptedStyleSheetCb,this.maskAllElementAttributes=null!==(e=t.maskAllElementAttributes)&&void 0!==e&&e,this.maskAttributeFn=t.maskAttributeFn}attachLinkElement(t,e){"_cssText"in e.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:e.id,attributes:e.attributes}]}),this.trackLinkElement(t)}beginDeferredLinkInlining(t,e){if(-1===e||!t.isConnected)return null;var r=null,i=null;try{(i=t.sheet)&&(r=pt(i))}catch(t){}if(!r||!i)return q(),null;var n=r,s=!1,o={sheet:i,invalidate(){s=!0}};this.pendingDeferredSheets.add(o);var a=!1;return{advance:r=>{if(a)return!0;var h,u,l=S(),f=x(),c=!0;try{if(s)return a=!0,q(),!0;if(!n.advance(r))return c=!1,!1;a=!0;var v=n.text();if(!t.isConnected)return!0;var d=null;try{d=t.sheet}catch(t){}return d!==i?(q(),!0):v?(this.emitCssTextMutation(t,e,v),!0):(q(),!0)}finally{c&&this.pendingDeferredSheets.delete(o),E(h=S()-l,null!=(u=f)?u:k)||(B.totalMs+=h,h>B.slowestSliceMs&&(B.slowestSliceMs=h))}},remainingRules:()=>n.remainingRules(),discard:()=>{this.pendingDeferredSheets.delete(o)}}}onCssomSheetMutation(t){if(t&&0!==this.pendingDeferredSheets.size)for(var e of this.pendingDeferredSheets)e.sheet===t&&(this.pendingDeferredSheets.delete(e),e.invalidate())}inlineDeferredLinkElement(t,e){var r;null===(r=this.beginDeferredLinkInlining(t,e))||void 0===r||r.advance(1/0)}emitCssTextMutation(t,e,r){this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:e,attributes:{_cssText:St({element:t,name:"_cssText",value:r,maskAllElementAttributes:this.maskAllElementAttributes,maskAttributeFn:this.maskAttributeFn})}}]})}trackLinkElement(t){this.trackedLinkElements.has(t)||(this.trackedLinkElements.add(t),this.trackStylesheetInLinkElement(t))}adoptStyleSheets(t,e){var r=this;if(0!==t.length){var i={id:e,styleIds:[]},n=[],s=function(t){var e;if(r.styleMirror.has(t))e=r.styleMirror.getId(t);else{var s=r.styleMirror.add(t);e=s;var o=S();try{z(()=>{try{var e=t.rules||t.cssRules;e&&G(e)}catch(t){}n.push({styleId:s,rules:Array.from(t.rules||CSSRule,(e,r)=>({rule:ut(e,t.href),index:r}))})})}finally{V(S()-o)}}i.styleIds.push(e)};for(var o of t)s(o);n.length>0&&(i.styles=n),this.adoptedStyleSheetCb(i)}}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet,this.pendingDeferredSheets.clear(),ze.forEach(t=>t.abort()),ze.clear()}trackStylesheetInLinkElement(t){}},Ps=class{constructor(){Ki(this,"nodeMap",new WeakMap),Ki(this,"active",!1)}inOtherBuffer(t,e){var r=this.nodeMap.get(t);return r&&Array.from(r).some(t=>t!==e)}add(t,e){this.active||(this.active=!0,requestAnimationFrame(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(t,(this.nodeMap.get(t)||new Set).add(e))}destroy(){}},Bs=!1;try{if(2!==Array.from([1],t=>2*t)[0]){var js,Us=document.createElement("iframe");document.body.appendChild(Us),Array.from=(null===(js=Us.contentWindow)||void 0===js?void 0:js.Array.from)||Array.from,document.body.removeChild(Us)}}catch(t){console.debug("Unable to override Array.from",t)}var Ws=yt(),Hs=new Set([Fn.Mutation,Fn.MediaInteraction,Fn.StyleSheetRule,Fn.CanvasMutation,Fn.Font,Fn.Log,Fn.StyleDeclaration,Fn.AdoptedStyleSheet]);function Gs(t){var e=window;if("function"==typeof e.requestIdleCallback){var r=e.requestIdleCallback(t,{timeout:2e3});return{cancel(){var t;return null===(t=e.cancelIdleCallback)||void 0===t?void 0:t.call(e,r)}}}var i=setTimeout(t,250);return{cancel:()=>clearTimeout(i)}}function zs(t){var e;void 0===t&&(t={});var r=t,i=r.emit,n=r.checkoutEveryNms,s=r.checkoutEveryNth,a=r.blockClass,h=void 0===a?"rr-block":a,u=r.blockSelector,l=void 0===u?null:u,f=r.ignoreClass,c=void 0===f?"rr-ignore":f,v=r.ignoreSelector,d=void 0===v?null:v,p=r.maskTextClass,m=void 0===p?"rr-mask":p,y=r.maskTextSelector,g=void 0===y?null:y,w=r.inlineStylesheet,b=void 0===w||w,S=r.inlineStylesheetBudgetRules,k=r.maskAllInputs,C=r.maskInputOptions,x=r.slimDOMOptions,A=r.maskInputFn,E=r.maskTextFn,R=r.maskAllElementAttributes,I=void 0!==R&&R,T=r.maskAttributeFn,O=r.hooks,D=r.packFn,N=r.sampling,L=void 0===N?{}:N,F=r.dataURLOptions,P=void 0===F?{}:F,B=r.canvasResolutionScale,W=r.canvasMasking,H=r.mousemoveWait,G=r.recordDOM,z=void 0===G||G,V=r.recordCanvas,Y=void 0!==V&&V,q=r.recordCrossOriginIframes,J=void 0!==q&&q,X=r.recordAfter,K=void 0===X?"DOMContentLoaded"===t.recordAfter?t.recordAfter:"load":X,Q=r.userTriggeredOnInput,tt=void 0!==Q&&Q,et=r.collectFonts,rt=void 0!==et&&et,it=r.inlineImages,nt=void 0!==it&&it,st=r.plugins,ot=r.keepIframeSrcFn,at=void 0===ot?()=>!1:ot,ht=r.ignoreCSSAttributes,ut=void 0===ht?new Set([]):ht,lt=r.attributeFilter;zn=r.errorHandler;var ft=o({type:"image/webp",quality:.4,maxBase64ImageLength:1048576},P),ct=!J||window.parent===window,vt=!1;if(!ct)try{window.parent.document&&(vt=!1)}catch(t){vt=!0}if(ct&&!i)throw new Error("emit function is required");if(!ct&&!vt)return()=>{};void 0!==H&&void 0===L.mousemove&&(L.mousemove=H),Ws.reset();var dt,pt=!0===k?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:void 0!==C?C:{password:!0},yt=Ke(void 0!==x&&x);wn();var gt,wt,bt=0,St=new Map,kt=t=>{for(var e of st||[])e.eventProcessor&&(t=e.eventProcessor(t));return D&&!vt&&(t=D(t)),t};Ds=(t,e)=>{var r,o=t;if(o.timestamp=un(),!(null===(r=Kn[0])||void 0===r?void 0:r.isFrozen())||o.type===_n.FullSnapshot||o.type===_n.IncrementalSnapshot&&Hs.has(o.data.source)||Kn.forEach(t=>t.unfreeze()),ct)null==i||i(kt(o),e);else if(vt){var a={type:"rrweb",event:kt(o),origin:window.location.origin,isCheckout:e};window.parent.postMessage(a,"*")}if(o.type===_n.FullSnapshot)dt=o,bt=0;else if(o.type===_n.IncrementalSnapshot){if(o.data.source===Fn.Mutation&&o.data.isAttachIframe)return;bt++,(s&&bt>=s||n&&o.timestamp-dt.timestamp>n)&&Ns(!0)}};var Ct=t=>{if(t.removes&&t.removes.length>0){var e=t.adds.length>0?new Set(t.adds.map(t=>t.node.id)):null,r=new Set;if(t.adds.length>0)for(var i of t.adds){var n=Ws.getNode(i.node.id);n&&"IFRAME"===n.nodeName&&r.add(n)}t.removes.forEach(t=>{var i=t.id;if(!e||!e.has(i)){var n=Et.getIframeElementById(i);n&&r.has(n)?Et.forgetIframeId(i):(null==gt||gt(i),Et.removeIframeById(i))}}),null==wt||wt(),Et.cleanupDetachedIframes()}Ds({type:_n.IncrementalSnapshot,data:o({source:Fn.Mutation},t)})},Mt=t=>Ds({type:_n.IncrementalSnapshot,data:o({source:Fn.Scroll},t)}),xt=t=>Ds({type:_n.IncrementalSnapshot,data:o({source:Fn.CanvasMutation},t)}),At=new Fs({mutationCb:Ct,adoptedStyleSheetCb:t=>Ds({type:_n.IncrementalSnapshot,data:o({source:Fn.AdoptedStyleSheet},t)}),maskAllElementAttributes:I,maskAttributeFn:T}),Et=new cs({mirror:Ws,mutationCb:Ct,stylesheetManager:At,recordCrossOriginIframes:J,wrappedEmit:Ds});for(var Rt of st||[])Rt.getMirror&&Rt.getMirror({nodeMirror:Ws,crossOriginIframeMirror:Et.crossOriginIframeMirror,crossOriginIframeStyleMirror:Et.crossOriginIframeStyleMirror});var It=new Ps,Tt=null==W?void 0:W.configured;_s=new Ls({recordCanvas:Y,mutationCb:xt,win:window,blockClass:h,blockSelector:l,mirror:Ws,sampling:L.canvas,dataURLOptions:ft,resolutionScale:B,canvasMasking:W});var Ot=new vs({mutationCb:Ct,scrollCb:Mt,bypassOptions:{blockClass:h,blockSelector:l,maskTextClass:m,maskTextSelector:g,inlineStylesheet:b,maskInputOptions:pt,dataURLOptions:ft,maskTextFn:E,maskInputFn:A,maskAllElementAttributes:I,maskAttributeFn:T,recordCanvas:Y,canvasMaskingConfigured:Tt,inlineImages:nt,sampling:L,slimDOMOptions:yt,iframeManager:Et,stylesheetManager:At,canvasManager:_s,keepIframeSrcFn:at,processedNodeManager:It,attributeFilter:lt},mirror:Ws});Ns=function(t){if(void 0===t&&(t=!1),z){j(S);try{Ds({type:_n.Meta,data:{href:window.location.href,width:cn(),height:fn()}},t),null==e||e.cancel(),e=void 0,At.reset(),Ot.init(),Kn.forEach(t=>t.lock());var r,i=null;try{i=function(t,e){var r=e||{},i=r.mirror,n=void 0===i?new mt:i,s=r.blockClass,o=void 0===s?"rr-block":s,a=r.blockSelector,h=void 0===a?null:a,u=r.maskTextClass,l=void 0===u?"rr-mask":u,f=r.maskTextSelector,c=void 0===f?null:f,v=r.inlineStylesheet,d=void 0===v||v,p=r.inlineImages,m=void 0!==p&&p,y=r.recordCanvas,g=void 0!==y&&y,w=r.canvasMaskingConfigured,b=r.maskAllInputs,S=void 0!==b&&b,k=r.maskTextFn,C=r.maskInputFn,M=r.maskAllElementAttributes,x=void 0!==M&&M,A=r.maskAttributeFn,E=r.slimDOM,R=r.dataURLOptions,I=r.preserveWhiteSpace,T=r.onSerialize,O=r.onIframeLoad,D=r.iframeLoadTimeout,N=r.onIframeListenerRegistered,_=r.onStylesheetLoad,L=r.stylesheetLoadTimeout,F=r.keepIframeSrcFn,P=void 0===F?()=>!1:F,B=r.maxDepth,W=r.inlineStylesheetBudgetRules,H=!0===S?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:!1===S?{password:!0}:S,G=Ke(void 0!==E&&E);j(W);try{return Xe(t,{doc:t,mirror:n,blockClass:o,blockSelector:h,maskTextClass:l,maskTextSelector:c,skipChild:!1,inlineStylesheet:d,maskInputOptions:H,maskTextFn:k,maskInputFn:C,maskAllElementAttributes:x,maskAttributeFn:A,slimDOMOptions:G,dataURLOptions:R,inlineImages:m,recordCanvas:g,canvasMaskingConfigured:w,preserveWhiteSpace:I,onSerialize:T,onIframeLoad:O,iframeLoadTimeout:D,onIframeListenerRegistered:N,onStylesheetLoad:_,stylesheetLoadTimeout:L,keepIframeSrcFn:P,newlyAddedElement:!1,maxDepth:B})}finally{U()}}(document,{mirror:Ws,blockClass:h,blockSelector:l,maskTextClass:m,maskTextSelector:g,inlineStylesheet:b,maskAllInputs:pt,inlineStylesheetBudgetRules:S,maskTextFn:E,maskInputFn:A,maskAllElementAttributes:I,maskAttributeFn:T,slimDOM:yt,dataURLOptions:ft,recordCanvas:Y,canvasMaskingConfigured:Tt,inlineImages:nt,onSerialize(t){kn(t,Ws)&&Et.addIframe(t),Cn(t,Ws)&&At.trackLinkElement(t),xn(t)&&Ot.addShadowRoot(Ji.shadowRoot(t),document)},onIframeLoad(t,e){Et.attachIframe(t,e),Ot.observeAttachShadow(t)},onIframeListenerRegistered(t,e){Et.registerLoadListenerDisposer(t,e)},onStylesheetLoad(t,e){At.attachLinkElement(t,e)},keepIframeSrcFn:at})}finally{s=_,_=[],r=s}if(!i)return console.warn("Failed to snapshot the document");if(Ds({type:_n.FullSnapshot,data:{node:i,initialOffset:ln(window)}},t),Kn.forEach(t=>t.unlock()),_s.onFullSnapshot(),r.length){var n=function(t,e,r){var i=!1,n=null,s=0,o=null,a=()=>null!==o||t.length>s,h=()=>{var r=t[s];t[s]=null,s+=1,r&&rn(()=>{o=e.beginDeferredLinkInlining(r,Ws.getId(r))})},u=()=>{if(o){var t=o,e=!0;rn(()=>{e=t.advance(200)}),e&&(o=null)}},l=()=>{o||h(),u()},f=t=>{if(n=null,!i){var e=0;do{try{l()}catch(t){null==o||o.discard(),o=null,Z(1)}e+=1}while(!i&&a()&&(t?!t.didTimeout&&t.timeRemaining()>5:10>e));i||(a()?n=Gs(f):r())}};return n=Gs(f),{cancel(){i=!0,null==o||o.discard(),o=null,null==n||n.cancel(),n=null},flush(){if(!i){i=!0,null==n||n.cancel(),n=null;for(var e=0,l=0;a()&&50>e;){o||h();var f=o;if(f)if(Math.floor(f.remainingRules()/200)+1>50-e)f.discard(),o=null,l+=1;else{try{u()}catch(t){null==o||o.discard(),o=null,l+=1}e+=1}}if(a()||l>0){for(var c=l+(null!==o?1:0),v=s;t.length>v;v++)null!==t[v]&&(c+=1);Z(c),null==o||o.discard(),o=null}r()}}}}(r,At,()=>{e===n&&(e=void 0)});e=n}J&&Et.reattachIframes(),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&At.adoptStyleSheets(document.adoptedStyleSheets,Ws.getId(document))}finally{U()}var s}};try{var Dt=[];for(var Nt of(Dt.push(tn("pagehide",()=>{try{null==e||e.flush()}catch(t){}e=void 0},window)),["visibilitychange","freeze","resume"]))Dt.push(tn(Nt,M,document));gt=t=>{var e=St.get(t);e&&(e.forEach(t=>{rn(t);var e=Dt.indexOf(t);-1!==e&&Dt.splice(e,1)}),St.delete(t))},wt=()=>{for(var t of St){var e=t[0],r=Ws.getNode(e);if(r)try{r.contentDocument&&r.contentDocument.defaultView||null==gt||gt(e)}catch(t){null==gt||gt(e)}else null==gt||gt(e)}};var _t=t=>{var e;return Xn(hs)({mutationCb:Ct,mousemoveCb:(t,e)=>Ds({type:_n.IncrementalSnapshot,data:{source:e,positions:t}}),mouseInteractionCb:t=>Ds({type:_n.IncrementalSnapshot,data:o({source:Fn.MouseInteraction},t)}),scrollCb:Mt,viewportResizeCb:t=>Ds({type:_n.IncrementalSnapshot,data:o({source:Fn.ViewportResize},t)}),inputCb:t=>Ds({type:_n.IncrementalSnapshot,data:o({source:Fn.Input},t)}),mediaInteractionCb:t=>Ds({type:_n.IncrementalSnapshot,data:o({source:Fn.MediaInteraction},t)}),styleSheetRuleCb:t=>Ds({type:_n.IncrementalSnapshot,data:o({source:Fn.StyleSheetRule},t)}),styleDeclarationCb:t=>Ds({type:_n.IncrementalSnapshot,data:o({source:Fn.StyleDeclaration},t)}),canvasMutationCb:xt,fontCb:t=>Ds({type:_n.IncrementalSnapshot,data:o({source:Fn.Font},t)}),selectionCb(t){Ds({type:_n.IncrementalSnapshot,data:o({source:Fn.Selection},t)})},customElementCb(t){Ds({type:_n.IncrementalSnapshot,data:o({source:Fn.CustomElement},t)})},blockClass:h,ignoreClass:c,ignoreSelector:d,maskTextClass:m,maskTextSelector:g,maskInputOptions:pt,inlineStylesheet:b,sampling:L,recordDOM:z,recordCanvas:Y,canvasMaskingConfigured:Tt,inlineImages:nt,userTriggeredOnInput:tt,collectFonts:rt,doc:t,maskInputFn:A,maskTextFn:E,maskAllElementAttributes:I,maskAttributeFn:T,keepIframeSrcFn:at,blockSelector:l,slimDOMOptions:yt,dataURLOptions:ft,mirror:Ws,iframeManager:Et,stylesheetManager:At,shadowDomManager:Ot,processedNodeManager:It,canvasManager:_s,ignoreCSSAttributes:ut,attributeFilter:lt,plugins:(null==st||null===(e=st.filter(t=>t.observer))||void 0===e?void 0:e.map(t=>({observer:t.observer,options:t.options,callback:e=>Ds({type:_n.Plugin,data:{plugin:t.name,payload:e}})})))||[]},O)};Et.addLoadListener(t=>{try{var e=Ws.getId(t),r=_t(t.contentDocument);if("function"==typeof r&&(Dt.push(r),-1!==e)){var i=St.get(e);i||St.set(e,i=new Set),i.add(r)}}catch(t){console.warn(t)}}),Et.addPageHideListener(t=>{var e=Ws.getId(t);null==gt||gt(e),rs(t)});var Lt=-1,Ft=t=>Ds({type:_n.Custom,data:{tag:Ln,payload:t}}),Pt=()=>{var t,e,r,i,n=document,s=null!==(t=null!==(e=null!==(r=null!==(i=n.fullscreenElement)&&void 0!==i?i:n.webkitFullscreenElement)&&void 0!==r?r:n.mozFullScreenElement)&&void 0!==e?e:n.msFullscreenElement)&&void 0!==t?t:null,o=s?Ws.getId(s):-1;o!==Lt&&(-1!==Lt&&Ft({id:Lt,enter:!1}),Lt=o,-1!==o&&Ft({id:o,enter:!0}))},Bt=()=>{Ns();var t=_t(document);"function"==typeof t&&Dt.push(t),Dt.push(tn("fullscreenchange",Pt)),Dt.push(tn("webkitfullscreenchange",Pt)),Dt.push(tn("mozfullscreenchange",Pt)),Dt.push(tn("MSFullscreenChange",Pt)),Bs=!0};return["interactive","complete"].includes(document.readyState)?Bt():(Dt.push(tn("DOMContentLoaded",()=>{Ds({type:_n.DomContentLoaded,data:{}}),"DOMContentLoaded"===K&&Bt()})),Dt.push(tn("load",()=>{Ds({type:_n.Load,data:{}}),"load"===K&&Bt()},window))),()=>{try{null==e||e.flush()}catch(t){}e=void 0,nn(Dt),It.destroy(),Et.removeLoadListener(),Et.destroy(),St.clear(),Ot.reset(),Ws.reset(),Bs=!1,zn=void 0}}catch(t){console.warn(t)}}zs.addCustomEvent=(t,e)=>{if(!Bs)throw new Error("please add custom event after start recording");Ds({type:_n.Custom,data:{tag:t,payload:e}})},zs.freezePage=()=>{Kn.forEach(t=>t.freeze())},zs.takeFullSnapshot=t=>{if(!Bs)throw new Error("please take full snapshot after start recording");Ns(t)},zs.mirror=Ws;var Vs=h({default:()=>$s});function $s(t){return{all:t=t||new Map,on(e,r){var i=t.get(e);i?i.push(r):t.set(e,[r])},off(e,r){var i=t.get(e);i&&(r?i.splice(i.indexOf(r)>>>0,1):t.set(e,[]))},emit(e,r){var i=t.get(e);i&&i.slice().map(function(t){t(r)}),(i=t.get("*"))&&i.slice().map(function(t){t(e,r)})}}}function Ys(t,e){if(void 0===t&&(t=window),void 0===e&&(e=document),!("scrollBehavior"in e.documentElement.style)||!0===t.__forceSmoothScrollPolyfill__){var r,i=t.HTMLElement||t.Element,n={scroll:t.scroll||t.scrollTo,scrollBy:t.scrollBy,elementScroll:i.prototype.scroll||a,scrollIntoView:i.prototype.scrollIntoView},s=t.performance&&t.performance.now?t.performance.now.bind(t.performance):Date.now,o=(r=t.navigator.userAgent,new RegExp(["MSIE ","Trident/","Edge/"].join("|")).test(r)?1:0);t.scroll=t.scrollTo=function(){void 0!==arguments[0]&&(!0!==h(arguments[0])?v.call(t,e.body,void 0!==arguments[0].left?~~arguments[0].left:t.scrollX||t.pageXOffset,void 0!==arguments[0].top?~~arguments[0].top:t.scrollY||t.pageYOffset):n.scroll.call(t,void 0!==arguments[0].left?arguments[0].left:"object"!=typeof arguments[0]?arguments[0]:t.scrollX||t.pageXOffset,void 0!==arguments[0].top?arguments[0].top:void 0!==arguments[1]?arguments[1]:t.scrollY||t.pageYOffset))},t.scrollBy=function(){void 0!==arguments[0]&&(h(arguments[0])?n.scrollBy.call(t,void 0!==arguments[0].left?arguments[0].left:"object"!=typeof arguments[0]?arguments[0]:0,void 0!==arguments[0].top?arguments[0].top:void 0!==arguments[1]?arguments[1]:0):v.call(t,e.body,~~arguments[0].left+(t.scrollX||t.pageXOffset),~~arguments[0].top+(t.scrollY||t.pageYOffset)))},i.prototype.scroll=i.prototype.scrollTo=function(){if(void 0!==arguments[0])if(!0!==h(arguments[0])){var t=arguments[0].left,e=arguments[0].top;v.call(this,this,void 0===t?this.scrollLeft:~~t,void 0===e?this.scrollTop:~~e)}else{if("number"==typeof arguments[0]&&void 0===arguments[1])throw new SyntaxError("Value could not be converted");n.elementScroll.call(this,void 0!==arguments[0].left?~~arguments[0].left:"object"!=typeof arguments[0]?~~arguments[0]:this.scrollLeft,void 0!==arguments[0].top?~~arguments[0].top:void 0!==arguments[1]?~~arguments[1]:this.scrollTop)}},i.prototype.scrollBy=function(){void 0!==arguments[0]&&(!0!==h(arguments[0])?this.scroll({left:~~arguments[0].left+this.scrollLeft,top:~~arguments[0].top+this.scrollTop,behavior:arguments[0].behavior}):n.elementScroll.call(this,void 0!==arguments[0].left?~~arguments[0].left+this.scrollLeft:~~arguments[0]+this.scrollLeft,void 0!==arguments[0].top?~~arguments[0].top+this.scrollTop:~~arguments[1]+this.scrollTop))},i.prototype.scrollIntoView=function(){if(!0!==h(arguments[0])){var r=function(t){for(;t!==e.body&&!1===f(t);)t=t.parentNode||t.host;return t}(this),i=r.getBoundingClientRect(),s=this.getBoundingClientRect();r!==e.body?(v.call(this,r,r.scrollLeft+s.left-i.left,r.scrollTop+s.top-i.top),"fixed"!==t.getComputedStyle(r).position&&t.scrollBy({left:i.left,top:i.top,behavior:"smooth"})):t.scrollBy({left:s.left,top:s.top,behavior:"smooth"})}else n.scrollIntoView.call(this,void 0===arguments[0]||arguments[0])}}function a(t,e){this.scrollLeft=t,this.scrollTop=e}function h(t){if(null===t||"object"!=typeof t||void 0===t.behavior||"auto"===t.behavior||"instant"===t.behavior)return!0;if("object"==typeof t&&"smooth"===t.behavior)return!1;throw new TypeError("behavior member of ScrollOptions "+t.behavior+" is not a valid value for enumeration ScrollBehavior.")}function u(t,e){return"Y"===e?t.scrollHeight>t.clientHeight+o:"X"===e?t.scrollWidth>t.clientWidth+o:void 0}function l(e,r){var i=t.getComputedStyle(e,null)["overflow"+r];return"auto"===i||"scroll"===i}function f(t){var e=u(t,"Y")&&l(t,"Y"),r=u(t,"X")&&l(t,"X");return e||r}function c(e){var r,i,n,o=(s()-e.startTime)/468;o=o>1?1:o,r=.5*(1-Math.cos(Math.PI*o)),e.method.call(e.scrollable,i=e.startX+(e.x-e.startX)*r,n=e.startY+(e.y-e.startY)*r),i===e.x&&n===e.y||t.requestAnimationFrame(c.bind(t,e))}function v(r,i,o){var h,u,l,f,v=s();r===e.body?(h=t,u=t.scrollX||t.pageXOffset,l=t.scrollY||t.pageYOffset,f=n.scroll):(h=r,u=r.scrollLeft,l=r.scrollTop,f=a),c({scrollable:h,method:f,startTime:v,startX:u,startY:l,x:i,y:o})}}var qs,Zs=class{constructor(t,e){void 0===t&&(t=[]),Ki(this,"timeOffset",0),Ki(this,"speed",void 0),Ki(this,"actions",void 0),Ki(this,"raf",null),Ki(this,"lastTimestamp",void 0),this.actions=t,this.speed=e.speed}addAction(t){var e=!0===this.raf;if(this.actions.length&&this.actions[this.actions.length-1].delay>t.delay){var r=this.findActionIndex(t);this.actions.splice(r,0,t)}else this.actions.push(t);e&&(this.raf=requestAnimationFrame(this.rafCheck.bind(this)))}start(){this.timeOffset=0,this.lastTimestamp=performance.now(),this.raf=requestAnimationFrame(this.rafCheck.bind(this))}rafCheck(){var t=performance.now();for(this.timeOffset+=(t-this.lastTimestamp)*this.speed,this.lastTimestamp=t;this.actions.length;){var e=this.actions[0];if(e.delay>this.timeOffset)break;this.actions.shift(),e.doAction()}this.raf=0>=this.actions.length||requestAnimationFrame(this.rafCheck.bind(this))}clear(){this.raf&&(!0!==this.raf&&cancelAnimationFrame(this.raf),this.raf=null),this.actions.length=0}setSpeed(t){this.speed=t}isActive(){return null!==this.raf}findActionIndex(t){for(var e=0,r=this.actions.length-1;r>=e;){var i=Math.floor((e+r)/2);if(t.delay>this.actions[i].delay)e=i+1;else{if(t.delay>=this.actions[i].delay)return i+1;r=i-1}}return e}};function Js(t){var e=null==t?void 0:t.timeOffset;return"number"!=typeof e||Number.isNaN(e)?void 0:e}function Xs(t){var e=t.positions;if(Array.isArray(e)&&e.length)return Js(e[0])}function Ks(t,e){if(t.type===_n.IncrementalSnapshot&&t.data.source===Fn.MouseMove){var r=Xs(t.data);if(void 0!==r){var i=t.timestamp+r;return t.delay=i-e,i-e}}return t.delay=t.timestamp-e,t.delay}function Qs(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var i,n,s=r.call(t),o=[];try{for(;(void 0===e||e-- >0)&&!(i=s.next()).done;)o.push(i.value)}catch(t){n={error:t}}finally{try{i&&!i.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}return o}!function(t){t[t.NotStarted=0]="NotStarted",t[t.Running=1]="Running",t[t.Stopped=2]="Stopped"}(qs||(qs={}));var to={type:"xstate.init"};function eo(t){return void 0===t?[]:[].concat(t)}function ro(t){return{type:"xstate.assign",assignment:t}}function io(t,e){return"string"==typeof(t="string"==typeof t&&e&&e[t]?e[t]:t)?{type:t}:"function"==typeof t?{type:t.name,exec:t}:t}function no(t){return function(e){return t===e}}function so(t){return"string"==typeof t?{type:t}:t}function oo(t,e){return{value:t,context:e,actions:[],changed:!1,matches:no(t)}}function ao(t,e,r){var i=e,n=!1;return[t.filter(function(t){if("xstate.assign"===t.type){n=!0;var e=Object.assign({},i);return"function"==typeof t.assignment?e=t.assignment(i,r):Object.keys(t.assignment).forEach(function(n){e[n]="function"==typeof t.assignment[n]?t.assignment[n](i,r):t.assignment[n]}),i=e,!1}return!0}),i,n]}function ho(t,e){void 0===e&&(e={});var r=Qs(ao(eo(t.states[t.initial].entry).map(function(t){return io(t,e.actions)}),t.context,to),2),i={config:t,it:e,initialState:{value:t.initial,actions:r[0],context:r[1],matches:no(t.initial)},transition(e,r){var n,s,o="string"==typeof e?{value:e,context:t.context}:e,a=o.value,h=o.context,u=so(r),l=t.states[a];if(l.on){var f=eo(l.on[u.type]);try{for(var c=function(t){var e="function"==typeof Symbol&&t[Symbol.iterator],r=0;return e?e.call(t):{next:()=>(t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t})}}(f),v=c.next();!v.done;v=c.next()){var d=v.value;if(void 0===d)return oo(a,h);var p="string"==typeof d?{target:d}:d,m=p.target,y=void 0===m?a:m,g=p.actions,w=void 0===g?[]:g,b=p.cond;if((void 0===b?function(){return!0}:b)(h,u)){var S=Qs(ao([].concat(l.exit,w,t.states[y].entry).filter(function(t){return t}).map(function(t){return io(t,i.it.actions)}),h,u),3),k=S[0];return{value:y,context:S[1],actions:k,changed:y!==a||k.length>0||S[2],matches:no(y)}}}}catch(t){n={error:t}}finally{try{v&&!v.done&&(s=c.return)&&s.call(c)}finally{if(n)throw n.error}}}return oo(a,h)}};return i}var uo=function(t,e){return t.actions.forEach(function(r){var i=r.exec;return i&&i(t.context,e)})};function lo(t){var e=t.initialState,r=qs.NotStarted,i=new Set,n={l:t,send(n){r===qs.Running&&(e=t.transition(e,n),uo(e,so(n)),i.forEach(function(t){return t(e)}))},subscribe:t=>(i.add(t),t(e),{unsubscribe:()=>i.delete(t)}),start(i){if(i){var s="object"==typeof i?i:{context:t.config.context,value:i};e={value:s.value,actions:[],context:s.context,matches:no(s.value)}}return r=qs.Running,uo(e,to),n},stop:()=>(r=qs.Stopped,i.clear(),n),get state(){return e},get status(){return r}};return n}function fo(t,e){for(var r=t.length-1;r>=0;r--){var i=t[r];if(i.type===_n.Meta&&e>=i.timestamp)return t.slice(r)}return t}var co=new Map;function vo(t,e){var r=co.get(t);return r||co.set(t,r=new Map),r.has(e)||r.set(e,[]),r.get(e)}function po(t,e,r){return function(){var i=n(function*(i){if(i&&"object"==typeof i&&"rr_type"in i){if(r&&(r.isUnchanged=!1),"ImageBitmap"===i.rr_type&&"args"in i){var n=yield po(t,e,r)(i.args);return yield createImageBitmap.apply(null,n)}if("index"in i){if(r||null===e)return i;var s=i.index;return vo(e,i.rr_type)[s]}if("args"in i){var o=i.args;return new(0,window[i.rr_type])(...yield Promise.all(o.map(po(t,e,r))))}if("base64"in i)return function(t){var e,r,i,n,s,o=.75*t.length,a=t.length,h=0;"="===t[t.length-1]&&(o--,"="===t[t.length-2]&&o--);var u=new ArrayBuffer(o),l=new Uint8Array(u);for(e=0;a>e;e+=4)r=ys[t.charCodeAt(e)],i=ys[t.charCodeAt(e+1)],n=ys[t.charCodeAt(e+2)],s=ys[t.charCodeAt(e+3)],l[h++]=r<<2|i>>4,l[h++]=(15&i)<<4|n>>2,l[h++]=(3&n)<<6|63&s;return u}(i.base64);if("src"in i){var a=t.get(i.src);if(a)return a;var h=new Image;return h.src=i.src,t.set(i.src,h),h}if("data"in i&&"Blob"===i.rr_type){var u=yield Promise.all(i.data.map(po(t,e,r)));return new Blob(u,{type:i.type})}}else if(Array.isArray(i))return yield Promise.all(i.map(po(t,e,r)));return i});return function(t){return i.apply(this,arguments)}}()}var mo=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject"];function yo(t){return go.apply(this,arguments)}function go(){return go=n(function*(t){var e=t.mutation,r=t.target,i=t.type,n=t.imageMap,s=t.errorHandler;try{var o=function(t,e){try{return e===jn.WebGL?t.getContext("webgl")||t.getContext("experimental-webgl"):t.getContext("webgl2")}catch(t){return null}}(r,i);if(!o)return;if(e.setter)return void(o[e.property]=e.args[0]);var a=o[e.property],h=yield Promise.all(e.args.map(po(n,o)));!function(t,e){if(null==e?void 0:e.constructor){var r=e.constructor.name;if(mo.includes(r)){var i=vo(t,r);i.includes(e)||i.push(e)}}}(o,a.apply(o,h))}catch(t){s(e,t)}}),go.apply(this,arguments)}function wo(){return wo=n(function*(t){var e=t.event,r=t.mutations,i=t.imageMap,s=t.errorHandler,o=t.target.getContext("2d");if(o){var a=r.map(function(){var t=n(function*(t){return Promise.all(t.args.map(po(i,o)))});return function(e){return t.apply(this,arguments)}}());(yield Promise.all(a)).forEach((t,n)=>{var a=r[n];try{if(a.setter)return void(o[a.property]=a.args[0]);var h=o[a.property];"drawImage"===a.property&&"string"==typeof a.args[0]?(i.get(e),h.apply(o,a.args)):h.apply(o,t)}catch(t){s(a,t)}})}else s(r[0],new Error("Canvas context is null"))}),wo.apply(this,arguments)}function bo(t){return So.apply(this,arguments)}function So(){return So=n(function*(t){var e=t.event,r=t.mutation,i=t.target,n=t.imageMap,s=t.canvasEventMap,o=t.errorHandler;try{var a=s.get(e)||r,h="commands"in a?a.commands:[a];if([jn.WebGL,jn.WebGL2].includes(r.type)){for(var u=0;h.length>u;u++){var l=h[u];yield yo({mutation:l,type:r.type,target:i,imageMap:n,errorHandler:o})}return}yield function(t){return wo.apply(this,arguments)}({event:e,mutations:h,target:i,imageMap:n,errorHandler:o})}catch(t){o(r,t)}}),So.apply(this,arguments)}var ko=["AUDIO","VIDEO"],Co=class{constructor(t){Ki(this,"mediaMap",new Map),Ki(this,"warn",void 0),Ki(this,"service",void 0),Ki(this,"speedService",void 0),Ki(this,"emitter",void 0),Ki(this,"getCurrentTime",void 0),Ki(this,"metadataCallbackMap",new Map),this.warn=t.warn,this.service=t.service,this.speedService=t.speedService,this.emitter=t.emitter,this.getCurrentTime=t.getCurrentTime,this.emitter.on(Wn.Start,this.start.bind(this)),this.emitter.on(Wn.SkipStart,this.start.bind(this)),this.emitter.on(Wn.Pause,this.pause.bind(this)),this.emitter.on(Wn.Finish,this.pause.bind(this)),this.speedService.subscribe(()=>{this.syncAllMediaElements()})}syncAllMediaElements(t){void 0===t&&(t={pause:!1}),this.mediaMap.forEach((e,r)=>{this.syncTargetWithState(r),t.pause&&r.pause()})}start(){this.syncAllMediaElements()}pause(){this.syncAllMediaElements({pause:!0})}seekTo(t){var e=t.target,r=t.mediaState;if(r.isPlaying){var i=(t.time-r.lastInteractionTimeOffset)/1e3*r.playbackRate,n="duration"in e&&e.duration;if(Number.isNaN(n))return void this.waitForMetadata(e);var s=r.currentTimeAtLastInteraction+i;e.loop&&!1!==n&&(s%=n),e.currentTime=s}else e.pause(),e.currentTime=r.currentTimeAtLastInteraction}waitForMetadata(t){if(!this.metadataCallbackMap.has(t)&&"addEventListener"in t){var e=()=>{this.metadataCallbackMap.delete(t);var e=this.mediaMap.get(t);e&&this.seekTo({time:this.getCurrentTime(),target:t,mediaState:e})};this.metadataCallbackMap.set(t,e),t.addEventListener("loadedmetadata",e,{once:!0})}}getMediaStateFromMutation(t){var e,r,i,n,s,o=t.target,a=t.timeOffset,h=t.mutation,u=this.mediaMap.get(o),l=h.type,f=h.playbackRate,c=h.currentTime,v=h.muted,d=h.volume,p=h.loop;return{isPlaying:l===Un.Play||l!==Un.Pause&&((null==u?void 0:u.isPlaying)||null!==o.getAttribute("autoplay")),currentTimeAtLastInteraction:null!==(e=null!=c?c:null==u?void 0:u.currentTimeAtLastInteraction)&&void 0!==e?e:0,lastInteractionTimeOffset:a,playbackRate:null!==(r=null!=f?f:null==u?void 0:u.playbackRate)&&void 0!==r?r:1,volume:null!==(i=null!=d?d:null==u?void 0:u.volume)&&void 0!==i?i:1,muted:null!==(n=null!=v?v:null==u?void 0:u.muted)&&void 0!==n?n:null===o.getAttribute("muted"),loop:null!==(s=null!=p?p:null==u?void 0:u.loop)&&void 0!==s?s:null===o.getAttribute("loop")}}syncTargetWithState(t){var e=this.mediaMap.get(t);if(e){var r=e.muted,i=e.loop,n=e.volume,s=e.isPlaying,o=this.service.state.matches("paused"),a=e.playbackRate*this.speedService.state.context.timer.speed;try{this.seekTo({time:this.getCurrentTime(),target:t,mediaState:e}),t.volume!==n&&(t.volume=n),t.muted=r,t.loop=i,t.playbackRate!==a&&(t.playbackRate=a),s&&!o?t.play():t.pause()}catch(t){this.warn("Failed to replay media interactions: "+(t.message||t))}}}addMediaElements(t,e,r){if(this.isSupportedMediaElement(t)){var i=t,n=r.getMeta(i);if(n&&"attributes"in n){var s,o=this.service.state.matches("paused"),a=n.attributes;(s=a.rr_mediaState?"played"===a.rr_mediaState:null!==i.getAttribute("autoplay"))&&o&&i.pause();var h=1;"number"==typeof a.rr_mediaPlaybackRate&&(h=a.rr_mediaPlaybackRate);var u;u="boolean"==typeof a.rr_mediaMuted?a.rr_mediaMuted:null!==i.getAttribute("muted");var l;l="boolean"==typeof a.rr_mediaLoop?a.rr_mediaLoop:null!==i.getAttribute("loop");var f=1;"number"==typeof a.rr_mediaVolume&&(f=a.rr_mediaVolume);var c=0;"number"==typeof a.rr_mediaCurrentTime&&(c=a.rr_mediaCurrentTime),this.mediaMap.set(i,{isPlaying:s,currentTimeAtLastInteraction:c,lastInteractionTimeOffset:e,playbackRate:h,volume:f,muted:u,loop:l}),this.syncTargetWithState(i)}}}mediaMutation(t){var e=t.target,r=t.timeOffset,i=t.mutation;ko.includes(e.nodeName)&&(this.mediaMap.set(e,this.getMediaStateFromMutation({target:e,timeOffset:r,mutation:i})),this.syncTargetWithState(e))}isSupportedMediaElement(t){return ko.includes(t.nodeName)}reset(){this.mediaMap.clear()}};function Mo(t,e){if(!("DIALOG"!==t.nodeName||t instanceof ei)){var r=t,i=r.open,n=i&&r.matches("dialog:modal"),s=r.getAttribute("rr_open_mode"),o="string"==typeof(null==e?void 0:e.attributes.open)||"string"==typeof r.getAttribute("open"),a="modal"===s;(!i||n&&"non-modal"===s||!n&&a)&&(r.isConnected?(i&&r.close(),o&&(a?r.showModal():r.show())):console.warn("dialog is not attached to the dom",r))}}var xo=$s||Vs,Ao="[replayer]",Eo={duration:500,lineCap:"round",lineWidth:3,strokeStyle:"red"};function Ro(t){return t.type==_n.IncrementalSnapshot&&(t.data.source==Fn.TouchMove||t.data.source==Fn.MouseInteraction&&t.data.type==Pn.TouchStart)}var Io=class{get timer(){return this.service.state.context.timer}constructor(t,e){var r=this;if(Ki(this,"wrapper",void 0),Ki(this,"iframe",void 0),Ki(this,"service",void 0),Ki(this,"speedService",void 0),Ki(this,"config",void 0),Ki(this,"usingVirtualDom",!1),Ki(this,"virtualDom",new Mi),Ki(this,"mouse",void 0),Ki(this,"mouseTail",null),Ki(this,"tailPositions",[]),Ki(this,"emitter",xo()),Ki(this,"nextUserInteractionEvent",void 0),Ki(this,"legacy_missingNodeRetryMap",{}),Ki(this,"cache",Ce()),Ki(this,"imageMap",new Map),Ki(this,"canvasEventMap",new Map),Ki(this,"mirror",yt()),Ki(this,"styleMirror",new In),Ki(this,"pendingAdoptedStyleSheets",new Map),Ki(this,"lastAdoptedStyleIds",new Map),Ki(this,"adoptedStyleSheetTokens",new Map),Ki(this,"mediaManager",void 0),Ki(this,"firstFullSnapshot",null),Ki(this,"newDocumentQueue",[]),Ki(this,"mousePos",null),Ki(this,"touchActive",null),Ki(this,"lastMouseDownEvent",null),Ki(this,"lastHoveredRootNode",void 0),Ki(this,"lastSelectionData",null),Ki(this,"lastScrollMap",new Map),Ki(this,"constructedStyleMutations",[]),Ki(this,"adoptedStyleSheets",[]),Ki(this,"emitterHandlers",[]),Ki(this,"serviceSubscription",void 0),Ki(this,"speedServiceSubscription",void 0),Ki(this,"timeouts",new Set),Ki(this,"applyGeneration",0),Ki(this,"seekRebuildInFlight",!1),Ki(this,"styleSheetLoadListeners",new Map),Ki(this,"handleResize",t=>{for(var e of(this.iframe.style.display="inherit",[this.mouseTail,this.iframe]))e&&(e.setAttribute("width",String(t.width)),e.setAttribute("height",String(t.height)))}),Ki(this,"shouldCastInSyncMode",t=>{switch(t.type){case _n.DomContentLoaded:case _n.Load:return!1;case _n.Custom:return t.data.tag===Ln;default:return!0}}),Ki(this,"applyEvents",(t,e)=>{var r,i=++this.applyGeneration;this.seekRebuildInFlight=!0,this.discardStaleFlushBuffers(),function(t){var e,r=t.events,i=t.castEvent,n=t.yieldBudgetMs,s=t.schedule,o=t.isCancelled,a=t.onComplete,h=null!==(e=t.now)&&void 0!==e?e:()=>performance.now(),u=0,l=t=>{if(t||!o()){var e=(()=>{for(var t=n>0?h()+n:1/0;r.length>u;){if(i(r[u]),u++,o())return!1;if(h()>=t)break}return u>=r.length})();o()||(e?a(t):s(()=>l(!1)))}};l(!0)}({events:t.filter(this.shouldCastInSyncMode),castEvent:t=>this.getCastFn(t,!0)(),yieldBudgetMs:null!==(r=this.config.seekYieldBudgetMs)&&void 0!==r?r:0,schedule:t=>{this.addTimeout(t,0)},isCancelled:()=>i!==this.applyGeneration,onComplete:t=>{this.seekRebuildInFlight=!1,this.emitter.emit(Wn.Flush),t||this.service.state.matches("playing")?e():this.service.state.matches("paused")&&(this.timer.clear(),this.timer.timeOffset=0)}})}),Ki(this,"getCastFn",function(t,e){var i;switch(void 0===e&&(e=!1),t.type){case _n.DomContentLoaded:case _n.Load:break;case _n.Custom:i=()=>{e||r.emitter.emit(Wn.CustomEvent,t),"rrweb/fullscreen"===t.data.tag&&r.applyFullscreen(t.data.payload)};break;case _n.Meta:i=()=>r.emitter.emit(Wn.Resize,{width:t.data.width,height:t.data.height});break;case _n.FullSnapshot:i=()=>{var i;if(r.clearFullscreen(),r.firstFullSnapshot){if(r.firstFullSnapshot===t)return void(r.firstFullSnapshot=!0)}else r.firstFullSnapshot=!0;r.mediaManager.reset(),r.styleMirror.reset(),r.pendingAdoptedStyleSheets.clear(),r.lastAdoptedStyleIds.clear(),r.adoptedStyleSheetTokens.clear(),r.rebuildFullSnapshot(t,e),null===(i=r.iframe.contentWindow)||void 0===i||i.scrollTo(o({},t.data.initialOffset,{behavior:"instant"}))};break;case _n.IncrementalSnapshot:i=()=>{if(r.applyIncremental(t,e),!e&&(t===r.nextUserInteractionEvent&&(r.nextUserInteractionEvent=null,r.backToNormal()),r.config.skipInactive&&!r.nextUserInteractionEvent)){for(var i of r.service.state.context.events)if(i.timestamp>t.timestamp&&r.isUserInteraction(i)){i.delay-t.delay>r.config.inactivePeriodThreshold*r.speedService.state.context.timer.speed&&(r.nextUserInteractionEvent=i);break}if(r.nextUserInteractionEvent){var n={speed:Math.min(Math.round((r.nextUserInteractionEvent.delay-t.delay)/5e3),r.config.maxSpeed)};r.speedService.send({type:"FAST_FORWARD",payload:n}),r.emitter.emit(Wn.SkipStart,n)}}}}return()=>{for(var n of(i&&i(),r.config.plugins||[]))n.handler&&n.handler(t,e,{replayer:r});r.service.send({type:"CAST_EVENT",payload:{event:t}});var s=r.service.state.context.events.length-1;if(!r.config.liveMode&&t===r.service.state.context.events[s]){var o=r.applyGeneration,a=()=>{o===r.applyGeneration&&(r.seekRebuildInFlight?r.addTimeout(a,50):r.service.state.context.events.length-1>s||(r.backToNormal(),r.service.send("END"),r.emitter.emit(Wn.Finish)))},h=50;if(t.type===_n.IncrementalSnapshot&&t.data.source===Fn.MouseMove){var u=Xs(t.data);void 0!==u&&(h+=Math.max(0,-u))}setTimeout(a,h)}r.emitter.emit(Wn.EventCast,t)}}),!(null==e?void 0:e.liveMode)&&2>t.length)throw new Error("Replayer need at least 2 events.");var i={speed:1,maxSpeed:360,root:document.body,loadTimeout:0,skipInactive:!1,inactivePeriodThreshold:1e4,showWarning:!0,showDebug:!1,blockClass:"rr-block",liveMode:!1,insertStyleRules:[],triggerFocus:!0,UNSAFE_replayCanvas:!1,pauseAnimation:!0,mouseTail:Eo,useVirtualDom:!0,seekYieldBudgetMs:0,logger:console};for(var n of(this.config=Object.assign({},i,e),this.handleResize=this.handleResize.bind(this),this.getCastFn=this.getCastFn.bind(this),this.applyEvents=this.applyEvents.bind(this),this.addEmitterHandler(Wn.Resize,this.handleResize),this.setupDom(),this.config.plugins||[]))n.getMirror&&n.getMirror({nodeMirror:this.mirror});this.addEmitterHandler(Wn.Flush,()=>{if(this.usingVirtualDom){var t={mirror:this.mirror,applyCanvas:(t,e,r)=>{bo({event:t,mutation:e,target:r,imageMap:this.imageMap,canvasEventMap:this.canvasEventMap,errorHandler:this.warnCanvasMutationFailed.bind(this)})},applyInput:this.applyInput.bind(this),applyScroll:this.applyScroll.bind(this),applyStyleSheetMutation:(t,e)=>{t.source===Fn.StyleSheetRule?this.applyStyleSheetRule(t,e):t.source===Fn.StyleDeclaration&&this.applyStyleDeclaration(t,e)},afterAppend:(t,e)=>{for(var r of this.config.plugins||[])r.onBuild&&r.onBuild(t,{id:e,replayer:this})}};if(this.iframe.contentDocument)try{gi(this.iframe.contentDocument,this.virtualDom,t,this.virtualDom.mirror)}catch(t){this.warn(t)}if(this.virtualDom.destroyTree(),this.usingVirtualDom=!1,Object.keys(this.legacy_missingNodeRetryMap).length)for(var e in this.legacy_missingNodeRetryMap)try{var r=this.legacy_missingNodeRetryMap[e],i=Si(r.node,this.mirror,this.virtualDom.mirror);gi(i,r.node,t,this.virtualDom.mirror),r.node=i}catch(t){this.warn(t)}this.constructedStyleMutations.forEach(t=>{this.applyStyleSheetMutation(t)}),this.constructedStyleMutations=[],this.adoptedStyleSheets.forEach(t=>{this.applyAdoptedStyleSheet(t)}),this.adoptedStyleSheets=[],this.pendingAdoptedStyleSheets.forEach((t,e)=>{this.applyAdoptedStyleSheet({source:Fn.AdoptedStyleSheet,id:e,styleIds:t})})}if(this.mousePos&&(this.moveAndHover(this.mousePos.x,this.mousePos.y,this.mousePos.id,!0,this.mousePos.debugData),this.mousePos=null),!0===this.touchActive?this.mouse.classList.add("touch-active"):!1===this.touchActive&&this.mouse.classList.remove("touch-active"),this.touchActive=null,this.lastMouseDownEvent){var n=this.lastMouseDownEvent;n[0].dispatchEvent(n[1])}this.lastMouseDownEvent=null,this.lastSelectionData&&(this.applySelection(this.lastSelectionData),this.lastSelectionData=null),this.lastScrollMap.size&&(this.lastScrollMap.forEach(t=>{this.applyScroll(t,!0)}),this.lastScrollMap.clear())}),this.addEmitterHandler(Wn.PlayBack,()=>{this.firstFullSnapshot=null,this.mirror.reset(),this.styleMirror.reset(),this.pendingAdoptedStyleSheets.clear(),this.lastAdoptedStyleIds.clear(),this.adoptedStyleSheetTokens.clear(),this.mediaManager.reset(),this.lastScrollMap.clear()});var s,a,h,u,l,f=new Zs([],{speed:this.config.speed});this.service=(s={events:t.map(t=>e&&e.unpackFn?e.unpackFn(t):t).sort((t,e)=>t.timestamp-e.timestamp),timer:f,timeOffset:0,baselineTime:0,lastPlayedEvent:null},h=(a={getCastFn:this.getCastFn,applyEvents:this.applyEvents,emitter:this.emitter}).getCastFn,u=a.applyEvents,l=a.emitter,lo(ho({id:"player",context:s,initial:"paused",states:{playing:{on:{PAUSE:{target:"paused",actions:["pause"]},CAST_EVENT:{target:"playing",actions:"castEvent"},END:{target:"paused",actions:["resetLastPlayedEvent","pause"]},RESET_LAST_PLAYED:{target:"playing",actions:["resetLastPlayedEvent"]},ADD_EVENT:{target:"playing",actions:["addEvent"]}}},paused:{on:{PLAY:{target:"playing",actions:["recordTimeOffset","play"]},RESET_LAST_PLAYED:{target:"paused",actions:["resetLastPlayedEvent"]},CAST_EVENT:{target:"paused",actions:"castEvent"},TO_LIVE:{target:"live",actions:["startLive"]},ADD_EVENT:{target:"paused",actions:["addEvent"]}}},live:{on:{ADD_EVENT:{target:"live",actions:["addEvent"]},CAST_EVENT:{target:"live",actions:["castEvent"]}}}}},{actions:{castEvent:ro({lastPlayedEvent:(t,e)=>"CAST_EVENT"===e.type?e.payload.event:t.lastPlayedEvent}),recordTimeOffset:ro((t,e)=>{var r=t.timeOffset;return"payload"in e&&"timeOffset"in e.payload&&(r=e.payload.timeOffset),o({},t,{timeOffset:r,baselineTime:t.events[0].timestamp+r})}),play(t){var e=t.timer,r=t.events,i=t.baselineTime,n=t.lastPlayedEvent;for(var s of(e.clear(),e.timeOffset=0,r))Ks(s,i);var o=fo(r,i),a=o.some(t=>t.type===_n.FullSnapshot&&t.timestamp===i),f=null==n?void 0:n.timestamp;if((null==n?void 0:n.type)===_n.IncrementalSnapshot&&n.data.source===Fn.MouseMove){var c=Xs(n.data);void 0!==c&&(f=n.timestamp+c)}(f||0)>i&&l.emit(Wn.PlayBack);var v=new Array;for(var d of o)(!f||f>=i||d.timestamp>f&&d!==n)&&(i>d.timestamp||a&&d.timestamp===i&&(d.type===_n.Meta||d.type===_n.FullSnapshot))&&v.push(d);u(v,()=>{var r=function(){if(i>s.timestamp||a&&s.timestamp===i&&(s.type===_n.Meta||s.type===_n.FullSnapshot))return 0;if(f&&i>f&&s===n)return 0;var t=h(s,!1);e.addAction({doAction(){t()},delay:s.delay})};for(var s of fo(t.events,i))r();e.start()})},pause(t){t.timer.clear()},resetLastPlayedEvent:ro(t=>o({},t,{lastPlayedEvent:null})),startLive:ro({baselineTime:(t,e)=>(t.timer.start(),"TO_LIVE"===e.type&&e.payload.baselineTime?e.payload.baselineTime:Date.now())}),addEvent:ro((t,e)=>{var r=t.baselineTime,i=t.timer,n=t.events;if("ADD_EVENT"===e.type){var s=e.payload.event;Ks(s,r);var a=n.length-1;if(n[a]&&n[a].timestamp>s.timestamp){for(var u=-1,l=0;a>=l;){var f=Math.floor((l+a)/2);n[f].timestamp>s.timestamp?a=f-1:l=f+1}-1===u&&(u=l),n.splice(u,0,s)}else n.push(s);if(r>s.timestamp)e.payload.applyPastEventSynchronously&&h(s,!0)();else if(i.isActive()){var c=h(s,!1);i.addAction({doAction(){c()},delay:s.delay})}}return o({},t,{events:n})})}}))),this.service.start(),this.serviceSubscription=this.service.subscribe(t=>{this.emitter.emit(Wn.StateChange,{player:t})}),this.speedService=function(t){return lo(ho({id:"speed",context:t,initial:"normal",states:{normal:{on:{FAST_FORWARD:{target:"skipping",actions:["recordSpeed","setSpeed"]},SET_SPEED:{target:"normal",actions:["setSpeed"]}}},skipping:{on:{BACK_TO_NORMAL:{target:"normal",actions:["restoreSpeed"]},SET_SPEED:{target:"normal",actions:["setSpeed"]}}}}},{actions:{setSpeed(t,e){"payload"in e&&t.timer.setSpeed(e.payload.speed)},recordSpeed:ro({normalSpeed(t){return t.timer.speed}}),restoreSpeed(t){t.timer.setSpeed(t.normalSpeed)}}}))}({normalSpeed:-1,timer:f}),this.speedService.start(),this.speedServiceSubscription=this.speedService.subscribe(t=>{this.emitter.emit(Wn.StateChange,{speed:t})}),this.mediaManager=new Co({warn:this.warn.bind(this),service:this.service,speedService:this.speedService,emitter:this.emitter,getCurrentTime:this.getCurrentTime.bind(this)});var c=this.service.state.context.events.find(t=>t.type===_n.Meta),v=this.service.state.context.events.find(t=>t.type===_n.FullSnapshot);if(c){var d=c.data,p=d.width,m=d.height;this.addTimeout(()=>{this.emitter.emit(Wn.Resize,{width:p,height:m})},0)}v&&this.addTimeout(()=>{var t;this.firstFullSnapshot||(this.firstFullSnapshot=v,this.rebuildFullSnapshot(v),null===(t=this.iframe.contentWindow)||void 0===t||t.scrollTo(o({},v.data.initialOffset,{behavior:"instant"})))},1),this.service.state.context.events.find(Ro)&&this.mouse.classList.add("touch-device")}on(t,e){return this.emitter.on(t,e),this}off(t,e){return this.emitter.off(t,e),this}addEmitterHandler(t,e){this.emitter.on(t,e),this.emitterHandlers.push({event:t,handler:e})}addTimeout(t,e){var r=setTimeout(()=>{this.timeouts.delete(r),t()},e);return this.timeouts.add(r),r}setConfig(t){Object.keys(t).forEach(e=>{this.config[e]=t[e]}),this.config.skipInactive||this.backToNormal(),void 0!==t.speed&&this.speedService.send({type:"SET_SPEED",payload:{speed:t.speed}}),void 0!==t.mouseTail&&(!1===t.mouseTail?this.mouseTail&&(this.mouseTail.style.display="none"):(this.mouseTail||(this.mouseTail=document.createElement("canvas"),this.mouseTail.width=Number.parseFloat(this.iframe.width),this.mouseTail.height=Number.parseFloat(this.iframe.height),this.mouseTail.classList.add("replayer-mouse-tail"),this.wrapper.insertBefore(this.mouseTail,this.iframe)),this.mouseTail.style.display="inherit"))}getMetaData(){var t=this.service.state.context.events[0],e=this.service.state.context.events[this.service.state.context.events.length-1];return{startTime:t.timestamp,endTime:e.timestamp,totalTime:e.timestamp-t.timestamp}}getCurrentTime(){return this.timer.timeOffset+this.getTimeOffset()}getTimeOffset(){var t=this.service.state.context;return t.baselineTime-t.events[0].timestamp}getMirror(){return this.mirror}play(t){var e;void 0===t&&(t=0),this.seekRebuildInFlight&&this.service.send({type:"RESET_LAST_PLAYED"}),this.service.state.matches("paused")||this.service.send({type:"PAUSE"}),this.service.send({type:"PLAY",payload:{timeOffset:t}}),null===(e=this.iframe.contentDocument)||void 0===e||null===(e=e.getElementsByTagName("html")[0])||void 0===e||e.classList.remove("rrweb-paused"),this.emitter.emit(Wn.Start)}pause(t){var e;void 0===t&&this.service.state.matches("playing")&&this.service.send({type:"PAUSE"}),"number"==typeof t&&(this.play(t),this.service.send({type:"PAUSE"})),null===(e=this.iframe.contentDocument)||void 0===e||null===(e=e.getElementsByTagName("html")[0])||void 0===e||e.classList.add("rrweb-paused"),this.emitter.emit(Wn.Pause)}resume(t){void 0===t&&(t=0),this.warn("The 'resume' was deprecated in 1.0. Please use 'play' method which has the same interface."),this.play(t),this.emitter.emit(Wn.Resume)}destroy(){var t,e;this.wrapper&&this.wrapper.parentNode&&(this.pause(),this.emitterHandlers.forEach(t=>{this.emitter.off(t.event,t.handler)}),this.emitterHandlers=[],null===(t=this.serviceSubscription)||void 0===t||t.unsubscribe(),null===(e=this.speedServiceSubscription)||void 0===e||e.unsubscribe(),this.serviceSubscription=void 0,this.speedServiceSubscription=void 0,this.service.stop(),this.speedService.stop(),this.timeouts.forEach(t=>clearTimeout(t)),this.timeouts.clear(),this.styleSheetLoadListeners.forEach((t,e)=>{e.removeEventListener("load",t)}),this.styleSheetLoadListeners.clear(),this.imageMap.clear(),this.canvasEventMap.clear(),this.mirror.reset(),this.styleMirror.reset(),this.pendingAdoptedStyleSheets.clear(),this.lastAdoptedStyleIds.clear(),this.adoptedStyleSheetTokens.clear(),this.mediaManager.reset(),this.resetCache(),this.config.root.removeChild(this.wrapper),this.emitter.emit(Wn.Destroy))}startLive(t){this.applyGeneration++,this.seekRebuildInFlight&&(this.seekRebuildInFlight=!1,this.emitter.emit(Wn.Flush),this.service.send({type:"RESET_LAST_PLAYED"}),this.service.state.matches("playing")&&this.service.send({type:"PAUSE"})),this.service.send({type:"TO_LIVE",payload:{baselineTime:t}})}addEvent(t){var e=this.config.unpackFn?this.config.unpackFn(t):t;Ro(e)&&this.mouse.classList.add("touch-device"),Promise.resolve().then(()=>this.service.send({type:"ADD_EVENT",payload:{event:e,applyPastEventSynchronously:this.config.liveMode}}))}enableInteract(){this.iframe.setAttribute("scrolling","auto"),this.iframe.style.pointerEvents="auto"}disableInteract(){this.iframe.setAttribute("scrolling","no"),this.iframe.style.pointerEvents="none"}resetCache(){this.cache=Ce()}setupDom(){this.wrapper=document.createElement("div"),this.wrapper.classList.add("replayer-wrapper"),this.config.root.appendChild(this.wrapper),this.mouse=document.createElement("div"),this.mouse.classList.add("replayer-mouse"),this.wrapper.appendChild(this.mouse),!1!==this.config.mouseTail&&(this.mouseTail=document.createElement("canvas"),this.mouseTail.classList.add("replayer-mouse-tail"),this.mouseTail.style.display="inherit",this.wrapper.appendChild(this.mouseTail)),this.iframe=document.createElement("iframe");var t=["allow-same-origin"];this.config.UNSAFE_replayCanvas&&t.push("allow-scripts"),this.iframe.style.display="none",this.iframe.setAttribute("sandbox",t.join(" ")),this.disableInteract(),this.wrapper.appendChild(this.iframe),this.iframe.contentWindow&&this.iframe.contentDocument&&(Ys(this.iframe.contentWindow,this.iframe.contentDocument),wn(this.iframe.contentWindow))}applyFullscreen(t){var e=t;if(e&&"number"==typeof e.id&&"boolean"==typeof e.enter){var r=this.mirror.getNode(e.id);if(r&&r.nodeType===Node.ELEMENT_NODE){var i=r;e.enter?i.setAttribute("rr_fullscreen",""):i.removeAttribute("rr_fullscreen")}}}clearFullscreen(){var t;null===(t=this.iframe.contentDocument)||void 0===t||t.querySelectorAll("[rr_fullscreen]").forEach(t=>t.removeAttribute("rr_fullscreen"))}discardStaleFlushBuffers(){this.lastScrollMap.clear(),this.mousePos=null,this.touchActive=null,this.lastMouseDownEvent=null,this.lastSelectionData=null,this.constructedStyleMutations=[],this.adoptedStyleSheets=[]}rebuildFullSnapshot(t,e){var r=this;if(void 0===e&&(e=!1),!this.iframe.contentDocument)return this.warn("Looks like your replayer has been destroyed.");Object.keys(this.legacy_missingNodeRetryMap).length&&this.warn("Found unresolved missing node map",this.legacy_missingNodeRetryMap),this.legacy_missingNodeRetryMap={};var i=[],n=new Set,s=(e,r)=>{for(var s of("DIALOG"===e.nodeName&&n.add(e),this.collectIframeAndAttachDocument(i,e),this.mediaManager.isSupportedMediaElement(e)&&this.mediaManager.addMediaElements(e,t.timestamp-this.service.state.context.events[0].timestamp,this.mirror),this.config.plugins||[]))s.onBuild&&s.onBuild(e,{id:r,replayer:this})};this.usingVirtualDom&&(this.virtualDom.destroyTree(),this.usingVirtualDom=!1),this.mirror.reset(),function(t,e){var r=e.doc,i=e.onVisit,n=e.hackCss,s=void 0===n||n,o=e.afterAppend,a=e.cache,h=e.mirror,l=void 0===h?new mt:h,f=Ee(t,{doc:r,mirror:l,skipChild:!1,hackCss:s,afterAppend:o,cache:a});(function(t,e){function r(t){e(t)}for(var i of t.getIds())t.has(i)&&r(t.getNode(i))})(l,t=>{i&&i(t),function(t,e){var r=e.getMeta(t);if((null==r?void 0:r.type)===u.Element){var i=t;for(var n in r.attributes)if({}.hasOwnProperty.call(r.attributes,n)&&n.startsWith("rr_")){var s=r.attributes[n];"rr_scrollLeft"===n&&(i.scrollLeft=s),"rr_scrollTop"===n&&(i.scrollTop=s)}}}(t,l)})}(t.data.node,{doc:this.iframe.contentDocument,afterAppend:s,cache:this.cache,mirror:this.mirror}),s(this.iframe.contentDocument,t.data.node.id);var o=function(){var t=a.mutationInQueue;r.attachDocumentToIframe(t,a.builtNode),r.newDocumentQueue=r.newDocumentQueue.filter(e=>e!==t)};for(var a of i)o();var h=this.iframe.contentDocument;this.insertStyleRules(h.documentElement,h.head),n.forEach(t=>Mo(t)),this.service.state.matches("playing")||this.iframe.contentDocument.getElementsByTagName("html")[0].classList.add("rrweb-paused"),this.emitter.emit(Wn.FullsnapshotRebuilded,t),e||this.waitForStylesheetLoad(),this.config.UNSAFE_replayCanvas&&this.preloadAllImages()}insertStyleRules(t,e){var r,i=(r=this.config.blockClass,["."+r+" { background: currentColor }","noscript { display: none !important; }","[rr_fullscreen] { position: fixed !important; inset: 0 !important; width: 100% !important; height: 100% !important; margin: 0 !important; max-width: none !important; max-height: none !important; z-index: 2147483647 !important; }"]).concat(this.config.insertStyleRules);if(this.config.pauseAnimation&&i.push("html.rrweb-paused *, html.rrweb-paused *:before, html.rrweb-paused *:after { animation-play-state: paused !important; }"),this.usingVirtualDom){var n=this.virtualDom.createElement("style");this.virtualDom.mirror.add(n,Pi(n,this.virtualDom.unserializedId)),t.insertBefore(n,e),n.rules.push({source:Fn.StyleSheetRule,adds:i.map((t,e)=>({rule:t,index:e}))})}else{var s=document.createElement("style");t.insertBefore(s,e);for(var o=0;i.length>o;o++){var a;null===(a=s.sheet)||void 0===a||a.insertRule(i[o],o)}}}attachDocumentToIframe(t,e){var r=this,i=this.usingVirtualDom?this.virtualDom.mirror:this.mirror,n=[],s=new Set,o=(t,r)=>{"DIALOG"===t.nodeName&&s.add(t),this.collectIframeAndAttachDocument(n,t);var o=i.getMeta(t);if((null==o?void 0:o.type)===Hn.Element&&"HTML"===(null==o?void 0:o.tagName.toUpperCase())){var a=e.contentDocument;this.insertStyleRules(a.documentElement,a.head)}if(!this.usingVirtualDom)for(var h of this.config.plugins||[])h.onBuild&&h.onBuild(t,{id:r,replayer:this})};Ee(t.node,{doc:e.contentDocument,mirror:i,hackCss:!0,skipChild:!1,afterAppend:o,cache:this.cache}),o(e.contentDocument,t.node.id);var a=function(){var t=h.mutationInQueue;r.attachDocumentToIframe(t,h.builtNode),r.newDocumentQueue=r.newDocumentQueue.filter(e=>e!==t)};for(var h of n)a();s.forEach(t=>Mo(t))}collectIframeAndAttachDocument(t,e){if(kn(e,this.mirror)){var r=this.newDocumentQueue.find(t=>t.parentId===this.mirror.getId(e));r&&t.push({mutationInQueue:r,builtNode:e})}}waitForStylesheetLoad(){var t,e=null===(t=this.iframe.contentDocument)||void 0===t?void 0:t.head;if(e){var r,i=new Set,n=this.service.state,s=()=>{n=this.service.state};this.emitter.on(Wn.Start,s),this.emitter.on(Wn.Pause,s);var o=()=>{this.emitter.off(Wn.Start,s),this.emitter.off(Wn.Pause,s)};e.querySelectorAll('link[rel="stylesheet"]').forEach(t=>{t.sheet||(i.add(t),t.addEventListener("load",()=>{i.delete(t),0===i.size&&-1!==r&&(n.matches("playing")&&this.play(this.getCurrentTime()),this.emitter.emit(Wn.LoadStylesheetEnd),r&&clearTimeout(r),o())}))}),i.size>0&&(this.service.send({type:"PAUSE"}),this.emitter.emit(Wn.LoadStylesheetStart),r=setTimeout(()=>{n.matches("playing")&&this.play(this.getCurrentTime()),r=-1,o()},this.config.loadTimeout))}}preloadAllImages(){var t=this;return n(function*(){var e=[],r=function*(r){r.type===_n.IncrementalSnapshot&&r.data.source===Fn.CanvasMutation&&(e.push(t.deserializeAndPreloadCanvasEvents(r.data,r)),("commands"in r.data?r.data.commands:[r.data]).forEach(e=>{t.preloadImages(e,r)}))};for(var i of t.service.state.context.events)yield*r(i);return Promise.all(e)})()}preloadImages(t,e){if("drawImage"===t.property&&"string"==typeof t.args[0]&&!this.imageMap.has(e)){var r=document.createElement("canvas"),i=r.getContext("2d"),n=null==i?void 0:i.createImageData(r.width,r.height);null==i||i.putImageData(n,0,0)}}deserializeAndPreloadCanvasEvents(t,e){var r=this;return n(function*(){if(!r.canvasEventMap.has(e)){var i={isUnchanged:!0};if("commands"in t){var s=yield Promise.all(t.commands.map(function(){var t=n(function*(t){var e=yield Promise.all(t.args.map(po(r.imageMap,null,i)));return o({},t,{args:e})});return function(e){return t.apply(this,arguments)}}()));!1===i.isUnchanged&&r.canvasEventMap.set(e,o({},t,{commands:s}))}else{var a=yield Promise.all(t.args.map(po(r.imageMap,null,i)));!1===i.isUnchanged&&r.canvasEventMap.set(e,o({},t,{args:a}))}}})()}applyIncremental(t,e){var r=t.data;switch(r.source){case Fn.Mutation:try{this.applyMutation(r,e)}catch(t){this.warn("Exception in mutation "+(t.message||t),r)}break;case Fn.Drag:case Fn.TouchMove:case Fn.MouseMove:if(!Array.isArray(r.positions)||!r.positions.length)break;if(e){var i=r.positions[r.positions.length-1];this.mousePos={x:i.x,y:i.y,id:i.id,debugData:r}}else{var n;r.positions.forEach(i=>{var n=Js(i);void 0!==n&&this.timer.addAction({doAction:()=>{this.moveAndHover(i.x,i.y,i.id,e,r)},delay:n+t.timestamp-this.service.state.context.baselineTime})}),this.timer.addAction({doAction(){},delay:t.delay-(null!==(n=Xs(r))&&void 0!==n?n:0)})}break;case Fn.MouseInteraction:if(-1===r.id)break;var s=new Event(wt(Pn[r.type])),o=this.mirror.getNode(r.id);if(!o)return this.debugNodeNotFound(r,r.id);this.emitter.emit(Wn.MouseInteraction,{type:r.type,target:o});var a=this.config.triggerFocus;switch(r.type){case Pn.Blur:"blur"in o&&o.blur();break;case Pn.Focus:a&&o.focus&&o.focus({preventScroll:!0});break;case Pn.Click:case Pn.TouchStart:case Pn.TouchEnd:case Pn.MouseDown:case Pn.MouseUp:e?(r.type===Pn.TouchStart?this.touchActive=!0:r.type===Pn.TouchEnd&&(this.touchActive=!1),r.type===Pn.MouseDown?this.lastMouseDownEvent=[o,s]:r.type===Pn.MouseUp&&(this.lastMouseDownEvent=null),this.mousePos={x:r.x||0,y:r.y||0,id:r.id,debugData:r}):(r.type===Pn.TouchStart&&(this.tailPositions.length=0),this.moveAndHover(r.x||0,r.y||0,r.id,e,r),r.type===Pn.Click?(this.mouse.classList.remove("active"),this.mouse.classList.add("active")):r.type===Pn.TouchStart?this.mouse.classList.add("touch-active"):r.type===Pn.TouchEnd?this.mouse.classList.remove("touch-active"):o.dispatchEvent(s));break;case Pn.TouchCancel:e?this.touchActive=!1:this.mouse.classList.remove("touch-active");break;default:o.dispatchEvent(s)}break;case Fn.Scroll:if(-1===r.id)break;if(e&&this.lastScrollMap.set(r.id,r),this.usingVirtualDom){var h=this.virtualDom.mirror.getNode(r.id);if(!h)return this.debugNodeNotFound(r,r.id);h.scrollData=r;break}this.applyScroll(r,e);break;case Fn.ViewportResize:this.emitter.emit(Wn.Resize,{width:r.width,height:r.height});break;case Fn.Input:if(-1===r.id)break;if(this.usingVirtualDom){var u=this.virtualDom.mirror.getNode(r.id);if(!u)return this.debugNodeNotFound(r,r.id);u.inputData=r;break}this.applyInput(r);break;case Fn.MediaInteraction:var l=this.usingVirtualDom?this.virtualDom.mirror.getNode(r.id):this.mirror.getNode(r.id);if(!l)return this.debugNodeNotFound(r,r.id);this.mediaManager.mediaMutation({target:l,timeOffset:t.timestamp-this.service.state.context.events[0].timestamp,mutation:r});break;case Fn.StyleSheetRule:case Fn.StyleDeclaration:var f;this.usingVirtualDom?r.styleId?this.constructedStyleMutations.push(r):r.id&&(null===(f=this.virtualDom.mirror.getNode(r.id))||void 0===f||f.rules.push(r)):this.applyStyleSheetMutation(r);break;case Fn.CanvasMutation:if(!this.config.UNSAFE_replayCanvas)return;if(this.usingVirtualDom){var c=this.virtualDom.mirror.getNode(r.id);if(!c)return this.debugNodeNotFound(r,r.id);c.canvasMutations.push({event:t,mutation:r})}else{var v=this.mirror.getNode(r.id);if(!v)return this.debugNodeNotFound(r,r.id);bo({event:t,mutation:r,target:v,imageMap:this.imageMap,canvasEventMap:this.canvasEventMap,errorHandler:this.warnCanvasMutationFailed.bind(this)})}break;case Fn.Font:try{var d,p=new FontFace(r.family,r.buffer?new Uint8Array(JSON.parse(r.fontSource)):r.fontSource,r.descriptors);null===(d=this.iframe.contentDocument)||void 0===d||d.fonts.add(p)}catch(t){this.warn(t)}break;case Fn.Selection:if(e){this.lastSelectionData=r;break}this.applySelection(r);break;case Fn.AdoptedStyleSheet:this.usingVirtualDom?this.adoptedStyleSheets.push(r):this.applyAdoptedStyleSheet(r)}}applyMutation(t,e){var r,i,n,s=this;if(this.config.useVirtualDom&&!this.usingVirtualDom&&e&&(this.usingVirtualDom=!0,r=this.iframe.contentDocument,n=this.virtualDom,void 0===(i=this.mirror)&&(i=new vr),void 0===n&&(n=new Mi),function t(e,r){var s=Li(e,n,i,r);if(null!==s)if("IFRAME"!==(null==r?void 0:r.nodeName)&&e.nodeType!==di.DOCUMENT_FRAGMENT_NODE&&(null==r||r.appendChild(s),s.parentNode=r,s.parentElement=r),"IFRAME"===e.nodeName){var o=e.contentDocument;o&&t(o,s)}else e.nodeType!==di.DOCUMENT_NODE&&e.nodeType!==di.ELEMENT_NODE&&e.nodeType!==di.DOCUMENT_FRAGMENT_NODE||(e.nodeType===di.ELEMENT_NODE&&e.shadowRoot&&t(e.shadowRoot,s),e.childNodes.forEach(e=>t(e,s)))}(r,null),Object.keys(this.legacy_missingNodeRetryMap).length))for(var a in this.legacy_missingNodeRetryMap)try{var h=this.legacy_missingNodeRetryMap[a],u=Li(h.node,this.virtualDom,this.mirror);u&&(h.node=u)}catch(t){this.warn(t)}var l=this.usingVirtualDom?this.virtualDom.mirror:this.mirror;t.removes.filter(e=>!!l.getNode(e.id)||(this.warnNodeNotFound(t,e.id),!1)).forEach(e=>{var r=l.getNode(e.id);if(r){var i=l.getNode(e.parentId);if(!i)return this.warnNodeNotFound(t,e.parentId);if(e.isShadow&&xn(i)&&(i=i.shadowRoot),l.removeNodeFromMap(r),i)try{var n;i.removeChild(r),this.usingVirtualDom&&"#text"===r.nodeName&&"STYLE"===i.nodeName&&(null===(n=i.rules)||void 0===n?void 0:n.length)>0&&(i.rules=[])}catch(e){if(!(e instanceof DOMException))throw e;this.warn("parent could not remove child in mutation",i,r,t)}}});var f=o({},this.legacy_missingNodeRetryMap),c=[],v=e=>{var r;if(!this.iframe.contentDocument)return this.warn("Looks like your replayer has been destroyed.");var i=l.getNode(e.parentId);if(!i)return e.node.type===Hn.Document?this.newDocumentQueue.push(e):t.adds.some(t=>t.node.id===e.parentId)?c.push(e):void 0;if(e.node.isShadow){var n;if(xn(i))i=i.shadowRoot;else{if(!it(i))return this.warn("Parent does not support shadow root, skipping mutation",e);i=i.shadowRoot}var s=null!==(n=this.lastAdoptedStyleIds.get(e.parentId))&&void 0!==n?n:this.pendingAdoptedStyleSheets.get(e.parentId);s&&(this.usingVirtualDom?this.pendingAdoptedStyleSheets.set(e.parentId,s):this.applyAdoptedStyleSheet({source:Fn.AdoptedStyleSheet,id:e.parentId,styleIds:s}))}var o=null,a=null;if(e.previousId&&(o=l.getNode(e.previousId)),e.nextId&&(a=l.getNode(e.nextId)),!e.node.rootId||l.getNode(e.node.rootId)){var h=e.node.rootId?l.getNode(e.node.rootId):this.usingVirtualDom?this.virtualDom:this.iframe.contentDocument;if(kn(i,l))this.attachDocumentToIframe(e,i);else{var u=(t,e)=>{if(!this.usingVirtualDom)for(var r of(Mo(t),this.config.plugins||[]))r.onBuild&&r.onBuild(t,{id:e,replayer:this})},v=Ee(e.node,{doc:h,mirror:l,skipChild:!0,hackCss:!0,cache:this.cache,afterAppend:u});if(-1!==e.previousId&&-1!==e.nextId){var d=l.getMeta(i);if(d&&d.type===Hn.Element&&e.node.type===Hn.Text){var p=Array.isArray(i.childNodes)?i.childNodes:Array.from(i.childNodes);if("textarea"===d.tagName)for(var m of p)m.nodeType===i.TEXT_NODE&&i.removeChild(m);else if("style"===d.tagName&&1===p.length)for(var y of p)y.nodeType!==i.TEXT_NODE||l.hasNode(y)||(v.textContent=y.textContent,i.removeChild(y))}else if((null==d?void 0:d.type)===Hn.Document){var g,w=i;e.node.type===Hn.DocumentType&&(null===(g=w.childNodes[0])||void 0===g?void 0:g.nodeType)===Node.DOCUMENT_TYPE_NODE&&w.removeChild(w.childNodes[0]),"HTML"===v.nodeName&&w.documentElement&&w.removeChild(w.documentElement)}if(o&&o.nextSibling&&o.nextSibling.parentNode?i.insertBefore(v,o.nextSibling):a&&a.parentNode?i.contains(a)?i.insertBefore(v,a):i.insertBefore(v,null):i.appendChild(v),u(v,e.node.id),this.usingVirtualDom&&"#text"===v.nodeName&&"STYLE"===i.nodeName&&(null===(r=i.rules)||void 0===r?void 0:r.length)>0&&(i.rules=[]),kn(v,this.mirror)){var b=this.mirror.getId(v),S=this.newDocumentQueue.find(t=>t.parentId===b);S&&(this.attachDocumentToIframe(S,v),this.newDocumentQueue=this.newDocumentQueue.filter(t=>t!==S))}(e.previousId||e.nextId)&&this.legacy_resolveMissingNode(f,i,v,e)}else f[e.node.id]={node:v,mutation:e}}}};t.adds.forEach(t=>{v(t)});for(var d=performance.now();c.length;){var p=bn(c);if(c.length=0,performance.now()-d>150){this.warn("Timeout in the loop, please check the resolve tree data:",p);break}for(var m of p)l.getNode(m.value.parentId)?Sn(m,t=>{v(t)}):this.debug("Drop resolve tree since there is no parent for the root node.",m)}Object.keys(f).length&&Object.assign(this.legacy_missingNodeRetryMap,f),Rn(t.texts).forEach(e=>{var r=l.getNode(e.id);if(!r){if(t.removes.find(t=>t.id===e.id))return;return this.warnNodeNotFound(t,e.id)}if(r.textContent=e.value,this.usingVirtualDom){var i,n=r.parentNode;(null==n||null===(i=n.rules)||void 0===i?void 0:i.length)>0&&(n.rules=[])}}),t.attributes.forEach(e=>{var r=l.getNode(e.id);if(!r){if(t.removes.find(t=>t.id===e.id))return;return this.warnNodeNotFound(t,e.id)}var i,n,a,h=function(){if("string"==typeof u){var t=e.attributes[u];if("autocomplete"===u&&("INPUT"===r.nodeName||"TEXTAREA"===r.nodeName))return 0;if(null===t)r.removeAttribute(u),"open"===u&&function(t,e){if(!("DIALOG"!==t.nodeName||t instanceof ei)){var r=t;r.isConnected?null===e.attributes.open&&(r.removeAttribute("open"),r.removeAttribute("rr_open_mode")):console.warn("dialog is not attached to the dom",r)}}(r,e);else if("string"==typeof t)try{if("_cssText"===u&&("LINK"===r.nodeName||"STYLE"===r.nodeName))try{var a=l.getMeta(r),h=r.nextSibling,f=r.parentNode,c=Ee(o({},a,{attributes:o({},a.attributes,e.attributes)}),{doc:r.ownerDocument,mirror:l,skipChild:!0,hackCss:!0,cache:s.cache});if(Object.assign(a.attributes,e.attributes),c&&f)return r.parentNode===f&&f.removeChild(r),f.insertBefore(c,h),l.replace(e.id,c),1}catch(t){}if("value"===u&&"TEXTAREA"===r.nodeName){var v=r;v.childNodes.forEach(t=>v.removeChild(t));var d=null===(n=r.ownerDocument)||void 0===n?void 0:n.createTextNode(t);d&&v.appendChild(d)}else"xlink:href"===u&&(null===(i=l.getMeta(r))||void 0===i?void 0:i.isSVG)?r.setAttributeNS("http://www.w3.org/1999/xlink",u,t):r.setAttribute(u,t);"rr_open_mode"===u&&"DIALOG"===r.nodeName&&Mo(r,e)}catch(t){s.warn("An error occurred may due to the checkout feature.",t)}else if("style"===u){var p=t,m=r;for(var y in p)if(!1===p[y])m.style.removeProperty(y);else if(p[y]instanceof Array){var g=p[y];m.style.setProperty(y,g[0],g[1])}else m.style.setProperty(y,p[y])}}};for(var u in e.attributes)if(0!==(a=h())&&1===a)break})}applyScroll(t,e){var r=this.mirror.getNode(t.id);if(!r)return this.debugNodeNotFound(t,t.id);var i,n=this.mirror.getMeta(r);if(r===this.iframe.contentDocument)null===(i=this.iframe.contentWindow)||void 0===i||i.scrollTo({top:t.y,left:t.x,behavior:e?"instant":"smooth"});else if((null==n?void 0:n.type)===Hn.Document){var s;null===(s=r.defaultView)||void 0===s||s.scrollTo({top:t.y,left:t.x,behavior:e?"instant":"smooth"})}else try{r.scrollTo({top:t.y,left:t.x,behavior:e?"instant":"smooth"})}catch(t){}}applyInput(t){var e=this.mirror.getNode(t.id);if(!e)return this.debugNodeNotFound(t,t.id);try{e.checked=t.isChecked,e.value=t.text}catch(t){}}applySelection(t){try{var e=new Set,r=t.ranges.map(t=>{var r=t.startOffset,i=t.end,n=t.endOffset,s=this.mirror.getNode(t.start),o=this.mirror.getNode(i);if(s&&o){var a=new Range;a.setStart(s,r),a.setEnd(o,n);var h=s.ownerDocument,u=null==h?void 0:h.getSelection();return u&&e.add(u),{range:a,selection:u}}});e.forEach(t=>t.removeAllRanges()),r.forEach(t=>{var e;return t&&(null===(e=t.selection)||void 0===e?void 0:e.addRange(t.range))})}catch(t){}}applyStyleSheetMutation(t){var e,r=null;t.styleId?r=this.styleMirror.getStyle(t.styleId):t.id&&(r=(null===(e=this.mirror.getNode(t.id))||void 0===e?void 0:e.sheet)||null),r&&(t.source===Fn.StyleSheetRule?this.applyStyleSheetRule(t,r):t.source===Fn.StyleDeclaration&&this.applyStyleDeclaration(t,r))}applyStyleSheetRule(t,e){var r,i;if(null===(r=t.adds)||void 0===r||r.forEach(t=>{var r=t.rule,i=t.index;try{if(Array.isArray(i)){var n=En(i),s=n.index,o=An(e.cssRules,n.positions);null==o||o.insertRule(r,s)}else{var a=void 0===i?void 0:Math.min(i,e.cssRules.length);null==e||e.insertRule(r,a)}}catch(t){}}),null===(i=t.removes)||void 0===i||i.forEach(t=>{var r=t.index;try{if(Array.isArray(r)){var i=En(r),n=i.index,s=An(e.cssRules,i.positions);null==s||s.deleteRule(n||0)}else null==e||e.deleteRule(r)}catch(t){}}),"string"==typeof t.replace)try{var n;null===(n=e.replace)||void 0===n||n.call(e,t.replace)}catch(t){}if("string"==typeof t.replaceSync)try{var s;null===(s=e.replaceSync)||void 0===s||s.call(e,t.replaceSync)}catch(t){}}applyStyleDeclaration(t,e){if(t.set){var r,i=An(e.rules,t.index);null==i||null===(r=i.style)||void 0===r||r.setProperty(t.set.property,t.set.value,t.set.priority)}if(t.remove){var n,s=An(e.rules,t.index);null==s||null===(n=s.style)||void 0===n||n.removeProperty(t.remove.property)}}applyAdoptedStyleSheet(t){var e;this.lastAdoptedStyleIds.set(t.id,t.styleIds);var r=this.mirror.getNode(t.id);if(r){var i={};this.adoptedStyleSheetTokens.set(t.id,i),null===(e=t.styles)||void 0===e||e.forEach(t=>{var e,i=null,n=null;if(n="#document"===r.nodeName?r.defaultView:(null===(e=r.ownerDocument)||void 0===e?void 0:e.defaultView)||null)try{i=new n.CSSStyleSheet,this.styleMirror.add(i,t.styleId),this.applyStyleSheetRule({source:Fn.StyleSheetRule,adds:t.rules},i)}catch(t){}});var n=0,s=(e,r)=>{if(this.adoptedStyleSheetTokens.get(t.id)===i){var o=r.map(t=>this.styleMirror.getStyle(t)).filter(t=>null!==t),a=!1;try{xn(e)?(e.shadowRoot.adoptedStyleSheets=o,a=!0):"#document"===e.nodeName&&(e.adoptedStyleSheets=o,a=!0)}catch(t){}a?this.pendingAdoptedStyleSheets.delete(t.id):this.pendingAdoptedStyleSheets.set(t.id,r),a&&o.length===r.length||n>=10||(this.addTimeout(()=>s(e,r),0+100*n),n++)}};s(r,t.styleIds)}}legacy_resolveMissingNode(t,e,r,i){var n=i.previousId,s=i.nextId,o=n&&t[n],a=s&&t[s];if(o){var h=o.node,u=o.mutation;e.insertBefore(h,r),delete t[u.node.id],delete this.legacy_missingNodeRetryMap[u.node.id],(u.previousId||u.nextId)&&this.legacy_resolveMissingNode(t,e,h,u)}if(a){var l=a.node,f=a.mutation;e.insertBefore(l,r.nextSibling),delete t[f.node.id],delete this.legacy_missingNodeRetryMap[f.node.id],(f.previousId||f.nextId)&&this.legacy_resolveMissingNode(t,e,l,f)}}moveAndHover(t,e,r,i,n){var s=this.mirror.getNode(r);if(!s)return this.debugNodeNotFound(n,r);var o=Mn(s,this.iframe),a=t*o.absoluteScale+o.x,h=e*o.absoluteScale+o.y;this.mouse.style.left=a+"px",this.mouse.style.top=h+"px",i||this.drawMouseTail({x:a,y:h}),this.hoverElements(s)}drawMouseTail(t){if(this.mouseTail){var e=!0===this.config.mouseTail?Eo:Object.assign({},Eo,this.config.mouseTail),r=e.lineCap,i=e.lineWidth,n=e.strokeStyle,s=e.duration,o=()=>{if(this.mouseTail){var t=this.mouseTail.getContext("2d");t&&this.tailPositions.length&&(t.clearRect(0,0,this.mouseTail.width,this.mouseTail.height),t.beginPath(),t.lineWidth=i,t.lineCap=r,t.strokeStyle=n,t.moveTo(this.tailPositions[0].x,this.tailPositions[0].y),this.tailPositions.forEach(e=>t.lineTo(e.x,e.y)),t.stroke())}};this.tailPositions.push(t),o(),setTimeout(()=>{this.tailPositions=this.tailPositions.filter(e=>e!==t),o()},s/this.speedService.state.context.timer.speed)}}hoverElements(t){var e;null===(e=this.lastHoveredRootNode||this.iframe.contentDocument)||void 0===e||e.querySelectorAll(".\\:hover").forEach(t=>{t.classList.remove(":hover")});var r=t.getRootNode();this.lastHoveredRootNode=r.nodeType===Node.DOCUMENT_NODE||r.nodeType===Node.DOCUMENT_FRAGMENT_NODE?r:void 0;for(var i=t.nodeType===Node.ELEMENT_NODE?t:t.parentElement;i;)i.classList.add(":hover"),i=i.parentElement}isUserInteraction(t){return t.type===_n.IncrementalSnapshot&&t.data.source>Fn.Mutation&&Fn.Input>=t.data.source}backToNormal(){this.nextUserInteractionEvent=null,this.speedService.state.matches("normal")||(this.speedService.send({type:"BACK_TO_NORMAL"}),this.emitter.emit(Wn.SkipEnd,{speed:this.speedService.state.context.normalSpeed}))}warnNodeNotFound(t,e){this.warn("Node with id '"+e+"' not found. ",t)}warnCanvasMutationFailed(t,e){this.warn("Has error on canvas update",e,"canvas mutation:",t)}debugNodeNotFound(t,e){this.debug("Node with id '"+e+"' not found. ",t)}warn(){if(this.config.showWarning){for(var t=arguments.length,e=new Array(t),r=0;t>r;r++)e[r]=arguments[r];this.config.logger.warn(Ao,...e)}}debug(){if(this.config.showDebug){for(var t=arguments.length,e=new Array(t),r=0;t>r;r++)e[r]=arguments[r];this.config.logger.log(Ao,...e)}}},To=zs.addCustomEvent,Oo=zs.freezePage,Do=zs.takeFullSnapshot;export{_n as EventType,Fn as IncrementalSource,Pn as MouseInteractions,Io as Replayer,Wn as ReplayerEvents,To as addCustomEvent,bo as canvasMutation,Oo as freezePage,J as getDeferredStylesheetStats,A as getDiscardedDurationSamples,W as getLastSnapshotCost,X as getMutationCost,on as mirror,zs as record,Je as resetMaxDepthState,K as resetSnapshotCostState,Do as takeFullSnapshot,Qi as utils,Ze as wasMaxDepthReached};
|
|
2
2
|
//# sourceMappingURL=rrweb.js.map
|