1"use strict"; 2/*! iFrame Resizer (iframeSizer.min.js ) - v4.3.2 - 2021-10-18 3 * Copyright: (c) 2021 David J. Bradshaw - [email protected] 4 * License: MIT 5 */!function(i){var r,a,u,l,f,m,g,x,M,I,k,z,F;function h(){return window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver}function O(i,r,a){i.addEventListener(r,a,!1)}function R(i,r,a){i.removeEventListener(r,a,!1)}function t(i){return I[i]?I[i].log:a}function T(i,r){s("log",i,r,t(i))}function E(i,r){s("info",i,r,t(i))}function N(i,r){s("warn",i,r,!0)}function s(i,r,a,u){!0===u&&"object"==typeof window.console&&console[i](function o(i){return f+"["+(i="Host page: "+(r=i),(i=window.top!==window.self?window.parentIFrame&&window.parentIFrame.getId?window.parentIFrame.getId()+": "+r:"Nested host page: "+r:i)+"]");var r}(r),a)}function e(i){function i2(){t2("Height"),t2("Width"),L((function(){A(k),H(z),l2("onResized",k)}),k,"init")}function t2(i){var r=Number(I[z]["max"+i]),a=Number(I[z]["min"+i]),u=i.toLowerCase();i=Number(k[u]);T(z,"Checking "+u+" is in range "+a+"-"+r),i<a&&(i=a,T(z,"Set "+u+" to min value")),r<i&&(i=r,T(z,"Set "+u+" to max value")),k[u]=""+i}function a2(i){return M.substr(M.indexOf(":")+l+i)}function s2(i,r){var a,u;a=function(){var a,u;B("Send Page Info","pageInfo:"+(a=document.body.getBoundingClientRect(),u=k.iframe.getBoundingClientRect(),JSON.stringify({iframeHeight:u.height,iframeWidth:u.width,clientHeight:Math.max(document.documentElement.clientHeight,window.innerHeight||0),clientWidth:Math.max(document.documentElement.clientWidth,window.innerWidth||0),offsetTop:parseInt(u.top-a.top,10),offsetLeft:parseInt(u.left-a.left,10),scrollTop:window.pageYOffset,scrollLeft:window.pageXOffset,documentHeight:document.documentElement.clientHeight,documentWidth:document.documentElement.clientWidth,windowHeight:window.innerHeight,windowWidth:window.innerWidth})),i,r)},F[u=r]||(F[u]=setTimeout((function(){F[u]=null,a()}),32))}function r2(i){return i=i.getBoundingClientRect(),S(z),{x:Math.floor(Number(i.left)+Number(g.x)),y:Math.floor(Number(i.top)+Number(g.y))}}function d2(i){var r=i?r2(k.iframe):{x:0,y:0},a={x:Number(k.width)+r.x,y:Number(k.height)+r.y};T(z,"Reposition requested from iFrame (offset x:"+r.x+" y:"+r.y+")"),window.top!==window.self?window.parentIFrame?window.parentIFrame["scrollTo"+(i?"Offset":"")](a.x,a.y):N(z,"Unable to scroll to requested position, window.parentIFrame not found"):(g=a,c2(),T(z,"--"))}function c2(){!1!==l2("onScroll",g)?H(z):j()}function f2(i){var r,a;a=0===Number(k.width)&&0===Number(k.height)?{x:(r=a2(9).split(":"))[1],y:r[0]}:{x:k.width,y:k.height},l2(i,{iframe:k.iframe,screenX:Number(a.x),screenY:Number(a.y),type:k.type})}function l2(i,r){return W(z,i,r)}var r,a,u,x,M=i.data,k={},z=null;"[iFrameResizerChild]Ready"===M?function(){for(var i in I)B("iFrame requested init",q(i),I[i].iframe,i)}():f===(""+M).substr(0,m)&&M.substr(m).split(":")[0]in I?(k=function e2(){var i,r=M.substr(m).split(":"),a=r[1]?parseInt(r[1],10):0,u=I[r[0]]&&I[r[0]].iframe,l=getComputedStyle(u);return{iframe:u,id:r[0],height:a+(i=l,"border-box"!==i.boxSizing?0:(i.paddingTop?parseInt(i.paddingTop,10):0)+(i=i.paddingBottom?parseInt(i.paddingBottom,10):0))+function(i){return"border-box"!==i.boxSizing?0:(i.borderTopWidth?parseInt(i.borderTopWidth,10):0)+(i=i.borderBottomWidth?parseInt(i.borderBottomWidth,10):0)}(l),width:r[2],type:r[3]}}(),z=k.id,I[z]&&(I[z].loaded=!0),(x=k.type in{true:1,false:1,undefined:1})&&T(z,"Ignoring init message from meta parent page"),!x&&(u=!0,I[a=z]||(u=!1,N(k.type+" No settings for "+a+". Message was: "+M)),u)&&(T(z,"Received: "+M),r=!0,null===k.iframe&&(N(z,"IFrame ("+k.id+") not found"),r=!1),r&&function o2(){var r=i.origin,a=I[z]&&I[z].checkOrigin;if(a&&""+r!="null"&&!function e3(){return a.constructor===Array?function(){var i=0,u=!1;for(T(z,"Checking connection is from allowed list of origins: "+a);i<a.length;i++)if(a[i]===r){u=!0;break}return u}():(i=I[z]&&I[z].remoteHost,T(z,"Checking connection is from: "+i),r===i);var i}())throw new Error("Unexpected message received from: "+r+" for "+k.iframe.id+". Message was: "+i.data+". This error can be disabled by setting the checkOrigin: false option or by providing of array of trusted domains.");return 1}()&&function m2(){switch(I[z]&&I[z].firstRun&&I[z]&&(I[z].firstRun=!1),k.type){case"close"
5:C(k.iframe);break;case"message":r=a2(6),T(z,"onMessage passed: {iframe: "+k.iframe.id+", message: "+r+"}"),l2("onMessage",{iframe:k.iframe,message:JSON.parse(r)}),T(z,"--");break;case"mouseenter":f2("onMouseEnter");break;case"mouseleave":f2("onMouseLeave");break;case"autoResize":I[z].autoResize=JSON.parse(a2(9));break;case"scrollTo":d2(!1);break;case"scrollToOffset":d2(!0);break;case"pageInfo":s2(I[z]&&I[z].iframe,z),i=z,e3("Add ",O),I[i]&&(I[i].stopPageInfo=o3);break;case"pageInfoStop":I[z]&&I[z].stopPageInfo&&(I[z].stopPageInfo(),delete I[z].stopPageInfo);break;case"inPageLink":!function u2(i){var r,a=i.split("#")[1]||"",u=(i=decodeURIComponent(a),document.getElementById(i)||document.getElementsByName(i)[0]);u?(r=r2(u),T(z,"Moving to in page link (#"+a+") at x: "+r.x+" y: "+r.y),g={x:r.x,y:r.y},c2(),T(z,"--")):window.top!==window.self?window.parentIFrame?window.parentIFrame.moveToAnchor(a):T(z,"In page link #"+a+" not found and window.parentIFrame not found"):T(z,"In page link #"+a+" not found")}(a2(9));break;case"reset":P(k);break;case"init":i2(),l2("onInit",k.iframe);break;default:0===Number(k.width)&&0===Number(k.height)?N("Unsupported message received ("+k.type+"), this is likely due to the iframe containing a later version of iframe-resizer than the parent page"):i2()}function e3(r,a){function t3(){I[i]?s2(I[i].iframe,i):o3()}["scroll","resize"].forEach((function(u){T(i,r+u+" listener for sendPageInfo"),a(window,u,t3)}))}function o3(){e3("Remove ",R)}var i,r}())):E(z,"Ignored: "+M)}function W(i,r,a){var u=null,l=null;if(I[i]){if("function"!=typeof(u=I[i][r]))throw new TypeError(r+" on iFrame["+i+"] is not a function");l=u(a)}return l}function p(i){i=i.id,delete I[i]}function C(i){var r=i.id;if(!1!==W(r,"onClose",r)){T(r,"Removing iFrame: "+r);try{i.parentNode&&i.parentNode.removeChild(i)}catch(a){N(a)}W(r,"onClosed",r),T(r,"--"),p(i)}else T(r,"Close iframe cancelled by onClose event")}function S(r){null===g&&T(r,"Get page position: "+(g={x:window.pageXOffset!==i?window.pageXOffset:document.documentElement.scrollLeft,y:window.pageYOffset!==i?window.pageYOffset:document.documentElement.scrollTop}).x+","+g.y)}function H(i){null!==g&&(window.scrollTo(g.x,g.y),T(i,"Set page position: "+g.x+","+g.y),j())}function j(){g=null}function P(i){T(i.id,"Size reset requested by "+("init"===i.type?"host page":"iFrame")),S(i.id),L((function(){A(i),B("reset","reset",i.iframe,i.id)}),i,"reset")}function A(i){function e2(a){var l;l=a,i.id?(i.iframe.style[l]=i[l]+"px",T(i.id,"IFrame ("+r+") "+l+" set to "+i[l]+"px")):T("undefined","messageData id not set"),function i2(a){function n2(){Object.keys(I).forEach((function(i){function n3(i){return"0px"===(I[r]&&I[r].iframe.style[i])}var r;I[r=i]&&null!==I[r].iframe.offsetParent&&(n3("height")||n3("width"))&&B("Visibility change","resize",I[r].iframe,r)}))}function i3(i){T("window","Mutation observed: "+i[0].target+" "+i[0].type),c(n2,16)}var l,f;u||"0"!==i[a]||(u=!0,T(r,"Hidden iFrame detected, creating visibility listener"),(l=h())&&(f=document.querySelector("body"),new l(i3).observe(f,{attributes:!0,attributeOldValue:!1,characterData:!0,characterDataOldValue:!1,childList:!0,subtree:!0})))}(a)}var r=i.iframe.id;I[r]&&(I[r].sizeHeight&&e2("height"),I[r].sizeWidth&&e2("width"))}function L(i,r,a){a!==r.type&&x&&!window.jasmine?(T(r.id,"Requesting animation frame"),x(i)):i()}function B(i,r,a,u,l){var m=!1;u=u||a.id,I[u]&&(function r2(){var l;a&&"contentWindow"in a&&null!==a.contentWindow?(l=I[u]&&I[u].targetOrigin,T(u,"["+i+"] Sending msg to iframe["+u+"] ("+r+") targetOrigin: "+l),a.contentWindow.postMessage(f+r,l)):N(u,"["+i+"] IFrame("+u+") not found")}(),function a2(){l&&I[u]&&I[u].warningTimeout&&(I[u].msgTimeout=setTimeout((function(){!I[u]||I[u].loaded||m||(m=!0,N(u,"IFrame has not responded within "+I[u].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."))}),I[u].warningTimeout))}())}function q(i){return i+":"+I[i].bodyMarginV1+":"+I[i].sizeWidth+":"+I[i].log+":"+I[i].interval+":"+I[i].enablePublicMethods+":"+I[i].autoResize+":"+I[i].bodyMargin+":"+I[i].heightCalculationMethod+":"+I[i].bodyBackgroun
5d+":"+I[i].bodyPadding+":"+I[i].tolerance+":"+I[i].inPageLinks+":"+I[i].resizeFrom+":"+I[i].widthCalculationMethod+":"+I[i].mouseEvents}function d(u,l){function i2(i){var r=i.split("Callback");2===r.length&&(this[r="on"+r[0].charAt(0).toUpperCase()+r[0].slice(1)]=this[i],delete this[i],N(g,"Deprecated: '"+i+"' has been renamed '"+r+"'. The old method will be removed in the next major version."))}var f,m,g=(""===(f=u.id)&&(u.id=(m=l&&l.id||z.id+r++,null!==document.getElementById(m)&&(m+=r++),f=m),a=(l||{}).log,T(f,"Added missing iframe ID: "+f+" ("+u.src+")")),f);function d2(i){var r=I[g][i];1/0!==r&&0!==r&&(u.style[i]="number"==typeof r?r+"px":r,T(g,"Set "+i+" = "+u.style[i]))}function c2(i){if(I[g]["min"+i]>I[g]["max"+i])throw new Error("Value for min"+i+" can not be greater than max"+i)}g in I&&"iFrameResizer"in u?N(g,"Ignored iFrame, already setup."):(function o2(i){i=i||{},I[g]={firstRun:!0,iframe:u,remoteHost:u.src&&u.src.split("/").slice(0,3).join("/")},function(i){if("object"!=typeof i)throw new TypeError("Options is not an object")}
5(i),Object.keys(i).forEach(i2,i),function(i){for(var r in z)Object.prototype.hasOwnProperty.call(z,r)&&(I[g][r]=(Object.prototype.hasOwnProperty.call(i,r)?i:z)[r])}(i),I[g]&&(I[g].targetOrigin=!0===I[g].checkOrigin?""===(i=I[g].remoteHost)||null!==i.match(/^(about:blank|javascript:|file:\/\/)/)?"*":i:"*")}(l),function(){switch(T(g,"IFrame scrolling "+(I[g]&&I[g].scrolling?"enabled":"disabled")+" for "+g),u.style.overflow=!1===(I[g]&&I[g].scrolling)?"hidden":"auto",I[g]&&I[g].scrolling){case"omit":break;case!0:u.scrolling="yes";break;case!1:u.scrolling="no";break;default:u.scrolling=I[g]?I[g].scrolling:"no"}}(),c2("Height"),c2("Width"),d2("maxHeight"),d2("minHeight"),d2("maxWidth"),d2("minWidth"),"number"!=typeof(I[g]&&I[g].bodyMargin)&&"0"!==(I[g]&&I[g].bodyMargin)||(I[g].bodyMarginV1=I[g].bodyMargin,I[g].bodyMargin=I[g].bodyMargin+"px"),function n2(r){var a,l=h();l&&(a=l,u.parentNode&&new a((function(i){i.forEach((function(i){Array.prototype.slice.call(i.removedNodes).forEach((function(i){i===u&&C(u)}))}))})).observe(u.parentNode,{childList:!0})),O(u,"load",(function(){var a,l;B("iFrame.onload",r,u,i,!0),a=I[g]&&I[g].firstRun,l=I[g]&&I[g].heightCalculationMethod in M,!a&&l&&P({iframe:u,height:0,width:0,type:"init"})})),B("init",r,u,i,!0)}(q(g)),I[g]&&(I[g].iframe.iFrameResizer={close:C.bind(null,I[g].iframe),removeListeners:p.bind(null,I[g].iframe),resize:B.bind(null,"Window resize","resize",I[g].iframe),moveToAnchor:function(i){B("Move to anchor","moveToAnchor:"+i,I[g].iframe,g)},sendMessage:function(i){B("Send Message","message:"+(i=JSON.stringify(i)),I[g].iframe,g)}}))}function c(i,r){null===k&&(k=setTimeout((function(){k=null,i()}),r))}function n(){"hidden"!==document.visibilityState&&(T("document","Trigger event: Visibility change"),c((function(){w("Tab Visible","resize")}),16))}function w(i,r){Object.keys(I).forEach((function(a){var u;I[u=a]&&"parent"===I[u].resizeFrom&&I[u].autoResize&&!I[u].firstRun&&B(i,r,I[a].iframe,a)}))}function y(){function t2(i,a){a&&(function(){if(!a.tagName)throw new TypeError("Object is not a valid DOM element");if("IFRAME"!==a.tagName.toUpperCase())throw new TypeError("Expected <IFRAME> tag, found <"+a.tagName+">")}(),d(a,i),r.push(a))}var r;return function(){for(var i=["moz","webkit","o","ms"],r=0;r<i.length&&!x;r+=1)x=window[i[r]+"RequestAnimationFrame"];x?x=x.bind(window):T("setup","RequestAnimationFrame not supported")}(),function b(){O(window,"message",e),O(window,"resize",(function(){T("window","Trigger event: resize"),c((function(){w("Window resize","resize")}),16)})),O(document,"visibilitychange",n),O(document,"-webkit-visibilitychange",n)}(),function(a,u){var l;switch(r=[],(l=a)&&l.enablePublicMethods&&N("enablePublicMethods option has been removed, public methods are now always available in the iFrame"),typeof u){case"undefined":case"string":Array.prototype.forEach.call(document.querySelectorAll(u||"iframe"),t2.bind(i,a));break;case"object":t2(a,u);break;default:throw new TypeError("Unexpected data type ("+typeof u+")")}return r}}"undefined"!=typeof window&&(l=7,m=(f="[iFrameSizer]").length,x=window.requestAnimationFrame,z={autoResize:!(k=g=null),bodyBackground:null,bodyMargin:null,bodyMarginV1:8,bodyPadding:null,checkOrigin:!(u=a=!1),inPageLinks:!(I={}),enablePublicMethods:!(r=0),heightCalculationMethod:"bodyOffset",id:"iFrameResizer",interval:32,log:!(M={max:1,scroll:1,bodyScroll:1,documentElementScroll:1}),maxHeight:1/0,maxWidth:1/0,minHeight:0,minWidth:0,mouseEvents:!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(){N("onMessage function not defined")},onMouseEnter:function(){},onMouseLeave:function(){},onResized:function(){},onScroll:function(){return!0}},F={},window.jQuery&&function v(i){i.fn?i.fn.iFrameResize||(i.fn.iFrameResize=function(i){return this.filter("iframe").each((function(r,a){d(a,i)})).end()}):E("","Unable to bind to jQuery, it is not fully loaded.")}(window.jQuery),"function"==typeof define&&define.amd?define([],y):"object"==typeof module&&"object"==typeof module.exports&&(module.exports=y()),window.iFrameResize=window.iFrameResize||y())}(),window.addEventListener("load",(function(){document.querySelectorAll('[data-w-type="embedded"]').forEach((i=>{window.iFrameResize({checkOrigin:!1},i),window.addEventListener("message",(r=>{var a,u;"CAPTCHA_OPEN"===(null==(a=r.data)?void 0:a.type)&&(i.style.minHeight="650px"),"CAPTCHA_CLOSE"===(null==(u=r.data)?void 0:u.type)&&(i.style.minHeight="0px")}))}
5))}))
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.