@ohos-ports/rsbuild-core 2.2.9-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (269) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +27 -0
  3. package/bin/rsbuild.js +20 -0
  4. package/compiled/@rstackjs/load-config/index.d.ts +87 -0
  5. package/compiled/@rstackjs/load-config/license +21 -0
  6. package/compiled/@rstackjs/load-config/package.json +1 -0
  7. package/compiled/chokidar/index.d.ts +385 -0
  8. package/compiled/chokidar/license +21 -0
  9. package/compiled/chokidar/package.json +1 -0
  10. package/compiled/connect-next/index.d.ts +57 -0
  11. package/compiled/connect-next/license +26 -0
  12. package/compiled/connect-next/package.json +1 -0
  13. package/compiled/cors/index.d.ts +56 -0
  14. package/compiled/cors/license +22 -0
  15. package/compiled/cors/package.json +1 -0
  16. package/compiled/css-loader/api.js +85 -0
  17. package/compiled/css-loader/getUrl.js +26 -0
  18. package/compiled/css-loader/index.d.ts +1 -0
  19. package/compiled/css-loader/index.js +2 -0
  20. package/compiled/css-loader/license +20 -0
  21. package/compiled/css-loader/noSourceMaps.js +5 -0
  22. package/compiled/css-loader/package.json +1 -0
  23. package/compiled/css-loader/sourceMaps.js +16 -0
  24. package/compiled/html-rspack-plugin/default_index.ejs +9 -0
  25. package/compiled/html-rspack-plugin/htmlLoader.js +157 -0
  26. package/compiled/html-rspack-plugin/index.d.ts +395 -0
  27. package/compiled/html-rspack-plugin/index.js +2400 -0
  28. package/compiled/html-rspack-plugin/license +20 -0
  29. package/compiled/html-rspack-plugin/package.json +1 -0
  30. package/compiled/http-proxy-middleware/index.d.ts +455 -0
  31. package/compiled/http-proxy-middleware/license +22 -0
  32. package/compiled/http-proxy-middleware/package.json +1 -0
  33. package/compiled/jiti/LICENSE +21 -0
  34. package/compiled/jiti/README.md +258 -0
  35. package/compiled/jiti/dist/babel.cjs +47446 -0
  36. package/compiled/jiti/dist/jiti.cjs +5990 -0
  37. package/compiled/jiti/lib/jiti-cli.mjs +19 -0
  38. package/compiled/jiti/lib/jiti-hooks.mjs +89 -0
  39. package/compiled/jiti/lib/jiti-native.mjs +76 -0
  40. package/compiled/jiti/lib/jiti-register.d.mts +1 -0
  41. package/compiled/jiti/lib/jiti-register.mjs +2 -0
  42. package/compiled/jiti/lib/jiti-static.mjs +19 -0
  43. package/compiled/jiti/lib/jiti.cjs +24 -0
  44. package/compiled/jiti/lib/jiti.d.cts +8 -0
  45. package/compiled/jiti/lib/jiti.d.mts +8 -0
  46. package/compiled/jiti/lib/jiti.mjs +23 -0
  47. package/compiled/jiti/lib/types.d.ts +420 -0
  48. package/compiled/jiti/package.json +146 -0
  49. package/compiled/postcss/index.js +1 -0
  50. package/compiled/postcss/lib/at-rule.d.ts +139 -0
  51. package/compiled/postcss/lib/comment.d.ts +67 -0
  52. package/compiled/postcss/lib/container.d.ts +474 -0
  53. package/compiled/postcss/lib/css-syntax-error.d.ts +247 -0
  54. package/compiled/postcss/lib/declaration.d.ts +150 -0
  55. package/compiled/postcss/lib/document.d.ts +68 -0
  56. package/compiled/postcss/lib/fromJSON.d.ts +9 -0
  57. package/compiled/postcss/lib/input.d.ts +226 -0
  58. package/compiled/postcss/lib/lazy-result.d.ts +189 -0
  59. package/compiled/postcss/lib/list.d.ts +60 -0
  60. package/compiled/postcss/lib/no-work-result.d.ts +45 -0
  61. package/compiled/postcss/lib/node.d.ts +555 -0
  62. package/compiled/postcss/lib/parse.d.ts +9 -0
  63. package/compiled/postcss/lib/postcss.d.ts +464 -0
  64. package/compiled/postcss/lib/previous-map.d.ts +80 -0
  65. package/compiled/postcss/lib/processor.d.ts +114 -0
  66. package/compiled/postcss/lib/result.d.ts +204 -0
  67. package/compiled/postcss/lib/root.d.ts +86 -0
  68. package/compiled/postcss/lib/rule.d.ts +126 -0
  69. package/compiled/postcss/lib/source-map-js.d.ts +4 -0
  70. package/compiled/postcss/lib/stringifier.d.ts +45 -0
  71. package/compiled/postcss/lib/stringify.d.ts +9 -0
  72. package/compiled/postcss/lib/warning.d.ts +146 -0
  73. package/compiled/postcss/license +20 -0
  74. package/compiled/postcss/package.json +1 -0
  75. package/compiled/postcss-loader/index.d.ts +1 -0
  76. package/compiled/postcss-loader/index.js +721 -0
  77. package/compiled/postcss-loader/license +20 -0
  78. package/compiled/postcss-loader/package.json +1 -0
  79. package/compiled/rslog/index.d.ts +98 -0
  80. package/compiled/rslog/license +21 -0
  81. package/compiled/rslog/package.json +1 -0
  82. package/compiled/rspack-chain/license +22 -0
  83. package/compiled/rspack-chain/package.json +1 -0
  84. package/compiled/rspack-chain/types/index.d.ts +515 -0
  85. package/compiled/rspack-manifest-plugin/index.d.ts +52 -0
  86. package/compiled/rspack-manifest-plugin/license +21 -0
  87. package/compiled/rspack-manifest-plugin/package.json +1 -0
  88. package/compiled/style-loader/index.d.ts +1 -0
  89. package/compiled/style-loader/index.js +370 -0
  90. package/compiled/style-loader/license +20 -0
  91. package/compiled/style-loader/package.json +1 -0
  92. package/compiled/style-loader/runtime/injectStylesIntoLinkTag.js +29 -0
  93. package/compiled/style-loader/runtime/injectStylesIntoStyleTag.js +84 -0
  94. package/compiled/style-loader/runtime/insertBySelector.js +34 -0
  95. package/compiled/style-loader/runtime/insertStyleElement.js +10 -0
  96. package/compiled/style-loader/runtime/isEqualLocals.js +28 -0
  97. package/compiled/style-loader/runtime/isOldIE.js +17 -0
  98. package/compiled/style-loader/runtime/setAttributesWithAttributes.js +13 -0
  99. package/compiled/style-loader/runtime/setAttributesWithAttributesAndNonce.js +9 -0
  100. package/compiled/style-loader/runtime/setAttributesWithoutAttributes.js +10 -0
  101. package/compiled/style-loader/runtime/singletonStyleDomAPI.js +86 -0
  102. package/compiled/style-loader/runtime/styleDomAPI.js +61 -0
  103. package/compiled/style-loader/runtime/styleTagTransform.js +14 -0
  104. package/compiled/ws/index.d.ts +445 -0
  105. package/compiled/ws/license +21 -0
  106. package/compiled/ws/package.json +1 -0
  107. package/dist/build.d.ts +4 -0
  108. package/dist/c.js +10 -0
  109. package/dist/chokidar.js +2 -0
  110. package/dist/chokidar.js.LICENSE.txt +1 -0
  111. package/dist/cli/commands.d.ts +31 -0
  112. package/dist/cli/index.d.ts +7 -0
  113. package/dist/cli/init.d.ts +7 -0
  114. package/dist/client/f~0.js +22 -0
  115. package/dist/client/hmr.js +267 -0
  116. package/dist/client/overlay.js +214 -0
  117. package/dist/configChain.d.ts +84 -0
  118. package/dist/connect-next.js +2 -0
  119. package/dist/connect-next.js.LICENSE.txt +57 -0
  120. package/dist/constants.d.ts +67 -0
  121. package/dist/cors.js +188 -0
  122. package/dist/cors.js.LICENSE.txt +11 -0
  123. package/dist/createCompiler.d.ts +6 -0
  124. package/dist/createContext.d.ts +12 -0
  125. package/dist/createRsbuild.d.ts +4 -0
  126. package/dist/cssUrlLoader.mjs +34 -0
  127. package/dist/defaultConfig.d.ts +23 -0
  128. package/dist/freshImport.js +90 -0
  129. package/dist/helpers/cachedImport.d.ts +2 -0
  130. package/dist/helpers/compiler.d.ts +5 -0
  131. package/dist/helpers/css.d.ts +3 -0
  132. package/dist/helpers/exitHook.d.ts +3 -0
  133. package/dist/helpers/format.d.ts +4 -0
  134. package/dist/helpers/fs.d.ts +16 -0
  135. package/dist/helpers/html.d.ts +2 -0
  136. package/dist/helpers/index.d.ts +29 -0
  137. package/dist/helpers/overlayConfig.d.ts +4 -0
  138. package/dist/helpers/packageJson.d.ts +9 -0
  139. package/dist/helpers/path.d.ts +22 -0
  140. package/dist/helpers/restartManager.d.ts +15 -0
  141. package/dist/helpers/stats.d.ts +17 -0
  142. package/dist/helpers/url.d.ts +11 -0
  143. package/dist/helpers/vendors.d.ts +12 -0
  144. package/dist/helpers/version.d.ts +7 -0
  145. package/dist/hooks.d.ts +41 -0
  146. package/dist/http-proxy-middleware.js +14 -0
  147. package/dist/http-proxy-middleware.js.LICENSE.txt +34 -0
  148. package/dist/ignoreCssLoader.mjs +9 -0
  149. package/dist/index.d.ts +28 -0
  150. package/dist/index.js +1 -0
  151. package/dist/initConfigs.d.ts +18 -0
  152. package/dist/initPlugins.d.ts +7 -0
  153. package/dist/inspectConfig.d.ts +7 -0
  154. package/dist/launch-editor-middleware.js +1 -0
  155. package/dist/loadConfig.d.ts +31 -0
  156. package/dist/loadEnv.d.ts +54 -0
  157. package/dist/loader/cssUrlLoader.d.ts +9 -0
  158. package/dist/loader/ignoreCssLoader.d.ts +10 -0
  159. package/dist/loader/transformLoader.d.ts +8 -0
  160. package/dist/loader/transformRawLoader.d.ts +4 -0
  161. package/dist/loader/workerLoader.d.ts +6 -0
  162. package/dist/logger.d.ts +24 -0
  163. package/dist/m.js +10348 -0
  164. package/dist/m.js.LICENSE.txt +26 -0
  165. package/dist/manifest-plugin.js +1 -0
  166. package/dist/memfs.js +1 -0
  167. package/dist/mergeConfig.d.ts +7 -0
  168. package/dist/open.js +2 -0
  169. package/dist/pluginHelper.d.ts +4 -0
  170. package/dist/pluginManager.d.ts +19 -0
  171. package/dist/plugins/appIcon.d.ts +2 -0
  172. package/dist/plugins/asset.d.ts +3 -0
  173. package/dist/plugins/basic.d.ts +4 -0
  174. package/dist/plugins/cache.d.ts +2 -0
  175. package/dist/plugins/cleanOutput.d.ts +2 -0
  176. package/dist/plugins/css.d.ts +8 -0
  177. package/dist/plugins/define.d.ts +2 -0
  178. package/dist/plugins/entry.d.ts +2 -0
  179. package/dist/plugins/externals.d.ts +9 -0
  180. package/dist/plugins/fileSize.d.ts +7 -0
  181. package/dist/plugins/html.d.ts +9 -0
  182. package/dist/plugins/inlineChunk.d.ts +6 -0
  183. package/dist/plugins/lazyCompilation.d.ts +2 -0
  184. package/dist/plugins/manifest.d.ts +2 -0
  185. package/dist/plugins/minimize.d.ts +10 -0
  186. package/dist/plugins/moduleFederation.d.ts +2 -0
  187. package/dist/plugins/nodeAddons.d.ts +2 -0
  188. package/dist/plugins/nonce.d.ts +2 -0
  189. package/dist/plugins/output.d.ts +2 -0
  190. package/dist/plugins/progress.d.ts +2 -0
  191. package/dist/plugins/resolve.d.ts +2 -0
  192. package/dist/plugins/resourceHints.d.ts +2 -0
  193. package/dist/plugins/rsdoctor.d.ts +2 -0
  194. package/dist/plugins/rspackProfile.d.ts +4 -0
  195. package/dist/plugins/server.d.ts +3 -0
  196. package/dist/plugins/sourceMap.d.ts +2 -0
  197. package/dist/plugins/splitChunks.d.ts +4 -0
  198. package/dist/plugins/sri.d.ts +2 -0
  199. package/dist/plugins/swc.d.ts +4 -0
  200. package/dist/plugins/target.d.ts +2 -0
  201. package/dist/plugins/wasm.d.ts +2 -0
  202. package/dist/plugins/worker.d.ts +2 -0
  203. package/dist/r.js +7 -0
  204. package/dist/range-parser.js +55 -0
  205. package/dist/range-parser.js.LICENSE.txt +6 -0
  206. package/dist/remapping.js +201 -0
  207. package/dist/restart.d.ts +15 -0
  208. package/dist/rslib-runtime.js +49 -0
  209. package/dist/rspack-plugins/RsbuildHtmlPlugin.d.ts +37 -0
  210. package/dist/rspack-plugins/resource-hints/HtmlResourceHintsPlugin.d.ts +36 -0
  211. package/dist/rspack-plugins/resource-hints/doesChunkBelongToHtml.d.ts +27 -0
  212. package/dist/rspack-plugins/resource-hints/extractChunks.d.ts +22 -0
  213. package/dist/rspack-plugins/resource-hints/getResourceType.d.ts +21 -0
  214. package/dist/rspackConfig.d.ts +8 -0
  215. package/dist/server/ansiHTML.d.ts +3 -0
  216. package/dist/server/assets-middleware/getFileFromUrl.d.ts +11 -0
  217. package/dist/server/assets-middleware/index.d.ts +35 -0
  218. package/dist/server/assets-middleware/memoryFileSystem.d.ts +2 -0
  219. package/dist/server/assets-middleware/middleware.d.ts +7 -0
  220. package/dist/server/assets-middleware/parseTokenList.d.ts +1 -0
  221. package/dist/server/assets-middleware/setupOutputFileSystem.d.ts +3 -0
  222. package/dist/server/assets-middleware/setupWriteToDisk.d.ts +15 -0
  223. package/dist/server/browserLogs.d.ts +8 -0
  224. package/dist/server/buildManager.d.ts +32 -0
  225. package/dist/server/cliShortcuts.d.ts +19 -0
  226. package/dist/server/compileState.d.ts +5 -0
  227. package/dist/server/devMiddlewares.d.ts +18 -0
  228. package/dist/server/devServer.d.ts +47 -0
  229. package/dist/server/environment.d.ts +8 -0
  230. package/dist/server/gracefulShutdown.d.ts +8 -0
  231. package/dist/server/gzipMiddleware.d.ts +2 -0
  232. package/dist/server/helper.d.ts +118 -0
  233. package/dist/server/historyApiFallback.d.ts +10 -0
  234. package/dist/server/hmrFallback.d.ts +1 -0
  235. package/dist/server/httpServer.d.ts +7 -0
  236. package/dist/server/middlewares.d.ts +31 -0
  237. package/dist/server/open.d.ts +12 -0
  238. package/dist/server/overlay.d.ts +3 -0
  239. package/dist/server/previewServer.d.ts +4 -0
  240. package/dist/server/proxy.d.ts +7 -0
  241. package/dist/server/publicPathnames.d.ts +2 -0
  242. package/dist/server/runner/asModule.d.ts +2 -0
  243. package/dist/server/runner/basic.d.ts +25 -0
  244. package/dist/server/runner/cjs.d.ts +10 -0
  245. package/dist/server/runner/esm.d.ts +6 -0
  246. package/dist/server/runner/index.d.ts +6 -0
  247. package/dist/server/runner/type.d.ts +42 -0
  248. package/dist/server/serverSetup.d.ts +2 -0
  249. package/dist/server/socketServer.d.ts +113 -0
  250. package/dist/server/watchFiles.d.ts +15 -0
  251. package/dist/sirv.js +122 -0
  252. package/dist/tinyglobby.js +1 -0
  253. package/dist/trace-mapping.js +548 -0
  254. package/dist/transformLoader.mjs +36 -0
  255. package/dist/transformRawLoader.mjs +4 -0
  256. package/dist/types/config.d.ts +1796 -0
  257. package/dist/types/context.d.ts +89 -0
  258. package/dist/types/hooks.d.ts +261 -0
  259. package/dist/types/index.d.ts +8 -0
  260. package/dist/types/plugin.d.ts +479 -0
  261. package/dist/types/rsbuild.d.ts +241 -0
  262. package/dist/types/rspack.d.ts +10 -0
  263. package/dist/types/thirdParty.d.ts +161 -0
  264. package/dist/types/utils.d.ts +16 -0
  265. package/dist/workerLoader.mjs +94 -0
  266. package/dist/ws.js +2 -0
  267. package/package.json +107 -0
  268. package/static/openChrome.applescript +95 -0
  269. package/types.d.ts +422 -0
