@iframe-resizer/child 5.5.5 → 5.5.6-beta.2

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
@@ -25,4 +25,4 @@ yarn add @iframe-resizer/child
25
25
 
26
26
  ---
27
27
 
28
- _iframe-resizer version 5.5.5 2025-09-01 - 11:10:13.679Z_
28
+ _iframe-resizer version 5.5.6-beta.2 2025-09-05 - 13:24:50.871Z_
package/index.cjs.js CHANGED
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * @preserve
3
3
  *
4
- * @module iframe-resizer/child 5.5.5 (cjs) - 2025-09-01
4
+ * @module iframe-resizer/child 5.5.6-beta.2 (cjs) - 2025-09-05
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,4 +17,5 @@
17
17
  */
18
18
 
19
19
 
20
- "use strict";const e=require("auto-console-group"),t="5.5.5",n="iframeResizer",o="beforeUnload",r="init",i="message",a="pageInfo",s="parentInfo",c="scrollToOffset",l="title",u=10,d="data-iframe-size",f="data-iframe-overflowed",m="data-iframe-ignore",h="height",p="width",g="readystatechange",y="bottom",b="right",v="autoResizeEnabled",z=Symbol("sizeChanged"),w="manualResize",$="parentResize",O={[w]:1,[$]:1},S="setOffsetSize",I="resizeObserver",E="overflowObserver",M="mutationObserver",T="visibilityObserver",k="[iFrameSizer]",j=new Set(["head","body","meta","base","title","script","link","style","map","area","option","optgroup","template","track","wbr","nobr"]),N=(e,t,n,o)=>e.addEventListener(t,n,o||!1),A=e=>{if(!e)return"";let t=-559038744,n=1103547984;for(let o,r=0;r<e.length;r++)o=e.codePointAt(r),t=Math.imul(t^o,2246822519),n=Math.imul(n^o,3266489917);return t^=Math.imul(t^n>>>15,1935289751),n^=Math.imul(n^t>>>15,3405138345),t^=n>>>16,n^=t>>>16,(2097152*(n>>>0)+(t>>>11)).toString(36)},x=e=>e.replace(/[A-Za-z]/g,e=>String.fromCodePoint((e<="Z"?90:122)>=(e=e.codePointAt(0)+19)?e:e-26)),R=["spjluzl","rlf","clyzpvu"],C=["<yi>Puchspk Spjluzl Rlf</><iy><iy>","<yi>Tpzzpun Spjluzl Rlf</><iy><iy>","Aopz spiyhyf pz hchpshisl dpao ivao Jvttlyjphs huk Vwlu-Zvbyjl spjluzlz.<iy><iy><i>Jvttlyjphs Spjluzl</><iy>Mvy jvttlyjphs bzl, <p>pmyhtl-ylzpgly</> ylxbpylz h svd jvza vul aptl spjluzl mll. Mvy tvyl pumvythapvu cpzpa <b>oaawz://pmyhtl-ylzpgly.jvt/wypjpun</>.<iy><iy><i>Vwlu Zvbyjl Spjluzl</><iy>Pm fvb hyl bzpun aopz spiyhyf pu h uvu-jvttlyjphs vwlu zvbyjl wyvqlja aolu fvb jhu bzl pa mvy myll bukly aol alytz vm aol NWS C3 Spjluzl. Av jvumpyt fvb hjjlwa aolzl alytz, wslhzl zla aol <i>spjluzl</> rlf pu <p>pmyhtl-ylzpgly</> vwapvuz av <i>NWSc3</>.<iy><iy>Mvy tvyl pumvythapvu wslhzl zll: <b>oaawz://pmyhtl-ylzpgly.jvt/nws</>","<i>NWSc3 Spjluzl Clyzpvu</><iy><iy>Aopz clyzpvu vm <p>pmyhtl-ylzpgly</> pz ilpun bzlk bukly aol alytz vm aol <i>NWS C3</> spjluzl. Aopz spjluzl hssvdz fvb av bzl <p>pmyhtl-ylzpgly</> pu Vwlu Zvbyjl wyvqljaz, iba pa ylxbpylz fvby wyvqlja av il wbispj, wyvcpkl haaypibapvu huk il spjluzlk bukly clyzpvu 3 vy shaly vm aol NUB Nlulyhs Wbispj Spjluzl.<iy><iy>Pm fvb hyl bzpun aopz spiyhyf pu h uvu-vwlu zvbyjl wyvqlja vy dlizpal, fvb dpss ullk av wbyjohzl h svd jvza vul aptl jvttlyjphs spjluzl.<iy><iy>Mvy tvyl pumvythapvu cpzpa <b>oaawz://pmyhtl-ylzpgly.jvt/wypjpun</>.","<iy><yi>Zvsv spjluzl kvlz uva zbwwvya jyvzz-kvthpu</><iy><iy>Av bzl <p>pmyhtl-ylzpgly</> dpao jyvzz kvthpu pmyhtlz fvb ullk lpaoly aol Wyvmlzzpvuhs vy Ibzpulzz spjluzlz. Mvy klahpsz vu bwnyhkl wypjpun wslhzl jvuahja pumv@pmyhtl-ylzpgly.jvt."],P=["NWSc3","zvsv","wyv","ibzpulzz","vlt"],H=Object.fromEntries(["2cgs7fdf4xb","1c9ctcccr4z","1q2pc4eebgb","ueokt0969w","w2zxchhgqz","1umuxblj2e5"].map((e,t)=>[e,Math.max(0,t-1)])),L=e=>x(C[e]),G=e=>{const t=e[x(R[0])]||e[x(R[1])]||e[x(R[2])];if(!t)return-1;const n=t.split("-");let o=function(e=""){let t=-2;const n=A(x(e));return n in H&&(t=H[n]),t}(n[0]);return 0===o||(e=>e[2]===A(e[0]+e[1]))(n)||(o=-2),o},B=(e,...t)=>setTimeout(()=>e(...t),0),q=e=>{let t=!1;return function(){return t?void 0:(t=!0,Reflect.apply(e,this,arguments))}},D=e=>e,F=e=>Math.round(1e3*e)/1e3,W=e=>e.charAt(0).toUpperCase()+e.slice(1),U=e=>""!=`${e}`&&void 0!==e;const V=(e,t,n)=>{if(typeof e!==t)throw new TypeError(`${n} is not a ${W(t)}`)};let Z=!0,J=n;var _;const Q=(_=e,_?.__esModule?_.default:_)({label:`${n}(child)`,expand:!1});var Y;const X=(Y="log",(...e)=>!Z||Q[Y](...e));const{assert:K,endAutoGroup:ee,error:te,errorBoundary:ne,event:oe,label:re,purge:ie,warn:ae}=Q,se=e=>{return Q.warn((t=D,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=se,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)=>se(t)),ue=le("Method"),de=le("Method","replaced with"),fe=le("Option"),me=["min-height","min-width","max-height","max-width"],he=new Set,pe=(e,t)=>window.getComputedStyle(e).getPropertyValue(t),ge=(e,t)=>{return(n=pe(e,t))&&"0px"!==n&&"auto"!==n&&"none"!==n;var n};function ye({href:e}){he.has(e)||he.add(e)}const be=(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){ye(n)}return{source:"cross-origin stylesheet",value:pe(e,t)}}(e,t),ve=(e,t)=>{const{source:n,value:o}=be(e,t),r=(e=>e.tagName?e.tagName.toLowerCase():"unknown")(e);se(`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 ze(){for(const e of[document.documentElement,document.body])for(const t of me)ge(e,t)&&ve(e,t)}const we=e=>t=>void 0===t?void 0:e(t),$e=we(e=>"true"===e),Oe=we(Number),Se=e=>e=>{e.size},Ie=((e="")=>t=>n=>{n.size>0&&te(`${t}Observer ${e}:`,...Array.from(n).flatMap(e=>["\n",e]))})("already attached"),Ee=e=>e=>{e.size},Me=(t,n=!0)=>o=>{o>0&&X(`${n?"At":"De"}tached ${t}Observer ${n?"to":"from"} %c${o}%c element${1===o?"":"s"}`,e.HIGHLIGHT,e.NORMAL)},Te=(e,t,n,o)=>{const r=Ee(e);return e=>{const i=new Set;let a=0;for(const o of e)n.has(o)&&(t.unobserve(o),n.delete(o),i.add(o),a+=1);r(i),o(a),i.clear()}},ke=new Set,je=new Set,Ne=new Set,Ae=[],xe={attributes:!0,attributeFilter:[m,d],attributeOldValue:!1,characterData:!1,characterDataOldValue:!1,childList:!0,subtree:!0};let Re,Ce=1,Pe=!1,He=0;const Le=e=>{e.size},Ge=e=>{e.size},Be=e=>{e.size},qe=e=>e.nodeType!==Node.ELEMENT_NODE||j.has(e.tagName.toLowerCase());function De(e){const t=e.addedNodes;for(const e of t)qe(e)||ke.add(e)}function Fe(e){const t=e.removedNodes;for(const e of t)qe(e)||(ke.has(e)?(ke.delete(e),Ne.add(e)):je.add(e))}const We=e=>{X("Mutations:",e);for(const t of e)De(t),Fe(t);Le(ke),Ge(je),Be(Ne),Ne.clear()};const Ue=t=>()=>{const n=performance.now(),o=n-He,r=16*Ce+++2;if(o>r&&o<200)return oe("mutationThrottled"),X("Update delayed due to heavy workload on the callStack"),X(`EventLoop busy time: %c${F(o)}ms %c> Max wait: %c${r-2}ms`,e.HIGHLIGHT,e.FOREGROUND,e.HIGHLIGHT),setTimeout(Re,16*Ce),void(He=n);Ce=1,Ae.forEach(We),Ae.length=0,Pe=!1,je.size,ke.size,t({addedNodes:ke,removedNodes:je}),ke.clear(),je.clear()};function Ve(e){Ae.push(e),Pe||(He=performance.now(),Pe=!0,requestAnimationFrame(Re))}function Ze(e){const t=new window.MutationObserver(Ve),n=document.body||document.documentElement;return Re=Ue(e),t.observe(n,xe),X("Attached MutationObserver to body"),{...t,disconnect:()=>{ke.clear(),je.clear(),Ae.length=0,t.disconnect(),X("Detached MutationObserver")}}}const Je="Overflow",_e=Me(Je),Qe=Me(Je,!1),Ye=Se(Je),Xe=Ie(Je),Ke=e=>e.hidden||null===e.offsetParent||"none"===e.style.display,et=(e,t)=>{const n=t.side,o={root:t.root,rootMargin:"0px",threshold:1},r=window?.requestAnimationFrame||D,i=(t=!1)=>e(t),a=(e,t)=>0===e||e>t[n],s=(e,t)=>e.toggleAttribute(f,t);const c=new IntersectionObserver(function(e){for(const t of e){const{boundingClientRect:e,rootBounds:o,target:r}=t;if(!o)continue;const i=e[n],c=a(i,o)&&!Ke(r);s(r,c)}r(i)},o),l=new WeakSet;return{attachObservers:function(e){const t=new Set,n=new Set;let o=0;for(const r of e)r.nodeType===Node.ELEMENT_NODE&&(l.has(r)?t.add(r):(c.observe(r),l.add(r),n.add(r),o+=1));Xe(t),Ye(n),_e(o),n.clear(),t.clear()},detachObservers:Te(Je,c,l,Qe),disconnect:()=>{c.disconnect(),X("Detached OverflowObserver")}}},tt="--ifr-start",nt="--ifr-end",ot="--ifr-measure",rt=[];let it,at={},st=0;function ct(){try{performance.clearMarks(tt),performance.clearMarks(nt),performance.clearMeasures(ot)}catch{}}function lt(e){e.getEntries().forEach(e=>{if(e.name===nt)try{const{duration:t}=performance.measure(ot,tt,nt);at=e.detail,rt.push(t),rt.length>100&&rt.shift()}catch{}})}function ut(){X("Attached PerformanceObserver to page");const e=new PerformanceObserver(lt);return e.observe({entryTypes:["mark"]}),it=setInterval(()=>{if(rt.length<10)return;if(at.hasTags&&at.len<25)return;rt.sort();const e=Math.min(rt.reduce((e,t)=>e+t,0)/rt.length,rt[Math.floor(rt.length/2)]),t=F(e);t>st&&(st=t,oe("performanceObserver")),ct(),e<=4||(clearInterval(it),se(`<rb>Performance Warning</>\n\nCalculating the page size is taking an excessive amount of time (${F(e)}ms).\n\nTo improve performance add the <b>data-iframe-size</> attribute to the ${at.Side.toLowerCase()} most element on the page. For more details see: <u>https://iframe-resizer.com/perf</>.`))},5e3),{disconnect:()=>{ct(),clearInterval(it),e.disconnect(),X("Detached PerformanceObserver")}}}const dt="Resize",ft=Me(dt),mt=Me(dt,!1),ht=Se(dt),pt=Ie(dt),gt=new WeakSet,yt=new Set,bt=new Set;let vt;function zt(e){let t=0;for(const n of e){if(n.nodeType!==Node.ELEMENT_NODE)continue;const e=getComputedStyle(n)?.position;""!==e&&"static"!==e&&(gt.has(n)?yt.add(n):(vt.observe(n),gt.add(n),bt.add(n),t+=1))}pt(yt),ht(bt),ft(t),bt.clear(),yt.clear()}function wt(e){const t=new IntersectionObserver(t=>e(t[0].isIntersecting),{threshold:0}),n=document.documentElement;return t.observe(n),X("Attached VisibilityObserver to page"),{disconnect:()=>{t.disconnect(),X("Detached VisibilityObserver")}}}const $t=e=>(t,n)=>{if(n in t){if(typeof t[n]===e)return t[n];throw new TypeError(`${n} is not a ${e}.`)}},Ot=$t("function"),St=$t("number"),It=$t("string");"undefined"!=typeof window&&function(){const A={height:()=>(ae("Custom height calculation function not defined"),vn.auto()),width:()=>(ae("Custom width calculation function not defined"),zn.auto())},C={bodyOffset:1,bodyScroll:1,offset:1,documentElementOffset:1,documentElementScroll:1,boundingClientRect:1,max:1,min:1,grow:1,lowestElement:1},H={},F="auto",_=[],Y="scroll";let le,me,he,pe,ge,ye,be,ve=!0,we="",Se=0,Ie="",Ee="",Me=!1,ke=!0,je=!1,Ne=!0,Ae=!1,xe=!1,Re=!0,Ce=!1,Pe=1,He=F,Le="",Ge=!0,Be={},qe=!1,De=!1,Fe=!1,We=0,Ue=!1,Ve=0,Je=0,_e=new Set,Qe="",Ye="child",Xe=!1,Ke="",ot=[],rt=window.parent,it="*",at=0,st=!1,ct=1,lt=Y,ft=window,ht=()=>{ae("onMessage function not defined")},pt=()=>{},yt=null,bt=null;function $t(o){var i;!function(e){Qe=e[0]??Qe,Se=Oe(e[1])??Se,je=$e(e[2])??je,Fe=$e(e[3])??Fe,ve=$e(e[6])??ve,Ie=e[7]??Ie,He=e[8]??He,we=e[9]??we,Ee=e[10]??Ee,at=Oe(e[11])??at,Be.enable=$e(e[12])??!1,Ye=e[13]??Ye,lt=e[14]??lt,Ue=$e(e[15])??Ue,Ve=Oe(e[16])??Ve,Je=Oe(e[17])??Je,ke=$e(e[18])??ke,le=e[19]??le,ye=e[20]??ye,We=Oe(e[21])??We,De=$e(e[23])??De}(o),J=(i={id:Qe,enabled:Fe,expand:De}).id||n,Q.label(`${J}`),Q.expand(i.expand),Z=i.enabled,function(){function t(e){be=Ot(e,"onBeforeResize")??be,ht=Ot(e,"onMessage")??ht,pt=Ot(e,"onReady")??pt,"number"==typeof e?.offset&&(fe("offset","offsetSize"),ke&&(Ve=St(e,"offset")??Ve),je&&(Je=St(e,"offset")??Je)),"number"==typeof e?.offsetSize&&(ke&&(Ve=St(e,"offsetSize")??Ve),je&&(Je=St(e,"offsetSize")??Je)),me=It(e,x(R[0]))??me,Le=It(e,"ignoreSelector")??Le,Ke=It(e,"sizeSelector")??Ke,it=It(e,"targetOrigin")??it,He=e?.heightCalculationMethod||He,lt=e?.widthCalculationMethod||lt}function n(e,t){return"function"==typeof e&&(se(`<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.`),A[t]=e,e="custom"),e}if(1===We)return;const o=window.iframeResizer||window.iFrameResizer;"object"==typeof o&&(t(o),He=n(He,h),lt=n(lt,p),X(`Set targetOrigin for parent: %c${it}`,e.HIGHLIGHT))}(),[At,Rt,Vt,jt,xt,Wt,Ut,Dt,Nt,Tt,Me?D:ze,Ht,Yt,Qt,_t,Lt,()=>Ct("background",we),()=>Ct("padding",Ee),Me?D:Gt,Jt,Zt,un,Et].forEach(e=>{try{e()}catch(e){if(We<0)throw e;se("<rb>Error in setup function</>\n<i>iframe-resizer</> detected an error during setup.\n\nPlease report the following error message at <u>https://github.com/davidjbradshaw/iframe-resizer/issues</>"),te(e)}}),Mt(q(pt)),Mn(r,"Init message from host page",void 0,void 0,`${t}:${We}`),document.title&&""!==document.title&&jn(0,0,l,document.title)}function Et(){N(window,o.toLowerCase(),()=>{_.forEach(e=>e()),jn(0,0,o)})}function Mt(e){"complete"===document.readyState?B(e):N(document,g,()=>Mt(e))}function Tt(){ot=document.querySelectorAll(`[${d}]`),Ce=ot.length>0}let kt=0;function jt(){const t=document.querySelectorAll(`*[${m}]`);return Ae=t.length>0,Ae&&t.length!==kt&&(function(t){const n=1===t.length?"":"s";ae(`%c[${m}]%c found on %c${t.length}%c element${n}`,e.BOLD,e.NORMAL,e.BOLD,e.NORMAL)}(t),kt=t.length),Ae}function Nt(){"BackCompat"===document.compatMode&&se("<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")}function At(){ye&&""!==ye&&"false"!==ye?ye!==t&&se(`<b>Version mismatch</>\n\nThe parent and child pages are running different versions of <i>iframe resizer</>.\n\nParent page: ${ye} - Child page: ${t}.\n`):se("<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")}function xt(){try{Xe=1===We||"iframeParentListener"in window.parent}catch(e){}}function Rt(){je===ke&&(Me=!0)}function Ct(t,n){void 0!==n&&""!==n&&"null"!==n&&(document.body.style.setProperty(t,n),X(`Set body ${t}: %c${n}`,e.HIGHLIGHT))}function Pt(e,t,n){if(""!==n)for(const e of document.querySelectorAll(n))e.toggleAttribute(t,!0)}function Ht(){Pt(0,d,Ke),Pt(0,m,Le)}function Lt(){var e,t;void 0===Ie&&(Ie=`${Se}px`),Ct("margin",(e="margin",(t=Ie).includes("-")&&(ae(`Negative CSS value ignored for ${e}`),t=""),t))}function Gt(){const e=e=>e.style.setProperty(h,"auto","important");e(document.documentElement),e(document.body)}function Bt(e){({add(t){function n(){Mn(e.eventName,e.eventType)}H[t]=n,N(window,t,n,{passive:!0})},remove(e){const t=H[e];var n,o;delete H[e],n=e,o=t,window.removeEventListener(n,o,!1)}})[e.method](e.eventName)}function qt(e){Bt({method:e,eventType:"After Print",eventName:"afterprint"}),Bt({method:e,eventType:"Before Print",eventName:"beforeprint"}),Bt({method:e,eventType:"Ready State Change",eventName:g})}function Dt(){let e=!1;const t=t=>document.querySelectorAll(`[${t}]`).forEach(n=>{e=!0,n.removeAttribute(t),n.toggleAttribute(d,!0)});t("data-iframe-height"),t("data-iframe-width"),e&&se("<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</>.")}function Ft(e,t,n){const{label:o}=n;return t!==e&&(e in n||(ae(`${e} is not a valid option for ${o}CalculationMethod.`),e=t),e in C)&&se(`<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 ${ye?"remove this option.":`set this option to <b>'auto'</> when using an older version of <i>iframe-resizer</> on the parent page. This can be done on the child page by adding the following code:\n \nwindow.iframeResizer = {\n license: 'xxxx',\n ${o}CalculationMethod: 'auto',\n}\n`}\n`),e}function Wt(){He=Ft(He,F,vn)}function Ut(){lt=Ft(lt,Y,zn)}function Vt(){const n=We,o=G({key:le}),r=G({key:me});if(We=Math.max(o,r),We<0){if(We=Math.min(o,r),ie(),se(`${L(We+2)}${L(2)}`),U(ye))throw L(We+2).replace(/<\/?[a-z][^>]*>|<\/>/gi,"")}else(!U(ye)||n>-1&&We>n)&&(sessionStorage.getItem("ifr")!==t&&function(t,n){console.info(`${J} %ciframe-resizer ${t}`,Z||n<1?"font-weight: bold;":e.NORMAL)}(`v${t} (${(e=>x(P[e]))(We)})`,We),We<2&&ce(L(3)),sessionStorage.setItem("ifr",t))}function Zt(){qt("add"),_.push(()=>qt("remove"))}function Jt(){const e=document.createElement("div");e.style.clear="both",e.style.display="block",e.style.height="0",document.body.append(e)}function _t(){function e(e){const t=e.getBoundingClientRect(),n={x:document.documentElement.scrollLeft,y:document.documentElement.scrollTop};return{x:parseInt(t.left,u)+parseInt(n.x,u),y:parseInt(t.top,u)+parseInt(n.y,u)}}function t(t){const n=t.split("#")[1]||t,o=decodeURIComponent(n),r=document.getElementById(o)||document.getElementsByName(o)[0];void 0===r?jn(0,0,"inPageLink",`#${n}`):function(t){const n=e(t);jn(n.y,n.x,c)}(r)}function n(){const{hash:e,href:n}=window.location;""!==e&&"#"!==e&&t(n)}Be.enable&&(1===We?se("In page linking requires a Professional or Business license. Please see <u>https://iframe-resizer.com/pricing</> for more details."):(function(){for(const e of document.querySelectorAll('a[href^="#"]'))"#"!==e.getAttribute("href")&&N(e,"click",n=>{n.preventDefault(),t(e.getAttribute("href"))})}(),N(window,"hashchange",n),setTimeout(n,128))),Be={findTarget:t}}function Qt(){function e(e){jn(0,0,e.type,`${e.screenY}:${e.screenX}`)}function t(t,n){N(window.document,t,e)}!0===Ue&&(t("mouseenter"),t("mouseleave"))}function Yt(){1!==We&&(ft.parentIframe=Object.freeze({autoResize:e=>(V(e,"boolean","parentIframe.autoResize(enable) enable"),!1===je&&!1===ke?(oe(v),se("Auto Resize can not be changed when <b>direction</> is set to 'none'."),!1):(!0===e&&!1===ve?(ve=!0,queueMicrotask(()=>Mn(v,"Auto Resize enabled"))):!1===e&&!0===ve&&(ve=!1),jn(0,0,"autoResize",JSON.stringify(ve)),ve)),close(){jn(0,0,"close")},getId:()=>Qe,getOrigin:()=>(oe("getOrigin"),ue("getOrigin()","getParentOrigin()"),he),getParentOrigin:()=>he,getPageInfo(e){if("function"==typeof e)return yt=e,jn(0,0,a),void de("getPageInfo()","getParentProps()","See <u>https://iframe-resizer.com/upgrade</> for details. ");yt=null,jn(0,0,"pageInfoStop")},getParentProps:e=>(V(e,"function","parentIframe.getParentProps(callback) callback"),bt=e,jn(0,0,s),()=>{bt=null,jn(0,0,"parentInfoStop")}),getParentProperties(e){ue("getParentProperties()","getParentProps()"),this.getParentProps(e)},moveToAnchor(e){V(e,"string","parentIframe.moveToAnchor(anchor) anchor"),Be.findTarget(e)},reset(){!function(){const e=He;He=F,st||(st=!0,requestAnimationFrame(()=>{st=!1})),Tn("reset"),He=e}()},setOffsetSize(e){V(e,"number","parentIframe.setOffsetSize(offset) offset"),Ve=e,Je=e,Mn(S,`parentIframe.setOffsetSize(${e})`)},scrollBy(e,t){V(e,"number","parentIframe.scrollBy(x, y) x"),V(t,"number","parentIframe.scrollBy(x, y) y"),jn(t,e,"scrollBy")},scrollTo(e,t){V(e,"number","parentIframe.scrollTo(x, y) x"),V(t,"number","parentIframe.scrollTo(x, y) y"),jn(t,e,"scrollTo")},scrollToOffset(e,t){V(e,"number","parentIframe.scrollToOffset(x, y) x"),V(t,"number","parentIframe.scrollToOffset(x, y) y"),jn(t,e,c)},sendMessage(e,t){t&&V(t,"string","parentIframe.sendMessage(msg, targetOrigin) targetOrigin"),jn(0,0,i,JSON.stringify(e),t)},setHeightCalculationMethod(e){He=e,Wt()},setWidthCalculationMethod(e){lt=e,Ut()},setTargetOrigin(e){V(e,"string","parentIframe.setTargetOrigin(targetOrigin) targetOrigin"),it=e},resize(e,t){void 0!==e&&V(e,"number","parentIframe.resize(customHeight, customWidth) customHeight"),void 0!==t&&V(t,"number","parentIframe.resize(customHeight, customWidth) customWidth"),Mn(w,`parentIframe.resize(${e||""}${t?`,${t}`:""})`,e,t)},size(e,t){ue("size()","resize()"),this.resize(e,t)}}),ft.parentIFrame=ft.parentIframe)}let Xt=new Set;function Kt(){const e=document.querySelectorAll(`[${f}]`);_e=function(e){const t=new Set,n=new Set;for(const o of e)o.closest(`[${m}]`)?n.add(o):t.add(o);return n.size>0&&queueMicrotask(()=>{oe("overflowIgnored"),X("Ignoring elements with [data-iframe-ignore] > *:\n",n),ee()}),t}(e),xe=_e.size>0,"function"==typeof Set.prototype.symmetricDifference&&(Re=_e.symmetricDifference(Xt).size>0),Xt=_e}function en(){switch(Kt(),!0){case!Re:return;case _e.size>1:X("Overflowed Elements:",_e);break;case xe:break;default:X("No overflow detected")}Mn(E,"Overflow updated")}function tn(e){const t={root:document.documentElement,side:ke?y:b};return pe=et(en,t),pe.attachObservers(e),pe}function nn(e){if(!Array.isArray(e)||0===e.length)return;const t=e[0].target;Mn(I,`Element resized <${function(e){switch(!0){case!U(e):return"";case U(e.id):return`${e.nodeName}#${e.id}`;case U(e.name):return`${e.nodeName} (${e.name}`;case U(e.className):return`${e.nodeName}.${e.className}`;default:return e.nodeName}}(t)}>`)}function on(e){return vt=new ResizeObserver(nn),vt.observe(document.body),gt.add(document.body),X("Attached ResizeObserver to body"),ge={attachObserverToNonStaticElements:zt,detachObservers:Te(dt,vt,gt,mt),disconnect:()=>{vt.disconnect(),X("Detached ResizeObserver")}},ge.attachObserverToNonStaticElements(e),ge}function rn(e){qe=!e,Mn(T,"Visibility changed")}const an=e=>{const t=new Set;for(const n of e){t.add(n);for(const e of hn(n))t.add(e)}return X("Inspecting:\n",t),t},sn=e=>{if(0===e.size)return;oe("addObservers");const t=an(e);pe.attachObservers(t),ge.attachObserverToNonStaticElements(t),ee()},cn=e=>{if(0===e.size)return;oe("removeObservers");const t=an(e);pe.detachObservers(t),ge.detachObservers(t),ee()};function ln(e){!function({addedNodes:e,removedNodes:t}){oe("contentMutated"),Ht(),Tt(),Kt(),ee(),cn(t),sn(e)}(e),Mn(M,"Mutation Observed")}function un(){const e=hn(document.documentElement);var t;t=[Ze(ln),tn(e),ut(),on(e),wt(rn)],_.push(...t.map(e=>e.disconnect))}function dn(t){performance.mark(tt);const n=W(t);let o=1,r=document.documentElement,i=Ce?0:document.documentElement.getBoundingClientRect().bottom;const a=Ce?ot:xe?Array.from(_e):hn(document.documentElement);for(const e of a)o=e.getBoundingClientRect()[t]+parseFloat(getComputedStyle(e).getPropertyValue(`margin-${t}`)),o>i&&(i=o,r=e);return X(`${n} position calculated from:`,r),X(`Checked %c${a.length}%c elements`,e.HIGHLIGHT,e.FOREGROUND),performance.mark(nt,{detail:{hasTags:Ce,len:a.length,logging:Fe,Side:n}}),i}const fn=e=>[e.bodyOffset(),e.bodyScroll(),e.documentElementOffset(),e.documentElementScroll(),e.boundingClientRect()],mn=`* ${Array.from(j).map(e=>`:not(${e})`).join("")}`,hn=e=>e.querySelectorAll(mn),pn={height:0,width:0},gn={height:0,width:0},yn=[e.HIGHLIGHT,e.FOREGROUND,e.HIGHLIGHT];function bn(t){function n(){return gn[r]=i,pn[r]=c,Math.max(i,1)}const o=t===vn,r=t.label,i=t.boundingClientRect(),a=Math.ceil(i),s=Math.floor(i),c=(e=>e.documentElementScroll()+Math.max(0,e.getOffset()))(t),l=`HTML: %c${i}px %cPage: %c${c}px`;let u=0;switch(!0){case!t.enabled():return Math.max(c,1);case Ce:X("Found element with data-iframe-size attribute"),u=t.taggedElement();break;case!xe&&Ne&&0===gn[r]&&0===pn[r]:X(`Initial page size values: ${l}`,...yn),u=n();break;case st&&i===gn[r]&&c===pn[r]:X(`Size unchanged: ${l}`,...yn),u=Math.max(i,c);break;case 0===i&&0!==c:X(`Page is hidden: ${l}`,...yn),u=c;break;case!xe&&i!==gn[r]&&c<=pn[r]:X(`New <html> size: ${l} `,...yn),X(`Previous <html> size: %c${gn[r]}px`,e.HIGHLIGHT),u=n();break;case!o:u=t.taggedElement();break;case!xe&&i<gn[r]:X(`<html> size decreased: ${l}`,...yn),u=n();break;case c===s||c===a:X(`<html> size equals page size: ${l}`,...yn),u=n();break;case i>c:X(`Page size < <html> size: ${l}`,...yn),u=n();break;case xe:X("Found elements possibly overflowing <html> "),u=t.taggedElement();break;default:X(`Using <html> size: ${l}`,...yn),u=n()}return X(`Content ${r}: %c${u}px`,e.HIGHLIGHT),u+=function(t){const n=t.getOffset();return 0!==n&&X(`Page offsetSize: %c${n}px`,e.HIGHLIGHT),n}(t),u}const vn={label:h,enabled:()=>ke,getOffset:()=>Ve,auto:()=>bn(vn),bodyOffset:()=>{const{body:e}=document,t=getComputedStyle(e);return e.offsetHeight+parseInt(t.marginTop,u)+parseInt(t.marginBottom,u)},bodyScroll:()=>document.body.scrollHeight,offset:()=>vn.bodyOffset(),custom:()=>A.height(),documentElementOffset:()=>document.documentElement.offsetHeight,documentElementScroll:()=>document.documentElement.scrollHeight,boundingClientRect:()=>Math.max(document.documentElement.getBoundingClientRect().bottom,document.body.getBoundingClientRect().bottom),max:()=>Math.max(...fn(vn)),min:()=>Math.min(...fn(vn)),grow:()=>vn.max(),lowestElement:()=>dn(y),taggedElement:()=>dn(y)},zn={label:p,enabled:()=>je,getOffset:()=>Je,auto:()=>bn(zn),bodyScroll:()=>document.body.scrollWidth,bodyOffset:()=>document.body.offsetWidth,custom:()=>A.width(),documentElementScroll:()=>document.documentElement.scrollWidth,documentElementOffset:()=>document.documentElement.offsetWidth,boundingClientRect:()=>Math.max(document.documentElement.getBoundingClientRect().right,document.body.getBoundingClientRect().right),max:()=>Math.max(...fn(zn)),min:()=>Math.min(...fn(zn)),rightMostElement:()=>dn(b),scroll:()=>Math.max(zn.bodyScroll(),zn.documentElementScroll()),taggedElement:()=>dn(b)},wn=(e,t)=>!(Math.abs(e-t)<=at);function $n(e,t){const n=e[t](),o=e.enabled()&&void 0!==be?function(e){const t=be(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`);if(t<1)throw new RangeError(`Out of range value returned from onBeforeResize(): ${t}, must be at least 1`);return t}(n):n;return K(o>=1,`New iframe ${e.label} is too small: ${o}, must be at least 1`),o}let On=!1;const Sn=q(()=>ce(L(4)));let In,En=!1;const Mn=ne((e,t,n,o,i)=>{switch(oe(e),!0){case!0===qe:if(!0===En)break;En=!0,On=!1,cancelAnimationFrame(In);break;case!0===On&&e!==E:ie();break;case!ve&&!(e in O):X("Resizing disabled");break;default:En=!1,On=!0,performance.now(),In=requestAnimationFrame(()=>{On=!1,oe("requestAnimationFrame")}),function(e,t,n,o,i){const a=n??$n(vn,He),s=o??$n(zn,lt);switch(ke&&wn(Pe,a)||je&&wn(ct,s)?z:e){case r:case v:case z:Pe=a,ct=s;case S:kn(Pe,ct,e,i);break;case E:case M:case I:case T:ie();break;default:ie(),X("No change in content size detected")}}(e,0,n,o,i)}ee()});function Tn(e){Pe=vn[He](),ct=zn[lt](),jn(Pe,ct,e)}function kn(t,n,o,r,i){We<-1||(void 0!==i||(i=it),function(){const a=`${Qe}:${t}:${n}:${o}${void 0===r?"":`:${r}`}`;if(Xe)try{window.parent.iframeParentListener(k+a)}catch(e){if(1!==We)throw e;return void Sn()}else rt.postMessage(k+a,i);X(`Sending message to parent page via ${Xe?"sameOrigin":"postMessage"}: %c%c${a}`,e.ITALIC,e.HIGHLIGHT)}())}const jn=ne((e,t,n,o,r)=>{oe(n),kn(e,t,n,o,r),ee()}),Nn=ne(function(e){oe("onMessage");const{freeze:t}=Object,{parse:n}=JSON,o=e=>jn(0,0,`${e}Stop`),i={init:function(){if("loading"===document.readyState)return;const t=e.data.slice(13).split(":");rt=e.source,he=e.origin,$t(t),Ne=!1,setTimeout(()=>{Ge=!1},128)},reset(){Ge||Tn("resetPage")},resize(){Mn($,"Parent window requested size check")},moveToAnchor(){Be.findTarget(l())},inPageLink(){this.moveToAnchor()},pageInfo(){const e=l();yt?B(yt,n(e)):o(a)},parentInfo(){const e=(r=l(),t(n(r)));var r;bt?B(bt,e):o(s)},message(){const e=l();B(ht,n(e))}},c=()=>e.data.split("]")[1].split(":")[0],l=()=>e.data.slice(e.data.indexOf(":")+1),u=()=>e.data.split(":")[2]in{true:1,false:1};function d(){const t=c();oe(t),t in i?i[t]():"iframeResize"in window||void 0!==window.jQuery&&""in window.jQuery.prototype||u()||ae(`Unexpected message (${e.data})`)}k===`${e.data}`.slice(0,13)&&function(){if(!1!==Ne)return u()?(re(c()),oe(r),void i.init()):void 0;d()}()});let An=!1;const xn=e=>e.postMessage("[iFrameResizerChild]Ready",window?.iframeResizer?.targetOrigin||"*");function Rn(){if("loading"===document.readyState||!Ne||An)return;const{parent:e,top:t}=window;oe("ready"),xn(e),e!==t&&xn(t),An=!0}"iframeChildListener"in window?ae("Already setup"):(window.iframeChildListener=e=>setTimeout(()=>Nn({data:e,sameOrigin:!0})),N(window,i,Nn),N(document,g,Rn),setTimeout(Rn))}();
20
+ "use strict";const e=require("auto-console-group"),t="5.5.6-beta.2",n="iframeResizer",o="beforeUnload",r="init",i="message",a="pageInfo",s="parentInfo",c="scrollToOffset",l="title",d=10,u="data-iframe-size",m="data-iframe-overflowed",f="data-iframe-ignore",h="height",p="width",g="readystatechange",y="bottom",b="right",v="autoResizeEnabled",z=Symbol("sizeChanged"),w="manualResize",$="parentResize",I={[w]:1,[$]:1},O="setOffsetSize",S="resizeObserver",H="overflowObserver",T="mutationObserver",M="visibilityObserver",E="No change in content size detected",k="[iFrameSizer]",R=new Set(["head","body","meta","base","title","script","link","style","map","area","option","optgroup","template","track","wbr","nobr"]),G=(e,t,n,o)=>e.addEventListener(t,n,o||!1),N=e=>{if(!e)return"";let t=-559038744,n=1103547984;for(let o,r=0;r<e.length;r++)o=e.codePointAt(r),t=Math.imul(t^o,2246822519),n=Math.imul(n^o,3266489917);return t^=Math.imul(t^n>>>15,1935289751),n^=Math.imul(n^t>>>15,3405138345),t^=n>>>16,n^=t>>>16,(2097152*(n>>>0)+(t>>>11)).toString(36)},A=e=>e.replace(/[A-Za-z]/g,e=>String.fromCodePoint((e<="Z"?90:122)>=(e=e.codePointAt(0)+19)?e:e-26)),L=["spjluzl","rlf","clyzpvu"],j=["<yi>Puchspk Spjluzl Rlf</><iy><iy>","<yi>Tpzzpun Spjluzl Rlf</><iy><iy>","Aopz spiyhyf pz hchpshisl dpao ivao Jvttlyjphs huk Vwlu-Zvbyjl spjluzlz.<iy><iy><i>Jvttlyjphs Spjluzl</><iy>Mvy jvttlyjphs bzl, <p>pmyhtl-ylzpgly</> ylxbpylz h svd jvza vul aptl spjluzl mll. Mvy tvyl pumvythapvu cpzpa <b>oaawz://pmyhtl-ylzpgly.jvt/wypjpun</>.<iy><iy><i>Vwlu Zvbyjl Spjluzl</><iy>Pm fvb hyl bzpun aopz spiyhyf pu h uvu-jvttlyjphs vwlu zvbyjl wyvqlja aolu fvb jhu bzl pa mvy myll bukly aol alytz vm aol NWS C3 Spjluzl. Av jvumpyt fvb hjjlwa aolzl alytz, wslhzl zla aol <i>spjluzl</> rlf pu <p>pmyhtl-ylzpgly</> vwapvuz av <i>NWSc3</>.<iy><iy>Mvy tvyl pumvythapvu wslhzl zll: <b>oaawz://pmyhtl-ylzpgly.jvt/nws</>","<i>NWSc3 Spjluzl Clyzpvu</><iy><iy>Aopz clyzpvu vm <p>pmyhtl-ylzpgly</> pz ilpun bzlk bukly aol alytz vm aol <i>NWS C3</> spjluzl. Aopz spjluzl hssvdz fvb av bzl <p>pmyhtl-ylzpgly</> pu Vwlu Zvbyjl wyvqljaz, iba pa ylxbpylz fvby wyvqlja av il wbispj, wyvcpkl haaypibapvu huk il spjluzlk bukly clyzpvu 3 vy shaly vm aol NUB Nlulyhs Wbispj Spjluzl.<iy><iy>Pm fvb hyl bzpun aopz spiyhyf pu h uvu-vwlu zvbyjl wyvqlja vy dlizpal, fvb dpss ullk av wbyjohzl h svd jvza vul aptl jvttlyjphs spjluzl.<iy><iy>Mvy tvyl pumvythapvu cpzpa <b>oaawz://pmyhtl-ylzpgly.jvt/wypjpun</>.","<iy><yi>Zvsv spjluzl kvlz uva zbwwvya jyvzz-kvthpu</><iy><iy>Av bzl <p>pmyhtl-ylzpgly</> dpao jyvzz kvthpu pmyhtlz fvb ullk lpaoly aol Wyvmlzzpvuhs vy Ibzpulzz spjluzlz. Mvy klahpsz vu bwnyhkl wypjpun wslhzl jvuahja pumv@pmyhtl-ylzpgly.jvt."],x=["NWSc3","zvsv","wyv","ibzpulzz","vlt"],P=Object.fromEntries(["2cgs7fdf4xb","1c9ctcccr4z","1q2pc4eebgb","ueokt0969w","w2zxchhgqz","1umuxblj2e5"].map((e,t)=>[e,Math.max(0,t-1)])),C=e=>A(j[e]),D=e=>{const t=e[A(L[0])]||e[A(L[1])]||e[A(L[2])];if(!t)return-1;const n=t.split("-");let o=function(e=""){let t=-2;const n=N(A(e));return n in P&&(t=P[n]),t}(n[0]);return 0===o||(e=>e[2]===N(e[0]+e[1]))(n)||(o=-2),o},q=(e,...t)=>setTimeout(()=>e(...t),0),B=e=>{let t=!1;return function(){return t?void 0:(t=!0,Reflect.apply(e,this,arguments))}},F=e=>e,U=e=>Math.round(1e3*e)/1e3,W=e=>e.charAt(0).toUpperCase()+e.slice(1),V=e=>""!=`${e}`&&void 0!==e;const Z=(e,t,n)=>{if(typeof e!==t)throw new TypeError(`${n} is not a ${W(t)}`)};let J=!0,_=n;var Q;const Y=(Q=e,Q?.__esModule?Q.default:Q)({label:`${n}(child)`,expand:!1});const X=e=>(...t)=>!J||Y[e](...t),K=X("log"),ee=K,te=X("debug");const{assert:ne,endAutoGroup:oe,error:re,errorBoundary:ie,event:ae,label:se,purge:ce,warn:le}=Y,de=e=>{return Y.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},ue=de,me=(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)=>de(t)),fe=me("Method"),he=me("Method","replaced with"),pe=me("Option"),ge=["min-height","min-width","max-height","max-width"],ye=new Set,be=e=>e.tagName?e.tagName.toLowerCase():"unknown",ve=(e,t)=>window.getComputedStyle(e).getPropertyValue(t),ze=(e,t)=>{return(n=ve(e,t))&&"0px"!==n&&"auto"!==n&&"none"!==n;var n};function we({href:e}){ye.has(e)||(K("Unable to access stylesheet:",e),ye.add(e))}const $e=(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){we(n)}return{source:"cross-origin stylesheet",value:ve(e,t)}}(e,t),Ie=(e,t)=>{const{source:n,value:o}=$e(e,t),r=be(e);de(`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 Oe(){for(const e of[document.documentElement,document.body])for(const t of ge)K(`Checking <${be(e)}> for blocking CSS: ${t}`),ze(e,t)&&Ie(e,t)}const Se=e=>t=>void 0===t?void 0:e(t),He=Se(e=>"true"===e),Te=Se(Number),Me=(e="")=>t=>n=>{n.size>0&&te(`${t}Observer ${e}:`,...Array.from(n).flatMap(e=>["\n",e]))},Ee=Me("attached to"),ke=((e="")=>t=>n=>{n.size>0&&re(`${t}Observer ${e}:`,...Array.from(n).flatMap(e=>["\n",e]))})("already attached"),Re=Me("detached from"),Ge=(t,n=!0)=>o=>{o>0&&ee(`${n?"At":"De"}tached ${t}Observer ${n?"to":"from"} %c${o}%c element${1===o?"":"s"}`,e.HIGHLIGHT,e.NORMAL)},Ne=(e,t,n,o)=>{const r=Re(e);return e=>{const i=new Set;let a=0;for(const o of e)n.has(o)&&(t.unobserve(o),n.delete(o),i.add(o),a+=1);r(i),o(a),i.clear()}},Ae="Mutation",Le=new Set,je=new Set,xe=new Set,Pe=[],Ce={attributes:!0,attributeFilter:[f,u],attributeOldValue:!1,characterData:!1,characterDataOldValue:!1,childList:!0,subtree:!0};let De,qe=1,Be=!1,Fe=0;const Ue=Me("added")(Ae),We=Me("removed (page)")(Ae),Ve=Me("removed (added)")(Ae),Ze=e=>e.nodeType!==Node.ELEMENT_NODE||R.has(e.tagName.toLowerCase());function Je(e){const t=e.addedNodes;for(const e of t)Ze(e)||Le.add(e)}function _e(e){const t=e.removedNodes;for(const e of t)Ze(e)||(Le.has(e)?(Le.delete(e),xe.add(e)):je.add(e))}const Qe=e=>{ee("Mutations:",e);for(const t of e)Je(t),_e(t);Ue(Le),We(je),Ve(xe),xe.clear()};const Ye=t=>()=>{const n=performance.now(),o=n-Fe,r=16*qe+++2;if(o>r&&o<200)return ae("mutationThrottled"),ee("Update delayed due to heavy workload on the callStack"),ee(`EventLoop busy time: %c${U(o)}ms %c> Max wait: %c${r-2}ms`,e.HIGHLIGHT,e.FOREGROUND,e.HIGHLIGHT),setTimeout(De,16*qe),void(Fe=n);qe=1,Pe.forEach(Qe),Pe.length=0,Be=!1,je.size>0&&K(`Detected %c${je.size} %cremoved element${je.size>1?"s":""}`,e.HIGHLIGHT,e.FOREGROUND),Le.size>0&&K(`Found %c${Le.size} %cnew element${Le.size>1?"s":""}`,e.HIGHLIGHT,e.FOREGROUND),t({addedNodes:Le,removedNodes:je}),Le.clear(),je.clear()};function Xe(e){Pe.push(e),Be||(Fe=performance.now(),Be=!0,requestAnimationFrame(De))}function Ke(e){const t=new window.MutationObserver(Xe),n=document.body||document.documentElement;return De=Ye(e),t.observe(n,Ce),ee("Attached MutationObserver to body"),{...t,disconnect:()=>{Le.clear(),je.clear(),Pe.length=0,t.disconnect(),ee("Detached MutationObserver")}}}const et="Overflow",tt=Ge(et),nt=Ge(et,!1),ot=Ee(et),rt=ke(et),it=e=>e.hidden||null===e.offsetParent||"none"===e.style.display,at=(e,t)=>{const n=t.side,o={root:t.root,rootMargin:"0px",threshold:1},r=window?.requestAnimationFrame||F,i=(t=!1)=>e(t),a=(e,t)=>0===e||e>t[n],s=(e,t)=>e.toggleAttribute(m,t);const c=new IntersectionObserver(function(e){for(const t of e){const{boundingClientRect:e,rootBounds:o,target:r}=t;if(!o)continue;const i=e[n],c=a(i,o)&&!it(r);s(r,c)}r(i)},o),l=new WeakSet;return{attachObservers:function(e){const t=new Set,n=new Set;let o=0;for(const r of e)r.nodeType===Node.ELEMENT_NODE&&(l.has(r)?t.add(r):(c.observe(r),l.add(r),n.add(r),o+=1));rt(t),ot(n),tt(o),n.clear(),t.clear()},detachObservers:Ne(et,c,l,nt),disconnect:()=>{c.disconnect(),ee("Detached OverflowObserver")}}},st="--ifr-start",ct="--ifr-end",lt="--ifr-measure",dt=[];let ut,mt={},ft=0;function ht(){try{performance.clearMarks(st),performance.clearMarks(ct),performance.clearMeasures(lt)}catch{}}function pt(e){e.getEntries().forEach(e=>{if(e.name===ct)try{const{duration:t}=performance.measure(lt,st,ct);mt=e.detail,dt.push(t),dt.length>100&&dt.shift()}catch{}})}function gt(){ee("Attached PerformanceObserver to page");const e=new PerformanceObserver(pt);return e.observe({entryTypes:["mark"]}),ut=setInterval(()=>{if(dt.length<10)return;if(mt.hasTags&&mt.len<25)return;dt.sort();const e=Math.min(dt.reduce((e,t)=>e+t,0)/dt.length,dt[Math.floor(dt.length/2)]),t=U(e);t>ft&&(ft=t,ae("performanceObserver"),K("Mean time:",U(dt[Math.floor(dt.length/2)])),K("Median time:",U(dt.reduce((e,t)=>e+t,0)/dt.length)),K("Average time:",t),K("Max time:",U(Math.max(...dt)))),ht(),e<=4||(clearInterval(ut),de(`<rb>Performance Warning</>\n\nCalculating the page size is taking an excessive amount of time (${U(e)}ms).\n\nTo improve performance add the <b>data-iframe-size</> attribute to the ${mt.Side.toLowerCase()} most element on the page. For more details see: <u>https://iframe-resizer.com/perf</>.`))},5e3),{disconnect:()=>{ht(),clearInterval(ut),e.disconnect(),ee("Detached PerformanceObserver")}}}const yt="Resize",bt=Ge(yt),vt=Ge(yt,!1),zt=Ee(yt),wt=ke(yt),$t=new WeakSet,It=new Set,Ot=new Set;let St;function Ht(e){let t=0;for(const n of e){if(n.nodeType!==Node.ELEMENT_NODE)continue;const e=getComputedStyle(n)?.position;""!==e&&"static"!==e&&($t.has(n)?It.add(n):(St.observe(n),$t.add(n),Ot.add(n),t+=1))}wt(It),zt(Ot),bt(t),Ot.clear(),It.clear()}function Tt(e){const t=new IntersectionObserver(t=>e(t[0].isIntersecting),{threshold:0}),n=document.documentElement;return t.observe(n),ee("Attached VisibilityObserver to page"),{disconnect:()=>{t.disconnect(),ee("Detached VisibilityObserver")}}}const Mt=e=>(t,n)=>{if(n in t){if(typeof t[n]===e)return t[n];throw new TypeError(`${n} is not a ${e}.`)}},Et=Mt("function"),kt=Mt("number"),Rt=Mt("string");"undefined"!=typeof window&&function(){const N={height:()=>(le("Custom height calculation function not defined"),On.auto()),width:()=>(le("Custom width calculation function not defined"),Sn.auto())},j={bodyOffset:1,bodyScroll:1,offset:1,documentElementOffset:1,documentElementScroll:1,boundingClientRect:1,max:1,min:1,grow:1,lowestElement:1},P={},Q="auto",X=[],ce="scroll";let me,ge,ye,be,ve,ze,we,$e,Ie,Se=!0,Me="",Ee=0,ke="",Re="",Ge=!1,Ae=!0,Le=!1,je=!0,xe=!1,Pe=!1,Ce=!0,De=!1,qe=1,Be=Q,Fe="",Ue=!0,We={},Ve=!1,Ze=!1,Je=!1,_e=0,Qe=!1,Ye=0,Xe=0,et=new Set,tt="",nt="child",ot=!1,rt="",it=[],lt=window.parent,dt="*",ut=0,mt=!1,ft=1,ht=ce,pt=window,bt=()=>{le("onMessage function not defined")},zt=()=>{},wt=null,It=null;function Ot(o){var i;!function(e){tt=e[0]??tt,Ee=Te(e[1])??Ee,Le=He(e[2])??Le,Je=He(e[3])??Je,Se=He(e[6])??Se,ke=e[7]??ke,Be=e[8]??Be,Me=e[9]??Me,Re=e[10]??Re,ut=Te(e[11])??ut,We.enable=He(e[12])??!1,nt=e[13]??nt,ht=e[14]??ht,Qe=He(e[15])??Qe,Ye=Te(e[16])??Ye,Xe=Te(e[17])??Xe,Ae=He(e[18])??Ae,me=e[19]??me,$e=e[20]??$e,_e=Te(e[21])??_e,Ze=He(e[23])??Ze}(o),_=(i={id:tt,enabled:Je,expand:Ze}).id||n,Y.label(`${_}`),Y.expand(i.expand),J=i.enabled,K(`Initialising iframe v${t} ${window.location.href}`),function(){function t(e){K("Reading data from page:",Object.keys(e)),Ie=Et(e,"onBeforeResize")??Ie,bt=Et(e,"onMessage")??bt,zt=Et(e,"onReady")??zt,"number"==typeof e?.offset&&(pe("offset","offsetSize"),Ae&&(Ye=kt(e,"offset")??Ye),Le&&(Xe=kt(e,"offset")??Xe)),"number"==typeof e?.offsetSize&&(Ae&&(Ye=kt(e,"offsetSize")??Ye),Le&&(Xe=kt(e,"offsetSize")??Xe)),ge=Rt(e,A(L[0]))??ge,Fe=Rt(e,"ignoreSelector")??Fe,rt=Rt(e,"sizeSelector")??rt,dt=Rt(e,"targetOrigin")??dt,Be=e?.heightCalculationMethod||Be,ht=e?.widthCalculationMethod||ht}function n(e,t){return"function"==typeof e&&(de(`<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.`),N[t]=e,e="custom"),e}if(1===_e)return;const o=window.iframeResizer||window.iFrameResizer;"object"==typeof o&&(t(o),Be=n(Be,h),ht=n(ht,p),ee(`Set targetOrigin for parent: %c${dt}`,e.HIGHLIGHT))}(),[xt,Ct,Yt,Lt,Pt,_t,Qt,Zt,jt,Nt,Ge?F:Oe,Bt,nn,tn,en,Ft,()=>Dt("background",Me),()=>Dt("padding",Re),Ge?F:Ut,Kt,Xt,pn,Mt].forEach(e=>{try{e()}catch(e){if(_e<0)throw e;de("<rb>Error in setup function</>\n<i>iframe-resizer</> detected an error during setup.\n\nPlease report the following error message at <u>https://github.com/davidjbradshaw/iframe-resizer/issues</>"),re(e)}}),Gt(B(zt)),K("Initialization complete"),Gn(r,"Init message from host page",void 0,void 0,`${t}:${_e}`),document.title&&""!==document.title&&Ln(0,0,l,document.title)}function Mt(){G(window,o.toLowerCase(),()=>{X.forEach(e=>e()),Ln(0,0,o)})}function Gt(e){"complete"===document.readyState?q(e):G(document,g,()=>Gt(e))}function Nt(){it=document.querySelectorAll(`[${u}]`),De=it.length>0,K(`Tagged elements found: %c${De}`,e.HIGHLIGHT)}let At=0;function Lt(){const t=document.querySelectorAll(`*[${f}]`);return xe=t.length>0,xe&&t.length!==At&&(function(t){const n=1===t.length?"":"s";le(`%c[${f}]%c found on %c${t.length}%c element${n}`,e.BOLD,e.NORMAL,e.BOLD,e.NORMAL)}(t),At=t.length),xe}function jt(){"BackCompat"===document.compatMode&&de("<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")}function xt(){$e&&""!==$e&&"false"!==$e?$e!==t&&de(`<b>Version mismatch</>\n\nThe parent and child pages are running different versions of <i>iframe resizer</>.\n\nParent page: ${$e} - Child page: ${t}.\n`):de("<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")}function Pt(){try{ot=1===_e||"iframeParentListener"in window.parent}catch(e){K("Cross domain iframe detected")}}function Ct(){Le===Ae&&(Ge=!0)}function Dt(t,n){void 0!==n&&""!==n&&"null"!==n&&(document.body.style.setProperty(t,n),ee(`Set body ${t}: %c${n}`,e.HIGHLIGHT))}function qt(t,n,o){if(""!==o){K(`${t}: %c${o}`,e.HIGHLIGHT);for(const e of document.querySelectorAll(o))K(`Applying ${n} to:`,e),e.toggleAttribute(n,!0)}}function Bt(){qt("sizeSelector",u,rt),qt("ignoreSelector",f,Fe)}function Ft(){var e,t;void 0===ke&&(ke=`${Ee}px`),Dt("margin",(e="margin",(t=ke).includes("-")&&(le(`Negative CSS value ignored for ${e}`),t=""),t))}function Ut(){const t=e=>e.style.setProperty(h,"auto","important");t(document.documentElement),t(document.body),K("Set HTML & body height: %cauto !important",e.HIGHLIGHT)}function Wt(t){({add(e){function n(){Gn(t.eventName,t.eventType)}P[e]=n,G(window,e,n,{passive:!0})},remove(e){const t=P[e];var n,o;delete P[e],n=e,o=t,window.removeEventListener(n,o,!1)}})[t.method](t.eventName),K(`${W(t.method)} event listener: %c${t.eventType}`,e.HIGHLIGHT)}function Vt(e){Wt({method:e,eventType:"After Print",eventName:"afterprint"}),Wt({method:e,eventType:"Before Print",eventName:"beforeprint"}),Wt({method:e,eventType:"Ready State Change",eventName:g})}function Zt(){let e=!1;const t=t=>document.querySelectorAll(`[${t}]`).forEach(n=>{e=!0,n.removeAttribute(t),n.toggleAttribute(u,!0)});t("data-iframe-height"),t("data-iframe-width"),e&&de("<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</>.")}function Jt(t,n,o){const{label:r}=o;return n!==t&&(t in o||(le(`${t} is not a valid option for ${r}CalculationMethod.`),t=n),t in j)&&de(`<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 ${$e?"remove this option.":`set this option to <b>'auto'</> when using an older version of <i>iframe-resizer</> on the parent page. This can be done on the child page by adding the following code:\n \nwindow.iframeResizer = {\n license: 'xxxx',\n ${r}CalculationMethod: 'auto',\n}\n`}\n`),K(`Set ${r} calculation method: %c${t}`,e.HIGHLIGHT),t}function _t(){Be=Jt(Be,Q,On)}function Qt(){ht=Jt(ht,ce,Sn)}function Yt(){const n=_e,o=D({key:me}),r=D({key:ge});if(_e=Math.max(o,r),_e<0){if(_e=Math.min(o,r),de(`${C(_e+2)}${C(2)}`),V($e))throw C(_e+2).replace(/<\/?[a-z][^>]*>|<\/>/gi,"")}else(!V($e)||n>-1&&_e>n)&&(sessionStorage.getItem("ifr")!==t&&function(t,n){console.info(`${_} %ciframe-resizer ${t}`,J||n<1?"font-weight: bold;":e.NORMAL)}(`v${t} (${(e=>A(x[e]))(_e)})`,_e),_e<2&&ue(C(3)),sessionStorage.setItem("ifr",t))}function Xt(){!0!==Se&&K("Auto Resize disabled"),Vt("add"),X.push(()=>Vt("remove"))}function Kt(){const e=document.createElement("div");e.style.clear="both",e.style.display="block",e.style.height="0",document.body.append(e)}function en(){function t(e){const t=e.getBoundingClientRect(),n={x:document.documentElement.scrollLeft,y:document.documentElement.scrollTop};return{x:parseInt(t.left,d)+parseInt(n.x,d),y:parseInt(t.top,d)+parseInt(n.y,d)}}function n(n){const o=n.split("#")[1]||n,r=decodeURIComponent(o),i=document.getElementById(r)||document.getElementsByName(r)[0];void 0===i?(K(`In page link (#${o}) not found in iframe, so sending to parent`),Ln(0,0,"inPageLink",`#${o}`)):function(n){const r=t(n);K(`Moving to in page link (%c#${o}%c) at x: %c${r.x}%c y: %c${r.y}`,e.HIGHLIGHT,e.FOREGROUND,e.HIGHLIGHT,e.FOREGROUND,e.HIGHLIGHT),Ln(r.y,r.x,c)}(i)}function o(){const{hash:e,href:t}=window.location;""!==e&&"#"!==e&&n(t)}We.enable?1===_e?de("In page linking requires a Professional or Business license. Please see <u>https://iframe-resizer.com/pricing</> for more details."):(K("Setting up location.hash handlers"),function(){for(const e of document.querySelectorAll('a[href^="#"]'))"#"!==e.getAttribute("href")&&G(e,"click",t=>{t.preventDefault(),n(e.getAttribute("href"))})}(),G(window,"hashchange",o),setTimeout(o,128)):K("In page linking not enabled"),We={findTarget:n}}function tn(){function t(e){Ln(0,0,e.type,`${e.screenY}:${e.screenX}`)}function n(n,o){K(`Add event listener: %c${o}`,e.HIGHLIGHT),G(window.document,n,t)}!0===Qe&&(n("mouseenter","Mouse Enter"),n("mouseleave","Mouse Leave"))}function nn(){1!==_e&&(pt.parentIframe=Object.freeze({autoResize:e=>(Z(e,"boolean","parentIframe.autoResize(enable) enable"),!1===Le&&!1===Ae?(ae(v),de("Auto Resize can not be changed when <b>direction</> is set to 'none'."),!1):(!0===e&&!1===Se?(Se=!0,queueMicrotask(()=>Gn(v,"Auto Resize enabled"))):!1===e&&!0===Se&&(Se=!1),Ln(0,0,"autoResize",JSON.stringify(Se)),Se)),close(){Ln(0,0,"close")},getId:()=>tt,getOrigin:()=>(ae("getOrigin"),fe("getOrigin()","getParentOrigin()"),ye),getParentOrigin:()=>ye,getPageInfo(e){if("function"==typeof e)return wt=e,Ln(0,0,a),void he("getPageInfo()","getParentProps()","See <u>https://iframe-resizer.com/upgrade</> for details. ");wt=null,Ln(0,0,"pageInfoStop")},getParentProps:e=>(Z(e,"function","parentIframe.getParentProps(callback) callback"),It=e,Ln(0,0,s),()=>{It=null,Ln(0,0,"parentInfoStop")}),getParentProperties(e){fe("getParentProperties()","getParentProps()"),this.getParentProps(e)},moveToAnchor(e){Z(e,"string","parentIframe.moveToAnchor(anchor) anchor"),We.findTarget(e)},reset(){!function(){const t=Be;Be=Q,K(`Reset trigger event: %c${"parentIframe.reset"}`,e.HIGHLIGHT),mt?K("TriggerLock blocked calculation"):(mt=!0,te("Trigger event lock on"),requestAnimationFrame(()=>{mt=!1,te("Trigger event lock off")})),Nn("reset"),Be=t}()},setOffsetSize(e){Z(e,"number","parentIframe.setOffsetSize(offset) offset"),Ye=e,Xe=e,Gn(O,`parentIframe.setOffsetSize(${e})`)},scrollBy(e,t){Z(e,"number","parentIframe.scrollBy(x, y) x"),Z(t,"number","parentIframe.scrollBy(x, y) y"),Ln(t,e,"scrollBy")},scrollTo(e,t){Z(e,"number","parentIframe.scrollTo(x, y) x"),Z(t,"number","parentIframe.scrollTo(x, y) y"),Ln(t,e,"scrollTo")},scrollToOffset(e,t){Z(e,"number","parentIframe.scrollToOffset(x, y) x"),Z(t,"number","parentIframe.scrollToOffset(x, y) y"),Ln(t,e,c)},sendMessage(e,t){t&&Z(t,"string","parentIframe.sendMessage(msg, targetOrigin) targetOrigin"),Ln(0,0,i,JSON.stringify(e),t)},setHeightCalculationMethod(e){Be=e,_t()},setWidthCalculationMethod(e){ht=e,Qt()},setTargetOrigin(t){Z(t,"string","parentIframe.setTargetOrigin(targetOrigin) targetOrigin"),K(`Set targetOrigin: %c${t}`,e.HIGHLIGHT),dt=t},resize(e,t){void 0!==e&&Z(e,"number","parentIframe.resize(customHeight, customWidth) customHeight"),void 0!==t&&Z(t,"number","parentIframe.resize(customHeight, customWidth) customWidth"),Gn(w,`parentIframe.resize(${e||""}${t?`,${t}`:""})`,e,t)},size(e,t){fe("size()","resize()"),this.resize(e,t)}}),pt.parentIFrame=pt.parentIframe)}let on=new Set;function rn(){const e=document.querySelectorAll(`[${m}]`);et=function(e){const t=new Set,n=new Set;for(const o of e)o.closest(`[${f}]`)?n.add(o):t.add(o);return n.size>0&&queueMicrotask(()=>{ae("overflowIgnored"),ee("Ignoring elements with [data-iframe-ignore] > *:\n",n),oe()}),t}(e),Pe=et.size>0,"function"==typeof Set.prototype.symmetricDifference&&(Ce=et.symmetricDifference(on).size>0),on=et}function an(){switch(rn(),!0){case!Ce:return;case et.size>1:ee("Overflowed Elements:",et);break;case Pe:break;default:ee("No overflow detected")}Gn(H,"Overflow updated")}function sn(e){const t={root:document.documentElement,side:Ae?y:b};return be=at(an,t),be.attachObservers(e),be}function cn(e){if(!Array.isArray(e)||0===e.length)return;const t=e[0].target;Gn(S,`Element resized <${function(e){switch(!0){case!V(e):return"";case V(e.id):return`${e.nodeName}#${e.id}`;case V(e.name):return`${e.nodeName} (${e.name}`;case V(e.className):return`${e.nodeName}.${e.className}`;default:return e.nodeName}}(t)}>`)}function ln(e){return St=new ResizeObserver(cn),St.observe(document.body),$t.add(document.body),ee("Attached ResizeObserver to body"),ve={attachObserverToNonStaticElements:Ht,detachObservers:Ne(yt,St,$t,vt),disconnect:()=>{St.disconnect(),ee("Detached ResizeObserver")}},ve.attachObserverToNonStaticElements(e),ve}function dn(t){K(`Visible: %c${t}`,e.HIGHLIGHT),Ve=!t,Gn(M,"Visibility changed")}const un=e=>{const t=new Set;for(const n of e){t.add(n);for(const e of vn(n))t.add(e)}return ee("Inspecting:\n",t),t},mn=e=>{if(0===e.size)return;ae("addObservers");const t=un(e);be.attachObservers(t),ve.attachObserverToNonStaticElements(t),oe()},fn=e=>{if(0===e.size)return;ae("removeObservers");const t=un(e);be.detachObservers(t),ve.detachObservers(t),oe()};function hn(e){!function({addedNodes:e,removedNodes:t}){ae("contentMutated"),Bt(),Nt(),rn(),oe(),fn(t),mn(e)}(e),Gn(T,"Mutation Observed")}function pn(){const e=vn(document.documentElement);var t;K("Attaching Observers"),t=[Ke(hn),sn(e),gt(),ln(e),Tt(dn)],X.push(...t.map(e=>e.disconnect))}function gn(t){performance.mark(st);const n=W(t);let o=1,r=document.documentElement,i=De?0:document.documentElement.getBoundingClientRect().bottom;const a=De?it:Pe?Array.from(et):vn(document.documentElement);for(const e of a)o=e.getBoundingClientRect()[t]+parseFloat(getComputedStyle(e).getPropertyValue(`margin-${t}`)),o>i&&(i=o,r=e);return ee(`${n} position calculated from:`,r),ee(`Checked %c${a.length}%c elements`,e.HIGHLIGHT,e.FOREGROUND),performance.mark(ct,{detail:{hasTags:De,len:a.length,logging:Je,Side:n}}),i}const yn=e=>[e.bodyOffset(),e.bodyScroll(),e.documentElementOffset(),e.documentElementScroll(),e.boundingClientRect()],bn=`* ${Array.from(R).map(e=>`:not(${e})`).join("")}`,vn=e=>e.querySelectorAll(bn),zn={height:0,width:0},wn={height:0,width:0},$n=[e.HIGHLIGHT,e.FOREGROUND,e.HIGHLIGHT];function In(t){function n(){return wn[r]=i,zn[r]=c,Math.max(i,1)}const o=t===On,r=t.label,i=t.boundingClientRect(),a=Math.ceil(i),s=Math.floor(i),c=(e=>e.documentElementScroll()+Math.max(0,e.getOffset()))(t),l=`HTML: %c${i}px %cPage: %c${c}px`;let d=1;switch(!0){case!t.enabled():return Math.max(c,1);case De:ee("Found element with data-iframe-size attribute"),d=t.taggedElement();break;case!Pe&&je&&0===wn[r]&&0===zn[r]:ee(`Initial page size values: ${l}`,...$n),d=n();break;case mt&&i===wn[r]&&c===zn[r]:ee(`Size unchanged: ${l}`,...$n),d=Math.max(i,c);break;case 0===i&&0!==c:ee(`Page is hidden: ${l}`,...$n),d=c;break;case!Pe&&i!==wn[r]&&c<=zn[r]:ee(`New <html> size: ${l} `,...$n),ee(`Previous <html> size: %c${wn[r]}px`,e.HIGHLIGHT),d=n();break;case!o:d=t.taggedElement();break;case!Pe&&i<wn[r]:ee(`<html> size decreased: ${l}`,...$n),d=n();break;case c===s||c===a:ee(`<html> size equals page size: ${l}`,...$n),d=n();break;case i>c:ee(`Page size < <html> size: ${l}`,...$n),d=n();break;case Pe:ee("Found elements possibly overflowing <html> "),d=t.taggedElement();break;default:ee(`Using <html> size: ${l}`,...$n),d=n()}return ee(`Content ${r}: %c${d}px`,e.HIGHLIGHT),d+=function(t){const n=t.getOffset();return 0!==n&&ee(`Page offsetSize: %c${n}px`,e.HIGHLIGHT),n}(t),Math.max(d,1)}const On={label:h,enabled:()=>Ae,getOffset:()=>Ye,auto:()=>In(On),bodyOffset:()=>{const{body:e}=document,t=getComputedStyle(e);return e.offsetHeight+parseInt(t.marginTop,d)+parseInt(t.marginBottom,d)},bodyScroll:()=>document.body.scrollHeight,offset:()=>On.bodyOffset(),custom:()=>N.height(),documentElementOffset:()=>document.documentElement.offsetHeight,documentElementScroll:()=>document.documentElement.scrollHeight,boundingClientRect:()=>Math.max(document.documentElement.getBoundingClientRect().bottom,document.body.getBoundingClientRect().bottom),max:()=>Math.max(...yn(On)),min:()=>Math.min(...yn(On)),grow:()=>On.max(),lowestElement:()=>gn(y),taggedElement:()=>gn(y)},Sn={label:p,enabled:()=>Le,getOffset:()=>Xe,auto:()=>In(Sn),bodyScroll:()=>document.body.scrollWidth,bodyOffset:()=>document.body.offsetWidth,custom:()=>N.width(),documentElementScroll:()=>document.documentElement.scrollWidth,documentElementOffset:()=>document.documentElement.offsetWidth,boundingClientRect:()=>Math.max(document.documentElement.getBoundingClientRect().right,document.body.getBoundingClientRect().right),max:()=>Math.max(...yn(Sn)),min:()=>Math.min(...yn(Sn)),rightMostElement:()=>gn(b),scroll:()=>Math.max(Sn.bodyScroll(),Sn.documentElementScroll()),taggedElement:()=>gn(b)},Hn=(e,t)=>!(Math.abs(e-t)<=ut);function Tn(e,t){const n=e[t](),o=e.enabled()&&void 0!==Ie?function(e){const t=Ie(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`);if(t<1)throw new RangeError(`Out of range value returned from onBeforeResize(): ${t}, must be at least 1`);return t}(n):n;return ne(o>=1,`New iframe ${e.label} is too small: ${o}, must be at least 1`),o}let Mn=!1;const En=B(()=>ue(C(4)));let kn,Rn=!1;const Gn=ie((t,n,o,i,a)=>{switch(ae(t),!0){case!0===Ve:if(!0===Rn)break;K("Iframe hidden - Ignored resize request"),Rn=!0,Mn=!1,cancelAnimationFrame(kn);break;case!0===Mn&&t!==H:K("Resize already pending - Ignored resize request");break;case!Se&&!(t in I):ee("Resizing disabled");break;default:Rn=!1,Mn=!0,we=performance.now(),ze=!0,kn=requestAnimationFrame(()=>{Mn=!1,ae("requestAnimationFrame"),te(`Reset sendPending: %c${t}`,e.HIGHLIGHT)}),function(t,n,o,i,a){const s=o??Tn(On,Be),c=i??Tn(Sn,ht),l=Ae&&Hn(qe,s)||Le&&Hn(ft,c)?z:t;switch(K(`Resize event: %c${n}`,e.HIGHLIGHT),l){case r:case v:case z:qe=s,ft=c;case O:An(qe,ft,t,a);break;case H:case T:case S:case M:K(E);break;default:ee(E)}ze=!1}(t,n,o,i,a)}oe()});function Nn(e){qe=On[Be](),ft=Sn[ht](),Ln(qe,ft,e)}function An(t,n,o,i,a){_e<-1||(void 0!==a?K(`Message targetOrigin: %c${a}`,e.HIGHLIGHT):a=dt,function(){const s=`${tt}:${t}:${n}:${o}${void 0===i?"":`:${i}`}`;if(ot)try{window.parent.iframeParentListener(k+s)}catch(e){if(1!==_e)throw e;return void En()}else lt.postMessage(k+s,a);ze&&K(function(){const e=U(performance.now()-we);return o===r?`Initialised iframe in %c${e}ms`:`Size calculated in %c${e}ms`}(),e.HIGHLIGHT),ee(`Sending message to parent page via ${ot?"sameOrigin":"postMessage"}: %c%c${s}`,e.ITALIC,e.HIGHLIGHT)}())}const Ln=ie((e,t,n,o,r)=>{ae(n),An(e,t,n,o,r),oe()}),jn=ie(function(t){ae("onMessage");const{freeze:n}=Object,{parse:o}=JSON,i=e=>n(o(e)),c=e=>Ln(0,0,`${e}Stop`),l={init:function(){if("loading"===document.readyState)return void K("Page not ready, ignoring init message");const e=t.data.slice(13).split(":");lt=t.source,ye=t.origin,Ot(e),je=!1,setTimeout(()=>{Ue=!1},128)},reset(){Ue?K("Page reset ignored by init"):(K("Page size reset by host page"),Nn("resetPage"))},resize(){K("Resize requested by host page"),Gn($,"Parent window requested size check")},moveToAnchor(){We.findTarget(u())},inPageLink(){this.moveToAnchor()},pageInfo(){const e=u();K("PageInfo received from parent:",i(e)),wt?q(wt,o(e)):c(a)},parentInfo(){const e=i(u());K("ParentInfo received from parent:",e),It?q(It,e):c(s)},message(){const t=u();K("onMessage called from parent:%c",e.HIGHLIGHT,i(t)),q(bt,o(t))}},d=()=>t.data.split("]")[1].split(":")[0],u=()=>t.data.slice(t.data.indexOf(":")+1),m=()=>t.data.split(":")[2]in{true:1,false:1};function f(){const e=d();ae(e),e in l?l[e]():"iframeResize"in window||void 0!==window.jQuery&&""in window.jQuery.prototype||m()||le(`Unexpected message (${t.data})`)}k===`${t.data}`.slice(0,13)&&function(){if(!1!==je)return m()?(se(d()),ae(r),void l.init()):void K(`Ignored message of type "${d()}". Received before initialization.`);f()}()});let xn=!1;const Pn=e=>e.postMessage("[iFrameResizerChild]Ready",window?.iframeResizer?.targetOrigin||"*");function Cn(){if("loading"===document.readyState||!je||xn)return;const{parent:t,top:n}=window;ae("ready"),K("Sending%c ready%c to parent from",e.HIGHLIGHT,e.FOREGROUND,window.location.href),Pn(t),t!==n&&Pn(n),xn=!0}"iframeChildListener"in window?le("Already setup"):(window.iframeChildListener=e=>setTimeout(()=>jn({data:e,sameOrigin:!0})),G(window,i,jn),G(document,g,Cn),Cn())}();
21
+ //# sourceMappingURL=index.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.cjs.js","sources":["../../packages/common/consts.js","../../packages/common/listeners.js","../../packages/common/mode.js","../../packages/common/utils.js","../../packages/child/console.js","../../packages/common/format-advise.js","../../packages/common/deprecate.js","../../packages/child/check-blocking-css.js","../../packages/child/from-string.js","../../packages/child/observers/utils.js","../../packages/child/observers/mutation.js","../../packages/child/observers/overflow.js","../../packages/child/observers/perf.js","../../packages/child/observers/resize.js","../../packages/child/observers/visibility.js","../../packages/child/read.js","../../packages/child/index.js"],"sourcesContent":["export const VERSION = '[VI]{version}[/VI]'\nexport const LABEL = 'iframeResizer'\n\nexport const AUTO_RESIZE = 'autoResize'\nexport const BEFORE_UNLOAD = 'beforeUnload'\nexport const CLOSE = 'close'\nexport const IN_PAGE_LINK = 'inPageLink'\nexport const INIT = 'init'\nexport const INIT_FROM_IFRAME = 'iframeReady'\nexport const LOAD = 'load'\nexport const MESSAGE = 'message'\nexport const MOUSE_ENTER = 'mouseenter'\nexport const MOUSE_LEAVE = 'mouseleave'\nexport const ONLOAD = 'onload'\nexport const PAGE_INFO = 'pageInfo'\nexport const PARENT_INFO = 'parentInfo'\nexport const PAGE_INFO_STOP = 'pageInfoStop'\nexport const PARENT_INFO_STOP = 'parentInfoStop'\nexport const RESET = 'reset'\nexport const RESIZE = 'resize'\nexport const SCROLL_BY = 'scrollBy'\nexport const SCROLL_TO = 'scrollTo'\nexport const SCROLL_TO_OFFSET = 'scrollToOffset'\nexport const TITLE = 'title'\n\nexport const BASE = 10\nexport const SINGLE = 1\nexport const MIN_SIZE = 1\n\nexport const SIZE_ATTR = 'data-iframe-size'\nexport const OVERFLOW_ATTR = 'data-iframe-overflowed'\nexport const IGNORE_ATTR = 'data-iframe-ignore'\n\nexport const HEIGHT = 'height'\nexport const WIDTH = 'width'\nexport const SCROLL = 'scroll'\n\nexport const READY_STATE_CHANGE = 'readystatechange'\n\nexport const HEIGHT_EDGE = 'bottom'\nexport const WIDTH_EDGE = 'right'\n\nexport const ENABLE = 'autoResizeEnabled'\nexport const SIZE_CHANGE_DETECTED = Symbol('sizeChanged')\nexport const MANUAL_RESIZE_REQUEST = 'manualResize'\nexport const PARENT_RESIZE_REQUEST = 'parentResize'\nexport const IGNORE_DISABLE_RESIZE = {\n [MANUAL_RESIZE_REQUEST]: 1,\n [PARENT_RESIZE_REQUEST]: 1,\n}\n\nexport const SET_OFFSET_SIZE = 'setOffsetSize'\n\nexport const RESIZE_OBSERVER = 'resizeObserver'\nexport const OVERFLOW_OBSERVER = 'overflowObserver'\nexport const MUTATION_OBSERVER = 'mutationObserver'\nexport const VISIBILITY_OBSERVER = 'visibilityObserver'\n\nexport const BOLD = 'font-weight: bold;'\nexport const NORMAL = 'font-weight: normal;'\nexport const ITALIC = 'font-style: italic;'\nexport const BLUE = 'color: #135CD2;'\nexport const BLUE_LIGHT = 'color: #A9C7FB;'\nexport const BLACK = 'color: black;'\nexport const WHITE = 'color: #E3E3E3;'\n\nexport const NONE = 'none'\nexport const BOTH = 'both'\nexport const VERTICAL = 'vertical'\nexport const HORIZONTAL = 'horizontal'\n\nexport const NO_CHANGE = 'No change in content size detected'\n\nexport const MESSAGE_HEADER_LENGTH = MESSAGE.length\nexport const MESSAGE_ID = '[iFrameSizer]' // Must match iframe msg ID\nexport const MESSAGE_ID_LENGTH = MESSAGE_ID.length\nexport const RESET_REQUIRED_METHODS = Object.freeze({\n max: 1,\n scroll: 1,\n bodyScroll: 1,\n documentElementScroll: 1,\n})\n\nexport const INIT_EVENTS = Object.freeze({\n [ONLOAD]: 1,\n [INIT]: 1,\n [INIT_FROM_IFRAME]: 1,\n})\n\nexport const EXPAND = 'expanded'\nexport const COLLAPSE = 'collapsed'\n\nexport const LOG_OPTIONS = Object.freeze({\n [EXPAND]: 1,\n [COLLAPSE]: 1,\n})\n\nexport const IGNORE_TAGS = new Set([\n 'head',\n 'body',\n 'meta',\n 'base',\n 'title',\n 'script',\n 'link',\n 'style',\n 'map',\n 'area',\n 'option',\n 'optgroup',\n 'template',\n 'track',\n 'wbr',\n 'nobr',\n])\n","export const addEventListener = (el, evt, func, options) =>\n el.addEventListener(evt, func, options || false)\n\nexport const removeEventListener = (el, evt, func) =>\n el.removeEventListener(evt, func, false)\n","const l = (l) => {\n if (!l) return ''\n let p = -559038744,\n y = 1103547984\n for (let z, t = 0; t < l.length; t++)\n ((z = l.codePointAt(t)),\n (p = Math.imul(p ^ z, 2246822519)),\n (y = Math.imul(y ^ z, 3266489917)))\n return (\n (p ^= Math.imul(p ^ (y >>> 15), 1935289751)),\n (y ^= Math.imul(y ^ (p >>> 15), 3405138345)),\n (p ^= y >>> 16),\n (y ^= p >>> 16),\n (2097152 * (y >>> 0) + (p >>> 11)).toString(36)\n )\n },\n p = (l) =>\n l.replace(/[A-Za-z]/g, (l) =>\n String.fromCodePoint(\n (l <= 'Z' ? 90 : 122) >= (l = l.codePointAt(0) + 19) ? l : l - 26,\n ),\n ),\n x = ['spjluzl', 'rlf', 'clyzpvu'],\n y = [\n '<yi>Puchspk Spjluzl Rlf</><iy><iy>',\n '<yi>Tpzzpun Spjluzl Rlf</><iy><iy>',\n '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</>',\n '<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</>.',\n '<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.',\n ],\n z = ['NWSc3', 'zvsv', 'wyv', 'ibzpulzz', 'vlt'],\n t = Object.fromEntries(\n [\n '2cgs7fdf4xb',\n '1c9ctcccr4z',\n '1q2pc4eebgb',\n 'ueokt0969w',\n 'w2zxchhgqz',\n '1umuxblj2e5',\n ].map((l, p) => [l, Math.max(0, p - 1)]),\n )\nexport const getModeData = (l) => p(y[l])\nexport const getModeLabel = (l) => p(z[l])\nexport const getKey = (l) => p(x[l])\nexport default (y) => {\n const z = y[p(x[0])] || y[p(x[1])] || y[p(x[2])]\n if (!z) return -1\n const u = z.split('-')\n let v = (function (y = '') {\n let z = -2\n const u = l(p(y))\n return u in t && (z = t[u]), z\n })(u[0])\n return 0 === v || ((p) => p[2] === l(p[0] + p[1]))(u) || (v = -2), v\n}\n","export const isElement = (node) => node.nodeType === Node.ELEMENT_NODE\n\nexport const isNumber = (value) => !Number.isNaN(value)\n\nexport const isolateUserCode = (func, ...val) =>\n setTimeout(() => func(...val), 0)\n\nexport const once = (fn) => {\n let done = false\n\n return function () {\n return done\n ? undefined\n : ((done = true), Reflect.apply(fn, this, arguments))\n }\n}\n\nexport const hasOwn =\n Object.hasOwn || ((o, k) => Object.prototype.hasOwnProperty.call(o, k))\n\nexport const isDarkModeEnabled = () =>\n window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches\n\nexport const id = (x) => x\n\nconst ROUNDING = 1000\n\nexport const round = (value) => Math.round(value * ROUNDING) / ROUNDING\n\nexport const capitalizeFirstLetter = (string) =>\n string.charAt(0).toUpperCase() + string.slice(1)\n\nexport const isDef = (value) => `${value}` !== '' && value !== undefined\n\nexport function getElementName(el) {\n switch (true) {\n case !isDef(el):\n return ''\n\n case isDef(el.id):\n return `${el.nodeName}#${el.id}`\n\n case isDef(el.name):\n return `${el.nodeName} (${el.name}`\n\n case isDef(el.className):\n return `${el.nodeName}.${el.className}`\n\n default:\n return el.nodeName\n }\n}\n\nexport const esModuleInterop = (mod) =>\n // eslint-disable-next-line no-underscore-dangle\n mod?.__esModule ? mod.default : mod\n\nexport const typeAssert = (value, type, error) => {\n // eslint-disable-next-line valid-typeof\n if (typeof value !== type) {\n throw new TypeError(`${error} is not a ${capitalizeFirstLetter(type)}`)\n }\n}\n","import acg, { NORMAL } from 'auto-console-group'\n\nimport { BOLD, LABEL } from '../common/consts'\nimport deprecate from '../common/deprecate'\nimport formatAdvise from '../common/format-advise'\nimport { esModuleInterop, id as identity } from '../common/utils'\n\nlet enabled = true\nlet id = LABEL\n\n// Deal with UMD not converting default exports to named exports\nconst createGroupConsole = esModuleInterop(acg)\n\nconst childConsole = createGroupConsole({\n label: `${LABEL}(child)`,\n expand: false,\n})\n\nexport function setConsoleOptions(options) {\n id = options.id || LABEL\n childConsole.label(`${id}`)\n childConsole.expand(options.expand)\n enabled = options.enabled\n}\n\nexport const setupConsoleMethod =\n (method) =>\n (...args) =>\n enabled ? childConsole[method](...args) : true\n\nexport const log = setupConsoleMethod('log')\nexport const info = log // setupConsoleMethod('info')\nexport const debug = setupConsoleMethod('debug')\n\nexport function vInfo(ver, mode) {\n // eslint-disable-next-line no-console\n console.info(\n `${id} %ciframe-resizer ${ver}`,\n enabled || mode < 1 ? BOLD : NORMAL,\n )\n}\n\nexport const {\n assert,\n endAutoGroup,\n error,\n errorBoundary,\n event,\n label,\n purge,\n warn,\n} = childConsole\n\nexport const advise = (msg) => childConsole.warn(formatAdvise(identity)(msg))\n\nexport const adviser = advise\n\nconst deprecateAdvise = deprecate((id, msg) => advise(msg))\nexport const deprecateMethod = deprecateAdvise('Method')\nexport const deprecateMethodReplace = deprecateAdvise('Method', 'replaced with')\nexport const deprecateOption = deprecateAdvise('Option')\n","const encode = (s) =>\n s\n .replaceAll('<br>', '\\n')\n .replaceAll('<rb>', '\\u001B[31;1m')\n .replaceAll('</>', '\\u001B[m')\n .replaceAll('<b>', '\\u001B[1m')\n .replaceAll('<i>', '\\u001B[3m')\n .replaceAll('<u>', '\\u001B[4m')\n\nconst remove = (s) => s.replaceAll('<br>', '\\n').replaceAll(/<[/a-z]+>/gi, '')\n\nexport default (formatLogMsg) => (msg) =>\n window.chrome // Only show formatting in Chrome as not supported in other browsers\n ? formatLogMsg(encode(msg))\n : formatLogMsg(remove(msg))\n","export default (advise) =>\n (type, change = 'renamed to') =>\n (old, replacement, info = '', iframeId = '') =>\n advise(\n iframeId,\n `<rb>Deprecated ${type}(${old.replace('()', '')})</>\\n\\nThe <b>${old}</> ${type.toLowerCase()} has been ${change} <b>${replacement}</>. ${info}Use of the old ${type.toLowerCase()} will be removed in a future version of <i>iframe-resizer</>.`,\n )\n","import { advise, log } from './console'\n\nconst nodes = () => [document.documentElement, document.body]\nconst properties = ['min-height', 'min-width', 'max-height', 'max-width']\n\nconst blockedStyleSheets = new Set()\n\nconst hasCssValue = (value) =>\n value && value !== '0px' && value !== 'auto' && value !== 'none'\n\nconst getElementName = (node) =>\n node.tagName ? node.tagName.toLowerCase() : 'unknown'\n\nconst getComputedStyle = (node, property) =>\n window.getComputedStyle(node).getPropertyValue(property)\n\nconst hasBlockingCSS = (node, property) =>\n hasCssValue(getComputedStyle(node, property))\n\nfunction getInlineStyleValue(node, property) {\n const inlineValue = node.style[property]\n return inlineValue\n ? { source: 'an inline style attribute', value: inlineValue }\n : null\n}\n\nfunction crossOriginStylesheetError({ href }) {\n if (blockedStyleSheets.has(href)) return\n log('Unable to access stylesheet:', href)\n blockedStyleSheets.add(href)\n}\n\n// eslint-disable-next-line sonarjs/cognitive-complexity\nfunction getStyleSheetCSSPropertyValue(node, property) {\n for (const stylesheet of document.styleSheets) {\n try {\n for (const rule of stylesheet.cssRules || []) {\n if (rule.selectorText && node.matches(rule.selectorText)) {\n const ruleValue = rule.style[property]\n if (ruleValue) {\n const sourceType =\n stylesheet.ownerNode.tagName === 'STYLE'\n ? 'an inline <style> block'\n : `stylesheet (${stylesheet.href})`\n\n return {\n source: sourceType,\n value: ruleValue,\n }\n }\n }\n }\n } catch (error) {\n crossOriginStylesheetError(stylesheet)\n }\n }\n\n return {\n source: 'cross-origin stylesheet',\n value: getComputedStyle(node, property),\n }\n}\n\nconst getSetCSSPropertyValue = (node, property) =>\n getInlineStyleValue(node, property) ||\n getStyleSheetCSSPropertyValue(node, property)\n\nconst showCssWarning = (node, property) => {\n const { source, value } = getSetCSSPropertyValue(node, property)\n const nodeName = getElementName(node)\n\n advise(\n `The <b>${property}</> CSS property is set to <b>${value}</> on the <b><${nodeName}></> element via ${source}. 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.`,\n )\n}\n\nexport default function checkBlockingCSS() {\n for (const node of nodes()) {\n for (const property of properties) {\n log(`Checking <${getElementName(node)}> for blocking CSS: ${property}`)\n if (hasBlockingCSS(node, property)) showCssWarning(node, property)\n }\n }\n}\n","const strBool = (str) => str === 'true'\n\nconst castDefined = (cast) => (data) =>\n undefined === data ? undefined : cast(data)\n\nexport const getBoolean = castDefined(strBool)\nexport const getNumber = castDefined(Number)\n","import { HIGHLIGHT, NORMAL } from 'auto-console-group'\n\nimport { debug, error, info } from '../console'\n\nexport const metaCreateDebugObserved =\n (text = '') =>\n (type) =>\n (observed) => {\n if (observed.size > 0) {\n debug(\n `${type}Observer ${text}:`,\n ...Array.from(observed).flatMap((node) => ['\\n', node]),\n )\n }\n }\n\nexport const metaCreateErrorObserved =\n (text = '') =>\n (type) =>\n (observed) => {\n if (observed.size > 0) {\n error(\n `${type}Observer ${text}:`,\n ...Array.from(observed).flatMap((node) => ['\\n', node]),\n )\n }\n }\n\nexport const createLogNewlyObserved = metaCreateDebugObserved('attached to')\n\nexport const createWarnAlreadyObserved =\n metaCreateErrorObserved('already attached')\n\nconst createLogNewlyRemoved = metaCreateDebugObserved('detached from')\n\nexport const createLogCounter =\n (type, isAttach = true) =>\n (counter) => {\n if (counter > 0) {\n info(\n `${isAttach ? 'At' : 'De'}tached ${type}Observer ${isAttach ? 'to' : 'from'} %c${counter}%c element${counter === 1 ? '' : 's'}`,\n HIGHLIGHT,\n NORMAL,\n )\n }\n }\n\nexport const createDetachObservers = (type, observer, observed, logCounter) => {\n const logNewlyRemoved = createLogNewlyRemoved(type)\n\n return (nodeList) => {\n const newlyRemoved = new Set()\n let counter = 0\n\n for (const node of nodeList) {\n if (!observed.has(node)) continue\n observer.unobserve(node)\n observed.delete(node)\n newlyRemoved.add(node)\n counter += 1\n }\n\n logNewlyRemoved(newlyRemoved)\n logCounter(counter)\n newlyRemoved.clear()\n }\n}\n","import { FOREGROUND, HIGHLIGHT } from 'auto-console-group'\n\nimport { IGNORE_ATTR, IGNORE_TAGS, SIZE_ATTR } from '../../common/consts'\nimport { round } from '../../common/utils'\nimport { event, info, log } from '../console'\nimport { metaCreateDebugObserved } from './utils'\n\nconst DELAY = 16 // Corresponds to 60fps\nconst DELAY_MARGIN = 2\nconst DELAY_MAX = 200\nconst MUTATION = 'Mutation'\n\nconst addedNodes = new Set()\nconst removedNodes = new Set()\nconst removedAddedNodes = new Set()\nconst newMutations = []\n\nconst config = {\n attributes: true,\n attributeFilter: [IGNORE_ATTR, SIZE_ATTR],\n attributeOldValue: false,\n characterData: false,\n characterDataOldValue: false,\n childList: true,\n subtree: true,\n}\n\nlet delayCount = 1\nlet processMutations\nlet pending = false\nlet perfMon = 0\n\nconst logAdded = metaCreateDebugObserved('added')(MUTATION)\nconst logRemovedPage = metaCreateDebugObserved('removed (page)')(MUTATION)\nconst logRemovedAdded = metaCreateDebugObserved('removed (added)')(MUTATION)\n\nconst shouldSkip = (node) =>\n node.nodeType !== Node.ELEMENT_NODE ||\n IGNORE_TAGS.has(node.tagName.toLowerCase())\n\nfunction addedMutation(mutation) {\n const added = mutation.addedNodes\n\n for (const node of added) {\n if (shouldSkip(node)) continue\n addedNodes.add(node)\n }\n}\n\nfunction removedMutation(mutation) {\n const removed = mutation.removedNodes\n\n for (const node of removed) {\n if (shouldSkip(node)) continue\n if (addedNodes.has(node)) {\n addedNodes.delete(node)\n removedAddedNodes.add(node)\n } else {\n removedNodes.add(node)\n }\n }\n}\n\nconst flatFilterMutations = (mutations) => {\n info('Mutations:', mutations)\n\n for (const mutation of mutations) {\n addedMutation(mutation)\n removedMutation(mutation)\n }\n\n logAdded(addedNodes)\n logRemovedPage(removedNodes)\n logRemovedAdded(removedAddedNodes)\n removedAddedNodes.clear()\n}\n\nfunction logMutations() {\n if (removedNodes.size > 0) {\n log(\n `Detected %c${removedNodes.size} %cremoved element${removedNodes.size > 1 ? 's' : ''}`,\n HIGHLIGHT,\n FOREGROUND,\n )\n }\n\n if (addedNodes.size > 0) {\n log(\n `Found %c${addedNodes.size} %cnew element${addedNodes.size > 1 ? 's' : ''}`,\n HIGHLIGHT,\n FOREGROUND,\n )\n }\n}\n\nconst createProcessMutations = (callback) => () => {\n const now = performance.now()\n const delay = now - perfMon\n const delayLimit = DELAY * delayCount++ + DELAY_MARGIN\n\n // Back off if the callStack is busy with other stuff\n if (delay > delayLimit && delay < DELAY_MAX) {\n event('mutationThrottled')\n info('Update delayed due to heavy workload on the callStack')\n info(\n `EventLoop busy time: %c${round(delay)}ms %c> Max wait: %c${delayLimit - DELAY_MARGIN}ms`,\n HIGHLIGHT,\n FOREGROUND,\n HIGHLIGHT,\n )\n setTimeout(processMutations, DELAY * delayCount)\n perfMon = now\n return\n }\n\n delayCount = 1\n\n newMutations.forEach(flatFilterMutations)\n newMutations.length = 0\n pending = false\n\n logMutations()\n\n callback({ addedNodes, removedNodes })\n\n addedNodes.clear()\n removedNodes.clear()\n}\n\nfunction mutationObserved(mutations) {\n newMutations.push(mutations)\n if (pending) return\n\n perfMon = performance.now()\n pending = true\n requestAnimationFrame(processMutations)\n}\n\nexport default function createMutationObserver(callback) {\n const observer = new window.MutationObserver(mutationObserved)\n const target = document.body || document.documentElement\n\n processMutations = createProcessMutations(callback)\n\n observer.observe(target, config)\n\n info('Attached MutationObserver to body')\n\n return {\n ...observer,\n disconnect: () => {\n addedNodes.clear()\n removedNodes.clear()\n newMutations.length = 0\n observer.disconnect()\n info('Detached MutationObserver')\n },\n }\n}\n","import { HEIGHT_EDGE, OVERFLOW_ATTR } from '../../common/consts'\nimport { id } from '../../common/utils'\nimport { info } from '../console'\nimport {\n createDetachObservers,\n createLogCounter,\n createLogNewlyObserved,\n createWarnAlreadyObserved,\n} from './utils'\n\nconst OVERFLOW = 'Overflow'\nconst logAddOverflow = createLogCounter(OVERFLOW)\nconst logRemoveOverflow = createLogCounter(OVERFLOW, false)\nconst logNewlyObserved = createLogNewlyObserved(OVERFLOW)\nconst warnAlreadyObserved = createWarnAlreadyObserved(OVERFLOW)\n\nconst isHidden = (node) =>\n node.hidden || node.offsetParent === null || node.style.display === 'none'\n\nconst createOverflowObserver = (callback, options) => {\n const side = options.side || HEIGHT_EDGE\n const observerOptions = {\n root: options.root,\n rootMargin: '0px',\n threshold: 1,\n }\n\n const afterReflow = window?.requestAnimationFrame || id\n const emitOverflowDetected = (mutated = false) => callback(mutated)\n\n const isOverflowed = (edge, rootBounds) =>\n edge === 0 || edge > rootBounds[side]\n\n const setOverflow = (node, hasOverflow) =>\n node.toggleAttribute(OVERFLOW_ATTR, hasOverflow)\n\n function observation(entries) {\n for (const entry of entries) {\n const { boundingClientRect, rootBounds, target } = entry\n if (!rootBounds) continue // guard\n const edge = boundingClientRect[side]\n const hasOverflow = isOverflowed(edge, rootBounds) && !isHidden(target)\n\n setOverflow(target, hasOverflow)\n }\n\n afterReflow(emitOverflowDetected)\n }\n\n const observer = new IntersectionObserver(observation, observerOptions)\n const observed = new WeakSet()\n\n function attachObservers(nodeList) {\n const alreadyObserved = new Set()\n const newlyObserved = new Set()\n let counter = 0\n\n for (const node of nodeList) {\n if (node.nodeType !== Node.ELEMENT_NODE) continue\n if (observed.has(node)) {\n alreadyObserved.add(node)\n continue\n }\n\n observer.observe(node)\n observed.add(node)\n newlyObserved.add(node)\n counter += 1\n }\n\n warnAlreadyObserved(alreadyObserved)\n logNewlyObserved(newlyObserved)\n logAddOverflow(counter)\n\n newlyObserved.clear()\n alreadyObserved.clear()\n }\n\n return {\n attachObservers,\n detachObservers: createDetachObservers(\n OVERFLOW,\n observer,\n observed,\n logRemoveOverflow,\n ),\n disconnect: () => {\n observer.disconnect()\n info('Detached OverflowObserver')\n },\n }\n}\n\nexport default createOverflowObserver\n","import { round } from '../../common/utils'\nimport { advise, event, info, log } from '../console'\n\nconst SECOND = 1000\nconst PERF_CHECK_INTERVAL = 5 * SECOND\nconst THRESHOLD = 4 // ms\nconst MIN_SAMPLES = 10\nconst MAX_SAMPLES = 100\n\nexport const PREF_START = '--ifr-start'\nexport const PREF_END = '--ifr-end'\nconst PREF_MEASURE = '--ifr-measure'\n\nconst timings = []\n// const usedTags = new WeakSet()\n\n// const addUsedTag = (el) => typeof el === 'object' && usedTags.add(el)\n\nlet detail = {}\nlet oldAverage = 0\nlet timingCheckId\n\nfunction clearPerfMarks() {\n try {\n performance.clearMarks(PREF_START)\n performance.clearMarks(PREF_END)\n performance.clearMeasures(PREF_MEASURE)\n } catch {\n // Ignore errors if marks are not supported\n }\n}\n\nfunction startTimingCheck() {\n timingCheckId = setInterval(() => {\n if (timings.length < MIN_SAMPLES) return\n if (detail.hasTags && detail.len < 25) return\n\n timings.sort()\n\n const average = Math.min(\n timings.reduce((a, b) => a + b, 0) / timings.length,\n timings[Math.floor(timings.length / 2)],\n )\n\n const roundedAverage = round(average)\n\n if (roundedAverage > oldAverage) {\n oldAverage = roundedAverage\n event('performanceObserver')\n log('Mean time:', round(timings[Math.floor(timings.length / 2)]))\n log(\n 'Median time:',\n round(timings.reduce((a, b) => a + b, 0) / timings.length),\n )\n log('Average time:', roundedAverage)\n log('Max time:', round(Math.max(...timings)))\n // debug('Timings:', JSON.parse(JSON.stringify(timings.map(round))))\n }\n\n clearPerfMarks()\n\n if (average <= THRESHOLD) return\n\n clearInterval(timingCheckId)\n\n advise(\n `<rb>Performance Warning</>\n\nCalculating the page size is taking an excessive amount of time (${round(average)}ms).\n\nTo improve performance add the <b>data-iframe-size</> attribute to the ${detail.Side.toLowerCase()} most element on the page. For more details see: <u>https://iframe-resizer.com/perf</>.`,\n )\n }, PERF_CHECK_INTERVAL)\n}\n\nfunction perfObserver(list) {\n list.getEntries().forEach((entry) => {\n if (entry.name !== PREF_END) return\n try {\n const { duration } = performance.measure(\n PREF_MEASURE,\n PREF_START,\n PREF_END,\n )\n detail = entry.detail\n timings.push(duration)\n if (timings.length > MAX_SAMPLES) timings.shift()\n } catch {\n // Missing marks; ignore\n }\n })\n}\n\nexport default function createPerformanceObserver() {\n info('Attached PerformanceObserver to page')\n const observer = new PerformanceObserver(perfObserver)\n observer.observe({ entryTypes: ['mark'] })\n\n // addUsedTag(document.documentElement)\n // addUsedTag(document.body)\n\n startTimingCheck()\n\n return {\n disconnect: () => {\n clearPerfMarks()\n clearInterval(timingCheckId)\n observer.disconnect()\n info('Detached PerformanceObserver')\n },\n }\n}\n","import { info } from '../console'\nimport {\n createDetachObservers,\n createLogCounter,\n createLogNewlyObserved,\n createWarnAlreadyObserved,\n} from './utils'\n\nconst RESIZE = 'Resize'\nconst logAddResize = createLogCounter(RESIZE)\nconst logRemoveResize = createLogCounter(RESIZE, false)\nconst logNewlyObserved = createLogNewlyObserved(RESIZE)\nconst warnAlreadyObserved = createWarnAlreadyObserved(RESIZE)\nconst observed = new WeakSet()\nconst alreadyObserved = new Set()\nconst newlyObserved = new Set()\n\nlet observer\n\nexport function attachObserverToNonStaticElements(nodeList) {\n let counter = 0\n\n for (const node of nodeList) {\n if (node.nodeType !== Node.ELEMENT_NODE) continue\n\n const position = getComputedStyle(node)?.position\n if (position === '' || position === 'static') continue\n\n if (observed.has(node)) {\n alreadyObserved.add(node)\n continue\n }\n\n observer.observe(node)\n observed.add(node)\n newlyObserved.add(node)\n counter += 1\n }\n\n warnAlreadyObserved(alreadyObserved)\n logNewlyObserved(newlyObserved)\n logAddResize(counter)\n\n newlyObserved.clear()\n alreadyObserved.clear()\n}\n\nexport default (callback) => {\n observer = new ResizeObserver(callback)\n observer.observe(document.body)\n observed.add(document.body)\n info('Attached ResizeObserver to body')\n\n return {\n attachObserverToNonStaticElements,\n detachObservers: createDetachObservers(\n RESIZE,\n observer,\n observed,\n logRemoveResize,\n ),\n disconnect: () => {\n observer.disconnect()\n info('Detached ResizeObserver')\n },\n }\n}\n","import { info } from '../console'\n\nexport default function visibilityObserver(callback) {\n const observer = new IntersectionObserver(\n (entries) => callback(entries[0].isIntersecting),\n {\n threshold: 0,\n },\n )\n\n const target = document.documentElement\n observer.observe(target)\n\n info('Attached VisibilityObserver to page')\n\n return {\n disconnect: () => {\n observer.disconnect()\n info('Detached VisibilityObserver')\n },\n }\n}\n","const read = (type) => (data, key) => {\n if (!(key in data)) return\n // eslint-disable-next-line valid-typeof, consistent-return\n if (typeof data[key] === type) return data[key]\n\n throw new TypeError(`${key} is not a ${type}.`)\n}\n\nexport const readFunction = read('function')\nexport const readBoolean = read('boolean')\nexport const readNumber = read('number')\nexport const readString = read('string')\n","import { BOLD, FOREGROUND, HIGHLIGHT, ITALIC, NORMAL } from 'auto-console-group'\n\nimport {\n AUTO_RESIZE,\n BASE,\n BEFORE_UNLOAD,\n CLOSE,\n ENABLE,\n HEIGHT,\n HEIGHT_EDGE,\n IGNORE_ATTR,\n IGNORE_DISABLE_RESIZE,\n IGNORE_TAGS,\n IN_PAGE_LINK,\n INIT,\n MANUAL_RESIZE_REQUEST,\n MESSAGE,\n MESSAGE_ID,\n MESSAGE_ID_LENGTH,\n MIN_SIZE,\n MOUSE_ENTER,\n MOUSE_LEAVE,\n MUTATION_OBSERVER,\n NO_CHANGE,\n NONE,\n OVERFLOW_ATTR,\n OVERFLOW_OBSERVER,\n PAGE_INFO,\n PAGE_INFO_STOP,\n PARENT_INFO,\n PARENT_INFO_STOP,\n PARENT_RESIZE_REQUEST,\n READY_STATE_CHANGE,\n RESIZE_OBSERVER,\n SCROLL,\n SCROLL_BY,\n SCROLL_TO,\n SCROLL_TO_OFFSET,\n SET_OFFSET_SIZE,\n SIZE_ATTR,\n SIZE_CHANGE_DETECTED,\n TITLE,\n VERSION,\n VISIBILITY_OBSERVER,\n WIDTH,\n WIDTH_EDGE,\n} from '../common/consts'\nimport { addEventListener, removeEventListener } from '../common/listeners'\nimport setMode, { getKey, getModeData, getModeLabel } from '../common/mode'\nimport {\n capitalizeFirstLetter,\n getElementName,\n id,\n isDef,\n // isElement,\n isolateUserCode,\n once,\n round,\n typeAssert,\n} from '../common/utils'\nimport checkBlockingCSS from './check-blocking-css'\nimport {\n advise,\n adviser,\n assert,\n debug,\n deprecateMethod,\n deprecateMethodReplace,\n deprecateOption,\n endAutoGroup,\n error,\n errorBoundary,\n event as consoleEvent,\n info,\n label,\n log,\n purge,\n setConsoleOptions,\n vInfo,\n warn,\n} from './console'\nimport { getBoolean, getNumber } from './from-string'\nimport createMutationObserver from './observers/mutation'\nimport createOverflowObserver from './observers/overflow'\nimport createPerformanceObserver, {\n PREF_END,\n PREF_START,\n} from './observers/perf'\nimport createResizeObserver from './observers/resize'\nimport createVisibilityObserver from './observers/visibility'\nimport { readFunction, readNumber, readString } from './read'\n\nfunction iframeResizerChild() {\n const customCalcMethods = {\n height: () => {\n warn('Custom height calculation function not defined')\n return getHeight.auto()\n },\n width: () => {\n warn('Custom width calculation function not defined')\n return getWidth.auto()\n },\n }\n const deprecatedResizeMethods = {\n bodyOffset: 1,\n bodyScroll: 1,\n offset: 1,\n documentElementOffset: 1,\n documentElementScroll: 1,\n boundingClientRect: 1,\n max: 1,\n min: 1,\n grow: 1,\n lowestElement: 1,\n }\n const eventCancelTimer = 128\n const eventHandlersByName = {}\n const heightCalcModeDefault = 'auto'\n // const isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent)\n const tearDown = []\n const widthCalcModeDefault = SCROLL\n\n let autoResize = true\n let bodyBackground = ''\n let bodyMargin = 0\n let bodyMarginStr = ''\n let bodyPadding = ''\n let bothDirections = false\n let calculateHeight = true\n let calculateWidth = false\n let firstRun = true\n let hasIgnored = false\n let hasOverflow = false\n let hasOverflowUpdated = true\n let hasTags = false\n let height = 1\n let heightCalcMode = heightCalcModeDefault // only applies if not provided by host page (V1 compatibility)\n let ignoreSelector = ''\n let initLock = true\n let inPageLinks = {}\n let isHidden = false\n let logExpand = false\n let logging = false\n let key\n let key2\n let mode = 0\n let mouseEvents = false\n let offsetHeight = 0\n let offsetWidth = 0\n let origin\n let overflowedNodeSet = new Set()\n let overflowObserver\n let parentId = ''\n let resizeFrom = 'child'\n let resizeObserver\n let sameOrigin = false\n let sizeSelector = ''\n let taggedElements = []\n let target = window.parent\n let targetOriginDefault = '*'\n let timerActive\n let totalTime\n let tolerance = 0\n let triggerLocked = false\n let version\n let width = 1\n let widthCalcMode = widthCalcModeDefault\n let win = window\n\n let onBeforeResize\n let onMessage = () => {\n warn('onMessage function not defined')\n }\n let onReady = () => {}\n let onPageInfo = null\n let onParentInfo = null\n\n function isolate(funcs) {\n funcs.forEach((func) => {\n try {\n func()\n } catch (error_) {\n if (mode < 0) throw error_\n advise(\n `<rb>Error in setup function</>\\n<i>iframe-resizer</> detected an error during setup.\\n\\nPlease report the following error message at <u>https://github.com/davidjbradshaw/iframe-resizer/issues</>`,\n )\n error(error_)\n }\n })\n }\n\n function init(data) {\n readDataFromParent(data)\n\n setConsoleOptions({ id: parentId, enabled: logging, expand: logExpand })\n log(`Initialising iframe v${VERSION} ${window.location.href}`)\n readDataFromPage()\n\n const setup = [\n checkVersion,\n checkBoth,\n checkMode,\n checkIgnoredElements,\n checkCrossDomain,\n checkHeightMode,\n checkWidthMode,\n checkDeprecatedAttrs,\n checkQuirksMode,\n checkAndSetupTags,\n bothDirections ? id : checkBlockingCSS,\n\n applySelectors,\n setupPublicMethods,\n setupMouseEvents,\n setupInPageLinks,\n setMargin,\n () => setBodyStyle('background', bodyBackground),\n () => setBodyStyle('padding', bodyPadding),\n\n bothDirections ? id : stopInfiniteResizingOfIframe,\n injectClearFixIntoBodyElement,\n\n initEventListeners,\n attachObservers,\n beforeUnload,\n ]\n\n isolate(setup)\n\n checkReadyYet(once(onReady))\n log('Initialization complete')\n\n sendSize(\n INIT,\n 'Init message from host page',\n undefined,\n undefined,\n `${VERSION}:${mode}`,\n )\n\n sendTitle()\n }\n\n function beforeUnload() {\n addEventListener(window, BEFORE_UNLOAD.toLowerCase(), () => {\n tearDown.forEach((func) => func())\n sendMessage(0, 0, BEFORE_UNLOAD)\n })\n }\n\n function checkReadyYet(readyCallback) {\n if (document.readyState === 'complete') isolateUserCode(readyCallback)\n else\n addEventListener(document, READY_STATE_CHANGE, () =>\n checkReadyYet(readyCallback),\n )\n }\n\n function checkAndSetupTags() {\n taggedElements = document.querySelectorAll(`[${SIZE_ATTR}]`)\n hasTags = taggedElements.length > 0\n log(`Tagged elements found: %c${hasTags}`, HIGHLIGHT)\n }\n\n function sendTitle() {\n if (document.title && document.title !== '') {\n sendMessage(0, 0, TITLE, document.title)\n }\n }\n\n function warnIgnored(ignoredElements) {\n const s = ignoredElements.length === 1 ? '' : 's'\n\n warn(\n `%c[${IGNORE_ATTR}]%c found on %c${ignoredElements.length}%c element${s}`,\n BOLD,\n NORMAL,\n BOLD,\n NORMAL,\n )\n }\n\n let ignoredElementsCount = 0\n function checkIgnoredElements() {\n const ignoredElements = document.querySelectorAll(`*[${IGNORE_ATTR}]`)\n hasIgnored = ignoredElements.length > 0\n if (hasIgnored && ignoredElements.length !== ignoredElementsCount) {\n warnIgnored(ignoredElements)\n ignoredElementsCount = ignoredElements.length\n }\n return hasIgnored\n }\n\n function checkQuirksMode() {\n if (document.compatMode !== 'BackCompat') return\n\n advise(\n `<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`,\n )\n }\n\n function checkVersion() {\n if (!version || version === '' || version === 'false') {\n advise(\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`,\n )\n return\n }\n\n if (version !== VERSION) {\n advise(\n `<b>Version mismatch</>\n\nThe parent and child pages are running different versions of <i>iframe resizer</>.\n\nParent page: ${version} - Child page: ${VERSION}.\n`,\n )\n }\n }\n\n function checkCrossDomain() {\n try {\n sameOrigin = mode === 1 || 'iframeParentListener' in window.parent\n } catch (error) {\n log('Cross domain iframe detected')\n }\n }\n\n // eslint-disable-next-line sonarjs/cognitive-complexity\n function readDataFromParent(data) {\n parentId = data[0] ?? parentId\n bodyMargin = getNumber(data[1]) ?? bodyMargin // For V1 compatibility\n calculateWidth = getBoolean(data[2]) ?? calculateWidth\n logging = getBoolean(data[3]) ?? logging\n // data[4] no longer used (was intervalTimer)\n autoResize = getBoolean(data[6]) ?? autoResize\n bodyMarginStr = data[7] ?? bodyMarginStr\n heightCalcMode = data[8] ?? heightCalcMode\n bodyBackground = data[9] ?? bodyBackground\n bodyPadding = data[10] ?? bodyPadding\n tolerance = getNumber(data[11]) ?? tolerance\n inPageLinks.enable = getBoolean(data[12]) ?? false\n resizeFrom = data[13] ?? resizeFrom\n widthCalcMode = data[14] ?? widthCalcMode\n mouseEvents = getBoolean(data[15]) ?? mouseEvents\n offsetHeight = getNumber(data[16]) ?? offsetHeight\n offsetWidth = getNumber(data[17]) ?? offsetWidth\n calculateHeight = getBoolean(data[18]) ?? calculateHeight\n key = data[19] ?? key\n version = data[20] ?? version\n mode = getNumber(data[21]) ?? mode\n // sizeSelector = data[22] || sizeSelector\n logExpand = getBoolean(data[23]) ?? logExpand\n }\n\n function readDataFromPage() {\n // eslint-disable-next-line sonarjs/cognitive-complexity\n function readData(data) {\n log(`Reading data from page:`, Object.keys(data))\n\n onBeforeResize = readFunction(data, 'onBeforeResize') ?? onBeforeResize\n onMessage = readFunction(data, 'onMessage') ?? onMessage\n onReady = readFunction(data, 'onReady') ?? onReady\n\n if (typeof data?.offset === 'number') {\n deprecateOption('offset', 'offsetSize')\n if (calculateHeight)\n offsetHeight = readNumber(data, 'offset') ?? offsetHeight\n if (calculateWidth)\n offsetWidth = readNumber(data, 'offset') ?? offsetWidth\n }\n\n if (typeof data?.offsetSize === 'number') {\n if (calculateHeight)\n offsetHeight = readNumber(data, 'offsetSize') ?? offsetHeight\n if (calculateWidth)\n offsetWidth = readNumber(data, 'offsetSize') ?? offsetWidth\n }\n\n key2 = readString(data, getKey(0)) ?? key2\n ignoreSelector = readString(data, 'ignoreSelector') ?? ignoreSelector\n sizeSelector = readString(data, 'sizeSelector') ?? sizeSelector\n targetOriginDefault =\n readString(data, 'targetOrigin') ?? targetOriginDefault\n\n // String or Function\n heightCalcMode = data?.heightCalculationMethod || heightCalcMode\n widthCalcMode = data?.widthCalculationMethod || widthCalcMode\n }\n\n function setupCustomCalcMethods(calcMode, calcFunc) {\n if (typeof calcMode === 'function') {\n advise(\n `<rb>Deprecated Option(${calcFunc}CalculationMethod)</>\n\nThe use of <b>${calcFunc}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.`,\n )\n customCalcMethods[calcFunc] = calcMode\n calcMode = 'custom'\n }\n\n return calcMode\n }\n\n if (mode === 1) return\n\n const data = window.iframeResizer || window.iFrameResizer\n\n if (typeof data !== 'object') return\n\n readData(data)\n heightCalcMode = setupCustomCalcMethods(heightCalcMode, HEIGHT)\n widthCalcMode = setupCustomCalcMethods(widthCalcMode, WIDTH)\n\n info(`Set targetOrigin for parent: %c${targetOriginDefault}`, HIGHLIGHT)\n }\n\n function checkBoth() {\n if (calculateWidth === calculateHeight) {\n bothDirections = true\n }\n }\n\n function chkCSS(attr, value) {\n if (value.includes('-')) {\n warn(`Negative CSS value ignored for ${attr}`)\n value = ''\n }\n\n return value\n }\n\n function setBodyStyle(attr, value) {\n if (undefined === value || value === '' || value === 'null') return\n\n document.body.style.setProperty(attr, value)\n info(`Set body ${attr}: %c${value}`, HIGHLIGHT)\n }\n\n function applySelector(name, attribute, selector) {\n if (selector === '') return\n\n log(`${name}: %c${selector}`, HIGHLIGHT)\n\n for (const el of document.querySelectorAll(selector)) {\n log(`Applying ${attribute} to:`, el)\n el.toggleAttribute(attribute, true)\n }\n }\n\n function applySelectors() {\n applySelector('sizeSelector', SIZE_ATTR, sizeSelector)\n applySelector('ignoreSelector', IGNORE_ATTR, ignoreSelector)\n }\n\n function setMargin() {\n // If called via V1 script, convert bodyMargin from int to str\n if (undefined === bodyMarginStr) {\n bodyMarginStr = `${bodyMargin}px`\n }\n\n setBodyStyle('margin', chkCSS('margin', bodyMarginStr))\n }\n\n function stopInfiniteResizingOfIframe() {\n const setAutoHeight = (el) =>\n el.style.setProperty(HEIGHT, 'auto', 'important')\n\n setAutoHeight(document.documentElement)\n setAutoHeight(document.body)\n\n log('Set HTML & body height: %cauto !important', HIGHLIGHT)\n }\n\n function manageTriggerEvent(options) {\n const listener = {\n add(eventName) {\n function handleEvent() {\n sendSize(options.eventName, options.eventType)\n }\n\n eventHandlersByName[eventName] = handleEvent\n\n addEventListener(window, eventName, handleEvent, { passive: true })\n },\n remove(eventName) {\n const handleEvent = eventHandlersByName[eventName]\n delete eventHandlersByName[eventName]\n\n removeEventListener(window, eventName, handleEvent)\n },\n }\n\n listener[options.method](options.eventName)\n\n log(\n `${capitalizeFirstLetter(options.method)} event listener: %c${\n options.eventType\n }`,\n HIGHLIGHT,\n )\n }\n\n function manageEventListeners(method) {\n manageTriggerEvent({\n method,\n eventType: 'After Print',\n eventName: 'afterprint',\n })\n\n manageTriggerEvent({\n method,\n eventType: 'Before Print',\n eventName: 'beforeprint',\n })\n\n manageTriggerEvent({\n method,\n eventType: 'Ready State Change',\n eventName: READY_STATE_CHANGE,\n })\n }\n\n function checkDeprecatedAttrs() {\n let found = false\n\n const checkAttrs = (attr) =>\n document.querySelectorAll(`[${attr}]`).forEach((el) => {\n found = true\n el.removeAttribute(attr)\n el.toggleAttribute(SIZE_ATTR, true)\n })\n\n checkAttrs('data-iframe-height')\n checkAttrs('data-iframe-width')\n\n if (found) {\n advise(\n `<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</>.`,\n )\n }\n }\n\n function checkCalcMode(calcMode, calcModeDefault, modes) {\n const { label } = modes\n\n if (calcModeDefault !== calcMode) {\n if (!(calcMode in modes)) {\n warn(`${calcMode} is not a valid option for ${label}CalculationMethod.`)\n calcMode = calcModeDefault\n }\n\n if (calcMode in deprecatedResizeMethods) {\n const actionMsg = version\n ? 'remove this option.'\n : `set this option to <b>'auto'</> when using an older version of <i>iframe-resizer</> on the parent page. This can be done on the child page by adding the following code:\n \nwindow.iframeResizer = {\n license: 'xxxx',\n ${label}CalculationMethod: 'auto',\n}\n`\n\n advise(\n `<rb>Deprecated ${label}CalculationMethod (${calcMode})</>\n\nThis version of <i>iframe-resizer</> can auto detect the most suitable ${label} calculation method. It is recommended that you ${actionMsg}\n`,\n )\n }\n }\n\n log(`Set ${label} calculation method: %c${calcMode}`, HIGHLIGHT)\n return calcMode\n }\n\n function checkHeightMode() {\n heightCalcMode = checkCalcMode(\n heightCalcMode,\n heightCalcModeDefault,\n getHeight,\n )\n }\n\n function checkWidthMode() {\n widthCalcMode = checkCalcMode(widthCalcMode, widthCalcModeDefault, getWidth)\n }\n\n function checkMode() {\n const oMode = mode\n const pMode = setMode({ key })\n const cMode = setMode({ key: key2 })\n mode = Math.max(pMode, cMode)\n if (mode < 0) {\n mode = Math.min(pMode, cMode)\n purge()\n advise(`${getModeData(mode + 2)}${getModeData(2)}`)\n if (isDef(version))\n throw getModeData(mode + 2).replace(/<\\/?[a-z][^>]*>|<\\/>/gi, '')\n } else if (!isDef(version) || (oMode > -1 && mode > oMode)) {\n if (sessionStorage.getItem('ifr') !== VERSION)\n vInfo(`v${VERSION} (${getModeLabel(mode)})`, mode)\n if (mode < 2) adviser(getModeData(3))\n sessionStorage.setItem('ifr', VERSION)\n }\n }\n\n function initEventListeners() {\n if (autoResize !== true) {\n log('Auto Resize disabled')\n }\n\n manageEventListeners('add')\n tearDown.push(() => manageEventListeners('remove'))\n }\n\n function injectClearFixIntoBodyElement() {\n const clearFix = document.createElement('div')\n\n clearFix.style.clear = 'both'\n // Guard against the following having been globally redefined in CSS.\n clearFix.style.display = 'block'\n clearFix.style.height = '0'\n\n document.body.append(clearFix)\n }\n\n function setupInPageLinks() {\n const getPagePosition = () => ({\n x: document.documentElement.scrollLeft,\n y: document.documentElement.scrollTop,\n })\n\n function getElementPosition(el) {\n const elPosition = el.getBoundingClientRect()\n const pagePosition = getPagePosition()\n\n return {\n x: parseInt(elPosition.left, BASE) + parseInt(pagePosition.x, BASE),\n y: parseInt(elPosition.top, BASE) + parseInt(pagePosition.y, BASE),\n }\n }\n\n function findTarget(location) {\n function jumpToTarget(target) {\n const jumpPosition = getElementPosition(target)\n\n log(\n `Moving to in page link (%c#${hash}%c) at x: %c${jumpPosition.x}%c y: %c${jumpPosition.y}`,\n HIGHLIGHT,\n FOREGROUND,\n HIGHLIGHT,\n FOREGROUND,\n HIGHLIGHT,\n )\n\n sendMessage(jumpPosition.y, jumpPosition.x, SCROLL_TO_OFFSET) // X&Y reversed at sendMessage uses height/width\n }\n\n const hash = location.split('#')[1] || location // Remove # if present\n const hashData = decodeURIComponent(hash)\n const target =\n document.getElementById(hashData) ||\n document.getElementsByName(hashData)[0]\n\n if (target !== undefined) {\n jumpToTarget(target)\n return\n }\n\n log(`In page link (#${hash}) not found in iframe, so sending to parent`)\n sendMessage(0, 0, IN_PAGE_LINK, `#${hash}`)\n }\n\n function checkLocationHash() {\n const { hash, href } = window.location\n\n if (hash !== '' && hash !== '#') {\n findTarget(href)\n }\n }\n\n function bindAnchors() {\n for (const link of document.querySelectorAll('a[href^=\"#\"]')) {\n if (link.getAttribute('href') !== '#') {\n addEventListener(link, 'click', (e) => {\n e.preventDefault()\n findTarget(link.getAttribute('href'))\n })\n }\n }\n }\n\n function bindLocationHash() {\n addEventListener(window, 'hashchange', checkLocationHash)\n }\n\n function initCheck() {\n // Check if page loaded with location hash after init resize\n setTimeout(checkLocationHash, eventCancelTimer)\n }\n\n function enableInPageLinks() {\n log('Setting up location.hash handlers')\n bindAnchors()\n bindLocationHash()\n initCheck()\n }\n\n if (inPageLinks.enable) {\n if (mode === 1) {\n advise(\n `In page linking requires a Professional or Business license. Please see <u>https://iframe-resizer.com/pricing</> for more details.`,\n )\n } else {\n enableInPageLinks()\n }\n } else {\n log('In page linking not enabled')\n }\n\n inPageLinks = {\n findTarget,\n }\n }\n\n function setupMouseEvents() {\n if (mouseEvents !== true) return\n\n function sendMouse(e) {\n sendMessage(0, 0, e.type, `${e.screenY}:${e.screenX}`)\n }\n\n function addMouseListener(evt, name) {\n log(`Add event listener: %c${name}`, HIGHLIGHT)\n addEventListener(window.document, evt, sendMouse)\n }\n\n addMouseListener(MOUSE_ENTER, 'Mouse Enter')\n addMouseListener(MOUSE_LEAVE, 'Mouse Leave')\n }\n\n function setupPublicMethods() {\n if (mode === 1) return\n\n win.parentIframe = Object.freeze({\n autoResize: (enable) => {\n typeAssert(enable, 'boolean', 'parentIframe.autoResize(enable) enable')\n\n // if (calculateWidth === calculateHeight) {\n if (calculateWidth === false && calculateHeight === false) {\n consoleEvent(ENABLE)\n advise(\n `Auto Resize can not be changed when <b>direction</> is set to '${NONE}'.`, // or '${BOTH}'\n )\n return false\n }\n\n if (enable === true && autoResize === false) {\n autoResize = true\n queueMicrotask(() => sendSize(ENABLE, 'Auto Resize enabled'))\n } else if (enable === false && autoResize === true) {\n autoResize = false\n }\n\n sendMessage(0, 0, AUTO_RESIZE, JSON.stringify(autoResize))\n\n return autoResize\n },\n\n close() {\n sendMessage(0, 0, CLOSE)\n },\n\n getId: () => parentId,\n\n getOrigin: () => {\n consoleEvent('getOrigin')\n deprecateMethod('getOrigin()', 'getParentOrigin()')\n return origin\n },\n\n getParentOrigin: () => origin,\n\n getPageInfo(callback) {\n if (typeof callback === 'function') {\n onPageInfo = callback\n sendMessage(0, 0, PAGE_INFO)\n deprecateMethodReplace(\n 'getPageInfo()',\n 'getParentProps()',\n 'See <u>https://iframe-resizer.com/upgrade</> for details. ',\n )\n return\n }\n\n onPageInfo = null\n sendMessage(0, 0, PAGE_INFO_STOP)\n },\n\n getParentProps(callback) {\n typeAssert(\n callback,\n 'function',\n 'parentIframe.getParentProps(callback) callback',\n )\n\n onParentInfo = callback\n sendMessage(0, 0, PARENT_INFO)\n\n return () => {\n onParentInfo = null\n sendMessage(0, 0, PARENT_INFO_STOP)\n }\n },\n\n getParentProperties(callback) {\n deprecateMethod('getParentProperties()', 'getParentProps()')\n this.getParentProps(callback)\n },\n\n moveToAnchor(anchor) {\n typeAssert(anchor, 'string', 'parentIframe.moveToAnchor(anchor) anchor')\n inPageLinks.findTarget(anchor)\n },\n\n reset() {\n resetIframe('parentIframe.reset')\n },\n\n setOffsetSize(newOffset) {\n typeAssert(\n newOffset,\n 'number',\n 'parentIframe.setOffsetSize(offset) offset',\n )\n offsetHeight = newOffset\n offsetWidth = newOffset\n sendSize(SET_OFFSET_SIZE, `parentIframe.setOffsetSize(${newOffset})`)\n },\n\n scrollBy(x, y) {\n typeAssert(x, 'number', 'parentIframe.scrollBy(x, y) x')\n typeAssert(y, 'number', 'parentIframe.scrollBy(x, y) y')\n sendMessage(y, x, SCROLL_BY) // X&Y reversed at sendMessage uses height/width\n },\n\n scrollTo(x, y) {\n typeAssert(x, 'number', 'parentIframe.scrollTo(x, y) x')\n typeAssert(y, 'number', 'parentIframe.scrollTo(x, y) y')\n sendMessage(y, x, SCROLL_TO) // X&Y reversed at sendMessage uses height/width\n },\n\n scrollToOffset(x, y) {\n typeAssert(x, 'number', 'parentIframe.scrollToOffset(x, y) x')\n typeAssert(y, 'number', 'parentIframe.scrollToOffset(x, y) y')\n sendMessage(y, x, SCROLL_TO_OFFSET) // X&Y reversed at sendMessage uses height/width\n },\n\n sendMessage(msg, targetOrigin) {\n if (targetOrigin)\n typeAssert(\n targetOrigin,\n 'string',\n 'parentIframe.sendMessage(msg, targetOrigin) targetOrigin',\n )\n sendMessage(0, 0, MESSAGE, JSON.stringify(msg), targetOrigin)\n },\n\n setHeightCalculationMethod(heightCalculationMethod) {\n heightCalcMode = heightCalculationMethod\n checkHeightMode()\n },\n\n setWidthCalculationMethod(widthCalculationMethod) {\n widthCalcMode = widthCalculationMethod\n checkWidthMode()\n },\n\n setTargetOrigin(targetOrigin) {\n typeAssert(\n targetOrigin,\n 'string',\n 'parentIframe.setTargetOrigin(targetOrigin) targetOrigin',\n )\n\n log(`Set targetOrigin: %c${targetOrigin}`, HIGHLIGHT)\n targetOriginDefault = targetOrigin\n },\n\n resize(customHeight, customWidth) {\n if (customHeight !== undefined)\n typeAssert(\n customHeight,\n 'number',\n 'parentIframe.resize(customHeight, customWidth) customHeight',\n )\n\n if (customWidth !== undefined)\n typeAssert(\n customWidth,\n 'number',\n 'parentIframe.resize(customHeight, customWidth) customWidth',\n )\n\n const valString = `${customHeight || ''}${customWidth ? `,${customWidth}` : ''}`\n\n sendSize(\n MANUAL_RESIZE_REQUEST,\n `parentIframe.resize(${valString})`,\n customHeight,\n customWidth,\n )\n },\n\n size(customHeight, customWidth) {\n deprecateMethod('size()', 'resize()')\n this.resize(customHeight, customWidth)\n },\n })\n\n win.parentIFrame = win.parentIframe\n }\n\n function filterIgnoredElements(nodeList) {\n const filteredNodeSet = new Set()\n const ignoredNodeSet = new Set()\n\n for (const node of nodeList) {\n if (node.closest(`[${IGNORE_ATTR}]`)) {\n ignoredNodeSet.add(node)\n } else {\n filteredNodeSet.add(node)\n }\n }\n\n if (ignoredNodeSet.size > 0) {\n queueMicrotask(() => {\n consoleEvent('overflowIgnored')\n info(\n `Ignoring elements with [data-iframe-ignore] > *:\\n`,\n ignoredNodeSet,\n )\n endAutoGroup()\n })\n }\n\n return filteredNodeSet\n }\n\n let prevOverflowedNodeSet = new Set()\n function checkOverflow() {\n const allOverflowedNodes = document.querySelectorAll(`[${OVERFLOW_ATTR}]`)\n\n overflowedNodeSet = filterIgnoredElements(allOverflowedNodes)\n\n hasOverflow = overflowedNodeSet.size > 0\n\n // Not supported in Safari 16 (or esLint!!!)\n // eslint-disable-next-line no-use-extend-native/no-use-extend-native\n if (typeof Set.prototype.symmetricDifference === 'function')\n hasOverflowUpdated =\n overflowedNodeSet.symmetricDifference(prevOverflowedNodeSet).size > 0\n\n prevOverflowedNodeSet = overflowedNodeSet\n }\n\n function overflowObserved() {\n checkOverflow()\n\n switch (true) {\n case !hasOverflowUpdated:\n return\n\n case overflowedNodeSet.size > 1:\n info('Overflowed Elements:', overflowedNodeSet)\n break\n\n case hasOverflow:\n break\n\n default:\n info('No overflow detected')\n }\n\n sendSize(OVERFLOW_OBSERVER, 'Overflow updated')\n }\n\n function createOverflowObservers(nodeList) {\n const overflowObserverOptions = {\n root: document.documentElement,\n side: calculateHeight ? HEIGHT_EDGE : WIDTH_EDGE,\n }\n\n overflowObserver = createOverflowObserver(\n overflowObserved,\n overflowObserverOptions,\n )\n\n overflowObserver.attachObservers(nodeList)\n\n return overflowObserver\n }\n\n function resizeObserved(entries) {\n if (!Array.isArray(entries) || entries.length === 0) return\n const el = entries[0].target\n sendSize(RESIZE_OBSERVER, `Element resized <${getElementName(el)}>`)\n }\n\n function createResizeObservers(nodeList) {\n resizeObserver = createResizeObserver(resizeObserved)\n resizeObserver.attachObserverToNonStaticElements(nodeList)\n return resizeObserver\n }\n\n function visibilityChange(isVisible) {\n log(`Visible: %c${isVisible}`, HIGHLIGHT)\n isHidden = !isVisible\n sendSize(VISIBILITY_OBSERVER, 'Visibility changed')\n }\n\n const getCombinedElementLists = (nodeList) => {\n const elements = new Set()\n\n for (const node of nodeList) {\n elements.add(node)\n for (const element of getAllElements(node)) elements.add(element)\n }\n\n info(`Inspecting:\\n`, elements)\n return elements\n }\n\n const addObservers = (nodeList) => {\n if (nodeList.size === 0) return\n\n consoleEvent('addObservers')\n\n const elements = getCombinedElementLists(nodeList)\n\n overflowObserver.attachObservers(elements)\n resizeObserver.attachObserverToNonStaticElements(elements)\n\n endAutoGroup()\n }\n\n const removeObservers = (nodeList) => {\n if (nodeList.size === 0) return\n\n consoleEvent('removeObservers')\n\n const elements = getCombinedElementLists(nodeList)\n\n overflowObserver.detachObservers(elements)\n resizeObserver.detachObservers(elements)\n\n endAutoGroup()\n }\n\n function contentMutated({ addedNodes, removedNodes }) {\n consoleEvent('contentMutated')\n applySelectors()\n checkAndSetupTags()\n checkOverflow()\n endAutoGroup()\n\n removeObservers(removedNodes)\n addObservers(addedNodes)\n }\n\n function mutationObserved(mutations) {\n contentMutated(mutations)\n sendSize(MUTATION_OBSERVER, 'Mutation Observed')\n }\n\n function pushDisconnectsOnToTearDown(observers) {\n tearDown.push(...observers.map((observer) => observer.disconnect))\n }\n\n function attachObservers() {\n const nodeList = getAllElements(document.documentElement)\n\n log('Attaching Observers')\n const observers = [\n createMutationObserver(mutationObserved),\n createOverflowObservers(nodeList),\n createPerformanceObserver(),\n createResizeObservers(nodeList),\n createVisibilityObserver(visibilityChange),\n ]\n\n pushDisconnectsOnToTearDown(observers)\n }\n\n function getMaxElement(side) {\n performance.mark(PREF_START)\n\n const Side = capitalizeFirstLetter(side)\n\n let elVal = MIN_SIZE\n let maxEl = document.documentElement\n let maxVal = hasTags\n ? 0\n : document.documentElement.getBoundingClientRect().bottom\n\n const targetElements = hasTags\n ? taggedElements\n : hasOverflow\n ? Array.from(overflowedNodeSet)\n : getAllElements(document.documentElement) // Width resizing may need to check all elements\n\n for (const element of targetElements) {\n elVal =\n element.getBoundingClientRect()[side] +\n parseFloat(getComputedStyle(element).getPropertyValue(`margin-${side}`))\n\n if (elVal > maxVal) {\n maxVal = elVal\n maxEl = element\n }\n }\n\n info(`${Side} position calculated from:`, maxEl)\n info(`Checked %c${targetElements.length}%c elements`, HIGHLIGHT, FOREGROUND)\n\n performance.mark(PREF_END, {\n detail: {\n hasTags,\n len: targetElements.length,\n logging,\n Side,\n },\n })\n\n return maxVal\n }\n\n const getAllMeasurements = (dimension) => [\n dimension.bodyOffset(),\n dimension.bodyScroll(),\n dimension.documentElementOffset(),\n dimension.documentElementScroll(),\n dimension.boundingClientRect(),\n ]\n\n const addNot = (tagName) => `:not(${tagName})`\n const selector = `* ${Array.from(IGNORE_TAGS).map(addNot).join('')}`\n const getAllElements = (node) => node.querySelectorAll(selector)\n\n function getOffsetSize(getDimension) {\n const offset = getDimension.getOffset()\n\n if (offset !== 0) {\n info(`Page offsetSize: %c${offset}px`, HIGHLIGHT)\n }\n\n return offset\n }\n\n const prevScrollSize = {\n height: 0,\n width: 0,\n }\n\n const prevBoundingSize = {\n height: 0,\n width: 0,\n }\n\n const getAdjustedScroll = (getDimension) =>\n getDimension.documentElementScroll() + Math.max(0, getDimension.getOffset())\n\n const BOUNDING_FORMAT = [HIGHLIGHT, FOREGROUND, HIGHLIGHT]\n\n function getAutoSize(getDimension) {\n function returnBoundingClientRect() {\n prevBoundingSize[dimension] = boundingSize\n prevScrollSize[dimension] = scrollSize\n return Math.max(boundingSize, MIN_SIZE)\n }\n\n const isHeight = getDimension === getHeight\n const dimension = getDimension.label\n const boundingSize = getDimension.boundingClientRect()\n const ceilBoundingSize = Math.ceil(boundingSize)\n const floorBoundingSize = Math.floor(boundingSize)\n const scrollSize = getAdjustedScroll(getDimension)\n const sizes = `HTML: %c${boundingSize}px %cPage: %c${scrollSize}px`\n\n let calculatedSize = MIN_SIZE\n\n switch (true) {\n case !getDimension.enabled():\n return Math.max(scrollSize, MIN_SIZE)\n\n case hasTags:\n info(`Found element with data-iframe-size attribute`)\n calculatedSize = getDimension.taggedElement()\n break\n\n case !hasOverflow &&\n firstRun &&\n prevBoundingSize[dimension] === 0 &&\n prevScrollSize[dimension] === 0:\n info(`Initial page size values: ${sizes}`, ...BOUNDING_FORMAT)\n calculatedSize = returnBoundingClientRect()\n break\n\n case triggerLocked &&\n boundingSize === prevBoundingSize[dimension] &&\n scrollSize === prevScrollSize[dimension]:\n info(`Size unchanged: ${sizes}`, ...BOUNDING_FORMAT)\n calculatedSize = Math.max(boundingSize, scrollSize)\n break\n\n case boundingSize === 0 && scrollSize !== 0:\n info(`Page is hidden: ${sizes}`, ...BOUNDING_FORMAT)\n calculatedSize = scrollSize\n break\n\n case !hasOverflow &&\n boundingSize !== prevBoundingSize[dimension] &&\n scrollSize <= prevScrollSize[dimension]:\n info(`New <html> size: ${sizes} `, ...BOUNDING_FORMAT)\n info(\n `Previous <html> size: %c${prevBoundingSize[dimension]}px`,\n HIGHLIGHT,\n )\n calculatedSize = returnBoundingClientRect()\n break\n\n case !isHeight:\n calculatedSize = getDimension.taggedElement()\n break\n\n case !hasOverflow && boundingSize < prevBoundingSize[dimension]:\n info(`<html> size decreased: ${sizes}`, ...BOUNDING_FORMAT)\n calculatedSize = returnBoundingClientRect()\n break\n\n case scrollSize === floorBoundingSize || scrollSize === ceilBoundingSize:\n info(`<html> size equals page size: ${sizes}`, ...BOUNDING_FORMAT)\n calculatedSize = returnBoundingClientRect()\n break\n\n case boundingSize > scrollSize:\n info(`Page size < <html> size: ${sizes}`, ...BOUNDING_FORMAT)\n calculatedSize = returnBoundingClientRect()\n break\n\n case hasOverflow:\n info(`Found elements possibly overflowing <html> `)\n calculatedSize = getDimension.taggedElement()\n break\n\n default:\n info(`Using <html> size: ${sizes}`, ...BOUNDING_FORMAT)\n calculatedSize = returnBoundingClientRect()\n }\n\n info(`Content ${dimension}: %c${calculatedSize}px`, HIGHLIGHT)\n\n calculatedSize += getOffsetSize(getDimension)\n\n return Math.max(calculatedSize, MIN_SIZE)\n }\n\n const getBodyOffset = () => {\n const { body } = document\n const style = getComputedStyle(body)\n\n return (\n body.offsetHeight +\n parseInt(style.marginTop, BASE) +\n parseInt(style.marginBottom, BASE)\n )\n }\n\n const getHeight = {\n label: HEIGHT,\n enabled: () => calculateHeight,\n getOffset: () => offsetHeight,\n auto: () => getAutoSize(getHeight),\n bodyOffset: getBodyOffset,\n bodyScroll: () => document.body.scrollHeight,\n offset: () => getHeight.bodyOffset(), // Backwards compatibility\n custom: () => customCalcMethods.height(),\n documentElementOffset: () => document.documentElement.offsetHeight,\n documentElementScroll: () => document.documentElement.scrollHeight,\n boundingClientRect: () =>\n Math.max(\n document.documentElement.getBoundingClientRect().bottom,\n document.body.getBoundingClientRect().bottom,\n ),\n max: () => Math.max(...getAllMeasurements(getHeight)),\n min: () => Math.min(...getAllMeasurements(getHeight)),\n grow: () => getHeight.max(),\n lowestElement: () => getMaxElement(HEIGHT_EDGE),\n taggedElement: () => getMaxElement(HEIGHT_EDGE),\n }\n\n const getWidth = {\n label: WIDTH,\n enabled: () => calculateWidth,\n getOffset: () => offsetWidth,\n auto: () => getAutoSize(getWidth),\n bodyScroll: () => document.body.scrollWidth,\n bodyOffset: () => document.body.offsetWidth,\n custom: () => customCalcMethods.width(),\n documentElementScroll: () => document.documentElement.scrollWidth,\n documentElementOffset: () => document.documentElement.offsetWidth,\n boundingClientRect: () =>\n Math.max(\n document.documentElement.getBoundingClientRect().right,\n document.body.getBoundingClientRect().right,\n ),\n max: () => Math.max(...getAllMeasurements(getWidth)),\n min: () => Math.min(...getAllMeasurements(getWidth)),\n rightMostElement: () => getMaxElement(WIDTH_EDGE),\n scroll: () =>\n Math.max(getWidth.bodyScroll(), getWidth.documentElementScroll()),\n taggedElement: () => getMaxElement(WIDTH_EDGE),\n }\n\n const checkTolerance = (a, b) => !(Math.abs(a - b) <= tolerance)\n\n function callOnBeforeResize(newSize) {\n const returnedSize = onBeforeResize(newSize)\n\n if (returnedSize === undefined) {\n throw new TypeError(\n 'No value returned from onBeforeResize(), expected a numeric value',\n )\n }\n\n if (Number.isNaN(returnedSize))\n throw new TypeError(\n `Invalid value returned from onBeforeResize(): ${returnedSize}, expected Number`,\n )\n\n if (returnedSize < MIN_SIZE) {\n throw new RangeError(\n `Out of range value returned from onBeforeResize(): ${returnedSize}, must be at least ${MIN_SIZE}`,\n )\n }\n\n return returnedSize\n }\n\n function getNewSize(direction, mode) {\n const calculatedSize = direction[mode]()\n const newSize =\n direction.enabled() && onBeforeResize !== undefined\n ? callOnBeforeResize(calculatedSize)\n : calculatedSize\n\n assert(\n newSize >= MIN_SIZE,\n `New iframe ${direction.label} is too small: ${newSize}, must be at least ${MIN_SIZE}`,\n )\n\n return newSize\n }\n\n function sizeIframe(\n triggerEvent,\n triggerEventDesc,\n customHeight,\n customWidth,\n msg,\n ) {\n const isSizeChangeDetected = () =>\n (calculateHeight && checkTolerance(height, newHeight)) ||\n (calculateWidth && checkTolerance(width, newWidth))\n\n const newHeight = customHeight ?? getNewSize(getHeight, heightCalcMode)\n const newWidth = customWidth ?? getNewSize(getWidth, widthCalcMode)\n\n const updateEvent = isSizeChangeDetected()\n ? SIZE_CHANGE_DETECTED\n : triggerEvent\n\n log(`Resize event: %c${triggerEventDesc}`, HIGHLIGHT)\n\n switch (updateEvent) {\n case INIT:\n case ENABLE:\n case SIZE_CHANGE_DETECTED:\n // lockTrigger()\n height = newHeight\n width = newWidth\n // eslint-disable-next-line no-fallthrough\n case SET_OFFSET_SIZE:\n dispatchMessage(height, width, triggerEvent, msg)\n break\n\n // the following case needs {} to prevent a compile error\n case OVERFLOW_OBSERVER:\n case MUTATION_OBSERVER:\n case RESIZE_OBSERVER:\n case VISIBILITY_OBSERVER: {\n log(NO_CHANGE)\n purge()\n break\n }\n\n default:\n purge()\n info(NO_CHANGE)\n }\n\n timerActive = false // Reset time for next resize\n }\n\n let sendPending = false\n const sendFailed = once(() => adviser(getModeData(4)))\n let hiddenMessageShown = false\n let rafId\n\n const sendSize = errorBoundary(\n (triggerEvent, triggerEventDesc, customHeight, customWidth, msg) => {\n consoleEvent(triggerEvent)\n\n switch (true) {\n case isHidden === true: {\n if (hiddenMessageShown === true) break\n log('Iframe hidden - Ignored resize request')\n hiddenMessageShown = true\n sendPending = false\n cancelAnimationFrame(rafId)\n break\n }\n\n // Ignore overflowObserver here, as more efficient than using\n // mutationObserver to detect OVERFLOW_ATTR changes\n case sendPending === true && triggerEvent !== OVERFLOW_OBSERVER: {\n purge()\n log('Resize already pending - Ignored resize request')\n break // only update once per frame\n }\n\n case !autoResize && !(triggerEvent in IGNORE_DISABLE_RESIZE): {\n info('Resizing disabled')\n break\n }\n\n default: {\n hiddenMessageShown = false\n sendPending = true\n totalTime = performance.now()\n timerActive = true\n\n rafId = requestAnimationFrame(() => {\n sendPending = false\n consoleEvent('requestAnimationFrame')\n debug(`Reset sendPending: %c${triggerEvent}`, HIGHLIGHT)\n })\n\n sizeIframe(\n triggerEvent,\n triggerEventDesc,\n customHeight,\n customWidth,\n msg,\n )\n }\n }\n\n endAutoGroup()\n },\n )\n\n function lockTrigger() {\n if (triggerLocked) {\n log('TriggerLock blocked calculation')\n return\n }\n triggerLocked = true\n debug('Trigger event lock on')\n\n requestAnimationFrame(() => {\n triggerLocked = false\n debug('Trigger event lock off')\n })\n }\n\n function triggerReset(triggerEvent) {\n height = getHeight[heightCalcMode]()\n width = getWidth[widthCalcMode]()\n\n sendMessage(height, width, triggerEvent)\n }\n\n function resetIframe(triggerEventDesc) {\n const hcm = heightCalcMode\n heightCalcMode = heightCalcModeDefault\n\n log(`Reset trigger event: %c${triggerEventDesc}`, HIGHLIGHT)\n lockTrigger()\n triggerReset('reset')\n\n heightCalcMode = hcm\n }\n\n function dispatchMessage(height, width, triggerEvent, msg, targetOrigin) {\n if (mode < -1) return\n\n function setTargetOrigin() {\n if (undefined === targetOrigin) {\n targetOrigin = targetOriginDefault\n return\n }\n\n log(`Message targetOrigin: %c${targetOrigin}`, HIGHLIGHT)\n }\n\n function displayTimeTaken() {\n const timer = round(performance.now() - totalTime)\n return triggerEvent === INIT\n ? `Initialised iframe in %c${timer}ms`\n : `Size calculated in %c${timer}ms`\n }\n\n function dispatchToParent() {\n const size = `${height}:${width}`\n const message = `${parentId}:${size}:${triggerEvent}${undefined === msg ? '' : `:${msg}`}`\n\n if (sameOrigin)\n try {\n window.parent.iframeParentListener(MESSAGE_ID + message)\n } catch (error) {\n if (mode === 1) sendFailed()\n else throw error\n return\n }\n else target.postMessage(MESSAGE_ID + message, targetOrigin)\n\n if (timerActive) log(displayTimeTaken(), HIGHLIGHT)\n\n info(\n `Sending message to parent page via ${sameOrigin ? 'sameOrigin' : 'postMessage'}: %c%c${message}`,\n ITALIC,\n HIGHLIGHT,\n )\n }\n\n setTargetOrigin()\n dispatchToParent()\n }\n\n const sendMessage = errorBoundary(\n (height, width, triggerEvent, message, targetOrigin) => {\n consoleEvent(triggerEvent)\n dispatchMessage(height, width, triggerEvent, message, targetOrigin)\n endAutoGroup()\n },\n )\n\n function receiver(event) {\n consoleEvent('onMessage')\n const { freeze } = Object\n const { parse } = JSON\n const parseFrozen = (data) => freeze(parse(data))\n\n const notExpected = (type) => sendMessage(0, 0, `${type}Stop`)\n\n const processRequestFromParent = {\n init: function initFromParent() {\n if (document.readyState === 'loading') {\n log('Page not ready, ignoring init message')\n return\n }\n\n const data = event.data.slice(MESSAGE_ID_LENGTH).split(':')\n\n target = event.source\n origin = event.origin\n\n init(data)\n\n firstRun = false\n\n setTimeout(() => {\n initLock = false\n }, eventCancelTimer)\n },\n\n reset() {\n if (initLock) {\n log('Page reset ignored by init')\n return\n }\n\n log('Page size reset by host page')\n triggerReset('resetPage')\n },\n\n resize() {\n // This method is used by the tabVisible event on the parent page\n log('Resize requested by host page')\n sendSize(PARENT_RESIZE_REQUEST, 'Parent window requested size check')\n },\n\n moveToAnchor() {\n inPageLinks.findTarget(getData())\n },\n\n inPageLink() {\n this.moveToAnchor()\n }, // Backward compatibility\n\n pageInfo() {\n const msgBody = getData()\n log(`PageInfo received from parent:`, parseFrozen(msgBody))\n if (onPageInfo) {\n isolateUserCode(onPageInfo, parse(msgBody))\n } else {\n notExpected(PAGE_INFO)\n }\n },\n\n parentInfo() {\n const msgBody = parseFrozen(getData())\n log(`ParentInfo received from parent:`, msgBody)\n if (onParentInfo) {\n isolateUserCode(onParentInfo, msgBody)\n } else {\n notExpected(PARENT_INFO)\n }\n },\n\n message() {\n const msgBody = getData()\n log(`onMessage called from parent:%c`, HIGHLIGHT, parseFrozen(msgBody))\n // eslint-disable-next-line sonarjs/no-extra-arguments\n isolateUserCode(onMessage, parse(msgBody))\n },\n }\n\n const isMessageForUs = () =>\n MESSAGE_ID === `${event.data}`.slice(0, MESSAGE_ID_LENGTH)\n\n const getMessageType = () => event.data.split(']')[1].split(':')[0]\n\n const getData = () => event.data.slice(event.data.indexOf(':') + 1)\n\n const isMiddleTier = () =>\n 'iframeResize' in window ||\n (window.jQuery !== undefined && '' in window.jQuery.prototype)\n\n // Test if this message is from a child below us. This is an ugly test, however, updating\n // the message format would break backwards compatibility.\n const isInitMsg = () => event.data.split(':')[2] in { true: 1, false: 1 }\n\n function callFromParent() {\n const messageType = getMessageType()\n\n consoleEvent(messageType)\n\n if (messageType in processRequestFromParent) {\n processRequestFromParent[messageType]()\n return\n }\n\n if (!isMiddleTier() && !isInitMsg()) {\n warn(`Unexpected message (${event.data})`)\n }\n }\n\n function processMessage() {\n if (firstRun === false) {\n callFromParent()\n return\n }\n\n if (isInitMsg()) {\n label(getMessageType())\n consoleEvent(INIT)\n processRequestFromParent.init()\n return\n }\n\n log(\n `Ignored message of type \"${getMessageType()}\". Received before initialization.`,\n )\n }\n\n if (isMessageForUs()) {\n processMessage()\n }\n }\n\n const received = errorBoundary(receiver)\n\n // Normally the parent kicks things off when it detects the iframe has loaded.\n // If this script is async-loaded, then tell parent page to retry init.\n let sent = false\n const sendReady = (target) =>\n target.postMessage(\n '[iFrameResizerChild]Ready',\n window?.iframeResizer?.targetOrigin || '*',\n )\n\n function ready() {\n if (document.readyState === 'loading' || !firstRun || sent) return\n\n const { parent, top } = window\n\n consoleEvent('ready')\n log(\n 'Sending%c ready%c to parent from',\n HIGHLIGHT,\n FOREGROUND,\n window.location.href,\n )\n\n sendReady(parent)\n if (parent !== top) sendReady(top)\n\n sent = true\n }\n\n if ('iframeChildListener' in window) {\n warn('Already setup')\n } else {\n window.iframeChildListener = (data) =>\n setTimeout(() => received({ data, sameOrigin: true }))\n\n addEventListener(window, MESSAGE, received)\n addEventListener(document, READY_STATE_CHANGE, ready)\n\n ready()\n }\n\n /* TEST CODE START */\n function mockMsgListener(msgObject) {\n received(msgObject)\n return win\n }\n\n try {\n // eslint-disable-next-line no-restricted-globals\n if (top?.document?.getElementById('banner')) {\n win = {}\n\n // Create test hooks\n window.mockMsgListener = mockMsgListener\n\n removeEventListener(window, MESSAGE, received)\n\n define([], () => mockMsgListener)\n }\n } catch (error) {\n // do nothing\n }\n\n /* TEST CODE END */\n}\n\n// Don't run for server side render\nif (typeof window !== 'undefined') {\n iframeResizerChild()\n}\n"],"names":["VERSION","LABEL","BEFORE_UNLOAD","INIT","MESSAGE","PAGE_INFO","PARENT_INFO","SCROLL_TO_OFFSET","TITLE","BASE","SIZE_ATTR","OVERFLOW_ATTR","IGNORE_ATTR","HEIGHT","WIDTH","READY_STATE_CHANGE","HEIGHT_EDGE","WIDTH_EDGE","ENABLE","SIZE_CHANGE_DETECTED","Symbol","MANUAL_RESIZE_REQUEST","PARENT_RESIZE_REQUEST","IGNORE_DISABLE_RESIZE","SET_OFFSET_SIZE","RESIZE_OBSERVER","OVERFLOW_OBSERVER","MUTATION_OBSERVER","VISIBILITY_OBSERVER","NO_CHANGE","MESSAGE_ID","IGNORE_TAGS","Set","addEventListener","el","evt","func","options","l","p","y","z","t","length","codePointAt","Math","imul","toString","replace","String","fromCodePoint","x","Object","fromEntries","map","max","getModeData","setMode","u","split","v","isolateUserCode","val","setTimeout","once","fn","done","undefined","Reflect","apply","this","arguments","id","round","value","capitalizeFirstLetter","string","charAt","toUpperCase","slice","isDef","typeAssert","type","error","TypeError","enabled","mod","childConsole","acg","__esModule","default","label","expand","setupConsoleMethod","method","args","log","info","debug","assert","endAutoGroup","errorBoundary","event","purge","warn","advise","msg","formatLogMsg","identity","window","chrome","replaceAll","adviser","deprecateAdvise","change","old","replacement","iframeId","toLowerCase","deprecate","deprecateMethod","deprecateMethodReplace","deprecateOption","properties","blockedStyleSheets","getElementName","node","tagName","getComputedStyle","property","getPropertyValue","hasBlockingCSS","hasCssValue","crossOriginStylesheetError","href","has","add","getSetCSSPropertyValue","inlineValue","style","source","getInlineStyleValue","stylesheet","document","styleSheets","rule","cssRules","selectorText","matches","ruleValue","ownerNode","getStyleSheetCSSPropertyValue","showCssWarning","nodeName","checkBlockingCSS","documentElement","body","castDefined","cast","data","getBoolean","str","getNumber","Number","metaCreateDebugObserved","text","observed","size","Array","from","flatMap","createLogNewlyObserved","createWarnAlreadyObserved","metaCreateErrorObserved","createLogNewlyRemoved","createLogCounter","isAttach","counter","HIGHLIGHT","NORMAL","createDetachObservers","observer","logCounter","logNewlyRemoved","nodeList","newlyRemoved","unobserve","delete","clear","MUTATION","addedNodes","removedNodes","removedAddedNodes","newMutations","config","attributes","attributeFilter","attributeOldValue","characterData","characterDataOldValue","childList","subtree","processMutations","delayCount","pending","perfMon","logAdded","logRemovedPage","logRemovedAdded","shouldSkip","nodeType","Node","ELEMENT_NODE","addedMutation","mutation","added","removedMutation","removed","flatFilterMutations","mutations","createProcessMutations","callback","now","performance","delay","delayLimit","FOREGROUND","forEach","mutationObserved","push","requestAnimationFrame","createMutationObserver","MutationObserver","target","observe","disconnect","OVERFLOW","logAddOverflow","logRemoveOverflow","logNewlyObserved","warnAlreadyObserved","isHidden","hidden","offsetParent","display","createOverflowObserver","side","observerOptions","root","rootMargin","threshold","afterReflow","emitOverflowDetected","mutated","isOverflowed","edge","rootBounds","setOverflow","hasOverflow","toggleAttribute","IntersectionObserver","entries","entry","boundingClientRect","WeakSet","attachObservers","alreadyObserved","newlyObserved","detachObservers","PREF_START","PREF_END","PREF_MEASURE","timings","timingCheckId","detail","oldAverage","clearPerfMarks","clearMarks","clearMeasures","perfObserver","list","getEntries","name","duration","measure","shift","createPerformanceObserver","PerformanceObserver","entryTypes","setInterval","hasTags","len","sort","average","min","reduce","a","b","floor","roundedAverage","clearInterval","Side","RESIZE","logAddResize","logRemoveResize","attachObserverToNonStaticElements","position","visibilityObserver","isIntersecting","read","key","readFunction","readNumber","readString","customCalcMethods","height","getHeight","auto","width","getWidth","deprecatedResizeMethods","bodyOffset","bodyScroll","offset","documentElementOffset","documentElementScroll","grow","lowestElement","eventHandlersByName","heightCalcModeDefault","tearDown","widthCalcModeDefault","key2","origin","overflowObserver","resizeObserver","timerActive","totalTime","version","onBeforeResize","autoResize","bodyBackground","bodyMargin","bodyMarginStr","bodyPadding","bothDirections","calculateHeight","calculateWidth","firstRun","hasIgnored","hasOverflowUpdated","heightCalcMode","ignoreSelector","initLock","inPageLinks","logExpand","logging","mode","mouseEvents","offsetHeight","offsetWidth","overflowedNodeSet","parentId","resizeFrom","sameOrigin","sizeSelector","taggedElements","parent","targetOriginDefault","tolerance","triggerLocked","widthCalcMode","win","onMessage","onReady","onPageInfo","onParentInfo","init","enable","readDataFromParent","location","readData","keys","offsetSize","heightCalculationMethod","widthCalculationMethod","setupCustomCalcMethods","calcMode","calcFunc","iframeResizer","iFrameResizer","readDataFromPage","checkVersion","checkBoth","checkMode","checkIgnoredElements","checkCrossDomain","checkHeightMode","checkWidthMode","checkDeprecatedAttrs","checkQuirksMode","checkAndSetupTags","applySelectors","setupPublicMethods","setupMouseEvents","setupInPageLinks","setMargin","setBodyStyle","stopInfiniteResizingOfIframe","injectClearFixIntoBodyElement","initEventListeners","beforeUnload","error_","checkReadyYet","sendSize","title","sendMessage","readyCallback","readyState","querySelectorAll","ignoredElementsCount","ignoredElements","s","BOLD","warnIgnored","compatMode","attr","setProperty","applySelector","attribute","selector","includes","setAutoHeight","manageTriggerEvent","eventName","handleEvent","eventType","passive","remove","removeEventListener","manageEventListeners","found","checkAttrs","removeAttribute","checkCalcMode","calcModeDefault","modes","oMode","pMode","cMode","sessionStorage","getItem","ver","console","vInfo","getModeLabel","setItem","clearFix","createElement","append","getElementPosition","elPosition","getBoundingClientRect","pagePosition","scrollLeft","scrollTop","parseInt","left","top","findTarget","hash","hashData","decodeURIComponent","getElementById","getElementsByName","jumpPosition","jumpToTarget","checkLocationHash","link","getAttribute","e","preventDefault","bindAnchors","sendMouse","screenY","screenX","addMouseListener","parentIframe","freeze","consoleEvent","queueMicrotask","JSON","stringify","close","getId","getOrigin","getParentOrigin","getPageInfo","getParentProps","getParentProperties","moveToAnchor","anchor","reset","hcm","triggerReset","resetIframe","setOffsetSize","newOffset","scrollBy","scrollTo","scrollToOffset","targetOrigin","setHeightCalculationMethod","setWidthCalculationMethod","setTargetOrigin","resize","customHeight","customWidth","parentIFrame","prevOverflowedNodeSet","checkOverflow","allOverflowedNodes","filteredNodeSet","ignoredNodeSet","closest","filterIgnoredElements","prototype","symmetricDifference","overflowObserved","createOverflowObservers","overflowObserverOptions","resizeObserved","isArray","className","createResizeObservers","ResizeObserver","visibilityChange","isVisible","getCombinedElementLists","elements","element","getAllElements","addObservers","removeObservers","contentMutated","observers","createVisibilityObserver","getMaxElement","mark","elVal","maxEl","maxVal","bottom","targetElements","parseFloat","getAllMeasurements","dimension","join","prevScrollSize","prevBoundingSize","BOUNDING_FORMAT","getAutoSize","getDimension","returnBoundingClientRect","boundingSize","scrollSize","isHeight","ceilBoundingSize","ceil","floorBoundingSize","getOffset","getAdjustedScroll","sizes","calculatedSize","taggedElement","getOffsetSize","marginTop","marginBottom","scrollHeight","custom","scrollWidth","right","rightMostElement","scroll","checkTolerance","abs","getNewSize","direction","newSize","returnedSize","isNaN","RangeError","callOnBeforeResize","sendPending","sendFailed","rafId","hiddenMessageShown","triggerEvent","triggerEventDesc","cancelAnimationFrame","newHeight","newWidth","updateEvent","dispatchMessage","sizeIframe","message","iframeParentListener","postMessage","timer","displayTimeTaken","ITALIC","dispatchToParent","received","parse","parseFrozen","notExpected","processRequestFromParent","getData","inPageLink","pageInfo","msgBody","parentInfo","getMessageType","indexOf","isInitMsg","true","false","callFromParent","messageType","jQuery","processMessage","sent","sendReady","ready","iframeChildListener","iframeResizerChild"],"mappings":";;;;;;;;;;;;;;;;;;;mDAAaA,EAAU,eACVC,EAAQ,gBAGRC,EAAgB,eAGhBC,EAAO,OAGPC,EAAU,UAIVC,EAAY,WACZC,EAAc,aAOdC,EAAmB,iBACnBC,EAAQ,QAERC,EAAO,GAIPC,EAAY,mBACZC,EAAgB,yBAChBC,EAAc,qBAEdC,EAAS,SACTC,EAAQ,QAGRC,EAAqB,mBAErBC,EAAc,SACdC,EAAa,QAEbC,EAAS,oBACTC,EAAuBC,OAAO,eAC9BC,EAAwB,eACxBC,EAAwB,eACxBC,EAAw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