skeleton-webcomponent-loader 2.1.4 → 3.0.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 (58) hide show
  1. package/dist/cjs/app-globals-V2Kpy_OQ.js +5 -0
  2. package/dist/cjs/index-BKUCi6S8.js +1522 -0
  3. package/dist/cjs/loader.cjs.js +7 -29
  4. package/dist/cjs/nb-skeleton.cjs.entry.js +168 -114
  5. package/dist/cjs/skeleton-webcomponent.cjs.js +17 -15
  6. package/dist/collection/collection-manifest.json +4 -3
  7. package/dist/collection/components/skeleton/skeleton.js +460 -304
  8. package/dist/{custom-elements → components}/index.d.ts +13 -23
  9. package/dist/components/index.js +1 -0
  10. package/dist/components/nb-skeleton.d.ts +11 -0
  11. package/dist/components/nb-skeleton.js +1 -0
  12. package/dist/esm/app-globals-DQuL1Twl.js +3 -0
  13. package/dist/esm/index-D_NQrSVN.js +1515 -0
  14. package/dist/esm/loader.js +7 -27
  15. package/dist/esm/nb-skeleton.entry.js +168 -112
  16. package/dist/esm/skeleton-webcomponent.js +15 -15
  17. package/dist/esm-es5/app-globals-DQuL1Twl.js +1 -0
  18. package/dist/esm-es5/index-D_NQrSVN.js +2 -0
  19. package/dist/esm-es5/loader.js +1 -1
  20. package/dist/esm-es5/nb-skeleton.entry.js +1 -1
  21. package/dist/esm-es5/skeleton-webcomponent.js +1 -1
  22. package/dist/skeleton-webcomponent/p-0ab2f3bc.system.entry.js +1 -0
  23. package/dist/skeleton-webcomponent/p-BbPAtVJG.system.js +1 -0
  24. package/dist/skeleton-webcomponent/p-CEkATbjM.system.js +2 -0
  25. package/dist/skeleton-webcomponent/p-DQuL1Twl.js +1 -0
  26. package/dist/skeleton-webcomponent/p-D_NQrSVN.js +2 -0
  27. package/dist/skeleton-webcomponent/p-DikQ2aXB.system.js +1 -0
  28. package/dist/skeleton-webcomponent/p-e5fc5295.entry.js +1 -0
  29. package/dist/skeleton-webcomponent/skeleton-webcomponent.esm.js +1 -1
  30. package/dist/skeleton-webcomponent/skeleton-webcomponent.js +14 -19
  31. package/dist/types/components/skeleton/skeleton.d.ts +101 -67
  32. package/dist/types/components.d.ts +75 -2
  33. package/dist/types/stencil-public-runtime.d.ts +335 -40
  34. package/loader/cdn.js +1 -2
  35. package/loader/index.cjs.js +1 -2
  36. package/loader/index.d.ts +13 -1
  37. package/loader/index.es2017.js +1 -2
  38. package/loader/index.js +1 -2
  39. package/package.json +5 -5
  40. package/readme.md +0 -3
  41. package/CHANGELOG.md +0 -26
  42. package/dist/cjs/css-shim-b3e497ca.js +0 -6
  43. package/dist/cjs/index-b5d2dca0.js +0 -1156
  44. package/dist/custom-elements/index.js +0 -142
  45. package/dist/esm/css-shim-2f04a37a.js +0 -4
  46. package/dist/esm/index-63fd3905.js +0 -1128
  47. package/dist/esm/polyfills/css-shim.js +0 -1
  48. package/dist/esm-es5/css-shim-2f04a37a.js +0 -1
  49. package/dist/esm-es5/index-63fd3905.js +0 -1
  50. package/dist/skeleton-webcomponent/p-12077897.js +0 -1
  51. package/dist/skeleton-webcomponent/p-16aec442.system.js +0 -1
  52. package/dist/skeleton-webcomponent/p-63ed3b45.entry.js +0 -1
  53. package/dist/skeleton-webcomponent/p-7e96e5d4.js +0 -1
  54. package/dist/skeleton-webcomponent/p-8bef7229.system.js +0 -1
  55. package/dist/skeleton-webcomponent/p-dc1bf577.system.entry.js +0 -1
  56. package/dist/skeleton-webcomponent/p-f59432d4.system.js +0 -1
  57. package/loader/package.json +0 -10
  58. /package/dist/skeleton-webcomponent/{p-50ea2036.system.js → p-YWpyar7R.system.js} +0 -0
