(function(){var a=function(b,h){var d,e,c,f;function j(){this.q=[],this.add=function(a){this.q.push(a)};var a,b;this.call=function(){for(a=0,b=this.q.length;a<b;a++)this.q[a].call()}}function i(a,b){return a.currentStyle?a.currentStyle[b]:window.getComputedStyle?window.getComputedStyle(a,null).getPropertyValue(b):a.style[b]}function g(a,o){var d,g,b,f,c,p,k,l,m,n,h,e;if(a.resizedAttached){if(a.resizedAttached){a.resizedAttached.add(o);return}}else a.resizedAttached=new j,a.resizedAttached.add(o);a.resizeSensor=document.createElement('div'),a.resizeSensor.className='resize-sensor',d='position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;',g='position: absolute; left: 0; top: 0; transition: 0s;',a.resizeSensor.style.cssText=d,a.resizeSensor.innerHTML='<div class="resize-sensor-expand" style="'+d+'">'+'<div style="'+g+'"></div>'+'</div>'+'<div class="resize-sensor-shrink" style="'+d+'">'+'<div style="'+g+' width: 200%; height: 200%"></div>'+'</div>',a.appendChild(a.resizeSensor),{fixed:1,absolute:1}[i(a,'position')]||(a.style.position='relative'),b=a.resizeSensor.childNodes[0],f=b.childNodes[0],c=a.resizeSensor.childNodes[1],p=c.childNodes[0],m=function(){f.style.width=b.offsetWidth+10+'px',f.style.height=b.offsetHeight+10+'px',b.scrollLeft=b.scrollWidth,b.scrollTop=b.scrollHeight,c.scrollLeft=c.scrollWidth,c.scrollTop=c.scrollHeight,k=a.offsetWidth,l=a.offsetHeight},m(),n=function(){a.resizedAttached&&a.resizedAttached.call()},h=function(a,b,c){a.attachEvent?a.attachEvent('on'+b,c):a.addEventListener(b,c)},e=function(){(a.offsetWidth!=k||a.offsetHeight!=l)&&n(),m()},h(b,'scroll',e),h(c,'scroll',e)}if(d=Object.prototype.toString.call(b),e='[object Array]'===d||'[object NodeList]'===d||'[object HTMLCollection]'===d||'undefined'!=typeof jQuery&&b instanceof jQuery||'undefined'!=typeof Elements&&b instanceof Elements,e)for(c=0,f=b.length;c<f;c++)g(b[c],h);else g(b,h);this.detach=function(){if(e)for(var c=0,d=b.length;c<d;c++)a.detach(b[c]);else a.detach(b)}};a.detach=function(a){a.resizeSensor&&(a.removeChild(a.resizeSensor),delete a.resizeSensor,delete a.resizedAttached)},typeof module!='undefined'&&typeof module.exports!='undefined'?module.exports=a:window.ResizeSensor=a})()