UNPKG

next

Version:

The React Framework

1 lines • 38.6 kB
(()=>{var e={831:e=>{let t=process||{},r=t.argv||[],s=t.env||{};let i=!(!!s.NO_COLOR||r.includes("--no-color"))&&(!!s.FORCE_COLOR||r.includes("--color")||t.platform==="win32"||(t.stdout||{}).isTTY&&s.TERM!=="dumb"||!!s.CI);let formatter=(e,t,r=e)=>s=>{let i=""+s,n=i.indexOf(t,e.length);return~n?e+replaceClose(i,t,r,n)+t:e+i+t};let replaceClose=(e,t,r,s)=>{let i="",n=0;do{i+=e.substring(n,s)+r;n=s+t.length;s=e.indexOf(t,n)}while(~s);return i+e.substring(n)};let createColors=(e=i)=>{let t=e?formatter:()=>String;return{isColorSupported:e,reset:t("",""),bold:t("","",""),dim:t("","",""),italic:t("",""),underline:t("",""),inverse:t("",""),hidden:t("",""),strikethrough:t("",""),black:t("",""),red:t("",""),green:t("",""),yellow:t("",""),blue:t("",""),magenta:t("",""),cyan:t("",""),white:t("",""),gray:t("",""),bgBlack:t("",""),bgRed:t("",""),bgGreen:t("",""),bgYellow:t("",""),bgBlue:t("",""),bgMagenta:t("",""),bgCyan:t("",""),bgWhite:t("",""),blackBright:t("",""),redBright:t("",""),greenBright:t("",""),yellowBright:t("",""),blueBright:t("",""),magentaBright:t("",""),cyanBright:t("",""),whiteBright:t("",""),bgBlackBright:t("",""),bgRedBright:t("",""),bgGreenBright:t("",""),bgYellowBright:t("",""),bgBlueBright:t("",""),bgMagentaBright:t("",""),bgCyanBright:t("",""),bgWhiteBright:t("","")}};e.exports=createColors();e.exports.createColors=createColors},476:(e,t,r)=>{let{Input:s}=r(940);let i=r(540);e.exports=function safeParse(e,t){let r=new s(e,t);let n=new i(r);n.parse();return n.root}},540:(e,t,r)=>{let s=r(298);let i=r(866);let n=r(736);class SafeParser extends n{createTokenizer(){this.tokenizer=s(this.input,{ignoreErrors:true})}comment(e){let t=new i;this.init(t,e[2]);let r=this.input.fromOffset(e[3])||this.input.fromOffset(this.input.css.length-1);t.source.end={offset:e[3],line:r.line,column:r.col};let s=e[1].slice(2);if(s.slice(-2)==="*/")s=s.slice(0,-2);if(/^\s*$/.test(s)){t.text="";t.raws.left=s;t.raws.right=""}else{let e=s.match(/^(\s*)([^]*\S)(\s*)$/);t.text=e[2];t.raws.left=e[1];t.raws.right=e[3]}}decl(e){if(e.length>1&&e.some((e=>e[0]==="word"))){super.decl(e)}}unclosedBracket(){}unknownWord(e){this.spaces+=e.map((e=>e[1])).join("")}unexpectedClose(){this.current.raws.after+="}"}doubleColon(){}unnamedAtrule(e){e.name=""}precheckMissedSemicolon(e){let t=this.colon(e);if(t===false)return;let r,s;for(r=t-1;r>=0;r--){if(e[r][0]==="word")break}if(r===0)return;for(s=r-1;s>=0;s--){if(e[s][0]!=="space"){s+=1;break}}let i=e.slice(r);let n=e.slice(s,r);e.splice(s,e.length-s);this.spaces=n.map((e=>e[1])).join("");this.decl(i)}checkMissedSemicolon(){}endFile(){if(this.current.nodes&&this.current.nodes.length){this.current.raws.semicolon=this.semicolon}this.current.raws.after=(this.current.raws.after||"")+this.spaces;while(this.current.parent){this.current=this.current.parent;this.current.raws.after=""}}}e.exports=SafeParser},277:(e,t,r)=>{"use strict";let s=r(32);class AtRule extends s{constructor(e){super(e);this.type="atrule"}append(...e){if(!this.proxyOf.nodes)this.nodes=[];return super.append(...e)}prepend(...e){if(!this.proxyOf.nodes)this.nodes=[];return super.prepend(...e)}}e.exports=AtRule;AtRule.default=AtRule;s.registerAtRule(AtRule)},866:(e,t,r)=>{"use strict";let s=r(455);class Comment extends s{constructor(e){super(e);this.type="comment"}}e.exports=Comment;Comment.default=Comment},32:(e,t,r)=>{"use strict";let s=r(866);let i=r(535);let n=r(455);let{isClean:o,my:l}=r(698);let f,a,u,c;function cleanSource(e){let t=e.slice();while(t.length>0){let e=t.pop();delete e.source;if(e.nodes){e.nodes=e.nodes.slice();for(let r of e.nodes)t.push(r)}}return e.slice()}function markTreeDirty(e){let t=[e];while(t.length>0){let e=t.pop();e[o]=false;if(e.proxyOf.nodes){for(let r of e.proxyOf.nodes)t.push(r)}}}class Container extends n{get first(){if(!this.proxyOf.nodes)return undefined;return this.proxyOf.nodes[0]}get last(){if(!this.proxyOf.nodes)return undefined;return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}append(...e){for(let t of e){let e=this.normalize(t,this.last);for(let t of e)this.proxyOf.nodes.push(t)}this.markDirty();return this}cleanRaws(e){let t=[this];while(t.length>0){let r=t.pop();if(r!==this&&r.cleanRaws!==Container.prototype.cleanRaws){r.cleanRaws(e);continue}n.prototype.cleanRaws.call(r,e);if(r.nodes){for(let e of r.nodes)t.push(e)}}}each(e){if(!this.proxyOf.nodes)return undefined;let t=this.getIterator();let r,s;while(this.indexes[t]<this.proxyOf.nodes.length){r=this.indexes[t];s=e(this.proxyOf.nodes[r],r);if(s===false)break;this.indexes[t]+=1}delete this.indexes[t];return s}every(e){return this.nodes.every(e)}getIterator(){if(!this.lastEach)this.lastEach=0;if(!this.indexes)this.indexes={};this.lastEach+=1;let e=this.lastEach;this.indexes[e]=0;return e}getProxyProcessor(){return{get(e,t){if(t==="proxyOf"){return e}else if(!e[t]){return e[t]}else if(t==="each"||typeof t==="string"&&t.startsWith("walk")){return(...r)=>e[t](...r.map((e=>{if(typeof e==="function"){return(t,r)=>e(t.toProxy(),r)}else{return e}})))}else if(t==="every"||t==="some"){return r=>e[t](((e,...t)=>r(e.toProxy(),...t)))}else if(t==="root"){return()=>e.root().toProxy()}else if(t==="nodes"){return e.nodes.map((e=>e.toProxy()))}else if(t==="first"||t==="last"){return e[t].toProxy()}else{return e[t]}},set(e,t,r){if(e[t]===r)return true;e[t]=r;if(t==="name"||t==="params"||t==="selector"){e.markDirty()}return true}}}index(e){if(typeof e==="number")return e;if(e.proxyOf)e=e.proxyOf;return this.proxyOf.nodes.indexOf(e)}insertAfter(e,t){let r=this.index(e);let s=this.normalize(t,this.proxyOf.nodes[r]).reverse();r=this.index(e);for(let e of s)this.proxyOf.nodes.splice(r+1,0,e);let i;for(let e in this.indexes){i=this.indexes[e];if(r<i){this.indexes[e]=i+s.length}}this.markDirty();return this}insertBefore(e,t){let r=this.index(e);let s=r===0?"prepend":false;let i=this.normalize(t,this.proxyOf.nodes[r],s).reverse();r=this.index(e);for(let e of i)this.proxyOf.nodes.splice(r,0,e);let n;for(let e in this.indexes){n=this.indexes[e];if(r<=n){this.indexes[e]=n+i.length}}this.markDirty();return this}normalize(e,t){if(typeof e==="string"){e=cleanSource(a(e).nodes)}else if(typeof e==="undefined"){e=[]}else if(Array.isArray(e)){e=e.slice(0);for(let t of e){if(t.parent)t.parent.removeChild(t,"ignore")}}else if(e.type==="root"&&this.type!=="document"){e=e.nodes.slice(0);for(let t of e){if(t.parent)t.parent.removeChild(t,"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")}else if(typeof e.value!=="string"){e.value=String(e.value)}e=[new i(e)]}else if(e.selector||e.selectors){e=[new c(e)]}else if(e.name){e=[new f(e)]}else if(e.text){e=[new s(e)]}else{throw new Error("Unknown node type in node creation")}let r=e.map((e=>{if(!e[l])Container.rebuild(e);e=e.proxyOf;if(e.parent)e.parent.removeChild(e);if(e[o])markTreeDirty(e);if(!e.raws)e.raws={};if(typeof e.raws.before==="undefined"){if(t&&typeof t.raws.before!=="undefined"){e.raws.before=t.raws.before.replace(/\S/g,"")}}e.parent=this.proxyOf;return e}));return r}prepend(...e){e=e.reverse();for(let t of e){let e=this.normalize(t,this.first,"prepend").reverse();for(let t of e)this.proxyOf.nodes.unshift(t);for(let t in this.indexes){this.indexes[t]=this.indexes[t]+e.length}}this.markDirty();return this}push(e){e.parent=this;this.proxyOf.nodes.push(e);return this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=undefined;this.proxyOf.nodes=[];this.markDirty();return this}removeChild(e){e=this.index(e);this.proxyOf.nodes[e].parent=undefined;this.proxyOf.nodes.splice(e,1);let t;for(let r in this.indexes){t=this.indexes[r];if(t>=e){this.indexes[r]=t-1}}this.markDirty();return this}replaceValues(e,t,r){if(!r){r=t;t={}}this.walkDecls((s=>{if(t.props&&!t.props.includes(s.prop))return;if(t.fast&&!s.value.includes(t.fast))return;s.value=s.value.replace(e,r)}));this.markDirty();return this}some(e){return this.nodes.some(e)}walk(e){if(!this.proxyOf.nodes)return undefined;let t=[{iterator:this.getIterator(),node:this.proxyOf}];while(t.length>0){let{iterator:r,node:s}=t[t.length-1];let i=s.indexes[r];if(i>=s.proxyOf.nodes.length){delete s.indexes[r];t.pop();let e=t[t.length-1];if(e)e.node.indexes[e.iterator]+=1;continue}let n=s.proxyOf.nodes[i];let o;try{o=e(n,i)}catch(e){throw n.addToError(e)}if(o===false){for(let e of t){delete e.node.indexes[e.iterator]}return false}if(n.walk&&n.proxyOf.nodes){t.push({iterator:n.getIterator(),node:n})}else{s.indexes[r]+=1}}return undefined}walkAtRules(e,t){if(!t){t=e;return this.walk(((e,r)=>{if(e.type==="atrule"){return t(e,r)}}))}if(e instanceof RegExp){return this.walk(((r,s)=>{if(r.type==="atrule"&&e.test(r.name)){return t(r,s)}}))}return this.walk(((r,s)=>{if(r.type==="atrule"&&r.name===e){return t(r,s)}}))}walkComments(e){return this.walk(((t,r)=>{if(t.type==="comment"){return e(t,r)}}))}walkDecls(e,t){if(!t){t=e;return this.walk(((e,r)=>{if(e.type==="decl"){return t(e,r)}}))}if(e instanceof RegExp){return this.walk(((r,s)=>{if(r.type==="decl"&&e.test(r.prop)){return t(r,s)}}))}return this.walk(((r,s)=>{if(r.type==="decl"&&r.prop===e){return t(r,s)}}))}walkRules(e,t){if(!t){t=e;return this.walk(((e,r)=>{if(e.type==="rule"){return t(e,r)}}))}if(e instanceof RegExp){return this.walk(((r,s)=>{if(r.type==="rule"&&e.test(r.selector)){return t(r,s)}}))}return this.walk(((r,s)=>{if(r.type==="rule"&&r.selector===e){return t(r,s)}}))}}Container.registerParse=e=>{a=e};Container.registerRule=e=>{c=e};Container.registerAtRule=e=>{f=e};Container.registerRoot=e=>{u=e};e.exports=Container;Container.default=Container;Container.rebuild=e=>{let t=[e];while(t.length>0){let e=t.pop();if(e.type==="atrule"){Object.setPrototypeOf(e,f.prototype)}else if(e.type==="rule"){Object.setPrototypeOf(e,c.prototype)}else if(e.type==="decl"){Object.setPrototypeOf(e,i.prototype)}else if(e.type==="comment"){Object.setPrototypeOf(e,s.prototype)}else if(e.type==="root"){Object.setPrototypeOf(e,u.prototype)}e[l]=true;if(e.nodes){for(let r of e.nodes)t.push(r)}}}},505:(e,t,r)=>{"use strict";let s=r(831);let i=r(370);class CssSyntaxError extends Error{constructor(e,t,r,s,i,n){super(e);this.name="CssSyntaxError";this.reason=e;if(i){this.file=i}if(s){this.source=s}if(n){this.plugin=n}if(typeof t!=="undefined"&&typeof r!=="undefined"){if(typeof t==="number"){this.line=t;this.column=r}else{this.line=t.line;this.column=t.column;this.endLine=r.line;this.endColumn=r.column}}this.setMessage();if(Error.captureStackTrace){Error.captureStackTrace(this,CssSyntaxError)}}setMessage(){this.message=this.plugin?this.plugin+": ":"";this.message+=this.file?this.file:"<css input>";if(typeof this.line!=="undefined"){this.message+=":"+this.line+":"+this.column}this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let t=this.source;if(e==null)e=s.isColorSupported;let aside=e=>e;let mark=e=>e;let highlight=e=>e;if(e){let{bold:e,gray:t,red:r}=s.createColors(true);mark=t=>e(r(t));aside=e=>t(e);if(i){highlight=e=>i(e)}}let r=t.split(/\r?\n/);let n=Math.max(this.line-3,0);let o=Math.min(this.line+2,r.length);let l=String(o).length;return r.slice(n,o).map(((e,t)=>{let r=n+1+t;let s=" "+(" "+r).slice(-l)+" | ";if(r===this.line){if(e.length>160){let t=20;let r=Math.max(0,this.column-t);let i=Math.max(this.column+t,this.endColumn+t);let n=e.slice(r,i);let o=aside(s.replace(/\d/g," "))+e.slice(0,Math.min(this.column-1,t-1)).replace(/[^\t]/g," ");return mark(">")+aside(s)+highlight(n)+"\n "+o+mark("^")}let t=aside(s.replace(/\d/g," "))+e.slice(0,this.column-1).replace(/[^\t]/g," ");return mark(">")+aside(s)+highlight(e)+"\n "+t+mark("^")}return" "+aside(s)+highlight(e)})).join("\n")}toString(){let e=this.showSourceCode();if(e){e="\n\n"+e+"\n"}return this.name+": "+this.message+e}}e.exports=CssSyntaxError;CssSyntaxError.default=CssSyntaxError},535:(e,t,r)=>{"use strict";let s=r(455);class Declaration extends s{get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}constructor(e){if(e&&typeof e.value!=="undefined"&&typeof e.value!=="string"){e={...e,value:String(e.value)}}super(e);this.type="decl"}}e.exports=Declaration;Declaration.default=Declaration},779:e=>{"use strict";let t={comma(e){return t.split(e,[","],true)},space(e){let r=[" ","\n","\t"];return t.split(e,r)},split(e,t,r){let s=[];let i="";let n=false;let o=0;let l=false;let f="";let a=false;for(let r of e){if(a){a=false}else if(r==="\\"){a=true}else if(l){if(r===f){l=false}}else if(r==='"'||r==="'"){l=true;f=r}else if(r==="("){o+=1}else if(r===")"){if(o>0)o-=1}else if(o===0){if(t.includes(r))n=true}if(n){if(i!=="")s.push(i.trim());i="";n=false}else{i+=r}}if(r||i!=="")s.push(i.trim());return s}};e.exports=t;t.default=t},455:(e,t,r)=>{"use strict";let s=r(505);let i=r(689);let n=r(862);let{isClean:o,my:l}=r(698);function cloneNode(e,t){let r=new e.constructor;let s=[[e,r,t]];while(s.length>0){let[e,t,r]=s.pop();for(let i in e){if(!Object.prototype.hasOwnProperty.call(e,i)){continue}if(i==="proxyCache")continue;let n=e[i];let o=typeof n;if(i==="parent"&&o==="object"){if(r)t[i]=r}else if(i==="source"){t[i]=n}else if(Array.isArray(n)){let e=[];t[i]=e;for(let r of n){let i=new r.constructor;e.push(i);s.push([r,i,t])}}else{if(o==="object"&&n!==null){let e=new n.constructor;s.push([n,e,undefined]);n=e}t[i]=n}}}return r}function sourceOffset(e,t){if(t&&typeof t.offset!=="undefined"){return t.offset}let r=1;let s=1;let i=0;for(let n=0;n<e.length;n++){if(s===t.line&&r===t.column){i=n;break}if(e[n]==="\n"){r=1;s+=1}else{r+=1}}return i}class Node{get proxyOf(){return this}constructor(e={}){this.raws={};this[o]=false;this[l]=true;for(let t of Object.keys(e)){if(t==="__proto__")continue;if(t==="nodes"){this.nodes=[];for(let r of e[t]){if(typeof r.clone==="function"&&r.parent){this.append(r.clone())}else{this.append(r)}}}else{this[t]=e[t]}}}addToError(e){e.postcssNode=this;if(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){this.parent.insertAfter(this,e);return this}assign(e={}){for(let t in e){this[t]=e[t]}return this}before(e){this.parent.insertBefore(this,e);return this}cleanRaws(e){delete this.raws.before;delete this.raws.after;if(!e)delete this.raws.between}clone(e={}){let t=cloneNode(this);for(let r in e){t[r]=e[r]}return t}cloneAfter(e={}){let t=this.clone(e);this.parent.insertAfter(this,t);return t}cloneBefore(e={}){let t=this.clone(e);this.parent.insertBefore(this,t);return 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 s(e)}getProxyProcessor(){return{get(e,t){if(t==="proxyOf"){return e}else if(t==="root"){return()=>e.root().toProxy()}else{return e[t]}},set(e,t,r){if(e[t]===r)return true;e[t]=r;if(t==="prop"||t==="value"||t==="name"||t==="params"||t==="important"||t==="text"){e.markDirty()}return true}}}markClean(){this[o]=true}markDirty(){if(this[o]){this[o]=false;let e=this;while(e=e.parent){e[o]=false}}}next(){if(!this.parent)return undefined;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e={}){let t="document"in this.source.input?this.source.input.document:this.source.input.css;let r={column:this.source.start.column,line:this.source.start.line,offset:sourceOffset(t,this.source.start)};if(e.index){r=this.positionInside(e.index)}else if(e.word){let s=t.slice(sourceOffset(t,this.source.start),sourceOffset(t,this.source.end));let i=s.indexOf(e.word);if(i!==-1)r=this.positionInside(i)}return r}positionInside(e){let t=this.source.start.column;let r=this.source.start.line;let s="document"in this.source.input?this.source.input.document:this.source.input.css;let i=sourceOffset(s,this.source.start);let n=i+e;for(let e=i;e<n;e++){if(s[e]==="\n"){t=1;r+=1}else{t+=1}}return{column:t,line:r,offset:n}}prev(){if(!this.parent)return undefined;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e={}){let t="document"in this.source.input?this.source.input.document:this.source.input.css;let r={column:this.source.start.column,line:this.source.start.line,offset:sourceOffset(t,this.source.start)};let s=this.source.end?{column:this.source.end.column+1,line:this.source.end.line,offset:typeof this.source.end.offset==="number"?this.source.end.offset:sourceOffset(t,this.source.end)+1}:{column:r.column+1,line:r.line,offset:r.offset+1};if(e.word){let i=t.slice(sourceOffset(t,this.source.start),sourceOffset(t,this.source.end));let n=i.indexOf(e.word);if(n!==-1){r=this.positionInside(n);s=this.positionInside(n+e.word.length)}}else{if(e.start){r={column:e.start.column,line:e.start.line,offset:sourceOffset(t,e.start)}}else if(typeof e.index==="number"){r=this.positionInside(e.index)}if(e.end){s={column:e.end.column,line:e.end.line,offset:sourceOffset(t,e.end)}}else if(typeof e.endIndex==="number"){s=this.positionInside(e.endIndex)}else if(typeof e.index==="number"){s=this.positionInside(e.index+1)}}if(s.line<r.line||s.line===r.line&&s.column<=r.column){s={column:r.column+1,line:r.line,offset:r.offset+1}}return{end:s,start:r}}raw(e,t){let r=new i;return r.raw(this,e,t)}remove(){if(this.parent){this.parent.removeChild(this)}this.parent=undefined;return this}replaceWith(...e){if(this.parent){let t=this;let r=false;for(let s of e){if(s===this){r=true}else if(r){this.parent.insertAfter(t,s);t=s}else{this.parent.insertBefore(t,s)}}if(!r){this.remove()}}return this}root(){let e=this;while(e.parent&&e.parent.type!=="document"){e=e.parent}return e}toJSON(e,t){let r=t==null;t=t||new Map;let s=[];let i=[[this,s,0]];for(let e=0;e<i.length;e++){let[r,s,n]=i[e];let o={};s[n]=o;for(let e in r){if(!Object.prototype.hasOwnProperty.call(r,e)){continue}if(e==="parent"||e==="proxyCache")continue;let s=r[e];if(Array.isArray(s)){let r=[];o[e]=r;for(let e=0;e<s.length;e++){let n=s[e];if(typeof n==="object"&&n.toJSON){if(n.toJSON===Node.prototype.toJSON){i.push([n,r,e])}else{r[e]=n.toJSON(null,t)}}else{r[e]=n}}}else if(typeof s==="object"&&s.toJSON){if(s.toJSON===Node.prototype.toJSON){i.push([s,o,e])}else{o[e]=s.toJSON(null,t)}}else if(e==="source"){if(s==null)continue;let r=t.get(s.input);if(r==null){r=t.size;t.set(s.input,r)}o[e]={end:s.end,inputId:r,start:s.start}}else{o[e]=s}}}let n=s[0];if(r){n.inputs=[...t.keys()].map((e=>e.toJSON()))}return n}toProxy(){if(!this.proxyCache){this.proxyCache=new Proxy(this,this.getProxyProcessor())}return this.proxyCache}toString(e=n){if(e.stringify)e=e.stringify;let t="";e(this,(e=>{t+=e}));return t}warn(e,t,r={}){let s={node:this};for(let e in r)s[e]=r[e];return e.warn(t,s)}}e.exports=Node;Node.default=Node},736:(e,t,r)=>{"use strict";let s=r(277);let i=r(866);let n=r(535);let o=r(883);let l=r(301);let f=r(298);const a={empty:true,space:true};function findLastWithPosition(e){for(let t=e.length-1;t>=0;t--){let r=e[t];let s=r[3]||r[2];if(s)return s}}function tokensToString(e,t,r){let s="";for(let i=t;i<r;i++)s+=e[i][1];return s}class Parser{constructor(e){this.input=e;this.root=new o;this.current=this.root;this.spaces="";this.semicolon=false;this.createTokenizer();this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t=new s;t.name=e[1].slice(1);if(t.name===""){this.unnamedAtrule(t,e)}this.init(t,e[2]);let r;let i;let n;let o=false;let l=false;let f=[];let a=[];while(!this.tokenizer.endOfFile()){e=this.tokenizer.nextToken();r=e[0];if(r==="("||r==="["){a.push(r==="("?")":"]")}else if(r==="{"&&a.length>0){a.push("}")}else if(r===a[a.length-1]){a.pop()}if(a.length===0){if(r===";"){t.source.end=this.getPosition(e[2]);t.source.end.offset++;this.semicolon=true;break}else if(r==="{"){l=true;break}else if(r==="}"){if(f.length>0){n=f.length-1;i=f[n];while(i&&i[0]==="space"){i=f[--n]}if(i){t.source.end=this.getPosition(i[3]||i[2]);t.source.end.offset++}}this.end(e);break}else{f.push(e)}}else{f.push(e)}if(this.tokenizer.endOfFile()){o=true;break}}t.raws.between=this.spacesAndCommentsFromEnd(f);if(f.length){t.raws.afterName=this.spacesAndCommentsFromStart(f);this.raw(t,"params",f);if(o){e=f[f.length-1];t.source.end=this.getPosition(e[3]||e[2]);t.source.end.offset++;this.spaces=t.raws.between;t.raws.between=""}}else{t.raws.afterName="";t.params=""}if(l){t.nodes=[];this.current=t}}checkMissedSemicolon(e){let t=this.colon(e);if(t===false)return;let r=0;let s;for(let i=t-1;i>=0;i--){s=e[i];if(s[0]!=="space"){r+=1;if(r===2)break}}throw this.input.error("Missed semicolon",s[0]==="word"?s[3]+1:s[2])}colon(e){let t=0;let r,s,i;for(let[n,o]of e.entries()){s=o;i=s[0];if(i==="("){t+=1}if(i===")"){t-=1}if(t===0&&i===":"){if(!r){this.doubleColon(s)}else if(r[0]==="word"&&r[1]==="progid"){continue}else{return n}}r=s}return false}comment(e){let t=new i;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(!r.trim()){t.text="";t.raws.left=r;t.raws.right=""}else{let e=r.match(/^(\s*)([^]*\S)(\s*)$/);t.text=e[2];t.raws.left=e[1];t.raws.right=e[3]}}createTokenizer(){this.tokenizer=f(this.input)}decl(e,t){let r=new n;this.init(r,e[0][2]);let s=e[e.length-1];if(s[0]===";"){this.semicolon=true;e.pop()}r.source.end=this.getPosition(s[3]||s[2]||findLastWithPosition(e));r.source.end.offset++;let i=0;while(e[i][0]!=="word"){if(i===e.length-1)this.unknownWord([e[i]]);i++}r.raws.before+=tokensToString(e,0,i);r.source.start=this.getPosition(e[i][2]);let o=i;while(i<e.length){let t=e[i][0];if(t===":"||t==="space"||t==="comment"){break}i++}r.prop=tokensToString(e,o,i);let l=i;let f;while(i<e.length){f=e[i];i++;if(f[0]===":")break;if(f[0]==="word"&&/\w/.test(f[1])){this.unknownWord([f])}}r.raws.between=tokensToString(e,l,i);if(r.prop[0]==="_"||r.prop[0]==="*"){r.raws.before+=r.prop[0];r.prop=r.prop.slice(1)}let a=i;while(i<e.length){let t=e[i][0];if(t!=="space"&&t!=="comment")break;i++}let u=e.slice(a,i);e=e.slice(i);this.precheckMissedSemicolon(e);for(let t=e.length-1;t>=0;t--){f=e[t];if(f[1].toLowerCase()==="!important"){r.important=true;let s=this.stringFrom(e,t);s=this.spacesFromEnd(e)+s;if(s!==" !important")r.raws.important=s;break}else if(f[1].toLowerCase()==="important"){let s=e.slice(0);let i="";for(let e=t;e>0;e--){let t=s[e][0];if(i.trim().startsWith("!")&&t!=="space"){break}i=s.pop()[1]+i}if(i.trim().startsWith("!")){r.important=true;r.raws.important=i;e=s}}if(f[0]!=="space"&&f[0]!=="comment"){break}}let c=e.some((e=>e[0]!=="space"&&e[0]!=="comment"));if(c){r.raws.between+=u.map((e=>e[1])).join("");u=[]}this.raw(r,"value",u.concat(e),t);if(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 l;this.init(t,e[2]);t.selector="";t.raws.between="";this.current=t}end(e){if(this.current.nodes&&this.current.nodes.length){this.current.raws.semicolon=this.semicolon}this.semicolon=false;this.current.raws.after=(this.current.raws.after||"")+this.spaces;this.spaces="";if(this.current.parent){this.current.source.end=this.getPosition(e[2]);this.current.source.end.offset++;this.current=this.current.parent}else{this.unexpectedClose(e)}}endFile(){if(this.current.parent)this.unclosedBlock();if(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){this.spaces+=e[1];if(this.current.nodes){let t=this.current.nodes[this.current.nodes.length-1];if(t&&t.type==="rule"&&!t.raws.ownSemicolon){t.raws.ownSemicolon=this.spaces;this.spaces="";t.source.end=this.getPosition(e[2]);t.source.end.offset+=t.raws.ownSemicolon.length}}}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="";if(e.type!=="comment")this.semicolon=false}other(e){let t=false;let r=null;let s=false;let i=null;let n=[];let o=e[1].startsWith("--");let l=[];let f=e;while(f){r=f[0];l.push(f);if(r==="("||r==="["){if(!i)i=f;n.push(r==="("?")":"]")}else if(o&&s&&r==="{"){if(!i)i=f;n.push("}")}else if(n.length===0){if(r===";"){if(s){this.decl(l,o);return}else{break}}else if(r==="{"){this.rule(l);return}else if(r==="}"){this.tokenizer.back(l.pop());t=true;break}else if(r===":"){s=true}}else if(r===n[n.length-1]){n.pop();if(n.length===0)i=null}f=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile())t=true;if(n.length>0)this.unclosedBracket(i);if(t&&s){if(!o){while(l.length){f=l[l.length-1][0];if(f!=="space"&&f!=="comment")break;this.tokenizer.back(l.pop())}}this.decl(l,o)}else{this.unknownWord(l)}}parse(){let e;while(!this.tokenizer.endOfFile()){e=this.tokenizer.nextToken();switch(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 i,n;let o=r.length;let l="";let f=true;let u,c;for(let e=0;e<o;e+=1){i=r[e];n=i[0];if(n==="space"&&e===o-1&&!s){f=false}else if(n==="comment"){c=r[e-1]?r[e-1][0]:"empty";u=r[e+1]?r[e+1][0]:"empty";if(!a[c]&&!a[u]){if(l.slice(-1)===","){f=false}else{l+=i[1]}}else{f=false}}else{l+=i[1]}}if(!f){let s=r.reduce(((e,t)=>e+t[1]),"");e.raws[t]={raw:s,value:l}}e[t]=l}rule(e){e.pop();let t=new l;this.init(t,e[0][2]);t.raws.between=this.spacesAndCommentsFromEnd(e);this.raw(t,"selector",e);this.current=t}spacesAndCommentsFromEnd(e){let t;let r="";while(e.length){t=e[e.length-1][0];if(t!=="space"&&t!=="comment")break;r=e.pop()[1]+r}return r}spacesAndCommentsFromStart(e){let t;let r="";while(e.length){t=e[0][0];if(t!=="space"&&t!=="comment")break;r+=e.shift()[1]}return r}spacesFromEnd(e){let t;let r="";while(e.length){t=e[e.length-1][0];if(t!=="space")break;r=e.pop()[1]+r}return r}stringFrom(e,t){let r="";for(let s=t;s<e.length;s++){r+=e[s][1]}e.splice(t,e.length-t);return 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 "+e[0][1],{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})}}e.exports=Parser},883:(e,t,r)=>{"use strict";let s=r(32);let i,n;class Root extends s{constructor(e){super(e);this.type="root";if(!this.nodes)this.nodes=[]}normalize(e,t,r){let s=new Set;for(let t of Array.isArray(e)?e:[e]){if(t&&typeof t==="object"&&!t.parent&&t.raws&&typeof t.raws.before!=="undefined"){s.add(t.raws)}}let i=super.normalize(e);if(t){if(r==="prepend"){if(this.nodes.length>1){t.raws.before=this.nodes[1].raws.before}else{delete t.raws.before}}else if(this.first!==t){for(let e of i){if(!s.has(e.raws)){e.raws.before=t.raws.before}}}}return i}removeChild(e,t){let r=this.index(e);if(!t&&r===0&&this.nodes.length>1){this.nodes[1].raws.before=this.nodes[r].raws.before}return super.removeChild(e)}toResult(e={}){let t=new i(new n,this,e);return t.stringify()}}Root.registerLazyResult=e=>{i=e};Root.registerProcessor=e=>{n=e};e.exports=Root;Root.default=Root;s.registerRoot(Root)},301:(e,t,r)=>{"use strict";let s=r(32);let i=r(779);class Rule extends s{get selectors(){return i.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null;let r=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(r)}constructor(e){super(e);this.type="rule";if(!this.nodes)this.nodes=[]}}e.exports=Rule;Rule.default=Rule;s.registerRule(Rule)},689:e=>{"use strict";const t=/(<)(\/?style\b)/gi;const r=/(<)(!--)/g;const s=/[\t\n\f\r "#'()/;[\\\]{}]/;function escapeHTMLInCSS(e){if(typeof e!=="string")return e;if(!e.includes("<"))return e;return e.replace(t,"\\3c $2").replace(r,"\\3c $2")}const i={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:false};function capitalize(e){return e[0].toUpperCase()+e.slice(1)}function atruleStart(e,t){let r="@"+t.name;let i=t.params?e.rawValue(t,"params"):"";let n=t.raws.afterName;if(typeof n==="undefined"){n=i?" ":""}else if(n===""&&i&&!s.test(i[0])){n=" "}return r+n+i}function pushBody(e,t,r){let s=r.nodes;let i=s.length-1;while(i>0){if(s[i].type!=="comment")break;i-=1}let n=e.raw(r,"semicolon");let o=r.type==="document";for(let e=s.length-1;e>=0;e--){let r=s[e];let l=i!==e||n;if(!l&&e<s.length-1&&(r.type==="atrule"&&!r.nodes||r.type==="decl"&&r.prop.startsWith("--"))){l=true}t.push({document:o,node:r,semicolon:l})}}function pushBlock(e,t,r,s){let i=e.raw(r,"between","beforeOpen");e.builder(escapeHTMLInCSS(s+i)+"{",r,"start");let n=r.nodes&&r.nodes.length;let close=()=>{let t=n?e.raw(r,"after"):e.raw(r,"after","emptyBody");if(t)e.builder(escapeHTMLInCSS(t));e.builder("}",r,"end");if(r.type==="rule"&&r.raws.ownSemicolon){e.builder(escapeHTMLInCSS(r.raws.ownSemicolon),r,"end")}};if(n){t.push(close);pushBody(e,t,r)}else{close()}}class Stringifier{constructor(e){this.builder=e}atrule(e,t){let r=atruleStart(this,e);if(e.nodes){this.block(e,r)}else{let s=(e.raws.between||"")+(t?";":"");this.builder(escapeHTMLInCSS(r+s),e)}}beforeAfter(e,t){let r;if(e.type==="decl"){r=this.raw(e,null,"beforeDecl")}else if(e.type==="comment"){r=this.raw(e,null,"beforeComment")}else if(t==="before"){r=this.raw(e,null,"beforeRule")}else{r=this.raw(e,null,"beforeClose")}let s=e.parent;let i=0;while(s&&s.type!=="root"){i+=1;s=s.parent}if(r.includes("\n")){let t=this.raw(e,null,"indent");if(t.length){for(let e=0;e<i;e++)r+=t}}return r}block(e,t){let r=this.raw(e,"between","beforeOpen");this.builder(escapeHTMLInCSS(t+r)+"{",e,"start");let s;if(e.nodes&&e.nodes.length){this.body(e);s=this.raw(e,"after")}else{s=this.raw(e,"after","emptyBody")}if(s)this.builder(escapeHTMLInCSS(s));this.builder("}",e,"end")}body(e){let t=Stringifier.prototype;let r=["atrule","block","body","rule","stringify"].every((e=>this[e]===t[e]));let s=[];pushBody(this,s,e);while(s.length>0){let e=s.pop();if(typeof e==="function"){e();continue}let t=e.node;let i=this.raw(t,"before");if(i){this.builder(e.document?i:escapeHTMLInCSS(i))}if(r&&t.type==="rule"){pushBlock(this,s,t,this.rawValue(t,"selector"))}else if(r&&t.type==="atrule"&&t.nodes){pushBlock(this,s,t,atruleStart(this,t))}else{this.stringify(t,e.semicolon)}}}comment(e){let t=this.raw(e,"left","commentLeft");let r=this.raw(e,"right","commentRight");this.builder(escapeHTMLInCSS("/*"+t+e.text+r+"*/"),e)}decl(e,t){let r=e.raws;let s=this.raw(e,"between","colon");let i=e.prop+s+this.rawValue(e,"value");if(e.important){i+=r.important||" !important"}if(t)i+=";";this.builder(escapeHTMLInCSS(i),e)}document(e){this.body(e)}raw(e,t,r){let s;if(!r)r=t;if(t){s=e.raws[t];if(typeof s!=="undefined")return s}let n=e.parent;if(r==="before"){if(!n||n.type==="root"&&n.first===e){return""}if(n&&n.type==="document"){return""}}if(!n)return i[r];let o=e.root();let l=o.rawCache||(o.rawCache={});if(typeof l[r]!=="undefined"){return l[r]}if(r==="before"||r==="after"){return this.beforeAfter(e,r)}else{let i="raw"+capitalize(r);if(this[i]){s=this[i](o,e)}else{o.walk((e=>{s=e.raws[t];if(typeof s!=="undefined")return false}))}}if(typeof s==="undefined")s=i[r];l[r]=s;return s}rawBeforeClose(e){let t;e.walk((e=>{if(e.nodes&&e.nodes.length>0){if(typeof e.raws.after!=="undefined"){t=e.raws.after;if(t.includes("\n")){t=t.replace(/[^\n]+$/,"")}return false}}}));if(t)t=t.replace(/\S/g,"");return t}rawBeforeComment(e,t){let r;e.walkComments((e=>{if(typeof e.raws.before!=="undefined"){r=e.raws.before;if(r.includes("\n")){r=r.replace(/[^\n]+$/,"")}return false}}));if(typeof r==="undefined"){r=this.raw(t,null,"beforeDecl")}else if(r){r=r.replace(/\S/g,"")}return r}rawBeforeDecl(e,t){let r;e.walkDecls((e=>{if(typeof e.raws.before!=="undefined"){r=e.raws.before;if(r.includes("\n")){r=r.replace(/[^\n]+$/,"")}return false}}));if(typeof r==="undefined"){r=this.raw(t,null,"beforeRule")}else if(r){r=r.replace(/\S/g,"")}return r}rawBeforeOpen(e){let t;e.walk((e=>{if(e.type!=="decl"){t=e.raws.between;if(typeof t!=="undefined")return false}}));return t}rawBeforeRule(e){let t;e.walk((r=>{if(r.nodes&&(r.parent!==e||e.first!==r)){if(typeof r.raws.before!=="undefined"){t=r.raws.before;if(t.includes("\n")){t=t.replace(/[^\n]+$/,"")}return false}}}));if(t)t=t.replace(/\S/g,"");return t}rawColon(e){let t;e.walkDecls((e=>{if(typeof e.raws.between!=="undefined"){t=e.raws.between.replace(/[^\s:]/g,"");return false}}));return t}rawEmptyBody(e){let t;e.walk((e=>{if(e.nodes&&e.nodes.length===0){t=e.raws.after;if(typeof t!=="undefined")return false}}));return t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;e.walk((r=>{let s=r.parent;if(s&&s!==e&&s.parent&&s.parent===e){if(typeof r.raws.before!=="undefined"){let e=r.raws.before.split("\n");t=e[e.length-1];t=t.replace(/\S/g,"");return false}}}));return t}rawSemicolon(e){let t;e.walk((e=>{if(e.nodes&&e.nodes.length&&e.last.type==="decl"){t=e.raws.semicolon;if(typeof t!=="undefined")return false}}));return t}rawValue(e,t){let r=e[t];let s=e.raws[t];if(s&&s.value===r){return s.raw}return r}root(e){this.body(e);if(e.raws.after){let t=e.raws.after;let r=e.parent&&e.parent.type==="document";this.builder(r?t:escapeHTMLInCSS(t))}}rule(e){this.block(e,this.rawValue(e,"selector"));if(e.raws.ownSemicolon){this.builder(escapeHTMLInCSS(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)}}e.exports=Stringifier;Stringifier.default=Stringifier},862:(e,t,r)=>{"use strict";let s=r(689);function stringify(e,t){let r=new s(t);r.stringify(e)}e.exports=stringify;stringify.default=stringify},698:e=>{"use strict";e.exports.isClean=Symbol("isClean");e.exports.my=Symbol("my")},370:(e,t,r)=>{"use strict";let s=r(831);let i=r(298);let n;function registerInput(e){n=e}const o={";":s.yellow,":":s.yellow,"(":s.cyan,")":s.cyan,"[":s.yellow,"]":s.yellow,"{":s.yellow,"}":s.yellow,"at-word":s.cyan,brackets:s.cyan,call:s.cyan,class:s.yellow,comment:s.gray,hash:s.magenta,string:s.green};function getTokenType([e,t],r){if(e==="word"){if(t[0]==="."){return"class"}if(t[0]==="#"){return"hash"}}if(!r.endOfFile()){let e=r.nextToken();r.back(e);if(e[0]==="brackets"||e[0]==="(")return"call"}return e}function terminalHighlight(e){let t=i(new n(e),{ignoreErrors:true});let r="";while(!t.endOfFile()){let e=t.nextToken();let s=o[getTokenType(e,t)];if(s){r+=e[1].split(/\r?\n/).map((e=>s(e))).join("\n")}else{r+=e[1]}}return r}terminalHighlight.registerInput=registerInput;e.exports=terminalHighlight},298:e=>{"use strict";const t="'".charCodeAt(0);const r='"'.charCodeAt(0);const s="\\".charCodeAt(0);const i="/".charCodeAt(0);const n="\n".charCodeAt(0);const o=" ".charCodeAt(0);const l="\f".charCodeAt(0);const f="\t".charCodeAt(0);const a="\r".charCodeAt(0);const u="[".charCodeAt(0);const c="]".charCodeAt(0);const h="(".charCodeAt(0);const p=")".charCodeAt(0);const d="{".charCodeAt(0);const m="}".charCodeAt(0);const w=";".charCodeAt(0);const y="*".charCodeAt(0);const g=":".charCodeAt(0);const b="@".charCodeAt(0);const x=/[\t\n\f\r "#'()/;[\\\]{}]/g;const k=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g;const C=/.[\r\n"'(/\\]/;const O=/[\da-f]/i;e.exports=function tokenizer(e,S={}){let A=e.css.valueOf();let R=S.ignoreErrors;let B,v,P,T,I;let _,E,M,z,D;let N=A.length;let F=0;let L=[];let j=[];let W=-1;function position(){return F}function unclosed(t){throw e.error("Unclosed "+t,F)}function endOfFile(){return j.length===0&&F>=N}function nextToken(e){if(j.length)return j.pop();if(F>=N)return;let S=e?e.ignoreUnclosed:false;B=A.charCodeAt(F);switch(B){case n:case o:case f:case a:case l:{T=F;do{T+=1;B=A.charCodeAt(T)}while(B===o||B===n||B===f||B===a||B===l);_=["space",A.slice(F,T)];F=T-1;break}case u:case c:case d:case m:case g:case w:case p:{let e=String.fromCharCode(B);_=[e,e,F];break}case h:{D=L.length?L.pop()[1]:"";z=A.charCodeAt(F+1);if(D==="url"&&z!==t&&z!==r&&z!==o&&z!==n&&z!==f&&z!==l&&z!==a){T=F;do{E=false;T=A.indexOf(")",T+1);if(T===-1){if(R||S){T=F;break}else{unclosed("bracket")}}M=T;while(A.charCodeAt(M-1)===s){M-=1;E=!E}}while(E);_=["brackets",A.slice(F,T+1),F,T];F=T}else if(F<=W){_=["(","(",F]}else{T=A.indexOf(")",F+1);v=A.slice(F,T+1);if(T===-1||C.test(v)){W=T===-1?N:T;_=["(","(",F]}else{_=["brackets",v,F,T];F=T}}break}case t:case r:{I=B===t?"'":'"';T=F;do{E=false;T=A.indexOf(I,T+1);if(T===-1){if(R||S){T=F+1;break}else{unclosed("string")}}M=T;while(A.charCodeAt(M-1)===s){M-=1;E=!E}}while(E);_=["string",A.slice(F,T+1),F,T];F=T;break}case b:{x.lastIndex=F+1;x.test(A);if(x.lastIndex===0){T=A.length-1}else{T=x.lastIndex-2}_=["at-word",A.slice(F,T+1),F,T];F=T;break}case s:{T=F;P=true;while(A.charCodeAt(T+1)===s){T+=1;P=!P}B=A.charCodeAt(T+1);if(P&&B!==i&&B!==o&&B!==n&&B!==f&&B!==a&&B!==l){T+=1;if(O.test(A.charAt(T))){while(O.test(A.charAt(T+1))){T+=1}if(A.charCodeAt(T+1)===o){T+=1}}}_=["word",A.slice(F,T+1),F,T];F=T;break}default:{if(B===i&&A.charCodeAt(F+1)===y){T=A.indexOf("*/",F+2)+1;if(T===0){if(R||S){T=A.length}else{unclosed("comment")}}_=["comment",A.slice(F,T+1),F,T];F=T}else{k.lastIndex=F+1;k.test(A);if(k.lastIndex===0){T=A.length-1}else{T=k.lastIndex-2}_=["word",A.slice(F,T+1),F,T];L.push(_);F=T}break}}F++;return _}function back(e){j.push(e)}return{back:back,endOfFile:endOfFile,nextToken:nextToken,position:position}}},940:e=>{"use strict";e.exports=require("postcss")}};var t={};function __nccwpck_require__(r){var s=t[r];if(s!==undefined){return s.exports}var i=t[r]={exports:{}};var n=true;try{e[r](i,i.exports,__nccwpck_require__);n=false}finally{if(n)delete t[r]}return i.exports}if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var r=__nccwpck_require__(476);module.exports=r})();