package/loader/cdn.js CHANGED
@@ -1,3 +1,2 @@
1
-
2
1
  module.exports = require('../dist/cjs/loader.cjs.js');
3
- module.exports.applyPolyfills = function() { return Promise.resolve() };
2
+ module.exports.applyPolyfills = function() { return Promise.resolve() };
@@ -1,3 +1,2 @@
1
-
2
1
  module.exports = require('../dist/cjs/loader.cjs.js');
3
- module.exports.applyPolyfills = function() { return Promise.resolve() };
2
+ module.exports.applyPolyfills = function() { return Promise.resolve() };
package/loader/index.d.ts CHANGED
@@ -8,5 +8,17 @@ export interface CustomElementsDefineOptions {
8
8
  ael?: (el: EventTarget, eventName: string, listener: EventListenerOrEventListenerObject, options: boolean | AddEventListenerOptions) => void;
9
9
  rel?: (el: EventTarget, eventName: string, listener: EventListenerOrEventListenerObject, options: boolean | AddEventListenerOptions) => void;
10
10
  }
11
- export declare function defineCustomElements(win?: Window, opts?: CustomElementsDefineOptions): Promise<void>;
11
+ export declare function defineCustomElements(win?: Window, opts?: CustomElementsDefineOptions): void;
12
+ /**
13
+ * @deprecated
14
+ */
12
15
  export declare function applyPolyfills(): Promise<void>;
16
+
17
+ /**
18
+ * Used to specify a nonce value that corresponds with an application's CSP.
19
+ * When set, the nonce will be added to all dynamically created script and style tags at runtime.
20
+ * Alternatively, the nonce value can be set on a meta tag in the DOM head
21
+ * (<meta name="csp-nonce" content="{ nonce value here }" />) which
22
+ * will result in the same behavior.
23
+ */
24
+ export declare function setNonce(nonce: string): void;
@@ -1,3 +1,2 @@
1
-
2
1
  export * from '../dist/esm/polyfills/index.js';
3
- export * from '../dist/esm/loader.js';
2
+ export * from '../dist/esm/loader.js';
package/loader/index.js CHANGED
@@ -1,4 +1,3 @@
1
-
2
1
  (function(){if("undefined"!==typeof window&&void 0!==window.Reflect&&void 0!==window.customElements){var a=HTMLElement;window.HTMLElement=function(){return Reflect.construct(a,[],this.constructor)};HTMLElement.prototype=a.prototype;HTMLElement.prototype.constructor=HTMLElement;Object.setPrototypeOf(HTMLElement,a)}})();
3
2
  export * from '../dist/esm/polyfills/index.js';
4
- export * from '../dist/esm-es5/loader.js';
3
+ export * from '../dist/esm-es5/loader.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "skeleton-webcomponent-loader",
3
- "version": "2.1.4",
3
+ "version": "3.0.0",
4
4
  "description": "Skeleton loader webcomponent developed in stencil.js",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/custom-elements/index.js",
@@ -21,6 +21,7 @@
21
21
  "build": "stencil build --docs",
22
22
  "start": "stencil build --dev --watch --serve",
23
23
  "test.watch": "stencil test --spec --e2e --watchAll",
24
+ "test": "stencil test --spec --e2e",
24
25
  "generate": "stencil generate",
25
26
  "prepublish": "npm run build",
26
27
  "commit": "npx git-cz",
@@ -32,20 +33,19 @@
32
33
  }
33
34
  },
34
35
  "dependencies": {
35
- "@stencil/core": "^2.13.0",
36
- "@stencil/sass": "^1.5.2"
36
+ "@stencil/core": "^4.43.3",
37
+ "@stencil/sass": "^3.2.3"
37
38
  },
38
39
  "license": "MIT",
39
40
  "devDependencies": {
40
41
  "@types/jest": "^26.0.14",
41
- "@types/puppeteer": "^3.0.1",
42
42
  "commitizen": "^4.2.1",
43
43
  "cz-conventional-changelog": "^3.3.0",
44
44
  "jest": "^26.4.2",
45
45
  "jest-cli": "^26.4.2",
46
46
  "prettier": "^2.1.2",
47
47
  "pretty-quick": "^3.1.0",
48
- "puppeteer": "^5.2.1",
48
+ "puppeteer": "^24.7.1",
49
49
  "standard-version": "^9.0.0"
50
50
  },
