PageSourceSearch

https://www.herma.us/_assets/abdcebe541972f43cf5eaefea1519fd3/Febu…iframeResizer.contentWindow.min-BQRdcGQa.js

js herma.us collected 2026-10-05 20:38:42 UTC 13,440 bytes, 7 lines download raw bytes

1var Je=(c,f)=>()=>(f||c((f={exports:{}}).exports,f),f.exports);var Ue=Je((_e,re)=>{/*! iFrame Resizer (iframeSizer.contentWindow.min.js) - v4.2.6 - 2019-11-10
2 *  Desc: Include this file in any page being loaded into an iframe
3 *        to force the iframe to resize to the content size.
4 *  Requires: iframeResizer.min.js on host page.
5 *  Copyright: (c) 2019 David J. Bradshaw - [email protected]
6 *  License: MIT
7 */(function(c){if(typeof window<"u"){var f=!0,Pe=10,ae="",F=0,R="",J=null,ue="",x=!1,De={resize:1,click:1},U=128,ce=!0,L=1,Q="bodyOffset",d=Q,se=!0,le="",M={},b=32,de=null,_=!1,P="[iFrameSizer]",fe=P.length,D="",me={max:1,min:1,bodyScroll:1,documentElementScroll:1},V="child",je=!0,he=window.parent,I="*",K=0,j=!1,ge=null,q=16,H=1,pe="scroll",h=pe,qe=window,Y=function(){y("onMessage function not defined")},G=function(){},X=function(){},$={height:function(){return y("Custom height calculation function not defined"),document.documentElement.offsetHeight},width:function(){return y("Custom width calculation function not defined"),document.body.scrollWidth}},Z={},ve=!1;try{var ye=Object.create({},{passive:{get:function(){ve=!0}}});window.addEventListener("test",we,ye),window.removeEventListener("test",we,ye)}catch{}var ee,N,A,te,p,z,W=Date.now||function(){return new Date().getTime()},v={bodyOffset:function(){return document.body.offsetHeight+oe("marginTop")+oe("marginBottom")},offset:function(){return v.bodyOffset()},bodyScroll:function(){return document.body.scrollHeight},custom:function(){return $.height()},documentElementOffset:function(){return document.documentElement.offsetHeight},documentElementScroll:function(){return document.documentElement.scrollHeight},max:function(){return Math.max.apply(null,B(v))},min:function(){return Math.min.apply(null,B(v))},grow:function(){return v.max()},lowestElement:function(){return Math.max(v.bodyOffset()||v.documentElementOffset(),ie("bottom",ze()))},taggedElement:function(){return Ae("bottom","data-iframe-height")}},T={bodyScroll:function(){return document.body.scrollWidth},bodyOffset:function(){return document.body.offsetWidth},custom:function(){return $.width()},documentElementScroll:function(){return document.documentElement.scrollWidth},documentElementOffset:function(){return document.documentElement.offsetWidth},scroll:function(){return Math.max(T.bodyScroll(),T.documentElementScroll())},max:function(){return Math.max.apply(null,B(T))},min:function(){return Math.min.apply(null,B(T))},rightMostElement:function(){return ie("right",ze())},taggedElement:function(){return Ae("right","data-iframe-width")}},He=(ee=Ce,p=null,z=0,function(){var e=W(),t=q-(e-(z=z||e));return N=this,A=arguments,t<=0||q<t?(p&&(clearTimeout(p),p=null),z=e,te=ee.apply(N,A),p||(N=A=null)):p=p||setTimeout(Fe,t),te});C(window,"message",function(e){var t={init:function(){le=e.data,he=e.source,We(),ce=!1,setTimeout(function(){se=!1},U)},reset:function(){se?o("Page reset ignored by init"):(o("Page size reset by host page"),Re("resetPage"))},resize:function(){E("resizeParent","Parent window requested size check")},moveToAnchor:function(){M.findTarget(i())},inPageLink:function(){this.moveToAnchor()},pageInfo:function(){var a=i();o("PageInfoFromParent called from parent: "+a),X(JSON.parse(a)),o(" --")},message:function(){var a=i();o("onMessage called from parent: "+a),Y(JSON.parse(a)),o(" --")}};function n(){return e.data.split("]")[1].split(":")[0]}function i(){return e.data.substr(e.data.indexOf(":")+1)}function r(){return e.data.split(":")[2]in{true:1,false:1}}function u(){var a=n();a in t?t[a]():(typeof re>"u"||!re.exports)&&"iFrameResize"in window||"jQuery"in window&&"iFrameResize"in window.jQuery.prototype||r()||y("Unexpected message ("+e.data+")")}P===(""+e.data).substr(0,fe)&&(ce===!1?u():r()?t.init():o('Ignored message of type "'+n()+'". Received before initialization.'))}),C(window,"readystatechange",Le),Le()}function we(){}function C(e,t,n,i){e.addEventListener(t,n,!!ve&&(i||{}))}function be(e){return e.charAt(0).toUpperCase()+e.slice(1)}function Te(e){return P+"["+D+"] "+e}function o(e){_&&typeof window.console=="object"&&console.log(Te(e))}function y(e){typeof window.console=="object"&&console.warn(Te(e))}function We(){(function(){function e(n){return n==="true"}var t=le.substr(fe).split(":");D=t[0],F=c!==t[1]?Number(t[1]):F,x=c!==t[2]?e(t[2]):x,_=c!==t[3]?e(t[3]):_,b=c!==t[4]?Number(t[4]):b,f=c!==t[6]?e(t[6]):f,R=t[7],d=c!==t[8]?t[8]:d,ae=t[9],ue=t[10],K=c!==t[11]?Number(t[11]):K,M.enable=c!==t[12]&&e(t[12]),V=c!==t[13]?t[13]:V,h=c!==t[14]?t[14]:h})(),o("Initialising iFrame ("+location.href+")"),function(){function e(t,n){return typeof t=="function"&&(o("Setup custom "+n+"CalcMethod"),$[n]=t,t="custom"),t}"iFrameResizer"in window&&Object===window.iFrameResizer.constructor&&(function(){var t=window.iFrameResizer;o("Reading data from page: "+JSON.stringify(t)),Object.keys(t).forEach(Be,t),Y="onMessage"in t?t.onMessage:Y,G="onReady"in t?t.onReady:G,I="targetOrigin"in t?t.targetOrigin:I,d="heightCalculationMethod"in t?t.height
7CalculationMethod:d,h="widthCalculationMethod"in t?t.widthCalculationMethod:h}(),d=e(d,"height"),h=e(h,"width")),o("TargetOrigin for parent set to: "+I)}(),function(){c===R&&(R=F+"px"),ne("margin",function(e,t){return t.indexOf("-")!==-1&&(y("Negative CSS value ignored for "+e),t=""),t}("margin",R))}(),ne("background",ae),ne("padding",ue),function(){var e=document.createElement("div");e.style.clear="both",e.style.display="block",e.style.height="0",document.body.appendChild(e)}(),Se(),Me(),document.documentElement.style.height="",document.body.style.height="",o('HTML & body height set to "auto"'),o("Enable public methods"),qe.parentIFrame={autoResize:function(e){return e===!0&&f===!1?(f=!0,Ie()):e===!1&&f===!0&&(f=!1,Ee("remove"),J!==null&&J.disconnect(),clearInterval(de)),g(0,0,"autoResize",JSON.stringify(f)),f},close:function(){g(0,0,"close")},getId:function(){return D},getPageInfo:function(e){typeof e=="function"?(X=e,g(0,0,"pageInfo")):(X=function(){},g(0,0,"pageInfoStop"))},moveToAnchor:function(e){M.findTarget(e)},reset:function(){xe("parentIFrame.reset")},scrollTo:function(e,t){g(t,e,"scrollTo")},scrollToOffset:function(e,t){g(t,e,"scrollToOffset")},sendMessage:function(e,t){g(0,0,"message",JSON.stringify(e),t)},setHeightCalculationMethod:function(e){d=e,Se()},setWidthCalculationMethod:function(e){h=e,Me()},setTargetOrigin:function(e){o("Set targetOrigin: "+e),I=e},size:function(e,t){E("size","parentIFrame.size("+((e||"")+(t?","+t:""))+")",e,t)}},Ie(),M=function(){function e(r){var u=r.getBoundingClientRect(),a={x:window.pageXOffset!==c?window.pageXOffset:document.documentElement.scrollLeft,y:window.pageYOffset!==c?window.pageYOffset:document.documentElement.scrollTop};return{x:parseInt(u.left,10)+parseInt(a.x,10),y:parseInt(u.top,10)+parseInt(a.y,10)}}function t(r){var u,a=r.split("#")[1]||r,m=decodeURIComponent(a),w=document.getElementById(m)||document.getElementsByName(m)[0];c!==w?(u=e(w),o("Moving to in page link (#"+a+") at x: "+u.x+" y: "+u.y),g(u.y,u.x,"scrollToOffset")):(o("In page link (#"+a+") not found in iFrame, so sending to parent"),g(0,0,"inPageLink","#"+a))}function n(){location.hash!==""&&location.hash!=="#"&&t(location.href)}function i(){Array.prototype.forEach.call(document.querySelectorAll('a[href^="#"]'),function(r){r.getAttribute("href")!=="#"&&C(r,"click",function(u){u.preventDefault(),t(this.getAttribute("href"))})})}return M.enable?Array.prototype.forEach&&document.querySelectorAll?(o("Setting up location.hash handlers"),i(),C(window,"hashchange",n),setTimeout(n,U)):y("In page linking not fully supported in this browser! (See README.md for IE8 workaround)"):o("In page linking not enabled"),{findTarget:t}}(),E("init","Init message from host page"),G()}function Be(e){var t=e.split("Callback");if(t.length===2){var n="on"+t[0].charAt(0).toUpperCase()+t[0].slice(1);this[n]=this[e],delete this[e],y("Deprecated: '"+e+"' has been renamed '"+n+"'. The old method will be removed in the next major version.")}}function ne(e,t){c!==t&&t!==""&&t!=="null"&&o("Body "+e+' set to "'+(document.body.style[e]=t)+'"')}function l(e){var t={add:function(n){function i(){E(e.eventName,e.eventType)}Z[n]=i,C(window,n,i,{passive:!0})},remove:function(n){var i=Z[n];delete Z[n],function(r,u,a){r.removeEventListener(u,a,!1)}(window,n,i)}};e.eventNames&&Array.prototype.map?(e.eventName=e.eventNames[0],e.eventNames.map(t[e.method])):t[e.method](e.eventName),o(be(e.method)+" event listener: "+e.eventType)}function Ee(e){l({method:e,eventType:"Animation Start",eventNames:["animationstart","webkitAnimationStart"]}),l({method:e,eventType:"Animation Iteration",eventNames:["animationiteration","webkitAnimationIteration"]}),l({method:e,eventType:"Animation End",eventNames:["animationend","webkitAnimationEnd"]}),l({method:e,eventType:"Input",eventName:"input"}),l({method:e,eventType:"Mouse Up",eventName:"mouseup"}),l({method:e,eventType:"Mouse Down",eventName:"mousedown"}),l({method:e,eventType:"Orientation Change",eventName:"orientationchange"}),l({method:e,eventType:"Print",eventName:["afterprint","beforeprint"]}),l({method:e,eventType:"Ready State Change",eventName:"readystatechange"}),l({method:e,eventType:"Touch Start",eventName:"touchstart"}),l({method:e,eventType:"Touch End",eventName:"touchend"}),l({method:e,eventType:"Touch Cancel",eventName:"touchcancel"}),l({method:e,eventType:"Transition Start",eventNames:["transitionstart","webkitTransitionStart","MSTransitionStart","oTransitionStart","otransitionstart"]}),l({method:e,eventType:"Transition Iteration",eventNames:["transitioniteration","webkitTransitionIteration","MSTransitionIteration","oTransitionIteration","otransitioniteration"]}),l({method:e,eventType:"Transition End",eventNames:["transitionend","webkitTransitionEnd","MSTransitionEnd","oTransitionEnd","otransitionend"]}
7),V==="child"&&l({method:e,eventType:"IFrame Resized",eventName:"resize"})}function Oe(e,t,n,i){return t!==e&&(e in n||(y(e+" is not a valid option for "+i+"CalculationMethod."),e=t),o(i+' calculation method set to "'+e+'"')),e}function Se(){d=Oe(d,Q,v,"height")}function Me(){h=Oe(h,pe,T,"width")}function Ie(){f===!0?(Ee("add"),function(){var e=b<0;window.MutationObserver||window.WebKitMutationObserver?e?Ne():J=function(){function t(s){function S(O){O.complete===!1&&(o("Attach listeners to "+O.src),O.addEventListener("load",r,!1),O.addEventListener("error",u,!1),m.push(O))}s.type==="attributes"&&s.attributeName==="src"?S(s.target):s.type==="childList"&&Array.prototype.forEach.call(s.target.querySelectorAll("img"),S)}function n(s){o("Remove listeners from "+s.src),s.removeEventListener("load",r,!1),s.removeEventListener("error",u,!1),function(S){m.splice(m.indexOf(S),1)}(s)}function i(s,S,O){n(s.target),E(S,O+": "+s.target.src,c,c)}function r(s){i(s,"imageLoad","Image loaded")}function u(s){i(s,"imageLoadFailed","Image load failed")}function a(s){E("mutationObserver","mutationObserver: "+s[0].target+" "+s[0].type),s.forEach(t)}var m=[],w=window.MutationObserver||window.WebKitMutationObserver,k=function(){var s=document.querySelector("body");return k=new w(a),o("Create body MutationObserver"),k.observe(s,{attributes:!0,attributeOldValue:!1,characterData:!0,characterDataOldValue:!1,childList:!0,subtree:!0}),k}();return{disconnect:function(){"disconnect"in k&&(o("Disconnect body MutationObserver"),k.disconnect(),m.forEach(n))}}}():(o("MutationObserver not supported in this browser!"),Ne())}()):o("Auto Resize disabled")}function Ne(){b!==0&&(o("setInterval: "+b+"ms"),de=setInterval(function(){E("interval","setInterval: "+b)},Math.abs(b)))}function oe(e,t){var n=0;return t=t||document.body,n=(n=document.defaultView.getComputedStyle(t,null))!==null?n[e]:0,parseInt(n,Pe)}function ie(e,t){for(var n=t.length,i=0,r=0,u=be(e),a=W(),m=0;m<n;m++)r<(i=t[m].getBoundingClientRect()[e]+oe("margin"+u,t[m]))&&(r=i);return a=W()-a,o("Parsed "+n+" HTML elements"),o("Element position calculated in "+a+"ms"),function(w){q/2<w&&o("Event throttle increased to "+(q=2*w)+"ms")}(a),r}function B(e){return[e.bodyOffset(),e.bodyScroll(),e.documentElementOffset(),e.documentElementScroll()]}function Ae(e,t){var n=document.querySelectorAll("["+t+"]");return n.length===0&&(y("No tagged elements ("+t+") found on page"),document.querySelectorAll("body *")),ie(e,n)}function ze(){return document.querySelectorAll("body *")}function Ce(e,t,n,i){var r,u;function a(m,w){return!(Math.abs(m-w)<=K)}r=c!==n?n:v[d](),u=c!==i?i:T[h](),a(L,r)||x&&a(H,u)||e==="init"?(ke(),g(L=r,H=u,e)):e in{init:1,interval:1,size:1}||!(d in me||x&&h in me)?e in{interval:1}||o("No change in size detected"):xe(t)}function Fe(){z=W(),p=null,te=ee.apply(N,A),p||(N=A=null)}function E(e,t,n,i){j&&e in De?o("Trigger event cancelled: "+e):(e in{reset:1,resetPage:1,init:1}||o("Trigger event: "+t),e==="init"?Ce(e,t,n,i):He(e,t,n,i))}function ke(){j||(j=!0,o("Trigger event lock on")),clearTimeout(ge),ge=setTimeout(function(){j=!1,o("Trigger event lock off"),o("--")},U)}function Re(e){L=v[d](),H=T[h](),g(L,H,e)}function xe(e){var t=d;d=Q,o("Reset trigger event: "+e),ke(),Re("reset"),d=t}function g(e,t,n,i,r){var u;je===!0&&(c===r?r=I:o("Message targetOrigin: "+r),o("Sending message to host page ("+(u=D+":"+(e+":"+t)+":"+n+(c!==i?":"+i:""))+")"),he.postMessage(P+u,r))}function Le(){document.readyState!=="loading"&&window.parent.postMessage("[iFrameResizerChild]Ready","*")}})()});export default Ue();

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.