UNPKG

styled-components

Version:

Visual primitives for the component age. Use the best bits of ES6 and CSS to style your apps without stress 💅

2 lines • 66.2 kB
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react")):"function"==typeof define&&define.amd?define(["exports","react"],t):t(e.styled=e.styled||{},e.React)}(this,function(e,t){"use strict";function n(e){return e.replace(D,"-$1").toLowerCase()}function r(e){return U(e).replace(M,"-ms-")}function o(e,t){return function(n){return e(t(n))}}function i(e){return null!=e&&"object"==("undefined"==typeof e?"undefined":V(e))}function s(e){if(!Q(e)||se.call(e)!=ee)return!1;var t=Z(e);if(null===t)return!0;var n=oe.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&re.call(n)==ie}function a(e){he[e]||(he[e]=!0,"undefined"!=typeof console&&console.warn&&console.warn(e))}function u(e){function t(t){throw e.error("Unclosed "+t,b,C-k)}for(var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=[],o=e.css.valueOf(),i=n.ignoreErrors,s=void 0,a=void 0,u=void 0,c=void 0,l=void 0,h=void 0,f=void 0,p=void 0,d=void 0,v=void 0,m=void 0,y=void 0,g=void 0,w=o.length,k=-1,b=1,C=0;C<w;){switch(s=o.charCodeAt(C),(s===Ce||s===Oe||s===Ae&&o.charCodeAt(C+1)!==Ce)&&(k=C,b+=1),s){case Ce:case xe:case Se:case Ae:case Oe:a=C;do a+=1,s=o.charCodeAt(a),s===Ce&&(k=a,b+=1);while(s===xe||s===Ce||s===Se||s===Ae||s===Oe);r.push(["space",o.slice(C,a)]),C=a-1;break;case Ee:r.push(["[","[",b,C-k]);break;case Pe:r.push(["]","]",b,C-k]);break;case _e:r.push(["{","{",b,C-k]);break;case Te:r.push(["}","}",b,C-k]);break;case Ne:r.push([":",":",b,C-k]);break;case Fe:r.push([";",";",b,C-k]);break;case je:if(y=r.length?r[r.length-1][1]:"",g=o.charCodeAt(C+1),"url"===y&&g!==ge&&g!==we&&g!==xe&&g!==Ce&&g!==Se&&g!==Oe&&g!==Ae){a=C;do{if(v=!1,a=o.indexOf(")",a+1),a===-1){if(i){a=C;break}t("bracket")}for(m=a;o.charCodeAt(m-1)===ke;)m-=1,v=!v}while(v);r.push(["brackets",o.slice(C,a+1),b,C-k,b,a-k]),C=a}else a=o.indexOf(")",C+1),h=o.slice(C,a+1),a===-1||Le.test(h)?r.push(["(","(",b,C-k]):(r.push(["brackets",h,b,C-k,b,a-k]),C=a);break;case Re:r.push([")",")",b,C-k]);break;case ge:case we:u=s===ge?"'":'"',a=C;do{if(v=!1,a=o.indexOf(u,a+1),a===-1){if(i){a=C+1;break}t("quote")}for(m=a;o.charCodeAt(m-1)===ke;)m-=1,v=!v}while(v);h=o.slice(C,a+1),c=h.split("\n"),l=c.length-1,l>0?(p=b+l,d=a-c[l].length):(p=b,d=k),r.push(["string",o.slice(C,a+1),b,C-k,p,a-d]),k=d,b=p,C=a;break;case Ue:Me.lastIndex=C+1,Me.test(o),a=0===Me.lastIndex?o.length-1:Me.lastIndex-2,r.push(["at-word",o.slice(C,a+1),b,C-k,b,a-k]),C=a;break;case ke:for(a=C,f=!0;o.charCodeAt(a+1)===ke;)a+=1,f=!f;s=o.charCodeAt(a+1),f&&s!==be&&s!==xe&&s!==Ce&&s!==Se&&s!==Ae&&s!==Oe&&(a+=1),r.push(["word",o.slice(C,a+1),b,C-k,b,a-k]),C=a;break;default:s===be&&o.charCodeAt(C+1)===De?(a=o.indexOf("*/",C+2)+1,0===a&&(i?a=o.length:t("comment")),h=o.slice(C,a+1),c=h.split("\n"),l=c.length-1,l>0?(p=b+l,d=a-c[l].length):(p=b,d=k),r.push(["comment",h,b,C-k,p,a-d]),k=d,b=p,C=a):(Be.lastIndex=C+1,Be.test(o),a=0===Be.lastIndex?o.length-1:Be.lastIndex-2,r.push(["word",o.slice(C,a+1),b,C-k,b,a-k]),C=a)}C++}return r}function c(e){return"["+e+"m"}function l(e){var t=u(new it(e),{ignoreErrors:!0}),n=[];return t.forEach(function(e){var t=Ie[e[0]];t?n.push(e[1].split(/\r?\n/).map(function(e){return c(t[0])+e+c(t[1])}).join("\n")):n.push(e[1])}),n.join("")}function h(e){return e[0].toUpperCase()+e.slice(1)}function f(e,t){var n=new Ve(t);n.stringify(e)}function p(e,t){if(t&&t.safe)throw new Error('Option safe was removed. Use parser: require("postcss-safe-parser")');var n=new it(e,t),r=new Ye(n);try{r.tokenize(),r.loop()}catch(e){throw"CssSyntaxError"===e.name&&t&&t.from&&(/\.scss$/i.test(t.from)?e.message+="\nYou tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser":/\.less$/i.test(t.from)&&(e.message+="\nYou tried to parse Less with the standard CSS parser; try again with the postcss-less parser")),e}return r.root}function d(e){return e.map(function(e){return e.nodes&&(e.nodes=d(e.nodes)),delete e.source,e})}function v(e){return"object"===("undefined"==typeof e?"undefined":V(e))&&"function"==typeof e.then}function m(e,t){var n=new it(e,t),r=new st(n);return r.tokenize(),r.loop(),r.root}function y(e,t){var n=[];return e.selectors.forEach(function(e){t.selectors.forEach(function(t){t.indexOf("&")===-1?n.push(e+" "+t):n.push(t.replace(/&/g,e))})}),n}function g(e,t){return e&&"comment"===e.type?e.moveAfter(t):t}function w(e,t){var n=[];if(t.each(function(t){"comment"===t.type&&n.push(t),"decl"===t.type?n.push(t):"rule"===t.type?t.selectors=y(e,t):"atrule"===t.type&&w(e,t)}),n.length){for(var r=e.clone({nodes:[]}),o=0;o<n.length;o++)n[o].moveTo(r);t.prepend(r)}}function k(e,t){var n=!1,r=e;e.each(function(o){"rule"===o.type?(n=!0,o.selectors=y(e,o),r=g(o.prev(),r),r=o.moveAfter(r)):"atrule"===o.type&&t.indexOf(o.name)!==-1&&(n=!0,w(e,o),r=g(o.prev(),r),r=o.moveAfter(r))}),n&&(e.raws.semicolon=!0,0===e.nodes.length&&e.remove())}function b(e){return e[e.length-1]}function C(e){for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}function x(){var e=document.createElement("style");return e.type="text/css",e.appendChild(document.createTextNode("")),(document.head||document.getElementsByTagName("head")[0]).appendChild(e),e}function O(e){var t="undefined"==typeof e?"undefined":V(e);return null!=e&&("object"==t||"function"==t)}function S(e){var t=At(e)?_t.call(e):"";return t==Et||t==Pt||t==jt}function A(e){return e&&e.__esModule?e.default:e}function E(e,t){return t={exports:{}},e(t,t.exports),t.exports}function P(e){return e.replace(Vt,function(e,t){return t.toUpperCase()})}function j(e){return $t(e.replace(Gt,"ms-"))}var R="default"in t?t.default:t,_="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ".split(""),T=function e(t){var n=_[t%_.length];return t>_.length?""+e(Math.floor(t/_.length))+n:n},F=function(e,t){return t.reduce(function(t,n,r){return t.concat(n,e[r+1])},[e[0]])},D=/([A-Z])/g,N=n,U=N,M=/^ms-/,B=r,L=o,I=L,W=I(Object.getPrototypeOf,Object),z=W,V="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},q=(function(){function e(e){this.value=e}function t(t){function n(e,t){return new Promise(function(n,o){var a={key:e,arg:t,resolve:n,reject:o,next:null};s?s=s.next=a:(i=s=a,r(e,t))})}function r(n,i){try{var s=t[n](i),a=s.value;a instanceof e?Promise.resolve(a.value).then(function(e){r("next",e)},function(e){r("throw",e)}):o(s.done?"return":"normal",s.value)}catch(e){o("throw",e)}}function o(e,t){switch(e){case"return":i.resolve({value:t,done:!0});break;case"throw":i.reject(t);break;default:i.resolve({value:t,done:!1})}i=i.next,i?r(i.key,i.arg):s=null}var i,s;this._invoke=n,"function"!=typeof t.return&&(this.return=void 0)}return"function"==typeof Symbol&&Symbol.asyncIterator&&(t.prototype[Symbol.asyncIterator]=function(){return this}),t.prototype.next=function(e){return this._invoke("next",e)},t.prototype.throw=function(e){return this._invoke("throw",e)},t.prototype.return=function(e){return this._invoke("return",e)},{wrap:function(e){return function(){return new t(e.apply(this,arguments))}},await:function(t){return new e(t)}}}(),function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}),$=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),G=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},H=function e(t,n,r){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,n);if(void 0===o){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,r)}if("value"in o)return o.value;var s=o.get;if(void 0!==s)return s.call(r)},Y=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)},X=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t},K=function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)},J=i,Z=z,Q=J,ee="[object Object]",te=Function.prototype,ne=Object.prototype,re=te.toString,oe=ne.hasOwnProperty,ie=re.call(Object),se=ne.toString,ae=s,ue=function(e){return Object.keys(e).map(function(t){return B(t)+": "+e[t]+";"}).join(" ")},ce=function e(t,n){return t.reduce(function(t,r){return void 0===r||null===r||r===!1||""===r?t:Array.isArray(r)?t.concat.apply(t,K(e(r,n))):"function"==typeof r?n?t.concat.apply(t,K(e([r(n)],n))):t.concat(r):t.concat(ae(r)?ue(r):r.toString())},[])},le=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return ce(F(e,n))},he={},fe={argv:[],env:{}},pe=function(e,t){t=t||fe.argv;var n=t.indexOf("--"),r=/^--/.test(e)?"":"--",o=t.indexOf(r+e);return o!==-1&&(n===-1||o<n)},de=pe,ve=function(e){return 0!==e&&{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}},me=function(){return de("no-color")||de("no-colors")||de("color=false")?0:de("color=16m")||de("color=full")||de("color=truecolor")?3:de("color=256")?2:de("color")||de("colors")||de("color=true")||de("color=always")?1:fe.stdout&&!fe.stdout.isTTY?0:"win32"===fe.platform?1:"COLORTERM"in fe.env?1:"dumb"===fe.env.TERM?0:/^xterm-256(?:color)?/.test(fe.env.TERM)?2:/^screen|^xterm|^vt100|color|ansi|cygwin|linux/i.test(fe.env.TERM)?1:0}();0===me&&"FORCE_COLOR"in fe.env&&(me=1);var ye=fe&&ve(me),ge="'".charCodeAt(0),we='"'.charCodeAt(0),ke="\\".charCodeAt(0),be="/".charCodeAt(0),Ce="\n".charCodeAt(0),xe=" ".charCodeAt(0),Oe="\f".charCodeAt(0),Se="\t".charCodeAt(0),Ae="\r".charCodeAt(0),Ee="[".charCodeAt(0),Pe="]".charCodeAt(0),je="(".charCodeAt(0),Re=")".charCodeAt(0),_e="{".charCodeAt(0),Te="}".charCodeAt(0),Fe=";".charCodeAt(0),De="*".charCodeAt(0),Ne=":".charCodeAt(0),Ue="@".charCodeAt(0),Me=/[ \n\t\r\f\{\(\)'"\\;\/\[\]#]/g,Be=/[ \n\t\r\f\(\)\{\}:;@!'"\\\]\[#]|\/(?=\*)/g,Le=/.[\\\/\("'\n]/,Ie={brackets:[36,39],string:[31,39],"at-word":[31,39],comment:[90,39],"{":[32,39],"}":[32,39],":":[1,22],";":[1,22],"(":[1,22],")":[1,22]},We=function(){function e(t,n,r,o,i,s){q(this,e),this.name="CssSyntaxError",this.reason=t,i&&(this.file=i),o&&(this.source=o),s&&(this.plugin=s),"undefined"!=typeof n&&"undefined"!=typeof r&&(this.line=n,this.column=r),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,e)}return $(e,[{key:"setMessage",value:function(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>","undefined"!=typeof this.line&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}},{key:"showSourceCode",value:function(e){var t=this;if(!this.source)return"";var n=this.source;"undefined"==typeof e&&(e=ye),e&&(n=l(n));var r=n.split(/\r?\n/),o=Math.max(this.line-3,0),i=Math.min(this.line+2,r.length),s=String(i).length;return r.slice(o,i).map(function(e,n){var r=o+1+n,i=(" "+r).slice(-s),a=" "+i+" | ";if(r===t.line){var u=a.replace(/\d/g," ")+e.slice(0,t.column-1).replace(/[^\t]/g," ");return">"+a+e+"\n "+u+"^"}return" "+a+e}).join("\n")}},{key:"toString",value:function(){var e=this.showSourceCode();return e&&(e="\n\n"+e+"\n"),this.name+": "+this.message+e}},{key:"generated",get:function(){return a("CssSyntaxError#generated is depreacted. Use input instead."),this.input}}]),e}(),ze={colon:": ",indent:" ",beforeDecl:"\n",beforeRule:"\n",beforeOpen:" ",beforeClose:"\n",beforeComment:"\n",after:"\n",emptyBody:"",commentLeft:" ",commentRight:" "},Ve=function(){function e(t){q(this,e),this.builder=t}return $(e,[{key:"stringify",value:function(e,t){this[e.type](e,t)}},{key:"root",value:function(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}},{key:"comment",value:function(e){var t=this.raw(e,"left","commentLeft"),n=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+n+"*/",e)}},{key:"decl",value:function(e,t){var n=this.raw(e,"between","colon"),r=e.prop+n+this.rawValue(e,"value");e.important&&(r+=e.raws.important||" !important"),t&&(r+=";"),this.builder(r,e)}},{key:"rule",value:function(e){this.block(e,this.rawValue(e,"selector"))}},{key:"atrule",value:function(e,t){var n="@"+e.name,r=e.params?this.rawValue(e,"params"):"";if("undefined"!=typeof e.raws.afterName?n+=e.raws.afterName:r&&(n+=" "),e.nodes)this.block(e,n+r);else{var o=(e.raws.between||"")+(t?";":"");this.builder(n+r+o,e)}}},{key:"body",value:function(e){for(var t=e.nodes.length-1;t>0&&"comment"===e.nodes[t].type;)t-=1;for(var n=this.raw(e,"semicolon"),r=0;r<e.nodes.length;r++){var o=e.nodes[r],i=this.raw(o,"before");i&&this.builder(i),this.stringify(o,t!==r||n)}}},{key:"block",value:function(e,t){var n=this.raw(e,"between","beforeOpen");this.builder(t+n+"{",e,"start");var r=void 0;e.nodes&&e.nodes.length?(this.body(e),r=this.raw(e,"after")):r=this.raw(e,"after","emptyBody"),r&&this.builder(r),this.builder("}",e,"end")}},{key:"raw",value:function(e,t,n){var r=void 0;if(n||(n=t),t&&(r=e.raws[t],"undefined"!=typeof r))return r;var o=e.parent;if("before"===n&&(!o||"root"===o.type&&o.first===e))return"";if(!o)return ze[n];var i=e.root();if(i.rawCache||(i.rawCache={}),"undefined"!=typeof i.rawCache[n])return i.rawCache[n];if("before"===n||"after"===n)return this.beforeAfter(e,n);var s="raw"+h(n);return this[s]?r=this[s](i,e):i.walk(function(e){if(r=e.raws[t],"undefined"!=typeof r)return!1}),"undefined"==typeof r&&(r=ze[n]),i.rawCache[n]=r,r}},{key:"rawSemicolon",value:function(e){var t=void 0;return e.walk(function(e){if(e.nodes&&e.nodes.length&&"decl"===e.last.type&&(t=e.raws.semicolon,"undefined"!=typeof t))return!1}),t}},{key:"rawEmptyBody",value:function(e){var t=void 0;return e.walk(function(e){if(e.nodes&&0===e.nodes.length&&(t=e.raws.after,"undefined"!=typeof t))return!1}),t}},{key:"rawIndent",value:function(e){if(e.raws.indent)return e.raws.indent;var t=void 0;return e.walk(function(n){var r=n.parent;if(r&&r!==e&&r.parent&&r.parent===e&&"undefined"!=typeof n.raws.before){var o=n.raws.before.split("\n");return t=o[o.length-1],t=t.replace(/[^\s]/g,""),!1}}),t}},{key:"rawBeforeComment",value:function(e,t){var n=void 0;return e.walkComments(function(e){if("undefined"!=typeof e.raws.before)return n=e.raws.before,n.indexOf("\n")!==-1&&(n=n.replace(/[^\n]+$/,"")),!1}),"undefined"==typeof n&&(n=this.raw(t,null,"beforeDecl")),n}},{key:"rawBeforeDecl",value:function(e,t){var n=void 0;return e.walkDecls(function(e){if("undefined"!=typeof e.raws.before)return n=e.raws.before,n.indexOf("\n")!==-1&&(n=n.replace(/[^\n]+$/,"")),!1}),"undefined"==typeof n&&(n=this.raw(t,null,"beforeRule")),n}},{key:"rawBeforeRule",value:function(e){var t=void 0;return e.walk(function(n){if(n.nodes&&(n.parent!==e||e.first!==n)&&"undefined"!=typeof n.raws.before)return t=n.raws.before,t.indexOf("\n")!==-1&&(t=t.replace(/[^\n]+$/,"")),!1}),t}},{key:"rawBeforeClose",value:function(e){var t=void 0;return e.walk(function(e){if(e.nodes&&e.nodes.length>0&&"undefined"!=typeof e.raws.after)return t=e.raws.after,t.indexOf("\n")!==-1&&(t=t.replace(/[^\n]+$/,"")),!1}),t}},{key:"rawBeforeOpen",value:function(e){var t=void 0;return e.walk(function(e){if("decl"!==e.type&&(t=e.raws.between,"undefined"!=typeof t))return!1}),t}},{key:"rawColon",value:function(e){var t=void 0;return e.walkDecls(function(e){if("undefined"!=typeof e.raws.between)return t=e.raws.between.replace(/[^\s:]/g,""),!1}),t}},{key:"beforeAfter",value:function(e,t){var n=void 0;n="decl"===e.type?this.raw(e,null,"beforeDecl"):"comment"===e.type?this.raw(e,null,"beforeComment"):"before"===t?this.raw(e,null,"beforeRule"):this.raw(e,null,"beforeClose");for(var r=e.parent,o=0;r&&"root"!==r.type;)o+=1,r=r.parent;if(n.indexOf("\n")!==-1){var i=this.raw(e,null,"indent");if(i.length)for(var s=0;s<o;s++)n+=i}return n}},{key:"rawValue",value:function(e,t){var n=e[t],r=e.raws[t];return r&&r.value===n?r.raw:n}}]),e}(),qe=function e(t,n){var r=new t.constructor;for(var o in t)if(t.hasOwnProperty(o)){var i=t[o],s="undefined"==typeof i?"undefined":V(i);"parent"===o&&"object"===s?n&&(r[o]=n):"source"===o?r[o]=i:i instanceof Array?r[o]=i.map(function(t){return e(t,r)}):"before"!==o&&"after"!==o&&"between"!==o&&"semicolon"!==o&&("object"===s&&null!==i&&(i=e(i)),r[o]=i)}return r},$e=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};q(this,e),this.raws={};for(var n in t)this[n]=t[n]}return $(e,[{key:"error",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.source){var n=this.positionBy(t);return this.source.input.error(e,n.line,n.column,t)}return new We(e)}},{key:"warn",value:function(e,t,n){var r={node:this};for(var o in n)r[o]=n[o];return e.warn(t,r)}},{key:"remove",value:function(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}},{key:"toString",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:f;e.stringify&&(e=e.stringify);var t="";return e(this,function(e){t+=e}),t}},{key:"clone",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=qe(this);for(var n in e)t[n]=e[n];return t}},{key:"cloneBefore",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=this.clone(e);return this.parent.insertBefore(this,t),t}},{key:"cloneAfter",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=this.clone(e);return this.parent.insertAfter(this,t),t}},{key:"replaceWith",value:function(){var e=this;if(this.parent){for(var t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];n.forEach(function(t){e.parent.insertBefore(e,t)}),this.remove()}return this}},{key:"moveTo",value:function(e){return this.cleanRaws(this.root()===e.root()),this.remove(),e.append(this),this}},{key:"moveBefore",value:function(e){return this.cleanRaws(this.root()===e.root()),this.remove(),e.parent.insertBefore(e,this),this}},{key:"moveAfter",value:function(e){return this.cleanRaws(this.root()===e.root()),this.remove(),e.parent.insertAfter(e,this),this}},{key:"next",value:function(){var e=this.parent.index(this);return this.parent.nodes[e+1]}},{key:"prev",value:function(){var e=this.parent.index(this);return this.parent.nodes[e-1]}},{key:"toJSON",value:function(){var e={};for(var t in this)if(this.hasOwnProperty(t)&&"parent"!==t){var n=this[t];n instanceof Array?e[t]=n.map(function(e){return"object"===("undefined"==typeof e?"undefined":V(e))&&e.toJSON?e.toJSON():e}):"object"===("undefined"==typeof n?"undefined":V(n))&&n.toJSON?e[t]=n.toJSON():e[t]=n}return e}},{key:"raw",value:function(e,t){var n=new Ve;return n.raw(this,e,t)}},{key:"root",value:function(){for(var e=this;e.parent;)e=e.parent;return e}},{key:"cleanRaws",value:function(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}},{key:"positionInside",value:function(e){for(var t=this.toString(),n=this.source.start.column,r=this.source.start.line,o=0;o<e;o++)"\n"===t[o]?(n=1,r+=1):n+=1;return{line:r,column:n}}},{key:"positionBy",value:function(e){var t=this.source.start;if(e.index)t=this.positionInside(e.index);else if(e.word){var n=this.toString().indexOf(e.word);n!==-1&&(t=this.positionInside(n))}return t}},{key:"removeSelf",value:function(){return a("Node#removeSelf is deprecated. Use Node#remove."),this.remove()}},{key:"replace",value:function(e){return a("Node#replace is deprecated. Use Node#replaceWith"),this.replaceWith(e)}},{key:"style",value:function(e,t){return a("Node#style() is deprecated. Use Node#raw()"),this.raw(e,t)}},{key:"cleanStyles",value:function(e){return a("Node#cleanStyles() is deprecated. Use Node#cleanRaws()"),this.cleanRaws(e)}},{key:"before",get:function(){return a("Node#before is deprecated. Use Node#raws.before"),this.raws.before},set:function(e){a("Node#before is deprecated. Use Node#raws.before"),this.raws.before=e}},{key:"between",get:function(){return a("Node#between is deprecated. Use Node#raws.between"),this.raws.between},set:function(e){a("Node#between is deprecated. Use Node#raws.between"),this.raws.between=e}}]),e}(),Ge=function(e){function t(e){q(this,t);var n=X(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.type="decl",n}return Y(t,e),$(t,[{key:"_value",get:function(){return a("Node#_value was deprecated. Use Node#raws.value"),this.raws.value},set:function(e){a("Node#_value was deprecated. Use Node#raws.value"),this.raws.value=e}},{key:"_important",get:function(){return a("Node#_important was deprecated. Use Node#raws.important"),this.raws.important},set:function(e){a("Node#_important was deprecated. Use Node#raws.important"),this.raws.important=e}}]),t}($e),He=function(e){function t(e){q(this,t);var n=X(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.type="comment",n}return Y(t,e),$(t,[{key:"left",get:function(){return a("Comment#left was deprecated. Use Comment#raws.left"),this.raws.left},set:function(e){a("Comment#left was deprecated. Use Comment#raws.left"),this.raws.left=e}},{key:"right",get:function(){return a("Comment#right was deprecated. Use Comment#raws.right"),this.raws.right},set:function(e){a("Comment#right was deprecated. Use Comment#raws.right"),this.raws.right=e}}]),t}($e),Ye=function(){function e(t){q(this,e),this.input=t,this.pos=0,this.root=new rt,this.current=this.root,this.spaces="",this.semicolon=!1,this.root.source={input:t,start:{line:1,column:1}}}return $(e,[{key:"tokenize",value:function(){this.tokens=u(this.input)}},{key:"loop",value:function(){for(var e=void 0;this.pos<this.tokens.length;){switch(e=this.tokens[this.pos],e[0]){case"space":case";":this.spaces+=e[1];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()}this.pos+=1}this.endFile()}},{key:"comment",value:function(e){var t=new He;this.init(t,e[2],e[3]),t.source.end={line:e[4],column:e[5]};var n=e[1].slice(2,-2);if(/^\s*$/.test(n))t.text="",t.raws.left=n,t.raws.right="";else{var r=n.match(/^(\s*)([^]*[^\s])(\s*)$/);t.text=r[2],t.raws.left=r[1],t.raws.right=r[3]}}},{key:"emptyRule",value:function(e){var t=new Ze;this.init(t,e[2],e[3]),t.selector="",t.raws.between="",this.current=t}},{key:"other",value:function(){for(var e=void 0,t=!1,n=null,r=!1,o=null,i=[],s=this.pos;this.pos<this.tokens.length;){if(e=this.tokens[this.pos],n=e[0],"("===n||"["===n)o||(o=e),i.push("("===n?")":"]");else if(0===i.length){if(";"===n){if(r)return void this.decl(this.tokens.slice(s,this.pos+1));break}if("{"===n)return void this.rule(this.tokens.slice(s,this.pos+1));if("}"===n){this.pos-=1,t=!0;break}":"===n&&(r=!0)}else n===i[i.length-1]&&(i.pop(),0===i.length&&(o=null));this.pos+=1}if(this.pos===this.tokens.length&&(this.pos-=1,t=!0),i.length>0&&this.unclosedBracket(o),t&&r){for(;this.pos>s&&(e=this.tokens[this.pos][0],"space"===e||"comment"===e);)this.pos-=1;return void this.decl(this.tokens.slice(s,this.pos+1))}this.unknownWord(s)}},{key:"rule",value:function(e){e.pop();var t=new Ze;this.init(t,e[0][2],e[0][3]),t.raws.between=this.spacesFromEnd(e),this.raw(t,"selector",e),this.current=t}},{key:"decl",value:function(e){var t=new Ge;this.init(t);var n=e[e.length-1];for(";"===n[0]&&(this.semicolon=!0,e.pop()),n[4]?t.source.end={line:n[4],column:n[5]}:t.source.end={line:n[2],column:n[3]};"word"!==e[0][0];)t.raws.before+=e.shift()[1];for(t.source.start={line:e[0][2],column:e[0][3]},t.prop="";e.length;){var r=e[0][0];if(":"===r||"space"===r||"comment"===r)break;t.prop+=e.shift()[1]}t.raws.between="";for(var o=void 0;e.length;){if(o=e.shift(),":"===o[0]){t.raws.between+=o[1];break}t.raws.between+=o[1]}"_"!==t.prop[0]&&"*"!==t.prop[0]||(t.raws.before+=t.prop[0],t.prop=t.prop.slice(1)),t.raws.between+=this.spacesFromStart(e),this.precheckMissedSemicolon(e);for(var i=e.length-1;i>0;i--){if(o=e[i],"!important"===o[1]){t.important=!0;var s=this.stringFrom(e,i);s=this.spacesFromEnd(e)+s," !important"!==s&&(t.raws.important=s);break}if("important"===o[1]){for(var a=e.slice(0),u="",c=i;c>0;c--){var l=a[c][0];if(0===u.trim().indexOf("!")&&"space"!==l)break;u=a.pop()[1]+u}0===u.trim().indexOf("!")&&(t.important=!0,t.raws.important=u,e=a)}if("space"!==o[0]&&"comment"!==o[0])break}this.raw(t,"value",e),t.value.indexOf(":")!==-1&&this.checkMissedSemicolon(e)}},{key:"atrule",value:function(e){var t=new Ke;t.name=e[1].slice(1),""===t.name&&this.unnamedAtrule(t,e),this.init(t,e[2],e[3]);var n=!1,r=!1,o=[];for(this.pos+=1;this.pos<this.tokens.length;){if(e=this.tokens[this.pos],";"===e[0]){t.source.end={line:e[2],column:e[3]},this.semicolon=!0;break}if("{"===e[0]){r=!0;break}if("}"===e[0]){this.end(e);break}o.push(e),this.pos+=1}this.pos===this.tokens.length&&(n=!0),t.raws.between=this.spacesFromEnd(o),o.length?(t.raws.afterName=this.spacesFromStart(o),this.raw(t,"params",o),n&&(e=o[o.length-1],t.source.end={line:e[4],column:e[5]},this.spaces=t.raws.between,t.raws.between="")):(t.raws.afterName="",t.params=""),r&&(t.nodes=[],this.current=t)}},{key:"end",value:function(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={line:e[2],column:e[3]},this.current=this.current.parent):this.unexpectedClose(e)}},{key:"endFile",value:function(){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}},{key:"init",value:function(e,t,n){this.current.push(e),e.source={start:{line:t,column:n},input:this.input},e.raws.before=this.spaces,this.spaces="","comment"!==e.type&&(this.semicolon=!1)}},{key:"raw",value:function e(t,n,r){for(var o=void 0,i=void 0,s=r.length,a="",u=!0,c=0;c<s;c+=1)o=r[c],i=o[0],"comment"===i||"space"===i&&c===s-1?u=!1:a+=o[1];if(!u){var e=r.reduce(function(e,t){return e+t[1]},"");t.raws[n]={value:a,raw:e}}t[n]=a}},{key:"spacesFromEnd",value:function(e){for(var t=void 0,n="";e.length&&(t=e[e.length-1][0],"space"===t||"comment"===t);)n=e.pop()[1]+n;return n}},{key:"spacesFromStart",value:function(e){for(var t=void 0,n="";e.length&&(t=e[0][0],"space"===t||"comment"===t);)n+=e.shift()[1];return n}},{key:"stringFrom",value:function(e,t){for(var n="",r=t;r<e.length;r++)n+=e[r][1];return e.splice(t,e.length-t),n}},{key:"colon",value:function(e){for(var t=0,n=void 0,r=void 0,o=void 0,i=0;i<e.length;i++){if(n=e[i],r=n[0],"("===r)t+=1;else if(")"===r)t-=1;else if(0===t&&":"===r){if(o){if("word"===o[0]&&"progid"===o[1])continue;return i}this.doubleColon(n)}o=n}return!1}},{key:"unclosedBracket",value:function(e){throw this.input.error("Unclosed bracket",e[2],e[3])}},{key:"unknownWord",value:function(e){var t=this.tokens[e];throw this.input.error("Unknown word",t[2],t[3])}},{key:"unexpectedClose",value:function(e){throw this.input.error("Unexpected }",e[2],e[3])}},{key:"unclosedBlock",value:function(){var e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}},{key:"doubleColon",value:function(e){throw this.input.error("Double colon",e[2],e[3])}},{key:"unnamedAtrule",value:function(e,t){throw this.input.error("At-rule without name",t[2],t[3])}},{key:"precheckMissedSemicolon",value:function(e){}},{key:"checkMissedSemicolon",value:function(e){var t=this.colon(e);if(t!==!1){for(var n=0,r=void 0,o=t-1;o>=0&&(r=e[o],"space"===r[0]||(n+=1,2!==n));o--);throw this.input.error("Missed semicolon",r[2],r[3])}}}]),e}(),Xe=function(e){function t(){return q(this,t),X(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return Y(t,e),$(t,[{key:"push",value:function(e){return e.parent=this,this.nodes.push(e),this}},{key:"each",value:function(e){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;var t=this.lastEach;if(this.indexes[t]=0,this.nodes){for(var n=void 0,r=void 0;this.indexes[t]<this.nodes.length&&(n=this.indexes[t],r=e(this.nodes[n],n),r!==!1);)this.indexes[t]+=1;return delete this.indexes[t],r}}},{key:"walk",value:function(e){return this.each(function(t,n){var r=e(t,n);return r!==!1&&t.walk&&(r=t.walk(e)),r})}},{key:"walkDecls",value:function(e,t){return t?e instanceof RegExp?this.walk(function(n,r){if("decl"===n.type&&e.test(n.prop))return t(n,r)}):this.walk(function(n,r){if("decl"===n.type&&n.prop===e)return t(n,r)}):(t=e,this.walk(function(e,n){if("decl"===e.type)return t(e,n)}))}},{key:"walkRules",value:function(e,t){return t?e instanceof RegExp?this.walk(function(n,r){if("rule"===n.type&&e.test(n.selector))return t(n,r)}):this.walk(function(n,r){if("rule"===n.type&&n.selector===e)return t(n,r)}):(t=e,this.walk(function(e,n){if("rule"===e.type)return t(e,n)}))}},{key:"walkAtRules",value:function(e,t){return t?e instanceof RegExp?this.walk(function(n,r){if("atrule"===n.type&&e.test(n.name))return t(n,r)}):this.walk(function(n,r){if("atrule"===n.type&&n.name===e)return t(n,r)}):(t=e,this.walk(function(e,n){if("atrule"===e.type)return t(e,n)}))}},{key:"walkComments",value:function(e){return this.walk(function(t,n){if("comment"===t.type)return e(t,n)})}},{key:"append",value:function(){for(var e=this,t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];return n.forEach(function(t){var n=e.normalize(t,e.last);n.forEach(function(t){return e.nodes.push(t)})}),this}},{key:"prepend",value:function(){for(var e=this,t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];return n=n.reverse(),n.forEach(function(t){var n=e.normalize(t,e.first,"prepend").reverse();n.forEach(function(t){return e.nodes.unshift(t)});for(var r in e.indexes)e.indexes[r]=e.indexes[r]+n.length}),this}},{key:"cleanRaws",value:function(e){H(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"cleanRaws",this).call(this,e),this.nodes&&this.nodes.forEach(function(t){return t.cleanRaws(e)})}},{key:"insertBefore",value:function(e,t){var n=this;e=this.index(e);var r=0===e&&"prepend",o=this.normalize(t,this.nodes[e],r).reverse();o.forEach(function(t){return n.nodes.splice(e,0,t)});var i=void 0;for(var s in this.indexes)i=this.indexes[s],e<=i&&(this.indexes[s]=i+o.length);return this}},{key:"insertAfter",value:function(e,t){var n=this;e=this.index(e);var r=this.normalize(t,this.nodes[e]).reverse();r.forEach(function(t){return n.nodes.splice(e+1,0,t)});var o=void 0;for(var i in this.indexes)o=this.indexes[i],e<o&&(this.indexes[i]=o+r.length);return this}},{key:"remove",value:function(e){return"undefined"!=typeof e?(a("Container#remove is deprecated. Use Container#removeChild"),this.removeChild(e)):H(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"remove",this).call(this),this}},{key:"removeChild",value:function(e){e=this.index(e),this.nodes[e].parent=void 0,this.nodes.splice(e,1);var t=void 0;for(var n in this.indexes)t=this.indexes[n],t>=e&&(this.indexes[n]=t-1);return this}},{key:"removeAll",value:function(){return this.nodes.forEach(function(e){return e.parent=void 0}),this.nodes=[],this}},{key:"replaceValues",value:function(e,t,n){return n||(n=t,t={}),this.walkDecls(function(r){t.props&&t.props.indexOf(r.prop)===-1||t.fast&&r.value.indexOf(t.fast)===-1||(r.value=r.value.replace(e,n))}),this}},{key:"every",value:function(e){return this.nodes.every(e)}},{key:"some",value:function(e){return this.nodes.some(e)}},{key:"index",value:function(e){return"number"==typeof e?e:this.nodes.indexOf(e)}},{key:"normalize",value:function(e,t){var n=this;if("string"==typeof e)e=d(p(e).nodes);else if(!Array.isArray(e))if("root"===e.type)e=e.nodes;else if(e.type)e=[e];else if(e.prop){if("undefined"==typeof e.value)throw new Error("Value field is missed in node creation"); "string"!=typeof e.value&&(e.value=String(e.value)),e=[new Ge(e)]}else if(e.selector)e=[new Ze(e)];else if(e.name)e=[new Ke(e)];else{if(!e.text)throw new Error("Unknown node type in node creation");e=[new He(e)]}var r=e.map(function(e){return"undefined"==typeof e.raws&&(e=n.rebuild(e)),e.parent&&(e=e.clone()),"undefined"==typeof e.raws.before&&t&&"undefined"!=typeof t.raws.before&&(e.raws.before=t.raws.before.replace(/[^\s]/g,"")),e.parent=n,e});return r}},{key:"rebuild",value:function(e,t){var n=this,r=void 0;"root"===e.type?r=new rt:"atrule"===e.type?r=new Ke:"rule"===e.type?r=new Ze:"decl"===e.type?r=new Ge:"comment"===e.type&&(r=new He);for(var o in e)"nodes"===o?r.nodes=e.nodes.map(function(e){return n.rebuild(e,r)}):"parent"===o&&t?r.parent=t:e.hasOwnProperty(o)&&(r[o]=e[o]);return r}},{key:"eachInside",value:function(e){return a("Container#eachInside is deprecated. Use Container#walk instead."),this.walk(e)}},{key:"eachDecl",value:function(e,t){return a("Container#eachDecl is deprecated. Use Container#walkDecls instead."),this.walkDecls(e,t)}},{key:"eachRule",value:function(e,t){return a("Container#eachRule is deprecated. Use Container#walkRules instead."),this.walkRules(e,t)}},{key:"eachAtRule",value:function(e,t){return a("Container#eachAtRule is deprecated. Use Container#walkAtRules instead."),this.walkAtRules(e,t)}},{key:"eachComment",value:function(e){return a("Container#eachComment is deprecated. Use Container#walkComments instead."),this.walkComments(e)}},{key:"first",get:function(){if(this.nodes)return this.nodes[0]}},{key:"last",get:function(){if(this.nodes)return this.nodes[this.nodes.length-1]}},{key:"semicolon",get:function(){return a("Node#semicolon is deprecated. Use Node#raws.semicolon"),this.raws.semicolon},set:function(e){a("Node#semicolon is deprecated. Use Node#raws.semicolon"),this.raws.semicolon=e}},{key:"after",get:function(){return a("Node#after is deprecated. Use Node#raws.after"),this.raws.after},set:function(e){a("Node#after is deprecated. Use Node#raws.after"),this.raws.after=e}}]),t}($e),Ke=function(e){function t(e){q(this,t);var n=X(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.type="atrule",n}return Y(t,e),$(t,[{key:"append",value:function(){var e;this.nodes||(this.nodes=[]);for(var n=arguments.length,r=Array(n),o=0;o<n;o++)r[o]=arguments[o];return(e=H(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"append",this)).call.apply(e,[this].concat(r))}},{key:"prepend",value:function(){var e;this.nodes||(this.nodes=[]);for(var n=arguments.length,r=Array(n),o=0;o<n;o++)r[o]=arguments[o];return(e=H(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"prepend",this)).call.apply(e,[this].concat(r))}},{key:"afterName",get:function(){return a("AtRule#afterName was deprecated. Use AtRule#raws.afterName"),this.raws.afterName},set:function(e){a("AtRule#afterName was deprecated. Use AtRule#raws.afterName"),this.raws.afterName=e}},{key:"_params",get:function(){return a("AtRule#_params was deprecated. Use AtRule#raws.params"),this.raws.params},set:function(e){a("AtRule#_params was deprecated. Use AtRule#raws.params"),this.raws.params=e}}]),t}(Xe),Je={split:function e(t,n,r){for(var o=[],i="",e=!1,s=0,a=!1,u=!1,c=0;c<t.length;c++){var l=t[c];a?u?u=!1:"\\"===l?u=!0:l===a&&(a=!1):'"'===l||"'"===l?a=l:"("===l?s+=1:")"===l?s>0&&(s-=1):0===s&&n.indexOf(l)!==-1&&(e=!0),e?(""!==i&&o.push(i.trim()),i="",e=!1):i+=l}return(r||""!==i)&&o.push(i.trim()),o},space:function(e){var t=[" ","\n","\t"];return Je.split(e,t)},comma:function e(t){var e=",";return Je.split(t,[e],!0)}},Ze=function(e){function t(e){q(this,t);var n=X(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.type="rule",n.nodes||(n.nodes=[]),n}return Y(t,e),$(t,[{key:"selectors",get:function(){return Je.comma(this.selector)},set:function(e){var t=this.selector?this.selector.match(/,\s*/):null,n=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(n)}},{key:"_selector",get:function(){return a("Rule#_selector is deprecated. Use Rule#raws.selector"),this.raws.selector},set:function(e){a("Rule#_selector is deprecated. Use Rule#raws.selector"),this.raws.selector=e}}]),t}(Xe),Qe=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(q(this,e),this.type="warning",this.text=t,n.node&&n.node.source){var r=n.node.positionBy(n);this.line=r.line,this.column=r.column}for(var o in n)this[o]=n[o]}return $(e,[{key:"toString",value:function(){return this.node?this.node.error(this.text,{plugin:this.plugin,index:this.index,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}}]),e}(),et=function(){function e(t,n,r){q(this,e),this.processor=t,this.messages=[],this.root=n,this.opts=r,this.css=void 0,this.map=void 0}return $(e,[{key:"toString",value:function(){return this.css}},{key:"warn",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);var n=new Qe(e,t);return this.messages.push(n),n}},{key:"warnings",value:function(){return this.messages.filter(function(e){return"warning"===e.type})}},{key:"content",get:function(){return this.css}}]),e}(),tt=function(){function e(t,n,r){q(this,e),this.stringified=!1,this.processed=!1;var o=void 0;if("object"===("undefined"==typeof n?"undefined":V(n))&&"root"===n.type)o=n;else if(n instanceof e||n instanceof et)o=n.root,n.map&&("undefined"==typeof r.map&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=n.map);else{var i=p;r.syntax&&(i=r.syntax.parse),r.parser&&(i=r.parser),i.parse&&(i=i.parse);try{o=i(n,r)}catch(e){this.error=e}}this.result=new et(t,o,r)}return $(e,[{key:"warnings",value:function(){return this.sync().warnings()}},{key:"toString",value:function(){return this.css}},{key:"then",value:function(e,t){return this.async().then(e,t)}},{key:"catch",value:function(e){return this.async().catch(e)}},{key:"handleError",value:function(e,t){try{if(this.error=e,"CssSyntaxError"!==e.name||e.plugin){if(t.postcssVersion){var n=t.postcssPlugin,r=t.postcssVersion,o=this.result.processor.version,i=r.split("."),s=o.split(".");(i[0]!==s[0]||parseInt(i[1])>parseInt(s[1]))&&a("Your current PostCSS version is "+o+", but "+n+" uses "+r+". Perhaps this is the source of the error below.")}}else e.plugin=t.postcssPlugin,e.setMessage()}catch(e){console&&console.error&&console.error(e)}}},{key:"asyncTick",value:function(e,t){var n=this;if(this.plugin>=this.processor.plugins.length)return this.processed=!0,e();try{!function(){var r=n.processor.plugins[n.plugin],o=n.run(r);n.plugin+=1,v(o)?o.then(function(){n.asyncTick(e,t)}).catch(function(e){n.handleError(e,r),n.processed=!0,t(e)}):n.asyncTick(e,t)}()}catch(e){this.processed=!0,t(e)}}},{key:"async",value:function(){var e=this;return this.processed?new Promise(function(t,n){e.error?n(e.error):t(e.stringify())}):this.processing?this.processing:(this.processing=new Promise(function(t,n){return e.error?n(e.error):(e.plugin=0,void e.asyncTick(t,n))}).then(function(){return e.processed=!0,e.stringify()}),this.processing)}},{key:"sync",value:function(){var e=this;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw new Error("Use process(css).then(cb) to work with async plugins");if(this.error)throw this.error;return this.result.processor.plugins.forEach(function(t){var n=e.run(t);if(v(n))throw new Error("Use process(css).then(cb) to work with async plugins")}),this.result}},{key:"run",value:function(e){this.result.lastPlugin=e;try{return e(this.result.root,this.result)}catch(t){throw this.handleError(t,e),t}}},{key:"stringify",value:function(){if(this.stringified)return this.result;this.stringified=!0,this.sync();var e=this.result.opts,t=f;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);var n="";return t(this.root,function(e){n+=e}),this.result.css=n,this.result}},{key:"processor",get:function(){return this.result.processor}},{key:"opts",get:function(){return this.result.opts}},{key:"css",get:function(){return this.stringify().css}},{key:"content",get:function(){return this.stringify().content}},{key:"map",get:function(){return this.stringify().map}},{key:"root",get:function(){return this.sync().root}},{key:"messages",get:function(){return this.sync().messages}}]),e}(),nt=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];q(this,e),this.version="5.2.0",this.plugins=this.normalize(t)}return $(e,[{key:"use",value:function(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}},{key:"process",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new tt(this,e,t)}},{key:"normalize",value:function(e){var t=[];return e.forEach(function(e){if(e.postcss&&(e=e.postcss),"object"===("undefined"==typeof e?"undefined":V(e))&&Array.isArray(e.plugins))t=t.concat(e.plugins);else{if("function"!=typeof e)throw new Error(e+" is not a PostCSS plugin");t.push(e)}}),t}}]),e}(),rt=function(e){function t(e){q(this,t);var n=X(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.type="root",n.nodes||(n.nodes=[]),n}return Y(t,e),$(t,[{key:"removeChild",value:function(e){return e=this.index(e),0===e&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[e].raws.before),H(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"removeChild",this).call(this,e)}},{key:"normalize",value:function(e,n,r){var o=H(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"normalize",this).call(this,e);return n&&("prepend"===r?this.nodes.length>1?n.raws.before=this.nodes[1].raws.before:delete n.raws.before:this.first!==n&&o.forEach(function(e){e.raws.before=n.raws.before})),o}},{key:"toResult",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=new tt(new nt,this,e);return t.stringify()}},{key:"remove",value:function(e){a("Root#remove is deprecated. Use Root#removeChild"),this.removeChild(e)}},{key:"prevMap",value:function(){return a("Root#prevMap is deprecated. Use Root#source.input.map"),this.source.input.map}}]),t}(Xe),ot=0,it=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};q(this,e),this.css=t.toString(),"\ufeff"!==this.css[0]&&"￾"!==this.css[0]||(this.css=this.css.slice(1)),n.from&&(/^\w+:\/\//.test(n.from)?this.file=n.from:this.file=path.resolve(n.from)),this.file||(ot+=1,this.id="<input css "+ot+">"),this.map&&(this.map.file=this.from)}return $(e,[{key:"error",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=void 0,i=this.origin(t,n);return o=i?new We(e,i.line,i.column,i.source,i.file,r.plugin):new We(e,t,n,this.css,this.file,r.plugin),o.input={line:t,column:n,source:this.css},this.file&&(o.input.file=this.file),o}},{key:"origin",value:function(e,t){if(!this.map)return!1;var n=this.map.consumer(),r=n.originalPositionFor({line:e,column:t});if(!r.source)return!1;var o={file:this.mapResolve(r.source),line:r.line,column:r.column},i=n.sourceContentFor(r.source);return i&&(o.source=i),o}},{key:"mapResolve",value:function(e){return/^\w+:\/\//.test(e)?e:path.resolve(this.map.consumer().sourceRoot||".",e)}},{key:"from",get:function(){return this.file||this.id}}]),e}(),st=function(e){function t(){return q(this,t),X(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return Y(t,e),$(t,[{key:"tokenize",value:function(){this.tokens=u(this.input,{ignoreErrors:!0})}},{key:"comment",value:function(e){var t=new He;this.init(t,e[2],e[3]),t.source.end={line:e[4],column:e[5]};var n=e[1].slice(2);if("*/"===n.slice(-2)&&(n=n.slice(0,-2)),/^\s*$/.test(n))t.text="",t.raws.left=n,t.raws.right="";else{var r=n.match(/^(\s*)([^]*[^\s])(\s*)$/);t.text=r[2],t.raws.left=r[1],t.raws.right=r[3]}}},{key:"unclosedBracket",value:function(){}},{key:"unknownWord",value:function(e){var t=this.tokens.slice(e,this.pos+1);this.spaces+=t.map(function(e){return e[1]}).join("")}},{key:"unexpectedClose",value:function(){this.current.raws.after+="}"}},{key:"doubleColon",value:function(){}},{key:"unnamedAtrule",value:function(e){e.name=""}},{key:"precheckMissedSemicolon",value:function(e){var t=this.colon(e);if(t!==!1){var n=void 0;for(n=t-1;n>=0&&"word"!==e[n][0];n--);for(n-=1;n>=0;n--)if("space"!==e[n][0]){n+=1;break}var r=e.splice(n,e.length-n);this.decl(r)}}},{key:"checkMissedSemicolon",value:function(){}},{key:"endFile",value:function(){for(this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces;this.current.parent;)this.current=this.current.parent,this.current.raws.after=""}}]),t}(Ye),at=["media","supports","document"],ut=function e(t){t.each(function(t){"rule"===t.type?k(t,at):"atrule"===t.type&&e(t)})},ct="undefined"!=typeof document,lt=function(e){return"development"===e||!e}("production"),ht=!1,ft=function(){if(ct){var e=document.createElement("div");return e.innerHTML="<!--[if lt IE 10]><i></i><![endif]-->",1===e.getElementsByTagName("i").length}}(),pt=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.speedy,r=void 0===n?!lt&&!ht:n,o=t.maxLength,i=void 0===o?ct&&ft?4e3:65e3:o;q(this,e),this.isSpeedy=r,this.sheet=void 0,this.tags=[],this.maxLength=i,this.ctr=0}return $(e,[{key:"inject",value:function(){var e=this;if(this.injected)throw new Error("already injected stylesheet!");ct?(this.tags[0]=x(),this.sheet=C(this.tags[0])):this.sheet={cssRules:[],insertRule:function(t){var n={cssText:t};return e.sheet.cssRules.push(n),{serverRule:n,appendRule:function(e){return n.cssText+=e}}}},this.injected=!0}},{key:"speedy",value:function(e){if(0!==this.ctr)throw new Error("cannot change speedy mode after inserting any rule to sheet. Either call speedy("+e+") earlier in your app, or call flush() before speedy("+e+")");this.isSpeedy=!!e}},{key:"_insert",value:function(e){try{this.sheet.insertRule(e,this.sheet.cssRules.length)}catch(t){lt&&console.warn("whoops, illegal rule inserted",e)}}},{key:"insert",value:function(e){var t=this,n=void 0;return ct?this.isSpeedy&&this.sheet.insertRule?this._insert(e):!function(){var r=document.createTextNode(e);b(t.tags).appendChild(r),n={textNode:r,appendRule:function(e){return r.appendData(e)}},t.isSpeedy||(t.sheet=C(b(t.tags)))}():n=this.sheet.insertRule(e),this.ctr++,ct&&this.ctr%this.maxLength===0&&(this.tags.push(x()),this.sheet=C(b(this.tags))),n}},{key:"flush",value:function(){ct?(this.tags.forEach(function(e){return e.parentNode.removeChild(e)}),this.tags=[],this.sheet=null,this.ctr=0):this.sheet.cssRules=[],this.injected=!1}},{key:"rules",value:function(){if(!ct)return this.sheet.cssRules;var e=[];return this.tags.forEach(function(t){return e.splice.apply(e,[e.length,0].concat(K(Array.from(C(t).cssRules))))}),e}}]),e}(),dt=new pt({speedy:!1,maxLength:40}),vt=function(){function e(t,n){q(this,e),this.rules=t,this.selector=n}return $(e,[{key:"generateAndInject",value:function(){dt.injected||dt.inject();var e=ce(this.rules).join("");this.selector&&(e=this.selector+" {"+e+"\n}");var t=m(e);ut(t),dt.insert(t.toResult().css)}}]),e}(),mt=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var o=new vt(le.apply(void 0,[e].concat(n)));o.generateAndInject()},yt={children:!0,dangerouslySetInnerHTML:!0,key:!0,ref:!0,autoFocus:!0,defaultValue:!0,valueLink:!0,defaultChecked:!0,checkedLink:!0,innerHTML:!0,suppressContentEditableWarning:!0,onFocusIn:!0,onFocusOut:!0,className:!0,onCopy:!0,onCut:!0,onPaste:!0,onCompositionEnd:!0,onCompositionStart:!0,onCompositionUpdate:!0,onKeyDown:!0,onKeyPress:!0,onKeyUp:!0,onFocus:!0,onBlur:!0,onChange:!0,onInput:!0,onSubmit:!0,onClick:!0,onContextMenu:!0,onDoubleClick:!0,onDrag:!0,onDragEnd:!0,onDragEnter:!0,onDragExit:!0,onDragLeave:!0,onDragOver:!0,onDragStart:!0,onDrop:!0,onMouseDown:!0,onMouseEnter:!0,onMouseLeave:!0,onMouseMove:!0,onMouseOut:!0,onMouseOver:!0,onMouseUp:!0,onSelect:!0,onTouchCancel:!0,onTouchEnd:!0,onTouchMove:!0,onTouchStart:!0,onScroll:!0,onWheel:!0,onAbort:!0,onCanPlay:!0,onCanPlayThrough:!0,onDurationChange:!0,onEmptied:!0,onEncrypted:!0,onEnded:!0,onError:!0,onLoadedData:!0,onLoadedMetadata:!0,onLoadStart:!0,onPause:!0,onPlay:!0,onPlaying:!0,onProgress:!0,onRateChange:!0,onSeeked:!0,onSeeking:!0,onStalled:!0,onSuspend:!0,onTimeUpdate:!0,onVolumeChange:!0,onWaiting:!0,onLoad:!0,onAnimationStart:!0,onAnimationEnd:!0,onAnimationIteration:!0,onTransitionEnd:!0,onCopyCapture:!0,onCutCapture:!0,onPasteCapture:!0,onCompositionEndCapture:!0,onCompositionStartCapture:!0,onCompositionUpdateCapture:!0,onKeyDownCapture:!0,onKeyPressCapture:!0,onKeyUpCapture:!0,onFocusCapture:!0,onBlurCapture:!0,onChangeCapture:!0,onInputCapture:!0,onSubmitCapture:!0,onClickCapture:!0,onContextMenuCapture:!0,onDoubleClickCapture:!0,onDragCapture:!0,onDragEndCapture:!0,onDragEnterCapture:!0,onDragExitCapture:!0,onDragLeaveCapture:!0,onDragOverCapture:!0,onDragStartCapture:!0,onDropCapture:!0,onMouseDownCapture:!0,onMouseEnterCapture:!0,onMouseLeaveCapture:!0,onMouseMoveCapture:!0,onMouseOutCapture:!0,onMouseOverCapture:!0,onMouseUpCapture:!0,onSelectCapture:!0,onTouchCancelCapture:!0,onTouchEndCapture:!0,onTouchMoveCapture:!0,onTouchStartCapture:!0,onScrollCapture:!0,onWheelCapture:!0,onAbortCapture:!0,onCanPlayCapture:!0,onCanPlayThroughCapture:!0,onDurationChangeCapture:!0,onEmptiedCapture:!0,onEncryptedCapture:!0,onEndedCapture:!0,onErrorCapture:!0,onLoadedDataCapture:!0,onLoadedMetadataCapture:!0,onLoadStartCapture:!0,onPauseCapture:!0,onPlayCapture:!0,onPlayingCapture:!0,onProgressCapture:!0,onRateChangeCapture:!0,onSeekedCapture:!0,onSeekingCapture:!0,onStalledCapture:!0,onSuspendCapture:!0,onTimeUpdateCapture:!0,onVolumeChangeCapture:!0,onWaitingCapture:!0,onLoadCapture:!0,onAnimationStartCapture:!0,onAnimationEndCapture:!0,onAnim