PageSourceSearch

https://www.lidl.ee/c/js/hashed/iframeResizer.min.196cca3cca977bac4e35ece675b94075.js

js lidl.ee collected 2026-10-02 18:52:09 UTC 12,558 bytes, 1 lines download raw bytes

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

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.