@@ -0,0 +1,52 @@
1
+ import { Chunk, Compiler, Compilation, RspackPluginInstance } from '@rspack/core';
2
+
3
+ interface FileDescriptor {
4
+ chunk?: Chunk;
5
+ isAsset: boolean;
6
+ isChunk: boolean;
7
+ isInitial: boolean;
8
+ isModuleAsset: boolean;
9
+ name: string;
10
+ path: string;
11
+ /**
12
+ * Subresource Integrity (SRI) hash.
13
+ * This field is available only when the `SubresourceIntegrityPlugin` is used.
14
+ */
15
+ integrity?: string;
16
+ }
17
+
18
+ declare const getCompilerHooks: (compiler: Compiler) => any;
19
+
20
+ type Manifest = Record<string, any>;
21
+ interface InternalOptions {
22
+ [key: string]: any;
23
+ assetHookStage: number;
24
+ basePath: string;
25
+ fileName: string;
26
+ filter: (file: FileDescriptor) => boolean;
27
+ generate: (seed: Record<any, any>, files: FileDescriptor[], entries: Record<string, string[]>, context: {
28
+ compilation: Compilation;
29
+ }) => Manifest;
30
+ map: (file: FileDescriptor) => FileDescriptor;
31
+ publicPath: string;
32
+ removeKeyHash: RegExp | false;
33
+ seed: Record<any, any>;
34
+ serialize: (manifest: Manifest) => string;
35
+ sort: (fileA: FileDescriptor, fileB: FileDescriptor) => Number;
36
+ transformExtensions: RegExp;
37
+ useEntryKeys: boolean;
38
+ useLegacyEmit: boolean;
39
+ writeToFileEmit: boolean;
40
+ }
41
+ type ManifestPluginOptions = Partial<InternalOptions>;
42
+ type EmitCountMap = Map<any, any>;
43
+ declare class WebpackManifestPlugin implements RspackPluginInstance {
44
+ private options;
45
+ constructor(opts: ManifestPluginOptions);
46
+ apply(compiler: Compiler): void;
47
+ }
48
+
49
+ declare const RspackManifestPlugin: typeof WebpackManifestPlugin;
50
+
51
+ export { RspackManifestPlugin, WebpackManifestPlugin, getCompilerHooks };
52
+ export type { EmitCountMap, FileDescriptor, InternalOptions, Manifest, ManifestPluginOptions };
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) Dane Thurber <dane.thurber@gmail.com>
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
@@ -0,0 +1 @@
1
+ {"name":"rspack-manifest-plugin","author":"Dane Thurber <dane.thurber@gmail.com>","version":"5.2.2","license":"MIT","types":"index.d.ts","type":"commonjs"}
@@ -0,0 +1 @@
1
+ export = any;
@@ -0,0 +1,370 @@
1
+ (() => {
2
+ "use strict";
3
+ var __webpack_modules__ = {
4
+ 511: (module, __unused_webpack_exports, __nccwpck_require__) => {
5
+ const loader = __nccwpck_require__(153);
6
+ module.exports = loader.default;
7
+ },
8
+ 153: (__unused_webpack_module, exports, __nccwpck_require__) => {
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ exports["default"] = void 0;
11
+ var _path = _interopRequireDefault(__nccwpck_require__(928));
12
+ var _utils = __nccwpck_require__(420);
13
+ var _options = _interopRequireDefault(__nccwpck_require__(224));
14
+ function _interopRequireDefault(obj) {
15
+ return obj && obj.__esModule ? obj : { default: obj };
16
+ }
17
+ const loader = function loader(content) {
18
+ if (
19
+ this._compiler &&
20
+ this._compiler.options &&
21
+ this._compiler.options.experiments &&
22
+ this._compiler.options.experiments.css &&
23
+ this._module &&
24
+ (this._module.type === "css" ||
25
+ this._module.type === "css/global" ||
26
+ this._module.type === "css/module" ||
27
+ this._module.type === "css/auto")
28
+ ) {
29
+ return content;
30
+ }
31
+ };
32
+ loader.pitch = function pitch(request) {
33
+ if (
34
+ this._compiler &&
35
+ this._compiler.options &&
36
+ this._compiler.options.experiments &&
37
+ this._compiler.options.experiments.css &&
38
+ this._module &&
39
+ (this._module.type === "css" ||
40
+ this._module.type === "css/global" ||
41
+ this._module.type === "css/module" ||
42
+ this._module.type === "css/auto")
43
+ ) {
44
+ this.emitWarning(
45
+ new Error(
46
+ 'You can\'t use `experiments.css` (`experiments.futureDefaults` enable built-in CSS support by default) and `style-loader` together, please set `experiments.css` to `false` or set `{ type: "javascript/auto" }` for rules with `style-loader` in your webpack config (now `style-loader` does nothing).',
47
+ ),
48
+ );
49
+ return;
50
+ }
51
+ const options = this.getOptions(_options.default);
52
+ const injectType = options.injectType || "styleTag";
53
+ const esModule =
54
+ typeof options.esModule !== "undefined" ? options.esModule : true;
55
+ const runtimeOptions = {};
56
+ if (options.attributes) {
57
+ runtimeOptions.attributes = options.attributes;
58
+ }
59
+ if (options.base) {
60
+ runtimeOptions.base = options.base;
61
+ }
62
+ const insertType =
63
+ options.insert && _path.default.isAbsolute(options.insert)
64
+ ? "module-path"
65
+ : "selector";
66
+ switch (injectType) {
67
+ case "linkTag": {
68
+ const hmrCode = this.hot
69
+ ? (0, _utils.getLinkHmrCode)(esModule, this, request)
70
+ : "";
71
+ return `\n ${(0, _utils.getImportLinkAPICode)(esModule, this)}\n ${(0, _utils.getImportInsertBySelectorCode)(esModule, this, insertType, options)}\n ${(0, _utils.getImportLinkContentCode)(esModule, this, request)}\n ${esModule ? "" : `content = content.__esModule ? content.default : content;`}\n\nvar options = ${JSON.stringify(runtimeOptions)};\n\n${(0, _utils.getInsertOptionCode)(insertType, options)}\n\nvar update = API(content, options);\n\n${hmrCode}\n\n${esModule ? "export default {}" : ""}`;
72
+ }
73
+ case "lazyStyleTag":
74
+ case "lazyAutoStyleTag":
75
+ case "lazySingletonStyleTag": {
76
+ const isSingleton = injectType === "lazySingletonStyleTag";
77
+ const isAuto = injectType === "lazyAutoStyleTag";
78
+ const hmrCode = this.hot
79
+ ? (0, _utils.getStyleHmrCode)(esModule, this, request, true)
80
+ : "";
81
+ return `\n var exported = {};\n\n ${(0, _utils.getImportStyleAPICode)(esModule, this)}\n ${(0, _utils.getImportStyleDomAPICode)(esModule, this, isSingleton, isAuto)}\n ${(0, _utils.getImportInsertBySelectorCode)(esModule, this, insertType, options)}\n ${(0, _utils.getSetAttributesCode)(esModule, this, options)}\n ${(0, _utils.getImportInsertStyleElementCode)(esModule, this)}\n ${(0, _utils.getStyleTagTransformFnCode)(esModule, this, options, isSingleton)}\n ${(0, _utils.getImportStyleContentCode)(esModule, this, request)}\n ${isAuto ? (0, _utils.getImportIsOldIECode)(esModule, this) : ""}\n ${esModule ? `if (content && content.locals) {\n exported.locals = content.locals;\n }\n ` : `content = content.__esModule ? content.default : content;\n\n exported.locals = content.locals || {};`}\n\nvar refs = 0;\nvar update;\nvar options = ${JSON.stringify(runtimeOptions)};\n\n${(0, _utils.getStyleTagTransformFn)(options, isSingleton)};\noptions.setAttributes = setAttributes;\n${(0, _utils.getInsertOptionCode)(insertType, options)}\noptions.domAPI = ${(0, _utils.getdomAPI)(isAuto)};\noptions.insertStyleElement = insertStyleElement;\n\nexported.use = function(insertOptions) {\n options.options = insertOptions || {};\n\n if (!(refs++)) {\n update = API(content, options);\n }\n\n return exported;\n};\nexported.unuse = function() {\n if (refs > 0 && !--refs) {\n update();\n update = null;\n }\n};\n\n${hmrCode}\n\n${(0, _utils.getExportLazyStyleCode)(esModule, this, request)}\n`;
82
+ }
83
+ case "styleTag":
84
+ case "autoStyleTag":
85
+ case "singletonStyleTag":
86
+ default: {
87
+ const isSingleton = injectType === "singletonStyleTag";
88
+ const isAuto = injectType === "autoStyleTag";
89
+ const hmrCode = this.hot
90
+ ? (0, _utils.getStyleHmrCode)(esModule, this, request, false)
91
+ : "";
92
+ return `\n ${(0, _utils.getImportStyleAPICode)(esModule, this)}\n ${(0, _utils.getImportStyleDomAPICode)(esModule, this, isSingleton, isAuto)}\n ${(0, _utils.getImportInsertBySelectorCode)(esModule, this, insertType, options)}\n ${(0, _utils.getSetAttributesCode)(esModule, this, options)}\n ${(0, _utils.getImportInsertStyleElementCode)(esModule, this)}\n ${(0, _utils.getStyleTagTransformFnCode)(esModule, this, options, isSingleton)}\n ${(0, _utils.getImportStyleContentCode)(esModule, this, request)}\n ${isAuto ? (0, _utils.getImportIsOldIECode)(esModule, this) : ""}\n ${esModule ? "" : `content = content.__esModule ? content.default : content;`}\n\nvar options = ${JSON.stringify(runtimeOptions)};\n\n${(0, _utils.getStyleTagTransformFn)(options, isSingleton)};\noptions.setAttributes = setAttributes;\n${(0, _utils.getInsertOptionCode)(insertType, options)}\noptions.domAPI = ${(0, _utils.getdomAPI)(isAuto)};\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n${hmrCode}\n\n${(0, _utils.getExportStyleCode)(esModule, this, request)}\n`;
93
+ }
94
+ }
95
+ };
96
+ var _default = (exports["default"] = loader);
97
+ },
98
+ 790: (module) => {
99
+ function isEqualLocals(a, b, isNamedExport) {
100
+ if ((!a && b) || (a && !b)) {
101
+ return false;
102
+ }
103
+ var p;
104
+ for (p in a) {
105
+ if (isNamedExport && p === "default") {
106
+ continue;
107
+ }
108
+ if (a[p] !== b[p]) {
109
+ return false;
110
+ }
111
+ }
112
+ for (p in b) {
113
+ if (isNamedExport && p === "default") {
114
+ continue;
115
+ }
116
+ if (!a[p]) {
117
+ return false;
118
+ }
119
+ }
120
+ return true;
121
+ }
122
+ module.exports = isEqualLocals;
123
+ },
124
+ 420: (__unused_webpack_module, exports, __nccwpck_require__) => {
125
+ Object.defineProperty(exports, "__esModule", { value: true });
126
+ exports.getExportLazyStyleCode = getExportLazyStyleCode;
127
+ exports.getExportStyleCode = getExportStyleCode;
128
+ exports.getImportInsertBySelectorCode = getImportInsertBySelectorCode;
129
+ exports.getImportInsertStyleElementCode = getImportInsertStyleElementCode;
130
+ exports.getImportIsOldIECode = getImportIsOldIECode;
131
+ exports.getImportLinkAPICode = getImportLinkAPICode;
132
+ exports.getImportLinkContentCode = getImportLinkContentCode;
133
+ exports.getImportStyleAPICode = getImportStyleAPICode;
134
+ exports.getImportStyleContentCode = getImportStyleContentCode;
135
+ exports.getImportStyleDomAPICode = getImportStyleDomAPICode;
136
+ exports.getInsertOptionCode = getInsertOptionCode;
137
+ exports.getLinkHmrCode = getLinkHmrCode;
138
+ exports.getSetAttributesCode = getSetAttributesCode;
139
+ exports.getStyleHmrCode = getStyleHmrCode;
140
+ exports.getStyleTagTransformFn = getStyleTagTransformFn;
141
+ exports.getStyleTagTransformFnCode = getStyleTagTransformFnCode;
142
+ exports.getdomAPI = getdomAPI;
143
+ exports.stringifyRequest = stringifyRequest;
144
+ var _path = _interopRequireDefault(__nccwpck_require__(928));
145
+ var _isEqualLocals = _interopRequireDefault(__nccwpck_require__(790));
146
+ function _interopRequireDefault(obj) {
147
+ return obj && obj.__esModule ? obj : { default: obj };
148
+ }
149
+ function stringifyRequest(loaderContext, request) {
150
+ return JSON.stringify(
151
+ loaderContext.utils.contextify(loaderContext.context, request),
152
+ );
153
+ }
154
+ function getImportLinkAPICode(esModule, loaderContext) {
155
+ const modulePath = stringifyRequest(
156
+ loaderContext,
157
+ `!${_path.default.join(__dirname, "runtime/injectStylesIntoLinkTag.js")}`,
158
+ );
159
+ return esModule
160
+ ? `import API from ${modulePath};`
161
+ : `var API = require(${modulePath});`;
162
+ }
163
+ function getImportLinkContentCode(esModule, loaderContext, request) {
164
+ const modulePath = stringifyRequest(loaderContext, `!!${request}`);
165
+ return esModule
166
+ ? `import content from ${modulePath};`
167
+ : `var content = require(${modulePath});`;
168
+ }
169
+ function getImportStyleAPICode(esModule, loaderContext) {
170
+ const modulePath = stringifyRequest(
171
+ loaderContext,
172
+ `!${_path.default.join(__dirname, "runtime/injectStylesIntoStyleTag.js")}`,
173
+ );
174
+ return esModule
175
+ ? `import API from ${modulePath};`
176
+ : `var API = require(${modulePath});`;
177
+ }
178
+ function getImportStyleDomAPICode(
179
+ esModule,
180
+ loaderContext,
181
+ isSingleton,
182
+ isAuto,
183
+ ) {
184
+ const styleAPI = stringifyRequest(
185
+ loaderContext,
186
+ `!${_path.default.join(__dirname, "runtime/styleDomAPI.js")}`,
187
+ );
188
+ const singletonAPI = stringifyRequest(
189
+ loaderContext,
190
+ `!${_path.default.join(__dirname, "runtime/singletonStyleDomAPI.js")}`,
191
+ );
192
+ if (isAuto) {
193
+ return esModule
194
+ ? `import domAPI from ${styleAPI};\n import domAPISingleton from ${singletonAPI};`
195
+ : `var domAPI = require(${styleAPI});\n var domAPISingleton = require(${singletonAPI});`;
196
+ }
197
+ return esModule
198
+ ? `import domAPI from ${isSingleton ? singletonAPI : styleAPI};`
199
+ : `var domAPI = require(${isSingleton ? singletonAPI : styleAPI});`;
200
+ }
201
+ function getImportStyleContentCode(esModule, loaderContext, request) {
202
+ const modulePath = stringifyRequest(loaderContext, `!!${request}`);
203
+ return esModule
204
+ ? `import content, * as namedExport from ${modulePath};`
205
+ : `var content = require(${modulePath});`;
206
+ }
207
+ function getImportInsertBySelectorCode(
208
+ esModule,
209
+ loaderContext,
210
+ insertType,
211
+ options,
212
+ ) {
213
+ if (insertType === "module-path") {
214
+ const modulePath = stringifyRequest(
215
+ loaderContext,
216
+ `${options.insert}`,
217
+ );
218
+ loaderContext.addBuildDependency(options.insert);
219
+ return esModule
220
+ ? `import insertFn from ${modulePath};`
221
+ : `var insertFn = require(${modulePath});`;
222
+ }
223
+ const modulePath = stringifyRequest(
224
+ loaderContext,
225
+ `!${_path.default.join(__dirname, "runtime/insertBySelector.js")}`,
226
+ );
227
+ return esModule
228
+ ? `import insertFn from ${modulePath};`
229
+ : `var insertFn = require(${modulePath});`;
230
+ }
231
+ function getInsertOptionCode(insertType, options) {
232
+ if (insertType === "module-path") {
233
+ return `options.insert = insertFn;`;
234
+ }
235
+ const insert = options.insert
236
+ ? JSON.stringify(options.insert)
237
+ : '"head"';
238
+ return `options.insert = insertFn.bind(null, ${insert});`;
239
+ }
240
+ function getImportInsertStyleElementCode(esModule, loaderContext) {
241
+ const modulePath = stringifyRequest(
242
+ loaderContext,
243
+ `!${_path.default.join(__dirname, "runtime/insertStyleElement.js")}`,
244
+ );
245
+ return esModule
246
+ ? `import insertStyleElement from ${modulePath};`
247
+ : `var insertStyleElement = require(${modulePath});`;
248
+ }
249
+ function getStyleHmrCode(esModule, loaderContext, request, lazy) {
250
+ const modulePath = stringifyRequest(loaderContext, `!!${request}`);
251
+ return `\nif (module.hot) {\n if (!content.locals || module.hot.invalidate) {\n var isEqualLocals = ${_isEqualLocals.default.toString()};\n var isNamedExport = ${esModule ? "!content.locals" : false};\n var oldLocals = isNamedExport ? namedExport : content.locals;\n\n module.hot.accept(\n ${modulePath},\n function () {\n ${esModule ? `if (!isEqualLocals(oldLocals, isNamedExport ? namedExport : content.locals, isNamedExport)) {\n module.hot.invalidate();\n\n return;\n }\n\n oldLocals = isNamedExport ? namedExport : content.locals;\n\n ${lazy ? `if (update && refs > 0) {\n update(content);\n }` : `update(content);`}` : `content = require(${modulePath});\n\n content = content.__esModule ? content.default : content;\n\n ${lazy ? "" : `if (typeof content === 'string') {\n content = [[module.id, content, '']];\n }`}\n\n if (!isEqualLocals(oldLocals, content.locals)) {\n module.hot.invalidate();\n\n return;\n }\n\n oldLocals = content.locals;\n\n ${lazy ? `if (update && refs > 0) {\n update(content);\n }` : `update(content);`}`}\n }\n )\n }\n\n module.hot.dispose(function() {\n ${lazy ? `if (update) {\n update();\n }` : `update();`}\n });\n}\n`;
252
+ }
253
+ function getLinkHmrCode(esModule, loaderContext, request) {
254
+ const modulePath = stringifyRequest(loaderContext, `!!${request}`);
255
+ return `\nif (module.hot) {\n module.hot.accept(\n ${modulePath},\n function() {\n ${esModule ? "update(content);" : `content = require(${modulePath});\n\n content = content.__esModule ? content.default : content;\n\n update(content);`}\n }\n );\n\n module.hot.dispose(function() {\n update();\n });\n}`;
256
+ }
257
+ function getdomAPI(isAuto) {
258
+ return isAuto ? "isOldIE() ? domAPISingleton : domAPI" : "domAPI";
259
+ }
260
+ function getImportIsOldIECode(esModule, loaderContext) {
261
+ const modulePath = stringifyRequest(
262
+ loaderContext,
263
+ `!${_path.default.join(__dirname, "runtime/isOldIE.js")}`,
264
+ );
265
+ return esModule
266
+ ? `import isOldIE from ${modulePath};`
267
+ : `var isOldIE = require(${modulePath});`;
268
+ }
269
+ function getStyleTagTransformFnCode(
270
+ esModule,
271
+ loaderContext,
272
+ options,
273
+ isSingleton,
274
+ ) {
275
+ if (isSingleton) {
276
+ return "";
277
+ }
278
+ if (typeof options.styleTagTransform !== "undefined") {
279
+ const modulePath = stringifyRequest(
280
+ loaderContext,
281
+ `${options.styleTagTransform}`,
282
+ );
283
+ loaderContext.addBuildDependency(options.styleTagTransform);
284
+ return esModule
285
+ ? `import styleTagTransformFn from ${modulePath};`
286
+ : `var styleTagTransformFn = require(${modulePath});`;
287
+ }
288
+ const modulePath = stringifyRequest(
289
+ loaderContext,
290
+ `!${_path.default.join(__dirname, "runtime/styleTagTransform.js")}`,
291
+ );
292
+ return esModule
293
+ ? `import styleTagTransformFn from ${modulePath};`
294
+ : `var styleTagTransformFn = require(${modulePath});`;
295
+ }
296
+ function getStyleTagTransformFn(options, isSingleton) {
297
+ return isSingleton
298
+ ? ""
299
+ : `options.styleTagTransform = styleTagTransformFn`;
300
+ }
301
+ function getExportStyleCode(esModule, loaderContext, request) {
302
+ const modulePath = stringifyRequest(loaderContext, `!!${request}`);
303
+ return esModule
304
+ ? `export * from ${modulePath};\n export default content && content.locals ? content.locals : undefined;`
305
+ : "module.exports = content && content.locals || {};";
306
+ }
307
+ function getExportLazyStyleCode(esModule, loaderContext, request) {
308
+ const modulePath = stringifyRequest(loaderContext, `!!${request}`);
309
+ return esModule
310
+ ? `export * from ${modulePath};\n export default exported;`
311
+ : "module.exports = exported;";
312
+ }
313
+ function getSetAttributesCode(esModule, loaderContext, options) {
314
+ let modulePath;
315
+ if (typeof options.attributes !== "undefined") {
316
+ modulePath =
317
+ options.attributes.nonce !== "undefined"
318
+ ? stringifyRequest(
319
+ loaderContext,
320
+ `!${_path.default.join(__dirname, "runtime/setAttributesWithAttributesAndNonce.js")}`,
321
+ )
322
+ : stringifyRequest(
323
+ loaderContext,
324
+ `!${_path.default.join(__dirname, "runtime/setAttributesWithAttributes.js")}`,
325
+ );
326
+ } else {
327
+ modulePath = stringifyRequest(
328
+ loaderContext,
329
+ `!${_path.default.join(__dirname, "runtime/setAttributesWithoutAttributes.js")}`,
330
+ );
331
+ }
332
+ return esModule
333
+ ? `import setAttributes from ${modulePath};`
334
+ : `var setAttributes = require(${modulePath});`;
335
+ }
336
+ },
337
+ 928: (module) => {
338
+ module.exports = require("path");
339
+ },
340
+ 224: (module) => {
341
+ module.exports = JSON.parse(
342
+ '{"title":"Style Loader options","type":"object","properties":{"injectType":{"description":"Allows to setup how styles will be injected into DOM.","link":"https://github.com/webpack-contrib/style-loader#injecttype","enum":["styleTag","singletonStyleTag","autoStyleTag","lazyStyleTag","lazySingletonStyleTag","lazyAutoStyleTag","linkTag"]},"attributes":{"description":"Adds custom attributes to tag.","link":"https://github.com/webpack-contrib/style-loader#attributes","type":"object"},"insert":{"description":"Inserts `<style>`/`<link>` at the given position.","link":"https://github.com/webpack-contrib/style-loader#insert","type":"string"},"base":{"description":"Sets module ID base for DLLPlugin.","link":"https://github.com/webpack-contrib/style-loader#base","type":"number"},"esModule":{"description":"Use the ES modules syntax.","link":"https://github.com/webpack-contrib/css-loader#esmodule","type":"boolean"},"styleTagTransform":{"description":"Transform tag and css when insert \'style\' tag into the DOM","link":"https://github.com/webpack-contrib/style-loader#styleTagTransform","type":"string"}},"additionalProperties":false}',
343
+ );
344
+ },
345
+ };
346
+ var __webpack_module_cache__ = {};
347
+ function __nccwpck_require__(moduleId) {
348
+ var cachedModule = __webpack_module_cache__[moduleId];
349
+ if (cachedModule !== undefined) {
350
+ return cachedModule.exports;
351
+ }
352
+ var module = (__webpack_module_cache__[moduleId] = { exports: {} });
353
+ var threw = true;
354
+ try {
355
+ __webpack_modules__[moduleId](
356
+ module,
357
+ module.exports,
358
+ __nccwpck_require__,
359
+ );
360
+ threw = false;
361
+ } finally {
362
+ if (threw) delete __webpack_module_cache__[moduleId];
363
+ }
364
+ return module.exports;
365
+ }
366
+ if (typeof __nccwpck_require__ !== "undefined")
367
+ __nccwpck_require__.ab = __dirname + "/";
368
+ var __webpack_exports__ = __nccwpck_require__(511);
369
+ module.exports = __webpack_exports__;
370
+ })();
@@ -0,0 +1,20 @@
1
+ Copyright JS Foundation and other contributors
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ 'Software'), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
17
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
18
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
19
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
20
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1 @@
1
+ {"name":"style-loader","author":"Tobias Koppers @sokra","version":"4.0.0","funding":{"type":"opencollective","url":"https://opencollective.com/webpack"},"license":"MIT","types":"index.d.ts","type":"commonjs"}
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+
3
+ module.exports = function (url, options) {
4
+ if (typeof document === "undefined") {
5
+ return function () {};
6
+ }
7
+ options = options || {};
8
+ options.attributes = typeof options.attributes === "object" ? options.attributes : {};
9
+ if (typeof options.attributes.nonce === "undefined") {
10
+ var nonce = typeof __webpack_nonce__ !== "undefined" ? __webpack_nonce__ : null;
11
+ if (nonce) {
12
+ options.attributes.nonce = nonce;
13
+ }
14
+ }
15
+ var linkElement = document.createElement("link");
16
+ linkElement.rel = "stylesheet";
17
+ linkElement.href = url;
18
+ Object.keys(options.attributes).forEach(function (key) {
19
+ linkElement.setAttribute(key, options.attributes[key]);
20
+ });
21
+ options.insert(linkElement);
22
+ return function (newUrl) {
23
+ if (typeof newUrl === "string") {
24
+ linkElement.href = newUrl;
25
+ } else {
26
+ linkElement.parentNode.removeChild(linkElement);
27
+ }
28
+ };
29
+ };
@@ -0,0 +1,84 @@
1
+ "use strict";
2
+
3
+ var stylesInDOM = [];
4
+ function getIndexByIdentifier(identifier) {
5
+ var result = -1;
6
+ for (var i = 0; i < stylesInDOM.length; i++) {
7
+ if (stylesInDOM[i].identifier === identifier) {
8
+ result = i;
9
+ break;
10
+ }
11
+ }
12
+ return result;
13
+ }
14
+ function modulesToDom(list, options) {
15
+ var idCountMap = {};
16
+ var identifiers = [];
17
+ for (var i = 0; i < list.length; i++) {
18
+ var item = list[i];
19
+ var id = options.base ? item[0] + options.base : item[0];
20
+ var count = idCountMap[id] || 0;
21
+ var identifier = "".concat(id, " ").concat(count);
22
+ idCountMap[id] = count + 1;
23
+ var indexByIdentifier = getIndexByIdentifier(identifier);
24
+ var obj = {
25
+ css: item[1],
26
+ media: item[2],
27
+ sourceMap: item[3],
28
+ supports: item[4],
29
+ layer: item[5]
30
+ };
31
+ if (indexByIdentifier !== -1) {
32
+ stylesInDOM[indexByIdentifier].references++;
33
+ stylesInDOM[indexByIdentifier].updater(obj);
34
+ } else {
35
+ var updater = addElementStyle(obj, options);
36
+ options.byIndex = i;
37
+ stylesInDOM.splice(i, 0, {
38
+ identifier: identifier,
39
+ updater: updater,
40
+ references: 1
41
+ });
42
+ }
43
+ identifiers.push(identifier);
44
+ }
45
+ return identifiers;
46
+ }
47
+ function addElementStyle(obj, options) {
48
+ var api = options.domAPI(options);
49
+ api.update(obj);
50
+ var updater = function updater(newObj) {
51
+ if (newObj) {
52
+ if (newObj.css === obj.css && newObj.media === obj.media && newObj.sourceMap === obj.sourceMap && newObj.supports === obj.supports && newObj.layer === obj.layer) {
53
+ return;
54
+ }
55
+ api.update(obj = newObj);
56
+ } else {
57
+ api.remove();
58
+ }
59
+ };
60
+ return updater;
61
+ }
62
+ module.exports = function (list, options) {
63
+ options = options || {};
64
+ list = list || [];
65
+ var lastIdentifiers = modulesToDom(list, options);
66
+ return function update(newList) {
67
+ newList = newList || [];
68
+ for (var i = 0; i < lastIdentifiers.length; i++) {
69
+ var identifier = lastIdentifiers[i];
70
+ var index = getIndexByIdentifier(identifier);
71
+ stylesInDOM[index].references--;
72
+ }
73
+ var newLastIdentifiers = modulesToDom(newList, options);
74
+ for (var _i = 0; _i < lastIdentifiers.length; _i++) {
75
+ var _identifier = lastIdentifiers[_i];
76
+ var _index = getIndexByIdentifier(_identifier);
77
+ if (stylesInDOM[_index].references === 0) {
78
+ stylesInDOM[_index].updater();
79
+ stylesInDOM.splice(_index, 1);
80
+ }
81
+ }
82
+ lastIdentifiers = newLastIdentifiers;
83
+ };
84
+ };
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+
3
+ var memo = {};
4
+
5
+ /* istanbul ignore next */
6
+ function getTarget(target) {
7
+ if (typeof memo[target] === "undefined") {
8
+ var styleTarget = document.querySelector(target);
9
+
10
+ // Special case to return head of iframe instead of iframe itself
11
+ if (window.HTMLIFrameElement && styleTarget instanceof window.HTMLIFrameElement) {
12
+ try {
13
+ // This will throw an exception if access to iframe is blocked
14
+ // due to cross-origin restrictions
15
+ styleTarget = styleTarget.contentDocument.head;
16
+ } catch (e) {
17
+ // istanbul ignore next
18
+ styleTarget = null;
19
+ }
20
+ }
21
+ memo[target] = styleTarget;
22
+ }
23
+ return memo[target];
24
+ }
25
+
26
+ /* istanbul ignore next */
27
+ function insertBySelector(insert, style) {
28
+ var target = getTarget(insert);
29
+ if (!target) {
30
+ throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");
31
+ }
32
+ target.appendChild(style);
33
+ }
34
+ module.exports = insertBySelector;
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+
3
+ /* istanbul ignore next */
4
+ function insertStyleElement(options) {
5
+ var element = document.createElement("style");
6
+ options.setAttributes(element, options.attributes);
7
+ options.insert(element, options.options);
8
+ return element;
9
+ }
10
+ module.exports = insertStyleElement;
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+
3
+ function isEqualLocals(a, b, isNamedExport) {
4
+ if (!a && b || a && !b) {
5
+ return false;
6
+ }
7
+ var p;
8
+ for (p in a) {
9
+ if (isNamedExport && p === "default") {
10
+ // eslint-disable-next-line no-continue
11
+ continue;
12
+ }
13
+ if (a[p] !== b[p]) {
14
+ return false;
15
+ }
16
+ }
17
+ for (p in b) {
18
+ if (isNamedExport && p === "default") {
19
+ // eslint-disable-next-line no-continue
20
+ continue;
21
+ }
22
+ if (!a[p]) {
23
+ return false;
24
+ }
25
+ }
26
+ return true;
27
+ }
28
+ module.exports = isEqualLocals;