diff --git a/js/dist/admin.js.map b/js/dist/admin.js.map index 7a4740e..84e19a6 100644 --- a/js/dist/admin.js.map +++ b/js/dist/admin.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack://@askvortsov/flarum-categories/webpack/bootstrap","webpack://@askvortsov/flarum-categories/external \"flarum.core.compat['common/extend']\"","webpack://@askvortsov/flarum-categories/external \"flarum.core.compat['admin/components/BasicsPage']\"","webpack://@askvortsov/flarum-categories/./src/admin/index.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","flarum","core","compat","app","initializers","add","extensionData","registerSetting","class","translator","trans","setting","label","type","help","extend","BasicsPage","items","path"],"mappings":"2BACE,IAAIA,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUC,QAGnC,IAAIC,EAASJ,EAAiBE,GAAY,CACzCG,EAAGH,EACHI,GAAG,EACHH,QAAS,IAUV,OANAI,EAAQL,GAAUM,KAAKJ,EAAOD,QAASC,EAAQA,EAAOD,QAASF,GAG/DG,EAAOE,GAAI,EAGJF,EAAOD,QA0Df,OArDAF,EAAoBQ,EAAIF,EAGxBN,EAAoBS,EAAIV,EAGxBC,EAAoBU,EAAI,SAASR,EAASS,EAAMC,GAC3CZ,EAAoBa,EAAEX,EAASS,IAClCG,OAAOC,eAAeb,EAASS,EAAM,CAAEK,YAAY,EAAMC,IAAKL,KAKhEZ,EAAoBkB,EAAI,SAAShB,GACX,oBAAXiB,QAA0BA,OAAOC,aAC1CN,OAAOC,eAAeb,EAASiB,OAAOC,YAAa,CAAEC,MAAO,WAE7DP,OAAOC,eAAeb,EAAS,aAAc,CAAEmB,OAAO,KAQvDrB,EAAoBsB,EAAI,SAASD,EAAOE,GAEvC,GADU,EAAPA,IAAUF,EAAQrB,EAAoBqB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ACTC,MAAOT,IAAIM,WAAWC,MAAM,0DAC5BG,KAAM,WAEPN,iBAAgB,kBAAM,YAAQC,MAAM,qBAAqBL,IAAIM,WAAWC,MAAM,2DAC9EH,gBAAgB,CACfI,QAAS,2CACTC,MAAOT,IAAIM,WAAWC,MAAM,yDAC5BG,KAAM,WAEPN,gBAAgB,CACfI,QAAS,kDACTC,MAAOT,IAAIM,WAAWC,MAAM,gEAC5BG,KAAM,WAEPN,gBAAgB,CACfI,QAAS,4CACTC,MAAOT,IAAIM,WAAWC,MAAM,0DAC5BG,KAAM,WAEPN,gBAAgB,CACfI,QAAS,sDACTC,MAAOT,IAAIM,WAAWC,MAAM,oEAC5BG,KAAM,WAEPN,iBAAgB,kBAAM,YAAQC,MAAM,qBAAqBL,IAAIM,WAAWC,MAAM,0DAC9EH,gBAAgB,CACfI,QAAS,wCACTC,MAAOT,IAAIM,WAAWC,MAAM,sDAC5BI,KAAMX,IAAIM,WAAWC,MAAM,oDAC3BG,KAAM,WAEPN,iBAAgB,kBAAM,YAAQC,MAAM,qBAAqBL,IAAIM,WAAWC,MAAM,wDAC9EH,gBAAgB,CACfI,QAAS,8CACTC,MAAOT,IAAIM,WAAWC,MAAM,4DAC5BG,KAAM,WAGVE,iBAAOC,IAAWpB,UAAW,iBAAiB,SAACqB,GAC7CA,EAAMZ,IAAI,aAAc,CACtBa,KAAM,cACNN,MAAOT,IAAIM,WAAWC,MAAM","file":"admin.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 22);\n","module.exports = flarum.core.compat['common/extend'];","module.exports = flarum.core.compat['admin/components/BasicsPage'];","import { extend } from 'flarum/common/extend';\nimport BasicsPage from 'flarum/admin/components/BasicsPage';\n\napp.initializers.add('askvortsov/flarum-categories', () => {\n app.extensionData\n .for('askvortsov-categories')\n .registerSetting(() => , 10)\n .registerSetting(\n {\n setting: 'askvortsov-categories.keep-tags-nav',\n label: app.translator.trans('askvortsov-categories.admin.labels.keep_tags_nav'),\n type: 'switch',\n },\n 9\n )\n .registerSetting(() => )\n .registerSetting({\n setting: 'askvortsov-categories.full-page-desktop',\n label: app.translator.trans('askvortsov-categories.admin.labels.full_page_desktop'),\n help: app.translator.trans('askvortsov-categories.admin.help.full_page_desktop'),\n type: 'switch',\n })\n .registerSetting({\n setting: 'askvortsov-categories.compact-mobile',\n label: app.translator.trans('askvortsov-categories.admin.labels.compact_mobile_mode'),\n type: 'switch',\n })\n .registerSetting(() => )\n .registerSetting({\n setting: 'askvortsov-categories.parent-remove-icon',\n label: app.translator.trans('askvortsov-categories.admin.labels.parent_remove_icon'),\n type: 'switch',\n })\n .registerSetting({\n setting: 'askvortsov-categories.parent-remove-description',\n label: app.translator.trans('askvortsov-categories.admin.labels.parent_remove_description'),\n type: 'switch',\n })\n .registerSetting({\n setting: 'askvortsov-categories.parent-remove-stats',\n label: app.translator.trans('askvortsov-categories.admin.labels.parent_remove_stats'),\n type: 'switch',\n })\n .registerSetting({\n setting: 'askvortsov-categories.parent-remove-last-discussion',\n label: app.translator.trans('askvortsov-categories.admin.labels.parent_remove_last_discussion'),\n type: 'switch',\n })\n .registerSetting(() => )\n .registerSetting({\n setting: 'askvortsov-categories.child-bare-icon',\n label: app.translator.trans('askvortsov-categories.admin.labels.child_bare_icon'),\n help: app.translator.trans('askvortsov-categories.admin.help.child_bare_icon'),\n type: 'switch',\n })\n .registerSetting(() => )\n .registerSetting({\n setting: 'askvortsov-categories.small-forum-optimized',\n label: app.translator.trans('askvortsov-categories.admin.labels.small_forum_optimized'),\n type: 'switch',\n });\n\n extend(BasicsPage.prototype, 'homePageItems', (items) => {\n items.add('categories', {\n path: '/categories',\n label: app.translator.trans('askvortsov-categories.admin.basics.categories_label'),\n });\n });\n});\n"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack://@askvortsov/flarum-categories/webpack/bootstrap","webpack://@askvortsov/flarum-categories/external \"flarum.core.compat['common/extend']\"","webpack://@askvortsov/flarum-categories/external \"flarum.core.compat['admin/components/BasicsPage']\"","webpack://@askvortsov/flarum-categories/./src/admin/index.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","flarum","core","compat","app","initializers","add","extensionData","registerSetting","class","translator","trans","setting","label","type","help","extend","BasicsPage","items","path"],"mappings":"2BACE,IAAIA,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUC,QAGnC,IAAIC,EAASJ,EAAiBE,GAAY,CACzCG,EAAGH,EACHI,GAAG,EACHH,QAAS,IAUV,OANAI,EAAQL,GAAUM,KAAKJ,EAAOD,QAASC,EAAQA,EAAOD,QAASF,GAG/DG,EAAOE,GAAI,EAGJF,EAAOD,QA0Df,OArDAF,EAAoBQ,EAAIF,EAGxBN,EAAoBS,EAAIV,EAGxBC,EAAoBU,EAAI,SAASR,EAASS,EAAMC,GAC3CZ,EAAoBa,EAAEX,EAASS,IAClCG,OAAOC,eAAeb,EAASS,EAAM,CAAEK,YAAY,EAAMC,IAAKL,KAKhEZ,EAAoBkB,EAAI,SAAShB,GACX,oBAAXiB,QAA0BA,OAAOC,aAC1CN,OAAOC,eAAeb,EAASiB,OAAOC,YAAa,CAAEC,MAAO,WAE7DP,OAAOC,eAAeb,EAAS,aAAc,CAAEmB,OAAO,KAQvDrB,E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AMX,IAAIM,WAAWC,MAAM,sDAC3BG,KAAM,WAEPN,gBAAgB,CACfI,QAAS,uCACTC,MAAOT,IAAIM,WAAWC,MAAM,0DAC5BG,KAAM,WAEPN,iBAAgB,kBAAM,YAAQC,MAAM,qBAAqBL,IAAIM,WAAWC,MAAM,2DAC9EH,gBAAgB,CACfI,QAAS,2CACTC,MAAOT,IAAIM,WAAWC,MAAM,yDAC5BG,KAAM,WAEPN,gBAAgB,CACfI,QAAS,kDACTC,MAAOT,IAAIM,WAAWC,MAAM,gEAC5BG,KAAM,WAEPN,gBAAgB,CACfI,QAAS,4CACTC,MAAOT,IAAIM,WAAWC,MAAM,0DAC5BG,KAAM,WAEPN,gBAAgB,CACfI,QAAS,sDACTC,MAAOT,IAAIM,WAAWC,MAAM,oEAC5BG,KAAM,WAEPN,iBAAgB,kBAAM,YAAQC,MAAM,qBAAqBL,IAAIM,WAAWC,MAAM,0DAC9EH,gBAAgB,CACfI,QAAS,wCACTC,MAAOT,IAAIM,WAAWC,MAAM,sDAC5BI,KAAMX,IAAIM,WAAWC,MAAM,oDAC3BG,KAAM,WAEPN,iBAAgB,kBAAM,YAAQC,MAAM,qBAAqBL,IAAIM,WAAWC,MAAM,wDAC9EH,gBAAgB,CACfI,QAAS,8CACTC,MAAOT,IAAIM,WAAWC,MAAM,4DAC5BG,KAAM,WAGVE,iBAAOC,IAAWpB,UAAW,iBAAiB,SAACqB,GAC7CA,EAAMZ,IAAI,aAAc,CACtBa,KAAM,cACNN,MAAOT,IAAIM,WAAWC,MAAM","file":"admin.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 22);\n","module.exports = flarum.core.compat['common/extend'];","module.exports = flarum.core.compat['admin/components/BasicsPage'];","import { extend } from 'flarum/common/extend';\r\nimport BasicsPage from 'flarum/admin/components/BasicsPage';\r\n\r\napp.initializers.add('askvortsov/flarum-categories', () => {\r\n app.extensionData\r\n .for('askvortsov-categories')\r\n .registerSetting(() => , 10)\r\n .registerSetting(\r\n {\r\n setting: 'askvortsov-categories.keep-tags-nav',\r\n label: app.translator.trans('askvortsov-categories.admin.labels.keep_tags_nav'),\r\n type: 'switch',\r\n },\r\n 9\r\n )\r\n .registerSetting(() => )\r\n .registerSetting({\r\n setting: 'askvortsov-categories.full-page-desktop',\r\n label: app.translator.trans('askvortsov-categories.admin.labels.full_page_desktop'),\r\n help: app.translator.trans('askvortsov-categories.admin.help.full_page_desktop'),\r\n type: 'switch',\r\n })\r\n .registerSetting({\r\n setting: 'askvortsov-categories.compact-mobile',\r\n label: app.translator.trans('askvortsov-categories.admin.labels.compact_mobile_mode'),\r\n type: 'switch',\r\n })\r\n .registerSetting(() => )\r\n .registerSetting({\r\n setting: 'askvortsov-categories.parent-remove-icon',\r\n label: app.translator.trans('askvortsov-categories.admin.labels.parent_remove_icon'),\r\n type: 'switch',\r\n })\r\n .registerSetting({\r\n setting: 'askvortsov-categories.parent-remove-description',\r\n label: app.translator.trans('askvortsov-categories.admin.labels.parent_remove_description'),\r\n type: 'switch',\r\n })\r\n .registerSetting({\r\n setting: 'askvortsov-categories.parent-remove-stats',\r\n label: app.translator.trans('askvortsov-categories.admin.labels.parent_remove_stats'),\r\n type: 'switch',\r\n })\r\n .registerSetting({\r\n setting: 'askvortsov-categories.parent-remove-last-discussion',\r\n label: app.translator.trans('askvortsov-categories.admin.labels.parent_remove_last_discussion'),\r\n type: 'switch',\r\n })\r\n .registerSetting(() => )\r\n .registerSetting({\r\n setting: 'askvortsov-categories.child-bare-icon',\r\n label: app.translator.trans('askvortsov-categories.admin.labels.child_bare_icon'),\r\n help: app.translator.trans('askvortsov-categories.admin.help.child_bare_icon'),\r\n type: 'switch',\r\n })\r\n .registerSetting(() => )\r\n .registerSetting({\r\n setting: 'askvortsov-categories.small-forum-optimized',\r\n label: app.translator.trans('askvortsov-categories.admin.labels.small_forum_optimized'),\r\n type: 'switch',\r\n });\r\n\r\n extend(BasicsPage.prototype, 'homePageItems', (items) => {\r\n items.add('categories', {\r\n path: '/categories',\r\n label: app.translator.trans('askvortsov-categories.admin.basics.categories_label'),\r\n });\r\n });\r\n});\r\n"],"sourceRoot":""} \ No newline at end of file diff --git a/js/dist/forum.js b/js/dist/forum.js index 3b4293c..5eb1d51 100644 --- a/js/dist/forum.js +++ b/js/dist/forum.js @@ -1,2 +1,2 @@ -module.exports=function(t){var a={};function o(e){if(a[e])return a[e].exports;var s=a[e]={i:e,l:!1,exports:{}};return t[e].call(s.exports,s,s.exports,o),s.l=!0,s.exports}return o.m=t,o.c=a,o.d=function(t,a,e){o.o(t,a)||Object.defineProperty(t,a,{enumerable:!0,get:e})},o.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},o.t=function(t,a){if(1&a&&(t=o(t)),8&a)return t;if(4&a&&"object"==typeof t&&t&&t.__esModule)return t;var e=Object.create(null);if(o.r(e),Object.defineProperty(e,"default",{enumerable:!0,value:t}),2&a&&"string"!=typeof t)for(var s in t)o.d(e,s,function(a){return t[a]}.bind(null,s));return e},o.n=function(t){var a=t&&t.__esModule?function(){return t.default}:function(){return t};return o.d(a,"a",a),a},o.o=function(t,a){return Object.prototype.hasOwnProperty.call(t,a)},o.p="",o(o.s=21)}([function(t,a){t.exports=flarum.core.compat["common/extend"]},function(t,a){t.exports=flarum.core.compat["common/Component"]},function(t,a){t.exports=flarum.core.compat["forum/components/IndexPage"]},function(t,a){t.exports=flarum.core.compat["common/components/Link"]},function(t,a){t.exports=flarum.core.compat["common/helpers/icon"]},function(t,a){t.exports=flarum.core.compat["tags/utils/sortTags"]},function(t,a){t.exports=flarum.core.compat["common/utils/ItemList"]},function(t,a){t.exports=flarum.core.compat["common/components/LinkButton"]},function(t,a){t.exports=flarum.core.compat["common/Model"]},function(t,a){t.exports=flarum.core.compat["tags/models/Tag"]},function(t,a){t.exports=flarum.core.compat["common/components/Page"]},function(t,a){t.exports=flarum.core.compat["common/components/LoadingIndicator"]},function(t,a){t.exports=flarum.core.compat["forum/components/AffixedSidebar"]},function(t,a){t.exports=flarum.core.compat["common/helpers/listItems"]},function(t,a){t.exports=flarum.core.compat["tags/helpers/tagLabel"]},function(t,a){t.exports=flarum.core.compat["common/helpers/avatar"]},function(t,a){t.exports=flarum.core.compat["common/helpers/username"]},function(t,a){t.exports=flarum.core.compat["common/helpers/humanTime"]},function(t,a){t.exports=flarum.core.compat["common/utils/string"]},function(t,a){t.exports=flarum.core.compat["forum/components/UserCard"]},,function(t,a,o){"use strict";o.r(a);var e=o(0),s=o(2),r=o.n(s),n=o(7),i=o.n(n),c=o(8),u=o.n(c),l=o(9),p=o.n(l);function d(t,a){t.prototype=Object.create(a.prototype),t.prototype.constructor=t,t.__proto__=a}var f=o(10),g=o.n(f),h=o(11),v=o.n(h),C=o(12),y=o.n(C),b=o(13),T=o.n(b),x=o(5),w=o.n(x),k=o(14),D=o.n(k),P=o(1),L=o.n(P),_=o(3),I=o.n(_),N=o(4),M=o.n(N),S=o(6),A=o.n(S),j=function(t){function a(){return t.apply(this,arguments)||this}return d(a,t),a.prototype.view=function(){var t=app.forum.attribute("categories.compactMobile")&&window.innerWidth<767;return m("div",{class:"StatWidget"},m("div",{class:"StatWidget-count"},this.attrs.count),m("div",{class:"StatWidget-label"},t?M()(this.attrs.icon):this.attrs.label))},a}(L.a),O=o(15),U=o.n(O),B=o(16),R=o.n(B),W=o(17),V=o.n(W),z=o(18),E=o(19),q=o.n(E),F=function(t){function a(){return t.apply(this,arguments)||this}d(a,t);var o=a.prototype;return o.oninit=function(a){t.prototype.oninit.call(this,a),this.cardVisible=!1},o.view=function(){var t=this.attrs.discussion;if(!t)return m("div",{class:"LastDiscussion"},app.translator.trans("askvortsov-categories.forum.last_discussion_widget.no_discussions"));var a=t.lastPostedUser(),o="";return a&&this.cardVisible&&(o=q.a.component({user:a,className:"UserCard--popover",controlsButtonClassName:"Button Button--icon Button--flat"})),m(I.a,{class:"LastDiscussion",href:app.route.discussion(t)},m(I.a,{className:"LastDiscussion-avatar",href:a?app.route.user(a):"#"},U()(a)),m("div",{class:"LastDiscussion-content"},m("div",{class:"LastDiscussion-bottomRow"},V()(t.lastPostedAt())," ",m(I.a,{className:"LastDiscussion-usernameLink",href:a?app.route.user(a):"#"}," ","| ",R()(a))),m("div",{class:"LastDiscussion-topRow"},Object(z.truncate)(t.title(),26))),m("div",{class:"LastDiscussion-userCardContainer"},o))},o.oncreate=function(a){var o,e=this;t.prototype.oncreate.call(this,a),this.$().on("mouseover",".LastDiscussion-avatar, .LastDiscussion-usernameLinkUserCard, .username, .UserCard",(function(){clearTimeout(o),o=setTimeout(e.showCard.bind(e),300)})).on("mouseout",".LastDiscussion-avatar, .LastDiscussion-usernameLinkUserCard, .username, .UserCard",(function(){clearTimeout(o),o=setTimeout(e.hideCard.bind(e),150)}))},o.showCard=function(){var t=this;this.cardVisible=!0,m.redraw(),setTimeout((function(){return t.$(".UserCard").addClass("in")}))},o.hideCard=function(){$(".UserCard").removeClass("in"),this.cardVisible=!1,m.redraw()},a}(L.a),G=function(t){function a(){return t.apply(this,arguments)||this}d(a,t);var o=a.prototype;return o.oninit=function(a){t.prototype.oninit.call(this,a),this.tag=this.attrs.model,this.isChild=null!=this.attrs.parent&&null!=this.attrs.parent,this.collapsed=!1,window.addEventListener("resize",(function(){m.redraw()}))},o.view=function(){var t=this,o=this.tag;if(!o)return"";this.compactMobileMode=window.innerWidth<=767&&app.forum.attribute("categories.compactMobile");var e=this.isChild?[]:w()(o.children()||[]),s=this.isChild?{}:{backgroundColor:o.color()},r=["TagCategory","TagCategory-"+o.slug()];this.isChild?r.push("SubCategory"):r.push("ParentCategory"),this.compactMobileMode&&r.push("compactMobile");var n=(o.lastPostedDiscussion()?["TagCategory-lastDiscussion"]:["TagCategory-lastDiscussion empty"]).join(" "),i=!this.isChild&&this.compactMobileMode,c=m("ol",{className:"TagCategory-subTagList"},e.map((function(o){return[a.component({model:o,parent:t})]})));return m("li",{class:r.join(" ")},m(I.a,{class:"TagCategory-content TagCategory-content-"+o.slug(),style:s,href:app.route.tag(o)},m("div",{class:"TagCategory-alignStart"},m("div",{class:"TagCategory-alignStart-main"},m("span",{class:"TagCategory-icon"},this.iconItems().toArray()),m("div",{class:"TagCategory-main"},this.mainItems().toArray())),0==e.length?"":m("p",{class:"TagCategory-toggleArrow",onclick:function(a){t.toggleArrow(a)}},M()(this.collapsed?"fas fa-caret-down":"fas fa-caret-up"))),m("div",{class:"TagCategory-alignEnd"},m("div",{class:"TagCategory-stats StatWidgetList"},this.statItems().toArray()),m("div",{class:n},this.lastDiscussionItems().toArray())),i&&!this.collapsed?c:""),i||this.isChild?"":c)},o.iconItems=function(){var t=new A.a;if(this.tag.icon()&&this.isChild){var a={},o="fa-stack-1x CategoryIcon";app.forum.attribute("categories.childBareIcon")&&(a.color=this.tag.color(),o+=" NoBackgroundCategoryIcon");var e=this.compactMobileMode?"fa-stack fa-1x":"fa-stack fa-2x";t.add("icon",m("span",{class:e},app.forum.attribute("categories.childBareIcon")?"":m("i",{class:"fa fa-circle fa-stack-2x icon-background",style:{color:this.tag.color()}}),M()(this.tag.icon(),{className:o,style:a})),10)}else if(this.tag.icon()&&!app.forum.attribute("categories.parentRemoveIcon")){var s=this.compactMobileMode?"fa-stack fa-2x":"fa-stack fa-3x";t.add("icon",m("span",{class:s},M()(this.tag.icon(),{className:"fa-stack-1x CategoryIcon"})),10)}return t},o.mainItems=function(){var t=new A.a;return t.add("name",m("h4",{class:"TagCategory-name"},this.tag.name()),15),!this.tag.description()||!this.isChild&&app.forum.attribute("categories.parentRemoveDescription")||t.add("description",m("div",{class:"TagCategory-description"},this.tag.description()),10),t},o.statItems=function(){var t=new A.a;return!this.isChild&&app.forum.attribute("categories.parentRemoveStats")||(t.add("discussionCount",j.component({count:this.tag.discussionCount(),label:app.translator.trans("askvortsov-categories.forum.stat-widgets.discussion_label"),icon:"fas fa-file-alt"}),15),t.add("postCount",j.component({count:this.tag.postCount(),label:app.translator.trans("askvortsov-categories.forum.stat-widgets.post_label"),icon:"fas fa-comment"}),10)),t},o.lastDiscussionItems=function(){var t=new A.a;return!this.isChild&&app.forum.attribute("categories.parentRemoveLastDiscussion")||t.add("lastDiscussion",F.component({discussion:this.tag.lastPostedDiscussion()}),10),t},o.oncreate=function(a){t.prototype.oncreate.call(this,a),this.$(".TagCategory-content,.TagCategory-toggleArrow").bind("mouseenter",(function(t){$(this).addClass("hover"),($(this).parent().hasClass("SubCategory")||$(this).hasClass("TagCategory-toggleArrow"))&&$(this).closest(".ParentCategory").children(".TagCategory-content").removeClass("hover")})),this.$(".TagCategory-content,.TagCategory-toggleArrow").bind("mouseleave",(function(t){$(this).removeClass("hover"),($(this).parent().hasClass("SubCategory")||$(this).hasClass("TagCategory-toggleArrow"))&&$(this).closest(".ParentCategory").children(".TagCategory-content").addClass("hover")}))},o.toggleArrow=function(t){t.preventDefault(),t.stopPropagation(),this.collapsed=!this.collapsed,m.redraw()},a}(L.a),H=function(t){function a(){return t.apply(this,arguments)||this}d(a,t);var o=a.prototype;return o.oninit=function(a){var o=this;t.prototype.oninit.call(this,a),app.history.push("categories",app.translator.trans("askvortsov-category.forum.header.back_to_categories_tooltip")),this.tags=[];var e=app.preloadedApiDocument();e?this.tags=w()(e.filter((function(t){return!t.isChild()}))):(this.loading=!0,app.tagList.load(["children","lastPostedDiscussion","lastPostedDiscussion.lastPostedUser"]).then((function(){o.tags=w()(app.store.all("tags").filter((function(t){return!t.isChild()}))),o.loading=!1,m.redraw()})))},o.view=function(){if(this.loading)return m(v.a,null);var t=this.tags.filter((function(t){return null!==t.position()})),a=this.tags.filter((function(t){return null===t.position()})),o=app.forum.attribute("categories.fullPageDesktop")?["CategoriesPage","TagsPage"]:["CategoriesPage"];return m("div",{className:o.join(" ")},r.a.prototype.hero(),m("div",{className:"container"},m("div",{className:app.forum.attribute("categories.fullPageDesktop")?"":"sideNavContainer"},m(y.a,null,m("nav",{className:"CategoriesPage-nav TagsPage-nav IndexPage-nav sideNav"},m("ul",null,T()(r.a.prototype.sidebarItems().toArray())))),m("div",{className:"CategoriesPage-content sideNavOffset"},m("ol",{className:"TagCategoryList"},t.map((function(t){return G.component({model:t})}))),a.length?m("div",{className:"TagCloud"},a.map((function(t){return[D()(t,{link:!0})," "]}))):""))))},o.oncreate=function(a){t.prototype.oncreate.call(this,a),app.setTitle(app.translator.trans("askvortsov-categories.forum.all_categories.meta_title_text"))},a}(g.a);app.initializers.add("askvortsov/flarum-categories",(function(){app.routes.categories={path:"/categories",component:H},p.a.prototype.postCount=u.a.attribute("postCount"),Object(e.extend)(r.a.prototype,"navItems",(function(t){return t.has("tags")&&!app.forum.attribute("categories.keepTagsNav")&&t.remove("tags"),t.add("categories",m(i.a,{icon:"fas fa-th-list",href:app.route("categories")},app.translator.trans("askvortsov-categories.forum.index.categories_link")),-9.5),t.has("moreTags")&&t.replace("moreTags",m(i.a,{href:app.route("categories")},app.translator.trans("flarum-tags.forum.index.more_link"))),t})),Object(e.extend)(r.a.prototype,"sidebarItems",(function(t){if(app.current.matches(H)&&app.forum.attribute("categories.fullPageDesktop"))for(var a in t.items)"newDiscussion"!==a&&"nav"!==a&&t.remove(a);return t}))}))}]); +module.exports=function(t){var a={};function o(e){if(a[e])return a[e].exports;var s=a[e]={i:e,l:!1,exports:{}};return t[e].call(s.exports,s,s.exports,o),s.l=!0,s.exports}return o.m=t,o.c=a,o.d=function(t,a,e){o.o(t,a)||Object.defineProperty(t,a,{enumerable:!0,get:e})},o.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},o.t=function(t,a){if(1&a&&(t=o(t)),8&a)return t;if(4&a&&"object"==typeof t&&t&&t.__esModule)return t;var e=Object.create(null);if(o.r(e),Object.defineProperty(e,"default",{enumerable:!0,value:t}),2&a&&"string"!=typeof t)for(var s in t)o.d(e,s,function(a){return t[a]}.bind(null,s));return e},o.n=function(t){var a=t&&t.__esModule?function(){return t.default}:function(){return t};return o.d(a,"a",a),a},o.o=function(t,a){return Object.prototype.hasOwnProperty.call(t,a)},o.p="",o(o.s=21)}([function(t,a){t.exports=flarum.core.compat["common/extend"]},function(t,a){t.exports=flarum.core.compat["common/Component"]},function(t,a){t.exports=flarum.core.compat["forum/components/IndexPage"]},function(t,a){t.exports=flarum.core.compat["common/components/Link"]},function(t,a){t.exports=flarum.core.compat["common/helpers/icon"]},function(t,a){t.exports=flarum.core.compat["tags/utils/sortTags"]},function(t,a){t.exports=flarum.core.compat["common/utils/ItemList"]},function(t,a){t.exports=flarum.core.compat["common/components/LinkButton"]},function(t,a){t.exports=flarum.core.compat["common/Model"]},function(t,a){t.exports=flarum.core.compat["tags/models/Tag"]},function(t,a){t.exports=flarum.core.compat["common/components/Page"]},function(t,a){t.exports=flarum.core.compat["common/components/LoadingIndicator"]},function(t,a){t.exports=flarum.core.compat["forum/components/AffixedSidebar"]},function(t,a){t.exports=flarum.core.compat["common/helpers/listItems"]},function(t,a){t.exports=flarum.core.compat["tags/helpers/tagLabel"]},function(t,a){t.exports=flarum.core.compat["common/helpers/avatar"]},function(t,a){t.exports=flarum.core.compat["common/helpers/username"]},function(t,a){t.exports=flarum.core.compat["common/helpers/humanTime"]},function(t,a){t.exports=flarum.core.compat["common/utils/string"]},function(t,a){t.exports=flarum.core.compat["forum/components/UserCard"]},,function(t,a,o){"use strict";o.r(a);var e=o(0),s=o(2),r=o.n(s),n=o(7),i=o.n(n),c=o(8),u=o.n(c),l=o(9),p=o.n(l);function d(t,a){t.prototype=Object.create(a.prototype),t.prototype.constructor=t,t.__proto__=a}var f=o(10),g=o.n(f),h=o(11),v=o.n(h),C=o(12),y=o.n(C),b=o(13),T=o.n(b),x=o(5),w=o.n(x),k=o(14),D=o.n(k),P=o(1),L=o.n(P),_=o(3),I=o.n(_),N=o(4),M=o.n(N),S=o(6),A=o.n(S),j=function(t){function a(){return t.apply(this,arguments)||this}return d(a,t),a.prototype.view=function(){var t=app.forum.attribute("categories.compactMobile")&&window.innerWidth<767;return m("div",{class:"StatWidget"},m("div",{class:"StatWidget-count"},this.attrs.count),m("div",{class:"StatWidget-label"},t?M()(this.attrs.icon):this.attrs.label))},a}(L.a),O=o(15),U=o.n(O),B=o(16),R=o.n(B),W=o(17),V=o.n(W),z=o(18),E=o(19),q=o.n(E),F=function(t){function a(){return t.apply(this,arguments)||this}d(a,t);var o=a.prototype;return o.oninit=function(a){t.prototype.oninit.call(this,a),this.cardVisible=!1},o.view=function(){var t=this.attrs.discussion;if(!t)return m("div",{class:"LastDiscussion"},app.translator.trans("askvortsov-categories.forum.last_discussion_widget.no_discussions"));var a=t.lastPostedUser(),o="";return a&&this.cardVisible&&(o=q.a.component({user:a,className:"UserCard--popover",controlsButtonClassName:"Button Button--icon Button--flat"})),m(I.a,{class:"LastDiscussion",href:app.route.discussion(t,t.lastPostNumber())},m(I.a,{className:"LastDiscussion-avatar",href:a?app.route.user(a):"#"},U()(a)),m("div",{class:"LastDiscussion-content"},m("div",{class:"LastDiscussion-bottomRow"},V()(t.lastPostedAt())," ",m(I.a,{className:"LastDiscussion-usernameLink",href:a?app.route.user(a):"#"}," ","| ",R()(a))),m("div",{class:"LastDiscussion-topRow"},Object(z.truncate)(t.title(),26))),m("div",{class:"LastDiscussion-userCardContainer"},o))},o.oncreate=function(a){var o,e=this;t.prototype.oncreate.call(this,a),this.$().on("mouseover",".LastDiscussion-avatar, .LastDiscussion-usernameLinkUserCard, .username, .UserCard",(function(){clearTimeout(o),o=setTimeout(e.showCard.bind(e),300)})).on("mouseout",".LastDiscussion-avatar, .LastDiscussion-usernameLinkUserCard, .username, .UserCard",(function(){clearTimeout(o),o=setTimeout(e.hideCard.bind(e),150)}))},o.showCard=function(){var t=this;this.cardVisible=!0,m.redraw(),setTimeout((function(){return t.$(".UserCard").addClass("in")}))},o.hideCard=function(){$(".UserCard").removeClass("in"),this.cardVisible=!1,m.redraw()},a}(L.a),G=function(t){function a(){return t.apply(this,arguments)||this}d(a,t);var o=a.prototype;return o.oninit=function(a){t.prototype.oninit.call(this,a),this.tag=this.attrs.model,this.isChild=null!=this.attrs.parent&&null!=this.attrs.parent,this.collapsed=!1,window.addEventListener("resize",(function(){m.redraw()}))},o.view=function(){var t=this,o=this.tag;if(!o)return"";this.compactMobileMode=window.innerWidth<=767&&app.forum.attribute("categories.compactMobile");var e=this.isChild?[]:w()(o.children()||[]),s=this.isChild?{}:{backgroundColor:o.color()},r=["TagCategory","TagCategory-"+o.slug()];this.isChild?r.push("SubCategory"):r.push("ParentCategory"),this.compactMobileMode&&r.push("compactMobile");var n=(o.lastPostedDiscussion()?["TagCategory-lastDiscussion"]:["TagCategory-lastDiscussion empty"]).join(" "),i=!this.isChild&&this.compactMobileMode,c=m("ol",{className:"TagCategory-subTagList"},e.map((function(o){return[a.component({model:o,parent:t})]})));return m("li",{class:r.join(" ")},m(I.a,{class:"TagCategory-content TagCategory-content-"+o.slug(),style:s,href:app.route.tag(o)},m("div",{class:"TagCategory-alignStart"},m("div",{class:"TagCategory-alignStart-main"},m("span",{class:"TagCategory-icon"},this.iconItems().toArray()),m("div",{class:"TagCategory-main"},this.mainItems().toArray())),0==e.length?"":m("p",{class:"TagCategory-toggleArrow",onclick:function(a){t.toggleArrow(a)}},M()(this.collapsed?"fas fa-caret-down":"fas fa-caret-up"))),m("div",{class:"TagCategory-alignEnd"},m("div",{class:"TagCategory-stats StatWidgetList"},this.statItems().toArray()),m("div",{class:n},this.lastDiscussionItems().toArray())),i&&!this.collapsed?c:""),i||this.isChild?"":c)},o.iconItems=function(){var t=new A.a;if(this.tag.icon()&&this.isChild){var a={},o="fa-stack-1x CategoryIcon";app.forum.attribute("categories.childBareIcon")&&(a.color=this.tag.color(),o+=" NoBackgroundCategoryIcon");var e=this.compactMobileMode?"fa-stack fa-1x":"fa-stack fa-2x";t.add("icon",m("span",{class:e},app.forum.attribute("categories.childBareIcon")?"":m("i",{class:"fa fa-circle fa-stack-2x icon-background",style:{color:this.tag.color()}}),M()(this.tag.icon(),{className:o,style:a})),10)}else if(this.tag.icon()&&!app.forum.attribute("categories.parentRemoveIcon")){var s=this.compactMobileMode?"fa-stack fa-2x":"fa-stack fa-3x";t.add("icon",m("span",{class:s},M()(this.tag.icon(),{className:"fa-stack-1x CategoryIcon"})),10)}return t},o.mainItems=function(){var t=new A.a;return t.add("name",m("h4",{class:"TagCategory-name"},this.tag.name()),15),!this.tag.description()||!this.isChild&&app.forum.attribute("categories.parentRemoveDescription")||t.add("description",m("div",{class:"TagCategory-description"},this.tag.description()),10),t},o.statItems=function(){var t=new A.a;return!this.isChild&&app.forum.attribute("categories.parentRemoveStats")||(t.add("discussionCount",j.component({count:this.tag.discussionCount(),label:app.translator.trans("askvortsov-categories.forum.stat-widgets.discussion_label"),icon:"fas fa-file-alt"}),15),t.add("postCount",j.component({count:this.tag.postCount(),label:app.translator.trans("askvortsov-categories.forum.stat-widgets.post_label"),icon:"fas fa-comment"}),10)),t},o.lastDiscussionItems=function(){var t=new A.a;return!this.isChild&&app.forum.attribute("categories.parentRemoveLastDiscussion")||t.add("lastDiscussion",F.component({discussion:this.tag.lastPostedDiscussion()}),10),t},o.oncreate=function(a){t.prototype.oncreate.call(this,a),this.$(".TagCategory-content,.TagCategory-toggleArrow").bind("mouseenter",(function(t){$(this).addClass("hover"),($(this).parent().hasClass("SubCategory")||$(this).hasClass("TagCategory-toggleArrow"))&&$(this).closest(".ParentCategory").children(".TagCategory-content").removeClass("hover")})),this.$(".TagCategory-content,.TagCategory-toggleArrow").bind("mouseleave",(function(t){$(this).removeClass("hover"),($(this).parent().hasClass("SubCategory")||$(this).hasClass("TagCategory-toggleArrow"))&&$(this).closest(".ParentCategory").children(".TagCategory-content").addClass("hover")}))},o.toggleArrow=function(t){t.preventDefault(),t.stopPropagation(),this.collapsed=!this.collapsed,m.redraw()},a}(L.a),H=function(t){function a(){return t.apply(this,arguments)||this}d(a,t);var o=a.prototype;return o.oninit=function(a){var o=this;t.prototype.oninit.call(this,a),app.history.push("categories",app.translator.trans("askvortsov-category.forum.header.back_to_categories_tooltip")),this.tags=[];var e=app.preloadedApiDocument();e?this.tags=w()(e.filter((function(t){return!t.isChild()}))):(this.loading=!0,app.tagList.load(["children","lastPostedDiscussion","lastPostedDiscussion.lastPostedUser"]).then((function(){o.tags=w()(app.store.all("tags").filter((function(t){return!t.isChild()}))),o.loading=!1,m.redraw()})))},o.view=function(){if(this.loading)return m(v.a,null);var t=this.tags.filter((function(t){return null!==t.position()})),a=this.tags.filter((function(t){return null===t.position()})),o=app.forum.attribute("categories.fullPageDesktop")?["CategoriesPage","TagsPage"]:["CategoriesPage"];return m("div",{className:o.join(" ")},r.a.prototype.hero(),m("div",{className:"container"},m("div",{className:app.forum.attribute("categories.fullPageDesktop")?"":"sideNavContainer"},m(y.a,null,m("nav",{className:"CategoriesPage-nav TagsPage-nav IndexPage-nav sideNav"},m("ul",null,T()(r.a.prototype.sidebarItems().toArray())))),m("div",{className:"CategoriesPage-content sideNavOffset"},m("ol",{className:"TagCategoryList"},t.map((function(t){return G.component({model:t})}))),a.length?m("div",{className:"TagCloud"},a.map((function(t){return[D()(t,{link:!0})," "]}))):""))))},o.oncreate=function(a){t.prototype.oncreate.call(this,a),app.setTitle(app.translator.trans("askvortsov-categories.forum.all_categories.meta_title_text"))},a}(g.a);app.initializers.add("askvortsov/flarum-categories",(function(){app.routes.categories={path:"/categories",component:H},p.a.prototype.postCount=u.a.attribute("postCount"),Object(e.extend)(r.a.prototype,"navItems",(function(t){return t.has("tags")&&!app.forum.attribute("categories.keepTagsNav")&&t.remove("tags"),t.add("categories",m(i.a,{icon:"fas fa-th-list",href:app.route("categories")},app.translator.trans("askvortsov-categories.forum.index.categories_link")),-9.5),t.has("moreTags")&&t.replace("moreTags",m(i.a,{href:app.route("categories")},app.translator.trans("flarum-tags.forum.index.more_link"))),t})),Object(e.extend)(r.a.prototype,"sidebarItems",(function(t){if(app.current.matches(H)&&app.forum.attribute("categories.fullPageDesktop"))for(var a in t.items)"newDiscussion"!==a&&"nav"!==a&&t.remove(a);return t}))}))}]); //# sourceMappingURL=forum.js.map \ No newline at end of file diff --git a/js/dist/forum.js.map b/js/dist/forum.js.map index 4f55711..bf23fde 100644 --- a/js/dist/forum.js.map +++ b/js/dist/forum.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack://@askvortsov/flarum-categories/webpack/bootstrap","webpack://@askvortsov/flarum-categories/external \"flarum.core.compat['common/extend']\"","webpack://@askvortsov/flarum-categories/external \"flarum.core.compat['common/Component']\"","webpack://@askvortsov/flarum-categories/external \"flarum.core.compat['forum/components/IndexPage']\"","webpack://@askvortsov/flarum-categories/external \"flarum.core.compat['common/components/Link']\"","webpack://@askvortsov/flarum-categories/external \"flarum.core.compat['common/helpers/icon']\"","webpack://@askvortsov/flarum-categories/external \"flarum.core.compat['tags/utils/sortTags']\"","webpack://@askvortsov/flarum-categories/external \"flarum.core.compat['common/utils/ItemList']\"","webpack://@askvortsov/flarum-categories/external \"flarum.core.compat['common/components/LinkButton']\"","webpack://@askvortsov/flarum-categories/external \"flarum.core.compat['common/Model']\"","webpack://@askvortsov/flarum-categories/external \"flarum.core.compat['tags/models/Tag']\"","webpack://@askvortsov/flarum-categories/external \"flarum.core.compat['common/components/Page']\"","webpack://@askvortsov/flarum-categories/external \"flarum.core.compat['common/components/LoadingIndicator']\"","webpack://@askvortsov/flarum-categories/external \"flarum.core.compat['forum/components/AffixedSidebar']\"","webpack://@askvortsov/flarum-categories/external \"flarum.core.compat['common/helpers/listItems']\"","webpack://@askvortsov/flarum-categories/external \"flarum.core.compat['tags/helpers/tagLabel']\"","webpack://@askvortsov/flarum-categories/external \"flarum.core.compat['common/helpers/avatar']\"","webpack://@askvortsov/flarum-categories/external \"flarum.core.compat['common/helpers/username']\"","webpack://@askvortsov/flarum-categories/external \"flarum.core.compat['common/helpers/humanTime']\"","webpack://@askvortsov/flarum-categories/external \"flarum.core.compat['common/utils/string']\"","webpack://@askvortsov/flarum-categories/external \"flarum.core.compat['forum/components/UserCard']\"","webpack://@askvortsov/flarum-categories/./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js","webpack://@askvortsov/flarum-categories/./src/forum/components/StatWidget.js","webpack://@askvortsov/flarum-categories/./src/forum/components/LastDiscussionWidget.js","webpack://@askvortsov/flarum-categories/./src/forum/components/Category.js","webpack://@askvortsov/flarum-categories/./src/forum/components/CategoriesPage.js","webpack://@askvortsov/flarum-categories/./src/forum/index.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","flarum","core","compat","_inheritsLoose","subClass","superClass","constructor","__proto__","StatWidget","view","compactMobile","app","forum","attribute","window","innerWidth","class","this","attrs","count","icon","label","Component","LastDiscussionWidget","oninit","vnode","cardVisible","discussion","translator","trans","user","lastPostedUser","card","UserCard","component","className","controlsButtonClassName","href","route","avatar","humanTime","lastPostedAt","username","truncate","title","oncreate","timeout","$","on","clearTimeout","setTimeout","showCard","hideCard","redraw","addClass","removeClass","Category","tag","model","isChild","parent","undefined","collapsed","addEventListener","compactMobileMode","children","sortTags","cardStyle","backgroundColor","color","classNames","slug","push","lastDiscussionClassNames","lastPostedDiscussion","join","childrenInContent","renderedChildren","map","child","style","iconItems","toArray","mainItems","length","onclick","e","toggleArrow","statItems","lastDiscussionItems","items","ItemList","iconClasses","classes","add","description","discussionCount","postCount","hasClass","closest","preventDefault","stopPropagation","CategoriesPage","history","tags","preloaded","preloadedApiDocument","filter","loading","tagList","load","then","store","all","pinned","position","cloud","IndexPage","hero","listItems","sidebarItems","tagLabel","link","setTitle","Page","initializers","routes","categories","path","Tag","Model","extend","has","remove","replace","current","matches","item"],"mappings":"2BACE,IAAIA,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUC,QAGnC,IAAIC,EAASJ,EAAiBE,GAAY,CACzCG,EAAGH,EACHI,GAAG,EACHH,QAAS,IAUV,OANAI,EAAQL,GAAUM,KAAKJ,EAAOD,QAASC,EAAQA,EAAOD,QAASF,GAG/DG,EAAOE,GAAI,EAGJF,EAAOD,QA0Df,OArDAF,EAAoBQ,EAAIF,EAGxBN,EAAoBS,EAAIV,EAGxBC,EAAoBU,EAAI,SAASR,EAASS,EAAMC,GAC3CZ,EAAoBa,EAAEX,EAASS,IAClCG,OAAOC,eAAeb,EAASS,EAAM,CAAEK,YAAY,EAAMC,IAAKL,KAKhEZ,EAAoBkB,EAAI,SAAShB,GACX,oBAAXiB,QAA0BA,OAAOC,aAC1CN,OAAOC,eAAeb,EAASiB,OAAOC,YAAa,CAAEC,MAAO,WAE7DP,OAAOC,eAAeb,EAAS,aAAc,CAAEmB,OAAO,KAQvDrB,EAAoBsB,EAAI,SAASD,EAAOE,GAEvC,GADU,EAAPA,IAAUF,EAAQrB,EAAoBqB,IAC/B,EAAPE,EAAU,OAAOF,EACpB,GAAW,EAAPE,GAA8B,iBAAVF,GAAsBA,GAASA,EAAMG,WAAY,OAAOH,EAChF,IAAII,EAAKX,OAAOY,OAAO,MAGvB,GAFA1B,EAAoBkB,EAAEO,GACtBX,OAAOC,eAAeU,EAAI,UAAW,CAAET,YAAY,EAAMK,MAAOA,IACtD,EAAPE,GAA4B,iBAATF,EAAmB,IAAI,IAAIM,KAAON,EAAOrB,EAAoBU,EAAEe,EAAIE,EAAK,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AU8F,GACpD,GAAI/E,IAAI4H,QAAQC,QAAQlC,IAAmB3F,IAAIC,MAAMC,UAAU,8BAC7D,IAAK,IAAM4H,KAAQ/C,EAAMA,MACV,kBAAT+C,GAAqC,QAATA,GAC9B/C,EAAM2C,OAAOI,GAInB,OAAO/C","file":"forum.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 21);\n","module.exports = flarum.core.compat['common/extend'];","module.exports = flarum.core.compat['common/Component'];","module.exports = flarum.core.compat['forum/components/IndexPage'];","module.exports = flarum.core.compat['common/components/Link'];","module.exports = flarum.core.compat['common/helpers/icon'];","module.exports = flarum.core.compat['tags/utils/sortTags'];","module.exports = flarum.core.compat['common/utils/ItemList'];","module.exports = flarum.core.compat['common/components/LinkButton'];","module.exports = flarum.core.compat['common/Model'];","module.exports = flarum.core.compat['tags/models/Tag'];","module.exports = flarum.core.compat['common/components/Page'];","module.exports = flarum.core.compat['common/components/LoadingIndicator'];","module.exports = flarum.core.compat['forum/components/AffixedSidebar'];","module.exports = flarum.core.compat['common/helpers/listItems'];","module.exports = flarum.core.compat['tags/helpers/tagLabel'];","module.exports = flarum.core.compat['common/helpers/avatar'];","module.exports = flarum.core.compat['common/helpers/username'];","module.exports = flarum.core.compat['common/helpers/humanTime'];","module.exports = flarum.core.compat['common/utils/string'];","module.exports = flarum.core.compat['forum/components/UserCard'];","export default function _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n subClass.__proto__ = superClass;\n}","import Component from 'flarum/common/Component';\nimport icon from 'flarum/common/helpers/icon';\n\nexport default class StatWidget extends Component {\n view() {\n const compactMobile = app.forum.attribute('categories.compactMobile') && window.innerWidth < 767;\n return (\n
{\n this.toggleArrow(e);\n }}\n >\n {icon(this.collapsed ? 'fas fa-caret-down' : 'fas fa-caret-up')}\n
\n )}\n{\r\n this.toggleArrow(e);\r\n }}\r\n >\r\n {icon(this.collapsed ? 'fas fa-caret-down' : 'fas fa-caret-up')}\r\n
\r\n )}\r\n