{"version":3,"file":"main.Md9Y2F.js","sources":["theme-130/virtual:theme","theme-130/discourse/components/post-meta-data-sag-dates.gjs","theme-130/discourse/api-initializers/init-display-created-at.js","theme-130/discourse/connectors/topic-list-before-relative-date/created-at-date.gjs","theme-130/virtual:entrypoint:main"],"sourcesContent":["import { getObjectForTheme } from \"discourse/lib/theme-settings-store\";\n\nexport const settings = getObjectForTheme(130);\n\nexport function themePrefix(key) {\n  return `theme_translations.130.${key}`;\n}\n","import Component from \"@glimmer/component\";\nimport { service } from \"@ember/service\";\nimport RelativeDate from \"discourse/components/relative-date\";\n\nexport default class PostMetaDataSagDates extends Component {\n  @service router;\n\n  get parentRoute() {\n    return this.router?.currentRoute?.parent;\n  }\n\n  get shouldDisplayDates() {\n    return (\n      this.parentRoute &&\n      settings.category\n        .split(\"|\")\n        .some(\n          (category) =>\n            parseInt(category, 10) === this.parentRoute.attributes.category_id\n        )\n    );\n  }\n\n  <template>\n    {{#if this.shouldDisplayDates}}\n      <div class=\"post-info post-date\">\n        {{#if @post.last_wiki_edit}}\n          <span class=\"sag-last-update\">\n            Last update:\n            <a class=\"post-date\">\n              <RelativeDate @date={{@post.last_wiki_edit}} />,\n            </a>\n          </span>\n        {{/if}}\n        <span class=\"sag-created\">\n          Created:\n          <a class=\"post-date\">\n            <RelativeDate @date={{@post.created_at}} />\n          </a>\n        </span>\n      </div>\n    {{/if}}\n  </template>\n}\n","import { apiInitializer } from \"discourse/lib/api\";\nimport PostMetaDataSagDates from \"../components/post-meta-data-sag-dates\";\n\nexport default apiInitializer((api) => {\n  api.registerValueTransformer(\n    \"post-meta-data-infos\",\n    ({ value: infos, context: { post } }) => {\n      if (post.firstPost && post.wiki) {\n        infos.replace(\"date\", PostMetaDataSagDates);\n      }\n    }\n  );\n});\n","import Component from \"@glimmer/component\";\nimport { computed } from \"@ember/object\";\nimport { service } from \"@ember/service\";\nimport formatDate from \"discourse/helpers/format-date\";\n\nexport default class CreatedAtDate extends Component {\n  @service router;\n\n  @computed(\"args.outletArgs.topic.{category_id,tags}\")\n  get showCreatedAt() {\n    const route = this.router.currentRoute;\n\n    if (route.params?.category_slug_path_with_id) {\n      const splitCatPath = route.params.category_slug_path_with_id.split(\"/\");\n      return settings.category\n        .split(\"|\")\n        .some((category) => category === splitCatPath[splitCatPath.length - 1]);\n    }\n  }\n\n  <template>\n    {{#if this.showCreatedAt}}\n      {{~formatDate @outletArgs.topic.createdAt format=\"tiny\" noTitle=\"true\"~}}\n    {{/if}}\n  </template>\n}\n","import * as Mod1 from \"./discourse/api-initializers/init-display-created-at\";\nimport * as Mod2 from \"./discourse/components/post-meta-data-sag-dates\";\nimport * as Mod3 from \"./discourse/connectors/topic-list-before-relative-date/created-at-date.gjs\";\nconst compatModules = {\n  \"discourse/api-initializers/init-display-created-at\": Mod1,\n  \"discourse/components/post-meta-data-sag-dates\": Mod2,\n  \"discourse/connectors/topic-list-before-relative-date/created-at-date\": Mod3,\n};\nexport default compatModules;\n"],"names":["settings","getObjectForTheme","PostMetaDataSagDates","Component","dt7948","g","this","prototype","service","router","i","parentRoute","currentRoute","parent","shouldDisplayDates","category","split","some","parseInt","attributes","category_id","setComponentTemplate","createTemplateFactory","id","block","moduleName","scope","RelativeDate","isStrictMode","initDisplayCreatedAt","apiInitializer","api","registerValueTransformer","value","infos","context","post","firstPost","wiki","replace","CreatedAtDate","showCreatedAt","route","params","category_slug_path_with_id","splitCatPath","length","n","computed","formatDate","compatModules","Mod1","Mod2"],"mappings":"2nBAEaA,EAAWC,EAAkB;ACE3B,MAAMC,UAA6BC,SAAAC,OAAAC,EAAAC,KAAAC,oBAC/CC,GAAA,CAAAC,QAAAL,OAAAM,EAAAJ,KAAA;AAED,eAAIK,GACF,OAAOL,KAAKG,QAAQG,cAAcC,MACpC,CAEA,sBAAIC,GACF,OACER,KAAKK,aACLX,EAASe,SACNC,MAAM,KACNC,KACEF,GACCG,SAASH,EAAU,MAAQT,KAAKK,YAAYQ,WAAWC,YAGjE,QAEAC,EAAAC,EAAA,CAAAC,GAAA,KAAAC,MAAA,yqBAAAC,WAAA,4BAAAC,MAAAA,KAAAC,GAAAC,cAAA,IAmBAtB,KAAU,kDCvCZuB,EAAeC,EAAgBC,IAC7BA,EAAIC,yBACF,uBACA,EAAGC,MAAOC,EAAOC,SAAWC,YACtBA,EAAKC,WAAaD,EAAKE,MACzBJ,EAAMK,QAAQ,OAAQrC;ACHf,MAAMsC,UAAsBrC,SAAAC,OAAAC,EAAAC,KAAAC,oBACxCC,GAAA,CAAAC,QAAAL,OAAAM,EAAAJ,KAAA;AAED,iBACImC,GACF,MAAMC,EAAQpC,KAAKG,OAAOG;AAE1B,GAAI8B,EAAMC,QAAQC,2BAA4B,CAC5C,MAAMC,EAAeH,EAAMC,OAAOC,2BAA2B5B,MAAM;AACnE,OAAOhB,EAASe,SACbC,MAAM,KACNC,KAAMF,GAAaA,IAAa8B,EAAaA,EAAaC,OAAS,GACxE,CACF,QAAA1C,OAAA2C,EAAAzC,KAAAC,2BAVCyC,EAAS,6CAAA,QAYV3B,EAAAC,EAAA,CAAAC,GAAA,KAAAC,MAAA,6JAAAC,WAAA,4BAAAC,MAAAA,KAAAuB,GAAArB,cAAA,IAIAtB,KAAU,ECrBP,MAAC4C,EAAgB,CACpB,qDAAsDC,EACtD,gDAAiDC,EACjD;"}