powered-ad-config 0.1.8 → 0.1.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/powered-ad-config.es.js +304 -118
- package/dist/powered-ad-config.umd.js +92 -5
- package/package.json +2 -2
|
@@ -10,7 +10,7 @@ var e = (e) => {
|
|
|
10
10
|
} catch {
|
|
11
11
|
return () => {};
|
|
12
12
|
}
|
|
13
|
-
let i = {
|
|
13
|
+
let i = null, a = null, o = {
|
|
14
14
|
siteBackgroundColor: "#ffffff",
|
|
15
15
|
fireplaceLeftMargin: 0,
|
|
16
16
|
adNodeMarginTop: -24,
|
|
@@ -26,7 +26,7 @@ var e = (e) => {
|
|
|
26
26
|
let e = window.parent.document, t = (e, t) => e.forEach((e) => t.forEach(([t, n]) => e.style[t] = n));
|
|
27
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
28
|
}
|
|
29
|
-
},
|
|
29
|
+
}, s = {
|
|
30
30
|
siteBackgroundColor: "#ffffff",
|
|
31
31
|
fireplaceLeftMargin: 0,
|
|
32
32
|
adNodeMarginTop: -24,
|
|
@@ -42,11 +42,16 @@ var e = (e) => {
|
|
|
42
42
|
let e = window.parent.document, t = (e, t) => e.forEach((e) => t.forEach(([t, n]) => e.style[t] = n));
|
|
43
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
44
|
}
|
|
45
|
-
},
|
|
45
|
+
}, c = () => {
|
|
46
|
+
let e = r.querySelector("#app"), t = r.querySelector("#desktop-header-ads");
|
|
47
|
+
return !e || !t || t.parentElement !== e || !e.querySelector(":scope > .sc-llJctl") ? null : e;
|
|
48
|
+
}, l = () => !!c(), u = () => !!(r.querySelector("#app.wwos") && r.querySelector("#desktop-header-ads")), d = {
|
|
46
49
|
siteBackgroundColor: "#ffffff",
|
|
47
50
|
fireplaceLeftMargin: 0,
|
|
48
51
|
adNodeMarginTop: -24,
|
|
49
52
|
adNodeMarginBottom: -55,
|
|
53
|
+
iframeWidth: "100%",
|
|
54
|
+
iframeHeight: "1000px",
|
|
50
55
|
responsiveScroll: -120,
|
|
51
56
|
xPosHalfpage: 722,
|
|
52
57
|
yPosHalfpage: 32,
|
|
@@ -61,7 +66,47 @@ var e = (e) => {
|
|
|
61
66
|
t.innerHTML = "\n div:has(#adspot-tablet-takeover-2-above) {\n position: static;\n }\n ", e.head.appendChild(t);
|
|
62
67
|
}
|
|
63
68
|
}
|
|
64
|
-
},
|
|
69
|
+
}, f = {
|
|
70
|
+
siteBackgroundColor: "#ffffff",
|
|
71
|
+
fireplaceLeftMargin: 0,
|
|
72
|
+
adNodeMarginTop: 0,
|
|
73
|
+
adNodeMarginBottom: 0,
|
|
74
|
+
iframeWidth: "100vw",
|
|
75
|
+
iframeHeight: "1152px",
|
|
76
|
+
responsiveScroll: -120,
|
|
77
|
+
xPosHalfpage: 722,
|
|
78
|
+
yPosHalfpage: 32,
|
|
79
|
+
stickyMargin: {
|
|
80
|
+
offset: 74,
|
|
81
|
+
isSticky: !0
|
|
82
|
+
},
|
|
83
|
+
zIndex: function() {
|
|
84
|
+
let e = window.parent.document, t = (e, t, n) => {
|
|
85
|
+
e && e.style[t] !== n && (e.style[t] = n);
|
|
86
|
+
}, n = (e, n) => e.forEach((e) => {
|
|
87
|
+
n.forEach(([n, r]) => {
|
|
88
|
+
t(e, n, r);
|
|
89
|
+
});
|
|
90
|
+
}), r = (e) => e ? Array.from(e.querySelectorAll(":scope > main, :scope > aside, :scope > footer")) : [], i = (t, n) => {
|
|
91
|
+
let r = e.getElementById(t);
|
|
92
|
+
r || (r = e.createElement("style"), r.id = t, e.head.appendChild(r)), r.textContent = n;
|
|
93
|
+
}, a = (e) => {
|
|
94
|
+
n(Array.from(e.querySelectorAll("*")).filter((e) => e.children.length > 0 ? !1 : e.textContent?.trim().toLowerCase() === "advertisement"), [["display", "none"]]);
|
|
95
|
+
};
|
|
96
|
+
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");
|
|
97
|
+
let o = c(), s = e.querySelector("#desktop-header-ads");
|
|
98
|
+
if (o && s) {
|
|
99
|
+
let e = o.querySelector(":scope > .sc-llJctl");
|
|
100
|
+
t(s, "height", "250px"), t(s, "padding", "0px"), a(s), i("powered-ac-nine-new-header-overrides", "\n #app > .sc-llJctl.hgiQrx {\n width: 100%;\n max-width: 1190px;\n margin-left: auto;\n margin-right: auto;\n position: relative;\n z-index: 1085;\n }\n\n #app > .sc-llJctl header {\n position: relative;\n }\n\n #app > .sc-llJctl header .bVJveH,\n #app > .sc-llJctl header [class*=\"sc-eFWqGm\"] {\n width: min(1190px, calc(100vw - 32px)) !important;\n max-width: min(1190px, calc(100vw - 32px)) !important;\n left: 50% !important;\n right: auto !important;\n transform: translateX(-50%) !important;\n }\n\n #app > .sc-llJctl.FwHsm {\n z-index: 1086;\n }\n\n #app > header[data-tv-show] {\n width: 100%;\n max-width: 1190px;\n margin-left: auto;\n margin-right: auto;\n }\n\n #app .sc-gicCDH.bNInIa {\n width: 100%;\n max-width: 100%;\n margin-left: 0;\n margin-right: 0;\n position: relative;\n z-index: 1086;\n }\n ");
|
|
101
|
+
let c = Array.from(o.children).filter((t) => t !== s && t !== e);
|
|
102
|
+
n(c, [["position", "relative"], ["zIndex", "1071"]]), n(c.flatMap((e) => r(e)), [["position", "relative"], ["zIndex", "1072"]]);
|
|
103
|
+
}
|
|
104
|
+
if (e.querySelector("div[id*=\"tablet\"][id*=\"takeover\"]")) {
|
|
105
|
+
let t = e.createElement("style");
|
|
106
|
+
t.innerHTML = "\n div:has(#adspot-tablet-takeover-2-above) {\n position: static;\n }\n ", e.head.appendChild(t);
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
}, p = () => l() ? f : d, m = {
|
|
65
110
|
siteBackgroundColor: "#ffffff",
|
|
66
111
|
fireplaceLeftMargin: 0,
|
|
67
112
|
adNodeMarginTop: -24,
|
|
@@ -80,7 +125,41 @@ var e = (e) => {
|
|
|
80
125
|
t.innerHTML = "\n div:has(#adspot-tablet-takeover-2-above) {\n position: static;\n }\n ", e.head.appendChild(t);
|
|
81
126
|
}
|
|
82
127
|
}
|
|
83
|
-
},
|
|
128
|
+
}, h = {
|
|
129
|
+
siteBackgroundColor: "#ffffff",
|
|
130
|
+
fireplaceLeftMargin: 0,
|
|
131
|
+
adNodeMarginTop: 0,
|
|
132
|
+
adNodeMarginBottom: 0,
|
|
133
|
+
iframeWidth: "100vw",
|
|
134
|
+
iframeHeight: "1152px",
|
|
135
|
+
responsiveScroll: -124,
|
|
136
|
+
xPosHalfpage: 720,
|
|
137
|
+
yPosHalfpage: 32,
|
|
138
|
+
stickyMargin: {
|
|
139
|
+
offset: 94,
|
|
140
|
+
isSticky: !0
|
|
141
|
+
},
|
|
142
|
+
zIndex: function() {
|
|
143
|
+
let e = window.parent.document, t = (e, t, n) => {
|
|
144
|
+
e && e.style[t] !== n && (e.style[t] = n);
|
|
145
|
+
}, n = (e, n) => e.forEach((e) => {
|
|
146
|
+
n.forEach(([n, r]) => {
|
|
147
|
+
t(e, n, r);
|
|
148
|
+
});
|
|
149
|
+
}), r = (t, n) => {
|
|
150
|
+
let r = e.getElementById(t);
|
|
151
|
+
r || (r = e.createElement("style"), r.id = t, e.head.appendChild(r)), r.textContent = n;
|
|
152
|
+
}, i = (e) => {
|
|
153
|
+
n(Array.from(e.querySelectorAll("*")).filter((e) => e.children.length > 0 ? !1 : e.textContent?.trim().toLowerCase() === "advertisement"), [["display", "none"]]);
|
|
154
|
+
}, a = e.querySelector("#app.wwos"), o = e.querySelector("#desktop-header-ads"), s = a ? Array.from(a.children) : [], c = a?.querySelector(":scope > .sc-llJctl");
|
|
155
|
+
o && (t(o, "height", "250px"), t(o, "padding", "0px"), i(o)), r("powered-ac-wwos-new-header-overrides", "\n #app.wwos > .sc-llJctl.hgiQrx {\n width: 100%;\n max-width: 1190px;\n margin-left: auto;\n margin-right: auto;\n position: relative;\n z-index: 1085;\n }\n\n #app.wwos > .sc-llJctl.FwHsm {\n z-index: 1086;\n }\n\n #app.wwos > .sc-llJctl .sc-dkdnUC.hvGHcI {\n position: static;\n }\n\n #app.wwos > .sc-llJctl .sc-dkdnUC.hvGHcI > [class*=\"sc-eFWqGm\"],\n #app.wwos > .sc-llJctl .sc-dkdnUC.hvGHcI [class*=\"sc-eFWqGm\"] {\n position: absolute;\n top: 100%;\n left: 50%;\n right: auto;\n width: min(1190px, calc(100vw - 32px));\n transform: translateX(-50%);\n z-index: 1;\n }\n\n #app.wwos .sc-gicCDH.bNInIa {\n width: 100%;\n max-width: 100%;\n margin-left: 0;\n margin-right: 0;\n position: relative;\n z-index: 1086;\n }\n "), n(s.filter((e) => e !== o && e !== c), [["position", "relative"], ["zIndex", "1071"]]), n(Array.from(e.querySelectorAll("main, aside, article, footer, .sc-kACOFj.bkaoXt, .sc-hpDagB.HUkOB, [id*=\"adspot-desktop-banner-\"]")), [["position", "relative"], ["zIndex", "1072"]]);
|
|
156
|
+
let l = e.querySelector("footer")?.previousElementSibling;
|
|
157
|
+
if (l && l.tagName.toLowerCase() === "div" && (l.style.position = "relative"), e.querySelector("div[id*=\"tablet\"][id*=\"takeover\"]")) {
|
|
158
|
+
let t = e.createElement("style");
|
|
159
|
+
t.innerHTML = "\n div:has(#adspot-tablet-takeover-2-above) {\n position: static;\n }\n ", e.head.appendChild(t);
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
}, g = () => u() ? h : m, _ = {
|
|
84
163
|
siteBackgroundColor: "#ffffff",
|
|
85
164
|
fireplaceLeftMargin: 0,
|
|
86
165
|
adNodeMarginTop: -32,
|
|
@@ -96,157 +175,205 @@ var e = (e) => {
|
|
|
96
175
|
let e = window.parent.document;
|
|
97
176
|
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);");
|
|
98
177
|
}
|
|
99
|
-
},
|
|
178
|
+
}, v = [
|
|
100
179
|
{
|
|
101
180
|
site: "https://www.nine.com.au/sport",
|
|
102
|
-
config:
|
|
181
|
+
config: g
|
|
103
182
|
},
|
|
104
183
|
{
|
|
105
184
|
site: "https://www.nine.com.au/product-reviews",
|
|
106
|
-
config:
|
|
185
|
+
config: s
|
|
107
186
|
},
|
|
108
187
|
{
|
|
109
188
|
site: "https://www.nine.com.au/property",
|
|
110
|
-
config:
|
|
189
|
+
config: s
|
|
111
190
|
},
|
|
112
191
|
{
|
|
113
192
|
site: "https://www.nine.com.au/entertainment",
|
|
114
|
-
config:
|
|
193
|
+
config: p
|
|
115
194
|
},
|
|
116
195
|
{
|
|
117
196
|
site: "https://staging.nine.com.au/sport",
|
|
118
|
-
config:
|
|
197
|
+
config: g
|
|
119
198
|
},
|
|
120
199
|
{
|
|
121
200
|
site: "https://staging.nine.com.au/product-reviews",
|
|
122
|
-
config:
|
|
201
|
+
config: s
|
|
123
202
|
},
|
|
124
203
|
{
|
|
125
204
|
site: "https://staging.nine.com.au/property",
|
|
126
|
-
config:
|
|
205
|
+
config: s
|
|
127
206
|
},
|
|
128
207
|
{
|
|
129
208
|
site: "https://staging.nine.com.au/entertainment",
|
|
130
|
-
config:
|
|
209
|
+
config: p
|
|
131
210
|
},
|
|
132
211
|
{
|
|
133
212
|
site: "https://render-web-nine-staging-v1.ffxblue.com.au",
|
|
134
|
-
config:
|
|
213
|
+
config: p
|
|
135
214
|
},
|
|
136
215
|
{
|
|
137
216
|
site: "https://render-web-nine-production-v1.ffxblue.com.au",
|
|
138
|
-
config:
|
|
217
|
+
config: p
|
|
139
218
|
},
|
|
140
219
|
{
|
|
141
220
|
site: "https://preview.nine.com.au/",
|
|
142
|
-
config:
|
|
221
|
+
config: p
|
|
143
222
|
},
|
|
144
223
|
{
|
|
145
224
|
site: "https://www.nine",
|
|
146
|
-
config:
|
|
225
|
+
config: p
|
|
147
226
|
},
|
|
148
227
|
{
|
|
149
228
|
site: "https://staging.nine",
|
|
150
|
-
config:
|
|
229
|
+
config: p
|
|
151
230
|
},
|
|
152
231
|
{
|
|
153
232
|
site: "https://entertainment",
|
|
154
|
-
config:
|
|
233
|
+
config: o
|
|
155
234
|
},
|
|
156
235
|
{
|
|
157
236
|
site: "https://celebrity",
|
|
158
|
-
config:
|
|
237
|
+
config: o
|
|
159
238
|
},
|
|
160
239
|
{
|
|
161
240
|
site: "https://homes",
|
|
162
|
-
config:
|
|
241
|
+
config: o
|
|
163
242
|
},
|
|
164
243
|
{
|
|
165
244
|
site: "https://travel",
|
|
166
|
-
config:
|
|
245
|
+
config: o
|
|
167
246
|
},
|
|
168
247
|
{
|
|
169
248
|
site: "https://honey",
|
|
170
|
-
config:
|
|
249
|
+
config: o
|
|
171
250
|
},
|
|
172
251
|
{
|
|
173
252
|
site: "https://style",
|
|
174
|
-
config:
|
|
253
|
+
config: o
|
|
175
254
|
},
|
|
176
255
|
{
|
|
177
256
|
site: "https://coach",
|
|
178
|
-
config:
|
|
257
|
+
config: o
|
|
179
258
|
},
|
|
180
259
|
{
|
|
181
260
|
site: "https://kitchen",
|
|
182
|
-
config:
|
|
261
|
+
config: o
|
|
183
262
|
},
|
|
184
263
|
{
|
|
185
264
|
site: "https://finance",
|
|
186
|
-
config:
|
|
265
|
+
config: o
|
|
187
266
|
},
|
|
188
267
|
{
|
|
189
268
|
site: "https://staging.wwos",
|
|
190
|
-
config:
|
|
269
|
+
config: g
|
|
191
270
|
},
|
|
192
271
|
{
|
|
193
272
|
site: "https://www.9news",
|
|
194
|
-
config:
|
|
273
|
+
config: _
|
|
195
274
|
},
|
|
196
275
|
{
|
|
197
276
|
site: "https://staging.9news",
|
|
198
|
-
config:
|
|
277
|
+
config: _
|
|
199
278
|
},
|
|
200
279
|
{
|
|
201
280
|
site: "https://www.yourtv",
|
|
202
|
-
config:
|
|
281
|
+
config: o
|
|
203
282
|
},
|
|
204
283
|
{
|
|
205
284
|
site: "https://staging.yourtv",
|
|
206
|
-
config:
|
|
285
|
+
config: o
|
|
207
286
|
},
|
|
208
287
|
{
|
|
209
288
|
site: "https://9now",
|
|
210
|
-
config:
|
|
289
|
+
config: s
|
|
211
290
|
},
|
|
212
291
|
{
|
|
213
292
|
site: "https://creative-preview-an.com",
|
|
214
|
-
config:
|
|
293
|
+
config: o
|
|
215
294
|
}
|
|
216
|
-
],
|
|
295
|
+
], y = () => {
|
|
217
296
|
let e = window.document.getElementById("nineContent");
|
|
218
|
-
e && (e.style.backgroundColor =
|
|
219
|
-
|
|
297
|
+
if (e && (e.style.backgroundColor = D.siteBackgroundColor), w(), C(), S(), n.addEventListener("scroll", E), O = setTimeout(E, 50), D === f || D === h) {
|
|
298
|
+
let e = c() || r.body, t = r.querySelector("#desktop-header-ads");
|
|
299
|
+
e && n.MutationObserver && (a = new n.MutationObserver(() => {
|
|
300
|
+
T();
|
|
301
|
+
}), a.observe(e, {
|
|
302
|
+
childList: !0,
|
|
303
|
+
subtree: !0
|
|
304
|
+
}), t && a.observe(t, {
|
|
305
|
+
childList: !0,
|
|
306
|
+
subtree: !0,
|
|
307
|
+
attributes: !0,
|
|
308
|
+
attributeFilter: ["class", "style"]
|
|
309
|
+
})), n.addEventListener("resize", T), T();
|
|
310
|
+
}
|
|
311
|
+
}, b = () => {
|
|
220
312
|
let e = null;
|
|
221
313
|
return e = r.querySelector("div[id*=\"billboard\"][id*=\"above\"]"), e;
|
|
222
|
-
},
|
|
314
|
+
}, x = () => {
|
|
223
315
|
let e = n.location.href;
|
|
224
|
-
for (let t = 0; t <
|
|
225
|
-
|
|
316
|
+
for (let t = 0; t < v.length; t += 1) if (e.indexOf(v[t].site) >= 0) return typeof v[t].config == "function" ? v[t].config() : v[t].config;
|
|
317
|
+
try {
|
|
318
|
+
let t = new URL(e), n = t.hostname.toLowerCase(), r = t.pathname.toLowerCase();
|
|
319
|
+
if (n === "creative-preview-an.com") return o;
|
|
320
|
+
if (n.includes("9news")) return _;
|
|
321
|
+
if (n.includes("yourtv")) return o;
|
|
322
|
+
if (n.includes("9now")) return s;
|
|
323
|
+
if (n === "www.nine.com.au" || n === "staging.nine.com.au" || n === "preview.nine.com.au" || n === "render-web-nine-staging-v1.ffxblue.com.au" || n === "render-web-nine-production-v1.ffxblue.com.au") return r.startsWith("/sport") ? g() : r.startsWith("/product-reviews") || r.startsWith("/property") ? s : p();
|
|
324
|
+
if ([
|
|
325
|
+
"entertainment",
|
|
326
|
+
"celebrity",
|
|
327
|
+
"homes",
|
|
328
|
+
"travel",
|
|
329
|
+
"honey",
|
|
330
|
+
"style",
|
|
331
|
+
"coach",
|
|
332
|
+
"kitchen",
|
|
333
|
+
"finance"
|
|
334
|
+
].some((e) => n.includes(e))) return o;
|
|
335
|
+
} catch {
|
|
336
|
+
return p();
|
|
337
|
+
}
|
|
338
|
+
return p();
|
|
339
|
+
}, S = () => {
|
|
226
340
|
if (!window.parent) return;
|
|
227
341
|
let e = r.querySelector("div[id*=\"halfpage\"][id*=\"above\"]");
|
|
228
342
|
if (!e) return;
|
|
229
343
|
let t = e;
|
|
230
344
|
for (let e = 0; e < 3; e++) if (t = t.parentNode, t && n.getComputedStyle(t).position === "sticky") {
|
|
231
|
-
t.setAttribute("style", `top: ${
|
|
345
|
+
t.setAttribute("style", `top: ${D.stickyMargin.offset}px`);
|
|
232
346
|
break;
|
|
233
347
|
}
|
|
234
|
-
},
|
|
348
|
+
}, C = () => {
|
|
235
349
|
if (!t) return;
|
|
236
350
|
let e = t.style;
|
|
237
|
-
e.width = "100%", e.height = "1000px", e.position = "fixed", e.left = "50%", e.transform = "translate(-50%, 0)";
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
351
|
+
e.width = D.iframeWidth || "100%", e.height = D.iframeHeight || "1000px", e.position = "fixed", e.top = "0", e.left = "50%", e.transform = "translate(-50%, 0)";
|
|
352
|
+
let i = t.parentElement;
|
|
353
|
+
for (; i && i !== r.body && i !== r.documentElement;) {
|
|
354
|
+
let e = n.getComputedStyle(i);
|
|
355
|
+
e.transform && e.transform !== "none" && (i.style.transform = "none"), e.willChange && e.willChange !== "auto" && (i.style.willChange = "auto"), e.contain && e.contain !== "none" && (i.style.contain = "none"), e.filter && e.filter !== "none" && (i.style.filter = "none"), e.perspective && e.perspective !== "none" && (i.style.perspective = "none"), e.overflow !== "visible" && (i.style.overflow = "visible"), i = i.parentElement;
|
|
356
|
+
}
|
|
357
|
+
}, w = () => {
|
|
358
|
+
let e = b();
|
|
359
|
+
if (!e) return;
|
|
360
|
+
let t = e.style;
|
|
361
|
+
e.className &&= "", t.minHeight = "250px", t.marginTop = D.adNodeMarginTop + "px", t.marginBottom = D.adNodeMarginBottom + "px", t.position = "static", t.display = "block", D.zIndex && D.zIndex();
|
|
362
|
+
}, T = () => {
|
|
363
|
+
D !== f || i || (i = n.requestAnimationFrame(() => {
|
|
364
|
+
i = null, C(), w(), S();
|
|
365
|
+
}));
|
|
366
|
+
}, E = () => {
|
|
367
|
+
T();
|
|
243
368
|
let e = n.scrollY, r = t.style, i = document.getElementById("siteContent") ? document.getElementById("siteContent").style : {};
|
|
244
|
-
e >= 0 && e <=
|
|
245
|
-
}
|
|
246
|
-
|
|
247
|
-
let
|
|
248
|
-
|
|
249
|
-
|
|
369
|
+
e >= 0 && e <= k ? (r.transform = `translate(-50%, ${-e}px)`, i.transform = "translateY(0)") : e > k && e <= A ? (r.transform = `translate(-50%, ${-k}px)`, i.transform = `translateY(${k - e}px)`) : e > A && (r.transform = `translate(-50%, ${-k}px)`, i.transform = "translateY(-250px)");
|
|
370
|
+
};
|
|
371
|
+
b();
|
|
372
|
+
let D = x();
|
|
373
|
+
if (!D) return () => {};
|
|
374
|
+
let O = null, k = -D.responsiveScroll + e, A = k + 250;
|
|
375
|
+
return y(), () => {
|
|
376
|
+
n.removeEventListener("scroll", E), n.removeEventListener("resize", T), a &&= (a.disconnect(), null), i &&= (n.cancelAnimationFrame(i), null), O &&= (clearTimeout(O), null);
|
|
250
377
|
};
|
|
251
378
|
}, t = (e) => {
|
|
252
379
|
let t = window.frameElement ? window.frameElement : null;
|
|
@@ -535,7 +662,66 @@ var e = (e) => {
|
|
|
535
662
|
return m(), () => {
|
|
536
663
|
n.removeEventListener("scroll", C), E &&= (clearTimeout(E), null);
|
|
537
664
|
};
|
|
538
|
-
}, n =
|
|
665
|
+
}, n = 866, r = 68, i = 16, a = 7e3, o = "adspot-desktop-takeover-2-above", s = () => {
|
|
666
|
+
let e = window.frameElement || null;
|
|
667
|
+
if (!e) return () => {};
|
|
668
|
+
let t = window.parent;
|
|
669
|
+
if (!t || t === window) return () => {};
|
|
670
|
+
let s = null;
|
|
671
|
+
try {
|
|
672
|
+
s = t.document, t.location.href;
|
|
673
|
+
} catch {
|
|
674
|
+
return () => {};
|
|
675
|
+
}
|
|
676
|
+
let c = (e, t, n) => {
|
|
677
|
+
e && e.style[t] !== n && (e.style[t] = n);
|
|
678
|
+
}, l = (t = e.parentElement) => {
|
|
679
|
+
let n = t;
|
|
680
|
+
for (; n && n !== s.body;) {
|
|
681
|
+
let e = n.id || "", t = n.getAttribute?.("data-testid") || "", r = n.getAttribute?.("type") || "";
|
|
682
|
+
if (e.includes("adspot") || t.toLowerCase().includes("ad") || r) return n;
|
|
683
|
+
n = n.parentElement;
|
|
684
|
+
}
|
|
685
|
+
return e.parentElement;
|
|
686
|
+
}, u = () => {
|
|
687
|
+
try {
|
|
688
|
+
let e = new URL(t.location.href);
|
|
689
|
+
if ([
|
|
690
|
+
"www.nine.com.au",
|
|
691
|
+
"staging.nine.com.au",
|
|
692
|
+
"preview.nine.com.au",
|
|
693
|
+
"render-web-nine-staging-v1.ffxblue.com.au",
|
|
694
|
+
"render-web-nine-production-v1.ffxblue.com.au"
|
|
695
|
+
].includes(e.hostname.toLowerCase()) && e.pathname.toLowerCase() === "/sport") return {
|
|
696
|
+
headingText: "Sport",
|
|
697
|
+
slotId: o
|
|
698
|
+
};
|
|
699
|
+
} catch {
|
|
700
|
+
return null;
|
|
701
|
+
}
|
|
702
|
+
return null;
|
|
703
|
+
}, d = (e) => Array.from(s.querySelectorAll("#app h1, #app h2, #app h3")).filter((t) => t.textContent?.trim().toLowerCase() === e.toLowerCase())[0] || null, f = u();
|
|
704
|
+
if (!f) return () => {};
|
|
705
|
+
let p = l((f.slotId ? s.getElementById(f.slotId) : null) || e.parentElement);
|
|
706
|
+
if (!p) return () => {};
|
|
707
|
+
let m = p.parentElement, h = p.nextSibling, g = s.createComment("headingintegration-placeholder"), _ = null, v = null, y = () => {
|
|
708
|
+
[p.parentElement, p].filter(Boolean).forEach((e) => {
|
|
709
|
+
c(e, "overflow", "visible");
|
|
710
|
+
}), c(p, "width", `${n}px`), c(p, "maxWidth", `${n}px`), c(p, "minWidth", `${n}px`), c(p, "height", `${r}px`), c(p, "minHeight", `${r}px`), c(p, "marginLeft", "auto"), c(p, "marginRight", "auto"), c(p, "marginBottom", `${i}px`), c(p, "position", "relative"), c(p, "display", "block"), c(p, "pointerEvents", "none"), c(p, "zIndex", "1080"), c(e, "width", `${n}px`), c(e, "height", `${r}px`), c(e, "display", "block"), c(e, "border", "0"), c(e, "position", "relative"), c(e, "pointerEvents", "auto");
|
|
711
|
+
}, b = () => {
|
|
712
|
+
c(p, "display", "none"), c(p, "height", "0px"), c(p, "minHeight", "0px"), c(p, "marginBottom", "0px");
|
|
713
|
+
}, x = (e = 12) => {
|
|
714
|
+
let n = d(f.headingText);
|
|
715
|
+
if (!n) {
|
|
716
|
+
e > 1 && (v = t.setTimeout(() => x(e - 1), 250));
|
|
717
|
+
return;
|
|
718
|
+
}
|
|
719
|
+
!g.parentNode && m && m.insertBefore(g, p), n.parentNode?.insertBefore(p, n), y(), _ = t.setTimeout(b, a);
|
|
720
|
+
};
|
|
721
|
+
return x(), () => {
|
|
722
|
+
v &&= (t.clearTimeout(v), null), _ &&= (t.clearTimeout(_), null), g.parentNode && m && (m.insertBefore(p, h), g.parentNode.removeChild(g));
|
|
723
|
+
};
|
|
724
|
+
}, c = (e, t, n) => {
|
|
539
725
|
let r = window.frameElement ? window.frameElement : null;
|
|
540
726
|
if (!r) return () => {};
|
|
541
727
|
let i = window.parent;
|
|
@@ -776,11 +962,11 @@ var e = (e) => {
|
|
|
776
962
|
return p(), () => {
|
|
777
963
|
i.removeEventListener("scroll", y), w &&= (clearTimeout(w), null);
|
|
778
964
|
};
|
|
779
|
-
},
|
|
965
|
+
}, l = ((e, t = 50) => `linear(${Array.from({ length: t + 1 }, (n, r) => e(r / t)).map((e) => +e.toFixed(4)).join(", ")})`)((e) => {
|
|
780
966
|
if (e === 0 || e === 1) return e;
|
|
781
967
|
let t = 2 * Math.PI / 3;
|
|
782
968
|
return 2 ** (-10 * e) * Math.sin((e * 10 - .75) * t) + 1;
|
|
783
|
-
}),
|
|
969
|
+
}), u = (e = {}) => {
|
|
784
970
|
let t = {
|
|
785
971
|
adScrollHeight: "300vh",
|
|
786
972
|
bandHeight: 24,
|
|
@@ -803,7 +989,7 @@ var e = (e) => {
|
|
|
803
989
|
snapOverlap: 2,
|
|
804
990
|
stretchOverlap: 20,
|
|
805
991
|
snapDuration: .9,
|
|
806
|
-
snapEase:
|
|
992
|
+
snapEase: l,
|
|
807
993
|
onEnter: null,
|
|
808
994
|
onExit: null,
|
|
809
995
|
onProgress: null,
|
|
@@ -811,26 +997,26 @@ var e = (e) => {
|
|
|
811
997
|
...e
|
|
812
998
|
}, n = window.frameElement ? window.frameElement : null;
|
|
813
999
|
if (!n) return () => {};
|
|
814
|
-
let
|
|
815
|
-
if (!
|
|
816
|
-
let
|
|
1000
|
+
let r = window.parent;
|
|
1001
|
+
if (!r || r === window) return () => {};
|
|
1002
|
+
let i = null;
|
|
817
1003
|
try {
|
|
818
|
-
|
|
1004
|
+
i = r.document, r.location.href;
|
|
819
1005
|
} catch {
|
|
820
1006
|
return () => {};
|
|
821
1007
|
}
|
|
822
|
-
let
|
|
823
|
-
let e =
|
|
1008
|
+
let a = (() => {
|
|
1009
|
+
let e = i.querySelector("#adspot-mobile-mobile-3-above");
|
|
824
1010
|
if (e) return e;
|
|
825
1011
|
let t = n.parentElement;
|
|
826
|
-
for (; t && t !==
|
|
1012
|
+
for (; t && t !== i.body;) {
|
|
827
1013
|
if (t.id && t.id.includes("adspot")) return t;
|
|
828
1014
|
t = t.parentElement;
|
|
829
1015
|
}
|
|
830
1016
|
return n.parentElement;
|
|
831
1017
|
})();
|
|
832
|
-
if (!
|
|
833
|
-
let
|
|
1018
|
+
if (!a) return () => {};
|
|
1019
|
+
let o = a.getAttribute("style"), s = n.getAttribute("style"), c = [], u = {
|
|
834
1020
|
width: "100vw",
|
|
835
1021
|
marginLeft: "calc(50% - 50vw)",
|
|
836
1022
|
height: t.bandHeight + "px",
|
|
@@ -846,38 +1032,38 @@ var e = (e) => {
|
|
|
846
1032
|
pointerEvents: "none"
|
|
847
1033
|
};
|
|
848
1034
|
(() => {
|
|
849
|
-
let e =
|
|
850
|
-
e.height = t.adScrollHeight, e.maxHeight = t.adScrollHeight, e.position = "relative",
|
|
851
|
-
let
|
|
852
|
-
for (let e = 0; e < 6 &&
|
|
853
|
-
let t =
|
|
854
|
-
(t.overflow === "hidden" || t.overflowY === "hidden") && (
|
|
855
|
-
el:
|
|
1035
|
+
let e = a.style;
|
|
1036
|
+
e.height = t.adScrollHeight, e.maxHeight = t.adScrollHeight, e.position = "relative", a.setAttribute("poweredAC", "0.1.30"), 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";
|
|
1037
|
+
let o = a.parentElement;
|
|
1038
|
+
for (let e = 0; e < 6 && o && o !== i.body; e++) {
|
|
1039
|
+
let t = r.getComputedStyle(o), n = !1;
|
|
1040
|
+
(t.overflow === "hidden" || t.overflowY === "hidden") && (c.push({
|
|
1041
|
+
el: o,
|
|
856
1042
|
prop: "overflow",
|
|
857
|
-
val:
|
|
858
|
-
}),
|
|
859
|
-
el:
|
|
1043
|
+
val: o.style.overflow
|
|
1044
|
+
}), c.push({
|
|
1045
|
+
el: o,
|
|
860
1046
|
prop: "overflowY",
|
|
861
|
-
val:
|
|
862
|
-
}),
|
|
863
|
-
let
|
|
864
|
-
t.height !== "auto" && !isNaN(
|
|
865
|
-
el:
|
|
1047
|
+
val: o.style.overflowY
|
|
1048
|
+
}), o.style.overflow = "visible", o.style.overflowY = "visible", n = !0);
|
|
1049
|
+
let i = parseFloat(t.height);
|
|
1050
|
+
t.height !== "auto" && !isNaN(i) && i < 600 && (c.push({
|
|
1051
|
+
el: o,
|
|
866
1052
|
prop: "height",
|
|
867
|
-
val:
|
|
868
|
-
}),
|
|
869
|
-
let
|
|
870
|
-
if (
|
|
871
|
-
el:
|
|
1053
|
+
val: o.style.height
|
|
1054
|
+
}), o.style.height = "auto", n = !0);
|
|
1055
|
+
let a = t.maxHeight;
|
|
1056
|
+
if (a && a !== "none" && (c.push({
|
|
1057
|
+
el: o,
|
|
872
1058
|
prop: "maxHeight",
|
|
873
|
-
val:
|
|
874
|
-
}),
|
|
875
|
-
|
|
1059
|
+
val: o.style.maxHeight
|
|
1060
|
+
}), o.style.maxHeight = "none", n = !0), !n && e > 1) break;
|
|
1061
|
+
o = o.parentElement;
|
|
876
1062
|
}
|
|
877
1063
|
let s = n.style;
|
|
878
1064
|
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";
|
|
879
|
-
let
|
|
880
|
-
|
|
1065
|
+
let l = i.createElement("div");
|
|
1066
|
+
l.id = "interscroller-top-band-wrapper", Object.assign(l.style, {
|
|
881
1067
|
position: "sticky",
|
|
882
1068
|
bottom: "0",
|
|
883
1069
|
width: "100vw",
|
|
@@ -885,14 +1071,14 @@ var e = (e) => {
|
|
|
885
1071
|
zIndex: t.zIndexTop,
|
|
886
1072
|
pointerEvents: "none"
|
|
887
1073
|
});
|
|
888
|
-
let d =
|
|
1074
|
+
let d = i.createElement("div");
|
|
889
1075
|
d.id = "interscroller-top-band", d.textContent = t.labelTop, Object.assign(d.style, u, {
|
|
890
1076
|
position: "relative",
|
|
891
1077
|
width: "100%",
|
|
892
1078
|
marginLeft: "0",
|
|
893
1079
|
transformOrigin: "top center"
|
|
894
|
-
}),
|
|
895
|
-
let f =
|
|
1080
|
+
}), l.appendChild(d), a.insertAdjacentElement("beforebegin", l);
|
|
1081
|
+
let f = i.createElement("div");
|
|
896
1082
|
f.id = "interscroller-bottom-band", Object.assign(f.style, u, {
|
|
897
1083
|
position: "fixed",
|
|
898
1084
|
bottom: "0",
|
|
@@ -903,9 +1089,9 @@ var e = (e) => {
|
|
|
903
1089
|
transform: "translateY(100%)",
|
|
904
1090
|
transition: "none"
|
|
905
1091
|
});
|
|
906
|
-
let p =
|
|
1092
|
+
let p = i.createElement("span");
|
|
907
1093
|
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) {
|
|
908
|
-
let e =
|
|
1094
|
+
let e = i.createElement("span");
|
|
909
1095
|
e.id = "interscroller-bottom-progress", e.style.cssText = [
|
|
910
1096
|
"position:absolute",
|
|
911
1097
|
"inset:0",
|
|
@@ -916,12 +1102,12 @@ var e = (e) => {
|
|
|
916
1102
|
"pointer-events:none"
|
|
917
1103
|
].join(";"), f.appendChild(e);
|
|
918
1104
|
}
|
|
919
|
-
|
|
1105
|
+
a.after(f);
|
|
920
1106
|
})();
|
|
921
|
-
let d =
|
|
1107
|
+
let d = i.querySelector("#interscroller-top-band"), f = i.querySelector("#interscroller-top-band-wrapper"), p = i.querySelector("#interscroller-bottom-band"), m = i.querySelector("#interscroller-bottom-label"), h = i.querySelector("#interscroller-bottom-progress"), g = t.bandHeight, _ = t.snapPx, v = !1, y = !1, b = !1, x = !1, S = (t.thresholds || []).map(() => !1), C = () => {
|
|
922
1108
|
if (!p) return;
|
|
923
|
-
let e =
|
|
924
|
-
!y &&
|
|
1109
|
+
let e = a.getBoundingClientRect(), n = r.innerHeight, i = e.top <= n, o = e.bottom <= n - g, s = x ? e.top <= n - t.bottomBandHideAt : e.top <= n - t.bottomBandShowAt, c = a.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));
|
|
1110
|
+
!y && i && t.onEnter && t.onEnter(), !b && o && t.onExit && t.onExit(), y = i, b = o, x = s, t.onProgress && t.onProgress({
|
|
925
1111
|
scrollProgress: l,
|
|
926
1112
|
adExposure: f,
|
|
927
1113
|
viewportCoverage: w,
|
|
@@ -931,22 +1117,22 @@ var e = (e) => {
|
|
|
931
1117
|
!n && r ? (S[t] = !0, e.onEnter && e.onEnter(l)) : n && !r && (S[t] = !1, e.onLeave && e.onLeave(l));
|
|
932
1118
|
});
|
|
933
1119
|
let E = n;
|
|
934
|
-
if (d && e.top <= E + t.stretchOverlap && !
|
|
1120
|
+
if (d && e.top <= E + t.stretchOverlap && !o) {
|
|
935
1121
|
let n = E - e.top;
|
|
936
1122
|
if (!v && n <= _ - t.snapOverlap) {
|
|
937
1123
|
let e = 1 + Math.max(0, n + t.stretchOverlap) / g;
|
|
938
1124
|
d.style.transition = "none", d.style.transform = `scaleY(${e})`;
|
|
939
1125
|
} else !v && n > _ - t.snapOverlap && (v = !0, d.style.transition = `transform ${t.snapDuration}s ${t.snapEase}`, d.style.transform = "scaleY(1)");
|
|
940
1126
|
} else d && e.top > E + t.stretchOverlap && (v = !1, d.style.transition = "none", d.style.transform = "scaleY(1)");
|
|
941
|
-
let D =
|
|
942
|
-
|
|
1127
|
+
let D = r.visualViewport ? Math.round(r.innerHeight - (r.visualViewport.offsetTop + r.visualViewport.height)) : 0;
|
|
1128
|
+
o ? (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");
|
|
943
1129
|
};
|
|
944
|
-
return C(),
|
|
945
|
-
|
|
1130
|
+
return C(), r.addEventListener("scroll", C, { passive: !0 }), r.visualViewport?.addEventListener("resize", C, { passive: !0 }), () => {
|
|
1131
|
+
r.removeEventListener("scroll", C), r.visualViewport?.removeEventListener("resize", C), f ? f.remove() : d && d.remove(), p && p.remove(), o ? a.setAttribute("style", o) : a.removeAttribute("style"), s ? n.setAttribute("style", s) : n.removeAttribute("style"), c.forEach(({ el: e, prop: t, val: n }) => {
|
|
946
1132
|
e.style[t] = n || "";
|
|
947
1133
|
});
|
|
948
1134
|
};
|
|
949
|
-
},
|
|
1135
|
+
}, d = (e = {}) => {
|
|
950
1136
|
let t = {
|
|
951
1137
|
adaptToWidth: "100%",
|
|
952
1138
|
maxWidth: "400px",
|
|
@@ -979,7 +1165,7 @@ var e = (e) => {
|
|
|
979
1165
|
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;
|
|
980
1166
|
return (() => {
|
|
981
1167
|
let e = a.style;
|
|
982
|
-
if (e.position = "relative", e.overflow = "visible", e.boxSizing = "border-box", a.setAttribute("poweredAC", "0.1.
|
|
1168
|
+
if (e.position = "relative", e.overflow = "visible", e.boxSizing = "border-box", a.setAttribute("poweredAC", "0.1.30"), c) {
|
|
983
1169
|
let e = c.style;
|
|
984
1170
|
e.width = "100%", e.height = "100%", e.margin = "0", e.textAlign = "left";
|
|
985
1171
|
}
|
|
@@ -994,7 +1180,7 @@ var e = (e) => {
|
|
|
994
1180
|
})(), () => {
|
|
995
1181
|
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);
|
|
996
1182
|
};
|
|
997
|
-
},
|
|
1183
|
+
}, f = (e = {}) => {
|
|
998
1184
|
let t = {
|
|
999
1185
|
billboardHeight: 150,
|
|
1000
1186
|
sideStripWidth: 10,
|
|
@@ -1127,7 +1313,7 @@ var e = (e) => {
|
|
|
1127
1313
|
}), e.style.overflow = "visible"), e = e.parentElement;
|
|
1128
1314
|
}
|
|
1129
1315
|
let o = n.style;
|
|
1130
|
-
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.
|
|
1316
|
+
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.30"), d) {
|
|
1131
1317
|
let e = d.style;
|
|
1132
1318
|
e.width = "100%", e.height = "0", e.overflow = "visible", e.position = "static", e.margin = "0";
|
|
1133
1319
|
}
|
|
@@ -1224,12 +1410,12 @@ var e = (e) => {
|
|
|
1224
1410
|
for (let { el: e, orig: t } of _) t ? e.setAttribute("style", t) : e.removeAttribute("style");
|
|
1225
1411
|
_.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"));
|
|
1226
1412
|
};
|
|
1227
|
-
},
|
|
1228
|
-
function
|
|
1229
|
-
typeof
|
|
1230
|
-
let
|
|
1231
|
-
return
|
|
1413
|
+
}, p = () => {};
|
|
1414
|
+
function m({ adFormat: n = "", stickyOffset: r = 0, logoPosX: i = 0, logoHeight: a = 0, logoSmallHeight: o = 0, ...l } = {}) {
|
|
1415
|
+
typeof p == "function" && p();
|
|
1416
|
+
let m = () => {};
|
|
1417
|
+
return n === "fireplace" ? m = e(r) : n === "fireplace-collant" ? m = t(r) : n === "logomorph" ? m = c(i, a, o) : n === "headingintegration" ? m = s(l) : n === "interscroller" ? m = u(l) : n === "liquidframe" ? m = d(l) : n === "mobilefireplace" ? m = f(l) : console.warn("[powered-ad-config] Unknown ad format:", n), p = typeof m == "function" ? m : () => {}, p;
|
|
1232
1418
|
}
|
|
1233
|
-
|
|
1419
|
+
m.version = "0.1.30";
|
|
1234
1420
|
//#endregion
|
|
1235
|
-
export {
|
|
1421
|
+
export { m as default };
|
|
@@ -1,12 +1,99 @@
|
|
|
1
|
-
(function(e,t){typeof exports==`object`&&typeof module<`u`?module.exports=t():typeof define==`function`&&define.amd?define([],t):(e=typeof globalThis<`u`?globalThis:e||self,e.poweredAdConfig=t())})(this,function(){var e=e=>{let t=window.frameElement?window.frameElement:null;if(!t)return()=>{};let n=window.parent;if(!n||n===window)return()=>{};let r=null;try{r=n.document,n.location.href}catch{return()=>{}}let i={siteBackgroundColor:`#ffffff`,fireplaceLeftMargin:0,adNodeMarginTop:-24,adNodeMarginBottom:24,responsiveScroll:-124,xPosHalfpage:695,yPosHalfpage:72,stickyMargin:{offset:74,isSticky:!0},zIndex:function(){let e=window.parent.document,t=(e,t)=>e.forEach(e=>t.forEach(([t,n])=>e.style[t]=n));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`)}},
|
|
1
|
+
(function(e,t){typeof exports==`object`&&typeof module<`u`?module.exports=t():typeof define==`function`&&define.amd?define([],t):(e=typeof globalThis<`u`?globalThis:e||self,e.poweredAdConfig=t())})(this,function(){var e=e=>{let t=window.frameElement?window.frameElement:null;if(!t)return()=>{};let n=window.parent;if(!n||n===window)return()=>{};let r=null;try{r=n.document,n.location.href}catch{return()=>{}}let i=null,a=null,o={siteBackgroundColor:`#ffffff`,fireplaceLeftMargin:0,adNodeMarginTop:-24,adNodeMarginBottom:24,responsiveScroll:-124,xPosHalfpage:695,yPosHalfpage:72,stickyMargin:{offset:74,isSticky:!0},zIndex:function(){let e=window.parent.document,t=(e,t)=>e.forEach(e=>t.forEach(([t,n])=>e.style[t]=n));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`)}},s={siteBackgroundColor:`#ffffff`,fireplaceLeftMargin:0,adNodeMarginTop:-24,adNodeMarginBottom:24,responsiveScroll:-124,xPosHalfpage:695,yPosHalfpage:32,stickyMargin:{offset:74,isSticky:!0},zIndex:function(){let e=window.parent.document,t=(e,t)=>e.forEach(e=>t.forEach(([t,n])=>e.style[t]=n));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`)}},c=()=>{let e=r.querySelector(`#app`),t=r.querySelector(`#desktop-header-ads`);return!e||!t||t.parentElement!==e||!e.querySelector(`:scope > .sc-llJctl`)?null:e},l=()=>!!c(),u=()=>!!(r.querySelector(`#app.wwos`)&&r.querySelector(`#desktop-header-ads`)),d={siteBackgroundColor:`#ffffff`,fireplaceLeftMargin:0,adNodeMarginTop:-24,adNodeMarginBottom:-55,iframeWidth:`100%`,iframeHeight:`1000px`,responsiveScroll:-120,xPosHalfpage:722,yPosHalfpage:32,stickyMargin:{offset:74,isSticky:!0},zIndex:function(){let e=window.parent.document;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"]`)){let t=e.createElement(`style`);t.innerHTML=`
|
|
2
2
|
div:has(#adspot-tablet-takeover-2-above) {
|
|
3
3
|
position: static;
|
|
4
4
|
}
|
|
5
|
-
`,e.head.appendChild(t)}}},
|
|
5
|
+
`,e.head.appendChild(t)}}},f={siteBackgroundColor:`#ffffff`,fireplaceLeftMargin:0,adNodeMarginTop:0,adNodeMarginBottom:0,iframeWidth:`100vw`,iframeHeight:`1152px`,responsiveScroll:-120,xPosHalfpage:722,yPosHalfpage:32,stickyMargin:{offset:74,isSticky:!0},zIndex:function(){let e=window.parent.document,t=(e,t,n)=>{e&&e.style[t]!==n&&(e.style[t]=n)},n=(e,n)=>e.forEach(e=>{n.forEach(([n,r])=>{t(e,n,r)})}),r=e=>e?Array.from(e.querySelectorAll(`:scope > main, :scope > aside, :scope > footer`)):[],i=(t,n)=>{let r=e.getElementById(t);r||(r=e.createElement(`style`),r.id=t,e.head.appendChild(r)),r.textContent=n},a=e=>{n(Array.from(e.querySelectorAll(`*`)).filter(e=>e.children.length>0?!1:e.textContent?.trim().toLowerCase()===`advertisement`),[[`display`,`none`]])};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`);let o=c(),s=e.querySelector(`#desktop-header-ads`);if(o&&s){let e=o.querySelector(`:scope > .sc-llJctl`);t(s,`height`,`250px`),t(s,`padding`,`0px`),a(s),i(`powered-ac-nine-new-header-overrides`,`
|
|
6
|
+
#app > .sc-llJctl.hgiQrx {
|
|
7
|
+
width: 100%;
|
|
8
|
+
max-width: 1190px;
|
|
9
|
+
margin-left: auto;
|
|
10
|
+
margin-right: auto;
|
|
11
|
+
position: relative;
|
|
12
|
+
z-index: 1085;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
#app > .sc-llJctl header {
|
|
16
|
+
position: relative;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
#app > .sc-llJctl header .bVJveH,
|
|
20
|
+
#app > .sc-llJctl header [class*="sc-eFWqGm"] {
|
|
21
|
+
width: min(1190px, calc(100vw - 32px)) !important;
|
|
22
|
+
max-width: min(1190px, calc(100vw - 32px)) !important;
|
|
23
|
+
left: 50% !important;
|
|
24
|
+
right: auto !important;
|
|
25
|
+
transform: translateX(-50%) !important;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
#app > .sc-llJctl.FwHsm {
|
|
29
|
+
z-index: 1086;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
#app > header[data-tv-show] {
|
|
33
|
+
width: 100%;
|
|
34
|
+
max-width: 1190px;
|
|
35
|
+
margin-left: auto;
|
|
36
|
+
margin-right: auto;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
#app .sc-gicCDH.bNInIa {
|
|
40
|
+
width: 100%;
|
|
41
|
+
max-width: 100%;
|
|
42
|
+
margin-left: 0;
|
|
43
|
+
margin-right: 0;
|
|
44
|
+
position: relative;
|
|
45
|
+
z-index: 1086;
|
|
46
|
+
}
|
|
47
|
+
`);let c=Array.from(o.children).filter(t=>t!==s&&t!==e);n(c,[[`position`,`relative`],[`zIndex`,`1071`]]),n(c.flatMap(e=>r(e)),[[`position`,`relative`],[`zIndex`,`1072`]])}if(e.querySelector(`div[id*="tablet"][id*="takeover"]`)){let t=e.createElement(`style`);t.innerHTML=`
|
|
48
|
+
div:has(#adspot-tablet-takeover-2-above) {
|
|
49
|
+
position: static;
|
|
50
|
+
}
|
|
51
|
+
`,e.head.appendChild(t)}}},p=()=>l()?f:d,m={siteBackgroundColor:`#ffffff`,fireplaceLeftMargin:0,adNodeMarginTop:-24,adNodeMarginBottom:0,responsiveScroll:-124,xPosHalfpage:720,yPosHalfpage:32,stickyMargin:{offset:94,isSticky:!0},zIndex:function(){let e=window.parent.document,t=e.querySelector(`footer`).previousElementSibling;if(t&&t.tagName.toLowerCase()===`div`&&(t.style.position=`relative`),e.querySelector(`div[id*="tablet"][id*="takeover"]`)){let t=e.createElement(`style`);t.innerHTML=`
|
|
52
|
+
div:has(#adspot-tablet-takeover-2-above) {
|
|
53
|
+
position: static;
|
|
54
|
+
}
|
|
55
|
+
`,e.head.appendChild(t)}}},h={siteBackgroundColor:`#ffffff`,fireplaceLeftMargin:0,adNodeMarginTop:0,adNodeMarginBottom:0,iframeWidth:`100vw`,iframeHeight:`1152px`,responsiveScroll:-124,xPosHalfpage:720,yPosHalfpage:32,stickyMargin:{offset:94,isSticky:!0},zIndex:function(){let e=window.parent.document,t=(e,t,n)=>{e&&e.style[t]!==n&&(e.style[t]=n)},n=(e,n)=>e.forEach(e=>{n.forEach(([n,r])=>{t(e,n,r)})}),r=(t,n)=>{let r=e.getElementById(t);r||(r=e.createElement(`style`),r.id=t,e.head.appendChild(r)),r.textContent=n},i=e=>{n(Array.from(e.querySelectorAll(`*`)).filter(e=>e.children.length>0?!1:e.textContent?.trim().toLowerCase()===`advertisement`),[[`display`,`none`]])},a=e.querySelector(`#app.wwos`),o=e.querySelector(`#desktop-header-ads`),s=a?Array.from(a.children):[],c=a?.querySelector(`:scope > .sc-llJctl`);o&&(t(o,`height`,`250px`),t(o,`padding`,`0px`),i(o)),r(`powered-ac-wwos-new-header-overrides`,`
|
|
56
|
+
#app.wwos > .sc-llJctl.hgiQrx {
|
|
57
|
+
width: 100%;
|
|
58
|
+
max-width: 1190px;
|
|
59
|
+
margin-left: auto;
|
|
60
|
+
margin-right: auto;
|
|
61
|
+
position: relative;
|
|
62
|
+
z-index: 1085;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
#app.wwos > .sc-llJctl.FwHsm {
|
|
66
|
+
z-index: 1086;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
#app.wwos > .sc-llJctl .sc-dkdnUC.hvGHcI {
|
|
70
|
+
position: static;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
#app.wwos > .sc-llJctl .sc-dkdnUC.hvGHcI > [class*="sc-eFWqGm"],
|
|
74
|
+
#app.wwos > .sc-llJctl .sc-dkdnUC.hvGHcI [class*="sc-eFWqGm"] {
|
|
75
|
+
position: absolute;
|
|
76
|
+
top: 100%;
|
|
77
|
+
left: 50%;
|
|
78
|
+
right: auto;
|
|
79
|
+
width: min(1190px, calc(100vw - 32px));
|
|
80
|
+
transform: translateX(-50%);
|
|
81
|
+
z-index: 1;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
#app.wwos .sc-gicCDH.bNInIa {
|
|
85
|
+
width: 100%;
|
|
86
|
+
max-width: 100%;
|
|
87
|
+
margin-left: 0;
|
|
88
|
+
margin-right: 0;
|
|
89
|
+
position: relative;
|
|
90
|
+
z-index: 1086;
|
|
91
|
+
}
|
|
92
|
+
`),n(s.filter(e=>e!==o&&e!==c),[[`position`,`relative`],[`zIndex`,`1071`]]),n(Array.from(e.querySelectorAll(`main, aside, article, footer, .sc-kACOFj.bkaoXt, .sc-hpDagB.HUkOB, [id*="adspot-desktop-banner-"]`)),[[`position`,`relative`],[`zIndex`,`1072`]]);let l=e.querySelector(`footer`)?.previousElementSibling;if(l&&l.tagName.toLowerCase()===`div`&&(l.style.position=`relative`),e.querySelector(`div[id*="tablet"][id*="takeover"]`)){let t=e.createElement(`style`);t.innerHTML=`
|
|
6
93
|
div:has(#adspot-tablet-takeover-2-above) {
|
|
7
94
|
position: static;
|
|
8
95
|
}
|
|
9
|
-
`,e.head.appendChild(t)}}},
|
|
96
|
+
`,e.head.appendChild(t)}}},g=()=>u()?h:m,_={siteBackgroundColor:`#ffffff`,fireplaceLeftMargin:0,adNodeMarginTop:-32,adNodeMarginBottom:18,responsiveScroll:-124,xPosHalfpage:720,yPosHalfpage:16,stickyMargin:{offset:74,isSticky:!0},zIndex:function(){let e=window.parent.document;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);`)}},v=[{site:`https://www.nine.com.au/sport`,config:g},{site:`https://www.nine.com.au/product-reviews`,config:s},{site:`https://www.nine.com.au/property`,config:s},{site:`https://www.nine.com.au/entertainment`,config:p},{site:`https://staging.nine.com.au/sport`,config:g},{site:`https://staging.nine.com.au/product-reviews`,config:s},{site:`https://staging.nine.com.au/property`,config:s},{site:`https://staging.nine.com.au/entertainment`,config:p},{site:`https://render-web-nine-staging-v1.ffxblue.com.au`,config:p},{site:`https://render-web-nine-production-v1.ffxblue.com.au`,config:p},{site:`https://preview.nine.com.au/`,config:p},{site:`https://www.nine`,config:p},{site:`https://staging.nine`,config:p},{site:`https://entertainment`,config:o},{site:`https://celebrity`,config:o},{site:`https://homes`,config:o},{site:`https://travel`,config:o},{site:`https://honey`,config:o},{site:`https://style`,config:o},{site:`https://coach`,config:o},{site:`https://kitchen`,config:o},{site:`https://finance`,config:o},{site:`https://staging.wwos`,config:g},{site:`https://www.9news`,config:_},{site:`https://staging.9news`,config:_},{site:`https://www.yourtv`,config:o},{site:`https://staging.yourtv`,config:o},{site:`https://9now`,config:s},{site:`https://creative-preview-an.com`,config:o}],y=()=>{let e=window.document.getElementById(`nineContent`);if(e&&(e.style.backgroundColor=D.siteBackgroundColor),w(),C(),S(),n.addEventListener(`scroll`,E),O=setTimeout(E,50),D===f||D===h){let e=c()||r.body,t=r.querySelector(`#desktop-header-ads`);e&&n.MutationObserver&&(a=new n.MutationObserver(()=>{T()}),a.observe(e,{childList:!0,subtree:!0}),t&&a.observe(t,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[`class`,`style`]})),n.addEventListener(`resize`,T),T()}},b=()=>{let e=null;return e=r.querySelector(`div[id*="billboard"][id*="above"]`),e},x=()=>{let e=n.location.href;for(let t=0;t<v.length;t+=1)if(e.indexOf(v[t].site)>=0)return typeof v[t].config==`function`?v[t].config():v[t].config;try{let t=new URL(e),n=t.hostname.toLowerCase(),r=t.pathname.toLowerCase();if(n===`creative-preview-an.com`)return o;if(n.includes(`9news`))return _;if(n.includes(`yourtv`))return o;if(n.includes(`9now`))return s;if(n===`www.nine.com.au`||n===`staging.nine.com.au`||n===`preview.nine.com.au`||n===`render-web-nine-staging-v1.ffxblue.com.au`||n===`render-web-nine-production-v1.ffxblue.com.au`)return r.startsWith(`/sport`)?g():r.startsWith(`/product-reviews`)||r.startsWith(`/property`)?s:p();if([`entertainment`,`celebrity`,`homes`,`travel`,`honey`,`style`,`coach`,`kitchen`,`finance`].some(e=>n.includes(e)))return o}catch{return p()}return p()},S=()=>{if(!window.parent)return;let e=r.querySelector(`div[id*="halfpage"][id*="above"]`);if(!e)return;let t=e;for(let e=0;e<3;e++)if(t=t.parentNode,t&&n.getComputedStyle(t).position===`sticky`){t.setAttribute(`style`,`top: ${D.stickyMargin.offset}px`);break}},C=()=>{if(!t)return;let e=t.style;e.width=D.iframeWidth||`100%`,e.height=D.iframeHeight||`1000px`,e.position=`fixed`,e.top=`0`,e.left=`50%`,e.transform=`translate(-50%, 0)`;let i=t.parentElement;for(;i&&i!==r.body&&i!==r.documentElement;){let e=n.getComputedStyle(i);e.transform&&e.transform!==`none`&&(i.style.transform=`none`),e.willChange&&e.willChange!==`auto`&&(i.style.willChange=`auto`),e.contain&&e.contain!==`none`&&(i.style.contain=`none`),e.filter&&e.filter!==`none`&&(i.style.filter=`none`),e.perspective&&e.perspective!==`none`&&(i.style.perspective=`none`),e.overflow!==`visible`&&(i.style.overflow=`visible`),i=i.parentElement}},w=()=>{let e=b();if(!e)return;let t=e.style;e.className&&=``,t.minHeight=`250px`,t.marginTop=D.adNodeMarginTop+`px`,t.marginBottom=D.adNodeMarginBottom+`px`,t.position=`static`,t.display=`block`,D.zIndex&&D.zIndex()},T=()=>{D!==f||i||(i=n.requestAnimationFrame(()=>{i=null,C(),w(),S()}))},E=()=>{T();let e=n.scrollY,r=t.style,i=document.getElementById(`siteContent`)?document.getElementById(`siteContent`).style:{};e>=0&&e<=k?(r.transform=`translate(-50%, ${-e}px)`,i.transform=`translateY(0)`):e>k&&e<=A?(r.transform=`translate(-50%, ${-k}px)`,i.transform=`translateY(${k-e}px)`):e>A&&(r.transform=`translate(-50%, ${-k}px)`,i.transform=`translateY(-250px)`)};b();let D=x();if(!D)return()=>{};let O=null,k=-D.responsiveScroll+e,A=k+250;return y(),()=>{n.removeEventListener(`scroll`,E),n.removeEventListener(`resize`,T),a&&=(a.disconnect(),null),i&&=(n.cancelAnimationFrame(i),null),O&&=(clearTimeout(O),null)}},t=e=>{let t=window.frameElement?window.frameElement:null;if(!t)return()=>{};let n=window.parent;if(!n||n===window)return()=>{};let r=null;try{r=n.document,n.location.href}catch{return()=>{}}let i=document.getElementById(`nineMasthead`),a=i?i.style:{},o,s={siteBackgroundColor:`#ffffff`,fireplaceLeftMargin:0,adNodeMarginTop:-24,adNodeMarginBottom:24,responsiveScroll:-124,xPosHalfpage:722,yPosHalfpage:72,stickyMargin:{offset:160,isSticky:!0},maskOffset:298,zIndex:function(){let e=window.parent.document,t=(e,t)=>e.forEach(e=>t.forEach(([t,n])=>e.style[t]=n));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`)}},c={siteBackgroundColor:`#ffffff`,fireplaceLeftMargin:0,adNodeMarginTop:-24,adNodeMarginBottom:0,responsiveScroll:-124,xPosHalfpage:695,yPosHalfpage:32,stickyMargin:{offset:160,isSticky:!0},maskOffset:window.parent.document.querySelector(`div[class*="video-index__MyContainer"]`)?248:298,zIndex:function(){let e=window.parent.document,t=(e,t)=>e.forEach(e=>t.forEach(([t,n])=>e.style[t]=n));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`)}},l={siteBackgroundColor:`#ffffff`,fireplaceLeftMargin:0,adNodeMarginTop:-24,adNodeMarginBottom:-13,responsiveScroll:-120,xPosHalfpage:722,yPosHalfpage:32,stickyMargin:{offset:166,isSticky:!0},maskOffset:304,zIndex:function(){let e=window.parent.document;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"]`)){let t=e.createElement(`style`);t.innerHTML=`
|
|
10
97
|
div:has(#adspot-tablet-takeover-2-above) {
|
|
11
98
|
position: static;
|
|
12
99
|
}
|
|
@@ -18,7 +105,7 @@
|
|
|
18
105
|
div:has(#adspot-tablet-takeover-2-above) {
|
|
19
106
|
position: static;
|
|
20
107
|
}
|
|
21
|
-
`,e.head.appendChild(t)}}},f={siteBackgroundColor:`#ffffff`,fireplaceLeftMargin:0,adNodeMarginTop:-32,adNodeMarginBottom:8,responsiveScroll:-124,xPosHalfpage:720,yPosHalfpage:16,stickyMargin:{offset:160,isSticky:!0},maskOffset:window.parent.document.querySelector(`div[class*="VideoIndexComponent"]`)?324:292,zIndex:function(){let e=window.parent.document;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);`);let t=e.querySelector(`[class*="VideoIndexComponent"]`);t&&(e.querySelector(`.breadcrumbs`)?.setAttribute(`style`,`display:none`),t.style.maxWidth=`1190px`,t.style.margin=`auto`,t.style.position=`relative`)}},p=[{site:`https://www.nine.com.au/sport`,config:u},{site:`https://www.nine.com.au/product-reviews`,config:c},{site:`https://www.nine.com.au/property`,config:c},{site:`https://www.nine.com.au/entertainment`,config:c},{site:`https://staging.nine.com.au/sport`,config:u},{site:`https://staging.nine.com.au/product-reviews`,config:c},{site:`https://staging.nine.com.au/property`,config:c},{site:`https://staging.nine.com.au/entertainment`,config:c},{site:`https://render-web-nine-staging-v1.ffxblue.com.au`,config:l},{site:`https://render-web-nine-production-v1.ffxblue.com.au`,config:l},{site:`https://preview.nine.com.au/`,config:l},{site:`https://www.nine`,config:l},{site:`https://staging.nine`,config:l},{site:`https://entertainment`,config:s},{site:`https://celebrity`,config:s},{site:`https://homes`,config:s},{site:`https://travel`,config:s},{site:`https://honey`,config:s},{site:`https://style`,config:s},{site:`https://coach`,config:s},{site:`https://kitchen`,config:s},{site:`https://finance`,config:s},{site:`https://wwos`,config:d},{site:`https://staging.wwos`,config:u},{site:`https://www.9news`,config:f},{site:`https://staging.9news`,config:f},{site:`https://www.yourtv`,config:s},{site:`https://staging.yourtv`,config:s},{site:`https://9now`,config:c},{site:`https://creative-preview-an.com`,config:s}],m=()=>{let e=window.document.getElementById(`nineContent`);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)},h=()=>{let e=null;return e=r.querySelector(`div[id*="billboard"][id*="above"]`),e},g=()=>{let e=null;if(!window.parent)return e;if(e=r.querySelector(`div[id*="halfpage"][id*="above"]`),!e)return;let t=e;for(let e=0;e<3;e++)if(t=t.parentNode,t&&getComputedStyle(t).position===`sticky`){t.setAttribute(`style`,`top: ${T.stickyMargin.offset}px`);break}},_=()=>{let e=n.location.href;for(let t=0;t<p.length;t+=1)if(e.indexOf(p[t].site)>=0)return p[t].config},v=()=>{if(!t)return;let e=t.style;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)`},y=()=>{if(!w)return;let e=w.style;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()},b=()=>{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)`)},x=0,S=0,C=()=>{let e=n.scrollY,r=e>x,i=e>O?e-T.maskOffset:0,s=Math.abs(i-S);if(o)if(r&&i>S)if(s>100){let e=Math.max(0,i-100);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`)}else o.style.transition=`clip-path 0.3s ease-out`,o.style.setProperty(`--mask-inset`,`${i}px`);else o.style.transition=`none`,o.style.setProperty(`--mask-inset`,`${i}px`);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())},w=h(),T=_();if(!T)return()=>{};let E=null,D=-T.responsiveScroll+e,O=D+150;return m(),()=>{n.removeEventListener(`scroll`,C),E&&=(clearTimeout(E),null)}},n=(e,t,n)=>{let r=window.frameElement?window.frameElement:null;if(!r)return()=>{};let i=window.parent;if(!i||i===window)return()=>{};let a=null;try{a=i.document,i.location.href}catch{return()=>{}}let o={siteBackgroundColor:`#ffffff`,logoTop:`44px`,logoLeft:`50%`,logoTransform:`translateX(-50%)`,logoSmallLeft:`250px`,logoSmallTransform:`translateX(0px)`,logoSmallFilter:`none`,zIndex:function(){let e=window.parent.document;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`)}},s={siteBackgroundColor:`#ffffff`,logoTop:`44px`,logoLeft:`50%`,logoTransform:`translateX(-50%)`,logoSmallLeft:`50%`,logoSmallTransform:`translateX(-50%)`,logoSmallFilter:`none`,zIndex:function(){let e=window.parent.document,t=(e,t)=>e.forEach(e=>t.forEach(([t,n])=>e.style[t]=n));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`)}},c={siteBackgroundColor:`#ffffff`,logoTop:`44px`,logoLeft:`50%`,logoTransform:`translateX(-50%)`,logoSmallLeft:`50%`,logoSmallTransform:`translateX(-50%)`,logoSmallFilter:`none`,zIndex:function(){let e=window.parent.document,t=(e,t)=>e.forEach(e=>t.forEach(([t,n])=>e.style[t]=n));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`)}},l={siteBackgroundColor:`#ffffff`,logoTop:`44px`,logoLeft:`50%`,logoTransform:`translateX(-50%)`,logoSmallLeft:`50%`,logoSmallTransform:`translateX(-50%)`,logoSmallFilter:`none`,zIndex:function(){let e=window.parent.document,t=(e,t)=>e.forEach(e=>t.forEach(([t,n])=>e.style[t]=n));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`)}},u={siteBackgroundColor:`#ffffff`,logoTop:`-148px`,logoLeft:`50%`,logoTransform:`translateX(-50%)`,logoSmallLeft:`50%`,logoSmallTransform:`translateX(-50%)`,logoSmallFilter:`none`,zIndex:function(){let e=window.parent.document;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`)}},d={siteBackgroundColor:`#ffffff`,logoTop:`44px`,logoLeft:`50%`,logoTransform:`translateX(-50%)`,logoSmallLeft:`50%`,logoSmallTransform:`translateX(-50%)`,logoSmallFilter:`invert(1)`,zIndex:function(){let e=window.parent.document;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`)}},f=[{site:`https://www.nine.com.au/sport`,config:o},{site:`https://www.nine.com.au/product-reviews`,config:c},{site:`https://www.nine.com.au/property`,config:c},{site:`https://www.nine.com.au/entertainment`,config:c},{site:`https://staging.nine.com.au/sport`,config:o},{site:`https://staging.nine.com.au/product-reviews`,config:c},{site:`https://staging.nine.com.au/property`,config:c},{site:`https://staging.nine.com.au/entertainment`,config:c},{site:`https://render-web-nine-staging-v1.ffxblue.com.au`,config:l},{site:`https://render-web-nine-production-v1.ffxblue.com.au`,config:l},{site:`https://preview.nine.com.au/`,config:l},{site:`https://www.nine`,config:l},{site:`https://staging.nine`,config:l},{site:`https://entertainment`,config:s},{site:`https://celebrity`,config:s},{site:`https://homes`,config:s},{site:`https://travel`,config:s},{site:`https://honey`,config:s},{site:`https://style`,config:s},{site:`https://coach`,config:s},{site:`https://kitchen`,config:s},{site:`https://finance`,config:s},{site:`https://wwos`,config:u},{site:`https://staging.wwos`,config:u},{site:`https://www.9news`,config:d},{site:`https://staging.9news`,config:d},{site:`https://www.yourtv`,config:s},{site:`https://staging.yourtv`,config:s},{site:`https://9now`,config:c},{site:`https://creative-preview-an.com`,config:s}],p=()=>{let e=window.document.getElementById(`logo-small`);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)},m=()=>{let e=null;return e=a.querySelector(`div[id*="desktop"][id*="takeover"][id*="above"]`),e},h=()=>{let e=i.location.href;for(let t=0;t<f.length;t+=1)if(e.indexOf(f[t].site)>=0)return f[t].config},g=()=>{if(!r)return;let e=r.style;e.width=`100%`,e.height=`${t}px`,e.position=`relative`},_=()=>{if(!S)return;let e=S.style;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()},v=e=>{if(!S)return;let r=S.style;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())},y=()=>{let e=i.scrollY;r.style,e>=0&&e<=T?v(`big`):e>T&&(v(e>E?`small`:`big`),E=e<=0?0:e)},b=(e=4)=>{x()||e>1&&setTimeout(()=>{b(e-1)},20)},x=()=>{let e=a.querySelector(`header`);return window.getComputedStyle(e).top===`0px`?(v(`big`),!0):(v(`small`),!1)},S=m(),C=h();if(!C)return()=>{};let w=null,T=e,E=0;return p(),()=>{i.removeEventListener(`scroll`,y),w&&=(clearTimeout(w),null)}},r=((e,t=50)=>`linear(${Array.from({length:t+1},(n,r)=>e(r/t)).map(e=>+e.toFixed(4)).join(`, `)})`)(e=>{if(e===0||e===1)return e;let t=2*Math.PI/3;return 2**(-10*e)*Math.sin((e*10-.75)*t)+1}),i=(e={})=>{let t={adScrollHeight:`300vh`,bandHeight:24,bandBg:`#222`,bandColor:`#fff`,bandFontSize:`10px`,bandFontFamily:`Arial, Helvetica, sans-serif`,bandLetterSpacing:`1px`,labelTop:`Advertisement`,labelBottomResume:`Scroll to continue`,labelBottomMid:`Keep scrolling`,labelBottomLate:`Almost there`,labelBottomNow:`Content now ↓`,progressBarColor:`rgba(255,255,255,0.35)`,zIndexTop:9,zIndexBottom:8,bottomBandShowAt:400,bottomBandHideAt:300,snapPx:50,snapOverlap:2,stretchOverlap:20,snapDuration:.9,snapEase:r,onEnter:null,onExit:null,onProgress:null,thresholds:[],...e},n=window.frameElement?window.frameElement:null;if(!n)return()=>{};let i=window.parent;if(!i||i===window)return()=>{};let a=null;try{a=i.document,i.location.href}catch{return()=>{}}let o=(()=>{let e=a.querySelector(`#adspot-mobile-mobile-3-above`);if(e)return e;let t=n.parentElement;for(;t&&t!==a.body;){if(t.id&&t.id.includes(`adspot`))return t;t=t.parentElement}return n.parentElement})();if(!o)return()=>{};let s=o.getAttribute(`style`),c=n.getAttribute(`style`),l=[],u={width:`100vw`,marginLeft:`calc(50% - 50vw)`,height:t.bandHeight+`px`,backgroundColor:t.bandBg,color:t.bandColor,fontSize:t.bandFontSize,fontFamily:t.bandFontFamily,textTransform:`uppercase`,letterSpacing:t.bandLetterSpacing,display:`flex`,alignItems:`center`,justifyContent:`center`,pointerEvents:`none`};(()=>{let e=o.style;e.height=t.adScrollHeight,e.maxHeight=t.adScrollHeight,e.position=`relative`,o.setAttribute(`poweredAC`,`0.1.8`),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`;let r=o.parentElement;for(let e=0;e<6&&r&&r!==a.body;e++){let t=i.getComputedStyle(r),n=!1;(t.overflow===`hidden`||t.overflowY===`hidden`)&&(l.push({el:r,prop:`overflow`,val:r.style.overflow}),l.push({el:r,prop:`overflowY`,val:r.style.overflowY}),r.style.overflow=`visible`,r.style.overflowY=`visible`,n=!0);let a=parseFloat(t.height);t.height!==`auto`&&!isNaN(a)&&a<600&&(l.push({el:r,prop:`height`,val:r.style.height}),r.style.height=`auto`,n=!0);let o=t.maxHeight;if(o&&o!==`none`&&(l.push({el:r,prop:`maxHeight`,val:r.style.maxHeight}),r.style.maxHeight=`none`,n=!0),!n&&e>1)break;r=r.parentElement}let s=n.style;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`;let c=a.createElement(`div`);c.id=`interscroller-top-band-wrapper`,Object.assign(c.style,{position:`sticky`,bottom:`0`,width:`100vw`,marginLeft:`calc(50% - 50vw)`,zIndex:t.zIndexTop,pointerEvents:`none`});let d=a.createElement(`div`);d.id=`interscroller-top-band`,d.textContent=t.labelTop,Object.assign(d.style,u,{position:`relative`,width:`100%`,marginLeft:`0`,transformOrigin:`top center`}),c.appendChild(d),o.insertAdjacentElement(`beforebegin`,c);let f=a.createElement(`div`);f.id=`interscroller-bottom-band`,Object.assign(f.style,u,{position:`fixed`,bottom:`0`,left:`0`,zIndex:t.zIndexBottom,display:`flex`,overflow:`hidden`,transform:`translateY(100%)`,transition:`none`});let p=a.createElement(`span`);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){let e=a.createElement(`span`);e.id=`interscroller-bottom-progress`,e.style.cssText=[`position:absolute`,`inset:0`,`width:0%`,`background:${t.progressBarColor}`,`transition:none`,`z-index:0`,`pointer-events:none`].join(`;`),f.appendChild(e)}o.after(f)})();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=()=>{if(!p)return;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));!y&&r&&t.onEnter&&t.onEnter(),!b&&a&&t.onExit&&t.onExit(),y=r,b=a,x=s,t.onProgress&&t.onProgress({scrollProgress:l,adExposure:f,viewportCoverage:w,pxRemaining:T}),(t.thresholds||[]).forEach((e,t)=>{let n=S[t],r=l>=e.at;!n&&r?(S[t]=!0,e.onEnter&&e.onEnter(l)):n&&!r&&(S[t]=!1,e.onLeave&&e.onLeave(l))});let E=n;if(d&&e.top<=E+t.stretchOverlap&&!a){let n=E-e.top;if(!v&&n<=_-t.snapOverlap){let e=1+Math.max(0,n+t.stretchOverlap)/g;d.style.transition=`none`,d.style.transform=`scaleY(${e})`}else !v&&n>_-t.snapOverlap&&(v=!0,d.style.transition=`transform ${t.snapDuration}s ${t.snapEase}`,d.style.transform=`scaleY(1)`)}else d&&e.top>E+t.stretchOverlap&&(v=!1,d.style.transition=`none`,d.style.transform=`scaleY(1)`);let D=i.visualViewport?Math.round(i.innerHeight-(i.visualViewport.offsetTop+i.visualViewport.height)):0;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`)};return C(),i.addEventListener(`scroll`,C,{passive:!0}),i.visualViewport?.addEventListener(`resize`,C,{passive:!0}),()=>{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})=>{e.style[t]=n||``})}},a=(e={})=>{let t={adaptToWidth:`100%`,maxWidth:`400px`,maintainAspectRatio:!0,adaptToHeight:!1,zIndex:7,onAdapt:null,...e},n=window.frameElement??null;if(!n)return()=>{};let r=window.parent;if(!r||r===window)return()=>{};let i=null;try{i=r.document,r.location.href}catch{return()=>{}}let a=(()=>{let e=i.querySelector(`#adspot-mobile-mbanner-2-above`);if(e)return e;let t=n.parentElement;for(;t&&t!==i.body;){if(t.id&&t.id.includes(`adspot`))return t;t=t.parentElement}return n.parentElement})();if(!a)return()=>{};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;return(()=>{let e=a.style;if(e.position=`relative`,e.overflow=`visible`,e.boxSizing=`border-box`,a.setAttribute(`poweredAC`,`0.1.8`),c){let e=c.style;e.width=`100%`,e.height=`100%`,e.margin=`0`,e.textAlign=`left`}let t=n.style;t.display=`block`,t.width=`100%`,t.height=`100%`,t.border=`none`,t.margin=`0`,t.padding=`0`})(),(()=>{let e=a.style;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(()=>{let e=a.offsetWidth||p,r=Math.round((m||50)/p*e);a.style.height=r+`px`,c&&(c.style.height=r+`px`),n.style.height=r+`px`,t.onAdapt&&t.onAdapt()}):(t.adaptToHeight&&(e.height=t.adaptToHeight),t.onAdapt&&t.onAdapt())})(),()=>{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)}},o=(e={})=>{let t={billboardHeight:150,sideStripWidth:10,zIndex:0,creativeUrl:null,onAdapt:null,...e},n=window.frameElement??null;if(!n)return()=>{};let r=window.parent;if(!r||r===window)return()=>{};let i=null;try{i=r.document,r.location.href}catch{return()=>{}}let a=(()=>{let e=i.querySelector(`#adspot-mobile-mbanner-2-above`);if(e)return e;let t=n.parentElement;for(;t&&t!==i.body;){if(t.id&&t.id.includes(`adspot`))return t;t=t.parentElement}return n.parentElement})();if(!a)return()=>{};let o={nine:{siteBackgroundColor:`#ffffff`,setup(e,t){e.querySelector(`main`)?.style.setProperty(`position`,`relative`);let n=t?.parentElement?.nextElementSibling;n&&n.tagName!==`HEADER`&&(n.style.paddingTop=`0px`)}},wwos:{siteBackgroundColor:`#ffffff`,setup(e,t){e.querySelector(`main`)?.style.setProperty(`position`,`relative`);let n=t?.parentElement?.nextElementSibling;n&&n.tagName!==`HEADER`&&(n.style.paddingTop=`0px`)}},nineNews:{siteBackgroundColor:`#ffffff`,setup(e){let t=e.querySelector(`.layout`);t&&(t.style.backgroundColor=`transparent`),e.querySelector(`.content`)?.style.setProperty(`position`,`relative`)}},lifestyle:{siteBackgroundColor:`#ffffff`,setup(e){e.querySelector(`main`)?.style.setProperty(`position`,`relative`)}},smh:{siteBackgroundColor:`#ffffff`,setup(e){e.querySelector(`main`)?.style.setProperty(`position`,`relative`)}},theage:{siteBackgroundColor:`#ffffff`,setup(e){e.querySelector(`main`)?.style.setProperty(`position`,`relative`)}}},s=[{site:`https://www.nine.com.au/sport`,config:o.wwos},{site:`https://staging.nine.com.au/sport`,config:o.wwos},{site:`https://www.nine.com.au`,config:o.nine},{site:`https://staging.nine.com.au`,config:o.nine},{site:`https://preview.nine.com.au`,config:o.nine},{site:`https://www.9news`,config:o.nineNews},{site:`https://staging.9news`,config:o.nineNews},{site:`https://honey`,config:o.lifestyle},{site:`https://www.smh`,config:o.smh},{site:`https://www.theage`,config:o.theage},{site:`https://creative-preview-an.com`,config:o.nine}],c=(()=>{let e=r.location.href;for(let t of s)if(e.indexOf(t.site)>=0)return t.config;return o.nine})(),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=()=>{let e=n.parentElement;for(;e&&e!==i.body&&e!==i.documentElement;){let t=r.getComputedStyle(e);(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({el:e,orig:e.getAttribute(`style`)}),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({el:e,orig:e.getAttribute(`style`)}),e.style.overflow=`visible`),e=e.parentElement}let o=n.style;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.8`),d){let e=d.style;e.width=`100%`,e.height=`0`,e.overflow=`visible`,e.position=`static`,e.margin=`0`}let s=a.style;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`,``));let l=`max(${t.sideStripWidth}px, env(safe-area-inset-left))`,u=`max(${t.sideStripWidth}px, env(safe-area-inset-right))`;h=i.createElement(`style`),h.id=`mobilefireplace-pac`,h.textContent=`
|
|
108
|
+
`,e.head.appendChild(t)}}},f={siteBackgroundColor:`#ffffff`,fireplaceLeftMargin:0,adNodeMarginTop:-32,adNodeMarginBottom:8,responsiveScroll:-124,xPosHalfpage:720,yPosHalfpage:16,stickyMargin:{offset:160,isSticky:!0},maskOffset:window.parent.document.querySelector(`div[class*="VideoIndexComponent"]`)?324:292,zIndex:function(){let e=window.parent.document;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);`);let t=e.querySelector(`[class*="VideoIndexComponent"]`);t&&(e.querySelector(`.breadcrumbs`)?.setAttribute(`style`,`display:none`),t.style.maxWidth=`1190px`,t.style.margin=`auto`,t.style.position=`relative`)}},p=[{site:`https://www.nine.com.au/sport`,config:u},{site:`https://www.nine.com.au/product-reviews`,config:c},{site:`https://www.nine.com.au/property`,config:c},{site:`https://www.nine.com.au/entertainment`,config:c},{site:`https://staging.nine.com.au/sport`,config:u},{site:`https://staging.nine.com.au/product-reviews`,config:c},{site:`https://staging.nine.com.au/property`,config:c},{site:`https://staging.nine.com.au/entertainment`,config:c},{site:`https://render-web-nine-staging-v1.ffxblue.com.au`,config:l},{site:`https://render-web-nine-production-v1.ffxblue.com.au`,config:l},{site:`https://preview.nine.com.au/`,config:l},{site:`https://www.nine`,config:l},{site:`https://staging.nine`,config:l},{site:`https://entertainment`,config:s},{site:`https://celebrity`,config:s},{site:`https://homes`,config:s},{site:`https://travel`,config:s},{site:`https://honey`,config:s},{site:`https://style`,config:s},{site:`https://coach`,config:s},{site:`https://kitchen`,config:s},{site:`https://finance`,config:s},{site:`https://wwos`,config:d},{site:`https://staging.wwos`,config:u},{site:`https://www.9news`,config:f},{site:`https://staging.9news`,config:f},{site:`https://www.yourtv`,config:s},{site:`https://staging.yourtv`,config:s},{site:`https://9now`,config:c},{site:`https://creative-preview-an.com`,config:s}],m=()=>{let e=window.document.getElementById(`nineContent`);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)},h=()=>{let e=null;return e=r.querySelector(`div[id*="billboard"][id*="above"]`),e},g=()=>{let e=null;if(!window.parent)return e;if(e=r.querySelector(`div[id*="halfpage"][id*="above"]`),!e)return;let t=e;for(let e=0;e<3;e++)if(t=t.parentNode,t&&getComputedStyle(t).position===`sticky`){t.setAttribute(`style`,`top: ${T.stickyMargin.offset}px`);break}},_=()=>{let e=n.location.href;for(let t=0;t<p.length;t+=1)if(e.indexOf(p[t].site)>=0)return p[t].config},v=()=>{if(!t)return;let e=t.style;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)`},y=()=>{if(!w)return;let e=w.style;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()},b=()=>{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)`)},x=0,S=0,C=()=>{let e=n.scrollY,r=e>x,i=e>O?e-T.maskOffset:0,s=Math.abs(i-S);if(o)if(r&&i>S)if(s>100){let e=Math.max(0,i-100);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`)}else o.style.transition=`clip-path 0.3s ease-out`,o.style.setProperty(`--mask-inset`,`${i}px`);else o.style.transition=`none`,o.style.setProperty(`--mask-inset`,`${i}px`);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())},w=h(),T=_();if(!T)return()=>{};let E=null,D=-T.responsiveScroll+e,O=D+150;return m(),()=>{n.removeEventListener(`scroll`,C),E&&=(clearTimeout(E),null)}},n=866,r=68,i=16,a=7e3,o=`adspot-desktop-takeover-2-above`,s=()=>{let e=window.frameElement||null;if(!e)return()=>{};let t=window.parent;if(!t||t===window)return()=>{};let s=null;try{s=t.document,t.location.href}catch{return()=>{}}let c=(e,t,n)=>{e&&e.style[t]!==n&&(e.style[t]=n)},l=(t=e.parentElement)=>{let n=t;for(;n&&n!==s.body;){let e=n.id||``,t=n.getAttribute?.(`data-testid`)||``,r=n.getAttribute?.(`type`)||``;if(e.includes(`adspot`)||t.toLowerCase().includes(`ad`)||r)return n;n=n.parentElement}return e.parentElement},u=()=>{try{let e=new URL(t.location.href);if([`www.nine.com.au`,`staging.nine.com.au`,`preview.nine.com.au`,`render-web-nine-staging-v1.ffxblue.com.au`,`render-web-nine-production-v1.ffxblue.com.au`].includes(e.hostname.toLowerCase())&&e.pathname.toLowerCase()===`/sport`)return{headingText:`Sport`,slotId:o}}catch{return null}return null},d=e=>Array.from(s.querySelectorAll(`#app h1, #app h2, #app h3`)).filter(t=>t.textContent?.trim().toLowerCase()===e.toLowerCase())[0]||null,f=u();if(!f)return()=>{};let p=l((f.slotId?s.getElementById(f.slotId):null)||e.parentElement);if(!p)return()=>{};let m=p.parentElement,h=p.nextSibling,g=s.createComment(`headingintegration-placeholder`),_=null,v=null,y=()=>{[p.parentElement,p].filter(Boolean).forEach(e=>{c(e,`overflow`,`visible`)}),c(p,`width`,`${n}px`),c(p,`maxWidth`,`${n}px`),c(p,`minWidth`,`${n}px`),c(p,`height`,`${r}px`),c(p,`minHeight`,`${r}px`),c(p,`marginLeft`,`auto`),c(p,`marginRight`,`auto`),c(p,`marginBottom`,`${i}px`),c(p,`position`,`relative`),c(p,`display`,`block`),c(p,`pointerEvents`,`none`),c(p,`zIndex`,`1080`),c(e,`width`,`${n}px`),c(e,`height`,`${r}px`),c(e,`display`,`block`),c(e,`border`,`0`),c(e,`position`,`relative`),c(e,`pointerEvents`,`auto`)},b=()=>{c(p,`display`,`none`),c(p,`height`,`0px`),c(p,`minHeight`,`0px`),c(p,`marginBottom`,`0px`)},x=(e=12)=>{let n=d(f.headingText);if(!n){e>1&&(v=t.setTimeout(()=>x(e-1),250));return}!g.parentNode&&m&&m.insertBefore(g,p),n.parentNode?.insertBefore(p,n),y(),_=t.setTimeout(b,a)};return x(),()=>{v&&=(t.clearTimeout(v),null),_&&=(t.clearTimeout(_),null),g.parentNode&&m&&(m.insertBefore(p,h),g.parentNode.removeChild(g))}},c=(e,t,n)=>{let r=window.frameElement?window.frameElement:null;if(!r)return()=>{};let i=window.parent;if(!i||i===window)return()=>{};let a=null;try{a=i.document,i.location.href}catch{return()=>{}}let o={siteBackgroundColor:`#ffffff`,logoTop:`44px`,logoLeft:`50%`,logoTransform:`translateX(-50%)`,logoSmallLeft:`250px`,logoSmallTransform:`translateX(0px)`,logoSmallFilter:`none`,zIndex:function(){let e=window.parent.document;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`)}},s={siteBackgroundColor:`#ffffff`,logoTop:`44px`,logoLeft:`50%`,logoTransform:`translateX(-50%)`,logoSmallLeft:`50%`,logoSmallTransform:`translateX(-50%)`,logoSmallFilter:`none`,zIndex:function(){let e=window.parent.document,t=(e,t)=>e.forEach(e=>t.forEach(([t,n])=>e.style[t]=n));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`)}},c={siteBackgroundColor:`#ffffff`,logoTop:`44px`,logoLeft:`50%`,logoTransform:`translateX(-50%)`,logoSmallLeft:`50%`,logoSmallTransform:`translateX(-50%)`,logoSmallFilter:`none`,zIndex:function(){let e=window.parent.document,t=(e,t)=>e.forEach(e=>t.forEach(([t,n])=>e.style[t]=n));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`)}},l={siteBackgroundColor:`#ffffff`,logoTop:`44px`,logoLeft:`50%`,logoTransform:`translateX(-50%)`,logoSmallLeft:`50%`,logoSmallTransform:`translateX(-50%)`,logoSmallFilter:`none`,zIndex:function(){let e=window.parent.document,t=(e,t)=>e.forEach(e=>t.forEach(([t,n])=>e.style[t]=n));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`)}},u={siteBackgroundColor:`#ffffff`,logoTop:`-148px`,logoLeft:`50%`,logoTransform:`translateX(-50%)`,logoSmallLeft:`50%`,logoSmallTransform:`translateX(-50%)`,logoSmallFilter:`none`,zIndex:function(){let e=window.parent.document;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`)}},d={siteBackgroundColor:`#ffffff`,logoTop:`44px`,logoLeft:`50%`,logoTransform:`translateX(-50%)`,logoSmallLeft:`50%`,logoSmallTransform:`translateX(-50%)`,logoSmallFilter:`invert(1)`,zIndex:function(){let e=window.parent.document;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`)}},f=[{site:`https://www.nine.com.au/sport`,config:o},{site:`https://www.nine.com.au/product-reviews`,config:c},{site:`https://www.nine.com.au/property`,config:c},{site:`https://www.nine.com.au/entertainment`,config:c},{site:`https://staging.nine.com.au/sport`,config:o},{site:`https://staging.nine.com.au/product-reviews`,config:c},{site:`https://staging.nine.com.au/property`,config:c},{site:`https://staging.nine.com.au/entertainment`,config:c},{site:`https://render-web-nine-staging-v1.ffxblue.com.au`,config:l},{site:`https://render-web-nine-production-v1.ffxblue.com.au`,config:l},{site:`https://preview.nine.com.au/`,config:l},{site:`https://www.nine`,config:l},{site:`https://staging.nine`,config:l},{site:`https://entertainment`,config:s},{site:`https://celebrity`,config:s},{site:`https://homes`,config:s},{site:`https://travel`,config:s},{site:`https://honey`,config:s},{site:`https://style`,config:s},{site:`https://coach`,config:s},{site:`https://kitchen`,config:s},{site:`https://finance`,config:s},{site:`https://wwos`,config:u},{site:`https://staging.wwos`,config:u},{site:`https://www.9news`,config:d},{site:`https://staging.9news`,config:d},{site:`https://www.yourtv`,config:s},{site:`https://staging.yourtv`,config:s},{site:`https://9now`,config:c},{site:`https://creative-preview-an.com`,config:s}],p=()=>{let e=window.document.getElementById(`logo-small`);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)},m=()=>{let e=null;return e=a.querySelector(`div[id*="desktop"][id*="takeover"][id*="above"]`),e},h=()=>{let e=i.location.href;for(let t=0;t<f.length;t+=1)if(e.indexOf(f[t].site)>=0)return f[t].config},g=()=>{if(!r)return;let e=r.style;e.width=`100%`,e.height=`${t}px`,e.position=`relative`},_=()=>{if(!S)return;let e=S.style;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()},v=e=>{if(!S)return;let r=S.style;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())},y=()=>{let e=i.scrollY;r.style,e>=0&&e<=T?v(`big`):e>T&&(v(e>E?`small`:`big`),E=e<=0?0:e)},b=(e=4)=>{x()||e>1&&setTimeout(()=>{b(e-1)},20)},x=()=>{let e=a.querySelector(`header`);return window.getComputedStyle(e).top===`0px`?(v(`big`),!0):(v(`small`),!1)},S=m(),C=h();if(!C)return()=>{};let w=null,T=e,E=0;return p(),()=>{i.removeEventListener(`scroll`,y),w&&=(clearTimeout(w),null)}},l=((e,t=50)=>`linear(${Array.from({length:t+1},(n,r)=>e(r/t)).map(e=>+e.toFixed(4)).join(`, `)})`)(e=>{if(e===0||e===1)return e;let t=2*Math.PI/3;return 2**(-10*e)*Math.sin((e*10-.75)*t)+1}),u=(e={})=>{let t={adScrollHeight:`300vh`,bandHeight:24,bandBg:`#222`,bandColor:`#fff`,bandFontSize:`10px`,bandFontFamily:`Arial, Helvetica, sans-serif`,bandLetterSpacing:`1px`,labelTop:`Advertisement`,labelBottomResume:`Scroll to continue`,labelBottomMid:`Keep scrolling`,labelBottomLate:`Almost there`,labelBottomNow:`Content now ↓`,progressBarColor:`rgba(255,255,255,0.35)`,zIndexTop:9,zIndexBottom:8,bottomBandShowAt:400,bottomBandHideAt:300,snapPx:50,snapOverlap:2,stretchOverlap:20,snapDuration:.9,snapEase:l,onEnter:null,onExit:null,onProgress:null,thresholds:[],...e},n=window.frameElement?window.frameElement:null;if(!n)return()=>{};let r=window.parent;if(!r||r===window)return()=>{};let i=null;try{i=r.document,r.location.href}catch{return()=>{}}let a=(()=>{let e=i.querySelector(`#adspot-mobile-mobile-3-above`);if(e)return e;let t=n.parentElement;for(;t&&t!==i.body;){if(t.id&&t.id.includes(`adspot`))return t;t=t.parentElement}return n.parentElement})();if(!a)return()=>{};let o=a.getAttribute(`style`),s=n.getAttribute(`style`),c=[],u={width:`100vw`,marginLeft:`calc(50% - 50vw)`,height:t.bandHeight+`px`,backgroundColor:t.bandBg,color:t.bandColor,fontSize:t.bandFontSize,fontFamily:t.bandFontFamily,textTransform:`uppercase`,letterSpacing:t.bandLetterSpacing,display:`flex`,alignItems:`center`,justifyContent:`center`,pointerEvents:`none`};(()=>{let e=a.style;e.height=t.adScrollHeight,e.maxHeight=t.adScrollHeight,e.position=`relative`,a.setAttribute(`poweredAC`,`0.1.30`),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`;let o=a.parentElement;for(let e=0;e<6&&o&&o!==i.body;e++){let t=r.getComputedStyle(o),n=!1;(t.overflow===`hidden`||t.overflowY===`hidden`)&&(c.push({el:o,prop:`overflow`,val:o.style.overflow}),c.push({el:o,prop:`overflowY`,val:o.style.overflowY}),o.style.overflow=`visible`,o.style.overflowY=`visible`,n=!0);let i=parseFloat(t.height);t.height!==`auto`&&!isNaN(i)&&i<600&&(c.push({el:o,prop:`height`,val:o.style.height}),o.style.height=`auto`,n=!0);let a=t.maxHeight;if(a&&a!==`none`&&(c.push({el:o,prop:`maxHeight`,val:o.style.maxHeight}),o.style.maxHeight=`none`,n=!0),!n&&e>1)break;o=o.parentElement}let s=n.style;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`;let l=i.createElement(`div`);l.id=`interscroller-top-band-wrapper`,Object.assign(l.style,{position:`sticky`,bottom:`0`,width:`100vw`,marginLeft:`calc(50% - 50vw)`,zIndex:t.zIndexTop,pointerEvents:`none`});let d=i.createElement(`div`);d.id=`interscroller-top-band`,d.textContent=t.labelTop,Object.assign(d.style,u,{position:`relative`,width:`100%`,marginLeft:`0`,transformOrigin:`top center`}),l.appendChild(d),a.insertAdjacentElement(`beforebegin`,l);let f=i.createElement(`div`);f.id=`interscroller-bottom-band`,Object.assign(f.style,u,{position:`fixed`,bottom:`0`,left:`0`,zIndex:t.zIndexBottom,display:`flex`,overflow:`hidden`,transform:`translateY(100%)`,transition:`none`});let p=i.createElement(`span`);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){let e=i.createElement(`span`);e.id=`interscroller-bottom-progress`,e.style.cssText=[`position:absolute`,`inset:0`,`width:0%`,`background:${t.progressBarColor}`,`transition:none`,`z-index:0`,`pointer-events:none`].join(`;`),f.appendChild(e)}a.after(f)})();let d=i.querySelector(`#interscroller-top-band`),f=i.querySelector(`#interscroller-top-band-wrapper`),p=i.querySelector(`#interscroller-bottom-band`),m=i.querySelector(`#interscroller-bottom-label`),h=i.querySelector(`#interscroller-bottom-progress`),g=t.bandHeight,_=t.snapPx,v=!1,y=!1,b=!1,x=!1,S=(t.thresholds||[]).map(()=>!1),C=()=>{if(!p)return;let e=a.getBoundingClientRect(),n=r.innerHeight,i=e.top<=n,o=e.bottom<=n-g,s=x?e.top<=n-t.bottomBandHideAt:e.top<=n-t.bottomBandShowAt,c=a.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));!y&&i&&t.onEnter&&t.onEnter(),!b&&o&&t.onExit&&t.onExit(),y=i,b=o,x=s,t.onProgress&&t.onProgress({scrollProgress:l,adExposure:f,viewportCoverage:w,pxRemaining:T}),(t.thresholds||[]).forEach((e,t)=>{let n=S[t],r=l>=e.at;!n&&r?(S[t]=!0,e.onEnter&&e.onEnter(l)):n&&!r&&(S[t]=!1,e.onLeave&&e.onLeave(l))});let E=n;if(d&&e.top<=E+t.stretchOverlap&&!o){let n=E-e.top;if(!v&&n<=_-t.snapOverlap){let e=1+Math.max(0,n+t.stretchOverlap)/g;d.style.transition=`none`,d.style.transform=`scaleY(${e})`}else !v&&n>_-t.snapOverlap&&(v=!0,d.style.transition=`transform ${t.snapDuration}s ${t.snapEase}`,d.style.transform=`scaleY(1)`)}else d&&e.top>E+t.stretchOverlap&&(v=!1,d.style.transition=`none`,d.style.transform=`scaleY(1)`);let D=r.visualViewport?Math.round(r.innerHeight-(r.visualViewport.offsetTop+r.visualViewport.height)):0;o?(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`)};return C(),r.addEventListener(`scroll`,C,{passive:!0}),r.visualViewport?.addEventListener(`resize`,C,{passive:!0}),()=>{r.removeEventListener(`scroll`,C),r.visualViewport?.removeEventListener(`resize`,C),f?f.remove():d&&d.remove(),p&&p.remove(),o?a.setAttribute(`style`,o):a.removeAttribute(`style`),s?n.setAttribute(`style`,s):n.removeAttribute(`style`),c.forEach(({el:e,prop:t,val:n})=>{e.style[t]=n||``})}},d=(e={})=>{let t={adaptToWidth:`100%`,maxWidth:`400px`,maintainAspectRatio:!0,adaptToHeight:!1,zIndex:7,onAdapt:null,...e},n=window.frameElement??null;if(!n)return()=>{};let r=window.parent;if(!r||r===window)return()=>{};let i=null;try{i=r.document,r.location.href}catch{return()=>{}}let a=(()=>{let e=i.querySelector(`#adspot-mobile-mbanner-2-above`);if(e)return e;let t=n.parentElement;for(;t&&t!==i.body;){if(t.id&&t.id.includes(`adspot`))return t;t=t.parentElement}return n.parentElement})();if(!a)return()=>{};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;return(()=>{let e=a.style;if(e.position=`relative`,e.overflow=`visible`,e.boxSizing=`border-box`,a.setAttribute(`poweredAC`,`0.1.30`),c){let e=c.style;e.width=`100%`,e.height=`100%`,e.margin=`0`,e.textAlign=`left`}let t=n.style;t.display=`block`,t.width=`100%`,t.height=`100%`,t.border=`none`,t.margin=`0`,t.padding=`0`})(),(()=>{let e=a.style;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(()=>{let e=a.offsetWidth||p,r=Math.round((m||50)/p*e);a.style.height=r+`px`,c&&(c.style.height=r+`px`),n.style.height=r+`px`,t.onAdapt&&t.onAdapt()}):(t.adaptToHeight&&(e.height=t.adaptToHeight),t.onAdapt&&t.onAdapt())})(),()=>{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)}},f=(e={})=>{let t={billboardHeight:150,sideStripWidth:10,zIndex:0,creativeUrl:null,onAdapt:null,...e},n=window.frameElement??null;if(!n)return()=>{};let r=window.parent;if(!r||r===window)return()=>{};let i=null;try{i=r.document,r.location.href}catch{return()=>{}}let a=(()=>{let e=i.querySelector(`#adspot-mobile-mbanner-2-above`);if(e)return e;let t=n.parentElement;for(;t&&t!==i.body;){if(t.id&&t.id.includes(`adspot`))return t;t=t.parentElement}return n.parentElement})();if(!a)return()=>{};let o={nine:{siteBackgroundColor:`#ffffff`,setup(e,t){e.querySelector(`main`)?.style.setProperty(`position`,`relative`);let n=t?.parentElement?.nextElementSibling;n&&n.tagName!==`HEADER`&&(n.style.paddingTop=`0px`)}},wwos:{siteBackgroundColor:`#ffffff`,setup(e,t){e.querySelector(`main`)?.style.setProperty(`position`,`relative`);let n=t?.parentElement?.nextElementSibling;n&&n.tagName!==`HEADER`&&(n.style.paddingTop=`0px`)}},nineNews:{siteBackgroundColor:`#ffffff`,setup(e){let t=e.querySelector(`.layout`);t&&(t.style.backgroundColor=`transparent`),e.querySelector(`.content`)?.style.setProperty(`position`,`relative`)}},lifestyle:{siteBackgroundColor:`#ffffff`,setup(e){e.querySelector(`main`)?.style.setProperty(`position`,`relative`)}},smh:{siteBackgroundColor:`#ffffff`,setup(e){e.querySelector(`main`)?.style.setProperty(`position`,`relative`)}},theage:{siteBackgroundColor:`#ffffff`,setup(e){e.querySelector(`main`)?.style.setProperty(`position`,`relative`)}}},s=[{site:`https://www.nine.com.au/sport`,config:o.wwos},{site:`https://staging.nine.com.au/sport`,config:o.wwos},{site:`https://www.nine.com.au`,config:o.nine},{site:`https://staging.nine.com.au`,config:o.nine},{site:`https://preview.nine.com.au`,config:o.nine},{site:`https://www.9news`,config:o.nineNews},{site:`https://staging.9news`,config:o.nineNews},{site:`https://honey`,config:o.lifestyle},{site:`https://www.smh`,config:o.smh},{site:`https://www.theage`,config:o.theage},{site:`https://creative-preview-an.com`,config:o.nine}],c=(()=>{let e=r.location.href;for(let t of s)if(e.indexOf(t.site)>=0)return t.config;return o.nine})(),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=()=>{let e=n.parentElement;for(;e&&e!==i.body&&e!==i.documentElement;){let t=r.getComputedStyle(e);(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({el:e,orig:e.getAttribute(`style`)}),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({el:e,orig:e.getAttribute(`style`)}),e.style.overflow=`visible`),e=e.parentElement}let o=n.style;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.30`),d){let e=d.style;e.width=`100%`,e.height=`0`,e.overflow=`visible`,e.position=`static`,e.margin=`0`}let s=a.style;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`,``));let l=`max(${t.sideStripWidth}px, env(safe-area-inset-left))`,u=`max(${t.sideStripWidth}px, env(safe-area-inset-right))`;h=i.createElement(`style`),h.id=`mobilefireplace-pac`,h.textContent=`
|
|
22
109
|
/* Mobile Fireplace — powered-ad-config */
|
|
23
110
|
html, body {
|
|
24
111
|
background-color: transparent !important;
|
|
@@ -70,4 +157,4 @@
|
|
|
70
157
|
margin: 0 !important;
|
|
71
158
|
padding: 0 !important;
|
|
72
159
|
}
|
|
73
|
-
`,i.head.appendChild(h),c.setup&&c.setup(i,a)},y=null,b=()=>{let e=r.innerWidth,n=r.innerHeight;if(e>n){let r=n/e,i=Math.round(t.billboardHeight*r);a.style.height=i+`px`,a.style.minHeight=i+`px`,g&&(g.style.height=i+`px`)}else a.style.height=t.billboardHeight+`px`,a.style.minHeight=t.billboardHeight+`px`,g&&(g.style.height=t.billboardHeight+`px`)};v();let x=t.creativeUrl||``;if(x&&x!==`about:blank`)try{let e=new URL(x);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`);let n=g.style;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)}catch(e){console.warn(`[mobilefireplace] Could not create billboard iframe:`,e)}return r.__mfBridge={adapted:!1,wallpaperWindow:n.contentWindow,billboardIframe:g,billboardWindow:null},g&&g.addEventListener(`load`,()=>{try{r.__mfBridge.billboardWindow=g.contentWindow}catch{}}),y=b,r.addEventListener(`resize`,y),b(),t.onAdapt&&r.requestAnimationFrame(()=>{r.__mfBridge.adapted=!0,t.onAdapt()}),()=>{y&&=(r.removeEventListener(`resize`,y),null),h&&h.parentNode&&(h.parentNode.removeChild(h),h=null),g&&g.parentNode&&(g.parentNode.removeChild(g),g=null);try{delete r.__mfBridge}catch{}l?n.setAttribute(`style`,l):n.removeAttribute(`style`);for(let{el:e,orig:t}of _)t?e.setAttribute(`style`,t):e.removeAttribute(`style`);_.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`))}},
|
|
160
|
+
`,i.head.appendChild(h),c.setup&&c.setup(i,a)},y=null,b=()=>{let e=r.innerWidth,n=r.innerHeight;if(e>n){let r=n/e,i=Math.round(t.billboardHeight*r);a.style.height=i+`px`,a.style.minHeight=i+`px`,g&&(g.style.height=i+`px`)}else a.style.height=t.billboardHeight+`px`,a.style.minHeight=t.billboardHeight+`px`,g&&(g.style.height=t.billboardHeight+`px`)};v();let x=t.creativeUrl||``;if(x&&x!==`about:blank`)try{let e=new URL(x);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`);let n=g.style;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)}catch(e){console.warn(`[mobilefireplace] Could not create billboard iframe:`,e)}return r.__mfBridge={adapted:!1,wallpaperWindow:n.contentWindow,billboardIframe:g,billboardWindow:null},g&&g.addEventListener(`load`,()=>{try{r.__mfBridge.billboardWindow=g.contentWindow}catch{}}),y=b,r.addEventListener(`resize`,y),b(),t.onAdapt&&r.requestAnimationFrame(()=>{r.__mfBridge.adapted=!0,t.onAdapt()}),()=>{y&&=(r.removeEventListener(`resize`,y),null),h&&h.parentNode&&(h.parentNode.removeChild(h),h=null),g&&g.parentNode&&(g.parentNode.removeChild(g),g=null);try{delete r.__mfBridge}catch{}l?n.setAttribute(`style`,l):n.removeAttribute(`style`);for(let{el:e,orig:t}of _)t?e.setAttribute(`style`,t):e.removeAttribute(`style`);_.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`))}},p=()=>{};function m({adFormat:n=``,stickyOffset:r=0,logoPosX:i=0,logoHeight:a=0,logoSmallHeight:o=0,...l}={}){typeof p==`function`&&p();let m=()=>{};return n===`fireplace`?m=e(r):n===`fireplace-collant`?m=t(r):n===`logomorph`?m=c(i,a,o):n===`headingintegration`?m=s(l):n===`interscroller`?m=u(l):n===`liquidframe`?m=d(l):n===`mobilefireplace`?m=f(l):console.warn(`[powered-ad-config] Unknown ad format:`,n),p=typeof m==`function`?m:()=>{},p}return m.version=`0.1.30`,m});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "powered-ad-config",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.30",
|
|
4
4
|
"description": "Configure Ads to load smoothly and at the right position on All Nine's websites",
|
|
5
5
|
"main": "dist/powered-ad-config.umd.js",
|
|
6
6
|
"module": "dist/powered-ad-config.es.js",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"verify": "node scripts/purge-cdn.js --verify-only"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
|
-
"vite": "^8.0.
|
|
27
|
+
"vite": "^8.0.8"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
30
|
},
|