powered-ad-config 0.1.5 → 0.1.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,909 +1,1154 @@
1
- const V = (x) => {
2
- const n = window.frameElement ? window.frameElement : null;
3
- if (!n) return () => {
4
- };
5
- const p = window.parent;
6
- if (!p || p === window) return () => {
7
- };
8
- let l = null;
9
- try {
10
- l = p.document, p.location.href;
11
- } catch {
12
- return () => {
13
- };
14
- }
15
- const a = {
16
- siteBackgroundColor: "#ffffff",
17
- fireplaceLeftMargin: 0,
18
- adNodeMarginTop: -24,
19
- adNodeMarginBottom: 24,
20
- responsiveScroll: -124,
21
- xPosHalfpage: 695,
22
- yPosHalfpage: 72,
23
- stickyMargin: { offset: 72, isSticky: !0 },
24
- zIndex: function() {
25
- const i = window.parent.document, m = (w, t) => w.forEach((e) => t.forEach(([c, h]) => e.style[c] = h));
26
- i.querySelector(".nk-demographics")?.setAttribute("style", "max-width:1190px;left:50%;transform:translate(-50%,0);"), i.querySelector(".nk-footer")?.setAttribute("style", "position:relative;max-width:1190px;left:50%;transform:translate(-50%,0);"), i.querySelector("article")?.setAttribute("style", "position:relative"), i.querySelector("#article")?.setAttribute("style", "position:relative"), i.querySelector("#VideoIndex")?.setAttribute("style", "position:relative"), i.querySelector("#Index")?.setAttribute("style", "position:relative"), i.querySelector(".show")?.setAttribute("style", "position:relative"), i.querySelector("#adspot-desktop-banner-7-below")?.setAttribute("style", "position:relative"), m(i.querySelectorAll(".column"), [["position", "relative"]]), m(i.querySelectorAll(".advert"), [["position", "relative"]]), m(i.querySelectorAll("blockquote"), [["zIndex", "1"]]), i.querySelector('div[class*="article__MyContainer"]')?.setAttribute("style", "max-width:1190px;margin-top:-24px"), i.querySelector('div[type="BANNER"]')?.setAttribute("style", "display:none"), i.querySelector('div[type="MBANNER"]')?.setAttribute("style", "display:none");
27
- }
28
- }, C = {
29
- siteBackgroundColor: "#ffffff",
30
- fireplaceLeftMargin: 0,
31
- adNodeMarginTop: -24,
32
- adNodeMarginBottom: 24,
33
- responsiveScroll: -124,
34
- xPosHalfpage: 695,
35
- yPosHalfpage: 32,
36
- stickyMargin: { offset: 32, isSticky: !0 },
37
- zIndex: function() {
38
- const i = window.parent.document, m = (w, t) => w.forEach((e) => t.forEach(([c, h]) => e.style[c] = h));
39
- i.querySelector(".nk-demographics")?.setAttribute("style", "max-width:1190px;left:50%;transform:translate(-50%,0);"), i.querySelector(".nk-footer")?.setAttribute("style", "position:relative;max-width:1190px;left:50%;transform:translate(-50%,0);"), i.querySelector("article")?.setAttribute("style", "position:relative"), i.querySelector("#article")?.setAttribute("style", "position:relative"), i.querySelector("#VideoIndex")?.setAttribute("style", "position:relative"), i.querySelector("#Index")?.setAttribute("style", "position:relative"), i.querySelector(".show")?.setAttribute("style", "position:relative"), m(i.querySelectorAll(".column"), [["position", "relative"]]), m(i.querySelectorAll(".advert"), [["position", "relative"]]), m(i.querySelectorAll("blockquote"), [["zIndex", "1"]]), i.querySelector('div[class^="component__StrapContainer"]')?.setAttribute("style", "position:relative"), i.querySelector('div[class*="ArticleContainer"]')?.setAttribute("style", "max-width:1190px;margin-top:24px"), i.querySelector('div[class*="MyContainer"]')?.setAttribute("style", "max-width:1190px;margin-top:24px");
40
- }
41
- }, r = {
42
- siteBackgroundColor: "#ffffff",
43
- fireplaceLeftMargin: 0,
44
- adNodeMarginTop: -25,
45
- adNodeMarginBottom: -13,
46
- responsiveScroll: -120,
47
- xPosHalfpage: 722,
48
- yPosHalfpage: 32,
49
- stickyMargin: { offset: 8, isSticky: !0 },
50
- zIndex: function() {
51
- const i = window.parent.document;
52
- if (i.querySelector('section[data-section="marketing-banner"]')?.setAttribute("style", "position:relative"), i.querySelector('div[data-testid="live-tv"]')?.parentNode?.setAttribute("style", "position:relative"), i.querySelector('div[data-contentunit-id="stan"]')?.parentNode?.setAttribute("style", "position:relative"), i.querySelector("small")?.setAttribute("style", "position:inherit"), i.querySelector('div[id*="tablet"][id*="takeover"]')) {
53
- let w = i.createElement("style");
54
- w.innerHTML = `
55
- div:has(#adspot-tablet-takeover-2-above) {
56
- position: static;
57
- }
58
- `, i.head.appendChild(w);
59
- }
60
- }
61
- }, f = {
62
- siteBackgroundColor: "#ffffff",
63
- fireplaceLeftMargin: 0,
64
- adNodeMarginTop: -24,
65
- adNodeMarginBottom: 0,
66
- responsiveScroll: -124,
67
- xPosHalfpage: 720,
68
- yPosHalfpage: 32,
69
- stickyMargin: { offset: 104, isSticky: !0 },
70
- zIndex: function() {
71
- const i = window.parent.document, w = i.querySelector("footer").previousElementSibling;
72
- if (w && w.tagName.toLowerCase() === "div" && (w.style.position = "relative"), i.querySelector('div[id*="tablet"][id*="takeover"]')) {
73
- let e = i.createElement("style");
74
- e.innerHTML = `
75
- div:has(#adspot-tablet-takeover-2-above) {
76
- position: static;
77
- }
78
- `, i.head.appendChild(e);
79
- }
80
- }
81
- }, q = {
82
- siteBackgroundColor: "#f7f7f7",
83
- fireplaceLeftMargin: 0,
84
- adNodeMarginTop: -25,
85
- adNodeMarginBottom: 0,
86
- responsiveScroll: -124,
87
- xPosHalfpage: 720,
88
- yPosHalfpage: 32,
89
- stickyMargin: { offset: 104, isSticky: !0 },
90
- zIndex: function() {
91
- const i = window.parent.document, m = (t, e) => t.forEach((c) => e.forEach(([h, o]) => c.style[h] = o));
92
- if (i.querySelector(".container--padded")?.setAttribute("style", "position:relative"), m(i.querySelectorAll(".advert"), [["position", "relative"]]), i.querySelector(".footer-netkit")?.setAttribute("style", "position:relative;max-width:1190px;left:50%;transform:translate(-50%,0);"), i.querySelector('div[type="BANNER"]')?.setAttribute("style", "display:none"), i.querySelector('div[type="MBANNER"]')?.setAttribute("style", "display:none"), i.querySelector('div[id*="sidepanel"][id*="above"]')?.setAttribute("style", "display:none"), i.querySelector('div[id*="tablet"][id*="takeover"]')) {
93
- let t = i.createElement("style");
94
- t.innerHTML = `
95
- div:has(#adspot-tablet-takeover-2-above) {
96
- position: static;
97
- }
98
- `, i.head.appendChild(t);
99
- }
100
- }
101
- }, v = {
102
- siteBackgroundColor: "#ffffff",
103
- fireplaceLeftMargin: 0,
104
- adNodeMarginTop: -32,
105
- adNodeMarginBottom: 18,
106
- responsiveScroll: -124,
107
- xPosHalfpage: 720,
108
- yPosHalfpage: 16,
109
- stickyMargin: { offset: 16, isSticky: !0 },
110
- zIndex: function() {
111
- const i = window.parent.document;
112
- i.querySelector(".header-wrapper")?.setAttribute("style", "height:124px"), i.querySelector(".weather-widget-wrapper")?.setAttribute("style", "bottom:0px"), i.querySelector(".content")?.setAttribute("style", "padding-top:32px"), i.querySelector(".layout")?.setAttribute("style", "position:relative;background-color:transparent;"), i.querySelector(".footer-ad")?.setAttribute("style", "position:relative"), i.querySelector(".footer-netkit")?.setAttribute("style", "position:relative;max-width:1190px;left:50%;transform:translate(-50%,0);");
113
- }
114
- }, N = [
115
- { site: "https://www.nine.com.au/sport", config: f },
116
- { site: "https://www.nine.com.au/product-reviews", config: C },
117
- { site: "https://www.nine.com.au/property", config: C },
118
- { site: "https://www.nine.com.au/entertainment", config: C },
119
- { site: "https://staging.nine.com.au/sport", config: f },
120
- { site: "https://staging.nine.com.au/product-reviews", config: C },
121
- { site: "https://staging.nine.com.au/property", config: C },
122
- { site: "https://staging.nine.com.au/entertainment", config: C },
123
- { site: "https://render-web-nine-staging-v1.ffxblue.com.au", config: r },
124
- { site: "https://render-web-nine-production-v1.ffxblue.com.au", config: r },
125
- { site: "https://preview.nine.com.au/", config: r },
126
- { site: "https://www.nine", config: r },
127
- { site: "https://staging.nine", config: r },
128
- { site: "https://entertainment", config: a },
129
- { site: "https://celebrity", config: a },
130
- { site: "https://homes", config: a },
131
- { site: "https://travel", config: a },
132
- { site: "https://honey", config: a },
133
- { site: "https://style", config: a },
134
- { site: "https://coach", config: a },
135
- { site: "https://kitchen", config: a },
136
- { site: "https://finance", config: a },
137
- { site: "https://wwos", config: q },
138
- { site: "https://staging.wwos", config: f },
139
- { site: "https://www.9news", config: v },
140
- { site: "https://staging.9news", config: v },
141
- { site: "https://www.yourtv", config: a },
142
- { site: "https://staging.yourtv", config: a },
143
- { site: "https://9now", config: C },
144
- { site: "https://creative-preview-an.com", config: a }
145
- ], I = () => {
146
- const i = window.document.getElementById("nineContent");
147
- i && (i.style.backgroundColor = d.siteBackgroundColor), b(), y(), p.addEventListener("scroll", P), g = setTimeout(P, 50);
148
- }, S = () => {
149
- let i = null;
150
- return i = l.querySelector('div[id*="billboard"][id*="above"]'), i;
151
- }, M = () => {
152
- const i = p.location.href;
153
- for (let m = 0; m < N.length; m += 1)
154
- if (i.indexOf(N[m].site) >= 0)
155
- return N[m].config;
156
- }, y = () => {
157
- if (!n) return;
158
- const i = n.style;
159
- i.width = "100%", i.height = "1000px", i.position = "fixed", i.left = "50%", i.transform = "translate(-50%, 0)";
160
- }, b = () => {
161
- if (!B) return;
162
- const i = B.style;
163
- B.className = "", i.minHeight = "250px", i.marginTop = d.adNodeMarginTop + "px", i.marginBottom = d.adNodeMarginBottom + "px", i.position = "static", i.display = "block", d.zIndex && d.zIndex();
164
- }, P = () => {
165
- const i = p.scrollY, m = n.style, w = document.getElementById("siteContent") ? document.getElementById("siteContent").style : {};
166
- i >= 0 && i <= k ? (m.transform = `translate(-50%, ${-i}px)`, w.transform = "translateY(0)") : i > k && i <= A ? (m.transform = `translate(-50%, ${-k}px)`, w.transform = `translateY(${k - i}px)`) : i > A && (m.transform = `translate(-50%, ${-k}px)`, w.transform = "translateY(-250px)");
167
- }, B = S(), d = M();
168
- if (!d) return () => {
169
- };
170
- let g = null;
171
- const k = -d.responsiveScroll + x, A = k + 250;
172
- return I(), () => {
173
- p.removeEventListener("scroll", P), g && (clearTimeout(g), g = null);
174
- };
175
- }, Y = (x) => {
176
- const n = window.frameElement ? window.frameElement : null;
177
- if (!n) return () => {
178
- };
179
- const p = window.parent;
180
- if (!p || p === window) return () => {
181
- };
182
- let l = null;
183
- try {
184
- l = p.document, p.location.href;
185
- } catch {
186
- return () => {
187
- };
188
- }
189
- const a = document.getElementById("nineMasthead"), C = a ? a.style : {};
190
- let r;
191
- const f = {
192
- siteBackgroundColor: "#ffffff",
193
- fireplaceLeftMargin: 0,
194
- adNodeMarginTop: -24,
195
- adNodeMarginBottom: 24,
196
- responsiveScroll: -124,
197
- xPosHalfpage: 722,
198
- yPosHalfpage: 72,
199
- stickyMargin: { offset: 160, isSticky: !0 },
200
- maskOffset: 298,
201
- zIndex: function() {
202
- const o = window.parent.document, s = (u, E) => u.forEach((T) => E.forEach(([H, L]) => T.style[H] = L));
203
- o.querySelector(".nk-demographics")?.setAttribute("style", "max-width:1190px;left:50%;transform:translate(-50%,0);"), o.querySelector(".nk-footer")?.setAttribute("style", "position:relative;max-width:1190px;left:50%;transform:translate(-50%,0);"), o.querySelector("article")?.setAttribute("style", "position:relative"), o.querySelector("#article")?.setAttribute("style", "position:relative"), o.querySelector("#VideoIndex")?.setAttribute("style", "position:relative"), o.querySelector("#Index")?.setAttribute("style", "position:relative"), o.querySelector(".show")?.setAttribute("style", "position:relative"), o.querySelector("#adspot-desktop-banner-7-below")?.setAttribute("style", "position:relative"), s(o.querySelectorAll(".column"), [["position", "relative"]]), s(o.querySelectorAll(".advert"), [["position", "relative"]]), s(o.querySelectorAll("blockquote"), [["zIndex", "1"]]), o.querySelector('div[type="BANNER"]')?.setAttribute("style", "display:none"), o.querySelector('div[type="MBANNER"]')?.setAttribute("style", "display:none");
204
- }
205
- }, q = {
206
- siteBackgroundColor: "#ffffff",
207
- fireplaceLeftMargin: 0,
208
- adNodeMarginTop: -24,
209
- adNodeMarginBottom: 0,
210
- responsiveScroll: -124,
211
- xPosHalfpage: 695,
212
- yPosHalfpage: 32,
213
- stickyMargin: { offset: 160, isSticky: !0 },
214
- maskOffset: window.parent.document.querySelector('div[class*="video-index__MyContainer"]') ? 248 : 298,
215
- zIndex: function() {
216
- const o = window.parent.document, s = (u, E) => u.forEach((T) => E.forEach(([H, L]) => T.style[H] = L));
217
- o.querySelector(".nk-demographics")?.setAttribute("style", "max-width:1190px;left:50%;transform:translate(-50%,0);"), o.querySelector(".nk-footer")?.setAttribute("style", "position:relative;max-width:1190px;left:50%;transform:translate(-50%,0);"), o.querySelector("article")?.setAttribute("style", "position:relative"), o.querySelector("#article")?.setAttribute("style", "position:relative"), o.querySelector("#VideoIndex")?.setAttribute("style", "position:relative"), o.querySelector("#Index")?.setAttribute("style", "position:relative"), o.querySelector(".show")?.setAttribute("style", "position:relative"), s(o.querySelectorAll(".column"), [["position", "relative"]]), s(o.querySelectorAll(".advert"), [["position", "relative"]]), s(o.querySelectorAll("blockquote"), [["zIndex", "1"]]), o.querySelector('div[class^="component__StrapContainer"]')?.setAttribute("style", "position:relative"), o.querySelector('div[class*="ArticleContainer"]')?.setAttribute("style", "max-width:1190px;margin-top:24px"), o.querySelector('div[class*="MyContainer"]')?.setAttribute("style", "max-width:1190px;margin-top:24px");
218
- }
219
- }, v = {
220
- siteBackgroundColor: "#ffffff",
221
- fireplaceLeftMargin: 0,
222
- adNodeMarginTop: -24,
223
- adNodeMarginBottom: -13,
224
- responsiveScroll: -120,
225
- xPosHalfpage: 722,
226
- yPosHalfpage: 32,
227
- stickyMargin: { offset: 166, isSticky: !0 },
228
- maskOffset: 304,
229
- zIndex: function() {
230
- const o = window.parent.document;
231
- if (o.querySelector('section[data-section="marketing-banner"]')?.setAttribute("style", "position:relative"), o.querySelector('div[data-testid="live-tv"]')?.parentNode?.setAttribute("style", "position:relative"), o.querySelector('div[data-contentunit-id="stan"]')?.parentNode?.setAttribute("style", "position:relative"), o.querySelector("small")?.setAttribute("style", "position:inherit"), o.querySelector('div[id*="tablet"][id*="takeover"]')) {
232
- let u = o.createElement("style");
233
- u.innerHTML = `
234
- div:has(#adspot-tablet-takeover-2-above) {
235
- position: static;
236
- }
237
- `, o.head.appendChild(u);
238
- }
239
- }
240
- }, N = {
241
- siteBackgroundColor: "#ffffff",
242
- fireplaceLeftMargin: 0,
243
- adNodeMarginTop: -24,
244
- adNodeMarginBottom: 0,
245
- responsiveScroll: -124,
246
- xPosHalfpage: 720,
247
- yPosHalfpage: 32,
248
- stickyMargin: { offset: 160, isSticky: !0 },
249
- maskOffset: 312,
250
- zIndex: function() {
251
- const o = window.parent.document, u = o.querySelector("footer").previousElementSibling;
252
- if (u && u.tagName.toLowerCase() === "div" && (u.style.position = "relative"), o.querySelector('div[id*="tablet"][id*="takeover"]')) {
253
- let T = o.createElement("style");
254
- T.innerHTML = `
255
- div:has(#adspot-tablet-takeover-2-above) {
256
- position: static;
257
- }
258
- `, o.head.appendChild(T);
259
- }
260
- }
261
- }, I = {
262
- siteBackgroundColor: "#ffffff",
263
- fireplaceLeftMargin: 0,
264
- adNodeMarginTop: -25,
265
- adNodeMarginBottom: 0,
266
- responsiveScroll: -124,
267
- xPosHalfpage: 720,
268
- yPosHalfpage: 32,
269
- stickyMargin: { offset: 175, isSticky: !0 },
270
- maskOffset: 274,
271
- zIndex: function() {
272
- const o = window.parent.document, s = (E, T) => E.forEach((H) => T.forEach(([L, D]) => H.style[L] = D));
273
- if (o.querySelector(".container--padded")?.setAttribute("style", "position:relative"), s(o.querySelectorAll(".advert"), [["position", "relative"]]), o.querySelector(".footer-netkit")?.setAttribute("style", "position:relative;max-width:1190px;left:50%;transform:translate(-50%,0);"), o.querySelector('div[type="BANNER"]')?.setAttribute("style", "display:none"), o.querySelector('div[type="MBANNER"]')?.setAttribute("style", "display:none"), o.querySelector('div[id*="sidepanel"][id*="above"]')?.setAttribute("style", "display:none"), o.querySelector(".score-strip")?.setAttribute("style", "display:none"), o.querySelector(".feed-header__breadcrumbs")?.setAttribute("style", "display:none"), o.querySelector(".layout.container")?.setAttribute("style", "padding:0"), o.querySelector(".empty-div")?.setAttribute("style", "display:none"), o.querySelector('div[id*="tablet"][id*="takeover"]')) {
274
- let E = o.createElement("style");
275
- E.innerHTML = `
276
- div:has(#adspot-tablet-takeover-2-above) {
277
- position: static;
278
- }
279
- `, o.head.appendChild(E);
280
- }
281
- }
282
- }, S = {
283
- siteBackgroundColor: "#ffffff",
284
- fireplaceLeftMargin: 0,
285
- adNodeMarginTop: -32,
286
- adNodeMarginBottom: 8,
287
- responsiveScroll: -124,
288
- xPosHalfpage: 720,
289
- yPosHalfpage: 16,
290
- stickyMargin: { offset: 160, isSticky: !0 },
291
- maskOffset: window.parent.document.querySelector('div[class*="VideoIndexComponent"]') ? 324 : 292,
292
- zIndex: function() {
293
- const o = window.parent.document;
294
- o.querySelector(".header-wrapper")?.setAttribute("style", "height:124px"), o.querySelector(".weather-widget-wrapper")?.setAttribute("style", "bottom:0px"), o.querySelector(".content")?.setAttribute("style", "padding-top:32px"), o.querySelector(".layout")?.setAttribute("style", "position:relative;background-color:transparent;"), o.querySelector(".footer-ad")?.setAttribute("style", "position:relative"), o.querySelector(".footer-netkit")?.setAttribute("style", "position:relative;max-width:1190px;left:50%;transform:translate(-50%,0);");
295
- const s = o.querySelector('[class*="VideoIndexComponent"]');
296
- s && (o.querySelector(".breadcrumbs")?.setAttribute("style", "display:none"), s.style.maxWidth = "1190px", s.style.margin = "auto", s.style.position = "relative");
297
- }
298
- }, M = [
299
- { site: "https://www.nine.com.au/sport", config: N },
300
- { site: "https://www.nine.com.au/product-reviews", config: q },
301
- { site: "https://www.nine.com.au/property", config: q },
302
- { site: "https://www.nine.com.au/entertainment", config: q },
303
- { site: "https://staging.nine.com.au/sport", config: N },
304
- { site: "https://staging.nine.com.au/product-reviews", config: q },
305
- { site: "https://staging.nine.com.au/property", config: q },
306
- { site: "https://staging.nine.com.au/entertainment", config: q },
307
- { site: "https://render-web-nine-staging-v1.ffxblue.com.au", config: v },
308
- { site: "https://render-web-nine-production-v1.ffxblue.com.au", config: v },
309
- { site: "https://preview.nine.com.au/", config: v },
310
- { site: "https://www.nine", config: v },
311
- { site: "https://staging.nine", config: v },
312
- { site: "https://entertainment", config: f },
313
- { site: "https://celebrity", config: f },
314
- { site: "https://homes", config: f },
315
- { site: "https://travel", config: f },
316
- { site: "https://honey", config: f },
317
- { site: "https://style", config: f },
318
- { site: "https://coach", config: f },
319
- { site: "https://kitchen", config: f },
320
- { site: "https://finance", config: f },
321
- { site: "https://wwos", config: I },
322
- { site: "https://staging.wwos", config: N },
323
- { site: "https://www.9news", config: S },
324
- { site: "https://staging.9news", config: S },
325
- { site: "https://www.yourtv", config: f },
326
- { site: "https://staging.yourtv", config: f },
327
- { site: "https://9now", config: q },
328
- { site: "https://creative-preview-an.com", config: f }
329
- ], y = () => {
330
- const o = window.document.getElementById("nineContent");
331
- o && (o.style.backgroundColor = t.siteBackgroundColor), a && (C.setProperty("--masthead-height", "250px"), C.height = "var(--masthead-height)"), g(), d(), P(), k(), p.addEventListener("scroll", m, { passive: !0 }), e = setTimeout(m, 50);
332
- }, b = () => {
333
- let o = null;
334
- return o = l.querySelector('div[id*="billboard"][id*="above"]'), o;
335
- }, P = () => {
336
- let o = null;
337
- if (!window.parent) return o;
338
- if (o = l.querySelector('div[id*="halfpage"][id*="above"]'), !o) return;
339
- let s = o;
340
- for (let u = 0; u < 3; u++)
341
- if (s = s.parentNode, s && getComputedStyle(s).position === "sticky") {
342
- s.setAttribute("style", `top: ${t.stickyMargin.offset}px`);
343
- break;
344
- }
345
- }, B = () => {
346
- const o = p.location.href;
347
- for (let s = 0; s < M.length; s += 1)
348
- if (o.indexOf(M[s].site) >= 0)
349
- return M[s].config;
350
- }, d = () => {
351
- if (!n) return;
352
- const o = n.style;
353
- o.width = "100%", o.height = "1000px", o.position = "fixed", o.left = "50%", o.setProperty("--transform-y", "0px"), o.transform = "translate3d(-50%, var(--transform-y), 0)";
354
- }, g = () => {
355
- if (!w) return;
356
- const o = w.style;
357
- w.className = "", o.minHeight = "250px", o.marginTop = t.adNodeMarginTop + "px", o.marginBottom = t.adNodeMarginBottom + "px", o.position = "static", o.display = "block", t.zIndex && t.zIndex();
358
- }, k = () => {
359
- r = l.querySelector('div[data-contentunit-id="stan"]')?.parentNode || l.querySelector('div[data-ui-testid="header-score-strip"]')?.parentNode || l.querySelector('div[class*="__MyContainer"]') || l.querySelector('div[class*="__ArticleContainer"]') || l.querySelector('div[class*="__VideoIndexComponent"]') || l.querySelector("div.container.layout") || l.querySelector("main.container.layout"), r && (r.style.willChange = "clip-path", r.style.transition = "none", r.style.webkitBackfaceVisibility = "hidden", r.style.backfaceVisibility = "hidden", r.style.transform = "translate3d(0,0,0)", r.style.backgroundColor = t.siteBackgroundColor, r.style.setProperty("--mask-inset", "0px"), r.style.clipPath = "inset(var(--mask-inset, 0px) 0 0 0)");
360
- };
361
- let A = 0, i = 0;
362
- const m = () => {
363
- const o = p.scrollY, s = o > A, u = o > h ? o - t.maskOffset : 0, E = Math.abs(u - i);
364
- if (r)
365
- if (s && u > i)
366
- if (E > 100) {
367
- const T = Math.max(0, u - 100);
368
- r.style.transition = "none", r.style.setProperty("--mask-inset", `${T}px`), r.offsetHeight, r.style.transition = "clip-path 0.3s ease-out", r.style.setProperty("--mask-inset", `${u}px`);
369
- } else
370
- r.style.transition = "clip-path 0.3s ease-out", r.style.setProperty("--mask-inset", `${u}px`);
371
- else
372
- r.style.transition = "none", r.style.setProperty("--mask-inset", `${u}px`);
373
- A = o, i = u, o > h ? (n.style.setProperty("--transform-y", `${-c}px`), C.setProperty("--masthead-height", "100px"), window.CollantOn || window.goCollant()) : o > c && o <= h ? (n.style.setProperty("--transform-y", `${-c}px`), C.setProperty("--masthead-height", `${250 + c - o}px`), window.CollantOn && window.goBillboard()) : o >= 0 && o <= c && (n.style.setProperty("--transform-y", `${-o}px`), C.setProperty("--masthead-height", "250px"), window.CollantOn && window.goBillboard());
374
- }, w = b(), t = B();
375
- if (!t) return () => {
376
- };
377
- let e = null;
378
- const c = -t.responsiveScroll + x, h = c + 150;
379
- return y(), () => {
380
- p.removeEventListener("scroll", m), e && (clearTimeout(e), e = null);
381
- };
382
- }, U = (x, n, p) => {
383
- const l = window.frameElement ? window.frameElement : null;
384
- if (!l) return () => {
385
- };
386
- const a = window.parent;
387
- if (!a || a === window) return () => {
388
- };
389
- let C = null;
390
- try {
391
- C = a.document, a.location.href;
392
- } catch {
393
- return () => {
394
- };
395
- }
396
- const r = {
397
- siteBackgroundColor: "#ffffff",
398
- logoTop: "44px",
399
- logoLeft: "50%",
400
- logoTransform: "translateX(-50%)",
401
- logoSmallLeft: "250px",
402
- logoSmallTransform: "translateX(0px)",
403
- logoSmallFilter: "none",
404
- zIndex: function() {
405
- const t = window.parent.document, e = (c, h) => c.forEach((o) => h.forEach(([s, u]) => o.style[s] = u));
406
- t.querySelector(".container--padded")?.setAttribute("style", "position:relative"), e(t.querySelectorAll(".advert"), [["position", "relative"]]), t.querySelector(".footer-netkit")?.setAttribute("style", "position:relative;max-width:1190px;left:50%;transform:translate(-50%,0);"), t.querySelector('div[type="BANNER"]')?.setAttribute("style", "display:none"), t.querySelector('div[type="MBANNER"]')?.setAttribute("style", "display:none"), t.querySelector('div[id*="sidepanel"][id*="above"]')?.setAttribute("style", "display:none");
407
- }
408
- }, f = {
409
- siteBackgroundColor: "#ffffff",
410
- logoTop: "44px",
411
- logoLeft: "50%",
412
- logoTransform: "translateX(-50%)",
413
- logoSmallLeft: "50%",
414
- logoSmallTransform: "translateX(-50%)",
415
- logoSmallFilter: "none",
416
- zIndex: function() {
417
- const t = window.parent.document, e = (c, h) => c.forEach((o) => h.forEach(([s, u]) => o.style[s] = u));
418
- t.querySelector(".nk-demographics")?.setAttribute("style", "max-width:1190px;left:50%;transform:translate(-50%,0);"), t.querySelector(".nk-footer")?.setAttribute("style", "position:relative;max-width:1190px;left:50%;transform:translate(-50%,0);"), t.querySelector("article")?.setAttribute("style", "position:relative"), t.querySelector("#article")?.setAttribute("style", "position:relative"), t.querySelector("#VideoIndex")?.setAttribute("style", "position:relative"), t.querySelector("#Index")?.setAttribute("style", "position:relative"), t.querySelector(".show")?.setAttribute("style", "position:relative"), e(t.querySelectorAll(".column"), [["position", "relative"]]), e(t.querySelectorAll(".advert"), [["position", "relative"]]), e(t.querySelectorAll("blockquote"), [["zIndex", "1"]]), t.querySelector('div[class*="article__MyContainer"]')?.setAttribute("style", "max-width:1190px;margin-top:-24px"), t.querySelector('div[type="BANNER"]')?.setAttribute("style", "display:none"), t.querySelector('div[type="MBANNER"]')?.setAttribute("style", "display:none"), t.querySelector('div[id*="sidepanel"][id*="above"]')?.setAttribute("style", "display:none");
419
- }
420
- }, q = {
421
- siteBackgroundColor: "#ffffff",
422
- logoTop: "44px",
423
- logoLeft: "50%",
424
- logoTransform: "translateX(-50%)",
425
- logoSmallLeft: "50%",
426
- logoSmallTransform: "translateX(-50%)",
427
- logoSmallFilter: "none",
428
- zIndex: function() {
429
- const t = window.parent.document, e = (c, h) => c.forEach((o) => h.forEach(([s, u]) => o.style[s] = u));
430
- t.querySelector(".nk-demographics")?.setAttribute("style", "max-width:1190px;left:50%;transform:translate(-50%,0);"), t.querySelector(".nk-footer")?.setAttribute("style", "position:relative;max-width:1190px;left:50%;transform:translate(-50%,0);"), t.querySelector("article")?.setAttribute("style", "position:relative"), t.querySelector("#article")?.setAttribute("style", "position:relative"), t.querySelector("#VideoIndex")?.setAttribute("style", "position:relative"), t.querySelector("#Index")?.setAttribute("style", "position:relative"), t.querySelector(".show")?.setAttribute("style", "position:relative"), e(t.querySelectorAll(".column"), [["position", "relative"]]), e(t.querySelectorAll(".advert"), [["position", "relative"]]), e(t.querySelectorAll("blockquote"), [["zIndex", "1"]]), t.querySelector('div[class^="component__StrapContainer"]')?.setAttribute("style", "position:relative"), t.querySelector('section[class^="WatchNow__Container"]')?.setAttribute("style", "margin-left:calc(50% - 49vw);margin-right:calc(50% - 49vw + 10px);"), t.querySelector('div[class*="ArticleContainer"]')?.setAttribute("style", "max-width:1190px;margin-top:0px"), t.querySelector('div[type="BANNER"]')?.setAttribute("style", "display:none"), t.querySelector('div[type="MBANNER"]')?.setAttribute("style", "display:none"), t.querySelector('div[id*="sidepanel"][id*="above"]')?.setAttribute("style", "display:none");
431
- }
432
- }, v = {
433
- siteBackgroundColor: "#ffffff",
434
- logoTop: "44px",
435
- logoLeft: "50%",
436
- logoTransform: "translateX(-50%)",
437
- logoSmallLeft: "50%",
438
- logoSmallTransform: "translateX(-50%)",
439
- logoSmallFilter: "none",
440
- zIndex: function() {
441
- const t = window.parent.document, e = (c, h) => c.forEach((o) => h.forEach(([s, u]) => o.style[s] = u));
442
- t.querySelector('section[data-section="marketing-banner"]')?.setAttribute("style", "position:relative"), t.querySelector(".container--ads")?.setAttribute("style", "min-height:0"), t.getElementById("mastheadAnchorToggle")?.setAttribute("style", "display:none"), e(t.querySelectorAll(".advert"), [["position", "relative"]]), e(t.querySelectorAll("iframe"), [["position", "relative"]]), t.querySelector('div[data-testid="live-tv"]')?.parentNode?.setAttribute("style", "position:relative"), t.querySelector('div[data-contentunit-id="stan"]')?.parentNode?.setAttribute("style", "position:relative"), e(t.querySelectorAll("small"), [["position", "relative"]]), t.querySelector("small")?.setAttribute("style", "position:inherit"), t.querySelector('div[type="BANNER"]')?.setAttribute("style", "display:none"), t.querySelector('div[type="MBANNER"]')?.setAttribute("style", "display:none"), t.querySelector('div[id*="sidepanel"][id*="above"]')?.setAttribute("style", "display:none");
443
- }
444
- }, N = {
445
- siteBackgroundColor: "#ffffff",
446
- logoTop: "-148px",
447
- logoLeft: "50%",
448
- logoTransform: "translateX(-50%)",
449
- logoSmallLeft: "50%",
450
- logoSmallTransform: "translateX(-50%)",
451
- logoSmallFilter: "none",
452
- zIndex: function() {
453
- const t = window.parent.document, e = (c, h) => c.forEach((o) => h.forEach(([s, u]) => o.style[s] = u));
454
- t.querySelector(".container--padded")?.setAttribute("style", "position:relative"), e(t.querySelectorAll(".advert"), [["position", "relative"]]), t.querySelector(".footer-netkit")?.setAttribute("style", "position:relative;max-width:1190px;left:50%;transform:translate(-50%,0);"), t.querySelector('div[type="BANNER"]')?.setAttribute("style", "display:none"), t.querySelector('div[type="MBANNER"]')?.setAttribute("style", "display:none"), t.querySelector('div[id*="sidepanel"][id*="above"]')?.setAttribute("style", "display:none");
455
- }
456
- }, I = {
457
- siteBackgroundColor: "#ffffff",
458
- logoTop: "44px",
459
- logoLeft: "50%",
460
- logoTransform: "translateX(-50%)",
461
- logoSmallLeft: "50%",
462
- logoSmallTransform: "translateX(-50%)",
463
- logoSmallFilter: "invert(1)",
464
- zIndex: function() {
465
- const t = window.parent.document;
466
- t.querySelector(".header-wrapper")?.setAttribute("style", "height:124px"), t.querySelector(".weather-widget-wrapper")?.setAttribute("style", "bottom:0px"), t.querySelector(".content")?.setAttribute("style", "padding-top:32px"), t.querySelector(".layout")?.setAttribute("style", "position:relative;background-color:transparent;"), t.querySelector(".footer-ad")?.setAttribute("style", "position:relative"), t.querySelector(".footer-netkit")?.setAttribute("style", "position:relative;max-width:1190px;left:50%;transform:translate(-50%,0);"), t.querySelector('div[type="BANNER"]')?.setAttribute("style", "display:none"), t.querySelector('div[type="MBANNER"]')?.setAttribute("style", "display:none"), t.querySelector('div[id*="sidepanel"][id*="above"]')?.setAttribute("style", "display:none");
467
- }
468
- }, S = [
469
- { site: "https://www.nine.com.au/sport", config: r },
470
- { site: "https://www.nine.com.au/product-reviews", config: q },
471
- { site: "https://www.nine.com.au/property", config: q },
472
- { site: "https://www.nine.com.au/entertainment", config: q },
473
- { site: "https://staging.nine.com.au/sport", config: r },
474
- { site: "https://staging.nine.com.au/product-reviews", config: q },
475
- { site: "https://staging.nine.com.au/property", config: q },
476
- { site: "https://staging.nine.com.au/entertainment", config: q },
477
- { site: "https://render-web-nine-staging-v1.ffxblue.com.au", config: v },
478
- { site: "https://render-web-nine-production-v1.ffxblue.com.au", config: v },
479
- { site: "https://preview.nine.com.au/", config: v },
480
- { site: "https://www.nine", config: v },
481
- { site: "https://staging.nine", config: v },
482
- { site: "https://entertainment", config: f },
483
- { site: "https://celebrity", config: f },
484
- { site: "https://homes", config: f },
485
- { site: "https://travel", config: f },
486
- { site: "https://honey", config: f },
487
- { site: "https://style", config: f },
488
- { site: "https://coach", config: f },
489
- { site: "https://kitchen", config: f },
490
- { site: "https://finance", config: f },
491
- { site: "https://wwos", config: N },
492
- { site: "https://staging.wwos", config: N },
493
- { site: "https://www.9news", config: I },
494
- { site: "https://staging.9news", config: I },
495
- { site: "https://www.yourtv", config: f },
496
- { site: "https://staging.yourtv", config: f },
497
- { site: "https://9now", config: q },
498
- { site: "https://creative-preview-an.com", config: f }
499
- ], M = () => {
500
- const t = window.document.getElementById("logo-small");
501
- t && (t.style.left = A.logoSmallLeft, t.style.transform = A.logoSmallTransform, t.style.filter = A.logoSmallFilter), B(), P(), a.addEventListener("scroll", g), i = setTimeout(g, 50);
502
- }, y = () => {
503
- let t = null;
504
- return t = C.querySelector('div[id*="desktop"][id*="takeover"][id*="above"]'), t;
505
- }, b = () => {
506
- const t = a.location.href;
507
- for (let e = 0; e < S.length; e += 1)
508
- if (t.indexOf(S[e].site) >= 0)
509
- return S[e].config;
510
- }, P = () => {
511
- if (!l) return;
512
- const t = l.style;
513
- t.width = "100%", t.height = `${n}px`, t.position = "relative";
514
- }, B = () => {
515
- if (!k) return;
516
- const t = k.style;
517
- t.maxHeight = `${n}px`, t.minHeight = `${n}px`, t.marginTop = "0px", t.marginBottom = "0px", t.position = "absolute", t.width = "1900px", t.top = A.logoTop, t.left = A.logoLeft, t.transform = A.logoTransform, t.zIndex = "10000", t.pointerEvents = "none", A.zIndex && A.zIndex();
518
- }, d = (t) => {
519
- if (!k) return;
520
- const e = k.style;
521
- t === "big" && !window.bigActive ? (e.maxHeight = `${n}px`, e.minHeight = `${n}px`, e.position = "absolute", e.top = A.logoTop, e.zIndex = "10000", window.loadBig()) : t === "small" && !window.smallActive && (e.maxHeight = `${p}px`, e.minHeight = `${p}px`, e.position = "fixed", e.top = "0px", e.zIndex = "100000", window.loadSmall());
522
- }, g = () => {
523
- const t = a.scrollY;
524
- l.style, t >= 0 && t <= m ? d("big") : t > m && (t > w ? d("small") : d("big"), w = t <= 0 ? 0 : t);
525
- }, k = y(), A = b();
526
- if (!A) return () => {
527
- };
528
- let i = null;
529
- const m = x;
530
- let w = 0;
531
- return M(), () => {
532
- a.removeEventListener("scroll", g), i && (clearTimeout(i), i = null);
533
- };
534
- }, X = (x) => {
535
- if (x === 0 || x === 1) return x;
536
- const n = 2 * Math.PI / 3;
537
- return Math.pow(2, -10 * x) * Math.sin((x * 10 - 0.75) * n) + 1;
538
- }, j = (x, n = 50) => `linear(${Array.from({ length: n + 1 }, (l, a) => x(a / n)).map((l) => +l.toFixed(4)).join(", ")})`, G = j(X), K = (x = {}) => {
539
- const n = {
540
- // Ad scroll zone
541
- // How tall the ad container is — controls how long the ad stays in view.
542
- // 100vh = scrolls away after one viewport height; 200vh = twice as long, etc.
543
- adScrollHeight: "300vh",
544
- // Band dimensions
545
- bandHeight: 24,
546
- // px height of both bands
547
- // Band colours
548
- bandBg: "#222",
549
- // band background colour
550
- bandColor: "#fff",
551
- // band text colour
552
- // Band typography
553
- bandFontSize: "10px",
554
- bandFontFamily: "Arial, Helvetica, sans-serif",
555
- bandLetterSpacing: "1px",
556
- // Band labels
557
- labelTop: "Advertisement",
558
- labelBottomResume: "Scroll to continue",
559
- // shown from 0–20% ad progress
560
- labelBottomMid: "Keep scrolling",
561
- // shown from 20–75% ad progress
562
- labelBottomLate: "Almost there",
563
- // shown from 75%+ ad progress
564
- labelBottomNow: "Content now ↓",
565
- // shown when ad has cleared
566
- // Progress bar (inside bottom band)
567
- // Set to null or '' to disable the progress bar and fall back to text only.
568
- progressBarColor: "rgba(255,255,255,0.35)",
569
- // fill colour; sits above band background
570
- // Band z-index (should sit below page header)
571
- zIndexTop: 9,
572
- zIndexBottom: 8,
573
- // Bottom band visibility thresholds
574
- // How many px the ad container must travel past the viewport bottom before
575
- // the bottom band appears (on scroll down / reveal).
576
- bottomBandShowAt: 400,
577
- // How many px the container must scroll back above the viewport bottom before
578
- // the bottom band hides again (on scroll up). Should be less than bottomBandShowAt
579
- // to create a hysteresis gap and prevent flickering.
580
- bottomBandHideAt: 300,
581
- // Stretch animation
582
- snapPx: 50,
583
- // gap (px) at which the elastic snap fires
584
- snapOverlap: 2,
585
- // px fires the snap this many px early (trigger timing)
586
- stretchOverlap: 20,
587
- // px offsets the touchpoint this many px early, so the
588
- // stretch animation begins before the band reaches the viewport bottom
589
- snapDuration: 0.9,
590
- // seconds for the snap return
591
- // CSS timing function for the snap — any valid CSS transition-timing-function.
592
- // Default: easeOutElastic encoded as a CSS linear() function (50-point sample).
593
- // See: https://developer.mozilla.org/en-US/blog/custom-easing-in-css-with-linear/
594
- snapEase: G,
595
- // ── Scroll callbacks ───────────────────────────────────────────
596
- // Called once when the ad starts to reveal (top band visible, ad beginning to scroll).
597
- onEnter: null,
598
- // Called once when the ad has fully scrolled past (post-ad content in view).
599
- onExit: null,
600
- // Called on every scroll event while the page is in range of the ad.
601
- // Receives a state object: { scrollProgress, adExposure, viewportCoverage, pxRemaining }
602
- onProgress: null,
603
- // Threshold triggers keyed to scrollProgress (0–1).
604
- // onEnter fires when scrolling forward past `at`; onLeave fires when scrolling back.
605
- // Example: [{ at: 0.2, onEnter: () => playVideo(), onLeave: () => pauseVideo() }]
606
- thresholds: [],
607
- // Merge caller-supplied options (overrides any default above)
608
- ...x
609
- }, p = window.frameElement ? window.frameElement : null;
610
- if (!p) return () => {
611
- };
612
- const l = window.parent;
613
- if (!l || l === window) return () => {
614
- };
615
- let a = null;
616
- try {
617
- a = l.document, l.location.href;
618
- } catch {
619
- return () => {
620
- };
621
- }
622
- const r = (() => {
623
- const t = a.querySelector("#adspot-mobile-mobile-3-above");
624
- if (t) return t;
625
- let e = p.parentElement;
626
- for (; e && e !== a.body; ) {
627
- if (e.id && e.id.includes("adspot")) return e;
628
- e = e.parentElement;
629
- }
630
- return p.parentElement;
631
- })();
632
- if (!r) return () => {
633
- };
634
- const f = r.getAttribute("style"), q = p.getAttribute("style"), v = [], N = {
635
- width: "100vw",
636
- marginLeft: "calc(50% - 50vw)",
637
- height: n.bandHeight + "px",
638
- backgroundColor: n.bandBg,
639
- color: n.bandColor,
640
- fontSize: n.bandFontSize,
641
- fontFamily: n.bandFontFamily,
642
- textTransform: "uppercase",
643
- letterSpacing: n.bandLetterSpacing,
644
- display: "flex",
645
- alignItems: "center",
646
- justifyContent: "center",
647
- pointerEvents: "none"
648
- };
649
- (() => {
650
- const t = r.style;
651
- t.height = n.adScrollHeight, t.maxHeight = n.adScrollHeight, t.position = "relative", r.setAttribute("poweredAC", "0.1.5"), t.clipPath = `inset(-${n.bandHeight - 1}px 0 0 0)`, t.overflow = "visible", t.width = "100vw", t.maxWidth = "100vw", t.marginLeft = "calc(50% - 50vw)", t.marginRight = "0", t.marginTop = "0", t.marginBottom = "0", t.padding = "0";
652
- let e = r.parentElement;
653
- for (let E = 0; E < 6 && e && e !== a.body; E++) {
654
- const T = l.getComputedStyle(e);
655
- let H = !1;
656
- (T.overflow === "hidden" || T.overflowY === "hidden") && (v.push({ el: e, prop: "overflow", val: e.style.overflow }), v.push({ el: e, prop: "overflowY", val: e.style.overflowY }), e.style.overflow = "visible", e.style.overflowY = "visible", H = !0);
657
- const L = parseFloat(T.height);
658
- T.height !== "auto" && !isNaN(L) && L < 600 && (v.push({ el: e, prop: "height", val: e.style.height }), e.style.height = "auto", H = !0);
659
- const D = T.maxHeight;
660
- if (D && D !== "none" && (v.push({ el: e, prop: "maxHeight", val: e.style.maxHeight }), e.style.maxHeight = "none", H = !0), !H && E > 1) break;
661
- e = e.parentElement;
662
- }
663
- const c = p.style;
664
- c.position = "fixed", c.top = "0", c.left = "0", c.width = "100vw", c.height = "100vh", c.maxWidth = "100vw", c.margin = "0", c.padding = "0", c.border = "none", c.zIndex = "1";
665
- const h = a.createElement("div");
666
- h.id = "interscroller-top-band-wrapper", Object.assign(h.style, {
667
- position: "sticky",
668
- bottom: "0",
669
- width: "100vw",
670
- marginLeft: "calc(50% - 50vw)",
671
- zIndex: n.zIndexTop,
672
- pointerEvents: "none"
673
- });
674
- const o = a.createElement("div");
675
- o.id = "interscroller-top-band", o.textContent = n.labelTop, Object.assign(o.style, N, {
676
- position: "relative",
677
- // wrapper is the sticky anchor
678
- width: "100%",
679
- // wrapper handles the full-bleed breakout
680
- marginLeft: "0",
681
- transformOrigin: "top center"
682
- }), h.appendChild(o), r.insertAdjacentElement("beforebegin", h);
683
- const s = a.createElement("div");
684
- s.id = "interscroller-bottom-band", Object.assign(s.style, N, {
685
- position: "fixed",
686
- // stays fixed; transform slides it in/out
687
- bottom: "0",
688
- left: "0",
689
- zIndex: n.zIndexBottom,
690
- display: "flex",
691
- // always rendered — no display toggling
692
- overflow: "hidden",
693
- // clips the progress fill to the band bounds
694
- transform: "translateY(100%)",
695
- // starts off-screen below viewport
696
- transition: "none"
697
- // no animation on first paint
698
- });
699
- const u = a.createElement("span");
700
- if (u.id = "interscroller-bottom-label", u.textContent = n.labelBottomResume, u.style.cssText = "position:relative;z-index:1;pointer-events:none;", s.appendChild(u), n.progressBarColor) {
701
- const E = a.createElement("span");
702
- E.id = "interscroller-bottom-progress", E.style.cssText = [
703
- "position:absolute",
704
- "inset:0",
705
- "width:0%",
706
- `background:${n.progressBarColor}`,
707
- "transition:none",
708
- "z-index:0",
709
- "pointer-events:none"
710
- ].join(";"), s.appendChild(E);
711
- }
712
- r.after(s);
713
- })();
714
- const S = a.querySelector("#interscroller-top-band"), M = a.querySelector("#interscroller-top-band-wrapper"), y = a.querySelector("#interscroller-bottom-band"), b = a.querySelector("#interscroller-bottom-label"), P = a.querySelector("#interscroller-bottom-progress"), B = n.bandHeight, d = n.snapPx;
715
- let g = !1, k = !1, A = !1, i = !1;
716
- const m = (n.thresholds || []).map(() => !1), w = () => {
717
- if (!y) return;
718
- const t = r.getBoundingClientRect(), e = l.innerHeight, c = t.top <= e, h = t.bottom <= e - B, o = i ? t.top <= e - n.bottomBandHideAt : t.top <= e - n.bottomBandShowAt, s = r.offsetHeight, u = Math.min(1, Math.max(0, (e - t.top) / (s + e))), E = Math.min(1, Math.max(0, (e - t.top) / (s + B))), T = Math.min(1, Math.max(0, (e - t.top) / s)), H = Math.min(t.bottom, e) - Math.max(t.top - B, 0), L = Math.min(1, Math.max(0, H / e)), D = Math.max(0, Math.round(t.bottom - e));
719
- !k && c && n.onEnter && n.onEnter(), !A && h && n.onExit && n.onExit(), k = c, A = h, i = o, n.onProgress && n.onProgress({ scrollProgress: u, adExposure: T, viewportCoverage: L, pxRemaining: D }), (n.thresholds || []).forEach((z, W) => {
720
- const O = m[W], F = u >= z.at;
721
- !O && F ? (m[W] = !0, z.onEnter && z.onEnter(u)) : O && !F && (m[W] = !1, z.onLeave && z.onLeave(u));
722
- });
723
- const R = e;
724
- if (S && t.top <= R + n.stretchOverlap && !h) {
725
- const z = R - t.top;
726
- if (!g && z <= d - n.snapOverlap) {
727
- const W = 1 + Math.max(0, z + n.stretchOverlap) / B;
728
- S.style.transition = "none", S.style.transform = `scaleY(${W})`;
729
- } else !g && z > d - n.snapOverlap && (g = !0, S.style.transition = `transform ${n.snapDuration}s ${n.snapEase}`, S.style.transform = "scaleY(1)");
730
- } else S && t.top > R + n.stretchOverlap && (g = !1, S.style.transition = "none", S.style.transform = "scaleY(1)");
731
- const $ = l.visualViewport ? Math.round(l.innerHeight - (l.visualViewport.offsetTop + l.visualViewport.height)) : 0;
732
- h ? (y.style.transition = "none", y.style.transform = "none", y.style.position = "sticky", y.style.top = "0", y.style.bottom = "", y.style.left = "", y.style.marginLeft = "calc(50% - 50vw)", y.style.width = "100vw", b && (b.textContent = n.labelBottomNow), P && (P.style.width = "100%")) : o ? (b && (b.textContent = D > 0 ? E < 0.2 ? n.labelBottomResume : E < 0.75 ? n.labelBottomMid : n.labelBottomLate : n.labelBottomNow), P && (P.style.width = `${Math.round(E * 100)}%`), y.style.transition = "transform 0.3s ease", y.style.transform = "translateY(0)", y.style.position = "fixed", y.style.bottom = `${$}px`, y.style.top = "", y.style.left = "0", y.style.marginLeft = "0", y.style.width = "100vw") : (y.style.transition = "transform 0.3s ease", y.style.transform = "translateY(100%)", y.style.position = "fixed", y.style.bottom = `${$}px`, y.style.left = "0", y.style.marginLeft = "0", y.style.width = "100vw");
733
- };
734
- return w(), l.addEventListener("scroll", w, { passive: !0 }), l.visualViewport?.addEventListener("resize", w, { passive: !0 }), () => {
735
- l.removeEventListener("scroll", w), l.visualViewport?.removeEventListener("resize", w), M ? M.remove() : S && S.remove(), y && y.remove(), f ? r.setAttribute("style", f) : r.removeAttribute("style"), q ? p.setAttribute("style", q) : p.removeAttribute("style"), v.forEach(({ el: t, prop: e, val: c }) => {
736
- t.style[e] = c || "";
737
- });
738
- };
739
- }, J = (x = {}) => {
740
- const n = {
741
- // Adaptation dimensions
742
- adaptToWidth: "100%",
743
- // target width — '100%' | '100vw' | px string | false
744
- maxWidth: "400px",
745
- // CSS max-width cap — px string | false
746
- maintainAspectRatio: !0,
747
- // auto-compute height from original slot ratio
748
- adaptToHeight: !1,
749
- // explicit height — ignored when maintainAspectRatio:true
750
- // Stacking
751
- zIndex: 7,
752
- // Callback — fired once the slot dimensions have settled
753
- onAdapt: null,
754
- // Merge caller-supplied options
755
- ...x
756
- }, p = window.frameElement ?? null;
757
- if (!p) return () => {
758
- };
759
- const l = window.parent;
760
- if (!l || l === window) return () => {
761
- };
762
- let a = null;
763
- try {
764
- a = l.document, l.location.href;
765
- } catch {
766
- return () => {
767
- };
768
- }
769
- const r = (() => {
770
- const d = a.querySelector("#adspot-mobile-mbanner-2-above");
771
- if (d) return d;
772
- let g = p.parentElement;
773
- for (; g && g !== a.body; ) {
774
- if (g.id && g.id.includes("adspot")) return g;
775
- g = g.parentElement;
776
- }
777
- return p.parentElement;
778
- })();
779
- if (!r) return () => {
780
- };
781
- const f = r.getAttribute("style"), q = p.getAttribute("style"), v = p.parentElement !== r ? p.parentElement : null, N = v ? v.getAttribute("style") : null, I = r.parentElement, S = I ? l.getComputedStyle(I).paddingTop : null, M = parseInt(p.getAttribute("width"), 10) || 320, y = parseInt(p.getAttribute("height"), 10) || 50, b = () => {
782
- const d = r.style;
783
- if (d.position = "relative", d.overflow = "visible", d.boxSizing = "border-box", r.setAttribute("poweredAC", "0.1.5"), v) {
784
- const k = v.style;
785
- k.width = "100%", k.height = "100%", k.margin = "0", k.textAlign = "left";
786
- }
787
- const g = p.style;
788
- g.display = "block", g.width = "100%", g.height = "100%", g.border = "none", g.margin = "0", g.padding = "0";
789
- }, P = () => {
790
- const d = r.style;
791
- d.zIndex = String(n.zIndex), n.adaptToWidth && (d.width = n.adaptToWidth, d.maxWidth = n.maxWidth || n.adaptToWidth, n.maxWidth && n.adaptToWidth !== "100vw" && !n.adaptToWidth.endsWith("vw") ? (d.marginLeft = "auto", d.marginRight = "auto") : (n.adaptToWidth === "100vw" || n.adaptToWidth.endsWith("vw")) && (d.marginLeft = "calc(50% - 50vw)", d.marginRight = "0")), I && S && S !== "0px" && (I.style.paddingTop = "0"), n.maintainAspectRatio ? l.requestAnimationFrame(() => {
792
- const k = r.offsetWidth || M, i = Math.round(k * (y / M));
793
- r.style.height = i + "px", v && (v.style.height = i + "px"), p.style.height = i + "px", n.onAdapt && n.onAdapt();
794
- }) : (n.adaptToHeight && (d.height = n.adaptToHeight), n.onAdapt && n.onAdapt());
795
- };
796
- return b(), P(), () => {
797
- f ? r.setAttribute("style", f) : r.removeAttribute("style"), q ? p.setAttribute("style", q) : p.removeAttribute("style"), v && (N ? v.setAttribute("style", N) : v.removeAttribute("style")), I && S && S !== "0px" && (I.style.paddingTop = S);
798
- };
799
- }, Q = (x = {}) => {
800
- const n = {
801
- billboardHeight: 150,
802
- sideStripWidth: 10,
803
- zIndex: 0,
804
- onAdapt: null,
805
- ...x
806
- }, p = window.frameElement ?? null;
807
- if (!p) return () => {
808
- };
809
- const l = window.parent;
810
- if (!l || l === window) return () => {
811
- };
812
- let a = null;
813
- try {
814
- a = l.document, l.location.href;
815
- } catch {
816
- return () => {
817
- };
818
- }
819
- const r = (() => {
820
- const t = a.querySelector("#adspot-mobile-mbanner-2-above");
821
- if (t) return t;
822
- let e = p.parentElement;
823
- for (; e && e !== a.body; ) {
824
- if (e.id && e.id.includes("adspot")) return e;
825
- e = e.parentElement;
826
- }
827
- return p.parentElement;
828
- })();
829
- if (!r) return () => {
830
- };
831
- const f = {
832
- nine: {
833
- siteBackgroundColor: "#ffffff",
834
- setup(t, e) {
835
- t.querySelector("main")?.style.setProperty("position", "relative");
836
- const c = e?.parentElement?.nextElementSibling;
837
- c && c.tagName !== "HEADER" && (c.style.paddingTop = "0px");
838
- }
839
- },
840
- wwos: {
841
- siteBackgroundColor: "#ffffff",
842
- setup(t, e) {
843
- t.querySelector("main")?.style.setProperty("position", "relative");
844
- const c = e?.parentElement?.nextElementSibling;
845
- c && c.tagName !== "HEADER" && (c.style.paddingTop = "0px");
846
- }
847
- },
848
- nineNews: {
849
- siteBackgroundColor: "#ffffff",
850
- setup(t) {
851
- const e = t.querySelector(".layout");
852
- e && (e.style.backgroundColor = "transparent"), t.querySelector(".content")?.style.setProperty("position", "relative");
853
- }
854
- },
855
- lifestyle: {
856
- siteBackgroundColor: "#ffffff",
857
- setup(t) {
858
- t.querySelector("main")?.style.setProperty("position", "relative");
859
- }
860
- },
861
- smh: {
862
- siteBackgroundColor: "#ffffff",
863
- setup(t) {
864
- t.querySelector("main")?.style.setProperty("position", "relative");
865
- }
866
- },
867
- theage: {
868
- siteBackgroundColor: "#ffffff",
869
- setup(t) {
870
- t.querySelector("main")?.style.setProperty("position", "relative");
871
- }
872
- }
873
- }, q = [
874
- { site: "https://www.nine.com.au/sport", config: f.wwos },
875
- { site: "https://staging.nine.com.au/sport", config: f.wwos },
876
- { site: "https://www.nine.com.au", config: f.nine },
877
- { site: "https://staging.nine.com.au", config: f.nine },
878
- { site: "https://preview.nine.com.au", config: f.nine },
879
- { site: "https://www.9news", config: f.nineNews },
880
- { site: "https://staging.9news", config: f.nineNews },
881
- { site: "https://honey", config: f.lifestyle },
882
- { site: "https://www.smh", config: f.smh },
883
- { site: "https://www.theage", config: f.theage },
884
- { site: "https://creative-preview-an.com", config: f.nine }
885
- ], N = (() => {
886
- const t = l.location.href;
887
- for (const e of q)
888
- if (t.indexOf(e.site) >= 0) return e.config;
889
- return f.nine;
890
- })(), I = p.getAttribute("style"), S = r.getAttribute("style"), M = p.parentElement !== r ? p.parentElement : null, y = M ? M.getAttribute("style") : null, b = r.parentElement, P = b ? b.getAttribute("style") : null;
891
- let B = null, d = null;
892
- const g = [], k = () => {
893
- let t = p.parentElement;
894
- for (; t && t !== a.body && t !== a.documentElement; ) {
895
- const s = l.getComputedStyle(t);
896
- (s.transform && s.transform !== "none" || s.willChange && s.willChange !== "auto" || s.contain && s.contain !== "none" || s.filter && s.filter !== "none" || s.perspective && s.perspective !== "none") && (g.push({ el: t, orig: t.getAttribute("style") }), t.style.transform = "none", t.style.willChange = "auto", t.style.contain = "none", t.style.filter = "none", t.style.perspective = "none"), s.overflow !== "visible" && (g.find((E) => E.el === t) || g.push({ el: t, orig: t.getAttribute("style") }), t.style.overflow = "visible"), t = t.parentElement;
897
- }
898
- const e = p.style;
899
- if (e.position = "fixed", e.top = "0", e.left = "0", e.width = "100vw", e.height = "100dvh", e.zIndex = String(n.zIndex), e.border = "none", e.margin = "0", e.padding = "0", e.display = "block", r.setAttribute("poweredAC", "0.1.5"), M) {
900
- const s = M.style;
901
- s.width = "100%", s.height = "0", s.overflow = "visible", s.position = "static", s.margin = "0";
902
- }
903
- const c = r.style;
904
- c.height = n.billboardHeight + "px", c.minHeight = n.billboardHeight + "px", c.background = "transparent", c.overflow = "visible", c.position = "relative", c.width = "100%", c.padding = "0", c.margin = "0", b && (b.style.overflow = "visible", b.style.position = "relative", b.style.backgroundColor = "transparent", b.style.height = n.billboardHeight + "px", b.style.minHeight = n.billboardHeight + "px", b.style.maxHeight = n.billboardHeight + "px", b.style.padding = "0", b.style.margin = "0", b.setAttribute("data-mf-slot", ""));
905
- const h = `max(${n.sideStripWidth}px, env(safe-area-inset-left))`, o = `max(${n.sideStripWidth}px, env(safe-area-inset-right))`;
906
- B = a.createElement("style"), B.id = "mobilefireplace-pac", B.textContent = `
1
+ //#region src/lib/components/fireplace.js
2
+ var e = (e) => {
3
+ let t = window.frameElement ? window.frameElement : null;
4
+ if (!t) return () => {};
5
+ let n = window.parent;
6
+ if (!n || n === window) return () => {};
7
+ let r = null;
8
+ try {
9
+ r = n.document, n.location.href;
10
+ } catch {
11
+ return () => {};
12
+ }
13
+ let i = {
14
+ siteBackgroundColor: "#ffffff",
15
+ fireplaceLeftMargin: 0,
16
+ adNodeMarginTop: -24,
17
+ adNodeMarginBottom: 24,
18
+ responsiveScroll: -124,
19
+ xPosHalfpage: 695,
20
+ yPosHalfpage: 72,
21
+ stickyMargin: {
22
+ offset: 72,
23
+ isSticky: !0
24
+ },
25
+ zIndex: function() {
26
+ let e = window.parent.document, t = (e, t) => e.forEach((e) => t.forEach(([t, n]) => e.style[t] = n));
27
+ e.querySelector(".nk-demographics")?.setAttribute("style", "max-width:1190px;left:50%;transform:translate(-50%,0);"), e.querySelector(".nk-footer")?.setAttribute("style", "position:relative;max-width:1190px;left:50%;transform:translate(-50%,0);"), e.querySelector("article")?.setAttribute("style", "position:relative"), e.querySelector("#article")?.setAttribute("style", "position:relative"), e.querySelector("#VideoIndex")?.setAttribute("style", "position:relative"), e.querySelector("#Index")?.setAttribute("style", "position:relative"), e.querySelector(".show")?.setAttribute("style", "position:relative"), e.querySelector("#adspot-desktop-banner-7-below")?.setAttribute("style", "position:relative"), t(e.querySelectorAll(".column"), [["position", "relative"]]), t(e.querySelectorAll(".advert"), [["position", "relative"]]), t(e.querySelectorAll("blockquote"), [["zIndex", "1"]]), e.querySelector("div[class*=\"article__MyContainer\"]")?.setAttribute("style", "max-width:1190px;margin-top:-24px"), e.querySelector("div[type=\"BANNER\"]")?.setAttribute("style", "display:none"), e.querySelector("div[type=\"MBANNER\"]")?.setAttribute("style", "display:none");
28
+ }
29
+ }, a = {
30
+ siteBackgroundColor: "#ffffff",
31
+ fireplaceLeftMargin: 0,
32
+ adNodeMarginTop: -24,
33
+ adNodeMarginBottom: 24,
34
+ responsiveScroll: -124,
35
+ xPosHalfpage: 695,
36
+ yPosHalfpage: 32,
37
+ stickyMargin: {
38
+ offset: 32,
39
+ isSticky: !0
40
+ },
41
+ zIndex: function() {
42
+ let e = window.parent.document, t = (e, t) => e.forEach((e) => t.forEach(([t, n]) => e.style[t] = n));
43
+ e.querySelector(".nk-demographics")?.setAttribute("style", "max-width:1190px;left:50%;transform:translate(-50%,0);"), e.querySelector(".nk-footer")?.setAttribute("style", "position:relative;max-width:1190px;left:50%;transform:translate(-50%,0);"), e.querySelector("article")?.setAttribute("style", "position:relative"), e.querySelector("#article")?.setAttribute("style", "position:relative"), e.querySelector("#VideoIndex")?.setAttribute("style", "position:relative"), e.querySelector("#Index")?.setAttribute("style", "position:relative"), e.querySelector(".show")?.setAttribute("style", "position:relative"), t(e.querySelectorAll(".column"), [["position", "relative"]]), t(e.querySelectorAll(".advert"), [["position", "relative"]]), t(e.querySelectorAll("blockquote"), [["zIndex", "1"]]), e.querySelector("div[class^=\"component__StrapContainer\"]")?.setAttribute("style", "position:relative"), e.querySelector("div[class*=\"ArticleContainer\"]")?.setAttribute("style", "max-width:1190px;margin-top:24px"), e.querySelector("div[class*=\"MyContainer\"]")?.setAttribute("style", "max-width:1190px;margin-top:24px");
44
+ }
45
+ }, o = {
46
+ siteBackgroundColor: "#ffffff",
47
+ fireplaceLeftMargin: 0,
48
+ adNodeMarginTop: -24,
49
+ adNodeMarginBottom: -55,
50
+ responsiveScroll: -120,
51
+ xPosHalfpage: 722,
52
+ yPosHalfpage: 32,
53
+ stickyMargin: {
54
+ offset: 8,
55
+ isSticky: !0
56
+ },
57
+ zIndex: function() {
58
+ let e = window.parent.document;
59
+ if (e.querySelector("section[data-section=\"marketing-banner\"]")?.setAttribute("style", "position:relative"), e.querySelector("div[data-testid=\"live-tv\"]")?.parentNode?.setAttribute("style", "position:relative"), e.querySelector("div[data-contentunit-id=\"stan\"]")?.parentNode?.setAttribute("style", "position:relative"), e.querySelector("small")?.setAttribute("style", "position:inherit"), e.querySelector("div[id*=\"tablet\"][id*=\"takeover\"]")) {
60
+ let t = e.createElement("style");
61
+ t.innerHTML = "\n div:has(#adspot-tablet-takeover-2-above) {\n position: static;\n }\n ", e.head.appendChild(t);
62
+ }
63
+ }
64
+ }, s = {
65
+ siteBackgroundColor: "#ffffff",
66
+ fireplaceLeftMargin: 0,
67
+ adNodeMarginTop: -24,
68
+ adNodeMarginBottom: 0,
69
+ responsiveScroll: -124,
70
+ xPosHalfpage: 720,
71
+ yPosHalfpage: 32,
72
+ stickyMargin: {
73
+ offset: 104,
74
+ isSticky: !0
75
+ },
76
+ zIndex: function() {
77
+ let e = window.parent.document, t = e.querySelector("footer").previousElementSibling;
78
+ if (t && t.tagName.toLowerCase() === "div" && (t.style.position = "relative"), e.querySelector("div[id*=\"tablet\"][id*=\"takeover\"]")) {
79
+ let t = e.createElement("style");
80
+ t.innerHTML = "\n div:has(#adspot-tablet-takeover-2-above) {\n position: static;\n }\n ", e.head.appendChild(t);
81
+ }
82
+ }
83
+ }, c = {
84
+ siteBackgroundColor: "#f7f7f7",
85
+ fireplaceLeftMargin: 0,
86
+ adNodeMarginTop: -25,
87
+ adNodeMarginBottom: 0,
88
+ responsiveScroll: -124,
89
+ xPosHalfpage: 720,
90
+ yPosHalfpage: 32,
91
+ stickyMargin: {
92
+ offset: 104,
93
+ isSticky: !0
94
+ },
95
+ zIndex: function() {
96
+ let e = window.parent.document;
97
+ if (e.querySelector(".container--padded")?.setAttribute("style", "position:relative"), ((e, t) => e.forEach((e) => t.forEach(([t, n]) => e.style[t] = n)))(e.querySelectorAll(".advert"), [["position", "relative"]]), e.querySelector(".footer-netkit")?.setAttribute("style", "position:relative;max-width:1190px;left:50%;transform:translate(-50%,0);"), e.querySelector("div[type=\"BANNER\"]")?.setAttribute("style", "display:none"), e.querySelector("div[type=\"MBANNER\"]")?.setAttribute("style", "display:none"), e.querySelector("div[id*=\"sidepanel\"][id*=\"above\"]")?.setAttribute("style", "display:none"), e.querySelector("div[id*=\"tablet\"][id*=\"takeover\"]")) {
98
+ let t = e.createElement("style");
99
+ t.innerHTML = "\n div:has(#adspot-tablet-takeover-2-above) {\n position: static;\n }\n ", e.head.appendChild(t);
100
+ }
101
+ }
102
+ }, l = {
103
+ siteBackgroundColor: "#ffffff",
104
+ fireplaceLeftMargin: 0,
105
+ adNodeMarginTop: -32,
106
+ adNodeMarginBottom: 18,
107
+ responsiveScroll: -124,
108
+ xPosHalfpage: 720,
109
+ yPosHalfpage: 16,
110
+ stickyMargin: {
111
+ offset: 16,
112
+ isSticky: !0
113
+ },
114
+ zIndex: function() {
115
+ let e = window.parent.document;
116
+ e.querySelector(".header-wrapper")?.setAttribute("style", "height:124px"), e.querySelector(".weather-widget-wrapper")?.setAttribute("style", "bottom:0px"), e.querySelector(".content")?.setAttribute("style", "padding-top:32px"), e.querySelector(".layout")?.setAttribute("style", "position:relative;background-color:transparent;"), e.querySelector(".footer-ad")?.setAttribute("style", "position:relative"), e.querySelector(".footer-netkit")?.setAttribute("style", "position:relative;max-width:1190px;left:50%;transform:translate(-50%,0);");
117
+ }
118
+ }, u = [
119
+ {
120
+ site: "https://www.nine.com.au/sport",
121
+ config: s
122
+ },
123
+ {
124
+ site: "https://www.nine.com.au/product-reviews",
125
+ config: a
126
+ },
127
+ {
128
+ site: "https://www.nine.com.au/property",
129
+ config: a
130
+ },
131
+ {
132
+ site: "https://www.nine.com.au/entertainment",
133
+ config: a
134
+ },
135
+ {
136
+ site: "https://staging.nine.com.au/sport",
137
+ config: s
138
+ },
139
+ {
140
+ site: "https://staging.nine.com.au/product-reviews",
141
+ config: a
142
+ },
143
+ {
144
+ site: "https://staging.nine.com.au/property",
145
+ config: a
146
+ },
147
+ {
148
+ site: "https://staging.nine.com.au/entertainment",
149
+ config: a
150
+ },
151
+ {
152
+ site: "https://render-web-nine-staging-v1.ffxblue.com.au",
153
+ config: o
154
+ },
155
+ {
156
+ site: "https://render-web-nine-production-v1.ffxblue.com.au",
157
+ config: o
158
+ },
159
+ {
160
+ site: "https://preview.nine.com.au/",
161
+ config: o
162
+ },
163
+ {
164
+ site: "https://www.nine",
165
+ config: o
166
+ },
167
+ {
168
+ site: "https://staging.nine",
169
+ config: o
170
+ },
171
+ {
172
+ site: "https://entertainment",
173
+ config: i
174
+ },
175
+ {
176
+ site: "https://celebrity",
177
+ config: i
178
+ },
179
+ {
180
+ site: "https://homes",
181
+ config: i
182
+ },
183
+ {
184
+ site: "https://travel",
185
+ config: i
186
+ },
187
+ {
188
+ site: "https://honey",
189
+ config: i
190
+ },
191
+ {
192
+ site: "https://style",
193
+ config: i
194
+ },
195
+ {
196
+ site: "https://coach",
197
+ config: i
198
+ },
199
+ {
200
+ site: "https://kitchen",
201
+ config: i
202
+ },
203
+ {
204
+ site: "https://finance",
205
+ config: i
206
+ },
207
+ {
208
+ site: "https://wwos",
209
+ config: c
210
+ },
211
+ {
212
+ site: "https://staging.wwos",
213
+ config: s
214
+ },
215
+ {
216
+ site: "https://www.9news",
217
+ config: l
218
+ },
219
+ {
220
+ site: "https://staging.9news",
221
+ config: l
222
+ },
223
+ {
224
+ site: "https://www.yourtv",
225
+ config: i
226
+ },
227
+ {
228
+ site: "https://staging.yourtv",
229
+ config: i
230
+ },
231
+ {
232
+ site: "https://9now",
233
+ config: a
234
+ },
235
+ {
236
+ site: "https://creative-preview-an.com",
237
+ config: i
238
+ }
239
+ ], d = () => {
240
+ let e = window.document.getElementById("nineContent");
241
+ e && (e.style.backgroundColor = v.siteBackgroundColor), h(), m(), n.addEventListener("scroll", g), y = setTimeout(g, 50);
242
+ }, f = () => {
243
+ let e = null;
244
+ return e = r.querySelector("div[id*=\"billboard\"][id*=\"above\"]"), e;
245
+ }, p = () => {
246
+ let e = n.location.href;
247
+ for (let t = 0; t < u.length; t += 1) if (e.indexOf(u[t].site) >= 0) return u[t].config;
248
+ }, m = () => {
249
+ if (!t) return;
250
+ let e = t.style;
251
+ e.width = "100%", e.height = "1000px", e.position = "fixed", e.left = "50%", e.transform = "translate(-50%, 0)";
252
+ }, h = () => {
253
+ if (!_) return;
254
+ let e = _.style;
255
+ _.className = "", e.minHeight = "250px", e.marginTop = v.adNodeMarginTop + "px", e.marginBottom = v.adNodeMarginBottom + "px", e.position = "static", e.display = "block", v.zIndex && v.zIndex();
256
+ }, g = () => {
257
+ let e = n.scrollY, r = t.style, i = document.getElementById("siteContent") ? document.getElementById("siteContent").style : {};
258
+ e >= 0 && e <= b ? (r.transform = `translate(-50%, ${-e}px)`, i.transform = "translateY(0)") : e > b && e <= x ? (r.transform = `translate(-50%, ${-b}px)`, i.transform = `translateY(${b - e}px)`) : e > x && (r.transform = `translate(-50%, ${-b}px)`, i.transform = "translateY(-250px)");
259
+ }, _ = f(), v = p();
260
+ if (!v) return () => {};
261
+ let y = null, b = -v.responsiveScroll + e, x = b + 250;
262
+ return d(), () => {
263
+ n.removeEventListener("scroll", g), y &&= (clearTimeout(y), null);
264
+ };
265
+ }, t = (e) => {
266
+ let t = window.frameElement ? window.frameElement : null;
267
+ if (!t) return () => {};
268
+ let n = window.parent;
269
+ if (!n || n === window) return () => {};
270
+ let r = null;
271
+ try {
272
+ r = n.document, n.location.href;
273
+ } catch {
274
+ return () => {};
275
+ }
276
+ let i = document.getElementById("nineMasthead"), a = i ? i.style : {}, o, s = {
277
+ siteBackgroundColor: "#ffffff",
278
+ fireplaceLeftMargin: 0,
279
+ adNodeMarginTop: -24,
280
+ adNodeMarginBottom: 24,
281
+ responsiveScroll: -124,
282
+ xPosHalfpage: 722,
283
+ yPosHalfpage: 72,
284
+ stickyMargin: {
285
+ offset: 160,
286
+ isSticky: !0
287
+ },
288
+ maskOffset: 298,
289
+ zIndex: function() {
290
+ let e = window.parent.document, t = (e, t) => e.forEach((e) => t.forEach(([t, n]) => e.style[t] = n));
291
+ e.querySelector(".nk-demographics")?.setAttribute("style", "max-width:1190px;left:50%;transform:translate(-50%,0);"), e.querySelector(".nk-footer")?.setAttribute("style", "position:relative;max-width:1190px;left:50%;transform:translate(-50%,0);"), e.querySelector("article")?.setAttribute("style", "position:relative"), e.querySelector("#article")?.setAttribute("style", "position:relative"), e.querySelector("#VideoIndex")?.setAttribute("style", "position:relative"), e.querySelector("#Index")?.setAttribute("style", "position:relative"), e.querySelector(".show")?.setAttribute("style", "position:relative"), e.querySelector("#adspot-desktop-banner-7-below")?.setAttribute("style", "position:relative"), t(e.querySelectorAll(".column"), [["position", "relative"]]), t(e.querySelectorAll(".advert"), [["position", "relative"]]), t(e.querySelectorAll("blockquote"), [["zIndex", "1"]]), e.querySelector("div[type=\"BANNER\"]")?.setAttribute("style", "display:none"), e.querySelector("div[type=\"MBANNER\"]")?.setAttribute("style", "display:none");
292
+ }
293
+ }, c = {
294
+ siteBackgroundColor: "#ffffff",
295
+ fireplaceLeftMargin: 0,
296
+ adNodeMarginTop: -24,
297
+ adNodeMarginBottom: 0,
298
+ responsiveScroll: -124,
299
+ xPosHalfpage: 695,
300
+ yPosHalfpage: 32,
301
+ stickyMargin: {
302
+ offset: 160,
303
+ isSticky: !0
304
+ },
305
+ maskOffset: window.parent.document.querySelector("div[class*=\"video-index__MyContainer\"]") ? 248 : 298,
306
+ zIndex: function() {
307
+ let e = window.parent.document, t = (e, t) => e.forEach((e) => t.forEach(([t, n]) => e.style[t] = n));
308
+ e.querySelector(".nk-demographics")?.setAttribute("style", "max-width:1190px;left:50%;transform:translate(-50%,0);"), e.querySelector(".nk-footer")?.setAttribute("style", "position:relative;max-width:1190px;left:50%;transform:translate(-50%,0);"), e.querySelector("article")?.setAttribute("style", "position:relative"), e.querySelector("#article")?.setAttribute("style", "position:relative"), e.querySelector("#VideoIndex")?.setAttribute("style", "position:relative"), e.querySelector("#Index")?.setAttribute("style", "position:relative"), e.querySelector(".show")?.setAttribute("style", "position:relative"), t(e.querySelectorAll(".column"), [["position", "relative"]]), t(e.querySelectorAll(".advert"), [["position", "relative"]]), t(e.querySelectorAll("blockquote"), [["zIndex", "1"]]), e.querySelector("div[class^=\"component__StrapContainer\"]")?.setAttribute("style", "position:relative"), e.querySelector("div[class*=\"ArticleContainer\"]")?.setAttribute("style", "max-width:1190px;margin-top:24px"), e.querySelector("div[class*=\"MyContainer\"]")?.setAttribute("style", "max-width:1190px;margin-top:24px");
309
+ }
310
+ }, l = {
311
+ siteBackgroundColor: "#ffffff",
312
+ fireplaceLeftMargin: 0,
313
+ adNodeMarginTop: -24,
314
+ adNodeMarginBottom: -13,
315
+ responsiveScroll: -120,
316
+ xPosHalfpage: 722,
317
+ yPosHalfpage: 32,
318
+ stickyMargin: {
319
+ offset: 166,
320
+ isSticky: !0
321
+ },
322
+ maskOffset: 304,
323
+ zIndex: function() {
324
+ let e = window.parent.document;
325
+ if (e.querySelector("section[data-section=\"marketing-banner\"]")?.setAttribute("style", "position:relative"), e.querySelector("div[data-testid=\"live-tv\"]")?.parentNode?.setAttribute("style", "position:relative"), e.querySelector("div[data-contentunit-id=\"stan\"]")?.parentNode?.setAttribute("style", "position:relative"), e.querySelector("small")?.setAttribute("style", "position:inherit"), e.querySelector("div[id*=\"tablet\"][id*=\"takeover\"]")) {
326
+ let t = e.createElement("style");
327
+ t.innerHTML = "\n div:has(#adspot-tablet-takeover-2-above) {\n position: static;\n }\n ", e.head.appendChild(t);
328
+ }
329
+ }
330
+ }, u = {
331
+ siteBackgroundColor: "#ffffff",
332
+ fireplaceLeftMargin: 0,
333
+ adNodeMarginTop: -24,
334
+ adNodeMarginBottom: 0,
335
+ responsiveScroll: -124,
336
+ xPosHalfpage: 720,
337
+ yPosHalfpage: 32,
338
+ stickyMargin: {
339
+ offset: 160,
340
+ isSticky: !0
341
+ },
342
+ maskOffset: 312,
343
+ zIndex: function() {
344
+ let e = window.parent.document, t = e.querySelector("footer").previousElementSibling;
345
+ if (t && t.tagName.toLowerCase() === "div" && (t.style.position = "relative"), e.querySelector("div[id*=\"tablet\"][id*=\"takeover\"]")) {
346
+ let t = e.createElement("style");
347
+ t.innerHTML = "\n div:has(#adspot-tablet-takeover-2-above) {\n position: static;\n }\n ", e.head.appendChild(t);
348
+ }
349
+ }
350
+ }, d = {
351
+ siteBackgroundColor: "#ffffff",
352
+ fireplaceLeftMargin: 0,
353
+ adNodeMarginTop: -25,
354
+ adNodeMarginBottom: 0,
355
+ responsiveScroll: -124,
356
+ xPosHalfpage: 720,
357
+ yPosHalfpage: 32,
358
+ stickyMargin: {
359
+ offset: 175,
360
+ isSticky: !0
361
+ },
362
+ maskOffset: 274,
363
+ zIndex: function() {
364
+ let e = window.parent.document;
365
+ if (e.querySelector(".container--padded")?.setAttribute("style", "position:relative"), ((e, t) => e.forEach((e) => t.forEach(([t, n]) => e.style[t] = n)))(e.querySelectorAll(".advert"), [["position", "relative"]]), e.querySelector(".footer-netkit")?.setAttribute("style", "position:relative;max-width:1190px;left:50%;transform:translate(-50%,0);"), e.querySelector("div[type=\"BANNER\"]")?.setAttribute("style", "display:none"), e.querySelector("div[type=\"MBANNER\"]")?.setAttribute("style", "display:none"), e.querySelector("div[id*=\"sidepanel\"][id*=\"above\"]")?.setAttribute("style", "display:none"), e.querySelector(".score-strip")?.setAttribute("style", "display:none"), e.querySelector(".feed-header__breadcrumbs")?.setAttribute("style", "display:none"), e.querySelector(".layout.container")?.setAttribute("style", "padding:0"), e.querySelector(".empty-div")?.setAttribute("style", "display:none"), e.querySelector("div[id*=\"tablet\"][id*=\"takeover\"]")) {
366
+ let t = e.createElement("style");
367
+ t.innerHTML = "\n div:has(#adspot-tablet-takeover-2-above) {\n position: static;\n }\n ", e.head.appendChild(t);
368
+ }
369
+ }
370
+ }, f = {
371
+ siteBackgroundColor: "#ffffff",
372
+ fireplaceLeftMargin: 0,
373
+ adNodeMarginTop: -32,
374
+ adNodeMarginBottom: 8,
375
+ responsiveScroll: -124,
376
+ xPosHalfpage: 720,
377
+ yPosHalfpage: 16,
378
+ stickyMargin: {
379
+ offset: 160,
380
+ isSticky: !0
381
+ },
382
+ maskOffset: window.parent.document.querySelector("div[class*=\"VideoIndexComponent\"]") ? 324 : 292,
383
+ zIndex: function() {
384
+ let e = window.parent.document;
385
+ e.querySelector(".header-wrapper")?.setAttribute("style", "height:124px"), e.querySelector(".weather-widget-wrapper")?.setAttribute("style", "bottom:0px"), e.querySelector(".content")?.setAttribute("style", "padding-top:32px"), e.querySelector(".layout")?.setAttribute("style", "position:relative;background-color:transparent;"), e.querySelector(".footer-ad")?.setAttribute("style", "position:relative"), e.querySelector(".footer-netkit")?.setAttribute("style", "position:relative;max-width:1190px;left:50%;transform:translate(-50%,0);");
386
+ let t = e.querySelector("[class*=\"VideoIndexComponent\"]");
387
+ t && (e.querySelector(".breadcrumbs")?.setAttribute("style", "display:none"), t.style.maxWidth = "1190px", t.style.margin = "auto", t.style.position = "relative");
388
+ }
389
+ }, p = [
390
+ {
391
+ site: "https://www.nine.com.au/sport",
392
+ config: u
393
+ },
394
+ {
395
+ site: "https://www.nine.com.au/product-reviews",
396
+ config: c
397
+ },
398
+ {
399
+ site: "https://www.nine.com.au/property",
400
+ config: c
401
+ },
402
+ {
403
+ site: "https://www.nine.com.au/entertainment",
404
+ config: c
405
+ },
406
+ {
407
+ site: "https://staging.nine.com.au/sport",
408
+ config: u
409
+ },
410
+ {
411
+ site: "https://staging.nine.com.au/product-reviews",
412
+ config: c
413
+ },
414
+ {
415
+ site: "https://staging.nine.com.au/property",
416
+ config: c
417
+ },
418
+ {
419
+ site: "https://staging.nine.com.au/entertainment",
420
+ config: c
421
+ },
422
+ {
423
+ site: "https://render-web-nine-staging-v1.ffxblue.com.au",
424
+ config: l
425
+ },
426
+ {
427
+ site: "https://render-web-nine-production-v1.ffxblue.com.au",
428
+ config: l
429
+ },
430
+ {
431
+ site: "https://preview.nine.com.au/",
432
+ config: l
433
+ },
434
+ {
435
+ site: "https://www.nine",
436
+ config: l
437
+ },
438
+ {
439
+ site: "https://staging.nine",
440
+ config: l
441
+ },
442
+ {
443
+ site: "https://entertainment",
444
+ config: s
445
+ },
446
+ {
447
+ site: "https://celebrity",
448
+ config: s
449
+ },
450
+ {
451
+ site: "https://homes",
452
+ config: s
453
+ },
454
+ {
455
+ site: "https://travel",
456
+ config: s
457
+ },
458
+ {
459
+ site: "https://honey",
460
+ config: s
461
+ },
462
+ {
463
+ site: "https://style",
464
+ config: s
465
+ },
466
+ {
467
+ site: "https://coach",
468
+ config: s
469
+ },
470
+ {
471
+ site: "https://kitchen",
472
+ config: s
473
+ },
474
+ {
475
+ site: "https://finance",
476
+ config: s
477
+ },
478
+ {
479
+ site: "https://wwos",
480
+ config: d
481
+ },
482
+ {
483
+ site: "https://staging.wwos",
484
+ config: u
485
+ },
486
+ {
487
+ site: "https://www.9news",
488
+ config: f
489
+ },
490
+ {
491
+ site: "https://staging.9news",
492
+ config: f
493
+ },
494
+ {
495
+ site: "https://www.yourtv",
496
+ config: s
497
+ },
498
+ {
499
+ site: "https://staging.yourtv",
500
+ config: s
501
+ },
502
+ {
503
+ site: "https://9now",
504
+ config: c
505
+ },
506
+ {
507
+ site: "https://creative-preview-an.com",
508
+ config: s
509
+ }
510
+ ], m = () => {
511
+ let e = window.document.getElementById("nineContent");
512
+ e && (e.style.backgroundColor = T.siteBackgroundColor), i && (a.setProperty("--masthead-height", "250px"), a.height = "var(--masthead-height)"), y(), v(), g(), b(), n.addEventListener("scroll", C, { passive: !0 }), E = setTimeout(C, 50);
513
+ }, h = () => {
514
+ let e = null;
515
+ return e = r.querySelector("div[id*=\"billboard\"][id*=\"above\"]"), e;
516
+ }, g = () => {
517
+ let e = null;
518
+ if (!window.parent) return e;
519
+ if (e = r.querySelector("div[id*=\"halfpage\"][id*=\"above\"]"), !e) return;
520
+ let t = e;
521
+ for (let e = 0; e < 3; e++) if (t = t.parentNode, t && getComputedStyle(t).position === "sticky") {
522
+ t.setAttribute("style", `top: ${T.stickyMargin.offset}px`);
523
+ break;
524
+ }
525
+ }, _ = () => {
526
+ let e = n.location.href;
527
+ for (let t = 0; t < p.length; t += 1) if (e.indexOf(p[t].site) >= 0) return p[t].config;
528
+ }, v = () => {
529
+ if (!t) return;
530
+ let e = t.style;
531
+ e.width = "100%", e.height = "1000px", e.position = "fixed", e.left = "50%", e.setProperty("--transform-y", "0px"), e.transform = "translate3d(-50%, var(--transform-y), 0)";
532
+ }, y = () => {
533
+ if (!w) return;
534
+ let e = w.style;
535
+ w.className = "", e.minHeight = "250px", e.marginTop = T.adNodeMarginTop + "px", e.marginBottom = T.adNodeMarginBottom + "px", e.position = "static", e.display = "block", T.zIndex && T.zIndex();
536
+ }, b = () => {
537
+ o = r.querySelector("div[data-contentunit-id=\"stan\"]")?.parentNode || r.querySelector("div[data-ui-testid=\"header-score-strip\"]")?.parentNode || r.querySelector("div[class*=\"__MyContainer\"]") || r.querySelector("div[class*=\"__ArticleContainer\"]") || r.querySelector("div[class*=\"__VideoIndexComponent\"]") || r.querySelector("div.container.layout") || r.querySelector("main.container.layout"), o && (o.style.willChange = "clip-path", o.style.transition = "none", o.style.webkitBackfaceVisibility = "hidden", o.style.backfaceVisibility = "hidden", o.style.transform = "translate3d(0,0,0)", o.style.backgroundColor = T.siteBackgroundColor, o.style.setProperty("--mask-inset", "0px"), o.style.clipPath = "inset(var(--mask-inset, 0px) 0 0 0)");
538
+ }, x = 0, S = 0, C = () => {
539
+ let e = n.scrollY, r = e > x, i = e > O ? e - T.maskOffset : 0, s = Math.abs(i - S);
540
+ if (o) if (r && i > S) if (s > 100) {
541
+ let e = Math.max(0, i - 100);
542
+ o.style.transition = "none", o.style.setProperty("--mask-inset", `${e}px`), o.offsetHeight, o.style.transition = "clip-path 0.3s ease-out", o.style.setProperty("--mask-inset", `${i}px`);
543
+ } else o.style.transition = "clip-path 0.3s ease-out", o.style.setProperty("--mask-inset", `${i}px`);
544
+ else o.style.transition = "none", o.style.setProperty("--mask-inset", `${i}px`);
545
+ x = e, S = i, e > O ? (t.style.setProperty("--transform-y", `${-D}px`), a.setProperty("--masthead-height", "100px"), window.CollantOn || window.goCollant()) : e > D && e <= O ? (t.style.setProperty("--transform-y", `${-D}px`), a.setProperty("--masthead-height", `${250 + D - e}px`), window.CollantOn && window.goBillboard()) : e >= 0 && e <= D && (t.style.setProperty("--transform-y", `${-e}px`), a.setProperty("--masthead-height", "250px"), window.CollantOn && window.goBillboard());
546
+ }, w = h(), T = _();
547
+ if (!T) return () => {};
548
+ let E = null, D = -T.responsiveScroll + e, O = D + 150;
549
+ return m(), () => {
550
+ n.removeEventListener("scroll", C), E &&= (clearTimeout(E), null);
551
+ };
552
+ }, n = (e, t, n) => {
553
+ let r = window.frameElement ? window.frameElement : null;
554
+ if (!r) return () => {};
555
+ let i = window.parent;
556
+ if (!i || i === window) return () => {};
557
+ let a = null;
558
+ try {
559
+ a = i.document, i.location.href;
560
+ } catch {
561
+ return () => {};
562
+ }
563
+ let o = {
564
+ siteBackgroundColor: "#ffffff",
565
+ logoTop: "44px",
566
+ logoLeft: "50%",
567
+ logoTransform: "translateX(-50%)",
568
+ logoSmallLeft: "250px",
569
+ logoSmallTransform: "translateX(0px)",
570
+ logoSmallFilter: "none",
571
+ zIndex: function() {
572
+ let e = window.parent.document;
573
+ e.querySelector(".container--padded")?.setAttribute("style", "position:relative"), ((e, t) => e.forEach((e) => t.forEach(([t, n]) => e.style[t] = n)))(e.querySelectorAll(".advert"), [["position", "relative"]]), e.querySelector(".footer-netkit")?.setAttribute("style", "position:relative;max-width:1190px;left:50%;transform:translate(-50%,0);"), e.querySelector("div[type=\"BANNER\"]")?.setAttribute("style", "display:none"), e.querySelector("div[type=\"MBANNER\"]")?.setAttribute("style", "display:none"), e.querySelector("div[id*=\"sidepanel\"][id*=\"above\"]")?.setAttribute("style", "display:none");
574
+ }
575
+ }, s = {
576
+ siteBackgroundColor: "#ffffff",
577
+ logoTop: "44px",
578
+ logoLeft: "50%",
579
+ logoTransform: "translateX(-50%)",
580
+ logoSmallLeft: "50%",
581
+ logoSmallTransform: "translateX(-50%)",
582
+ logoSmallFilter: "none",
583
+ zIndex: function() {
584
+ let e = window.parent.document, t = (e, t) => e.forEach((e) => t.forEach(([t, n]) => e.style[t] = n));
585
+ e.querySelector(".nk-demographics")?.setAttribute("style", "max-width:1190px;left:50%;transform:translate(-50%,0);"), e.querySelector(".nk-footer")?.setAttribute("style", "position:relative;max-width:1190px;left:50%;transform:translate(-50%,0);"), e.querySelector("article")?.setAttribute("style", "position:relative"), e.querySelector("#article")?.setAttribute("style", "position:relative"), e.querySelector("#VideoIndex")?.setAttribute("style", "position:relative"), e.querySelector("#Index")?.setAttribute("style", "position:relative"), e.querySelector(".show")?.setAttribute("style", "position:relative"), t(e.querySelectorAll(".column"), [["position", "relative"]]), t(e.querySelectorAll(".advert"), [["position", "relative"]]), t(e.querySelectorAll("blockquote"), [["zIndex", "1"]]), e.querySelector("div[class*=\"article__MyContainer\"]")?.setAttribute("style", "max-width:1190px;margin-top:-24px"), e.querySelector("div[type=\"BANNER\"]")?.setAttribute("style", "display:none"), e.querySelector("div[type=\"MBANNER\"]")?.setAttribute("style", "display:none"), e.querySelector("div[id*=\"sidepanel\"][id*=\"above\"]")?.setAttribute("style", "display:none");
586
+ }
587
+ }, c = {
588
+ siteBackgroundColor: "#ffffff",
589
+ logoTop: "44px",
590
+ logoLeft: "50%",
591
+ logoTransform: "translateX(-50%)",
592
+ logoSmallLeft: "50%",
593
+ logoSmallTransform: "translateX(-50%)",
594
+ logoSmallFilter: "none",
595
+ zIndex: function() {
596
+ let e = window.parent.document, t = (e, t) => e.forEach((e) => t.forEach(([t, n]) => e.style[t] = n));
597
+ e.querySelector(".nk-demographics")?.setAttribute("style", "max-width:1190px;left:50%;transform:translate(-50%,0);"), e.querySelector(".nk-footer")?.setAttribute("style", "position:relative;max-width:1190px;left:50%;transform:translate(-50%,0);"), e.querySelector("article")?.setAttribute("style", "position:relative"), e.querySelector("#article")?.setAttribute("style", "position:relative"), e.querySelector("#VideoIndex")?.setAttribute("style", "position:relative"), e.querySelector("#Index")?.setAttribute("style", "position:relative"), e.querySelector(".show")?.setAttribute("style", "position:relative"), t(e.querySelectorAll(".column"), [["position", "relative"]]), t(e.querySelectorAll(".advert"), [["position", "relative"]]), t(e.querySelectorAll("blockquote"), [["zIndex", "1"]]), e.querySelector("div[class^=\"component__StrapContainer\"]")?.setAttribute("style", "position:relative"), e.querySelector("section[class^=\"WatchNow__Container\"]")?.setAttribute("style", "margin-left:calc(50% - 49vw);margin-right:calc(50% - 49vw + 10px);"), e.querySelector("div[class*=\"ArticleContainer\"]")?.setAttribute("style", "max-width:1190px;margin-top:0px"), e.querySelector("div[type=\"BANNER\"]")?.setAttribute("style", "display:none"), e.querySelector("div[type=\"MBANNER\"]")?.setAttribute("style", "display:none"), e.querySelector("div[id*=\"sidepanel\"][id*=\"above\"]")?.setAttribute("style", "display:none");
598
+ }
599
+ }, l = {
600
+ siteBackgroundColor: "#ffffff",
601
+ logoTop: "44px",
602
+ logoLeft: "50%",
603
+ logoTransform: "translateX(-50%)",
604
+ logoSmallLeft: "50%",
605
+ logoSmallTransform: "translateX(-50%)",
606
+ logoSmallFilter: "none",
607
+ zIndex: function() {
608
+ let e = window.parent.document, t = (e, t) => e.forEach((e) => t.forEach(([t, n]) => e.style[t] = n));
609
+ e.querySelector("section[data-section=\"marketing-banner\"]")?.setAttribute("style", "position:relative"), e.querySelector(".container--ads")?.setAttribute("style", "min-height:0"), e.getElementById("mastheadAnchorToggle")?.setAttribute("style", "display:none"), t(e.querySelectorAll(".advert"), [["position", "relative"]]), t(e.querySelectorAll("iframe"), [["position", "relative"]]), e.querySelector("div[data-testid=\"live-tv\"]")?.parentNode?.setAttribute("style", "position:relative"), e.querySelector("div[data-contentunit-id=\"stan\"]")?.parentNode?.setAttribute("style", "position:relative"), t(e.querySelectorAll("small"), [["position", "relative"]]), e.querySelector("small")?.setAttribute("style", "position:inherit"), e.querySelector("div[type=\"BANNER\"]")?.setAttribute("style", "display:none"), e.querySelector("div[type=\"MBANNER\"]")?.setAttribute("style", "display:none"), e.querySelector("div[id*=\"sidepanel\"][id*=\"above\"]")?.setAttribute("style", "display:none");
610
+ }
611
+ }, u = {
612
+ siteBackgroundColor: "#ffffff",
613
+ logoTop: "-148px",
614
+ logoLeft: "50%",
615
+ logoTransform: "translateX(-50%)",
616
+ logoSmallLeft: "50%",
617
+ logoSmallTransform: "translateX(-50%)",
618
+ logoSmallFilter: "none",
619
+ zIndex: function() {
620
+ let e = window.parent.document;
621
+ e.querySelector(".container--padded")?.setAttribute("style", "position:relative"), ((e, t) => e.forEach((e) => t.forEach(([t, n]) => e.style[t] = n)))(e.querySelectorAll(".advert"), [["position", "relative"]]), e.querySelector(".footer-netkit")?.setAttribute("style", "position:relative;max-width:1190px;left:50%;transform:translate(-50%,0);"), e.querySelector("div[type=\"BANNER\"]")?.setAttribute("style", "display:none"), e.querySelector("div[type=\"MBANNER\"]")?.setAttribute("style", "display:none"), e.querySelector("div[id*=\"sidepanel\"][id*=\"above\"]")?.setAttribute("style", "display:none");
622
+ }
623
+ }, d = {
624
+ siteBackgroundColor: "#ffffff",
625
+ logoTop: "44px",
626
+ logoLeft: "50%",
627
+ logoTransform: "translateX(-50%)",
628
+ logoSmallLeft: "50%",
629
+ logoSmallTransform: "translateX(-50%)",
630
+ logoSmallFilter: "invert(1)",
631
+ zIndex: function() {
632
+ let e = window.parent.document;
633
+ e.querySelector(".header-wrapper")?.setAttribute("style", "height:124px"), e.querySelector(".weather-widget-wrapper")?.setAttribute("style", "bottom:0px"), e.querySelector(".content")?.setAttribute("style", "padding-top:32px"), e.querySelector(".layout")?.setAttribute("style", "position:relative;background-color:transparent;"), e.querySelector(".footer-ad")?.setAttribute("style", "position:relative"), e.querySelector(".footer-netkit")?.setAttribute("style", "position:relative;max-width:1190px;left:50%;transform:translate(-50%,0);"), e.querySelector("div[type=\"BANNER\"]")?.setAttribute("style", "display:none"), e.querySelector("div[type=\"MBANNER\"]")?.setAttribute("style", "display:none"), e.querySelector("div[id*=\"sidepanel\"][id*=\"above\"]")?.setAttribute("style", "display:none");
634
+ }
635
+ }, f = [
636
+ {
637
+ site: "https://www.nine.com.au/sport",
638
+ config: o
639
+ },
640
+ {
641
+ site: "https://www.nine.com.au/product-reviews",
642
+ config: c
643
+ },
644
+ {
645
+ site: "https://www.nine.com.au/property",
646
+ config: c
647
+ },
648
+ {
649
+ site: "https://www.nine.com.au/entertainment",
650
+ config: c
651
+ },
652
+ {
653
+ site: "https://staging.nine.com.au/sport",
654
+ config: o
655
+ },
656
+ {
657
+ site: "https://staging.nine.com.au/product-reviews",
658
+ config: c
659
+ },
660
+ {
661
+ site: "https://staging.nine.com.au/property",
662
+ config: c
663
+ },
664
+ {
665
+ site: "https://staging.nine.com.au/entertainment",
666
+ config: c
667
+ },
668
+ {
669
+ site: "https://render-web-nine-staging-v1.ffxblue.com.au",
670
+ config: l
671
+ },
672
+ {
673
+ site: "https://render-web-nine-production-v1.ffxblue.com.au",
674
+ config: l
675
+ },
676
+ {
677
+ site: "https://preview.nine.com.au/",
678
+ config: l
679
+ },
680
+ {
681
+ site: "https://www.nine",
682
+ config: l
683
+ },
684
+ {
685
+ site: "https://staging.nine",
686
+ config: l
687
+ },
688
+ {
689
+ site: "https://entertainment",
690
+ config: s
691
+ },
692
+ {
693
+ site: "https://celebrity",
694
+ config: s
695
+ },
696
+ {
697
+ site: "https://homes",
698
+ config: s
699
+ },
700
+ {
701
+ site: "https://travel",
702
+ config: s
703
+ },
704
+ {
705
+ site: "https://honey",
706
+ config: s
707
+ },
708
+ {
709
+ site: "https://style",
710
+ config: s
711
+ },
712
+ {
713
+ site: "https://coach",
714
+ config: s
715
+ },
716
+ {
717
+ site: "https://kitchen",
718
+ config: s
719
+ },
720
+ {
721
+ site: "https://finance",
722
+ config: s
723
+ },
724
+ {
725
+ site: "https://wwos",
726
+ config: u
727
+ },
728
+ {
729
+ site: "https://staging.wwos",
730
+ config: u
731
+ },
732
+ {
733
+ site: "https://www.9news",
734
+ config: d
735
+ },
736
+ {
737
+ site: "https://staging.9news",
738
+ config: d
739
+ },
740
+ {
741
+ site: "https://www.yourtv",
742
+ config: s
743
+ },
744
+ {
745
+ site: "https://staging.yourtv",
746
+ config: s
747
+ },
748
+ {
749
+ site: "https://9now",
750
+ config: c
751
+ },
752
+ {
753
+ site: "https://creative-preview-an.com",
754
+ config: s
755
+ }
756
+ ], p = () => {
757
+ let e = window.document.getElementById("logo-small");
758
+ e && (e.style.left = C.logoSmallLeft, e.style.transform = C.logoSmallTransform, e.style.filter = C.logoSmallFilter), _(), g(), i.addEventListener("scroll", y), w = setTimeout(y, 50);
759
+ }, m = () => {
760
+ let e = null;
761
+ return e = a.querySelector("div[id*=\"desktop\"][id*=\"takeover\"][id*=\"above\"]"), e;
762
+ }, h = () => {
763
+ let e = i.location.href;
764
+ for (let t = 0; t < f.length; t += 1) if (e.indexOf(f[t].site) >= 0) return f[t].config;
765
+ }, g = () => {
766
+ if (!r) return;
767
+ let e = r.style;
768
+ e.width = "100%", e.height = `${t}px`, e.position = "relative";
769
+ }, _ = () => {
770
+ if (!S) return;
771
+ let e = S.style;
772
+ e.maxHeight = `${t}px`, e.minHeight = `${t}px`, e.marginTop = "0px", e.marginBottom = "0px", e.position = "absolute", e.width = "1900px", e.top = C.logoTop, e.left = C.logoLeft, e.transform = C.logoTransform, e.zIndex = "10000", e.pointerEvents = "none", C.zIndex && C.zIndex();
773
+ }, v = (e) => {
774
+ if (!S) return;
775
+ let r = S.style;
776
+ e === "big" && !window.bigActive ? (r.maxHeight = `${t}px`, r.minHeight = `${t}px`, r.position = "absolute", r.top = C.logoTop, r.zIndex = "10000", window.loadBig()) : e === "small" && !window.smallActive && (r.maxHeight = `${n}px`, r.minHeight = `${n}px`, r.position = "fixed", r.top = "0px", r.zIndex = "100000", window.loadSmall());
777
+ }, y = () => {
778
+ let e = i.scrollY;
779
+ r.style, e >= 0 && e <= T ? v("big") : e > T && (v(e > E ? "small" : "big"), E = e <= 0 ? 0 : e);
780
+ }, b = (e = 4) => {
781
+ x() || e > 1 && setTimeout(() => {
782
+ b(e - 1);
783
+ }, 20);
784
+ }, x = () => {
785
+ let e = a.querySelector("header");
786
+ return window.getComputedStyle(e).top === "0px" ? (v("big"), !0) : (v("small"), !1);
787
+ }, S = m(), C = h();
788
+ if (!C) return () => {};
789
+ let w = null, T = e, E = 0;
790
+ return p(), () => {
791
+ i.removeEventListener("scroll", y), w &&= (clearTimeout(w), null);
792
+ };
793
+ }, r = ((e, t = 50) => `linear(${Array.from({ length: t + 1 }, (n, r) => e(r / t)).map((e) => +e.toFixed(4)).join(", ")})`)((e) => {
794
+ if (e === 0 || e === 1) return e;
795
+ let t = 2 * Math.PI / 3;
796
+ return 2 ** (-10 * e) * Math.sin((e * 10 - .75) * t) + 1;
797
+ }), i = (e = {}) => {
798
+ let t = {
799
+ adScrollHeight: "300vh",
800
+ bandHeight: 24,
801
+ bandBg: "#222",
802
+ bandColor: "#fff",
803
+ bandFontSize: "10px",
804
+ bandFontFamily: "Arial, Helvetica, sans-serif",
805
+ bandLetterSpacing: "1px",
806
+ labelTop: "Advertisement",
807
+ labelBottomResume: "Scroll to continue",
808
+ labelBottomMid: "Keep scrolling",
809
+ labelBottomLate: "Almost there",
810
+ labelBottomNow: "Content now ↓",
811
+ progressBarColor: "rgba(255,255,255,0.35)",
812
+ zIndexTop: 9,
813
+ zIndexBottom: 8,
814
+ bottomBandShowAt: 400,
815
+ bottomBandHideAt: 300,
816
+ snapPx: 50,
817
+ snapOverlap: 2,
818
+ stretchOverlap: 20,
819
+ snapDuration: .9,
820
+ snapEase: r,
821
+ onEnter: null,
822
+ onExit: null,
823
+ onProgress: null,
824
+ thresholds: [],
825
+ ...e
826
+ }, n = window.frameElement ? window.frameElement : null;
827
+ if (!n) return () => {};
828
+ let i = window.parent;
829
+ if (!i || i === window) return () => {};
830
+ let a = null;
831
+ try {
832
+ a = i.document, i.location.href;
833
+ } catch {
834
+ return () => {};
835
+ }
836
+ let o = (() => {
837
+ let e = a.querySelector("#adspot-mobile-mobile-3-above");
838
+ if (e) return e;
839
+ let t = n.parentElement;
840
+ for (; t && t !== a.body;) {
841
+ if (t.id && t.id.includes("adspot")) return t;
842
+ t = t.parentElement;
843
+ }
844
+ return n.parentElement;
845
+ })();
846
+ if (!o) return () => {};
847
+ let s = o.getAttribute("style"), c = n.getAttribute("style"), l = [], u = {
848
+ width: "100vw",
849
+ marginLeft: "calc(50% - 50vw)",
850
+ height: t.bandHeight + "px",
851
+ backgroundColor: t.bandBg,
852
+ color: t.bandColor,
853
+ fontSize: t.bandFontSize,
854
+ fontFamily: t.bandFontFamily,
855
+ textTransform: "uppercase",
856
+ letterSpacing: t.bandLetterSpacing,
857
+ display: "flex",
858
+ alignItems: "center",
859
+ justifyContent: "center",
860
+ pointerEvents: "none"
861
+ };
862
+ (() => {
863
+ let e = o.style;
864
+ e.height = t.adScrollHeight, e.maxHeight = t.adScrollHeight, e.position = "relative", o.setAttribute("poweredAC", "0.1.7"), e.clipPath = `inset(-${t.bandHeight - 1}px 0 0 0)`, e.overflow = "visible", e.width = "100vw", e.maxWidth = "100vw", e.marginLeft = "calc(50% - 50vw)", e.marginRight = "0", e.marginTop = "0", e.marginBottom = "0", e.padding = "0";
865
+ let r = o.parentElement;
866
+ for (let e = 0; e < 6 && r && r !== a.body; e++) {
867
+ let t = i.getComputedStyle(r), n = !1;
868
+ (t.overflow === "hidden" || t.overflowY === "hidden") && (l.push({
869
+ el: r,
870
+ prop: "overflow",
871
+ val: r.style.overflow
872
+ }), l.push({
873
+ el: r,
874
+ prop: "overflowY",
875
+ val: r.style.overflowY
876
+ }), r.style.overflow = "visible", r.style.overflowY = "visible", n = !0);
877
+ let a = parseFloat(t.height);
878
+ t.height !== "auto" && !isNaN(a) && a < 600 && (l.push({
879
+ el: r,
880
+ prop: "height",
881
+ val: r.style.height
882
+ }), r.style.height = "auto", n = !0);
883
+ let o = t.maxHeight;
884
+ if (o && o !== "none" && (l.push({
885
+ el: r,
886
+ prop: "maxHeight",
887
+ val: r.style.maxHeight
888
+ }), r.style.maxHeight = "none", n = !0), !n && e > 1) break;
889
+ r = r.parentElement;
890
+ }
891
+ let s = n.style;
892
+ s.position = "fixed", s.top = "0", s.left = "0", s.width = "100vw", s.height = "100vh", s.maxWidth = "100vw", s.margin = "0", s.padding = "0", s.border = "none", s.zIndex = "1";
893
+ let c = a.createElement("div");
894
+ c.id = "interscroller-top-band-wrapper", Object.assign(c.style, {
895
+ position: "sticky",
896
+ bottom: "0",
897
+ width: "100vw",
898
+ marginLeft: "calc(50% - 50vw)",
899
+ zIndex: t.zIndexTop,
900
+ pointerEvents: "none"
901
+ });
902
+ let d = a.createElement("div");
903
+ d.id = "interscroller-top-band", d.textContent = t.labelTop, Object.assign(d.style, u, {
904
+ position: "relative",
905
+ width: "100%",
906
+ marginLeft: "0",
907
+ transformOrigin: "top center"
908
+ }), c.appendChild(d), o.insertAdjacentElement("beforebegin", c);
909
+ let f = a.createElement("div");
910
+ f.id = "interscroller-bottom-band", Object.assign(f.style, u, {
911
+ position: "fixed",
912
+ bottom: "0",
913
+ left: "0",
914
+ zIndex: t.zIndexBottom,
915
+ display: "flex",
916
+ overflow: "hidden",
917
+ transform: "translateY(100%)",
918
+ transition: "none"
919
+ });
920
+ let p = a.createElement("span");
921
+ if (p.id = "interscroller-bottom-label", p.textContent = t.labelBottomResume, p.style.cssText = "position:relative;z-index:1;pointer-events:none;", f.appendChild(p), t.progressBarColor) {
922
+ let e = a.createElement("span");
923
+ e.id = "interscroller-bottom-progress", e.style.cssText = [
924
+ "position:absolute",
925
+ "inset:0",
926
+ "width:0%",
927
+ `background:${t.progressBarColor}`,
928
+ "transition:none",
929
+ "z-index:0",
930
+ "pointer-events:none"
931
+ ].join(";"), f.appendChild(e);
932
+ }
933
+ o.after(f);
934
+ })();
935
+ let d = a.querySelector("#interscroller-top-band"), f = a.querySelector("#interscroller-top-band-wrapper"), p = a.querySelector("#interscroller-bottom-band"), m = a.querySelector("#interscroller-bottom-label"), h = a.querySelector("#interscroller-bottom-progress"), g = t.bandHeight, _ = t.snapPx, v = !1, y = !1, b = !1, x = !1, S = (t.thresholds || []).map(() => !1), C = () => {
936
+ if (!p) return;
937
+ let e = o.getBoundingClientRect(), n = i.innerHeight, r = e.top <= n, a = e.bottom <= n - g, s = x ? e.top <= n - t.bottomBandHideAt : e.top <= n - t.bottomBandShowAt, c = o.offsetHeight, l = Math.min(1, Math.max(0, (n - e.top) / (c + n))), u = Math.min(1, Math.max(0, (n - e.top) / (c + g))), f = Math.min(1, Math.max(0, (n - e.top) / c)), C = Math.min(e.bottom, n) - Math.max(e.top - g, 0), w = Math.min(1, Math.max(0, C / n)), T = Math.max(0, Math.round(e.bottom - n));
938
+ !y && r && t.onEnter && t.onEnter(), !b && a && t.onExit && t.onExit(), y = r, b = a, x = s, t.onProgress && t.onProgress({
939
+ scrollProgress: l,
940
+ adExposure: f,
941
+ viewportCoverage: w,
942
+ pxRemaining: T
943
+ }), (t.thresholds || []).forEach((e, t) => {
944
+ let n = S[t], r = l >= e.at;
945
+ !n && r ? (S[t] = !0, e.onEnter && e.onEnter(l)) : n && !r && (S[t] = !1, e.onLeave && e.onLeave(l));
946
+ });
947
+ let E = n;
948
+ if (d && e.top <= E + t.stretchOverlap && !a) {
949
+ let n = E - e.top;
950
+ if (!v && n <= _ - t.snapOverlap) {
951
+ let e = 1 + Math.max(0, n + t.stretchOverlap) / g;
952
+ d.style.transition = "none", d.style.transform = `scaleY(${e})`;
953
+ } else !v && n > _ - t.snapOverlap && (v = !0, d.style.transition = `transform ${t.snapDuration}s ${t.snapEase}`, d.style.transform = "scaleY(1)");
954
+ } else d && e.top > E + t.stretchOverlap && (v = !1, d.style.transition = "none", d.style.transform = "scaleY(1)");
955
+ let D = i.visualViewport ? Math.round(i.innerHeight - (i.visualViewport.offsetTop + i.visualViewport.height)) : 0;
956
+ a ? (p.style.transition = "none", p.style.transform = "none", p.style.position = "sticky", p.style.top = "0", p.style.bottom = "", p.style.left = "", p.style.marginLeft = "calc(50% - 50vw)", p.style.width = "100vw", m && (m.textContent = t.labelBottomNow), h && (h.style.width = "100%")) : s ? (m && (m.textContent = T > 0 ? u < .2 ? t.labelBottomResume : u < .75 ? t.labelBottomMid : t.labelBottomLate : t.labelBottomNow), h && (h.style.width = `${Math.round(u * 100)}%`), p.style.transition = "transform 0.3s ease", p.style.transform = "translateY(0)", p.style.position = "fixed", p.style.bottom = `${D}px`, p.style.top = "", p.style.left = "0", p.style.marginLeft = "0", p.style.width = "100vw") : (p.style.transition = "transform 0.3s ease", p.style.transform = "translateY(100%)", p.style.position = "fixed", p.style.bottom = `${D}px`, p.style.left = "0", p.style.marginLeft = "0", p.style.width = "100vw");
957
+ };
958
+ return C(), i.addEventListener("scroll", C, { passive: !0 }), i.visualViewport?.addEventListener("resize", C, { passive: !0 }), () => {
959
+ i.removeEventListener("scroll", C), i.visualViewport?.removeEventListener("resize", C), f ? f.remove() : d && d.remove(), p && p.remove(), s ? o.setAttribute("style", s) : o.removeAttribute("style"), c ? n.setAttribute("style", c) : n.removeAttribute("style"), l.forEach(({ el: e, prop: t, val: n }) => {
960
+ e.style[t] = n || "";
961
+ });
962
+ };
963
+ }, a = (e = {}) => {
964
+ let t = {
965
+ adaptToWidth: "100%",
966
+ maxWidth: "400px",
967
+ maintainAspectRatio: !0,
968
+ adaptToHeight: !1,
969
+ zIndex: 7,
970
+ onAdapt: null,
971
+ ...e
972
+ }, n = window.frameElement ?? null;
973
+ if (!n) return () => {};
974
+ let r = window.parent;
975
+ if (!r || r === window) return () => {};
976
+ let i = null;
977
+ try {
978
+ i = r.document, r.location.href;
979
+ } catch {
980
+ return () => {};
981
+ }
982
+ let a = (() => {
983
+ let e = i.querySelector("#adspot-mobile-mbanner-2-above");
984
+ if (e) return e;
985
+ let t = n.parentElement;
986
+ for (; t && t !== i.body;) {
987
+ if (t.id && t.id.includes("adspot")) return t;
988
+ t = t.parentElement;
989
+ }
990
+ return n.parentElement;
991
+ })();
992
+ if (!a) return () => {};
993
+ let o = a.getAttribute("style"), s = n.getAttribute("style"), c = n.parentElement === a ? null : n.parentElement, l = c ? c.getAttribute("style") : null, u = a.parentElement, d = u ? r.getComputedStyle(u).paddingTop : null, f = null, p = parseInt(n.getAttribute("width"), 10) || 320, m = parseInt(n.getAttribute("height"), 10) || 50;
994
+ return (() => {
995
+ let e = a.style;
996
+ if (e.position = "relative", e.overflow = "visible", e.boxSizing = "border-box", a.setAttribute("poweredAC", "0.1.7"), c) {
997
+ let e = c.style;
998
+ e.width = "100%", e.height = "100%", e.margin = "0", e.textAlign = "left";
999
+ }
1000
+ let t = n.style;
1001
+ t.display = "block", t.width = "100%", t.height = "100%", t.border = "none", t.margin = "0", t.padding = "0";
1002
+ })(), (() => {
1003
+ let e = a.style;
1004
+ e.zIndex = String(t.zIndex), t.adaptToWidth && (e.width = t.adaptToWidth, e.maxWidth = t.maxWidth || t.adaptToWidth, t.maxWidth && t.adaptToWidth !== "100vw" && !t.adaptToWidth.endsWith("vw") ? (e.marginLeft = "auto", e.marginRight = "auto") : (t.adaptToWidth === "100vw" || t.adaptToWidth.endsWith("vw")) && (e.marginLeft = "calc(50% - 50vw)", e.marginRight = "0")), u && d && d !== "0px" && (u.style.paddingTop = "0"), t.maintainAspectRatio ? r.requestAnimationFrame(() => {
1005
+ let e = a.offsetWidth || p, r = Math.round((m || 50) / p * e);
1006
+ a.style.height = r + "px", c && (c.style.height = r + "px"), n.style.height = r + "px", t.onAdapt && t.onAdapt();
1007
+ }) : (t.adaptToHeight && (e.height = t.adaptToHeight), t.onAdapt && t.onAdapt());
1008
+ })(), () => {
1009
+ f &&= (f.disconnect(), null), o ? a.setAttribute("style", o) : a.removeAttribute("style"), s ? n.setAttribute("style", s) : n.removeAttribute("style"), c && (l ? c.setAttribute("style", l) : c.removeAttribute("style")), u && d && d !== "0px" && (u.style.paddingTop = d);
1010
+ };
1011
+ }, o = (e = {}) => {
1012
+ let t = {
1013
+ billboardHeight: 150,
1014
+ sideStripWidth: 10,
1015
+ zIndex: 0,
1016
+ creativeUrl: null,
1017
+ onAdapt: null,
1018
+ ...e
1019
+ }, n = window.frameElement ?? null;
1020
+ if (!n) return () => {};
1021
+ let r = window.parent;
1022
+ if (!r || r === window) return () => {};
1023
+ let i = null;
1024
+ try {
1025
+ i = r.document, r.location.href;
1026
+ } catch {
1027
+ return () => {};
1028
+ }
1029
+ let a = (() => {
1030
+ let e = i.querySelector("#adspot-mobile-mbanner-2-above");
1031
+ if (e) return e;
1032
+ let t = n.parentElement;
1033
+ for (; t && t !== i.body;) {
1034
+ if (t.id && t.id.includes("adspot")) return t;
1035
+ t = t.parentElement;
1036
+ }
1037
+ return n.parentElement;
1038
+ })();
1039
+ if (!a) return () => {};
1040
+ let o = {
1041
+ nine: {
1042
+ siteBackgroundColor: "#ffffff",
1043
+ setup(e, t) {
1044
+ e.querySelector("main")?.style.setProperty("position", "relative");
1045
+ let n = t?.parentElement?.nextElementSibling;
1046
+ n && n.tagName !== "HEADER" && (n.style.paddingTop = "0px");
1047
+ }
1048
+ },
1049
+ wwos: {
1050
+ siteBackgroundColor: "#ffffff",
1051
+ setup(e, t) {
1052
+ e.querySelector("main")?.style.setProperty("position", "relative");
1053
+ let n = t?.parentElement?.nextElementSibling;
1054
+ n && n.tagName !== "HEADER" && (n.style.paddingTop = "0px");
1055
+ }
1056
+ },
1057
+ nineNews: {
1058
+ siteBackgroundColor: "#ffffff",
1059
+ setup(e) {
1060
+ let t = e.querySelector(".layout");
1061
+ t && (t.style.backgroundColor = "transparent"), e.querySelector(".content")?.style.setProperty("position", "relative");
1062
+ }
1063
+ },
1064
+ lifestyle: {
1065
+ siteBackgroundColor: "#ffffff",
1066
+ setup(e) {
1067
+ e.querySelector("main")?.style.setProperty("position", "relative");
1068
+ }
1069
+ },
1070
+ smh: {
1071
+ siteBackgroundColor: "#ffffff",
1072
+ setup(e) {
1073
+ e.querySelector("main")?.style.setProperty("position", "relative");
1074
+ }
1075
+ },
1076
+ theage: {
1077
+ siteBackgroundColor: "#ffffff",
1078
+ setup(e) {
1079
+ e.querySelector("main")?.style.setProperty("position", "relative");
1080
+ }
1081
+ }
1082
+ }, s = [
1083
+ {
1084
+ site: "https://www.nine.com.au/sport",
1085
+ config: o.wwos
1086
+ },
1087
+ {
1088
+ site: "https://staging.nine.com.au/sport",
1089
+ config: o.wwos
1090
+ },
1091
+ {
1092
+ site: "https://www.nine.com.au",
1093
+ config: o.nine
1094
+ },
1095
+ {
1096
+ site: "https://staging.nine.com.au",
1097
+ config: o.nine
1098
+ },
1099
+ {
1100
+ site: "https://preview.nine.com.au",
1101
+ config: o.nine
1102
+ },
1103
+ {
1104
+ site: "https://www.9news",
1105
+ config: o.nineNews
1106
+ },
1107
+ {
1108
+ site: "https://staging.9news",
1109
+ config: o.nineNews
1110
+ },
1111
+ {
1112
+ site: "https://honey",
1113
+ config: o.lifestyle
1114
+ },
1115
+ {
1116
+ site: "https://www.smh",
1117
+ config: o.smh
1118
+ },
1119
+ {
1120
+ site: "https://www.theage",
1121
+ config: o.theage
1122
+ },
1123
+ {
1124
+ site: "https://creative-preview-an.com",
1125
+ config: o.nine
1126
+ }
1127
+ ], c = (() => {
1128
+ let e = r.location.href;
1129
+ for (let t of s) if (e.indexOf(t.site) >= 0) return t.config;
1130
+ return o.nine;
1131
+ })(), l = n.getAttribute("style"), u = a.getAttribute("style"), d = n.parentElement === a ? null : n.parentElement, f = d ? d.getAttribute("style") : null, p = a.parentElement, m = p ? p.getAttribute("style") : null, h = null, g = null, _ = [], v = () => {
1132
+ let e = n.parentElement;
1133
+ for (; e && e !== i.body && e !== i.documentElement;) {
1134
+ let t = r.getComputedStyle(e);
1135
+ (t.transform && t.transform !== "none" || t.willChange && t.willChange !== "auto" || t.contain && t.contain !== "none" || t.filter && t.filter !== "none" || t.perspective && t.perspective !== "none") && (_.push({
1136
+ el: e,
1137
+ orig: e.getAttribute("style")
1138
+ }), e.style.transform = "none", e.style.willChange = "auto", e.style.contain = "none", e.style.filter = "none", e.style.perspective = "none"), t.overflow !== "visible" && (_.find((t) => t.el === e) || _.push({
1139
+ el: e,
1140
+ orig: e.getAttribute("style")
1141
+ }), e.style.overflow = "visible"), e = e.parentElement;
1142
+ }
1143
+ let o = n.style;
1144
+ if (o.position = "fixed", o.top = "0", o.left = "0", o.width = "100vw", o.height = "100dvh", o.zIndex = String(t.zIndex), o.border = "none", o.margin = "0", o.padding = "0", o.display = "block", a.setAttribute("poweredAC", "0.1.7"), d) {
1145
+ let e = d.style;
1146
+ e.width = "100%", e.height = "0", e.overflow = "visible", e.position = "static", e.margin = "0";
1147
+ }
1148
+ let s = a.style;
1149
+ s.height = t.billboardHeight + "px", s.minHeight = t.billboardHeight + "px", s.background = "transparent", s.overflow = "visible", s.position = "relative", s.width = "100%", s.padding = "0", s.margin = "0", p && (p.style.overflow = "visible", p.style.position = "relative", p.style.backgroundColor = "transparent", p.style.height = t.billboardHeight + "px", p.style.minHeight = t.billboardHeight + "px", p.style.maxHeight = t.billboardHeight + "px", p.style.padding = "0", p.style.margin = "0", p.setAttribute("data-mf-slot", ""));
1150
+ let l = `max(${t.sideStripWidth}px, env(safe-area-inset-left))`, u = `max(${t.sideStripWidth}px, env(safe-area-inset-right))`;
1151
+ h = i.createElement("style"), h.id = "mobilefireplace-pac", h.textContent = `
907
1152
  /* Mobile Fireplace — powered-ad-config */
908
1153
  html, body {
909
1154
  background-color: transparent !important;
@@ -921,9 +1166,9 @@ const V = (x) => {
921
1166
  body > * > * {
922
1167
  position: relative;
923
1168
  z-index: 1;
924
- background-color: ${N.siteBackgroundColor};
925
- margin-left: ${h} !important;
926
- margin-right: ${o} !important;
1169
+ background-color: ${c.siteBackgroundColor};
1170
+ margin-left: ${l} !important;
1171
+ margin-right: ${u} !important;
927
1172
  }
928
1173
  /* Header, nav and network nav stay full-width — no side margin, keep own background */
929
1174
  body > * > header,
@@ -955,62 +1200,50 @@ const V = (x) => {
955
1200
  margin: 0 !important;
956
1201
  padding: 0 !important;
957
1202
  }
958
- `, a.head.appendChild(B), N.setup && N.setup(a, r);
959
- };
960
- let A = null;
961
- const i = () => {
962
- const t = l.innerWidth, e = l.innerHeight;
963
- if (t > e) {
964
- const c = e / t, h = Math.round(n.billboardHeight * c);
965
- r.style.height = h + "px", r.style.minHeight = h + "px", d && (d.style.height = h + "px");
966
- } else
967
- r.style.height = n.billboardHeight + "px", r.style.minHeight = n.billboardHeight + "px", d && (d.style.height = n.billboardHeight + "px");
968
- };
969
- k();
970
- const m = window.location.href || "";
971
- if (m && m !== "about:blank")
972
- try {
973
- const t = new URL(m);
974
- t.searchParams.set("mfRole", "billboard"), d = a.createElement("iframe"), d.src = t.href, d.setAttribute("data-mf-billboard-iframe", ""), d.setAttribute("scrolling", "no"), d.setAttribute("frameborder", "0");
975
- const e = d.style;
976
- e.position = "relative", e.width = "100%", e.height = n.billboardHeight + "px", e.border = "none", e.margin = "0", e.padding = "0", e.display = "block", e.overflow = "hidden", e.background = "transparent", e.zIndex = "1", r.appendChild(d);
977
- } catch (t) {
978
- console.warn("[mobilefireplace] Could not create billboard iframe:", t);
979
- }
980
- return l.__mfBridge = {
981
- adapted: !1,
982
- wallpaperWindow: p.contentWindow,
983
- billboardIframe: d,
984
- billboardWindow: null
985
- }, d && d.addEventListener("load", () => {
986
- try {
987
- l.__mfBridge.billboardWindow = d.contentWindow;
988
- } catch {
989
- }
990
- }), A = i, l.addEventListener("resize", A), i(), n.onAdapt && l.requestAnimationFrame(() => {
991
- l.__mfBridge.adapted = !0, n.onAdapt();
992
- }), () => {
993
- A && (l.removeEventListener("resize", A), A = null), B && B.parentNode && (B.parentNode.removeChild(B), B = null), d && d.parentNode && (d.parentNode.removeChild(d), d = null);
994
- try {
995
- delete l.__mfBridge;
996
- } catch {
997
- }
998
- I ? p.setAttribute("style", I) : p.removeAttribute("style");
999
- for (const { el: t, orig: e } of g)
1000
- e ? t.setAttribute("style", e) : t.removeAttribute("style");
1001
- g.length = 0, S ? r.setAttribute("style", S) : r.removeAttribute("style"), M && (y ? M.setAttribute("style", y) : M.removeAttribute("style")), b && (b.removeAttribute("data-mf-slot"), P ? b.setAttribute("style", P) : b.removeAttribute("style"));
1002
- };
1003
- };
1004
- let _ = () => {
1005
- };
1006
- function Z({ adFormat: x = "", stickyOffset: n = 0, logoPosX: p = 0, logoHeight: l = 0, logoSmallHeight: a = 0, ...C } = {}) {
1007
- typeof _ == "function" && _();
1008
- let r = () => {
1009
- };
1010
- return x === "fireplace" ? r = V(n) : x === "fireplace-collant" ? r = Y(n) : x === "logomorph" ? r = U(p, l, a) : x === "interscroller" ? r = K(C) : x === "liquidframe" ? r = J(C) : x === "mobilefireplace" ? r = Q(C) : console.warn("[powered-ad-config] Unknown ad format:", x), _ = typeof r == "function" ? r : () => {
1011
- }, _;
1203
+ `, i.head.appendChild(h), c.setup && c.setup(i, a);
1204
+ }, y = null, b = () => {
1205
+ let e = r.innerWidth, n = r.innerHeight;
1206
+ if (e > n) {
1207
+ let r = n / e, i = Math.round(t.billboardHeight * r);
1208
+ a.style.height = i + "px", a.style.minHeight = i + "px", g && (g.style.height = i + "px");
1209
+ } else a.style.height = t.billboardHeight + "px", a.style.minHeight = t.billboardHeight + "px", g && (g.style.height = t.billboardHeight + "px");
1210
+ };
1211
+ v();
1212
+ let x = t.creativeUrl || "";
1213
+ if (x && x !== "about:blank") try {
1214
+ let e = new URL(x);
1215
+ e.searchParams.set("mfRole", "billboard"), g = i.createElement("iframe"), g.src = e.href, g.setAttribute("data-mf-billboard-iframe", ""), g.setAttribute("scrolling", "no"), g.setAttribute("frameborder", "0");
1216
+ let n = g.style;
1217
+ n.position = "relative", n.width = "100%", n.height = t.billboardHeight + "px", n.border = "none", n.margin = "0", n.padding = "0", n.display = "block", n.overflow = "hidden", n.background = "transparent", n.zIndex = "1", a.appendChild(g);
1218
+ } catch (e) {
1219
+ console.warn("[mobilefireplace] Could not create billboard iframe:", e);
1220
+ }
1221
+ return r.__mfBridge = {
1222
+ adapted: !1,
1223
+ wallpaperWindow: n.contentWindow,
1224
+ billboardIframe: g,
1225
+ billboardWindow: null
1226
+ }, g && g.addEventListener("load", () => {
1227
+ try {
1228
+ r.__mfBridge.billboardWindow = g.contentWindow;
1229
+ } catch {}
1230
+ }), y = b, r.addEventListener("resize", y), b(), t.onAdapt && r.requestAnimationFrame(() => {
1231
+ r.__mfBridge.adapted = !0, t.onAdapt();
1232
+ }), () => {
1233
+ y &&= (r.removeEventListener("resize", y), null), h && h.parentNode && (h.parentNode.removeChild(h), h = null), g && g.parentNode && (g.parentNode.removeChild(g), g = null);
1234
+ try {
1235
+ delete r.__mfBridge;
1236
+ } catch {}
1237
+ l ? n.setAttribute("style", l) : n.removeAttribute("style");
1238
+ for (let { el: e, orig: t } of _) t ? e.setAttribute("style", t) : e.removeAttribute("style");
1239
+ _.length = 0, u ? a.setAttribute("style", u) : a.removeAttribute("style"), d && (f ? d.setAttribute("style", f) : d.removeAttribute("style")), p && (p.removeAttribute("data-mf-slot"), m ? p.setAttribute("style", m) : p.removeAttribute("style"));
1240
+ };
1241
+ }, s = () => {};
1242
+ function c({ adFormat: r = "", stickyOffset: c = 0, logoPosX: l = 0, logoHeight: u = 0, logoSmallHeight: d = 0, ...f } = {}) {
1243
+ typeof s == "function" && s();
1244
+ let p = () => {};
1245
+ return r === "fireplace" ? p = e(c) : r === "fireplace-collant" ? p = t(c) : r === "logomorph" ? p = n(l, u, d) : r === "interscroller" ? p = i(f) : r === "liquidframe" ? p = a(f) : r === "mobilefireplace" ? p = o(f) : console.warn("[powered-ad-config] Unknown ad format:", r), s = typeof p == "function" ? p : () => {}, s;
1012
1246
  }
1013
- Z.version = "0.1.5";
1014
- export {
1015
- Z as default
1016
- };
1247
+ c.version = "0.1.7";
1248
+ //#endregion
1249
+ export { c as default };