mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2024-06-14 11:52:32 +03:00
1 line
5.7 KiB
JavaScript
1 line
5.7 KiB
JavaScript
|
!function(e,t,n){function r(e,t){return typeof e===t}function o(e){var t=v.className,n=c._config.classPrefix||"";if(g&&(t=t.baseVal),c._config.enableJSClass){var r=new RegExp("(^|\\s)"+n+"no-js(\\s|$)");t=t.replace(r,"$1"+n+"js$2")}c._config.enableClasses&&(t+=" "+n+e.join(" "+n),g?v.className.baseVal=t:v.className=t)}function i(e,t){if("object"==typeof e)for(var n in e)h(e,n)&&i(n,e[n]);else{var r=(e=e.toLowerCase()).split("."),s=c[r[0]];if(2==r.length&&(s=s[r[1]]),void 0!==s)return c;t="function"==typeof t?t():t,1==r.length?c[r[0]]=t:(!c[r[0]]||c[r[0]]instanceof Boolean||(c[r[0]]=new Boolean(c[r[0]])),c[r[0]][r[1]]=t),o([(t&&0!=t?"":"no-")+r.join("-")]),c._trigger(e,t)}return c}function s(){return"function"!=typeof t.createElement?t.createElement(arguments[0]):g?t.createElementNS.call(t,"http://www.w3.org/2000/svg",arguments[0]):t.createElement.apply(t,arguments)}function l(e,n,r,o){var i,l,a,f,u="modernizr",p=s("div"),d=function(){var e=t.body;return e||((e=s(g?"svg":"body")).fake=!0),e}();if(parseInt(r,10))for(;r--;)(a=s("div")).id=o?o[r]:u+(r+1),p.appendChild(a);return i=s("style"),i.type="text/css",i.id="s"+u,(d.fake?d:p).appendChild(i),d.appendChild(p),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(t.createTextNode(e)),p.id=u,d.fake&&(d.style.background="",d.style.overflow="hidden",f=v.style.overflow,v.style.overflow="hidden",v.appendChild(d)),l=n(p,e),d.fake?(d.parentNode.removeChild(d),v.style.overflow=f,v.offsetHeight):p.parentNode.removeChild(p),!!l}function a(e){return e.replace(/([A-Z])/g,function(e,t){return"-"+t.toLowerCase()}).replace(/^ms-/,"-ms-")}function f(t,o,i,f,u){var p=t.charAt(0).toUpperCase()+t.slice(1),d=(t+" "+y.join(p+" ")+p).split(" ");return r(o,"string")||r(o,"undefined")?function(t,o,i,f){function u(){d&&(delete w.style,delete w.modElem)}if(f=!r(f,"undefined")&&f,!r(i,"undefined")){var p=function(t,r){var o=t.length;if("CSS"in e&&"supports"in e.CSS){for(;o--;)if(e.CSS.supports(a(t[o]),r))return!0;return!1}if("CSSSupportsRule"in e){for(var i=[];o--;)i.push("("+a(t[o])+":"+r+")");return i=i.join(" or "),l("@supports ("+i+") { #modernizr { position: absolute; } }",function(t){return"absolute"==function(t,n,r){var o;if("getComputedStyle"in e){o=getComputedStyle.call(e,t,n);var i=e.console;null!==o?r&&(o=o.getPropertyValue(r)):i&&i[i.error?"error":"log"].call(i,"getComputedStyle returning null, its possible modernizr test results are inaccurate")}else o=!n&&t.currentStyle&&t.currentStyle[r];return o}(t,null,"position")})}return n}(t,i);if(!r(p,"undefined"))return p}for(var d,c,h,m,v,g=["modernizr","tspan","samp"];!w.style&&g.length;)d=!0,w.modElem=s(g.shift()),w.style=w.modElem.style;for(h=t.length,c=0;c<h;c++)if(m=t[c],v=w.style[m],!!~(""+m).indexOf("-")&&(m=m.replace(/([a-z])-([a-z])/g,function(e,t,n){return t+n.toUpperCase()}).replace(/^-/,"")),w.style[m]!==n){if(f||r(i,"undefined"))return u(),"pfx"!=o||m;try{w.style[m]=i}catch(e){}if(w.style[m]!=v)return u(),"pfx"!=o||m}return u(),!1}(d,o,f,u):(d=(t+" "+S.join(p+" ")+p).split(" "),function(e,t,n){var o;for(var i in e)if(e[i]in t)return!1===n?e[i]:(o=t[e[i]],r(o,"function")?function(e,t){return function(){return e.apply(t,arguments)}}(o,n||t):o);return!1}(d,o,i))}function u(e,t,r){return f(e,n,n,t,r)}var p=[],d={_version:"3.5.0",_config:{classPrefix:"",enableClasses:!0,enableJSClass:!0,usePrefixes:!0},_q:[],on:function(e,t){var n=this;setTimeout(function(){t(n[e])},0)},addTest:function(e,t,n){p.push({name:e,fn:t,options:n})},addAsyncTest:function(e){p.push({name:null,fn:e})}},c=function(){};c.prototype=d,c=new c;var h,m=[],v=t.documentElement,g="svg"===v.nodeName.toLowerCase();!function(){var e={}.hasOwnProperty;h=r(e,"undefined")||r(e.call,"undefined")?function(e,t){return t in e&&r(e.constructor.prototype[t],"undefined")}:function(t,n){return e.call(t,n)}}(),d._l={},d.on=function(e,t){this._l[e]||(this._l[e]=[]),this._l[e].push(t),c.hasOwnProperty(e)&&setTimeout(function(){c._trigger(e,c[e])},0)},d._trigger=function(e,t){if(this._l[e]){var n=this._l[e];setTimeout(function(){var e;for(e=0;e<n.length;e++)(0,n[e])(t)},0),delete this._l[e
|