| Current Path : /var/www/html/Joomla/media/gantry5/assets/js/ |
| Current File : /var/www/html/Joomla/media/gantry5/assets/js/matchmedia.polyfill.js |
window.matchMedia||(window.matchMedia=function(){"use strict";var e=window.styleMedia||window.media;if(!e){var t=document.createElement("style"),n=document.getElementsByTagName("script")[0],i=null;t.type="text/css",t.id="matchmediajs-test",n.parentNode.insertBefore(t,n),i="getComputedStyle"in window&&window.getComputedStyle(t,null)||t.currentStyle,e={matchMedium:function(e){var n="@media "+e+"{ #matchmediajs-test { width: 1px; } }";return t.styleSheet?t.styleSheet.cssText=n:t.textContent=n,"1px"===i.width}}}return function(t){return{matches:e.matchMedium(t||"all"),media:t||"all"}}}()),function(){if(window.matchMedia&&window.matchMedia("all").addListener)return!1;var e=window.matchMedia,t=e("only all").matches,n=!1,i=0,a=[],d=function(t){clearTimeout(i),i=setTimeout(function(){for(var t=0,n=a.length;t<n;t++){var i=a[t].mql,d=a[t].listeners||[],r=e(i.media).matches;if(r!==i.matches){i.matches=r;for(var c=0,m=d.length;c<m;c++)d[c].call(window,i)}}},30)};window.matchMedia=function(i){var r=e(i),c=[],m=0;return r.addListener=function(e){t&&(n||(n=!0,window.addEventListener("resize",d,!0)),0===m&&(m=a.push({mql:r,listeners:c})),c.push(e))},r.removeListener=function(e){for(var t=0,n=c.length;t<n;t++)c[t]===e&&c.splice(t,1)},r}}();