From b8df3863d133289e9e0ba35ec5b90c4a5d4de9e0 Mon Sep 17 00:00:00 2001 From: flarum-bot Date: Thu, 21 Apr 2022 22:20:19 +0000 Subject: [PATCH] Bundled output for commit 4cb15501a253aedc841f68852319edbf3943b48e Includes transpiled JS/TS, and Typescript declaration files (typings). [skip ci] --- extensions/tags/js/dist/forum.js | 2 +- extensions/tags/js/dist/forum.js.map | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/extensions/tags/js/dist/forum.js b/extensions/tags/js/dist/forum.js index 45c5abf59..f41012a33 100644 --- a/extensions/tags/js/dist/forum.js +++ b/extensions/tags/js/dist/forum.js @@ -1,2 +1,2 @@ -(()=>{var t={810:()=>{},395:(t,e,n)=>{"use strict";const r=flarum.core.compat["forum/app"];var a=n.n(r);const o=flarum.core.compat["common/Model"];var s=n.n(o);const i=flarum.core.compat["common/models/Discussion"];var c=n.n(i);const u=flarum.core.compat["forum/components/IndexPage"];var l=n.n(u);function d(t,e){return d=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},d(t,e)}function f(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,d(t,e)}const p=flarum.core.compat["common/utils/computed"];var h=n.n(p),g=function(t){function e(){return t.apply(this,arguments)||this}f(e,t);var n=e.prototype;return n.name=function(){return s().attribute("name").call(this)},n.slug=function(){return s().attribute("slug").call(this)},n.description=function(){return s().attribute("description").call(this)},n.color=function(){return s().attribute("color").call(this)},n.backgroundUrl=function(){return s().attribute("backgroundUrl").call(this)},n.backgroundMode=function(){return s().attribute("backgroundMode").call(this)},n.icon=function(){return s().attribute("icon").call(this)},n.position=function(){return s().attribute("position").call(this)},n.parent=function(){return s().hasOne("parent").call(this)},n.children=function(){return s().hasMany("children").call(this)},n.defaultSort=function(){return s().attribute("defaultSort").call(this)},n.isChild=function(){return s().attribute("isChild").call(this)},n.isHidden=function(){return s().attribute("isHidden").call(this)},n.discussionCount=function(){return s().attribute("discussionCount").call(this)},n.lastPostedAt=function(){return s().attribute("lastPostedAt",s().transformDate).call(this)},n.lastPostedDiscussion=function(){return s().hasOne("lastPostedDiscussion").call(this)},n.isRestricted=function(){return s().attribute("isRestricted").call(this)},n.canStartDiscussion=function(){return s().attribute("canStartDiscussion").call(this)},n.canAddToDiscussion=function(){return s().attribute("canAddToDiscussion").call(this)},n.isPrimary=function(){return h()("position","parent",(function(t,e){return null!==t&&!1===e})).call(this)},e}(s());const v=flarum.core.compat["common/components/Page"];var y=n.n(v);const T=flarum.core.compat["common/components/Link"];var b=n.n(T);const x=flarum.core.compat["common/components/LoadingIndicator"];var w=n.n(x);const N=flarum.core.compat["common/helpers/listItems"];var _=n.n(N);const L=flarum.core.compat["common/helpers/humanTime"];var P=n.n(L);const I=flarum.core.compat["common/utils/classList"];var C=n.n(I);function k(t,e,n){void 0===e&&(e={}),void 0===n&&(n={});var r=t&&t.icon(),a=n.useColor,o=void 0===a||a;return e.className=C()([e.className,"icon",r?t.icon():"TagIcon"]),t&&o?(e.style=e.style||{},e.style["--color"]=t.color(),r&&(e.style.color=t.color())):t||(e.className+=" untagged"),r?m("i",e):m("span",e)}const D=flarum.core.compat["common/utils/extract"];var S=n.n(D);function E(t,e){void 0===e&&(e={}),e.style=e.style||{},e.className="TagLabel "+(e.className||"");var n=S()(e,"link"),r=t?t.name():app.translator.trans("flarum-tags.lib.deleted_tag_text");if(t){var a=t.color();a&&(e.style["--tag-bg"]=a,e.className+=" colored"),n&&(e.title=t.description()||"",e.href=app.route("tag",{tags:t.slug()})),t.isChild()&&(e.className+=" TagLabel--child")}else e.className+=" untagged";return m(n?b():"span",e,m("span",{className:"TagLabel-text"},t&&t.icon()&&k(t,{},{useColor:!1})," ",r))}function O(t){return t.slice(0).sort((function(t,e){var n=t.position(),r=e.position();if(null===n&&null===r)return e.discussionCount()-t.discussionCount();if(null===r)return-1;if(null===n)return 1;var a=t.parent(),o=e.parent();return a===o?n-r:a&&o?a.position()-o.position():a?a===e?1:a.position()-r:o?o===t?-1:n-o.position():0}))}var A=function(t){function e(){return t.apply(this,arguments)||this}f(e,t);var n=e.prototype;return n.oninit=function(e){var n=this;t.prototype.oninit.call(this,e),app.history.push("tags",app.translator.trans("flarum-tags.forum.header.back_to_tags_tooltip")),this.tags=[];var r=app.preloadedApiDocument();r?this.tags=O(r.filter((function(t){return!t.isChild()}))):(this.loading=!0,app.tagList.load(["children","lastPostedDiscussion","parent"]).then((function(){n.tags=O(app.store.all("tags").filter((function(t){return!t.isChild()}))),n.loading=!1,m.redraw()})))},n.view=function(){if(this.loading)return m(w(),null);var t=this.tags.filter((function(t){return null!==t.position()})),e=this.tags.filter((function(t){return null===t.position()}));return m("div",{className:"TagsPage"},l().prototype.hero(),m("div",{className:"container"},m("nav",{className:"TagsPage-nav IndexPage-nav sideNav"},m("ul",null,_()(l().prototype.sidebarItems().toArray()))),m("div",{className:"TagsPage-content sideNavOffset"},m("ul",{className:"TagTiles"},t.map((function(t){var e=t.lastPostedDiscussion(),n=O(t.children()||[]);return m("li",{className:"TagTile "+(t.color()?"colored":""),style:{"--tag-bg":t.color()}},m(b(),{className:"TagTile-info",href:app.route.tag(t)},t.icon()&&k(t,{},{useColor:!1}),m("h3",{className:"TagTile-name"},t.name()),m("p",{className:"TagTile-description"},t.description()),n?m("div",{className:"TagTile-children"},n.map((function(t){return[m(b(),{href:app.route.tag(t)},t.name())," "]}))):""),e?m(b(),{className:"TagTile-lastPostedDiscussion",href:app.route.discussion(e,e.lastPostNumber())},m("span",{className:"TagTile-lastPostedDiscussion-title"},e.title()),P()(e.lastPostedAt())):m("span",{className:"TagTile-lastPostedDiscussion"}))}))),e.length?m("div",{className:"TagCloud"},e.map((function(t){return[E(t,{link:!0})," "]}))):"")))},n.oncreate=function(e){t.prototype.oncreate.call(this,e),app.setTitle(app.translator.trans("flarum-tags.forum.all_tags.meta_title_text")),app.setTitleCount(0)},e}(y());const j=flarum.core.compat["forum/components/EventPost"];function R(t,e){void 0===e&&(e={});var n=[],r=S()(e,"link");return e.className="TagsLabel "+(e.className||""),t?O(t).forEach((function(e){(e||1===t.length)&&n.push(E(e,{link:r}))})):n.push(E()),m("span",e,n)}var M=function(t){function e(){return t.apply(this,arguments)||this}f(e,t),e.initAttrs=function(e){t.initAttrs.call(this,e);var n=e.post.content()[0],r=e.post.content()[1];function a(t,e){return t.filter((function(t){return-1===e.indexOf(t)})).map((function(t){return app.store.getById("tags",t)}))}e.tagsAdded=a(r,n),e.tagsRemoved=a(n,r)};var n=e.prototype;return n.icon=function(){return"fas fa-tag"},n.descriptionKey=function(){return this.attrs.tagsAdded.length?this.attrs.tagsRemoved.length?"flarum-tags.forum.post_stream.added_and_removed_tags_text":"flarum-tags.forum.post_stream.added_tags_text":"flarum-tags.forum.post_stream.removed_tags_text"},n.descriptionData=function(){var t={};return this.attrs.tagsAdded.length&&(t.tagsAdded=app.translator.trans("flarum-tags.forum.post_stream.tags_text",{tags:R(this.attrs.tagsAdded,{link:!0}),count:this.attrs.tagsAdded.length})),this.attrs.tagsRemoved.length&&(t.tagsRemoved=app.translator.trans("flarum-tags.forum.post_stream.tags_text",{tags:R(this.attrs.tagsRemoved,{link:!0}),count:this.attrs.tagsRemoved.length})),t},e}(n.n(j)());function q(t,e,n,r,a,o,s){try{var i=t[o](s),c=i.value}catch(t){return void n(t)}i.done?e(c):Promise.resolve(c).then(r,a)}var B=n(126),H=n.n(B),F=function(){function t(){this.loadedIncludes=new Set}return t.prototype.load=function(){var t,e=(t=H().mark((function t(e){var n,r=this;return H().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(void 0===e&&(e=[]),0!==(n=e.filter((function(t){return!r.loadedIncludes.has(t)}))).length){t.next=4;break}return t.abrupt("return",Promise.resolve(a().store.all("tags")));case 4:return t.abrupt("return",a().store.find("tags",{include:n.join(",")}).then((function(t){return n.forEach((function(t){return r.loadedIncludes.add(t)})),t})));case 5:case"end":return t.stop()}}),t)})),function(){var e=this,n=arguments;return new Promise((function(r,a){var o=t.apply(e,n);function s(t){q(o,r,a,s,i,"next",t)}function i(t){q(o,r,a,s,i,"throw",t)}s(void 0)}))});return function(t){return e.apply(this,arguments)}}(),t}();const G=flarum.core.compat["common/extend"],K=flarum.core.compat["common/components/Separator"];var $=n.n(K);const U=flarum.core.compat["common/components/LinkButton"];var Y=n.n(U),z=function(t){function e(){return t.apply(this,arguments)||this}return f(e,t),e.prototype.view=function(t){var e=this.attrs.model,n=(this.constructor.isActive(this.attrs),e&&e.description()),r=C()(["TagLinkButton","hasIcon",this.attrs.className,e.isChild()&&"child"]);return m(b(),{className:r,href:this.attrs.route,style:e?{"--color":e.color()}:"",title:n||""},k(e,{className:"Button-icon"}),m("span",{className:"Button-label"},e?e.name():app.translator.trans("flarum-tags.forum.index.untagged_link")))},e.initAttrs=function(e){t.initAttrs.call(this,e);var n=e.model;e.params.tags=n?n.slug():"untagged",e.route=app.route("tag",e.params)},e}(Y());function J(){(0,G.extend)(l().prototype,"navItems",(function(t){if(t.add("tags",m(Y(),{icon:"fas fa-th-large",href:app.route("tags")},app.translator.trans("flarum-tags.forum.index.tags_link")),-10),!app.current.matches(A)){t.add("separator",$().component(),-12);var e=app.search.stickyParams(),n=app.store.all("tags"),r=this.currentTag(),a=function(n){var a=r===n;!a&&r&&(a=r.parent()===n),t.add("tag"+n.id(),z.component({model:n,params:e,active:a},null==n?void 0:n.name()),-14)};O(n).filter((function(t){return null!==t.position()&&(!t.isChild()||r&&(t.parent()===r||t.parent()===r.parent()))})).forEach(a);var o=n.filter((function(t){return null===t.position()})).sort((function(t,e){return e.discussionCount()-t.discussionCount()}));o.splice(0,3).forEach(a),o.length&&t.add("moreTags",m(Y(),{href:app.route("tags")},app.translator.trans("flarum-tags.forum.index.more_link")),-16)}}))}const Q=flarum.core.compat["forum/states/DiscussionListState"];var V=n.n(Q);const W=flarum.core.compat["forum/states/GlobalSearchState"];var X=n.n(W);const Z=flarum.core.compat["common/Component"];var tt=n.n(Z),et=function(t){function e(){return t.apply(this,arguments)||this}return f(e,t),e.prototype.view=function(){var t=this.attrs.model,e=t.color();return m("header",{className:"Hero TagHero"+(e?" TagHero--colored":""),style:e?{"--hero-bg":e}:""},m("div",{className:"container"},m("div",{className:"containerNarrow"},m("h2",{className:"Hero-title"},t.icon()&&k(t,{},{useColor:!1})," ",t.name()),m("div",{className:"Hero-subtitle"},t.description()))))},e}(tt()),nt=function(t){return a().store.all("tags").find((function(e){return 0===e.slug().localeCompare(t,void 0,{sensitivity:"base"})}))};function rt(){l().prototype.currentTag=function(){var t=this;if(this.currentActiveTag)return this.currentActiveTag;var e=a().search.params().tags,n=null;if(e&&(n=nt(e)),e&&!n||n&&!n.isChild()&&!n.children()){if(this.currentTagLoading)return;this.currentTagLoading=!0,a().store.find("tags",e,{include:"children,children.parent,parent,state"}).then((function(){t.currentActiveTag=nt(e),m.redraw()})).finally((function(){t.currentTagLoading=!1}))}return n?(this.currentActiveTag=n,this.currentActiveTag):void 0},(0,G.override)(l().prototype,"hero",(function(t){var e=this.currentTag();return e?m(et,{model:e}):t()})),(0,G.extend)(l().prototype,"view",(function(t){var e=this.currentTag();e&&(t.attrs.className+=" IndexPage--tag"+e.id())})),(0,G.extend)(l().prototype,"setTitle",(function(){var t=this.currentTag();t&&a().setTitle(t.name())})),(0,G.extend)(l().prototype,"sidebarItems",(function(t){var e=this.currentTag();if(e){var n=e.color(),r=e.canStartDiscussion()||!a().session.user,o=t.get("newDiscussion");n&&(o.attrs.className=C()([o.attrs.className,"Button--tagColored"]),o.attrs.style={"--color":n}),o.attrs.disabled=!r,o.children=a().translator.trans(r?"core.forum.index.start_discussion_button":"core.forum.index.cannot_start_discussion_button")}})),(0,G.extend)(X().prototype,"params",(function(t){t.tags=m.route.param("tags")})),(0,G.extend)(V().prototype,"requestParams",(function(t){var e;if("string"==typeof t.include?t.include=[t.include]:null==(e=t.include)||e.push("tags","tags.parent"),this.params.tags){var n,r=null!=(n=t.filter)?n:{};r.tag=this.params.tags;var a=r.q;a&&(r.q=a+" tag:"+this.params.tags),t.filter=r}}))}const at=flarum.core.compat["forum/components/DiscussionListItem"];var ot=n.n(at);const st=flarum.core.compat["forum/components/DiscussionHero"];var it=n.n(st);function ct(){(0,G.extend)(ot().prototype,"infoItems",(function(t){var e=this.attrs.discussion.tags();e&&e.length&&t.add("tags",R(e),10)})),(0,G.extend)(it().prototype,"view",(function(t){var e=O(this.attrs.discussion.tags());if(e&&e.length){var n=e[0].color();n&&(t.attrs.style={"--hero-bg":n},t.attrs.className+=" DiscussionHero--colored")}})),(0,G.extend)(it().prototype,"items",(function(t){var e=this.attrs.discussion.tags();e&&e.length&&t.add("tags",R(e,{link:!0}),5)}))}const ut=flarum.core.compat["forum/utils/DiscussionControls"];var lt=n.n(ut);const mt=flarum.core.compat["common/components/Button"];var dt=n.n(mt);const ft=flarum.core.compat["common/components/Modal"];var pt=n.n(ft);const ht=flarum.core.compat["forum/components/DiscussionPage"];var gt=n.n(ht);const vt=flarum.core.compat["common/helpers/highlight"];var yt=n.n(vt);const Tt=flarum.core.compat["common/utils/extractText"];var bt=n.n(Tt);const xt=flarum.core.compat["forum/utils/KeyboardNavigatable"];var wt=n.n(xt);const Nt=flarum.core.compat["common/utils/Stream"];var _t=n.n(Nt);function Lt(t){var e=app.store.all("tags");return t?e.filter((function(e){return e.canAddToDiscussion()||-1!==t.tags().indexOf(e)})):e.filter((function(t){return t.canStartDiscussion()}))}var Pt=["className","isToggled"],It=function(t){function e(){return t.apply(this,arguments)||this}return f(e,t),e.prototype.view=function(t){var e=this.attrs,n=e.className,r=e.isToggled,a=function(t,e){if(null==t)return{};var n,r,a={},o=Object.keys(t);for(r=0;r=0||(a[n]=t[n]);return a}(e,Pt),o=r?"far fa-check-circle":"far fa-circle";return m(dt(),Object.assign({},a,{icon:o,className:C()([n,r&&"Button--toggled"])}),t.children)},e}(tt()),Ct=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),o=0;o=this.maxPrimary&&!this.bypassReqs&&(e=e.filter((function(e){return!e.isPrimary()||t.selected.includes(e)}))),o>=this.maxSecondary&&!this.bypassReqs&&(e=e.filter((function(e){return e.isPrimary()||t.selected.includes(e)}))),n&&(e=e.filter((function(t){return t.name().substr(0,n.length).toLowerCase()===n}))),this.selectedTag&&e.includes(this.selectedTag)||(this.selectedTag=e[0]);var s=Math.max(bt()(this.getInstruction(r,o)).length,this.filter().length);return[m("div",{className:"Modal-body"},m("div",{className:"TagDiscussionModal-form"},m("div",{className:"TagDiscussionModal-form-input"},m("div",{className:"TagsInput FormControl "+(this.focused?"focus":""),onclick:function(){return t.$(".TagsInput input").focus()}},m("span",{className:"TagsInput-selected"},this.selected.map((function(e){return m("span",{className:"TagsInput-tag",onclick:function(){t.removeTag(e),t.onready()}},E(e))}))),m("input",{className:"FormControl",placeholder:bt()(this.getInstruction(r,o)),bidi:this.filter,style:{width:s+"ch"},onkeydown:this.navigator.navigate.bind(this.navigator),onfocus:function(){return t.focused=!0},onblur:function(){return t.focused=!1}}))),m("div",{className:"TagDiscussionModal-form-submit App-primaryControl"},m(dt(),{type:"submit",className:"Button Button--primary",disabled:!this.meetsRequirements(r,o),icon:"fas fa-check"},a().translator.trans("flarum-tags.forum.choose_tags.submit_button"))))),m("div",{className:"Modal-footer"},m("ul",{className:"TagDiscussionModal-list SelectTagList"},e.filter((function(e){return n||!e.parent()||t.selected.includes(e.parent())})).map((function(e){return m("li",{"data-index":e.id(),className:C()({pinned:null!==e.position(),child:!!e.parent(),colored:!!e.color(),selected:t.selected.includes(e),active:t.selectedTag===e}),style:{color:e.color()},onmouseover:function(){return t.selectedTag=e},onclick:t.toggleTag.bind(t,e)},k(e),m("span",{className:"SelectTagListItem-name"},yt()(e.name(),n)),e.description()?m("span",{className:"SelectTagListItem-description"},e.description()):"")}))),!!a().forum.attribute("canBypassTagCounts")&&m("div",{className:"TagDiscussionModal-controls"},m(It,{className:"Button",onclick:function(){return t.bypassReqs=!t.bypassReqs},isToggled:this.bypassReqs},a().translator.trans("flarum-tags.forum.choose_tags.bypass_requirements"))))]},n.meetsRequirements=function(t,e){return!!this.bypassReqs||t>=this.minPrimary&&e>=this.minSecondary},n.toggleTag=function(t){this.tags&&(this.selected.includes(t)?this.removeTag(t):this.addTag(t),this.filter()&&(this.filter(""),this.selectedTag=this.tags[0]),this.onready())},n.select=function(t){t.metaKey||t.ctrlKey||this.selectedTag&&this.selected.includes(this.selectedTag)?this.selected.length&&this.$('button[type="submit"]').click():this.selectedTag&&this.getItem(this.selectedTag)[0].dispatchEvent(new Event("click"))},n.selectableItems=function(){return this.$(".TagDiscussionModal-list > li")},n.getCurrentNumericIndex=function(){return this.selectedTag?this.selectableItems().index(this.getItem(this.selectedTag)):-1},n.getItem=function(t){return this.selectableItems().filter('[data-index="'+t.id()+'"]')},n.setIndex=function(t,e){var n=this.selectableItems(),r=n.parent();t<0?t=n.length-1:t>=n.length&&(t=0);var o=n.eq(t);if(this.selectedTag=a().store.getById("tags",o.attr("data-index")),m.redraw(),e){var s,i=r.scrollTop(),c=r.offset().top,u=c+r.outerHeight(),l=o.offset().top,d=l+o.outerHeight();lu&&(s=i-u+d+parseInt(r.css("padding-bottom"),10)),void 0!==s&&r.stop(!0).animate({scrollTop:s},100)}},n.onsubmit=function(t){t.preventDefault();var e=this.attrs.discussion,n=this.selected;e&&e.save({relationships:{tags:n}}).then((function(){a().current.matches(gt())&&a().current.get("stream").update(),m.redraw()})),this.attrs.onsubmit&&this.attrs.onsubmit(n),this.hide()},e}(pt());function kt(){(0,G.extend)(lt(),"moderationControls",(function(t,e){e.canTag()&&t.add("tags",m(dt(),{icon:"fas fa-tag",onclick:function(){return app.modal.show(Ct,{discussion:e})}},app.translator.trans("flarum-tags.forum.discussion_controls.edit_tags_button")))}))}const Dt=flarum.core.compat["forum/components/DiscussionComposer"];var St=n.n(Dt);function Et(){(0,G.extend)(l().prototype,"newDiscussionAction",(function(t){var e=this.currentTag();if(e){var n=e.parent(),r=n?[n,e]:[e];t.then((function(t){return t.fields.tags=r}))}else app.composer.fields.tags=[]})),(0,G.extend)(St().prototype,"oninit",(function(){app.tagList.load(["parent"]).then((function(){return m.redraw()}))})),St().prototype.chooseTags=function(){var t=this;Lt().length&&app.modal.show(Ct,{selectedTags:(this.composer.fields.tags||[]).slice(0),onsubmit:function(e){t.composer.fields.tags=e,t.$("textarea").focus()}})},(0,G.extend)(St().prototype,"headerItems",(function(t){var e=this.composer.fields.tags||[],n=Lt();t.add("tags",m("a",{className:C()(["DiscussionComposer-changeTags",!n.length&&"disabled"]),onclick:this.chooseTags.bind(this)},e.length?R(e):m("span",{className:"TagLabel untagged"},app.translator.trans("flarum-tags.forum.composer_discussion.choose_tags_link"))),10)})),(0,G.override)(St().prototype,"onsubmit",(function(t){var e=this,n=this.composer.fields.tags||[],r=n.filter((function(t){return null!==t.position()&&!t.isChild()})),a=n.filter((function(t){return null===t.position()})),o=Lt();(!n.length||r.length{t.exports=n(750)},750:t=>{var e=function(t){"use strict";var e,n=Object.prototype,r=n.hasOwnProperty,a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",s=a.asyncIterator||"@@asyncIterator",i=a.toStringTag||"@@toStringTag";function c(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,n){return t[e]=n}}function u(t,e,n,r){var a=e&&e.prototype instanceof g?e:g,o=Object.create(a.prototype),s=new C(r||[]);return o._invoke=function(t,e,n){var r=m;return function(a,o){if(r===f)throw new Error("Generator is already running");if(r===p){if("throw"===a)throw o;return D()}for(n.method=a,n.arg=o;;){var s=n.delegate;if(s){var i=L(s,n);if(i){if(i===h)continue;return i}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===m)throw r=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=f;var c=l(t,e,n);if("normal"===c.type){if(r=n.done?p:d,c.arg===h)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r=p,n.method="throw",n.arg=c.arg)}}}(t,n,s),o}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var m="suspendedStart",d="suspendedYield",f="executing",p="completed",h={};function g(){}function v(){}function y(){}var T={};c(T,o,(function(){return this}));var b=Object.getPrototypeOf,x=b&&b(b(k([])));x&&x!==n&&r.call(x,o)&&(T=x);var w=y.prototype=g.prototype=Object.create(T);function N(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function _(t,e){function n(a,o,s,i){var c=l(t[a],t,o);if("throw"!==c.type){var u=c.arg,m=u.value;return m&&"object"==typeof m&&r.call(m,"__await")?e.resolve(m.__await).then((function(t){n("next",t,s,i)}),(function(t){n("throw",t,s,i)})):e.resolve(m).then((function(t){u.value=t,s(u)}),(function(t){return n("throw",t,s,i)}))}i(c.arg)}var a;this._invoke=function(t,r){function o(){return new e((function(e,a){n(t,r,e,a)}))}return a=a?a.then(o,o):o()}}function L(t,n){var r=t.iterator[n.method];if(r===e){if(n.delegate=null,"throw"===n.method){if(t.iterator.return&&(n.method="return",n.arg=e,L(t,n),"throw"===n.method))return h;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return h}var a=l(r,t.iterator,n.arg);if("throw"===a.type)return n.method="throw",n.arg=a.arg,n.delegate=null,h;var o=a.arg;return o?o.done?(n[t.resultName]=o.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,h):o:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,h)}function P(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function I(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(P,this),this.reset(!0)}function k(t){if(t){var n=t[o];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,s=function n(){for(;++a=0;--o){var s=this.tryEntries[o],i=s.completion;if("root"===s.tryLoc)return a("end");if(s.tryLoc<=this.prev){var c=r.call(s,"catchLoc"),u=r.call(s,"finallyLoc");if(c&&u){if(this.prev=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),I(n),h}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var a=r.arg;I(n)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:k(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),h}},t}(t.exports);try{regeneratorRuntime=e}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=e:Function("r","regeneratorRuntime = r")(e)}}},e={};function n(r){var a=e[r];if(void 0!==a)return a.exports;var o=e[r]={exports:{}};return t[r](o,o.exports,n),o.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};(()=>{"use strict";n.r(r);var t=n(810),e={};for(const n in t)"default"!==n&&(e[n]=()=>t[n]);n.d(r,e),n(395)})(),module.exports=r})(); +(()=>{var t={810:()=>{},395:(t,e,n)=>{"use strict";const r=flarum.core.compat["forum/app"];var a=n.n(r);const o=flarum.core.compat["common/Model"];var s=n.n(o);const i=flarum.core.compat["common/models/Discussion"];var c=n.n(i);const u=flarum.core.compat["forum/components/IndexPage"];var l=n.n(u);function d(t,e){return d=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},d(t,e)}function f(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,d(t,e)}const p=flarum.core.compat["common/utils/computed"];var h=n.n(p),g=function(t){function e(){return t.apply(this,arguments)||this}f(e,t);var n=e.prototype;return n.name=function(){return s().attribute("name").call(this)},n.slug=function(){return s().attribute("slug").call(this)},n.description=function(){return s().attribute("description").call(this)},n.color=function(){return s().attribute("color").call(this)},n.backgroundUrl=function(){return s().attribute("backgroundUrl").call(this)},n.backgroundMode=function(){return s().attribute("backgroundMode").call(this)},n.icon=function(){return s().attribute("icon").call(this)},n.position=function(){return s().attribute("position").call(this)},n.parent=function(){return s().hasOne("parent").call(this)},n.children=function(){return s().hasMany("children").call(this)},n.defaultSort=function(){return s().attribute("defaultSort").call(this)},n.isChild=function(){return s().attribute("isChild").call(this)},n.isHidden=function(){return s().attribute("isHidden").call(this)},n.discussionCount=function(){return s().attribute("discussionCount").call(this)},n.lastPostedAt=function(){return s().attribute("lastPostedAt",s().transformDate).call(this)},n.lastPostedDiscussion=function(){return s().hasOne("lastPostedDiscussion").call(this)},n.isRestricted=function(){return s().attribute("isRestricted").call(this)},n.canStartDiscussion=function(){return s().attribute("canStartDiscussion").call(this)},n.canAddToDiscussion=function(){return s().attribute("canAddToDiscussion").call(this)},n.isPrimary=function(){return h()("position","parent",(function(t,e){return null!==t&&!1===e})).call(this)},e}(s());const v=flarum.core.compat["common/components/Page"];var y=n.n(v);const T=flarum.core.compat["common/components/Link"];var b=n.n(T);const x=flarum.core.compat["common/components/LoadingIndicator"];var w=n.n(x);const N=flarum.core.compat["common/helpers/listItems"];var _=n.n(N);const L=flarum.core.compat["common/helpers/humanTime"];var P=n.n(L);const I=flarum.core.compat["common/utils/classList"];var C=n.n(I);function k(t,e,n){void 0===e&&(e={}),void 0===n&&(n={});var r=t&&t.icon(),a=n.useColor,o=void 0===a||a;return e.className=C()([e.className,"icon",r?t.icon():"TagIcon"]),t&&o?(e.style=e.style||{},e.style["--color"]=t.color(),r&&(e.style.color=t.color())):t||(e.className+=" untagged"),r?m("i",e):m("span",e)}const D=flarum.core.compat["common/utils/extract"];var S=n.n(D);function E(t,e){void 0===e&&(e={}),e.style=e.style||{},e.className="TagLabel "+(e.className||"");var n=S()(e,"link"),r=t?t.name():app.translator.trans("flarum-tags.lib.deleted_tag_text");if(t){var a=t.color();a&&(e.style["--tag-bg"]=a,e.className+=" colored"),n&&(e.title=t.description()||"",e.href=app.route("tag",{tags:t.slug()})),t.isChild()&&(e.className+=" TagLabel--child")}else e.className+=" untagged";return m(n?b():"span",e,m("span",{className:"TagLabel-text"},t&&t.icon()&&k(t,{},{useColor:!1})," ",r))}function O(t){return t.slice(0).sort((function(t,e){var n=t.position(),r=e.position();if(null===n&&null===r)return e.discussionCount()-t.discussionCount();if(null===r)return-1;if(null===n)return 1;var a=t.parent(),o=e.parent();return a===o?n-r:a&&o?a.position()-o.position():a?a===e?1:a.position()-r:o?o===t?-1:n-o.position():0}))}var A=function(t){function e(){return t.apply(this,arguments)||this}f(e,t);var n=e.prototype;return n.oninit=function(e){var n=this;t.prototype.oninit.call(this,e),app.history.push("tags",app.translator.trans("flarum-tags.forum.header.back_to_tags_tooltip")),this.tags=[];var r=app.preloadedApiDocument();r?this.tags=O(r.filter((function(t){return!t.isChild()}))):(this.loading=!0,app.tagList.load(["children","lastPostedDiscussion","parent"]).then((function(){n.tags=O(app.store.all("tags").filter((function(t){return!t.isChild()}))),n.loading=!1,m.redraw()})))},n.view=function(){if(this.loading)return m(w(),null);var t=this.tags.filter((function(t){return null!==t.position()})),e=this.tags.filter((function(t){return null===t.position()}));return m("div",{className:"TagsPage"},l().prototype.hero(),m("div",{className:"container"},m("nav",{className:"TagsPage-nav IndexPage-nav sideNav"},m("ul",null,_()(l().prototype.sidebarItems().toArray()))),m("div",{className:"TagsPage-content sideNavOffset"},m("ul",{className:"TagTiles"},t.map((function(t){var e=t.lastPostedDiscussion(),n=O(t.children()||[]);return m("li",{className:"TagTile "+(t.color()?"colored":""),style:{"--tag-bg":t.color()}},m(b(),{className:"TagTile-info",href:app.route.tag(t)},t.icon()&&k(t,{},{useColor:!1}),m("h3",{className:"TagTile-name"},t.name()),m("p",{className:"TagTile-description"},t.description()),n?m("div",{className:"TagTile-children"},n.map((function(t){return[m(b(),{href:app.route.tag(t)},t.name())," "]}))):""),e?m(b(),{className:"TagTile-lastPostedDiscussion",href:app.route.discussion(e,e.lastPostNumber())},m("span",{className:"TagTile-lastPostedDiscussion-title"},e.title()),P()(e.lastPostedAt())):m("span",{className:"TagTile-lastPostedDiscussion"}))}))),e.length?m("div",{className:"TagCloud"},e.map((function(t){return[E(t,{link:!0})," "]}))):"")))},n.oncreate=function(e){t.prototype.oncreate.call(this,e),app.setTitle(app.translator.trans("flarum-tags.forum.all_tags.meta_title_text")),app.setTitleCount(0)},e}(y());const j=flarum.core.compat["forum/components/EventPost"];function R(t,e){void 0===e&&(e={});var n=[],r=S()(e,"link");return e.className="TagsLabel "+(e.className||""),t?O(t).forEach((function(e){(e||1===t.length)&&n.push(E(e,{link:r}))})):n.push(E()),m("span",e,n)}var M=function(t){function e(){return t.apply(this,arguments)||this}f(e,t),e.initAttrs=function(e){t.initAttrs.call(this,e);var n=e.post.content()[0],r=e.post.content()[1];function a(t,e){return t.filter((function(t){return-1===e.indexOf(t)})).map((function(t){return app.store.getById("tags",t)}))}e.tagsAdded=a(r,n),e.tagsRemoved=a(n,r)};var n=e.prototype;return n.icon=function(){return"fas fa-tag"},n.descriptionKey=function(){return this.attrs.tagsAdded.length?this.attrs.tagsRemoved.length?"flarum-tags.forum.post_stream.added_and_removed_tags_text":"flarum-tags.forum.post_stream.added_tags_text":"flarum-tags.forum.post_stream.removed_tags_text"},n.descriptionData=function(){var t={};return this.attrs.tagsAdded.length&&(t.tagsAdded=app.translator.trans("flarum-tags.forum.post_stream.tags_text",{tags:R(this.attrs.tagsAdded,{link:!0}),count:this.attrs.tagsAdded.length})),this.attrs.tagsRemoved.length&&(t.tagsRemoved=app.translator.trans("flarum-tags.forum.post_stream.tags_text",{tags:R(this.attrs.tagsRemoved,{link:!0}),count:this.attrs.tagsRemoved.length})),t},e}(n.n(j)());function q(t,e,n,r,a,o,s){try{var i=t[o](s),c=i.value}catch(t){return void n(t)}i.done?e(c):Promise.resolve(c).then(r,a)}var B=n(126),H=n.n(B),F=function(){function t(){this.loadedIncludes=new Set}return t.prototype.load=function(){var t,e=(t=H().mark((function t(e){var n,r=this;return H().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(void 0===e&&(e=[]),0!==(n=e.filter((function(t){return!r.loadedIncludes.has(t)}))).length){t.next=4;break}return t.abrupt("return",Promise.resolve(a().store.all("tags")));case 4:return t.abrupt("return",a().store.find("tags",{include:n.join(",")}).then((function(t){return n.forEach((function(t){return r.loadedIncludes.add(t)})),t})));case 5:case"end":return t.stop()}}),t)})),function(){var e=this,n=arguments;return new Promise((function(r,a){var o=t.apply(e,n);function s(t){q(o,r,a,s,i,"next",t)}function i(t){q(o,r,a,s,i,"throw",t)}s(void 0)}))});return function(t){return e.apply(this,arguments)}}(),t}();const G=flarum.core.compat["common/extend"],K=flarum.core.compat["common/components/Separator"];var $=n.n(K);const U=flarum.core.compat["common/components/LinkButton"];var Y=n.n(U),z=function(t){function e(){return t.apply(this,arguments)||this}return f(e,t),e.prototype.view=function(t){var e=this.attrs.model,n=(this.constructor.isActive(this.attrs),e&&e.description()),r=C()(["TagLinkButton","hasIcon",this.attrs.className,e.isChild()&&"child"]);return m(b(),{className:r,href:this.attrs.route,style:e?{"--color":e.color()}:"",title:n||""},k(e,{className:"Button-icon"}),m("span",{className:"Button-label"},e?e.name():app.translator.trans("flarum-tags.forum.index.untagged_link")))},e.initAttrs=function(e){t.initAttrs.call(this,e);var n=e.model;e.params.tags=n?n.slug():"untagged",e.route=app.route("tag",e.params)},e}(Y());function J(){(0,G.extend)(l().prototype,"navItems",(function(t){if(t.add("tags",m(Y(),{icon:"fas fa-th-large",href:app.route("tags")},app.translator.trans("flarum-tags.forum.index.tags_link")),-10),!app.current.matches(A)){t.add("separator",$().component(),-12);var e=app.search.stickyParams(),n=app.store.all("tags"),r=this.currentTag(),a=function(n){var a=r===n;!a&&r&&(a=r.parent()===n),t.add("tag"+n.id(),z.component({model:n,params:e,active:a},null==n?void 0:n.name()),-14)};O(n).filter((function(t){return null!==t.position()&&(!t.isChild()||r&&(t.parent()===r||t.parent()===r.parent()))})).forEach(a);var o=n.filter((function(t){return null===t.position()})).sort((function(t,e){return e.discussionCount()-t.discussionCount()}));o.splice(0,3).forEach(a),o.length&&t.add("moreTags",m(Y(),{href:app.route("tags")},app.translator.trans("flarum-tags.forum.index.more_link")),-16)}}))}const Q=flarum.core.compat["forum/states/DiscussionListState"];var V=n.n(Q);const W=flarum.core.compat["forum/states/GlobalSearchState"];var X=n.n(W);const Z=flarum.core.compat["common/Component"];var tt=n.n(Z),et=function(t){function e(){return t.apply(this,arguments)||this}return f(e,t),e.prototype.view=function(){var t=this.attrs.model,e=t.color();return m("header",{className:"Hero TagHero"+(e?" TagHero--colored":""),style:e?{"--hero-bg":e}:""},m("div",{className:"container"},m("div",{className:"containerNarrow"},m("h2",{className:"Hero-title"},t.icon()&&k(t,{},{useColor:!1})," ",t.name()),m("div",{className:"Hero-subtitle"},t.description()))))},e}(tt()),nt=function(t){return a().store.all("tags").find((function(e){return 0===e.slug().localeCompare(t,void 0,{sensitivity:"base"})}))};function rt(){l().prototype.currentTag=function(){var t=this;if(this.currentActiveTag)return this.currentActiveTag;var e=a().search.params().tags,n=null;if(e&&(n=nt(e)),e&&!n||n&&!n.isChild()&&!n.children()){if(this.currentTagLoading)return;this.currentTagLoading=!0,a().store.find("tags",e,{include:"children,children.parent,parent,state"}).then((function(){t.currentActiveTag=nt(e),m.redraw()})).finally((function(){t.currentTagLoading=!1}))}return n?(this.currentActiveTag=n,this.currentActiveTag):void 0},(0,G.override)(l().prototype,"hero",(function(t){var e=this.currentTag();return e?m(et,{model:e}):t()})),(0,G.extend)(l().prototype,"view",(function(t){var e=this.currentTag();e&&(t.attrs.className+=" IndexPage--tag"+e.id())})),(0,G.extend)(l().prototype,"setTitle",(function(){var t=this.currentTag();t&&a().setTitle(t.name())})),(0,G.extend)(l().prototype,"sidebarItems",(function(t){var e=this.currentTag();if(e){var n=e.color(),r=e.canStartDiscussion()||!a().session.user,o=t.get("newDiscussion");n&&(o.attrs.className=C()([o.attrs.className,"Button--tagColored"]),o.attrs.style={"--color":n}),o.attrs.disabled=!r,o.children=a().translator.trans(r?"core.forum.index.start_discussion_button":"core.forum.index.cannot_start_discussion_button")}})),(0,G.extend)(X().prototype,"params",(function(t){t.tags=m.route.param("tags")})),(0,G.extend)(V().prototype,"requestParams",(function(t){var e;if("string"==typeof t.include?t.include=[t.include]:null==(e=t.include)||e.push("tags","tags.parent"),this.params.tags){var n,r=null!=(n=t.filter)?n:{};r.tag=this.params.tags;var a=r.q;a&&(r.q=a+" tag:"+this.params.tags),t.filter=r}}))}const at=flarum.core.compat["forum/components/DiscussionListItem"];var ot=n.n(at);const st=flarum.core.compat["forum/components/DiscussionHero"];var it=n.n(st);function ct(){(0,G.extend)(ot().prototype,"infoItems",(function(t){var e=this.attrs.discussion.tags();e&&e.length&&t.add("tags",R(e),10)})),(0,G.extend)(it().prototype,"view",(function(t){var e=O(this.attrs.discussion.tags());if(e&&e.length){var n=e[0].color();n&&(t.attrs.style={"--hero-bg":n},t.attrs.className+=" DiscussionHero--colored")}})),(0,G.extend)(it().prototype,"items",(function(t){var e=this.attrs.discussion.tags();e&&e.length&&t.add("tags",R(e,{link:!0}),5)}))}const ut=flarum.core.compat["forum/utils/DiscussionControls"];var lt=n.n(ut);const mt=flarum.core.compat["common/components/Button"];var dt=n.n(mt);const ft=flarum.core.compat["common/components/Modal"];var pt=n.n(ft);const ht=flarum.core.compat["forum/components/DiscussionPage"];var gt=n.n(ht);const vt=flarum.core.compat["common/helpers/highlight"];var yt=n.n(vt);const Tt=flarum.core.compat["common/utils/extractText"];var bt=n.n(Tt);const xt=flarum.core.compat["forum/utils/KeyboardNavigatable"];var wt=n.n(xt);const Nt=flarum.core.compat["common/utils/Stream"];var _t=n.n(Nt);function Lt(t){var e=app.store.all("tags");return t?e.filter((function(e){return e.canAddToDiscussion()||-1!==t.tags().indexOf(e)})):e.filter((function(t){return t.canStartDiscussion()}))}var Pt=["className","isToggled"],It=function(t){function e(){return t.apply(this,arguments)||this}return f(e,t),e.prototype.view=function(t){var e=this.attrs,n=e.className,r=e.isToggled,a=function(t,e){if(null==t)return{};var n,r,a={},o=Object.keys(t);for(r=0;r=0||(a[n]=t[n]);return a}(e,Pt),o=r?"far fa-check-circle":"far fa-circle";return m(dt(),Object.assign({},a,{icon:o,className:C()([n,r&&"Button--toggled"])}),t.children)},e}(tt()),Ct=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),o=0;o=this.maxPrimary&&!this.bypassReqs&&(e=e.filter((function(e){return!e.isPrimary()||t.selected.includes(e)}))),o>=this.maxSecondary&&!this.bypassReqs&&(e=e.filter((function(e){return e.isPrimary()||t.selected.includes(e)}))),n&&(e=e.filter((function(t){return t.name().substr(0,n.length).toLowerCase()===n}))),this.selectedTag&&e.includes(this.selectedTag)||(this.selectedTag=e[0]);var s=Math.max(bt()(this.getInstruction(r,o)).length,this.filter().length);return[m("div",{className:"Modal-body"},m("div",{className:"TagDiscussionModal-form"},m("div",{className:"TagDiscussionModal-form-input"},m("div",{className:"TagsInput FormControl "+(this.focused?"focus":""),onclick:function(){return t.$(".TagsInput input").focus()}},m("span",{className:"TagsInput-selected"},this.selected.map((function(e){return m("span",{className:"TagsInput-tag",onclick:function(){t.removeTag(e),t.onready()}},E(e))}))),m("input",{className:"FormControl",placeholder:bt()(this.getInstruction(r,o)),bidi:this.filter,style:{width:s+"ch"},onkeydown:this.navigator.navigate.bind(this.navigator),onfocus:function(){return t.focused=!0},onblur:function(){return t.focused=!1}}))),m("div",{className:"TagDiscussionModal-form-submit App-primaryControl"},m(dt(),{type:"submit",className:"Button Button--primary",disabled:!this.meetsRequirements(r,o),icon:"fas fa-check"},a().translator.trans("flarum-tags.forum.choose_tags.submit_button"))))),m("div",{className:"Modal-footer"},m("ul",{className:"TagDiscussionModal-list SelectTagList"},e.filter((function(e){return n||!e.parent()||t.selected.includes(e.parent())})).map((function(e){return m("li",{"data-index":e.id(),className:C()({pinned:null!==e.position(),child:!!e.parent(),colored:!!e.color(),selected:t.selected.includes(e),active:t.selectedTag===e}),style:{color:e.color()},onmouseover:function(){return t.selectedTag=e},onclick:t.toggleTag.bind(t,e)},k(e),m("span",{className:"SelectTagListItem-name"},yt()(e.name(),n)),e.description()?m("span",{className:"SelectTagListItem-description"},e.description()):"")}))),!!a().forum.attribute("canBypassTagCounts")&&m("div",{className:"TagDiscussionModal-controls"},m(It,{className:"Button",onclick:function(){return t.bypassReqs=!t.bypassReqs},isToggled:this.bypassReqs},a().translator.trans("flarum-tags.forum.choose_tags.bypass_requirements"))))]},n.meetsRequirements=function(t,e){return!!this.bypassReqs||t>=this.minPrimary&&e>=this.minSecondary},n.toggleTag=function(t){this.tags&&(this.selected.includes(t)?this.removeTag(t):this.addTag(t),this.filter()&&(this.filter(""),this.selectedTag=this.tags[0]),this.onready())},n.select=function(t){t.metaKey||t.ctrlKey||this.selectedTag&&this.selected.includes(this.selectedTag)?this.selected.length&&this.$('button[type="submit"]').click():this.selectedTag&&this.getItem(this.selectedTag)[0].dispatchEvent(new Event("click"))},n.selectableItems=function(){return this.$(".TagDiscussionModal-list > li")},n.getCurrentNumericIndex=function(){return this.selectedTag?this.selectableItems().index(this.getItem(this.selectedTag)):-1},n.getItem=function(t){return this.selectableItems().filter('[data-index="'+t.id()+'"]')},n.setIndex=function(t,e){var n=this.selectableItems(),r=n.parent();t<0?t=n.length-1:t>=n.length&&(t=0);var o=n.eq(t);if(this.selectedTag=a().store.getById("tags",o.attr("data-index")),m.redraw(),e&&this.selectedTag){var s,i=r.scrollTop(),c=r.offset().top,u=c+r.outerHeight(),l=o.offset().top,d=l+o.outerHeight();lu&&(s=i-u+d+parseInt(r.css("padding-bottom"),10)),void 0!==s&&r.stop(!0).animate({scrollTop:s},100)}},n.onsubmit=function(t){t.preventDefault();var e=this.attrs.discussion,n=this.selected;e&&e.save({relationships:{tags:n}}).then((function(){a().current.matches(gt())&&a().current.get("stream").update(),m.redraw()})),this.attrs.onsubmit&&this.attrs.onsubmit(n),this.hide()},e}(pt());function kt(){(0,G.extend)(lt(),"moderationControls",(function(t,e){e.canTag()&&t.add("tags",m(dt(),{icon:"fas fa-tag",onclick:function(){return app.modal.show(Ct,{discussion:e})}},app.translator.trans("flarum-tags.forum.discussion_controls.edit_tags_button")))}))}const Dt=flarum.core.compat["forum/components/DiscussionComposer"];var St=n.n(Dt);function Et(){(0,G.extend)(l().prototype,"newDiscussionAction",(function(t){var e=this.currentTag();if(e){var n=e.parent(),r=n?[n,e]:[e];t.then((function(t){return t.fields.tags=r}))}else app.composer.fields.tags=[]})),(0,G.extend)(St().prototype,"oninit",(function(){app.tagList.load(["parent"]).then((function(){return m.redraw()}))})),St().prototype.chooseTags=function(){var t=this;Lt().length&&app.modal.show(Ct,{selectedTags:(this.composer.fields.tags||[]).slice(0),onsubmit:function(e){t.composer.fields.tags=e,t.$("textarea").focus()}})},(0,G.extend)(St().prototype,"headerItems",(function(t){var e=this.composer.fields.tags||[],n=Lt();t.add("tags",m("a",{className:C()(["DiscussionComposer-changeTags",!n.length&&"disabled"]),onclick:this.chooseTags.bind(this)},e.length?R(e):m("span",{className:"TagLabel untagged"},app.translator.trans("flarum-tags.forum.composer_discussion.choose_tags_link"))),10)})),(0,G.override)(St().prototype,"onsubmit",(function(t){var e=this,n=this.composer.fields.tags||[],r=n.filter((function(t){return null!==t.position()&&!t.isChild()})),a=n.filter((function(t){return null===t.position()})),o=Lt();(!n.length||r.length{t.exports=n(750)},750:t=>{var e=function(t){"use strict";var e,n=Object.prototype,r=n.hasOwnProperty,a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",s=a.asyncIterator||"@@asyncIterator",i=a.toStringTag||"@@toStringTag";function c(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,n){return t[e]=n}}function u(t,e,n,r){var a=e&&e.prototype instanceof g?e:g,o=Object.create(a.prototype),s=new C(r||[]);return o._invoke=function(t,e,n){var r=m;return function(a,o){if(r===f)throw new Error("Generator is already running");if(r===p){if("throw"===a)throw o;return D()}for(n.method=a,n.arg=o;;){var s=n.delegate;if(s){var i=L(s,n);if(i){if(i===h)continue;return i}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===m)throw r=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=f;var c=l(t,e,n);if("normal"===c.type){if(r=n.done?p:d,c.arg===h)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r=p,n.method="throw",n.arg=c.arg)}}}(t,n,s),o}function l(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var m="suspendedStart",d="suspendedYield",f="executing",p="completed",h={};function g(){}function v(){}function y(){}var T={};c(T,o,(function(){return this}));var b=Object.getPrototypeOf,x=b&&b(b(k([])));x&&x!==n&&r.call(x,o)&&(T=x);var w=y.prototype=g.prototype=Object.create(T);function N(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function _(t,e){function n(a,o,s,i){var c=l(t[a],t,o);if("throw"!==c.type){var u=c.arg,m=u.value;return m&&"object"==typeof m&&r.call(m,"__await")?e.resolve(m.__await).then((function(t){n("next",t,s,i)}),(function(t){n("throw",t,s,i)})):e.resolve(m).then((function(t){u.value=t,s(u)}),(function(t){return n("throw",t,s,i)}))}i(c.arg)}var a;this._invoke=function(t,r){function o(){return new e((function(e,a){n(t,r,e,a)}))}return a=a?a.then(o,o):o()}}function L(t,n){var r=t.iterator[n.method];if(r===e){if(n.delegate=null,"throw"===n.method){if(t.iterator.return&&(n.method="return",n.arg=e,L(t,n),"throw"===n.method))return h;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return h}var a=l(r,t.iterator,n.arg);if("throw"===a.type)return n.method="throw",n.arg=a.arg,n.delegate=null,h;var o=a.arg;return o?o.done?(n[t.resultName]=o.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,h):o:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,h)}function P(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function I(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(P,this),this.reset(!0)}function k(t){if(t){var n=t[o];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,s=function n(){for(;++a=0;--o){var s=this.tryEntries[o],i=s.completion;if("root"===s.tryLoc)return a("end");if(s.tryLoc<=this.prev){var c=r.call(s,"catchLoc"),u=r.call(s,"finallyLoc");if(c&&u){if(this.prev=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.call(a,"finallyLoc")&&this.prev=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),I(n),h}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var a=r.arg;I(n)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:k(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),h}},t}(t.exports);try{regeneratorRuntime=e}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=e:Function("r","regeneratorRuntime = r")(e)}}},e={};function n(r){var a=e[r];if(void 0!==a)return a.exports;var o=e[r]={exports:{}};return t[r](o,o.exports,n),o.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};(()=>{"use strict";n.r(r);var t=n(810),e={};for(const n in t)"default"!==n&&(e[n]=()=>t[n]);n.d(r,e),n(395)})(),module.exports=r})(); //# sourceMappingURL=forum.js.map \ No newline at end of file diff --git a/extensions/tags/js/dist/forum.js.map b/extensions/tags/js/dist/forum.js.map index e586b217f..de051139e 100644 --- a/extensions/tags/js/dist/forum.js.map +++ b/extensions/tags/js/dist/forum.js.map @@ -1 +1 @@ -{"version":3,"file":"forum.js","mappings":"mDAAA,MAAM,EAA+BA,OAAOC,KAAKC,OAAO,a,aCAxD,MAAM,EAA+BF,OAAOC,KAAKC,OAAO,gB,aCAxD,MAAM,EAA+BF,OAAOC,KAAKC,OAAO,4B,aCAxD,MAAM,EAA+BF,OAAOC,KAAKC,OAAO,8B,aCAzC,SAASC,EAAgBC,EAAGC,GAMzC,OALAF,EAAkBG,OAAOC,gBAAkB,SAAyBH,EAAGC,GAErE,OADAD,EAAEI,UAAYH,EACPD,GAGFD,EAAgBC,EAAGC,GCLb,SAASI,EAAeC,EAAUC,GAC/CD,EAASE,UAAYN,OAAOO,OAAOF,EAAWC,WAC9CF,EAASE,UAAUE,YAAcJ,EACjCH,EAAeG,EAAUC,GCJ3B,MAAM,EAA+BX,OAAOC,KAAKC,OAAO,yB,aCInCa,EAAAA,SAAAA,G,oFACnBC,KAAA,WACE,OAAOC,IAAAA,UAAwB,QAAQC,KAAKC,O,EAE9CC,KAAA,WACE,OAAOH,IAAAA,UAAwB,QAAQC,KAAKC,O,EAE9CE,YAAA,WACE,OAAOJ,I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gBD,EAAOC,SAGtC,IACE8G,mBAAqB7G,EACrB,MAAO8G,GAWmB,iBAAfC,WACTA,WAAWF,mBAAqB7G,EAEhCgH,SAAS,IAAK,yBAAdA,CAAwChH,MC9uBxCiH,EAA2B,GAG/B,SAASC,EAAoBC,GAE5B,IAAIC,EAAeH,EAAyBE,GAC5C,QAAqBpR,IAAjBqR,EACH,OAAOA,EAAarH,QAGrB,IAAID,EAASmH,EAAyBE,GAAY,CAGjDpH,QAAS,IAOV,OAHAsH,EAAoBF,GAAUrH,EAAQA,EAAOC,QAASmH,GAG/CpH,EAAOC,QCpBfmH,EAAoBI,EAAKxH,IACxB,IAAIyH,EAASzH,GAAUA,EAAO0H,WAC7B,IAAO1H,EAAiB,QACxB,IAAM,EAEP,OADAoH,EAAoBO,EAAEF,EAAQ,CAAE/W,EAAG+W,IAC5BA,GCLRL,EAAoBO,EAAI,CAAC1H,EAAS2H,KACjC,IAAI,IAAIlT,KAAOkT,EACXR,EAAoBva,EAAE+a,EAAYlT,KAAS0S,EAAoBva,EAAEoT,EAASvL,IAC5E3H,OAAOiU,eAAef,EAASvL,EAAK,CAAEuM,YAAY,EAAMjJ,IAAK4P,EAAWlT,MCJ3E0S,EAAoBva,EAAI,CAACkU,EAAK8G,IAAU9a,OAAOM,UAAUgT,eAAe1S,KAAKoT,EAAK8G,GCClFT,EAAoBU,EAAK7H,IACH,oBAAXM,QAA0BA,OAAOM,aAC1C9T,OAAOiU,eAAef,EAASM,OAAOM,YAAa,CAAEhM,MAAO,WAE7D9H,OAAOiU,eAAef,EAAS,aAAc,CAAEpL,OAAO,K","sources":["webpack://@flarum/tags/external root \"flarum.core.compat['forum/app']\"","webpack://@flarum/tags/external root \"flarum.core.compat['common/Model']\"","webpack://@flarum/tags/external root \"flarum.core.compat['common/models/Discussion']\"","webpack://@flarum/tags/external root \"flarum.core.compat['forum/components/IndexPage']\"","webpack://@flarum/tags/../../../node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js","webpack://@flarum/tags/../../../node_modules/@babel/runtime/helpers/esm/inheritsLoose.js","webpack://@flarum/tags/external root \"flarum.core.compat['common/utils/computed']\"","webpack://@flarum/tags/./src/common/models/Tag.ts","webpack://@flarum/tags/external root \"flarum.core.compat['common/components/Page']\"","webpack://@flarum/tags/external root \"flarum.core.compat['common/components/Link']\"","webpack://@flarum/tags/external root \"flarum.core.compat['common/components/LoadingIndicator']\"","webpack://@flarum/tags/external root \"flarum.core.compat['common/helpers/listItems']\"","webpack://@flarum/tags/external root \"flarum.core.compat['common/helpers/humanTime']\"","webpack://@flarum/tags/external root \"flarum.core.compat['common/utils/classList']\"","webpack://@flarum/tags/./src/common/helpers/tagIcon.js","webpack://@flarum/tags/external root \"flarum.core.compat['common/utils/extract']\"","webpack://@flarum/tags/./src/common/helpers/tagLabel.js","webpack://@flarum/tags/./src/common/utils/sortTags.tsx","webpack://@flarum/tags/./src/forum/components/TagsPage.js","webpack://@flarum/tags/external root \"flarum.core.compat['forum/components/EventPost']\"","webpack://@flarum/tags/./src/common/helpers/tagsLabel.js","webpack://@flarum/tags/./src/forum/components/DiscussionTaggedPost.js","webpack://@flarum/tags/../../../node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js","webpack://@flarum/tags/./src/forum/states/TagListState.ts","webpack://@flarum/tags/external root \"flarum.core.compat['common/extend']\"","webpack://@flarum/tags/external root \"flarum.core.compat['common/components/Separator']\"","webpack://@flarum/tags/external root \"flarum.core.compat['common/components/LinkButton']\"","webpack://@flarum/tags/./src/forum/components/TagLinkButton.js","webpack://@flarum/tags/./src/forum/addTagList.js","webpack://@flarum/tags/external root \"flarum.core.compat['forum/states/DiscussionListState']\"","webpack://@flarum/tags/external root \"flarum.core.compat['forum/states/GlobalSearchState']\"","webpack://@flarum/tags/external root \"flarum.core.compat['common/Component']\"","webpack://@flarum/tags/./src/forum/components/TagHero.js","webpack://@flarum/tags/./src/forum/addTagFilter.tsx","webpack://@flarum/tags/external root \"flarum.core.compat['forum/components/DiscussionListItem']\"","webpack://@flarum/tags/external root \"flarum.core.compat['forum/components/DiscussionHero']\"","webpack://@flarum/tags/./src/forum/addTagLabels.js","webpack://@flarum/tags/external root \"flarum.core.compat['forum/utils/DiscussionControls']\"","webpack://@flarum/tags/external root \"flarum.core.compat['common/components/Button']\"","webpack://@flarum/tags/external root \"flarum.core.compat['common/components/Modal']\"","webpack://@flarum/tags/external root \"flarum.core.compat['forum/components/DiscussionPage']\"","webpack://@flarum/tags/external root \"flarum.core.compat['common/helpers/highlight']\"","webpack://@flarum/tags/external root \"flarum.core.compat['common/utils/extractText']\"","webpack://@flarum/tags/external root \"flarum.core.compat['forum/utils/KeyboardNavigatable']\"","webpack://@flarum/tags/external root \"flarum.core.compat['common/utils/Stream']\"","webpack://@flarum/tags/./src/forum/utils/getSelectableTags.js","webpack://@flarum/tags/./src/forum/components/ToggleButton.js","webpack://@flarum/tags/../../../node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js","webpack://@flarum/tags/./src/forum/components/TagDiscussionModal.tsx","webpack://@flarum/tags/./src/forum/addTagControl.js","webpack://@flarum/tags/external root \"flarum.core.compat['forum/components/DiscussionComposer']\"","webpack://@flarum/tags/./src/forum/addTagComposer.js","webpack://@flarum/tags/./src/common/compat.js","webpack://@flarum/tags/./src/forum/compat.js","webpack://@flarum/tags/external assign \"flarum.core\"","webpack://@flarum/tags/./src/forum/index.ts","webpack://@flarum/tags/../../../node_modules/@babel/runtime/regenerator/index.js","webpack://@flarum/tags/../../../node_modules/regenerator-runtime/runtime.js","webpack://@flarum/tags/webpack/bootstrap","webpack://@flarum/tags/webpack/runtime/compat get default export","webpack://@flarum/tags/webpack/runtime/define property getters","webpack://@flarum/tags/webpack/runtime/hasOwnProperty shorthand","webpack://@flarum/tags/webpack/runtime/make namespace object"],"sourcesContent":["const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/app'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/Model'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/models/Discussion'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/IndexPage'];","export default function _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\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/utils/computed'];","import computed from 'flarum/common/utils/computed';\nimport Model from 'flarum/common/Model';\nimport type Discussion from 'flarum/common/models/Discussion';\n\nexport default class Tag extends Model {\n name() {\n return Model.attribute('name').call(this);\n }\n slug() {\n return Model.attribute('slug').call(this);\n }\n description() {\n return Model.attribute('description').call(this);\n }\n\n color() {\n return Model.attribute('color').call(this);\n }\n backgroundUrl() {\n return Model.attribute('backgroundUrl').call(this);\n }\n backgroundMode() {\n return Model.attribute('backgroundMode').call(this);\n }\n icon() {\n return Model.attribute('icon').call(this);\n }\n\n position() {\n return Model.attribute('position').call(this);\n }\n parent() {\n return Model.hasOne('parent').call(this);\n }\n children() {\n return Model.hasMany('children').call(this);\n }\n defaultSort() {\n return Model.attribute('defaultSort').call(this);\n }\n isChild() {\n return Model.attribute('isChild').call(this);\n }\n isHidden() {\n return Model.attribute('isHidden').call(this);\n }\n\n discussionCount() {\n return Model.attribute('discussionCount').call(this);\n }\n lastPostedAt() {\n return Model.attribute('lastPostedAt', Model.transformDate).call(this);\n }\n lastPostedDiscussion() {\n return Model.hasOne('lastPostedDiscussion').call(this);\n }\n\n isRestricted() {\n return Model.attribute('isRestricted').call(this);\n }\n canStartDiscussion() {\n return Model.attribute('canStartDiscussion').call(this);\n }\n canAddToDiscussion() {\n return Model.attribute('canAddToDiscussion').call(this);\n }\n\n isPrimary() {\n return computed('position', 'parent', (position, parent) => position !== null && parent === false).call(this);\n }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Page'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Link'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/LoadingIndicator'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/helpers/listItems'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/helpers/humanTime'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/classList'];","import classList from 'flarum/common/utils/classList';\n\nexport default function tagIcon(tag, attrs = {}, settings = {}) {\n const hasIcon = tag && tag.icon();\n const { useColor = true } = settings;\n\n attrs.className = classList([\n attrs.className,\n 'icon',\n hasIcon ? tag.icon() : 'TagIcon'\n ]);\n\n if (tag && useColor) {\n attrs.style = attrs.style || {};\n attrs.style['--color'] = tag.color();\n\n if (hasIcon) {\n attrs.style.color = tag.color();\n }\n } else if (!tag) {\n attrs.className += ' untagged';\n }\n\n return hasIcon ? : ;\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/extract'];","import extract from 'flarum/common/utils/extract';\nimport Link from 'flarum/common/components/Link';\nimport tagIcon from './tagIcon';\n\nexport default function tagLabel(tag, attrs = {}) {\n attrs.style = attrs.style || {};\n attrs.className = 'TagLabel ' + (attrs.className || '');\n\n const link = extract(attrs, 'link');\n const tagText = tag ? tag.name() : app.translator.trans('flarum-tags.lib.deleted_tag_text');\n\n if (tag) {\n const color = tag.color();\n if (color) {\n attrs.style['--tag-bg'] = color;\n attrs.className += ' colored';\n }\n\n if (link) {\n attrs.title = tag.description() || '';\n attrs.href = app.route('tag', {tags: tag.slug()});\n }\n\n if (tag.isChild()) {\n attrs.className += ' TagLabel--child';\n }\n } else {\n attrs.className += ' untagged';\n }\n\n return (\n m((link ? Link : 'span'), attrs,\n \n {tag && tag.icon() && tagIcon(tag, {}, {useColor: false})} {tagText}\n \n )\n );\n}\n","import Tag from \"../models/Tag\";\n\nexport default function sortTags(tags: Tag[]) {\n return tags.slice(0).sort((a, b) => {\n const aPos = a.position();\n const bPos = b.position();\n\n // If they're both secondary tags, sort them by their discussions count,\n // descending.\n if (aPos === null && bPos === null)\n return b.discussionCount() - a.discussionCount();\n\n // If just one is a secondary tag, then the primary tag should\n // come first.\n if (bPos === null) return -1;\n if (aPos === null) return 1;\n\n // If we've made it this far, we know they're both primary tags. So we'll\n // need to see if they have parents.\n const aParent = a.parent();\n const bParent = b.parent();\n\n // If they both have the same parent, then their positions are local,\n // so we can compare them directly.\n if (aParent === bParent) return aPos - bPos;\n\n // If they are both child tags, then we will compare the positions of their\n // parents.\n else if (aParent && bParent)\n return aParent.position()! - bParent.position()!;\n\n // If we are comparing a child tag with its parent, then we let the parent\n // come first. If we are comparing an unrelated parent/child, then we\n // compare both of the parents.\n else if (aParent)\n return aParent === b ? 1 : aParent.position()! - bPos;\n\n else if (bParent)\n return bParent === a ? -1 : aPos - bParent.position()!;\n\n return 0;\n });\n}\n","import Page from 'flarum/common/components/Page';\nimport IndexPage from 'flarum/forum/components/IndexPage';\nimport Link from 'flarum/common/components/Link';\nimport LoadingIndicator from 'flarum/common/components/LoadingIndicator';\nimport listItems from 'flarum/common/helpers/listItems';\nimport humanTime from 'flarum/common/helpers/humanTime';\n\nimport tagIcon from '../../common/helpers/tagIcon';\nimport tagLabel from '../../common/helpers/tagLabel';\nimport sortTags from '../../common/utils/sortTags';\n\nexport default class TagsPage extends Page {\n oninit(vnode) {\n super.oninit(vnode);\n\n app.history.push('tags', app.translator.trans('flarum-tags.forum.header.back_to_tags_tooltip'));\n\n this.tags = [];\n\n const preloaded = app.preloadedApiDocument();\n\n if (preloaded) {\n this.tags = sortTags(preloaded.filter(tag => !tag.isChild()));\n return;\n }\n\n this.loading = true;\n\n app.tagList.load(['children', 'lastPostedDiscussion', 'parent']).then(() => {\n this.tags = sortTags(app.store.all('tags').filter(tag => !tag.isChild()));\n\n this.loading = false;\n\n m.redraw();\n });\n }\n\n view() {\n if (this.loading) {\n return ;\n }\n\n const pinned = this.tags.filter(tag => tag.position() !== null);\n const cloud = this.tags.filter(tag => tag.position() === null);\n\n return (\n
\n {IndexPage.prototype.hero()}\n
\n \n\n
\n
    \n {pinned.map(tag => {\n const lastPostedDiscussion = tag.lastPostedDiscussion();\n const children = sortTags(tag.children() || []);\n\n return (\n
  • \n \n {tag.icon() && tagIcon(tag, {}, { useColor: false })}\n

    {tag.name()}

    \n

    {tag.description()}

    \n {children\n ? (\n
    \n {children.map(child => [\n \n {child.name()}\n ,\n ' '\n ])}\n
    \n ) : ''}\n \n {lastPostedDiscussion\n ? (\n \n {lastPostedDiscussion.title()}\n {humanTime(lastPostedDiscussion.lastPostedAt())}\n \n ) : (\n \n )}\n
  • \n );\n })}\n
\n\n {cloud.length ? (\n
\n {cloud.map(tag => [\n tagLabel(tag, {link: true}),\n ' ',\n ])}\n
\n ) : ''}\n
\n
\n
\n );\n }\n\n oncreate(vnode) {\n super.oncreate(vnode);\n\n app.setTitle(app.translator.trans('flarum-tags.forum.all_tags.meta_title_text'));\n app.setTitleCount(0);\n }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/EventPost'];","import extract from 'flarum/common/utils/extract';\nimport tagLabel from './tagLabel';\nimport sortTags from '../utils/sortTags';\n\nexport default function tagsLabel(tags, attrs = {}) {\n const children = [];\n const link = extract(attrs, 'link');\n\n attrs.className = 'TagsLabel ' + (attrs.className || '');\n\n if (tags) {\n sortTags(tags).forEach(tag => {\n if (tag || tags.length === 1) {\n children.push(tagLabel(tag, {link}));\n }\n });\n } else {\n children.push(tagLabel());\n }\n\n return {children};\n}\n","import EventPost from 'flarum/forum/components/EventPost';\nimport tagsLabel from '../../common/helpers/tagsLabel';\n\nexport default class DiscussionTaggedPost extends EventPost {\n static initAttrs(attrs) {\n super.initAttrs(attrs);\n\n const oldTags = attrs.post.content()[0];\n const newTags = attrs.post.content()[1];\n\n function diffTags(tags1, tags2) {\n return tags1\n .filter(tag => tags2.indexOf(tag) === -1)\n .map(id => app.store.getById('tags', id));\n }\n\n attrs.tagsAdded = diffTags(newTags, oldTags);\n attrs.tagsRemoved = diffTags(oldTags, newTags);\n }\n\n icon() {\n return 'fas fa-tag';\n }\n\n descriptionKey() {\n if (this.attrs.tagsAdded.length) {\n if (this.attrs.tagsRemoved.length) {\n return 'flarum-tags.forum.post_stream.added_and_removed_tags_text';\n }\n\n return 'flarum-tags.forum.post_stream.added_tags_text';\n }\n\n return 'flarum-tags.forum.post_stream.removed_tags_text';\n }\n\n descriptionData() {\n const data = {};\n\n if (this.attrs.tagsAdded.length) {\n data.tagsAdded = app.translator.trans('flarum-tags.forum.post_stream.tags_text', {\n tags: tagsLabel(this.attrs.tagsAdded, {link: true}),\n count: this.attrs.tagsAdded.length\n });\n }\n\n if (this.attrs.tagsRemoved.length) {\n data.tagsRemoved = app.translator.trans('flarum-tags.forum.post_stream.tags_text', {\n tags: tagsLabel(this.attrs.tagsRemoved, {link: true}),\n count: this.attrs.tagsRemoved.length\n });\n }\n\n return data;\n }\n}\n","function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n\n if (info.done) {\n resolve(value);\n } else {\n Promise.resolve(value).then(_next, _throw);\n }\n}\n\nexport default function _asyncToGenerator(fn) {\n return function () {\n var self = this,\n args = arguments;\n return new Promise(function (resolve, reject) {\n var gen = fn.apply(self, args);\n\n function _next(value) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n }\n\n function _throw(err) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n }\n\n _next(undefined);\n });\n };\n}","import app from \"flarum/forum/app\";\nimport type Tag from \"../../common/models/Tag\";\n\nexport default class TagListState {\n loadedIncludes = new Set();\n\n async load(includes: string[] = []): Promise {\n const unloadedIncludes = includes.filter(\n (include) => !this.loadedIncludes.has(include)\n );\n\n if (unloadedIncludes.length === 0) {\n return Promise.resolve(app.store.all(\"tags\"));\n }\n\n return app.store\n .find(\"tags\", { include: unloadedIncludes.join(\",\") })\n .then((val) => {\n unloadedIncludes.forEach((include) => this.loadedIncludes.add(include));\n return val;\n });\n }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/extend'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Separator'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/LinkButton'];","import Link from 'flarum/common/components/Link';\nimport LinkButton from 'flarum/common/components/LinkButton';\nimport classList from 'flarum/common/utils/classList';\nimport tagIcon from '../../common/helpers/tagIcon';\n\nexport default class TagLinkButton extends LinkButton {\n view(vnode) {\n const tag = this.attrs.model;\n const active = this.constructor.isActive(this.attrs);\n const description = tag && tag.description();\n const className = classList([\n 'TagLinkButton',\n 'hasIcon',\n this.attrs.className,\n tag.isChild() && 'child',\n ]);\n\n return (\n \n {tagIcon(tag, { className: 'Button-icon' })}\n \n {tag ? tag.name() : app.translator.trans('flarum-tags.forum.index.untagged_link')}\n \n \n );\n }\n\n static initAttrs(attrs) {\n super.initAttrs(attrs);\n\n const tag = attrs.model;\n\n attrs.params.tags = tag ? tag.slug() : 'untagged';\n attrs.route = app.route('tag', attrs.params);\n }\n}\n","import { extend } from 'flarum/common/extend';\nimport IndexPage from 'flarum/forum/components/IndexPage';\nimport Separator from 'flarum/common/components/Separator';\nimport LinkButton from 'flarum/common/components/LinkButton';\n\nimport TagLinkButton from './components/TagLinkButton';\nimport TagsPage from './components/TagsPage';\nimport sortTags from '../common/utils/sortTags';\n\nexport default function() {\n // Add a link to the tags page, as well as a list of all the tags,\n // to the index page's sidebar.\n extend(IndexPage.prototype, 'navItems', function (items) {\n items.add('tags', \n {app.translator.trans('flarum-tags.forum.index.tags_link')}\n \n , -10);\n\n if (app.current.matches(TagsPage)) return;\n\n items.add('separator', Separator.component(), -12);\n\n const params = app.search.stickyParams();\n const tags = app.store.all('tags');\n const currentTag = this.currentTag();\n\n const addTag = tag => {\n let active = currentTag === tag;\n\n if (!active && currentTag) {\n active = currentTag.parent() === tag;\n }\n\n // tag.name() is passed here as children even though it isn't used directly\n // because when we need to get the active child in SelectDropdown, we need to\n // use its children to populate the dropdown. The problem here is that `view`\n // on TagLinkButton is only called AFTER SelectDropdown, so no children are available\n // for SelectDropdown to use at the time.\n items.add('tag' + tag.id(), TagLinkButton.component({model: tag, params, active}, tag?.name()), -14);\n };\n\n sortTags(tags)\n .filter(tag => tag.position() !== null && (!tag.isChild() || (currentTag && (tag.parent() === currentTag || tag.parent() === currentTag.parent()))))\n .forEach(addTag);\n\n const more = tags\n .filter(tag => tag.position() === null)\n .sort((a, b) => b.discussionCount() - a.discussionCount());\n\n more.splice(0, 3).forEach(addTag);\n\n if (more.length) {\n items.add('moreTags', \n {app.translator.trans('flarum-tags.forum.index.more_link')}\n , -16)\n }\n });\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/states/DiscussionListState'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/states/GlobalSearchState'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/Component'];","import Component from 'flarum/common/Component';\nimport tagIcon from '../../common/helpers/tagIcon';\n\nexport default class TagHero extends Component {\n view() {\n const tag = this.attrs.model;\n const color = tag.color();\n\n return (\n
\n
\n
\n

{tag.icon() && tagIcon(tag, {}, { useColor: false })} {tag.name()}

\n
{tag.description()}
\n
\n
\n
\n );\n }\n}\n","import app from 'flarum/forum/app';\nimport type Mithril from 'mithril';\nimport { extend, override } from 'flarum/common/extend';\nimport IndexPage from 'flarum/forum/components/IndexPage';\nimport DiscussionListState from 'flarum/forum/states/DiscussionListState';\nimport GlobalSearchState from 'flarum/forum/states/GlobalSearchState';\nimport classList from 'flarum/common/utils/classList';\n\nimport TagHero from './components/TagHero';\nimport Tag from '../common/models/Tag';\nimport { ComponentAttrs } from 'flarum/common/Component';\n\nconst findTag = (slug: string) => app.store.all('tags').find(tag => tag.slug().localeCompare(slug, undefined, { sensitivity: 'base' }) === 0);\n\nexport default function() {\n IndexPage.prototype.currentTag = function() {\n if (this.currentActiveTag) {\n return this.currentActiveTag;\n }\n\n const slug = app.search.params().tags;\n let tag = null;\n\n if (slug) {\n tag = findTag(slug);\n }\n\n if (slug && !tag || (tag && !tag.isChild() && !tag.children())) {\n if (this.currentTagLoading) {\n return;\n }\n\n this.currentTagLoading = true;\n\n // Unlike the backend, no need to fetch parent.children because if we're on\n // a child tag page, then either:\n // - We loaded in that child tag (and its siblings) in the API document\n // - We first navigated to the current tag's parent, which would have loaded in the current tag's siblings.\n app.store.find('tags', slug, { include: 'children,children.parent,parent,state'}).then(() => {\n this.currentActiveTag = findTag(slug);\n\n m.redraw();\n }).finally(() => {\n this.currentTagLoading = false;\n });\n }\n\n if (tag) {\n this.currentActiveTag = tag;\n return this.currentActiveTag;\n }\n\n return;\n };\n\n // If currently viewing a tag, insert a tag hero at the top of the view.\n override(IndexPage.prototype, 'hero', function(original) {\n const tag = this.currentTag();\n\n if (tag) return ;\n\n return original();\n });\n\n extend(IndexPage.prototype, 'view', function(vdom: Mithril.Vnode) {\n const tag = this.currentTag();\n\n if (tag) vdom.attrs.className += ' IndexPage--tag'+tag.id();\n });\n\n extend(IndexPage.prototype, 'setTitle', function() {\n const tag = this.currentTag();\n\n if (tag) {\n app.setTitle(tag.name());\n }\n });\n\n // If currently viewing a tag, restyle the 'new discussion' button to use\n // the tag's color, and disable if the user isn't allowed to edit.\n extend(IndexPage.prototype, 'sidebarItems', function(items) {\n const tag = this.currentTag();\n\n if (tag) {\n const color = tag.color();\n const canStartDiscussion = tag.canStartDiscussion() || !app.session.user;\n const newDiscussion = items.get('newDiscussion') as Mithril.Vnode;\n\n if (color) {\n newDiscussion.attrs.className = classList([newDiscussion.attrs.className, 'Button--tagColored']);\n newDiscussion.attrs.style = { '--color': color };\n }\n\n newDiscussion.attrs.disabled = !canStartDiscussion;\n newDiscussion.children = app.translator.trans(canStartDiscussion ? 'core.forum.index.start_discussion_button' : 'core.forum.index.cannot_start_discussion_button');\n }\n });\n\n // Add a parameter for the global search state to pass on to the\n // DiscussionListState that will let us filter discussions by tag.\n extend(GlobalSearchState.prototype, 'params', function(params) {\n params.tags = m.route.param('tags');\n });\n\n // Translate that parameter into a gambit appended to the search query.\n extend(DiscussionListState.prototype, 'requestParams', function(this: DiscussionListState, params) {\n if (typeof params.include === 'string') {\n params.include = [params.include];\n } else {\n params.include?.push('tags', 'tags.parent');\n }\n\n if (this.params.tags) {\n const filter = params.filter ?? {};\n filter.tag = this.params.tags;\n // TODO: replace this with a more robust system.\n const q = filter.q;\n if (q) {\n filter.q = `${q} tag:${this.params.tags}`;\n }\n params.filter = filter\n }\n });\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/DiscussionListItem'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/DiscussionHero'];","import { extend } from 'flarum/common/extend';\nimport DiscussionListItem from 'flarum/forum/components/DiscussionListItem';\nimport DiscussionHero from 'flarum/forum/components/DiscussionHero';\n\nimport tagsLabel from '../common/helpers/tagsLabel';\nimport sortTags from '../common/utils/sortTags';\n\nexport default function() {\n // Add tag labels to each discussion in the discussion list.\n extend(DiscussionListItem.prototype, 'infoItems', function(items) {\n const tags = this.attrs.discussion.tags();\n\n if (tags && tags.length) {\n items.add('tags', tagsLabel(tags), 10);\n }\n });\n\n // Restyle a discussion's hero to use its first tag's color.\n extend(DiscussionHero.prototype, 'view', function(view) {\n const tags = sortTags(this.attrs.discussion.tags());\n\n if (tags && tags.length) {\n const color = tags[0].color();\n if (color) {\n view.attrs.style = { '--hero-bg': color };\n view.attrs.className += ' DiscussionHero--colored';\n }\n }\n });\n\n // Add a list of a discussion's tags to the discussion hero, displayed\n // before the title. Put the title on its own line.\n extend(DiscussionHero.prototype, 'items', function(items) {\n const tags = this.attrs.discussion.tags();\n\n if (tags && tags.length) {\n items.add('tags', tagsLabel(tags, {link: true}), 5);\n }\n });\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/utils/DiscussionControls'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Button'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Modal'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/DiscussionPage'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/helpers/highlight'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/extractText'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/utils/KeyboardNavigatable'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/Stream'];","export default function getSelectableTags(discussion) {\n let tags = app.store.all('tags');\n\n if (discussion) {\n tags = tags.filter(tag => tag.canAddToDiscussion() || discussion.tags().indexOf(tag) !== -1);\n } else {\n tags = tags.filter(tag => tag.canStartDiscussion());\n }\n\n return tags;\n}\n","import Component from 'flarum/common/Component';\nimport Button from 'flarum/common/components/Button';\nimport classList from 'flarum/common/utils/classList';\n\n/**\n * @TODO move to core\n */\nexport default class ToggleButton extends Component {\n view(vnode) {\n const { className, isToggled, ...attrs } = this.attrs;\n const icon = isToggled ? 'far fa-check-circle' : 'far fa-circle';\n\n return (\n \n );\n }\n}\n","export default function _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}","import app from 'flarum/forum/app';\nimport type Mithril from 'mithril';\nimport Modal, { IInternalModalAttrs } from 'flarum/common/components/Modal';\nimport DiscussionPage from 'flarum/forum/components/DiscussionPage';\nimport Button from 'flarum/common/components/Button';\nimport LoadingIndicator from 'flarum/common/components/LoadingIndicator';\nimport highlight from 'flarum/common/helpers/highlight';\nimport classList from 'flarum/common/utils/classList';\nimport extractText from 'flarum/common/utils/extractText';\nimport KeyboardNavigatable from 'flarum/forum/utils/KeyboardNavigatable';\nimport Stream from 'flarum/common/utils/Stream';\nimport Discussion from 'flarum/common/models/Discussion';\n\nimport tagLabel from '../../common/helpers/tagLabel';\nimport tagIcon from '../../common/helpers/tagIcon';\nimport sortTags from '../../common/utils/sortTags';\nimport getSelectableTags from '../utils/getSelectableTags';\nimport ToggleButton from './ToggleButton';\nimport Tag from '../../common/models/Tag';\n\nexport interface TagDiscussionModalAttrs extends IInternalModalAttrs {\n discussion?: Discussion;\n selectedTags?: Tag[];\n onsubmit?: (tags: Tag[]) => {};\n}\n\nexport default class TagDiscussionModal extends Modal {\n tagsLoading = true;\n\n selected: Tag[] = [];\n filter = Stream('');\n focused = false;\n\n minPrimary = app.forum.attribute('minPrimaryTags');\n maxPrimary = app.forum.attribute('maxPrimaryTags');\n minSecondary = app.forum.attribute('minSecondaryTags');\n maxSecondary = app.forum.attribute('maxSecondaryTags');\n\n bypassReqs = false;\n\n navigator = new KeyboardNavigatable();\n\n tags?: Tag[];\n\n selectedTag?: Tag;\n oninit(vnode: Mithril.Vnode) {\n super.oninit(vnode);\n\n this.navigator\n .onUp(() => this.setIndex(this.getCurrentNumericIndex() - 1, true))\n .onDown(() => this.setIndex(this.getCurrentNumericIndex() + 1, true))\n .onSelect(this.select.bind(this))\n .onRemove(() => this.selected.splice(this.selected.length - 1, 1));\n\n app.tagList.load(['parent']).then(() => {\n this.tagsLoading = false;\n\n const tags = sortTags(getSelectableTags(this.attrs.discussion));\n this.tags = tags;\n\n const discussionTags = this.attrs.discussion?.tags()\n if (this.attrs.selectedTags) {\n this.attrs.selectedTags.map(this.addTag.bind(this));\n } else if (discussionTags) {\n discussionTags.forEach(tag => tag && this.addTag(tag));\n }\n\n this.selectedTag = tags[0];\n\n m.redraw();\n });\n }\n\n primaryCount() {\n return this.selected.filter(tag => tag.isPrimary()).length;\n }\n\n secondaryCount() {\n return this.selected.filter(tag => !tag.isPrimary()).length;\n }\n\n /**\n * Add the given tag to the list of selected tags.\n */\n addTag(tag: Tag) {\n if (!tag.canStartDiscussion()) return;\n\n // If this tag has a parent, we'll also need to add the parent tag to the\n // selected list if it's not already in there.\n const parent = tag.parent();\n if (parent && !this.selected.includes(parent)) {\n this.selected.push(parent);\n }\n\n if (!this.selected.includes(tag)) {\n this.selected.push(tag);\n }\n }\n\n /**\n * Remove the given tag from the list of selected tags.\n */\n removeTag(tag: Tag) {\n const index = this.selected.indexOf(tag);\n if (index !== -1) {\n this.selected.splice(index, 1);\n\n // Look through the list of selected tags for any tags which have the tag\n // we just removed as their parent. We'll need to remove them too.\n this.selected\n .filter(selected => selected.parent() === tag)\n .forEach(this.removeTag.bind(this));\n }\n }\n\n className() {\n return 'TagDiscussionModal';\n }\n\n title() {\n return this.attrs.discussion\n ? app.translator.trans('flarum-tags.forum.choose_tags.edit_title', {title: {this.attrs.discussion.title()}})\n : app.translator.trans('flarum-tags.forum.choose_tags.title');\n }\n\n getInstruction(primaryCount: number, secondaryCount: number) {\n if (this.bypassReqs) {\n return '';\n }\n\n if (primaryCount < this.minPrimary) {\n const remaining = this.minPrimary - primaryCount;\n return app.translator.trans('flarum-tags.forum.choose_tags.choose_primary_placeholder', {count: remaining});\n } else if (secondaryCount < this.minSecondary) {\n const remaining = this.minSecondary - secondaryCount;\n return app.translator.trans('flarum-tags.forum.choose_tags.choose_secondary_placeholder', {count: remaining});\n }\n\n return '';\n }\n\n content() {\n if (this.tagsLoading || !this.tags) {\n return ;\n }\n\n let tags = this.tags;\n const filter = this.filter().toLowerCase();\n const primaryCount = this.primaryCount();\n const secondaryCount = this.secondaryCount();\n\n // Filter out all child tags whose parents have not been selected. This\n // makes it impossible to select a child if its parent hasn't been selected.\n tags = tags.filter(tag => {\n const parent = tag.parent();\n return parent !== null && (parent === false || this.selected.includes(parent));\n });\n\n // If the number of selected primary/secondary tags is at the maximum, then\n // we'll filter out all other tags of that type.\n if (primaryCount >= this.maxPrimary && !this.bypassReqs) {\n tags = tags.filter(tag => !tag.isPrimary() || this.selected.includes(tag));\n }\n\n if (secondaryCount >= this.maxSecondary && !this.bypassReqs) {\n tags = tags.filter(tag => tag.isPrimary() || this.selected.includes(tag));\n }\n\n // If the user has entered text in the filter input, then filter by tags\n // whose name matches what they've entered.\n if (filter) {\n tags = tags.filter(tag => tag.name().substr(0, filter.length).toLowerCase() === filter);\n }\n\n if (!this.selectedTag || !tags.includes(this.selectedTag)) this.selectedTag = tags[0];\n\n const inputWidth = Math.max(extractText(this.getInstruction(primaryCount, secondaryCount)).length, this.filter().length);\n\n return [\n
\n
\n
\n
this.$('.TagsInput input').focus()}\n >\n \n {this.selected.map(tag =>\n {\n this.removeTag(tag);\n this.onready();\n }}>\n {tagLabel(tag)}\n \n )}\n \n this.focused = true}\n onblur={() => this.focused = false}/>\n
\n
\n
\n \n
\n
\n
,\n\n
\n
    \n {tags\n .filter(tag => filter || !tag.parent() || this.selected.includes(tag.parent() as Tag))\n .map(tag => (\n
  • this.selectedTag = tag}\n onclick={this.toggleTag.bind(this, tag)}\n >\n {tagIcon(tag)}\n \n {highlight(tag.name(), filter)}\n \n {tag.description()\n ? (\n \n {tag.description()}\n \n ) : ''}\n
  • \n ))}\n
