{"version":3,"file":"virtual_main.js","sources":["theme-10/virtual:init-settings","theme-10/virtual:theme","theme-10/discourse/api-initializers/clickable-topic-row.js","theme-10/discourse/connectors/above-latest-topic-list-item/clickable-topic-row.gjs","theme-10/virtual:main"],"sourcesContent":["import { registerSettings } from \"discourse/lib/theme-settings-store\";\n\nregisterSettings(10, {});\n","import { getObjectForTheme } from \"discourse/lib/theme-settings-store\";\n\nexport const settings = getObjectForTheme(10);\n\nexport function themePrefix(key) {\n  return `theme_translations.10.${key}`;\n}\n","import { apiInitializer } from \"discourse/lib/api\";\nimport { wantsNewWindow } from \"discourse/lib/intercept-click\";\n\nexport default apiInitializer((api) => {\n  api.registerBehaviorTransformer(\n    \"topic-list-item-click\",\n    ({ context, next }) => {\n      const targetElement = context.event.target;\n      const topic = context.topic;\n\n      const clickTargets = [\n        \"topic-list-data\",\n        \"link-bottom-line\",\n        \"topic-list-item\",\n      ];\n\n      if (api.container.lookup(\"service:site\").mobileView) {\n        clickTargets.push(\"topic-item-metadata\", \"topic-item-stats\");\n      }\n\n      if (clickTargets.some((t) => targetElement.classList.contains(t))) {\n        if (wantsNewWindow(event)) {\n          return true;\n        }\n        return context.navigateToTopic(topic, topic.lastUnreadUrl);\n      }\n\n      next();\n    }\n  );\n});\n","import Component from \"@glimmer/component\";\nimport { action } from \"@ember/object\";\nimport didInsert from \"@ember/render-modifiers/modifiers/did-insert\";\nimport willDestroy from \"@ember/render-modifiers/modifiers/will-destroy\";\nimport { bind } from \"discourse/lib/decorators\";\nimport { wantsNewWindow } from \"discourse/lib/intercept-click\";\nimport DiscourseURL from \"discourse/lib/url\";\n\nexport default class extends Component {\n  @bind\n  clickHandler(event) {\n    const targetElement = event.target;\n    const topic = this.args.outletArgs.topic;\n\n    if (targetElement.tagName === \"DIV\") {\n      if (wantsNewWindow(event)) {\n        return true;\n      }\n      DiscourseURL.routeTo(topic.lastUnreadUrl || topic.url);\n    }\n  }\n\n  @action\n  registerClickHandler(element) {\n    element.parentElement.addEventListener(\"click\", this.clickHandler);\n  }\n\n  @action\n  removeClickHandler(element) {\n    element.parentElement.removeEventListener(\"click\", this.clickHandler);\n  }\n\n  <template>\n    <div\n      class=\"hidden\"\n      {{didInsert this.registerClickHandler}}\n      {{willDestroy this.removeClickHandler}}\n    ></div>\n  </template>\n}\n","import \"virtual:init-settings\";\n\nconst themeCompatModules = {};\nimport * as Mod1 from \"./discourse/api-initializers/clickable-topic-row\";\nthemeCompatModules[\"discourse/api-initializers/clickable-topic-row\"] = Mod1;\n\nimport * as Mod2 from \"./discourse/connectors/above-latest-topic-list-item/clickable-topic-row.gjs\";\nthemeCompatModules[\"discourse/connectors/above-latest-topic-list-item/clickable-topic-row\"] = Mod2;\n\nexport default themeCompatModules;\n"],"names":["registerSettings","getObjectForTheme","clickableTopicRow$1","apiInitializer","api","registerBehaviorTransformer","_ref","context","next","targetElement","event","target","topic","clickTargets","container","lookup","mobileView","push","some","t","classList","contains","wantsNewWindow","navigateToTopic","lastUnreadUrl","clickableTopicRow","Component","clickHandler","this","args","outletArgs","tagName","DiscourseURL","routeTo","url","static","dt7948","n","prototype","bind","registerClickHandler","element","parentElement","addEventListener","action","removeClickHandler","removeEventListener","setComponentTemplate","createTemplateFactory","id","block","moduleName","scope","didInsert","willDestroy","isStrictMode","themeCompatModules","Mod1","Mod2"],"mappings":";AAEAA,EAAiB,GAAI,CAAA,GCAGC,EAAkB;ACC1C,IAAAC,EAAeC,EAAgBC,IAC7BA,EAAIC,4BACF,wBACAC,IAAuB,IAAtBC,QAAEA,EAAOC,KAAEA,GAAMF;AAChB,MAAMG,EAAgBF,EAAQG,MAAMC,OAC9BC,EAAQL,EAAQK,MAEhBC,EAAe,CACnB,kBACA,mBACA;AAOF,GAJIT,EAAIU,UAAUC,OAAO,gBAAgBC,YACvCH,EAAaI,KAAK,sBAAuB,oBAGvCJ,EAAaK,KAAMC,GAAMV,EAAcW,UAAUC,SAASF,IAC5D,QAAIG,EAAeZ,QAGZH,EAAQgB,gBAAgBX,E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