powered-ad-config 0.1.36 → 0.1.38

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.
@@ -662,74 +662,74 @@ var e = (e) => {
662
662
  return m(), () => {
663
663
  n.removeEventListener("scroll", C), E &&= (clearTimeout(E), null);
664
664
  };
665
- }, n = 866, r = 68, i = 16, a = 7e3, o = "adspot-desktop-takeover-2-above", s = -24, c = -24, l = [
665
+ }, n = 866, r = 68, i = 16, a = "adspot-desktop-takeover-2-above", o = -24, s = -24, c = [
666
666
  "www.nine.com.au",
667
667
  "staging.nine.com.au",
668
668
  "preview.nine.com.au",
669
669
  "render-web-nine-staging-v1.ffxblue.com.au",
670
670
  "render-web-nine-production-v1.ffxblue.com.au"
671
- ], u = [{
672
- hostnames: l,
671
+ ], l = [{
672
+ hostnames: c,
673
673
  path: "/sport",
674
674
  headingText: "Sport",
675
- slotId: o
676
- }], d = new Set(["localhost", "127.0.0.1"]), f = "__poweredAdConfigHeadingintegrationActive", p = "data-pac-headingintegration-owner", m = "data-pac-reparented", h = (e, t) => {
675
+ slotId: a
676
+ }], u = new Set(["localhost", "127.0.0.1"]), d = "__poweredAdConfigHeadingintegrationActive", f = "data-pac-headingintegration-owner", p = "data-pac-reparented", m = (e, t) => {
677
677
  if (typeof e == "number" && Number.isFinite(e)) return `${e}px`;
678
678
  if (typeof e == "string") {
679
679
  let n = e.trim();
680
680
  return n ? /^-?\d+(\.\d+)?$/.test(n) ? `${n}px` : n : `${t}px`;
681
681
  }
682
682
  return `${t}px`;
683
- }, g = (e) => {
683
+ }, h = (e) => {
684
684
  if (!e || typeof e != "object") return null;
685
685
  let t = typeof e.headingText == "string" ? e.headingText.trim() : "", n = typeof e.path == "string" ? e.path.trim().toLowerCase() : "", r = typeof e.pathPrefix == "string" ? e.pathPrefix.trim().toLowerCase() : "", i = Array.isArray(e.hostnames) ? e.hostnames.map((e) => String(e).trim().toLowerCase()).filter(Boolean) : [];
686
686
  return !t || !n && !r ? null : {
687
687
  headingText: t,
688
688
  path: n || null,
689
689
  pathPrefix: r || null,
690
- slotId: typeof e.slotId == "string" && e.slotId.trim() ? e.slotId.trim() : o,
691
- hostnames: i.length ? i : l
690
+ slotId: typeof e.slotId == "string" && e.slotId.trim() ? e.slotId.trim() : a,
691
+ hostnames: i.length ? i : c
692
692
  };
693
- }, _ = (e) => {
694
- if (!Array.isArray(e) || e.length === 0) return u;
695
- let t = e.map(g).filter(Boolean);
696
- return t.length ? t : u;
697
- }, v = ({ offsetTop: e = s, offsetLeft: t = c, width: o = n, height: l = r, pageTargets: g = u } = {}) => {
698
- let v = window.frameElement || null;
699
- if (!v) return () => {};
700
- let y = window.parent;
701
- if (!y || y === window) return () => {};
702
- let b = null;
693
+ }, g = (e) => {
694
+ if (!Array.isArray(e) || e.length === 0) return l;
695
+ let t = e.map(h).filter(Boolean);
696
+ return t.length ? t : l;
697
+ }, _ = ({ offsetTop: e = o, offsetLeft: t = s, width: a = n, height: c = r, pageTargets: h = l } = {}) => {
698
+ let _ = window.frameElement || null;
699
+ if (!_) return () => {};
700
+ let v = window.parent;
701
+ if (!v || v === window) return () => {};
702
+ let y = null;
703
703
  try {
704
- b = y.document, y.location.href;
704
+ y = v.document, v.location.href;
705
705
  } catch {
706
706
  return () => {};
707
707
  }
708
- let x = y[f];
709
- if (x?.iframe === v && typeof x.cleanup == "function") return x.cleanup;
710
- if (x?.iframe?.isConnected && typeof x?.cleanup == "function") return () => {};
711
- typeof x?.cleanup == "function" && x.cleanup();
712
- let S = `headingintegration-${Date.now()}-${Math.random().toString(36).slice(2, 8)}`, C = (e, t, n) => {
708
+ let b = v[d];
709
+ if (b?.iframe === _ && typeof b.cleanup == "function") return b.cleanup;
710
+ if (b?.iframe?.isConnected && typeof b?.cleanup == "function") return () => {};
711
+ typeof b?.cleanup == "function" && b.cleanup();
712
+ let x = `headingintegration-${Date.now()}-${Math.random().toString(36).slice(2, 8)}`, S = (e, t, n) => {
713
713
  e && e.style[t] !== n && (e.style[t] = n);
714
- }, w = () => {
714
+ }, C = () => {
715
715
  try {
716
716
  let e = window.location.hostname.toLowerCase();
717
- return d.has(e) ? !0 : new URLSearchParams(window.location.search).get("keepHeadingintegrationVisible") === "1";
717
+ return u.has(e) ? !0 : new URLSearchParams(window.location.search).get("keepHeadingintegrationVisible") === "1";
718
718
  } catch {
719
719
  return !1;
720
720
  }
721
- }, T = (e = v.parentElement) => {
721
+ }, w = (e = _.parentElement) => {
722
722
  let t = e;
723
- for (; t && t !== b.body;) {
723
+ for (; t && t !== y.body;) {
724
724
  let e = t.id || "", n = t.getAttribute?.("data-testid") || "", r = t.getAttribute?.("type") || "";
725
725
  if (e.includes("adspot") || n.toLowerCase().includes("ad") || r) return t;
726
726
  t = t.parentElement;
727
727
  }
728
- return v.parentElement;
729
- }, E = () => {
728
+ return _.parentElement;
729
+ }, T = () => {
730
730
  try {
731
- let e = new URL(y.location.href), t = e.hostname.toLowerCase(), n = e.pathname.toLowerCase();
732
- return F.find((e) => {
731
+ let e = new URL(v.location.href), t = e.hostname.toLowerCase(), n = e.pathname.toLowerCase();
732
+ return P.find((e) => {
733
733
  let r = e.hostnames.includes(t), i = e.path ? n === e.path : n.startsWith(e.pathPrefix);
734
734
  return r && i;
735
735
  }) || null;
@@ -737,104 +737,118 @@ var e = (e) => {
737
737
  return null;
738
738
  }
739
739
  return null;
740
- }, D = (e) => Array.from(b.querySelectorAll("#app h1, #app h2, #app h3")).filter((t) => t.textContent?.trim().toLowerCase() === e.toLowerCase())[0] || null, O = null, k = null, A = w(), j = h(e, s), M = h(t, c), N = h(o, n), P = h(l, r), F = _(g), I = E();
740
+ }, E = (e) => Array.from(y.querySelectorAll("#app h1, #app h2, #app h3")).filter((t) => t.textContent?.trim().toLowerCase() === e.toLowerCase())[0] || null, D = null, O = null, k = C(), A = m(e, o), j = m(t, s), M = m(a, n), N = m(c, r), P = g(h), F = T();
741
+ if (!F) return () => {};
742
+ let I = w((F.slotId ? y.getElementById(F.slotId) : null) || _.parentElement);
741
743
  if (!I) return () => {};
742
- let L = T((I.slotId ? b.getElementById(I.slotId) : null) || v.parentElement);
743
- if (!L) return () => {};
744
- let R = L.getAttribute(p);
745
- if (R && R !== S) return () => {};
746
- let z = {
747
- width: L.style.width,
748
- maxWidth: L.style.maxWidth,
749
- minWidth: L.style.minWidth,
750
- height: L.style.height,
751
- minHeight: L.style.minHeight,
752
- marginTop: L.style.marginTop,
753
- marginBottom: L.style.marginBottom,
754
- marginLeft: L.style.marginLeft,
755
- marginRight: L.style.marginRight,
756
- position: L.style.position,
757
- top: L.style.top,
758
- left: L.style.left,
759
- right: L.style.right,
760
- transform: L.style.transform,
761
- display: L.style.display,
762
- pointerEvents: L.style.pointerEvents,
763
- zIndex: L.style.zIndex,
764
- overflow: L.style.overflow
765
- }, B = {
766
- width: v.style.width,
767
- height: v.style.height,
768
- display: v.style.display,
769
- border: v.style.border,
770
- position: v.style.position,
771
- pointerEvents: v.style.pointerEvents
772
- }, V = [], ee = parseFloat(P) || r, H = parseFloat(j) || 0, U = parseFloat(M) || 0, W = () => {
773
- let e = L.parentElement;
774
- for (; e && e !== b.body;) V.push({
744
+ let L = I.getAttribute(f);
745
+ if (L && L !== x) return () => {};
746
+ let R = {
747
+ width: I.style.width,
748
+ maxWidth: I.style.maxWidth,
749
+ minWidth: I.style.minWidth,
750
+ height: I.style.height,
751
+ minHeight: I.style.minHeight,
752
+ marginTop: I.style.marginTop,
753
+ marginBottom: I.style.marginBottom,
754
+ marginLeft: I.style.marginLeft,
755
+ marginRight: I.style.marginRight,
756
+ position: I.style.position,
757
+ top: I.style.top,
758
+ left: I.style.left,
759
+ right: I.style.right,
760
+ transform: I.style.transform,
761
+ display: I.style.display,
762
+ opacity: I.style.opacity,
763
+ transition: I.style.transition,
764
+ pointerEvents: I.style.pointerEvents,
765
+ zIndex: I.style.zIndex,
766
+ overflow: I.style.overflow
767
+ }, z = {
768
+ width: _.style.width,
769
+ height: _.style.height,
770
+ display: _.style.display,
771
+ border: _.style.border,
772
+ position: _.style.position,
773
+ pointerEvents: _.style.pointerEvents
774
+ }, B = [], V = parseFloat(N) || r, H = parseFloat(A) || 0, U = parseFloat(j) || 0, W = () => {
775
+ let e = I.parentElement;
776
+ for (; e && e !== y.body;) B.push({
775
777
  element: e,
776
778
  overflow: e.style.overflow
777
- }), C(e, "overflow", "visible"), e = e.parentElement;
779
+ }), S(e, "overflow", "visible"), e = e.parentElement;
778
780
  }, G = () => {
779
- C(L, "width", N), C(L, "maxWidth", N), C(L, "minWidth", N), C(L, "height", P), C(L, "minHeight", P), C(L, "display", "block"), C(L, "overflow", "visible"), C(L, "pointerEvents", "none"), C(L, "zIndex", "1080"), L.setAttribute(p, S), C(v, "width", N), C(v, "height", P), C(v, "display", "block"), C(v, "border", "0"), C(v, "position", "relative"), C(v, "pointerEvents", "auto");
781
+ S(I, "width", M), S(I, "maxWidth", M), S(I, "minWidth", M), S(I, "height", N), S(I, "minHeight", N), S(I, "display", "block"), S(I, "opacity", k ? "1" : "0"), S(I, "transition", "opacity 0.3s ease-in-out"), S(I, "overflow", "visible"), S(I, "pointerEvents", "none"), S(I, "zIndex", "1080"), I.setAttribute(f, x), S(_, "width", M), S(_, "height", N), S(_, "display", "block"), S(_, "border", "0"), S(_, "position", "relative"), S(_, "pointerEvents", "auto");
780
782
  }, K = {
781
783
  element: null,
782
784
  position: ""
783
- }, te = () => {
784
- let e = L.parentElement;
785
- e && y.getComputedStyle(e).position === "static" && (K.element = e, K.position = e.style.position, C(e, "position", "relative")), C(L, "position", "absolute"), C(L, "top", `${H}px`), C(L, "left", `${U}px`), C(L, "right", "auto"), C(L, "marginTop", "0px"), C(L, "marginBottom", `${i}px`), C(L, "marginLeft", "0px"), C(L, "marginRight", "0px"), C(L, "transform", "");
786
- }, ne = (e) => {
785
+ }, ee = () => {
786
+ let e = I.parentElement;
787
+ e && v.getComputedStyle(e).position === "static" && (K.element = e, K.position = e.style.position, S(e, "position", "relative")), S(I, "position", "absolute"), S(I, "top", `${H}px`), S(I, "left", `${U}px`), S(I, "right", "auto"), S(I, "marginTop", "0px"), S(I, "marginBottom", `${i}px`), S(I, "marginLeft", "0px"), S(I, "marginRight", "0px"), S(I, "transform", "");
788
+ }, te = (e) => {
787
789
  let t = null;
788
790
  try {
789
- t = v.contentDocument?.documentElement?.outerHTML || null;
791
+ let e = _.contentDocument;
792
+ if (!e) return !1;
793
+ let n = e.getElementById("unitContainer");
794
+ if (!n) return !1;
795
+ let r = Array.from(e.querySelectorAll("link[rel=\"stylesheet\"]")).map((e) => e.outerHTML).join("\n"), i = Array.from(e.querySelectorAll("script[src]")).filter((e) => {
796
+ let t = e.getAttribute("src") || "";
797
+ return /(s0\.2mdn\.net|cdn\.jsdelivr\.net|players\.brightcove\.net)/.test(t);
798
+ }).map((e) => e.outerHTML).join("\n");
799
+ t = `<!doctype html><html><head><meta charset="utf-8">${r}<style>html,body{margin:0;padding:0;background:transparent;}</style></head><body>${n.outerHTML}${i}</body></html>`;
790
800
  } catch {
791
801
  return !1;
792
802
  }
793
803
  if (!t) return !1;
794
- v.setAttribute(m, "1");
804
+ _.setAttribute(p, "1");
795
805
  try {
796
- e.parentNode?.insertBefore(L, e);
806
+ e.parentNode?.insertBefore(I, e);
797
807
  } catch {
798
- return v.removeAttribute(m), !1;
808
+ return _.removeAttribute(p), !1;
799
809
  }
800
- W(), G(), te();
810
+ W(), G(), ee();
801
811
  try {
802
- v.srcdoc = t;
812
+ _.srcdoc = t;
803
813
  } catch {
804
814
  return !1;
805
815
  }
806
816
  return !0;
817
+ }, ne = () => {
818
+ S(I, "position", "fixed"), S(I, "marginTop", "0px"), S(I, "marginBottom", "0px"), S(I, "marginLeft", "0px"), S(I, "marginRight", "0px"), S(I, "transform", "");
807
819
  }, re = () => {
808
- C(L, "position", "fixed"), C(L, "marginTop", "0px"), C(L, "marginBottom", "0px"), C(L, "marginLeft", "0px"), C(L, "marginRight", "0px"), C(L, "transform", "");
820
+ S(I, "opacity", "0");
809
821
  }, ie = () => {
810
- C(L, "display", "none"), C(L, "height", "0px"), C(L, "minHeight", "0px"), C(L, "marginBottom", "0px");
822
+ S(I, "opacity", "1");
811
823
  }, q = null, J = () => {
812
- if ((!q || !q.isConnected) && (q = D(I.headingText)), !q) return;
813
- let e = q.getBoundingClientRect(), t = e.top - ee - i + H, n = e.left + U;
814
- C(L, "top", `${t}px`), C(L, "left", `${n}px`), C(L, "right", "auto");
824
+ if ((!q || !q.isConnected) && (q = E(F.headingText)), !q) return;
825
+ let e = q.getBoundingClientRect(), t = e.top - V - i + H, n = e.left + U;
826
+ S(I, "top", `${t}px`), S(I, "left", `${n}px`), S(I, "right", "auto");
815
827
  }, Y = null, X = null, Z = !1, Q = (e = 12) => {
816
- if (q = D(I.headingText), !q) {
817
- e > 1 && (k = y.setTimeout(() => Q(e - 1), 250));
828
+ if (q = E(F.headingText), !q) {
829
+ e > 1 && (O = v.setTimeout(() => Q(e - 1), 250));
818
830
  return;
819
831
  }
820
- ne(q) || (Z = !0, W(), G(), re(), J(), Y = () => J(), X = () => J(), y.addEventListener("scroll", Y, { passive: !0 }), y.addEventListener("resize", X)), A || (O = y.setTimeout(ie, a));
832
+ te(q) || (Z = !0, W(), G(), ne(), J(), Y = () => J(), X = () => J(), v.addEventListener("scroll", Y, { passive: !0 }), v.addEventListener("resize", X));
821
833
  };
822
834
  Q();
823
835
  let $ = () => {
824
- k &&= (y.clearTimeout(k), null), O &&= (y.clearTimeout(O), null), Y &&= (y.removeEventListener("scroll", Y), null), X &&= (y.removeEventListener("resize", X), null), L.getAttribute(p) === S && L.removeAttribute(p), Z && (Object.entries(z).forEach(([e, t]) => {
825
- L.style[e] = t;
826
- }), Object.entries(B).forEach(([e, t]) => {
827
- v.style[e] = t;
828
- }), V.forEach(({ element: e, overflow: t }) => {
836
+ O &&= (v.clearTimeout(O), null), D &&= (v.clearTimeout(D), null), Y &&= (v.removeEventListener("scroll", Y), null), X &&= (v.removeEventListener("resize", X), null), I.getAttribute(f) === x && I.removeAttribute(f), Z && (Object.entries(R).forEach(([e, t]) => {
837
+ I.style[e] = t;
838
+ }), Object.entries(z).forEach(([e, t]) => {
839
+ _.style[e] = t;
840
+ }), B.forEach(({ element: e, overflow: t }) => {
829
841
  e.style.overflow = t;
830
- })), y[f]?.instanceId === S && delete y[f];
842
+ })), v[d]?.instanceId === x && delete v[d];
831
843
  };
832
- return y[f] = {
833
- instanceId: S,
834
- iframe: v,
835
- cleanup: $
844
+ return v[d] = {
845
+ instanceId: x,
846
+ iframe: _,
847
+ cleanup: $,
848
+ show: ie,
849
+ hide: re
836
850
  }, $;
837
- }, y = (e, t, n) => {
851
+ }, v = (e, t, n) => {
838
852
  let r = window.frameElement ? window.frameElement : null;
839
853
  if (!r) return () => {};
840
854
  let i = window.parent;
@@ -1075,11 +1089,11 @@ var e = (e) => {
1075
1089
  return p(), () => {
1076
1090
  i.removeEventListener("scroll", y), w &&= (clearTimeout(w), null);
1077
1091
  };
1078
- }, b = ((e, t = 50) => `linear(${Array.from({ length: t + 1 }, (n, r) => e(r / t)).map((e) => +e.toFixed(4)).join(", ")})`)((e) => {
1092
+ }, y = ((e, t = 50) => `linear(${Array.from({ length: t + 1 }, (n, r) => e(r / t)).map((e) => +e.toFixed(4)).join(", ")})`)((e) => {
1079
1093
  if (e === 0 || e === 1) return e;
1080
1094
  let t = 2 * Math.PI / 3;
1081
1095
  return 2 ** (-10 * e) * Math.sin((e * 10 - .75) * t) + 1;
1082
- }), x = (e = {}) => {
1096
+ }), b = (e = {}) => {
1083
1097
  let t = {
1084
1098
  adScrollHeight: "300vh",
1085
1099
  bandHeight: 24,
@@ -1102,7 +1116,7 @@ var e = (e) => {
1102
1116
  snapOverlap: 2,
1103
1117
  stretchOverlap: 20,
1104
1118
  snapDuration: .9,
1105
- snapEase: b,
1119
+ snapEase: y,
1106
1120
  onEnter: null,
1107
1121
  onExit: null,
1108
1122
  onProgress: null,
@@ -1146,7 +1160,7 @@ var e = (e) => {
1146
1160
  };
1147
1161
  (() => {
1148
1162
  let e = a.style;
1149
- e.height = t.adScrollHeight, e.maxHeight = t.adScrollHeight, e.position = "relative", a.setAttribute("poweredAC", "0.1.36"), 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";
1163
+ e.height = t.adScrollHeight, e.maxHeight = t.adScrollHeight, e.position = "relative", a.setAttribute("poweredAC", "0.1.38"), 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";
1150
1164
  let o = a.parentElement;
1151
1165
  for (let e = 0; e < 6 && o && o !== i.body; e++) {
1152
1166
  let t = r.getComputedStyle(o), n = !1;
@@ -1217,12 +1231,12 @@ var e = (e) => {
1217
1231
  }
1218
1232
  a.after(f);
1219
1233
  })();
1220
- let u = i.querySelector("#interscroller-top-band"), d = i.querySelector("#interscroller-top-band-wrapper"), f = i.querySelector("#interscroller-bottom-band"), p = i.querySelector("#interscroller-bottom-label"), m = i.querySelector("#interscroller-bottom-progress"), h = t.bandHeight, g = t.snapPx, _ = !1, v = !1, y = !1, x = !1, S = (t.thresholds || []).map(() => !1), C = () => {
1234
+ let u = i.querySelector("#interscroller-top-band"), d = i.querySelector("#interscroller-top-band-wrapper"), f = i.querySelector("#interscroller-bottom-band"), p = i.querySelector("#interscroller-bottom-label"), m = i.querySelector("#interscroller-bottom-progress"), h = t.bandHeight, g = t.snapPx, _ = !1, v = !1, b = !1, x = !1, S = (t.thresholds || []).map(() => !1), C = () => {
1221
1235
  if (!f) return;
1222
- let e = a.getBoundingClientRect(), n = r.innerHeight, i = e.top <= n, o = e.bottom <= n - h, 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))), d = Math.min(1, Math.max(0, (n - e.top) / (c + h))), b = Math.min(1, Math.max(0, (n - e.top) / c)), C = Math.min(e.bottom, n) - Math.max(e.top - h, 0), w = Math.min(1, Math.max(0, C / n)), T = Math.max(0, Math.round(e.bottom - n));
1223
- !v && i && t.onEnter && t.onEnter(), !y && o && t.onExit && t.onExit(), v = i, y = o, x = s, t.onProgress && t.onProgress({
1236
+ let e = a.getBoundingClientRect(), n = r.innerHeight, i = e.top <= n, o = e.bottom <= n - h, 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))), d = Math.min(1, Math.max(0, (n - e.top) / (c + h))), y = Math.min(1, Math.max(0, (n - e.top) / c)), C = Math.min(e.bottom, n) - Math.max(e.top - h, 0), w = Math.min(1, Math.max(0, C / n)), T = Math.max(0, Math.round(e.bottom - n));
1237
+ !v && i && t.onEnter && t.onEnter(), !b && o && t.onExit && t.onExit(), v = i, b = o, x = s, t.onProgress && t.onProgress({
1224
1238
  scrollProgress: l,
1225
- adExposure: b,
1239
+ adExposure: y,
1226
1240
  viewportCoverage: w,
1227
1241
  pxRemaining: T
1228
1242
  }), (t.thresholds || []).forEach((e, t) => {
@@ -1245,7 +1259,7 @@ var e = (e) => {
1245
1259
  e.style[t] = n || "";
1246
1260
  });
1247
1261
  };
1248
- }, S = (e = {}) => {
1262
+ }, x = (e = {}) => {
1249
1263
  let t = {
1250
1264
  adaptToWidth: "100%",
1251
1265
  maxWidth: "400px",
@@ -1278,7 +1292,7 @@ var e = (e) => {
1278
1292
  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;
1279
1293
  return (() => {
1280
1294
  let e = a.style;
1281
- if (e.position = "relative", e.overflow = "visible", e.boxSizing = "border-box", a.setAttribute("poweredAC", "0.1.36"), c) {
1295
+ if (e.position = "relative", e.overflow = "visible", e.boxSizing = "border-box", a.setAttribute("poweredAC", "0.1.38"), c) {
1282
1296
  let e = c.style;
1283
1297
  e.width = "100%", e.height = "100%", e.margin = "0", e.textAlign = "left";
1284
1298
  }
@@ -1293,7 +1307,7 @@ var e = (e) => {
1293
1307
  })(), () => {
1294
1308
  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);
1295
1309
  };
1296
- }, C = (e = {}) => {
1310
+ }, S = (e = {}) => {
1297
1311
  let t = {
1298
1312
  billboardHeight: 150,
1299
1313
  sideStripWidth: 10,
@@ -1426,7 +1440,7 @@ var e = (e) => {
1426
1440
  }), e.style.overflow = "visible"), e = e.parentElement;
1427
1441
  }
1428
1442
  let o = n.style;
1429
- 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.36"), d) {
1443
+ 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.38"), d) {
1430
1444
  let e = d.style;
1431
1445
  e.width = "100%", e.height = "0", e.overflow = "visible", e.position = "static", e.margin = "0";
1432
1446
  }
@@ -1523,12 +1537,12 @@ var e = (e) => {
1523
1537
  for (let { el: e, orig: t } of _) t ? e.setAttribute("style", t) : e.removeAttribute("style");
1524
1538
  _.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"));
1525
1539
  };
1526
- }, w = () => {};
1527
- function T({ adFormat: n = "", stickyOffset: r = 0, logoPosX: i = 0, logoHeight: a = 0, logoSmallHeight: o = 0, ...s } = {}) {
1528
- typeof w == "function" && w();
1540
+ }, C = () => {};
1541
+ function w({ adFormat: n = "", stickyOffset: r = 0, logoPosX: i = 0, logoHeight: a = 0, logoSmallHeight: o = 0, ...s } = {}) {
1542
+ typeof C == "function" && C();
1529
1543
  let c = () => {};
1530
- return n === "fireplace" ? c = e(r) : n === "fireplace-collant" ? c = t(r) : n === "logomorph" ? c = y(i, a, o) : n === "headingintegration" ? c = v(s) : n === "interscroller" ? c = x(s) : n === "liquidframe" ? c = S(s) : n === "mobilefireplace" ? c = C(s) : console.warn("[powered-ad-config] Unknown ad format:", n), w = typeof c == "function" ? c : () => {}, w;
1544
+ return n === "fireplace" ? c = e(r) : n === "fireplace-collant" ? c = t(r) : n === "logomorph" ? c = v(i, a, o) : n === "headingintegration" ? c = _(s) : n === "interscroller" ? c = b(s) : n === "liquidframe" ? c = x(s) : n === "mobilefireplace" ? c = S(s) : console.warn("[powered-ad-config] Unknown ad format:", n), C = typeof c == "function" ? c : () => {}, C;
1531
1545
  }
1532
- T.version = "0.1.36";
1546
+ w.version = "0.1.38";
1533
1547
  //#endregion
1534
- export { T as default };
1548
+ export { w as default };
@@ -105,7 +105,9 @@
105
105
  div:has(#adspot-tablet-takeover-2-above) {
106
106
  position: static;
107
107
  }
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=-24,c=-24,l=[`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`],u=[{hostnames:l,path:`/sport`,headingText:`Sport`,slotId:o}],d=new Set([`localhost`,`127.0.0.1`]),f=`__poweredAdConfigHeadingintegrationActive`,p=`data-pac-headingintegration-owner`,m=`data-pac-reparented`,h=(e,t)=>{if(typeof e==`number`&&Number.isFinite(e))return`${e}px`;if(typeof e==`string`){let n=e.trim();return n?/^-?\d+(\.\d+)?$/.test(n)?`${n}px`:n:`${t}px`}return`${t}px`},g=e=>{if(!e||typeof e!=`object`)return null;let t=typeof e.headingText==`string`?e.headingText.trim():``,n=typeof e.path==`string`?e.path.trim().toLowerCase():``,r=typeof e.pathPrefix==`string`?e.pathPrefix.trim().toLowerCase():``,i=Array.isArray(e.hostnames)?e.hostnames.map(e=>String(e).trim().toLowerCase()).filter(Boolean):[];return!t||!n&&!r?null:{headingText:t,path:n||null,pathPrefix:r||null,slotId:typeof e.slotId==`string`&&e.slotId.trim()?e.slotId.trim():o,hostnames:i.length?i:l}},_=e=>{if(!Array.isArray(e)||e.length===0)return u;let t=e.map(g).filter(Boolean);return t.length?t:u},v=({offsetTop:e=s,offsetLeft:t=c,width:o=n,height:l=r,pageTargets:g=u}={})=>{let v=window.frameElement||null;if(!v)return()=>{};let y=window.parent;if(!y||y===window)return()=>{};let b=null;try{b=y.document,y.location.href}catch{return()=>{}}let x=y[f];if(x?.iframe===v&&typeof x.cleanup==`function`)return x.cleanup;if(x?.iframe?.isConnected&&typeof x?.cleanup==`function`)return()=>{};typeof x?.cleanup==`function`&&x.cleanup();let S=`headingintegration-${Date.now()}-${Math.random().toString(36).slice(2,8)}`,C=(e,t,n)=>{e&&e.style[t]!==n&&(e.style[t]=n)},w=()=>{try{let e=window.location.hostname.toLowerCase();return d.has(e)?!0:new URLSearchParams(window.location.search).get(`keepHeadingintegrationVisible`)===`1`}catch{return!1}},T=(e=v.parentElement)=>{let t=e;for(;t&&t!==b.body;){let e=t.id||``,n=t.getAttribute?.(`data-testid`)||``,r=t.getAttribute?.(`type`)||``;if(e.includes(`adspot`)||n.toLowerCase().includes(`ad`)||r)return t;t=t.parentElement}return v.parentElement},E=()=>{try{let e=new URL(y.location.href),t=e.hostname.toLowerCase(),n=e.pathname.toLowerCase();return F.find(e=>{let r=e.hostnames.includes(t),i=e.path?n===e.path:n.startsWith(e.pathPrefix);return r&&i})||null}catch{return null}return null},D=e=>Array.from(b.querySelectorAll(`#app h1, #app h2, #app h3`)).filter(t=>t.textContent?.trim().toLowerCase()===e.toLowerCase())[0]||null,O=null,k=null,A=w(),j=h(e,s),M=h(t,c),N=h(o,n),P=h(l,r),F=_(g),I=E();if(!I)return()=>{};let L=T((I.slotId?b.getElementById(I.slotId):null)||v.parentElement);if(!L)return()=>{};let R=L.getAttribute(p);if(R&&R!==S)return()=>{};let z={width:L.style.width,maxWidth:L.style.maxWidth,minWidth:L.style.minWidth,height:L.style.height,minHeight:L.style.minHeight,marginTop:L.style.marginTop,marginBottom:L.style.marginBottom,marginLeft:L.style.marginLeft,marginRight:L.style.marginRight,position:L.style.position,top:L.style.top,left:L.style.left,right:L.style.right,transform:L.style.transform,display:L.style.display,pointerEvents:L.style.pointerEvents,zIndex:L.style.zIndex,overflow:L.style.overflow},B={width:v.style.width,height:v.style.height,display:v.style.display,border:v.style.border,position:v.style.position,pointerEvents:v.style.pointerEvents},V=[],ee=parseFloat(P)||r,H=parseFloat(j)||0,U=parseFloat(M)||0,W=()=>{let e=L.parentElement;for(;e&&e!==b.body;)V.push({element:e,overflow:e.style.overflow}),C(e,`overflow`,`visible`),e=e.parentElement},G=()=>{C(L,`width`,N),C(L,`maxWidth`,N),C(L,`minWidth`,N),C(L,`height`,P),C(L,`minHeight`,P),C(L,`display`,`block`),C(L,`overflow`,`visible`),C(L,`pointerEvents`,`none`),C(L,`zIndex`,`1080`),L.setAttribute(p,S),C(v,`width`,N),C(v,`height`,P),C(v,`display`,`block`),C(v,`border`,`0`),C(v,`position`,`relative`),C(v,`pointerEvents`,`auto`)},K={element:null,position:``},te=()=>{let e=L.parentElement;e&&y.getComputedStyle(e).position===`static`&&(K.element=e,K.position=e.style.position,C(e,`position`,`relative`)),C(L,`position`,`absolute`),C(L,`top`,`${H}px`),C(L,`left`,`${U}px`),C(L,`right`,`auto`),C(L,`marginTop`,`0px`),C(L,`marginBottom`,`${i}px`),C(L,`marginLeft`,`0px`),C(L,`marginRight`,`0px`),C(L,`transform`,``)},ne=e=>{let t=null;try{t=v.contentDocument?.documentElement?.outerHTML||null}catch{return!1}if(!t)return!1;v.setAttribute(m,`1`);try{e.parentNode?.insertBefore(L,e)}catch{return v.removeAttribute(m),!1}W(),G(),te();try{v.srcdoc=t}catch{return!1}return!0},re=()=>{C(L,`position`,`fixed`),C(L,`marginTop`,`0px`),C(L,`marginBottom`,`0px`),C(L,`marginLeft`,`0px`),C(L,`marginRight`,`0px`),C(L,`transform`,``)},ie=()=>{C(L,`display`,`none`),C(L,`height`,`0px`),C(L,`minHeight`,`0px`),C(L,`marginBottom`,`0px`)},q=null,J=()=>{if((!q||!q.isConnected)&&(q=D(I.headingText)),!q)return;let e=q.getBoundingClientRect(),t=e.top-ee-i+H,n=e.left+U;C(L,`top`,`${t}px`),C(L,`left`,`${n}px`),C(L,`right`,`auto`)},Y=null,X=null,Z=!1,Q=(e=12)=>{if(q=D(I.headingText),!q){e>1&&(k=y.setTimeout(()=>Q(e-1),250));return}ne(q)||(Z=!0,W(),G(),re(),J(),Y=()=>J(),X=()=>J(),y.addEventListener(`scroll`,Y,{passive:!0}),y.addEventListener(`resize`,X)),A||(O=y.setTimeout(ie,a))};Q();let $=()=>{k&&=(y.clearTimeout(k),null),O&&=(y.clearTimeout(O),null),Y&&=(y.removeEventListener(`scroll`,Y),null),X&&=(y.removeEventListener(`resize`,X),null),L.getAttribute(p)===S&&L.removeAttribute(p),Z&&(Object.entries(z).forEach(([e,t])=>{L.style[e]=t}),Object.entries(B).forEach(([e,t])=>{v.style[e]=t}),V.forEach(({element:e,overflow:t})=>{e.style.overflow=t})),y[f]?.instanceId===S&&delete y[f]};return y[f]={instanceId:S,iframe:v,cleanup:$},$},y=(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)}},b=((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}),x=(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:b,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=[],l={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.36`),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 u=i.createElement(`div`);u.id=`interscroller-top-band-wrapper`,Object.assign(u.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,l,{position:`relative`,width:`100%`,marginLeft:`0`,transformOrigin:`top center`}),u.appendChild(d),a.insertAdjacentElement(`beforebegin`,u);let f=i.createElement(`div`);f.id=`interscroller-bottom-band`,Object.assign(f.style,l,{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 u=i.querySelector(`#interscroller-top-band`),d=i.querySelector(`#interscroller-top-band-wrapper`),f=i.querySelector(`#interscroller-bottom-band`),p=i.querySelector(`#interscroller-bottom-label`),m=i.querySelector(`#interscroller-bottom-progress`),h=t.bandHeight,g=t.snapPx,_=!1,v=!1,y=!1,x=!1,S=(t.thresholds||[]).map(()=>!1),C=()=>{if(!f)return;let e=a.getBoundingClientRect(),n=r.innerHeight,i=e.top<=n,o=e.bottom<=n-h,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))),d=Math.min(1,Math.max(0,(n-e.top)/(c+h))),b=Math.min(1,Math.max(0,(n-e.top)/c)),C=Math.min(e.bottom,n)-Math.max(e.top-h,0),w=Math.min(1,Math.max(0,C/n)),T=Math.max(0,Math.round(e.bottom-n));!v&&i&&t.onEnter&&t.onEnter(),!y&&o&&t.onExit&&t.onExit(),v=i,y=o,x=s,t.onProgress&&t.onProgress({scrollProgress:l,adExposure:b,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(u&&e.top<=E+t.stretchOverlap&&!o){let n=E-e.top;if(!_&&n<=g-t.snapOverlap){let e=1+Math.max(0,n+t.stretchOverlap)/h;u.style.transition=`none`,u.style.transform=`scaleY(${e})`}else !_&&n>g-t.snapOverlap&&(_=!0,u.style.transition=`transform ${t.snapDuration}s ${t.snapEase}`,u.style.transform=`scaleY(1)`)}else u&&e.top>E+t.stretchOverlap&&(_=!1,u.style.transition=`none`,u.style.transform=`scaleY(1)`);let D=r.visualViewport?Math.round(r.innerHeight-(r.visualViewport.offsetTop+r.visualViewport.height)):0;o?(f.style.transition=`none`,f.style.transform=`none`,f.style.position=`sticky`,f.style.top=`0`,f.style.bottom=``,f.style.left=``,f.style.marginLeft=`calc(50% - 50vw)`,f.style.width=`100vw`,p&&(p.textContent=t.labelBottomNow),m&&(m.style.width=`100%`)):s?(p&&(p.textContent=T>0?d<.2?t.labelBottomResume:d<.75?t.labelBottomMid:t.labelBottomLate:t.labelBottomNow),m&&(m.style.width=`${Math.round(d*100)}%`),f.style.transition=`transform 0.3s ease`,f.style.transform=`translateY(0)`,f.style.position=`fixed`,f.style.bottom=`${D}px`,f.style.top=``,f.style.left=`0`,f.style.marginLeft=`0`,f.style.width=`100vw`):(f.style.transition=`transform 0.3s ease`,f.style.transform=`translateY(100%)`,f.style.position=`fixed`,f.style.bottom=`${D}px`,f.style.left=`0`,f.style.marginLeft=`0`,f.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),d?d.remove():u&&u.remove(),f&&f.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||``})}},S=(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.36`),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)}},C=(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.36`),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=`adspot-desktop-takeover-2-above`,o=-24,s=-24,c=[`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`],l=[{hostnames:c,path:`/sport`,headingText:`Sport`,slotId:a}],u=new Set([`localhost`,`127.0.0.1`]),d=`__poweredAdConfigHeadingintegrationActive`,f=`data-pac-headingintegration-owner`,p=`data-pac-reparented`,m=(e,t)=>{if(typeof e==`number`&&Number.isFinite(e))return`${e}px`;if(typeof e==`string`){let n=e.trim();return n?/^-?\d+(\.\d+)?$/.test(n)?`${n}px`:n:`${t}px`}return`${t}px`},h=e=>{if(!e||typeof e!=`object`)return null;let t=typeof e.headingText==`string`?e.headingText.trim():``,n=typeof e.path==`string`?e.path.trim().toLowerCase():``,r=typeof e.pathPrefix==`string`?e.pathPrefix.trim().toLowerCase():``,i=Array.isArray(e.hostnames)?e.hostnames.map(e=>String(e).trim().toLowerCase()).filter(Boolean):[];return!t||!n&&!r?null:{headingText:t,path:n||null,pathPrefix:r||null,slotId:typeof e.slotId==`string`&&e.slotId.trim()?e.slotId.trim():a,hostnames:i.length?i:c}},g=e=>{if(!Array.isArray(e)||e.length===0)return l;let t=e.map(h).filter(Boolean);return t.length?t:l},_=({offsetTop:e=o,offsetLeft:t=s,width:a=n,height:c=r,pageTargets:h=l}={})=>{let _=window.frameElement||null;if(!_)return()=>{};let v=window.parent;if(!v||v===window)return()=>{};let y=null;try{y=v.document,v.location.href}catch{return()=>{}}let b=v[d];if(b?.iframe===_&&typeof b.cleanup==`function`)return b.cleanup;if(b?.iframe?.isConnected&&typeof b?.cleanup==`function`)return()=>{};typeof b?.cleanup==`function`&&b.cleanup();let x=`headingintegration-${Date.now()}-${Math.random().toString(36).slice(2,8)}`,S=(e,t,n)=>{e&&e.style[t]!==n&&(e.style[t]=n)},C=()=>{try{let e=window.location.hostname.toLowerCase();return u.has(e)?!0:new URLSearchParams(window.location.search).get(`keepHeadingintegrationVisible`)===`1`}catch{return!1}},w=(e=_.parentElement)=>{let t=e;for(;t&&t!==y.body;){let e=t.id||``,n=t.getAttribute?.(`data-testid`)||``,r=t.getAttribute?.(`type`)||``;if(e.includes(`adspot`)||n.toLowerCase().includes(`ad`)||r)return t;t=t.parentElement}return _.parentElement},T=()=>{try{let e=new URL(v.location.href),t=e.hostname.toLowerCase(),n=e.pathname.toLowerCase();return P.find(e=>{let r=e.hostnames.includes(t),i=e.path?n===e.path:n.startsWith(e.pathPrefix);return r&&i})||null}catch{return null}return null},E=e=>Array.from(y.querySelectorAll(`#app h1, #app h2, #app h3`)).filter(t=>t.textContent?.trim().toLowerCase()===e.toLowerCase())[0]||null,D=null,O=null,k=C(),A=m(e,o),j=m(t,s),M=m(a,n),N=m(c,r),P=g(h),F=T();if(!F)return()=>{};let I=w((F.slotId?y.getElementById(F.slotId):null)||_.parentElement);if(!I)return()=>{};let L=I.getAttribute(f);if(L&&L!==x)return()=>{};let R={width:I.style.width,maxWidth:I.style.maxWidth,minWidth:I.style.minWidth,height:I.style.height,minHeight:I.style.minHeight,marginTop:I.style.marginTop,marginBottom:I.style.marginBottom,marginLeft:I.style.marginLeft,marginRight:I.style.marginRight,position:I.style.position,top:I.style.top,left:I.style.left,right:I.style.right,transform:I.style.transform,display:I.style.display,opacity:I.style.opacity,transition:I.style.transition,pointerEvents:I.style.pointerEvents,zIndex:I.style.zIndex,overflow:I.style.overflow},z={width:_.style.width,height:_.style.height,display:_.style.display,border:_.style.border,position:_.style.position,pointerEvents:_.style.pointerEvents},B=[],V=parseFloat(N)||r,H=parseFloat(A)||0,U=parseFloat(j)||0,W=()=>{let e=I.parentElement;for(;e&&e!==y.body;)B.push({element:e,overflow:e.style.overflow}),S(e,`overflow`,`visible`),e=e.parentElement},G=()=>{S(I,`width`,M),S(I,`maxWidth`,M),S(I,`minWidth`,M),S(I,`height`,N),S(I,`minHeight`,N),S(I,`display`,`block`),S(I,`opacity`,k?`1`:`0`),S(I,`transition`,`opacity 0.3s ease-in-out`),S(I,`overflow`,`visible`),S(I,`pointerEvents`,`none`),S(I,`zIndex`,`1080`),I.setAttribute(f,x),S(_,`width`,M),S(_,`height`,N),S(_,`display`,`block`),S(_,`border`,`0`),S(_,`position`,`relative`),S(_,`pointerEvents`,`auto`)},K={element:null,position:``},ee=()=>{let e=I.parentElement;e&&v.getComputedStyle(e).position===`static`&&(K.element=e,K.position=e.style.position,S(e,`position`,`relative`)),S(I,`position`,`absolute`),S(I,`top`,`${H}px`),S(I,`left`,`${U}px`),S(I,`right`,`auto`),S(I,`marginTop`,`0px`),S(I,`marginBottom`,`${i}px`),S(I,`marginLeft`,`0px`),S(I,`marginRight`,`0px`),S(I,`transform`,``)},te=e=>{let t=null;try{let e=_.contentDocument;if(!e)return!1;let n=e.getElementById(`unitContainer`);if(!n)return!1;let r=Array.from(e.querySelectorAll(`link[rel="stylesheet"]`)).map(e=>e.outerHTML).join(`
109
+ `),i=Array.from(e.querySelectorAll(`script[src]`)).filter(e=>{let t=e.getAttribute(`src`)||``;return/(s0\.2mdn\.net|cdn\.jsdelivr\.net|players\.brightcove\.net)/.test(t)}).map(e=>e.outerHTML).join(`
110
+ `);t=`<!doctype html><html><head><meta charset="utf-8">${r}<style>html,body{margin:0;padding:0;background:transparent;}</style></head><body>${n.outerHTML}${i}</body></html>`}catch{return!1}if(!t)return!1;_.setAttribute(p,`1`);try{e.parentNode?.insertBefore(I,e)}catch{return _.removeAttribute(p),!1}W(),G(),ee();try{_.srcdoc=t}catch{return!1}return!0},ne=()=>{S(I,`position`,`fixed`),S(I,`marginTop`,`0px`),S(I,`marginBottom`,`0px`),S(I,`marginLeft`,`0px`),S(I,`marginRight`,`0px`),S(I,`transform`,``)},re=()=>{S(I,`opacity`,`0`)},ie=()=>{S(I,`opacity`,`1`)},q=null,J=()=>{if((!q||!q.isConnected)&&(q=E(F.headingText)),!q)return;let e=q.getBoundingClientRect(),t=e.top-V-i+H,n=e.left+U;S(I,`top`,`${t}px`),S(I,`left`,`${n}px`),S(I,`right`,`auto`)},Y=null,X=null,Z=!1,Q=(e=12)=>{if(q=E(F.headingText),!q){e>1&&(O=v.setTimeout(()=>Q(e-1),250));return}te(q)||(Z=!0,W(),G(),ne(),J(),Y=()=>J(),X=()=>J(),v.addEventListener(`scroll`,Y,{passive:!0}),v.addEventListener(`resize`,X))};Q();let $=()=>{O&&=(v.clearTimeout(O),null),D&&=(v.clearTimeout(D),null),Y&&=(v.removeEventListener(`scroll`,Y),null),X&&=(v.removeEventListener(`resize`,X),null),I.getAttribute(f)===x&&I.removeAttribute(f),Z&&(Object.entries(R).forEach(([e,t])=>{I.style[e]=t}),Object.entries(z).forEach(([e,t])=>{_.style[e]=t}),B.forEach(({element:e,overflow:t})=>{e.style.overflow=t})),v[d]?.instanceId===x&&delete v[d]};return v[d]={instanceId:x,iframe:_,cleanup:$,show:ie,hide:re},$},v=(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)}},y=((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}),b=(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:y,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=[],l={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.38`),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 u=i.createElement(`div`);u.id=`interscroller-top-band-wrapper`,Object.assign(u.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,l,{position:`relative`,width:`100%`,marginLeft:`0`,transformOrigin:`top center`}),u.appendChild(d),a.insertAdjacentElement(`beforebegin`,u);let f=i.createElement(`div`);f.id=`interscroller-bottom-band`,Object.assign(f.style,l,{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 u=i.querySelector(`#interscroller-top-band`),d=i.querySelector(`#interscroller-top-band-wrapper`),f=i.querySelector(`#interscroller-bottom-band`),p=i.querySelector(`#interscroller-bottom-label`),m=i.querySelector(`#interscroller-bottom-progress`),h=t.bandHeight,g=t.snapPx,_=!1,v=!1,b=!1,x=!1,S=(t.thresholds||[]).map(()=>!1),C=()=>{if(!f)return;let e=a.getBoundingClientRect(),n=r.innerHeight,i=e.top<=n,o=e.bottom<=n-h,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))),d=Math.min(1,Math.max(0,(n-e.top)/(c+h))),y=Math.min(1,Math.max(0,(n-e.top)/c)),C=Math.min(e.bottom,n)-Math.max(e.top-h,0),w=Math.min(1,Math.max(0,C/n)),T=Math.max(0,Math.round(e.bottom-n));!v&&i&&t.onEnter&&t.onEnter(),!b&&o&&t.onExit&&t.onExit(),v=i,b=o,x=s,t.onProgress&&t.onProgress({scrollProgress:l,adExposure:y,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(u&&e.top<=E+t.stretchOverlap&&!o){let n=E-e.top;if(!_&&n<=g-t.snapOverlap){let e=1+Math.max(0,n+t.stretchOverlap)/h;u.style.transition=`none`,u.style.transform=`scaleY(${e})`}else !_&&n>g-t.snapOverlap&&(_=!0,u.style.transition=`transform ${t.snapDuration}s ${t.snapEase}`,u.style.transform=`scaleY(1)`)}else u&&e.top>E+t.stretchOverlap&&(_=!1,u.style.transition=`none`,u.style.transform=`scaleY(1)`);let D=r.visualViewport?Math.round(r.innerHeight-(r.visualViewport.offsetTop+r.visualViewport.height)):0;o?(f.style.transition=`none`,f.style.transform=`none`,f.style.position=`sticky`,f.style.top=`0`,f.style.bottom=``,f.style.left=``,f.style.marginLeft=`calc(50% - 50vw)`,f.style.width=`100vw`,p&&(p.textContent=t.labelBottomNow),m&&(m.style.width=`100%`)):s?(p&&(p.textContent=T>0?d<.2?t.labelBottomResume:d<.75?t.labelBottomMid:t.labelBottomLate:t.labelBottomNow),m&&(m.style.width=`${Math.round(d*100)}%`),f.style.transition=`transform 0.3s ease`,f.style.transform=`translateY(0)`,f.style.position=`fixed`,f.style.bottom=`${D}px`,f.style.top=``,f.style.left=`0`,f.style.marginLeft=`0`,f.style.width=`100vw`):(f.style.transition=`transform 0.3s ease`,f.style.transform=`translateY(100%)`,f.style.position=`fixed`,f.style.bottom=`${D}px`,f.style.left=`0`,f.style.marginLeft=`0`,f.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),d?d.remove():u&&u.remove(),f&&f.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||``})}},x=(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.38`),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)}},S=(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.38`),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=`
109
111
  /* Mobile Fireplace — powered-ad-config */
110
112
  html, body {
111
113
  background-color: transparent !important;
@@ -157,4 +159,4 @@
157
159
  margin: 0 !important;
158
160
  padding: 0 !important;
159
161
  }
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`))}},w=()=>{};function T({adFormat:n=``,stickyOffset:r=0,logoPosX:i=0,logoHeight:a=0,logoSmallHeight:o=0,...s}={}){typeof w==`function`&&w();let c=()=>{};return n===`fireplace`?c=e(r):n===`fireplace-collant`?c=t(r):n===`logomorph`?c=y(i,a,o):n===`headingintegration`?c=v(s):n===`interscroller`?c=x(s):n===`liquidframe`?c=S(s):n===`mobilefireplace`?c=C(s):console.warn(`[powered-ad-config] Unknown ad format:`,n),w=typeof c==`function`?c:()=>{},w}return T.version=`0.1.36`,T});
162
+ `,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`))}},C=()=>{};function w({adFormat:n=``,stickyOffset:r=0,logoPosX:i=0,logoHeight:a=0,logoSmallHeight:o=0,...s}={}){typeof C==`function`&&C();let c=()=>{};return n===`fireplace`?c=e(r):n===`fireplace-collant`?c=t(r):n===`logomorph`?c=v(i,a,o):n===`headingintegration`?c=_(s):n===`interscroller`?c=b(s):n===`liquidframe`?c=x(s):n===`mobilefireplace`?c=S(s):console.warn(`[powered-ad-config] Unknown ad format:`,n),C=typeof c==`function`?c:()=>{},C}return w.version=`0.1.38`,w});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "powered-ad-config",
3
- "version": "0.1.36",
3
+ "version": "0.1.38",
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",