"use strict";
var CoveoIPX;

(() => {
  var ipxContext = {};

  CoveoIPX = {
    addContext: async (additionalContext) => {
      const addContextInAtomic = async (
  engines,
  existingContext,
  additionalContext
) => {
const { loadContextActions } = await import(
    "https://static.cloud.coveo.com/headless/v3/headless.esm.js"
  );
const flattenJSON = (initialObject = {}, returnObject = {}, keyPrefix = '') => {
  for (const key in initialObject) {
    if (typeof initialObject[key] !== 'object') {
      returnObject[keyPrefix + key] = initialObject[key];
    } else {
      flattenJSON(initialObject[key], returnObject, `${keyPrefix}${key}.`);
    }
  }
  return returnObject;
};


  const flattenedAdditionalContext = flattenJSON(additionalContext);
  const newContext = { ...existingContext, ...flattenedAdditionalContext };

  engines?.forEach((engine) => {
    Object.entries(newContext).forEach(([contextKey, contextValue]) => {
      const action = loadContextActions(engine).addContext({
        contextKey,
        contextValue,
      });
      engine.dispatch(action);
    });
  });

  return newContext;
};

      const containerShadowRoot = document.querySelector(
        "#coveo-ipx-86b53190-8827-4997-aab6-fca6ecdcf92d"
      )?.shadowRoot;
      const ipxEngines = containerShadowRoot
        ? [
            containerShadowRoot.getElementById(`ipx-search-86b53190-8827-4997-aab6-fca6ecdcf92d`)?.engine,
            containerShadowRoot.getElementById(`ipx-recs-86b53190-8827-4997-aab6-fca6ecdcf92d`)?.engine
          ]
        : [];
      ipxContext = await addContextInAtomic(
        ipxEngines,
        ipxContext,
        additionalContext
      );
      return ipxContext
    },

    initialize: async (token, context = {}) => {
      const addAtomic = () => {
  if (
    window.CoveoAtomic &&
    window.CoveoAtomic.version?.startsWith(
      "v3.13.0".substring(0, "v3.13.0".lastIndexOf("."))
    )
  ) {
    console.warn(
      `The IPX uses version v3.13.0 of Atomic and version ${window.CoveoAtomic} is already loaded in the site. Some unexpected behaviour might be experienced.`
    );
  }
  return new Promise((resolve, reject) => {
    const script = document.createElement("script");
    script.type = "module";
    script.onload = resolve;
    script.src = "https://static.cloud.coveo.com/atomic/v3.13.0/atomic.esm.js";
    document.head.appendChild(script);
  });
};

      const addCoveoThemeLink = () =>
  new Promise((resolve, reject) => {
    const coveoThemeLink = document.createElement("link");
    coveoThemeLink.rel = "stylesheet";
    coveoThemeLink.onload = resolve;
    coveoThemeLink.href = "https://static.cloud.coveo.com/atomic/v3.13.0/themes/coveo.css";
    document.head.appendChild(coveoThemeLink);
  });

      await Promise.all([addAtomic(), addCoveoThemeLink()]);

      const ATOMIC_SEARCH_INTERFACE = "atomic-search-interface";
const ATOMIC_RECS_INTERFACE = "atomic-recs-interface";
const IPX_CONTAINER_TAG = "coveo-ipx";

const HEADLESS_URL =
  "https://static.cloud.coveo.com/headless/v3/headless.esm.js"
const setContext = async (engine, additionalContext, config) => {
  const { loadContextActions } = await import(HEADLESS_URL);
  const flattenJSON = (initialObject = {}, returnObject = {}, keyPrefix = '') => {
  for (const key in initialObject) {
    if (typeof initialObject[key] !== 'object') {
      returnObject[keyPrefix + key] = initialObject[key];
    } else {
      flattenJSON(initialObject[key], returnObject, `${keyPrefix}${key}.`);
    }
  }
  return returnObject;
};

  const baseContext = {
    IPX: true,
    referrer: window.location.href,
    IPX_ID: config.interfaceId,
    IPX_Name: config.interfaceName,
  };
  const flattenedAdditionalContext = flattenJSON(additionalContext);
  const action = loadContextActions(engine).setContext({
    ...flattenedAdditionalContext,
    ...baseContext,
  });
  return engine.dispatch(action);
};

const overwriteOriginLevel2 = async (engine, originLevel2) => {
  const { loadConfigurationActions } = await import(HEADLESS_URL);
  const action = loadConfigurationActions(engine).setOriginLevel2({
    originLevel2,
  });
  return engine.dispatch(action);
};

const initializeAtomicInterface = async (
  currentInterface,
  isRecommendations,
  config,
  apiKey,
  additionalContext
) => {
  const atomicConfig = await generateAtomicConfig(
    currentInterface,
    isRecommendations,
    config,
    apiKey
  );
  await currentInterface.initialize(atomicConfig);
  return setContext(currentInterface.engine, additionalContext, config);
};

const generateAtomicConfig = async (
  currentInterface,
  isRecommendations,
  config,
  apiKey
) => {
  const commonConfig = {
    accessToken: apiKey,
    organizationId: config.organization,
    analytics: {
      originContext: "nextgenipx",
      originLevel3: window.location.href,
    },
  };
  const searchSettings = {
    searchHub: config.searchHub,
    pipeline: isRecommendations ? config.recsPipeline : config.searchPipeline,
  };

  const atomicConfig = {
    ...commonConfig,
    ...(isRecommendations ? searchSettings : { search: searchSettings }),
  };

  if (config.usesAtomicV3) {
    atomicConfig.environment = config.environment;
    atomicConfig.analytics.analyticsMode = 'legacy';
  } else {
    atomicConfig.organizationEndpoints = await currentInterface.getOrganizationEndpoints(
      config.organization,
      config.environment
    );
  }

  return atomicConfig;
};

const loadRecommendations = (interfaceId) => {
  document
    .querySelector(`#coveo-ipx-${interfaceId}`)
    ?.shadowRoot?.getElementById(`ipx-recs-${interfaceId}`)
    ?.getRecommendations();
};

const initializeIPX = async (
  ipxContainerShadowRoot,
  config,
  apiKey,
  additionalContext
) => {
  await Promise.all([
    customElements.whenDefined(ATOMIC_SEARCH_INTERFACE),
    customElements.whenDefined(ATOMIC_RECS_INTERFACE),
  ]);
  const searchInterface = ipxContainerShadowRoot.getElementById(
    `ipx-search-${config.interfaceId}`
  );
  const recsInterface = ipxContainerShadowRoot.getElementById(
    `ipx-recs-${config.interfaceId}`
  );

  await Promise.all([
    initializeAtomicInterface(
      searchInterface,
      false,
      config,
      apiKey,
      additionalContext
    ),
    initializeAtomicInterface(
      recsInterface,
      true,
      config,
      apiKey,
      additionalContext
    ),
  ]);

  await overwriteOriginLevel2(recsInterface.engine, "Recommended");

  searchInterface.i18n.addResourceBundle("en", "caption-filetype", {
    ".html": "html",
  });

  if (config.usesTargetSelector) {
    loadRecommendations(config.interfaceId);
  }
  return;
};

const insertIPXInTargetElement = (
  targetElement,
  usesTargetSelector,
  interfaceId,
  atomicBody
) => {
  const ipxContainer = document.createElement(IPX_CONTAINER_TAG);
  ipxContainer.setAttribute("id", `${IPX_CONTAINER_TAG}-${interfaceId}`);
  usesTargetSelector &&
    ipxContainer.setAttribute(
      "style",
      "display: block; height: inherit; width: inherit;"
    );

  const shadowRoot = ipxContainer.attachShadow({ mode: "open" });
  shadowRoot.innerHTML = atomicBody;

  targetElement.appendChild(ipxContainer);
  return shadowRoot;
};

const initialize = (apiKey, context, config) => {
  const watchForTargetElementDeletion = (targetSelector, callbackFunction) => {
  const deletionObserver = new MutationObserver(() => {
    if (!document.querySelector(targetSelector)) {
      deletionObserver.disconnect();
      selectHostElement(targetSelector, callbackFunction);
    }
  });
  deletionObserver.observe(document.body, { childList: true, subtree: true });
};

const selectHostElement = (targetSelector, callbackFunction) => {
  let targetElement = document.querySelector(targetSelector);
  if (targetElement) {
    watchForTargetElementDeletion(targetSelector, callbackFunction);
    callbackFunction(targetElement);
    return;
  }
  const hostObserver = new MutationObserver(() => {
    targetElement = document.querySelector(targetSelector);
    if (!targetElement) {
      return;
    }
    hostObserver.disconnect();
    watchForTargetElementDeletion(targetSelector, callbackFunction);
    callbackFunction(targetElement);
  });
  hostObserver.observe(document.body, { childList: true, subtree: true });
};

const waitForPageInitialization = () =>
  new Promise((resolve) => {
    if (document.body) {
      return resolve();
    }
    const bodyObserver = new MutationObserver(() => {
      bodyObserver.disconnect();
      resolve();
    });
    bodyObserver.observe(document.documentElement, { childList: true });
  });

const targetHost = (targetSelector, callbackFunction) => {
  return waitForPageInitialization().then(() =>
    selectHostElement(targetSelector, callbackFunction)
  );
};

  ipxContext = context;
  return new Promise((resolve) => {
    targetHost(
      config.usesTargetSelector ? config.targetSelector : "body",
      (target) => {
        const { usesTargetSelector, interfaceId, atomicBody } = config;
        const ipxShadowRoot = insertIPXInTargetElement(
          target,
          usesTargetSelector,
          interfaceId,
          atomicBody
        );
        resolve(initializeIPX(ipxShadowRoot, config, apiKey, ipxContext));
      }
    );
  });
};


      return initialize(token, context, {
        usesTargetSelector: false,
        targetSelector: "#ipxCoveo",
        interfaceId: "86b53190-8827-4997-aab6-fca6ecdcf92d",
        searchHub: "CommunityIPX",
        organization: "sophosproduction72tlxjzh",
        interfaceName: "CommunityIPX",
        environment: "prod",
        usesAtomicV3: true,
        atomicBody: `<style>
    :root, :host {
  --atomic-primary: #1372ec;
  --atomic-primary-light: #1ba2ff;
  --atomic-primary-dark: #0d4fa5;
  --atomic-ring-primary: #1372ec80;
  --atomic-background: #ffffff;
  --atomic-on-background: #282829;
  --atomic-neutral: #e5e8e8;
  --atomic-neutral-light: #f3f6f6;
  --atomic-neutral-dark: #4e4f4f;
  --atomic-visited: #752e9c;
  --atomic-ipx-button: #002a76;
  --atomic-ipx-button-light: #003ca8;
  --atomic-ipx-button-label: #ffffff;
  --atomic-font-family: -apple-system, BlinkMacSystemFont, avenir next, avenir, segoe ui, helvetica neue, helvetica, Ubuntu, roboto, noto, arial, sans-serif;
  --atomic-on-primary: #ffffff;
}

    .search-section {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  grid-gap: 0.5rem;
  background: var(--atomic-neutral-light);
  box-sizing: border-box;
  min-width: 0;
  align-items: center;
}

.search-box {
  flex-grow: 1;
  padding-bottom: 0.875rem;
}

atomic-ipx-refine-toggle {
  padding-bottom: 0.875rem;
}

.query-summary, atomic-breadbox {
  padding-bottom: 1rem;
}

atomic-did-you-mean,
atomic-notifications,
atomic-smart-snippet,
atomic-smart-snippet-suggestions {
  padding-bottom: 1rem;
}

atomic-smart-snippet::part(source-url),
atomic-smart-snippet-suggestions::part(source-url) {
  word-wrap: break-word;
}

.pagination-more-results {
  padding-top: 0.875rem;
}

.footer-slot {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-link {
  color: var(--atomic-primary);
  text-decoration: none;
}

.footer-link:hover {
  text-decoration: underline;
}

.footer-icon {
  aspect-ratio: auto;
  height: 1.25rem;
  align-items: center;
  display: flex;
}

div::part(header) {
  min-width: 0;
}

atomic-ipx-tabs {
  width: 100%;
}

#ipx-search-86b53190-8827-4997-aab6-fca6ecdcf92d:not(.atomic-search-interface-search-executed)
  > :is(atomic-ipx-modal, atomic-ipx-embedded)
  > div[slot="body"]
  > atomic-layout-section
  > :is(
    atomic-result-list,
    atomic-query-summary,
    atomic-load-more-results,
    atomic-no-results,
    atomic-generated-answer,
    atomic-smart-snippet,
    atomic-smart-snippet-suggestions,
    atomic-breadbox,
    atomic-did-you-mean,
    atomic-notifications
  ) {
  display: none;
}

#ipx-search-86b53190-8827-4997-aab6-fca6ecdcf92d:not(.atomic-search-interface-search-executed)
  > :is(atomic-ipx-modal, atomic-ipx-embedded)
  > div[slot="header"]
  > atomic-layout-section
  > :is(atomic-ipx-tabs) {
  display: none;
}

#ipx-search-86b53190-8827-4997-aab6-fca6ecdcf92d:is(
    .atomic-search-interface-search-executed,
    .atomic-search-interface-error
  )
  > :is(atomic-ipx-modal, atomic-ipx-embedded)
  > div[slot="body"]
  > atomic-recs-interface#ipx-recs-86b53190-8827-4997-aab6-fca6ecdcf92d
  > atomic-ipx-recs-list {
  display: none;
}

#ipx-search-86b53190-8827-4997-aab6-fca6ecdcf92d:not(.atomic-ipx-modal-opened) > atomic-ipx-modal,
#ipx-search-86b53190-8827-4997-aab6-fca6ecdcf92d:not(.atomic-modal-opened)
  > atomic-ipx-modal
  > div[slot="header"]
  > atomic-ipx-refine-modal {
  display: none;
}

#ipx-search-86b53190-8827-4997-aab6-fca6ecdcf92d:not(.atomic-search-interface-search-executed)
  > :is(atomic-ipx-modal, atomic-ipx-embedded)
  > div[slot="header"]
  > atomic-layout-section
  > atomic-ipx-refine-toggle {
  display: none;
}

#ipx-search-86b53190-8827-4997-aab6-fca6ecdcf92d:is(.atomic-search-interface-search-executed)
  > :is(atomic-ipx-modal, atomic-ipx-embedded)
  > div[slot="header"]
  > atomic-layout-section
  > atomic-ipx-refine-toggle {
  display: block;
}

body:not(.atomic-ipx-modal-opened) div.builder_preview atomic-ipx-modal,
body:not(.atomic-modal-opened) div.builder_preview atomic-ipx-refine-modal {
  display: none;
}

atomic-ipx-button::part(ipx-button) {
  background-color: var(--atomic-ipx-button);
  text-overflow: ellipsis;
  max-width: var(--atomic-ipx-width, 31.25rem);
}

atomic-ipx-button::part(ipx-button):hover {
  background-color: var(--atomic-ipx-button-light);
}
atomic-ipx-button::part(button-text) {
  color: var(--atomic-ipx-button-label);
}

atomic-ipx-button::part(button-icon) {
  padding-bottom: 1.15rem;
  color: var(--atomic-ipx-button-label);
}

/* Delete this when SVCINT-2287 is done--> */
atomic-ipx-button::part(ripple) {
  background-color: var(--atomic-ipx-button) !important;
}

div.builder_preview atomic-ipx-button[is-modal-open]::part(ipx-open-icon) {
  opacity: 0;
  transition: 0.25s ease-in-out;
}

atomic-ipx-modal {
  z-index: 1000;
}

atomic-ipx-button::part(ipx-button) {
  z-index: 999;
}

#ipx-search-86b53190-8827-4997-aab6-fca6ecdcf92d.atomic-search-interface-error atomic-recs-error {
  display: none;
}

atomic-generated-answer::part(citation) {
  --max-citation-width: 150px;
}

:host {
  all: initial;
  --atomic-crga-collapsed-height: 6.5rem;
}

:root {
  --atomic-crga-collapsed-height: 6.5rem;
}

atomic-ipx-refine-toggle::part(ipx-refine-toggle-icon) {
  vertical-align: middle;
}

atomic-generated-answer::part(container) {
  padding: 1.5rem;
}

atomic-generated-answer::part(generated-container) {
  margin-top: 1rem;
}

atomic-generated-answer::part(generated-answer-footer) {
  margin-top: 1rem;
}

    atomic-ipx-recs-list::part(label) {
  font-size: var(--atomic-text-2xl);
  padding-top: 0.75rem;
  margin-bottom: 2.5rem;
  color: var(--atomic-on-background);
}

atomic-ipx-recs-list::part(result-list) {
  gap: 1rem;
}

atomic-ipx-recs-list::part(result-list-grid-clickable) {
  inset: unset;
}

</style>
<atomic-search-interface id="ipx-search-86b53190-8827-4997-aab6-fca6ecdcf92d" fields-to-include='["sophossourcetype","sitemapsophosproductname","author","communitytype","date","language"]' reflect-state-in-url='false'>
    <atomic-ipx-modal is-open="false" no-focus-trap="false">
    <div slot="header">
  <atomic-layout-section class="search-section" section="search">
  <atomic-search-box class="search-box"></atomic-search-box>
  <atomic-ipx-refine-toggle></atomic-ipx-refine-toggle>
    </atomic-layout-section>

</div>

    <div slot="body">
  <atomic-layout-section section="status">
    <atomic-breadbox></atomic-breadbox>
    <atomic-query-summary class="query-summary"></atomic-query-summary>
    <atomic-did-you-mean></atomic-did-you-mean>
    <atomic-notifications></atomic-notifications>
</atomic-layout-section>

  <atomic-layout-section section="results">
  <atomic-smart-snippet exportparts="source-url,smart-snippet" snippet-maximum-height="160" snippet-collapsed-height="130">
            <a slot="source-anchor-attributes" target="_blank" rel="noopener"></a>
        </atomic-smart-snippet>
        <atomic-smart-snippet-suggestions exportparts="source-url">
                <a slot="source-anchor-attributes" target="_blank" rel="noopener"></a>
            </atomic-smart-snippet-suggestions>
        <atomic-result-list image-size="none">
        <atomic-result-template
    must-match-sophossourcetype="Community"
            >
    <template>
        <style>
    .field {
        display: inline-flex;
        align-items: center;
    }

    .field-label {
        font-weight: bold;
        margin-right: 0.25rem;
    }

    .thumbnail {
        display: none;
        width: 100%;
        height: 100%;
    }

    .icon {
        display: none;
    }

    .result-root.image-small .thumbnail,
    .result-root.image-large .thumbnail {
        display: inline-block;
    }

    .result-root.image-icon .icon {
        display: inline-block;
    }

    .result-root.image-small atomic-result-section-visual,
    .result-root.image-large atomic-result-section-visual {
        border-radius: var(--atomic-border-radius-xl);
    }

    .badge-sophossourcetype::part(result-badge-element) {
            background-color: #30a745;
        }

        .badge-sophossourcetype::part(result-badge-label) {
                color: #000000;
            }
        </style>
<atomic-result-section-actions>
        <atomic-quickview></atomic-quickview>
        </atomic-result-section-actions>
<atomic-result-section-badges>
    <atomic-result-badge class="badge-sophossourcetype" field="sophossourcetype"></atomic-result-badge>
    </atomic-result-section-badges>
<atomic-result-section-title>
    <atomic-ipx-result-link>
        <a slot="attributes" target="_blank"></a>
    </atomic-ipx-result-link>
</atomic-result-section-title>
<atomic-result-section-title-metadata></atomic-result-section-title-metadata>
<atomic-result-section-excerpt>
    <atomic-result-text field="excerpt"></atomic-result-text>
</atomic-result-section-excerpt>
<atomic-result-section-bottom-metadata>
    <atomic-result-fields-list>
        <atomic-field-condition class="field" if-defined="sitemapsophosproductname">
                <span class="field-label"><atomic-text value="PRODUCT"></atomic-text>:</span>
                <atomic-result-text field="sitemapsophosproductname"></atomic-result-text>
                </atomic-field-condition>
        <atomic-field-condition class="field" if-defined="communitytype">
                <span class="field-label"><atomic-text value="TYPE"></atomic-text>:</span>
                <atomic-result-text field="communitytype"></atomic-result-text>
                </atomic-field-condition>
        <atomic-field-condition class="field" if-defined="language">
                <span class="field-label"><atomic-text value="LANGUAGE"></atomic-text>:</span>
                <atomic-result-multi-value-text field="language"></atomic-result-multi-value-text>
                </atomic-field-condition>
        <atomic-field-condition class="field" if-defined="date">
                <span class="field-label"><atomic-text value="DATE"></atomic-text>:</span>
                <atomic-result-date field="date" format="MM/DD/YYYY"></atomic-result-date>
                </atomic-field-condition>
        </atomic-result-fields-list>
</atomic-result-section-bottom-metadata>

    </template>
</atomic-result-template>

        <atomic-result-template
    >
    <template>
        <style>
    .field {
        display: inline-flex;
        align-items: center;
    }

    .field-label {
        font-weight: bold;
        margin-right: 0.25rem;
    }

    .thumbnail {
        display: none;
        width: 100%;
        height: 100%;
    }

    .icon {
        display: none;
    }

    .result-root.image-small .thumbnail,
    .result-root.image-large .thumbnail {
        display: inline-block;
    }

    .result-root.image-icon .icon {
        display: inline-block;
    }

    .result-root.image-small atomic-result-section-visual,
    .result-root.image-large atomic-result-section-visual {
        border-radius: var(--atomic-border-radius-xl);
    }

    .badge-sophossourcetype::part(result-badge-element) {
            background-color: #007bff;
        }

        .badge-sophossourcetype::part(result-badge-label) {
                color: #ffffff;
            }
        </style>
<atomic-result-section-actions>
        <atomic-quickview></atomic-quickview>
        </atomic-result-section-actions>
<atomic-result-section-badges>
    <atomic-result-badge class="badge-sophossourcetype" field="sophossourcetype"></atomic-result-badge>
    </atomic-result-section-badges>
<atomic-result-section-title>
    <atomic-ipx-result-link>
        <a slot="attributes" target="_blank"></a>
    </atomic-ipx-result-link>
</atomic-result-section-title>
<atomic-result-section-title-metadata></atomic-result-section-title-metadata>
<atomic-result-section-excerpt>
    <atomic-result-text field="excerpt"></atomic-result-text>
</atomic-result-section-excerpt>
<atomic-result-section-bottom-metadata>
    <atomic-result-fields-list>
        <atomic-field-condition class="field" if-defined="sitemapsophosproductname">
                <span class="field-label"><atomic-text value="PRODUCT"></atomic-text>:</span>
                <atomic-result-text field="sitemapsophosproductname"></atomic-result-text>
                </atomic-field-condition>
        <atomic-field-condition class="field" if-defined="date">
                <span class="field-label"><atomic-text value="DATE"></atomic-text>:</span>
                <atomic-result-date field="date" format="MM/DD/YYYY"></atomic-result-date>
                </atomic-field-condition>
        </atomic-result-fields-list>
</atomic-result-section-bottom-metadata>

    </template>
</atomic-result-template>

        </atomic-result-list>
    <atomic-no-results></atomic-no-results>
    <atomic-query-error></atomic-query-error>
</atomic-layout-section>
<atomic-layout-section section="pagination">
    <atomic-load-more-results class="pagination-more-results"></atomic-load-more-results>
</atomic-layout-section>


  <atomic-recs-interface id="ipx-recs-86b53190-8827-4997-aab6-fca6ecdcf92d" fields-to-include='["sophossourcetype","sitemapsophosproductname","author","communitytype","date","language"]' analytics="true" >
  <atomic-ipx-recs-list image-size="none" label="Recommended for you" number-of-recommendations="5">
  <atomic-recs-result-template
        must-match-sophossourcetype="Community"
            >
      <template slot="link">
          <atomic-result-link>
            <a slot="attributes" target="_blank"></a>
          </atomic-result-link>
        </template>
      <template>
            <style>

atomic-result-link {
    font-size: var(--atomic-text-base);
}

atomic-result-link p {
    display: flex;
    align-items: center;
}

atomic-result-section-bottom-metadata atomic-result-link a {
    color: #1372EC;
}

atomic-result-section-bottom-metadata atomic-result-link a:visited {
    color: var(--atomic-visited);
}

.result-root.with-sections.display-list.density-normal.image-none atomic-result-section-excerpt {
    margin-top: 0.4rem;
}

.result-root.with-sections.display-list.density-normal.image-none atomic-result-section-bottom-metadata {
    margin-top: 0.5rem;
}

</style>
<atomic-result-section-title>
    <atomic-result-text field="title"></atomic-result-text>
</atomic-result-section-title>
<atomic-result-section-title-metadata></atomic-result-section-title-metadata>
<atomic-result-section-excerpt>
    <atomic-result-text field="excerpt"></atomic-result-text>
</atomic-result-section-excerpt>

        </template>
      </atomic-recs-result-template>
    <atomic-recs-result-template
        >
      <template slot="link">
          <atomic-result-link>
            <a slot="attributes" target="_blank"></a>
          </atomic-result-link>
        </template>
      <template>
            <style>

atomic-result-link {
    font-size: var(--atomic-text-base);
}

atomic-result-link p {
    display: flex;
    align-items: center;
}

atomic-result-section-bottom-metadata atomic-result-link a {
    color: #1372EC;
}

atomic-result-section-bottom-metadata atomic-result-link a:visited {
    color: var(--atomic-visited);
}

.result-root.with-sections.display-list.density-normal.image-none atomic-result-section-excerpt {
    margin-top: 0.4rem;
}

.result-root.with-sections.display-list.density-normal.image-none atomic-result-section-bottom-metadata {
    margin-top: 0.5rem;
}

</style>
<atomic-result-section-title>
    <atomic-result-text field="title"></atomic-result-text>
</atomic-result-section-title>
<atomic-result-section-title-metadata></atomic-result-section-title-metadata>
<atomic-result-section-excerpt>
    <atomic-result-text field="excerpt"></atomic-result-text>
</atomic-result-section-excerpt>

        </template>
      </atomic-recs-result-template>
    </atomic-ipx-recs-list>
  <atomic-recs-error></atomic-recs-error>
</atomic-recs-interface>

  </div>

    
    <atomic-layout-section section="facets">
  <atomic-facet field="sophossourcetype" label="Source" display-values-as="checkbox"></atomic-facet><atomic-facet field="sitemapsophosproductname" label="Product" display-values-as="checkbox"></atomic-facet><atomic-facet field="author" label="Author" display-values-as="checkbox"></atomic-facet><atomic-facet field="communitytype" label="Community Type" display-values-as="checkbox"></atomic-facet><atomic-timeframe-facet field="date" label="Posted Date">
          <atomic-timeframe unit="hour"></atomic-timeframe>
          <atomic-timeframe unit="day"></atomic-timeframe>
          <atomic-timeframe unit="week"></atomic-timeframe>
          <atomic-timeframe unit="month"></atomic-timeframe>
          <atomic-timeframe unit="quarter"></atomic-timeframe>
          <atomic-timeframe unit="year"></atomic-timeframe>
        </atomic-timeframe-facet><atomic-facet field="language" label="Language" display-values-as="checkbox"></atomic-facet>
  </atomic-layout-section>

</atomic-ipx-modal>

        <atomic-ipx-button label="Search" is-modal-open="false" exportparts="ipx-button"></atomic-ipx-button>

    </atomic-search-interface>
`,
      });
    },

    reset: async () => {
      const resetIPX = async (ipxId, usesTargetSelector) => {

const { loadQuerySetActions } = await import(
    "https://static.cloud.coveo.com/headless/v3/headless.esm.js"
  );
const coveoIPX = document.querySelector("#coveo-ipx-" + ipxId);
  const ipxInterface = coveoIPX.shadowRoot.querySelector(
    "atomic-search-interface"
  );
  const engine = ipxInterface.engine;
  const recsInterface = coveoIPX.shadowRoot.querySelector(
    "atomic-recs-interface"
  );

  ipxInterface.classList.remove("atomic-search-interface-search-executed");

  const resetQueryAction = loadQuerySetActions(engine).updateQuerySetQuery({
    id: Object.keys(engine.state.querySet)[0],
    query: "",
  });

  engine.dispatch(resetQueryAction);

  if (usesTargetSelector) {
    recsInterface.getRecommendations();
  } else {
    const ipxModal = coveoIPX.shadowRoot.querySelector("atomic-ipx-modal");
    const ipxButton = coveoIPX.shadowRoot.querySelector("atomic-ipx-button");

    const onClickHandler = () => {
      recsInterface.getRecommendations();
      ipxButton.onclick = null;
    };

    ipxModal.setAttribute("is-open", false);
    ipxButton.setAttribute("is-modal-open", false);
    ipxButton.onclick = onClickHandler;
  }
};

      resetIPX("86b53190-8827-4997-aab6-fca6ecdcf92d", false);
    },
  };
  window.CoveoIPX = CoveoIPX;
})();