\n {!!app.forum.attribute('canBypassTagCounts') && (\n
\n this.bypassReqs = !this.bypassReqs} isToggled={this.bypassReqs}>\n {app.translator.trans('flarum-tags.forum.choose_tags.bypass_requirements')}\n \n
\n )}\n
\n ];\n }\n\n meetsRequirements(primaryCount: number, secondaryCount: number) {\n if (this.bypassReqs) {\n return true;\n }\n\n return primaryCount >= this.minPrimary && secondaryCount >= this.minSecondary;\n }\n\n toggleTag(tag: Tag) {\n // Won't happen, needed for type safety.\n if (!this.tags) return;\n\n if (this.selected.includes(tag)) {\n this.removeTag(tag);\n } else {\n this.addTag(tag);\n }\n\n if (this.filter()) {\n this.filter('');\n this.selectedTag = this.tags[0];\n }\n\n this.onready();\n }\n\n select(e: KeyboardEvent) {\n // Ctrl + Enter submits the selection, just Enter completes the current entry\n if (e.metaKey || e.ctrlKey || this.selectedTag && this.selected.includes(this.selectedTag)) {\n if (this.selected.length) {\n // The DOM submit method doesn't emit a `submit event, so we\n // simulate a manual submission so our `onsubmit` logic is run.\n this.$('button[type=\"submit\"]').click();\n }\n } else if (this.selectedTag) {\n this.getItem(this.selectedTag)[0].dispatchEvent(new Event('click'));\n }\n }\n\n selectableItems() {\n return this.$('.TagDiscussionModal-list > li');\n }\n\n getCurrentNumericIndex() {\n if (!this.selectedTag) return -1;\n\n return this.selectableItems().index(\n this.getItem(this.selectedTag)\n );\n }\n\n getItem(selectedTag: Tag) {\n return this.selectableItems().filter(`[data-index=\"${selectedTag.id()}\"]`);\n }\n\n setIndex(index: number, scrollToItem: boolean) {\n const $items = this.selectableItems();\n const $dropdown = $items.parent();\n\n if (index < 0) {\n index = $items.length - 1;\n } else if (index >= $items.length) {\n index = 0;\n }\n\n const $item = $items.eq(index);\n\n this.selectedTag = app.store.getById('tags', $item.attr('data-index')!);\n\n m.redraw();\n\n if (scrollToItem) {\n const dropdownScroll = $dropdown.scrollTop()!;\n const dropdownTop = $dropdown.offset()!.top;\n const dropdownBottom = dropdownTop + $dropdown.outerHeight()!;\n const itemTop = $item.offset()!.top;\n const itemBottom = itemTop + $item.outerHeight()!;\n\n let scrollTop;\n if (itemTop < dropdownTop) {\n scrollTop = dropdownScroll - dropdownTop + itemTop - parseInt($dropdown.css('padding-top'), 10);\n } else if (itemBottom > dropdownBottom) {\n scrollTop = dropdownScroll - dropdownBottom + itemBottom + parseInt($dropdown.css('padding-bottom'), 10);\n }\n\n if (typeof scrollTop !== 'undefined') {\n $dropdown.stop(true).animate({scrollTop}, 100);\n }\n }\n }\n\n onsubmit(e: SubmitEvent) {\n e.preventDefault();\n\n const discussion = this.attrs.discussion;\n const tags = this.selected;\n\n if (discussion) {\n discussion.save({relationships: {tags}})\n .then(() => {\n if (app.current.matches(DiscussionPage)) {\n app.current.get('stream').update();\n }\n m.redraw();\n });\n }\n\n if (this.attrs.onsubmit) this.attrs.onsubmit(tags);\n\n this.hide();\n }\n}\n","import { extend } from 'flarum/common/extend';\nimport DiscussionControls from 'flarum/forum/utils/DiscussionControls';\nimport Button from 'flarum/common/components/Button';\n\nimport TagDiscussionModal from './components/TagDiscussionModal';\n\nexport default function() {\n // Add a control allowing the discussion to be moved to another category.\n extend(DiscussionControls, 'moderationControls', function(items, discussion) {\n if (discussion.canTag()) {\n items.add('tags', );\n }\n });\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/DiscussionComposer'];","import { extend, override } from 'flarum/common/extend';\nimport IndexPage from 'flarum/forum/components/IndexPage';\nimport DiscussionComposer from 'flarum/forum/components/DiscussionComposer';\nimport classList from 'flarum/common/utils/classList';\n\nimport TagDiscussionModal from './components/TagDiscussionModal';\nimport tagsLabel from '../common/helpers/tagsLabel';\nimport getSelectableTags from './utils/getSelectableTags';\n\nexport default function () {\n extend(IndexPage.prototype, 'newDiscussionAction', function (promise) {\n // From `addTagFilter\n const tag = this.currentTag();\n\n if (tag) {\n const parent = tag.parent();\n const tags = parent ? [parent, tag] : [tag];\n promise.then(composer => composer.fields.tags = tags);\n } else {\n app.composer.fields.tags = [];\n }\n });\n\n\n extend(DiscussionComposer.prototype, 'oninit', function () {\n app.tagList.load(['parent']).then(() => m.redraw())\n });\n\n // Add tag-selection abilities to the discussion composer.\n DiscussionComposer.prototype.chooseTags = function () {\n const selectableTags = getSelectableTags();\n\n if (!selectableTags.length) return;\n\n app.modal.show(TagDiscussionModal, {\n selectedTags: (this.composer.fields.tags || []).slice(0),\n onsubmit: tags => {\n this.composer.fields.tags = tags;\n this.$('textarea').focus();\n }\n });\n };\n\n // Add a tag-selection menu to the discussion composer's header, after the\n // title.\n extend(DiscussionComposer.prototype, 'headerItems', function (items) {\n const tags = this.composer.fields.tags || [];\n const selectableTags = getSelectableTags();\n\n items.add('tags', (\n \n {tags.length\n ? tagsLabel(tags)\n : {app.translator.trans('flarum-tags.forum.composer_discussion.choose_tags_link')}}\n \n ), 10);\n });\n\n override(DiscussionComposer.prototype, 'onsubmit', function (original) {\n const chosenTags = this.composer.fields.tags || [];\n const chosenPrimaryTags = chosenTags.filter(tag => tag.position() !== null && !tag.isChild());\n const chosenSecondaryTags = chosenTags.filter(tag => tag.position() === null);\n const selectableTags = getSelectableTags();\n\n if ((!chosenTags.length\n || (chosenPrimaryTags.length < app.forum.attribute('minPrimaryTags'))\n || (chosenSecondaryTags.length < app.forum.attribute('minSecondaryTags'))\n ) && selectableTags.length) {\n app.modal.show(TagDiscussionModal, {\n selectedTags: chosenTags,\n onsubmit: tags => {\n this.composer.fields.tags = tags;\n original();\n }\n });\n } else {\n original();\n }\n });\n\n // Add the selected tags as data to submit to the server.\n extend(DiscussionComposer.prototype, 'data', function (data) {\n data.relationships = data.relationships || {};\n data.relationships.tags = this.composer.fields.tags;\n });\n}\n","import sortTags from './utils/sortTags';\nimport Tag from './models/Tag';\nimport tagsLabel from './helpers/tagsLabel';\nimport tagIcon from './helpers/tagIcon';\nimport tagLabel from './helpers/tagLabel';\n\nexport default {\n 'tags/utils/sortTags': sortTags,\n 'tags/models/Tag': Tag,\n 'tags/helpers/tagsLabel': tagsLabel,\n 'tags/helpers/tagIcon': tagIcon,\n 'tags/helpers/tagLabel': tagLabel\n};\n","import compat from '../common/compat';\n\nimport addTagFilter from './addTagFilter';\nimport addTagControl from './addTagControl';\nimport TagHero from './components/TagHero';\nimport TagDiscussionModal from './components/TagDiscussionModal';\nimport TagsPage from './components/TagsPage';\nimport DiscussionTaggedPost from './components/DiscussionTaggedPost';\nimport TagLinkButton from './components/TagLinkButton';\nimport addTagList from './addTagList';\nimport addTagLabels from './addTagLabels';\nimport addTagComposer from './addTagComposer';\nimport getSelectableTags from './utils/getSelectableTags';\n\nexport default Object.assign(compat, {\n 'tags/addTagFilter': addTagFilter,\n 'tags/addTagControl': addTagControl,\n 'tags/components/TagHero': TagHero,\n 'tags/components/TagDiscussionModal': TagDiscussionModal,\n 'tags/components/TagsPage': TagsPage,\n 'tags/components/DiscussionTaggedPost': DiscussionTaggedPost,\n 'tags/components/TagLinkButton': TagLinkButton,\n 'tags/addTagList': addTagList,\n 'tags/addTagLabels': addTagLabels,\n 'tags/addTagComposer': addTagComposer,\n 'tags/utils/getSelectableTags': getSelectableTags,\n});\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core;","import app from 'flarum/forum/app';\nimport Model from 'flarum/common/Model';\nimport Discussion from 'flarum/common/models/Discussion';\nimport IndexPage from 'flarum/forum/components/IndexPage';\n\nimport Tag from '../common/models/Tag';\nimport TagsPage from './components/TagsPage';\nimport DiscussionTaggedPost from './components/DiscussionTaggedPost';\n\nimport TagListState from './states/TagListState';\n\nimport addTagList from './addTagList';\nimport addTagFilter from './addTagFilter';\nimport addTagLabels from './addTagLabels';\nimport addTagControl from './addTagControl';\nimport addTagComposer from './addTagComposer';\n\napp.initializers.add('flarum-tags', function() {\n app.routes.tags = {path: '/tags', component: TagsPage };\n app.routes.tag = {path: '/t/:tags', component: IndexPage };\n\n app.route.tag = (tag: Tag) => app.route('tag', {tags: tag.slug()});\n\n app.postComponents.discussionTagged = DiscussionTaggedPost;\n\n app.store.models.tags = Tag;\n\n app.tagList = new TagListState();\n\n Discussion.prototype.tags = Model.hasMany('tags');\n Discussion.prototype.canTag = Model.attribute('canTag');\n\n addTagList();\n addTagFilter();\n addTagLabels();\n addTagControl();\n addTagComposer();\n});\n\n\n// Expose compat API\nimport tagsCompat from './compat';\nimport { compat } from '@flarum/core/forum';\n\nObject.assign(compat, tagsCompat);\n","module.exports = require(\"regenerator-runtime\");\n","/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nvar runtime = (function (exports) {\n \"use strict\";\n\n var Op = Object.prototype;\n var hasOwn = Op.hasOwnProperty;\n var undefined; // More compressible than void 0.\n var $Symbol = typeof Symbol === \"function\" ? Symbol : {};\n var iteratorSymbol = $Symbol.iterator || \"@@iterator\";\n var asyncIteratorSymbol = $Symbol.asyncIterator || \"@@asyncIterator\";\n var toStringTagSymbol = $Symbol.toStringTag || \"@@toStringTag\";\n\n function define(obj, key, value) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n return obj[key];\n }\n try {\n // IE 8 has a broken Object.defineProperty that only works on DOM objects.\n define({}, \"\");\n } catch (err) {\n define = function(obj, key, value) {\n return obj[key] = value;\n };\n }\n\n function wrap(innerFn, outerFn, self, tryLocsList) {\n // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.\n var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;\n var generator = Object.create(protoGenerator.prototype);\n var context = new Context(tryLocsList || []);\n\n // The ._invoke method unifies the implementations of the .next,\n // .throw, and .return methods.\n generator._invoke = makeInvokeMethod(innerFn, self, context);\n\n return generator;\n }\n exports.wrap = wrap;\n\n // Try/catch helper to minimize deoptimizations. Returns a completion\n // record like context.tryEntries[i].completion. This interface could\n // have been (and was previously) designed to take a closure to be\n // invoked without arguments, but in all the cases we care about we\n // already have an existing method we want to call, so there's no need\n // to create a new function object. We can even get away with assuming\n // the method takes exactly one argument, since that happens to be true\n // in every case, so we don't have to touch the arguments object. The\n // only additional allocation required is the completion record, which\n // has a stable shape and so hopefully should be cheap to allocate.\n function tryCatch(fn, obj, arg) {\n try {\n return { type: \"normal\", arg: fn.call(obj, arg) };\n } catch (err) {\n return { type: \"throw\", arg: err };\n }\n }\n\n var GenStateSuspendedStart = \"suspendedStart\";\n var GenStateSuspendedYield = \"suspendedYield\";\n var GenStateExecuting = \"executing\";\n var GenStateCompleted = \"completed\";\n\n // Returning this object from the innerFn has the same effect as\n // breaking out of the dispatch switch statement.\n var ContinueSentinel = {};\n\n // Dummy constructor functions that we use as the .constructor and\n // .constructor.prototype properties for functions that return Generator\n // objects. For full spec compliance, you may wish to configure your\n // minifier not to mangle the names of these two functions.\n function Generator() {}\n function GeneratorFunction() {}\n function GeneratorFunctionPrototype() {}\n\n // This is a polyfill for %IteratorPrototype% for environments that\n // don't natively support it.\n var IteratorPrototype = {};\n define(IteratorPrototype, iteratorSymbol, function () {\n return this;\n });\n\n var getProto = Object.getPrototypeOf;\n var NativeIteratorPrototype = getProto && getProto(getProto(values([])));\n if (NativeIteratorPrototype &&\n NativeIteratorPrototype !== Op &&\n hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {\n // This environment has a native %IteratorPrototype%; use it instead\n // of the polyfill.\n IteratorPrototype = NativeIteratorPrototype;\n }\n\n var Gp = GeneratorFunctionPrototype.prototype =\n Generator.prototype = Object.create(IteratorPrototype);\n GeneratorFunction.prototype = GeneratorFunctionPrototype;\n define(Gp, \"constructor\", GeneratorFunctionPrototype);\n define(GeneratorFunctionPrototype, \"constructor\", GeneratorFunction);\n GeneratorFunction.displayName = define(\n GeneratorFunctionPrototype,\n toStringTagSymbol,\n \"GeneratorFunction\"\n );\n\n // Helper for defining the .next, .throw, and .return methods of the\n // Iterator interface in terms of a single ._invoke method.\n function defineIteratorMethods(prototype) {\n [\"next\", \"throw\", \"return\"].forEach(function(method) {\n define(prototype, method, function(arg) {\n return this._invoke(method, arg);\n });\n });\n }\n\n exports.isGeneratorFunction = function(genFun) {\n var ctor = typeof genFun === \"function\" && genFun.constructor;\n return ctor\n ? ctor === GeneratorFunction ||\n // For the native GeneratorFunction constructor, the best we can\n // do is to check its .name property.\n (ctor.displayName || ctor.name) === \"GeneratorFunction\"\n : false;\n };\n\n exports.mark = function(genFun) {\n if (Object.setPrototypeOf) {\n Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);\n } else {\n genFun.__proto__ = GeneratorFunctionPrototype;\n define(genFun, toStringTagSymbol, \"GeneratorFunction\");\n }\n genFun.prototype = Object.create(Gp);\n return genFun;\n };\n\n // Within the body of any async function, `await x` is transformed to\n // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test\n // `hasOwn.call(value, \"__await\")` to determine if the yielded value is\n // meant to be awaited.\n exports.awrap = function(arg) {\n return { __await: arg };\n };\n\n function AsyncIterator(generator, PromiseImpl) {\n function invoke(method, arg, resolve, reject) {\n var record = tryCatch(generator[method], generator, arg);\n if (record.type === \"throw\") {\n reject(record.arg);\n } else {\n var result = record.arg;\n var value = result.value;\n if (value &&\n typeof value === \"object\" &&\n hasOwn.call(value, \"__await\")) {\n return PromiseImpl.resolve(value.__await).then(function(value) {\n invoke(\"next\", value, resolve, reject);\n }, function(err) {\n invoke(\"throw\", err, resolve, reject);\n });\n }\n\n return PromiseImpl.resolve(value).then(function(unwrapped) {\n // When a yielded Promise is resolved, its final value becomes\n // the .value of the Promise<{value,done}> result for the\n // current iteration.\n result.value = unwrapped;\n resolve(result);\n }, function(error) {\n // If a rejected Promise was yielded, throw the rejection back\n // into the async generator function so it can be handled there.\n return invoke(\"throw\", error, resolve, reject);\n });\n }\n }\n\n var previousPromise;\n\n function enqueue(method, arg) {\n function callInvokeWithMethodAndArg() {\n return new PromiseImpl(function(resolve, reject) {\n invoke(method, arg, resolve, reject);\n });\n }\n\n return previousPromise =\n // If enqueue has been called before, then we want to wait until\n // all previous Promises have been resolved before calling invoke,\n // so that results are always delivered in the correct order. If\n // enqueue has not been called before, then it is important to\n // call invoke immediately, without waiting on a callback to fire,\n // so that the async generator function has the opportunity to do\n // any necessary setup in a predictable way. This predictability\n // is why the Promise constructor synchronously invokes its\n // executor callback, and why async functions synchronously\n // execute code before the first await. Since we implement simple\n // async functions in terms of async generators, it is especially\n // important to get this right, even though it requires care.\n previousPromise ? previousPromise.then(\n callInvokeWithMethodAndArg,\n // Avoid propagating failures to Promises returned by later\n // invocations of the iterator.\n callInvokeWithMethodAndArg\n ) : callInvokeWithMethodAndArg();\n }\n\n // Define the unified helper method that is used to implement .next,\n // .throw, and .return (see defineIteratorMethods).\n this._invoke = enqueue;\n }\n\n defineIteratorMethods(AsyncIterator.prototype);\n define(AsyncIterator.prototype, asyncIteratorSymbol, function () {\n return this;\n });\n exports.AsyncIterator = AsyncIterator;\n\n // Note that simple async functions are implemented on top of\n // AsyncIterator objects; they just return a Promise for the value of\n // the final result produced by the iterator.\n exports.async = function(innerFn, outerFn, self, tryLocsList, PromiseImpl) {\n if (PromiseImpl === void 0) PromiseImpl = Promise;\n\n var iter = new AsyncIterator(\n wrap(innerFn, outerFn, self, tryLocsList),\n PromiseImpl\n );\n\n return exports.isGeneratorFunction(outerFn)\n ? iter // If outerFn is a generator, return the full iterator.\n : iter.next().then(function(result) {\n return result.done ? result.value : iter.next();\n });\n };\n\n function makeInvokeMethod(innerFn, self, context) {\n var state = GenStateSuspendedStart;\n\n return function invoke(method, arg) {\n if (state === GenStateExecuting) {\n throw new Error(\"Generator is already running\");\n }\n\n if (state === GenStateCompleted) {\n if (method === \"throw\") {\n throw arg;\n }\n\n // Be forgiving, per 25.3.3.3.3 of the spec:\n // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume\n return doneResult();\n }\n\n context.method = method;\n context.arg = arg;\n\n while (true) {\n var delegate = context.delegate;\n if (delegate) {\n var delegateResult = maybeInvokeDelegate(delegate, context);\n if (delegateResult) {\n if (delegateResult === ContinueSentinel) continue;\n return delegateResult;\n }\n }\n\n if (context.method === \"next\") {\n // Setting context._sent for legacy support of Babel's\n // function.sent implementation.\n context.sent = context._sent = context.arg;\n\n } else if (context.method === \"throw\") {\n if (state === GenStateSuspendedStart) {\n state = GenStateCompleted;\n throw context.arg;\n }\n\n context.dispatchException(context.arg);\n\n } else if (context.method === \"return\") {\n context.abrupt(\"return\", context.arg);\n }\n\n state = GenStateExecuting;\n\n var record = tryCatch(innerFn, self, context);\n if (record.type === \"normal\") {\n // If an exception is thrown from innerFn, we leave state ===\n // GenStateExecuting and loop back for another invocation.\n state = context.done\n ? GenStateCompleted\n : GenStateSuspendedYield;\n\n if (record.arg === ContinueSentinel) {\n continue;\n }\n\n return {\n value: record.arg,\n done: context.done\n };\n\n } else if (record.type === \"throw\") {\n state = GenStateCompleted;\n // Dispatch the exception by looping back around to the\n // context.dispatchException(context.arg) call above.\n context.method = \"throw\";\n context.arg = record.arg;\n }\n }\n };\n }\n\n // Call delegate.iterator[context.method](context.arg) and handle the\n // result, either by returning a { value, done } result from the\n // delegate iterator, or by modifying context.method and context.arg,\n // setting context.delegate to null, and returning the ContinueSentinel.\n function maybeInvokeDelegate(delegate, context) {\n var method = delegate.iterator[context.method];\n if (method === undefined) {\n // A .throw or .return when the delegate iterator has no .throw\n // method always terminates the yield* loop.\n context.delegate = null;\n\n if (context.method === \"throw\") {\n // Note: [\"return\"] must be used for ES3 parsing compatibility.\n if (delegate.iterator[\"return\"]) {\n // If the delegate iterator has a return method, give it a\n // chance to clean up.\n context.method = \"return\";\n context.arg = undefined;\n maybeInvokeDelegate(delegate, context);\n\n if (context.method === \"throw\") {\n // If maybeInvokeDelegate(context) changed context.method from\n // \"return\" to \"throw\", let that override the TypeError below.\n return ContinueSentinel;\n }\n }\n\n context.method = \"throw\";\n context.arg = new TypeError(\n \"The iterator does not provide a 'throw' method\");\n }\n\n return ContinueSentinel;\n }\n\n var record = tryCatch(method, delegate.iterator, context.arg);\n\n if (record.type === \"throw\") {\n context.method = \"throw\";\n context.arg = record.arg;\n context.delegate = null;\n return ContinueSentinel;\n }\n\n var info = record.arg;\n\n if (! info) {\n context.method = \"throw\";\n context.arg = new TypeError(\"iterator result is not an object\");\n context.delegate = null;\n return ContinueSentinel;\n }\n\n if (info.done) {\n // Assign the result of the finished delegate to the temporary\n // variable specified by delegate.resultName (see delegateYield).\n context[delegate.resultName] = info.value;\n\n // Resume execution at the desired location (see delegateYield).\n context.next = delegate.nextLoc;\n\n // If context.method was \"throw\" but the delegate handled the\n // exception, let the outer generator proceed normally. If\n // context.method was \"next\", forget context.arg since it has been\n // \"consumed\" by the delegate iterator. If context.method was\n // \"return\", allow the original .return call to continue in the\n // outer generator.\n if (context.method !== \"return\") {\n context.method = \"next\";\n context.arg = undefined;\n }\n\n } else {\n // Re-yield the result returned by the delegate method.\n return info;\n }\n\n // The delegate iterator is finished, so forget it and continue with\n // the outer generator.\n context.delegate = null;\n return ContinueSentinel;\n }\n\n // Define Generator.prototype.{next,throw,return} in terms of the\n // unified ._invoke helper method.\n defineIteratorMethods(Gp);\n\n define(Gp, toStringTagSymbol, \"Generator\");\n\n // A Generator should always return itself as the iterator object when the\n // @@iterator function is called on it. Some browsers' implementations of the\n // iterator prototype chain incorrectly implement this, causing the Generator\n // object to not be returned from this call. This ensures that doesn't happen.\n // See https://github.com/facebook/regenerator/issues/274 for more details.\n define(Gp, iteratorSymbol, function() {\n return this;\n });\n\n define(Gp, \"toString\", function() {\n return \"[object Generator]\";\n });\n\n function pushTryEntry(locs) {\n var entry = { tryLoc: locs[0] };\n\n if (1 in locs) {\n entry.catchLoc = locs[1];\n }\n\n if (2 in locs) {\n entry.finallyLoc = locs[2];\n entry.afterLoc = locs[3];\n }\n\n this.tryEntries.push(entry);\n }\n\n function resetTryEntry(entry) {\n var record = entry.completion || {};\n record.type = \"normal\";\n delete record.arg;\n entry.completion = record;\n }\n\n function Context(tryLocsList) {\n // The root entry object (effectively a try statement without a catch\n // or a finally block) gives us a place to store values thrown from\n // locations where there is no enclosing try statement.\n this.tryEntries = [{ tryLoc: \"root\" }];\n tryLocsList.forEach(pushTryEntry, this);\n this.reset(true);\n }\n\n exports.keys = function(object) {\n var keys = [];\n for (var key in object) {\n keys.push(key);\n }\n keys.reverse();\n\n // Rather than returning an object with a next method, we keep\n // things simple and return the next function itself.\n return function next() {\n while (keys.length) {\n var key = keys.pop();\n if (key in object) {\n next.value = key;\n next.done = false;\n return next;\n }\n }\n\n // To avoid creating an additional object, we just hang the .value\n // and .done properties off the next function object itself. This\n // also ensures that the minifier will not anonymize the function.\n next.done = true;\n return next;\n };\n };\n\n function values(iterable) {\n if (iterable) {\n var iteratorMethod = iterable[iteratorSymbol];\n if (iteratorMethod) {\n return iteratorMethod.call(iterable);\n }\n\n if (typeof iterable.next === \"function\") {\n return iterable;\n }\n\n if (!isNaN(iterable.length)) {\n var i = -1, next = function next() {\n while (++i < iterable.length) {\n if (hasOwn.call(iterable, i)) {\n next.value = iterable[i];\n next.done = false;\n return next;\n }\n }\n\n next.value = undefined;\n next.done = true;\n\n return next;\n };\n\n return next.next = next;\n }\n }\n\n // Return an iterator with no values.\n return { next: doneResult };\n }\n exports.values = values;\n\n function doneResult() {\n return { value: undefined, done: true };\n }\n\n Context.prototype = {\n constructor: Context,\n\n reset: function(skipTempReset) {\n this.prev = 0;\n this.next = 0;\n // Resetting context._sent for legacy support of Babel's\n // function.sent implementation.\n this.sent = this._sent = undefined;\n this.done = false;\n this.delegate = null;\n\n this.method = \"next\";\n this.arg = undefined;\n\n this.tryEntries.forEach(resetTryEntry);\n\n if (!skipTempReset) {\n for (var name in this) {\n // Not sure about the optimal order of these conditions:\n if (name.charAt(0) === \"t\" &&\n hasOwn.call(this, name) &&\n !isNaN(+name.slice(1))) {\n this[name] = undefined;\n }\n }\n }\n },\n\n stop: function() {\n this.done = true;\n\n var rootEntry = this.tryEntries[0];\n var rootRecord = rootEntry.completion;\n if (rootRecord.type === \"throw\") {\n throw rootRecord.arg;\n }\n\n return this.rval;\n },\n\n dispatchException: function(exception) {\n if (this.done) {\n throw exception;\n }\n\n var context = this;\n function handle(loc, caught) {\n record.type = \"throw\";\n record.arg = exception;\n context.next = loc;\n\n if (caught) {\n // If the dispatched exception was caught by a catch block,\n // then let that catch block handle the exception normally.\n context.method = \"next\";\n context.arg = undefined;\n }\n\n return !! caught;\n }\n\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n var record = entry.completion;\n\n if (entry.tryLoc === \"root\") {\n // Exception thrown outside of any try block that could handle\n // it, so set the completion value of the entire function to\n // throw the exception.\n return handle(\"end\");\n }\n\n if (entry.tryLoc <= this.prev) {\n var hasCatch = hasOwn.call(entry, \"catchLoc\");\n var hasFinally = hasOwn.call(entry, \"finallyLoc\");\n\n if (hasCatch && hasFinally) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n } else if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else if (hasCatch) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n }\n\n } else if (hasFinally) {\n if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else {\n throw new Error(\"try statement without catch or finally\");\n }\n }\n }\n },\n\n abrupt: function(type, arg) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc <= this.prev &&\n hasOwn.call(entry, \"finallyLoc\") &&\n this.prev < entry.finallyLoc) {\n var finallyEntry = entry;\n break;\n }\n }\n\n if (finallyEntry &&\n (type === \"break\" ||\n type === \"continue\") &&\n finallyEntry.tryLoc <= arg &&\n arg <= finallyEntry.finallyLoc) {\n // Ignore the finally entry if control is not jumping to a\n // location outside the try/catch block.\n finallyEntry = null;\n }\n\n var record = finallyEntry ? finallyEntry.completion : {};\n record.type = type;\n record.arg = arg;\n\n if (finallyEntry) {\n this.method = \"next\";\n this.next = finallyEntry.finallyLoc;\n return ContinueSentinel;\n }\n\n return this.complete(record);\n },\n\n complete: function(record, afterLoc) {\n if (record.type === \"throw\") {\n throw record.arg;\n }\n\n if (record.type === \"break\" ||\n record.type === \"continue\") {\n this.next = record.arg;\n } else if (record.type === \"return\") {\n this.rval = this.arg = record.arg;\n this.method = \"return\";\n this.next = \"end\";\n } else if (record.type === \"normal\" && afterLoc) {\n this.next = afterLoc;\n }\n\n return ContinueSentinel;\n },\n\n finish: function(finallyLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.finallyLoc === finallyLoc) {\n this.complete(entry.completion, entry.afterLoc);\n resetTryEntry(entry);\n return ContinueSentinel;\n }\n }\n },\n\n \"catch\": function(tryLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc === tryLoc) {\n var record = entry.completion;\n if (record.type === \"throw\") {\n var thrown = record.arg;\n resetTryEntry(entry);\n }\n return thrown;\n }\n }\n\n // The context.catch method must only be called with a location\n // argument that corresponds to a known catch block.\n throw new Error(\"illegal catch attempt\");\n },\n\n delegateYield: function(iterable, resultName, nextLoc) {\n this.delegate = {\n iterator: values(iterable),\n resultName: resultName,\n nextLoc: nextLoc\n };\n\n if (this.method === \"next\") {\n // Deliberately forget the last sent value so that we don't\n // accidentally pass it on to the delegate.\n this.arg = undefined;\n }\n\n return ContinueSentinel;\n }\n };\n\n // Regardless of whether this script is executing as a CommonJS module\n // or not, return the runtime object so that we can declare the variable\n // regeneratorRuntime in the outer scope, which allows this module to be\n // injected easily by `bin/regenerator --include-runtime script.js`.\n return exports;\n\n}(\n // If this script is executing as a CommonJS module, use module.exports\n // as the regeneratorRuntime namespace. Otherwise create a new empty\n // object. Either way, the resulting object will be used to initialize\n // the regeneratorRuntime variable at the top of this file.\n typeof module === \"object\" ? module.exports : {}\n));\n\ntry {\n regeneratorRuntime = runtime;\n} catch (accidentalStrictMode) {\n // This module should not be running in strict mode, so the above\n // assignment should always work unless something is misconfigured. Just\n // in case runtime.js accidentally runs in strict mode, in modern engines\n // we can explicitly access globalThis. In older engines we can escape\n // strict mode using a global Function call. This could conceivably fail\n // if a Content Security Policy forbids using Function, but in that case\n // the proper solution is to fix the accidental strict mode problem. If\n // you've misconfigured your bundler to force strict mode and applied a\n // CSP to forbid Function, and you're not willing to fix either of those\n // problems, please detail your unique predicament in a GitHub issue.\n if (typeof globalThis === \"object\") {\n globalThis.regeneratorRuntime = runtime;\n } else {\n Function(\"r\", \"regeneratorRuntime = r\")(runtime);\n }\n}\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\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};"],"names":["flarum","core","compat","_setPrototypeOf","o","p","Object","setPrototypeOf","__proto__","_inheritsLoose","subClass","superClass","prototype","create","constructor","Tag","name","Model","call","this","slug","description","color","backgroundUrl","backgroundMode","icon","position","parent","children","defaultSort","isChild","isHidden","discussionCount","lastPostedAt","lastPostedDiscussion","isRestricted","canStartDiscussion","canAddToDiscussion","isPrimary","computed","tagIcon","tag","attrs","settings","hasIcon","useColor","className","classList","style","tagLabel","link","extract","tagText","app","translator","trans","title","href","route","tags","m","Link","sortTags","slice","sort","a","b","aPos","bPos","aParent","bParent","TagsPage","oninit","vnode","history","push","preloaded","preloadedApiDocument","filter","loading","tagList","load","then","store","all","redraw","view","pinned","cloud","IndexPage","listItems","toArray","map","child","discussion","lastPostNumber","humanTime","length","oncreate","setTitle","setTitleCount","Page","tagsLabel","forEach","DiscussionTaggedPost","initAttrs","oldTags","post","content","newTags","diffTags","tags1","tags2","indexOf","id","getById","tagsAdded","tagsRemoved","descriptionKey","descriptionData","data","count","EventPost","asyncGeneratorStep","gen","resolve","reject","_next","_throw","key","arg","info","value","error","done","Promise","TagListState","loadedIncludes","Set","fn","includes","unloadedIncludes","include","has","join","val","add","self","args","arguments","apply","err","undefined","TagLinkButton","model","isActive","params","LinkButton","extend","items","current","matches","Separator","search","stickyParams","currentTag","addTag","active","component","more","splice","TagHero","Component","findTag","find","localeCompare","sensitivity","currentActiveTag","currentTagLoading","override","original","vdom","newDiscussion","get","disabled","GlobalSearchState","param","DiscussionListState","q","DiscussionListItem","DiscussionHero","getSelectableTags","ToggleButton","isToggled","source","excluded","i","target","sourceKeys","keys","TagDiscussionModal","tagsLoading","selected","Stream","focused","minPrimary","maxPrimary","minSecondary","maxSecondary","bypassReqs","navigator","KeyboardNavigatable","selectedTag","onUp","setIndex","getCurrentNumericIndex","onDown","onSelect","select","bind","onRemove","discussionTags","selectedTags","primaryCount","secondaryCount","removeTag","index","getInstruction","remaining","toLowerCase","substr","inputWidth","Math","max","extractText","onclick","$","focus","onready","placeholder","bidi","width","onkeydown","navigate","onfocus","onblur","type","meetsRequirements","colored","onmouseover","toggleTag","highlight","e","metaKey","ctrlKey","click","getItem","dispatchEvent","Event","selectableItems","scrollToItem","$items","$dropdown","$item","eq","attr","scrollTop","dropdownScroll","dropdownTop","offset","top","dropdownBottom","outerHeight","itemTop","itemBottom","parseInt","css","stop","animate","onsubmit","preventDefault","save","relationships","DiscussionPage","update","hide","Modal","DiscussionControls","canTag","modal","show","promise","composer","fields","DiscussionComposer","selectableTags","chooseTags","chosenTags","chosenPrimaryTags","chosenSecondaryTags","forum","attribute","assign","addTagFilter","addTagControl","addTagList","addTagLabels","addTagComposer","path","Discussion","tagsCompat","module","exports","runtime","Op","hasOwn","hasOwnProperty","$Symbol","Symbol","iteratorSymbol","iterator","asyncIteratorSymbol","asyncIterator","toStringTagSymbol","toStringTag","define","obj","defineProperty","enumerable","configurable","writable","wrap","innerFn","outerFn","tryLocsList","protoGenerator","Generator","generator","context","Context","_invoke","state","GenStateSuspendedStart","method","GenStateExecuting","Error","GenStateCompleted","doneResult","delegate","delegateResult","maybeInvokeDelegate","ContinueSentinel","sent","_sent","dispatchException","abrupt","record","tryCatch","GenStateSuspendedYield","makeInvokeMethod","GeneratorFunction","GeneratorFunctionPrototype","IteratorPrototype","getProto","getPrototypeOf","NativeIteratorPrototype","values","Gp","defineIteratorMethods","AsyncIterator","PromiseImpl","invoke","result","__await","unwrapped","previousPromise","callInvokeWithMethodAndArg","TypeError","resultName","next","nextLoc","pushTryEntry","locs","entry","tryLoc","catchLoc","finallyLoc","afterLoc","tryEntries","resetTryEntry","completion","reset","iterable","iteratorMethod","isNaN","displayName","isGeneratorFunction","genFun","ctor","mark","awrap","async","iter","object","reverse","pop","skipTempReset","prev","charAt","rootRecord","rval","exception","handle","loc","caught","hasCatch","hasFinally","finallyEntry","complete","finish","thrown","delegateYield","regeneratorRuntime","accidentalStrictMode","globalThis","Function","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","n","getter","__esModule","d","definition","prop","r"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"forum.js","mappings":"mDAAA,MAAM,EAA+BA,OAAOC,KAAKC,OAAO,a,aCAxD,MAAM,EAA+BF,OAAOC,KAAKC,OAAO,gB,aCAxD,MAAM,EAA+BF,OAAOC,KAAKC,OAAO,4B,aCAxD,MAAM,EAA+BF,OAAOC,KAAKC,OAAO,8B,aCAzC,SAASC,EAAgBC,EAAGC,GAMzC,OALAF,EAAkBG,OAAOC,gBAAkB,SAAyBH,EAAGC,GAErE,OADAD,E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EAAoBU,EAAK7H,IACH,oBAAXM,QAA0BA,OAAOM,aAC1C9T,OAAOiU,eAAef,EAASM,OAAOM,YAAa,CAAEhM,MAAO,WAE7D9H,OAAOiU,eAAef,EAAS,aAAc,CAAEpL,OAAO,K","sources":["webpack://@flarum/tags/external root \"flarum.core.compat['forum/app']\"","webpack://@flarum/tags/external root \"flarum.core.compat['common/Model']\"","webpack://@flarum/tags/external root \"flarum.core.compat['common/models/Discussion']\"","webpack://@flarum/tags/external root \"flarum.core.compat['forum/components/IndexPage']\"","webpack://@flarum/tags/../../../node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js","webpack://@flarum/tags/../../../node_modules/@babel/runtime/helpers/esm/inheritsLoose.js","webpack://@flarum/tags/external root \"flarum.core.compat['common/utils/computed']\"","webpack://@flarum/tags/./src/common/models/Tag.ts","webpack://@flarum/tags/external root \"flarum.core.compat['common/components/Page']\"","webpack://@flarum/tags/external root \"flarum.core.compat['common/components/Link']\"","webpack://@flarum/tags/external root \"flarum.core.compat['common/components/LoadingIndicator']\"","webpack://@flarum/tags/external root \"flarum.core.compat['common/helpers/listItems']\"","webpack://@flarum/tags/external root \"flarum.core.compat['common/helpers/humanTime']\"","webpack://@flarum/tags/external root \"flarum.core.compat['common/utils/classList']\"","webpack://@flarum/tags/./src/common/helpers/tagIcon.js","webpack://@flarum/tags/external root \"flarum.core.compat['common/utils/extract']\"","webpack://@flarum/tags/./src/common/helpers/tagLabel.js","webpack://@flarum/tags/./src/common/utils/sortTags.tsx","webpack://@flarum/tags/./src/forum/components/TagsPage.js","webpack://@flarum/tags/external root \"flarum.core.compat['forum/components/EventPost']\"","webpack://@flarum/tags/./src/common/helpers/tagsLabel.js","webpack://@flarum/tags/./src/forum/components/DiscussionTaggedPost.js","webpack://@flarum/tags/../../../node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js","webpack://@flarum/tags/./src/forum/states/TagListState.ts","webpack://@flarum/tags/external root \"flarum.core.compat['common/extend']\"","webpack://@flarum/tags/external root \"flarum.core.compat['common/components/Separator']\"","webpack://@flarum/tags/external root \"flarum.core.compat['common/components/LinkButton']\"","webpack://@flarum/tags/./src/forum/components/TagLinkButton.js","webpack://@flarum/tags/./src/forum/addTagList.js","webpack://@flarum/tags/external root \"flarum.core.compat['forum/states/DiscussionListState']\"","webpack://@flarum/tags/external root \"flarum.core.compat['forum/states/GlobalSearchState']\"","webpack://@flarum/tags/external root \"flarum.core.compat['common/Component']\"","webpack://@flarum/tags/./src/forum/components/TagHero.js","webpack://@flarum/tags/./src/forum/addTagFilter.tsx","webpack://@flarum/tags/external root \"flarum.core.compat['forum/components/DiscussionListItem']\"","webpack://@flarum/tags/external root \"flarum.core.compat['forum/components/DiscussionHero']\"","webpack://@flarum/tags/./src/forum/addTagLabels.js","webpack://@flarum/tags/external root \"flarum.core.compat['forum/utils/DiscussionControls']\"","webpack://@flarum/tags/external root \"flarum.core.compat['common/components/Button']\"","webpack://@flarum/tags/external root \"flarum.core.compat['common/components/Modal']\"","webpack://@flarum/tags/external root \"flarum.core.compat['forum/components/DiscussionPage']\"","webpack://@flarum/tags/external root \"flarum.core.compat['common/helpers/highlight']\"","webpack://@flarum/tags/external root \"flarum.core.compat['common/utils/extractText']\"","webpack://@flarum/tags/external root \"flarum.core.compat['forum/utils/KeyboardNavigatable']\"","webpack://@flarum/tags/external root \"flarum.core.compat['common/utils/Stream']\"","webpack://@flarum/tags/./src/forum/utils/getSelectableTags.js","webpack://@flarum/tags/./src/forum/components/ToggleButton.js","webpack://@flarum/tags/../../../node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js","webpack://@flarum/tags/./src/forum/components/TagDiscussionModal.tsx","webpack://@flarum/tags/./src/forum/addTagControl.js","webpack://@flarum/tags/external root \"flarum.core.compat['forum/components/DiscussionComposer']\"","webpack://@flarum/tags/./src/forum/addTagComposer.js","webpack://@flarum/tags/./src/common/compat.js","webpack://@flarum/tags/./src/forum/compat.js","webpack://@flarum/tags/external assign \"flarum.core\"","webpack://@flarum/tags/./src/forum/index.ts","webpack://@flarum/tags/../../../node_modules/@babel/runtime/regenerator/index.js","webpack://@flarum/tags/../../../node_modules/regenerator-runtime/runtime.js","webpack://@flarum/tags/webpack/bootstrap","webpack://@flarum/tags/webpack/runtime/compat get default export","webpack://@flarum/tags/webpack/runtime/define property getters","webpack://@flarum/tags/webpack/runtime/hasOwnProperty shorthand","webpack://@flarum/tags/webpack/runtime/make namespace object"],"sourcesContent":["const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/app'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/Model'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/models/Discussion'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/IndexPage'];","export default function _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\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/utils/computed'];","import computed from 'flarum/common/utils/computed';\nimport Model from 'flarum/common/Model';\nimport type Discussion from 'flarum/common/models/Discussion';\n\nexport default class Tag extends Model {\n name() {\n return Model.attribute('name').call(this);\n }\n slug() {\n return Model.attribute('slug').call(this);\n }\n description() {\n return Model.attribute('description').call(this);\n }\n\n color() {\n return Model.attribute('color').call(this);\n }\n backgroundUrl() {\n return Model.attribute('backgroundUrl').call(this);\n }\n backgroundMode() {\n return Model.attribute('backgroundMode').call(this);\n }\n icon() {\n return Model.attribute('icon').call(this);\n }\n\n position() {\n return Model.attribute('position').call(this);\n }\n parent() {\n return Model.hasOne('parent').call(this);\n }\n children() {\n return Model.hasMany('children').call(this);\n }\n defaultSort() {\n return Model.attribute('defaultSort').call(this);\n }\n isChild() {\n return Model.attribute('isChild').call(this);\n }\n isHidden() {\n return Model.attribute('isHidden').call(this);\n }\n\n discussionCount() {\n return Model.attribute('discussionCount').call(this);\n }\n lastPostedAt() {\n return Model.attribute('lastPostedAt', Model.transformDate).call(this);\n }\n lastPostedDiscussion() {\n return Model.hasOne('lastPostedDiscussion').call(this);\n }\n\n isRestricted() {\n return Model.attribute('isRestricted').call(this);\n }\n canStartDiscussion() {\n return Model.attribute('canStartDiscussion').call(this);\n }\n canAddToDiscussion() {\n return Model.attribute('canAddToDiscussion').call(this);\n }\n\n isPrimary() {\n return computed('position', 'parent', (position, parent) => position !== null && parent === false).call(this);\n }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Page'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Link'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/LoadingIndicator'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/helpers/listItems'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/helpers/humanTime'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/classList'];","import classList from 'flarum/common/utils/classList';\n\nexport default function tagIcon(tag, attrs = {}, settings = {}) {\n const hasIcon = tag && tag.icon();\n const { useColor = true } = settings;\n\n attrs.className = classList([\n attrs.className,\n 'icon',\n hasIcon ? tag.icon() : 'TagIcon'\n ]);\n\n if (tag && useColor) {\n attrs.style = attrs.style || {};\n attrs.style['--color'] = tag.color();\n\n if (hasIcon) {\n attrs.style.color = tag.color();\n }\n } else if (!tag) {\n attrs.className += ' untagged';\n }\n\n return hasIcon ? : ;\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/extract'];","import extract from 'flarum/common/utils/extract';\nimport Link from 'flarum/common/components/Link';\nimport tagIcon from './tagIcon';\n\nexport default function tagLabel(tag, attrs = {}) {\n attrs.style = attrs.style || {};\n attrs.className = 'TagLabel ' + (attrs.className || '');\n\n const link = extract(attrs, 'link');\n const tagText = tag ? tag.name() : app.translator.trans('flarum-tags.lib.deleted_tag_text');\n\n if (tag) {\n const color = tag.color();\n if (color) {\n attrs.style['--tag-bg'] = color;\n attrs.className += ' colored';\n }\n\n if (link) {\n attrs.title = tag.description() || '';\n attrs.href = app.route('tag', {tags: tag.slug()});\n }\n\n if (tag.isChild()) {\n attrs.className += ' TagLabel--child';\n }\n } else {\n attrs.className += ' untagged';\n }\n\n return (\n m((link ? Link : 'span'), attrs,\n \n {tag && tag.icon() && tagIcon(tag, {}, {useColor: false})} {tagText}\n \n )\n );\n}\n","import Tag from \"../models/Tag\";\n\nexport default function sortTags(tags: Tag[]) {\n return tags.slice(0).sort((a, b) => {\n const aPos = a.position();\n const bPos = b.position();\n\n // If they're both secondary tags, sort them by their discussions count,\n // descending.\n if (aPos === null && bPos === null)\n return b.discussionCount() - a.discussionCount();\n\n // If just one is a secondary tag, then the primary tag should\n // come first.\n if (bPos === null) return -1;\n if (aPos === null) return 1;\n\n // If we've made it this far, we know they're both primary tags. So we'll\n // need to see if they have parents.\n const aParent = a.parent();\n const bParent = b.parent();\n\n // If they both have the same parent, then their positions are local,\n // so we can compare them directly.\n if (aParent === bParent) return aPos - bPos;\n\n // If they are both child tags, then we will compare the positions of their\n // parents.\n else if (aParent && bParent)\n return aParent.position()! - bParent.position()!;\n\n // If we are comparing a child tag with its parent, then we let the parent\n // come first. If we are comparing an unrelated parent/child, then we\n // compare both of the parents.\n else if (aParent)\n return aParent === b ? 1 : aParent.position()! - bPos;\n\n else if (bParent)\n return bParent === a ? -1 : aPos - bParent.position()!;\n\n return 0;\n });\n}\n","import Page from 'flarum/common/components/Page';\nimport IndexPage from 'flarum/forum/components/IndexPage';\nimport Link from 'flarum/common/components/Link';\nimport LoadingIndicator from 'flarum/common/components/LoadingIndicator';\nimport listItems from 'flarum/common/helpers/listItems';\nimport humanTime from 'flarum/common/helpers/humanTime';\n\nimport tagIcon from '../../common/helpers/tagIcon';\nimport tagLabel from '../../common/helpers/tagLabel';\nimport sortTags from '../../common/utils/sortTags';\n\nexport default class TagsPage extends Page {\n oninit(vnode) {\n super.oninit(vnode);\n\n app.history.push('tags', app.translator.trans('flarum-tags.forum.header.back_to_tags_tooltip'));\n\n this.tags = [];\n\n const preloaded = app.preloadedApiDocument();\n\n if (preloaded) {\n this.tags = sortTags(preloaded.filter(tag => !tag.isChild()));\n return;\n }\n\n this.loading = true;\n\n app.tagList.load(['children', 'lastPostedDiscussion', 'parent']).then(() => {\n this.tags = sortTags(app.store.all('tags').filter(tag => !tag.isChild()));\n\n this.loading = false;\n\n m.redraw();\n });\n }\n\n view() {\n if (this.loading) {\n return ;\n }\n\n const pinned = this.tags.filter(tag => tag.position() !== null);\n const cloud = this.tags.filter(tag => tag.position() === null);\n\n return (\n
\n {IndexPage.prototype.hero()}\n
\n \n\n
\n
    \n {pinned.map(tag => {\n const lastPostedDiscussion = tag.lastPostedDiscussion();\n const children = sortTags(tag.children() || []);\n\n return (\n
  • \n \n {tag.icon() && tagIcon(tag, {}, { useColor: false })}\n

    {tag.name()}

    \n

    {tag.description()}

    \n {children\n ? (\n
    \n {children.map(child => [\n \n {child.name()}\n ,\n ' '\n ])}\n
    \n ) : ''}\n \n {lastPostedDiscussion\n ? (\n \n {lastPostedDiscussion.title()}\n {humanTime(lastPostedDiscussion.lastPostedAt())}\n \n ) : (\n \n )}\n
  • \n );\n })}\n
\n\n {cloud.length ? (\n
\n {cloud.map(tag => [\n tagLabel(tag, {link: true}),\n ' ',\n ])}\n
\n ) : ''}\n
\n
\n
\n );\n }\n\n oncreate(vnode) {\n super.oncreate(vnode);\n\n app.setTitle(app.translator.trans('flarum-tags.forum.all_tags.meta_title_text'));\n app.setTitleCount(0);\n }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/EventPost'];","import extract from 'flarum/common/utils/extract';\nimport tagLabel from './tagLabel';\nimport sortTags from '../utils/sortTags';\n\nexport default function tagsLabel(tags, attrs = {}) {\n const children = [];\n const link = extract(attrs, 'link');\n\n attrs.className = 'TagsLabel ' + (attrs.className || '');\n\n if (tags) {\n sortTags(tags).forEach(tag => {\n if (tag || tags.length === 1) {\n children.push(tagLabel(tag, {link}));\n }\n });\n } else {\n children.push(tagLabel());\n }\n\n return {children};\n}\n","import EventPost from 'flarum/forum/components/EventPost';\nimport tagsLabel from '../../common/helpers/tagsLabel';\n\nexport default class DiscussionTaggedPost extends EventPost {\n static initAttrs(attrs) {\n super.initAttrs(attrs);\n\n const oldTags = attrs.post.content()[0];\n const newTags = attrs.post.content()[1];\n\n function diffTags(tags1, tags2) {\n return tags1\n .filter(tag => tags2.indexOf(tag) === -1)\n .map(id => app.store.getById('tags', id));\n }\n\n attrs.tagsAdded = diffTags(newTags, oldTags);\n attrs.tagsRemoved = diffTags(oldTags, newTags);\n }\n\n icon() {\n return 'fas fa-tag';\n }\n\n descriptionKey() {\n if (this.attrs.tagsAdded.length) {\n if (this.attrs.tagsRemoved.length) {\n return 'flarum-tags.forum.post_stream.added_and_removed_tags_text';\n }\n\n return 'flarum-tags.forum.post_stream.added_tags_text';\n }\n\n return 'flarum-tags.forum.post_stream.removed_tags_text';\n }\n\n descriptionData() {\n const data = {};\n\n if (this.attrs.tagsAdded.length) {\n data.tagsAdded = app.translator.trans('flarum-tags.forum.post_stream.tags_text', {\n tags: tagsLabel(this.attrs.tagsAdded, {link: true}),\n count: this.attrs.tagsAdded.length\n });\n }\n\n if (this.attrs.tagsRemoved.length) {\n data.tagsRemoved = app.translator.trans('flarum-tags.forum.post_stream.tags_text', {\n tags: tagsLabel(this.attrs.tagsRemoved, {link: true}),\n count: this.attrs.tagsRemoved.length\n });\n }\n\n return data;\n }\n}\n","function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n\n if (info.done) {\n resolve(value);\n } else {\n Promise.resolve(value).then(_next, _throw);\n }\n}\n\nexport default function _asyncToGenerator(fn) {\n return function () {\n var self = this,\n args = arguments;\n return new Promise(function (resolve, reject) {\n var gen = fn.apply(self, args);\n\n function _next(value) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n }\n\n function _throw(err) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n }\n\n _next(undefined);\n });\n };\n}","import app from \"flarum/forum/app\";\nimport type Tag from \"../../common/models/Tag\";\n\nexport default class TagListState {\n loadedIncludes = new Set();\n\n async load(includes: string[] = []): Promise {\n const unloadedIncludes = includes.filter(\n (include) => !this.loadedIncludes.has(include)\n );\n\n if (unloadedIncludes.length === 0) {\n return Promise.resolve(app.store.all(\"tags\"));\n }\n\n return app.store\n .find(\"tags\", { include: unloadedIncludes.join(\",\") })\n .then((val) => {\n unloadedIncludes.forEach((include) => this.loadedIncludes.add(include));\n return val;\n });\n }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/extend'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Separator'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/LinkButton'];","import Link from 'flarum/common/components/Link';\nimport LinkButton from 'flarum/common/components/LinkButton';\nimport classList from 'flarum/common/utils/classList';\nimport tagIcon from '../../common/helpers/tagIcon';\n\nexport default class TagLinkButton extends LinkButton {\n view(vnode) {\n const tag = this.attrs.model;\n const active = this.constructor.isActive(this.attrs);\n const description = tag && tag.description();\n const className = classList([\n 'TagLinkButton',\n 'hasIcon',\n this.attrs.className,\n tag.isChild() && 'child',\n ]);\n\n return (\n \n {tagIcon(tag, { className: 'Button-icon' })}\n \n {tag ? tag.name() : app.translator.trans('flarum-tags.forum.index.untagged_link')}\n \n \n );\n }\n\n static initAttrs(attrs) {\n super.initAttrs(attrs);\n\n const tag = attrs.model;\n\n attrs.params.tags = tag ? tag.slug() : 'untagged';\n attrs.route = app.route('tag', attrs.params);\n }\n}\n","import { extend } from 'flarum/common/extend';\nimport IndexPage from 'flarum/forum/components/IndexPage';\nimport Separator from 'flarum/common/components/Separator';\nimport LinkButton from 'flarum/common/components/LinkButton';\n\nimport TagLinkButton from './components/TagLinkButton';\nimport TagsPage from './components/TagsPage';\nimport sortTags from '../common/utils/sortTags';\n\nexport default function() {\n // Add a link to the tags page, as well as a list of all the tags,\n // to the index page's sidebar.\n extend(IndexPage.prototype, 'navItems', function (items) {\n items.add('tags', \n {app.translator.trans('flarum-tags.forum.index.tags_link')}\n \n , -10);\n\n if (app.current.matches(TagsPage)) return;\n\n items.add('separator', Separator.component(), -12);\n\n const params = app.search.stickyParams();\n const tags = app.store.all('tags');\n const currentTag = this.currentTag();\n\n const addTag = tag => {\n let active = currentTag === tag;\n\n if (!active && currentTag) {\n active = currentTag.parent() === tag;\n }\n\n // tag.name() is passed here as children even though it isn't used directly\n // because when we need to get the active child in SelectDropdown, we need to\n // use its children to populate the dropdown. The problem here is that `view`\n // on TagLinkButton is only called AFTER SelectDropdown, so no children are available\n // for SelectDropdown to use at the time.\n items.add('tag' + tag.id(), TagLinkButton.component({model: tag, params, active}, tag?.name()), -14);\n };\n\n sortTags(tags)\n .filter(tag => tag.position() !== null && (!tag.isChild() || (currentTag && (tag.parent() === currentTag || tag.parent() === currentTag.parent()))))\n .forEach(addTag);\n\n const more = tags\n .filter(tag => tag.position() === null)\n .sort((a, b) => b.discussionCount() - a.discussionCount());\n\n more.splice(0, 3).forEach(addTag);\n\n if (more.length) {\n items.add('moreTags', \n {app.translator.trans('flarum-tags.forum.index.more_link')}\n , -16)\n }\n });\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/states/DiscussionListState'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/states/GlobalSearchState'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/Component'];","import Component from 'flarum/common/Component';\nimport tagIcon from '../../common/helpers/tagIcon';\n\nexport default class TagHero extends Component {\n view() {\n const tag = this.attrs.model;\n const color = tag.color();\n\n return (\n
\n
\n
\n

{tag.icon() && tagIcon(tag, {}, { useColor: false })} {tag.name()}

\n
{tag.description()}
\n
\n
\n
\n );\n }\n}\n","import app from 'flarum/forum/app';\nimport type Mithril from 'mithril';\nimport { extend, override } from 'flarum/common/extend';\nimport IndexPage from 'flarum/forum/components/IndexPage';\nimport DiscussionListState from 'flarum/forum/states/DiscussionListState';\nimport GlobalSearchState from 'flarum/forum/states/GlobalSearchState';\nimport classList from 'flarum/common/utils/classList';\n\nimport TagHero from './components/TagHero';\nimport Tag from '../common/models/Tag';\nimport { ComponentAttrs } from 'flarum/common/Component';\n\nconst findTag = (slug: string) => app.store.all('tags').find(tag => tag.slug().localeCompare(slug, undefined, { sensitivity: 'base' }) === 0);\n\nexport default function() {\n IndexPage.prototype.currentTag = function() {\n if (this.currentActiveTag) {\n return this.currentActiveTag;\n }\n\n const slug = app.search.params().tags;\n let tag = null;\n\n if (slug) {\n tag = findTag(slug);\n }\n\n if (slug && !tag || (tag && !tag.isChild() && !tag.children())) {\n if (this.currentTagLoading) {\n return;\n }\n\n this.currentTagLoading = true;\n\n // Unlike the backend, no need to fetch parent.children because if we're on\n // a child tag page, then either:\n // - We loaded in that child tag (and its siblings) in the API document\n // - We first navigated to the current tag's parent, which would have loaded in the current tag's siblings.\n app.store.find('tags', slug, { include: 'children,children.parent,parent,state'}).then(() => {\n this.currentActiveTag = findTag(slug);\n\n m.redraw();\n }).finally(() => {\n this.currentTagLoading = false;\n });\n }\n\n if (tag) {\n this.currentActiveTag = tag;\n return this.currentActiveTag;\n }\n\n return;\n };\n\n // If currently viewing a tag, insert a tag hero at the top of the view.\n override(IndexPage.prototype, 'hero', function(original) {\n const tag = this.currentTag();\n\n if (tag) return ;\n\n return original();\n });\n\n extend(IndexPage.prototype, 'view', function(vdom: Mithril.Vnode) {\n const tag = this.currentTag();\n\n if (tag) vdom.attrs.className += ' IndexPage--tag'+tag.id();\n });\n\n extend(IndexPage.prototype, 'setTitle', function() {\n const tag = this.currentTag();\n\n if (tag) {\n app.setTitle(tag.name());\n }\n });\n\n // If currently viewing a tag, restyle the 'new discussion' button to use\n // the tag's color, and disable if the user isn't allowed to edit.\n extend(IndexPage.prototype, 'sidebarItems', function(items) {\n const tag = this.currentTag();\n\n if (tag) {\n const color = tag.color();\n const canStartDiscussion = tag.canStartDiscussion() || !app.session.user;\n const newDiscussion = items.get('newDiscussion') as Mithril.Vnode;\n\n if (color) {\n newDiscussion.attrs.className = classList([newDiscussion.attrs.className, 'Button--tagColored']);\n newDiscussion.attrs.style = { '--color': color };\n }\n\n newDiscussion.attrs.disabled = !canStartDiscussion;\n newDiscussion.children = app.translator.trans(canStartDiscussion ? 'core.forum.index.start_discussion_button' : 'core.forum.index.cannot_start_discussion_button');\n }\n });\n\n // Add a parameter for the global search state to pass on to the\n // DiscussionListState that will let us filter discussions by tag.\n extend(GlobalSearchState.prototype, 'params', function(params) {\n params.tags = m.route.param('tags');\n });\n\n // Translate that parameter into a gambit appended to the search query.\n extend(DiscussionListState.prototype, 'requestParams', function(this: DiscussionListState, params) {\n if (typeof params.include === 'string') {\n params.include = [params.include];\n } else {\n params.include?.push('tags', 'tags.parent');\n }\n\n if (this.params.tags) {\n const filter = params.filter ?? {};\n filter.tag = this.params.tags;\n // TODO: replace this with a more robust system.\n const q = filter.q;\n if (q) {\n filter.q = `${q} tag:${this.params.tags}`;\n }\n params.filter = filter\n }\n });\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/DiscussionListItem'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/DiscussionHero'];","import { extend } from 'flarum/common/extend';\nimport DiscussionListItem from 'flarum/forum/components/DiscussionListItem';\nimport DiscussionHero from 'flarum/forum/components/DiscussionHero';\n\nimport tagsLabel from '../common/helpers/tagsLabel';\nimport sortTags from '../common/utils/sortTags';\n\nexport default function() {\n // Add tag labels to each discussion in the discussion list.\n extend(DiscussionListItem.prototype, 'infoItems', function(items) {\n const tags = this.attrs.discussion.tags();\n\n if (tags && tags.length) {\n items.add('tags', tagsLabel(tags), 10);\n }\n });\n\n // Restyle a discussion's hero to use its first tag's color.\n extend(DiscussionHero.prototype, 'view', function(view) {\n const tags = sortTags(this.attrs.discussion.tags());\n\n if (tags && tags.length) {\n const color = tags[0].color();\n if (color) {\n view.attrs.style = { '--hero-bg': color };\n view.attrs.className += ' DiscussionHero--colored';\n }\n }\n });\n\n // Add a list of a discussion's tags to the discussion hero, displayed\n // before the title. Put the title on its own line.\n extend(DiscussionHero.prototype, 'items', function(items) {\n const tags = this.attrs.discussion.tags();\n\n if (tags && tags.length) {\n items.add('tags', tagsLabel(tags, {link: true}), 5);\n }\n });\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/utils/DiscussionControls'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Button'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Modal'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/DiscussionPage'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/helpers/highlight'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/extractText'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/utils/KeyboardNavigatable'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/Stream'];","export default function getSelectableTags(discussion) {\n let tags = app.store.all('tags');\n\n if (discussion) {\n tags = tags.filter(tag => tag.canAddToDiscussion() || discussion.tags().indexOf(tag) !== -1);\n } else {\n tags = tags.filter(tag => tag.canStartDiscussion());\n }\n\n return tags;\n}\n","import Component from 'flarum/common/Component';\nimport Button from 'flarum/common/components/Button';\nimport classList from 'flarum/common/utils/classList';\n\n/**\n * @TODO move to core\n */\nexport default class ToggleButton extends Component {\n view(vnode) {\n const { className, isToggled, ...attrs } = this.attrs;\n const icon = isToggled ? 'far fa-check-circle' : 'far fa-circle';\n\n return (\n \n );\n }\n}\n","export default function _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}","import app from 'flarum/forum/app';\nimport type Mithril from 'mithril';\nimport Modal, { IInternalModalAttrs } from 'flarum/common/components/Modal';\nimport DiscussionPage from 'flarum/forum/components/DiscussionPage';\nimport Button from 'flarum/common/components/Button';\nimport LoadingIndicator from 'flarum/common/components/LoadingIndicator';\nimport highlight from 'flarum/common/helpers/highlight';\nimport classList from 'flarum/common/utils/classList';\nimport extractText from 'flarum/common/utils/extractText';\nimport KeyboardNavigatable from 'flarum/forum/utils/KeyboardNavigatable';\nimport Stream from 'flarum/common/utils/Stream';\nimport Discussion from 'flarum/common/models/Discussion';\n\nimport tagLabel from '../../common/helpers/tagLabel';\nimport tagIcon from '../../common/helpers/tagIcon';\nimport sortTags from '../../common/utils/sortTags';\nimport getSelectableTags from '../utils/getSelectableTags';\nimport ToggleButton from './ToggleButton';\nimport Tag from '../../common/models/Tag';\n\nexport interface TagDiscussionModalAttrs extends IInternalModalAttrs {\n discussion?: Discussion;\n selectedTags?: Tag[];\n onsubmit?: (tags: Tag[]) => {};\n}\n\nexport default class TagDiscussionModal extends Modal {\n tagsLoading = true;\n\n selected: Tag[] = [];\n filter = Stream('');\n focused = false;\n\n minPrimary = app.forum.attribute('minPrimaryTags');\n maxPrimary = app.forum.attribute('maxPrimaryTags');\n minSecondary = app.forum.attribute('minSecondaryTags');\n maxSecondary = app.forum.attribute('maxSecondaryTags');\n\n bypassReqs = false;\n\n navigator = new KeyboardNavigatable();\n\n tags?: Tag[];\n\n selectedTag?: Tag;\n oninit(vnode: Mithril.Vnode) {\n super.oninit(vnode);\n\n this.navigator\n .onUp(() => this.setIndex(this.getCurrentNumericIndex() - 1, true))\n .onDown(() => this.setIndex(this.getCurrentNumericIndex() + 1, true))\n .onSelect(this.select.bind(this))\n .onRemove(() => this.selected.splice(this.selected.length - 1, 1));\n\n app.tagList.load(['parent']).then(() => {\n this.tagsLoading = false;\n\n const tags = sortTags(getSelectableTags(this.attrs.discussion));\n this.tags = tags;\n\n const discussionTags = this.attrs.discussion?.tags()\n if (this.attrs.selectedTags) {\n this.attrs.selectedTags.map(this.addTag.bind(this));\n } else if (discussionTags) {\n discussionTags.forEach(tag => tag && this.addTag(tag));\n }\n\n this.selectedTag = tags[0];\n\n m.redraw();\n });\n }\n\n primaryCount() {\n return this.selected.filter(tag => tag.isPrimary()).length;\n }\n\n secondaryCount() {\n return this.selected.filter(tag => !tag.isPrimary()).length;\n }\n\n /**\n * Add the given tag to the list of selected tags.\n */\n addTag(tag: Tag) {\n if (!tag.canStartDiscussion()) return;\n\n // If this tag has a parent, we'll also need to add the parent tag to the\n // selected list if it's not already in there.\n const parent = tag.parent();\n if (parent && !this.selected.includes(parent)) {\n this.selected.push(parent);\n }\n\n if (!this.selected.includes(tag)) {\n this.selected.push(tag);\n }\n }\n\n /**\n * Remove the given tag from the list of selected tags.\n */\n removeTag(tag: Tag) {\n const index = this.selected.indexOf(tag);\n if (index !== -1) {\n this.selected.splice(index, 1);\n\n // Look through the list of selected tags for any tags which have the tag\n // we just removed as their parent. We'll need to remove them too.\n this.selected\n .filter(selected => selected.parent() === tag)\n .forEach(this.removeTag.bind(this));\n }\n }\n\n className() {\n return 'TagDiscussionModal';\n }\n\n title() {\n return this.attrs.discussion\n ? app.translator.trans('flarum-tags.forum.choose_tags.edit_title', {title: {this.attrs.discussion.title()}})\n : app.translator.trans('flarum-tags.forum.choose_tags.title');\n }\n\n getInstruction(primaryCount: number, secondaryCount: number) {\n if (this.bypassReqs) {\n return '';\n }\n\n if (primaryCount < this.minPrimary) {\n const remaining = this.minPrimary - primaryCount;\n return app.translator.trans('flarum-tags.forum.choose_tags.choose_primary_placeholder', {count: remaining});\n } else if (secondaryCount < this.minSecondary) {\n const remaining = this.minSecondary - secondaryCount;\n return app.translator.trans('flarum-tags.forum.choose_tags.choose_secondary_placeholder', {count: remaining});\n }\n\n return '';\n }\n\n content() {\n if (this.tagsLoading || !this.tags) {\n return ;\n }\n\n let tags = this.tags;\n const filter = this.filter().toLowerCase();\n const primaryCount = this.primaryCount();\n const secondaryCount = this.secondaryCount();\n\n // Filter out all child tags whose parents have not been selected. This\n // makes it impossible to select a child if its parent hasn't been selected.\n tags = tags.filter(tag => {\n const parent = tag.parent();\n return parent !== null && (parent === false || this.selected.includes(parent));\n });\n\n // If the number of selected primary/secondary tags is at the maximum, then\n // we'll filter out all other tags of that type.\n if (primaryCount >= this.maxPrimary && !this.bypassReqs) {\n tags = tags.filter(tag => !tag.isPrimary() || this.selected.includes(tag));\n }\n\n if (secondaryCount >= this.maxSecondary && !this.bypassReqs) {\n tags = tags.filter(tag => tag.isPrimary() || this.selected.includes(tag));\n }\n\n // If the user has entered text in the filter input, then filter by tags\n // whose name matches what they've entered.\n if (filter) {\n tags = tags.filter(tag => tag.name().substr(0, filter.length).toLowerCase() === filter);\n }\n\n if (!this.selectedTag || !tags.includes(this.selectedTag)) this.selectedTag = tags[0];\n\n const inputWidth = Math.max(extractText(this.getInstruction(primaryCount, secondaryCount)).length, this.filter().length);\n\n return [\n
\n
\n
\n
this.$('.TagsInput input').focus()}\n >\n \n {this.selected.map(tag =>\n {\n this.removeTag(tag);\n this.onready();\n }}>\n {tagLabel(tag)}\n \n )}\n \n this.focused = true}\n onblur={() => this.focused = false}/>\n
\n
\n
\n \n
\n
\n
,\n\n
\n
    \n {tags\n .filter(tag => filter || !tag.parent() || this.selected.includes(tag.parent() as Tag))\n .map(tag => (\n
  • this.selectedTag = tag}\n onclick={this.toggleTag.bind(this, tag)}\n >\n {tagIcon(tag)}\n \n {highlight(tag.name(), filter)}\n \n {tag.description()\n ? (\n \n {tag.description()}\n \n ) : ''}\n
  • \n ))}\n
