(function(){"use strict";function s(){this._createElements(),this._bindEvents()}var e=s.prototype;e._bindEvents=function(){this._onResize=this._resize.bind(this)},e._createElements=function(){if(typeof document<"u"&&!this.span){this.span=document.createElement("span");var t=this.span.style;if(t.visibility="hidden",t.position="absolute",t.top="0",t.zIndex="-1",this.span.innerHTML=" ",!window.ResizeObserver){this.iframe=document.createElement("iframe");var i=this.iframe.style;i.position="absolute",i.top="0",i.left="0",i.width="100%",i.height="100%",this.span.appendChild(this.iframe)}document.body.appendChild(this.span)}},e.detect=function(t){this._createElements(),this.originalSize=t||16,this.currentSize=parseFloat(window.getComputedStyle(this.span)["font-size"]),this.currentSize>this.originalSize&&this._onResize(),!this.isDetecting&&(window.ResizeObserver?(this.resizeObserver=new ResizeObserver(this._onResize),this.resizeObserver.observe(this.span)):this.iframe.contentWindow.addEventListener("resize",this._onResize),this.isDetecting=!0)},e._resize=function(){this.currentSize=parseFloat(window.getComputedStyle(this.span)["font-size"]),this.originalSize