{"version":3,"sources":["discourse/initializers/theme-field-1-common-html-script-1.js","discourse/initializers/theme-field-1-common-html-script-2.js"],"names":["window","define","_exports","_pluginApi","Object","defineProperty","value","default","require","getObjectForTheme","_default","name","after","false","initialize","withPluginApi","api","onPageChange","url","test","meta","document","createElement","content","head","appendChild","currentUser","Discourse","User","current","staff","addNavigationBarItem","displayName","title","href"],"mappings":"AAAI,WAAYA,QAChBC,OAAO,oEAAqE,CAAC,UAAW,6BAA6B,SAAUC,EAAUC,GACvI;AAEAC,OAAOC,eAAeH,EAAU,aAAc,CAC5CI,OAAO,IAETJ,EAASK,aAAU;AACFC,QAAQ,sCAAsCC,kBAAkB;AAEjF,IAAIC,EAAW,CACbC,KAAM,qCACNC,MAAO,iBACPC,UAAAC,IACE,EAAIX,EAAWY,eAAe,UAAUC,IACtCA,EAAIC,cAAaC,IACf,GAAI,uBAAuBC,KAAKD,GAAM,CACpC,MAAME,EAAOC,SAASC,cAAc;AACpCF,EAAKT,KAAO,SACZS,EAAKG,QAAU,UACfF,SAASG,KAAKC,YAAYL,EAC5B,CAAA,GACA,GAEN;AAEFlB,EAASK,QAAUG,CACrB,IC3BI,WAAYV,QAChBC,OAAO,oEAAqE,CAAC,UAAW,6BAA6B,SAAUC,EAAUC,GACvI;AAEAC,OAAOC,eAAeH,EAAU,aAAc,CAC5CI,OAAO,IAETJ,EAASK,aAAU;AACFC,QAAQ,sCAAsCC,kBAAkB;AAEjF,IAAIC,EAAW,CACbC,KAAM,qCACNC,MAAO,iBACPC,UAAAC,IACE,EAAIX,EAAWY,eAAe,UAAUC,IACtC,IAAIU,EAAcC,UAAUC,KAAKC;AACd,MAAfH,GAAuBA,EAAYI,OACrCd,EAAIe,qBAAqB,CACvBpB,KAAM,aACNqB,YAAa,aACbC,MAAO,aACPC,KAAM,uBAEV,GAEJ;AAEFhC,EAASK,QAAUG,CACrB","sourceRoot":"theme-2/","sourcesContent":["if ('define' in window) {\ndefine(\"discourse/theme-2/initializers/theme-field-1-common-html-script-1\", [\"exports\", \"discourse/lib/plugin-api\"], function (_exports, _pluginApi) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.default = void 0;\n  const settings = require(\"discourse/lib/theme-settings-store\").getObjectForTheme(2);\n  const themePrefix = key => `theme_translations.2.${key}`;\n  var _default = {\n    name: \"theme-field-1-common-html-script-1\",\n    after: \"inject-objects\",\n    initialize() {\n      (0, _pluginApi.withPluginApi)(\"0.8.42\", api => {\n        api.onPageChange(url => {\n          if (/^\\/u\\/[^\\/]+(\\/.*)?$/.test(url)) {\n            const meta = document.createElement(\"meta\");\n            meta.name = \"robots\";\n            meta.content = \"noindex\";\n            document.head.appendChild(meta);\n          }\n        });\n      });\n    }\n  };\n  _exports.default = _default;\n});\n}\n","if ('define' in window) {\ndefine(\"discourse/theme-2/initializers/theme-field-1-common-html-script-2\", [\"exports\", \"discourse/lib/plugin-api\"], function (_exports, _pluginApi) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.default = void 0;\n  const settings = require(\"discourse/lib/theme-settings-store\").getObjectForTheme(2);\n  const themePrefix = key => `theme_translations.2.${key}`;\n  var _default = {\n    name: \"theme-field-1-common-html-script-2\",\n    after: \"inject-objects\",\n    initialize() {\n      (0, _pluginApi.withPluginApi)(\"0.8.18\", api => {\n        var currentUser = Discourse.User.current();\n        if (currentUser != null && currentUser.staff) {\n          api.addNavigationBarItem({\n            name: \"Unanswered\",\n            displayName: \"Unanswered\",\n            title: \"Unanswered\",\n            href: \"/latest?max_posts=1\"\n          });\n        }\n      });\n    }\n  };\n  _exports.default = _default;\n});\n}\n"]}