\n {!!app.forum.attribute('canBypassTagCounts') && (\n
\n this.bypassReqs = !this.bypassReqs} isToggled={this.bypassReqs}>\n {app.translator.trans('flarum-tags.forum.choose_tags.bypass_requirements')}\n \n
\n )}\n
\n ];\n }\n\n meetsRequirements(primaryCount: number, secondaryCount: number) {\n if (this.bypassReqs) {\n return true;\n }\n\n return primaryCount >= this.minPrimary && secondaryCount >= this.minSecondary;\n }\n\n toggleTag(tag: Tag) {\n // Won't happen, needed for type safety.\n if (!this.tags) return;\n\n if (this.selected.includes(tag)) {\n this.removeTag(tag);\n } else {\n this.addTag(tag);\n }\n\n if (this.filter()) {\n this.filter('');\n this.selectedTag = this.tags[0];\n }\n\n this.onready();\n }\n\n select(e: KeyboardEvent) {\n // Ctrl + Enter submits the selection, just Enter completes the current entry\n if (e.metaKey || e.ctrlKey || this.selectedTag && this.selected.includes(this.selectedTag)) {\n if (this.selected.length) {\n // The DOM submit method doesn't emit a `submit event, so we\n // simulate a manual submission so our `onsubmit` logic is run.\n this.$('button[type=\"submit\"]').click();\n }\n } else if (this.selectedTag) {\n this.getItem(this.selectedTag)[0].dispatchEvent(new Event('click'));\n }\n }\n\n selectableItems() {\n return this.$('.TagDiscussionModal-list > li');\n }\n\n getCurrentNumericIndex() {\n if (!this.selectedTag) return -1;\n\n return this.selectableItems().index(\n this.getItem(this.selectedTag)\n );\n }\n\n getItem(selectedTag: Tag) {\n return this.selectableItems().filter(`[data-index=\"${selectedTag.id()}\"]`);\n }\n\n setIndex(index: number, scrollToItem: boolean) {\n const $items = this.selectableItems();\n const $dropdown = $items.parent();\n\n if (index < 0) {\n index = $items.length - 1;\n } else if (index >= $items.length) {\n index = 0;\n }\n\n const $item = $items.eq(index);\n\n this.selectedTag = app.store.getById('tags', $item.attr('data-index')!);\n\n m.redraw();\n\n if (scrollToItem && this.selectedTag) {\n const dropdownScroll = $dropdown.scrollTop()!;\n const dropdownTop = $dropdown.offset()!.top;\n const dropdownBottom = dropdownTop + $dropdown.outerHeight()!;\n const itemTop = $item.offset()!.top;\n const itemBottom = itemTop + $item.outerHeight()!;\n\n let scrollTop;\n if (itemTop < dropdownTop) {\n scrollTop = dropdownScroll - dropdownTop + itemTop - parseInt($dropdown.css('padding-top'), 10);\n } else if (itemBottom > dropdownBottom) {\n scrollTop = dropdownScroll - dropdownBottom + itemBottom + parseInt($dropdown.css('padding-bottom'), 10);\n }\n\n if (typeof scrollTop !== 'undefined') {\n $dropdown.stop(true).animate({scrollTop}, 100);\n }\n }\n }\n\n onsubmit(e: SubmitEvent) {\n e.preventDefault();\n\n const discussion = this.attrs.discussion;\n const tags = this.selected;\n\n if (discussion) {\n discussion.save({relationships: {tags}})\n .then(() => {\n if (app.current.matches(DiscussionPage)) {\n app.current.get('stream').update();\n }\n m.redraw();\n });\n }\n\n if (this.attrs.onsubmit) this.attrs.onsubmit(tags);\n\n this.hide();\n }\n}\n","import { extend } from 'flarum/common/extend';\nimport DiscussionControls from 'flarum/forum/utils/DiscussionControls';\nimport Button from 'flarum/common/components/Button';\n\nimport TagDiscussionModal from './components/TagDiscussionModal';\n\nexport default function() {\n // Add a control allowing the discussion to be moved to another category.\n extend(DiscussionControls, 'moderationControls', function(items, discussion) {\n if (discussion.canTag()) {\n items.add('tags', );\n }\n });\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/DiscussionComposer'];","import { extend, override } from 'flarum/common/extend';\nimport IndexPage from 'flarum/forum/components/IndexPage';\nimport DiscussionComposer from 'flarum/forum/components/DiscussionComposer';\nimport classList from 'flarum/common/utils/classList';\n\nimport TagDiscussionModal from './components/TagDiscussionModal';\nimport tagsLabel from '../common/helpers/tagsLabel';\nimport getSelectableTags from './utils/getSelectableTags';\n\nexport default function () {\n extend(IndexPage.prototype, 'newDiscussionAction', function (promise) {\n // From `addTagFilter\n const tag = this.currentTag();\n\n if (tag) {\n const parent = tag.parent();\n const tags = parent ? [parent, tag] : [tag];\n promise.then(composer => composer.fields.tags = tags);\n } else {\n app.composer.fields.tags = [];\n }\n });\n\n\n extend(DiscussionComposer.prototype, 'oninit', function () {\n app.tagList.load(['parent']).then(() => m.redraw())\n });\n\n // Add tag-selection abilities to the discussion composer.\n DiscussionComposer.prototype.chooseTags = function () {\n const selectableTags = getSelectableTags();\n\n if (!selectableTags.length) return;\n\n app.modal.show(TagDiscussionModal, {\n selectedTags: (this.composer.fields.tags || []).slice(0),\n onsubmit: tags => {\n this.composer.fields.tags = tags;\n this.$('textarea').focus();\n }\n });\n };\n\n // Add a tag-selection menu to the discussion composer's header, after the\n // title.\n extend(DiscussionComposer.prototype, 'headerItems', function (items) {\n const tags = this.composer.fields.tags || [];\n const selectableTags = getSelectableTags();\n\n items.add('tags', (\n \n {tags.length\n ? tagsLabel(tags)\n : {app.translator.trans('flarum-tags.forum.composer_discussion.choose_tags_link')}}\n \n ), 10);\n });\n\n override(DiscussionComposer.prototype, 'onsubmit', function (original) {\n const chosenTags = this.composer.fields.tags || [];\n const chosenPrimaryTags = chosenTags.filter(tag => tag.position() !== null && !tag.isChild());\n const chosenSecondaryTags = chosenTags.filter(tag => tag.position() === null);\n const selectableTags = getSelectableTags();\n\n if ((!chosenTags.length\n || (chosenPrimaryTags.length < app.forum.attribute('minPrimaryTags'))\n || (chosenSecondaryTags.length < app.forum.attribute('minSecondaryTags'))\n ) && selectableTags.length) {\n app.modal.show(TagDiscussionModal, {\n selectedTags: chosenTags,\n onsubmit: tags => {\n this.composer.fields.tags = tags;\n original();\n }\n });\n } else {\n original();\n }\n });\n\n // Add the selected tags as data to submit to the server.\n extend(DiscussionComposer.prototype, 'data', function (data) {\n data.relationships = data.relationships || {};\n data.relationships.tags = this.composer.fields.tags;\n });\n}\n","import sortTags from './utils/sortTags';\nimport Tag from './models/Tag';\nimport tagsLabel from './helpers/tagsLabel';\nimport tagIcon from './helpers/tagIcon';\nimport tagLabel from './helpers/tagLabel';\n\nexport default {\n 'tags/utils/sortTags': sortTags,\n 'tags/models/Tag': Tag,\n 'tags/helpers/tagsLabel': tagsLabel,\n 'tags/helpers/tagIcon': tagIcon,\n 'tags/helpers/tagLabel': tagLabel\n};\n","import compat from '../common/compat';\n\nimport addTagFilter from './addTagFilter';\nimport addTagControl from './addTagControl';\nimport TagHero from './components/TagHero';\nimport TagDiscussionModal from './components/TagDiscussionModal';\nimport TagsPage from './components/TagsPage';\nimport DiscussionTaggedPost from './components/DiscussionTaggedPost';\nimport TagLinkButton from './components/TagLinkButton';\nimport addTagList from './addTagList';\nimport addTagLabels from './addTagLabels';\nimport addTagComposer from './addTagComposer';\nimport getSelectableTags from './utils/getSelectableTags';\n\nexport default Object.assign(compat, {\n 'tags/addTagFilter': addTagFilter,\n 'tags/addTagControl': addTagControl,\n 'tags/components/TagHero': TagHero,\n 'tags/components/TagDiscussionModal': TagDiscussionModal,\n 'tags/components/TagsPage': TagsPage,\n 'tags/components/DiscussionTaggedPost': DiscussionTaggedPost,\n 'tags/components/TagLinkButton': TagLinkButton,\n 'tags/addTagList': addTagList,\n 'tags/addTagLabels': addTagLabels,\n 'tags/addTagComposer': addTagComposer,\n 'tags/utils/getSelectableTags': getSelectableTags,\n});\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core;","import app from 'flarum/forum/app';\nimport Model from 'flarum/common/Model';\nimport Discussion from 'flarum/common/models/Discussion';\nimport IndexPage from 'flarum/forum/components/IndexPage';\n\nimport Tag from '../common/models/Tag';\nimport TagsPage from './components/TagsPage';\nimport DiscussionTaggedPost from './components/DiscussionTaggedPost';\n\nimport TagListState from './states/TagListState';\n\nimport addTagList from './addTagList';\nimport addTagFilter from './addTagFilter';\nimport addTagLabels from './addTagLabels';\nimport addTagControl from './addTagControl';\nimport addTagComposer from './addTagComposer';\n\napp.initializers.add('flarum-tags', function() {\n app.routes.tags = {path: '/tags', component: TagsPage };\n app.routes.tag = {path: '/t/:tags', component: IndexPage };\n\n app.route.tag = (tag: Tag) => app.route('tag', {tags: tag.slug()});\n\n app.postComponents.discussionTagged = DiscussionTaggedPost;\n\n app.store.models.tags = Tag;\n\n app.tagList = new TagListState();\n\n Discussion.prototype.tags = Model.hasMany('tags');\n Discussion.prototype.canTag = Model.attribute('canTag');\n\n addTagList();\n addTagFilter();\n addTagLabels();\n addTagControl();\n addTagComposer();\n});\n\n\n// Expose compat API\nimport tagsCompat from './compat';\nimport { compat } from '@flarum/core/forum';\n\nObject.assign(compat, tagsCompat);\n","module.exports = require(\"regenerator-runtime\");\n","/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nvar runtime = (function (exports) {\n \"use strict\";\n\n var Op = Object.prototype;\n var hasOwn = Op.hasOwnProperty;\n var undefined; // More compressible than void 0.\n var $Symbol = typeof Symbol === \"function\" ? Symbol : {};\n var iteratorSymbol = $Symbol.iterator || \"@@iterator\";\n var asyncIteratorSymbol = $Symbol.asyncIterator || \"@@asyncIterator\";\n var toStringTagSymbol = $Symbol.toStringTag || \"@@toStringTag\";\n\n function define(obj, key, value) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n return obj[key];\n }\n try {\n // IE 8 has a broken Object.defineProperty that only works on DOM objects.\n define({}, \"\");\n } catch (err) {\n define = function(obj, key, value) {\n return obj[key] = value;\n };\n }\n\n function wrap(innerFn, outerFn, self, tryLocsList) {\n // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.\n var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;\n var generator = Object.create(protoGenerator.prototype);\n var context = new Context(tryLocsList || []);\n\n // The ._invoke method unifies the implementations of the .next,\n // .throw, and .return methods.\n generator._invoke = makeInvokeMethod(innerFn, self, context);\n\n return generator;\n }\n exports.wrap = wrap;\n\n // Try/catch helper to minimize deoptimizations. Returns a completion\n // record like context.tryEntries[i].completion. This interface could\n // have been (and was previously) designed to take a closure to be\n // invoked without arguments, but in all the cases we care about we\n // already have an existing method we want to call, so there's no need\n // to create a new function object. We can even get away with assuming\n // the method takes exactly one argument, since that happens to be true\n // in every case, so we don't have to touch the arguments object. The\n // only additional allocation required is the completion record, which\n // has a stable shape and so hopefully should be cheap to allocate.\n function tryCatch(fn, obj, arg) {\n try {\n return { type: \"normal\", arg: fn.call(obj, arg) };\n } catch (err) {\n return { type: \"throw\", arg: err };\n }\n }\n\n var GenStateSuspendedStart = \"suspendedStart\";\n var GenStateSuspendedYield = \"suspendedYield\";\n var GenStateExecuting = \"executing\";\n var GenStateCompleted = \"completed\";\n\n // Returning this object from the innerFn has the same effect as\n // breaking out of the dispatch switch statement.\n var ContinueSentinel = {};\n\n // Dummy constructor functions that we use as the .constructor and\n // .constructor.prototype properties for functions that return Generator\n // objects. For full spec compliance, you may wish to configure your\n // minifier not to mangle the names of these two functions.\n function Generator() {}\n function GeneratorFunction() {}\n function GeneratorFunctionPrototype() {}\n\n // This is a polyfill for %IteratorPrototype% for environments that\n // don't natively support it.\n var IteratorPrototype = {};\n define(IteratorPrototype, iteratorSymbol, function () {\n return this;\n });\n\n var getProto = Object.getPrototypeOf;\n var NativeIteratorPrototype = getProto && getProto(getProto(values([])));\n if (NativeIteratorPrototype &&\n NativeIteratorPrototype !== Op &&\n hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {\n // This environment has a native %IteratorPrototype%; use it instead\n // of the polyfill.\n IteratorPrototype = NativeIteratorPrototype;\n }\n\n var Gp = GeneratorFunctionPrototype.prototype =\n Generator.prototype = Object.create(IteratorPrototype);\n GeneratorFunction.prototype = GeneratorFunctionPrototype;\n define(Gp, \"constructor\", GeneratorFunctionPrototype);\n define(GeneratorFunctionPrototype, \"constructor\", GeneratorFunction);\n GeneratorFunction.displayName = define(\n GeneratorFunctionPrototype,\n toStringTagSymbol,\n \"GeneratorFunction\"\n );\n\n // Helper for defining the .next, .throw, and .return methods of the\n // Iterator interface in terms of a single ._invoke method.\n function defineIteratorMethods(prototype) {\n [\"next\", \"throw\", \"return\"].forEach(function(method) {\n define(prototype, method, function(arg) {\n return this._invoke(method, arg);\n });\n });\n }\n\n exports.isGeneratorFunction = function(genFun) {\n var ctor = typeof genFun === \"function\" && genFun.constructor;\n return ctor\n ? ctor === GeneratorFunction ||\n // For the native GeneratorFunction constructor, the best we can\n // do is to check its .name property.\n (ctor.displayName || ctor.name) === \"GeneratorFunction\"\n : false;\n };\n\n exports.mark = function(genFun) {\n if (Object.setPrototypeOf) {\n Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);\n } else {\n genFun.__proto__ = GeneratorFunctionPrototype;\n define(genFun, toStringTagSymbol, \"GeneratorFunction\");\n }\n genFun.prototype = Object.create(Gp);\n return genFun;\n };\n\n // Within the body of any async function, `await x` is transformed to\n // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test\n // `hasOwn.call(value, \"__await\")` to determine if the yielded value is\n // meant to be awaited.\n exports.awrap = function(arg) {\n return { __await: arg };\n };\n\n function AsyncIterator(generator, PromiseImpl) {\n function invoke(method, arg, resolve, reject) {\n var record = tryCatch(generator[method], generator, arg);\n if (record.type === \"throw\") {\n reject(record.arg);\n } else {\n var result = record.arg;\n var value = result.value;\n if (value &&\n typeof value === \"object\" &&\n hasOwn.call(value, \"__await\")) {\n return PromiseImpl.resolve(value.__await).then(function(value) {\n invoke(\"next\", value, resolve, reject);\n }, function(err) {\n invoke(\"throw\", err, resolve, reject);\n });\n }\n\n return PromiseImpl.resolve(value).then(function(unwrapped) {\n // When a yielded Promise is resolved, its final value becomes\n // the .value of the Promise<{value,done}> result for the\n // current iteration.\n result.value = unwrapped;\n resolve(result);\n }, function(error) {\n // If a rejected Promise was yielded, throw the rejection back\n // into the async generator function so it can be handled there.\n return invoke(\"throw\", error, resolve, reject);\n });\n }\n }\n\n var previousPromise;\n\n function enqueue(method, arg) {\n function callInvokeWithMethodAndArg() {\n return new PromiseImpl(function(resolve, reject) {\n invoke(method, arg, resolve, reject);\n });\n }\n\n return previousPromise =\n // If enqueue has been called before, then we want to wait until\n // all previous Promises have been resolved before calling invoke,\n // so that results are always delivered in the correct order. If\n // enqueue has not been called before, then it is important to\n // call invoke immediately, without waiting on a callback to fire,\n // so that the async generator function has the opportunity to do\n // any necessary setup in a predictable way. This predictability\n // is why the Promise constructor synchronously invokes its\n // executor callback, and why async functions synchronously\n // execute code before the first await. Since we implement simple\n // async functions in terms of async generators, it is especially\n // important to get this right, even though it requires care.\n previousPromise ? previousPromise.then(\n callInvokeWithMethodAndArg,\n // Avoid propagating failures to Promises returned by later\n // invocations of the iterator.\n callInvokeWithMethodAndArg\n ) : callInvokeWithMethodAndArg();\n }\n\n // Define the unified helper method that is used to implement .next,\n // .throw, and .return (see defineIteratorMethods).\n this._invoke = enqueue;\n }\n\n defineIteratorMethods(AsyncIterator.prototype);\n define(AsyncIterator.prototype, asyncIteratorSymbol, function () {\n return this;\n });\n exports.AsyncIterator = AsyncIterator;\n\n // Note that simple async functions are implemented on top of\n // AsyncIterator objects; they just return a Promise for the value of\n // the final result produced by the iterator.\n exports.async = function(innerFn, outerFn, self, tryLocsList, PromiseImpl) {\n if (PromiseImpl === void 0) PromiseImpl = Promise;\n\n var iter = new AsyncIterator(\n wrap(innerFn, outerFn, self, tryLocsList),\n PromiseImpl\n );\n\n return exports.isGeneratorFunction(outerFn)\n ? iter // If outerFn is a generator, return the full iterator.\n : iter.next().then(function(result) {\n return result.done ? result.value : iter.next();\n });\n };\n\n function makeInvokeMethod(innerFn, self, context) {\n var state = GenStateSuspendedStart;\n\n return function invoke(method, arg) {\n if (state === GenStateExecuting) {\n throw new Error(\"Generator is already running\");\n }\n\n if (state === GenStateCompleted) {\n if (method === \"throw\") {\n throw arg;\n }\n\n // Be forgiving, per 25.3.3.3.3 of the spec:\n // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume\n return doneResult();\n }\n\n context.method = method;\n context.arg = arg;\n\n while (true) {\n var delegate = context.delegate;\n if (delegate) {\n var delegateResult = maybeInvokeDelegate(delegate, context);\n if (delegateResult) {\n if (delegateResult === ContinueSentinel) continue;\n return delegateResult;\n }\n }\n\n if (context.method === \"next\") {\n // Setting context._sent for legacy support of Babel's\n // function.sent implementation.\n context.sent = context._sent = context.arg;\n\n } else if (context.method === \"throw\") {\n if (state === GenStateSuspendedStart) {\n state = GenStateCompleted;\n throw context.arg;\n }\n\n context.dispatchException(context.arg);\n\n } else if (context.method === \"return\") {\n context.abrupt(\"return\", context.arg);\n }\n\n state = GenStateExecuting;\n\n var record = tryCatch(innerFn, self, context);\n if (record.type === \"normal\") {\n // If an exception is thrown from innerFn, we leave state ===\n // GenStateExecuting and loop back for another invocation.\n state = context.done\n ? GenStateCompleted\n : GenStateSuspendedYield;\n\n if (record.arg === ContinueSentinel) {\n continue;\n }\n\n return {\n value: record.arg,\n done: context.done\n };\n\n } else if (record.type === \"throw\") {\n state = GenStateCompleted;\n // Dispatch the exception by looping back around to the\n // context.dispatchException(context.arg) call above.\n context.method = \"throw\";\n context.arg = record.arg;\n }\n }\n };\n }\n\n // Call delegate.iterator[context.method](context.arg) and handle the\n // result, either by returning a { value, done } result from the\n // delegate iterator, or by modifying context.method and context.arg,\n // setting context.delegate to null, and returning the ContinueSentinel.\n function maybeInvokeDelegate(delegate, context) {\n var method = delegate.iterator[context.method];\n if (method === undefined) {\n // A .throw or .return when the delegate iterator has no .throw\n // method always terminates the yield* loop.\n context.delegate = null;\n\n if (context.method === \"throw\") {\n // Note: [\"return\"] must be used for ES3 parsing compatibility.\n if (delegate.iterator[\"return\"]) {\n // If the delegate iterator has a return method, give it a\n // chance to clean up.\n context.method = \"return\";\n context.arg = undefined;\n maybeInvokeDelegate(delegate, context);\n\n if (context.method === \"throw\") {\n // If maybeInvokeDelegate(context) changed context.method from\n // \"return\" to \"throw\", let that override the TypeError below.\n return ContinueSentinel;\n }\n }\n\n context.method = \"throw\";\n context.arg = new TypeError(\n \"The iterator does not provide a 'throw' method\");\n }\n\n return ContinueSentinel;\n }\n\n var record = tryCatch(method, delegate.iterator, context.arg);\n\n if (record.type === \"throw\") {\n context.method = \"throw\";\n context.arg = record.arg;\n context.delegate = null;\n return ContinueSentinel;\n }\n\n var info = record.arg;\n\n if (! info) {\n context.method = \"throw\";\n context.arg = new TypeError(\"iterator result is not an object\");\n context.delegate = null;\n return ContinueSentinel;\n }\n\n if (info.done) {\n // Assign the result of the finished delegate to the temporary\n // variable specified by delegate.resultName (see delegateYield).\n context[delegate.resultName] = info.value;\n\n // Resume execution at the desired location (see delegateYield).\n context.next = delegate.nextLoc;\n\n // If context.method was \"throw\" but the delegate handled the\n // exception, let the outer generator proceed normally. If\n // context.method was \"next\", forget context.arg since it has been\n // \"consumed\" by the delegate iterator. If context.method was\n // \"return\", allow the original .return call to continue in the\n // outer generator.\n if (context.method !== \"return\") {\n context.method = \"next\";\n context.arg = undefined;\n }\n\n } else {\n // Re-yield the result returned by the delegate method.\n return info;\n }\n\n // The delegate iterator is finished, so forget it and continue with\n // the outer generator.\n context.delegate = null;\n return ContinueSentinel;\n }\n\n // Define Generator.prototype.{next,throw,return} in terms of the\n // unified ._invoke helper method.\n defineIteratorMethods(Gp);\n\n define(Gp, toStringTagSymbol, \"Generator\");\n\n // A Generator should always return itself as the iterator object when the\n // @@iterator function is called on it. Some browsers' implementations of the\n // iterator prototype chain incorrectly implement this, causing the Generator\n // object to not be returned from this call. This ensures that doesn't happen.\n // See https://github.com/facebook/regenerator/issues/274 for more details.\n define(Gp, iteratorSymbol, function() {\n return this;\n });\n\n define(Gp, \"toString\", function() {\n return \"[object Generator]\";\n });\n\n function pushTryEntry(locs) {\n var entry = { tryLoc: locs[0] };\n\n if (1 in locs) {\n entry.catchLoc = locs[1];\n }\n\n if (2 in locs) {\n entry.finallyLoc = locs[2];\n entry.afterLoc = locs[3];\n }\n\n this.tryEntries.push(entry);\n }\n\n function resetTryEntry(entry) {\n var record = entry.completion || {};\n record.type = \"normal\";\n delete record.arg;\n entry.completion = record;\n }\n\n function Context(tryLocsList) {\n // The root entry object (effectively a try statement without a catch\n // or a finally block) gives us a place to store values thrown from\n // locations where there is no enclosing try statement.\n this.tryEntries = [{ tryLoc: \"root\" }];\n tryLocsList.forEach(pushTryEntry, this);\n this.reset(true);\n }\n\n exports.keys = function(object) {\n var keys = [];\n for (var key in object) {\n keys.push(key);\n }\n keys.reverse();\n\n // Rather than returning an object with a next method, we keep\n // things simple and return the next function itself.\n return function next() {\n while (keys.length) {\n var key = keys.pop();\n if (key in object) {\n next.value = key;\n next.done = false;\n return next;\n }\n }\n\n // To avoid creating an additional object, we just hang the .value\n // and .done properties off the next function object itself. This\n // also ensures that the minifier will not anonymize the function.\n next.done = true;\n return next;\n };\n };\n\n function values(iterable) {\n if (iterable) {\n var iteratorMethod = iterable[iteratorSymbol];\n if (iteratorMethod) {\n return iteratorMethod.call(iterable);\n }\n\n if (typeof iterable.next === \"function\") {\n return iterable;\n }\n\n if (!isNaN(iterable.length)) {\n var i = -1, next = function next() {\n while (++i < iterable.length) {\n if (hasOwn.call(iterable, i)) {\n next.value = iterable[i];\n next.done = false;\n return next;\n }\n }\n\n next.value = undefined;\n next.done = true;\n\n return next;\n };\n\n return next.next = next;\n }\n }\n\n // Return an iterator with no values.\n return { next: doneResult };\n }\n exports.values = values;\n\n function doneResult() {\n return { value: undefined, done: true };\n }\n\n Context.prototype = {\n constructor: Context,\n\n reset: function(skipTempReset) {\n this.prev = 0;\n this.next = 0;\n // Resetting context._sent for legacy support of Babel's\n // function.sent implementation.\n this.sent = this._sent = undefined;\n this.done = false;\n this.delegate = null;\n\n this.method = \"next\";\n this.arg = undefined;\n\n this.tryEntries.forEach(resetTryEntry);\n\n if (!skipTempReset) {\n for (var name in this) {\n // Not sure about the optimal order of these conditions:\n if (name.charAt(0) === \"t\" &&\n hasOwn.call(this, name) &&\n !isNaN(+name.slice(1))) {\n this[name] = undefined;\n }\n }\n }\n },\n\n stop: function() {\n this.done = true;\n\n var rootEntry = this.tryEntries[0];\n var rootRecord = rootEntry.completion;\n if (rootRecord.type === \"throw\") {\n throw rootRecord.arg;\n }\n\n return this.rval;\n },\n\n dispatchException: function(exception) {\n if (this.done) {\n throw exception;\n }\n\n var context = this;\n function handle(loc, caught) {\n record.type = \"throw\";\n record.arg = exception;\n context.next = loc;\n\n if (caught) {\n // If the dispatched exception was caught by a catch block,\n // then let that catch block handle the exception normally.\n context.method = \"next\";\n context.arg = undefined;\n }\n\n return !! caught;\n }\n\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n var record = entry.completion;\n\n if (entry.tryLoc === \"root\") {\n // Exception thrown outside of any try block that could handle\n // it, so set the completion value of the entire function to\n // throw the exception.\n return handle(\"end\");\n }\n\n if (entry.tryLoc <= this.prev) {\n var hasCatch = hasOwn.call(entry, \"catchLoc\");\n var hasFinally = hasOwn.call(entry, \"finallyLoc\");\n\n if (hasCatch && hasFinally) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n } else if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else if (hasCatch) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n }\n\n } else if (hasFinally) {\n if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else {\n throw new Error(\"try statement without catch or finally\");\n }\n }\n }\n },\n\n abrupt: function(type, arg) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc <= this.prev &&\n hasOwn.call(entry, \"finallyLoc\") &&\n this.prev < entry.finallyLoc) {\n var finallyEntry = entry;\n break;\n }\n }\n\n if (finallyEntry &&\n (type === \"break\" ||\n type === \"continue\") &&\n finallyEntry.tryLoc <= arg &&\n arg <= finallyEntry.finallyLoc) {\n // Ignore the finally entry if control is not jumping to a\n // location outside the try/catch block.\n finallyEntry = null;\n }\n\n var record = finallyEntry ? finallyEntry.completion : {};\n record.type = type;\n record.arg = arg;\n\n if (finallyEntry) {\n this.method = \"next\";\n this.next = finallyEntry.finallyLoc;\n return ContinueSentinel;\n }\n\n return this.complete(record);\n },\n\n complete: function(record, afterLoc) {\n if (record.type === \"throw\") {\n throw record.arg;\n }\n\n if (record.type === \"break\" ||\n record.type === \"continue\") {\n this.next = record.arg;\n } else if (record.type === \"return\") {\n this.rval = this.arg = record.arg;\n this.method = \"return\";\n this.next = \"end\";\n } else if (record.type === \"normal\" && afterLoc) {\n this.next = afterLoc;\n }\n\n return ContinueSentinel;\n },\n\n finish: function(finallyLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.finallyLoc === finallyLoc) {\n this.complete(entry.completion, entry.afterLoc);\n resetTryEntry(entry);\n return ContinueSentinel;\n }\n }\n },\n\n \"catch\": function(tryLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc === tryLoc) {\n var record = entry.completion;\n if (record.type === \"throw\") {\n var thrown = record.arg;\n resetTryEntry(entry);\n }\n return thrown;\n }\n }\n\n // The context.catch method must only be called with a location\n // argument that corresponds to a known catch block.\n throw new Error(\"illegal catch attempt\");\n },\n\n delegateYield: function(iterable, resultName, nextLoc) {\n this.delegate = {\n iterator: values(iterable),\n resultName: resultName,\n nextLoc: nextLoc\n };\n\n if (this.method === \"next\") {\n // Deliberately forget the last sent value so that we don't\n // accidentally pass it on to the delegate.\n this.arg = undefined;\n }\n\n return ContinueSentinel;\n }\n };\n\n // Regardless of whether this script is executing as a CommonJS module\n // or not, return the runtime object so that we can declare the variable\n // regeneratorRuntime in the outer scope, which allows this module to be\n // injected easily by `bin/regenerator --include-runtime script.js`.\n return exports;\n\n}(\n // If this script is executing as a CommonJS module, use module.exports\n // as the regeneratorRuntime namespace. Otherwise create a new empty\n // object. Either way, the resulting object will be used to initialize\n // the regeneratorRuntime variable at the top of this file.\n typeof module === \"object\" ? module.exports : {}\n));\n\ntry {\n regeneratorRuntime = runtime;\n} catch (accidentalStrictMode) {\n // This module should not be running in strict mode, so the above\n // assignment should always work unless something is misconfigured. Just\n // in case runtime.js accidentally runs in strict mode, in modern engines\n // we can explicitly access globalThis. In older engines we can escape\n // strict mode using a global Function call. This could conceivably fail\n // if a Content Security Policy forbids using Function, but in that case\n // the proper solution is to fix the accidental strict mode problem. If\n // you've misconfigured your bundler to force strict mode and applied a\n // CSP to forbid Function, and you're not willing to fix either of those\n // problems, please detail your unique predicament in a GitHub issue.\n if (typeof globalThis === \"object\") {\n globalThis.regeneratorRuntime = runtime;\n } else {\n Function(\"r\", \"regeneratorRuntime = r\")(runtime);\n }\n}\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\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};"],"names":["flarum","core","compat","_setPrototypeOf","o","p","Object","setPrototypeOf","__proto__","_inheritsLoose","subClass","superClass","prototype","create","constructor","Tag","name","Model","call","this","slug","description","color","backgroundUrl","backgroundMode","icon","position","parent","children","defaultSort","isChild","isHidden","discussionCount","lastPostedAt","lastPostedDiscussion","isRestricted","canStartDiscussion","canAddToDiscussion","isPrimary","computed","tagIcon","tag","attrs","settings","hasIcon","useColor","className","classList","style","tagLabel","link","extract","tagText","app","translator","trans","title","href","route","tags","m","Link","sortTags","slice","sort","a","b","aPos","bPos","aParent","bParent","TagsPage","oninit","vnode","history","push","preloaded","preloadedApiDocument","filter","loading","tagList","load","then","store","all","redraw","view","pinned","cloud","IndexPage","listItems","toArray","map","child","discussion","lastPostNumber","humanTime","length","oncreate","setTitle","setTitleCount","Page","tagsLabel","forEach","DiscussionTaggedPost","initAttrs","oldTags","post","content","newTags","diffTags","tags1","tags2","indexOf","id","getById","tagsAdded","tagsRemoved","descriptionKey","descriptionData","data","count","EventPost","asyncGeneratorStep","gen","resolve","reject","_next","_throw","key","arg","info","value","error","done","Promise","TagListState","loadedIncludes","Set","fn","includes","unloadedIncludes","include","has","join","val","add","self","args","arguments","apply","err","undefined","TagLinkButton","model","isActive","params","LinkButton","extend","items","current","matches","Separator","search","stickyParams","currentTag","addTag","active","component","more","splice","TagHero","Component","findTag","find","localeCompare","sensitivity","currentActiveTag","currentTagLoading","override","original","vdom","newDiscussion","get","disabled","GlobalSearchState","param","DiscussionListState","q","DiscussionListItem","DiscussionHero","getSelectableTags","ToggleButton","isToggled","source","excluded","i","target","sourceKeys","keys","TagDiscussionModal","tagsLoading","selected","Stream","focused","minPrimary","maxPrimary","minSecondary","maxSecondary","bypassReqs","navigator","KeyboardNavigatable","selectedTag","onUp","setIndex","getCurrentNumericIndex","onDown","onSelect","select","bind","onRemove","discussionTags","selectedTags","primaryCount","secondaryCount","removeTag","index","getInstruction","remaining","toLowerCase","substr","inputWidth","Math","max","extractText","onclick","$","focus","onready","placeholder","bidi","width","onkeydown","navigate","onfocus","onblur","type","meetsRequirements","colored","onmouseover","toggleTag","highlight","e","metaKey","ctrlKey","click","getItem","dispatchEvent","Event","selectableItems","scrollToItem","$items","$dropdown","$item","eq","attr","scrollTop","dropdownScroll","dropdownTop","offset","top","dropdownBottom","outerHeight","itemTop","itemBottom","parseInt","css","stop","animate","onsubmit","preventDefault","save","relationships","DiscussionPage","update","hide","Modal","DiscussionControls","canTag","modal","show","promise","composer","fields","DiscussionComposer","selectableTags","chooseTags","chosenTags","chosenPrimaryTags","chosenSecondaryTags","forum","attribute","assign","addTagFilter","addTagControl","addTagList","addTagLabels","addTagComposer","path","Discussion","tagsCompat","module","exports","runtime","Op","hasOwn","hasOwnProperty","$Symbol","Symbol","iteratorSymbol","iterator","asyncIteratorSymbol","asyncIterator","toStringTagSymbol","toStringTag","define","obj","defineProperty","enumerable","configurable","writable","wrap","innerFn","outerFn","tryLocsList","protoGenerator","Generator","generator","context","Context","_invoke","state","GenStateSuspendedStart","method","GenStateExecuting","Error","GenStateCompleted","doneResult","delegate","delegateResult","maybeInvokeDelegate","ContinueSentinel","sent","_sent","dispatchException","abrupt","record","tryCatch","GenStateSuspendedYield","makeInvokeMethod","GeneratorFunction","GeneratorFunctionPrototype","IteratorPrototype","getProto","getPrototypeOf","NativeIteratorPrototype","values","Gp","defineIteratorMethods","AsyncIterator","PromiseImpl","invoke","result","__await","unwrapped","previousPromise","callInvokeWithMethodAndArg","TypeError","resultName","next","nextLoc","pushTryEntry","locs","entry","tryLoc","catchLoc","finallyLoc","afterLoc","tryEntries","resetTryEntry","completion","reset","iterable","iteratorMethod","isNaN","displayName","isGeneratorFunction","genFun","ctor","mark","awrap","async","iter","object","reverse","pop","skipTempReset","prev","charAt","rootRecord","rval","exception","handle","loc","caught","hasCatch","hasFinally","finallyEntry","complete","finish","thrown","delegateYield","regeneratorRuntime","accidentalStrictMode","globalThis","Function","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","n","getter","__esModule","d","definition","prop","r"],"sourceRoot":""} \ No newline at end of file