From 3d3b92e92d56deed0ca810d8abb0dc2b5262a468 Mon Sep 17 00:00:00 2001 From: ReeceM Date: Wed, 21 Dec 2022 14:49:45 +0200 Subject: [PATCH] v2.0.1 release --- CHANGELOG.md | 6 +- dist/hBar.js | 990 +++++++++++++++++------------------ dist/hBar.min.js | 10 +- dist/hBar.min.js.LICENSE.txt | 7 + package.json | 2 +- 5 files changed, 491 insertions(+), 524 deletions(-) create mode 100644 dist/hBar.min.js.LICENSE.txt diff --git a/CHANGELOG.md b/CHANGELOG.md index cd22747..75adc50 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,12 +2,15 @@ All notable changes to `h-bar` will be documented in this file. ## [Unreleased] + +## [2.0.1] - 2022-12-21 ### Added - Templating for custom styles. - Move the original default banner to separate class ### Changed - Initializing the class has changed in the values passed +- Changed to make banner optional #31 @mariusa # [1.1.0] - 2020-05-15 @@ -77,7 +80,8 @@ Also update the readme. Before this the documented changes are vague cause it was the initial flesh of the package. -[Unreleased]: https://github.com/reecem/h-bar/compare/v1.1.0...HEAD +[Unreleased]: https://github.com/reecem/h-bar/compare/v2.0.1...HEAD +[2.0.1]: https://github.com/reecem/h-bar/compare/v1.0.1...v2.0.1 [1.1.0]: https://github.com/reecem/h-bar/compare/v1.0.1...v1.1.0 [1.0.1]: https://github.com/reecem/h-bar/compare/v0.3.0...v1.0.1 [0.3.0]: https://github.com/reecem/h-bar/compare/v0.2.1...v0.3.0 diff --git a/dist/hBar.js b/dist/hBar.js index 36544b6..932ece9 100644 --- a/dist/hBar.js +++ b/dist/hBar.js @@ -7,173 +7,147 @@ exports["hBar"] = factory(); else root["hBar"] = factory(); -})(window, function() { -return /******/ (function(modules) { // webpackBootstrap -/******/ // The module cache -/******/ var installedModules = {}; -/******/ -/******/ // The require function -/******/ function __webpack_require__(moduleId) { -/******/ -/******/ // Check if module is in cache -/******/ if(installedModules[moduleId]) { -/******/ return installedModules[moduleId].exports; -/******/ } -/******/ // Create a new module (and put it into the cache) -/******/ var module = installedModules[moduleId] = { -/******/ i: moduleId, -/******/ l: false, -/******/ exports: {} -/******/ }; -/******/ -/******/ // Execute the module function -/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); -/******/ -/******/ // Flag the module as loaded -/******/ module.l = true; -/******/ -/******/ // Return the exports of the module -/******/ return module.exports; -/******/ } -/******/ -/******/ -/******/ // expose the modules object (__webpack_modules__) -/******/ __webpack_require__.m = modules; -/******/ -/******/ // expose the module cache -/******/ __webpack_require__.c = installedModules; -/******/ -/******/ // define getter function for harmony exports -/******/ __webpack_require__.d = function(exports, name, getter) { -/******/ if(!__webpack_require__.o(exports, name)) { -/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); -/******/ } -/******/ }; -/******/ -/******/ // define __esModule on exports -/******/ __webpack_require__.r = function(exports) { -/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { -/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); -/******/ } -/******/ Object.defineProperty(exports, '__esModule', { value: true }); -/******/ }; -/******/ -/******/ // create a fake namespace object -/******/ // mode & 1: value is a module id, require it -/******/ // mode & 2: merge all properties of value into the ns -/******/ // mode & 4: return value when already ns object -/******/ // mode & 8|1: behave like require -/******/ __webpack_require__.t = function(value, mode) { -/******/ if(mode & 1) value = __webpack_require__(value); -/******/ if(mode & 8) return value; -/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; -/******/ var ns = Object.create(null); -/******/ __webpack_require__.r(ns); -/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); -/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); -/******/ return ns; -/******/ }; -/******/ -/******/ // getDefaultExport function for compatibility with non-harmony modules -/******/ __webpack_require__.n = function(module) { -/******/ var getter = module && module.__esModule ? -/******/ function getDefault() { return module['default']; } : -/******/ function getModuleExports() { return module; }; -/******/ __webpack_require__.d(getter, 'a', getter); -/******/ return getter; -/******/ }; -/******/ -/******/ // Object.prototype.hasOwnProperty.call -/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; -/******/ -/******/ // __webpack_public_path__ -/******/ __webpack_require__.p = ""; -/******/ -/******/ -/******/ // Load entry module and return exports -/******/ return __webpack_require__(__webpack_require__.s = 4); -/******/ }) -/************************************************************************/ -/******/ ([ -/* 0 */ -/***/ (function(module, exports, __webpack_require__) { +})(self, () => { +return /******/ (() => { // webpackBootstrap +/******/ "use strict"; +/******/ var __webpack_modules__ = ({ + +/***/ 363: +/***/ ((module, __webpack_exports__, __webpack_require__) => { + +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "Z": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(81); +/* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(645); +/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__); +// Imports -var api = __webpack_require__(1); - var content = __webpack_require__(2); - content = content.__esModule ? content.default : content; +var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default())); +// Module +___CSS_LOADER_EXPORT___.push([module.id, "*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 transparent;--tw-ring-shadow:0 0 transparent;--tw-shadow:0 0 transparent;--tw-shadow-colored:0 0 transparent;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 transparent;--tw-ring-shadow:0 0 transparent;--tw-shadow:0 0 transparent;--tw-shadow-colored:0 0 transparent;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.hb-mx-2{margin-left:.5rem;margin-right:.5rem}.hb-mx-5{margin-left:1.25rem;margin-right:1.25rem}.hb--mr-2{margin-right:-.5rem}.hb-flex{display:flex}.hb-inline-flex{display:inline-flex}.hb-h-3{height:.75rem}.hb-h-4{height:1rem}.hb-w-3{width:.75rem}.hb-w-4{width:1rem}.hb-w-full{width:100%}.hb-cursor-pointer{cursor:pointer}.hb-items-center{align-items:center}.hb-justify-between{justify-content:space-between}.hb-rounded-md{border-radius:.375rem}.hb-rounded-full{border-radius:9999px}.hb-bg-gray-900{--tw-bg-opacity:1;background-color:rgba(17,24,39,var(--tw-bg-opacity))}.hb-bg-white{--tw-bg-opacity:1;background-color:rgba(255,255,255,var(--tw-bg-opacity))}.hb-bg-gray-400{--tw-bg-opacity:1;background-color:rgba(156,163,175,var(--tw-bg-opacity))}.hb-bg-blue-900{--tw-bg-opacity:1;background-color:rgba(30,58,138,var(--tw-bg-opacity))}.hb-bg-blue-100{--tw-bg-opacity:1;background-color:rgba(219,234,254,var(--tw-bg-opacity))}.hb-bg-green-600{--tw-bg-opacity:1;background-color:rgba(22,163,74,var(--tw-bg-opacity))}.hb-bg-green-100{--tw-bg-opacity:1;background-color:rgba(220,252,231,var(--tw-bg-opacity))}.hb-bg-indigo-800{--tw-bg-opacity:1;background-color:rgba(55,48,163,var(--tw-bg-opacity))}.hb-bg-indigo-100{--tw-bg-opacity:1;background-color:rgba(224,231,255,var(--tw-bg-opacity))}.hb-bg-orange-300{--tw-bg-opacity:1;background-color:rgba(253,186,116,var(--tw-bg-opacity))}.hb-bg-orange-800{--tw-bg-opacity:1;background-color:rgba(154,52,18,var(--tw-bg-opacity))}.hb-bg-yellow-300{--tw-bg-opacity:1;background-color:rgba(253,224,71,var(--tw-bg-opacity))}.hb-bg-yellow-100{--tw-bg-opacity:1;background-color:rgba(254,249,195,var(--tw-bg-opacity))}.hb-bg-teal-500{--tw-bg-opacity:1;background-color:rgba(20,184,166,var(--tw-bg-opacity))}.hb-bg-teal-900{--tw-bg-opacity:1;background-color:rgba(19,78,74,var(--tw-bg-opacity))}.hb-bg-red-400{--tw-bg-opacity:1;background-color:rgba(248,113,113,var(--tw-bg-opacity))}.hb-bg-red-100{--tw-bg-opacity:1;background-color:rgba(254,226,226,var(--tw-bg-opacity))}.hb-p-1{padding:.25rem}.hb-py-2{padding-bottom:.5rem;padding-top:.5rem}.hb-px-1{padding-left:.25rem;padding-right:.25rem}.hb-px-2{padding-left:.5rem;padding-right:.5rem}.hb-text-sm{font-size:.875rem;line-height:1.25rem}.hb-text-xs{font-size:.75rem;line-height:1rem}.hb-font-semibold{font-weight:600}.hb-uppercase{text-transform:uppercase}.hb-leading-relaxed{line-height:1.625}.hb-tracking-wider{letter-spacing:.05em}.hb-text-gray-100{--tw-text-opacity:1;color:rgba(243,244,246,var(--tw-text-opacity))}.hb-text-gray-900{--tw-text-opacity:1;color:rgba(17,24,39,var(--tw-text-opacity))}.hb-text-gray-800{--tw-text-opacity:1;color:rgba(31,41,55,var(--tw-text-opacity))}.hb-text-blue-100{--tw-text-opacity:1;color:rgba(219,234,254,var(--tw-text-opacity))}.hb-text-blue-900{--tw-text-opacity:1;color:rgba(30,58,138,var(--tw-text-opacity))}.hb-text-green-100{--tw-text-opacity:1;color:rgba(220,252,231,var(--tw-text-opacity))}.hb-text-green-900{--tw-text-opacity:1;color:rgba(20,83,45,var(--tw-text-opacity))}.hb-text-indigo-100{--tw-text-opacity:1;color:rgba(224,231,255,var(--tw-text-opacity))}.hb-text-indigo-900{--tw-text-opacity:1;color:rgba(49,46,129,var(--tw-text-opacity))}.hb-text-orange-900{--tw-text-opacity:1;color:rgba(124,45,18,var(--tw-text-opacity))}.hb-text-orange-100{--tw-text-opacity:1;color:rgba(255,237,213,var(--tw-text-opacity))}.hb-text-yellow-900{--tw-text-opacity:1;color:rgba(113,63,18,var(--tw-text-opacity))}.hb-text-teal-100{--tw-text-opacity:1;color:rgba(204,251,241,var(--tw-text-opacity))}.hb-text-red-900{--tw-text-opacity:1;color:rgba(127,29,29,var(--tw-text-opacity))}a{background-color:transparent;color:inherit;text-decoration:inherit}*,:after,:before{border:0 solid #e2e8f0;box-sizing:border-box}.fade-in-top{animation:fade-in-top .8s cubic-bezier(.39,.575,.565,1)}@keyframes fade-in-top{0%{opacity:0;transform:translateY(-50px)}to{opacity:1;transform:translateY(0)}}.hover\\:hb-bg-gray-800:hover{--tw-bg-opacity:1;background-color:rgba(31,41,55,var(--tw-bg-opacity))}.hover\\:hb-text-white:hover{--tw-text-opacity:1;color:rgba(255,255,255,var(--tw-text-opacity))}.hover\\:hb-text-gray-300:hover{--tw-text-opacity:1;color:rgba(209,213,219,var(--tw-text-opacity))}.hover\\:hb-text-gray-600:hover{--tw-text-opacity:1;color:rgba(75,85,99,var(--tw-text-opacity))}.hover\\:hb-text-blue-300:hover{--tw-text-opacity:1;color:rgba(147,197,253,var(--tw-text-opacity))}.hover\\:hb-text-green-300:hover{--tw-text-opacity:1;color:rgba(134,239,172,var(--tw-text-opacity))}.hover\\:hb-text-indigo-300:hover{--tw-text-opacity:1;color:rgba(165,180,252,var(--tw-text-opacity))}.hover\\:hb-text-orange-700:hover{--tw-text-opacity:1;color:rgba(194,65,12,var(--tw-text-opacity))}.hover\\:hb-text-yellow-700:hover{--tw-text-opacity:1;color:rgba(161,98,7,var(--tw-text-opacity))}.hover\\:hb-text-teal-300:hover{--tw-text-opacity:1;color:rgba(94,234,212,var(--tw-text-opacity))}.hover\\:hb-text-red-100:hover{--tw-text-opacity:1;color:rgba(254,226,226,var(--tw-text-opacity))}.hover\\:hb-underline:hover{text-decoration-line:underline}.focus\\:hb-bg-gray-800:focus{--tw-bg-opacity:1;background-color:rgba(31,41,55,var(--tw-bg-opacity))}.focus\\:hb-outline-none:focus{outline:2px solid transparent;outline-offset:2px}@media (min-width:768px){.md\\:hb-flex-row{flex-direction:row}.md\\:hb-px-20{padding-left:5rem;padding-right:5rem}}", ""]); +// Exports +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___); - if (typeof content === 'string') { - content = [[module.i, content, '']]; - } -var options = {}; +/***/ }), -options.insert = "head"; -options.singleton = false; +/***/ 645: +/***/ ((module) => { -var update = api(content, options); -var exported = content.locals ? content.locals : {}; +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ +module.exports = function (cssWithMappingToString) { + var list = []; + // return the list of modules as css string + list.toString = function toString() { + return this.map(function (item) { + var content = ""; + var needLayer = typeof item[5] !== "undefined"; + if (item[4]) { + content += "@supports (".concat(item[4], ") {"); + } + if (item[2]) { + content += "@media ".concat(item[2], " {"); + } + if (needLayer) { + content += "@layer".concat(item[5].length > 0 ? " ".concat(item[5]) : "", " {"); + } + content += cssWithMappingToString(item); + if (needLayer) { + content += "}"; + } + if (item[2]) { + content += "}"; + } + if (item[4]) { + content += "}"; + } + return content; + }).join(""); + }; -module.exports = exported; + // import a list of modules into the list + list.i = function i(modules, media, dedupe, supports, layer) { + if (typeof modules === "string") { + modules = [[null, modules, undefined]]; + } + var alreadyImportedModules = {}; + if (dedupe) { + for (var k = 0; k < this.length; k++) { + var id = this[k][0]; + if (id != null) { + alreadyImportedModules[id] = true; + } + } + } + for (var _k = 0; _k < modules.length; _k++) { + var item = [].concat(modules[_k]); + if (dedupe && alreadyImportedModules[item[0]]) { + continue; + } + if (typeof layer !== "undefined") { + if (typeof item[5] === "undefined") { + item[5] = layer; + } else { + item[1] = "@layer".concat(item[5].length > 0 ? " ".concat(item[5]) : "", " {").concat(item[1], "}"); + item[5] = layer; + } + } + if (media) { + if (!item[2]) { + item[2] = media; + } else { + item[1] = "@media ".concat(item[2], " {").concat(item[1], "}"); + item[2] = media; + } + } + if (supports) { + if (!item[4]) { + item[4] = "".concat(supports); + } else { + item[1] = "@supports (".concat(item[4], ") {").concat(item[1], "}"); + item[4] = supports; + } + } + list.push(item); + } + }; + return list; +}; /***/ }), -/* 1 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var isOldIE = function isOldIE() { - var memo; - return function memorize() { - if (typeof memo === 'undefined') { - // Test for IE <= 9 as proposed by Browserhacks - // @see http://browserhacks.com/#hack-e71d8692f65334173fee715c222cb805 - // Tests for existence of standard globals is to allow style-loader - // to operate correctly into non-standard environments - // @see https://github.com/webpack-contrib/style-loader/issues/177 - memo = Boolean(window && document && document.all && !window.atob); - } - return memo; - }; -}(); +/***/ 81: +/***/ ((module) => { -var getTarget = function getTarget() { - var memo = {}; - return function memorize(target) { - if (typeof memo[target] === 'undefined') { - var styleTarget = document.querySelector(target); // Special case to return head of iframe instead of iframe itself - - if (window.HTMLIFrameElement && styleTarget instanceof window.HTMLIFrameElement) { - try { - // This will throw an exception if access to iframe is blocked - // due to cross-origin restrictions - styleTarget = styleTarget.contentDocument.head; - } catch (e) { - // istanbul ignore next - styleTarget = null; - } - } - memo[target] = styleTarget; - } - return memo[target]; - }; -}(); +module.exports = function (i) { + return i[1]; +}; -var stylesInDom = []; +/***/ }), + +/***/ 379: +/***/ ((module) => { + + + +var stylesInDOM = []; function getIndexByIdentifier(identifier) { var result = -1; - for (var i = 0; i < stylesInDom.length; i++) { - if (stylesInDom[i].identifier === identifier) { + for (var i = 0; i < stylesInDOM.length; i++) { + if (stylesInDOM[i].identifier === identifier) { result = i; break; } @@ -192,20 +166,24 @@ function modulesToDom(list, options) { var count = idCountMap[id] || 0; var identifier = "".concat(id, " ").concat(count); idCountMap[id] = count + 1; - var index = getIndexByIdentifier(identifier); + var indexByIdentifier = getIndexByIdentifier(identifier); var obj = { css: item[1], media: item[2], - sourceMap: item[3] + sourceMap: item[3], + supports: item[4], + layer: item[5] }; - if (index !== -1) { - stylesInDom[index].references++; - stylesInDom[index].updater(obj); + if (indexByIdentifier !== -1) { + stylesInDOM[indexByIdentifier].references++; + stylesInDOM[indexByIdentifier].updater(obj); } else { - stylesInDom.push({ + var updater = addElementStyle(obj, options); + options.byIndex = i; + stylesInDOM.splice(i, 0, { identifier: identifier, - updater: addStyle(obj, options), + updater: updater, references: 1 }); } @@ -216,310 +194,357 @@ function modulesToDom(list, options) { return identifiers; } -function insertStyleElement(options) { - var style = document.createElement('style'); - var attributes = options.attributes || {}; +function addElementStyle(obj, options) { + var api = options.domAPI(options); + api.update(obj); - if (typeof attributes.nonce === 'undefined') { - var nonce = true ? __webpack_require__.nc : undefined; + var updater = function updater(newObj) { + if (newObj) { + if (newObj.css === obj.css && newObj.media === obj.media && newObj.sourceMap === obj.sourceMap && newObj.supports === obj.supports && newObj.layer === obj.layer) { + return; + } - if (nonce) { - attributes.nonce = nonce; + api.update(obj = newObj); + } else { + api.remove(); } - } + }; - Object.keys(attributes).forEach(function (key) { - style.setAttribute(key, attributes[key]); - }); + return updater; +} - if (typeof options.insert === 'function') { - options.insert(style); - } else { - var target = getTarget(options.insert || 'head'); +module.exports = function (list, options) { + options = options || {}; + list = list || []; + var lastIdentifiers = modulesToDom(list, options); + return function update(newList) { + newList = newList || []; - if (!target) { - throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid."); + for (var i = 0; i < lastIdentifiers.length; i++) { + var identifier = lastIdentifiers[i]; + var index = getIndexByIdentifier(identifier); + stylesInDOM[index].references--; } - target.appendChild(style); - } + var newLastIdentifiers = modulesToDom(newList, options); - return style; -} + for (var _i = 0; _i < lastIdentifiers.length; _i++) { + var _identifier = lastIdentifiers[_i]; -function removeStyleElement(style) { - // istanbul ignore if - if (style.parentNode === null) { - return false; - } + var _index = getIndexByIdentifier(_identifier); - style.parentNode.removeChild(style); -} -/* istanbul ignore next */ + if (stylesInDOM[_index].references === 0) { + stylesInDOM[_index].updater(); + stylesInDOM.splice(_index, 1); + } + } -var replaceText = function replaceText() { - var textStore = []; - return function replace(index, replacement) { - textStore[index] = replacement; - return textStore.filter(Boolean).join('\n'); + lastIdentifiers = newLastIdentifiers; }; -}(); +}; -function applyToSingletonTag(style, index, remove, obj) { - var css = remove ? '' : obj.media ? "@media ".concat(obj.media, " {").concat(obj.css, "}") : obj.css; // For old IE +/***/ }), - /* istanbul ignore if */ +/***/ 569: +/***/ ((module) => { - if (style.styleSheet) { - style.styleSheet.cssText = replaceText(index, css); - } else { - var cssNode = document.createTextNode(css); - var childNodes = style.childNodes; - if (childNodes[index]) { - style.removeChild(childNodes[index]); - } - if (childNodes.length) { - style.insertBefore(cssNode, childNodes[index]); - } else { - style.appendChild(cssNode); +var memo = {}; +/* istanbul ignore next */ + +function getTarget(target) { + if (typeof memo[target] === "undefined") { + var styleTarget = document.querySelector(target); // Special case to return head of iframe instead of iframe itself + + if (window.HTMLIFrameElement && styleTarget instanceof window.HTMLIFrameElement) { + try { + // This will throw an exception if access to iframe is blocked + // due to cross-origin restrictions + styleTarget = styleTarget.contentDocument.head; + } catch (e) { + // istanbul ignore next + styleTarget = null; + } } + + memo[target] = styleTarget; } + + return memo[target]; } +/* istanbul ignore next */ -function applyToTag(style, options, obj) { - var css = obj.css; - var media = obj.media; - var sourceMap = obj.sourceMap; - if (media) { - style.setAttribute('media', media); - } else { - style.removeAttribute('media'); +function insertBySelector(insert, style) { + var target = getTarget(insert); + + if (!target) { + throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid."); } - if (sourceMap && btoa) { - css += "\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))), " */"); - } // For old IE + target.appendChild(style); +} - /* istanbul ignore if */ +module.exports = insertBySelector; + +/***/ }), +/***/ 216: +/***/ ((module) => { - if (style.styleSheet) { - style.styleSheet.cssText = css; - } else { - while (style.firstChild) { - style.removeChild(style.firstChild); - } - style.appendChild(document.createTextNode(css)); - } + +/* istanbul ignore next */ +function insertStyleElement(options) { + var element = document.createElement("style"); + options.setAttributes(element, options.attributes); + options.insert(element, options.options); + return element; } -var singleton = null; -var singletonCounter = 0; +module.exports = insertStyleElement; -function addStyle(obj, options) { - var style; - var update; - var remove; +/***/ }), - if (options.singleton) { - var styleIndex = singletonCounter++; - style = singleton || (singleton = insertStyleElement(options)); - update = applyToSingletonTag.bind(null, style, styleIndex, false); - remove = applyToSingletonTag.bind(null, style, styleIndex, true); - } else { - style = insertStyleElement(options); - update = applyToTag.bind(null, style, options); +/***/ 565: +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - remove = function remove() { - removeStyleElement(style); - }; - } - update(obj); - return function updateStyle(newObj) { - if (newObj) { - if (newObj.css === obj.css && newObj.media === obj.media && newObj.sourceMap === obj.sourceMap) { - return; - } - update(obj = newObj); - } else { - remove(); - } - }; +/* istanbul ignore next */ +function setAttributesWithoutAttributes(styleElement) { + var nonce = true ? __webpack_require__.nc : 0; + + if (nonce) { + styleElement.setAttribute("nonce", nonce); + } } -module.exports = function (list, options) { - options = options || {}; // Force single-tag solution on IE6-9, which has a hard limit on the # of