The only tool you need to know what is happening and how to fix it.
Go alertingexception-trackerissue-trackinglogsmetricsmonitoringobservability-platformopen-telemetryotelsession-replaytelemetrytraces
var ii={},Pl=Object.defineProperty,Ll=(s,e,t)=>e in s?Pl(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,ur=(s,e,t)=>Ll(s,typeof e!="symbol"?e+"":e,t);function pt(){}function cr(s,e){for(const t in e)s[t]=e[t];return s}function In(s){return s()}function hr(){return Object.create(null)}function tt(s){s.forEach(In)}function Dn(s){return typeof s=="function"}function Ts(s,e){return s!=s?e==e:s!==e||s&&typeof s=="object"||typeof s=="function"}function $l(s){return Object.keys(s).length===0}function fr(s){const e={};for(const t in s)t[0]!=="$"&&(e[t]=s[t]);return e}function T(s,e){s.appendChild(e)}function Re(s,e,t){s.insertBefore(e,t||null)}function Ce(s){s.parentNode&&s.parentNode.removeChild(s)}function Oi(s,e){for(let t=0;t<s.length;t+=1)s[t]&&s[t].d(e)}function ie(s){return document.createElement(s)}function si(s){return document.createElementNS("http://www.w3.org/2000/svg",s)}function Pe(s){return document.createTextNode(s)}function ae(){return Pe(" ")}function Fl(){return Pe("")}function Ve(s,e,t,i){return s.addEventListener(e,t,i),()=>s.removeEventListener(e,t,i)}function M(s,e,t){t==null?s.removeAttribute(e):s.getAttribute(e)!==t&&s.setAttribute(e,t)}function Bl(s){return Array.from(s.childNodes)}function ri(s,e){e=""+e,s.data!==e&&(s.data=e)}function q(s,e,t,i){t==null?s.style.removeProperty(e):s.style.setProperty(e,t,"")}function Ze(s,e,t){s.classList.toggle(e,!!t)}function Ul(s,e,{bubbles:t=!1,cancelable:i=!1}={}){return new CustomEvent(s,{detail:e,bubbles:t,cancelable:i})}let dt;function ct(s){dt=s}function yi(){if(!dt)throw new Error("Function called outside component initialization");return dt}function On(s){yi().$$.on_mount.push(s)}function zl(s){yi().$$.after_update.push(s)}function _n(s){yi().$$.on_destroy.push(s)}function Wl(){const s=yi();return(e,t,{cancelable:i=!1}={})=>{const r=s.$$.callbacks[e];if(r){const o=Ul(e,t,{cancelable:i});return r.slice().forEach(n=>{n.call(s,o)}),!o.defaultPrevented}return!0}}const Ue=[],Te=[];let Ye=[];const Hi=[],Gl=Promise.resolve();let Xi=!1;function Vl(){Xi||(Xi=!0,Gl.then(Tn))}function Ji(s){Ye.push(s)}function jl(s){Hi.push(s)}const _i=new Set;let Fe=0;function Tn(){if(Fe!==0)return;const s=dt;do{try{for(;Fe<Ue.length;){const e=Ue[Fe];Fe++,ct(e),Yl(e.$$)}}catch(e){throw Ue.length=0,Fe=0,e}for(ct(null),Ue.length=0,Fe=0;Te.length;)Te.pop()();for(let e=0;e<Ye.length;e+=1){const t=Ye[e];_i.has(t)||(_i.add(t),t())}Ye.length=0}while(Ue.length);for(;Hi.length;)Hi.pop()();Xi=!1,_i.clear(),ct(s)}function Yl(s){if(s.fragment!==null){s.update(),tt(s.before_update);const e=s.dirty;s.dirty=[-1],s.fragment&&s.fragment.p(s.ctx,e),s.after_update.forEach(Ji)}}function Zl(s){const e=[],t=[];Ye.forEach(i=>s.indexOf(i)===-1?e.push(i):t.push(i)),t.forEach(i=>i()),Ye=e}const Kt=new Set;let _e;function kn(){_e={r:0,c:[],p:_e}}function Pn(){_e.r||tt(_e.c),_e=_e.p}function Ee(s,e){s&&s.i&&(Kt.delete(s),s.i(e))}function He(s,e,t,i){if(s&&s.o){if(Kt.has(s))return;Kt.add(s),_e.c.push(()=>{Kt.delete(s),i&&(t&&s.d(1),i())}),s.o(e)}else i&&i()}function Be(s){return s?.length!==void 0?s:Array.from(s)}function Hl(s,e,t){const i=s.$$.props[e];i!==void 0&&(s.$$.bound[i]=t,t(s.$$.ctx[i]))}function Ln(s){s&&s.c()}function ks(s,e,t){const{fragment:i,after_update:r}=s.$$;i&&i.m(e,t),Ji(()=>{const o=s.$$.on_mount.map(In).filter(Dn);s.$$.on_destroy?s.$$.on_destroy.push(...o):tt(o),s.$$.on_mount=[]}),r.forEach(Ji)}function Ps(s,e){const t=s.$$;t.fragment!==null&&(Zl(t.after_update),tt(t.on_destroy),t.fragment&&t.fragment.d(e),t.on_destroy=t.fragment=null,t.ctx=[])}function Xl(s,e){s.$$.dirty[0]===-1&&(Ue.push(s),Vl(),s.$$.dirty.fill(0)),s.$$.dirty[e/31|0]|=1<<e%31}function Ls(s,e,t,i,r,o,n=null,l=[-1]){const a=dt;ct(s);const u=s.$$={fragment:null,ctx:[],props:o,update:pt,not_equal:r,bound:hr(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(e.context||(a?a.$$.context:[])),callbacks:hr(),dirty:l,skip_bound:!1,root:e.target||a.$$.root};n&&n(u.root);let c=!1;if(u.ctx=t?t(s,e.props||{},(h,f,...g)=>{const d=g.length?g[0]:f;return u.ctx&&r(u.ctx[h],u.ctx[h]=d)&&(!u.skip_bound&&u.bound[h]&&u.bound[h](d),c&&Xl(s,h)),f}):[],u.update(),c=!0,tt(u.before_update),u.fragment=i?i(u.ctx):!1,e.target){if(e.hydrate){const h=Bl(e.target);u.fragment&&u.fragment.l(h),h.forEach(Ce)}else u.fragment&&u.fragment.c();e.intro&&Ee(s.$$.fragment),ks(s,e.target,e.anchor),Tn()}ct(a)}class $s{constructor(){ur(this,"$$"),ur(this,"$$set")}$destroy(){Ps(this,1),this.$destroy=pt}$on(e,t){if(!Dn(t))return pt;const i=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return i.push(t),()=>{const r=i.indexOf(t);r!==-1&&i.splice(r,1)}}$set(e){this.$$set&&!$l(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}const Jl="4";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(Jl);var Kl=Object.defineProperty,Ql=(s,e,t)=>e in s?Kl(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,N=(s,e,t)=>Ql(s,typeof e!="symbol"?e+"":e,t),pr,ql=Object.defineProperty,ea=(s,e,t)=>e in s?ql(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,dr=(s,e,t)=>ea(s,typeof e!="symbol"?e+"":e,t),K=(s=>(s[s.Document=0]="Document",s[s.DocumentType=1]="DocumentType",s[s.Element=2]="Element",s[s.Text=3]="Text",s[s.CDATA=4]="CDATA",s[s.Comment=5]="Comment",s))(K||{});function ta(s){return s.nodeType===s.ELEMENT_NODE}class $n{constructor(){dr(this,"idNodeMap",new Map),dr(this,"nodeMetaMap",new WeakMap)}getId(e){var t;return e?((t=this.getMeta(e))==null?void 0:t.id)??-1:-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){const t=this.getId(e);this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach(i=>this.removeNodeFromMap(i))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){const i=t.id;this.idNodeMap.set(i,e),this.nodeMetaMap.set(e,t)}replace(e,t){const i=this.getNode(e);if(i){const r=this.nodeMetaMap.get(i);r&&this.nodeMetaMap.set(t,r)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function Fn(){return new $n}function ia(s){return s.toLowerCase()}function sa(s,e){return!s||!e||s.type!==e.type?!1:s.type===K.Document?s.compatMode===e.compatMode:s.type===K.DocumentType?s.name===e.name&&s.publicId===e.publicId&&s.systemId===e.systemId:s.type===K.Comment||s.type===K.Text||s.type===K.CDATA?s.textContent===e.textContent:s.type===K.Element?s.tagName===e.tagName&&JSON.stringify(s.attributes)===JSON.stringify(e.attributes)&&s.isSVG===e.isSVG&&s.needBlock===e.needBlock:!1}function ra(s,e){let t;try{t=new URL(s,e??window.location.href)}catch{return null}const i=/\.([0-9a-z]+)(?:$)/i,r=t.pathname.match(i);return r?.[1]??null}const na=/(max|min)-device-(width|height)/,mr=new RegExp(na.source,"g"),oa={postcssPlugin:"postcss-custom-selectors",prepare(){return{postcssPlugin:"postcss-custom-selectors",AtRule:function(s){s.params.match(mr)&&(s.params=s.params.replace(mr,"$1-$2"))}}}},la={postcssPlugin:"postcss-hover-classes",prepare:function(){const s=[];return{Rule:function(e){s.indexOf(e)===-1&&(s.push(e),e.selectors.forEach(function(t){t.includes(":hover")&&(e.selector+=`,
`+t.replace(/:hover/g,".\\:hover"))}))}}}};function aa(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}function ua(s){if(s.__esModule)return s;var e=s.default;if(typeof e=="function"){var t=function i(){return this instanceof i?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(s).forEach(function(i){var r=Object.getOwnPropertyDescriptor(s,i);Object.defineProperty(t,i,r.get?r:{enumerable:!0,get:function(){return s[i]}})}),t}var Fs={exports:{}},W=String,Bn=function(){return{isColorSupported:!1,reset:W,bold:W,dim:W,italic:W,underline:W,inverse:W,hidden:W,strikethrough:W,black:W,red:W,green:W,yellow:W,blue:W,magenta:W,cyan:W,white:W,gray:W,bgBlack:W,bgRed:W,bgGreen:W,bgYellow:W,bgBlue:W,bgMagenta:W,bgCyan:W,bgWhite:W}};Fs.exports=Bn();Fs.exports.createColors=Bn;var ca=Fs.exports;const ha={},fa=Object.freeze(Object.defineProperty({__proto__:null,default:ha},Symbol.toStringTag,{value:"Module"})),pe=ua(fa);let gr=ca,yr=pe,Ki=class Un extends Error{constructor(e,t,i,r,o,n){super(e),this.name="CssSyntaxError",this.reason=e,o&&(this.file=o),r&&(this.source=r),n&&(this.plugin=n),typeof t<"u"&&typeof i<"u"&&(typeof t=="number"?(this.line=t,this.column=i):(this.line=t.line,this.column=t.column,this.endLine=i.line,this.endColumn=i.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,Un)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let t=this.source;e==null&&(e=gr.isColorSupported),yr&&e&&(t=yr(t));let i=t.split(/\r?\n/),r=Math.max(this.line-3,0),o=Math.min(this.line+2,i.length),n=String(o).length,l,a;if(e){let{bold:u,gray:c,red:h}=gr.createColors(!0);l=f=>u(h(f)),a=f=>c(f)}else l=a=u=>u;return i.slice(r,o).map((u,c)=>{let h=r+1+c,f=" "+(" "+h).slice(-n)+" | ";if(h===this.line){let g=a(f.replace(/\d/g," "))+u.slice(0,this.column-1).replace(/[^\t]/g," ");return l(">")+a(f)+u+`
`+g+l("^")}return" "+a(f)+u}).join(`
`)}toString(){let e=this.showSourceCode();return e&&(e=`
`+e+`
`),this.name+": "+this.message+e}};var Bs=Ki;Ki.default=Ki;var Et={};Et.isClean=Symbol("isClean");Et.my=Symbol("my");const wr={after:`
`,beforeClose:`
`,beforeComment:`
`,beforeDecl:`
`,beforeOpen:" ",beforeRule:`
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function pa(s){return s[0].toUpperCase()+s.slice(1)}let Qi=class{constructor(e){this.builder=e}atrule(e,t){let i="@"+e.name,r=e.params?this.rawValue(e,"params"):"";if(typeof e.raws.afterName<"u"?i+=e.raws.afterName:r&&(i+=" "),e.nodes)this.block(e,i+r);else{let o=(e.raws.between||"")+(t?";":"");this.builder(i+r+o,e)}}beforeAfter(e,t){let i;e.type==="decl"?i=this.raw(e,null,"beforeDecl"):e.type==="comment"?i=this.raw(e,null,"beforeComment"):t==="before"?i=this.raw(e,null,"beforeRule"):i=this.raw(e,null,"beforeClose");let r=e.parent,o=0;for(;r&&r.type!=="root";)o+=1,r=r.parent;if(i.includes(`
`)){let n=this.raw(e,null,"indent");if(n.length)for(let l=0;l<o;l++)i+=n}return i}block(e,t){let i=this.raw(e,"between","beforeOpen");this.builder(t+i+"{",e,"start");let r;e.nodes&&e.nodes.length?(this.body(e),r=this.raw(e,"after")):r=this.raw(e,"after","emptyBody"),r&&this.builder(r),this.builder("}",e,"end")}body(e){let t=e.nodes.length-1;for(;t>0&&e.nodes[t].type==="comment";)t-=1;let i=this.raw(e,"semicolon");for(let r=0;r<e.nodes.length;r++){let o=e.nodes[r],n=this.raw(o,"before");n&&this.builder(n),this.stringify(o,t!==r||i)}}comment(e){let t=this.raw(e,"left","commentLeft"),i=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+i+"*/",e)}decl(e,t){let i=this.raw(e,"between","colon"),r=e.prop+i+this.rawValue(e,"value");e.important&&(r+=e.raws.important||" !important"),t&&(r+=";"),this.builder(r,e)}document(e){this.body(e)}raw(e,t,i){let r;if(i||(i=t),t&&(r=e.raws[t],typeof r<"u"))return r;let o=e.parent;if(i==="before"&&(!o||o.type==="root"&&o.first===e||o&&o.type==="document"))return"";if(!o)return wr[i];let n=e.root();if(n.rawCache||(n.rawCache={}),typeof n.rawCache[i]<"u")return n.rawCache[i];if(i==="before"||i==="after")return this.beforeAfter(e,i);{let l="raw"+pa(i);this[l]?r=this[l](n,e):n.walk(a=>{if(r=a.raws[t],typeof r<"u")return!1})}return typeof r>"u"&&(r=wr[i]),n.rawCache[i]=r,r}rawBeforeClose(e){let t;return e.walk(i=>{if(i.nodes&&i.nodes.length>0&&typeof i.raws.after<"u")return t=i.raws.after,t.includes(`
`)&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let i;return e.walkComments(r=>{if(typeof r.raws.before<"u")return i=r.raws.before,i.includes(`
`)&&(i=i.replace(/[^\n]+$/,"")),!1}),typeof i>"u"?i=this.raw(t,null,"beforeDecl"):i&&(i=i.replace(/\S/g,"")),i}rawBeforeDecl(e,t){let i;return e.walkDecls(r=>{if(typeof r.raws.before<"u")return i=r.raws.before,i.includes(`
`)&&(i=i.replace(/[^\n]+$/,"")),!1}),typeof i>"u"?i=this.raw(t,null,"beforeRule"):i&&(i=i.replace(/\S/g,"")),i}rawBeforeOpen(e){let t;return e.walk(i=>{if(i.type!=="decl"&&(t=i.raws.between,typeof t<"u"))return!1}),t}rawBeforeRule(e){let t;return e.walk(i=>{if(i.nodes&&(i.parent!==e||e.first!==i)&&typeof i.raws.before<"u")return t=i.raws.before,t.includes(`
`)&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls(i=>{if(typeof i.raws.between<"u")return t=i.raws.between.replace(/[^\s:]/g,""),!1}),t}rawEmptyBody(e){let t;return e.walk(i=>{if(i.nodes&&i.nodes.length===0&&(t=i.raws.after,typeof t<"u"))return!1}),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk(i=>{let r=i.parent;if(r&&r!==e&&r.parent&&r.parent===e&&typeof i.raws.before<"u"){let o=i.raws.before.split(`
`);return t=o[o.length-1],t=t.replace(/\S/g,""),!1}}),t}rawSemicolon(e){let t;return e.walk(i=>{if(i.nodes&&i.nodes.length&&i.last.type==="decl"&&(t=i.raws.semicolon,typeof t<"u"))return!1}),t}rawValue(e,t){let i=e[t],r=e.raws[t];return r&&r.value===i?r.raw:i}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}};var zn=Qi;Qi.default=Qi;let da=zn;function qi(s,e){new da(e).stringify(s)}var wi=qi;qi.default=qi;let{isClean:Mt,my:ma}=Et,ga=Bs,ya=zn,wa=wi;function es(s,e){let t=new s.constructor;for(let i in s){if(!Object.prototype.hasOwnProperty.call(s,i)||i==="proxyCache")continue;let r=s[i],o=typeof r;i==="parent"&&o==="object"?e&&(t[i]=e):i==="source"?t[i]=r:Array.isArray(r)?t[i]=r.map(n=>es(n,t)):(o==="object"&&r!==null&&(r=es(r)),t[i]=r)}return t}let ts=class{constructor(e={}){this.raws={},this[Mt]=!1,this[ma]=!0;for(let t in e)if(t==="nodes"){this.nodes=[];for(let i of e[t])typeof i.clone=="function"?this.append(i.clone()):this.append(i)}else this[t]=e[t]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let t in e)this[t]=e[t];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let t=es(this);for(let i in e)t[i]=e[i];return t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}error(e,t={}){if(this.source){let{end:i,start:r}=this.rangeBy(t);return this.source.input.error(e,{column:r.column,line:r.line},{column:i.column,line:i.line},t)}return new ga(e)}getProxyProcessor(){return{get(e,t){return t==="proxyOf"?e:t==="root"?()=>e.root().toProxy():e[t]},set(e,t,i){return e[t]===i||(e[t]=i,(t==="prop"||t==="value"||t==="name"||t==="params"||t==="important"||t==="text")&&e.markDirty()),!0}}}markDirty(){if(this[Mt]){this[Mt]=!1;let e=this;for(;e=e.parent;)e[Mt]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let i=this.source.start;if(e.index)i=this.positionInside(e.index,t);else if(e.word){t=this.toString();let r=t.indexOf(e.word);r!==-1&&(i=this.positionInside(r,t))}return i}positionInside(e,t){let i=t||this.toString(),r=this.source.start.column,o=this.source.start.line;for(let n=0;n<e;n++)i[n]===`
`?(r=1,o+=1):r+=1;return{column:r,line:o}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e){let t={column:this.source.start.column,line:this.source.start.line},i=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:t.column+1,line:t.line};if(e.word){let r=this.toString(),o=r.indexOf(e.word);o!==-1&&(t=this.positionInside(o,r),i=this.positionInside(o+e.word.length,r))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?i={column:e.end.column,line:e.end.line}:typeof e.endIndex=="number"?i=this.positionInside(e.endIndex):e.index&&(i=this.positionInside(e.index+1));return(i.line<t.line||i.line===t.line&&i.column<=t.column)&&(i={column:t.column+1,line:t.line}),{end:i,start:t}}raw(e,t){return new ya().raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let t=this,i=!1;for(let r of e)r===this?i=!0:i?(this.parent.insertAfter(t,r),t=r):this.parent.insertBefore(t,r);i||this.remove()}return this}root(){let e=this;for(;e.parent&&e.parent.type!=="document";)e=e.parent;return e}toJSON(e,t){let i={},r=t==null;t=t||new Map;let o=0;for(let n in this){if(!Object.prototype.hasOwnProperty.call(this,n)||n==="parent"||n==="proxyCache")continue;let l=this[n];if(Array.isArray(l))i[n]=l.map(a=>typeof a=="object"&&a.toJSON?a.toJSON(null,t):a);else if(typeof l=="object"&&l.toJSON)i[n]=l.toJSON(null,t);else if(n==="source"){let a=t.get(l.input);a==null&&(a=o,t.set(l.input,o),o++),i[n]={end:l.end,inputId:a,start:l.start}}else i[n]=l}return r&&(i.inputs=[...t.keys()].map(n=>n.toJSON())),i}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=wa){e.stringify&&(e=e.stringify);let t="";return e(this,i=>{t+=i}),t}warn(e,t,i){let r={node:this};for(let o in i)r[o]=i[o];return e.warn(t,r)}get proxyOf(){return this}};var vi=ts;ts.default=ts;let va=vi,is=class extends va{constructor(e){e&&typeof e.value<"u"&&typeof e.value!="string"&&(e={...e,value:String(e.value)}),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}};var bi=is;is.default=is;let ba="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",Ca=(s=21)=>{let e="",t=s;for(;t--;)e+=ba[Math.random()*64|0];return e};var Sa={nanoid:Ca};let{SourceMapConsumer:vr,SourceMapGenerator:br}=pe,{existsSync:Ea,readFileSync:xa}=pe,{dirname:Ti,join:Aa}=pe;function Ra(s){return Buffer?Buffer.from(s,"base64").toString():window.atob(s)}let ss=class{constructor(e,t){if(t.map===!1)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let i=t.map?t.map.prev:void 0,r=this.loadMap(t.from,i);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=Ti(this.mapFile)),r&&(this.text=r)}consumer(){return this.consumerCache||(this.consumerCache=new vr(this.text)),this.consumerCache}decodeInline(e){let t=/^data:application\/json;charset=utf-?8;base64,/,i=/^data:application\/json;base64,/,r=/^data:application\/json;charset=utf-?8,/,o=/^data:application\/json,/;if(r.test(e)||o.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(t.test(e)||i.test(e))return Ra(e.substr(RegExp.lastMatch.length));let n=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+n)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return typeof e!="object"?!1:typeof e.mappings=="string"||typeof e._mappings=="string"||Array.isArray(e.sections)}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/gm);if(!t)return;let i=e.lastIndexOf(t.pop()),r=e.indexOf("*/",i);i>-1&&r>-1&&(this.annotation=this.getAnnotationURL(e.substring(i,r)))}loadFile(e){if(this.root=Ti(e),Ea(e))return this.mapFile=e,xa(e,"utf-8").toString().trim()}loadMap(e,t){if(t===!1)return!1;if(t){if(typeof t=="string")return t;if(typeof t=="function"){let i=t(e);if(i){let r=this.loadFile(i);if(!r)throw new Error("Unable to load previous source map: "+i.toString());return r}}else{if(t instanceof vr)return br.fromSourceMap(t).toString();if(t instanceof br)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let i=this.annotation;return e&&(i=Aa(Ti(e),i)),this.loadFile(i)}}}startWith(e,t){return e?e.substr(0,t.length)===t:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};var Wn=ss;ss.default=ss;let{SourceMapConsumer:Na,SourceMapGenerator:Ma}=pe,{fileURLToPath:Cr,pathToFileURL:It}=pe,{isAbsolute:rs,resolve:ns}=pe,{nanoid:Ia}=Sa,ki=pe,Sr=Bs,Da=Wn,Pi=Symbol("fromOffsetCache"),Oa=!!(Na&&Ma),Er=!!(ns&&rs),ni=class{constructor(e,t={}){if(e===null||typeof e>"u"||typeof e=="object"&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),this.css[0]==="\uFEFF"||this.css[0]===""?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(!Er||/^\w+:\/\//.test(t.from)||rs(t.from)?this.file=t.from:this.file=ns(t.from)),Er&&Oa){let i=new Da(this.css,t);if(i.text){this.map=i;let r=i.consumer().file;!this.file&&r&&(this.file=this.mapResolve(r))}}this.file||(this.id="<input css "+Ia(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,i,r={}){let o,n,l;if(t&&typeof t=="object"){let u=t,c=i;if(typeof u.offset=="number"){let h=this.fromOffset(u.offset);t=h.line,i=h.col}else t=u.line,i=u.column;if(typeof c.offset=="number"){let h=this.fromOffset(c.offset);n=h.line,l=h.col}else n=c.line,l=c.column}else if(!i){let u=this.fromOffset(t);t=u.line,i=u.col}let a=this.origin(t,i,n,l);return a?o=new Sr(e,a.endLine===void 0?a.line:{column:a.column,line:a.line},a.endLine===void 0?a.column:{column:a.endColumn,line:a.endLine},a.source,a.file,r.plugin):o=new Sr(e,n===void 0?t:{column:i,line:t},n===void 0?i:{column:l,line:n},this.css,this.file,r.plugin),o.input={column:i,endColumn:l,endLine:n,line:t,source:this.css},this.file&&(It&&(o.input.url=It(this.file).toString()),o.input.file=this.file),o}fromOffset(e){let t,i;if(this[Pi])i=this[Pi];else{let o=this.css.split(`
`);i=new Array(o.length);let n=0;for(let l=0,a=o.length;l<a;l++)i[l]=n,n+=o[l].length+1;this[Pi]=i}t=i[i.length-1];let r=0;if(e>=t)r=i.length-1;else{let o=i.length-2,n;for(;r<o;)if(n=r+(o-r>>1),e<i[n])o=n-1;else if(e>=i[n+1])r=n+1;else{r=n;break}}return{col:e-i[r]+1,line:r+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:ns(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,i,r){if(!this.map)return!1;let o=this.map.consumer(),n=o.originalPositionFor({column:t,line:e});if(!n.source)return!1;let l;typeof i=="number"&&(l=o.originalPositionFor({column:r,line:i}));let a;rs(n.source)?a=It(n.source):a=new URL(n.source,this.map.consumer().sourceRoot||It(this.map.mapFile));let u={column:n.column,endColumn:l&&l.column,endLine:l&&l.line,line:n.line,url:a.toString()};if(a.protocol==="file:")if(Cr)u.file=Cr(a);else throw new Error("file: protocol is not available in this PostCSS build");let c=o.sourceContentFor(n.source);return c&&(u.source=c),u}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])this[t]!=null&&(e[t]=this[t]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}};var Ci=ni;ni.default=ni;ki&&ki.registerInput&&ki.registerInput(ni);let{SourceMapConsumer:Gn,SourceMapGenerator:Qt}=pe,{dirname:qt,relative:Vn,resolve:jn,sep:Yn}=pe,{pathToFileURL:xr}=pe,_a=Ci,Ta=!!(Gn&&Qt),ka=!!(qt&&jn&&Vn&&Yn),Pa=class{constructor(e,t,i,r){this.stringify=e,this.mapOpts=i.map||{},this.root=t,this.opts=i,this.css=r,this.originalCSS=r,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;this.isInline()?e="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?e=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?e=this.mapOpts.annotation(this.opts.to,this.root):e=this.outputFile()+".map";let t=`
`;this.css.includes(`\r
`)&&(t=`\r
`),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t=this.toUrl(this.path(e.file)),i=e.root||qt(e.file),r;this.mapOpts.sourcesContent===!1?(r=new Gn(e.text),r.sourcesContent&&(r.sourcesContent=null)):r=e.consumer(),this.map.applySourceMap(r,t,this.toUrl(this.path(i)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],e.type==="comment"&&e.text.indexOf("# sourceMappingURL=")===0&&this.root.removeChild(t)}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),ka&&Ta&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,t=>{e+=t}),[e]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=Qt.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new Qt({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 Qt({file:this.outputFile(),ignoreInvalidMapping:!0});let e=1,t=1,i="<no source>",r={generated:{column:0,line:0},original:{column:0,line:0},source:""},o,n;this.stringify(this.root,(l,a,u)=>{if(this.css+=l,a&&u!=="end"&&(r.generated.line=e,r.generated.column=t-1,a.source&&a.source.start?(r.source=this.sourcePath(a),r.original.line=a.source.start.line,r.original.column=a.source.start.column-1,this.map.addMapping(r)):(r.source=i,r.original.line=1,r.original.column=0,this.map.addMapping(r))),o=l.match(/\n/g),o?(e+=o.length,n=l.lastIndexOf(`
`),t=l.length-n):t+=l.length,a&&u!=="start"){let c=a.parent||{raws:{}};(!(a.type==="decl"||a.type==="atrule"&&!a.nodes)||a!==c.last||c.raws.semicolon)&&(a.source&&a.source.end?(r.source=this.sourcePath(a),r.original.line=a.source.end.line,r.original.column=a.source.end.column-1,r.generated.line=e,r.generated.column=t-2,this.map.addMapping(r)):(r.source=i,r.original.line=1,r.original.column=0,r.generated.line=e,r.generated.column=t-1,this.map.addMapping(r)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(e=>e.annotation):!0}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let e=this.mapOpts.annotation;return typeof e<"u"&&e!==!0?!1:this.previous().length?this.previous().some(t=>t.inline):!0}isMap(){return typeof this.opts.map<"u"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent<"u"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(e=>e.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute||e.charCodeAt(0)===60||/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let i=this.opts.to?qt(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(i=qt(jn(i,this.mapOpts.annotation)));let r=Vn(i,e);return this.memoizedPaths.set(e,r),r}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}});else{let e=new _a(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(t=>{if(t.source){let i=t.source.input.from;if(i&&!e[i]){e[i]=!0;let r=this.usesFileUrls?this.toFileUrl(i):this.toUrl(this.path(i));this.map.setSourceContent(r,t.source.input.css)}}});else if(this.css){let t=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(t,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(xr){let i=xr(e).toString();return this.memoizedFileURLs.set(e,i),i}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;Yn==="\\"&&(e=e.replace(/\\/g,"/"));let i=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,i),i}};var Zn=Pa;let La=vi,os=class extends La{constructor(e){super(e),this.type="comment"}};var Si=os;os.default=os;let{isClean:Hn,my:Xn}=Et,Jn=bi,Kn=Si,$a=vi,Qn,Us,zs,qn;function eo(s){return s.map(e=>(e.nodes&&(e.nodes=eo(e.nodes)),delete e.source,e))}function to(s){if(s[Hn]=!1,s.proxyOf.nodes)for(let e of s.proxyOf.nodes)to(e)}let xe=class io extends $a{append(...e){for(let t of e){let i=this.normalize(t,this.last);for(let r of i)this.proxyOf.nodes.push(r)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t=this.getIterator(),i,r;for(;this.indexes[t]<this.proxyOf.nodes.length&&(i=this.indexes[t],r=e(this.proxyOf.nodes[i],i),r!==!1);)this.indexes[t]+=1;return delete this.indexes[t],r}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get(e,t){return t==="proxyOf"?e:e[t]?t==="each"||typeof t=="string"&&t.startsWith("walk")?(...i)=>e[t](...i.map(r=>typeof r=="function"?(o,n)=>r(o.toProxy(),n):r)):t==="every"||t==="some"?i=>e[t]((r,...o)=>i(r.toProxy(),...o)):t==="root"?()=>e.root().toProxy():t==="nodes"?e.nodes.map(i=>i.toProxy()):t==="first"||t==="last"?e[t].toProxy():e[t]:e[t]},set(e,t,i){return e[t]===i||(e[t]=i,(t==="name"||t==="params"||t==="selector")&&e.markDirty()),!0}}}index(e){return typeof e=="number"?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let i=this.index(e),r=this.normalize(t,this.proxyOf.nodes[i]).reverse();i=this.index(e);for(let n of r)this.proxyOf.nodes.splice(i+1,0,n);let o;for(let n in this.indexes)o=this.indexes[n],i<o&&(this.indexes[n]=o+r.length);return this.markDirty(),this}insertBefore(e,t){let i=this.index(e),r=i===0?"prepend":!1,o=this.normalize(t,this.proxyOf.nodes[i],r).reverse();i=this.index(e);for(let l of o)this.proxyOf.nodes.splice(i,0,l);let n;for(let l in this.indexes)n=this.indexes[l],i<=n&&(this.indexes[l]=n+o.length);return this.markDirty(),this}normalize(e,t){if(typeof e=="string")e=eo(Qn(e).nodes);else if(typeof e>"u")e=[];else if(Array.isArray(e)){e=e.slice(0);for(let r of e)r.parent&&r.parent.removeChild(r,"ignore")}else if(e.type==="root"&&this.type!=="document"){e=e.nodes.slice(0);for(let r of e)r.parent&&r.parent.removeChild(r,"ignore")}else if(e.type)e=[e];else if(e.prop){if(typeof e.value>"u")throw new Error("Value field is missed in node creation");typeof e.value!="string"&&(e.value=String(e.value)),e=[new Jn(e)]}else if(e.selector)e=[new Us(e)];else if(e.name)e=[new zs(e)];else if(e.text)e=[new Kn(e)];else throw new Error("Unknown node type in node creation");return e.map(r=>(r[Xn]||io.rebuild(r),r=r.proxyOf,r.parent&&r.parent.removeChild(r),r[Hn]&&to(r),typeof r.raws.before>"u"&&t&&typeof t.raws.before<"u"&&(r.raws.before=t.raws.before.replace(/\S/g,"")),r.parent=this.proxyOf,r))}prepend(...e){e=e.reverse();for(let t of e){let i=this.normalize(t,this.first,"prepend").reverse();for(let r of i)this.proxyOf.nodes.unshift(r);for(let r in this.indexes)this.indexes[r]=this.indexes[r]+i.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);let t;for(let i in this.indexes)t=this.indexes[i],t>=e&&(this.indexes[i]=t-1);return this.markDirty(),this}replaceValues(e,t,i){return i||(i=t,t={}),this.walkDecls(r=>{t.props&&!t.props.includes(r.prop)||t.fast&&!r.value.includes(t.fast)||(r.value=r.value.replace(e,i))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,i)=>{let r;try{r=e(t,i)}catch(o){throw t.addToError(o)}return r!==!1&&t.walk&&(r=t.walk(e)),r})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((i,r)=>{if(i.type==="atrule"&&e.test(i.name))return t(i,r)}):this.walk((i,r)=>{if(i.type==="atrule"&&i.name===e)return t(i,r)}):(t=e,this.walk((i,r)=>{if(i.type==="atrule")return t(i,r)}))}walkComments(e){return this.walk((t,i)=>{if(t.type==="comment")return e(t,i)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((i,r)=>{if(i.type==="decl"&&e.test(i.prop))return t(i,r)}):this.walk((i,r)=>{if(i.type==="decl"&&i.prop===e)return t(i,r)}):(t=e,this.walk((i,r)=>{if(i.type==="decl")return t(i,r)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((i,r)=>{if(i.type==="rule"&&e.test(i.selector))return t(i,r)}):this.walk((i,r)=>{if(i.type==="rule"&&i.selector===e)return t(i,r)}):(t=e,this.walk((i,r)=>{if(i.type==="rule")return t(i,r)}))}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]}};xe.registerParse=s=>{Qn=s};xe.registerRule=s=>{Us=s};xe.registerAtRule=s=>{zs=s};xe.registerRoot=s=>{qn=s};var Le=xe;xe.default=xe;xe.rebuild=s=>{s.type==="atrule"?Object.setPrototypeOf(s,zs.prototype):s.type==="rule"?Object.setPrototypeOf(s,Us.prototype):s.type==="decl"?Object.setPrototypeOf(s,Jn.prototype):s.type==="comment"?Object.setPrototypeOf(s,Kn.prototype):s.type==="root"&&Object.setPrototypeOf(s,qn.prototype),s[Xn]=!0,s.nodes&&s.nodes.forEach(e=>{xe.rebuild(e)})};let Fa=Le,so,ro,mt=class extends Fa{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new so(new ro,this,e).stringify()}};mt.registerLazyResult=s=>{so=s};mt.registerProcessor=s=>{ro=s};var Ws=mt;mt.default=mt;let ls=class{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let i=t.node.rangeBy(t);this.line=i.start.line,this.column=i.start.column,this.endLine=i.end.line,this.endColumn=i.end.column}for(let i in t)this[i]=t[i]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}};var no=ls;ls.default=ls;let Ba=no,as=class{constructor(e,t,i){this.processor=e,this.messages=[],this.root=t,this.opts=i,this.css=void 0,this.map=void 0}toString(){return this.css}warn(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let i=new Ba(e,t);return this.messages.push(i),i}warnings(){return this.messages.filter(e=>e.type==="warning")}get content(){return this.css}};var Gs=as;as.default=as;const Li=39,Ar=34,Dt=92,Rr=47,Ot=10,st=32,_t=12,Tt=9,kt=13,Ua=91,za=93,Wa=40,Ga=41,Va=123,ja=125,Ya=59,Za=42,Ha=58,Xa=64,Pt=/[\t\n\f\r "#'()/;[\\\]{}]/g,Lt=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,Ja=/.[\r\n"'(/\\]/,Nr=/[\da-f]/i;var Ka=function(e,t={}){let i=e.css.valueOf(),r=t.ignoreErrors,o,n,l,a,u,c,h,f,g,d,A=i.length,p=0,m=[],w=[];function v(){return p}function x(I){throw e.error("Unclosed "+I,p)}function R(){return w.length===0&&p>=A}function D(I){if(w.length)return w.pop();if(p>=A)return;let H=I?I.ignoreUnclosed:!1;switch(o=i.charCodeAt(p),o){case Ot:case st:case Tt:case kt:case _t:{n=p;do n+=1,o=i.charCodeAt(n);while(o===st||o===Ot||o===Tt||o===kt||o===_t);d=["space",i.slice(p,n)],p=n-1;break}case Ua:case za:case Va:case ja:case Ha:case Ya:case Ga:{let U=String.fromCharCode(o);d=[U,U,p];break}case Wa:{if(f=m.length?m.pop()[1]:"",g=i.charCodeAt(p+1),f==="url"&&g!==Li&&g!==Ar&&g!==st&&g!==Ot&&g!==Tt&&g!==_t&&g!==kt){n=p;do{if(c=!1,n=i.indexOf(")",n+1),n===-1)if(r||H){n=p;break}else x("bracket");for(h=n;i.charCodeAt(h-1)===Dt;)h-=1,c=!c}while(c);d=["brackets",i.slice(p,n+1),p,n],p=n}else n=i.indexOf(")",p+1),a=i.slice(p,n+1),n===-1||Ja.test(a)?d=["(","(",p]:(d=["brackets",a,p,n],p=n);break}case Li:case Ar:{l=o===Li?"'":'"',n=p;do{if(c=!1,n=i.indexOf(l,n+1),n===-1)if(r||H){n=p+1;break}else x("string");for(h=n;i.charCodeAt(h-1)===Dt;)h-=1,c=!c}while(c);d=["string",i.slice(p,n+1),p,n],p=n;break}case Xa:{Pt.lastIndex=p+1,Pt.test(i),Pt.lastIndex===0?n=i.length-1:n=Pt.lastIndex-2,d=["at-word",i.slice(p,n+1),p,n],p=n;break}case Dt:{for(n=p,u=!0;i.charCodeAt(n+1)===Dt;)n+=1,u=!u;if(o=i.charCodeAt(n+1),u&&o!==Rr&&o!==st&&o!==Ot&&o!==Tt&&o!==kt&&o!==_t&&(n+=1,Nr.test(i.charAt(n)))){for(;Nr.test(i.charAt(n+1));)n+=1;i.charCodeAt(n+1)===st&&(n+=1)}d=["word",i.slice(p,n+1),p,n],p=n;break}default:{o===Rr&&i.charCodeAt(p+1)===Za?(n=i.indexOf("*/",p+2)+1,n===0&&(r||H?n=i.length:x("comment")),d=["comment",i.slice(p,n+1),p,n],p=n):(Lt.lastIndex=p+1,Lt.test(i),Lt.lastIndex===0?n=i.length-1:n=Lt.lastIndex-2,d=["word",i.slice(p,n+1),p,n],m.push(d),p=n);break}}return p++,d}function Y(I){w.push(I)}return{back:Y,endOfFile:R,nextToken:D,position:v}};let oo=Le,oi=class extends oo{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}};var Vs=oi;oi.default=oi;oo.registerAtRule(oi);let lo=Le,ao,uo,Xe=class extends lo{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,i){let r=super.normalize(e);if(t){if(i==="prepend")this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let o of r)o.raws.before=t.raws.before}return r}removeChild(e,t){let i=this.index(e);return!t&&i===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[i].raws.before),super.removeChild(e)}toResult(e={}){return new ao(new uo,this,e).stringify()}};Xe.registerLazyResult=s=>{ao=s};Xe.registerProcessor=s=>{uo=s};var xt=Xe;Xe.default=Xe;lo.registerRoot(Xe);let gt={comma(s){return gt.split(s,[","],!0)},space(s){let e=[" ",`
`," "];return gt.split(s,e)},split(s,e,t){let i=[],r="",o=!1,n=0,l=!1,a="",u=!1;for(let c of s)u?u=!1:c==="\\"?u=!0:l?c===a&&(l=!1):c==='"'||c==="'"?(l=!0,a=c):c==="("?n+=1:c===")"?n>0&&(n-=1):n===0&&e.includes(c)&&(o=!0),o?(r!==""&&i.push(r.trim()),r="",o=!1):r+=c;return(t||r!=="")&&i.push(r.trim()),i}};var co=gt;gt.default=gt;let ho=Le,Qa=co,li=class extends ho{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return Qa.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,i=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(i)}};var js=li;li.default=li;ho.registerRule(li);let qa=bi,eu=Ka,tu=Si,iu=Vs,su=xt,Mr=js;const Ir={empty:!0,space:!0};function ru(s){for(let e=s.length-1;e>=0;e--){let t=s[e],i=t[3]||t[2];if(i)return i}}let nu=class{constructor(e){this.input=e,this.root=new su,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t=new iu;t.name=e[1].slice(1),t.name===""&&this.unnamedAtrule(t,e),this.init(t,e[2]);let i,r,o,n=!1,l=!1,a=[],u=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),i=e[0],i==="("||i==="["?u.push(i==="("?")":"]"):i==="{"&&u.length>0?u.push("}"):i===u[u.length-1]&&u.pop(),u.length===0)if(i===";"){t.source.end=this.getPosition(e[2]),t.source.end.offset++,this.semicolon=!0;break}else if(i==="{"){l=!0;break}else if(i==="}"){if(a.length>0){for(o=a.length-1,r=a[o];r&&r[0]==="space";)r=a[--o];r&&(t.source.end=this.getPosition(r[3]||r[2]),t.source.end.offset++)}this.end(e);break}else a.push(e);else a.push(e);if(this.tokenizer.endOfFile()){n=!0;break}}t.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(t.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(t,"params",a),n&&(e=a[a.length-1],t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++,this.spaces=t.raws.between,t.raws.between="")):(t.raws.afterName="",t.params=""),l&&(t.nodes=[],this.current=t)}checkMissedSemicolon(e){let t=this.colon(e);if(t===!1)return;let i=0,r;for(let o=t-1;o>=0&&(r=e[o],!(r[0]!=="space"&&(i+=1,i===2)));o--);throw this.input.error("Missed semicolon",r[0]==="word"?r[3]+1:r[2])}colon(e){let t=0,i,r,o;for(let[n,l]of e.entries()){if(i=l,r=i[0],r==="("&&(t+=1),r===")"&&(t-=1),t===0&&r===":")if(!o)this.doubleColon(i);else{if(o[0]==="word"&&o[1]==="progid")continue;return n}o=i}return!1}comment(e){let t=new tu;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let i=e[1].slice(2,-2);if(/^\s*$/.test(i))t.text="",t.raws.left=i,t.raws.right="";else{let r=i.match(/^(\s*)([^]*\S)(\s*)$/);t.text=r[2],t.raws.left=r[1],t.raws.right=r[3]}}createTokenizer(){this.tokenizer=eu(this.input)}decl(e,t){let i=new qa;this.init(i,e[0][2]);let r=e[e.length-1];for(r[0]===";"&&(this.semicolon=!0,e.pop()),i.source.end=this.getPosition(r[3]||r[2]||ru(e)),i.source.end.offset++;e[0][0]!=="word";)e.length===1&&this.unknownWord(e),i.raws.before+=e.shift()[1];for(i.source.start=this.getPosition(e[0][2]),i.prop="";e.length;){let u=e[0][0];if(u===":"||u==="space"||u==="comment")break;i.prop+=e.shift()[1]}i.raws.between="";let o;for(;e.length;)if(o=e.shift(),o[0]===":"){i.raws.between+=o[1];break}else o[0]==="word"&&/\w/.test(o[1])&&this.unknownWord([o]),i.raws.between+=o[1];(i.prop[0]==="_"||i.prop[0]==="*")&&(i.raws.before+=i.prop[0],i.prop=i.prop.slice(1));let n=[],l;for(;e.length&&(l=e[0][0],!(l!=="space"&&l!=="comment"));)n.push(e.shift());this.precheckMissedSemicolon(e);for(let u=e.length-1;u>=0;u--){if(o=e[u],o[1].toLowerCase()==="!important"){i.important=!0;let c=this.stringFrom(e,u);c=this.spacesFromEnd(e)+c,c!==" !important"&&(i.raws.important=c);break}else if(o[1].toLowerCase()==="important"){let c=e.slice(0),h="";for(let f=u;f>0;f--){let g=c[f][0];if(h.trim().indexOf("!")===0&&g!=="space")break;h=c.pop()[1]+h}h.trim().indexOf("!")===0&&(i.important=!0,i.raws.important=h,e=c)}if(o[0]!=="space"&&o[0]!=="comment")break}e.some(u=>u[0]!=="space"&&u[0]!=="comment")&&(i.raws.between+=n.map(u=>u[1]).join(""),n=[]),this.raw(i,"value",n.concat(e),t),i.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new Mr;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let t=this.current.nodes[this.current.nodes.length-1];t&&t.type==="rule"&&!t.raws.ownSemicolon&&(t.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="",e.type!=="comment"&&(this.semicolon=!1)}other(e){let t=!1,i=null,r=!1,o=null,n=[],l=e[1].startsWith("--"),a=[],u=e;for(;u;){if(i=u[0],a.push(u),i==="("||i==="[")o||(o=u),n.push(i==="("?")":"]");else if(l&&r&&i==="{")o||(o=u),n.push("}");else if(n.length===0)if(i===";")if(r){this.decl(a,l);return}else break;else if(i==="{"){this.rule(a);return}else if(i==="}"){this.tokenizer.back(a.pop()),t=!0;break}else i===":"&&(r=!0);else i===n[n.length-1]&&(n.pop(),n.length===0&&(o=null));u=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),n.length>0&&this.unclosedBracket(o),t&&r){if(!l)for(;a.length&&(u=a[a.length-1][0],!(u!=="space"&&u!=="comment"));)this.tokenizer.back(a.pop());this.decl(a,l)}else this.unknownWord(a)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e);break}this.endFile()}precheckMissedSemicolon(){}raw(e,t,i,r){let o,n,l=i.length,a="",u=!0,c,h;for(let f=0;f<l;f+=1)o=i[f],n=o[0],n==="space"&&f===l-1&&!r?u=!1:n==="comment"?(h=i[f-1]?i[f-1][0]:"empty",c=i[f+1]?i[f+1][0]:"empty",!Ir[h]&&!Ir[c]?a.slice(-1)===","?u=!1:a+=o[1]:u=!1):a+=o[1];if(!u){let f=i.reduce((g,d)=>g+d[1],"");e.raws[t]={raw:f,value:a}}e[t]=a}rule(e){e.pop();let t=new Mr;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,i="";for(;e.length&&(t=e[e.length-1][0],!(t!=="space"&&t!=="comment"));)i=e.pop()[1]+i;return i}spacesAndCommentsFromStart(e){let t,i="";for(;e.length&&(t=e[0][0],!(t!=="space"&&t!=="comment"));)i+=e.shift()[1];return i}spacesFromEnd(e){let t,i="";for(;e.length&&(t=e[e.length-1][0],t==="space");)i=e.pop()[1]+i;return i}stringFrom(e,t){let i="";for(let r=t;r<e.length;r++)i+=e[r][1];return e.splice(t,e.length-t),i}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word",{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}};var ou=nu;let lu=Le,au=ou,uu=Ci;function ai(s,e){let t=new uu(s,e),i=new au(t);try{i.parse()}catch(r){throw r}return i.root}var Ys=ai;ai.default=ai;lu.registerParse(ai);let{isClean:we,my:cu}=Et,hu=Zn,fu=wi,pu=Le,du=Ws,Dr=Gs,mu=Ys,gu=xt;const yu={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},wu={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},vu={Once:!0,postcssPlugin:!0,prepare:!0},Je=0;function rt(s){return typeof s=="object"&&typeof s.then=="function"}function fo(s){let e=!1,t=yu[s.type];return s.type==="decl"?e=s.prop.toLowerCase():s.type==="atrule"&&(e=s.name.toLowerCase()),e&&s.append?[t,t+"-"+e,Je,t+"Exit",t+"Exit-"+e]:e?[t,t+"-"+e,t+"Exit",t+"Exit-"+e]:s.append?[t,Je,t+"Exit"]:[t,t+"Exit"]}function Or(s){let e;return s.type==="document"?e=["Document",Je,"DocumentExit"]:s.type==="root"?e=["Root",Je,"RootExit"]:e=fo(s),{eventIndex:0,events:e,iterator:0,node:s,visitorIndex:0,visitors:[]}}function us(s){return s[we]=!1,s.nodes&&s.nodes.forEach(e=>us(e)),s}let cs={},Ke=class po{constructor(e,t,i){this.stringified=!1,this.processed=!1;let r;if(typeof t=="object"&&t!==null&&(t.type==="root"||t.type==="document"))r=us(t);else if(t instanceof po||t instanceof Dr)r=us(t.root),t.map&&(typeof i.map>"u"&&(i.map={}),i.map.inline||(i.map.inline=!1),i.map.prev=t.map);else{let o=mu;i.syntax&&(o=i.syntax.parse),i.parser&&(o=i.parser),o.parse&&(o=o.parse);try{r=o(t,i)}catch(n){this.processed=!0,this.error=n}r&&!r[cu]&&pu.rebuild(r)}this.result=new Dr(e,r,i),this.helpers={...cs,postcss:cs,result:this.result},this.plugins=this.processor.plugins.map(o=>typeof o=="object"&&o.prepare?{...o,...o.prepare(this.result)}:o)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let i=this.result.lastPlugin;try{t&&t.addToError(e),this.error=e,e.name==="CssSyntaxError"&&!e.plugin?(e.plugin=i.postcssPlugin,e.setMessage()):i.postcssVersion}catch(r){console&&console.error&&console.error(r)}return e}prepareVisitors(){this.listeners={};let e=(t,i,r)=>{this.listeners[i]||(this.listeners[i]=[]),this.listeners[i].push([t,r])};for(let t of this.plugins)if(typeof t=="object")for(let i in t){if(!wu[i]&&/^[A-Z]/.test(i))throw new Error(`Unknown event ${i} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!vu[i])if(typeof t[i]=="object")for(let r in t[i])r==="*"?e(t,i,t[i][r]):e(t,i+"-"+r.toLowerCase(),t[i][r]);else typeof t[i]=="function"&&e(t,i,t[i])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let t=this.plugins[e],i=this.runOnRoot(t);if(rt(i))try{await i}catch(r){throw this.handleError(r)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[we];){e[we]=!0;let t=[Or(e)];for(;t.length>0;){let i=this.visitTick(t);if(rt(i))try{await i}catch(r){let o=t[t.length-1].node;throw this.handleError(r,o)}}}if(this.listeners.OnceExit)for(let[t,i]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if(e.type==="document"){let r=e.nodes.map(o=>i(o,this.helpers));await Promise.all(r)}else await i(e,this.helpers)}catch(r){throw this.handleError(r)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if(typeof e=="object"&&e.Once){if(this.result.root.type==="document"){let t=this.result.root.nodes.map(i=>e.Once(i,this.helpers));return rt(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}else if(typeof e=="function")return e(this.result.root,this.result)}catch(t){throw this.handleError(t)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=fu;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let r=new hu(t,this.result.root,this.result.opts).generate();return this.result.css=r[0],this.result.map=r[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins){let t=this.runOnRoot(e);if(rt(t))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[we];)e[we]=!0,this.walkSync(e);if(this.listeners.OnceExit)if(e.type==="document")for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,t){return this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[i,r]of e){this.result.lastPlugin=i;let o;try{o=r(t,this.helpers)}catch(n){throw this.handleError(n,t.proxyOf)}if(t.type!=="root"&&t.type!=="document"&&!t.parent)return!0;if(rt(o))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:i,visitors:r}=t;if(i.type!=="root"&&i.type!=="document"&&!i.parent){e.pop();return}if(r.length>0&&t.visitorIndex<r.length){let[n,l]=r[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===r.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=n;try{return l(i.toProxy(),this.helpers)}catch(a){throw this.handleError(a,i)}}if(t.iterator!==0){let n=t.iterator,l;for(;l=i.nodes[i.indexes[n]];)if(i.indexes[n]+=1,!l[we]){l[we]=!0,e.push(Or(l));return}t.iterator=0,delete i.indexes[n]}let o=t.events;for(;t.eventIndex<o.length;){let n=o[t.eventIndex];if(t.eventIndex+=1,n===Je){i.nodes&&i.nodes.length&&(i[we]=!0,t.iterator=i.getIterator());return}else if(this.listeners[n]){t.visitors=this.listeners[n];return}}e.pop()}walkSync(e){e[we]=!0;let t=fo(e);for(let i of t)if(i===Je)e.nodes&&e.each(r=>{r[we]||this.walkSync(r)});else{let r=this.listeners[i];if(r&&this.visitSync(r,e.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}};Ke.registerPostcss=s=>{cs=s};var mo=Ke;Ke.default=Ke;gu.registerLazyResult(Ke);du.registerLazyResult(Ke);let bu=Zn,Cu=wi,Su=Ys;const Eu=Gs;let hs=class{constructor(e,t,i){t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=i,this._map=void 0;let r,o=Cu;this.result=new Eu(this._processor,r,this._opts),this.result.css=t;let n=this;Object.defineProperty(this.result,"root",{get(){return n.root}});let l=new bu(o,r,this._opts,t);if(l.isMap()){let[a,u]=l.generate();a&&(this.result.css=a),u&&(this.result.map=u)}else l.clearAnnotation(),this.result.css=l.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return this.async().then(e,t)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,t=Su;try{e=t(this._css,this._opts)}catch(i){this.error=i}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}};var xu=hs;hs.default=hs;let Au=xu,Ru=mo,Nu=Ws,Mu=xt,yt=class{constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let i of e)if(i.postcss===!0?i=i():i.postcss&&(i=i.postcss),typeof i=="object"&&Array.isArray(i.plugins))t=t.concat(i.plugins);else if(typeof i=="object"&&i.postcssPlugin)t.push(i);else if(typeof i=="function")t.push(i);else if(!(typeof i=="object"&&(i.parse||i.stringify)))throw new Error(i+" is not a PostCSS plugin");return t}process(e,t={}){return!this.plugins.length&&!t.parser&&!t.stringifier&&!t.syntax?new Au(this,e,t):new Ru(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var Iu=yt;yt.default=yt;Mu.registerProcessor(yt);Nu.registerProcessor(yt);let Du=bi,Ou=Wn,_u=Si,Tu=Vs,ku=Ci,Pu=xt,Lu=js;function wt(s,e){if(Array.isArray(s))return s.map(r=>wt(r));let{inputs:t,...i}=s;if(t){e=[];for(let r of t){let o={...r,__proto__:ku.prototype};o.map&&(o.map={...o.map,__proto__:Ou.prototype}),e.push(o)}}if(i.nodes&&(i.nodes=s.nodes.map(r=>wt(r,e))),i.source){let{inputId:r,...o}=i.source;i.source=o,r!=null&&(i.source.input=e[r])}if(i.type==="root")return new Pu(i);if(i.type==="decl")return new Du(i);if(i.type==="rule")return new Lu(i);if(i.type==="comment")return new _u(i);if(i.type==="atrule")return new Tu(i);throw new Error("Unknown node type: "+s.type)}var $u=wt;wt.default=wt;let Fu=Bs,go=bi,Bu=mo,Uu=Le,Zs=Iu,zu=wi,Wu=$u,yo=Ws,Gu=no,wo=Si,vo=Vs,Vu=Gs,ju=Ci,Yu=Ys,Zu=co,bo=js,Co=xt,Hu=vi;function F(...s){return s.length===1&&Array.isArray(s[0])&&(s=s[0]),new Zs(s)}F.plugin=function(e,t){let i=!1;function r(...n){console&&console.warn&&!i&&(i=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide:
https://evilmartians.com/chronicles/postcss-8-plugin-migration`),ii.LANG&&ii.LANG.startsWith("cn")&&console.warn(e+`: 里面 postcss.plugin 被弃用. 迁移指南:
https://www.w3ctech.com/topic/2226`));let l=t(...n);return l.postcssPlugin=e,l.postcssVersion=new Zs().version,l}let o;return Object.defineProperty(r,"postcss",{get(){return o||(o=r()),o}}),r.process=function(n,l,a){return F([r(a)]).process(n,l)},r};F.stringify=zu;F.parse=Yu;F.fromJSON=Wu;F.list=Zu;F.comment=s=>new wo(s);F.atRule=s=>new vo(s);F.decl=s=>new go(s);F.rule=s=>new bo(s);F.root=s=>new Co(s);F.document=s=>new yo(s);F.CssSyntaxError=Fu;F.Declaration=go;F.Container=Uu;F.Processor=Zs;F.Document=yo;F.Comment=wo;F.Warning=Gu;F.AtRule=vo;F.Result=Vu;F.Input=ju;F.Rule=bo;F.Root=Co;F.Node=Hu;Bu.registerPostcss(F);var Xu=F;F.default=F;const j=aa(Xu);j.stringify;j.fromJSON;j.plugin;j.parse;j.list;j.document;j.comment;j.atRule;j.rule;j.decl;j.root;j.CssSyntaxError;j.Declaration;j.Container;j.Processor;j.Document;j.Comment;j.Warning;j.AtRule;j.Result;j.Input;j.Rule;j.Root;j.Node;const _r={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 Ju(s){let e=_r[s.tagName]?_r[s.tagName]:s.tagName;return e==="link"&&s.attributes._cssText&&(e="style"),e}function Ei(s,e){const t=e?.stylesWithHoverClass.get(s);if(t)return t;let i=s;try{i=j([oa,la]).process(s).css}catch(r){console.warn("Failed to adapt css for replay",r)}return e?.stylesWithHoverClass.set(s,i),i}function Tr(){return{stylesWithHoverClass:new Map}}function Ku(s,e,t,i){const r=[];for(const a of s.childNodes)a.type===K.Text&&r.push(a);const o=e.split("/* rr_split */");for(;o.length>1&&o.length>r.length;)o.splice(-2,2,o.slice(-2).join(""));let n="";t&&(n=Ei(o.join(""),i));let l=0;for(let a=0;a<r.length&&a!==o.length;a++){const u=r[a];if(!t)u.textContent=o[a];else if(a<o.length-1){let c=l,h=o[a+1].length;h=Math.min(h,30);let f=!1;for(;h>2;h--){const g=o[a+1].substring(0,h),d=n.substring(l).indexOf(g);if(f=d!==-1,f){c+=d;break}}f||(c+=o[a].length),u.textContent=n.substring(l,c),l=c}else u.textContent=n.substring(l)}}function Qu(s,e,t,i){const{doc:r,hackCss:o,cache:n}=i;s.childNodes.length?Ku(s,t,o,n):(o&&(t=Ei(t,n)),e.appendChild(r.createTextNode(t)))}function qu(s,e){var t;const{doc:i,hackCss:r,cache:o}=e;switch(s.type){case K.Document:return i.implementation.createDocument(null,"",null);case K.DocumentType:return i.implementation.createDocumentType(s.name||"html",s.publicId,s.systemId);case K.Element:{const n=Ju(s);let l;s.isSVG?l=i.createElementNS("http://www.w3.org/2000/svg",n):(s.isCustom&&((t=i.defaultView)!=null&&t.customElements)&&!i.defaultView.customElements.get(s.tagName)&&i.defaultView.customElements.define(s.tagName,class extends i.defaultView.HTMLElement{}),l=i.createElement(n));const a={};for(const u in s.attributes){if(!Object.prototype.hasOwnProperty.call(s.attributes,u))continue;let c=s.attributes[u];if(!(n==="option"&&u==="selected"&&c===!1)&&c!==null){if(c===!0&&(c=""),u.startsWith("rr_")){a[u]=c;continue}if(typeof c=="string"){if(n==="style"&&u==="_cssText"){Qu(s,l,c,e);continue}else if(n==="textarea"&&u==="value"){l.appendChild(i.createTextNode(c)),s.childNodes=[];continue}}try{if(s.isSVG&&u==="xlink:href")l.setAttributeNS("http://www.w3.org/1999/xlink",u,c.toString());else if(u==="onload"||u==="onclick"||u.substring(0,7)==="onmouse")l.setAttribute("_"+u,c.toString());else if(n==="meta"&&s.attributes["http-equiv"]==="Content-Security-Policy"&&u==="content"){l.setAttribute("csp-content",c.toString());continue}else n==="link"&&(s.attributes.rel==="preload"&&s.attributes.as==="script"||s.attributes.rel==="modulepreload")||n==="link"&&s.attributes.rel==="prefetch"&&typeof s.attributes.href=="string"&&ra(s.attributes.href)==="js"||(n==="img"&&s.attributes.srcset&&s.attributes.rr_dataURL?l.setAttribute("rrweb-original-srcset",s.attributes.srcset):l.setAttribute(u,c.toString()))}catch{}}}for(const u in a){const c=a[u];if(n==="canvas"&&u==="rr_dataURL"){const h=i.createElement("img");h.onload=()=>{const f=l.getContext("2d");f&&f.drawImage(h,0,0,h.width,h.height)},h.src=c.toString(),l.RRNodeType&&(l.rr_dataURL=c.toString())}else if(n==="img"&&u==="rr_dataURL"){const h=l;h.currentSrc.startsWith("data:")||(h.setAttribute("rrweb-original-src",s.attributes.src),h.src=c.toString())}if(u==="rr_width")l.style.setProperty("width",c.toString());else if(u==="rr_height")l.style.setProperty("height",c.toString());else if(u==="rr_mediaCurrentTime"&&typeof c=="number")l.currentTime=c;else if(u==="rr_mediaState")switch(c){case"played":l.play().catch(h=>console.warn("media playback error",h));break;case"paused":l.pause();break}else u==="rr_mediaPlaybackRate"&&typeof c=="number"?l.playbackRate=c:u==="rr_mediaMuted"&&typeof c=="boolean"?l.muted=c:u==="rr_mediaLoop"&&typeof c=="boolean"?l.loop=c:u==="rr_mediaVolume"&&typeof c=="number"?l.volume=c:u==="rr_open_mode"&&l.setAttribute("rr_open_mode",c)}if(s.isShadowHost)if(!l.shadowRoot)l.attachShadow({mode:"open"});else for(;l.shadowRoot.firstChild;)l.shadowRoot.removeChild(l.shadowRoot.firstChild);return l}case K.Text:return s.isStyle&&r?i.createTextNode(Ei(s.textContent,o)):i.createTextNode(s.textContent);case K.CDATA:return i.createCDATASection(s.textContent);case K.Comment:return i.createComment(s.textContent);default:return null}}function ht(s,e){const{doc:t,mirror:i,skipChild:r=!1,hackCss:o=!0,afterAppend:n,cache:l}=e;if(i.has(s.id)){const u=i.getNode(s.id),c=i.getMeta(u);if(sa(c,s))return i.getNode(s.id)}let a=qu(s,{doc:t,hackCss:o,cache:l});if(!a)return null;if(s.rootId&&i.getNode(s.rootId)!==t&&i.replace(s.rootId,t),s.type===K.Document&&(t.close(),t.open(),s.compatMode==="BackCompat"&&s.childNodes&&s.childNodes[0].type!==K.DocumentType&&(s.childNodes[0].type===K.Element&&"xmlns"in s.childNodes[0].attributes&&s.childNodes[0].attributes.xmlns==="http://www.w3.org/1999/xhtml"?t.write('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">'):t.write('<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">')),a=t),i.add(a,s),(s.type===K.Document||s.type===K.Element)&&!r)for(const u of s.childNodes){const c=ht(u,{doc:t,mirror:i,skipChild:!1,hackCss:o,afterAppend:n,cache:l});if(!c){console.warn("Failed to rebuild",u);continue}if(u.isShadow&&ta(a)&&a.shadowRoot)a.shadowRoot.appendChild(c);else if(s.type===K.Document&&u.type==K.Element){const h=c;let f=null;h.childNodes.forEach(g=>{g.nodeName==="BODY"&&(f=g)}),f?(h.removeChild(f),a.appendChild(c),h.appendChild(f)):a.appendChild(c)}else a.appendChild(c);n&&n(c,u.id)}return a}function ec(s,e){function t(i){e(i)}for(const i of s.getIds())s.has(i)&&t(s.getNode(i))}function tc(s,e){const t=e.getMeta(s);if(t?.type!==K.Element)return;const i=s;for(const r in t.attributes){if(!(Object.prototype.hasOwnProperty.call(t.attributes,r)&&r.startsWith("rr_")))continue;const o=t.attributes[r];r==="rr_scrollLeft"&&(i.scrollLeft=o),r==="rr_scrollTop"&&(i.scrollTop=o)}}function ic(s,e){const{doc:t,onVisit:i,hackCss:r=!0,afterAppend:o,cache:n,mirror:l=new $n}=e,a=ht(s,{doc:t,mirror:l,skipChild:!1,hackCss:r,afterAppend:o,cache:n});return ec(l,u=>{i&&i(u),tc(u,l)}),a}var sc=Object.defineProperty,rc=(s,e,t)=>e in s?sc(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,C=(s,e,t)=>rc(s,typeof e!="symbol"?e+"":e,t),nc=Object.defineProperty,oc=(s,e,t)=>e in s?nc(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,kr=(s,e,t)=>oc(s,typeof e!="symbol"?e+"":e,t);let lc=class{constructor(){kr(this,"idNodeMap",new Map),kr(this,"nodeMetaMap",new WeakMap)}getId(e){var t;return e?((t=this.getMeta(e))==null?void 0:t.id)??-1:-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){const t=this.getId(e);this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach(i=>this.removeNodeFromMap(i))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){const i=t.id;this.idNodeMap.set(i,e),this.nodeMetaMap.set(e,t)}replace(e,t){const i=this.getNode(e);if(i){const r=this.nodeMetaMap.get(i);r&&this.nodeMetaMap.set(t,r)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function ac(){return new lc}function uc(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}function cc(s){if(s.__esModule)return s;var e=s.default;if(typeof e=="function"){var t=function i(){return this instanceof i?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(s).forEach(function(i){var r=Object.getOwnPropertyDescriptor(s,i);Object.defineProperty(t,i,r.get?r:{enumerable:!0,get:function(){return s[i]}})}),t}var Hs={exports:{}},G=String,So=function(){return{isColorSupported:!1,reset:G,bold:G,dim:G,italic:G,underline:G,inverse:G,hidden:G,strikethrough:G,black:G,red:G,green:G,yellow:G,blue:G,magenta:G,cyan:G,white:G,gray:G,bgBlack:G,bgRed:G,bgGreen:G,bgYellow:G,bgBlue:G,bgMagenta:G,bgCyan:G,bgWhite:G}};Hs.exports=So();Hs.exports.createColors=So;var hc=Hs.exports;const fc={},pc=Object.freeze(Object.defineProperty({__proto__:null,default:fc},Symbol.toStringTag,{value:"Module"})),de=cc(pc);let Pr=hc,Lr=de,fs=class Eo extends Error{constructor(e,t,i,r,o,n){super(e),this.name="CssSyntaxError",this.reason=e,o&&(this.file=o),r&&(this.source=r),n&&(this.plugin=n),typeof t<"u"&&typeof i<"u"&&(typeof t=="number"?(this.line=t,this.column=i):(this.line=t.line,this.column=t.column,this.endLine=i.line,this.endColumn=i.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,Eo)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let t=this.source;e==null&&(e=Pr.isColorSupported),Lr&&e&&(t=Lr(t));let i=t.split(/\r?\n/),r=Math.max(this.line-3,0),o=Math.min(this.line+2,i.length),n=String(o).length,l,a;if(e){let{bold:u,gray:c,red:h}=Pr.createColors(!0);l=f=>u(h(f)),a=f=>c(f)}else l=a=u=>u;return i.slice(r,o).map((u,c)=>{let h=r+1+c,f=" "+(" "+h).slice(-n)+" | ";if(h===this.line){let g=a(f.replace(/\d/g," "))+u.slice(0,this.column-1).replace(/[^\t]/g," ");return l(">")+a(f)+u+`
`+g+l("^")}return" "+a(f)+u}).join(`
`)}toString(){let e=this.showSourceCode();return e&&(e=`
`+e+`
`),this.name+": "+this.message+e}};var Xs=fs;fs.default=fs;var At={};At.isClean=Symbol("isClean");At.my=Symbol("my");const $r={after:`
`,beforeClose:`
`,beforeComment:`
`,beforeDecl:`
`,beforeOpen:" ",beforeRule:`
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function dc(s){return s[0].toUpperCase()+s.slice(1)}let ps=class{constructor(e){this.builder=e}atrule(e,t){let i="@"+e.name,r=e.params?this.rawValue(e,"params"):"";if(typeof e.raws.afterName<"u"?i+=e.raws.afterName:r&&(i+=" "),e.nodes)this.block(e,i+r);else{let o=(e.raws.between||"")+(t?";":"");this.builder(i+r+o,e)}}beforeAfter(e,t){let i;e.type==="decl"?i=this.raw(e,null,"beforeDecl"):e.type==="comment"?i=this.raw(e,null,"beforeComment"):t==="before"?i=this.raw(e,null,"beforeRule"):i=this.raw(e,null,"beforeClose");let r=e.parent,o=0;for(;r&&r.type!=="root";)o+=1,r=r.parent;if(i.includes(`
`)){let n=this.raw(e,null,"indent");if(n.length)for(let l=0;l<o;l++)i+=n}return i}block(e,t){let i=this.raw(e,"between","beforeOpen");this.builder(t+i+"{",e,"start");let r;e.nodes&&e.nodes.length?(this.body(e),r=this.raw(e,"after")):r=this.raw(e,"after","emptyBody"),r&&this.builder(r),this.builder("}",e,"end")}body(e){let t=e.nodes.length-1;for(;t>0&&e.nodes[t].type==="comment";)t-=1;let i=this.raw(e,"semicolon");for(let r=0;r<e.nodes.length;r++){let o=e.nodes[r],n=this.raw(o,"before");n&&this.builder(n),this.stringify(o,t!==r||i)}}comment(e){let t=this.raw(e,"left","commentLeft"),i=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+i+"*/",e)}decl(e,t){let i=this.raw(e,"between","colon"),r=e.prop+i+this.rawValue(e,"value");e.important&&(r+=e.raws.important||" !important"),t&&(r+=";"),this.builder(r,e)}document(e){this.body(e)}raw(e,t,i){let r;if(i||(i=t),t&&(r=e.raws[t],typeof r<"u"))return r;let o=e.parent;if(i==="before"&&(!o||o.type==="root"&&o.first===e||o&&o.type==="document"))return"";if(!o)return $r[i];let n=e.root();if(n.rawCache||(n.rawCache={}),typeof n.rawCache[i]<"u")return n.rawCache[i];if(i==="before"||i==="after")return this.beforeAfter(e,i);{let l="raw"+dc(i);this[l]?r=this[l](n,e):n.walk(a=>{if(r=a.raws[t],typeof r<"u")return!1})}return typeof r>"u"&&(r=$r[i]),n.rawCache[i]=r,r}rawBeforeClose(e){let t;return e.walk(i=>{if(i.nodes&&i.nodes.length>0&&typeof i.raws.after<"u")return t=i.raws.after,t.includes(`
`)&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let i;return e.walkComments(r=>{if(typeof r.raws.before<"u")return i=r.raws.before,i.includes(`
`)&&(i=i.replace(/[^\n]+$/,"")),!1}),typeof i>"u"?i=this.raw(t,null,"beforeDecl"):i&&(i=i.replace(/\S/g,"")),i}rawBeforeDecl(e,t){let i;return e.walkDecls(r=>{if(typeof r.raws.before<"u")return i=r.raws.before,i.includes(`
`)&&(i=i.replace(/[^\n]+$/,"")),!1}),typeof i>"u"?i=this.raw(t,null,"beforeRule"):i&&(i=i.replace(/\S/g,"")),i}rawBeforeOpen(e){let t;return e.walk(i=>{if(i.type!=="decl"&&(t=i.raws.between,typeof t<"u"))return!1}),t}rawBeforeRule(e){let t;return e.walk(i=>{if(i.nodes&&(i.parent!==e||e.first!==i)&&typeof i.raws.before<"u")return t=i.raws.before,t.includes(`
`)&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls(i=>{if(typeof i.raws.between<"u")return t=i.raws.between.replace(/[^\s:]/g,""),!1}),t}rawEmptyBody(e){let t;return e.walk(i=>{if(i.nodes&&i.nodes.length===0&&(t=i.raws.after,typeof t<"u"))return!1}),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk(i=>{let r=i.parent;if(r&&r!==e&&r.parent&&r.parent===e&&typeof i.raws.before<"u"){let o=i.raws.before.split(`
`);return t=o[o.length-1],t=t.replace(/\S/g,""),!1}}),t}rawSemicolon(e){let t;return e.walk(i=>{if(i.nodes&&i.nodes.length&&i.last.type==="decl"&&(t=i.raws.semicolon,typeof t<"u"))return!1}),t}rawValue(e,t){let i=e[t],r=e.raws[t];return r&&r.value===i?r.raw:i}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}};var xo=ps;ps.default=ps;let mc=xo;function ds(s,e){new mc(e).stringify(s)}var xi=ds;ds.default=ds;let{isClean:$t,my:gc}=At,yc=Xs,wc=xo,vc=xi;function ms(s,e){let t=new s.constructor;for(let i in s){if(!Object.prototype.hasOwnProperty.call(s,i)||i==="proxyCache")continue;let r=s[i],o=typeof r;i==="parent"&&o==="object"?e&&(t[i]=e):i==="source"?t[i]=r:Array.isArray(r)?t[i]=r.map(n=>ms(n,t)):(o==="object"&&r!==null&&(r=ms(r)),t[i]=r)}return t}let gs=class{constructor(e={}){this.raws={},this[$t]=!1,this[gc]=!0;for(let t in e)if(t==="nodes"){this.nodes=[];for(let i of e[t])typeof i.clone=="function"?this.append(i.clone()):this.append(i)}else this[t]=e[t]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let t in e)this[t]=e[t];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let t=ms(this);for(let i in e)t[i]=e[i];return t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}error(e,t={}){if(this.source){let{end:i,start:r}=this.rangeBy(t);return this.source.input.error(e,{column:r.column,line:r.line},{column:i.column,line:i.line},t)}return new yc(e)}getProxyProcessor(){return{get(e,t){return t==="proxyOf"?e:t==="root"?()=>e.root().toProxy():e[t]},set(e,t,i){return e[t]===i||(e[t]=i,(t==="prop"||t==="value"||t==="name"||t==="params"||t==="important"||t==="text")&&e.markDirty()),!0}}}markDirty(){if(this[$t]){this[$t]=!1;let e=this;for(;e=e.parent;)e[$t]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let i=this.source.start;if(e.index)i=this.positionInside(e.index,t);else if(e.word){t=this.toString();let r=t.indexOf(e.word);r!==-1&&(i=this.positionInside(r,t))}return i}positionInside(e,t){let i=t||this.toString(),r=this.source.start.column,o=this.source.start.line;for(let n=0;n<e;n++)i[n]===`
`?(r=1,o+=1):r+=1;return{column:r,line:o}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e){let t={column:this.source.start.column,line:this.source.start.line},i=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:t.column+1,line:t.line};if(e.word){let r=this.toString(),o=r.indexOf(e.word);o!==-1&&(t=this.positionInside(o,r),i=this.positionInside(o+e.word.length,r))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?i={column:e.end.column,line:e.end.line}:typeof e.endIndex=="number"?i=this.positionInside(e.endIndex):e.index&&(i=this.positionInside(e.index+1));return(i.line<t.line||i.line===t.line&&i.column<=t.column)&&(i={column:t.column+1,line:t.line}),{end:i,start:t}}raw(e,t){return new wc().raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let t=this,i=!1;for(let r of e)r===this?i=!0:i?(this.parent.insertAfter(t,r),t=r):this.parent.insertBefore(t,r);i||this.remove()}return this}root(){let e=this;for(;e.parent&&e.parent.type!=="document";)e=e.parent;return e}toJSON(e,t){let i={},r=t==null;t=t||new Map;let o=0;for(let n in this){if(!Object.prototype.hasOwnProperty.call(this,n)||n==="parent"||n==="proxyCache")continue;let l=this[n];if(Array.isArray(l))i[n]=l.map(a=>typeof a=="object"&&a.toJSON?a.toJSON(null,t):a);else if(typeof l=="object"&&l.toJSON)i[n]=l.toJSON(null,t);else if(n==="source"){let a=t.get(l.input);a==null&&(a=o,t.set(l.input,o),o++),i[n]={end:l.end,inputId:a,start:l.start}}else i[n]=l}return r&&(i.inputs=[...t.keys()].map(n=>n.toJSON())),i}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=vc){e.stringify&&(e=e.stringify);let t="";return e(this,i=>{t+=i}),t}warn(e,t,i){let r={node:this};for(let o in i)r[o]=i[o];return e.warn(t,r)}get proxyOf(){return this}};var Ai=gs;gs.default=gs;let bc=Ai,ys=class extends bc{constructor(e){e&&typeof e.value<"u"&&typeof e.value!="string"&&(e={...e,value:String(e.value)}),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}};var Ri=ys;ys.default=ys;let Cc="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",Sc=(s=21)=>{let e="",t=s;for(;t--;)e+=Cc[Math.random()*64|0];return e};var Ec={nanoid:Sc};let{SourceMapConsumer:Fr,SourceMapGenerator:Br}=de,{existsSync:xc,readFileSync:Ac}=de,{dirname:$i,join:Rc}=de;function Nc(s){return Buffer?Buffer.from(s,"base64").toString():window.atob(s)}let ws=class{constructor(e,t){if(t.map===!1)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let i=t.map?t.map.prev:void 0,r=this.loadMap(t.from,i);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=$i(this.mapFile)),r&&(this.text=r)}consumer(){return this.consumerCache||(this.consumerCache=new Fr(this.text)),this.consumerCache}decodeInline(e){let t=/^data:application\/json;charset=utf-?8;base64,/,i=/^data:application\/json;base64,/,r=/^data:application\/json;charset=utf-?8,/,o=/^data:application\/json,/;if(r.test(e)||o.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(t.test(e)||i.test(e))return Nc(e.substr(RegExp.lastMatch.length));let n=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+n)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return typeof e!="object"?!1:typeof e.mappings=="string"||typeof e._mappings=="string"||Array.isArray(e.sections)}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/gm);if(!t)return;let i=e.lastIndexOf(t.pop()),r=e.indexOf("*/",i);i>-1&&r>-1&&(this.annotation=this.getAnnotationURL(e.substring(i,r)))}loadFile(e){if(this.root=$i(e),xc(e))return this.mapFile=e,Ac(e,"utf-8").toString().trim()}loadMap(e,t){if(t===!1)return!1;if(t){if(typeof t=="string")return t;if(typeof t=="function"){let i=t(e);if(i){let r=this.loadFile(i);if(!r)throw new Error("Unable to load previous source map: "+i.toString());return r}}else{if(t instanceof Fr)return Br.fromSourceMap(t).toString();if(t instanceof Br)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let i=this.annotation;return e&&(i=Rc($i(e),i)),this.loadFile(i)}}}startWith(e,t){return e?e.substr(0,t.length)===t:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};var Ao=ws;ws.default=ws;let{SourceMapConsumer:Mc,SourceMapGenerator:Ic}=de,{fileURLToPath:Ur,pathToFileURL:Ft}=de,{isAbsolute:vs,resolve:bs}=de,{nanoid:Dc}=Ec,Fi=de,zr=Xs,Oc=Ao,Bi=Symbol("fromOffsetCache"),_c=!!(Mc&&Ic),Wr=!!(bs&&vs),ui=class{constructor(e,t={}){if(e===null||typeof e>"u"||typeof e=="object"&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),this.css[0]==="\uFEFF"||this.css[0]===""?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(!Wr||/^\w+:\/\//.test(t.from)||vs(t.from)?this.file=t.from:this.file=bs(t.from)),Wr&&_c){let i=new Oc(this.css,t);if(i.text){this.map=i;let r=i.consumer().file;!this.file&&r&&(this.file=this.mapResolve(r))}}this.file||(this.id="<input css "+Dc(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,i,r={}){let o,n,l;if(t&&typeof t=="object"){let u=t,c=i;if(typeof u.offset=="number"){let h=this.fromOffset(u.offset);t=h.line,i=h.col}else t=u.line,i=u.column;if(typeof c.offset=="number"){let h=this.fromOffset(c.offset);n=h.line,l=h.col}else n=c.line,l=c.column}else if(!i){let u=this.fromOffset(t);t=u.line,i=u.col}let a=this.origin(t,i,n,l);return a?o=new zr(e,a.endLine===void 0?a.line:{column:a.column,line:a.line},a.endLine===void 0?a.column:{column:a.endColumn,line:a.endLine},a.source,a.file,r.plugin):o=new zr(e,n===void 0?t:{column:i,line:t},n===void 0?i:{column:l,line:n},this.css,this.file,r.plugin),o.input={column:i,endColumn:l,endLine:n,line:t,source:this.css},this.file&&(Ft&&(o.input.url=Ft(this.file).toString()),o.input.file=this.file),o}fromOffset(e){let t,i;if(this[Bi])i=this[Bi];else{let o=this.css.split(`
`);i=new Array(o.length);let n=0;for(let l=0,a=o.length;l<a;l++)i[l]=n,n+=o[l].length+1;this[Bi]=i}t=i[i.length-1];let r=0;if(e>=t)r=i.length-1;else{let o=i.length-2,n;for(;r<o;)if(n=r+(o-r>>1),e<i[n])o=n-1;else if(e>=i[n+1])r=n+1;else{r=n;break}}return{col:e-i[r]+1,line:r+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:bs(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,i,r){if(!this.map)return!1;let o=this.map.consumer(),n=o.originalPositionFor({column:t,line:e});if(!n.source)return!1;let l;typeof i=="number"&&(l=o.originalPositionFor({column:r,line:i}));let a;vs(n.source)?a=Ft(n.source):a=new URL(n.source,this.map.consumer().sourceRoot||Ft(this.map.mapFile));let u={column:n.column,endColumn:l&&l.column,endLine:l&&l.line,line:n.line,url:a.toString()};if(a.protocol==="file:")if(Ur)u.file=Ur(a);else throw new Error("file: protocol is not available in this PostCSS build");let c=o.sourceContentFor(n.source);return c&&(u.source=c),u}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])this[t]!=null&&(e[t]=this[t]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}};var Ni=ui;ui.default=ui;Fi&&Fi.registerInput&&Fi.registerInput(ui);let{SourceMapConsumer:Ro,SourceMapGenerator:ei}=de,{dirname:ti,relative:No,resolve:Mo,sep:Io}=de,{pathToFileURL:Gr}=de,Tc=Ni,kc=!!(Ro&&ei),Pc=!!(ti&&Mo&&No&&Io),Lc=class{constructor(e,t,i,r){this.stringify=e,this.mapOpts=i.map||{},this.root=t,this.opts=i,this.css=r,this.originalCSS=r,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;this.isInline()?e="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?e=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?e=this.mapOpts.annotation(this.opts.to,this.root):e=this.outputFile()+".map";let t=`
`;this.css.includes(`\r
`)&&(t=`\r
`),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t=this.toUrl(this.path(e.file)),i=e.root||ti(e.file),r;this.mapOpts.sourcesContent===!1?(r=new Ro(e.text),r.sourcesContent&&(r.sourcesContent=null)):r=e.consumer(),this.map.applySourceMap(r,t,this.toUrl(this.path(i)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],e.type==="comment"&&e.text.indexOf("# sourceMappingURL=")===0&&this.root.removeChild(t)}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),Pc&&kc&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,t=>{e+=t}),[e]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=ei.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new ei({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 ei({file:this.outputFile(),ignoreInvalidMapping:!0});let e=1,t=1,i="<no source>",r={generated:{column:0,line:0},original:{column:0,line:0},source:""},o,n;this.stringify(this.root,(l,a,u)=>{if(this.css+=l,a&&u!=="end"&&(r.generated.line=e,r.generated.column=t-1,a.source&&a.source.start?(r.source=this.sourcePath(a),r.original.line=a.source.start.line,r.original.column=a.source.start.column-1,this.map.addMapping(r)):(r.source=i,r.original.line=1,r.original.column=0,this.map.addMapping(r))),o=l.match(/\n/g),o?(e+=o.length,n=l.lastIndexOf(`
`),t=l.length-n):t+=l.length,a&&u!=="start"){let c=a.parent||{raws:{}};(!(a.type==="decl"||a.type==="atrule"&&!a.nodes)||a!==c.last||c.raws.semicolon)&&(a.source&&a.source.end?(r.source=this.sourcePath(a),r.original.line=a.source.end.line,r.original.column=a.source.end.column-1,r.generated.line=e,r.generated.column=t-2,this.map.addMapping(r)):(r.source=i,r.original.line=1,r.original.column=0,r.generated.line=e,r.generated.column=t-1,this.map.addMapping(r)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(e=>e.annotation):!0}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let e=this.mapOpts.annotation;return typeof e<"u"&&e!==!0?!1:this.previous().length?this.previous().some(t=>t.inline):!0}isMap(){return typeof this.opts.map<"u"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent<"u"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(e=>e.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute||e.charCodeAt(0)===60||/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let i=this.opts.to?ti(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(i=ti(Mo(i,this.mapOpts.annotation)));let r=No(i,e);return this.memoizedPaths.set(e,r),r}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}});else{let e=new Tc(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(t=>{if(t.source){let i=t.source.input.from;if(i&&!e[i]){e[i]=!0;let r=this.usesFileUrls?this.toFileUrl(i):this.toUrl(this.path(i));this.map.setSourceContent(r,t.source.input.css)}}});else if(this.css){let t=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(t,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(Gr){let i=Gr(e).toString();return this.memoizedFileURLs.set(e,i),i}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;Io==="\\"&&(e=e.replace(/\\/g,"/"));let i=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,i),i}};var Do=Lc;let $c=Ai,Cs=class extends $c{constructor(e){super(e),this.type="comment"}};var Mi=Cs;Cs.default=Cs;let{isClean:Oo,my:_o}=At,To=Ri,ko=Mi,Fc=Ai,Po,Js,Ks,Lo;function $o(s){return s.map(e=>(e.nodes&&(e.nodes=$o(e.nodes)),delete e.source,e))}function Fo(s){if(s[Oo]=!1,s.proxyOf.nodes)for(let e of s.proxyOf.nodes)Fo(e)}let Ae=class Bo extends Fc{append(...e){for(let t of e){let i=this.normalize(t,this.last);for(let r of i)this.proxyOf.nodes.push(r)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t=this.getIterator(),i,r;for(;this.indexes[t]<this.proxyOf.nodes.length&&(i=this.indexes[t],r=e(this.proxyOf.nodes[i],i),r!==!1);)this.indexes[t]+=1;return delete this.indexes[t],r}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get(e,t){return t==="proxyOf"?e:e[t]?t==="each"||typeof t=="string"&&t.startsWith("walk")?(...i)=>e[t](...i.map(r=>typeof r=="function"?(o,n)=>r(o.toProxy(),n):r)):t==="every"||t==="some"?i=>e[t]((r,...o)=>i(r.toProxy(),...o)):t==="root"?()=>e.root().toProxy():t==="nodes"?e.nodes.map(i=>i.toProxy()):t==="first"||t==="last"?e[t].toProxy():e[t]:e[t]},set(e,t,i){return e[t]===i||(e[t]=i,(t==="name"||t==="params"||t==="selector")&&e.markDirty()),!0}}}index(e){return typeof e=="number"?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let i=this.index(e),r=this.normalize(t,this.proxyOf.nodes[i]).reverse();i=this.index(e);for(let n of r)this.proxyOf.nodes.splice(i+1,0,n);let o;for(let n in this.indexes)o=this.indexes[n],i<o&&(this.indexes[n]=o+r.length);return this.markDirty(),this}insertBefore(e,t){let i=this.index(e),r=i===0?"prepend":!1,o=this.normalize(t,this.proxyOf.nodes[i],r).reverse();i=this.index(e);for(let l of o)this.proxyOf.nodes.splice(i,0,l);let n;for(let l in this.indexes)n=this.indexes[l],i<=n&&(this.indexes[l]=n+o.length);return this.markDirty(),this}normalize(e,t){if(typeof e=="string")e=$o(Po(e).nodes);else if(typeof e>"u")e=[];else if(Array.isArray(e)){e=e.slice(0);for(let r of e)r.parent&&r.parent.removeChild(r,"ignore")}else if(e.type==="root"&&this.type!=="document"){e=e.nodes.slice(0);for(let r of e)r.parent&&r.parent.removeChild(r,"ignore")}else if(e.type)e=[e];else if(e.prop){if(typeof e.value>"u")throw new Error("Value field is missed in node creation");typeof e.value!="string"&&(e.value=String(e.value)),e=[new To(e)]}else if(e.selector)e=[new Js(e)];else if(e.name)e=[new Ks(e)];else if(e.text)e=[new ko(e)];else throw new Error("Unknown node type in node creation");return e.map(r=>(r[_o]||Bo.rebuild(r),r=r.proxyOf,r.parent&&r.parent.removeChild(r),r[Oo]&&Fo(r),typeof r.raws.before>"u"&&t&&typeof t.raws.before<"u"&&(r.raws.before=t.raws.before.replace(/\S/g,"")),r.parent=this.proxyOf,r))}prepend(...e){e=e.reverse();for(let t of e){let i=this.normalize(t,this.first,"prepend").reverse();for(let r of i)this.proxyOf.nodes.unshift(r);for(let r in this.indexes)this.indexes[r]=this.indexes[r]+i.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);let t;for(let i in this.indexes)t=this.indexes[i],t>=e&&(this.indexes[i]=t-1);return this.markDirty(),this}replaceValues(e,t,i){return i||(i=t,t={}),this.walkDecls(r=>{t.props&&!t.props.includes(r.prop)||t.fast&&!r.value.includes(t.fast)||(r.value=r.value.replace(e,i))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,i)=>{let r;try{r=e(t,i)}catch(o){throw t.addToError(o)}return r!==!1&&t.walk&&(r=t.walk(e)),r})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((i,r)=>{if(i.type==="atrule"&&e.test(i.name))return t(i,r)}):this.walk((i,r)=>{if(i.type==="atrule"&&i.name===e)return t(i,r)}):(t=e,this.walk((i,r)=>{if(i.type==="atrule")return t(i,r)}))}walkComments(e){return this.walk((t,i)=>{if(t.type==="comment")return e(t,i)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((i,r)=>{if(i.type==="decl"&&e.test(i.prop))return t(i,r)}):this.walk((i,r)=>{if(i.type==="decl"&&i.prop===e)return t(i,r)}):(t=e,this.walk((i,r)=>{if(i.type==="decl")return t(i,r)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((i,r)=>{if(i.type==="rule"&&e.test(i.selector))return t(i,r)}):this.walk((i,r)=>{if(i.type==="rule"&&i.selector===e)return t(i,r)}):(t=e,this.walk((i,r)=>{if(i.type==="rule")return t(i,r)}))}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]}};Ae.registerParse=s=>{Po=s};Ae.registerRule=s=>{Js=s};Ae.registerAtRule=s=>{Ks=s};Ae.registerRoot=s=>{Lo=s};var $e=Ae;Ae.default=Ae;Ae.rebuild=s=>{s.type==="atrule"?Object.setPrototypeOf(s,Ks.prototype):s.type==="rule"?Object.setPrototypeOf(s,Js.prototype):s.type==="decl"?Object.setPrototypeOf(s,To.prototype):s.type==="comment"?Object.setPrototypeOf(s,ko.prototype):s.type==="root"&&Object.setPrototypeOf(s,Lo.prototype),s[_o]=!0,s.nodes&&s.nodes.forEach(e=>{Ae.rebuild(e)})};let Bc=$e,Uo,zo,vt=class extends Bc{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new Uo(new zo,this,e).stringify()}};vt.registerLazyResult=s=>{Uo=s};vt.registerProcessor=s=>{zo=s};var Qs=vt;vt.default=vt;let Ss=class{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let i=t.node.rangeBy(t);this.line=i.start.line,this.column=i.start.column,this.endLine=i.end.line,this.endColumn=i.end.column}for(let i in t)this[i]=t[i]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}};var Wo=Ss;Ss.default=Ss;let Uc=Wo,Es=class{constructor(e,t,i){this.processor=e,this.messages=[],this.root=t,this.opts=i,this.css=void 0,this.map=void 0}toString(){return this.css}warn(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let i=new Uc(e,t);return this.messages.push(i),i}warnings(){return this.messages.filter(e=>e.type==="warning")}get content(){return this.css}};var qs=Es;Es.default=Es;const Ui=39,Vr=34,Bt=92,jr=47,Ut=10,nt=32,zt=12,Wt=9,Gt=13,zc=91,Wc=93,Gc=40,Vc=41,jc=123,Yc=125,Zc=59,Hc=42,Xc=58,Jc=64,Vt=/[\t\n\f\r "#'()/;[\\\]{}]/g,jt=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,Kc=/.[\r\n"'(/\\]/,Yr=/[\da-f]/i;var Qc=function(e,t={}){let i=e.css.valueOf(),r=t.ignoreErrors,o,n,l,a,u,c,h,f,g,d,A=i.length,p=0,m=[],w=[];function v(){return p}function x(I){throw e.error("Unclosed "+I,p)}function R(){return w.length===0&&p>=A}function D(I){if(w.length)return w.pop();if(p>=A)return;let H=I?I.ignoreUnclosed:!1;switch(o=i.charCodeAt(p),o){case Ut:case nt:case Wt:case Gt:case zt:{n=p;do n+=1,o=i.charCodeAt(n);while(o===nt||o===Ut||o===Wt||o===Gt||o===zt);d=["space",i.slice(p,n)],p=n-1;break}case zc:case Wc:case jc:case Yc:case Xc:case Zc:case Vc:{let U=String.fromCharCode(o);d=[U,U,p];break}case Gc:{if(f=m.length?m.pop()[1]:"",g=i.charCodeAt(p+1),f==="url"&&g!==Ui&&g!==Vr&&g!==nt&&g!==Ut&&g!==Wt&&g!==zt&&g!==Gt){n=p;do{if(c=!1,n=i.indexOf(")",n+1),n===-1)if(r||H){n=p;break}else x("bracket");for(h=n;i.charCodeAt(h-1)===Bt;)h-=1,c=!c}while(c);d=["brackets",i.slice(p,n+1),p,n],p=n}else n=i.indexOf(")",p+1),a=i.slice(p,n+1),n===-1||Kc.test(a)?d=["(","(",p]:(d=["brackets",a,p,n],p=n);break}case Ui:case Vr:{l=o===Ui?"'":'"',n=p;do{if(c=!1,n=i.indexOf(l,n+1),n===-1)if(r||H){n=p+1;break}else x("string");for(h=n;i.charCodeAt(h-1)===Bt;)h-=1,c=!c}while(c);d=["string",i.slice(p,n+1),p,n],p=n;break}case Jc:{Vt.lastIndex=p+1,Vt.test(i),Vt.lastIndex===0?n=i.length-1:n=Vt.lastIndex-2,d=["at-word",i.slice(p,n+1),p,n],p=n;break}case Bt:{for(n=p,u=!0;i.charCodeAt(n+1)===Bt;)n+=1,u=!u;if(o=i.charCodeAt(n+1),u&&o!==jr&&o!==nt&&o!==Ut&&o!==Wt&&o!==Gt&&o!==zt&&(n+=1,Yr.test(i.charAt(n)))){for(;Yr.test(i.charAt(n+1));)n+=1;i.charCodeAt(n+1)===nt&&(n+=1)}d=["word",i.slice(p,n+1),p,n],p=n;break}default:{o===jr&&i.charCodeAt(p+1)===Hc?(n=i.indexOf("*/",p+2)+1,n===0&&(r||H?n=i.length:x("comment")),d=["comment",i.slice(p,n+1),p,n],p=n):(jt.lastIndex=p+1,jt.test(i),jt.lastIndex===0?n=i.length-1:n=jt.lastIndex-2,d=["word",i.slice(p,n+1),p,n],m.push(d),p=n);break}}return p++,d}function Y(I){w.push(I)}return{back:Y,endOfFile:R,nextToken:D,position:v}};let Go=$e,ci=class extends Go{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}};var er=ci;ci.default=ci;Go.registerAtRule(ci);let Vo=$e,jo,Yo,Qe=class extends Vo{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,i){let r=super.normalize(e);if(t){if(i==="prepend")this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let o of r)o.raws.before=t.raws.before}return r}removeChild(e,t){let i=this.index(e);return!t&&i===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[i].raws.before),super.removeChild(e)}toResult(e={}){return new jo(new Yo,this,e).stringify()}};Qe.registerLazyResult=s=>{jo=s};Qe.registerProcessor=s=>{Yo=s};var Rt=Qe;Qe.default=Qe;Vo.registerRoot(Qe);let bt={comma(s){return bt.split(s,[","],!0)},space(s){let e=[" ",`
`," "];return bt.split(s,e)},split(s,e,t){let i=[],r="",o=!1,n=0,l=!1,a="",u=!1;for(let c of s)u?u=!1:c==="\\"?u=!0:l?c===a&&(l=!1):c==='"'||c==="'"?(l=!0,a=c):c==="("?n+=1:c===")"?n>0&&(n-=1):n===0&&e.includes(c)&&(o=!0),o?(r!==""&&i.push(r.trim()),r="",o=!1):r+=c;return(t||r!=="")&&i.push(r.trim()),i}};var Zo=bt;bt.default=bt;let Ho=$e,qc=Zo,hi=class extends Ho{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return qc.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,i=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(i)}};var tr=hi;hi.default=hi;Ho.registerRule(hi);let eh=Ri,th=Qc,ih=Mi,sh=er,rh=Rt,Zr=tr;const Hr={empty:!0,space:!0};function nh(s){for(let e=s.length-1;e>=0;e--){let t=s[e],i=t[3]||t[2];if(i)return i}}let oh=class{constructor(e){this.input=e,this.root=new rh,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t=new sh;t.name=e[1].slice(1),t.name===""&&this.unnamedAtrule(t,e),this.init(t,e[2]);let i,r,o,n=!1,l=!1,a=[],u=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),i=e[0],i==="("||i==="["?u.push(i==="("?")":"]"):i==="{"&&u.length>0?u.push("}"):i===u[u.length-1]&&u.pop(),u.length===0)if(i===";"){t.source.end=this.getPosition(e[2]),t.source.end.offset++,this.semicolon=!0;break}else if(i==="{"){l=!0;break}else if(i==="}"){if(a.length>0){for(o=a.length-1,r=a[o];r&&r[0]==="space";)r=a[--o];r&&(t.source.end=this.getPosition(r[3]||r[2]),t.source.end.offset++)}this.end(e);break}else a.push(e);else a.push(e);if(this.tokenizer.endOfFile()){n=!0;break}}t.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(t.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(t,"params",a),n&&(e=a[a.length-1],t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++,this.spaces=t.raws.between,t.raws.between="")):(t.raws.afterName="",t.params=""),l&&(t.nodes=[],this.current=t)}checkMissedSemicolon(e){let t=this.colon(e);if(t===!1)return;let i=0,r;for(let o=t-1;o>=0&&(r=e[o],!(r[0]!=="space"&&(i+=1,i===2)));o--);throw this.input.error("Missed semicolon",r[0]==="word"?r[3]+1:r[2])}colon(e){let t=0,i,r,o;for(let[n,l]of e.entries()){if(i=l,r=i[0],r==="("&&(t+=1),r===")"&&(t-=1),t===0&&r===":")if(!o)this.doubleColon(i);else{if(o[0]==="word"&&o[1]==="progid")continue;return n}o=i}return!1}comment(e){let t=new ih;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let i=e[1].slice(2,-2);if(/^\s*$/.test(i))t.text="",t.raws.left=i,t.raws.right="";else{let r=i.match(/^(\s*)([^]*\S)(\s*)$/);t.text=r[2],t.raws.left=r[1],t.raws.right=r[3]}}createTokenizer(){this.tokenizer=th(this.input)}decl(e,t){let i=new eh;this.init(i,e[0][2]);let r=e[e.length-1];for(r[0]===";"&&(this.semicolon=!0,e.pop()),i.source.end=this.getPosition(r[3]||r[2]||nh(e)),i.source.end.offset++;e[0][0]!=="word";)e.length===1&&this.unknownWord(e),i.raws.before+=e.shift()[1];for(i.source.start=this.getPosition(e[0][2]),i.prop="";e.length;){let u=e[0][0];if(u===":"||u==="space"||u==="comment")break;i.prop+=e.shift()[1]}i.raws.between="";let o;for(;e.length;)if(o=e.shift(),o[0]===":"){i.raws.between+=o[1];break}else o[0]==="word"&&/\w/.test(o[1])&&this.unknownWord([o]),i.raws.between+=o[1];(i.prop[0]==="_"||i.prop[0]==="*")&&(i.raws.before+=i.prop[0],i.prop=i.prop.slice(1));let n=[],l;for(;e.length&&(l=e[0][0],!(l!=="space"&&l!=="comment"));)n.push(e.shift());this.precheckMissedSemicolon(e);for(let u=e.length-1;u>=0;u--){if(o=e[u],o[1].toLowerCase()==="!important"){i.important=!0;let c=this.stringFrom(e,u);c=this.spacesFromEnd(e)+c,c!==" !important"&&(i.raws.important=c);break}else if(o[1].toLowerCase()==="important"){let c=e.slice(0),h="";for(let f=u;f>0;f--){let g=c[f][0];if(h.trim().indexOf("!")===0&&g!=="space")break;h=c.pop()[1]+h}h.trim().indexOf("!")===0&&(i.important=!0,i.raws.important=h,e=c)}if(o[0]!=="space"&&o[0]!=="comment")break}e.some(u=>u[0]!=="space"&&u[0]!=="comment")&&(i.raws.between+=n.map(u=>u[1]).join(""),n=[]),this.raw(i,"value",n.concat(e),t),i.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new Zr;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let t=this.current.nodes[this.current.nodes.length-1];t&&t.type==="rule"&&!t.raws.ownSemicolon&&(t.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="",e.type!=="comment"&&(this.semicolon=!1)}other(e){let t=!1,i=null,r=!1,o=null,n=[],l=e[1].startsWith("--"),a=[],u=e;for(;u;){if(i=u[0],a.push(u),i==="("||i==="[")o||(o=u),n.push(i==="("?")":"]");else if(l&&r&&i==="{")o||(o=u),n.push("}");else if(n.length===0)if(i===";")if(r){this.decl(a,l);return}else break;else if(i==="{"){this.rule(a);return}else if(i==="}"){this.tokenizer.back(a.pop()),t=!0;break}else i===":"&&(r=!0);else i===n[n.length-1]&&(n.pop(),n.length===0&&(o=null));u=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),n.length>0&&this.unclosedBracket(o),t&&r){if(!l)for(;a.length&&(u=a[a.length-1][0],!(u!=="space"&&u!=="comment"));)this.tokenizer.back(a.pop());this.decl(a,l)}else this.unknownWord(a)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e);break}this.endFile()}precheckMissedSemicolon(){}raw(e,t,i,r){let o,n,l=i.length,a="",u=!0,c,h;for(let f=0;f<l;f+=1)o=i[f],n=o[0],n==="space"&&f===l-1&&!r?u=!1:n==="comment"?(h=i[f-1]?i[f-1][0]:"empty",c=i[f+1]?i[f+1][0]:"empty",!Hr[h]&&!Hr[c]?a.slice(-1)===","?u=!1:a+=o[1]:u=!1):a+=o[1];if(!u){let f=i.reduce((g,d)=>g+d[1],"");e.raws[t]={raw:f,value:a}}e[t]=a}rule(e){e.pop();let t=new Zr;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,i="";for(;e.length&&(t=e[e.length-1][0],!(t!=="space"&&t!=="comment"));)i=e.pop()[1]+i;return i}spacesAndCommentsFromStart(e){let t,i="";for(;e.length&&(t=e[0][0],!(t!=="space"&&t!=="comment"));)i+=e.shift()[1];return i}spacesFromEnd(e){let t,i="";for(;e.length&&(t=e[e.length-1][0],t==="space");)i=e.pop()[1]+i;return i}stringFrom(e,t){let i="";for(let r=t;r<e.length;r++)i+=e[r][1];return e.splice(t,e.length-t),i}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word",{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}};var lh=oh;let ah=$e,uh=lh,ch=Ni;function fi(s,e){let t=new ch(s,e),i=new uh(t);try{i.parse()}catch(r){throw r}return i.root}var ir=fi;fi.default=fi;ah.registerParse(fi);let{isClean:ve,my:hh}=At,fh=Do,ph=xi,dh=$e,mh=Qs,Xr=qs,gh=ir,yh=Rt;const wh={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},vh={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},bh={Once:!0,postcssPlugin:!0,prepare:!0},qe=0;function ot(s){return typeof s=="object"&&typeof s.then=="function"}function Xo(s){let e=!1,t=wh[s.type];return s.type==="decl"?e=s.prop.toLowerCase():s.type==="atrule"&&(e=s.name.toLowerCase()),e&&s.append?[t,t+"-"+e,qe,t+"Exit",t+"Exit-"+e]:e?[t,t+"-"+e,t+"Exit",t+"Exit-"+e]:s.append?[t,qe,t+"Exit"]:[t,t+"Exit"]}function Jr(s){let e;return s.type==="document"?e=["Document",qe,"DocumentExit"]:s.type==="root"?e=["Root",qe,"RootExit"]:e=Xo(s),{eventIndex:0,events:e,iterator:0,node:s,visitorIndex:0,visitors:[]}}function xs(s){return s[ve]=!1,s.nodes&&s.nodes.forEach(e=>xs(e)),s}let As={},et=class Jo{constructor(e,t,i){this.stringified=!1,this.processed=!1;let r;if(typeof t=="object"&&t!==null&&(t.type==="root"||t.type==="document"))r=xs(t);else if(t instanceof Jo||t instanceof Xr)r=xs(t.root),t.map&&(typeof i.map>"u"&&(i.map={}),i.map.inline||(i.map.inline=!1),i.map.prev=t.map);else{let o=gh;i.syntax&&(o=i.syntax.parse),i.parser&&(o=i.parser),o.parse&&(o=o.parse);try{r=o(t,i)}catch(n){this.processed=!0,this.error=n}r&&!r[hh]&&dh.rebuild(r)}this.result=new Xr(e,r,i),this.helpers={...As,postcss:As,result:this.result},this.plugins=this.processor.plugins.map(o=>typeof o=="object"&&o.prepare?{...o,...o.prepare(this.result)}:o)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let i=this.result.lastPlugin;try{t&&t.addToError(e),this.error=e,e.name==="CssSyntaxError"&&!e.plugin?(e.plugin=i.postcssPlugin,e.setMessage()):i.postcssVersion}catch(r){console&&console.error&&console.error(r)}return e}prepareVisitors(){this.listeners={};let e=(t,i,r)=>{this.listeners[i]||(this.listeners[i]=[]),this.listeners[i].push([t,r])};for(let t of this.plugins)if(typeof t=="object")for(let i in t){if(!vh[i]&&/^[A-Z]/.test(i))throw new Error(`Unknown event ${i} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!bh[i])if(typeof t[i]=="object")for(let r in t[i])r==="*"?e(t,i,t[i][r]):e(t,i+"-"+r.toLowerCase(),t[i][r]);else typeof t[i]=="function"&&e(t,i,t[i])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let t=this.plugins[e],i=this.runOnRoot(t);if(ot(i))try{await i}catch(r){throw this.handleError(r)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[ve];){e[ve]=!0;let t=[Jr(e)];for(;t.length>0;){let i=this.visitTick(t);if(ot(i))try{await i}catch(r){let o=t[t.length-1].node;throw this.handleError(r,o)}}}if(this.listeners.OnceExit)for(let[t,i]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if(e.type==="document"){let r=e.nodes.map(o=>i(o,this.helpers));await Promise.all(r)}else await i(e,this.helpers)}catch(r){throw this.handleError(r)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if(typeof e=="object"&&e.Once){if(this.result.root.type==="document"){let t=this.result.root.nodes.map(i=>e.Once(i,this.helpers));return ot(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}else if(typeof e=="function")return e(this.result.root,this.result)}catch(t){throw this.handleError(t)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=ph;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let r=new fh(t,this.result.root,this.result.opts).generate();return this.result.css=r[0],this.result.map=r[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins){let t=this.runOnRoot(e);if(ot(t))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[ve];)e[ve]=!0,this.walkSync(e);if(this.listeners.OnceExit)if(e.type==="document")for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,t){return this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[i,r]of e){this.result.lastPlugin=i;let o;try{o=r(t,this.helpers)}catch(n){throw this.handleError(n,t.proxyOf)}if(t.type!=="root"&&t.type!=="document"&&!t.parent)return!0;if(ot(o))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:i,visitors:r}=t;if(i.type!=="root"&&i.type!=="document"&&!i.parent){e.pop();return}if(r.length>0&&t.visitorIndex<r.length){let[n,l]=r[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===r.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=n;try{return l(i.toProxy(),this.helpers)}catch(a){throw this.handleError(a,i)}}if(t.iterator!==0){let n=t.iterator,l;for(;l=i.nodes[i.indexes[n]];)if(i.indexes[n]+=1,!l[ve]){l[ve]=!0,e.push(Jr(l));return}t.iterator=0,delete i.indexes[n]}let o=t.events;for(;t.eventIndex<o.length;){let n=o[t.eventIndex];if(t.eventIndex+=1,n===qe){i.nodes&&i.nodes.length&&(i[ve]=!0,t.iterator=i.getIterator());return}else if(this.listeners[n]){t.visitors=this.listeners[n];return}}e.pop()}walkSync(e){e[ve]=!0;let t=Xo(e);for(let i of t)if(i===qe)e.nodes&&e.each(r=>{r[ve]||this.walkSync(r)});else{let r=this.listeners[i];if(r&&this.visitSync(r,e.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}};et.registerPostcss=s=>{As=s};var Ko=et;et.default=et;yh.registerLazyResult(et);mh.registerLazyResult(et);let Ch=Do,Sh=xi,Eh=ir;const xh=qs;let Rs=class{constructor(e,t,i){t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=i,this._map=void 0;let r,o=Sh;this.result=new xh(this._processor,r,this._opts),this.result.css=t;let n=this;Object.defineProperty(this.result,"root",{get(){return n.root}});let l=new Ch(o,r,this._opts,t);if(l.isMap()){let[a,u]=l.generate();a&&(this.result.css=a),u&&(this.result.map=u)}else l.clearAnnotation(),this.result.css=l.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return this.async().then(e,t)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,t=Eh;try{e=t(this._css,this._opts)}catch(i){this.error=i}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}};var Ah=Rs;Rs.default=Rs;let Rh=Ah,Nh=Ko,Mh=Qs,Ih=Rt,Ct=class{constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let i of e)if(i.postcss===!0?i=i():i.postcss&&(i=i.postcss),typeof i=="object"&&Array.isArray(i.plugins))t=t.concat(i.plugins);else if(typeof i=="object"&&i.postcssPlugin)t.push(i);else if(typeof i=="function")t.push(i);else if(!(typeof i=="object"&&(i.parse||i.stringify)))throw new Error(i+" is not a PostCSS plugin");return t}process(e,t={}){return!this.plugins.length&&!t.parser&&!t.stringifier&&!t.syntax?new Rh(this,e,t):new Nh(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var Dh=Ct;Ct.default=Ct;Ih.registerProcessor(Ct);Mh.registerProcessor(Ct);let Oh=Ri,_h=Ao,Th=Mi,kh=er,Ph=Ni,Lh=Rt,$h=tr;function St(s,e){if(Array.isArray(s))return s.map(r=>St(r));let{inputs:t,...i}=s;if(t){e=[];for(let r of t){let o={...r,__proto__:Ph.prototype};o.map&&(o.map={...o.map,__proto__:_h.prototype}),e.push(o)}}if(i.nodes&&(i.nodes=s.nodes.map(r=>St(r,e))),i.source){let{inputId:r,...o}=i.source;i.source=o,r!=null&&(i.source.input=e[r])}if(i.type==="root")return new Lh(i);if(i.type==="decl")return new Oh(i);if(i.type==="rule")return new $h(i);if(i.type==="comment")return new Th(i);if(i.type==="atrule")return new kh(i);throw new Error("Unknown node type: "+s.type)}var Fh=St;St.default=St;let Bh=Xs,Qo=Ri,Uh=Ko,zh=$e,sr=Dh,Wh=xi,Gh=Fh,qo=Qs,Vh=Wo,el=Mi,tl=er,jh=qs,Yh=Ni,Zh=ir,Hh=Zo,il=tr,sl=Rt,Xh=Ai;function B(...s){return s.length===1&&Array.isArray(s[0])&&(s=s[0]),new sr(s)}B.plugin=function(e,t){let i=!1;function r(...n){console&&console.warn&&!i&&(i=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide:
https://evilmartians.com/chronicles/postcss-8-plugin-migration`),ii.LANG&&ii.LANG.startsWith("cn")&&console.warn(e+`: 里面 postcss.plugin 被弃用. 迁移指南:
https://www.w3ctech.com/topic/2226`));let l=t(...n);return l.postcssPlugin=e,l.postcssVersion=new sr().version,l}let o;return Object.defineProperty(r,"postcss",{get(){return o||(o=r()),o}}),r.process=function(n,l,a){return B([r(a)]).process(n,l)},r};B.stringify=Wh;B.parse=Zh;B.fromJSON=Gh;B.list=Hh;B.comment=s=>new el(s);B.atRule=s=>new tl(s);B.decl=s=>new Qo(s);B.rule=s=>new il(s);B.root=s=>new sl(s);B.document=s=>new qo(s);B.CssSyntaxError=Bh;B.Declaration=Qo;B.Container=zh;B.Processor=sr;B.Document=qo;B.Comment=el;B.Warning=Vh;B.AtRule=tl;B.Result=jh;B.Input=Yh;B.Rule=il;B.Root=sl;B.Node=Xh;Uh.registerPostcss(B);var Jh=B;B.default=B;const Z=uc(Jh);Z.stringify;Z.fromJSON;Z.plugin;Z.parse;Z.list;Z.document;Z.comment;Z.atRule;Z.rule;Z.decl;Z.root;Z.CssSyntaxError;Z.Declaration;Z.Container;Z.Processor;Z.Document;Z.Comment;Z.Warning;Z.AtRule;Z.Result;Z.Input;Z.Rule;Z.Root;Z.Node;var O=(s=>(s[s.Document=0]="Document",s[s.DocumentType=1]="DocumentType",s[s.Element=2]="Element",s[s.Text=3]="Text",s[s.CDATA=4]="CDATA",s[s.Comment=5]="Comment",s))(O||{});function Kh(s){const e={},t=/;(?![^(]*\))/g,i=/:(.+)/,r=/\/\*.*?\*\//g;return s.replace(r,"").split(t).forEach(function(o){if(o){const n=o.split(i);n.length>1&&(e[Ns(n[0].trim())]=n[1].trim())}}),e}function Kr(s){const e=[];for(const t in s){const i=s[t];if(typeof i!="string")continue;const r=tf(t);e.push(`${r}: ${i};`)}return e.join(" ")}const Qh=/-([a-z])/g,qh=/^--[a-zA-Z0-9-]+$/,Ns=s=>qh.test(s)?s:s.replace(Qh,(e,t)=>t?t.toUpperCase():""),ef=/\B([A-Z])/g,tf=s=>s.replace(ef,"-$1").toLowerCase();class me{constructor(...e){C(this,"parentElement",null),C(this,"parentNode",null),C(this,"ownerDocument"),C(this,"firstChild",null),C(this,"lastChild",null),C(this,"previousSibling",null),C(this,"nextSibling",null),C(this,"ELEMENT_NODE",1),C(this,"TEXT_NODE",3),C(this,"nodeType"),C(this,"nodeName"),C(this,"RRNodeType")}get childNodes(){const e=[];let t=this.firstChild;for(;t;)e.push(t),t=t.nextSibling;return e}contains(e){if(e instanceof me){if(e.ownerDocument!==this.ownerDocument)return!1;if(e===this)return!0}else return!1;for(;e.parentNode;){if(e.parentNode===this)return!0;e=e.parentNode}return!1}appendChild(e){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(e,t){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(e){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}}class rr extends me{constructor(...e){super(e),C(this,"nodeType",9),C(this,"nodeName","#document"),C(this,"compatMode","CSS1Compat"),C(this,"RRNodeType",O.Document),C(this,"textContent",null),this.ownerDocument=this}get documentElement(){return this.childNodes.find(e=>e.RRNodeType===O.Element&&e.tagName==="HTML")||null}get body(){var e;return((e=this.documentElement)==null?void 0:e.childNodes.find(t=>t.RRNodeType===O.Element&&t.tagName==="BODY"))||null}get head(){var e;return((e=this.documentElement)==null?void 0:e.childNodes.find(t=>t.RRNodeType===O.Element&&t.tagName==="HEAD"))||null}get implementation(){return this}get firstElementChild(){return this.documentElement}appendChild(e){const t=e.RRNodeType;if((t===O.Element||t===O.DocumentType)&&this.childNodes.some(r=>r.RRNodeType===t))throw new Error(`RRDomException: Failed to execute 'appendChild' on 'RRNode': Only one ${t===O.Element?"RRElement":"RRDoctype"} on RRDocument allowed.`);const i=nr(this,e);return i.parentElement=null,i}insertBefore(e,t){const i=e.RRNodeType;if((i===O.Element||i===O.DocumentType)&&this.childNodes.some(o=>o.RRNodeType===i))throw new Error(`RRDomException: Failed to execute 'insertBefore' on 'RRNode': Only one ${i===O.Element?"RRElement":"RRDoctype"} on RRDocument allowed.`);const r=al(this,e,t);return r.parentElement=null,r}removeChild(e){return ul(this,e)}open(){this.firstChild=null,this.lastChild=null}close(){}write(e){let t;if(e==='<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">'?t="-//W3C//DTD XHTML 1.0 Transitional//EN":e==='<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">'&&(t="-//W3C//DTD HTML 4.0 Transitional//EN"),t){const i=this.createDocumentType("html",t,"");this.open(),this.appendChild(i)}}createDocument(e,t,i){return new rr}createDocumentType(e,t,i){const r=new rl(e,t,i);return r.ownerDocument=this,r}createElement(e){const t=new Ii(e);return t.ownerDocument=this,t}createElementNS(e,t){return this.createElement(t)}createTextNode(e){const t=new nl(e);return t.ownerDocument=this,t}createComment(e){const t=new ol(e);return t.ownerDocument=this,t}createCDATASection(e){const t=new ll(e);return t.ownerDocument=this,t}toString(){return"RRDocument"}}class rl extends me{constructor(e,t,i){super(),C(this,"nodeType",10),C(this,"RRNodeType",O.DocumentType),C(this,"name"),C(this,"publicId"),C(this,"systemId"),C(this,"textContent",null),this.name=e,this.publicId=t,this.systemId=i,this.nodeName=e}toString(){return"RRDocumentType"}}class Ii extends me{constructor(e){super(),C(this,"nodeType",1),C(this,"RRNodeType",O.Element),C(this,"tagName"),C(this,"attributes",{}),C(this,"shadowRoot",null),C(this,"scrollLeft"),C(this,"scrollTop"),this.tagName=e.toUpperCase(),this.nodeName=e.toUpperCase()}get textContent(){let e="";return this.childNodes.forEach(t=>e+=t.textContent),e}set textContent(e){this.firstChild=null,this.lastChild=null,this.appendChild(this.ownerDocument.createTextNode(e))}get classList(){return new nf(this.attributes.class,e=>{this.attributes.class=e})}get id(){return this.attributes.id||""}get className(){return this.attributes.class||""}get style(){const e=this.attributes.style?Kh(this.attributes.style):{},t=/\B([A-Z])/g;return e.setProperty=(i,r,o)=>{if(t.test(i))return;const n=Ns(i);r?e[n]=r:delete e[n],o==="important"&&(e[n]+=" !important"),this.attributes.style=Kr(e)},e.removeProperty=i=>{if(t.test(i))return"";const r=Ns(i),o=e[r]||"";return delete e[r],this.attributes.style=Kr(e),o},e}getAttribute(e){return this.attributes[e]===void 0?null:this.attributes[e]}setAttribute(e,t){this.attributes[e]=t}setAttributeNS(e,t,i){this.setAttribute(t,i)}removeAttribute(e){delete this.attributes[e]}appendChild(e){return nr(this,e)}insertBefore(e,t){return al(this,e,t)}removeChild(e){return ul(this,e)}attachShadow(e){const t=this.ownerDocument.createElement("SHADOWROOT");return this.shadowRoot=t,t}dispatchEvent(e){return!0}toString(){let e="";for(const t in this.attributes)e+=`${t}="${this.attributes[t]}" `;return`${this.tagName} ${e}`}}class sf extends Ii{constructor(){super(...arguments),C(this,"currentTime"),C(this,"volume"),C(this,"paused"),C(this,"muted"),C(this,"playbackRate"),C(this,"loop")}attachShadow(e){throw new Error("RRDomException: Failed to execute 'attachShadow' on 'RRElement': This RRElement does not support attachShadow")}play(){this.paused=!1}pause(){this.paused=!0}}class rf extends Ii{constructor(){super(...arguments),C(this,"tagName","DIALOG"),C(this,"nodeName","DIALOG")}get isModal(){return this.getAttribute("rr_open_mode")==="modal"}get open(){return this.getAttribute("open")!==null}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")}}class nl extends me{constructor(e){super(),C(this,"nodeType",3),C(this,"nodeName","#text"),C(this,"RRNodeType",O.Text),C(this,"data"),this.data=e}get textContent(){return this.data}set textContent(e){this.data=e}toString(){return`RRText text=${JSON.stringify(this.data)}`}}class ol extends me{constructor(e){super(),C(this,"nodeType",8),C(this,"nodeName","#comment"),C(this,"RRNodeType",O.Comment),C(this,"data"),this.data=e}get textContent(){return this.data}set textContent(e){this.data=e}toString(){return`RRComment text=${JSON.stringify(this.data)}`}}class ll extends me{constructor(e){super(),C(this,"nodeName","#cdata-section"),C(this,"nodeType",4),C(this,"RRNodeType",O.CDATA),C(this,"data"),this.data=e}get textContent(){return this.data}set textContent(e){this.data=e}toString(){return`RRCDATASection data=${JSON.stringify(this.data)}`}}class nf{constructor(e,t){if(C(this,"onChange"),C(this,"classes",[]),C(this,"add",(...i)=>{for(const r of i){const o=String(r);this.classes.indexOf(o)>=0||this.classes.push(o)}this.onChange&&this.onChange(this.classes.join(" "))}),C(this,"remove",(...i)=>{this.classes=this.classes.filter(r=>i.indexOf(r)===-1),this.onChange&&this.onChange(this.classes.join(" "))}),e){const i=e.trim().split(/\s+/);this.classes.push(...i)}this.onChange=t}}function nr(s,e){return e.parentNode&&e.parentNode.removeChild(e),s.lastChild?(s.lastChild.nextSibling=e,e.previousSibling=s.lastChild):(s.firstChild=e,e.previousSibling=null),s.lastChild=e,e.nextSibling=null,e.parentNode=s,e.parentElement=s,e.ownerDocument=s.ownerDocument,e}function al(s,e,t){if(!t)return nr(s,e);if(t.parentNode!==s)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===t||(e.parentNode&&e.parentNode.removeChild(e),e.previousSibling=t.previousSibling,t.previousSibling=e,e.nextSibling=t,e.previousSibling?e.previousSibling.nextSibling=e:s.firstChild=e,e.parentElement=s,e.parentNode=s,e.ownerDocument=s.ownerDocument),e}function ul(s,e){if(e.parentNode!==s)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:s.firstChild=e.nextSibling,e.nextSibling?e.nextSibling.previousSibling=e.previousSibling:s.lastChild=e.previousSibling,e.previousSibling=null,e.nextSibling=null,e.parentElement=null,e.parentNode=null,e}var le=(s=>(s[s.PLACEHOLDER=0]="PLACEHOLDER",s[s.ELEMENT_NODE=1]="ELEMENT_NODE",s[s.ATTRIBUTE_NODE=2]="ATTRIBUTE_NODE",s[s.TEXT_NODE=3]="TEXT_NODE",s[s.CDATA_SECTION_NODE=4]="CDATA_SECTION_NODE",s[s.ENTITY_REFERENCE_NODE=5]="ENTITY_REFERENCE_NODE",s[s.ENTITY_NODE=6]="ENTITY_NODE",s[s.PROCESSING_INSTRUCTION_NODE=7]="PROCESSING_INSTRUCTION_NODE",s[s.COMMENT_NODE=8]="COMMENT_NODE",s[s.DOCUMENT_NODE=9]="DOCUMENT_NODE",s[s.DOCUMENT_TYPE_NODE=10]="DOCUMENT_TYPE_NODE",s[s.DOCUMENT_FRAGMENT_NODE=11]="DOCUMENT_FRAGMENT_NODE",s))(le||{});const Ms={svg:"http://www.w3.org/2000/svg","xlink:href":"http://www.w3.org/1999/xlink",xmlns:"http://www.w3.org/2000/xmlns/"},of={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"};let be=null;function pi(s,e,t,i=e.mirror||e.ownerDocument.mirror){s=lf(s,e,t,i),cl(s,e,t,i),af(s,e,t)}function lf(s,e,t,i){var r;if(t.afterAppend&&!be&&(be=new WeakSet,setTimeout(()=>{be=null},0)),!or(s,e)){const o=di(e,t.mirror,i);(r=s.parentNode)==null||r.replaceChild(o,s),s=o}switch(e.RRNodeType){case O.Document:{if(!ze(s,e,t.mirror,i)){const o=i.getMeta(e);o&&(t.mirror.removeNodeFromMap(s),s.close(),s.open(),t.mirror.add(s,o),be?.add(s))}break}case O.Element:{const o=s,n=e;switch(n.tagName){case"IFRAME":{const l=s.contentDocument;if(!l)break;pi(l,e.contentDocument,t,i);break}}n.shadowRoot&&(o.shadowRoot||o.attachShadow({mode:"open"}),cl(o.shadowRoot,n.shadowRoot,t,i)),uf(o,n,i);break}}return s}function af(s,e,t){var i;switch(e.RRNodeType){case O.Document:{const r=e.scrollData;r&&t.applyScroll(r,!0);break}case O.Element:{const r=s,o=e;switch(o.scrollData&&t.applyScroll(o.scrollData,!0),o.inputData&&t.applyInput(o.inputData),o.tagName){case"AUDIO":case"VIDEO":{const n=s,l=o;l.paused!==void 0&&(l.paused?n.pause():n.play()),l.muted!==void 0&&(n.muted=l.muted),l.volume!==void 0&&(n.volume=l.volume),l.currentTime!==void 0&&(n.currentTime=l.currentTime),l.playbackRate!==void 0&&(n.playbackRate=l.playbackRate),l.loop!==void 0&&(n.loop=l.loop);break}case"CANVAS":{const n=e;if(n.rr_dataURL!==null){const l=document.createElement("img");l.onload=()=>{const a=r.getContext("2d");a&&a.drawImage(l,0,0,l.width,l.height)},l.src=n.rr_dataURL}n.canvasMutations.forEach(l=>t.applyCanvas(l.event,l.mutation,s));break}case"STYLE":{const n=r.sheet;n&&e.rules.forEach(l=>t.applyStyleSheetMutation(l,n));break}case"DIALOG":{const n=r,l=o,a=n.open,u=n.matches("dialog:modal"),c=l.open,h=l.isModal,f=u!==h,g=a!==c;if((f||a&&g)&&n.close(),c&&(g||f))try{h?n.showModal():n.show()}catch(d){console.warn(d)}break}}break}case O.Text:case O.Comment:case O.CDATA:{s.textContent!==e.data&&(s.textContent=e.data);break}}be?.has(s)&&(be.delete(s),(i=t.afterAppend)==null||i.call(t,s,t.mirror.getId(s)))}function uf(s,e,t){const i=s.attributes,r=e.attributes;for(const o in r){const n=r[o],l=t.getMeta(e);if(l?.isSVG&&Ms[o])s.setAttributeNS(Ms[o],o,n);else if(e.tagName==="CANVAS"&&o==="rr_dataURL"){const a=document.createElement("img");a.src=n,a.onload=()=>{const u=s.getContext("2d");u&&u.drawImage(a,0,0,a.width,a.height)}}else{if(e.tagName==="IFRAME"&&o==="srcdoc")continue;try{s.setAttribute(o,n)}catch(a){console.warn(a)}}}for(const{name:o}of Array.from(i))o in r||s.removeAttribute(o);e.scrollLeft&&(s.scrollLeft=e.scrollLeft),e.scrollTop&&(s.scrollTop=e.scrollTop)}function cl(s,e,t,i){const r=Array.from(s.childNodes),o=e.childNodes;if(r.length===0&&o.length===0)return;let n=0,l=r.length-1,a=0,u=o.length-1,c=r[n],h=r[l],f=o[a],g=o[u],d,A;for(;n<=l&&a<=u;)if(c===void 0)c=r[++n];else if(h===void 0)h=r[--l];else if(ze(c,f,t.mirror,i))c=r[++n],f=o[++a];else if(ze(h,g,t.mirror,i))h=r[--l],g=o[--u];else if(ze(c,g,t.mirror,i)){try{s.insertBefore(c,h.nextSibling)}catch(w){console.warn(w)}c=r[++n],g=o[--u]}else if(ze(h,f,t.mirror,i)){try{s.insertBefore(h,c)}catch(w){console.warn(w)}h=r[--l],f=o[++a]}else{if(!d){d={};for(let v=n;v<=l;v++){const x=r[v];x&&t.mirror.hasNode(x)&&(d[t.mirror.getId(x)]=v)}}A=d[i.getId(f)];const w=r[A];if(A!==void 0&&w&&ze(w,f,t.mirror,i)){try{s.insertBefore(w,c)}catch(v){console.warn(v)}r[A]=void 0}else{const v=di(f,t.mirror,i);s.nodeName==="#document"&&c&&(v.nodeType===v.DOCUMENT_TYPE_NODE&&c.nodeType===c.DOCUMENT_TYPE_NODE||v.nodeType===v.ELEMENT_NODE&&c.nodeType===c.ELEMENT_NODE)&&(s.removeChild(c),t.mirror.removeNodeFromMap(c),c=r[++n]);try{s.insertBefore(v,c||null)}catch(x){console.warn(x)}}f=o[++a]}if(n>l){const w=o[u+1];let v=null;for(w&&(v=t.mirror.getNode(i.getId(w)));a<=u;++a){const x=di(o[a],t.mirror,i);try{s.insertBefore(x,v)}catch(R){console.warn(R)}}}else if(a>u)for(;n<=l;n++){const w=r[n];if(!(!w||w.parentNode!==s))try{s.removeChild(w),t.mirror.removeNodeFromMap(w)}catch(v){console.warn(v)}}let p=s.firstChild,m=e.firstChild;for(;p!==null&&m!==null;)pi(p,m,t,i),p=p.nextSibling,m=m.nextSibling}function di(s,e,t){const i=t.getId(s),r=t.getMeta(s);let o=null;if(i>-1&&(o=e.getNode(i)),o!==null&&or(o,s))return o;switch(s.RRNodeType){case O.Document:o=new Document;break;case O.DocumentType:o=document.implementation.createDocumentType(s.name,s.publicId,s.systemId);break;case O.Element:{let n=s.tagName.toLowerCase();n=of[n]||n,r&&"isSVG"in r&&r?.isSVG?o=document.createElementNS(Ms.svg,n):o=document.createElement(s.tagName);break}case O.Text:o=document.createTextNode(s.data);break;case O.Comment:o=document.createComment(s.data);break;case O.CDATA:o=document.createCDATASection(s.data);break}r&&e.add(o,{...r});try{be?.add(o)}catch{}return o}function or(s,e){return s.nodeType!==e.nodeType?!1:s.nodeType!==s.ELEMENT_NODE||s.tagName.toUpperCase()===e.tagName}function ze(s,e,t,i){const r=t.getId(s),o=i.getId(e);return r===-1||r!==o?!1:or(s,e)}class it extends rr{constructor(e){super(),C(this,"UNSERIALIZED_STARTING_ID",-2),C(this,"_unserializedId",this.UNSERIALIZED_STARTING_ID),C(this,"mirror",Cf()),C(this,"scrollData",null),e&&(this.mirror=e)}get unserializedId(){return this._unserializedId--}createDocument(e,t,i){return new it}createDocumentType(e,t,i){const r=new cf(e,t,i);return r.ownerDocument=this,r}createElement(e){const t=e.toUpperCase();let i;switch(t){case"AUDIO":case"VIDEO":i=new hf(t);break;case"IFRAME":i=new mf(t,this.mirror);break;case"CANVAS":i=new pf(t);break;case"STYLE":i=new df(t);break;case"DIALOG":i=new ff(t);break;default:i=new Di(t);break}return i.ownerDocument=this,i}createComment(e){const t=new yf(e);return t.ownerDocument=this,t}createCDATASection(e){const t=new wf(e);return t.ownerDocument=this,t}createTextNode(e){const t=new gf(e);return t.ownerDocument=this,t}destroyTree(){this.firstChild=null,this.lastChild=null,this.mirror.reset()}open(){super.open(),this._unserializedId=this.UNSERIALIZED_STARTING_ID}}const cf=rl;class Di extends Ii{constructor(){super(...arguments),C(this,"inputData",null),C(this,"scrollData",null)}}class hf extends sf{}class ff extends rf{}class pf extends Di{constructor(){super(...arguments),C(this,"rr_dataURL",null),C(this,"canvasMutations",[])}getContext(){return null}}class df extends Di{constructor(){super(...arguments),C(this,"rules",[])}}class mf extends Di{constructor(e,t){super(e),C(this,"contentDocument",new it),this.contentDocument.mirror=t}}const gf=nl,yf=ol,wf=ll;function vf(s){return s instanceof HTMLFormElement?"FORM":s.tagName.toUpperCase()}function hl(s,e,t,i){let r;switch(s.nodeType){case le.DOCUMENT_NODE:i&&i.nodeName==="IFRAME"?r=i.contentDocument:(r=e,r.compatMode=s.compatMode);break;case le.DOCUMENT_TYPE_NODE:{const n=s;r=e.createDocumentType(n.name,n.publicId,n.systemId);break}case le.ELEMENT_NODE:{const n=s,l=vf(n);r=e.createElement(l);const a=r;for(const{name:u,value:c}of Array.from(n.attributes))a.attributes[u]=c;n.scrollLeft&&(a.scrollLeft=n.scrollLeft),n.scrollTop&&(a.scrollTop=n.scrollTop);break}case le.TEXT_NODE:r=e.createTextNode(s.textContent||"");break;case le.CDATA_SECTION_NODE:r=e.createCDATASection(s.data);break;case le.COMMENT_NODE:r=e.createComment(s.textContent||"");break;case le.DOCUMENT_FRAGMENT_NODE:r=i.attachShadow({mode:"open"});break;default:return null}let o=t.getMeta(s);return e instanceof it&&(o||(o=fl(r,e.unserializedId),t.add(s,o)),e.mirror.add(r,{...o})),r}function bf(s,e=ac(),t=new it){function i(r,o){const n=hl(r,t,e,o);if(n!==null)if(o?.nodeName!=="IFRAME"&&r.nodeType!==le.DOCUMENT_FRAGMENT_NODE&&(o?.appendChild(n),n.parentNode=o,n.parentElement=o),r.nodeName==="IFRAME"){const l=r.contentDocument;l&&i(l,n)}else(r.nodeType===le.DOCUMENT_NODE||r.nodeType===le.ELEMENT_NODE||r.nodeType===le.DOCUMENT_FRAGMENT_NODE)&&(r.nodeType===le.ELEMENT_NODE&&r.shadowRoot&&i(r.shadowRoot,n),r.childNodes.forEach(l=>i(l,n)))}return i(s,null),t}function Cf(){return new Sf}class Sf{constructor(){C(this,"idNodeMap",new Map),C(this,"nodeMetaMap",new WeakMap)}getId(e){var t;return e?((t=this.getMeta(e))==null?void 0:t.id)??-1:-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){const t=this.getId(e);this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach(i=>this.removeNodeFromMap(i))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){const i=t.id;this.idNodeMap.set(i,e),this.nodeMetaMap.set(e,t)}replace(e,t){const i=this.getNode(e);if(i){const r=this.nodeMetaMap.get(i);r&&this.nodeMetaMap.set(t,r)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function fl(s,e){switch(s.RRNodeType){case O.Document:return{id:e,type:s.RRNodeType,childNodes:[]};case O.DocumentType:{const t=s;return{id:e,type:s.RRNodeType,name:t.name,publicId:t.publicId,systemId:t.systemId}}case O.Element:return{id:e,type:s.RRNodeType,tagName:s.tagName.toLowerCase(),attributes:{},childNodes:[]};case O.Text:return{id:e,type:s.RRNodeType,textContent:s.textContent||""};case O.Comment:return{id:e,type:s.RRNodeType,textContent:s.textContent||""};case O.CDATA:return{id:e,type:s.RRNodeType,textContent:""}}}const Qr={Node:["childNodes","parentNode","parentElement","textContent","ownerDocument"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},qr={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},Yt={},Ef=()=>!!globalThis.Zone;function lr(s){if(Yt[s])return Yt[s];const e=globalThis[s],t=e.prototype,i=s in Qr?Qr[s]:void 0,r=!!(i&&i.every(l=>{var a,u;return!!((u=(a=Object.getOwnPropertyDescriptor(t,l))==null?void 0:a.get)!=null&&u.toString().includes("[native code]"))})),o=s in qr?qr[s]:void 0,n=!!(o&&o.every(l=>{var a;return typeof t[l]=="function"&&((a=t[l])==null?void 0:a.toString().includes("[native code]"))}));if(r&&n&&!Ef())return Yt[s]=e.prototype,e.prototype;try{const l=document.createElement("iframe");document.body.appendChild(l);const a=l.contentWindow;if(!a)return e.prototype;const u=a[s].prototype;return document.body.removeChild(l),u?Yt[s]=u:t}catch{return t}}const zi={};function Ne(s,e,t){var i;const r=`${s}.${String(t)}`;if(zi[r])return zi[r].call(e);const o=lr(s),n=(i=Object.getOwnPropertyDescriptor(o,t))==null?void 0:i.get;return n?(zi[r]=n,n.call(e)):e[t]}const Wi={};function pl(s,e,t){const i=`${s}.${String(t)}`;if(Wi[i])return Wi[i].bind(e);const o=lr(s)[t];return typeof o!="function"?e[t]:(Wi[i]=o,o.bind(e))}function xf(s){return Ne("Node",s,"ownerDocument")}function Af(s){return Ne("Node",s,"childNodes")}function Rf(s){return Ne("Node",s,"parentNode")}function Nf(s){return Ne("Node",s,"parentElement")}function Mf(s){return Ne("Node",s,"textContent")}function If(s,e){return pl("Node",s,"contains")(e)}function Df(s){return pl("Node",s,"getRootNode")()}function Of(s){return!s||!("host"in s)?null:Ne("ShadowRoot",s,"host")}function _f(s){return s.styleSheets}function Tf(s){return!s||!("shadowRoot"in s)?null:Ne("Element",s,"shadowRoot")}function kf(s,e){return Ne("Element",s,"querySelector")(e)}function Pf(s,e){return Ne("Element",s,"querySelectorAll")(e)}function Lf(){return lr("MutationObserver").constructor}function $f(s,e,t){try{if(!(e in s))return()=>{};const i=s[e],r=t(i);return typeof r=="function"&&(r.prototype=r.prototype||{},Object.defineProperties(r,{__rrweb_original__:{enumerable:!1,value:i}})),s[e]=r,()=>{s[e]=i}}catch{return()=>{}}}const Ff={ownerDocument:xf,childNodes:Af,parentNode:Rf,parentElement:Nf,textContent:Mf,contains:If,getRootNode:Df,host:Of,styleSheets:_f,shadowRoot:Tf,querySelector:kf,querySelectorAll:Pf,mutationObserver:Lf,patch:$f},We=`Please stop import mirror directly. Instead of that,\r
now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
or you can use record.mirror to access the mirror instance during recording.`;let en={map:{},getId(){return console.error(We),-1},getNode(){return console.error(We),null},removeNodeFromMap(){console.error(We)},has(){return console.error(We),!1},reset(){console.error(We)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(en=new Proxy(en,{get(s,e,t){return e==="map"&&console.error(We),Reflect.get(s,e,t)}}));Date.now().toString();function Bf(s=window){"NodeList"in s&&!s.NodeList.prototype.forEach&&(s.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in s&&!s.DOMTokenList.prototype.forEach&&(s.DOMTokenList.prototype.forEach=Array.prototype.forEach)}function Uf(s){const e={},t=(r,o)=>{const n={value:r,parent:o,children:[]};return e[r.node.id]=n,n},i=[];for(const r of s){const{nextId:o,parentId:n}=r;if(o&&o in e){const l=e[o];if(l.parent){const a=l.parent.children.indexOf(l);l.parent.children.splice(a,0,t(r,l.parent))}else{const a=i.indexOf(l);i.splice(a,0,t(r,null))}continue}if(n in e){const l=e[n];l.children.push(t(r,l));continue}i.push(t(r,null))}return i}function dl(s,e){e(s.value);for(let t=s.children.length-1;t>=0;t--)dl(s.children[t],e)}function Gi(s,e){return!!(s.nodeName==="IFRAME"&&e.getMeta(s))}function ml(s,e){var t,i;const r=(i=(t=s.ownerDocument)==null?void 0:t.defaultView)==null?void 0:i.frameElement;if(!r||r===e)return{x:0,y:0,relativeScale:1,absoluteScale:1};const o=r.getBoundingClientRect(),n=ml(r,e),l=o.height/r.clientHeight;return{x:o.x*n.relativeScale+n.x,y:o.y*n.relativeScale+n.y,relativeScale:l,absoluteScale:n.absoluteScale*l}}function Zt(s){return s?s instanceof me&&"shadowRoot"in s?!!s.shadowRoot:!!Ff.shadowRoot(s):!1}function at(s,e){const t=s[e[0]];return e.length===1?t:at(t.cssRules[e[1]].cssRules,e.slice(2))}function tn(s){const e=[...s],t=e.pop();return{positions:e,index:t}}function zf(s){const e=new Set,t=[];for(let i=s.length;i--;){const r=s[i];e.has(r.id)||(t.push(r),e.add(r.id))}return t}class Wf{constructor(){N(this,"id",1),N(this,"styleIDMap",new WeakMap),N(this,"idStyleMap",new Map)}getId(e){return this.styleIDMap.get(e)??-1}has(e){return this.styleIDMap.has(e)}add(e,t){if(this.has(e))return this.getId(e);let i;return t===void 0?i=this.id++:i=t,this.styleIDMap.set(e,i),this.idStyleMap.set(i,e),i}getStyle(e){return this.idStyleMap.get(e)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}var X=(s=>(s[s.DomContentLoaded=0]="DomContentLoaded",s[s.Load=1]="Load",s[s.FullSnapshot=2]="FullSnapshot",s[s.IncrementalSnapshot=3]="IncrementalSnapshot",s[s.Meta=4]="Meta",s[s.Custom=5]="Custom",s[s.Plugin=6]="Plugin",s))(X||{}),L=(s=>(s[s.Mutation=0]="Mutation",s[s.MouseMove=1]="MouseMove",s[s.MouseInteraction=2]="MouseInteraction",s[s.Scroll=3]="Scroll",s[s.ViewportResize=4]="ViewportResize",s[s.Input=5]="Input",s[s.TouchMove=6]="TouchMove",s[s.MediaInteraction=7]="MediaInteraction",s[s.StyleSheetRule=8]="StyleSheetRule",s[s.CanvasMutation=9]="CanvasMutation",s[s.Font=10]="Font",s[s.Log=11]="Log",s[s.Drag=12]="Drag",s[s.StyleDeclaration=13]="StyleDeclaration",s[s.Selection=14]="Selection",s[s.AdoptedStyleSheet=15]="AdoptedStyleSheet",s[s.CustomElement=16]="CustomElement",s))(L||{}),te=(s=>(s[s.MouseUp=0]="MouseUp",s[s.MouseDown=1]="MouseDown",s[s.Click=2]="Click",s[s.ContextMenu=3]="ContextMenu",s[s.DblClick=4]="DblClick",s[s.Focus=5]="Focus",s[s.Blur=6]="Blur",s[s.TouchStart=7]="TouchStart",s[s.TouchMove_Departed=8]="TouchMove_Departed",s[s.TouchEnd=9]="TouchEnd",s[s.TouchCancel=10]="TouchCancel",s))(te||{}),mi=(s=>(s[s["2D"]=0]="2D",s[s.WebGL=1]="WebGL",s[s.WebGL2=2]="WebGL2",s))(mi||{}),Is=(s=>(s[s.Play=0]="Play",s[s.Pause=1]="Pause",s[s.Seeked=2]="Seeked",s[s.VolumeChange=3]="VolumeChange",s[s.RateChange=4]="RateChange",s))(Is||{}),_=(s=>(s.Start="start",s.Pause="pause",s.Resume="resume",s.Resize="resize",s.Finish="finish",s.FullsnapshotRebuilded="fullsnapshot-rebuilded",s.LoadStylesheetStart="load-stylesheet-start",s.LoadStylesheetEnd="load-stylesheet-end",s.SkipStart="skip-start",s.SkipEnd="skip-end",s.MouseInteraction="mouse-interaction",s.EventCast="event-cast",s.CustomEvent="custom-event",s.Flush="flush",s.StateChange="state-change",s.PlayBack="play-back",s.Destroy="destroy",s))(_||{}),Ie=(s=>(s[s.Document=0]="Document",s[s.DocumentType=1]="DocumentType",s[s.Element=2]="Element",s[s.Text=3]="Text",s[s.CDATA=4]="CDATA",s[s.Comment=5]="Comment",s))(Ie||{}),sn="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ut=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var Ht=0;Ht<sn.length;Ht++)ut[sn.charCodeAt(Ht)]=Ht;var Gf=function(s){var e=s.length*.75,t=s.length,i,r=0,o,n,l,a;s[s.length-1]==="="&&(e--,s[s.length-2]==="="&&e--);var u=new ArrayBuffer(e),c=new Uint8Array(u);for(i=0;i<t;i+=4)o=ut[s.charCodeAt(i)],n=ut[s.charCodeAt(i+1)],l=ut[s.charCodeAt(i+2)],a=ut[s.charCodeAt(i+3)],c[r++]=o<<2|n>>4,c[r++]=(n&15)<<4|l>>2,c[r++]=(l&3)<<6|a&63;return u};const Vf="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=",jf=s=>Uint8Array.from(atob(s),e=>e.charCodeAt(0));typeof window<"u"&&window.Blob&&new Blob([jf(Vf)],{type:"text/javascript;charset=utf-8"});try{if(Array.from([1],s=>s*2)[0]!==2){const s=document.createElement("iframe");document.body.appendChild(s),Array.from=((pr=s.contentWindow)==null?void 0:pr.Array.from)||Array.from,document.body.removeChild(s)}}catch(s){console.debug("Unable to override Array.from",s)}Fn();function gl(s){return{all:s=s||new Map,on:function(e,t){var i=s.get(e);i?i.push(t):s.set(e,[t])},off:function(e,t){var i=s.get(e);i&&(t?i.splice(i.indexOf(t)>>>0,1):s.set(e,[]))},emit:function(e,t){var i=s.get(e);i&&i.slice().map(function(r){r(t)}),(i=s.get("*"))&&i.slice().map(function(r){r(e,t)})}}}const Yf=Object.freeze(Object.defineProperty({__proto__:null,default:gl},Symbol.toStringTag,{value:"Module"}));function Zf(s=window,e=document){if("scrollBehavior"in e.documentElement.style&&s.__forceSmoothScrollPolyfill__!==!0)return;const t=s.HTMLElement||s.Element,i=468,r={scroll:s.scroll||s.scrollTo,scrollBy:s.scrollBy,elementScroll:t.prototype.scroll||a,scrollIntoView:t.prototype.scrollIntoView},o=s.performance&&s.performance.now?s.performance.now.bind(s.performance):Date.now;function n(m){const w=["MSIE ","Trident/","Edge/"];return new RegExp(w.join("|")).test(m)}const l=n(s.navigator.userAgent)?1:0;function a(m,w){this.scrollLeft=m,this.scrollTop=w}function u(m){return .5*(1-Math.cos(Math.PI*m))}function c(m){if(m===null||typeof m!="object"||m.behavior===void 0||m.behavior==="auto"||m.behavior==="instant")return!0;if(typeof m=="object"&&m.behavior==="smooth")return!1;throw new TypeError("behavior member of ScrollOptions "+m.behavior+" is not a valid value for enumeration ScrollBehavior.")}function h(m,w){if(w==="Y")return m.clientHeight+l<m.scrollHeight;if(w==="X")return m.clientWidth+l<m.scrollWidth}function f(m,w){const v=s.getComputedStyle(m,null)["overflow"+w];return v==="auto"||v==="scroll"}function g(m){const w=h(m,"Y")&&f(m,"Y"),v=h(m,"X")&&f(m,"X");return w||v}function d(m){for(;m!==e.body&&g(m)===!1;)m=m.parentNode||m.host;return m}function A(m){const w=o();let v,x,R,D=(w-m.startTime)/i;D=D>1?1:D,v=u(D),x=m.startX+(m.x-m.startX)*v,R=m.startY+(m.y-m.startY)*v,m.method.call(m.scrollable,x,R),(x!==m.x||R!==m.y)&&s.requestAnimationFrame(A.bind(s,m))}function p(m,w,v){let x,R,D,Y;const I=o();m===e.body?(x=s,R=s.scrollX||s.pageXOffset,D=s.scrollY||s.pageYOffset,Y=r.scroll):(x=m,R=m.scrollLeft,D=m.scrollTop,Y=a),A({scrollable:x,method:Y,startTime:I,startX:R,startY:D,x:w,y:v})}s.scroll=s.scrollTo=function(){if(arguments[0]!==void 0){if(c(arguments[0])===!0){r.scroll.call(s,arguments[0].left!==void 0?arguments[0].left:typeof arguments[0]!="object"?arguments[0]:s.scrollX||s.pageXOffset,arguments[0].top!==void 0?arguments[0].top:arguments[1]!==void 0?arguments[1]:s.scrollY||s.pageYOffset);return}p.call(s,e.body,arguments[0].left!==void 0?~~arguments[0].left:s.scrollX||s.pageXOffset,arguments[0].top!==void 0?~~arguments[0].top:s.scrollY||s.pageYOffset)}},s.scrollBy=function(){if(arguments[0]!==void 0){if(c(arguments[0])){r.scrollBy.call(s,arguments[0].left!==void 0?arguments[0].left:typeof arguments[0]!="object"?arguments[0]:0,arguments[0].top!==void 0?arguments[0].top:arguments[1]!==void 0?arguments[1]:0);return}p.call(s,e.body,~~arguments[0].left+(s.scrollX||s.pageXOffset),~~arguments[0].top+(s.scrollY||s.pageYOffset))}},t.prototype.scroll=t.prototype.scrollTo=function(){if(arguments[0]===void 0)return;if(c(arguments[0])===!0){if(typeof arguments[0]=="number"&&arguments[1]===void 0)throw new SyntaxError("Value could not be converted");r.elementScroll.call(this,arguments[0].left!==void 0?~~arguments[0].left:typeof arguments[0]!="object"?~~arguments[0]:this.scrollLeft,arguments[0].top!==void 0?~~arguments[0].top:arguments[1]!==void 0?~~arguments[1]:this.scrollTop);return}const m=arguments[0].left,w=arguments[0].top;p.call(this,this,typeof m>"u"?this.scrollLeft:~~m,typeof w>"u"?this.scrollTop:~~w)},t.prototype.scrollBy=function(){if(arguments[0]!==void 0){if(c(arguments[0])===!0){r.elementScroll.call(this,arguments[0].left!==void 0?~~arguments[0].left+this.scrollLeft:~~arguments[0]+this.scrollLeft,arguments[0].top!==void 0?~~arguments[0].top+this.scrollTop:~~arguments[1]+this.scrollTop);return}this.scroll({left:~~arguments[0].left+this.scrollLeft,top:~~arguments[0].top+this.scrollTop,behavior:arguments[0].behavior})}},t.prototype.scrollIntoView=function(){if(c(arguments[0])===!0){r.scrollIntoView.call(this,arguments[0]===void 0?!0:arguments[0]);return}const m=d(this),w=m.getBoundingClientRect(),v=this.getBoundingClientRect();m!==e.body?(p.call(this,m,m.scrollLeft+v.left-w.left,m.scrollTop+v.top-w.top),s.getComputedStyle(m).position!=="fixed"&&s.scrollBy({left:w.left,top:w.top,behavior:"smooth"})):s.scrollBy({left:v.left,top:v.top,behavior:"smooth"})}}class Hf{constructor(e=[],t){N(this,"timeOffset",0),N(this,"speed"),N(this,"actions"),N(this,"raf",null),N(this,"lastTimestamp"),this.actions=e,this.speed=t.speed}addAction(e){const t=this.raf===!0;if(!this.actions.length||this.actions[this.actions.length-1].delay<=e.delay)this.actions.push(e);else{const i=this.findActionIndex(e);this.actions.splice(i,0,e)}t&&(this.raf=requestAnimationFrame(this.rafCheck.bind(this)))}start(){this.timeOffset=0,this.lastTimestamp=performance.now(),this.raf=requestAnimationFrame(this.rafCheck.bind(this))}rafCheck(){const e=performance.now();for(this.timeOffset+=(e-this.lastTimestamp)*this.speed,this.lastTimestamp=e;this.actions.length;){const t=this.actions[0];if(this.timeOffset>=t.delay)this.actions.shift(),t.doAction();else break}this.actions.length>0?this.raf=requestAnimationFrame(this.rafCheck.bind(this)):this.raf=!0}clear(){this.raf&&(this.raf!==!0&&cancelAnimationFrame(this.raf),this.raf=null),this.actions.length=0}setSpeed(e){this.speed=e}isActive(){return this.raf!==null}findActionIndex(e){let t=0,i=this.actions.length-1;for(;t<=i;){const r=Math.floor((t+i)/2);if(this.actions[r].delay<e.delay)t=r+1;else if(this.actions[r].delay>e.delay)i=r-1;else return r+1}return t}}function rn(s,e){if(s.type===X.IncrementalSnapshot&&s.data.source===L.MouseMove&&s.data.positions&&s.data.positions.length){const t=s.data.positions[0].timeOffset,i=s.timestamp+t;return s.delay=i-e,i-e}return s.delay=s.timestamp-e,s.delay}function nn(s,e){var t=typeof Symbol=="function"&&s[Symbol.iterator];if(!t)return s;var i,r,o=t.call(s),n=[];try{for(;(e===void 0||e-- >0)&&!(i=o.next()).done;)n.push(i.value)}catch(l){r={error:l}}finally{try{i&&!i.done&&(t=o.return)&&t.call(o)}finally{if(r)throw r.error}}return n}var je;(function(s){s[s.NotStarted=0]="NotStarted",s[s.Running=1]="Running",s[s.Stopped=2]="Stopped"})(je||(je={}));var yl={type:"xstate.init"};function Vi(s){return s===void 0?[]:[].concat(s)}function Ge(s){return{type:"xstate.assign",assignment:s}}function on(s,e){return typeof(s=typeof s=="string"&&e&&e[s]?e[s]:s)=="string"?{type:s}:typeof s=="function"?{type:s.name,exec:s}:s}function gi(s){return function(e){return s===e}}function wl(s){return typeof s=="string"?{type:s}:s}function ln(s,e){return{value:s,context:e,actions:[],changed:!1,matches:gi(s)}}function an(s,e,t){var i=e,r=!1;return[s.filter(function(o){if(o.type==="xstate.assign"){r=!0;var n=Object.assign({},i);return typeof o.assignment=="function"?n=o.assignment(i,t):Object.keys(o.assignment).forEach(function(l){n[l]=typeof o.assignment[l]=="function"?o.assignment[l](i,t):o.assignment[l]}),i=n,!1}return!0}),i,r]}function vl(s,e){e===void 0&&(e={});var t=nn(an(Vi(s.states[s.initial].entry).map(function(n){return on(n,e.actions)}),s.context,yl),2),i=t[0],r=t[1],o={config:s,_options:e,initialState:{value:s.initial,actions:i,context:r,matches:gi(s.initial)},transition:function(n,l){var a,u,c=typeof n=="string"?{value:n,context:s.context}:n,h=c.value,f=c.context,g=wl(l),d=s.states[h];if(d.on){var A=Vi(d.on[g.type]);try{for(var p=(function(z){var ne=typeof Symbol=="function"&&Symbol.iterator,se=ne&&z[ne],ee=0;if(se)return se.call(z);if(z&&typeof z.length=="number")return{next:function(){return z&&ee>=z.length&&(z=void 0),{value:z&&z[ee++],done:!z}}};throw new TypeError(ne?"Object is not iterable.":"Symbol.iterator is not defined.")})(A),m=p.next();!m.done;m=p.next()){var w=m.value;if(w===void 0)return ln(h,f);var v=typeof w=="string"?{target:w}:w,x=v.target,R=v.actions,D=R===void 0?[]:R,Y=v.cond,I=Y===void 0?function(){return!0}:Y,H=x===void 0,U=x??h,ce=s.states[U];if(I(f,g)){var oe=nn(an((H?Vi(D):[].concat(d.exit,D,ce.entry).filter(function(z){return z})).map(function(z){return on(z,o._options.actions)}),f,g),3),Q=oe[0],$=oe[1],re=oe[2],k=x??h;return{value:k,context:$,actions:Q,changed:x!==h||Q.length>0||re,matches:gi(k)}}}}catch(z){a={error:z}}finally{try{m&&!m.done&&(u=p.return)&&u.call(p)}finally{if(a)throw a.error}}}return ln(h,f)}};return o}var un=function(s,e){return s.actions.forEach(function(t){var i=t.exec;return i&&i(s.context,e)})};function bl(s){var e=s.initialState,t=je.NotStarted,i=new Set,r={_machine:s,send:function(o){t===je.Running&&(e=s.transition(e,o),un(e,wl(o)),i.forEach(function(n){return n(e)}))},subscribe:function(o){return i.add(o),o(e),{unsubscribe:function(){return i.delete(o)}}},start:function(o){if(o){var n=typeof o=="object"?o:{context:s.config.context,value:o};e={value:n.value,actions:[],context:n.context,matches:gi(n.value)}}return t=je.Running,un(e,yl),r},stop:function(){return t=je.Stopped,i.clear(),r},get state(){return e},get status(){return t}};return r}function Xf(s,e){for(let t=s.length-1;t>=0;t--){const i=s[t];if(i.type===X.Meta&&i.timestamp<=e)return s.slice(t)}return s}function Jf(s,{getCastFn:e,applyEventsSynchronously:t,emitter:i}){const r=vl({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"]},ADD_EVENT:{target:"playing",actions:["addEvent"]}}},paused:{on:{PLAY:{target:"playing",actions:["recordTimeOffset","play"]},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:Ge({lastPlayedEvent:(o,n)=>n.type==="CAST_EVENT"?n.payload.event:o.lastPlayedEvent}),recordTimeOffset:Ge((o,n)=>{let l=o.timeOffset;return"payload"in n&&"timeOffset"in n.payload&&(l=n.payload.timeOffset),{...o,timeOffset:l,baselineTime:o.events[0].timestamp+l}}),play(o){var n;const{timer:l,events:a,baselineTime:u,lastPlayedEvent:c}=o;l.clear();for(const d of a)rn(d,u);const h=Xf(a,u);let f=c?.timestamp;c?.type===X.IncrementalSnapshot&&c.data.source===L.MouseMove&&(f=c.timestamp+((n=c.data.positions[0])==null?void 0:n.timeOffset)),u<(f||0)&&i.emit(_.PlayBack);const g=new Array;for(const d of h)if(!(f&&f<u&&(d.timestamp<=f||d===c)))if(d.timestamp<u)g.push(d);else{const A=e(d,!1);l.addAction({doAction:()=>{A()},delay:d.delay})}t(g),i.emit(_.Flush),l.start()},pause(o){o.timer.clear()},resetLastPlayedEvent:Ge(o=>({...o,lastPlayedEvent:null})),startLive:Ge({baselineTime:(o,n)=>(o.timer.start(),n.type==="TO_LIVE"&&n.payload.baselineTime?n.payload.baselineTime:Date.now())}),addEvent:Ge((o,n)=>{const{baselineTime:l,timer:a,events:u}=o;if(n.type==="ADD_EVENT"){const{event:c}=n.payload;rn(c,l);let h=u.length-1;if(!u[h]||u[h].timestamp<=c.timestamp)u.push(c);else{let d=-1,A=0;for(;A<=h;){const p=Math.floor((A+h)/2);u[p].timestamp<=c.timestamp?A=p+1:h=p-1}d===-1&&(d=A),u.splice(d,0,c)}const f=c.timestamp<l,g=e(c,f);f?g():a.isActive()&&a.addAction({doAction:()=>{g()},delay:c.delay})}return{...o,events:u}})}});return bl(r)}function Kf(s){const e=vl({id:"speed",context:s,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,i)=>{"payload"in i&&t.timer.setSpeed(i.payload.speed)},recordSpeed:Ge({normalSpeed:t=>t.timer.speed}),restoreSpeed:t=>{t.timer.setSpeed(t.normalSpeed)}}});return bl(e)}const Qf=s=>[`.${s} { background: currentColor }`,"noscript { display: none !important; }"],cn=new Map;function Cl(s,e){let t=cn.get(s);return t||(t=new Map,cn.set(s,t)),t.has(e)||t.set(e,[]),t.get(e)}function De(s,e,t){return async i=>{if(i&&typeof i=="object"&&"rr_type"in i)if(t&&(t.isUnchanged=!1),i.rr_type==="ImageBitmap"&&"args"in i){const r=await De(s,e,t)(i.args);return await createImageBitmap.apply(null,r)}else if("index"in i){if(t||e===null)return i;const{rr_type:r,index:o}=i;return Cl(e,r)[o]}else if("args"in i){const{rr_type:r,args:o}=i,n=window[r];return new n(...await Promise.all(o.map(De(s,e,t))))}else{if("base64"in i)return Gf(i.base64);if("src"in i){const r=s.get(i.src);if(r)return r;{const o=new Image;return o.src=i.src,s.set(i.src,o),o}}else if("data"in i&&i.rr_type==="Blob"){const r=await Promise.all(i.data.map(De(s,e,t)));return new Blob(r,{type:i.type})}}else if(Array.isArray(i))return await Promise.all(i.map(De(s,e,t)));return i}}function qf(s,e){try{return e===mi.WebGL?s.getContext("webgl")||s.getContext("experimental-webgl"):s.getContext("webgl2")}catch{return null}}const ep=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject"];function tp(s,e){if(!e?.constructor)return;const{name:t}=e.constructor;if(!ep.includes(t))return;const i=Cl(s,t);i.includes(e)||i.push(e)}async function ip({mutation:s,target:e,type:t,imageMap:i,errorHandler:r}){try{const o=qf(e,t);if(!o)return;if(s.setter){o[s.property]=s.args[0];return}const n=o[s.property],l=await Promise.all(s.args.map(De(i,o))),a=n.apply(o,l);tp(o,a);const u=!1}catch(o){r(s,o)}}async function sp({event:s,mutations:e,target:t,imageMap:i,errorHandler:r}){const o=t.getContext("2d");if(!o){r(e[0],new Error("Canvas context is null"));return}const n=e.map(async a=>Promise.all(a.args.map(De(i,o))));(await Promise.all(n)).forEach((a,u)=>{const c=e[u];try{if(c.setter){o[c.property]=c.args[0];return}const h=o[c.property];c.property==="drawImage"&&typeof c.args[0]=="string"?(i.get(s),h.apply(o,c.args)):h.apply(o,a)}catch(h){r(c,h)}})}async function hn({event:s,mutation:e,target:t,imageMap:i,canvasEventMap:r,errorHandler:o}){try{const n=r.get(s)||e,l="commands"in n?n.commands:[n];if([mi.WebGL,mi.WebGL2].includes(e.type)){for(let a=0;a<l.length;a++){const u=l[a];await ip({mutation:u,type:e.type,target:t,imageMap:i,errorHandler:o})}return}await sp({event:s,mutations:l,target:t,imageMap:i,errorHandler:o})}catch(n){o(e,n)}}class rp{constructor(e){N(this,"mediaMap",new Map),N(this,"warn"),N(this,"service"),N(this,"speedService"),N(this,"emitter"),N(this,"getCurrentTime"),N(this,"metadataCallbackMap",new Map),this.warn=e.warn,this.service=e.service,this.speedService=e.speedService,this.emitter=e.emitter,this.getCurrentTime=e.getCurrentTime,this.emitter.on(_.Start,this.start.bind(this)),this.emitter.on(_.SkipStart,this.start.bind(this)),this.emitter.on(_.Pause,this.pause.bind(this)),this.emitter.on(_.Finish,this.pause.bind(this)),this.speedService.subscribe(()=>{this.syncAllMediaElements()})}syncAllMediaElements(e={pause:!1}){this.mediaMap.forEach((t,i)=>{this.syncTargetWithState(i),e.pause&&i.pause()})}start(){this.syncAllMediaElements()}pause(){this.syncAllMediaElements({pause:!0})}seekTo({time:e,target:t,mediaState:i}){if(i.isPlaying){const o=(e-i.lastInteractionTimeOffset)/1e3*i.playbackRate,n="duration"in t&&t.duration;if(Number.isNaN(n)){this.waitForMetadata(t);return}let l=i.currentTimeAtLastInteraction+o;t.loop&&n!==!1&&(l=l%n),t.currentTime=l}else t.pause(),t.currentTime=i.currentTimeAtLastInteraction}waitForMetadata(e){if(this.metadataCallbackMap.has(e)||!("addEventListener"in e))return;const t=()=>{this.metadataCallbackMap.delete(e);const i=this.mediaMap.get(e);i&&this.seekTo({time:this.getCurrentTime(),target:e,mediaState:i})};this.metadataCallbackMap.set(e,t),e.addEventListener("loadedmetadata",t,{once:!0})}getMediaStateFromMutation({target:e,timeOffset:t,mutation:i}){const r=this.mediaMap.get(e),{type:o,playbackRate:n,currentTime:l,muted:a,volume:u,loop:c}=i;return{isPlaying:o===Is.Play||o!==Is.Pause&&(r?.isPlaying||e.getAttribute("autoplay")!==null),currentTimeAtLastInteraction:l??r?.currentTimeAtLastInteraction??0,lastInteractionTimeOffset:t,playbackRate:n??r?.playbackRate??1,volume:u??r?.volume??1,muted:a??r?.muted??e.getAttribute("muted")===null,loop:c??r?.loop??e.getAttribute("loop")===null}}syncTargetWithState(e){const t=this.mediaMap.get(e);if(!t)return;const{muted:i,loop:r,volume:o,isPlaying:n}=t,l=this.service.state.matches("paused"),a=t.playbackRate*this.speedService.state.context.timer.speed;try{this.seekTo({time:this.getCurrentTime(),target:e,mediaState:t}),e.volume!==o&&(e.volume=o),e.muted=i,e.loop=r,e.playbackRate!==a&&(e.playbackRate=a),n&&!l?e.play():e.pause()}catch(u){this.warn(`Failed to replay media interactions: ${u.message||u}`)}}addMediaElements(e,t,i){if(!["AUDIO","VIDEO"].includes(e.nodeName))return;const r=e,o=i.getMeta(r);if(!o||!("attributes"in o))return;const n=this.service.state.matches("paused"),l=o.attributes;let a=!1;l.rr_mediaState?a=l.rr_mediaState==="played":a=r.getAttribute("autoplay")!==null,a&&n&&r.pause();let u=1;typeof l.rr_mediaPlaybackRate=="number"&&(u=l.rr_mediaPlaybackRate);let c=!1;typeof l.rr_mediaMuted=="boolean"?c=l.rr_mediaMuted:c=r.getAttribute("muted")!==null;let h=!1;typeof l.rr_mediaLoop=="boolean"?h=l.rr_mediaLoop:h=r.getAttribute("loop")!==null;let f=1;typeof l.rr_mediaVolume=="number"&&(f=l.rr_mediaVolume);let g=0;typeof l.rr_mediaCurrentTime=="number"&&(g=l.rr_mediaCurrentTime),this.mediaMap.set(r,{isPlaying:a,currentTimeAtLastInteraction:g,lastInteractionTimeOffset:t,playbackRate:u,volume:f,muted:c,loop:h}),this.syncTargetWithState(r)}mediaMutation({target:e,timeOffset:t,mutation:i}){this.mediaMap.set(e,this.getMediaStateFromMutation({target:e,timeOffset:t,mutation:i})),this.syncTargetWithState(e)}isSupportedMediaElement(e){return["AUDIO","VIDEO"].includes(e.nodeName)}reset(){this.mediaMap.clear()}}function Xt(s,e){if(s.nodeName!=="DIALOG"||s instanceof me)return;const t=s,i=t.open,r=i&&t.matches("dialog:modal"),o=t.getAttribute("rr_open_mode"),n=typeof e?.attributes.open=="string"||typeof t.getAttribute("open")=="string",l=o==="modal";if(!(i&&!(r&&o==="non-modal"||!r&&l))){if(!t.isConnected){console.warn("dialog is not attached to the dom",t);return}i&&t.close(),n&&(l?t.showModal():t.show())}}function np(s,e){if(s.nodeName!=="DIALOG"||s instanceof me)return;const t=s;if(!t.isConnected){console.warn("dialog is not attached to the dom",t);return}e.attributes.open===null&&(t.removeAttribute("open"),t.removeAttribute("rr_open_mode"))}const op=5*1e3,lp=gl||Yf,fn="[replayer]",ji={duration:500,lineCap:"round",lineWidth:3,strokeStyle:"red"};function pn(s){return s.type==X.IncrementalSnapshot&&(s.data.source==L.TouchMove||s.data.source==L.MouseInteraction&&s.data.type==te.TouchStart)}class ap{constructor(e,t){if(N(this,"wrapper"),N(this,"iframe"),N(this,"service"),N(this,"speedService"),N(this,"config"),N(this,"usingVirtualDom",!1),N(this,"virtualDom",new it),N(this,"mouse"),N(this,"mouseTail",null),N(this,"tailPositions",[]),N(this,"emitter",lp()),N(this,"nextUserInteractionEvent"),N(this,"legacy_missingNodeRetryMap",{}),N(this,"cache",Tr()),N(this,"imageMap",new Map),N(this,"canvasEventMap",new Map),N(this,"mirror",Fn()),N(this,"styleMirror",new Wf),N(this,"mediaManager"),N(this,"firstFullSnapshot",null),N(this,"newDocumentQueue",[]),N(this,"mousePos",null),N(this,"touchActive",null),N(this,"lastMouseDownEvent",null),N(this,"lastHoveredRootNode"),N(this,"lastSelectionData",null),N(this,"constructedStyleMutations",[]),N(this,"adoptedStyleSheets",[]),N(this,"handleResize",l=>{this.iframe.style.display="inherit";for(const a of[this.mouseTail,this.iframe])a&&(a.setAttribute("width",String(l.width)),a.setAttribute("height",String(l.height)))}),N(this,"applyEventsSynchronously",l=>{for(const a of l){switch(a.type){case X.DomContentLoaded:case X.Load:case X.Custom:continue;case X.FullSnapshot:case X.Meta:case X.Plugin:case X.IncrementalSnapshot:break}this.getCastFn(a,!0)()}}),N(this,"getCastFn",(l,a=!1)=>{let u;switch(l.type){case X.DomContentLoaded:case X.Load:break;case X.Custom:u=()=>{this.emitter.emit(_.CustomEvent,l)};break;case X.Meta:u=()=>this.emitter.emit(_.Resize,{width:l.data.width,height:l.data.height});break;case X.FullSnapshot:u=()=>{var h;if(this.firstFullSnapshot){if(this.firstFullSnapshot===l){this.firstFullSnapshot=!0;return}}else this.firstFullSnapshot=!0;this.mediaManager.reset(),this.styleMirror.reset(),this.rebuildFullSnapshot(l,a),(h=this.iframe.contentWindow)==null||h.scrollTo(l.data.initialOffset)};break;case X.IncrementalSnapshot:u=()=>{if(this.applyIncremental(l,a),!a&&(l===this.nextUserInteractionEvent&&(this.nextUserInteractionEvent=null,this.backToNormal()),this.config.skipInactive&&!this.nextUserInteractionEvent)){for(const h of this.service.state.context.events)if(!(h.timestamp<=l.timestamp)&&this.isUserInteraction(h)){h.delay-l.delay>this.config.inactivePeriodThreshold*this.speedService.state.context.timer.speed&&(this.nextUserInteractionEvent=h);break}if(this.nextUserInteractionEvent){const h=this.nextUserInteractionEvent.delay-l.delay,f={speed:Math.min(Math.round(h/op),this.config.maxSpeed)};this.speedService.send({type:"FAST_FORWARD",payload:f}),this.emitter.emit(_.SkipStart,f)}}};break}return()=>{u&&u();for(const f of this.config.plugins||[])f.handler&&f.handler(l,a,{replayer:this});this.service.send({type:"CAST_EVENT",payload:{event:l}});const h=this.service.state.context.events.length-1;if(!this.config.liveMode&&l===this.service.state.context.events[h]){const f=()=>{h<this.service.state.context.events.length-1||(this.backToNormal(),this.service.send("END"),this.emitter.emit(_.Finish))};let g=50;l.type===X.IncrementalSnapshot&&l.data.source===L.MouseMove&&l.data.positions.length&&(g+=Math.max(0,-l.data.positions[0].timeOffset)),setTimeout(f,g)}this.emitter.emit(_.EventCast,l)}}),!t?.liveMode&&e.length<2)throw new Error("Replayer need at least 2 events.");const i={speed:1,maxSpeed:360,root:document.body,loadTimeout:0,skipInactive:!1,inactivePeriodThreshold:10*1e3,showWarning:!0,showDebug:!1,blockClass:"rr-block",liveMode:!1,insertStyleRules:[],triggerFocus:!0,UNSAFE_replayCanvas:!1,pauseAnimation:!0,mouseTail:ji,useVirtualDom:!0,logger:console};this.config=Object.assign({},i,t),this.handleResize=this.handleResize.bind(this),this.getCastFn=this.getCastFn.bind(this),this.applyEventsSynchronously=this.applyEventsSynchronously.bind(this),this.emitter.on(_.Resize,this.handleResize),this.setupDom();for(const l of this.config.plugins||[])l.getMirror&&l.getMirror({nodeMirror:this.mirror});this.emitter.on(_.Flush,()=>{if(this.usingVirtualDom){const l={mirror:this.mirror,applyCanvas:(a,u,c)=>{hn({event:a,mutation:u,target:c,imageMap:this.imageMap,canvasEventMap:this.canvasEventMap,errorHandler:this.warnCanvasMutationFailed.bind(this)})},applyInput:this.applyInput.bind(this),applyScroll:this.applyScroll.bind(this),applyStyleSheetMutation:(a,u)=>{a.source===L.StyleSheetRule?this.applyStyleSheetRule(a,u):a.source===L.StyleDeclaration&&this.applyStyleDeclaration(a,u)},afterAppend:(a,u)=>{for(const c of this.config.plugins||[])c.onBuild&&c.onBuild(a,{id:u,replayer:this})}};if(this.iframe.contentDocument)try{pi(this.iframe.contentDocument,this.virtualDom,l,this.virtualDom.mirror)}catch(a){console.warn(a)}if(this.virtualDom.destroyTree(),this.usingVirtualDom=!1,Object.keys(this.legacy_missingNodeRetryMap).length)for(const a in this.legacy_missingNodeRetryMap)try{const u=this.legacy_missingNodeRetryMap[a],c=di(u.node,this.mirror,this.virtualDom.mirror);pi(c,u.node,l,this.virtualDom.mirror),u.node=c}catch(u){this.warn(u)}this.constructedStyleMutations.forEach(a=>{this.applyStyleSheetMutation(a)}),this.constructedStyleMutations=[],this.adoptedStyleSheets.forEach(a=>{this.applyAdoptedStyleSheet(a)}),this.adoptedStyleSheets=[]}if(this.mousePos&&(this.moveAndHover(this.mousePos.x,this.mousePos.y,this.mousePos.id,!0,this.mousePos.debugData),this.mousePos=null),this.touchActive===!0?this.mouse.classList.add("touch-active"):this.touchActive===!1&&this.mouse.classList.remove("touch-active"),this.touchActive=null,this.lastMouseDownEvent){const[l,a]=this.lastMouseDownEvent;l.dispatchEvent(a)}this.lastMouseDownEvent=null,this.lastSelectionData&&(this.applySelection(this.lastSelectionData),this.lastSelectionData=null)}),this.emitter.on(_.PlayBack,()=>{this.firstFullSnapshot=null,this.mirror.reset(),this.styleMirror.reset(),this.mediaManager.reset()});const r=new Hf([],{speed:this.config.speed});this.service=Jf({events:e.map(l=>t&&t.unpackFn?t.unpackFn(l):l).sort((l,a)=>l.timestamp-a.timestamp),timer:r,timeOffset:0,baselineTime:0,lastPlayedEvent:null},{getCastFn:this.getCastFn,applyEventsSynchronously:this.applyEventsSynchronously,emitter:this.emitter}),this.service.start(),this.service.subscribe(l=>{this.emitter.emit(_.StateChange,{player:l})}),this.speedService=Kf({normalSpeed:-1,timer:r}),this.speedService.start(),this.speedService.subscribe(l=>{this.emitter.emit(_.StateChange,{speed:l})}),this.mediaManager=new rp({warn:this.warn.bind(this),service:this.service,speedService:this.speedService,emitter:this.emitter,getCurrentTime:this.getCurrentTime.bind(this)});const o=this.service.state.context.events.find(l=>l.type===X.Meta),n=this.service.state.context.events.find(l=>l.type===X.FullSnapshot);if(o){const{width:l,height:a}=o.data;setTimeout(()=>{this.emitter.emit(_.Resize,{width:l,height:a})},0)}n&&setTimeout(()=>{var l;this.firstFullSnapshot||(this.firstFullSnapshot=n,this.rebuildFullSnapshot(n),(l=this.iframe.contentWindow)==null||l.scrollTo(n.data.initialOffset))},1),this.service.state.context.events.find(pn)&&this.mouse.classList.add("touch-device")}get timer(){return this.service.state.context.timer}on(e,t){return this.emitter.on(e,t),this}off(e,t){return this.emitter.off(e,t),this}setConfig(e){Object.keys(e).forEach(t=>{e[t],this.config[t]=e[t]}),this.config.skipInactive||this.backToNormal(),typeof e.speed<"u"&&this.speedService.send({type:"SET_SPEED",payload:{speed:e.speed}}),typeof e.mouseTail<"u"&&(e.mouseTail===!1?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(){const e=this.service.state.context.events[0],t=this.service.state.context.events[this.service.state.context.events.length-1];return{startTime:e.timestamp,endTime:t.timestamp,totalTime:t.timestamp-e.timestamp}}getCurrentTime(){return this.timer.timeOffset+this.getTimeOffset()}getTimeOffset(){const{baselineTime:e,events:t}=this.service.state.context;return e-t[0].timestamp}getMirror(){return this.mirror}play(e=0){var t,i;this.service.state.matches("paused")?this.service.send({type:"PLAY",payload:{timeOffset:e}}):(this.service.send({type:"PAUSE"}),this.service.send({type:"PLAY",payload:{timeOffset:e}})),(i=(t=this.iframe.contentDocument)==null?void 0:t.getElementsByTagName("html")[0])==null||i.classList.remove("rrweb-paused"),this.emitter.emit(_.Start)}pause(e){var t,i;e===void 0&&this.service.state.matches("playing")&&this.service.send({type:"PAUSE"}),typeof e=="number"&&(this.play(e),this.service.send({type:"PAUSE"})),(i=(t=this.iframe.contentDocument)==null?void 0:t.getElementsByTagName("html")[0])==null||i.classList.add("rrweb-paused"),this.emitter.emit(_.Pause)}resume(e=0){this.warn("The 'resume' was deprecated in 1.0. Please use 'play' method which has the same interface."),this.play(e),this.emitter.emit(_.Resume)}destroy(){this.pause(),this.mirror.reset(),this.styleMirror.reset(),this.mediaManager.reset(),this.config.root.removeChild(this.wrapper),this.emitter.emit(_.Destroy)}startLive(e){this.service.send({type:"TO_LIVE",payload:{baselineTime:e}})}addEvent(e){const t=this.config.unpackFn?this.config.unpackFn(e):e;pn(t)&&this.mouse.classList.add("touch-device"),Promise.resolve().then(()=>this.service.send({type:"ADD_EVENT",payload:{event:t}}))}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=Tr()}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),this.config.mouseTail!==!1&&(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");const e=["allow-same-origin"];this.config.UNSAFE_replayCanvas&&e.push("allow-scripts"),this.iframe.style.display="none",this.iframe.setAttribute("sandbox",e.join(" ")),this.disableInteract(),this.wrapper.appendChild(this.iframe),this.iframe.contentWindow&&this.iframe.contentDocument&&(Zf(this.iframe.contentWindow,this.iframe.contentDocument),Bf(this.iframe.contentWindow))}rebuildFullSnapshot(e,t=!1){if(!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={};const i=[],r=new Set,o=(a,u)=>{if(a.nodeName==="DIALOG"&&r.add(a),this.collectIframeAndAttachDocument(i,a),this.mediaManager.isSupportedMediaElement(a)){const{events:c}=this.service.state.context;this.mediaManager.addMediaElements(a,e.timestamp-c[0].timestamp,this.mirror)}for(const c of this.config.plugins||[])c.onBuild&&c.onBuild(a,{id:u,replayer:this})};this.usingVirtualDom&&(this.virtualDom.destroyTree(),this.usingVirtualDom=!1),this.mirror.reset(),ic(e.data.node,{doc:this.iframe.contentDocument,afterAppend:o,cache:this.cache,mirror:this.mirror}),o(this.iframe.contentDocument,e.data.node.id);for(const{mutationInQueue:a,builtNode:u}of i)this.attachDocumentToIframe(a,u),this.newDocumentQueue=this.newDocumentQueue.filter(c=>c!==a);const{documentElement:n,head:l}=this.iframe.contentDocument;this.insertStyleRules(n,l),r.forEach(a=>Xt(a)),this.service.state.matches("playing")||this.iframe.contentDocument.getElementsByTagName("html")[0].classList.add("rrweb-paused"),this.emitter.emit(_.FullsnapshotRebuilded,e),t||this.waitForStylesheetLoad(),this.config.UNSAFE_replayCanvas&&this.preloadAllImages()}insertStyleRules(e,t){var i;const r=Qf(this.config.blockClass).concat(this.config.insertStyleRules);if(this.config.pauseAnimation&&r.push("html.rrweb-paused *, html.rrweb-paused *:before, html.rrweb-paused *:after { animation-play-state: paused !important; }"),!!r.length)if(this.usingVirtualDom){const o=this.virtualDom.createElement("style");this.virtualDom.mirror.add(o,fl(o,this.virtualDom.unserializedId)),e.insertBefore(o,t),o.rules.push({source:L.StyleSheetRule,adds:r.map((n,l)=>({rule:n,index:l}))})}else{const o=document.createElement("style");e.insertBefore(o,t);for(let n=0;n<r.length;n++)(i=o.sheet)==null||i.insertRule(r[n],n)}}attachDocumentToIframe(e,t){const i=this.usingVirtualDom?this.virtualDom.mirror:this.mirror,r=[],o=new Set,n=(l,a)=>{l.nodeName==="DIALOG"&&o.add(l),this.collectIframeAndAttachDocument(r,l);const u=i.getMeta(l);if(u?.type===Ie.Element&&u?.tagName.toUpperCase()==="HTML"){const{documentElement:c,head:h}=t.contentDocument;this.insertStyleRules(c,h)}if(!this.usingVirtualDom)for(const c of this.config.plugins||[])c.onBuild&&c.onBuild(l,{id:a,replayer:this})};ht(e.node,{doc:t.contentDocument,mirror:i,hackCss:!0,skipChild:!1,afterAppend:n,cache:this.cache}),n(t.contentDocument,e.node.id);for(const{mutationInQueue:l,builtNode:a}of r)this.attachDocumentToIframe(l,a),this.newDocumentQueue=this.newDocumentQueue.filter(u=>u!==l);o.forEach(l=>Xt(l))}collectIframeAndAttachDocument(e,t){if(Gi(t,this.mirror)){const i=this.newDocumentQueue.find(r=>r.parentId===this.mirror.getId(t));i&&e.push({mutationInQueue:i,builtNode:t})}}waitForStylesheetLoad(){var e;const t=(e=this.iframe.contentDocument)==null?void 0:e.head;if(t){const i=new Set;let r,o=this.service.state;const n=()=>{o=this.service.state};this.emitter.on(_.Start,n),this.emitter.on(_.Pause,n);const l=()=>{this.emitter.off(_.Start,n),this.emitter.off(_.Pause,n)};t.querySelectorAll('link[rel="stylesheet"]').forEach(a=>{a.sheet||(i.add(a),a.addEventListener("load",()=>{i.delete(a),i.size===0&&r!==-1&&(o.matches("playing")&&this.play(this.getCurrentTime()),this.emitter.emit(_.LoadStylesheetEnd),r&&clearTimeout(r),l())}))}),i.size>0&&(this.service.send({type:"PAUSE"}),this.emitter.emit(_.LoadStylesheetStart),r=setTimeout(()=>{o.matches("playing")&&this.play(this.getCurrentTime()),r=-1,l()},this.config.loadTimeout))}}async preloadAllImages(){const e=[];for(const t of this.service.state.context.events)t.type===X.IncrementalSnapshot&&t.data.source===L.CanvasMutation&&(e.push(this.deserializeAndPreloadCanvasEvents(t.data,t)),("commands"in t.data?t.data.commands:[t.data]).forEach(r=>{this.preloadImages(r,t)}));return Promise.all(e)}preloadImages(e,t){if(e.property==="drawImage"&&typeof e.args[0]=="string"&&!this.imageMap.has(t)){const i=document.createElement("canvas"),r=i.getContext("2d"),o=r?.createImageData(i.width,i.height);r?.putImageData(o,0,0)}}async deserializeAndPreloadCanvasEvents(e,t){if(!this.canvasEventMap.has(t)){const i={isUnchanged:!0};if("commands"in e){const r=await Promise.all(e.commands.map(async o=>{const n=await Promise.all(o.args.map(De(this.imageMap,null,i)));return{...o,args:n}}));i.isUnchanged===!1&&this.canvasEventMap.set(t,{...e,commands:r})}else{const r=await Promise.all(e.args.map(De(this.imageMap,null,i)));i.isUnchanged===!1&&this.canvasEventMap.set(t,{...e,args:r})}}}applyIncremental(e,t){var i,r,o;const{data:n}=e;switch(n.source){case L.Mutation:{try{this.applyMutation(n,t)}catch(l){this.warn(`Exception in mutation ${l.message||l}`,n)}break}case L.Drag:case L.TouchMove:case L.MouseMove:if(t){const l=n.positions[n.positions.length-1];this.mousePos={x:l.x,y:l.y,id:l.id,debugData:n}}else n.positions.forEach(l=>{const a={doAction:()=>{this.moveAndHover(l.x,l.y,l.id,t,n)},delay:l.timeOffset+e.timestamp-this.service.state.context.baselineTime};this.timer.addAction(a)}),this.timer.addAction({doAction(){},delay:e.delay-((i=n.positions[0])==null?void 0:i.timeOffset)});break;case L.MouseInteraction:{if(n.id===-1)break;const l=new Event(ia(te[n.type])),a=this.mirror.getNode(n.id);if(!a)return this.debugNodeNotFound(n,n.id);this.emitter.emit(_.MouseInteraction,{type:n.type,target:a});const{triggerFocus:u}=this.config;switch(n.type){case te.Blur:"blur"in a&&a.blur();break;case te.Focus:u&&a.focus&&a.focus({preventScroll:!0});break;case te.Click:case te.TouchStart:case te.TouchEnd:case te.MouseDown:case te.MouseUp:t?(n.type===te.TouchStart?this.touchActive=!0:n.type===te.TouchEnd&&(this.touchActive=!1),n.type===te.MouseDown?this.lastMouseDownEvent=[a,l]:n.type===te.MouseUp&&(this.lastMouseDownEvent=null),this.mousePos={x:n.x||0,y:n.y||0,id:n.id,debugData:n}):(n.type===te.TouchStart&&(this.tailPositions.length=0),this.moveAndHover(n.x||0,n.y||0,n.id,t,n),n.type===te.Click?(this.mouse.classList.remove("active"),this.mouse.offsetWidth,this.mouse.classList.add("active")):n.type===te.TouchStart?(this.mouse.offsetWidth,this.mouse.classList.add("touch-active")):n.type===te.TouchEnd?this.mouse.classList.remove("touch-active"):a.dispatchEvent(l));break;case te.TouchCancel:t?this.touchActive=!1:this.mouse.classList.remove("touch-active");break;default:a.dispatchEvent(l)}break}case L.Scroll:{if(n.id===-1)break;if(this.usingVirtualDom){const l=this.virtualDom.mirror.getNode(n.id);if(!l)return this.debugNodeNotFound(n,n.id);l.scrollData=n;break}this.applyScroll(n,t);break}case L.ViewportResize:this.emitter.emit(_.Resize,{width:n.width,height:n.height});break;case L.Input:{if(n.id===-1)break;if(this.usingVirtualDom){const l=this.virtualDom.mirror.getNode(n.id);if(!l)return this.debugNodeNotFound(n,n.id);l.inputData=n;break}this.applyInput(n);break}case L.MediaInteraction:{const l=this.usingVirtualDom?this.virtualDom.mirror.getNode(n.id):this.mirror.getNode(n.id);if(!l)return this.debugNodeNotFound(n,n.id);const a=l,{events:u}=this.service.state.context;this.mediaManager.mediaMutation({target:a,timeOffset:e.timestamp-u[0].timestamp,mutation:n});break}case L.StyleSheetRule:case L.StyleDeclaration:{this.usingVirtualDom?n.styleId?this.constructedStyleMutations.push(n):n.id&&((r=this.virtualDom.mirror.getNode(n.id))==null||r.rules.push(n)):this.applyStyleSheetMutation(n);break}case L.CanvasMutation:{if(!this.config.UNSAFE_replayCanvas)return;if(this.usingVirtualDom){const l=this.virtualDom.mirror.getNode(n.id);if(!l)return this.debugNodeNotFound(n,n.id);l.canvasMutations.push({event:e,mutation:n})}else{const l=this.mirror.getNode(n.id);if(!l)return this.debugNodeNotFound(n,n.id);hn({event:e,mutation:n,target:l,imageMap:this.imageMap,canvasEventMap:this.canvasEventMap,errorHandler:this.warnCanvasMutationFailed.bind(this)})}break}case L.Font:{try{const l=new FontFace(n.family,n.buffer?new Uint8Array(JSON.parse(n.fontSource)):n.fontSource,n.descriptors);(o=this.iframe.contentDocument)==null||o.fonts.add(l)}catch(l){this.warn(l)}break}case L.Selection:{if(t){this.lastSelectionData=n;break}this.applySelection(n);break}case L.AdoptedStyleSheet:{this.usingVirtualDom?this.adoptedStyleSheets.push(n):this.applyAdoptedStyleSheet(n);break}}}applyMutation(e,t){if(this.config.useVirtualDom&&!this.usingVirtualDom&&t&&(this.usingVirtualDom=!0,bf(this.iframe.contentDocument,this.mirror,this.virtualDom),Object.keys(this.legacy_missingNodeRetryMap).length))for(const u in this.legacy_missingNodeRetryMap)try{const c=this.legacy_missingNodeRetryMap[u],h=hl(c.node,this.virtualDom,this.mirror);h&&(c.node=h)}catch(c){this.warn(c)}const i=this.usingVirtualDom?this.virtualDom.mirror:this.mirror;e.removes=e.removes.filter(u=>i.getNode(u.id)?!0:(this.warnNodeNotFound(e,u.id),!1)),e.removes.forEach(u=>{var c;const h=i.getNode(u.id);if(!h)return;let f=i.getNode(u.parentId);if(!f)return this.warnNodeNotFound(e,u.parentId);if(u.isShadow&&Zt(f)&&(f=f.shadowRoot),i.removeNodeFromMap(h),f)try{f.removeChild(h),this.usingVirtualDom&&h.nodeName==="#text"&&f.nodeName==="STYLE"&&((c=f.rules)==null?void 0:c.length)>0&&(f.rules=[])}catch(g){if(g instanceof DOMException)this.warn("parent could not remove child in mutation",f,h,e);else throw g}});const r={...this.legacy_missingNodeRetryMap},o=[],n=u=>{let c=null;return u.nextId&&(c=i.getNode(u.nextId)),u.nextId!==null&&u.nextId!==void 0&&u.nextId!==-1&&!c},l=u=>{var c,h;if(!this.iframe.contentDocument)return this.warn("Looks like your replayer has been destroyed.");let f=i.getNode(u.parentId);if(!f)return u.node.type===Ie.Document?this.newDocumentQueue.push(u):o.push(u);u.node.isShadow&&(Zt(f)||f.attachShadow({mode:"open"}),f=f.shadowRoot);let g=null,d=null;if(u.previousId&&(g=i.getNode(u.previousId)),u.nextId&&(d=i.getNode(u.nextId)),n(u))return o.push(u);if(u.node.rootId&&!i.getNode(u.node.rootId))return;const A=u.node.rootId?i.getNode(u.node.rootId):this.usingVirtualDom?this.virtualDom:this.iframe.contentDocument;if(Gi(f,i)){this.attachDocumentToIframe(u,f);return}const p=(v,x)=>{if(!this.usingVirtualDom){Xt(v);for(const R of this.config.plugins||[])R.onBuild&&R.onBuild(v,{id:x,replayer:this})}},m=ht(u.node,{doc:A,mirror:i,skipChild:!0,hackCss:!0,cache:this.cache,afterAppend:p});if(u.previousId===-1||u.nextId===-1){r[u.node.id]={node:m,mutation:u};return}const w=i.getMeta(f);if(w&&w.type===Ie.Element&&u.node.type===Ie.Text){const v=Array.isArray(f.childNodes)?f.childNodes:Array.from(f.childNodes);if(w.tagName==="textarea")for(const x of v)x.nodeType===f.TEXT_NODE&&f.removeChild(x);else if(w.tagName==="style"&&v.length===1)for(const x of v)x.nodeType===f.TEXT_NODE&&!i.hasNode(x)&&(m.textContent=x.textContent,f.removeChild(x))}else if(w?.type===Ie.Document){const v=f;u.node.type===Ie.DocumentType&&((c=v.childNodes[0])==null?void 0:c.nodeType)===Node.DOCUMENT_TYPE_NODE&&v.removeChild(v.childNodes[0]),m.nodeName==="HTML"&&v.documentElement&&v.removeChild(v.documentElement)}if(g&&g.nextSibling&&g.nextSibling.parentNode?f.insertBefore(m,g.nextSibling):d&&d.parentNode?f.contains(d)?f.insertBefore(m,d):f.insertBefore(m,null):f.appendChild(m),p(m,u.node.id),this.usingVirtualDom&&m.nodeName==="#text"&&f.nodeName==="STYLE"&&((h=f.rules)==null?void 0:h.length)>0&&(f.rules=[]),Gi(m,this.mirror)){const v=this.mirror.getId(m),x=this.newDocumentQueue.find(R=>R.parentId===v);x&&(this.attachDocumentToIframe(x,m),this.newDocumentQueue=this.newDocumentQueue.filter(R=>R!==x))}(u.previousId||u.nextId)&&this.legacy_resolveMissingNode(r,f,m,u)};e.adds.forEach(u=>{l(u)});const a=Date.now();for(;o.length;){const u=Uf(o);if(o.length=0,Date.now()-a>500){this.warn("Timeout in the loop, please check the resolve tree data:",u);break}for(const c of u)i.getNode(c.value.parentId)?dl(c,f=>{l(f)}):this.debug("Drop resolve tree since there is no parent for the root node.",c)}Object.keys(r).length&&Object.assign(this.legacy_missingNodeRetryMap,r),zf(e.texts).forEach(u=>{var c;const h=i.getNode(u.id);if(!h)return e.removes.find(g=>g.id===u.id)?void 0:this.warnNodeNotFound(e,u.id);const f=h.parentElement;if(u.value&&f&&f.tagName==="STYLE"?h.textContent=Ei(u.value,this.cache):h.textContent=u.value,this.usingVirtualDom){const g=h.parentNode;((c=g?.rules)==null?void 0:c.length)>0&&(g.rules=[])}}),e.attributes.forEach(u=>{var c;const h=i.getNode(u.id);if(!h)return e.removes.find(f=>f.id===u.id)?void 0:this.warnNodeNotFound(e,u.id);for(const f in u.attributes)if(typeof f=="string"){const g=u.attributes[f];if(g===null)h.removeAttribute(f),f==="open"&&np(h,u);else if(typeof g=="string")try{if(f==="_cssText"&&(h.nodeName==="LINK"||h.nodeName==="STYLE"))try{const d=i.getMeta(h),A=ht({...d,attributes:{...d.attributes,...u.attributes}},{doc:h.ownerDocument,mirror:i,skipChild:!0,hackCss:!0,cache:this.cache});Object.assign(d.attributes,u.attributes);const p=h.nextSibling,m=h.parentNode;if(A&&m){m.removeChild(h),m.insertBefore(A,p),i.replace(u.id,A);break}}catch{}if(f==="value"&&h.nodeName==="TEXTAREA"){const d=h;d.childNodes.forEach(p=>d.removeChild(p));const A=(c=h.ownerDocument)==null?void 0:c.createTextNode(g);A&&d.appendChild(A)}else h.setAttribute(f,g);f==="rr_open_mode"&&h.nodeName==="DIALOG"&&Xt(h,u)}catch(d){this.warn("An error occurred may due to the checkout feature.",d)}else if(f==="style"){const d=g,A=h;for(const p in d)if(d[p]===!1)A.style.removeProperty(p);else if(d[p]instanceof Array){const m=d[p];A.style.setProperty(p,m[0],m[1])}else{const m=d[p];A.style.setProperty(p,m)}}}})}applyScroll(e,t){var i,r;const o=this.mirror.getNode(e.id);if(!o)return this.debugNodeNotFound(e,e.id);const n=this.mirror.getMeta(o);if(o===this.iframe.contentDocument)(i=this.iframe.contentWindow)==null||i.scrollTo({top:e.y,left:e.x,behavior:t?"auto":"smooth"});else if(n?.type===Ie.Document)(r=o.defaultView)==null||r.scrollTo({top:e.y,left:e.x,behavior:t?"auto":"smooth"});else try{o.scrollTo({top:e.y,left:e.x,behavior:t?"auto":"smooth"})}catch{}}applyInput(e){const t=this.mirror.getNode(e.id);if(!t)return this.debugNodeNotFound(e,e.id);try{t.checked=e.isChecked,t.value=e.text}catch{}}applySelection(e){try{const t=new Set,i=e.ranges.map(({start:r,startOffset:o,end:n,endOffset:l})=>{const a=this.mirror.getNode(r),u=this.mirror.getNode(n);if(!a||!u)return;const c=new Range;c.setStart(a,o),c.setEnd(u,l);const h=a.ownerDocument,f=h?.getSelection();return f&&t.add(f),{range:c,selection:f}});t.forEach(r=>r.removeAllRanges()),i.forEach(r=>{var o;return r&&((o=r.selection)==null?void 0:o.addRange(r.range))})}catch{}}applyStyleSheetMutation(e){var t;let i=null;e.styleId?i=this.styleMirror.getStyle(e.styleId):e.id&&(i=((t=this.mirror.getNode(e.id))==null?void 0:t.sheet)||null),i&&(e.source===L.StyleSheetRule?this.applyStyleSheetRule(e,i):e.source===L.StyleDeclaration&&this.applyStyleDeclaration(e,i))}applyStyleSheetRule(e,t){var i,r,o,n;if((i=e.adds)==null||i.forEach(({rule:l,index:a})=>{try{if(Array.isArray(a)){const{positions:u,index:c}=tn(a);at(t.cssRules,u).insertRule(l,c)}else{const u=a===void 0?void 0:Math.min(a,t.cssRules.length);t?.insertRule(l,u)}}catch{}}),(r=e.removes)==null||r.forEach(({index:l})=>{try{if(Array.isArray(l)){const{positions:a,index:u}=tn(l);at(t.cssRules,a).deleteRule(u||0)}else t?.deleteRule(l)}catch{}}),e.replace)try{(o=t.replace)==null||o.call(t,e.replace)}catch{}if(e.replaceSync)try{(n=t.replaceSync)==null||n.call(t,e.replaceSync)}catch{}}applyStyleDeclaration(e,t){e.set&&at(t.rules,e.index).style.setProperty(e.set.property,e.set.value,e.set.priority),e.remove&&at(t.rules,e.index).style.removeProperty(e.remove.property)}applyAdoptedStyleSheet(e){var t;const i=this.mirror.getNode(e.id);if(!i)return;(t=e.styles)==null||t.forEach(l=>{var a;let u=null,c=null;if(Zt(i)?c=((a=i.ownerDocument)==null?void 0:a.defaultView)||null:i.nodeName==="#document"&&(c=i.defaultView),!!c)try{u=new c.CSSStyleSheet,this.styleMirror.add(u,l.styleId),this.applyStyleSheetRule({source:L.StyleSheetRule,adds:l.rules},u)}catch{}});const r=10;let o=0;const n=(l,a)=>{const u=a.map(c=>this.styleMirror.getStyle(c)).filter(c=>c!==null);Zt(l)?l.shadowRoot.adoptedStyleSheets=u:l.nodeName==="#document"&&(l.adoptedStyleSheets=u),u.length!==a.length&&o<r&&(setTimeout(()=>n(l,a),0+100*o),o++)};n(i,e.styleIds)}legacy_resolveMissingNode(e,t,i,r){const{previousId:o,nextId:n}=r,l=o&&e[o],a=n&&e[n];if(l){const{node:u,mutation:c}=l;t.insertBefore(u,i),delete e[c.node.id],delete this.legacy_missingNodeRetryMap[c.node.id],(c.previousId||c.nextId)&&this.legacy_resolveMissingNode(e,t,u,c)}if(a){const{node:u,mutation:c}=a;t.insertBefore(u,i.nextSibling),delete e[c.node.id],delete this.legacy_missingNodeRetryMap[c.node.id],(c.previousId||c.nextId)&&this.legacy_resolveMissingNode(e,t,u,c)}}moveAndHover(e,t,i,r,o){const n=this.mirror.getNode(i);if(!n)return this.debugNodeNotFound(o,i);const l=ml(n,this.iframe),a=e*l.absoluteScale+l.x,u=t*l.absoluteScale+l.y;this.mouse.style.left=`${a}px`,this.mouse.style.top=`${u}px`,r||this.drawMouseTail({x:a,y:u}),this.hoverElements(n)}drawMouseTail(e){if(!this.mouseTail)return;const{lineCap:t,lineWidth:i,strokeStyle:r,duration:o}=this.config.mouseTail===!0?ji:Object.assign({},ji,this.config.mouseTail),n=()=>{if(!this.mouseTail)return;const l=this.mouseTail.getContext("2d");!l||!this.tailPositions.length||(l.clearRect(0,0,this.mouseTail.width,this.mouseTail.height),l.beginPath(),l.lineWidth=i,l.lineCap=t,l.strokeStyle=r,l.moveTo(this.tailPositions[0].x,this.tailPositions[0].y),this.tailPositions.forEach(a=>l.lineTo(a.x,a.y)),l.stroke())};this.tailPositions.push(e),n(),setTimeout(()=>{this.tailPositions=this.tailPositions.filter(l=>l!==e),n()},o/this.speedService.state.context.timer.speed)}hoverElements(e){var t;(t=this.lastHoveredRootNode||this.iframe.contentDocument)==null||t.querySelectorAll(".\\:hover").forEach(r=>{r.classList.remove(":hover")}),this.lastHoveredRootNode=e.getRootNode();let i=e;for(;i;)i.classList&&i.classList.add(":hover"),i=i.parentElement}isUserInteraction(e){return e.type!==X.IncrementalSnapshot?!1:e.data.source>L.Mutation&&e.data.source<=L.Input}backToNormal(){this.nextUserInteractionEvent=null,!this.speedService.state.matches("normal")&&(this.speedService.send({type:"BACK_TO_NORMAL"}),this.emitter.emit(_.SkipEnd,{speed:this.speedService.state.context.normalSpeed}))}warnNodeNotFound(e,t){this.warn(`Node with id '${t}' not found. `,e)}warnCanvasMutationFailed(e,t){this.warn("Has error on canvas update",t,"canvas mutation:",e)}debugNodeNotFound(e,t){this.debug(`Node with id '${t}' not found. `,e)}warn(...e){this.config.showWarning&&this.config.logger.warn(fn,...e)}debug(...e){this.config.showDebug&&this.config.logger.log(fn,...e)}}var ue=Uint8Array,ke=Uint16Array,Ds=Uint32Array,Sl=new ue([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),El=new ue([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),up=new ue([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),xl=function(s,e){for(var t=new ke(31),i=0;i<31;++i)t[i]=e+=1<<s[i-1];for(var r=new Ds(t[30]),i=1;i<30;++i)for(var o=t[i];o<t[i+1];++o)r[o]=o-t[i]<<5|i;return[t,r]},Al=xl(Sl,2),Rl=Al[0],cp=Al[1];Rl[28]=258,cp[258]=28;var hp=xl(El,0),fp=hp[0],Nl=new ke(32768);for(var V=0;V<32768;++V){var Me=(V&43690)>>>1|(V&21845)<<1;Me=(Me&52428)>>>2|(Me&13107)<<2,Me=(Me&61680)>>>4|(Me&3855)<<4,Nl[V]=((Me&65280)>>>8|(Me&255)<<8)>>>1}var ft=function(s,e,t){for(var i=s.length,r=0,o=new ke(e);r<i;++r)++o[s[r]-1];var n=new ke(e);for(r=0;r<e;++r)n[r]=n[r-1]+o[r-1]<<1;var l;{l=new ke(1<<e);var a=15-e;for(r=0;r<i;++r)if(s[r])for(var u=r<<4|s[r],c=e-s[r],h=n[s[r]-1]++<<c,f=h|(1<<c)-1;h<=f;++h)l[Nl[h]>>>a]=u}return l},Nt=new ue(288);for(var V=0;V<144;++V)Nt[V]=8;for(var V=144;V<256;++V)Nt[V]=9;for(var V=256;V<280;++V)Nt[V]=7;for(var V=280;V<288;++V)Nt[V]=8;var Ml=new ue(32);for(var V=0;V<32;++V)Ml[V]=5;var pp=ft(Nt,9),dp=ft(Ml,5),Yi=function(s){for(var e=s[0],t=1;t<s.length;++t)s[t]>e&&(e=s[t]);return e},fe=function(s,e,t){var i=e/8>>0;return(s[i]|s[i+1]<<8)>>>(e&7)&t},Zi=function(s,e){var t=e/8>>0;return(s[t]|s[t+1]<<8|s[t+2]<<16)>>>(e&7)},mp=function(s){return(s/8>>0)+(s&7&&1)},Il=function(s,e,t){(t==null||t>s.length)&&(t=s.length);var i=new(s instanceof ke?ke:s instanceof Ds?Ds:ue)(t-e);return i.set(s.subarray(e,t)),i},gp=function(s,e,t){var i=s.length,r=!e||t,o=!t||t.i;t||(t={}),e||(e=new ue(i*3));var n=function(y){var E=e.length;if(y>E){var P=new ue(Math.max(E*2,y));P.set(e),e=P}},l=t.f||0,a=t.p||0,u=t.b||0,c=t.l,h=t.d,f=t.m,g=t.n,d=i*8;do{if(!c){t.f=l=fe(s,a,1);var A=fe(s,a+1,3);if(a+=3,A)if(A==1)c=pp,h=dp,f=9,g=5;else if(A==2){var v=fe(s,a,31)+257,x=fe(s,a+10,15)+4,R=v+fe(s,a+5,31)+1;a+=14;for(var D=new ue(R),Y=new ue(19),I=0;I<x;++I)Y[up[I]]=fe(s,a+I*3,7);a+=x*3;var H=Yi(Y),U=(1<<H)-1;if(!o&&a+R*(H+7)>d)break;for(var ce=ft(Y,H),I=0;I<R;){var oe=ce[fe(s,a,U)];a+=oe&15;var p=oe>>>4;if(p<16)D[I++]=p;else{var Q=0,$=0;for(p==16?($=3+fe(s,a,3),a+=2,Q=D[I-1]):p==17?($=3+fe(s,a,7),a+=3):p==18&&($=11+fe(s,a,127),a+=7);$--;)D[I++]=Q}}var re=D.subarray(0,v),k=D.subarray(v);f=Yi(re),g=Yi(k),c=ft(re,f),h=ft(k,g)}else throw"invalid block type";else{var p=mp(a)+4,m=s[p-4]|s[p-3]<<8,w=p+m;if(w>i){if(o)throw"unexpected EOF";break}r&&n(u+m),e.set(s.subarray(p,w),u),t.b=u+=m,t.p=a=w*8;continue}if(a>d)throw"unexpected EOF"}r&&n(u+131072);for(var z=(1<<f)-1,ne=(1<<g)-1,se=f+g+18;o||a+se<d;){var Q=c[Zi(s,a)&z],ee=Q>>>4;if(a+=Q&15,a>d)throw"unexpected EOF";if(!Q)throw"invalid length/literal";if(ee<256)e[u++]=ee;else if(ee==256){c=null;break}else{var J=ee-254;if(ee>264){var I=ee-257,he=Sl[I];J=fe(s,a,(1<<he)-1)+Rl[I],a+=he}var ge=h[Zi(s,a)&ne],S=ge>>>4;if(!ge)throw"invalid distance";a+=ge&15;var k=fp[S];if(S>3){var he=El[S];k+=Zi(s,a)&(1<<he)-1,a+=he}if(a>d)throw"unexpected EOF";r&&n(u+131072);for(var b=u+J;u<b;u+=4)e[u]=e[u-k],e[u+1]=e[u+1-k],e[u+2]=e[u+2-k],e[u+3]=e[u+3-k];u=b}}t.l=c,t.p=a,t.b=u,c&&(l=1,t.m=f,t.d=h,t.n=g)}while(!l);return u==e.length?e:Il(e,0,u)},yp=function(s){if((s[0]&15)!=8||s[0]>>>4>7||(s[0]<<8|s[1])%31)throw"invalid zlib data";if(s[1]&32)throw"invalid zlib data: preset dictionaries not supported"};function wp(s,e){return gp((yp(s),s.subarray(2,-4)),e)}function vp(s,e){for(var t=s.length,i=new ue(s.length+(s.length>>>1)),r=0,o=function(u){i[r++]=u},n=0;n<t;++n){if(r+5>i.length){var l=new ue(r+8+(t-n<<1));l.set(i),i=l}var a=s.charCodeAt(n);o(a)}return Il(i,0,r)}function bp(s,e){var t="";if(typeof TextDecoder<"u")return new TextDecoder().decode(s);for(var i=0;i<s.length;){var r=s[i++];r<128||e?t+=String.fromCharCode(r):r<224?t+=String.fromCharCode((r&31)<<6|s[i++]&63):r<240?t+=String.fromCharCode((r&15)<<12|(s[i++]&63)<<6|s[i++]&63):(r=((r&15)<<18|(s[i++]&63)<<12|(s[i++]&63)<<6|s[i++]&63)-65536,t+=String.fromCharCode(55296|r>>10,56320|r&1023))}return t}const dn="v1",Cp=s=>{if(typeof s!="string")return s;try{const e=JSON.parse(s);if(e.timestamp)return e}catch{}try{const e=JSON.parse(bp(wp(vp(s,!0))));if(e.v===dn)return e;throw new Error(`These events were packed with packer ${e.v} which is incompatible with current packer ${dn}.`)}catch(e){throw console.error(e),new Error("Unknown data format.")}};var ar=(s=>(s[s.DomContentLoaded=0]="DomContentLoaded",s[s.Load=1]="Load",s[s.FullSnapshot=2]="FullSnapshot",s[s.IncrementalSnapshot=3]="IncrementalSnapshot",s[s.Meta=4]="Meta",s[s.Custom=5]="Custom",s[s.Plugin=6]="Plugin",s))(ar||{}),Os=(s=>(s[s.Mutation=0]="Mutation",s[s.MouseMove=1]="MouseMove",s[s.MouseInteraction=2]="MouseInteraction",s[s.Scroll=3]="Scroll",s[s.ViewportResize=4]="ViewportResize",s[s.Input=5]="Input",s[s.TouchMove=6]="TouchMove",s[s.MediaInteraction=7]="MediaInteraction",s[s.StyleSheetRule=8]="StyleSheetRule",s[s.CanvasMutation=9]="CanvasMutation",s[s.Font=10]="Font",s[s.Log=11]="Log",s[s.Drag=12]="Drag",s[s.StyleDeclaration=13]="StyleDeclaration",s[s.Selection=14]="Selection",s[s.AdoptedStyleSheet=15]="AdoptedStyleSheet",s[s.CustomElement=16]="CustomElement",s))(Os||{});function mn(s){let e="";return Object.keys(s).forEach(t=>{e+=`${t}: ${s[t]};`}),e}function lt(s,e=2){let t=String(s);const i=Math.pow(10,e-1);if(s<i)for(;String(i).length>t.length;)t=`0${s}`;return t}const Dl=1e3,_s=60*Dl,gn=60*_s;function Jt(s){if(s<=0)return"00:00";const e=Math.floor(s/gn);s=s%gn;const t=Math.floor(s/_s);s=s%_s;const i=Math.floor(s/Dl);return e?`${lt(e)}:${lt(t)}:${lt(i)}`:`${lt(t)}:${lt(i)}`}function Sp(s){return s.requestFullscreen?s.requestFullscreen():s.mozRequestFullScreen?s.mozRequestFullScreen():s.webkitRequestFullscreen?s.webkitRequestFullscreen():s.msRequestFullscreen?s.msRequestFullscreen():Promise.resolve()}function Ep(){return document.exitFullscreen?document.exitFullscreen():document.mozExitFullscreen?document.mozExitFullscreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.msExitFullscreen?document.msExitFullscreen():Promise.resolve()}function yn(){let s=!1;return["fullscreen","webkitIsFullScreen","mozFullScreen","msFullscreenElement"].forEach(e=>{e in document&&(s=s||!!document[e])}),s}function xp(s){return document.addEventListener("fullscreenchange",s),document.addEventListener("webkitfullscreenchange",s),document.addEventListener("mozfullscreenchange",s),document.addEventListener("MSFullscreenChange",s),()=>{document.removeEventListener("fullscreenchange",s),document.removeEventListener("webkitfullscreenchange",s),document.removeEventListener("mozfullscreenchange",s),document.removeEventListener("MSFullscreenChange",s)}}function wn(s){return{"[object Boolean]":"boolean","[object Number]":"number","[object String]":"string","[object Function]":"function","[object Array]":"array","[object Date]":"date","[object RegExp]":"regExp","[object Undefined]":"undefined","[object Null]":"null","[object Object]":"object"}[Object.prototype.toString.call(s)]}function Ap(s){return s.type!==ar.IncrementalSnapshot?!1:s.data.source>Os.Mutation&&s.data.source<=Os.Input}function Rp(s,e){const t=[];let i=s[0].timestamp;for(const r of s)Ap(r)&&(r.timestamp-i>e&&t.push([i,r.timestamp]),i=r.timestamp);return t}function Np(s){let e,t,i,r,o,n,l,a,u;return{c(){e=ie("div"),t=ie("input"),i=ae(),r=ie("label"),o=ae(),n=ie("span"),l=Pe(s[3]),M(t,"type","checkbox"),M(t,"id",s[2]),t.disabled=s[1],M(t,"class","svelte-a6h7w7"),M(r,"for",s[2]),M(r,"class","svelte-a6h7w7"),M(n,"class","label svelte-a6h7w7"),M(e,"class","switch svelte-a6h7w7"),Ze(e,"disabled",s[1])},m(c,h){Re(c,e,h),T(e,t),t.checked=s[0],T(e,i),T(e,r),T(e,o),T(e,n),T(n,l),a||(u=Ve(t,"change",s[4]),a=!0)},p(c,[h]){h&4&&M(t,"id",c[2]),h&2&&(t.disabled=c[1]),h&1&&(t.checked=c[0]),h&4&&M(r,"for",c[2]),h&8&&ri(l,c[3]),h&2&&Ze(e,"disabled",c[1])},i:pt,o:pt,d(c){c&&Ce(e),a=!1,u()}}}function Mp(s,e,t){let{disabled:i}=e,{checked:r}=e,{id:o}=e,{label:n}=e;function l(){r=this.checked,t(0,r)}return s.$$set=a=>{"disabled"in a&&t(1,i=a.disabled),"checked"in a&&t(0,r=a.checked),"id"in a&&t(2,o=a.id),"label"in a&&t(3,n=a.label)},[r,i,o,n,l]}class Ip extends $s{constructor(e){super(),Ls(this,e,Mp,Np,Ts,{disabled:1,checked:0,id:2,label:3})}}function vn(s,e,t){const i=s.slice();return i[38]=e[t],i}function bn(s,e,t){const i=s.slice();return i[41]=e[t],i}function Cn(s,e,t){const i=s.slice();return i[44]=e[t],i}function Sn(s){let e,t,i,r=Jt(s[6])+"",o,n,l,a,u,c,h,f,g,d,A=Jt(s[8].totalTime)+"",p,m,w,v,x,R,D,Y,I,H,U,ce,oe,Q=Be(s[13]),$=[];for(let S=0;S<Q.length;S+=1)$[S]=En(Cn(s,Q,S));let re=Be(s[9]),k=[];for(let S=0;S<re.length;S+=1)k[S]=xn(bn(s,re,S));function z(S,b){return S[7]==="playing"?Op:Dp}let ne=z(s),se=ne(s),ee=Be(s[3]),J=[];for(let S=0;S<ee.length;S+=1)J[S]=An(vn(s,ee,S));function he(S){s[29](S)}let ge={id:"skip",disabled:s[10]==="skipping",label:"skip inactive"};return s[0]!==void 0&&(ge.checked=s[0]),D=new Ip({props:ge}),Te.push(()=>Hl(D,"checked",he)),{c(){e=ie("div"),t=ie("div"),i=ie("span"),o=Pe(r),n=ae(),l=ie("div"),a=ie("div"),u=ae();for(let S=0;S<$.length;S+=1)$[S].c();c=ae();for(let S=0;S<k.length;S+=1)k[S].c();h=ae(),f=ie("div"),g=ae(),d=ie("span"),p=Pe(A),m=ae(),w=ie("div"),v=ie("button"),se.c(),x=ae();for(let S=0;S<J.length;S+=1)J[S].c();R=ae(),Ln(D.$$.fragment),I=ae(),H=ie("button"),H.innerHTML=`<svg class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16"><defs><style type="text/css"></style></defs><path d="M916 380c-26.4 0-48-21.6-48-48L868 223.2 613.6 477.6c-18.4
18.4-48.8 18.4-68 0-18.4-18.4-18.4-48.8 0-68L800 156 692 156c-26.4
0-48-21.6-48-48 0-26.4 21.6-48 48-48l224 0c26.4 0 48 21.6 48 48l0
224C964 358.4 942.4 380 916 380zM231.2 860l108.8 0c26.4 0 48 21.6 48
48s-21.6 48-48 48l-224 0c-26.4 0-48-21.6-48-48l0-224c0-26.4 21.6-48
48-48 26.4 0 48 21.6 48 48L164 792l253.6-253.6c18.4-18.4 48.8-18.4
68 0 18.4 18.4 18.4 48.8 0 68L231.2 860z"></path></svg>`,M(i,"class","rr-timeline__time svelte-189zk2r"),M(a,"class","rr-progress__step svelte-189zk2r"),q(a,"width",s[12]),M(f,"class","rr-progress__handler svelte-189zk2r"),q(f,"left",s[12]),M(l,"class","rr-progress svelte-189zk2r"),Ze(l,"disabled",s[10]==="skipping"),M(d,"class","rr-timeline__time svelte-189zk2r"),M(t,"class","rr-timeline svelte-189zk2r"),M(v,"class","svelte-189zk2r"),M(H,"class","svelte-189zk2r"),M(w,"class","rr-controller__btns svelte-189zk2r"),M(e,"class","rr-controller svelte-189zk2r")},m(S,b){Re(S,e,b),T(e,t),T(t,i),T(i,o),T(t,n),T(t,l),T(l,a),T(l,u);for(let y=0;y<$.length;y+=1)$[y]&&$[y].m(l,null);T(l,c);for(let y=0;y<k.length;y+=1)k[y]&&k[y].m(l,null);T(l,h),T(l,f),s[27](l),T(t,g),T(t,d),T(d,p),T(e,m),T(e,w),T(w,v),se.m(v,null),T(w,x);for(let y=0;y<J.length;y+=1)J[y]&&J[y].m(w,null);T(w,R),ks(D,w,null),T(w,I),T(w,H),U=!0,ce||(oe=[Ve(l,"click",s[15]),Ve(l,"keydown",s[16]),Ve(v,"click",s[4]),Ve(H,"click",s[30])],ce=!0)},p(S,b){if((!U||b[0]&64)&&r!==(r=Jt(S[6])+"")&&ri(o,r),(!U||b[0]&4096)&&q(a,"width",S[12]),b[0]&8192){Q=Be(S[13]);let E;for(E=0;E<Q.length;E+=1){const P=Cn(S,Q,E);$[E]?$[E].p(P,b):($[E]=En(P),$[E].c(),$[E].m(l,c))}for(;E<$.length;E+=1)$[E].d(1);$.length=Q.length}if(b[0]&512){re=Be(S[9]);let E;for(E=0;E<re.length;E+=1){const P=bn(S,re,E);k[E]?k[E].p(P,b):(k[E]=xn(P),k[E].c(),k[E].m(l,h))}for(;E<k.length;E+=1)k[E].d(1);k.length=re.length}if((!U||b[0]&4096)&&q(f,"left",S[12]),(!U||b[0]&1024)&&Ze(l,"disabled",S[10]==="skipping"),(!U||b[0]&256)&&A!==(A=Jt(S[8].totalTime)+"")&&ri(p,A),ne!==(ne=z(S))&&(se.d(1),se=ne(S),se&&(se.c(),se.m(v,null))),b[0]&1066){ee=Be(S[3]);let E;for(E=0;E<ee.length;E+=1){const P=vn(S,ee,E);J[E]?J[E].p(P,b):(J[E]=An(P),J[E].c(),J[E].m(w,R))}for(;E<J.length;E+=1)J[E].d(1);J.length=ee.length}const y={};b[0]&1024&&(y.disabled=S[10]==="skipping"),!Y&&b[0]&1&&(Y=!0,y.checked=S[0],jl(()=>Y=!1)),D.$set(y)},i(S){U||(Ee(D.$$.fragment,S),U=!0)},o(S){He(D.$$.fragment,S),U=!1},d(S){S&&Ce(e),Oi($,S),Oi(k,S),s[27](null),se.d(),Oi(J,S),Ps(D),ce=!1,tt(oe)}}}function En(s){let e,t;return{c(){e=ie("div"),M(e,"title",t=s[44].name),q(e,"width",s[44].width),q(e,"height","4px"),q(e,"position","absolute"),q(e,"background",s[44].background),q(e,"left",s[44].position)},m(i,r){Re(i,e,r)},p(i,r){r[0]&8192&&t!==(t=i[44].name)&&M(e,"title",t),r[0]&8192&&q(e,"width",i[44].width),r[0]&8192&&q(e,"background",i[44].background),r[0]&8192&&q(e,"left",i[44].position)},d(i){i&&Ce(e)}}}function xn(s){let e,t;return{c(){e=ie("div"),M(e,"title",t=s[41].name),q(e,"width","10px"),q(e,"height","5px"),q(e,"position","absolute"),q(e,"top","2px"),q(e,"transform","translate(-50%, -50%)"),q(e,"background",s[41].background),q(e,"left",s[41].position)},m(i,r){Re(i,e,r)},p(i,r){r[0]&512&&t!==(t=i[41].name)&&M(e,"title",t),r[0]&512&&q(e,"background",i[41].background),r[0]&512&&q(e,"left",i[41].position)},d(i){i&&Ce(e)}}}function Dp(s){let e,t;return{c(){e=si("svg"),t=si("path"),M(t,"d",`M170.65984 896l0-768 640 384zM644.66944
512l-388.66944-233.32864 0 466.65728z`),M(e,"class","icon"),M(e,"viewBox","0 0 1024 1024"),M(e,"version","1.1"),M(e,"xmlns","http://www.w3.org/2000/svg"),M(e,"xmlns:xlink","http://www.w3.org/1999/xlink"),M(e,"width","16"),M(e,"height","16")},m(i,r){Re(i,e,r),T(e,t)},d(i){i&&Ce(e)}}}function Op(s){let e,t;return{c(){e=si("svg"),t=si("path"),M(t,"d",`M682.65984 128q53.00224 0 90.50112 37.49888t37.49888 90.50112l0
512q0 53.00224-37.49888 90.50112t-90.50112
37.49888-90.50112-37.49888-37.49888-90.50112l0-512q0-53.00224
37.49888-90.50112t90.50112-37.49888zM341.34016 128q53.00224 0
90.50112 37.49888t37.49888 90.50112l0 512q0 53.00224-37.49888
90.50112t-90.50112
37.49888-90.50112-37.49888-37.49888-90.50112l0-512q0-53.00224
37.49888-90.50112t90.50112-37.49888zM341.34016 213.34016q-17.67424
0-30.16704 12.4928t-12.4928 30.16704l0 512q0 17.67424 12.4928
30.16704t30.16704 12.4928 30.16704-12.4928
12.4928-30.16704l0-512q0-17.67424-12.4928-30.16704t-30.16704-12.4928zM682.65984
213.34016q-17.67424 0-30.16704 12.4928t-12.4928 30.16704l0 512q0
17.67424 12.4928 30.16704t30.16704 12.4928 30.16704-12.4928
12.4928-30.16704l0-512q0-17.67424-12.4928-30.16704t-30.16704-12.4928z`),M(e,"class","icon"),M(e,"viewBox","0 0 1024 1024"),M(e,"version","1.1"),M(e,"xmlns","http://www.w3.org/2000/svg"),M(e,"xmlns:xlink","http://www.w3.org/1999/xlink"),M(e,"width","16"),M(e,"height","16")},m(i,r){Re(i,e,r),T(e,t)},d(i){i&&Ce(e)}}}function An(s){let e,t=s[38]+"",i,r,o,n,l;function a(){return s[28](s[38])}return{c(){e=ie("button"),i=Pe(t),r=Pe("x"),e.disabled=o=s[10]==="skipping",M(e,"class","svelte-189zk2r"),Ze(e,"active",s[38]===s[1]&&s[10]!=="skipping")},m(u,c){Re(u,e,c),T(e,i),T(e,r),n||(l=Ve(e,"click",a),n=!0)},p(u,c){s=u,c[0]&8&&t!==(t=s[38]+"")&&ri(i,t),c[0]&1024&&o!==(o=s[10]==="skipping")&&(e.disabled=o),c[0]&1034&&Ze(e,"active",s[38]===s[1]&&s[10]!=="skipping")},d(u){u&&Ce(e),n=!1,l()}}}function _p(s){let e,t,i=s[2]&&Sn(s);return{c(){i&&i.c(),e=Fl()},m(r,o){i&&i.m(r,o),Re(r,e,o),t=!0},p(r,o){r[2]?i?(i.p(r,o),o[0]&4&&Ee(i,1)):(i=Sn(r),i.c(),Ee(i,1),i.m(e.parentNode,e)):i&&(kn(),He(i,1,1,()=>{i=null}),Pn())},i(r){t||(Ee(i),t=!0)},o(r){He(i),t=!1},d(r){r&&Ce(e),i&&i.d(r)}}}function Rn(s,e,t){const i=e-s;return(100-(e-t)/i*100).toFixed(2)}function Tp(s,e,t){const i=Wl();let{replayer:r}=e,{showController:o}=e,{autoPlay:n}=e,{skipInactive:l}=e,{speedOption:a}=e,{speed:u=a.length?a[0]:1}=e,{tags:c={}}=e,{inactiveColor:h}=e,f=0,g=null,d,A,p,m,w=!1,v=null,x=null,R,D,Y,I;const H=()=>{U();function b(){t(6,f=r.getCurrentTime()),w&&f>=w&&(x?re(x.start,x.end,!0,void 0):(r.pause(),v&&(v(),v=null))),f<R.totalTime&&(g=requestAnimationFrame(b))}g=requestAnimationFrame(b)},U=()=>{g&&(cancelAnimationFrame(g),g=null)},ce=()=>{switch(d){case"playing":Q();break;case"paused":oe();break}},oe=()=>{d==="paused"&&(m?(r.play(),m=!1):r.play(f))},Q=()=>{d==="playing"&&(r.pause(),w=!1)},$=(b,y)=>{t(6,f=b),w=!1,m=!1,(typeof y=="boolean"?y:d==="playing")?r.play(b):r.pause(b)},re=(b,y,E=!1,P=void 0)=>{E?x={start:b,end:y}:x=null,t(6,f=b),w=y,v=P||null,r.play(b)},k=b=>{if(A==="skipping")return;const y=p.getBoundingClientRect();let P=(b.clientX-y.left)/y.width;P<0?P=0:P>1&&(P=1);const ye=R.totalTime*P;$(ye)},z=b=>{A!=="skipping"&&(b.key==="ArrowLeft"?$(f-5):b.key==="ArrowRight"&&$(f+5))},ne=b=>{let y=d==="playing";t(1,u=b),y&&r.pause(),r.setConfig({speed:u}),y&&r.play(f)},se=()=>{t(0,l=!l)},ee=()=>Promise.resolve().then(()=>{t(8,R=r.getMetaData())});On(()=>{t(7,d=r.service.state.value),t(10,A=r.speedService.state.value),r.on("state-change",b=>{const{player:y,speed:E}=b;if(y?.value&&d!==y.value)switch(t(7,d=y.value),d){case"playing":H();break;case"paused":U();break}E?.value&&A!==E.value&&t(10,A=E.value)}),r.on("finish",()=>{m=!0,v&&(v(),v=null)}),n&&r.play()}),zl(()=>{l!==r.config.skipInactive&&r.setConfig({skipInactive:l})}),_n(()=>{r.pause(),U()});function J(b){Te[b?"unshift":"push"](()=>{p=b,t(11,p)})}const he=b=>ne(b);function ge(b){l=b,t(0,l)}const S=()=>i("fullscreen");return s.$$set=b=>{"replayer"in b&&t(17,r=b.replayer),"showController"in b&&t(2,o=b.showController),"autoPlay"in b&&t(18,n=b.autoPlay),"skipInactive"in b&&t(0,l=b.skipInactive),"speedOption"in b&&t(3,a=b.speedOption),"speed"in b&&t(1,u=b.speed),"tags"in b&&t(19,c=b.tags),"inactiveColor"in b&&t(20,h=b.inactiveColor)},s.$$.update=()=>{if(s.$$.dirty[0]&64&&i("ui-update-current-time",{payload:f}),s.$$.dirty[0]&128&&i("ui-update-player-state",{payload:d}),s.$$.dirty[0]&131072&&t(8,R=r.getMetaData()),s.$$.dirty[0]&320){const b=Math.min(1,f/R.totalTime);t(12,D=`${100*b}%`),i("ui-update-progress",{payload:b})}s.$$.dirty[0]&655360&&t(9,Y=(()=>{const{context:b}=r.service.state,y=b.events.length,E=b.events[0].timestamp,P=b.events[y-1].timestamp,ye=[];return b.events.forEach(Se=>{if(Se.type===ar.Custom){const Oe={name:Se.data.tag,background:c[Se.data.tag]||"rgb(73, 80, 246)",position:`${Rn(E,P,Se.timestamp)}%`};ye.push(Oe)}}),ye})()),s.$$.dirty[0]&1179648&&t(13,I=(()=>{try{const{context:b}=r.service.state,y=b.events.length,E=b.events[0].timestamp,P=b.events[y-1].timestamp,ye=Rp(b.events,r.config.inactivePeriodThreshold),Se=(Oe,Ol,_l,Tl)=>{const kl=Ol-Oe;return((Tl-_l)/kl*100).toFixed(2)};return ye.map(Oe=>({name:"inactive period",background:h,position:`${Rn(E,P,Oe[0])}%`,width:`${Se(E,P,Oe[0],Oe[1])}%`}))}catch{return[]}})())},[l,u,o,a,ce,ne,f,d,R,Y,A,p,D,I,i,k,z,r,n,c,h,oe,Q,$,re,se,ee,J,he,ge,S]}class kp extends $s{constructor(e){super(),Ls(this,e,Tp,_p,Ts,{replayer:17,showController:2,autoPlay:18,skipInactive:0,speedOption:3,speed:1,tags:19,inactiveColor:20,toggle:4,play:21,pause:22,goto:23,playRange:24,setSpeed:5,toggleSkipInactive:25,triggerUpdateMeta:26},null,[-1,-1])}get toggle(){return this.$$.ctx[4]}get play(){return this.$$.ctx[21]}get pause(){return this.$$.ctx[22]}get goto(){return this.$$.ctx[23]}get playRange(){return this.$$.ctx[24]}get setSpeed(){return this.$$.ctx[5]}get toggleSkipInactive(){return this.$$.ctx[25]}get triggerUpdateMeta(){return this.$$.ctx[26]}}function Nn(s){let e,t,i={replayer:s[7],showController:s[3],autoPlay:s[1],speedOption:s[2],skipInactive:s[0],tags:s[4],inactiveColor:s[5]};return e=new kp({props:i}),s[32](e),e.$on("fullscreen",s[33]),{c(){Ln(e.$$.fragment)},m(r,o){ks(e,r,o),t=!0},p(r,o){const n={};o[0]&128&&(n.replayer=r[7]),o[0]&8&&(n.showController=r[3]),o[0]&2&&(n.autoPlay=r[1]),o[0]&4&&(n.speedOption=r[2]),o[0]&1&&(n.skipInactive=r[0]),o[0]&16&&(n.tags=r[4]),o[0]&32&&(n.inactiveColor=r[5]),e.$set(n)},i(r){t||(Ee(e.$$.fragment,r),t=!0)},o(r){He(e.$$.fragment,r),t=!1},d(r){s[32](null),Ps(e,r)}}}function Pp(s){let e,t,i,r,o=s[7]&&Nn(s);return{c(){e=ie("div"),t=ie("div"),i=ae(),o&&o.c(),M(t,"class","rr-player__frame"),M(t,"style",s[11]),M(e,"class","rr-player"),M(e,"style",s[12])},m(n,l){Re(n,e,l),T(e,t),s[31](t),T(e,i),o&&o.m(e,null),s[34](e),r=!0},p(n,l){(!r||l[0]&2048)&&M(t,"style",n[11]),n[7]?o?(o.p(n,l),l[0]&128&&Ee(o,1)):(o=Nn(n),o.c(),Ee(o,1),o.m(e,null)):o&&(kn(),He(o,1,1,()=>{o=null}),Pn()),(!r||l[0]&4096)&&M(e,"style",n[12])},i(n){r||(Ee(o),r=!0)},o(n){He(o),r=!1},d(n){n&&Ce(e),s[31](null),o&&o.d(),s[34](null)}}}const Mn=80;function Lp(s,e,t){let{width:i=1024}=e,{height:r=576}=e,{maxScale:o=1}=e,{events:n}=e,{skipInactive:l=!0}=e,{autoPlay:a=!0}=e,{speedOption:u=[1,2,4,8]}=e,{speed:c=1}=e,{showController:h=!0}=e,{tags:f={}}=e,{inactiveColor:g="#D4D4D4"}=e,d;const A=()=>d.getMirror();let p,m,w,v=i,x=r,R,D,Y;const I=(y,E)=>{const P=i/E.width,ye=r/E.height,Se=[P,ye];o&&Se.push(o),y.style.transform=`scale(${Math.min(...Se)})translate(-50%, -50%)`},H=()=>{I(d.wrapper,{width:d.iframe.offsetWidth,height:d.iframe.offsetHeight})},U=()=>{p&&(yn()?Ep():Sp(p))},ce=(y,E)=>{switch(d.on(y,E),y){case"ui-update-current-time":case"ui-update-progress":case"ui-update-player-state":R.$on(y,({detail:P})=>E(P))}},oe=y=>{d.addEvent(y),R.triggerUpdateMeta()},Q=()=>d.getMetaData(),$=()=>d,re=()=>{R.toggle()},k=y=>{R.setSpeed(y)},z=()=>{R.toggleSkipInactive()},ne=()=>{R.play()},se=()=>{R.pause()},ee=(y,E)=>{R.goto(y,E)},J=(y,E,P=!1,ye=void 0)=>{R.playRange(y,E,P,ye)};On(()=>{if(u!==void 0&&wn(u)!=="array")throw new Error("speedOption must be array");if(u.forEach(y=>{if(wn(y)!=="number")throw new Error("item of speedOption must be number")}),u.indexOf(c)<0)throw new Error(`speed must be one of speedOption,
current config:
{
...
speed: ${c},
speedOption: [${u.toString()}]
...
}
`);t(7,d=new ap(n,{speed:c,root:m,unpackFn:Cp,...e})),d.on("resize",y=>{I(d.wrapper,y)}),w=xp(()=>{yn()?setTimeout(()=>{v=i,x=r,t(13,i=p.offsetWidth),t(14,r=p.offsetHeight-(h?Mn:0)),I(d.wrapper,{width:d.iframe.offsetWidth,height:d.iframe.offsetHeight})},0):(t(13,i=v),t(14,r=x),I(d.wrapper,{width:d.iframe.offsetWidth,height:d.iframe.offsetHeight}))})}),_n(()=>{w&&w()});function he(y){Te[y?"unshift":"push"](()=>{m=y,t(9,m)})}function ge(y){Te[y?"unshift":"push"](()=>{R=y,t(10,R)})}const S=()=>U();function b(y){Te[y?"unshift":"push"](()=>{p=y,t(8,p)})}return s.$$set=y=>{t(39,e=cr(cr({},e),fr(y))),"width"in y&&t(13,i=y.width),"height"in y&&t(14,r=y.height),"maxScale"in y&&t(15,o=y.maxScale),"events"in y&&t(16,n=y.events),"skipInactive"in y&&t(0,l=y.skipInactive),"autoPlay"in y&&t(1,a=y.autoPlay),"speedOption"in y&&t(2,u=y.speedOption),"speed"in y&&t(17,c=y.speed),"showController"in y&&t(3,h=y.showController),"tags"in y&&t(4,f=y.tags),"inactiveColor"in y&&t(5,g=y.inactiveColor)},s.$$.update=()=>{s.$$.dirty[0]&24576&&t(11,D=mn({width:`${i}px`,height:`${r}px`})),s.$$.dirty[0]&24584&&t(12,Y=mn({width:`${i}px`,height:`${r+(h?Mn:0)}px`}))},e=fr(e),[l,a,u,h,f,g,U,d,p,m,R,D,Y,i,r,o,n,c,A,H,ce,oe,Q,$,re,k,z,ne,se,ee,J,he,ge,S,b]}let $p=class extends $s{constructor(e){super(),Ls(this,e,Lp,Pp,Ts,{width:13,height:14,maxScale:15,events:16,skipInactive:0,autoPlay:1,speedOption:2,speed:17,showController:3,tags:4,inactiveColor:5,getMirror:18,triggerResize:19,toggleFullscreen:6,addEventListener:20,addEvent:21,getMetaData:22,getReplayer:23,toggle:24,setSpeed:25,toggleSkipInactive:26,play:27,pause:28,goto:29,playRange:30},null,[-1,-1])}get getMirror(){return this.$$.ctx[18]}get triggerResize(){return this.$$.ctx[19]}get toggleFullscreen(){return this.$$.ctx[6]}get addEventListener(){return this.$$.ctx[20]}get addEvent(){return this.$$.ctx[21]}get getMetaData(){return this.$$.ctx[22]}get getReplayer(){return this.$$.ctx[23]}get toggle(){return this.$$.ctx[24]}get setSpeed(){return this.$$.ctx[25]}get toggleSkipInactive(){return this.$$.ctx[26]}get play(){return this.$$.ctx[27]}get pause(){return this.$$.ctx[28]}get goto(){return this.$$.ctx[29]}get playRange(){return this.$$.ctx[30]}};class bd extends $p{constructor(e){super({target:e.target,props:e.data||e.props})}}export{bd as Player,bd as default};