/*! * css-vars-ponyfill * v2.3.2 * https://jhildenbiddle.github.io/css-vars-ponyfill/ * (c) 2018-2020 John Hildenbiddle * MIT license */!function(a,b){"object"==typeof exports&&"undefined"!=typeof module?module.exports=b():"function"==typeof define&&define.amd?define(b):(a=a||self).cssVars=b()}(this,function(){"use strict";function q(){return(q=Object.assign||function(a){for(var b,c=1;ca.length)&&(b=a.length);for(var c=0,d=Array(b);cObject.keys(f).length||Object.keys(f).length&&Object.keys(E.job).some(function(a){return E.job[a]!==f[a]})))J(m.rootElement),I(m);else{var k=[],n=[],p=!1;if(m.updateDOM&&M.job++,e.forEach(function(a,c){var e=!a.__cssVars;if(a.__cssVars)try{o(a.__cssVars.tree,q({},m,{variables:E.job,onWarning:j}));var h=H(a.__cssVars.tree);if(m.updateDOM){var i=b[c],r=N.cssVarFunc.test(i);if(a.getAttribute("data-cssvars")||a.setAttribute("data-cssvars","src"),h.length&&r){var l=a.getAttribute("data-cssvars-group")||++M.group,f=h.replace(/\s/g,""),s=m.rootElement.querySelector("[data-cssvars=\"out\"][data-cssvars-group=\"".concat(l,"\"]"))||document.createElement("style");p=p||N.cssKeyframes.test(h),m.preserveStatic&&(a.sheet.disabled=!0),s.hasAttribute("data-cssvars")||s.setAttribute("data-cssvars","out"),f===a.textContent.replace(/\s/g,"")?(e=!0,s&&s.parentNode&&(a.removeAttribute("data-cssvars-group"),s.parentNode.removeChild(s))):f!==s.textContent.replace(/\s/g,"")&&([a,s].forEach(function(a){a.setAttribute("data-cssvars-job",M.job),a.setAttribute("data-cssvars-group",l)}),s.textContent=h,k.push(h),n.push(s),s.parentNode||a.parentNode.insertBefore(s,a.nextSibling))}}else a.textContent.replace(/\s/g,"")!==h&&k.push(h)}catch(b){d(b.message,a)}e&&a.setAttribute("data-cssvars","skip"),a.hasAttribute("data-cssvars-job")||a.setAttribute("data-cssvars-job",M.job)}),P=m.rootElement.querySelectorAll("[data-cssvars]:not([data-cssvars=\"out\"])").length,m.shadowDOM)for(var i,s=[m.rootElement].concat(z(m.rootElement.querySelectorAll("*"))),g=0;i=s[g];++g)if(i.shadowRoot&&i.shadowRoot.querySelector("style")){var t=q({},m,{rootElement:i.shadowRoot});I(t)}m.updateDOM&&p&&r(m.rootElement),w=!1,m.onComplete(k.join(""),n,JSON.parse(JSON.stringify(E.job)),D()-m.__benchmark),c(n.length)}}}))}}function k(a){function b(a){var b=a.hasAttribute("disabled"),c=(a.sheet||{}).disabled;return b||c}function c(a){return"LINK"===a.tagName&&-1!==(a.getAttribute("rel")||"").indexOf("stylesheet")&&!b(a)}function d(a){return Array.apply(null,a).some(function(a){var d=1===a.nodeType&&a.hasAttribute("data-cssvars"),e=function(a){return"STYLE"===a.tagName&&!b(a)}(a)&&N.cssVars.test(a.textContent);return!d&&(c(a)||e)})}window.MutationObserver&&(g&&(g.disconnect(),g=null),(g=new MutationObserver(function(b){b.some(function(b){var e,f=!1;return"attributes"===b.type?f=c(b.target):"childList"===b.type&&(f=d(b.addedNodes)||(e=b.removedNodes,Array.apply(null,e).some(function(b){var d=1===b.nodeType,e=d&&"out"===b.getAttribute("data-cssvars"),f=d&&"src"===b.getAttribute("data-cssvars"),g=f;if(f||e){var h=b.getAttribute("data-cssvars-group"),i=a.rootElement.querySelector("[data-cssvars-group=\"".concat(h,"\"]"));f&&(J(a.rootElement),E.dom={}),i&&i.parentNode.removeChild(i)}return g}))),f})&&I(a)})).observe(document.documentElement,{attributes:!0,attributeFilter:["disabled","href"],childList:!0,subtree:!0}))}function h(a){var b=1