diff --git a/extensions/tags/js/dist/forum.js b/extensions/tags/js/dist/forum.js index dab181f8b..cc76c2e4a 100644 --- a/extensions/tags/js/dist/forum.js +++ b/extensions/tags/js/dist/forum.js @@ -1,2 +1,2 @@ -module.exports=function(t){var e={};function n(r){if(e[r])return e[r].exports;var a=e[r]={i:r,l:!1,exports:{}};return t[r].call(a.exports,a,a.exports,n),a.l=!0,a.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var a in t)n.d(r,a,function(e){return t[e]}.bind(null,a));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=51)}([function(t,e){t.exports=flarum.core.compat.Model},function(t,e){t.exports=flarum.core.compat.extend},function(t,e,n){"use strict";function r(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}))}n.d(e,"a",(function(){return r}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var r=n(7),a=n.n(r);function o(t,e,n){void 0===e&&(e={}),void 0===n&&(n={});var r=t&&t.icon(),o=n.useColor,s=void 0===o||o;return e.className=a()([e.className,"icon",r?t.icon():"TagIcon"]),t&&s?(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)}},function(t,e,n){"use strict";function r(t,e){return(r=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function a(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,r(t,e)}n.d(e,"a",(function(){return a}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return c}));var r=n(14),a=n.n(r),o=n(10),s=n.n(o),i=n(3);function c(t,e){void 0===e&&(e={}),e.style=e.style||{},e.className="TagLabel "+(e.className||"");var n=a()(e,"link"),r=t?t.name():app.translator.trans("flarum-tags.lib.deleted_tag_text");if(t){var o=t.color();o&&(e.style["--tag-bg"]=o,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?s.a:"span",e,m("span",{className:"TagLabel-text"},t&&t.icon()&&Object(i.a)(t,{},{useColor:!1})," ",r))}},function(t,e){t.exports=flarum.core.compat["components/IndexPage"]},function(t,e){t.exports=flarum.core.compat["utils/classList"]},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(14),a=n.n(r),o=n(5),s=n(2);function i(t,e){void 0===e&&(e={});var n=[],r=a()(e,"link");return e.className="TagsLabel "+(e.className||""),t?Object(s.a)(t).forEach((function(e){(e||1===t.length)&&n.push(Object(o.a)(e,{link:r}))})):n.push(Object(o.a)()),m("span",e,n)}},function(t,e){t.exports=flarum.core.compat["components/Button"]},function(t,e){t.exports=flarum.core.compat["components/Link"]},function(t,e){t.exports=flarum.core.compat["utils/Stream"]},function(t,e,n){"use strict";n.d(e,"a",(function(){return l}));var r=n(4),a=n(0),o=n.n(a),s=n(18),i=n.n(s),c=n(19),u=n.n(c),l=function(t){function e(){return t.apply(this,arguments)||this}return Object(r.a)(e,t),e}(i()(o.a,{name:o.a.attribute("name"),slug:o.a.attribute("slug"),description:o.a.attribute("description"),color:o.a.attribute("color"),backgroundUrl:o.a.attribute("backgroundUrl"),backgroundMode:o.a.attribute("backgroundMode"),icon:o.a.attribute("icon"),position:o.a.attribute("position"),parent:o.a.hasOne("parent"),children:o.a.hasMany("children"),defaultSort:o.a.attribute("defaultSort"),isChild:o.a.attribute("isChild"),isHidden:o.a.attribute("isHidden"),discussionCount:o.a.attribute("discussionCount"),lastPostedAt:o.a.attribute("lastPostedAt",o.a.transformDate),lastPostedDiscussion:o.a.hasOne("lastPostedDiscussion"),isRestricted:o.a.attribute("isRestricted"),canStartDiscussion:o.a.attribute("canStartDiscussion"),canAddToDiscussion:o.a.attribute("canAddToDiscussion"),isPrimary:u()("position","parent",(function(t,e){return null!==t&&!1===e}))}))},function(t,e){t.exports=flarum.core.compat["components/LoadingIndicator"]},function(t,e){t.exports=flarum.core.compat["utils/extract"]},,function(t,e){t.exports=flarum.core.compat["components/DiscussionComposer"]},function(t,e){},function(t,e){t.exports=flarum.core.compat["utils/mixin"]},function(t,e){t.exports=flarum.core.compat["utils/computed"]},function(t,e){t.exports=flarum.core.compat["components/Modal"]},function(t,e,n){"use strict";var r=n(2),a=n(12),o=n(8),s=n(3),i=n(5);e.a={"tags/utils/sortTags":r.a,"tags/models/Tag":a.a,"tags/helpers/tagsLabel":o.a,"tags/helpers/tagIcon":s.a,"tags/helpers/tagLabel":i.a}},function(t,e){t.exports=flarum.core},function(t,e){t.exports=flarum.core.compat["components/LinkButton"]},function(t,e){t.exports=flarum.core.compat["models/Discussion"]},function(t,e,n){t.exports=n(52)},function(t,e){t.exports=flarum.core.compat["components/DiscussionHero"]},function(t,e){t.exports=flarum.core.compat["utils/extractText"]},,function(t,e,n){"use strict";var r=n(0),a=n.n(r),o=n(24),s=n.n(o),i=n(6),c=n.n(i),u=n(12),l=n(4),p=n(31),f=n.n(p),d=n(10),h=n.n(d),g=n(13),v=n.n(g),y=n(32),b=n.n(y),x=n(33),T=n.n(x),O=n(3),w=n(5),_=n(2),N=function(t){function e(){return t.apply(this,arguments)||this}Object(l.a)(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=Object(_.a)(r.filter((function(t){return!t.isChild()}))):(this.loading=!0,app.tagList.load(["children","lastPostedDiscussion","parent"]).then((function(){n.tags=Object(_.a)(app.store.all("tags").filter((function(t){return!t.isChild()}))),n.loading=!1,m.redraw()})))},n.view=function(){if(this.loading)return m(v.a,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"},c.a.prototype.hero(),m("div",{className:"container"},m("nav",{className:"TagsPage-nav IndexPage-nav sideNav"},m("ul",null,b()(c.a.prototype.sidebarItems().toArray()))),m("div",{className:"TagsPage-content sideNavOffset"},m("ul",{className:"TagTiles"},t.map((function(t){var e=t.lastPostedDiscussion(),n=Object(_.a)(t.children()||[]);return m("li",{className:"TagTile "+(t.color()?"colored":""),style:{"--tag-bg":t.color()}},m(h.a,{className:"TagTile-info",href:app.route.tag(t)},t.icon()&&Object(O.a)(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(h.a,{href:app.route.tag(t)},t.name())," "]}))):""),e?m(h.a,{className:"TagTile-lastPostedDiscussion",href:app.route.discussion(e,e.lastPostNumber())},m("span",{className:"TagTile-lastPostedDiscussion-title"},e.title()),T()(e.lastPostedAt())):m("span",{className:"TagTile-lastPostedDiscussion"}))}))),e.length?m("div",{className:"TagCloud"},e.map((function(t){return[Object(w.a)(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}(f.a),j=n(34),L=n.n(j),P=n(8),I=function(t){function e(){return t.apply(this,arguments)||this}Object(l.a)(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:Object(P.a)(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:Object(P.a)(this.attrs.tagsRemoved,{link:!0}),count:this.attrs.tagsRemoved.length})),t},e}(L.a);function C(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 k=n(25),D=n.n(k),S=function(){function t(){this.loadedIncludes=new Set}return t.prototype.load=function(){var t,e=(t=D.a.mark((function t(e){var n,r=this;return D.a.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(app.store.all("tags")));case 4:return t.abrupt("return",app.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){C(o,r,a,s,i,"next",t)}function i(t){C(o,r,a,s,i,"throw",t)}s(void 0)}))});return function(t){return e.apply(this,arguments)}}(),t}(),E=n(1),A=n(35),M=n.n(A),B=n(23),R=n.n(B),H=n(7),F=n.n(H),G=function(t){function e(){return t.apply(this,arguments)||this}return Object(l.a)(e,t),e.prototype.view=function(t){var e=this.attrs.model,n=(this.constructor.isActive(this.attrs),e&&e.description()),r=F()(["TagLinkButton","hasIcon",this.attrs.className,e.isChild()&&"child"]);return m(h.a,{className:r,href:this.attrs.route,style:e?{"--color":e.color()}:"",title:n||""},Object(O.a)(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}(R.a),q=function(){Object(E.extend)(c.a.prototype,"navItems",(function(t){if(t.add("tags",m(R.a,{icon:"fas fa-th-large",href:app.route("tags")},app.translator.trans("flarum-tags.forum.index.tags_link")),-10),!app.current.matches(N)){t.add("separator",M.a.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(),G.component({model:n,params:e,active:a},null==n?void 0:n.name()),-14)};Object(_.a)(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(R.a,{href:app.route("tags")},app.translator.trans("flarum-tags.forum.index.more_link")),-16)}}))},K=n(36),$=n.n(K),U=n(37),Y=n.n(U),z=n(38),J=function(t){function e(){return t.apply(this,arguments)||this}return Object(l.a)(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()&&Object(O.a)(t,{},{useColor:!1})," ",t.name()),m("div",{className:"Hero-subtitle"},t.description()))))},e}(n.n(z).a),Q=function(){c.a.prototype.currentTag=function(){var t=this;if(this.currentActiveTag)return this.currentActiveTag;var e=app.search.params().tags,n=null;return e&&(n=app.store.getBy("tags","slug",e)),(e&&!n||n&&!n.isChild()&&!n.children())&&app.store.find("tags",e,{include:"children,children.parent,parent,state"}).then((function(){t.currentActiveTag=app.store.getBy("tags","slug",e),m.redraw()})),n?(this.currentActiveTag=n,this.currentActiveTag):void 0},Object(E.override)(c.a.prototype,"hero",(function(t){var e=this.currentTag();return e?m(J,{model:e}):t()})),Object(E.extend)(c.a.prototype,"view",(function(t){var e=this.currentTag();e&&(t.attrs.className+=" IndexPage--tag"+e.id())})),Object(E.extend)(c.a.prototype,"setTitle",(function(){var t=this.currentTag();t&&app.setTitle(t.name())})),Object(E.extend)(c.a.prototype,"sidebarItems",(function(t){var e=this.currentTag();if(e){var n=e.color(),r=e.canStartDiscussion()||!app.session.user,a=t.get("newDiscussion");n&&(a.attrs.className=F()([a.attrs.className,"Button--tagColored"]),a.attrs.style={"--color":n}),a.attrs.disabled=!r,a.children=app.translator.trans(r?"core.forum.index.start_discussion_button":"core.forum.index.cannot_start_discussion_button")}})),Object(E.extend)(Y.a.prototype,"params",(function(t){t.tags=m.route.param("tags")})),Object(E.extend)($.a.prototype,"requestParams",(function(t){if(t.include.push("tags","tags.parent"),this.params.tags){t.filter.tag=this.params.tags;var e=t.filter.q;e&&(t.filter.q=e+" tag:"+this.params.tags)}}))},V=n(39),W=n.n(V),X=n(26),Z=n.n(X),tt=function(){Object(E.extend)(W.a.prototype,"infoItems",(function(t){var e=this.attrs.discussion.tags();e&&e.length&&t.add("tags",Object(P.a)(e),10)})),Object(E.extend)(Z.a.prototype,"view",(function(t){var e=Object(_.a)(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")}})),Object(E.extend)(Z.a.prototype,"items",(function(t){var e=this.attrs.discussion.tags();e&&e.length&&t.add("tags",Object(P.a)(e,{link:!0}),5)}))},et=n(40),nt=n.n(et),rt=n(9),at=n.n(rt),ot=n(20),st=n.n(ot),it=n(41),ct=n.n(it),ut=n(42),lt=n.n(ut),pt=n(27),ft=n.n(pt),dt=n(43),mt=n.n(dt),ht=n(11),gt=n.n(ht);function vt(t){var e=app.store.all("tags");return e=t?e.filter((function(e){return e.canAddToDiscussion()||-1!==t.tags().indexOf(e)})):e.filter((function(t){return t.canStartDiscussion()}))}var yt=function(t){function e(){return t.apply(this,arguments)||this}Object(l.a)(e,t);var n=e.prototype;return n.oninit=function(e){var n=this;t.prototype.oninit.call(this,e),this.tagsLoading=!0,this.selected=[],this.filter=gt()(""),this.focused=!1,this.minPrimary=app.forum.attribute("minPrimaryTags"),this.maxPrimary=app.forum.attribute("maxPrimaryTags"),this.minSecondary=app.forum.attribute("minSecondaryTags"),this.maxSecondary=app.forum.attribute("maxSecondaryTags"),this.navigator=new mt.a,this.navigator.onUp((function(){return n.setIndex(n.getCurrentNumericIndex()-1,!0)})).onDown((function(){return n.setIndex(n.getCurrentNumericIndex()+1,!0)})).onSelect(this.select.bind(this)).onRemove((function(){return n.selected.splice(n.selected.length-1,1)})),app.tagList.load(["parent"]).then((function(){n.tagsLoading=!1,n.tags=Object(_.a)(vt(n.attrs.discussion)),n.attrs.selectedTags?n.attrs.selectedTags.map(n.addTag.bind(n)):n.attrs.discussion&&n.attrs.discussion.tags().map(n.addTag.bind(n)),n.index=n.tags[0].id(),m.redraw()}))},n.primaryCount=function(){return this.selected.filter((function(t){return t.isPrimary()})).length},n.secondaryCount=function(){return this.selected.filter((function(t){return!t.isPrimary()})).length},n.addTag=function(t){if(t.canStartDiscussion()){var e=t.parent();e&&-1===this.selected.indexOf(e)&&this.selected.push(e),-1===this.selected.indexOf(t)&&this.selected.push(t)}},n.removeTag=function(t){var e=this.selected.indexOf(t);-1!==e&&(this.selected.splice(e,1),this.selected.filter((function(e){return e.parent()===t})).forEach(this.removeTag.bind(this)))},n.className=function(){return"TagDiscussionModal"},n.title=function(){return this.attrs.discussion?app.translator.trans("flarum-tags.forum.choose_tags.edit_title",{title:m("em",null,this.attrs.discussion.title())}):app.translator.trans("flarum-tags.forum.choose_tags.title")},n.getInstruction=function(t,e){if(t=this.maxPrimary&&(e=e.filter((function(e){return!e.isPrimary()||-1!==t.selected.indexOf(e)}))),a>=this.maxSecondary&&(e=e.filter((function(e){return e.isPrimary()||-1!==t.selected.indexOf(e)}))),n&&(e=e.filter((function(t){return t.name().substr(0,n.length).toLowerCase()===n}))),-1===e.indexOf(this.index)&&(this.index=e[0]);var o=Math.max(ft()(this.getInstruction(r,a)).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()}},Object(w.a)(e))}))),m("input",{className:"FormControl",placeholder:ft()(this.getInstruction(r,a)),bidi:this.filter,style:{width:o+"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(at.a,{type:"submit",className:"Button Button--primary",disabled:!this.meetsRequirements(r,a),icon:"fas fa-check"},app.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()||-1!==t.selected.indexOf(e.parent())})).map((function(e){return m("li",{"data-index":e.id(),className:F()({pinned:null!==e.position(),child:!!e.parent(),colored:!!e.color(),selected:-1!==t.selected.indexOf(e),active:t.index===e}),style:{color:e.color()},onmouseover:function(){return t.index=e},onclick:t.toggleTag.bind(t,e)},Object(O.a)(e),m("span",{className:"SelectTagListItem-name"},lt()(e.name(),n)),e.description()?m("span",{className:"SelectTagListItem-description"},e.description()):"")}))))]},n.meetsRequirements=function(t,e){return!!app.forum.attribute("canBypassTagCounts")||t>=this.minPrimary&&e>=this.minSecondary},n.toggleTag=function(t){-1!==this.selected.indexOf(t)?this.removeTag(t):this.addTag(t),this.filter()&&(this.filter(""),this.index=this.tags[0]),this.onready()},n.select=function(t){t.metaKey||t.ctrlKey||-1!==this.selected.indexOf(this.index)?this.selected.length&&this.$('button[type="submit"]').click():this.getItem(this.index)[0].dispatchEvent(new Event("click"))},n.selectableItems=function(){return this.$(".TagDiscussionModal-list > li")},n.getCurrentNumericIndex=function(){return this.selectableItems().index(this.getItem(this.index))},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 a=n.eq(t);if(this.index=app.store.getById("tags",a.attr("data-index")),m.redraw(),e){var o,s=r.scrollTop(),i=r.offset().top,c=i+r.outerHeight(),u=a.offset().top,l=u+a.outerHeight();uc&&(o=s-c+l+parseInt(r.css("padding-bottom"),10)),void 0!==o&&r.stop(!0).animate({scrollTop:o},100)}},n.onsubmit=function(t){t.preventDefault();var e=this.attrs.discussion,n=this.selected;e&&e.save({relationships:{tags:n}}).then((function(){app.current.matches(ct.a)&&app.current.get("stream").update(),m.redraw()})),this.attrs.onsubmit&&this.attrs.onsubmit(n),this.hide()},e}(st.a),bt=function(){Object(E.extend)(nt.a,"moderationControls",(function(t,e){e.canTag()&&t.add("tags",m(at.a,{icon:"fas fa-tag",onclick:function(){return app.modal.show(yt,{discussion:e})}},app.translator.trans("flarum-tags.forum.discussion_controls.edit_tags_button")))}))},xt=n(16),Tt=n.n(xt),Ot=function(){Object(E.extend)(c.a.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=[]})),Object(E.extend)(Tt.a.prototype,"oninit",(function(){app.tagList.load(["parent"]).then((function(){return m.redraw()}))})),Tt.a.prototype.chooseTags=function(){var t=this;vt().length&&app.modal.show(yt,{selectedTags:(this.composer.fields.tags||[]).slice(0),onsubmit:function(e){t.composer.fields.tags=e,t.$("textarea").focus()}})},Object(E.extend)(Tt.a.prototype,"headerItems",(function(t){var e=this.composer.fields.tags||[],n=vt();t.add("tags",m("a",{className:F()(["DiscussionComposer-changeTags",!n.length&&"disabled"]),onclick:this.chooseTags.bind(this)},e.length?Object(P.a)(e):m("span",{className:"TagLabel untagged"},app.translator.trans("flarum-tags.forum.composer_discussion.choose_tags_link"))),10)})),Object(E.override)(Tt.a.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=vt();(!n.length||r.length=0;--a){var o=this.tryEntries[a],s=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var i=n.call(o,"catchLoc"),c=n.call(o,"finallyLoc");if(i&&c){if(this.prev=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),O(n),l}},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;O(n)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:_(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),l}},t}(t.exports);try{regeneratorRuntime=r}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=r:Function("r","regeneratorRuntime = r")(r)}}]); +module.exports=function(t){var e={};function n(r){if(e[r])return e[r].exports;var a=e[r]={i:r,l:!1,exports:{}};return t[r].call(a.exports,a,a.exports,n),a.l=!0,a.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var a in t)n.d(r,a,function(e){return t[e]}.bind(null,a));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=51)}([function(t,e){t.exports=flarum.core.compat.Model},function(t,e){t.exports=flarum.core.compat.extend},function(t,e,n){"use strict";function r(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}))}n.d(e,"a",(function(){return r}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var r=n(7),a=n.n(r);function o(t,e,n){void 0===e&&(e={}),void 0===n&&(n={});var r=t&&t.icon(),o=n.useColor,s=void 0===o||o;return e.className=a()([e.className,"icon",r?t.icon():"TagIcon"]),t&&s?(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)}},function(t,e,n){"use strict";function r(t,e){return(r=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function a(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,r(t,e)}n.d(e,"a",(function(){return a}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return c}));var r=n(14),a=n.n(r),o=n(10),s=n.n(o),i=n(3);function c(t,e){void 0===e&&(e={}),e.style=e.style||{},e.className="TagLabel "+(e.className||"");var n=a()(e,"link"),r=t?t.name():app.translator.trans("flarum-tags.lib.deleted_tag_text");if(t){var o=t.color();o&&(e.style["--tag-bg"]=o,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?s.a:"span",e,m("span",{className:"TagLabel-text"},t&&t.icon()&&Object(i.a)(t,{},{useColor:!1})," ",r))}},function(t,e){t.exports=flarum.core.compat["components/IndexPage"]},function(t,e){t.exports=flarum.core.compat["utils/classList"]},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var r=n(14),a=n.n(r),o=n(5),s=n(2);function i(t,e){void 0===e&&(e={});var n=[],r=a()(e,"link");return e.className="TagsLabel "+(e.className||""),t?Object(s.a)(t).forEach((function(e){(e||1===t.length)&&n.push(Object(o.a)(e,{link:r}))})):n.push(Object(o.a)()),m("span",e,n)}},function(t,e){t.exports=flarum.core.compat["components/Button"]},function(t,e){t.exports=flarum.core.compat["components/Link"]},function(t,e){t.exports=flarum.core.compat["utils/Stream"]},function(t,e,n){"use strict";n.d(e,"a",(function(){return l}));var r=n(4),a=n(0),o=n.n(a),s=n(18),i=n.n(s),c=n(19),u=n.n(c),l=function(t){function e(){return t.apply(this,arguments)||this}return Object(r.a)(e,t),e}(i()(o.a,{name:o.a.attribute("name"),slug:o.a.attribute("slug"),description:o.a.attribute("description"),color:o.a.attribute("color"),backgroundUrl:o.a.attribute("backgroundUrl"),backgroundMode:o.a.attribute("backgroundMode"),icon:o.a.attribute("icon"),position:o.a.attribute("position"),parent:o.a.hasOne("parent"),children:o.a.hasMany("children"),defaultSort:o.a.attribute("defaultSort"),isChild:o.a.attribute("isChild"),isHidden:o.a.attribute("isHidden"),discussionCount:o.a.attribute("discussionCount"),lastPostedAt:o.a.attribute("lastPostedAt",o.a.transformDate),lastPostedDiscussion:o.a.hasOne("lastPostedDiscussion"),isRestricted:o.a.attribute("isRestricted"),canStartDiscussion:o.a.attribute("canStartDiscussion"),canAddToDiscussion:o.a.attribute("canAddToDiscussion"),isPrimary:u()("position","parent",(function(t,e){return null!==t&&!1===e}))}))},function(t,e){t.exports=flarum.core.compat["components/LoadingIndicator"]},function(t,e){t.exports=flarum.core.compat["utils/extract"]},,function(t,e){t.exports=flarum.core.compat["components/DiscussionComposer"]},function(t,e){},function(t,e){t.exports=flarum.core.compat["utils/mixin"]},function(t,e){t.exports=flarum.core.compat["utils/computed"]},function(t,e){t.exports=flarum.core.compat["components/Modal"]},function(t,e,n){"use strict";var r=n(2),a=n(12),o=n(8),s=n(3),i=n(5);e.a={"tags/utils/sortTags":r.a,"tags/models/Tag":a.a,"tags/helpers/tagsLabel":o.a,"tags/helpers/tagIcon":s.a,"tags/helpers/tagLabel":i.a}},function(t,e){t.exports=flarum.core},function(t,e){t.exports=flarum.core.compat["components/LinkButton"]},function(t,e){t.exports=flarum.core.compat["models/Discussion"]},function(t,e,n){t.exports=n(52)},function(t,e){t.exports=flarum.core.compat["components/DiscussionHero"]},function(t,e){t.exports=flarum.core.compat["utils/extractText"]},,function(t,e,n){"use strict";var r=n(0),a=n.n(r),o=n(24),s=n.n(o),i=n(6),c=n.n(i),u=n(12),l=n(4),p=n(31),f=n.n(p),d=n(10),h=n.n(d),g=n(13),v=n.n(g),y=n(32),b=n.n(y),x=n(33),T=n.n(x),w=n(3),O=n(5),_=n(2),N=function(t){function e(){return t.apply(this,arguments)||this}Object(l.a)(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=Object(_.a)(r.filter((function(t){return!t.isChild()}))):(this.loading=!0,app.tagList.load(["children","lastPostedDiscussion","parent"]).then((function(){n.tags=Object(_.a)(app.store.all("tags").filter((function(t){return!t.isChild()}))),n.loading=!1,m.redraw()})))},n.view=function(){if(this.loading)return m(v.a,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"},c.a.prototype.hero(),m("div",{className:"container"},m("nav",{className:"TagsPage-nav IndexPage-nav sideNav"},m("ul",null,b()(c.a.prototype.sidebarItems().toArray()))),m("div",{className:"TagsPage-content sideNavOffset"},m("ul",{className:"TagTiles"},t.map((function(t){var e=t.lastPostedDiscussion(),n=Object(_.a)(t.children()||[]);return m("li",{className:"TagTile "+(t.color()?"colored":""),style:{"--tag-bg":t.color()}},m(h.a,{className:"TagTile-info",href:app.route.tag(t)},t.icon()&&Object(w.a)(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(h.a,{href:app.route.tag(t)},t.name())," "]}))):""),e?m(h.a,{className:"TagTile-lastPostedDiscussion",href:app.route.discussion(e,e.lastPostNumber())},m("span",{className:"TagTile-lastPostedDiscussion-title"},e.title()),T()(e.lastPostedAt())):m("span",{className:"TagTile-lastPostedDiscussion"}))}))),e.length?m("div",{className:"TagCloud"},e.map((function(t){return[Object(O.a)(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}(f.a),j=n(34),L=n.n(j),P=n(8),C=function(t){function e(){return t.apply(this,arguments)||this}Object(l.a)(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:Object(P.a)(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:Object(P.a)(this.attrs.tagsRemoved,{link:!0}),count:this.attrs.tagsRemoved.length})),t},e}(L.a);function I(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 k=n(25),D=n.n(k),S=function(){function t(){this.loadedIncludes=new Set}return t.prototype.load=function(){var t,e=(t=D.a.mark((function t(e){var n,r=this;return D.a.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(app.store.all("tags")));case 4:return t.abrupt("return",app.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){I(o,r,a,s,i,"next",t)}function i(t){I(o,r,a,s,i,"throw",t)}s(void 0)}))});return function(t){return e.apply(this,arguments)}}(),t}(),E=n(1),A=n(35),M=n.n(A),B=n(23),R=n.n(B),H=n(7),F=n.n(H),G=function(t){function e(){return t.apply(this,arguments)||this}return Object(l.a)(e,t),e.prototype.view=function(t){var e=this.attrs.model,n=(this.constructor.isActive(this.attrs),e&&e.description()),r=F()(["TagLinkButton","hasIcon",this.attrs.className,e.isChild()&&"child"]);return m(h.a,{className:r,href:this.attrs.route,style:e?{"--color":e.color()}:"",title:n||""},Object(w.a)(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}(R.a),q=function(){Object(E.extend)(c.a.prototype,"navItems",(function(t){if(t.add("tags",m(R.a,{icon:"fas fa-th-large",href:app.route("tags")},app.translator.trans("flarum-tags.forum.index.tags_link")),-10),!app.current.matches(N)){t.add("separator",M.a.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(),G.component({model:n,params:e,active:a},null==n?void 0:n.name()),-14)};Object(_.a)(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(R.a,{href:app.route("tags")},app.translator.trans("flarum-tags.forum.index.more_link")),-16)}}))},K=n(36),$=n.n(K),U=n(37),Y=n.n(U),z=n(38),J=function(t){function e(){return t.apply(this,arguments)||this}return Object(l.a)(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()&&Object(w.a)(t,{},{useColor:!1})," ",t.name()),m("div",{className:"Hero-subtitle"},t.description()))))},e}(n.n(z).a),Q=function(){c.a.prototype.currentTag=function(){var t=this;if(this.currentActiveTag)return this.currentActiveTag;var e=app.search.params().tags,n=null;return e&&(n=app.store.getBy("tags","slug",e)),(e&&!n||n&&!n.isChild()&&!n.children())&&app.store.find("tags",e,{include:"children,children.parent,parent,state"}).then((function(){t.currentActiveTag=app.store.getBy("tags","slug",e),m.redraw()})),n?(this.currentActiveTag=n,this.currentActiveTag):void 0},Object(E.override)(c.a.prototype,"hero",(function(t){var e=this.currentTag();return e?m(J,{model:e}):t()})),Object(E.extend)(c.a.prototype,"view",(function(t){var e=this.currentTag();e&&(t.attrs.className+=" IndexPage--tag"+e.id())})),Object(E.extend)(c.a.prototype,"setTitle",(function(){var t=this.currentTag();t&&app.setTitle(t.name())})),Object(E.extend)(c.a.prototype,"sidebarItems",(function(t){var e=this.currentTag();if(e){var n=e.color(),r=e.canStartDiscussion()||!app.session.user,a=t.get("newDiscussion");n&&(a.attrs.className=F()([a.attrs.className,"Button--tagColored"]),a.attrs.style={"--color":n}),a.attrs.disabled=!r,a.children=app.translator.trans(r?"core.forum.index.start_discussion_button":"core.forum.index.cannot_start_discussion_button")}})),Object(E.extend)(Y.a.prototype,"params",(function(t){t.tags=m.route.param("tags")})),Object(E.extend)($.a.prototype,"requestParams",(function(t){if(t.include.push("tags","tags.parent"),this.params.tags){t.filter.tag=this.params.tags;var e=t.filter.q;e&&(t.filter.q=e+" tag:"+this.params.tags)}}))},V=n(39),W=n.n(V),X=n(26),Z=n.n(X),tt=function(){Object(E.extend)(W.a.prototype,"infoItems",(function(t){var e=this.attrs.discussion.tags();e&&e.length&&t.add("tags",Object(P.a)(e),10)})),Object(E.extend)(Z.a.prototype,"view",(function(t){var e=Object(_.a)(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")}})),Object(E.extend)(Z.a.prototype,"items",(function(t){var e=this.attrs.discussion.tags();e&&e.length&&t.add("tags",Object(P.a)(e,{link:!0}),5)}))},et=n(40),nt=n.n(et),rt=n(9),at=n.n(rt),ot=n(20),st=n.n(ot),it=n(41),ct=n.n(it),ut=n(42),lt=n.n(ut),pt=n(27),ft=n.n(pt),dt=n(43),mt=n.n(dt),ht=n(11),gt=n.n(ht);function vt(t){var e=app.store.all("tags");return e=t?e.filter((function(e){return e.canAddToDiscussion()||-1!==t.tags().indexOf(e)})):e.filter((function(t){return t.canStartDiscussion()}))}var yt=function(t){function e(){return t.apply(this,arguments)||this}Object(l.a)(e,t);var n=e.prototype;return n.oninit=function(e){var n=this;t.prototype.oninit.call(this,e),this.tagsLoading=!0,this.selected=[],this.filter=gt()(""),this.focused=!1,this.minPrimary=app.forum.attribute("minPrimaryTags"),this.maxPrimary=app.forum.attribute("maxPrimaryTags"),this.minSecondary=app.forum.attribute("minSecondaryTags"),this.maxSecondary=app.forum.attribute("maxSecondaryTags"),this.navigator=new mt.a,this.navigator.onUp((function(){return n.setIndex(n.getCurrentNumericIndex()-1,!0)})).onDown((function(){return n.setIndex(n.getCurrentNumericIndex()+1,!0)})).onSelect(this.select.bind(this)).onRemove((function(){return n.selected.splice(n.selected.length-1,1)})),app.tagList.load(["parent"]).then((function(){n.tagsLoading=!1,n.tags=Object(_.a)(vt(n.attrs.discussion)),n.attrs.selectedTags?n.attrs.selectedTags.map(n.addTag.bind(n)):n.attrs.discussion&&n.attrs.discussion.tags().map(n.addTag.bind(n)),n.index=n.tags[0].id(),m.redraw()}))},n.primaryCount=function(){return this.selected.filter((function(t){return t.isPrimary()})).length},n.secondaryCount=function(){return this.selected.filter((function(t){return!t.isPrimary()})).length},n.addTag=function(t){if(t.canStartDiscussion()){var e=t.parent();e&&!this.selected.includes(e)&&this.selected.push(e),this.selected.includes(t)||this.selected.push(t)}},n.removeTag=function(t){var e=this.selected.indexOf(t);-1!==e&&(this.selected.splice(e,1),this.selected.filter((function(e){return e.parent()===t})).forEach(this.removeTag.bind(this)))},n.className=function(){return"TagDiscussionModal"},n.title=function(){return this.attrs.discussion?app.translator.trans("flarum-tags.forum.choose_tags.edit_title",{title:m("em",null,this.attrs.discussion.title())}):app.translator.trans("flarum-tags.forum.choose_tags.title")},n.getInstruction=function(t,e){if(app.forum.attribute("canBypassTagCounts"))return"";if(t=this.maxPrimary&&!app.forum.attribute("canBypassTagCounts")&&(e=e.filter((function(e){return!e.isPrimary()||t.selected.includes(e)}))),a>=this.maxSecondary&&!app.forum.attribute("canBypassTagCounts")&&(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}))),e.includes(this.index)||(this.index=e[0]);var o=Math.max(ft()(this.getInstruction(r,a)).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()}},Object(O.a)(e))}))),m("input",{className:"FormControl",placeholder:ft()(this.getInstruction(r,a)),bidi:this.filter,style:{width:o+"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(at.a,{type:"submit",className:"Button Button--primary",disabled:!this.meetsRequirements(r,a),icon:"fas fa-check"},app.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:F()({pinned:null!==e.position(),child:!!e.parent(),colored:!!e.color(),selected:t.selected.includes(e),active:t.index===e}),style:{color:e.color()},onmouseover:function(){return t.index=e},onclick:t.toggleTag.bind(t,e)},Object(w.a)(e),m("span",{className:"SelectTagListItem-name"},lt()(e.name(),n)),e.description()?m("span",{className:"SelectTagListItem-description"},e.description()):"")}))))]},n.meetsRequirements=function(t,e){return!!app.forum.attribute("canBypassTagCounts")||t>=this.minPrimary&&e>=this.minSecondary},n.toggleTag=function(t){this.selected.includes(t)?this.removeTag(t):this.addTag(t),this.filter()&&(this.filter(""),this.index=this.tags[0]),this.onready()},n.select=function(t){t.metaKey||t.ctrlKey||this.selected.includes(this.index)?this.selected.length&&this.$('button[type="submit"]').click():this.getItem(this.index)[0].dispatchEvent(new Event("click"))},n.selectableItems=function(){return this.$(".TagDiscussionModal-list > li")},n.getCurrentNumericIndex=function(){return this.selectableItems().index(this.getItem(this.index))},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 a=n.eq(t);if(this.index=app.store.getById("tags",a.attr("data-index")),m.redraw(),e){var o,s=r.scrollTop(),i=r.offset().top,c=i+r.outerHeight(),u=a.offset().top,l=u+a.outerHeight();uc&&(o=s-c+l+parseInt(r.css("padding-bottom"),10)),void 0!==o&&r.stop(!0).animate({scrollTop:o},100)}},n.onsubmit=function(t){t.preventDefault();var e=this.attrs.discussion,n=this.selected;e&&e.save({relationships:{tags:n}}).then((function(){app.current.matches(ct.a)&&app.current.get("stream").update(),m.redraw()})),this.attrs.onsubmit&&this.attrs.onsubmit(n),this.hide()},e}(st.a),bt=function(){Object(E.extend)(nt.a,"moderationControls",(function(t,e){e.canTag()&&t.add("tags",m(at.a,{icon:"fas fa-tag",onclick:function(){return app.modal.show(yt,{discussion:e})}},app.translator.trans("flarum-tags.forum.discussion_controls.edit_tags_button")))}))},xt=n(16),Tt=n.n(xt),wt=function(){Object(E.extend)(c.a.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=[]})),Object(E.extend)(Tt.a.prototype,"oninit",(function(){app.tagList.load(["parent"]).then((function(){return m.redraw()}))})),Tt.a.prototype.chooseTags=function(){var t=this;vt().length&&app.modal.show(yt,{selectedTags:(this.composer.fields.tags||[]).slice(0),onsubmit:function(e){t.composer.fields.tags=e,t.$("textarea").focus()}})},Object(E.extend)(Tt.a.prototype,"headerItems",(function(t){var e=this.composer.fields.tags||[],n=vt();t.add("tags",m("a",{className:F()(["DiscussionComposer-changeTags",!n.length&&"disabled"]),onclick:this.chooseTags.bind(this)},e.length?Object(P.a)(e):m("span",{className:"TagLabel untagged"},app.translator.trans("flarum-tags.forum.composer_discussion.choose_tags_link"))),10)})),Object(E.override)(Tt.a.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=vt();(!n.length||r.length=0;--a){var o=this.tryEntries[a],s=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var i=n.call(o,"catchLoc"),c=n.call(o,"finallyLoc");if(i&&c){if(this.prev=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),w(n),l}},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;w(n)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:_(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),l}},t}(t.exports);try{regeneratorRuntime=r}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=r:Function("r","regeneratorRuntime = r")(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 967f43891..2b810e3ee 100644 --- a/extensions/tags/js/dist/forum.js.map +++ b/extensions/tags/js/dist/forum.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack://@flarum/tags/webpack/bootstrap","webpack://@flarum/tags/external \"flarum.core.compat['Model']\"","webpack://@flarum/tags/external \"flarum.core.compat['extend']\"","webpack://@flarum/tags/./src/common/utils/sortTags.js","webpack://@flarum/tags/./src/common/helpers/tagIcon.js","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/./src/common/helpers/tagLabel.js","webpack://@flarum/tags/external \"flarum.core.compat['components/IndexPage']\"","webpack://@flarum/tags/external \"flarum.core.compat['utils/classList']\"","webpack://@flarum/tags/./src/common/helpers/tagsLabel.js","webpack://@flarum/tags/external \"flarum.core.compat['components/Button']\"","webpack://@flarum/tags/external \"flarum.core.compat['components/Link']\"","webpack://@flarum/tags/external \"flarum.core.compat['utils/Stream']\"","webpack://@flarum/tags/./src/common/models/Tag.js","webpack://@flarum/tags/external \"flarum.core.compat['components/LoadingIndicator']\"","webpack://@flarum/tags/external \"flarum.core.compat['utils/extract']\"","webpack://@flarum/tags/external \"flarum.core.compat['components/DiscussionComposer']\"","webpack://@flarum/tags/external \"flarum.core.compat['utils/mixin']\"","webpack://@flarum/tags/external \"flarum.core.compat['utils/computed']\"","webpack://@flarum/tags/external \"flarum.core.compat['components/Modal']\"","webpack://@flarum/tags/./src/common/compat.js","webpack://@flarum/tags/external \"flarum.core\"","webpack://@flarum/tags/external \"flarum.core.compat['components/LinkButton']\"","webpack://@flarum/tags/external \"flarum.core.compat['models/Discussion']\"","webpack://@flarum/tags/./node_modules/@babel/runtime/regenerator/index.js","webpack://@flarum/tags/external \"flarum.core.compat['components/DiscussionHero']\"","webpack://@flarum/tags/external \"flarum.core.compat['utils/extractText']\"","webpack://@flarum/tags/./src/forum/components/TagsPage.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.js","webpack://@flarum/tags/./src/forum/components/TagLinkButton.js","webpack://@flarum/tags/./src/forum/addTagList.js","webpack://@flarum/tags/./src/forum/components/TagHero.js","webpack://@flarum/tags/./src/forum/addTagFilter.js","webpack://@flarum/tags/./src/forum/addTagLabels.js","webpack://@flarum/tags/./src/forum/utils/getSelectableTags.js","webpack://@flarum/tags/./src/forum/components/TagDiscussionModal.js","webpack://@flarum/tags/./src/forum/addTagControl.js","webpack://@flarum/tags/./src/forum/addTagComposer.js","webpack://@flarum/tags/./src/forum/compat.js","webpack://@flarum/tags/./src/forum/index.js","webpack://@flarum/tags/external \"flarum.core.compat['components/Page']\"","webpack://@flarum/tags/external \"flarum.core.compat['helpers/listItems']\"","webpack://@flarum/tags/external \"flarum.core.compat['helpers/humanTime']\"","webpack://@flarum/tags/external \"flarum.core.compat['components/EventPost']\"","webpack://@flarum/tags/external \"flarum.core.compat['components/Separator']\"","webpack://@flarum/tags/external \"flarum.core.compat['states/DiscussionListState']\"","webpack://@flarum/tags/external \"flarum.core.compat['states/GlobalSearchState']\"","webpack://@flarum/tags/external \"flarum.core.compat['Component']\"","webpack://@flarum/tags/external \"flarum.core.compat['components/DiscussionListItem']\"","webpack://@flarum/tags/external \"flarum.core.compat['utils/DiscussionControls']\"","webpack://@flarum/tags/external \"flarum.core.compat['components/DiscussionPage']\"","webpack://@flarum/tags/external \"flarum.core.compat['helpers/highlight']\"","webpack://@flarum/tags/external \"flarum.core.compat['utils/KeyboardNavigatable']\"","webpack://@flarum/tags/./forum.js","webpack://@flarum/tags/./node_modules/regenerator-runtime/runtime.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","flarum","core","compat","sortTags","tags","slice","sort","a","b","aPos","position","bPos","discussionCount","aParent","parent","bParent","tagIcon","tag","attrs","settings","hasIcon","icon","useColor","className","classList","style","color","_setPrototypeOf","setPrototypeOf","__proto__","_inheritsLoose","subClass","superClass","constructor","tagLabel","link","extract","tagText","app","translator","trans","title","description","href","route","slug","isChild","Link","tagsLabel","children","forEach","length","push","Tag","mixin","Model","attribute","backgroundUrl","backgroundMode","hasOne","hasMany","defaultSort","isHidden","lastPostedAt","transformDate","lastPostedDiscussion","isRestricted","canStartDiscussion","canAddToDiscussion","isPrimary","computed","require","TagsPage","oninit","vnode","history","this","preloaded","preloadedApiDocument","filter","loading","tagList","load","then","store","all","redraw","view","pinned","cloud","IndexPage","hero","listItems","sidebarItems","toArray","map","child","discussion","lastPostNumber","humanTime","oncreate","setTitle","setTitleCount","Page","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","arg","info","error","done","Promise","TagListState","loadedIncludes","Set","fn","includes","unloadedIncludes","include","has","find","join","val","add","self","args","arguments","apply","err","undefined","TagLinkButton","model","isActive","params","LinkButton","extend","items","current","matches","Separator","component","search","stickyParams","currentTag","addTag","active","more","splice","TagHero","Component","currentActiveTag","getBy","override","original","vdom","session","user","newDiscussion","disabled","GlobalSearchState","param","DiscussionListState","q","DiscussionListItem","DiscussionHero","getSelectableTags","TagDiscussionModal","tagsLoading","selected","Stream","focused","minPrimary","forum","maxPrimary","minSecondary","maxSecondary","navigator","KeyboardNavigatable","onUp","setIndex","getCurrentNumericIndex","onDown","onSelect","select","onRemove","selectedTags","index","primaryCount","secondaryCount","removeTag","getInstruction","remaining","toLowerCase","substr","inputWidth","Math","max","extractText","onclick","$","focus","onready","placeholder","bidi","width","onkeydown","navigate","onfocus","onblur","type","meetsRequirements","data-index","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","chooseTags","selectableTags","chosenTags","chosenPrimaryTags","chosenSecondaryTags","assign","addTagFilter","addTagControl","addTagList","addTagLabels","addTagComposer","initializers","routes","path","postComponents","discussionTagged","models","Discussion","tagsCompat","runtime","Op","hasOwn","$Symbol","iteratorSymbol","iterator","asyncIteratorSymbol","asyncIterator","toStringTagSymbol","define","obj","configurable","writable","wrap","innerFn","outerFn","tryLocsList","protoGenerator","Generator","generator","context","Context","_invoke","state","method","Error","doneResult","delegate","delegateResult","maybeInvokeDelegate","ContinueSentinel","sent","_sent","dispatchException","abrupt","record","tryCatch","makeInvokeMethod","GeneratorFunction","GeneratorFunctionPrototype","IteratorPrototype","getProto","getPrototypeOf","NativeIteratorPrototype","values","Gp","defineIteratorMethods","AsyncIterator","PromiseImpl","previousPromise","callInvokeWithMethodAndArg","invoke","result","__await","unwrapped","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","keys","reverse","pop","skipTempReset","prev","charAt","rootRecord","rval","exception","handle","loc","caught","hasCatch","hasFinally","finallyEntry","complete","finish","thrown","delegateYield","regeneratorRuntime","accidentalStrictMode","globalThis","Function"],"mappings":"2BACE,IAAIA,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUC,QAGnC,IAAIC,EAASJ,EAAiBE,GAAY,CACzCG,EAAGH,EACHI,GAAG,EACHH,QAAS,IAUV,OANAI,EAAQL,GAAUM,KAAKJ,EAAOD,QAASC,EAAQA,EAAOD,QAASF,GAG/DG,EAAOE,GAAI,EAGJF,EAAOD,QA0Df,OArDAF,EAAoBQ,EAAIF,EAGxBN,EAAoBS,EAAIV,EAGxBC,EAAoBU,EAAI,SAASR,EAASS,EAAMC,GAC3CZ,EAAoBa,EAAEX,EAASS,IAClCG,OAAOC,eAAeb,EAASS,EAAM,CAAEK,YAAY,EAAMC,IAAKL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GPnC,GAGTmE,OAAQ,SAASjC,GACf,IAAK,IAAI5Y,EAAI4G,KAAKkS,WAAW3T,OAAS,EAAGnF,GAAK,IAAKA,EAAG,CACpD,IAAIyY,EAAQ7R,KAAKkS,WAAW9Y,GAC5B,GAAIyY,EAAMG,aAAeA,EAGvB,OAFAhS,KAAKgU,SAASnC,EAAMO,WAAYP,EAAMI,UACtCE,EAAcN,GACP/B,IAKb,MAAS,SAASgC,GAChB,IAAK,IAAI1Y,EAAI4G,KAAKkS,WAAW3T,OAAS,EAAGnF,GAAK,IAAKA,EAAG,CACpD,IAAIyY,EAAQ7R,KAAKkS,WAAW9Y,GAC5B,GAAIyY,EAAMC,SAAWA,EAAQ,CAC3B,IAAI3B,EAAS0B,EAAMO,WACnB,GAAoB,UAAhBjC,EAAOxG,KAAkB,CAC3B,IAAIuK,EAAS/D,EAAO9M,IACpB8O,EAAcN,GAEhB,OAAOqC,GAMX,MAAM,IAAIzE,MAAM,0BAGlB0E,cAAe,SAAS7B,EAAUd,EAAYE,GAa5C,OAZA1R,KAAK2P,SAAW,CACdtB,SAAUuC,EAAO0B,GACjBd,WAAYA,EACZE,QAASA,GAGS,SAAhB1R,KAAKwP,SAGPxP,KAAKqD,SA9rBPsB,GAisBOmL,IAQJ5W,EA9sBM,CAqtBgBC,EAAOD,SAGtC,IACEkb,mBAAqBpG,EACrB,MAAOqG,GAWmB,iBAAfC,WACTA,WAAWF,mBAAqBpG,EAEhCuG,SAAS,IAAK,yBAAdA,CAAwCvG","file":"forum.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 51);\n","module.exports = flarum.core.compat['Model'];","module.exports = flarum.core.compat['extend'];","export default function sortTags(tags) {\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 classList from 'flarum/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","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}","import extract from 'flarum/utils/extract';\nimport Link from 'flarum/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","module.exports = flarum.core.compat['components/IndexPage'];","module.exports = flarum.core.compat['utils/classList'];","import extract from 'flarum/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","module.exports = flarum.core.compat['components/Button'];","module.exports = flarum.core.compat['components/Link'];","module.exports = flarum.core.compat['utils/Stream'];","import Model from 'flarum/Model';\nimport mixin from 'flarum/utils/mixin';\nimport computed from 'flarum/utils/computed';\n\nexport default class Tag extends mixin(Model, {\n name: Model.attribute('name'),\n slug: Model.attribute('slug'),\n description: Model.attribute('description'),\n\n color: Model.attribute('color'),\n backgroundUrl: Model.attribute('backgroundUrl'),\n backgroundMode: Model.attribute('backgroundMode'),\n icon: Model.attribute('icon'),\n\n position: Model.attribute('position'),\n parent: Model.hasOne('parent'),\n children: Model.hasMany('children'),\n defaultSort: Model.attribute('defaultSort'),\n isChild: Model.attribute('isChild'),\n isHidden: Model.attribute('isHidden'),\n\n discussionCount: Model.attribute('discussionCount'),\n lastPostedAt: Model.attribute('lastPostedAt', Model.transformDate),\n lastPostedDiscussion: Model.hasOne('lastPostedDiscussion'),\n\n isRestricted: Model.attribute('isRestricted'),\n canStartDiscussion: Model.attribute('canStartDiscussion'),\n canAddToDiscussion: Model.attribute('canAddToDiscussion'),\n\n isPrimary: computed('position', 'parent', (position, parent) => position !== null && parent === false)\n}) {}\n","module.exports = flarum.core.compat['components/LoadingIndicator'];","module.exports = flarum.core.compat['utils/extract'];","module.exports = flarum.core.compat['components/DiscussionComposer'];","module.exports = flarum.core.compat['utils/mixin'];","module.exports = flarum.core.compat['utils/computed'];","module.exports = flarum.core.compat['components/Modal'];","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","module.exports = flarum.core;","module.exports = flarum.core.compat['components/LinkButton'];","module.exports = flarum.core.compat['models/Discussion'];","module.exports = require(\"regenerator-runtime\");\n","module.exports = flarum.core.compat['components/DiscussionHero'];","module.exports = flarum.core.compat['utils/extractText'];","import Page from 'flarum/components/Page';\nimport IndexPage from 'flarum/components/IndexPage';\nimport Link from 'flarum/components/Link';\nimport LoadingIndicator from 'flarum/components/LoadingIndicator';\nimport listItems from 'flarum/helpers/listItems';\nimport humanTime from 'flarum/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","import EventPost from 'flarum/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}","export default class TagListState {\n constructor() {\n this.loadedIncludes = new Set();\n }\n\n async load(includes = []) {\n const unloadedIncludes = includes.filter(include => !this.loadedIncludes.has(include));\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}","import Link from 'flarum/components/Link';\nimport LinkButton from 'flarum/components/LinkButton';\nimport classList from 'flarum/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/extend';\nimport IndexPage from 'flarum/components/IndexPage';\nimport Separator from 'flarum/components/Separator';\nimport LinkButton from 'flarum/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","import Component from 'flarum/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 { extend, override } from 'flarum/extend';\nimport IndexPage from 'flarum/components/IndexPage';\nimport DiscussionListState from 'flarum/states/DiscussionListState';\nimport GlobalSearchState from 'flarum/states/GlobalSearchState';\nimport classList from 'flarum/utils/classList';\n\nimport TagHero from './components/TagHero';\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 = app.store.getBy('tags', 'slug', slug);\n }\n\n if (slug && !tag || (tag && !tag.isChild() && !tag.children())) {\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 = app.store.getBy('tags', 'slug', slug);\n\n m.redraw();\n });\n }\n\n if (tag) {\n this.currentActiveTag = tag;\n return this.currentActiveTag;\n }\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) {\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');\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(params) {\n params.include.push('tags', 'tags.parent');\n\n if (this.params.tags) {\n params.filter.tag = this.params.tags;\n // TODO: replace this with a more robust system.\n const q = params.filter.q;\n if (q) {\n params.filter.q = `${q} tag:${this.params.tags}`;\n }\n }\n });\n}\n","import { extend } from 'flarum/extend';\nimport DiscussionListItem from 'flarum/components/DiscussionListItem';\nimport DiscussionHero from 'flarum/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","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 Modal from 'flarum/components/Modal';\nimport DiscussionPage from 'flarum/components/DiscussionPage';\nimport Button from 'flarum/components/Button';\nimport LoadingIndicator from 'flarum/components/LoadingIndicator';\nimport highlight from 'flarum/helpers/highlight';\nimport classList from 'flarum/utils/classList';\nimport extractText from 'flarum/utils/extractText';\nimport KeyboardNavigatable from 'flarum/utils/KeyboardNavigatable';\nimport Stream from 'flarum/utils/Stream';\n\nimport tagLabel from '../../common/helpers/tagLabel';\nimport tagIcon from '../../common/helpers/tagIcon';\nimport sortTags from '../../common/utils/sortTags';\nimport getSelectableTags from '../utils/getSelectableTags';\n\nexport default class TagDiscussionModal extends Modal {\n oninit(vnode) {\n super.oninit(vnode);\n\n this.tagsLoading = true;\n\n this.selected = [];\n this.filter = Stream('');\n this.focused = false;\n\n this.minPrimary = app.forum.attribute('minPrimaryTags');\n this.maxPrimary = app.forum.attribute('maxPrimaryTags');\n this.minSecondary = app.forum.attribute('minSecondaryTags');\n this.maxSecondary = app.forum.attribute('maxSecondaryTags');\n\n this.navigator = new KeyboardNavigatable();\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 this.tags = sortTags(getSelectableTags(this.attrs.discussion));\n\n if (this.attrs.selectedTags) {\n this.attrs.selectedTags.map(this.addTag.bind(this));\n } else if (this.attrs.discussion) {\n this.attrs.discussion.tags().map(this.addTag.bind(this));\n }\n\n this.index = this.tags[0].id();\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 * @param {Tag} tag\n */\n addTag(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.indexOf(parent) === -1) {\n this.selected.push(parent);\n }\n\n if (this.selected.indexOf(tag) === -1) {\n this.selected.push(tag);\n }\n }\n\n /**\n * Remove the given tag from the list of selected tags.\n *\n * @param {Tag} tag\n */\n removeTag(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, secondaryCount) {\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) {\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 === false || this.selected.indexOf(parent) !== -1;\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) {\n tags = tags.filter(tag => !tag.isPrimary() || this.selected.indexOf(tag) !== -1);\n }\n\n if (secondaryCount >= this.maxSecondary) {\n tags = tags.filter(tag => tag.isPrimary() || this.selected.indexOf(tag) !== -1);\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 (tags.indexOf(this.index) === -1) this.index = 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.indexOf(tag.parent()) !== -1)\n .map(tag => (\n
  • this.index = 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
\n ];\n }\n\n meetsRequirements(primaryCount, secondaryCount) {\n if (app.forum.attribute('canBypassTagCounts')) {\n return true;\n }\n\n return primaryCount >= this.minPrimary && secondaryCount >= this.minSecondary;\n }\n\n toggleTag(tag) {\n const index = this.selected.indexOf(tag);\n\n if (index !== -1) {\n this.removeTag(tag);\n } else {\n this.addTag(tag);\n }\n\n if (this.filter()) {\n this.filter('');\n this.index = this.tags[0];\n }\n\n this.onready();\n }\n\n select(e) {\n // Ctrl + Enter submits the selection, just Enter completes the current entry\n if (e.metaKey || e.ctrlKey || this.selected.indexOf(this.index) !== -1) {\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 {\n this.getItem(this.index)[0].dispatchEvent(new Event('click'));\n }\n }\n\n selectableItems() {\n return this.$('.TagDiscussionModal-list > li');\n }\n\n getCurrentNumericIndex() {\n return this.selectableItems().index(\n this.getItem(this.index)\n );\n }\n\n getItem(index) {\n return this.selectableItems().filter(`[data-index=\"${index.id()}\"]`);\n }\n\n setIndex(index, scrollToItem) {\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.index = 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) {\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/extend';\nimport DiscussionControls from 'flarum/utils/DiscussionControls';\nimport Button from 'flarum/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","import { extend, override } from 'flarum/extend';\nimport IndexPage from 'flarum/components/IndexPage';\nimport DiscussionComposer from 'flarum/components/DiscussionComposer';\nimport classList from 'flarum/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 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","import Model from 'flarum/Model';\nimport Discussion from 'flarum/models/Discussion';\nimport IndexPage from 'flarum/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(app) {\n app.routes.tags = {path: '/tags', component: TagsPage };\n app.routes.tag = {path: '/t/:tags', component: IndexPage };\n\n app.route.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 = flarum.core.compat['components/Page'];","module.exports = flarum.core.compat['helpers/listItems'];","module.exports = flarum.core.compat['helpers/humanTime'];","module.exports = flarum.core.compat['components/EventPost'];","module.exports = flarum.core.compat['components/Separator'];","module.exports = flarum.core.compat['states/DiscussionListState'];","module.exports = flarum.core.compat['states/GlobalSearchState'];","module.exports = flarum.core.compat['Component'];","module.exports = flarum.core.compat['components/DiscussionListItem'];","module.exports = flarum.core.compat['utils/DiscussionControls'];","module.exports = flarum.core.compat['components/DiscussionPage'];","module.exports = flarum.core.compat['helpers/highlight'];","module.exports = flarum.core.compat['utils/KeyboardNavigatable'];","/*\n * This file is part of Flarum.\n *\n * (c) Toby Zerner \n *\n * For the full copyright and license information, please view the LICENSE\n * file that was distributed with this source code.\n */\n\nexport * from './src/common';\nexport * from './src/forum';\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"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack://@flarum/tags/webpack/bootstrap","webpack://@flarum/tags/external \"flarum.core.compat['Model']\"","webpack://@flarum/tags/external \"flarum.core.compat['extend']\"","webpack://@flarum/tags/./src/common/utils/sortTags.js","webpack://@flarum/tags/./src/common/helpers/tagIcon.js","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/./src/common/helpers/tagLabel.js","webpack://@flarum/tags/external \"flarum.core.compat['components/IndexPage']\"","webpack://@flarum/tags/external \"flarum.core.compat['utils/classList']\"","webpack://@flarum/tags/./src/common/helpers/tagsLabel.js","webpack://@flarum/tags/external \"flarum.core.compat['components/Button']\"","webpack://@flarum/tags/external \"flarum.core.compat['components/Link']\"","webpack://@flarum/tags/external \"flarum.core.compat['utils/Stream']\"","webpack://@flarum/tags/./src/common/models/Tag.js","webpack://@flarum/tags/external \"flarum.core.compat['components/LoadingIndicator']\"","webpack://@flarum/tags/external \"flarum.core.compat['utils/extract']\"","webpack://@flarum/tags/external \"flarum.core.compat['components/DiscussionComposer']\"","webpack://@flarum/tags/external \"flarum.core.compat['utils/mixin']\"","webpack://@flarum/tags/external \"flarum.core.compat['utils/computed']\"","webpack://@flarum/tags/external \"flarum.core.compat['components/Modal']\"","webpack://@flarum/tags/./src/common/compat.js","webpack://@flarum/tags/external \"flarum.core\"","webpack://@flarum/tags/external \"flarum.core.compat['components/LinkButton']\"","webpack://@flarum/tags/external \"flarum.core.compat['models/Discussion']\"","webpack://@flarum/tags/./node_modules/@babel/runtime/regenerator/index.js","webpack://@flarum/tags/external \"flarum.core.compat['components/DiscussionHero']\"","webpack://@flarum/tags/external \"flarum.core.compat['utils/extractText']\"","webpack://@flarum/tags/./src/forum/components/TagsPage.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.js","webpack://@flarum/tags/./src/forum/components/TagLinkButton.js","webpack://@flarum/tags/./src/forum/addTagList.js","webpack://@flarum/tags/./src/forum/components/TagHero.js","webpack://@flarum/tags/./src/forum/addTagFilter.js","webpack://@flarum/tags/./src/forum/addTagLabels.js","webpack://@flarum/tags/./src/forum/utils/getSelectableTags.js","webpack://@flarum/tags/./src/forum/components/TagDiscussionModal.js","webpack://@flarum/tags/./src/forum/addTagControl.js","webpack://@flarum/tags/./src/forum/addTagComposer.js","webpack://@flarum/tags/./src/forum/compat.js","webpack://@flarum/tags/./src/forum/index.js","webpack://@flarum/tags/external \"flarum.core.compat['components/Page']\"","webpack://@flarum/tags/external \"flarum.core.compat['helpers/listItems']\"","webpack://@flarum/tags/external \"flarum.core.compat['helpers/humanTime']\"","webpack://@flarum/tags/external \"flarum.core.compat['components/EventPost']\"","webpack://@flarum/tags/external \"flarum.core.compat['components/Separator']\"","webpack://@flarum/tags/external \"flarum.core.compat['states/DiscussionListState']\"","webpack://@flarum/tags/external \"flarum.core.compat['states/GlobalSearchState']\"","webpack://@flarum/tags/external \"flarum.core.compat['Component']\"","webpack://@flarum/tags/external \"flarum.core.compat['components/DiscussionListItem']\"","webpack://@flarum/tags/external \"flarum.core.compat['utils/DiscussionControls']\"","webpack://@flarum/tags/external \"flarum.core.compat['components/DiscussionPage']\"","webpack://@flarum/tags/external \"flarum.core.compat['helpers/highlight']\"","webpack://@flarum/tags/external \"flarum.core.compat['utils/KeyboardNavigatable']\"","webpack://@flarum/tags/./forum.js","webpack://@flarum/tags/./node_modules/regenerator-runtime/runtime.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","flarum","core","compat","sortTags","tags","slice","sort","a","b","aPos","position","bPos","discussionCount","aParent","parent","bParent","tagIcon","tag","attrs","settings","hasIcon","icon","useColor","className","classList","style","color","_setPrototypeOf","setPrototypeOf","__proto__","_inheritsLoose","subClass","superClass","constructor","tagLabel","link","extract","tagText","app","translator","trans","title","description","href","route","slug","isChild","Link","tagsLabel","children","forEach","length","push","Tag","mixin","Model","attribute","backgroundUrl","backgroundMode","hasOne","hasMany","defaultSort","isHidden","lastPostedAt","transformDate","lastPostedDiscussion","isRestricted","canStartDiscussion","canAddToDiscussion","isPrimary","computed","require","TagsPage","oninit","vnode","history","this","preloaded","preloadedApiDocument","filter","loading","tagList","load","then","store","all","redraw","view","pinned","cloud","IndexPage","hero","listItems","sidebarItems","toArray","map","child","discussion","lastPostNumber","humanTime","oncreate","setTitle","setTitleCount","Page","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","arg","info","error","done","Promise","TagListState","loadedIncludes","Set","fn","includes","unloadedIncludes","include","has","find","join","val","add","self","args","arguments","apply","err","undefined","TagLinkButton","model","isActive","params","LinkButton","extend","items","current","matches","Separator","component","search","stickyParams","currentTag","addTag","active","more","splice","TagHero","Component","currentActiveTag","getBy","override","original","vdom","session","user","newDiscussion","disabled","GlobalSearchState","param","DiscussionListState","q","DiscussionListItem","DiscussionHero","getSelectableTags","TagDiscussionModal","tagsLoading","selected","Stream","focused","minPrimary","forum","maxPrimary","minSecondary","maxSecondary","navigator","KeyboardNavigatable","onUp","setIndex","getCurrentNumericIndex","onDown","onSelect","select","onRemove","selectedTags","index","primaryCount","secondaryCount","removeTag","getInstruction","remaining","toLowerCase","substr","inputWidth","Math","max","extractText","onclick","$","focus","onready","placeholder","bidi","width","onkeydown","navigate","onfocus","onblur","type","meetsRequirements","data-index","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","chooseTags","selectableTags","chosenTags","chosenPrimaryTags","chosenSecondaryTags","assign","addTagFilter","addTagControl","addTagList","addTagLabels","addTagComposer","initializers","routes","path","postComponents","discussionTagged","models","Discussion","tagsCompat","runtime","Op","hasOwn","$Symbol","iteratorSymbol","iterator","asyncIteratorSymbol","asyncIterator","toStringTagSymbol","define","obj","configurable","writable","wrap","innerFn","outerFn","tryLocsList","protoGenerator","Generator","generator","context","Context","_invoke","state","method","Error","doneResult","delegate","delegateResult","maybeInvokeDelegate","ContinueSentinel","sent","_sent","dispatchException","abrupt","record","tryCatch","makeInvokeMethod","GeneratorFunction","GeneratorFunctionPrototype","IteratorPrototype","getProto","getPrototypeOf","NativeIteratorPrototype","values","Gp","defineIteratorMethods","AsyncIterator","PromiseImpl","previousPromise","callInvokeWithMethodAndArg","invoke","result","__await","unwrapped","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","keys","reverse","pop","skipTempReset","prev","charAt","rootRecord","rval","exception","handle","loc","caught","hasCatch","hasFinally","finallyEntry","complete","finish","thrown","delegateYield","regeneratorRuntime","accidentalStrictMode","globalThis","Function"],"mappings":"2BACE,IAAIA,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUC,QAGnC,IAAIC,EAASJ,EAAiBE,GAAY,CAC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AAWF,mBAAqBpG,EAEhCuG,SAAS,IAAK,yBAAdA,CAAwCvG","file":"forum.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 51);\n","module.exports = flarum.core.compat['Model'];","module.exports = flarum.core.compat['extend'];","export default function sortTags(tags) {\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 classList from 'flarum/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","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}","import extract from 'flarum/utils/extract';\nimport Link from 'flarum/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","module.exports = flarum.core.compat['components/IndexPage'];","module.exports = flarum.core.compat['utils/classList'];","import extract from 'flarum/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","module.exports = flarum.core.compat['components/Button'];","module.exports = flarum.core.compat['components/Link'];","module.exports = flarum.core.compat['utils/Stream'];","import Model from 'flarum/Model';\nimport mixin from 'flarum/utils/mixin';\nimport computed from 'flarum/utils/computed';\n\nexport default class Tag extends mixin(Model, {\n name: Model.attribute('name'),\n slug: Model.attribute('slug'),\n description: Model.attribute('description'),\n\n color: Model.attribute('color'),\n backgroundUrl: Model.attribute('backgroundUrl'),\n backgroundMode: Model.attribute('backgroundMode'),\n icon: Model.attribute('icon'),\n\n position: Model.attribute('position'),\n parent: Model.hasOne('parent'),\n children: Model.hasMany('children'),\n defaultSort: Model.attribute('defaultSort'),\n isChild: Model.attribute('isChild'),\n isHidden: Model.attribute('isHidden'),\n\n discussionCount: Model.attribute('discussionCount'),\n lastPostedAt: Model.attribute('lastPostedAt', Model.transformDate),\n lastPostedDiscussion: Model.hasOne('lastPostedDiscussion'),\n\n isRestricted: Model.attribute('isRestricted'),\n canStartDiscussion: Model.attribute('canStartDiscussion'),\n canAddToDiscussion: Model.attribute('canAddToDiscussion'),\n\n isPrimary: computed('position', 'parent', (position, parent) => position !== null && parent === false)\n}) {}\n","module.exports = flarum.core.compat['components/LoadingIndicator'];","module.exports = flarum.core.compat['utils/extract'];","module.exports = flarum.core.compat['components/DiscussionComposer'];","module.exports = flarum.core.compat['utils/mixin'];","module.exports = flarum.core.compat['utils/computed'];","module.exports = flarum.core.compat['components/Modal'];","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","module.exports = flarum.core;","module.exports = flarum.core.compat['components/LinkButton'];","module.exports = flarum.core.compat['models/Discussion'];","module.exports = require(\"regenerator-runtime\");\n","module.exports = flarum.core.compat['components/DiscussionHero'];","module.exports = flarum.core.compat['utils/extractText'];","import Page from 'flarum/components/Page';\nimport IndexPage from 'flarum/components/IndexPage';\nimport Link from 'flarum/components/Link';\nimport LoadingIndicator from 'flarum/components/LoadingIndicator';\nimport listItems from 'flarum/helpers/listItems';\nimport humanTime from 'flarum/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","import EventPost from 'flarum/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}","export default class TagListState {\n constructor() {\n this.loadedIncludes = new Set();\n }\n\n async load(includes = []) {\n const unloadedIncludes = includes.filter(include => !this.loadedIncludes.has(include));\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}","import Link from 'flarum/components/Link';\nimport LinkButton from 'flarum/components/LinkButton';\nimport classList from 'flarum/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/extend';\nimport IndexPage from 'flarum/components/IndexPage';\nimport Separator from 'flarum/components/Separator';\nimport LinkButton from 'flarum/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","import Component from 'flarum/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 { extend, override } from 'flarum/extend';\nimport IndexPage from 'flarum/components/IndexPage';\nimport DiscussionListState from 'flarum/states/DiscussionListState';\nimport GlobalSearchState from 'flarum/states/GlobalSearchState';\nimport classList from 'flarum/utils/classList';\n\nimport TagHero from './components/TagHero';\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 = app.store.getBy('tags', 'slug', slug);\n }\n\n if (slug && !tag || (tag && !tag.isChild() && !tag.children())) {\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 = app.store.getBy('tags', 'slug', slug);\n\n m.redraw();\n });\n }\n\n if (tag) {\n this.currentActiveTag = tag;\n return this.currentActiveTag;\n }\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) {\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');\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(params) {\n params.include.push('tags', 'tags.parent');\n\n if (this.params.tags) {\n params.filter.tag = this.params.tags;\n // TODO: replace this with a more robust system.\n const q = params.filter.q;\n if (q) {\n params.filter.q = `${q} tag:${this.params.tags}`;\n }\n }\n });\n}\n","import { extend } from 'flarum/extend';\nimport DiscussionListItem from 'flarum/components/DiscussionListItem';\nimport DiscussionHero from 'flarum/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","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 Modal from 'flarum/components/Modal';\nimport DiscussionPage from 'flarum/components/DiscussionPage';\nimport Button from 'flarum/components/Button';\nimport LoadingIndicator from 'flarum/components/LoadingIndicator';\nimport highlight from 'flarum/helpers/highlight';\nimport classList from 'flarum/utils/classList';\nimport extractText from 'flarum/utils/extractText';\nimport KeyboardNavigatable from 'flarum/utils/KeyboardNavigatable';\nimport Stream from 'flarum/utils/Stream';\n\nimport tagLabel from '../../common/helpers/tagLabel';\nimport tagIcon from '../../common/helpers/tagIcon';\nimport sortTags from '../../common/utils/sortTags';\nimport getSelectableTags from '../utils/getSelectableTags';\n\nexport default class TagDiscussionModal extends Modal {\n oninit(vnode) {\n super.oninit(vnode);\n\n this.tagsLoading = true;\n\n this.selected = [];\n this.filter = Stream('');\n this.focused = false;\n\n this.minPrimary = app.forum.attribute('minPrimaryTags');\n this.maxPrimary = app.forum.attribute('maxPrimaryTags');\n this.minSecondary = app.forum.attribute('minSecondaryTags');\n this.maxSecondary = app.forum.attribute('maxSecondaryTags');\n\n this.navigator = new KeyboardNavigatable();\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 this.tags = sortTags(getSelectableTags(this.attrs.discussion));\n\n if (this.attrs.selectedTags) {\n this.attrs.selectedTags.map(this.addTag.bind(this));\n } else if (this.attrs.discussion) {\n this.attrs.discussion.tags().map(this.addTag.bind(this));\n }\n\n this.index = this.tags[0].id();\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 * @param {Tag} tag\n */\n addTag(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 * @param {Tag} tag\n */\n removeTag(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, secondaryCount) {\n if (app.forum.attribute('canBypassTagCounts')) {\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) {\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 === 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 && !app.forum.attribute('canBypassTagCounts')) {\n tags = tags.filter(tag => !tag.isPrimary() || this.selected.includes(tag));\n }\n\n if (secondaryCount >= this.maxSecondary && !app.forum.attribute('canBypassTagCounts')) {\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 (!tags.includes(this.index)) this.index = 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()))\n .map(tag => (\n
  • this.index = 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
\n ];\n }\n\n meetsRequirements(primaryCount, secondaryCount) {\n if (app.forum.attribute('canBypassTagCounts')) {\n return true;\n }\n\n return primaryCount >= this.minPrimary && secondaryCount >= this.minSecondary;\n }\n\n toggleTag(tag) {\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.index = this.tags[0];\n }\n\n this.onready();\n }\n\n select(e) {\n // Ctrl + Enter submits the selection, just Enter completes the current entry\n if (e.metaKey || e.ctrlKey || this.selected.includes(this.index)) {\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 {\n this.getItem(this.index)[0].dispatchEvent(new Event('click'));\n }\n }\n\n selectableItems() {\n return this.$('.TagDiscussionModal-list > li');\n }\n\n getCurrentNumericIndex() {\n return this.selectableItems().index(\n this.getItem(this.index)\n );\n }\n\n getItem(index) {\n return this.selectableItems().filter(`[data-index=\"${index.id()}\"]`);\n }\n\n setIndex(index, scrollToItem) {\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.index = 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) {\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/extend';\nimport DiscussionControls from 'flarum/utils/DiscussionControls';\nimport Button from 'flarum/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","import { extend, override } from 'flarum/extend';\nimport IndexPage from 'flarum/components/IndexPage';\nimport DiscussionComposer from 'flarum/components/DiscussionComposer';\nimport classList from 'flarum/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 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","import Model from 'flarum/Model';\nimport Discussion from 'flarum/models/Discussion';\nimport IndexPage from 'flarum/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(app) {\n app.routes.tags = {path: '/tags', component: TagsPage };\n app.routes.tag = {path: '/t/:tags', component: IndexPage };\n\n app.route.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 = flarum.core.compat['components/Page'];","module.exports = flarum.core.compat['helpers/listItems'];","module.exports = flarum.core.compat['helpers/humanTime'];","module.exports = flarum.core.compat['components/EventPost'];","module.exports = flarum.core.compat['components/Separator'];","module.exports = flarum.core.compat['states/DiscussionListState'];","module.exports = flarum.core.compat['states/GlobalSearchState'];","module.exports = flarum.core.compat['Component'];","module.exports = flarum.core.compat['components/DiscussionListItem'];","module.exports = flarum.core.compat['utils/DiscussionControls'];","module.exports = flarum.core.compat['components/DiscussionPage'];","module.exports = flarum.core.compat['helpers/highlight'];","module.exports = flarum.core.compat['utils/KeyboardNavigatable'];","/*\n * This file is part of Flarum.\n *\n * (c) Toby Zerner \n *\n * For the full copyright and license information, please view the LICENSE\n * file that was distributed with this source code.\n */\n\nexport * from './src/common';\nexport * from './src/forum';\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"],"sourceRoot":""} \ No newline at end of file