@visitscotland/component-library 5.5.0 → 5.5.1

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.
@@ -10855,11 +10855,22 @@ const CardGroup = /* @__PURE__ */ _export_sfc(_sfc_main$1F, [["render", _sfc_ren
10855
10855
  }
10856
10856
  },
10857
10857
  mounted() {
10858
- window.civicSetup || (window.cookieManagerLoaded = () => {
10859
- window.dispatchEvent(new Event("cookieManagerLoaded"));
10860
- }, window.cookiesUpdated = () => {
10861
- window.dispatchEvent(new Event("cookiesUpdated"));
10862
- }, window.civicSetup = !0), window.addEventListener("cookieManagerLoaded", () => {
10858
+ if (!window.dataLayerExtended) {
10859
+ let e = !1;
10860
+ window.dataLayer || (e = !0, window.dataLayer = {
10861
+ push: () => {
10862
+ }
10863
+ });
10864
+ const n = window.dataLayer.push;
10865
+ window.dataLayer.push = (t) => {
10866
+ e || (t ? n(t) : n()), t && t.event === "cookie_permission_loaded" && setTimeout(() => {
10867
+ window.dispatchEvent(new Event("cookieManagerLoaded"));
10868
+ }), t && t.event === "cookie_permission_changed" && setTimeout(() => {
10869
+ window.dispatchEvent(new Event("cookiesUpdated"));
10870
+ });
10871
+ }, window.dataLayerExtended = !0;
10872
+ }
10873
+ window.addEventListener("cookieManagerLoaded", () => {
10863
10874
  this.managerLoaded();
10864
10875
  }), window.addEventListener("cookiesUpdated", () => {
10865
10876
  this.cookiesUpdated();