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