@sailfish-rrweb/replay 0.2.4 → 0.2.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,86 @@
1
+ (function (g, f) {if ("object" == typeof exports && "object" == typeof module) {module.exports = f();} else if ("function" == typeof define && define.amd) {define("@sailfish-rrweb/rrweb", [], f);} else if ("object" == typeof exports) {exports["@sailfish-rrweb/rrweb"] = f();} else {g["@sailfish-rrweb/rrweb"] = f();}}(typeof self !== 'undefined' ? self : typeof globalThis !== 'undefined' ? globalThis : this, () => {var exports = {};var module = { exports };
2
+ "use strict";var Mh=Object.defineProperty,Nh=Object.defineProperties;var Th=Object.getOwnPropertyDescriptors;var ke=Object.getOwnPropertySymbols;var Dn=Object.prototype.hasOwnProperty,An=Object.prototype.propertyIsEnumerable;var Rn=(I,_,j)=>_ in I?Mh(I,_,{enumerable:!0,configurable:!0,writable:!0,value:j}):I[_]=j,O=(I,_)=>{for(var j in _||(_={}))Dn.call(_,j)&&Rn(I,j,_[j]);if(ke)for(var j of ke(_))An.call(_,j)&&Rn(I,j,_[j]);return I},z=(I,_)=>Nh(I,Th(_));var Pt=(I,_)=>{var j={};for(var w in I)Dn.call(I,w)&&_.indexOf(w)<0&&(j[w]=I[w]);if(I!=null&&ke)for(var w of ke(I))_.indexOf(w)<0&&An.call(I,w)&&(j[w]=I[w]);return j};(function(I,_){typeof exports=="object"&&typeof module<"u"?_(exports):typeof define=="function"&&define.amd?define(["exports"],_):(I=typeof globalThis<"u"?globalThis:I||self,_(I["@sailfish-rrweb/rrweb"]={}))})(exports,function(I){"use strict";var _=Object.defineProperty,j=(e,t,s)=>t in e?_(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,w=(e,t,s)=>j(e,typeof t!="symbol"?t+"":t,s),Bn=Object.defineProperty,jn=(e,t,s)=>t in e?Bn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,Gs=(e,t,s)=>jn(e,typeof t!="symbol"?t+"":t,s),k=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))(k||{});function Wn(e){return e.nodeType===e.ELEMENT_NODE}let Xs=class{constructor(){Gs(this,"idNodeMap",new Map),Gs(this,"nodeMetaMap",new WeakMap)}getId(e){var s;var t;return e&&(s=(t=this.getMeta(e))==null?void 0:t.id)!=null?s:-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(s=>this.removeNodeFromMap(s))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){const s=t.id;this.idNodeMap.set(s,e),this.nodeMetaMap.set(e,t)}replace(e,t){const s=this.getNode(e);if(s){const r=this.nodeMetaMap.get(s);r&&this.nodeMetaMap.set(t,r)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function Zs(){return new Xs}function Vn(e){return e.toLowerCase()}function zn(e,t){return!e||!t||e.type!==t.type?!1:e.type===k.Document?e.compatMode===t.compatMode:e.type===k.DocumentType?e.name===t.name&&e.publicId===t.publicId&&e.systemId===t.systemId:e.type===k.Comment||e.type===k.Text||e.type===k.CDATA?e.textContent===t.textContent:e.type===k.Element?e.tagName===t.tagName&&JSON.stringify(e.attributes)===JSON.stringify(t.attributes)&&e.isSVG===t.isSVG&&e.needBlock===t.needBlock:!1}function Yn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Gn(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var s=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};s.prototype=t.prototype}else s={};return Object.defineProperty(s,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(s,r,i.get?i:{enumerable:!0,get:function(){return e[r]}})}),s}var Oe={exports:{}},R=String,Hs=function(){return{isColorSupported:!1,reset:R,bold:R,dim:R,italic:R,underline:R,inverse:R,hidden:R,strikethrough:R,black:R,red:R,green:R,yellow:R,blue:R,magenta:R,cyan:R,white:R,gray:R,bgBlack:R,bgRed:R,bgGreen:R,bgYellow:R,bgBlue:R,bgMagenta:R,bgCyan:R,bgWhite:R}};Oe.exports=Hs(),Oe.exports.createColors=Hs;var Xn=Oe.exports;const Zn={},Hn=Object.freeze(Object.defineProperty({__proto__:null,default:Zn},Symbol.toStringTag,{value:"Module"})),G=Gn(Hn);let Js=Xn,$s=G,Re=class In extends Error{constructor(t,s,r,i,n,a){super(t),this.name="CssSyntaxError",this.reason=t,n&&(this.file=n),i&&(this.source=i),a&&(this.plugin=a),typeof s<"u"&&typeof r<"u"&&(typeof s=="number"?(this.line=s,this.column=r):(this.line=s.line,this.column=s.column,this.endLine=r.line,this.endColumn=r.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,In)}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(t){if(!this.source)return"";let s=this.source;t==null&&(t=Js.isColorSupported),$s&&t&&(s=$s(s));let r=s.split(/\r?\n/),i=Math.max(this.line-3,0),n=Math.min(this.line+2,r.length),a=String(n).length,o,l;if(t){let{bold:c,gray:h,red:p}=Js.createColors(!0);o=u=>c(p(u)),l=u=>h(u)}else o=l=c=>c;return r.slice(i,n).map((c,h)=>{let p=i+1+h,u=" "+(" "+p).slice(-a)+" | ";if(p===this.line){let m=l(u.replace(/\d/g," "))+c.slice(0,this.column-1).replace(/[^\t]/g," ");return o(">")+l(u)+c+`
3
+ `+m+o("^")}return" "+l(u)+c}).join(`
4
+ `)}toString(){let t=this.showSourceCode();return t&&(t=`
5
+
6
+ `+t+`
7
+ `),this.name+": "+this.message+t}};var De=Re;Re.default=Re;var mt={};mt.isClean=Symbol("isClean"),mt.my=Symbol("my");const Qs={after:`
8
+ `,beforeClose:`
9
+ `,beforeComment:`
10
+ `,beforeDecl:`
11
+ `,beforeOpen:" ",beforeRule:`
12
+ `,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function Jn(e){return e[0].toUpperCase()+e.slice(1)}let Ae=class{constructor(e){this.builder=e}atrule(e,t){let s="@"+e.name,r=e.params?this.rawValue(e,"params"):"";if(typeof e.raws.afterName<"u"?s+=e.raws.afterName:r&&(s+=" "),e.nodes)this.block(e,s+r);else{let i=(e.raws.between||"")+(t?";":"");this.builder(s+r+i,e)}}beforeAfter(e,t){let s;e.type==="decl"?s=this.raw(e,null,"beforeDecl"):e.type==="comment"?s=this.raw(e,null,"beforeComment"):t==="before"?s=this.raw(e,null,"beforeRule"):s=this.raw(e,null,"beforeClose");let r=e.parent,i=0;for(;r&&r.type!=="root";)i+=1,r=r.parent;if(s.includes(`
13
+ `)){let n=this.raw(e,null,"indent");if(n.length)for(let a=0;a<i;a++)s+=n}return s}block(e,t){let s=this.raw(e,"between","beforeOpen");this.builder(t+s+"{",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 s=this.raw(e,"semicolon");for(let r=0;r<e.nodes.length;r++){let i=e.nodes[r],n=this.raw(i,"before");n&&this.builder(n),this.stringify(i,t!==r||s)}}comment(e){let t=this.raw(e,"left","commentLeft"),s=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+s+"*/",e)}decl(e,t){let s=this.raw(e,"between","colon"),r=e.prop+s+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,s){let r;if(s||(s=t),t&&(r=e.raws[t],typeof r<"u"))return r;let i=e.parent;if(s==="before"&&(!i||i.type==="root"&&i.first===e||i&&i.type==="document"))return"";if(!i)return Qs[s];let n=e.root();if(n.rawCache||(n.rawCache={}),typeof n.rawCache[s]<"u")return n.rawCache[s];if(s==="before"||s==="after")return this.beforeAfter(e,s);{let a="raw"+Jn(s);this[a]?r=this[a](n,e):n.walk(o=>{if(r=o.raws[t],typeof r<"u")return!1})}return typeof r>"u"&&(r=Qs[s]),n.rawCache[s]=r,r}rawBeforeClose(e){let t;return e.walk(s=>{if(s.nodes&&s.nodes.length>0&&typeof s.raws.after<"u")return t=s.raws.after,t.includes(`
14
+ `)&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let s;return e.walkComments(r=>{if(typeof r.raws.before<"u")return s=r.raws.before,s.includes(`
15
+ `)&&(s=s.replace(/[^\n]+$/,"")),!1}),typeof s>"u"?s=this.raw(t,null,"beforeDecl"):s&&(s=s.replace(/\S/g,"")),s}rawBeforeDecl(e,t){let s;return e.walkDecls(r=>{if(typeof r.raws.before<"u")return s=r.raws.before,s.includes(`
16
+ `)&&(s=s.replace(/[^\n]+$/,"")),!1}),typeof s>"u"?s=this.raw(t,null,"beforeRule"):s&&(s=s.replace(/\S/g,"")),s}rawBeforeOpen(e){let t;return e.walk(s=>{if(s.type!=="decl"&&(t=s.raws.between,typeof t<"u"))return!1}),t}rawBeforeRule(e){let t;return e.walk(s=>{if(s.nodes&&(s.parent!==e||e.first!==s)&&typeof s.raws.before<"u")return t=s.raws.before,t.includes(`
17
+ `)&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls(s=>{if(typeof s.raws.between<"u")return t=s.raws.between.replace(/[^\s:]/g,""),!1}),t}rawEmptyBody(e){let t;return e.walk(s=>{if(s.nodes&&s.nodes.length===0&&(t=s.raws.after,typeof t<"u"))return!1}),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk(s=>{let r=s.parent;if(r&&r!==e&&r.parent&&r.parent===e&&typeof s.raws.before<"u"){let i=s.raws.before.split(`
18
+ `);return t=i[i.length-1],t=t.replace(/\S/g,""),!1}}),t}rawSemicolon(e){let t;return e.walk(s=>{if(s.nodes&&s.nodes.length&&s.last.type==="decl"&&(t=s.raws.semicolon,typeof t<"u"))return!1}),t}rawValue(e,t){let s=e[t],r=e.raws[t];return r&&r.value===s?r.raw:s}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 Ks=Ae;Ae.default=Ae;let $n=Ks;function Ie(e,t){new $n(t).stringify(e)}var Lt=Ie;Ie.default=Ie;let{isClean:Ft,my:Qn}=mt,Kn=De,qn=Ks,to=Lt;function Pe(e,t){let s=new e.constructor;for(let r in e){if(!Object.prototype.hasOwnProperty.call(e,r)||r==="proxyCache")continue;let i=e[r],n=typeof i;r==="parent"&&n==="object"?t&&(s[r]=t):r==="source"?s[r]=i:Array.isArray(i)?s[r]=i.map(a=>Pe(a,s)):(n==="object"&&i!==null&&(i=Pe(i)),s[r]=i)}return s}let Le=class{constructor(e={}){this.raws={},this[Ft]=!1,this[Qn]=!0;for(let t in e)if(t==="nodes"){this.nodes=[];for(let s of e[t])typeof s.clone=="function"?this.append(s.clone()):this.append(s)}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=Pe(this);for(let s in e)t[s]=e[s];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:s,start:r}=this.rangeBy(t);return this.source.input.error(e,{column:r.column,line:r.line},{column:s.column,line:s.line},t)}return new Kn(e)}getProxyProcessor(){return{get(e,t){return t==="proxyOf"?e:t==="root"?()=>e.root().toProxy():e[t]},set(e,t,s){return e[t]===s||(e[t]=s,(t==="prop"||t==="value"||t==="name"||t==="params"||t==="important"||t==="text")&&e.markDirty()),!0}}}markDirty(){if(this[Ft]){this[Ft]=!1;let e=this;for(;e=e.parent;)e[Ft]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let s=this.source.start;if(e.index)s=this.positionInside(e.index,t);else if(e.word){t=this.toString();let r=t.indexOf(e.word);r!==-1&&(s=this.positionInside(r,t))}return s}positionInside(e,t){let s=t||this.toString(),r=this.source.start.column,i=this.source.start.line;for(let n=0;n<e;n++)s[n]===`
19
+ `?(r=1,i+=1):r+=1;return{column:r,line:i}}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},s=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(),i=r.indexOf(e.word);i!==-1&&(t=this.positionInside(i,r),s=this.positionInside(i+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?s={column:e.end.column,line:e.end.line}:typeof e.endIndex=="number"?s=this.positionInside(e.endIndex):e.index&&(s=this.positionInside(e.index+1));return(s.line<t.line||s.line===t.line&&s.column<=t.column)&&(s={column:t.column+1,line:t.line}),{end:s,start:t}}raw(e,t){return new qn().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,s=!1;for(let r of e)r===this?s=!0:s?(this.parent.insertAfter(t,r),t=r):this.parent.insertBefore(t,r);s||this.remove()}return this}root(){let e=this;for(;e.parent&&e.parent.type!=="document";)e=e.parent;return e}toJSON(e,t){let s={},r=t==null;t=t||new Map;let i=0;for(let n in this){if(!Object.prototype.hasOwnProperty.call(this,n)||n==="parent"||n==="proxyCache")continue;let a=this[n];if(Array.isArray(a))s[n]=a.map(o=>typeof o=="object"&&o.toJSON?o.toJSON(null,t):o);else if(typeof a=="object"&&a.toJSON)s[n]=a.toJSON(null,t);else if(n==="source"){let o=t.get(a.input);o==null&&(o=i,t.set(a.input,i),i++),s[n]={end:a.end,inputId:o,start:a.start}}else s[n]=a}return r&&(s.inputs=[...t.keys()].map(n=>n.toJSON())),s}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=to){e.stringify&&(e=e.stringify);let t="";return e(this,s=>{t+=s}),t}warn(e,t,s){let r={node:this};for(let i in s)r[i]=s[i];return e.warn(t,r)}get proxyOf(){return this}};var _t=Le;Le.default=Le;let eo=_t,Fe=class extends eo{constructor(e){e&&typeof e.value<"u"&&typeof e.value!="string"&&(e=z(O({},e),{value:String(e.value)})),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}};var Ut=Fe;Fe.default=Fe;let so="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";var ro={nanoid:(e=21)=>{let t="",s=e;for(;s--;)t+=so[Math.random()*64|0];return t},customAlphabet:(e,t=21)=>(s=t)=>{let r="",i=s;for(;i--;)r+=e[Math.random()*e.length|0];return r}};let{SourceMapConsumer:qs,SourceMapGenerator:tr}=G,{existsSync:io,readFileSync:no}=G,{dirname:_e,join:oo}=G;function ao(e){return Buffer?Buffer.from(e,"base64").toString():window.atob(e)}let Ue=class{constructor(e,t){if(t.map===!1)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let s=t.map?t.map.prev:void 0,r=this.loadMap(t.from,s);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=_e(this.mapFile)),r&&(this.text=r)}consumer(){return this.consumerCache||(this.consumerCache=new qs(this.text)),this.consumerCache}decodeInline(e){let t=/^data:application\/json;charset=utf-?8;base64,/,s=/^data:application\/json;base64,/,r=/^data:application\/json;charset=utf-?8,/,i=/^data:application\/json,/;if(r.test(e)||i.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(t.test(e)||s.test(e))return ao(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 s=e.lastIndexOf(t.pop()),r=e.indexOf("*/",s);s>-1&&r>-1&&(this.annotation=this.getAnnotationURL(e.substring(s,r)))}loadFile(e){if(this.root=_e(e),io(e))return this.mapFile=e,no(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 s=t(e);if(s){let r=this.loadFile(s);if(!r)throw new Error("Unable to load previous source map: "+s.toString());return r}}else{if(t instanceof qs)return tr.fromSourceMap(t).toString();if(t instanceof tr)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 s=this.annotation;return e&&(s=oo(_e(e),s)),this.loadFile(s)}}}startWith(e,t){return e?e.substr(0,t.length)===t:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};var er=Ue;Ue.default=Ue;let{SourceMapConsumer:lo,SourceMapGenerator:co}=G,{fileURLToPath:sr,pathToFileURL:Bt}=G,{isAbsolute:Be,resolve:je}=G,{nanoid:ho}=ro,We=G,rr=De,uo=er,Ve=Symbol("fromOffsetCache"),po=!!(lo&&co),ir=!!(je&&Be),jt=class{constructor(e,t={}){if(e===null||typeof e>"u"||typeof e=="object"&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),this.css[0]==="\uFEFF"||this.css[0]==="\uFFFE"?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(!ir||/^\w+:\/\//.test(t.from)||Be(t.from)?this.file=t.from:this.file=je(t.from)),ir&&po){let s=new uo(this.css,t);if(s.text){this.map=s;let r=s.consumer().file;!this.file&&r&&(this.file=this.mapResolve(r))}}this.file||(this.id="<input css "+ho(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,s,r={}){let i,n,a;if(t&&typeof t=="object"){let l=t,c=s;if(typeof l.offset=="number"){let h=this.fromOffset(l.offset);t=h.line,s=h.col}else t=l.line,s=l.column;if(typeof c.offset=="number"){let h=this.fromOffset(c.offset);n=h.line,a=h.col}else n=c.line,a=c.column}else if(!s){let l=this.fromOffset(t);t=l.line,s=l.col}let o=this.origin(t,s,n,a);return o?i=new rr(e,o.endLine===void 0?o.line:{column:o.column,line:o.line},o.endLine===void 0?o.column:{column:o.endColumn,line:o.endLine},o.source,o.file,r.plugin):i=new rr(e,n===void 0?t:{column:s,line:t},n===void 0?s:{column:a,line:n},this.css,this.file,r.plugin),i.input={column:s,endColumn:a,endLine:n,line:t,source:this.css},this.file&&(Bt&&(i.input.url=Bt(this.file).toString()),i.input.file=this.file),i}fromOffset(e){let t,s;if(this[Ve])s=this[Ve];else{let i=this.css.split(`
20
+ `);s=new Array(i.length);let n=0;for(let a=0,o=i.length;a<o;a++)s[a]=n,n+=i[a].length+1;this[Ve]=s}t=s[s.length-1];let r=0;if(e>=t)r=s.length-1;else{let i=s.length-2,n;for(;r<i;)if(n=r+(i-r>>1),e<s[n])i=n-1;else if(e>=s[n+1])r=n+1;else{r=n;break}}return{col:e-s[r]+1,line:r+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:je(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,s,r){if(!this.map)return!1;let i=this.map.consumer(),n=i.originalPositionFor({column:t,line:e});if(!n.source)return!1;let a;typeof s=="number"&&(a=i.originalPositionFor({column:r,line:s}));let o;Be(n.source)?o=Bt(n.source):o=new URL(n.source,this.map.consumer().sourceRoot||Bt(this.map.mapFile));let l={column:n.column,endColumn:a&&a.column,endLine:a&&a.line,line:n.line,url:o.toString()};if(o.protocol==="file:")if(sr)l.file=sr(o);else throw new Error("file: protocol is not available in this PostCSS build");let c=i.sourceContentFor(n.source);return c&&(l.source=c),l}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])this[t]!=null&&(e[t]=this[t]);return this.map&&(e.map=O({},this.map),e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}};var Wt=jt;jt.default=jt,We&&We.registerInput&&We.registerInput(jt);let{SourceMapConsumer:nr,SourceMapGenerator:Vt}=G,{dirname:zt,relative:or,resolve:ar,sep:lr}=G,{pathToFileURL:cr}=G,fo=Wt,mo=!!(nr&&Vt),go=!!(zt&&ar&&or&&lr);var hr=class{constructor(e,t,s,r){this.stringify=e,this.mapOpts=s.map||{},this.root=t,this.opts=s,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=`
21
+ `;this.css.includes(`\r
22
+ `)&&(t=`\r
23
+ `),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t=this.toUrl(this.path(e.file)),s=e.root||zt(e.file),r;this.mapOpts.sourcesContent===!1?(r=new nr(e.text),r.sourcesContent&&(r.sourcesContent=null)):r=e.consumer(),this.map.applySourceMap(r,t,this.toUrl(this.path(s)))}}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(),go&&mo&&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=Vt.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new Vt({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 Vt({file:this.outputFile(),ignoreInvalidMapping:!0});let e=1,t=1,s="<no source>",r={generated:{column:0,line:0},original:{column:0,line:0},source:""},i,n;this.stringify(this.root,(a,o,l)=>{if(this.css+=a,o&&l!=="end"&&(r.generated.line=e,r.generated.column=t-1,o.source&&o.source.start?(r.source=this.sourcePath(o),r.original.line=o.source.start.line,r.original.column=o.source.start.column-1,this.map.addMapping(r)):(r.source=s,r.original.line=1,r.original.column=0,this.map.addMapping(r))),i=a.match(/\n/g),i?(e+=i.length,n=a.lastIndexOf(`
24
+ `),t=a.length-n):t+=a.length,o&&l!=="start"){let c=o.parent||{raws:{}};(!(o.type==="decl"||o.type==="atrule"&&!o.nodes)||o!==c.last||c.raws.semicolon)&&(o.source&&o.source.end?(r.source=this.sourcePath(o),r.original.line=o.source.end.line,r.original.column=o.source.end.column-1,r.generated.line=e,r.generated.column=t-2,this.map.addMapping(r)):(r.source=s,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 s=this.opts.to?zt(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(s=zt(ar(s,this.mapOpts.annotation)));let r=or(s,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 fo(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 s=t.source.input.from;if(s&&!e[s]){e[s]=!0;let r=this.usesFileUrls?this.toFileUrl(s):this.toUrl(this.path(s));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(cr){let s=cr(e).toString();return this.memoizedFileURLs.set(e,s),s}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;lr==="\\"&&(e=e.replace(/\\/g,"/"));let s=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,s),s}};let yo=_t,ze=class extends yo{constructor(e){super(e),this.type="comment"}};var Yt=ze;ze.default=ze;let{isClean:ur,my:pr}=mt,dr=Ut,fr=Yt,wo=_t,mr,Ye,Ge,gr;function yr(e){return e.map(t=>(t.nodes&&(t.nodes=yr(t.nodes)),delete t.source,t))}function wr(e){if(e[ur]=!1,e.proxyOf.nodes)for(let t of e.proxyOf.nodes)wr(t)}let Q=class Pn extends wo{append(...t){for(let s of t){let r=this.normalize(s,this.last);for(let i of r)this.proxyOf.nodes.push(i)}return this.markDirty(),this}cleanRaws(t){if(super.cleanRaws(t),this.nodes)for(let s of this.nodes)s.cleanRaws(t)}each(t){if(!this.proxyOf.nodes)return;let s=this.getIterator(),r,i;for(;this.indexes[s]<this.proxyOf.nodes.length&&(r=this.indexes[s],i=t(this.proxyOf.nodes[r],r),i!==!1);)this.indexes[s]+=1;return delete this.indexes[s],i}every(t){return this.nodes.every(t)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let t=this.lastEach;return this.indexes[t]=0,t}getProxyProcessor(){return{get(t,s){return s==="proxyOf"?t:t[s]?s==="each"||typeof s=="string"&&s.startsWith("walk")?(...r)=>t[s](...r.map(i=>typeof i=="function"?(n,a)=>i(n.toProxy(),a):i)):s==="every"||s==="some"?r=>t[s]((i,...n)=>r(i.toProxy(),...n)):s==="root"?()=>t.root().toProxy():s==="nodes"?t.nodes.map(r=>r.toProxy()):s==="first"||s==="last"?t[s].toProxy():t[s]:t[s]},set(t,s,r){return t[s]===r||(t[s]=r,(s==="name"||s==="params"||s==="selector")&&t.markDirty()),!0}}}index(t){return typeof t=="number"?t:(t.proxyOf&&(t=t.proxyOf),this.proxyOf.nodes.indexOf(t))}insertAfter(t,s){let r=this.index(t),i=this.normalize(s,this.proxyOf.nodes[r]).reverse();r=this.index(t);for(let a of i)this.proxyOf.nodes.splice(r+1,0,a);let n;for(let a in this.indexes)n=this.indexes[a],r<n&&(this.indexes[a]=n+i.length);return this.markDirty(),this}insertBefore(t,s){let r=this.index(t),i=r===0?"prepend":!1,n=this.normalize(s,this.proxyOf.nodes[r],i).reverse();r=this.index(t);for(let o of n)this.proxyOf.nodes.splice(r,0,o);let a;for(let o in this.indexes)a=this.indexes[o],r<=a&&(this.indexes[o]=a+n.length);return this.markDirty(),this}normalize(t,s){if(typeof t=="string")t=yr(mr(t).nodes);else if(typeof t>"u")t=[];else if(Array.isArray(t)){t=t.slice(0);for(let r of t)r.parent&&r.parent.removeChild(r,"ignore")}else if(t.type==="root"&&this.type!=="document"){t=t.nodes.slice(0);for(let r of t)r.parent&&r.parent.removeChild(r,"ignore")}else if(t.type)t=[t];else if(t.prop){if(typeof t.value>"u")throw new Error("Value field is missed in node creation");typeof t.value!="string"&&(t.value=String(t.value)),t=[new dr(t)]}else if(t.selector)t=[new Ye(t)];else if(t.name)t=[new Ge(t)];else if(t.text)t=[new fr(t)];else throw new Error("Unknown node type in node creation");return t.map(r=>(r[pr]||Pn.rebuild(r),r=r.proxyOf,r.parent&&r.parent.removeChild(r),r[ur]&&wr(r),typeof r.raws.before>"u"&&s&&typeof s.raws.before<"u"&&(r.raws.before=s.raws.before.replace(/\S/g,"")),r.parent=this.proxyOf,r))}prepend(...t){t=t.reverse();for(let s of t){let r=this.normalize(s,this.first,"prepend").reverse();for(let i of r)this.proxyOf.nodes.unshift(i);for(let i in this.indexes)this.indexes[i]=this.indexes[i]+r.length}return this.markDirty(),this}push(t){return t.parent=this,this.proxyOf.nodes.push(t),this}removeAll(){for(let t of this.proxyOf.nodes)t.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(t){t=this.index(t),this.proxyOf.nodes[t].parent=void 0,this.proxyOf.nodes.splice(t,1);let s;for(let r in this.indexes)s=this.indexes[r],s>=t&&(this.indexes[r]=s-1);return this.markDirty(),this}replaceValues(t,s,r){return r||(r=s,s={}),this.walkDecls(i=>{s.props&&!s.props.includes(i.prop)||s.fast&&!i.value.includes(s.fast)||(i.value=i.value.replace(t,r))}),this.markDirty(),this}some(t){return this.nodes.some(t)}walk(t){return this.each((s,r)=>{let i;try{i=t(s,r)}catch(n){throw s.addToError(n)}return i!==!1&&s.walk&&(i=s.walk(t)),i})}walkAtRules(t,s){return s?t instanceof RegExp?this.walk((r,i)=>{if(r.type==="atrule"&&t.test(r.name))return s(r,i)}):this.walk((r,i)=>{if(r.type==="atrule"&&r.name===t)return s(r,i)}):(s=t,this.walk((r,i)=>{if(r.type==="atrule")return s(r,i)}))}walkComments(t){return this.walk((s,r)=>{if(s.type==="comment")return t(s,r)})}walkDecls(t,s){return s?t instanceof RegExp?this.walk((r,i)=>{if(r.type==="decl"&&t.test(r.prop))return s(r,i)}):this.walk((r,i)=>{if(r.type==="decl"&&r.prop===t)return s(r,i)}):(s=t,this.walk((r,i)=>{if(r.type==="decl")return s(r,i)}))}walkRules(t,s){return s?t instanceof RegExp?this.walk((r,i)=>{if(r.type==="rule"&&t.test(r.selector))return s(r,i)}):this.walk((r,i)=>{if(r.type==="rule"&&r.selector===t)return s(r,i)}):(s=t,this.walk((r,i)=>{if(r.type==="rule")return s(r,i)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}};Q.registerParse=e=>{mr=e},Q.registerRule=e=>{Ye=e},Q.registerAtRule=e=>{Ge=e},Q.registerRoot=e=>{gr=e};var et=Q;Q.default=Q,Q.rebuild=e=>{e.type==="atrule"?Object.setPrototypeOf(e,Ge.prototype):e.type==="rule"?Object.setPrototypeOf(e,Ye.prototype):e.type==="decl"?Object.setPrototypeOf(e,dr.prototype):e.type==="comment"?Object.setPrototypeOf(e,fr.prototype):e.type==="root"&&Object.setPrototypeOf(e,gr.prototype),e[pr]=!0,e.nodes&&e.nodes.forEach(t=>{Q.rebuild(t)})};let vo=et,vr,br,gt=class extends vo{constructor(e){super(O({type:"document"},e)),this.nodes||(this.nodes=[])}toResult(e={}){return new vr(new br,this,e).stringify()}};gt.registerLazyResult=e=>{vr=e},gt.registerProcessor=e=>{br=e};var Xe=gt;gt.default=gt;let Sr={};var xr=function(e){Sr[e]||(Sr[e]=!0,typeof console<"u"&&console.warn&&console.warn(e))};let Ze=class{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let s=t.node.rangeBy(t);this.line=s.start.line,this.column=s.start.column,this.endLine=s.end.line,this.endColumn=s.end.column}for(let s in t)this[s]=t[s]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}};var Cr=Ze;Ze.default=Ze;let bo=Cr,He=class{constructor(e,t,s){this.processor=e,this.messages=[],this.root=t,this.opts=s,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 s=new bo(e,t);return this.messages.push(s),s}warnings(){return this.messages.filter(e=>e.type==="warning")}get content(){return this.css}};var Je=He;He.default=He;const $e=39,Er=34,Gt=92,Mr=47,Xt=10,yt=32,Zt=12,Ht=9,Jt=13,So=91,xo=93,Co=40,Eo=41,Mo=123,No=125,To=59,ko=42,Oo=58,Ro=64,$t=/[\t\n\f\r "#'()/;[\\\]{}]/g,Qt=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,Do=/.[\r\n"'(/\\]/,Nr=/[\da-f]/i;var Ao=function(e,t={}){let s=e.css.valueOf(),r=t.ignoreErrors,i,n,a,o,l,c,h,p,u,m,v=s.length,d=0,x=[],f=[];function b(){return d}function y(U){throw e.error("Unclosed "+U,d)}function S(){return f.length===0&&d>=v}function F(U){if(f.length)return f.pop();if(d>=v)return;let Z=U?U.ignoreUnclosed:!1;switch(i=s.charCodeAt(d),i){case Xt:case yt:case Ht:case Jt:case Zt:{n=d;do n+=1,i=s.charCodeAt(n);while(i===yt||i===Xt||i===Ht||i===Jt||i===Zt);m=["space",s.slice(d,n)],d=n-1;break}case So:case xo:case Mo:case No:case Oo:case To:case Eo:{let rt=String.fromCharCode(i);m=[rt,rt,d];break}case Co:{if(p=x.length?x.pop()[1]:"",u=s.charCodeAt(d+1),p==="url"&&u!==$e&&u!==Er&&u!==yt&&u!==Xt&&u!==Ht&&u!==Zt&&u!==Jt){n=d;do{if(c=!1,n=s.indexOf(")",n+1),n===-1)if(r||Z){n=d;break}else y("bracket");for(h=n;s.charCodeAt(h-1)===Gt;)h-=1,c=!c}while(c);m=["brackets",s.slice(d,n+1),d,n],d=n}else n=s.indexOf(")",d+1),o=s.slice(d,n+1),n===-1||Do.test(o)?m=["(","(",d]:(m=["brackets",o,d,n],d=n);break}case $e:case Er:{a=i===$e?"'":'"',n=d;do{if(c=!1,n=s.indexOf(a,n+1),n===-1)if(r||Z){n=d+1;break}else y("string");for(h=n;s.charCodeAt(h-1)===Gt;)h-=1,c=!c}while(c);m=["string",s.slice(d,n+1),d,n],d=n;break}case Ro:{$t.lastIndex=d+1,$t.test(s),$t.lastIndex===0?n=s.length-1:n=$t.lastIndex-2,m=["at-word",s.slice(d,n+1),d,n],d=n;break}case Gt:{for(n=d,l=!0;s.charCodeAt(n+1)===Gt;)n+=1,l=!l;if(i=s.charCodeAt(n+1),l&&i!==Mr&&i!==yt&&i!==Xt&&i!==Ht&&i!==Jt&&i!==Zt&&(n+=1,Nr.test(s.charAt(n)))){for(;Nr.test(s.charAt(n+1));)n+=1;s.charCodeAt(n+1)===yt&&(n+=1)}m=["word",s.slice(d,n+1),d,n],d=n;break}default:{i===Mr&&s.charCodeAt(d+1)===ko?(n=s.indexOf("*/",d+2)+1,n===0&&(r||Z?n=s.length:y("comment")),m=["comment",s.slice(d,n+1),d,n],d=n):(Qt.lastIndex=d+1,Qt.test(s),Qt.lastIndex===0?n=s.length-1:n=Qt.lastIndex-2,m=["word",s.slice(d,n+1),d,n],x.push(m),d=n);break}}return d++,m}function V(U){f.push(U)}return{back:V,endOfFile:S,nextToken:F,position:b}};let Tr=et,Kt=class extends Tr{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 Qe=Kt;Kt.default=Kt,Tr.registerAtRule(Kt);let kr=et,Or,Rr,it=class extends kr{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,s){let r=super.normalize(e);if(t){if(s==="prepend")this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let i of r)i.raws.before=t.raws.before}return r}removeChild(e,t){let s=this.index(e);return!t&&s===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[s].raws.before),super.removeChild(e)}toResult(e={}){return new Or(new Rr,this,e).stringify()}};it.registerLazyResult=e=>{Or=e},it.registerProcessor=e=>{Rr=e};var wt=it;it.default=it,kr.registerRoot(it);let vt={comma(e){return vt.split(e,[","],!0)},space(e){let t=[" ",`
25
+ `," "];return vt.split(e,t)},split(e,t,s){let r=[],i="",n=!1,a=0,o=!1,l="",c=!1;for(let h of e)c?c=!1:h==="\\"?c=!0:o?h===l&&(o=!1):h==='"'||h==="'"?(o=!0,l=h):h==="("?a+=1:h===")"?a>0&&(a-=1):a===0&&t.includes(h)&&(n=!0),n?(i!==""&&r.push(i.trim()),i="",n=!1):i+=h;return(s||i!=="")&&r.push(i.trim()),r}};var Dr=vt;vt.default=vt;let Ar=et,Io=Dr,qt=class extends Ar{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return Io.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,s=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(s)}};var Ke=qt;qt.default=qt,Ar.registerRule(qt);let Po=Ut,Lo=Ao,Fo=Yt,_o=Qe,Uo=wt,Ir=Ke;const Pr={empty:!0,space:!0};function Bo(e){for(let t=e.length-1;t>=0;t--){let s=e[t],r=s[3]||s[2];if(r)return r}}var jo=class{constructor(e){this.input=e,this.root=new Uo,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 _o;t.name=e[1].slice(1),t.name===""&&this.unnamedAtrule(t,e),this.init(t,e[2]);let s,r,i,n=!1,a=!1,o=[],l=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),s=e[0],s==="("||s==="["?l.push(s==="("?")":"]"):s==="{"&&l.length>0?l.push("}"):s===l[l.length-1]&&l.pop(),l.length===0)if(s===";"){t.source.end=this.getPosition(e[2]),t.source.end.offset++,this.semicolon=!0;break}else if(s==="{"){a=!0;break}else if(s==="}"){if(o.length>0){for(i=o.length-1,r=o[i];r&&r[0]==="space";)r=o[--i];r&&(t.source.end=this.getPosition(r[3]||r[2]),t.source.end.offset++)}this.end(e);break}else o.push(e);else o.push(e);if(this.tokenizer.endOfFile()){n=!0;break}}t.raws.between=this.spacesAndCommentsFromEnd(o),o.length?(t.raws.afterName=this.spacesAndCommentsFromStart(o),this.raw(t,"params",o),n&&(e=o[o.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=""),a&&(t.nodes=[],this.current=t)}checkMissedSemicolon(e){let t=this.colon(e);if(t===!1)return;let s=0,r;for(let i=t-1;i>=0&&(r=e[i],!(r[0]!=="space"&&(s+=1,s===2)));i--);throw this.input.error("Missed semicolon",r[0]==="word"?r[3]+1:r[2])}colon(e){let t=0,s,r,i;for(let[n,a]of e.entries()){if(s=a,r=s[0],r==="("&&(t+=1),r===")"&&(t-=1),t===0&&r===":")if(!i)this.doubleColon(s);else{if(i[0]==="word"&&i[1]==="progid")continue;return n}i=s}return!1}comment(e){let t=new Fo;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let s=e[1].slice(2,-2);if(/^\s*$/.test(s))t.text="",t.raws.left=s,t.raws.right="";else{let r=s.match(/^(\s*)([^]*\S)(\s*)$/);t.text=r[2],t.raws.left=r[1],t.raws.right=r[3]}}createTokenizer(){this.tokenizer=Lo(this.input)}decl(e,t){let s=new Po;this.init(s,e[0][2]);let r=e[e.length-1];for(r[0]===";"&&(this.semicolon=!0,e.pop()),s.source.end=this.getPosition(r[3]||r[2]||Bo(e)),s.source.end.offset++;e[0][0]!=="word";)e.length===1&&this.unknownWord(e),s.raws.before+=e.shift()[1];for(s.source.start=this.getPosition(e[0][2]),s.prop="";e.length;){let o=e[0][0];if(o===":"||o==="space"||o==="comment")break;s.prop+=e.shift()[1]}s.raws.between="";let i;for(;e.length;)if(i=e.shift(),i[0]===":"){s.raws.between+=i[1];break}else i[0]==="word"&&/\w/.test(i[1])&&this.unknownWord([i]),s.raws.between+=i[1];(s.prop[0]==="_"||s.prop[0]==="*")&&(s.raws.before+=s.prop[0],s.prop=s.prop.slice(1));let n=[],a;for(;e.length&&(a=e[0][0],!(a!=="space"&&a!=="comment"));)n.push(e.shift());this.precheckMissedSemicolon(e);for(let o=e.length-1;o>=0;o--){if(i=e[o],i[1].toLowerCase()==="!important"){s.important=!0;let l=this.stringFrom(e,o);l=this.spacesFromEnd(e)+l,l!==" !important"&&(s.raws.important=l);break}else if(i[1].toLowerCase()==="important"){let l=e.slice(0),c="";for(let h=o;h>0;h--){let p=l[h][0];if(c.trim().indexOf("!")===0&&p!=="space")break;c=l.pop()[1]+c}c.trim().indexOf("!")===0&&(s.important=!0,s.raws.important=c,e=l)}if(i[0]!=="space"&&i[0]!=="comment")break}e.some(o=>o[0]!=="space"&&o[0]!=="comment")&&(s.raws.between+=n.map(o=>o[1]).join(""),n=[]),this.raw(s,"value",n.concat(e),t),s.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 Ir;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,s=null,r=!1,i=null,n=[],a=e[1].startsWith("--"),o=[],l=e;for(;l;){if(s=l[0],o.push(l),s==="("||s==="[")i||(i=l),n.push(s==="("?")":"]");else if(a&&r&&s==="{")i||(i=l),n.push("}");else if(n.length===0)if(s===";")if(r){this.decl(o,a);return}else break;else if(s==="{"){this.rule(o);return}else if(s==="}"){this.tokenizer.back(o.pop()),t=!0;break}else s===":"&&(r=!0);else s===n[n.length-1]&&(n.pop(),n.length===0&&(i=null));l=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),n.length>0&&this.unclosedBracket(i),t&&r){if(!a)for(;o.length&&(l=o[o.length-1][0],!(l!=="space"&&l!=="comment"));)this.tokenizer.back(o.pop());this.decl(o,a)}else this.unknownWord(o)}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,s,r){let i,n,a=s.length,o="",l=!0,c,h;for(let p=0;p<a;p+=1)i=s[p],n=i[0],n==="space"&&p===a-1&&!r?l=!1:n==="comment"?(h=s[p-1]?s[p-1][0]:"empty",c=s[p+1]?s[p+1][0]:"empty",!Pr[h]&&!Pr[c]?o.slice(-1)===","?l=!1:o+=i[1]:l=!1):o+=i[1];if(!l){let p=s.reduce((u,m)=>u+m[1],"");e.raws[t]={raw:p,value:o}}e[t]=o}rule(e){e.pop();let t=new Ir;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,s="";for(;e.length&&(t=e[e.length-1][0],!(t!=="space"&&t!=="comment"));)s=e.pop()[1]+s;return s}spacesAndCommentsFromStart(e){let t,s="";for(;e.length&&(t=e[0][0],!(t!=="space"&&t!=="comment"));)s+=e.shift()[1];return s}spacesFromEnd(e){let t,s="";for(;e.length&&(t=e[e.length-1][0],t==="space");)s=e.pop()[1]+s;return s}stringFrom(e,t){let s="";for(let r=t;r<e.length;r++)s+=e[r][1];return e.splice(t,e.length-t),s}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})}};let Wo=et,Vo=jo,zo=Wt;function te(e,t){let s=new zo(e,t),r=new Vo(s);try{r.parse()}catch(i){throw i}return r.root}var qe=te;te.default=te,Wo.registerParse(te);let{isClean:H,my:Yo}=mt,Go=hr,Xo=Lt,Zo=et,Ho=Xe,kh=xr,Lr=Je,Jo=qe,$o=wt;const Qo={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},Ko={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},qo={Once:!0,postcssPlugin:!0,prepare:!0},nt=0;function bt(e){return typeof e=="object"&&typeof e.then=="function"}function Fr(e){let t=!1,s=Qo[e.type];return e.type==="decl"?t=e.prop.toLowerCase():e.type==="atrule"&&(t=e.name.toLowerCase()),t&&e.append?[s,s+"-"+t,nt,s+"Exit",s+"Exit-"+t]:t?[s,s+"-"+t,s+"Exit",s+"Exit-"+t]:e.append?[s,nt,s+"Exit"]:[s,s+"Exit"]}function _r(e){let t;return e.type==="document"?t=["Document",nt,"DocumentExit"]:e.type==="root"?t=["Root",nt,"RootExit"]:t=Fr(e),{eventIndex:0,events:t,iterator:0,node:e,visitorIndex:0,visitors:[]}}function ts(e){return e[H]=!1,e.nodes&&e.nodes.forEach(t=>ts(t)),e}let es={},ot=class Ln{constructor(t,s,r){this.stringified=!1,this.processed=!1;let i;if(typeof s=="object"&&s!==null&&(s.type==="root"||s.type==="document"))i=ts(s);else if(s instanceof Ln||s instanceof Lr)i=ts(s.root),s.map&&(typeof r.map>"u"&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=s.map);else{let n=Jo;r.syntax&&(n=r.syntax.parse),r.parser&&(n=r.parser),n.parse&&(n=n.parse);try{i=n(s,r)}catch(a){this.processed=!0,this.error=a}i&&!i[Yo]&&Zo.rebuild(i)}this.result=new Lr(t,i,r),this.helpers=z(O({},es),{postcss:es,result:this.result}),this.plugins=this.processor.plugins.map(n=>typeof n=="object"&&n.prepare?O(O({},n),n.prepare(this.result)):n)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(t){return this.async().catch(t)}finally(t){return this.async().then(t,t)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(t,s){let r=this.result.lastPlugin;try{s&&s.addToError(t),this.error=t,t.name==="CssSyntaxError"&&!t.plugin?(t.plugin=r.postcssPlugin,t.setMessage()):r.postcssVersion}catch(i){console&&console.error&&console.error(i)}return t}prepareVisitors(){this.listeners={};let t=(s,r,i)=>{this.listeners[r]||(this.listeners[r]=[]),this.listeners[r].push([s,i])};for(let s of this.plugins)if(typeof s=="object")for(let r in s){if(!Ko[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${s.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!qo[r])if(typeof s[r]=="object")for(let i in s[r])i==="*"?t(s,r,s[r][i]):t(s,r+"-"+i.toLowerCase(),s[r][i]);else typeof s[r]=="function"&&t(s,r,s[r])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let t=0;t<this.plugins.length;t++){let s=this.plugins[t],r=this.runOnRoot(s);if(bt(r))try{await r}catch(i){throw this.handleError(i)}}if(this.prepareVisitors(),this.hasListener){let t=this.result.root;for(;!t[H];){t[H]=!0;let s=[_r(t)];for(;s.length>0;){let r=this.visitTick(s);if(bt(r))try{await r}catch(i){let n=s[s.length-1].node;throw this.handleError(i,n)}}}if(this.listeners.OnceExit)for(let[s,r]of this.listeners.OnceExit){this.result.lastPlugin=s;try{if(t.type==="document"){let i=t.nodes.map(n=>r(n,this.helpers));await Promise.all(i)}else await r(t,this.helpers)}catch(i){throw this.handleError(i)}}}return this.processed=!0,this.stringify()}runOnRoot(t){this.result.lastPlugin=t;try{if(typeof t=="object"&&t.Once){if(this.result.root.type==="document"){let s=this.result.root.nodes.map(r=>t.Once(r,this.helpers));return bt(s[0])?Promise.all(s):s}return t.Once(this.result.root,this.helpers)}else if(typeof t=="function")return t(this.result.root,this.result)}catch(s){throw this.handleError(s)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let t=this.result.opts,s=Xo;t.syntax&&(s=t.syntax.stringify),t.stringifier&&(s=t.stringifier),s.stringify&&(s=s.stringify);let r=new Go(s,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 t of this.plugins){let s=this.runOnRoot(t);if(bt(s))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let t=this.result.root;for(;!t[H];)t[H]=!0,this.walkSync(t);if(this.listeners.OnceExit)if(t.type==="document")for(let s of t.nodes)this.visitSync(this.listeners.OnceExit,s);else this.visitSync(this.listeners.OnceExit,t)}return this.result}then(t,s){return this.async().then(t,s)}toString(){return this.css}visitSync(t,s){for(let[r,i]of t){this.result.lastPlugin=r;let n;try{n=i(s,this.helpers)}catch(a){throw this.handleError(a,s.proxyOf)}if(s.type!=="root"&&s.type!=="document"&&!s.parent)return!0;if(bt(n))throw this.getAsyncError()}}visitTick(t){let s=t[t.length-1],{node:r,visitors:i}=s;if(r.type!=="root"&&r.type!=="document"&&!r.parent){t.pop();return}if(i.length>0&&s.visitorIndex<i.length){let[a,o]=i[s.visitorIndex];s.visitorIndex+=1,s.visitorIndex===i.length&&(s.visitors=[],s.visitorIndex=0),this.result.lastPlugin=a;try{return o(r.toProxy(),this.helpers)}catch(l){throw this.handleError(l,r)}}if(s.iterator!==0){let a=s.iterator,o;for(;o=r.nodes[r.indexes[a]];)if(r.indexes[a]+=1,!o[H]){o[H]=!0,t.push(_r(o));return}s.iterator=0,delete r.indexes[a]}let n=s.events;for(;s.eventIndex<n.length;){let a=n[s.eventIndex];if(s.eventIndex+=1,a===nt){r.nodes&&r.nodes.length&&(r[H]=!0,s.iterator=r.getIterator());return}else if(this.listeners[a]){s.visitors=this.listeners[a];return}}t.pop()}walkSync(t){t[H]=!0;let s=Fr(t);for(let r of s)if(r===nt)t.nodes&&t.each(i=>{i[H]||this.walkSync(i)});else{let i=this.listeners[r];if(i&&this.visitSync(i,t.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"}};ot.registerPostcss=e=>{es=e};var Ur=ot;ot.default=ot,$o.registerLazyResult(ot),Ho.registerLazyResult(ot);let ta=hr,ea=Lt,Oh=xr,sa=qe;const ra=Je;let ss=class{constructor(e,t,s){t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=s,this._map=void 0;let r,i=ea;this.result=new ra(this._processor,r,this._opts),this.result.css=t;let n=this;Object.defineProperty(this.result,"root",{get(){return n.root}});let a=new ta(i,r,this._opts,t);if(a.isMap()){let[o,l]=a.generate();o&&(this.result.css=o),l&&(this.result.map=l)}else a.clearAnnotation(),this.result.css=a.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=sa;try{e=t(this._css,this._opts)}catch(s){this.error=s}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}};var ia=ss;ss.default=ss;let na=ia,oa=Ur,aa=Xe,la=wt,St=class{constructor(e=[]){this.version="8.4.39",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let s of e)if(s.postcss===!0?s=s():s.postcss&&(s=s.postcss),typeof s=="object"&&Array.isArray(s.plugins))t=t.concat(s.plugins);else if(typeof s=="object"&&s.postcssPlugin)t.push(s);else if(typeof s=="function")t.push(s);else if(!(typeof s=="object"&&(s.parse||s.stringify)))throw new Error(s+" is not a PostCSS plugin");return t}process(e,t={}){return!this.plugins.length&&!t.parser&&!t.stringifier&&!t.syntax?new na(this,e,t):new oa(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var ca=St;St.default=St,la.registerProcessor(St),aa.registerProcessor(St);let ha=Ut,ua=er,pa=Yt,da=Qe,fa=Wt,ma=wt,ga=Ke;function xt(e,t){if(Array.isArray(e))return e.map(a=>xt(a));let i=e,{inputs:s}=i,r=Pt(i,["inputs"]);if(s){t=[];for(let a of s){let o=z(O({},a),{__proto__:fa.prototype});o.map&&(o.map=z(O({},o.map),{__proto__:ua.prototype})),t.push(o)}}if(r.nodes&&(r.nodes=e.nodes.map(a=>xt(a,t))),r.source){let n=r.source,{inputId:a}=n,o=Pt(n,["inputId"]);r.source=o,a!=null&&(r.source.input=t[a])}if(r.type==="root")return new ma(r);if(r.type==="decl")return new ha(r);if(r.type==="rule")return new ga(r);if(r.type==="comment")return new pa(r);if(r.type==="atrule")return new da(r);throw new Error("Unknown node type: "+e.type)}var ya=xt;xt.default=xt;let wa=De,Br=Ut,va=Ur,ba=et,rs=ca,Sa=Lt,xa=ya,jr=Xe,Ca=Cr,Wr=Yt,Vr=Qe,Ea=Je,Ma=Wt,Na=qe,Ta=Dr,zr=Ke,Yr=wt,ka=_t;function N(...e){return e.length===1&&Array.isArray(e[0])&&(e=e[0]),new rs(e)}N.plugin=function(e,t){let s=!1;function r(...n){console&&console.warn&&!s&&(s=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide:
26
+ https://evilmartians.com/chronicles/postcss-8-plugin-migration`),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(e+`: \u91CC\u9762 postcss.plugin \u88AB\u5F03\u7528. \u8FC1\u79FB\u6307\u5357:
27
+ https://www.w3ctech.com/topic/2226`));let a=t(...n);return a.postcssPlugin=e,a.postcssVersion=new rs().version,a}let i;return Object.defineProperty(r,"postcss",{get(){return i||(i=r()),i}}),r.process=function(n,a,o){return N([r(o)]).process(n,a)},r},N.stringify=Sa,N.parse=Na,N.fromJSON=xa,N.list=Ta,N.comment=e=>new Wr(e),N.atRule=e=>new Vr(e),N.decl=e=>new Br(e),N.rule=e=>new zr(e),N.root=e=>new Yr(e),N.document=e=>new jr(e),N.CssSyntaxError=wa,N.Declaration=Br,N.Container=ba,N.Processor=rs,N.Document=jr,N.Comment=Wr,N.Warning=Ca,N.AtRule=Vr,N.Result=Ea,N.Input=Ma,N.Rule=zr,N.Root=Yr,N.Node=ka,va.registerPostcss(N);var Oa=N;N.default=N;const D=Yn(Oa);D.stringify,D.fromJSON,D.plugin,D.parse,D.list,D.document,D.comment,D.atRule,D.rule,D.decl,D.root,D.CssSyntaxError,D.Declaration,D.Container,D.Processor,D.Document,D.Comment,D.Warning,D.AtRule,D.Result,D.Input,D.Rule,D.Root,D.Node;const Ra=/(max|min)-device-(width|height)/,Gr=new RegExp(Ra.source,"g"),Da={postcssPlugin:"postcss-custom-selectors",prepare(){return{postcssPlugin:"postcss-custom-selectors",AtRule:function(e){e.params.match(Gr)&&(e.params=e.params.replace(Gr,"$1-$2"))}}}},Aa={postcssPlugin:"postcss-hover-classes",prepare:function(){const e=[];return{Rule:function(t){e.indexOf(t)===-1&&(e.push(t),t.selectors.forEach(function(s){if(!s.includes(":"))return;const r=s.replace(/\n/g," ").split(" "),i=[];r.forEach(function(a){const o=a.match(/::?([^:]+)/g);if(!o){i.push(a);return}const l=a.substr(0,a.length-o.join("").length),c=o.map(function(h){return h.replace(/\(.*/g,"")!==":hover"||h.match(/^::/)?h:(h=h.substr(1),h=h.replace(/\(/g,"\\("),h=h.replace(/\)/g,"\\)"),".\\:"+h)});i.push(l+c.join(""))}),n(i.join(" "));function n(a){a&&a!==s&&(t.selector+=`,
28
+ `+a)}}))}}}},Xr={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 Ia(e){let t=Xr[e.tagName]?Xr[e.tagName]:e.tagName;return t==="link"&&e.attributes._cssText&&(t="style"),t}function Zr(e,t){const s=t==null?void 0:t.stylesWithHoverClass.get(e);if(s)return s;const r=D([Da,Aa]).process(e).css;return t==null||t.stylesWithHoverClass.set(e,r),r}function Hr(){return{stylesWithHoverClass:new Map}}function Pa(e,t){var s;const{doc:r,hackCss:i,cache:n}=t;switch(e.type){case k.Document:return r.implementation.createDocument(null,"",null);case k.DocumentType:return r.implementation.createDocumentType(e.name||"html",e.publicId,e.systemId);case k.Element:{const a=Ia(e);let o;e.isSVG?o=r.createElementNS("http://www.w3.org/2000/svg",a):(e.isCustom&&(s=r.defaultView)!=null&&s.customElements&&!r.defaultView.customElements.get(e.tagName)&&r.defaultView.customElements.define(e.tagName,class extends r.defaultView.HTMLElement{}),o=r.createElement(a));const l={};for(const c in e.attributes){if(!Object.prototype.hasOwnProperty.call(e.attributes,c))continue;let h=e.attributes[c];if(a==="option"&&c==="selected"&&h===!1||h===null)continue;if(h===!0&&(h=""),c.startsWith("rr_")){l[c]=h;continue}const p=a==="textarea"&&c==="value",u=a==="style"&&c==="_cssText";if(u&&i&&typeof h=="string"&&(h=Zr(h,n)),(p||u)&&typeof h=="string"){o.appendChild(r.createTextNode(h)),e.childNodes=[];continue}try{if(e.isSVG&&c==="xlink:href")o.setAttributeNS("http://www.w3.org/1999/xlink",c,h.toString());else if(c==="onload"||c==="onclick"||c.substring(0,7)==="onmouse")o.setAttribute("_"+c,h.toString());else if(a==="meta"&&e.attributes["http-equiv"]==="Content-Security-Policy"&&c==="content"){o.setAttribute("csp-content",h.toString());continue}else a==="link"&&(e.attributes.rel==="preload"||e.attributes.rel==="modulepreload")&&e.attributes.as==="script"||a==="link"&&e.attributes.rel==="prefetch"&&typeof e.attributes.href=="string"&&e.attributes.href.endsWith(".js")||(a==="img"&&e.attributes.srcset&&e.attributes.rr_dataURL?o.setAttribute("original-srcset",e.attributes.srcset):o.setAttribute(c,h.toString()))}catch(m){}}for(const c in l){const h=l[c];if(a==="canvas"&&c==="rr_dataURL"){const p=r.createElement("img");p.onload=()=>{const u=o.getContext("2d");u&&u.drawImage(p,0,0,p.width,p.height)},p.src=h.toString(),o.RRNodeType&&(o.rr_dataURL=h.toString())}else if(a==="img"&&c==="rr_dataURL"){const p=o;p.currentSrc.startsWith("data:")||(p.setAttribute("original-src",e.attributes.src),p.src=h.toString())}if(c==="rr_width")o.style.width=h.toString();else if(c==="rr_height")o.style.height=h.toString();else if(c==="rr_mediaCurrentTime"&&typeof h=="number")o.currentTime=h;else if(c==="rr_mediaState")switch(h){case"played":o.play().catch(p=>console.warn("media playback error",p));break;case"paused":o.pause();break}else c==="rr_mediaPlaybackRate"&&typeof h=="number"?o.playbackRate=h:c==="rr_mediaMuted"&&typeof h=="boolean"?o.muted=h:c==="rr_mediaLoop"&&typeof h=="boolean"?o.loop=h:c==="rr_mediaVolume"&&typeof h=="number"&&(o.volume=h)}if(e.isShadowHost)if(!o.shadowRoot)o.attachShadow({mode:"open"});else for(;o.shadowRoot.firstChild;)o.shadowRoot.removeChild(o.shadowRoot.firstChild);return o}case k.Text:return r.createTextNode(e.isStyle&&i?Zr(e.textContent,n):e.textContent);case k.CDATA:return r.createCDATASection(e.textContent);case k.Comment:return r.createComment(e.textContent);default:return null}}function Ct(e,t){const{doc:s,mirror:r,skipChild:i=!1,hackCss:n=!0,afterAppend:a,cache:o}=t;if(r.has(e.id)){const c=r.getNode(e.id),h=r.getMeta(c);if(zn(h,e))return r.getNode(e.id)}let l=Pa(e,{doc:s,hackCss:n,cache:o});if(!l)return null;if(e.rootId&&r.getNode(e.rootId)!==s&&r.replace(e.rootId,s),e.type===k.Document&&(s.close(),s.open(),e.compatMode==="BackCompat"&&e.childNodes&&e.childNodes[0].type!==k.DocumentType&&(e.childNodes[0].type===k.Element&&"xmlns"in e.childNodes[0].attributes&&e.childNodes[0].attributes.xmlns==="http://www.w3.org/1999/xhtml"?s.write('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">'):s.write('<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">')),l=s),r.add(l,e),(e.type===k.Document||e.type===k.Element)&&!i)for(const c of e.childNodes){const h=Ct(c,{doc:s,mirror:r,skipChild:!1,hackCss:n,afterAppend:a,cache:o});if(!h){console.warn("Failed to rebuild",c);continue}if(c.isShadow&&Wn(l)&&l.shadowRoot)l.shadowRoot.appendChild(h);else if(e.type===k.Document&&c.type==k.Element){const p=h;let u=null;p.childNodes.forEach(m=>{m.nodeName==="BODY"&&(u=m)}),u?(p.removeChild(u),l.appendChild(h),p.appendChild(u)):l.appendChild(h)}else l.appendChild(h);a&&a(h,c.id)}return l}function La(e,t){function s(r){t(r)}for(const r of e.getIds())e.has(r)&&s(e.getNode(r))}function Fa(e,t){const s=t.getMeta(e);if((s==null?void 0:s.type)!==k.Element)return;const r=e;for(const i in s.attributes){if(!(Object.prototype.hasOwnProperty.call(s.attributes,i)&&i.startsWith("rr_")))continue;const n=s.attributes[i];i==="rr_scrollLeft"&&(r.scrollLeft=n),i==="rr_scrollTop"&&(r.scrollTop=n)}}function _a(e,t){const{doc:s,onVisit:r,hackCss:i=!0,afterAppend:n,cache:a,mirror:o=new Xs}=t,l=Ct(e,{doc:s,mirror:o,skipChild:!1,hackCss:i,afterAppend:n,cache:a});return La(o,c=>{r&&r(c),Fa(c,o)}),l}var L=(e=>(e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom",e[e.Plugin=6]="Plugin",e))(L||{}),M=(e=>(e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration",e[e.Selection=14]="Selection",e[e.AdoptedStyleSheet=15]="AdoptedStyleSheet",e[e.CustomElement=16]="CustomElement",e))(M||{}),B=(e=>(e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd",e[e.TouchCancel=10]="TouchCancel",e))(B||{}),ee=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(ee||{}),is=(e=>(e[e.Play=0]="Play",e[e.Pause=1]="Pause",e[e.Seeked=2]="Seeked",e[e.VolumeChange=3]="VolumeChange",e[e.RateChange=4]="RateChange",e))(is||{}),E=(e=>(e.Start="start",e.Pause="pause",e.Resume="resume",e.Resize="resize",e.Finish="finish",e.FullsnapshotRebuilded="fullsnapshot-rebuilded",e.LoadStylesheetStart="load-stylesheet-start",e.LoadStylesheetEnd="load-stylesheet-end",e.SkipStart="skip-start",e.SkipEnd="skip-end",e.MouseInteraction="mouse-interaction",e.EventCast="event-cast",e.CustomEvent="custom-event",e.Flush="flush",e.StateChange="state-change",e.PlayBack="play-back",e.Destroy="destroy",e))(E||{});const at=`Please stop import mirror directly. Instead of that,\r
29
+ now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
30
+ or you can use record.mirror to access the mirror instance during recording.`;let Jr={map:{},getId(){return console.error(at),-1},getNode(){return console.error(at),null},removeNodeFromMap(){console.error(at)},has(){return console.error(at),!1},reset(){console.error(at)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(Jr=new Proxy(Jr,{get(e,t,s){return t==="map"&&console.error(at),Reflect.get(e,t,s)}})),Date.now().toString();function Ua(e=window){"NodeList"in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach),Node.prototype.contains||(Node.prototype.contains=(...t)=>{let s=t[0];if(!(0 in t))throw new TypeError("1 argument is required");do if(this===s)return!0;while(s=s&&s.parentNode);return!1})}function Ba(e){const t={},s=(i,n)=>{const a={value:i,parent:n,children:[]};return t[i.node.id]=a,a},r=[];for(const i of e){const{nextId:n,parentId:a}=i;if(n&&n in t){const o=t[n];if(o.parent){const l=o.parent.children.indexOf(o);o.parent.children.splice(l,0,s(i,o.parent))}else{const l=r.indexOf(o);r.splice(l,0,s(i,null))}continue}if(a in t){const o=t[a];o.children.push(s(i,o));continue}r.push(s(i,null))}return r}function $r(e,t){t(e.value);for(let s=e.children.length-1;s>=0;s--)$r(e.children[s],t)}function ns(e,t){return!!(e.nodeName==="IFRAME"&&t.getMeta(e))}function Qr(e,t){var s,r;const i=(r=(s=e.ownerDocument)==null?void 0:s.defaultView)==null?void 0:r.frameElement;if(!i||i===t)return{x:0,y:0,relativeScale:1,absoluteScale:1};const n=i.getBoundingClientRect(),a=Qr(i,t),o=n.height/i.clientHeight;return{x:n.x*a.relativeScale+a.x,y:n.y*a.relativeScale+a.y,relativeScale:o,absoluteScale:a.absoluteScale*o}}function se(e){return!!(e!=null&&e.shadowRoot)}function Et(e,t){const s=e[t[0]];return t.length===1?s:Et(s.cssRules[t[1]].cssRules,t.slice(2))}function Kr(e){const t=[...e],s=t.pop();return{positions:t,index:s}}function ja(e){const t=new Set,s=[];for(let r=e.length;r--;){const i=e[r];t.has(i.id)||(s.push(i),t.add(i.id))}return s}class Wa{constructor(){w(this,"id",1),w(this,"styleIDMap",new WeakMap),w(this,"idStyleMap",new Map)}getId(t){var s;return(s=this.styleIDMap.get(t))!=null?s:-1}has(t){return this.styleIDMap.has(t)}add(t,s){if(this.has(t))return this.getId(t);let r;return s===void 0?r=this.id++:r=s,this.styleIDMap.set(t,r),this.idStyleMap.set(r,t),r}getStyle(t){return this.idStyleMap.get(t)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}const Va="KGZ1bmN0aW9uKCl7InVzZSBzdHJpY3QiO2Zvcih2YXIgcj0iQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyIsdz10eXBlb2YgVWludDhBcnJheT4idSI/W106bmV3IFVpbnQ4QXJyYXkoMjU2KSxpPTA7aTxyLmxlbmd0aDtpKyspd1tyLmNoYXJDb2RlQXQoaSldPWk7dmFyIHA9ZnVuY3Rpb24ocyl7dmFyIGU9bmV3IFVpbnQ4QXJyYXkocyksbixhPWUubGVuZ3RoLHQ9IiI7Zm9yKG49MDtuPGE7bis9Myl0Kz1yW2Vbbl0+PjJdLHQrPXJbKGVbbl0mMyk8PDR8ZVtuKzFdPj40XSx0Kz1yWyhlW24rMV0mMTUpPDwyfGVbbisyXT4+Nl0sdCs9cltlW24rMl0mNjNdO3JldHVybiBhJTM9PT0yP3Q9dC5zdWJzdHJpbmcoMCx0Lmxlbmd0aC0xKSsiPSI6YSUzPT09MSYmKHQ9dC5zdWJzdHJpbmcoMCx0Lmxlbmd0aC0yKSsiPT0iKSx0fTtjb25zdCBsPW5ldyBNYXAsYj1uZXcgTWFwO2FzeW5jIGZ1bmN0aW9uIHkocyxlLG4pe2NvbnN0IGE9YCR7c30tJHtlfWA7aWYoIk9mZnNjcmVlbkNhbnZhcyJpbiBnbG9iYWxUaGlzKXtpZihiLmhhcyhhKSlyZXR1cm4gYi5nZXQoYSk7Y29uc3QgdD1uZXcgT2Zmc2NyZWVuQ2FudmFzKHMsZSk7dC5nZXRDb250ZXh0KCIyZCIpO2NvbnN0IGc9YXdhaXQoYXdhaXQgdC5jb252ZXJ0VG9CbG9iKG4pKS5hcnJheUJ1ZmZlcigpLGM9cChnKTtyZXR1cm4gYi5zZXQoYSxjKSxjfWVsc2UgcmV0dXJuIiJ9Y29uc3Qgbz1zZWxmO28ub25tZXNzYWdlPWFzeW5jIGZ1bmN0aW9uKHMpe2lmKCJPZmZzY3JlZW5DYW52YXMiaW4gZ2xvYmFsVGhpcyl7Y29uc3R7aWQ6ZSxiaXRtYXA6bix3aWR0aDphLGhlaWdodDp0LGRhdGFVUkxPcHRpb25zOnV9PXMuZGF0YSxnPXkoYSx0LHUpLGM9bmV3IE9mZnNjcmVlbkNhbnZhcyhhLHQpO2MuZ2V0Q29udGV4dCgiMmQiKS5kcmF3SW1hZ2UobiwwLDApLG4uY2xvc2UoKTtjb25zdCBkPWF3YWl0IGMuY29udmVydFRvQmxvYih1KSx2PWQudHlwZSxoPWF3YWl0IGQuYXJyYXlCdWZmZXIoKSxmPXAoaCk7aWYoIWwuaGFzKGUpJiZhd2FpdCBnPT09ZilyZXR1cm4gbC5zZXQoZSxmKSxvLnBvc3RNZXNzYWdlKHtpZDplfSk7aWYobC5nZXQoZSk9PT1mKXJldHVybiBvLnBvc3RNZXNzYWdlKHtpZDplfSk7by5wb3N0TWVzc2FnZSh7aWQ6ZSx0eXBlOnYsYmFzZTY0OmYsd2lkdGg6YSxoZWlnaHQ6dH0pLGwuc2V0KGUsZil9ZWxzZSByZXR1cm4gby5wb3N0TWVzc2FnZSh7aWQ6cy5kYXRhLmlkfSl9fSkoKTsKLy8jIHNvdXJjZU1hcHBpbmdVUkw9aW1hZ2UtYml0bWFwLWRhdGEtdXJsLXdvcmtlci1Cb1hHVm1Zby5qcy5tYXAK",za=e=>Uint8Array.from(atob(e),t=>t.charCodeAt(0));typeof self<"u"&&self.Blob&&new Blob([za(Va)],{type:"text/javascript;charset=utf-8"});for(var qr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Mt=typeof Uint8Array>"u"?[]:new Uint8Array(256),re=0;re<qr.length;re++)Mt[qr.charCodeAt(re)]=re;var Ya=function(e){var t=e.length*.75,s=e.length,r,i=0,n,a,o,l;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);var c=new ArrayBuffer(t),h=new Uint8Array(c);for(r=0;r<s;r+=4)n=Mt[e.charCodeAt(r)],a=Mt[e.charCodeAt(r+1)],o=Mt[e.charCodeAt(r+2)],l=Mt[e.charCodeAt(r+3)],h[i++]=n<<2|a>>4,h[i++]=(a&15)<<4|o>>2,h[i++]=(o&3)<<6|l&63;return c},ti;try{if(Array.from([1],e=>e*2)[0]!==2){const e=document.createElement("iframe");document.body.appendChild(e),Array.from=((ti=e.contentWindow)==null?void 0:ti.Array.from)||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}Zs();var Ga=Object.defineProperty,Xa=(e,t,s)=>t in e?Ga(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,g=(e,t,s)=>Xa(e,typeof t!="symbol"?t+"":t,s),Za=Object.defineProperty,Ha=(e,t,s)=>t in e?Za(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,ei=(e,t,s)=>Ha(e,typeof t!="symbol"?t+"":t,s),C=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))(C||{});class Ja{constructor(){ei(this,"idNodeMap",new Map),ei(this,"nodeMetaMap",new WeakMap)}getId(t){var r;var s;return t&&(r=(s=this.getMeta(t))==null?void 0:s.id)!=null?r:-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){const s=this.getId(t);this.idNodeMap.delete(s),t.childNodes&&t.childNodes.forEach(r=>this.removeNodeFromMap(r))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,s){const r=s.id;this.idNodeMap.set(r,t),this.nodeMetaMap.set(t,s)}replace(t,s){const r=this.getNode(t);if(r){const i=this.nodeMetaMap.get(r);i&&this.nodeMetaMap.set(s,i)}this.idNodeMap.set(t,s)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function $a(){return new Ja}function Qa(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Ka(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var s=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};s.prototype=t.prototype}else s={};return Object.defineProperty(s,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(s,r,i.get?i:{enumerable:!0,get:function(){return e[r]}})}),s}var os={exports:{}},A=String,si=function(){return{isColorSupported:!1,reset:A,bold:A,dim:A,italic:A,underline:A,inverse:A,hidden:A,strikethrough:A,black:A,red:A,green:A,yellow:A,blue:A,magenta:A,cyan:A,white:A,gray:A,bgBlack:A,bgRed:A,bgGreen:A,bgYellow:A,bgBlue:A,bgMagenta:A,bgCyan:A,bgWhite:A}};os.exports=si(),os.exports.createColors=si;var qa=os.exports;const tl={},el=Object.freeze(Object.defineProperty({__proto__:null,default:tl},Symbol.toStringTag,{value:"Module"})),X=Ka(el);let ri=qa,ii=X,as=class Fn extends Error{constructor(t,s,r,i,n,a){super(t),this.name="CssSyntaxError",this.reason=t,n&&(this.file=n),i&&(this.source=i),a&&(this.plugin=a),typeof s<"u"&&typeof r<"u"&&(typeof s=="number"?(this.line=s,this.column=r):(this.line=s.line,this.column=s.column,this.endLine=r.line,this.endColumn=r.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,Fn)}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(t){if(!this.source)return"";let s=this.source;t==null&&(t=ri.isColorSupported),ii&&t&&(s=ii(s));let r=s.split(/\r?\n/),i=Math.max(this.line-3,0),n=Math.min(this.line+2,r.length),a=String(n).length,o,l;if(t){let{bold:c,gray:h,red:p}=ri.createColors(!0);o=u=>c(p(u)),l=u=>h(u)}else o=l=c=>c;return r.slice(i,n).map((c,h)=>{let p=i+1+h,u=" "+(" "+p).slice(-a)+" | ";if(p===this.line){let m=l(u.replace(/\d/g," "))+c.slice(0,this.column-1).replace(/[^\t]/g," ");return o(">")+l(u)+c+`
31
+ `+m+o("^")}return" "+l(u)+c}).join(`
32
+ `)}toString(){let t=this.showSourceCode();return t&&(t=`
33
+
34
+ `+t+`
35
+ `),this.name+": "+this.message+t}};var ls=as;as.default=as;var Nt={};Nt.isClean=Symbol("isClean"),Nt.my=Symbol("my");const ni={after:`
36
+ `,beforeClose:`
37
+ `,beforeComment:`
38
+ `,beforeDecl:`
39
+ `,beforeOpen:" ",beforeRule:`
40
+ `,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function sl(e){return e[0].toUpperCase()+e.slice(1)}let cs=class{constructor(e){this.builder=e}atrule(e,t){let s="@"+e.name,r=e.params?this.rawValue(e,"params"):"";if(typeof e.raws.afterName<"u"?s+=e.raws.afterName:r&&(s+=" "),e.nodes)this.block(e,s+r);else{let i=(e.raws.between||"")+(t?";":"");this.builder(s+r+i,e)}}beforeAfter(e,t){let s;e.type==="decl"?s=this.raw(e,null,"beforeDecl"):e.type==="comment"?s=this.raw(e,null,"beforeComment"):t==="before"?s=this.raw(e,null,"beforeRule"):s=this.raw(e,null,"beforeClose");let r=e.parent,i=0;for(;r&&r.type!=="root";)i+=1,r=r.parent;if(s.includes(`
41
+ `)){let n=this.raw(e,null,"indent");if(n.length)for(let a=0;a<i;a++)s+=n}return s}block(e,t){let s=this.raw(e,"between","beforeOpen");this.builder(t+s+"{",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 s=this.raw(e,"semicolon");for(let r=0;r<e.nodes.length;r++){let i=e.nodes[r],n=this.raw(i,"before");n&&this.builder(n),this.stringify(i,t!==r||s)}}comment(e){let t=this.raw(e,"left","commentLeft"),s=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+s+"*/",e)}decl(e,t){let s=this.raw(e,"between","colon"),r=e.prop+s+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,s){let r;if(s||(s=t),t&&(r=e.raws[t],typeof r<"u"))return r;let i=e.parent;if(s==="before"&&(!i||i.type==="root"&&i.first===e||i&&i.type==="document"))return"";if(!i)return ni[s];let n=e.root();if(n.rawCache||(n.rawCache={}),typeof n.rawCache[s]<"u")return n.rawCache[s];if(s==="before"||s==="after")return this.beforeAfter(e,s);{let a="raw"+sl(s);this[a]?r=this[a](n,e):n.walk(o=>{if(r=o.raws[t],typeof r<"u")return!1})}return typeof r>"u"&&(r=ni[s]),n.rawCache[s]=r,r}rawBeforeClose(e){let t;return e.walk(s=>{if(s.nodes&&s.nodes.length>0&&typeof s.raws.after<"u")return t=s.raws.after,t.includes(`
42
+ `)&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let s;return e.walkComments(r=>{if(typeof r.raws.before<"u")return s=r.raws.before,s.includes(`
43
+ `)&&(s=s.replace(/[^\n]+$/,"")),!1}),typeof s>"u"?s=this.raw(t,null,"beforeDecl"):s&&(s=s.replace(/\S/g,"")),s}rawBeforeDecl(e,t){let s;return e.walkDecls(r=>{if(typeof r.raws.before<"u")return s=r.raws.before,s.includes(`
44
+ `)&&(s=s.replace(/[^\n]+$/,"")),!1}),typeof s>"u"?s=this.raw(t,null,"beforeRule"):s&&(s=s.replace(/\S/g,"")),s}rawBeforeOpen(e){let t;return e.walk(s=>{if(s.type!=="decl"&&(t=s.raws.between,typeof t<"u"))return!1}),t}rawBeforeRule(e){let t;return e.walk(s=>{if(s.nodes&&(s.parent!==e||e.first!==s)&&typeof s.raws.before<"u")return t=s.raws.before,t.includes(`
45
+ `)&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls(s=>{if(typeof s.raws.between<"u")return t=s.raws.between.replace(/[^\s:]/g,""),!1}),t}rawEmptyBody(e){let t;return e.walk(s=>{if(s.nodes&&s.nodes.length===0&&(t=s.raws.after,typeof t<"u"))return!1}),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk(s=>{let r=s.parent;if(r&&r!==e&&r.parent&&r.parent===e&&typeof s.raws.before<"u"){let i=s.raws.before.split(`
46
+ `);return t=i[i.length-1],t=t.replace(/\S/g,""),!1}}),t}rawSemicolon(e){let t;return e.walk(s=>{if(s.nodes&&s.nodes.length&&s.last.type==="decl"&&(t=s.raws.semicolon,typeof t<"u"))return!1}),t}rawValue(e,t){let s=e[t],r=e.raws[t];return r&&r.value===s?r.raw:s}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 oi=cs;cs.default=cs;let rl=oi;function hs(e,t){new rl(t).stringify(e)}var ie=hs;hs.default=hs;let{isClean:ne,my:il}=Nt,nl=ls,ol=oi,al=ie;function us(e,t){let s=new e.constructor;for(let r in e){if(!Object.prototype.hasOwnProperty.call(e,r)||r==="proxyCache")continue;let i=e[r],n=typeof i;r==="parent"&&n==="object"?t&&(s[r]=t):r==="source"?s[r]=i:Array.isArray(i)?s[r]=i.map(a=>us(a,s)):(n==="object"&&i!==null&&(i=us(i)),s[r]=i)}return s}let ps=class{constructor(e={}){this.raws={},this[ne]=!1,this[il]=!0;for(let t in e)if(t==="nodes"){this.nodes=[];for(let s of e[t])typeof s.clone=="function"?this.append(s.clone()):this.append(s)}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=us(this);for(let s in e)t[s]=e[s];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:s,start:r}=this.rangeBy(t);return this.source.input.error(e,{column:r.column,line:r.line},{column:s.column,line:s.line},t)}return new nl(e)}getProxyProcessor(){return{get(e,t){return t==="proxyOf"?e:t==="root"?()=>e.root().toProxy():e[t]},set(e,t,s){return e[t]===s||(e[t]=s,(t==="prop"||t==="value"||t==="name"||t==="params"||t==="important"||t==="text")&&e.markDirty()),!0}}}markDirty(){if(this[ne]){this[ne]=!1;let e=this;for(;e=e.parent;)e[ne]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let s=this.source.start;if(e.index)s=this.positionInside(e.index,t);else if(e.word){t=this.toString();let r=t.indexOf(e.word);r!==-1&&(s=this.positionInside(r,t))}return s}positionInside(e,t){let s=t||this.toString(),r=this.source.start.column,i=this.source.start.line;for(let n=0;n<e;n++)s[n]===`
47
+ `?(r=1,i+=1):r+=1;return{column:r,line:i}}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},s=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(),i=r.indexOf(e.word);i!==-1&&(t=this.positionInside(i,r),s=this.positionInside(i+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?s={column:e.end.column,line:e.end.line}:typeof e.endIndex=="number"?s=this.positionInside(e.endIndex):e.index&&(s=this.positionInside(e.index+1));return(s.line<t.line||s.line===t.line&&s.column<=t.column)&&(s={column:t.column+1,line:t.line}),{end:s,start:t}}raw(e,t){return new ol().raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let t=this,s=!1;for(let r of e)r===this?s=!0:s?(this.parent.insertAfter(t,r),t=r):this.parent.insertBefore(t,r);s||this.remove()}return this}root(){let e=this;for(;e.parent&&e.parent.type!=="document";)e=e.parent;return e}toJSON(e,t){let s={},r=t==null;t=t||new Map;let i=0;for(let n in this){if(!Object.prototype.hasOwnProperty.call(this,n)||n==="parent"||n==="proxyCache")continue;let a=this[n];if(Array.isArray(a))s[n]=a.map(o=>typeof o=="object"&&o.toJSON?o.toJSON(null,t):o);else if(typeof a=="object"&&a.toJSON)s[n]=a.toJSON(null,t);else if(n==="source"){let o=t.get(a.input);o==null&&(o=i,t.set(a.input,i),i++),s[n]={end:a.end,inputId:o,start:a.start}}else s[n]=a}return r&&(s.inputs=[...t.keys()].map(n=>n.toJSON())),s}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=al){e.stringify&&(e=e.stringify);let t="";return e(this,s=>{t+=s}),t}warn(e,t,s){let r={node:this};for(let i in s)r[i]=s[i];return e.warn(t,r)}get proxyOf(){return this}};var oe=ps;ps.default=ps;let ll=oe,ds=class extends ll{constructor(e){e&&typeof e.value<"u"&&typeof e.value!="string"&&(e=z(O({},e),{value:String(e.value)})),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}};var ae=ds;ds.default=ds;let cl="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";var hl={nanoid:(e=21)=>{let t="",s=e;for(;s--;)t+=cl[Math.random()*64|0];return t},customAlphabet:(e,t=21)=>(s=t)=>{let r="",i=s;for(;i--;)r+=e[Math.random()*e.length|0];return r}};let{SourceMapConsumer:ai,SourceMapGenerator:li}=X,{existsSync:ul,readFileSync:pl}=X,{dirname:fs,join:dl}=X;function fl(e){return Buffer?Buffer.from(e,"base64").toString():window.atob(e)}let ms=class{constructor(e,t){if(t.map===!1)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let s=t.map?t.map.prev:void 0,r=this.loadMap(t.from,s);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=fs(this.mapFile)),r&&(this.text=r)}consumer(){return this.consumerCache||(this.consumerCache=new ai(this.text)),this.consumerCache}decodeInline(e){let t=/^data:application\/json;charset=utf-?8;base64,/,s=/^data:application\/json;base64,/,r=/^data:application\/json;charset=utf-?8,/,i=/^data:application\/json,/;if(r.test(e)||i.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(t.test(e)||s.test(e))return fl(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 s=e.lastIndexOf(t.pop()),r=e.indexOf("*/",s);s>-1&&r>-1&&(this.annotation=this.getAnnotationURL(e.substring(s,r)))}loadFile(e){if(this.root=fs(e),ul(e))return this.mapFile=e,pl(e,"utf-8").toString().trim()}loadMap(e,t){if(t===!1)return!1;if(t){if(typeof t=="string")return t;if(typeof t=="function"){let s=t(e);if(s){let r=this.loadFile(s);if(!r)throw new Error("Unable to load previous source map: "+s.toString());return r}}else{if(t instanceof ai)return li.fromSourceMap(t).toString();if(t instanceof li)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 s=this.annotation;return e&&(s=dl(fs(e),s)),this.loadFile(s)}}}startWith(e,t){return e?e.substr(0,t.length)===t:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};var ci=ms;ms.default=ms;let{SourceMapConsumer:ml,SourceMapGenerator:gl}=X,{fileURLToPath:hi,pathToFileURL:le}=X,{isAbsolute:gs,resolve:ys}=X,{nanoid:yl}=hl,ws=X,ui=ls,wl=ci,vs=Symbol("fromOffsetCache"),vl=!!(ml&&gl),pi=!!(ys&&gs),ce=class{constructor(e,t={}){if(e===null||typeof e>"u"||typeof e=="object"&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),this.css[0]==="\uFEFF"||this.css[0]==="\uFFFE"?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(!pi||/^\w+:\/\//.test(t.from)||gs(t.from)?this.file=t.from:this.file=ys(t.from)),pi&&vl){let s=new wl(this.css,t);if(s.text){this.map=s;let r=s.consumer().file;!this.file&&r&&(this.file=this.mapResolve(r))}}this.file||(this.id="<input css "+yl(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,s,r={}){let i,n,a;if(t&&typeof t=="object"){let l=t,c=s;if(typeof l.offset=="number"){let h=this.fromOffset(l.offset);t=h.line,s=h.col}else t=l.line,s=l.column;if(typeof c.offset=="number"){let h=this.fromOffset(c.offset);n=h.line,a=h.col}else n=c.line,a=c.column}else if(!s){let l=this.fromOffset(t);t=l.line,s=l.col}let o=this.origin(t,s,n,a);return o?i=new ui(e,o.endLine===void 0?o.line:{column:o.column,line:o.line},o.endLine===void 0?o.column:{column:o.endColumn,line:o.endLine},o.source,o.file,r.plugin):i=new ui(e,n===void 0?t:{column:s,line:t},n===void 0?s:{column:a,line:n},this.css,this.file,r.plugin),i.input={column:s,endColumn:a,endLine:n,line:t,source:this.css},this.file&&(le&&(i.input.url=le(this.file).toString()),i.input.file=this.file),i}fromOffset(e){let t,s;if(this[vs])s=this[vs];else{let i=this.css.split(`
48
+ `);s=new Array(i.length);let n=0;for(let a=0,o=i.length;a<o;a++)s[a]=n,n+=i[a].length+1;this[vs]=s}t=s[s.length-1];let r=0;if(e>=t)r=s.length-1;else{let i=s.length-2,n;for(;r<i;)if(n=r+(i-r>>1),e<s[n])i=n-1;else if(e>=s[n+1])r=n+1;else{r=n;break}}return{col:e-s[r]+1,line:r+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:ys(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,s,r){if(!this.map)return!1;let i=this.map.consumer(),n=i.originalPositionFor({column:t,line:e});if(!n.source)return!1;let a;typeof s=="number"&&(a=i.originalPositionFor({column:r,line:s}));let o;gs(n.source)?o=le(n.source):o=new URL(n.source,this.map.consumer().sourceRoot||le(this.map.mapFile));let l={column:n.column,endColumn:a&&a.column,endLine:a&&a.line,line:n.line,url:o.toString()};if(o.protocol==="file:")if(hi)l.file=hi(o);else throw new Error("file: protocol is not available in this PostCSS build");let c=i.sourceContentFor(n.source);return c&&(l.source=c),l}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])this[t]!=null&&(e[t]=this[t]);return this.map&&(e.map=O({},this.map),e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}};var he=ce;ce.default=ce,ws&&ws.registerInput&&ws.registerInput(ce);let{SourceMapConsumer:di,SourceMapGenerator:ue}=X,{dirname:pe,relative:fi,resolve:mi,sep:gi}=X,{pathToFileURL:yi}=X,bl=he,Sl=!!(di&&ue),xl=!!(pe&&mi&&fi&&gi);var wi=class{constructor(e,t,s,r){this.stringify=e,this.mapOpts=s.map||{},this.root=t,this.opts=s,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=`
49
+ `;this.css.includes(`\r
50
+ `)&&(t=`\r
51
+ `),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t=this.toUrl(this.path(e.file)),s=e.root||pe(e.file),r;this.mapOpts.sourcesContent===!1?(r=new di(e.text),r.sourcesContent&&(r.sourcesContent=null)):r=e.consumer(),this.map.applySourceMap(r,t,this.toUrl(this.path(s)))}}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(),xl&&Sl&&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=ue.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new ue({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 ue({file:this.outputFile(),ignoreInvalidMapping:!0});let e=1,t=1,s="<no source>",r={generated:{column:0,line:0},original:{column:0,line:0},source:""},i,n;this.stringify(this.root,(a,o,l)=>{if(this.css+=a,o&&l!=="end"&&(r.generated.line=e,r.generated.column=t-1,o.source&&o.source.start?(r.source=this.sourcePath(o),r.original.line=o.source.start.line,r.original.column=o.source.start.column-1,this.map.addMapping(r)):(r.source=s,r.original.line=1,r.original.column=0,this.map.addMapping(r))),i=a.match(/\n/g),i?(e+=i.length,n=a.lastIndexOf(`
52
+ `),t=a.length-n):t+=a.length,o&&l!=="start"){let c=o.parent||{raws:{}};(!(o.type==="decl"||o.type==="atrule"&&!o.nodes)||o!==c.last||c.raws.semicolon)&&(o.source&&o.source.end?(r.source=this.sourcePath(o),r.original.line=o.source.end.line,r.original.column=o.source.end.column-1,r.generated.line=e,r.generated.column=t-2,this.map.addMapping(r)):(r.source=s,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 s=this.opts.to?pe(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(s=pe(mi(s,this.mapOpts.annotation)));let r=fi(s,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 bl(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 s=t.source.input.from;if(s&&!e[s]){e[s]=!0;let r=this.usesFileUrls?this.toFileUrl(s):this.toUrl(this.path(s));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(yi){let s=yi(e).toString();return this.memoizedFileURLs.set(e,s),s}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;gi==="\\"&&(e=e.replace(/\\/g,"/"));let s=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,s),s}};let Cl=oe,bs=class extends Cl{constructor(e){super(e),this.type="comment"}};var de=bs;bs.default=bs;let{isClean:vi,my:bi}=Nt,Si=ae,xi=de,El=oe,Ci,Ss,xs,Ei;function Mi(e){return e.map(t=>(t.nodes&&(t.nodes=Mi(t.nodes)),delete t.source,t))}function Ni(e){if(e[vi]=!1,e.proxyOf.nodes)for(let t of e.proxyOf.nodes)Ni(t)}let K=class _n extends El{append(...t){for(let s of t){let r=this.normalize(s,this.last);for(let i of r)this.proxyOf.nodes.push(i)}return this.markDirty(),this}cleanRaws(t){if(super.cleanRaws(t),this.nodes)for(let s of this.nodes)s.cleanRaws(t)}each(t){if(!this.proxyOf.nodes)return;let s=this.getIterator(),r,i;for(;this.indexes[s]<this.proxyOf.nodes.length&&(r=this.indexes[s],i=t(this.proxyOf.nodes[r],r),i!==!1);)this.indexes[s]+=1;return delete this.indexes[s],i}every(t){return this.nodes.every(t)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let t=this.lastEach;return this.indexes[t]=0,t}getProxyProcessor(){return{get(t,s){return s==="proxyOf"?t:t[s]?s==="each"||typeof s=="string"&&s.startsWith("walk")?(...r)=>t[s](...r.map(i=>typeof i=="function"?(n,a)=>i(n.toProxy(),a):i)):s==="every"||s==="some"?r=>t[s]((i,...n)=>r(i.toProxy(),...n)):s==="root"?()=>t.root().toProxy():s==="nodes"?t.nodes.map(r=>r.toProxy()):s==="first"||s==="last"?t[s].toProxy():t[s]:t[s]},set(t,s,r){return t[s]===r||(t[s]=r,(s==="name"||s==="params"||s==="selector")&&t.markDirty()),!0}}}index(t){return typeof t=="number"?t:(t.proxyOf&&(t=t.proxyOf),this.proxyOf.nodes.indexOf(t))}insertAfter(t,s){let r=this.index(t),i=this.normalize(s,this.proxyOf.nodes[r]).reverse();r=this.index(t);for(let a of i)this.proxyOf.nodes.splice(r+1,0,a);let n;for(let a in this.indexes)n=this.indexes[a],r<n&&(this.indexes[a]=n+i.length);return this.markDirty(),this}insertBefore(t,s){let r=this.index(t),i=r===0?"prepend":!1,n=this.normalize(s,this.proxyOf.nodes[r],i).reverse();r=this.index(t);for(let o of n)this.proxyOf.nodes.splice(r,0,o);let a;for(let o in this.indexes)a=this.indexes[o],r<=a&&(this.indexes[o]=a+n.length);return this.markDirty(),this}normalize(t,s){if(typeof t=="string")t=Mi(Ci(t).nodes);else if(typeof t>"u")t=[];else if(Array.isArray(t)){t=t.slice(0);for(let r of t)r.parent&&r.parent.removeChild(r,"ignore")}else if(t.type==="root"&&this.type!=="document"){t=t.nodes.slice(0);for(let r of t)r.parent&&r.parent.removeChild(r,"ignore")}else if(t.type)t=[t];else if(t.prop){if(typeof t.value>"u")throw new Error("Value field is missed in node creation");typeof t.value!="string"&&(t.value=String(t.value)),t=[new Si(t)]}else if(t.selector)t=[new Ss(t)];else if(t.name)t=[new xs(t)];else if(t.text)t=[new xi(t)];else throw new Error("Unknown node type in node creation");return t.map(r=>(r[bi]||_n.rebuild(r),r=r.proxyOf,r.parent&&r.parent.removeChild(r),r[vi]&&Ni(r),typeof r.raws.before>"u"&&s&&typeof s.raws.before<"u"&&(r.raws.before=s.raws.before.replace(/\S/g,"")),r.parent=this.proxyOf,r))}prepend(...t){t=t.reverse();for(let s of t){let r=this.normalize(s,this.first,"prepend").reverse();for(let i of r)this.proxyOf.nodes.unshift(i);for(let i in this.indexes)this.indexes[i]=this.indexes[i]+r.length}return this.markDirty(),this}push(t){return t.parent=this,this.proxyOf.nodes.push(t),this}removeAll(){for(let t of this.proxyOf.nodes)t.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(t){t=this.index(t),this.proxyOf.nodes[t].parent=void 0,this.proxyOf.nodes.splice(t,1);let s;for(let r in this.indexes)s=this.indexes[r],s>=t&&(this.indexes[r]=s-1);return this.markDirty(),this}replaceValues(t,s,r){return r||(r=s,s={}),this.walkDecls(i=>{s.props&&!s.props.includes(i.prop)||s.fast&&!i.value.includes(s.fast)||(i.value=i.value.replace(t,r))}),this.markDirty(),this}some(t){return this.nodes.some(t)}walk(t){return this.each((s,r)=>{let i;try{i=t(s,r)}catch(n){throw s.addToError(n)}return i!==!1&&s.walk&&(i=s.walk(t)),i})}walkAtRules(t,s){return s?t instanceof RegExp?this.walk((r,i)=>{if(r.type==="atrule"&&t.test(r.name))return s(r,i)}):this.walk((r,i)=>{if(r.type==="atrule"&&r.name===t)return s(r,i)}):(s=t,this.walk((r,i)=>{if(r.type==="atrule")return s(r,i)}))}walkComments(t){return this.walk((s,r)=>{if(s.type==="comment")return t(s,r)})}walkDecls(t,s){return s?t instanceof RegExp?this.walk((r,i)=>{if(r.type==="decl"&&t.test(r.prop))return s(r,i)}):this.walk((r,i)=>{if(r.type==="decl"&&r.prop===t)return s(r,i)}):(s=t,this.walk((r,i)=>{if(r.type==="decl")return s(r,i)}))}walkRules(t,s){return s?t instanceof RegExp?this.walk((r,i)=>{if(r.type==="rule"&&t.test(r.selector))return s(r,i)}):this.walk((r,i)=>{if(r.type==="rule"&&r.selector===t)return s(r,i)}):(s=t,this.walk((r,i)=>{if(r.type==="rule")return s(r,i)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}};K.registerParse=e=>{Ci=e},K.registerRule=e=>{Ss=e},K.registerAtRule=e=>{xs=e},K.registerRoot=e=>{Ei=e};var st=K;K.default=K,K.rebuild=e=>{e.type==="atrule"?Object.setPrototypeOf(e,xs.prototype):e.type==="rule"?Object.setPrototypeOf(e,Ss.prototype):e.type==="decl"?Object.setPrototypeOf(e,Si.prototype):e.type==="comment"?Object.setPrototypeOf(e,xi.prototype):e.type==="root"&&Object.setPrototypeOf(e,Ei.prototype),e[bi]=!0,e.nodes&&e.nodes.forEach(t=>{K.rebuild(t)})};let Ml=st,Ti,ki,Tt=class extends Ml{constructor(e){super(O({type:"document"},e)),this.nodes||(this.nodes=[])}toResult(e={}){return new Ti(new ki,this,e).stringify()}};Tt.registerLazyResult=e=>{Ti=e},Tt.registerProcessor=e=>{ki=e};var Cs=Tt;Tt.default=Tt;let Oi={};var Ri=function(e){Oi[e]||(Oi[e]=!0,typeof console<"u"&&console.warn&&console.warn(e))};let Es=class{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let s=t.node.rangeBy(t);this.line=s.start.line,this.column=s.start.column,this.endLine=s.end.line,this.endColumn=s.end.column}for(let s in t)this[s]=t[s]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}};var Di=Es;Es.default=Es;let Nl=Di,Ms=class{constructor(e,t,s){this.processor=e,this.messages=[],this.root=t,this.opts=s,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 s=new Nl(e,t);return this.messages.push(s),s}warnings(){return this.messages.filter(e=>e.type==="warning")}get content(){return this.css}};var Ns=Ms;Ms.default=Ms;const Ts=39,Ai=34,fe=92,Ii=47,me=10,kt=32,ge=12,ye=9,we=13,Tl=91,kl=93,Ol=40,Rl=41,Dl=123,Al=125,Il=59,Pl=42,Ll=58,Fl=64,ve=/[\t\n\f\r "#'()/;[\\\]{}]/g,be=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,_l=/.[\r\n"'(/\\]/,Pi=/[\da-f]/i;var Ul=function(e,t={}){let s=e.css.valueOf(),r=t.ignoreErrors,i,n,a,o,l,c,h,p,u,m,v=s.length,d=0,x=[],f=[];function b(){return d}function y(U){throw e.error("Unclosed "+U,d)}function S(){return f.length===0&&d>=v}function F(U){if(f.length)return f.pop();if(d>=v)return;let Z=U?U.ignoreUnclosed:!1;switch(i=s.charCodeAt(d),i){case me:case kt:case ye:case we:case ge:{n=d;do n+=1,i=s.charCodeAt(n);while(i===kt||i===me||i===ye||i===we||i===ge);m=["space",s.slice(d,n)],d=n-1;break}case Tl:case kl:case Dl:case Al:case Ll:case Il:case Rl:{let rt=String.fromCharCode(i);m=[rt,rt,d];break}case Ol:{if(p=x.length?x.pop()[1]:"",u=s.charCodeAt(d+1),p==="url"&&u!==Ts&&u!==Ai&&u!==kt&&u!==me&&u!==ye&&u!==ge&&u!==we){n=d;do{if(c=!1,n=s.indexOf(")",n+1),n===-1)if(r||Z){n=d;break}else y("bracket");for(h=n;s.charCodeAt(h-1)===fe;)h-=1,c=!c}while(c);m=["brackets",s.slice(d,n+1),d,n],d=n}else n=s.indexOf(")",d+1),o=s.slice(d,n+1),n===-1||_l.test(o)?m=["(","(",d]:(m=["brackets",o,d,n],d=n);break}case Ts:case Ai:{a=i===Ts?"'":'"',n=d;do{if(c=!1,n=s.indexOf(a,n+1),n===-1)if(r||Z){n=d+1;break}else y("string");for(h=n;s.charCodeAt(h-1)===fe;)h-=1,c=!c}while(c);m=["string",s.slice(d,n+1),d,n],d=n;break}case Fl:{ve.lastIndex=d+1,ve.test(s),ve.lastIndex===0?n=s.length-1:n=ve.lastIndex-2,m=["at-word",s.slice(d,n+1),d,n],d=n;break}case fe:{for(n=d,l=!0;s.charCodeAt(n+1)===fe;)n+=1,l=!l;if(i=s.charCodeAt(n+1),l&&i!==Ii&&i!==kt&&i!==me&&i!==ye&&i!==we&&i!==ge&&(n+=1,Pi.test(s.charAt(n)))){for(;Pi.test(s.charAt(n+1));)n+=1;s.charCodeAt(n+1)===kt&&(n+=1)}m=["word",s.slice(d,n+1),d,n],d=n;break}default:{i===Ii&&s.charCodeAt(d+1)===Pl?(n=s.indexOf("*/",d+2)+1,n===0&&(r||Z?n=s.length:y("comment")),m=["comment",s.slice(d,n+1),d,n],d=n):(be.lastIndex=d+1,be.test(s),be.lastIndex===0?n=s.length-1:n=be.lastIndex-2,m=["word",s.slice(d,n+1),d,n],x.push(m),d=n);break}}return d++,m}function V(U){f.push(U)}return{back:V,endOfFile:S,nextToken:F,position:b}};let Li=st,Se=class extends Li{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 ks=Se;Se.default=Se,Li.registerAtRule(Se);let Fi=st,_i,Ui,lt=class extends Fi{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,s){let r=super.normalize(e);if(t){if(s==="prepend")this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let i of r)i.raws.before=t.raws.before}return r}removeChild(e,t){let s=this.index(e);return!t&&s===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[s].raws.before),super.removeChild(e)}toResult(e={}){return new _i(new Ui,this,e).stringify()}};lt.registerLazyResult=e=>{_i=e},lt.registerProcessor=e=>{Ui=e};var Ot=lt;lt.default=lt,Fi.registerRoot(lt);let Rt={comma(e){return Rt.split(e,[","],!0)},space(e){let t=[" ",`
53
+ `," "];return Rt.split(e,t)},split(e,t,s){let r=[],i="",n=!1,a=0,o=!1,l="",c=!1;for(let h of e)c?c=!1:h==="\\"?c=!0:o?h===l&&(o=!1):h==='"'||h==="'"?(o=!0,l=h):h==="("?a+=1:h===")"?a>0&&(a-=1):a===0&&t.includes(h)&&(n=!0),n?(i!==""&&r.push(i.trim()),i="",n=!1):i+=h;return(s||i!=="")&&r.push(i.trim()),r}};var Bi=Rt;Rt.default=Rt;let ji=st,Bl=Bi,xe=class extends ji{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return Bl.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,s=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(s)}};var Os=xe;xe.default=xe,ji.registerRule(xe);let jl=ae,Wl=Ul,Vl=de,zl=ks,Yl=Ot,Wi=Os;const Vi={empty:!0,space:!0};function Gl(e){for(let t=e.length-1;t>=0;t--){let s=e[t],r=s[3]||s[2];if(r)return r}}var Xl=class{constructor(e){this.input=e,this.root=new Yl,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 zl;t.name=e[1].slice(1),t.name===""&&this.unnamedAtrule(t,e),this.init(t,e[2]);let s,r,i,n=!1,a=!1,o=[],l=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),s=e[0],s==="("||s==="["?l.push(s==="("?")":"]"):s==="{"&&l.length>0?l.push("}"):s===l[l.length-1]&&l.pop(),l.length===0)if(s===";"){t.source.end=this.getPosition(e[2]),t.source.end.offset++,this.semicolon=!0;break}else if(s==="{"){a=!0;break}else if(s==="}"){if(o.length>0){for(i=o.length-1,r=o[i];r&&r[0]==="space";)r=o[--i];r&&(t.source.end=this.getPosition(r[3]||r[2]),t.source.end.offset++)}this.end(e);break}else o.push(e);else o.push(e);if(this.tokenizer.endOfFile()){n=!0;break}}t.raws.between=this.spacesAndCommentsFromEnd(o),o.length?(t.raws.afterName=this.spacesAndCommentsFromStart(o),this.raw(t,"params",o),n&&(e=o[o.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=""),a&&(t.nodes=[],this.current=t)}checkMissedSemicolon(e){let t=this.colon(e);if(t===!1)return;let s=0,r;for(let i=t-1;i>=0&&(r=e[i],!(r[0]!=="space"&&(s+=1,s===2)));i--);throw this.input.error("Missed semicolon",r[0]==="word"?r[3]+1:r[2])}colon(e){let t=0,s,r,i;for(let[n,a]of e.entries()){if(s=a,r=s[0],r==="("&&(t+=1),r===")"&&(t-=1),t===0&&r===":")if(!i)this.doubleColon(s);else{if(i[0]==="word"&&i[1]==="progid")continue;return n}i=s}return!1}comment(e){let t=new Vl;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let s=e[1].slice(2,-2);if(/^\s*$/.test(s))t.text="",t.raws.left=s,t.raws.right="";else{let r=s.match(/^(\s*)([^]*\S)(\s*)$/);t.text=r[2],t.raws.left=r[1],t.raws.right=r[3]}}createTokenizer(){this.tokenizer=Wl(this.input)}decl(e,t){let s=new jl;this.init(s,e[0][2]);let r=e[e.length-1];for(r[0]===";"&&(this.semicolon=!0,e.pop()),s.source.end=this.getPosition(r[3]||r[2]||Gl(e)),s.source.end.offset++;e[0][0]!=="word";)e.length===1&&this.unknownWord(e),s.raws.before+=e.shift()[1];for(s.source.start=this.getPosition(e[0][2]),s.prop="";e.length;){let o=e[0][0];if(o===":"||o==="space"||o==="comment")break;s.prop+=e.shift()[1]}s.raws.between="";let i;for(;e.length;)if(i=e.shift(),i[0]===":"){s.raws.between+=i[1];break}else i[0]==="word"&&/\w/.test(i[1])&&this.unknownWord([i]),s.raws.between+=i[1];(s.prop[0]==="_"||s.prop[0]==="*")&&(s.raws.before+=s.prop[0],s.prop=s.prop.slice(1));let n=[],a;for(;e.length&&(a=e[0][0],!(a!=="space"&&a!=="comment"));)n.push(e.shift());this.precheckMissedSemicolon(e);for(let o=e.length-1;o>=0;o--){if(i=e[o],i[1].toLowerCase()==="!important"){s.important=!0;let l=this.stringFrom(e,o);l=this.spacesFromEnd(e)+l,l!==" !important"&&(s.raws.important=l);break}else if(i[1].toLowerCase()==="important"){let l=e.slice(0),c="";for(let h=o;h>0;h--){let p=l[h][0];if(c.trim().indexOf("!")===0&&p!=="space")break;c=l.pop()[1]+c}c.trim().indexOf("!")===0&&(s.important=!0,s.raws.important=c,e=l)}if(i[0]!=="space"&&i[0]!=="comment")break}e.some(o=>o[0]!=="space"&&o[0]!=="comment")&&(s.raws.between+=n.map(o=>o[1]).join(""),n=[]),this.raw(s,"value",n.concat(e),t),s.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 Wi;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,s=null,r=!1,i=null,n=[],a=e[1].startsWith("--"),o=[],l=e;for(;l;){if(s=l[0],o.push(l),s==="("||s==="[")i||(i=l),n.push(s==="("?")":"]");else if(a&&r&&s==="{")i||(i=l),n.push("}");else if(n.length===0)if(s===";")if(r){this.decl(o,a);return}else break;else if(s==="{"){this.rule(o);return}else if(s==="}"){this.tokenizer.back(o.pop()),t=!0;break}else s===":"&&(r=!0);else s===n[n.length-1]&&(n.pop(),n.length===0&&(i=null));l=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),n.length>0&&this.unclosedBracket(i),t&&r){if(!a)for(;o.length&&(l=o[o.length-1][0],!(l!=="space"&&l!=="comment"));)this.tokenizer.back(o.pop());this.decl(o,a)}else this.unknownWord(o)}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,s,r){let i,n,a=s.length,o="",l=!0,c,h;for(let p=0;p<a;p+=1)i=s[p],n=i[0],n==="space"&&p===a-1&&!r?l=!1:n==="comment"?(h=s[p-1]?s[p-1][0]:"empty",c=s[p+1]?s[p+1][0]:"empty",!Vi[h]&&!Vi[c]?o.slice(-1)===","?l=!1:o+=i[1]:l=!1):o+=i[1];if(!l){let p=s.reduce((u,m)=>u+m[1],"");e.raws[t]={raw:p,value:o}}e[t]=o}rule(e){e.pop();let t=new Wi;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,s="";for(;e.length&&(t=e[e.length-1][0],!(t!=="space"&&t!=="comment"));)s=e.pop()[1]+s;return s}spacesAndCommentsFromStart(e){let t,s="";for(;e.length&&(t=e[0][0],!(t!=="space"&&t!=="comment"));)s+=e.shift()[1];return s}spacesFromEnd(e){let t,s="";for(;e.length&&(t=e[e.length-1][0],t==="space");)s=e.pop()[1]+s;return s}stringFrom(e,t){let s="";for(let r=t;r<e.length;r++)s+=e[r][1];return e.splice(t,e.length-t),s}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})}};let Zl=st,Hl=Xl,Jl=he;function Ce(e,t){let s=new Jl(e,t),r=new Hl(s);try{r.parse()}catch(i){throw i}return r.root}var Rs=Ce;Ce.default=Ce,Zl.registerParse(Ce);let{isClean:J,my:$l}=Nt,Ql=wi,Kl=ie,ql=st,tc=Cs,Rh=Ri,zi=Ns,ec=Rs,sc=Ot;const rc={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},ic={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},nc={Once:!0,postcssPlugin:!0,prepare:!0},ct=0;function Dt(e){return typeof e=="object"&&typeof e.then=="function"}function Yi(e){let t=!1,s=rc[e.type];return e.type==="decl"?t=e.prop.toLowerCase():e.type==="atrule"&&(t=e.name.toLowerCase()),t&&e.append?[s,s+"-"+t,ct,s+"Exit",s+"Exit-"+t]:t?[s,s+"-"+t,s+"Exit",s+"Exit-"+t]:e.append?[s,ct,s+"Exit"]:[s,s+"Exit"]}function Gi(e){let t;return e.type==="document"?t=["Document",ct,"DocumentExit"]:e.type==="root"?t=["Root",ct,"RootExit"]:t=Yi(e),{eventIndex:0,events:t,iterator:0,node:e,visitorIndex:0,visitors:[]}}function Ds(e){return e[J]=!1,e.nodes&&e.nodes.forEach(t=>Ds(t)),e}let As={},ht=class Un{constructor(t,s,r){this.stringified=!1,this.processed=!1;let i;if(typeof s=="object"&&s!==null&&(s.type==="root"||s.type==="document"))i=Ds(s);else if(s instanceof Un||s instanceof zi)i=Ds(s.root),s.map&&(typeof r.map>"u"&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=s.map);else{let n=ec;r.syntax&&(n=r.syntax.parse),r.parser&&(n=r.parser),n.parse&&(n=n.parse);try{i=n(s,r)}catch(a){this.processed=!0,this.error=a}i&&!i[$l]&&ql.rebuild(i)}this.result=new zi(t,i,r),this.helpers=z(O({},As),{postcss:As,result:this.result}),this.plugins=this.processor.plugins.map(n=>typeof n=="object"&&n.prepare?O(O({},n),n.prepare(this.result)):n)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(t){return this.async().catch(t)}finally(t){return this.async().then(t,t)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(t,s){let r=this.result.lastPlugin;try{s&&s.addToError(t),this.error=t,t.name==="CssSyntaxError"&&!t.plugin?(t.plugin=r.postcssPlugin,t.setMessage()):r.postcssVersion}catch(i){console&&console.error&&console.error(i)}return t}prepareVisitors(){this.listeners={};let t=(s,r,i)=>{this.listeners[r]||(this.listeners[r]=[]),this.listeners[r].push([s,i])};for(let s of this.plugins)if(typeof s=="object")for(let r in s){if(!ic[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${s.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!nc[r])if(typeof s[r]=="object")for(let i in s[r])i==="*"?t(s,r,s[r][i]):t(s,r+"-"+i.toLowerCase(),s[r][i]);else typeof s[r]=="function"&&t(s,r,s[r])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let t=0;t<this.plugins.length;t++){let s=this.plugins[t],r=this.runOnRoot(s);if(Dt(r))try{await r}catch(i){throw this.handleError(i)}}if(this.prepareVisitors(),this.hasListener){let t=this.result.root;for(;!t[J];){t[J]=!0;let s=[Gi(t)];for(;s.length>0;){let r=this.visitTick(s);if(Dt(r))try{await r}catch(i){let n=s[s.length-1].node;throw this.handleError(i,n)}}}if(this.listeners.OnceExit)for(let[s,r]of this.listeners.OnceExit){this.result.lastPlugin=s;try{if(t.type==="document"){let i=t.nodes.map(n=>r(n,this.helpers));await Promise.all(i)}else await r(t,this.helpers)}catch(i){throw this.handleError(i)}}}return this.processed=!0,this.stringify()}runOnRoot(t){this.result.lastPlugin=t;try{if(typeof t=="object"&&t.Once){if(this.result.root.type==="document"){let s=this.result.root.nodes.map(r=>t.Once(r,this.helpers));return Dt(s[0])?Promise.all(s):s}return t.Once(this.result.root,this.helpers)}else if(typeof t=="function")return t(this.result.root,this.result)}catch(s){throw this.handleError(s)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let t=this.result.opts,s=Kl;t.syntax&&(s=t.syntax.stringify),t.stringifier&&(s=t.stringifier),s.stringify&&(s=s.stringify);let r=new Ql(s,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 t of this.plugins){let s=this.runOnRoot(t);if(Dt(s))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let t=this.result.root;for(;!t[J];)t[J]=!0,this.walkSync(t);if(this.listeners.OnceExit)if(t.type==="document")for(let s of t.nodes)this.visitSync(this.listeners.OnceExit,s);else this.visitSync(this.listeners.OnceExit,t)}return this.result}then(t,s){return this.async().then(t,s)}toString(){return this.css}visitSync(t,s){for(let[r,i]of t){this.result.lastPlugin=r;let n;try{n=i(s,this.helpers)}catch(a){throw this.handleError(a,s.proxyOf)}if(s.type!=="root"&&s.type!=="document"&&!s.parent)return!0;if(Dt(n))throw this.getAsyncError()}}visitTick(t){let s=t[t.length-1],{node:r,visitors:i}=s;if(r.type!=="root"&&r.type!=="document"&&!r.parent){t.pop();return}if(i.length>0&&s.visitorIndex<i.length){let[a,o]=i[s.visitorIndex];s.visitorIndex+=1,s.visitorIndex===i.length&&(s.visitors=[],s.visitorIndex=0),this.result.lastPlugin=a;try{return o(r.toProxy(),this.helpers)}catch(l){throw this.handleError(l,r)}}if(s.iterator!==0){let a=s.iterator,o;for(;o=r.nodes[r.indexes[a]];)if(r.indexes[a]+=1,!o[J]){o[J]=!0,t.push(Gi(o));return}s.iterator=0,delete r.indexes[a]}let n=s.events;for(;s.eventIndex<n.length;){let a=n[s.eventIndex];if(s.eventIndex+=1,a===ct){r.nodes&&r.nodes.length&&(r[J]=!0,s.iterator=r.getIterator());return}else if(this.listeners[a]){s.visitors=this.listeners[a];return}}t.pop()}walkSync(t){t[J]=!0;let s=Yi(t);for(let r of s)if(r===ct)t.nodes&&t.each(i=>{i[J]||this.walkSync(i)});else{let i=this.listeners[r];if(i&&this.visitSync(i,t.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"}};ht.registerPostcss=e=>{As=e};var Xi=ht;ht.default=ht,sc.registerLazyResult(ht),tc.registerLazyResult(ht);let oc=wi,ac=ie,Dh=Ri,lc=Rs;const cc=Ns;let Is=class{constructor(e,t,s){t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=s,this._map=void 0;let r,i=ac;this.result=new cc(this._processor,r,this._opts),this.result.css=t;let n=this;Object.defineProperty(this.result,"root",{get(){return n.root}});let a=new oc(i,r,this._opts,t);if(a.isMap()){let[o,l]=a.generate();o&&(this.result.css=o),l&&(this.result.map=l)}else a.clearAnnotation(),this.result.css=a.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return this.async().then(e,t)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,t=lc;try{e=t(this._css,this._opts)}catch(s){this.error=s}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}};var hc=Is;Is.default=Is;let uc=hc,pc=Xi,dc=Cs,fc=Ot,At=class{constructor(e=[]){this.version="8.4.39",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let s of e)if(s.postcss===!0?s=s():s.postcss&&(s=s.postcss),typeof s=="object"&&Array.isArray(s.plugins))t=t.concat(s.plugins);else if(typeof s=="object"&&s.postcssPlugin)t.push(s);else if(typeof s=="function")t.push(s);else if(!(typeof s=="object"&&(s.parse||s.stringify)))throw new Error(s+" is not a PostCSS plugin");return t}process(e,t={}){return!this.plugins.length&&!t.parser&&!t.stringifier&&!t.syntax?new uc(this,e,t):new pc(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var mc=At;At.default=At,fc.registerProcessor(At),dc.registerProcessor(At);let gc=ae,yc=ci,wc=de,vc=ks,bc=he,Sc=Ot,xc=Os;function It(e,t){if(Array.isArray(e))return e.map(a=>It(a));let i=e,{inputs:s}=i,r=Pt(i,["inputs"]);if(s){t=[];for(let a of s){let o=z(O({},a),{__proto__:bc.prototype});o.map&&(o.map=z(O({},o.map),{__proto__:yc.prototype})),t.push(o)}}if(r.nodes&&(r.nodes=e.nodes.map(a=>It(a,t))),r.source){let n=r.source,{inputId:a}=n,o=Pt(n,["inputId"]);r.source=o,a!=null&&(r.source.input=t[a])}if(r.type==="root")return new Sc(r);if(r.type==="decl")return new gc(r);if(r.type==="rule")return new xc(r);if(r.type==="comment")return new wc(r);if(r.type==="atrule")return new vc(r);throw new Error("Unknown node type: "+e.type)}var Cc=It;It.default=It;let Ec=ls,Zi=ae,Mc=Xi,Nc=st,Ps=mc,Tc=ie,kc=Cc,Hi=Cs,Oc=Di,Ji=de,$i=ks,Rc=Ns,Dc=he,Ac=Rs,Ic=Bi,Qi=Os,Ki=Ot,Pc=oe;function T(...e){return e.length===1&&Array.isArray(e[0])&&(e=e[0]),new Ps(e)}T.plugin=function(e,t){let s=!1;function r(...n){console&&console.warn&&!s&&(s=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide:
54
+ https://evilmartians.com/chronicles/postcss-8-plugin-migration`),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(e+`: \u91CC\u9762 postcss.plugin \u88AB\u5F03\u7528. \u8FC1\u79FB\u6307\u5357:
55
+ https://www.w3ctech.com/topic/2226`));let a=t(...n);return a.postcssPlugin=e,a.postcssVersion=new Ps().version,a}let i;return Object.defineProperty(r,"postcss",{get(){return i||(i=r()),i}}),r.process=function(n,a,o){return T([r(o)]).process(n,a)},r},T.stringify=Tc,T.parse=Ac,T.fromJSON=kc,T.list=Ic,T.comment=e=>new Ji(e),T.atRule=e=>new $i(e),T.decl=e=>new Zi(e),T.rule=e=>new Qi(e),T.root=e=>new Ki(e),T.document=e=>new Hi(e),T.CssSyntaxError=Ec,T.Declaration=Zi,T.Container=Nc,T.Processor=Ps,T.Document=Hi,T.Comment=Ji,T.Warning=Oc,T.AtRule=$i,T.Result=Rc,T.Input=Dc,T.Rule=Qi,T.Root=Ki,T.Node=Pc,Mc.registerPostcss(T);var Lc=T;T.default=T;const P=Qa(Lc);P.stringify,P.fromJSON,P.plugin,P.parse,P.list,P.document,P.comment,P.atRule,P.rule,P.decl,P.root,P.CssSyntaxError,P.Declaration,P.Container,P.Processor,P.Document,P.Comment,P.Warning,P.AtRule,P.Result,P.Input,P.Rule,P.Root,P.Node;function Fc(e){const t={},s=/;(?![^(]*\))/g,r=/:(.+)/,i=/\/\*.*?\*\//g;return e.replace(i,"").split(s).forEach(function(n){if(n){const a=n.split(r);a.length>1&&(t[Ls(a[0].trim())]=a[1].trim())}}),t}function qi(e){const t=[];for(const s in e){const r=e[s];if(typeof r!="string")continue;const i=jc(s);t.push(`${i}: ${r};`)}return t.join(" ")}const _c=/-([a-z])/g,Uc=/^--[a-zA-Z0-9-]+$/,Ls=e=>Uc.test(e)?e:e.replace(_c,(t,s)=>s?s.toUpperCase():""),Bc=/\B([A-Z])/g,jc=e=>e.replace(Bc,"-$1").toLowerCase();class q{constructor(...t){g(this,"parentElement",null),g(this,"parentNode",null),g(this,"ownerDocument"),g(this,"firstChild",null),g(this,"lastChild",null),g(this,"previousSibling",null),g(this,"nextSibling",null),g(this,"ELEMENT_NODE",1),g(this,"TEXT_NODE",3),g(this,"nodeType"),g(this,"nodeName"),g(this,"RRNodeType")}get childNodes(){const t=[];let s=this.firstChild;for(;s;)t.push(s),s=s.nextSibling;return t}contains(t){if(t instanceof q){if(t.ownerDocument!==this.ownerDocument)return!1;if(t===this)return!0}else return!1;for(;t.parentNode;){if(t.parentNode===this)return!0;t=t.parentNode}return!1}appendChild(t){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(t,s){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(t){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}}class Fs extends q{constructor(...t){super(t),g(this,"nodeType",9),g(this,"nodeName","#document"),g(this,"compatMode","CSS1Compat"),g(this,"RRNodeType",C.Document),g(this,"textContent",null),this.ownerDocument=this}get documentElement(){return this.childNodes.find(t=>t.RRNodeType===C.Element&&t.tagName==="HTML")||null}get body(){var t;return((t=this.documentElement)==null?void 0:t.childNodes.find(s=>s.RRNodeType===C.Element&&s.tagName==="BODY"))||null}get head(){var t;return((t=this.documentElement)==null?void 0:t.childNodes.find(s=>s.RRNodeType===C.Element&&s.tagName==="HEAD"))||null}get implementation(){return this}get firstElementChild(){return this.documentElement}appendChild(t){const s=t.RRNodeType;if((s===C.Element||s===C.DocumentType)&&this.childNodes.some(i=>i.RRNodeType===s))throw new Error(`RRDomException: Failed to execute 'appendChild' on 'RRNode': Only one ${s===C.Element?"RRElement":"RRDoctype"} on RRDocument allowed.`);const r=Us(this,t);return r.parentElement=null,r}insertBefore(t,s){const r=t.RRNodeType;if((r===C.Element||r===C.DocumentType)&&this.childNodes.some(n=>n.RRNodeType===r))throw new Error(`RRDomException: Failed to execute 'insertBefore' on 'RRNode': Only one ${r===C.Element?"RRElement":"RRDoctype"} on RRDocument allowed.`);const i=nn(this,t,s);return i.parentElement=null,i}removeChild(t){return on(this,t)}open(){this.firstChild=null,this.lastChild=null}close(){}write(t){let s;if(t==='<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">'?s="-//W3C//DTD XHTML 1.0 Transitional//EN":t==='<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">'&&(s="-//W3C//DTD HTML 4.0 Transitional//EN"),s){const r=this.createDocumentType("html",s,"");this.open(),this.appendChild(r)}}createDocument(t,s,r){return new Fs}createDocumentType(t,s,r){const i=new tn(t,s,r);return i.ownerDocument=this,i}createElement(t){const s=new _s(t);return s.ownerDocument=this,s}createElementNS(t,s){return this.createElement(s)}createTextNode(t){const s=new en(t);return s.ownerDocument=this,s}createComment(t){const s=new sn(t);return s.ownerDocument=this,s}createCDATASection(t){const s=new rn(t);return s.ownerDocument=this,s}toString(){return"RRDocument"}}class tn extends q{constructor(t,s,r){super(),g(this,"nodeType",10),g(this,"RRNodeType",C.DocumentType),g(this,"name"),g(this,"publicId"),g(this,"systemId"),g(this,"textContent",null),this.name=t,this.publicId=s,this.systemId=r,this.nodeName=t}toString(){return"RRDocumentType"}}class _s extends q{constructor(t){super(),g(this,"nodeType",1),g(this,"RRNodeType",C.Element),g(this,"tagName"),g(this,"attributes",{}),g(this,"shadowRoot",null),g(this,"scrollLeft"),g(this,"scrollTop"),this.tagName=t.toUpperCase(),this.nodeName=t.toUpperCase()}get textContent(){let t="";return this.childNodes.forEach(s=>t+=s.textContent),t}set textContent(t){this.firstChild=null,this.lastChild=null,this.appendChild(this.ownerDocument.createTextNode(t))}get classList(){return new Vc(this.attributes.class,t=>{this.attributes.class=t})}get id(){return this.attributes.id||""}get className(){return this.attributes.class||""}get style(){const t=this.attributes.style?Fc(this.attributes.style):{},s=/\B([A-Z])/g;return t.setProperty=(r,i,n)=>{if(s.test(r))return;const a=Ls(r);i?t[a]=i:delete t[a],n==="important"&&(t[a]+=" !important"),this.attributes.style=qi(t)},t.removeProperty=r=>{if(s.test(r))return"";const i=Ls(r),n=t[i]||"";return delete t[i],this.attributes.style=qi(t),n},t}getAttribute(t){return this.attributes[t]||null}setAttribute(t,s){this.attributes[t]=s}setAttributeNS(t,s,r){this.setAttribute(s,r)}removeAttribute(t){delete this.attributes[t]}appendChild(t){return Us(this,t)}insertBefore(t,s){return nn(this,t,s)}removeChild(t){return on(this,t)}attachShadow(t){const s=this.ownerDocument.createElement("SHADOWROOT");return this.shadowRoot=s,s}dispatchEvent(t){return!0}toString(){let t="";for(const s in this.attributes)t+=`${s}="${this.attributes[s]}" `;return`${this.tagName} ${t}`}}class Wc extends _s{constructor(){super(...arguments),g(this,"currentTime"),g(this,"volume"),g(this,"paused"),g(this,"muted"),g(this,"playbackRate"),g(this,"loop")}attachShadow(t){throw new Error("RRDomException: Failed to execute 'attachShadow' on 'RRElement': This RRElement does not support attachShadow")}play(){this.paused=!1}pause(){this.paused=!0}}class en extends q{constructor(t){super(),g(this,"nodeType",3),g(this,"nodeName","#text"),g(this,"RRNodeType",C.Text),g(this,"data"),this.data=t}get textContent(){return this.data}set textContent(t){this.data=t}toString(){return`RRText text=${JSON.stringify(this.data)}`}}class sn extends q{constructor(t){super(),g(this,"nodeType",8),g(this,"nodeName","#comment"),g(this,"RRNodeType",C.Comment),g(this,"data"),this.data=t}get textContent(){return this.data}set textContent(t){this.data=t}toString(){return`RRComment text=${JSON.stringify(this.data)}`}}class rn extends q{constructor(t){super(),g(this,"nodeName","#cdata-section"),g(this,"nodeType",4),g(this,"RRNodeType",C.CDATA),g(this,"data"),this.data=t}get textContent(){return this.data}set textContent(t){this.data=t}toString(){return`RRCDATASection data=${JSON.stringify(this.data)}`}}class Vc{constructor(t,s){if(g(this,"onChange"),g(this,"classes",[]),g(this,"add",(...r)=>{for(const i of r){const n=String(i);this.classes.indexOf(n)>=0||this.classes.push(n)}this.onChange&&this.onChange(this.classes.join(" "))}),g(this,"remove",(...r)=>{this.classes=this.classes.filter(i=>r.indexOf(i)===-1),this.onChange&&this.onChange(this.classes.join(" "))}),t){const r=t.trim().split(/\s+/);this.classes.push(...r)}this.onChange=s}}function Us(e,t){return t.parentNode&&t.parentNode.removeChild(t),e.lastChild?(e.lastChild.nextSibling=t,t.previousSibling=e.lastChild):(e.firstChild=t,t.previousSibling=null),e.lastChild=t,t.nextSibling=null,t.parentNode=e,t.parentElement=e,t.ownerDocument=e.ownerDocument,t}function nn(e,t,s){if(!s)return Us(e,t);if(s.parentNode!==e)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 t===s||(t.parentNode&&t.parentNode.removeChild(t),t.previousSibling=s.previousSibling,s.previousSibling=t,t.nextSibling=s,t.previousSibling?t.previousSibling.nextSibling=t:e.firstChild=t,t.parentElement=e,t.parentNode=e,t.ownerDocument=e.ownerDocument),t}function on(e,t){if(t.parentNode!==e)throw new Error("Failed to execute 'removeChild' on 'RRNode': The RRNode to be removed is not a child of this RRNode.");return t.previousSibling?t.previousSibling.nextSibling=t.nextSibling:e.firstChild=t.nextSibling,t.nextSibling?t.nextSibling.previousSibling=t.previousSibling:e.lastChild=t.previousSibling,t.previousSibling=null,t.nextSibling=null,t.parentElement=null,t.parentNode=null,t}var Y=(e=>(e[e.PLACEHOLDER=0]="PLACEHOLDER",e[e.ELEMENT_NODE=1]="ELEMENT_NODE",e[e.ATTRIBUTE_NODE=2]="ATTRIBUTE_NODE",e[e.TEXT_NODE=3]="TEXT_NODE",e[e.CDATA_SECTION_NODE=4]="CDATA_SECTION_NODE",e[e.ENTITY_REFERENCE_NODE=5]="ENTITY_REFERENCE_NODE",e[e.ENTITY_NODE=6]="ENTITY_NODE",e[e.PROCESSING_INSTRUCTION_NODE=7]="PROCESSING_INSTRUCTION_NODE",e[e.COMMENT_NODE=8]="COMMENT_NODE",e[e.DOCUMENT_NODE=9]="DOCUMENT_NODE",e[e.DOCUMENT_TYPE_NODE=10]="DOCUMENT_TYPE_NODE",e[e.DOCUMENT_FRAGMENT_NODE=11]="DOCUMENT_FRAGMENT_NODE",e))(Y||{});const Bs={svg:"http://www.w3.org/2000/svg","xlink:href":"http://www.w3.org/1999/xlink",xmlns:"http://www.w3.org/2000/xmlns/"},zc={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 $=null;function Ee(e,t,s,r=t.mirror||t.ownerDocument.mirror){e=Yc(e,t,s,r),an(e,t,s,r),Gc(e,t,s)}function Yc(e,t,s,r){var i;if(s.afterAppend&&!$&&($=new WeakSet,setTimeout(()=>{$=null},0)),!js(e,t)){const n=Me(t,s.mirror,r);(i=e.parentNode)==null||i.replaceChild(n,e),e=n}switch(t.RRNodeType){case C.Document:{if(!ut(e,t,s.mirror,r)){const n=r.getMeta(t);n&&(s.mirror.removeNodeFromMap(e),e.close(),e.open(),s.mirror.add(e,n),$==null||$.add(e))}break}case C.Element:{const n=e,a=t;switch(a.tagName){case"IFRAME":{const o=e.contentDocument;if(!o)break;Ee(o,t.contentDocument,s,r);break}}a.shadowRoot&&(n.shadowRoot||n.attachShadow({mode:"open"}),an(n.shadowRoot,a.shadowRoot,s,r)),Xc(n,a,r);break}}return e}function Gc(e,t,s){var r;switch(t.RRNodeType){case C.Document:{const i=t.scrollData;i&&s.applyScroll(i,!0);break}case C.Element:{const i=e,n=t;switch(n.scrollData&&s.applyScroll(n.scrollData,!0),n.inputData&&s.applyInput(n.inputData),n.tagName){case"AUDIO":case"VIDEO":{const a=e,o=n;o.paused!==void 0&&(o.paused?a.pause():a.play()),o.muted!==void 0&&(a.muted=o.muted),o.volume!==void 0&&(a.volume=o.volume),o.currentTime!==void 0&&(a.currentTime=o.currentTime),o.playbackRate!==void 0&&(a.playbackRate=o.playbackRate),o.loop!==void 0&&(a.loop=o.loop);break}case"CANVAS":{const a=t;if(a.rr_dataURL!==null){const o=document.createElement("img");o.onload=()=>{const l=i.getContext("2d");l&&l.drawImage(o,0,0,o.width,o.height)},o.src=a.rr_dataURL}a.canvasMutations.forEach(o=>s.applyCanvas(o.event,o.mutation,e));break}case"STYLE":{const a=i.sheet;a&&t.rules.forEach(o=>s.applyStyleSheetMutation(o,a));break}}break}case C.Text:case C.Comment:case C.CDATA:{e.textContent!==t.data&&(e.textContent=t.data);break}}$!=null&&$.has(e)&&($.delete(e),(r=s.afterAppend)==null||r.call(s,e,s.mirror.getId(e)))}function Xc(e,t,s){const r=e.attributes,i=t.attributes;for(const n in i){const a=i[n],o=s.getMeta(t);if(o!=null&&o.isSVG&&Bs[n])e.setAttributeNS(Bs[n],n,a);else if(t.tagName==="CANVAS"&&n==="rr_dataURL"){const l=document.createElement("img");l.src=a,l.onload=()=>{const c=e.getContext("2d");c&&c.drawImage(l,0,0,l.width,l.height)}}else{if(t.tagName==="IFRAME"&&n==="srcdoc")continue;e.setAttribute(n,a)}}for(const{name:n}of Array.from(r))n in i||e.removeAttribute(n);t.scrollLeft&&(e.scrollLeft=t.scrollLeft),t.scrollTop&&(e.scrollTop=t.scrollTop)}function an(e,t,s,r){const i=Array.from(e.childNodes),n=t.childNodes;if(i.length===0&&n.length===0)return;let a=0,o=i.length-1,l=0,c=n.length-1,h=i[a],p=i[o],u=n[l],m=n[c],v,d;for(;a<=o&&l<=c;)if(h===void 0)h=i[++a];else if(p===void 0)p=i[--o];else if(ut(h,u,s.mirror,r))h=i[++a],u=n[++l];else if(ut(p,m,s.mirror,r))p=i[--o],m=n[--c];else if(ut(h,m,s.mirror,r)){try{e.insertBefore(h,p.nextSibling)}catch(b){console.warn(b)}h=i[++a],m=n[--c]}else if(ut(p,u,s.mirror,r)){try{e.insertBefore(p,h)}catch(b){console.warn(b)}p=i[--o],u=n[++l]}else{if(!v){v={};for(let y=a;y<=o;y++){const S=i[y];S&&s.mirror.hasNode(S)&&(v[s.mirror.getId(S)]=y)}}d=v[r.getId(u)];const b=i[d];if(d!==void 0&&b&&ut(b,u,s.mirror,r)){try{e.insertBefore(b,h)}catch(y){console.warn(y)}i[d]=void 0}else{const y=Me(u,s.mirror,r);e.nodeName==="#document"&&h&&(y.nodeType===y.DOCUMENT_TYPE_NODE&&h.nodeType===h.DOCUMENT_TYPE_NODE||y.nodeType===y.ELEMENT_NODE&&h.nodeType===h.ELEMENT_NODE)&&(e.removeChild(h),s.mirror.removeNodeFromMap(h),h=i[++a]);try{e.insertBefore(y,h||null)}catch(S){console.warn(S)}}u=n[++l]}if(a>o){const b=n[c+1];let y=null;for(b&&(y=s.mirror.getNode(r.getId(b)));l<=c;++l){const S=Me(n[l],s.mirror,r);try{e.insertBefore(S,y)}catch(F){console.warn(F)}}}else if(l>c)for(;a<=o;a++){const b=i[a];if(!(!b||b.parentNode!==e))try{e.removeChild(b),s.mirror.removeNodeFromMap(b)}catch(y){console.warn(y)}}let x=e.firstChild,f=t.firstChild;for(;x!==null&&f!==null;)Ee(x,f,s,r),x=x.nextSibling,f=f.nextSibling}function Me(e,t,s){const r=s.getId(e),i=s.getMeta(e);let n=null;if(r>-1&&(n=t.getNode(r)),n!==null&&js(n,e))return n;switch(e.RRNodeType){case C.Document:n=new Document;break;case C.DocumentType:n=document.implementation.createDocumentType(e.name,e.publicId,e.systemId);break;case C.Element:{let a=e.tagName.toLowerCase();a=zc[a]||a,i&&"isSVG"in i&&i!=null&&i.isSVG?n=document.createElementNS(Bs.svg,a):n=document.createElement(e.tagName);break}case C.Text:n=document.createTextNode(e.data);break;case C.Comment:n=document.createComment(e.data);break;case C.CDATA:n=document.createCDATASection(e.data);break}i&&t.add(n,O({},i));try{$==null||$.add(n)}catch(a){}return n}function js(e,t){return e.nodeType!==t.nodeType?!1:e.nodeType!==e.ELEMENT_NODE||e.tagName.toUpperCase()===t.tagName}function ut(e,t,s,r){const i=s.getId(e),n=r.getId(t);return i===-1||i!==n?!1:js(e,t)}class pt extends Fs{constructor(t){super(),g(this,"UNSERIALIZED_STARTING_ID",-2),g(this,"_unserializedId",this.UNSERIALIZED_STARTING_ID),g(this,"mirror",rh()),g(this,"scrollData",null),t&&(this.mirror=t)}get unserializedId(){return this._unserializedId--}createDocument(t,s,r){return new pt}createDocumentType(t,s,r){const i=new Zc(t,s,r);return i.ownerDocument=this,i}createElement(t){const s=t.toUpperCase();let r;switch(s){case"AUDIO":case"VIDEO":r=new Hc(s);break;case"IFRAME":r=new Qc(s,this.mirror);break;case"CANVAS":r=new Jc(s);break;case"STYLE":r=new $c(s);break;default:r=new Ne(s);break}return r.ownerDocument=this,r}createComment(t){const s=new qc(t);return s.ownerDocument=this,s}createCDATASection(t){const s=new th(t);return s.ownerDocument=this,s}createTextNode(t){const s=new Kc(t);return s.ownerDocument=this,s}destroyTree(){this.firstChild=null,this.lastChild=null,this.mirror.reset()}open(){super.open(),this._unserializedId=this.UNSERIALIZED_STARTING_ID}}const Zc=tn;class Ne extends _s{constructor(){super(...arguments),g(this,"inputData",null),g(this,"scrollData",null)}}class Hc extends Wc{}class Jc extends Ne{constructor(){super(...arguments),g(this,"rr_dataURL",null),g(this,"canvasMutations",[])}getContext(){return null}}class $c extends Ne{constructor(){super(...arguments),g(this,"rules",[])}}class Qc extends Ne{constructor(t,s){super(t),g(this,"contentDocument",new pt),this.contentDocument.mirror=s}}const Kc=en,qc=sn,th=rn;function eh(e){return e instanceof HTMLFormElement?"FORM":e.tagName.toUpperCase()}function ln(e,t,s,r){let i;switch(e.nodeType){case Y.DOCUMENT_NODE:r&&r.nodeName==="IFRAME"?i=r.contentDocument:(i=t,i.compatMode=e.compatMode);break;case Y.DOCUMENT_TYPE_NODE:{const a=e;i=t.createDocumentType(a.name,a.publicId,a.systemId);break}case Y.ELEMENT_NODE:{const a=e,o=eh(a);i=t.createElement(o);const l=i;for(const{name:c,value:h}of Array.from(a.attributes))l.attributes[c]=h;a.scrollLeft&&(l.scrollLeft=a.scrollLeft),a.scrollTop&&(l.scrollTop=a.scrollTop);break}case Y.TEXT_NODE:i=t.createTextNode(e.textContent||"");break;case Y.CDATA_SECTION_NODE:i=t.createCDATASection(e.data);break;case Y.COMMENT_NODE:i=t.createComment(e.textContent||"");break;case Y.DOCUMENT_FRAGMENT_NODE:i=r.attachShadow({mode:"open"});break;default:return null}let n=s.getMeta(e);return t instanceof pt&&(n||(n=cn(i,t.unserializedId),s.add(e,n)),t.mirror.add(i,O({},n))),i}function sh(e,t=$a(),s=new pt){function r(i,n){const a=ln(i,s,t,n);if(a!==null)if((n==null?void 0:n.nodeName)!=="IFRAME"&&i.nodeType!==Y.DOCUMENT_FRAGMENT_NODE&&(n==null||n.appendChild(a),a.parentNode=n,a.parentElement=n),i.nodeName==="IFRAME"){const o=i.contentDocument;o&&r(o,a)}else(i.nodeType===Y.DOCUMENT_NODE||i.nodeType===Y.ELEMENT_NODE||i.nodeType===Y.DOCUMENT_FRAGMENT_NODE)&&(i.nodeType===Y.ELEMENT_NODE&&i.shadowRoot&&r(i.shadowRoot,a),i.childNodes.forEach(o=>r(o,a)))}return r(e,null),s}function rh(){return new ih}class ih{constructor(){g(this,"idNodeMap",new Map),g(this,"nodeMetaMap",new WeakMap)}getId(t){var r;var s;return t&&(r=(s=this.getMeta(t))==null?void 0:s.id)!=null?r:-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){const s=this.getId(t);this.idNodeMap.delete(s),t.childNodes&&t.childNodes.forEach(r=>this.removeNodeFromMap(r))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,s){const r=s.id;this.idNodeMap.set(r,t),this.nodeMetaMap.set(t,s)}replace(t,s){const r=this.getNode(t);if(r){const i=this.nodeMetaMap.get(r);i&&this.nodeMetaMap.set(s,i)}this.idNodeMap.set(t,s)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function cn(e,t){switch(e.RRNodeType){case C.Document:return{id:t,type:e.RRNodeType,childNodes:[]};case C.DocumentType:{const s=e;return{id:t,type:e.RRNodeType,name:s.name,publicId:s.publicId,systemId:s.systemId}}case C.Element:return{id:t,type:e.RRNodeType,tagName:e.tagName.toLowerCase(),attributes:{},childNodes:[]};case C.Text:return{id:t,type:e.RRNodeType,textContent:e.textContent||""};case C.Comment:return{id:t,type:e.RRNodeType,textContent:e.textContent||""};case C.CDATA:return{id:t,type:e.RRNodeType,textContent:""}}}function hn(e){return{all:e=e||new Map,on:function(t,s){var r=e.get(t);r?r.push(s):e.set(t,[s])},off:function(t,s){var r=e.get(t);r&&(s?r.splice(r.indexOf(s)>>>0,1):e.set(t,[]))},emit:function(t,s){var r=e.get(t);r&&r.slice().map(function(i){i(s)}),(r=e.get("*"))&&r.slice().map(function(i){i(t,s)})}}}const nh=Object.freeze(Object.defineProperty({__proto__:null,default:hn},Symbol.toStringTag,{value:"Module"})),un=new Map;function pn(e,t){let s=un.get(e);return s||(s=new Map,un.set(e,s)),s.has(t)||s.set(t,[]),s.get(t)}function tt(e,t,s){return async r=>{if(r&&typeof r=="object"&&"rr_type"in r)if(s&&(s.isUnchanged=!1),r.rr_type==="ImageBitmap"&&"args"in r){const i=await tt(e,t,s)(r.args);return await createImageBitmap.apply(null,i)}else if("index"in r){if(s||t===null)return r;const{rr_type:i,index:n}=r;return pn(t,i)[n]}else if("args"in r){const{rr_type:i,args:n}=r,a=window[i];return new a(...await Promise.all(n.map(tt(e,t,s))))}else{if("base64"in r)return Ya(r.base64);if("src"in r){const i=e.get(r.src);if(i)return i;{const n=new Image;return n.src=r.src,e.set(r.src,n),n}}else if("data"in r&&r.rr_type==="Blob"){const i=await Promise.all(r.data.map(tt(e,t,s)));return new Blob(i,{type:r.type})}}else if(Array.isArray(r))return await Promise.all(r.map(tt(e,t,s)));return r}}async function oh({event:e,mutations:t,target:s,imageMap:r,errorHandler:i}){const n=s.getContext("2d");if(!n){i(t[0],new Error("Canvas context is null"));return}const a=t.map(async o=>Promise.all(o.args.map(tt(r,n))));(await Promise.all(a)).forEach((o,l)=>{const c=t[l];try{if(c.setter){n[c.property]=c.args[0];return}const h=n[c.property];c.property==="drawImage"&&typeof c.args[0]=="string"?(r.get(e),h.apply(n,c.args)):h.apply(n,o)}catch(h){i(c,h)}})}function ah(e,t){try{return t===ee.WebGL?e.getContext("webgl")||e.getContext("experimental-webgl"):e.getContext("webgl2")}catch(s){return null}}const lh=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject"];function ch(e,t){if(!(t!=null&&t.constructor))return;const{name:s}=t.constructor;if(!lh.includes(s))return;const r=pn(e,s);r.includes(t)||r.push(t)}async function hh({mutation:e,target:t,type:s,imageMap:r,errorHandler:i}){try{const n=ah(t,s);if(!n)return;if(e.setter){n[e.property]=e.args[0];return}const a=n[e.property],o=await Promise.all(e.args.map(tt(r,n))),l=a.apply(n,o);ch(n,l);const c=!1}catch(n){i(e,n)}}async function dn({event:e,mutation:t,target:s,imageMap:r,canvasEventMap:i,errorHandler:n}){try{const a=i.get(e)||t,o="commands"in a?a.commands:[a];if([ee.WebGL,ee.WebGL2].includes(t.type)){for(let l=0;l<o.length;l++){const c=o[l];await hh({mutation:c,type:t.type,target:s,imageMap:r,errorHandler:n})}return}await oh({event:e,mutations:o,target:s,imageMap:r,errorHandler:n})}catch(a){n(t,a)}}/*! *****************************************************************************
56
+ Copyright (c) Microsoft Corporation.
57
+
58
+ Permission to use, copy, modify, and/or distribute this software for any
59
+ purpose with or without fee is hereby granted.
60
+
61
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
62
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
63
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
64
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
65
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
66
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
67
+ PERFORMANCE OF THIS SOFTWARE.
68
+ ***************************************************************************** */function fn(e,t){var s=typeof Symbol=="function"&&e[Symbol.iterator];if(!s)return e;var r,i,n=s.call(e),a=[];try{for(;(t===void 0||t-- >0)&&!(r=n.next()).done;)a.push(r.value)}catch(o){i={error:o}}finally{try{r&&!r.done&&(s=n.return)&&s.call(n)}finally{if(i)throw i.error}}return a}var dt;(function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"})(dt||(dt={}));var mn={type:"xstate.init"};function Ws(e){return e===void 0?[]:[].concat(e)}function ft(e){return{type:"xstate.assign",assignment:e}}function gn(e,t){return typeof(e=typeof e=="string"&&t&&t[e]?t[e]:e)=="string"?{type:e}:typeof e=="function"?{type:e.name,exec:e}:e}function Te(e){return function(t){return e===t}}function yn(e){return typeof e=="string"?{type:e}:e}function wn(e,t){return{value:e,context:t,actions:[],changed:!1,matches:Te(e)}}function vn(e,t,s){var r=t,i=!1;return[e.filter(function(n){if(n.type==="xstate.assign"){i=!0;var a=Object.assign({},r);return typeof n.assignment=="function"?a=n.assignment(r,s):Object.keys(n.assignment).forEach(function(o){a[o]=typeof n.assignment[o]=="function"?n.assignment[o](r,s):n.assignment[o]}),r=a,!1}return!0}),r,i]}function bn(e,t){t===void 0&&(t={});var s=fn(vn(Ws(e.states[e.initial].entry).map(function(a){return gn(a,t.actions)}),e.context,mn),2),r=s[0],i=s[1],n={config:e,_options:t,initialState:{value:e.initial,actions:r,context:i,matches:Te(e.initial)},transition:function(a,o){var l,c,h=typeof a=="string"?{value:a,context:e.context}:a,p=h.value,u=h.context,m=yn(o),v=e.states[p];if(v.on){var d=Ws(v.on[m.type]);try{for(var x=function(W){var Ys=typeof Symbol=="function"&&Symbol.iterator,kn=Ys&&W[Ys],On=0;if(kn)return kn.call(W);if(W&&typeof W.length=="number")return{next:function(){return W&&On>=W.length&&(W=void 0),{value:W&&W[On++],done:!W}}};throw new TypeError(Ys?"Object is not iterable.":"Symbol.iterator is not defined.")}(d),f=x.next();!f.done;f=x.next()){var b=f.value;if(b===void 0)return wn(p,u);var y=typeof b=="string"?{target:b}:b,S=y.target,F=y.actions,V=F===void 0?[]:F,U=y.cond,Z=U===void 0?function(){return!0}:U,rt=S===void 0,Sh=S!=null?S:p,xh=e.states[Sh];if(Z(u,m)){var zs=fn(vn((rt?Ws(V):[].concat(v.exit,V,xh.entry).filter(function(W){return W})).map(function(W){return gn(W,n._options.actions)}),u,m),3),Nn=zs[0],Ch=zs[1],Eh=zs[2],Tn=S!=null?S:p;return{value:Tn,context:Ch,actions:Nn,changed:S!==p||Nn.length>0||Eh,matches:Te(Tn)}}}}catch(W){l={error:W}}finally{try{f&&!f.done&&(c=x.return)&&c.call(x)}finally{if(l)throw l.error}}}return wn(p,u)}};return n}var Sn=function(e,t){return e.actions.forEach(function(s){var r=s.exec;return r&&r(e.context,t)})};function xn(e){var t=e.initialState,s=dt.NotStarted,r=new Set,i={_machine:e,send:function(n){s===dt.Running&&(t=e.transition(t,n),Sn(t,yn(n)),r.forEach(function(a){return a(t)}))},subscribe:function(n){return r.add(n),n(t),{unsubscribe:function(){return r.delete(n)}}},start:function(n){if(n){var a=typeof n=="object"?n:{context:e.config.context,value:n};t={value:a.value,actions:[],context:a.context,matches:Te(a.value)}}return s=dt.Running,Sn(t,mn),i},stop:function(){return s=dt.Stopped,r.clear(),i},get state(){return t},get status(){return s}};return i}class uh{constructor(t=[],s){w(this,"timeOffset",0),w(this,"speed"),w(this,"actions"),w(this,"raf",null),w(this,"lastTimestamp"),this.actions=t,this.speed=s.speed}addAction(t){const s=this.raf===!0;if(!this.actions.length||this.actions[this.actions.length-1].delay<=t.delay)this.actions.push(t);else{const r=this.findActionIndex(t);this.actions.splice(r,0,t)}s&&(this.raf=requestAnimationFrame(this.rafCheck.bind(this)))}start(){this.timeOffset=0,this.lastTimestamp=performance.now(),this.raf=requestAnimationFrame(this.rafCheck.bind(this))}rafCheck(){const t=performance.now();for(this.timeOffset+=(t-this.lastTimestamp)*this.speed,this.lastTimestamp=t;this.actions.length;){const s=this.actions[0];if(this.timeOffset>=s.delay)this.actions.shift(),s.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(t){this.speed=t}isActive(){return this.raf!==null}findActionIndex(t){let s=0,r=this.actions.length-1;for(;s<=r;){const i=Math.floor((s+r)/2);if(this.actions[i].delay<t.delay)s=i+1;else if(this.actions[i].delay>t.delay)r=i-1;else return i+1}return s}}function Cn(e,t){if(e.type===L.IncrementalSnapshot&&e.data.source===M.MouseMove&&e.data.positions&&e.data.positions.length){const s=e.data.positions[0].timeOffset,r=e.timestamp+s;return e.delay=r-t,r-t}return e.delay=e.timestamp-t,e.delay}function ph(e,t){for(let s=e.length-1;s>=0;s--){const r=e[s];if(r.type===L.Meta&&r.timestamp<=t)return e.slice(s)}return e}function dh(e,{getCastFn:t,applyEventsSynchronously:s,emitter:r}){const i=bn({id:"player",context:e,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:ft({lastPlayedEvent:(n,a)=>a.type==="CAST_EVENT"?a.payload.event:n.lastPlayedEvent}),recordTimeOffset:ft((n,a)=>{let o=n.timeOffset;return"payload"in a&&"timeOffset"in a.payload&&(o=a.payload.timeOffset),z(O({},n),{timeOffset:o,baselineTime:n.events[0].timestamp+o})}),play(n){var a;const{timer:o,events:l,baselineTime:c,lastPlayedEvent:h}=n;o.clear();for(const v of l)Cn(v,c);const p=ph(l,c);let u=h==null?void 0:h.timestamp;(h==null?void 0:h.type)===L.IncrementalSnapshot&&h.data.source===M.MouseMove&&(u=h.timestamp+((a=h.data.positions[0])==null?void 0:a.timeOffset)),c<(u||0)&&r.emit(E.PlayBack);const m=new Array;for(const v of p)if(!(u&&u<c&&(v.timestamp<=u||v===h)))if(v.timestamp<c)m.push(v);else{const d=t(v,!1);o.addAction({doAction:()=>{d()},delay:v.delay})}s(m),r.emit(E.Flush),o.start()},pause(n){n.timer.clear()},resetLastPlayedEvent:ft(n=>z(O({},n),{lastPlayedEvent:null})),startLive:ft({baselineTime:(n,a)=>(n.timer.start(),a.type==="TO_LIVE"&&a.payload.baselineTime?a.payload.baselineTime:Date.now())}),addEvent:ft((n,a)=>{const{baselineTime:o,timer:l,events:c}=n;if(a.type==="ADD_EVENT"){const{event:h}=a.payload;Cn(h,o);let p=c.length-1;if(!c[p]||c[p].timestamp<=h.timestamp)c.push(h);else{let v=-1,d=0;for(;d<=p;){const x=Math.floor((d+p)/2);c[x].timestamp<=h.timestamp?d=x+1:p=x-1}v===-1&&(v=d),c.splice(v,0,h)}const u=h.timestamp<o,m=t(h,u);u?m():l.isActive()&&l.addAction({doAction:()=>{m()},delay:h.delay})}return z(O({},n),{events:c})})}});return xn(i)}function fh(e){const t=bn({id:"speed",context:e,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:(s,r)=>{"payload"in r&&s.timer.setSpeed(r.payload.speed)},recordSpeed:ft({normalSpeed:s=>s.timer.speed}),restoreSpeed:s=>{s.timer.setSpeed(s.normalSpeed)}}});return xn(t)}class mh{constructor(t){w(this,"mediaMap",new Map),w(this,"warn"),w(this,"service"),w(this,"speedService"),w(this,"emitter"),w(this,"getCurrentTime"),w(this,"metadataCallbackMap",new Map),this.warn=t.warn,this.service=t.service,this.speedService=t.speedService,this.emitter=t.emitter,this.getCurrentTime=t.getCurrentTime,this.emitter.on(E.Start,this.start.bind(this)),this.emitter.on(E.SkipStart,this.start.bind(this)),this.emitter.on(E.Pause,this.pause.bind(this)),this.emitter.on(E.Finish,this.pause.bind(this)),this.speedService.subscribe(()=>{this.syncAllMediaElements()})}syncAllMediaElements(t={pause:!1}){this.mediaMap.forEach((s,r)=>{this.syncTargetWithState(r),t.pause&&r.pause()})}start(){this.syncAllMediaElements()}pause(){this.syncAllMediaElements({pause:!0})}seekTo({time:t,target:s,mediaState:r}){if(r.isPlaying){const i=(t-r.lastInteractionTimeOffset)/1e3*r.playbackRate,n="duration"in s&&s.duration;if(Number.isNaN(n)){this.waitForMetadata(s);return}let a=r.currentTimeAtLastInteraction+i;s.loop&&n!==!1&&(a=a%n),s.currentTime=a}else s.pause(),s.currentTime=r.currentTimeAtLastInteraction}waitForMetadata(t){if(this.metadataCallbackMap.has(t)||!("addEventListener"in t))return;const s=()=>{this.metadataCallbackMap.delete(t);const r=this.mediaMap.get(t);r&&this.seekTo({time:this.getCurrentTime(),target:t,mediaState:r})};this.metadataCallbackMap.set(t,s),t.addEventListener("loadedmetadata",s,{once:!0})}getMediaStateFromMutation({target:t,timeOffset:s,mutation:r}){var p,u,m,v,d;const i=this.mediaMap.get(t),{type:n,playbackRate:a,currentTime:o,muted:l,volume:c,loop:h}=r;return{isPlaying:n===is.Play||n!==is.Pause&&((i==null?void 0:i.isPlaying)||t.getAttribute("autoplay")!==null),currentTimeAtLastInteraction:(p=o!=null?o:i==null?void 0:i.currentTimeAtLastInteraction)!=null?p:0,lastInteractionTimeOffset:s,playbackRate:(u=a!=null?a:i==null?void 0:i.playbackRate)!=null?u:1,volume:(m=c!=null?c:i==null?void 0:i.volume)!=null?m:1,muted:(v=l!=null?l:i==null?void 0:i.muted)!=null?v:t.getAttribute("muted")===null,loop:(d=h!=null?h:i==null?void 0:i.loop)!=null?d:t.getAttribute("loop")===null}}syncTargetWithState(t){const s=this.mediaMap.get(t);if(!s)return;const{muted:r,loop:i,volume:n,isPlaying:a}=s,o=this.service.state.matches("paused"),l=s.playbackRate*this.speedService.state.context.timer.speed;try{this.seekTo({time:this.getCurrentTime(),target:t,mediaState:s}),t.volume!==n&&(t.volume=n),t.muted=r,t.loop=i,t.playbackRate!==l&&(t.playbackRate=l),a&&!o?t.play():t.pause()}catch(c){this.warn(`Failed to replay media interactions: ${c.message||c}`)}}addMediaElements(t,s,r){if(!["AUDIO","VIDEO"].includes(t.nodeName))return;const i=t,n=r.getMeta(i);if(!n||!("attributes"in n))return;const a=this.service.state.matches("paused"),o=n.attributes;let l=!1;o.rr_mediaState?l=o.rr_mediaState==="played":l=i.getAttribute("autoplay")!==null,l&&a&&i.pause();let c=1;typeof o.rr_mediaPlaybackRate=="number"&&(c=o.rr_mediaPlaybackRate);let h=!1;typeof o.rr_mediaMuted=="boolean"?h=o.rr_mediaMuted:h=i.getAttribute("muted")!==null;let p=!1;typeof o.rr_mediaLoop=="boolean"?p=o.rr_mediaLoop:p=i.getAttribute("loop")!==null;let u=1;typeof o.rr_mediaVolume=="number"&&(u=o.rr_mediaVolume);let m=0;typeof o.rr_mediaCurrentTime=="number"&&(m=o.rr_mediaCurrentTime),this.mediaMap.set(i,{isPlaying:l,currentTimeAtLastInteraction:m,lastInteractionTimeOffset:s,playbackRate:c,volume:u,muted:h,loop:p}),this.syncTargetWithState(i)}mediaMutation({target:t,timeOffset:s,mutation:r}){this.mediaMap.set(t,this.getMediaStateFromMutation({target:t,timeOffset:s,mutation:r})),this.syncTargetWithState(t)}isSupportedMediaElement(t){return["AUDIO","VIDEO"].includes(t.nodeName)}reset(){this.mediaMap.clear()}}function gh(e=window,t=document){if("scrollBehavior"in t.documentElement.style&&e.__forceSmoothScrollPolyfill__!==!0)return;const s=e.HTMLElement||e.Element,r=468,i={scroll:e.scroll||e.scrollTo,scrollBy:e.scrollBy,elementScroll:s.prototype.scroll||l,scrollIntoView:s.prototype.scrollIntoView},n=e.performance&&e.performance.now?e.performance.now.bind(e.performance):Date.now;function a(f){const b=["MSIE ","Trident/","Edge/"];return new RegExp(b.join("|")).test(f)}const o=a(e.navigator.userAgent)?1:0;function l(f,b){this.scrollLeft=f,this.scrollTop=b}function c(f){return .5*(1-Math.cos(Math.PI*f))}function h(f){if(f===null||typeof f!="object"||f.behavior===void 0||f.behavior==="auto"||f.behavior==="instant")return!0;if(typeof f=="object"&&f.behavior==="smooth")return!1;throw new TypeError("behavior member of ScrollOptions "+f.behavior+" is not a valid value for enumeration ScrollBehavior.")}function p(f,b){if(b==="Y")return f.clientHeight+o<f.scrollHeight;if(b==="X")return f.clientWidth+o<f.scrollWidth}function u(f,b){const y=e.getComputedStyle(f,null)["overflow"+b];return y==="auto"||y==="scroll"}function m(f){const b=p(f,"Y")&&u(f,"Y"),y=p(f,"X")&&u(f,"X");return b||y}function v(f){for(;f!==t.body&&m(f)===!1;)f=f.parentNode||f.host;return f}function d(f){const b=n();let y,S,F,V=(b-f.startTime)/r;V=V>1?1:V,y=c(V),S=f.startX+(f.x-f.startX)*y,F=f.startY+(f.y-f.startY)*y,f.method.call(f.scrollable,S,F),(S!==f.x||F!==f.y)&&e.requestAnimationFrame(d.bind(e,f))}function x(f,b,y){let S,F,V,U;const Z=n();f===t.body?(S=e,F=e.scrollX||e.pageXOffset,V=e.scrollY||e.pageYOffset,U=i.scroll):(S=f,F=f.scrollLeft,V=f.scrollTop,U=l),d({scrollable:S,method:U,startTime:Z,startX:F,startY:V,x:b,y})}e.scroll=e.scrollTo=function(){if(arguments[0]!==void 0){if(h(arguments[0])===!0){i.scroll.call(e,arguments[0].left!==void 0?arguments[0].left:typeof arguments[0]!="object"?arguments[0]:e.scrollX||e.pageXOffset,arguments[0].top!==void 0?arguments[0].top:arguments[1]!==void 0?arguments[1]:e.scrollY||e.pageYOffset);return}x.call(e,t.body,arguments[0].left!==void 0?~~arguments[0].left:e.scrollX||e.pageXOffset,arguments[0].top!==void 0?~~arguments[0].top:e.scrollY||e.pageYOffset)}},e.scrollBy=function(){if(arguments[0]!==void 0){if(h(arguments[0])){i.scrollBy.call(e,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}x.call(e,t.body,~~arguments[0].left+(e.scrollX||e.pageXOffset),~~arguments[0].top+(e.scrollY||e.pageYOffset))}},s.prototype.scroll=s.prototype.scrollTo=function(){if(arguments[0]===void 0)return;if(h(arguments[0])===!0){if(typeof arguments[0]=="number"&&arguments[1]===void 0)throw new SyntaxError("Value could not be converted");i.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 f=arguments[0].left,b=arguments[0].top;x.call(this,this,typeof f>"u"?this.scrollLeft:~~f,typeof b>"u"?this.scrollTop:~~b)},s.prototype.scrollBy=function(){if(arguments[0]!==void 0){if(h(arguments[0])===!0){i.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})}},s.prototype.scrollIntoView=function(){if(h(arguments[0])===!0){i.scrollIntoView.call(this,arguments[0]===void 0?!0:arguments[0]);return}const f=v(this),b=f.getBoundingClientRect(),y=this.getBoundingClientRect();f!==t.body?(x.call(this,f,f.scrollLeft+y.left-b.left,f.scrollTop+y.top-b.top),e.getComputedStyle(f).position!=="fixed"&&e.scrollBy({left:b.left,top:b.top,behavior:"smooth"})):e.scrollBy({left:y.left,top:y.top,behavior:"smooth"})}}const yh=e=>[`.${e} { background: currentColor }`,"noscript { display: none !important; }"],wh=5*1e3,vh=hn||nh,En="[replayer]",Vs={duration:500,lineCap:"round",lineWidth:3,strokeStyle:"red"};function Mn(e){return e.type==L.IncrementalSnapshot&&(e.data.source==M.TouchMove||e.data.source==M.MouseInteraction&&e.data.type==B.TouchStart)}class bh{constructor(t,s){if(w(this,"wrapper"),w(this,"iframe"),w(this,"service"),w(this,"speedService"),w(this,"config"),w(this,"usingVirtualDom",!1),w(this,"virtualDom",new pt),w(this,"mouse"),w(this,"mouseTail",null),w(this,"tailPositions",[]),w(this,"emitter",vh()),w(this,"nextUserInteractionEvent"),w(this,"legacy_missingNodeRetryMap",{}),w(this,"cache",Hr()),w(this,"imageMap",new Map),w(this,"canvasEventMap",new Map),w(this,"mirror",Zs()),w(this,"styleMirror",new Wa),w(this,"mediaManager"),w(this,"firstFullSnapshot",null),w(this,"newDocumentQueue",[]),w(this,"mousePos",null),w(this,"touchActive",null),w(this,"lastMouseDownEvent",null),w(this,"lastHoveredRootNode"),w(this,"lastSelectionData",null),w(this,"constructedStyleMutations",[]),w(this,"adoptedStyleSheets",[]),w(this,"handleResize",o=>{this.iframe.style.display="inherit";for(const l of[this.mouseTail,this.iframe])l&&(l.setAttribute("width",String(o.width)),l.setAttribute("height",String(o.height)))}),w(this,"applyEventsSynchronously",o=>{for(const l of o){switch(l.type){case L.DomContentLoaded:case L.Load:case L.Custom:continue;case L.FullSnapshot:case L.Meta:case L.Plugin:case L.IncrementalSnapshot:break}this.getCastFn(l,!0)()}}),w(this,"getCastFn",(o,l=!1)=>{let c;switch(o.type){case L.DomContentLoaded:case L.Load:break;case L.Custom:c=()=>{this.emitter.emit(E.CustomEvent,o)};break;case L.Meta:c=()=>this.emitter.emit(E.Resize,{width:o.data.width,height:o.data.height});break;case L.FullSnapshot:c=()=>{var h;if(this.firstFullSnapshot){if(this.firstFullSnapshot===o){this.firstFullSnapshot=!0;return}}else this.firstFullSnapshot=!0;this.mediaManager.reset(),this.styleMirror.reset(),this.rebuildFullSnapshot(o,l),(h=this.iframe.contentWindow)==null||h.scrollTo(o.data.initialOffset)};break;case L.IncrementalSnapshot:c=()=>{if(this.applyIncremental(o,l),!l&&(o===this.nextUserInteractionEvent&&(this.nextUserInteractionEvent=null,this.backToNormal()),this.config.skipInactive&&!this.nextUserInteractionEvent)){for(const h of this.service.state.context.events)if(!(h.timestamp<=o.timestamp)&&this.isUserInteraction(h)){h.delay-o.delay>this.config.inactivePeriodThreshold*this.speedService.state.context.timer.speed&&(this.nextUserInteractionEvent=h);break}if(this.nextUserInteractionEvent){const h=this.nextUserInteractionEvent.delay-o.delay,p={speed:Math.min(Math.round(h/wh),this.config.maxSpeed)};this.speedService.send({type:"FAST_FORWARD",payload:p}),this.emitter.emit(E.SkipStart,p)}}};break}return()=>{c&&c();for(const p of this.config.plugins||[])p.handler&&p.handler(o,l,{replayer:this});this.service.send({type:"CAST_EVENT",payload:{event:o}});const h=this.service.state.context.events.length-1;if(!this.config.liveMode&&o===this.service.state.context.events[h]){const p=()=>{h<this.service.state.context.events.length-1||(this.backToNormal(),this.service.send("END"),this.emitter.emit(E.Finish))};let u=50;o.type===L.IncrementalSnapshot&&o.data.source===M.MouseMove&&o.data.positions.length&&(u+=Math.max(0,-o.data.positions[0].timeOffset)),setTimeout(p,u)}this.emitter.emit(E.EventCast,o)}}),!(s!=null&&s.liveMode)&&t.length<2)throw new Error("Replayer need at least 2 events.");const r={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:Vs,useVirtualDom:!0,logger:console};this.config=Object.assign({},r,s),this.handleResize=this.handleResize.bind(this),this.getCastFn=this.getCastFn.bind(this),this.applyEventsSynchronously=this.applyEventsSynchronously.bind(this),this.emitter.on(E.Resize,this.handleResize),this.setupDom();for(const o of this.config.plugins||[])o.getMirror&&o.getMirror({nodeMirror:this.mirror});this.emitter.on(E.Flush,()=>{if(this.usingVirtualDom){const o={mirror:this.mirror,applyCanvas:(l,c,h)=>{dn({event:l,mutation:c,target:h,imageMap:this.imageMap,canvasEventMap:this.canvasEventMap,errorHandler:this.warnCanvasMutationFailed.bind(this)})},applyInput:this.applyInput.bind(this),applyScroll:this.applyScroll.bind(this),applyStyleSheetMutation:(l,c)=>{l.source===M.StyleSheetRule?this.applyStyleSheetRule(l,c):l.source===M.StyleDeclaration&&this.applyStyleDeclaration(l,c)},afterAppend:(l,c)=>{for(const h of this.config.plugins||[])h.onBuild&&h.onBuild(l,{id:c,replayer:this})}};if(this.iframe.contentDocument)try{Ee(this.iframe.contentDocument,this.virtualDom,o,this.virtualDom.mirror)}catch(l){console.warn(l)}if(this.virtualDom.destroyTree(),this.usingVirtualDom=!1,Object.keys(this.legacy_missingNodeRetryMap).length)for(const l in this.legacy_missingNodeRetryMap)try{const c=this.legacy_missingNodeRetryMap[l],h=Me(c.node,this.mirror,this.virtualDom.mirror);Ee(h,c.node,o,this.virtualDom.mirror),c.node=h}catch(c){this.warn(c)}this.constructedStyleMutations.forEach(l=>{this.applyStyleSheetMutation(l)}),this.constructedStyleMutations=[],this.adoptedStyleSheets.forEach(l=>{this.applyAdoptedStyleSheet(l)}),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[o,l]=this.lastMouseDownEvent;o.dispatchEvent(l)}this.lastMouseDownEvent=null,this.lastSelectionData&&(this.applySelection(this.lastSelectionData),this.lastSelectionData=null)}),this.emitter.on(E.PlayBack,()=>{this.firstFullSnapshot=null,this.mirror.reset(),this.styleMirror.reset(),this.mediaManager.reset()});const i=new uh([],{speed:this.config.speed});this.service=dh({events:t.map(o=>s&&s.unpackFn?s.unpackFn(o):o).sort((o,l)=>o.timestamp-l.timestamp),timer:i,timeOffset:0,baselineTime:0,lastPlayedEvent:null},{getCastFn:this.getCastFn,applyEventsSynchronously:this.applyEventsSynchronously,emitter:this.emitter}),this.service.start(),this.service.subscribe(o=>{this.emitter.emit(E.StateChange,{player:o})}),this.speedService=fh({normalSpeed:-1,timer:i}),this.speedService.start(),this.speedService.subscribe(o=>{this.emitter.emit(E.StateChange,{speed:o})}),this.mediaManager=new mh({warn:this.warn.bind(this),service:this.service,speedService:this.speedService,emitter:this.emitter,getCurrentTime:this.getCurrentTime.bind(this)});const n=this.service.state.context.events.find(o=>o.type===L.Meta),a=this.service.state.context.events.find(o=>o.type===L.FullSnapshot);if(n){const{width:o,height:l}=n.data;setTimeout(()=>{this.emitter.emit(E.Resize,{width:o,height:l})},0)}a&&setTimeout(()=>{var o;this.firstFullSnapshot||(this.firstFullSnapshot=a,this.rebuildFullSnapshot(a),(o=this.iframe.contentWindow)==null||o.scrollTo(a.data.initialOffset))},1),this.service.state.context.events.find(Mn)&&this.mouse.classList.add("touch-device")}get timer(){return this.service.state.context.timer}on(t,s){return this.emitter.on(t,s),this}off(t,s){return this.emitter.off(t,s),this}setConfig(t){Object.keys(t).forEach(s=>{t[s],this.config[s]=t[s]}),this.config.skipInactive||this.backToNormal(),typeof t.speed<"u"&&this.speedService.send({type:"SET_SPEED",payload:{speed:t.speed}}),typeof t.mouseTail<"u"&&(t.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 t=this.service.state.context.events[0],s=this.service.state.context.events[this.service.state.context.events.length-1];return{startTime:t.timestamp,endTime:s.timestamp,totalTime:s.timestamp-t.timestamp}}getCurrentTime(){return this.timer.timeOffset+this.getTimeOffset()}getTimeOffset(){const{baselineTime:t,events:s}=this.service.state.context;return t-s[0].timestamp}getMirror(){return this.mirror}play(t=0){var s,r;this.service.state.matches("paused")?this.service.send({type:"PLAY",payload:{timeOffset:t}}):(this.service.send({type:"PAUSE"}),this.service.send({type:"PLAY",payload:{timeOffset:t}})),(r=(s=this.iframe.contentDocument)==null?void 0:s.getElementsByTagName("html")[0])==null||r.classList.remove("@sailfish-rrweb/rrweb-paused"),this.emitter.emit(E.Start)}pause(t){var s,r;t===void 0&&this.service.state.matches("playing")&&this.service.send({type:"PAUSE"}),typeof t=="number"&&(this.play(t),this.service.send({type:"PAUSE"})),(r=(s=this.iframe.contentDocument)==null?void 0:s.getElementsByTagName("html")[0])==null||r.classList.add("@sailfish-rrweb/rrweb-paused"),this.emitter.emit(E.Pause)}resume(t=0){this.warn("The 'resume' was deprecated in 1.0. Please use 'play' method which has the same interface."),this.play(t),this.emitter.emit(E.Resume)}destroy(){this.pause(),this.mirror.reset(),this.styleMirror.reset(),this.mediaManager.reset(),this.config.root.removeChild(this.wrapper),this.emitter.emit(E.Destroy)}startLive(t){this.service.send({type:"TO_LIVE",payload:{baselineTime:t}})}addEvent(t){const s=this.config.unpackFn?this.config.unpackFn(t):t;Mn(s)&&this.mouse.classList.add("touch-device"),Promise.resolve().then(()=>this.service.send({type:"ADD_EVENT",payload:{event:s}}))}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=Hr()}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 t=["allow-same-origin"];this.config.UNSAFE_replayCanvas&&t.push("allow-scripts"),this.iframe.style.display="none",this.iframe.setAttribute("sandbox",t.join(" ")),this.disableInteract(),this.wrapper.appendChild(this.iframe),this.iframe.contentWindow&&this.iframe.contentDocument&&(gh(this.iframe.contentWindow,this.iframe.contentDocument),Ua(this.iframe.contentWindow))}rebuildFullSnapshot(t,s=!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 r=[],i=(o,l)=>{if(this.collectIframeAndAttachDocument(r,o),this.mediaManager.isSupportedMediaElement(o)){const{events:c}=this.service.state.context;this.mediaManager.addMediaElements(o,t.timestamp-c[0].timestamp,this.mirror)}for(const c of this.config.plugins||[])c.onBuild&&c.onBuild(o,{id:l,replayer:this})};this.usingVirtualDom&&(this.virtualDom.destroyTree(),this.usingVirtualDom=!1),this.mirror.reset(),_a(t.data.node,{doc:this.iframe.contentDocument,afterAppend:i,cache:this.cache,mirror:this.mirror}),i(this.iframe.contentDocument,t.data.node.id);for(const{mutationInQueue:o,builtNode:l}of r)this.attachDocumentToIframe(o,l),this.newDocumentQueue=this.newDocumentQueue.filter(c=>c!==o);const{documentElement:n,head:a}=this.iframe.contentDocument;this.insertStyleRules(n,a),this.service.state.matches("playing")||this.iframe.contentDocument.getElementsByTagName("html")[0].classList.add("@sailfish-rrweb/rrweb-paused"),this.emitter.emit(E.FullsnapshotRebuilded,t),s||this.waitForStylesheetLoad(),this.config.UNSAFE_replayCanvas&&this.preloadAllImages()}insertStyleRules(t,s){var r;const i=yh(this.config.blockClass).concat(this.config.insertStyleRules);if(this.config.pauseAnimation&&i.push("html.rrweb-paused *, html.rrweb-paused *:before, html.rrweb-paused *:after { animation-play-state: paused !important; }"),this.usingVirtualDom){const n=this.virtualDom.createElement("style");this.virtualDom.mirror.add(n,cn(n,this.virtualDom.unserializedId)),t.insertBefore(n,s),n.rules.push({source:M.StyleSheetRule,adds:i.map((a,o)=>({rule:a,index:o}))})}else{const n=document.createElement("style");t.insertBefore(n,s);for(let a=0;a<i.length;a++)(r=n.sheet)==null||r.insertRule(i[a],a)}}attachDocumentToIframe(t,s){const r=this.usingVirtualDom?this.virtualDom.mirror:this.mirror,i=[],n=(a,o)=>{this.collectIframeAndAttachDocument(i,a);const l=r.getMeta(a);if((l==null?void 0:l.type)===k.Element&&(l==null?void 0:l.tagName.toUpperCase())==="HTML"){const{documentElement:c,head:h}=s.contentDocument;this.insertStyleRules(c,h)}if(!this.usingVirtualDom)for(const c of this.config.plugins||[])c.onBuild&&c.onBuild(a,{id:o,replayer:this})};Ct(t.node,{doc:s.contentDocument,mirror:r,hackCss:!0,skipChild:!1,afterAppend:n,cache:this.cache}),n(s.contentDocument,t.node.id);for(const{mutationInQueue:a,builtNode:o}of i)this.attachDocumentToIframe(a,o),this.newDocumentQueue=this.newDocumentQueue.filter(l=>l!==a)}collectIframeAndAttachDocument(t,s){if(ns(s,this.mirror)){const r=this.newDocumentQueue.find(i=>i.parentId===this.mirror.getId(s));r&&t.push({mutationInQueue:r,builtNode:s})}}waitForStylesheetLoad(){var t;const s=(t=this.iframe.contentDocument)==null?void 0:t.head;if(s){const r=new Set;let i,n=this.service.state;const a=()=>{n=this.service.state};this.emitter.on(E.Start,a),this.emitter.on(E.Pause,a);const o=()=>{this.emitter.off(E.Start,a),this.emitter.off(E.Pause,a)};s.querySelectorAll('link[rel="stylesheet"]').forEach(l=>{l.sheet||(r.add(l),l.addEventListener("load",()=>{r.delete(l),r.size===0&&i!==-1&&(n.matches("playing")&&this.play(this.getCurrentTime()),this.emitter.emit(E.LoadStylesheetEnd),i&&clearTimeout(i),o())}))}),r.size>0&&(this.service.send({type:"PAUSE"}),this.emitter.emit(E.LoadStylesheetStart),i=setTimeout(()=>{n.matches("playing")&&this.play(this.getCurrentTime()),i=-1,o()},this.config.loadTimeout))}}async preloadAllImages(){const t=[];for(const s of this.service.state.context.events)s.type===L.IncrementalSnapshot&&s.data.source===M.CanvasMutation&&(t.push(this.deserializeAndPreloadCanvasEvents(s.data,s)),("commands"in s.data?s.data.commands:[s.data]).forEach(r=>{this.preloadImages(r,s)}));return Promise.all(t)}preloadImages(t,s){if(t.property==="drawImage"&&typeof t.args[0]=="string"&&!this.imageMap.has(s)){const r=document.createElement("canvas"),i=r.getContext("2d"),n=i==null?void 0:i.createImageData(r.width,r.height);i==null||i.putImageData(n,0,0)}}async deserializeAndPreloadCanvasEvents(t,s){if(!this.canvasEventMap.has(s)){const r={isUnchanged:!0};if("commands"in t){const i=await Promise.all(t.commands.map(async n=>{const a=await Promise.all(n.args.map(tt(this.imageMap,null,r)));return z(O({},n),{args:a})}));r.isUnchanged===!1&&this.canvasEventMap.set(s,z(O({},t),{commands:i}))}else{const i=await Promise.all(t.args.map(tt(this.imageMap,null,r)));r.isUnchanged===!1&&this.canvasEventMap.set(s,z(O({},t),{args:i}))}}}applyIncremental(t,s){var r,i,n;const{data:a}=t;switch(a.source){case M.Mutation:{try{this.applyMutation(a,s)}catch(o){this.warn(`Exception in mutation ${o.message||o}`,a)}break}case M.Drag:case M.TouchMove:case M.MouseMove:if(s){const o=a.positions[a.positions.length-1];this.mousePos={x:o.x,y:o.y,id:o.id,debugData:a}}else a.positions.forEach(o=>{const l={doAction:()=>{this.moveAndHover(o.x,o.y,o.id,s,a)},delay:o.timeOffset+t.timestamp-this.service.state.context.baselineTime};this.timer.addAction(l)}),this.timer.addAction({doAction(){},delay:t.delay-((r=a.positions[0])==null?void 0:r.timeOffset)});break;case M.MouseInteraction:{if(a.id===-1)break;const o=new Event(Vn(B[a.type])),l=this.mirror.getNode(a.id);if(!l)return this.debugNodeNotFound(a,a.id);this.emitter.emit(E.MouseInteraction,{type:a.type,target:l});const{triggerFocus:c}=this.config;switch(a.type){case B.Blur:"blur"in l&&l.blur();break;case B.Focus:c&&l.focus&&l.focus({preventScroll:!0});break;case B.Click:case B.TouchStart:case B.TouchEnd:case B.MouseDown:case B.MouseUp:s?(a.type===B.TouchStart?this.touchActive=!0:a.type===B.TouchEnd&&(this.touchActive=!1),a.type===B.MouseDown?this.lastMouseDownEvent=[l,o]:a.type===B.MouseUp&&(this.lastMouseDownEvent=null),this.mousePos={x:a.x||0,y:a.y||0,id:a.id,debugData:a}):(a.type===B.TouchStart&&(this.tailPositions.length=0),this.moveAndHover(a.x||0,a.y||0,a.id,s,a),a.type===B.Click?(this.mouse.classList.remove("active"),this.mouse.offsetWidth,this.mouse.classList.add("active")):a.type===B.TouchStart?(this.mouse.offsetWidth,this.mouse.classList.add("touch-active")):a.type===B.TouchEnd?this.mouse.classList.remove("touch-active"):l.dispatchEvent(o));break;case B.TouchCancel:s?this.touchActive=!1:this.mouse.classList.remove("touch-active");break;default:l.dispatchEvent(o)}break}case M.Scroll:{if(a.id===-1)break;if(this.usingVirtualDom){const o=this.virtualDom.mirror.getNode(a.id);if(!o)return this.debugNodeNotFound(a,a.id);o.scrollData=a;break}this.applyScroll(a,s);break}case M.ViewportResize:this.emitter.emit(E.Resize,{width:a.width,height:a.height});break;case M.Input:{if(a.id===-1)break;if(this.usingVirtualDom){const o=this.virtualDom.mirror.getNode(a.id);if(!o)return this.debugNodeNotFound(a,a.id);o.inputData=a;break}this.applyInput(a);break}case M.MediaInteraction:{const o=this.usingVirtualDom?this.virtualDom.mirror.getNode(a.id):this.mirror.getNode(a.id);if(!o)return this.debugNodeNotFound(a,a.id);const l=o,{events:c}=this.service.state.context;this.mediaManager.mediaMutation({target:l,timeOffset:t.timestamp-c[0].timestamp,mutation:a});break}case M.StyleSheetRule:case M.StyleDeclaration:{this.usingVirtualDom?a.styleId?this.constructedStyleMutations.push(a):a.id&&((i=this.virtualDom.mirror.getNode(a.id))==null||i.rules.push(a)):this.applyStyleSheetMutation(a);break}case M.CanvasMutation:{if(!this.config.UNSAFE_replayCanvas)return;if(this.usingVirtualDom){const o=this.virtualDom.mirror.getNode(a.id);if(!o)return this.debugNodeNotFound(a,a.id);o.canvasMutations.push({event:t,mutation:a})}else{const o=this.mirror.getNode(a.id);if(!o)return this.debugNodeNotFound(a,a.id);dn({event:t,mutation:a,target:o,imageMap:this.imageMap,canvasEventMap:this.canvasEventMap,errorHandler:this.warnCanvasMutationFailed.bind(this)})}break}case M.Font:{try{const o=new FontFace(a.family,a.buffer?new Uint8Array(JSON.parse(a.fontSource)):a.fontSource,a.descriptors);(n=this.iframe.contentDocument)==null||n.fonts.add(o)}catch(o){this.warn(o)}break}case M.Selection:{if(s){this.lastSelectionData=a;break}this.applySelection(a);break}case M.AdoptedStyleSheet:{this.usingVirtualDom?this.adoptedStyleSheets.push(a):this.applyAdoptedStyleSheet(a);break}}}applyMutation(t,s){if(this.config.useVirtualDom&&!this.usingVirtualDom&&s&&(this.usingVirtualDom=!0,sh(this.iframe.contentDocument,this.mirror,this.virtualDom),Object.keys(this.legacy_missingNodeRetryMap).length))for(const c in this.legacy_missingNodeRetryMap)try{const h=this.legacy_missingNodeRetryMap[c],p=ln(h.node,this.virtualDom,this.mirror);p&&(h.node=p)}catch(h){this.warn(h)}const r=this.usingVirtualDom?this.virtualDom.mirror:this.mirror;t.removes=t.removes.filter(c=>r.getNode(c.id)?!0:(this.warnNodeNotFound(t,c.id),!1)),t.removes.forEach(c=>{var h;const p=r.getNode(c.id);if(!p)return;let u=r.getNode(c.parentId);if(!u)return this.warnNodeNotFound(t,c.parentId);if(c.isShadow&&se(u)&&(u=u.shadowRoot),r.removeNodeFromMap(p),u)try{u.removeChild(p),this.usingVirtualDom&&p.nodeName==="#text"&&u.nodeName==="STYLE"&&((h=u.rules)==null?void 0:h.length)>0&&(u.rules=[])}catch(m){if(m instanceof DOMException)this.warn("parent could not remove child in mutation",u,p,t);else throw m}});const i=O({},this.legacy_missingNodeRetryMap),n=[],a=c=>{let h=null;return c.nextId&&(h=r.getNode(c.nextId)),c.nextId!==null&&c.nextId!==void 0&&c.nextId!==-1&&!h},o=c=>{var h,p;if(!this.iframe.contentDocument)return this.warn("Looks like your replayer has been destroyed.");let u=r.getNode(c.parentId);if(!u)return c.node.type===k.Document?this.newDocumentQueue.push(c):n.push(c);c.node.isShadow&&(se(u)||u.attachShadow({mode:"open"}),u=u.shadowRoot);let m=null,v=null;if(c.previousId&&(m=r.getNode(c.previousId)),c.nextId&&(v=r.getNode(c.nextId)),a(c))return n.push(c);if(c.node.rootId&&!r.getNode(c.node.rootId))return;const d=c.node.rootId?r.getNode(c.node.rootId):this.usingVirtualDom?this.virtualDom:this.iframe.contentDocument;if(ns(u,r)){this.attachDocumentToIframe(c,u);return}const x=(y,S)=>{if(!this.usingVirtualDom)for(const F of this.config.plugins||[])F.onBuild&&F.onBuild(y,{id:S,replayer:this})},f=Ct(c.node,{doc:d,mirror:r,skipChild:!0,hackCss:!0,cache:this.cache,afterAppend:x});if(c.previousId===-1||c.nextId===-1){i[c.node.id]={node:f,mutation:c};return}const b=r.getMeta(u);if(b&&b.type===k.Element&&c.node.type===k.Text){const y=Array.isArray(u.childNodes)?u.childNodes:Array.from(u.childNodes);if(b.tagName==="textarea")for(const S of y)S.nodeType===u.TEXT_NODE&&u.removeChild(S);else if(b.tagName==="style"&&y.length===1)for(const S of y)S.nodeType===u.TEXT_NODE&&!r.hasNode(S)&&(f.textContent=S.textContent,u.removeChild(S))}else if((b==null?void 0:b.type)===k.Document){const y=u;c.node.type===k.DocumentType&&((h=y.childNodes[0])==null?void 0:h.nodeType)===Node.DOCUMENT_TYPE_NODE&&y.removeChild(y.childNodes[0]),f.nodeName==="HTML"&&y.documentElement&&y.removeChild(y.documentElement)}if(m&&m.nextSibling&&m.nextSibling.parentNode?u.insertBefore(f,m.nextSibling):v&&v.parentNode?u.contains(v)?u.insertBefore(f,v):u.insertBefore(f,null):u.appendChild(f),x(f,c.node.id),this.usingVirtualDom&&f.nodeName==="#text"&&u.nodeName==="STYLE"&&((p=u.rules)==null?void 0:p.length)>0&&(u.rules=[]),ns(f,this.mirror)){const y=this.mirror.getId(f),S=this.newDocumentQueue.find(F=>F.parentId===y);S&&(this.attachDocumentToIframe(S,f),this.newDocumentQueue=this.newDocumentQueue.filter(F=>F!==S))}(c.previousId||c.nextId)&&this.legacy_resolveMissingNode(i,u,f,c)};t.adds.forEach(c=>{o(c)});const l=Date.now();for(;n.length;){const c=Ba(n);if(n.length=0,Date.now()-l>500){this.warn("Timeout in the loop, please check the resolve tree data:",c);break}for(const h of c)r.getNode(h.value.parentId)?$r(h,p=>{o(p)}):this.debug("Drop resolve tree since there is no parent for the root node.",h)}Object.keys(i).length&&Object.assign(this.legacy_missingNodeRetryMap,i),ja(t.texts).forEach(c=>{var h;const p=r.getNode(c.id);if(!p)return t.removes.find(u=>u.id===c.id)?void 0:this.warnNodeNotFound(t,c.id);if(p.textContent=c.value,this.usingVirtualDom){const u=p.parentNode;((h=u==null?void 0:u.rules)==null?void 0:h.length)>0&&(u.rules=[])}}),t.attributes.forEach(c=>{var h;const p=r.getNode(c.id);if(!p)return t.removes.find(u=>u.id===c.id)?void 0:this.warnNodeNotFound(t,c.id);for(const u in c.attributes)if(typeof u=="string"){const m=c.attributes[u];if(m===null)p.removeAttribute(u);else if(typeof m=="string")try{if(u==="_cssText"&&(p.nodeName==="LINK"||p.nodeName==="STYLE"))try{const v=r.getMeta(p);Object.assign(v.attributes,c.attributes);const d=Ct(v,{doc:p.ownerDocument,mirror:r,skipChild:!0,hackCss:!0,cache:this.cache}),x=p.nextSibling,f=p.parentNode;if(d&&f){f.removeChild(p),f.insertBefore(d,x),r.replace(c.id,d);break}}catch(v){}if(u==="value"&&p.nodeName==="TEXTAREA"){const v=p;v.childNodes.forEach(x=>v.removeChild(x));const d=(h=p.ownerDocument)==null?void 0:h.createTextNode(m);d&&v.appendChild(d)}else p.setAttribute(u,m)}catch(v){this.warn("An error occurred may due to the checkout feature.",v)}else if(u==="style"){const v=m,d=p;for(const x in v)if(v[x]===!1)d.style.removeProperty(x);else if(v[x]instanceof Array){const f=v[x];d.style.setProperty(x,f[0],f[1])}else{const f=v[x];d.style.setProperty(x,f)}}}})}applyScroll(t,s){var r,i;const n=this.mirror.getNode(t.id);if(!n)return this.debugNodeNotFound(t,t.id);const a=this.mirror.getMeta(n);if(n===this.iframe.contentDocument)(r=this.iframe.contentWindow)==null||r.scrollTo({top:t.y,left:t.x,behavior:s?"auto":"smooth"});else if((a==null?void 0:a.type)===k.Document)(i=n.defaultView)==null||i.scrollTo({top:t.y,left:t.x,behavior:s?"auto":"smooth"});else try{n.scrollTo({top:t.y,left:t.x,behavior:s?"auto":"smooth"})}catch(o){}}applyInput(t){const s=this.mirror.getNode(t.id);if(!s)return this.debugNodeNotFound(t,t.id);try{s.checked=t.isChecked,s.value=t.text}catch(r){}}applySelection(t){try{const s=new Set,r=t.ranges.map(({start:i,startOffset:n,end:a,endOffset:o})=>{const l=this.mirror.getNode(i),c=this.mirror.getNode(a);if(!l||!c)return;const h=new Range;h.setStart(l,n),h.setEnd(c,o);const p=l.ownerDocument,u=p==null?void 0:p.getSelection();return u&&s.add(u),{range:h,selection:u}});s.forEach(i=>i.removeAllRanges()),r.forEach(i=>{var n;return i&&((n=i.selection)==null?void 0:n.addRange(i.range))})}catch(s){}}applyStyleSheetMutation(t){var s;let r=null;t.styleId?r=this.styleMirror.getStyle(t.styleId):t.id&&(r=((s=this.mirror.getNode(t.id))==null?void 0:s.sheet)||null),r&&(t.source===M.StyleSheetRule?this.applyStyleSheetRule(t,r):t.source===M.StyleDeclaration&&this.applyStyleDeclaration(t,r))}applyStyleSheetRule(t,s){var r,i,n,a;if((r=t.adds)==null||r.forEach(({rule:o,index:l})=>{try{if(Array.isArray(l)){const{positions:c,index:h}=Kr(l);Et(s.cssRules,c).insertRule(o,h)}else{const c=l===void 0?void 0:Math.min(l,s.cssRules.length);s==null||s.insertRule(o,c)}}catch(c){}}),(i=t.removes)==null||i.forEach(({index:o})=>{try{if(Array.isArray(o)){const{positions:l,index:c}=Kr(o);Et(s.cssRules,l).deleteRule(c||0)}else s==null||s.deleteRule(o)}catch(l){}}),t.replace)try{(n=s.replace)==null||n.call(s,t.replace)}catch(o){}if(t.replaceSync)try{(a=s.replaceSync)==null||a.call(s,t.replaceSync)}catch(o){}}applyStyleDeclaration(t,s){t.set&&Et(s.rules,t.index).style.setProperty(t.set.property,t.set.value,t.set.priority),t.remove&&Et(s.rules,t.index).style.removeProperty(t.remove.property)}applyAdoptedStyleSheet(t){var s;const r=this.mirror.getNode(t.id);if(!r)return;(s=t.styles)==null||s.forEach(o=>{var l;let c=null,h=null;if(se(r)?h=((l=r.ownerDocument)==null?void 0:l.defaultView)||null:r.nodeName==="#document"&&(h=r.defaultView),!!h)try{c=new h.CSSStyleSheet,this.styleMirror.add(c,o.styleId),this.applyStyleSheetRule({source:M.StyleSheetRule,adds:o.rules},c)}catch(p){}});const i=10;let n=0;const a=(o,l)=>{const c=l.map(h=>this.styleMirror.getStyle(h)).filter(h=>h!==null);se(o)?o.shadowRoot.adoptedStyleSheets=c:o.nodeName==="#document"&&(o.adoptedStyleSheets=c),c.length!==l.length&&n<i&&(setTimeout(()=>a(o,l),0+100*n),n++)};a(r,t.styleIds)}legacy_resolveMissingNode(t,s,r,i){const{previousId:n,nextId:a}=i,o=n&&t[n],l=a&&t[a];if(o){const{node:c,mutation:h}=o;s.insertBefore(c,r),delete t[h.node.id],delete this.legacy_missingNodeRetryMap[h.node.id],(h.previousId||h.nextId)&&this.legacy_resolveMissingNode(t,s,c,h)}if(l){const{node:c,mutation:h}=l;s.insertBefore(c,r.nextSibling),delete t[h.node.id],delete this.legacy_missingNodeRetryMap[h.node.id],(h.previousId||h.nextId)&&this.legacy_resolveMissingNode(t,s,c,h)}}moveAndHover(t,s,r,i,n){const a=this.mirror.getNode(r);if(!a)return this.debugNodeNotFound(n,r);const o=Qr(a,this.iframe),l=t*o.absoluteScale+o.x,c=s*o.absoluteScale+o.y;this.mouse.style.left=`${l}px`,this.mouse.style.top=`${c}px`,i||this.drawMouseTail({x:l,y:c}),this.hoverElements(a)}drawMouseTail(t){if(!this.mouseTail)return;const{lineCap:s,lineWidth:r,strokeStyle:i,duration:n}=this.config.mouseTail===!0?Vs:Object.assign({},Vs,this.config.mouseTail),a=()=>{if(!this.mouseTail)return;const o=this.mouseTail.getContext("2d");!o||!this.tailPositions.length||(o.clearRect(0,0,this.mouseTail.width,this.mouseTail.height),o.beginPath(),o.lineWidth=r,o.lineCap=s,o.strokeStyle=i,o.moveTo(this.tailPositions[0].x,this.tailPositions[0].y),this.tailPositions.forEach(l=>o.lineTo(l.x,l.y)),o.stroke())};this.tailPositions.push(t),a(),setTimeout(()=>{this.tailPositions=this.tailPositions.filter(o=>o!==t),a()},n/this.speedService.state.context.timer.speed)}hoverElements(t){var s;(s=this.lastHoveredRootNode||this.iframe.contentDocument)==null||s.querySelectorAll(".\\:hover").forEach(i=>{i.classList.remove(":hover")}),this.lastHoveredRootNode=t.getRootNode();let r=t;for(;r;)r.classList&&r.classList.add(":hover"),r=r.parentElement}isUserInteraction(t){return t.type!==L.IncrementalSnapshot?!1:t.data.source>M.Mutation&&t.data.source<=M.Input}backToNormal(){this.nextUserInteractionEvent=null,!this.speedService.state.matches("normal")&&(this.speedService.send({type:"BACK_TO_NORMAL"}),this.emitter.emit(E.SkipEnd,{speed:this.speedService.state.context.normalSpeed}))}warnNodeNotFound(t,s){this.warn(`Node with id '${s}' not found. `,t)}warnCanvasMutationFailed(t,s){this.warn("Has error on canvas update",s,"canvas mutation:",t)}debugNodeNotFound(t,s){this.debug(`Node with id '${s}' not found. `,t)}warn(...t){this.config.showWarning&&this.config.logger.warn(En,...t)}debug(...t){this.config.showDebug&&this.config.logger.log(En,...t)}}I.Replayer=bh,Object.defineProperty(I,Symbol.toStringTag,{value:"Module"})});
69
+ ;if (typeof module.exports == "object" && typeof exports == "object") {
70
+ var __cp = (to, from, except, desc) => {
71
+ if ((from && typeof from === "object") || typeof from === "function") {
72
+ for (let key of Object.getOwnPropertyNames(from)) {
73
+ if (!Object.prototype.hasOwnProperty.call(to, key) && key !== except)
74
+ Object.defineProperty(to, key, {
75
+ get: () => from[key],
76
+ enumerable: !(desc = Object.getOwnPropertyDescriptor(from, key)) || desc.enumerable,
77
+ });
78
+ }
79
+ }
80
+ return to;
81
+ };
82
+ module.exports = __cp(module.exports, exports);
83
+ }
84
+ return module.exports;
85
+ }))
86
+ //# sourceMappingURL=replay.umd.umd.cjs.map