@iframe-resizer/jquery 6.0.0-beta.3 → 6.0.0-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/index.cjs.js +1 -1
- package/index.esm.js +1 -1
- package/index.umd.js +2 -2
- package/package.json +3 -2
package/README.md
CHANGED
package/index.cjs.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* @preserve
|
|
3
3
|
*
|
|
4
|
-
* @module iframe-resizer/jquery 6.0.0-beta.
|
|
4
|
+
* @module iframe-resizer/jquery 6.0.0-beta.4 (cjs) - 2026-04-10
|
|
5
5
|
*
|
|
6
6
|
* @license GPL-3.0 For use with GPL compliant sites (fully published front & backend source code)
|
|
7
7
|
* Alternatively for commercial use, you can purchase a license from
|
package/index.esm.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* @preserve
|
|
3
3
|
*
|
|
4
|
-
* @module iframe-resizer/jquery 6.0.0-beta.
|
|
4
|
+
* @module iframe-resizer/jquery 6.0.0-beta.4 (esm) - 2026-04-10
|
|
5
5
|
*
|
|
6
6
|
* @license GPL-3.0 For use with GPL compliant sites (fully published front & backend source code)
|
|
7
7
|
* Alternatively for commercial use, you can purchase a license from
|
package/index.umd.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* @preserve
|
|
3
3
|
*
|
|
4
|
-
* @module iframe-resizer/jquery 6.0.0-beta.
|
|
4
|
+
* @module iframe-resizer/jquery 6.0.0-beta.4 (umd) - 2026-04-10
|
|
5
5
|
*
|
|
6
6
|
* @license GPL-3.0 For use with GPL compliant sites (fully published front & backend source code)
|
|
7
7
|
* Alternatively for commercial use, you can purchase a license from
|
|
@@ -17,5 +17,5 @@
|
|
|
17
17
|
*/
|
|
18
18
|
|
|
19
19
|
|
|
20
|
-
!function(e){"function"==typeof define&&define.amd?define(e):e()}(function(){"use strict";const e="6.0.0-beta.3",t="iframeResizer",n=":",o="autoResize",i="init",r="iframeReady",a="load",l="message",s="onload",c="pageInfo",u="parentInfo",f="reset",d="resize",p="scroll",h="\n",y="parent",m="string",g="object",b="auto",v="none",w="both",z="vertical",j="horizontal",$="[iFrameSizer]",k=Object.freeze({max:1,scroll:1,bodyScroll:1,documentElementScroll:1}),M=Object.freeze({[s]:1,[i]:1,[r]:1}),T="expanded",x="collapsed",S=Object.freeze({[T]:1,[x]:1}),O=e=>typeof e===g&&null!==e,R=e=>typeof e===m;const E=(e,t)=>Object.hasOwn?Object.hasOwn(e,t):((e,t)=>Object.prototype.hasOwnProperty.call(e,t))(e,t),C={br:"\n",rb:"[31;1m",bb:"[34;1m",b:"[1m",i:"[3m",u:"[4m","/":"[m"},I=Object.keys(C),A=new RegExp(`<(${I.join("|")})>`,"gi"),W=(e,t)=>C[t]??"",L=e=>t=>e(R(t)?window.chrome?t.replace(A,W):(e=>e.replaceAll("<br>",h).replaceAll(/<\/?[^>]+>/gi,""))(t):t),P="font-weight: normal;",N=P+"font-style: italic;",B="default",F=Object.freeze({assert:!0,error:!0,warn:!0}),H={expand:!1,defaultEvent:void 0,event:void 0,label:"AutoConsoleGroup",showTime:!0},q={profile:0,profileEnd:0,timeStamp:0,trace:0},D=Object.assign(console);const{fromEntries:U,keys:V}=Object,J=e=>[e,D[e]],Q=e=>t=>[t,function(n){e[t]=n}],Z=(e,t)=>U(V(e).map(t));const G=!(typeof window>"u"||"function"!=typeof window.matchMedia)&&window.matchMedia("(prefers-color-scheme: dark)").matches,X=G?"color: #A9C7FB;":"color: #135CD2;",Y=G?"color: #E3E3E3;":"color: #1F1F1F;",_={},K=(ee=function(e={}){const t={},n={},o=[],i={...H,expand:!e.collapsed||H.expanded,...e};let r="";function a(){o.length=0,r=""}function l(){delete i.event,a()}const s=()=>!!o.some(([e])=>e in F)||!!i.expand;function c(){if(0!==o.length){D[s()?"group":"groupCollapsed"](`%c${i.label}%c ${(e=>{const t=e.event||e.defaultEvent;return t?`${t}`:""})(i)} %c${i.showTime?r:""}`,P,"font-weight: bold;",N);for(const[e,...t]of o)D.assert(e in D,`Unknown console method: ${e}`),e in D&&D[e](...t);D.groupEnd(),l()}else l()}function u(){""===r&&(r=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)}`}(),queueMicrotask(()=>queueMicrotask(c)))}function f(e,...t){0===o.length&&u(),o.push([e,...t])}function d(e=B,...n){t[e]?f("log",`${e}: ${performance.now()-t[e]} ms`,...n):f("timeLog",e,...n)}return{...Z(i,Q(i)),...Z(console,e=>[e,(...t)=>f(e,...t)]),...Z(q,J),assert:function(e,...t){!0!==e&&f("assert",e,...t)},count:function(e=B){n[e]?n[e]+=1:n[e]=1,f("log",`${e}: ${n[e]}`)},countReset:function(e=B){delete n[e]},endAutoGroup:c,errorBoundary:e=>(...t)=>{let n;try{n=e(...t)}catch(e){if(!Error.prototype.isPrototypeOf(e))throw e;f("error",e),c()}return n},event:function(e){u(),i.event=e},purge:a,time:function(e=B){u(),t[e]=performance.now()},timeEnd:function(e=B){d(e),delete t[e]},timeLog:d,touch:u}},ee?.__esModule?ee.default:ee);var ee;let te=!0;const ne=K({expand:!1,label:y}),oe=e=>window.top===window.self?`parent(${e})`:`nested parent(${e})`;const ie=e=>(t,...n)=>_[t]?_[t].console[e](...n):ne[e](...n),re=e=>(t,...n)=>!0===(e=>_[e]?_[e].log:te)(t)?ie(e)(t,...n):null,ae=re("log"),le=ae,se=re("debug"),ce=ie("warn"),ue=ie("error"),fe=ie("event"),de=ie("purge"),pe=ie("endAutoGroup"),he=ie("errorBoundary");const ye=L(e=>e),me=(e,...n)=>_[e]?_[e].console.warn(...n.map(ye)):queueMicrotask(()=>{const o=L((e=>(...n)=>[`${t}(${e})`,...n].join(" "))(e));console?.warn(...n.map(o))}),ge=Object.freeze({autoResize:!0,bodyBackground:null,bodyMargin:null,bodyPadding:null,checkOrigin:!0,direction:z,firstRun:!0,inPageLinks:!1,heightCalculationMethod:b,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:b,onBeforeClose:()=>!0,onAfterClose(){},onMessage:null,onMouseEnter(){},onMouseLeave(){},onReady(){},onResized(){},onScroll:()=>!0});let be=0;function ve(e,t){let{id:n}=e;if(n&&!R(n))throw new TypeError("Invalid id for iframe. Expected String");return n&&""!==n||(n=function(e){const t=e?.id||ge.id+be++;return null===document.getElementById(t)?t:`${t}${be++}`}(t),e.id=n,fe(n,"assignId"),ae(n,`Added missing iframe ID: ${n} (${e.src})`)),n}const we=(e,t,n,o)=>e.addEventListener(t,n,o||!1),ze=(e,t,n)=>e.removeEventListener(t,n,!1);function je(e,t,o){function i(i){const r=e in M?(e=>e.split(n).filter((e,t)=>19!==t).join(n))(t):t;le(o,i,X,Y,X),le(o,`Message data: %c${r}`,X)}const{iframe:r,postMessageTarget:a,sameOrigin:l,targetOrigin:s}=_[o];if(l)try{return r.contentWindow.iframeChildListener($+t),void i(`Sending message to iframe %c${o}%c via same origin%c`)}catch(t){e in M?(_[o].sameOrigin=!1,ae(o,"New iframe does not support same origin")):ce(o,"Same origin messaging failed, falling back to postMessage")}i(`Sending message to iframe: %c${o}%c targetOrigin: %c${s.join(", ")}`);for(const e of s)a.postMessage($+t,e)}function $e(e,t,n){fe(n,e),_[n]?.postMessageTarget?je(e,t,n):ce(n,"Iframe not found")}function ke(){!0!==document.hidden&&((e,t)=>{Object.values(_).filter(({autoResize:e,firstRun:t})=>e&&!t).forEach(({iframe:n})=>$e(e,t,n.id))})("tabVisible",d)}function Me(e){const t=e.slice(13).split(":"),n=t[1]?Number(t[1]):0,o=_[t[0]]?.iframe,i=o?getComputedStyle(o):null,r=i?function(e){return"border-box"!==e.boxSizing?0:(e.paddingTop?parseInt(e.paddingTop,10):0)+(e.paddingBottom?parseInt(e.paddingBottom,10):0)}(i)+function(e){return"border-box"!==e.boxSizing?0:(e.borderTopWidth?parseInt(e.borderTopWidth,10):0)+(e.borderBottomWidth?parseInt(e.borderBottomWidth,10):0)}(i):0,a={iframe:o,id:t[0],height:n+r,width:Number(t[2]),type:t[3],msg:t[4],message:t[4]};return t[5]&&(a.mode=t[5]),a}const Te={true:1,false:1,undefined:1};function xe(e){const{id:t,msg:n,iframe:o}=e,i=function(e){if(!O(e))return!1;try{return"IFRAME"===e.tagName||e instanceof HTMLIFrameElement}catch(e){return!1}}(o);return i||(ae(t,`Received: %c${n}`,X),ce(t,"The target iframe was not found.")),i}function Se(e,t,n){if(!_[e])return null;const o=_[e][t];if("function"!=typeof o)throw new TypeError(`${t} on iframe[${e}] is not a function`);if("onBeforeClose"!==t&&"onScroll"!==t)return((e,...t)=>setTimeout(()=>e(...t),0))(o,n);try{return o(n)}catch(n){return console.error(n),ce(e,`Error in ${t} callback`),null}}function Oe(e,t){const{lastMessage:o}=_[e];return o.slice(o.indexOf(n)+7+t)}function Re(e,t){const{id:o,iframe:i,height:r,type:a,width:l}=t;let s={x:0,y:0};if(0===l&&0===r){const e=Oe(o,9).split(n);s={x:e[1],y:e[0]}}else s={x:l,y:r};Se(o,e,{iframe:i,screenX:Number(s.x),screenY:Number(s.y),type:a})}const Ee={position:null,version:e};function Ce(){Ee.position=null}function Ie(e){return null===Ee.position&&(Ee.position={x:window.scrollX,y:window.scrollY}),ae(e,`Get page position: %c${Ee.position.x}%c, %c${Ee.position.y}`,X,Y,X),Ee.position}function Ae(e){null!==Ee.position&&(window.scrollTo(Ee.position.x,Ee.position.y),le(e,`Set page position: %c${Ee.position.x}%c, %c${Ee.position.y}`,X,Y,X),Ce())}function We(e,t){const{id:n}=t,o=`${t[e]}px`;_[n].iframe.style[e]=o,le(n,`Set ${e}: %c${o}`,X)}function Le(e){const{id:t}=e,{sizeHeight:n,sizeWidth:o}=_[t];n&&We("height",e),o&&We("width",e)}function Pe(e){const{id:t}=e;Le(e),Ae(t),Se(t,"onResized",e)}function Ne(e){const{id:t}=e;ae(t,"Disconnected from iframe"),delete _[t],delete e.iframeResizer}function Be(e){const{id:t}=e;if(!1!==Se(t,"onBeforeClose",t)){ae(t,`Removing iframe: %c${t}`,X);try{e.parentNode&&e.remove()}catch(e){ce(t,e)}Se(t,"onAfterClose",t),Ne(e)}else ae(t,"Close iframe cancelled by onBeforeClose")}function Fe(e){const{id:t,type:n}=e;ae(t,"Size reset requested by "+(n===i?"parent page":"child page")),Ie(t),Le(e),$e(f,f,t)}const He=(e,t)=>{const n={};return(o,i)=>{const{iframe:r}=_[i];var a,l;a=function(){$e(`${o} (${e})`,`${e}:${t(r)}`,i)},n[l=i]||(a(),n[l]=requestAnimationFrame(()=>{n[l]=null}))}},qe=e=>t=>{e in _[t]&&(_[t][e](),delete _[t][e])},De=(e,t)=>n=>{let o=!1;const i=t=>()=>{_[n]?o&&o!==t||(e(t,n),o=t,requestAnimationFrame(()=>{o=!1})):f()},r=i(p),l=i("resize window"),s=new ResizeObserver(i("pageObserver")),c=new ResizeObserver(i("iframeObserver"));function u(e,o){ae(n,`${e}listeners for send${t}`),o(window,p,r),o(window,d,l)}function f(){fe(n,`stop${t}`),u("Remove ",ze),s.disconnect(),c.disconnect(),_[n]&&ze(_[n].iframe,a,f)}_[n]&&(_[n][`stop${t}`]=f,we(_[n].iframe,a,f),u("Add ",we),s.observe(document.body),c.observe(_[n].iframe))};const Ue=De(He(c,function(e){const t=document.body.getBoundingClientRect(),n=e.getBoundingClientRect(),{scrollY:o,scrollX:i,innerHeight:r,innerWidth:a}=window,{clientHeight:l,clientWidth:s}=document.documentElement;return JSON.stringify({iframeHeight:n.height,iframeWidth:n.width,clientHeight:Math.max(l,r||0),clientWidth:Math.max(s,a||0),offsetTop:Math.trunc(n.top-t.top),offsetLeft:Math.trunc(n.left-t.left),scrollTop:o,scrollLeft:i,documentHeight:l,documentWidth:s,windowHeight:r,windowWidth:a})}),"PageInfo"),Ve=qe("stopPageInfo");const Je=De(He(u,function(e){const{scrollWidth:t,scrollHeight:n}=document.documentElement,o="undefined"!=typeof window&&window.visualViewport?window.visualViewport:{},{width:i=0,height:r=0,offsetLeft:a=0,offsetTop:l=0,pageLeft:s=0,pageTop:c=0,scale:u=1}=o;return JSON.stringify({iframe:e.getBoundingClientRect(),document:{scrollWidth:t,scrollHeight:n},viewport:{width:i,height:r,offsetLeft:a,offsetTop:l,pageLeft:s,pageTop:c,scale:u}})}),"ParentInfo"),Qe=qe("stopParentInfo");function Ze(e){const t=e.getBoundingClientRect(),n=Ie(e.id);return{x:Number(t.left)+Number(n.x),y:Number(t.top)+Number(n.y)}}function Ge(e){const{x:t,y:n}=Ee.position,o=_[e]?.iframe;!1!==Se(e,"onScroll",{iframe:o,top:n,left:t,x:t,y:n})?Ae(e):Ce()}const Xe=e=>t=>{const{id:n,iframe:o,height:i,width:r}=t;const a=e?Ze(o):{x:0,y:0},l=(e=>({x:r+e.x,y:i+e.y}))(a),s=window.parentIframe||window.parentIFrame;le(n,`Reposition requested (offset x:%c${a.x}%c y:%c${a.y})`,X,Y,X),s?function(t,n){t["scrollTo"+(e?"Offset":"")](n.x,n.y)}(s,l):function(e){var t;t=e,Ee.position=t,Ge(n)}(l)},Ye=Xe(!1),_e=Xe(!0);function Ke(e,t){const n=t.split("#")[1]||"",o=decodeURIComponent(n),i=document.getElementById(o)||document.getElementsByName(o)[0];i?function(e,t,n){const{x:o,y:i}=Ze(n);le(e,`Moving to in page link: %c#${t}`,X),Ee.position={x:o,y:i},Ge(e),window.location.hash=t}(e,n,i):window.top!==window.self?function(e,t){const n=window.parentIframe||window.parentIFrame;n?n.moveToAnchor(t):ae(e,`In page link #${t} not found`)}(e,n):ae(e,`In page link #${n} not found`)}function et(e){const t=_[e]?.iframe?.title;return""===t||void 0===t}const tt=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)},nt=e=>e.replace(/[A-Za-z]/g,e=>String.fromCodePoint((e<="Z"?90:122)>=(e=e.codePointAt(0)+19)?e:e-26)),ot=new Date,it=e=>new Set(Array.from({length:9},e)),rt=" - lewpylk",at=["spjluzl","rlf","clyzpvu","rlf2","nlaMbssFlhy"],lt=["<yi>Puchspk Spjluzl Rlf</><iy><iy>","<yi>Tpzzpun Spjluzl Rlf</><iy><iy>","Aopz spiyhyf pz hchpshisl dpao ivao Jvttlyjphs huk Vwlu-Zvbyjl spjluzlz.<iy><iy><i>Jvttlyjphs Spjluzl</><iy>Mvy jvttlyjphs bzl, <p>pmyhtl-ylzpgly</> ylxbpylz h svd jvza vul aptl spjluzl mll. Mvy tvyl pumvythapvu cpzpa <b>oaawz://pmyhtl-ylzpgly.jvt/wypjpun</>.<iy><iy><i>Vwlu Zvbyjl Spjluzl</><iy>Pm fvb hyl bzpun aopz spiyhyf pu h uvu-jvttlyjphs vwlu zvbyjl wyvqlja aolu fvb jhu bzl pa mvy myll bukly aol alytz vm aol NWS C3 Spjluzl. Av jvumpyt fvb hjjlwa aolzl alytz, wslhzl zla aol <i>spjluzl</> rlf pu <p>pmyhtl-ylzpgly</> vwapvuz av <i>NWSc3</>. 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.","Pu whnl spurpun ylxbpylz h Wyvmlzzpvuhs vy Ibzpulzz spjluzl. Wslhzl zll <b>oaawz://pmyhtl-ylzpgly.jvt/wypjpun</> mvy tvyl klahpsz.","<yi>Clyzpvu 5 rlf klaljalk</><iy><iy>Fvb hyl jbyyluasf bzpun h spjluzl rlf mvy aol wylcpvbz clyzpvu vm <p>pmyhtl-ylzpgly</>.</><iy><iy>Av bwnyhkl av <i>Clyzpvu 6</> fvb jhu bzl aol <i>mpyza 11 johyhjalyz vm fvb spjluzl rlf</> av nla h 60% kpzjvbua ha oaawz://pmyhtl-ylzpgly.jvt/wypjpun.","<yi>Clyzpvu 5 rlf klaljalk</><iy><iy>Fvb hyl jbyyluasf bzpun h spjluzl rlf mvy aol wylcpvbz clyzpvu vm <p>pmyhtl-ylzpgly</>.<iy><iy>Av bwnyhkl av <i>Clyzpvu 6</> vm <p>pmyhtl-ylzpgly</> wslhzl kvdusvhk aol shalza rlf myvt oaawz://pmyhtl-ylzpgly.jvt/tf-vyklyz.","<yi> VLT rlf lewpylk</><iy><iy>Aol spjluzl rlf fvb hyl bzpun mvy <p>pmyhtl-ylzpgly</> pz myvt h wypvy flhy huk ohz lewpylk. Hu bwkhalk rlf pz ylslhzlk vu aol mpyza vm Uvcltily lhjo flhy.<iy><iy>Wslhzl kvdusvhk aol shalza rlf myvt oaawz://pmyhtl-ylzpgly.jvt/tf-vyklyz.","<yi>Bzl dpao slnhjf jspluaz</><iy><iy>Dolu bzpun <p>pmyhtl-ylzpgly</> jopsk whjrhnl dpao hu vskly clyzpvu vm aol whylua, fvb jhu zla aol spjluzl rlf pu aol pmyhtl. Mvy klahpsz vu ovd av zla aopz bw, wslhzl zll aol kvjbtluahapvu ha:<iy><iy>oaawz://pmyhtl-ylzpgly.jvt/zlabw/jopsk/#spjluzl"],st=[(pt=["NWSc3","zvsv","wyv","ibzpulzz","VLT"])[0],...pt.slice(1).map(e=>`${e}${rt}`),`${pt[4]}${rt}`,...pt.slice(1)],ct=Object.fromEntries(["2cgs7fdf4xb","1c9ctcccr4z","1q2pc4eebgb","ueokt0969w","w2zxchhgqz","1umuxblj2e5","1foobarqaz","2b5sdlfhbev","zo4ui3arjo","oclbb4thgl","igb1wzrjqr"].map((e,t)=>[e,Math.max(0,t-1)])),ut=ot[nt(at[4])](),ft=it((e,t)=>tt(`${ut+t}`)),dt=it((e,t)=>tt(""+(ut-++t)));var pt;const ht=e=>nt(lt[e]),yt=e=>{const t=e[nt(at[0])]||e[nt(at[1])]||e[nt(at[2])]||e[nt(at[3])];if(!t)return-1;const n=t.split("-");let o=function(e="",t=""){let n=-2;const o=tt(nt(e));return o in ct&&(n=ct[o]),9===n?(i=t,ft.has(i)?9:dt.has(i)?5:-2):n;var i}(...n);return 0===o||(e=>e[2]===tt(e[0]+e[1]))(n)||(o=-2),o};let mt=!1,gt=!1;function bt(t,n=-3){if(mt)return;const o=Math.max(_[t].mode,n);if(o>_[t].mode&&(_[t].mode=o),o<0)throw de(t),_[t].vAdvised||me(t||"Parent",`${ht(o+2)}${ht(2)}`),_[t].vAdvised=!0,ht(o+2).replace(/<\/?[a-z][^>]*>|<\/>/gi,"");switch(o>5&>||function(e,t){queueMicrotask(()=>console.info(`%ciframe-resizer ${e}`,te||t<1?"font-weight: bold;":P))}(`v${e} (${(e=>nt(st[e]))(o)})`,o),o){case 1:case 2:case 3:me("Parent",ht(6));break;case 4:me("Parent",ht(7));break;case 5:me("Parent",ht(8));break;default:o<1&&me("Parent",ht(3))}mt=!0}function vt(t){const{height:n,id:r,iframe:a,mode:s,message:d,type:p,width:h}=t,{lastMessage:y}=_[r];switch(_[r]?.firstRun&&function(e,t){_[e]&&(ae(e,`First run for ${e}`),bt(e,void 0===t?void 0:Number(t)),_[e].firstRun=!1)}(r,s),ae(r,`Received: %c${y}`,X),p){case o:_[r].autoResize=JSON.parse(Oe(r,9));break;case"beforeUnload":le(r,"Ready state reset"),_[r].initialised=!1;break;case"close":Be(a);break;case"inPageLink":Ke(r,Oe(r,9));break;case i:Pe(t),function(e){try{_[e].sameOrigin=!!_[e]?.iframe?.contentWindow?.iframeChildListener}catch(t){_[e].sameOrigin=!1}ae(e,`sameOrigin: %c${_[e].sameOrigin}`,X)}(r),function(t,n){n!==e&&(void 0!==n?ae(t,`Version mismatch (Child: %c${n}%c !== Parent: %c${e})`,X,Y,X):me(t,"<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"))}(r,d),_[r].initialised=!0,Se(r,"onReady",a);break;case l:!function(e,t){const{id:n,iframe:o}=e;ae(n,`onMessage passed: {iframe: %c${n}%c, message: %c${t}%c}`,X,Y,X,Y),Se(n,"onMessage",{iframe:o,message:JSON.parse(t)})}(t,Oe(r,6));break;case"mouseenter":Re("onMouseEnter",t);break;case"mouseleave":Re("onMouseLeave",t);break;case c:Ue(r);break;case u:Je(r);break;case"pageInfoStop":Ve(r);break;case"parentInfoStop":Qe(r);break;case f:Fe(t);break;case"scrollBy":!function(e){const{id:t,height:n,width:o}=e,i=window.parentIframe||window.parentIFrame||window;le(t,`scrollBy: x: %c${o}%c y: %c${n}`,X,Y,X),i.scrollBy(o,n)}(t);break;case"scrollTo":Ye(t);break;case"scrollToOffset":_e(t);break;case"title":!function(e,t){_[e]?.syncTitle&&(_[e].iframe.title=t,le(e,`Set iframe title attribute: %c${t}`,X))}(r,d);break;default:if(0===h&&0===n)return void ce(r,`Unsupported message received (${p}), this is likely due to the iframe containing a later version of iframe-resizer than the parent page`);if(0===h||0===n)return void ae(r,"Ignoring message with 0 height or width");if(document.hidden)return void ae(r,"Page hidden - ignored resize request");Pe(t)}}function wt(e){const t=e.data;if("[iFrameResizerChild]Ready"===t)return n=e.source,void Object.values(_).forEach((e=>({initChild:t,postMessageTarget:n})=>{e===n&&t()})(n));var n,o;if($!==`${o=t}`.slice(0,13)||!(o.slice(13).split(":")[0]in _)){if(typeof t!==m)return;return fe(y,"ignoredMessage"),void se(y,t)}const i=Me(t),{id:r,type:a}=i;switch(fe(r,a),!0){case!_[r]:throw new Error(`${a} No settings for ${r}. Message was: ${t}`);case!xe(i):case function(e){const{id:t,type:n}=e,o=n in Te;return o&&ae(t,"Ignoring init message from meta parent page"),o}(i):case!function(e,t){const{id:n}=e,{data:o,origin:i}=t;if("sameOrigin"in t&&t.sameOrigin)return!0;const r=_[n]?.checkOrigin;if(r&&"null"!=`${i}`&&!(r.constructor===Array?function(){ae(n,`Checking connection is from allowed list of origins: %c${r}`,X);for(const e of r)if(e===i)return!0;return!1}():function(){const e=_[n]?.remoteHost;return ae(n,`Checking connection is from: %c${e}`,X),i===e}()))throw new Error(`Unexpected message received from: ${i} for ${n}. Message was: ${o}. This error can be disabled by setting the checkOrigin: false option or by providing an array of trusted domains.`);return!0}(i,e):return;default:_[r].lastMessage=e.data,he(r,vt)(i)}}const zt=(e=>{let t=!1;return function(...n){return t?void 0:(t=!0,e.apply(this,n))}})(()=>{we(window,l,wt),we(document,"visibilitychange",ke),window.iframeParentListener=e=>setTimeout(()=>wt({data:e,sameOrigin:!0}))}),jt={};function $t(e){if(_[e]){const{iframe:t}=_[e];t.iframeResizer={close:Be.bind(null,t),disconnect:Ne.bind(null,t),moveToAnchor(t){((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})(t,m,"moveToAnchor(anchor) anchor"),$e("Move to anchor",`moveToAnchor:${t}`,e)},sendMessage(t){t=JSON.stringify(t),$e(l,`${l}:${t}`,e)}}}}const kt="8",Mt="32",Tt="child",xt=!0;function St(e,t){const{checkOrigin:n,iframe:{src:o,sandbox:i},initialisedFirstPage:r,waitForLoad:a}=t[e],l=(e=>{try{return new URL(e).origin}catch(e){return null}})(o);fe(e,"noResponse"),me(e,`<rb>No response from iframe</>\n\nThe iframe (<i>${e}</>) has not responded within ${t[e].warningTimeout/1e3} seconds. Check <b>@iframe-resizer/child</> package has been loaded in the iframe.\n${n&&l?`\nThe <b>checkOrigin</> option is currently enabled. If the iframe redirects away from <i>${l}</>, then the connection to the iframe may be blocked by the browser. To disable this option, set <b>checkOrigin</> to <bb>false</> or an array of allowed origins. See <u>https://iframe-resizer.com/checkorigin</> for more information.\n`:""}${a&&!r?"\nThe <b>waitForLoad</> option is currently set to <bb>true</>. If the iframe loads before <i>iframe-resizer</> runs, this option will prevent <i>iframe-resizer</> initialising. To disable this option, set <b>waitForLoad</> to <bb>false</>.\n":""}${(e=>typeof e===g&&e.length>0&&!(e.contains("allow-scripts")&&e.contains("allow-same-origin")))(i)?"\nThe iframe has the <b>sandbox</> attribute, please ensure it contains both the <bb>allow-same-origin</> and <bb>allow-scripts</> values.\n":""}\nThis 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`)}function Ot(e,t){const n=n=>()=>{if(!_[e])return;const{firstRun:o,iframe:r}=_[e];$e(n,t,e),(e=>e===i)(n)&&(e=>"lazy"===e.loading)(r)||function(e,t){const{msgTimeout:n,warningTimeout:o}=t[e];o&&(n&&clearTimeout(n),t[e].msgTimeout=setTimeout(function(){if(void 0===t[e])return;const{initialised:n,loadErrorShown:o}=t[e];t[e].msgTimeout=void 0,n?t[e].initialisedFirstPage=!0:o||(t[e].loadErrorShown=!0,St(e,t))},o))}(e,_),o||function(e){_[e]?.heightCalculationMethod in k&&Fe({id:e,iframe:_[e].iframe,height:1,width:1,type:i})}(e)},{iframe:o}=_[e];_[e].initChild=n(r),function(e,t){we(e,a,()=>setTimeout(t,1))}(o,n(s)),function(e,t){const{iframe:n,waitForLoad:o}=_[e];!0!==o&&((e=>{const{src:t,srcdoc:n}=e;return!n&&(null==t||""===t||"about:blank"===t)})(n)?setTimeout(()=>{fe(e,"noContent"),le(e,"No content detected in the iframe, delaying initialisation")}):setTimeout(t))}(e,n(i))}function Rt(e,t){return t?(("sizeWidth"in t||"sizeHeight"in t||o in t)&&me(e,`<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 <bb>${z}</>, <bb>${j}</>, <bb>${w}</> or <bb>${v}</>.\n`),t):{}}const Et=e=>""===e||null!==e.match(/^(about:blank|javascript:|file:\/\/)/)?"*":e;function Ct(e,t,n){E(_[e],t)&&(me(e,`<rb>Deprecated option</>\n\nThe <b>${t}</> option has been renamed to <b>${n}</>. Use of the old name will be removed in a future version of <i>iframe-resizer</>.`),_[e][n]=_[e][t],delete _[e][t])}const It=e=>E(e,"onMouseEnter")||E(e,"onMouseLeave");function At(e,t){const{id:n}=e;_[n]={..._[n],iframe:e,remoteHost:e?.src.split("/").slice(0,3).join("/"),...ge,...Rt(n,t),mouseEvents:It(t),mode:yt(t),syncTitle:et(n)},function(e){Ct(e,"offset","offsetSize"),Ct(e,"onClose","onBeforeClose"),Ct(e,"onClosed","onAfterClose")}(n),function(e){const{direction:t}=_[e];switch(t){case z:break;case j:_[e].sizeHeight=!1;case w:_[e].sizeWidth=!0;break;case v:_[e].sizeWidth=!1,_[e].sizeHeight=!1,_[e].autoResize=!1;break;default:throw new TypeError(`Direction value of "${t}" is not valid`)}ae(e,`direction: %c${t}`,X)}(n),function(e,{offset:t,offsetSize:n}){const o=n||t;o&&(_[e].direction===z?(_[e].offsetHeight=o,ae(e,`Offset height: %c${o}`,X)):(_[e].offsetWidth=o,ae(e,`Offset width: %c${o}`,X)))}(n,t),function(e){_[e].warningTimeout||le(e,"warningTimeout:%c disabled",X)}(n),function(e){const{id:t}=e;null===_[t].postMessageTarget&&(_[t].postMessageTarget=e.contentWindow)}(e),function(e){const{checkOrigin:t,remoteHost:n}=_[e];Array.isArray(t)&&0===t.length&&ce(e,"checkOrigin is an empty array — no messages will be sent to the iframe"),_[e].targetOrigin=Array.isArray(t)?t.map(Et):[!1===t?"*":Et(n)]}(n)}function Wt(e,t,o){At(t,o),ae(e,`src: %c${t.srcdoc||t.src}`,X),function(e){if(mt)return;const{mode:t}=_[e];t>5&&bt(e,t)}(e),function(e){const{id:t}=e;switch(ae(t,`Iframe scrolling ${_[t]?.scrolling?"enabled":"disabled"} for ${t}`),e.style.overflow=!1===_[t]?.scrolling?"hidden":b,_[t]?.scrolling){case"omit":break;case!0:e.scrolling="yes";break;case!1:e.scrolling="no";break;default:e.scrolling=_[t]?.scrolling||"no"}}(t),function(e){const{bodyMargin:t}=_[e];"number"!=typeof t&&"0"!==t||(_[e].bodyMargin=`${t}px`)}(e),Ot(e,function(e){const{autoResize:t,bodyBackground:o,bodyMargin:i,bodyPadding:r,heightCalculationMethod:a,inPageLinks:l,license:s,log:c,logExpand:u,mouseEvents:f,offsetHeight:d,offsetWidth:p,mode:h,sizeHeight:y,sizeWidth:m,tolerance:g,widthCalculationMethod:b}=_[e];return[e,kt,m,c,Mt,xt,t,i,a,o,r,g,l,Tt,b,f,d,p,y,s,Ee.version,h,"",u].join(n)}(e)),$t(e),ae(e,"Setup complete")}function Lt(e,t){const{id:n}=e;fe(n,"setup"),function(e){if(!0===jt[e])return!1;const t=document.querySelectorAll(`iframe#${CSS.escape(e)}`);if(t.length<=1)return!0;jt[e]=!0;const n=Array.from(t).flatMap(e=>[h,e,h]);return me(e,`<rb>Duplicate ID attributes detected</>\n\nThe <b>${e}</> ID is not unique. Having multiple iframes on the same page with the same ID causes problems with communication between the iframe and parent page. Please ensure that the ID of each iframe has a unique value.\n\nFound <bb>${t.length}</> iframes with the <b>${e}</> ID:`,...n,h),!1}(n)&&Wt(n,e,t),pe(n)}function Pt(e,t){0===t.log?t.log=!1:1===t.log?t.log=x:2===t.log&&(t.log=T);const n=E(t,"log"),o=R(t.log),i=n?!!o||t.log:ge.log;E(t,"logExpand")||(t.logExpand=n&&o?t.log===T:ge.logExpand),function(e){-1===e?.log&&(e.log=!1,gt=!0)}(t),function({enabled:e,expand:t,iframeId:n}){const o=K({expand:t,label:oe(n)});te=e,_[n]||(_[n]={console:o})}({enabled:i,expand:t.logExpand,iframeId:e}),o&&!(t.log in S)&&ue(e,`Invalid value for options.log: Accepted values are "${T}" and "${x}"`),t.log=i}function Nt(e){if(!O(e))throw new TypeError("Options is not an object");return zt(),function(e){const{search:t}=window.location;if(t.includes("ifrlog"))switch(new URLSearchParams(t).get("ifrlog")){case String(0):e.log=!1;break;case T:case String(2):e.log=T;break;case x:case String(1):default:e.log=x}}(e),n=>{const o=ve(n,e);return t in n?(fe(o,"alreadySetup"),ce(o,`Ignored iframe (${o}), already setup.`)):(Pt(o,e),he(o,Lt)(n,e)),n?.iframeResizer}}switch(!0){case void 0===window.jQuery:ce("","Unable to bind to jQuery, it is not available.");break;case!window.jQuery.fn:ce("","Unable to bind to jQuery, it is not fully loaded.");break;case window.jQuery.fn.iframeResize:ce("","iframeResize is already assigned to jQuery.fn.");break;default:window.jQuery.fn.iframeResize=function(e){const t=Nt(e);return this.filter("iframe").each((e,n)=>t(n)).end()}}});
|
|
20
|
+
!function(e){"function"==typeof define&&define.amd?define(e):e()}(function(){"use strict";const e="6.0.0-beta.4",t="iframeResizer",n=":",o="autoResize",i="init",r="iframeReady",a="load",l="message",s="onload",c="pageInfo",u="parentInfo",f="reset",d="resize",p="scroll",h="\n",y="parent",m="string",g="object",b="auto",v="none",w="both",z="vertical",j="horizontal",$="[iFrameSizer]",k=Object.freeze({max:1,scroll:1,bodyScroll:1,documentElementScroll:1}),M=Object.freeze({[s]:1,[i]:1,[r]:1}),T="expanded",x="collapsed",S=Object.freeze({[T]:1,[x]:1}),O=e=>typeof e===g&&null!==e,R=e=>typeof e===m;const E=(e,t)=>Object.hasOwn?Object.hasOwn(e,t):((e,t)=>Object.prototype.hasOwnProperty.call(e,t))(e,t),C={br:"\n",rb:"[31;1m",bb:"[34;1m",b:"[1m",i:"[3m",u:"[4m","/":"[m"},I=Object.keys(C),A=new RegExp(`<(${I.join("|")})>`,"gi"),W=(e,t)=>C[t]??"",L=e=>t=>e(R(t)?window.chrome?t.replace(A,W):(e=>e.replaceAll("<br>",h).replaceAll(/<\/?[^>]+>/gi,""))(t):t),P="font-weight: normal;",N=P+"font-style: italic;",B="default",F=Object.freeze({assert:!0,error:!0,warn:!0}),H={expand:!1,defaultEvent:void 0,event:void 0,label:"AutoConsoleGroup",showTime:!0},q={profile:0,profileEnd:0,timeStamp:0,trace:0},D=Object.assign(console);const{fromEntries:U,keys:V}=Object,J=e=>[e,D[e]],Q=e=>t=>[t,function(n){e[t]=n}],Z=(e,t)=>U(V(e).map(t));const G=!(typeof window>"u"||"function"!=typeof window.matchMedia)&&window.matchMedia("(prefers-color-scheme: dark)").matches,X=G?"color: #A9C7FB;":"color: #135CD2;",Y=G?"color: #E3E3E3;":"color: #1F1F1F;",_={},K=(ee=function(e={}){const t={},n={},o=[],i={...H,expand:!e.collapsed||H.expanded,...e};let r="";function a(){o.length=0,r=""}function l(){delete i.event,a()}const s=()=>!!o.some(([e])=>e in F)||!!i.expand;function c(){if(0!==o.length){D[s()?"group":"groupCollapsed"](`%c${i.label}%c ${(e=>{const t=e.event||e.defaultEvent;return t?`${t}`:""})(i)} %c${i.showTime?r:""}`,P,"font-weight: bold;",N);for(const[e,...t]of o)D.assert(e in D,`Unknown console method: ${e}`),e in D&&D[e](...t);D.groupEnd(),l()}else l()}function u(){""===r&&(r=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)}`}(),queueMicrotask(()=>queueMicrotask(c)))}function f(e,...t){0===o.length&&u(),o.push([e,...t])}function d(e=B,...n){t[e]?f("log",`${e}: ${performance.now()-t[e]} ms`,...n):f("timeLog",e,...n)}return{...Z(i,Q(i)),...Z(console,e=>[e,(...t)=>f(e,...t)]),...Z(q,J),assert:function(e,...t){!0!==e&&f("assert",e,...t)},count:function(e=B){n[e]?n[e]+=1:n[e]=1,f("log",`${e}: ${n[e]}`)},countReset:function(e=B){delete n[e]},endAutoGroup:c,errorBoundary:e=>(...t)=>{let n;try{n=e(...t)}catch(e){if(!Error.prototype.isPrototypeOf(e))throw e;f("error",e),c()}return n},event:function(e){u(),i.event=e},purge:a,time:function(e=B){u(),t[e]=performance.now()},timeEnd:function(e=B){d(e),delete t[e]},timeLog:d,touch:u}},ee?.__esModule?ee.default:ee);var ee;let te=!0;const ne=K({expand:!1,label:y}),oe=e=>window.top===window.self?`parent(${e})`:`nested parent(${e})`;const ie=e=>(t,...n)=>_[t]?_[t].console[e](...n):ne[e](...n),re=e=>(t,...n)=>!0===(e=>_[e]?_[e].log:te)(t)?ie(e)(t,...n):null,ae=re("log"),le=ae,se=re("debug"),ce=ie("warn"),ue=ie("error"),fe=ie("event"),de=ie("purge"),pe=ie("endAutoGroup"),he=ie("errorBoundary");const ye=L(e=>e),me=(e,...n)=>_[e]?_[e].console.warn(...n.map(ye)):queueMicrotask(()=>{const o=L((e=>(...n)=>[`${t}(${e})`,...n].join(" "))(e));console?.warn(...n.map(o))}),ge=Object.freeze({autoResize:!0,bodyBackground:null,bodyMargin:null,bodyPadding:null,checkOrigin:!0,direction:z,firstRun:!0,inPageLinks:!1,heightCalculationMethod:b,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:b,onBeforeClose:()=>!0,onAfterClose(){},onMessage:null,onMouseEnter(){},onMouseLeave(){},onReady(){},onResized(){},onScroll:()=>!0});let be=0;function ve(e,t){let{id:n}=e;if(n&&!R(n))throw new TypeError("Invalid id for iframe. Expected String");return n&&""!==n||(n=function(e){const t=e?.id||ge.id+be++;return null===document.getElementById(t)?t:`${t}${be++}`}(t),e.id=n,fe(n,"assignId"),ae(n,`Added missing iframe ID: ${n} (${e.src})`)),n}const we=(e,t,n,o)=>e.addEventListener(t,n,o||!1),ze=(e,t,n)=>e.removeEventListener(t,n,!1);function je(e,t,o){function i(i){const r=e in M?(e=>e.split(n).filter((e,t)=>19!==t).join(n))(t):t;le(o,i,X,Y,X),le(o,`Message data: %c${r}`,X)}const{iframe:r,postMessageTarget:a,sameOrigin:l,targetOrigin:s}=_[o];if(l)try{return r.contentWindow.iframeChildListener($+t),void i(`Sending message to iframe %c${o}%c via same origin%c`)}catch(t){e in M?(_[o].sameOrigin=!1,ae(o,"New iframe does not support same origin")):ce(o,"Same origin messaging failed, falling back to postMessage")}i(`Sending message to iframe: %c${o}%c targetOrigin: %c${s.join(", ")}`);for(const e of s)a.postMessage($+t,e)}function $e(e,t,n){fe(n,e),_[n]?.postMessageTarget?je(e,t,n):ce(n,"Iframe not found")}function ke(){!0!==document.hidden&&((e,t)=>{Object.values(_).filter(({autoResize:e,firstRun:t})=>e&&!t).forEach(({iframe:n})=>$e(e,t,n.id))})("tabVisible",d)}function Me(e){const t=e.slice(13).split(":"),n=t[1]?Number(t[1]):0,o=_[t[0]]?.iframe,i=o?getComputedStyle(o):null,r=i?function(e){return"border-box"!==e.boxSizing?0:(e.paddingTop?parseInt(e.paddingTop,10):0)+(e.paddingBottom?parseInt(e.paddingBottom,10):0)}(i)+function(e){return"border-box"!==e.boxSizing?0:(e.borderTopWidth?parseInt(e.borderTopWidth,10):0)+(e.borderBottomWidth?parseInt(e.borderBottomWidth,10):0)}(i):0,a={iframe:o,id:t[0],height:n+r,width:Number(t[2]),type:t[3],msg:t[4],message:t[4]};return t[5]&&(a.mode=t[5]),a}const Te={true:1,false:1,undefined:1};function xe(e){const{id:t,msg:n,iframe:o}=e,i=function(e){if(!O(e))return!1;try{return"IFRAME"===e.tagName||e instanceof HTMLIFrameElement}catch(e){return!1}}(o);return i||(ae(t,`Received: %c${n}`,X),ce(t,"The target iframe was not found.")),i}function Se(e,t,n){if(!_[e])return null;const o=_[e][t];if("function"!=typeof o)throw new TypeError(`${t} on iframe[${e}] is not a function`);if("onBeforeClose"!==t&&"onScroll"!==t)return((e,...t)=>setTimeout(()=>e(...t),0))(o,n);try{return o(n)}catch(n){return console.error(n),ce(e,`Error in ${t} callback`),null}}function Oe(e,t){const{lastMessage:o}=_[e];return o.slice(o.indexOf(n)+7+t)}function Re(e,t){const{id:o,iframe:i,height:r,type:a,width:l}=t;let s={x:0,y:0};if(0===l&&0===r){const e=Oe(o,9).split(n);s={x:e[1],y:e[0]}}else s={x:l,y:r};Se(o,e,{iframe:i,screenX:Number(s.x),screenY:Number(s.y),type:a})}const Ee={position:null,version:e};function Ce(){Ee.position=null}function Ie(e){return null===Ee.position&&(Ee.position={x:window.scrollX,y:window.scrollY}),ae(e,`Get page position: %c${Ee.position.x}%c, %c${Ee.position.y}`,X,Y,X),Ee.position}function Ae(e){null!==Ee.position&&(window.scrollTo(Ee.position.x,Ee.position.y),le(e,`Set page position: %c${Ee.position.x}%c, %c${Ee.position.y}`,X,Y,X),Ce())}function We(e,t){const{id:n}=t,o=`${t[e]}px`;_[n].iframe.style[e]=o,le(n,`Set ${e}: %c${o}`,X)}function Le(e){const{id:t}=e,{sizeHeight:n,sizeWidth:o}=_[t];n&&We("height",e),o&&We("width",e)}function Pe(e){const{id:t}=e;Le(e),Ae(t),Se(t,"onResized",e)}function Ne(e){const{id:t}=e;ae(t,"Disconnected from iframe"),delete _[t],delete e.iframeResizer}function Be(e){const{id:t}=e;if(!1!==Se(t,"onBeforeClose",t)){ae(t,`Removing iframe: %c${t}`,X);try{e.parentNode&&e.remove()}catch(e){ce(t,e)}Se(t,"onAfterClose",t),Ne(e)}else ae(t,"Close iframe cancelled by onBeforeClose")}function Fe(e){const{id:t,type:n}=e;ae(t,"Size reset requested by "+(n===i?"parent page":"child page")),Ie(t),Le(e),$e(f,f,t)}const He=(e,t)=>{const n={};return(o,i)=>{const{iframe:r}=_[i];var a,l;a=function(){$e(`${o} (${e})`,`${e}:${t(r)}`,i)},n[l=i]||(a(),n[l]=requestAnimationFrame(()=>{n[l]=null}))}},qe=e=>t=>{e in _[t]&&(_[t][e](),delete _[t][e])},De=(e,t)=>n=>{let o=!1;const i=t=>()=>{_[n]?o&&o!==t||(e(t,n),o=t,requestAnimationFrame(()=>{o=!1})):f()},r=i(p),l=i("resize window"),s=new ResizeObserver(i("pageObserver")),c=new ResizeObserver(i("iframeObserver"));function u(e,o){ae(n,`${e}listeners for send${t}`),o(window,p,r),o(window,d,l)}function f(){fe(n,`stop${t}`),u("Remove ",ze),s.disconnect(),c.disconnect(),_[n]&&ze(_[n].iframe,a,f)}_[n]&&(_[n][`stop${t}`]=f,we(_[n].iframe,a,f),u("Add ",we),s.observe(document.body),c.observe(_[n].iframe))};const Ue=De(He(c,function(e){const t=document.body.getBoundingClientRect(),n=e.getBoundingClientRect(),{scrollY:o,scrollX:i,innerHeight:r,innerWidth:a}=window,{clientHeight:l,clientWidth:s}=document.documentElement;return JSON.stringify({iframeHeight:n.height,iframeWidth:n.width,clientHeight:Math.max(l,r||0),clientWidth:Math.max(s,a||0),offsetTop:Math.trunc(n.top-t.top),offsetLeft:Math.trunc(n.left-t.left),scrollTop:o,scrollLeft:i,documentHeight:l,documentWidth:s,windowHeight:r,windowWidth:a})}),"PageInfo"),Ve=qe("stopPageInfo");const Je=De(He(u,function(e){const{scrollWidth:t,scrollHeight:n}=document.documentElement,o="undefined"!=typeof window&&window.visualViewport?window.visualViewport:{},{width:i=0,height:r=0,offsetLeft:a=0,offsetTop:l=0,pageLeft:s=0,pageTop:c=0,scale:u=1}=o;return JSON.stringify({iframe:e.getBoundingClientRect(),document:{scrollWidth:t,scrollHeight:n},viewport:{width:i,height:r,offsetLeft:a,offsetTop:l,pageLeft:s,pageTop:c,scale:u}})}),"ParentInfo"),Qe=qe("stopParentInfo");function Ze(e){const t=e.getBoundingClientRect(),n=Ie(e.id);return{x:Number(t.left)+Number(n.x),y:Number(t.top)+Number(n.y)}}function Ge(e){const{x:t,y:n}=Ee.position,o=_[e]?.iframe;!1!==Se(e,"onScroll",{iframe:o,top:n,left:t,x:t,y:n})?Ae(e):Ce()}const Xe=e=>t=>{const{id:n,iframe:o,height:i,width:r}=t;const a=e?Ze(o):{x:0,y:0},l=(e=>({x:r+e.x,y:i+e.y}))(a),s=window.parentIframe||window.parentIFrame;le(n,`Reposition requested (offset x:%c${a.x}%c y:%c${a.y})`,X,Y,X),s?function(t,n){t["scrollTo"+(e?"Offset":"")](n.x,n.y)}(s,l):function(e){var t;t=e,Ee.position=t,Ge(n)}(l)},Ye=Xe(!1),_e=Xe(!0);function Ke(e,t){const n=t.split("#")[1]||"",o=decodeURIComponent(n),i=document.getElementById(o)||document.getElementsByName(o)[0];i?function(e,t,n){const{x:o,y:i}=Ze(n);le(e,`Moving to in page link: %c#${t}`,X),Ee.position={x:o,y:i},Ge(e),window.location.hash=t}(e,n,i):window.top!==window.self?function(e,t){const n=window.parentIframe||window.parentIFrame;n?n.moveToAnchor(t):ae(e,`In page link #${t} not found`)}(e,n):ae(e,`In page link #${n} not found`)}function et(e){const t=_[e]?.iframe?.title;return""===t||void 0===t}const tt=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)},nt=e=>e.replace(/[A-Za-z]/g,e=>String.fromCodePoint((e<="Z"?90:122)>=(e=e.codePointAt(0)+19)?e:e-26)),ot=new Date,it=e=>new Set(Array.from({length:9},e)),rt=" - lewpylk",at=["spjluzl","rlf","clyzpvu","rlf2","nlaMbssFlhy"],lt=["<yi>Puchspk Spjluzl Rlf</><iy><iy>","<yi>Tpzzpun Spjluzl Rlf</><iy><iy>","Aopz spiyhyf pz hchpshisl dpao ivao Jvttlyjphs huk Vwlu-Zvbyjl spjluzlz.<iy><iy><i>Jvttlyjphs Spjluzl</><iy>Mvy jvttlyjphs bzl, <p>pmyhtl-ylzpgly</> ylxbpylz h svd jvza vul aptl spjluzl mll. Mvy tvyl pumvythapvu cpzpa <b>oaawz://pmyhtl-ylzpgly.jvt/wypjpun</>.<iy><iy><i>Vwlu Zvbyjl Spjluzl</><iy>Pm fvb hyl bzpun aopz spiyhyf pu h uvu-jvttlyjphs vwlu zvbyjl wyvqlja aolu fvb jhu bzl pa mvy myll bukly aol alytz vm aol NWS C3 Spjluzl. Av jvumpyt fvb hjjlwa aolzl alytz, wslhzl zla aol <i>spjluzl</> rlf pu <p>pmyhtl-ylzpgly</> vwapvuz av <i>NWSc3</>. 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.","Pu whnl spurpun ylxbpylz h Wyvmlzzpvuhs vy Ibzpulzz spjluzl. Wslhzl zll <b>oaawz://pmyhtl-ylzpgly.jvt/wypjpun</> mvy tvyl klahpsz.","<yi>Clyzpvu 5 rlf klaljalk</><iy><iy>Fvb hyl jbyyluasf bzpun h spjluzl rlf mvy aol wylcpvbz clyzpvu vm <p>pmyhtl-ylzpgly</>.</><iy><iy>Av bwnyhkl av <i>Clyzpvu 6</> fvb jhu bzl aol <i>mpyza 11 johyhjalyz vm fvb spjluzl rlf</> av nla h 60% kpzjvbua ha oaawz://pmyhtl-ylzpgly.jvt/wypjpun.","<yi>Clyzpvu 5 rlf klaljalk</><iy><iy>Fvb hyl jbyyluasf bzpun h spjluzl rlf mvy aol wylcpvbz clyzpvu vm <p>pmyhtl-ylzpgly</>.<iy><iy>Av bwnyhkl av <i>Clyzpvu 6</> vm <p>pmyhtl-ylzpgly</> wslhzl kvdusvhk aol shalza rlf myvt oaawz://pmyhtl-ylzpgly.jvt/tf-vyklyz.","<yi> VLT rlf lewpylk</><iy><iy>Aol spjluzl rlf fvb hyl bzpun mvy <p>pmyhtl-ylzpgly</> pz myvt h wypvy flhy huk ohz lewpylk. Hu bwkhalk rlf pz ylslhzlk vu aol mpyza vm Uvcltily lhjo flhy.<iy><iy>Wslhzl kvdusvhk aol shalza rlf myvt oaawz://pmyhtl-ylzpgly.jvt/tf-vyklyz.","<yi>Bzl dpao slnhjf jspluaz</><iy><iy>Dolu bzpun <p>pmyhtl-ylzpgly</> jopsk whjrhnl dpao hu vskly clyzpvu vm aol whylua, fvb jhu zla aol spjluzl rlf pu aol pmyhtl. Mvy klahpsz vu ovd av zla aopz bw, wslhzl zll aol kvjbtluahapvu ha:<iy><iy>oaawz://pmyhtl-ylzpgly.jvt/zlabw/jopsk/#spjluzl"],st=[(pt=["NWSc3","zvsv","wyv","ibzpulzz","VLT"])[0],...pt.slice(1).map(e=>`${e}${rt}`),`${pt[4]}${rt}`,...pt.slice(1)],ct=Object.fromEntries(["2cgs7fdf4xb","1c9ctcccr4z","1q2pc4eebgb","ueokt0969w","w2zxchhgqz","1umuxblj2e5","1foobarqaz","2b5sdlfhbev","zo4ui3arjo","oclbb4thgl","igb1wzrjqr"].map((e,t)=>[e,Math.max(0,t-1)])),ut=ot[nt(at[4])](),ft=it((e,t)=>tt(`${ut+t}`)),dt=it((e,t)=>tt(""+(ut-++t)));var pt;const ht=e=>nt(lt[e]),yt=e=>{const t=e[nt(at[0])]||e[nt(at[1])]||e[nt(at[2])]||e[nt(at[3])];if(!t)return-1;const n=t.split("-");let o=function(e="",t=""){let n=-2;const o=tt(nt(e));return o in ct&&(n=ct[o]),9===n?(i=t,ft.has(i)?9:dt.has(i)?5:-2):n;var i}(...n);return 0===o||(e=>e[2]===tt(e[0]+e[1]))(n)||(o=-2),o};let mt=!1,gt=!1;function bt(t,n=-3){if(mt)return;const o=Math.max(_[t].mode,n);if(o>_[t].mode&&(_[t].mode=o),o<0)throw de(t),_[t].vAdvised||me(t||"Parent",`${ht(o+2)}${ht(2)}`),_[t].vAdvised=!0,ht(o+2).replace(/<\/?[a-z][^>]*>|<\/>/gi,"");switch(o>5&>||function(e,t){queueMicrotask(()=>console.info(`%ciframe-resizer ${e}`,te||t<1?"font-weight: bold;":P))}(`v${e} (${(e=>nt(st[e]))(o)})`,o),o){case 1:case 2:case 3:me("Parent",ht(6));break;case 4:me("Parent",ht(7));break;case 5:me("Parent",ht(8));break;default:o<1&&me("Parent",ht(3))}mt=!0}function vt(t){const{height:n,id:r,iframe:a,mode:s,message:d,type:p,width:h}=t,{lastMessage:y}=_[r];switch(_[r]?.firstRun&&function(e,t){_[e]&&(ae(e,`First run for ${e}`),bt(e,void 0===t?void 0:Number(t)),_[e].firstRun=!1)}(r,s),ae(r,`Received: %c${y}`,X),p){case o:_[r].autoResize=JSON.parse(Oe(r,9));break;case"beforeUnload":le(r,"Ready state reset"),_[r].initialised=!1;break;case"close":Be(a);break;case"inPageLink":Ke(r,Oe(r,9));break;case i:Pe(t),function(e){try{_[e].sameOrigin=!!_[e]?.iframe?.contentWindow?.iframeChildListener}catch(t){_[e].sameOrigin=!1}ae(e,`sameOrigin: %c${_[e].sameOrigin}`,X)}(r),function(t,n){n!==e&&(void 0!==n?ae(t,`Version mismatch (Child: %c${n}%c !== Parent: %c${e})`,X,Y,X):me(t,"<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"))}(r,d),_[r].initialised=!0,Se(r,"onReady",a);break;case l:!function(e,t){const{id:n,iframe:o}=e;ae(n,`onMessage passed: {iframe: %c${n}%c, message: %c${t}%c}`,X,Y,X,Y),Se(n,"onMessage",{iframe:o,message:JSON.parse(t)})}(t,Oe(r,6));break;case"mouseenter":Re("onMouseEnter",t);break;case"mouseleave":Re("onMouseLeave",t);break;case c:Ue(r);break;case u:Je(r);break;case"pageInfoStop":Ve(r);break;case"parentInfoStop":Qe(r);break;case f:Fe(t);break;case"scrollBy":!function(e){const{id:t,height:n,width:o}=e,i=window.parentIframe||window.parentIFrame||window;le(t,`scrollBy: x: %c${o}%c y: %c${n}`,X,Y,X),i.scrollBy(o,n)}(t);break;case"scrollTo":Ye(t);break;case"scrollToOffset":_e(t);break;case"title":!function(e,t){_[e]?.syncTitle&&(_[e].iframe.title=t,le(e,`Set iframe title attribute: %c${t}`,X))}(r,d);break;default:if(0===h&&0===n)return void ce(r,`Unsupported message received (${p}), this is likely due to the iframe containing a later version of iframe-resizer than the parent page`);if(0===h||0===n)return void ae(r,"Ignoring message with 0 height or width");if(document.hidden)return void ae(r,"Page hidden - ignored resize request");Pe(t)}}function wt(e){const t=e.data;if("[iFrameResizerChild]Ready"===t)return n=e.source,void Object.values(_).forEach((e=>({initChild:t,postMessageTarget:n})=>{e===n&&t()})(n));var n,o;if($!==`${o=t}`.slice(0,13)||!(o.slice(13).split(":")[0]in _)){if(typeof t!==m)return;return fe(y,"ignoredMessage"),void se(y,t)}const i=Me(t),{id:r,type:a}=i;switch(fe(r,a),!0){case!_[r]:throw new Error(`${a} No settings for ${r}. Message was: ${t}`);case!xe(i):case function(e){const{id:t,type:n}=e,o=n in Te;return o&&ae(t,"Ignoring init message from meta parent page"),o}(i):case!function(e,t){const{id:n}=e,{data:o,origin:i}=t;if("sameOrigin"in t&&t.sameOrigin)return!0;const r=_[n]?.checkOrigin;if(r&&"null"!=`${i}`&&!(r.constructor===Array?function(){ae(n,`Checking connection is from allowed list of origins: %c${r}`,X);for(const e of r)if(e===i)return!0;return!1}():function(){const e=_[n]?.remoteHost;return ae(n,`Checking connection is from: %c${e}`,X),i===e}()))throw new Error(`Unexpected message received from: ${i} for ${n}. Message was: ${o}. This error can be disabled by setting the checkOrigin: false option or by providing an array of trusted domains.`);return!0}(i,e):return;default:_[r].lastMessage=e.data,he(r,vt)(i)}}const zt=(e=>{let t=!1;return function(...n){return t?void 0:(t=!0,e.apply(this,n))}})(()=>{we(window,l,wt),we(document,"visibilitychange",ke),window.iframeParentListener=e=>setTimeout(()=>wt({data:e,sameOrigin:!0}))}),jt={};function $t(e){if(_[e]){const{iframe:t}=_[e];t.iframeResizer={close:Be.bind(null,t),disconnect:Ne.bind(null,t),moveToAnchor(t){((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})(t,m,"moveToAnchor(anchor) anchor"),$e("Move to anchor",`moveToAnchor:${t}`,e)},sendMessage(t){t=JSON.stringify(t),$e(l,`${l}:${t}`,e)}}}}const kt="8",Mt="32",Tt="child",xt=!0;function St(e,t){const{checkOrigin:n,iframe:{src:o,sandbox:i},initialisedFirstPage:r,waitForLoad:a}=t[e],l=(e=>{try{return new URL(e).origin}catch(e){return null}})(o);fe(e,"noResponse"),me(e,`<rb>No response from iframe</>\n\nThe iframe (<i>${e}</>) has not responded within ${t[e].warningTimeout/1e3} seconds. Check <b>@iframe-resizer/child</> package has been loaded in the iframe.\n${n&&l?`\nThe <b>checkOrigin</> option is currently enabled. If the iframe redirects away from <i>${l}</>, then the connection to the iframe may be blocked by the browser. To disable this option, set <b>checkOrigin</> to <bb>false</> or an array of allowed origins. See <u>https://iframe-resizer.com/checkorigin</> for more information.\n`:""}${a&&!r?"\nThe <b>waitForLoad</> option is currently set to <bb>true</>. If the iframe loads before <i>iframe-resizer</> runs, this option will prevent <i>iframe-resizer</> initialising. To disable this option, set <b>waitForLoad</> to <bb>false</>.\n":""}${(e=>typeof e===g&&e.length>0&&!(e.contains("allow-scripts")&&e.contains("allow-same-origin")))(i)?"\nThe iframe has the <b>sandbox</> attribute, please ensure it contains both the <bb>allow-same-origin</> and <bb>allow-scripts</> values.\n":""}\nThis 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`)}function Ot(e,t){const n=n=>()=>{if(!_[e])return;const{firstRun:o,iframe:r}=_[e];$e(n,t,e),(e=>e===i)(n)&&(e=>"lazy"===e.loading)(r)||function(e,t){const{msgTimeout:n,warningTimeout:o}=t[e];o&&(n&&clearTimeout(n),t[e].msgTimeout=setTimeout(function(){if(void 0===t[e])return;const{initialised:n,loadErrorShown:o}=t[e];t[e].msgTimeout=void 0,n?t[e].initialisedFirstPage=!0:o||(t[e].loadErrorShown=!0,St(e,t))},o))}(e,_),o||function(e){_[e]?.heightCalculationMethod in k&&Fe({id:e,iframe:_[e].iframe,height:1,width:1,type:i})}(e)},{iframe:o}=_[e];_[e].initChild=n(r),function(e,t){we(e,a,()=>setTimeout(t,1))}(o,n(s)),function(e,t){const{iframe:n,waitForLoad:o}=_[e];!0!==o&&((e=>{const{src:t,srcdoc:n}=e;return!n&&(null==t||""===t||"about:blank"===t)})(n)?setTimeout(()=>{fe(e,"noContent"),le(e,"No content detected in the iframe, delaying initialisation")}):setTimeout(t))}(e,n(i))}function Rt(e,t){return t?(("sizeWidth"in t||"sizeHeight"in t||o in t)&&me(e,`<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 <bb>${z}</>, <bb>${j}</>, <bb>${w}</> or <bb>${v}</>.\n`),t):{}}const Et=e=>""===e||null!==e.match(/^(about:blank|javascript:|file:\/\/)/)?"*":e;function Ct(e,t,n){E(_[e],t)&&(me(e,`<rb>Deprecated option</>\n\nThe <b>${t}</> option has been renamed to <b>${n}</>. Use of the old name will be removed in a future version of <i>iframe-resizer</>.`),_[e][n]=_[e][t],delete _[e][t])}const It=e=>E(e,"onMouseEnter")||E(e,"onMouseLeave");function At(e,t){const{id:n}=e;_[n]={..._[n],iframe:e,remoteHost:e?.src.split("/").slice(0,3).join("/"),...ge,...Rt(n,t),mouseEvents:It(t),mode:yt(t),syncTitle:et(n)},function(e){Ct(e,"offset","offsetSize"),Ct(e,"onClose","onBeforeClose"),Ct(e,"onClosed","onAfterClose")}(n),function(e){const{direction:t}=_[e];switch(t){case z:break;case j:_[e].sizeHeight=!1;case w:_[e].sizeWidth=!0;break;case v:_[e].sizeWidth=!1,_[e].sizeHeight=!1,_[e].autoResize=!1;break;default:throw new TypeError(`Direction value of "${t}" is not valid`)}ae(e,`direction: %c${t}`,X)}(n),function(e,{offset:t,offsetSize:n}){const o=n||t;o&&(_[e].direction===z?(_[e].offsetHeight=o,ae(e,`Offset height: %c${o}`,X)):(_[e].offsetWidth=o,ae(e,`Offset width: %c${o}`,X)))}(n,t),function(e){_[e].warningTimeout||le(e,"warningTimeout:%c disabled",X)}(n),function(e){const{id:t}=e;null===_[t].postMessageTarget&&(_[t].postMessageTarget=e.contentWindow)}(e),function(e){const{checkOrigin:t,remoteHost:n}=_[e];Array.isArray(t)&&0===t.length&&ce(e,"checkOrigin is an empty array — no messages will be sent to the iframe"),_[e].targetOrigin=Array.isArray(t)?t.map(Et):[!1===t?"*":Et(n)]}(n)}function Wt(e,t,o){At(t,o),ae(e,`src: %c${t.srcdoc||t.src}`,X),function(e){if(mt)return;const{mode:t}=_[e];t>5&&bt(e,t)}(e),function(e){const{id:t}=e;switch(ae(t,`Iframe scrolling ${_[t]?.scrolling?"enabled":"disabled"} for ${t}`),e.style.overflow=!1===_[t]?.scrolling?"hidden":b,_[t]?.scrolling){case"omit":break;case!0:e.scrolling="yes";break;case!1:e.scrolling="no";break;default:e.scrolling=_[t]?.scrolling||"no"}}(t),function(e){const{bodyMargin:t}=_[e];"number"!=typeof t&&"0"!==t||(_[e].bodyMargin=`${t}px`)}(e),Ot(e,function(e){const{autoResize:t,bodyBackground:o,bodyMargin:i,bodyPadding:r,heightCalculationMethod:a,inPageLinks:l,license:s,log:c,logExpand:u,mouseEvents:f,offsetHeight:d,offsetWidth:p,mode:h,sizeHeight:y,sizeWidth:m,tolerance:g,widthCalculationMethod:b}=_[e];return[e,kt,m,c,Mt,xt,t,i,a,o,r,g,l,Tt,b,f,d,p,y,s,Ee.version,h,"",u].join(n)}(e)),$t(e),ae(e,"Setup complete")}function Lt(e,t){const{id:n}=e;fe(n,"setup"),function(e){if(!0===jt[e])return!1;const t=document.querySelectorAll(`iframe#${CSS.escape(e)}`);if(t.length<=1)return!0;jt[e]=!0;const n=Array.from(t).flatMap(e=>[h,e,h]);return me(e,`<rb>Duplicate ID attributes detected</>\n\nThe <b>${e}</> ID is not unique. Having multiple iframes on the same page with the same ID causes problems with communication between the iframe and parent page. Please ensure that the ID of each iframe has a unique value.\n\nFound <bb>${t.length}</> iframes with the <b>${e}</> ID:`,...n,h),!1}(n)&&Wt(n,e,t),pe(n)}function Pt(e,t){0===t.log?t.log=!1:1===t.log?t.log=x:2===t.log&&(t.log=T);const n=E(t,"log"),o=R(t.log),i=n?!!o||t.log:ge.log;E(t,"logExpand")||(t.logExpand=n&&o?t.log===T:ge.logExpand),function(e){-1===e?.log&&(e.log=!1,gt=!0)}(t),function({enabled:e,expand:t,iframeId:n}){const o=K({expand:t,label:oe(n)});te=e,_[n]||(_[n]={console:o})}({enabled:i,expand:t.logExpand,iframeId:e}),o&&!(t.log in S)&&ue(e,`Invalid value for options.log: Accepted values are "${T}" and "${x}"`),t.log=i}function Nt(e){if(!O(e))throw new TypeError("Options is not an object");return zt(),function(e){const{search:t}=window.location;if(t.includes("ifrlog"))switch(new URLSearchParams(t).get("ifrlog")){case String(0):e.log=!1;break;case T:case String(2):e.log=T;break;case x:case String(1):default:e.log=x}}(e),n=>{const o=ve(n,e);return t in n?(fe(o,"alreadySetup"),ce(o,`Ignored iframe (${o}), already setup.`)):(Pt(o,e),he(o,Lt)(n,e)),n?.iframeResizer}}switch(!0){case void 0===window.jQuery:ce("","Unable to bind to jQuery, it is not available.");break;case!window.jQuery.fn:ce("","Unable to bind to jQuery, it is not fully loaded.");break;case window.jQuery.fn.iframeResize:ce("","iframeResize is already assigned to jQuery.fn.");break;default:window.jQuery.fn.iframeResize=function(e){const t=Nt(e);return this.filter("iframe").each((e,n)=>t(n)).end()}}});
|
|
21
21
|
//# sourceMappingURL=index.umd.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@iframe-resizer/jquery",
|
|
3
|
-
"version": "6.0.0-beta.
|
|
3
|
+
"version": "6.0.0-beta.4",
|
|
4
4
|
"license": "GPL-3.0",
|
|
5
5
|
"homepage": "https://iframe-resizer.com",
|
|
6
6
|
"author": {
|
|
@@ -34,6 +34,7 @@
|
|
|
34
34
|
"jquery"
|
|
35
35
|
],
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@iframe-resizer/
|
|
37
|
+
"@iframe-resizer/common": "6.0.0-beta.4",
|
|
38
|
+
"@iframe-resizer/core": "6.0.0-beta.4"
|
|
38
39
|
}
|
|
39
40
|
}
|