{"version":3,"names":["window","require","registerSettings","sidebar_side","number_of_tags","show_on_toproutes","exceptions","define","_exports","_thisFallbackHelper","_tryLookupHelper","_deprecationsHelper","_templateFactory","Object","defineProperty","value","default","createTemplateFactory","id","block","moduleName","scope","isStrictMode","_pluginApi","settings","getObjectForTheme","name","after","initialize","withPluginApi","api","container","Discourse","__container__","registerConnectorClass","tagName","setupComponent","args","component","set","location","hostname","onPageChange","url","path","pathname","category","lookup","get","isException","split","includes","topMenuRoutes","top_menu","map","route","noCategories","indexOf","splice","test","topTags","length","$","addClass","this","isDestroyed","isDestroying","removeClass"],"sourceRoot":"theme-10/","sources":["settings.js","discourse/templates/connectors/before-topic-list-body/tag-sidebar.js","discourse/initializers/theme-field-65-desktop-html-script-1.js"],"sourcesContent":["(function() {\n  if ('require' in window) {\n    require(\"discourse/lib/theme-settings-store\").registerSettings(10, {\"sidebar_side\":\"right\",\"number_of_tags\":15,\"show_on_toproutes\":true,\"exceptions\":\"\"});\n  }\n})();\n","if ('define' in window) {\ndefine(\"discourse/theme-10/discourse/templates/connectors/before-topic-list-body/tag-sidebar\", [\"exports\", \"ember-this-fallback/this-fallback-helper\", \"ember-this-fallback/try-lookup-helper\", \"ember-this-fallback/deprecations-helper\", \"@ember/template-factory\"], function (_exports, _thisFallbackHelper, _tryLookupHelper, _deprecationsHelper, _templateFactory) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.default = void 0;\n  var _default = _exports.default = (0, _templateFactory.createTemplateFactory)(\n  /*\n    \n     {{#if tagSidebar}}\n  \n        <div class=\"tag-sidebar {{cat.slug}}-sidebar\">\n          <h3>{{i18n (theme-prefix \"popular_tags\")}}</h3>\n            {{#each topTags as |t|}}\n              <a href=\"/tags{{if cat '/c/'}}{{if cat.parentCategory (concat cat.parentCategory.slug \"/\")}}{{cat.slug}}/{{t}}\">{{t}}</a>\n            {{/each}}\n        </div>\n  \n    {{/if}}\n  \n  */\n  {\n    \"id\": null,\n    \"block\": \"[[[1,\\\"\\\\n\\\"],[41,[30,0,[\\\"tagSidebar\\\"]],[[[1,\\\"\\\\n      \\\"],[44,[[28,[37,2],null,[[\\\"cat\\\"],[[28,[32,0],[\\\"cat\\\"],null]]]]],[[[10,0],[15,0,[29,[\\\"tag-sidebar \\\",[52,[30,1,[\\\"cat\\\"]],[28,[30,1,[\\\"cat\\\"]],null,null],[28,[32,1],[[30,0],\\\"cat.slug\\\",\\\"[\\\\\\\"The `cat` property path was used in the `discourse/theme-10/discourse/templates/connectors/before-topic-list-body/tag-sidebar` template without using `this`. This fallback behavior has been deprecated, all properties must be looked up on `this` when used in the template: {{this.cat}}\\\\\\\",false,{\\\\\\\"id\\\\\\\":\\\\\\\"ember-this-fallback.this-property-fallback\\\\\\\",\\\\\\\"until\\\\\\\":\\\\\\\"n/a\\\\\\\",\\\\\\\"for\\\\\\\":\\\\\\\"ember-this-fallback\\\\\\\",\\\\\\\"url\\\\\\\":\\\\\\\"https://deprecations.emberjs.com/v3.x#toc_this-property-fallback\\\\\\\",\\\\\\\"since\\\\\\\":{\\\\\\\"available\\\\\\\":\\\\\\\"0.2.0\\\\\\\"}}]\\\"],null]],\\\"-sidebar\\\"]]],[12],[1,\\\"\\\\n        \\\"],[10,\\\"h3\\\"],[12],[1,[28,[35,3],[[28,[37,4],[10,\\\"popular_tags\\\"],null]],null]],[13],[1,\\\"\\\\n\\\"],[42,[28,[37,6],[[28,[37,6],[[30,0,[\\\"topTags\\\"]]],null]],null],null,[[[1,\\\"            \\\"],[44,[[28,[37,2],null,[[\\\"cat\\\"],[[28,[32,0],[\\\"cat\\\"],null]]]]],[[[10,3],[15,6,[29,[\\\"/tags\\\",[52,[30,0,[\\\"cat\\\"]],\\\"/c/\\\"],[52,[30,0,[\\\"cat\\\",\\\"parentCategory\\\"]],[28,[37,7],[[30,0,[\\\"cat\\\",\\\"parentCategory\\\",\\\"slug\\\"]],\\\"/\\\"],null]],[52,[30,3,[\\\"cat\\\"]],[28,[30,3,[\\\"cat\\\"]],null,null],[28,[32,1],[[30,0],\\\"cat.slug\\\",\\\"[\\\\\\\"The `cat` property path was used in the `discourse/theme-10/discourse/templates/connectors/before-topic-list-body/tag-sidebar` template without using `this`. This fallback behavior has been deprecated, all properties must be looked up on `this` when used in the template: {{this.cat}}\\\\\\\",false,{\\\\\\\"id\\\\\\\":\\\\\\\"ember-this-fallback.this-property-fallback\\\\\\\",\\\\\\\"until\\\\\\\":\\\\\\\"n/a\\\\\\\",\\\\\\\"for\\\\\\\":\\\\\\\"ember-this-fallback\\\\\\\",\\\\\\\"url\\\\\\\":\\\\\\\"https://deprecations.emberjs.com/v3.x#toc_this-property-fallback\\\\\\\",\\\\\\\"since\\\\\\\":{\\\\\\\"available\\\\\\\":\\\\\\\"0.2.0\\\\\\\"}}]\\\"],null]],\\\"/\\\",[30,2]]]],[12],[1,[30,2]],[13]],[3]]],[1,\\\"\\\\n\\\"]],[2]],null],[1,\\\"      \\\"],[13]],[1]]],[1,\\\"\\\\n\\\\n\\\"]],[]],null],[1,[28,[32,2],[\\\"[[\\\\\\\"The `tagSidebar` property path was used in the `discourse/theme-10/discourse/templates/connectors/before-topic-list-body/tag-sidebar` template without using `this`. This fallback behavior has been deprecated, all properties must be looked up on `this` when used in the template: {{this.tagSidebar}}\\\\\\\",false,{\\\\\\\"id\\\\\\\":\\\\\\\"ember-this-fallback.this-property-fallback\\\\\\\",\\\\\\\"until\\\\\\\":\\\\\\\"n/a\\\\\\\",\\\\\\\"for\\\\\\\":\\\\\\\"ember-this-fallback\\\\\\\",\\\\\\\"url\\\\\\\":\\\\\\\"https://deprecations.emberjs.com/v3.x#toc_this-property-fallback\\\\\\\",\\\\\\\"since\\\\\\\":{\\\\\\\"available\\\\\\\":\\\\\\\"0.2.0\\\\\\\"}}],[\\\\\\\"The `topTags` property path was used in the `discourse/theme-10/discourse/templates/connectors/before-topic-list-body/tag-sidebar` template without using `this`. This fallback behavior has been deprecated, all properties must be looked up on `this` when used in the template: {{this.topTags}}\\\\\\\",false,{\\\\\\\"id\\\\\\\":\\\\\\\"ember-this-fallback.this-property-fallback\\\\\\\",\\\\\\\"until\\\\\\\":\\\\\\\"n/a\\\\\\\",\\\\\\\"for\\\\\\\":\\\\\\\"ember-this-fallback\\\\\\\",\\\\\\\"url\\\\\\\":\\\\\\\"https://deprecations.emberjs.com/v3.x#toc_this-property-fallback\\\\\\\",\\\\\\\"since\\\\\\\":{\\\\\\\"available\\\\\\\":\\\\\\\"0.2.0\\\\\\\"}}],[\\\\\\\"The `cat` property path was used in the `discourse/theme-10/discourse/templates/connectors/before-topic-list-body/tag-sidebar` template without using `this`. This fallback behavior has been deprecated, all properties must be looked up on `this` when used in the template: {{this.cat}}\\\\\\\",false,{\\\\\\\"id\\\\\\\":\\\\\\\"ember-this-fallback.this-property-fallback\\\\\\\",\\\\\\\"until\\\\\\\":\\\\\\\"n/a\\\\\\\",\\\\\\\"for\\\\\\\":\\\\\\\"ember-this-fallback\\\\\\\",\\\\\\\"url\\\\\\\":\\\\\\\"https://deprecations.emberjs.com/v3.x#toc_this-property-fallback\\\\\\\",\\\\\\\"since\\\\\\\":{\\\\\\\"available\\\\\\\":\\\\\\\"0.2.0\\\\\\\"}}],[\\\\\\\"The `cat` property path was used in the `discourse/theme-10/discourse/templates/connectors/before-topic-list-body/tag-sidebar` template without using `this`. This fallback behavior has been deprecated, all properties must be looked up on `this` when used in the template: {{this.cat}}\\\\\\\",false,{\\\\\\\"id\\\\\\\":\\\\\\\"ember-this-fallback.this-property-fallback\\\\\\\",\\\\\\\"until\\\\\\\":\\\\\\\"n/a\\\\\\\",\\\\\\\"for\\\\\\\":\\\\\\\"ember-this-fallback\\\\\\\",\\\\\\\"url\\\\\\\":\\\\\\\"https://deprecations.emberjs.com/v3.x#toc_this-property-fallback\\\\\\\",\\\\\\\"since\\\\\\\":{\\\\\\\"available\\\\\\\":\\\\\\\"0.2.0\\\\\\\"}}],[\\\\\\\"The `cat` property path was used in the `discourse/theme-10/discourse/templates/connectors/before-topic-list-body/tag-sidebar` template without using `this`. This fallback behavior has been deprecated, all properties must be looked up on `this` when used in the template: {{this.cat}}\\\\\\\",false,{\\\\\\\"id\\\\\\\":\\\\\\\"ember-this-fallback.this-property-fallback\\\\\\\",\\\\\\\"until\\\\\\\":\\\\\\\"n/a\\\\\\\",\\\\\\\"for\\\\\\\":\\\\\\\"ember-this-fallback\\\\\\\",\\\\\\\"url\\\\\\\":\\\\\\\"https://deprecations.emberjs.com/v3.x#toc_this-property-fallback\\\\\\\",\\\\\\\"since\\\\\\\":{\\\\\\\"available\\\\\\\":\\\\\\\"0.2.0\\\\\\\"}}]]\\\"],null]]],[\\\"maybeHelpers\\\",\\\"t\\\",\\\"maybeHelpers0\\\"],false,[\\\"if\\\",\\\"let\\\",\\\"hash\\\",\\\"i18n\\\",\\\"theme-prefix\\\",\\\"each\\\",\\\"-track-array\\\",\\\"concat\\\"]]\",\n    \"moduleName\": \"discourse/theme-10/discourse/templates/connectors/before-topic-list-body/tag-sidebar\",\n    \"scope\": () => [_tryLookupHelper.default, _thisFallbackHelper.default, _deprecationsHelper.default],\n    \"isStrictMode\": false\n  });\n});\n}\n","if ('define' in window) {\ndefine(\"discourse/theme-10/discourse/initializers/theme-field-65-desktop-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(10);\n  const themePrefix = key => `theme_translations.10.${key}`;\n  var _default = _exports.default = {\n    name: \"theme-field-65-desktop-html-script-1\",\n    after: \"inject-objects\",\n    initialize() {\n      (0, _pluginApi.withPluginApi)(\"0.8\", api => {\n        const container = Discourse.__container__;\n        api.registerConnectorClass('before-topic-list-body', 'tag-sidebar', {\n          tagName: \"div.sticky-sidebar\",\n          setupComponent(args, component) {\n            component.set('hostname', window.location.hostname);\n            api.onPageChange(url => {\n              const path = window.location.pathname;\n              const catController = container.lookup('controller:navigation/category');\n              const category = catController.get(\"category\");\n              const isException = category && settings.exceptions.split(\"|\").includes(category.name);\n              const siteSettings = container.lookup(\"site-settings:main\");\n              const topMenuRoutes = siteSettings.top_menu.split('|').map(function (route) {\n                return '/' + route;\n              });\n              let noCategories = topMenuRoutes.indexOf(\"/categories\");\n              if (noCategories > -1) {\n                topMenuRoutes.splice(noCategories, 1);\n              }\n              if (/^\\/c\\//.test(path) && !isException || settings.show_on_toproutes && topMenuRoutes.indexOf(path) > -1 && !/^\\/tag\\//.test(path)) {\n                const tagController = container.lookup(\"controller:discovery/topics\");\n                let topTags = tagController.get(\"model.topic_list.top_tags\");\n                if (topTags.length > 2) {\n                  $('html').addClass('custom-sidebar');\n                  $(\".topic-list\").addClass(\"with-sidebar\").addClass(settings.sidebar_side);\n                  if (this.isDestroyed || this.isDestroying) {\n                    return;\n                  }\n                  component.set('topTags', topTags);\n                  component.set('cat', category);\n                  component.set('tagSidebar', true);\n                } else {\n                  $('html').removeClass('custom-sidebar');\n                  $(\".topic-list\").removeClass(\"with-sidebar\").removeClass(settings.sidebar_side);\n                  component.set('tagSidebar', false);\n                }\n              }\n            });\n          }\n        });\n      });\n    }\n  };\n});\n}\n"],"mappings":"AACM,YAAaA,QACfC,QAAQ,sCAAsCC,iBAAiB,GAAI,CAACC,aAAe,QAAQC,eAAiB,GAAGC,mBAAoB,EAAKC,WAAa,KCFrJ,WAAYN,QAChBO,OAAO,uFAAwF,CAAC,UAAW,2CAA4C,wCAAyC,0CAA2C,4BAA4B,SAAUC,EAAUC,EAAqBC,EAAkBC,EAAqBC,GACrV;AAEAC,OAAOC,eAAeN,EAAU,aAAc,CAC5CO,OAAO,IAETP,EAASQ,aAAU;AACJR,EAASQ,SAAU,EAAIJ,EAAiBK,uBAevD,CACEC,GAAM,KACNC,MAAS,ktJACTC,WAAc,uFACdC,MAAS,IAAM,CAACX,EAAiBM,QAASP,EAAoBO,QAASL,EAAoBK,SAC3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