@capillarytech/cap-ui-dev-tools 0.0.4 → 1.2.0
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/CAPVISION_USAGE.md +488 -0
- package/README.md +217 -40
- package/package.json +52 -8
- package/src/LibraryWatcherPlugin.js +53 -0
- package/src/capvision-recorder/adapters/WebdriverIOAdapter.js +312 -0
- package/src/capvision-recorder/assets/capvision-player.css +1 -0
- package/src/capvision-recorder/assets/capvision-player.min.js +31 -0
- package/src/capvision-recorder/assets/capvision-plugins/console-record.min.js +93 -0
- package/src/capvision-recorder/assets/capvision-plugins/console-replay.min.js +85 -0
- package/src/capvision-recorder/assets/capvision-plugins/network-record.min.js +542 -0
- package/src/capvision-recorder/assets/capvision-plugins/network-replay.min.js +434 -0
- package/src/capvision-recorder/assets/capvision.min.js +19 -0
- package/src/capvision-recorder/core/CapVisionRecorder.js +1338 -0
- package/src/capvision-recorder/core/ReportEnhancer.js +506 -0
- package/src/capvision-recorder/index.js +58 -0
- package/src/index.js +32 -5
- package/architecture.png +0 -0
- package/capillarytech-cap-ui-dev-tools-0.0.4.tgz +0 -0
|
@@ -0,0 +1,85 @@
|
|
|
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("rrwebPluginConsoleReplay", [], f);
|
|
6
|
+
} else if ("object" == typeof exports) {
|
|
7
|
+
exports["rrwebPluginConsoleReplay"] = f();
|
|
8
|
+
} else {
|
|
9
|
+
g["rrwebPluginConsoleReplay"] = f();
|
|
10
|
+
}
|
|
11
|
+
}(this, () => {
|
|
12
|
+
var exports = {};
|
|
13
|
+
var module = { exports };
|
|
14
|
+
"use strict";var ci=Object.defineProperty,pi=Object.defineProperties;var di=Object.getOwnPropertyDescriptors;var ue=Object.getOwnPropertySymbols;var ar=Object.prototype.hasOwnProperty,ur=Object.prototype.propertyIsEnumerable;var lr=(i,e,t)=>e in i?ci(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,S=(i,e)=>{for(var t in e||(e={}))ar.call(e,t)&&lr(i,t,e[t]);if(ue)for(var t of ue(e))ur.call(e,t)&&lr(i,t,e[t]);return i},E=(i,e)=>pi(i,di(e));var j=(i,e)=>{var t={};for(var r in i)ar.call(i,r)&&e.indexOf(r)<0&&(t[r]=i[r]);if(i!=null&&ue)for(var r of ue(i))e.indexOf(r)<0&&ur.call(i,r)&&(t[r]=i[r]);return t};var mi=Object.defineProperty,gi=(i,e,t)=>e in i?mi(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,wi=(i,e,t)=>gi(i,typeof e!="symbol"?e+"":e,t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var hr,yi=Object.defineProperty,Ci=(i,e,t)=>e in i?yi(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,fr=(i,e,t)=>Ci(i,typeof e!="symbol"?e+"":e,t);class bi{constructor(){fr(this,"idNodeMap",new Map),fr(this,"nodeMetaMap",new WeakMap)}getId(e){var t;if(!e)return-1;const r=(t=this.getMeta(e))==null?void 0:t.id;return r!=null?r:-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(r=>this.removeNodeFromMap(r))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){const r=t.id;this.idNodeMap.set(r,e),this.nodeMetaMap.set(e,t)}replace(e,t){const r=this.getNode(e);if(r){const s=this.nodeMetaMap.get(r);s&&this.nodeMetaMap.set(t,s)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function xi(){return new bi}function Si(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}function $i(i){if(i.__esModule)return i;var e=i.default;if(typeof e=="function"){var t=function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(i).forEach(function(r){var s=Object.getOwnPropertyDescriptor(i,r);Object.defineProperty(t,r,s.get?s:{enumerable:!0,get:function(){return i[r]}})}),t}var Tt={exports:{}},y=String,Zr=function(){return{isColorSupported:!1,reset:y,bold:y,dim:y,italic:y,underline:y,inverse:y,hidden:y,strikethrough:y,black:y,red:y,green:y,yellow:y,blue:y,magenta:y,cyan:y,white:y,gray:y,bgBlack:y,bgRed:y,bgGreen:y,bgYellow:y,bgBlue:y,bgMagenta:y,bgCyan:y,bgWhite:y}};Tt.exports=Zr();Tt.exports.createColors=Zr;var vi=Tt.exports;const Ai={},Ii=Object.freeze(Object.defineProperty({__proto__:null,default:Ai},Symbol.toStringTag,{value:"Module"})),v=$i(Ii);let cr=vi,pr=v,ht=class Jr extends Error{constructor(e,t,r,s,o,n){super(e),this.name="CssSyntaxError",this.reason=e,o&&(this.file=o),s&&(this.source=s),n&&(this.plugin=n),typeof t!="undefined"&&typeof r!="undefined"&&(typeof t=="number"?(this.line=t,this.column=r):(this.line=t.line,this.column=t.column,this.endLine=r.line,this.endColumn=r.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,Jr)}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=cr.isColorSupported),pr&&e&&(t=pr(t));let r=t.split(/\r?\n/),s=Math.max(this.line-3,0),o=Math.min(this.line+2,r.length),n=String(o).length,a,l;if(e){let{bold:u,gray:h,red:c}=cr.createColors(!0);a=p=>u(c(p)),l=p=>h(p)}else a=l=u=>u;return r.slice(s,o).map((u,h)=>{let c=s+1+h,p=" "+(" "+c).slice(-n)+" | ";if(c===this.line){let d=l(p.replace(/\d/g," "))+u.slice(0,this.column-1).replace(/[^\t]/g," ");return a(">")+l(p)+u+`
|
|
15
|
+
`+d+a("^")}return" "+l(p)+u}).join(`
|
|
16
|
+
`)}toString(){let e=this.showSourceCode();return e&&(e=`
|
|
17
|
+
|
|
18
|
+
`+e+`
|
|
19
|
+
`),this.name+": "+this.message+e}};var Wt=ht;ht.default=ht;var ne={};ne.isClean=Symbol("isClean");ne.my=Symbol("my");const dr={after:`
|
|
20
|
+
`,beforeClose:`
|
|
21
|
+
`,beforeComment:`
|
|
22
|
+
`,beforeDecl:`
|
|
23
|
+
`,beforeOpen:" ",beforeRule:`
|
|
24
|
+
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function Oi(i){return i[0].toUpperCase()+i.slice(1)}let ft=class{constructor(e){this.builder=e}atrule(e,t){let r="@"+e.name,s=e.params?this.rawValue(e,"params"):"";if(typeof e.raws.afterName!="undefined"?r+=e.raws.afterName:s&&(r+=" "),e.nodes)this.block(e,r+s);else{let o=(e.raws.between||"")+(t?";":"");this.builder(r+s+o,e)}}beforeAfter(e,t){let r;e.type==="decl"?r=this.raw(e,null,"beforeDecl"):e.type==="comment"?r=this.raw(e,null,"beforeComment"):t==="before"?r=this.raw(e,null,"beforeRule"):r=this.raw(e,null,"beforeClose");let s=e.parent,o=0;for(;s&&s.type!=="root";)o+=1,s=s.parent;if(r.includes(`
|
|
25
|
+
`)){let n=this.raw(e,null,"indent");if(n.length)for(let a=0;a<o;a++)r+=n}return r}block(e,t){let r=this.raw(e,"between","beforeOpen");this.builder(t+r+"{",e,"start");let s;e.nodes&&e.nodes.length?(this.body(e),s=this.raw(e,"after")):s=this.raw(e,"after","emptyBody"),s&&this.builder(s),this.builder("}",e,"end")}body(e){let t=e.nodes.length-1;for(;t>0&&e.nodes[t].type==="comment";)t-=1;let r=this.raw(e,"semicolon");for(let s=0;s<e.nodes.length;s++){let o=e.nodes[s],n=this.raw(o,"before");n&&this.builder(n),this.stringify(o,t!==s||r)}}comment(e){let t=this.raw(e,"left","commentLeft"),r=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+r+"*/",e)}decl(e,t){let r=this.raw(e,"between","colon"),s=e.prop+r+this.rawValue(e,"value");e.important&&(s+=e.raws.important||" !important"),t&&(s+=";"),this.builder(s,e)}document(e){this.body(e)}raw(e,t,r){let s;if(r||(r=t),t&&(s=e.raws[t],typeof s!="undefined"))return s;let o=e.parent;if(r==="before"&&(!o||o.type==="root"&&o.first===e||o&&o.type==="document"))return"";if(!o)return dr[r];let n=e.root();if(n.rawCache||(n.rawCache={}),typeof n.rawCache[r]!="undefined")return n.rawCache[r];if(r==="before"||r==="after")return this.beforeAfter(e,r);{let a="raw"+Oi(r);this[a]?s=this[a](n,e):n.walk(l=>{if(s=l.raws[t],typeof s!="undefined")return!1})}return typeof s=="undefined"&&(s=dr[r]),n.rawCache[r]=s,s}rawBeforeClose(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length>0&&typeof r.raws.after!="undefined")return t=r.raws.after,t.includes(`
|
|
26
|
+
`)&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let r;return e.walkComments(s=>{if(typeof s.raws.before!="undefined")return r=s.raws.before,r.includes(`
|
|
27
|
+
`)&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r=="undefined"?r=this.raw(t,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeDecl(e,t){let r;return e.walkDecls(s=>{if(typeof s.raws.before!="undefined")return r=s.raws.before,r.includes(`
|
|
28
|
+
`)&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r=="undefined"?r=this.raw(t,null,"beforeRule"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeOpen(e){let t;return e.walk(r=>{if(r.type!=="decl"&&(t=r.raws.between,typeof t!="undefined"))return!1}),t}rawBeforeRule(e){let t;return e.walk(r=>{if(r.nodes&&(r.parent!==e||e.first!==r)&&typeof r.raws.before!="undefined")return t=r.raws.before,t.includes(`
|
|
29
|
+
`)&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls(r=>{if(typeof r.raws.between!="undefined")return t=r.raws.between.replace(/[^\s:]/g,""),!1}),t}rawEmptyBody(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length===0&&(t=r.raws.after,typeof t!="undefined"))return!1}),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk(r=>{let s=r.parent;if(s&&s!==e&&s.parent&&s.parent===e&&typeof r.raws.before!="undefined"){let o=r.raws.before.split(`
|
|
30
|
+
`);return t=o[o.length-1],t=t.replace(/\S/g,""),!1}}),t}rawSemicolon(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length&&r.last.type==="decl"&&(t=r.raws.semicolon,typeof t!="undefined"))return!1}),t}rawValue(e,t){let r=e[t],s=e.raws[t];return s&&s.value===r?s.raw:r}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}};var Xr=ft;ft.default=ft;let Ri=Xr;function ct(i,e){new Ri(e).stringify(i)}var We=ct;ct.default=ct;let{isClean:he,my:Ei}=ne,Pi=Wt,Mi=Xr,Ni=We;function pt(i,e){let t=new i.constructor;for(let r in i){if(!Object.prototype.hasOwnProperty.call(i,r)||r==="proxyCache")continue;let s=i[r],o=typeof s;r==="parent"&&o==="object"?e&&(t[r]=e):r==="source"?t[r]=s:Array.isArray(s)?t[r]=s.map(n=>pt(n,t)):(o==="object"&&s!==null&&(s=pt(s)),t[r]=s)}return t}let dt=class{constructor(e={}){this.raws={},this[he]=!1,this[Ei]=!0;for(let t in e)if(t==="nodes"){this.nodes=[];for(let r of e[t])typeof r.clone=="function"?this.append(r.clone()):this.append(r)}else this[t]=e[t]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let t in e)this[t]=e[t];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let t=pt(this);for(let r in e)t[r]=e[r];return t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}error(e,t={}){if(this.source){let{end:r,start:s}=this.rangeBy(t);return this.source.input.error(e,{column:s.column,line:s.line},{column:r.column,line:r.line},t)}return new Pi(e)}getProxyProcessor(){return{get(e,t){return t==="proxyOf"?e:t==="root"?()=>e.root().toProxy():e[t]},set(e,t,r){return e[t]===r||(e[t]=r,(t==="prop"||t==="value"||t==="name"||t==="params"||t==="important"||t==="text")&&e.markDirty()),!0}}}markDirty(){if(this[he]){this[he]=!1;let e=this;for(;e=e.parent;)e[he]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let r=this.source.start;if(e.index)r=this.positionInside(e.index,t);else if(e.word){t=this.toString();let s=t.indexOf(e.word);s!==-1&&(r=this.positionInside(s,t))}return r}positionInside(e,t){let r=t||this.toString(),s=this.source.start.column,o=this.source.start.line;for(let n=0;n<e;n++)r[n]===`
|
|
31
|
+
`?(s=1,o+=1):s+=1;return{column:s,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},r=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:t.column+1,line:t.line};if(e.word){let s=this.toString(),o=s.indexOf(e.word);o!==-1&&(t=this.positionInside(o,s),r=this.positionInside(o+e.word.length,s))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?r={column:e.end.column,line:e.end.line}:typeof e.endIndex=="number"?r=this.positionInside(e.endIndex):e.index&&(r=this.positionInside(e.index+1));return(r.line<t.line||r.line===t.line&&r.column<=t.column)&&(r={column:t.column+1,line:t.line}),{end:r,start:t}}raw(e,t){return new Mi().raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let t=this,r=!1;for(let s of e)s===this?r=!0:r?(this.parent.insertAfter(t,s),t=s):this.parent.insertBefore(t,s);r||this.remove()}return this}root(){let e=this;for(;e.parent&&e.parent.type!=="document";)e=e.parent;return e}toJSON(e,t){let r={},s=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))r[n]=a.map(l=>typeof l=="object"&&l.toJSON?l.toJSON(null,t):l);else if(typeof a=="object"&&a.toJSON)r[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++),r[n]={end:a.end,inputId:l,start:a.start}}else r[n]=a}return s&&(r.inputs=[...t.keys()].map(n=>n.toJSON())),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=Ni){e.stringify&&(e=e.stringify);let t="";return e(this,r=>{t+=r}),t}warn(e,t,r){let s={node:this};for(let o in r)s[o]=r[o];return e.warn(t,s)}get proxyOf(){return this}};var Ve=dt;dt.default=dt;let ki=Ve,mt=class extends ki{constructor(e){e&&typeof e.value!="undefined"&&typeof e.value!="string"&&(e=E(S({},e),{value:String(e.value)})),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}};var Ge=mt;mt.default=mt;let Bi="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",Li=(i,e=21)=>(t=e)=>{let r="",s=t;for(;s--;)r+=i[Math.random()*i.length|0];return r},Fi=(i=21)=>{let e="",t=i;for(;t--;)e+=Bi[Math.random()*64|0];return e};var Ui={nanoid:Fi,customAlphabet:Li};let{SourceMapConsumer:mr,SourceMapGenerator:gr}=v,{existsSync:_i,readFileSync:zi}=v,{dirname:rt,join:Di}=v;function Ti(i){return Buffer?Buffer.from(i,"base64").toString():window.atob(i)}let gt=class{constructor(e,t){if(t.map===!1)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let r=t.map?t.map.prev:void 0,s=this.loadMap(t.from,r);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=rt(this.mapFile)),s&&(this.text=s)}consumer(){return this.consumerCache||(this.consumerCache=new mr(this.text)),this.consumerCache}decodeInline(e){let t=/^data:application\/json;charset=utf-?8;base64,/,r=/^data:application\/json;base64,/,s=/^data:application\/json;charset=utf-?8,/,o=/^data:application\/json,/;if(s.test(e)||o.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(t.test(e)||r.test(e))return Ti(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 r=e.lastIndexOf(t.pop()),s=e.indexOf("*/",r);r>-1&&s>-1&&(this.annotation=this.getAnnotationURL(e.substring(r,s)))}loadFile(e){if(this.root=rt(e),_i(e))return this.mapFile=e,zi(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 r=t(e);if(r){let s=this.loadFile(r);if(!s)throw new Error("Unable to load previous source map: "+r.toString());return s}}else{if(t instanceof mr)return gr.fromSourceMap(t).toString();if(t instanceof gr)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let r=this.annotation;return e&&(r=Di(rt(e),r)),this.loadFile(r)}}}startWith(e,t){return e?e.substr(0,t.length)===t:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};var Kr=gt;gt.default=gt;let{SourceMapConsumer:Wi,SourceMapGenerator:Vi}=v,{fileURLToPath:wr,pathToFileURL:fe}=v,{isAbsolute:wt,resolve:yt}=v,{nanoid:Gi}=Ui,st=v,yr=Wt,Yi=Kr,it=Symbol("fromOffsetCache"),ji=!!(Wi&&Vi),Cr=!!(yt&&wt),Be=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&&(!Cr||/^\w+:\/\//.test(t.from)||wt(t.from)?this.file=t.from:this.file=yt(t.from)),Cr&&ji){let r=new Yi(this.css,t);if(r.text){this.map=r;let s=r.consumer().file;!this.file&&s&&(this.file=this.mapResolve(s))}}this.file||(this.id="<input css "+Gi(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,r,s={}){let o,n,a;if(t&&typeof t=="object"){let u=t,h=r;if(typeof u.offset=="number"){let c=this.fromOffset(u.offset);t=c.line,r=c.col}else t=u.line,r=u.column;if(typeof h.offset=="number"){let c=this.fromOffset(h.offset);n=c.line,a=c.col}else n=h.line,a=h.column}else if(!r){let u=this.fromOffset(t);t=u.line,r=u.col}let l=this.origin(t,r,n,a);return l?o=new yr(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,s.plugin):o=new yr(e,n===void 0?t:{column:r,line:t},n===void 0?r:{column:a,line:n},this.css,this.file,s.plugin),o.input={column:r,endColumn:a,endLine:n,line:t,source:this.css},this.file&&(fe&&(o.input.url=fe(this.file).toString()),o.input.file=this.file),o}fromOffset(e){let t,r;if(this[it])r=this[it];else{let o=this.css.split(`
|
|
32
|
+
`);r=new Array(o.length);let n=0;for(let a=0,l=o.length;a<l;a++)r[a]=n,n+=o[a].length+1;this[it]=r}t=r[r.length-1];let s=0;if(e>=t)s=r.length-1;else{let o=r.length-2,n;for(;s<o;)if(n=s+(o-s>>1),e<r[n])o=n-1;else if(e>=r[n+1])s=n+1;else{s=n;break}}return{col:e-r[s]+1,line:s+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:yt(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,r,s){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 r=="number"&&(a=o.originalPositionFor({column:s,line:r}));let l;wt(n.source)?l=fe(n.source):l=new URL(n.source,this.map.consumer().sourceRoot||fe(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(wr)u.file=wr(l);else throw new Error("file: protocol is not available in this PostCSS build");let h=o.sourceContentFor(n.source);return h&&(u.source=h),u}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])this[t]!=null&&(e[t]=this[t]);return this.map&&(e.map=S({},this.map),e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}};var Ye=Be;Be.default=Be;st&&st.registerInput&&st.registerInput(Be);let{SourceMapConsumer:Hr,SourceMapGenerator:Pe}=v,{dirname:Me,relative:Qr,resolve:qr,sep:es}=v,{pathToFileURL:br}=v,Zi=Ye,Ji=!!(Hr&&Pe),Xi=!!(Me&&qr&&Qr&&es),Ki=class{constructor(e,t,r,s){this.stringify=e,this.mapOpts=r.map||{},this.root=t,this.opts=r,this.css=s,this.originalCSS=s,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=`
|
|
33
|
+
`;this.css.includes(`\r
|
|
34
|
+
`)&&(t=`\r
|
|
35
|
+
`),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t=this.toUrl(this.path(e.file)),r=e.root||Me(e.file),s;this.mapOpts.sourcesContent===!1?(s=new Hr(e.text),s.sourcesContent&&(s.sourcesContent=null)):s=e.consumer(),this.map.applySourceMap(s,t,this.toUrl(this.path(r)))}}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(),Xi&&Ji&&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=Pe.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new Pe({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 Pe({file:this.outputFile(),ignoreInvalidMapping:!0});let e=1,t=1,r="<no source>",s={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"&&(s.generated.line=e,s.generated.column=t-1,l.source&&l.source.start?(s.source=this.sourcePath(l),s.original.line=l.source.start.line,s.original.column=l.source.start.column-1,this.map.addMapping(s)):(s.source=r,s.original.line=1,s.original.column=0,this.map.addMapping(s))),o=a.match(/\n/g),o?(e+=o.length,n=a.lastIndexOf(`
|
|
36
|
+
`),t=a.length-n):t+=a.length,l&&u!=="start"){let h=l.parent||{raws:{}};(!(l.type==="decl"||l.type==="atrule"&&!l.nodes)||l!==h.last||h.raws.semicolon)&&(l.source&&l.source.end?(s.source=this.sourcePath(l),s.original.line=l.source.end.line,s.original.column=l.source.end.column-1,s.generated.line=e,s.generated.column=t-2,this.map.addMapping(s)):(s.source=r,s.original.line=1,s.original.column=0,s.generated.line=e,s.generated.column=t-1,this.map.addMapping(s)))}})}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 r=this.opts.to?Me(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(r=Me(qr(r,this.mapOpts.annotation)));let s=Qr(r,e);return this.memoizedPaths.set(e,s),s}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 Zi(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(t=>{if(t.source){let r=t.source.input.from;if(r&&!e[r]){e[r]=!0;let s=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(s,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(br){let r=br(e).toString();return this.memoizedFileURLs.set(e,r),r}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;es==="\\"&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}};var ts=Ki;let Hi=Ve,Ct=class extends Hi{constructor(e){super(e),this.type="comment"}};var je=Ct;Ct.default=Ct;let{isClean:rs,my:ss}=ne,is=Ge,ns=je,Qi=Ve,os,Vt,Gt,ls;function as(i){return i.map(e=>(e.nodes&&(e.nodes=as(e.nodes)),delete e.source,e))}function us(i){if(i[rs]=!1,i.proxyOf.nodes)for(let e of i.proxyOf.nodes)us(e)}let P=class hs extends Qi{append(...e){for(let t of e){let r=this.normalize(t,this.last);for(let s of r)this.proxyOf.nodes.push(s)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t=this.getIterator(),r,s;for(;this.indexes[t]<this.proxyOf.nodes.length&&(r=this.indexes[t],s=e(this.proxyOf.nodes[r],r),s!==!1);)this.indexes[t]+=1;return delete this.indexes[t],s}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get(e,t){return t==="proxyOf"?e:e[t]?t==="each"||typeof t=="string"&&t.startsWith("walk")?(...r)=>e[t](...r.map(s=>typeof s=="function"?(o,n)=>s(o.toProxy(),n):s)):t==="every"||t==="some"?r=>e[t]((s,...o)=>r(s.toProxy(),...o)):t==="root"?()=>e.root().toProxy():t==="nodes"?e.nodes.map(r=>r.toProxy()):t==="first"||t==="last"?e[t].toProxy():e[t]:e[t]},set(e,t,r){return e[t]===r||(e[t]=r,(t==="name"||t==="params"||t==="selector")&&e.markDirty()),!0}}}index(e){return typeof e=="number"?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let r=this.index(e),s=this.normalize(t,this.proxyOf.nodes[r]).reverse();r=this.index(e);for(let n of s)this.proxyOf.nodes.splice(r+1,0,n);let o;for(let n in this.indexes)o=this.indexes[n],r<o&&(this.indexes[n]=o+s.length);return this.markDirty(),this}insertBefore(e,t){let r=this.index(e),s=r===0?"prepend":!1,o=this.normalize(t,this.proxyOf.nodes[r],s).reverse();r=this.index(e);for(let a of o)this.proxyOf.nodes.splice(r,0,a);let n;for(let a in this.indexes)n=this.indexes[a],r<=n&&(this.indexes[a]=n+o.length);return this.markDirty(),this}normalize(e,t){if(typeof e=="string")e=as(os(e).nodes);else if(typeof e=="undefined")e=[];else if(Array.isArray(e)){e=e.slice(0);for(let s of e)s.parent&&s.parent.removeChild(s,"ignore")}else if(e.type==="root"&&this.type!=="document"){e=e.nodes.slice(0);for(let s of e)s.parent&&s.parent.removeChild(s,"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 is(e)]}else if(e.selector)e=[new Vt(e)];else if(e.name)e=[new Gt(e)];else if(e.text)e=[new ns(e)];else throw new Error("Unknown node type in node creation");return e.map(s=>(s[ss]||hs.rebuild(s),s=s.proxyOf,s.parent&&s.parent.removeChild(s),s[rs]&&us(s),typeof s.raws.before=="undefined"&&t&&typeof t.raws.before!="undefined"&&(s.raws.before=t.raws.before.replace(/\S/g,"")),s.parent=this.proxyOf,s))}prepend(...e){e=e.reverse();for(let t of e){let r=this.normalize(t,this.first,"prepend").reverse();for(let s of r)this.proxyOf.nodes.unshift(s);for(let s in this.indexes)this.indexes[s]=this.indexes[s]+r.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);let t;for(let r in this.indexes)t=this.indexes[r],t>=e&&(this.indexes[r]=t-1);return this.markDirty(),this}replaceValues(e,t,r){return r||(r=t,t={}),this.walkDecls(s=>{t.props&&!t.props.includes(s.prop)||t.fast&&!s.value.includes(t.fast)||(s.value=s.value.replace(e,r))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,r)=>{let s;try{s=e(t,r)}catch(o){throw t.addToError(o)}return s!==!1&&t.walk&&(s=t.walk(e)),s})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((r,s)=>{if(r.type==="atrule"&&e.test(r.name))return t(r,s)}):this.walk((r,s)=>{if(r.type==="atrule"&&r.name===e)return t(r,s)}):(t=e,this.walk((r,s)=>{if(r.type==="atrule")return t(r,s)}))}walkComments(e){return this.walk((t,r)=>{if(t.type==="comment")return e(t,r)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((r,s)=>{if(r.type==="decl"&&e.test(r.prop))return t(r,s)}):this.walk((r,s)=>{if(r.type==="decl"&&r.prop===e)return t(r,s)}):(t=e,this.walk((r,s)=>{if(r.type==="decl")return t(r,s)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((r,s)=>{if(r.type==="rule"&&e.test(r.selector))return t(r,s)}):this.walk((r,s)=>{if(r.type==="rule"&&r.selector===e)return t(r,s)}):(t=e,this.walk((r,s)=>{if(r.type==="rule")return t(r,s)}))}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]}};P.registerParse=i=>{os=i};P.registerRule=i=>{Vt=i};P.registerAtRule=i=>{Gt=i};P.registerRoot=i=>{ls=i};var L=P;P.default=P;P.rebuild=i=>{i.type==="atrule"?Object.setPrototypeOf(i,Gt.prototype):i.type==="rule"?Object.setPrototypeOf(i,Vt.prototype):i.type==="decl"?Object.setPrototypeOf(i,is.prototype):i.type==="comment"?Object.setPrototypeOf(i,ns.prototype):i.type==="root"&&Object.setPrototypeOf(i,ls.prototype),i[ss]=!0,i.nodes&&i.nodes.forEach(e=>{P.rebuild(e)})};let qi=L,fs,cs,H=class extends qi{constructor(e){super(S({type:"document"},e)),this.nodes||(this.nodes=[])}toResult(e={}){return new fs(new cs,this,e).stringify()}};H.registerLazyResult=i=>{fs=i};H.registerProcessor=i=>{cs=i};var Yt=H;H.default=H;let bt=class{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let r=t.node.rangeBy(t);this.line=r.start.line,this.column=r.start.column,this.endLine=r.end.line,this.endColumn=r.end.column}for(let r in t)this[r]=t[r]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}};var ps=bt;bt.default=bt;let en=ps,xt=class{constructor(e,t,r){this.processor=e,this.messages=[],this.root=t,this.opts=r,this.css=void 0,this.map=void 0}toString(){return this.css}warn(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let r=new en(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>e.type==="warning")}get content(){return this.css}};var jt=xt;xt.default=xt;const nt=39,xr=34,ce=92,Sr=47,pe=10,Z=32,de=12,me=9,ge=13,tn=91,rn=93,sn=40,nn=41,on=123,ln=125,an=59,un=42,hn=58,fn=64,we=/[\t\n\f\r "#'()/;[\\\]{}]/g,ye=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,cn=/.[\r\n"'(/\\]/,$r=/[\da-f]/i;var pn=function(e,t={}){let r=e.css.valueOf(),s=t.ignoreErrors,o,n,a,l,u,h,c,p,d,m,G=r.length,f=0,N=[],R=[];function Qe(){return f}function k($){throw e.error("Unclosed "+$,f)}function qe(){return R.length===0&&f>=G}function et($){if(R.length)return R.pop();if(f>=G)return;let B=$?$.ignoreUnclosed:!1;switch(o=r.charCodeAt(f),o){case pe:case Z:case me:case ge:case de:{n=f;do n+=1,o=r.charCodeAt(n);while(o===Z||o===pe||o===me||o===ge||o===de);m=["space",r.slice(f,n)],f=n-1;break}case tn:case rn:case on:case ln:case hn:case an:case nn:{let Y=String.fromCharCode(o);m=[Y,Y,f];break}case sn:{if(p=N.length?N.pop()[1]:"",d=r.charCodeAt(f+1),p==="url"&&d!==nt&&d!==xr&&d!==Z&&d!==pe&&d!==me&&d!==de&&d!==ge){n=f;do{if(h=!1,n=r.indexOf(")",n+1),n===-1)if(s||B){n=f;break}else k("bracket");for(c=n;r.charCodeAt(c-1)===ce;)c-=1,h=!h}while(h);m=["brackets",r.slice(f,n+1),f,n],f=n}else n=r.indexOf(")",f+1),l=r.slice(f,n+1),n===-1||cn.test(l)?m=["(","(",f]:(m=["brackets",l,f,n],f=n);break}case nt:case xr:{a=o===nt?"'":'"',n=f;do{if(h=!1,n=r.indexOf(a,n+1),n===-1)if(s||B){n=f+1;break}else k("string");for(c=n;r.charCodeAt(c-1)===ce;)c-=1,h=!h}while(h);m=["string",r.slice(f,n+1),f,n],f=n;break}case fn:{we.lastIndex=f+1,we.test(r),we.lastIndex===0?n=r.length-1:n=we.lastIndex-2,m=["at-word",r.slice(f,n+1),f,n],f=n;break}case ce:{for(n=f,u=!0;r.charCodeAt(n+1)===ce;)n+=1,u=!u;if(o=r.charCodeAt(n+1),u&&o!==Sr&&o!==Z&&o!==pe&&o!==me&&o!==ge&&o!==de&&(n+=1,$r.test(r.charAt(n)))){for(;$r.test(r.charAt(n+1));)n+=1;r.charCodeAt(n+1)===Z&&(n+=1)}m=["word",r.slice(f,n+1),f,n],f=n;break}default:{o===Sr&&r.charCodeAt(f+1)===un?(n=r.indexOf("*/",f+2)+1,n===0&&(s||B?n=r.length:k("comment")),m=["comment",r.slice(f,n+1),f,n],f=n):(ye.lastIndex=f+1,ye.test(r),ye.lastIndex===0?n=r.length-1:n=ye.lastIndex-2,m=["word",r.slice(f,n+1),f,n],N.push(m),f=n);break}}return f++,m}function tt($){R.push($)}return{back:tt,endOfFile:qe,nextToken:et,position:Qe}};let ds=L,Le=class extends ds{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 Zt=Le;Le.default=Le;ds.registerAtRule(Le);let ms=L,gs,ws,_=class extends ms{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,r){let s=super.normalize(e);if(t){if(r==="prepend")this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let o of s)o.raws.before=t.raws.before}return s}removeChild(e,t){let r=this.index(e);return!t&&r===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(e)}toResult(e={}){return new gs(new ws,this,e).stringify()}};_.registerLazyResult=i=>{gs=i};_.registerProcessor=i=>{ws=i};var oe=_;_.default=_;ms.registerRoot(_);let Q={comma(i){return Q.split(i,[","],!0)},space(i){let e=[" ",`
|
|
37
|
+
`," "];return Q.split(i,e)},split(i,e,t){let r=[],s="",o=!1,n=0,a=!1,l="",u=!1;for(let h of i)u?u=!1:h==="\\"?u=!0:a?h===l&&(a=!1):h==='"'||h==="'"?(a=!0,l=h):h==="("?n+=1:h===")"?n>0&&(n-=1):n===0&&e.includes(h)&&(o=!0),o?(s!==""&&r.push(s.trim()),s="",o=!1):s+=h;return(t||s!=="")&&r.push(s.trim()),r}};var ys=Q;Q.default=Q;let Cs=L,dn=ys,Fe=class extends Cs{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return dn.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,r=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(r)}};var Jt=Fe;Fe.default=Fe;Cs.registerRule(Fe);let mn=Ge,gn=pn,wn=je,yn=Zt,Cn=oe,vr=Jt;const Ar={empty:!0,space:!0};function bn(i){for(let e=i.length-1;e>=0;e--){let t=i[e],r=t[3]||t[2];if(r)return r}}let xn=class{constructor(e){this.input=e,this.root=new Cn,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 yn;t.name=e[1].slice(1),t.name===""&&this.unnamedAtrule(t,e),this.init(t,e[2]);let r,s,o,n=!1,a=!1,l=[],u=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),r=e[0],r==="("||r==="["?u.push(r==="("?")":"]"):r==="{"&&u.length>0?u.push("}"):r===u[u.length-1]&&u.pop(),u.length===0)if(r===";"){t.source.end=this.getPosition(e[2]),t.source.end.offset++,this.semicolon=!0;break}else if(r==="{"){a=!0;break}else if(r==="}"){if(l.length>0){for(o=l.length-1,s=l[o];s&&s[0]==="space";)s=l[--o];s&&(t.source.end=this.getPosition(s[3]||s[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 r=0,s;for(let o=t-1;o>=0&&(s=e[o],!(s[0]!=="space"&&(r+=1,r===2)));o--);throw this.input.error("Missed semicolon",s[0]==="word"?s[3]+1:s[2])}colon(e){let t=0,r,s,o;for(let[n,a]of e.entries()){if(r=a,s=r[0],s==="("&&(t+=1),s===")"&&(t-=1),t===0&&s===":")if(!o)this.doubleColon(r);else{if(o[0]==="word"&&o[1]==="progid")continue;return n}o=r}return!1}comment(e){let t=new wn;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let r=e[1].slice(2,-2);if(/^\s*$/.test(r))t.text="",t.raws.left=r,t.raws.right="";else{let s=r.match(/^(\s*)([^]*\S)(\s*)$/);t.text=s[2],t.raws.left=s[1],t.raws.right=s[3]}}createTokenizer(){this.tokenizer=gn(this.input)}decl(e,t){let r=new mn;this.init(r,e[0][2]);let s=e[e.length-1];for(s[0]===";"&&(this.semicolon=!0,e.pop()),r.source.end=this.getPosition(s[3]||s[2]||bn(e)),r.source.end.offset++;e[0][0]!=="word";)e.length===1&&this.unknownWord(e),r.raws.before+=e.shift()[1];for(r.source.start=this.getPosition(e[0][2]),r.prop="";e.length;){let u=e[0][0];if(u===":"||u==="space"||u==="comment")break;r.prop+=e.shift()[1]}r.raws.between="";let o;for(;e.length;)if(o=e.shift(),o[0]===":"){r.raws.between+=o[1];break}else o[0]==="word"&&/\w/.test(o[1])&&this.unknownWord([o]),r.raws.between+=o[1];(r.prop[0]==="_"||r.prop[0]==="*")&&(r.raws.before+=r.prop[0],r.prop=r.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"){r.important=!0;let h=this.stringFrom(e,u);h=this.spacesFromEnd(e)+h,h!==" !important"&&(r.raws.important=h);break}else if(o[1].toLowerCase()==="important"){let h=e.slice(0),c="";for(let p=u;p>0;p--){let d=h[p][0];if(c.trim().indexOf("!")===0&&d!=="space")break;c=h.pop()[1]+c}c.trim().indexOf("!")===0&&(r.important=!0,r.raws.important=c,e=h)}if(o[0]!=="space"&&o[0]!=="comment")break}e.some(u=>u[0]!=="space"&&u[0]!=="comment")&&(r.raws.between+=n.map(u=>u[1]).join(""),n=[]),this.raw(r,"value",n.concat(e),t),r.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new vr;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,r=null,s=!1,o=null,n=[],a=e[1].startsWith("--"),l=[],u=e;for(;u;){if(r=u[0],l.push(u),r==="("||r==="[")o||(o=u),n.push(r==="("?")":"]");else if(a&&s&&r==="{")o||(o=u),n.push("}");else if(n.length===0)if(r===";")if(s){this.decl(l,a);return}else break;else if(r==="{"){this.rule(l);return}else if(r==="}"){this.tokenizer.back(l.pop()),t=!0;break}else r===":"&&(s=!0);else r===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&&s){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,r,s){let o,n,a=r.length,l="",u=!0,h,c;for(let p=0;p<a;p+=1)o=r[p],n=o[0],n==="space"&&p===a-1&&!s?u=!1:n==="comment"?(c=r[p-1]?r[p-1][0]:"empty",h=r[p+1]?r[p+1][0]:"empty",!Ar[c]&&!Ar[h]?l.slice(-1)===","?u=!1:l+=o[1]:u=!1):l+=o[1];if(!u){let p=r.reduce((d,m)=>d+m[1],"");e.raws[t]={raw:p,value:l}}e[t]=l}rule(e){e.pop();let t=new vr;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],!(t!=="space"&&t!=="comment"));)r=e.pop()[1]+r;return r}spacesAndCommentsFromStart(e){let t,r="";for(;e.length&&(t=e[0][0],!(t!=="space"&&t!=="comment"));)r+=e.shift()[1];return r}spacesFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],t==="space");)r=e.pop()[1]+r;return r}stringFrom(e,t){let r="";for(let s=t;s<e.length;s++)r+=e[s][1];return e.splice(t,e.length-t),r}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word",{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}};var Sn=xn;let $n=L,vn=Sn,An=Ye;function Ue(i,e){let t=new An(i,e),r=new vn(t);try{r.parse()}catch(s){throw s}return r.root}var Xt=Ue;Ue.default=Ue;$n.registerParse(Ue);let{isClean:I,my:In}=ne,On=ts,Rn=We,En=L,Pn=Yt;let Ir=jt,Mn=Xt,Nn=oe;const kn={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},Bn={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},Ln={Once:!0,postcssPlugin:!0,prepare:!0},z=0;function J(i){return typeof i=="object"&&typeof i.then=="function"}function bs(i){let e=!1,t=kn[i.type];return i.type==="decl"?e=i.prop.toLowerCase():i.type==="atrule"&&(e=i.name.toLowerCase()),e&&i.append?[t,t+"-"+e,z,t+"Exit",t+"Exit-"+e]:e?[t,t+"-"+e,t+"Exit",t+"Exit-"+e]:i.append?[t,z,t+"Exit"]:[t,t+"Exit"]}function Or(i){let e;return i.type==="document"?e=["Document",z,"DocumentExit"]:i.type==="root"?e=["Root",z,"RootExit"]:e=bs(i),{eventIndex:0,events:e,iterator:0,node:i,visitorIndex:0,visitors:[]}}function St(i){return i[I]=!1,i.nodes&&i.nodes.forEach(e=>St(e)),i}let $t={},D=class xs{constructor(e,t,r){this.stringified=!1,this.processed=!1;let s;if(typeof t=="object"&&t!==null&&(t.type==="root"||t.type==="document"))s=St(t);else if(t instanceof xs||t instanceof Ir)s=St(t.root),t.map&&(typeof r.map=="undefined"&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=t.map);else{let o=Mn;r.syntax&&(o=r.syntax.parse),r.parser&&(o=r.parser),o.parse&&(o=o.parse);try{s=o(t,r)}catch(n){this.processed=!0,this.error=n}s&&!s[In]&&En.rebuild(s)}this.result=new Ir(e,s,r),this.helpers=E(S({},$t),{postcss:$t,result:this.result}),this.plugins=this.processor.plugins.map(o=>typeof o=="object"&&o.prepare?S(S({},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 r=this.result.lastPlugin;try{t&&t.addToError(e),this.error=e,e.name==="CssSyntaxError"&&!e.plugin?(e.plugin=r.postcssPlugin,e.setMessage()):r.postcssVersion}catch(s){console&&console.error&&console.error(s)}return e}prepareVisitors(){this.listeners={};let e=(t,r,s)=>{this.listeners[r]||(this.listeners[r]=[]),this.listeners[r].push([t,s])};for(let t of this.plugins)if(typeof t=="object")for(let r in t){if(!Bn[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!Ln[r])if(typeof t[r]=="object")for(let s in t[r])s==="*"?e(t,r,t[r][s]):e(t,r+"-"+s.toLowerCase(),t[r][s]);else typeof t[r]=="function"&&e(t,r,t[r])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let t=this.plugins[e],r=this.runOnRoot(t);if(J(r))try{await r}catch(s){throw this.handleError(s)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[I];){e[I]=!0;let t=[Or(e)];for(;t.length>0;){let r=this.visitTick(t);if(J(r))try{await r}catch(s){let o=t[t.length-1].node;throw this.handleError(s,o)}}}if(this.listeners.OnceExit)for(let[t,r]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if(e.type==="document"){let s=e.nodes.map(o=>r(o,this.helpers));await Promise.all(s)}else await r(e,this.helpers)}catch(s){throw this.handleError(s)}}}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(r=>e.Once(r,this.helpers));return J(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=Rn;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let s=new On(t,this.result.root,this.result.opts).generate();return this.result.css=s[0],this.result.map=s[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(J(t))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[I];)e[I]=!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[r,s]of e){this.result.lastPlugin=r;let o;try{o=s(t,this.helpers)}catch(n){throw this.handleError(n,t.proxyOf)}if(t.type!=="root"&&t.type!=="document"&&!t.parent)return!0;if(J(o))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:r,visitors:s}=t;if(r.type!=="root"&&r.type!=="document"&&!r.parent){e.pop();return}if(s.length>0&&t.visitorIndex<s.length){let[n,a]=s[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===s.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=n;try{return a(r.toProxy(),this.helpers)}catch(l){throw this.handleError(l,r)}}if(t.iterator!==0){let n=t.iterator,a;for(;a=r.nodes[r.indexes[n]];)if(r.indexes[n]+=1,!a[I]){a[I]=!0,e.push(Or(a));return}t.iterator=0,delete r.indexes[n]}let o=t.events;for(;t.eventIndex<o.length;){let n=o[t.eventIndex];if(t.eventIndex+=1,n===z){r.nodes&&r.nodes.length&&(r[I]=!0,t.iterator=r.getIterator());return}else if(this.listeners[n]){t.visitors=this.listeners[n];return}}e.pop()}walkSync(e){e[I]=!0;let t=bs(e);for(let r of t)if(r===z)e.nodes&&e.each(s=>{s[I]||this.walkSync(s)});else{let s=this.listeners[r];if(s&&this.visitSync(s,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"}};D.registerPostcss=i=>{$t=i};var Ss=D;D.default=D;Nn.registerLazyResult(D);Pn.registerLazyResult(D);let Fn=ts,Un=We;let _n=Xt;const zn=jt;let vt=class{constructor(e,t,r){t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=r,this._map=void 0;let s,o=Un;this.result=new zn(this._processor,s,this._opts),this.result.css=t;let n=this;Object.defineProperty(this.result,"root",{get(){return n.root}});let a=new Fn(o,s,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=_n;try{e=t(this._css,this._opts)}catch(r){this.error=r}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}};var Dn=vt;vt.default=vt;let Tn=Dn,Wn=Ss,Vn=Yt,Gn=oe,q=class{constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let r of e)if(r.postcss===!0?r=r():r.postcss&&(r=r.postcss),typeof r=="object"&&Array.isArray(r.plugins))t=t.concat(r.plugins);else if(typeof r=="object"&&r.postcssPlugin)t.push(r);else if(typeof r=="function")t.push(r);else if(!(typeof r=="object"&&(r.parse||r.stringify)))throw new Error(r+" is not a PostCSS plugin");return t}process(e,t={}){return!this.plugins.length&&!t.parser&&!t.stringifier&&!t.syntax?new Tn(this,e,t):new Wn(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var Yn=q;q.default=q;Gn.registerProcessor(q);Vn.registerProcessor(q);let jn=Ge,Zn=Kr,Jn=je,Xn=Zt,Kn=Ye,Hn=oe,Qn=Jt;function ee(i,e){if(Array.isArray(i))return i.map(n=>ee(n));let s=i,{inputs:t}=s,r=j(s,["inputs"]);if(t){e=[];for(let n of t){let a=E(S({},n),{__proto__:Kn.prototype});a.map&&(a.map=E(S({},a.map),{__proto__:Zn.prototype})),e.push(a)}}if(r.nodes&&(r.nodes=i.nodes.map(n=>ee(n,e))),r.source){let o=r.source,{inputId:n}=o,a=j(o,["inputId"]);r.source=a,n!=null&&(r.source.input=e[n])}if(r.type==="root")return new Hn(r);if(r.type==="decl")return new jn(r);if(r.type==="rule")return new Qn(r);if(r.type==="comment")return new Jn(r);if(r.type==="atrule")return new Xn(r);throw new Error("Unknown node type: "+i.type)}var qn=ee;ee.default=ee;let eo=Wt,$s=Ge,to=Ss,ro=L,Kt=Yn,so=We,io=qn,vs=Yt,no=ps,As=je,Is=Zt,oo=jt,lo=Ye,ao=Xt,uo=ys,Os=Jt,Rs=oe,ho=Ve;function g(...i){return i.length===1&&Array.isArray(i[0])&&(i=i[0]),new Kt(i)}g.plugin=function(e,t){let r=!1;function s(...n){console&&console.warn&&!r&&(r=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide:
|
|
38
|
+
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:
|
|
39
|
+
https://www.w3ctech.com/topic/2226`));let a=t(...n);return a.postcssPlugin=e,a.postcssVersion=new Kt().version,a}let o;return Object.defineProperty(s,"postcss",{get(){return o||(o=s()),o}}),s.process=function(n,a,l){return g([s(l)]).process(n,a)},s};g.stringify=so;g.parse=ao;g.fromJSON=io;g.list=uo;g.comment=i=>new As(i);g.atRule=i=>new Is(i);g.decl=i=>new $s(i);g.rule=i=>new Os(i);g.root=i=>new Rs(i);g.document=i=>new vs(i);g.CssSyntaxError=eo;g.Declaration=$s;g.Container=ro;g.Processor=Kt;g.Document=vs;g.Comment=As;g.Warning=no;g.AtRule=Is;g.Result=oo;g.Input=lo;g.Rule=Os;g.Root=Rs;g.Node=ho;to.registerPostcss(g);var fo=g;g.default=g;const b=Si(fo);b.stringify;b.fromJSON;b.plugin;b.parse;b.list;b.document;b.comment;b.atRule;b.rule;b.decl;b.root;b.CssSyntaxError;b.Declaration;b.Container;b.Processor;b.Document;b.Comment;b.Warning;b.AtRule;b.Result;b.Input;b.Rule;b.Root;b.Node;function co(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}function po(i){if(i.__esModule)return i;var e=i.default;if(typeof e=="function"){var t=function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(i).forEach(function(r){var s=Object.getOwnPropertyDescriptor(i,r);Object.defineProperty(t,r,s.get?s:{enumerable:!0,get:function(){return i[r]}})}),t}var Ht={exports:{}},C=String,Es=function(){return{isColorSupported:!1,reset:C,bold:C,dim:C,italic:C,underline:C,inverse:C,hidden:C,strikethrough:C,black:C,red:C,green:C,yellow:C,blue:C,magenta:C,cyan:C,white:C,gray:C,bgBlack:C,bgRed:C,bgGreen:C,bgYellow:C,bgBlue:C,bgMagenta:C,bgCyan:C,bgWhite:C}};Ht.exports=Es();Ht.exports.createColors=Es;var mo=Ht.exports;const go={},wo=Object.freeze(Object.defineProperty({__proto__:null,default:go},Symbol.toStringTag,{value:"Module"})),A=po(wo);let Rr=mo,Er=A,At=class Ps extends Error{constructor(e,t,r,s,o,n){super(e),this.name="CssSyntaxError",this.reason=e,o&&(this.file=o),s&&(this.source=s),n&&(this.plugin=n),typeof t!="undefined"&&typeof r!="undefined"&&(typeof t=="number"?(this.line=t,this.column=r):(this.line=t.line,this.column=t.column,this.endLine=r.line,this.endColumn=r.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,Ps)}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=Rr.isColorSupported),Er&&e&&(t=Er(t));let r=t.split(/\r?\n/),s=Math.max(this.line-3,0),o=Math.min(this.line+2,r.length),n=String(o).length,a,l;if(e){let{bold:u,gray:h,red:c}=Rr.createColors(!0);a=p=>u(c(p)),l=p=>h(p)}else a=l=u=>u;return r.slice(s,o).map((u,h)=>{let c=s+1+h,p=" "+(" "+c).slice(-n)+" | ";if(c===this.line){let d=l(p.replace(/\d/g," "))+u.slice(0,this.column-1).replace(/[^\t]/g," ");return a(">")+l(p)+u+`
|
|
40
|
+
`+d+a("^")}return" "+l(p)+u}).join(`
|
|
41
|
+
`)}toString(){let e=this.showSourceCode();return e&&(e=`
|
|
42
|
+
|
|
43
|
+
`+e+`
|
|
44
|
+
`),this.name+": "+this.message+e}};var Qt=At;At.default=At;var le={};le.isClean=Symbol("isClean");le.my=Symbol("my");const Pr={after:`
|
|
45
|
+
`,beforeClose:`
|
|
46
|
+
`,beforeComment:`
|
|
47
|
+
`,beforeDecl:`
|
|
48
|
+
`,beforeOpen:" ",beforeRule:`
|
|
49
|
+
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function yo(i){return i[0].toUpperCase()+i.slice(1)}let It=class{constructor(e){this.builder=e}atrule(e,t){let r="@"+e.name,s=e.params?this.rawValue(e,"params"):"";if(typeof e.raws.afterName!="undefined"?r+=e.raws.afterName:s&&(r+=" "),e.nodes)this.block(e,r+s);else{let o=(e.raws.between||"")+(t?";":"");this.builder(r+s+o,e)}}beforeAfter(e,t){let r;e.type==="decl"?r=this.raw(e,null,"beforeDecl"):e.type==="comment"?r=this.raw(e,null,"beforeComment"):t==="before"?r=this.raw(e,null,"beforeRule"):r=this.raw(e,null,"beforeClose");let s=e.parent,o=0;for(;s&&s.type!=="root";)o+=1,s=s.parent;if(r.includes(`
|
|
50
|
+
`)){let n=this.raw(e,null,"indent");if(n.length)for(let a=0;a<o;a++)r+=n}return r}block(e,t){let r=this.raw(e,"between","beforeOpen");this.builder(t+r+"{",e,"start");let s;e.nodes&&e.nodes.length?(this.body(e),s=this.raw(e,"after")):s=this.raw(e,"after","emptyBody"),s&&this.builder(s),this.builder("}",e,"end")}body(e){let t=e.nodes.length-1;for(;t>0&&e.nodes[t].type==="comment";)t-=1;let r=this.raw(e,"semicolon");for(let s=0;s<e.nodes.length;s++){let o=e.nodes[s],n=this.raw(o,"before");n&&this.builder(n),this.stringify(o,t!==s||r)}}comment(e){let t=this.raw(e,"left","commentLeft"),r=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+r+"*/",e)}decl(e,t){let r=this.raw(e,"between","colon"),s=e.prop+r+this.rawValue(e,"value");e.important&&(s+=e.raws.important||" !important"),t&&(s+=";"),this.builder(s,e)}document(e){this.body(e)}raw(e,t,r){let s;if(r||(r=t),t&&(s=e.raws[t],typeof s!="undefined"))return s;let o=e.parent;if(r==="before"&&(!o||o.type==="root"&&o.first===e||o&&o.type==="document"))return"";if(!o)return Pr[r];let n=e.root();if(n.rawCache||(n.rawCache={}),typeof n.rawCache[r]!="undefined")return n.rawCache[r];if(r==="before"||r==="after")return this.beforeAfter(e,r);{let a="raw"+yo(r);this[a]?s=this[a](n,e):n.walk(l=>{if(s=l.raws[t],typeof s!="undefined")return!1})}return typeof s=="undefined"&&(s=Pr[r]),n.rawCache[r]=s,s}rawBeforeClose(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length>0&&typeof r.raws.after!="undefined")return t=r.raws.after,t.includes(`
|
|
51
|
+
`)&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let r;return e.walkComments(s=>{if(typeof s.raws.before!="undefined")return r=s.raws.before,r.includes(`
|
|
52
|
+
`)&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r=="undefined"?r=this.raw(t,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeDecl(e,t){let r;return e.walkDecls(s=>{if(typeof s.raws.before!="undefined")return r=s.raws.before,r.includes(`
|
|
53
|
+
`)&&(r=r.replace(/[^\n]+$/,"")),!1}),typeof r=="undefined"?r=this.raw(t,null,"beforeRule"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeOpen(e){let t;return e.walk(r=>{if(r.type!=="decl"&&(t=r.raws.between,typeof t!="undefined"))return!1}),t}rawBeforeRule(e){let t;return e.walk(r=>{if(r.nodes&&(r.parent!==e||e.first!==r)&&typeof r.raws.before!="undefined")return t=r.raws.before,t.includes(`
|
|
54
|
+
`)&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls(r=>{if(typeof r.raws.between!="undefined")return t=r.raws.between.replace(/[^\s:]/g,""),!1}),t}rawEmptyBody(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length===0&&(t=r.raws.after,typeof t!="undefined"))return!1}),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk(r=>{let s=r.parent;if(s&&s!==e&&s.parent&&s.parent===e&&typeof r.raws.before!="undefined"){let o=r.raws.before.split(`
|
|
55
|
+
`);return t=o[o.length-1],t=t.replace(/\S/g,""),!1}}),t}rawSemicolon(e){let t;return e.walk(r=>{if(r.nodes&&r.nodes.length&&r.last.type==="decl"&&(t=r.raws.semicolon,typeof t!="undefined"))return!1}),t}rawValue(e,t){let r=e[t],s=e.raws[t];return s&&s.value===r?s.raw:r}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}};var Ms=It;It.default=It;let Co=Ms;function Ot(i,e){new Co(e).stringify(i)}var Ze=Ot;Ot.default=Ot;let{isClean:Ce,my:bo}=le,xo=Qt,So=Ms,$o=Ze;function Rt(i,e){let t=new i.constructor;for(let r in i){if(!Object.prototype.hasOwnProperty.call(i,r)||r==="proxyCache")continue;let s=i[r],o=typeof s;r==="parent"&&o==="object"?e&&(t[r]=e):r==="source"?t[r]=s:Array.isArray(s)?t[r]=s.map(n=>Rt(n,t)):(o==="object"&&s!==null&&(s=Rt(s)),t[r]=s)}return t}let Et=class{constructor(e={}){this.raws={},this[Ce]=!1,this[bo]=!0;for(let t in e)if(t==="nodes"){this.nodes=[];for(let r of e[t])typeof r.clone=="function"?this.append(r.clone()):this.append(r)}else this[t]=e[t]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let t in e)this[t]=e[t];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let t=Rt(this);for(let r in e)t[r]=e[r];return t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}error(e,t={}){if(this.source){let{end:r,start:s}=this.rangeBy(t);return this.source.input.error(e,{column:s.column,line:s.line},{column:r.column,line:r.line},t)}return new xo(e)}getProxyProcessor(){return{get(e,t){return t==="proxyOf"?e:t==="root"?()=>e.root().toProxy():e[t]},set(e,t,r){return e[t]===r||(e[t]=r,(t==="prop"||t==="value"||t==="name"||t==="params"||t==="important"||t==="text")&&e.markDirty()),!0}}}markDirty(){if(this[Ce]){this[Ce]=!1;let e=this;for(;e=e.parent;)e[Ce]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let r=this.source.start;if(e.index)r=this.positionInside(e.index,t);else if(e.word){t=this.toString();let s=t.indexOf(e.word);s!==-1&&(r=this.positionInside(s,t))}return r}positionInside(e,t){let r=t||this.toString(),s=this.source.start.column,o=this.source.start.line;for(let n=0;n<e;n++)r[n]===`
|
|
56
|
+
`?(s=1,o+=1):s+=1;return{column:s,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},r=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:t.column+1,line:t.line};if(e.word){let s=this.toString(),o=s.indexOf(e.word);o!==-1&&(t=this.positionInside(o,s),r=this.positionInside(o+e.word.length,s))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?r={column:e.end.column,line:e.end.line}:typeof e.endIndex=="number"?r=this.positionInside(e.endIndex):e.index&&(r=this.positionInside(e.index+1));return(r.line<t.line||r.line===t.line&&r.column<=t.column)&&(r={column:t.column+1,line:t.line}),{end:r,start:t}}raw(e,t){return new So().raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let t=this,r=!1;for(let s of e)s===this?r=!0:r?(this.parent.insertAfter(t,s),t=s):this.parent.insertBefore(t,s);r||this.remove()}return this}root(){let e=this;for(;e.parent&&e.parent.type!=="document";)e=e.parent;return e}toJSON(e,t){let r={},s=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))r[n]=a.map(l=>typeof l=="object"&&l.toJSON?l.toJSON(null,t):l);else if(typeof a=="object"&&a.toJSON)r[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++),r[n]={end:a.end,inputId:l,start:a.start}}else r[n]=a}return s&&(r.inputs=[...t.keys()].map(n=>n.toJSON())),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=$o){e.stringify&&(e=e.stringify);let t="";return e(this,r=>{t+=r}),t}warn(e,t,r){let s={node:this};for(let o in r)s[o]=r[o];return e.warn(t,s)}get proxyOf(){return this}};var Je=Et;Et.default=Et;let vo=Je,Pt=class extends vo{constructor(e){e&&typeof e.value!="undefined"&&typeof e.value!="string"&&(e=E(S({},e),{value:String(e.value)})),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}};var Xe=Pt;Pt.default=Pt;let Ao="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",Io=(i,e=21)=>(t=e)=>{let r="",s=t;for(;s--;)r+=i[Math.random()*i.length|0];return r},Oo=(i=21)=>{let e="",t=i;for(;t--;)e+=Ao[Math.random()*64|0];return e};var Ro={nanoid:Oo,customAlphabet:Io};let{SourceMapConsumer:Mr,SourceMapGenerator:Nr}=A,{existsSync:Eo,readFileSync:Po}=A,{dirname:ot,join:Mo}=A;function No(i){return Buffer?Buffer.from(i,"base64").toString():window.atob(i)}let Mt=class{constructor(e,t){if(t.map===!1)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let r=t.map?t.map.prev:void 0,s=this.loadMap(t.from,r);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=ot(this.mapFile)),s&&(this.text=s)}consumer(){return this.consumerCache||(this.consumerCache=new Mr(this.text)),this.consumerCache}decodeInline(e){let t=/^data:application\/json;charset=utf-?8;base64,/,r=/^data:application\/json;base64,/,s=/^data:application\/json;charset=utf-?8,/,o=/^data:application\/json,/;if(s.test(e)||o.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(t.test(e)||r.test(e))return No(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 r=e.lastIndexOf(t.pop()),s=e.indexOf("*/",r);r>-1&&s>-1&&(this.annotation=this.getAnnotationURL(e.substring(r,s)))}loadFile(e){if(this.root=ot(e),Eo(e))return this.mapFile=e,Po(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 r=t(e);if(r){let s=this.loadFile(r);if(!s)throw new Error("Unable to load previous source map: "+r.toString());return s}}else{if(t instanceof Mr)return Nr.fromSourceMap(t).toString();if(t instanceof Nr)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let r=this.annotation;return e&&(r=Mo(ot(e),r)),this.loadFile(r)}}}startWith(e,t){return e?e.substr(0,t.length)===t:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};var Ns=Mt;Mt.default=Mt;let{SourceMapConsumer:ko,SourceMapGenerator:Bo}=A,{fileURLToPath:kr,pathToFileURL:be}=A,{isAbsolute:Nt,resolve:kt}=A,{nanoid:Lo}=Ro,lt=A,Br=Qt,Fo=Ns,at=Symbol("fromOffsetCache"),Uo=!!(ko&&Bo),Lr=!!(kt&&Nt),_e=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&&(!Lr||/^\w+:\/\//.test(t.from)||Nt(t.from)?this.file=t.from:this.file=kt(t.from)),Lr&&Uo){let r=new Fo(this.css,t);if(r.text){this.map=r;let s=r.consumer().file;!this.file&&s&&(this.file=this.mapResolve(s))}}this.file||(this.id="<input css "+Lo(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,r,s={}){let o,n,a;if(t&&typeof t=="object"){let u=t,h=r;if(typeof u.offset=="number"){let c=this.fromOffset(u.offset);t=c.line,r=c.col}else t=u.line,r=u.column;if(typeof h.offset=="number"){let c=this.fromOffset(h.offset);n=c.line,a=c.col}else n=h.line,a=h.column}else if(!r){let u=this.fromOffset(t);t=u.line,r=u.col}let l=this.origin(t,r,n,a);return l?o=new Br(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,s.plugin):o=new Br(e,n===void 0?t:{column:r,line:t},n===void 0?r:{column:a,line:n},this.css,this.file,s.plugin),o.input={column:r,endColumn:a,endLine:n,line:t,source:this.css},this.file&&(be&&(o.input.url=be(this.file).toString()),o.input.file=this.file),o}fromOffset(e){let t,r;if(this[at])r=this[at];else{let o=this.css.split(`
|
|
57
|
+
`);r=new Array(o.length);let n=0;for(let a=0,l=o.length;a<l;a++)r[a]=n,n+=o[a].length+1;this[at]=r}t=r[r.length-1];let s=0;if(e>=t)s=r.length-1;else{let o=r.length-2,n;for(;s<o;)if(n=s+(o-s>>1),e<r[n])o=n-1;else if(e>=r[n+1])s=n+1;else{s=n;break}}return{col:e-r[s]+1,line:s+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:kt(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,r,s){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 r=="number"&&(a=o.originalPositionFor({column:s,line:r}));let l;Nt(n.source)?l=be(n.source):l=new URL(n.source,this.map.consumer().sourceRoot||be(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(kr)u.file=kr(l);else throw new Error("file: protocol is not available in this PostCSS build");let h=o.sourceContentFor(n.source);return h&&(u.source=h),u}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])this[t]!=null&&(e[t]=this[t]);return this.map&&(e.map=S({},this.map),e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}};var Ke=_e;_e.default=_e;lt&<.registerInput&<.registerInput(_e);let{SourceMapConsumer:ks,SourceMapGenerator:Ne}=A,{dirname:ke,relative:Bs,resolve:Ls,sep:Fs}=A,{pathToFileURL:Fr}=A,_o=Ke,zo=!!(ks&&Ne),Do=!!(ke&&Ls&&Bs&&Fs),To=class{constructor(e,t,r,s){this.stringify=e,this.mapOpts=r.map||{},this.root=t,this.opts=r,this.css=s,this.originalCSS=s,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=`
|
|
58
|
+
`;this.css.includes(`\r
|
|
59
|
+
`)&&(t=`\r
|
|
60
|
+
`),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t=this.toUrl(this.path(e.file)),r=e.root||ke(e.file),s;this.mapOpts.sourcesContent===!1?(s=new ks(e.text),s.sourcesContent&&(s.sourcesContent=null)):s=e.consumer(),this.map.applySourceMap(s,t,this.toUrl(this.path(r)))}}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(),Do&&zo&&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=Ne.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new Ne({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 Ne({file:this.outputFile(),ignoreInvalidMapping:!0});let e=1,t=1,r="<no source>",s={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"&&(s.generated.line=e,s.generated.column=t-1,l.source&&l.source.start?(s.source=this.sourcePath(l),s.original.line=l.source.start.line,s.original.column=l.source.start.column-1,this.map.addMapping(s)):(s.source=r,s.original.line=1,s.original.column=0,this.map.addMapping(s))),o=a.match(/\n/g),o?(e+=o.length,n=a.lastIndexOf(`
|
|
61
|
+
`),t=a.length-n):t+=a.length,l&&u!=="start"){let h=l.parent||{raws:{}};(!(l.type==="decl"||l.type==="atrule"&&!l.nodes)||l!==h.last||h.raws.semicolon)&&(l.source&&l.source.end?(s.source=this.sourcePath(l),s.original.line=l.source.end.line,s.original.column=l.source.end.column-1,s.generated.line=e,s.generated.column=t-2,this.map.addMapping(s)):(s.source=r,s.original.line=1,s.original.column=0,s.generated.line=e,s.generated.column=t-1,this.map.addMapping(s)))}})}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 r=this.opts.to?ke(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(r=ke(Ls(r,this.mapOpts.annotation)));let s=Bs(r,e);return this.memoizedPaths.set(e,s),s}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 _o(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(t=>{if(t.source){let r=t.source.input.from;if(r&&!e[r]){e[r]=!0;let s=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(s,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(Fr){let r=Fr(e).toString();return this.memoizedFileURLs.set(e,r),r}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;Fs==="\\"&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}};var Us=To;let Wo=Je,Bt=class extends Wo{constructor(e){super(e),this.type="comment"}};var He=Bt;Bt.default=Bt;let{isClean:_s,my:zs}=le,Ds=Xe,Ts=He,Vo=Je,Ws,qt,er,Vs;function Gs(i){return i.map(e=>(e.nodes&&(e.nodes=Gs(e.nodes)),delete e.source,e))}function Ys(i){if(i[_s]=!1,i.proxyOf.nodes)for(let e of i.proxyOf.nodes)Ys(e)}let M=class js extends Vo{append(...e){for(let t of e){let r=this.normalize(t,this.last);for(let s of r)this.proxyOf.nodes.push(s)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t=this.getIterator(),r,s;for(;this.indexes[t]<this.proxyOf.nodes.length&&(r=this.indexes[t],s=e(this.proxyOf.nodes[r],r),s!==!1);)this.indexes[t]+=1;return delete this.indexes[t],s}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get(e,t){return t==="proxyOf"?e:e[t]?t==="each"||typeof t=="string"&&t.startsWith("walk")?(...r)=>e[t](...r.map(s=>typeof s=="function"?(o,n)=>s(o.toProxy(),n):s)):t==="every"||t==="some"?r=>e[t]((s,...o)=>r(s.toProxy(),...o)):t==="root"?()=>e.root().toProxy():t==="nodes"?e.nodes.map(r=>r.toProxy()):t==="first"||t==="last"?e[t].toProxy():e[t]:e[t]},set(e,t,r){return e[t]===r||(e[t]=r,(t==="name"||t==="params"||t==="selector")&&e.markDirty()),!0}}}index(e){return typeof e=="number"?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let r=this.index(e),s=this.normalize(t,this.proxyOf.nodes[r]).reverse();r=this.index(e);for(let n of s)this.proxyOf.nodes.splice(r+1,0,n);let o;for(let n in this.indexes)o=this.indexes[n],r<o&&(this.indexes[n]=o+s.length);return this.markDirty(),this}insertBefore(e,t){let r=this.index(e),s=r===0?"prepend":!1,o=this.normalize(t,this.proxyOf.nodes[r],s).reverse();r=this.index(e);for(let a of o)this.proxyOf.nodes.splice(r,0,a);let n;for(let a in this.indexes)n=this.indexes[a],r<=n&&(this.indexes[a]=n+o.length);return this.markDirty(),this}normalize(e,t){if(typeof e=="string")e=Gs(Ws(e).nodes);else if(typeof e=="undefined")e=[];else if(Array.isArray(e)){e=e.slice(0);for(let s of e)s.parent&&s.parent.removeChild(s,"ignore")}else if(e.type==="root"&&this.type!=="document"){e=e.nodes.slice(0);for(let s of e)s.parent&&s.parent.removeChild(s,"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 Ds(e)]}else if(e.selector)e=[new qt(e)];else if(e.name)e=[new er(e)];else if(e.text)e=[new Ts(e)];else throw new Error("Unknown node type in node creation");return e.map(s=>(s[zs]||js.rebuild(s),s=s.proxyOf,s.parent&&s.parent.removeChild(s),s[_s]&&Ys(s),typeof s.raws.before=="undefined"&&t&&typeof t.raws.before!="undefined"&&(s.raws.before=t.raws.before.replace(/\S/g,"")),s.parent=this.proxyOf,s))}prepend(...e){e=e.reverse();for(let t of e){let r=this.normalize(t,this.first,"prepend").reverse();for(let s of r)this.proxyOf.nodes.unshift(s);for(let s in this.indexes)this.indexes[s]=this.indexes[s]+r.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);let t;for(let r in this.indexes)t=this.indexes[r],t>=e&&(this.indexes[r]=t-1);return this.markDirty(),this}replaceValues(e,t,r){return r||(r=t,t={}),this.walkDecls(s=>{t.props&&!t.props.includes(s.prop)||t.fast&&!s.value.includes(t.fast)||(s.value=s.value.replace(e,r))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,r)=>{let s;try{s=e(t,r)}catch(o){throw t.addToError(o)}return s!==!1&&t.walk&&(s=t.walk(e)),s})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((r,s)=>{if(r.type==="atrule"&&e.test(r.name))return t(r,s)}):this.walk((r,s)=>{if(r.type==="atrule"&&r.name===e)return t(r,s)}):(t=e,this.walk((r,s)=>{if(r.type==="atrule")return t(r,s)}))}walkComments(e){return this.walk((t,r)=>{if(t.type==="comment")return e(t,r)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((r,s)=>{if(r.type==="decl"&&e.test(r.prop))return t(r,s)}):this.walk((r,s)=>{if(r.type==="decl"&&r.prop===e)return t(r,s)}):(t=e,this.walk((r,s)=>{if(r.type==="decl")return t(r,s)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((r,s)=>{if(r.type==="rule"&&e.test(r.selector))return t(r,s)}):this.walk((r,s)=>{if(r.type==="rule"&&r.selector===e)return t(r,s)}):(t=e,this.walk((r,s)=>{if(r.type==="rule")return t(r,s)}))}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]}};M.registerParse=i=>{Ws=i};M.registerRule=i=>{qt=i};M.registerAtRule=i=>{er=i};M.registerRoot=i=>{Vs=i};var F=M;M.default=M;M.rebuild=i=>{i.type==="atrule"?Object.setPrototypeOf(i,er.prototype):i.type==="rule"?Object.setPrototypeOf(i,qt.prototype):i.type==="decl"?Object.setPrototypeOf(i,Ds.prototype):i.type==="comment"?Object.setPrototypeOf(i,Ts.prototype):i.type==="root"&&Object.setPrototypeOf(i,Vs.prototype),i[zs]=!0,i.nodes&&i.nodes.forEach(e=>{M.rebuild(e)})};let Go=F,Zs,Js,te=class extends Go{constructor(e){super(S({type:"document"},e)),this.nodes||(this.nodes=[])}toResult(e={}){return new Zs(new Js,this,e).stringify()}};te.registerLazyResult=i=>{Zs=i};te.registerProcessor=i=>{Js=i};var tr=te;te.default=te;let Lt=class{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let r=t.node.rangeBy(t);this.line=r.start.line,this.column=r.start.column,this.endLine=r.end.line,this.endColumn=r.end.column}for(let r in t)this[r]=t[r]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}};var Xs=Lt;Lt.default=Lt;let Yo=Xs,Ft=class{constructor(e,t,r){this.processor=e,this.messages=[],this.root=t,this.opts=r,this.css=void 0,this.map=void 0}toString(){return this.css}warn(e,t={}){t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let r=new Yo(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>e.type==="warning")}get content(){return this.css}};var rr=Ft;Ft.default=Ft;const ut=39,Ur=34,xe=92,_r=47,Se=10,X=32,$e=12,ve=9,Ae=13,jo=91,Zo=93,Jo=40,Xo=41,Ko=123,Ho=125,Qo=59,qo=42,el=58,tl=64,Ie=/[\t\n\f\r "#'()/;[\\\]{}]/g,Oe=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,rl=/.[\r\n"'(/\\]/,zr=/[\da-f]/i;var sl=function(e,t={}){let r=e.css.valueOf(),s=t.ignoreErrors,o,n,a,l,u,h,c,p,d,m,G=r.length,f=0,N=[],R=[];function Qe(){return f}function k($){throw e.error("Unclosed "+$,f)}function qe(){return R.length===0&&f>=G}function et($){if(R.length)return R.pop();if(f>=G)return;let B=$?$.ignoreUnclosed:!1;switch(o=r.charCodeAt(f),o){case Se:case X:case ve:case Ae:case $e:{n=f;do n+=1,o=r.charCodeAt(n);while(o===X||o===Se||o===ve||o===Ae||o===$e);m=["space",r.slice(f,n)],f=n-1;break}case jo:case Zo:case Ko:case Ho:case el:case Qo:case Xo:{let Y=String.fromCharCode(o);m=[Y,Y,f];break}case Jo:{if(p=N.length?N.pop()[1]:"",d=r.charCodeAt(f+1),p==="url"&&d!==ut&&d!==Ur&&d!==X&&d!==Se&&d!==ve&&d!==$e&&d!==Ae){n=f;do{if(h=!1,n=r.indexOf(")",n+1),n===-1)if(s||B){n=f;break}else k("bracket");for(c=n;r.charCodeAt(c-1)===xe;)c-=1,h=!h}while(h);m=["brackets",r.slice(f,n+1),f,n],f=n}else n=r.indexOf(")",f+1),l=r.slice(f,n+1),n===-1||rl.test(l)?m=["(","(",f]:(m=["brackets",l,f,n],f=n);break}case ut:case Ur:{a=o===ut?"'":'"',n=f;do{if(h=!1,n=r.indexOf(a,n+1),n===-1)if(s||B){n=f+1;break}else k("string");for(c=n;r.charCodeAt(c-1)===xe;)c-=1,h=!h}while(h);m=["string",r.slice(f,n+1),f,n],f=n;break}case tl:{Ie.lastIndex=f+1,Ie.test(r),Ie.lastIndex===0?n=r.length-1:n=Ie.lastIndex-2,m=["at-word",r.slice(f,n+1),f,n],f=n;break}case xe:{for(n=f,u=!0;r.charCodeAt(n+1)===xe;)n+=1,u=!u;if(o=r.charCodeAt(n+1),u&&o!==_r&&o!==X&&o!==Se&&o!==ve&&o!==Ae&&o!==$e&&(n+=1,zr.test(r.charAt(n)))){for(;zr.test(r.charAt(n+1));)n+=1;r.charCodeAt(n+1)===X&&(n+=1)}m=["word",r.slice(f,n+1),f,n],f=n;break}default:{o===_r&&r.charCodeAt(f+1)===qo?(n=r.indexOf("*/",f+2)+1,n===0&&(s||B?n=r.length:k("comment")),m=["comment",r.slice(f,n+1),f,n],f=n):(Oe.lastIndex=f+1,Oe.test(r),Oe.lastIndex===0?n=r.length-1:n=Oe.lastIndex-2,m=["word",r.slice(f,n+1),f,n],N.push(m),f=n);break}}return f++,m}function tt($){R.push($)}return{back:tt,endOfFile:qe,nextToken:et,position:Qe}};let Ks=F,ze=class extends Ks{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 sr=ze;ze.default=ze;Ks.registerAtRule(ze);let Hs=F,Qs,qs,T=class extends Hs{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,r){let s=super.normalize(e);if(t){if(r==="prepend")this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let o of s)o.raws.before=t.raws.before}return s}removeChild(e,t){let r=this.index(e);return!t&&r===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(e)}toResult(e={}){return new Qs(new qs,this,e).stringify()}};T.registerLazyResult=i=>{Qs=i};T.registerProcessor=i=>{qs=i};var ae=T;T.default=T;Hs.registerRoot(T);let re={comma(i){return re.split(i,[","],!0)},space(i){let e=[" ",`
|
|
62
|
+
`," "];return re.split(i,e)},split(i,e,t){let r=[],s="",o=!1,n=0,a=!1,l="",u=!1;for(let h of i)u?u=!1:h==="\\"?u=!0:a?h===l&&(a=!1):h==='"'||h==="'"?(a=!0,l=h):h==="("?n+=1:h===")"?n>0&&(n-=1):n===0&&e.includes(h)&&(o=!0),o?(s!==""&&r.push(s.trim()),s="",o=!1):s+=h;return(t||s!=="")&&r.push(s.trim()),r}};var ei=re;re.default=re;let ti=F,il=ei,De=class extends ti{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return il.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,r=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(r)}};var ir=De;De.default=De;ti.registerRule(De);let nl=Xe,ol=sl,ll=He,al=sr,ul=ae,Dr=ir;const Tr={empty:!0,space:!0};function hl(i){for(let e=i.length-1;e>=0;e--){let t=i[e],r=t[3]||t[2];if(r)return r}}let fl=class{constructor(e){this.input=e,this.root=new ul,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 al;t.name=e[1].slice(1),t.name===""&&this.unnamedAtrule(t,e),this.init(t,e[2]);let r,s,o,n=!1,a=!1,l=[],u=[];for(;!this.tokenizer.endOfFile();){if(e=this.tokenizer.nextToken(),r=e[0],r==="("||r==="["?u.push(r==="("?")":"]"):r==="{"&&u.length>0?u.push("}"):r===u[u.length-1]&&u.pop(),u.length===0)if(r===";"){t.source.end=this.getPosition(e[2]),t.source.end.offset++,this.semicolon=!0;break}else if(r==="{"){a=!0;break}else if(r==="}"){if(l.length>0){for(o=l.length-1,s=l[o];s&&s[0]==="space";)s=l[--o];s&&(t.source.end=this.getPosition(s[3]||s[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 r=0,s;for(let o=t-1;o>=0&&(s=e[o],!(s[0]!=="space"&&(r+=1,r===2)));o--);throw this.input.error("Missed semicolon",s[0]==="word"?s[3]+1:s[2])}colon(e){let t=0,r,s,o;for(let[n,a]of e.entries()){if(r=a,s=r[0],s==="("&&(t+=1),s===")"&&(t-=1),t===0&&s===":")if(!o)this.doubleColon(r);else{if(o[0]==="word"&&o[1]==="progid")continue;return n}o=r}return!1}comment(e){let t=new ll;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let r=e[1].slice(2,-2);if(/^\s*$/.test(r))t.text="",t.raws.left=r,t.raws.right="";else{let s=r.match(/^(\s*)([^]*\S)(\s*)$/);t.text=s[2],t.raws.left=s[1],t.raws.right=s[3]}}createTokenizer(){this.tokenizer=ol(this.input)}decl(e,t){let r=new nl;this.init(r,e[0][2]);let s=e[e.length-1];for(s[0]===";"&&(this.semicolon=!0,e.pop()),r.source.end=this.getPosition(s[3]||s[2]||hl(e)),r.source.end.offset++;e[0][0]!=="word";)e.length===1&&this.unknownWord(e),r.raws.before+=e.shift()[1];for(r.source.start=this.getPosition(e[0][2]),r.prop="";e.length;){let u=e[0][0];if(u===":"||u==="space"||u==="comment")break;r.prop+=e.shift()[1]}r.raws.between="";let o;for(;e.length;)if(o=e.shift(),o[0]===":"){r.raws.between+=o[1];break}else o[0]==="word"&&/\w/.test(o[1])&&this.unknownWord([o]),r.raws.between+=o[1];(r.prop[0]==="_"||r.prop[0]==="*")&&(r.raws.before+=r.prop[0],r.prop=r.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"){r.important=!0;let h=this.stringFrom(e,u);h=this.spacesFromEnd(e)+h,h!==" !important"&&(r.raws.important=h);break}else if(o[1].toLowerCase()==="important"){let h=e.slice(0),c="";for(let p=u;p>0;p--){let d=h[p][0];if(c.trim().indexOf("!")===0&&d!=="space")break;c=h.pop()[1]+c}c.trim().indexOf("!")===0&&(r.important=!0,r.raws.important=c,e=h)}if(o[0]!=="space"&&o[0]!=="comment")break}e.some(u=>u[0]!=="space"&&u[0]!=="comment")&&(r.raws.between+=n.map(u=>u[1]).join(""),n=[]),this.raw(r,"value",n.concat(e),t),r.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new Dr;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,r=null,s=!1,o=null,n=[],a=e[1].startsWith("--"),l=[],u=e;for(;u;){if(r=u[0],l.push(u),r==="("||r==="[")o||(o=u),n.push(r==="("?")":"]");else if(a&&s&&r==="{")o||(o=u),n.push("}");else if(n.length===0)if(r===";")if(s){this.decl(l,a);return}else break;else if(r==="{"){this.rule(l);return}else if(r==="}"){this.tokenizer.back(l.pop()),t=!0;break}else r===":"&&(s=!0);else r===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&&s){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,r,s){let o,n,a=r.length,l="",u=!0,h,c;for(let p=0;p<a;p+=1)o=r[p],n=o[0],n==="space"&&p===a-1&&!s?u=!1:n==="comment"?(c=r[p-1]?r[p-1][0]:"empty",h=r[p+1]?r[p+1][0]:"empty",!Tr[c]&&!Tr[h]?l.slice(-1)===","?u=!1:l+=o[1]:u=!1):l+=o[1];if(!u){let p=r.reduce((d,m)=>d+m[1],"");e.raws[t]={raw:p,value:l}}e[t]=l}rule(e){e.pop();let t=new Dr;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],!(t!=="space"&&t!=="comment"));)r=e.pop()[1]+r;return r}spacesAndCommentsFromStart(e){let t,r="";for(;e.length&&(t=e[0][0],!(t!=="space"&&t!=="comment"));)r+=e.shift()[1];return r}spacesFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],t==="space");)r=e.pop()[1]+r;return r}stringFrom(e,t){let r="";for(let s=t;s<e.length;s++)r+=e[s][1];return e.splice(t,e.length-t),r}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word",{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}};var cl=fl;let pl=F,dl=cl,ml=Ke;function Te(i,e){let t=new ml(i,e),r=new dl(t);try{r.parse()}catch(s){throw s}return r.root}var nr=Te;Te.default=Te;pl.registerParse(Te);let{isClean:O,my:gl}=le,wl=Us,yl=Ze,Cl=F,bl=tr;let Wr=rr,xl=nr,Sl=ae;const $l={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},vl={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},Al={Once:!0,postcssPlugin:!0,prepare:!0},W=0;function K(i){return typeof i=="object"&&typeof i.then=="function"}function ri(i){let e=!1,t=$l[i.type];return i.type==="decl"?e=i.prop.toLowerCase():i.type==="atrule"&&(e=i.name.toLowerCase()),e&&i.append?[t,t+"-"+e,W,t+"Exit",t+"Exit-"+e]:e?[t,t+"-"+e,t+"Exit",t+"Exit-"+e]:i.append?[t,W,t+"Exit"]:[t,t+"Exit"]}function Vr(i){let e;return i.type==="document"?e=["Document",W,"DocumentExit"]:i.type==="root"?e=["Root",W,"RootExit"]:e=ri(i),{eventIndex:0,events:e,iterator:0,node:i,visitorIndex:0,visitors:[]}}function Ut(i){return i[O]=!1,i.nodes&&i.nodes.forEach(e=>Ut(e)),i}let _t={},V=class si{constructor(e,t,r){this.stringified=!1,this.processed=!1;let s;if(typeof t=="object"&&t!==null&&(t.type==="root"||t.type==="document"))s=Ut(t);else if(t instanceof si||t instanceof Wr)s=Ut(t.root),t.map&&(typeof r.map=="undefined"&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=t.map);else{let o=xl;r.syntax&&(o=r.syntax.parse),r.parser&&(o=r.parser),o.parse&&(o=o.parse);try{s=o(t,r)}catch(n){this.processed=!0,this.error=n}s&&!s[gl]&&Cl.rebuild(s)}this.result=new Wr(e,s,r),this.helpers=E(S({},_t),{postcss:_t,result:this.result}),this.plugins=this.processor.plugins.map(o=>typeof o=="object"&&o.prepare?S(S({},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 r=this.result.lastPlugin;try{t&&t.addToError(e),this.error=e,e.name==="CssSyntaxError"&&!e.plugin?(e.plugin=r.postcssPlugin,e.setMessage()):r.postcssVersion}catch(s){console&&console.error&&console.error(s)}return e}prepareVisitors(){this.listeners={};let e=(t,r,s)=>{this.listeners[r]||(this.listeners[r]=[]),this.listeners[r].push([t,s])};for(let t of this.plugins)if(typeof t=="object")for(let r in t){if(!vl[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!Al[r])if(typeof t[r]=="object")for(let s in t[r])s==="*"?e(t,r,t[r][s]):e(t,r+"-"+s.toLowerCase(),t[r][s]);else typeof t[r]=="function"&&e(t,r,t[r])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let t=this.plugins[e],r=this.runOnRoot(t);if(K(r))try{await r}catch(s){throw this.handleError(s)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[O];){e[O]=!0;let t=[Vr(e)];for(;t.length>0;){let r=this.visitTick(t);if(K(r))try{await r}catch(s){let o=t[t.length-1].node;throw this.handleError(s,o)}}}if(this.listeners.OnceExit)for(let[t,r]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if(e.type==="document"){let s=e.nodes.map(o=>r(o,this.helpers));await Promise.all(s)}else await r(e,this.helpers)}catch(s){throw this.handleError(s)}}}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(r=>e.Once(r,this.helpers));return K(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=yl;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let s=new wl(t,this.result.root,this.result.opts).generate();return this.result.css=s[0],this.result.map=s[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(K(t))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[O];)e[O]=!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[r,s]of e){this.result.lastPlugin=r;let o;try{o=s(t,this.helpers)}catch(n){throw this.handleError(n,t.proxyOf)}if(t.type!=="root"&&t.type!=="document"&&!t.parent)return!0;if(K(o))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:r,visitors:s}=t;if(r.type!=="root"&&r.type!=="document"&&!r.parent){e.pop();return}if(s.length>0&&t.visitorIndex<s.length){let[n,a]=s[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===s.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=n;try{return a(r.toProxy(),this.helpers)}catch(l){throw this.handleError(l,r)}}if(t.iterator!==0){let n=t.iterator,a;for(;a=r.nodes[r.indexes[n]];)if(r.indexes[n]+=1,!a[O]){a[O]=!0,e.push(Vr(a));return}t.iterator=0,delete r.indexes[n]}let o=t.events;for(;t.eventIndex<o.length;){let n=o[t.eventIndex];if(t.eventIndex+=1,n===W){r.nodes&&r.nodes.length&&(r[O]=!0,t.iterator=r.getIterator());return}else if(this.listeners[n]){t.visitors=this.listeners[n];return}}e.pop()}walkSync(e){e[O]=!0;let t=ri(e);for(let r of t)if(r===W)e.nodes&&e.each(s=>{s[O]||this.walkSync(s)});else{let s=this.listeners[r];if(s&&this.visitSync(s,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"}};V.registerPostcss=i=>{_t=i};var ii=V;V.default=V;Sl.registerLazyResult(V);bl.registerLazyResult(V);let Il=Us,Ol=Ze;let Rl=nr;const El=rr;let zt=class{constructor(e,t,r){t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=r,this._map=void 0;let s,o=Ol;this.result=new El(this._processor,s,this._opts),this.result.css=t;let n=this;Object.defineProperty(this.result,"root",{get(){return n.root}});let a=new Il(o,s,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=Rl;try{e=t(this._css,this._opts)}catch(r){this.error=r}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}};var Pl=zt;zt.default=zt;let Ml=Pl,Nl=ii,kl=tr,Bl=ae,se=class{constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let r of e)if(r.postcss===!0?r=r():r.postcss&&(r=r.postcss),typeof r=="object"&&Array.isArray(r.plugins))t=t.concat(r.plugins);else if(typeof r=="object"&&r.postcssPlugin)t.push(r);else if(typeof r=="function")t.push(r);else if(!(typeof r=="object"&&(r.parse||r.stringify)))throw new Error(r+" is not a PostCSS plugin");return t}process(e,t={}){return!this.plugins.length&&!t.parser&&!t.stringifier&&!t.syntax?new Ml(this,e,t):new Nl(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var Ll=se;se.default=se;Bl.registerProcessor(se);kl.registerProcessor(se);let Fl=Xe,Ul=Ns,_l=He,zl=sr,Dl=Ke,Tl=ae,Wl=ir;function ie(i,e){if(Array.isArray(i))return i.map(n=>ie(n));let s=i,{inputs:t}=s,r=j(s,["inputs"]);if(t){e=[];for(let n of t){let a=E(S({},n),{__proto__:Dl.prototype});a.map&&(a.map=E(S({},a.map),{__proto__:Ul.prototype})),e.push(a)}}if(r.nodes&&(r.nodes=i.nodes.map(n=>ie(n,e))),r.source){let o=r.source,{inputId:n}=o,a=j(o,["inputId"]);r.source=a,n!=null&&(r.source.input=e[n])}if(r.type==="root")return new Tl(r);if(r.type==="decl")return new Fl(r);if(r.type==="rule")return new Wl(r);if(r.type==="comment")return new _l(r);if(r.type==="atrule")return new zl(r);throw new Error("Unknown node type: "+i.type)}var Vl=ie;ie.default=ie;let Gl=Qt,ni=Xe,Yl=ii,jl=F,or=Ll,Zl=Ze,Jl=Vl,oi=tr,Xl=Xs,li=He,ai=sr,Kl=rr,Hl=Ke,Ql=nr,ql=ei,ui=ir,hi=ae,ea=Je;function w(...i){return i.length===1&&Array.isArray(i[0])&&(i=i[0]),new or(i)}w.plugin=function(e,t){let r=!1;function s(...n){console&&console.warn&&!r&&(r=!0,console.warn(e+`: postcss.plugin was deprecated. Migration guide:
|
|
63
|
+
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:
|
|
64
|
+
https://www.w3ctech.com/topic/2226`));let a=t(...n);return a.postcssPlugin=e,a.postcssVersion=new or().version,a}let o;return Object.defineProperty(s,"postcss",{get(){return o||(o=s()),o}}),s.process=function(n,a,l){return w([s(l)]).process(n,a)},s};w.stringify=Zl;w.parse=Ql;w.fromJSON=Jl;w.list=ql;w.comment=i=>new li(i);w.atRule=i=>new ai(i);w.decl=i=>new ni(i);w.rule=i=>new ui(i);w.root=i=>new hi(i);w.document=i=>new oi(i);w.CssSyntaxError=Gl;w.Declaration=ni;w.Container=jl;w.Processor=or;w.Document=oi;w.Comment=li;w.Warning=Xl;w.AtRule=ai;w.Result=Kl;w.Input=Hl;w.Rule=ui;w.Root=hi;w.Node=ea;Yl.registerPostcss(w);var ta=w;w.default=w;const x=co(ta);x.stringify;x.fromJSON;x.plugin;x.parse;x.list;x.document;x.comment;x.atRule;x.rule;x.decl;x.root;x.CssSyntaxError;x.Declaration;x.Container;x.Processor;x.Document;x.Comment;x.Warning;x.AtRule;x.Result;x.Input;x.Rule;x.Root;x.Node;const U=`Please stop import mirror directly. Instead of that,\r
|
|
65
|
+
now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
|
|
66
|
+
or you can use record.mirror to access the mirror instance during recording.`;let Gr={map:{},getId(){return console.error(U),-1},getNode(){return console.error(U),null},removeNodeFromMap(){console.error(U)},has(){return console.error(U),!1},reset(){console.error(U)}};typeof window!="undefined"&&window.Proxy&&window.Reflect&&(Gr=new Proxy(Gr,{get(i,e,t){return e==="map"&&console.error(U),Reflect.get(i,e,t)}}));Date.now().toString();var Yr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ra=typeof Uint8Array=="undefined"?[]:new Uint8Array(256);for(var Re=0;Re<Yr.length;Re++)ra[Yr.charCodeAt(Re)]=Re;const sa="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=",ia=i=>Uint8Array.from(atob(i),e=>e.charCodeAt(0));typeof window!="undefined"&&window.Blob&&new Blob([ia(sa)],{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=((hr=i.contentWindow)==null?void 0:hr.Array.from)||Array.from,document.body.removeChild(i)}}catch(i){console.debug("Unable to override Array.from",i)}xi();var jr;(function(i){i[i.NotStarted=0]="NotStarted",i[i.Running=1]="Running",i[i.Stopped=2]="Stopped"})(jr||(jr={}));const na="rrweb/console@1";var Dt=(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))(Dt||{}),fi=(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))(fi||{});const Ee="__rrweb_original__",oa={level:["assert","clear","count","countReset","debug","dir","dirxml","error","group","groupCollapsed","groupEnd","info","log","table","time","timeEnd","timeLog","trace","warn"],replayLogger:void 0};class la{constructor(e){wi(this,"config"),this.config=Object.assign(oa,e)}getConsoleLogger(){const e={};for(const t of this.config.level)t==="trace"?e[t]=r=>{(console.log[Ee]?console.log[Ee]:console.log)(...r.payload.map(o=>JSON.parse(o)),this.formatMessage(r))}:e[t]=r=>{(console[t][Ee]?console[t][Ee]:console[t])(...r.payload.map(o=>JSON.parse(o)),this.formatMessage(r))};return e}formatMessage(e){if(e.trace.length===0)return"";const t=`
|
|
67
|
+
at `;let r=t;return r+=e.trace.join(t),r}}const aa=i=>{const e=(i==null?void 0:i.replayLogger)||new la(i).getConsoleLogger();return{handler(t,r,s){let o=null;if(t.type===Dt.IncrementalSnapshot&&t.data.source===fi.Log?o=t.data:t.type===Dt.Plugin&&t.data.plugin===na&&(o=t.data.payload),o)try{typeof e[o.level]=="function"&&e[o.level](o)}catch(n){s.replayer.config.showWarning&&console.warn(n)}}}};exports.getReplayConsolePlugin=aa;
|
|
68
|
+
if (typeof module.exports == "object" && typeof exports == "object") {
|
|
69
|
+
var __cp = (to, from, except, desc) => {
|
|
70
|
+
if ((from && typeof from === "object") || typeof from === "function") {
|
|
71
|
+
for (let key of Object.getOwnPropertyNames(from)) {
|
|
72
|
+
if (!Object.prototype.hasOwnProperty.call(to, key) && key !== except)
|
|
73
|
+
Object.defineProperty(to, key, {
|
|
74
|
+
get: () => from[key],
|
|
75
|
+
enumerable: !(desc = Object.getOwnPropertyDescriptor(from, key)) || desc.enumerable,
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
return to;
|
|
80
|
+
};
|
|
81
|
+
module.exports = __cp(module.exports, exports);
|
|
82
|
+
}
|
|
83
|
+
return module.exports;
|
|
84
|
+
}))
|
|
85
|
+
//# sourceMappingURL=rrweb-plugin-console-replay.umd.min.cjs.map
|