51
51
  "repository": {
package/readme.md CHANGED
@@ -1,6 +1,3 @@
1
- [![Stand With Ukraine](https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/banner-direct-single.svg)](https://stand-with-ukraine.pp.ua)
2
-
3
-
4
1
  ![Built With Stencil](https://img.shields.io/badge/-Built%20With%20Stencil-16161d.svg?logo=data%3Aimage%2Fsvg%2Bxml%3Bbase64%2CPD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDE5LjIuMSwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IgoJIHZpZXdCb3g9IjAgMCA1MTIgNTEyIiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCA1MTIgNTEyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI%2BCjxzdHlsZSB0eXBlPSJ0ZXh0L2NzcyI%2BCgkuc3Qwe2ZpbGw6I0ZGRkZGRjt9Cjwvc3R5bGU%2BCjxwYXRoIGNsYXNzPSJzdDAiIGQ9Ik00MjQuNywzNzMuOWMwLDM3LjYtNTUuMSw2OC42LTkyLjcsNjguNkgxODAuNGMtMzcuOSwwLTkyLjctMzAuNy05Mi43LTY4LjZ2LTMuNmgzMzYuOVYzNzMuOXoiLz4KPHBhdGggY2xhc3M9InN0MCIgZD0iTTQyNC43LDI5Mi4xSDE4MC40Yy0zNy42LDAtOTIuNy0zMS05Mi43LTY4LjZ2LTMuNkgzMzJjMzcuNiwwLDkyLjcsMzEsOTIuNyw2OC42VjI5Mi4xeiIvPgo8cGF0aCBjbGFzcz0ic3QwIiBkPSJNNDI0LjcsMTQxLjdIODcuN3YtMy42YzAtMzcuNiw1NC44LTY4LjYsOTIuNy02OC42SDMzMmMzNy45LDAsOTIuNywzMC43LDkyLjcsNjguNlYxNDEuN3oiLz4KPC9zdmc%2BCg%3D%3D&colorA=16161d&style=flat-square)
5
2
 
6
3
  # Skeleton Loader Webcomponent
package/CHANGELOG.md DELETED
@@ -1,26 +0,0 @@
1
- # Changelog
2
-
3
- All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
-
5
- ### [2.1.1](https://github.com/nikbabchenko/skeleton-webcomponent/compare/v2.0.0...v2.1.1) (2022-02-12)
6
-
7
- ## 1.0.5 (2020-10-22)
8
-
9
-
10
- ### ⚠ BREAKING CHANGES
11
-
12
- * **prepare for prod:** changes "appearance" prop to "variant"
13
-
14
- ### Features
15
-
16
- * **adds css properties:** adds margin-bottom, border-radius ([5a950e4](https://github.com/nikbabchenko/skeleton-webcomponent/commit/5a950e489f0330225ccb40ef9b17f361756a9196))
17
- * **adds github action:** adds github action ([74e7fcc](https://github.com/nikbabchenko/skeleton-webcomponent/commit/74e7fcc33361eadd514a224b12031e6b5474860f))
18
- * **css properties:** adds css custom properties to set width/height/margin ([091e9e9](https://github.com/nikbabchenko/skeleton-webcomponent/commit/091e9e9b1c4f8517721300042ec0712febbd84ad))
19
- * **docs fixes:** changes images position in docs ([581c874](https://github.com/nikbabchenko/skeleton-webcomponent/commit/581c87478fe2607b665d8335f12dc397c3f09020))
20
- * **prepare for prod:** adds some features adn es5 build ([8ba32e6](https://github.com/nikbabchenko/skeleton-webcomponent/commit/8ba32e64e9a733db100034a8933b1fb7a01a484a))
21
- * **remove-classnames:** removes dependency - classnames ([be4a3b9](https://github.com/nikbabchenko/skeleton-webcomponent/commit/be4a3b9ac3f4e25dab2a2421241611b4a8bdbec3))
22
-
23
-
24
- ### Bug Fixes
25
-
26
- * **circle margin:** fixes css, where margin was intended to be only bottom margin ([e7d7517](https://github.com/nikbabchenko/skeleton-webcomponent/commit/e7d75176e934cc651f07ed20fa31acce74beb059))
@@ -1,6 +0,0 @@
1
- 'use strict';
2
-
3
- /*
4
- Stencil Client Patch Esm v2.13.0 | MIT Licensed | https://stenciljs.com
5
- */
6
- var __assign=function(){return (__assign=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var s in t=arguments[r])Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e}).apply(this,arguments)},StyleNode=function(){this.start=0,this.end=0,this.previous=null,this.parent=null,this.rules=null,this.parsedCssText="",this.cssText="",this.atRule=!1,this.type=0,this.keyframesName="",this.selector="",this.parsedSelector="";};function parse(e){return parseCss(lex(e=clean(e)),e)}function clean(e){return e.replace(RX.comments,"").replace(RX.port,"")}function lex(e){var t=new StyleNode;t.start=0,t.end=e.length;for(var r=t,n=0,s=e.length;n<s;n++)if(e[n]===OPEN_BRACE){r.rules||(r.rules=[]);var o=r,a=o.rules[o.rules.length-1]||null;(r=new StyleNode).start=n+1,r.parent=o,r.previous=a,o.rules.push(r);}else e[n]===CLOSE_BRACE&&(r.end=n+1,r=r.parent||t);return t}function parseCss(e,t){var r=t.substring(e.start,e.end-1);if(e.parsedCssText=e.cssText=r.trim(),e.parent){var n=e.previous?e.previous.end:e.parent.start;r=(r=(r=_expandUnicodeEscapes(r=t.substring(n,e.start-1))).replace(RX.multipleSpaces," ")).substring(r.lastIndexOf(";")+1);var s=e.parsedSelector=e.selector=r.trim();e.atRule=0===s.indexOf(AT_START),e.atRule?0===s.indexOf(MEDIA_START)?e.type=types.MEDIA_RULE:s.match(RX.keyframesRule)&&(e.type=types.KEYFRAMES_RULE,e.keyframesName=e.selector.split(RX.multipleSpaces).pop()):0===s.indexOf(VAR_START)?e.type=types.MIXIN_RULE:e.type=types.STYLE_RULE;}var o=e.rules;if(o)for(var a=0,i=o.length,l=void 0;a<i&&(l=o[a]);a++)parseCss(l,t);return e}function _expandUnicodeEscapes(e){return e.replace(/\\([0-9a-f]{1,6})\s/gi,(function(){for(var e=arguments[1],t=6-e.length;t--;)e="0"+e;return "\\"+e}))}var types={STYLE_RULE:1,KEYFRAMES_RULE:7,MEDIA_RULE:4,MIXIN_RULE:1e3},OPEN_BRACE="{",CLOSE_BRACE="}",RX={comments:/\/\*[^*]*\*+([^/*][^*]*\*+)*\//gim,port:/@import[^;]*;/gim,customProp:/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?(?:[;\n]|$)/gim,mixinProp:/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?{[^}]*?}(?:[;\n]|$)?/gim,mixinApply:/@apply\s*\(?[^);]*\)?\s*(?:[;\n]|$)?/gim,varApply:/[^;:]*?:[^;]*?var\([^;]*\)(?:[;\n]|$)?/gim,keyframesRule:/^@[^\s]*keyframes/,multipleSpaces:/\s+/g},VAR_START="--",MEDIA_START="@media",AT_START="@";function findRegex(e,t,r){e.lastIndex=0;var n=t.substring(r).match(e);if(n){var s=r+n.index;return {start:s,end:s+n[0].length}}return null}var VAR_USAGE_START=/\bvar\(/,VAR_ASSIGN_START=/\B--[\w-]+\s*:/,COMMENTS=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//gim,TRAILING_LINES=/^[\t ]+\n/gm;function resolveVar(e,t,r){return e[t]?e[t]:r?executeTemplate(r,e):""}function findVarEndIndex(e,t){for(var r=0,n=t;n<e.length;n++){var s=e[n];if("("===s)r++;else if(")"===s&&--r<=0)return n+1}return n}function parseVar(e,t){var r=findRegex(VAR_USAGE_START,e,t);if(!r)return null;var n=findVarEndIndex(e,r.start),s=e.substring(r.end,n-1).split(","),o=s[0],a=s.slice(1);return {start:r.start,end:n,propName:o.trim(),fallback:a.length>0?a.join(",").trim():void 0}}function compileVar(e,t,r){var n=parseVar(e,r);if(!n)return t.push(e.substring(r,e.length)),e.length;var s=n.propName,o=null!=n.fallback?compileTemplate(n.fallback):void 0;return t.push(e.substring(r,n.start),(function(e){return resolveVar(e,s,o)})),n.end}function executeTemplate(e,t){for(var r="",n=0;n<e.length;n++){var s=e[n];r+="string"==typeof s?s:s(t);}return r}function findEndValue(e,t){for(var r=!1,n=!1,s=t;s<e.length;s++){var o=e[s];if(r)n&&'"'===o&&(r=!1),n||"'"!==o||(r=!1);else if('"'===o)r=!0,n=!0;else if("'"===o)r=!0,n=!1;else {if(";"===o)return s+1;if("}"===o)return s}}return s}function removeCustomAssigns(e){for(var t="",r=0;;){var n=findRegex(VAR_ASSIGN_START,e,r),s=n?n.start:e.length;if(t+=e.substring(r,s),!n)break;r=findEndValue(e,s);}return t}function compileTemplate(e){var t=0;e=removeCustomAssigns(e=e.replace(COMMENTS,"")).replace(TRAILING_LINES,"");for(var r=[];t<e.length;)t=compileVar(e,r,t);return r}function resolveValues(e){var t={};e.forEach((function(e){e.declarations.forEach((function(e){t[e.prop]=e.value;}));}));for(var r={},n=Object.entries(t),s=function(e){var t=!1;if(n.forEach((function(e){var n=e[0],s=executeTemplate(e[1],r);s!==r[n]&&(r[n]=s,t=!0);})),!t)return "break"},o=0;o<10;o++){if("break"===s())break}return r}function getSelectors(e,t){if(void 0===t&&(t=0),!e.rules)return [];var r=[];return e.rules.filter((function(e){return e.type===types.STYLE_RULE})).forEach((function(e){var n=getDeclarations(e.cssText);n.length>0&&e.parsedSelector.split(",").forEach((function(e){e=e.trim(),r.push({selector:e,declarations:n,specificity:computeSpecificity(),nu:t});})),t++;})),r}function computeSpecificity(e){return 1}var IMPORTANT="!important",FIND_DECLARATIONS=/(?:^|[;\s{]\s*)(--[\w-]*?)\s*:\s*(?:((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};{])+)|\{([^}]*)\}(?:(?=[;\s}])|$))/gm;function getDeclarations(e){for(var t,r=[];t=FIND_DECLARATIONS.exec(e.trim());){var n=normalizeValue(t[2]),s=n.value,o=n.important;r.push({prop:t[1].trim(),value:compileTemplate(s),important:o});}return r}function normalizeValue(e){var t=(e=e.replace(/\s+/gim," ").trim()).endsWith(IMPORTANT);return t&&(e=e.substr(0,e.length-IMPORTANT.length).trim()),{value:e,important:t}}function getActiveSelectors(e,t,r){var n=[],s=getScopesForElement(t,e);return r.forEach((function(e){return n.push(e)})),s.forEach((function(e){return n.push(e)})),sortSelectors(getSelectorsForScopes(n).filter((function(t){return matches(e,t.selector)})))}function getScopesForElement(e,t){for(var r=[];t;){var n=e.get(t);n&&r.push(n),t=t.parentElement;}return r}function getSelectorsForScopes(e){var t=[];return e.forEach((function(e){t.push.apply(t,e.selectors);})),t}function sortSelectors(e){return e.sort((function(e,t){return e.specificity===t.specificity?e.nu-t.nu:e.specificity-t.specificity})),e}function matches(e,t){return ":root"===t||"html"===t||e.matches(t)}function parseCSS(e){var t=parse(e),r=compileTemplate(e);return {original:e,template:r,selectors:getSelectors(t),usesCssVars:r.length>1}}function addGlobalStyle(e,t){if(e.some((function(e){return e.styleEl===t})))return !1;var r=parseCSS(t.textContent);return r.styleEl=t,e.push(r),!0}function updateGlobalScopes(e){var t=resolveValues(getSelectorsForScopes(e));e.forEach((function(e){e.usesCssVars&&(e.styleEl.textContent=executeTemplate(e.template,t));}));}function reScope(e,t){var r=e.template.map((function(r){return "string"==typeof r?replaceScope(r,e.scopeId,t):r})),n=e.selectors.map((function(r){return __assign(__assign({},r),{selector:replaceScope(r.selector,e.scopeId,t)})}));return __assign(__assign({},e),{template:r,selectors:n,scopeId:t})}function replaceScope(e,t,r){return e=replaceAll(e,"\\."+t,"."+r)}function replaceAll(e,t,r){return e.replace(new RegExp(t,"g"),r)}function loadDocument(e,t){return loadDocumentStyles(e,t),loadDocumentLinks(e,t).then((function(){updateGlobalScopes(t);}))}function startWatcher(e,t){"undefined"!=typeof MutationObserver&&new MutationObserver((function(){loadDocumentStyles(e,t)&&updateGlobalScopes(t);})).observe(document.head,{childList:!0});}function loadDocumentLinks(e,t){for(var r=[],n=e.querySelectorAll('link[rel="stylesheet"][href]:not([data-no-shim])'),s=0;s<n.length;s++)r.push(addGlobalLink(e,t,n[s]));return Promise.all(r)}function loadDocumentStyles(e,t){return Array.from(e.querySelectorAll("style:not([data-styles]):not([data-no-shim])")).map((function(e){return addGlobalStyle(t,e)})).some(Boolean)}function addGlobalLink(e,t,r){var n=r.href;return fetch(n).then((function(e){return e.text()})).then((function(s){if(hasCssVariables(s)&&r.parentNode){hasRelativeUrls(s)&&(s=fixRelativeUrls(s,n));var o=e.createElement("style");o.setAttribute("data-styles",""),o.textContent=s,addGlobalStyle(t,o),r.parentNode.insertBefore(o,r),r.remove();}})).catch((function(e){console.error(e);}))}var CSS_VARIABLE_REGEXP=/[\s;{]--[-a-zA-Z0-9]+\s*:/m;function hasCssVariables(e){return e.indexOf("var(")>-1||CSS_VARIABLE_REGEXP.test(e)}var CSS_URL_REGEXP=/url[\s]*\([\s]*['"]?(?!(?:https?|data)\:|\/)([^\'\"\)]*)[\s]*['"]?\)[\s]*/gim;function hasRelativeUrls(e){return CSS_URL_REGEXP.lastIndex=0,CSS_URL_REGEXP.test(e)}function fixRelativeUrls(e,t){var r=t.replace(/[^/]*$/,"");return e.replace(CSS_URL_REGEXP,(function(e,t){var n=r+t;return e.replace(t,n)}))}var CustomStyle=function(){function e(e,t){this.win=e,this.doc=t,this.count=0,this.hostStyleMap=new WeakMap,this.hostScopeMap=new WeakMap,this.globalScopes=[],this.scopesMap=new Map,this.didInit=!1;}return e.prototype.i=function(){var e=this;return this.didInit||!this.win.requestAnimationFrame?Promise.resolve():(this.didInit=!0,new Promise((function(t){e.win.requestAnimationFrame((function(){startWatcher(e.doc,e.globalScopes),loadDocument(e.doc,e.globalScopes).then((function(){return t()}));}));})))},e.prototype.addLink=function(e){var t=this;return addGlobalLink(this.doc,this.globalScopes,e).then((function(){t.updateGlobal();}))},e.prototype.addGlobalStyle=function(e){addGlobalStyle(this.globalScopes,e)&&this.updateGlobal();},e.prototype.createHostStyle=function(e,t,r,n){if(this.hostScopeMap.has(e))throw new Error("host style already created");var s=this.registerHostTemplate(r,t,n),o=this.doc.createElement("style");return o.setAttribute("data-no-shim",""),s.usesCssVars?n?(o["s-sc"]=t=s.scopeId+"-"+this.count,o.textContent="/*needs update*/",this.hostStyleMap.set(e,o),this.hostScopeMap.set(e,reScope(s,t)),this.count++):(s.styleEl=o,s.usesCssVars||(o.textContent=executeTemplate(s.template,{})),this.globalScopes.push(s),this.updateGlobal(),this.hostScopeMap.set(e,s)):o.textContent=r,o},e.prototype.removeHost=function(e){var t=this.hostStyleMap.get(e);t&&t.remove(),this.hostStyleMap.delete(e),this.hostScopeMap.delete(e);},e.prototype.updateHost=function(e){var t=this.hostScopeMap.get(e);if(t&&t.usesCssVars&&t.isScoped){var r=this.hostStyleMap.get(e);if(r){var n=resolveValues(getActiveSelectors(e,this.hostScopeMap,this.globalScopes));r.textContent=executeTemplate(t.template,n);}}},e.prototype.updateGlobal=function(){updateGlobalScopes(this.globalScopes);},e.prototype.registerHostTemplate=function(e,t,r){var n=this.scopesMap.get(t);return n||((n=parseCSS(e)).scopeId=t,n.isScoped=r,this.scopesMap.set(t,n)),n},e}();!function(e){!e||e.__cssshim||e.CSS&&e.CSS.supports&&e.CSS.supports("color","var(--c)")||(e.__cssshim=new CustomStyle(e,e.document));}("undefined"!=typeof window&&window);