(function(n){function nt(){return window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver}function o(n,t,i){n.addEventListener(t,i,!1)}function wt(n,t,i){n.removeEventListener(t,i,!1)}function bt(){for(var t=["moz","webkit","o","ms"],n=0;n<t.length&&!e;n+=1)e=window[t[n]+"RequestAnimationFrame"];e?e=e.bind(window):i("setup","RequestAnimationFrame not supported")}function kt(n){var t="Host page: "+n;return window.top!==window.self&&(t=window.parentIFrame&&window.parentIFrame.getId?window.parentIFrame.getId()+": "+n:"Nested host page: "+n),t}function dt(n){return s+"["+kt(n)+"]"}function tt(n){return t[n]?t[n].log:d}function i(n,t){v("log",n,t,tt(n))}function it(n,t){v("info",n,t,tt(n))}function u(n,t){v("warn",n,t,!0)}function v(n,t,i,r){!0===r&&"object"==typeof console&&console[n](dt(t),i)}function gt(n){function w(){function n(){st(h);ft(e);a("onResized",h)}b("Height");b("Width");ht(n,h,"init")}function tt(){var n=c.substr(l).split(":"),u=n[1]?parseInt(n[1],10):0,i=t[n[0]]&&t[n[0]].iframe,r=getComputedStyle(i);return{iframe:i,id:n[0],height:u+rt(r)+lt(r),width:n[2],type:n[3]}}function rt(n){if(n.boxSizing!=="border-box")return 0;var t=n.paddingTop?parseInt(n.paddingTop,10):0,i=n.paddingBottom?parseInt(n.paddingBottom,10):0;return t+i}function lt(n){if(n.boxSizing!=="border-box")return 0;var t=n.borderTopWidth?parseInt(n.borderTopWidth,10):0,i=n.borderBottomWidth?parseInt(n.borderBottomWidth,10):0;return t+i}function b(n){var f=Number(t[e]["max"+n]),o=Number(t[e]["min"+n]),r=n.toLowerCase(),u=Number(h[r]);i(e,"Checking "+r+" is in range "+o+"-"+f);u<o&&(u=o,i(e,"Set "+r+" to min value"));u>f&&(u=f,i(e,"Set "+r+" to max value"));h[r]=""+u}function at(){function f(){function n(){var n=0,t=!1;for(i(e,"Checking connection is from allowed list of origins: "+r);n<r.length;n++)if(r[n]===u){t=!0;break}return t}function f(){var n=t[e]&&t[e].remoteHost;return i(e,"Checking connection is from: "+n),u===n}return r.constructor===Array?n():f()}var u=n.origin,r=t[e]&&t[e].checkOrigin;if(r&&""+u!="null"&&!f())throw new Error("Unexpected message received from: "+u+" for "+h.iframe.id+". Message was: "+n.data+". This error can be disabled by setting the checkOrigin: false option or by providing of array of trusted domains.");return!0}function vt(){return s===(""+c).substr(0,l)&&c.substr(l).split(":")[0]in t}function pt(){var n=h.type in{"true":1,"false":1,undefined:1};return n&&i(e,"Ignoring init message from meta parent page"),n}function v(n){return c.substr(c.indexOf(":")+yt+n)}function bt(n){i(e,"onMessage passed: {iframe: "+h.iframe.id+", message: "+n+"}");a("onMessage",{iframe:h.iframe,message:JSON.parse(n)});i(e,"--")}function kt(){var t=document.body.getBoundingClientRect(),n=h.iframe.getBoundingClientRect();return JSON.stringify({iframeHeight:n.height,iframeWidth:n.width,clientHeight:Math.max(document.documentElement.clientHeight,window.innerHeight||0),clientWidth:Math.max(document.documentElement.clientWidth,window.innerWidth||0),offsetTop:parseInt(n.top-t.top,10),offsetLeft:parseInt(n.left-t.left,10),scrollTop:window.pageYOffset,scrollLeft:window.pageXOffset,documentHeight:document.documentElement.clientHeight,documentWidth:document.documentElement.clientWidth,windowHeight:window.innerHeight,windowWidth:window.innerWidth})}function k(n,t){function i(){f("Send Page Info","pageInfo:"+kt(),n,t)}ni(i,32,t)}function dt(){function r(r,f){function e(){t[n]?k(t[n].iframe,n):u()}["scroll","resize"].forEach(function(t){i(n,r+t+" listener for sendPageInfo");f(window,t,e)})}function u(){r("Remove ",wt)}function f(){r("Add ",o)}var n=e;f();t[n]&&(t[n].stopPageInfo=u)}function gt(){t[e]&&t[e].stopPageInfo&&(t[e].stopPageInfo(),delete t[e].stopPageInfo)}function ti(){var n=!0;return null===h.iframe&&(u(e,"IFrame ("+h.id+") not found"),n=!1),n}function d(n){var t=n.getBoundingClientRect();return ut(e),{x:Math.floor(Number(t.left)+Number(r.x)),y:Math.floor(Number(t.top)+Number(r.y))}}function g(n){function o(){r=f;nt();i(e,"--")}function s(){return{x:Number(h.width)+t.x,y:Number(h.height)+t.y}}function c(){window.parentIFrame?window.parentIFrame["scrollTo"+(n?"Offset":"")](f.x,f.y):u(e,"Unable to scroll to requested position, window.parentIFrame not found")}var t=n?d(h.iframe):{x:0,y:0},f=s();i(e,"Reposition requested from iFrame (offset x:"+t.x+" y:"+t.y+")");window.top!==window.self?c():o()}function nt(){!1!==a("onScroll",r)?ft(e):et()}function ii(n){function o(){var n=d(f);i(e,"Moving to in page link (#"+t+") at x: "+n.x+" y: "+n.y);r={x:n.x,y:n.y};nt();i(e,"--")}function s(){window.parentIFrame?window.parentIFrame.moveToAnchor(t):i(e,"In page link #"+t+" not found and window.parentIFrame not found")}var t=n.split("#")[1]||"",u=decodeURIComponent(t),f=document.getElementById(u)||document.getElementsByName(u)[0];f?o():window.top!==window.self?s():i(e,"In page link #"+t+" not found")}function a(n,t){return y(e,n,t)}function ri(){t[e]&&t[e].firstRun&&ei();switch(h.type){case"close":p(h.iframe);break;case"message":bt(v(6));break;case"autoResize":t[e].autoResize=JSON.parse(v(9));break;case"scrollTo":g(!1);break;case"scrollToOffset":g(!0);break;case"pageInfo":k(t[e]&&t[e].iframe,e);dt();break;case"pageInfoStop":gt();break;case"inPageLink":ii(v(9));break;case"reset":ot(h);break;case"init":w();a("onInit",h.iframe);break;default:w()}}function ui(n){var i=!0;return t[n]||(i=!1,u(h.type+" No settings for "+n+". Message was: "+c)),i}function fi(){for(var n in t)f("iFrame requested init",ct(n),t[n].iframe,n)}function ei(){t[e]&&(t[e].firstRun=!1)}var c=n.data,h={},e=null;"[iFrameResizerChild]Ready"===c?fi():vt()?(h=tt(),e=h.id,t[e]&&(t[e].loaded=!0),!pt()&&ui(e)&&(i(e,"Received: "+c),ti()&&at()&&ri())):it(e,"Ignored: "+c)}function y(n,i,r){var u=null,f=null;if(t[n])if(u=t[n][i],"function"==typeof u)f=u(r);else throw new TypeError(i+" on iFrame["+n+"] is not a function");return f}function rt(n){var i=n.id;delete t[i]}function p(n){var t=n.id;if(y(t,"onClose",t)===!1){i(t,"Close iframe cancelled by onClose event");return}i(t,"Removing iFrame: "+t);try{n.parentNode&&n.parentNode.removeChild(n)}catch(r){u(r)}y(t,"onClosed",t);i(t,"--");rt(n)}function ut(t){null===r&&(r={x:window.pageXOffset!==n?window.pageXOffset:document.documentElement.scrollLeft,y:window.pageYOffset!==n?window.pageYOffset:document.documentElement.scrollTop},i(t,"Get page position: "+r.x+","+r.y))}function ft(n){null!==r&&(window.scrollTo(r.x,r.y),i(n,"Set page position: "+r.x+","+r.y),et())}function et(){r=null}function ot(n){function t(){st(n);f("reset","reset",n.iframe,n.id)}i(n.id,"Size reset requested by "+("init"===n.type?"host page":"iFrame"));ut(n.id);ht(t,n,"reset")}function st(n){function f(t){if(!n.id){i("undefined","messageData id not set");return}n.iframe.style[t]=n[t]+"px";i(n.id,"IFrame ("+r+") "+t+" set to "+n[t]+"px")}function e(t){g||"0"!==n[t]||(g=!0,i(r,"Hidden iFrame detected, creating visibility listener"),ti())}function u(n){f(n);e(n)}var r=n.iframe.id;t[r]&&(t[r].sizeHeight&&u("height"),t[r].sizeWidth&&u("width"))}function ht(n,t,r){r!==t.type&&e&&!window.jasmine?(i(t.id,"Requesting animation frame"),e(n)):n()}function f(n,r,f,e,o){function c(){var u=t[e]&&t[e].targetOrigin;i(e,"["+n+"] Sending msg to iframe["+e+"] ("+r+") targetOrigin: "+u);f.contentWindow.postMessage(s+r,u)}function l(){u(e,"["+n+"] IFrame("+e+") not found")}function a(){f&&"contentWindow"in f&&null!==f.contentWindow?c():l()}function v(){function n(){!t[e]||t[e].loaded||h||(h=!0,u(e,"IFrame has not responded within "+t[e].warningTimeout/1e3+" seconds. Check iFrameResizer.contentWindow.js has been loaded in iFrame. This message can be ignored if everything is working, or you can set the warningTimeout option to a higher value or zero to suppress this warning."))}!o||!t[e]||!t[e].warningTimeout||(t[e].msgTimeout=setTimeout(n,t[e].warningTimeout))}var h=!1;e=e||f.id;t[e]&&(a(),v())}function ct(n){return n+":"+t[n].bodyMarginV1+":"+t[n].sizeWidth+":"+t[n].log+":"+t[n].interval+":"+t[n].enablePublicMethods+":"+t[n].autoResize+":"+t[n].bodyMargin+":"+t[n].heightCalculationMethod+":"+t[n].bodyBackground+":"+t[n].bodyPadding+":"+t[n].tolerance+":"+t[n].inPageLinks+":"+t[n].resizeFrom+":"+t[n].widthCalculationMethod}function lt(r,e){function c(){function n(n){Infinity!==t[s][n]&&0!==t[s][n]&&(r.style[n]=t[s][n]+"px",i(s,"Set "+n+" = "+t[s][n]+"px"))}function u(n){if(t[s]["min"+n]>t[s]["max"+n])throw new Error("Value for min"+n+" can not be greater than max"+n);}u("Height");u("Width");n("maxHeight");n("minHeight");n("maxWidth");n("minWidth")}function l(){var n=e&&e.id||h.id+k++;return null!==document.getElementById(n)&&(n+=k++),n}function a(n){return""===n&&(r.id=n=l(),d=(e||{}).log,i(n,"Added missing iframe ID: "+n+" ("+r.src+")")),n}function v(){i(s,"IFrame scrolling "+(t[s]&&t[s].scrolling?"enabled":"disabled")+" for "+s);r.style.overflow=!1===(t[s]&&t[s].scrolling)?"hidden":"auto";switch(t[s]&&t[s].scrolling){case"omit":break;case!0:r.scrolling="yes";break;case!1:r.scrolling="no";break;default:r.scrolling=t[s]?t[s].scrolling:"no"}}function y(){("number"==typeof(t[s]&&t[s].bodyMargin)||"0"===(t[s]&&t[s].bodyMargin))&&(t[s].bodyMarginV1=t[s].bodyMargin,t[s].bodyMargin=""+t[s].bodyMargin+"px")}function w(){var n=t[s]&&t[s].firstRun,i=t[s]&&t[s].heightCalculationMethod in pt;!n&&i&&ot({iframe:r,height:0,width:0,type:"init"})}function b(){t[s]&&(t[s].iframe.iFrameResizer={close:p.bind(null,t[s].iframe),removeListeners:rt.bind(null,t[s].iframe),resize:f.bind(null,"Window resize","resize",t[s].iframe),moveToAnchor:function(n){f("Move to anchor","moveToAnchor:"+n,t[s].iframe,s)},sendMessage:function(n){n=JSON.stringify(n);f("Send Message","message:"+n,t[s].iframe,s)}})}function g(t){function u(){f("iFrame.onload",t,r,n,!0);w()}function e(n){if(r.parentNode){var t=new n(function(n){n.forEach(function(n){var t=Array.prototype.slice.call(n.removedNodes);t.forEach(function(n){n===r&&p(r)})})});t.observe(r.parentNode,{childList:!0})}}var i=nt();i&&e(i);o(r,"load",u);f("init",t,r,n,!0)}function tt(n){if("object"!=typeof n)throw new TypeError("Options is not an object");}function it(n){for(var i in h)Object.prototype.hasOwnProperty.call(h,i)&&(t[s][i]=Object.prototype.hasOwnProperty.call(n,i)?n[i]:h[i])}function ut(n){return""===n||null!==n.match(/^(about:blank|javascript:|file:\/\/)/)?"*":n}function ft(n){var t=n.split("Callback"),i;t.length===2&&(i="on"+t[0].charAt(0).toUpperCase()+t[0].slice(1),this[i]=this[n],delete this[n],u(s,"Deprecated: '"+n+"' has been renamed '"+i+"'. The old method will be removed in the next major version."))}function et(n){n=n||{};t[s]={firstRun:!0,iframe:r,remoteHost:r.src&&r.src.split("/").slice(0,3).join("/")};tt(n);Object.keys(n).forEach(ft,n);it(n);t[s]&&(t[s].targetOrigin=!0===t[s].checkOrigin?ut(t[s].remoteHost):"*")}function st(){return s in t&&"iFrameResizer"in r}var s=a(r.id);st()?u(s,"Ignored iFrame, already setup."):(et(e),v(),c(),y(),g(ct(s)),b())}function w(n,t){null===a&&(a=setTimeout(function(){a=null;n()},t))}function ni(n,t,i){c[i]||(c[i]=setTimeout(function(){c[i]=null;n()},t))}function ti(){function r(){function n(n){function i(i){return"0px"===(t[n]&&t[n].iframe.style[i])}function r(n){return null!==n.offsetParent}t[n]&&r(t[n].iframe)&&(i("height")||i("width"))&&f("Visibility change","resize",t[n].iframe,n)}Object.keys(t).forEach(function(t){n(t)})}function u(n){i("window","Mutation observed: "+n[0].target+" "+n[0].type);w(r,16)}function e(){var t=document.querySelector("body"),i=new n(u);i.observe(t,{attributes:!0,attributeOldValue:!1,characterData:!0,characterDataOldValue:!1,childList:!0,subtree:!0})}var n=nt();n&&e()}function ii(n){function t(){vt("Window "+n,"resize")}i("window","Trigger event: "+n);w(t,16)}function at(){function n(){vt("Tab Visable","resize")}"hidden"!==document.visibilityState&&(i("document","Trigger event: Visiblity change"),w(n,16))}function vt(n,i){function r(n){return t[n]&&"parent"===t[n].resizeFrom&&t[n].autoResize&&!t[n].firstRun}Object.keys(t).forEach(function(u){r(u)&&f(n,i,t[u].iframe,u)})}function ri(){o(window,"message",gt);o(window,"resize",function(){ii("resize")});o(document,"visibilitychange",at);o(document,"-webkit-visibilitychange",at)}function b(){function i(n,i){function r(){if(i.tagName){if("IFRAME"!==i.tagName.toUpperCase())throw new TypeError("Expected <IFRAME> tag, found <"+i.tagName+">");}else throw new TypeError("Object is not a valid DOM element");}i&&(r(),lt(i,n),t.push(i))}function r(n){n&&n.enablePublicMethods&&u("enablePublicMethods option has been removed, public methods are now always available in the iFrame")}var t;return bt(),ri(),function(u,f){t=[];r(u);switch(typeof f){case"undefined":case"string":Array.prototype.forEach.call(document.querySelectorAll(f||"iframe"),i.bind(n,u));break;case"object":i(u,f);break;default:throw new TypeError("Unexpected data type ("+typeof f+")");}return t}}function ui(n){n.fn?n.fn.iFrameResize||(n.fn.iFrameResize=function(n){function t(t,i){lt(i,n)}return this.filter("iframe").each(t).end()}):it("","Unable to bind to jQuery, it is not fully loaded.")}var c;if(typeof window!="undefined"){var k=0,d=!1,g=!1,yt=7,s="[iFrameSizer]",l=s.length,r=null,e=window.requestAnimationFrame,pt={max:1,scroll:1,bodyScroll:1,documentElementScroll:1},t={},a=null,h={autoResize:!0,bodyBackground:null,bodyMargin:null,bodyMarginV1:8,bodyPadding:null,checkOrigin:!0,inPageLinks:!1,enablePublicMethods:!0,heightCalculationMethod:"bodyOffset",id:"iFrameResizer",interval:32,log:!1,maxHeight:Infinity,maxWidth:Infinity,minHeight:0,minWidth:0,resizeFrom:"parent",scrolling:!1,sizeHeight:!0,sizeWidth:!1,warningTimeout:5e3,tolerance:0,widthCalculationMethod:"scroll",onClose:function(){return!0},onClosed:function(){},onInit:function(){},onMessage:function(){u("onMessage function not defined")},onResized:function(){},onScroll:function(){return!0}};c={};window.jQuery&&ui(window.jQuery);typeof define=="function"&&define.amd?define([],b):typeof module=="object"&&typeof module.exports=="object"&&(module.exports=b());window.iFrameResize=window.iFrameResize||b()}})();$(function(){$(".js-iframe-resize").on("load",function(){$(this).iFrameResize({log:!1,onMessage:function(n){n.message.title&&(document.title=n.message.title)}});$(this).parent().find(".spinner").hide();$(this).show()})})