From 304a6f79c45d9f5df343e6831cc4f6e3a2bb85a6 Mon Sep 17 00:00:00 2001 From: flarum-bot Date: Thu, 28 Sep 2023 11:15:26 +0000 Subject: [PATCH] Bundled output for commit 4428fd262311f721f3647f213c2493fddb7deb21 Includes transpiled JS/TS, and Typescript declaration files (typings). [skip ci] --- js/dist/admin.js.map | 2 +- js/dist/forum.js | 2 +- js/dist/forum.js.map | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/js/dist/admin.js.map b/js/dist/admin.js.map index 4590e16..e06d9d2 100644 --- a/js/dist/admin.js.map +++ b/js/dist/admin.js.map @@ -1 +1 @@ -{"version":3,"file":"admin.js","mappings":"MACA,IAAIA,EAAsB,CCA1BA,EAAyBC,IACxB,IAAIC,EAASD,GAAUA,EAAOE,WAC7B,IAAOF,EAAiB,QACxB,IAAM,EAEP,OADAD,EAAoBI,EAAEF,EAAQ,CAAEG,EAAGH,IAC5BA,CAAM,ECLdF,EAAwB,CAACM,EAASC,KACjC,IAAI,IAAIC,KAAOD,EACXP,EAAoBS,EAAEF,EAAYC,KAASR,EAAoBS,EAAEH,EAASE,IAC5EE,OAAOC,eAAeL,EAASE,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,IAE1E,ECNDR,EAAwB,CAACc,EAAKC,IAAUL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,GCClFf,EAAyBM,IACH,oBAAXa,QAA0BA,OAAOC,aAC1CV,OAAOC,eAAeL,EAASa,OAAOC,YAAa,CAAEC,MAAO,WAE7DX,OAAOC,eAAeL,EAAS,aAAc,CAAEe,OAAO,GAAO,G,oDCL9D,MAAM,EAA+BC,OAAOC,KAAKC,OAAO,a,aCAxD,MAAM,EAA+BF,OAAOC,KAAKC,OAAO,c,ICEpDC,E,SAEJ,iBAAgBC,GAAD,OACbD,IACCA,EAAO,CAAC,OAAQ,QAAQE,QAAO,SAAClB,EAAGD,GAGlC,OAFAC,EAAED,GAAOoB,IAAAA,WAAAA,MAAA,mBAAwCF,EAAxC,cAA6DlB,EAA7D,UAEFC,CACR,GAAE,CAAC,GANN,ECDAmB,IAAAA,aAAAA,IAAqB,mBAAmB,WACtCA,IAAAA,cAAAA,IAAsB,mBAAmBC,gBAAgB,CACvDC,QAAS,yCACTC,QAASC,EAAqB,kBAC9BC,KAAM,SACNC,MAAON,IAAAA,WAAAA,MAAqB,+DAC5BO,QAAS,OACTC,UAAU,GAEb,ICVM,IAAMC,EAAQ,CACnBL,qBAAAA,E","sources":["webpack://@fof/follow-tags/webpack/bootstrap","webpack://@fof/follow-tags/webpack/runtime/compat get default export","webpack://@fof/follow-tags/webpack/runtime/define property getters","webpack://@fof/follow-tags/webpack/runtime/hasOwnProperty shorthand","webpack://@fof/follow-tags/webpack/runtime/make namespace object","webpack://@fof/follow-tags/external root \"flarum.core.compat['admin/app']\"","webpack://@fof/follow-tags/external root \"flarum.core.compat['common/app']\"","webpack://@fof/follow-tags/./src/common/utils/followingPageOptions.js","webpack://@fof/follow-tags/./src/admin/index.ts","webpack://@fof/follow-tags/./src/common/index.ts"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['admin/app'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/app'];","import app from 'flarum/common/app';\n\nlet opts;\n\nexport default (section) =>\n opts ||\n (opts = ['none', 'tags'].reduce((o, key) => {\n o[key] = app.translator.trans(`fof-follow-tags.${section}.following_${key}_label`);\n\n return o;\n }, {}));\n","import app from 'flarum/admin/app';\nimport followingPageOptions from '../common/utils/followingPageOptions';\n\napp.initializers.add('fof/follow-tags', () => {\n app.extensionData.for('fof-follow-tags').registerSetting({\n setting: 'fof-follow-tags.following_page_default',\n options: followingPageOptions('admin.settings'),\n type: 'select',\n label: app.translator.trans('fof-follow-tags.admin.settings.following_page_default_label'),\n default: 'none',\n required: true,\n });\n});\n","import followingPageOptions from './utils/followingPageOptions';\n\nexport const utils = {\n followingPageOptions,\n};\n"],"names":["__webpack_require__","module","getter","__esModule","d","a","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","flarum","core","compat","opts","section","reduce","app","registerSetting","setting","options","followingPageOptions","type","label","default","required","utils"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"admin.js","mappings":"MACA,IAAIA,EAAsB,CCA1BA,EAAyBC,IACxB,IAAIC,EAASD,GAAUA,EAAOE,WAC7B,IAAOF,EAAiB,QACxB,IAAM,EAEP,OADAD,EAAoBI,EAAEF,EAAQ,CAAEG,EAAGH,IAC5BA,CAAM,ECLdF,EAAwB,CAACM,EAASC,KACjC,IAAI,IAAIC,KAAOD,EACXP,EAAoBS,EAAEF,EAAYC,KAASR,EAAoBS,EAAEH,EAASE,IAC5EE,OAAOC,eAAeL,EAASE,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,IAE1E,ECNDR,EAAwB,CAACc,EAAKC,IAAUL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,GCClFf,EAAyBM,IACH,oBAAXa,QAA0BA,OAAOC,aAC1CV,OAAOC,eAAeL,EAASa,OAAOC,YAAa,CAAEC,MAAO,WAE7DX,OAAOC,eAAeL,EAAS,aAAc,CAAEe,OAAO,GAAO,G,oDCL9D,MAAM,EAA+BC,OAAOC,KAAKC,OAAO,a,aCAxD,MAAM,EAA+BF,OAAOC,KAAKC,OAAO,c,ICEpDC,E,SAEJ,iBAAgBC,GAAD,OACbD,IACCA,EAAO,CAAC,OAAQ,QAAQE,QAAO,SAAClB,EAAGD,GAGlC,OAFAC,EAAED,GAAOoB,IAAAA,WAAeC,MAAf,mBAAwCH,EAAxC,cAA6DlB,EAA7D,UAEFC,CACR,GAAE,CAAC,GANN,ECDAmB,IAAAA,aAAiBE,IAAI,mBAAmB,WACtCF,IAAAA,cAAA,IAAsB,mBAAmBG,gBAAgB,CACvDC,QAAS,yCACTC,QAASC,EAAqB,kBAC9BC,KAAM,SACNC,MAAOR,IAAAA,WAAeC,MAAM,+DAC5BQ,QAAS,OACTC,UAAU,GAEb,ICVM,IAAMC,EAAQ,CACnBL,qBAAAA,E","sources":["webpack://@fof/follow-tags/webpack/bootstrap","webpack://@fof/follow-tags/webpack/runtime/compat get default export","webpack://@fof/follow-tags/webpack/runtime/define property getters","webpack://@fof/follow-tags/webpack/runtime/hasOwnProperty shorthand","webpack://@fof/follow-tags/webpack/runtime/make namespace object","webpack://@fof/follow-tags/external root \"flarum.core.compat['admin/app']\"","webpack://@fof/follow-tags/external root \"flarum.core.compat['common/app']\"","webpack://@fof/follow-tags/./src/common/utils/followingPageOptions.js","webpack://@fof/follow-tags/./src/admin/index.ts","webpack://@fof/follow-tags/./src/common/index.ts"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['admin/app'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/app'];","import app from 'flarum/common/app';\n\nlet opts;\n\nexport default (section) =>\n opts ||\n (opts = ['none', 'tags'].reduce((o, key) => {\n o[key] = app.translator.trans(`fof-follow-tags.${section}.following_${key}_label`);\n\n return o;\n }, {}));\n","import app from 'flarum/admin/app';\nimport followingPageOptions from '../common/utils/followingPageOptions';\n\napp.initializers.add('fof/follow-tags', () => {\n app.extensionData.for('fof-follow-tags').registerSetting({\n setting: 'fof-follow-tags.following_page_default',\n options: followingPageOptions('admin.settings'),\n type: 'select',\n label: app.translator.trans('fof-follow-tags.admin.settings.following_page_default_label'),\n default: 'none',\n required: true,\n });\n});\n","import followingPageOptions from './utils/followingPageOptions';\n\nexport const utils = {\n followingPageOptions,\n};\n"],"names":["__webpack_require__","module","getter","__esModule","d","a","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","flarum","core","compat","opts","section","reduce","app","trans","add","registerSetting","setting","options","followingPageOptions","type","label","default","required","utils"],"sourceRoot":""} \ No newline at end of file diff --git a/js/dist/forum.js b/js/dist/forum.js index 6d0a94b..665e161 100644 --- a/js/dist/forum.js +++ b/js/dist/forum.js @@ -1,2 +1,2 @@ -(()=>{var o={n:t=>{var n=t&&t.__esModule?()=>t.default:()=>t;return o.d(n,{a:n}),n},d:(t,n)=>{for(var s in n)o.o(n,s)&&!o.o(t,s)&&Object.defineProperty(t,s,{enumerable:!0,get:n[s]})},o:(o,t)=>Object.prototype.hasOwnProperty.call(o,t),r:o=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(o,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(o,"__esModule",{value:!0})}},t={};(()=>{"use strict";o.r(t),o.d(t,{components:()=>io,utils:()=>lo});const n=flarum.core.compat["forum/app"];var s=o.n(n);const r=flarum.core.compat["common/extend"],e=flarum.core.compat["forum/components/NotificationGrid"];var i=o.n(e);const a=flarum.core.compat["common/Model"];var l=o.n(a);const c=flarum.core.compat["forum/components/IndexPage"];var u=o.n(c);function f(o,t){return f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,t){return o.__proto__=t,o},f(o,t)}function p(o,t){o.prototype=Object.create(t.prototype),o.prototype.constructor=o,f(o,t)}const g=flarum.core.compat["common/components/Dropdown"];var d=o.n(g);const b=flarum.core.compat["common/components/Button"];var w=o.n(b);const h=flarum.core.compat["common/components/Tooltip"];var _=o.n(h);const v=flarum.core.compat["common/helpers/icon"];var y=o.n(v);const T=flarum.core.compat["common/utils/classList"];var S=o.n(T);const x=flarum.core.compat["common/utils/extractText"];var P=o.n(x);const N=flarum.core.compat["common/utils/Stream"];var D=o.n(N);const k=flarum.core.compat["common/Component"];var O,I=o.n(k),j=function(o){function t(){return o.apply(this,arguments)||this}return p(t,o),t.prototype.view=function(){var o={onclick:this.attrs.onclick,disabled:this.attrs.disabled};return m("button",Object.assign({className:S()("SubscriptionMenuItem","hasIcon",this.attrs.disabled&&"disabled")},o),this.attrs.active?y()("fas fa-check",{className:"Button-icon"}):"",m("span",{className:"SubscriptionMenuItem-label"},y()(this.attrs.icon,{className:"Button-icon"}),m("strong",null,this.attrs.label),m("span",{className:"SubscriptionMenuItem-description"},this.attrs.description)))},t}(I());const M=((O={})[!1]="fas fa-star",O.follow="fas fa-star",O.lurk="fas fa-comments",O.ignore="fas fa-bell-slash",O.hide="fas fa-eye-slash",O);var B=function(o){function t(){return o.apply(this,arguments)||this}p(t,o);var n=t.prototype;return n.oninit=function(t){o.prototype.oninit.call(this,t),this.loading=D()(!1),this.canShowTooltip=D()(!1),this.options=[{subscription:!1,icon:M.false,label:s().translator.trans("fof-follow-tags.forum.sub_controls.not_following_button"),description:s().translator.trans("fof-follow-tags.forum.sub_controls.not_following_text")},{subscription:"follow",icon:M.follow,label:s().translator.trans("fof-follow-tags.forum.sub_controls.following_button"),description:s().translator.trans("fof-follow-tags.forum.sub_controls.following_text")},{subscription:"lurk",icon:M.lurk,label:s().translator.trans("fof-follow-tags.forum.sub_controls.lurking_button"),description:s().translator.trans("fof-follow-tags.forum.sub_controls.lurking_text")},{subscription:"ignore",icon:M.ignore,label:s().translator.trans("fof-follow-tags.forum.sub_controls.ignoring_button"),description:s().translator.trans("fof-follow-tags.forum.sub_controls.ignoring_text")},{subscription:"hide",icon:M.hide,label:s().translator.trans("fof-follow-tags.forum.sub_controls.hiding_button"),description:s().translator.trans("fof-follow-tags.forum.sub_controls.hiding_text")}]},n.onbeforeupdate=function(t){o.prototype.onbeforeupdate.call(this,t);var n=this.attrs.model.subscription()||!1,r=s().session.user.preferences(),e=r.notify_newPostInTag_email,i=r.notify_newPostInTag_alert;(e||i)&&!1===n?this.canShowTooltip(void 0):this.canShowTooltip(!1)},n.view=function(){var o=this,t=this.attrs.model,n=t.subscription()||!1,r=s().translator.trans("fof-follow-tags.forum.sub_controls.follow_button"),e=M[n]||"far fa-star",i="SubscriptionMenu-button--"+n;if(["follow","lurk","ignore","hide"].includes(n)){var a=["ignore","hide"].includes(n)?n.slice(0,n.length-1):n;r=s().translator.trans("fof-follow-tags.forum.sub_controls."+a+"ing_button")}var l=s().session.user.preferences().notify_newPostInTag_email,c=P()(s().translator.trans(l?"fof-follow-tags.forum.sub_controls.notify_email_tooltip":"fof-follow-tags.forum.sub_controls.notify_alert_tooltip"));return m("div",{className:"Dropdown ButtonGroup SubscriptionMenu App-primaryControl"},m(_(),{text:"boolean"==typeof this.canShowTooltip()?"":c,tooltipVisible:this.canShowTooltip(),position:"bottom",delay:250},w().component({className:"Button SubscriptionMenu-button "+i,icon:e,onclick:this.saveSubscription.bind(this,t,!["follow","lurk","ignore","hide"].includes(n)&&"follow"),loading:this.loading()},r)),m("button",{className:S()("Dropdown-toggle","Button","Button--icon",i),"data-toggle":"dropdown"},y()("fas fa-caret-down",{className:"Button-icon"})),m("ul",{className:"Dropdown-menu dropdown-menu Dropdown-menu--right"},this.options.map((function(s){return s.onclick=o.saveSubscription.bind(o,t,s.subscription),s.active=n===s.subscription,s.disabled="hide"===s.subscription&&t.isHidden(),m("li",null,j.component(s))}))))},n.saveSubscription=function(o,t){var n=this;this.loading(!0),s().request({url:s().forum.attribute("apiUrl")+"/tags/"+o.id()+"/subscription",method:"POST",body:{data:{subscription:t}}}).then((function(o){return s().store.pushPayload(o)})).then((function(){n.loading(!1),m.redraw()})),this.canShowTooltip(!1)},t}(d());const C=flarum.core.compat["forum/states/DiscussionListState"];var F=o.n(C);const U=function(){return"flarum-subscriptions"in flarum.extensions&&m.route.get().includes(s().route("following"))},q=flarum.core.compat["common/app"];var z,A=o.n(q);const G=function(o){return z||(z=["none","tags"].reduce((function(t,n){return t[n]=A().translator.trans("fof-follow-tags."+o+".following_"+n+"_label"),t}),{}))};var L,H=function(){return L||(L=G("forum.index.following")),L},V=function(){H();var o=s().data["fof-follow-tags.following_page_default"];if(L[o]||(o=null),s().session.user){var t=s().session.user.preferences().followTagsPageDefault;L[t]&&(o=t)}return o||"none"},E=function(o){function t(){return o.apply(this,arguments)||this}p(t,o);var n=t.prototype;return n.view=function(){var o=s().discussions.followTags,t=this.options();return d().component({buttonClassName:"Button",label:t[o]||V()},Object.keys(t).map((function(n){var r=n===o;return w().component({active:r,icon:!r||"fas fa-check",onclick:function(){s().discussions.followTags=n,s().discussions.refresh()}},t[n])})))},n.options=function(){return H()},t}(I());const J=flarum.core.compat["forum/components/Notification"];var K=o.n(J),Q=function(o){function t(){return o.apply(this,arguments)||this}p(t,o);var n=t.prototype;return n.icon=function(){return"fas fa-user-tag"},n.href=function(){var o=this.attrs.notification.subject();return s().route.discussion(o)},n.content=function(){return s().translator.trans("fof-follow-tags.forum.notifications.new_discussion_text",{user:this.attrs.notification.fromUser(),title:this.attrs.notification.subject().title()})},n.excerpt=function(){return null},t}(K()),R=function(o){function t(){return o.apply(this,arguments)||this}p(t,o);var n=t.prototype;return n.icon=function(){return M.lurk},n.href=function(){var o=this.attrs.notification,t=o.subject(),n=o.content()||{};return s().route.discussion(t,n.postNumber)},n.content=function(){return s().translator.trans("fof-follow-tags.forum.notifications.new_post_text",{user:this.attrs.notification.fromUser()})},n.excerpt=function(){return null},t}(K()),W=function(o){function t(){return o.apply(this,arguments)||this}p(t,o);var n=t.prototype;return n.icon=function(){return"fas fa-user-tag"},n.href=function(){var o=this.attrs.notification.subject();return s().route.discussion(o)},n.content=function(){return s().translator.trans("fof-follow-tags.forum.notifications.new_discussion_tag_text",{user:this.attrs.notification.fromUser(),title:this.attrs.notification.subject().title()})},n.excerpt=function(){return null},t}(K());const X=flarum.core.compat["common/models/Discussion"];var Y=o.n(X);const Z=flarum.core.compat["common/components/Badge"];var $=o.n(Z);const oo=flarum.core.compat["forum/components/SettingsPage"];var to=o.n(oo);const no=flarum.core.compat["common/components/FieldSet"];var so=o.n(no);const ro=flarum.core.compat["common/components/Select"];var eo=o.n(ro),io={FollowingPageFilterDropdown:E,NewDiscussionNotification:Q,NewDiscussionTagNotification:W,NewPostNotification:R,SubscriptionMenu:B,SubscriptionMenuItem:j};function ao(){return ao=Object.assign?Object.assign.bind():function(o){for(var t=1;t{var t={n:o=>{var n=o&&o.__esModule?()=>o.default:()=>o;return t.d(n,{a:n}),n},d:(o,n)=>{for(var s in n)t.o(n,s)&&!t.o(o,s)&&Object.defineProperty(o,s,{enumerable:!0,get:n[s]})},o:(t,o)=>Object.prototype.hasOwnProperty.call(t,o),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},o={};(()=>{"use strict";t.r(o),t.d(o,{components:()=>ft,utils:()=>x});const n=flarum.core.compat["forum/app"];var s=t.n(n);const i=flarum.core.compat["common/extend"],r=flarum.core.compat["common/Model"];var e=t.n(r);const a=flarum.core.compat["forum/components/IndexPage"];var c=t.n(a);function l(){return l=Object.assign?Object.assign.bind():function(t){for(var o=1;o {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/app'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/extend'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/NotificationGrid'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/Model'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/IndexPage'];","export default function _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n return _setPrototypeOf(o, p);\n}","import setPrototypeOf from \"./setPrototypeOf.js\";\nexport default function _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n setPrototypeOf(subClass, superClass);\n}","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Dropdown'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Button'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Tooltip'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/helpers/icon'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/classList'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/extractText'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/Stream'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/Component'];","import Component from 'flarum/common/Component';\nimport icon from 'flarum/common/helpers/icon';\nimport classList from 'flarum/common/utils/classList';\n\nexport default class SubscriptionMenuItem extends Component {\n view() {\n const attrs = {\n onclick: this.attrs.onclick,\n disabled: this.attrs.disabled,\n };\n\n return (\n \n );\n }\n}\n","export default {\n [false]: 'fas fa-star',\n follow: 'fas fa-star',\n lurk: 'fas fa-comments',\n ignore: 'fas fa-bell-slash',\n hide: 'fas fa-eye-slash',\n};\n","import app from 'flarum/forum/app';\nimport Dropdown from 'flarum/common/components/Dropdown';\nimport Button from 'flarum/common/components/Button';\nimport Tooltip from 'flarum/common/components/Tooltip';\nimport icon from 'flarum/common/helpers/icon';\nimport classList from 'flarum/common/utils/classList';\nimport extractText from 'flarum/common/utils/extractText';\nimport Stream from 'flarum/common/utils/Stream';\n\nimport SubscriptionMenuItem from './SubscriptionMenuItem';\nimport icons from '../icons';\n\nexport default class SubscriptionMenu extends Dropdown {\n oninit(vnode) {\n super.oninit(vnode);\n\n this.loading = Stream(false);\n this.canShowTooltip = Stream(false);\n\n this.options = [\n {\n subscription: false,\n icon: icons[false],\n label: app.translator.trans('fof-follow-tags.forum.sub_controls.not_following_button'),\n description: app.translator.trans('fof-follow-tags.forum.sub_controls.not_following_text'),\n },\n {\n subscription: 'follow',\n icon: icons.follow,\n label: app.translator.trans('fof-follow-tags.forum.sub_controls.following_button'),\n description: app.translator.trans('fof-follow-tags.forum.sub_controls.following_text'),\n },\n {\n subscription: 'lurk',\n icon: icons.lurk,\n label: app.translator.trans('fof-follow-tags.forum.sub_controls.lurking_button'),\n description: app.translator.trans('fof-follow-tags.forum.sub_controls.lurking_text'),\n },\n {\n subscription: 'ignore',\n icon: icons.ignore,\n label: app.translator.trans('fof-follow-tags.forum.sub_controls.ignoring_button'),\n description: app.translator.trans('fof-follow-tags.forum.sub_controls.ignoring_text'),\n },\n {\n subscription: 'hide',\n icon: icons.hide,\n label: app.translator.trans('fof-follow-tags.forum.sub_controls.hiding_button'),\n description: app.translator.trans('fof-follow-tags.forum.sub_controls.hiding_text'),\n },\n ];\n }\n\n onbeforeupdate(vnode) {\n super.onbeforeupdate(vnode);\n\n const tag = this.attrs.model;\n const subscription = tag.subscription() || false;\n\n const preferences = app.session.user.preferences();\n const notifyEmail = preferences['notify_newPostInTag_email'];\n const notifyAlert = preferences['notify_newPostInTag_alert'];\n\n if ((notifyEmail || notifyAlert) && subscription === false) {\n this.canShowTooltip(undefined);\n } else {\n this.canShowTooltip(false);\n }\n }\n\n view() {\n const tag = this.attrs.model;\n const subscription = tag.subscription() || false;\n\n let buttonLabel = app.translator.trans('fof-follow-tags.forum.sub_controls.follow_button');\n let buttonIcon = icons[subscription] || 'far fa-star';\n const buttonClass = 'SubscriptionMenu-button--' + subscription;\n\n if (['follow', 'lurk', 'ignore', 'hide'].includes(subscription)) {\n const word = ['ignore', 'hide'].includes(subscription) ? subscription.slice(0, subscription.length - 1) : subscription;\n\n buttonLabel = app.translator.trans(`fof-follow-tags.forum.sub_controls.${word}ing_button`);\n }\n\n const preferences = app.session.user.preferences();\n const notifyEmail = preferences['notify_newPostInTag_email'];\n\n const tooltipText = extractText(\n app.translator.trans(\n notifyEmail ? 'fof-follow-tags.forum.sub_controls.notify_email_tooltip' : 'fof-follow-tags.forum.sub_controls.notify_alert_tooltip'\n )\n );\n\n return (\n
\n \n {Button.component(\n {\n className: 'Button SubscriptionMenu-button ' + buttonClass,\n icon: buttonIcon,\n onclick: this.saveSubscription.bind(this, tag, ['follow', 'lurk', 'ignore', 'hide'].includes(subscription) ? false : 'follow'),\n loading: this.loading(),\n },\n buttonLabel\n )}\n \n \n\n
    \n {this.options.map((attrs) => {\n attrs.onclick = this.saveSubscription.bind(this, tag, attrs.subscription);\n attrs.active = subscription === attrs.subscription;\n attrs.disabled = attrs.subscription === 'hide' && tag.isHidden();\n\n return
  • {SubscriptionMenuItem.component(attrs)}
  • ;\n })}\n
\n
\n );\n }\n\n saveSubscription(tag, subscription) {\n this.loading(true);\n\n app\n .request({\n url: `${app.forum.attribute('apiUrl')}/tags/${tag.id()}/subscription`,\n method: 'POST',\n body: {\n data: {\n subscription,\n },\n },\n })\n .then((res) => app.store.pushPayload(res))\n .then(() => {\n this.loading(false);\n m.redraw();\n });\n\n this.canShowTooltip(false);\n }\n}\n","import app from 'flarum/forum/app';\nimport { extend } from 'flarum/common/extend';\nimport Model from 'flarum/common/Model';\nimport IndexPage from 'flarum/forum/components/IndexPage';\n\nimport SubscriptionMenu from './components/SubscriptionMenu';\n\nexport default () => {\n app.store.models.tags.prototype.subscription = Model.attribute('subscription');\n\n extend(IndexPage.prototype, 'sidebarItems', function (items) {\n if (!this.currentTag() || !app.session.user) return;\n\n const tag = this.currentTag();\n\n if (items.has('newDiscussion')) items.replace('newDiscussion', null, 10);\n\n items.add('subscription', SubscriptionMenu.component({ model: tag, itemClassName: 'App-primaryControl' }), 5);\n });\n};\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/states/DiscussionListState'];","import app from 'flarum/forum/app';\n\nexport default () => 'flarum-subscriptions' in flarum.extensions && m.route.get().includes(app.route('following'));\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/app'];","import app from 'flarum/common/app';\n\nlet opts;\n\nexport default (section) =>\n opts ||\n (opts = ['none', 'tags'].reduce((o, key) => {\n o[key] = app.translator.trans(`fof-follow-tags.${section}.following_${key}_label`);\n\n return o;\n }, {}));\n","import app from 'flarum/forum/app';\nimport followingPageOptions from '../../common/utils/followingPageOptions';\n\nexport let options;\n\nexport const getOptions = () => {\n if (!options) {\n options = followingPageOptions('forum.index.following');\n }\n\n return options;\n};\n\nexport const getDefaultFollowingFiltering = () => {\n getOptions();\n\n let value = app.data['fof-follow-tags.following_page_default'];\n\n if (!options[value]) {\n value = null;\n }\n\n if (app.session.user) {\n const preference = app.session.user.preferences().followTagsPageDefault;\n\n if (options[preference]) {\n value = preference;\n }\n }\n\n return value || 'none';\n};\n","import app from 'flarum/forum/app';\nimport Component from 'flarum/common/Component';\n\nimport Button from 'flarum/common/components/Button';\nimport Dropdown from 'flarum/common/components/Dropdown';\n\nimport { getDefaultFollowingFiltering, getOptions } from '../utils/getDefaultFollowingFiltering';\n\nexport default class FollowingPageFilterDropdown extends Component {\n view() {\n const selected = app.discussions.followTags;\n const options = this.options();\n\n return Dropdown.component(\n {\n buttonClassName: 'Button',\n label: options[selected] || getDefaultFollowingFiltering(),\n },\n Object.keys(options).map((key) => {\n const active = key === selected;\n\n return Button.component(\n {\n active,\n icon: active ? 'fas fa-check' : true,\n onclick: () => {\n app.discussions.followTags = key;\n\n app.discussions.refresh();\n },\n },\n options[key]\n );\n })\n );\n }\n\n options() {\n return getOptions();\n }\n}\n","import app from 'flarum/forum/app';\nimport { extend } from 'flarum/common/extend';\n\nimport IndexPage from 'flarum/forum/components/IndexPage';\nimport DiscussionListState from 'flarum/forum/states/DiscussionListState';\n\nimport isFollowingPage from './utils/isFollowingPage';\n\nimport { getDefaultFollowingFiltering } from './utils/getDefaultFollowingFiltering';\nimport FollowingPageFilterDropdown from './components/FollowingPageFilterDropdown';\n\nexport default () => {\n extend(DiscussionListState.prototype, 'requestParams', function (params) {\n if (!isFollowingPage() || !app.session.user) return;\n\n if (!this.followTags) {\n this.followTags = getDefaultFollowingFiltering();\n }\n\n const followTags = this.followTags;\n\n if (app.current.get('routeName') === 'following' && followTags === 'tags') {\n params.filter['following-tag'] = true;\n\n delete params.filter.subscription;\n }\n });\n\n extend(IndexPage.prototype, 'viewItems', function (items) {\n if (!isFollowingPage() || !app.session.user) {\n return;\n }\n\n items.add('follow-tags', );\n });\n};\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/Notification'];","import app from 'flarum/forum/app';\nimport Notification from 'flarum/forum/components/Notification';\n\nexport default class NewDiscussionNotification extends Notification {\n icon() {\n return 'fas fa-user-tag';\n }\n\n href() {\n const notification = this.attrs.notification;\n const discussion = notification.subject();\n\n return app.route.discussion(discussion);\n }\n\n content() {\n return app.translator.trans('fof-follow-tags.forum.notifications.new_discussion_text', {\n user: this.attrs.notification.fromUser(),\n title: this.attrs.notification.subject().title(),\n });\n }\n\n excerpt() {\n return null;\n }\n}\n","import app from 'flarum/forum/app';\nimport Notification from 'flarum/forum/components/Notification';\n\nimport icons from '../icons';\n\nexport default class NewPostNotification extends Notification {\n icon() {\n return icons.lurk;\n }\n\n href() {\n const notification = this.attrs.notification;\n const discussion = notification.subject();\n const content = notification.content() || {};\n\n return app.route.discussion(discussion, content.postNumber);\n }\n\n content() {\n return app.translator.trans('fof-follow-tags.forum.notifications.new_post_text', { user: this.attrs.notification.fromUser() });\n }\n\n excerpt() {\n return null;\n }\n}\n","import app from 'flarum/forum/app';\nimport Notification from 'flarum/forum/components/Notification';\n\nexport default class NewDiscussionTagNotification extends Notification {\n icon() {\n return 'fas fa-user-tag';\n }\n\n href() {\n const notification = this.attrs.notification;\n const discussion = notification.subject();\n\n return app.route.discussion(discussion);\n }\n\n content() {\n return app.translator.trans('fof-follow-tags.forum.notifications.new_discussion_tag_text', {\n user: this.attrs.notification.fromUser(),\n title: this.attrs.notification.subject().title(),\n });\n }\n\n excerpt() {\n return null;\n }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/models/Discussion'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Badge'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/SettingsPage'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/FieldSet'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Select'];","import FollowingPageFilterDropdown from './FollowingPageFilterDropdown';\nimport NewDiscussionNotification from './NewDiscussionNotification';\nimport NewDiscussionTagNotification from './NewDiscussionTagNotification';\nimport NewPostNotification from './NewPostNotification';\nimport SubscriptionMenu from './SubscriptionMenu';\nimport SubscriptionMenuItem from './SubscriptionMenuItem';\n\nexport const components = {\n FollowingPageFilterDropdown,\n NewDiscussionNotification,\n NewDiscussionTagNotification,\n NewPostNotification,\n SubscriptionMenu,\n SubscriptionMenuItem,\n};\n","export default function _extends() {\n _extends = Object.assign ? Object.assign.bind() : function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n return _extends.apply(this, arguments);\n}","import followingPageOptions from './utils/followingPageOptions';\n\nexport const utils = {\n followingPageOptions,\n};\n","import { options, getOptions, getDefaultFollowingFiltering } from './getDefaultFollowingFiltering';\nimport isFollowingPage from './isFollowingPage';\nimport { utils as commonUtils } from '../../common';\n\nexport const utils = {\n options,\n getOptions,\n getDefaultFollowingFiltering,\n isFollowingPage,\n ...commonUtils,\n};\n","import app from 'flarum/forum/app';\nimport { extend } from 'flarum/common/extend';\nimport NotificationGrid from 'flarum/forum/components/NotificationGrid';\n\nimport addSubscriptionControls from './addSubscriptionControls';\nimport addFollowedTagsDiscussions from './addFollowedTagsDiscussions';\n\nimport NewDiscussionNotification from './components/NewDiscussionNotification';\nimport NewPostNotification from './components/NewPostNotification';\nimport NewDiscussionTagNotification from './components/NewDiscussionTagNotification';\nimport addDiscussionBadge from './addDiscussionBadge';\nimport addPreferences from './addPreferences';\n\nexport * from './components';\nexport * from './utils';\n\napp.initializers.add(\n 'fof/follow-tags',\n () => {\n if (!app.initializers.has('flarum-tags')) {\n console.error('[fof/follow-tags] flarum/tags is not enabled');\n return;\n }\n\n addSubscriptionControls();\n\n if ('flarum-subscriptions' in flarum.extensions) {\n addDiscussionBadge();\n addFollowedTagsDiscussions();\n addPreferences();\n }\n\n app.notificationComponents.newPostInTag = NewPostNotification;\n app.notificationComponents.newDiscussionInTag = NewDiscussionNotification;\n app.notificationComponents.newDiscussionTag = NewDiscussionTagNotification;\n\n extend(NotificationGrid.prototype, 'notificationTypes', function (items) {\n items.add('newDiscussionInTag', {\n name: 'newDiscussionInTag',\n icon: 'fas fa-user-tag',\n label: app.translator.trans('fof-follow-tags.forum.settings.notify_new_discussion_label'),\n });\n\n items.add('newPostInTag', {\n name: 'newPostInTag',\n icon: 'fas fa-user-tag',\n label: app.translator.trans('fof-follow-tags.forum.settings.notify_new_post_label'),\n });\n\n items.add('newDiscussionTag', {\n name: 'newDiscussionTag',\n icon: 'fas fa-user-tag',\n label: app.translator.trans('fof-follow-tags.forum.settings.notify_new_discussion_tag_label'),\n });\n });\n },\n -1\n);\n","import app from 'flarum/forum/app';\nimport { extend } from 'flarum/common/extend';\nimport Discussion from 'flarum/common/models/Discussion';\nimport Badge from 'flarum/common/components/Badge';\n\nimport isFollowingPage from './utils/isFollowingPage';\n\nexport default function addSubscriptionBadge() {\n extend(Discussion.prototype, 'badges', function (badges) {\n if (!isFollowingPage() || !this.tags()) {\n return;\n }\n\n const subscriptions = this.tags()\n .map((tag) => tag.subscription())\n .filter((state) => ['lurk', 'follow'].includes(state));\n\n const type = subscriptions.includes('lurk') ? 'lurking' : 'following';\n\n if (subscriptions.length) {\n badges.add(\n 'followTags',\n Badge.component({\n label: app.translator.trans(`fof-follow-tags.forum.badge.${type}_tag_tooltip`),\n icon: 'fas fa-user-tag',\n type: `${type}-tag`,\n })\n );\n }\n });\n}\n","import app from 'flarum/forum/app';\nimport { extend } from 'flarum/common/extend';\n\nimport SettingsPage from 'flarum/forum/components/SettingsPage';\nimport FieldSet from 'flarum/common/components/FieldSet';\nimport Select from 'flarum/common/components/Select';\n\nimport { getOptions, getDefaultFollowingFiltering } from './utils/getDefaultFollowingFiltering';\n\nexport default () => {\n extend(SettingsPage.prototype, 'settingsItems', function (items) {\n items.add(\n 'fof-follow-tags',\n FieldSet.component(\n {\n label: app.translator.trans('fof-follow-tags.forum.user.settings.heading'),\n className: 'Settings-follow-tags',\n },\n [\n
\n

{app.translator.trans('fof-follow-tags.forum.user.settings.filter_label')}

\n {Select.component({\n options: getOptions(),\n value: this.user.preferences().followTagsPageDefault || getDefaultFollowingFiltering(),\n onchange: (value) => {\n this.user.savePreferences({ followTagsPageDefault: value }).then(() => {\n m.redraw();\n });\n },\n })}\n
,\n ]\n )\n );\n });\n};\n"],"names":["__webpack_require__","module","getter","__esModule","d","a","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","flarum","core","compat","_setPrototypeOf","p","setPrototypeOf","bind","__proto__","_inheritsLoose","subClass","superClass","create","constructor","SubscriptionMenuItem","view","attrs","onclick","this","disabled","className","classList","active","icon","label","description","Component","follow","lurk","ignore","hide","SubscriptionMenu","oninit","vnode","loading","Stream","canShowTooltip","options","subscription","icons","app","onbeforeupdate","model","preferences","notifyEmail","notifyAlert","undefined","tag","buttonLabel","buttonIcon","buttonClass","includes","word","slice","length","tooltipText","extractText","text","tooltipVisible","position","delay","Button","saveSubscription","map","isHidden","component","url","id","method","body","data","then","res","m","redraw","Dropdown","extensions","route","opts","section","reduce","getOptions","followingPageOptions","getDefaultFollowingFiltering","preference","followTagsPageDefault","FollowingPageFilterDropdown","selected","buttonClassName","keys","NewDiscussionNotification","href","discussion","notification","subject","content","user","fromUser","title","excerpt","Notification","NewPostNotification","postNumber","NewDiscussionTagNotification","components","_extends","assign","target","i","arguments","source","apply","utils","isFollowingPage","Model","extend","IndexPage","items","currentTag","has","replace","add","itemClassName","Discussion","badges","tags","subscriptions","filter","state","type","Badge","DiscussionListState","params","followTags","SettingsPage","FieldSet","Select","onchange","savePreferences","NotificationGrid","name","console","error"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"forum.js","mappings":"MACA,IAAIA,EAAsB,CCA1BA,EAAyBC,IACxB,IAAIC,EAASD,GAAUA,EAAOE,WAC7B,IAAOF,EAAiB,QACxB,IAAM,EAEP,OADAD,EAAoBI,EAAEF,EAAQ,CAAEG,EAAGH,IAC5BA,CAAM,ECLdF,EAAwB,CAACM,EAASC,KACjC,IAAI,IAAIC,KAAOD,EACXP,EAAoBS,EAAEF,EAAYC,KAASR,EAAoBS,EAAEH,EAASE,IAC5EE,OAAOC,eAAeL,EAASE,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,IAE1E,ECNDR,EAAwB,CAACc,EAAKC,IAAUL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,GCClFf,EAAyBM,IACH,oBAAXa,QAA0BA,OAAOC,aAC1CV,OAAOC,eAAeL,EAASa,OAAOC,YAAa,CAAEC,MAAO,WAE7DX,OAAOC,eAAeL,EAAS,aAAc,CAAEe,OAAO,GAAO,G,sECL9D,MAAM,EAA+BC,OAAOC,KAAKC,OAAO,a,aCAxD,MAAM,EAA+BF,OAAOC,KAAKC,OAAO,iBCAlD,EAA+BF,OAAOC,KAAKC,OAAO,gB,aCAxD,MAAM,EAA+BF,OAAOC,KAAKC,OAAO,8B,aCAzC,SAASC,IActB,OAbAA,EAAWf,OAAOgB,OAAShB,OAAOgB,OAAOC,OAAS,SAAUC,GAC1D,IAAK,IAAIC,EAAI,EAAGA,EAAIC,UAAUC,OAAQF,IAAK,CACzC,IAAIG,EAASF,UAAUD,GAEvB,IAAK,IAA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C,EAAME,IAAI,eAAgB,CACxBP,KAAM,eACNvB,KAAM,kBACNuE,MAAOzF,IAAAA,WAAeC,MAAM,0DAG9B6C,EAAME,IAAI,mBAAoB,CAC5BP,KAAM,mBACNvB,KAAM,kBACNuE,MAAOzF,IAAAA,WAAeC,MAAM,mEAE/B,KFNGuI,QAAQC,MAAM,+CAiBjB,IACA,E","sources":["webpack://@fof/follow-tags/webpack/bootstrap","webpack://@fof/follow-tags/webpack/runtime/compat get default export","webpack://@fof/follow-tags/webpack/runtime/define property getters","webpack://@fof/follow-tags/webpack/runtime/hasOwnProperty shorthand","webpack://@fof/follow-tags/webpack/runtime/make namespace object","webpack://@fof/follow-tags/external root \"flarum.core.compat['forum/app']\"","webpack://@fof/follow-tags/external root \"flarum.core.compat['common/extend']\"","webpack://@fof/follow-tags/external root \"flarum.core.compat['common/Model']\"","webpack://@fof/follow-tags/external root \"flarum.core.compat['forum/components/IndexPage']\"","webpack://@fof/follow-tags/./node_modules/@babel/runtime/helpers/esm/extends.js","webpack://@fof/follow-tags/./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js","webpack://@fof/follow-tags/./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js","webpack://@fof/follow-tags/external root \"flarum.core.compat['common/components/Modal']\"","webpack://@fof/follow-tags/external root \"flarum.core.compat['common/components/Button']\"","webpack://@fof/follow-tags/external root \"flarum.core.compat['common/utils/ItemList']\"","webpack://@fof/follow-tags/external root \"flarum.core.compat['common/app']\"","webpack://@fof/follow-tags/./src/common/utils/followingPageOptions.js","webpack://@fof/follow-tags/./src/forum/utils/getDefaultFollowingFiltering.js","webpack://@fof/follow-tags/./src/forum/utils/isFollowingPage.ts","webpack://@fof/follow-tags/./src/common/index.ts","webpack://@fof/follow-tags/./src/forum/utils/index.ts","webpack://@fof/follow-tags/./src/forum/utils/subscriptionOptions.ts","webpack://@fof/follow-tags/external root \"flarum.core.compat['common/helpers/icon']\"","webpack://@fof/follow-tags/external root \"flarum.core.compat['common/Component']\"","webpack://@fof/follow-tags/./src/forum/components/SubscriptionOptionItem.tsx","webpack://@fof/follow-tags/external root \"flarum.core.compat['common/utils/Stream']\"","webpack://@fof/follow-tags/./src/forum/components/SubscriptionModal.tsx","webpack://@fof/follow-tags/external root \"flarum.core.compat['common/components/Tooltip']\"","webpack://@fof/follow-tags/external root \"flarum.core.compat['common/utils/extractText']\"","webpack://@fof/follow-tags/./src/forum/components/SubscriptionStateButton.js","webpack://@fof/follow-tags/./src/forum/addSubscriptionControls.js","webpack://@fof/follow-tags/external root \"flarum.core.compat['forum/states/DiscussionListState']\"","webpack://@fof/follow-tags/external root \"flarum.core.compat['common/components/Dropdown']\"","webpack://@fof/follow-tags/./src/forum/components/FollowingPageFilterDropdown.js","webpack://@fof/follow-tags/./src/forum/addFollowedTagsDiscussions.js","webpack://@fof/follow-tags/external root \"flarum.core.compat['forum/components/Notification']\"","webpack://@fof/follow-tags/./src/forum/components/NewDiscussionNotification.js","webpack://@fof/follow-tags/./src/forum/icons.js","webpack://@fof/follow-tags/./src/forum/components/NewPostNotification.js","webpack://@fof/follow-tags/./src/forum/components/NewDiscussionTagNotification.js","webpack://@fof/follow-tags/external root \"flarum.core.compat['common/models/Discussion']\"","webpack://@fof/follow-tags/external root \"flarum.core.compat['common/components/Badge']\"","webpack://@fof/follow-tags/external root \"flarum.core.compat['forum/components/SettingsPage']\"","webpack://@fof/follow-tags/external root \"flarum.core.compat['common/components/FieldSet']\"","webpack://@fof/follow-tags/external root \"flarum.core.compat['common/components/Select']\"","webpack://@fof/follow-tags/./src/forum/addPreferences.js","webpack://@fof/follow-tags/external root \"flarum.core.compat['forum/components/NotificationGrid']\"","webpack://@fof/follow-tags/./src/forum/components/index.ts","webpack://@fof/follow-tags/./src/forum/index.ts","webpack://@fof/follow-tags/./src/forum/addDiscussionBadge.js","webpack://@fof/follow-tags/./src/forum/extendNotificationGrid.ts"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/app'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/extend'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/Model'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/IndexPage'];","export default function _extends() {\n _extends = Object.assign ? Object.assign.bind() : function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n return _extends.apply(this, arguments);\n}","export default function _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n return _setPrototypeOf(o, p);\n}","import setPrototypeOf from \"./setPrototypeOf.js\";\nexport default function _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n setPrototypeOf(subClass, superClass);\n}","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Modal'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Button'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/ItemList'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/app'];","import app from 'flarum/common/app';\n\nlet opts;\n\nexport default (section) =>\n opts ||\n (opts = ['none', 'tags'].reduce((o, key) => {\n o[key] = app.translator.trans(`fof-follow-tags.${section}.following_${key}_label`);\n\n return o;\n }, {}));\n","import app from 'flarum/forum/app';\nimport followingPageOptions from '../../common/utils/followingPageOptions';\n\nexport let options;\n\nexport const getOptions = () => {\n if (!options) {\n options = followingPageOptions('forum.index.following');\n }\n\n return options;\n};\n\nexport const getDefaultFollowingFiltering = () => {\n getOptions();\n\n let value = app.data['fof-follow-tags.following_page_default'];\n\n if (!options[value]) {\n value = null;\n }\n\n if (app.session.user) {\n const preference = app.session.user.preferences().followTagsPageDefault;\n\n if (options[preference]) {\n value = preference;\n }\n }\n\n return value || 'none';\n};\n","import app from 'flarum/forum/app';\n\nexport default () => 'flarum-subscriptions' in flarum.extensions && m.route.get().includes(app.route('following'));\n","import followingPageOptions from './utils/followingPageOptions';\n\nexport const utils = {\n followingPageOptions,\n};\n","import { options, getOptions, getDefaultFollowingFiltering } from './getDefaultFollowingFiltering';\nimport isFollowingPage from './isFollowingPage';\nimport subscriptionOptions from './subscriptionOptions';\nimport { utils as commonUtils } from '../../common';\n\nexport const utils = {\n options,\n getOptions,\n getDefaultFollowingFiltering,\n isFollowingPage,\n subscriptionOptions,\n ...commonUtils,\n};\n","type SubscriptionOption = {\n subscription: string;\n icon: string;\n labelKey: string;\n descriptionKey: string;\n};\n\nconst subscriptionOptions: SubscriptionOption[] = [\n {\n subscription: 'not_follow',\n icon: 'far fa-star',\n labelKey: 'fof-follow-tags.forum.sub_controls.not_following_button',\n descriptionKey: 'fof-follow-tags.forum.sub_controls.not_following_text',\n },\n {\n subscription: 'follow',\n icon: 'fas fa-star',\n labelKey: 'fof-follow-tags.forum.sub_controls.following_button',\n descriptionKey: 'fof-follow-tags.forum.sub_controls.following_text',\n },\n {\n subscription: 'lurk',\n icon: 'fas fa-eye',\n labelKey: 'fof-follow-tags.forum.sub_controls.lurking_button',\n descriptionKey: 'fof-follow-tags.forum.sub_controls.lurking_text',\n },\n {\n subscription: 'ignore',\n icon: 'fas fa-bell-slash',\n labelKey: 'fof-follow-tags.forum.sub_controls.ignoring_button',\n descriptionKey: 'fof-follow-tags.forum.sub_controls.ignoring_text',\n },\n {\n subscription: 'hide',\n icon: 'fas fa-eye-slash',\n labelKey: 'fof-follow-tags.forum.sub_controls.hiding_button',\n descriptionKey: 'fof-follow-tags.forum.sub_controls.hiding_text',\n },\n];\n\nexport default subscriptionOptions;\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/helpers/icon'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/Component'];","import app from 'flarum/forum/app';\nimport icon from 'flarum/common/helpers/icon';\nimport Component, { ComponentAttrs } from 'flarum/common/Component';\n\ninterface SubscriptionOptionItemAttrs extends ComponentAttrs {\n active: boolean;\n icon: string;\n labelKey: string;\n descriptionKey: string;\n onclick: () => void;\n}\n\nexport default class SubscriptionOptionItem extends Component {\n view() {\n const isSelected = this.attrs.active;\n\n return (\n
\n {icon(this.attrs.icon, { className: 'SubscriptionOption-icon' })}\n {app.translator.trans(this.attrs.labelKey)}\n
{app.translator.trans(this.attrs.descriptionKey)}
\n {isSelected && icon('fas fa-check', { className: 'SubscriptionOption-selectedIcon' })}\n
\n );\n }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/Stream'];","import app from 'flarum/forum/app';\nimport Modal, { IInternalModalAttrs } from 'flarum/common/components/Modal';\nimport Button from 'flarum/common/components/Button';\nimport ItemList from 'flarum/common/utils/ItemList';\nimport { utils } from '../utils';\nimport SubscriptionOptionItem from './SubscriptionOptionItem';\nimport type Mithril from 'mithril';\nimport Tag from 'flarum/tags/models/Tag';\nimport Stream from 'flarum/common/utils/Stream';\nimport Tooltip from 'flarum/common/components/Tooltip';\n\ninterface ISubscriptionModalAttrs extends IInternalModalAttrs {\n model?: Tag;\n}\n\nexport default class SubscriptionModal extends Modal {\n subscription!: string;\n loading: Stream;\n canShowTooltip: boolean | undefined = undefined;\n\n oninit(vnode: Mithril.Vnode): void {\n super.oninit(vnode);\n this.loading = Stream(false);\n this.subscription = this.attrs.model.subscription() || 'not_follow';\n\n const preferences = app.session.user?.preferences();\n const notifyEmail = preferences['notify_newPostInTag_email'];\n const notifyAlert = preferences['notify_newPostInTag_alert'];\n\n if ((notifyEmail || notifyAlert) && this.subscription === 'not_follow') {\n this.canShowTooltip = true;\n } else {\n this.canShowTooltip = false;\n }\n }\n\n className() {\n return 'SubscriptionModal Modal--medium';\n }\n\n title() {\n return app.translator.trans('fof-follow-tags.forum.sub_controls.header', {\n tagName: this.attrs.model.name(),\n });\n }\n\n content() {\n const preferences = app.session.user?.preferences();\n const notifyEmail = preferences['notify_newPostInTag_email'];\n const notifyAlert = preferences['notify_newPostInTag_alert'];\n\n return (\n
\n {this.formOptionItems().toArray()}\n
\n \n
\n
\n );\n }\n\n formOptionItems(): ItemList {\n const items = new ItemList();\n\n items.add(\n 'subscription_type',\n
\n \n {this.subscriptionOptionItems().toArray()}\n
,\n 60\n );\n\n return items;\n }\n\n subscriptionOptionItems(): ItemList {\n const items = new ItemList();\n let priority = 100;\n\n utils.subscriptionOptions.forEach((option, index) => {\n const attrs = {\n ...option,\n onclick: () => {\n this.subscription = option.subscription;\n this.canShowTooltip = false;\n },\n active: this.subscription === option.subscription,\n disabled: option.subscription === 'hide' && this.attrs.model.isHidden(),\n };\n\n items.add(`subscription-option-${index}`, , priority);\n priority -= 5;\n });\n\n return items;\n }\n\n saveSubscription(subscription: string) {\n const tag = this.attrs.model;\n\n this.loading(true);\n\n this.subscription = subscription;\n\n app\n .request({\n url: `${app.forum.attribute('apiUrl')}/tags/${tag.id()}/subscription`,\n method: 'POST',\n body: {\n data: this.requestData(),\n },\n })\n .then((res: any) => app.store.pushPayload(res))\n .then(() => {\n this.loading(false);\n\n m.redraw();\n this.hide();\n });\n }\n\n requestData(): { [key: string]: string } {\n return { subscription: this.subscription };\n }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Tooltip'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/extractText'];","import app from 'flarum/forum/app';\nimport Button from 'flarum/common/components/Button';\nimport { utils } from '../utils';\nimport Tooltip from 'flarum/common/components/Tooltip';\nimport extractText from 'flarum/common/utils/extractText';\nimport Stream from 'flarum/common/utils/Stream';\n\nexport default class SubscriptionStateButton extends Button {\n oninit(vnode) {\n super.oninit(vnode);\n\n this.loading = Stream(false);\n this.canShowTooltip = Stream(false);\n }\n\n onbeforeupdate(vnode) {\n super.onbeforeupdate(vnode);\n\n const subscription = this.attrs.subscription || false;\n\n const preferences = app.session.user.preferences();\n const notifyEmail = preferences['notify_newPostInTag_email'];\n const notifyAlert = preferences['notify_newPostInTag_alert'];\n\n if ((notifyEmail || notifyAlert) && subscription === false) {\n this.canShowTooltip(undefined);\n } else {\n this.canShowTooltip(false);\n }\n }\n\n view(vnode) {\n const subscription = this.attrs.subscription || false;\n let option = utils.subscriptionOptions.find((opt) => opt.subscription === subscription);\n\n let buttonIcon = option ? option.icon : 'fas fa-star';\n let buttonLabel = option ? app.translator.trans(option.labelKey) : app.translator.trans('fof-follow-tags.forum.sub_controls.follow_button');\n\n this.attrs.className = (this.attrs.className || '') + ' SubscriptionButton ' + 'SubscriptionButton--' + subscription;\n this.attrs.icon = buttonIcon;\n\n const preferences = app.session.user.preferences();\n const notifyEmail = preferences['notify_newPostInTag_email'];\n\n const tooltipText = extractText(\n app.translator.trans(\n notifyEmail ? 'fof-follow-tags.forum.sub_controls.notify_email_tooltip' : 'fof-follow-tags.forum.sub_controls.notify_alert_tooltip'\n )\n );\n\n return (\n \n {super.view(Object.assign({}, vnode, { children: buttonLabel }))}\n \n );\n }\n}\n","import app from 'flarum/forum/app';\nimport { extend } from 'flarum/common/extend';\nimport Model from 'flarum/common/Model';\nimport IndexPage from 'flarum/forum/components/IndexPage';\nimport SubscriptionModal from './components/SubscriptionModal';\nimport SubscriptionStateButton from './components/SubscriptionStateButton';\n\nexport default () => {\n app.store.models.tags.prototype.subscription = Model.attribute('subscription');\n\n extend(IndexPage.prototype, 'sidebarItems', function (items) {\n if (!this.currentTag() || !app.session.user) return;\n\n const tag = this.currentTag();\n\n if (items.has('newDiscussion')) items.setPriority('newDiscussion', 10);\n\n items.add(\n 'subscriptionButton',\n app.modal.show(SubscriptionModal, { model: tag })}\n />,\n 5\n );\n });\n};\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/states/DiscussionListState'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Dropdown'];","import app from 'flarum/forum/app';\nimport Component from 'flarum/common/Component';\n\nimport Button from 'flarum/common/components/Button';\nimport Dropdown from 'flarum/common/components/Dropdown';\n\nimport { getDefaultFollowingFiltering, getOptions } from '../utils/getDefaultFollowingFiltering';\n\nexport default class FollowingPageFilterDropdown extends Component {\n view() {\n const selected = app.discussions.followTags;\n const options = this.options();\n\n return Dropdown.component(\n {\n buttonClassName: 'Button',\n label: options[selected] || getDefaultFollowingFiltering(),\n },\n Object.keys(options).map((key) => {\n const active = key === selected;\n\n return Button.component(\n {\n active,\n icon: active ? 'fas fa-check' : true,\n onclick: () => {\n app.discussions.followTags = key;\n\n app.discussions.refresh();\n },\n },\n options[key]\n );\n })\n );\n }\n\n options() {\n return getOptions();\n }\n}\n","import app from 'flarum/forum/app';\nimport { extend } from 'flarum/common/extend';\n\nimport IndexPage from 'flarum/forum/components/IndexPage';\nimport DiscussionListState from 'flarum/forum/states/DiscussionListState';\n\nimport isFollowingPage from './utils/isFollowingPage';\n\nimport { getDefaultFollowingFiltering } from './utils/getDefaultFollowingFiltering';\nimport FollowingPageFilterDropdown from './components/FollowingPageFilterDropdown';\n\nexport default () => {\n extend(DiscussionListState.prototype, 'requestParams', function (params) {\n if (!isFollowingPage() || !app.session.user) return;\n\n if (!this.followTags) {\n this.followTags = getDefaultFollowingFiltering();\n }\n\n const followTags = this.followTags;\n\n if (app.current.get('routeName') === 'following' && followTags === 'tags') {\n params.filter['following-tag'] = true;\n\n delete params.filter.subscription;\n }\n });\n\n extend(IndexPage.prototype, 'viewItems', function (items) {\n if (!isFollowingPage() || !app.session.user) {\n return;\n }\n\n items.add('follow-tags', );\n });\n};\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/Notification'];","import app from 'flarum/forum/app';\nimport Notification from 'flarum/forum/components/Notification';\n\nexport default class NewDiscussionNotification extends Notification {\n icon() {\n return 'fas fa-user-tag';\n }\n\n href() {\n const notification = this.attrs.notification;\n const discussion = notification.subject();\n\n return app.route.discussion(discussion);\n }\n\n content() {\n return app.translator.trans('fof-follow-tags.forum.notifications.new_discussion_text', {\n user: this.attrs.notification.fromUser(),\n title: this.attrs.notification.subject().title(),\n });\n }\n\n excerpt() {\n return null;\n }\n}\n","export default {\n [false]: 'fas fa-star',\n follow: 'fas fa-star',\n lurk: 'fas fa-comments',\n ignore: 'fas fa-bell-slash',\n hide: 'fas fa-eye-slash',\n};\n","import app from 'flarum/forum/app';\nimport Notification from 'flarum/forum/components/Notification';\n\nimport icons from '../icons';\n\nexport default class NewPostNotification extends Notification {\n icon() {\n return icons.lurk;\n }\n\n href() {\n const notification = this.attrs.notification;\n const discussion = notification.subject();\n const content = notification.content() || {};\n\n return app.route.discussion(discussion, content.postNumber);\n }\n\n content() {\n return app.translator.trans('fof-follow-tags.forum.notifications.new_post_text', { user: this.attrs.notification.fromUser() });\n }\n\n excerpt() {\n return null;\n }\n}\n","import app from 'flarum/forum/app';\nimport Notification from 'flarum/forum/components/Notification';\n\nexport default class NewDiscussionTagNotification extends Notification {\n icon() {\n return 'fas fa-user-tag';\n }\n\n href() {\n const notification = this.attrs.notification;\n const discussion = notification.subject();\n\n return app.route.discussion(discussion);\n }\n\n content() {\n return app.translator.trans('fof-follow-tags.forum.notifications.new_discussion_tag_text', {\n user: this.attrs.notification.fromUser(),\n title: this.attrs.notification.subject().title(),\n });\n }\n\n excerpt() {\n return null;\n }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/models/Discussion'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Badge'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/SettingsPage'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/FieldSet'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Select'];","import app from 'flarum/forum/app';\nimport { extend } from 'flarum/common/extend';\n\nimport SettingsPage from 'flarum/forum/components/SettingsPage';\nimport FieldSet from 'flarum/common/components/FieldSet';\nimport Select from 'flarum/common/components/Select';\n\nimport { getOptions, getDefaultFollowingFiltering } from './utils/getDefaultFollowingFiltering';\n\nexport default () => {\n extend(SettingsPage.prototype, 'settingsItems', function (items) {\n items.add(\n 'fof-follow-tags',\n FieldSet.component(\n {\n label: app.translator.trans('fof-follow-tags.forum.user.settings.heading'),\n className: 'Settings-follow-tags',\n },\n [\n
\n

{app.translator.trans('fof-follow-tags.forum.user.settings.filter_label')}

\n {Select.component({\n options: getOptions(),\n value: this.user.preferences().followTagsPageDefault || getDefaultFollowingFiltering(),\n onchange: (value) => {\n this.user.savePreferences({ followTagsPageDefault: value }).then(() => {\n m.redraw();\n });\n },\n })}\n
,\n ]\n )\n );\n });\n};\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/NotificationGrid'];","import FollowingPageFilterDropdown from './FollowingPageFilterDropdown';\nimport NewDiscussionNotification from './NewDiscussionNotification';\nimport NewDiscussionTagNotification from './NewDiscussionTagNotification';\nimport NewPostNotification from './NewPostNotification';\nimport SubscriptionModal from './SubscriptionModal';\nimport SubscriptionOptionItem from './SubscriptionOptionItem';\nimport SubscriptionStateButton from './SubscriptionStateButton';\n\nexport const components = {\n FollowingPageFilterDropdown,\n NewDiscussionNotification,\n NewDiscussionTagNotification,\n NewPostNotification,\n SubscriptionModal,\n SubscriptionOptionItem,\n SubscriptionStateButton,\n};\n","import app from 'flarum/forum/app';\nimport addSubscriptionControls from './addSubscriptionControls';\nimport addFollowedTagsDiscussions from './addFollowedTagsDiscussions';\nimport NewDiscussionNotification from './components/NewDiscussionNotification';\nimport NewPostNotification from './components/NewPostNotification';\nimport NewDiscussionTagNotification from './components/NewDiscussionTagNotification';\nimport addDiscussionBadge from './addDiscussionBadge';\nimport addPreferences from './addPreferences';\nimport extendNotificationGrid from './extendNotificationGrid';\n\nexport * from './components';\nexport * from './utils';\n\napp.initializers.add(\n 'fof/follow-tags',\n () => {\n if (!app.initializers.has('flarum-tags')) {\n console.error('[fof/follow-tags] flarum/tags is not enabled');\n return;\n }\n\n addSubscriptionControls();\n\n if ('flarum-subscriptions' in flarum.extensions) {\n addDiscussionBadge();\n addFollowedTagsDiscussions();\n addPreferences();\n }\n\n app.notificationComponents.newPostInTag = NewPostNotification;\n app.notificationComponents.newDiscussionInTag = NewDiscussionNotification;\n app.notificationComponents.newDiscussionTag = NewDiscussionTagNotification;\n\n extendNotificationGrid();\n },\n -1\n);\n","import app from 'flarum/forum/app';\nimport { extend } from 'flarum/common/extend';\nimport Discussion from 'flarum/common/models/Discussion';\nimport Badge from 'flarum/common/components/Badge';\n\nimport isFollowingPage from './utils/isFollowingPage';\n\nexport default function addSubscriptionBadge() {\n extend(Discussion.prototype, 'badges', function (badges) {\n if (!isFollowingPage() || !this.tags()) {\n return;\n }\n\n const subscriptions = this.tags()\n .map((tag) => tag.subscription())\n .filter((state) => ['lurk', 'follow'].includes(state));\n\n const type = subscriptions.includes('lurk') ? 'lurking' : 'following';\n\n if (subscriptions.length) {\n badges.add(\n 'followTags',\n Badge.component({\n label: app.translator.trans(`fof-follow-tags.forum.badge.${type}_tag_tooltip`),\n icon: 'fas fa-user-tag',\n type: `${type}-tag`,\n })\n );\n }\n });\n}\n","import app from 'flarum/forum/app';\nimport { extend } from 'flarum/common/extend';\nimport NotificationGrid from 'flarum/forum/components/NotificationGrid';\n\nexport default function extendNotificationGrid() {\n extend(NotificationGrid.prototype, 'notificationTypes', function (items) {\n items.add('newDiscussionInTag', {\n name: 'newDiscussionInTag',\n icon: 'fas fa-user-tag',\n label: app.translator.trans('fof-follow-tags.forum.settings.notify_new_discussion_label'),\n });\n\n items.add('newPostInTag', {\n name: 'newPostInTag',\n icon: 'fas fa-user-tag',\n label: app.translator.trans('fof-follow-tags.forum.settings.notify_new_post_label'),\n });\n\n items.add('newDiscussionTag', {\n name: 'newDiscussionTag',\n icon: 'fas fa-user-tag',\n label: app.translator.trans('fof-follow-tags.forum.settings.notify_new_discussion_tag_label'),\n });\n });\n}\n"],"names":["__webpack_require__","module","getter","__esModule","d","a","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","flarum","core","compat","_extends","assign","bind","target","i","arguments","length","source","apply","this","_setPrototypeOf","p","setPrototypeOf","__proto__","_inheritsLoose","subClass","superClass","create","constructor","opts","section","reduce","app","trans","options","getOptions","followingPageOptions","getDefaultFollowingFiltering","user","preference","preferences","followTagsPageDefault","extensions","m","route","includes","utils","isFollowingPage","subscriptionOptions","subscription","icon","labelKey","descriptionKey","SubscriptionOptionItem","view","isSelected","attrs","active","className","onclick","Component","SubscriptionModal","loading","canShowTooltip","undefined","oninit","vnode","Stream","model","notifyEmail","notifyAlert","title","tagName","name","content","formOptionItems","toArray","saveSubscription","items","ItemList","add","subscriptionOptionItems","priority","forEach","option","index","disabled","isHidden","tag","url","attribute","id","method","body","data","requestData","then","res","pushPayload","redraw","hide","Modal","SubscriptionStateButton","onbeforeupdate","find","opt","buttonIcon","buttonLabel","tooltipText","extractText","text","tooltipVisible","position","delay","children","Button","FollowingPageFilterDropdown","selected","followTags","Dropdown","buttonClassName","label","keys","map","refresh","NewDiscussionNotification","href","discussion","notification","subject","fromUser","excerpt","Notification","follow","lurk","ignore","NewPostNotification","icons","postNumber","NewDiscussionTagNotification","components","has","models","tags","Model","extend","IndexPage","currentTag","setPriority","show","Discussion","badges","subscriptions","filter","state","type","Badge","DiscussionListState","params","SettingsPage","FieldSet","Select","onchange","savePreferences","newPostInTag","newDiscussionInTag","newDiscussionTag","NotificationGrid","console","error"],"sourceRoot":""} \ No newline at end of file