{"version":3,"file":"main.3YHbEK.js","sources":["theme-13/virtual:theme","theme-13/discourse/api-initializers/nvidia-theme.gjs","theme-13/virtual:entrypoint:main"],"sourcesContent":["import { getObjectForTheme } from \"discourse/lib/theme-settings-store\";\n\nexport const settings = getObjectForTheme(13);\n\nexport function themePrefix(key) {\n  return `theme_translations.13.${key}`;\n}\n","import icon from \"discourse/helpers/d-icon\";\nimport { apiInitializer } from \"discourse/lib/api\";\nimport { i18n } from \"discourse-i18n\";\n\nexport default apiInitializer((api) => {\n  const site = api.container.lookup(\"service:site\");\n\n  modifyHomeLogoHref(api);\n  addPostStaffClassname(api);\n  renderAllHomeBadgeInTopicCategory(api);\n  replaceIcons(api);\n  hideCategoryListGrandchildren(api);\n  changePostAvatarSize(api, site);\n  renderAllCategoriesBadgeInHeaderTopicInfo(api, site);\n  updateFooterCopyrightYear(api);\n});\n\nfunction modifyHomeLogoHref(api) {\n  api.registerHomeLogoHrefCallback(() => \"https://developer.nvidia.com/\");\n}\n\nfunction addPostStaffClassname(api) {\n  api.addPostClassesCallback((atts) => {\n    if (atts.staff === true) {\n      return [\"staff\"];\n    }\n  });\n}\n\nfunction renderAllHomeBadgeInTopicCategory(api) {\n  api.renderInOutlet(\n    \"topic-category\",\n    <template>\n      <div class=\"topic-category-breadcrumb\">\n        <a href=\"/categories\" title={{i18n (themePrefix \"breadcrumb_title\")}}>\n          {{i18n (themePrefix \"title_breadcrumb\")}}\n        </a>\n        {{icon \"angle-right\"}}\n      </div>\n    </template>\n  );\n}\n\nfunction replaceIcons(api) {\n  api.replaceIcon(\"d-liked\", \"thumbs-up\");\n  api.replaceIcon(\"d-unliked\", \"far-thumbs-up\");\n  api.replaceIcon(\"notification.liked\", \"far-thumbs-up\");\n  api.replaceIcon(\"notification.liked_2\", \"far-thumbs-up\");\n  api.replaceIcon(\"notification.liked_many\", \"far-thumbs-up\");\n  api.replaceIcon(\"heart\", \"thumbs-up\");\n}\n\n// Only list one level of subcategories in each box on the categories page\nfunction hideCategoryListGrandchildren(api) {\n  api.registerValueTransformer(\n    \"category-list-subcategories\",\n    ({ value, context }) => {\n      if (\n        context.page === \"categories\" &&\n        context.category?.parent_category_id\n      ) {\n        return [];\n      }\n\n      return value;\n    }\n  );\n}\n\nfunction changePostAvatarSize(api, site) {\n  api.registerValueTransformer(\"post-avatar-size\", ({ value }) => {\n    return site.desktopView ? \"extra_large\" : value;\n  });\n}\n\nfunction renderAllCategoriesBadgeInHeaderTopicInfo(api, site) {\n  api.renderInOutlet(\n    \"header-categories-wrapper__before\",\n    <template>\n      {{#if site.desktopView}}\n        <a\n          class=\"custom-category-breadcrumb\"\n          href=\"/categories\"\n          title={{i18n (themePrefix \"breadcrumb_title\")}}\n        >\n          <span>\n            {{i18n (themePrefix \"header_breadcrumb\")}}\n            {{icon \"angle-right\"}}\n          </span>\n        </a>\n      {{/if}}\n    </template>\n  );\n}\n\n// Keep the copyright year in the footer HTML current\nfunction updateFooterCopyrightYear(api) {\n  api.onAppEvent(\"inserted-custom-html:footer\", () => {\n    document\n      .querySelectorAll(\".custom-footer-content .footer-copyright-year\")\n      .forEach((el) => (el.textContent = new Date().getFullYear()));\n  });\n}\n","import * as Mod1 from \"./discourse/api-initializers/nvidia-theme\";\nconst compatModules = {\n  \"discourse/api-initializers/nvidia-theme\": Mod1,\n};\nexport { compatModules };\nexport default compatModules;\n"],"names":["themePrefix","key","getObjectForTheme","nvidiaTheme","apiInitializer","api","site","container","lookup","registerHomeLogoHrefCallback","modifyHomeLogoHref","addPostClassesCallback","atts","staff","addPostStaffClassname","renderInOutlet","setComponentTemplate","createTemplateFactory","id","block","moduleName","scope","i18n","icon","isStrictMode","templateOnly","renderAllHomeBadgeInTopicCategory","replaceIcon","replaceIcons","registerValueTransformer","value","context","page","category","parent_category_id","hideCategoryListGrandchildren","desktopView","changePostAvatarSize","renderAllCategoriesBadgeInHeaderTopicInfo","onAppEvent","document","querySelectorAll","forEach","el","textContent","Date","getFullYear","updateFooterCopyrightYear","compatModules"],"mapp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