Bez popisu

style-inject.es-c386372b.js 5.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228
  1. 'use strict';
  2. function _classCallCheck(instance, Constructor) {
  3. if (!(instance instanceof Constructor)) {
  4. throw new TypeError("Cannot call a class as a function");
  5. }
  6. }
  7. function _defineProperties(target, props) {
  8. for (var i = 0; i < props.length; i++) {
  9. var descriptor = props[i];
  10. descriptor.enumerable = descriptor.enumerable || false;
  11. descriptor.configurable = true;
  12. if ("value" in descriptor) descriptor.writable = true;
  13. Object.defineProperty(target, descriptor.key, descriptor);
  14. }
  15. }
  16. function _createClass(Constructor, protoProps, staticProps) {
  17. if (protoProps) _defineProperties(Constructor.prototype, protoProps);
  18. if (staticProps) _defineProperties(Constructor, staticProps);
  19. return Constructor;
  20. }
  21. function _defineProperty(obj, key, value) {
  22. if (key in obj) {
  23. Object.defineProperty(obj, key, {
  24. value: value,
  25. enumerable: true,
  26. configurable: true,
  27. writable: true
  28. });
  29. } else {
  30. obj[key] = value;
  31. }
  32. return obj;
  33. }
  34. function _inherits(subClass, superClass) {
  35. if (typeof superClass !== "function" && superClass !== null) {
  36. throw new TypeError("Super expression must either be null or a function");
  37. }
  38. subClass.prototype = Object.create(superClass && superClass.prototype, {
  39. constructor: {
  40. value: subClass,
  41. writable: true,
  42. configurable: true
  43. }
  44. });
  45. if (superClass) _setPrototypeOf(subClass, superClass);
  46. }
  47. function _getPrototypeOf(o) {
  48. _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
  49. return o.__proto__ || Object.getPrototypeOf(o);
  50. };
  51. return _getPrototypeOf(o);
  52. }
  53. function _setPrototypeOf(o, p) {
  54. _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
  55. o.__proto__ = p;
  56. return o;
  57. };
  58. return _setPrototypeOf(o, p);
  59. }
  60. function _assertThisInitialized(self) {
  61. if (self === void 0) {
  62. throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
  63. }
  64. return self;
  65. }
  66. function _possibleConstructorReturn(self, call) {
  67. if (call && (typeof call === "object" || typeof call === "function")) {
  68. return call;
  69. }
  70. return _assertThisInitialized(self);
  71. }
  72. function _slicedToArray(arr, i) {
  73. return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest();
  74. }
  75. function _arrayWithHoles(arr) {
  76. if (Array.isArray(arr)) return arr;
  77. }
  78. function _iterableToArrayLimit(arr, i) {
  79. if (!(Symbol.iterator in Object(arr) || Object.prototype.toString.call(arr) === "[object Arguments]")) {
  80. return;
  81. }
  82. var _arr = [];
  83. var _n = true;
  84. var _d = false;
  85. var _e = undefined;
  86. try {
  87. for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {
  88. _arr.push(_s.value);
  89. if (i && _arr.length === i) break;
  90. }
  91. } catch (err) {
  92. _d = true;
  93. _e = err;
  94. } finally {
  95. try {
  96. if (!_n && _i["return"] != null) _i["return"]();
  97. } finally {
  98. if (_d) throw _e;
  99. }
  100. }
  101. return _arr;
  102. }
  103. function _nonIterableRest() {
  104. throw new TypeError("Invalid attempt to destructure non-iterable instance");
  105. }
  106. var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
  107. function unwrapExports (x) {
  108. return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
  109. }
  110. function createCommonjsModule(fn, module) {
  111. return module = { exports: {} }, fn(module, module.exports), module.exports;
  112. }
  113. var classnames = createCommonjsModule(function (module) {
  114. /*!
  115. Copyright (c) 2017 Jed Watson.
  116. Licensed under the MIT License (MIT), see
  117. http://jedwatson.github.io/classnames
  118. */
  119. /* global define */
  120. (function () {
  121. var hasOwn = {}.hasOwnProperty;
  122. function classNames () {
  123. var classes = [];
  124. for (var i = 0; i < arguments.length; i++) {
  125. var arg = arguments[i];
  126. if (!arg) continue;
  127. var argType = typeof arg;
  128. if (argType === 'string' || argType === 'number') {
  129. classes.push(arg);
  130. } else if (Array.isArray(arg) && arg.length) {
  131. var inner = classNames.apply(null, arg);
  132. if (inner) {
  133. classes.push(inner);
  134. }
  135. } else if (argType === 'object') {
  136. for (var key in arg) {
  137. if (hasOwn.call(arg, key) && arg[key]) {
  138. classes.push(key);
  139. }
  140. }
  141. }
  142. }
  143. return classes.join(' ');
  144. }
  145. if ( module.exports) {
  146. classNames.default = classNames;
  147. module.exports = classNames;
  148. } else {
  149. window.classNames = classNames;
  150. }
  151. }());
  152. });
  153. function styleInject(css, ref) {
  154. if ( ref === void 0 ) ref = {};
  155. var insertAt = ref.insertAt;
  156. if (!css || typeof document === 'undefined') { return; }
  157. var head = document.head || document.getElementsByTagName('head')[0];
  158. var style = document.createElement('style');
  159. style.type = 'text/css';
  160. if (insertAt === 'top') {
  161. if (head.firstChild) {
  162. head.insertBefore(style, head.firstChild);
  163. } else {
  164. head.appendChild(style);
  165. }
  166. } else {
  167. head.appendChild(style);
  168. }
  169. if (style.styleSheet) {
  170. style.styleSheet.cssText = css;
  171. } else {
  172. style.appendChild(document.createTextNode(css));
  173. }
  174. }
  175. exports._classCallCheck = _classCallCheck;
  176. exports._createClass = _createClass;
  177. exports._defineProperty = _defineProperty;
  178. exports._getPrototypeOf = _getPrototypeOf;
  179. exports._inherits = _inherits;
  180. exports._possibleConstructorReturn = _possibleConstructorReturn;
  181. exports._slicedToArray = _slicedToArray;
  182. exports.classnames = classnames;
  183. exports.commonjsGlobal = commonjsGlobal;
  184. exports.createCommonjsModule = createCommonjsModule;
  185. exports.styleInject = styleInject;
  186. exports.unwrapExports = unwrapExports;
  187. //# sourceMappingURL=style-inject.es-c386372b.js.map