@iframe-resizer/child 5.5.4 → 5.5.5-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 +1 -1
- package/index.cjs.js +3 -2
- package/index.cjs.js.map +1 -0
- package/index.esm.js +3 -2
- package/index.esm.js.map +1 -0
- package/index.umd.js +3 -2
- package/index.umd.js.map +1 -0
- package/package.json +2 -2
package/index.umd.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* @preserve
|
|
3
3
|
*
|
|
4
|
-
* @module iframe-resizer/child 5.5.
|
|
4
|
+
* @module iframe-resizer/child 5.5.5-beta.2 (umd) - 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
|
-
!function(e){"function"==typeof define&&define.amd?define(e):e()}(function(){"use strict";const e="font-weight: normal;",t="font-weight: bold;",n="font-style: italic;",o=e+n,r="default",i=Object.freeze({assert:!0,error:!0,warn:!0}),a={expand:!0,defaultEvent:void 0,event:void 0,label:"AutoConsoleGroup",showTime:!0},s={profile:0,profileEnd:0,timeStamp:0,trace:0},c=Object.assign(console);const{fromEntries:l,keys:u}=Object,d=e=>[e,c[e]],f=e=>t=>[t,function(n){e[t]=n}],m=(e,t)=>l(u(e).map(t));const p=!(typeof window>"u"||"function"!=typeof window.matchMedia)&&window.matchMedia("(prefers-color-scheme: dark)").matches,h=p?"color: #A9C7FB;":"color: #135CD2;",g=p?"color: #E3E3E3;":"color: #1F1F1F;",y="5.5.4",b="iframeResizer",v=10,w="data-iframe-size",z="data-iframe-overflowed",$="data-iframe-ignore",S="bottom",O="right",E="autoResizeEnabled",M=Symbol("sizeChanged"),k="manualResize",j="parentResize",T={[k]:1,[j]:1},x="setOffsetSize",A="resizeObserver",I="overflowObserver",N="mutationObserver",C="visibilityObserver",P="init",R=new Set(["head","body","meta","base","title","script","link","style","map","area","option","optgroup","template","track","wbr","nobr"]),B=(e,t,n,o)=>e.addEventListener(t,n,o||!1),q=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)},L=e=>e.replace(/[A-Za-z]/g,e=>String.fromCodePoint((e<="Z"?90:122)>=(e=e.codePointAt(0)+19)?e:e-26)),D=["spjluzl","rlf","clyzpvu"],F=["<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."],W=["NWSc3","zvsv","wyv","ibzpulzz","vlt"],V=Object.fromEntries(["2cgs7fdf4xb","1c9ctcccr4z","1q2pc4eebgb","ueokt0969w","w2zxchhgqz","1umuxblj2e5"].map((e,t)=>[e,Math.max(0,t-1)])),H=e=>L(F[e]),U=e=>{const t=e[L(D[0])]||e[L(D[1])]||e[L(D[2])];if(!t)return-1;const n=t.split("-");let o=function(e=""){let t=-2;const n=q(L(e));return n in V&&(t=V[n]),t}(n[0]);return 0===o||(e=>e[2]===q(e[0]+e[1]))(n)||(o=-2),o},Z=(e,...t)=>setTimeout(()=>e(...t),0),J=e=>{let t=!1;return function(){return t?void 0:(t=!0,Reflect.apply(e,this,arguments))}},_=e=>e,Q=e=>Math.round(1e3*e)/1e3,G=e=>e.charAt(0).toUpperCase()+e.slice(1),Y=e=>""!=`${e}`&&void 0!==e;const X=(e,t,n)=>{if(typeof e!==t)throw new TypeError(`${n} is not a ${G(t)}`)};let K=!0,ee=b;const te=(ne=function(n={}){const l={},u={},p=[],h={...a,expand:!n.collapsed||a.expanded,...n};let g="";function y(){p.length=0,g=""}function b(){delete h.event,y()}const v=()=>!!p.some(([e])=>e in i)||!!h.expand;function w(){if(0!==p.length){c[v()?"group":"groupCollapsed"](`%c${h.label}%c ${(e=>{const t=e.event||e.defaultEvent;return t?`${t}`:""})(h)} %c${h.showTime?g:""}`,e,t,o);for(const[e,...t]of p)c.assert(e in c,`Unknown console method: ${e}`),e in c&&c[e](...t);c.groupEnd(),b()}else b()}function z(){""===g&&(g=function(){const e=new Date,t=(t,n)=>e[t]().toString().padStart(n,"0");return`@ ${t("getHours",2)}:${t("getMinutes",2)}:${t("getSeconds",2)}.${t("getMilliseconds",3)}`}())}function $(e,...t){0===p.length&&(z(),queueMicrotask(()=>queueMicrotask(w))),p.push([e,...t])}function S(e=r,...t){l[e]?$("log",`${e}: ${performance.now()-l[e]} ms`,...t):$("timeLog",e,...t)}return{...m(h,f(h)),...m(console,e=>[e,(...t)=>$(e,...t)]),...m(s,d),assert:function(e,...t){!0!==e&&$("assert",e,...t)},count:function(e=r){u[e]?u[e]+=1:u[e]=1,$("log",`${e}: ${u[e]}`)},countReset:function(e=r){delete u[e]},endAutoGroup:w,errorBoundary:e=>(...t)=>{let n;try{n=e(...t)}catch(e){if(!Error.prototype.isPrototypeOf(e))throw e;$("error",e),w()}return n},event:function(e){z(),h.event=e},purge:y,time:function(e=r){z(),l[e]=performance.now()},timeEnd:function(e=r){S(e),delete l[e]},timeLog:S,touch:z}},ne?.__esModule?ne.default:ne);var ne;const oe=te({label:`${b}(child)`});var re;const ie=(re="log",(...e)=>!K||oe[re](...e));const{assert:ae,endAutoGroup:se,error:ce,errorBoundary:le,event:ue,label:de,purge:fe,warn:me}=oe,pe=e=>{return oe.warn((t=_,e=>window.chrome?t(e.replaceAll("<br>","\n").replaceAll("<rb>","[31;1m").replaceAll("</>","[m").replaceAll("<b>","[1m").replaceAll("<i>","[3m").replaceAll("<u>","[4m")):t(e.replaceAll("<br>","\n").replaceAll(/<[/a-z]+>/gi,"")))(e));var t},he=pe,ge=(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)=>pe(t)),ye=ge("Method"),be=ge("Method","replaced with"),ve=ge("Option"),we=["min-height","min-width","max-height","max-width"],ze=new Set,$e=(e,t)=>window.getComputedStyle(e).getPropertyValue(t),Se=(e,t)=>{return(n=$e(e,t))&&"0px"!==n&&"auto"!==n&&"none"!==n;var n};function Oe({href:e}){ze.has(e)||ze.add(e)}const Ee=(e,t)=>function(e,t){const n=e.style[t];return n?{source:"an inline style attribute",value:n}:null}(e,t)||function(e,t){for(const n of document.styleSheets)try{for(const o of n.cssRules||[])if(o.selectorText&&e.matches(o.selectorText)){const e=o.style[t];if(e)return{source:"STYLE"===n.ownerNode.tagName?"an inline <style> block":`stylesheet (${n.href})`,value:e}}}catch(e){Oe(n)}return{source:"cross-origin stylesheet",value:$e(e,t)}}(e,t),Me=(e,t)=>{const{source:n,value:o}=Ee(e,t),r=(e=>e.tagName?e.tagName.toLowerCase():"unknown")(e);pe(`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 ke(){for(const e of[document.documentElement,document.body])for(const t of we)Se(e,t)&&Me(e,t)}const je=e=>t=>void 0===t?void 0:e(t),Te=je(e=>"true"===e),xe=je(Number),Ae=e=>e=>{e.size},Ie=((e="")=>t=>n=>{n.size>0&&ce(`${t}Observer ${e}:`,...Array.from(n).flatMap(e=>["\n",e]))})("already attached"),Ne=e=>e=>{e.size},Ce=(t,n=!0)=>o=>{o>0&&ie(`${n?"At":"De"}tached ${t}Observer ${n?"to":"from"} %c${o}%c element${1===o?"":"s"}`,h,e)},Pe=(e,t,n,o)=>{const r=Ne(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()}},Re=new Set,Be=new Set,qe=new Set,Le=[],De={attributes:!0,attributeFilter:[$,w],attributeOldValue:!1,characterData:!1,characterDataOldValue:!1,childList:!0,subtree:!0};let Fe,We=1,Ve=!1,He=0;const Ue=e=>{e.size},Ze=e=>{e.size},Je=e=>{e.size},_e=e=>e.nodeType!==Node.ELEMENT_NODE||R.has(e.tagName.toLowerCase());function Qe(e){const t=e.addedNodes;for(const e of t)_e(e)||Re.add(e)}function Ge(e){const t=e.removedNodes;for(const e of t)_e(e)||(Re.has(e)?(Re.delete(e),qe.add(e)):Be.add(e))}const Ye=e=>{ie("Mutations:",e);for(const t of e)Qe(t),Ge(t);Ue(Re),Ze(Be),Je(qe),qe.clear()};const Xe=e=>()=>{const t=performance.now(),n=t-He,o=16*We+++2;if(n>o&&n<200)return ue("mutationThrottled"),ie("Update delayed due to heavy workload on the callStack"),ie(`EventLoop busy time: %c${Q(n)}ms %c> Max wait: %c${o-2}ms`,h,g,h),setTimeout(Fe,16*We),void(He=t);We=1,Le.forEach(Ye),Le.length=0,Ve=!1,Be.size,Re.size,e({addedNodes:Re,removedNodes:Be}),Re.clear(),Be.clear()};function Ke(e){Le.push(e),Ve||(He=performance.now(),Ve=!0,requestAnimationFrame(Fe))}function et(e){const t=new window.MutationObserver(Ke),n=document.body||document.documentElement;return Fe=Xe(e),t.observe(n,De),ie("Attached MutationObserver to body"),{...t,disconnect:()=>{Re.clear(),Be.clear(),Le.length=0,t.disconnect(),ie("Detached MutationObserver")}}}const tt="Overflow",nt=Ce(tt),ot=Ce(tt,!1),rt=Ae(tt),it=Ie(tt),at=e=>e.hidden||null===e.offsetParent||"none"===e.style.display,st=(e,t)=>{const n=t.side,o={root:t.root,rootMargin:"0px",threshold:1},r=window?.requestAnimationFrame||_,i=(t=!1)=>e(t),a=(e,t)=>0===e||e>t[n],s=(e,t)=>e.toggleAttribute(z,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)&&!at(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));it(t),rt(n),nt(o),n.clear(),t.clear()},detachObservers:Pe(tt,c,l,ot),disconnect:()=>{c.disconnect(),ie("Detached OverflowObserver")}}},ct="--ifr-start",lt="--ifr-end",ut="--ifr-measure",dt=[];let ft,mt={},pt=0;function ht(){try{performance.clearMarks(ct),performance.clearMarks(lt),performance.clearMeasures(ut)}catch{}}function gt(e){e.getEntries().forEach(e=>{if(e.name===lt)try{const{duration:t}=performance.measure(ut,ct,lt);mt=e.detail,dt.push(t),dt.length>100&&dt.shift()}catch{}})}function yt(){ie("Attached PerformanceObserver to page");const e=new PerformanceObserver(gt);return e.observe({entryTypes:["mark"]}),ft=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=Q(e);t>pt&&(pt=t,ue("performanceObserver")),ht(),e<=4||(clearInterval(ft),pe(`<rb>Performance Warning</>\n\nCalculating the page size is taking an excessive amount of time (${Q(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(ft),e.disconnect(),ie("Detached PerformanceObserver")}}}const bt="Resize",vt=Ce(bt),wt=Ce(bt,!1),zt=Ae(bt),$t=Ie(bt),St=new WeakSet,Ot=new Set,Et=new Set;let Mt;function kt(e){let t=0;for(const n of e){if(n.nodeType!==Node.ELEMENT_NODE)continue;const e=getComputedStyle(n)?.position;""!==e&&"static"!==e&&(St.has(n)?Ot.add(n):(Mt.observe(n),St.add(n),Et.add(n),t+=1))}$t(Ot),zt(Et),vt(t),Et.clear(),Ot.clear()}function jt(e){const t=new IntersectionObserver(t=>e(t[0].isIntersecting),{threshold:0}),n=document.documentElement;return t.observe(n),ie("Attached VisibilityObserver to page"),{disconnect:()=>{t.disconnect(),ie("Detached VisibilityObserver")}}}const Tt=e=>(t,n)=>{if(n in t){if(typeof t[n]===e)return t[n];throw new TypeError(`${n} is not a ${e}.`)}},xt=Tt("function"),At=Tt("number"),It=Tt("string");"undefined"!=typeof window&&function(){const o={height:()=>(me("Custom height calculation function not defined"),pn.auto()),width:()=>(me("Custom width calculation function not defined"),hn.auto())},r={bodyOffset:1,bodyScroll:1,offset:1,documentElementOffset:1,documentElementScroll:1,boundingClientRect:1,max:1,min:1,grow:1,lowestElement:1},i={},a="auto",s="[iFrameSizer]",c=[],l="scroll";let u,d,f,m,p,q,F,V=!0,Q="",te=0,ne="",re="",ge=!1,we=!0,ze=!1,$e=!0,Se=!1,Oe=!1,Ee=!0,Me=!1,je=1,Ae=a,Ie="",Ne=!0,Ce={},Re=!1,Be=!1,qe=!1,Le=0,De=!1,Fe=0,We=0,Ve=new Set,He="",Ue="child",Ze=!1,Je="",_e=[],Qe=window.parent,Ge="*",Ye=0,Xe=!1,Ke=1,tt=l,nt=window,ot=()=>{me("onMessage function not defined")},rt=()=>{},it=null,at=null;function ut(e){var t;!function(e){He=e[0]??He,te=xe(e[1])??te,ze=Te(e[2])??ze,qe=Te(e[3])??qe,V=Te(e[6])??V,ne=e[7]??ne,Ae=e[8]??Ae,Q=e[9]??Q,re=e[10]??re,Ye=xe(e[11])??Ye,Ce.enable=Te(e[12])??!1,Ue=e[13]??Ue,tt=e[14]??tt,De=Te(e[15])??De,Fe=xe(e[16])??Fe,We=xe(e[17])??We,we=Te(e[18])??we,u=e[19]??u,q=e[20]??q,Le=xe(e[21])??Le,Be=Te(e[23])??Be}(e),ee=(t={id:He,enabled:qe,expand:Be}).id||b,oe.label(`${ee}`),oe.expand(t.expand),K=t.enabled,function(){function e(e){F=xt(e,"onBeforeResize")??F,ot=xt(e,"onMessage")??ot,rt=xt(e,"onReady")??rt,"number"==typeof e?.offset&&(ve("offset","offsetSize"),we&&(Fe=At(e,"offset")??Fe),ze&&(We=At(e,"offset")??We)),"number"==typeof e?.offsetSize&&(we&&(Fe=At(e,"offsetSize")??Fe),ze&&(We=At(e,"offsetSize")??We)),d=It(e,L(D[0]))??d,Ie=It(e,"ignoreSelector")??Ie,Je=It(e,"sizeSelector")??Je,Ge=It(e,"targetOrigin")??Ge,Ae=e?.heightCalculationMethod||Ae,tt=e?.widthCalculationMethod||tt}function t(e,t){return"function"==typeof e&&(pe(`<rb>Deprecated Option(${t}CalculationMethod)</>\n\nThe use of <b>${t}CalculationMethod</> as a function is deprecated and will be removed in a future version of <i>iframe-resizer</>. Please use the new <b>onBeforeResize</> event handler instead.\n\nSee <u>https://iframe-resizer.com/api/child</> for more details.`),o[t]=e,e="custom"),e}if(1===Le)return;const n=window.iframeResizer||window.iFrameResizer;"object"==typeof n&&(e(n),Ae=t(Ae,"height"),tt=t(tt,"width"),ie(`Set targetOrigin for parent: %c${Ge}`,h))}(),[vt,$t,Ft,ht,zt,Lt,Dt,Bt,gt,mt,ge?_:ke,Tt,Zt,Ut,Ht,Nt,()=>Ot("background",Q),()=>Ot("padding",re),ge?_:Ct,Vt,Wt,rn,dt].forEach(e=>{try{e()}catch(e){if(Le<0)throw e;pe("<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</>"),ce(e)}}),ft(J(rt)),$n(P,"Init message from host page",void 0,void 0,`${y}:${Le}`),document.title&&""!==document.title&&En(0,0,"title",document.title)}function dt(){B(window,"beforeunload",()=>{c.forEach(e=>e()),En(0,0,"beforeUnload")})}function ft(e){"complete"===document.readyState?Z(e):B(document,"readystatechange",()=>ft(e))}function mt(){_e=document.querySelectorAll(`[${w}]`),Me=_e.length>0}let pt=0;function ht(){const n=document.querySelectorAll(`*[${$}]`);return Se=n.length>0,Se&&n.length!==pt&&(function(n){const o=1===n.length?"":"s";me(`%c[${$}]%c found on %c${n.length}%c element${o}`,t,e,t,e)}(n),pt=n.length),Se}function gt(){"BackCompat"===document.compatMode&&pe("<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 vt(){q&&""!==q&&"false"!==q?q!==y&&pe(`<b>Version mismatch</>\n\nThe parent and child pages are running different versions of <i>iframe resizer</>.\n\nParent page: ${q} - Child page: ${y}.\n`):pe("<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 zt(){try{Ze=1===Le||"iframeParentListener"in window.parent}catch(e){}}function $t(){ze===we&&(ge=!0)}function Ot(e,t){void 0!==t&&""!==t&&"null"!==t&&(document.body.style.setProperty(e,t),ie(`Set body ${e}: %c${t}`,h))}function Et(e,t,n){if(""!==n)for(const e of document.querySelectorAll(n))e.toggleAttribute(t,!0)}function Tt(){Et(0,w,Je),Et(0,$,Ie)}function Nt(){var e,t;void 0===ne&&(ne=`${te}px`),Ot("margin",(e="margin",(t=ne).includes("-")&&(me(`Negative CSS value ignored for ${e}`),t=""),t))}function Ct(){const e=e=>e.style.setProperty("height","auto","important");e(document.documentElement),e(document.body)}function Pt(e){({add(t){function n(){$n(e.eventName,e.eventType)}i[t]=n,B(window,t,n,{passive:!0})},remove(e){const t=i[e];var n,o;delete i[e],n=e,o=t,window.removeEventListener(n,o,!1)}})[e.method](e.eventName)}function Rt(e){Pt({method:e,eventType:"After Print",eventName:"afterprint"}),Pt({method:e,eventType:"Before Print",eventName:"beforeprint"}),Pt({method:e,eventType:"Ready State Change",eventName:"readystatechange"})}function Bt(){let e=!1;const t=t=>document.querySelectorAll(`[${t}]`).forEach(n=>{e=!0,n.removeAttribute(t),n.toggleAttribute(w,!0)});t("data-iframe-height"),t("data-iframe-width"),e&&pe("<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 qt(e,t,n){const{label:o}=n;return t!==e&&(e in n||(me(`${e} is not a valid option for ${o}CalculationMethod.`),e=t),e in r)&&pe(`<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 ${q?"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 Lt(){Ae=qt(Ae,a,pn)}function Dt(){tt=qt(tt,l,hn)}function Ft(){const t=Le,n=U({key:u}),o=U({key:d});if(Le=Math.max(n,o),Le<0){if(Le=Math.min(n,o),fe(),pe(`${H(Le+2)}${H(2)}`),Y(q))throw H(Le+2).replace(/<\/?[a-z][^>]*>|<\/>/gi,"")}else(!Y(q)||t>-1&&Le>t)&&(sessionStorage.getItem("ifr")!==y&&function(t,n){console.info(`${ee} %ciframe-resizer ${t}`,K||n<1?"font-weight: bold;":e)}(`v${y} (${(e=>L(W[e]))(Le)})`,Le),Le<2&&he(H(3)),sessionStorage.setItem("ifr",y))}function Wt(){Rt("add"),c.push(()=>Rt("remove"))}function Vt(){const e=document.createElement("div");e.style.clear="both",e.style.display="block",e.style.height="0",document.body.append(e)}function Ht(){function e(e){const t=e.getBoundingClientRect(),n={x:document.documentElement.scrollLeft,y:document.documentElement.scrollTop};return{x:parseInt(t.left,v)+parseInt(n.x,v),y:parseInt(t.top,v)+parseInt(n.y,v)}}function t(t){const n=t.split("#")[1]||t,o=decodeURIComponent(n),r=document.getElementById(o)||document.getElementsByName(o)[0];void 0===r?En(0,0,"inPageLink",`#${n}`):function(t){const n=e(t);En(n.y,n.x,"scrollToOffset")}(r)}function n(){const{hash:e,href:n}=window.location;""!==e&&"#"!==e&&t(n)}Ce.enable&&(1===Le?pe("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")&&B(e,"click",n=>{n.preventDefault(),t(e.getAttribute("href"))})}(),B(window,"hashchange",n),setTimeout(n,128))),Ce={findTarget:t}}function Ut(){function e(e){En(0,0,e.type,`${e.screenY}:${e.screenX}`)}function t(t,n){B(window.document,t,e)}!0===De&&(t("mouseenter"),t("mouseleave"))}function Zt(){1!==Le&&(nt.parentIframe=Object.freeze({autoResize:e=>(X(e,"boolean","parentIframe.autoResize(enable) enable"),!1===ze&&!1===we?(ue(E),pe("Auto Resize can not be changed when <b>direction</> is set to 'none'."),!1):(!0===e&&!1===V?(V=!0,queueMicrotask(()=>$n(E,"Auto Resize enabled"))):!1===e&&!0===V&&(V=!1),En(0,0,"autoResize",JSON.stringify(V)),V)),close(){En(0,0,"close")},getId:()=>He,getOrigin:()=>(ye("getOrigin()","getParentOrigin()"),f),getParentOrigin:()=>f,getPageInfo(e){if("function"==typeof e)return it=e,En(0,0,"pageInfo"),void be("getPageInfo()","getParentProps()","See <u>https://iframe-resizer.com/upgrade</> for details. ");it=null,En(0,0,"pageInfoStop")},getParentProps:e=>(X(e,"function","parentIframe.getParentProps(callback) callback"),at=e,En(0,0,"parentInfo"),()=>{at=null,En(0,0,"parentInfoStop")}),getParentProperties(e){ye("getParentProperties()","getParentProps()"),this.getParentProps(e)},moveToAnchor(e){X(e,"string","parentIframe.moveToAnchor(anchor) anchor"),Ce.findTarget(e)},reset(){!function(){const e=Ae;Ae=a,Xe||(Xe=!0,requestAnimationFrame(()=>{Xe=!1})),Sn("reset"),Ae=e}()},setOffsetSize(e){X(e,"number","parentIframe.setOffsetSize(offset) offset"),Fe=e,We=e,$n(x,`parentIframe.setOffsetSize(${e})`)},scrollBy(e,t){X(e,"number","parentIframe.scrollBy(x, y) x"),X(t,"number","parentIframe.scrollBy(x, y) y"),En(t,e,"scrollBy")},scrollTo(e,t){X(e,"number","parentIframe.scrollTo(x, y) x"),X(t,"number","parentIframe.scrollTo(x, y) y"),En(t,e,"scrollTo")},scrollToOffset(e,t){X(e,"number","parentIframe.scrollToOffset(x, y) x"),X(t,"number","parentIframe.scrollToOffset(x, y) y"),En(t,e,"scrollToOffset")},sendMessage(e,t){t&&X(t,"string","parentIframe.sendMessage(msg, targetOrigin) targetOrigin"),En(0,0,"message",JSON.stringify(e),t)},setHeightCalculationMethod(e){Ae=e,Lt()},setWidthCalculationMethod(e){tt=e,Dt()},setTargetOrigin(e){X(e,"string","parentIframe.setTargetOrigin(targetOrigin) targetOrigin"),Ge=e},resize(e,t){void 0!==e&&X(e,"number","parentIframe.resize(customHeight, customWidth) customHeight"),void 0!==t&&X(t,"number","parentIframe.resize(customHeight, customWidth) customWidth"),$n(k,`parentIframe.resize(${e||""}${t?`,${t}`:""})`,e,t)},size(e,t){ye("size()","resize()"),this.resize(e,t)}}),nt.parentIFrame=nt.parentIframe)}let Jt=new Set;function _t(){const e=document.querySelectorAll(`[${z}]`);Ve=function(e){const t=new Set,n=new Set;for(const o of e)o.closest(`[${$}]`)?n.add(o):t.add(o);return n.size>0&&queueMicrotask(()=>{ue("overflowIgnored"),ie("Ignoring elements with [data-iframe-ignore] > *:\n",n),se()}),t}(e),Oe=Ve.size>0,"function"==typeof Set.prototype.symmetricDifference&&(Ee=Ve.symmetricDifference(Jt).size>0),Jt=Ve}function Qt(){switch(_t(),!0){case!Ee:return;case Ve.size>1:ie("Overflowed Elements:",Ve);break;case Oe:break;default:ie("No overflow detected")}$n(I,"Overflow updated")}function Gt(e){const t={root:document.documentElement,side:we?S:O};return m=st(Qt,t),m.attachObservers(e),m}function Yt(e){if(!Array.isArray(e)||0===e.length)return;const t=e[0].target;$n(A,`Element resized <${function(e){switch(!0){case!Y(e):return"";case Y(e.id):return`${e.nodeName}#${e.id}`;case Y(e.name):return`${e.nodeName} (${e.name}`;case Y(e.className):return`${e.nodeName}.${e.className}`;default:return e.nodeName}}(t)}>`)}function Xt(e){return Mt=new ResizeObserver(Yt),Mt.observe(document.body),St.add(document.body),ie("Attached ResizeObserver to body"),p={attachObserverToNonStaticElements:kt,detachObservers:Pe(bt,Mt,St,wt),disconnect:()=>{Mt.disconnect(),ie("Detached ResizeObserver")}},p.attachObserverToNonStaticElements(e),p}function Kt(e){Re=!e,$n(C,"Visibility changed")}const en=e=>{const t=new Set;for(const n of e){t.add(n);for(const e of ln(n))t.add(e)}return ie("Inspecting:\n",t),t},tn=e=>{if(0===e.size)return;ue("addObservers");const t=en(e);m.attachObservers(t),p.attachObserverToNonStaticElements(t),se()},nn=e=>{if(0===e.size)return;ue("removeObservers");const t=en(e);m.detachObservers(t),p.detachObservers(t),se()};function on(e){!function({addedNodes:e,removedNodes:t}){ue("contentMutated"),Tt(),mt(),_t(),se(),nn(t),tn(e)}(e),$n(N,"Mutation Observed")}function rn(){const e=ln(document.documentElement);var t;t=[et(on),Gt(e),yt(),Xt(e),jt(Kt)],c.push(...t.map(e=>e.disconnect))}function an(e){performance.mark(ct);const t=G(e);let n=1,o=document.documentElement,r=Me?0:document.documentElement.getBoundingClientRect().bottom;const i=Me?_e:Oe?Array.from(Ve):ln(document.documentElement);for(const t of i)n=t.getBoundingClientRect()[e]+parseFloat(getComputedStyle(t).getPropertyValue(`margin-${e}`)),n>r&&(r=n,o=t);return ie(`${t} position calculated from:`,o),ie(`Checked %c${i.length}%c elements`,h,g),performance.mark(lt,{detail:{hasTags:Me,len:i.length,logging:qe,Side:t}}),r}const sn=e=>[e.bodyOffset(),e.bodyScroll(),e.documentElementOffset(),e.documentElementScroll(),e.boundingClientRect()],cn=`* ${Array.from(R).map(e=>`:not(${e})`).join("")}`,ln=e=>e.querySelectorAll(cn),un={height:0,width:0},dn={height:0,width:0},fn=[h,g,h];function mn(e){function t(){return dn[o]=r,un[o]=s,Math.max(r,1)}const n=e===pn,o=e.label,r=e.boundingClientRect(),i=Math.ceil(r),a=Math.floor(r),s=(e=>e.documentElementScroll()+Math.max(0,e.getOffset()))(e),c=`HTML: %c${r}px %cPage: %c${s}px`;let l=0;switch(!0){case!e.enabled():return Math.max(s,1);case Me:ie("Found element with data-iframe-size attribute"),l=e.taggedElement();break;case!Oe&&$e&&0===dn[o]&&0===un[o]:ie(`Initial page size values: ${c}`,...fn),l=t();break;case Xe&&r===dn[o]&&s===un[o]:ie(`Size unchanged: ${c}`,...fn),l=Math.max(r,s);break;case 0===r&&0!==s:ie(`Page is hidden: ${c}`,...fn),l=s;break;case!Oe&&r!==dn[o]&&s<=un[o]:ie(`New <html> size: ${c} `,...fn),ie(`Previous <html> size: %c${dn[o]}px`,h),l=t();break;case!n:l=e.taggedElement();break;case!Oe&&r<dn[o]:ie(`<html> size decreased: ${c}`,...fn),l=t();break;case s===a||s===i:ie(`<html> size equals page size: ${c}`,...fn),l=t();break;case r>s:ie(`Page size < <html> size: ${c}`,...fn),l=t();break;case Oe:ie("Found elements possibly overflowing <html> "),l=e.taggedElement();break;default:ie(`Using <html> size: ${c}`,...fn),l=t()}return ie(`Content ${o}: %c${l}px`,h),l+=function(e){const t=e.getOffset();return 0!==t&&ie(`Page offsetSize: %c${t}px`,h),t}(e),l}const pn={label:"height",enabled:()=>we,getOffset:()=>Fe,auto:()=>mn(pn),bodyOffset:()=>{const{body:e}=document,t=getComputedStyle(e);return e.offsetHeight+parseInt(t.marginTop,v)+parseInt(t.marginBottom,v)},bodyScroll:()=>document.body.scrollHeight,offset:()=>pn.bodyOffset(),custom:()=>o.height(),documentElementOffset:()=>document.documentElement.offsetHeight,documentElementScroll:()=>document.documentElement.scrollHeight,boundingClientRect:()=>Math.max(document.documentElement.getBoundingClientRect().bottom,document.body.getBoundingClientRect().bottom),max:()=>Math.max(...sn(pn)),min:()=>Math.min(...sn(pn)),grow:()=>pn.max(),lowestElement:()=>an(S),taggedElement:()=>an(S)},hn={label:"width",enabled:()=>ze,getOffset:()=>We,auto:()=>mn(hn),bodyScroll:()=>document.body.scrollWidth,bodyOffset:()=>document.body.offsetWidth,custom:()=>o.width(),documentElementScroll:()=>document.documentElement.scrollWidth,documentElementOffset:()=>document.documentElement.offsetWidth,boundingClientRect:()=>Math.max(document.documentElement.getBoundingClientRect().right,document.body.getBoundingClientRect().right),max:()=>Math.max(...sn(hn)),min:()=>Math.min(...sn(hn)),rightMostElement:()=>an(O),scroll:()=>Math.max(hn.bodyScroll(),hn.documentElementScroll()),taggedElement:()=>an(O)},gn=(e,t)=>!(Math.abs(e-t)<=Ye);function yn(e,t){const n=e[t](),o=e.enabled()&&void 0!==F?function(e){const t=F(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 ae(o>=1,`New iframe ${e.label} is too small: ${o}, must be at least 1`),o}let bn=!1;const vn=J(()=>he(H(4)));let wn,zn=!1;const $n=le((e,t,n,o,r)=>{switch(ue(e),!0){case!0===Re:if(!0===zn)break;zn=!0,bn=!1,cancelAnimationFrame(wn);break;case!0===bn:fe();break;case!V&&!(e in T):ie("Resizing disabled");break;default:zn=!1,bn=!0,performance.now(),wn=requestAnimationFrame(()=>{bn=!1,ue("requestAnimationFrame")}),function(e,t,n,o,r){const i=n??yn(pn,Ae),a=o??yn(hn,tt);switch(we&&gn(je,i)||ze&&gn(Ke,a)?M:e){case P:case E:case M:je=i,Ke=a;case x:On(je,Ke,e,r);break;case I:case N:case A:case C:fe();break;default:fe(),ie("No change in content size detected")}}(e,0,n,o,r)}se()});function Sn(e){je=pn[Ae](),Ke=hn[tt](),En(je,Ke,e)}function On(e,t,o,r,i){Le<-1||(void 0!==i||(i=Ge),function(){const a=`${He}:${e}:${t}:${o}${void 0===r?"":`:${r}`}`;if(Ze)try{window.parent.iframeParentListener(s+a)}catch(e){if(1!==Le)throw e;return void vn()}else Qe.postMessage(s+a,i);ie(`Sending message to parent page via ${Ze?"sameOrigin":"postMessage"}: %c%c${a}`,n,h)}())}const En=le((e,t,n,o,r)=>{ue(n),On(e,t,n,o,r),se()}),Mn=le(function(e){ue("onMessage");const{freeze:t}=Object,{parse:n}=JSON,o=e=>En(0,0,`${e}Stop`),r={init:function(){if("loading"===document.readyState)return;const t=e.data.slice(13).split(":");Qe=e.source,f=e.origin,ut(t),$e=!1,setTimeout(()=>{Ne=!1},128)},reset(){Ne||Sn("resetPage")},resize(){$n(j,"Parent window requested size check")},moveToAnchor(){Ce.findTarget(a())},inPageLink(){this.moveToAnchor()},pageInfo(){const e=a();it?Z(it,n(e)):o("pageInfo")},parentInfo(){const e=(r=a(),t(n(r)));var r;at?Z(at,e):o("parentInfo")},message(){const e=a();Z(ot,n(e))}},i=()=>e.data.split("]")[1].split(":")[0],a=()=>e.data.slice(e.data.indexOf(":")+1),c=()=>e.data.split(":")[2]in{true:1,false:1};function l(){const t=i();ue(t),t in r?r[t]():"iframeResize"in window||void 0!==window.jQuery&&""in window.jQuery.prototype||c()||me(`Unexpected message (${e.data})`)}s===`${e.data}`.slice(0,13)&&function(){if(!1!==$e)return c()?(de(i()),ue(P),void r.init()):void 0;l()}()});let kn=!1;const jn=e=>e.postMessage("[iFrameResizerChild]Ready","*");function Tn(){if("loading"===document.readyState||!$e||kn)return;const{parent:e,top:t}=window;jn(e),e!==t&&jn(t),kn=!0}"iframeChildListener"in window?me("Already setup"):(window.iframeChildListener=e=>setTimeout(()=>Mn({data:e,sameOrigin:!0})),B(window,"message",Mn),B(document,"readystatechange",Tn),setTimeout(Tn))}()});
|
|
20
|
+
!function(e){"function"==typeof define&&define.amd?define(e):e()}(function(){"use strict";const e="font-weight: normal;",t="font-weight: bold;",n="font-style: italic;",o=e+n,r="default",i=Object.freeze({assert:!0,error:!0,warn:!0}),a={expand:!1,defaultEvent:void 0,event:void 0,label:"AutoConsoleGroup",showTime:!0},s={profile:0,profileEnd:0,timeStamp:0,trace:0},c=Object.assign(console);const{fromEntries:l,keys:d}=Object,u=e=>[e,c[e]],f=e=>t=>[t,function(n){e[t]=n}],m=(e,t)=>l(d(e).map(t));const p=!(typeof window>"u"||"function"!=typeof window.matchMedia)&&window.matchMedia("(prefers-color-scheme: dark)").matches,h=p?"color: #A9C7FB;":"color: #135CD2;",g=p?"color: #E3E3E3;":"color: #1F1F1F;",y="5.5.5-beta.2",b="iframeResizer",v="beforeUnload",z="init",w="message",$="pageInfo",S="parentInfo",O="scrollToOffset",M="title",E=10,k="data-iframe-size",x="data-iframe-overflowed",I="data-iframe-ignore",T="height",j="width",A="readystatechange",C="bottom",P="right",N="autoResizeEnabled",R=Symbol("sizeChanged"),q="manualResize",L="parentResize",B={[q]:1,[L]:1},D="setOffsetSize",F="resizeObserver",W="overflowObserver",V="mutationObserver",H="visibilityObserver",U="No change in content size detected",Z="[iFrameSizer]",J=new Set(["head","body","meta","base","title","script","link","style","map","area","option","optgroup","template","track","wbr","nobr"]),_=(e,t,n,o)=>e.addEventListener(t,n,o||!1),Q=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)},G=e=>e.replace(/[A-Za-z]/g,e=>String.fromCodePoint((e<="Z"?90:122)>=(e=e.codePointAt(0)+19)?e:e-26)),Y=["spjluzl","rlf","clyzpvu"],X=["<yi>Puchspk Spjluzl Rlf</><iy><iy>","<yi>Tpzzpun Spjluzl Rlf</><iy><iy>","Aopz spiyhyf pz hchpshisl dpao ivao Jvttlyjphs huk Vwlu-Zvbyjl spjluzlz.<iy><iy><i>Jvttlyjphs Spjluzl</><iy>Mvy jvttlyjphs bzl, <p>pmyhtl-ylzpgly</> ylxbpylz h svd jvza vul aptl spjluzl mll. Mvy tvyl pumvythapvu cpzpa <b>oaawz://pmyhtl-ylzpgly.jvt/wypjpun</>.<iy><iy><i>Vwlu Zvbyjl Spjluzl</><iy>Pm fvb hyl bzpun aopz spiyhyf pu h uvu-jvttlyjphs vwlu zvbyjl wyvqlja aolu fvb jhu bzl pa mvy myll bukly aol alytz vm aol NWS C3 Spjluzl. Av jvumpyt fvb hjjlwa aolzl alytz, wslhzl zla aol <i>spjluzl</> rlf pu <p>pmyhtl-ylzpgly</> vwapvuz av <i>NWSc3</>.<iy><iy>Mvy tvyl pumvythapvu wslhzl zll: <b>oaawz://pmyhtl-ylzpgly.jvt/nws</>","<i>NWSc3 Spjluzl Clyzpvu</><iy><iy>Aopz clyzpvu vm <p>pmyhtl-ylzpgly</> pz ilpun bzlk bukly aol alytz vm aol <i>NWS C3</> spjluzl. Aopz spjluzl hssvdz fvb av bzl <p>pmyhtl-ylzpgly</> pu Vwlu Zvbyjl wyvqljaz, iba pa ylxbpylz fvby wyvqlja av il wbispj, wyvcpkl haaypibapvu huk il spjluzlk bukly clyzpvu 3 vy shaly vm aol NUB Nlulyhs Wbispj Spjluzl.<iy><iy>Pm fvb hyl bzpun aopz spiyhyf pu h uvu-vwlu zvbyjl wyvqlja vy dlizpal, fvb dpss ullk av wbyjohzl h svd jvza vul aptl jvttlyjphs spjluzl.<iy><iy>Mvy tvyl pumvythapvu cpzpa <b>oaawz://pmyhtl-ylzpgly.jvt/wypjpun</>.","<iy><yi>Zvsv spjluzl kvlz uva zbwwvya jyvzz-kvthpu</><iy><iy>Av bzl <p>pmyhtl-ylzpgly</> dpao jyvzz kvthpu pmyhtlz fvb ullk lpaoly aol Wyvmlzzpvuhs vy Ibzpulzz spjluzlz. Mvy klahpsz vu bwnyhkl wypjpun wslhzl jvuahja pumv@pmyhtl-ylzpgly.jvt."],K=["NWSc3","zvsv","wyv","ibzpulzz","vlt"],ee=Object.fromEntries(["2cgs7fdf4xb","1c9ctcccr4z","1q2pc4eebgb","ueokt0969w","w2zxchhgqz","1umuxblj2e5"].map((e,t)=>[e,Math.max(0,t-1)])),te=e=>G(X[e]),ne=e=>{const t=e[G(Y[0])]||e[G(Y[1])]||e[G(Y[2])];if(!t)return-1;const n=t.split("-");let o=function(e=""){let t=-2;const n=Q(G(e));return n in ee&&(t=ee[n]),t}(n[0]);return 0===o||(e=>e[2]===Q(e[0]+e[1]))(n)||(o=-2),o},oe=(e,...t)=>setTimeout(()=>e(...t),0),re=e=>{let t=!1;return function(){return t?void 0:(t=!0,Reflect.apply(e,this,arguments))}},ie=e=>e,ae=e=>Math.round(1e3*e)/1e3,se=e=>e.charAt(0).toUpperCase()+e.slice(1),ce=e=>""!=`${e}`&&void 0!==e;const le=(e,t,n)=>{if(typeof e!==t)throw new TypeError(`${n} is not a ${se(t)}`)};let de=!0,ue=b;const fe=(me=function(n={}){const l={},d={},p=[],h={...a,expand:!n.collapsed||a.expanded,...n};let g="";function y(){p.length=0,g=""}function b(){delete h.event,y()}const v=()=>!!p.some(([e])=>e in i)||!!h.expand;function z(){if(0!==p.length){c[v()?"group":"groupCollapsed"](`%c${h.label}%c ${(e=>{const t=e.event||e.defaultEvent;return t?`${t}`:""})(h)} %c${h.showTime?g:""}`,e,t,o);for(const[e,...t]of p)c.assert(e in c,`Unknown console method: ${e}`),e in c&&c[e](...t);c.groupEnd(),b()}else b()}function w(){""===g&&(g=function(){const e=new Date,t=(t,n)=>e[t]().toString().padStart(n,"0");return`@ ${t("getHours",2)}:${t("getMinutes",2)}:${t("getSeconds",2)}.${t("getMilliseconds",3)}`}())}function $(e,...t){0===p.length&&(w(),queueMicrotask(()=>queueMicrotask(z))),p.push([e,...t])}function S(e=r,...t){l[e]?$("log",`${e}: ${performance.now()-l[e]} ms`,...t):$("timeLog",e,...t)}return{...m(h,f(h)),...m(console,e=>[e,(...t)=>$(e,...t)]),...m(s,u),assert:function(e,...t){!0!==e&&$("assert",e,...t)},count:function(e=r){d[e]?d[e]+=1:d[e]=1,$("log",`${e}: ${d[e]}`)},countReset:function(e=r){delete d[e]},endAutoGroup:z,errorBoundary:e=>(...t)=>{let n;try{n=e(...t)}catch(e){if(!Error.prototype.isPrototypeOf(e))throw e;$("error",e),z()}return n},event:function(e){w(),h.event=e},purge:y,time:function(e=r){w(),l[e]=performance.now()},timeEnd:function(e=r){S(e),delete l[e]},timeLog:S,touch:w}},me?.__esModule?me.default:me);var me;const pe=fe({label:`${b}(child)`,expand:!1});const he=e=>(...t)=>!de||pe[e](...t),ge=he("log"),ye=ge,be=he("debug");const{assert:ve,endAutoGroup:ze,error:we,errorBoundary:$e,event:Se,label:Oe,purge:Me,warn:Ee}=pe,ke=e=>{return pe.warn((t=ie,e=>window.chrome?t(e.replaceAll("<br>","\n").replaceAll("<rb>","[31;1m").replaceAll("</>","[m").replaceAll("<b>","[1m").replaceAll("<i>","[3m").replaceAll("<u>","[4m")):t(e.replaceAll("<br>","\n").replaceAll(/<[/a-z]+>/gi,"")))(e));var t},xe=ke,Ie=(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)=>ke(t)),Te=Ie("Method"),je=Ie("Method","replaced with"),Ae=Ie("Option"),Ce=["min-height","min-width","max-height","max-width"],Pe=new Set,Ne=e=>e.tagName?e.tagName.toLowerCase():"unknown",Re=(e,t)=>window.getComputedStyle(e).getPropertyValue(t),qe=(e,t)=>{return(n=Re(e,t))&&"0px"!==n&&"auto"!==n&&"none"!==n;var n};function Le({href:e}){Pe.has(e)||(ge("Unable to access stylesheet:",e),Pe.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){Le(n)}return{source:"cross-origin stylesheet",value:Re(e,t)}}(e,t),De=(e,t)=>{const{source:n,value:o}=Be(e,t),r=Ne(e);ke(`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 Fe(){for(const e of[document.documentElement,document.body])for(const t of Ce)ge(`Checking <${Ne(e)}> for blocking CSS: ${t}`),qe(e,t)&&De(e,t)}const We=e=>t=>void 0===t?void 0:e(t),Ve=We(e=>"true"===e),He=We(Number),Ue=(e="")=>t=>n=>{n.size>0&&be(`${t}Observer ${e}:`,...Array.from(n).flatMap(e=>["\n",e]))},Ze=Ue("attached to"),Je=((e="")=>t=>n=>{n.size>0&&we(`${t}Observer ${e}:`,...Array.from(n).flatMap(e=>["\n",e]))})("already attached"),_e=Ue("detached from"),Qe=(t,n=!0)=>o=>{o>0&&ye(`${n?"At":"De"}tached ${t}Observer ${n?"to":"from"} %c${o}%c element${1===o?"":"s"}`,h,e)},Ge=(e,t,n,o)=>{const r=_e(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()}},Ye="Mutation",Xe=new Set,Ke=new Set,et=new Set,tt=[],nt={attributes:!0,attributeFilter:[I,k],attributeOldValue:!1,characterData:!1,characterDataOldValue:!1,childList:!0,subtree:!0};let ot,rt=1,it=!1,at=0;const st=Ue("added")(Ye),ct=Ue("removed (page)")(Ye),lt=Ue("removed (added)")(Ye),dt=e=>e.nodeType!==Node.ELEMENT_NODE||J.has(e.tagName.toLowerCase());function ut(e){const t=e.addedNodes;for(const e of t)dt(e)||Xe.add(e)}function ft(e){const t=e.removedNodes;for(const e of t)dt(e)||(Xe.has(e)?(Xe.delete(e),et.add(e)):Ke.add(e))}const mt=e=>{ye("Mutations:",e);for(const t of e)ut(t),ft(t);st(Xe),ct(Ke),lt(et),et.clear()};const pt=e=>()=>{const t=performance.now(),n=t-at,o=16*rt+++2;if(n>o&&n<200)return Se("mutationThrottled"),ye("Update delayed due to heavy workload on the callStack"),ye(`EventLoop busy time: %c${ae(n)}ms %c> Max wait: %c${o-2}ms`,h,g,h),setTimeout(ot,16*rt),void(at=t);rt=1,tt.forEach(mt),tt.length=0,it=!1,Ke.size>0&&ge(`Detected %c${Ke.size} %cremoved element${Ke.size>1?"s":""}`,h,g),Xe.size>0&&ge(`Found %c${Xe.size} %cnew element${Xe.size>1?"s":""}`,h,g),e({addedNodes:Xe,removedNodes:Ke}),Xe.clear(),Ke.clear()};function ht(e){tt.push(e),it||(at=performance.now(),it=!0,requestAnimationFrame(ot))}function gt(e){const t=new window.MutationObserver(ht),n=document.body||document.documentElement;return ot=pt(e),t.observe(n,nt),ye("Attached MutationObserver to body"),{...t,disconnect:()=>{Xe.clear(),Ke.clear(),tt.length=0,t.disconnect(),ye("Detached MutationObserver")}}}const yt="Overflow",bt=Qe(yt),vt=Qe(yt,!1),zt=Ze(yt),wt=Je(yt),$t=e=>e.hidden||null===e.offsetParent||"none"===e.style.display,St=(e,t)=>{const n=t.side,o={root:t.root,rootMargin:"0px",threshold:1},r=window?.requestAnimationFrame||ie,i=(t=!1)=>e(t),a=(e,t)=>0===e||e>t[n],s=(e,t)=>e.toggleAttribute(x,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)&&!$t(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));wt(t),zt(n),bt(o),n.clear(),t.clear()},detachObservers:Ge(yt,c,l,vt),disconnect:()=>{c.disconnect(),ye("Detached OverflowObserver")}}},Ot="--ifr-start",Mt="--ifr-end",Et="--ifr-measure",kt=[];let xt,It={},Tt=0;function jt(){try{performance.clearMarks(Ot),performance.clearMarks(Mt),performance.clearMeasures(Et)}catch{}}function At(e){e.getEntries().forEach(e=>{if(e.name===Mt)try{const{duration:t}=performance.measure(Et,Ot,Mt);It=e.detail,kt.push(t),kt.length>100&&kt.shift()}catch{}})}function Ct(){ye("Attached PerformanceObserver to page");const e=new PerformanceObserver(At);return e.observe({entryTypes:["mark"]}),xt=setInterval(()=>{if(kt.length<10)return;if(It.hasTags&&It.len<25)return;kt.sort();const e=Math.min(kt.reduce((e,t)=>e+t,0)/kt.length,kt[Math.floor(kt.length/2)]),t=ae(e);t>Tt&&(Tt=t,Se("performanceObserver"),ge("Mean time:",ae(kt[Math.floor(kt.length/2)])),ge("Median time:",ae(kt.reduce((e,t)=>e+t,0)/kt.length)),ge("Average time:",t),ge("Max time:",ae(Math.max(...kt)))),jt(),e<=4||(clearInterval(xt),ke(`<rb>Performance Warning</>\n\nCalculating the page size is taking an excessive amount of time (${ae(e)}ms).\n\nTo improve performance add the <b>data-iframe-size</> attribute to the ${It.Side.toLowerCase()} most element on the page. For more details see: <u>https://iframe-resizer.com/perf</>.`))},5e3),{disconnect:()=>{jt(),clearInterval(xt),e.disconnect(),ye("Detached PerformanceObserver")}}}const Pt="Resize",Nt=Qe(Pt),Rt=Qe(Pt,!1),qt=Ze(Pt),Lt=Je(Pt),Bt=new WeakSet,Dt=new Set,Ft=new Set;let Wt;function Vt(e){let t=0;for(const n of e){if(n.nodeType!==Node.ELEMENT_NODE)continue;const e=getComputedStyle(n)?.position;""!==e&&"static"!==e&&(Bt.has(n)?Dt.add(n):(Wt.observe(n),Bt.add(n),Ft.add(n),t+=1))}Lt(Dt),qt(Ft),Nt(t),Ft.clear(),Dt.clear()}function Ht(e){const t=new IntersectionObserver(t=>e(t[0].isIntersecting),{threshold:0}),n=document.documentElement;return t.observe(n),ye("Attached VisibilityObserver to page"),{disconnect:()=>{t.disconnect(),ye("Detached VisibilityObserver")}}}const Ut=e=>(t,n)=>{if(n in t){if(typeof t[n]===e)return t[n];throw new TypeError(`${n} is not a ${e}.`)}},Zt=Ut("function"),Jt=Ut("number"),_t=Ut("string");"undefined"!=typeof window&&function(){const o={height:()=>(Ee("Custom height calculation function not defined"),xn.auto()),width:()=>(Ee("Custom width calculation function not defined"),In.auto())},r={bodyOffset:1,bodyScroll:1,offset:1,documentElementOffset:1,documentElementScroll:1,boundingClientRect:1,max:1,min:1,grow:1,lowestElement:1},i={},a="auto",s=[],c="scroll";let l,d,u,f,m,p,Q,X,ee,fe=!0,me="",he=0,Me="",Ie="",Ce=!1,Pe=!0,Ne=!1,Re=!0,qe=!1,Le=!1,Be=!0,De=!1,We=1,Ue=a,Ze="",Je=!0,_e={},Qe=!1,Ye=!1,Xe=!1,Ke=0,et=!1,tt=0,nt=0,ot=new Set,rt="",it="child",at=!1,st="",ct=[],lt=window.parent,dt="*",ut=0,ft=!1,mt=1,pt=c,ht=window,yt=()=>{Ee("onMessage function not defined")},bt=()=>{},vt=null,zt=null;function wt(e){var t;!function(e){rt=e[0]??rt,he=He(e[1])??he,Ne=Ve(e[2])??Ne,Xe=Ve(e[3])??Xe,fe=Ve(e[6])??fe,Me=e[7]??Me,Ue=e[8]??Ue,me=e[9]??me,Ie=e[10]??Ie,ut=He(e[11])??ut,_e.enable=Ve(e[12])??!1,it=e[13]??it,pt=e[14]??pt,et=Ve(e[15])??et,tt=He(e[16])??tt,nt=He(e[17])??nt,Pe=Ve(e[18])??Pe,l=e[19]??l,X=e[20]??X,Ke=He(e[21])??Ke,Ye=Ve(e[23])??Ye}(e),ue=(t={id:rt,enabled:Xe,expand:Ye}).id||b,pe.label(`${ue}`),pe.expand(t.expand),de=t.enabled,ge(`Initialising iframe v${y} ${window.location.href}`),function(){function e(e){ge("Reading data from page:",Object.keys(e)),ee=Zt(e,"onBeforeResize")??ee,yt=Zt(e,"onMessage")??yt,bt=Zt(e,"onReady")??bt,"number"==typeof e?.offset&&(Ae("offset","offsetSize"),Pe&&(tt=Jt(e,"offset")??tt),Ne&&(nt=Jt(e,"offset")??nt)),"number"==typeof e?.offsetSize&&(Pe&&(tt=Jt(e,"offsetSize")??tt),Ne&&(nt=Jt(e,"offsetSize")??nt)),d=_t(e,G(Y[0]))??d,Ze=_t(e,"ignoreSelector")??Ze,st=_t(e,"sizeSelector")??st,dt=_t(e,"targetOrigin")??dt,Ue=e?.heightCalculationMethod||Ue,pt=e?.widthCalculationMethod||pt}function t(e,t){return"function"==typeof e&&(ke(`<rb>Deprecated Option(${t}CalculationMethod)</>\n\nThe use of <b>${t}CalculationMethod</> as a function is deprecated and will be removed in a future version of <i>iframe-resizer</>. Please use the new <b>onBeforeResize</> event handler instead.\n\nSee <u>https://iframe-resizer.com/api/child</> for more details.`),o[t]=e,e="custom"),e}if(1===Ke)return;const n=window.iframeResizer||window.iFrameResizer;"object"==typeof n&&(e(n),Ue=t(Ue,T),pt=t(pt,j),ye(`Set targetOrigin for parent: %c${dt}`,h))}(),[jt,Nt,tn,It,At,Kt,en,Yt,Tt,kt,Ce?ie:Fe,Dt,sn,an,rn,Ft,()=>qt("background",me),()=>qt("padding",Ie),Ce?ie:Ut,on,nn,vn,$t].forEach(e=>{try{e()}catch(e){if(Ke<0)throw e;ke("<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</>"),we(e)}}),Et(re(bt)),ge("Initialization complete"),Rn(z,"Init message from host page",void 0,void 0,`${y}:${Ke}`),document.title&&""!==document.title&&Bn(0,0,M,document.title)}function $t(){_(window,v.toLowerCase(),()=>{s.forEach(e=>e()),Bn(0,0,v)})}function Et(e){"complete"===document.readyState?oe(e):_(document,A,()=>Et(e))}function kt(){ct=document.querySelectorAll(`[${k}]`),De=ct.length>0,ge(`Tagged elements found: %c${De}`,h)}let xt=0;function It(){const n=document.querySelectorAll(`*[${I}]`);return qe=n.length>0,qe&&n.length!==xt&&(function(n){const o=1===n.length?"":"s";Ee(`%c[${I}]%c found on %c${n.length}%c element${o}`,t,e,t,e)}(n),xt=n.length),qe}function Tt(){"BackCompat"===document.compatMode&&ke("<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 jt(){X&&""!==X&&"false"!==X?X!==y&&ke(`<b>Version mismatch</>\n\nThe parent and child pages are running different versions of <i>iframe resizer</>.\n\nParent page: ${X} - Child page: ${y}.\n`):ke("<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 At(){try{at=1===Ke||"iframeParentListener"in window.parent}catch(e){ge("Cross domain iframe detected")}}function Nt(){Ne===Pe&&(Ce=!0)}function qt(e,t){void 0!==t&&""!==t&&"null"!==t&&(document.body.style.setProperty(e,t),ye(`Set body ${e}: %c${t}`,h))}function Lt(e,t,n){if(""!==n){ge(`${e}: %c${n}`,h);for(const e of document.querySelectorAll(n))ge(`Applying ${t} to:`,e),e.toggleAttribute(t,!0)}}function Dt(){Lt("sizeSelector",k,st),Lt("ignoreSelector",I,Ze)}function Ft(){var e,t;void 0===Me&&(Me=`${he}px`),qt("margin",(e="margin",(t=Me).includes("-")&&(Ee(`Negative CSS value ignored for ${e}`),t=""),t))}function Ut(){const e=e=>e.style.setProperty(T,"auto","important");e(document.documentElement),e(document.body),ge("Set HTML & body height: %cauto !important",h)}function Qt(e){({add(t){function n(){Rn(e.eventName,e.eventType)}i[t]=n,_(window,t,n,{passive:!0})},remove(e){const t=i[e];var n,o;delete i[e],n=e,o=t,window.removeEventListener(n,o,!1)}})[e.method](e.eventName),ge(`${se(e.method)} event listener: %c${e.eventType}`,h)}function Gt(e){Qt({method:e,eventType:"After Print",eventName:"afterprint"}),Qt({method:e,eventType:"Before Print",eventName:"beforeprint"}),Qt({method:e,eventType:"Ready State Change",eventName:A})}function Yt(){let e=!1;const t=t=>document.querySelectorAll(`[${t}]`).forEach(n=>{e=!0,n.removeAttribute(t),n.toggleAttribute(k,!0)});t("data-iframe-height"),t("data-iframe-width"),e&&ke("<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 Xt(e,t,n){const{label:o}=n;return t!==e&&(e in n||(Ee(`${e} is not a valid option for ${o}CalculationMethod.`),e=t),e in r)&&ke(`<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 ${X?"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`),ge(`Set ${o} calculation method: %c${e}`,h),e}function Kt(){Ue=Xt(Ue,a,xn)}function en(){pt=Xt(pt,c,In)}function tn(){const t=Ke,n=ne({key:l}),o=ne({key:d});if(Ke=Math.max(n,o),Ke<0){if(Ke=Math.min(n,o),ke(`${te(Ke+2)}${te(2)}`),ce(X))throw te(Ke+2).replace(/<\/?[a-z][^>]*>|<\/>/gi,"")}else(!ce(X)||t>-1&&Ke>t)&&(sessionStorage.getItem("ifr")!==y&&function(t,n){console.info(`${ue} %ciframe-resizer ${t}`,de||n<1?"font-weight: bold;":e)}(`v${y} (${(e=>G(K[e]))(Ke)})`,Ke),Ke<2&&xe(te(3)),sessionStorage.setItem("ifr",y))}function nn(){!0!==fe&&ge("Auto Resize disabled"),Gt("add"),s.push(()=>Gt("remove"))}function on(){const e=document.createElement("div");e.style.clear="both",e.style.display="block",e.style.height="0",document.body.append(e)}function rn(){function e(e){const t=e.getBoundingClientRect(),n={x:document.documentElement.scrollLeft,y:document.documentElement.scrollTop};return{x:parseInt(t.left,E)+parseInt(n.x,E),y:parseInt(t.top,E)+parseInt(n.y,E)}}function t(t){const n=t.split("#")[1]||t,o=decodeURIComponent(n),r=document.getElementById(o)||document.getElementsByName(o)[0];void 0===r?(ge(`In page link (#${n}) not found in iframe, so sending to parent`),Bn(0,0,"inPageLink",`#${n}`)):function(t){const o=e(t);ge(`Moving to in page link (%c#${n}%c) at x: %c${o.x}%c y: %c${o.y}`,h,g,h,g,h),Bn(o.y,o.x,O)}(r)}function n(){const{hash:e,href:n}=window.location;""!==e&&"#"!==e&&t(n)}_e.enable?1===Ke?ke("In page linking requires a Professional or Business license. Please see <u>https://iframe-resizer.com/pricing</> for more details."):(ge("Setting up location.hash handlers"),function(){for(const e of document.querySelectorAll('a[href^="#"]'))"#"!==e.getAttribute("href")&&_(e,"click",n=>{n.preventDefault(),t(e.getAttribute("href"))})}(),_(window,"hashchange",n),setTimeout(n,128)):ge("In page linking not enabled"),_e={findTarget:t}}function an(){function e(e){Bn(0,0,e.type,`${e.screenY}:${e.screenX}`)}function t(t,n){ge(`Add event listener: %c${n}`,h),_(window.document,t,e)}!0===et&&(t("mouseenter","Mouse Enter"),t("mouseleave","Mouse Leave"))}function sn(){1!==Ke&&(ht.parentIframe=Object.freeze({autoResize:e=>(le(e,"boolean","parentIframe.autoResize(enable) enable"),!1===Ne&&!1===Pe?(Se(N),ke("Auto Resize can not be changed when <b>direction</> is set to 'none'."),!1):(!0===e&&!1===fe?(fe=!0,queueMicrotask(()=>Rn(N,"Auto Resize enabled"))):!1===e&&!0===fe&&(fe=!1),Bn(0,0,"autoResize",JSON.stringify(fe)),fe)),close(){Bn(0,0,"close")},getId:()=>rt,getOrigin:()=>(Se("getOrigin"),Te("getOrigin()","getParentOrigin()"),u),getParentOrigin:()=>u,getPageInfo(e){if("function"==typeof e)return vt=e,Bn(0,0,$),void je("getPageInfo()","getParentProps()","See <u>https://iframe-resizer.com/upgrade</> for details. ");vt=null,Bn(0,0,"pageInfoStop")},getParentProps:e=>(le(e,"function","parentIframe.getParentProps(callback) callback"),zt=e,Bn(0,0,S),()=>{zt=null,Bn(0,0,"parentInfoStop")}),getParentProperties(e){Te("getParentProperties()","getParentProps()"),this.getParentProps(e)},moveToAnchor(e){le(e,"string","parentIframe.moveToAnchor(anchor) anchor"),_e.findTarget(e)},reset(){!function(){const e=Ue;Ue=a,ge(`Reset trigger event: %c${"parentIframe.reset"}`,h),ft?ge("TriggerLock blocked calculation"):(ft=!0,be("Trigger event lock on"),requestAnimationFrame(()=>{ft=!1,be("Trigger event lock off")})),qn("reset"),Ue=e}()},setOffsetSize(e){le(e,"number","parentIframe.setOffsetSize(offset) offset"),tt=e,nt=e,Rn(D,`parentIframe.setOffsetSize(${e})`)},scrollBy(e,t){le(e,"number","parentIframe.scrollBy(x, y) x"),le(t,"number","parentIframe.scrollBy(x, y) y"),Bn(t,e,"scrollBy")},scrollTo(e,t){le(e,"number","parentIframe.scrollTo(x, y) x"),le(t,"number","parentIframe.scrollTo(x, y) y"),Bn(t,e,"scrollTo")},scrollToOffset(e,t){le(e,"number","parentIframe.scrollToOffset(x, y) x"),le(t,"number","parentIframe.scrollToOffset(x, y) y"),Bn(t,e,O)},sendMessage(e,t){t&&le(t,"string","parentIframe.sendMessage(msg, targetOrigin) targetOrigin"),Bn(0,0,w,JSON.stringify(e),t)},setHeightCalculationMethod(e){Ue=e,Kt()},setWidthCalculationMethod(e){pt=e,en()},setTargetOrigin(e){le(e,"string","parentIframe.setTargetOrigin(targetOrigin) targetOrigin"),ge(`Set targetOrigin: %c${e}`,h),dt=e},resize(e,t){void 0!==e&&le(e,"number","parentIframe.resize(customHeight, customWidth) customHeight"),void 0!==t&&le(t,"number","parentIframe.resize(customHeight, customWidth) customWidth"),Rn(q,`parentIframe.resize(${e||""}${t?`,${t}`:""})`,e,t)},size(e,t){Te("size()","resize()"),this.resize(e,t)}}),ht.parentIFrame=ht.parentIframe)}let cn=new Set;function ln(){const e=document.querySelectorAll(`[${x}]`);ot=function(e){const t=new Set,n=new Set;for(const o of e)o.closest(`[${I}]`)?n.add(o):t.add(o);return n.size>0&&queueMicrotask(()=>{Se("overflowIgnored"),ye("Ignoring elements with [data-iframe-ignore] > *:\n",n),ze()}),t}(e),Le=ot.size>0,"function"==typeof Set.prototype.symmetricDifference&&(Be=ot.symmetricDifference(cn).size>0),cn=ot}function dn(){switch(ln(),!0){case!Be:return;case ot.size>1:ye("Overflowed Elements:",ot);break;case Le:break;default:ye("No overflow detected")}Rn(W,"Overflow updated")}function un(e){const t={root:document.documentElement,side:Pe?C:P};return f=St(dn,t),f.attachObservers(e),f}function fn(e){if(!Array.isArray(e)||0===e.length)return;const t=e[0].target;Rn(F,`Element resized <${function(e){switch(!0){case!ce(e):return"";case ce(e.id):return`${e.nodeName}#${e.id}`;case ce(e.name):return`${e.nodeName} (${e.name}`;case ce(e.className):return`${e.nodeName}.${e.className}`;default:return e.nodeName}}(t)}>`)}function mn(e){return Wt=new ResizeObserver(fn),Wt.observe(document.body),Bt.add(document.body),ye("Attached ResizeObserver to body"),m={attachObserverToNonStaticElements:Vt,detachObservers:Ge(Pt,Wt,Bt,Rt),disconnect:()=>{Wt.disconnect(),ye("Detached ResizeObserver")}},m.attachObserverToNonStaticElements(e),m}function pn(e){ge(`Visible: %c${e}`,h),Qe=!e,Rn(H,"Visibility changed")}const hn=e=>{const t=new Set;for(const n of e){t.add(n);for(const e of Sn(n))t.add(e)}return ye("Inspecting:\n",t),t},gn=e=>{if(0===e.size)return;Se("addObservers");const t=hn(e);f.attachObservers(t),m.attachObserverToNonStaticElements(t),ze()},yn=e=>{if(0===e.size)return;Se("removeObservers");const t=hn(e);f.detachObservers(t),m.detachObservers(t),ze()};function bn(e){!function({addedNodes:e,removedNodes:t}){Se("contentMutated"),Dt(),kt(),ln(),ze(),yn(t),gn(e)}(e),Rn(V,"Mutation Observed")}function vn(){const e=Sn(document.documentElement);var t;ge("Attaching Observers"),t=[gt(bn),un(e),Ct(),mn(e),Ht(pn)],s.push(...t.map(e=>e.disconnect))}function zn(e){performance.mark(Ot);const t=se(e);let n=1,o=document.documentElement,r=De?0:document.documentElement.getBoundingClientRect().bottom;const i=De?ct:Le?Array.from(ot):Sn(document.documentElement);for(const t of i)n=t.getBoundingClientRect()[e]+parseFloat(getComputedStyle(t).getPropertyValue(`margin-${e}`)),n>r&&(r=n,o=t);return ye(`${t} position calculated from:`,o),ye(`Checked %c${i.length}%c elements`,h,g),performance.mark(Mt,{detail:{hasTags:De,len:i.length,logging:Xe,Side:t}}),r}const wn=e=>[e.bodyOffset(),e.bodyScroll(),e.documentElementOffset(),e.documentElementScroll(),e.boundingClientRect()],$n=`* ${Array.from(J).map(e=>`:not(${e})`).join("")}`,Sn=e=>e.querySelectorAll($n),On={height:0,width:0},Mn={height:0,width:0},En=[h,g,h];function kn(e){function t(){return Mn[o]=r,On[o]=s,Math.max(r,1)}const n=e===xn,o=e.label,r=e.boundingClientRect(),i=Math.ceil(r),a=Math.floor(r),s=(e=>e.documentElementScroll()+Math.max(0,e.getOffset()))(e),c=`HTML: %c${r}px %cPage: %c${s}px`;let l=1;switch(!0){case!e.enabled():return Math.max(s,1);case De:ye("Found element with data-iframe-size attribute"),l=e.taggedElement();break;case!Le&&Re&&0===Mn[o]&&0===On[o]:ye(`Initial page size values: ${c}`,...En),l=t();break;case ft&&r===Mn[o]&&s===On[o]:ye(`Size unchanged: ${c}`,...En),l=Math.max(r,s);break;case 0===r&&0!==s:ye(`Page is hidden: ${c}`,...En),l=s;break;case!Le&&r!==Mn[o]&&s<=On[o]:ye(`New <html> size: ${c} `,...En),ye(`Previous <html> size: %c${Mn[o]}px`,h),l=t();break;case!n:l=e.taggedElement();break;case!Le&&r<Mn[o]:ye(`<html> size decreased: ${c}`,...En),l=t();break;case s===a||s===i:ye(`<html> size equals page size: ${c}`,...En),l=t();break;case r>s:ye(`Page size < <html> size: ${c}`,...En),l=t();break;case Le:ye("Found elements possibly overflowing <html> "),l=e.taggedElement();break;default:ye(`Using <html> size: ${c}`,...En),l=t()}return ye(`Content ${o}: %c${l}px`,h),l+=function(e){const t=e.getOffset();return 0!==t&&ye(`Page offsetSize: %c${t}px`,h),t}(e),Math.max(l,1)}const xn={label:T,enabled:()=>Pe,getOffset:()=>tt,auto:()=>kn(xn),bodyOffset:()=>{const{body:e}=document,t=getComputedStyle(e);return e.offsetHeight+parseInt(t.marginTop,E)+parseInt(t.marginBottom,E)},bodyScroll:()=>document.body.scrollHeight,offset:()=>xn.bodyOffset(),custom:()=>o.height(),documentElementOffset:()=>document.documentElement.offsetHeight,documentElementScroll:()=>document.documentElement.scrollHeight,boundingClientRect:()=>Math.max(document.documentElement.getBoundingClientRect().bottom,document.body.getBoundingClientRect().bottom),max:()=>Math.max(...wn(xn)),min:()=>Math.min(...wn(xn)),grow:()=>xn.max(),lowestElement:()=>zn(C),taggedElement:()=>zn(C)},In={label:j,enabled:()=>Ne,getOffset:()=>nt,auto:()=>kn(In),bodyScroll:()=>document.body.scrollWidth,bodyOffset:()=>document.body.offsetWidth,custom:()=>o.width(),documentElementScroll:()=>document.documentElement.scrollWidth,documentElementOffset:()=>document.documentElement.offsetWidth,boundingClientRect:()=>Math.max(document.documentElement.getBoundingClientRect().right,document.body.getBoundingClientRect().right),max:()=>Math.max(...wn(In)),min:()=>Math.min(...wn(In)),rightMostElement:()=>zn(P),scroll:()=>Math.max(In.bodyScroll(),In.documentElementScroll()),taggedElement:()=>zn(P)},Tn=(e,t)=>!(Math.abs(e-t)<=ut);function jn(e,t){const n=e[t](),o=e.enabled()&&void 0!==ee?function(e){const t=ee(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 ve(o>=1,`New iframe ${e.label} is too small: ${o}, must be at least 1`),o}let An=!1;const Cn=re(()=>xe(te(4)));let Pn,Nn=!1;const Rn=$e((e,t,n,o,r)=>{switch(Se(e),!0){case!0===Qe:if(!0===Nn)break;ge("Iframe hidden - Ignored resize request"),Nn=!0,An=!1,cancelAnimationFrame(Pn);break;case!0===An&&e!==W:ge("Resize already pending - Ignored resize request");break;case!fe&&!(e in B):ye("Resizing disabled");break;default:Nn=!1,An=!0,Q=performance.now(),p=!0,Pn=requestAnimationFrame(()=>{An=!1,Se("requestAnimationFrame"),be(`Reset sendPending: %c${e}`,h)}),function(e,t,n,o,r){const i=n??jn(xn,Ue),a=o??jn(In,pt),s=Pe&&Tn(We,i)||Ne&&Tn(mt,a)?R:e;switch(ge(`Resize event: %c${t}`,h),s){case z:case N:case R:We=i,mt=a;case D:Ln(We,mt,e,r);break;case W:case V:case F:case H:ge(U);break;default:ye(U)}p=!1}(e,t,n,o,r)}ze()});function qn(e){We=xn[Ue](),mt=In[pt](),Bn(We,mt,e)}function Ln(e,t,o,r,i){Ke<-1||(void 0!==i?ge(`Message targetOrigin: %c${i}`,h):i=dt,function(){const a=`${rt}:${e}:${t}:${o}${void 0===r?"":`:${r}`}`;if(at)try{window.parent.iframeParentListener(Z+a)}catch(e){if(1!==Ke)throw e;return void Cn()}else lt.postMessage(Z+a,i);p&&ge(function(){const e=ae(performance.now()-Q);return o===z?`Initialised iframe in %c${e}ms`:`Size calculated in %c${e}ms`}(),h),ye(`Sending message to parent page via ${at?"sameOrigin":"postMessage"}: %c%c${a}`,n,h)}())}const Bn=$e((e,t,n,o,r)=>{Se(n),Ln(e,t,n,o,r),ze()}),Dn=$e(function(e){Se("onMessage");const{freeze:t}=Object,{parse:n}=JSON,o=e=>t(n(e)),r=e=>Bn(0,0,`${e}Stop`),i={init:function(){if("loading"===document.readyState)return void ge("Page not ready, ignoring init message");const t=e.data.slice(13).split(":");lt=e.source,u=e.origin,wt(t),Re=!1,setTimeout(()=>{Je=!1},128)},reset(){Je?ge("Page reset ignored by init"):(ge("Page size reset by host page"),qn("resetPage"))},resize(){ge("Resize requested by host page"),Rn(L,"Parent window requested size check")},moveToAnchor(){_e.findTarget(s())},inPageLink(){this.moveToAnchor()},pageInfo(){const e=s();ge("PageInfo received from parent:",o(e)),vt?oe(vt,n(e)):r($)},parentInfo(){const e=o(s());ge("ParentInfo received from parent:",e),zt?oe(zt,e):r(S)},message(){const e=s();ge("onMessage called from parent:%c",h,o(e)),oe(yt,n(e))}},a=()=>e.data.split("]")[1].split(":")[0],s=()=>e.data.slice(e.data.indexOf(":")+1),c=()=>e.data.split(":")[2]in{true:1,false:1};function l(){const t=a();Se(t),t in i?i[t]():"iframeResize"in window||void 0!==window.jQuery&&""in window.jQuery.prototype||c()||Ee(`Unexpected message (${e.data})`)}Z===`${e.data}`.slice(0,13)&&function(){if(!1!==Re)return c()?(Oe(a()),Se(z),void i.init()):void ge(`Ignored message of type "${a()}". Received before initialization.`);l()}()});let Fn=!1;const Wn=e=>e.postMessage("[iFrameResizerChild]Ready",window?.iframeResizer?.targetOrigin||"*");function Vn(){if("loading"===document.readyState||!Re||Fn)return;const{parent:e,top:t}=window;Se("ready"),ge("Sending%c ready%c to parent from",h,g,window.location.href),Wn(e),e!==t&&Wn(t),Fn=!0}"iframeChildListener"in window?Ee("Already setup"):(window.iframeChildListener=e=>setTimeout(()=>Dn({data:e,sameOrigin:!0})),_(window,w,Dn),_(document,A,Vn),Vn())}()});
|
|
21
|
+
//# sourceMappingURL=index.umd.js.map
|
package/index.umd.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.umd.js","sources":["../../node_modules/auto-console-group/dist/index.js","../../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":["/*!\n * @module auto-console-group v1.2.11\n *\n * @description Automagically group console logs in the browser console.\n *\n * @author David J. Bradshaw <info@iframe-resizer.com>\n * @see {@link https://github.com/davidjbradshaw/auto-console-group#readme}\n * @license MIT\n *\n * @copyright (c) 2025, David J. Bradshaw. All rights reserved.\n */\n\nconst T = \"font-weight: normal;\", H = \"font-weight: bold;\", S = \"font-style: italic;\", U = T + S, N = \"color: #135CD2;\", k = \"color: #A9C7FB;\", j = \"color: #1F1F1F;\", Q = \"color: #E3E3E3;\", f = \"default\", _ = \"error\", C = \"log\", q = Object.freeze({\n assert: !0,\n error: !0,\n warn: !0\n}), L = {\n expand: !1,\n defaultEvent: void 0,\n event: void 0,\n label: \"AutoConsoleGroup\",\n showTime: !0\n}, P = {\n profile: 0,\n profileEnd: 0,\n timeStamp: 0,\n trace: 0\n}, V = (o) => {\n const t = o.event || o.defaultEvent;\n return t ? `${t}` : \"\";\n}, u = Object.assign(console);\nfunction W() {\n const o = /* @__PURE__ */ new Date(), t = (l, d) => o[l]().toString().padStart(d, \"0\"), r = t(\"getHours\", 2), c = t(\"getMinutes\", 2), s = t(\"getSeconds\", 2), i = t(\"getMilliseconds\", 3);\n return `@ ${r}:${c}:${s}.${i}`;\n}\nconst { fromEntries: b, keys: z } = Object, K = (o) => [\n o,\n u[o]\n], X = (o) => (t) => [\n t,\n function(r) {\n o[t] = r;\n }\n], h = (o, t) => b(z(o).map(t));\nfunction J(o = {}) {\n const t = {}, r = {}, c = [], s = {\n ...L,\n // @ts-expect-error: backwards compatibility\n expand: !o.collapsed || L.expanded,\n ...o\n };\n let i = \"\";\n function l() {\n c.length = 0, i = \"\";\n }\n function d() {\n delete s.event, l();\n }\n const v = () => c.some(([e]) => e in q), O = () => v() ? !0 : !!s.expand, A = () => s.showTime ? i : \"\";\n function g() {\n if (c.length === 0) {\n d();\n return;\n }\n u[O() ? \"group\" : \"groupCollapsed\"](\n `%c${s.label}%c ${V(s)} %c${A()}`,\n T,\n H,\n U\n );\n for (const [e, ...n] of c)\n u.assert(\n e in u,\n `Unknown console method: ${e}`\n ), e in u && u[e](...n);\n u.groupEnd(), d();\n }\n function p() {\n i === \"\" && (i = W());\n }\n function G(e) {\n p(), s.event = e;\n }\n function D() {\n p(), queueMicrotask(() => queueMicrotask(g));\n }\n function a(e, ...n) {\n c.length === 0 && D(), c.push([e, ...n]);\n }\n const M = (e) => (...n) => {\n let m;\n try {\n m = e(...n);\n } catch (E) {\n if (!Error.prototype.isPrototypeOf(E)) throw E;\n a(_, E), g();\n }\n return m;\n };\n function I(e, ...n) {\n e !== !0 && a(\"assert\", e, ...n);\n }\n function R(e = f) {\n r[e] ? r[e] += 1 : r[e] = 1, a(C, `${e}: ${r[e]}`);\n }\n function x(e = f) {\n delete r[e];\n }\n function y(e = f) {\n p(), t[e] = performance.now();\n }\n function w(e = f, ...n) {\n if (!t[e]) {\n a(\"timeLog\", e, ...n);\n return;\n }\n const m = performance.now() - t[e];\n a(C, `${e}: ${m} ms`, ...n);\n }\n function B(e = f) {\n w(e), delete t[e];\n }\n const F = (e) => [\n e,\n (...n) => a(e, ...n)\n ];\n return {\n ...h(s, X(s)),\n ...h(console, F),\n ...h(P, K),\n assert: I,\n count: R,\n countReset: x,\n endAutoGroup: g,\n errorBoundary: M,\n event: G,\n purge: l,\n time: y,\n timeEnd: B,\n timeLog: w,\n touch: p\n };\n}\nconst $ = typeof window > \"u\" || typeof window.matchMedia != \"function\" ? !1 : window.matchMedia(\"(prefers-color-scheme: dark)\").matches, Y = $ ? k : N, Z = $ ? Q : j;\nexport {\n H as BOLD,\n Z as FOREGROUND,\n Y as HIGHLIGHT,\n S as ITALIC,\n T as NORMAL,\n J as default\n};\n","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":["T","H","S","U","f","q","Object","freeze","assert","error","warn","L","expand","defaultEvent","event","label","showTime","P","profile","profileEnd","timeStamp","trace","u","assign","console","fromEntries","b","keys","z","K","o","X","t","r","h","map","$","window","matchMedia","matches","Y","Z","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","length","codePointAt","Math","imul","toString","replace","String","fromCodePoint","x","max","getModeData","setMode","split","v","isolateUserCode","val","setTimeout","once","fn","done","undefined","Reflect","apply","this","arguments","id","round","value","capitalizeFirstLetter","string","charAt","toUpperCase","slice","isDef","typeAssert","type","TypeError","enabled","createGroupConsole","mod","c","s","collapsed","expanded","i","d","O","some","e","g","V","n","groupEnd","Date","padStart","W","a","queueMicrotask","push","w","performance","now","count","countReset","endAutoGroup","errorBoundary","m","E","Error","prototype","isPrototypeOf","purge","time","timeEnd","timeLog","touch","__esModule","default","childConsole","setupConsoleMethod","method","args","log","info","debug","advise","msg","formatLogMsg","identity","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","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","delay","delayLimit","FOREGROUND","forEach","mutationObserved","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","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","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","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","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","preventDefault","bindAnchors","sendMouse","screenY","screenX","addMouseListener","parentIframe","consoleEvent","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","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":";;;;;;;;;;;;;;;;;;;0FAYA,MAAMA,EAAI,uBAAwBC,EAAI,qBAAsBC,EAAI,sBAAuBC,EAAIH,EAAIE,EAA+FE,EAAI,UAAmCC,EAAIC,OAAOC,OAAO,CACrPC,QAAQ,EACRC,OAAO,EACPC,MAAM,IACJC,EAAI,CACNC,QAAQ,EACRC,kBAAc,EACdC,WAAO,EACPC,MAAO,mBACPC,UAAU,GACTC,EAAI,CACLC,QAAS,EACTC,WAAY,EACZC,UAAW,EACXC,MAAO,GAINC,EAAIhB,OAAOiB,OAAOC,SAKrB,MAAQC,YAAaC,EAAGC,KAAMC,GAAMtB,OAAQuB,EAAKC,GAAM,CACrDA,EACAR,EAAEQ,IACDC,EAAKD,GAAOE,GAAM,CACnBA,EACA,SA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c,GAC5BzH,WAAW,IAAMkjB,GAAS,CAAEzb,OAAMwM,YAAY,KAEhDzV,EAAiBtC,OAAQS,EAASumB,IAClC1kB,EAAiBkI,SAAUpJ,EAAoBinB,IAE/CA,KAGJ,CAIEE","x_google_ignoreList":[0]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@iframe-resizer/child",
|
|
3
|
-
"version": "5.5.
|
|
3
|
+
"version": "5.5.5-beta.2",
|
|
4
4
|
"license": "GPL-3.0",
|
|
5
5
|
"homepage": "https://iframe-resizer.com",
|
|
6
6
|
"author": {
|
|
@@ -35,6 +35,6 @@
|
|
|
35
35
|
"child"
|
|
36
36
|
],
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"auto-console-group": "1.2.
|
|
38
|
+
"auto-console-group": "1.2.11"
|
|
39
39
|
}
|
|
40
40
|
}
|