Files
doneit-web/.angular/cache/14.2.12/babel-webpack/1c89b5b29a67b91570c61267c121ac1b.json
T
Eudes Inácio 53b71ea16f its working
2023-06-30 09:54:21 +01:00

1 line
45 KiB
JSON

{"ast":null,"code":"/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n *\n * This file is a port of shadowCSS from webcomponents.js to TypeScript.\n * https://github.com/webcomponents/webcomponentsjs/blob/4efecd7e0e/src/ShadowCSS/ShadowCSS.js\n * https://github.com/angular/angular/blob/master/packages/compiler/src/shadow_css.ts\n */\nconst safeSelector = selector => {\n const placeholders = [];\n let index = 0;\n let content;\n // Replaces attribute selectors with placeholders.\n // The WS in [attr=\"va lue\"] would otherwise be interpreted as a selector separator.\n selector = selector.replace(/(\\[[^\\]]*\\])/g, (_, keep) => {\n const replaceBy = `__ph-${index}__`;\n placeholders.push(keep);\n index++;\n return replaceBy;\n });\n // Replaces the expression in `:nth-child(2n + 1)` with a placeholder.\n // WS and \"+\" would otherwise be interpreted as selector separators.\n content = selector.replace(/(:nth-[-\\w]+)(\\([^)]+\\))/g, (_, pseudo, exp) => {\n const replaceBy = `__ph-${index}__`;\n placeholders.push(exp);\n index++;\n return pseudo + replaceBy;\n });\n const ss = {\n content,\n placeholders\n };\n return ss;\n};\nconst restoreSafeSelector = (placeholders, content) => {\n return content.replace(/__ph-(\\d+)__/g, (_, index) => placeholders[+index]);\n};\nconst _polyfillHost = '-shadowcsshost';\nconst _polyfillSlotted = '-shadowcssslotted';\n// note: :host-context pre-processed to -shadowcsshostcontext.\nconst _polyfillHostContext = '-shadowcsscontext';\nconst _parenSuffix = ')(?:\\\\((' + '(?:\\\\([^)(]*\\\\)|[^)(]*)+?' + ')\\\\))?([^,{]*)';\nconst _cssColonHostRe = new RegExp('(' + _polyfillHost + _parenSuffix, 'gim');\nconst _cssColonHostContextRe = new RegExp('(' + _polyfillHostContext + _parenSuffix, 'gim');\nconst _cssColonSlottedRe = new RegExp('(' + _polyfillSlotted + _parenSuffix, 'gim');\nconst _polyfillHostNoCombinator = _polyfillHost + '-no-combinator';\nconst _polyfillHostNoCombinatorRe = /-shadowcsshost-no-combinator([^\\s]*)/;\nconst _shadowDOMSelectorsRe = [/::shadow/g, /::content/g];\nconst _selectorReSuffix = '([>\\\\s~+\\[.,{:][\\\\s\\\\S]*)?$';\nconst _polyfillHostRe = /-shadowcsshost/gim;\nconst _colonHostRe = /:host/gim;\nconst _colonSlottedRe = /::slotted/gim;\nconst _colonHostContextRe = /:host-context/gim;\nconst _commentRe = /\\/\\*\\s*[\\s\\S]*?\\*\\//g;\nconst stripComments = input => {\n return input.replace(_commentRe, '');\n};\nconst _commentWithHashRe = /\\/\\*\\s*#\\s*source(Mapping)?URL=[\\s\\S]+?\\*\\//g;\nconst extractCommentsWithHash = input => {\n return input.match(_commentWithHashRe) || [];\n};\nconst _ruleRe = /(\\s*)([^;\\{\\}]+?)(\\s*)((?:{%BLOCK%}?\\s*;?)|(?:\\s*;))/g;\nconst _curlyRe = /([{}])/g;\nconst OPEN_CURLY = '{';\nconst CLOSE_CURLY = '}';\nconst BLOCK_PLACEHOLDER = '%BLOCK%';\nconst processRules = (input, ruleCallback) => {\n const inputWithEscapedBlocks = escapeBlocks(input);\n let nextBlockIndex = 0;\n return inputWithEscapedBlocks.escapedString.replace(_ruleRe, (...m) => {\n const selector = m[2];\n let content = '';\n let suffix = m[4];\n let contentPrefix = '';\n if (suffix && suffix.startsWith('{' + BLOCK_PLACEHOLDER)) {\n content = inputWithEscapedBlocks.blocks[nextBlockIndex++];\n suffix = suffix.substring(BLOCK_PLACEHOLDER.length + 1);\n contentPrefix = '{';\n }\n const cssRule = {\n selector,\n content\n };\n const rule = ruleCallback(cssRule);\n return `${m[1]}${rule.selector}${m[3]}${contentPrefix}${rule.content}${suffix}`;\n });\n};\nconst escapeBlocks = input => {\n const inputParts = input.split(_curlyRe);\n const resultParts = [];\n const escapedBlocks = [];\n let bracketCount = 0;\n let currentBlockParts = [];\n for (let partIndex = 0; partIndex < inputParts.length; partIndex++) {\n const part = inputParts[partIndex];\n if (part === CLOSE_CURLY) {\n bracketCount--;\n }\n if (bracketCount > 0) {\n currentBlockParts.push(part);\n } else {\n if (currentBlockParts.length > 0) {\n escapedBlocks.push(currentBlockParts.join(''));\n resultParts.push(BLOCK_PLACEHOLDER);\n currentBlockParts = [];\n }\n resultParts.push(part);\n }\n if (part === OPEN_CURLY) {\n bracketCount++;\n }\n }\n if (currentBlockParts.length > 0) {\n escapedBlocks.push(currentBlockParts.join(''));\n resultParts.push(BLOCK_PLACEHOLDER);\n }\n const strEscapedBlocks = {\n escapedString: resultParts.join(''),\n blocks: escapedBlocks\n };\n return strEscapedBlocks;\n};\nconst insertPolyfillHostInCssText = selector => {\n selector = selector.replace(_colonHostContextRe, _polyfillHostContext).replace(_colonHostRe, _polyfillHost).replace(_colonSlottedRe, _polyfillSlotted);\n return selector;\n};\nconst convertColonRule = (cssText, regExp, partReplacer) => {\n // m[1] = :host(-context), m[2] = contents of (), m[3] rest of rule\n return cssText.replace(regExp, (...m) => {\n if (m[2]) {\n const parts = m[2].split(',');\n const r = [];\n for (let i = 0; i < parts.length; i++) {\n const p = parts[i].trim();\n if (!p) break;\n r.push(partReplacer(_polyfillHostNoCombinator, p, m[3]));\n }\n return r.join(',');\n } else {\n return _polyfillHostNoCombinator + m[3];\n }\n });\n};\nconst colonHostPartReplacer = (host, part, suffix) => {\n return host + part.replace(_polyfillHost, '') + suffix;\n};\nconst convertColonHost = cssText => {\n return convertColonRule(cssText, _cssColonHostRe, colonHostPartReplacer);\n};\nconst colonHostContextPartReplacer = (host, part, suffix) => {\n if (part.indexOf(_polyfillHost) > -1) {\n return colonHostPartReplacer(host, part, suffix);\n } else {\n return host + part + suffix + ', ' + part + ' ' + host + suffix;\n }\n};\nconst convertColonSlotted = (cssText, slotScopeId) => {\n const slotClass = '.' + slotScopeId + ' > ';\n const selectors = [];\n cssText = cssText.replace(_cssColonSlottedRe, (...m) => {\n if (m[2]) {\n const compound = m[2].trim();\n const suffix = m[3];\n const slottedSelector = slotClass + compound + suffix;\n let prefixSelector = '';\n for (let i = m[4] - 1; i >= 0; i--) {\n const char = m[5][i];\n if (char === '}' || char === ',') {\n break;\n }\n prefixSelector = char + prefixSelector;\n }\n const orgSelector = prefixSelector + slottedSelector;\n const addedSelector = `${prefixSelector.trimRight()}${slottedSelector.trim()}`;\n if (orgSelector.trim() !== addedSelector.trim()) {\n const updatedSelector = `${addedSelector}, ${orgSelector}`;\n selectors.push({\n orgSelector,\n updatedSelector\n });\n }\n return slottedSelector;\n } else {\n return _polyfillHostNoCombinator + m[3];\n }\n });\n return {\n selectors,\n cssText\n };\n};\nconst convertColonHostContext = cssText => {\n return convertColonRule(cssText, _cssColonHostContextRe, colonHostContextPartReplacer);\n};\nconst convertShadowDOMSelectors = cssText => {\n return _shadowDOMSelectorsRe.reduce((result, pattern) => result.replace(pattern, ' '), cssText);\n};\nconst makeScopeMatcher = scopeSelector => {\n const lre = /\\[/g;\n const rre = /\\]/g;\n scopeSelector = scopeSelector.replace(lre, '\\\\[').replace(rre, '\\\\]');\n return new RegExp('^(' + scopeSelector + ')' + _selectorReSuffix, 'm');\n};\nconst selectorNeedsScoping = (selector, scopeSelector) => {\n const re = makeScopeMatcher(scopeSelector);\n return !re.test(selector);\n};\nconst applySimpleSelectorScope = (selector, scopeSelector, hostSelector) => {\n // In Android browser, the lastIndex is not reset when the regex is used in String.replace()\n _polyfillHostRe.lastIndex = 0;\n if (_polyfillHostRe.test(selector)) {\n const replaceBy = `.${hostSelector}`;\n return selector.replace(_polyfillHostNoCombinatorRe, (_, selector) => {\n return selector.replace(/([^:]*)(:*)(.*)/, (_, before, colon, after) => {\n return before + replaceBy + colon + after;\n });\n }).replace(_polyfillHostRe, replaceBy + ' ');\n }\n return scopeSelector + ' ' + selector;\n};\nconst applyStrictSelectorScope = (selector, scopeSelector, hostSelector) => {\n const isRe = /\\[is=([^\\]]*)\\]/g;\n scopeSelector = scopeSelector.replace(isRe, (_, ...parts) => parts[0]);\n const className = '.' + scopeSelector;\n const _scopeSelectorPart = p => {\n let scopedP = p.trim();\n if (!scopedP) {\n return '';\n }\n if (p.indexOf(_polyfillHostNoCombinator) > -1) {\n scopedP = applySimpleSelectorScope(p, scopeSelector, hostSelector);\n } else {\n // remove :host since it should be unnecessary\n const t = p.replace(_polyfillHostRe, '');\n if (t.length > 0) {\n const matches = t.match(/([^:]*)(:*)(.*)/);\n if (matches) {\n scopedP = matches[1] + className + matches[2] + matches[3];\n }\n }\n }\n return scopedP;\n };\n const safeContent = safeSelector(selector);\n selector = safeContent.content;\n let scopedSelector = '';\n let startIndex = 0;\n let res;\n const sep = /( |>|\\+|~(?!=))\\s*/g;\n // If a selector appears before :host it should not be shimmed as it\n // matches on ancestor elements and not on elements in the host's shadow\n // `:host-context(div)` is transformed to\n // `-shadowcsshost-no-combinatordiv, div -shadowcsshost-no-combinator`\n // the `div` is not part of the component in the 2nd selectors and should not be scoped.\n // Historically `component-tag:host` was matching the component so we also want to preserve\n // this behavior to avoid breaking legacy apps (it should not match).\n // The behavior should be:\n // - `tag:host` -> `tag[h]` (this is to avoid breaking legacy apps, should not match anything)\n // - `tag :host` -> `tag [h]` (`tag` is not scoped because it's considered part of a\n // `:host-context(tag)`)\n const hasHost = selector.indexOf(_polyfillHostNoCombinator) > -1;\n // Only scope parts after the first `-shadowcsshost-no-combinator` when it is present\n let shouldScope = !hasHost;\n while ((res = sep.exec(selector)) !== null) {\n const separator = res[1];\n const part = selector.slice(startIndex, res.index).trim();\n shouldScope = shouldScope || part.indexOf(_polyfillHostNoCombinator) > -1;\n const scopedPart = shouldScope ? _scopeSelectorPart(part) : part;\n scopedSelector += `${scopedPart} ${separator} `;\n startIndex = sep.lastIndex;\n }\n const part = selector.substring(startIndex);\n shouldScope = shouldScope || part.indexOf(_polyfillHostNoCombinator) > -1;\n scopedSelector += shouldScope ? _scopeSelectorPart(part) : part;\n // replace the placeholders with their original values\n return restoreSafeSelector(safeContent.placeholders, scopedSelector);\n};\nconst scopeSelector = (selector, scopeSelectorText, hostSelector, slotSelector) => {\n return selector.split(',').map(shallowPart => {\n if (slotSelector && shallowPart.indexOf('.' + slotSelector) > -1) {\n return shallowPart.trim();\n }\n if (selectorNeedsScoping(shallowPart, scopeSelectorText)) {\n return applyStrictSelectorScope(shallowPart, scopeSelectorText, hostSelector).trim();\n } else {\n return shallowPart.trim();\n }\n }).join(', ');\n};\nconst scopeSelectors = (cssText, scopeSelectorText, hostSelector, slotSelector, commentOriginalSelector) => {\n return processRules(cssText, rule => {\n let selector = rule.selector;\n let content = rule.content;\n if (rule.selector[0] !== '@') {\n selector = scopeSelector(rule.selector, scopeSelectorText, hostSelector, slotSelector);\n } else if (rule.selector.startsWith('@media') || rule.selector.startsWith('@supports') || rule.selector.startsWith('@page') || rule.selector.startsWith('@document')) {\n content = scopeSelectors(rule.content, scopeSelectorText, hostSelector, slotSelector);\n }\n const cssRule = {\n selector: selector.replace(/\\s{2,}/g, ' ').trim(),\n content\n };\n return cssRule;\n });\n};\nconst scopeCssText = (cssText, scopeId, hostScopeId, slotScopeId, commentOriginalSelector) => {\n cssText = insertPolyfillHostInCssText(cssText);\n cssText = convertColonHost(cssText);\n cssText = convertColonHostContext(cssText);\n const slotted = convertColonSlotted(cssText, slotScopeId);\n cssText = slotted.cssText;\n cssText = convertShadowDOMSelectors(cssText);\n if (scopeId) {\n cssText = scopeSelectors(cssText, scopeId, hostScopeId, slotScopeId);\n }\n cssText = cssText.replace(/-shadowcsshost-no-combinator/g, `.${hostScopeId}`);\n cssText = cssText.replace(/>\\s*\\*\\s+([^{, ]+)/gm, ' $1 ');\n return {\n cssText: cssText.trim(),\n slottedSelectors: slotted.selectors\n };\n};\nconst scopeCss = (cssText, scopeId, commentOriginalSelector) => {\n const hostScopeId = scopeId + '-h';\n const slotScopeId = scopeId + '-s';\n const commentsWithHash = extractCommentsWithHash(cssText);\n cssText = stripComments(cssText);\n const orgSelectors = [];\n if (commentOriginalSelector) {\n const processCommentedSelector = rule => {\n const placeholder = `/*!@___${orgSelectors.length}___*/`;\n const comment = `/*!@${rule.selector}*/`;\n orgSelectors.push({\n placeholder,\n comment\n });\n rule.selector = placeholder + rule.selector;\n return rule;\n };\n cssText = processRules(cssText, rule => {\n if (rule.selector[0] !== '@') {\n return processCommentedSelector(rule);\n } else if (rule.selector.startsWith('@media') || rule.selector.startsWith('@supports') || rule.selector.startsWith('@page') || rule.selector.startsWith('@document')) {\n rule.content = processRules(rule.content, processCommentedSelector);\n return rule;\n }\n return rule;\n });\n }\n const scoped = scopeCssText(cssText, scopeId, hostScopeId, slotScopeId);\n cssText = [scoped.cssText, ...commentsWithHash].join('\\n');\n if (commentOriginalSelector) {\n orgSelectors.forEach(({\n placeholder,\n comment\n }) => {\n cssText = cssText.replace(placeholder, comment);\n });\n }\n scoped.slottedSelectors.forEach(slottedSelector => {\n cssText = cssText.replace(slottedSelector.orgSelector, slottedSelector.updatedSelector);\n });\n return cssText;\n};\nexport { scopeCss };","map":{"version":3,"names":["safeSelector","selector","placeholders","index","content","replace","_","keep","replaceBy","push","pseudo","exp","ss","restoreSafeSelector","_polyfillHost","_polyfillSlotted","_polyfillHostContext","_parenSuffix","_cssColonHostRe","RegExp","_cssColonHostContextRe","_cssColonSlottedRe","_polyfillHostNoCombinator","_polyfillHostNoCombinatorRe","_shadowDOMSelectorsRe","_selectorReSuffix","_polyfillHostRe","_colonHostRe","_colonSlottedRe","_colonHostContextRe","_commentRe","stripComments","input","_commentWithHashRe","extractCommentsWithHash","match","_ruleRe","_curlyRe","OPEN_CURLY","CLOSE_CURLY","BLOCK_PLACEHOLDER","processRules","ruleCallback","inputWithEscapedBlocks","escapeBlocks","nextBlockIndex","escapedString","m","suffix","contentPrefix","startsWith","blocks","substring","length","cssRule","rule","inputParts","split","resultParts","escapedBlocks","bracketCount","currentBlockParts","partIndex","part","join","strEscapedBlocks","insertPolyfillHostInCssText","convertColonRule","cssText","regExp","partReplacer","parts","r","i","p","trim","colonHostPartReplacer","host","convertColonHost","colonHostContextPartReplacer","indexOf","convertColonSlotted","slotScopeId","slotClass","selectors","compound","slottedSelector","prefixSelector","char","orgSelector","addedSelector","trimRight","updatedSelector","convertColonHostContext","convertShadowDOMSelectors","reduce","result","pattern","makeScopeMatcher","scopeSelector","lre","rre","selectorNeedsScoping","re","test","applySimpleSelectorScope","hostSelector","lastIndex","before","colon","after","applyStrictSelectorScope","isRe","className","_scopeSelectorPart","scopedP","t","matches","safeContent","scopedSelector","startIndex","res","sep","hasHost","shouldScope","exec","separator","slice","scopedPart","scopeSelectorText","slotSelector","map","shallowPart","scopeSelectors","commentOriginalSelector","scopeCssText","scopeId","hostScopeId","slotted","slottedSelectors","scopeCss","commentsWithHash","orgSelectors","processCommentedSelector","placeholder","comment","scoped","forEach"],"sources":["C:/Users/eudes.inacio/GabineteDigital/gabinete-digital-fo/node_modules/@ionic/pwa-elements/dist/esm/shadow-css-d7d058ec-d59cb009.js"],"sourcesContent":["/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n *\n * This file is a port of shadowCSS from webcomponents.js to TypeScript.\n * https://github.com/webcomponents/webcomponentsjs/blob/4efecd7e0e/src/ShadowCSS/ShadowCSS.js\n * https://github.com/angular/angular/blob/master/packages/compiler/src/shadow_css.ts\n */\nconst safeSelector = (selector) => {\n const placeholders = [];\n let index = 0;\n let content;\n // Replaces attribute selectors with placeholders.\n // The WS in [attr=\"va lue\"] would otherwise be interpreted as a selector separator.\n selector = selector.replace(/(\\[[^\\]]*\\])/g, (_, keep) => {\n const replaceBy = `__ph-${index}__`;\n placeholders.push(keep);\n index++;\n return replaceBy;\n });\n // Replaces the expression in `:nth-child(2n + 1)` with a placeholder.\n // WS and \"+\" would otherwise be interpreted as selector separators.\n content = selector.replace(/(:nth-[-\\w]+)(\\([^)]+\\))/g, (_, pseudo, exp) => {\n const replaceBy = `__ph-${index}__`;\n placeholders.push(exp);\n index++;\n return pseudo + replaceBy;\n });\n const ss = {\n content,\n placeholders,\n };\n return ss;\n};\nconst restoreSafeSelector = (placeholders, content) => {\n return content.replace(/__ph-(\\d+)__/g, (_, index) => placeholders[+index]);\n};\nconst _polyfillHost = '-shadowcsshost';\nconst _polyfillSlotted = '-shadowcssslotted';\n// note: :host-context pre-processed to -shadowcsshostcontext.\nconst _polyfillHostContext = '-shadowcsscontext';\nconst _parenSuffix = ')(?:\\\\((' +\n '(?:\\\\([^)(]*\\\\)|[^)(]*)+?' +\n ')\\\\))?([^,{]*)';\nconst _cssColonHostRe = new RegExp('(' + _polyfillHost + _parenSuffix, 'gim');\nconst _cssColonHostContextRe = new RegExp('(' + _polyfillHostContext + _parenSuffix, 'gim');\nconst _cssColonSlottedRe = new RegExp('(' + _polyfillSlotted + _parenSuffix, 'gim');\nconst _polyfillHostNoCombinator = _polyfillHost + '-no-combinator';\nconst _polyfillHostNoCombinatorRe = /-shadowcsshost-no-combinator([^\\s]*)/;\nconst _shadowDOMSelectorsRe = [\n /::shadow/g,\n /::content/g\n];\nconst _selectorReSuffix = '([>\\\\s~+\\[.,{:][\\\\s\\\\S]*)?$';\nconst _polyfillHostRe = /-shadowcsshost/gim;\nconst _colonHostRe = /:host/gim;\nconst _colonSlottedRe = /::slotted/gim;\nconst _colonHostContextRe = /:host-context/gim;\nconst _commentRe = /\\/\\*\\s*[\\s\\S]*?\\*\\//g;\nconst stripComments = (input) => {\n return input.replace(_commentRe, '');\n};\nconst _commentWithHashRe = /\\/\\*\\s*#\\s*source(Mapping)?URL=[\\s\\S]+?\\*\\//g;\nconst extractCommentsWithHash = (input) => {\n return input.match(_commentWithHashRe) || [];\n};\nconst _ruleRe = /(\\s*)([^;\\{\\}]+?)(\\s*)((?:{%BLOCK%}?\\s*;?)|(?:\\s*;))/g;\nconst _curlyRe = /([{}])/g;\nconst OPEN_CURLY = '{';\nconst CLOSE_CURLY = '}';\nconst BLOCK_PLACEHOLDER = '%BLOCK%';\nconst processRules = (input, ruleCallback) => {\n const inputWithEscapedBlocks = escapeBlocks(input);\n let nextBlockIndex = 0;\n return inputWithEscapedBlocks.escapedString.replace(_ruleRe, (...m) => {\n const selector = m[2];\n let content = '';\n let suffix = m[4];\n let contentPrefix = '';\n if (suffix && suffix.startsWith('{' + BLOCK_PLACEHOLDER)) {\n content = inputWithEscapedBlocks.blocks[nextBlockIndex++];\n suffix = suffix.substring(BLOCK_PLACEHOLDER.length + 1);\n contentPrefix = '{';\n }\n const cssRule = {\n selector,\n content\n };\n const rule = ruleCallback(cssRule);\n return `${m[1]}${rule.selector}${m[3]}${contentPrefix}${rule.content}${suffix}`;\n });\n};\nconst escapeBlocks = (input) => {\n const inputParts = input.split(_curlyRe);\n const resultParts = [];\n const escapedBlocks = [];\n let bracketCount = 0;\n let currentBlockParts = [];\n for (let partIndex = 0; partIndex < inputParts.length; partIndex++) {\n const part = inputParts[partIndex];\n if (part === CLOSE_CURLY) {\n bracketCount--;\n }\n if (bracketCount > 0) {\n currentBlockParts.push(part);\n }\n else {\n if (currentBlockParts.length > 0) {\n escapedBlocks.push(currentBlockParts.join(''));\n resultParts.push(BLOCK_PLACEHOLDER);\n currentBlockParts = [];\n }\n resultParts.push(part);\n }\n if (part === OPEN_CURLY) {\n bracketCount++;\n }\n }\n if (currentBlockParts.length > 0) {\n escapedBlocks.push(currentBlockParts.join(''));\n resultParts.push(BLOCK_PLACEHOLDER);\n }\n const strEscapedBlocks = {\n escapedString: resultParts.join(''),\n blocks: escapedBlocks\n };\n return strEscapedBlocks;\n};\nconst insertPolyfillHostInCssText = (selector) => {\n selector = selector\n .replace(_colonHostContextRe, _polyfillHostContext)\n .replace(_colonHostRe, _polyfillHost)\n .replace(_colonSlottedRe, _polyfillSlotted);\n return selector;\n};\nconst convertColonRule = (cssText, regExp, partReplacer) => {\n // m[1] = :host(-context), m[2] = contents of (), m[3] rest of rule\n return cssText.replace(regExp, (...m) => {\n if (m[2]) {\n const parts = m[2].split(',');\n const r = [];\n for (let i = 0; i < parts.length; i++) {\n const p = parts[i].trim();\n if (!p)\n break;\n r.push(partReplacer(_polyfillHostNoCombinator, p, m[3]));\n }\n return r.join(',');\n }\n else {\n return _polyfillHostNoCombinator + m[3];\n }\n });\n};\nconst colonHostPartReplacer = (host, part, suffix) => {\n return host + part.replace(_polyfillHost, '') + suffix;\n};\nconst convertColonHost = (cssText) => {\n return convertColonRule(cssText, _cssColonHostRe, colonHostPartReplacer);\n};\nconst colonHostContextPartReplacer = (host, part, suffix) => {\n if (part.indexOf(_polyfillHost) > -1) {\n return colonHostPartReplacer(host, part, suffix);\n }\n else {\n return host + part + suffix + ', ' + part + ' ' + host + suffix;\n }\n};\nconst convertColonSlotted = (cssText, slotScopeId) => {\n const slotClass = '.' + slotScopeId + ' > ';\n const selectors = [];\n cssText = cssText.replace(_cssColonSlottedRe, (...m) => {\n if (m[2]) {\n const compound = m[2].trim();\n const suffix = m[3];\n const slottedSelector = slotClass + compound + suffix;\n let prefixSelector = '';\n for (let i = m[4] - 1; i >= 0; i--) {\n const char = m[5][i];\n if (char === '}' || char === ',') {\n break;\n }\n prefixSelector = char + prefixSelector;\n }\n const orgSelector = prefixSelector + slottedSelector;\n const addedSelector = `${prefixSelector.trimRight()}${slottedSelector.trim()}`;\n if (orgSelector.trim() !== addedSelector.trim()) {\n const updatedSelector = `${addedSelector}, ${orgSelector}`;\n selectors.push({\n orgSelector,\n updatedSelector,\n });\n }\n return slottedSelector;\n }\n else {\n return _polyfillHostNoCombinator + m[3];\n }\n });\n return {\n selectors,\n cssText\n };\n};\nconst convertColonHostContext = (cssText) => {\n return convertColonRule(cssText, _cssColonHostContextRe, colonHostContextPartReplacer);\n};\nconst convertShadowDOMSelectors = (cssText) => {\n return _shadowDOMSelectorsRe.reduce((result, pattern) => result.replace(pattern, ' '), cssText);\n};\nconst makeScopeMatcher = (scopeSelector) => {\n const lre = /\\[/g;\n const rre = /\\]/g;\n scopeSelector = scopeSelector.replace(lre, '\\\\[').replace(rre, '\\\\]');\n return new RegExp('^(' + scopeSelector + ')' + _selectorReSuffix, 'm');\n};\nconst selectorNeedsScoping = (selector, scopeSelector) => {\n const re = makeScopeMatcher(scopeSelector);\n return !re.test(selector);\n};\nconst applySimpleSelectorScope = (selector, scopeSelector, hostSelector) => {\n // In Android browser, the lastIndex is not reset when the regex is used in String.replace()\n _polyfillHostRe.lastIndex = 0;\n if (_polyfillHostRe.test(selector)) {\n const replaceBy = `.${hostSelector}`;\n return selector\n .replace(_polyfillHostNoCombinatorRe, (_, selector) => {\n return selector.replace(/([^:]*)(:*)(.*)/, (_, before, colon, after) => {\n return before + replaceBy + colon + after;\n });\n })\n .replace(_polyfillHostRe, replaceBy + ' ');\n }\n return scopeSelector + ' ' + selector;\n};\nconst applyStrictSelectorScope = (selector, scopeSelector, hostSelector) => {\n const isRe = /\\[is=([^\\]]*)\\]/g;\n scopeSelector = scopeSelector.replace(isRe, (_, ...parts) => parts[0]);\n const className = '.' + scopeSelector;\n const _scopeSelectorPart = (p) => {\n let scopedP = p.trim();\n if (!scopedP) {\n return '';\n }\n if (p.indexOf(_polyfillHostNoCombinator) > -1) {\n scopedP = applySimpleSelectorScope(p, scopeSelector, hostSelector);\n }\n else {\n // remove :host since it should be unnecessary\n const t = p.replace(_polyfillHostRe, '');\n if (t.length > 0) {\n const matches = t.match(/([^:]*)(:*)(.*)/);\n if (matches) {\n scopedP = matches[1] + className + matches[2] + matches[3];\n }\n }\n }\n return scopedP;\n };\n const safeContent = safeSelector(selector);\n selector = safeContent.content;\n let scopedSelector = '';\n let startIndex = 0;\n let res;\n const sep = /( |>|\\+|~(?!=))\\s*/g;\n // If a selector appears before :host it should not be shimmed as it\n // matches on ancestor elements and not on elements in the host's shadow\n // `:host-context(div)` is transformed to\n // `-shadowcsshost-no-combinatordiv, div -shadowcsshost-no-combinator`\n // the `div` is not part of the component in the 2nd selectors and should not be scoped.\n // Historically `component-tag:host` was matching the component so we also want to preserve\n // this behavior to avoid breaking legacy apps (it should not match).\n // The behavior should be:\n // - `tag:host` -> `tag[h]` (this is to avoid breaking legacy apps, should not match anything)\n // - `tag :host` -> `tag [h]` (`tag` is not scoped because it's considered part of a\n // `:host-context(tag)`)\n const hasHost = selector.indexOf(_polyfillHostNoCombinator) > -1;\n // Only scope parts after the first `-shadowcsshost-no-combinator` when it is present\n let shouldScope = !hasHost;\n while ((res = sep.exec(selector)) !== null) {\n const separator = res[1];\n const part = selector.slice(startIndex, res.index).trim();\n shouldScope = shouldScope || part.indexOf(_polyfillHostNoCombinator) > -1;\n const scopedPart = shouldScope ? _scopeSelectorPart(part) : part;\n scopedSelector += `${scopedPart} ${separator} `;\n startIndex = sep.lastIndex;\n }\n const part = selector.substring(startIndex);\n shouldScope = shouldScope || part.indexOf(_polyfillHostNoCombinator) > -1;\n scopedSelector += shouldScope ? _scopeSelectorPart(part) : part;\n // replace the placeholders with their original values\n return restoreSafeSelector(safeContent.placeholders, scopedSelector);\n};\nconst scopeSelector = (selector, scopeSelectorText, hostSelector, slotSelector) => {\n return selector.split(',')\n .map(shallowPart => {\n if (slotSelector && shallowPart.indexOf('.' + slotSelector) > -1) {\n return shallowPart.trim();\n }\n if (selectorNeedsScoping(shallowPart, scopeSelectorText)) {\n return applyStrictSelectorScope(shallowPart, scopeSelectorText, hostSelector).trim();\n }\n else {\n return shallowPart.trim();\n }\n })\n .join(', ');\n};\nconst scopeSelectors = (cssText, scopeSelectorText, hostSelector, slotSelector, commentOriginalSelector) => {\n return processRules(cssText, (rule) => {\n let selector = rule.selector;\n let content = rule.content;\n if (rule.selector[0] !== '@') {\n selector = scopeSelector(rule.selector, scopeSelectorText, hostSelector, slotSelector);\n }\n else if (rule.selector.startsWith('@media') || rule.selector.startsWith('@supports') ||\n rule.selector.startsWith('@page') || rule.selector.startsWith('@document')) {\n content = scopeSelectors(rule.content, scopeSelectorText, hostSelector, slotSelector);\n }\n const cssRule = {\n selector: selector.replace(/\\s{2,}/g, ' ').trim(),\n content\n };\n return cssRule;\n });\n};\nconst scopeCssText = (cssText, scopeId, hostScopeId, slotScopeId, commentOriginalSelector) => {\n cssText = insertPolyfillHostInCssText(cssText);\n cssText = convertColonHost(cssText);\n cssText = convertColonHostContext(cssText);\n const slotted = convertColonSlotted(cssText, slotScopeId);\n cssText = slotted.cssText;\n cssText = convertShadowDOMSelectors(cssText);\n if (scopeId) {\n cssText = scopeSelectors(cssText, scopeId, hostScopeId, slotScopeId);\n }\n cssText = cssText.replace(/-shadowcsshost-no-combinator/g, `.${hostScopeId}`);\n cssText = cssText.replace(/>\\s*\\*\\s+([^{, ]+)/gm, ' $1 ');\n return {\n cssText: cssText.trim(),\n slottedSelectors: slotted.selectors,\n };\n};\nconst scopeCss = (cssText, scopeId, commentOriginalSelector) => {\n const hostScopeId = scopeId + '-h';\n const slotScopeId = scopeId + '-s';\n const commentsWithHash = extractCommentsWithHash(cssText);\n cssText = stripComments(cssText);\n const orgSelectors = [];\n if (commentOriginalSelector) {\n const processCommentedSelector = (rule) => {\n const placeholder = `/*!@___${orgSelectors.length}___*/`;\n const comment = `/*!@${rule.selector}*/`;\n orgSelectors.push({ placeholder, comment });\n rule.selector = placeholder + rule.selector;\n return rule;\n };\n cssText = processRules(cssText, rule => {\n if (rule.selector[0] !== '@') {\n return processCommentedSelector(rule);\n }\n else if (rule.selector.startsWith('@media') || rule.selector.startsWith('@supports') ||\n rule.selector.startsWith('@page') || rule.selector.startsWith('@document')) {\n rule.content = processRules(rule.content, processCommentedSelector);\n return rule;\n }\n return rule;\n });\n }\n const scoped = scopeCssText(cssText, scopeId, hostScopeId, slotScopeId);\n cssText = [scoped.cssText, ...commentsWithHash].join('\\n');\n if (commentOriginalSelector) {\n orgSelectors.forEach(({ placeholder, comment }) => {\n cssText = cssText.replace(placeholder, comment);\n });\n }\n scoped.slottedSelectors.forEach(slottedSelector => {\n cssText = cssText.replace(slottedSelector.orgSelector, slottedSelector.updatedSelector);\n });\n return cssText;\n};\n\nexport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