You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
DS7/DSWebMobile/Scripts/css3-mediaqueries.js

1 line
16 KiB
JavaScript

2 years ago
if(typeof Object.create!=="function"){Object.create=function(o){function F(){};F.prototype=o;return new F()}}var ua={toString:function(){return navigator.userAgent},test:function(s){return this.toString().toLowerCase().indexOf(s.toLowerCase())>-1}};ua.version=(ua.toString().toLowerCase().match(/[\s\S]+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[])[1];ua.webkit=ua.test("webkit");ua.gecko=ua.test("gecko")&&!ua.webkit;ua.opera=ua.test("opera");ua.ie=ua.test("msie")&&!ua.opera;ua.ie6=ua.ie&&document.compatMode&&typeof document.documentElement.style.maxHeight==="undefined";ua.ie7=ua.ie&&document.documentElement&&typeof document.documentElement.style.maxHeight!=="undefined"&&typeof XDomainRequest==="undefined";ua.ie8=ua.ie&&typeof XDomainRequest!=="undefined";var domReady=function(){var _1=[];var _2=function(){if(!arguments.callee.done){arguments.callee.done=true;for(var i=0;i<_1.length;i++){_1[i]()}}};if(document.addEventListener){document.addEventListener("DOMContentLoaded",_2,false)}if(ua.ie){(function(){try{document.documentElement.doScroll("left");document.body.length}catch(e){setTimeout(arguments.callee,50);return}_2()})();document.onreadystatechange=function(){if(document.readyState==="complete"){document.onreadystatechange=null;_2()}}}if(ua.webkit&&document.readyState){(function(){if(document.readyState!=="loading"){_2()}else{setTimeout(arguments.callee,10)}})()}window.onload=_2;return function(fn){if(typeof fn==="function"){if(_2.done){fn()}else{_1[_1.length]=fn}}return fn}}();var cssHelper=function(){var _3={BLOCKS:/[^\s{][^{]*\{(?:[^{}]*\{[^{}]*\}[^{}]*|[^{}]*)*\}/g,BLOCKS_INSIDE:/[^\s{][^{]*\{[^{}]*\}/g,DECLARATIONS:/[a-zA-Z\-]+[^;]*:[^;]+;/g,RELATIVE_URLS:/url\(['"]?([^\/\)'"][^:\)'"]+)['"]?\)/g,REDUNDANT_COMPONENTS:/(?:\/\*([^*\\\\]|\*(?!\/))+\*\/|@import[^;]+;|@-moz-document\s*url-prefix\(\)\s*{(([^{}])+{([^{}])+}([^{}])+)+})/g,REDUNDANT_WHITESPACE:/\s*(,|:|;|\{|\})\s*/g,MORE_WHITESPACE:/\s{2,}/g,FINAL_SEMICOLONS:/;\}/g,NOT_WHITESPACE:/\S+/g};var _4,_5=false;var _6=[];var _7=function(fn){if(typeof fn==="function"){_6[_6.length]=fn}};var _8=function(){for(var i=0;i<_6.length;i++){_6[i](_4)}};var _9={};var _a=function(n,v){if(_9[n]){var _b=_9[n].listeners;if(_b){for(var i=0;i<_b.length;i++){_b[i](v)}}}};var _c=function(_d,_e,_f){if(ua.ie&&!window.XMLHttpRequest){window.XMLHttpRequest=function(){return new ActiveXObject("Microsoft.XMLHTTP")}}if(!XMLHttpRequest){return""}var r=new XMLHttpRequest();try{r.open("get",_d,true);r.setRequestHeader("X_REQUESTED_WITH","XMLHttpRequest")}catch(e){_f();return}var _10=false;setTimeout(function(){_10=true},5000);document.documentElement.style.cursor="progress";r.onreadystatechange=function(){if(r.readyState===4&&!_10){if(!r.status&&location.protocol==="file:"||(r.status>=200&&r.status<300)||r.status===304||navigator.userAgent.indexOf("Safari")>-1&&typeof r.status==="undefined"){_e(r.responseText)}else{_f()}document.documentElement.style.cursor="";r=null}};r.send("")};var _11=function(_12){_12=_12.replace(_3.REDUNDANT_COMPONENTS,"");_12=_12.replace(_3.REDUNDANT_WHITESPACE,"$1");_12=_12.replace(_3.MORE_WHITESPACE," ");_12=_12.replace(_3.FINAL_SEMICOLONS,"}");return _12};var _13={mediaQueryList:function(s){var o={};var idx=s.indexOf("{");var lt=s.substring(0,idx);s=s.substring(idx+1,s.length-1);var mqs=[],rs=[];var qts=lt.toLowerCase().substring(7).split(",");for(var i=0;i<qts.length;i++){mqs[mqs.length]=_13.mediaQuery(qts[i],o)}var rts=s.match(_3.BLOCKS_INSIDE);if(rts!==null){for(i=0;i<rts.length;i++){rs[rs.length]=_13.rule(rts[i],o)}}o.getMediaQueries=function(){return mqs};o.getRules=function(){return rs};o.getListText=function(){return lt};o.getCssText=function(){return s};return o},mediaQuery:function(s,mql){s=s||"";var not=false,_14;var exp=[];var _15=true;var _16=s.match(_3.NOT_WHITESPACE);for(var i=0;i<_16.length;i++){var _17=_16[i];if(!_14&&(_17==="not"||_17==="only")){if(_17==="not"){not=true}}else{if(!_14){_14=_17}else{if(_17.charAt(0)==="("){var _18=_17.substring(1,_17.length-1).split(":");exp[exp.length]={mediaFeature:_18[0],value:_18[1]||null}}}}}return{getList:function(){retu