PageSourceSearch

https://assets.viaoccitanie.tv/js/vendors~iframe-resizer.b25d7a816425a1078983.js

js viaoccitanie.tv collected 2026-10-02 06:01:22 UTC 14,720 bytes, 1 lines download raw bytes

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

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.