iframe-resizer 5.4.7-beta.3 → 5.4.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.cjs.js +1 -1
- package/index.esm.js +1 -1
- package/js/iframeResizer.contentWindow.js +2 -3
- package/js/iframeResizer.contentWindow.min.js +2 -3
- package/js/iframeResizer.js +2 -3
- package/js/iframeResizer.min.js +2 -3
- package/package.json +4 -4
- package/js/iframeResizer.contentWindow.js.map +0 -1
- package/js/iframeResizer.contentWindow.min.js.map +0 -1
- package/js/iframeResizer.js.map +0 -1
- package/js/iframeResizer.min.js.map +0 -1
package/index.cjs.js
CHANGED
package/index.esm.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* @preserve
|
|
3
3
|
*
|
|
4
|
-
* @module iframe-resizer/legacy (child) 5.4.7
|
|
4
|
+
* @module iframe-resizer/legacy (child) 5.4.7 (iife)
|
|
5
5
|
*
|
|
6
6
|
* @license GPL-3.0 for non-commercial use only.
|
|
7
7
|
* For commercial use, you must purchase a license from
|
|
@@ -17,5 +17,4 @@
|
|
|
17
17
|
*/
|
|
18
18
|
|
|
19
19
|
|
|
20
|
-
!function(){"use strict";const e="font-weight: normal;",t="font-weight: bold;",n="font-style: italic;",o=e+n,r="default",i=Object.freeze({assert:!0,error:!0,warn:!0}),a={expand:!0,defaultEvent:void 0,event:void 0,label:"AutoConsoleGroup",showTime:!0},s={profile:0,profileEnd:0,timeStamp:0,trace:0},l=Object.assign(console);const{fromEntries:c,keys:d}=Object,u=e=>[e,l[e]],f=e=>t=>[t,function(n){e[t]=n}],m=(e,t)=>c(d(e).map(t));const p=!(typeof window>"u"||"function"!=typeof window.matchMedia)&&window.matchMedia("(prefers-color-scheme: dark)").matches,g=p?"color: #A9C7FB;":"color: #135CD2;",h=p?"color: #E3E3E3;":"color: #1F1F1F;",y="5.4.7-beta.3",v=10,b="data-iframe-size",z="data-iframe-overflowed",w="data-iframe-ignore",$="bottom",S="right",O="autoResizeEnabled",E=Symbol("sizeChanged"),M="manualResize",k="parentResize",j={[M]:1,[k]:1},I="setOffsetSize",T="resizeObserver",A="overflowObserver",P="mutationObserver",C="No change in content size detected",x="init",R=(e,t,n,o)=>e.addEventListener(t,n,o||!1),N=["<iy><yi>Puchspk Spjluzl Rlf</><iy><iy>","<iy><yi>Tpzzpun Spjluzl Rlf</><iy><iy>","Aopz spiyhyf pz hchpshisl dpao ivao Jvttlyjphs huk Vwlu-Zvbyjl spjluzlz.<iy><iy><i>Jvttlyjphs Spjluzl</><iy>Mvy jvttlyjphs bzl, <p>pmyhtl-ylzpgly</> ylxbpylz h svd jvza vul aptl spjluzl mll. Mvy tvyl pumvythapvu cpzpa <b>oaawz://pmyhtl-ylzpgly.jvt/wypjpun</>.<iy><iy><i>Vwlu Zvbyjl Spjluzl</><iy>Pm fvb hyl bzpun aopz spiyhyf pu h uvu-jvttlyjphs vwlu zvbyjl wyvqlja aolu fvb jhu bzl pa mvy myll bukly aol alytz vm aol NWS C3 Spjluzl. Av jvumpyt fvb hjjlwa aolzl alytz, wslhzl zla aol <i>spjluzl</> rlf pu <p>pmyhtl-ylzpgly</> vwapvuz av <i>NWSc3</>.<iy><iy>Mvy tvyl pumvythapvu wslhzl zll: <b>oaawz://pmyhtl-ylzpgly.jvt/nws</>","<i>NWSc3 Spjluzl Clyzpvu</><iy><iy>Aopz clyzpvu vm <p>pmyhtl-ylzpgly</> pz ilpun bzlk bukly aol alytz vm aol <i>NWS C3</> spjluzl. Aopz spjluzl hssvdz fvb av bzl <p>pmyhtl-ylzpgly</> pu Vwlu Zvbyjl wyvqljaz, iba pa ylxbpylz fvby wyvqlja av il wbispj, wyvcpkl haaypibapvu huk il spjluzlk bukly clyzpvu 3 vy shaly vm aol NUB Nlulyhs Wbispj Spjluzl.<iy><iy>Pm fvb hyl bzpun aopz spiyhyf pu h uvu-vwlu zvbyjl wyvqlja vy dlizpal, fvb dpss ullk av wbyjohzl h svd jvza vul aptl jvttlyjphs spjluzl.<iy><iy>Mvy tvyl pumvythapvu cpzpa <b>oaawz://pmyhtl-ylzpgly.jvt/wypjpun</>.","<iy><yi>Zvsv spjluzl kvlz uva zbwwvya jyvzz-kvthpu</><iy><iy>Av bzl <p>pmyhtl-ylzpgly</> dpao jyvzz kvthpu pmyhtlz fvb ullk lpaoly aol Wyvmlzzpvuhs vy Ibzpulzz spjluzlz. Mvy klahpsz vu bwnyhkl wypjpun wslhzl jvuahja pumv@pmyhtl-ylzpgly.jvt."];Object.fromEntries(["2cgs7fdf4xb","1c9ctcccr4z","1q2pc4eebgb","ueokt0969w","w2zxchhgqz","1umuxblj2e5"].map(((e,t)=>[e,Math.max(0,t-1)])));const q=e=>(e=>e.replace(/[A-Za-z]/g,(e=>String.fromCodePoint((e<="Z"?90:122)>=(e=e.codePointAt(0)+19)?e:e-26))))(N[e]),B=(e,...t)=>setTimeout((()=>e(...t)),0),L=e=>{let t=!1;return function(){return t?void 0:(t=!0,Reflect.apply(e,this,arguments))}},F=e=>e,W=e=>Math.round(1e3*e)/1e3,D=e=>e.charAt(0).toUpperCase()+e.slice(1),H=e=>""!=`${e}`&&void 0!==e;function U(e){switch(!0){case!H(e):return"";case H(e.id):return`${e.nodeName}#${e.id}`;case H(e.name):return`${e.nodeName} (${e.name}`;case H(e.className):return`${e.nodeName}.${e.className}`;default:return e.nodeName}}const V=(e,t,n)=>{if(typeof e!==t)throw new TypeError(`${n} is not a ${D(t)}`)};let Z=!0;const J=(_=function(n={}){const c={},d={},p=[],g={...a,expand:!n.collapsed||a.expanded,...n};let h="";function y(){p.length=0,h=""}function v(){delete g.event,y()}const b=()=>!!p.some((([e])=>e in i))||!!g.expand;function z(){if(0!==p.length){l[b()?"group":"groupCollapsed"](`%c${g.label}%c ${(e=>{const t=e.event||e.defaultEvent;return t?`${t}`:""})(g)} %c${g.showTime?h:""}`,e,t,o);for(const[e,...t]of p)l.assert(e in l,`Unknown console method: ${e}`),e in l&&l[e](...t);l.groupEnd(),v()}else v()}function w(){""===h&&(h=function(){const e=new Date,t=(t,n)=>e[t]().toString().padStart(n,"0");return`@ ${t("getHours",2)}:${t("getMinutes",2)}:${t("getSeconds",2)}.${t("getMilliseconds",3)}`}())}function $(e,...t){0===p.length&&(w(),queueMicrotask((()=>queueMicrotask(z)))),p.push([e,...t])}function S(e=r,...t){c[e]?$("log",`${e}: ${performance.now()-c[e]} ms`,...t):$("timeLog",e,...t)}return{...m(g,f(g)),...m(console,(e=>[e,(...t)=>$(e,...t)])),...m(s,u),assert:function(e,...t){e||$("assert",e,...t)},count:function(e=r){d[e]?d[e]+=1:d[e]=1,$("log",`${e}: ${d[e]}`)},countReset:function(e=r){delete d[e]},endAutoGroup:z,errorBoundary:e=>(...t)=>{let n;try{n=e(...t)}catch(e){if(!Error.prototype.isPrototypeOf(e))throw e;$("error",e)}return n},event:function(e){w(),g.event=e},purge:y,time:function(e=r){w(),c[e]=performance.now()},timeEnd:function(e=r){S(e),delete c[e]},timeLog:S,touch:w}},_?.__esModule?_.default:_);var _;const Q=J({label:"iframeResizer(child)"});const G=(X="log",(...e)=>!Z||Q[X](...e));var X;const Y=G,{assert:K,debug:ee,endAutoGroup:te,error:ne,errorBoundary:oe,event:re,label:ie,purge:ae,warn:se}=Q,le=e=>{return Q.warn((t=F,e=>window.chrome?t(e.replaceAll("<br>","\n").replaceAll("<rb>","[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},ce=le,de=(e=>(t,n="renamed to")=>(o,r,i="",a="")=>e(a,`<rb>Deprecated ${t}(${o.replace("()","")})</>\n\nThe <b>${o}</> ${t.toLowerCase()} has been ${n} <b>${r}</>. ${i}Use of the old ${t.toLowerCase()} will be removed in a future version of <i>iframe-resizer</>.`))(((e,t)=>le(t))),ue=de("Method"),fe=de("Method","replaced with"),me=de("Option"),pe=e=>t=>void 0===t?void 0:e(t),ge=pe((e=>"true"===e)),he=pe(Number),ye="--ifr-start",ve="--ifr-end",be=[],ze=new WeakSet,we=e=>"object"==typeof e&&ze.add(e);let $e={},Se=0;const Oe=setInterval((()=>{if(be.length<10)return;if($e.hasTags&&$e.len<25)return;be.sort();const e=Math.min(be.reduce(((e,t)=>e+t),0)/be.length,be[Math.floor(be.length/2)]),t=W(e);t>Se&&(Se=t,re("performanceObserver"),G("Mean time:",W(be[Math.floor(be.length/2)])),G("Median time:",W(be.reduce(((e,t)=>e+t),0)/be.length)),G("Average time:",t),G("Max time:",W(Math.max(...be)))),e<=4||(clearInterval(Oe),le(`<rb>Performance Warning</>\n\nCalculating the page size is taking an excessive amount of time (${W(e)}ms).\n\nTo improve performance add the <b>data-iframe-size</> attribute to the ${$e.Side.toLowerCase()} most element on the page. For more details see: <u>https://iframe-resizer.com/perf</>.`))}),5e3);function Ee(e){e.getEntries().forEach((e=>{if(e.name===ve){const{duration:t}=performance.measure("--ifr-measure",ye,ve);$e=e.detail,be.push(t),be.length>100&&be.shift()}}))}function Me(){new PerformanceObserver(Ee).observe({entryTypes:["mark"]}),we(document.documentElement),we(document.body)}"undefined"!=typeof document&&"undefined"!=typeof PerformanceObserver&&("loading"===document.readyState?document.addEventListener("DOMContentLoaded",Me):Me());const ke=e=>(t,n)=>{if(n in t){if(typeof t[n]===e)return t[n];throw new TypeError(`${n} is not a ${e}.`)}},je=ke("function"),Ie=ke("number"),Te=ke("string");"undefined"!=typeof window&&function(){const o={height:()=>(se("Custom height calculation function not defined"),Et.auto()),width:()=>(se("Custom width calculation function not defined"),Mt.auto())},r={bodyOffset:1,bodyScroll:1,offset:1,documentElementOffset:1,documentElementScroll:1,boundingClientRect:1,max:1,min:1,grow:1,lowestElement:1},i={},a="auto",s="[iFrameSizer]",l="scroll";let c,d,u,f,m,p,N,H=!0,J="",_=0,X="",ne="",ae=!0,de=!1,pe=!0,be=!1,ze=!1,we=!1,$e=1,Se=a,Oe="",Ee=!0,Me={},ke=!0,Ae=!1,Pe="",Ce=0,xe=!1,Re="",Ne=F,qe=[],Be="child",Le=null,Fe=!1,We="",De=[],He=window.parent,Ue="*",Ve=0,Ze=!1,Je=1,_e=l,Qe=window,Ge=()=>{se("onMessage function not defined")},Xe=()=>{},Ye=null,Ke=null;function et(e){var t,n,r;!function(e){Re=e[0]??Re,_=he(e[1])??_,de=ge(e[2])??de,Ae=ge(e[3])??Ae,H=ge(e[6])??H,X=e[7]??X,Se=e[8]??Se,J=e[9]??J,ne=e[10]??ne,Ve=he(e[11])??Ve,Me.enable=ge(e[12])??!1,Be=e[13]??Be,_e=e[14]??_e,xe=ge(e[15])??xe,c=he(e[16])??c,d=he(e[17])??d,ae=ge(e[18])??ae,Pe=e[19]??Pe,p=e[20]??p,Ce=he(e[21])??Ce,ke=ge(e[23])??ke}(e),t={id:Re,enabled:Ae,expand:ke},Q.label(`${t.id}`),Q.expand(t.expand),Z=t.enabled,G(`Initialising iframe v${y} ${window.location.href}`),function(){function e(e){G("Reading data from page:",e),N=je(e,"onBeforeResize")??N,Ge=je(e,"onMessage")??Ge,Xe=je(e,"onReady")??Xe,"number"==typeof e?.offset&&(me("offset","offsetSize"),ae&&(c=Ie(e,"offset")??c),de&&(d=Ie(e,"offset")??d)),"number"==typeof e?.offsetSize&&(ae&&(c=Ie(e,"offsetSize")??c),de&&(d=Ie(e,"offsetSize")??d)),Oe=Te(e,"ignoreSelector")??Oe,We=Te(e,"sizeSelector")??We,Ue=Te(e,"targetOrigin")??Ue,Se=e?.heightCalculationMethod||Se,_e=e?.widthCalculationMethod||_e}function t(e,t){return"function"==typeof e&&(le(`<rb>Deprecated Option(${t}CalculationMethod)</>\n\nThe use of <b>${t}CalculationMethod</> as a function is deprecated and will be removed in a future version of <i>iframe-resizer</>. Please use the new <b>onBeforeResize</> event handler instead.\n\nSee <u>https://iframe-resizer.com/api/child</> for more details.`),o[t]=e,e="custom"),e}if(1===Ce)return;const n=window.iframeResizer||window.iFrameResizer;"object"==typeof n&&(e(n),Se=t(Se,"height"),_e=t(_e,"width"),Y(`Set targetOrigin for parent: %c${Ue}`,g))}(),dt(),function(){try{Fe=1===Ce||"iframeParentListener"in window.parent}catch(e){G("Cross domain iframe detected")}}(),Ce<0?ce(`${q(Ce+2)}${q(2)}`):p?.codePointAt(0)>4||Ce<2&&ce(q(3)),p&&""!==p&&"false"!==p?p!==y&&le(`<b>Version mismatch</>\n\nThe parent and child pages are running different versions of <i>iframe resizer</>.\n\nParent page: ${p} - Child page: ${y}.\n`):le("<rb>Legacy version detected on parent page</>\n\nDetected legacy version of parent page script. It is recommended to update the parent page to use <b>@iframe-resizer/parent</>.\n\nSee <u>https://iframe-resizer.com/setup/</> for more details.\n"),mt(),pt(),function(){let e=!1;const t=t=>document.querySelectorAll(`[${t}]`).forEach((n=>{e=!0,n.removeAttribute(t),n.toggleAttribute(b,!0)}));t("data-iframe-height"),t("data-iframe-width"),e&&le("<rb>Deprecated Attributes</>\n \nThe <b>data-iframe-height</> and <b>data-iframe-width</> attributes have been deprecated and replaced with the single <b>data-iframe-size</> attribute. Use of the old attributes will be removed in a future version of <i>iframe-resizer</>.")}(),"BackCompat"===document.compatMode&&le("<rb>Quirks Mode Detected</>\n\nThis iframe is running in the browser's legacy <b>Quirks Mode</>, this may cause issues with the correct operation of <i>iframe-resizer</>. It is recommended that you switch to the modern <b>Standards Mode</>.\n\nFor more information see <u>https://iframe-resizer.com/quirks-mode</>.\n"),rt(),1!==Ce&&(Qe.parentIframe=Object.freeze({autoResize:e=>(V(e,"boolean","parentIframe.autoResize(enable) enable"),!1===de&&!1===ae?(re(O),le("Auto Resize can not be changed when <b>direction</> is set to 'none'."),!1):(!0===e&&!1===H?(H=!0,queueMicrotask((()=>At(O,"Auto Resize enabled")))):!1===e&&!0===H&&(H=!1),Ct(0,0,"autoResize",JSON.stringify(H)),H)),close(){Ct(0,0,"close")},getId:()=>Re,getOrigin:()=>(ue("getOrigin()","getParentOrigin()"),u),getParentOrigin:()=>u,getPageInfo(e){if("function"==typeof e)return Ye=e,Ct(0,0,"pageInfo"),void fe("getPageInfo()","getParentProps()","See <u>https://iframe-resizer.com/upgrade</> for details. ");Ye=null,Ct(0,0,"pageInfoStop")},getParentProps:e=>(V(e,"function","parentIframe.getParentProps(callback) callback"),Ke=e,Ct(0,0,"parentInfo"),()=>{Ke=null,Ct(0,0,"parentInfoStop")}),getParentProperties(e){ue("getParentProperties()","getParentProps()"),this.getParentProps(e)},moveToAnchor(e){V(e,"string","parentIframe.moveToAnchor(anchor) anchor"),Me.findTarget(e)},reset(){!function(){const e=Se;Se=a,G("Reset trigger event: %cparentIframe.reset",g),Ze?G("TriggerLock blocked calculation"):(Ze=!0,ee("Trigger event lock on"),requestAnimationFrame((()=>{Ze=!1,ee("Trigger event lock off")}))),Pt("reset"),Se=e}()},setOffsetSize(e){V(e,"number","parentIframe.setOffsetSize(offset) offset"),c=e,d=e,At(I,`parentIframe.setOffsetSize(${e})`)},scrollBy(e,t){V(e,"number","parentIframe.scrollBy(x, y) x"),V(t,"number","parentIframe.scrollBy(x, y) y"),Ct(t,e,"scrollBy")},scrollTo(e,t){V(e,"number","parentIframe.scrollTo(x, y) x"),V(t,"number","parentIframe.scrollTo(x, y) y"),Ct(t,e,"scrollTo")},scrollToOffset(e,t){V(e,"number","parentIframe.scrollToOffset(x, y) x"),V(t,"number","parentIframe.scrollToOffset(x, y) y"),Ct(t,e,"scrollToOffset")},sendMessage(e,t){t&&V(t,"string","parentIframe.sendMessage(msg, targetOrigin) targetOrigin"),Ct(0,0,"message",JSON.stringify(e),t)},setHeightCalculationMethod(e){Se=e,mt()},setWidthCalculationMethod(e){_e=e,pt()},setTargetOrigin(e){V(e,"string","parentIframe.setTargetOrigin(targetOrigin) targetOrigin"),G(`Set targetOrigin: %c${e}`,g),Ue=e},resize(e,t){e&&V(e,"number","parentIframe.resize(customHeight, customWidth) customHeight"),t&&V(t,"number","parentIframe.resize(customHeight, customWidth) customWidth"),At(M,`parentIframe.resize(${e||""}${t?`,${t}`:""})`,e,t)},size(e,t){ue("size()","resize()"),this.resize(e,t)}}),Qe.parentIFrame=Qe.parentIframe),function(){function e(e){Ct(0,0,e.type,`${e.screenY}:${e.screenX}`)}function t(t,n){G(`Add event listener: %c${n}`,g),R(window.document,t,e)}!0===xe&&(t("mouseenter","Mouse Enter"),t("mouseleave","Mouse Leave"))}(),Me=function(){const e=()=>({x:document.documentElement.scrollLeft,y:document.documentElement.scrollTop});function t(t){const n=t.getBoundingClientRect(),o=e();return{x:parseInt(n.left,v)+parseInt(o.x,v),y:parseInt(n.top,v)+parseInt(o.y,v)}}function n(e){function n(e){const n=t(e);G(`Moving to in page link (%c#${o}%c) at x: %c${n.x}%c y: %c${n.y}`,g,h,g,h,g),Ct(n.y,n.x,"scrollToOffset")}const o=e.split("#")[1]||e,r=decodeURIComponent(o),i=document.getElementById(r)||document.getElementsByName(r)[0];void 0===i?(G(`In page link (#${o}) not found in iFrame, so sending to parent`),Ct(0,0,"inPageLink",`#${o}`)):n(i)}function o(){const{hash:e,href:t}=window.location;""!==e&&"#"!==e&&n(t)}function r(){for(const e of document.querySelectorAll('a[href^="#"]'))"#"!==e.getAttribute("href")&&R(e,"click",(t=>{t.preventDefault(),n(e.getAttribute("href"))}))}function i(){R(window,"hashchange",o)}function a(){setTimeout(o,128)}function s(){G("Setting up location.hash handlers"),r(),i(),a()}return Me.enable?1===Ce?le("In page linking requires a Professional or Business license. Please see <u>https://iframe-resizer.com/pricing</> for more details."):s():G("In page linking not enabled"),{findTarget:n}}(),void 0===X&&(X=`${_}px`),lt("margin",(n="margin",(r=X).includes("-")&&(se(`Negative CSS value ignored for ${n}`),r=""),r)),lt("background",J),lt("padding",ne),function(){const e=document.createElement("div");e.style.clear="both",e.style.display="block",e.style.height="0",document.body.append(e)}(),function(){const e=e=>e.style.setProperty("height","auto","important");e(document.documentElement),e(document.body),G("Set HTML & body height: %cauto !important",g)}(),!0!==H&&G("Auto Resize disabled"),function(e){ut({method:e,eventType:"After Print",eventName:"afterprint"}),ut({method:e,eventType:"Before Print",eventName:"beforeprint"}),ut({method:e,eventType:"Ready State Change",eventName:"readystatechange"})}("add"),function(){const e=new Set,t=[];let n=!1,o=0;const r=t=>{Y("Mutations observed:",t);for(const n of t){const{addedNodes:t,removedNodes:o}=n;for(const n of t)e.add(n);for(const t of o)e.delete(t)}},i=16,a=2,s=200;let l=1;function c(e){dt(),it(e),e.forEach(yt),e.clear()}function d(){const u=performance.now(),f=u-o,m=i*l+++a;if(f>m&&f<s)return Y("Backed off due to heavy workload on callStack"),G(`Delay: %c${W(f)}ms %c> Delay limit: %c${m}ms`,g,h,g),setTimeout(d,i*l),void(o=u);l=1,t.forEach(r),t.length=0,e.size>0&&c(e),rt(),nt(),n=!1,At(P,"Mutation Observed")}function u(e){t.push(e),n||(o=performance.now(),n=!0,requestAnimationFrame(d))}function f(){const e=new window.MutationObserver(u),t=document.querySelector("body"),n={attributes:!0,attributeFilter:[w,b],attributeOldValue:!1,characterData:!1,characterDataOldValue:!1,childList:!0,subtree:!0};return G("Setup <body> MutationObserver"),e.observe(t,n),e}f()}(),G("Setup ResizeObserver"),Le=new ResizeObserver(gt),Le.observe(document.body),ht.add(document.body),yt(document.body),ae!==de&&(G("Setup OverflowObserver"),Ne=(e=>{const t=e.side||$,n=e.onChange||F,o={root:e.root,rootMargin:"0px",threshold:1},r=window?.requestAnimationFrame||F,i=(e=!1)=>n(e),a=(e,n)=>0===e||e>n[t],s=(e,t)=>e.toggleAttribute(z,t),l=new IntersectionObserver((function(e){for(const o of e){const{boundingClientRect:e,rootBounds:r,target:i}=o,l=e[t],c=a(l,r)&&!((n=i).hidden||null===n.offsetParent||"none"===n.style.display);s(i,c)}var n;r(i)}),o),c=new WeakSet;return function(e){G("Attached overflowObservers");for(const t of e){const e=t.nodeType===Node.ELEMENT_NODE,n=c.has(t);!n&&e?(l.observe(t),c.add(t)):K(!n,"Node already observed",t)}}})({onChange:ot,root:document.documentElement,side:ae?$:S})),it(zt(document)()),tt(L(Xe)),G("Initialization complete"),At(x,"Init message from host page",void 0,void 0,y),document.title&&""!==document.title&&Ct(0,0,"title",document.title)}function tt(e){"complete"===document.readyState?B(e):R(document,"readystatechange",(()=>tt(e)))}function nt(){const e=document.querySelectorAll(`[${z}]`);qe=Array.from(e).filter((e=>!e.closest(`[${w}]`))),ze=qe.length>0}function ot(e){nt(),(ze||e)&&(ze?Y("Overflowed Elements:",...qe):Y("Overflow removed"),At(A,"Overflow updated"))}function rt(){De=document.querySelectorAll(`[${b}]`),we=De.length>0,G(`Tagged elements found: %c${we}`,g)}function it(e){we||Ne(e)}let at=0;function st(){const n=document.querySelectorAll(`*[${w}]`);be=n.length>0,be&&n.length!==at&&(function(n){const o=1===n.length?"":"s";se(`%c[${w}]%c found on %c${n.length}%c element${o}`,t,e,t,e)}(n),at=n.length)}function lt(e,t){void 0!==t&&""!==t&&"null"!==t&&(document.body.style.setProperty(e,t),Y(`Set body ${e}: %c${t}`,g))}function ct(e,t,n){if(""!==n){G(`${e}: %c${n}`,g);for(const e of document.querySelectorAll(n))G(`Applying ${t} to:`,e),e.toggleAttribute(t,!0)}}function dt(){ct("sizeSelector",b,We),ct("ignoreSelector",w,Oe)}function ut(e){({add(t){function n(){At(e.eventName,e.eventType)}i[t]=n,R(window,t,n,{passive:!0})},remove(e){const t=i[e];var n,o;delete i[e],n=e,o=t,window.removeEventListener(n,o,!1)}})[e.method](e.eventName),G(`${D(e.method)} event listener: %c${e.eventType}`,g)}function ft(e,t,n,o){return t!==e&&(e in n||(se(`${e} is not a valid option for ${o}CalculationMethod.`),e=t),e in r)&&le(`<rb>Deprecated ${o}CalculationMethod (${e})</>\n\nThis version of <i>iframe-resizer</> can auto detect the most suitable ${o} calculation method. It is recommended that you ${p?"remove this option.":"set this option to <b>'auto'</> when using an older version of <i>iframe-resizer</> on the parent page."}`),G(`Set ${o} calculation method: %c${e}`,g),e}function mt(){Se=ft(Se,a,Et,"height")}function pt(){_e=ft(_e,l,Mt,"width")}function gt(e){if(!Array.isArray(e)||0===e.length)return;const t=e[0].target;At(T,`Element resized <${U(t)}>`)}const ht=new WeakSet;function yt(e){if(e.nodeType!==Node.ELEMENT_NODE)return;if(!ht.has(e)){const t=getComputedStyle(e)?.position;""!==t&&"static"!==t&&(Le.observe(e),ht.add(e),G(`Attached resizeObserver: %c${U(e)}`,g))}const t=zt(e)();for(const e of t){if(ht.has(e)||e?.nodeType!==Node.ELEMENT_NODE)continue;const t=getComputedStyle(e)?.position;""!==t&&"static"!==t&&(Le.observe(e),ht.add(e),G(`Attached resizeObserver: %c${U(e)}`,g))}}function vt(e){performance.mark(ye);const t=D(e);let n=0,o=document.documentElement,r=we?0:document.documentElement.getBoundingClientRect().bottom;const i=we?De:ze?qe:zt(document)();for(const t of i)n=t.getBoundingClientRect()[e]+parseFloat(getComputedStyle(t).getPropertyValue(`margin-${e}`)),n>r&&(r=n,o=t);return Y(`${t} position calculated from:`,o),performance.mark(ve,{detail:{hasTags:we,len:i.length,logging:Ae,Side:t}}),r}const bt=e=>[e.bodyOffset(),e.bodyScroll(),e.documentElementOffset(),e.documentElementScroll(),e.boundingClientRect()],zt=e=>()=>{st();const t=["* ","not(head)","not(meta)","not(base)","not(title)","not(script)","not(link)","not(style)","not(map)","not(area)","not(option)","not(optgroup)","not(template)","not(track)","not(wbr)","not(nobr)"];return be&&t.push(`not([${w}])`,`not([${w}] *)`),e.querySelectorAll(t.join(":"))},wt={height:0,width:0},$t={height:0,width:0},St=[g,h,g];function Ot(e){function t(){return $t[o]=r,wt[o]=s,r}const n=e===Et,o=n?"height":"width",r=e.boundingClientRect(),i=Math.ceil(r),a=Math.floor(r),s=(e=>e.documentElementScroll()+Math.max(0,e.getOffset()))(e),l=`HTML: %c${r}px %cPage: %c${s}px`;let c=0;switch(!0){case!e.enabled():return s;case we:Y("Found element with data-iframe-size attribute"),c=e.taggedElement();break;case!ze&&0===$t[o]&&0===wt[o]:Y(`Initial page size values: ${l}`,...St),c=t();break;case Ze&&r===$t[o]&&s===wt[o]:Y(`Size unchanged: ${l}`,...St),c=Math.max(r,s);break;case 0===r:Y(`Page is hidden: ${l}`,...St),c=s;break;case!ze&&r!==$t[o]&&s<=wt[o]:Y(`New <html> size: ${l} `,...St),Y(`Previous <html> size: %c${$t[o]}px`,g),c=t();break;case!n:c=e.taggedElement();break;case!ze&&r<$t[o]:Y(`<html> size decreased: ${l}`,...St),c=t();break;case s===a||s===i:Y(`<html> size equals page size: ${l}`,...St),c=t();break;case r>s:Y(`Page size < <html> size: ${l}`,...St),c=t();break;case ze:Y("Found element overflowing <html> "),c=e.taggedElement();break;default:Y(`Using <html> size: ${l}`,...St),c=t()}return Y(`Content ${o}: %c${c}px`,g),c+=function(e){const t=e.getOffset();return 0!==t&&Y(`Page offsetSize: %c${t}px`,g),t}(e),c}const Et={enabled:()=>ae,getOffset:()=>c,auto:()=>Ot(Et),bodyOffset:()=>{const{body:e}=document,t=getComputedStyle(e);return e.offsetHeight+parseInt(t.marginTop,v)+parseInt(t.marginBottom,v)},bodyScroll:()=>document.body.scrollHeight,offset:()=>Et.bodyOffset(),custom:()=>o.height(),documentElementOffset:()=>document.documentElement.offsetHeight,documentElementScroll:()=>document.documentElement.scrollHeight,boundingClientRect:()=>Math.max(document.documentElement.getBoundingClientRect().bottom,document.body.getBoundingClientRect().bottom),max:()=>Math.max(...bt(Et)),min:()=>Math.min(...bt(Et)),grow:()=>Et.max(),lowestElement:()=>vt($),taggedElement:()=>vt($)},Mt={enabled:()=>de,getOffset:()=>d,auto:()=>Ot(Mt),bodyScroll:()=>document.body.scrollWidth,bodyOffset:()=>document.body.offsetWidth,custom:()=>o.width(),documentElementScroll:()=>document.documentElement.scrollWidth,documentElementOffset:()=>document.documentElement.offsetWidth,boundingClientRect:()=>Math.max(document.documentElement.getBoundingClientRect().right,document.body.getBoundingClientRect().right),max:()=>Math.max(...bt(Mt)),min:()=>Math.min(...bt(Mt)),rightMostElement:()=>vt(S),scroll:()=>Math.max(Mt.bodyScroll(),Mt.documentElementScroll()),taggedElement:()=>vt(S)},kt=(e,t)=>!(Math.abs(e-t)<=Ve);function jt(e,t){const n=e[t]();return e.enabled()&&void 0!==N?function(e){const t=N(e);if(void 0===t)throw new TypeError("No value returned from onBeforeResize(), expected a numeric value");if(Number.isNaN(t))throw new TypeError(`Invalid value returned from onBeforeResize(): ${t}, expected Number`);return t}(n):n}let It=!1;const Tt=L((()=>ce(q(4)))),At=oe(((e,t,n,o,r)=>{if(m=performance.now(),f=!0,re(e),!0!==It)return H||e in j?void(document.hidden?G("Page hidden - Ignored resize request"):(It=!0,requestAnimationFrame((()=>{It=!1})),function(e,t,n,o,r){const i=n??jt(Et,Se),a=o??jt(Mt,_e),s=ae&&kt($e,i)||de&&kt(Je,a)?E:e;switch(G(`Resize event: %c${t}`,g),s){case x:case O:case E:$e=i,Je=a;case I:Ct($e,Je,e,r);break;case T:case A:case P:G(C);break;default:Y(C)}f=!1}(e,t,n,o,r))):(Y("Resizing disabled"),void te())}));function Pt(e){$e=Et[Se](),Je=Mt[_e](),Ct($e,Je,e)}const Ct=oe((function(e,t,o,r,i){Ce<-1||(re(o),void 0!==i?G(`Message targetOrigin: %c${i}`,g):i=Ue,function(){const a=`${Re}:${e}:${t}:${o}${void 0===r?"":`:${r}`}`;if(Fe)try{window.parent.iframeParentListener(s+a)}catch(e){if(1!==Ce)throw e;return void Tt()}else He.postMessage(s+a,i);f&&G(function(){const e=W(performance.now()-m);return o===x?`Initialised iFrame in %c${e}ms`:`Size calculated in %c${e}ms`}(),g),Y(`Sending message to parent page via ${Fe?"sameOrigin":"postMessage"}: %c%c${a}`,n,g)}(),te())})),xt=oe((function(e){re("onMessage");const{freeze:t}=Object,{parse:n}=JSON,o=e=>t(n(e)),r=e=>Ct(0,0,`${e}Stop`),i={init:function(){if("loading"===document.readyState)return void G("Page not ready, ignoring init message");const t=e.data.slice(13).split(":");He=e.source,u=e.origin,et(t),pe=!1,setTimeout((()=>{Ee=!1}),128)},reset(){Ee?G("Page reset ignored by init"):(G("Page size reset by host page"),Pt("resetPage"))},resize(){G("Resize requested by host page"),At(k,"Parent window requested size check")},moveToAnchor(){Me.findTarget(l())},inPageLink(){this.moveToAnchor()},pageInfo(){const e=l();G("PageInfo received from parent:",o(e)),Ye?B(Ye,n(e)):r("pageInfo")},parentInfo(){const e=o(l());G("ParentInfo received from parent:",e),Ke?B(Ke,e):r("parentInfo")},message(){const e=l();G("onMessage called from parent:%c",g,o(e)),B(Ge,n(e))}},a=()=>e.data.split("]")[1].split(":")[0],l=()=>e.data.slice(e.data.indexOf(":")+1),c=()=>e.data.split(":")[2]in{true:1,false:1};function d(){const t=a();re(t),t in i?i[t]():"iframeResize"in window||void 0!==window.jQuery&&""in window.jQuery.prototype||c()||se(`Unexpected message (${e.data})`)}s===`${e.data}`.slice(0,13)&&function(){if(!1!==pe)return c()?(ie(a()),re(x),void i.init()):void G(`Ignored message of type "${a()}". Received before initialization.`);d()}()}));function Rt(){"loading"!==document.readyState&&window.parent.postMessage("[iFrameResizerChild]Ready","*")}"iframeChildListener"in window?se("Already setup"):(window.iframeChildListener=e=>setTimeout((()=>xt({data:e,sameOrigin:!0}))),R(window,"message",xt),R(window,"readystatechange",Rt),Rt())}()}();
|
|
21
|
-
//# sourceMappingURL=iframeResizer.contentWindow.js.map
|
|
20
|
+
!function(){"use strict";const e="font-weight: normal;",t="font-weight: bold;",n="font-style: italic;",o=e+n,r="default",i=Object.freeze({assert:!0,error:!0,warn:!0}),a={expand:!0,defaultEvent:void 0,event:void 0,label:"AutoConsoleGroup",showTime:!0},s={profile:0,profileEnd:0,timeStamp:0,trace:0},l=Object.assign(console);const{fromEntries:c,keys:u}=Object,d=e=>[e,l[e]],f=e=>t=>[t,function(n){e[t]=n}],m=(e,t)=>c(u(e).map(t));const p=!(typeof window>"u"||"function"!=typeof window.matchMedia)&&window.matchMedia("(prefers-color-scheme: dark)").matches,h=p?"color: #A9C7FB;":"color: #135CD2;",g=p?"color: #E3E3E3;":"color: #1F1F1F;",y="5.4.7",b=10,v="data-iframe-size",z="data-iframe-overflowed",w="data-iframe-ignore",$="bottom",S="right",E="autoResizeEnabled",O=Symbol("sizeChanged"),j="manualResize",k="parentResize",M={[j]:1,[k]:1},T="setOffsetSize",C="resizeObserver",x="overflowObserver",A="mutationObserver",I="none",P="init",N=(e,t,n,o)=>e.addEventListener(t,n,o||!1),R=["<iy><yi>Puchspk Spjluzl Rlf</><iy><iy>","<iy><yi>Tpzzpun Spjluzl Rlf</><iy><iy>","Aopz spiyhyf pz hchpshisl dpao ivao Jvttlyjphs huk Vwlu-Zvbyjl spjluzlz.<iy><iy><i>Jvttlyjphs Spjluzl</><iy>Mvy jvttlyjphs bzl, <p>pmyhtl-ylzpgly</> ylxbpylz h svd jvza vul aptl spjluzl mll. Mvy tvyl pumvythapvu cpzpa <b>oaawz://pmyhtl-ylzpgly.jvt/wypjpun</>.<iy><iy><i>Vwlu Zvbyjl Spjluzl</><iy>Pm fvb hyl bzpun aopz spiyhyf pu h uvu-jvttlyjphs vwlu zvbyjl wyvqlja aolu fvb jhu bzl pa mvy myll bukly aol alytz vm aol NWS C3 Spjluzl. Av jvumpyt fvb hjjlwa aolzl alytz, wslhzl zla aol <i>spjluzl</> rlf pu <p>pmyhtl-ylzpgly</> vwapvuz av <i>NWSc3</>.<iy><iy>Mvy tvyl pumvythapvu wslhzl zll: <b>oaawz://pmyhtl-ylzpgly.jvt/nws</>","<i>NWSc3 Spjluzl Clyzpvu</><iy><iy>Aopz clyzpvu vm <p>pmyhtl-ylzpgly</> pz ilpun bzlk bukly aol alytz vm aol <i>NWS C3</> spjluzl. Aopz spjluzl hssvdz fvb av bzl <p>pmyhtl-ylzpgly</> pu Vwlu Zvbyjl wyvqljaz, iba pa ylxbpylz fvby wyvqlja av il wbispj, wyvcpkl haaypibapvu huk il spjluzlk bukly clyzpvu 3 vy shaly vm aol NUB Nlulyhs Wbispj Spjluzl.<iy><iy>Pm fvb hyl bzpun aopz spiyhyf pu h uvu-vwlu zvbyjl wyvqlja vy dlizpal, fvb dpss ullk av wbyjohzl h svd jvza vul aptl jvttlyjphs spjluzl.<iy><iy>Mvy tvyl pumvythapvu cpzpa <b>oaawz://pmyhtl-ylzpgly.jvt/wypjpun</>.","<iy><yi>Zvsv spjluzl kvlz uva zbwwvya jyvzz-kvthpu</><iy><iy>Av bzl <p>pmyhtl-ylzpgly</> dpao jyvzz kvthpu pmyhtlz fvb ullk lpaoly aol Wyvmlzzpvuhs vy Ibzpulzz spjluzlz. Mvy klahpsz vu bwnyhkl wypjpun wslhzl jvuahja pumv@pmyhtl-ylzpgly.jvt."];Object.fromEntries(["2cgs7fdf4xb","1c9ctcccr4z","1q2pc4eebgb","ueokt0969w","w2zxchhgqz","1umuxblj2e5"].map(((e,t)=>[e,Math.max(0,t-1)])));const B=e=>(e=>e.replace(/[A-Za-z]/g,(e=>String.fromCodePoint((e<="Z"?90:122)>=(e=e.codePointAt(0)+19)?e:e-26))))(R[e]),q=(e,...t)=>setTimeout((()=>e(...t)),0),L=e=>{let t=!1;return function(){return t?void 0:(t=!0,Reflect.apply(e,this,arguments))}},F=e=>e,W=e=>Math.round(1e3*e)/1e3,D=e=>e.charAt(0).toUpperCase()+e.slice(1),H=e=>""!=`${e}`&&void 0!==e;const U=(e,t,n)=>{if(typeof e!==t)throw new TypeError(`${n} is not a ${D(t)}`)};let V=!0;const Z=(J=function(n={}){const c={},u={},p=[],h={...a,expand:!n.collapsed||a.expanded,...n};let g="";function y(){p.length=0,g=""}function b(){delete h.event,y()}const v=()=>!!p.some((([e])=>e in i))||!!h.expand;function z(){if(0!==p.length){l[v()?"group":"groupCollapsed"](`%c${h.label}%c ${(e=>{const t=e.event||e.defaultEvent;return t?`${t}`:""})(h)} %c${h.showTime?g:""}`,e,t,o);for(const[e,...t]of p)l.assert(e in l,`Unknown console method: ${e}`),e in l&&l[e](...t);l.groupEnd(),b()}else b()}function w(){""===g&&(g=function(){const e=new Date,t=(t,n)=>e[t]().toString().padStart(n,"0");return`@ ${t("getHours",2)}:${t("getMinutes",2)}:${t("getSeconds",2)}.${t("getMilliseconds",3)}`}())}function $(e,...t){0===p.length&&(w(),queueMicrotask((()=>queueMicrotask(z)))),p.push([e,...t])}function S(e=r,...t){c[e]?$("log",`${e}: ${performance.now()-c[e]} ms`,...t):$("timeLog",e,...t)}return{...m(h,f(h)),...m(console,(e=>[e,(...t)=>$(e,...t)])),...m(s,d),assert:function(e,...t){e||$("assert",e,...t)},count:function(e=r){u[e]?u[e]+=1:u[e]=1,$("log",`${e}: ${u[e]}`)},countReset:function(e=r){delete u[e]},endAutoGroup:z,errorBoundary:e=>(...t)=>{let n;try{n=e(...t)}catch(e){if(!Error.prototype.isPrototypeOf(e))throw e;$("error",e)}return n},event:function(e){w(),h.event=e},purge:y,time:function(e=r){w(),c[e]=performance.now()},timeEnd:function(e=r){S(e),delete c[e]},timeLog:S,touch:w}},J?.__esModule?J.default:J);var J;const _=Z({label:"iframeResizer(child)"});var Q;const G=(Q="log",(...e)=>!V||_[Q](...e)),{assert:Y,debug:X,endAutoGroup:K,error:ee,errorBoundary:te,event:ne,label:oe,purge:re,warn:ie}=_,ae=e=>{return _.warn((t=F,e=>window.chrome?t(e.replaceAll("<br>","\n").replaceAll("<rb>","[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},se=ae,le=(e=>(t,n="renamed to")=>(o,r,i="",a="")=>e(a,`<rb>Deprecated ${t}(${o.replace("()","")})</>\n\nThe <b>${o}</> ${t.toLowerCase()} has been ${n} <b>${r}</>. ${i}Use of the old ${t.toLowerCase()} will be removed in a future version of <i>iframe-resizer</>.`))(((e,t)=>ae(t))),ce=le("Method"),ue=le("Method","replaced with"),de=le("Option"),fe=["min-height","min-width","max-height","max-width"],me=new Set,pe=(e,t)=>window.getComputedStyle(e).getPropertyValue(t),he=(e,t)=>{return(n=pe(e,t))&&"0px"!==n&&"auto"!==n&&"none"!==n;var n};function ge({href:e}){me.has(e)||me.add(e)}const ye=(e,t)=>function(e,t){const n=e.style[t];return n?{source:"an inline style attribute",value:n}:null}(e,t)||function(e,t){for(const n of document.styleSheets)try{for(const o of n.cssRules||[])if(o.selectorText&&e.matches(o.selectorText)){const e=o.style[t];if(e)return{source:"STYLE"===n.ownerNode.tagName?"an inline <style> block":`stylesheet (${n.href})`,value:e}}}catch(e){ge(n)}return{source:"cross-origin stylesheet",value:pe(e,t)}}(e,t),be=(e,t)=>{const{source:n,value:o}=ye(e,t),r=(e=>e.tagName?e.tagName.toLowerCase():"unknown")(e);ae(`The <b>${t}</> CSS property is set to <b>${o}</> on the <b><${r}></> element via ${n}. This may cause issues with the correct operation of <i>iframe-resizer</>.\n\nIf you wish to restrict the size of the iframe, then you should set this property on the iframe element itself, not the content inside it.`)};function ve(){for(const e of[document.documentElement,document.body])for(const t of fe)he(e,t)&&be(e,t)}const ze=e=>t=>void 0===t?void 0:e(t),we=ze((e=>"true"===e)),$e=ze(Number),Se="--ifr-start",Ee="--ifr-end",Oe=[],je=new WeakSet,ke=e=>"object"==typeof e&&je.add(e);let Me={},Te=0;const Ce=setInterval((()=>{if(Oe.length<10)return;if(Me.hasTags&&Me.len<25)return;Oe.sort();const e=Math.min(Oe.reduce(((e,t)=>e+t),0)/Oe.length,Oe[Math.floor(Oe.length/2)]),t=W(e);t>Te&&(Te=t,ne("performanceObserver")),e<=4||(clearInterval(Ce),ae(`<rb>Performance Warning</>\n\nCalculating the page size is taking an excessive amount of time (${W(e)}ms).\n\nTo improve performance add the <b>data-iframe-size</> attribute to the ${Me.Side.toLowerCase()} most element on the page. For more details see: <u>https://iframe-resizer.com/perf</>.`))}),5e3);function xe(e){e.getEntries().forEach((e=>{if(e.name===Ee){const{duration:t}=performance.measure("--ifr-measure",Se,Ee);Me=e.detail,Oe.push(t),Oe.length>100&&Oe.shift()}}))}function Ae(){new PerformanceObserver(xe).observe({entryTypes:["mark"]}),ke(document.documentElement),ke(document.body)}"undefined"!=typeof document&&"undefined"!=typeof PerformanceObserver&&("loading"===document.readyState?document.addEventListener("DOMContentLoaded",Ae):Ae());const Ie=e=>(t,n)=>{if(n in t){if(typeof t[n]===e)return t[n];throw new TypeError(`${n} is not a ${e}.`)}},Pe=Ie("function"),Ne=Ie("number"),Re=Ie("string");"undefined"!=typeof window&&function(){const o={height:()=>(ie("Custom height calculation function not defined"),St.auto()),width:()=>(ie("Custom width calculation function not defined"),Et.auto())},r={bodyOffset:1,bodyScroll:1,offset:1,documentElementOffset:1,documentElementScroll:1,boundingClientRect:1,max:1,min:1,grow:1,lowestElement:1},i={},a="auto",s="[iFrameSizer]",l="scroll";let c,u,d,f,m,p=!0,R="",W=0,Z="",J="",Q=!1,X=!0,ee=!1,le=!0,fe=!1,me=!1,pe=!1,he=1,ge=a,ye="",be=!0,ze={},Oe=!0,je=!1,ke="",Me=0,Te=!1,Ce="",xe=F,Ae=[],Ie="child",Be=null,qe=!1,Le="",Fe=[],We=window.parent,De="*",He=0,Ue=!1,Ve=1,Ze=l,Je=window,_e=()=>{ie("onMessage function not defined")},Qe=()=>{},Ge=null,Ye=null;function Xe(e){var t,n,r;!function(e){Ce=e[0]??Ce,W=$e(e[1])??W,ee=we(e[2])??ee,je=we(e[3])??je,p=we(e[6])??p,Z=e[7]??Z,ge=e[8]??ge,R=e[9]??R,J=e[10]??J,He=$e(e[11])??He,ze.enable=we(e[12])??!1,Ie=e[13]??Ie,Ze=e[14]??Ze,Te=we(e[15])??Te,c=$e(e[16])??c,u=$e(e[17])??u,X=we(e[18])??X,ke=e[19]??ke,f=e[20]??f,Me=$e(e[21])??Me,Oe=we(e[23])??Oe}(e),t={id:Ce,enabled:je,expand:Oe},_.label(`${t.id}`),_.expand(t.expand),V=t.enabled,function(){function e(e){m=Pe(e,"onBeforeResize")??m,_e=Pe(e,"onMessage")??_e,Qe=Pe(e,"onReady")??Qe,"number"==typeof e?.offset&&(de("offset","offsetSize"),X&&(c=Ne(e,"offset")??c),ee&&(u=Ne(e,"offset")??u)),"number"==typeof e?.offsetSize&&(X&&(c=Ne(e,"offsetSize")??c),ee&&(u=Ne(e,"offsetSize")??u)),ye=Re(e,"ignoreSelector")??ye,Le=Re(e,"sizeSelector")??Le,De=Re(e,"targetOrigin")??De,ge=e?.heightCalculationMethod||ge,Ze=e?.widthCalculationMethod||Ze}function t(e,t){return"function"==typeof e&&(ae(`<rb>Deprecated Option(${t}CalculationMethod)</>\n\nThe use of <b>${t}CalculationMethod</> as a function is deprecated and will be removed in a future version of <i>iframe-resizer</>. Please use the new <b>onBeforeResize</> event handler instead.\n\nSee <u>https://iframe-resizer.com/api/child</> for more details.`),o[t]=e,e="custom"),e}if(1===Me)return;const n=window.iframeResizer||window.iFrameResizer;"object"==typeof n&&(e(n),ge=t(ge,"height"),Ze=t(Ze,"width"),G(`Set targetOrigin for parent: %c${De}`,h))}(),lt(),function(){try{qe=1===Me||"iframeParentListener"in window.parent}catch(e){}}(),ee===X&&(Q=!0),Me<0?se(`${B(Me+2)}${B(2)}`):f?.codePointAt(0)>4||Me<2&&se(B(3)),f&&""!==f&&"false"!==f?f!==y&&ae(`<b>Version mismatch</>\n\nThe parent and child pages are running different versions of <i>iframe resizer</>.\n\nParent page: ${f} - Child page: ${y}.\n`):ae("<rb>Legacy version detected on parent page</>\n\nDetected legacy version of parent page script. It is recommended to update the parent page to use <b>@iframe-resizer/parent</>.\n\nSee <u>https://iframe-resizer.com/setup/</> for more details.\n"),dt(),ft(),function(){let e=!1;const t=t=>document.querySelectorAll(`[${t}]`).forEach((n=>{e=!0,n.removeAttribute(t),n.toggleAttribute(v,!0)}));t("data-iframe-height"),t("data-iframe-width"),e&&ae("<rb>Deprecated Attributes</>\n \nThe <b>data-iframe-height</> and <b>data-iframe-width</> attributes have been deprecated and replaced with the single <b>data-iframe-size</> attribute. Use of the old attributes will be removed in a future version of <i>iframe-resizer</>.")}(),"BackCompat"===document.compatMode&&ae("<rb>Quirks Mode Detected</>\n\nThis iframe is running in the browser's legacy <b>Quirks Mode</>, this may cause issues with the correct operation of <i>iframe-resizer</>. It is recommended that you switch to the modern <b>Standards Mode</>.\n\nFor more information see <u>https://iframe-resizer.com/quirks-mode</>.\n"),nt(),Q||ve(),1!==Me&&(Je.parentIframe=Object.freeze({autoResize:e=>(U(e,"boolean","parentIframe.autoResize(enable) enable"),!1===ee&&!1===X?(ne(E),ae(`Auto Resize can not be changed when <b>direction</> is set to '${I}'.`),!1):(!0===e&&!1===p?(p=!0,queueMicrotask((()=>Tt(E,"Auto Resize enabled")))):!1===e&&!0===p&&(p=!1),xt(0,0,"autoResize",JSON.stringify(p)),p)),close(){xt(0,0,"close")},getId:()=>Ce,getOrigin:()=>(ce("getOrigin()","getParentOrigin()"),d),getParentOrigin:()=>d,getPageInfo(e){if("function"==typeof e)return Ge=e,xt(0,0,"pageInfo"),void ue("getPageInfo()","getParentProps()","See <u>https://iframe-resizer.com/upgrade</> for details. ");Ge=null,xt(0,0,"pageInfoStop")},getParentProps:e=>(U(e,"function","parentIframe.getParentProps(callback) callback"),Ye=e,xt(0,0,"parentInfo"),()=>{Ye=null,xt(0,0,"parentInfoStop")}),getParentProperties(e){ce("getParentProperties()","getParentProps()"),this.getParentProps(e)},moveToAnchor(e){U(e,"string","parentIframe.moveToAnchor(anchor) anchor"),ze.findTarget(e)},reset(){!function(){const e=ge;ge=a,Ue||(Ue=!0,requestAnimationFrame((()=>{Ue=!1}))),Ct("reset"),ge=e}()},setOffsetSize(e){U(e,"number","parentIframe.setOffsetSize(offset) offset"),c=e,u=e,Tt(T,`parentIframe.setOffsetSize(${e})`)},scrollBy(e,t){U(e,"number","parentIframe.scrollBy(x, y) x"),U(t,"number","parentIframe.scrollBy(x, y) y"),xt(t,e,"scrollBy")},scrollTo(e,t){U(e,"number","parentIframe.scrollTo(x, y) x"),U(t,"number","parentIframe.scrollTo(x, y) y"),xt(t,e,"scrollTo")},scrollToOffset(e,t){U(e,"number","parentIframe.scrollToOffset(x, y) x"),U(t,"number","parentIframe.scrollToOffset(x, y) y"),xt(t,e,"scrollToOffset")},sendMessage(e,t){t&&U(t,"string","parentIframe.sendMessage(msg, targetOrigin) targetOrigin"),xt(0,0,"message",JSON.stringify(e),t)},setHeightCalculationMethod(e){ge=e,dt()},setWidthCalculationMethod(e){Ze=e,ft()},setTargetOrigin(e){U(e,"string","parentIframe.setTargetOrigin(targetOrigin) targetOrigin"),De=e},resize(e,t){e&&U(e,"number","parentIframe.resize(customHeight, customWidth) customHeight"),t&&U(t,"number","parentIframe.resize(customHeight, customWidth) customWidth"),Tt(j,`parentIframe.resize(${e||""}${t?`,${t}`:""})`,e,t)},size(e,t){ce("size()","resize()"),this.resize(e,t)}}),Je.parentIFrame=Je.parentIframe),function(){function e(e){xt(0,0,e.type,`${e.screenY}:${e.screenX}`)}function t(t,n){N(window.document,t,e)}!0===Te&&(t("mouseenter"),t("mouseleave"))}(),ze=function(){const e=()=>({x:document.documentElement.scrollLeft,y:document.documentElement.scrollTop});function t(t){const n=t.getBoundingClientRect(),o=e();return{x:parseInt(n.left,b)+parseInt(o.x,b),y:parseInt(n.top,b)+parseInt(o.y,b)}}function n(e){function n(e){const n=t(e);xt(n.y,n.x,"scrollToOffset")}const o=e.split("#")[1]||e,r=decodeURIComponent(o),i=document.getElementById(r)||document.getElementsByName(r)[0];void 0===i?xt(0,0,"inPageLink",`#${o}`):n(i)}function o(){const{hash:e,href:t}=window.location;""!==e&&"#"!==e&&n(t)}function r(){for(const e of document.querySelectorAll('a[href^="#"]'))"#"!==e.getAttribute("href")&&N(e,"click",(t=>{t.preventDefault(),n(e.getAttribute("href"))}))}function i(){N(window,"hashchange",o)}function a(){setTimeout(o,128)}function s(){r(),i(),a()}return ze.enable&&(1===Me?ae("In page linking requires a Professional or Business license. Please see <u>https://iframe-resizer.com/pricing</> for more details."):s()),{findTarget:n}}(),void 0===Z&&(Z=`${W}px`),at("margin",(n="margin",(r=Z).includes("-")&&(ie(`Negative CSS value ignored for ${n}`),r=""),r)),at("background",R),at("padding",J),function(){const e=document.createElement("div");e.style.clear="both",e.style.display="block",e.style.height="0",document.body.append(e)}(),Q||function(){const e=e=>e.style.setProperty("height","auto","important");e(document.documentElement),e(document.body)}(),function(e){ct({method:e,eventType:"After Print",eventName:"afterprint"}),ct({method:e,eventType:"Before Print",eventName:"beforeprint"}),ct({method:e,eventType:"Ready State Change",eventName:"readystatechange"})}("add"),function(){const e=new Set,t=[];let n=!1,o=0;const r=t=>{G("Mutations observed:",t);for(const n of t){const{addedNodes:t,removedNodes:o}=n;for(const n of t)e.add(n);for(const t of o)e.delete(t)}},i=16,a=2,s=200;let l=1;function c(e){lt(),ot(e),e.forEach(ht),e.clear()}function u(){const d=performance.now(),f=d-o;if(f>i*l+++a&&f<s)return G("Backed off due to heavy workload on callStack"),setTimeout(u,i*l),void(o=d);l=1,t.forEach(r),t.length=0,e.size>0&&c(e),nt(),et(),n=!1,Tt(A,"Mutation Observed")}function d(e){t.push(e),n||(o=performance.now(),n=!0,requestAnimationFrame(u))}function f(){const e=new window.MutationObserver(d),t=document.querySelector("body"),n={attributes:!0,attributeFilter:[w,v],attributeOldValue:!1,characterData:!1,characterDataOldValue:!1,childList:!0,subtree:!0};return e.observe(t,n),e}f()}(),Be=new ResizeObserver(mt),Be.observe(document.body),pt.add(document.body),ht(document.body),X!==ee&&(xe=(e=>{const t=e.side||$,n=e.onChange||F,o={root:e.root,rootMargin:"0px",threshold:1},r=window?.requestAnimationFrame||F,i=(e=!1)=>n(e),a=(e,n)=>0===e||e>n[t],s=(e,t)=>e.toggleAttribute(z,t),l=new IntersectionObserver((function(e){for(const o of e){const{boundingClientRect:e,rootBounds:r,target:i}=o,l=e[t],c=a(l,r)&&!((n=i).hidden||null===n.offsetParent||"none"===n.style.display);s(i,c)}var n;r(i)}),o),c=new WeakSet;return function(e){for(const t of e){const e=t.nodeType===Node.ELEMENT_NODE,n=c.has(t);!n&&e?(l.observe(t),c.add(t)):Y(!n,"Node already observed",t)}}})({onChange:tt,root:document.documentElement,side:X?$:S})),ot(bt(document)()),Ke(L(Qe)),Tt(P,"Init message from host page",void 0,void 0,y),document.title&&""!==document.title&&xt(0,0,"title",document.title)}function Ke(e){"complete"===document.readyState?q(e):N(document,"readystatechange",(()=>Ke(e)))}function et(){const e=document.querySelectorAll(`[${z}]`);Ae=Array.from(e).filter((e=>!e.closest(`[${w}]`))),me=Ae.length>0}function tt(e){et(),(me||e)&&(me?G("Overflowed Elements:",...Ae):G("Overflow removed"),Tt(x,"Overflow updated"))}function nt(){Fe=document.querySelectorAll(`[${v}]`),pe=Fe.length>0}function ot(e){pe||xe(e)}let rt=0;function it(){const n=document.querySelectorAll(`*[${w}]`);fe=n.length>0,fe&&n.length!==rt&&(function(n){const o=1===n.length?"":"s";ie(`%c[${w}]%c found on %c${n.length}%c element${o}`,t,e,t,e)}(n),rt=n.length)}function at(e,t){void 0!==t&&""!==t&&"null"!==t&&(document.body.style.setProperty(e,t),G(`Set body ${e}: %c${t}`,h))}function st(e,t,n){if(""!==n)for(const e of document.querySelectorAll(n))e.toggleAttribute(t,!0)}function lt(){st(0,v,Le),st(0,w,ye)}function ct(e){({add(t){function n(){Tt(e.eventName,e.eventType)}i[t]=n,N(window,t,n,{passive:!0})},remove(e){const t=i[e];var n,o;delete i[e],n=e,o=t,window.removeEventListener(n,o,!1)}})[e.method](e.eventName)}function ut(e,t,n,o){return t!==e&&(e in n||(ie(`${e} is not a valid option for ${o}CalculationMethod.`),e=t),e in r)&&ae(`<rb>Deprecated ${o}CalculationMethod (${e})</>\n\nThis version of <i>iframe-resizer</> can auto detect the most suitable ${o} calculation method. It is recommended that you ${f?"remove this option.":"set this option to <b>'auto'</> when using an older version of <i>iframe-resizer</> on the parent page."}`),e}function dt(){ge=ut(ge,a,St,"height")}function ft(){Ze=ut(Ze,l,Et,"width")}function mt(e){if(!Array.isArray(e)||0===e.length)return;const t=e[0].target;Tt(C,`Element resized <${function(e){switch(!0){case!H(e):return"";case H(e.id):return`${e.nodeName}#${e.id}`;case H(e.name):return`${e.nodeName} (${e.name}`;case H(e.className):return`${e.nodeName}.${e.className}`;default:return e.nodeName}}(t)}>`)}const pt=new WeakSet;function ht(e){if(e.nodeType!==Node.ELEMENT_NODE)return;if(!pt.has(e)){const t=getComputedStyle(e)?.position;""!==t&&"static"!==t&&(Be.observe(e),pt.add(e))}const t=bt(e)();for(const e of t){if(pt.has(e)||e?.nodeType!==Node.ELEMENT_NODE)continue;const t=getComputedStyle(e)?.position;""!==t&&"static"!==t&&(Be.observe(e),pt.add(e))}}function gt(e){performance.mark(Se);const t=D(e);let n=0,o=document.documentElement,r=pe?0:document.documentElement.getBoundingClientRect().bottom;const i=pe?Fe:me?Ae:bt(document)();for(const t of i)n=t.getBoundingClientRect()[e]+parseFloat(getComputedStyle(t).getPropertyValue(`margin-${e}`)),n>r&&(r=n,o=t);return G(`${t} position calculated from:`,o),performance.mark(Ee,{detail:{hasTags:pe,len:i.length,logging:je,Side:t}}),r}const yt=e=>[e.bodyOffset(),e.bodyScroll(),e.documentElementOffset(),e.documentElementScroll(),e.boundingClientRect()],bt=e=>()=>{it();const t=["* ","not(head)","not(meta)","not(base)","not(title)","not(script)","not(link)","not(style)","not(map)","not(area)","not(option)","not(optgroup)","not(template)","not(track)","not(wbr)","not(nobr)"];return fe&&t.push(`not([${w}])`,`not([${w}] *)`),e.querySelectorAll(t.join(":"))},vt={height:0,width:0},zt={height:0,width:0},wt=[h,g,h];function $t(e){function t(){return zt[o]=r,vt[o]=s,r}const n=e===St,o=n?"height":"width",r=e.boundingClientRect(),i=Math.ceil(r),a=Math.floor(r),s=(e=>e.documentElementScroll()+Math.max(0,e.getOffset()))(e),l=`HTML: %c${r}px %cPage: %c${s}px`;let c=0;switch(!0){case!e.enabled():return s;case pe:G("Found element with data-iframe-size attribute"),c=e.taggedElement();break;case!me&&0===zt[o]&&0===vt[o]:G(`Initial page size values: ${l}`,...wt),c=t();break;case Ue&&r===zt[o]&&s===vt[o]:G(`Size unchanged: ${l}`,...wt),c=Math.max(r,s);break;case 0===r:G(`Page is hidden: ${l}`,...wt),c=s;break;case!me&&r!==zt[o]&&s<=vt[o]:G(`New <html> size: ${l} `,...wt),G(`Previous <html> size: %c${zt[o]}px`,h),c=t();break;case!n:c=e.taggedElement();break;case!me&&r<zt[o]:G(`<html> size decreased: ${l}`,...wt),c=t();break;case s===a||s===i:G(`<html> size equals page size: ${l}`,...wt),c=t();break;case r>s:G(`Page size < <html> size: ${l}`,...wt),c=t();break;case me:G("Found element overflowing <html> "),c=e.taggedElement();break;default:G(`Using <html> size: ${l}`,...wt),c=t()}return G(`Content ${o}: %c${c}px`,h),c+=function(e){const t=e.getOffset();return 0!==t&&G(`Page offsetSize: %c${t}px`,h),t}(e),c}const St={enabled:()=>X,getOffset:()=>c,auto:()=>$t(St),bodyOffset:()=>{const{body:e}=document,t=getComputedStyle(e);return e.offsetHeight+parseInt(t.marginTop,b)+parseInt(t.marginBottom,b)},bodyScroll:()=>document.body.scrollHeight,offset:()=>St.bodyOffset(),custom:()=>o.height(),documentElementOffset:()=>document.documentElement.offsetHeight,documentElementScroll:()=>document.documentElement.scrollHeight,boundingClientRect:()=>Math.max(document.documentElement.getBoundingClientRect().bottom,document.body.getBoundingClientRect().bottom),max:()=>Math.max(...yt(St)),min:()=>Math.min(...yt(St)),grow:()=>St.max(),lowestElement:()=>gt($),taggedElement:()=>gt($)},Et={enabled:()=>ee,getOffset:()=>u,auto:()=>$t(Et),bodyScroll:()=>document.body.scrollWidth,bodyOffset:()=>document.body.offsetWidth,custom:()=>o.width(),documentElementScroll:()=>document.documentElement.scrollWidth,documentElementOffset:()=>document.documentElement.offsetWidth,boundingClientRect:()=>Math.max(document.documentElement.getBoundingClientRect().right,document.body.getBoundingClientRect().right),max:()=>Math.max(...yt(Et)),min:()=>Math.min(...yt(Et)),rightMostElement:()=>gt(S),scroll:()=>Math.max(Et.bodyScroll(),Et.documentElementScroll()),taggedElement:()=>gt(S)},Ot=(e,t)=>!(Math.abs(e-t)<=He);function jt(e,t){const n=e[t]();return e.enabled()&&void 0!==m?function(e){const t=m(e);if(void 0===t)throw new TypeError("No value returned from onBeforeResize(), expected a numeric value");if(Number.isNaN(t))throw new TypeError(`Invalid value returned from onBeforeResize(): ${t}, expected Number`);return t}(n):n}let kt=!1;const Mt=L((()=>se(B(4)))),Tt=te(((e,t,n,o,r)=>{if(performance.now(),ne(e),!0!==kt)return p||e in M?void(document.hidden||(kt=!0,requestAnimationFrame((()=>{kt=!1})),function(e,t,n,o,r){const i=n??jt(St,ge),a=o??jt(Et,Ze);switch(X&&Ot(he,i)||ee&&Ot(Ve,a)?O:e){case P:case E:case O:he=i,Ve=a;case T:xt(he,Ve,e,r);break;case C:case x:case A:re();break;default:re(),G("No change in content size detected")}}(e,0,n,o,r))):(G("Resizing disabled"),void K())}));function Ct(e){he=St[ge](),Ve=Et[Ze](),xt(he,Ve,e)}const xt=te((function(e,t,o,r,i){Me<-1||(ne(o),void 0!==i||(i=De),function(){const a=`${Ce}:${e}:${t}:${o}${void 0===r?"":`:${r}`}`;if(qe)try{window.parent.iframeParentListener(s+a)}catch(e){if(1!==Me)throw e;return void Mt()}else We.postMessage(s+a,i);G(`Sending message to parent page via ${qe?"sameOrigin":"postMessage"}: %c%c${a}`,n,h)}(),K())})),At=te((function(e){ne("onMessage");const{freeze:t}=Object,{parse:n}=JSON,o=e=>xt(0,0,`${e}Stop`),r={init:function(){if("loading"===document.readyState)return;const t=e.data.slice(13).split(":");We=e.source,d=e.origin,Xe(t),le=!1,setTimeout((()=>{be=!1}),128)},reset(){be||Ct("resetPage")},resize(){Tt(k,"Parent window requested size check")},moveToAnchor(){ze.findTarget(a())},inPageLink(){this.moveToAnchor()},pageInfo(){const e=a();Ge?q(Ge,n(e)):o("pageInfo")},parentInfo(){const e=(r=a(),t(n(r)));var r;Ye?q(Ye,e):o("parentInfo")},message(){const e=a();q(_e,n(e))}},i=()=>e.data.split("]")[1].split(":")[0],a=()=>e.data.slice(e.data.indexOf(":")+1),l=()=>e.data.split(":")[2]in{true:1,false:1};function c(){const t=i();ne(t),t in r?r[t]():"iframeResize"in window||void 0!==window.jQuery&&""in window.jQuery.prototype||l()||ie(`Unexpected message (${e.data})`)}s===`${e.data}`.slice(0,13)&&function(){if(!1!==le)return l()?(oe(i()),ne(P),void r.init()):void 0;c()}()}));function It(){"loading"!==document.readyState&&window.parent.postMessage("[iFrameResizerChild]Ready","*")}"iframeChildListener"in window?ie("Already setup"):(window.iframeChildListener=e=>setTimeout((()=>At({data:e,sameOrigin:!0}))),N(window,"message",At),N(window,"readystatechange",It),It())}()}();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* @preserve
|
|
3
3
|
*
|
|
4
|
-
* @module iframe-resizer/legacy (child) 5.4.7
|
|
4
|
+
* @module iframe-resizer/legacy (child) 5.4.7 (iife)
|
|
5
5
|
*
|
|
6
6
|
* @license GPL-3.0 for non-commercial use only.
|
|
7
7
|
* For commercial use, you must purchase a license from
|
|
@@ -17,5 +17,4 @@
|
|
|
17
17
|
*/
|
|
18
18
|
|
|
19
19
|
|
|
20
|
-
!function(){"use strict";const e="font-weight: normal;",t="font-weight: bold;",n="font-style: italic;",o=e+n,r="default",i=Object.freeze({assert:!0,error:!0,warn:!0}),a={expand:!0,defaultEvent:void 0,event:void 0,label:"AutoConsoleGroup",showTime:!0},s={profile:0,profileEnd:0,timeStamp:0,trace:0},l=Object.assign(console);const{fromEntries:c,keys:d}=Object,u=e=>[e,l[e]],f=e=>t=>[t,function(n){e[t]=n}],m=(e,t)=>c(d(e).map(t));const p=!(typeof window>"u"||"function"!=typeof window.matchMedia)&&window.matchMedia("(prefers-color-scheme: dark)").matches,g=p?"color: #A9C7FB;":"color: #135CD2;",h=p?"color: #E3E3E3;":"color: #1F1F1F;",y="5.4.7-beta.3",v=10,b="data-iframe-size",z="data-iframe-overflowed",w="data-iframe-ignore",$="bottom",S="right",O="autoResizeEnabled",E=Symbol("sizeChanged"),M="manualResize",k="parentResize",j={[M]:1,[k]:1},I="setOffsetSize",T="resizeObserver",A="overflowObserver",P="mutationObserver",C="No change in content size detected",x="init",R=(e,t,n,o)=>e.addEventListener(t,n,o||!1),N=["<iy><yi>Puchspk Spjluzl Rlf</><iy><iy>","<iy><yi>Tpzzpun Spjluzl Rlf</><iy><iy>","Aopz spiyhyf pz hchpshisl dpao ivao Jvttlyjphs huk Vwlu-Zvbyjl spjluzlz.<iy><iy><i>Jvttlyjphs Spjluzl</><iy>Mvy jvttlyjphs bzl, <p>pmyhtl-ylzpgly</> ylxbpylz h svd jvza vul aptl spjluzl mll. Mvy tvyl pumvythapvu cpzpa <b>oaawz://pmyhtl-ylzpgly.jvt/wypjpun</>.<iy><iy><i>Vwlu Zvbyjl Spjluzl</><iy>Pm fvb hyl bzpun aopz spiyhyf pu h uvu-jvttlyjphs vwlu zvbyjl wyvqlja aolu fvb jhu bzl pa mvy myll bukly aol alytz vm aol NWS C3 Spjluzl. Av jvumpyt fvb hjjlwa aolzl alytz, wslhzl zla aol <i>spjluzl</> rlf pu <p>pmyhtl-ylzpgly</> vwapvuz av <i>NWSc3</>.<iy><iy>Mvy tvyl pumvythapvu wslhzl zll: <b>oaawz://pmyhtl-ylzpgly.jvt/nws</>","<i>NWSc3 Spjluzl Clyzpvu</><iy><iy>Aopz clyzpvu vm <p>pmyhtl-ylzpgly</> pz ilpun bzlk bukly aol alytz vm aol <i>NWS C3</> spjluzl. Aopz spjluzl hssvdz fvb av bzl <p>pmyhtl-ylzpgly</> pu Vwlu Zvbyjl wyvqljaz, iba pa ylxbpylz fvby wyvqlja av il wbispj, wyvcpkl haaypibapvu huk il spjluzlk bukly clyzpvu 3 vy shaly vm aol NUB Nlulyhs Wbispj Spjluzl.<iy><iy>Pm fvb hyl bzpun aopz spiyhyf pu h uvu-vwlu zvbyjl wyvqlja vy dlizpal, fvb dpss ullk av wbyjohzl h svd jvza vul aptl jvttlyjphs spjluzl.<iy><iy>Mvy tvyl pumvythapvu cpzpa <b>oaawz://pmyhtl-ylzpgly.jvt/wypjpun</>.","<iy><yi>Zvsv spjluzl kvlz uva zbwwvya jyvzz-kvthpu</><iy><iy>Av bzl <p>pmyhtl-ylzpgly</> dpao jyvzz kvthpu pmyhtlz fvb ullk lpaoly aol Wyvmlzzpvuhs vy Ibzpulzz spjluzlz. Mvy klahpsz vu bwnyhkl wypjpun wslhzl jvuahja pumv@pmyhtl-ylzpgly.jvt."];Object.fromEntries(["2cgs7fdf4xb","1c9ctcccr4z","1q2pc4eebgb","ueokt0969w","w2zxchhgqz","1umuxblj2e5"].map(((e,t)=>[e,Math.max(0,t-1)])));const q=e=>(e=>e.replace(/[A-Za-z]/g,(e=>String.fromCodePoint((e<="Z"?90:122)>=(e=e.codePointAt(0)+19)?e:e-26))))(N[e]),B=(e,...t)=>setTimeout((()=>e(...t)),0),L=e=>{let t=!1;return function(){return t?void 0:(t=!0,Reflect.apply(e,this,arguments))}},F=e=>e,W=e=>Math.round(1e3*e)/1e3,D=e=>e.charAt(0).toUpperCase()+e.slice(1),H=e=>""!=`${e}`&&void 0!==e;function U(e){switch(!0){case!H(e):return"";case H(e.id):return`${e.nodeName}#${e.id}`;case H(e.name):return`${e.nodeName} (${e.name}`;case H(e.className):return`${e.nodeName}.${e.className}`;default:return e.nodeName}}const V=(e,t,n)=>{if(typeof e!==t)throw new TypeError(`${n} is not a ${D(t)}`)};let Z=!0;const J=(_=function(n={}){const c={},d={},p=[],g={...a,expand:!n.collapsed||a.expanded,...n};let h="";function y(){p.length=0,h=""}function v(){delete g.event,y()}const b=()=>!!p.some((([e])=>e in i))||!!g.expand;function z(){if(0!==p.length){l[b()?"group":"groupCollapsed"](`%c${g.label}%c ${(e=>{const t=e.event||e.defaultEvent;return t?`${t}`:""})(g)} %c${g.showTime?h:""}`,e,t,o);for(const[e,...t]of p)l.assert(e in l,`Unknown console method: ${e}`),e in l&&l[e](...t);l.groupEnd(),v()}else v()}function w(){""===h&&(h=function(){const e=new Date,t=(t,n)=>e[t]().toString().padStart(n,"0");return`@ ${t("getHours",2)}:${t("getMinutes",2)}:${t("getSeconds",2)}.${t("getMilliseconds",3)}`}())}function $(e,...t){0===p.length&&(w(),queueMicrotask((()=>queueMicrotask(z)))),p.push([e,...t])}function S(e=r,...t){c[e]?$("log",`${e}: ${performance.now()-c[e]} ms`,...t):$("timeLog",e,...t)}return{...m(g,f(g)),...m(console,(e=>[e,(...t)=>$(e,...t)])),...m(s,u),assert:function(e,...t){e||$("assert",e,...t)},count:function(e=r){d[e]?d[e]+=1:d[e]=1,$("log",`${e}: ${d[e]}`)},countReset:function(e=r){delete d[e]},endAutoGroup:z,errorBoundary:e=>(...t)=>{let n;try{n=e(...t)}catch(e){if(!Error.prototype.isPrototypeOf(e))throw e;$("error",e)}return n},event:function(e){w(),g.event=e},purge:y,time:function(e=r){w(),c[e]=performance.now()},timeEnd:function(e=r){S(e),delete c[e]},timeLog:S,touch:w}},_?.__esModule?_.default:_);var _;const Q=J({label:"iframeResizer(child)"});const G=(X="log",(...e)=>!Z||Q[X](...e));var X;const Y=G,{assert:K,debug:ee,endAutoGroup:te,error:ne,errorBoundary:oe,event:re,label:ie,purge:ae,warn:se}=Q,le=e=>{return Q.warn((t=F,e=>window.chrome?t(e.replaceAll("<br>","\n").replaceAll("<rb>","[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},ce=le,de=(e=>(t,n="renamed to")=>(o,r,i="",a="")=>e(a,`<rb>Deprecated ${t}(${o.replace("()","")})</>\n\nThe <b>${o}</> ${t.toLowerCase()} has been ${n} <b>${r}</>. ${i}Use of the old ${t.toLowerCase()} will be removed in a future version of <i>iframe-resizer</>.`))(((e,t)=>le(t))),ue=de("Method"),fe=de("Method","replaced with"),me=de("Option"),pe=e=>t=>void 0===t?void 0:e(t),ge=pe((e=>"true"===e)),he=pe(Number),ye="--ifr-start",ve="--ifr-end",be=[],ze=new WeakSet,we=e=>"object"==typeof e&&ze.add(e);let $e={},Se=0;const Oe=setInterval((()=>{if(be.length<10)return;if($e.hasTags&&$e.len<25)return;be.sort();const e=Math.min(be.reduce(((e,t)=>e+t),0)/be.length,be[Math.floor(be.length/2)]),t=W(e);t>Se&&(Se=t,re("performanceObserver"),G("Mean time:",W(be[Math.floor(be.length/2)])),G("Median time:",W(be.reduce(((e,t)=>e+t),0)/be.length)),G("Average time:",t),G("Max time:",W(Math.max(...be)))),e<=4||(clearInterval(Oe),le(`<rb>Performance Warning</>\n\nCalculating the page size is taking an excessive amount of time (${W(e)}ms).\n\nTo improve performance add the <b>data-iframe-size</> attribute to the ${$e.Side.toLowerCase()} most element on the page. For more details see: <u>https://iframe-resizer.com/perf</>.`))}),5e3);function Ee(e){e.getEntries().forEach((e=>{if(e.name===ve){const{duration:t}=performance.measure("--ifr-measure",ye,ve);$e=e.detail,be.push(t),be.length>100&&be.shift()}}))}function Me(){new PerformanceObserver(Ee).observe({entryTypes:["mark"]}),we(document.documentElement),we(document.body)}"undefined"!=typeof document&&"undefined"!=typeof PerformanceObserver&&("loading"===document.readyState?document.addEventListener("DOMContentLoaded",Me):Me());const ke=e=>(t,n)=>{if(n in t){if(typeof t[n]===e)return t[n];throw new TypeError(`${n} is not a ${e}.`)}},je=ke("function"),Ie=ke("number"),Te=ke("string");"undefined"!=typeof window&&function(){const o={height:()=>(se("Custom height calculation function not defined"),Et.auto()),width:()=>(se("Custom width calculation function not defined"),Mt.auto())},r={bodyOffset:1,bodyScroll:1,offset:1,documentElementOffset:1,documentElementScroll:1,boundingClientRect:1,max:1,min:1,grow:1,lowestElement:1},i={},a="auto",s="[iFrameSizer]",l="scroll";let c,d,u,f,m,p,N,H=!0,J="",_=0,X="",ne="",ae=!0,de=!1,pe=!0,be=!1,ze=!1,we=!1,$e=1,Se=a,Oe="",Ee=!0,Me={},ke=!0,Ae=!1,Pe="",Ce=0,xe=!1,Re="",Ne=F,qe=[],Be="child",Le=null,Fe=!1,We="",De=[],He=window.parent,Ue="*",Ve=0,Ze=!1,Je=1,_e=l,Qe=window,Ge=()=>{se("onMessage function not defined")},Xe=()=>{},Ye=null,Ke=null;function et(e){var t,n,r;!function(e){Re=e[0]??Re,_=he(e[1])??_,de=ge(e[2])??de,Ae=ge(e[3])??Ae,H=ge(e[6])??H,X=e[7]??X,Se=e[8]??Se,J=e[9]??J,ne=e[10]??ne,Ve=he(e[11])??Ve,Me.enable=ge(e[12])??!1,Be=e[13]??Be,_e=e[14]??_e,xe=ge(e[15])??xe,c=he(e[16])??c,d=he(e[17])??d,ae=ge(e[18])??ae,Pe=e[19]??Pe,p=e[20]??p,Ce=he(e[21])??Ce,ke=ge(e[23])??ke}(e),t={id:Re,enabled:Ae,expand:ke},Q.label(`${t.id}`),Q.expand(t.expand),Z=t.enabled,G(`Initialising iframe v${y} ${window.location.href}`),function(){function e(e){G("Reading data from page:",e),N=je(e,"onBeforeResize")??N,Ge=je(e,"onMessage")??Ge,Xe=je(e,"onReady")??Xe,"number"==typeof e?.offset&&(me("offset","offsetSize"),ae&&(c=Ie(e,"offset")??c),de&&(d=Ie(e,"offset")??d)),"number"==typeof e?.offsetSize&&(ae&&(c=Ie(e,"offsetSize")??c),de&&(d=Ie(e,"offsetSize")??d)),Oe=Te(e,"ignoreSelector")??Oe,We=Te(e,"sizeSelector")??We,Ue=Te(e,"targetOrigin")??Ue,Se=e?.heightCalculationMethod||Se,_e=e?.widthCalculationMethod||_e}function t(e,t){return"function"==typeof e&&(le(`<rb>Deprecated Option(${t}CalculationMethod)</>\n\nThe use of <b>${t}CalculationMethod</> as a function is deprecated and will be removed in a future version of <i>iframe-resizer</>. Please use the new <b>onBeforeResize</> event handler instead.\n\nSee <u>https://iframe-resizer.com/api/child</> for more details.`),o[t]=e,e="custom"),e}if(1===Ce)return;const n=window.iframeResizer||window.iFrameResizer;"object"==typeof n&&(e(n),Se=t(Se,"height"),_e=t(_e,"width"),Y(`Set targetOrigin for parent: %c${Ue}`,g))}(),dt(),function(){try{Fe=1===Ce||"iframeParentListener"in window.parent}catch(e){G("Cross domain iframe detected")}}(),Ce<0?ce(`${q(Ce+2)}${q(2)}`):p?.codePointAt(0)>4||Ce<2&&ce(q(3)),p&&""!==p&&"false"!==p?p!==y&&le(`<b>Version mismatch</>\n\nThe parent and child pages are running different versions of <i>iframe resizer</>.\n\nParent page: ${p} - Child page: ${y}.\n`):le("<rb>Legacy version detected on parent page</>\n\nDetected legacy version of parent page script. It is recommended to update the parent page to use <b>@iframe-resizer/parent</>.\n\nSee <u>https://iframe-resizer.com/setup/</> for more details.\n"),mt(),pt(),function(){let e=!1;const t=t=>document.querySelectorAll(`[${t}]`).forEach((n=>{e=!0,n.removeAttribute(t),n.toggleAttribute(b,!0)}));t("data-iframe-height"),t("data-iframe-width"),e&&le("<rb>Deprecated Attributes</>\n \nThe <b>data-iframe-height</> and <b>data-iframe-width</> attributes have been deprecated and replaced with the single <b>data-iframe-size</> attribute. Use of the old attributes will be removed in a future version of <i>iframe-resizer</>.")}(),"BackCompat"===document.compatMode&&le("<rb>Quirks Mode Detected</>\n\nThis iframe is running in the browser's legacy <b>Quirks Mode</>, this may cause issues with the correct operation of <i>iframe-resizer</>. It is recommended that you switch to the modern <b>Standards Mode</>.\n\nFor more information see <u>https://iframe-resizer.com/quirks-mode</>.\n"),rt(),1!==Ce&&(Qe.parentIframe=Object.freeze({autoResize:e=>(V(e,"boolean","parentIframe.autoResize(enable) enable"),!1===de&&!1===ae?(re(O),le("Auto Resize can not be changed when <b>direction</> is set to 'none'."),!1):(!0===e&&!1===H?(H=!0,queueMicrotask((()=>At(O,"Auto Resize enabled")))):!1===e&&!0===H&&(H=!1),Ct(0,0,"autoResize",JSON.stringify(H)),H)),close(){Ct(0,0,"close")},getId:()=>Re,getOrigin:()=>(ue("getOrigin()","getParentOrigin()"),u),getParentOrigin:()=>u,getPageInfo(e){if("function"==typeof e)return Ye=e,Ct(0,0,"pageInfo"),void fe("getPageInfo()","getParentProps()","See <u>https://iframe-resizer.com/upgrade</> for details. ");Ye=null,Ct(0,0,"pageInfoStop")},getParentProps:e=>(V(e,"function","parentIframe.getParentProps(callback) callback"),Ke=e,Ct(0,0,"parentInfo"),()=>{Ke=null,Ct(0,0,"parentInfoStop")}),getParentProperties(e){ue("getParentProperties()","getParentProps()"),this.getParentProps(e)},moveToAnchor(e){V(e,"string","parentIframe.moveToAnchor(anchor) anchor"),Me.findTarget(e)},reset(){!function(){const e=Se;Se=a,G("Reset trigger event: %cparentIframe.reset",g),Ze?G("TriggerLock blocked calculation"):(Ze=!0,ee("Trigger event lock on"),requestAnimationFrame((()=>{Ze=!1,ee("Trigger event lock off")}))),Pt("reset"),Se=e}()},setOffsetSize(e){V(e,"number","parentIframe.setOffsetSize(offset) offset"),c=e,d=e,At(I,`parentIframe.setOffsetSize(${e})`)},scrollBy(e,t){V(e,"number","parentIframe.scrollBy(x, y) x"),V(t,"number","parentIframe.scrollBy(x, y) y"),Ct(t,e,"scrollBy")},scrollTo(e,t){V(e,"number","parentIframe.scrollTo(x, y) x"),V(t,"number","parentIframe.scrollTo(x, y) y"),Ct(t,e,"scrollTo")},scrollToOffset(e,t){V(e,"number","parentIframe.scrollToOffset(x, y) x"),V(t,"number","parentIframe.scrollToOffset(x, y) y"),Ct(t,e,"scrollToOffset")},sendMessage(e,t){t&&V(t,"string","parentIframe.sendMessage(msg, targetOrigin) targetOrigin"),Ct(0,0,"message",JSON.stringify(e),t)},setHeightCalculationMethod(e){Se=e,mt()},setWidthCalculationMethod(e){_e=e,pt()},setTargetOrigin(e){V(e,"string","parentIframe.setTargetOrigin(targetOrigin) targetOrigin"),G(`Set targetOrigin: %c${e}`,g),Ue=e},resize(e,t){e&&V(e,"number","parentIframe.resize(customHeight, customWidth) customHeight"),t&&V(t,"number","parentIframe.resize(customHeight, customWidth) customWidth"),At(M,`parentIframe.resize(${e||""}${t?`,${t}`:""})`,e,t)},size(e,t){ue("size()","resize()"),this.resize(e,t)}}),Qe.parentIFrame=Qe.parentIframe),function(){function e(e){Ct(0,0,e.type,`${e.screenY}:${e.screenX}`)}function t(t,n){G(`Add event listener: %c${n}`,g),R(window.document,t,e)}!0===xe&&(t("mouseenter","Mouse Enter"),t("mouseleave","Mouse Leave"))}(),Me=function(){const e=()=>({x:document.documentElement.scrollLeft,y:document.documentElement.scrollTop});function t(t){const n=t.getBoundingClientRect(),o=e();return{x:parseInt(n.left,v)+parseInt(o.x,v),y:parseInt(n.top,v)+parseInt(o.y,v)}}function n(e){function n(e){const n=t(e);G(`Moving to in page link (%c#${o}%c) at x: %c${n.x}%c y: %c${n.y}`,g,h,g,h,g),Ct(n.y,n.x,"scrollToOffset")}const o=e.split("#")[1]||e,r=decodeURIComponent(o),i=document.getElementById(r)||document.getElementsByName(r)[0];void 0===i?(G(`In page link (#${o}) not found in iFrame, so sending to parent`),Ct(0,0,"inPageLink",`#${o}`)):n(i)}function o(){const{hash:e,href:t}=window.location;""!==e&&"#"!==e&&n(t)}function r(){for(const e of document.querySelectorAll('a[href^="#"]'))"#"!==e.getAttribute("href")&&R(e,"click",(t=>{t.preventDefault(),n(e.getAttribute("href"))}))}function i(){R(window,"hashchange",o)}function a(){setTimeout(o,128)}function s(){G("Setting up location.hash handlers"),r(),i(),a()}return Me.enable?1===Ce?le("In page linking requires a Professional or Business license. Please see <u>https://iframe-resizer.com/pricing</> for more details."):s():G("In page linking not enabled"),{findTarget:n}}(),void 0===X&&(X=`${_}px`),lt("margin",(n="margin",(r=X).includes("-")&&(se(`Negative CSS value ignored for ${n}`),r=""),r)),lt("background",J),lt("padding",ne),function(){const e=document.createElement("div");e.style.clear="both",e.style.display="block",e.style.height="0",document.body.append(e)}(),function(){const e=e=>e.style.setProperty("height","auto","important");e(document.documentElement),e(document.body),G("Set HTML & body height: %cauto !important",g)}(),!0!==H&&G("Auto Resize disabled"),function(e){ut({method:e,eventType:"After Print",eventName:"afterprint"}),ut({method:e,eventType:"Before Print",eventName:"beforeprint"}),ut({method:e,eventType:"Ready State Change",eventName:"readystatechange"})}("add"),function(){const e=new Set,t=[];let n=!1,o=0;const r=t=>{Y("Mutations observed:",t);for(const n of t){const{addedNodes:t,removedNodes:o}=n;for(const n of t)e.add(n);for(const t of o)e.delete(t)}},i=16,a=2,s=200;let l=1;function c(e){dt(),it(e),e.forEach(yt),e.clear()}function d(){const u=performance.now(),f=u-o,m=i*l+++a;if(f>m&&f<s)return Y("Backed off due to heavy workload on callStack"),G(`Delay: %c${W(f)}ms %c> Delay limit: %c${m}ms`,g,h,g),setTimeout(d,i*l),void(o=u);l=1,t.forEach(r),t.length=0,e.size>0&&c(e),rt(),nt(),n=!1,At(P,"Mutation Observed")}function u(e){t.push(e),n||(o=performance.now(),n=!0,requestAnimationFrame(d))}function f(){const e=new window.MutationObserver(u),t=document.querySelector("body"),n={attributes:!0,attributeFilter:[w,b],attributeOldValue:!1,characterData:!1,characterDataOldValue:!1,childList:!0,subtree:!0};return G("Setup <body> MutationObserver"),e.observe(t,n),e}f()}(),G("Setup ResizeObserver"),Le=new ResizeObserver(gt),Le.observe(document.body),ht.add(document.body),yt(document.body),ae!==de&&(G("Setup OverflowObserver"),Ne=(e=>{const t=e.side||$,n=e.onChange||F,o={root:e.root,rootMargin:"0px",threshold:1},r=window?.requestAnimationFrame||F,i=(e=!1)=>n(e),a=(e,n)=>0===e||e>n[t],s=(e,t)=>e.toggleAttribute(z,t),l=new IntersectionObserver((function(e){for(const o of e){const{boundingClientRect:e,rootBounds:r,target:i}=o,l=e[t],c=a(l,r)&&!((n=i).hidden||null===n.offsetParent||"none"===n.style.display);s(i,c)}var n;r(i)}),o),c=new WeakSet;return function(e){G("Attached overflowObservers");for(const t of e){const e=t.nodeType===Node.ELEMENT_NODE,n=c.has(t);!n&&e?(l.observe(t),c.add(t)):K(!n,"Node already observed",t)}}})({onChange:ot,root:document.documentElement,side:ae?$:S})),it(zt(document)()),tt(L(Xe)),G("Initialization complete"),At(x,"Init message from host page",void 0,void 0,y),document.title&&""!==document.title&&Ct(0,0,"title",document.title)}function tt(e){"complete"===document.readyState?B(e):R(document,"readystatechange",(()=>tt(e)))}function nt(){const e=document.querySelectorAll(`[${z}]`);qe=Array.from(e).filter((e=>!e.closest(`[${w}]`))),ze=qe.length>0}function ot(e){nt(),(ze||e)&&(ze?Y("Overflowed Elements:",...qe):Y("Overflow removed"),At(A,"Overflow updated"))}function rt(){De=document.querySelectorAll(`[${b}]`),we=De.length>0,G(`Tagged elements found: %c${we}`,g)}function it(e){we||Ne(e)}let at=0;function st(){const n=document.querySelectorAll(`*[${w}]`);be=n.length>0,be&&n.length!==at&&(function(n){const o=1===n.length?"":"s";se(`%c[${w}]%c found on %c${n.length}%c element${o}`,t,e,t,e)}(n),at=n.length)}function lt(e,t){void 0!==t&&""!==t&&"null"!==t&&(document.body.style.setProperty(e,t),Y(`Set body ${e}: %c${t}`,g))}function ct(e,t,n){if(""!==n){G(`${e}: %c${n}`,g);for(const e of document.querySelectorAll(n))G(`Applying ${t} to:`,e),e.toggleAttribute(t,!0)}}function dt(){ct("sizeSelector",b,We),ct("ignoreSelector",w,Oe)}function ut(e){({add(t){function n(){At(e.eventName,e.eventType)}i[t]=n,R(window,t,n,{passive:!0})},remove(e){const t=i[e];var n,o;delete i[e],n=e,o=t,window.removeEventListener(n,o,!1)}})[e.method](e.eventName),G(`${D(e.method)} event listener: %c${e.eventType}`,g)}function ft(e,t,n,o){return t!==e&&(e in n||(se(`${e} is not a valid option for ${o}CalculationMethod.`),e=t),e in r)&&le(`<rb>Deprecated ${o}CalculationMethod (${e})</>\n\nThis version of <i>iframe-resizer</> can auto detect the most suitable ${o} calculation method. It is recommended that you ${p?"remove this option.":"set this option to <b>'auto'</> when using an older version of <i>iframe-resizer</> on the parent page."}`),G(`Set ${o} calculation method: %c${e}`,g),e}function mt(){Se=ft(Se,a,Et,"height")}function pt(){_e=ft(_e,l,Mt,"width")}function gt(e){if(!Array.isArray(e)||0===e.length)return;const t=e[0].target;At(T,`Element resized <${U(t)}>`)}const ht=new WeakSet;function yt(e){if(e.nodeType!==Node.ELEMENT_NODE)return;if(!ht.has(e)){const t=getComputedStyle(e)?.position;""!==t&&"static"!==t&&(Le.observe(e),ht.add(e),G(`Attached resizeObserver: %c${U(e)}`,g))}const t=zt(e)();for(const e of t){if(ht.has(e)||e?.nodeType!==Node.ELEMENT_NODE)continue;const t=getComputedStyle(e)?.position;""!==t&&"static"!==t&&(Le.observe(e),ht.add(e),G(`Attached resizeObserver: %c${U(e)}`,g))}}function vt(e){performance.mark(ye);const t=D(e);let n=0,o=document.documentElement,r=we?0:document.documentElement.getBoundingClientRect().bottom;const i=we?De:ze?qe:zt(document)();for(const t of i)n=t.getBoundingClientRect()[e]+parseFloat(getComputedStyle(t).getPropertyValue(`margin-${e}`)),n>r&&(r=n,o=t);return Y(`${t} position calculated from:`,o),performance.mark(ve,{detail:{hasTags:we,len:i.length,logging:Ae,Side:t}}),r}const bt=e=>[e.bodyOffset(),e.bodyScroll(),e.documentElementOffset(),e.documentElementScroll(),e.boundingClientRect()],zt=e=>()=>{st();const t=["* ","not(head)","not(meta)","not(base)","not(title)","not(script)","not(link)","not(style)","not(map)","not(area)","not(option)","not(optgroup)","not(template)","not(track)","not(wbr)","not(nobr)"];return be&&t.push(`not([${w}])`,`not([${w}] *)`),e.querySelectorAll(t.join(":"))},wt={height:0,width:0},$t={height:0,width:0},St=[g,h,g];function Ot(e){function t(){return $t[o]=r,wt[o]=s,r}const n=e===Et,o=n?"height":"width",r=e.boundingClientRect(),i=Math.ceil(r),a=Math.floor(r),s=(e=>e.documentElementScroll()+Math.max(0,e.getOffset()))(e),l=`HTML: %c${r}px %cPage: %c${s}px`;let c=0;switch(!0){case!e.enabled():return s;case we:Y("Found element with data-iframe-size attribute"),c=e.taggedElement();break;case!ze&&0===$t[o]&&0===wt[o]:Y(`Initial page size values: ${l}`,...St),c=t();break;case Ze&&r===$t[o]&&s===wt[o]:Y(`Size unchanged: ${l}`,...St),c=Math.max(r,s);break;case 0===r:Y(`Page is hidden: ${l}`,...St),c=s;break;case!ze&&r!==$t[o]&&s<=wt[o]:Y(`New <html> size: ${l} `,...St),Y(`Previous <html> size: %c${$t[o]}px`,g),c=t();break;case!n:c=e.taggedElement();break;case!ze&&r<$t[o]:Y(`<html> size decreased: ${l}`,...St),c=t();break;case s===a||s===i:Y(`<html> size equals page size: ${l}`,...St),c=t();break;case r>s:Y(`Page size < <html> size: ${l}`,...St),c=t();break;case ze:Y("Found element overflowing <html> "),c=e.taggedElement();break;default:Y(`Using <html> size: ${l}`,...St),c=t()}return Y(`Content ${o}: %c${c}px`,g),c+=function(e){const t=e.getOffset();return 0!==t&&Y(`Page offsetSize: %c${t}px`,g),t}(e),c}const Et={enabled:()=>ae,getOffset:()=>c,auto:()=>Ot(Et),bodyOffset:()=>{const{body:e}=document,t=getComputedStyle(e);return e.offsetHeight+parseInt(t.marginTop,v)+parseInt(t.marginBottom,v)},bodyScroll:()=>document.body.scrollHeight,offset:()=>Et.bodyOffset(),custom:()=>o.height(),documentElementOffset:()=>document.documentElement.offsetHeight,documentElementScroll:()=>document.documentElement.scrollHeight,boundingClientRect:()=>Math.max(document.documentElement.getBoundingClientRect().bottom,document.body.getBoundingClientRect().bottom),max:()=>Math.max(...bt(Et)),min:()=>Math.min(...bt(Et)),grow:()=>Et.max(),lowestElement:()=>vt($),taggedElement:()=>vt($)},Mt={enabled:()=>de,getOffset:()=>d,auto:()=>Ot(Mt),bodyScroll:()=>document.body.scrollWidth,bodyOffset:()=>document.body.offsetWidth,custom:()=>o.width(),documentElementScroll:()=>document.documentElement.scrollWidth,documentElementOffset:()=>document.documentElement.offsetWidth,boundingClientRect:()=>Math.max(document.documentElement.getBoundingClientRect().right,document.body.getBoundingClientRect().right),max:()=>Math.max(...bt(Mt)),min:()=>Math.min(...bt(Mt)),rightMostElement:()=>vt(S),scroll:()=>Math.max(Mt.bodyScroll(),Mt.documentElementScroll()),taggedElement:()=>vt(S)},kt=(e,t)=>!(Math.abs(e-t)<=Ve);function jt(e,t){const n=e[t]();return e.enabled()&&void 0!==N?function(e){const t=N(e);if(void 0===t)throw new TypeError("No value returned from onBeforeResize(), expected a numeric value");if(Number.isNaN(t))throw new TypeError(`Invalid value returned from onBeforeResize(): ${t}, expected Number`);return t}(n):n}let It=!1;const Tt=L((()=>ce(q(4)))),At=oe(((e,t,n,o,r)=>{if(m=performance.now(),f=!0,re(e),!0!==It)return H||e in j?void(document.hidden?G("Page hidden - Ignored resize request"):(It=!0,requestAnimationFrame((()=>{It=!1})),function(e,t,n,o,r){const i=n??jt(Et,Se),a=o??jt(Mt,_e),s=ae&&kt($e,i)||de&&kt(Je,a)?E:e;switch(G(`Resize event: %c${t}`,g),s){case x:case O:case E:$e=i,Je=a;case I:Ct($e,Je,e,r);break;case T:case A:case P:G(C);break;default:Y(C)}f=!1}(e,t,n,o,r))):(Y("Resizing disabled"),void te())}));function Pt(e){$e=Et[Se](),Je=Mt[_e](),Ct($e,Je,e)}const Ct=oe((function(e,t,o,r,i){Ce<-1||(re(o),void 0!==i?G(`Message targetOrigin: %c${i}`,g):i=Ue,function(){const a=`${Re}:${e}:${t}:${o}${void 0===r?"":`:${r}`}`;if(Fe)try{window.parent.iframeParentListener(s+a)}catch(e){if(1!==Ce)throw e;return void Tt()}else He.postMessage(s+a,i);f&&G(function(){const e=W(performance.now()-m);return o===x?`Initialised iFrame in %c${e}ms`:`Size calculated in %c${e}ms`}(),g),Y(`Sending message to parent page via ${Fe?"sameOrigin":"postMessage"}: %c%c${a}`,n,g)}(),te())})),xt=oe((function(e){re("onMessage");const{freeze:t}=Object,{parse:n}=JSON,o=e=>t(n(e)),r=e=>Ct(0,0,`${e}Stop`),i={init:function(){if("loading"===document.readyState)return void G("Page not ready, ignoring init message");const t=e.data.slice(13).split(":");He=e.source,u=e.origin,et(t),pe=!1,setTimeout((()=>{Ee=!1}),128)},reset(){Ee?G("Page reset ignored by init"):(G("Page size reset by host page"),Pt("resetPage"))},resize(){G("Resize requested by host page"),At(k,"Parent window requested size check")},moveToAnchor(){Me.findTarget(l())},inPageLink(){this.moveToAnchor()},pageInfo(){const e=l();G("PageInfo received from parent:",o(e)),Ye?B(Ye,n(e)):r("pageInfo")},parentInfo(){const e=o(l());G("ParentInfo received from parent:",e),Ke?B(Ke,e):r("parentInfo")},message(){const e=l();G("onMessage called from parent:%c",g,o(e)),B(Ge,n(e))}},a=()=>e.data.split("]")[1].split(":")[0],l=()=>e.data.slice(e.data.indexOf(":")+1),c=()=>e.data.split(":")[2]in{true:1,false:1};function d(){const t=a();re(t),t in i?i[t]():"iframeResize"in window||void 0!==window.jQuery&&""in window.jQuery.prototype||c()||se(`Unexpected message (${e.data})`)}s===`${e.data}`.slice(0,13)&&function(){if(!1!==pe)return c()?(ie(a()),re(x),void i.init()):void G(`Ignored message of type "${a()}". Received before initialization.`);d()}()}));function Rt(){"loading"!==document.readyState&&window.parent.postMessage("[iFrameResizerChild]Ready","*")}"iframeChildListener"in window?se("Already setup"):(window.iframeChildListener=e=>setTimeout((()=>xt({data:e,sameOrigin:!0}))),R(window,"message",xt),R(window,"readystatechange",Rt),Rt())}()}();
|
|
21
|
-
//# sourceMappingURL=iframeResizer.contentWindow.min.js.map
|
|
20
|
+
!function(){"use strict";const e="font-weight: normal;",t="font-weight: bold;",n="font-style: italic;",o=e+n,r="default",i=Object.freeze({assert:!0,error:!0,warn:!0}),a={expand:!0,defaultEvent:void 0,event:void 0,label:"AutoConsoleGroup",showTime:!0},s={profile:0,profileEnd:0,timeStamp:0,trace:0},l=Object.assign(console);const{fromEntries:c,keys:u}=Object,d=e=>[e,l[e]],f=e=>t=>[t,function(n){e[t]=n}],m=(e,t)=>c(u(e).map(t));const p=!(typeof window>"u"||"function"!=typeof window.matchMedia)&&window.matchMedia("(prefers-color-scheme: dark)").matches,h=p?"color: #A9C7FB;":"color: #135CD2;",g=p?"color: #E3E3E3;":"color: #1F1F1F;",y="5.4.7",b=10,v="data-iframe-size",z="data-iframe-overflowed",w="data-iframe-ignore",$="bottom",S="right",E="autoResizeEnabled",O=Symbol("sizeChanged"),j="manualResize",k="parentResize",M={[j]:1,[k]:1},T="setOffsetSize",C="resizeObserver",x="overflowObserver",A="mutationObserver",I="none",P="init",N=(e,t,n,o)=>e.addEventListener(t,n,o||!1),R=["<iy><yi>Puchspk Spjluzl Rlf</><iy><iy>","<iy><yi>Tpzzpun Spjluzl Rlf</><iy><iy>","Aopz spiyhyf pz hchpshisl dpao ivao Jvttlyjphs huk Vwlu-Zvbyjl spjluzlz.<iy><iy><i>Jvttlyjphs Spjluzl</><iy>Mvy jvttlyjphs bzl, <p>pmyhtl-ylzpgly</> ylxbpylz h svd jvza vul aptl spjluzl mll. Mvy tvyl pumvythapvu cpzpa <b>oaawz://pmyhtl-ylzpgly.jvt/wypjpun</>.<iy><iy><i>Vwlu Zvbyjl Spjluzl</><iy>Pm fvb hyl bzpun aopz spiyhyf pu h uvu-jvttlyjphs vwlu zvbyjl wyvqlja aolu fvb jhu bzl pa mvy myll bukly aol alytz vm aol NWS C3 Spjluzl. Av jvumpyt fvb hjjlwa aolzl alytz, wslhzl zla aol <i>spjluzl</> rlf pu <p>pmyhtl-ylzpgly</> vwapvuz av <i>NWSc3</>.<iy><iy>Mvy tvyl pumvythapvu wslhzl zll: <b>oaawz://pmyhtl-ylzpgly.jvt/nws</>","<i>NWSc3 Spjluzl Clyzpvu</><iy><iy>Aopz clyzpvu vm <p>pmyhtl-ylzpgly</> pz ilpun bzlk bukly aol alytz vm aol <i>NWS C3</> spjluzl. Aopz spjluzl hssvdz fvb av bzl <p>pmyhtl-ylzpgly</> pu Vwlu Zvbyjl wyvqljaz, iba pa ylxbpylz fvby wyvqlja av il wbispj, wyvcpkl haaypibapvu huk il spjluzlk bukly clyzpvu 3 vy shaly vm aol NUB Nlulyhs Wbispj Spjluzl.<iy><iy>Pm fvb hyl bzpun aopz spiyhyf pu h uvu-vwlu zvbyjl wyvqlja vy dlizpal, fvb dpss ullk av wbyjohzl h svd jvza vul aptl jvttlyjphs spjluzl.<iy><iy>Mvy tvyl pumvythapvu cpzpa <b>oaawz://pmyhtl-ylzpgly.jvt/wypjpun</>.","<iy><yi>Zvsv spjluzl kvlz uva zbwwvya jyvzz-kvthpu</><iy><iy>Av bzl <p>pmyhtl-ylzpgly</> dpao jyvzz kvthpu pmyhtlz fvb ullk lpaoly aol Wyvmlzzpvuhs vy Ibzpulzz spjluzlz. Mvy klahpsz vu bwnyhkl wypjpun wslhzl jvuahja pumv@pmyhtl-ylzpgly.jvt."];Object.fromEntries(["2cgs7fdf4xb","1c9ctcccr4z","1q2pc4eebgb","ueokt0969w","w2zxchhgqz","1umuxblj2e5"].map(((e,t)=>[e,Math.max(0,t-1)])));const B=e=>(e=>e.replace(/[A-Za-z]/g,(e=>String.fromCodePoint((e<="Z"?90:122)>=(e=e.codePointAt(0)+19)?e:e-26))))(R[e]),q=(e,...t)=>setTimeout((()=>e(...t)),0),L=e=>{let t=!1;return function(){return t?void 0:(t=!0,Reflect.apply(e,this,arguments))}},F=e=>e,W=e=>Math.round(1e3*e)/1e3,D=e=>e.charAt(0).toUpperCase()+e.slice(1),H=e=>""!=`${e}`&&void 0!==e;const U=(e,t,n)=>{if(typeof e!==t)throw new TypeError(`${n} is not a ${D(t)}`)};let V=!0;const Z=(J=function(n={}){const c={},u={},p=[],h={...a,expand:!n.collapsed||a.expanded,...n};let g="";function y(){p.length=0,g=""}function b(){delete h.event,y()}const v=()=>!!p.some((([e])=>e in i))||!!h.expand;function z(){if(0!==p.length){l[v()?"group":"groupCollapsed"](`%c${h.label}%c ${(e=>{const t=e.event||e.defaultEvent;return t?`${t}`:""})(h)} %c${h.showTime?g:""}`,e,t,o);for(const[e,...t]of p)l.assert(e in l,`Unknown console method: ${e}`),e in l&&l[e](...t);l.groupEnd(),b()}else b()}function w(){""===g&&(g=function(){const e=new Date,t=(t,n)=>e[t]().toString().padStart(n,"0");return`@ ${t("getHours",2)}:${t("getMinutes",2)}:${t("getSeconds",2)}.${t("getMilliseconds",3)}`}())}function $(e,...t){0===p.length&&(w(),queueMicrotask((()=>queueMicrotask(z)))),p.push([e,...t])}function S(e=r,...t){c[e]?$("log",`${e}: ${performance.now()-c[e]} ms`,...t):$("timeLog",e,...t)}return{...m(h,f(h)),...m(console,(e=>[e,(...t)=>$(e,...t)])),...m(s,d),assert:function(e,...t){e||$("assert",e,...t)},count:function(e=r){u[e]?u[e]+=1:u[e]=1,$("log",`${e}: ${u[e]}`)},countReset:function(e=r){delete u[e]},endAutoGroup:z,errorBoundary:e=>(...t)=>{let n;try{n=e(...t)}catch(e){if(!Error.prototype.isPrototypeOf(e))throw e;$("error",e)}return n},event:function(e){w(),h.event=e},purge:y,time:function(e=r){w(),c[e]=performance.now()},timeEnd:function(e=r){S(e),delete c[e]},timeLog:S,touch:w}},J?.__esModule?J.default:J);var J;const _=Z({label:"iframeResizer(child)"});var Q;const G=(Q="log",(...e)=>!V||_[Q](...e)),{assert:Y,debug:X,endAutoGroup:K,error:ee,errorBoundary:te,event:ne,label:oe,purge:re,warn:ie}=_,ae=e=>{return _.warn((t=F,e=>window.chrome?t(e.replaceAll("<br>","\n").replaceAll("<rb>","[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},se=ae,le=(e=>(t,n="renamed to")=>(o,r,i="",a="")=>e(a,`<rb>Deprecated ${t}(${o.replace("()","")})</>\n\nThe <b>${o}</> ${t.toLowerCase()} has been ${n} <b>${r}</>. ${i}Use of the old ${t.toLowerCase()} will be removed in a future version of <i>iframe-resizer</>.`))(((e,t)=>ae(t))),ce=le("Method"),ue=le("Method","replaced with"),de=le("Option"),fe=["min-height","min-width","max-height","max-width"],me=new Set,pe=(e,t)=>window.getComputedStyle(e).getPropertyValue(t),he=(e,t)=>{return(n=pe(e,t))&&"0px"!==n&&"auto"!==n&&"none"!==n;var n};function ge({href:e}){me.has(e)||me.add(e)}const ye=(e,t)=>function(e,t){const n=e.style[t];return n?{source:"an inline style attribute",value:n}:null}(e,t)||function(e,t){for(const n of document.styleSheets)try{for(const o of n.cssRules||[])if(o.selectorText&&e.matches(o.selectorText)){const e=o.style[t];if(e)return{source:"STYLE"===n.ownerNode.tagName?"an inline <style> block":`stylesheet (${n.href})`,value:e}}}catch(e){ge(n)}return{source:"cross-origin stylesheet",value:pe(e,t)}}(e,t),be=(e,t)=>{const{source:n,value:o}=ye(e,t),r=(e=>e.tagName?e.tagName.toLowerCase():"unknown")(e);ae(`The <b>${t}</> CSS property is set to <b>${o}</> on the <b><${r}></> element via ${n}. This may cause issues with the correct operation of <i>iframe-resizer</>.\n\nIf you wish to restrict the size of the iframe, then you should set this property on the iframe element itself, not the content inside it.`)};function ve(){for(const e of[document.documentElement,document.body])for(const t of fe)he(e,t)&&be(e,t)}const ze=e=>t=>void 0===t?void 0:e(t),we=ze((e=>"true"===e)),$e=ze(Number),Se="--ifr-start",Ee="--ifr-end",Oe=[],je=new WeakSet,ke=e=>"object"==typeof e&&je.add(e);let Me={},Te=0;const Ce=setInterval((()=>{if(Oe.length<10)return;if(Me.hasTags&&Me.len<25)return;Oe.sort();const e=Math.min(Oe.reduce(((e,t)=>e+t),0)/Oe.length,Oe[Math.floor(Oe.length/2)]),t=W(e);t>Te&&(Te=t,ne("performanceObserver")),e<=4||(clearInterval(Ce),ae(`<rb>Performance Warning</>\n\nCalculating the page size is taking an excessive amount of time (${W(e)}ms).\n\nTo improve performance add the <b>data-iframe-size</> attribute to the ${Me.Side.toLowerCase()} most element on the page. For more details see: <u>https://iframe-resizer.com/perf</>.`))}),5e3);function xe(e){e.getEntries().forEach((e=>{if(e.name===Ee){const{duration:t}=performance.measure("--ifr-measure",Se,Ee);Me=e.detail,Oe.push(t),Oe.length>100&&Oe.shift()}}))}function Ae(){new PerformanceObserver(xe).observe({entryTypes:["mark"]}),ke(document.documentElement),ke(document.body)}"undefined"!=typeof document&&"undefined"!=typeof PerformanceObserver&&("loading"===document.readyState?document.addEventListener("DOMContentLoaded",Ae):Ae());const Ie=e=>(t,n)=>{if(n in t){if(typeof t[n]===e)return t[n];throw new TypeError(`${n} is not a ${e}.`)}},Pe=Ie("function"),Ne=Ie("number"),Re=Ie("string");"undefined"!=typeof window&&function(){const o={height:()=>(ie("Custom height calculation function not defined"),St.auto()),width:()=>(ie("Custom width calculation function not defined"),Et.auto())},r={bodyOffset:1,bodyScroll:1,offset:1,documentElementOffset:1,documentElementScroll:1,boundingClientRect:1,max:1,min:1,grow:1,lowestElement:1},i={},a="auto",s="[iFrameSizer]",l="scroll";let c,u,d,f,m,p=!0,R="",W=0,Z="",J="",Q=!1,X=!0,ee=!1,le=!0,fe=!1,me=!1,pe=!1,he=1,ge=a,ye="",be=!0,ze={},Oe=!0,je=!1,ke="",Me=0,Te=!1,Ce="",xe=F,Ae=[],Ie="child",Be=null,qe=!1,Le="",Fe=[],We=window.parent,De="*",He=0,Ue=!1,Ve=1,Ze=l,Je=window,_e=()=>{ie("onMessage function not defined")},Qe=()=>{},Ge=null,Ye=null;function Xe(e){var t,n,r;!function(e){Ce=e[0]??Ce,W=$e(e[1])??W,ee=we(e[2])??ee,je=we(e[3])??je,p=we(e[6])??p,Z=e[7]??Z,ge=e[8]??ge,R=e[9]??R,J=e[10]??J,He=$e(e[11])??He,ze.enable=we(e[12])??!1,Ie=e[13]??Ie,Ze=e[14]??Ze,Te=we(e[15])??Te,c=$e(e[16])??c,u=$e(e[17])??u,X=we(e[18])??X,ke=e[19]??ke,f=e[20]??f,Me=$e(e[21])??Me,Oe=we(e[23])??Oe}(e),t={id:Ce,enabled:je,expand:Oe},_.label(`${t.id}`),_.expand(t.expand),V=t.enabled,function(){function e(e){m=Pe(e,"onBeforeResize")??m,_e=Pe(e,"onMessage")??_e,Qe=Pe(e,"onReady")??Qe,"number"==typeof e?.offset&&(de("offset","offsetSize"),X&&(c=Ne(e,"offset")??c),ee&&(u=Ne(e,"offset")??u)),"number"==typeof e?.offsetSize&&(X&&(c=Ne(e,"offsetSize")??c),ee&&(u=Ne(e,"offsetSize")??u)),ye=Re(e,"ignoreSelector")??ye,Le=Re(e,"sizeSelector")??Le,De=Re(e,"targetOrigin")??De,ge=e?.heightCalculationMethod||ge,Ze=e?.widthCalculationMethod||Ze}function t(e,t){return"function"==typeof e&&(ae(`<rb>Deprecated Option(${t}CalculationMethod)</>\n\nThe use of <b>${t}CalculationMethod</> as a function is deprecated and will be removed in a future version of <i>iframe-resizer</>. Please use the new <b>onBeforeResize</> event handler instead.\n\nSee <u>https://iframe-resizer.com/api/child</> for more details.`),o[t]=e,e="custom"),e}if(1===Me)return;const n=window.iframeResizer||window.iFrameResizer;"object"==typeof n&&(e(n),ge=t(ge,"height"),Ze=t(Ze,"width"),G(`Set targetOrigin for parent: %c${De}`,h))}(),lt(),function(){try{qe=1===Me||"iframeParentListener"in window.parent}catch(e){}}(),ee===X&&(Q=!0),Me<0?se(`${B(Me+2)}${B(2)}`):f?.codePointAt(0)>4||Me<2&&se(B(3)),f&&""!==f&&"false"!==f?f!==y&&ae(`<b>Version mismatch</>\n\nThe parent and child pages are running different versions of <i>iframe resizer</>.\n\nParent page: ${f} - Child page: ${y}.\n`):ae("<rb>Legacy version detected on parent page</>\n\nDetected legacy version of parent page script. It is recommended to update the parent page to use <b>@iframe-resizer/parent</>.\n\nSee <u>https://iframe-resizer.com/setup/</> for more details.\n"),dt(),ft(),function(){let e=!1;const t=t=>document.querySelectorAll(`[${t}]`).forEach((n=>{e=!0,n.removeAttribute(t),n.toggleAttribute(v,!0)}));t("data-iframe-height"),t("data-iframe-width"),e&&ae("<rb>Deprecated Attributes</>\n \nThe <b>data-iframe-height</> and <b>data-iframe-width</> attributes have been deprecated and replaced with the single <b>data-iframe-size</> attribute. Use of the old attributes will be removed in a future version of <i>iframe-resizer</>.")}(),"BackCompat"===document.compatMode&&ae("<rb>Quirks Mode Detected</>\n\nThis iframe is running in the browser's legacy <b>Quirks Mode</>, this may cause issues with the correct operation of <i>iframe-resizer</>. It is recommended that you switch to the modern <b>Standards Mode</>.\n\nFor more information see <u>https://iframe-resizer.com/quirks-mode</>.\n"),nt(),Q||ve(),1!==Me&&(Je.parentIframe=Object.freeze({autoResize:e=>(U(e,"boolean","parentIframe.autoResize(enable) enable"),!1===ee&&!1===X?(ne(E),ae(`Auto Resize can not be changed when <b>direction</> is set to '${I}'.`),!1):(!0===e&&!1===p?(p=!0,queueMicrotask((()=>Tt(E,"Auto Resize enabled")))):!1===e&&!0===p&&(p=!1),xt(0,0,"autoResize",JSON.stringify(p)),p)),close(){xt(0,0,"close")},getId:()=>Ce,getOrigin:()=>(ce("getOrigin()","getParentOrigin()"),d),getParentOrigin:()=>d,getPageInfo(e){if("function"==typeof e)return Ge=e,xt(0,0,"pageInfo"),void ue("getPageInfo()","getParentProps()","See <u>https://iframe-resizer.com/upgrade</> for details. ");Ge=null,xt(0,0,"pageInfoStop")},getParentProps:e=>(U(e,"function","parentIframe.getParentProps(callback) callback"),Ye=e,xt(0,0,"parentInfo"),()=>{Ye=null,xt(0,0,"parentInfoStop")}),getParentProperties(e){ce("getParentProperties()","getParentProps()"),this.getParentProps(e)},moveToAnchor(e){U(e,"string","parentIframe.moveToAnchor(anchor) anchor"),ze.findTarget(e)},reset(){!function(){const e=ge;ge=a,Ue||(Ue=!0,requestAnimationFrame((()=>{Ue=!1}))),Ct("reset"),ge=e}()},setOffsetSize(e){U(e,"number","parentIframe.setOffsetSize(offset) offset"),c=e,u=e,Tt(T,`parentIframe.setOffsetSize(${e})`)},scrollBy(e,t){U(e,"number","parentIframe.scrollBy(x, y) x"),U(t,"number","parentIframe.scrollBy(x, y) y"),xt(t,e,"scrollBy")},scrollTo(e,t){U(e,"number","parentIframe.scrollTo(x, y) x"),U(t,"number","parentIframe.scrollTo(x, y) y"),xt(t,e,"scrollTo")},scrollToOffset(e,t){U(e,"number","parentIframe.scrollToOffset(x, y) x"),U(t,"number","parentIframe.scrollToOffset(x, y) y"),xt(t,e,"scrollToOffset")},sendMessage(e,t){t&&U(t,"string","parentIframe.sendMessage(msg, targetOrigin) targetOrigin"),xt(0,0,"message",JSON.stringify(e),t)},setHeightCalculationMethod(e){ge=e,dt()},setWidthCalculationMethod(e){Ze=e,ft()},setTargetOrigin(e){U(e,"string","parentIframe.setTargetOrigin(targetOrigin) targetOrigin"),De=e},resize(e,t){e&&U(e,"number","parentIframe.resize(customHeight, customWidth) customHeight"),t&&U(t,"number","parentIframe.resize(customHeight, customWidth) customWidth"),Tt(j,`parentIframe.resize(${e||""}${t?`,${t}`:""})`,e,t)},size(e,t){ce("size()","resize()"),this.resize(e,t)}}),Je.parentIFrame=Je.parentIframe),function(){function e(e){xt(0,0,e.type,`${e.screenY}:${e.screenX}`)}function t(t,n){N(window.document,t,e)}!0===Te&&(t("mouseenter"),t("mouseleave"))}(),ze=function(){const e=()=>({x:document.documentElement.scrollLeft,y:document.documentElement.scrollTop});function t(t){const n=t.getBoundingClientRect(),o=e();return{x:parseInt(n.left,b)+parseInt(o.x,b),y:parseInt(n.top,b)+parseInt(o.y,b)}}function n(e){function n(e){const n=t(e);xt(n.y,n.x,"scrollToOffset")}const o=e.split("#")[1]||e,r=decodeURIComponent(o),i=document.getElementById(r)||document.getElementsByName(r)[0];void 0===i?xt(0,0,"inPageLink",`#${o}`):n(i)}function o(){const{hash:e,href:t}=window.location;""!==e&&"#"!==e&&n(t)}function r(){for(const e of document.querySelectorAll('a[href^="#"]'))"#"!==e.getAttribute("href")&&N(e,"click",(t=>{t.preventDefault(),n(e.getAttribute("href"))}))}function i(){N(window,"hashchange",o)}function a(){setTimeout(o,128)}function s(){r(),i(),a()}return ze.enable&&(1===Me?ae("In page linking requires a Professional or Business license. Please see <u>https://iframe-resizer.com/pricing</> for more details."):s()),{findTarget:n}}(),void 0===Z&&(Z=`${W}px`),at("margin",(n="margin",(r=Z).includes("-")&&(ie(`Negative CSS value ignored for ${n}`),r=""),r)),at("background",R),at("padding",J),function(){const e=document.createElement("div");e.style.clear="both",e.style.display="block",e.style.height="0",document.body.append(e)}(),Q||function(){const e=e=>e.style.setProperty("height","auto","important");e(document.documentElement),e(document.body)}(),function(e){ct({method:e,eventType:"After Print",eventName:"afterprint"}),ct({method:e,eventType:"Before Print",eventName:"beforeprint"}),ct({method:e,eventType:"Ready State Change",eventName:"readystatechange"})}("add"),function(){const e=new Set,t=[];let n=!1,o=0;const r=t=>{G("Mutations observed:",t);for(const n of t){const{addedNodes:t,removedNodes:o}=n;for(const n of t)e.add(n);for(const t of o)e.delete(t)}},i=16,a=2,s=200;let l=1;function c(e){lt(),ot(e),e.forEach(ht),e.clear()}function u(){const d=performance.now(),f=d-o;if(f>i*l+++a&&f<s)return G("Backed off due to heavy workload on callStack"),setTimeout(u,i*l),void(o=d);l=1,t.forEach(r),t.length=0,e.size>0&&c(e),nt(),et(),n=!1,Tt(A,"Mutation Observed")}function d(e){t.push(e),n||(o=performance.now(),n=!0,requestAnimationFrame(u))}function f(){const e=new window.MutationObserver(d),t=document.querySelector("body"),n={attributes:!0,attributeFilter:[w,v],attributeOldValue:!1,characterData:!1,characterDataOldValue:!1,childList:!0,subtree:!0};return e.observe(t,n),e}f()}(),Be=new ResizeObserver(mt),Be.observe(document.body),pt.add(document.body),ht(document.body),X!==ee&&(xe=(e=>{const t=e.side||$,n=e.onChange||F,o={root:e.root,rootMargin:"0px",threshold:1},r=window?.requestAnimationFrame||F,i=(e=!1)=>n(e),a=(e,n)=>0===e||e>n[t],s=(e,t)=>e.toggleAttribute(z,t),l=new IntersectionObserver((function(e){for(const o of e){const{boundingClientRect:e,rootBounds:r,target:i}=o,l=e[t],c=a(l,r)&&!((n=i).hidden||null===n.offsetParent||"none"===n.style.display);s(i,c)}var n;r(i)}),o),c=new WeakSet;return function(e){for(const t of e){const e=t.nodeType===Node.ELEMENT_NODE,n=c.has(t);!n&&e?(l.observe(t),c.add(t)):Y(!n,"Node already observed",t)}}})({onChange:tt,root:document.documentElement,side:X?$:S})),ot(bt(document)()),Ke(L(Qe)),Tt(P,"Init message from host page",void 0,void 0,y),document.title&&""!==document.title&&xt(0,0,"title",document.title)}function Ke(e){"complete"===document.readyState?q(e):N(document,"readystatechange",(()=>Ke(e)))}function et(){const e=document.querySelectorAll(`[${z}]`);Ae=Array.from(e).filter((e=>!e.closest(`[${w}]`))),me=Ae.length>0}function tt(e){et(),(me||e)&&(me?G("Overflowed Elements:",...Ae):G("Overflow removed"),Tt(x,"Overflow updated"))}function nt(){Fe=document.querySelectorAll(`[${v}]`),pe=Fe.length>0}function ot(e){pe||xe(e)}let rt=0;function it(){const n=document.querySelectorAll(`*[${w}]`);fe=n.length>0,fe&&n.length!==rt&&(function(n){const o=1===n.length?"":"s";ie(`%c[${w}]%c found on %c${n.length}%c element${o}`,t,e,t,e)}(n),rt=n.length)}function at(e,t){void 0!==t&&""!==t&&"null"!==t&&(document.body.style.setProperty(e,t),G(`Set body ${e}: %c${t}`,h))}function st(e,t,n){if(""!==n)for(const e of document.querySelectorAll(n))e.toggleAttribute(t,!0)}function lt(){st(0,v,Le),st(0,w,ye)}function ct(e){({add(t){function n(){Tt(e.eventName,e.eventType)}i[t]=n,N(window,t,n,{passive:!0})},remove(e){const t=i[e];var n,o;delete i[e],n=e,o=t,window.removeEventListener(n,o,!1)}})[e.method](e.eventName)}function ut(e,t,n,o){return t!==e&&(e in n||(ie(`${e} is not a valid option for ${o}CalculationMethod.`),e=t),e in r)&&ae(`<rb>Deprecated ${o}CalculationMethod (${e})</>\n\nThis version of <i>iframe-resizer</> can auto detect the most suitable ${o} calculation method. It is recommended that you ${f?"remove this option.":"set this option to <b>'auto'</> when using an older version of <i>iframe-resizer</> on the parent page."}`),e}function dt(){ge=ut(ge,a,St,"height")}function ft(){Ze=ut(Ze,l,Et,"width")}function mt(e){if(!Array.isArray(e)||0===e.length)return;const t=e[0].target;Tt(C,`Element resized <${function(e){switch(!0){case!H(e):return"";case H(e.id):return`${e.nodeName}#${e.id}`;case H(e.name):return`${e.nodeName} (${e.name}`;case H(e.className):return`${e.nodeName}.${e.className}`;default:return e.nodeName}}(t)}>`)}const pt=new WeakSet;function ht(e){if(e.nodeType!==Node.ELEMENT_NODE)return;if(!pt.has(e)){const t=getComputedStyle(e)?.position;""!==t&&"static"!==t&&(Be.observe(e),pt.add(e))}const t=bt(e)();for(const e of t){if(pt.has(e)||e?.nodeType!==Node.ELEMENT_NODE)continue;const t=getComputedStyle(e)?.position;""!==t&&"static"!==t&&(Be.observe(e),pt.add(e))}}function gt(e){performance.mark(Se);const t=D(e);let n=0,o=document.documentElement,r=pe?0:document.documentElement.getBoundingClientRect().bottom;const i=pe?Fe:me?Ae:bt(document)();for(const t of i)n=t.getBoundingClientRect()[e]+parseFloat(getComputedStyle(t).getPropertyValue(`margin-${e}`)),n>r&&(r=n,o=t);return G(`${t} position calculated from:`,o),performance.mark(Ee,{detail:{hasTags:pe,len:i.length,logging:je,Side:t}}),r}const yt=e=>[e.bodyOffset(),e.bodyScroll(),e.documentElementOffset(),e.documentElementScroll(),e.boundingClientRect()],bt=e=>()=>{it();const t=["* ","not(head)","not(meta)","not(base)","not(title)","not(script)","not(link)","not(style)","not(map)","not(area)","not(option)","not(optgroup)","not(template)","not(track)","not(wbr)","not(nobr)"];return fe&&t.push(`not([${w}])`,`not([${w}] *)`),e.querySelectorAll(t.join(":"))},vt={height:0,width:0},zt={height:0,width:0},wt=[h,g,h];function $t(e){function t(){return zt[o]=r,vt[o]=s,r}const n=e===St,o=n?"height":"width",r=e.boundingClientRect(),i=Math.ceil(r),a=Math.floor(r),s=(e=>e.documentElementScroll()+Math.max(0,e.getOffset()))(e),l=`HTML: %c${r}px %cPage: %c${s}px`;let c=0;switch(!0){case!e.enabled():return s;case pe:G("Found element with data-iframe-size attribute"),c=e.taggedElement();break;case!me&&0===zt[o]&&0===vt[o]:G(`Initial page size values: ${l}`,...wt),c=t();break;case Ue&&r===zt[o]&&s===vt[o]:G(`Size unchanged: ${l}`,...wt),c=Math.max(r,s);break;case 0===r:G(`Page is hidden: ${l}`,...wt),c=s;break;case!me&&r!==zt[o]&&s<=vt[o]:G(`New <html> size: ${l} `,...wt),G(`Previous <html> size: %c${zt[o]}px`,h),c=t();break;case!n:c=e.taggedElement();break;case!me&&r<zt[o]:G(`<html> size decreased: ${l}`,...wt),c=t();break;case s===a||s===i:G(`<html> size equals page size: ${l}`,...wt),c=t();break;case r>s:G(`Page size < <html> size: ${l}`,...wt),c=t();break;case me:G("Found element overflowing <html> "),c=e.taggedElement();break;default:G(`Using <html> size: ${l}`,...wt),c=t()}return G(`Content ${o}: %c${c}px`,h),c+=function(e){const t=e.getOffset();return 0!==t&&G(`Page offsetSize: %c${t}px`,h),t}(e),c}const St={enabled:()=>X,getOffset:()=>c,auto:()=>$t(St),bodyOffset:()=>{const{body:e}=document,t=getComputedStyle(e);return e.offsetHeight+parseInt(t.marginTop,b)+parseInt(t.marginBottom,b)},bodyScroll:()=>document.body.scrollHeight,offset:()=>St.bodyOffset(),custom:()=>o.height(),documentElementOffset:()=>document.documentElement.offsetHeight,documentElementScroll:()=>document.documentElement.scrollHeight,boundingClientRect:()=>Math.max(document.documentElement.getBoundingClientRect().bottom,document.body.getBoundingClientRect().bottom),max:()=>Math.max(...yt(St)),min:()=>Math.min(...yt(St)),grow:()=>St.max(),lowestElement:()=>gt($),taggedElement:()=>gt($)},Et={enabled:()=>ee,getOffset:()=>u,auto:()=>$t(Et),bodyScroll:()=>document.body.scrollWidth,bodyOffset:()=>document.body.offsetWidth,custom:()=>o.width(),documentElementScroll:()=>document.documentElement.scrollWidth,documentElementOffset:()=>document.documentElement.offsetWidth,boundingClientRect:()=>Math.max(document.documentElement.getBoundingClientRect().right,document.body.getBoundingClientRect().right),max:()=>Math.max(...yt(Et)),min:()=>Math.min(...yt(Et)),rightMostElement:()=>gt(S),scroll:()=>Math.max(Et.bodyScroll(),Et.documentElementScroll()),taggedElement:()=>gt(S)},Ot=(e,t)=>!(Math.abs(e-t)<=He);function jt(e,t){const n=e[t]();return e.enabled()&&void 0!==m?function(e){const t=m(e);if(void 0===t)throw new TypeError("No value returned from onBeforeResize(), expected a numeric value");if(Number.isNaN(t))throw new TypeError(`Invalid value returned from onBeforeResize(): ${t}, expected Number`);return t}(n):n}let kt=!1;const Mt=L((()=>se(B(4)))),Tt=te(((e,t,n,o,r)=>{if(performance.now(),ne(e),!0!==kt)return p||e in M?void(document.hidden||(kt=!0,requestAnimationFrame((()=>{kt=!1})),function(e,t,n,o,r){const i=n??jt(St,ge),a=o??jt(Et,Ze);switch(X&&Ot(he,i)||ee&&Ot(Ve,a)?O:e){case P:case E:case O:he=i,Ve=a;case T:xt(he,Ve,e,r);break;case C:case x:case A:re();break;default:re(),G("No change in content size detected")}}(e,0,n,o,r))):(G("Resizing disabled"),void K())}));function Ct(e){he=St[ge](),Ve=Et[Ze](),xt(he,Ve,e)}const xt=te((function(e,t,o,r,i){Me<-1||(ne(o),void 0!==i||(i=De),function(){const a=`${Ce}:${e}:${t}:${o}${void 0===r?"":`:${r}`}`;if(qe)try{window.parent.iframeParentListener(s+a)}catch(e){if(1!==Me)throw e;return void Mt()}else We.postMessage(s+a,i);G(`Sending message to parent page via ${qe?"sameOrigin":"postMessage"}: %c%c${a}`,n,h)}(),K())})),At=te((function(e){ne("onMessage");const{freeze:t}=Object,{parse:n}=JSON,o=e=>xt(0,0,`${e}Stop`),r={init:function(){if("loading"===document.readyState)return;const t=e.data.slice(13).split(":");We=e.source,d=e.origin,Xe(t),le=!1,setTimeout((()=>{be=!1}),128)},reset(){be||Ct("resetPage")},resize(){Tt(k,"Parent window requested size check")},moveToAnchor(){ze.findTarget(a())},inPageLink(){this.moveToAnchor()},pageInfo(){const e=a();Ge?q(Ge,n(e)):o("pageInfo")},parentInfo(){const e=(r=a(),t(n(r)));var r;Ye?q(Ye,e):o("parentInfo")},message(){const e=a();q(_e,n(e))}},i=()=>e.data.split("]")[1].split(":")[0],a=()=>e.data.slice(e.data.indexOf(":")+1),l=()=>e.data.split(":")[2]in{true:1,false:1};function c(){const t=i();ne(t),t in r?r[t]():"iframeResize"in window||void 0!==window.jQuery&&""in window.jQuery.prototype||l()||ie(`Unexpected message (${e.data})`)}s===`${e.data}`.slice(0,13)&&function(){if(!1!==le)return l()?(oe(i()),ne(P),void r.init()):void 0;c()}()}));function It(){"loading"!==document.readyState&&window.parent.postMessage("[iFrameResizerChild]Ready","*")}"iframeChildListener"in window?ie("Already setup"):(window.iframeChildListener=e=>setTimeout((()=>At({data:e,sameOrigin:!0}))),N(window,"message",At),N(window,"readystatechange",It),It())}()}();
|
package/js/iframeResizer.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* @preserve
|
|
3
3
|
*
|
|
4
|
-
* @module iframe-resizer/legacy (parent) 5.4.7
|
|
4
|
+
* @module iframe-resizer/legacy (parent) 5.4.7 (umd) - 2025-07-08
|
|
5
5
|
*
|
|
6
6
|
* @license GPL-3.0 for non-commercial use only.
|
|
7
7
|
* For commercial use, you must purchase a license from
|
|
@@ -17,5 +17,4 @@
|
|
|
17
17
|
*/
|
|
18
18
|
|
|
19
19
|
|
|
20
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).iframeResize=t()}(this,(function(){"use strict";console.info("IFRAME-RESIZER 5\n\nThis package has been split into separate packages for Parent and Child pages. Along with new packages for jQuery, React and Vue.\n\nGoing forward you are advised to use the new separate packages for Parent and Child pages, rather than this combined package.\n\nPlease see https://iframe-resizer.com/upgrade for more details.\n");const e="font-weight: normal;",t=e+"font-style: italic;",n="default",i=Object.freeze({assert:!0,error:!0,warn:!0}),o={expand:!0,defaultEvent:void 0,event:void 0,label:"AutoConsoleGroup",showTime:!0},r={profile:0,profileEnd:0,timeStamp:0,trace:0},a=Object.assign(console);const{fromEntries:s,keys:l}=Object,c=e=>[e,a[e]],d=e=>t=>[t,function(n){e[t]=n}],u=(e,t)=>s(l(e).map(t));const f=!(typeof window>"u"||"function"!=typeof window.matchMedia)&&window.matchMedia("(prefers-color-scheme: dark)").matches,p=f?"color: #A9C7FB;":"color: #135CD2;",h=f?"color: #E3E3E3;":"color: #1F1F1F;",m="5.4.7-beta.3",g="iframeResizer",y="[iFrameSizer]",w=Object.freeze({max:1,scroll:1,bodyScroll:1,documentElementScroll:1}),b="onload",v="init",z=Object.freeze({[b]:1,[v]:1}),$="expanded",j="collapsed",k=Object.freeze({[$]:1,[j]:1}),T=e=>t=>window.chrome?e(t.replaceAll("<br>","\n").replaceAll("<rb>","[31;1m").replaceAll("</>","[m").replaceAll("<b>","[1m").replaceAll("<i>","[3m").replaceAll("<u>","[4m")):e((e=>e.replaceAll("<br>","\n").replaceAll(/<[/a-z]+>/gi,""))(t)),x=e=>e,M=(E=function(s={}){const l={},f={},p=[],h={...o,expand:!s.collapsed||o.expanded,...s};let m="";function g(){p.length=0,m=""}function y(){delete h.event,g()}const w=()=>!!p.some((([e])=>e in i))||!!h.expand;function b(){if(0!==p.length){a[w()?"group":"groupCollapsed"](`%c${h.label}%c ${(e=>{const t=e.event||e.defaultEvent;return t?`${t}`:""})(h)} %c${h.showTime?m:""}`,e,"font-weight: bold;",t);for(const[e,...t]of p)a.assert(e in a,`Unknown console method: ${e}`),e in a&&a[e](...t);a.groupEnd(),y()}else y()}function v(){""===m&&(m=function(){const e=new Date,t=(t,n)=>e[t]().toString().padStart(n,"0");return`@ ${t("getHours",2)}:${t("getMinutes",2)}:${t("getSeconds",2)}.${t("getMilliseconds",3)}`}())}function z(e,...t){0===p.length&&(v(),queueMicrotask((()=>queueMicrotask(b)))),p.push([e,...t])}function $(e=n,...t){l[e]?z("log",`${e}: ${performance.now()-l[e]} ms`,...t):z("timeLog",e,...t)}return{...u(h,d(h)),...u(console,(e=>[e,(...t)=>z(e,...t)])),...u(r,c),assert:function(e,...t){e||z("assert",e,...t)},count:function(e=n){f[e]?f[e]+=1:f[e]=1,z("log",`${e}: ${f[e]}`)},countReset:function(e=n){delete f[e]},endAutoGroup:b,errorBoundary:e=>(...t)=>{let n;try{n=e(...t)}catch(e){if(!Error.prototype.isPrototypeOf(e))throw e;z("error",e)}return n},event:function(e){v(),h.event=e},purge:g,time:function(e=n){v(),l[e]=performance.now()},timeEnd:function(e=n){$(e),delete l[e]},timeLog:$,touch:v}},E?.__esModule?E.default:E);var E;let R={},O=!1;const I=e=>window.top===window.self?`parent(${e})`:`nested parent(${e})`;const S=e=>(t,...n)=>R[t]?.console[e](...n),C=(A="log",(e,...t)=>!0===(e=>R[e]?R[e].log:O)(e)?S(A)(e,...t):null);var A;const W=C,F=S("warn"),L=S("error"),N=S("event"),P=S("purge"),H=S("errorBoundary");const B=(e,...t)=>R[e]?R[e].console.warn(T(x)(...t)):queueMicrotask((()=>console?.warn(T((e=>(...t)=>[`${g}(${e})`,...t].join(" "))(e))(...t)))),D=(e=>(t,n="renamed to")=>(i,o,r="",a="")=>e(a,`<rb>Deprecated ${t}(${i.replace("()","")})</>\n\nThe <b>${i}</> ${t.toLowerCase()} has been ${n} <b>${o}</>. ${r}Use of the old ${t.toLowerCase()} will be removed in a future version of <i>iframe-resizer</>.`))(B),q=D("Function"),U=D("Option"),J=(e,t,n,i)=>e.addEventListener(t,n,i||!1),V=(e,t,n)=>e.removeEventListener(t,n,!1),Z=e=>{if(!e)return"";let t=-559038744,n=1103547984;for(let i,o=0;o<e.length;o++)i=e.codePointAt(o),t=Math.imul(t^i,2246822519),n=Math.imul(n^i,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))),X=["<iy><yi>Puchspk Spjluzl Rlf</><iy><iy>","<iy><yi>Tpzzpun Spjluzl Rlf</><iy><iy>","Aopz spiyhyf pz hchpshisl dpao ivao Jvttlyjphs huk Vwlu-Zvbyjl spjluzlz.<iy><iy><i>Jvttlyjphs Spjluzl</><iy>Mvy jvttlyjphs bzl, <p>pmyhtl-ylzpgly</> ylxbpylz h svd jvza vul aptl spjluzl mll. Mvy tvyl pumvythapvu cpzpa <b>oaawz://pmyhtl-ylzpgly.jvt/wypjpun</>.<iy><iy><i>Vwlu Zvbyjl Spjluzl</><iy>Pm fvb hyl bzpun aopz spiyhyf pu h uvu-jvttlyjphs vwlu zvbyjl wyvqlja aolu fvb jhu bzl pa mvy myll bukly aol alytz vm aol NWS C3 Spjluzl. Av jvumpyt fvb hjjlwa aolzl alytz, wslhzl zla aol <i>spjluzl</> rlf pu <p>pmyhtl-ylzpgly</> vwapvuz av <i>NWSc3</>.<iy><iy>Mvy tvyl pumvythapvu wslhzl zll: <b>oaawz://pmyhtl-ylzpgly.jvt/nws</>","<i>NWSc3 Spjluzl Clyzpvu</><iy><iy>Aopz clyzpvu vm <p>pmyhtl-ylzpgly</> pz ilpun bzlk bukly aol alytz vm aol <i>NWS C3</> spjluzl. Aopz spjluzl hssvdz fvb av bzl <p>pmyhtl-ylzpgly</> pu Vwlu Zvbyjl wyvqljaz, iba pa ylxbpylz fvby wyvqlja av il wbispj, wyvcpkl haaypibapvu huk il spjluzlk bukly clyzpvu 3 vy shaly vm aol NUB Nlulyhs Wbispj Spjluzl.<iy><iy>Pm fvb hyl bzpun aopz spiyhyf pu h uvu-vwlu zvbyjl wyvqlja vy dlizpal, fvb dpss ullk av wbyjohzl h svd jvza vul aptl jvttlyjphs spjluzl.<iy><iy>Mvy tvyl pumvythapvu cpzpa <b>oaawz://pmyhtl-ylzpgly.jvt/wypjpun</>.","<iy><yi>Zvsv spjluzl kvlz uva zbwwvya jyvzz-kvthpu</><iy><iy>Av bzl <p>pmyhtl-ylzpgly</> dpao jyvzz kvthpu pmyhtlz fvb ullk lpaoly aol Wyvmlzzpvuhs vy Ibzpulzz spjluzlz. Mvy klahpsz vu bwnyhkl wypjpun wslhzl jvuahja pumv@pmyhtl-ylzpgly.jvt."],Y=["NWSc3","zvsv","wyv","ibzpulzz","vlt"],_=Object.fromEntries(["2cgs7fdf4xb","1c9ctcccr4z","1q2pc4eebgb","ueokt0969w","w2zxchhgqz","1umuxblj2e5"].map(((e,t)=>[e,Math.max(0,t-1)]))),Q=e=>G(X[e]),K=e=>{const t=e[G("spjluzl")];if(!t)return-1;const n=t.split("-");let i=function(e=""){let t=-2;const n=Z(G(e));return n in _&&(t=_[n]),t}(n[0]);return 0===i||(e=>e[2]===Z(e[0]+e[1]))(n)||(i=-2),i},ee={},te=Object.freeze({autoResize:!0,bodyBackground:null,bodyMargin:null,bodyPadding:null,checkOrigin:!0,direction:"vertical",inPageLinks:!1,heightCalculationMethod:"auto",id:"iFrameResizer",log:!1,logExpand:!1,license:void 0,mouseEvents:!0,offsetHeight:null,offsetWidth:null,postMessageTarget:null,sameDomain:!1,scrolling:!1,sizeHeight:!0,sizeWidth:!1,tolerance:0,waitForLoad:!1,warningTimeout:5e3,widthCalculationMethod:"auto",onClose:()=>!0,onClosed(){},onInit:!1,onMessage:null,onMouseEnter(){},onMouseLeave(){},onReady:e=>{"function"==typeof ee[e.id].onInit&&(U("init()","onReady()","",e.id),ee[e.id].onInit(e))},onResized(){},onScroll:()=>!0}),ne={position:null,version:m};function ie(e){function t(){ue(T),ce(x),$("onResized",T)}function n(e){if("border-box"!==e.boxSizing)return 0;return(e.paddingTop?parseInt(e.paddingTop,10):0)+(e.paddingBottom?parseInt(e.paddingBottom,10):0)}function i(e){if("border-box"!==e.boxSizing)return 0;return(e.borderTopWidth?parseInt(e.borderTopWidth,10):0)+(e.borderBottomWidth?parseInt(e.borderBottomWidth,10):0)}const o=e=>k.slice(k.indexOf(":")+7+e);const r=(e,t)=>(n,i)=>{const o={};var r,a;r=function(){pe(`${n} (${e})`,`${e}:${t()}`,i)},o[a=i]||(r(),o[a]=requestAnimationFrame((()=>{o[a]=null})))},a=(e,t)=>()=>{let n=!1;const i=t=>()=>{ee[l]?n&&n!==t||(e(t,l),n=t,requestAnimationFrame((()=>{n=!1}))):s()},o=i("scroll"),r=i("resize window");function a(e,n){C(l,`${e}listeners for send${t}`),n(window,"scroll",o),n(window,"resize",r)}function s(){N(l,`stop${t}`),a("Remove ",V),c.disconnect(),d.disconnect(),V(ee[l].iframe,"load",s)}const l=x,c=new ResizeObserver(i("pageObserver")),d=new ResizeObserver(i("iframeObserver"));ee[l]&&(ee[l][`stop${t}`]=s,J(ee[l].iframe,"load",s),a("Add ",J),c.observe(document.body,{attributes:!0,childList:!0,subtree:!0}),d.observe(ee[l].iframe,{attributes:!0,childList:!1,subtree:!1}))},s=e=>()=>{e in ee[x]&&(ee[x][e](),delete ee[x][e])},l=r("pageInfo",(function(){const e=document.body.getBoundingClientRect(),t=T.iframe.getBoundingClientRect(),{scrollY:n,scrollX:i,innerHeight:o,innerWidth:r}=window,{clientHeight:a,clientWidth:s}=document.documentElement;return JSON.stringify({iframeHeight:t.height,iframeWidth:t.width,clientHeight:Math.max(a,o||0),clientWidth:Math.max(s,r||0),offsetTop:parseInt(t.top-e.top,10),offsetLeft:parseInt(t.left-e.left,10),scrollTop:n,scrollLeft:i,documentHeight:a,documentWidth:s,windowHeight:o,windowWidth:r})})),c=r("parentInfo",(function(){const{iframe:e}=T,{scrollWidth:t,scrollHeight:n}=document.documentElement,{width:i,height:o,offsetLeft:r,offsetTop:a,pageLeft:s,pageTop:l,scale:c}=window.visualViewport;return JSON.stringify({iframe:e.getBoundingClientRect(),document:{scrollWidth:t,scrollHeight:n},viewport:{width:i,height:o,offsetLeft:r,offsetTop:a,pageLeft:s,pageTop:l,scale:c}})})),d=a(l,"PageInfo"),u=a(c,"ParentInfo"),f=s("stopPageInfo"),g=s("stopParentInfo");function w(e){const t=e.getBoundingClientRect();return se(x),{x:Number(t.left)+Number(ne.position.x),y:Number(t.top)+Number(ne.position.y)}}function b(e){const t=e?w(T.iframe):{x:0,y:0};W(x,`Reposition requested (offset x:%c${t.x}%c y:%c${t.y})`,p,h,p);const n=((e,t)=>({x:e.width+t.x,y:e.height+t.y}))(T,t),i=window.parentIframe||window.parentIFrame;i?function(t,n){t["scrollTo"+(e?"Offset":"")](n.x,n.y)}(i,n):function(e){ne.position=e,v(x)}(n)}function v(e){const{x:t,y:n}=ne.position,i=ee[e]?.iframe;!1!==$("onScroll",{iframe:i,top:n,left:t,x:t,y:n})?ce(e):le()}function z(e){let t={};if(0===T.width&&0===T.height){const e=o(9).split(":");t={x:e[1],y:e[0]}}else t={x:T.width,y:T.height};$(e,{iframe:T.iframe,screenX:Number(t.x),screenY:Number(t.y),type:T.type})}const $=(e,t)=>oe(x,e,t);function j(){const{height:e,iframe:n,msg:i,type:r,width:a}=T;switch(ee[x]?.firstRun&&ee[x]&&(ee[x].firstRun=!1),r){case"close":ae(n);break;case"message":l=o(6),C(x,`onMessage passed: {iframe: %c${T.iframe.id}%c, message: %c${l}%c}`,p,h,p,h),$("onMessage",{iframe:T.iframe,message:JSON.parse(l)});break;case"mouseenter":z("onMouseEnter");break;case"mouseleave":z("onMouseLeave");break;case"autoResize":ee[x].autoResize=JSON.parse(o(9));break;case"scrollBy":!function(){const e=T.width,t=T.height,n=window.parentIframe||window.parentIFrame||window;W(x,`scrollBy: x: %c${e}%c y: %c${t}`,p,h,p),n.scrollBy(e,t)}();break;case"scrollTo":b(!1);break;case"scrollToOffset":b(!0);break;case"pageInfo":d();break;case"parentInfo":u();break;case"pageInfoStop":f();break;case"parentInfoStop":g();break;case"inPageLink":!function(e){const t=e.split("#")[1]||"",n=decodeURIComponent(t);let i=document.getElementById(n)||document.getElementsByName(n)[0];i?function(){const e=w(i);W(x,`Moving to in page link: %c#${t}`,p),ne.position={x:e.x,y:e.y},v(x),window.location.hash=t}():window.top!==window.self?function(){const e=window.parentIframe||window.parentIFrame;e?e.moveToAnchor(t):C(x,`In page link #${t} not found and window.parentIframe not found`)}():C(x,`In page link #${t} not found`)}(o(9));break;case"title":!function(e,t){ee[t]?.syncTitle&&(ee[t].iframe.title=e,W(t,`Set iframe title attribute: %c${e}`,p))}(i,x);break;case"reset":de(T);break;case"init":t(),function(e){try{ee[e].sameOrigin=!!ee[e]?.iframe?.contentWindow?.iframeChildListener}catch(t){ee[e].sameOrigin=!1}C(e,`sameOrigin: %c${ee[e].sameOrigin}`,p)}(x),(s=i)!==m&&(void 0!==s?C(x,`Version mismatch (Child: %c${s}%c !== Parent: %c${m})`,p,h,p):B(x,"<rb>Legacy version detected in iframe</>\n\nDetected legacy version of child page script. It is recommended to update the page in the iframe to use <b>@iframe-resizer/child</>.\n\nSee <u>https://iframe-resizer.com/setup/#child-page-setup</> for more details.\n")),ge=!0,$("onReady",n);break;default:if(0===a&&0===e)return void F(x,`Unsupported message received (${r}), this is likely due to the iframe containing a later version of iframe-resizer than the parent page`);if(0===a||0===e)return void C(x,"Ignoring message with 0 height or width");if(document.hidden)return void C(x,"Page hidden - ignored resize request");t()}var s,l}let k=e.data,T={},x=null;"[iFrameResizerChild]Ready"!==k?y===`${k}`.slice(0,13)&&k.slice(13).split(":")[0]in ee?(T=function(){const e=k.slice(13).split(":"),t=e[1]?Number(e[1]):0,o=ee[e[0]]?.iframe,r=getComputedStyle(o);return{iframe:o,id:e[0],height:t+n(r)+i(r),width:Number(e[2]),type:e[3],msg:e[4]}}(),x=T.id,x?(N(x,T.type),H(x,(function(){!function(e){if(!ee[e])throw new Error(`${T.type} No settings for ${e}. Message was: ${k}`)}(x),function(){const e=T.type in{true:1,false:1,undefined:1};return e&&C(x,"Ignoring init message from meta parent page"),e}()||(C(x,`Received: %c${k}`,p),ee[x].loaded=!0,(null!==T.iframe||(F(x,`The iframe (${T.id}) was not found.`),0))&&function(){const{origin:t,sameOrigin:n}=e;if(n)return!0;let i=ee[x]?.checkOrigin;if(i&&"null"!=`${t}`&&!(i.constructor===Array?function(){let e=0,n=!1;for(C(x,`Checking connection is from allowed list of origins: %c${i}`,p);e<i.length;e++)if(i[e]===t){n=!0;break}return n}():function(){const e=ee[x]?.remoteHost;return C(x,`Checking connection is from: %c${e}`,p),t===e}()))throw new Error(`Unexpected message received from: ${t} for ${T.iframe.id}. Message was: ${e.data}. This error can be disabled by setting the checkOrigin: false option or by providing of array of trusted domains.`);return!0}()&&j())}))()):F("","iframeResizer received messageData without id, message was: ",k)):null!==x&&C(x,"Ignored:",k):Object.keys(ee).forEach((e=>{ee[e].mode>=0&&pe("iFrame requested init",he(e),e)}))}function oe(e,t,n){let i=null,o=null;if(ee[e]){if(i=ee[e][t],"function"!=typeof i)throw new TypeError(`${t} on iFrame[${e}] is not a function`);if("onClose"===t||"onScroll"===t)try{o=i(n)}catch(n){console.error(n),F(e,`Error in ${t} callback`)}else((e,...t)=>{setTimeout((()=>e(...t)),0)})(i,n)}return o}function re(e){const{id:t}=e;C(t,"Disconnected from iframe"),delete ee[t],delete e.iframeResizer}function ae(e){const{id:t}=e;if(!1!==oe(t,"onClose",t)){C(t,`Removing iFrame: %c${t}`,p);try{e.parentNode&&e.remove()}catch(e){F(t,e)}oe(t,"onClosed",t),re(e)}else C(t,"Close iframe cancelled by onClose event")}function se(e){null===ne.position&&(ne.position={x:window.scrollX,y:window.scrollY},C(e,`Get page position: %c${ne.position.x}%c, %c${ne.position.y}`,p,h,p))}function le(){ne.position=null}function ce(e){null!==ne.position&&(window.scrollTo(ne.position.x,ne.position.y),W(e,`Set page position: %c${ne.position.x}%c, %c${ne.position.y}`,p,h,p),le())}function de(e){C(e.id,"Size reset requested by "+("init"===e.type?"parent page":"child page")),se(e.id),ue(e),pe("reset","reset",e.id)}function ue(e){function t(t){const i=`${e[t]}px`;e.iframe.style[t]=i,W(n,`Set ${t}: %c${i}`,p)}const{id:n}=e,{sizeHeight:i,sizeWidth:o}=ee[n];i&&t("height"),o&&t("width")}R=ee;const fe=e=>e.split(":").filter(((e,t)=>19!==t)).join(":");function pe(e,t,n,i){function o(i){const o=e in z?fe(t):t;W(n,i,p,h,p),W(n,`Message data: %c${o}`,p)}N(n,e),ee[n]&&(ee[n]?.postMessageTarget?function(){const{iframe:e,postMessageTarget:i,sameOrigin:r,targetOrigin:a}=ee[n];if(r)try{return e.contentWindow.iframeChildListener(y+t),void o(`Sending message to iframe %c${n}%c via sameOrigin`)}catch(e){C(n,"Same domain connection failed. Trying cross domain%c")}o(`Sending message to iframe: %c${n}%c targetOrigin: %c${a}`),i.postMessage(y+t,a)}():F(n,`Iframe(${n}) not found`),i&&ee[n]?.warningTimeout&&(ee[n].msgTimeout=setTimeout((function(){if(void 0===ee[n])return;const{iframe:e,loaded:t,loadErrorShown:i,waitForLoad:o}=ee[n],{sandbox:r}=e,a="object"==typeof r&&r.length>0;t||i||(ee[n].loadErrorShown=!0,B(n,`<rb>No response from iFrame</>\n \nThe iframe (<i>${n}</>) has not responded within ${ee[n].warningTimeout/1e3} seconds. Check <b>@iframe-resizer/child</> package has been loaded in the iframe.\n${o?"\nThe <b>waitForLoad</> option is currently set to <i>'true'</>. If the iframe loads before the JavaScript runs, this option will prevent <i>iframe-resizer</> from initialising. To disable this, set the <b>waitForLoad</> option to <i>'false'</>. \n":""}${!a||r.contains("allow-scripts")&&r.contains("allow-same-origin")?"":"\nThe iframe has the <b>sandbox</> attribute, please ensure it contains both the <i>'allow-same-origin'</> and <i>'allow-scripts'</> values.\n"} \n${!a||r.contains("allow-scripts")&&r.contains("allow-same-origin")?"":"The iframe has the <b>sandbox</> attribute, please ensure it contains both the <i>'allow-same-origin'</> and <i>'allow-scripts'</> values.\n"}This message can be ignored if everything is working, or you can set the <b>warningTimeout</> option to a higher value or zero to suppress this warning.\n`))}),ee[n].warningTimeout)))}function he(e){const t=ee[e];return[e,"8",t.sizeWidth,t.log,"32",!0,t.autoResize,t.bodyMargin,t.heightCalculationMethod,t.bodyBackground,t.bodyPadding,t.tolerance,t.inPageLinks,"child",t.widthCalculationMethod,t.mouseEvents,t.offsetHeight,t.offsetWidth,t.sizeHeight,t.license,ne.version,t.mode,"",t.logExpand].join(":")}let me=0,ge=!1,ye=!1;const we=t=>n=>{function i(){if(ee[u]){const{iframe:e}=ee[u],t={close:ae.bind(null,e),disconnect:re.bind(null,e),removeListeners(){B(u,"<rb>Deprecated Method Name</>\n\nThe [removeListeners()</> method has been renamed to [disconnect()</>.\n"),this.disconnect()},resize(){B(u,"<rb>Deprecated Method</>\n \nUse of the <b>resize()</> method from the parent page is deprecated and will be removed in a future version of <i>iframe-resizer</>. As their are no longer any edge cases that require triggering a resize from the parent page, it is recommended to remove this method from your code."),pe.bind(null,"Window resize","resize",u)},moveToAnchor(e){((e,t,n)=>{if(typeof e!==t)throw new TypeError(`${n} is not a ${i=t,i.charAt(0).toUpperCase()+i.slice(1)}`);var i})(e,"string","moveToAnchor(anchor) anchor"),pe("Move to anchor",`moveToAnchor:${e}`,u)},sendMessage(e){pe("message",`message:${e=JSON.stringify(e)}`,u)}};e.iframeResizer=t,e.iFrameResizer=t}}function o(e){const{id:t}=n,{mode:i,waitForLoad:o}=ee[t];-1!==i&&-2!==i&&(J(n,"load",(function(){pe(b,`${e}:${ge}`,t,!0),function(){const e=ee[u]?.firstRun,t=ee[u]?.heightCalculationMethod in w;!e&&t&&de({iframe:n,height:0,width:0,type:"init"})}()})),!1===o&&pe(v,`${e}:${ge}`,t,!0))}function r(e){return e?(("sizeWidth"in e||"sizeHeight"in e||"autoResize"in e)&&B(u,'<rb>Deprecated Option</>\n\nThe <b>sizeWidth</>, <b>sizeHeight</> and <b>autoResize</> options have been replaced with new <b>direction</> option which expects values of <i>"vertical"</>, <i>"horizontal"</> or <i>"horizontal"</>.\n'),e):{}}function a(){const{mode:n}=ee[u];if(n<0)throw B("Parent",`${Q(n+2)}${Q(2)}`),P(u),Q(n+2).replace(/<\/?[a-z][^>]*>|<\/>/gi,"");ye||n>0&&t.vInfoDisable||function(t,n){queueMicrotask((()=>console.info(`%ciframe-resizer ${t}`,O||n<1?"font-weight: bold;":e)))}(`v${m} (${(e=>G(Y[e]))(n)})`,n),!ye&&n<1&&B("Parent",Q(3)),ye=!0}function s(e){const t=ee[e]?.iframe?.title;return""===t||void 0===t}const l=e=>Object.hasOwn(e,"onMouseEnter")||Object.hasOwn(e,"onMouseLeave");function c(e){var t,i;ee[u]={...ee[u],iframe:n,firstRun:!0,remoteHost:n?.src.split("/").slice(0,3).join("/"),...te,...r(e),mouseEvents:l(e),mode:K(e),syncTitle:s(u)},N(u,"setup"),function(){const{direction:e}=ee[u];if("horizontal"===e)return ee[u].sizeWidth=!0,ee[u].sizeHeight=!1,void C(u,"Direction: %chorizontal",p);if("none"===e)return ee[u].sizeWidth=!1,ee[u].sizeHeight=!1,ee[u].autoResize=!1,void C(u,"Direction: %cnone",p);if("vertical"!==e)throw new TypeError(u,`Direction value of "${e}" is not valid`);C(u,"Direction: %cvertical",p)}(),(t=e?.offsetSize||e?.offset)&&("vertical"===ee[u].direction?(ee[u].offsetHeight=t,C(u,`Offset height: %c${t}`,p)):(ee[u].offsetWidth=t,C(u,`Offset width: %c${t}`,p))),e?.offset&&B(u,"<rb>Deprecated option</>\n\n The <b>offset</> option has been renamed to <b>offsetSize</>. Use of the old name will be removed in a future version of <i>iframe-resizer</>."),null===ee[u].postMessageTarget&&(ee[u].postMessageTarget=n.contentWindow),ee[u].targetOrigin=!0===ee[u].checkOrigin?""===(i=ee[u].remoteHost)||null!==i.match(/^(about:blank|javascript:|file:\/\/)/)?"*":i:"*"}const d=()=>"iframeResizer"in n,u=function(e){if(e&&"string"!=typeof e)throw new TypeError("Invalid id for iFrame. Expected String");return""!==e&&e||(e=function(){let e=t?.id||te.id+me++;return null!==document.getElementById(e)&&(e+=me++),e}(),n.id=e,C(e,`Added missing iframe ID: ${e} (${n.src})`)),e}(n.id);if("object"!=typeof t)throw new TypeError("Options is not an object");return function(e){const{search:t}=window.location;t.includes("ifrlog")&&(e.log=$,e.logExpand=!t.includes("ifrlog=collapsed"))}(t),function(e,t){const n=Object.hasOwn(t,"log"),i="string"==typeof t.log,o=n?!!i||t.log:te.log;Object.hasOwn(t,"logExpand")||(t.logExpand=n&&i?t.log===$:te.logExpand),function(e){-1===e?.log&&(e.log=!1,e.vInfoDisable=!0)}(t),function({enabled:e,expand:t,iframeId:n}){const i=M({expand:t,label:I(n)});O=e,R[n]||(R[n]={console:i})}({enabled:o,expand:t.logExpand,iframeId:e}),i&&!(t.log in k)&&L(e,'Invalid value for options.log: Accepted values are "expanded" and "collapsed"'),t.log=o}(u,t),H(u,(function(e){d()?F(u,`Ignored iframe (${u}), already setup.`):(c(e),a(),ve(),function(){switch(C(u,`Iframe scrolling ${ee[u]?.scrolling?"enabled":"disabled"} for ${u}`),n.style.overflow=!1===ee[u]?.scrolling?"hidden":"auto",ee[u]?.scrolling){case"omit":break;case!0:n.scrolling="yes";break;case!1:n.scrolling="no";break;default:n.scrolling=ee[u]?ee[u].scrolling:"no"}}(),function(){const{bodyMargin:e}=ee[u];"number"!=typeof e&&"0"!==e||(ee[u].bodyMargin=`${e}px`)}(),o(he(u)),i(),C(u,"Setup complete"))}))(t),n?.iFrameResizer};function be(){!1===document.hidden&&(C("document","Trigger event: Visibility change"),function(e,t){const n=e=>ee[e]?.autoResize&&!ee[e]?.firstRun;Object.keys(ee).forEach((function(i){n(i)&&pe(e,t,i)}))}("Tab Visible","resize"))}const ve=(e=>{let t=!1;return function(){return t?void 0:(t=!0,Reflect.apply(e,this,arguments))}})((()=>{J(window,"message",ie),J(document,"visibilitychange",be),window.iframeParentListener=e=>setTimeout((()=>ie({data:e,sameOrigin:!0})))})),ze=`[${g}] `;const $e=function(){function e(e){switch(!0){case!e:throw new TypeError(`${ze}iframe is not defined`);case!e.tagName:throw new TypeError(`${ze}Not a valid DOM element`);case"IFRAME"!==e.tagName.toUpperCase():throw new TypeError(`${ze}Expected <IFRAME> tag, found <${e.tagName}>`);default:t(e),n.push(e)}}let t,n;return function(i,o){if("undefined"==typeof window)return[];switch(t=we(i),n=[],typeof o){case"undefined":case"string":document.querySelectorAll(o||"iframe").forEach(e);break;case"object":e(o);break;default:throw new TypeError(`${ze}Unexpected data type (${typeof o})`)}return Object.freeze(n)}}();return"undefined"!=typeof window&&(window.iFrameResize=window.iFrameResize||function(...e){q("iFrameResize()","iframeResize()","","parent"),$e(...e)}),$e}));
|
|
21
|
-
//# sourceMappingURL=iframeResizer.js.map
|
|
20
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).iframeResize=t()}(this,(function(){"use strict";console.info("IFRAME-RESIZER 5\n\nThis package has been split into separate packages for Parent and Child pages. Along with new packages for jQuery, React and Vue.\n\nGoing forward you are advised to use the new separate packages for Parent and Child pages, rather than this combined package.\n\nPlease see https://iframe-resizer.com/upgrade for more details.\n");const e="font-weight: normal;",t=e+"font-style: italic;",n="default",o=Object.freeze({assert:!0,error:!0,warn:!0}),i={expand:!0,defaultEvent:void 0,event:void 0,label:"AutoConsoleGroup",showTime:!0},r={profile:0,profileEnd:0,timeStamp:0,trace:0},a=Object.assign(console);const{fromEntries:s,keys:l}=Object,c=e=>[e,a[e]],u=e=>t=>[t,function(n){e[t]=n}],d=(e,t)=>s(l(e).map(t));const f=!(typeof window>"u"||"function"!=typeof window.matchMedia)&&window.matchMedia("(prefers-color-scheme: dark)").matches,p=f?"color: #A9C7FB;":"color: #135CD2;",h=f?"color: #E3E3E3;":"color: #1F1F1F;",m="5.4.7",g="iframeResizer",y="none",w="vertical",b="horizontal",v="[iFrameSizer]",z=Object.freeze({max:1,scroll:1,bodyScroll:1,documentElementScroll:1}),$="onload",j="init",k=Object.freeze({[$]:1,[j]:1}),T="expanded",x="collapsed",E=Object.freeze({[T]:1,[x]:1}),M=e=>t=>window.chrome?e(t.replaceAll("<br>","\n").replaceAll("<rb>","[31;1m").replaceAll("</>","[m").replaceAll("<b>","[1m").replaceAll("<i>","[3m").replaceAll("<u>","[4m")):e((e=>e.replaceAll("<br>","\n").replaceAll(/<[/a-z]+>/gi,""))(t)),R=e=>e,O=(S=function(s={}){const l={},f={},p=[],h={...i,expand:!s.collapsed||i.expanded,...s};let m="";function g(){p.length=0,m=""}function y(){delete h.event,g()}const w=()=>!!p.some((([e])=>e in o))||!!h.expand;function b(){if(0!==p.length){a[w()?"group":"groupCollapsed"](`%c${h.label}%c ${(e=>{const t=e.event||e.defaultEvent;return t?`${t}`:""})(h)} %c${h.showTime?m:""}`,e,"font-weight: bold;",t);for(const[e,...t]of p)a.assert(e in a,`Unknown console method: ${e}`),e in a&&a[e](...t);a.groupEnd(),y()}else y()}function v(){""===m&&(m=function(){const e=new Date,t=(t,n)=>e[t]().toString().padStart(n,"0");return`@ ${t("getHours",2)}:${t("getMinutes",2)}:${t("getSeconds",2)}.${t("getMilliseconds",3)}`}())}function z(e,...t){0===p.length&&(v(),queueMicrotask((()=>queueMicrotask(b)))),p.push([e,...t])}function $(e=n,...t){l[e]?z("log",`${e}: ${performance.now()-l[e]} ms`,...t):z("timeLog",e,...t)}return{...d(h,u(h)),...d(console,(e=>[e,(...t)=>z(e,...t)])),...d(r,c),assert:function(e,...t){e||z("assert",e,...t)},count:function(e=n){f[e]?f[e]+=1:f[e]=1,z("log",`${e}: ${f[e]}`)},countReset:function(e=n){delete f[e]},endAutoGroup:b,errorBoundary:e=>(...t)=>{let n;try{n=e(...t)}catch(e){if(!Error.prototype.isPrototypeOf(e))throw e;z("error",e)}return n},event:function(e){v(),h.event=e},purge:g,time:function(e=n){v(),l[e]=performance.now()},timeEnd:function(e=n){$(e),delete l[e]},timeLog:$,touch:v}},S?.__esModule?S.default:S);var S;let I={},A=!1;const C=e=>window.top===window.self?`parent(${e})`:`nested parent(${e})`;const W=e=>(t,...n)=>I[t]?.console[e](...n);var L;const F=(L="log",(e,...t)=>!0===(e=>I[e]?I[e].log:A)(e)?W(L)(e,...t):null),N=W("warn"),H=W("error"),P=W("event"),B=W("purge"),q=W("errorBoundary");const D=(e,...t)=>I[e]?I[e].console.warn(M(R)(...t)):queueMicrotask((()=>console?.warn(M((e=>(...t)=>[`${g}(${e})`,...t].join(" "))(e))(...t)))),U=(e=>(t,n="renamed to")=>(o,i,r="",a="")=>e(a,`<rb>Deprecated ${t}(${o.replace("()","")})</>\n\nThe <b>${o}</> ${t.toLowerCase()} has been ${n} <b>${i}</>. ${r}Use of the old ${t.toLowerCase()} will be removed in a future version of <i>iframe-resizer</>.`))(D),J=U("Function"),Z=U("Option"),V=(e,t,n,o)=>e.addEventListener(t,n,o||!1),G=(e,t,n)=>e.removeEventListener(t,n,!1),X=e=>{if(!e)return"";let t=-559038744,n=1103547984;for(let o,i=0;i<e.length;i++)o=e.codePointAt(i),t=Math.imul(t^o,2246822519),n=Math.imul(n^o,3266489917);return t^=Math.imul(t^n>>>15,1935289751),n^=Math.imul(n^t>>>15,3405138345),t^=n>>>16,n^=t>>>16,(2097152*(n>>>0)+(t>>>11)).toString(36)},Y=e=>e.replace(/[A-Za-z]/g,(e=>String.fromCodePoint((e<="Z"?90:122)>=(e=e.codePointAt(0)+19)?e:e-26))),_=["<iy><yi>Puchspk Spjluzl Rlf</><iy><iy>","<iy><yi>Tpzzpun Spjluzl Rlf</><iy><iy>","Aopz spiyhyf pz hchpshisl dpao ivao Jvttlyjphs huk Vwlu-Zvbyjl spjluzlz.<iy><iy><i>Jvttlyjphs Spjluzl</><iy>Mvy jvttlyjphs bzl, <p>pmyhtl-ylzpgly</> ylxbpylz h svd jvza vul aptl spjluzl mll. Mvy tvyl pumvythapvu cpzpa <b>oaawz://pmyhtl-ylzpgly.jvt/wypjpun</>.<iy><iy><i>Vwlu Zvbyjl Spjluzl</><iy>Pm fvb hyl bzpun aopz spiyhyf pu h uvu-jvttlyjphs vwlu zvbyjl wyvqlja aolu fvb jhu bzl pa mvy myll bukly aol alytz vm aol NWS C3 Spjluzl. Av jvumpyt fvb hjjlwa aolzl alytz, wslhzl zla aol <i>spjluzl</> rlf pu <p>pmyhtl-ylzpgly</> vwapvuz av <i>NWSc3</>.<iy><iy>Mvy tvyl pumvythapvu wslhzl zll: <b>oaawz://pmyhtl-ylzpgly.jvt/nws</>","<i>NWSc3 Spjluzl Clyzpvu</><iy><iy>Aopz clyzpvu vm <p>pmyhtl-ylzpgly</> pz ilpun bzlk bukly aol alytz vm aol <i>NWS C3</> spjluzl. Aopz spjluzl hssvdz fvb av bzl <p>pmyhtl-ylzpgly</> pu Vwlu Zvbyjl wyvqljaz, iba pa ylxbpylz fvby wyvqlja av il wbispj, wyvcpkl haaypibapvu huk il spjluzlk bukly clyzpvu 3 vy shaly vm aol NUB Nlulyhs Wbispj Spjluzl.<iy><iy>Pm fvb hyl bzpun aopz spiyhyf pu h uvu-vwlu zvbyjl wyvqlja vy dlizpal, fvb dpss ullk av wbyjohzl h svd jvza vul aptl jvttlyjphs spjluzl.<iy><iy>Mvy tvyl pumvythapvu cpzpa <b>oaawz://pmyhtl-ylzpgly.jvt/wypjpun</>.","<iy><yi>Zvsv spjluzl kvlz uva zbwwvya jyvzz-kvthpu</><iy><iy>Av bzl <p>pmyhtl-ylzpgly</> dpao jyvzz kvthpu pmyhtlz fvb ullk lpaoly aol Wyvmlzzpvuhs vy Ibzpulzz spjluzlz. Mvy klahpsz vu bwnyhkl wypjpun wslhzl jvuahja pumv@pmyhtl-ylzpgly.jvt."],Q=["NWSc3","zvsv","wyv","ibzpulzz","vlt"],K=Object.fromEntries(["2cgs7fdf4xb","1c9ctcccr4z","1q2pc4eebgb","ueokt0969w","w2zxchhgqz","1umuxblj2e5"].map(((e,t)=>[e,Math.max(0,t-1)]))),ee=e=>Y(_[e]),te=e=>{const t=e[Y("spjluzl")];if(!t)return-1;const n=t.split("-");let o=function(e=""){let t=-2;const n=X(Y(e));return n in K&&(t=K[n]),t}(n[0]);return 0===o||(e=>e[2]===X(e[0]+e[1]))(n)||(o=-2),o},ne={},oe=Object.freeze({autoResize:!0,bodyBackground:null,bodyMargin:null,bodyPadding:null,checkOrigin:!0,direction:w,inPageLinks:!1,heightCalculationMethod:"auto",id:"iFrameResizer",log:!1,logExpand:!1,license:void 0,mouseEvents:!0,offsetHeight:null,offsetWidth:null,postMessageTarget:null,sameDomain:!1,scrolling:!1,sizeHeight:!0,sizeWidth:!1,tolerance:0,waitForLoad:!1,warningTimeout:5e3,widthCalculationMethod:"auto",onClose:()=>!0,onClosed(){},onInit:!1,onMessage:null,onMouseEnter(){},onMouseLeave(){},onReady:e=>{"function"==typeof ne[e.id].onInit&&(Z("init()","onReady()","",e.id),ne[e.id].onInit(e))},onResized(){},onScroll:()=>!0}),ie={position:null,version:m};function re(e){function t(){pe(T),de(x),$("onResized",T)}function n(e){if("border-box"!==e.boxSizing)return 0;return(e.paddingTop?parseInt(e.paddingTop,10):0)+(e.paddingBottom?parseInt(e.paddingBottom,10):0)}function o(e){if("border-box"!==e.boxSizing)return 0;return(e.borderTopWidth?parseInt(e.borderTopWidth,10):0)+(e.borderBottomWidth?parseInt(e.borderBottomWidth,10):0)}const i=e=>k.slice(k.indexOf(":")+7+e);const r=(e,t)=>(n,o)=>{const i={};var r,a;r=function(){me(`${n} (${e})`,`${e}:${t()}`,o)},i[a=o]||(r(),i[a]=requestAnimationFrame((()=>{i[a]=null})))},a=(e,t)=>()=>{let n=!1;const o=t=>()=>{ne[l]?n&&n!==t||(e(t,l),n=t,requestAnimationFrame((()=>{n=!1}))):s()},i=o("scroll"),r=o("resize window");function a(e,t){t(window,"scroll",i),t(window,"resize",r)}function s(){P(l,`stop${t}`),a(0,G),c.disconnect(),u.disconnect(),G(ne[l].iframe,"load",s)}const l=x,c=new ResizeObserver(o("pageObserver")),u=new ResizeObserver(o("iframeObserver"));ne[l]&&(ne[l][`stop${t}`]=s,V(ne[l].iframe,"load",s),a(0,V),c.observe(document.body,{attributes:!0,childList:!0,subtree:!0}),u.observe(ne[l].iframe,{attributes:!0,childList:!1,subtree:!1}))},s=e=>()=>{e in ne[x]&&(ne[x][e](),delete ne[x][e])},l=r("pageInfo",(function(){const e=document.body.getBoundingClientRect(),t=T.iframe.getBoundingClientRect(),{scrollY:n,scrollX:o,innerHeight:i,innerWidth:r}=window,{clientHeight:a,clientWidth:s}=document.documentElement;return JSON.stringify({iframeHeight:t.height,iframeWidth:t.width,clientHeight:Math.max(a,i||0),clientWidth:Math.max(s,r||0),offsetTop:parseInt(t.top-e.top,10),offsetLeft:parseInt(t.left-e.left,10),scrollTop:n,scrollLeft:o,documentHeight:a,documentWidth:s,windowHeight:i,windowWidth:r})})),c=r("parentInfo",(function(){const{iframe:e}=T,{scrollWidth:t,scrollHeight:n}=document.documentElement,{width:o,height:i,offsetLeft:r,offsetTop:a,pageLeft:s,pageTop:l,scale:c}=window.visualViewport;return JSON.stringify({iframe:e.getBoundingClientRect(),document:{scrollWidth:t,scrollHeight:n},viewport:{width:o,height:i,offsetLeft:r,offsetTop:a,pageLeft:s,pageTop:l,scale:c}})})),u=a(l,"PageInfo"),d=a(c,"ParentInfo"),f=s("stopPageInfo"),g=s("stopParentInfo");function y(e){const t=e.getBoundingClientRect();return ce(),{x:Number(t.left)+Number(ie.position.x),y:Number(t.top)+Number(ie.position.y)}}function w(e){const t=e?y(T.iframe):{x:0,y:0};F(x,`Reposition requested (offset x:%c${t.x}%c y:%c${t.y})`,p,h,p);const n=((e,t)=>({x:e.width+t.x,y:e.height+t.y}))(T,t),o=window.parentIframe||window.parentIFrame;o?function(t,n){t["scrollTo"+(e?"Offset":"")](n.x,n.y)}(o,n):function(e){ie.position=e,b(x)}(n)}function b(e){const{x:t,y:n}=ie.position,o=ne[e]?.iframe;!1!==$("onScroll",{iframe:o,top:n,left:t,x:t,y:n})?de(e):ue()}function z(e){let t={};if(0===T.width&&0===T.height){const e=i(9).split(":");t={x:e[1],y:e[0]}}else t={x:T.width,y:T.height};$(e,{iframe:T.iframe,screenX:Number(t.x),screenY:Number(t.y),type:T.type})}const $=(e,t)=>ae(x,e,t);function j(){const{height:e,iframe:n,msg:o,type:r,width:a}=T;switch(ne[x]?.firstRun&&ne[x]&&(ne[x].firstRun=!1),r){case"close":le(n);break;case"message":l=i(6),$("onMessage",{iframe:T.iframe,message:JSON.parse(l)});break;case"mouseenter":z("onMouseEnter");break;case"mouseleave":z("onMouseLeave");break;case"autoResize":ne[x].autoResize=JSON.parse(i(9));break;case"scrollBy":!function(){const e=T.width,t=T.height,n=window.parentIframe||window.parentIFrame||window;F(x,`scrollBy: x: %c${e}%c y: %c${t}`,p,h,p),n.scrollBy(e,t)}();break;case"scrollTo":w(!1);break;case"scrollToOffset":w(!0);break;case"pageInfo":u();break;case"parentInfo":d();break;case"pageInfoStop":f();break;case"parentInfoStop":g();break;case"inPageLink":!function(e){const t=e.split("#")[1]||"",n=decodeURIComponent(t);let o=document.getElementById(n)||document.getElementsByName(n)[0];o?function(){const e=y(o);F(x,`Moving to in page link: %c#${t}`,p),ie.position={x:e.x,y:e.y},b(x),window.location.hash=t}():window.top!==window.self&&function(){const e=window.parentIframe||window.parentIFrame;e&&e.moveToAnchor(t)}()}(i(9));break;case"title":!function(e,t){ne[t]?.syncTitle&&(ne[t].iframe.title=e,F(t,`Set iframe title attribute: %c${e}`,p))}(o,x);break;case"reset":fe(T);break;case"init":t(),function(e){try{ne[e].sameOrigin=!!ne[e]?.iframe?.contentWindow?.iframeChildListener}catch(t){ne[e].sameOrigin=!1}}(x),(s=o)!==m&&(void 0!==s||D(x,"<rb>Legacy version detected in iframe</>\n\nDetected legacy version of child page script. It is recommended to update the page in the iframe to use <b>@iframe-resizer/child</>.\n\nSee <u>https://iframe-resizer.com/setup/#child-page-setup</> for more details.\n")),we=!0,$("onReady",n);break;default:if(0===a&&0===e)return void N(x,`Unsupported message received (${r}), this is likely due to the iframe containing a later version of iframe-resizer than the parent page`);if(0===a||0===e)return;if(document.hidden)return;t()}var s,l}let k=e.data,T={},x=null;"[iFrameResizerChild]Ready"!==k?v===`${k}`.slice(0,13)&&k.slice(13).split(":")[0]in ne&&(T=function(){const e=k.slice(13).split(":"),t=e[1]?Number(e[1]):0,i=ne[e[0]]?.iframe,r=getComputedStyle(i);return{iframe:i,id:e[0],height:t+n(r)+o(r),width:Number(e[2]),type:e[3],msg:e[4]}}(),x=T.id,x?(P(x,T.type),q(x,(function(){!function(e){if(!ne[e])throw new Error(`${T.type} No settings for ${e}. Message was: ${k}`)}(x),T.type in{true:1,false:1,undefined:1}||(ne[x].loaded=!0,(null!==T.iframe||(N(x,`The iframe (${T.id}) was not found.`),0))&&function(){const{origin:t,sameOrigin:n}=e;if(n)return!0;let o=ne[x]?.checkOrigin;if(o&&"null"!=`${t}`&&!(o.constructor===Array?function(){let e=0,n=!1;for(;e<o.length;e++)if(o[e]===t){n=!0;break}return n}():function(){const e=ne[x]?.remoteHost;return t===e}()))throw new Error(`Unexpected message received from: ${t} for ${T.iframe.id}. Message was: ${e.data}. This error can be disabled by setting the checkOrigin: false option or by providing of array of trusted domains.`);return!0}()&&j())}))()):N("","iframeResizer received messageData without id, message was: ",k)):Object.keys(ne).forEach((e=>{ne[e].mode>=0&&me("iFrame requested init",ge(e),e)}))}function ae(e,t,n){let o=null,i=null;if(ne[e]){if(o=ne[e][t],"function"!=typeof o)throw new TypeError(`${t} on iFrame[${e}] is not a function`);if("onClose"===t||"onScroll"===t)try{i=o(n)}catch(n){console.error(n),N(e,`Error in ${t} callback`)}else((e,...t)=>{setTimeout((()=>e(...t)),0)})(o,n)}return i}function se(e){const{id:t}=e;delete ne[t],delete e.iframeResizer}function le(e){const{id:t}=e;if(!1!==ae(t,"onClose",t)){try{e.parentNode&&e.remove()}catch(e){N(t,e)}ae(t,"onClosed",t),se(e)}}function ce(e){null===ie.position&&(ie.position={x:window.scrollX,y:window.scrollY})}function ue(){ie.position=null}function de(e){null!==ie.position&&(window.scrollTo(ie.position.x,ie.position.y),F(e,`Set page position: %c${ie.position.x}%c, %c${ie.position.y}`,p,h,p),ue())}function fe(e){ce(e.id),pe(e),me("reset","reset",e.id)}function pe(e){function t(t){const o=`${e[t]}px`;e.iframe.style[t]=o,F(n,`Set ${t}: %c${o}`,p)}const{id:n}=e,{sizeHeight:o,sizeWidth:i}=ne[n];o&&t("height"),i&&t("width")}I=ne;const he=e=>e.split(":").filter(((e,t)=>19!==t)).join(":");function me(e,t,n,o){function i(o){const i=e in k?he(t):t;F(n,o,p,h,p),F(n,`Message data: %c${i}`,p)}P(n,e),ne[n]&&(ne[n]?.postMessageTarget?function(){const{iframe:e,postMessageTarget:o,sameOrigin:r,targetOrigin:a}=ne[n];if(r)try{return e.contentWindow.iframeChildListener(v+t),void i(`Sending message to iframe %c${n}%c via sameOrigin`)}catch(e){}i(`Sending message to iframe: %c${n}%c targetOrigin: %c${a}`),o.postMessage(v+t,a)}():N(n,`Iframe(${n}) not found`),o&&ne[n]?.warningTimeout&&(ne[n].msgTimeout=setTimeout((function(){if(void 0===ne[n])return;const{iframe:e,loaded:t,loadErrorShown:o,waitForLoad:i}=ne[n],{sandbox:r}=e,a="object"==typeof r&&r.length>0;t||o||(ne[n].loadErrorShown=!0,D(n,`<rb>No response from iFrame</>\n \nThe iframe (<i>${n}</>) has not responded within ${ne[n].warningTimeout/1e3} seconds. Check <b>@iframe-resizer/child</> package has been loaded in the iframe.\n${i?"\nThe <b>waitForLoad</> option is currently set to <i>'true'</>. If the iframe loads before the JavaScript runs, this option will prevent <i>iframe-resizer</> from initialising. To disable this, set the <b>waitForLoad</> option to <i>'false'</>. \n":""}${!a||r.contains("allow-scripts")&&r.contains("allow-same-origin")?"":"\nThe iframe has the <b>sandbox</> attribute, please ensure it contains both the <i>'allow-same-origin'</> and <i>'allow-scripts'</> values.\n"} \n${!a||r.contains("allow-scripts")&&r.contains("allow-same-origin")?"":"The iframe has the <b>sandbox</> attribute, please ensure it contains both the <i>'allow-same-origin'</> and <i>'allow-scripts'</> values.\n"}This message can be ignored if everything is working, or you can set the <b>warningTimeout</> option to a higher value or zero to suppress this warning.\n`))}),ne[n].warningTimeout)))}function ge(e){const t=ne[e];return[e,"8",t.sizeWidth,t.log,"32",!0,t.autoResize,t.bodyMargin,t.heightCalculationMethod,t.bodyBackground,t.bodyPadding,t.tolerance,t.inPageLinks,"child",t.widthCalculationMethod,t.mouseEvents,t.offsetHeight,t.offsetWidth,t.sizeHeight,t.license,ie.version,t.mode,"",t.logExpand].join(":")}let ye=0,we=!1,be=!1;const ve=t=>n=>{function o(){if(ne[d]){const{iframe:e}=ne[d],t={close:le.bind(null,e),disconnect:se.bind(null,e),removeListeners(){D(d,"<rb>Deprecated Method Name</>\n\nThe [removeListeners()</> method has been renamed to [disconnect()</>.\n"),this.disconnect()},resize(){D(d,"<rb>Deprecated Method</>\n \nUse of the <b>resize()</> method from the parent page is deprecated and will be removed in a future version of <i>iframe-resizer</>. As their are no longer any edge cases that require triggering a resize from the parent page, it is recommended to remove this method from your code."),me.bind(null,"Window resize","resize",d)},moveToAnchor(e){((e,t,n)=>{if(typeof e!==t)throw new TypeError(`${n} is not a ${o=t,o.charAt(0).toUpperCase()+o.slice(1)}`);var o})(e,"string","moveToAnchor(anchor) anchor"),me("Move to anchor",`moveToAnchor:${e}`,d)},sendMessage(e){me("message",`message:${e=JSON.stringify(e)}`,d)}};e.iframeResizer=t,e.iFrameResizer=t}}function i(e){const{id:t}=n,{mode:o,waitForLoad:i}=ne[t];-1!==o&&-2!==o&&(V(n,"load",(function(){me($,`${e}:${we}`,t,!0),function(){const e=ne[d]?.firstRun,t=ne[d]?.heightCalculationMethod in z;!e&&t&&fe({iframe:n,height:0,width:0,type:"init"})}()})),!1===i&&me(j,`${e}:${we}`,t,!0))}function r(e){return e?(("sizeWidth"in e||"sizeHeight"in e||"autoResize"in e)&&D(d,`<rb>Deprecated Option</>\n\nThe <b>sizeWidth</>, <b>sizeHeight</> and <b>autoResize</> options have been replaced with new <b>direction</> option which expects values of <i>"${w}"</>, <i>"${b}"</> or <i>"${y}"</>.\n`),e):{}}function a(){const{mode:n}=ne[d];if(n<0)throw D("Parent",`${ee(n+2)}${ee(2)}`),B(d),ee(n+2).replace(/<\/?[a-z][^>]*>|<\/>/gi,"");be||n>0&&t.vInfoDisable||function(t,n){queueMicrotask((()=>console.info(`%ciframe-resizer ${t}`,A||n<1?"font-weight: bold;":e)))}(`v${m} (${(e=>Y(Q[e]))(n)})`,n),!be&&n<1&&D("Parent",ee(3)),be=!0}function s(e){const t=ne[e]?.iframe?.title;return""===t||void 0===t}const l=e=>Object.hasOwn(e,"onMouseEnter")||Object.hasOwn(e,"onMouseLeave");function c(e){var t,o;ne[d]={...ne[d],iframe:n,firstRun:!0,remoteHost:n?.src.split("/").slice(0,3).join("/"),...oe,...r(e),mouseEvents:l(e),mode:te(e),syncTitle:s(d)},P(d,"setup"),function(){const{direction:e}=ne[d];switch(e){case w:break;case b:ne[d].sizeHeight=!1;case"both":ne[d].sizeWidth=!0;break;case y:ne[d].sizeWidth=!1,ne[d].sizeHeight=!1,ne[d].autoResize=!1;break;default:throw new TypeError(d,`Direction value of "${e}" is not valid`)}}(),(t=e?.offsetSize||e?.offset)&&(ne[d].direction===w?ne[d].offsetHeight=t:ne[d].offsetWidth=t),e?.offset&&D(d,"<rb>Deprecated option</>\n\n The <b>offset</> option has been renamed to <b>offsetSize</>. Use of the old name will be removed in a future version of <i>iframe-resizer</>."),null===ne[d].postMessageTarget&&(ne[d].postMessageTarget=n.contentWindow),ne[d].targetOrigin=!0===ne[d].checkOrigin?""===(o=ne[d].remoteHost)||null!==o.match(/^(about:blank|javascript:|file:\/\/)/)?"*":o:"*"}const u=()=>"iframeResizer"in n,d=function(e){if(e&&"string"!=typeof e)throw new TypeError("Invalid id for iFrame. Expected String");return""!==e&&e||(e=function(){let e=t?.id||oe.id+ye++;return null!==document.getElementById(e)&&(e+=ye++),e}(),n.id=e),e}(n.id);if("object"!=typeof t)throw new TypeError("Options is not an object");return function(e){const{search:t}=window.location;t.includes("ifrlog")&&(e.log=T,e.logExpand=!t.includes("ifrlog=collapsed"))}(t),function(e,t){const n=Object.hasOwn(t,"log"),o="string"==typeof t.log,i=n?!!o||t.log:oe.log;Object.hasOwn(t,"logExpand")||(t.logExpand=n&&o?t.log===T:oe.logExpand),function(e){-1===e?.log&&(e.log=!1,e.vInfoDisable=!0)}(t),function({enabled:e,expand:t,iframeId:n}){const o=O({expand:t,label:C(n)});A=e,I[n]||(I[n]={console:o})}({enabled:i,expand:t.logExpand,iframeId:e}),o&&!(t.log in E)&&H(e,'Invalid value for options.log: Accepted values are "expanded" and "collapsed"'),t.log=i}(d,t),q(d,(function(e){u()?N(d,`Ignored iframe (${d}), already setup.`):(c(e),a(),$e(),function(){switch(n.style.overflow=!1===ne[d]?.scrolling?"hidden":"auto",ne[d]?.scrolling){case"omit":break;case!0:n.scrolling="yes";break;case!1:n.scrolling="no";break;default:n.scrolling=ne[d]?ne[d].scrolling:"no"}}(),function(){const{bodyMargin:e}=ne[d];"number"!=typeof e&&"0"!==e||(ne[d].bodyMargin=`${e}px`)}(),i(ge(d)),o())}))(t),n?.iFrameResizer};function ze(){!1===document.hidden&&function(e,t){const n=e=>ne[e]?.autoResize&&!ne[e]?.firstRun;Object.keys(ne).forEach((function(o){n(o)&&me(e,t,o)}))}("Tab Visible","resize")}const $e=(e=>{let t=!1;return function(){return t?void 0:(t=!0,Reflect.apply(e,this,arguments))}})((()=>{V(window,"message",re),V(document,"visibilitychange",ze),window.iframeParentListener=e=>setTimeout((()=>re({data:e,sameOrigin:!0})))})),je=`[${g}] `;const ke=function(){function e(e){switch(!0){case!e:throw new TypeError(`${je}iframe is not defined`);case!e.tagName:throw new TypeError(`${je}Not a valid DOM element`);case"IFRAME"!==e.tagName.toUpperCase():throw new TypeError(`${je}Expected <IFRAME> tag, found <${e.tagName}>`);default:t(e),n.push(e)}}let t,n;return function(o,i){if("undefined"==typeof window)return[];switch(t=ve(o),n=[],typeof i){case"undefined":case"string":document.querySelectorAll(i||"iframe").forEach(e);break;case"object":e(i);break;default:throw new TypeError(`${je}Unexpected data type (${typeof i})`)}return Object.freeze(n)}}();return"undefined"!=typeof window&&(window.iFrameResize=window.iFrameResize||function(...e){J("iFrameResize()","iframeResize()","","parent"),ke(...e)}),ke}));
|