PageSourceSearch

https://onlineservices.mvv.de/onlineservices/resources/os-portal/assets_bb/assets/js/oss.iframeResizer.js

js mvv.de collected 2026-09-24 10:07:09 UTC 13,823 bytes, 2 lines download raw bytes

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

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.