/*! For license information please see 837.js.LICENSE.txt */ "use strict";(self.webpackJsonp=self.webpackJsonp||[]).push([[837],{"3837":function(e,t,r){r.r(t),r.d(t,{"scopeCss":function(){return B}});var n=r(766),o="-shadowcsshost",c="-shadowcssslotted",s="-shadowcsscontext",a=")(?:\\(((?:\\([^)(]*\\)|[^)(]*)+?)\\))?([^,{]*)",i=new RegExp("("+o+a,"gim"),l=new RegExp("("+s+a,"gim"),u=new RegExp("("+c+a,"gim"),p=o+"-no-combinator",f=/-shadowcsshost-no-combinator([^\s]*)/,h=[/::shadow/g,/::content/g],g=/-shadowcsshost/gim,d=/:host/gim,v=/::slotted/gim,m=/:host-context/gim,S=/\/\*\s*[\s\S]*?\*\//g,x=/\/\*\s*#\s*source(Mapping)?URL=[\s\S]+?\*\//g,_=/(\s*)([^;\{\}]+?)(\s*)((?:{%BLOCK%}?\s*;?)|(?:\s*;))/g,w=/([{}])/g,C=/(^.*?[^\\])??((:+)(.*)|$)/,b="%BLOCK%",R=function processRules(e,t){var r=W(e),n=0;return r.escapedString.replace(_,(function(){var e=arguments.length<=2?void 0:arguments[2],o="",c=arguments.length<=4?void 0:arguments[4],s="";c&&c.startsWith("{"+b)&&(o=r.blocks[n++],c=c.substring(b.length+1),s="{");var a=t({"selector":e,"content":o});return"".concat(arguments.length<=1?void 0:arguments[1]).concat(a.selector).concat(arguments.length<=3?void 0:arguments[3]).concat(s).concat(a.content).concat(c)}))},W=function escapeBlocks(e){for(var t=e.split(w),r=[],n=[],o=0,c=[],s=0;s0?c.push(a):(c.length>0&&(n.push(c.join("")),r.push(b),c=[]),r.push(a)),"{"===a&&o++}return c.length>0&&(n.push(c.join("")),r.push(b)),{"escapedString":r.join(""),"blocks":n}},O=function convertColonRule(e,t,r){return e.replace(t,(function(){for(var e=arguments.length,t=new Array(e),n=0;n-1?k(e,t,r):e+t+r+", "+t+" "+e+r},E=function selectorNeedsScoping(e,t){var r=function makeScopeMatcher(e){return e=e.replace(/\[/g,"\\[").replace(/\]/g,"\\]"),new RegExp("^("+e+")([>\\s~+[.,{:][\\s\\S]*)?$","m")}(t);return!r.test(e)},H=function injectScopingSelector(e,t){return e.replace(C,(function(e){return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:"")+t+(arguments.length>3&&void 0!==arguments[3]?arguments[3]:"")+(arguments.length>4&&void 0!==arguments[4]?arguments[4]:"")}))},T=function applyStrictSelectorScope(e,t,r){t=t.replace(/\[is=([^\]]*)\]/g,(function(e){return arguments.length<=1?void 0:arguments[1]}));for(var n,o="."+t,c=function _scopeSelectorPart(e){var n=e.trim();if(!n)return"";if(e.indexOf(p)>-1)n=function applySimpleSelectorScope(e,t,r){if(g.lastIndex=0,g.test(e)){var n=".".concat(r);return e.replace(f,(function(e,t){return H(t,n)})).replace(g,n+" ")}return t+" "+e}(e,t,r);else{var c=e.replace(g,"");c.length>0&&(n=H(c,o))}return n},s=function safeSelector(e){var t=[],r=0;return{"content":(e=e.replace(/(\[[^\]]*\])/g,(function(e,n){var o="__ph-".concat(r,"__");return t.push(n),r++,o}))).replace(/(:nth-[-\w]+)(\([^)]+\))/g,(function(e,n,o){var c="__ph-".concat(r,"__");return t.push(o),r++,n+c})),"placeholders":t}}(e),a="",i=0,l=/( |>|\+|~(?!=))\s*/g,u=!((e=s.content).indexOf(p)>-1);null!==(n=l.exec(e));){var h=n[1],d=e.slice(i,n.index).trim(),v=(u=u||d.indexOf(p)>-1)?c(d):d;a+="".concat(v," ").concat(h," "),i=l.lastIndex}var m=e.substring(i);return a+=(u=u||m.indexOf(p)>-1)?c(m):m,function restoreSafeSelector(e,t){return t.replace(/__ph-(\d+)__/g,(function(t,r){return e[+r]}))}(s.placeholders,a)},y=function scopeSelectors(e,t,r,n,o){return R(e,(function(e){var o=e.selector,c=e.content;return"@"!==e.selector[0]?o=function scopeSelector(e,t,r,n){return e.split(",").map((function(e){return n&&e.indexOf("."+n)>-1?e.trim():E(e,t)?T(e,t,r).trim():e.trim()})).join(", ")}(e.selector,t,r,n):(e.selector.startsWith("@media")||e.selector.startsWith("@supports")||e.selector.startsWith("@page")||e.selector.startsWith("@document"))&&(c=scopeSelectors(e.content,t,r,n)),{"selector":o.replace(/\s{2,}/g," ").trim(),"content":c}}))},P=function scopeCssText(e,t,r,n,a){var f=function convertColonSlotted(e,t){var r="."+t+" > ",n=[];return e=e.replace(u,(function(){for(var e=arguments.length,t=new Array(e),o=0;o=0;l--){var u=t[5][l];if("}"===u||","===u)break;i=u+i}var f=i+a,h="".concat(i.trimRight()).concat(a.trim());if(f.trim()!==h.trim()){var g="".concat(h,", ").concat(f);n.push({"orgSelector":f,"updatedSelector":g})}return a}return p+t[3]})),{"selectors":n,"cssText":e}}(e=function convertColonHostContext(e){return O(e,l,j)}(e=function convertColonHost(e){return O(e,i,k)}(e=function insertPolyfillHostInCssText(e){return e.replace(m,s).replace(d,o).replace(v,c)}(e))),n);return e=function convertShadowDOMSelectors(e){return h.reduce((function(e,t){return e.replace(t," ")}),e)}(e=f.cssText),t&&(e=y(e,t,r,n)),{"cssText":(e=(e=e.replace(/-shadowcsshost-no-combinator/g,".".concat(r))).replace(/>\s*\*\s+([^{, ]+)/gm," $1 ")).trim(),"slottedSelectors":f.selectors}},B=function scopeCss(e,t,r){var o=t+"-h",c=t+"-s",s=function extractCommentsWithHash(e){return e.match(x)||[]}(e);e=function stripComments(e){return e.replace(S,"")}(e);var a=[];if(r){var i=function processCommentedSelector(e){var t="/*!@___".concat(a.length,"___*/"),r="/*!@".concat(e.selector,"*/");return a.push({"placeholder":t,"comment":r}),e.selector=t+e.selector,e};e=R(e,(function(e){return"@"!==e.selector[0]?i(e):e.selector.startsWith("@media")||e.selector.startsWith("@supports")||e.selector.startsWith("@page")||e.selector.startsWith("@document")?(e.content=R(e.content,i),e):e}))}var l=P(e,t,o,c);return e=[l.cssText].concat((0,n.Z)(s)).join("\n"),r&&a.forEach((function(t){var r=t.placeholder,n=t.comment;e=e.replace(r,n)})),l.slottedSelectors.forEach((function(t){e=e.replace(t.orgSelector,t.updatedSelector)})),e}}}]);