index.min.js
1.29 KB
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t(e.emotionSheet={})}(this,function(e){"use strict";var t=function(){function e(e){this.isSpeedy=void 0===e.speedy||e.speedy,this.maxLength=this.isSpeedy?65e3:1,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container}var t=e.prototype;return t.insert=function(e){if(this.ctr%this.maxLength==0){var t,n=(s=this,(i=document.createElement("style")).setAttribute("data-emotion",s.key),void 0!==s.nonce&&i.setAttribute("nonce",s.nonce),i.appendChild(document.createTextNode("")),i);t=0===this.tags.length?this.before:this.tags[this.tags.length-1].nextSibling,this.container.insertBefore(n,t),this.tags.push(n)}var s,i,o=this.tags[this.tags.length-1];if(this.isSpeedy){var h=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(o);try{h.insertRule(e,h.cssRules.length)}catch(e){}}else o.appendChild(document.createTextNode(e));this.ctr++},t.flush=function(){this.tags.forEach(function(e){return e.parentNode.removeChild(e)}),this.tags=[],this.ctr=0},e}();e.StyleSheet=t,Object.defineProperty(e,"__esModule",{value:!0})});
//# sourceMappingURL=index.min.js.map