/*!
 *  @preserve
 *  
 *  @module      iframe-resizer/jquery 5.5.7 (iife) 
 *
 *  @license     GPL-3.0 for non-commercial use only.
 *               For commercial use, you must purchase a license from
 *               https://iframe-resizer.com/pricing
 * 
 *  @description Keep same and cross domain iFrames sized to their content 
 *
 *  @author      David J. Bradshaw <info@iframe-resizer.com>
 * 
 *  @see         {@link https://iframe-resizer.com}
 * 
 *  @copyright  (c) 2013 - 2025, David J. Bradshaw. All rights reserved.
 */


!function(){"use strict";const e="font-weight: normal;",t=e+"font-style: italic;",n="default",o=Object.freeze({assert:!0,error:!0,warn:!0}),i={expand:!1,defaultEvent:void 0,event:void 0,label:"AutoConsoleGroup",showTime:!0},r={profile:0,profileEnd:0,timeStamp:0,trace:0},a=Object.assign(console);const{fromEntries:s,keys:l}=Object,c=e=>[e,a[e]],u=e=>t=>[t,function(n){e[t]=n}],d=(e,t)=>s(l(e).map(t));const f=!(typeof window>"u"||"function"!=typeof window.matchMedia)&&window.matchMedia("(prefers-color-scheme: dark)").matches,p=f?"color: #A9C7FB;":"color: #135CD2;",m=f?"color: #E3E3E3;":"color: #1F1F1F;",h="5.5.7",g="iframeResizer",y=":",b="autoResize",v="init",w="iframeReady",z="load",j="message",$="onload",k="pageInfo",T="parentInfo",x="reset",M="resize",R="scroll",S="child",E="parent",O="string",C="object",I="function",W="auto",A="none",L="vertical",N="horizontal",B="[iFrameSizer]",F=Object.freeze({max:1,scroll:1,bodyScroll:1,documentElementScroll:1}),H=Object.freeze({[$]:1,[v]:1,[w]:1}),P="expanded",q="collapsed",U=Object.freeze({[P]:1,[q]:1}),D=(e,t,n,o)=>e.addEventListener(t,n,o||!1),Q=(e,t,n)=>e.removeEventListener(t,n,!1),J=e=>{if(!e)return"";let t=-559038744,n=1103547984;for(let o,i=0;i<e.length;i++)o=e.codePointAt(i),t=Math.imul(t^o,2246822519),n=Math.imul(n^o,3266489917);return t^=Math.imul(t^n>>>15,1935289751),n^=Math.imul(n^t>>>15,3405138345),t^=n>>>16,n^=t>>>16,(2097152*(n>>>0)+(t>>>11)).toString(36)},Z=e=>e.replace(/[A-Za-z]/g,e=>String.fromCodePoint((e<="Z"?90:122)>=(e=e.codePointAt(0)+19)?e:e-26)),V=["spjluzl","rlf","clyzpvu"],X=["<yi>Puchspk Spjluzl Rlf</><iy><iy>","<yi>Tpzzpun Spjluzl Rlf</><iy><iy>","Aopz spiyhyf pz hchpshisl dpao ivao Jvttlyjphs huk Vwlu-Zvbyjl spjluzlz.<iy><iy><i>Jvttlyjphs Spjluzl</><iy>Mvy jvttlyjphs bzl, <p>pmyhtl-ylzpgly</> ylxbpylz h svd jvza vul aptl spjluzl mll. Mvy tvyl pumvythapvu cpzpa <b>oaawz://pmyhtl-ylzpgly.jvt/wypjpun</>.<iy><iy><i>Vwlu Zvbyjl Spjluzl</><iy>Pm fvb hyl bzpun aopz spiyhyf pu h uvu-jvttlyjphs vwlu zvbyjl wyvqlja aolu fvb jhu bzl pa mvy myll bukly aol alytz vm aol NWS C3 Spjluzl. Av jvumpyt fvb hjjlwa aolzl alytz, wslhzl zla aol <i>spjluzl</> rlf pu <p>pmyhtl-ylzpgly</> vwapvuz av <i>NWSc3</>.<iy><iy>Mvy tvyl pumvythapvu wslhzl zll: <b>oaawz://pmyhtl-ylzpgly.jvt/nws</>","<i>NWSc3 Spjluzl Clyzpvu</><iy><iy>Aopz clyzpvu vm <p>pmyhtl-ylzpgly</> pz ilpun bzlk bukly aol alytz vm aol <i>NWS C3</> spjluzl. Aopz spjluzl hssvdz fvb av bzl <p>pmyhtl-ylzpgly</> pu Vwlu Zvbyjl wyvqljaz, iba pa ylxbpylz fvby wyvqlja av il wbispj, wyvcpkl haaypibapvu huk il spjluzlk bukly clyzpvu 3 vy shaly vm aol NUB Nlulyhs Wbispj Spjluzl.<iy><iy>Pm fvb hyl bzpun aopz spiyhyf pu h uvu-vwlu zvbyjl wyvqlja vy dlizpal, fvb dpss ullk av wbyjohzl h svd jvza vul aptl jvttlyjphs spjluzl.<iy><iy>Mvy tvyl pumvythapvu cpzpa <b>oaawz://pmyhtl-ylzpgly.jvt/wypjpun</>.","<iy><yi>Zvsv spjluzl kvlz uva zbwwvya jyvzz-kvthpu</><iy><iy>Av bzl <p>pmyhtl-ylzpgly</> dpao jyvzz kvthpu pmyhtlz fvb ullk lpaoly aol Wyvmlzzpvuhs vy Ibzpulzz spjluzlz. Mvy klahpsz vu bwnyhkl wypjpun wslhzl jvuahja pumv@pmyhtl-ylzpgly.jvt.","Pu whnl spurpun ylxbpylz h Wyvmlzzpvuhs vy Ibzpulzz spjluzl. Wslhzl zll <b>oaawz://pmyhtl-ylzpgly.jvt/wypjpun</> mvy tvyl klahpsz."],Y=["NWSc3","zvsv","wyv","ibzpulzz","vlt"],G=Object.fromEntries(["2cgs7fdf4xb","1c9ctcccr4z","1q2pc4eebgb","ueokt0969w","w2zxchhgqz","1umuxblj2e5"].map((e,t)=>[e,Math.max(0,t-1)])),_=e=>Z(X[e]);var K=e=>{const t=e[Z(V[0])]||e[Z(V[1])]||e[Z(V[2])];if(!t)return-1;const n=t.split("-");let o=function(e=""){let t=-2;const n=J(Z(e));return n in G&&(t=G[n]),t}(n[0]);return 0===o||(e=>e[2]===J(e[0]+e[1]))(n)||(o=-2),o};const ee=Object.hasOwn||((e,t)=>Object.prototype.hasOwnProperty.call(e,t)),te=e=>e;var ne=e=>t=>window.chrome?e(t.replaceAll("<br>","\n").replaceAll("<rb>","[31;1m").replaceAll("</>","[m").replaceAll("<b>","[1m").replaceAll("<i>","[3m").replaceAll("<u>","[4m")):e((e=>e.replaceAll("<br>","\n").replaceAll(/<[/a-z]+>/gi,""))(t)),oe={};const ie=(re=function(s={}){const l={},f={},p=[],m={...i,expand:!s.collapsed||i.expanded,...s};let h="";function g(){p.length=0,h=""}function y(){delete m.event,g()}const b=()=>!!p.some(([e])=>e in o)||!!m.expand;function v(){if(0!==p.length){a[b()?"group":"groupCollapsed"](`%c${m.label}%c ${(e=>{const t=e.event||e.defaultEvent;return t?`${t}`:""})(m)} %c${m.showTime?h:""}`,e,"font-weight: bold;",t);for(const[e,...t]of p)a.assert(e in a,`Unknown console method: ${e}`),e in a&&a[e](...t);a.groupEnd(),y()}else y()}function w(){""===h&&(h=function(){const e=new Date,t=(t,n)=>e[t]().toString().padStart(n,"0");return`@ ${t("getHours",2)}:${t("getMinutes",2)}:${t("getSeconds",2)}.${t("getMilliseconds",3)}`}())}function z(e,...t){0===p.length&&(w(),queueMicrotask(()=>queueMicrotask(v))),p.push([e,...t])}function j(e=n,...t){l[e]?z("log",`${e}: ${performance.now()-l[e]} ms`,...t):z("timeLog",e,...t)}return{...d(m,u(m)),...d(console,e=>[e,(...t)=>z(e,...t)]),...d(r,c),assert:function(e,...t){!0!==e&&z("assert",e,...t)},count:function(e=n){f[e]?f[e]+=1:f[e]=1,z("log",`${e}: ${f[e]}`)},countReset:function(e=n){delete f[e]},endAutoGroup:v,errorBoundary:e=>(...t)=>{let n;try{n=e(...t)}catch(e){if(!Error.prototype.isPrototypeOf(e))throw e;z("error",e),v()}return n},event:function(e){w(),m.event=e},purge:g,time:function(e=n){w(),l[e]=performance.now()},timeEnd:function(e=n){j(e),delete l[e]},timeLog:j,touch:w}},re?.__esModule?re.default:re);var re;let ae=!0;const se=ie({expand:!1,label:E}),le=e=>window.top===window.self?`parent(${e})`:`nested parent(${e})`;const ce=e=>(t,...n)=>oe[t]?oe[t].console[e](...n):se[e](...n);var ue;const de=(ue="log",(e,...t)=>!0===(e=>oe[e]?oe[e].log:ae)(e)?ce(ue)(e,...t):null),fe=ce("warn"),pe=ce("error"),me=ce("event"),he=ce("purge"),ge=ce("errorBoundary");const ye=(e,...t)=>oe[e]?oe[e].console.warn(ne(te)(...t)):queueMicrotask(()=>console?.warn(ne((e=>(...t)=>[`${g}(${e})`,...t].join(" "))(e))(...t))),be=(e=>(t,n="renamed to")=>(o,i,r="",a="")=>e(a,`<rb>Deprecated ${t}(${o.replace("()","")})</>\n\nThe <b>${o}</> ${t.toLowerCase()} has been ${n} <b>${i}</>. ${r}Use of the old ${t.toLowerCase()} will be removed in a future version of <i>iframe-resizer</>.`))(ye),ve=be("Method"),we=be("Option");function ze(e,t){const{msgTimeout:n,warningTimeout:o}=t[e];o&&(n&&clearTimeout(n),t[e].msgTimeout=setTimeout(function(){if(void 0===t[e])return;const{initialised:n,loadErrorShown:o}=t[e];t[e].msgTimeout=void 0,n||o||(t[e].loadErrorShown=!0,function(e,t){const{iframe:n,waitForLoad:o}=t[e],{sandbox:i}=n,r=typeof i===C&&i.length>0&&!(i.contains("allow-scripts")&&i.contains("allow-same-origin"));me(e,"noResponse"),ye(e,`<rb>No response from iframe</>\n          \nThe iframe (<i>${e}</>) has not responded within ${t[e].warningTimeout/1e3} seconds. Check <b>@iframe-resizer/child</> package has been loaded in the iframe.\n${o?"\nThe <b>waitForLoad</> option is currently set to <b>'true'</>. If the iframe loads before <i>iframe-resizer</> runs, this option will prevent <i>iframe-resizer</> initialising. To disable this option, set <b>waitForLoad</> to <b>'false'</>.  \n":""}${r?"\nThe iframe has the <b>sandbox</> attribute, please ensure it contains both the <i>'allow-same-origin'</> and <i>'allow-scripts'</> values.\n":""}\nThis message can be ignored if everything is working, or you can set the <b>warningTimeout</> option to a higher value or zero to suppress this warning.\n`)}(e,t))},o))}var je=Object.freeze({autoResize:!0,bodyBackground:null,bodyMargin:null,bodyPadding:null,checkOrigin:!0,direction:L,firstRun:!0,inPageLinks:!1,heightCalculationMethod:W,id:"iFrameResizer",log:!1,logExpand:!1,license:void 0,mouseEvents:!0,offsetHeight:null,offsetWidth:null,postMessageTarget:null,sameDomain:!1,scrolling:!1,sizeHeight:!0,sizeWidth:!1,tolerance:0,waitForLoad:!1,warningTimeout:5e3,widthCalculationMethod:W,onBeforeClose:()=>!0,onAfterClose(){},onInit:!1,onMessage:null,onMouseEnter(){},onMouseLeave(){},onReady:e=>{typeof oe[e.id].onInit===I&&(we("init()","onReady()","",e.id),oe[e.id].onInit(e))},onResized(){},onScroll:()=>!0}),$e={position:null,version:h};function ke(e){function t(){Ce(F),Ee(q),I("onResized",F)}function n(e){if("border-box"!==e.boxSizing)return 0;return(e.paddingTop?parseInt(e.paddingTop,10):0)+(e.paddingBottom?parseInt(e.paddingBottom,10):0)}function o(e){if("border-box"!==e.boxSizing)return 0;return(e.borderTopWidth?parseInt(e.borderTopWidth,10):0)+(e.borderBottomWidth?parseInt(e.borderBottomWidth,10):0)}const i=e=>L.slice(L.indexOf(y)+7+e);const r=(e,t)=>(n,o)=>{const i={};var r,a;r=function(){We(`${n} (${e})`,`${e}:${t()}`,o)},i[a=o]||(r(),i[a]=requestAnimationFrame(()=>{i[a]=null}))},a=(e,t)=>()=>{let n=!1;const o=t=>()=>{oe[l]?n&&n!==t||(e(t,l),n=t,requestAnimationFrame(()=>{n=!1})):s()},i=o(R),r=o("resize window");function a(e,t){t(window,R,i),t(window,M,r)}function s(){me(l,`stop${t}`),a(0,Q),c.disconnect(),u.disconnect(),Q(oe[l].iframe,z,s)}const l=q,c=new ResizeObserver(o("pageObserver")),u=new ResizeObserver(o("iframeObserver"));oe[l]&&(oe[l][`stop${t}`]=s,D(oe[l].iframe,z,s),a(0,D),c.observe(document.body,{attributes:!0,childList:!0,subtree:!0}),u.observe(oe[l].iframe,{attributes:!0,childList:!1,subtree:!1}))},s=e=>()=>{e in oe[q]&&(oe[q][e](),delete oe[q][e])},l=r(k,function(){const e=document.body.getBoundingClientRect(),t=F.iframe.getBoundingClientRect(),{scrollY:n,scrollX:o,innerHeight:i,innerWidth:r}=window,{clientHeight:a,clientWidth:s}=document.documentElement;return JSON.stringify({iframeHeight:t.height,iframeWidth:t.width,clientHeight:Math.max(a,i||0),clientWidth:Math.max(s,r||0),offsetTop:parseInt(t.top-e.top,10),offsetLeft:parseInt(t.left-e.left,10),scrollTop:n,scrollLeft:o,documentHeight:a,documentWidth:s,windowHeight:i,windowWidth:r})}),c=r(T,function(){const{iframe:e}=F,{scrollWidth:t,scrollHeight:n}=document.documentElement,{width:o,height:i,offsetLeft:r,offsetTop:a,pageLeft:s,pageTop:l,scale:c}=window.visualViewport;return JSON.stringify({iframe:e.getBoundingClientRect(),document:{scrollWidth:t,scrollHeight:n},viewport:{width:o,height:i,offsetLeft:r,offsetTop:a,pageLeft:s,pageTop:l,scale:c}})}),u=a(l,"PageInfo"),d=a(c,"ParentInfo"),f=s("stopPageInfo"),g=s("stopParentInfo");function w(e){const t=e.getBoundingClientRect();return Re(),{x:Number(t.left)+Number($e.position.x),y:Number(t.top)+Number($e.position.y)}}function $(e){const t=e?w(F.iframe):{x:0,y:0};de(q,`Reposition requested (offset x:%c${t.x}%c y:%c${t.y})`,p,m,p);const n=((e,t)=>({x:e.width+t.x,y:e.height+t.y}))(F,t),o=window.parentIframe||window.parentIFrame;o?function(t,n){setTimeout(()=>t["scrollTo"+(e?"Offset":"")](n.x,n.y))}(o,n):function(e){$e.position=e,S(q)}(n)}function S(e){const{x:t,y:n}=$e.position,o=oe[e]?.iframe;!1!==I("onScroll",{iframe:o,top:n,left:t,x:t,y:n})?Ee(e):Se()}function C(e){let t={};if(0===F.width&&0===F.height){const e=i(9).split(y);t={x:e[1],y:e[0]}}else t={x:F.width,y:F.height};I(e,{iframe:F.iframe,screenX:Number(t.x),screenY:Number(t.y),type:F.type})}const I=(e,t)=>Te(q,e,t);function W(){const{height:e,iframe:n,msg:o,type:r,width:a}=F;switch(oe[q]?.firstRun&&function(){if(!oe[q])return;Be(q,F.mode),oe[q].firstRun=!1}(),r){case"close":Me(n);break;case j:l=i(6),I("onMessage",{iframe:F.iframe,message:JSON.parse(l)});break;case"mouseenter":C("onMouseEnter");break;case"mouseleave":C("onMouseLeave");break;case"beforeUnload":de(q,"Ready state reset"),oe[q].initialised=!1;break;case b:oe[q].autoResize=JSON.parse(i(9));break;case"scrollBy":!function(){const e=F.width,t=F.height,n=window.parentIframe||window.parentIFrame||window;de(q,`scrollBy: x: %c${e}%c y: %c${t}`,p,m,p),n.scrollBy(e,t)}();break;case"scrollTo":$(!1);break;case"scrollToOffset":$(!0);break;case k:u();break;case T:d();break;case"pageInfoStop":f();break;case"parentInfoStop":g();break;case"inPageLink":!function(e){const t=e.split("#")[1]||"",n=decodeURIComponent(t);let o=document.getElementById(n)||document.getElementsByName(n)[0];o?function(){const e=w(o);de(q,`Moving to in page link: %c#${t}`,p),$e.position={x:e.x,y:e.y},S(q),window.location.hash=t}():window.top!==window.self&&function(){const e=window.parentIframe||window.parentIFrame;e&&e.moveToAnchor(t)}()}(i(9));break;case"title":!function(e,t){oe[t]?.syncTitle&&(oe[t].iframe.title=e,de(t,`Set iframe title attribute: %c${e}`,p))}(o,q);break;case x:Oe(F);break;case v:t(),function(e){try{oe[e].sameOrigin=!!oe[e]?.iframe?.contentWindow?.iframeChildListener}catch(t){oe[e].sameOrigin=!1}}(q),(s=o)!==h&&(void 0!==s||ye(q,"<rb>Legacy version detected in iframe</>\n\nDetected legacy version of child page script. It is recommended to update the page in the iframe to use <b>@iframe-resizer/child</>.\n\nSee <u>https://iframe-resizer.com/setup/#child-page-setup</> for more details.\n")),oe[q].initialised=!0,I("onReady",n);break;default:if(0===a&&0===e)return void fe(q,`Unsupported message received (${r}), this is likely due to the iframe containing a later version of iframe-resizer than the parent page`);if(0===a||0===e)return;if(document.hidden)return;t()}var s,l}function A(e){if(!oe[e])throw new Error(`${F.type} No settings for ${e}. Message was: ${L}`)}let L=e.data;if("[iFrameResizerChild]Ready"===L)return N=e.source,void Object.values(oe).forEach((e=>({initChild:t,postMessageTarget:n})=>{e===n&&t()})(N));var N;if(!(e=>B===`${e}`.slice(0,13)&&e.slice(13).split(y)[0]in oe)(L)){if(typeof L!==O)return;return void me(E,"ignoredMessage")}const F=function(e){const t=e.slice(13).split(y),i=t[1]?Number(t[1]):0,r=oe[t[0]]?.iframe,a=getComputedStyle(r),s={iframe:r,id:t[0],height:i+n(a)+o(a),width:Number(t[2]),type:t[3],msg:t[4]};return t[5]&&(s.mode=t[5]),s}(L),{id:H,type:P}=F,q=H;q?(me(q,P),ge(q,function(t){A(q),F.type in{true:1,false:1,undefined:1}||(null!==F.iframe||(fe(q,`The iframe (${F.id}) was not found.`),0))&&function(){const{origin:t,sameOrigin:n}=e;if(n)return!0;let o=oe[q]?.checkOrigin;if(o&&"null"!=`${t}`&&!(o.constructor===Array?function(){let e=0,n=!1;for(;e<o.length;e++)if(o[e]===t){n=!0;break}return n}():function(){const e=oe[q]?.remoteHost;return t===e}()))throw new Error(`Unexpected message received from: ${t} for ${F.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}()&&W()})(L)):fe("","iframeResizer received messageData without id, message was: ",L)}function Te(e,t,n){let o=null,i=null;if(oe[e]){if(o=oe[e][t],typeof o!==I)throw new TypeError(`${t} on iFrame[${e}] is not a function`);if("onBeforeClose"===t||"onScroll"===t)try{i=o(n)}catch(n){console.error(n),fe(e,`Error in ${t} callback`)}else((e,...t)=>{setTimeout(()=>e(...t),0)})(o,n)}return i}function xe(e){const{id:t}=e;delete oe[t],delete e.iframeResizer}function Me(e){const{id:t}=e;if(!1!==Te(t,"onBeforeClose",t)){try{e.parentNode&&e.remove()}catch(e){fe(t,e)}Te(t,"onAfterClose",t),xe(e)}}function Re(e){null===$e.position&&($e.position={x:window.scrollX,y:window.scrollY})}function Se(){$e.position=null}function Ee(e){null!==$e.position&&(window.scrollTo($e.position.x,$e.position.y),de(e,`Set page position: %c${$e.position.x}%c, %c${$e.position.y}`,p,m,p),Se())}function Oe(e){Re(e.id),Ce(e),We(x,x,e.id)}function Ce(e){function t(t){const o=`${e[t]}px`;e.iframe.style[t]=o,de(n,`Set ${t}: %c${o}`,p)}const{id:n}=e,{sizeHeight:o,sizeWidth:i}=oe[n];o&&t("height"),i&&t("width")}const Ie=e=>e.split(y).filter((e,t)=>19!==t).join(y);function We(e,t,n){function o(o){const i=e in H?Ie(t):t;de(n,o,p,m,p),de(n,`Message data: %c${i}`,p)}me(n,e),oe[n]&&(oe[n]?.postMessageTarget?function(){const{iframe:i,postMessageTarget:r,sameOrigin:a,targetOrigin:s}=oe[n];if(a)try{return i.contentWindow.iframeChildListener(B+t),void o(`Sending message to iframe %c${n}%c via same origin%c`)}catch(t){e in H?oe[n].sameOrigin=!1:fe(n,"Same origin messaging failed, falling back to postMessage")}o(`Sending message to iframe: %c${n}%c targetOrigin: %c${s}`),r.postMessage(B+t,s)}():fe(n,`Iframe(${n}) not found`))}let Ae=0,Le=!1,Ne=!1;function Be(t,n=-3){if(Le)return;const o=Math.max(oe[t].mode,n);if(o>oe[t].mode&&(oe[t].mode=o),o<0)throw he(t),oe[t].vAdvised||ye(t||"Parent",`${_(o+2)}${_(2)}`),oe[t].vAdvised=!0,_(o+2).replace(/<\/?[a-z][^>]*>|<\/>/gi,"");o>0&&Ne||function(t,n){queueMicrotask(()=>console.info(`%ciframe-resizer ${t}`,ae||n<1?"font-weight: bold;":e))}(`v${h} (${(e=>Z(Y[e]))(o)})`,o),o<1&&ye("Parent",_(3)),Le=!0}var Fe=e=>t=>{function n(){oe[d]?.heightCalculationMethod in F&&Oe({iframe:t,height:1,width:1,type:v})}function o(){if(oe[d]){const{iframe:e}=oe[d],t={close:Me.bind(null,e),disconnect:xe.bind(null,e),removeListeners(){ye(d,"<rb>Deprecated Method Name</>\n\nThe [removeListeners()</> method has been renamed to [disconnect()</>.\n"),this.disconnect()},resize(){ye(d,"<rb>Deprecated Method</>\n        \nUse of the <b>resize()</> method from the parent page is deprecated and will be removed in a future version of <i>iframe-resizer</>. As their are no longer any edge cases that require triggering a resize from the parent page, it is recommended to remove this method from your code."),We.bind(null,"Window resize",M,d)},moveToAnchor(e){((e,t,n)=>{if(typeof e!==t)throw new TypeError(`${n} is not a ${o=t,o.charAt(0).toUpperCase()+o.slice(1)}`);var o})(e,O,"moveToAnchor(anchor) anchor"),We("Move to anchor",`moveToAnchor:${e}`,d)},sendMessage(e){e=JSON.stringify(e),We(j,`${j}:${e}`,d)}};e.iframeResizer=t,e.iFrameResizer=t}}function i(e,t){const o=o=>()=>{if(!oe[e])return;const{firstRun:i,iframe:r}=oe[e];We(o,t,e),(e=>e===v)(o)&&(e=>"lazy"===e.loading)(r)||ze(e,oe),i||n()},{iframe:i}=oe[e];oe[e].initChild=o(w),function(e,t){D(e,z,()=>setTimeout(t,1))}(i,o($)),function(e,t){const{iframe:n,waitForLoad:o}=oe[e];!0!==o&&((e=>{const{src:t,srcdoc:n}=e;return!n&&(null==t||""===t||"about:blank"===t)})(n)?setTimeout(()=>{me(e,"noContent"),de(e,"No content detected in the iframe, delaying initialisation")}):setTimeout(t))}(e,o(v))}function r(e){return e?(("sizeWidth"in e||"sizeHeight"in e||b in e)&&ye(d,`<rb>Deprecated Option</>\n\nThe <b>sizeWidth</>, <b>sizeHeight</> and <b>autoResize</> options have been replaced with new <b>direction</> option which expects values of <i>"${L}"</>, <i>"${N}"</> or <i>"${A}"</>.\n`),e):{}}function a(e){const t=oe[e]?.iframe?.title;return""===t||void 0===t}function s(e,t){ee(oe[d],e)&&(ye(d,`<rb>Deprecated option</>\n\nThe <b>${e}</> option has been renamed to <b>${t}</>. Use of the old name will be removed in a future version of <i>iframe-resizer</>.`),oe[d][t]=oe[d][e],delete oe[d][e])}const l=e=>ee(e,"onMouseEnter")||ee(e,"onMouseLeave");function c(e){var n,o;oe[d]={...oe[d],iframe:t,remoteHost:t?.src.split("/").slice(0,3).join("/"),...je,...r(e),mouseEvents:l(e),mode:K(e),syncTitle:a(d)},s("offset","offsetSize"),s("onClose","onBeforeClose"),s("onClosed","onAfterClose"),me(d,"setup"),function(){const{direction:e}=oe[d];switch(e){case L:break;case N:oe[d].sizeHeight=!1;case"both":oe[d].sizeWidth=!0;break;case A:oe[d].sizeWidth=!1,oe[d].sizeHeight=!1,oe[d].autoResize=!1;break;default:throw new TypeError(d,`Direction value of "${e}" is not valid`)}}(),(n=e?.offsetSize||e?.offset)&&(oe[d].direction===L?oe[d].offsetHeight=n:oe[d].offsetWidth=n),function(e){e?.offset&&ye(d,"<rb>Deprecated option</>\n\n The <b>offset</> option has been renamed to <b>offsetSize</>. Use of the old name will be removed in a future version of <i>iframe-resizer</>.")}(e),oe[d].warningTimeout||de(d,"warningTimeout:%c disabled",p),null===oe[d].postMessageTarget&&(oe[d].postMessageTarget=t.contentWindow),oe[d].targetOrigin=!0===oe[d].checkOrigin?""===(o=oe[d].remoteHost)||null!==o.match(/^(about:blank|javascript:|file:\/\/)/)?"*":o:"*"}const u=()=>g in t,d=function(n){if(n&&typeof n!==O)throw new TypeError("Invalid id for iFrame. Expected String");return""!==n&&n||(n=function(){let t=e?.id||je.id+Ae++;return null!==document.getElementById(t)&&(t+=Ae++),t}(),t.id=n,me(n,"assignId")),n}(t.id);if(typeof e!==C)throw new TypeError("Options is not an object");return function(e){const{search:t}=window.location;t.includes("ifrlog")&&(e.log=q,e.logExpand=t.includes("ifrlog=expanded"))}(e),function(e,t){const n=ee(t,"log"),o=typeof t.log===O,i=n?!!o||t.log:je.log;ee(t,"logExpand")||(t.logExpand=n&&o?t.log===P:je.logExpand),function(e){-1===e?.log&&(e.log=!1,Ne=!0)}(t),function({enabled:e,expand:t,iframeId:n}){const o=ie({expand:t,label:le(n)});ae=e,oe[n]||(oe[n]={console:o})}({enabled:i,expand:t.logExpand,iframeId:e}),o&&!(t.log in U)&&pe(e,'Invalid value for options.log: Accepted values are "expanded" and "collapsed"'),t.log=i}(d,e),ge(d,function(e){u()?fe(d,`Ignored iframe (${d}), already setup.`):(c(e),function(){if(Le)return;const{mode:e}=oe[d];-1!==e&&Be(d,e)}(),Pe(),function(){switch(t.style.overflow=!1===oe[d]?.scrolling?"hidden":W,oe[d]?.scrolling){case"omit":break;case!0:t.scrolling="yes";break;case!1:t.scrolling="no";break;default:t.scrolling=oe[d]?oe[d].scrolling:"no"}}(),function(){const{bodyMargin:e}=oe[d];"number"!=typeof e&&"0"!==e||(oe[d].bodyMargin=`${e}px`)}(),i(d,function(e){const{autoResize:t,bodyBackground:n,bodyMargin:o,bodyPadding:i,heightCalculationMethod:r,inPageLinks:a,license:s,log:l,logExpand:c,mouseEvents:u,offsetHeight:d,offsetWidth:f,mode:p,sizeHeight:m,sizeWidth:h,tolerance:g,widthCalculationMethod:b}=oe[e];return[e,"8",h,l,"32",!0,t,o,r,n,i,g,a,S,b,u,d,f,m,s,$e.version,p,"",c].join(y)}(d)),o())})(e),t?.iframeResizer};function He(){!0!==document.hidden&&((e,t)=>{Object.values(oe).filter(({autoResize:e,firstRun:t})=>e&&!t).forEach(({iframe:n})=>We(e,t,n.id))})("tabVisible",M)}const Pe=(e=>{let t=!1;return function(){return t?void 0:(t=!0,Reflect.apply(e,this,arguments))}})(()=>{D(window,j,ke),D(document,"visibilitychange",He),window.iframeParentListener=e=>setTimeout(()=>ke({data:e,sameOrigin:!0}))});switch(!0){case void 0===window.jQuery:fe("","Unable to bind to jQuery, it is not available.");break;case!window.jQuery.fn:fe("","Unable to bind to jQuery, it is not fully loaded.");break;case window.jQuery.fn.iframeResize:fe("","iframeResize is already assigned to jQuery.fn.");break;default:window.jQuery.fn.iframeResize=function(e){const t=Fe(e);return this.filter("iframe").each((e,n)=>t(n)).end()},window.jQuery.fn.iFrameResize=function(e){return ve("iFrameResize()","iframeResize()","","jQuery"),this.iframeResize(e)}}}();
