diff --git a/iframe-resizer.zip b/iframe-resizer.zip index 195670e83..2926e27dc 100644 Binary files a/iframe-resizer.zip and b/iframe-resizer.zip differ diff --git a/js-dist/js/iframe-resizer.child.js b/js-dist/js/iframe-resizer.child.js new file mode 100644 index 000000000..78da658f0 --- /dev/null +++ b/js-dist/js/iframe-resizer.child.js @@ -0,0 +1,20 @@ +/*! + * @preserve + * + * @module iframe-resizer/child 5.0.2 (iife) + * + * @license GPL-3.0 for non-commercial use only. + * For commercial use, you must purchase a license from + * https://iframe-resizer.com/pricing + * + * @desciption Keep same and cross domain iFrames sized to their content + * + * @author David J. Bradshaw + * + * @see {@link https://iframe-resizer.com} + * + * @copyright (c) 2013 - 2024, David J. Bradshaw. All rights reserved. + */ + + +!function(){"use strict";const e="5.0.2",t=10,n="data-iframe-size";const o=(e,t,n,o)=>e.addEventListener(t,n,o||!1),i=(e,t,n)=>e.removeEventListener(t,n,!1),r=["Puchspk Spjluzl Rlf","Tpzzpun Spjluzl Rlf","Aopz spiyhyf pz hchpshisl dpao ivao Jvttlyjphs huk Vwlu-Zvbyjl spjluzlz.Jvttlyjphs SpjluzlMvy jvttlyjphs bzl,

pmyhtl-ylzpgly ylxbpylz h svd jvza vul aptl spjluzl mll. Mvy tvyl pumvythapvu cpzpa oaawz://pmyhtl-ylzpgly.jvt/wypjpun.Vwlu Zvbyjl SpjluzlPm 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 spjluzl rlf pu

pmyhtl-ylzpgly vwapvuz av NWSc3.Mvy tvyl pumvythapvu wslhzl zll: oaawz://pmyhtl-ylzpgly.jvt/nws","NWSc3 Spjluzl ClyzpvuAopz clyzpvu vm

pmyhtl-ylzpgly pz ilpun bzlk bukly aol alytz vm aol NWS C3 spjluzl. Aopz spjluzl hssvdz fvb av bzl

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.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.Mvy tvyl pumvythapvu cpzpa oaawz://pmyhtl-ylzpgly.jvt/wypjpun."];Object.fromEntries(["2cgs7fdf4xb","1c9ctcccr4z","1q2pc4eebgb","ueokt0969w","w2zxchhgqz","1umuxblj2e5"].map(((e,t)=>[e,Math.max(0,t-1)])));const a=e=>(e=>e.replaceAll(/[A-Za-z]/g,(e=>String.fromCodePoint((e<="Z"?90:122)>=(e=e.codePointAt(0)+19)?e:e-26))))(r[e]),l={contentVisibilityAuto:!0,opacityProperty:!0,visibilityProperty:!0},c={height:()=>(re("Custom height calculation function not defined"),Ie.auto()),width:()=>(re("Custom width calculation function not defined"),ke.auto())},s={bodyOffset:1,bodyScroll:1,offset:1,documentElementOffset:1,documentElementScroll:1,documentElementBoundingClientRect:1,max:1,min:1,grow:1,lowestElement:1},u=128,d={},m="checkVisibility"in window,f="auto",p="[iFrameSizer]",h=p.length,y={max:1,min:1,bodyScroll:1,documentElementScroll:1},g=["body"],v="scroll";let b,w,z=!0,S="",$=0,j="",E=null,O="",M=!0,A=!1,C=null,P=!0,T=!1,I=1,k=f,x=!0,N="",R={},B=!0,L=!1,q=0,D=!1,H="",W="child",F=null,U=!1,V=window.parent,J="*",Z=0,Q=!1,X="",Y=1,G=v,K=window,_=()=>{re("onMessage function not defined")},ee=()=>{},te=null,ne=null;const oe=e=>""!=`${e}`&&void 0!==e;const ie=(...e)=>[`[iframe-resizer][${H}]`,...e].join(" "),re=(...e)=>console?.warn(ie(...e)),ae=(...e)=>console?.warn((e=>t=>window.chrome?e(t.replaceAll("
","\n").replaceAll("","").replaceAll("","").replaceAll("","").replaceAll("","").replaceAll("","")):e(t.replaceAll("
","\n").replaceAll(/<[/a-z]+>/gi,"")))(ie)(...e)),le=e=>ae(e);function ce(){!function(){try{U="iframeParentListener"in window.parent}catch(e){}}(),function(){const e=e=>"true"===e,t=N.slice(h).split(":");H=t[0],$=void 0===t[1]?$:Number(t[1]),A=void 0===t[2]?A:e(t[2]),L=void 0===t[3]?L:e(t[3]),z=void 0===t[6]?z:e(t[6]),j=t[7],k=void 0===t[8]?k:t[8],S=t[9],O=t[10],Z=void 0===t[11]?Z:Number(t[11]),R.enable=void 0!==t[12]&&e(t[12]),W=void 0===t[13]?W:t[13],G=void 0===t[14]?G:t[14],D=void 0===t[15]?D:e(t[15]),b=void 0===t[16]?b:Number(t[16]),w=void 0===t[17]?w:Number(t[17]),M=void 0===t[18]?M:e(t[18]),t[19],X=t[20]||X,q=void 0===t[21]?q:Number(t[21])}(),function(){function e(){const e=window.iframeResizer||window.iFrameResizer;_=e?.onMessage||_,ee=e?.onReady||ee,"number"==typeof e?.offset&&(M&&(b=e?.offset),A&&(w=e?.offset)),J=e?.targetOrigin||J,k=e?.heightCalculationMethod||k,G=e?.widthCalculationMethod||G}function t(e,t){return"function"==typeof e&&(c[t]=e,e="custom"),e}if(1===q)return;"iFrameResizer"in window&&Object===window.iFrameResizer.constructor&&(e(),k=t(k,"height"),G=t(G,"width"))}(),function(){void 0===j&&(j=`${$}px`);se("margin",function(e,t){t.includes("-")&&(re(`Negative CSS value ignored for ${e}`),t="");return t}("margin",j))}(),se("background",S),se("padding",O),function(){const e=document.createElement("div");e.style.clear="both",e.style.display="block",e.style.height="0",document.body.append(e)}(),function(){const e=e=>e.style.setProperty("height","auto","important");e(document.documentElement),e(document.body)}(),q<0?le(`${a(q+2)}${a(2)}`):X.codePointAt(0)>4||q<2&&le(a(3)),function(){if(!X||""===X||"false"===X)return void ae("Legacy version detected on parent page\n\nDetected legacy version of parent page script. It is recommended to update the parent page to use @iframe-resizer/parent.\n\nSee https://iframe-resizer.com/setup/ for more details.\n");X!==e&&ae(`Version mismatch\n\nThe parent and child pages are running different versions of iframe resizer.\n\nParent page: ${X} - Child page: ${e}.\n`)}(),pe(),he(),function(){let e=!1;const t=t=>document.querySelectorAll(`[${t}]`).forEach((o=>{e=!0,o.removeAttribute(t),o.setAttribute(n,null)}));t("data-iframe-height"),t("data-iframe-width"),e&&ae("Deprecated Attributes\n \nThe data-iframe-height and data-iframe-width attributes have been deprecated and replaced with the single data-iframe-size attribute. Use of the old attributes will be removed in a future version of iframe-resizer.")}(),document.querySelectorAll(`[${n}]`).length>0&&("auto"===k&&(k="autoOverflow"),"auto"===G&&(G="autoOverflow")),me(),function(){if(1===q)return;K.parentIframe=Object.freeze({autoResize:e=>(!0===e&&!1===z?(z=!0,ye()):!1===e&&!0===z&&(z=!1,de("remove"),F?.disconnect(),E?.disconnect()),qe(0,0,"autoResize",JSON.stringify(z)),z),close(){qe(0,0,"close")},getId:()=>H,getPageInfo(e){if("function"==typeof e)return te=e,qe(0,0,"pageInfo"),void ae("Deprecated Method\n \nThe getPageInfo() method has been deprecated and replaced with getParentProperties(). Use of this method will be removed in a future version of iframe-resizer.\n");te=null,qe(0,0,"pageInfoStop")},getParentProperties(e){if("function"!=typeof e)throw new TypeError("parentIFrame.getParentProperties(callback) callback not a function");return ne=e,qe(0,0,"parentInfo"),()=>{ne=null,qe(0,0,"parentInfoStop")}},moveToAnchor(e){R.findTarget(e)},reset(){Le()},scrollTo(e,t){qe(t,e,"scrollTo")},scrollToOffset(e,t){qe(t,e,"scrollToOffset")},sendMessage(e,t){qe(0,0,"message",JSON.stringify(e),t)},setHeightCalculationMethod(e){k=e,pe()},setWidthCalculationMethod(e){G=e,he()},setTargetOrigin(e){J=e},resize(e,t){Ne("size",`parentIFrame.size(${`${e||""}${t?`,${t}`:""}`})`,e,t)},size(e,t){ae("Deprecated Method\n \nThe size() method has been deprecated and replaced with resize(). Use of this method will be removed in a future version of iframe-resizer.\n"),this.resize(e,t)}}),K.parentIFrame=K.parentIframe}(),function(){if(!0!==D)return;function e(e){qe(0,0,e.type,`${e.screenY}:${e.screenX}`)}function t(t,n){o(window.document,t,e)}t("mouseenter"),t("mouseleave")}(),ye(),R=function(){const e=()=>({x:document.documentElement.scrollLeft,y:document.documentElement.scrollTop});function n(n){const o=n.getBoundingClientRect(),i=e();return{x:parseInt(o.left,t)+parseInt(i.x,t),y:parseInt(o.top,t)+parseInt(i.y,t)}}function i(e){function t(e){const t=n(e);qe(t.y,t.x,"scrollToOffset")}const o=e.split("#")[1]||e,i=decodeURIComponent(o),r=document.getElementById(i)||document.getElementsByName(i)[0];void 0===r?qe(0,0,"inPageLink",`#${o}`):t(r)}function r(){const{hash:e,href:t}=window.location;""!==e&&"#"!==e&&i(t)}function a(){function e(e){function t(e){e.preventDefault(),i(this.getAttribute("href"))}"#"!==e.getAttribute("href")&&o(e,"click",t)}document.querySelectorAll('a[href^="#"]').forEach(e)}function l(){o(window,"hashchange",r)}function c(){setTimeout(r,u)}function s(){a(),l(),c()}R.enable&&(1===q?ae("In page linking requires a Professional or Business license. Please see https://iframe-resizer.com/pricing for more details."):s());return{findTarget:i}}(),Ne("init","Init message from host page",void 0,void 0,e),ee(),B=!1}function se(e,t){void 0!==t&&""!==t&&"null"!==t&&document.body.style.setProperty(e,t)}function ue(e){({add(t){function n(){Ne(e.eventName,e.eventType)}d[t]=n,o(window,t,n,{passive:!0})},remove(e){const t=d[e];delete d[e],i(window,e,t)}})[e.method](e.eventName)}function de(e){ue({method:e,eventType:"After Print",eventName:"afterprint"}),ue({method:e,eventType:"Before Print",eventName:"beforeprint"}),ue({method:e,eventType:"Ready State Change",eventName:"readystatechange"})}function me(){const e=document.querySelectorAll(`[${n}]`);T=e.length>0,C=T?e:Oe(document)()}function fe(e,t,n,o){return t!==e&&(e in n||(re(`${e} is not a valid option for ${o}CalculationMethod.`),e=t),e in s&&ae(`Deprecated ${o}CalculationMethod (${e})\n\nThis version of iframe-resizer can auto detect the most suitable ${o} calculation method. It is recommended that you remove this option.`)),e}function pe(){k=fe(k,f,Ie,"height")}function he(){G=fe(G,v,ke,"width")}function ye(){!0===z&&(de("add"),E=function(){function e(e){e.forEach($e),me()}function t(){const t=new window.MutationObserver(e),n=document.querySelector("body"),o={attributes:!1,attributeOldValue:!1,characterData:!1,characterDataOldValue:!1,childList:!0,subtree:!0};return t.observe(n,o),t}const n=t();return{disconnect(){n.disconnect()}}}(),F=new ResizeObserver(ve),Se(window.document))}let ge;function ve(e){if(!Array.isArray(e)||0===e.length)return;const t=e[0].target;ge=()=>Ne("resizeObserver",`Resize Observed: ${function(e){switch(!0){case!oe(e):return"";case oe(e.id):return`${e.nodeName.toUpperCase()}#${e.id}`;case oe(e.name):return`${e.nodeName.toUpperCase()} (${e.name})`;default:return e.nodeName.toUpperCase()+(oe(e.className)?`.${e.className}`:"")}}(t)}`),setTimeout((()=>{ge&&ge(),ge=void 0}),0)}const be=e=>{const t=getComputedStyle(e);return""!==t?.position&&"static"!==t?.position},we=()=>[...Oe(document)()].filter(be);function ze(e){e&&F.observe(e)}function Se(e){[...we(),...g.flatMap((t=>e.querySelector(t)))].forEach(ze)}function $e(e){"childList"===e.type&&Se(e.target)}function je(e){const t=(n=e).charAt(0).toUpperCase()+n.slice(1);var n;let o,i=0,r=C.length,a=0,c=performance.now();C.forEach((t=>{T||!m||t.checkVisibility(l)?(i=t.getBoundingClientRect()[e]+parseFloat(getComputedStyle(t).getPropertyValue(`margin-${e}`)),i>a&&(a=i,o=t)):r-=1})),c=performance.now()-c;const s=`\nParsed ${r} element${r=""} in ${c.toPrecision(3)}ms\n${t} ${T?"tagged ":""}element found at: ${a}px\nPosition calculated from HTML element: ${function(e){const t=e?.outerHTML?.toString();return t?t.length<30?t:`${t.slice(0,30).replaceAll("\n"," ")}...`:e}(o)}`;return c<1.1||B||T||ae(`Performance Warning\n\nCalculating the page size took an excessive amount of time. To improve performance add the data-iframe-size attribute to the ${e} most element on the page.\n${s}`),a}const Ee=e=>[e.bodyOffset(),e.bodyScroll(),e.documentElementOffset(),e.documentElementScroll(),e.documentElementBoundingClientRect()],Oe=e=>()=>e.querySelectorAll("* :not(head):not(meta):not(base):not(title):not(script):not(link):not(style):not(map):not(area):not(option):not(optgroup):not(template):not(track):not(wbr):not(nobr)");let Me=!1;function Ae({ceilBoundingSize:e,dimension:t,getDimension:n,isHeight:o,scrollSize:i}){if(!Me)return Me=!0,n.taggedElement();const r=o?"bottom":"right";return ae(`Detected content overflowing html element\n \nThis causes iframe-resizer to fall back to checking the position of every element on the page in order to calculate the correct dimensions of the iframe. Inspecting the size, ${r} margin, and position of every visible HTML element will have a performance impact on more complex pages. \n\nTo fix this issue, and remove this warning, you can either ensure the content of the page does not overflow the element or alternatively you can add the attribute data-iframe-size to the elements on the page that you want iframe-resizer to use when calculating the dimensions of the iframe. \n \nWhen present the ${r} margin of the ${o?"lowest":"right most"} element with a data-iframe-size attribute will be used to set the ${t} of the iframe.\n \n(Page size: ${i} > document size: ${e})`),o?k="autoOverflow":G="autoOverflow",n.taggedElement()}const Ce={height:0,width:0},Pe={height:0,width:0};function Te(e,t){function n(){return Pe[i]=r,Ce[i]=c,r}const o=e===Ie,i=o?"height":"width",r=e.documentElementBoundingClientRect(),a=Math.ceil(r),l=Math.floor(r),c=(e=>e.documentElementScroll()+Math.max(0,e.getOffset()))(e);switch(!0){case!e.enabled():return c;case!t&&0===Pe[i]&&0===Ce[i]:if(e.taggedElement(!0)<=a)return n();break;case Q&&r===Pe[i]&&c===Ce[i]:return Math.max(r,c);case 0===r:return c;case!t&&r!==Pe[i]&&c<=Ce[i]:return n();case!o:return t?e.taggedElement():Ae({ceilBoundingSize:a,dimension:i,getDimension:e,isHeight:o,scrollSize:c});case!t&&rc:return n();case!t:return Ae({ceilBoundingSize:a,dimension:i,getDimension:e,isHeight:o,scrollSize:c})}return Math.max(e.taggedElement(),n())}const Ie={enabled:()=>M,getOffset:()=>b,type:"height",auto:()=>Te(Ie,!1),autoOverflow:()=>Te(Ie,!0),bodyOffset:()=>{const{body:e}=document,n=getComputedStyle(e);return e.offsetHeight+parseInt(n.marginTop,t)+parseInt(n.marginBottom,t)},bodyScroll:()=>document.body.scrollHeight,offset:()=>Ie.bodyOffset(),custom:()=>c.height(),documentElementOffset:()=>document.documentElement.offsetHeight,documentElementScroll:()=>document.documentElement.scrollHeight,documentElementBoundingClientRect:()=>document.documentElement.getBoundingClientRect().bottom,max:()=>Math.max(...Ee(Ie)),min:()=>Math.min(...Ee(Ie)),grow:()=>Ie.max(),lowestElement:()=>je("bottom"),taggedElement:()=>je("bottom")},ke={enabled:()=>A,getOffset:()=>w,type:"width",auto:()=>Te(ke,!1),autoOverflow:()=>Te(ke,!0),bodyScroll:()=>document.body.scrollWidth,bodyOffset:()=>document.body.offsetWidth,custom:()=>c.width(),documentElementScroll:()=>document.documentElement.scrollWidth,documentElementOffset:()=>document.documentElement.offsetWidth,documentElementBoundingClientRect:()=>document.documentElement.getBoundingClientRect().right,max:()=>Math.max(...Ee(ke)),min:()=>Math.min(...Ee(ke)),rightMostElement:()=>je("right"),scroll:()=>Math.max(ke.bodyScroll(),ke.documentElementScroll()),taggedElement:()=>je("right")};function xe(e,t,n,o,i){let r,a;!function(){const e=(e,t)=>!(Math.abs(e-t)<=Z);return r=void 0===n?Ie[k]():n,a=void 0===o?ke[G]():o,M&&e(I,r)||A&&e(Y,a)}()&&"init"!==e?!(e in{init:1,size:1})&&(M&&k in y||A&&G in y)&&Le():(Re(),I=r,Y=a,qe(I,Y,e,i))}function Ne(e,t,n,o,i){document.hidden||xe(e,0,n,o,i)}function Re(){Q||(Q=!0,requestAnimationFrame((()=>{Q=!1})))}function Be(e){I=Ie[k](),Y=ke[G](),qe(I,Y,e)}function Le(e){const t=k;k=f,Re(),Be("reset"),k=t}function qe(e,t,n,o,i){q<0||(void 0!==i||(i=J),function(){const r=`${H}:${`${e+(b||0)}:${t+(w||0)}`}:${n}${void 0===o?"":`:${o}`}`;U?window.parent.iframeParentListener(p+r):V.postMessage(p+r,i)}())}function De(e){const t={init:function(){N=e.data,V=e.source,ce(),P=!1,setTimeout((()=>{x=!1}),u)},reset(){x||Be("resetPage")},resize(){Ne("resizeParent")},moveToAnchor(){R.findTarget(o())},inPageLink(){this.moveToAnchor()},pageInfo(){const e=o();te?te(JSON.parse(e)):qe(0,0,"pageInfoStop")},parentInfo(){const e=o();ne?ne(Object.freeze(JSON.parse(e))):qe(0,0,"parentInfoStop")},message(){const e=o();_(JSON.parse(e))}},n=()=>e.data.split("]")[1].split(":")[0],o=()=>e.data.slice(e.data.indexOf(":")+1),i=()=>"iframeResize"in window||void 0!==window.jQuery&&""in window.jQuery.prototype,r=()=>e.data.split(":")[2]in{true:1,false:1};p===`${e.data}`.slice(0,h)&&(!1!==P?r()&&t.init():function(){const o=n();o in t?t[o]():i()||r()||re(`Unexpected message (${e.data})`)}())}function He(){"loading"!==document.readyState&&window.parent.postMessage("[iFrameResizerChild]Ready","*")}function We(e){return De(e),K}"undefined"!=typeof window&&(window.iframeChildListener=e=>De({data:e,sameDomain:!0}),o(window,"message",De),o(window,"readystatechange",He),He());try{top?.document?.getElementById("banner")&&(K={},window.mockMsgListener=We,i(window,"message",De),define([],(()=>We)))}catch(e){}}(); diff --git a/js-dist/js/iframe-resizer.jquery.js b/js-dist/js/iframe-resizer.jquery.js new file mode 100644 index 000000000..feb5adb12 --- /dev/null +++ b/js-dist/js/iframe-resizer.jquery.js @@ -0,0 +1,20 @@ +/*! + * @preserve + * + * @module iframe-resizer/jquery 5.0.2 (iife) + * + * @license GPL-3.0 for non-commercial use only. + * For commercial use, you must purchase a license from + * https://iframe-resizer.com/pricing + * + * @desciption Keep same and cross domain iFrames sized to their content + * + * @author David J. Bradshaw + * + * @see {@link https://iframe-resizer.com} + * + * @copyright (c) 2013 - 2024, David J. Bradshaw. All rights reserved. + */ + + +!function(){"use strict";const e="5.0.2",i="[iFrameSizer]",t=i.length,n=Object.freeze({max:1,scroll:1,bodyScroll:1,documentElementScroll:1}),o=(e,i,t,n)=>e.addEventListener(i,t,n||!1),r=(e,i,t)=>e.removeEventListener(i,t,!1);const a="[iframe-resizer]";const s=e=>`${a}[${function(e){return window.top===window.self?`Parent page: ${e}`:window?.parentIFrame?.getId?`${window.parentIFrame.getId()}: ${e}`:`Nested parent page: ${e}`}(e)}]`,l=(e,i,...t)=>window?.console[e](s(i),...t),c=(e,...i)=>l("warn",e,...i),d=(e,i)=>console?.warn((e=>i=>window.chrome?e(i.replaceAll("
","\n").replaceAll("","").replaceAll("","").replaceAll("","").replaceAll("","").replaceAll("","")):e(i.replaceAll("
","\n").replaceAll(/<[/a-z]+>/gi,"")))((e=>(...i)=>[`${a}[${e}]`,...i].join(" "))(e))(i)),u=e=>{if(!e)return"";let i=-559038744,t=1103547984;for(let n,o=0;o>>15,1935289751),t^=Math.imul(t^i>>>15,3405138345),i^=t>>>16,t^=i>>>16,(2097152*(t>>>0)+(i>>>11)).toString(36)},f=e=>e.replaceAll(/[A-Za-z]/g,(e=>String.fromCodePoint((e<="Z"?90:122)>=(e=e.codePointAt(0)+19)?e:e-26))),p=["Puchspk Spjluzl Rlf","Tpzzpun Spjluzl Rlf","Aopz spiyhyf pz hchpshisl dpao ivao Jvttlyjphs huk Vwlu-Zvbyjl spjluzlz.Jvttlyjphs SpjluzlMvy jvttlyjphs bzl,

pmyhtl-ylzpgly ylxbpylz h svd jvza vul aptl spjluzl mll. Mvy tvyl pumvythapvu cpzpa oaawz://pmyhtl-ylzpgly.jvt/wypjpun.Vwlu Zvbyjl SpjluzlPm 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 spjluzl rlf pu

pmyhtl-ylzpgly vwapvuz av NWSc3.Mvy tvyl pumvythapvu wslhzl zll: oaawz://pmyhtl-ylzpgly.jvt/nws","NWSc3 Spjluzl ClyzpvuAopz clyzpvu vm

pmyhtl-ylzpgly pz ilpun bzlk bukly aol alytz vm aol NWS C3 spjluzl. Aopz spjluzl hssvdz fvb av bzl

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.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.Mvy tvyl pumvythapvu cpzpa oaawz://pmyhtl-ylzpgly.jvt/wypjpun."],h=["NWSc3","zvsv","wyv","ibzpulzz","vlt"],m=Object.fromEntries(["2cgs7fdf4xb","1c9ctcccr4z","1q2pc4eebgb","ueokt0969w","w2zxchhgqz","1umuxblj2e5"].map(((e,i)=>[e,Math.max(0,i-1)]))),y=e=>f(p[e]);var g=e=>{const i=e[f("spjluzl")];if(!i)return-1;const t=i.split("-");let n=function(e=""){let i=-2;const t=u(f(e));return t in m&&(i=m[t]),i}(t[0]);return 0===n||(e=>e[2]===u(e[0]+e[1]))(t)||(n=-2),n};var w={};var b=Object.freeze({autoResize:!0,bodyBackground:null,bodyMargin:null,bodyPadding:null,checkOrigin:!0,direction:"vertical",inPageLinks:!1,heightCalculationMethod:"auto",id:"iFrameResizer",log:!1,license:void 0,mouseEvents:!0,offsetHeight:null,offsetWidth:null,postMessageTarget:null,sameDomain:!1,scrolling:!1,sizeHeight:!0,sizeWidth:!1,warningTimeout:5e3,tolerance:0,widthCalculationMethod:"auto",onClose:()=>!0,onClosed(){},onInit:!1,onMessage:null,onMouseEnter(){},onMouseLeave(){},onReady:e=>{"function"==typeof w[e.id].onInit&&(d(e.id,"\nDeprecated Option\n\nThe onInit() function is deprecated and has been replaced with onReady(). It will be removed in a future version of iFrame Resizer.\n "),w[e.id].onInit(e))},onResized(){},onScroll:()=>!0}),v={position:null,version:e};function z(n){function a(){S(L),M(),A("onResized",L)}function s(e){if("border-box"!==e.boxSizing)return 0;return(e.paddingTop?parseInt(e.paddingTop,10):0)+(e.paddingBottom?parseInt(e.paddingBottom,10):0)}function l(e){if("border-box"!==e.boxSizing)return 0;return(e.borderTopWidth?parseInt(e.borderTopWidth,10):0)+(e.borderBottomWidth?parseInt(e.borderBottomWidth,10):0)}function u(e){return H.slice(H.indexOf(":")+7+e)}const f=(e,i)=>(t,n)=>{const o={};var r,a;r=function(){x(`Send ${e} (${t})`,`${e}:${i()}`,n)},o[a=n]||(r(),o[a]=requestAnimationFrame((()=>{o[a]=null})))},p=(e,i)=>()=>{const t=i=>()=>{w[s]?e(i,s):a()};function n(e,i){i(window,"scroll",t("scroll")),i(window,"resize",t("resize window"))}function a(){n(0,r),l.disconnect(),c.disconnect()}const s=P,l=new ResizeObserver(t("page observed")),c=new ResizeObserver(t("iframe observed"));n(0,o),l.observe(document.body,{attributes:!0,childList:!0,subtree:!0}),c.observe(w[s].iframe,{attributes:!0,childList:!1,subtree:!1}),w[s]&&(w[s][`stop${i}`]=a)},h=e=>()=>{e in w[P]&&(w[P][e](),delete w[P][e])},m=f("pageInfo",(function(){const e=document.body.getBoundingClientRect(),i=L.iframe.getBoundingClientRect(),{scrollY:t,scrollX:n,innerHeight:o,innerWidth:r}=window,{clientHeight:a,clientWidth:s}=document.documentElement;return JSON.stringify({iframeHeight:i.height,iframeWidth:i.width,clientHeight:Math.max(a,o||0),clientWidth:Math.max(s,r||0),offsetTop:parseInt(i.top-e.top,10),offsetLeft:parseInt(i.left-e.left,10),scrollTop:t,scrollLeft:n,documentHeight:a,documentWidth:s,windowHeight:o,windowWidth:r})})),y=f("parentInfo",(function(){const{iframe:e}=L,{scrollWidth:i,scrollHeight:t}=document.documentElement,{width:n,height:o,offsetLeft:r,offsetTop:a,pageLeft:s,pageTop:l,scale:c}=window.visualViewport;return JSON.stringify({iframe:e.getBoundingClientRect(),document:{scrollWidth:i,scrollHeight:t},viewport:{width:n,height:o,offsetLeft:r,offsetTop:a,pageLeft:s,pageTop:l,scale:c}})})),g=p(m,"PageInfo"),b=p(y,"ParentInfo"),z=h("stopPageInfo"),k=h("stopParentInfo");function N(e){const i=e.getBoundingClientRect();return T(),{x:Number(i.left)+Number(v.position.x),y:Number(i.top)+Number(v.position.y)}}function F(e){const i=e?N(L.iframe):{x:0,y:0};let t=((e,i)=>({x:e.width+i.x,y:e.height+i.y}))(L,i);window.top===window.self?(v.position=t,O(P)):window.parentIFrame?window.parentIFrame["scrollTo"+(e?"Offset":"")](t.x,t.y):c(P,"Unable to scroll to requested position, window.parentIFrame not found")}function O(e){const{x:i,y:t}=v.position,n=w[e]?.iframe;!1!==A("onScroll",{iframe:n,top:t,left:i,x:i,y:t})?M():$()}function C(e){let i={};if(0===L.width&&0===L.height){const e=u(9).split(":");i={x:e[1],y:e[0]}}else i={x:L.width,y:L.height};A(e,{iframe:L.iframe,screenX:Number(i.x),screenY:Number(i.y),type:L.type})}const A=(e,i)=>j(P,e,i);let H=n.data,L={},P=null;"[iFrameResizerChild]Ready"!==H?i===`${H}`.slice(0,t)&&H.slice(t).split(":")[0]in w&&(L=function(){const e=H.slice(t).split(":"),i=e[1]?Number(e[1]):0,n=w[e[0]]?.iframe,o=getComputedStyle(n);return{iframe:n,id:e[0],height:i+s(o)+l(o),width:Number(e[2]),type:e[3],version:e[4]}}(),P=L.id,P?(function(e){if(!w[e])throw new Error(`${L.type} No settings for ${e}. Message was: ${H}`)}(P),L.type in{true:1,false:1,undefined:1}||(w[P].loaded=!0,function(){let e=!0;return null===L.iframe&&(c(P,`The iframe (${L.id}) was not found.`),e=!1),e}()&&function(){const{origin:e,sameDomain:i}=n;if(i)return!0;let t=w[P]?.checkOrigin;if(t&&"null"!=`${e}`&&!(t.constructor===Array?function(){let i=0,n=!1;for(;iLegacy version detected in iframe\n\nDetected legacy version of child page script. It is recommended to update the page in the iframe to use @iframe-resizer/child.\n\nSee https://iframe-resizer.com/setup/#child-page-setup for more details.\n")),E=!0,A("onReady",L.iframe);break;default:if(0===L.width&&0===L.height)return void c(`Unsupported message received (${L.type}), this is likely due to the iframe containing a later version of iframe-resizer than the parent page`);if(0===L.width||0===L.height)return;if(document.hidden)return;a()}var i,t}())):c("iframeResizer received messageData without id, message was: ",H)):Object.keys(w).forEach((e=>{w[e].mode>=0&&x("iFrame requested init",W(e),e)}))}function j(e,i,t){let n=null,o=null;if(w[e]){if(n=w[e][i],"function"!=typeof n)throw new TypeError(`${i} on iFrame[${e}] is not a function`);o=n(t)}return o}function k(e){const i=e.id;delete w[i]}function R(e){const i=e.id;if(!1!==j(i,"onClose",i)){try{e.parentNode&&e.remove()}catch(e){c(e)}j(i,"onClosed",i),k(e)}}function T(e){null===v.position&&(v.position={x:window.scrollX,y:window.scrollY})}function $(){v.position=null}function M(e){null!==v.position&&(window.scrollTo(v.position.x,v.position.y),$())}function I(e){T(e.id),S(e),x("reset","reset",e.id)}function S(e){const i=e.id;function t(i){const t=`${e[i]}px`;e.iframe.style[i]=t}w[i].sizeHeight&&t("height"),w[i].sizeWidth&&t("width")}function x(e,t,n,o){w[n]&&(w[n]?.postMessageTarget?function(){const{postMessageTarget:e,targetOrigin:o}=w[n];if(w[n].sameDomain)try{return void w[n].iframe.contentWindow.iframeChildListener(i+t)}catch(e){w[n].sameDomain=!1}e.postMessage(i+t,o)}():c(n,`[${e}] IFrame(${n}) not found`),o&&w[n]?.warningTimeout&&(w[n].msgTimeout=setTimeout((function(){void 0!==w[n]&&(w[n].loaded||w[n].loadErrorShown||(w[n].loadErrorShown=!0,d(n,`\nNo response from iFrame\n \nThe iframe (${n}) has not responded within ${w[n].warningTimeout/1e3} seconds. Check @iframe-resizer/child package has been loaded in the iframe.\n\nThis 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.\n`)))}),w[n].warningTimeout)))}function W(e){const i=w[e];return[e,"8",i.sizeWidth,i.log,"32",!0,i.autoResize,i.bodyMargin,i.heightCalculationMethod,i.bodyBackground,i.bodyPadding,i.tolerance,i.inPageLinks,"child",i.widthCalculationMethod,i.mouseEvents,i.offsetHeight,i.offsetWidth,i.sizeHeight,i.license,v.version,i.mode].join(":")}let N=0,E=!1,F=!1;var O=i=>t=>{function r(e){if(!e)return{};if("object"!=typeof e)throw new TypeError("Options is not an object");return("sizeWidth"in e||"sizeHeight"in e||"autoResize"in e)&&d(a,'Deprecated Option\n\nThe sizeWidth, sizeHeight and autoResize options have been replaced with new direction option which expects values of "vertical", "horizontal" or "horizontal".\n'),e}const a=function(e){if(e&&"string"!=typeof e)throw new TypeError("Invalid id for iFrame. Expected String");return""!==e&&e||(t.id=e=function(){let e=i?.id||b.id+N++;return null!==document.getElementById(e)&&(e+=N++),e}(),(i||{}).log),e}(t.id);return a in w&&"iFrameResizer"in t?c(a,"Ignored iFrame, already setup."):(function(e){var i,n;w[a]={iframe:t,firstRun:!0,remoteHost:t?.src.split("/").slice(0,3).join("/"),...b,...r(e),mode:g(e)},function(){if("horizontal"===w[a].direction)return w[a].sizeWidth=!0,void(w[a].sizeHeight=!1);if("none"===w[a].direction)return w[a].sizeWidth=!1,w[a].sizeHeight=!1,void(w[a].autoResize=!1);if("vertical"!==w[a].direction)throw new TypeError(a,`Direction value of "${w[a].direction}" is not valid`)}(),i=e?.offset,i&&("vertical"===w[a].direction?w[a].offsetHeight=i:w[a].offsetWidth=i),null===w[a].postMessageTarget&&(w[a].postMessageTarget=t.contentWindow),w[a].targetOrigin=!0===w[a].checkOrigin?""===(n=w[a].remoteHost)||null!==n.match(/^(about:blank|javascript:|file:\/\/)/)?"*":n:"*"}(i),function(){const{mode:i}=w[a];i<0&&d("Parent",`${y(i+2)}${y(2)}`),F||i<0||(F=!0,((e,...i)=>{l("info",e,...i)})(`v${e} (${(e=>f(h[e]))(i)})`),i<1&&d("Parent",y(3)))}(),A(),function(){switch(t.style.overflow=!1===w[a]?.scrolling?"hidden":"auto",w[a]?.scrolling){case"omit":break;case!0:t.scrolling="yes";break;case!1:t.scrolling="no";break;default:t.scrolling=w[a]?w[a].scrolling:"no"}}(),function(){const{bodyMargin:e}=w[a];"number"!=typeof e&&"0"!==e||(w[a].bodyMargin=`${e}px`)}(),function(e){const{id:i}=t;w[a].mode>=0&&(o(t,"load",(function(){x("iFrame.onload",`${e}:${E}`,i,!0),function(){const e=w[a]?.firstRun,i=w[a]?.heightCalculationMethod in n;!e&&i&&I({iframe:t,height:0,width:0,type:"init"})}()})),x("init",`${e}:${E}`,i,!0))}(W(a)),function(){if(w[a]){const e={close:R.bind(null,w[a].iframe),disconnect:k.bind(null,w[a].iframe),removeListeners(){d(a,"\nDeprecated Method Name\n\nThe emoveListeners() method has been renamed to isconnect().\n"),this.disconnect()},resize:x.bind(null,"Window resize","resize",a),moveToAnchor(e){x("Move to anchor",`moveToAnchor:${e}`,a)},sendMessage(e){x("Send Message",`message:${e=JSON.stringify(e)}`,a)}};w[a].iframe.iframeResizer=e,w[a].iframe.iFrameResizer=e}}()),t?.iFrameResizer};function C(){!1===document.hidden&&function(e,i){const t=e=>w[e]?.autoResize&&!w[e]?.firstRun;Object.keys(w).forEach((function(n){t(n)&&x(e,i,n)}))}("Tab Visible","resize")}const A=(e=>{let i=!1;return function(){return i?void 0:(i=!0,Reflect.apply(e,this,arguments))}})((()=>{o(window,"message",z),o(document,"visibilitychange",C),window.iframeParentListener=e=>z({data:e,sameDomain:!0})}));switch(!0){case void 0===window.jQuery:c("","Unable to bind to jQuery, it is not available.");break;case!window.jQuery.fn:c("","Unable to bind to jQuery, it is not fully loaded.");break;case window.jQuery.fn.iframeResize:c("","iframeResize is already assigned to jQuery.fn.");break;default:window.jQuery.fn.iframeResize=function(e){const i=O(e);return this.filter("iframe").each(i).end()},window.jQuery.fn.iFrameResize=function(e){return c("","Deprecated: Use the iframeResize method instead of iFrameResize"),this.iframeResize(e)}}}(); diff --git a/js-dist/js/iframe-resizer.parent.js b/js-dist/js/iframe-resizer.parent.js new file mode 100644 index 000000000..c5bcbb827 --- /dev/null +++ b/js-dist/js/iframe-resizer.parent.js @@ -0,0 +1,20 @@ +/*! + * @preserve + * + * @module iframe-resizer/parent 5.0.2 (iife) + * + * @license GPL-3.0 for non-commercial use only. + * For commercial use, you must purchase a license from + * https://iframe-resizer.com/pricing + * + * @desciption Keep same and cross domain iFrames sized to their content + * + * @author David J. Bradshaw + * + * @see {@link https://iframe-resizer.com} + * + * @copyright (c) 2013 - 2024, David J. Bradshaw. All rights reserved. + */ + + +!function(){"use strict";const e="[iframe-resizer]";const t=t=>`${e}[${function(e){return window.top===window.self?`Parent page: ${e}`:window?.parentIFrame?.getId?`${window.parentIFrame.getId()}: ${e}`:`Nested parent page: ${e}`}(t)}]`,i=(e,i,...n)=>window?.console[e](t(i),...n),n=(e,...t)=>i("warn",e,...t),o=(t,i)=>console?.warn((e=>t=>window.chrome?e(t.replaceAll("
","\n").replaceAll("","").replaceAll("","").replaceAll("","").replaceAll("","").replaceAll("","")):e(t.replaceAll("
","\n").replaceAll(/<[/a-z]+>/gi,"")))((t=>(...i)=>[`${e}[${t}]`,...i].join(" "))(t))(i)),r="5.0.2",a="[iFrameSizer]",s=a.length,l=Object.freeze({max:1,scroll:1,bodyScroll:1,documentElementScroll:1}),c=(e,t,i,n)=>e.addEventListener(t,i,n||!1),d=(e,t,i)=>e.removeEventListener(t,i,!1),u=e=>{if(!e)return"";let t=-559038744,i=1103547984;for(let n,o=0;o>>15,1935289751),i^=Math.imul(i^t>>>15,3405138345),t^=i>>>16,i^=t>>>16,(2097152*(i>>>0)+(t>>>11)).toString(36)},f=e=>e.replaceAll(/[A-Za-z]/g,(e=>String.fromCodePoint((e<="Z"?90:122)>=(e=e.codePointAt(0)+19)?e:e-26))),p=["Puchspk Spjluzl Rlf","Tpzzpun Spjluzl Rlf","Aopz spiyhyf pz hchpshisl dpao ivao Jvttlyjphs huk Vwlu-Zvbyjl spjluzlz.Jvttlyjphs SpjluzlMvy jvttlyjphs bzl,

pmyhtl-ylzpgly ylxbpylz h svd jvza vul aptl spjluzl mll. Mvy tvyl pumvythapvu cpzpa oaawz://pmyhtl-ylzpgly.jvt/wypjpun.Vwlu Zvbyjl SpjluzlPm 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 spjluzl rlf pu

pmyhtl-ylzpgly vwapvuz av NWSc3.Mvy tvyl pumvythapvu wslhzl zll: oaawz://pmyhtl-ylzpgly.jvt/nws","NWSc3 Spjluzl ClyzpvuAopz clyzpvu vm

pmyhtl-ylzpgly pz ilpun bzlk bukly aol alytz vm aol NWS C3 spjluzl. Aopz spjluzl hssvdz fvb av bzl

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.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.Mvy tvyl pumvythapvu cpzpa oaawz://pmyhtl-ylzpgly.jvt/wypjpun."],m=["NWSc3","zvsv","wyv","ibzpulzz","vlt"],h=Object.fromEntries(["2cgs7fdf4xb","1c9ctcccr4z","1q2pc4eebgb","ueokt0969w","w2zxchhgqz","1umuxblj2e5"].map(((e,t)=>[e,Math.max(0,t-1)]))),y=e=>f(p[e]);var g=e=>{const t=e[f("spjluzl")];if(!t)return-1;const i=t.split("-");let n=function(e=""){let t=-2;const i=u(f(e));return i in h&&(t=h[i]),t}(i[0]);return 0===n||(e=>e[2]===u(e[0]+e[1]))(i)||(n=-2),n};var w={};var v=Object.freeze({autoResize:!0,bodyBackground:null,bodyMargin:null,bodyPadding:null,checkOrigin:!0,direction:"vertical",inPageLinks:!1,heightCalculationMethod:"auto",id:"iFrameResizer",log:!1,license:void 0,mouseEvents:!0,offsetHeight:null,offsetWidth:null,postMessageTarget:null,sameDomain:!1,scrolling:!1,sizeHeight:!0,sizeWidth:!1,warningTimeout:5e3,tolerance:0,widthCalculationMethod:"auto",onClose:()=>!0,onClosed(){},onInit:!1,onMessage:null,onMouseEnter(){},onMouseLeave(){},onReady:e=>{"function"==typeof w[e.id].onInit&&(o(e.id,"\nDeprecated Option\n\nThe onInit() function is deprecated and has been replaced with onReady(). It will be removed in a future version of iFrame Resizer.\n "),w[e.id].onInit(e))},onResized(){},onScroll:()=>!0}),b={position:null,version:r};function z(e){function t(){x(L),M(),C("onResized",L)}function i(e){if("border-box"!==e.boxSizing)return 0;return(e.paddingTop?parseInt(e.paddingTop,10):0)+(e.paddingBottom?parseInt(e.paddingBottom,10):0)}function l(e){if("border-box"!==e.boxSizing)return 0;return(e.borderTopWidth?parseInt(e.borderTopWidth,10):0)+(e.borderBottomWidth?parseInt(e.borderBottomWidth,10):0)}function u(e){return H.slice(H.indexOf(":")+7+e)}const f=(e,t)=>(i,n)=>{const o={};var r,a;r=function(){S(`Send ${e} (${i})`,`${e}:${t()}`,n)},o[a=n]||(r(),o[a]=requestAnimationFrame((()=>{o[a]=null})))},p=(e,t)=>()=>{const i=t=>()=>{w[r]?e(t,r):o()};function n(e,t){t(window,"scroll",i("scroll")),t(window,"resize",i("resize window"))}function o(){n(0,d),a.disconnect(),s.disconnect()}const r=P,a=new ResizeObserver(i("page observed")),s=new ResizeObserver(i("iframe observed"));n(0,c),a.observe(document.body,{attributes:!0,childList:!0,subtree:!0}),s.observe(w[r].iframe,{attributes:!0,childList:!1,subtree:!1}),w[r]&&(w[r][`stop${t}`]=o)},m=e=>()=>{e in w[P]&&(w[P][e](),delete w[P][e])},h=f("pageInfo",(function(){const e=document.body.getBoundingClientRect(),t=L.iframe.getBoundingClientRect(),{scrollY:i,scrollX:n,innerHeight:o,innerWidth:r}=window,{clientHeight:a,clientWidth:s}=document.documentElement;return JSON.stringify({iframeHeight:t.height,iframeWidth:t.width,clientHeight:Math.max(a,o||0),clientWidth:Math.max(s,r||0),offsetTop:parseInt(t.top-e.top,10),offsetLeft:parseInt(t.left-e.left,10),scrollTop:i,scrollLeft:n,documentHeight:a,documentWidth:s,windowHeight:o,windowWidth:r})})),y=f("parentInfo",(function(){const{iframe:e}=L,{scrollWidth:t,scrollHeight:i}=document.documentElement,{width:n,height:o,offsetLeft:r,offsetTop:a,pageLeft:s,pageTop:l,scale:c}=window.visualViewport;return JSON.stringify({iframe:e.getBoundingClientRect(),document:{scrollWidth:t,scrollHeight:i},viewport:{width:n,height:o,offsetLeft:r,offsetTop:a,pageLeft:s,pageTop:l,scale:c}})})),g=p(h,"PageInfo"),v=p(y,"ParentInfo"),z=m("stopPageInfo"),$=m("stopParentInfo");function W(e){const t=e.getBoundingClientRect();return T(),{x:Number(t.left)+Number(b.position.x),y:Number(t.top)+Number(b.position.y)}}function F(e){const t=e?W(L.iframe):{x:0,y:0};let i=((e,t)=>({x:e.width+t.x,y:e.height+t.y}))(L,t);window.top===window.self?(b.position=i,O(P)):window.parentIFrame?window.parentIFrame["scrollTo"+(e?"Offset":"")](i.x,i.y):n(P,"Unable to scroll to requested position, window.parentIFrame not found")}function O(e){const{x:t,y:i}=b.position,n=w[e]?.iframe;!1!==C("onScroll",{iframe:n,top:i,left:t,x:t,y:i})?M():R()}function A(e){let t={};if(0===L.width&&0===L.height){const e=u(9).split(":");t={x:e[1],y:e[0]}}else t={x:L.width,y:L.height};C(e,{iframe:L.iframe,screenX:Number(t.x),screenY:Number(t.y),type:L.type})}const C=(e,t)=>j(P,e,t);let H=e.data,L={},P=null;"[iFrameResizerChild]Ready"!==H?a===`${H}`.slice(0,s)&&H.slice(s).split(":")[0]in w&&(L=function(){const e=H.slice(s).split(":"),t=e[1]?Number(e[1]):0,n=w[e[0]]?.iframe,o=getComputedStyle(n);return{iframe:n,id:e[0],height:t+i(o)+l(o),width:Number(e[2]),type:e[3],version:e[4]}}(),P=L.id,P?(function(e){if(!w[e])throw new Error(`${L.type} No settings for ${e}. Message was: ${H}`)}(P),L.type in{true:1,false:1,undefined:1}||(w[P].loaded=!0,function(){let e=!0;return null===L.iframe&&(n(P,`The iframe (${L.id}) was not found.`),e=!1),e}()&&function(){const{origin:t,sameDomain:i}=e;if(i)return!0;let n=w[P]?.checkOrigin;if(n&&"null"!=`${t}`&&!(n.constructor===Array?function(){let e=0,i=!1;for(;eLegacy version detected in iframe\n\nDetected legacy version of child page script. It is recommended to update the page in the iframe to use @iframe-resizer/child.\n\nSee https://iframe-resizer.com/setup/#child-page-setup for more details.\n")),N=!0,C("onReady",L.iframe);break;default:if(0===L.width&&0===L.height)return void n(`Unsupported message received (${L.type}), this is likely due to the iframe containing a later version of iframe-resizer than the parent page`);if(0===L.width||0===L.height)return;if(document.hidden)return;t()}var e,i}())):n("iframeResizer received messageData without id, message was: ",H)):Object.keys(w).forEach((e=>{w[e].mode>=0&&S("iFrame requested init",E(e),e)}))}function j(e,t,i){let n=null,o=null;if(w[e]){if(n=w[e][t],"function"!=typeof n)throw new TypeError(`${t} on iFrame[${e}] is not a function`);o=n(i)}return o}function $(e){const t=e.id;delete w[t]}function k(e){const t=e.id;if(!1!==j(t,"onClose",t)){try{e.parentNode&&e.remove()}catch(e){n(e)}j(t,"onClosed",t),$(e)}}function T(e){null===b.position&&(b.position={x:window.scrollX,y:window.scrollY})}function R(){b.position=null}function M(e){null!==b.position&&(window.scrollTo(b.position.x,b.position.y),R())}function I(e){T(e.id),x(e),S("reset","reset",e.id)}function x(e){const t=e.id;function i(t){const i=`${e[t]}px`;e.iframe.style[t]=i}w[t].sizeHeight&&i("height"),w[t].sizeWidth&&i("width")}function S(e,t,i,r){w[i]&&(w[i]?.postMessageTarget?function(){const{postMessageTarget:e,targetOrigin:n}=w[i];if(w[i].sameDomain)try{return void w[i].iframe.contentWindow.iframeChildListener(a+t)}catch(e){w[i].sameDomain=!1}e.postMessage(a+t,n)}():n(i,`[${e}] IFrame(${i}) not found`),r&&w[i]?.warningTimeout&&(w[i].msgTimeout=setTimeout((function(){void 0!==w[i]&&(w[i].loaded||w[i].loadErrorShown||(w[i].loadErrorShown=!0,o(i,`\nNo response from iFrame\n \nThe iframe (${i}) has not responded within ${w[i].warningTimeout/1e3} seconds. Check @iframe-resizer/child package has been loaded in the iframe.\n\nThis 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.\n`)))}),w[i].warningTimeout)))}function E(e){const t=w[e];return[e,"8",t.sizeWidth,t.log,"32",!0,t.autoResize,t.bodyMargin,t.heightCalculationMethod,t.bodyBackground,t.bodyPadding,t.tolerance,t.inPageLinks,"child",t.widthCalculationMethod,t.mouseEvents,t.offsetHeight,t.offsetWidth,t.sizeHeight,t.license,b.version,t.mode].join(":")}let W=0,N=!1,F=!1;var O=e=>t=>{function a(e){if(!e)return{};if("object"!=typeof e)throw new TypeError("Options is not an object");return("sizeWidth"in e||"sizeHeight"in e||"autoResize"in e)&&o(s,'Deprecated Option\n\nThe sizeWidth, sizeHeight and autoResize options have been replaced with new direction option which expects values of "vertical", "horizontal" or "horizontal".\n'),e}const s=function(i){if(i&&"string"!=typeof i)throw new TypeError("Invalid id for iFrame. Expected String");return""!==i&&i||(t.id=i=function(){let t=e?.id||v.id+W++;return null!==document.getElementById(t)&&(t+=W++),t}(),(e||{}).log),i}(t.id);return s in w&&"iFrameResizer"in t?n(s,"Ignored iFrame, already setup."):(function(e){var i,n;w[s]={iframe:t,firstRun:!0,remoteHost:t?.src.split("/").slice(0,3).join("/"),...v,...a(e),mode:g(e)},function(){if("horizontal"===w[s].direction)return w[s].sizeWidth=!0,void(w[s].sizeHeight=!1);if("none"===w[s].direction)return w[s].sizeWidth=!1,w[s].sizeHeight=!1,void(w[s].autoResize=!1);if("vertical"!==w[s].direction)throw new TypeError(s,`Direction value of "${w[s].direction}" is not valid`)}(),i=e?.offset,i&&("vertical"===w[s].direction?w[s].offsetHeight=i:w[s].offsetWidth=i),null===w[s].postMessageTarget&&(w[s].postMessageTarget=t.contentWindow),w[s].targetOrigin=!0===w[s].checkOrigin?""===(n=w[s].remoteHost)||null!==n.match(/^(about:blank|javascript:|file:\/\/)/)?"*":n:"*"}(e),function(){const{mode:e}=w[s];e<0&&o("Parent",`${y(e+2)}${y(2)}`),F||e<0||(F=!0,((e,...t)=>{i("info",e,...t)})(`v${r} (${(e=>f(m[e]))(e)})`),e<1&&o("Parent",y(3)))}(),C(),function(){switch(t.style.overflow=!1===w[s]?.scrolling?"hidden":"auto",w[s]?.scrolling){case"omit":break;case!0:t.scrolling="yes";break;case!1:t.scrolling="no";break;default:t.scrolling=w[s]?w[s].scrolling:"no"}}(),function(){const{bodyMargin:e}=w[s];"number"!=typeof e&&"0"!==e||(w[s].bodyMargin=`${e}px`)}(),function(e){const{id:i}=t;w[s].mode>=0&&(c(t,"load",(function(){S("iFrame.onload",`${e}:${N}`,i,!0),function(){const e=w[s]?.firstRun,i=w[s]?.heightCalculationMethod in l;!e&&i&&I({iframe:t,height:0,width:0,type:"init"})}()})),S("init",`${e}:${N}`,i,!0))}(E(s)),function(){if(w[s]){const e={close:k.bind(null,w[s].iframe),disconnect:$.bind(null,w[s].iframe),removeListeners(){o(s,"\nDeprecated Method Name\n\nThe emoveListeners() method has been renamed to isconnect().\n"),this.disconnect()},resize:S.bind(null,"Window resize","resize",s),moveToAnchor(e){S("Move to anchor",`moveToAnchor:${e}`,s)},sendMessage(e){S("Send Message",`message:${e=JSON.stringify(e)}`,s)}};w[s].iframe.iframeResizer=e,w[s].iframe.iFrameResizer=e}}()),t?.iFrameResizer};function A(){!1===document.hidden&&function(e,t){const i=e=>w[e]?.autoResize&&!w[e]?.firstRun;Object.keys(w).forEach((function(n){i(n)&&S(e,t,n)}))}("Tab Visible","resize")}const C=(e=>{let t=!1;return function(){return t?void 0:(t=!0,Reflect.apply(e,this,arguments))}})((()=>{c(window,"message",z),c(document,"visibilitychange",A),window.iframeParentListener=e=>z({data:e,sameDomain:!0})})),H="[iframeResizer] ";window.iframeResize=function(){function e(e){switch(!0){case!e:throw new TypeError(`${H}iframe is not defined`);case!e.tagName:throw new TypeError(`${H}Not a valid DOM element`);case"IFRAME"!==e.tagName.toUpperCase():throw new TypeError(`${H}Expected