/*! For license information please see iframeSizer.min.js.LICENSE.txt */
"undefined"==typeof iFrameResize&&(!function(){"use strict";function e(e,n,t){"addEventListener"in window?e.addEventListener(n,t,!1):"attachEvent"in window&&e.attachEvent("on"+n,t)}function n(e){return w+"["+function(){var e="Host page";return window.top!==window.self&&(e=window.parentIFrame?window.parentIFrame.getId():"Nested host page"),e}()+"]"+e}function t(e){g&&"object"==typeof window.console&&console.log(n(e))}function i(e){"object"==typeof window.console&&console.warn(n(e))}function o(){null===b&&t(" Get page position: "+(b={x:void 0!==window.pageXOffset?window.pageXOffset:document.documentElement.scrollLeft,y:void 0!==window.pageYOffset?window.pageYOffset:document.documentElement.scrollTop}).x+","+b.y)}function r(){null!==b&&(window.scrollTo(b.x,b.y),t(" Set page position: "+b.x+","+b.y),b=null)}function a(e){t(" Size reset requested by "+("init"===e.type?"host page":"iFrame")),o(),c((function(){l(e),s("reset","reset",e.iframe)}),e,"init")}function l(e){function n(n){e.iframe.style[n]=e[n]+"px",t(" IFrame ("+i+") "+n+" set to "+e[n]+"px")}var i=e.iframe.id;k[i].sizeHeight&&n("height"),k[i].sizeWidth&&n("width")}function c(e,n,i){i!==n.type&&v?(t(" Requesting animation frame"),v(e)):e()}function s(e,n,i){t("["+e+"] Sending msg to iframe ("+n+")"),i.contentWindow.postMessage(w+n,"*")}function d(n){var i=this,o=function(e){return""===e&&(i.id=e="iFrameResizer"+u++,g=(n||{}).log,t(" Added missing iframe ID: "+e+" ("+i.src+")")),e}(i.id);(function(e){for(var n in e=e||{},k[o]={},function(e){if("object"!=typeof e)throw new TypeError("Options is not an object.")}(e),I)I.hasOwnProperty(n)&&(k[o][n]=e.hasOwnProperty(n)?e[n]:I[n]);g=k[o].log})(n),t(" IFrame scrolling "+(k[o].scrolling?"enabled":"disabled")+" for "+o),i.style.overflow=!1===k[o].scrolling?"hidden":"auto",i.scrolling=!1===k[o].scrolling?"no":"yes",function(){function e(e){1/0!==k[o][e]&&0!==k[o][e]&&(i.style[e]=k[o][e]+"px",t(" Set "+e+" = "+k[o][e]+"px"))}e("maxHeight"),e("minHeight"),e("maxWidth"),e("minWidth")}(),("number"==typeof k[o].bodyMargin||"0"===k[o].bodyMargin)&&(k[o].bodyMarginV1=k[o].bodyMargin,k[o].bodyMargin=k[o].bodyMargin+"px"),function(n){e(i,"load",(function(){var e=m;s("iFrame.onload",n,i),!e&&k[o].heightCalculationMethod in x&&a({iframe:i,height:0,width:0,type:"init"})})),s("init",n,i)}(o+":"+k[o].bodyMarginV1+":"+k[o].sizeWidth+":"+k[o].log+":"+k[o].interval+":"+k[o].enablePublicMethods+":"+k[o].autoResize+":"+k[o].bodyMargin+":"+k[o].heightCalculationMethod+":"+k[o].bodyBackground+":"+k[o].bodyPadding+":"+k[o].tolerance+":"+k[o].enableInPageLinks)}function f(){function e(e,n){if(!e.tagName)throw new TypeError("Object is not a valid DOM element");if("IFRAME"!==e.tagName.toUpperCase())throw new TypeError("Expected <IFRAME> tag, found <"+e.tagName+">.");d.call(e,n)}return function(n,t){switch(typeof t){case"undefined":case"string":Array.prototype.forEach.call(document.querySelectorAll(t||"iframe"),(function(t){e(t,n)}));break;case"object":e(t,n);break;default:throw new TypeError("Unexpected data type ("+typeof t+").")}}}var u=0,m=!0,g=!1,p=7,w="[iFrameSizer]",h=w.length,y="",b=null,v=window.requestAnimationFrame,x={max:1,scroll:1,bodyScroll:1,documentElementScroll:1},k={},I={autoResize:!0,bodyBackground:null,bodyMargin:null,bodyMarginV1:8,bodyPadding:null,checkOrigin:!0,enableInPageLinks:!1,enablePublicMethods:!1,heightCalculationMethod:"offset",interval:32,log:!1,maxHeight:1/0,maxWidth:1/0,minHeight:0,minWidth:0,scrolling:!1,sizeHeight:!0,sizeWidth:!1,tolerance:0,closedCallback:function(){},initCallback:function(){},messageCallback:function(){},resizedCallback:function(){},scrollCallback:function(){return!0}};(function(){var e,n=["moz","webkit","o","ms"];for(e=0;e<n.length&&!v;e+=1)v=window[n[e]+"RequestAnimationFrame"];v||t(" RequestAnimationFrame not supported")})(),e(window,"message",(function(e){function n(){s("Height"),s("Width"),c((function(){l(I),r(),k[F].resizedCallback(I)}),I,"resetPage")}function s(e){var n=Number(k[F]["max"+e]),i=Number(k[F]["min"+e]),o=e.toLowerCase(),r=Number(I[o]);if(i>n)throw new Error("Value for min"+e+" can not be greater than max"+e);t(" Checking "+o+" is in range "+i+"-"+n),i>r&&(r=i,t(" Set "+o+" to min value")),r>n&&(r=n,t(" Set "+o+" to max value")),I[o]=""+r}function d(e){return x.substr(x.indexOf(":")+p+e)}function f(e){var n=e.getBoundingClientRect();return o(),{x:parseInt(n.left,10)+parseInt(b.x,10),y:parseInt(n.top,10)+parseInt(b.y,10)}}function u(e){var n=e?f(I.iframe):{x:0,y:0},o={x:Number(I.width)+n.x,y:Number(I.height)+n.y};t(" Reposition requested from iFrame (offset x:"+n.x+" y:"+n.y+")"),window.top!==window.self?window.parentIFrame?e?parentIFrame.scrollToOffset(o.x,o.y):parentIFrame.scrollTo(I.width,I.height):i(" Unable to scroll to requested position, window.parentIFrame not found"):(b=o,v(),t(" --"))}function v(){!1!==k[F].scrollCallback(b)&&r()}var x=e.data,I={},F=null;w===(""+x).substr(0,h)&&(I=function(){var e=x.substr(h).split(":");return{iframe:document.getElementById(e[0]),id:e[0],height:e[1],width:e[2],type:e[3]}}(),F=I.id,g=k[F].log,t(" Received: "+x),!function(){var e=I.type in{true:1,false:1};return e&&t(" Ignoring init message from meta parent page"),e}()&&function(){if(null===I.iframe)throw new Error("iFrame ("+I.id+") does not exist on "+y);return!0}()&&function(){var n=e.origin,i=I.iframe.src.split("/").slice(0,3).join("/");if(k[F].checkOrigin&&(t(" Checking connection is from: "+i),""+n!="null"&&n!==i))throw new Error("Unexpected message received from: "+n+" for "+I.iframe.id+". Message was: "+e.data+". This error can be disabled by adding the checkOrigin: false option.");return!0}()&&(function(){switch(I.type){case"close":(function(e){var n=e.id;t(" Removing iFrame: "+n),e.parentNode.removeChild(e),k[n].closedCallback(n),t(" --")})(I.iframe),k[F].resizedCallback(I);break;case"message":!function(e){t(" MessageCallback passed: {iframe: "+I.iframe.id+", message: "+e+"}"),k[F].messageCallback({iframe:I.iframe,message:JSON.parse(e)}),t(" --")}(d(6));break;case"scrollTo":u(!1);break;case"scrollToOffset":u(!0);break;case"inPageLink":!function(e){var n=e.split("#")[1]||"",i=decodeURIComponent(n),o=document.getElementById(i)||document.getElementsByName(i)[0];window.top!==window.self?window.parentIFrame?parentIFrame.moveToAnchor(n):t(" In page link #"+n+" not found and window.parentIFrame not found"):o?function(e){var i=f(e);t(" Moving to in page link (#"+n+") at x: "+i.x+" y: "+i.y),b={x:i.x,y:i.y},v(),t(" --")}(o):t(" In page link #"+n+" not found")}(d(9));break;case"reset":a(I);break;case"init":n(),k[F].initCallback(I.iframe);break;default:n()}}(),m=!1))})),window.jQuery&&function(e){e.fn.iFrameResize=function(e){return this.filter("iframe").each((function(n,t){d.call(t,e)})).end()}}(jQuery),"function"==typeof define&&define.amd?define([],f):"object"==typeof module&&"object"==typeof module.exports?module.exports=f():window.iFrameResize=f()}(),Array.prototype.forEach||(Array.prototype.forEach=function(e){"use strict";if(null==this||"function"!=typeof e)throw new TypeError;for(var n=Object(this),t=n.length>>>0,i=arguments.length>=2?arguments[1]:void 0,o=0;o<t;o++)o in n&&e.call(i,n[o],o,n)}),setInterval((function(){iFrameResize({heightCalculationMethod:"lowestElement"})}),1e3));