-
Notifications
You must be signed in to change notification settings - Fork 0
/
345.d30778aed379d3ecfa73.js
1 lines (1 loc) · 5.09 KB
/
345.d30778aed379d3ecfa73.js
1
"use strict";(self.webpackChunksparkworks_console=self.webpackChunksparkworks_console||[]).push([[345],{15345:function(gr,W,O){O.r(W),O.d(W,{scopeCss:function(){return hr}});var j=O(60332),g="-shadowcsshost",P="-shadowcssslotted",B="-shadowcsscontext",k=")(?:\\(((?:\\([^)(]*\\)|[^)(]*)+?)\\))?([^,{]*)",A=new RegExp("("+g+k,"gim"),U=new RegExp("("+B+k,"gim"),K=new RegExp("("+P+k,"gim"),h=g+"-no-combinator",x=/-shadowcsshost-no-combinator([^\s]*)/,I=[/::shadow/g,/::content/g],_=/-shadowcsshost/gim,$=/:host/gim,Z=/::slotted/gim,z=/:host-context/gim,F=/\/\*\s*[\s\S]*?\*\//g,J=/\/\*\s*#\s*source(Mapping)?URL=[\s\S]+?\*\//g,V=/(\s*)([^;\{\}]+?)(\s*)((?:{%BLOCK%}?\s*;?)|(?:\s*;))/g,X=/([{}])/g,C="%BLOCK%",w=function(r,e){var t=rr(r),a=0;return t.escapedString.replace(V,function(){var s=arguments.length<=2?void 0:arguments[2],n="",c=arguments.length<=4?void 0:arguments[4],i="";c&&c.startsWith("{"+C)&&(n=t.blocks[a++],c=c.substring(C.length+1),i="{");var u={selector:s,content:n},o=e(u);return"".concat(arguments.length<=1?void 0:arguments[1]).concat(o.selector).concat(arguments.length<=3?void 0:arguments[3]).concat(i).concat(o.content).concat(c)})},rr=function(r){for(var e=r.split(X),t=[],a=[],s=0,n=[],c=0;c<e.length;c++){var i=e[c];"}"===i&&s--,s>0?n.push(i):(n.length>0&&(a.push(n.join("")),t.push(C),n=[]),t.push(i)),"{"===i&&s++}return n.length>0&&(a.push(n.join("")),t.push(C)),{escapedString:t.join(""),blocks:a}},y=function(r,e,t){return r.replace(e,function(){for(var a=arguments.length,s=new Array(a),n=0;n<a;n++)s[n]=arguments[n];if(s[2]){for(var c=s[2].split(","),i=[],u=0;u<c.length;u++){var o=c[u].trim();if(!o)break;i.push(t(h,o,s[3]))}return i.join(",")}return h+s[3]})},L=function(r,e,t){return r+e.replace(g,"")+t},nr=function(r,e,t){return e.indexOf(g)>-1?L(r,e,t):r+e+t+", "+e+" "+r+t},pr=function l(r,e,t,a,s){return w(r,function(n){var c=n.selector,i=n.content;return"@"!==n.selector[0]?c=function(r,e,t,a){return r.split(",").map(function(s){return a&&s.indexOf("."+a)>-1?s.trim():function(r,e){return!function(r){return r=r.replace(/\[/g,"\\[").replace(/\]/g,"\\]"),new RegExp("^("+r+")([>\\s~+[.,{:][\\s\\S]*)?$","m")}(e).test(r)}(s,e)?function(r,e,t){for(var o,s="."+(e=e.replace(/\[is=([^\]]*)\]/g,function(mr){return arguments.length<=1?void 0:arguments[1]})),n=function(S){var R=S.trim();if(!R)return"";if(S.indexOf(h)>-1)R=function(r,e,t){if(_.lastIndex=0,_.test(r)){var a=".".concat(t);return r.replace(x,function(s,n){return n.replace(/([^:]*)(:*)(.*)/,function(c,i,u,o){return i+a+u+o})}).replace(_,a+" ")}return e+" "+r}(S,e,t);else{var M=S.replace(_,"");if(M.length>0){var H=M.match(/([^:]*)(:*)(.*)/);H&&(R=H[1]+s+H[2]+H[3])}}return R},c=function(r){var e=[],t=0;return{content:(r=r.replace(/(\[[^\]]*\])/g,function(n,c){var i="__ph-".concat(t,"__");return e.push(c),t++,i})).replace(/(:nth-[-\w]+)(\([^)]+\))/g,function(n,c,i){var u="__ph-".concat(t,"__");return e.push(i),t++,c+u}),placeholders:e}}(r),i="",u=0,v=/( |>|\+|~(?!=))\s*/g,p=!((r=c.content).indexOf(h)>-1);null!==(o=v.exec(r));){var d=o[1],m=r.slice(u,o.index).trim(),b=(p=p||m.indexOf(h)>-1)?n(m):m;i+="".concat(b," ").concat(d," "),u=v.lastIndex}var E=r.substring(u);return i+=(p=p||E.indexOf(h)>-1)?n(E):E,function(r,e){return e.replace(/__ph-(\d+)__/g,function(t,a){return r[+a]})}(c.placeholders,i)}(s,e,t).trim():s.trim()}).join(", ")}(n.selector,e,t,a):(n.selector.startsWith("@media")||n.selector.startsWith("@supports")||n.selector.startsWith("@page")||n.selector.startsWith("@document"))&&(i=l(n.content,e,t,a)),{selector:c.replace(/\s{2,}/g," ").trim(),content:i}})},hr=function(r,e,t){var a=e+"-h",s=e+"-s",n=function(r){return r.match(J)||[]}(r);r=function(r){return r.replace(F,"")}(r);var c=[];if(t){var i=function(v){var f="/*!@___".concat(c.length,"___*/"),p="/*!@".concat(v.selector,"*/");return c.push({placeholder:f,comment:p}),v.selector=f+v.selector,v};r=w(r,function(o){return"@"!==o.selector[0]?i(o):((o.selector.startsWith("@media")||o.selector.startsWith("@supports")||o.selector.startsWith("@page")||o.selector.startsWith("@document"))&&(o.content=w(o.content,i)),o)})}var u=function(r,e,t,a,s){var n=function(r,e){var t="."+e+" > ",a=[];return r=r.replace(K,function(){for(var s=arguments.length,n=new Array(s),c=0;c<s;c++)n[c]=arguments[c];if(n[2]){for(var i=n[2].trim(),o=t+i+n[3],v="",f=n[4]-1;f>=0;f--){var p=n[5][f];if("}"===p||","===p)break;v=p+v}var d=v+o,m="".concat(v.trimRight()).concat(o.trim());if(d.trim()!==m.trim()){var b="".concat(m,", ").concat(d);a.push({orgSelector:d,updatedSelector:b})}return o}return h+n[3]}),{selectors:a,cssText:r}}(r=function(r){return y(r,U,nr)}(r=function(r){return y(r,A,L)}(r=function(r){return r.replace(z,B).replace($,g).replace(Z,P)}(r))),a);return r=function(r){return I.reduce(function(e,t){return e.replace(t," ")},r)}(r=n.cssText),e&&(r=pr(r,e,t,a)),{cssText:(r=(r=r.replace(/-shadowcsshost-no-combinator/g,".".concat(t))).replace(/>\s*\*\s+([^{, ]+)/gm," $1 ")).trim(),slottedSelectors:n.selectors}}(r,e,a,s);return r=[u.cssText].concat((0,j.Z)(n)).join("\n"),t&&c.forEach(function(o){r=r.replace(o.placeholder,o.comment)}),u.slottedSelectors.forEach(function(o){r=r.replace(o.orgSelector,o.updatedSelector)}),r}}}]);