From ca5e2100f2fa14c86fea4a38d57572c446cb7a68 Mon Sep 17 00:00:00 2001 From: Cheton Wu Date: Tue, 10 Apr 2018 16:10:38 +0800 Subject: [PATCH] Update icons --- dist/react-checkbox.css | 27 +- dist/react-checkbox.min.css | 2 +- docs/bundle.js | 25538 +-------------------------- docs/index.html | 2 +- images/icon/component_checkbox.png | Bin 843 -> 915 bytes package.json | 2 +- src/index.styl | 19 +- 7 files changed, 329 insertions(+), 25261 deletions(-) mode change 100755 => 100644 images/icon/component_checkbox.png diff --git a/dist/react-checkbox.css b/dist/react-checkbox.css index 7cfdbd4..888f233 100644 --- a/dist/react-checkbox.css +++ b/dist/react-checkbox.css @@ -1,4 +1,4 @@ -/*! react-checkbox v3.2.0 | (c) 2018 Trend Micro Inc. | MIT | https://github.com/trendmicro-frontend/react-checkbox */ +/*! react-checkbox v3.3.0 | (c) 2018 Trend Micro Inc. | MIT | https://github.com/trendmicro-frontend/react-checkbox */ .checkbox---control-checkbox---2Mo4k { -webkit-box-sizing: border-box; -moz-box-sizing: border-box; @@ -32,7 +32,7 @@ .checkbox---input-checkbox---3hbfZ + .checkbox---control-indicator---dcwXW { content: ""; display: inline-block; - background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJwAAAAQCAYAAADjyhbuAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAu1JREFUeNrsWUFrE0EUfpsoSUqLsa2BLD20iIoBobDpQUG00IMXwYI5KsZDQS8i/oDdvVfw5CGHBiriwYN48yAqiF7cxeghhxahomzQ1jTQmk0tMc4bTUTdJDPb7ToJ+8Ekm5nZL7yZb9+btw8gQAAfIeGHYRga+VI579XT6bTmOHLbHR9c9YdPuV90xWdmUo58ZP0UpOXkM8n6mW34hN6P5ZMzrvgOPX+sScS4OPmxLssyJJNJpjtLpRJYlgXEQMnBOMqnTcmgptn4dKME2isLiIFt+Vw9Tg58RGyu+YjgpDYCmYvFYhCNRpl4arUa2LaN65dz4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k1RN7K8F4NkcWj+iwG2IjGxMv/mFOafNk8Ygc7lNaP1n1yLIMyWSSLB6hUAhsNhtZ9eh9PBYm7yvtAVk8esMXlHYRLKVSqZJIJMDv94Pb7aaPW5PL5SCdTkMkEiFPlcXfZXDemxZfFr80B3wZ+FIqY0PkqbISTwvN4hWKZRh9PEOWOrLnDlGvnng8DsFgEPL5PHla43Q6IZVKNX1/5XIZ9Dwef5eW4POZgBAPiogDihNFuu/VU+giH/vHIS6Xi3prw/1xyNUj/4+nd7hiQzj36n08uGJDHMEA9QC6rFYrdfm0esaxVX28Vs9w4z06vbfpP7IRezcv3sSJgTUz2nqi9/Ho6umhHp/aZ1YznJE5u8ch2mzhD3na45THLlpOLpJnc8Ep0XJ3qq5pXWYgnY6nBsMLDv+Nk6Ne0Q88+SSu7YAZMDqyPP3cfPNNXDcbXIc10szHpdPx1GA4weHUeengTrJAiA1Fhwvd6XmZvHxw6vR7d5ClrHUUsaHocBc7s/iLvCadwnCCw6nu9snd4LVvgWtHXWIqRaHhrkoLQ/02uHFsF3i2d8P5/b0iPgoNj05MOo/hBDeelURGw0wXHV4+Jwo//yKuWsBMhhlt4viAOGtDYirPrEz4GE5wd97/gBdSAQb7bEJ4119/1TSVrvDw4wJMzclwwLFNCO/Wu++6m0qb7Rqb+bh0Op4aDLlpCD+bFYtcFB4KsF0wa+KBMAoPBag38pcHxZFPbUOfVjodTw2GFBwef+A2XmvFoBHpZ1HEuvJS+9RswmNVcFge4YClF8693NodZiq1dT49guUqLpx79T4e3FoqlsJq7zWL90zM4n2Vtor3KDjymZisMwD/AJ++l0b54qs0AAAAAElFTkSuQmCC) no-repeat -1px 0; width: 16px; height: 16px; } @@ -54,24 +54,19 @@ .checkbox---input-checkbox---3hbfZ:not(:checked):not(:indeterminate):disabled + .checkbox---control-indicator---dcwXW { background-position: -81px 0; } -.checkbox---control-checkbox---2Mo4k.checkbox---disabled---eCY9b > .checkbox---control-text---3IJSz { - opacity: 0.4; - -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=40)"; - filter: alpha(opacity=40); +.checkbox---control-checkbox---2Mo4k.checkbox---disabled---eCY9b { cursor: not-allowed; } +.checkbox---control-checkbox---2Mo4k.checkbox---disabled---eCY9b .checkbox---text-label---2D19D { + opacity: 0.5; + -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=50)"; + filter: alpha(opacity=50); +} .checkbox---input-checkbox---3hbfZ:disabled + .checkbox---control-indicator---dcwXW { cursor: not-allowed; -} -.checkbox---input-checkbox---3hbfZ:checked:disabled + .checkbox---control-indicator---dcwXW { - opacity: 0.4; - -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=40)"; - filter: alpha(opacity=40); -} -.checkbox---input-checkbox---3hbfZ:not(:checked):indeterminate:disabled + .checkbox---control-indicator---dcwXW { - opacity: 0.4; - -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=40)"; - filter: alpha(opacity=40); + opacity: 0.5; + -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=50)"; + filter: alpha(opacity=50); } /*# sourceMappingURL=react-checkbox.css.map*/ \ No newline at end of file diff --git a/dist/react-checkbox.min.css b/dist/react-checkbox.min.css index 1cb80b7..31e2ee2 100644 --- a/dist/react-checkbox.min.css +++ b/dist/react-checkbox.min.css @@ -1 +1 @@ -/*! react-checkbox v3.2.0 | (c) 2018 Trend Micro Inc. | MIT | https://github.com/trendmicro-frontend/react-checkbox */.checkbox---control-checkbox---2Mo4k{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;line-height:20px;min-height:20px;padding:0;margin-bottom:0;cursor:pointer}.checkbox---control-checkbox---2Mo4k *,.checkbox---control-checkbox---2Mo4k :after,.checkbox---control-checkbox---2Mo4k :before{-webkit-box-sizing:inherit;-moz-box-sizing:inherit;box-sizing:inherit}.checkbox---control-checkbox---2Mo4k .checkbox---input-checkbox---3hbfZ{display:none}.checkbox---control-checkbox---2Mo4k .checkbox---control-indicator---dcwXW{display:inline-block;vertical-align:middle;pointer-events:none}.checkbox---control-checkbox---2Mo4k .checkbox---text-label---2D19D:not(:empty){display:inline-block;vertical-align:middle;margin-left:8px}.checkbox---input-checkbox---3hbfZ+.checkbox---control-indicator---dcwXW{content:"";display:inline-block;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJwAAAAQCAYAAADjyhbuAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAu1JREFUeNrsWUFrE0EUfpsoSUqLsa2BLD20iIoBobDpQUG00IMXwYI5KsZDQS8i/oDdvVfw5CGHBiriwYN48yAqiF7cxeghhxahomzQ1jTQmk0tMc4bTUTdJDPb7ToJ+8Ekm5nZL7yZb9+btw8gQAAfIeGHYRga+VI579XT6bTmOHLbHR9c9YdPuV90xWdmUo58ZP0UpOXkM8n6mW34hN6P5ZMzrvgOPX+sScS4OPmxLssyJJNJpjtLpRJYlgXEQMnBOMqnTcmgptn4dKME2isLiIFt+Vw9Tg58RGyu+YjgpDYCmYvFYhCNRpl4arUa2LaN65dz4BJ6P4jYKN9w9iIMZy8w8ZXzd0hbBCI4KdTsZDUOkUgkus5hNQ5x7VgCeh2sYkNEIpGuc0TfD1axIeKZ2dZ1iDwVFd7FDYfDnbwKN188snO+B2cOQuOKwuKlmPjmT4yBcf7o7pxjJKntmOj7QbwUN19ocLB1vacfDqLnJuK0rWx884TvtDxEW6m6LYR9+xcKUNmq/yOK9cuTQvBxia/XxYYLlZ8ep9ezj97tmG9obxjUqZ/h58bLj0LY+Lc42vX9L76+FhyGzktHRlq/UWwoOjzoFtaq3HwYOs+O7/t91iFiQ9HlimuwVKkF7zE8Rs+F1Ga4e2ZttEIpCo1mVS6gHBigzVytwqlf3Ci0XHE1UEfg4TBlt6hHQ0+npmXal3363jUfejL0aPPHx2AuNUr7NOItAwSCo7j19jP1bpOjA1R41198cBVKm7i3XKbe7XA8SoV3880n4UKpU9bYMbP3ma+vQyr1aE9W4HUmBYUvVSpAL7zm3ZkJIrQtKkDR4HX26Ec22leCw9cfmNp7BevrNkw/XArinZ8hFcsjLKjX60xzdcZzEKbjeh+cmbBcxYJGo8E0V/T9wHIVC75vbv4xt+nhdMuyVKzH8USiTmMka1Q5M0e9yxh/8dk/PtO2bQXroxwwO/2X6PtRzi+qWB/1iC9AgN3BDwEGADhJW/UAdUKFAAAAAElFTkSuQmCC) no-repeat -1px 0;width:16px;height:16px}.checkbox---input-checkbox---3hbfZ:checked+.checkbox---control-indicator---dcwXW{background-position:-41px 0}.checkbox---input-checkbox---3hbfZ:indeterminate+.checkbox---control-indicator---dcwXW{background-position:-101px 0}.checkbox---control-checkbox---2Mo4k:not(.checkbox---disabled---eCY9b):hover>.checkbox---control-indicator---dcwXW{background-position:-21px 0}.checkbox---control-checkbox---2Mo4k:not(.checkbox---disabled---eCY9b):hover>.checkbox---input-checkbox---3hbfZ:checked+.checkbox---control-indicator---dcwXW{background-position:-61px 0}.checkbox---control-checkbox---2Mo4k:not(.checkbox---disabled---eCY9b):hover>.checkbox---input-checkbox---3hbfZ:indeterminate+.checkbox---control-indicator---dcwXW{background-position:-121px 0}.checkbox---input-checkbox---3hbfZ:not(:checked):not(:indeterminate):disabled+.checkbox---control-indicator---dcwXW{background-position:-81px 0}.checkbox---control-checkbox---2Mo4k.checkbox---disabled---eCY9b>.checkbox---control-text---3IJSz{opacity:.4;cursor:not-allowed}.checkbox---input-checkbox---3hbfZ:disabled+.checkbox---control-indicator---dcwXW{cursor:not-allowed}.checkbox---input-checkbox---3hbfZ:checked:disabled+.checkbox---control-indicator---dcwXW{opacity:.4}.checkbox---input-checkbox---3hbfZ:not(:checked):indeterminate:disabled+.checkbox---control-indicator---dcwXW{opacity:.4} \ No newline at end of file +/*! react-checkbox v3.3.0 | (c) 2018 Trend Micro Inc. | MIT | https://github.com/trendmicro-frontend/react-checkbox */.checkbox---control-checkbox---2Mo4k{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;line-height:20px;min-height:20px;padding:0;margin-bottom:0;cursor:pointer}.checkbox---control-checkbox---2Mo4k *,.checkbox---control-checkbox---2Mo4k :after,.checkbox---control-checkbox---2Mo4k :before{-webkit-box-sizing:inherit;-moz-box-sizing:inherit;box-sizing:inherit}.checkbox---control-checkbox---2Mo4k .checkbox---input-checkbox---3hbfZ{display:none}.checkbox---control-checkbox---2Mo4k .checkbox---control-indicator---dcwXW{display:inline-block;vertical-align:middle;pointer-events:none}.checkbox---control-checkbox---2Mo4k .checkbox---text-label---2D19D:not(:empty){display:inline-block;vertical-align:middle;margin-left:8px}.checkbox---input-checkbox---3hbfZ+.checkbox---control-indicator---dcwXW{content:"";display:inline-block;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJwAAAAQCAYAAADjyhbuAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAAZdEVYdFNvZnR3YXJlAEFkb2JlIEltYWdlUmVhZHlxyWU8AAADA0lEQVRoQ+2Zy2sTcRDHJw1ViQ0mtY0kVIj4QkEttD2oF3sTScCAOQhRjIdIT77+gKT3it6EQCxowEMOIslBEHyBXkyhevBQUSrKBm1pCqmLmsS48+u0eZDG2U3a7sJ+4Mf+ZrI7JPv7Zn6PsVQUwMRkgxCCkyQJMpkMuXj4fD7weDxk1RN7K8F4NkcWj+iwG2IjGxMv/mFOafNk8Ygc7lNaP1n1yLIMyWSSLB6hUAhsNhtZ9eh9PBYm7yvtAVk8esMXlHYRLKVSqZJIJMDv94Pb7aaPW5PL5SCdTkMkEiFPlcXfZXDemxZfFr80B3wZ+FIqY0PkqbISTwvN4hWKZRh9PEOWOrLnDlGvnng8DsFgEPL5PHla43Q6IZVKNX1/5XIZ9Dwef5eW4POZgBAPiogDihNFuu/VU+giH/vHIS6Xi3prw/1xyNUj/4+nd7hiQzj36n08uGJDHMEA9QC6rFYrdfm0esaxVX28Vs9w4z06vbfpP7IRezcv3sSJgTUz2nqi9/Ho6umhHp/aZ1YznJE5u8ch2mzhD3na45THLlpOLpJnc8Ep0XJ3qq5pXWYgnY6nBsMLDv+Nk6Ne0Q88+SSu7YAZMDqyPP3cfPNNXDcbXIc10szHpdPx1GA4weHUeengTrJAiA1Fhwvd6XmZvHxw6vR7d5ClrHUUsaHocBc7s/iLvCadwnCCw6nu9snd4LVvgWtHXWIqRaHhrkoLQ/02uHFsF3i2d8P5/b0iPgoNj05MOo/hBDeelURGw0wXHV4+Jwo//yKuWsBMhhlt4viAOGtDYirPrEz4GE5wd97/gBdSAQb7bEJ4119/1TSVrvDw4wJMzclwwLFNCO/Wu++6m0qb7Rqb+bh0Op4aDLlpCD+bFYtcFB4KsF0wa+KBMAoPBag38pcHxZFPbUOfVjodTw2GFBwef+A2XmvFoBHpZ1HEuvJS+9RswmNVcFge4YClF8693NodZiq1dT49guUqLpx79T4e3FoqlsJq7zWL90zM4n2Vtor3KDjymZisMwD/AJ++l0b54qs0AAAAAElFTkSuQmCC) no-repeat -1px 0;width:16px;height:16px}.checkbox---input-checkbox---3hbfZ:checked+.checkbox---control-indicator---dcwXW{background-position:-41px 0}.checkbox---input-checkbox---3hbfZ:indeterminate+.checkbox---control-indicator---dcwXW{background-position:-101px 0}.checkbox---control-checkbox---2Mo4k:not(.checkbox---disabled---eCY9b):hover>.checkbox---control-indicator---dcwXW{background-position:-21px 0}.checkbox---control-checkbox---2Mo4k:not(.checkbox---disabled---eCY9b):hover>.checkbox---input-checkbox---3hbfZ:checked+.checkbox---control-indicator---dcwXW{background-position:-61px 0}.checkbox---control-checkbox---2Mo4k:not(.checkbox---disabled---eCY9b):hover>.checkbox---input-checkbox---3hbfZ:indeterminate+.checkbox---control-indicator---dcwXW{background-position:-121px 0}.checkbox---input-checkbox---3hbfZ:not(:checked):not(:indeterminate):disabled+.checkbox---control-indicator---dcwXW{background-position:-81px 0}.checkbox---control-checkbox---2Mo4k.checkbox---disabled---eCY9b{cursor:not-allowed}.checkbox---control-checkbox---2Mo4k.checkbox---disabled---eCY9b .checkbox---text-label---2D19D{opacity:.5}.checkbox---input-checkbox---3hbfZ:disabled+.checkbox---control-indicator---dcwXW{cursor:not-allowed;opacity:.5} \ No newline at end of file diff --git a/docs/bundle.js b/docs/bundle.js index d38a926..1c714df 100644 --- a/docs/bundle.js +++ b/docs/bundle.js @@ -68,25483 +68,563 @@ /***/ "../images/icon/component_checkbox.png": /***/ (function(module, exports) { -module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJwAAAAQCAYAAADjyhbuAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAu1JREFUeNrsWUFrE0EUfpsoSUqLsa2BLD20iIoBobDpQUG00IMXwYI5KsZDQS8i/oDdvVfw5CGHBiriwYN48yAqiF7cxeghhxahomzQ1jTQmk0tMc4bTUTdJDPb7ToJ+8Ekm5nZL7yZb9+btw8gQAAfIeGHYRga+VI579XT6bTmOHLbHR9c9YdPuV90xWdmUo58ZP0UpOXkM8n6mW34hN6P5ZMzrvgOPX+sScS4OPmxLssyJJNJpjtLpRJYlgXEQMnBOMqnTcmgptn4dKME2isLiIFt+Vw9Tg58RGyu+YjgpDYCmYvFYhCNRpl4arUa2LaN65dz4BJ6P4jYKN9w9iIMZy8w8ZXzd0hbBCI4KdTsZDUOkUgkus5hNQ5x7VgCeh2sYkNEIpGuc0TfD1axIeKZ2dZ1iDwVFd7FDYfDnbwKN188snO+B2cOQuOKwuKlmPjmT4yBcf7o7pxjJKntmOj7QbwUN19ocLB1vacfDqLnJuK0rWx884TvtDxEW6m6LYR9+xcKUNmq/yOK9cuTQvBxia/XxYYLlZ8ep9ezj97tmG9obxjUqZ/h58bLj0LY+Lc42vX9L76+FhyGzktHRlq/UWwoOjzoFtaq3HwYOs+O7/t91iFiQ9HlimuwVKkF7zE8Rs+F1Ga4e2ZttEIpCo1mVS6gHBigzVytwqlf3Ci0XHE1UEfg4TBlt6hHQ0+npmXal3363jUfejL0aPPHx2Au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nBsMLDv+Nk6Ne0Q88+SSu7YAZMDqyPP3cfPNNXDcbXIc10szHpdPx1GA4weHUeengTrJAiA1Fhwvd6XmZvHxw6vR7d5ClrHUUsaHocBc7s/iLvCadwnCCw6nu9snd4LVvgWtHXWIqRaHhrkoLQ/02uHFsF3i2d8P5/b0iPgoNj05MOo/hBDeelURGw0wXHV4+Jwo//yKuWsBMhhlt4viAOGtDYirPrEz4GE5wd97/gBdSAQb7bEJ4119/1TSVrvDw4wJMzclwwLFNCO/Wu++6m0qb7Rqb+bh0Op4aDLlpCD+bFYtcFB4KsF0wa+KBMAoPBag38pcHxZFPbUOfVjodTw2GFBwef+A2XmvFoBHpZ1HEuvJS+9RswmNVcFge4YClF8693NodZiq1dT49guUqLpx79T4e3FoqlsJq7zWL90zM4n2Vtor3KDjymZisMwD/AJ++l0b54qs0AAAAAElFTkSuQmCC\"//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi4vaW1hZ2VzL2ljb24vY29tcG9uZW50X2NoZWNrYm94LnBuZy5qcyIsInNvdXJjZXMiOlsid2VicGFjazovLy8uLi9pbWFnZXMvaWNvbi9jb21wb25lbnRfY2hlY2tib3gucG5nPzYzMWEiXSwic291cmNlc0NvbnRlbnQiOlsibW9kdWxlLmV4cG9ydHMgPSBcImRhdGE6aW1hZ2UvcG5nO2Jhc2U2NCxpVkJPUncwS0dnb0FBQUFOU1VoRVVnQUFBSndBQUFBUUNBWUFBQURqeWhidUFBQUFBWE5TUjBJQXJzNGM2UUFBQUFSblFVMUJBQUN4and2OFlRVUFBQUFKY0VoWmN3QUFEc1FBQUE3RUFaVXJEaHNBQUFBWmRFVllkRk52Wm5SM1lYSmxBRUZrYjJKbElFbHRZV2RsVW1WaFpIbHh5V1U4QUFBREEwbEVRVlJvUSsyWnkyc1RjUkRISncxVmlRMG10WTBrVklqNFFrRXR0RDJvRjNzVFNjQ0FPUWhSaklkSVQ3NytnS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JxYitiaDBPcDRhRExscENEK2JGWXRjRkI0S3NGMHdhK0tCTUFvUEJhZzM4cGNIeFpGUGJVT2ZWam9kVHcyR0ZCd2VmK0EyWG12Rm9CSHBaMUhFdXZKUys5UnN3bU5WY0ZnZTRZQ2xGODY5M05vZFppcTFkVDQ5Z3VVcUxweDc5VDRlM0ZvcWxzSnE3eldMOTB6TTRuMlZ0b3IzS0RqeW1aaXNNd0QvQUorK2wwYjU0cXMwQUFBQUFFbEZUa1N1UW1DQ1wiXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi4vaW1hZ2VzL2ljb24vY29tcG9uZW50X2NoZWNrYm94LnBuZ1xuLy8gbW9kdWxlIGlkID0gLi4vaW1hZ2VzL2ljb24vY29tcG9uZW50X2NoZWNrYm94LnBuZ1xuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBIiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///../images/icon/component_checkbox.png\n"); /***/ }), /***/ "../node_modules/@trendmicro/react-buttons/dist/react-buttons.css": /***/ (function(module, exports, __webpack_require__) { -// style-loader: Adds some css to the DOM by adding a - * - * Note: replace · with * in the above snippet. - * */ -var COMPONENTS_PER_TAG = 40; - -var BrowserTag = function () { - function BrowserTag(el, isLocal) { - var existingSource = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : ''; - classCallCheck(this, BrowserTag); - - this.el = el; - this.isLocal = isLocal; - this.ready = false; - - var extractedComps = extractCompsFromCSS(existingSource); - - this.size = extractedComps.length; - this.components = extractedComps.reduce(function (acc, obj) { - acc[obj.componentId] = obj; // eslint-disable-line no-param-reassign - return acc; - }, {}); - } - - BrowserTag.prototype.isFull = function isFull() { - return this.size >= COMPONENTS_PER_TAG; - }; - - BrowserTag.prototype.addComponent = function addComponent(componentId) { - if (!this.ready) this.replaceElement(); - if (process.env.NODE_ENV !== 'production' && this.components[componentId]) { - throw new Error('Trying to add Component \'' + componentId + '\' twice!'); - } - - var comp = { componentId: componentId, textNode: document.createTextNode('') }; - this.el.appendChild(comp.textNode); - - this.size += 1; - this.components[componentId] = comp; - }; - - BrowserTag.prototype.inject = function inject(componentId, css, name) { - if (!this.ready) this.replaceElement(); - var comp = this.components[componentId]; - - if (process.env.NODE_ENV !== 'production' && !comp) { - throw new Error('Must add a new component before you can inject css into it'); - } - if (comp.textNode.data === '') { - comp.textNode.appendData('\n/* sc-component-id: ' + componentId + ' */\n'); - } - - comp.textNode.appendData(css); - if (name) { - var existingNames = this.el.getAttribute(SC_ATTR); - this.el.setAttribute(SC_ATTR, existingNames ? existingNames + ' ' + name : name); - } - - var nonce = getNonce(); - - if (nonce) { - this.el.setAttribute('nonce', nonce); - } - }; - - BrowserTag.prototype.toHTML = function toHTML() { - return this.el.outerHTML; - }; - - BrowserTag.prototype.toReactElement = function toReactElement() { - throw new Error("BrowserTag doesn't implement toReactElement!"); - }; - - BrowserTag.prototype.clone = function clone() { - throw new Error('BrowserTag cannot be cloned!'); - }; - - /* Because we care about source order, before we can inject anything we need to - * create a text node for each component and replace the existing CSS. */ - - - BrowserTag.prototype.replaceElement = function replaceElement() { - var _this = this; - - this.ready = true; - // We have nothing to inject. Use the current el. - if (this.size === 0) return; - - // Build up our replacement style tag - var newEl = this.el.cloneNode(); - newEl.appendChild(document.createTextNode('\n')); - - Object.keys(this.components).forEach(function (key) { - var comp = _this.components[key]; - - // eslint-disable-next-line no-param-reassign - comp.textNode = document.createTextNode(comp.cssFromDOM); - newEl.appendChild(comp.textNode); - }); - - if (!this.el.parentNode) { - throw new Error("Trying to replace an element that wasn't mounted!"); - } - - // The ol' switcheroo - this.el.parentNode.replaceChild(newEl, this.el); - this.el = newEl; - }; - - return BrowserTag; -}(); - -/* Factory function to separate DOM operations from logical ones*/ - - -var BrowserStyleSheet = { - create: function create() { - var tags = []; - var names = {}; - - /* Construct existing state from DOM */ - var nodes = document.querySelectorAll('[' + SC_ATTR + ']'); - var nodesLength = nodes.length; - - for (var i = 0; i < nodesLength; i += 1) { - var el = nodes[i]; - - tags.push(new BrowserTag(el, el.getAttribute(LOCAL_ATTR) === 'true', el.innerHTML)); - - var attr = el.getAttribute(SC_ATTR); - if (attr) { - attr.trim().split(/\s+/).forEach(function (name) { - names[name] = true; - }); - } - } - - /* Factory for making more tags */ - var tagConstructor = function tagConstructor(isLocal) { - var el = document.createElement('style'); - el.type = 'text/css'; - el.setAttribute(SC_ATTR, ''); - el.setAttribute(LOCAL_ATTR, isLocal ? 'true' : 'false'); - if (!document.head) throw new Error('Missing document '); - document.head.appendChild(el); - return new BrowserTag(el, isLocal); - }; - - return new StyleSheet(tagConstructor, tags, names); - } -}; - -// -var SC_ATTR = 'data-styled-components'; -var LOCAL_ATTR = 'data-styled-components-is-local'; -var CONTEXT_KEY = '__styled-components-stylesheet__'; - -/* eslint-disable flowtype/object-type-delimiter */ - -/* eslint-enable flowtype/object-type-delimiter */ - -var instance = null; -// eslint-disable-next-line no-use-before-define -var clones = []; - -var StyleSheet = function () { - function StyleSheet(tagConstructor) { - var tags = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : []; - var names = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; - classCallCheck(this, StyleSheet); - this.hashes = {}; - this.deferredInjections = {}; - this.stylesCacheable = typeof document !== 'undefined'; - - this.tagConstructor = tagConstructor; - this.tags = tags; - this.names = names; - this.constructComponentTagMap(); - } - - // helper for `ComponentStyle` to know when it cache static styles. - // staticly styled-component can not safely cache styles on the server - // without all `ComponentStyle` instances saving a reference to the - // the styleSheet instance they last rendered with, - // or listening to creation / reset events. otherwise you might create - // a component with one stylesheet and render it another api response - // with another, losing styles on from your server-side render. - - - StyleSheet.prototype.constructComponentTagMap = function constructComponentTagMap() { - var _this = this; - - this.componentTags = {}; - - this.tags.forEach(function (tag) { - Object.keys(tag.components).forEach(function (componentId) { - _this.componentTags[componentId] = tag; - }); - }); - }; - - /* Best level of caching—get the name from the hash straight away. */ - - - StyleSheet.prototype.getName = function getName(hash) { - return this.hashes[hash.toString()]; - }; - - /* Second level of caching—if the name is already in the dom, don't - * inject anything and record the hash for getName next time. */ - - - StyleSheet.prototype.alreadyInjected = function alreadyInjected(hash, name) { - if (!this.names[name]) return false; - - this.hashes[hash.toString()] = name; - return true; - }; - - /* Third type of caching—don't inject components' componentId twice. */ - - - StyleSheet.prototype.hasInjectedComponent = function hasInjectedComponent(componentId) { - return !!this.componentTags[componentId]; - }; - - StyleSheet.prototype.deferredInject = function deferredInject(componentId, isLocal, css) { - if (this === instance) { - clones.forEach(function (clone) { - clone.deferredInject(componentId, isLocal, css); - }); - } - - this.getOrCreateTag(componentId, isLocal); - this.deferredInjections[componentId] = css; - }; - - StyleSheet.prototype.inject = function inject(componentId, isLocal, css, hash, name) { - if (this === instance) { - clones.forEach(function (clone) { - clone.inject(componentId, isLocal, css); - }); - } - - var tag = this.getOrCreateTag(componentId, isLocal); - - var deferredInjection = this.deferredInjections[componentId]; - if (deferredInjection) { - tag.inject(componentId, deferredInjection); - delete this.deferredInjections[componentId]; - } - - tag.inject(componentId, css, name); - - if (hash && name) { - this.hashes[hash.toString()] = name; - } - }; - - StyleSheet.prototype.toHTML = function toHTML() { - return this.tags.map(function (tag) { - return tag.toHTML(); - }).join(''); - }; - - StyleSheet.prototype.toReactElements = function toReactElements() { - return this.tags.map(function (tag, i) { - return tag.toReactElement('sc-' + i); - }); - }; - - StyleSheet.prototype.getOrCreateTag = function getOrCreateTag(componentId, isLocal) { - var existingTag = this.componentTags[componentId]; - if (existingTag) { - return existingTag; - } - - var lastTag = this.tags[this.tags.length - 1]; - var componentTag = !lastTag || lastTag.isFull() || lastTag.isLocal !== isLocal ? this.createNewTag(isLocal) : lastTag; - this.componentTags[componentId] = componentTag; - componentTag.addComponent(componentId); - return componentTag; - }; - - StyleSheet.prototype.createNewTag = function createNewTag(isLocal) { - var newTag = this.tagConstructor(isLocal); - this.tags.push(newTag); - return newTag; - }; - - StyleSheet.reset = function reset(isServer) { - instance = StyleSheet.create(isServer); - }; - - /* We can make isServer totally implicit once Jest 20 drops and we - * can change environment on a per-test basis. */ - - - StyleSheet.create = function create() { - var isServer = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : typeof document === 'undefined'; - - return (isServer ? ServerStyleSheet : BrowserStyleSheet).create(); - }; - - StyleSheet.clone = function clone(oldSheet) { - var newSheet = new StyleSheet(oldSheet.tagConstructor, oldSheet.tags.map(function (tag) { - return tag.clone(); - }), _extends({}, oldSheet.names)); - - newSheet.hashes = _extends({}, oldSheet.hashes); - newSheet.deferredInjections = _extends({}, oldSheet.deferredInjections); - clones.push(newSheet); - - return newSheet; - }; - - createClass(StyleSheet, null, [{ - key: 'instance', - get: function get$$1() { - return instance || (instance = StyleSheet.create()); - } - }]); - return StyleSheet; -}(); - -var _StyleSheetManager$ch; - -// -var StyleSheetManager = function (_Component) { - inherits(StyleSheetManager, _Component); - - function StyleSheetManager() { - classCallCheck(this, StyleSheetManager); - return possibleConstructorReturn(this, _Component.apply(this, arguments)); - } - - StyleSheetManager.prototype.getChildContext = function getChildContext() { - var _ref; - - return _ref = {}, _ref[CONTEXT_KEY] = this.props.sheet, _ref; - }; - - StyleSheetManager.prototype.render = function render() { - /* eslint-disable react/prop-types */ - // Flow v0.43.1 will report an error accessing the `children` property, - // but v0.47.0 will not. It is necessary to use a type cast instead of - // a "fixme" comment to satisfy both Flow versions. - return __WEBPACK_IMPORTED_MODULE_2_react___default.a.Children.only(this.props.children); - }; - - return StyleSheetManager; -}(__WEBPACK_IMPORTED_MODULE_2_react__["Component"]); - -StyleSheetManager.childContextTypes = (_StyleSheetManager$ch = {}, _StyleSheetManager$ch[CONTEXT_KEY] = __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.instanceOf(StyleSheet), __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.instanceOf(ServerStyleSheet)]).isRequired, _StyleSheetManager$ch); - -StyleSheetManager.propTypes = { - sheet: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.instanceOf(StyleSheet), __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.instanceOf(ServerStyleSheet)]).isRequired -}; - -// -/* eslint-disable no-underscore-dangle */ -var ServerTag = function () { - function ServerTag(isLocal) { - classCallCheck(this, ServerTag); - - this.isLocal = isLocal; - this.components = {}; - this.size = 0; - this.names = []; - } - - ServerTag.prototype.isFull = function isFull() { - return false; - }; - - ServerTag.prototype.addComponent = function addComponent(componentId) { - if (process.env.NODE_ENV !== 'production' && this.components[componentId]) { - throw new Error('Trying to add Component \'' + componentId + '\' twice!'); - } - this.components[componentId] = { componentId: componentId, css: '' }; - this.size += 1; - }; - - ServerTag.prototype.concatenateCSS = function concatenateCSS() { - var _this = this; - - return Object.keys(this.components).reduce(function (styles, k) { - return styles + _this.components[k].css; - }, ''); - }; - - ServerTag.prototype.inject = function inject(componentId, css, name) { - var comp = this.components[componentId]; - - if (process.env.NODE_ENV !== 'production' && !comp) { - throw new Error('Must add a new component before you can inject css into it'); - } - if (comp.css === '') comp.css = '/* sc-component-id: ' + componentId + ' */\n'; - - comp.css += css.replace(/\n*$/, '\n'); - - if (name) this.names.push(name); - }; - - ServerTag.prototype.toHTML = function toHTML() { - var attrs = ['type="text/css"', SC_ATTR + '="' + this.names.join(' ') + '"', LOCAL_ATTR + '="' + (this.isLocal ? 'true' : 'false') + '"']; - - var nonce = getNonce(); - - if (nonce) { - attrs.push('nonce="' + nonce + '"'); - } - - return ''; - }; - - ServerTag.prototype.toReactElement = function toReactElement(key) { - var _attrs; - - var attrs = (_attrs = {}, _attrs[SC_ATTR] = this.names.join(' '), _attrs[LOCAL_ATTR] = this.isLocal.toString(), _attrs); - - var nonce = getNonce(); - - if (nonce) { - attrs.nonce = nonce; - } - - return __WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement('style', _extends({ - key: key, - type: 'text/css' - }, attrs, { - dangerouslySetInnerHTML: { __html: this.concatenateCSS() } - })); - }; - - ServerTag.prototype.clone = function clone() { - var _this2 = this; - - var copy = new ServerTag(this.isLocal); - copy.names = [].concat(this.names); - copy.size = this.size; - copy.components = Object.keys(this.components).reduce(function (acc, key) { - acc[key] = _extends({}, _this2.components[key]); // eslint-disable-line no-param-reassign - return acc; - }, {}); - - return copy; - }; - - return ServerTag; -}(); - -var ServerStyleSheet = function () { - function ServerStyleSheet() { - classCallCheck(this, ServerStyleSheet); - - this.instance = StyleSheet.clone(StyleSheet.instance); - } - - ServerStyleSheet.prototype.collectStyles = function collectStyles(children) { - if (this.closed) { - throw new Error("Can't collect styles once you've called getStyleTags!"); - } - return __WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement( - StyleSheetManager, - { sheet: this.instance }, - children - ); - }; - - ServerStyleSheet.prototype.getStyleTags = function getStyleTags() { - if (!this.closed) { - clones.splice(clones.indexOf(this.instance), 1); - this.closed = true; - } - - return this.instance.toHTML(); - }; - - ServerStyleSheet.prototype.getStyleElement = function getStyleElement() { - if (!this.closed) { - clones.splice(clones.indexOf(this.instance), 1); - this.closed = true; - } - - return this.instance.toReactElements(); - }; - - ServerStyleSheet.create = function create() { - return new StyleSheet(function (isLocal) { - return new ServerTag(isLocal); - }); - }; - - return ServerStyleSheet; -}(); - -// - -var LIMIT = 200; - -var createWarnTooManyClasses = (function (displayName) { - var generatedClasses = {}; - var warningSeen = false; - - return function (className) { - if (!warningSeen) { - generatedClasses[className] = true; - if (Object.keys(generatedClasses).length >= LIMIT) { - // Unable to find latestRule in test environment. - /* eslint-disable no-console, prefer-template */ - console.warn('Over ' + LIMIT + ' classes were generated for component ' + displayName + '. \n' + 'Consider using the attrs method, together with a style object for frequently changed styles.\n' + 'Example:\n' + ' const Component = styled.div.attrs({\n' + ' style: ({ background }) => ({\n' + ' background,\n' + ' }),\n' + ' })`width: 100%;`\n\n' + ' '); - warningSeen = true; - generatedClasses = {}; - } - } - }; -}); - -// -/* eslint-disable max-len */ -/** - * Trying to avoid the unknown-prop errors on styled components by filtering by - * React's attribute whitelist. - * - * To regenerate this regex: - * - * 1. `npm i -g regexgen` (https://github.com/devongovett/regexgen) - * 2. Run `regexgen` with the list of space-separated words below as input - * 3. Surround the emitted regex with this: `/^(GENERATED_REGEX)$/` -- this will ensure a full string match - * and no false positives from partials - **/ -/* -children dangerouslySetInnerHTML key ref autoFocus defaultValue valueLink defaultChecked checkedLink innerHTML suppressContentEditableWarning onFocusIn onFocusOut className onCopy onCut onPaste onCompositionEnd onCompositionStart onCompositionUpdate onKeyDown onKeyPress onKeyUp onFocus onBlur onChange onInput onSubmit onReset onClick onContextMenu onDoubleClick onDrag onDragEnd onDragEnter onDragExit onDragLeave onDragOver onDragStart onDrop onMouseDown onMouseEnter onMouseLeave onMouseMove onMouseOut onMouseOver onMouseUp onSelect onTouchCancel onTouchEnd onTouchMove onTouchStart onScroll onWheel onAbort onCanPlay onCanPlayThrough onDurationChange onEmptied onEncrypted onEnded onError onLoadedData onLoadedMetadata onLoadStart onPause onPlay onPlaying onProgress onRateChange onSeeked onSeeking onStalled onSuspend onTimeUpdate onVolumeChange onWaiting onLoad onAnimationStart onAnimationEnd onAnimationIteration onTransitionEnd onCopyCapture onCutCapture onPasteCapture onCompositionEndCapture onCompositionStartCapture onCompositionUpdateCapture onKeyDownCapture onKeyPressCapture onKeyUpCapture onFocusCapture onBlurCapture onChangeCapture onInputCapture onSubmitCapture onResetCapture onClickCapture onContextMenuCapture onDoubleClickCapture onDragCapture onDragEndCapture onDragEnterCapture onDragExitCapture onDragLeaveCapture onDragOverCapture onDragStartCapture onDropCapture onMouseDownCapture onMouseEnterCapture onMouseLeaveCapture onMouseMoveCapture onMouseOutCapture onMouseOverCapture onMouseUpCapture onSelectCapture onTouchCancelCapture onTouchEndCapture onTouchMoveCapture onTouchStartCapture onScrollCapture onWheelCapture onAbortCapture onCanPlayCapture onCanPlayThroughCapture onDurationChangeCapture onEmptiedCapture onEncryptedCapture onEndedCapture onErrorCapture onLoadedDataCapture onLoadedMetadataCapture onLoadStartCapture onPauseCapture onPlayCapture onPlayingCapture onProgressCapture onRateChangeCapture onSeekedCapture onSeekingCapture onStalledCapture onSuspendCapture onTimeUpdateCapture onVolumeChangeCapture onWaitingCapture onLoadCapture onAnimationStartCapture onAnimationEndCapture onAnimationIterationCapture onTransitionEndCapture accept acceptCharset accessKey action allowFullScreen allowTransparency alt as async autoComplete autoPlay capture cellPadding cellSpacing charSet challenge checked cite classID className cols colSpan content contentEditable contextMenu controls coords crossOrigin data dateTime default defer dir disabled download draggable encType form formAction formEncType formMethod formNoValidate formTarget frameBorder headers height hidden high href hrefLang htmlFor httpEquiv icon id inputMode integrity is keyParams keyType kind label lang list loop low manifest marginHeight marginWidth max maxLength media mediaGroup method min minLength multiple muted name nonce noValidate open optimum pattern placeholder playsInline poster preload profile radioGroup readOnly referrerPolicy rel required reversed role rows rowSpan sandbox scope scoped scrolling seamless selected shape size sizes span spellCheck src srcDoc srcLang srcSet start step style summary tabIndex target title type useMap value width wmode wrap about datatype inlist prefix property resource typeof vocab autoCapitalize autoCorrect autoSave color itemProp itemScope itemType itemID itemRef results security unselectable accentHeight accumulate additive alignmentBaseline allowReorder alphabetic amplitude arabicForm ascent attributeName attributeType autoReverse azimuth baseFrequency baseProfile baselineShift bbox begin bias by calcMode capHeight clip clipPath clipRule clipPathUnits colorInterpolation colorInterpolationFilters colorProfile colorRendering contentScriptType contentStyleType cursor cx cy d decelerate descent diffuseConstant direction display divisor dominantBaseline dur dx dy edgeMode elevation enableBackground end exponent externalResourcesRequired fill fillOpacity fillRule filter filterRes filterUnits floodColor floodOpacity focusable fontFamily fontSize fontSizeAdjust fontStretch fontStyle fontVariant fontWeight format from fx fy g1 g2 glyphName glyphOrientationHorizontal glyphOrientationVertical glyphRef gradientTransform gradientUnits hanging horizAdvX horizOriginX ideographic imageRendering in in2 intercept k k1 k2 k3 k4 kernelMatrix kernelUnitLength kerning keyPoints keySplines keyTimes lengthAdjust letterSpacing lightingColor limitingConeAngle local markerEnd markerMid markerStart markerHeight markerUnits markerWidth mask maskContentUnits maskUnits mathematical mode numOctaves offset opacity operator order orient orientation origin overflow overlinePosition overlineThickness paintOrder panose1 pathLength patternContentUnits patternTransform patternUnits pointerEvents points pointsAtX pointsAtY pointsAtZ preserveAlpha preserveAspectRatio primitiveUnits r radius refX refY renderingIntent repeatCount repeatDur requiredExtensions requiredFeatures restart result rotate rx ry scale seed shapeRendering slope spacing specularConstant specularExponent speed spreadMethod startOffset stdDeviation stemh stemv stitchTiles stopColor stopOpacity strikethroughPosition strikethroughThickness string stroke strokeDasharray strokeDashoffset strokeLinecap strokeLinejoin strokeMiterlimit strokeOpacity strokeWidth surfaceScale systemLanguage tableValues targetX targetY textAnchor textDecoration textRendering textLength to transform u1 u2 underlinePosition underlineThickness unicode unicodeBidi unicodeRange unitsPerEm vAlphabetic vHanging vIdeographic vMathematical values vectorEffect version vertAdvY vertOriginX vertOriginY viewBox viewTarget visibility widths wordSpacing writingMode x xHeight x1 x2 xChannelSelector xlinkActuate xlinkArcrole xlinkHref xlinkRole xlinkShow xlinkTitle xlinkType xmlBase xmlns xmlnsXlink xmlLang xmlSpace y y1 y2 yChannelSelector z zoomAndPan -*/ -/* eslint-enable max-len */ - -var ATTRIBUTE_REGEX = /^((?:s(?:uppressContentEditableWarn|croll|pac)|(?:shape|image|text)Render|(?:letter|word)Spac|vHang|hang)ing|(?:on(?:AnimationIteration|C(?:o(?:mposition(?:Update|Start|End)|ntextMenu|py)|anPlayThrough|anPlay|hange|lick|ut)|(?:(?:Duration|Volume|Rate)Chang|(?:MouseLea|(?:Touch|Mouse)Mo|DragLea)v|Paus)e|Loaded(?:Metad|D)ata|(?:Animation|Touch|Load|Drag)Start|(?:(?:T(?:ransition|ouch)|Animation)E|Suspe)nd|DoubleClick|(?:TouchCanc|Whe)el|(?:Mouse(?:Ent|Ov)e|Drag(?:Ent|Ov)e|Erro)r|TimeUpdate|(?:E(?:n(?:crypt|d)|mpti)|S(?:tall|eek))ed|MouseDown|P(?:rogress|laying)|(?:MouseOu|DragExi|S(?:elec|ubmi)|Rese|Inpu)t|KeyPress|DragEnd|Key(?:Down|Up)|(?:Wait|Seek)ing|(?:MouseU|Dro)p|Scroll|Paste|Focus|Abort|Drag|Play|Load|Blur)Captur|alignmentBaselin|(?:limitingConeAng|xlink(?:(?:Arcr|R)o|Tit)|s(?:urfaceSca|ty|ca)|unselectab|baseProfi|fontSty|(?:focus|dragg)ab|multip|profi|tit)l|d(?:ominantBaselin|efaultValu)|a(?:uto(?:Capitaliz|Revers|Sav)|dditiv)|(?:(?:formNoValid|xlinkActu|noValid|accumul|rot)a|autoComple|decelera)t|(?:(?:attribute|item)T|datat)yp|(?:attribute|glyph)Nam|playsInlin|(?:formE|e)ncTyp|(?:writing|input|edge)Mod|(?:xlinkTy|itemSco|keyTy|slo)p|(?:amplitu|mo)d|(?:xmlSpa|non)c|fillRul|(?:dateTi|na)m|r(?:esourc|ol)|xmlBas|wmod)e|(?:glyphOrientationHorizont|loc)al|(?:externalResourcesRequir|select|revers|mut)ed|c(?:o(?:lorInterpolationFilter|ntrol|ord)s|o(?:lor(?:Interpolation)?|ntent)|(?:ontentS(?:cript|tyle)Typ|o(?:ntentEditab|lorProfi)l|l(?:assNam|ipRul)|a(?:lcMod|ptur)|it)e|olorRendering|l(?:ipPathUnits|assID)|o(?:ntextMenu|ls)|h(?:eckedLink|a(?:llenge|rSet)|ildren|ecked)|ell(?:Spac|Padd)ing|(?:rossOrigi|olSpa)n|apHeight|lip(?:Path)?|ursor|[xy])|glyphOrientationVertical|d(?:angerouslySetInnerHTML|efaultChecked|ownload|isabled|isplay|[xy])|(?:s(?:trikethroughThickn|eaml)es|(?:und|ov)erlineThicknes|r(?:equiredExtension|adiu)|(?:requiredFeatur|tableValu|stitchTil|numOctav|filterR)e|key(?:(?:Splin|Tim)e|Param)|autoFocu|header|bia)s|(?:(?:st(?:rikethroughPosi|dDevia)|(?:und|ov)erlinePosi|(?:textDecor|elev)a|orienta)tio|(?:strokeLinejo|orig)i|formActio|zoomAndPa|onFocusI|directio|(?:vers|act)io|rowSpa|begi|ico)n|o(?:n(?:AnimationIteration|C(?:o(?:mposition(?:Update|Start|End)|ntextMenu|py)|anPlayThrough|anPlay|hange|lick|ut)|(?:(?:Duration|Volume|Rate)Chang|(?:MouseLea|(?:Touch|Mouse)Mo|DragLea)v|Paus)e|Loaded(?:Metad|D)ata|(?:Animation|Touch|Load|Drag)Start|(?:(?:T(?:ransition|ouch)|Animation)E|Suspe)nd|DoubleClick|(?:TouchCanc|Whe)el|(?:Mouse(?:Ent|Ov)e|Drag(?:Ent|Ov)e|Erro)r|TimeUpdate|(?:E(?:n(?:crypt|d)|mpti)|S(?:tall|eek))ed|MouseDown|P(?:rogress|laying)|(?:MouseOu|DragExi|S(?:elec|ubmi)|Rese|Inpu)t|KeyPress|DragEnd|Key(?:Down|Up)|(?:Wait|Seek)ing|(?:MouseU|Dro)p|Scroll|Paste|Focus|Abort|Drag|Play|Load|Blur)|rient)|p(?:reserveA(?:spectRatio|lpha)|ointsAt[X-Z]|anose1)|(?:patternContent|ma(?:sk(?:Content)?|rker)|primitive|gradient|pattern|filter)Units|(?:gradientT|patternT|t)ransform|(?:(?:allowTranspar|baseFrequ)enc|re(?:ferrerPolic|adOnl)|(?:(?:st(?:roke|op)O|floodO|fillO|o)pac|integr|secur)it|visibilit|fontFamil|accessKe|propert|summar)y|(?:strokeMiterlimi|(?:specularConsta|repeatCou|fontVaria)n|(?:(?:specularE|e)xpon|renderingInt|asc)en|d(?:iffuseConsta|esce)n|(?:fontSizeAdju|lengthAdju|manife)s|baselineShif|vectorEffec|(?:(?:mar(?:ker|gin)|x)H|accentH|fontW)eigh|a(?:utoCorrec|bou)|markerStar|onFocusOu|in(?:tercep|lis)|restar|forma|heigh|lis)t|(?:(?:st(?:rokeDasho|artO)|o)ffs|acceptChars|formTarg|viewTarg|srcS)et|(?:(?:enableBackgrou|markerE)n|s(?:p(?:readMetho|ee)|ee)|formMetho|m(?:arkerMi|etho)|preloa|kin)d|k(?:ernel(?:UnitLength|Matrix)|[1-4])|(?:[xy]ChannelSelect|lightingCol|textAnch|floodCol|stopCol|operat|htmlF)or|(?:allowFullScre|hidd)en|strokeDasharray|systemLanguage|(?:strokeLineca|itemPro|useMa|wra|loo)p|v(?:Mathematical|ert(?:Origin[XY]|AdvY)|alues|ocab)|(?:pointerEve|keyPoi)nts|unicodeRange|(?:(?:allowReord|placehold|frameBord|paintOrd|post|ord)e|repeatDu|d(?:efe|u))r|mathematical|(?:vI|i)deographic|h(?:oriz(?:Origin|Adv)X|ttpEquiv)|u(?:nicodeBidi|[12])|(?:fontStretc|hig)h|(?:(?:mar(?:ker|gin)W|strokeW)id|azimu)th|vAlphabetic|mediaGroup|spellCheck|(?:unitsPerE|optimu|fro)m|r(?:adioGroup|e(?:sults|f[XY]|l)|ows|[xy])|(?:xmlnsXl|valueL)ink|a(?:rabicForm|l(?:phabetic|t)|sync)|pathLength|(?:text|m(?:in|ax))Length|innerHTML|xlinkShow|(?:xlinkHr|glyphR)ef|r(?:e(?:quired|sult|f))?|o(?:verflow|pen)|(?:tabInde|(?:sand|b)bo|viewBo)x|(?:(?:href|xml|src)La|kerni)ng|f(?:o(?:ntSize|rm)|il(?:ter|l))|autoPlay|unicode|p(?:attern|oints)|t(?:arget[XY]|o)|i(?:temRef|n2|s)|divisor|d(?:efault|ata|ir)?|srcDoc|s(?:coped|te(?:m[hv]|p)|pan)|(?:width|size)s|(?:stri|la)ng|prefix|itemID|s(?:t(?:roke|art)|hape|cope|rc)|a(?:ccept|s)|t(?:arget|ype)|typeof|width|value|x(?:mlns)?|label|m(?:edia|a(?:sk|x)|in)|size|href|k(?:ey)?|end|low|x[12]|i[dn]|y[12]|g[12]|by|f[xy]|[yz])$/; - -/* From DOMProperty */ -var ATTRIBUTE_NAME_START_CHAR = ':A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD'; -var ATTRIBUTE_NAME_CHAR = ATTRIBUTE_NAME_START_CHAR + '\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040'; -var isCustomAttribute = RegExp.prototype.test.bind(new RegExp('^(data|aria)-[' + ATTRIBUTE_NAME_CHAR + ']*$')); - -var validAttr = (function (name) { - return ATTRIBUTE_REGEX.test(name) || isCustomAttribute(name.toLowerCase()); -}); - -// - - -function isTag(target) /* : %checks */{ - return typeof target === 'string'; -} - -// - - -function isStyledComponent(target) /* : %checks */{ - return typeof target === 'function' && typeof target.styledComponentId === 'string'; -} - -// - -/* eslint-disable no-undef */ -function getComponentName(target) { - return target.displayName || target.name || 'Component'; -} - -// - - -var determineTheme = (function (props, fallbackTheme, defaultProps) { - // Props should take precedence over ThemeProvider, which should take precedence over - // defaultProps, but React automatically puts defaultProps on props. - - /* eslint-disable react/prop-types */ - var isDefaultTheme = defaultProps && props.theme === defaultProps.theme; - var theme = props.theme && !isDefaultTheme ? props.theme : fallbackTheme; - /* eslint-enable */ - - return theme; -}); - -// -var escapeRegex = /[[\].#*$><+~=|^:(),"'`-]+/g; -var dashesAtEnds = /(^-|-$)/g; - -/** - * TODO: Explore using CSS.escape when it becomes more available - * in evergreen browsers. - */ -function escape(str) { - return str - // Replace all possible CSS selectors - .replace(escapeRegex, '-') - - // Remove extraneous hyphens at the start and end - .replace(dashesAtEnds, ''); -} - -// -/** - * Creates a broadcast that can be listened to, i.e. simple event emitter - * - * @see https://github.com/ReactTraining/react-broadcast - */ - -var createBroadcast = function createBroadcast(initialState) { - var listeners = {}; - var id = 0; - var state = initialState; - - function publish(nextState) { - state = nextState; - - // eslint-disable-next-line guard-for-in, no-restricted-syntax - for (var key in listeners) { - var listener = listeners[key]; - if (listener === undefined) { - // eslint-disable-next-line no-continue - continue; - } - - listener(state); - } - } - - function subscribe(listener) { - var currentId = id; - listeners[currentId] = listener; - id += 1; - listener(state); - return currentId; - } - - function unsubscribe(unsubID) { - listeners[unsubID] = undefined; - } - - return { publish: publish, subscribe: subscribe, unsubscribe: unsubscribe }; -}; - -// -// Helper to call a given function, only once -var once = (function (cb) { - var called = false; - - return function () { - if (!called) { - called = true; - cb(); - } - }; -}); - -var _ThemeProvider$childC; -var _ThemeProvider$contex; - -// -/* globals React$Element */ -// NOTE: DO NOT CHANGE, changing this is a semver major change! -var CHANNEL = '__styled-components__'; -var CHANNEL_NEXT = CHANNEL + 'next__'; - -var CONTEXT_CHANNEL_SHAPE = __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.shape({ - getTheme: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.func, - subscribe: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.func, - unsubscribe: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.func -}); - -var warnChannelDeprecated = void 0; -if (process.env.NODE_ENV !== 'production') { - warnChannelDeprecated = once(function () { - // eslint-disable-next-line no-console - console.error('Warning: Usage of `context.' + CHANNEL + '` as a function is deprecated. It will be replaced with the object on `.context.' + CHANNEL_NEXT + '` in a future version.'); - }); -} - -var isFunction = function isFunction(test) { - return typeof test === 'function'; -}; - -/** - * Provide a theme to an entire react component tree via context and event listeners (have to do - * both context and event emitter as pure components block context updates) - */ - -var ThemeProvider = function (_Component) { - inherits(ThemeProvider, _Component); - - function ThemeProvider() { - classCallCheck(this, ThemeProvider); - - var _this = possibleConstructorReturn(this, _Component.call(this)); - - _this.unsubscribeToOuterId = -1; - - _this.getTheme = _this.getTheme.bind(_this); - return _this; - } - - ThemeProvider.prototype.componentWillMount = function componentWillMount() { - var _this2 = this; - - // If there is a ThemeProvider wrapper anywhere around this theme provider, merge this theme - // with the outer theme - var outerContext = this.context[CHANNEL_NEXT]; - if (outerContext !== undefined) { - this.unsubscribeToOuterId = outerContext.subscribe(function (theme) { - _this2.outerTheme = theme; - }); - } - this.broadcast = createBroadcast(this.getTheme()); - }; - - ThemeProvider.prototype.getChildContext = function getChildContext() { - var _this3 = this, - _babelHelpers$extends; - - return _extends({}, this.context, (_babelHelpers$extends = {}, _babelHelpers$extends[CHANNEL_NEXT] = { - getTheme: this.getTheme, - subscribe: this.broadcast.subscribe, - unsubscribe: this.broadcast.unsubscribe - }, _babelHelpers$extends[CHANNEL] = function (subscriber) { - if (process.env.NODE_ENV !== 'production') { - warnChannelDeprecated(); - } - - // Patch the old `subscribe` provide via `CHANNEL` for older clients. - var unsubscribeId = _this3.broadcast.subscribe(subscriber); - return function () { - return _this3.broadcast.unsubscribe(unsubscribeId); - }; - }, _babelHelpers$extends)); - }; - - ThemeProvider.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) { - if (this.props.theme !== nextProps.theme) { - this.broadcast.publish(this.getTheme(nextProps.theme)); - } - }; - - ThemeProvider.prototype.componentWillUnmount = function componentWillUnmount() { - if (this.unsubscribeToOuterId !== -1) { - this.context[CHANNEL_NEXT].unsubscribe(this.unsubscribeToOuterId); - } - }; - - // Get the theme from the props, supporting both (outerTheme) => {} as well as object notation - - - ThemeProvider.prototype.getTheme = function getTheme(passedTheme) { - var theme = passedTheme || this.props.theme; - if (isFunction(theme)) { - var mergedTheme = theme(this.outerTheme); - if (process.env.NODE_ENV !== 'production' && !__WEBPACK_IMPORTED_MODULE_0_is_plain_object___default()(mergedTheme)) { - throw new Error('[ThemeProvider] Please return an object from your theme function, i.e. theme={() => ({})}!'); - } - return mergedTheme; - } - if (!__WEBPACK_IMPORTED_MODULE_0_is_plain_object___default()(theme)) { - throw new Error('[ThemeProvider] Please make your theme prop a plain object'); - } - return _extends({}, this.outerTheme, theme); - }; - - ThemeProvider.prototype.render = function render() { - if (!this.props.children) { - return null; - } - return __WEBPACK_IMPORTED_MODULE_2_react___default.a.Children.only(this.props.children); - }; - - return ThemeProvider; -}(__WEBPACK_IMPORTED_MODULE_2_react__["Component"]); - -ThemeProvider.childContextTypes = (_ThemeProvider$childC = {}, _ThemeProvider$childC[CHANNEL] = __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.func, _ThemeProvider$childC[CHANNEL_NEXT] = CONTEXT_CHANNEL_SHAPE, _ThemeProvider$childC); -ThemeProvider.contextTypes = (_ThemeProvider$contex = {}, _ThemeProvider$contex[CHANNEL_NEXT] = CONTEXT_CHANNEL_SHAPE, _ThemeProvider$contex); - -// - -// HACK for generating all static styles without needing to allocate -// an empty execution context every single time... -var STATIC_EXECUTION_CONTEXT = {}; - -var _StyledComponent = (function (ComponentStyle, constructWithOptions) { - /* We depend on components having unique IDs */ - var identifiers = {}; - var generateId = function generateId(_displayName, parentComponentId) { - var displayName = typeof _displayName !== 'string' ? 'sc' : escape(_displayName); - - var nr = (identifiers[displayName] || 0) + 1; - identifiers[displayName] = nr; - - var hash = ComponentStyle.generateName(displayName + nr); - var componentId = displayName + '-' + hash; - return parentComponentId !== undefined ? parentComponentId + '-' + componentId : componentId; - }; - - var BaseStyledComponent = function (_Component) { - inherits(BaseStyledComponent, _Component); - - function BaseStyledComponent() { - var _temp, _this, _ret; - - classCallCheck(this, BaseStyledComponent); - - for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { - args[_key] = arguments[_key]; - } - - return _ret = (_temp = (_this = possibleConstructorReturn(this, _Component.call.apply(_Component, [this].concat(args))), _this), _this.attrs = {}, _this.state = { - theme: null, - generatedClassName: '' - }, _this.unsubscribeId = -1, _temp), possibleConstructorReturn(_this, _ret); - } - - BaseStyledComponent.prototype.unsubscribeFromContext = function unsubscribeFromContext() { - if (this.unsubscribeId !== -1) { - this.context[CHANNEL_NEXT].unsubscribe(this.unsubscribeId); - } - }; - - BaseStyledComponent.prototype.buildExecutionContext = function buildExecutionContext(theme, props) { - var attrs = this.constructor.attrs; - - var context = _extends({}, props, { theme: theme }); - if (attrs === undefined) { - return context; - } - - this.attrs = Object.keys(attrs).reduce(function (acc, key) { - var attr = attrs[key]; - // eslint-disable-next-line no-param-reassign - acc[key] = typeof attr === 'function' ? attr(context) : attr; - return acc; - }, {}); - - return _extends({}, context, this.attrs); - }; - - BaseStyledComponent.prototype.generateAndInjectStyles = function generateAndInjectStyles(theme, props) { - var _constructor = this.constructor, - attrs = _constructor.attrs, - componentStyle = _constructor.componentStyle, - warnTooManyClasses = _constructor.warnTooManyClasses; - - var styleSheet = this.context[CONTEXT_KEY] || StyleSheet.instance; - - // staticaly styled-components don't need to build an execution context object, - // and shouldn't be increasing the number of class names - if (componentStyle.isStatic && attrs === undefined) { - return componentStyle.generateAndInjectStyles(STATIC_EXECUTION_CONTEXT, styleSheet); - } else { - var executionContext = this.buildExecutionContext(theme, props); - var className = componentStyle.generateAndInjectStyles(executionContext, styleSheet); - - if (process.env.NODE_ENV !== 'production' && warnTooManyClasses !== undefined) { - warnTooManyClasses(className); - } - - return className; - } - }; - - BaseStyledComponent.prototype.componentWillMount = function componentWillMount() { - var _this2 = this; - - var componentStyle = this.constructor.componentStyle; - - var styledContext = this.context[CHANNEL_NEXT]; - - // If this is a staticaly-styled component, we don't need to the theme - // to generate or build styles. - if (componentStyle.isStatic) { - var generatedClassName = this.generateAndInjectStyles(STATIC_EXECUTION_CONTEXT, this.props); - this.setState({ generatedClassName: generatedClassName }); - // If there is a theme in the context, subscribe to the event emitter. This - // is necessary due to pure components blocking context updates, this circumvents - // that by updating when an event is emitted - } else if (styledContext !== undefined) { - var subscribe = styledContext.subscribe; - - this.unsubscribeId = subscribe(function (nextTheme) { - // This will be called once immediately - var theme = determineTheme(_this2.props, nextTheme, _this2.constructor.defaultProps); - var generatedClassName = _this2.generateAndInjectStyles(theme, _this2.props); - - _this2.setState({ theme: theme, generatedClassName: generatedClassName }); - }); - } else { - // eslint-disable-next-line react/prop-types - var theme = this.props.theme || {}; - var _generatedClassName = this.generateAndInjectStyles(theme, this.props); - this.setState({ theme: theme, generatedClassName: _generatedClassName }); - } - }; - - BaseStyledComponent.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) { - var _this3 = this; - - // If this is a staticaly-styled component, we don't need to listen to - // props changes to update styles - var componentStyle = this.constructor.componentStyle; - - if (componentStyle.isStatic) { - return; - } - - this.setState(function (oldState) { - var theme = determineTheme(nextProps, oldState.theme, _this3.constructor.defaultProps); - var generatedClassName = _this3.generateAndInjectStyles(theme, nextProps); - - return { theme: theme, generatedClassName: generatedClassName }; - }); - }; - - BaseStyledComponent.prototype.componentWillUnmount = function componentWillUnmount() { - this.unsubscribeFromContext(); - }; - - BaseStyledComponent.prototype.render = function render() { - var _this4 = this; - - // eslint-disable-next-line react/prop-types - var innerRef = this.props.innerRef; - var generatedClassName = this.state.generatedClassName; - var _constructor2 = this.constructor, - styledComponentId = _constructor2.styledComponentId, - target = _constructor2.target; - - - var isTargetTag = isTag(target); - - var className = [ - // eslint-disable-next-line react/prop-types - this.props.className, styledComponentId, this.attrs.className, generatedClassName].filter(Boolean).join(' '); - - var baseProps = _extends({}, this.attrs, { - className: className - }); - - if (isStyledComponent(target)) { - baseProps.innerRef = innerRef; - } else { - baseProps.ref = innerRef; - } - - var propsForElement = Object.keys(this.props).reduce(function (acc, propName) { - // Don't pass through non HTML tags through to HTML elements - // always omit innerRef - if (propName !== 'innerRef' && propName !== 'className' && (!isTargetTag || validAttr(propName))) { - // eslint-disable-next-line no-param-reassign - acc[propName] = _this4.props[propName]; - } - - return acc; - }, baseProps); - - return Object(__WEBPACK_IMPORTED_MODULE_2_react__["createElement"])(target, propsForElement); - }; - - return BaseStyledComponent; - }(__WEBPACK_IMPORTED_MODULE_2_react__["Component"]); - - var createStyledComponent = function createStyledComponent(target, options, rules) { - var _StyledComponent$cont; - - var _options$displayName = options.displayName, - displayName = _options$displayName === undefined ? isTag(target) ? 'styled.' + target : 'Styled(' + getComponentName(target) + ')' : _options$displayName, - _options$componentId = options.componentId, - componentId = _options$componentId === undefined ? generateId(options.displayName, options.parentComponentId) : _options$componentId, - _options$ParentCompon = options.ParentComponent, - ParentComponent = _options$ParentCompon === undefined ? BaseStyledComponent : _options$ParentCompon, - extendingRules = options.rules, - attrs = options.attrs; - - - var styledComponentId = options.displayName && options.componentId ? escape(options.displayName) + '-' + options.componentId : componentId; - - var componentStyle = new ComponentStyle(extendingRules === undefined ? rules : extendingRules.concat(rules), attrs, styledComponentId); - - var StyledComponent = function (_ParentComponent) { - inherits(StyledComponent, _ParentComponent); - - function StyledComponent() { - classCallCheck(this, StyledComponent); - return possibleConstructorReturn(this, _ParentComponent.apply(this, arguments)); - } - - StyledComponent.withComponent = function withComponent(tag) { - var previousComponentId = options.componentId, - optionsToCopy = objectWithoutProperties(options, ['componentId']); - - - var newComponentId = previousComponentId && previousComponentId + '-' + (isTag(tag) ? tag : escape(getComponentName(tag))); - - var newOptions = _extends({}, optionsToCopy, { - componentId: newComponentId, - ParentComponent: StyledComponent - }); - - return createStyledComponent(tag, newOptions, rules); - }; - - createClass(StyledComponent, null, [{ - key: 'extend', - get: function get$$1() { - var rulesFromOptions = options.rules, - parentComponentId = options.componentId, - optionsToCopy = objectWithoutProperties(options, ['rules', 'componentId']); - - - var newRules = rulesFromOptions === undefined ? rules : rulesFromOptions.concat(rules); - - var newOptions = _extends({}, optionsToCopy, { - rules: newRules, - parentComponentId: parentComponentId, - ParentComponent: StyledComponent - }); - - return constructWithOptions(createStyledComponent, target, newOptions); - } - }]); - return StyledComponent; - }(ParentComponent); - - StyledComponent.contextTypes = (_StyledComponent$cont = {}, _StyledComponent$cont[CHANNEL] = __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.func, _StyledComponent$cont[CHANNEL_NEXT] = CONTEXT_CHANNEL_SHAPE, _StyledComponent$cont[CONTEXT_KEY] = __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.instanceOf(StyleSheet), __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.instanceOf(ServerStyleSheet)]), _StyledComponent$cont); - StyledComponent.displayName = displayName; - StyledComponent.styledComponentId = styledComponentId; - StyledComponent.attrs = attrs; - StyledComponent.componentStyle = componentStyle; - StyledComponent.target = target; - - - if (process.env.NODE_ENV !== 'production') { - StyledComponent.warnTooManyClasses = createWarnTooManyClasses(displayName); - } - - return StyledComponent; - }; - - return createStyledComponent; -}); - -// murmurhash2 via https://gist.github.com/raycmorgan/588423 - -function doHash(str, seed) { - var m = 0x5bd1e995; - var r = 24; - var h = seed ^ str.length; - var length = str.length; - var currentIndex = 0; - - while (length >= 4) { - var k = UInt32(str, currentIndex); - - k = Umul32(k, m); - k ^= k >>> r; - k = Umul32(k, m); - - h = Umul32(h, m); - h ^= k; - - currentIndex += 4; - length -= 4; - } - - switch (length) { - case 3: - h ^= UInt16(str, currentIndex); - h ^= str.charCodeAt(currentIndex + 2) << 16; - h = Umul32(h, m); - break; - - case 2: - h ^= UInt16(str, currentIndex); - h = Umul32(h, m); - break; - - case 1: - h ^= str.charCodeAt(currentIndex); - h = Umul32(h, m); - break; - } - - h ^= h >>> 13; - h = Umul32(h, m); - h ^= h >>> 15; - - return h >>> 0; -} - -function UInt32(str, pos) { - return str.charCodeAt(pos++) + (str.charCodeAt(pos++) << 8) + (str.charCodeAt(pos++) << 16) + (str.charCodeAt(pos) << 24); -} - -function UInt16(str, pos) { - return str.charCodeAt(pos++) + (str.charCodeAt(pos++) << 8); -} - -function Umul32(n, m) { - n = n | 0; - m = m | 0; - var nlo = n & 0xffff; - var nhi = n >>> 16; - var res = nlo * m + ((nhi * m & 0xffff) << 16) | 0; - return res; -} - -// -var isStaticRules = function isStaticRules(rules, attrs) { - for (var i = 0; i < rules.length; i += 1) { - var rule = rules[i]; - - // recursive case - if (Array.isArray(rule) && !isStaticRules(rule)) { - return false; - } else if (typeof rule === 'function' && !isStyledComponent(rule)) { - // functions are allowed to be static if they're just being - // used to get the classname of a nested styled copmonent - return false; - } - } - - if (attrs !== undefined) { - // eslint-disable-next-line guard-for-in, no-restricted-syntax - for (var key in attrs) { - var value = attrs[key]; - if (typeof value === 'function') { - return false; - } - } - } - - return true; -}; - -var isHRMEnabled = typeof module !== 'undefined' && module.hot && process.env.NODE_ENV !== 'production'; - -/* - ComponentStyle is all the CSS-specific stuff, not - the React-specific stuff. - */ -var _ComponentStyle = (function (nameGenerator, flatten, stringifyRules) { - var ComponentStyle = function () { - function ComponentStyle(rules, attrs, componentId) { - classCallCheck(this, ComponentStyle); - - this.rules = rules; - this.isStatic = !isHRMEnabled && isStaticRules(rules, attrs); - this.componentId = componentId; - if (!StyleSheet.instance.hasInjectedComponent(this.componentId)) { - var placeholder = process.env.NODE_ENV !== 'production' ? '.' + componentId + ' {}' : ''; - StyleSheet.instance.deferredInject(componentId, true, placeholder); - } - } - - /* - * Flattens a rule set into valid CSS - * Hashes it, wraps the whole chunk in a .hash1234 {} - * Returns the hash to be injected on render() - * */ - - - ComponentStyle.prototype.generateAndInjectStyles = function generateAndInjectStyles(executionContext, styleSheet) { - var isStatic = this.isStatic, - lastClassName = this.lastClassName; - - if (isStatic && lastClassName !== undefined) { - return lastClassName; - } - - var flatCSS = flatten(this.rules, executionContext); - var hash = doHash(this.componentId + flatCSS.join('')); - - var existingName = styleSheet.getName(hash); - if (existingName !== undefined) { - if (styleSheet.stylesCacheable) { - this.lastClassName = existingName; - } - return existingName; - } - - var name = nameGenerator(hash); - if (styleSheet.stylesCacheable) { - this.lastClassName = existingName; - } - if (styleSheet.alreadyInjected(hash, name)) { - return name; - } - - var css = '\n' + stringifyRules(flatCSS, '.' + name); - // NOTE: this can only be set when we inject the class-name. - // For some reason, presumably due to how css is stringifyRules behaves in - // differently between client and server, styles break. - styleSheet.inject(this.componentId, true, css, hash, name); - return name; - }; - - ComponentStyle.generateName = function generateName(str) { - return nameGenerator(doHash(str)); - }; - - return ComponentStyle; - }(); - - return ComponentStyle; -}); - -// -// Thanks to ReactDOMFactories for this handy list! - -var domElements = ['a', 'abbr', 'address', 'area', 'article', 'aside', 'audio', 'b', 'base', 'bdi', 'bdo', 'big', 'blockquote', 'body', 'br', 'button', 'canvas', 'caption', 'cite', 'code', 'col', 'colgroup', 'data', 'datalist', 'dd', 'del', 'details', 'dfn', 'dialog', 'div', 'dl', 'dt', 'em', 'embed', 'fieldset', 'figcaption', 'figure', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'i', 'iframe', 'img', 'input', 'ins', 'kbd', 'keygen', 'label', 'legend', 'li', 'link', 'main', 'map', 'mark', 'marquee', 'menu', 'menuitem', 'meta', 'meter', 'nav', 'noscript', 'object', 'ol', 'optgroup', 'option', 'output', 'p', 'param', 'picture', 'pre', 'progress', 'q', 'rp', 'rt', 'ruby', 's', 'samp', 'script', 'section', 'select', 'small', 'source', 'span', 'strong', 'style', 'sub', 'summary', 'sup', 'table', 'tbody', 'td', 'textarea', 'tfoot', 'th', 'thead', 'time', 'title', 'tr', 'track', 'u', 'ul', 'var', 'video', 'wbr', - -// SVG -'circle', 'clipPath', 'defs', 'ellipse', 'g', 'image', 'line', 'linearGradient', 'mask', 'path', 'pattern', 'polygon', 'polyline', 'radialGradient', 'rect', 'stop', 'svg', 'text', 'tspan']; - -// - -var _styled = (function (styledComponent, constructWithOptions) { - var styled = function styled(tag) { - return constructWithOptions(styledComponent, tag); - }; - - // Shorthands for all valid HTML Elements - domElements.forEach(function (domElement) { - styled[domElement] = styled(domElement); - }); - - return styled; -}); - -// -var replaceWhitespace = function replaceWhitespace(str) { - return str.replace(/\s|\\n/g, ''); -}; - -var _keyframes = (function (nameGenerator, stringifyRules, css) { - return function (strings) { - for (var _len = arguments.length, interpolations = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { - interpolations[_key - 1] = arguments[_key]; - } - - var rules = css.apply(undefined, [strings].concat(interpolations)); - var hash = doHash(replaceWhitespace(JSON.stringify(rules))); - - var existingName = StyleSheet.instance.getName(hash); - if (existingName) return existingName; - - var name = nameGenerator(hash); - if (StyleSheet.instance.alreadyInjected(hash, name)) return name; - - var generatedCSS = stringifyRules(rules, name, '@keyframes'); - StyleSheet.instance.inject('sc-keyframes-' + name, true, generatedCSS, hash, name); - return name; - }; -}); - -// -var _injectGlobal = (function (stringifyRules, css) { - var injectGlobal = function injectGlobal(strings) { - for (var _len = arguments.length, interpolations = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { - interpolations[_key - 1] = arguments[_key]; - } - - var rules = css.apply(undefined, [strings].concat(interpolations)); - var hash = doHash(JSON.stringify(rules)); - - var componentId = 'sc-global-' + hash; - if (StyleSheet.instance.hasInjectedComponent(componentId)) return; - - StyleSheet.instance.inject(componentId, false, stringifyRules(rules)); - }; - - return injectGlobal; -}); - -// - - -var _constructWithOptions = (function (css) { - var constructWithOptions = function constructWithOptions(componentConstructor, tag) { - var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; - - if (process.env.NODE_ENV !== 'production' && typeof tag !== 'string' && typeof tag !== 'function') { - // $FlowInvalidInputTest - throw new Error('Cannot create styled-component for component: ' + tag); - } - - /* This is callable directly as a template function */ - var templateFunction = function templateFunction(strings) { - for (var _len = arguments.length, interpolations = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { - interpolations[_key - 1] = arguments[_key]; - } - - return componentConstructor(tag, options, css.apply(undefined, [strings].concat(interpolations))); - }; - - /* If config methods are called, wrap up a new template function and merge options */ - templateFunction.withConfig = function (config) { - return constructWithOptions(componentConstructor, tag, _extends({}, options, config)); - }; - templateFunction.attrs = function (attrs) { - return constructWithOptions(componentConstructor, tag, _extends({}, options, { - attrs: _extends({}, options.attrs || {}, attrs) - })); - }; - - return templateFunction; - }; - - return constructWithOptions; -}); - -// -/* globals ReactClass */ - -var wrapWithTheme = function wrapWithTheme(Component$$1) { - var _WithTheme$contextTyp; - - var componentName = Component$$1.displayName || Component$$1.name || 'Component'; - - var shouldSetInnerRef = isStyledComponent(Component$$1) || - // NOTE: We can't pass a ref to a stateless functional component - typeof Component$$1 === 'function' && !(Component$$1.prototype && 'isReactComponent' in Component$$1.prototype); - - var WithTheme = function (_React$Component) { - inherits(WithTheme, _React$Component); - - function WithTheme() { - var _temp, _this, _ret; - - classCallCheck(this, WithTheme); - - for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { - args[_key] = arguments[_key]; - } - - return _ret = (_temp = (_this = possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.state = {}, _this.unsubscribeId = -1, _temp), possibleConstructorReturn(_this, _ret); - } - - // NOTE: This is so that isStyledComponent passes for the innerRef unwrapping - - - WithTheme.prototype.componentWillMount = function componentWillMount() { - var _this2 = this; - - var defaultProps = this.constructor.defaultProps; - - var styledContext = this.context[CHANNEL_NEXT]; - var themeProp = determineTheme(this.props, undefined, defaultProps); - if (styledContext === undefined && themeProp === undefined && process.env.NODE_ENV !== 'production') { - // eslint-disable-next-line no-console - console.warn('[withTheme] You are not using a ThemeProvider nor passing a theme prop or a theme in defaultProps'); - } else if (styledContext === undefined && themeProp !== undefined) { - this.setState({ theme: themeProp }); - } else { - var subscribe = styledContext.subscribe; - - this.unsubscribeId = subscribe(function (nextTheme) { - var theme = determineTheme(_this2.props, nextTheme, defaultProps); - _this2.setState({ theme: theme }); - }); - } - }; - - WithTheme.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) { - var defaultProps = this.constructor.defaultProps; - - this.setState(function (oldState) { - var theme = determineTheme(nextProps, oldState.theme, defaultProps); - - return { theme: theme }; - }); - }; - - WithTheme.prototype.componentWillUnmount = function componentWillUnmount() { - if (this.unsubscribeId !== -1) { - this.context[CHANNEL_NEXT].unsubscribe(this.unsubscribeId); - } - }; - - WithTheme.prototype.render = function render() { - // eslint-disable-next-line react/prop-types - var innerRef = this.props.innerRef; - var theme = this.state.theme; - - - return __WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement(Component$$1, _extends({ - theme: theme - }, this.props, { - innerRef: shouldSetInnerRef ? innerRef : undefined, - ref: shouldSetInnerRef ? undefined : innerRef - })); - }; - - return WithTheme; - }(__WEBPACK_IMPORTED_MODULE_2_react___default.a.Component); - - WithTheme.displayName = 'WithTheme(' + componentName + ')'; - WithTheme.styledComponentId = 'withTheme'; - WithTheme.contextTypes = (_WithTheme$contextTyp = {}, _WithTheme$contextTyp[CHANNEL] = __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.func, _WithTheme$contextTyp[CHANNEL_NEXT] = CONTEXT_CHANNEL_SHAPE, _WithTheme$contextTyp); - - - return __WEBPACK_IMPORTED_MODULE_4_hoist_non_react_statics___default()(WithTheme, Component$$1); -}; - -// - -/* Import singletons */ -/* Import singleton constructors */ -/* Import components */ -/* Import Higher Order Components */ -/* Instantiate singletons */ -var ComponentStyle = _ComponentStyle(generateAlphabeticName, flatten, stringifyRules); -var constructWithOptions = _constructWithOptions(css); -var StyledComponent = _StyledComponent(ComponentStyle, constructWithOptions); - -/* Instantiate exported singletons */ -var keyframes = _keyframes(generateAlphabeticName, stringifyRules, css); -var injectGlobal = _injectGlobal(stringifyRules, css); -var styled = _styled(StyledComponent, constructWithOptions); - -/* harmony default export */ __webpack_exports__["default"] = (styled); - -/* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__("../node_modules/process/browser.js"), __webpack_require__("../node_modules/webpack/buildin/harmony-module.js")(module))) - -/***/ }), - -/***/ "../node_modules/stylis/stylis.js": -/***/ (function(module, exports, __webpack_require__) { - -/* - * __ ___ - * _____/ /___ __/ (_)____ - * / ___/ __/ / / / / / ___/ - * (__ ) /_/ /_/ / / (__ ) - * /____/\__/\__, /_/_/____/ - * /____/ - * - * light - weight css preprocessor @licence MIT - */ -(function (factory) {/* eslint-disable */ - true ? (module['exports'] = factory(null)) : - typeof define === 'function' && define['amd'] ? define(factory(null)) : - (window['stylis'] = factory(null)) -}(/** @param {*=} options */function factory (options) {/* eslint-disable */ - - 'use strict' - - /** - * Notes - * - * The [''] pattern is used to support closure compiler - * the jsdoc signatures are also used to the same effect - * - * ---- - * - * int + int + int === n4 [faster] - * - * vs - * - * int === n1 && int === n2 && int === n3 - * - * ---- - * - * switch (int) { case ints...} [faster] - * - * vs - * - * if (int == 1 && int === 2 ...) - * - * ---- - * - * The (first*n1 + second*n2 + third*n3) format used in the property parser - * is a simple way to hash the sequence of characters - * taking into account the index they occur in - * since any number of 3 character sequences could produce duplicates. - * - * On the other hand sequences that are directly tied to the index of the character - * resolve a far more accurate measure, it's also faster - * to evaluate one condition in a switch statement - * than three in an if statement regardless of the added math. - * - * This allows the vendor prefixer to be both small and fast. - */ - - var nullptn = /^\0+/g /* matches leading null characters */ - var formatptn = /[\0\r\f]/g /* matches new line, null and formfeed characters */ - var colonptn = /: */g /* splits animation rules */ - var cursorptn = /zoo|gra/ /* assert cursor varient */ - var transformptn = /([,: ])(transform)/g /* vendor prefix transform, older webkit */ - var animationptn = /,+\s*(?![^(]*[)])/g /* splits multiple shorthand notation animations */ - var propertiesptn = / +\s*(?![^(]*[)])/g /* animation properties */ - var elementptn = / *[\0] */g /* selector elements */ - var selectorptn = /,\r+?/g /* splits selectors */ - var andptn = /([\t\r\n ])*\f?&/g /* match & */ - var escapeptn = /:global\(((?:[^\(\)\[\]]*|\[.*\]|\([^\(\)]*\))*)\)/g /* matches :global(.*) */ - var invalidptn = /\W+/g /* removes invalid characters from keyframes */ - var keyframeptn = /@(k\w+)\s*(\S*)\s*/ /* matches @keyframes $1 */ - var plcholdrptn = /::(place)/g /* match ::placeholder varient */ - var readonlyptn = /:(read-only)/g /* match :read-only varient */ - var beforeptn = /\s+(?=[{\];=:>])/g /* matches \s before ] ; = : */ - var afterptn = /([[}=:>])\s+/g /* matches \s after characters [ } = : */ - var tailptn = /(\{[^{]+?);(?=\})/g /* matches tail semi-colons ;} */ - var whiteptn = /\s{2,}/g /* matches repeating whitespace */ - var pseudoptn = /([^\(])(:+) */g /* pseudo element */ - var writingptn = /[svh]\w+-[tblr]{2}/ /* match writing mode property values */ - var gradientptn = /([\w-]+t\()/g /* match *gradient property */ - var supportsptn = /\(\s*(.*)\s*\)/g /* match supports (groups) */ - var propertyptn = /([^]*?);/g /* match properties leading semicolon */ - var selfptn = /-self|flex-/g /* match flex- and -self in align-self: flex-*; */ - var pseudofmt = /[^]*?(:[rp][el]a[\w-]+)[^]*/ /* extrats :readonly or :placholder from selector */ - var trimptn = /[ \t]+$/ /* match tail whitspace */ - - /* vendors */ - var webkit = '-webkit-' - var moz = '-moz-' - var ms = '-ms-' - - /* character codes */ - var SEMICOLON = 59 /* ; */ - var CLOSEBRACES = 125 /* } */ - var OPENBRACES = 123 /* { */ - var OPENPARENTHESES = 40 /* ( */ - var CLOSEPARENTHESES = 41 /* ) */ - var OPENBRACKET = 91 /* [ */ - var CLOSEBRACKET = 93 /* ] */ - var NEWLINE = 10 /* \n */ - var CARRIAGE = 13 /* \r */ - var TAB = 9 /* \t */ - var AT = 64 /* @ */ - var SPACE = 32 /* */ - var AND = 38 /* & */ - var DASH = 45 /* - */ - var UNDERSCORE = 95 /* _ */ - var STAR = 42 /* * */ - var COMMA = 44 /* , */ - var COLON = 58 /* : */ - var SINGLEQUOTE = 39 /* ' */ - var DOUBLEQUOTE = 34 /* " */ - var FOWARDSLASH = 47 /* / */ - var GREATERTHAN = 62 /* > */ - var PLUS = 43 /* + */ - var TILDE = 126 /* ~ */ - var NULL = 0 /* \0 */ - var FORMFEED = 12 /* \f */ - var VERTICALTAB = 11 /* \v */ - - /* special identifiers */ - var KEYFRAME = 107 /* k */ - var MEDIA = 109 /* m */ - var SUPPORTS = 115 /* s */ - var PLACEHOLDER = 112 /* p */ - var READONLY = 111 /* o */ - var IMPORT = 169 /* i */ - var CHARSET = 163 /* c */ - var DOCUMENT = 100 /* d */ - var PAGE = 112 /* p */ - - var column = 1 /* current column */ - var line = 1 /* current line numebr */ - var pattern = 0 /* :pattern */ - - var cascade = 1 /* #id h1 h2 vs h1#id h2#id */ - var prefix = 1 /* vendor prefix */ - var escape = 1 /* escape :global() pattern */ - var compress = 0 /* compress output */ - var semicolon = 0 /* no/semicolon option */ - var preserve = 0 /* preserve empty selectors */ - - /* empty reference */ - var array = [] - - /* plugins */ - var plugins = [] - var plugged = 0 - var should = null - - /* plugin context */ - var POSTS = -2 - var PREPS = -1 - var UNKWN = 0 - var PROPS = 1 - var BLCKS = 2 - var ATRUL = 3 - - /* plugin newline context */ - var unkwn = 0 - - /* keyframe animation */ - var keyed = 1 - var key = '' - - /* selector namespace */ - var nscopealt = '' - var nscope = '' - - /** - * Compile - * - * @param {Array} parent - * @param {Array} current - * @param {string} body - * @param {number} id - * @param {number} depth - * @return {string} - */ - function compile (parent, current, body, id, depth) { - var bracket = 0 /* brackets [] */ - var comment = 0 /* comments /* // or /* */ - var parentheses = 0 /* functions () */ - var quote = 0 /* quotes '', "" */ - - var first = 0 /* first character code */ - var second = 0 /* second character code */ - var code = 0 /* current character code */ - var tail = 0 /* previous character code */ - var trail = 0 /* character before previous code */ - var peak = 0 /* previous non-whitespace code */ - - var counter = 0 /* count sequence termination */ - var context = 0 /* track current context */ - var atrule = 0 /* track @at-rule context */ - var pseudo = 0 /* track pseudo token index */ - var caret = 0 /* current character index */ - var format = 0 /* control character formating context */ - var insert = 0 /* auto semicolon insertion */ - var invert = 0 /* inverted selector pattern */ - var length = 0 /* generic length address */ - var eof = body.length /* end of file(length) */ - var eol = eof - 1 /* end of file(characters) */ - - var char = '' /* current character */ - var chars = '' /* current buffer of characters */ - var child = '' /* next buffer of characters */ - var out = '' /* compiled body */ - var children = '' /* compiled children */ - var flat = '' /* compiled leafs */ - var selector /* generic selector address */ - var result /* generic address */ - - // ...build body - while (caret < eof) { - code = body.charCodeAt(caret) - - // eof varient - if (caret === eol) { - // last character + noop context, add synthetic padding for noop context to terminate - if (comment + quote + parentheses + bracket !== 0) { - if (comment !== 0) { - code = comment === FOWARDSLASH ? NEWLINE : FOWARDSLASH - } - - quote = parentheses = bracket = 0 - eof++ - eol++ - } - } - - if (comment + quote + parentheses + bracket === 0) { - // eof varient - if (caret === eol) { - if (format > 0) { - chars = chars.replace(formatptn, '') - } - - if (chars.trim().length > 0) { - switch (code) { - case SPACE: - case TAB: - case SEMICOLON: - case CARRIAGE: - case NEWLINE: { - break - } - default: { - chars += body.charAt(caret) - } - } - - code = SEMICOLON - } - } - - // auto semicolon insertion - if (insert === 1) { - switch (code) { - // false flags - case OPENBRACES: - case CLOSEBRACES: - case SEMICOLON: - case DOUBLEQUOTE: - case SINGLEQUOTE: - case OPENPARENTHESES: - case CLOSEPARENTHESES: - case COMMA: { - insert = 0 - } - // ignore - case TAB: - case CARRIAGE: - case NEWLINE: - case SPACE: { - break - } - // valid - default: { - insert = 0 - length = caret - first = code - caret-- - code = SEMICOLON - - while (length < eof) { - switch (body.charCodeAt(++length)) { - case NEWLINE: - case CARRIAGE: - case SEMICOLON: { - caret++ - code = first - } - case COLON: - case OPENBRACES: { - length = eof - } - } - } - } - } - } - - // token varient - switch (code) { - case OPENBRACES: { - chars = chars.trim() - first = chars.charCodeAt(0) - counter = 1 - length = ++caret - - while (caret < eof) { - code = body.charCodeAt(caret) - - switch (code) { - case OPENBRACES: { - counter++ - break - } - case CLOSEBRACES: { - counter-- - break - } - } - - if (counter === 0) { - break - } - - caret++ - } - - child = body.substring(length, caret) - - if (first === NULL) { - first = (chars = chars.replace(nullptn, '').trim()).charCodeAt(0) - } - - switch (first) { - // @at-rule - case AT: { - if (format > 0) { - chars = chars.replace(formatptn, '') - } - - second = chars.charCodeAt(1) - - switch (second) { - case DOCUMENT: - case MEDIA: - case SUPPORTS: - case DASH: { - selector = current - break - } - default: { - selector = array - } - } - - child = compile(current, selector, child, second, depth+1) - length = child.length - - // preserve empty @at-rule - if (preserve > 0 && length === 0) { - length = chars.length - } - - // execute plugins, @at-rule context - if (plugged > 0) { - selector = select(array, chars, invert) - result = proxy(ATRUL, child, selector, current, line, column, length, second, depth) - chars = selector.join('') - - if (result !== void 0) { - if ((length = (child = result.trim()).length) === 0) { - second = 0 - child = '' - } - } - } - - if (length > 0) { - switch (second) { - case SUPPORTS: { - chars = chars.replace(supportsptn, supports) - } - case DOCUMENT: - case MEDIA: - case DASH: { - child = chars + '{' + child + '}' - break - } - case KEYFRAME: { - chars = chars.replace(keyframeptn, '$1 $2' + (keyed > 0 ? key : '')) - child = chars + '{' + child + '}' - - if (prefix === 1 || (prefix === 2 && vendor('@'+child, 3))) { - child = '@' + webkit + child + '@' + child - } else { - child = '@' + child - } - break - } - default: { - child = chars + child - - if (id === PAGE) { - child = (out += child, '') - } - } - } - } else { - child = '' - } - - break - } - // selector - default: { - child = compile(current, select(current, chars, invert), child, id, depth+1) - } - } - - children += child - - // reset - context = 0 - insert = 0 - pseudo = 0 - format = 0 - invert = 0 - atrule = 0 - chars = '' - child = '' - code = body.charCodeAt(++caret) - break - } - case CLOSEBRACES: - case SEMICOLON: { - chars = (format > 0 ? chars.replace(formatptn, '') : chars).trim() - - if ((length = chars.length) > 1) { - // monkey-patch missing colon - if (pseudo === 0) { - first = chars.charCodeAt(0) - - // first character is a letter or dash, buffer has a space character - if ((first === DASH || first > 96 && first < 123)) { - length = (chars = chars.replace(' ', ':')).length - } - } - - // execute plugins, property context - if (plugged > 0) { - if ((result = proxy(PROPS, chars, current, parent, line, column, out.length, id, depth)) !== void 0) { - if ((length = (chars = result.trim()).length) === 0) { - chars = '\0\0' - } - } - } - - first = chars.charCodeAt(0) - second = chars.charCodeAt(1) - - switch (first + second) { - case NULL: { - break - } - case IMPORT: - case CHARSET: { - flat += chars + body.charAt(caret) - break - } - default: { - if (chars.charCodeAt(length-1) === COLON) - break - - out += property(chars, first, second, chars.charCodeAt(2)) - } - } - } - - // reset - context = 0 - insert = 0 - pseudo = 0 - format = 0 - invert = 0 - chars = '' - code = body.charCodeAt(++caret) - break - } - } - } - - // parse characters - switch (code) { - case CARRIAGE: - case NEWLINE: { - // auto insert semicolon - if (comment + quote + parentheses + bracket + semicolon === 0) { - // valid non-whitespace characters that - // may precede a newline - switch (peak) { - case CLOSEPARENTHESES: - case SINGLEQUOTE: - case DOUBLEQUOTE: - case AT: - case TILDE: - case GREATERTHAN: - case STAR: - case PLUS: - case FOWARDSLASH: - case DASH: - case COLON: - case COMMA: - case SEMICOLON: - case OPENBRACES: - case CLOSEBRACES: { - break - } - default: { - // current buffer has a colon - if (pseudo > 0) { - insert = 1 - } - } - } - } - - // terminate line comment - if (comment === FOWARDSLASH) { - comment = 0 - } else if (cascade + context === 0) { - format = 1 - chars += '\0' - } - - // execute plugins, newline context - if (plugged * unkwn > 0) { - proxy(UNKWN, chars, current, parent, line, column, out.length, id, depth) - } - - // next line, reset column position - column = 1 - line++ - break - } - case SEMICOLON: - case CLOSEBRACES: { - if (comment + quote + parentheses + bracket === 0) { - column++ - break - } - } - default: { - // increment column position - column++ - - // current character - char = body.charAt(caret) - - // remove comments, escape functions, strings, attributes and prepare selectors - switch (code) { - case TAB: - case SPACE: { - if (quote + bracket + comment === 0) { - switch (tail) { - case COMMA: - case COLON: - case TAB: - case SPACE: { - char = '' - break - } - default: { - if (code !== SPACE) { - char = ' ' - } - } - } - } - break - } - // escape breaking control characters - case NULL: { - char = '\\0' - break - } - case FORMFEED: { - char = '\\f' - break - } - case VERTICALTAB: { - char = '\\v' - break - } - // & - case AND: { - // inverted selector pattern i.e html & - if (quote + comment + bracket === 0 && cascade > 0) { - invert = 1 - format = 1 - char = '\f' + char - } - break - } - // ::paceholder, l - // :read-ony, l - case 108: { - if (quote + comment + bracket + pattern === 0 && pseudo > 0) { - switch (caret - pseudo) { - // ::placeholder - case 2: { - if (tail === PLACEHOLDER && body.charCodeAt(caret-3) === COLON) { - pattern = tail - } - } - // :read-only - case 8: { - if (trail === READONLY) { - pattern = trail - } - } - } - } - break - } - // : - case COLON: { - if (quote + comment + bracket === 0) { - pseudo = caret - } - break - } - // selectors - case COMMA: { - if (comment + parentheses + quote + bracket === 0) { - format = 1 - char += '\r' - } - break - } - // quotes - case DOUBLEQUOTE: { - if (comment === 0) { - quote = quote === code ? 0 : (quote === 0 ? code : quote) - } - break - } - case SINGLEQUOTE: { - if (comment === 0) { - quote = quote === code ? 0 : (quote === 0 ? code : quote) - } - break - } - // attributes - case OPENBRACKET: { - if (quote + comment + parentheses === 0) { - bracket++ - } - break - } - case CLOSEBRACKET: { - if (quote + comment + parentheses === 0) { - bracket-- - } - break - } - // functions - case CLOSEPARENTHESES: { - if (quote + comment + bracket === 0) { - parentheses-- - } - break - } - case OPENPARENTHESES: { - if (quote + comment + bracket === 0) { - if (context === 0) { - switch (tail*2 + trail*3) { - // :matches - case 533: { - break - } - // :global, :not, :nth-child etc... - default: { - counter = 0 - context = 1 - } - } - } - - parentheses++ - } - break - } - case AT: { - if (comment + parentheses + quote + bracket + pseudo + atrule === 0) { - atrule = 1 - } - break - } - // block/line comments - case STAR: - case FOWARDSLASH: { - if (quote + bracket + parentheses > 0) { - break - } - - switch (comment) { - // initialize line/block comment context - case 0: { - switch (code*2 + body.charCodeAt(caret+1)*3) { - // // - case 235: { - comment = FOWARDSLASH - break - } - // /* - case 220: { - length = caret - comment = STAR - break - } - } - break - } - // end block comment context - case STAR: { - if (code === FOWARDSLASH && tail === STAR) { - // /* ... */, ! - if (body.charCodeAt(length+2) === 33) { - out += body.substring(length, caret+1) - } - char = '' - comment = 0 - } - } - } - } - } - - // ignore comment blocks - if (comment === 0) { - // aggressive isolation mode, divide each individual selector - // including selectors in :not function but excluding selectors in :global function - if (cascade + quote + bracket + atrule === 0 && id !== KEYFRAME && code !== SEMICOLON) { - switch (code) { - case COMMA: - case TILDE: - case GREATERTHAN: - case PLUS: - case CLOSEPARENTHESES: - case OPENPARENTHESES: { - if (context === 0) { - // outside of an isolated context i.e nth-child(<...>) - switch (tail) { - case TAB: - case SPACE: - case NEWLINE: - case CARRIAGE: { - char = char + '\0' - break - } - default: { - char = '\0' + char + (code === COMMA ? '' : '\0') - } - } - format = 1 - } else { - // within an isolated context, sleep untill it's terminated - switch (code) { - case OPENPARENTHESES: { - context = ++counter - break - } - case CLOSEPARENTHESES: { - if ((context = --counter) === 0) { - format = 1 - char += '\0' - } - break - } - } - } - break - } - case TAB: - case SPACE: { - switch (tail) { - case NULL: - case OPENBRACES: - case CLOSEBRACES: - case SEMICOLON: - case COMMA: - case FORMFEED: - case TAB: - case SPACE: - case NEWLINE: - case CARRIAGE: { - break - } - default: { - // ignore in isolated contexts - if (context === 0) { - format = 1 - char += '\0' - } - } - } - } - } - } - - // concat buffer of characters - chars += char - - // previous non-whitespace character code - if (code !== SPACE && code !== TAB) { - peak = code - } - } - } - } - - // tail character codes - trail = tail - tail = code - - // visit every character - caret++ - } - - length = out.length - - // preserve empty selector - if (preserve > 0) { - if (length === 0 && children.length === 0 && (current[0].length === 0) === false) { - if (id !== MEDIA || (current.length === 1 && (cascade > 0 ? nscopealt : nscope) === current[0])) { - length = current.join(',').length + 2 - } - } - } - - if (length > 0) { - // cascade isolation mode? - selector = cascade === 0 && id !== KEYFRAME ? isolate(current) : current - - // execute plugins, block context - if (plugged > 0) { - result = proxy(BLCKS, out, selector, parent, line, column, length, id, depth) - - if (result !== void 0 && (out = result).length === 0) { - return flat + out + children - } - } - - out = selector.join(',') + '{' + out + '}' - - if (prefix*pattern !== 0) { - if (prefix === 2 && !vendor(out, 2)) - pattern = 0 - - switch (pattern) { - // ::read-only - case READONLY: { - out = out.replace(readonlyptn, ':'+moz+'$1')+out - break - } - // ::placeholder - case PLACEHOLDER: { - out = ( - out.replace(plcholdrptn, '::' + webkit + 'input-$1') + - out.replace(plcholdrptn, '::' + moz + '$1') + - out.replace(plcholdrptn, ':' + ms + 'input-$1') + out - ) - break - } - } - - pattern = 0 - } - } - - return flat + out + children - } - - /** - * Select - * - * @param {Array} parent - * @param {string} current - * @param {number} invert - * @return {Array} - */ - function select (parent, current, invert) { - var selectors = current.trim().split(selectorptn) - var out = selectors - - var length = selectors.length - var l = parent.length - - switch (l) { - // 0-1 parent selectors - case 0: - case 1: { - for (var i = 0, selector = l === 0 ? '' : parent[0] + ' '; i < length; ++i) { - out[i] = scope(selector, out[i], invert, l).trim() - } - break - } - // >2 parent selectors, nested - default: { - for (var i = 0, j = 0, out = []; i < length; ++i) { - for (var k = 0; k < l; ++k) { - out[j++] = scope(parent[k] + ' ', selectors[i], invert, l).trim() - } - } - } - } - - return out - } - - /** - * Scope - * - * @param {string} parent - * @param {string} current - * @param {number} invert - * @param {number} level - * @return {string} - */ - function scope (parent, current, invert, level) { - var selector = current - var code = selector.charCodeAt(0) - - // trim leading whitespace - if (code < 33) { - code = (selector = selector.trim()).charCodeAt(0) - } - - switch (code) { - // & - case AND: { - switch (cascade + level) { - case 0: - case 1: { - if (parent.trim().length === 0) { - break - } - } - default: { - return selector.replace(andptn, '$1'+parent.trim()) - } - } - break - } - // : - case COLON: { - switch (selector.charCodeAt(1)) { - // g in :global - case 103: { - if (escape > 0 && cascade > 0) { - return selector.replace(escapeptn, '$1').replace(andptn, '$1'+nscope) - } - break - } - default: { - // :hover - return parent.trim() + selector - } - } - } - default: { - // html & - if (invert*cascade > 0 && selector.indexOf('\f') > 0) { - return selector.replace(andptn, (parent.charCodeAt(0) === COLON ? '' : '$1')+parent.trim()) - } - } - } - - return parent + selector - } - - /** - * Property - * - * @param {string} input - * @param {number} first - * @param {number} second - * @param {number} third - * @return {string} - */ - function property (input, first, second, third) { - var index = 0 - var out = input + ';' - var hash = (first*2) + (second*3) + (third*4) - var cache - - // animation: a, n, i characters - if (hash === 944) { - return animation(out) - } else if (prefix === 0 || (prefix === 2 && !vendor(out, 1))) { - return out - } - - // vendor prefix - switch (hash) { - // text-decoration/text-size-adjust: t, e, x - case 1015: { - // text-size-adjust, - - return out.charCodeAt(9) === DASH ? webkit + out + out : out - } - // filter/fill f, i, l - case 951: { - // filter, t - return out.charCodeAt(3) === 116 ? webkit + out + out : out - } - // color/column, c, o, l - case 963: { - // column, n - return out.charCodeAt(5) === 110 ? webkit + out + out : out - } - // box-decoration-break, b, o, x - case 1009: { - if (out.charCodeAt(4) !== 100) { - break - } - } - // mask, m, a, s - // clip-path, c, l, i - case 969: - case 942: { - return webkit + out + out - } - // appearance: a, p, p - case 978: { - return webkit + out + moz + out + out - } - // hyphens: h, y, p - // user-select: u, s, e - case 1019: - case 983: { - return webkit + out + moz + out + ms + out + out - } - // background/backface-visibility, b, a, c - case 883: { - // backface-visibility, - - return out.charCodeAt(8) === DASH ? webkit + out + out : out - } - // flex: f, l, e - case 932: { - if (out.charCodeAt(4) === DASH) { - switch (out.charCodeAt(5)) { - // flex-grow, g - case 103: { - return webkit + 'box-' + out.replace('-grow', '') + webkit + out + ms + out.replace('grow', 'positive') + out - } - // flex-shrink, s - case 115: { - return webkit + out + ms + out.replace('shrink', 'negative') + out - } - // flex-basis, b - case 98: { - return webkit + out + ms + out.replace('basis', 'preferred-size') + out - } - } - } - - return webkit + out + ms + out + out - } - // order: o, r, d - case 964: { - return webkit + out + ms + 'flex' + '-' + out + out - } - // justify-items/justify-content, j, u, s - case 1023: { - // justify-content, c - if (out.charCodeAt(8) !== 99) { - break - } - - cache = out.substring(out.indexOf(':', 15)).replace('flex-', '').replace('space-between', 'justify') - return webkit + 'box-pack' + cache + webkit + out + ms + 'flex-pack' + cache + out - } - // cursor, c, u, r - case 1005: { - return cursorptn.test(out) ? out.replace(colonptn, ':' + webkit) + out.replace(colonptn, ':' + moz) + out : out - } - // writing-mode, w, r, i - case 1000: { - cache = out.substring(13).trim() - index = cache.indexOf('-') + 1 - - switch (cache.charCodeAt(0)+cache.charCodeAt(index)) { - // vertical-lr - case 226: { - cache = out.replace(writingptn, 'tb') - break - } - // vertical-rl - case 232: { - cache = out.replace(writingptn, 'tb-rl') - break - } - // horizontal-tb - case 220: { - cache = out.replace(writingptn, 'lr') - break - } - default: { - return out - } - } - - return webkit + out + ms + cache + out - } - // position: sticky - case 1017: { - if (out.indexOf('sticky', 9) === -1) { - return out - } - } - // display(flex/inline-flex/inline-box): d, i, s - case 975: { - index = (out = input).length - 10 - cache = (out.charCodeAt(index) === 33 ? out.substring(0, index) : out).substring(input.indexOf(':', 7) + 1).trim() - - switch (hash = cache.charCodeAt(0) + (cache.charCodeAt(7)|0)) { - // inline- - case 203: { - // inline-box - if (cache.charCodeAt(8) < 111) { - break - } - } - // inline-box/sticky - case 115: { - out = out.replace(cache, webkit+cache)+';'+out - break - } - // inline-flex - // flex - case 207: - case 102: { - out = ( - out.replace(cache, webkit+(hash > 102 ? 'inline-' : '')+'box')+';'+ - out.replace(cache, webkit+cache)+';'+ - out.replace(cache, ms+cache+'box')+';'+ - out - ) - } - } - - return out + ';' - } - // align-items, align-center, align-self: a, l, i, - - case 938: { - if (out.charCodeAt(5) === DASH) { - switch (out.charCodeAt(6)) { - // align-items, i - case 105: { - cache = out.replace('-items', '') - return webkit + out + webkit + 'box-' + cache + ms + 'flex-' + cache + out - } - // align-self, s - case 115: { - return webkit + out + ms + 'flex-item-' + out.replace(selfptn, '') + out - } - // align-content - default: { - return webkit + out + ms + 'flex-line-pack' + out.replace('align-content', '') + out - } - } - } - break - } - // width: min-content / width: max-content - case 953: { - if ((index = out.indexOf('-content', 9)) > 0) { - // width: min-content / width: max-content - if (out.charCodeAt(index - 3) === 109 && out.charCodeAt(index - 4) !== 45) { - cache = out.substring(index - 3) - return 'width:' + webkit + cache + 'width:' + moz + cache + 'width:' + cache - } - } - break - } - // transform, transition: t, r, a - case 962: { - out = webkit + out + (out.charCodeAt(5) === 102 ? ms + out : '') + out - - // transitions - if (second + third === 211 && out.charCodeAt(13) === 105 && out.indexOf('transform', 10) > 0) { - return out.substring(0, out.indexOf(';', 27) + 1).replace(transformptn, '$1' + webkit + '$2') + out - } - - break - } - } - - return out - } - - var i = 0 - - /** - * Vendor - * - * @param {string} content - * @param {number} context - * @return {boolean} - */ - function vendor (content, context) { - var index = content.indexOf(context === 1 ? ':' : '{') - var key = content.substring(0, context !== 3 ? index : 10) - var value = content.substring(index + 1, content.length - 1) - - return should(context !== 2 ? key : key.replace(pseudofmt, '$1'), value, context) - } - - /** - * Supports - * - * @param {string} match - * @param {string} group - * @return {string} - */ - function supports (match, group) { - var out = property(group, group.charCodeAt(0), group.charCodeAt(1), group.charCodeAt(2)) - - return out !== group+';' ? out.replace(propertyptn, ' or ($1)').substring(4) : '('+group+')' - } - - /** - * Animation - * - * @param {string} input - * @return {string} - */ - function animation (input) { - var length = input.length - var index = input.indexOf(':', 9) + 1 - var declare = input.substring(0, index).trim() - var out = input.substring(index, length-1).trim() - - switch (input.charCodeAt(9)*keyed) { - case 0: { - break - } - // animation-*, - - case DASH: { - // animation-name, n - if (input.charCodeAt(10) !== 110) { - break - } - } - // animation/animation-name - default: { - // split in case of multiple animations - var list = out.split((out = '', animationptn)) - - for (var i = 0, index = 0, length = list.length; i < length; index = 0, ++i) { - var value = list[i] - var items = value.split(propertiesptn) - - while (value = items[index]) { - var peak = value.charCodeAt(0) - - if (keyed === 1 && ( - // letters - (peak > AT && peak < 90) || (peak > 96 && peak < 123) || peak === UNDERSCORE || - // dash but not in sequence i.e -- - (peak === DASH && value.charCodeAt(1) !== DASH) - )) { - // not a number/function - switch (isNaN(parseFloat(value)) + (value.indexOf('(') !== -1)) { - case 1: { - switch (value) { - // not a valid reserved keyword - case 'infinite': case 'alternate': case 'backwards': case 'running': - case 'normal': case 'forwards': case 'both': case 'none': case 'linear': - case 'ease': case 'ease-in': case 'ease-out': case 'ease-in-out': - case 'paused': case 'reverse': case 'alternate-reverse': case 'inherit': - case 'initial': case 'unset': case 'step-start': case 'step-end': { - break - } - default: { - value += key - } - } - } - } - } - - items[index++] = value - } - - out += (i === 0 ? '' : ',') + items.join(' ') - } - } - } - - out = declare + out + ';' - - if (prefix === 1 || (prefix === 2 && vendor(out, 1))) - return webkit + out + out - - return out - } - - /** - * Isolate - * - * @param {Array} current - */ - function isolate (current) { - for (var i = 0, length = current.length, selector = Array(length), padding, element; i < length; ++i) { - // split individual elements in a selector i.e h1 h2 === [h1, h2] - var elements = current[i].split(elementptn) - var out = '' - - for (var j = 0, size = 0, tail = 0, code = 0, l = elements.length; j < l; ++j) { - // empty element - if ((size = (element = elements[j]).length) === 0 && l > 1) { - continue - } - - tail = out.charCodeAt(out.length-1) - code = element.charCodeAt(0) - padding = '' - - if (j !== 0) { - // determine if we need padding - switch (tail) { - case STAR: - case TILDE: - case GREATERTHAN: - case PLUS: - case SPACE: - case OPENPARENTHESES: { - break - } - default: { - padding = ' ' - } - } - } - - switch (code) { - case AND: { - element = padding + nscopealt - } - case TILDE: - case GREATERTHAN: - case PLUS: - case SPACE: - case CLOSEPARENTHESES: - case OPENPARENTHESES: { - break - } - case OPENBRACKET: { - element = padding + element + nscopealt - break - } - case COLON: { - switch (element.charCodeAt(1)*2 + element.charCodeAt(2)*3) { - // :global - case 530: { - if (escape > 0) { - element = padding + element.substring(8, size - 1) - break - } - } - // :hover, :nth-child(), ... - default: { - if (j < 1 || elements[j-1].length < 1) { - element = padding + nscopealt + element - } - } - } - break - } - case COMMA: { - padding = '' - } - default: { - if (size > 1 && element.indexOf(':') > 0) { - element = padding + element.replace(pseudoptn, '$1' + nscopealt + '$2') - } else { - element = padding + element + nscopealt - } - } - } - - out += element - } - - selector[i] = out.replace(formatptn, '').trim() - } - - return selector - } - - /** - * Proxy - * - * @param {number} context - * @param {string} content - * @param {Array} selectors - * @param {Array} parents - * @param {number} line - * @param {number} column - * @param {number} length - * @param {number} id - * @param {number} depth - * @return {(string|void|*)} - */ - function proxy (context, content, selectors, parents, line, column, length, id, depth) { - for (var i = 0, out = content, next; i < plugged; ++i) { - switch (next = plugins[i].call(stylis, context, out, selectors, parents, line, column, length, id, depth)) { - case void 0: - case false: - case true: - case null: { - break - } - default: { - out = next - } - } - } - - switch (out) { - case void 0: - case false: - case true: - case null: - case content: { - break - } - default: { - return out - } - } - } - - /** - * Minify - * - * @param {(string|*)} output - * @return {string} - */ - function minify (output) { - return output - .replace(formatptn, '') - .replace(beforeptn, '') - .replace(afterptn, '$1') - .replace(tailptn, '$1') - .replace(whiteptn, ' ') - } - - /** - * Use - * - * @param {(Array|function(...?)|number|void)?} plugin - */ - function use (plugin) { - switch (plugin) { - case void 0: - case null: { - plugged = plugins.length = 0 - break - } - default: { - switch (plugin.constructor) { - case Array: { - for (var i = 0, length = plugin.length; i < length; ++i) { - use(plugin[i]) - } - break - } - case Function: { - plugins[plugged++] = plugin - break - } - case Boolean: { - unkwn = !!plugin|0 - } - } - } - } - - return use - } - - /** - * Set - * - * @param {*} options - */ - function set (options) { - for (var name in options) { - var value = options[name] - switch (name) { - case 'keyframe': keyed = value|0; break - case 'global': escape = value|0; break - case 'cascade': cascade = value|0; break - case 'compress': compress = value|0; break - case 'semicolon': semicolon = value|0; break - case 'preserve': preserve = value|0; break - case 'prefix': - should = null - - if (!value) { - prefix = 0 - } else if (typeof value !== 'function') { - prefix = 1 - } else { - prefix = 2 - should = value - } - } - } - - return set - } - - /** - * Stylis - * - * @param {string} selector - * @param {string} input - * @return {*} - */ - function stylis (selector, input) { - if (this !== void 0 && this.constructor === stylis) { - return factory(selector) - } - - // setup - var ns = selector - var code = ns.charCodeAt(0) - - // trim leading whitespace - if (code < 33) { - code = (ns = ns.trim()).charCodeAt(0) - } - - // keyframe/animation namespace - if (keyed > 0) { - key = ns.replace(invalidptn, code === OPENBRACKET ? '' : '-') - } - - // reset, used to assert if a plugin is moneky-patching the return value - code = 1 - - // cascade/isolate - if (cascade === 1) { - nscope = ns - } else { - nscopealt = ns - } - - var selectors = [nscope] - var result - - // execute plugins, pre-process context - if (plugged > 0) { - result = proxy(PREPS, input, selectors, selectors, line, column, 0, 0, 0) - - if (result !== void 0 && typeof result === 'string') { - input = result - } - } - - // build - var output = compile(array, selectors, input, 0, 0) - - // execute plugins, post-process context - if (plugged > 0) { - result = proxy(POSTS, output, selectors, selectors, line, column, output.length, 0, 0) - - // bypass minification - if (result !== void 0 && typeof(output = result) !== 'string') { - code = 0 - } - } - - // reset - key = '' - nscope = '' - nscopealt = '' - pattern = 0 - line = 1 - column = 1 - - return compress*code === 0 ? output : minify(output) - } - - stylis['use'] = use - stylis['set'] = set - - if (options !== void 0) { - set(options) - } - - return stylis -})); - - -/***/ }), - -/***/ "../node_modules/trendmicro-ui/dist/css/trendmicro-ui.css": -/***/ (function(module, exports, __webpack_require__) { - -// style-loader: Adds some css to the DOM by adding a \n *\n * Note: replace · with * in the above snippet.\n * */\nvar COMPONENTS_PER_TAG = 40;\n\nvar BrowserTag = function () {\n function BrowserTag(el, isLocal) {\n var existingSource = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';\n classCallCheck(this, BrowserTag);\n\n this.el = el;\n this.isLocal = isLocal;\n this.ready = false;\n\n var extractedComps = extractCompsFromCSS(existingSource);\n\n this.size = extractedComps.length;\n this.components = extractedComps.reduce(function (acc, obj) {\n acc[obj.componentId] = obj; // eslint-disable-line no-param-reassign\n return acc;\n }, {});\n }\n\n BrowserTag.prototype.isFull = function isFull() {\n return this.size >= COMPONENTS_PER_TAG;\n };\n\n BrowserTag.prototype.addComponent = function addComponent(componentId) {\n if (!this.ready) this.replaceElement();\n if (process.env.NODE_ENV !== 'production' && this.components[componentId]) {\n throw new Error('Trying to add Component \\'' + componentId + '\\' twice!');\n }\n\n var comp = { componentId: componentId, textNode: document.createTextNode('') };\n this.el.appendChild(comp.textNode);\n\n this.size += 1;\n this.components[componentId] = comp;\n };\n\n BrowserTag.prototype.inject = function inject(componentId, css, name) {\n if (!this.ready) this.replaceElement();\n var comp = this.components[componentId];\n\n if (process.env.NODE_ENV !== 'production' && !comp) {\n throw new Error('Must add a new component before you can inject css into it');\n }\n if (comp.textNode.data === '') {\n comp.textNode.appendData('\\n/* sc-component-id: ' + componentId + ' */\\n');\n }\n\n comp.textNode.appendData(css);\n if (name) {\n var existingNames = this.el.getAttribute(SC_ATTR);\n this.el.setAttribute(SC_ATTR, existingNames ? existingNames + ' ' + name : name);\n }\n\n var nonce = getNonce();\n\n if (nonce) {\n this.el.setAttribute('nonce', nonce);\n }\n };\n\n BrowserTag.prototype.toHTML = function toHTML() {\n return this.el.outerHTML;\n };\n\n BrowserTag.prototype.toReactElement = function toReactElement() {\n throw new Error(\"BrowserTag doesn't implement toReactElement!\");\n };\n\n BrowserTag.prototype.clone = function clone() {\n throw new Error('BrowserTag cannot be cloned!');\n };\n\n /* Because we care about source order, before we can inject anything we need to\n * create a text node for each component and replace the existing CSS. */\n\n\n BrowserTag.prototype.replaceElement = function replaceElement() {\n var _this = this;\n\n this.ready = true;\n // We have nothing to inject. Use the current el.\n if (this.size === 0) return;\n\n // Build up our replacement style tag\n var newEl = this.el.cloneNode();\n newEl.appendChild(document.createTextNode('\\n'));\n\n Object.keys(this.components).forEach(function (key) {\n var comp = _this.components[key];\n\n // eslint-disable-next-line no-param-reassign\n comp.textNode = document.createTextNode(comp.cssFromDOM);\n newEl.appendChild(comp.textNode);\n });\n\n if (!this.el.parentNode) {\n throw new Error(\"Trying to replace an element that wasn't mounted!\");\n }\n\n // The ol' switcheroo\n this.el.parentNode.replaceChild(newEl, this.el);\n this.el = newEl;\n };\n\n return BrowserTag;\n}();\n\n/* Factory function to separate DOM operations from logical ones*/\n\n\nvar BrowserStyleSheet = {\n create: function create() {\n var tags = [];\n var names = {};\n\n /* Construct existing state from DOM */\n var nodes = document.querySelectorAll('[' + SC_ATTR + ']');\n var nodesLength = nodes.length;\n\n for (var i = 0; i < nodesLength; i += 1) {\n var el = nodes[i];\n\n tags.push(new BrowserTag(el, el.getAttribute(LOCAL_ATTR) === 'true', el.innerHTML));\n\n var attr = el.getAttribute(SC_ATTR);\n if (attr) {\n attr.trim().split(/\\s+/).forEach(function (name) {\n names[name] = true;\n });\n }\n }\n\n /* Factory for making more tags */\n var tagConstructor = function tagConstructor(isLocal) {\n var el = document.createElement('style');\n el.type = 'text/css';\n el.setAttribute(SC_ATTR, '');\n el.setAttribute(LOCAL_ATTR, isLocal ? 'true' : 'false');\n if (!document.head) throw new Error('Missing document ');\n document.head.appendChild(el);\n return new BrowserTag(el, isLocal);\n };\n\n return new StyleSheet(tagConstructor, tags, names);\n }\n};\n\n// \nvar SC_ATTR = 'data-styled-components';\nvar LOCAL_ATTR = 'data-styled-components-is-local';\nvar CONTEXT_KEY = '__styled-components-stylesheet__';\n\n/* eslint-disable flowtype/object-type-delimiter */\n\n/* eslint-enable flowtype/object-type-delimiter */\n\nvar instance = null;\n// eslint-disable-next-line no-use-before-define\nvar clones = [];\n\nvar StyleSheet = function () {\n function StyleSheet(tagConstructor) {\n var tags = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n var names = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n classCallCheck(this, StyleSheet);\n this.hashes = {};\n this.deferredInjections = {};\n this.stylesCacheable = typeof document !== 'undefined';\n\n this.tagConstructor = tagConstructor;\n this.tags = tags;\n this.names = names;\n this.constructComponentTagMap();\n }\n\n // helper for `ComponentStyle` to know when it cache static styles.\n // staticly styled-component can not safely cache styles on the server\n // without all `ComponentStyle` instances saving a reference to the\n // the styleSheet instance they last rendered with,\n // or listening to creation / reset events. otherwise you might create\n // a component with one stylesheet and render it another api response\n // with another, losing styles on from your server-side render.\n\n\n StyleSheet.prototype.constructComponentTagMap = function constructComponentTagMap() {\n var _this = this;\n\n this.componentTags = {};\n\n this.tags.forEach(function (tag) {\n Object.keys(tag.components).forEach(function (componentId) {\n _this.componentTags[componentId] = tag;\n });\n });\n };\n\n /* Best level of caching—get the name from the hash straight away. */\n\n\n StyleSheet.prototype.getName = function getName(hash) {\n return this.hashes[hash.toString()];\n };\n\n /* Second level of caching—if the name is already in the dom, don't\n * inject anything and record the hash for getName next time. */\n\n\n StyleSheet.prototype.alreadyInjected = function alreadyInjected(hash, name) {\n if (!this.names[name]) return false;\n\n this.hashes[hash.toString()] = name;\n return true;\n };\n\n /* Third type of caching—don't inject components' componentId twice. */\n\n\n StyleSheet.prototype.hasInjectedComponent = function hasInjectedComponent(componentId) {\n return !!this.componentTags[componentId];\n };\n\n StyleSheet.prototype.deferredInject = function deferredInject(componentId, isLocal, css) {\n if (this === instance) {\n clones.forEach(function (clone) {\n clone.deferredInject(componentId, isLocal, css);\n });\n }\n\n this.getOrCreateTag(componentId, isLocal);\n this.deferredInjections[componentId] = css;\n };\n\n StyleSheet.prototype.inject = function inject(componentId, isLocal, css, hash, name) {\n if (this === instance) {\n clones.forEach(function (clone) {\n clone.inject(componentId, isLocal, css);\n });\n }\n\n var tag = this.getOrCreateTag(componentId, isLocal);\n\n var deferredInjection = this.deferredInjections[componentId];\n if (deferredInjection) {\n tag.inject(componentId, deferredInjection);\n delete this.deferredInjections[componentId];\n }\n\n tag.inject(componentId, css, name);\n\n if (hash && name) {\n this.hashes[hash.toString()] = name;\n }\n };\n\n StyleSheet.prototype.toHTML = function toHTML() {\n return this.tags.map(function (tag) {\n return tag.toHTML();\n }).join('');\n };\n\n StyleSheet.prototype.toReactElements = function toReactElements() {\n return this.tags.map(function (tag, i) {\n return tag.toReactElement('sc-' + i);\n });\n };\n\n StyleSheet.prototype.getOrCreateTag = function getOrCreateTag(componentId, isLocal) {\n var existingTag = this.componentTags[componentId];\n if (existingTag) {\n return existingTag;\n }\n\n var lastTag = this.tags[this.tags.length - 1];\n var componentTag = !lastTag || lastTag.isFull() || lastTag.isLocal !== isLocal ? this.createNewTag(isLocal) : lastTag;\n this.componentTags[componentId] = componentTag;\n componentTag.addComponent(componentId);\n return componentTag;\n };\n\n StyleSheet.prototype.createNewTag = function createNewTag(isLocal) {\n var newTag = this.tagConstructor(isLocal);\n this.tags.push(newTag);\n return newTag;\n };\n\n StyleSheet.reset = function reset(isServer) {\n instance = StyleSheet.create(isServer);\n };\n\n /* We can make isServer totally implicit once Jest 20 drops and we\n * can change environment on a per-test basis. */\n\n\n StyleSheet.create = function create() {\n var isServer = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : typeof document === 'undefined';\n\n return (isServer ? ServerStyleSheet : BrowserStyleSheet).create();\n };\n\n StyleSheet.clone = function clone(oldSheet) {\n var newSheet = new StyleSheet(oldSheet.tagConstructor, oldSheet.tags.map(function (tag) {\n return tag.clone();\n }), _extends({}, oldSheet.names));\n\n newSheet.hashes = _extends({}, oldSheet.hashes);\n newSheet.deferredInjections = _extends({}, oldSheet.deferredInjections);\n clones.push(newSheet);\n\n return newSheet;\n };\n\n createClass(StyleSheet, null, [{\n key: 'instance',\n get: function get$$1() {\n return instance || (instance = StyleSheet.create());\n }\n }]);\n return StyleSheet;\n}();\n\nvar _StyleSheetManager$ch;\n\n// \nvar StyleSheetManager = function (_Component) {\n inherits(StyleSheetManager, _Component);\n\n function StyleSheetManager() {\n classCallCheck(this, StyleSheetManager);\n return possibleConstructorReturn(this, _Component.apply(this, arguments));\n }\n\n StyleSheetManager.prototype.getChildContext = function getChildContext() {\n var _ref;\n\n return _ref = {}, _ref[CONTEXT_KEY] = this.props.sheet, _ref;\n };\n\n StyleSheetManager.prototype.render = function render() {\n /* eslint-disable react/prop-types */\n // Flow v0.43.1 will report an error accessing the `children` property,\n // but v0.47.0 will not. It is necessary to use a type cast instead of\n // a \"fixme\" comment to satisfy both Flow versions.\n return __WEBPACK_IMPORTED_MODULE_2_react___default.a.Children.only(this.props.children);\n };\n\n return StyleSheetManager;\n}(__WEBPACK_IMPORTED_MODULE_2_react__[\"Component\"]);\n\nStyleSheetManager.childContextTypes = (_StyleSheetManager$ch = {}, _StyleSheetManager$ch[CONTEXT_KEY] = __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.instanceOf(StyleSheet), __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.instanceOf(ServerStyleSheet)]).isRequired, _StyleSheetManager$ch);\n\nStyleSheetManager.propTypes = {\n sheet: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.instanceOf(StyleSheet), __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.instanceOf(ServerStyleSheet)]).isRequired\n};\n\n// \n/* eslint-disable no-underscore-dangle */\nvar ServerTag = function () {\n function ServerTag(isLocal) {\n classCallCheck(this, ServerTag);\n\n this.isLocal = isLocal;\n this.components = {};\n this.size = 0;\n this.names = [];\n }\n\n ServerTag.prototype.isFull = function isFull() {\n return false;\n };\n\n ServerTag.prototype.addComponent = function addComponent(componentId) {\n if (process.env.NODE_ENV !== 'production' && this.components[componentId]) {\n throw new Error('Trying to add Component \\'' + componentId + '\\' twice!');\n }\n this.components[componentId] = { componentId: componentId, css: '' };\n this.size += 1;\n };\n\n ServerTag.prototype.concatenateCSS = function concatenateCSS() {\n var _this = this;\n\n return Object.keys(this.components).reduce(function (styles, k) {\n return styles + _this.components[k].css;\n }, '');\n };\n\n ServerTag.prototype.inject = function inject(componentId, css, name) {\n var comp = this.components[componentId];\n\n if (process.env.NODE_ENV !== 'production' && !comp) {\n throw new Error('Must add a new component before you can inject css into it');\n }\n if (comp.css === '') comp.css = '/* sc-component-id: ' + componentId + ' */\\n';\n\n comp.css += css.replace(/\\n*$/, '\\n');\n\n if (name) this.names.push(name);\n };\n\n ServerTag.prototype.toHTML = function toHTML() {\n var attrs = ['type=\"text/css\"', SC_ATTR + '=\"' + this.names.join(' ') + '\"', LOCAL_ATTR + '=\"' + (this.isLocal ? 'true' : 'false') + '\"'];\n\n var nonce = getNonce();\n\n if (nonce) {\n attrs.push('nonce=\"' + nonce + '\"');\n }\n\n return '';\n };\n\n ServerTag.prototype.toReactElement = function toReactElement(key) {\n var _attrs;\n\n var attrs = (_attrs = {}, _attrs[SC_ATTR] = this.names.join(' '), _attrs[LOCAL_ATTR] = this.isLocal.toString(), _attrs);\n\n var nonce = getNonce();\n\n if (nonce) {\n attrs.nonce = nonce;\n }\n\n return __WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement('style', _extends({\n key: key,\n type: 'text/css'\n }, attrs, {\n dangerouslySetInnerHTML: { __html: this.concatenateCSS() }\n }));\n };\n\n ServerTag.prototype.clone = function clone() {\n var _this2 = this;\n\n var copy = new ServerTag(this.isLocal);\n copy.names = [].concat(this.names);\n copy.size = this.size;\n copy.components = Object.keys(this.components).reduce(function (acc, key) {\n acc[key] = _extends({}, _this2.components[key]); // eslint-disable-line no-param-reassign\n return acc;\n }, {});\n\n return copy;\n };\n\n return ServerTag;\n}();\n\nvar ServerStyleSheet = function () {\n function ServerStyleSheet() {\n classCallCheck(this, ServerStyleSheet);\n\n this.instance = StyleSheet.clone(StyleSheet.instance);\n }\n\n ServerStyleSheet.prototype.collectStyles = function collectStyles(children) {\n if (this.closed) {\n throw new Error(\"Can't collect styles once you've called getStyleTags!\");\n }\n return __WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement(\n StyleSheetManager,\n { sheet: this.instance },\n children\n );\n };\n\n ServerStyleSheet.prototype.getStyleTags = function getStyleTags() {\n if (!this.closed) {\n clones.splice(clones.indexOf(this.instance), 1);\n this.closed = true;\n }\n\n return this.instance.toHTML();\n };\n\n ServerStyleSheet.prototype.getStyleElement = function getStyleElement() {\n if (!this.closed) {\n clones.splice(clones.indexOf(this.instance), 1);\n this.closed = true;\n }\n\n return this.instance.toReactElements();\n };\n\n ServerStyleSheet.create = function create() {\n return new StyleSheet(function (isLocal) {\n return new ServerTag(isLocal);\n });\n };\n\n return ServerStyleSheet;\n}();\n\n// \n\nvar LIMIT = 200;\n\nvar createWarnTooManyClasses = (function (displayName) {\n var generatedClasses = {};\n var warningSeen = false;\n\n return function (className) {\n if (!warningSeen) {\n generatedClasses[className] = true;\n if (Object.keys(generatedClasses).length >= LIMIT) {\n // Unable to find latestRule in test environment.\n /* eslint-disable no-console, prefer-template */\n console.warn('Over ' + LIMIT + ' classes were generated for component ' + displayName + '. \\n' + 'Consider using the attrs method, together with a style object for frequently changed styles.\\n' + 'Example:\\n' + ' const Component = styled.div.attrs({\\n' + ' style: ({ background }) => ({\\n' + ' background,\\n' + ' }),\\n' + ' })`width: 100%;`\\n\\n' + ' ');\n warningSeen = true;\n generatedClasses = {};\n }\n }\n };\n});\n\n// \n/* eslint-disable max-len */\n/**\n * Trying to avoid the unknown-prop errors on styled components by filtering by\n * React's attribute whitelist.\n *\n * To regenerate this regex:\n *\n * 1. `npm i -g regexgen` (https://github.com/devongovett/regexgen)\n * 2. Run `regexgen` with the list of space-separated words below as input\n * 3. Surround the emitted regex with this: `/^(GENERATED_REGEX)$/` -- this will ensure a full string match\n * and no false positives from partials\n **/\n/*\nchildren dangerouslySetInnerHTML key ref autoFocus defaultValue valueLink defaultChecked checkedLink innerHTML suppressContentEditableWarning onFocusIn onFocusOut className onCopy onCut onPaste onCompositionEnd onCompositionStart onCompositionUpdate onKeyDown onKeyPress onKeyUp onFocus onBlur onChange onInput onSubmit onReset onClick onContextMenu onDoubleClick onDrag onDragEnd onDragEnter onDragExit onDragLeave onDragOver onDragStart onDrop onMouseDown onMouseEnter onMouseLeave onMouseMove onMouseOut onMouseOver onMouseUp onSelect onTouchCancel onTouchEnd onTouchMove onTouchStart onScroll onWheel onAbort onCanPlay onCanPlayThrough onDurationChange onEmptied onEncrypted onEnded onError onLoadedData onLoadedMetadata onLoadStart onPause onPlay onPlaying onProgress onRateChange onSeeked onSeeking onStalled onSuspend onTimeUpdate onVolumeChange onWaiting onLoad onAnimationStart onAnimationEnd onAnimationIteration onTransitionEnd onCopyCapture onCutCapture onPasteCapture onCompositionEndCapture onCompositionStartCapture onCompositionUpdateCapture onKeyDownCapture onKeyPressCapture onKeyUpCapture onFocusCapture onBlurCapture onChangeCapture onInputCapture onSubmitCapture onResetCapture onClickCapture onContextMenuCapture onDoubleClickCapture onDragCapture onDragEndCapture onDragEnterCapture onDragExitCapture onDragLeaveCapture onDragOverCapture onDragStartCapture onDropCapture onMouseDownCapture onMouseEnterCapture onMouseLeaveCapture onMouseMoveCapture onMouseOutCapture onMouseOverCapture onMouseUpCapture onSelectCapture onTouchCancelCapture onTouchEndCapture onTouchMoveCapture onTouchStartCapture onScrollCapture onWheelCapture onAbortCapture onCanPlayCapture onCanPlayThroughCapture onDurationChangeCapture onEmptiedCapture onEncryptedCapture onEndedCapture onErrorCapture onLoadedDataCapture onLoadedMetadataCapture onLoadStartCapture onPauseCapture onPlayCapture onPlayingCapture onProgressCapture onRateChangeCapture onSeekedCapture onSeekingCapture onStalledCapture onSuspendCapture onTimeUpdateCapture onVolumeChangeCapture onWaitingCapture onLoadCapture onAnimationStartCapture onAnimationEndCapture onAnimationIterationCapture onTransitionEndCapture accept acceptCharset accessKey action allowFullScreen allowTransparency alt as async autoComplete autoPlay capture cellPadding cellSpacing charSet challenge checked cite classID className cols colSpan content contentEditable contextMenu controls coords crossOrigin data dateTime default defer dir disabled download draggable encType form formAction formEncType formMethod formNoValidate formTarget frameBorder headers height hidden high href hrefLang htmlFor httpEquiv icon id inputMode integrity is keyParams keyType kind label lang list loop low manifest marginHeight marginWidth max maxLength media mediaGroup method min minLength multiple muted name nonce noValidate open optimum pattern placeholder playsInline poster preload profile radioGroup readOnly referrerPolicy rel required reversed role rows rowSpan sandbox scope scoped scrolling seamless selected shape size sizes span spellCheck src srcDoc srcLang srcSet start step style summary tabIndex target title type useMap value width wmode wrap about datatype inlist prefix property resource typeof vocab autoCapitalize autoCorrect autoSave color itemProp itemScope itemType itemID itemRef results security unselectable accentHeight accumulate additive alignmentBaseline allowReorder alphabetic amplitude arabicForm ascent attributeName attributeType autoReverse azimuth baseFrequency baseProfile baselineShift bbox begin bias by calcMode capHeight clip clipPath clipRule clipPathUnits colorInterpolation colorInterpolationFilters colorProfile colorRendering contentScriptType contentStyleType cursor cx cy d decelerate descent diffuseConstant direction display divisor dominantBaseline dur dx dy edgeMode elevation enableBackground end exponent externalResourcesRequired fill fillOpacity fillRule filter filterRes filterUnits floodColor floodOpacity focusable fontFamily fontSize fontSizeAdjust fontStretch fontStyle fontVariant fontWeight format from fx fy g1 g2 glyphName glyphOrientationHorizontal glyphOrientationVertical glyphRef gradientTransform gradientUnits hanging horizAdvX horizOriginX ideographic imageRendering in in2 intercept k k1 k2 k3 k4 kernelMatrix kernelUnitLength kerning keyPoints keySplines keyTimes lengthAdjust letterSpacing lightingColor limitingConeAngle local markerEnd markerMid markerStart markerHeight markerUnits markerWidth mask maskContentUnits maskUnits mathematical mode numOctaves offset opacity operator order orient orientation origin overflow overlinePosition overlineThickness paintOrder panose1 pathLength patternContentUnits patternTransform patternUnits pointerEvents points pointsAtX pointsAtY pointsAtZ preserveAlpha preserveAspectRatio primitiveUnits r radius refX refY renderingIntent repeatCount repeatDur requiredExtensions requiredFeatures restart result rotate rx ry scale seed shapeRendering slope spacing specularConstant specularExponent speed spreadMethod startOffset stdDeviation stemh stemv stitchTiles stopColor stopOpacity strikethroughPosition strikethroughThickness string stroke strokeDasharray strokeDashoffset strokeLinecap strokeLinejoin strokeMiterlimit strokeOpacity strokeWidth surfaceScale systemLanguage tableValues targetX targetY textAnchor textDecoration textRendering textLength to transform u1 u2 underlinePosition underlineThickness unicode unicodeBidi unicodeRange unitsPerEm vAlphabetic vHanging vIdeographic vMathematical values vectorEffect version vertAdvY vertOriginX vertOriginY viewBox viewTarget visibility widths wordSpacing writingMode x xHeight x1 x2 xChannelSelector xlinkActuate xlinkArcrole xlinkHref xlinkRole xlinkShow xlinkTitle xlinkType xmlBase xmlns xmlnsXlink xmlLang xmlSpace y y1 y2 yChannelSelector z zoomAndPan\n*/\n/* eslint-enable max-len */\n\nvar ATTRIBUTE_REGEX = /^((?:s(?:uppressContentEditableWarn|croll|pac)|(?:shape|image|text)Render|(?:letter|word)Spac|vHang|hang)ing|(?:on(?:AnimationIteration|C(?:o(?:mposition(?:Update|Start|End)|ntextMenu|py)|anPlayThrough|anPlay|hange|lick|ut)|(?:(?:Duration|Volume|Rate)Chang|(?:MouseLea|(?:Touch|Mouse)Mo|DragLea)v|Paus)e|Loaded(?:Metad|D)ata|(?:Animation|Touch|Load|Drag)Start|(?:(?:T(?:ransition|ouch)|Animation)E|Suspe)nd|DoubleClick|(?:TouchCanc|Whe)el|(?:Mouse(?:Ent|Ov)e|Drag(?:Ent|Ov)e|Erro)r|TimeUpdate|(?:E(?:n(?:crypt|d)|mpti)|S(?:tall|eek))ed|MouseDown|P(?:rogress|laying)|(?:MouseOu|DragExi|S(?:elec|ubmi)|Rese|Inpu)t|KeyPress|DragEnd|Key(?:Down|Up)|(?:Wait|Seek)ing|(?:MouseU|Dro)p|Scroll|Paste|Focus|Abort|Drag|Play|Load|Blur)Captur|alignmentBaselin|(?:limitingConeAng|xlink(?:(?:Arcr|R)o|Tit)|s(?:urfaceSca|ty|ca)|unselectab|baseProfi|fontSty|(?:focus|dragg)ab|multip|profi|tit)l|d(?:ominantBaselin|efaultValu)|a(?:uto(?:Capitaliz|Revers|Sav)|dditiv)|(?:(?:formNoValid|xlinkActu|noValid|accumul|rot)a|autoComple|decelera)t|(?:(?:attribute|item)T|datat)yp|(?:attribute|glyph)Nam|playsInlin|(?:formE|e)ncTyp|(?:writing|input|edge)Mod|(?:xlinkTy|itemSco|keyTy|slo)p|(?:amplitu|mo)d|(?:xmlSpa|non)c|fillRul|(?:dateTi|na)m|r(?:esourc|ol)|xmlBas|wmod)e|(?:glyphOrientationHorizont|loc)al|(?:externalResourcesRequir|select|revers|mut)ed|c(?:o(?:lorInterpolationFilter|ntrol|ord)s|o(?:lor(?:Interpolation)?|ntent)|(?:ontentS(?:cript|tyle)Typ|o(?:ntentEditab|lorProfi)l|l(?:assNam|ipRul)|a(?:lcMod|ptur)|it)e|olorRendering|l(?:ipPathUnits|assID)|o(?:ntextMenu|ls)|h(?:eckedLink|a(?:llenge|rSet)|ildren|ecked)|ell(?:Spac|Padd)ing|(?:rossOrigi|olSpa)n|apHeight|lip(?:Path)?|ursor|[xy])|glyphOrientationVertical|d(?:angerouslySetInnerHTML|efaultChecked|ownload|isabled|isplay|[xy])|(?:s(?:trikethroughThickn|eaml)es|(?:und|ov)erlineThicknes|r(?:equiredExtension|adiu)|(?:requiredFeatur|tableValu|stitchTil|numOctav|filterR)e|key(?:(?:Splin|Tim)e|Param)|autoFocu|header|bia)s|(?:(?:st(?:rikethroughPosi|dDevia)|(?:und|ov)erlinePosi|(?:textDecor|elev)a|orienta)tio|(?:strokeLinejo|orig)i|formActio|zoomAndPa|onFocusI|directio|(?:vers|act)io|rowSpa|begi|ico)n|o(?:n(?:AnimationIteration|C(?:o(?:mposition(?:Update|Start|End)|ntextMenu|py)|anPlayThrough|anPlay|hange|lick|ut)|(?:(?:Duration|Volume|Rate)Chang|(?:MouseLea|(?:Touch|Mouse)Mo|DragLea)v|Paus)e|Loaded(?:Metad|D)ata|(?:Animation|Touch|Load|Drag)Start|(?:(?:T(?:ransition|ouch)|Animation)E|Suspe)nd|DoubleClick|(?:TouchCanc|Whe)el|(?:Mouse(?:Ent|Ov)e|Drag(?:Ent|Ov)e|Erro)r|TimeUpdate|(?:E(?:n(?:crypt|d)|mpti)|S(?:tall|eek))ed|MouseDown|P(?:rogress|laying)|(?:MouseOu|DragExi|S(?:elec|ubmi)|Rese|Inpu)t|KeyPress|DragEnd|Key(?:Down|Up)|(?:Wait|Seek)ing|(?:MouseU|Dro)p|Scroll|Paste|Focus|Abort|Drag|Play|Load|Blur)|rient)|p(?:reserveA(?:spectRatio|lpha)|ointsAt[X-Z]|anose1)|(?:patternContent|ma(?:sk(?:Content)?|rker)|primitive|gradient|pattern|filter)Units|(?:gradientT|patternT|t)ransform|(?:(?:allowTranspar|baseFrequ)enc|re(?:ferrerPolic|adOnl)|(?:(?:st(?:roke|op)O|floodO|fillO|o)pac|integr|secur)it|visibilit|fontFamil|accessKe|propert|summar)y|(?:strokeMiterlimi|(?:specularConsta|repeatCou|fontVaria)n|(?:(?:specularE|e)xpon|renderingInt|asc)en|d(?:iffuseConsta|esce)n|(?:fontSizeAdju|lengthAdju|manife)s|baselineShif|vectorEffec|(?:(?:mar(?:ker|gin)|x)H|accentH|fontW)eigh|a(?:utoCorrec|bou)|markerStar|onFocusOu|in(?:tercep|lis)|restar|forma|heigh|lis)t|(?:(?:st(?:rokeDasho|artO)|o)ffs|acceptChars|formTarg|viewTarg|srcS)et|(?:(?:enableBackgrou|markerE)n|s(?:p(?:readMetho|ee)|ee)|formMetho|m(?:arkerMi|etho)|preloa|kin)d|k(?:ernel(?:UnitLength|Matrix)|[1-4])|(?:[xy]ChannelSelect|lightingCol|textAnch|floodCol|stopCol|operat|htmlF)or|(?:allowFullScre|hidd)en|strokeDasharray|systemLanguage|(?:strokeLineca|itemPro|useMa|wra|loo)p|v(?:Mathematical|ert(?:Origin[XY]|AdvY)|alues|ocab)|(?:pointerEve|keyPoi)nts|unicodeRange|(?:(?:allowReord|placehold|frameBord|paintOrd|post|ord)e|repeatDu|d(?:efe|u))r|mathematical|(?:vI|i)deographic|h(?:oriz(?:Origin|Adv)X|ttpEquiv)|u(?:nicodeBidi|[12])|(?:fontStretc|hig)h|(?:(?:mar(?:ker|gin)W|strokeW)id|azimu)th|vAlphabetic|mediaGroup|spellCheck|(?:unitsPerE|optimu|fro)m|r(?:adioGroup|e(?:sults|f[XY]|l)|ows|[xy])|(?:xmlnsXl|valueL)ink|a(?:rabicForm|l(?:phabetic|t)|sync)|pathLength|(?:text|m(?:in|ax))Length|innerHTML|xlinkShow|(?:xlinkHr|glyphR)ef|r(?:e(?:quired|sult|f))?|o(?:verflow|pen)|(?:tabInde|(?:sand|b)bo|viewBo)x|(?:(?:href|xml|src)La|kerni)ng|f(?:o(?:ntSize|rm)|il(?:ter|l))|autoPlay|unicode|p(?:attern|oints)|t(?:arget[XY]|o)|i(?:temRef|n2|s)|divisor|d(?:efault|ata|ir)?|srcDoc|s(?:coped|te(?:m[hv]|p)|pan)|(?:width|size)s|(?:stri|la)ng|prefix|itemID|s(?:t(?:roke|art)|hape|cope|rc)|a(?:ccept|s)|t(?:arget|ype)|typeof|width|value|x(?:mlns)?|label|m(?:edia|a(?:sk|x)|in)|size|href|k(?:ey)?|end|low|x[12]|i[dn]|y[12]|g[12]|by|f[xy]|[yz])$/;\n\n/* From DOMProperty */\nvar ATTRIBUTE_NAME_START_CHAR = ':A-Z_a-z\\\\u00C0-\\\\u00D6\\\\u00D8-\\\\u00F6\\\\u00F8-\\\\u02FF\\\\u0370-\\\\u037D\\\\u037F-\\\\u1FFF\\\\u200C-\\\\u200D\\\\u2070-\\\\u218F\\\\u2C00-\\\\u2FEF\\\\u3001-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFFD';\nvar ATTRIBUTE_NAME_CHAR = ATTRIBUTE_NAME_START_CHAR + '\\\\-.0-9\\\\u00B7\\\\u0300-\\\\u036F\\\\u203F-\\\\u2040';\nvar isCustomAttribute = RegExp.prototype.test.bind(new RegExp('^(data|aria)-[' + ATTRIBUTE_NAME_CHAR + ']*$'));\n\nvar validAttr = (function (name) {\n return ATTRIBUTE_REGEX.test(name) || isCustomAttribute(name.toLowerCase());\n});\n\n// \n\n\nfunction isTag(target) /* : %checks */{\n return typeof target === 'string';\n}\n\n// \n\n\nfunction isStyledComponent(target) /* : %checks */{\n return typeof target === 'function' && typeof target.styledComponentId === 'string';\n}\n\n// \n\n/* eslint-disable no-undef */\nfunction getComponentName(target) {\n return target.displayName || target.name || 'Component';\n}\n\n// \n\n\nvar determineTheme = (function (props, fallbackTheme, defaultProps) {\n // Props should take precedence over ThemeProvider, which should take precedence over\n // defaultProps, but React automatically puts defaultProps on props.\n\n /* eslint-disable react/prop-types */\n var isDefaultTheme = defaultProps && props.theme === defaultProps.theme;\n var theme = props.theme && !isDefaultTheme ? props.theme : fallbackTheme;\n /* eslint-enable */\n\n return theme;\n});\n\n// \nvar escapeRegex = /[[\\].#*$><+~=|^:(),\"'`-]+/g;\nvar dashesAtEnds = /(^-|-$)/g;\n\n/**\n * TODO: Explore using CSS.escape when it becomes more available\n * in evergreen browsers.\n */\nfunction escape(str) {\n return str\n // Replace all possible CSS selectors\n .replace(escapeRegex, '-')\n\n // Remove extraneous hyphens at the start and end\n .replace(dashesAtEnds, '');\n}\n\n// \n/**\n * Creates a broadcast that can be listened to, i.e. simple event emitter\n *\n * @see https://github.com/ReactTraining/react-broadcast\n */\n\nvar createBroadcast = function createBroadcast(initialState) {\n var listeners = {};\n var id = 0;\n var state = initialState;\n\n function publish(nextState) {\n state = nextState;\n\n // eslint-disable-next-line guard-for-in, no-restricted-syntax\n for (var key in listeners) {\n var listener = listeners[key];\n if (listener === undefined) {\n // eslint-disable-next-line no-continue\n continue;\n }\n\n listener(state);\n }\n }\n\n function subscribe(listener) {\n var currentId = id;\n listeners[currentId] = listener;\n id += 1;\n listener(state);\n return currentId;\n }\n\n function unsubscribe(unsubID) {\n listeners[unsubID] = undefined;\n }\n\n return { publish: publish, subscribe: subscribe, unsubscribe: unsubscribe };\n};\n\n// \n// Helper to call a given function, only once\nvar once = (function (cb) {\n var called = false;\n\n return function () {\n if (!called) {\n called = true;\n cb();\n }\n };\n});\n\nvar _ThemeProvider$childC;\nvar _ThemeProvider$contex;\n\n// \n/* globals React$Element */\n// NOTE: DO NOT CHANGE, changing this is a semver major change!\nvar CHANNEL = '__styled-components__';\nvar CHANNEL_NEXT = CHANNEL + 'next__';\n\nvar CONTEXT_CHANNEL_SHAPE = __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.shape({\n getTheme: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.func,\n subscribe: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.func,\n unsubscribe: __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.func\n});\n\nvar warnChannelDeprecated = void 0;\nif (process.env.NODE_ENV !== 'production') {\n warnChannelDeprecated = once(function () {\n // eslint-disable-next-line no-console\n console.error('Warning: Usage of `context.' + CHANNEL + '` as a function is deprecated. It will be replaced with the object on `.context.' + CHANNEL_NEXT + '` in a future version.');\n });\n}\n\nvar isFunction = function isFunction(test) {\n return typeof test === 'function';\n};\n\n/**\n * Provide a theme to an entire react component tree via context and event listeners (have to do\n * both context and event emitter as pure components block context updates)\n */\n\nvar ThemeProvider = function (_Component) {\n inherits(ThemeProvider, _Component);\n\n function ThemeProvider() {\n classCallCheck(this, ThemeProvider);\n\n var _this = possibleConstructorReturn(this, _Component.call(this));\n\n _this.unsubscribeToOuterId = -1;\n\n _this.getTheme = _this.getTheme.bind(_this);\n return _this;\n }\n\n ThemeProvider.prototype.componentWillMount = function componentWillMount() {\n var _this2 = this;\n\n // If there is a ThemeProvider wrapper anywhere around this theme provider, merge this theme\n // with the outer theme\n var outerContext = this.context[CHANNEL_NEXT];\n if (outerContext !== undefined) {\n this.unsubscribeToOuterId = outerContext.subscribe(function (theme) {\n _this2.outerTheme = theme;\n });\n }\n this.broadcast = createBroadcast(this.getTheme());\n };\n\n ThemeProvider.prototype.getChildContext = function getChildContext() {\n var _this3 = this,\n _babelHelpers$extends;\n\n return _extends({}, this.context, (_babelHelpers$extends = {}, _babelHelpers$extends[CHANNEL_NEXT] = {\n getTheme: this.getTheme,\n subscribe: this.broadcast.subscribe,\n unsubscribe: this.broadcast.unsubscribe\n }, _babelHelpers$extends[CHANNEL] = function (subscriber) {\n if (process.env.NODE_ENV !== 'production') {\n warnChannelDeprecated();\n }\n\n // Patch the old `subscribe` provide via `CHANNEL` for older clients.\n var unsubscribeId = _this3.broadcast.subscribe(subscriber);\n return function () {\n return _this3.broadcast.unsubscribe(unsubscribeId);\n };\n }, _babelHelpers$extends));\n };\n\n ThemeProvider.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {\n if (this.props.theme !== nextProps.theme) {\n this.broadcast.publish(this.getTheme(nextProps.theme));\n }\n };\n\n ThemeProvider.prototype.componentWillUnmount = function componentWillUnmount() {\n if (this.unsubscribeToOuterId !== -1) {\n this.context[CHANNEL_NEXT].unsubscribe(this.unsubscribeToOuterId);\n }\n };\n\n // Get the theme from the props, supporting both (outerTheme) => {} as well as object notation\n\n\n ThemeProvider.prototype.getTheme = function getTheme(passedTheme) {\n var theme = passedTheme || this.props.theme;\n if (isFunction(theme)) {\n var mergedTheme = theme(this.outerTheme);\n if (process.env.NODE_ENV !== 'production' && !__WEBPACK_IMPORTED_MODULE_0_is_plain_object___default()(mergedTheme)) {\n throw new Error('[ThemeProvider] Please return an object from your theme function, i.e. theme={() => ({})}!');\n }\n return mergedTheme;\n }\n if (!__WEBPACK_IMPORTED_MODULE_0_is_plain_object___default()(theme)) {\n throw new Error('[ThemeProvider] Please make your theme prop a plain object');\n }\n return _extends({}, this.outerTheme, theme);\n };\n\n ThemeProvider.prototype.render = function render() {\n if (!this.props.children) {\n return null;\n }\n return __WEBPACK_IMPORTED_MODULE_2_react___default.a.Children.only(this.props.children);\n };\n\n return ThemeProvider;\n}(__WEBPACK_IMPORTED_MODULE_2_react__[\"Component\"]);\n\nThemeProvider.childContextTypes = (_ThemeProvider$childC = {}, _ThemeProvider$childC[CHANNEL] = __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.func, _ThemeProvider$childC[CHANNEL_NEXT] = CONTEXT_CHANNEL_SHAPE, _ThemeProvider$childC);\nThemeProvider.contextTypes = (_ThemeProvider$contex = {}, _ThemeProvider$contex[CHANNEL_NEXT] = CONTEXT_CHANNEL_SHAPE, _ThemeProvider$contex);\n\n// \n\n// HACK for generating all static styles without needing to allocate\n// an empty execution context every single time...\nvar STATIC_EXECUTION_CONTEXT = {};\n\nvar _StyledComponent = (function (ComponentStyle, constructWithOptions) {\n /* We depend on components having unique IDs */\n var identifiers = {};\n var generateId = function generateId(_displayName, parentComponentId) {\n var displayName = typeof _displayName !== 'string' ? 'sc' : escape(_displayName);\n\n var nr = (identifiers[displayName] || 0) + 1;\n identifiers[displayName] = nr;\n\n var hash = ComponentStyle.generateName(displayName + nr);\n var componentId = displayName + '-' + hash;\n return parentComponentId !== undefined ? parentComponentId + '-' + componentId : componentId;\n };\n\n var BaseStyledComponent = function (_Component) {\n inherits(BaseStyledComponent, _Component);\n\n function BaseStyledComponent() {\n var _temp, _this, _ret;\n\n classCallCheck(this, BaseStyledComponent);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _ret = (_temp = (_this = possibleConstructorReturn(this, _Component.call.apply(_Component, [this].concat(args))), _this), _this.attrs = {}, _this.state = {\n theme: null,\n generatedClassName: ''\n }, _this.unsubscribeId = -1, _temp), possibleConstructorReturn(_this, _ret);\n }\n\n BaseStyledComponent.prototype.unsubscribeFromContext = function unsubscribeFromContext() {\n if (this.unsubscribeId !== -1) {\n this.context[CHANNEL_NEXT].unsubscribe(this.unsubscribeId);\n }\n };\n\n BaseStyledComponent.prototype.buildExecutionContext = function buildExecutionContext(theme, props) {\n var attrs = this.constructor.attrs;\n\n var context = _extends({}, props, { theme: theme });\n if (attrs === undefined) {\n return context;\n }\n\n this.attrs = Object.keys(attrs).reduce(function (acc, key) {\n var attr = attrs[key];\n // eslint-disable-next-line no-param-reassign\n acc[key] = typeof attr === 'function' ? attr(context) : attr;\n return acc;\n }, {});\n\n return _extends({}, context, this.attrs);\n };\n\n BaseStyledComponent.prototype.generateAndInjectStyles = function generateAndInjectStyles(theme, props) {\n var _constructor = this.constructor,\n attrs = _constructor.attrs,\n componentStyle = _constructor.componentStyle,\n warnTooManyClasses = _constructor.warnTooManyClasses;\n\n var styleSheet = this.context[CONTEXT_KEY] || StyleSheet.instance;\n\n // staticaly styled-components don't need to build an execution context object,\n // and shouldn't be increasing the number of class names\n if (componentStyle.isStatic && attrs === undefined) {\n return componentStyle.generateAndInjectStyles(STATIC_EXECUTION_CONTEXT, styleSheet);\n } else {\n var executionContext = this.buildExecutionContext(theme, props);\n var className = componentStyle.generateAndInjectStyles(executionContext, styleSheet);\n\n if (process.env.NODE_ENV !== 'production' && warnTooManyClasses !== undefined) {\n warnTooManyClasses(className);\n }\n\n return className;\n }\n };\n\n BaseStyledComponent.prototype.componentWillMount = function componentWillMount() {\n var _this2 = this;\n\n var componentStyle = this.constructor.componentStyle;\n\n var styledContext = this.context[CHANNEL_NEXT];\n\n // If this is a staticaly-styled component, we don't need to the theme\n // to generate or build styles.\n if (componentStyle.isStatic) {\n var generatedClassName = this.generateAndInjectStyles(STATIC_EXECUTION_CONTEXT, this.props);\n this.setState({ generatedClassName: generatedClassName });\n // If there is a theme in the context, subscribe to the event emitter. This\n // is necessary due to pure components blocking context updates, this circumvents\n // that by updating when an event is emitted\n } else if (styledContext !== undefined) {\n var subscribe = styledContext.subscribe;\n\n this.unsubscribeId = subscribe(function (nextTheme) {\n // This will be called once immediately\n var theme = determineTheme(_this2.props, nextTheme, _this2.constructor.defaultProps);\n var generatedClassName = _this2.generateAndInjectStyles(theme, _this2.props);\n\n _this2.setState({ theme: theme, generatedClassName: generatedClassName });\n });\n } else {\n // eslint-disable-next-line react/prop-types\n var theme = this.props.theme || {};\n var _generatedClassName = this.generateAndInjectStyles(theme, this.props);\n this.setState({ theme: theme, generatedClassName: _generatedClassName });\n }\n };\n\n BaseStyledComponent.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {\n var _this3 = this;\n\n // If this is a staticaly-styled component, we don't need to listen to\n // props changes to update styles\n var componentStyle = this.constructor.componentStyle;\n\n if (componentStyle.isStatic) {\n return;\n }\n\n this.setState(function (oldState) {\n var theme = determineTheme(nextProps, oldState.theme, _this3.constructor.defaultProps);\n var generatedClassName = _this3.generateAndInjectStyles(theme, nextProps);\n\n return { theme: theme, generatedClassName: generatedClassName };\n });\n };\n\n BaseStyledComponent.prototype.componentWillUnmount = function componentWillUnmount() {\n this.unsubscribeFromContext();\n };\n\n BaseStyledComponent.prototype.render = function render() {\n var _this4 = this;\n\n // eslint-disable-next-line react/prop-types\n var innerRef = this.props.innerRef;\n var generatedClassName = this.state.generatedClassName;\n var _constructor2 = this.constructor,\n styledComponentId = _constructor2.styledComponentId,\n target = _constructor2.target;\n\n\n var isTargetTag = isTag(target);\n\n var className = [\n // eslint-disable-next-line react/prop-types\n this.props.className, styledComponentId, this.attrs.className, generatedClassName].filter(Boolean).join(' ');\n\n var baseProps = _extends({}, this.attrs, {\n className: className\n });\n\n if (isStyledComponent(target)) {\n baseProps.innerRef = innerRef;\n } else {\n baseProps.ref = innerRef;\n }\n\n var propsForElement = Object.keys(this.props).reduce(function (acc, propName) {\n // Don't pass through non HTML tags through to HTML elements\n // always omit innerRef\n if (propName !== 'innerRef' && propName !== 'className' && (!isTargetTag || validAttr(propName))) {\n // eslint-disable-next-line no-param-reassign\n acc[propName] = _this4.props[propName];\n }\n\n return acc;\n }, baseProps);\n\n return Object(__WEBPACK_IMPORTED_MODULE_2_react__[\"createElement\"])(target, propsForElement);\n };\n\n return BaseStyledComponent;\n }(__WEBPACK_IMPORTED_MODULE_2_react__[\"Component\"]);\n\n var createStyledComponent = function createStyledComponent(target, options, rules) {\n var _StyledComponent$cont;\n\n var _options$displayName = options.displayName,\n displayName = _options$displayName === undefined ? isTag(target) ? 'styled.' + target : 'Styled(' + getComponentName(target) + ')' : _options$displayName,\n _options$componentId = options.componentId,\n componentId = _options$componentId === undefined ? generateId(options.displayName, options.parentComponentId) : _options$componentId,\n _options$ParentCompon = options.ParentComponent,\n ParentComponent = _options$ParentCompon === undefined ? BaseStyledComponent : _options$ParentCompon,\n extendingRules = options.rules,\n attrs = options.attrs;\n\n\n var styledComponentId = options.displayName && options.componentId ? escape(options.displayName) + '-' + options.componentId : componentId;\n\n var componentStyle = new ComponentStyle(extendingRules === undefined ? rules : extendingRules.concat(rules), attrs, styledComponentId);\n\n var StyledComponent = function (_ParentComponent) {\n inherits(StyledComponent, _ParentComponent);\n\n function StyledComponent() {\n classCallCheck(this, StyledComponent);\n return possibleConstructorReturn(this, _ParentComponent.apply(this, arguments));\n }\n\n StyledComponent.withComponent = function withComponent(tag) {\n var previousComponentId = options.componentId,\n optionsToCopy = objectWithoutProperties(options, ['componentId']);\n\n\n var newComponentId = previousComponentId && previousComponentId + '-' + (isTag(tag) ? tag : escape(getComponentName(tag)));\n\n var newOptions = _extends({}, optionsToCopy, {\n componentId: newComponentId,\n ParentComponent: StyledComponent\n });\n\n return createStyledComponent(tag, newOptions, rules);\n };\n\n createClass(StyledComponent, null, [{\n key: 'extend',\n get: function get$$1() {\n var rulesFromOptions = options.rules,\n parentComponentId = options.componentId,\n optionsToCopy = objectWithoutProperties(options, ['rules', 'componentId']);\n\n\n var newRules = rulesFromOptions === undefined ? rules : rulesFromOptions.concat(rules);\n\n var newOptions = _extends({}, optionsToCopy, {\n rules: newRules,\n parentComponentId: parentComponentId,\n ParentComponent: StyledComponent\n });\n\n return constructWithOptions(createStyledComponent, target, newOptions);\n }\n }]);\n return StyledComponent;\n }(ParentComponent);\n\n StyledComponent.contextTypes = (_StyledComponent$cont = {}, _StyledComponent$cont[CHANNEL] = __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.func, _StyledComponent$cont[CHANNEL_NEXT] = CONTEXT_CHANNEL_SHAPE, _StyledComponent$cont[CONTEXT_KEY] = __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.oneOfType([__WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.instanceOf(StyleSheet), __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.instanceOf(ServerStyleSheet)]), _StyledComponent$cont);\n StyledComponent.displayName = displayName;\n StyledComponent.styledComponentId = styledComponentId;\n StyledComponent.attrs = attrs;\n StyledComponent.componentStyle = componentStyle;\n StyledComponent.target = target;\n\n\n if (process.env.NODE_ENV !== 'production') {\n StyledComponent.warnTooManyClasses = createWarnTooManyClasses(displayName);\n }\n\n return StyledComponent;\n };\n\n return createStyledComponent;\n});\n\n// murmurhash2 via https://gist.github.com/raycmorgan/588423\n\nfunction doHash(str, seed) {\n var m = 0x5bd1e995;\n var r = 24;\n var h = seed ^ str.length;\n var length = str.length;\n var currentIndex = 0;\n\n while (length >= 4) {\n var k = UInt32(str, currentIndex);\n\n k = Umul32(k, m);\n k ^= k >>> r;\n k = Umul32(k, m);\n\n h = Umul32(h, m);\n h ^= k;\n\n currentIndex += 4;\n length -= 4;\n }\n\n switch (length) {\n case 3:\n h ^= UInt16(str, currentIndex);\n h ^= str.charCodeAt(currentIndex + 2) << 16;\n h = Umul32(h, m);\n break;\n\n case 2:\n h ^= UInt16(str, currentIndex);\n h = Umul32(h, m);\n break;\n\n case 1:\n h ^= str.charCodeAt(currentIndex);\n h = Umul32(h, m);\n break;\n }\n\n h ^= h >>> 13;\n h = Umul32(h, m);\n h ^= h >>> 15;\n\n return h >>> 0;\n}\n\nfunction UInt32(str, pos) {\n return str.charCodeAt(pos++) + (str.charCodeAt(pos++) << 8) + (str.charCodeAt(pos++) << 16) + (str.charCodeAt(pos) << 24);\n}\n\nfunction UInt16(str, pos) {\n return str.charCodeAt(pos++) + (str.charCodeAt(pos++) << 8);\n}\n\nfunction Umul32(n, m) {\n n = n | 0;\n m = m | 0;\n var nlo = n & 0xffff;\n var nhi = n >>> 16;\n var res = nlo * m + ((nhi * m & 0xffff) << 16) | 0;\n return res;\n}\n\n// \nvar isStaticRules = function isStaticRules(rules, attrs) {\n for (var i = 0; i < rules.length; i += 1) {\n var rule = rules[i];\n\n // recursive case\n if (Array.isArray(rule) && !isStaticRules(rule)) {\n return false;\n } else if (typeof rule === 'function' && !isStyledComponent(rule)) {\n // functions are allowed to be static if they're just being\n // used to get the classname of a nested styled copmonent\n return false;\n }\n }\n\n if (attrs !== undefined) {\n // eslint-disable-next-line guard-for-in, no-restricted-syntax\n for (var key in attrs) {\n var value = attrs[key];\n if (typeof value === 'function') {\n return false;\n }\n }\n }\n\n return true;\n};\n\nvar isHRMEnabled = typeof module !== 'undefined' && module.hot && process.env.NODE_ENV !== 'production';\n\n/*\n ComponentStyle is all the CSS-specific stuff, not\n the React-specific stuff.\n */\nvar _ComponentStyle = (function (nameGenerator, flatten, stringifyRules) {\n var ComponentStyle = function () {\n function ComponentStyle(rules, attrs, componentId) {\n classCallCheck(this, ComponentStyle);\n\n this.rules = rules;\n this.isStatic = !isHRMEnabled && isStaticRules(rules, attrs);\n this.componentId = componentId;\n if (!StyleSheet.instance.hasInjectedComponent(this.componentId)) {\n var placeholder = process.env.NODE_ENV !== 'production' ? '.' + componentId + ' {}' : '';\n StyleSheet.instance.deferredInject(componentId, true, placeholder);\n }\n }\n\n /*\n * Flattens a rule set into valid CSS\n * Hashes it, wraps the whole chunk in a .hash1234 {}\n * Returns the hash to be injected on render()\n * */\n\n\n ComponentStyle.prototype.generateAndInjectStyles = function generateAndInjectStyles(executionContext, styleSheet) {\n var isStatic = this.isStatic,\n lastClassName = this.lastClassName;\n\n if (isStatic && lastClassName !== undefined) {\n return lastClassName;\n }\n\n var flatCSS = flatten(this.rules, executionContext);\n var hash = doHash(this.componentId + flatCSS.join(''));\n\n var existingName = styleSheet.getName(hash);\n if (existingName !== undefined) {\n if (styleSheet.stylesCacheable) {\n this.lastClassName = existingName;\n }\n return existingName;\n }\n\n var name = nameGenerator(hash);\n if (styleSheet.stylesCacheable) {\n this.lastClassName = existingName;\n }\n if (styleSheet.alreadyInjected(hash, name)) {\n return name;\n }\n\n var css = '\\n' + stringifyRules(flatCSS, '.' + name);\n // NOTE: this can only be set when we inject the class-name.\n // For some reason, presumably due to how css is stringifyRules behaves in\n // differently between client and server, styles break.\n styleSheet.inject(this.componentId, true, css, hash, name);\n return name;\n };\n\n ComponentStyle.generateName = function generateName(str) {\n return nameGenerator(doHash(str));\n };\n\n return ComponentStyle;\n }();\n\n return ComponentStyle;\n});\n\n// \n// Thanks to ReactDOMFactories for this handy list!\n\nvar domElements = ['a', 'abbr', 'address', 'area', 'article', 'aside', 'audio', 'b', 'base', 'bdi', 'bdo', 'big', 'blockquote', 'body', 'br', 'button', 'canvas', 'caption', 'cite', 'code', 'col', 'colgroup', 'data', 'datalist', 'dd', 'del', 'details', 'dfn', 'dialog', 'div', 'dl', 'dt', 'em', 'embed', 'fieldset', 'figcaption', 'figure', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'i', 'iframe', 'img', 'input', 'ins', 'kbd', 'keygen', 'label', 'legend', 'li', 'link', 'main', 'map', 'mark', 'marquee', 'menu', 'menuitem', 'meta', 'meter', 'nav', 'noscript', 'object', 'ol', 'optgroup', 'option', 'output', 'p', 'param', 'picture', 'pre', 'progress', 'q', 'rp', 'rt', 'ruby', 's', 'samp', 'script', 'section', 'select', 'small', 'source', 'span', 'strong', 'style', 'sub', 'summary', 'sup', 'table', 'tbody', 'td', 'textarea', 'tfoot', 'th', 'thead', 'time', 'title', 'tr', 'track', 'u', 'ul', 'var', 'video', 'wbr',\n\n// SVG\n'circle', 'clipPath', 'defs', 'ellipse', 'g', 'image', 'line', 'linearGradient', 'mask', 'path', 'pattern', 'polygon', 'polyline', 'radialGradient', 'rect', 'stop', 'svg', 'text', 'tspan'];\n\n// \n\nvar _styled = (function (styledComponent, constructWithOptions) {\n var styled = function styled(tag) {\n return constructWithOptions(styledComponent, tag);\n };\n\n // Shorthands for all valid HTML Elements\n domElements.forEach(function (domElement) {\n styled[domElement] = styled(domElement);\n });\n\n return styled;\n});\n\n// \nvar replaceWhitespace = function replaceWhitespace(str) {\n return str.replace(/\\s|\\\\n/g, '');\n};\n\nvar _keyframes = (function (nameGenerator, stringifyRules, css) {\n return function (strings) {\n for (var _len = arguments.length, interpolations = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n interpolations[_key - 1] = arguments[_key];\n }\n\n var rules = css.apply(undefined, [strings].concat(interpolations));\n var hash = doHash(replaceWhitespace(JSON.stringify(rules)));\n\n var existingName = StyleSheet.instance.getName(hash);\n if (existingName) return existingName;\n\n var name = nameGenerator(hash);\n if (StyleSheet.instance.alreadyInjected(hash, name)) return name;\n\n var generatedCSS = stringifyRules(rules, name, '@keyframes');\n StyleSheet.instance.inject('sc-keyframes-' + name, true, generatedCSS, hash, name);\n return name;\n };\n});\n\n// \nvar _injectGlobal = (function (stringifyRules, css) {\n var injectGlobal = function injectGlobal(strings) {\n for (var _len = arguments.length, interpolations = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n interpolations[_key - 1] = arguments[_key];\n }\n\n var rules = css.apply(undefined, [strings].concat(interpolations));\n var hash = doHash(JSON.stringify(rules));\n\n var componentId = 'sc-global-' + hash;\n if (StyleSheet.instance.hasInjectedComponent(componentId)) return;\n\n StyleSheet.instance.inject(componentId, false, stringifyRules(rules));\n };\n\n return injectGlobal;\n});\n\n// \n\n\nvar _constructWithOptions = (function (css) {\n var constructWithOptions = function constructWithOptions(componentConstructor, tag) {\n var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n\n if (process.env.NODE_ENV !== 'production' && typeof tag !== 'string' && typeof tag !== 'function') {\n // $FlowInvalidInputTest\n throw new Error('Cannot create styled-component for component: ' + tag);\n }\n\n /* This is callable directly as a template function */\n var templateFunction = function templateFunction(strings) {\n for (var _len = arguments.length, interpolations = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n interpolations[_key - 1] = arguments[_key];\n }\n\n return componentConstructor(tag, options, css.apply(undefined, [strings].concat(interpolations)));\n };\n\n /* If config methods are called, wrap up a new template function and merge options */\n templateFunction.withConfig = function (config) {\n return constructWithOptions(componentConstructor, tag, _extends({}, options, config));\n };\n templateFunction.attrs = function (attrs) {\n return constructWithOptions(componentConstructor, tag, _extends({}, options, {\n attrs: _extends({}, options.attrs || {}, attrs)\n }));\n };\n\n return templateFunction;\n };\n\n return constructWithOptions;\n});\n\n// \n/* globals ReactClass */\n\nvar wrapWithTheme = function wrapWithTheme(Component$$1) {\n var _WithTheme$contextTyp;\n\n var componentName = Component$$1.displayName || Component$$1.name || 'Component';\n\n var shouldSetInnerRef = isStyledComponent(Component$$1) ||\n // NOTE: We can't pass a ref to a stateless functional component\n typeof Component$$1 === 'function' && !(Component$$1.prototype && 'isReactComponent' in Component$$1.prototype);\n\n var WithTheme = function (_React$Component) {\n inherits(WithTheme, _React$Component);\n\n function WithTheme() {\n var _temp, _this, _ret;\n\n classCallCheck(this, WithTheme);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _ret = (_temp = (_this = possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.state = {}, _this.unsubscribeId = -1, _temp), possibleConstructorReturn(_this, _ret);\n }\n\n // NOTE: This is so that isStyledComponent passes for the innerRef unwrapping\n\n\n WithTheme.prototype.componentWillMount = function componentWillMount() {\n var _this2 = this;\n\n var defaultProps = this.constructor.defaultProps;\n\n var styledContext = this.context[CHANNEL_NEXT];\n var themeProp = determineTheme(this.props, undefined, defaultProps);\n if (styledContext === undefined && themeProp === undefined && process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line no-console\n console.warn('[withTheme] You are not using a ThemeProvider nor passing a theme prop or a theme in defaultProps');\n } else if (styledContext === undefined && themeProp !== undefined) {\n this.setState({ theme: themeProp });\n } else {\n var subscribe = styledContext.subscribe;\n\n this.unsubscribeId = subscribe(function (nextTheme) {\n var theme = determineTheme(_this2.props, nextTheme, defaultProps);\n _this2.setState({ theme: theme });\n });\n }\n };\n\n WithTheme.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {\n var defaultProps = this.constructor.defaultProps;\n\n this.setState(function (oldState) {\n var theme = determineTheme(nextProps, oldState.theme, defaultProps);\n\n return { theme: theme };\n });\n };\n\n WithTheme.prototype.componentWillUnmount = function componentWillUnmount() {\n if (this.unsubscribeId !== -1) {\n this.context[CHANNEL_NEXT].unsubscribe(this.unsubscribeId);\n }\n };\n\n WithTheme.prototype.render = function render() {\n // eslint-disable-next-line react/prop-types\n var innerRef = this.props.innerRef;\n var theme = this.state.theme;\n\n\n return __WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement(Component$$1, _extends({\n theme: theme\n }, this.props, {\n innerRef: shouldSetInnerRef ? innerRef : undefined,\n ref: shouldSetInnerRef ? undefined : innerRef\n }));\n };\n\n return WithTheme;\n }(__WEBPACK_IMPORTED_MODULE_2_react___default.a.Component);\n\n WithTheme.displayName = 'WithTheme(' + componentName + ')';\n WithTheme.styledComponentId = 'withTheme';\n WithTheme.contextTypes = (_WithTheme$contextTyp = {}, _WithTheme$contextTyp[CHANNEL] = __WEBPACK_IMPORTED_MODULE_3_prop_types___default.a.func, _WithTheme$contextTyp[CHANNEL_NEXT] = CONTEXT_CHANNEL_SHAPE, _WithTheme$contextTyp);\n\n\n return __WEBPACK_IMPORTED_MODULE_4_hoist_non_react_statics___default()(WithTheme, Component$$1);\n};\n\n// \n\n/* Import singletons */\n/* Import singleton constructors */\n/* Import components */\n/* Import Higher Order Components */\n/* Instantiate singletons */\nvar ComponentStyle = _ComponentStyle(generateAlphabeticName, flatten, stringifyRules);\nvar constructWithOptions = _constructWithOptions(css);\nvar StyledComponent = _StyledComponent(ComponentStyle, constructWithOptions);\n\n/* Instantiate exported singletons */\nvar keyframes = _keyframes(generateAlphabeticName, stringifyRules, css);\nvar injectGlobal = _injectGlobal(stringifyRules, css);\nvar styled = _styled(StyledComponent, constructWithOptions);\n\n/* harmony default export */ __webpack_exports__[\"default\"] = (styled);\n\n/* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(\"../node_modules/process/browser.js\"), __webpack_require__(\"../node_modules/webpack/buildin/harmony-module.js\")(module)))//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi4vbm9kZV9tb2R1bGVzL3N0eWxlZC1jb21wb25lbnRzL2Rpc3Qvc3R5bGVkLWNvbXBvbmVudHMuZXMuanMuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi4vbm9kZV9tb2R1bGVzL3N0eWxlZC1jb21wb25lbnRzL2Rpc3Qvc3R5bGVkLWNvbXBvbmVudHMuZXMuanM/NWY5YyJdLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgaXNQbGFpbk9iamVjdCBmcm9tICdpcy1wbGFpbi1vYmplY3QnO1xuaW1wb3J0IFN0eWxpcyBmcm9tICdzdHlsaXMnO1xuaW1wb3J0IFJlYWN0LCB7IENvbXBvbmVudCwgY3JlYXRlRWxlbWVudCB9IGZyb20gJ3JlYWN0JztcbmltcG9ydCBQcm9wVHlwZXMgZnJvbSAncHJvcC10eXBlcyc7XG5pbXBvcnQgaG9pc3RTdGF0aWNzI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7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7QSIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///../node_modules/styled-components/dist/styled-components.es.js\n"); /***/ }), -/***/ "./Uncontrolled.jsx": +/***/ "../node_modules/stylis/stylis.js": /***/ (function(module, exports, __webpack_require__) { -"use strict"; +eval("/*\n * __ ___\n * _____/ /___ __/ (_)____\n * / ___/ __/ / / / / / ___/\n * (__ ) /_/ /_/ / / (__ )\n * /____/\\__/\\__, /_/_/____/\n * /____/\n *\n * light - weight css preprocessor @licence MIT\n */\n(function (factory) {/* eslint-disable */\n\t true ? (module['exports'] = factory(null)) :\n\t\ttypeof define === 'function' && define['amd'] ? define(factory(null)) :\n\t\t\t(window['stylis'] = factory(null))\n}(/** @param {*=} options */function factory (options) {/* eslint-disable */\n\n\t'use strict'\n\n\t/**\n\t * Notes\n\t *\n\t * The [''] pattern is used to support closure compiler\n\t * the jsdoc signatures are also used to the same effect\n\t *\n\t * ----\n\t *\n\t * int + int + int === n4 [faster]\n\t *\n\t * vs\n\t *\n\t * int === n1 && int === n2 && int === n3\n\t *\n\t * ----\n\t *\n\t * switch (int) { case ints...} [faster]\n\t *\n\t * vs\n\t *\n\t * if (int == 1 && int === 2 ...)\n\t *\n\t * ----\n\t *\n\t * The (first*n1 + second*n2 + third*n3) format used in the property parser\n\t * is a simple way to hash the sequence of characters\n\t * taking into account the index they occur in\n\t * since any number of 3 character sequences could produce duplicates.\n\t *\n\t * On the other hand sequences that are directly tied to the index of the character\n\t * resolve a far more accurate measure, it's also faster\n\t * to evaluate one condition in a switch statement\n\t * than three in an if statement regardless of the added math.\n\t *\n\t * This allows the vendor prefixer to be both small and fast.\n\t */\n\n\tvar nullptn = /^\\0+/g /* matches leading null characters */\n\tvar formatptn = /[\\0\\r\\f]/g /* matches new line, null and formfeed characters */\n\tvar colonptn = /: */g /* splits animation rules */\n\tvar cursorptn = /zoo|gra/ /* assert cursor varient */\n\tvar transformptn = /([,: ])(transform)/g /* vendor prefix transform, older webkit */\n\tvar animationptn = /,+\\s*(?![^(]*[)])/g /* splits multiple shorthand notation animations */\n\tvar propertiesptn = / +\\s*(?![^(]*[)])/g /* animation properties */\n\tvar elementptn = / *[\\0] */g /* selector elements */\n\tvar selectorptn = /,\\r+?/g /* splits selectors */\n\tvar andptn = /([\\t\\r\\n ])*\\f?&/g /* match & */\n\tvar escapeptn = /:global\\(((?:[^\\(\\)\\[\\]]*|\\[.*\\]|\\([^\\(\\)]*\\))*)\\)/g /* matches :global(.*) */\n\tvar invalidptn = /\\W+/g /* removes invalid characters from keyframes */\n\tvar keyframeptn = /@(k\\w+)\\s*(\\S*)\\s*/ /* matches @keyframes $1 */\n\tvar plcholdrptn = /::(place)/g /* match ::placeholder varient */\n\tvar readonlyptn = /:(read-only)/g /* match :read-only varient */\n\tvar beforeptn = /\\s+(?=[{\\];=:>])/g /* matches \\s before ] ; = : */\n\tvar afterptn = /([[}=:>])\\s+/g /* matches \\s after characters [ } = : */\n\tvar tailptn = /(\\{[^{]+?);(?=\\})/g /* matches tail semi-colons ;} */\n\tvar whiteptn = /\\s{2,}/g /* matches repeating whitespace */\n\tvar pseudoptn = /([^\\(])(:+) */g /* pseudo element */\n\tvar writingptn = /[svh]\\w+-[tblr]{2}/ /* match writing mode property values */\n\tvar gradientptn = /([\\w-]+t\\()/g /* match *gradient property */\n\tvar supportsptn = /\\(\\s*(.*)\\s*\\)/g /* match supports (groups) */\n\tvar propertyptn = /([^]*?);/g /* match properties leading semicolon */\n\tvar selfptn = /-self|flex-/g /* match flex- and -self in align-self: flex-*; */\n\tvar pseudofmt = /[^]*?(:[rp][el]a[\\w-]+)[^]*/ /* extrats :readonly or :placholder from selector */\n\tvar trimptn = /[ \\t]+$/ /* match tail whitspace */\n\n\t/* vendors */\n\tvar webkit = '-webkit-'\n\tvar moz = '-moz-'\n\tvar ms = '-ms-'\n\n\t/* character codes */\n\tvar SEMICOLON = 59 /* ; */\n\tvar CLOSEBRACES = 125 /* } */\n\tvar OPENBRACES = 123 /* { */\n\tvar OPENPARENTHESES = 40 /* ( */\n\tvar CLOSEPARENTHESES = 41 /* ) */\n\tvar OPENBRACKET = 91 /* [ */\n\tvar CLOSEBRACKET = 93 /* ] */\n\tvar NEWLINE = 10 /* \\n */\n\tvar CARRIAGE = 13 /* \\r */\n\tvar TAB = 9 /* \\t */\n\tvar AT = 64 /* @ */\n\tvar SPACE = 32 /* */\n\tvar AND = 38 /* & */\n\tvar DASH = 45 /* - */\n\tvar UNDERSCORE = 95 /* _ */\n\tvar STAR = 42 /* * */\n\tvar COMMA = 44 /* , */\n\tvar COLON = 58 /* : */\n\tvar SINGLEQUOTE = 39 /* ' */\n\tvar DOUBLEQUOTE = 34 /* \" */\n\tvar FOWARDSLASH = 47 /* / */\n\tvar GREATERTHAN = 62 /* > */\n\tvar PLUS = 43 /* + */\n\tvar TILDE = 126 /* ~ */\n\tvar NULL = 0 /* \\0 */\n\tvar FORMFEED = 12 /* \\f */\n\tvar VERTICALTAB = 11 /* \\v */\n\n\t/* special identifiers */\n\tvar KEYFRAME = 107 /* k */\n\tvar MEDIA = 109 /* m */\n\tvar SUPPORTS = 115 /* s */\n\tvar PLACEHOLDER = 112 /* p */\n\tvar READONLY = 111 /* o */\n\tvar IMPORT = 169 /* i */\n\tvar CHARSET = 163 /* c */\n\tvar DOCUMENT = 100 /* d */\n\tvar PAGE = 112 /* p */\n\n\tvar column = 1 /* current column */\n\tvar line = 1 /* current line numebr */\n\tvar pattern = 0 /* :pattern */\n\n\tvar cascade = 1 /* #id h1 h2 vs h1#id h2#id */\n\tvar prefix = 1 /* vendor prefix */\n\tvar escape = 1 /* escape :global() pattern */\n\tvar compress = 0 /* compress output */\n\tvar semicolon = 0 /* no/semicolon option */\n\tvar preserve = 0 /* preserve empty selectors */\n\n\t/* empty reference */\n\tvar array = []\n\n\t/* plugins */\n\tvar plugins = []\n\tvar plugged = 0\n\tvar should = null\n\n\t/* plugin context */\n\tvar POSTS = -2\n\tvar PREPS = -1\n\tvar UNKWN = 0\n\tvar PROPS = 1\n\tvar BLCKS = 2\n\tvar ATRUL = 3\n\n\t/* plugin newline context */\n\tvar unkwn = 0\n\n\t/* keyframe animation */\n\tvar keyed = 1\n\tvar key = ''\n\n\t/* selector namespace */\n\tvar nscopealt = ''\n\tvar nscope = ''\n\n\t/**\n\t * Compile\n\t *\n\t * @param {Array} parent\n\t * @param {Array} current\n\t * @param {string} body\n\t * @param {number} id\n\t * @param {number} depth\n\t * @return {string}\n\t */\n\tfunction compile (parent, current, body, id, depth) {\n\t\tvar bracket = 0 /* brackets [] */\n\t\tvar comment = 0 /* comments /* // or /* */\n\t\tvar parentheses = 0 /* functions () */\n\t\tvar quote = 0 /* quotes '', \"\" */\n\n\t\tvar first = 0 /* first character code */\n\t\tvar second = 0 /* second character code */\n\t\tvar code = 0 /* current character code */\n\t\tvar tail = 0 /* previous character code */\n\t\tvar trail = 0 /* character before previous code */\n\t\tvar peak = 0 /* previous non-whitespace code */\n\n\t\tvar counter = 0 /* count sequence termination */\n\t\tvar context = 0 /* track current context */\n\t\tvar atrule = 0 /* track @at-rule context */\n\t\tvar pseudo = 0 /* track pseudo token index */\n\t\tvar caret = 0 /* current character index */\n\t\tvar format = 0 /* control character formating context */\n\t\tvar insert = 0 /* auto semicolon insertion */\n\t\tvar invert = 0 /* inverted selector pattern */\n\t\tvar length = 0 /* generic length address */\n\t\tvar eof = body.length /* end of file(length) */\n\t\tvar eol = eof - 1 /* end of file(characters) */\n\n\t\tvar char = '' /* current character */\n\t\tvar chars = '' /* current buffer of characters */\n\t\tvar child = '' /* next buffer of characters */\n\t\tvar out = '' /* compiled body */\n\t\tvar children = '' /* compiled children */\n\t\tvar flat = '' /* compiled leafs */\n\t\tvar selector /* generic selector address */\n\t\tvar result /* generic address */\n\n\t\t// ...build body\n\t\twhile (caret < eof) {\n\t\t\tcode = body.charCodeAt(caret)\n\n\t\t\t// eof varient\n\t\t\tif (caret === eol) {\n\t\t\t\t// last character + noop context, add synthetic padding for noop context to terminate\n\t\t\t\tif (comment + quote + parentheses + bracket !== 0) {\n\t\t\t\t\tif (comment !== 0) {\n\t\t\t\t\t\tcode = comment === FOWARDSLASH ? NEWLINE : FOWARDSLASH\n\t\t\t\t\t}\n\n\t\t\t\t\tquote = parentheses = bracket = 0\n\t\t\t\t\teof++\n\t\t\t\t\teol++\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (comment + quote + parentheses + bracket === 0) {\n\t\t\t\t// eof varient\n\t\t\t\tif (caret === eol) {\n\t\t\t\t\tif (format > 0) {\n\t\t\t\t\t\tchars = chars.replace(formatptn, '')\n\t\t\t\t\t}\n\n\t\t\t\t\tif (chars.trim().length > 0) {\n\t\t\t\t\t\tswitch (code) {\n\t\t\t\t\t\t\tcase SPACE:\n\t\t\t\t\t\t\tcase TAB:\n\t\t\t\t\t\t\tcase SEMICOLON:\n\t\t\t\t\t\t\tcase CARRIAGE:\n\t\t\t\t\t\t\tcase NEWLINE: {\n\t\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tdefault: {\n\t\t\t\t\t\t\t\tchars += body.charAt(caret)\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tcode = SEMICOLON\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// auto semicolon insertion\n\t\t\t\tif (insert === 1) {\n\t\t\t\t\tswitch (code) {\n\t\t\t\t\t\t// false flags\n\t\t\t\t\t\tcase OPENBRACES:\n\t\t\t\t\t\tcase CLOSEBRACES:\n\t\t\t\t\t\tcase SEMICOLON:\n\t\t\t\t\t\tcase DOUBLEQUOTE:\n\t\t\t\t\t\tcase SINGLEQUOTE:\n\t\t\t\t\t\tcase OPENPARENTHESES:\n\t\t\t\t\t\tcase CLOSEPARENTHESES:\n\t\t\t\t\t\tcase COMMA: {\n\t\t\t\t\t\t\tinsert = 0\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// ignore\n\t\t\t\t\t\tcase TAB:\n\t\t\t\t\t\tcase CARRIAGE:\n\t\t\t\t\t\tcase NEWLINE:\n\t\t\t\t\t\tcase SPACE: {\n\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// valid\n\t\t\t\t\t\tdefault: {\n\t\t\t\t\t\t\tinsert = 0\n\t\t\t\t\t\t\tlength = caret\n\t\t\t\t\t\t\tfirst = code\n\t\t\t\t\t\t\tcaret--\n\t\t\t\t\t\t\tcode = SEMICOLON\n\n\t\t\t\t\t\t\twhile (length < eof) {\n\t\t\t\t\t\t\t\tswitch (body.charCodeAt(++length)) {\n\t\t\t\t\t\t\t\t\tcase NEWLINE:\n\t\t\t\t\t\t\t\t\tcase CARRIAGE:\n\t\t\t\t\t\t\t\t\tcase SEMICOLON: {\n\t\t\t\t\t\t\t\t\t\tcaret++\n\t\t\t\t\t\t\t\t\t\tcode = first\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tcase COLON:\n\t\t\t\t\t\t\t\t\tcase OPENBRACES: {\n\t\t\t\t\t\t\t\t\t\tlength = eof\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// token varient\n\t\t\t\tswitch (code) {\n\t\t\t\t\tcase OPENBRACES: {\n\t\t\t\t\t\tchars = chars.trim()\n\t\t\t\t\t\tfirst = chars.charCodeAt(0)\n\t\t\t\t\t\tcounter = 1\n\t\t\t\t\t\tlength = ++caret\n\n\t\t\t\t\t\twhile (caret < eof) {\n\t\t\t\t\t\t\tcode = body.charCodeAt(caret)\n\n\t\t\t\t\t\t\tswitch (code) {\n\t\t\t\t\t\t\t\tcase OPENBRACES: {\n\t\t\t\t\t\t\t\t\tcounter++\n\t\t\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tcase CLOSEBRACES: {\n\t\t\t\t\t\t\t\t\tcounter--\n\t\t\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif (counter === 0) {\n\t\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tcaret++\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tchild = body.substring(length, caret)\n\n\t\t\t\t\t\tif (first === NULL) {\n\t\t\t\t\t\t\tfirst = (chars = chars.replace(nullptn, '').trim()).charCodeAt(0)\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tswitch (first) {\n\t\t\t\t\t\t\t// @at-rule\n\t\t\t\t\t\t\tcase AT: {\n\t\t\t\t\t\t\t\tif (format > 0) {\n\t\t\t\t\t\t\t\t\tchars = chars.replace(formatptn, '')\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tsecond = chars.charCodeAt(1)\n\n\t\t\t\t\t\t\t\tswitch (second) {\n\t\t\t\t\t\t\t\t\tcase DOCUMENT:\n\t\t\t\t\t\t\t\t\tcase MEDIA:\n\t\t\t\t\t\t\t\t\tcase SUPPORTS:\n\t\t\t\t\t\t\t\t\tcase DASH: {\n\t\t\t\t\t\t\t\t\t\tselector = current\n\t\t\t\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tdefault: {\n\t\t\t\t\t\t\t\t\t\tselector = array\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tchild = compile(current, selector, child, second, depth+1)\n\t\t\t\t\t\t\t\tlength = child.length\n\n\t\t\t\t\t\t\t\t// preserve empty @at-rule\n\t\t\t\t\t\t\t\tif (preserve > 0 && length === 0) {\n\t\t\t\t\t\t\t\t\tlength = chars.length\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t// execute plugins, @at-rule context\n\t\t\t\t\t\t\t\tif (plugged > 0) {\n\t\t\t\t\t\t\t\t\tselector = select(array, chars, invert)\n\t\t\t\t\t\t\t\t\tresult = proxy(ATRUL, child, selector, current, line, column, length, second, depth)\n\t\t\t\t\t\t\t\t\tchars = selector.join('')\n\n\t\t\t\t\t\t\t\t\tif (result !== void 0) {\n\t\t\t\t\t\t\t\t\t\tif ((length = (child = result.trim()).length) === 0) {\n\t\t\t\t\t\t\t\t\t\t\tsecond = 0\n\t\t\t\t\t\t\t\t\t\t\tchild = ''\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tif (length > 0) {\n\t\t\t\t\t\t\t\t\tswitch (second) {\n\t\t\t\t\t\t\t\t\t\tcase SUPPORTS: {\n\t\t\t\t\t\t\t\t\t\t\tchars = chars.replace(supportsptn, supports)\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tcase DOCUMENT:\n\t\t\t\t\t\t\t\t\t\tcase MEDIA:\n\t\t\t\t\t\t\t\t\t\tcase DASH: {\n\t\t\t\t\t\t\t\t\t\t\tchild = chars + '{' + child + '}'\n\t\t\t\t\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tcase KEYFRAME: {\n\t\t\t\t\t\t\t\t\t\t\tchars = chars.replace(keyframeptn, '$1 $2' + (keyed > 0 ? key : ''))\n\t\t\t\t\t\t\t\t\t\t\tchild = chars + '{' + child + '}'\n\n\t\t\t\t\t\t\t\t\t\t\tif (prefix === 1 || (prefix === 2 && vendor('@'+child, 3))) {\n\t\t\t\t\t\t\t\t\t\t\t\tchild = '@' + webkit + child + '@' + child\n\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\tchild = '@' + child\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tdefault: {\n\t\t\t\t\t\t\t\t\t\t\tchild = chars + child\n\n\t\t\t\t\t\t\t\t\t\t\tif (id === PAGE) {\n\t\t\t\t\t\t\t\t\t\t\t\tchild = (out += child, '')\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tchild = ''\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t// selector\n\t\t\t\t\t\t\tdefault: {\n\t\t\t\t\t\t\t\tchild = compile(current, select(current, chars, invert), child, id, depth+1)\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tchildren += child\n\n\t\t\t\t\t\t// reset\n\t\t\t\t\t\tcontext = 0\n\t\t\t\t\t\tinsert = 0\n\t\t\t\t\t\tpseudo = 0\n\t\t\t\t\t\tformat = 0\n\t\t\t\t\t\tinvert = 0\n\t\t\t\t\t\tatrule = 0\n\t\t\t\t\t\tchars = ''\n\t\t\t\t\t\tchild = ''\n\t\t\t\t\t\tcode = body.charCodeAt(++caret)\n\t\t\t\t\t\tbreak\n\t\t\t\t\t}\n\t\t\t\t\tcase CLOSEBRACES:\n\t\t\t\t\tcase SEMICOLON: {\n\t\t\t\t\t\tchars = (format > 0 ? chars.replace(formatptn, '') : chars).trim()\n\n\t\t\t\t\t\tif ((length = chars.length) > 1) {\n\t\t\t\t\t\t\t// monkey-patch missing colon\n\t\t\t\t\t\t\tif (pseudo === 0) {\n\t\t\t\t\t\t\t\tfirst = chars.charCodeAt(0)\n\n\t\t\t\t\t\t\t\t// first character is a letter or dash, buffer has a space character\n\t\t\t\t\t\t\t\tif ((first === DASH || first > 96 && first < 123)) {\n\t\t\t\t\t\t\t\t\tlength = (chars = chars.replace(' ', ':')).length\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// execute plugins, property context\n\t\t\t\t\t\t\tif (plugged > 0) {\n\t\t\t\t\t\t\t\tif ((result = proxy(PROPS, chars, current, parent, line, column, out.length, id, depth)) !== void 0) {\n\t\t\t\t\t\t\t\t\tif ((length = (chars = result.trim()).length) === 0) {\n\t\t\t\t\t\t\t\t\t\tchars = '\\0\\0'\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tfirst = chars.charCodeAt(0)\n\t\t\t\t\t\t\tsecond = chars.charCodeAt(1)\n\n\t\t\t\t\t\t\tswitch (first + second) {\n\t\t\t\t\t\t\t\tcase NULL: {\n\t\t\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tcase IMPORT:\n\t\t\t\t\t\t\t\tcase CHARSET: {\n\t\t\t\t\t\t\t\t\tflat += chars + body.charAt(caret)\n\t\t\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tdefault: {\n\t\t\t\t\t\t\t\t\tif (chars.charCodeAt(length-1) === COLON)\n\t\t\t\t\t\t\t\t\t\tbreak\n\n\t\t\t\t\t\t\t\t\tout += property(chars, first, second, chars.charCodeAt(2))\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// reset\n\t\t\t\t\t\tcontext = 0\n\t\t\t\t\t\tinsert = 0\n\t\t\t\t\t\tpseudo = 0\n\t\t\t\t\t\tformat = 0\n\t\t\t\t\t\tinvert = 0\n\t\t\t\t\t\tchars = ''\n\t\t\t\t\t\tcode = body.charCodeAt(++caret)\n\t\t\t\t\t\tbreak\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// parse characters\n\t\t\tswitch (code) {\n\t\t\t\tcase CARRIAGE:\n\t\t\t\tcase NEWLINE: {\n\t\t\t\t\t// auto insert semicolon\n\t\t\t\t\tif (comment + quote + parentheses + bracket + semicolon === 0) {\n\t\t\t\t\t\t// valid non-whitespace characters that\n\t\t\t\t\t\t// may precede a newline\n\t\t\t\t\t\tswitch (peak) {\n\t\t\t\t\t\t\tcase CLOSEPARENTHESES:\n\t\t\t\t\t\t\tcase SINGLEQUOTE:\n\t\t\t\t\t\t\tcase DOUBLEQUOTE:\n\t\t\t\t\t\t\tcase AT:\n\t\t\t\t\t\t\tcase TILDE:\n\t\t\t\t\t\t\tcase GREATERTHAN:\n\t\t\t\t\t\t\tcase STAR:\n\t\t\t\t\t\t\tcase PLUS:\n\t\t\t\t\t\t\tcase FOWARDSLASH:\n\t\t\t\t\t\t\tcase DASH:\n\t\t\t\t\t\t\tcase COLON:\n\t\t\t\t\t\t\tcase COMMA:\n\t\t\t\t\t\t\tcase SEMICOLON:\n\t\t\t\t\t\t\tcase OPENBRACES:\n\t\t\t\t\t\t\tcase CLOSEBRACES: {\n\t\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tdefault: {\n\t\t\t\t\t\t\t\t// current buffer has a colon\n\t\t\t\t\t\t\t\tif (pseudo > 0) {\n\t\t\t\t\t\t\t\t\tinsert = 1\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// terminate line comment\n\t\t\t\t\tif (comment === FOWARDSLASH) {\n\t\t\t\t\t\tcomment = 0\n\t\t\t\t\t} else if (cascade + context === 0) {\n\t\t\t\t\t\tformat = 1\n\t\t\t\t\t\tchars += '\\0'\n\t\t\t\t\t}\n\n\t\t\t\t\t// execute plugins, newline context\n\t\t\t\t\tif (plugged * unkwn > 0) {\n\t\t\t\t\t\tproxy(UNKWN, chars, current, parent, line, column, out.length, id, depth)\n\t\t\t\t\t}\n\n\t\t\t\t\t// next line, reset column position\n\t\t\t\t\tcolumn = 1\n\t\t\t\t\tline++\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t\tcase SEMICOLON:\n\t\t\t\tcase CLOSEBRACES: {\n\t\t\t\t\tif (comment + quote + parentheses + bracket === 0) {\n\t\t\t\t\t\tcolumn++\n\t\t\t\t\t\tbreak\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tdefault: {\n\t\t\t\t\t// increment column position\n\t\t\t\t\tcolumn++\n\n\t\t\t\t\t// current character\n\t\t\t\t\tchar = body.charAt(caret)\n\n\t\t\t\t\t// remove comments, escape functions, strings, attributes and prepare selectors\n\t\t\t\t\tswitch (code) {\n\t\t\t\t\t\tcase TAB:\n\t\t\t\t\t\tcase SPACE: {\n\t\t\t\t\t\t\tif (quote + bracket + comment === 0) {\n\t\t\t\t\t\t\t\tswitch (tail) {\n\t\t\t\t\t\t\t\t\tcase COMMA:\n\t\t\t\t\t\t\t\t\tcase COLON:\n\t\t\t\t\t\t\t\t\tcase TAB:\n\t\t\t\t\t\t\t\t\tcase SPACE: {\n\t\t\t\t\t\t\t\t\t\tchar = ''\n\t\t\t\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tdefault: {\n\t\t\t\t\t\t\t\t\t\tif (code !== SPACE) {\n\t\t\t\t\t\t\t\t\t\t\tchar = ' '\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// escape breaking control characters\n\t\t\t\t\t\tcase NULL: {\n\t\t\t\t\t\t\tchar = '\\\\0'\n\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcase FORMFEED: {\n\t\t\t\t\t\t\tchar = '\\\\f'\n\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcase VERTICALTAB: {\n\t\t\t\t\t\t\tchar = '\\\\v'\n\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// &\n\t\t\t\t\t\tcase AND: {\n\t\t\t\t\t\t\t// inverted selector pattern i.e html &\n\t\t\t\t\t\t\tif (quote + comment + bracket === 0 && cascade > 0) {\n\t\t\t\t\t\t\t\tinvert = 1\n\t\t\t\t\t\t\t\tformat = 1\n\t\t\t\t\t\t\t\tchar = '\\f' + char\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// ::paceholder, l\n\t\t\t\t\t\t// :read-ony, l\n\t\t\t\t\t\tcase 108: {\n\t\t\t\t\t\t\tif (quote + comment + bracket + pattern === 0 && pseudo > 0) {\n\t\t\t\t\t\t\t\tswitch (caret - pseudo) {\n\t\t\t\t\t\t\t\t\t// ::placeholder\n\t\t\t\t\t\t\t\t\tcase 2: {\n\t\t\t\t\t\t\t\t\t\tif (tail === PLACEHOLDER && body.charCodeAt(caret-3) === COLON) {\n\t\t\t\t\t\t\t\t\t\t\tpattern = tail\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t// :read-only\n\t\t\t\t\t\t\t\t\tcase 8: {\n\t\t\t\t\t\t\t\t\t\tif (trail === READONLY) {\n\t\t\t\t\t\t\t\t\t\t\tpattern = trail\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// :\n\t\t\t\t\t\tcase COLON: {\n\t\t\t\t\t\t\tif (quote + comment + bracket === 0) {\n\t\t\t\t\t\t\t\tpseudo = caret\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// selectors\n\t\t\t\t\t\tcase COMMA: {\n\t\t\t\t\t\t\tif (comment + parentheses + quote + bracket === 0) {\n\t\t\t\t\t\t\t\tformat = 1\n\t\t\t\t\t\t\t\tchar += '\\r'\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// quotes\n\t\t\t\t\t\tcase DOUBLEQUOTE: {\n\t\t\t\t\t\t\tif (comment === 0) {\n\t\t\t\t\t\t\t\tquote = quote === code ? 0 : (quote === 0 ? code : quote)\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcase SINGLEQUOTE: {\n\t\t\t\t\t\t\tif (comment === 0) {\n\t\t\t\t\t\t\t\tquote = quote === code ? 0 : (quote === 0 ? code : quote)\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// attributes\n\t\t\t\t\t\tcase OPENBRACKET: {\n\t\t\t\t\t\t\tif (quote + comment + parentheses === 0) {\n\t\t\t\t\t\t\t\tbracket++\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcase CLOSEBRACKET: {\n\t\t\t\t\t\t\tif (quote + comment + parentheses === 0) {\n\t\t\t\t\t\t\t\tbracket--\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// functions\n\t\t\t\t\t\tcase CLOSEPARENTHESES: {\n\t\t\t\t\t\t\tif (quote + comment + bracket === 0) {\n\t\t\t\t\t\t\t\tparentheses--\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcase OPENPARENTHESES: {\n\t\t\t\t\t\t\tif (quote + comment + bracket === 0) {\n\t\t\t\t\t\t\t\tif (context === 0) {\n\t\t\t\t\t\t\t\t\tswitch (tail*2 + trail*3) {\n\t\t\t\t\t\t\t\t\t\t// :matches\n\t\t\t\t\t\t\t\t\t\tcase 533: {\n\t\t\t\t\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t// :global, :not, :nth-child etc...\n\t\t\t\t\t\t\t\t\t\tdefault: {\n\t\t\t\t\t\t\t\t\t\t\tcounter = 0\n\t\t\t\t\t\t\t\t\t\t\tcontext = 1\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tparentheses++\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcase AT: {\n\t\t\t\t\t\t\tif (comment + parentheses + quote + bracket + pseudo + atrule === 0) {\n\t\t\t\t\t\t\t\tatrule = 1\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// block/line comments\n\t\t\t\t\t\tcase STAR:\n\t\t\t\t\t\tcase FOWARDSLASH: {\n\t\t\t\t\t\t\tif (quote + bracket + parentheses > 0) {\n\t\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tswitch (comment) {\n\t\t\t\t\t\t\t\t// initialize line/block comment context\n\t\t\t\t\t\t\t\tcase 0: {\n\t\t\t\t\t\t\t\t\tswitch (code*2 + body.charCodeAt(caret+1)*3) {\n\t\t\t\t\t\t\t\t\t\t// //\n\t\t\t\t\t\t\t\t\t\tcase 235: {\n\t\t\t\t\t\t\t\t\t\t\tcomment = FOWARDSLASH\n\t\t\t\t\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t// /*\n\t\t\t\t\t\t\t\t\t\tcase 220: {\n\t\t\t\t\t\t\t\t\t\t\tlength = caret\n\t\t\t\t\t\t\t\t\t\t\tcomment = STAR\n\t\t\t\t\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t// end block comment context\n\t\t\t\t\t\t\t\tcase STAR: {\n\t\t\t\t\t\t\t\t\tif (code === FOWARDSLASH && tail === STAR) {\n\t\t\t\t\t\t\t\t\t\t// /* ... */, !\n\t\t\t\t\t\t\t\t\t\tif (body.charCodeAt(length+2) === 33) {\n\t\t\t\t\t\t\t\t\t\t\tout += body.substring(length, caret+1)\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tchar = ''\n\t\t\t\t\t\t\t\t\t\tcomment = 0\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// ignore comment blocks\n\t\t\t\t\tif (comment === 0) {\n\t\t\t\t\t\t// aggressive isolation mode, divide each individual selector\n\t\t\t\t\t\t// including selectors in :not function but excluding selectors in :global function\n\t\t\t\t\t\tif (cascade + quote + bracket + atrule === 0 && id !== KEYFRAME && code !== SEMICOLON) {\n\t\t\t\t\t\t\tswitch (code) {\n\t\t\t\t\t\t\t\tcase COMMA:\n\t\t\t\t\t\t\t\tcase TILDE:\n\t\t\t\t\t\t\t\tcase GREATERTHAN:\n\t\t\t\t\t\t\t\tcase PLUS:\n\t\t\t\t\t\t\t\tcase CLOSEPARENTHESES:\n\t\t\t\t\t\t\t\tcase OPENPARENTHESES: {\n\t\t\t\t\t\t\t\t\tif (context === 0) {\n\t\t\t\t\t\t\t\t\t\t// outside of an isolated context i.e nth-child(<...>)\n\t\t\t\t\t\t\t\t\t\tswitch (tail) {\n\t\t\t\t\t\t\t\t\t\t\tcase TAB:\n\t\t\t\t\t\t\t\t\t\t\tcase SPACE:\n\t\t\t\t\t\t\t\t\t\t\tcase NEWLINE:\n\t\t\t\t\t\t\t\t\t\t\tcase CARRIAGE: {\n\t\t\t\t\t\t\t\t\t\t\t\tchar = char + '\\0'\n\t\t\t\t\t\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tdefault: {\n\t\t\t\t\t\t\t\t\t\t\t\tchar = '\\0' + char + (code === COMMA ? '' : '\\0')\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tformat = 1\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t// within an isolated context, sleep untill it's terminated\n\t\t\t\t\t\t\t\t\t\tswitch (code) {\n\t\t\t\t\t\t\t\t\t\t\tcase OPENPARENTHESES: {\n\t\t\t\t\t\t\t\t\t\t\t\tcontext = ++counter\n\t\t\t\t\t\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tcase CLOSEPARENTHESES: {\n\t\t\t\t\t\t\t\t\t\t\t\tif ((context = --counter) === 0) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tformat = 1\n\t\t\t\t\t\t\t\t\t\t\t\t\tchar += '\\0'\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tcase TAB:\n\t\t\t\t\t\t\t\tcase SPACE: {\n\t\t\t\t\t\t\t\t\tswitch (tail) {\n\t\t\t\t\t\t\t\t\t\tcase NULL:\n\t\t\t\t\t\t\t\t\t\tcase OPENBRACES:\n\t\t\t\t\t\t\t\t\t\tcase CLOSEBRACES:\n\t\t\t\t\t\t\t\t\t\tcase SEMICOLON:\n\t\t\t\t\t\t\t\t\t\tcase COMMA:\n\t\t\t\t\t\t\t\t\t\tcase FORMFEED:\n\t\t\t\t\t\t\t\t\t\tcase TAB:\n\t\t\t\t\t\t\t\t\t\tcase SPACE:\n\t\t\t\t\t\t\t\t\t\tcase NEWLINE:\n\t\t\t\t\t\t\t\t\t\tcase CARRIAGE: {\n\t\t\t\t\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tdefault: {\n\t\t\t\t\t\t\t\t\t\t\t// ignore in isolated contexts\n\t\t\t\t\t\t\t\t\t\t\tif (context === 0) {\n\t\t\t\t\t\t\t\t\t\t\t\tformat = 1\n\t\t\t\t\t\t\t\t\t\t\t\tchar += '\\0'\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// concat buffer of characters\n\t\t\t\t\t\tchars += char\n\n\t\t\t\t\t\t// previous non-whitespace character code\n\t\t\t\t\t\tif (code !== SPACE && code !== TAB) {\n\t\t\t\t\t\t\tpeak = code\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// tail character codes\n\t\t\ttrail = tail\n\t\t\ttail = code\n\n\t\t\t// visit every character\n\t\t\tcaret++\n\t\t}\n\n\t\tlength = out.length\n\n\t\t// preserve empty selector\n \t\tif (preserve > 0) {\n \t\t\tif (length === 0 && children.length === 0 && (current[0].length === 0) === false) {\n \t\t\t\tif (id !== MEDIA || (current.length === 1 && (cascade > 0 ? nscopealt : nscope) === current[0])) {\n\t\t\t\t\tlength = current.join(',').length + 2\n \t\t\t\t}\n \t\t\t}\n\t\t}\n\n\t\tif (length > 0) {\n\t\t\t// cascade isolation mode?\n\t\t\tselector = cascade === 0 && id !== KEYFRAME ? isolate(current) : current\n\n\t\t\t// execute plugins, block context\n\t\t\tif (plugged > 0) {\n\t\t\t\tresult = proxy(BLCKS, out, selector, parent, line, column, length, id, depth)\n\n\t\t\t\tif (result !== void 0 && (out = result).length === 0) {\n\t\t\t\t\treturn flat + out + children\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tout = selector.join(',') + '{' + out + '}'\n\n\t\t\tif (prefix*pattern !== 0) {\n\t\t\t\tif (prefix === 2 && !vendor(out, 2))\n\t\t\t\t\tpattern = 0\n\n\t\t\t\tswitch (pattern) {\n\t\t\t\t\t// ::read-only\n\t\t\t\t\tcase READONLY: {\n\t\t\t\t\t\tout = out.replace(readonlyptn, ':'+moz+'$1')+out\n\t\t\t\t\t\tbreak\n\t\t\t\t\t}\n\t\t\t\t\t// ::placeholder\n\t\t\t\t\tcase PLACEHOLDER: {\n\t\t\t\t\t\tout = (\n\t\t\t\t\t\t\tout.replace(plcholdrptn, '::' + webkit + 'input-$1') +\n\t\t\t\t\t\t\tout.replace(plcholdrptn, '::' + moz + '$1') +\n\t\t\t\t\t\t\tout.replace(plcholdrptn, ':' + ms + 'input-$1') + out\n\t\t\t\t\t\t)\n\t\t\t\t\t\tbreak\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tpattern = 0\n\t\t\t}\n\t\t}\n\n\t\treturn flat + out + children\n\t}\n\n\t/**\n\t * Select\n\t *\n\t * @param {Array} parent\n\t * @param {string} current\n\t * @param {number} invert\n\t * @return {Array}\n\t */\n\tfunction select (parent, current, invert) {\n\t\tvar selectors = current.trim().split(selectorptn)\n\t\tvar out = selectors\n\n\t\tvar length = selectors.length\n\t\tvar l = parent.length\n\n\t\tswitch (l) {\n\t\t\t// 0-1 parent selectors\n\t\t\tcase 0:\n\t\t\tcase 1: {\n\t\t\t\tfor (var i = 0, selector = l === 0 ? '' : parent[0] + ' '; i < length; ++i) {\n\t\t\t\t\tout[i] = scope(selector, out[i], invert, l).trim()\n\t\t\t\t}\n\t\t\t\tbreak\n\t\t\t}\n\t\t\t// >2 parent selectors, nested\n\t\t\tdefault: {\n\t\t\t\tfor (var i = 0, j = 0, out = []; i < length; ++i) {\n\t\t\t\t\tfor (var k = 0; k < l; ++k) {\n\t\t\t\t\t\tout[j++] = scope(parent[k] + ' ', selectors[i], invert, l).trim()\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn out\n\t}\n\n\t/**\n\t * Scope\n\t *\n\t * @param {string} parent\n\t * @param {string} current\n\t * @param {number} invert\n\t * @param {number} level\n\t * @return {string}\n\t */\n\tfunction scope (parent, current, invert, level) {\n\t\tvar selector = current\n\t\tvar code = selector.charCodeAt(0)\n\n\t\t// trim leading whitespace\n\t\tif (code < 33) {\n\t\t\tcode = (selector = selector.trim()).charCodeAt(0)\n\t\t}\n\n\t\tswitch (code) {\n\t\t\t// &\n\t\t\tcase AND: {\n\t\t\t\tswitch (cascade + level) {\n\t\t\t\t\tcase 0:\n\t\t\t\t\tcase 1: {\n\t\t\t\t\t\tif (parent.trim().length === 0) {\n\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tdefault: {\n\t\t\t\t\t\treturn selector.replace(andptn, '$1'+parent.trim())\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak\n\t\t\t}\n\t\t\t// :\n\t\t\tcase COLON: {\n\t\t\t\tswitch (selector.charCodeAt(1)) {\n\t\t\t\t\t// g in :global\n\t\t\t\t\tcase 103: {\n\t\t\t\t\t\tif (escape > 0 && cascade > 0) {\n\t\t\t\t\t\t\treturn selector.replace(escapeptn, '$1').replace(andptn, '$1'+nscope)\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak\n\t\t\t\t\t}\n\t\t\t\t\tdefault: {\n\t\t\t\t\t\t// :hover\n\t\t\t\t\t\treturn parent.trim() + selector\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tdefault: {\n\t\t\t\t// html &\n\t\t\t\tif (invert*cascade > 0 && selector.indexOf('\\f') > 0) {\n\t\t\t\t\treturn selector.replace(andptn, (parent.charCodeAt(0) === COLON ? '' : '$1')+parent.trim())\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn parent + selector\n\t}\n\n\t/**\n\t * Property\n\t *\n\t * @param {string} input\n\t * @param {number} first\n\t * @param {number} second\n\t * @param {number} third\n\t * @return {string}\n\t */\n\tfunction property (input, first, second, third) {\n\t\tvar index = 0\n\t\tvar out = input + ';'\n\t\tvar hash = (first*2) + (second*3) + (third*4)\n\t\tvar cache\n\n\t\t// animation: a, n, i characters\n\t\tif (hash === 944) {\n\t\t\treturn animation(out)\n\t\t} else if (prefix === 0 || (prefix === 2 && !vendor(out, 1))) {\n\t\t\treturn out\n\t\t}\n\n\t\t// vendor prefix\n\t\tswitch (hash) {\n\t\t\t// text-decoration/text-size-adjust: t, e, x\n\t\t\tcase 1015: {\n\t\t\t\t// text-size-adjust, -\n\t\t\t\treturn out.charCodeAt(9) === DASH ? webkit + out + out : out\n\t\t\t}\n\t\t\t// filter/fill f, i, l\n\t\t\tcase 951: {\n\t\t\t\t// filter, t\n\t\t\t\treturn out.charCodeAt(3) === 116 ? webkit + out + out : out\n\t\t\t}\n\t\t\t// color/column, c, o, l\n\t\t\tcase 963: {\n\t\t\t\t// column, n\n\t\t\t\treturn out.charCodeAt(5) === 110 ? webkit + out + out : out\n\t\t\t}\n\t\t\t// box-decoration-break, b, o, x\n\t\t\tcase 1009: {\n\t\t\t\tif (out.charCodeAt(4) !== 100) {\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t}\n\t\t\t// mask, m, a, s\n\t\t\t// clip-path, c, l, i\n\t\t\tcase 969:\n\t\t\tcase 942: {\n\t\t\t\treturn webkit + out + out\n\t\t\t}\n\t\t\t// appearance: a, p, p\n\t\t\tcase 978: {\n\t\t\t\treturn webkit + out + moz + out + out\n\t\t\t}\n\t\t\t// hyphens: h, y, p\n\t\t\t// user-select: u, s, e\n\t\t\tcase 1019:\n\t\t\tcase 983: {\n\t\t\t\treturn webkit + out + moz + out + ms + out + out\n\t\t\t}\n\t\t\t// background/backface-visibility, b, a, c\n\t\t\tcase 883: {\n\t\t\t\t// backface-visibility, -\n\t\t\t\treturn out.charCodeAt(8) === DASH ? webkit + out + out : out\n\t\t\t}\n\t\t\t// flex: f, l, e\n\t\t\tcase 932: {\n\t\t\t\tif (out.charCodeAt(4) === DASH) {\n\t\t\t\t\tswitch (out.charCodeAt(5)) {\n\t\t\t\t\t\t// flex-grow, g\n\t\t\t\t\t\tcase 103: {\n\t\t\t\t\t\t\treturn webkit + 'box-' + out.replace('-grow', '') + webkit + out + ms + out.replace('grow', 'positive') + out\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// flex-shrink, s\n\t\t\t\t\t\tcase 115: {\n\t\t\t\t\t\t\treturn webkit + out + ms + out.replace('shrink', 'negative') + out\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// flex-basis, b\n\t\t\t\t\t\tcase 98: {\n\t\t\t\t\t\t\treturn webkit + out + ms + out.replace('basis', 'preferred-size') + out\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn webkit + out + ms + out + out\n\t\t\t}\n\t\t\t// order: o, r, d\n\t\t\tcase 964: {\n\t\t\t\treturn webkit + out + ms + 'flex' + '-' + out + out\n\t\t\t}\n\t\t\t// justify-items/justify-content, j, u, s\n\t\t\tcase 1023: {\n\t\t\t\t// justify-content, c\n\t\t\t\tif (out.charCodeAt(8) !== 99) {\n\t\t\t\t\tbreak\n\t\t\t\t}\n\n\t\t\t\tcache = out.substring(out.indexOf(':', 15)).replace('flex-', '').replace('space-between', 'justify')\n\t\t\t\treturn webkit + 'box-pack' + cache + webkit + out + ms + 'flex-pack' + cache + out\n\t\t\t}\n\t\t\t// cursor, c, u, r\n\t\t\tcase 1005: {\n\t\t\t\treturn cursorptn.test(out) ? out.replace(colonptn, ':' + webkit) + out.replace(colonptn, ':' + moz) + out : out\n\t\t\t}\n\t\t\t// writing-mode, w, r, i\n\t\t\tcase 1000: {\n\t\t\t\tcache = out.substring(13).trim()\n\t\t\t\tindex = cache.indexOf('-') + 1\n\n\t\t\t\tswitch (cache.charCodeAt(0)+cache.charCodeAt(index)) {\n\t\t\t\t\t// vertical-lr\n\t\t\t\t\tcase 226: {\n\t\t\t\t\t\tcache = out.replace(writingptn, 'tb')\n\t\t\t\t\t\tbreak\n\t\t\t\t\t}\n\t\t\t\t\t// vertical-rl\n\t\t\t\t\tcase 232: {\n\t\t\t\t\t\tcache = out.replace(writingptn, 'tb-rl')\n\t\t\t\t\t\tbreak\n\t\t\t\t\t}\n\t\t\t\t\t// horizontal-tb\n\t\t\t\t\tcase 220: {\n\t\t\t\t\t\tcache = out.replace(writingptn, 'lr')\n\t\t\t\t\t\tbreak\n\t\t\t\t\t}\n\t\t\t\t\tdefault: {\n\t\t\t\t\t\treturn out\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn webkit + out + ms + cache + out\n\t\t\t}\n\t\t\t// position: sticky\n\t\t\tcase 1017: {\n\t\t\t\tif (out.indexOf('sticky', 9) === -1) {\n\t\t\t\t\treturn out\n\t\t\t\t}\n\t\t\t}\n\t\t\t// display(flex/inline-flex/inline-box): d, i, s\n\t\t\tcase 975: {\n\t\t\t\tindex = (out = input).length - 10\n\t\t\t\tcache = (out.charCodeAt(index) === 33 ? out.substring(0, index) : out).substring(input.indexOf(':', 7) + 1).trim()\n\n\t\t\t\tswitch (hash = cache.charCodeAt(0) + (cache.charCodeAt(7)|0)) {\n\t\t\t\t\t// inline-\n\t\t\t\t\tcase 203: {\n\t\t\t\t\t\t// inline-box\n\t\t\t\t\t\tif (cache.charCodeAt(8) < 111) {\n\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t// inline-box/sticky\n\t\t\t\t\tcase 115: {\n\t\t\t\t\t\tout = out.replace(cache, webkit+cache)+';'+out\n\t\t\t\t\t\tbreak\n\t\t\t\t\t}\n\t\t\t\t\t// inline-flex\n\t\t\t\t\t// flex\n\t\t\t\t\tcase 207:\n\t\t\t\t\tcase 102: {\n\t\t\t\t\t\tout = (\n\t\t\t\t\t\t\tout.replace(cache, webkit+(hash > 102 ? 'inline-' : '')+'box')+';'+\n\t\t\t\t\t\t\tout.replace(cache, webkit+cache)+';'+\n\t\t\t\t\t\t\tout.replace(cache, ms+cache+'box')+';'+\n\t\t\t\t\t\t\tout\n\t\t\t\t\t\t)\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn out + ';'\n\t\t\t}\n\t\t\t// align-items, align-center, align-self: a, l, i, -\n\t\t\tcase 938: {\n\t\t\t\tif (out.charCodeAt(5) === DASH) {\n\t\t\t\t\tswitch (out.charCodeAt(6)) {\n\t\t\t\t\t\t// align-items, i\n\t\t\t\t\t\tcase 105: {\n\t\t\t\t\t\t\tcache = out.replace('-items', '')\n\t\t\t\t\t\t\treturn webkit + out + webkit + 'box-' + cache + ms + 'flex-' + cache + out\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// align-self, s\n\t\t\t\t\t\tcase 115: {\n\t\t\t\t\t\t\treturn webkit + out + ms + 'flex-item-' + out.replace(selfptn, '') + out\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// align-content\n\t\t\t\t\t\tdefault: {\n\t\t\t\t\t\t\treturn webkit + out + ms + 'flex-line-pack' + out.replace('align-content', '') + out\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak\n\t\t\t}\n\t\t\t// width: min-content / width: max-content\n\t\t\tcase 953: {\n\t\t\t\tif ((index = out.indexOf('-content', 9)) > 0) {\n\t\t\t\t\t// width: min-content / width: max-content\n\t\t\t\t\tif (out.charCodeAt(index - 3) === 109 && out.charCodeAt(index - 4) !== 45) {\n\t\t\t\t\t\tcache = out.substring(index - 3)\n\t\t\t\t\t\treturn 'width:' + webkit + cache + 'width:' + moz + cache + 'width:' + cache\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak\n\t\t\t}\n\t\t\t// transform, transition: t, r, a\n\t\t\tcase 962: {\n\t\t\t\tout = webkit + out + (out.charCodeAt(5) === 102 ? ms + out : '') + out\n\n\t\t\t\t// transitions\n\t\t\t\tif (second + third === 211 && out.charCodeAt(13) === 105 && out.indexOf('transform', 10) > 0) {\n\t\t\t\t\treturn out.substring(0, out.indexOf(';', 27) + 1).replace(transformptn, '$1' + webkit + '$2') + out\n\t\t\t\t}\n\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\n\t\treturn out\n\t}\n\n\tvar i = 0\n\n\t/**\n\t * Vendor\n\t *\n\t * @param {string} content\n\t * @param {number} context\n\t * @return {boolean}\n\t */\n\tfunction vendor (content, context) {\n\t\tvar index = content.indexOf(context === 1 ? ':' : '{')\n\t\tvar key = content.substring(0, context !== 3 ? index : 10)\n\t\tvar value = content.substring(index + 1, content.length - 1)\n\n\t\treturn should(context !== 2 ? key : key.replace(pseudofmt, '$1'), value, context)\n\t}\n\n\t/**\n\t * Supports\n\t *\n\t * @param {string} match\n\t * @param {string} group\n\t * @return {string}\n\t */\n\tfunction supports (match, group) {\n\t\tvar out = property(group, group.charCodeAt(0), group.charCodeAt(1), group.charCodeAt(2))\n\n\t\treturn out !== group+';' ? out.replace(propertyptn, ' or ($1)').substring(4) : '('+group+')'\n\t}\n\n\t/**\n\t * Animation\n\t *\n\t * @param {string} input\n\t * @return {string}\n\t */\n\tfunction animation (input) {\n\t\tvar length = input.length\n\t\tvar index = input.indexOf(':', 9) + 1\n\t\tvar declare = input.substring(0, index).trim()\n\t\tvar out = input.substring(index, length-1).trim()\n\n\t\tswitch (input.charCodeAt(9)*keyed) {\n\t\t\tcase 0: {\n\t\t\t\tbreak\n\t\t\t}\n\t\t\t// animation-*, -\n\t\t\tcase DASH: {\n\t\t\t\t// animation-name, n\n\t\t\t\tif (input.charCodeAt(10) !== 110) {\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t}\n\t\t\t// animation/animation-name\n\t\t\tdefault: {\n\t\t\t\t// split in case of multiple animations\n\t\t\t\tvar list = out.split((out = '', animationptn))\n\n\t\t\t\tfor (var i = 0, index = 0, length = list.length; i < length; index = 0, ++i) {\n\t\t\t\t\tvar value = list[i]\n\t\t\t\t\tvar items = value.split(propertiesptn)\n\n\t\t\t\t\twhile (value = items[index]) {\n\t\t\t\t\t\tvar peak = value.charCodeAt(0)\n\n\t\t\t\t\t\tif (keyed === 1 && (\n\t\t\t\t\t\t\t// letters\n\t\t\t\t\t\t\t(peak > AT && peak < 90) || (peak > 96 && peak < 123) || peak === UNDERSCORE ||\n\t\t\t\t\t\t\t// dash but not in sequence i.e --\n\t\t\t\t\t\t\t(peak === DASH && value.charCodeAt(1) !== DASH)\n\t\t\t\t\t\t)) {\n\t\t\t\t\t\t\t// not a number/function\n\t\t\t\t\t\t\tswitch (isNaN(parseFloat(value)) + (value.indexOf('(') !== -1)) {\n\t\t\t\t\t\t\t\tcase 1: {\n\t\t\t\t\t\t\t\t\tswitch (value) {\n\t\t\t\t\t\t\t\t\t\t// not a valid reserved keyword\n\t\t\t\t\t\t\t\t\t\tcase 'infinite': case 'alternate': case 'backwards': case 'running':\n\t\t\t\t\t\t\t\t\t\tcase 'normal': case 'forwards': case 'both': case 'none': case 'linear':\n\t\t\t\t\t\t\t\t\t\tcase 'ease': case 'ease-in': case 'ease-out': case 'ease-in-out':\n\t\t\t\t\t\t\t\t\t\tcase 'paused': case 'reverse': case 'alternate-reverse': case 'inherit':\n\t\t\t\t\t\t\t\t\t\tcase 'initial': case 'unset': case 'step-start': case 'step-end': {\n\t\t\t\t\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tdefault: {\n\t\t\t\t\t\t\t\t\t\t\tvalue += key\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\titems[index++] = value\n\t\t\t\t\t}\n\n\t\t\t\t\tout += (i === 0 ? '' : ',') + items.join(' ')\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tout = declare + out + ';'\n\n\t\tif (prefix === 1 || (prefix === 2 && vendor(out, 1)))\n\t\t\treturn webkit + out + out\n\n\t\treturn out\n\t}\n\n\t/**\n\t * Isolate\n\t *\n\t * @param {Array} current\n\t */\n\tfunction isolate (current) {\n\t\tfor (var i = 0, length = current.length, selector = Array(length), padding, element; i < length; ++i) {\n\t\t\t// split individual elements in a selector i.e h1 h2 === [h1, h2]\n\t\t\tvar elements = current[i].split(elementptn)\n\t\t\tvar out = ''\n\n\t\t\tfor (var j = 0, size = 0, tail = 0, code = 0, l = elements.length; j < l; ++j) {\n\t\t\t\t// empty element\n\t\t\t\tif ((size = (element = elements[j]).length) === 0 && l > 1) {\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\n\t\t\t\ttail = out.charCodeAt(out.length-1)\n\t\t\t\tcode = element.charCodeAt(0)\n\t\t\t\tpadding = ''\n\n\t\t\t\tif (j !== 0) {\n\t\t\t\t\t// determine if we need padding\n\t\t\t\t\tswitch (tail) {\n\t\t\t\t\t\tcase STAR:\n\t\t\t\t\t\tcase TILDE:\n\t\t\t\t\t\tcase GREATERTHAN:\n\t\t\t\t\t\tcase PLUS:\n\t\t\t\t\t\tcase SPACE:\n\t\t\t\t\t\tcase OPENPARENTHESES: {\n\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdefault: {\n\t\t\t\t\t\t\tpadding = ' '\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tswitch (code) {\n\t\t\t\t\tcase AND: {\n\t\t\t\t\t\telement = padding + nscopealt\n\t\t\t\t\t}\n\t\t\t\t\tcase TILDE:\n\t\t\t\t\tcase GREATERTHAN:\n\t\t\t\t\tcase PLUS:\n\t\t\t\t\tcase SPACE:\n\t\t\t\t\tcase CLOSEPARENTHESES:\n\t\t\t\t\tcase OPENPARENTHESES: {\n\t\t\t\t\t\tbreak\n\t\t\t\t\t}\n\t\t\t\t\tcase OPENBRACKET: {\n\t\t\t\t\t\telement = padding + element + nscopealt\n\t\t\t\t\t\tbreak\n\t\t\t\t\t}\n\t\t\t\t\tcase COLON: {\n\t\t\t\t\t\tswitch (element.charCodeAt(1)*2 + element.charCodeAt(2)*3) {\n\t\t\t\t\t\t\t// :global\n\t\t\t\t\t\t\tcase 530: {\n\t\t\t\t\t\t\t\tif (escape > 0) {\n\t\t\t\t\t\t\t\t\telement = padding + element.substring(8, size - 1)\n\t\t\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t// :hover, :nth-child(), ...\n\t\t\t\t\t\t\tdefault: {\n\t\t\t\t\t\t\t\tif (j < 1 || elements[j-1].length < 1) {\n\t\t\t\t\t\t\t\t\telement = padding + nscopealt + element\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak\n\t\t\t\t\t}\n\t\t\t\t\tcase COMMA: {\n\t\t\t\t\t\tpadding = ''\n\t\t\t\t\t}\n\t\t\t\t\tdefault: {\n\t\t\t\t\t\tif (size > 1 && element.indexOf(':') > 0) {\n\t\t\t\t\t\t\telement = padding + element.replace(pseudoptn, '$1' + nscopealt + '$2')\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\telement = padding + element + nscopealt\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tout += element\n\t\t\t}\n\n\t\t\tselector[i] = out.replace(formatptn, '').trim()\n\t\t}\n\n\t\treturn selector\n\t}\n\n\t/**\n\t * Proxy\n\t *\n\t * @param {number} context\n\t * @param {string} content\n\t * @param {Array} selectors\n\t * @param {Array} parents\n\t * @param {number} line\n\t * @param {number} column\n\t * @param {number} length\n\t * @param {number} id\n\t * @param {number} depth\n\t * @return {(string|void|*)}\n\t */\n\tfunction proxy (context, content, selectors, parents, line, column, length, id, depth) {\n\t\tfor (var i = 0, out = content, next; i < plugged; ++i) {\n\t\t\tswitch (next = plugins[i].call(stylis, context, out, selectors, parents, line, column, length, id, depth)) {\n\t\t\t\tcase void 0:\n\t\t\t\tcase false:\n\t\t\t\tcase true:\n\t\t\t\tcase null: {\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t\tdefault: {\n\t\t\t\t\tout = next\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tswitch (out) {\n\t\t\tcase void 0:\n\t\t\tcase false:\n\t\t\tcase true:\n\t\t\tcase null:\n\t\t\tcase content: {\n\t\t\t\tbreak\n\t\t\t}\n\t\t\tdefault: {\n\t\t\t\treturn out\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Minify\n\t *\n\t * @param {(string|*)} output\n\t * @return {string}\n\t */\n\tfunction minify (output) {\n\t\treturn output\n\t\t\t.replace(formatptn, '')\n\t\t\t.replace(beforeptn, '')\n\t\t\t.replace(afterptn, '$1')\n\t\t\t.replace(tailptn, '$1')\n\t\t\t.replace(whiteptn, ' ')\n\t}\n\n\t/**\n\t * Use\n\t *\n\t * @param {(Array|function(...?)|number|void)?} plugin\n\t */\n\tfunction use (plugin) {\n\t\tswitch (plugin) {\n\t\t\tcase void 0:\n\t\t\tcase null: {\n\t\t\t\tplugged = plugins.length = 0\n\t\t\t\tbreak\n\t\t\t}\n\t\t\tdefault: {\n\t\t\t\tswitch (plugin.constructor) {\n\t\t\t\t\tcase Array: {\n\t\t\t\t\t\tfor (var i = 0, length = plugin.length; i < length; ++i) {\n\t\t\t\t\t\t\tuse(plugin[i])\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak\n\t\t\t\t\t}\n\t\t\t\t\tcase Function: {\n\t\t\t\t\t\tplugins[plugged++] = plugin\n\t\t\t\t\t\tbreak\n\t\t\t\t\t}\n\t\t\t\t\tcase Boolean: {\n\t\t\t\t\t\tunkwn = !!plugin|0\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n \t\t}\n\n \t\treturn use\n\t}\n\n\t/**\n\t * Set\n\t *\n\t * @param {*} options\n\t */\n\tfunction set (options) {\n\t\tfor (var name in options) {\n\t\t\tvar value = options[name]\n\t\t\tswitch (name) {\n\t\t\t\tcase 'keyframe': keyed = value|0; break\n\t\t\t\tcase 'global': escape = value|0; break\n\t\t\t\tcase 'cascade': cascade = value|0; break\n\t\t\t\tcase 'compress': compress = value|0; break\n\t\t\t\tcase 'semicolon': semicolon = value|0; break\n\t\t\t\tcase 'preserve': preserve = value|0; break\n\t\t\t\tcase 'prefix':\n\t\t\t\t\tshould = null\n\n\t\t\t\t\tif (!value) {\n\t\t\t\t\t\tprefix = 0\n\t\t\t\t\t} else if (typeof value !== 'function') {\n\t\t\t\t\t\tprefix = 1\n\t\t\t\t\t} else {\n\t\t\t\t\t\tprefix = 2\n\t\t\t\t\t\tshould = value\n\t\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn set\n\t}\n\n\t/**\n\t * Stylis\n\t *\n\t * @param {string} selector\n\t * @param {string} input\n\t * @return {*}\n\t */\n\tfunction stylis (selector, input) {\n\t\tif (this !== void 0 && this.constructor === stylis) {\n\t\t\treturn factory(selector)\n\t\t}\n\n\t\t// setup\n\t\tvar ns = selector\n\t\tvar code = ns.charCodeAt(0)\n\n\t\t// trim leading whitespace\n\t\tif (code < 33) {\n\t\t\tcode = (ns = ns.trim()).charCodeAt(0)\n\t\t}\n\n\t\t// keyframe/animation namespace\n\t\tif (keyed > 0) {\n\t\t\tkey = ns.replace(invalidptn, code === OPENBRACKET ? '' : '-')\n\t\t}\n\n\t\t// reset, used to assert if a plugin is moneky-patching the return value\n\t\tcode = 1\n\n\t\t// cascade/isolate\n\t\tif (cascade === 1) {\n\t\t\tnscope = ns\n\t\t} else {\n\t\t\tnscopealt = ns\n\t\t}\n\n\t\tvar selectors = [nscope]\n\t\tvar result\n\n\t\t// execute plugins, pre-process context\n\t\tif (plugged > 0) {\n\t\t\tresult = proxy(PREPS, input, selectors, selectors, line, column, 0, 0, 0)\n\n\t\t\tif (result !== void 0 && typeof result === 'string') {\n\t\t\t\tinput = result\n\t\t\t}\n\t\t}\n\n\t\t// build\n\t\tvar output = compile(array, selectors, input, 0, 0)\n\n\t\t// execute plugins, post-process context\n\t\tif (plugged > 0) {\n\t\t\tresult = proxy(POSTS, output, selectors, selectors, line, column, output.length, 0, 0)\n\n\t\t\t// bypass minification\n\t\t\tif (result !== void 0 && typeof(output = result) !== 'string') {\n\t\t\t\tcode = 0\n\t\t\t}\n\t\t}\n\n\t\t// reset\n\t\tkey = ''\n\t\tnscope = ''\n\t\tnscopealt = ''\n\t\tpattern = 0\n\t\tline = 1\n\t\tcolumn = 1\n\n\t\treturn compress*code === 0 ? output : minify(output)\n\t}\n\n\tstylis['use'] = use\n\tstylis['set'] = set\n\n\tif (options !== void 0) {\n\t\tset(options)\n\t}\n\n\treturn stylis\n}));\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi4vbm9kZV9tb2R1bGVzL3N0eWxpcy9zdHlsaXMuanMuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi4vbm9kZV9tb2R1bGVzL3N0eWxpcy9zdHlsaXMuanM/NjBlYyJdLCJzb3VyY2VzQ29udGVudCI6WyIvKlxuICogICAgICAgICAgX18gICAgICAgIF9fX1xuICogICAgX19fX18vIC9fX18gIF9fLyAoXylfX19fXG4gKiAgIC8gX19fLyBfXy8gLyAvIC8gLyAvIF9fXy9cbiAqICAoX18gICkgL18vIC9fLyAvIC8gKF9fICApXG4gKiAvX19fXy9cXF9fL1xcX18sIC9fL18vX19fXy9cbiAqICAgICAgICAgIC9fX19fL1xuICpcbiAqIGxpZ2h0IC0gd2VpZ2h0I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object.defineProperty(exports, "__esModule", { - value: true -}); +eval("// style-loader: Adds some css to the DOM by adding a