@iframe-resizer/child 5.4.7-beta.3 → 5.4.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -22,4 +22,4 @@ yarn add @iframe-resizer/child
22
22
 
23
23
  ---
24
24
 
25
- _iframe-resizer version 5.4.7-beta.3 2025-06-16 - 12:20:35.267Z_
25
+ _iframe-resizer version 5.4.7 2025-07-08 - 11:34:37.580Z_
package/index.cjs.js CHANGED
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * @preserve
3
3
  *
4
- * @module iframe-resizer/child 5.4.7-beta.3 (cjs) - 2025-06-16
4
+ * @module iframe-resizer/child 5.4.7 (cjs) - 2025-07-08
5
5
  *
6
6
  * @license GPL-3.0 for non-commercial use only.
7
7
  * For commercial use, you must purchase a license from
@@ -17,5 +17,4 @@
17
17
  */
18
18
 
19
19
 
20
- "use strict";const e=require("auto-console-group"),t="5.4.7-beta.3",n=10,o="data-iframe-size",r="data-iframe-overflowed",i="data-iframe-ignore",a="bottom",s="right",l="autoResizeEnabled",c=Symbol("sizeChanged"),d="manualResize",u="parentResize",m={[d]:1,[u]:1},f="setOffsetSize",p="resizeObserver",g="overflowObserver",h="mutationObserver",y="No change in content size detected",b="init",v=(e,t,n,o)=>e.addEventListener(t,n,o||!1),z=["<iy><yi>Puchspk Spjluzl Rlf</><iy><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."];Object.fromEntries(["2cgs7fdf4xb","1c9ctcccr4z","1q2pc4eebgb","ueokt0969w","w2zxchhgqz","1umuxblj2e5"].map(((e,t)=>[e,Math.max(0,t-1)])));const w=e=>(e=>e.replace(/[A-Za-z]/g,(e=>String.fromCodePoint((e<="Z"?90:122)>=(e=e.codePointAt(0)+19)?e:e-26))))(z[e]),I=(e,...t)=>setTimeout((()=>e(...t)),0),$=e=>{let t=!1;return function(){return t?void 0:(t=!0,Reflect.apply(e,this,arguments))}},H=e=>e,S=e=>Math.round(1e3*e)/1e3,O=e=>e.charAt(0).toUpperCase()+e.slice(1),T=e=>""!=`${e}`&&void 0!==e;function M(e){switch(!0){case!T(e):return"";case T(e.id):return`${e.nodeName}#${e.id}`;case T(e.name):return`${e.nodeName} (${e.name}`;case T(e.className):return`${e.nodeName}.${e.className}`;default:return e.nodeName}}const E=(e,t,n)=>{if(typeof e!==t)throw new TypeError(`${n} is not a ${O(t)}`)};let j=!0;var k;const G=(k=e,k?.__esModule?k.default:k)({label:"iframeResizer(child)"});const A=(R="log",(...e)=>!j||G[R](...e));var R;const L=A,{assert:P,debug:C,endAutoGroup:x,error:N,errorBoundary:B,event:q,label:D,purge:F,warn:W}=G,U=e=>{return G.warn((t=H,e=>window.chrome?t(e.replaceAll("<br>","\n").replaceAll("<rb>","").replaceAll("</>","").replaceAll("<b>","").replaceAll("<i>","").replaceAll("<u>","")):t(e.replaceAll("<br>","\n").replaceAll(/<[/a-z]+>/gi,"")))(e));var t},V=U,Z=(e=>(t,n="renamed to")=>(o,r,i="",a="")=>e(a,`<rb>Deprecated ${t}(${o.replace("()","")})</>\n\nThe <b>${o}</> ${t.toLowerCase()} has been ${n} <b>${r}</>. ${i}Use of the old ${t.toLowerCase()} will be removed in a future version of <i>iframe-resizer</>.`))(((e,t)=>U(t))),J=Z("Method"),_=Z("Method","replaced with"),Q=Z("Option"),X=e=>t=>void 0===t?void 0:e(t),Y=X((e=>"true"===e)),K=X(Number),ee="--ifr-start",te="--ifr-end",ne=[],oe=new WeakSet,re=e=>"object"==typeof e&&oe.add(e);let ie={},ae=0;const se=setInterval((()=>{if(ne.length<10)return;if(ie.hasTags&&ie.len<25)return;ne.sort();const e=Math.min(ne.reduce(((e,t)=>e+t),0)/ne.length,ne[Math.floor(ne.length/2)]),t=S(e);t>ae&&(ae=t,q("performanceObserver"),A("Mean time:",S(ne[Math.floor(ne.length/2)])),A("Median time:",S(ne.reduce(((e,t)=>e+t),0)/ne.length)),A("Average time:",t),A("Max time:",S(Math.max(...ne)))),e<=4||(clearInterval(se),U(`<rb>Performance Warning</>\n\nCalculating the page size is taking an excessive amount of time (${S(e)}ms).\n\nTo improve performance add the <b>data-iframe-size</> attribute to the ${ie.Side.toLowerCase()} most element on the page. For more details see: <u>https://iframe-resizer.com/perf</>.`))}),5e3);function le(e){e.getEntries().forEach((e=>{if(e.name===te){const{duration:t}=performance.measure("--ifr-measure",ee,te);ie=e.detail,ne.push(t),ne.length>100&&ne.shift()}}))}function ce(){new PerformanceObserver(le).observe({entryTypes:["mark"]}),re(document.documentElement),re(document.body)}"undefined"!=typeof document&&"undefined"!=typeof PerformanceObserver&&("loading"===document.readyState?document.addEventListener("DOMContentLoaded",ce):ce());const de=e=>(t,n)=>{if(n in t){if(typeof t[n]===e)return t[n];throw new TypeError(`${n} is not a ${e}.`)}},ue=de("function"),me=de("number"),fe=de("string");"undefined"!=typeof window&&function(){const z={height:()=>(W("Custom height calculation function not defined"),wt.auto()),width:()=>(W("Custom width calculation function not defined"),It.auto())},T={bodyOffset:1,bodyScroll:1,offset:1,documentElementOffset:1,documentElementScroll:1,boundingClientRect:1,max:1,min:1,grow:1,lowestElement:1},k={},R="auto",N="[iFrameSizer]",F="scroll";let Z,X,ne,oe,re,ie,ae,se=!0,le="",ce=0,de="",pe="",ge=!0,he=!1,ye=!0,be=!1,ve=!1,ze=!1,we=1,Ie=R,$e="",He=!0,Se={},Oe=!0,Te=!1,Me="",Ee=0,je=!1,ke="",Ge=H,Ae=[],Re="child",Le=null,Pe=!1,Ce="",xe=[],Ne=window.parent,Be="*",qe=0,De=!1,Fe=1,We=F,Ue=window,Ve=()=>{W("onMessage function not defined")},Ze=()=>{},Je=null,_e=null;function Qe(c){var u,m,p;!function(e){ke=e[0]??ke,ce=K(e[1])??ce,he=Y(e[2])??he,Te=Y(e[3])??Te,se=Y(e[6])??se,de=e[7]??de,Ie=e[8]??Ie,le=e[9]??le,pe=e[10]??pe,qe=K(e[11])??qe,Se.enable=Y(e[12])??!1,Re=e[13]??Re,We=e[14]??We,je=Y(e[15])??je,Z=K(e[16])??Z,X=K(e[17])??X,ge=Y(e[18])??ge,Me=e[19]??Me,ie=e[20]??ie,Ee=K(e[21])??Ee,Oe=Y(e[23])??Oe}(c),u={id:ke,enabled:Te,expand:Oe},G.label(`${u.id}`),G.expand(u.expand),j=u.enabled,A(`Initialising iframe v${t} ${window.location.href}`),function(){function t(e){A("Reading data from page:",e),ae=ue(e,"onBeforeResize")??ae,Ve=ue(e,"onMessage")??Ve,Ze=ue(e,"onReady")??Ze,"number"==typeof e?.offset&&(Q("offset","offsetSize"),ge&&(Z=me(e,"offset")??Z),he&&(X=me(e,"offset")??X)),"number"==typeof e?.offsetSize&&(ge&&(Z=me(e,"offsetSize")??Z),he&&(X=me(e,"offsetSize")??X)),$e=fe(e,"ignoreSelector")??$e,Ce=fe(e,"sizeSelector")??Ce,Be=fe(e,"targetOrigin")??Be,Ie=e?.heightCalculationMethod||Ie,We=e?.widthCalculationMethod||We}function n(e,t){return"function"==typeof e&&(U(`<rb>Deprecated Option(${t}CalculationMethod)</>\n\nThe use of <b>${t}CalculationMethod</> as a function is deprecated and will be removed in a future version of <i>iframe-resizer</>. Please use the new <b>onBeforeResize</> event handler instead.\n\nSee <u>https://iframe-resizer.com/api/child</> for more details.`),z[t]=e,e="custom"),e}if(1===Ee)return;const o=window.iframeResizer||window.iFrameResizer;"object"==typeof o&&(t(o),Ie=n(Ie,"height"),We=n(We,"width"),L(`Set targetOrigin for parent: %c${Be}`,e.HIGHLIGHT))}(),at(),function(){try{Pe=1===Ee||"iframeParentListener"in window.parent}catch(e){A("Cross domain iframe detected")}}(),Ee<0?V(`${w(Ee+2)}${w(2)}`):ie?.codePointAt(0)>4||Ee<2&&V(w(3)),ie&&""!==ie&&"false"!==ie?ie!==t&&U(`<b>Version mismatch</>\n\nThe parent and child pages are running different versions of <i>iframe resizer</>.\n\nParent page: ${ie} - Child page: ${t}.\n`):U("<rb>Legacy version detected on parent page</>\n\nDetected legacy version of parent page script. It is recommended to update the parent page to use <b>@iframe-resizer/parent</>.\n\nSee <u>https://iframe-resizer.com/setup/</> for more details.\n"),ct(),dt(),function(){let e=!1;const t=t=>document.querySelectorAll(`[${t}]`).forEach((n=>{e=!0,n.removeAttribute(t),n.toggleAttribute(o,!0)}));t("data-iframe-height"),t("data-iframe-width"),e&&U("<rb>Deprecated Attributes</>\n \nThe <b>data-iframe-height</> and <b>data-iframe-width</> attributes have been deprecated and replaced with the single <b>data-iframe-size</> attribute. Use of the old attributes will be removed in a future version of <i>iframe-resizer</>.")}(),"BackCompat"===document.compatMode&&U("<rb>Quirks Mode Detected</>\n\nThis iframe is running in the browser's legacy <b>Quirks Mode</>, this may cause issues with the correct operation of <i>iframe-resizer</>. It is recommended that you switch to the modern <b>Standards Mode</>.\n\nFor more information see <u>https://iframe-resizer.com/quirks-mode</>.\n"),et(),1!==Ee&&(Ue.parentIframe=Object.freeze({autoResize:e=>(E(e,"boolean","parentIframe.autoResize(enable) enable"),!1===he&&!1===ge?(q(l),U("Auto Resize can not be changed when <b>direction</> is set to 'none'."),!1):(!0===e&&!1===se?(se=!0,queueMicrotask((()=>Tt(l,"Auto Resize enabled")))):!1===e&&!0===se&&(se=!1),Et(0,0,"autoResize",JSON.stringify(se)),se)),close(){Et(0,0,"close")},getId:()=>ke,getOrigin:()=>(J("getOrigin()","getParentOrigin()"),ne),getParentOrigin:()=>ne,getPageInfo(e){if("function"==typeof e)return Je=e,Et(0,0,"pageInfo"),void _("getPageInfo()","getParentProps()","See <u>https://iframe-resizer.com/upgrade</> for details. ");Je=null,Et(0,0,"pageInfoStop")},getParentProps:e=>(E(e,"function","parentIframe.getParentProps(callback) callback"),_e=e,Et(0,0,"parentInfo"),()=>{_e=null,Et(0,0,"parentInfoStop")}),getParentProperties(e){J("getParentProperties()","getParentProps()"),this.getParentProps(e)},moveToAnchor(e){E(e,"string","parentIframe.moveToAnchor(anchor) anchor"),Se.findTarget(e)},reset(){!function(){const t=Ie;Ie=R,A("Reset trigger event: %cparentIframe.reset",e.HIGHLIGHT),De?A("TriggerLock blocked calculation"):(De=!0,C("Trigger event lock on"),requestAnimationFrame((()=>{De=!1,C("Trigger event lock off")}))),Mt("reset"),Ie=t}()},setOffsetSize(e){E(e,"number","parentIframe.setOffsetSize(offset) offset"),Z=e,X=e,Tt(f,`parentIframe.setOffsetSize(${e})`)},scrollBy(e,t){E(e,"number","parentIframe.scrollBy(x, y) x"),E(t,"number","parentIframe.scrollBy(x, y) y"),Et(t,e,"scrollBy")},scrollTo(e,t){E(e,"number","parentIframe.scrollTo(x, y) x"),E(t,"number","parentIframe.scrollTo(x, y) y"),Et(t,e,"scrollTo")},scrollToOffset(e,t){E(e,"number","parentIframe.scrollToOffset(x, y) x"),E(t,"number","parentIframe.scrollToOffset(x, y) y"),Et(t,e,"scrollToOffset")},sendMessage(e,t){t&&E(t,"string","parentIframe.sendMessage(msg, targetOrigin) targetOrigin"),Et(0,0,"message",JSON.stringify(e),t)},setHeightCalculationMethod(e){Ie=e,ct()},setWidthCalculationMethod(e){We=e,dt()},setTargetOrigin(t){E(t,"string","parentIframe.setTargetOrigin(targetOrigin) targetOrigin"),A(`Set targetOrigin: %c${t}`,e.HIGHLIGHT),Be=t},resize(e,t){e&&E(e,"number","parentIframe.resize(customHeight, customWidth) customHeight"),t&&E(t,"number","parentIframe.resize(customHeight, customWidth) customWidth"),Tt(d,`parentIframe.resize(${e||""}${t?`,${t}`:""})`,e,t)},size(e,t){J("size()","resize()"),this.resize(e,t)}}),Ue.parentIFrame=Ue.parentIframe),function(){function t(e){Et(0,0,e.type,`${e.screenY}:${e.screenX}`)}function n(n,o){A(`Add event listener: %c${o}`,e.HIGHLIGHT),v(window.document,n,t)}!0===je&&(n("mouseenter","Mouse Enter"),n("mouseleave","Mouse Leave"))}(),Se=function(){const t=()=>({x:document.documentElement.scrollLeft,y:document.documentElement.scrollTop});function o(e){const o=e.getBoundingClientRect(),r=t();return{x:parseInt(o.left,n)+parseInt(r.x,n),y:parseInt(o.top,n)+parseInt(r.y,n)}}function r(t){function n(t){const n=o(t);A(`Moving to in page link (%c#${r}%c) at x: %c${n.x}%c y: %c${n.y}`,e.HIGHLIGHT,e.FOREGROUND,e.HIGHLIGHT,e.FOREGROUND,e.HIGHLIGHT),Et(n.y,n.x,"scrollToOffset")}const r=t.split("#")[1]||t,i=decodeURIComponent(r),a=document.getElementById(i)||document.getElementsByName(i)[0];void 0===a?(A(`In page link (#${r}) not found in iFrame, so sending to parent`),Et(0,0,"inPageLink",`#${r}`)):n(a)}function i(){const{hash:e,href:t}=window.location;""!==e&&"#"!==e&&r(t)}function a(){for(const e of document.querySelectorAll('a[href^="#"]'))"#"!==e.getAttribute("href")&&v(e,"click",(t=>{t.preventDefault(),r(e.getAttribute("href"))}))}function s(){v(window,"hashchange",i)}function l(){setTimeout(i,128)}function c(){A("Setting up location.hash handlers"),a(),s(),l()}return Se.enable?1===Ee?U("In page linking requires a Professional or Business license. Please see <u>https://iframe-resizer.com/pricing</> for more details."):c():A("In page linking not enabled"),{findTarget:r}}(),void 0===de&&(de=`${ce}px`),rt("margin",(m="margin",(p=de).includes("-")&&(W(`Negative CSS value ignored for ${m}`),p=""),p)),rt("background",le),rt("padding",pe),function(){const e=document.createElement("div");e.style.clear="both",e.style.display="block",e.style.height="0",document.body.append(e)}(),function(){const t=e=>e.style.setProperty("height","auto","important");t(document.documentElement),t(document.body),A("Set HTML & body height: %cauto !important",e.HIGHLIGHT)}(),!0!==se&&A("Auto Resize disabled"),function(e){st({method:e,eventType:"After Print",eventName:"afterprint"}),st({method:e,eventType:"Before Print",eventName:"beforeprint"}),st({method:e,eventType:"Ready State Change",eventName:"readystatechange"})}("add"),function(){const t=new Set,n=[];let r=!1,a=0;const s=e=>{L("Mutations observed:",e);for(const n of e){const{addedNodes:e,removedNodes:o}=n;for(const n of e)t.add(n);for(const e of o)t.delete(e)}},l=16,c=2,d=200;let u=1;function m(e){at(),tt(e),e.forEach(ft),e.clear()}function f(){const o=performance.now(),i=o-a,p=l*u+++c;if(i>p&&i<d)return L("Backed off due to heavy workload on callStack"),A(`Delay: %c${S(i)}ms %c> Delay limit: %c${p}ms`,e.HIGHLIGHT,e.FOREGROUND,e.HIGHLIGHT),setTimeout(f,l*u),void(a=o);u=1,n.forEach(s),n.length=0,t.size>0&&m(t),et(),Ye(),r=!1,Tt(h,"Mutation Observed")}function p(e){n.push(e),r||(a=performance.now(),r=!0,requestAnimationFrame(f))}function g(){const e=new window.MutationObserver(p),t=document.querySelector("body"),n={attributes:!0,attributeFilter:[i,o],attributeOldValue:!1,characterData:!1,characterDataOldValue:!1,childList:!0,subtree:!0};return A("Setup <body> MutationObserver"),e.observe(t,n),e}g()}(),A("Setup ResizeObserver"),Le=new ResizeObserver(ut),Le.observe(document.body),mt.add(document.body),ft(document.body),ge!==he&&(A("Setup OverflowObserver"),Ge=(e=>{const t=e.side||a,n=e.onChange||H,o={root:e.root,rootMargin:"0px",threshold:1},i=window?.requestAnimationFrame||H,s=(e=!1)=>n(e),l=(e,n)=>0===e||e>n[t],c=(e,t)=>e.toggleAttribute(r,t),d=new IntersectionObserver((function(e){for(const o of e){const{boundingClientRect:e,rootBounds:r,target:i}=o,a=e[t],s=l(a,r)&&!((n=i).hidden||null===n.offsetParent||"none"===n.style.display);c(i,s)}var n;i(s)}),o),u=new WeakSet;return function(e){A("Attached overflowObservers");for(const t of e){const e=t.nodeType===Node.ELEMENT_NODE,n=u.has(t);!n&&e?(d.observe(t),u.add(t)):P(!n,"Node already observed",t)}}})({onChange:Ke,root:document.documentElement,side:ge?a:s})),tt(ht(document)()),Xe($(Ze)),A("Initialization complete"),Tt(b,"Init message from host page",void 0,void 0,t),document.title&&""!==document.title&&Et(0,0,"title",document.title)}function Xe(e){"complete"===document.readyState?I(e):v(document,"readystatechange",(()=>Xe(e)))}function Ye(){const e=document.querySelectorAll(`[${r}]`);Ae=Array.from(e).filter((e=>!e.closest(`[${i}]`))),ve=Ae.length>0}function Ke(e){Ye(),(ve||e)&&(ve?L("Overflowed Elements:",...Ae):L("Overflow removed"),Tt(g,"Overflow updated"))}function et(){xe=document.querySelectorAll(`[${o}]`),ze=xe.length>0,A(`Tagged elements found: %c${ze}`,e.HIGHLIGHT)}function tt(e){ze||Ge(e)}let nt=0;function ot(){const t=document.querySelectorAll(`*[${i}]`);be=t.length>0,be&&t.length!==nt&&(function(t){const n=1===t.length?"":"s";W(`%c[${i}]%c found on %c${t.length}%c element${n}`,e.BOLD,e.NORMAL,e.BOLD,e.NORMAL)}(t),nt=t.length)}function rt(t,n){void 0!==n&&""!==n&&"null"!==n&&(document.body.style.setProperty(t,n),L(`Set body ${t}: %c${n}`,e.HIGHLIGHT))}function it(t,n,o){if(""!==o){A(`${t}: %c${o}`,e.HIGHLIGHT);for(const e of document.querySelectorAll(o))A(`Applying ${n} to:`,e),e.toggleAttribute(n,!0)}}function at(){it("sizeSelector",o,Ce),it("ignoreSelector",i,$e)}function st(t){({add(e){function n(){Tt(t.eventName,t.eventType)}k[e]=n,v(window,e,n,{passive:!0})},remove(e){const t=k[e];var n,o;delete k[e],n=e,o=t,window.removeEventListener(n,o,!1)}})[t.method](t.eventName),A(`${O(t.method)} event listener: %c${t.eventType}`,e.HIGHLIGHT)}function lt(t,n,o,r){return n!==t&&(t in o||(W(`${t} is not a valid option for ${r}CalculationMethod.`),t=n),t in T)&&U(`<rb>Deprecated ${r}CalculationMethod (${t})</>\n\nThis version of <i>iframe-resizer</> can auto detect the most suitable ${r} calculation method. It is recommended that you ${ie?"remove this option.":"set this option to <b>'auto'</> when using an older version of <i>iframe-resizer</> on the parent page."}`),A(`Set ${r} calculation method: %c${t}`,e.HIGHLIGHT),t}function ct(){Ie=lt(Ie,R,wt,"height")}function dt(){We=lt(We,F,It,"width")}function ut(e){if(!Array.isArray(e)||0===e.length)return;const t=e[0].target;Tt(p,`Element resized <${M(t)}>`)}const mt=new WeakSet;function ft(t){if(t.nodeType!==Node.ELEMENT_NODE)return;if(!mt.has(t)){const n=getComputedStyle(t)?.position;""!==n&&"static"!==n&&(Le.observe(t),mt.add(t),A(`Attached resizeObserver: %c${M(t)}`,e.HIGHLIGHT))}const n=ht(t)();for(const t of n){if(mt.has(t)||t?.nodeType!==Node.ELEMENT_NODE)continue;const n=getComputedStyle(t)?.position;""!==n&&"static"!==n&&(Le.observe(t),mt.add(t),A(`Attached resizeObserver: %c${M(t)}`,e.HIGHLIGHT))}}function pt(e){performance.mark(ee);const t=O(e);let n=0,o=document.documentElement,r=ze?0:document.documentElement.getBoundingClientRect().bottom;const i=ze?xe:ve?Ae:ht(document)();for(const t of i)n=t.getBoundingClientRect()[e]+parseFloat(getComputedStyle(t).getPropertyValue(`margin-${e}`)),n>r&&(r=n,o=t);return L(`${t} position calculated from:`,o),performance.mark(te,{detail:{hasTags:ze,len:i.length,logging:Te,Side:t}}),r}const gt=e=>[e.bodyOffset(),e.bodyScroll(),e.documentElementOffset(),e.documentElementScroll(),e.boundingClientRect()],ht=e=>()=>{ot();const t=["* ","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)"];return be&&t.push(`not([${i}])`,`not([${i}] *)`),e.querySelectorAll(t.join(":"))},yt={height:0,width:0},bt={height:0,width:0},vt=[e.HIGHLIGHT,e.FOREGROUND,e.HIGHLIGHT];function zt(t){function n(){return bt[r]=i,yt[r]=l,i}const o=t===wt,r=o?"height":"width",i=t.boundingClientRect(),a=Math.ceil(i),s=Math.floor(i),l=(e=>e.documentElementScroll()+Math.max(0,e.getOffset()))(t),c=`HTML: %c${i}px %cPage: %c${l}px`;let d=0;switch(!0){case!t.enabled():return l;case ze:L("Found element with data-iframe-size attribute"),d=t.taggedElement();break;case!ve&&0===bt[r]&&0===yt[r]:L(`Initial page size values: ${c}`,...vt),d=n();break;case De&&i===bt[r]&&l===yt[r]:L(`Size unchanged: ${c}`,...vt),d=Math.max(i,l);break;case 0===i:L(`Page is hidden: ${c}`,...vt),d=l;break;case!ve&&i!==bt[r]&&l<=yt[r]:L(`New <html> size: ${c} `,...vt),L(`Previous <html> size: %c${bt[r]}px`,e.HIGHLIGHT),d=n();break;case!o:d=t.taggedElement();break;case!ve&&i<bt[r]:L(`<html> size decreased: ${c}`,...vt),d=n();break;case l===s||l===a:L(`<html> size equals page size: ${c}`,...vt),d=n();break;case i>l:L(`Page size < <html> size: ${c}`,...vt),d=n();break;case ve:L("Found element overflowing <html> "),d=t.taggedElement();break;default:L(`Using <html> size: ${c}`,...vt),d=n()}return L(`Content ${r}: %c${d}px`,e.HIGHLIGHT),d+=function(t){const n=t.getOffset();return 0!==n&&L(`Page offsetSize: %c${n}px`,e.HIGHLIGHT),n}(t),d}const wt={enabled:()=>ge,getOffset:()=>Z,auto:()=>zt(wt),bodyOffset:()=>{const{body:e}=document,t=getComputedStyle(e);return e.offsetHeight+parseInt(t.marginTop,n)+parseInt(t.marginBottom,n)},bodyScroll:()=>document.body.scrollHeight,offset:()=>wt.bodyOffset(),custom:()=>z.height(),documentElementOffset:()=>document.documentElement.offsetHeight,documentElementScroll:()=>document.documentElement.scrollHeight,boundingClientRect:()=>Math.max(document.documentElement.getBoundingClientRect().bottom,document.body.getBoundingClientRect().bottom),max:()=>Math.max(...gt(wt)),min:()=>Math.min(...gt(wt)),grow:()=>wt.max(),lowestElement:()=>pt(a),taggedElement:()=>pt(a)},It={enabled:()=>he,getOffset:()=>X,auto:()=>zt(It),bodyScroll:()=>document.body.scrollWidth,bodyOffset:()=>document.body.offsetWidth,custom:()=>z.width(),documentElementScroll:()=>document.documentElement.scrollWidth,documentElementOffset:()=>document.documentElement.offsetWidth,boundingClientRect:()=>Math.max(document.documentElement.getBoundingClientRect().right,document.body.getBoundingClientRect().right),max:()=>Math.max(...gt(It)),min:()=>Math.min(...gt(It)),rightMostElement:()=>pt(s),scroll:()=>Math.max(It.bodyScroll(),It.documentElementScroll()),taggedElement:()=>pt(s)},$t=(e,t)=>!(Math.abs(e-t)<=qe);function Ht(e,t){const n=e[t]();return e.enabled()&&void 0!==ae?function(e){const t=ae(e);if(void 0===t)throw new TypeError("No value returned from onBeforeResize(), expected a numeric value");if(Number.isNaN(t))throw new TypeError(`Invalid value returned from onBeforeResize(): ${t}, expected Number`);return t}(n):n}let St=!1;const Ot=$((()=>V(w(4)))),Tt=B(((t,n,o,r,i)=>{if(re=performance.now(),oe=!0,q(t),!0!==St)return se||t in m?void(document.hidden?A("Page hidden - Ignored resize request"):(St=!0,requestAnimationFrame((()=>{St=!1})),function(t,n,o,r,i){const a=o??Ht(wt,Ie),s=r??Ht(It,We),d=ge&&$t(we,a)||he&&$t(Fe,s)?c:t;switch(A(`Resize event: %c${n}`,e.HIGHLIGHT),d){case b:case l:case c:we=a,Fe=s;case f:Et(we,Fe,t,i);break;case p:case g:case h:A(y);break;default:L(y)}oe=!1}(t,n,o,r,i))):(L("Resizing disabled"),void x())}));function Mt(e){we=wt[Ie](),Fe=It[We](),Et(we,Fe,e)}const Et=B((function(t,n,o,r,i){Ee<-1||(q(o),void 0!==i?A(`Message targetOrigin: %c${i}`,e.HIGHLIGHT):i=Be,function(){const a=`${ke}:${t}:${n}:${o}${void 0===r?"":`:${r}`}`;if(Pe)try{window.parent.iframeParentListener(N+a)}catch(e){if(1!==Ee)throw e;return void Ot()}else Ne.postMessage(N+a,i);oe&&A(function(){const e=S(performance.now()-re);return o===b?`Initialised iFrame in %c${e}ms`:`Size calculated in %c${e}ms`}(),e.HIGHLIGHT),L(`Sending message to parent page via ${Pe?"sameOrigin":"postMessage"}: %c%c${a}`,e.ITALIC,e.HIGHLIGHT)}(),x())})),jt=B((function(t){q("onMessage");const{freeze:n}=Object,{parse:o}=JSON,r=e=>n(o(e)),i=e=>Et(0,0,`${e}Stop`),a={init:function(){if("loading"===document.readyState)return void A("Page not ready, ignoring init message");const e=t.data.slice(13).split(":");Ne=t.source,ne=t.origin,Qe(e),ye=!1,setTimeout((()=>{He=!1}),128)},reset(){He?A("Page reset ignored by init"):(A("Page size reset by host page"),Mt("resetPage"))},resize(){A("Resize requested by host page"),Tt(u,"Parent window requested size check")},moveToAnchor(){Se.findTarget(l())},inPageLink(){this.moveToAnchor()},pageInfo(){const e=l();A("PageInfo received from parent:",r(e)),Je?I(Je,o(e)):i("pageInfo")},parentInfo(){const e=r(l());A("ParentInfo received from parent:",e),_e?I(_e,e):i("parentInfo")},message(){const t=l();A("onMessage called from parent:%c",e.HIGHLIGHT,r(t)),I(Ve,o(t))}},s=()=>t.data.split("]")[1].split(":")[0],l=()=>t.data.slice(t.data.indexOf(":")+1),c=()=>t.data.split(":")[2]in{true:1,false:1};function d(){const e=s();q(e),e in a?a[e]():"iframeResize"in window||void 0!==window.jQuery&&""in window.jQuery.prototype||c()||W(`Unexpected message (${t.data})`)}N===`${t.data}`.slice(0,13)&&function(){if(!1!==ye)return c()?(D(s()),q(b),void a.init()):void A(`Ignored message of type "${s()}". Received before initialization.`);d()}()}));function kt(){"loading"!==document.readyState&&window.parent.postMessage("[iFrameResizerChild]Ready","*")}"iframeChildListener"in window?W("Already setup"):(window.iframeChildListener=e=>setTimeout((()=>jt({data:e,sameOrigin:!0}))),v(window,"message",jt),v(window,"readystatechange",kt),kt())}();
21
- //# sourceMappingURL=index.cjs.js.map
20
+ "use strict";const e=require("auto-console-group"),t="5.4.7",n=10,o="data-iframe-size",r="data-iframe-overflowed",i="data-iframe-ignore",a="bottom",s="right",l="autoResizeEnabled",c=Symbol("sizeChanged"),u="manualResize",d="parentResize",m={[u]:1,[d]:1},f="setOffsetSize",p="resizeObserver",h="overflowObserver",y="mutationObserver",g="none",b="init",v=(e,t,n,o)=>e.addEventListener(t,n,o||!1),z=["<iy><yi>Puchspk Spjluzl Rlf</><iy><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."];Object.fromEntries(["2cgs7fdf4xb","1c9ctcccr4z","1q2pc4eebgb","ueokt0969w","w2zxchhgqz","1umuxblj2e5"].map(((e,t)=>[e,Math.max(0,t-1)])));const w=e=>(e=>e.replace(/[A-Za-z]/g,(e=>String.fromCodePoint((e<="Z"?90:122)>=(e=e.codePointAt(0)+19)?e:e-26))))(z[e]),$=(e,...t)=>setTimeout((()=>e(...t)),0),S=e=>{let t=!1;return function(){return t?void 0:(t=!0,Reflect.apply(e,this,arguments))}},O=e=>e,I=e=>Math.round(1e3*e)/1e3,E=e=>e.charAt(0).toUpperCase()+e.slice(1),T=e=>""!=`${e}`&&void 0!==e;const j=(e,t,n)=>{if(typeof e!==t)throw new TypeError(`${n} is not a ${E(t)}`)};let k=!0;var M;const C=(M=e,M?.__esModule?M.default:M)({label:"iframeResizer(child)"});var x;const A=(x="log",(...e)=>!k||C[x](...e)),{assert:N,debug:P,endAutoGroup:R,error:L,errorBoundary:H,event:B,label:q,purge:G,warn:W}=C,D=e=>{return C.warn((t=O,e=>window.chrome?t(e.replaceAll("<br>","\n").replaceAll("<rb>","").replaceAll("</>","").replaceAll("<b>","").replaceAll("<i>","").replaceAll("<u>","")):t(e.replaceAll("<br>","\n").replaceAll(/<[/a-z]+>/gi,"")))(e));var t},F=D,U=(e=>(t,n="renamed to")=>(o,r,i="",a="")=>e(a,`<rb>Deprecated ${t}(${o.replace("()","")})</>\n\nThe <b>${o}</> ${t.toLowerCase()} has been ${n} <b>${r}</>. ${i}Use of the old ${t.toLowerCase()} will be removed in a future version of <i>iframe-resizer</>.`))(((e,t)=>D(t))),V=U("Method"),Z=U("Method","replaced with"),J=U("Option"),_=["min-height","min-width","max-height","max-width"],Q=new Set,Y=(e,t)=>window.getComputedStyle(e).getPropertyValue(t),X=(e,t)=>{return(n=Y(e,t))&&"0px"!==n&&"auto"!==n&&"none"!==n;var n};function K({href:e}){Q.has(e)||Q.add(e)}const ee=(e,t)=>function(e,t){const n=e.style[t];return n?{source:"an inline style attribute",value:n}:null}(e,t)||function(e,t){for(const n of document.styleSheets)try{for(const o of n.cssRules||[])if(o.selectorText&&e.matches(o.selectorText)){const e=o.style[t];if(e)return{source:"STYLE"===n.ownerNode.tagName?"an inline <style> block":`stylesheet (${n.href})`,value:e}}}catch(e){K(n)}return{source:"cross-origin stylesheet",value:Y(e,t)}}(e,t),te=(e,t)=>{const{source:n,value:o}=ee(e,t),r=(e=>e.tagName?e.tagName.toLowerCase():"unknown")(e);D(`The <b>${t}</> CSS property is set to <b>${o}</> on the <b><${r}></> element via ${n}. This may cause issues with the correct operation of <i>iframe-resizer</>.\n\nIf you wish to restrict the size of the iframe, then you should set this property on the iframe element itself, not the content inside it.`)};function ne(){for(const e of[document.documentElement,document.body])for(const t of _)X(e,t)&&te(e,t)}const oe=e=>t=>void 0===t?void 0:e(t),re=oe((e=>"true"===e)),ie=oe(Number),ae="--ifr-start",se="--ifr-end",le=[],ce=new WeakSet,ue=e=>"object"==typeof e&&ce.add(e);let de={},me=0;const fe=setInterval((()=>{if(le.length<10)return;if(de.hasTags&&de.len<25)return;le.sort();const e=Math.min(le.reduce(((e,t)=>e+t),0)/le.length,le[Math.floor(le.length/2)]),t=I(e);t>me&&(me=t,B("performanceObserver")),e<=4||(clearInterval(fe),D(`<rb>Performance Warning</>\n\nCalculating the page size is taking an excessive amount of time (${I(e)}ms).\n\nTo improve performance add the <b>data-iframe-size</> attribute to the ${de.Side.toLowerCase()} most element on the page. For more details see: <u>https://iframe-resizer.com/perf</>.`))}),5e3);function pe(e){e.getEntries().forEach((e=>{if(e.name===se){const{duration:t}=performance.measure("--ifr-measure",ae,se);de=e.detail,le.push(t),le.length>100&&le.shift()}}))}function he(){new PerformanceObserver(pe).observe({entryTypes:["mark"]}),ue(document.documentElement),ue(document.body)}"undefined"!=typeof document&&"undefined"!=typeof PerformanceObserver&&("loading"===document.readyState?document.addEventListener("DOMContentLoaded",he):he());const ye=e=>(t,n)=>{if(n in t){if(typeof t[n]===e)return t[n];throw new TypeError(`${n} is not a ${e}.`)}},ge=ye("function"),be=ye("number"),ve=ye("string");"undefined"!=typeof window&&function(){const z={height:()=>(W("Custom height calculation function not defined"),vt.auto()),width:()=>(W("Custom width calculation function not defined"),zt.auto())},I={bodyOffset:1,bodyScroll:1,offset:1,documentElementOffset:1,documentElementScroll:1,boundingClientRect:1,max:1,min:1,grow:1,lowestElement:1},M={},x="auto",P="[iFrameSizer]",L="scroll";let U,_,Q,Y,X,K=!0,ee="",te=0,oe="",le="",ce=!1,ue=!0,de=!1,me=!0,fe=!1,pe=!1,he=!1,ye=1,ze=x,we="",$e=!0,Se={},Oe=!0,Ie=!1,Ee="",Te=0,je=!1,ke="",Me=O,Ce=[],xe="child",Ae=null,Ne=!1,Pe="",Re=[],Le=window.parent,He="*",Be=0,qe=!1,Ge=1,We=L,De=window,Fe=()=>{W("onMessage function not defined")},Ue=()=>{},Ve=null,Ze=null;function Je(c){var d,m,p;!function(e){ke=e[0]??ke,te=ie(e[1])??te,de=re(e[2])??de,Ie=re(e[3])??Ie,K=re(e[6])??K,oe=e[7]??oe,ze=e[8]??ze,ee=e[9]??ee,le=e[10]??le,Be=ie(e[11])??Be,Se.enable=re(e[12])??!1,xe=e[13]??xe,We=e[14]??We,je=re(e[15])??je,U=ie(e[16])??U,_=ie(e[17])??_,ue=re(e[18])??ue,Ee=e[19]??Ee,Y=e[20]??Y,Te=ie(e[21])??Te,Oe=re(e[23])??Oe}(c),d={id:ke,enabled:Ie,expand:Oe},C.label(`${d.id}`),C.expand(d.expand),k=d.enabled,function(){function t(e){X=ge(e,"onBeforeResize")??X,Fe=ge(e,"onMessage")??Fe,Ue=ge(e,"onReady")??Ue,"number"==typeof e?.offset&&(J("offset","offsetSize"),ue&&(U=be(e,"offset")??U),de&&(_=be(e,"offset")??_)),"number"==typeof e?.offsetSize&&(ue&&(U=be(e,"offsetSize")??U),de&&(_=be(e,"offsetSize")??_)),we=ve(e,"ignoreSelector")??we,Pe=ve(e,"sizeSelector")??Pe,He=ve(e,"targetOrigin")??He,ze=e?.heightCalculationMethod||ze,We=e?.widthCalculationMethod||We}function n(e,t){return"function"==typeof e&&(D(`<rb>Deprecated Option(${t}CalculationMethod)</>\n\nThe use of <b>${t}CalculationMethod</> as a function is deprecated and will be removed in a future version of <i>iframe-resizer</>. Please use the new <b>onBeforeResize</> event handler instead.\n\nSee <u>https://iframe-resizer.com/api/child</> for more details.`),z[t]=e,e="custom"),e}if(1===Te)return;const o=window.iframeResizer||window.iFrameResizer;"object"==typeof o&&(t(o),ze=n(ze,"height"),We=n(We,"width"),A(`Set targetOrigin for parent: %c${He}`,e.HIGHLIGHT))}(),rt(),function(){try{Ne=1===Te||"iframeParentListener"in window.parent}catch(e){}}(),de===ue&&(ce=!0),Te<0?F(`${w(Te+2)}${w(2)}`):Y?.codePointAt(0)>4||Te<2&&F(w(3)),Y&&""!==Y&&"false"!==Y?Y!==t&&D(`<b>Version mismatch</>\n\nThe parent and child pages are running different versions of <i>iframe resizer</>.\n\nParent page: ${Y} - Child page: ${t}.\n`):D("<rb>Legacy version detected on parent page</>\n\nDetected legacy version of parent page script. It is recommended to update the parent page to use <b>@iframe-resizer/parent</>.\n\nSee <u>https://iframe-resizer.com/setup/</> for more details.\n"),st(),lt(),function(){let e=!1;const t=t=>document.querySelectorAll(`[${t}]`).forEach((n=>{e=!0,n.removeAttribute(t),n.toggleAttribute(o,!0)}));t("data-iframe-height"),t("data-iframe-width"),e&&D("<rb>Deprecated Attributes</>\n \nThe <b>data-iframe-height</> and <b>data-iframe-width</> attributes have been deprecated and replaced with the single <b>data-iframe-size</> attribute. Use of the old attributes will be removed in a future version of <i>iframe-resizer</>.")}(),"BackCompat"===document.compatMode&&D("<rb>Quirks Mode Detected</>\n\nThis iframe is running in the browser's legacy <b>Quirks Mode</>, this may cause issues with the correct operation of <i>iframe-resizer</>. It is recommended that you switch to the modern <b>Standards Mode</>.\n\nFor more information see <u>https://iframe-resizer.com/quirks-mode</>.\n"),Xe(),ce||ne(),1!==Te&&(De.parentIframe=Object.freeze({autoResize:e=>(j(e,"boolean","parentIframe.autoResize(enable) enable"),!1===de&&!1===ue?(B(l),D(`Auto Resize can not be changed when <b>direction</> is set to '${g}'.`),!1):(!0===e&&!1===K?(K=!0,queueMicrotask((()=>It(l,"Auto Resize enabled")))):!1===e&&!0===K&&(K=!1),Tt(0,0,"autoResize",JSON.stringify(K)),K)),close(){Tt(0,0,"close")},getId:()=>ke,getOrigin:()=>(V("getOrigin()","getParentOrigin()"),Q),getParentOrigin:()=>Q,getPageInfo(e){if("function"==typeof e)return Ve=e,Tt(0,0,"pageInfo"),void Z("getPageInfo()","getParentProps()","See <u>https://iframe-resizer.com/upgrade</> for details. ");Ve=null,Tt(0,0,"pageInfoStop")},getParentProps:e=>(j(e,"function","parentIframe.getParentProps(callback) callback"),Ze=e,Tt(0,0,"parentInfo"),()=>{Ze=null,Tt(0,0,"parentInfoStop")}),getParentProperties(e){V("getParentProperties()","getParentProps()"),this.getParentProps(e)},moveToAnchor(e){j(e,"string","parentIframe.moveToAnchor(anchor) anchor"),Se.findTarget(e)},reset(){!function(){const e=ze;ze=x,qe||(qe=!0,requestAnimationFrame((()=>{qe=!1}))),Et("reset"),ze=e}()},setOffsetSize(e){j(e,"number","parentIframe.setOffsetSize(offset) offset"),U=e,_=e,It(f,`parentIframe.setOffsetSize(${e})`)},scrollBy(e,t){j(e,"number","parentIframe.scrollBy(x, y) x"),j(t,"number","parentIframe.scrollBy(x, y) y"),Tt(t,e,"scrollBy")},scrollTo(e,t){j(e,"number","parentIframe.scrollTo(x, y) x"),j(t,"number","parentIframe.scrollTo(x, y) y"),Tt(t,e,"scrollTo")},scrollToOffset(e,t){j(e,"number","parentIframe.scrollToOffset(x, y) x"),j(t,"number","parentIframe.scrollToOffset(x, y) y"),Tt(t,e,"scrollToOffset")},sendMessage(e,t){t&&j(t,"string","parentIframe.sendMessage(msg, targetOrigin) targetOrigin"),Tt(0,0,"message",JSON.stringify(e),t)},setHeightCalculationMethod(e){ze=e,st()},setWidthCalculationMethod(e){We=e,lt()},setTargetOrigin(e){j(e,"string","parentIframe.setTargetOrigin(targetOrigin) targetOrigin"),He=e},resize(e,t){e&&j(e,"number","parentIframe.resize(customHeight, customWidth) customHeight"),t&&j(t,"number","parentIframe.resize(customHeight, customWidth) customWidth"),It(u,`parentIframe.resize(${e||""}${t?`,${t}`:""})`,e,t)},size(e,t){V("size()","resize()"),this.resize(e,t)}}),De.parentIFrame=De.parentIframe),function(){function e(e){Tt(0,0,e.type,`${e.screenY}:${e.screenX}`)}function t(t,n){v(window.document,t,e)}!0===je&&(t("mouseenter"),t("mouseleave"))}(),Se=function(){const e=()=>({x:document.documentElement.scrollLeft,y:document.documentElement.scrollTop});function t(t){const o=t.getBoundingClientRect(),r=e();return{x:parseInt(o.left,n)+parseInt(r.x,n),y:parseInt(o.top,n)+parseInt(r.y,n)}}function o(e){function n(e){const n=t(e);Tt(n.y,n.x,"scrollToOffset")}const o=e.split("#")[1]||e,r=decodeURIComponent(o),i=document.getElementById(r)||document.getElementsByName(r)[0];void 0===i?Tt(0,0,"inPageLink",`#${o}`):n(i)}function r(){const{hash:e,href:t}=window.location;""!==e&&"#"!==e&&o(t)}function i(){for(const e of document.querySelectorAll('a[href^="#"]'))"#"!==e.getAttribute("href")&&v(e,"click",(t=>{t.preventDefault(),o(e.getAttribute("href"))}))}function a(){v(window,"hashchange",r)}function s(){setTimeout(r,128)}function l(){i(),a(),s()}return Se.enable&&(1===Te?D("In page linking requires a Professional or Business license. Please see <u>https://iframe-resizer.com/pricing</> for more details."):l()),{findTarget:o}}(),void 0===oe&&(oe=`${te}px`),nt("margin",(m="margin",(p=oe).includes("-")&&(W(`Negative CSS value ignored for ${m}`),p=""),p)),nt("background",ee),nt("padding",le),function(){const e=document.createElement("div");e.style.clear="both",e.style.display="block",e.style.height="0",document.body.append(e)}(),ce||function(){const e=e=>e.style.setProperty("height","auto","important");e(document.documentElement),e(document.body)}(),function(e){it({method:e,eventType:"After Print",eventName:"afterprint"}),it({method:e,eventType:"Before Print",eventName:"beforeprint"}),it({method:e,eventType:"Ready State Change",eventName:"readystatechange"})}("add"),function(){const e=new Set,t=[];let n=!1,r=0;const a=t=>{A("Mutations observed:",t);for(const n of t){const{addedNodes:t,removedNodes:o}=n;for(const n of t)e.add(n);for(const t of o)e.delete(t)}},s=16,l=2,c=200;let u=1;function d(e){rt(),Ke(e),e.forEach(dt),e.clear()}function m(){const o=performance.now(),i=o-r;if(i>s*u+++l&&i<c)return A("Backed off due to heavy workload on callStack"),setTimeout(m,s*u),void(r=o);u=1,t.forEach(a),t.length=0,e.size>0&&d(e),Xe(),Qe(),n=!1,It(y,"Mutation Observed")}function f(e){t.push(e),n||(r=performance.now(),n=!0,requestAnimationFrame(m))}function p(){const e=new window.MutationObserver(f),t=document.querySelector("body"),n={attributes:!0,attributeFilter:[i,o],attributeOldValue:!1,characterData:!1,characterDataOldValue:!1,childList:!0,subtree:!0};return e.observe(t,n),e}p()}(),Ae=new ResizeObserver(ct),Ae.observe(document.body),ut.add(document.body),dt(document.body),ue!==de&&(Me=(e=>{const t=e.side||a,n=e.onChange||O,o={root:e.root,rootMargin:"0px",threshold:1},i=window?.requestAnimationFrame||O,s=(e=!1)=>n(e),l=(e,n)=>0===e||e>n[t],c=(e,t)=>e.toggleAttribute(r,t),u=new IntersectionObserver((function(e){for(const o of e){const{boundingClientRect:e,rootBounds:r,target:i}=o,a=e[t],s=l(a,r)&&!((n=i).hidden||null===n.offsetParent||"none"===n.style.display);c(i,s)}var n;i(s)}),o),d=new WeakSet;return function(e){for(const t of e){const e=t.nodeType===Node.ELEMENT_NODE,n=d.has(t);!n&&e?(u.observe(t),d.add(t)):N(!n,"Node already observed",t)}}})({onChange:Ye,root:document.documentElement,side:ue?a:s})),Ke(pt(document)()),_e(S(Ue)),It(b,"Init message from host page",void 0,void 0,t),document.title&&""!==document.title&&Tt(0,0,"title",document.title)}function _e(e){"complete"===document.readyState?$(e):v(document,"readystatechange",(()=>_e(e)))}function Qe(){const e=document.querySelectorAll(`[${r}]`);Ce=Array.from(e).filter((e=>!e.closest(`[${i}]`))),pe=Ce.length>0}function Ye(e){Qe(),(pe||e)&&(pe?A("Overflowed Elements:",...Ce):A("Overflow removed"),It(h,"Overflow updated"))}function Xe(){Re=document.querySelectorAll(`[${o}]`),he=Re.length>0}function Ke(e){he||Me(e)}let et=0;function tt(){const t=document.querySelectorAll(`*[${i}]`);fe=t.length>0,fe&&t.length!==et&&(function(t){const n=1===t.length?"":"s";W(`%c[${i}]%c found on %c${t.length}%c element${n}`,e.BOLD,e.NORMAL,e.BOLD,e.NORMAL)}(t),et=t.length)}function nt(t,n){void 0!==n&&""!==n&&"null"!==n&&(document.body.style.setProperty(t,n),A(`Set body ${t}: %c${n}`,e.HIGHLIGHT))}function ot(e,t,n){if(""!==n)for(const e of document.querySelectorAll(n))e.toggleAttribute(t,!0)}function rt(){ot(0,o,Pe),ot(0,i,we)}function it(e){({add(t){function n(){It(e.eventName,e.eventType)}M[t]=n,v(window,t,n,{passive:!0})},remove(e){const t=M[e];var n,o;delete M[e],n=e,o=t,window.removeEventListener(n,o,!1)}})[e.method](e.eventName)}function at(e,t,n,o){return t!==e&&(e in n||(W(`${e} is not a valid option for ${o}CalculationMethod.`),e=t),e in I)&&D(`<rb>Deprecated ${o}CalculationMethod (${e})</>\n\nThis version of <i>iframe-resizer</> can auto detect the most suitable ${o} calculation method. It is recommended that you ${Y?"remove this option.":"set this option to <b>'auto'</> when using an older version of <i>iframe-resizer</> on the parent page."}`),e}function st(){ze=at(ze,x,vt,"height")}function lt(){We=at(We,L,zt,"width")}function ct(e){if(!Array.isArray(e)||0===e.length)return;const t=e[0].target;It(p,`Element resized <${function(e){switch(!0){case!T(e):return"";case T(e.id):return`${e.nodeName}#${e.id}`;case T(e.name):return`${e.nodeName} (${e.name}`;case T(e.className):return`${e.nodeName}.${e.className}`;default:return e.nodeName}}(t)}>`)}const ut=new WeakSet;function dt(e){if(e.nodeType!==Node.ELEMENT_NODE)return;if(!ut.has(e)){const t=getComputedStyle(e)?.position;""!==t&&"static"!==t&&(Ae.observe(e),ut.add(e))}const t=pt(e)();for(const e of t){if(ut.has(e)||e?.nodeType!==Node.ELEMENT_NODE)continue;const t=getComputedStyle(e)?.position;""!==t&&"static"!==t&&(Ae.observe(e),ut.add(e))}}function mt(e){performance.mark(ae);const t=E(e);let n=0,o=document.documentElement,r=he?0:document.documentElement.getBoundingClientRect().bottom;const i=he?Re:pe?Ce:pt(document)();for(const t of i)n=t.getBoundingClientRect()[e]+parseFloat(getComputedStyle(t).getPropertyValue(`margin-${e}`)),n>r&&(r=n,o=t);return A(`${t} position calculated from:`,o),performance.mark(se,{detail:{hasTags:he,len:i.length,logging:Ie,Side:t}}),r}const ft=e=>[e.bodyOffset(),e.bodyScroll(),e.documentElementOffset(),e.documentElementScroll(),e.boundingClientRect()],pt=e=>()=>{tt();const t=["* ","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)"];return fe&&t.push(`not([${i}])`,`not([${i}] *)`),e.querySelectorAll(t.join(":"))},ht={height:0,width:0},yt={height:0,width:0},gt=[e.HIGHLIGHT,e.FOREGROUND,e.HIGHLIGHT];function bt(t){function n(){return yt[r]=i,ht[r]=l,i}const o=t===vt,r=o?"height":"width",i=t.boundingClientRect(),a=Math.ceil(i),s=Math.floor(i),l=(e=>e.documentElementScroll()+Math.max(0,e.getOffset()))(t),c=`HTML: %c${i}px %cPage: %c${l}px`;let u=0;switch(!0){case!t.enabled():return l;case he:A("Found element with data-iframe-size attribute"),u=t.taggedElement();break;case!pe&&0===yt[r]&&0===ht[r]:A(`Initial page size values: ${c}`,...gt),u=n();break;case qe&&i===yt[r]&&l===ht[r]:A(`Size unchanged: ${c}`,...gt),u=Math.max(i,l);break;case 0===i:A(`Page is hidden: ${c}`,...gt),u=l;break;case!pe&&i!==yt[r]&&l<=ht[r]:A(`New <html> size: ${c} `,...gt),A(`Previous <html> size: %c${yt[r]}px`,e.HIGHLIGHT),u=n();break;case!o:u=t.taggedElement();break;case!pe&&i<yt[r]:A(`<html> size decreased: ${c}`,...gt),u=n();break;case l===s||l===a:A(`<html> size equals page size: ${c}`,...gt),u=n();break;case i>l:A(`Page size < <html> size: ${c}`,...gt),u=n();break;case pe:A("Found element overflowing <html> "),u=t.taggedElement();break;default:A(`Using <html> size: ${c}`,...gt),u=n()}return A(`Content ${r}: %c${u}px`,e.HIGHLIGHT),u+=function(t){const n=t.getOffset();return 0!==n&&A(`Page offsetSize: %c${n}px`,e.HIGHLIGHT),n}(t),u}const vt={enabled:()=>ue,getOffset:()=>U,auto:()=>bt(vt),bodyOffset:()=>{const{body:e}=document,t=getComputedStyle(e);return e.offsetHeight+parseInt(t.marginTop,n)+parseInt(t.marginBottom,n)},bodyScroll:()=>document.body.scrollHeight,offset:()=>vt.bodyOffset(),custom:()=>z.height(),documentElementOffset:()=>document.documentElement.offsetHeight,documentElementScroll:()=>document.documentElement.scrollHeight,boundingClientRect:()=>Math.max(document.documentElement.getBoundingClientRect().bottom,document.body.getBoundingClientRect().bottom),max:()=>Math.max(...ft(vt)),min:()=>Math.min(...ft(vt)),grow:()=>vt.max(),lowestElement:()=>mt(a),taggedElement:()=>mt(a)},zt={enabled:()=>de,getOffset:()=>_,auto:()=>bt(zt),bodyScroll:()=>document.body.scrollWidth,bodyOffset:()=>document.body.offsetWidth,custom:()=>z.width(),documentElementScroll:()=>document.documentElement.scrollWidth,documentElementOffset:()=>document.documentElement.offsetWidth,boundingClientRect:()=>Math.max(document.documentElement.getBoundingClientRect().right,document.body.getBoundingClientRect().right),max:()=>Math.max(...ft(zt)),min:()=>Math.min(...ft(zt)),rightMostElement:()=>mt(s),scroll:()=>Math.max(zt.bodyScroll(),zt.documentElementScroll()),taggedElement:()=>mt(s)},wt=(e,t)=>!(Math.abs(e-t)<=Be);function $t(e,t){const n=e[t]();return e.enabled()&&void 0!==X?function(e){const t=X(e);if(void 0===t)throw new TypeError("No value returned from onBeforeResize(), expected a numeric value");if(Number.isNaN(t))throw new TypeError(`Invalid value returned from onBeforeResize(): ${t}, expected Number`);return t}(n):n}let St=!1;const Ot=S((()=>F(w(4)))),It=H(((e,t,n,o,r)=>{if(performance.now(),B(e),!0!==St)return K||e in m?void(document.hidden||(St=!0,requestAnimationFrame((()=>{St=!1})),function(e,t,n,o,r){const i=n??$t(vt,ze),a=o??$t(zt,We);switch(ue&&wt(ye,i)||de&&wt(Ge,a)?c:e){case b:case l:case c:ye=i,Ge=a;case f:Tt(ye,Ge,e,r);break;case p:case h:case y:G();break;default:G(),A("No change in content size detected")}}(e,0,n,o,r))):(A("Resizing disabled"),void R())}));function Et(e){ye=vt[ze](),Ge=zt[We](),Tt(ye,Ge,e)}const Tt=H((function(t,n,o,r,i){Te<-1||(B(o),void 0!==i||(i=He),function(){const a=`${ke}:${t}:${n}:${o}${void 0===r?"":`:${r}`}`;if(Ne)try{window.parent.iframeParentListener(P+a)}catch(e){if(1!==Te)throw e;return void Ot()}else Le.postMessage(P+a,i);A(`Sending message to parent page via ${Ne?"sameOrigin":"postMessage"}: %c%c${a}`,e.ITALIC,e.HIGHLIGHT)}(),R())})),jt=H((function(e){B("onMessage");const{freeze:t}=Object,{parse:n}=JSON,o=e=>Tt(0,0,`${e}Stop`),r={init:function(){if("loading"===document.readyState)return;const t=e.data.slice(13).split(":");Le=e.source,Q=e.origin,Je(t),me=!1,setTimeout((()=>{$e=!1}),128)},reset(){$e||Et("resetPage")},resize(){It(d,"Parent window requested size check")},moveToAnchor(){Se.findTarget(a())},inPageLink(){this.moveToAnchor()},pageInfo(){const e=a();Ve?$(Ve,n(e)):o("pageInfo")},parentInfo(){const e=(r=a(),t(n(r)));var r;Ze?$(Ze,e):o("parentInfo")},message(){const e=a();$(Fe,n(e))}},i=()=>e.data.split("]")[1].split(":")[0],a=()=>e.data.slice(e.data.indexOf(":")+1),s=()=>e.data.split(":")[2]in{true:1,false:1};function l(){const t=i();B(t),t in r?r[t]():"iframeResize"in window||void 0!==window.jQuery&&""in window.jQuery.prototype||s()||W(`Unexpected message (${e.data})`)}P===`${e.data}`.slice(0,13)&&function(){if(!1!==me)return s()?(q(i()),B(b),void r.init()):void 0;l()}()}));function kt(){"loading"!==document.readyState&&window.parent.postMessage("[iFrameResizerChild]Ready","*")}"iframeChildListener"in window?W("Already setup"):(window.iframeChildListener=e=>setTimeout((()=>jt({data:e,sameOrigin:!0}))),v(window,"message",jt),v(window,"readystatechange",kt),kt())}();
package/index.esm.js CHANGED
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * @preserve
3
3
  *
4
- * @module iframe-resizer/child 5.4.7-beta.3 (esm) - 2025-06-16
4
+ * @module iframe-resizer/child 5.4.7 (esm) - 2025-07-08
5
5
  *
6
6
  * @license GPL-3.0 for non-commercial use only.
7
7
  * For commercial use, you must purchase a license from
@@ -17,5 +17,4 @@
17
17
  */
18
18
 
19
19
 
20
- import e,{HIGHLIGHT as t,ITALIC as n,FOREGROUND as o,BOLD as r,NORMAL as i}from"auto-console-group";const a="5.4.7-beta.3",s=10,l="data-iframe-size",c="data-iframe-overflowed",d="data-iframe-ignore",u="bottom",m="right",f="autoResizeEnabled",p=Symbol("sizeChanged"),g="manualResize",h="parentResize",y={[g]:1,[h]:1},b="setOffsetSize",v="resizeObserver",z="overflowObserver",w="mutationObserver",$="No change in content size detected",S="init",O=(e,t,n,o)=>e.addEventListener(t,n,o||!1),M=["<iy><yi>Puchspk Spjluzl Rlf</><iy><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."];Object.fromEntries(["2cgs7fdf4xb","1c9ctcccr4z","1q2pc4eebgb","ueokt0969w","w2zxchhgqz","1umuxblj2e5"].map(((e,t)=>[e,Math.max(0,t-1)])));const E=e=>(e=>e.replace(/[A-Za-z]/g,(e=>String.fromCodePoint((e<="Z"?90:122)>=(e=e.codePointAt(0)+19)?e:e-26))))(M[e]),j=(e,...t)=>setTimeout((()=>e(...t)),0),k=e=>{let t=!1;return function(){return t?void 0:(t=!0,Reflect.apply(e,this,arguments))}},I=e=>e,T=e=>Math.round(1e3*e)/1e3,A=e=>e.charAt(0).toUpperCase()+e.slice(1),P=e=>""!=`${e}`&&void 0!==e;function C(e){switch(!0){case!P(e):return"";case P(e.id):return`${e.nodeName}#${e.id}`;case P(e.name):return`${e.nodeName} (${e.name}`;case P(e.className):return`${e.nodeName}.${e.className}`;default:return e.nodeName}}const x=(e,t,n)=>{if(typeof e!==t)throw new TypeError(`${n} is not a ${A(t)}`)};let R=!0;var N;const q=(N=e,N?.__esModule?N.default:N)({label:"iframeResizer(child)"});const B=(L="log",(...e)=>!R||q[L](...e));var L;const W=B,{assert:F,debug:D,endAutoGroup:H,error:U,errorBoundary:V,event:Z,label:J,purge:_,warn:Q}=q,G=e=>{return q.warn((t=I,e=>window.chrome?t(e.replaceAll("<br>","\n").replaceAll("<rb>","").replaceAll("</>","").replaceAll("<b>","").replaceAll("<i>","").replaceAll("<u>","")):t(e.replaceAll("<br>","\n").replaceAll(/<[/a-z]+>/gi,"")))(e));var t},X=G,Y=(e=>(t,n="renamed to")=>(o,r,i="",a="")=>e(a,`<rb>Deprecated ${t}(${o.replace("()","")})</>\n\nThe <b>${o}</> ${t.toLowerCase()} has been ${n} <b>${r}</>. ${i}Use of the old ${t.toLowerCase()} will be removed in a future version of <i>iframe-resizer</>.`))(((e,t)=>G(t))),K=Y("Method"),ee=Y("Method","replaced with"),te=Y("Option"),ne=e=>t=>void 0===t?void 0:e(t),oe=ne((e=>"true"===e)),re=ne(Number),ie="--ifr-start",ae="--ifr-end",se=[],le=new WeakSet,ce=e=>"object"==typeof e&&le.add(e);let de={},ue=0;const me=setInterval((()=>{if(se.length<10)return;if(de.hasTags&&de.len<25)return;se.sort();const e=Math.min(se.reduce(((e,t)=>e+t),0)/se.length,se[Math.floor(se.length/2)]),t=T(e);t>ue&&(ue=t,Z("performanceObserver"),B("Mean time:",T(se[Math.floor(se.length/2)])),B("Median time:",T(se.reduce(((e,t)=>e+t),0)/se.length)),B("Average time:",t),B("Max time:",T(Math.max(...se)))),e<=4||(clearInterval(me),G(`<rb>Performance Warning</>\n\nCalculating the page size is taking an excessive amount of time (${T(e)}ms).\n\nTo improve performance add the <b>data-iframe-size</> attribute to the ${de.Side.toLowerCase()} most element on the page. For more details see: <u>https://iframe-resizer.com/perf</>.`))}),5e3);function fe(e){e.getEntries().forEach((e=>{if(e.name===ae){const{duration:t}=performance.measure("--ifr-measure",ie,ae);de=e.detail,se.push(t),se.length>100&&se.shift()}}))}function pe(){new PerformanceObserver(fe).observe({entryTypes:["mark"]}),ce(document.documentElement),ce(document.body)}"undefined"!=typeof document&&"undefined"!=typeof PerformanceObserver&&("loading"===document.readyState?document.addEventListener("DOMContentLoaded",pe):pe());const ge=e=>(t,n)=>{if(n in t){if(typeof t[n]===e)return t[n];throw new TypeError(`${n} is not a ${e}.`)}},he=ge("function"),ye=ge("number"),be=ge("string");"undefined"!=typeof window&&function(){const e={height:()=>(Q("Custom height calculation function not defined"),Mt.auto()),width:()=>(Q("Custom width calculation function not defined"),Et.auto())},M={bodyOffset:1,bodyScroll:1,offset:1,documentElementOffset:1,documentElementScroll:1,boundingClientRect:1,max:1,min:1,grow:1,lowestElement:1},P={},N="auto",L="[iFrameSizer]",U="scroll";let _,Y,ne,se,le,ce,de,ue=!0,me="",fe=0,pe="",ge="",ve=!0,ze=!1,we=!0,$e=!1,Se=!1,Oe=!1,Me=1,Ee=N,je="",ke=!0,Ie={},Te=!0,Ae=!1,Pe="",Ce=0,xe=!1,Re="",Ne=I,qe=[],Be="child",Le=null,We=!1,Fe="",De=[],He=window.parent,Ue="*",Ve=0,Ze=!1,Je=1,_e=U,Qe=window,Ge=()=>{Q("onMessage function not defined")},Xe=()=>{},Ye=null,Ke=null;function et(n){var r,i,p;!function(e){Re=e[0]??Re,fe=re(e[1])??fe,ze=oe(e[2])??ze,Ae=oe(e[3])??Ae,ue=oe(e[6])??ue,pe=e[7]??pe,Ee=e[8]??Ee,me=e[9]??me,ge=e[10]??ge,Ve=re(e[11])??Ve,Ie.enable=oe(e[12])??!1,Be=e[13]??Be,_e=e[14]??_e,xe=oe(e[15])??xe,_=re(e[16])??_,Y=re(e[17])??Y,ve=oe(e[18])??ve,Pe=e[19]??Pe,ce=e[20]??ce,Ce=re(e[21])??Ce,Te=oe(e[23])??Te}(n),r={id:Re,enabled:Ae,expand:Te},q.label(`${r.id}`),q.expand(r.expand),R=r.enabled,B(`Initialising iframe v${a} ${window.location.href}`),function(){function n(e){B("Reading data from page:",e),de=he(e,"onBeforeResize")??de,Ge=he(e,"onMessage")??Ge,Xe=he(e,"onReady")??Xe,"number"==typeof e?.offset&&(te("offset","offsetSize"),ve&&(_=ye(e,"offset")??_),ze&&(Y=ye(e,"offset")??Y)),"number"==typeof e?.offsetSize&&(ve&&(_=ye(e,"offsetSize")??_),ze&&(Y=ye(e,"offsetSize")??Y)),je=be(e,"ignoreSelector")??je,Fe=be(e,"sizeSelector")??Fe,Ue=be(e,"targetOrigin")??Ue,Ee=e?.heightCalculationMethod||Ee,_e=e?.widthCalculationMethod||_e}function o(t,n){return"function"==typeof t&&(G(`<rb>Deprecated Option(${n}CalculationMethod)</>\n\nThe use of <b>${n}CalculationMethod</> as a function is deprecated and will be removed in a future version of <i>iframe-resizer</>. Please use the new <b>onBeforeResize</> event handler instead.\n\nSee <u>https://iframe-resizer.com/api/child</> for more details.`),e[n]=t,t="custom"),t}if(1===Ce)return;const r=window.iframeResizer||window.iFrameResizer;"object"==typeof r&&(n(r),Ee=o(Ee,"height"),_e=o(_e,"width"),W(`Set targetOrigin for parent: %c${Ue}`,t))}(),dt(),function(){try{We=1===Ce||"iframeParentListener"in window.parent}catch(e){B("Cross domain iframe detected")}}(),Ce<0?X(`${E(Ce+2)}${E(2)}`):ce?.codePointAt(0)>4||Ce<2&&X(E(3)),ce&&""!==ce&&"false"!==ce?ce!==a&&G(`<b>Version mismatch</>\n\nThe parent and child pages are running different versions of <i>iframe resizer</>.\n\nParent page: ${ce} - Child page: ${a}.\n`):G("<rb>Legacy version detected on parent page</>\n\nDetected legacy version of parent page script. It is recommended to update the parent page to use <b>@iframe-resizer/parent</>.\n\nSee <u>https://iframe-resizer.com/setup/</> for more details.\n"),ft(),pt(),function(){let e=!1;const t=t=>document.querySelectorAll(`[${t}]`).forEach((n=>{e=!0,n.removeAttribute(t),n.toggleAttribute(l,!0)}));t("data-iframe-height"),t("data-iframe-width"),e&&G("<rb>Deprecated Attributes</>\n \nThe <b>data-iframe-height</> and <b>data-iframe-width</> attributes have been deprecated and replaced with the single <b>data-iframe-size</> attribute. Use of the old attributes will be removed in a future version of <i>iframe-resizer</>.")}(),"BackCompat"===document.compatMode&&G("<rb>Quirks Mode Detected</>\n\nThis iframe is running in the browser's legacy <b>Quirks Mode</>, this may cause issues with the correct operation of <i>iframe-resizer</>. It is recommended that you switch to the modern <b>Standards Mode</>.\n\nFor more information see <u>https://iframe-resizer.com/quirks-mode</>.\n"),rt(),1!==Ce&&(Qe.parentIframe=Object.freeze({autoResize:e=>(x(e,"boolean","parentIframe.autoResize(enable) enable"),!1===ze&&!1===ve?(Z(f),G("Auto Resize can not be changed when <b>direction</> is set to 'none'."),!1):(!0===e&&!1===ue?(ue=!0,queueMicrotask((()=>At(f,"Auto Resize enabled")))):!1===e&&!0===ue&&(ue=!1),Ct(0,0,"autoResize",JSON.stringify(ue)),ue)),close(){Ct(0,0,"close")},getId:()=>Re,getOrigin:()=>(K("getOrigin()","getParentOrigin()"),ne),getParentOrigin:()=>ne,getPageInfo(e){if("function"==typeof e)return Ye=e,Ct(0,0,"pageInfo"),void ee("getPageInfo()","getParentProps()","See <u>https://iframe-resizer.com/upgrade</> for details. ");Ye=null,Ct(0,0,"pageInfoStop")},getParentProps:e=>(x(e,"function","parentIframe.getParentProps(callback) callback"),Ke=e,Ct(0,0,"parentInfo"),()=>{Ke=null,Ct(0,0,"parentInfoStop")}),getParentProperties(e){K("getParentProperties()","getParentProps()"),this.getParentProps(e)},moveToAnchor(e){x(e,"string","parentIframe.moveToAnchor(anchor) anchor"),Ie.findTarget(e)},reset(){!function(){const e=Ee;Ee=N,B("Reset trigger event: %cparentIframe.reset",t),Ze?B("TriggerLock blocked calculation"):(Ze=!0,D("Trigger event lock on"),requestAnimationFrame((()=>{Ze=!1,D("Trigger event lock off")}))),Pt("reset"),Ee=e}()},setOffsetSize(e){x(e,"number","parentIframe.setOffsetSize(offset) offset"),_=e,Y=e,At(b,`parentIframe.setOffsetSize(${e})`)},scrollBy(e,t){x(e,"number","parentIframe.scrollBy(x, y) x"),x(t,"number","parentIframe.scrollBy(x, y) y"),Ct(t,e,"scrollBy")},scrollTo(e,t){x(e,"number","parentIframe.scrollTo(x, y) x"),x(t,"number","parentIframe.scrollTo(x, y) y"),Ct(t,e,"scrollTo")},scrollToOffset(e,t){x(e,"number","parentIframe.scrollToOffset(x, y) x"),x(t,"number","parentIframe.scrollToOffset(x, y) y"),Ct(t,e,"scrollToOffset")},sendMessage(e,t){t&&x(t,"string","parentIframe.sendMessage(msg, targetOrigin) targetOrigin"),Ct(0,0,"message",JSON.stringify(e),t)},setHeightCalculationMethod(e){Ee=e,ft()},setWidthCalculationMethod(e){_e=e,pt()},setTargetOrigin(e){x(e,"string","parentIframe.setTargetOrigin(targetOrigin) targetOrigin"),B(`Set targetOrigin: %c${e}`,t),Ue=e},resize(e,t){e&&x(e,"number","parentIframe.resize(customHeight, customWidth) customHeight"),t&&x(t,"number","parentIframe.resize(customHeight, customWidth) customWidth"),At(g,`parentIframe.resize(${e||""}${t?`,${t}`:""})`,e,t)},size(e,t){K("size()","resize()"),this.resize(e,t)}}),Qe.parentIFrame=Qe.parentIframe),function(){function e(e){Ct(0,0,e.type,`${e.screenY}:${e.screenX}`)}function n(n,o){B(`Add event listener: %c${o}`,t),O(window.document,n,e)}!0===xe&&(n("mouseenter","Mouse Enter"),n("mouseleave","Mouse Leave"))}(),Ie=function(){const e=()=>({x:document.documentElement.scrollLeft,y:document.documentElement.scrollTop});function n(t){const n=t.getBoundingClientRect(),o=e();return{x:parseInt(n.left,s)+parseInt(o.x,s),y:parseInt(n.top,s)+parseInt(o.y,s)}}function r(e){function r(e){const r=n(e);B(`Moving to in page link (%c#${i}%c) at x: %c${r.x}%c y: %c${r.y}`,t,o,t,o,t),Ct(r.y,r.x,"scrollToOffset")}const i=e.split("#")[1]||e,a=decodeURIComponent(i),s=document.getElementById(a)||document.getElementsByName(a)[0];void 0===s?(B(`In page link (#${i}) not found in iFrame, so sending to parent`),Ct(0,0,"inPageLink",`#${i}`)):r(s)}function i(){const{hash:e,href:t}=window.location;""!==e&&"#"!==e&&r(t)}function a(){for(const e of document.querySelectorAll('a[href^="#"]'))"#"!==e.getAttribute("href")&&O(e,"click",(t=>{t.preventDefault(),r(e.getAttribute("href"))}))}function l(){O(window,"hashchange",i)}function c(){setTimeout(i,128)}function d(){B("Setting up location.hash handlers"),a(),l(),c()}return Ie.enable?1===Ce?G("In page linking requires a Professional or Business license. Please see <u>https://iframe-resizer.com/pricing</> for more details."):d():B("In page linking not enabled"),{findTarget:r}}(),void 0===pe&&(pe=`${fe}px`),lt("margin",(i="margin",(p=pe).includes("-")&&(Q(`Negative CSS value ignored for ${i}`),p=""),p)),lt("background",me),lt("padding",ge),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),B("Set HTML & body height: %cauto !important",t)}(),!0!==ue&&B("Auto Resize disabled"),function(e){ut({method:e,eventType:"After Print",eventName:"afterprint"}),ut({method:e,eventType:"Before Print",eventName:"beforeprint"}),ut({method:e,eventType:"Ready State Change",eventName:"readystatechange"})}("add"),function(){const e=new Set,n=[];let r=!1,i=0;const a=t=>{W("Mutations observed:",t);for(const n of t){const{addedNodes:t,removedNodes:o}=n;for(const n of t)e.add(n);for(const t of o)e.delete(t)}},s=16,c=2,u=200;let m=1;function f(e){dt(),it(e),e.forEach(yt),e.clear()}function p(){const l=performance.now(),d=l-i,g=s*m+++c;if(d>g&&d<u)return W("Backed off due to heavy workload on callStack"),B(`Delay: %c${T(d)}ms %c> Delay limit: %c${g}ms`,t,o,t),setTimeout(p,s*m),void(i=l);m=1,n.forEach(a),n.length=0,e.size>0&&f(e),rt(),nt(),r=!1,At(w,"Mutation Observed")}function g(e){n.push(e),r||(i=performance.now(),r=!0,requestAnimationFrame(p))}function h(){const e=new window.MutationObserver(g),t=document.querySelector("body"),n={attributes:!0,attributeFilter:[d,l],attributeOldValue:!1,characterData:!1,characterDataOldValue:!1,childList:!0,subtree:!0};return B("Setup <body> MutationObserver"),e.observe(t,n),e}h()}(),B("Setup ResizeObserver"),Le=new ResizeObserver(gt),Le.observe(document.body),ht.add(document.body),yt(document.body),ve!==ze&&(B("Setup OverflowObserver"),Ne=(e=>{const t=e.side||u,n=e.onChange||I,o={root:e.root,rootMargin:"0px",threshold:1},r=window?.requestAnimationFrame||I,i=(e=!1)=>n(e),a=(e,n)=>0===e||e>n[t],s=(e,t)=>e.toggleAttribute(c,t),l=new IntersectionObserver((function(e){for(const o of e){const{boundingClientRect:e,rootBounds:r,target:i}=o,l=e[t],c=a(l,r)&&!((n=i).hidden||null===n.offsetParent||"none"===n.style.display);s(i,c)}var n;r(i)}),o),d=new WeakSet;return function(e){B("Attached overflowObservers");for(const t of e){const e=t.nodeType===Node.ELEMENT_NODE,n=d.has(t);!n&&e?(l.observe(t),d.add(t)):F(!n,"Node already observed",t)}}})({onChange:ot,root:document.documentElement,side:ve?u:m})),it(zt(document)()),tt(k(Xe)),B("Initialization complete"),At(S,"Init message from host page",void 0,void 0,a),document.title&&""!==document.title&&Ct(0,0,"title",document.title)}function tt(e){"complete"===document.readyState?j(e):O(document,"readystatechange",(()=>tt(e)))}function nt(){const e=document.querySelectorAll(`[${c}]`);qe=Array.from(e).filter((e=>!e.closest(`[${d}]`))),Se=qe.length>0}function ot(e){nt(),(Se||e)&&(Se?W("Overflowed Elements:",...qe):W("Overflow removed"),At(z,"Overflow updated"))}function rt(){De=document.querySelectorAll(`[${l}]`),Oe=De.length>0,B(`Tagged elements found: %c${Oe}`,t)}function it(e){Oe||Ne(e)}let at=0;function st(){const e=document.querySelectorAll(`*[${d}]`);$e=e.length>0,$e&&e.length!==at&&(function(e){const t=1===e.length?"":"s";Q(`%c[${d}]%c found on %c${e.length}%c element${t}`,r,i,r,i)}(e),at=e.length)}function lt(e,n){void 0!==n&&""!==n&&"null"!==n&&(document.body.style.setProperty(e,n),W(`Set body ${e}: %c${n}`,t))}function ct(e,n,o){if(""!==o){B(`${e}: %c${o}`,t);for(const e of document.querySelectorAll(o))B(`Applying ${n} to:`,e),e.toggleAttribute(n,!0)}}function dt(){ct("sizeSelector",l,Fe),ct("ignoreSelector",d,je)}function ut(e){({add(t){function n(){At(e.eventName,e.eventType)}P[t]=n,O(window,t,n,{passive:!0})},remove(e){const t=P[e];var n,o;delete P[e],n=e,o=t,window.removeEventListener(n,o,!1)}})[e.method](e.eventName),B(`${A(e.method)} event listener: %c${e.eventType}`,t)}function mt(e,n,o,r){return n!==e&&(e in o||(Q(`${e} is not a valid option for ${r}CalculationMethod.`),e=n),e in M)&&G(`<rb>Deprecated ${r}CalculationMethod (${e})</>\n\nThis version of <i>iframe-resizer</> can auto detect the most suitable ${r} calculation method. It is recommended that you ${ce?"remove this option.":"set this option to <b>'auto'</> when using an older version of <i>iframe-resizer</> on the parent page."}`),B(`Set ${r} calculation method: %c${e}`,t),e}function ft(){Ee=mt(Ee,N,Mt,"height")}function pt(){_e=mt(_e,U,Et,"width")}function gt(e){if(!Array.isArray(e)||0===e.length)return;const t=e[0].target;At(v,`Element resized <${C(t)}>`)}const ht=new WeakSet;function yt(e){if(e.nodeType!==Node.ELEMENT_NODE)return;if(!ht.has(e)){const n=getComputedStyle(e)?.position;""!==n&&"static"!==n&&(Le.observe(e),ht.add(e),B(`Attached resizeObserver: %c${C(e)}`,t))}const n=zt(e)();for(const e of n){if(ht.has(e)||e?.nodeType!==Node.ELEMENT_NODE)continue;const n=getComputedStyle(e)?.position;""!==n&&"static"!==n&&(Le.observe(e),ht.add(e),B(`Attached resizeObserver: %c${C(e)}`,t))}}function bt(e){performance.mark(ie);const t=A(e);let n=0,o=document.documentElement,r=Oe?0:document.documentElement.getBoundingClientRect().bottom;const i=Oe?De:Se?qe:zt(document)();for(const t of i)n=t.getBoundingClientRect()[e]+parseFloat(getComputedStyle(t).getPropertyValue(`margin-${e}`)),n>r&&(r=n,o=t);return W(`${t} position calculated from:`,o),performance.mark(ae,{detail:{hasTags:Oe,len:i.length,logging:Ae,Side:t}}),r}const vt=e=>[e.bodyOffset(),e.bodyScroll(),e.documentElementOffset(),e.documentElementScroll(),e.boundingClientRect()],zt=e=>()=>{st();const t=["* ","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)"];return $e&&t.push(`not([${d}])`,`not([${d}] *)`),e.querySelectorAll(t.join(":"))},wt={height:0,width:0},$t={height:0,width:0},St=[t,o,t];function Ot(e){function n(){return $t[r]=i,wt[r]=l,i}const o=e===Mt,r=o?"height":"width",i=e.boundingClientRect(),a=Math.ceil(i),s=Math.floor(i),l=(e=>e.documentElementScroll()+Math.max(0,e.getOffset()))(e),c=`HTML: %c${i}px %cPage: %c${l}px`;let d=0;switch(!0){case!e.enabled():return l;case Oe:W("Found element with data-iframe-size attribute"),d=e.taggedElement();break;case!Se&&0===$t[r]&&0===wt[r]:W(`Initial page size values: ${c}`,...St),d=n();break;case Ze&&i===$t[r]&&l===wt[r]:W(`Size unchanged: ${c}`,...St),d=Math.max(i,l);break;case 0===i:W(`Page is hidden: ${c}`,...St),d=l;break;case!Se&&i!==$t[r]&&l<=wt[r]:W(`New <html> size: ${c} `,...St),W(`Previous <html> size: %c${$t[r]}px`,t),d=n();break;case!o:d=e.taggedElement();break;case!Se&&i<$t[r]:W(`<html> size decreased: ${c}`,...St),d=n();break;case l===s||l===a:W(`<html> size equals page size: ${c}`,...St),d=n();break;case i>l:W(`Page size < <html> size: ${c}`,...St),d=n();break;case Se:W("Found element overflowing <html> "),d=e.taggedElement();break;default:W(`Using <html> size: ${c}`,...St),d=n()}return W(`Content ${r}: %c${d}px`,t),d+=function(e){const n=e.getOffset();return 0!==n&&W(`Page offsetSize: %c${n}px`,t),n}(e),d}const Mt={enabled:()=>ve,getOffset:()=>_,auto:()=>Ot(Mt),bodyOffset:()=>{const{body:e}=document,t=getComputedStyle(e);return e.offsetHeight+parseInt(t.marginTop,s)+parseInt(t.marginBottom,s)},bodyScroll:()=>document.body.scrollHeight,offset:()=>Mt.bodyOffset(),custom:()=>e.height(),documentElementOffset:()=>document.documentElement.offsetHeight,documentElementScroll:()=>document.documentElement.scrollHeight,boundingClientRect:()=>Math.max(document.documentElement.getBoundingClientRect().bottom,document.body.getBoundingClientRect().bottom),max:()=>Math.max(...vt(Mt)),min:()=>Math.min(...vt(Mt)),grow:()=>Mt.max(),lowestElement:()=>bt(u),taggedElement:()=>bt(u)},Et={enabled:()=>ze,getOffset:()=>Y,auto:()=>Ot(Et),bodyScroll:()=>document.body.scrollWidth,bodyOffset:()=>document.body.offsetWidth,custom:()=>e.width(),documentElementScroll:()=>document.documentElement.scrollWidth,documentElementOffset:()=>document.documentElement.offsetWidth,boundingClientRect:()=>Math.max(document.documentElement.getBoundingClientRect().right,document.body.getBoundingClientRect().right),max:()=>Math.max(...vt(Et)),min:()=>Math.min(...vt(Et)),rightMostElement:()=>bt(m),scroll:()=>Math.max(Et.bodyScroll(),Et.documentElementScroll()),taggedElement:()=>bt(m)},jt=(e,t)=>!(Math.abs(e-t)<=Ve);function kt(e,t){const n=e[t]();return e.enabled()&&void 0!==de?function(e){const t=de(e);if(void 0===t)throw new TypeError("No value returned from onBeforeResize(), expected a numeric value");if(Number.isNaN(t))throw new TypeError(`Invalid value returned from onBeforeResize(): ${t}, expected Number`);return t}(n):n}let It=!1;const Tt=k((()=>X(E(4)))),At=V(((e,n,o,r,i)=>{if(le=performance.now(),se=!0,Z(e),!0!==It)return ue||e in y?void(document.hidden?B("Page hidden - Ignored resize request"):(It=!0,requestAnimationFrame((()=>{It=!1})),function(e,n,o,r,i){const a=o??kt(Mt,Ee),s=r??kt(Et,_e),l=ve&&jt(Me,a)||ze&&jt(Je,s)?p:e;switch(B(`Resize event: %c${n}`,t),l){case S:case f:case p:Me=a,Je=s;case b:Ct(Me,Je,e,i);break;case v:case z:case w:B($);break;default:W($)}se=!1}(e,n,o,r,i))):(W("Resizing disabled"),void H())}));function Pt(e){Me=Mt[Ee](),Je=Et[_e](),Ct(Me,Je,e)}const Ct=V((function(e,o,r,i,a){Ce<-1||(Z(r),void 0!==a?B(`Message targetOrigin: %c${a}`,t):a=Ue,function(){const s=`${Re}:${e}:${o}:${r}${void 0===i?"":`:${i}`}`;if(We)try{window.parent.iframeParentListener(L+s)}catch(e){if(1!==Ce)throw e;return void Tt()}else He.postMessage(L+s,a);se&&B(function(){const e=T(performance.now()-le);return r===S?`Initialised iFrame in %c${e}ms`:`Size calculated in %c${e}ms`}(),t),W(`Sending message to parent page via ${We?"sameOrigin":"postMessage"}: %c%c${s}`,n,t)}(),H())})),xt=V((function(e){Z("onMessage");const{freeze:n}=Object,{parse:o}=JSON,r=e=>n(o(e)),i=e=>Ct(0,0,`${e}Stop`),a={init:function(){if("loading"===document.readyState)return void B("Page not ready, ignoring init message");const t=e.data.slice(13).split(":");He=e.source,ne=e.origin,et(t),we=!1,setTimeout((()=>{ke=!1}),128)},reset(){ke?B("Page reset ignored by init"):(B("Page size reset by host page"),Pt("resetPage"))},resize(){B("Resize requested by host page"),At(h,"Parent window requested size check")},moveToAnchor(){Ie.findTarget(l())},inPageLink(){this.moveToAnchor()},pageInfo(){const e=l();B("PageInfo received from parent:",r(e)),Ye?j(Ye,o(e)):i("pageInfo")},parentInfo(){const e=r(l());B("ParentInfo received from parent:",e),Ke?j(Ke,e):i("parentInfo")},message(){const e=l();B("onMessage called from parent:%c",t,r(e)),j(Ge,o(e))}},s=()=>e.data.split("]")[1].split(":")[0],l=()=>e.data.slice(e.data.indexOf(":")+1),c=()=>e.data.split(":")[2]in{true:1,false:1};function d(){const t=s();Z(t),t in a?a[t]():"iframeResize"in window||void 0!==window.jQuery&&""in window.jQuery.prototype||c()||Q(`Unexpected message (${e.data})`)}L===`${e.data}`.slice(0,13)&&function(){if(!1!==we)return c()?(J(s()),Z(S),void a.init()):void B(`Ignored message of type "${s()}". Received before initialization.`);d()}()}));function Rt(){"loading"!==document.readyState&&window.parent.postMessage("[iFrameResizerChild]Ready","*")}"iframeChildListener"in window?Q("Already setup"):(window.iframeChildListener=e=>setTimeout((()=>xt({data:e,sameOrigin:!0}))),O(window,"message",xt),O(window,"readystatechange",Rt),Rt())}();
21
- //# sourceMappingURL=index.esm.js.map
20
+ import e,{ITALIC as t,HIGHLIGHT as n,FOREGROUND as o,BOLD as r,NORMAL as i}from"auto-console-group";const a="5.4.7",s=10,l="data-iframe-size",c="data-iframe-overflowed",u="data-iframe-ignore",d="bottom",m="right",f="autoResizeEnabled",p=Symbol("sizeChanged"),h="manualResize",y="parentResize",g={[h]:1,[y]:1},b="setOffsetSize",v="resizeObserver",z="overflowObserver",w="mutationObserver",$="none",S="init",E=(e,t,n,o)=>e.addEventListener(t,n,o||!1),O=["<iy><yi>Puchspk Spjluzl Rlf</><iy><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."];Object.fromEntries(["2cgs7fdf4xb","1c9ctcccr4z","1q2pc4eebgb","ueokt0969w","w2zxchhgqz","1umuxblj2e5"].map(((e,t)=>[e,Math.max(0,t-1)])));const j=e=>(e=>e.replace(/[A-Za-z]/g,(e=>String.fromCodePoint((e<="Z"?90:122)>=(e=e.codePointAt(0)+19)?e:e-26))))(O[e]),k=(e,...t)=>setTimeout((()=>e(...t)),0),T=e=>{let t=!1;return function(){return t?void 0:(t=!0,Reflect.apply(e,this,arguments))}},M=e=>e,C=e=>Math.round(1e3*e)/1e3,x=e=>e.charAt(0).toUpperCase()+e.slice(1),I=e=>""!=`${e}`&&void 0!==e;const P=(e,t,n)=>{if(typeof e!==t)throw new TypeError(`${n} is not a ${x(t)}`)};let A=!0;var N;const R=(N=e,N?.__esModule?N.default:N)({label:"iframeResizer(child)"});var B;const q=(B="log",(...e)=>!A||R[B](...e)),{assert:L,debug:W,endAutoGroup:F,error:D,errorBoundary:H,event:V,label:U,purge:Z,warn:J}=R,_=e=>{return R.warn((t=M,e=>window.chrome?t(e.replaceAll("<br>","\n").replaceAll("<rb>","").replaceAll("</>","").replaceAll("<b>","").replaceAll("<i>","").replaceAll("<u>","")):t(e.replaceAll("<br>","\n").replaceAll(/<[/a-z]+>/gi,"")))(e));var t},Q=_,Y=(e=>(t,n="renamed to")=>(o,r,i="",a="")=>e(a,`<rb>Deprecated ${t}(${o.replace("()","")})</>\n\nThe <b>${o}</> ${t.toLowerCase()} has been ${n} <b>${r}</>. ${i}Use of the old ${t.toLowerCase()} will be removed in a future version of <i>iframe-resizer</>.`))(((e,t)=>_(t))),G=Y("Method"),X=Y("Method","replaced with"),K=Y("Option"),ee=["min-height","min-width","max-height","max-width"],te=new Set,ne=(e,t)=>window.getComputedStyle(e).getPropertyValue(t),oe=(e,t)=>{return(n=ne(e,t))&&"0px"!==n&&"auto"!==n&&"none"!==n;var n};function re({href:e}){te.has(e)||te.add(e)}const ie=(e,t)=>function(e,t){const n=e.style[t];return n?{source:"an inline style attribute",value:n}:null}(e,t)||function(e,t){for(const n of document.styleSheets)try{for(const o of n.cssRules||[])if(o.selectorText&&e.matches(o.selectorText)){const e=o.style[t];if(e)return{source:"STYLE"===n.ownerNode.tagName?"an inline <style> block":`stylesheet (${n.href})`,value:e}}}catch(e){re(n)}return{source:"cross-origin stylesheet",value:ne(e,t)}}(e,t),ae=(e,t)=>{const{source:n,value:o}=ie(e,t),r=(e=>e.tagName?e.tagName.toLowerCase():"unknown")(e);_(`The <b>${t}</> CSS property is set to <b>${o}</> on the <b><${r}></> element via ${n}. This may cause issues with the correct operation of <i>iframe-resizer</>.\n\nIf you wish to restrict the size of the iframe, then you should set this property on the iframe element itself, not the content inside it.`)};function se(){for(const e of[document.documentElement,document.body])for(const t of ee)oe(e,t)&&ae(e,t)}const le=e=>t=>void 0===t?void 0:e(t),ce=le((e=>"true"===e)),ue=le(Number),de="--ifr-start",me="--ifr-end",fe=[],pe=new WeakSet,he=e=>"object"==typeof e&&pe.add(e);let ye={},ge=0;const be=setInterval((()=>{if(fe.length<10)return;if(ye.hasTags&&ye.len<25)return;fe.sort();const e=Math.min(fe.reduce(((e,t)=>e+t),0)/fe.length,fe[Math.floor(fe.length/2)]),t=C(e);t>ge&&(ge=t,V("performanceObserver")),e<=4||(clearInterval(be),_(`<rb>Performance Warning</>\n\nCalculating the page size is taking an excessive amount of time (${C(e)}ms).\n\nTo improve performance add the <b>data-iframe-size</> attribute to the ${ye.Side.toLowerCase()} most element on the page. For more details see: <u>https://iframe-resizer.com/perf</>.`))}),5e3);function ve(e){e.getEntries().forEach((e=>{if(e.name===me){const{duration:t}=performance.measure("--ifr-measure",de,me);ye=e.detail,fe.push(t),fe.length>100&&fe.shift()}}))}function ze(){new PerformanceObserver(ve).observe({entryTypes:["mark"]}),he(document.documentElement),he(document.body)}"undefined"!=typeof document&&"undefined"!=typeof PerformanceObserver&&("loading"===document.readyState?document.addEventListener("DOMContentLoaded",ze):ze());const we=e=>(t,n)=>{if(n in t){if(typeof t[n]===e)return t[n];throw new TypeError(`${n} is not a ${e}.`)}},$e=we("function"),Se=we("number"),Ee=we("string");"undefined"!=typeof window&&function(){const e={height:()=>(J("Custom height calculation function not defined"),St.auto()),width:()=>(J("Custom width calculation function not defined"),Et.auto())},O={bodyOffset:1,bodyScroll:1,offset:1,documentElementOffset:1,documentElementScroll:1,boundingClientRect:1,max:1,min:1,grow:1,lowestElement:1},C={},N="auto",B="[iFrameSizer]",W="scroll";let D,Y,ee,te,ne,oe=!0,re="",ie=0,ae="",le="",fe=!1,pe=!0,he=!1,ye=!0,ge=!1,be=!1,ve=!1,ze=1,we=N,Oe="",je=!0,ke={},Te=!0,Me=!1,Ce="",xe=0,Ie=!1,Pe="",Ae=M,Ne=[],Re="child",Be=null,qe=!1,Le="",We=[],Fe=window.parent,De="*",He=0,Ve=!1,Ue=1,Ze=W,Je=window,_e=()=>{J("onMessage function not defined")},Qe=()=>{},Ye=null,Ge=null;function Xe(t){var o,r,i;!function(e){Pe=e[0]??Pe,ie=ue(e[1])??ie,he=ce(e[2])??he,Me=ce(e[3])??Me,oe=ce(e[6])??oe,ae=e[7]??ae,we=e[8]??we,re=e[9]??re,le=e[10]??le,He=ue(e[11])??He,ke.enable=ce(e[12])??!1,Re=e[13]??Re,Ze=e[14]??Ze,Ie=ce(e[15])??Ie,D=ue(e[16])??D,Y=ue(e[17])??Y,pe=ce(e[18])??pe,Ce=e[19]??Ce,te=e[20]??te,xe=ue(e[21])??xe,Te=ce(e[23])??Te}(t),o={id:Pe,enabled:Me,expand:Te},R.label(`${o.id}`),R.expand(o.expand),A=o.enabled,function(){function t(e){ne=$e(e,"onBeforeResize")??ne,_e=$e(e,"onMessage")??_e,Qe=$e(e,"onReady")??Qe,"number"==typeof e?.offset&&(K("offset","offsetSize"),pe&&(D=Se(e,"offset")??D),he&&(Y=Se(e,"offset")??Y)),"number"==typeof e?.offsetSize&&(pe&&(D=Se(e,"offsetSize")??D),he&&(Y=Se(e,"offsetSize")??Y)),Oe=Ee(e,"ignoreSelector")??Oe,Le=Ee(e,"sizeSelector")??Le,De=Ee(e,"targetOrigin")??De,we=e?.heightCalculationMethod||we,Ze=e?.widthCalculationMethod||Ze}function o(t,n){return"function"==typeof t&&(_(`<rb>Deprecated Option(${n}CalculationMethod)</>\n\nThe use of <b>${n}CalculationMethod</> as a function is deprecated and will be removed in a future version of <i>iframe-resizer</>. Please use the new <b>onBeforeResize</> event handler instead.\n\nSee <u>https://iframe-resizer.com/api/child</> for more details.`),e[n]=t,t="custom"),t}if(1===xe)return;const r=window.iframeResizer||window.iFrameResizer;"object"==typeof r&&(t(r),we=o(we,"height"),Ze=o(Ze,"width"),q(`Set targetOrigin for parent: %c${De}`,n))}(),lt(),function(){try{qe=1===xe||"iframeParentListener"in window.parent}catch(e){}}(),he===pe&&(fe=!0),xe<0?Q(`${j(xe+2)}${j(2)}`):te?.codePointAt(0)>4||xe<2&&Q(j(3)),te&&""!==te&&"false"!==te?te!==a&&_(`<b>Version mismatch</>\n\nThe parent and child pages are running different versions of <i>iframe resizer</>.\n\nParent page: ${te} - Child page: ${a}.\n`):_("<rb>Legacy version detected on parent page</>\n\nDetected legacy version of parent page script. It is recommended to update the parent page to use <b>@iframe-resizer/parent</>.\n\nSee <u>https://iframe-resizer.com/setup/</> for more details.\n"),dt(),mt(),function(){let e=!1;const t=t=>document.querySelectorAll(`[${t}]`).forEach((n=>{e=!0,n.removeAttribute(t),n.toggleAttribute(l,!0)}));t("data-iframe-height"),t("data-iframe-width"),e&&_("<rb>Deprecated Attributes</>\n \nThe <b>data-iframe-height</> and <b>data-iframe-width</> attributes have been deprecated and replaced with the single <b>data-iframe-size</> attribute. Use of the old attributes will be removed in a future version of <i>iframe-resizer</>.")}(),"BackCompat"===document.compatMode&&_("<rb>Quirks Mode Detected</>\n\nThis iframe is running in the browser's legacy <b>Quirks Mode</>, this may cause issues with the correct operation of <i>iframe-resizer</>. It is recommended that you switch to the modern <b>Standards Mode</>.\n\nFor more information see <u>https://iframe-resizer.com/quirks-mode</>.\n"),nt(),fe||se(),1!==xe&&(Je.parentIframe=Object.freeze({autoResize:e=>(P(e,"boolean","parentIframe.autoResize(enable) enable"),!1===he&&!1===pe?(V(f),_(`Auto Resize can not be changed when <b>direction</> is set to '${$}'.`),!1):(!0===e&&!1===oe?(oe=!0,queueMicrotask((()=>Mt(f,"Auto Resize enabled")))):!1===e&&!0===oe&&(oe=!1),xt(0,0,"autoResize",JSON.stringify(oe)),oe)),close(){xt(0,0,"close")},getId:()=>Pe,getOrigin:()=>(G("getOrigin()","getParentOrigin()"),ee),getParentOrigin:()=>ee,getPageInfo(e){if("function"==typeof e)return Ye=e,xt(0,0,"pageInfo"),void X("getPageInfo()","getParentProps()","See <u>https://iframe-resizer.com/upgrade</> for details. ");Ye=null,xt(0,0,"pageInfoStop")},getParentProps:e=>(P(e,"function","parentIframe.getParentProps(callback) callback"),Ge=e,xt(0,0,"parentInfo"),()=>{Ge=null,xt(0,0,"parentInfoStop")}),getParentProperties(e){G("getParentProperties()","getParentProps()"),this.getParentProps(e)},moveToAnchor(e){P(e,"string","parentIframe.moveToAnchor(anchor) anchor"),ke.findTarget(e)},reset(){!function(){const e=we;we=N,Ve||(Ve=!0,requestAnimationFrame((()=>{Ve=!1}))),Ct("reset"),we=e}()},setOffsetSize(e){P(e,"number","parentIframe.setOffsetSize(offset) offset"),D=e,Y=e,Mt(b,`parentIframe.setOffsetSize(${e})`)},scrollBy(e,t){P(e,"number","parentIframe.scrollBy(x, y) x"),P(t,"number","parentIframe.scrollBy(x, y) y"),xt(t,e,"scrollBy")},scrollTo(e,t){P(e,"number","parentIframe.scrollTo(x, y) x"),P(t,"number","parentIframe.scrollTo(x, y) y"),xt(t,e,"scrollTo")},scrollToOffset(e,t){P(e,"number","parentIframe.scrollToOffset(x, y) x"),P(t,"number","parentIframe.scrollToOffset(x, y) y"),xt(t,e,"scrollToOffset")},sendMessage(e,t){t&&P(t,"string","parentIframe.sendMessage(msg, targetOrigin) targetOrigin"),xt(0,0,"message",JSON.stringify(e),t)},setHeightCalculationMethod(e){we=e,dt()},setWidthCalculationMethod(e){Ze=e,mt()},setTargetOrigin(e){P(e,"string","parentIframe.setTargetOrigin(targetOrigin) targetOrigin"),De=e},resize(e,t){e&&P(e,"number","parentIframe.resize(customHeight, customWidth) customHeight"),t&&P(t,"number","parentIframe.resize(customHeight, customWidth) customWidth"),Mt(h,`parentIframe.resize(${e||""}${t?`,${t}`:""})`,e,t)},size(e,t){G("size()","resize()"),this.resize(e,t)}}),Je.parentIFrame=Je.parentIframe),function(){function e(e){xt(0,0,e.type,`${e.screenY}:${e.screenX}`)}function t(t,n){E(window.document,t,e)}!0===Ie&&(t("mouseenter"),t("mouseleave"))}(),ke=function(){const e=()=>({x:document.documentElement.scrollLeft,y:document.documentElement.scrollTop});function t(t){const n=t.getBoundingClientRect(),o=e();return{x:parseInt(n.left,s)+parseInt(o.x,s),y:parseInt(n.top,s)+parseInt(o.y,s)}}function n(e){function n(e){const n=t(e);xt(n.y,n.x,"scrollToOffset")}const o=e.split("#")[1]||e,r=decodeURIComponent(o),i=document.getElementById(r)||document.getElementsByName(r)[0];void 0===i?xt(0,0,"inPageLink",`#${o}`):n(i)}function o(){const{hash:e,href:t}=window.location;""!==e&&"#"!==e&&n(t)}function r(){for(const e of document.querySelectorAll('a[href^="#"]'))"#"!==e.getAttribute("href")&&E(e,"click",(t=>{t.preventDefault(),n(e.getAttribute("href"))}))}function i(){E(window,"hashchange",o)}function a(){setTimeout(o,128)}function l(){r(),i(),a()}return ke.enable&&(1===xe?_("In page linking requires a Professional or Business license. Please see <u>https://iframe-resizer.com/pricing</> for more details."):l()),{findTarget:n}}(),void 0===ae&&(ae=`${ie}px`),at("margin",(r="margin",(i=ae).includes("-")&&(J(`Negative CSS value ignored for ${r}`),i=""),i)),at("background",re),at("padding",le),function(){const e=document.createElement("div");e.style.clear="both",e.style.display="block",e.style.height="0",document.body.append(e)}(),fe||function(){const e=e=>e.style.setProperty("height","auto","important");e(document.documentElement),e(document.body)}(),function(e){ct({method:e,eventType:"After Print",eventName:"afterprint"}),ct({method:e,eventType:"Before Print",eventName:"beforeprint"}),ct({method:e,eventType:"Ready State Change",eventName:"readystatechange"})}("add"),function(){const e=new Set,t=[];let n=!1,o=0;const r=t=>{q("Mutations observed:",t);for(const n of t){const{addedNodes:t,removedNodes:o}=n;for(const n of t)e.add(n);for(const t of o)e.delete(t)}},i=16,a=2,s=200;let c=1;function d(e){lt(),ot(e),e.forEach(ht),e.clear()}function m(){const l=performance.now(),u=l-o;if(u>i*c+++a&&u<s)return q("Backed off due to heavy workload on callStack"),setTimeout(m,i*c),void(o=l);c=1,t.forEach(r),t.length=0,e.size>0&&d(e),nt(),et(),n=!1,Mt(w,"Mutation Observed")}function f(e){t.push(e),n||(o=performance.now(),n=!0,requestAnimationFrame(m))}function p(){const e=new window.MutationObserver(f),t=document.querySelector("body"),n={attributes:!0,attributeFilter:[u,l],attributeOldValue:!1,characterData:!1,characterDataOldValue:!1,childList:!0,subtree:!0};return e.observe(t,n),e}p()}(),Be=new ResizeObserver(ft),Be.observe(document.body),pt.add(document.body),ht(document.body),pe!==he&&(Ae=(e=>{const t=e.side||d,n=e.onChange||M,o={root:e.root,rootMargin:"0px",threshold:1},r=window?.requestAnimationFrame||M,i=(e=!1)=>n(e),a=(e,n)=>0===e||e>n[t],s=(e,t)=>e.toggleAttribute(c,t),l=new IntersectionObserver((function(e){for(const o of e){const{boundingClientRect:e,rootBounds:r,target:i}=o,l=e[t],c=a(l,r)&&!((n=i).hidden||null===n.offsetParent||"none"===n.style.display);s(i,c)}var n;r(i)}),o),u=new WeakSet;return function(e){for(const t of e){const e=t.nodeType===Node.ELEMENT_NODE,n=u.has(t);!n&&e?(l.observe(t),u.add(t)):L(!n,"Node already observed",t)}}})({onChange:tt,root:document.documentElement,side:pe?d:m})),ot(bt(document)()),Ke(T(Qe)),Mt(S,"Init message from host page",void 0,void 0,a),document.title&&""!==document.title&&xt(0,0,"title",document.title)}function Ke(e){"complete"===document.readyState?k(e):E(document,"readystatechange",(()=>Ke(e)))}function et(){const e=document.querySelectorAll(`[${c}]`);Ne=Array.from(e).filter((e=>!e.closest(`[${u}]`))),be=Ne.length>0}function tt(e){et(),(be||e)&&(be?q("Overflowed Elements:",...Ne):q("Overflow removed"),Mt(z,"Overflow updated"))}function nt(){We=document.querySelectorAll(`[${l}]`),ve=We.length>0}function ot(e){ve||Ae(e)}let rt=0;function it(){const e=document.querySelectorAll(`*[${u}]`);ge=e.length>0,ge&&e.length!==rt&&(function(e){const t=1===e.length?"":"s";J(`%c[${u}]%c found on %c${e.length}%c element${t}`,r,i,r,i)}(e),rt=e.length)}function at(e,t){void 0!==t&&""!==t&&"null"!==t&&(document.body.style.setProperty(e,t),q(`Set body ${e}: %c${t}`,n))}function st(e,t,n){if(""!==n)for(const e of document.querySelectorAll(n))e.toggleAttribute(t,!0)}function lt(){st(0,l,Le),st(0,u,Oe)}function ct(e){({add(t){function n(){Mt(e.eventName,e.eventType)}C[t]=n,E(window,t,n,{passive:!0})},remove(e){const t=C[e];var n,o;delete C[e],n=e,o=t,window.removeEventListener(n,o,!1)}})[e.method](e.eventName)}function ut(e,t,n,o){return t!==e&&(e in n||(J(`${e} is not a valid option for ${o}CalculationMethod.`),e=t),e in O)&&_(`<rb>Deprecated ${o}CalculationMethod (${e})</>\n\nThis version of <i>iframe-resizer</> can auto detect the most suitable ${o} calculation method. It is recommended that you ${te?"remove this option.":"set this option to <b>'auto'</> when using an older version of <i>iframe-resizer</> on the parent page."}`),e}function dt(){we=ut(we,N,St,"height")}function mt(){Ze=ut(Ze,W,Et,"width")}function ft(e){if(!Array.isArray(e)||0===e.length)return;const t=e[0].target;Mt(v,`Element resized <${function(e){switch(!0){case!I(e):return"";case I(e.id):return`${e.nodeName}#${e.id}`;case I(e.name):return`${e.nodeName} (${e.name}`;case I(e.className):return`${e.nodeName}.${e.className}`;default:return e.nodeName}}(t)}>`)}const pt=new WeakSet;function ht(e){if(e.nodeType!==Node.ELEMENT_NODE)return;if(!pt.has(e)){const t=getComputedStyle(e)?.position;""!==t&&"static"!==t&&(Be.observe(e),pt.add(e))}const t=bt(e)();for(const e of t){if(pt.has(e)||e?.nodeType!==Node.ELEMENT_NODE)continue;const t=getComputedStyle(e)?.position;""!==t&&"static"!==t&&(Be.observe(e),pt.add(e))}}function yt(e){performance.mark(de);const t=x(e);let n=0,o=document.documentElement,r=ve?0:document.documentElement.getBoundingClientRect().bottom;const i=ve?We:be?Ne:bt(document)();for(const t of i)n=t.getBoundingClientRect()[e]+parseFloat(getComputedStyle(t).getPropertyValue(`margin-${e}`)),n>r&&(r=n,o=t);return q(`${t} position calculated from:`,o),performance.mark(me,{detail:{hasTags:ve,len:i.length,logging:Me,Side:t}}),r}const gt=e=>[e.bodyOffset(),e.bodyScroll(),e.documentElementOffset(),e.documentElementScroll(),e.boundingClientRect()],bt=e=>()=>{it();const t=["* ","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)"];return ge&&t.push(`not([${u}])`,`not([${u}] *)`),e.querySelectorAll(t.join(":"))},vt={height:0,width:0},zt={height:0,width:0},wt=[n,o,n];function $t(e){function t(){return zt[r]=i,vt[r]=l,i}const o=e===St,r=o?"height":"width",i=e.boundingClientRect(),a=Math.ceil(i),s=Math.floor(i),l=(e=>e.documentElementScroll()+Math.max(0,e.getOffset()))(e),c=`HTML: %c${i}px %cPage: %c${l}px`;let u=0;switch(!0){case!e.enabled():return l;case ve:q("Found element with data-iframe-size attribute"),u=e.taggedElement();break;case!be&&0===zt[r]&&0===vt[r]:q(`Initial page size values: ${c}`,...wt),u=t();break;case Ve&&i===zt[r]&&l===vt[r]:q(`Size unchanged: ${c}`,...wt),u=Math.max(i,l);break;case 0===i:q(`Page is hidden: ${c}`,...wt),u=l;break;case!be&&i!==zt[r]&&l<=vt[r]:q(`New <html> size: ${c} `,...wt),q(`Previous <html> size: %c${zt[r]}px`,n),u=t();break;case!o:u=e.taggedElement();break;case!be&&i<zt[r]:q(`<html> size decreased: ${c}`,...wt),u=t();break;case l===s||l===a:q(`<html> size equals page size: ${c}`,...wt),u=t();break;case i>l:q(`Page size < <html> size: ${c}`,...wt),u=t();break;case be:q("Found element overflowing <html> "),u=e.taggedElement();break;default:q(`Using <html> size: ${c}`,...wt),u=t()}return q(`Content ${r}: %c${u}px`,n),u+=function(e){const t=e.getOffset();return 0!==t&&q(`Page offsetSize: %c${t}px`,n),t}(e),u}const St={enabled:()=>pe,getOffset:()=>D,auto:()=>$t(St),bodyOffset:()=>{const{body:e}=document,t=getComputedStyle(e);return e.offsetHeight+parseInt(t.marginTop,s)+parseInt(t.marginBottom,s)},bodyScroll:()=>document.body.scrollHeight,offset:()=>St.bodyOffset(),custom:()=>e.height(),documentElementOffset:()=>document.documentElement.offsetHeight,documentElementScroll:()=>document.documentElement.scrollHeight,boundingClientRect:()=>Math.max(document.documentElement.getBoundingClientRect().bottom,document.body.getBoundingClientRect().bottom),max:()=>Math.max(...gt(St)),min:()=>Math.min(...gt(St)),grow:()=>St.max(),lowestElement:()=>yt(d),taggedElement:()=>yt(d)},Et={enabled:()=>he,getOffset:()=>Y,auto:()=>$t(Et),bodyScroll:()=>document.body.scrollWidth,bodyOffset:()=>document.body.offsetWidth,custom:()=>e.width(),documentElementScroll:()=>document.documentElement.scrollWidth,documentElementOffset:()=>document.documentElement.offsetWidth,boundingClientRect:()=>Math.max(document.documentElement.getBoundingClientRect().right,document.body.getBoundingClientRect().right),max:()=>Math.max(...gt(Et)),min:()=>Math.min(...gt(Et)),rightMostElement:()=>yt(m),scroll:()=>Math.max(Et.bodyScroll(),Et.documentElementScroll()),taggedElement:()=>yt(m)},Ot=(e,t)=>!(Math.abs(e-t)<=He);function jt(e,t){const n=e[t]();return e.enabled()&&void 0!==ne?function(e){const t=ne(e);if(void 0===t)throw new TypeError("No value returned from onBeforeResize(), expected a numeric value");if(Number.isNaN(t))throw new TypeError(`Invalid value returned from onBeforeResize(): ${t}, expected Number`);return t}(n):n}let kt=!1;const Tt=T((()=>Q(j(4)))),Mt=H(((e,t,n,o,r)=>{if(performance.now(),V(e),!0!==kt)return oe||e in g?void(document.hidden||(kt=!0,requestAnimationFrame((()=>{kt=!1})),function(e,t,n,o,r){const i=n??jt(St,we),a=o??jt(Et,Ze);switch(pe&&Ot(ze,i)||he&&Ot(Ue,a)?p:e){case S:case f:case p:ze=i,Ue=a;case b:xt(ze,Ue,e,r);break;case v:case z:case w:Z();break;default:Z(),q("No change in content size detected")}}(e,0,n,o,r))):(q("Resizing disabled"),void F())}));function Ct(e){ze=St[we](),Ue=Et[Ze](),xt(ze,Ue,e)}const xt=H((function(e,o,r,i,a){xe<-1||(V(r),void 0!==a||(a=De),function(){const s=`${Pe}:${e}:${o}:${r}${void 0===i?"":`:${i}`}`;if(qe)try{window.parent.iframeParentListener(B+s)}catch(e){if(1!==xe)throw e;return void Tt()}else Fe.postMessage(B+s,a);q(`Sending message to parent page via ${qe?"sameOrigin":"postMessage"}: %c%c${s}`,t,n)}(),F())})),It=H((function(e){V("onMessage");const{freeze:t}=Object,{parse:n}=JSON,o=e=>xt(0,0,`${e}Stop`),r={init:function(){if("loading"===document.readyState)return;const t=e.data.slice(13).split(":");Fe=e.source,ee=e.origin,Xe(t),ye=!1,setTimeout((()=>{je=!1}),128)},reset(){je||Ct("resetPage")},resize(){Mt(y,"Parent window requested size check")},moveToAnchor(){ke.findTarget(a())},inPageLink(){this.moveToAnchor()},pageInfo(){const e=a();Ye?k(Ye,n(e)):o("pageInfo")},parentInfo(){const e=(r=a(),t(n(r)));var r;Ge?k(Ge,e):o("parentInfo")},message(){const e=a();k(_e,n(e))}},i=()=>e.data.split("]")[1].split(":")[0],a=()=>e.data.slice(e.data.indexOf(":")+1),s=()=>e.data.split(":")[2]in{true:1,false:1};function l(){const t=i();V(t),t in r?r[t]():"iframeResize"in window||void 0!==window.jQuery&&""in window.jQuery.prototype||s()||J(`Unexpected message (${e.data})`)}B===`${e.data}`.slice(0,13)&&function(){if(!1!==ye)return s()?(U(i()),V(S),void r.init()):void 0;l()}()}));function Pt(){"loading"!==document.readyState&&window.parent.postMessage("[iFrameResizerChild]Ready","*")}"iframeChildListener"in window?J("Already setup"):(window.iframeChildListener=e=>setTimeout((()=>It({data:e,sameOrigin:!0}))),E(window,"message",It),E(window,"readystatechange",Pt),Pt())}();
package/index.umd.js CHANGED
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * @preserve
3
3
  *
4
- * @module iframe-resizer/child 5.4.7-beta.3 (umd) - 2025-06-16
4
+ * @module iframe-resizer/child 5.4.7 (umd) - 2025-07-08
5
5
  *
6
6
  * @license GPL-3.0 for non-commercial use only.
7
7
  * For commercial use, you must purchase a license from
@@ -17,5 +17,4 @@
17
17
  */
18
18
 
19
19
 
20
- !function(e){"function"==typeof define&&define.amd?define(e):e()}((function(){"use strict";const e="font-weight: normal;",t="font-weight: bold;",n="font-style: italic;",o=e+n,r="default",i=Object.freeze({assert:!0,error:!0,warn:!0}),a={expand:!0,defaultEvent:void 0,event:void 0,label:"AutoConsoleGroup",showTime:!0},s={profile:0,profileEnd:0,timeStamp:0,trace:0},l=Object.assign(console);const{fromEntries:c,keys:d}=Object,u=e=>[e,l[e]],f=e=>t=>[t,function(n){e[t]=n}],m=(e,t)=>c(d(e).map(t));const p=!(typeof window>"u"||"function"!=typeof window.matchMedia)&&window.matchMedia("(prefers-color-scheme: dark)").matches,g=p?"color: #A9C7FB;":"color: #135CD2;",h=p?"color: #E3E3E3;":"color: #1F1F1F;",y="5.4.7-beta.3",v=10,b="data-iframe-size",z="data-iframe-overflowed",w="data-iframe-ignore",$="bottom",S="right",O="autoResizeEnabled",E=Symbol("sizeChanged"),M="manualResize",k="parentResize",j={[M]:1,[k]:1},I="setOffsetSize",T="resizeObserver",A="overflowObserver",P="mutationObserver",C="No change in content size detected",x="init",R=(e,t,n,o)=>e.addEventListener(t,n,o||!1),N=["<iy><yi>Puchspk Spjluzl Rlf</><iy><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."];Object.fromEntries(["2cgs7fdf4xb","1c9ctcccr4z","1q2pc4eebgb","ueokt0969w","w2zxchhgqz","1umuxblj2e5"].map(((e,t)=>[e,Math.max(0,t-1)])));const q=e=>(e=>e.replace(/[A-Za-z]/g,(e=>String.fromCodePoint((e<="Z"?90:122)>=(e=e.codePointAt(0)+19)?e:e-26))))(N[e]),B=(e,...t)=>setTimeout((()=>e(...t)),0),L=e=>{let t=!1;return function(){return t?void 0:(t=!0,Reflect.apply(e,this,arguments))}},F=e=>e,W=e=>Math.round(1e3*e)/1e3,D=e=>e.charAt(0).toUpperCase()+e.slice(1),H=e=>""!=`${e}`&&void 0!==e;function U(e){switch(!0){case!H(e):return"";case H(e.id):return`${e.nodeName}#${e.id}`;case H(e.name):return`${e.nodeName} (${e.name}`;case H(e.className):return`${e.nodeName}.${e.className}`;default:return e.nodeName}}const V=(e,t,n)=>{if(typeof e!==t)throw new TypeError(`${n} is not a ${D(t)}`)};let Z=!0;const J=(_=function(n={}){const c={},d={},p=[],g={...a,expand:!n.collapsed||a.expanded,...n};let h="";function y(){p.length=0,h=""}function v(){delete g.event,y()}const b=()=>!!p.some((([e])=>e in i))||!!g.expand;function z(){if(0!==p.length){l[b()?"group":"groupCollapsed"](`%c${g.label}%c ${(e=>{const t=e.event||e.defaultEvent;return t?`${t}`:""})(g)} %c${g.showTime?h:""}`,e,t,o);for(const[e,...t]of p)l.assert(e in l,`Unknown console method: ${e}`),e in l&&l[e](...t);l.groupEnd(),v()}else v()}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 $(e,...t){0===p.length&&(w(),queueMicrotask((()=>queueMicrotask(z)))),p.push([e,...t])}function S(e=r,...t){c[e]?$("log",`${e}: ${performance.now()-c[e]} ms`,...t):$("timeLog",e,...t)}return{...m(g,f(g)),...m(console,(e=>[e,(...t)=>$(e,...t)])),...m(s,u),assert:function(e,...t){e||$("assert",e,...t)},count:function(e=r){d[e]?d[e]+=1:d[e]=1,$("log",`${e}: ${d[e]}`)},countReset:function(e=r){delete d[e]},endAutoGroup:z,errorBoundary:e=>(...t)=>{let n;try{n=e(...t)}catch(e){if(!Error.prototype.isPrototypeOf(e))throw e;$("error",e)}return n},event:function(e){w(),g.event=e},purge:y,time:function(e=r){w(),c[e]=performance.now()},timeEnd:function(e=r){S(e),delete c[e]},timeLog:S,touch:w}},_?.__esModule?_.default:_);var _;const Q=J({label:"iframeResizer(child)"});const G=(X="log",(...e)=>!Z||Q[X](...e));var X;const Y=G,{assert:K,debug:ee,endAutoGroup:te,error:ne,errorBoundary:oe,event:re,label:ie,purge:ae,warn:se}=Q,le=e=>{return Q.warn((t=F,e=>window.chrome?t(e.replaceAll("<br>","\n").replaceAll("<rb>","").replaceAll("</>","").replaceAll("<b>","").replaceAll("<i>","").replaceAll("<u>","")):t(e.replaceAll("<br>","\n").replaceAll(/<[/a-z]+>/gi,"")))(e));var t},ce=le,de=(e=>(t,n="renamed to")=>(o,r,i="",a="")=>e(a,`<rb>Deprecated ${t}(${o.replace("()","")})</>\n\nThe <b>${o}</> ${t.toLowerCase()} has been ${n} <b>${r}</>. ${i}Use of the old ${t.toLowerCase()} will be removed in a future version of <i>iframe-resizer</>.`))(((e,t)=>le(t))),ue=de("Method"),fe=de("Method","replaced with"),me=de("Option"),pe=e=>t=>void 0===t?void 0:e(t),ge=pe((e=>"true"===e)),he=pe(Number),ye="--ifr-start",ve="--ifr-end",be=[],ze=new WeakSet,we=e=>"object"==typeof e&&ze.add(e);let $e={},Se=0;const Oe=setInterval((()=>{if(be.length<10)return;if($e.hasTags&&$e.len<25)return;be.sort();const e=Math.min(be.reduce(((e,t)=>e+t),0)/be.length,be[Math.floor(be.length/2)]),t=W(e);t>Se&&(Se=t,re("performanceObserver"),G("Mean time:",W(be[Math.floor(be.length/2)])),G("Median time:",W(be.reduce(((e,t)=>e+t),0)/be.length)),G("Average time:",t),G("Max time:",W(Math.max(...be)))),e<=4||(clearInterval(Oe),le(`<rb>Performance Warning</>\n\nCalculating the page size is taking an excessive amount of time (${W(e)}ms).\n\nTo improve performance add the <b>data-iframe-size</> attribute to the ${$e.Side.toLowerCase()} most element on the page. For more details see: <u>https://iframe-resizer.com/perf</>.`))}),5e3);function Ee(e){e.getEntries().forEach((e=>{if(e.name===ve){const{duration:t}=performance.measure("--ifr-measure",ye,ve);$e=e.detail,be.push(t),be.length>100&&be.shift()}}))}function Me(){new PerformanceObserver(Ee).observe({entryTypes:["mark"]}),we(document.documentElement),we(document.body)}"undefined"!=typeof document&&"undefined"!=typeof PerformanceObserver&&("loading"===document.readyState?document.addEventListener("DOMContentLoaded",Me):Me());const ke=e=>(t,n)=>{if(n in t){if(typeof t[n]===e)return t[n];throw new TypeError(`${n} is not a ${e}.`)}},je=ke("function"),Ie=ke("number"),Te=ke("string");"undefined"!=typeof window&&function(){const o={height:()=>(se("Custom height calculation function not defined"),Et.auto()),width:()=>(se("Custom width calculation function not defined"),Mt.auto())},r={bodyOffset:1,bodyScroll:1,offset:1,documentElementOffset:1,documentElementScroll:1,boundingClientRect:1,max:1,min:1,grow:1,lowestElement:1},i={},a="auto",s="[iFrameSizer]",l="scroll";let c,d,u,f,m,p,N,H=!0,J="",_=0,X="",ne="",ae=!0,de=!1,pe=!0,be=!1,ze=!1,we=!1,$e=1,Se=a,Oe="",Ee=!0,Me={},ke=!0,Ae=!1,Pe="",Ce=0,xe=!1,Re="",Ne=F,qe=[],Be="child",Le=null,Fe=!1,We="",De=[],He=window.parent,Ue="*",Ve=0,Ze=!1,Je=1,_e=l,Qe=window,Ge=()=>{se("onMessage function not defined")},Xe=()=>{},Ye=null,Ke=null;function et(e){var t,n,r;!function(e){Re=e[0]??Re,_=he(e[1])??_,de=ge(e[2])??de,Ae=ge(e[3])??Ae,H=ge(e[6])??H,X=e[7]??X,Se=e[8]??Se,J=e[9]??J,ne=e[10]??ne,Ve=he(e[11])??Ve,Me.enable=ge(e[12])??!1,Be=e[13]??Be,_e=e[14]??_e,xe=ge(e[15])??xe,c=he(e[16])??c,d=he(e[17])??d,ae=ge(e[18])??ae,Pe=e[19]??Pe,p=e[20]??p,Ce=he(e[21])??Ce,ke=ge(e[23])??ke}(e),t={id:Re,enabled:Ae,expand:ke},Q.label(`${t.id}`),Q.expand(t.expand),Z=t.enabled,G(`Initialising iframe v${y} ${window.location.href}`),function(){function e(e){G("Reading data from page:",e),N=je(e,"onBeforeResize")??N,Ge=je(e,"onMessage")??Ge,Xe=je(e,"onReady")??Xe,"number"==typeof e?.offset&&(me("offset","offsetSize"),ae&&(c=Ie(e,"offset")??c),de&&(d=Ie(e,"offset")??d)),"number"==typeof e?.offsetSize&&(ae&&(c=Ie(e,"offsetSize")??c),de&&(d=Ie(e,"offsetSize")??d)),Oe=Te(e,"ignoreSelector")??Oe,We=Te(e,"sizeSelector")??We,Ue=Te(e,"targetOrigin")??Ue,Se=e?.heightCalculationMethod||Se,_e=e?.widthCalculationMethod||_e}function t(e,t){return"function"==typeof e&&(le(`<rb>Deprecated Option(${t}CalculationMethod)</>\n\nThe use of <b>${t}CalculationMethod</> as a function is deprecated and will be removed in a future version of <i>iframe-resizer</>. Please use the new <b>onBeforeResize</> event handler instead.\n\nSee <u>https://iframe-resizer.com/api/child</> for more details.`),o[t]=e,e="custom"),e}if(1===Ce)return;const n=window.iframeResizer||window.iFrameResizer;"object"==typeof n&&(e(n),Se=t(Se,"height"),_e=t(_e,"width"),Y(`Set targetOrigin for parent: %c${Ue}`,g))}(),dt(),function(){try{Fe=1===Ce||"iframeParentListener"in window.parent}catch(e){G("Cross domain iframe detected")}}(),Ce<0?ce(`${q(Ce+2)}${q(2)}`):p?.codePointAt(0)>4||Ce<2&&ce(q(3)),p&&""!==p&&"false"!==p?p!==y&&le(`<b>Version mismatch</>\n\nThe parent and child pages are running different versions of <i>iframe resizer</>.\n\nParent page: ${p} - Child page: ${y}.\n`):le("<rb>Legacy version detected on parent page</>\n\nDetected legacy version of parent page script. It is recommended to update the parent page to use <b>@iframe-resizer/parent</>.\n\nSee <u>https://iframe-resizer.com/setup/</> for more details.\n"),mt(),pt(),function(){let e=!1;const t=t=>document.querySelectorAll(`[${t}]`).forEach((n=>{e=!0,n.removeAttribute(t),n.toggleAttribute(b,!0)}));t("data-iframe-height"),t("data-iframe-width"),e&&le("<rb>Deprecated Attributes</>\n \nThe <b>data-iframe-height</> and <b>data-iframe-width</> attributes have been deprecated and replaced with the single <b>data-iframe-size</> attribute. Use of the old attributes will be removed in a future version of <i>iframe-resizer</>.")}(),"BackCompat"===document.compatMode&&le("<rb>Quirks Mode Detected</>\n\nThis iframe is running in the browser's legacy <b>Quirks Mode</>, this may cause issues with the correct operation of <i>iframe-resizer</>. It is recommended that you switch to the modern <b>Standards Mode</>.\n\nFor more information see <u>https://iframe-resizer.com/quirks-mode</>.\n"),rt(),1!==Ce&&(Qe.parentIframe=Object.freeze({autoResize:e=>(V(e,"boolean","parentIframe.autoResize(enable) enable"),!1===de&&!1===ae?(re(O),le("Auto Resize can not be changed when <b>direction</> is set to 'none'."),!1):(!0===e&&!1===H?(H=!0,queueMicrotask((()=>At(O,"Auto Resize enabled")))):!1===e&&!0===H&&(H=!1),Ct(0,0,"autoResize",JSON.stringify(H)),H)),close(){Ct(0,0,"close")},getId:()=>Re,getOrigin:()=>(ue("getOrigin()","getParentOrigin()"),u),getParentOrigin:()=>u,getPageInfo(e){if("function"==typeof e)return Ye=e,Ct(0,0,"pageInfo"),void fe("getPageInfo()","getParentProps()","See <u>https://iframe-resizer.com/upgrade</> for details. ");Ye=null,Ct(0,0,"pageInfoStop")},getParentProps:e=>(V(e,"function","parentIframe.getParentProps(callback) callback"),Ke=e,Ct(0,0,"parentInfo"),()=>{Ke=null,Ct(0,0,"parentInfoStop")}),getParentProperties(e){ue("getParentProperties()","getParentProps()"),this.getParentProps(e)},moveToAnchor(e){V(e,"string","parentIframe.moveToAnchor(anchor) anchor"),Me.findTarget(e)},reset(){!function(){const e=Se;Se=a,G("Reset trigger event: %cparentIframe.reset",g),Ze?G("TriggerLock blocked calculation"):(Ze=!0,ee("Trigger event lock on"),requestAnimationFrame((()=>{Ze=!1,ee("Trigger event lock off")}))),Pt("reset"),Se=e}()},setOffsetSize(e){V(e,"number","parentIframe.setOffsetSize(offset) offset"),c=e,d=e,At(I,`parentIframe.setOffsetSize(${e})`)},scrollBy(e,t){V(e,"number","parentIframe.scrollBy(x, y) x"),V(t,"number","parentIframe.scrollBy(x, y) y"),Ct(t,e,"scrollBy")},scrollTo(e,t){V(e,"number","parentIframe.scrollTo(x, y) x"),V(t,"number","parentIframe.scrollTo(x, y) y"),Ct(t,e,"scrollTo")},scrollToOffset(e,t){V(e,"number","parentIframe.scrollToOffset(x, y) x"),V(t,"number","parentIframe.scrollToOffset(x, y) y"),Ct(t,e,"scrollToOffset")},sendMessage(e,t){t&&V(t,"string","parentIframe.sendMessage(msg, targetOrigin) targetOrigin"),Ct(0,0,"message",JSON.stringify(e),t)},setHeightCalculationMethod(e){Se=e,mt()},setWidthCalculationMethod(e){_e=e,pt()},setTargetOrigin(e){V(e,"string","parentIframe.setTargetOrigin(targetOrigin) targetOrigin"),G(`Set targetOrigin: %c${e}`,g),Ue=e},resize(e,t){e&&V(e,"number","parentIframe.resize(customHeight, customWidth) customHeight"),t&&V(t,"number","parentIframe.resize(customHeight, customWidth) customWidth"),At(M,`parentIframe.resize(${e||""}${t?`,${t}`:""})`,e,t)},size(e,t){ue("size()","resize()"),this.resize(e,t)}}),Qe.parentIFrame=Qe.parentIframe),function(){function e(e){Ct(0,0,e.type,`${e.screenY}:${e.screenX}`)}function t(t,n){G(`Add event listener: %c${n}`,g),R(window.document,t,e)}!0===xe&&(t("mouseenter","Mouse Enter"),t("mouseleave","Mouse Leave"))}(),Me=function(){const e=()=>({x:document.documentElement.scrollLeft,y:document.documentElement.scrollTop});function t(t){const n=t.getBoundingClientRect(),o=e();return{x:parseInt(n.left,v)+parseInt(o.x,v),y:parseInt(n.top,v)+parseInt(o.y,v)}}function n(e){function n(e){const n=t(e);G(`Moving to in page link (%c#${o}%c) at x: %c${n.x}%c y: %c${n.y}`,g,h,g,h,g),Ct(n.y,n.x,"scrollToOffset")}const o=e.split("#")[1]||e,r=decodeURIComponent(o),i=document.getElementById(r)||document.getElementsByName(r)[0];void 0===i?(G(`In page link (#${o}) not found in iFrame, so sending to parent`),Ct(0,0,"inPageLink",`#${o}`)):n(i)}function o(){const{hash:e,href:t}=window.location;""!==e&&"#"!==e&&n(t)}function r(){for(const e of document.querySelectorAll('a[href^="#"]'))"#"!==e.getAttribute("href")&&R(e,"click",(t=>{t.preventDefault(),n(e.getAttribute("href"))}))}function i(){R(window,"hashchange",o)}function a(){setTimeout(o,128)}function s(){G("Setting up location.hash handlers"),r(),i(),a()}return Me.enable?1===Ce?le("In page linking requires a Professional or Business license. Please see <u>https://iframe-resizer.com/pricing</> for more details."):s():G("In page linking not enabled"),{findTarget:n}}(),void 0===X&&(X=`${_}px`),lt("margin",(n="margin",(r=X).includes("-")&&(se(`Negative CSS value ignored for ${n}`),r=""),r)),lt("background",J),lt("padding",ne),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),G("Set HTML & body height: %cauto !important",g)}(),!0!==H&&G("Auto Resize disabled"),function(e){ut({method:e,eventType:"After Print",eventName:"afterprint"}),ut({method:e,eventType:"Before Print",eventName:"beforeprint"}),ut({method:e,eventType:"Ready State Change",eventName:"readystatechange"})}("add"),function(){const e=new Set,t=[];let n=!1,o=0;const r=t=>{Y("Mutations observed:",t);for(const n of t){const{addedNodes:t,removedNodes:o}=n;for(const n of t)e.add(n);for(const t of o)e.delete(t)}},i=16,a=2,s=200;let l=1;function c(e){dt(),it(e),e.forEach(yt),e.clear()}function d(){const u=performance.now(),f=u-o,m=i*l+++a;if(f>m&&f<s)return Y("Backed off due to heavy workload on callStack"),G(`Delay: %c${W(f)}ms %c> Delay limit: %c${m}ms`,g,h,g),setTimeout(d,i*l),void(o=u);l=1,t.forEach(r),t.length=0,e.size>0&&c(e),rt(),nt(),n=!1,At(P,"Mutation Observed")}function u(e){t.push(e),n||(o=performance.now(),n=!0,requestAnimationFrame(d))}function f(){const e=new window.MutationObserver(u),t=document.querySelector("body"),n={attributes:!0,attributeFilter:[w,b],attributeOldValue:!1,characterData:!1,characterDataOldValue:!1,childList:!0,subtree:!0};return G("Setup <body> MutationObserver"),e.observe(t,n),e}f()}(),G("Setup ResizeObserver"),Le=new ResizeObserver(gt),Le.observe(document.body),ht.add(document.body),yt(document.body),ae!==de&&(G("Setup OverflowObserver"),Ne=(e=>{const t=e.side||$,n=e.onChange||F,o={root:e.root,rootMargin:"0px",threshold:1},r=window?.requestAnimationFrame||F,i=(e=!1)=>n(e),a=(e,n)=>0===e||e>n[t],s=(e,t)=>e.toggleAttribute(z,t),l=new IntersectionObserver((function(e){for(const o of e){const{boundingClientRect:e,rootBounds:r,target:i}=o,l=e[t],c=a(l,r)&&!((n=i).hidden||null===n.offsetParent||"none"===n.style.display);s(i,c)}var n;r(i)}),o),c=new WeakSet;return function(e){G("Attached overflowObservers");for(const t of e){const e=t.nodeType===Node.ELEMENT_NODE,n=c.has(t);!n&&e?(l.observe(t),c.add(t)):K(!n,"Node already observed",t)}}})({onChange:ot,root:document.documentElement,side:ae?$:S})),it(zt(document)()),tt(L(Xe)),G("Initialization complete"),At(x,"Init message from host page",void 0,void 0,y),document.title&&""!==document.title&&Ct(0,0,"title",document.title)}function tt(e){"complete"===document.readyState?B(e):R(document,"readystatechange",(()=>tt(e)))}function nt(){const e=document.querySelectorAll(`[${z}]`);qe=Array.from(e).filter((e=>!e.closest(`[${w}]`))),ze=qe.length>0}function ot(e){nt(),(ze||e)&&(ze?Y("Overflowed Elements:",...qe):Y("Overflow removed"),At(A,"Overflow updated"))}function rt(){De=document.querySelectorAll(`[${b}]`),we=De.length>0,G(`Tagged elements found: %c${we}`,g)}function it(e){we||Ne(e)}let at=0;function st(){const n=document.querySelectorAll(`*[${w}]`);be=n.length>0,be&&n.length!==at&&(function(n){const o=1===n.length?"":"s";se(`%c[${w}]%c found on %c${n.length}%c element${o}`,t,e,t,e)}(n),at=n.length)}function lt(e,t){void 0!==t&&""!==t&&"null"!==t&&(document.body.style.setProperty(e,t),Y(`Set body ${e}: %c${t}`,g))}function ct(e,t,n){if(""!==n){G(`${e}: %c${n}`,g);for(const e of document.querySelectorAll(n))G(`Applying ${t} to:`,e),e.toggleAttribute(t,!0)}}function dt(){ct("sizeSelector",b,We),ct("ignoreSelector",w,Oe)}function ut(e){({add(t){function n(){At(e.eventName,e.eventType)}i[t]=n,R(window,t,n,{passive:!0})},remove(e){const t=i[e];var n,o;delete i[e],n=e,o=t,window.removeEventListener(n,o,!1)}})[e.method](e.eventName),G(`${D(e.method)} event listener: %c${e.eventType}`,g)}function ft(e,t,n,o){return t!==e&&(e in n||(se(`${e} is not a valid option for ${o}CalculationMethod.`),e=t),e in r)&&le(`<rb>Deprecated ${o}CalculationMethod (${e})</>\n\nThis version of <i>iframe-resizer</> can auto detect the most suitable ${o} calculation method. It is recommended that you ${p?"remove this option.":"set this option to <b>'auto'</> when using an older version of <i>iframe-resizer</> on the parent page."}`),G(`Set ${o} calculation method: %c${e}`,g),e}function mt(){Se=ft(Se,a,Et,"height")}function pt(){_e=ft(_e,l,Mt,"width")}function gt(e){if(!Array.isArray(e)||0===e.length)return;const t=e[0].target;At(T,`Element resized <${U(t)}>`)}const ht=new WeakSet;function yt(e){if(e.nodeType!==Node.ELEMENT_NODE)return;if(!ht.has(e)){const t=getComputedStyle(e)?.position;""!==t&&"static"!==t&&(Le.observe(e),ht.add(e),G(`Attached resizeObserver: %c${U(e)}`,g))}const t=zt(e)();for(const e of t){if(ht.has(e)||e?.nodeType!==Node.ELEMENT_NODE)continue;const t=getComputedStyle(e)?.position;""!==t&&"static"!==t&&(Le.observe(e),ht.add(e),G(`Attached resizeObserver: %c${U(e)}`,g))}}function vt(e){performance.mark(ye);const t=D(e);let n=0,o=document.documentElement,r=we?0:document.documentElement.getBoundingClientRect().bottom;const i=we?De:ze?qe:zt(document)();for(const t of i)n=t.getBoundingClientRect()[e]+parseFloat(getComputedStyle(t).getPropertyValue(`margin-${e}`)),n>r&&(r=n,o=t);return Y(`${t} position calculated from:`,o),performance.mark(ve,{detail:{hasTags:we,len:i.length,logging:Ae,Side:t}}),r}const bt=e=>[e.bodyOffset(),e.bodyScroll(),e.documentElementOffset(),e.documentElementScroll(),e.boundingClientRect()],zt=e=>()=>{st();const t=["* ","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)"];return be&&t.push(`not([${w}])`,`not([${w}] *)`),e.querySelectorAll(t.join(":"))},wt={height:0,width:0},$t={height:0,width:0},St=[g,h,g];function Ot(e){function t(){return $t[o]=r,wt[o]=s,r}const n=e===Et,o=n?"height":"width",r=e.boundingClientRect(),i=Math.ceil(r),a=Math.floor(r),s=(e=>e.documentElementScroll()+Math.max(0,e.getOffset()))(e),l=`HTML: %c${r}px %cPage: %c${s}px`;let c=0;switch(!0){case!e.enabled():return s;case we:Y("Found element with data-iframe-size attribute"),c=e.taggedElement();break;case!ze&&0===$t[o]&&0===wt[o]:Y(`Initial page size values: ${l}`,...St),c=t();break;case Ze&&r===$t[o]&&s===wt[o]:Y(`Size unchanged: ${l}`,...St),c=Math.max(r,s);break;case 0===r:Y(`Page is hidden: ${l}`,...St),c=s;break;case!ze&&r!==$t[o]&&s<=wt[o]:Y(`New <html> size: ${l} `,...St),Y(`Previous <html> size: %c${$t[o]}px`,g),c=t();break;case!n:c=e.taggedElement();break;case!ze&&r<$t[o]:Y(`<html> size decreased: ${l}`,...St),c=t();break;case s===a||s===i:Y(`<html> size equals page size: ${l}`,...St),c=t();break;case r>s:Y(`Page size < <html> size: ${l}`,...St),c=t();break;case ze:Y("Found element overflowing <html> "),c=e.taggedElement();break;default:Y(`Using <html> size: ${l}`,...St),c=t()}return Y(`Content ${o}: %c${c}px`,g),c+=function(e){const t=e.getOffset();return 0!==t&&Y(`Page offsetSize: %c${t}px`,g),t}(e),c}const Et={enabled:()=>ae,getOffset:()=>c,auto:()=>Ot(Et),bodyOffset:()=>{const{body:e}=document,t=getComputedStyle(e);return e.offsetHeight+parseInt(t.marginTop,v)+parseInt(t.marginBottom,v)},bodyScroll:()=>document.body.scrollHeight,offset:()=>Et.bodyOffset(),custom:()=>o.height(),documentElementOffset:()=>document.documentElement.offsetHeight,documentElementScroll:()=>document.documentElement.scrollHeight,boundingClientRect:()=>Math.max(document.documentElement.getBoundingClientRect().bottom,document.body.getBoundingClientRect().bottom),max:()=>Math.max(...bt(Et)),min:()=>Math.min(...bt(Et)),grow:()=>Et.max(),lowestElement:()=>vt($),taggedElement:()=>vt($)},Mt={enabled:()=>de,getOffset:()=>d,auto:()=>Ot(Mt),bodyScroll:()=>document.body.scrollWidth,bodyOffset:()=>document.body.offsetWidth,custom:()=>o.width(),documentElementScroll:()=>document.documentElement.scrollWidth,documentElementOffset:()=>document.documentElement.offsetWidth,boundingClientRect:()=>Math.max(document.documentElement.getBoundingClientRect().right,document.body.getBoundingClientRect().right),max:()=>Math.max(...bt(Mt)),min:()=>Math.min(...bt(Mt)),rightMostElement:()=>vt(S),scroll:()=>Math.max(Mt.bodyScroll(),Mt.documentElementScroll()),taggedElement:()=>vt(S)},kt=(e,t)=>!(Math.abs(e-t)<=Ve);function jt(e,t){const n=e[t]();return e.enabled()&&void 0!==N?function(e){const t=N(e);if(void 0===t)throw new TypeError("No value returned from onBeforeResize(), expected a numeric value");if(Number.isNaN(t))throw new TypeError(`Invalid value returned from onBeforeResize(): ${t}, expected Number`);return t}(n):n}let It=!1;const Tt=L((()=>ce(q(4)))),At=oe(((e,t,n,o,r)=>{if(m=performance.now(),f=!0,re(e),!0!==It)return H||e in j?void(document.hidden?G("Page hidden - Ignored resize request"):(It=!0,requestAnimationFrame((()=>{It=!1})),function(e,t,n,o,r){const i=n??jt(Et,Se),a=o??jt(Mt,_e),s=ae&&kt($e,i)||de&&kt(Je,a)?E:e;switch(G(`Resize event: %c${t}`,g),s){case x:case O:case E:$e=i,Je=a;case I:Ct($e,Je,e,r);break;case T:case A:case P:G(C);break;default:Y(C)}f=!1}(e,t,n,o,r))):(Y("Resizing disabled"),void te())}));function Pt(e){$e=Et[Se](),Je=Mt[_e](),Ct($e,Je,e)}const Ct=oe((function(e,t,o,r,i){Ce<-1||(re(o),void 0!==i?G(`Message targetOrigin: %c${i}`,g):i=Ue,function(){const a=`${Re}:${e}:${t}:${o}${void 0===r?"":`:${r}`}`;if(Fe)try{window.parent.iframeParentListener(s+a)}catch(e){if(1!==Ce)throw e;return void Tt()}else He.postMessage(s+a,i);f&&G(function(){const e=W(performance.now()-m);return o===x?`Initialised iFrame in %c${e}ms`:`Size calculated in %c${e}ms`}(),g),Y(`Sending message to parent page via ${Fe?"sameOrigin":"postMessage"}: %c%c${a}`,n,g)}(),te())})),xt=oe((function(e){re("onMessage");const{freeze:t}=Object,{parse:n}=JSON,o=e=>t(n(e)),r=e=>Ct(0,0,`${e}Stop`),i={init:function(){if("loading"===document.readyState)return void G("Page not ready, ignoring init message");const t=e.data.slice(13).split(":");He=e.source,u=e.origin,et(t),pe=!1,setTimeout((()=>{Ee=!1}),128)},reset(){Ee?G("Page reset ignored by init"):(G("Page size reset by host page"),Pt("resetPage"))},resize(){G("Resize requested by host page"),At(k,"Parent window requested size check")},moveToAnchor(){Me.findTarget(l())},inPageLink(){this.moveToAnchor()},pageInfo(){const e=l();G("PageInfo received from parent:",o(e)),Ye?B(Ye,n(e)):r("pageInfo")},parentInfo(){const e=o(l());G("ParentInfo received from parent:",e),Ke?B(Ke,e):r("parentInfo")},message(){const e=l();G("onMessage called from parent:%c",g,o(e)),B(Ge,n(e))}},a=()=>e.data.split("]")[1].split(":")[0],l=()=>e.data.slice(e.data.indexOf(":")+1),c=()=>e.data.split(":")[2]in{true:1,false:1};function d(){const t=a();re(t),t in i?i[t]():"iframeResize"in window||void 0!==window.jQuery&&""in window.jQuery.prototype||c()||se(`Unexpected message (${e.data})`)}s===`${e.data}`.slice(0,13)&&function(){if(!1!==pe)return c()?(ie(a()),re(x),void i.init()):void G(`Ignored message of type "${a()}". Received before initialization.`);d()}()}));function Rt(){"loading"!==document.readyState&&window.parent.postMessage("[iFrameResizerChild]Ready","*")}"iframeChildListener"in window?se("Already setup"):(window.iframeChildListener=e=>setTimeout((()=>xt({data:e,sameOrigin:!0}))),R(window,"message",xt),R(window,"readystatechange",Rt),Rt())}()}));
21
- //# sourceMappingURL=index.umd.js.map
20
+ !function(e){"function"==typeof define&&define.amd?define(e):e()}((function(){"use strict";const e="font-weight: normal;",t="font-weight: bold;",n="font-style: italic;",o=e+n,r="default",i=Object.freeze({assert:!0,error:!0,warn:!0}),a={expand:!0,defaultEvent:void 0,event:void 0,label:"AutoConsoleGroup",showTime:!0},s={profile:0,profileEnd:0,timeStamp:0,trace:0},l=Object.assign(console);const{fromEntries:c,keys:u}=Object,d=e=>[e,l[e]],f=e=>t=>[t,function(n){e[t]=n}],m=(e,t)=>c(u(e).map(t));const p=!(typeof window>"u"||"function"!=typeof window.matchMedia)&&window.matchMedia("(prefers-color-scheme: dark)").matches,h=p?"color: #A9C7FB;":"color: #135CD2;",g=p?"color: #E3E3E3;":"color: #1F1F1F;",y="5.4.7",b=10,v="data-iframe-size",z="data-iframe-overflowed",w="data-iframe-ignore",$="bottom",S="right",E="autoResizeEnabled",O=Symbol("sizeChanged"),j="manualResize",k="parentResize",M={[j]:1,[k]:1},T="setOffsetSize",C="resizeObserver",x="overflowObserver",A="mutationObserver",I="none",P="init",N=(e,t,n,o)=>e.addEventListener(t,n,o||!1),R=["<iy><yi>Puchspk Spjluzl Rlf</><iy><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."];Object.fromEntries(["2cgs7fdf4xb","1c9ctcccr4z","1q2pc4eebgb","ueokt0969w","w2zxchhgqz","1umuxblj2e5"].map(((e,t)=>[e,Math.max(0,t-1)])));const B=e=>(e=>e.replace(/[A-Za-z]/g,(e=>String.fromCodePoint((e<="Z"?90:122)>=(e=e.codePointAt(0)+19)?e:e-26))))(R[e]),q=(e,...t)=>setTimeout((()=>e(...t)),0),L=e=>{let t=!1;return function(){return t?void 0:(t=!0,Reflect.apply(e,this,arguments))}},F=e=>e,W=e=>Math.round(1e3*e)/1e3,D=e=>e.charAt(0).toUpperCase()+e.slice(1),H=e=>""!=`${e}`&&void 0!==e;const U=(e,t,n)=>{if(typeof e!==t)throw new TypeError(`${n} is not a ${D(t)}`)};let V=!0;const Z=(J=function(n={}){const c={},u={},p=[],h={...a,expand:!n.collapsed||a.expanded,...n};let g="";function y(){p.length=0,g=""}function b(){delete h.event,y()}const v=()=>!!p.some((([e])=>e in i))||!!h.expand;function z(){if(0!==p.length){l[v()?"group":"groupCollapsed"](`%c${h.label}%c ${(e=>{const t=e.event||e.defaultEvent;return t?`${t}`:""})(h)} %c${h.showTime?g:""}`,e,t,o);for(const[e,...t]of p)l.assert(e in l,`Unknown console method: ${e}`),e in l&&l[e](...t);l.groupEnd(),b()}else b()}function w(){""===g&&(g=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 $(e,...t){0===p.length&&(w(),queueMicrotask((()=>queueMicrotask(z)))),p.push([e,...t])}function S(e=r,...t){c[e]?$("log",`${e}: ${performance.now()-c[e]} ms`,...t):$("timeLog",e,...t)}return{...m(h,f(h)),...m(console,(e=>[e,(...t)=>$(e,...t)])),...m(s,d),assert:function(e,...t){e||$("assert",e,...t)},count:function(e=r){u[e]?u[e]+=1:u[e]=1,$("log",`${e}: ${u[e]}`)},countReset:function(e=r){delete u[e]},endAutoGroup:z,errorBoundary:e=>(...t)=>{let n;try{n=e(...t)}catch(e){if(!Error.prototype.isPrototypeOf(e))throw e;$("error",e)}return n},event:function(e){w(),h.event=e},purge:y,time:function(e=r){w(),c[e]=performance.now()},timeEnd:function(e=r){S(e),delete c[e]},timeLog:S,touch:w}},J?.__esModule?J.default:J);var J;const _=Z({label:"iframeResizer(child)"});var Q;const G=(Q="log",(...e)=>!V||_[Q](...e)),{assert:Y,debug:X,endAutoGroup:K,error:ee,errorBoundary:te,event:ne,label:oe,purge:re,warn:ie}=_,ae=e=>{return _.warn((t=F,e=>window.chrome?t(e.replaceAll("<br>","\n").replaceAll("<rb>","").replaceAll("</>","").replaceAll("<b>","").replaceAll("<i>","").replaceAll("<u>","")):t(e.replaceAll("<br>","\n").replaceAll(/<[/a-z]+>/gi,"")))(e));var t},se=ae,le=(e=>(t,n="renamed to")=>(o,r,i="",a="")=>e(a,`<rb>Deprecated ${t}(${o.replace("()","")})</>\n\nThe <b>${o}</> ${t.toLowerCase()} has been ${n} <b>${r}</>. ${i}Use of the old ${t.toLowerCase()} will be removed in a future version of <i>iframe-resizer</>.`))(((e,t)=>ae(t))),ce=le("Method"),ue=le("Method","replaced with"),de=le("Option"),fe=["min-height","min-width","max-height","max-width"],me=new Set,pe=(e,t)=>window.getComputedStyle(e).getPropertyValue(t),he=(e,t)=>{return(n=pe(e,t))&&"0px"!==n&&"auto"!==n&&"none"!==n;var n};function ge({href:e}){me.has(e)||me.add(e)}const ye=(e,t)=>function(e,t){const n=e.style[t];return n?{source:"an inline style attribute",value:n}:null}(e,t)||function(e,t){for(const n of document.styleSheets)try{for(const o of n.cssRules||[])if(o.selectorText&&e.matches(o.selectorText)){const e=o.style[t];if(e)return{source:"STYLE"===n.ownerNode.tagName?"an inline <style> block":`stylesheet (${n.href})`,value:e}}}catch(e){ge(n)}return{source:"cross-origin stylesheet",value:pe(e,t)}}(e,t),be=(e,t)=>{const{source:n,value:o}=ye(e,t),r=(e=>e.tagName?e.tagName.toLowerCase():"unknown")(e);ae(`The <b>${t}</> CSS property is set to <b>${o}</> on the <b><${r}></> element via ${n}. This may cause issues with the correct operation of <i>iframe-resizer</>.\n\nIf you wish to restrict the size of the iframe, then you should set this property on the iframe element itself, not the content inside it.`)};function ve(){for(const e of[document.documentElement,document.body])for(const t of fe)he(e,t)&&be(e,t)}const ze=e=>t=>void 0===t?void 0:e(t),we=ze((e=>"true"===e)),$e=ze(Number),Se="--ifr-start",Ee="--ifr-end",Oe=[],je=new WeakSet,ke=e=>"object"==typeof e&&je.add(e);let Me={},Te=0;const Ce=setInterval((()=>{if(Oe.length<10)return;if(Me.hasTags&&Me.len<25)return;Oe.sort();const e=Math.min(Oe.reduce(((e,t)=>e+t),0)/Oe.length,Oe[Math.floor(Oe.length/2)]),t=W(e);t>Te&&(Te=t,ne("performanceObserver")),e<=4||(clearInterval(Ce),ae(`<rb>Performance Warning</>\n\nCalculating the page size is taking an excessive amount of time (${W(e)}ms).\n\nTo improve performance add the <b>data-iframe-size</> attribute to the ${Me.Side.toLowerCase()} most element on the page. For more details see: <u>https://iframe-resizer.com/perf</>.`))}),5e3);function xe(e){e.getEntries().forEach((e=>{if(e.name===Ee){const{duration:t}=performance.measure("--ifr-measure",Se,Ee);Me=e.detail,Oe.push(t),Oe.length>100&&Oe.shift()}}))}function Ae(){new PerformanceObserver(xe).observe({entryTypes:["mark"]}),ke(document.documentElement),ke(document.body)}"undefined"!=typeof document&&"undefined"!=typeof PerformanceObserver&&("loading"===document.readyState?document.addEventListener("DOMContentLoaded",Ae):Ae());const Ie=e=>(t,n)=>{if(n in t){if(typeof t[n]===e)return t[n];throw new TypeError(`${n} is not a ${e}.`)}},Pe=Ie("function"),Ne=Ie("number"),Re=Ie("string");"undefined"!=typeof window&&function(){const o={height:()=>(ie("Custom height calculation function not defined"),St.auto()),width:()=>(ie("Custom width calculation function not defined"),Et.auto())},r={bodyOffset:1,bodyScroll:1,offset:1,documentElementOffset:1,documentElementScroll:1,boundingClientRect:1,max:1,min:1,grow:1,lowestElement:1},i={},a="auto",s="[iFrameSizer]",l="scroll";let c,u,d,f,m,p=!0,R="",W=0,Z="",J="",Q=!1,X=!0,ee=!1,le=!0,fe=!1,me=!1,pe=!1,he=1,ge=a,ye="",be=!0,ze={},Oe=!0,je=!1,ke="",Me=0,Te=!1,Ce="",xe=F,Ae=[],Ie="child",Be=null,qe=!1,Le="",Fe=[],We=window.parent,De="*",He=0,Ue=!1,Ve=1,Ze=l,Je=window,_e=()=>{ie("onMessage function not defined")},Qe=()=>{},Ge=null,Ye=null;function Xe(e){var t,n,r;!function(e){Ce=e[0]??Ce,W=$e(e[1])??W,ee=we(e[2])??ee,je=we(e[3])??je,p=we(e[6])??p,Z=e[7]??Z,ge=e[8]??ge,R=e[9]??R,J=e[10]??J,He=$e(e[11])??He,ze.enable=we(e[12])??!1,Ie=e[13]??Ie,Ze=e[14]??Ze,Te=we(e[15])??Te,c=$e(e[16])??c,u=$e(e[17])??u,X=we(e[18])??X,ke=e[19]??ke,f=e[20]??f,Me=$e(e[21])??Me,Oe=we(e[23])??Oe}(e),t={id:Ce,enabled:je,expand:Oe},_.label(`${t.id}`),_.expand(t.expand),V=t.enabled,function(){function e(e){m=Pe(e,"onBeforeResize")??m,_e=Pe(e,"onMessage")??_e,Qe=Pe(e,"onReady")??Qe,"number"==typeof e?.offset&&(de("offset","offsetSize"),X&&(c=Ne(e,"offset")??c),ee&&(u=Ne(e,"offset")??u)),"number"==typeof e?.offsetSize&&(X&&(c=Ne(e,"offsetSize")??c),ee&&(u=Ne(e,"offsetSize")??u)),ye=Re(e,"ignoreSelector")??ye,Le=Re(e,"sizeSelector")??Le,De=Re(e,"targetOrigin")??De,ge=e?.heightCalculationMethod||ge,Ze=e?.widthCalculationMethod||Ze}function t(e,t){return"function"==typeof e&&(ae(`<rb>Deprecated Option(${t}CalculationMethod)</>\n\nThe use of <b>${t}CalculationMethod</> as a function is deprecated and will be removed in a future version of <i>iframe-resizer</>. Please use the new <b>onBeforeResize</> event handler instead.\n\nSee <u>https://iframe-resizer.com/api/child</> for more details.`),o[t]=e,e="custom"),e}if(1===Me)return;const n=window.iframeResizer||window.iFrameResizer;"object"==typeof n&&(e(n),ge=t(ge,"height"),Ze=t(Ze,"width"),G(`Set targetOrigin for parent: %c${De}`,h))}(),lt(),function(){try{qe=1===Me||"iframeParentListener"in window.parent}catch(e){}}(),ee===X&&(Q=!0),Me<0?se(`${B(Me+2)}${B(2)}`):f?.codePointAt(0)>4||Me<2&&se(B(3)),f&&""!==f&&"false"!==f?f!==y&&ae(`<b>Version mismatch</>\n\nThe parent and child pages are running different versions of <i>iframe resizer</>.\n\nParent page: ${f} - Child page: ${y}.\n`):ae("<rb>Legacy version detected on parent page</>\n\nDetected legacy version of parent page script. It is recommended to update the parent page to use <b>@iframe-resizer/parent</>.\n\nSee <u>https://iframe-resizer.com/setup/</> for more details.\n"),dt(),ft(),function(){let e=!1;const t=t=>document.querySelectorAll(`[${t}]`).forEach((n=>{e=!0,n.removeAttribute(t),n.toggleAttribute(v,!0)}));t("data-iframe-height"),t("data-iframe-width"),e&&ae("<rb>Deprecated Attributes</>\n \nThe <b>data-iframe-height</> and <b>data-iframe-width</> attributes have been deprecated and replaced with the single <b>data-iframe-size</> attribute. Use of the old attributes will be removed in a future version of <i>iframe-resizer</>.")}(),"BackCompat"===document.compatMode&&ae("<rb>Quirks Mode Detected</>\n\nThis iframe is running in the browser's legacy <b>Quirks Mode</>, this may cause issues with the correct operation of <i>iframe-resizer</>. It is recommended that you switch to the modern <b>Standards Mode</>.\n\nFor more information see <u>https://iframe-resizer.com/quirks-mode</>.\n"),nt(),Q||ve(),1!==Me&&(Je.parentIframe=Object.freeze({autoResize:e=>(U(e,"boolean","parentIframe.autoResize(enable) enable"),!1===ee&&!1===X?(ne(E),ae(`Auto Resize can not be changed when <b>direction</> is set to '${I}'.`),!1):(!0===e&&!1===p?(p=!0,queueMicrotask((()=>Tt(E,"Auto Resize enabled")))):!1===e&&!0===p&&(p=!1),xt(0,0,"autoResize",JSON.stringify(p)),p)),close(){xt(0,0,"close")},getId:()=>Ce,getOrigin:()=>(ce("getOrigin()","getParentOrigin()"),d),getParentOrigin:()=>d,getPageInfo(e){if("function"==typeof e)return Ge=e,xt(0,0,"pageInfo"),void ue("getPageInfo()","getParentProps()","See <u>https://iframe-resizer.com/upgrade</> for details. ");Ge=null,xt(0,0,"pageInfoStop")},getParentProps:e=>(U(e,"function","parentIframe.getParentProps(callback) callback"),Ye=e,xt(0,0,"parentInfo"),()=>{Ye=null,xt(0,0,"parentInfoStop")}),getParentProperties(e){ce("getParentProperties()","getParentProps()"),this.getParentProps(e)},moveToAnchor(e){U(e,"string","parentIframe.moveToAnchor(anchor) anchor"),ze.findTarget(e)},reset(){!function(){const e=ge;ge=a,Ue||(Ue=!0,requestAnimationFrame((()=>{Ue=!1}))),Ct("reset"),ge=e}()},setOffsetSize(e){U(e,"number","parentIframe.setOffsetSize(offset) offset"),c=e,u=e,Tt(T,`parentIframe.setOffsetSize(${e})`)},scrollBy(e,t){U(e,"number","parentIframe.scrollBy(x, y) x"),U(t,"number","parentIframe.scrollBy(x, y) y"),xt(t,e,"scrollBy")},scrollTo(e,t){U(e,"number","parentIframe.scrollTo(x, y) x"),U(t,"number","parentIframe.scrollTo(x, y) y"),xt(t,e,"scrollTo")},scrollToOffset(e,t){U(e,"number","parentIframe.scrollToOffset(x, y) x"),U(t,"number","parentIframe.scrollToOffset(x, y) y"),xt(t,e,"scrollToOffset")},sendMessage(e,t){t&&U(t,"string","parentIframe.sendMessage(msg, targetOrigin) targetOrigin"),xt(0,0,"message",JSON.stringify(e),t)},setHeightCalculationMethod(e){ge=e,dt()},setWidthCalculationMethod(e){Ze=e,ft()},setTargetOrigin(e){U(e,"string","parentIframe.setTargetOrigin(targetOrigin) targetOrigin"),De=e},resize(e,t){e&&U(e,"number","parentIframe.resize(customHeight, customWidth) customHeight"),t&&U(t,"number","parentIframe.resize(customHeight, customWidth) customWidth"),Tt(j,`parentIframe.resize(${e||""}${t?`,${t}`:""})`,e,t)},size(e,t){ce("size()","resize()"),this.resize(e,t)}}),Je.parentIFrame=Je.parentIframe),function(){function e(e){xt(0,0,e.type,`${e.screenY}:${e.screenX}`)}function t(t,n){N(window.document,t,e)}!0===Te&&(t("mouseenter"),t("mouseleave"))}(),ze=function(){const e=()=>({x:document.documentElement.scrollLeft,y:document.documentElement.scrollTop});function t(t){const n=t.getBoundingClientRect(),o=e();return{x:parseInt(n.left,b)+parseInt(o.x,b),y:parseInt(n.top,b)+parseInt(o.y,b)}}function n(e){function n(e){const n=t(e);xt(n.y,n.x,"scrollToOffset")}const o=e.split("#")[1]||e,r=decodeURIComponent(o),i=document.getElementById(r)||document.getElementsByName(r)[0];void 0===i?xt(0,0,"inPageLink",`#${o}`):n(i)}function o(){const{hash:e,href:t}=window.location;""!==e&&"#"!==e&&n(t)}function r(){for(const e of document.querySelectorAll('a[href^="#"]'))"#"!==e.getAttribute("href")&&N(e,"click",(t=>{t.preventDefault(),n(e.getAttribute("href"))}))}function i(){N(window,"hashchange",o)}function a(){setTimeout(o,128)}function s(){r(),i(),a()}return ze.enable&&(1===Me?ae("In page linking requires a Professional or Business license. Please see <u>https://iframe-resizer.com/pricing</> for more details."):s()),{findTarget:n}}(),void 0===Z&&(Z=`${W}px`),at("margin",(n="margin",(r=Z).includes("-")&&(ie(`Negative CSS value ignored for ${n}`),r=""),r)),at("background",R),at("padding",J),function(){const e=document.createElement("div");e.style.clear="both",e.style.display="block",e.style.height="0",document.body.append(e)}(),Q||function(){const e=e=>e.style.setProperty("height","auto","important");e(document.documentElement),e(document.body)}(),function(e){ct({method:e,eventType:"After Print",eventName:"afterprint"}),ct({method:e,eventType:"Before Print",eventName:"beforeprint"}),ct({method:e,eventType:"Ready State Change",eventName:"readystatechange"})}("add"),function(){const e=new Set,t=[];let n=!1,o=0;const r=t=>{G("Mutations observed:",t);for(const n of t){const{addedNodes:t,removedNodes:o}=n;for(const n of t)e.add(n);for(const t of o)e.delete(t)}},i=16,a=2,s=200;let l=1;function c(e){lt(),ot(e),e.forEach(ht),e.clear()}function u(){const d=performance.now(),f=d-o;if(f>i*l+++a&&f<s)return G("Backed off due to heavy workload on callStack"),setTimeout(u,i*l),void(o=d);l=1,t.forEach(r),t.length=0,e.size>0&&c(e),nt(),et(),n=!1,Tt(A,"Mutation Observed")}function d(e){t.push(e),n||(o=performance.now(),n=!0,requestAnimationFrame(u))}function f(){const e=new window.MutationObserver(d),t=document.querySelector("body"),n={attributes:!0,attributeFilter:[w,v],attributeOldValue:!1,characterData:!1,characterDataOldValue:!1,childList:!0,subtree:!0};return e.observe(t,n),e}f()}(),Be=new ResizeObserver(mt),Be.observe(document.body),pt.add(document.body),ht(document.body),X!==ee&&(xe=(e=>{const t=e.side||$,n=e.onChange||F,o={root:e.root,rootMargin:"0px",threshold:1},r=window?.requestAnimationFrame||F,i=(e=!1)=>n(e),a=(e,n)=>0===e||e>n[t],s=(e,t)=>e.toggleAttribute(z,t),l=new IntersectionObserver((function(e){for(const o of e){const{boundingClientRect:e,rootBounds:r,target:i}=o,l=e[t],c=a(l,r)&&!((n=i).hidden||null===n.offsetParent||"none"===n.style.display);s(i,c)}var n;r(i)}),o),c=new WeakSet;return function(e){for(const t of e){const e=t.nodeType===Node.ELEMENT_NODE,n=c.has(t);!n&&e?(l.observe(t),c.add(t)):Y(!n,"Node already observed",t)}}})({onChange:tt,root:document.documentElement,side:X?$:S})),ot(bt(document)()),Ke(L(Qe)),Tt(P,"Init message from host page",void 0,void 0,y),document.title&&""!==document.title&&xt(0,0,"title",document.title)}function Ke(e){"complete"===document.readyState?q(e):N(document,"readystatechange",(()=>Ke(e)))}function et(){const e=document.querySelectorAll(`[${z}]`);Ae=Array.from(e).filter((e=>!e.closest(`[${w}]`))),me=Ae.length>0}function tt(e){et(),(me||e)&&(me?G("Overflowed Elements:",...Ae):G("Overflow removed"),Tt(x,"Overflow updated"))}function nt(){Fe=document.querySelectorAll(`[${v}]`),pe=Fe.length>0}function ot(e){pe||xe(e)}let rt=0;function it(){const n=document.querySelectorAll(`*[${w}]`);fe=n.length>0,fe&&n.length!==rt&&(function(n){const o=1===n.length?"":"s";ie(`%c[${w}]%c found on %c${n.length}%c element${o}`,t,e,t,e)}(n),rt=n.length)}function at(e,t){void 0!==t&&""!==t&&"null"!==t&&(document.body.style.setProperty(e,t),G(`Set body ${e}: %c${t}`,h))}function st(e,t,n){if(""!==n)for(const e of document.querySelectorAll(n))e.toggleAttribute(t,!0)}function lt(){st(0,v,Le),st(0,w,ye)}function ct(e){({add(t){function n(){Tt(e.eventName,e.eventType)}i[t]=n,N(window,t,n,{passive:!0})},remove(e){const t=i[e];var n,o;delete i[e],n=e,o=t,window.removeEventListener(n,o,!1)}})[e.method](e.eventName)}function ut(e,t,n,o){return t!==e&&(e in n||(ie(`${e} is not a valid option for ${o}CalculationMethod.`),e=t),e in r)&&ae(`<rb>Deprecated ${o}CalculationMethod (${e})</>\n\nThis version of <i>iframe-resizer</> can auto detect the most suitable ${o} calculation method. It is recommended that you ${f?"remove this option.":"set this option to <b>'auto'</> when using an older version of <i>iframe-resizer</> on the parent page."}`),e}function dt(){ge=ut(ge,a,St,"height")}function ft(){Ze=ut(Ze,l,Et,"width")}function mt(e){if(!Array.isArray(e)||0===e.length)return;const t=e[0].target;Tt(C,`Element resized <${function(e){switch(!0){case!H(e):return"";case H(e.id):return`${e.nodeName}#${e.id}`;case H(e.name):return`${e.nodeName} (${e.name}`;case H(e.className):return`${e.nodeName}.${e.className}`;default:return e.nodeName}}(t)}>`)}const pt=new WeakSet;function ht(e){if(e.nodeType!==Node.ELEMENT_NODE)return;if(!pt.has(e)){const t=getComputedStyle(e)?.position;""!==t&&"static"!==t&&(Be.observe(e),pt.add(e))}const t=bt(e)();for(const e of t){if(pt.has(e)||e?.nodeType!==Node.ELEMENT_NODE)continue;const t=getComputedStyle(e)?.position;""!==t&&"static"!==t&&(Be.observe(e),pt.add(e))}}function gt(e){performance.mark(Se);const t=D(e);let n=0,o=document.documentElement,r=pe?0:document.documentElement.getBoundingClientRect().bottom;const i=pe?Fe:me?Ae:bt(document)();for(const t of i)n=t.getBoundingClientRect()[e]+parseFloat(getComputedStyle(t).getPropertyValue(`margin-${e}`)),n>r&&(r=n,o=t);return G(`${t} position calculated from:`,o),performance.mark(Ee,{detail:{hasTags:pe,len:i.length,logging:je,Side:t}}),r}const yt=e=>[e.bodyOffset(),e.bodyScroll(),e.documentElementOffset(),e.documentElementScroll(),e.boundingClientRect()],bt=e=>()=>{it();const t=["* ","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)"];return fe&&t.push(`not([${w}])`,`not([${w}] *)`),e.querySelectorAll(t.join(":"))},vt={height:0,width:0},zt={height:0,width:0},wt=[h,g,h];function $t(e){function t(){return zt[o]=r,vt[o]=s,r}const n=e===St,o=n?"height":"width",r=e.boundingClientRect(),i=Math.ceil(r),a=Math.floor(r),s=(e=>e.documentElementScroll()+Math.max(0,e.getOffset()))(e),l=`HTML: %c${r}px %cPage: %c${s}px`;let c=0;switch(!0){case!e.enabled():return s;case pe:G("Found element with data-iframe-size attribute"),c=e.taggedElement();break;case!me&&0===zt[o]&&0===vt[o]:G(`Initial page size values: ${l}`,...wt),c=t();break;case Ue&&r===zt[o]&&s===vt[o]:G(`Size unchanged: ${l}`,...wt),c=Math.max(r,s);break;case 0===r:G(`Page is hidden: ${l}`,...wt),c=s;break;case!me&&r!==zt[o]&&s<=vt[o]:G(`New <html> size: ${l} `,...wt),G(`Previous <html> size: %c${zt[o]}px`,h),c=t();break;case!n:c=e.taggedElement();break;case!me&&r<zt[o]:G(`<html> size decreased: ${l}`,...wt),c=t();break;case s===a||s===i:G(`<html> size equals page size: ${l}`,...wt),c=t();break;case r>s:G(`Page size < <html> size: ${l}`,...wt),c=t();break;case me:G("Found element overflowing <html> "),c=e.taggedElement();break;default:G(`Using <html> size: ${l}`,...wt),c=t()}return G(`Content ${o}: %c${c}px`,h),c+=function(e){const t=e.getOffset();return 0!==t&&G(`Page offsetSize: %c${t}px`,h),t}(e),c}const St={enabled:()=>X,getOffset:()=>c,auto:()=>$t(St),bodyOffset:()=>{const{body:e}=document,t=getComputedStyle(e);return e.offsetHeight+parseInt(t.marginTop,b)+parseInt(t.marginBottom,b)},bodyScroll:()=>document.body.scrollHeight,offset:()=>St.bodyOffset(),custom:()=>o.height(),documentElementOffset:()=>document.documentElement.offsetHeight,documentElementScroll:()=>document.documentElement.scrollHeight,boundingClientRect:()=>Math.max(document.documentElement.getBoundingClientRect().bottom,document.body.getBoundingClientRect().bottom),max:()=>Math.max(...yt(St)),min:()=>Math.min(...yt(St)),grow:()=>St.max(),lowestElement:()=>gt($),taggedElement:()=>gt($)},Et={enabled:()=>ee,getOffset:()=>u,auto:()=>$t(Et),bodyScroll:()=>document.body.scrollWidth,bodyOffset:()=>document.body.offsetWidth,custom:()=>o.width(),documentElementScroll:()=>document.documentElement.scrollWidth,documentElementOffset:()=>document.documentElement.offsetWidth,boundingClientRect:()=>Math.max(document.documentElement.getBoundingClientRect().right,document.body.getBoundingClientRect().right),max:()=>Math.max(...yt(Et)),min:()=>Math.min(...yt(Et)),rightMostElement:()=>gt(S),scroll:()=>Math.max(Et.bodyScroll(),Et.documentElementScroll()),taggedElement:()=>gt(S)},Ot=(e,t)=>!(Math.abs(e-t)<=He);function jt(e,t){const n=e[t]();return e.enabled()&&void 0!==m?function(e){const t=m(e);if(void 0===t)throw new TypeError("No value returned from onBeforeResize(), expected a numeric value");if(Number.isNaN(t))throw new TypeError(`Invalid value returned from onBeforeResize(): ${t}, expected Number`);return t}(n):n}let kt=!1;const Mt=L((()=>se(B(4)))),Tt=te(((e,t,n,o,r)=>{if(performance.now(),ne(e),!0!==kt)return p||e in M?void(document.hidden||(kt=!0,requestAnimationFrame((()=>{kt=!1})),function(e,t,n,o,r){const i=n??jt(St,ge),a=o??jt(Et,Ze);switch(X&&Ot(he,i)||ee&&Ot(Ve,a)?O:e){case P:case E:case O:he=i,Ve=a;case T:xt(he,Ve,e,r);break;case C:case x:case A:re();break;default:re(),G("No change in content size detected")}}(e,0,n,o,r))):(G("Resizing disabled"),void K())}));function Ct(e){he=St[ge](),Ve=Et[Ze](),xt(he,Ve,e)}const xt=te((function(e,t,o,r,i){Me<-1||(ne(o),void 0!==i||(i=De),function(){const a=`${Ce}:${e}:${t}:${o}${void 0===r?"":`:${r}`}`;if(qe)try{window.parent.iframeParentListener(s+a)}catch(e){if(1!==Me)throw e;return void Mt()}else We.postMessage(s+a,i);G(`Sending message to parent page via ${qe?"sameOrigin":"postMessage"}: %c%c${a}`,n,h)}(),K())})),At=te((function(e){ne("onMessage");const{freeze:t}=Object,{parse:n}=JSON,o=e=>xt(0,0,`${e}Stop`),r={init:function(){if("loading"===document.readyState)return;const t=e.data.slice(13).split(":");We=e.source,d=e.origin,Xe(t),le=!1,setTimeout((()=>{be=!1}),128)},reset(){be||Ct("resetPage")},resize(){Tt(k,"Parent window requested size check")},moveToAnchor(){ze.findTarget(a())},inPageLink(){this.moveToAnchor()},pageInfo(){const e=a();Ge?q(Ge,n(e)):o("pageInfo")},parentInfo(){const e=(r=a(),t(n(r)));var r;Ye?q(Ye,e):o("parentInfo")},message(){const e=a();q(_e,n(e))}},i=()=>e.data.split("]")[1].split(":")[0],a=()=>e.data.slice(e.data.indexOf(":")+1),l=()=>e.data.split(":")[2]in{true:1,false:1};function c(){const t=i();ne(t),t in r?r[t]():"iframeResize"in window||void 0!==window.jQuery&&""in window.jQuery.prototype||l()||ie(`Unexpected message (${e.data})`)}s===`${e.data}`.slice(0,13)&&function(){if(!1!==le)return l()?(oe(i()),ne(P),void r.init()):void 0;c()}()}));function It(){"loading"!==document.readyState&&window.parent.postMessage("[iFrameResizerChild]Ready","*")}"iframeChildListener"in window?ie("Already setup"):(window.iframeChildListener=e=>setTimeout((()=>At({data:e,sameOrigin:!0}))),N(window,"message",At),N(window,"readystatechange",It),It())}()}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iframe-resizer/child",
3
- "version": "5.4.7-beta.3",
3
+ "version": "5.4.7",
4
4
  "license": "GPL-3.0",
5
5
  "homepage": "https://iframe-resizer.com",
6
6
  "author": {