@iframe-resizer/child 6.0.0-beta.1 → 6.0.0-beta.3
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 +2 -2
- package/index.cjs.js +14 -27
- package/index.cjs.js.map +1 -1
- package/index.d.ts +94 -0
- package/index.esm.js +805 -846
- package/index.esm.js.map +1 -1
- package/index.umd.js +16 -29
- package/index.umd.js.map +1 -1
- package/package.json +2 -2
- package/iframe-resizer.child.d.ts +0 -168
package/index.esm.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
const
|
|
3
|
-
`, ee = "string",
|
|
4
|
-
[
|
|
5
|
-
[
|
|
6
|
-
},
|
|
1
|
+
import $n, { NORMAL as Z, HIGHLIGHT as a, FOREGROUND as v, BOLD as st, ITALIC as Tn } from "auto-console-group";
|
|
2
|
+
const K = "6.0.0-beta.3", je = "iframeResizer", pe = ":", An = "[iFrameResizerChild]Ready", In = "autoResize", Nn = "beforeUnload", Ln = "close", Cn = "inPageLink", ye = "init", $e = "message", jn = "mouseenter", Pn = "mouseleave", Ct = "pageHide", _n = "pageInfo", jt = "parentInfo", xn = "parentInfoStop", Bn = "scrollBy", Dn = "scrollTo", Pt = "scrollToOffset", Fn = "title", Y = 1, Pe = "data-iframe-size", _t = "data-iframe-overflowed", X = "data-iframe-ignore", ve = "height", xt = "width", rt = "offsetSize", _e = `
|
|
3
|
+
`, ee = "string", _ = "number", Hn = "boolean", Vn = "object", xe = "function", Wn = "undefined", Un = "false", Gn = "null", Q = "auto", Bt = "readystatechange", Dt = "bottom", Ft = "right", Te = "autoResizeEnabled", it = /* @__PURE__ */ Symbol("sizeChanged"), Be = "manualResize", De = "parentResize", Se = {
|
|
4
|
+
[Be]: 1,
|
|
5
|
+
[De]: 1
|
|
6
|
+
}, Ht = "setOffsetSize", Vt = "resizeObserver", Fe = "overflowObserver", Wt = "mutationObserver", Ut = "visibilityObserver", qn = "font-weight: bold;", He = "none", ct = "No change in content size detected", le = "[iFrameSizer]", Gt = le.length, Zn = Q, qt = 128, Zt = /* @__PURE__ */ new Set([
|
|
7
7
|
"head",
|
|
8
8
|
"body",
|
|
9
9
|
"meta",
|
|
@@ -20,38 +20,33 @@ const _ = "6.0.0-beta.1", Ve = "iframeResizer", ve = ":", Ln = "[iFrameResizerCh
|
|
|
20
20
|
"track",
|
|
21
21
|
"wbr",
|
|
22
22
|
"nobr"
|
|
23
|
-
]),
|
|
24
|
-
l,
|
|
25
|
-
`<rb>Deprecated ${t}(${o.replace("()", "")})</>
|
|
26
|
-
|
|
27
|
-
The <b>${o}</> ${t.toLowerCase()} has been ${n} <b>${s}</>. ${u}Use of the old ${t.toLowerCase()} will be removed in a future version of <i>iframe-resizer</>.`
|
|
28
|
-
), to = (e) => typeof e === ee, Ee = (e, ...t) => setTimeout(() => e(...t), 0), Kt = (e) => {
|
|
23
|
+
]), Yn = (e) => typeof e === ee, ze = (e, ...t) => setTimeout(() => e(...t), 0), Yt = (e) => {
|
|
29
24
|
let t = !1;
|
|
30
25
|
return function(...n) {
|
|
31
26
|
return t ? void 0 : (t = !0, e.apply(this, n));
|
|
32
27
|
};
|
|
33
|
-
},
|
|
34
|
-
function
|
|
28
|
+
}, ue = (e) => e, at = 1e3, P = (e) => Math.round(e * at) / at, Qt = (e) => e.charAt(0).toUpperCase() + e.slice(1), N = (e) => `${e}` != "" && e !== void 0, Qn = (e) => e(), Jn = (e) => e.toLowerCase();
|
|
29
|
+
function Kn(e) {
|
|
35
30
|
switch (!0) {
|
|
36
|
-
case !
|
|
31
|
+
case !N(e):
|
|
37
32
|
return "";
|
|
38
|
-
case
|
|
33
|
+
case N(e.id):
|
|
39
34
|
return `${e.nodeName}#${e.id}`;
|
|
40
|
-
case
|
|
35
|
+
case N(e.name):
|
|
41
36
|
return `${e.nodeName} (${e.name}`;
|
|
42
|
-
case
|
|
37
|
+
case N(e.className):
|
|
43
38
|
return `${e.nodeName}.${e.className}`;
|
|
44
39
|
default:
|
|
45
40
|
return e.nodeName;
|
|
46
41
|
}
|
|
47
42
|
}
|
|
48
|
-
const
|
|
43
|
+
const Xn = (e) => (
|
|
49
44
|
// eslint-disable-next-line no-underscore-dangle
|
|
50
45
|
e?.__esModule ? e.default : e
|
|
51
|
-
),
|
|
46
|
+
), k = (e, t, n) => {
|
|
52
47
|
if (typeof e !== t)
|
|
53
|
-
throw new TypeError(`${n} is not a ${
|
|
54
|
-
},
|
|
48
|
+
throw new TypeError(`${n} is not a ${Qt(t)}`);
|
|
49
|
+
}, Jt = {
|
|
55
50
|
br: `
|
|
56
51
|
`,
|
|
57
52
|
rb: "\x1B[31;1m",
|
|
@@ -66,41 +61,41 @@ const ro = (e) => (
|
|
|
66
61
|
// underline
|
|
67
62
|
"/": "\x1B[m"
|
|
68
63
|
// reset
|
|
69
|
-
},
|
|
70
|
-
|
|
64
|
+
}, eo = Object.keys(Jt), to = new RegExp(`<(${eo.join("|")})>`, "gi"), no = (e, t) => Jt[t] ?? "", oo = (e) => e.replace(to, no), so = (e) => e.replaceAll("<br>", _e).replaceAll(/<\/?[^>]+>/gi, ""), ro = (e) => (t) => e(
|
|
65
|
+
Yn(t) ? window.chrome ? oo(t) : so(t) : t
|
|
71
66
|
);
|
|
72
|
-
let
|
|
73
|
-
const
|
|
74
|
-
label: `${
|
|
67
|
+
let Ve = !0, lt = je;
|
|
68
|
+
const io = Xn($n), J = io({
|
|
69
|
+
label: `${je}(child)`,
|
|
75
70
|
expand: !1
|
|
76
71
|
});
|
|
77
|
-
function
|
|
78
|
-
|
|
79
|
-
}
|
|
80
|
-
const
|
|
81
|
-
function
|
|
82
|
-
console.info(
|
|
83
|
-
`${xe} %ciframe-resizer ${e}`,
|
|
84
|
-
Ye || t < 1 ? Kn : Y
|
|
85
|
-
);
|
|
72
|
+
function co(e) {
|
|
73
|
+
lt = e.id || je, J.label(`${lt}`), J.expand(e.expand), Ve = e.enabled;
|
|
74
|
+
}
|
|
75
|
+
const Kt = (e) => (...t) => Ve ? J[e](...t) : !0, l = Kt("log"), u = l, de = Kt("debug");
|
|
76
|
+
function ao(e, t) {
|
|
77
|
+
console.info(`%ciframe-resizer ${e}`, Ve || t < 1 ? qn : Z);
|
|
86
78
|
}
|
|
87
79
|
const {
|
|
88
|
-
assert:
|
|
89
|
-
endAutoGroup:
|
|
90
|
-
error:
|
|
91
|
-
errorBoundary:
|
|
80
|
+
assert: lo,
|
|
81
|
+
endAutoGroup: x,
|
|
82
|
+
error: Xt,
|
|
83
|
+
errorBoundary: We,
|
|
92
84
|
event: h,
|
|
93
|
-
label:
|
|
94
|
-
purge:
|
|
95
|
-
warn:
|
|
96
|
-
} =
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
e
|
|
102
|
-
}
|
|
103
|
-
|
|
85
|
+
label: mi,
|
|
86
|
+
purge: hi,
|
|
87
|
+
warn: H
|
|
88
|
+
} = J, en = ro(ue), w = (...e) => J.warn(...e.map(en)), uo = (...e) => (
|
|
89
|
+
// eslint-disable-next-line no-console
|
|
90
|
+
console.warn(...e.map(en))
|
|
91
|
+
), Ue = [];
|
|
92
|
+
function tn(e, t) {
|
|
93
|
+
l(`${e} event listener: %c${t}`, a);
|
|
94
|
+
}
|
|
95
|
+
const nn = (e, t, n, o) => {
|
|
96
|
+
e.removeEventListener(t, n, o), tn("Removed", t);
|
|
97
|
+
}, C = (e, t, n, o = !1) => {
|
|
98
|
+
e.addEventListener(t, n, o), Ue.push(() => nn(e, t, n, o)), tn("Added", t);
|
|
104
99
|
}, r = {
|
|
105
100
|
applySelectors: null,
|
|
106
101
|
firstRun: !0,
|
|
@@ -124,64 +119,70 @@ const rn = (e, t, n, o) => {
|
|
|
124
119
|
onPageInfo: null,
|
|
125
120
|
onParentInfo: null
|
|
126
121
|
};
|
|
127
|
-
let
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
);
|
|
132
|
-
|
|
133
|
-
|
|
122
|
+
let ut = !1;
|
|
123
|
+
function dt(e) {
|
|
124
|
+
const t = window?.iframeResizer?.targetOrigin || "*", n = Array.isArray(t) ? t : [t];
|
|
125
|
+
for (const o of n)
|
|
126
|
+
e.postMessage(An, o);
|
|
127
|
+
}
|
|
128
|
+
function ft() {
|
|
129
|
+
if (document.readyState === "loading" || !r.firstRun || ut) return;
|
|
134
130
|
const { parent: e, top: t } = window;
|
|
135
|
-
h("ready"),
|
|
131
|
+
h("ready"), l(
|
|
136
132
|
"Sending%c ready%c to parent from",
|
|
137
|
-
|
|
138
|
-
|
|
133
|
+
a,
|
|
134
|
+
v,
|
|
139
135
|
window.location.href
|
|
140
|
-
),
|
|
136
|
+
), dt(e), e !== t && dt(t), ut = !0;
|
|
141
137
|
}
|
|
142
|
-
const
|
|
143
|
-
window.jQuery !== void 0 &&
|
|
144
|
-
function
|
|
145
|
-
const n = e.style
|
|
138
|
+
const mt = "iframeResize", fo = (e) => le === `${e.data}`.slice(0, Gt), mo = () => mt in window || // @ts-ignore
|
|
139
|
+
window.jQuery !== void 0 && mt in window.jQuery.prototype, ho = (e) => e.data.split(pe)[2] in { true: 1, false: 1 }, go = () => [document.documentElement, document.body], po = ["min-height", "min-width", "max-height", "max-width"], ht = /* @__PURE__ */ new Set(), yo = (e) => !!e && e !== "0px" && e !== Q && e !== He, on = (e) => e.tagName ? e.tagName.toLowerCase() : "unknown", sn = (e, t) => window.getComputedStyle(e).getPropertyValue(t), vo = (e, t) => yo(sn(e, t));
|
|
140
|
+
function zo(e, t) {
|
|
141
|
+
const n = e.style.getPropertyValue(t);
|
|
146
142
|
return n ? { source: "an inline style attribute", value: n } : null;
|
|
147
143
|
}
|
|
148
|
-
function
|
|
149
|
-
|
|
144
|
+
function bo({
|
|
145
|
+
href: e
|
|
146
|
+
}) {
|
|
147
|
+
ht.has(e) || (l("Unable to access stylesheet:", e), ht.add(e));
|
|
150
148
|
}
|
|
151
|
-
function
|
|
149
|
+
function wo(e, t) {
|
|
152
150
|
for (const n of document.styleSheets)
|
|
153
151
|
try {
|
|
154
|
-
for (const o of n.cssRules || [])
|
|
155
|
-
if (
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
152
|
+
for (const o of n.cssRules || []) {
|
|
153
|
+
if (!("selectorText" in o)) continue;
|
|
154
|
+
const s = o;
|
|
155
|
+
if (!e.matches(s.selectorText)) continue;
|
|
156
|
+
const d = s.style.getPropertyValue(t);
|
|
157
|
+
if (!d) continue;
|
|
158
|
+
const { ownerNode: c } = n;
|
|
159
|
+
return {
|
|
160
|
+
source: c instanceof Element && c.tagName === "STYLE" ? "an inline <style> block" : `stylesheet (${n.href})`,
|
|
161
|
+
value: d
|
|
162
|
+
};
|
|
163
|
+
}
|
|
163
164
|
} catch {
|
|
164
|
-
|
|
165
|
+
bo(n);
|
|
165
166
|
}
|
|
166
167
|
return {
|
|
167
168
|
source: "cross-origin stylesheet",
|
|
168
|
-
value:
|
|
169
|
+
value: sn(e, t)
|
|
169
170
|
};
|
|
170
171
|
}
|
|
171
|
-
const
|
|
172
|
-
const { source: n, value: o } =
|
|
173
|
-
|
|
172
|
+
const So = (e, t) => zo(e, t) || wo(e, t), Eo = (e, t) => {
|
|
173
|
+
const { source: n, value: o } = So(e, t), s = on(e);
|
|
174
|
+
w(
|
|
174
175
|
`The <b>${t}</> CSS property is set to <b>${o}</> on the <b><${s}></> element via ${n}. This may cause issues with the correct operation of <i>iframe-resizer</>.
|
|
175
176
|
|
|
176
177
|
If 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.`
|
|
177
178
|
);
|
|
178
179
|
};
|
|
179
|
-
function
|
|
180
|
-
for (const e of
|
|
181
|
-
for (const t of
|
|
182
|
-
|
|
180
|
+
function Oo() {
|
|
181
|
+
for (const e of go())
|
|
182
|
+
for (const t of po)
|
|
183
|
+
l(`Checking <${on(e)}> for blocking CSS: ${t}`), vo(e, t) && Eo(e, t);
|
|
183
184
|
}
|
|
184
|
-
const
|
|
185
|
+
const Ro = ({
|
|
185
186
|
calculateWidth: e,
|
|
186
187
|
calculateHeight: t
|
|
187
188
|
}) => e === t, i = {
|
|
@@ -193,7 +194,7 @@ const No = ({
|
|
|
193
194
|
bodyPadding: "",
|
|
194
195
|
calculateHeight: !0,
|
|
195
196
|
calculateWidth: !1,
|
|
196
|
-
heightCalcMode:
|
|
197
|
+
heightCalcMode: Q,
|
|
197
198
|
ignoreSelector: "",
|
|
198
199
|
inPageLinks: !1,
|
|
199
200
|
logging: !1,
|
|
@@ -206,400 +207,397 @@ const No = ({
|
|
|
206
207
|
sizeSelector: "",
|
|
207
208
|
targetOrigin: "*",
|
|
208
209
|
tolerance: 0,
|
|
209
|
-
widthCalcMode:
|
|
210
|
+
widthCalcMode: Q,
|
|
210
211
|
onBeforeResize: void 0,
|
|
211
212
|
onMessage: () => {
|
|
212
|
-
|
|
213
|
+
H("onMessage function not defined");
|
|
213
214
|
},
|
|
214
215
|
onReady: () => {
|
|
215
216
|
}
|
|
216
|
-
}
|
|
217
|
+
};
|
|
218
|
+
function ko() {
|
|
219
|
+
try {
|
|
220
|
+
r.sameOrigin = i.mode === 1 || "iframeParentListener" in window.parent;
|
|
221
|
+
} catch {
|
|
222
|
+
l("Cross domain iframe detected");
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
let gt = 0;
|
|
226
|
+
function Mo(e) {
|
|
227
|
+
const t = e.length === 1 ? "" : "s";
|
|
228
|
+
H(
|
|
229
|
+
`%c[${X}]%c found on %c${e.length}%c element${t}`,
|
|
230
|
+
st,
|
|
231
|
+
Z,
|
|
232
|
+
st,
|
|
233
|
+
Z
|
|
234
|
+
);
|
|
235
|
+
}
|
|
236
|
+
function $o() {
|
|
237
|
+
const e = document.querySelectorAll(`*[${X}]`), t = e.length > 0;
|
|
238
|
+
return t && e.length !== gt && (Mo(e), gt = e.length), t;
|
|
239
|
+
}
|
|
240
|
+
const fe = (e) => {
|
|
241
|
+
if (!e) return "";
|
|
242
|
+
let t = -559038744, n = 1103547984;
|
|
243
|
+
for (let o, s = 0; s < e.length; s++)
|
|
244
|
+
o = e.codePointAt(s), t = Math.imul(t ^ o, 2246822519), n = Math.imul(n ^ o, 3266489917);
|
|
245
|
+
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);
|
|
246
|
+
}, A = (e) => e.replace(
|
|
247
|
+
/[A-Za-z]/g,
|
|
248
|
+
(t) => String.fromCodePoint(
|
|
249
|
+
(t <= "Z" ? 90 : 122) >= (t = t.codePointAt(0) + 19) ? t : t - 26
|
|
250
|
+
)
|
|
251
|
+
), To = /* @__PURE__ */ new Date(), rn = (e) => new Set(Array.from({ length: 9 }, e)), pt = " - lewpylk", F = ["spjluzl", "rlf", "clyzpvu", "rlf2", "nlaMbssFlhy"], Ao = [
|
|
252
|
+
"<yi>Puchspk Spjluzl Rlf</><iy><iy>",
|
|
253
|
+
"<yi>Tpzzpun Spjluzl Rlf</><iy><iy>",
|
|
254
|
+
"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</>",
|
|
255
|
+
"<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</>.",
|
|
256
|
+
"<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.",
|
|
257
|
+
"Pu whnl spurpun ylxbpylz h Wyvmlzzpvuhs vy Ibzpulzz spjluzl. Wslhzl zll <b>oaawz://pmyhtl-ylzpgly.jvt/wypjpun</> mvy tvyl klahpsz.",
|
|
258
|
+
"<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.",
|
|
259
|
+
"<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.",
|
|
260
|
+
"<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.",
|
|
261
|
+
"<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"
|
|
262
|
+
], Io = (e) => [
|
|
263
|
+
e[0],
|
|
264
|
+
...e.slice(1).map((t) => `${t}${pt}`),
|
|
265
|
+
`${e[4]}${pt}`,
|
|
266
|
+
...e.slice(1)
|
|
267
|
+
], No = Io(["NWSc3", "zvsv", "wyv", "ibzpulzz", "VLT"]), yt = Object.fromEntries(
|
|
268
|
+
[
|
|
269
|
+
"2cgs7fdf4xb",
|
|
270
|
+
"1c9ctcccr4z",
|
|
271
|
+
"1q2pc4eebgb",
|
|
272
|
+
"ueokt0969w",
|
|
273
|
+
"w2zxchhgqz",
|
|
274
|
+
"1umuxblj2e5",
|
|
275
|
+
"1foobarqaz",
|
|
276
|
+
"2b5sdlfhbev",
|
|
277
|
+
"zo4ui3arjo",
|
|
278
|
+
"oclbb4thgl",
|
|
279
|
+
"igb1wzrjqr"
|
|
280
|
+
].map((e, t) => [e, Math.max(0, t - 1)])
|
|
281
|
+
), Lo = /* @__PURE__ */ new Set([1, 6]), cn = To[A(F[4])](), Co = rn((e, t) => fe(`${cn + t}`)), jo = rn((e, t) => fe(`${cn - ++t}`)), Po = (e) => Co.has(e) ? 9 : jo.has(e) ? 5 : -2, Ge = (e) => Lo.has(e), T = (e) => A(Ao[e]), _o = (e) => A(No[e]), vt = (e) => A(F[e]), zt = (e) => {
|
|
282
|
+
const t = e[A(F[0])] || e[A(F[1])] || e[A(F[2])] || e[A(F[3])];
|
|
283
|
+
if (!t) return -1;
|
|
284
|
+
const n = t.split("-");
|
|
285
|
+
let o = (function(s = "", d = "") {
|
|
286
|
+
let c = -2;
|
|
287
|
+
const f = fe(A(s));
|
|
288
|
+
return f in yt && (c = yt[f]), c === 9 ? Po(d) : c;
|
|
289
|
+
})(...n);
|
|
290
|
+
return o === 0 || ((s) => s[2] === fe(s[0] + s[1]))(n) || (o = -2), o;
|
|
291
|
+
};
|
|
292
|
+
function xo(e, t, n) {
|
|
293
|
+
(!N(n) || t > -1 && e > t) && (ao(`v${K} (${_o(e)})`, e), e === 0 && uo(T(3)));
|
|
294
|
+
}
|
|
295
|
+
function Bo({
|
|
296
|
+
key: e,
|
|
297
|
+
key2: t,
|
|
298
|
+
mode: n,
|
|
299
|
+
version: o
|
|
300
|
+
}) {
|
|
301
|
+
const s = n, d = N(e) ? zt({ key: e }) : -1, c = N(t) ? zt({ key: t }) : -1;
|
|
302
|
+
let f;
|
|
303
|
+
switch (n = Math.max(d, c), n) {
|
|
304
|
+
case -2:
|
|
305
|
+
case -1:
|
|
306
|
+
f = `${T(Math.min(d, c) + 2)}${T(2)}`, r.firstRun = !1;
|
|
307
|
+
break;
|
|
308
|
+
case 1:
|
|
309
|
+
case 2:
|
|
310
|
+
case 3:
|
|
311
|
+
f = T(6);
|
|
312
|
+
break;
|
|
313
|
+
case 4:
|
|
314
|
+
f = T(7);
|
|
315
|
+
break;
|
|
316
|
+
case 5:
|
|
317
|
+
f = T(8);
|
|
318
|
+
break;
|
|
319
|
+
}
|
|
320
|
+
if (n >= 0 && xo(n, s, o), (!N(o) || !r.firstRun) && (f && w(f), n < 0))
|
|
321
|
+
throw w(T(9)), f.split("<br>")[0].replace(/<\/?[a-z][^>]*>|<\/>/gi, "");
|
|
322
|
+
i.mode = n;
|
|
323
|
+
}
|
|
324
|
+
const Do = "BackCompat", Fo = `<rb>Quirks Mode Detected</>
|
|
325
|
+
|
|
326
|
+
This 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</>.
|
|
327
|
+
|
|
328
|
+
For more information see <u>https://iframe-resizer.com/quirks-mode</>.
|
|
329
|
+
`;
|
|
330
|
+
function Ho() {
|
|
331
|
+
document.compatMode === Do && w(Fo);
|
|
332
|
+
}
|
|
333
|
+
const Vo = "complete";
|
|
334
|
+
let bt = !1;
|
|
335
|
+
function an(e) {
|
|
336
|
+
document.readyState === Vo ? ze(e) : bt || C(
|
|
337
|
+
document,
|
|
338
|
+
Bt,
|
|
339
|
+
() => an(e)
|
|
340
|
+
), bt = !0;
|
|
341
|
+
}
|
|
342
|
+
const Wo = () => {
|
|
343
|
+
u(`Set targetOrigin for parent: %c${i.targetOrigin}`, a), i.autoResize !== !0 && l("Auto Resize disabled");
|
|
344
|
+
};
|
|
345
|
+
function ln() {
|
|
346
|
+
r.taggedElements = document.querySelectorAll(`[${Pe}]`), r.hasTags = r.taggedElements.length > 0, l(`Tagged elements found: %c${r.hasTags}`, a);
|
|
347
|
+
}
|
|
348
|
+
const Uo = `<rb>Legacy version detected on parent page</>
|
|
349
|
+
|
|
350
|
+
Detected legacy version of parent page script. It is recommended to update the parent page to use <b>@iframe-resizer/parent</>.
|
|
351
|
+
|
|
352
|
+
See <u>https://iframe-resizer.com/setup/</> for more details.
|
|
353
|
+
`, Go = (e) => `<b>Version mismatch</>
|
|
354
|
+
|
|
355
|
+
The parent and child pages are running different versions of <i>iframe resizer</>.
|
|
356
|
+
|
|
357
|
+
Parent page: ${e} - Child page: ${K}.
|
|
358
|
+
`;
|
|
359
|
+
function qo({ version: e }) {
|
|
360
|
+
!e || e === "" || e === Un ? w(Uo) : e !== K && w(Go(e));
|
|
361
|
+
}
|
|
362
|
+
const Zo = Yt(() => w(T(4)));
|
|
363
|
+
function Yo(e) {
|
|
364
|
+
if (!r.timerActive) return;
|
|
365
|
+
const t = P(performance.now() - r.totalTime), n = e === ye ? `Initialised iframe in %c${t}ms` : `Size calculated in %c${t}ms`;
|
|
366
|
+
l(n, a);
|
|
367
|
+
}
|
|
368
|
+
function Qo(e) {
|
|
369
|
+
return e === void 0 ? e = i.targetOrigin : l(`Message targetOrigin: %c${e}`, a), e;
|
|
370
|
+
}
|
|
371
|
+
function Jo(e, t) {
|
|
372
|
+
const { mode: n } = i, { sameOrigin: o, target: s } = r;
|
|
373
|
+
if (o)
|
|
374
|
+
try {
|
|
375
|
+
window.parent.iframeParentListener(le + e);
|
|
376
|
+
} catch (d) {
|
|
377
|
+
if (Ge(n)) Zo();
|
|
378
|
+
else throw new Error(d);
|
|
379
|
+
return !1;
|
|
380
|
+
}
|
|
381
|
+
else {
|
|
382
|
+
lo(s, "Internal error: postMessage target is undefined");
|
|
383
|
+
const d = Qo(t), c = Array.isArray(d) ? d : [d];
|
|
384
|
+
for (const f of c)
|
|
385
|
+
s.postMessage(le + e, f);
|
|
386
|
+
}
|
|
387
|
+
return !0;
|
|
388
|
+
}
|
|
389
|
+
function un(e, t, n, o, s) {
|
|
390
|
+
const { parentId: d } = i, { sameOrigin: c } = r, f = `${e}:${t}`, y = `${d}:${f}:${n}${o === void 0 ? "" : `:${o}`}`;
|
|
391
|
+
i.mode < -1 || !Jo(y, s) || (Yo(n), u(
|
|
392
|
+
`Sending message to parent page via ${c ? "sameOrigin" : "postMessage"}: %c%c${y}`,
|
|
393
|
+
Tn,
|
|
394
|
+
a
|
|
395
|
+
));
|
|
396
|
+
}
|
|
397
|
+
const z = We(
|
|
398
|
+
(e, t, n, o, s) => {
|
|
399
|
+
h(n), un(e, t, n, o, s), x();
|
|
400
|
+
}
|
|
401
|
+
), Ko = (e) => z(0, 0, e.type, `${e.screenY}:${e.screenX}`);
|
|
402
|
+
function wt(e, t) {
|
|
403
|
+
l(`Add event listener: %c${t}`, a), C(window.document, e, Ko);
|
|
404
|
+
}
|
|
405
|
+
function Xo({
|
|
406
|
+
mouseEvents: e
|
|
407
|
+
}) {
|
|
408
|
+
e === !0 && (wt(jn, "Mouse Enter"), wt(Pn, "Mouse Leave"));
|
|
409
|
+
}
|
|
410
|
+
const es = () => z(0, 0, Nn);
|
|
411
|
+
function ts({ persisted: e }) {
|
|
412
|
+
e || es(), h(Ct), u("Page persisted:", e), !e && Ue.forEach(Qn);
|
|
413
|
+
}
|
|
414
|
+
const ns = () => C(window, Jn(Ct), ts), St = (e, t) => !(Math.abs(e - t) <= i.tolerance);
|
|
415
|
+
function os(e, t) {
|
|
416
|
+
const { calculateHeight: n, calculateWidth: o } = i, { height: s, width: d } = r;
|
|
417
|
+
return n && St(s, e) || o && St(d, t);
|
|
418
|
+
}
|
|
419
|
+
const I = [a, v, a], ce = {
|
|
217
420
|
height: 0,
|
|
218
421
|
width: 0
|
|
219
|
-
},
|
|
422
|
+
}, D = {
|
|
220
423
|
height: 0,
|
|
221
424
|
width: 0
|
|
222
425
|
};
|
|
223
426
|
function B(e, t, n) {
|
|
224
|
-
return
|
|
427
|
+
return D[e] = t, ce[e] = n, t;
|
|
225
428
|
}
|
|
226
|
-
function
|
|
429
|
+
function ss(e) {
|
|
227
430
|
const t = e.getOffset();
|
|
228
|
-
return t !== 0 &&
|
|
431
|
+
return t !== 0 && u(`Page offsetSize: %c${t}px`, a), t;
|
|
229
432
|
}
|
|
230
|
-
const
|
|
231
|
-
function
|
|
232
|
-
const { hasOverflow: t, hasTags: n, triggerLocked: o } = r, s = e.label,
|
|
433
|
+
const rs = (e) => e.documentElementScroll() + Math.max(0, e.getOffset());
|
|
434
|
+
function dn(e) {
|
|
435
|
+
const { hasOverflow: t, hasTags: n, triggerLocked: o } = r, s = e.label, d = s === ve, c = e.boundingClientRect(), f = Math.ceil(c), y = Math.floor(c), m = rs(e), b = `HTML: %c${c}px %cPage: %c${m}px`;
|
|
233
436
|
let g;
|
|
234
437
|
switch (!0) {
|
|
235
438
|
case !e.enabled():
|
|
236
|
-
return Math.max(
|
|
439
|
+
return Math.max(m, Y);
|
|
237
440
|
case n:
|
|
238
|
-
|
|
441
|
+
u("Found element with data-iframe-size attribute"), g = e.taggedElement();
|
|
239
442
|
break;
|
|
240
|
-
case (!t && r.firstRun &&
|
|
241
|
-
|
|
443
|
+
case (!t && r.firstRun && D[s] === 0 && ce[s] === 0):
|
|
444
|
+
u(`Initial page size values: ${b}`, ...I), g = B(
|
|
242
445
|
s,
|
|
243
|
-
|
|
244
|
-
|
|
446
|
+
c,
|
|
447
|
+
m
|
|
245
448
|
);
|
|
246
449
|
break;
|
|
247
|
-
case (o &&
|
|
248
|
-
|
|
450
|
+
case (o && c === D[s] && m === ce[s]):
|
|
451
|
+
u(`Size unchanged: ${b}`, ...I), g = Math.max(c, m);
|
|
249
452
|
break;
|
|
250
|
-
case (
|
|
251
|
-
|
|
453
|
+
case (c === 0 && m !== 0):
|
|
454
|
+
u(`Page is hidden: ${b}`, ...I), g = m;
|
|
252
455
|
break;
|
|
253
|
-
case (!t &&
|
|
254
|
-
|
|
255
|
-
`Previous <html> size: %c${
|
|
256
|
-
|
|
456
|
+
case (!t && c !== D[s] && m <= ce[s]):
|
|
457
|
+
u(`New <html> size: ${b} `, ...I), u(
|
|
458
|
+
`Previous <html> size: %c${D[s]}px`,
|
|
459
|
+
a
|
|
257
460
|
), g = B(
|
|
258
461
|
s,
|
|
259
|
-
|
|
260
|
-
|
|
462
|
+
c,
|
|
463
|
+
m
|
|
261
464
|
);
|
|
262
465
|
break;
|
|
263
|
-
case !
|
|
466
|
+
case !d:
|
|
264
467
|
g = e.taggedElement();
|
|
265
468
|
break;
|
|
266
|
-
case (!t &&
|
|
267
|
-
|
|
469
|
+
case (!t && c < D[s]):
|
|
470
|
+
u(`<html> size decreased: ${b}`, ...I), g = B(
|
|
268
471
|
s,
|
|
269
|
-
|
|
270
|
-
|
|
472
|
+
c,
|
|
473
|
+
m
|
|
271
474
|
);
|
|
272
475
|
break;
|
|
273
|
-
case (
|
|
274
|
-
|
|
476
|
+
case (m === y || m === f):
|
|
477
|
+
u(`<html> size equals page size: ${b}`, ...I), g = B(
|
|
275
478
|
s,
|
|
276
|
-
|
|
277
|
-
|
|
479
|
+
c,
|
|
480
|
+
m
|
|
278
481
|
);
|
|
279
482
|
break;
|
|
280
|
-
case
|
|
281
|
-
|
|
483
|
+
case c > m:
|
|
484
|
+
u(`Page size < <html> size: ${b}`, ...I), g = B(
|
|
282
485
|
s,
|
|
283
|
-
|
|
284
|
-
|
|
486
|
+
c,
|
|
487
|
+
m
|
|
285
488
|
);
|
|
286
489
|
break;
|
|
287
490
|
case t:
|
|
288
|
-
|
|
491
|
+
u("Found elements possibly overflowing <html> "), g = e.taggedElement();
|
|
289
492
|
break;
|
|
290
493
|
default:
|
|
291
|
-
|
|
494
|
+
u(`Using <html> size: ${b}`, ...I), g = B(
|
|
292
495
|
s,
|
|
293
|
-
|
|
294
|
-
|
|
496
|
+
c,
|
|
497
|
+
m
|
|
295
498
|
);
|
|
296
499
|
}
|
|
297
|
-
return
|
|
500
|
+
return u(`Content ${s}: %c${g}px`, a), g += ss(e), Math.max(g, Y);
|
|
298
501
|
}
|
|
299
|
-
const
|
|
300
|
-
let
|
|
301
|
-
function
|
|
502
|
+
const is = 1e3, cs = 5 * is, as = 4, ls = 10, us = 100, qe = "--ifr-start", me = "--ifr-end", fn = "--ifr-measure", p = [];
|
|
503
|
+
let ae = {}, Et = 0, Ae;
|
|
504
|
+
function mn() {
|
|
302
505
|
try {
|
|
303
|
-
performance.clearMarks(
|
|
506
|
+
performance.clearMarks(qe), performance.clearMarks(me), performance.clearMeasures(fn);
|
|
304
507
|
} catch {
|
|
305
508
|
}
|
|
306
509
|
}
|
|
307
|
-
function
|
|
308
|
-
|
|
309
|
-
if (
|
|
310
|
-
|
|
510
|
+
function ds() {
|
|
511
|
+
Ae = setInterval(() => {
|
|
512
|
+
if (p.length < ls || ae.hasTags && ae.len < 25) return;
|
|
513
|
+
p.sort();
|
|
311
514
|
const e = Math.min(
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
), t =
|
|
315
|
-
t >
|
|
515
|
+
p.reduce((n, o) => n + o, 0) / p.length,
|
|
516
|
+
p[Math.floor(p.length / 2)]
|
|
517
|
+
), t = P(e);
|
|
518
|
+
t > Et && (Et = t, h("performanceObserver"), l("Mean time:", P(p[Math.floor(p.length / 2)])), l(
|
|
316
519
|
"Median time:",
|
|
317
|
-
|
|
318
|
-
),
|
|
520
|
+
P(p.reduce((n, o) => n + o, 0) / p.length)
|
|
521
|
+
), l("Average time:", t), l("Max time:", P(Math.max(...p)))), mn(), !(e <= as) && (clearInterval(Ae), w(
|
|
319
522
|
`<rb>Performance Warning</>
|
|
320
523
|
|
|
321
|
-
Calculating the page size is taking an excessive amount of time (${
|
|
524
|
+
Calculating the page size is taking an excessive amount of time (${P(e)}ms).
|
|
322
525
|
|
|
323
|
-
To improve performance add the <b>data-iframe-size</> attribute to the ${
|
|
526
|
+
To improve performance add the <b>data-iframe-size</> attribute to the ${ae.Side.toLowerCase()} most element on the page. For more details see: <u>https://iframe-resizer.com/perf</>.`
|
|
324
527
|
));
|
|
325
|
-
},
|
|
528
|
+
}, cs);
|
|
326
529
|
}
|
|
327
|
-
function
|
|
530
|
+
function fs(e) {
|
|
328
531
|
e.getEntries().forEach((t) => {
|
|
329
|
-
if (t.name ===
|
|
532
|
+
if (t.name === me)
|
|
330
533
|
try {
|
|
331
534
|
const { duration: n } = performance.measure(
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
535
|
+
fn,
|
|
536
|
+
qe,
|
|
537
|
+
me
|
|
335
538
|
);
|
|
336
|
-
|
|
539
|
+
ae = t.detail, p.push(n), p.length > us && p.shift();
|
|
337
540
|
} catch {
|
|
338
541
|
}
|
|
339
542
|
});
|
|
340
543
|
}
|
|
341
|
-
function
|
|
342
|
-
|
|
343
|
-
const e = new PerformanceObserver(
|
|
344
|
-
return e.observe({ entryTypes: ["mark"] }),
|
|
544
|
+
function ms() {
|
|
545
|
+
u("Attached%c PerformanceObserver%c to page", a, v);
|
|
546
|
+
const e = new PerformanceObserver(fs);
|
|
547
|
+
return e.observe({ entryTypes: ["mark"] }), ds(), {
|
|
345
548
|
disconnect: () => {
|
|
346
|
-
|
|
549
|
+
mn(), clearInterval(Ae), e.disconnect(), u("Detached%c PerformanceObserver", a);
|
|
347
550
|
}
|
|
348
551
|
};
|
|
349
552
|
}
|
|
350
|
-
const
|
|
351
|
-
function
|
|
553
|
+
const hs = (e) => `:not(${e})`, gs = `* ${Array.from(Zt).map(hs).join("")}`, Ze = (e) => e.querySelectorAll(gs);
|
|
554
|
+
function ps() {
|
|
352
555
|
const { hasOverflow: e, hasTags: t, overflowedNodeSet: n, taggedElements: o } = r;
|
|
353
|
-
return t ? o : e ? Array.from(n) :
|
|
556
|
+
return t ? o : e ? Array.from(n) : Ze(document.documentElement);
|
|
354
557
|
}
|
|
355
|
-
function
|
|
558
|
+
function ys(e, t) {
|
|
356
559
|
const n = `margin-${t}`;
|
|
357
|
-
let o, s = document.documentElement,
|
|
358
|
-
for (const
|
|
359
|
-
o =
|
|
360
|
-
return { maxEl: s, maxVal:
|
|
361
|
-
}
|
|
362
|
-
function
|
|
363
|
-
performance.mark(
|
|
364
|
-
const t =
|
|
365
|
-
return
|
|
560
|
+
let o, s = document.documentElement, d = r.hasTags ? Y : document.documentElement.getBoundingClientRect().bottom;
|
|
561
|
+
for (const c of e)
|
|
562
|
+
o = c.getBoundingClientRect()[t] + parseFloat(getComputedStyle(c).getPropertyValue(n)), o > d && (d = o, s = c);
|
|
563
|
+
return { maxEl: s, maxVal: d };
|
|
564
|
+
}
|
|
565
|
+
function hn(e) {
|
|
566
|
+
performance.mark(qe);
|
|
567
|
+
const t = Qt(e), { logging: n } = i, { hasTags: o } = r, s = ps(), { maxEl: d, maxVal: c } = ys(s, e);
|
|
568
|
+
return u(`${t} position calculated from:`, d), u(`Checked %c${s.length}%c elements`, a, v), performance.mark(me, {
|
|
366
569
|
detail: {
|
|
367
570
|
hasTags: o,
|
|
368
571
|
len: s.length,
|
|
369
572
|
logging: n,
|
|
370
573
|
Side: t
|
|
371
574
|
}
|
|
372
|
-
}),
|
|
575
|
+
}), c;
|
|
373
576
|
}
|
|
374
|
-
const
|
|
375
|
-
label:
|
|
577
|
+
const Ye = {
|
|
578
|
+
label: ve,
|
|
376
579
|
enabled: () => i.calculateHeight,
|
|
377
580
|
getOffset: () => i.offsetHeight,
|
|
378
|
-
auto: () =>
|
|
581
|
+
auto: () => dn(Ye),
|
|
379
582
|
boundingClientRect: () => Math.max(
|
|
380
583
|
document.documentElement.getBoundingClientRect().bottom,
|
|
381
584
|
document.body.getBoundingClientRect().bottom
|
|
382
585
|
),
|
|
383
586
|
documentElementScroll: () => document.documentElement.scrollHeight,
|
|
384
|
-
taggedElement: () =>
|
|
385
|
-
},
|
|
386
|
-
label:
|
|
587
|
+
taggedElement: () => hn(Dt)
|
|
588
|
+
}, Qe = {
|
|
589
|
+
label: xt,
|
|
387
590
|
enabled: () => i.calculateWidth,
|
|
388
591
|
getOffset: () => i.offsetWidth,
|
|
389
|
-
auto: () =>
|
|
592
|
+
auto: () => dn(Qe),
|
|
390
593
|
boundingClientRect: () => Math.max(
|
|
391
594
|
document.documentElement.getBoundingClientRect().right,
|
|
392
595
|
document.body.getBoundingClientRect().right
|
|
393
596
|
),
|
|
394
597
|
documentElementScroll: () => document.documentElement.scrollWidth,
|
|
395
|
-
taggedElement: () =>
|
|
396
|
-
};
|
|
397
|
-
function mn(e, t) {
|
|
398
|
-
const { label: n } = t;
|
|
399
|
-
return e && e !== k && p(
|
|
400
|
-
`<rb>Ignored ${n}CalculationMethod (${e})</>
|
|
401
|
-
|
|
402
|
-
This version of <i>iframe-resizer</> auto detects the most suitable ${n} calculation method. The <b>${n}CalculationMethod</> option is no longer supported and has been ignored.
|
|
403
|
-
|
|
404
|
-
To remove this warning, delete the <b>${n}CalculationMethod</> option from your parent page config and/or the <i>window.iframeResizer</> config on the child page.
|
|
405
|
-
`
|
|
406
|
-
), a(`Set ${n} calculation method: %c${k}`, c), k;
|
|
407
|
-
}
|
|
408
|
-
function qo() {
|
|
409
|
-
i.heightCalcMode = mn(i.heightCalcMode, Oe);
|
|
410
|
-
}
|
|
411
|
-
function Zo() {
|
|
412
|
-
i.widthCalcMode = mn(i.widthCalcMode, $e);
|
|
413
|
-
}
|
|
414
|
-
function Qo() {
|
|
415
|
-
try {
|
|
416
|
-
r.sameOrigin = i.mode === 1 || "iframeParentListener" in window.parent;
|
|
417
|
-
} catch {
|
|
418
|
-
a("Cross domain iframe detected");
|
|
419
|
-
}
|
|
420
|
-
}
|
|
421
|
-
const Yo = `<rb>Deprecated Attributes</>
|
|
422
|
-
|
|
423
|
-
The <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</>.`;
|
|
424
|
-
function Jo() {
|
|
425
|
-
let e = !1;
|
|
426
|
-
const t = (n) => document.querySelectorAll(`[${n}]`).forEach((o) => {
|
|
427
|
-
o.toggleAttribute(ze, !0), o.removeAttribute(n), e = !0;
|
|
428
|
-
});
|
|
429
|
-
t("data-iframe-height"), t("data-iframe-width"), e && p(Yo);
|
|
430
|
-
}
|
|
431
|
-
let zt = 0;
|
|
432
|
-
function Ko(e) {
|
|
433
|
-
const t = e.length === 1 ? "" : "s";
|
|
434
|
-
x(
|
|
435
|
-
`%c[${X}]%c found on %c${e.length}%c element${t}`,
|
|
436
|
-
dt,
|
|
437
|
-
Y,
|
|
438
|
-
dt,
|
|
439
|
-
Y
|
|
440
|
-
);
|
|
441
|
-
}
|
|
442
|
-
function Xo() {
|
|
443
|
-
const e = document.querySelectorAll(`*[${X}]`), t = e.length > 0;
|
|
444
|
-
return t && e.length !== zt && (Ko(e), zt = e.length), t;
|
|
445
|
-
}
|
|
446
|
-
const ge = (e) => {
|
|
447
|
-
if (!e) return "";
|
|
448
|
-
let t = -559038744, n = 1103547984;
|
|
449
|
-
for (let o, s = 0; s < e.length; s++)
|
|
450
|
-
o = e.codePointAt(s), t = Math.imul(t ^ o, 2246822519), n = Math.imul(n ^ o, 3266489917);
|
|
451
|
-
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);
|
|
452
|
-
}, T = (e) => e.replace(
|
|
453
|
-
/[A-Za-z]/g,
|
|
454
|
-
(t) => String.fromCodePoint(
|
|
455
|
-
(t <= "Z" ? 90 : 122) >= (t = t.codePointAt(0) + 19) ? t : t - 26
|
|
456
|
-
)
|
|
457
|
-
), es = /* @__PURE__ */ new Date(), hn = (e) => new Set(Array.from({ length: 9 }, e)), ts = (e) => [
|
|
458
|
-
e[0],
|
|
459
|
-
...e.slice(1).map((t) => `${t} - lewpylk`),
|
|
460
|
-
`${e[4]} - lewpylk`,
|
|
461
|
-
...e.slice(1)
|
|
462
|
-
], W = ["spjluzl", "rlf", "clyzpvu", "rlf2", "nlaMbssFlhy"], ns = [
|
|
463
|
-
"<yi>Puchspk Spjluzl Rlf</><iy><iy>",
|
|
464
|
-
"<yi>Tpzzpun Spjluzl Rlf</><iy><iy>",
|
|
465
|
-
"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</>",
|
|
466
|
-
"<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</>.",
|
|
467
|
-
"<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.",
|
|
468
|
-
"Pu whnl spurpun ylxbpylz h Wyvmlzzpvuhs vy Ibzpulzz spjluzl. Wslhzl zll <b>oaawz://pmyhtl-ylzpgly.jvt/wypjpun</> mvy tvyl klahpsz.",
|
|
469
|
-
"<yi>Clyzpvu 5 rlf klaljalk</><iy><iy>Av bwnyhkl av <i>Clyzpvu 6</> vm <p>pmyhtl-ylzpgly</> fvb jhu bzl aol mpyza 11 johyhjalyz vm fvb spjlujl rlf av nla h 60% kpzjvbua ha <ii>oaaw://pmyhtl-ylzpgly.jvt</>.",
|
|
470
|
-
// Upgrade
|
|
471
|
-
"<yi>Clyzpvu 5 rlf klaljalk</><iy><iy>Av bwnyhkl av clyzpvu 6 vm<p>pmyhtl-ylzpgly</> wslhzl kvdusvhk aol shalza rlf myvt sltvu-zxbllgf.jvt.",
|
|
472
|
-
// Upgrade OEM
|
|
473
|
-
"<yi>VLT rlf lewpylk</><iy><iy>Wslhzl kvdusvhk aol shalza rlf myvt sltvu-zxbllgf.jvt."
|
|
474
|
-
// key expired
|
|
475
|
-
], os = ts(["NWSc3", "zvsv", "wyv", "ibzpulzz", "VLT"]), wt = Object.fromEntries(
|
|
476
|
-
[
|
|
477
|
-
"2cgs7fdf4xb",
|
|
478
|
-
"1c9ctcccr4z",
|
|
479
|
-
"1q2pc4eebgb",
|
|
480
|
-
"ueokt0969w",
|
|
481
|
-
"w2zxchhgqz",
|
|
482
|
-
"1umuxblj2e5",
|
|
483
|
-
"1foobarqaz",
|
|
484
|
-
"2b5sdlfhbev",
|
|
485
|
-
"zo4ui3arjo",
|
|
486
|
-
"oclbb4thgl",
|
|
487
|
-
"igb1wzrjqr"
|
|
488
|
-
].map((e, t) => [e, Math.max(0, t - 1)])
|
|
489
|
-
), ss = /* @__PURE__ */ new Set([1, 6]), gn = es[T(W[4])](), rs = hn((e, t) => ge(`${gn + t}`)), is = hn((e, t) => ge(`${gn - ++t}`)), cs = (e) => rs.has(e) ? 9 : is.has(e) ? 5 : -2, nt = (e) => ss.has(e), V = (e) => T(ns[e]), as = (e) => T(os[e]), St = (e) => T(W[e]), Et = (e) => {
|
|
490
|
-
const t = e[T(W[0])] || e[T(W[1])] || e[T(W[2])] || e[T(W[3])];
|
|
491
|
-
if (!t) return -1;
|
|
492
|
-
const n = t.split("-");
|
|
493
|
-
let o = (function(s = "", u = "") {
|
|
494
|
-
let l = -2;
|
|
495
|
-
const m = ge(T(s));
|
|
496
|
-
return m in wt && (l = wt[m]), l === 9 ? cs(u) : l;
|
|
497
|
-
})(...n);
|
|
498
|
-
return o === 0 || ((s) => s[2] === ge(s[0] + s[1]))(n) || (o = -2), o;
|
|
499
|
-
};
|
|
500
|
-
function ls({
|
|
501
|
-
key: e,
|
|
502
|
-
key2: t,
|
|
503
|
-
mode: n,
|
|
504
|
-
version: o
|
|
505
|
-
}) {
|
|
506
|
-
const s = n, u = Et({ key: e }), l = Et({ key2: t });
|
|
507
|
-
if (i.mode = n = Math.max(u, l), n < 0) {
|
|
508
|
-
if (n = Math.min(u, l), p(`${V(n + 2)}${V(2)}`), H(o))
|
|
509
|
-
throw r.firstRun = !1, V(n + 2).replace(/<\/?[a-z][^>]*>|<\/>/gi, "");
|
|
510
|
-
} else (!H(o) || s > -1 && n > s) && (sessionStorage.getItem("ifr") !== _ && go(`v${_} (${as(n)})`, n), n < 2 && p(V(3)), sessionStorage.setItem("ifr", _));
|
|
511
|
-
}
|
|
512
|
-
const ds = "BackCompat", us = `<rb>Quirks Mode Detected</>
|
|
513
|
-
|
|
514
|
-
This 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</>.
|
|
515
|
-
|
|
516
|
-
For more information see <u>https://iframe-resizer.com/quirks-mode</>.
|
|
517
|
-
`;
|
|
518
|
-
function fs() {
|
|
519
|
-
document.compatMode === ds && p(us);
|
|
520
|
-
}
|
|
521
|
-
const ms = "complete";
|
|
522
|
-
let Ot = !1;
|
|
523
|
-
function pn(e) {
|
|
524
|
-
document.readyState === ms ? Ee(e) : Ot || P(
|
|
525
|
-
document,
|
|
526
|
-
Ht,
|
|
527
|
-
() => pn(e)
|
|
528
|
-
), Ot = !0;
|
|
529
|
-
}
|
|
530
|
-
const hs = () => {
|
|
531
|
-
d(`Set targetOrigin for parent: %c${i.targetOrigin}`, c), i.autoResize !== !0 && a("Auto Resize disabled");
|
|
598
|
+
taggedElement: () => hn(Ft)
|
|
532
599
|
};
|
|
533
|
-
function
|
|
534
|
-
r.taggedElements = document.querySelectorAll(`[${ze}]`), r.hasTags = r.taggedElements.length > 0, a(`Tagged elements found: %c${r.hasTags}`, c);
|
|
535
|
-
}
|
|
536
|
-
const gs = `<rb>Legacy version detected on parent page</>
|
|
537
|
-
|
|
538
|
-
Detected legacy version of parent page script. It is recommended to update the parent page to use <b>@iframe-resizer/parent</>.
|
|
539
|
-
|
|
540
|
-
See <u>https://iframe-resizer.com/setup/</> for more details.
|
|
541
|
-
`, ps = (e) => `<b>Version mismatch</>
|
|
542
|
-
|
|
543
|
-
The parent and child pages are running different versions of <i>iframe resizer</>.
|
|
544
|
-
|
|
545
|
-
Parent page: ${e} - Child page: ${_}.
|
|
546
|
-
`;
|
|
547
|
-
function ys({ version: e }) {
|
|
548
|
-
!e || e === "" || e === Yn ? p(gs) : e !== _ && p(ps(e));
|
|
549
|
-
}
|
|
550
|
-
const vs = Kt(() => p(V(4)));
|
|
551
|
-
function bs(e) {
|
|
552
|
-
if (!r.timerActive) return;
|
|
553
|
-
const t = j(performance.now() - r.totalTime), n = e === be ? `Initialised iframe in %c${t}ms` : `Size calculated in %c${t}ms`;
|
|
554
|
-
a(n, c);
|
|
555
|
-
}
|
|
556
|
-
function zs(e) {
|
|
557
|
-
return e === void 0 ? e = i.targetOrigin : a(`Message targetOrigin: %c${e}`, c), e;
|
|
558
|
-
}
|
|
559
|
-
function ws(e, t) {
|
|
560
|
-
const { mode: n } = i, { sameOrigin: o, target: s } = r;
|
|
561
|
-
if (o)
|
|
562
|
-
try {
|
|
563
|
-
window.parent.iframeParentListener(ue + e);
|
|
564
|
-
} catch (u) {
|
|
565
|
-
if (nt(n)) vs();
|
|
566
|
-
else throw u;
|
|
567
|
-
return !1;
|
|
568
|
-
}
|
|
569
|
-
else s.postMessage(ue + e, zs(t));
|
|
570
|
-
return !0;
|
|
571
|
-
}
|
|
572
|
-
function vn(e, t, n, o, s) {
|
|
573
|
-
const { parentId: u } = i, { sameOrigin: l } = r, m = `${e}:${t}`, b = `${u}:${m}:${n}${o === void 0 ? "" : `:${o}`}`;
|
|
574
|
-
i.mode < -1 || !ws(b, s) || (bs(n), d(
|
|
575
|
-
`Sending message to parent page via ${l ? "sameOrigin" : "postMessage"}: %c%c${b}`,
|
|
576
|
-
Pn,
|
|
577
|
-
c
|
|
578
|
-
));
|
|
579
|
-
}
|
|
580
|
-
const y = Je(
|
|
581
|
-
(e, t, n, o, s) => {
|
|
582
|
-
h(n), vn(e, t, n, o, s), D();
|
|
583
|
-
}
|
|
584
|
-
), Ss = (e) => y(0, 0, e.type, `${e.screenY}:${e.screenX}`);
|
|
585
|
-
function $t(e, t) {
|
|
586
|
-
a(`Add event listener: %c${t}`, c), P(window.document, e, Ss);
|
|
587
|
-
}
|
|
588
|
-
function Es({
|
|
589
|
-
mouseEvents: e
|
|
590
|
-
}) {
|
|
591
|
-
e === !0 && ($t(Bn, "Mouse Enter"), $t(Fn, "Mouse Leave"));
|
|
592
|
-
}
|
|
593
|
-
const Os = () => y(0, 0, _n);
|
|
594
|
-
function $s({ persisted: e }) {
|
|
595
|
-
e || Os(), h(jt), d("Page persisted:", e), !e && Xe.forEach(no);
|
|
596
|
-
}
|
|
597
|
-
const Ms = () => P(window, oo(jt), $s), Mt = (e, t) => !(Math.abs(e - t) <= i.tolerance);
|
|
598
|
-
function Rs(e, t) {
|
|
599
|
-
const { calculateHeight: n, calculateWidth: o } = i, { height: s, width: u } = r;
|
|
600
|
-
return n && Mt(s, e) || o && Mt(u, t);
|
|
601
|
-
}
|
|
602
|
-
function Is(e, t, n) {
|
|
600
|
+
function vs(e, t, n) {
|
|
603
601
|
const o = i.onBeforeResize(e, t, n);
|
|
604
602
|
if (o === void 0)
|
|
605
603
|
throw new TypeError(
|
|
@@ -609,816 +607,777 @@ function Is(e, t, n) {
|
|
|
609
607
|
throw new TypeError(
|
|
610
608
|
`Invalid value returned from onBeforeResize(): ${o}, expected Number`
|
|
611
609
|
);
|
|
612
|
-
if (o <
|
|
610
|
+
if (o < Y)
|
|
613
611
|
throw new RangeError(
|
|
614
|
-
`Out of range value returned from onBeforeResize(): ${o}, must be at least ${
|
|
612
|
+
`Out of range value returned from onBeforeResize(): ${o}, must be at least ${Y}`
|
|
615
613
|
);
|
|
616
614
|
return o;
|
|
617
615
|
}
|
|
618
|
-
const
|
|
616
|
+
const gn = (e, t) => (n, o) => {
|
|
619
617
|
const s = e[n]();
|
|
620
|
-
return e.enabled() && i.onBeforeResize !== void 0 ?
|
|
621
|
-
},
|
|
622
|
-
function
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
618
|
+
return e.enabled() && i.onBeforeResize !== void 0 ? vs(s, o, t) : s;
|
|
619
|
+
}, zs = gn(Ye, ve), bs = gn(Qe, xt);
|
|
620
|
+
function ws() {
|
|
621
|
+
(window.scrollY !== 0 || window.scrollX !== 0) && (u("Reset iframe scroll position to (0, 0)"), window.scrollTo(0, 0));
|
|
622
|
+
}
|
|
623
|
+
function Ss(e, t, n, o) {
|
|
624
|
+
const { heightCalcMode: s, widthCalcMode: d } = i;
|
|
625
|
+
ws();
|
|
626
|
+
const c = n ?? zs(s, e), f = o ?? bs(d, e), y = os(c, f) ? it : e;
|
|
627
|
+
switch (l(`Resize event: %c${t}`, a), y) {
|
|
628
|
+
case ye:
|
|
629
|
+
case Te:
|
|
630
|
+
case it:
|
|
631
|
+
case Be:
|
|
632
|
+
case De:
|
|
633
|
+
r.height = c, r.width = f;
|
|
631
634
|
// eslint-disable-next-line no-fallthrough
|
|
632
|
-
case
|
|
635
|
+
case Ht:
|
|
633
636
|
return r;
|
|
634
637
|
// the following case needs {} to prevent a compile error on Next.js
|
|
635
|
-
case
|
|
636
|
-
case
|
|
637
|
-
case
|
|
638
|
-
case
|
|
639
|
-
|
|
638
|
+
case Fe:
|
|
639
|
+
case Wt:
|
|
640
|
+
case Vt:
|
|
641
|
+
case Ut: {
|
|
642
|
+
l(ct);
|
|
640
643
|
break;
|
|
641
644
|
}
|
|
642
645
|
default:
|
|
643
|
-
|
|
646
|
+
u(ct);
|
|
644
647
|
}
|
|
645
648
|
return null;
|
|
646
649
|
}
|
|
647
|
-
let
|
|
648
|
-
function
|
|
649
|
-
const { autoResize:
|
|
650
|
+
let se = !1, Ee = !1, U = null;
|
|
651
|
+
function Es(e, t, n, o, s) {
|
|
652
|
+
const { autoResize: d } = i, { isHidden: c } = r;
|
|
650
653
|
switch (h(e), !0) {
|
|
651
654
|
// Allow manual and parent resize requests to bypass the hidden check
|
|
652
|
-
case (
|
|
653
|
-
if (
|
|
654
|
-
|
|
655
|
+
case (c === !0 && !(e in Se)): {
|
|
656
|
+
if (Ee === !0) break;
|
|
657
|
+
l("Iframe hidden - Ignored resize request"), Ee = !0, se = !1, cancelAnimationFrame(U), U = null;
|
|
655
658
|
break;
|
|
656
659
|
}
|
|
657
660
|
// Ignore overflowObserver here, as more efficient than using
|
|
658
661
|
// mutationObserver to detect OVERFLOW_ATTR changes
|
|
659
662
|
// Also allow manual and parent resize requests to bypass the pending check
|
|
660
|
-
case (
|
|
661
|
-
|
|
663
|
+
case (se === !0 && e !== Fe && !(e in Se)): {
|
|
664
|
+
l("Resize already pending - Ignored resize request");
|
|
662
665
|
break;
|
|
663
666
|
}
|
|
664
|
-
case (!
|
|
665
|
-
|
|
667
|
+
case (!d && !(e in Se)): {
|
|
668
|
+
u("Resizing disabled");
|
|
666
669
|
break;
|
|
667
670
|
}
|
|
668
671
|
default: {
|
|
669
|
-
|
|
670
|
-
const
|
|
672
|
+
Ee = !1, se = !0, r.totalTime = performance.now(), r.timerActive = !0;
|
|
673
|
+
const f = Ss(
|
|
671
674
|
e,
|
|
672
675
|
t,
|
|
673
676
|
n,
|
|
674
677
|
o
|
|
675
678
|
);
|
|
676
|
-
|
|
677
|
-
|
|
679
|
+
f && un(f.height, f.width, e, s), U || (U = requestAnimationFrame(() => {
|
|
680
|
+
se = !1, U = null, h("requestAnimationFrame"), de(`Reset sendPending: %c${e}`, a);
|
|
678
681
|
})), r.timerActive = !1;
|
|
679
682
|
}
|
|
680
683
|
}
|
|
681
|
-
|
|
684
|
+
x();
|
|
682
685
|
}
|
|
683
|
-
const M =
|
|
684
|
-
function
|
|
686
|
+
const M = We(Es);
|
|
687
|
+
function Ot({
|
|
685
688
|
eventType: e,
|
|
686
689
|
eventName: t
|
|
687
690
|
}) {
|
|
688
|
-
|
|
691
|
+
C(window, t, () => M(t, e), { passive: !0 });
|
|
689
692
|
}
|
|
690
|
-
function
|
|
691
|
-
|
|
693
|
+
function Os() {
|
|
694
|
+
Ot({
|
|
692
695
|
eventType: "After Print",
|
|
693
696
|
eventName: "afterprint"
|
|
694
|
-
}),
|
|
697
|
+
}), Ot({
|
|
695
698
|
eventType: "Before Print",
|
|
696
699
|
eventName: "beforeprint"
|
|
697
700
|
});
|
|
698
701
|
}
|
|
699
|
-
function
|
|
702
|
+
function Rs() {
|
|
700
703
|
if (r.triggerLocked) {
|
|
701
|
-
|
|
704
|
+
l("TriggerLock blocked calculation");
|
|
702
705
|
return;
|
|
703
706
|
}
|
|
704
|
-
r.triggerLocked = !0,
|
|
705
|
-
r.triggerLocked = !1,
|
|
707
|
+
r.triggerLocked = !0, de("Trigger event lock on"), requestAnimationFrame(() => {
|
|
708
|
+
r.triggerLocked = !1, de("Trigger event lock off");
|
|
706
709
|
});
|
|
707
710
|
}
|
|
708
|
-
function
|
|
709
|
-
const { heightCalcMode: t, widthCalcMode: n } = i, o =
|
|
710
|
-
|
|
711
|
+
function pn(e) {
|
|
712
|
+
const { heightCalcMode: t, widthCalcMode: n } = i, o = Ye[t](), s = Qe[n]();
|
|
713
|
+
l(`Reset trigger event: %c${e}`, a), z(o, s, e);
|
|
711
714
|
}
|
|
712
|
-
function
|
|
715
|
+
function ks(e) {
|
|
713
716
|
const t = i.heightCalcMode;
|
|
714
|
-
|
|
717
|
+
l(`Reset trigger event: %c${e}`, a), i.heightCalcMode = Zn, Rs(), pn("reset"), i.heightCalcMode = t;
|
|
715
718
|
}
|
|
716
|
-
const
|
|
717
|
-
function
|
|
718
|
-
|
|
719
|
+
const Ms = `Auto Resize can not be changed when <b>direction</> is set to '${He}'.`;
|
|
720
|
+
function $s(e) {
|
|
721
|
+
k(e, Hn, "parentIframe.autoResize(enable) enable");
|
|
719
722
|
const {
|
|
720
723
|
autoResize: t,
|
|
721
724
|
calculateHeight: n,
|
|
722
725
|
calculateWidth: o
|
|
723
726
|
} = i;
|
|
724
|
-
return o === !1 && n === !1 ? (h(
|
|
725
|
-
}
|
|
726
|
-
function xs(e) {
|
|
727
|
-
$(e, ee, "parentIframe.moveToAnchor(anchor) anchor"), r.inPageLinks.findTarget(e);
|
|
727
|
+
return o === !1 && n === !1 ? (h(Te), w(Ms), !1) : (e === !0 && t === !1 ? (i.autoResize = !0, queueMicrotask(() => M(Te, "Auto Resize enabled"))) : e === !1 && t === !0 && (i.autoResize = !1), z(0, 0, In, JSON.stringify(i.autoResize)), i.autoResize);
|
|
728
728
|
}
|
|
729
|
-
function
|
|
730
|
-
|
|
729
|
+
function Ts(e) {
|
|
730
|
+
k(e, ee, "parentIframe.moveToAnchor(anchor) anchor"), r.inPageLinks.findTarget(e);
|
|
731
731
|
}
|
|
732
|
-
function
|
|
733
|
-
|
|
732
|
+
function As(e) {
|
|
733
|
+
k(e, _, "parentIframe.setOffsetSize(offset) offset"), i.offsetHeight = e, i.offsetWidth = e, M(Ht, `parentIframe.setOffsetSize(${e})`);
|
|
734
734
|
}
|
|
735
|
-
const
|
|
736
|
-
function
|
|
737
|
-
|
|
735
|
+
const Is = () => r.origin;
|
|
736
|
+
function Ns(e) {
|
|
737
|
+
k(
|
|
738
738
|
e,
|
|
739
739
|
ee,
|
|
740
740
|
"parentIframe.setTargetOrigin(targetOrigin) targetOrigin"
|
|
741
|
-
),
|
|
742
|
-
}
|
|
743
|
-
function Ws(e) {
|
|
744
|
-
if (typeof e === Se) {
|
|
745
|
-
r.onPageInfo = e, y(0, 0, _t), yo(
|
|
746
|
-
"getPageInfo()",
|
|
747
|
-
"getParentProps()",
|
|
748
|
-
"See <u>https://iframe-resizer.com/upgrade</> for details. "
|
|
749
|
-
);
|
|
750
|
-
return;
|
|
751
|
-
}
|
|
752
|
-
r.onPageInfo = null, y(0, 0, Hn);
|
|
741
|
+
), l(`Set targetOrigin: %c${e}`, a), i.targetOrigin = e;
|
|
753
742
|
}
|
|
754
|
-
function
|
|
755
|
-
return
|
|
743
|
+
function Ls(e) {
|
|
744
|
+
return k(
|
|
756
745
|
e,
|
|
757
|
-
|
|
746
|
+
xe,
|
|
758
747
|
"parentIframe.getParentProps(callback) callback"
|
|
759
|
-
), r.onParentInfo = e,
|
|
760
|
-
r.onParentInfo = null,
|
|
748
|
+
), r.onParentInfo = e, z(0, 0, jt), () => {
|
|
749
|
+
r.onParentInfo = null, z(0, 0, xn);
|
|
761
750
|
};
|
|
762
751
|
}
|
|
763
|
-
function
|
|
764
|
-
|
|
765
|
-
}
|
|
766
|
-
const Us = (e) => `<rb>Deprecated API object name</>
|
|
767
|
-
The <b>window.parentIFrame</> object has been renamed to <b>window.parentIframe</>. Please update your code as the old object will be removed in a future version.
|
|
768
|
-
|
|
769
|
-
Called property: '${String(e)}'
|
|
770
|
-
`;
|
|
771
|
-
function Gs(e) {
|
|
772
|
-
const t = /* @__PURE__ */ new Set();
|
|
773
|
-
return new Proxy(e, {
|
|
774
|
-
// eslint-disable-next-line @typescript-eslint/no-shadow
|
|
775
|
-
get(n, o) {
|
|
776
|
-
t.has(o) || (p(Us(o)), t.add(o));
|
|
777
|
-
const s = n[o], u = Object.getOwnPropertyDescriptor(n, o);
|
|
778
|
-
return u && !u.configurable && !u.writable ? s : typeof s == "function" ? s.bind(n) : s;
|
|
779
|
-
}
|
|
780
|
-
});
|
|
781
|
-
}
|
|
782
|
-
function qs(e, t) {
|
|
783
|
-
e !== void 0 && $(
|
|
752
|
+
function Cs(e, t) {
|
|
753
|
+
e !== void 0 && k(
|
|
784
754
|
e,
|
|
785
|
-
|
|
755
|
+
_,
|
|
786
756
|
"parentIframe.resize(customHeight, customWidth) customHeight"
|
|
787
|
-
), t !== void 0 &&
|
|
757
|
+
), t !== void 0 && k(
|
|
788
758
|
t,
|
|
789
|
-
|
|
759
|
+
_,
|
|
790
760
|
"parentIframe.resize(customHeight, customWidth) customWidth"
|
|
791
761
|
);
|
|
792
|
-
const n =
|
|
762
|
+
const n = e === void 0 ? "" : e, o = t === void 0 ? "" : `,${t}`, s = `${n}${o}`;
|
|
793
763
|
M(
|
|
794
|
-
|
|
795
|
-
`parentIframe.resize(${
|
|
764
|
+
Be,
|
|
765
|
+
`parentIframe.resize(${s})`,
|
|
796
766
|
e,
|
|
797
767
|
t
|
|
798
768
|
);
|
|
799
769
|
}
|
|
800
|
-
const
|
|
801
|
-
|
|
802
|
-
},
|
|
803
|
-
function
|
|
804
|
-
t &&
|
|
770
|
+
const Je = (e) => (t, n) => {
|
|
771
|
+
k(t, _, `parentIframe.${e}(x, y) x`), k(n, _, `parentIframe.${e}(x, y) y`), z(n, t, e);
|
|
772
|
+
}, js = Je(Bn), Ps = Je(Dn), _s = Je(Pt);
|
|
773
|
+
function xs(e, t) {
|
|
774
|
+
t && k(
|
|
805
775
|
t,
|
|
806
776
|
ee,
|
|
807
777
|
"parentIframe.sendMessage(msg, targetOrigin) targetOrigin"
|
|
808
|
-
),
|
|
778
|
+
), z(0, 0, $e, JSON.stringify(e), t);
|
|
809
779
|
}
|
|
810
|
-
const
|
|
811
|
-
function
|
|
780
|
+
const Bs = () => z(0, 0, Ln), Ds = () => i.parentId, Fs = () => ks("parentIframe.reset");
|
|
781
|
+
function Hs() {
|
|
812
782
|
const { win: e } = r;
|
|
813
783
|
i.mode !== 1 && (e.parentIframe = Object.freeze({
|
|
814
|
-
autoResize:
|
|
815
|
-
close:
|
|
816
|
-
getId:
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
scrollTo: Qs,
|
|
830
|
-
scrollToOffset: Ys,
|
|
831
|
-
sendMessage: Js,
|
|
832
|
-
setTargetOrigin: Hs,
|
|
833
|
-
resize: qs,
|
|
834
|
-
size: tr
|
|
835
|
-
// TODO Remove in V6
|
|
836
|
-
}), e.parentIFrame = Gs(e.parentIframe));
|
|
784
|
+
autoResize: $s,
|
|
785
|
+
close: Bs,
|
|
786
|
+
getId: Ds,
|
|
787
|
+
getParentOrigin: Is,
|
|
788
|
+
getParentProps: Ls,
|
|
789
|
+
moveToAnchor: Ts,
|
|
790
|
+
reset: Fs,
|
|
791
|
+
setOffsetSize: As,
|
|
792
|
+
scrollBy: js,
|
|
793
|
+
scrollTo: Ps,
|
|
794
|
+
scrollToOffset: _s,
|
|
795
|
+
sendMessage: xs,
|
|
796
|
+
setTargetOrigin: Ns,
|
|
797
|
+
resize: Cs
|
|
798
|
+
}));
|
|
837
799
|
}
|
|
838
800
|
const te = (e = "") => (t) => (n) => {
|
|
839
|
-
n.size > 0 &&
|
|
801
|
+
n.size > 0 && de(
|
|
840
802
|
`${t}Observer ${e}:`,
|
|
841
|
-
...Array.from(n).flatMap((o) => [
|
|
803
|
+
...Array.from(n).flatMap((o) => [_e, o])
|
|
842
804
|
);
|
|
843
|
-
},
|
|
844
|
-
n.size > 0 &&
|
|
805
|
+
}, Vs = (e = "") => (t) => (n) => {
|
|
806
|
+
n.size > 0 && Xt(
|
|
845
807
|
`${t}Observer ${e}:`,
|
|
846
|
-
...Array.from(n).flatMap((o) => [
|
|
808
|
+
...Array.from(n).flatMap((o) => [_e, o])
|
|
847
809
|
);
|
|
848
|
-
},
|
|
849
|
-
n > 0 &&
|
|
810
|
+
}, yn = te("attached to"), vn = Vs("already attached"), Ws = te("detached from"), be = (e, t = !0) => (n) => {
|
|
811
|
+
n > 0 && u(
|
|
850
812
|
`${t ? "At" : "De"}tached %c${e}Observer%c ${t ? "to" : "from"} %c${n}%c element${n === 1 ? "" : "s"}`,
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
813
|
+
a,
|
|
814
|
+
Z,
|
|
815
|
+
a,
|
|
816
|
+
Z
|
|
855
817
|
);
|
|
856
|
-
},
|
|
857
|
-
const s =
|
|
858
|
-
return (
|
|
859
|
-
const
|
|
860
|
-
let
|
|
861
|
-
for (const
|
|
862
|
-
n.has(
|
|
863
|
-
s(
|
|
818
|
+
}, zn = (e, t, n, o) => {
|
|
819
|
+
const s = Ws(e);
|
|
820
|
+
return (d) => {
|
|
821
|
+
const c = /* @__PURE__ */ new Set();
|
|
822
|
+
let f = 0;
|
|
823
|
+
for (const y of d)
|
|
824
|
+
n.has(y) && (t.unobserve(y), n.delete(y), c.add(y), f += 1);
|
|
825
|
+
s(c), o(f), c.clear();
|
|
864
826
|
};
|
|
865
|
-
},
|
|
827
|
+
}, Rt = 16, kt = 2, Us = 200, Ke = "Mutation", O = /* @__PURE__ */ new Set(), L = /* @__PURE__ */ new Set(), Ie = /* @__PURE__ */ new Set(), he = [], Gs = {
|
|
866
828
|
attributes: !0,
|
|
867
|
-
attributeFilter: [X,
|
|
829
|
+
attributeFilter: [X, Pe],
|
|
868
830
|
attributeOldValue: !1,
|
|
869
831
|
characterData: !1,
|
|
870
832
|
characterDataOldValue: !1,
|
|
871
833
|
childList: !0,
|
|
872
834
|
subtree: !0
|
|
873
835
|
};
|
|
874
|
-
let
|
|
875
|
-
const
|
|
876
|
-
function
|
|
836
|
+
let Oe = 1, Xe, Ne = !1, Le = 0;
|
|
837
|
+
const qs = te("added")(Ke), Zs = te("removed (page)")(Ke), Ys = te("removed (added)")(Ke), bn = (e) => e.nodeType !== Node.ELEMENT_NODE || Zt.has(e.tagName.toLowerCase());
|
|
838
|
+
function Qs(e) {
|
|
877
839
|
const t = e.addedNodes;
|
|
878
840
|
for (const n of t)
|
|
879
|
-
|
|
841
|
+
bn(n) || O.add(n);
|
|
880
842
|
}
|
|
881
|
-
function
|
|
843
|
+
function Js(e) {
|
|
882
844
|
const t = e.removedNodes;
|
|
883
845
|
for (const n of t)
|
|
884
|
-
|
|
846
|
+
bn(n) || (O.has(n) ? (O.delete(n), Ie.add(n)) : L.add(n));
|
|
885
847
|
}
|
|
886
|
-
const
|
|
887
|
-
|
|
848
|
+
const Ks = (e) => {
|
|
849
|
+
u("Mutations:", e);
|
|
888
850
|
for (const t of e)
|
|
889
|
-
|
|
890
|
-
|
|
851
|
+
Qs(t), Js(t);
|
|
852
|
+
qs(O), Zs(L), Ys(Ie), Ie.clear();
|
|
891
853
|
};
|
|
892
|
-
function
|
|
893
|
-
|
|
894
|
-
`Detected %c${
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
),
|
|
898
|
-
`Found %c${
|
|
899
|
-
|
|
900
|
-
|
|
854
|
+
function Xs() {
|
|
855
|
+
L.size > 0 && l(
|
|
856
|
+
`Detected %c${L.size} %cremoved element${L.size > 1 ? "s" : ""}`,
|
|
857
|
+
a,
|
|
858
|
+
v
|
|
859
|
+
), O.size > 0 && l(
|
|
860
|
+
`Found %c${O.size} %cnew element${O.size > 1 ? "s" : ""}`,
|
|
861
|
+
a,
|
|
862
|
+
v
|
|
901
863
|
);
|
|
902
864
|
}
|
|
903
|
-
const
|
|
904
|
-
const t = performance.now(), n = t -
|
|
905
|
-
if (n > o && n <
|
|
906
|
-
h("mutationThrottled"),
|
|
907
|
-
`EventLoop busy time: %c${
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
), setTimeout(
|
|
865
|
+
const er = (e) => () => {
|
|
866
|
+
const t = performance.now(), n = t - Le, o = Rt * Oe++ + kt;
|
|
867
|
+
if (n > o && n < Us) {
|
|
868
|
+
h("mutationThrottled"), u("Update delayed due to heavy workload on the callStack"), u(
|
|
869
|
+
`EventLoop busy time: %c${P(n)}ms %c> Max wait: %c${o - kt}ms`,
|
|
870
|
+
a,
|
|
871
|
+
v,
|
|
872
|
+
a
|
|
873
|
+
), setTimeout(Xe, Rt * Oe), Le = t;
|
|
912
874
|
return;
|
|
913
875
|
}
|
|
914
|
-
|
|
876
|
+
Oe = 1, he.forEach(Ks), he.length = 0, Ne = !1, Xs(), e({ addedNodes: O, removedNodes: L }), O.clear(), L.clear();
|
|
915
877
|
};
|
|
916
|
-
function
|
|
917
|
-
|
|
878
|
+
function tr(e) {
|
|
879
|
+
he.push(e), !Ne && (Le = performance.now(), Ne = !0, requestAnimationFrame(Xe));
|
|
918
880
|
}
|
|
919
|
-
function
|
|
920
|
-
const t = new window.MutationObserver(
|
|
921
|
-
return
|
|
922
|
-
...t,
|
|
881
|
+
function nr(e) {
|
|
882
|
+
const t = new window.MutationObserver(tr), n = document.body || document.documentElement;
|
|
883
|
+
return Xe = er(e), t.observe(n, Gs), u("Attached%c MutationObserver%c to body", a, v), {
|
|
923
884
|
disconnect: () => {
|
|
924
|
-
|
|
885
|
+
O.clear(), L.clear(), he.length = 0, t.disconnect(), u("Detached%c MutationObserver", a);
|
|
925
886
|
}
|
|
926
887
|
};
|
|
927
888
|
}
|
|
928
|
-
const
|
|
889
|
+
const or = {
|
|
929
890
|
characterData: !0,
|
|
930
891
|
childList: !0,
|
|
931
892
|
subtree: !0
|
|
932
893
|
};
|
|
933
|
-
function
|
|
894
|
+
function sr(e) {
|
|
934
895
|
const t = document.querySelector("title") ?? document.head ?? document.documentElement, n = new MutationObserver(e);
|
|
935
|
-
return n.observe(t,
|
|
896
|
+
return n.observe(t, or), u("Attached%c TitleObserver%c to head", a, v), setTimeout(e), {
|
|
936
897
|
disconnect: () => {
|
|
937
|
-
n.disconnect(),
|
|
898
|
+
n.disconnect(), u("Detached%c TitleObserver", a);
|
|
938
899
|
}
|
|
939
900
|
};
|
|
940
901
|
}
|
|
941
|
-
function
|
|
902
|
+
function rr(e) {
|
|
942
903
|
const t = new IntersectionObserver(
|
|
943
904
|
(o) => e(o.at(-1)?.isIntersecting ?? !1),
|
|
944
905
|
{
|
|
945
906
|
threshold: 0
|
|
946
907
|
}
|
|
947
908
|
), n = document.documentElement;
|
|
948
|
-
return t.observe(n),
|
|
909
|
+
return t.observe(n), u("Attached%c VisibilityObserver%c to page", a, v), {
|
|
949
910
|
disconnect: () => {
|
|
950
|
-
t.disconnect(),
|
|
911
|
+
t.disconnect(), u("Detached%c VisibilityObserver", a);
|
|
951
912
|
}
|
|
952
913
|
};
|
|
953
914
|
}
|
|
954
|
-
let
|
|
955
|
-
function
|
|
915
|
+
let Mt = /* @__PURE__ */ new Set();
|
|
916
|
+
function ir(e) {
|
|
956
917
|
const t = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Set();
|
|
957
918
|
for (const o of e)
|
|
958
919
|
o.closest(`[${X}]`) ? n.add(o) : t.add(o);
|
|
959
920
|
return n.size > 0 && queueMicrotask(() => {
|
|
960
|
-
h("overflowIgnored"),
|
|
961
|
-
`, n),
|
|
921
|
+
h("overflowIgnored"), u(`Ignoring elements with [data-iframe-ignore] > *:
|
|
922
|
+
`, n), x();
|
|
962
923
|
}), t;
|
|
963
924
|
}
|
|
964
|
-
function
|
|
965
|
-
const e = document.querySelectorAll(`[${
|
|
966
|
-
let n = !
|
|
967
|
-
return typeof Set.prototype.symmetricDifference ===
|
|
925
|
+
function wn() {
|
|
926
|
+
const e = document.querySelectorAll(`[${_t}]`), t = ir(e);
|
|
927
|
+
let n = !0;
|
|
928
|
+
return typeof Set.prototype.symmetricDifference === xe && (n = t.symmetricDifference(Mt).size > 0), Mt = t, r.overflowedNodeSet = t, r.hasOverflow = t.size > 0, { hasOverflowUpdated: n, overflowedNodeSet: t };
|
|
968
929
|
}
|
|
969
|
-
const
|
|
930
|
+
const R = {}, Sn = (e) => {
|
|
970
931
|
const t = /* @__PURE__ */ new Set();
|
|
971
|
-
for (const n of e)
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
932
|
+
for (const n of e)
|
|
933
|
+
if (n instanceof Element) {
|
|
934
|
+
t.add(n);
|
|
935
|
+
for (const o of Ze(n)) t.add(o);
|
|
936
|
+
}
|
|
937
|
+
return u(`Inspecting:
|
|
976
938
|
`, t), t;
|
|
977
|
-
},
|
|
939
|
+
}, cr = (e) => {
|
|
978
940
|
if (e.size === 0) return;
|
|
979
941
|
h("addObservers");
|
|
980
|
-
const t =
|
|
981
|
-
|
|
982
|
-
},
|
|
942
|
+
const t = Sn(e);
|
|
943
|
+
R.overflow.attachObservers(t), R.resize.attachObserverToNonStaticElements(t), x();
|
|
944
|
+
}, ar = (e) => {
|
|
983
945
|
if (e.size === 0) return;
|
|
984
946
|
h("removeObservers");
|
|
985
|
-
const t =
|
|
986
|
-
|
|
947
|
+
const t = Sn(e);
|
|
948
|
+
R.overflow.detachObservers(t), R.resize.detachObservers(t), x();
|
|
987
949
|
};
|
|
988
|
-
function
|
|
950
|
+
function lr({
|
|
989
951
|
addedNodes: e,
|
|
990
952
|
removedNodes: t
|
|
991
953
|
}) {
|
|
992
|
-
h("contentMutated"), r.applySelectors(),
|
|
954
|
+
h("contentMutated"), r.applySelectors(), ln(), wn(), x(), ar(t), cr(e);
|
|
993
955
|
}
|
|
994
|
-
function
|
|
995
|
-
|
|
956
|
+
function ur(e) {
|
|
957
|
+
lr(e), M(Wt, "Mutation Observed");
|
|
996
958
|
}
|
|
997
|
-
const ne = "Overflow",
|
|
959
|
+
const ne = "Overflow", dr = be(ne), fr = be(ne, !1), mr = yn(ne), hr = vn(ne), gr = (e) => e instanceof HTMLElement && (!!e.hidden || e.offsetParent === null || e.style.display === He), pr = (e, t) => {
|
|
998
960
|
const n = t.side, o = {
|
|
999
961
|
root: t.root,
|
|
1000
962
|
rootMargin: "0px",
|
|
1001
963
|
threshold: 1
|
|
1002
|
-
}, s = window?.requestAnimationFrame ||
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
const
|
|
1008
|
-
|
|
964
|
+
}, s = window?.requestAnimationFrame || ue, d = (S = !1) => e(S), c = (S, $) => S === 0 || S > $[n], f = (S, $) => {
|
|
965
|
+
S.toggleAttribute(_t, $);
|
|
966
|
+
};
|
|
967
|
+
function y(S) {
|
|
968
|
+
for (const $ of S) {
|
|
969
|
+
const { boundingClientRect: V, rootBounds: W, target: E } = $;
|
|
970
|
+
if (!W) continue;
|
|
971
|
+
const kn = V[n], Mn = c(kn, W) && !(E instanceof HTMLElement && gr(E));
|
|
972
|
+
f(E, Mn);
|
|
1009
973
|
}
|
|
1010
|
-
s(
|
|
974
|
+
s(d);
|
|
1011
975
|
}
|
|
1012
|
-
const
|
|
976
|
+
const m = new IntersectionObserver(y, o), b = /* @__PURE__ */ new WeakSet();
|
|
1013
977
|
function g(S) {
|
|
1014
|
-
const
|
|
1015
|
-
let
|
|
1016
|
-
for (const
|
|
1017
|
-
if (
|
|
1018
|
-
if (
|
|
1019
|
-
|
|
978
|
+
const $ = /* @__PURE__ */ new Set(), V = /* @__PURE__ */ new Set();
|
|
979
|
+
let W = 0;
|
|
980
|
+
for (const E of S)
|
|
981
|
+
if (E instanceof Element) {
|
|
982
|
+
if (b.has(E)) {
|
|
983
|
+
$.add(E);
|
|
1020
984
|
continue;
|
|
1021
985
|
}
|
|
1022
|
-
|
|
986
|
+
m.observe(E), b.add(E), V.add(E), W += 1;
|
|
1023
987
|
}
|
|
1024
|
-
|
|
988
|
+
hr($), mr(V), dr(W), V.clear(), $.clear();
|
|
1025
989
|
}
|
|
1026
990
|
return {
|
|
1027
991
|
attachObservers: g,
|
|
1028
|
-
detachObservers:
|
|
992
|
+
detachObservers: zn(
|
|
1029
993
|
ne,
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
994
|
+
m,
|
|
995
|
+
b,
|
|
996
|
+
fr
|
|
1033
997
|
),
|
|
1034
998
|
disconnect: () => {
|
|
1035
|
-
|
|
999
|
+
m.disconnect(), u("Detached%c OverflowObserver", a);
|
|
1036
1000
|
}
|
|
1037
1001
|
};
|
|
1038
1002
|
};
|
|
1039
|
-
function
|
|
1040
|
-
const { hasOverflow: e } = r, { hasOverflowUpdated: t, overflowedNodeSet: n } =
|
|
1003
|
+
function yr() {
|
|
1004
|
+
const { hasOverflow: e } = r, { hasOverflowUpdated: t, overflowedNodeSet: n } = wn();
|
|
1041
1005
|
switch (!0) {
|
|
1042
1006
|
case !t:
|
|
1043
1007
|
return;
|
|
1044
1008
|
case n.size > 1:
|
|
1045
|
-
|
|
1009
|
+
u("Overflowed Elements:", n);
|
|
1046
1010
|
break;
|
|
1047
1011
|
case e:
|
|
1048
1012
|
break;
|
|
1049
1013
|
default:
|
|
1050
|
-
|
|
1014
|
+
u("No overflow detected");
|
|
1051
1015
|
}
|
|
1052
|
-
M(
|
|
1016
|
+
M(Fe, "Overflow updated");
|
|
1053
1017
|
}
|
|
1054
|
-
function
|
|
1018
|
+
function vr(e) {
|
|
1055
1019
|
const t = {
|
|
1056
1020
|
root: document.documentElement,
|
|
1057
|
-
side: i.calculateHeight ?
|
|
1021
|
+
side: i.calculateHeight ? Dt : Ft
|
|
1058
1022
|
};
|
|
1059
|
-
return
|
|
1023
|
+
return R.overflow = pr(yr, t), R.overflow.attachObservers(e), R.overflow;
|
|
1060
1024
|
}
|
|
1061
|
-
const oe = "Resize",
|
|
1062
|
-
let
|
|
1063
|
-
function
|
|
1025
|
+
const oe = "Resize", zr = be(oe), br = be(oe, !1), wr = yn(oe), Sr = vn(oe), ge = /* @__PURE__ */ new WeakSet(), Re = /* @__PURE__ */ new Set(), ke = /* @__PURE__ */ new Set();
|
|
1026
|
+
let q;
|
|
1027
|
+
function Er(e) {
|
|
1064
1028
|
let t = 0;
|
|
1065
1029
|
for (const n of e) {
|
|
1066
|
-
if (n
|
|
1030
|
+
if (!(n instanceof Element)) continue;
|
|
1067
1031
|
const o = getComputedStyle(n)?.position;
|
|
1068
1032
|
if (!(o === "" || o === "static")) {
|
|
1069
|
-
if (
|
|
1070
|
-
|
|
1033
|
+
if (ge.has(n)) {
|
|
1034
|
+
Re.add(n);
|
|
1071
1035
|
continue;
|
|
1072
1036
|
}
|
|
1073
|
-
|
|
1037
|
+
q.observe(n), ge.add(n), ke.add(n), t += 1;
|
|
1074
1038
|
}
|
|
1075
1039
|
}
|
|
1076
|
-
|
|
1040
|
+
Sr(Re), wr(ke), zr(t), ke.clear(), Re.clear();
|
|
1077
1041
|
}
|
|
1078
|
-
const
|
|
1079
|
-
attachObserverToNonStaticElements:
|
|
1080
|
-
detachObservers:
|
|
1042
|
+
const Or = (e) => (q = new ResizeObserver(e), q.observe(document.body), ge.add(document.body), u("Attached%c ResizeObserver%c to body", a, v), {
|
|
1043
|
+
attachObserverToNonStaticElements: Er,
|
|
1044
|
+
detachObservers: zn(
|
|
1081
1045
|
oe,
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1046
|
+
q,
|
|
1047
|
+
ge,
|
|
1048
|
+
br
|
|
1085
1049
|
),
|
|
1086
1050
|
disconnect: () => {
|
|
1087
|
-
|
|
1051
|
+
q.disconnect(), u("Detached%c ResizeObserver", a);
|
|
1088
1052
|
}
|
|
1089
1053
|
});
|
|
1090
|
-
function
|
|
1054
|
+
function Rr(e) {
|
|
1091
1055
|
if (!Array.isArray(e) || e.length === 0) return;
|
|
1092
1056
|
const t = e[0].target;
|
|
1093
|
-
M(
|
|
1057
|
+
M(Vt, `Element resized <${Kn(t)}>`);
|
|
1094
1058
|
}
|
|
1095
|
-
function
|
|
1096
|
-
return
|
|
1059
|
+
function kr(e) {
|
|
1060
|
+
return R.resize = Or(Rr), R.resize.attachObserverToNonStaticElements(e), R.resize;
|
|
1097
1061
|
}
|
|
1098
|
-
let
|
|
1099
|
-
function
|
|
1062
|
+
let $t;
|
|
1063
|
+
function Mr() {
|
|
1100
1064
|
const e = document.title;
|
|
1101
|
-
e !==
|
|
1065
|
+
e !== $t && ($t = e, l(`Title: %c${e}`, a), e && z(0, 0, Fn, e));
|
|
1102
1066
|
}
|
|
1103
|
-
function
|
|
1104
|
-
|
|
1067
|
+
function $r(e) {
|
|
1068
|
+
l(`Visible: %c${e}`, a), r.isHidden = !e, M(Ut, "Visibility changed");
|
|
1105
1069
|
}
|
|
1106
|
-
function
|
|
1107
|
-
|
|
1070
|
+
function Tr(e) {
|
|
1071
|
+
Ue.push(...e.map((t) => t.disconnect));
|
|
1108
1072
|
}
|
|
1109
|
-
function
|
|
1073
|
+
function Ar() {
|
|
1110
1074
|
h("attachObservers");
|
|
1111
|
-
const e =
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1075
|
+
const e = Ze(document.documentElement), t = [
|
|
1076
|
+
nr(ur),
|
|
1077
|
+
vr(e),
|
|
1078
|
+
ms(),
|
|
1079
|
+
kr(e),
|
|
1080
|
+
sr(Mr),
|
|
1081
|
+
rr($r)
|
|
1118
1082
|
];
|
|
1119
|
-
|
|
1083
|
+
Tr(t);
|
|
1120
1084
|
}
|
|
1121
|
-
const
|
|
1085
|
+
const Tt = (e, t, n) => {
|
|
1122
1086
|
if (n !== "") {
|
|
1123
|
-
|
|
1087
|
+
l(`${e}: %c${n}`, a);
|
|
1124
1088
|
for (const o of document.querySelectorAll(n))
|
|
1125
|
-
|
|
1089
|
+
l(`Applying ${t} to:`, o), o.toggleAttribute(t, !0);
|
|
1126
1090
|
}
|
|
1127
1091
|
};
|
|
1128
|
-
function
|
|
1092
|
+
function Ir({
|
|
1129
1093
|
sizeSelector: e,
|
|
1130
1094
|
ignoreSelector: t
|
|
1131
1095
|
}) {
|
|
1132
1096
|
return () => {
|
|
1133
|
-
|
|
1097
|
+
Tt("sizeSelector", Pe, e), Tt("ignoreSelector", X, t);
|
|
1134
1098
|
};
|
|
1135
1099
|
}
|
|
1136
|
-
function
|
|
1100
|
+
function Nr() {
|
|
1137
1101
|
const e = document.createElement("div");
|
|
1138
1102
|
e.style.clear = "both", e.style.display = "block", e.style.height = "0", document.body.append(e);
|
|
1139
1103
|
}
|
|
1140
|
-
function
|
|
1141
|
-
return t.includes("-") && (
|
|
1104
|
+
function Lr(e, t) {
|
|
1105
|
+
return t.includes("-") && (H(`Negative CSS value ignored for ${e}`), t = ""), t;
|
|
1142
1106
|
}
|
|
1143
|
-
function
|
|
1144
|
-
t === void 0 || t === "" || t ===
|
|
1107
|
+
function Ce(e, t) {
|
|
1108
|
+
t === void 0 || t === "" || t === Gn || (document.body.style.setProperty(e, t), u(`Set body ${e}: %c${t}`, a));
|
|
1145
1109
|
}
|
|
1146
|
-
function
|
|
1110
|
+
function Cr({
|
|
1147
1111
|
bodyMarginStr: e,
|
|
1148
1112
|
bodyMargin: t
|
|
1149
1113
|
}) {
|
|
1150
|
-
e === void 0 && (e = `${t}px`),
|
|
1114
|
+
e === void 0 && (e = `${t}px`), Ce("margin", Lr("margin", e));
|
|
1151
1115
|
}
|
|
1152
|
-
const
|
|
1116
|
+
const jr = () => ({
|
|
1153
1117
|
x: document.documentElement.scrollLeft,
|
|
1154
1118
|
y: document.documentElement.scrollTop
|
|
1155
1119
|
});
|
|
1156
|
-
function
|
|
1157
|
-
const t = e.getBoundingClientRect(), n =
|
|
1120
|
+
function Pr(e) {
|
|
1121
|
+
const t = e.getBoundingClientRect(), n = jr();
|
|
1158
1122
|
return {
|
|
1159
|
-
x:
|
|
1160
|
-
y:
|
|
1123
|
+
x: Math.round(t.left + n.x),
|
|
1124
|
+
y: Math.round(t.top + n.y)
|
|
1161
1125
|
};
|
|
1162
1126
|
}
|
|
1163
|
-
function
|
|
1164
|
-
const n =
|
|
1165
|
-
|
|
1127
|
+
function _r(e, t) {
|
|
1128
|
+
const n = Pr(t);
|
|
1129
|
+
l(
|
|
1166
1130
|
`Moving to in page link (%c#${e}%c) at x: %c${n.x}%c y: %c${n.y}`,
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
),
|
|
1173
|
-
}
|
|
1174
|
-
function
|
|
1131
|
+
a,
|
|
1132
|
+
v,
|
|
1133
|
+
a,
|
|
1134
|
+
v,
|
|
1135
|
+
a
|
|
1136
|
+
), z(n.y, n.x, Pt);
|
|
1137
|
+
}
|
|
1138
|
+
function et(e) {
|
|
1175
1139
|
const t = e.split("#")[1] || e, n = decodeURIComponent(t), o = document.getElementById(n) || document.getElementsByName(n)[0];
|
|
1176
1140
|
if (o !== void 0) {
|
|
1177
|
-
|
|
1141
|
+
_r(t, o);
|
|
1178
1142
|
return;
|
|
1179
1143
|
}
|
|
1180
|
-
|
|
1144
|
+
l(`In page link (#${t}) not found in iframe, so sending to parent`), z(0, 0, Cn, `#${t}`);
|
|
1181
1145
|
}
|
|
1182
|
-
function
|
|
1146
|
+
function En() {
|
|
1183
1147
|
const { hash: e, href: t } = window.location;
|
|
1184
|
-
e !== "" && e !== "#" &&
|
|
1148
|
+
e !== "" && e !== "#" && et(t);
|
|
1185
1149
|
}
|
|
1186
|
-
function
|
|
1150
|
+
function xr() {
|
|
1187
1151
|
for (const e of document.querySelectorAll('a[href^="#"]'))
|
|
1188
|
-
e.getAttribute("href") !== "#" &&
|
|
1189
|
-
t.preventDefault(),
|
|
1152
|
+
e.getAttribute("href") !== "#" && C(e, "click", (t) => {
|
|
1153
|
+
t.preventDefault(), et(e.getAttribute("href"));
|
|
1190
1154
|
});
|
|
1191
1155
|
}
|
|
1192
|
-
function
|
|
1193
|
-
|
|
1156
|
+
function Br() {
|
|
1157
|
+
C(window, "hashchange", En);
|
|
1194
1158
|
}
|
|
1195
|
-
function
|
|
1196
|
-
setTimeout(
|
|
1159
|
+
function Dr() {
|
|
1160
|
+
setTimeout(En, qt);
|
|
1197
1161
|
}
|
|
1198
|
-
function
|
|
1199
|
-
|
|
1200
|
-
findTarget:
|
|
1162
|
+
function Fr() {
|
|
1163
|
+
l("Setting up location.hash handlers"), xr(), Br(), Dr(), r.inPageLinks = {
|
|
1164
|
+
findTarget: et
|
|
1201
1165
|
};
|
|
1202
1166
|
}
|
|
1203
|
-
function
|
|
1167
|
+
function Hr(e) {
|
|
1204
1168
|
const { mode: t } = i;
|
|
1205
|
-
e ?
|
|
1169
|
+
e ? Ge(t) ? w(T(5)) : Fr() : l("In page linking not enabled");
|
|
1206
1170
|
}
|
|
1207
|
-
const
|
|
1208
|
-
function
|
|
1209
|
-
const e = (t) => t.style.setProperty(
|
|
1210
|
-
e(document.documentElement), e(document.body),
|
|
1171
|
+
const Vr = "important";
|
|
1172
|
+
function Wr() {
|
|
1173
|
+
const e = (t) => t.style.setProperty(ve, Q, Vr);
|
|
1174
|
+
e(document.documentElement), e(document.body), l("Set HTML & body height: %cauto !important", a);
|
|
1211
1175
|
}
|
|
1212
|
-
const
|
|
1176
|
+
const tt = (e) => (t, n) => {
|
|
1213
1177
|
if (n in t) {
|
|
1214
1178
|
if (typeof t[n] === e) return t[n];
|
|
1215
1179
|
throw new TypeError(`${n} is not a ${e}.`);
|
|
1216
1180
|
}
|
|
1217
|
-
},
|
|
1218
|
-
function
|
|
1181
|
+
}, Me = tt(xe), At = tt(_), re = tt(ee), Ur = (e) => e !== null && typeof e === Vn && !Array.isArray(e);
|
|
1182
|
+
function Gr(e) {
|
|
1219
1183
|
const { calculateHeight: t, calculateWidth: n } = i;
|
|
1220
1184
|
let o, s;
|
|
1221
|
-
return typeof e?.
|
|
1185
|
+
return typeof e?.offsetSize === _ && (t && (o = At(e, rt)), n && (s = At(e, rt))), { offsetHeight: o, offsetWidth: s };
|
|
1222
1186
|
}
|
|
1223
|
-
function
|
|
1224
|
-
|
|
1225
|
-
const { offsetHeight: t, offsetWidth: n } =
|
|
1187
|
+
function qr(e) {
|
|
1188
|
+
l("Reading data from page:", Object.keys(e));
|
|
1189
|
+
const { offsetHeight: t, offsetWidth: n } = Gr(e);
|
|
1226
1190
|
return {
|
|
1227
1191
|
offsetHeight: t,
|
|
1228
1192
|
offsetWidth: n,
|
|
1229
|
-
ignoreSelector:
|
|
1230
|
-
[
|
|
1231
|
-
sizeSelector:
|
|
1232
|
-
targetOrigin:
|
|
1233
|
-
onBeforeResize:
|
|
1234
|
-
onMessage:
|
|
1235
|
-
onReady:
|
|
1193
|
+
ignoreSelector: re(e, "ignoreSelector"),
|
|
1194
|
+
[vt(3)]: re(e, vt(0)),
|
|
1195
|
+
sizeSelector: re(e, "sizeSelector"),
|
|
1196
|
+
targetOrigin: re(e, "targetOrigin"),
|
|
1197
|
+
onBeforeResize: Me(e, "onBeforeResize"),
|
|
1198
|
+
onMessage: Me(e, "onMessage"),
|
|
1199
|
+
onReady: Me(e, "onReady")
|
|
1236
1200
|
};
|
|
1237
1201
|
}
|
|
1238
|
-
function
|
|
1202
|
+
function Zr() {
|
|
1239
1203
|
const { mode: e } = i;
|
|
1240
|
-
if (
|
|
1204
|
+
if (Ge(e)) return {};
|
|
1241
1205
|
const t = window.iframeResizer || window.iFrameResizer;
|
|
1242
|
-
return
|
|
1206
|
+
return Ur(t) ? qr(t) : {};
|
|
1243
1207
|
}
|
|
1244
|
-
const
|
|
1208
|
+
const Yr = (e) => e === "true", On = (e) => (t) => t === void 0 ? void 0 : e(t), j = On(Yr), G = On(Number), Qr = (e) => ({
|
|
1245
1209
|
parentId: e[0],
|
|
1246
|
-
bodyMargin:
|
|
1247
|
-
calculateWidth:
|
|
1248
|
-
logging:
|
|
1210
|
+
bodyMargin: G(e[1]),
|
|
1211
|
+
calculateWidth: j(e[2]),
|
|
1212
|
+
logging: j(e[3]),
|
|
1249
1213
|
// data[4] no longer used (was intervalTimer)
|
|
1250
|
-
autoResize:
|
|
1214
|
+
autoResize: j(e[6]),
|
|
1251
1215
|
bodyMarginStr: e[7],
|
|
1252
|
-
|
|
1216
|
+
// data[8] no longer used (was heightCalcMode)
|
|
1253
1217
|
bodyBackground: e[9],
|
|
1254
1218
|
bodyPadding: e[10],
|
|
1255
|
-
tolerance:
|
|
1256
|
-
inPageLinks:
|
|
1219
|
+
tolerance: G(e[11]),
|
|
1220
|
+
inPageLinks: j(e[12]),
|
|
1257
1221
|
// data[13] no longer used (was resizeFrom)
|
|
1258
|
-
|
|
1259
|
-
mouseEvents:
|
|
1260
|
-
offsetHeight:
|
|
1261
|
-
offsetWidth:
|
|
1262
|
-
calculateHeight:
|
|
1222
|
+
// data[14] no longer used (was widthCalcMode)
|
|
1223
|
+
mouseEvents: j(e[15]),
|
|
1224
|
+
offsetHeight: G(e[16]),
|
|
1225
|
+
offsetWidth: G(e[17]),
|
|
1226
|
+
calculateHeight: j(e[18]),
|
|
1263
1227
|
key: e[19],
|
|
1264
1228
|
version: e[20],
|
|
1265
|
-
mode:
|
|
1229
|
+
mode: G(e[21]),
|
|
1266
1230
|
// sizeSelector: data[22] // Now only available via page settings
|
|
1267
|
-
logExpand:
|
|
1231
|
+
logExpand: j(e[23])
|
|
1268
1232
|
});
|
|
1269
|
-
function
|
|
1233
|
+
function Jr(e) {
|
|
1270
1234
|
const { mode: t } = i;
|
|
1271
1235
|
e.forEach((n) => {
|
|
1272
1236
|
try {
|
|
1273
1237
|
n();
|
|
1274
1238
|
} catch (o) {
|
|
1275
1239
|
if (t < 0) throw o;
|
|
1276
|
-
|
|
1240
|
+
w(
|
|
1277
1241
|
`<rb>Error in setup function</>
|
|
1278
1242
|
<i>iframe-resizer</> detected an error during setup.
|
|
1279
1243
|
|
|
1280
1244
|
Please report the following error message at <u>https://github.com/davidjbradshaw/iframe-resizer/issues</>`
|
|
1281
|
-
),
|
|
1245
|
+
), Xt(o);
|
|
1282
1246
|
}
|
|
1283
1247
|
});
|
|
1284
1248
|
}
|
|
1285
|
-
function
|
|
1249
|
+
function It(e) {
|
|
1286
1250
|
for (const [t, n] of Object.entries(e))
|
|
1287
1251
|
n !== void 0 && (i[t] = n);
|
|
1288
1252
|
}
|
|
1289
|
-
function
|
|
1253
|
+
function Kr({
|
|
1290
1254
|
logExpand: e,
|
|
1291
1255
|
logging: t,
|
|
1292
|
-
parentId: n
|
|
1256
|
+
parentId: n = ""
|
|
1293
1257
|
}) {
|
|
1294
|
-
|
|
1258
|
+
co({ id: n, enabled: t, expand: e }), h("initReceived"), l(`Initialising iframe v${K} ${window.location.href}`);
|
|
1295
1259
|
}
|
|
1296
|
-
function
|
|
1297
|
-
h("ready"),
|
|
1260
|
+
function Xr(e) {
|
|
1261
|
+
h("ready"), an(Yt(e)), l("Initialization complete", (({ key: t, key2: n, ...o }) => o)(i));
|
|
1298
1262
|
}
|
|
1299
|
-
function
|
|
1263
|
+
function ei({
|
|
1300
1264
|
bodyBackground: e,
|
|
1301
1265
|
bodyPadding: t,
|
|
1302
1266
|
inPageLinks: n,
|
|
1303
1267
|
onReady: o
|
|
1304
1268
|
}) {
|
|
1305
|
-
const s =
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
hs,
|
|
1318
|
-
s ? fe : ko,
|
|
1319
|
-
() => Zr(i),
|
|
1320
|
-
() => We("background", e),
|
|
1321
|
-
() => We("padding", t),
|
|
1322
|
-
s ? fe : si,
|
|
1323
|
-
Gr,
|
|
1269
|
+
const s = Ro(i), d = [
|
|
1270
|
+
$o,
|
|
1271
|
+
ko,
|
|
1272
|
+
Ho,
|
|
1273
|
+
ln,
|
|
1274
|
+
Wo,
|
|
1275
|
+
s ? ue : Oo,
|
|
1276
|
+
() => Cr(i),
|
|
1277
|
+
() => Ce("background", e),
|
|
1278
|
+
() => Ce("padding", t),
|
|
1279
|
+
s ? ue : Wr,
|
|
1280
|
+
Nr,
|
|
1324
1281
|
r.applySelectors,
|
|
1325
|
-
() =>
|
|
1326
|
-
|
|
1327
|
-
() =>
|
|
1328
|
-
|
|
1329
|
-
() =>
|
|
1282
|
+
() => Hr(n),
|
|
1283
|
+
Os,
|
|
1284
|
+
() => Xo(i),
|
|
1285
|
+
ns,
|
|
1286
|
+
() => Hs(),
|
|
1330
1287
|
() => M(
|
|
1331
|
-
|
|
1288
|
+
ye,
|
|
1332
1289
|
"Init message from host page",
|
|
1333
1290
|
void 0,
|
|
1334
1291
|
void 0,
|
|
1335
|
-
`${
|
|
1292
|
+
`${K}:${i.mode}`
|
|
1336
1293
|
),
|
|
1337
|
-
|
|
1338
|
-
|
|
1294
|
+
Ar,
|
|
1295
|
+
x
|
|
1339
1296
|
];
|
|
1340
|
-
|
|
1297
|
+
qo(i), Bo(i), Jr(d), Xr(o);
|
|
1341
1298
|
}
|
|
1342
|
-
function
|
|
1343
|
-
r.firstRun && (
|
|
1299
|
+
function ti(e) {
|
|
1300
|
+
r.firstRun && (It(Qr(e)), Kr(i), It(Zr()), r.applySelectors = Ir(i), ei(i));
|
|
1344
1301
|
}
|
|
1345
|
-
function
|
|
1302
|
+
function ni(e) {
|
|
1346
1303
|
if (document.readyState === "loading") {
|
|
1347
|
-
|
|
1304
|
+
l("Page not ready, ignoring init message");
|
|
1348
1305
|
return;
|
|
1349
1306
|
}
|
|
1350
|
-
const t = e.data.slice(
|
|
1351
|
-
r.target = e.source, r.origin = e.origin,
|
|
1307
|
+
const t = e.data.slice(Gt).split(pe);
|
|
1308
|
+
r.target = e.source, r.origin = e.origin, ti(t), r.firstRun = !1, setTimeout(() => {
|
|
1352
1309
|
r.initLock = !1;
|
|
1353
|
-
},
|
|
1310
|
+
}, qt);
|
|
1354
1311
|
}
|
|
1355
|
-
const { freeze:
|
|
1356
|
-
function
|
|
1357
|
-
const t =
|
|
1358
|
-
|
|
1312
|
+
const { freeze: oi } = Object, { parse: nt } = JSON, ot = (e) => oi(nt(e)), Rn = (e) => z(0, 0, `${e}Stop`), we = (e) => e.data.slice(e.data.indexOf(pe) + 1), si = (e) => ho(e) ? ye : e.data.split("]")[1].split(pe)[0];
|
|
1313
|
+
function ri(e) {
|
|
1314
|
+
const t = we(e);
|
|
1315
|
+
l("onMessage called from parent:%c", a, ot(t)), ze(i.onMessage, nt(t));
|
|
1359
1316
|
}
|
|
1360
|
-
function
|
|
1361
|
-
const { onPageInfo: t } = r, n =
|
|
1362
|
-
|
|
1317
|
+
function ii(e) {
|
|
1318
|
+
const { onPageInfo: t } = r, n = we(e);
|
|
1319
|
+
l("PageInfo received from parent:", ot(n)), t ? ze(t, nt(n)) : Rn(_n);
|
|
1363
1320
|
}
|
|
1364
|
-
function
|
|
1365
|
-
const { onParentInfo: t } = r, n =
|
|
1366
|
-
|
|
1321
|
+
function ci(e) {
|
|
1322
|
+
const { onParentInfo: t } = r, n = ot(we(e));
|
|
1323
|
+
l("ParentInfo received from parent:", n), t ? ze(t, n) : Rn(jt);
|
|
1367
1324
|
}
|
|
1368
|
-
function
|
|
1325
|
+
function ai() {
|
|
1369
1326
|
if (r.initLock) {
|
|
1370
|
-
|
|
1327
|
+
l("Page reset ignored by init");
|
|
1371
1328
|
return;
|
|
1372
1329
|
}
|
|
1373
|
-
|
|
1330
|
+
l("Page size reset by host page"), pn("resetPage");
|
|
1374
1331
|
}
|
|
1375
|
-
function
|
|
1376
|
-
|
|
1332
|
+
function li() {
|
|
1333
|
+
l("Resize requested by host page"), M(De, "Parent window requested size check");
|
|
1377
1334
|
}
|
|
1378
|
-
const
|
|
1379
|
-
init:
|
|
1380
|
-
reset:
|
|
1381
|
-
resize:
|
|
1382
|
-
moveToAnchor:
|
|
1383
|
-
inPageLink:
|
|
1335
|
+
const Nt = (e) => r.inPageLinks.findTarget(we(e)), Lt = {
|
|
1336
|
+
init: ni,
|
|
1337
|
+
reset: ai,
|
|
1338
|
+
resize: li,
|
|
1339
|
+
moveToAnchor: Nt,
|
|
1340
|
+
inPageLink: Nt,
|
|
1384
1341
|
// Backward compatibility
|
|
1385
|
-
pageInfo:
|
|
1386
|
-
parentInfo:
|
|
1387
|
-
message:
|
|
1342
|
+
pageInfo: ii,
|
|
1343
|
+
parentInfo: ci,
|
|
1344
|
+
message: ri
|
|
1388
1345
|
};
|
|
1389
|
-
function
|
|
1390
|
-
const { firstRun: t } = r, n =
|
|
1346
|
+
function ui(e) {
|
|
1347
|
+
const { firstRun: t } = r, n = si(e);
|
|
1391
1348
|
switch (h(n), !0) {
|
|
1392
1349
|
case n in Lt:
|
|
1393
1350
|
Lt[n](e);
|
|
1394
1351
|
break;
|
|
1395
|
-
case (t &&
|
|
1396
|
-
|
|
1352
|
+
case (t && mo()):
|
|
1353
|
+
H(
|
|
1397
1354
|
`Ignored message of type "${n}". Received before initialization.`
|
|
1398
1355
|
);
|
|
1399
1356
|
break;
|
|
1400
1357
|
default:
|
|
1401
|
-
|
|
1358
|
+
H(
|
|
1402
1359
|
`Unexpected message (${e.data}), this is likely due to a newer version of iframe-resizer running on the parent page.`
|
|
1403
1360
|
);
|
|
1404
1361
|
}
|
|
1405
1362
|
}
|
|
1406
|
-
const
|
|
1407
|
-
|
|
1363
|
+
const ie = We((e) => {
|
|
1364
|
+
fo(e) && ui(e);
|
|
1408
1365
|
});
|
|
1409
|
-
function
|
|
1366
|
+
function di() {
|
|
1410
1367
|
if ("iframeChildListener" in window) {
|
|
1411
|
-
|
|
1368
|
+
H("Already setup");
|
|
1412
1369
|
return;
|
|
1413
1370
|
}
|
|
1414
|
-
window.iframeChildListener = (t) =>
|
|
1371
|
+
window.iframeChildListener = ((t) => {
|
|
1372
|
+
setTimeout(() => ie({ data: t, sameOrigin: !0 }));
|
|
1373
|
+
}), h("listen"), C(window, $e, ie), C(document, Bt, ft), ft();
|
|
1415
1374
|
function e(t) {
|
|
1416
|
-
return
|
|
1375
|
+
return ie(t), r.win;
|
|
1417
1376
|
}
|
|
1418
1377
|
try {
|
|
1419
|
-
top?.document?.getElementById("banner") && (r.win = {}, window.mockMsgListener = e,
|
|
1378
|
+
top?.document?.getElementById("banner") && (r.win = {}, window.mockMsgListener = e, nn(window, $e, ie), typeof window.define == "function" && window.define([], () => e));
|
|
1420
1379
|
} catch {
|
|
1421
1380
|
}
|
|
1422
1381
|
}
|
|
1423
|
-
typeof window !==
|
|
1382
|
+
typeof window !== Wn && di();
|
|
1424
1383
|
//# sourceMappingURL=index.esm.js.map
|