From c28eee59b3b4ca8641344c03e2ad4176f37ca34c Mon Sep 17 00:00:00 2001 From: flarum-bot Date: Thu, 19 Sep 2024 21:38:28 +0000 Subject: [PATCH] Bundled output for commit 2204157ac04daaa09fe9a15bcac48d9e21c32d9c Includes transpiled JS/TS, and Typescript declaration files (typings). [skip ci] --- extensions/tags/js/dist/forum.js | 2 +- extensions/tags/js/dist/forum.js.map | 2 +- framework/core/js/dist/admin.js | 2 +- framework/core/js/dist/admin.js.map | 2 +- framework/core/js/dist/forum.js | 2 +- framework/core/js/dist/forum.js.map | 2 +- framework/core/js/dist/forum/components/LogInModal.js | 2 +- framework/core/js/dist/forum/components/LogInModal.js.map | 2 +- framework/core/js/dist/forum/components/PostStreamScrubber.js | 2 +- .../core/js/dist/forum/components/PostStreamScrubber.js.map | 2 +- framework/core/js/dist/forum/components/SignUpModal.js | 2 +- framework/core/js/dist/forum/components/SignUpModal.js.map | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-) diff --git a/extensions/tags/js/dist/forum.js b/extensions/tags/js/dist/forum.js index b7aec5423..53f5328f0 100644 --- a/extensions/tags/js/dist/forum.js +++ b/extensions/tags/js/dist/forum.js @@ -1,2 +1,2 @@ -(()=>{var t,e,s={974:(t,e,s)=>{"use strict";s.d(e,{Z:()=>o});var r=s(836),a=s.n(r);function o(t,e,s){void 0===e&&(e={}),void 0===s&&(s={});const r=t&&t.icon(),{useColor:o=!0}=s;return e.className=a()([e.className,"icon text-colored",r?t.icon():"TagIcon"]),t&&o?(e.style=e.style||{},e.style["--color"]=t.color()):t||(e.className+=" untagged"),r?m("i",e):m("span",e)}flarum.reg.add("flarum-tags","common/helpers/tagIcon",o)},924:(t,e,s)=>{"use strict";s.d(e,{Z:()=>g});var r=s(780),a=s.n(r),o=s(678),n=s.n(o),i=s(836),l=s.n(i),c=s(679),u=s.n(c),d=s(974);function g(t,e){void 0===e&&(e={}),e.style=e.style||{},e.className="TagLabel "+(e.className||"");const s=a()(e,"link"),r=t?t.name():app.translator.trans("flarum-tags.lib.deleted_tag_text");if(t){const r=t.color();r&&(e.style["--tag-bg"]=r,e.className=l()(e.className,"colored",u()(r))),s&&(e.title=t.description()||"",e.href=app.route("tag",{tags:t.slug()})),t.isChild()&&(e.className+=" TagLabel--child")}else e.className+=" untagged";return m(s?n():"span",e,m("span",{className:"TagLabel-text"},t&&t.icon()&&(0,d.Z)(t,{className:"TagLabel-icon"},{useColor:!1}),m("span",{className:"TagLabel-name"},r)))}flarum.reg.add("flarum-tags","common/helpers/tagLabel",g)},270:()=>{},648:(t,e,s)=>{"use strict";function r(t){return t.slice(0).sort(((t,e)=>{const s=t.position(),r=e.position();if(null===s&&null===r)return e.discussionCount()-t.discussionCount();if(null===r)return-1;if(null===s)return 1;const a=t.parent(),o=e.parent();return a===o?s-r:a&&o?a.position()-o.position():a?a===e?1:a.position()-r:o?o===t?-1:s-o.position():0}))}s.d(e,{Z:()=>r}),flarum.reg.add("flarum-tags","common/utils/sortTags",r)},664:(t,e,s)=>{"use strict";s.d(e,{l:()=>Nt});var r=s(892),a=s.n(r),o=s(905),n=s(351),i=s.n(n);class l{constructor(){(0,o.Z)(this,"loadedIncludes",void 0)}async load(t){if(void 0===t&&(t=[]),!this.loadedIncludes)return this.query(t);const e=t.filter((t=>!this.loadedIncludes.has(t)));return 0===e.length?Promise.resolve(i().store.all("tags")):this.query(e)}async query(t){return void 0===t&&(t=[]),null!=this.loadedIncludes||(this.loadedIncludes=new Set),i().store.find("tags",{include:t.join(",")}).then((e=>{const s=Array.isArray(e)?e:[e];return t.forEach((t=>this.loadedIncludes.add(t))),s}))}}flarum.reg.add("flarum-tags","common/states/TagListState",l);const c=flarum.reg.get("core","common/extend"),u=flarum.reg.get("core","forum/components/IndexSidebar");var d=s.n(u);const g=flarum.reg.get("core","common/components/Separator");var f=s.n(g);const p=flarum.reg.get("core","common/components/LinkButton");var h=s.n(p),b=s(678),v=s.n(b),T=s(836),y=s.n(T),x=s(974);class N extends(h()){view(t){const e=this.attrs.model,s=e&&e.description(),r=y()("TagLinkButton hasIcon",{child:e.isChild()},this.attrs.className);return m(v(),{className:r,href:this.attrs.route,style:e?{"--color":e.color()}:void 0,title:s||void 0},(0,x.Z)(e,{className:"Button-icon"}),m("span",{className:"Button-label"},e?e.name():app.translator.trans("flarum-tags.forum.index.untagged_link")))}static initAttrs(t){super.initAttrs(t);const e=t.model;t.params.tags=e?e.slug():"untagged",t.route=app.route("tag",t.params)}}flarum.reg.add("flarum-tags","forum/components/TagLinkButton",N);const w=flarum.reg.get("core","common/components/Page");var _=s.n(w);const C=flarum.reg.get("core","forum/components/PageStructure");var k=s.n(C);const P=flarum.reg.get("core","forum/components/WelcomeHero");var S=s.n(P),A=s(149),D=s.n(A);const L=flarum.reg.get("core","common/utils/ItemList");var I=s.n(L);const Z=flarum.reg.get("core","common/helpers/humanTime");var M=s.n(Z),j=s(679),E=s.n(j),V=s(596),B=s.n(V),H=s(924),O=s(648);class R extends(_()){constructor(){super(...arguments),(0,o.Z)(this,"tags",void 0),(0,o.Z)(this,"loading",void 0)}oninit(t){super.oninit(t),a().history.push("tags",B()(a().translator.trans("flarum-tags.forum.header.back_to_tags_tooltip"))),this.tags=[];const e=a().preloadedApiDocument();e?this.tags=(0,O.Z)(e.filter((t=>!t.isChild()))):(this.loading=!0,a().tagList.load(["children","lastPostedDiscussion","parent"]).then((()=>{this.tags=(0,O.Z)(a().store.all("tags").filter((t=>!t.isChild()))),this.loading=!1,m.redraw()})))}oncreate(t){super.oncreate(t),a().setTitle(B()(a().translator.trans("flarum-tags.forum.all_tags.meta_title_text"))),a().setTitleCount(0)}view(){return m(k(),{className:"TagsPage",hero:this.hero.bind(this),sidebar:this.sidebar.bind(this)},this.contentItems().toArray())}contentItems(){const t=new(I());if(this.loading)t.add("loading",m(D(),null));else{const e=this.tags.filter((t=>null!==t.position())),s=this.tags.filter((t=>null===t.position()));t.add("tagTiles",this.tagTileListView(e),100),s.length&&t.add("cloud",this.cloudView(s),10)}return t}hero(){return m(S(),null)}sidebar(){return m(d(),null)}tagTileListView(t){return m("ul",{className:"TagTiles"},t.map(this.tagTileView.bind(this)))}tagTileView(t){const e=t.lastPostedDiscussion(),s=(0,O.Z)(t.children()||[]);return m("li",{className:y()("TagTile",{colored:t.color()},E()(t.color())),style:{"--tag-bg":t.color()}},m(v(),{className:"TagTile-info",href:a().route.tag(t)},m("div",{className:"TagTile-heading"},t.icon()&&(0,x.Z)(t,{},{useColor:!1}),m("h3",{className:"TagTile-name"},t.name())),m("p",{className:"TagTile-description"},t.description()),!!s&&m("div",{className:"TagTile-children"},s.map((t=>[m(v(),{href:a().route.tag(t)},t.name())," "])))),e?m(v(),{className:"TagTile-lastPostedDiscussion",href:a().route.discussion(e,e.lastPostNumber())},m("span",{className:"TagTile-lastPostedDiscussion-title"},e.title()),M()(e.lastPostedAt())):m("span",{className:"TagTile-lastPostedDiscussion"}))}cloudView(t){return m("div",{className:"TagCloud"},t.map((t=>[(0,H.Z)(t,{link:!0})," "])))}}flarum.reg.add("flarum-tags","forum/components/TagsPage",R);const q=flarum.reg.get("core","forum/components/IndexPage");var G=s.n(q);const F=flarum.reg.get("core","forum/states/DiscussionListState");var K=s.n(F);const $=flarum.reg.get("core","forum/states/GlobalSearchState");var U=s.n($),z=s(433),W=s.n(z);class J extends(W()){view(){const t=this.attrs.model,e=t.color();return m("header",{className:y()("Hero","TagHero",{"TagHero--colored":e,[E()(e)]:e}),style:e?{"--hero-bg":e}:void 0},m("div",{className:"container"},m("div",{className:"containerNarrow"},m("h1",{className:"Hero-title"},t.icon()&&(0,x.Z)(t,{},{useColor:!1})," ",t.name()),m("div",{className:"Hero-subtitle"},t.description()))))}}flarum.reg.add("flarum-tags","forum/components/TagHero",J);const Q=t=>a().store.all("tags").find((e=>0===e.slug().localeCompare(t,void 0,{sensitivity:"base"}))),X=flarum.reg.get("core","forum/components/DiscussionListItem");var Y=s.n(X);const tt=flarum.reg.get("core","forum/components/DiscussionHero");var et=s.n(tt);function st(t,e){void 0===e&&(e={});const s=[],{link:r,...a}=e;return a.className=y()("TagsLabel",a.className),t?(0,O.Z)(t).forEach((e=>{(e||1===t.length)&&s.push((0,H.Z)(e,{link:r}))})):s.push((0,H.Z)()),m("span",a,s)}s(780),flarum.reg.add("flarum-tags","common/helpers/tagsLabel",st);const rt=flarum.reg.get("core","forum/utils/DiscussionControls");var at=s.n(rt),ot=s(645),nt=s.n(ot);flarum.reg.addChunkModule("642","884","flarum-tags","forum/components/TagDiscussionModal"),flarum.reg.addChunkModule("642","884","flarum-tags","common/components/TagSelectionModal"),flarum.reg.addChunkModule("642","884","flarum-tags","forum/components/ToggleButton");var it=s(490);const lt=flarum.reg.get("core","common/extenders");var ct=s.n(lt);const ut=flarum.reg.get("core","common/models/Discussion");var mt=s.n(ut);const dt=flarum.reg.get("core","forum/components/EventPost");var gt=s.n(dt);class ft extends(gt()){static initAttrs(t){super.initAttrs(t);const e=t.post.content()[0],s=t.post.content()[1];function r(t,e){return t.filter((t=>-1===e.indexOf(t))).map((t=>app.store.getById("tags",t)))}t.tagsAdded=r(s,e),t.tagsRemoved=r(e,s)}icon(){return"fas fa-tag"}descriptionKey(){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"}descriptionData(){const t={};return this.attrs.tagsAdded.length&&(t.tagsAdded=app.translator.trans("flarum-tags.forum.post_stream.tags_text",{tags:st(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:st(this.attrs.tagsRemoved,{link:!0}),count:this.attrs.tagsRemoved.length})),t}}flarum.reg.add("flarum-tags","forum/components/DiscussionTaggedPost",ft);const pt=flarum.reg.get("core","common/utils/computed");var ht=s.n(pt);const bt=flarum.reg.get("core","common/Model");var vt=s.n(bt);class Tt extends(vt()){name(){return vt().attribute("name").call(this)}slug(){return vt().attribute("slug").call(this)}description(){return vt().attribute("description").call(this)}color(){return vt().attribute("color").call(this)}backgroundUrl(){return vt().attribute("backgroundUrl").call(this)}backgroundMode(){return vt().attribute("backgroundMode").call(this)}icon(){return vt().attribute("icon").call(this)}position(){return vt().attribute("position").call(this)}parent(){return vt().hasOne("parent").call(this)}children(){return vt().hasMany("children").call(this)}defaultSort(){return vt().attribute("defaultSort").call(this)}isChild(){return vt().attribute("isChild").call(this)}isHidden(){return vt().attribute("isHidden").call(this)}isPrimary(){return vt().attribute("isPrimary").call(this)}discussionCount(){return vt().attribute("discussionCount").call(this)}lastPostedAt(){return vt().attribute("lastPostedAt",vt().transformDate).call(this)}lastPostedDiscussion(){return vt().hasOne("lastPostedDiscussion").call(this)}isRestricted(){return vt().attribute("isRestricted").call(this)}canStartDiscussion(){return vt().attribute("canStartDiscussion").call(this)}canAddToDiscussion(){return vt().attribute("canAddToDiscussion").call(this)}isPrimaryParent(){return ht()("position","parent",((t,e)=>null!==t&&!1===e)).call(this)}}flarum.reg.add("flarum-tags","common/models/Tag",Tt);const yt=flarum.reg.get("core","common/query/IGambit");class xt extends yt.KeyValueGambit{constructor(){super(...arguments),(0,o.Z)(this,"predicates",!0)}key(){return i().translator.trans("flarum-tags.lib.gambits.discussions.tag.key",{},!0)}hint(){return i().translator.trans("flarum-tags.lib.gambits.discussions.tag.hint",{},!0)}filterKey(){return"tag"}gambitValueToFilterValue(t){return[t]}fromFilter(t,e){let s=[];return Array.isArray(t)?(s=t.map((t=>this.fromFilter(t.toString(),e))),s.join(" ")):"".concat(e?"-":"").concat(this.key(),":").concat(this.filterValueToGambitValue(t))}filterValueToGambitValue(t){return t}}flarum.reg.add("flarum-tags","common/query/discussions/TagGambit",xt);const Nt=[(new(ct().Store)).add("tags",Tt),(new(ct().Search)).gambit("discussions",xt),(new(ct().Routes)).add("tags","/tags",R).add("tag","/t/:tags",G()).helper("tag",(t=>a().route("tag",{tags:t.slug()}))),(new(ct().PostTypes)).add("discussionTagged",ft),new(ct().Model)(mt()).hasMany("tags").attribute("canTag")];a().initializers.add("flarum-tags",(()=>{a().tagList=new l,(0,c.extend)(d().prototype,"navItems",(function(t){if(t.add("tags",m(h(),{icon:"fas fa-th-large",href:a().route("tags")},a().translator.trans("flarum-tags.forum.index.tags_link")),-10),a().current.matches(R))return;t.add("separator",m(f(),null),-12);const e=a().search.state.stickyParams(),s=a().store.all("tags"),r=a().currentTag(),o=s=>{let a=r===s;!a&&r&&(a=r.parent()===s),t.add("tag"+s.id(),m(N,{model:s,params:e,active:a},null==s?void 0:s.name()),-14)};(0,O.Z)(s).filter((t=>null!==t.position()&&(!t.isChild()||r&&(t.parent()===r||t.parent()===r.parent())))).forEach(o);const n=s.filter((t=>null===t.position())).sort(((t,e)=>e.discussionCount()-t.discussionCount()));n.splice(0,3).forEach(o),n.length&&t.add("moreTags",m(h(),{href:a().route("tags")},a().translator.trans("flarum-tags.forum.index.more_link")),-16)})),a().currentTag=function(t){if(this.currentActiveTag&&!t)return this.currentActiveTag;const e=this.search.state.params().tags;let s=null;if(e&&(s=Q(e)),e&&!s||s&&!s.isChild()&&!s.children()){if(this.currentTagLoading)return;this.currentTagLoading=!0,this.store.find("tags",e,{include:"children,children.parent,parent"}).then((()=>{this.currentActiveTag=Q(e),m.redraw()})).finally((()=>{this.currentTagLoading=!1}))}if(s)return this.currentActiveTag=s,this.currentActiveTag;this.currentActiveTag=void 0},(0,c.extend)(G().prototype,"view",(function(t){a().currentTag(!0)})),(0,c.override)(G().prototype,"hero",(function(t){const e=a().currentTag();return e?m(J,{model:e}):t()})),(0,c.extend)(G().prototype,"view",(function(t){const e=a().currentTag();e&&(t.attrs.className+=" IndexPage--tag"+e.id())})),(0,c.extend)(G().prototype,"setTitle",(function(){const t=a().currentTag();t&&a().setTitle(t.name())})),(0,c.extend)(d().prototype,"items",(function(t){const e=a().currentTag();if(e){const s=e.color(),r=e.canStartDiscussion()||!a().session.user,o=t.get("newDiscussion");s&&(o.attrs.className=y()([o.attrs.className,"Button--tagColored",E()(s)]),o.attrs.style={"--color":s}),o.attrs.disabled=!r,o.children=a().translator.trans(r?"core.forum.index.start_discussion_button":"core.forum.index.cannot_start_discussion_button")}})),(0,c.extend)(U().prototype,"params",(function(t){t.tags=m.route.param("tags")})),(0,c.extend)(K().prototype,"requestParams",(function(t){var e;"string"==typeof t.include?t.include=[t.include]:null==(e=t.include)||e.push("tags","tags.parent"),this.params.tags&&(t.filter||(t.filter={}),t.filter.tag=this.params.tags)})),(0,c.extend)(Y().prototype,"infoItems",(function(t){const e=this.attrs.discussion.tags();e&&e.length&&t.add("tags",st(e),10)})),(0,c.extend)(et().prototype,"view",(function(t){const e=(0,O.Z)(this.attrs.discussion.tags());if(e&&e.length){const s=e[0].color();s&&(t.attrs.style={"--hero-bg":s},t.attrs.className=y()(t.attrs.className,"DiscussionHero--colored",E()(s)))}})),(0,c.extend)(et().prototype,"items",(function(t){const e=this.attrs.discussion.tags();e&&e.length&&t.add("tags",st(e,{link:!0}),5)})),(0,c.extend)(at(),"moderationControls",(function(t,e){e.canTag()&&t.add("tags",m(nt(),{icon:"fas fa-tag",onclick:()=>app.modal.show((()=>s.e(642).then(s.bind(s,884))),{discussion:e})},app.translator.trans("flarum-tags.forum.discussion_controls.edit_tags_button")))})),(0,c.extend)(d().prototype,"newDiscussionAction",(function(t){const e=a().currentTag();if(e){const s=e.parent(),r=s?[s,e]:[e];t.then((t=>t.fields.tags=r))}else a().composer.fields.tags=[]})),(0,c.extend)("flarum/forum/components/DiscussionComposer","oninit",(function(){a().tagList.load(["parent"]).then((()=>m.redraw())),this.constructor.prototype.chooseTags=function(){(0,it.Z)().length&&a().modal.show((()=>s.e(642).then(s.bind(s,884))),{selectedTags:(this.composer.fields.tags||[]).slice(0),onsubmit:t=>{this.composer.fields.tags=t,this.$("textarea").focus()}})}})),(0,c.extend)("flarum/forum/components/DiscussionComposer","headerItems",(function(t){const e=this.composer.fields.tags||[],s=(0,it.Z)();t.add("tags",m("a",{className:y()(["DiscussionComposer-changeTags",!s.length&&"disabled"]),onclick:this.chooseTags.bind(this)},e.length?st(e):m("span",{className:"TagLabel untagged"},a().translator.trans("flarum-tags.forum.composer_discussion.choose_tags_link"))),10)})),(0,c.override)("flarum/forum/components/DiscussionComposer","onsubmit",(function(t){const e=this.composer.fields.tags||[],r=e.filter((t=>null!==t.position()&&!t.isChild())),o=e.filter((t=>null===t.position())),n=(0,it.Z)(),i=parseInt(a().forum.attribute("minPrimaryTags")),l=parseInt(a().forum.attribute("minSecondaryTags")),c=parseInt(a().forum.attribute("maxPrimaryTags")),u=parseInt(a().forum.attribute("maxSecondaryTags"));(!e.length&&0!==c&&0!==u||r.lengths.e(642).then(s.bind(s,884))),{selectedTags:e,onsubmit:e=>{this.composer.fields.tags=e,t()}}):t()})),(0,c.extend)("flarum/forum/components/DiscussionComposer","data",(function(t){t.relationships=t.relationships||{},t.relationships.tags=this.composer.fields.tags}))}))},490:(t,e,s)=>{"use strict";function r(t){let e=app.store.all("tags");if(t){const s=t.tags()||[];e=e.filter((t=>t.canAddToDiscussion()||s.includes(t)))}else e=e.filter((t=>t.canStartDiscussion()));return e}s.d(e,{Z:()=>r}),flarum.reg.add("flarum-tags","forum/utils/getSelectableTags",r)},433:t=>{"use strict";t.exports=flarum.reg.get("core","common/Component")},351:t=>{"use strict";t.exports=flarum.reg.get("core","common/app")},645:t=>{"use strict";t.exports=flarum.reg.get("core","common/components/Button")},44:t=>{"use strict";t.exports=flarum.reg.get("core","common/components/FormModal")},678:t=>{"use strict";t.exports=flarum.reg.get("core","common/components/Link")},149:t=>{"use strict";t.exports=flarum.reg.get("core","common/components/LoadingIndicator")},291:t=>{"use strict";t.exports=flarum.reg.get("core","common/helpers/highlight")},679:t=>{"use strict";t.exports=flarum.reg.get("core","common/helpers/textContrastClass")},657:t=>{"use strict";t.exports=flarum.reg.get("core","common/utils/KeyboardNavigatable")},636:t=>{"use strict";t.exports=flarum.reg.get("core","common/utils/Stream")},836:t=>{"use strict";t.exports=flarum.reg.get("core","common/utils/classList")},780:t=>{"use strict";t.exports=flarum.reg.get("core","common/utils/extract")},596:t=>{"use strict";t.exports=flarum.reg.get("core","common/utils/extractText")},892:t=>{"use strict";t.exports=flarum.reg.get("core","forum/app")},232:t=>{"use strict";t.exports=flarum.reg.get("core","forum/components/DiscussionPage")},905:(t,e,s)=>{"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function a(t,e,s){return(e=function(t){var e=function(t,e){if("object"!==r(t)||null===t)return t;var s=t[Symbol.toPrimitive];if(void 0!==s){var a=s.call(t,e);if("object"!==r(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t,"string");return"symbol"===r(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:s,enumerable:!0,configurable:!0,writable:!0}):t[e]=s,t}s.d(e,{Z:()=>a})}},r={};function a(t){var e=r[t];if(void 0!==e)return e.exports;var o=r[t]={exports:{}};return s[t](o,o.exports,a),o.exports}a.m=s,a.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return a.d(e,{a:e}),e},a.d=(t,e)=>{for(var s in e)a.o(e,s)&&!a.o(t,s)&&Object.defineProperty(t,s,{enumerable:!0,get:e[s]})},a.f={},a.e=t=>Promise.all(Object.keys(a.f).reduce(((e,s)=>(a.f[s](t,e),e)),[])),a.u=t=>"forum/components/TagDiscussionModal.js",a.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),a.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),t={},e="module.exports:",a.l=(s,r,o,n)=>{if(t[s])t[s].push(r);else{var i,l;if(void 0!==o)for(var c=document.getElementsByTagName("script"),u=0;u{i.onerror=i.onload=null,clearTimeout(g);var a=t[s];if(delete t[s],i.parentNode&&i.parentNode.removeChild(i),a&&a.forEach((t=>t(r))),e)return e(r)},g=setTimeout(d.bind(null,void 0,{type:"timeout",target:i}),12e4);i.onerror=d.bind(null,i.onerror),i.onload=d.bind(null,i.onload),l&&document.head.appendChild(i)}},a.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},(()=>{var t;a.g.importScripts&&(t=a.g.location+"");var e=a.g.document;if(!t&&e&&(e.currentScript&&(t=e.currentScript.src),!t)){var s=e.getElementsByTagName("script");s.length&&(t=s[s.length-1].src)}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),a.p=t})(),a.f.compat=(t,e)=>{const s=a.l;a.l=flarum.reg.loadChunk.bind(flarum.reg,s)},(()=>{var t={315:0};a.f.j=(e,s)=>{var r=a.o(t,e)?t[e]:void 0;if(0!==r)if(r)s.push(r[2]);else{var o=new Promise(((s,a)=>r=t[e]=[s,a]));s.push(r[2]=o);var n=a.p+a.u(e),i=new Error;a.l(n,(s=>{if(a.o(t,e)&&(0!==(r=t[e])&&(t[e]=void 0),r)){var o=s&&("load"===s.type?"missing":s.type),n=s&&s.target&&s.target.src;i.message="Loading chunk "+e+" failed.\n("+o+": "+n+")",i.name="ChunkLoadError",i.type=o,i.request=n,r[1](i)}}),"chunk-"+e,e)}};var e=(e,s)=>{var r,o,[n,i,l]=s,c=0;if(n.some((e=>0!==t[e]))){for(r in i)a.o(i,r)&&(a.m[r]=i[r]);l&&l(a)}for(e&&e(s);c{"use strict";a.r(o),a.d(o,{extend:()=>s.l});var t=a(270),e={};for(const s in t)"default"!==s&&(e[s]=()=>t[s]);a.d(o,e);var s=a(664)})(),module.exports=o})(); +(()=>{var t,e,s={974:(t,e,s)=>{"use strict";s.d(e,{Z:()=>o});var r=s(836),a=s.n(r);function o(t,e,s){void 0===e&&(e={}),void 0===s&&(s={});const r=t&&t.icon(),{useColor:o=!0}=s;return e.className=a()([e.className,"icon text-colored",r?t.icon():"TagIcon"]),t&&o?(e.style=e.style||{},e.style["--color"]=t.color()):t||(e.className+=" untagged"),r?m("i",e):m("span",e)}flarum.reg.add("flarum-tags","common/helpers/tagIcon",o)},924:(t,e,s)=>{"use strict";s.d(e,{Z:()=>g});var r=s(780),a=s.n(r),o=s(678),n=s.n(o),i=s(836),l=s.n(i),c=s(679),u=s.n(c),d=s(974);function g(t,e){void 0===e&&(e={}),e.style=e.style||{},e.className="TagLabel "+(e.className||"");const s=a()(e,"link"),r=t?t.name():app.translator.trans("flarum-tags.lib.deleted_tag_text");if(t){const r=t.color();r&&(e.style["--tag-bg"]=r,e.className=l()(e.className,"colored",u()(r))),s&&(e.title=t.description()||"",e.href=app.route("tag",{tags:t.slug()})),t.isChild()&&(e.className+=" TagLabel--child")}else e.className+=" untagged";return m(s?n():"span",e,m("span",{className:"TagLabel-text"},t&&t.icon()&&(0,d.Z)(t,{className:"TagLabel-icon"},{useColor:!1}),m("span",{className:"TagLabel-name"},r)))}flarum.reg.add("flarum-tags","common/helpers/tagLabel",g)},270:()=>{},648:(t,e,s)=>{"use strict";function r(t){return t.slice(0).sort(((t,e)=>{const s=t.position(),r=e.position();if(null===s&&null===r)return e.discussionCount()-t.discussionCount();if(null===r)return-1;if(null===s)return 1;const a=t.parent(),o=e.parent();return a===o?s-r:a&&o?a.position()-o.position():a?a===e?1:a.position()-r:o?o===t?-1:s-o.position():0}))}s.d(e,{Z:()=>r}),flarum.reg.add("flarum-tags","common/utils/sortTags",r)},664:(t,e,s)=>{"use strict";s.d(e,{l:()=>Nt});var r=s(892),a=s.n(r),o=s(905),n=s(351),i=s.n(n);class l{constructor(){(0,o.Z)(this,"loadedIncludes",void 0)}async load(t){if(void 0===t&&(t=[]),!this.loadedIncludes)return this.query(t);const e=t.filter((t=>!this.loadedIncludes.has(t)));return 0===e.length?Promise.resolve(i().store.all("tags")):this.query(e)}async query(t){return void 0===t&&(t=[]),null!=this.loadedIncludes||(this.loadedIncludes=new Set),i().store.find("tags",{include:t.join(",")}).then((e=>{const s=Array.isArray(e)?e:[e];return t.forEach((t=>this.loadedIncludes.add(t))),s}))}}flarum.reg.add("flarum-tags","common/states/TagListState",l);const c=flarum.reg.get("core","common/extend"),u=flarum.reg.get("core","forum/components/IndexSidebar");var d=s.n(u);const g=flarum.reg.get("core","common/components/Separator");var f=s.n(g);const p=flarum.reg.get("core","common/components/LinkButton");var h=s.n(p),b=s(678),v=s.n(b),T=s(836),y=s.n(T),x=s(974);class N extends(h()){view(t){const e=this.attrs.model,s=e&&e.description(),r=y()("TagLinkButton hasIcon",{child:e.isChild()},this.attrs.className);return m(v(),{className:r,href:this.attrs.route,style:e?{"--color":e.color()}:void 0,title:s||void 0},(0,x.Z)(e,{className:"Button-icon"}),m("span",{className:"Button-label"},e?e.name():app.translator.trans("flarum-tags.forum.index.untagged_link")))}static initAttrs(t){super.initAttrs(t);const e=t.model;t.params.tags=e?e.slug():"untagged",t.route=app.route("tag",t.params)}}flarum.reg.add("flarum-tags","forum/components/TagLinkButton",N);const w=flarum.reg.get("core","common/components/Page");var _=s.n(w);const C=flarum.reg.get("core","forum/components/PageStructure");var k=s.n(C);const P=flarum.reg.get("core","forum/components/WelcomeHero");var S=s.n(P),A=s(149),D=s.n(A);const L=flarum.reg.get("core","common/utils/ItemList");var I=s.n(L);const Z=flarum.reg.get("core","common/helpers/humanTime");var M=s.n(Z),j=s(679),E=s.n(j),B=s(596),V=s.n(B),H=s(924),O=s(648);class R extends(_()){constructor(){super(...arguments),(0,o.Z)(this,"tags",void 0),(0,o.Z)(this,"loading",void 0)}oninit(t){super.oninit(t),a().history.push("tags",V()(a().translator.trans("flarum-tags.forum.header.back_to_tags_tooltip"))),this.tags=[];const e=a().preloadedApiDocument();e?this.tags=(0,O.Z)(e.filter((t=>!t.isChild()))):(this.loading=!0,a().tagList.load(["children","lastPostedDiscussion","parent"]).then((()=>{this.tags=(0,O.Z)(a().store.all("tags").filter((t=>!t.isChild()))),this.loading=!1,m.redraw()})))}oncreate(t){super.oncreate(t),a().setTitle(V()(a().translator.trans("flarum-tags.forum.all_tags.meta_title_text"))),a().setTitleCount(0)}view(){return m(k(),{className:"TagsPage",hero:this.hero.bind(this),sidebar:this.sidebar.bind(this)},this.contentItems().toArray())}contentItems(){const t=new(I());if(this.loading)t.add("loading",m(D(),null));else{const e=this.tags.filter((t=>null!==t.position())),s=this.tags.filter((t=>null===t.position()));t.add("tagTiles",this.tagTileListView(e),100),s.length&&t.add("cloud",this.cloudView(s),10)}return t}hero(){return m(S(),null)}sidebar(){return m(d(),null)}tagTileListView(t){return m("ul",{className:"TagTiles"},t.map(this.tagTileView.bind(this)))}tagTileView(t){const e=t.lastPostedDiscussion(),s=(0,O.Z)(t.children()||[]);return m("li",{className:y()("TagTile",{colored:t.color()},E()(t.color())),style:{"--tag-bg":t.color()}},m(v(),{className:"TagTile-info",href:a().route.tag(t)},m("div",{className:"TagTile-heading"},t.icon()&&(0,x.Z)(t,{},{useColor:!1}),m("h3",{className:"TagTile-name"},t.name())),m("p",{className:"TagTile-description"},t.description()),!!s&&m("div",{className:"TagTile-children"},s.map((t=>[m(v(),{href:a().route.tag(t)},t.name())," "])))),e?m(v(),{className:"TagTile-lastPostedDiscussion",href:a().route.discussion(e,e.lastPostNumber())},m("span",{className:"TagTile-lastPostedDiscussion-title"},e.title()),M()(e.lastPostedAt())):m("span",{className:"TagTile-lastPostedDiscussion"}))}cloudView(t){return m("div",{className:"TagCloud"},t.map((t=>[(0,H.Z)(t,{link:!0})," "])))}}flarum.reg.add("flarum-tags","forum/components/TagsPage",R);const q=flarum.reg.get("core","forum/components/IndexPage");var G=s.n(q);const F=flarum.reg.get("core","forum/states/DiscussionListState");var K=s.n(F);const $=flarum.reg.get("core","forum/states/GlobalSearchState");var U=s.n($),z=s(433),W=s.n(z);class J extends(W()){view(){const t=this.attrs.model,e=t.color();return m("header",{className:y()("Hero","TagHero",{"TagHero--colored":e,[E()(e)]:e}),style:e?{"--hero-bg":e}:void 0},m("div",{className:"container"},m("div",{className:"containerNarrow"},m("h1",{className:"Hero-title"},t.icon()&&(0,x.Z)(t,{},{useColor:!1})," ",t.name()),m("div",{className:"Hero-subtitle"},t.description()))))}}flarum.reg.add("flarum-tags","forum/components/TagHero",J);const Q=t=>a().store.all("tags").find((e=>0===e.slug().localeCompare(t,void 0,{sensitivity:"base"}))),X=flarum.reg.get("core","forum/components/DiscussionListItem");var Y=s.n(X);const tt=flarum.reg.get("core","forum/components/DiscussionHero");var et=s.n(tt);function st(t,e){void 0===e&&(e={});const s=[],{link:r,...a}=e;return a.className=y()("TagsLabel",a.className),t?(0,O.Z)(t).forEach((e=>{(e||1===t.length)&&s.push((0,H.Z)(e,{link:r}))})):s.push((0,H.Z)()),m("span",a,s)}s(780),flarum.reg.add("flarum-tags","common/helpers/tagsLabel",st);const rt=flarum.reg.get("core","forum/utils/DiscussionControls");var at=s.n(rt),ot=s(645),nt=s.n(ot);flarum.reg.addChunkModule("642","884","flarum-tags","forum/components/TagDiscussionModal"),flarum.reg.addChunkModule("642","884","flarum-tags","common/components/TagSelectionModal"),flarum.reg.addChunkModule("642","884","flarum-tags","forum/components/ToggleButton");var it=s(490);const lt=flarum.reg.get("core","common/extenders");var ct=s.n(lt);const ut=flarum.reg.get("core","common/models/Discussion");var mt=s.n(ut);const dt=flarum.reg.get("core","forum/components/EventPost");var gt=s.n(dt);class ft extends(gt()){static initAttrs(t){super.initAttrs(t);const e=t.post.content()[0],s=t.post.content()[1];function r(t,e){return t.filter((t=>-1===e.indexOf(t))).map((t=>app.store.getById("tags",t)))}t.tagsAdded=r(s,e),t.tagsRemoved=r(e,s)}icon(){return"fas fa-tag"}descriptionKey(){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"}descriptionData(){const t={};return this.attrs.tagsAdded.length&&(t.tagsAdded=app.translator.trans("flarum-tags.forum.post_stream.tags_text",{tags:st(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:st(this.attrs.tagsRemoved,{link:!0}),count:this.attrs.tagsRemoved.length})),t}}flarum.reg.add("flarum-tags","forum/components/DiscussionTaggedPost",ft);const pt=flarum.reg.get("core","common/utils/computed");var ht=s.n(pt);const bt=flarum.reg.get("core","common/Model");var vt=s.n(bt);class Tt extends(vt()){name(){return vt().attribute("name").call(this)}slug(){return vt().attribute("slug").call(this)}description(){return vt().attribute("description").call(this)}color(){return vt().attribute("color").call(this)}backgroundUrl(){return vt().attribute("backgroundUrl").call(this)}backgroundMode(){return vt().attribute("backgroundMode").call(this)}icon(){return vt().attribute("icon").call(this)}position(){return vt().attribute("position").call(this)}parent(){return vt().hasOne("parent").call(this)}children(){return vt().hasMany("children").call(this)}defaultSort(){return vt().attribute("defaultSort").call(this)}isChild(){return vt().attribute("isChild").call(this)}isHidden(){return vt().attribute("isHidden").call(this)}isPrimary(){return vt().attribute("isPrimary").call(this)}discussionCount(){return vt().attribute("discussionCount").call(this)}lastPostedAt(){return vt().attribute("lastPostedAt",vt().transformDate).call(this)}lastPostedDiscussion(){return vt().hasOne("lastPostedDiscussion").call(this)}isRestricted(){return vt().attribute("isRestricted").call(this)}canStartDiscussion(){return vt().attribute("canStartDiscussion").call(this)}canAddToDiscussion(){return vt().attribute("canAddToDiscussion").call(this)}isPrimaryParent(){return ht()("position","parent",((t,e)=>null!==t&&!1===e)).call(this)}}flarum.reg.add("flarum-tags","common/models/Tag",Tt);const yt=flarum.reg.get("core","common/query/IGambit");class xt extends yt.KeyValueGambit{constructor(){super(...arguments),(0,o.Z)(this,"predicates",!0)}key(){return i().translator.trans("flarum-tags.lib.gambits.discussions.tag.key",{},!0)}hint(){return i().translator.trans("flarum-tags.lib.gambits.discussions.tag.hint",{},!0)}filterKey(){return"tag"}gambitValueToFilterValue(t){return[t]}fromFilter(t,e){let s=[];return Array.isArray(t)?(s=t.map((t=>this.fromFilter(t.toString(),e))),s.join(" ")):"".concat(e?"-":"").concat(this.key(),":").concat(this.filterValueToGambitValue(t))}filterValueToGambitValue(t){return t}}flarum.reg.add("flarum-tags","common/query/discussions/TagGambit",xt);const Nt=[(new(ct().Store)).add("tags",Tt),(new(ct().Search)).gambit("discussions",xt),(new(ct().Routes)).add("tags","/tags",R).add("tag","/t/:tags",G()).helper("tag",(t=>a().route("tag",{tags:t.slug()}))),(new(ct().PostTypes)).add("discussionTagged",ft),new(ct().Model)(mt()).hasMany("tags").attribute("canTag")];a().initializers.add("flarum-tags",(()=>{a().tagList=new l,(0,c.extend)(d().prototype,"navItems",(function(t){if(t.add("tags",m(h(),{icon:"fas fa-th-large",href:a().route("tags")},a().translator.trans("flarum-tags.forum.index.tags_link")),-10),a().current.matches(R))return;t.add("separator",m(f(),null),-12);const e=a().search.state.stickyParams(),s=a().store.all("tags"),r=a().currentTag(),o=s=>{let a=r===s;!a&&r&&(a=r.parent()===s),t.add("tag"+s.id(),m(N,{model:s,params:e,active:a},null==s?void 0:s.name()),-14)};(0,O.Z)(s).filter((t=>null!==t.position()&&(!t.isChild()||r&&(t.parent()===r||t.parent()===r.parent())))).forEach(o);const n=s.filter((t=>null===t.position())).sort(((t,e)=>e.discussionCount()-t.discussionCount()));n.splice(0,3).forEach(o),n.length&&t.add("moreTags",m(h(),{href:a().route("tags")},a().translator.trans("flarum-tags.forum.index.more_link")),-16)})),a().currentTag=function(t){if(this.currentActiveTag&&!t)return this.currentActiveTag;const e=this.search.state.params().tags;let s=null;if(e&&(s=Q(e)),e&&!s||s&&!s.isChild()&&!s.children()){if(this.currentTagLoading)return;this.currentTagLoading=!0,this.store.find("tags",e,{include:"children,children.parent,parent"}).then((()=>{this.currentActiveTag=Q(e),m.redraw()})).finally((()=>{this.currentTagLoading=!1}))}if(s)return this.currentActiveTag=s,this.currentActiveTag;this.currentActiveTag=void 0},(0,c.extend)(G().prototype,"view",(function(t){a().currentTag(!0)})),(0,c.override)(G().prototype,"hero",(function(t){const e=a().currentTag();return e?m(J,{model:e}):t()})),(0,c.extend)(G().prototype,"view",(function(t){const e=a().currentTag();e&&(t.attrs.className+=" IndexPage--tag"+e.id())})),(0,c.extend)(G().prototype,"setTitle",(function(){const t=a().currentTag();t&&a().setTitle(t.name())})),(0,c.extend)(d().prototype,"items",(function(t){const e=a().currentTag();if(e){const s=e.color(),r=e.canStartDiscussion()||!a().session.user,o=t.get("newDiscussion");s&&(o.attrs.className=y()([o.attrs.className,"Button--tagColored",E()(s)]),o.attrs.style={"--color":s}),o.attrs.disabled=!r,o.children=a().translator.trans(r?"core.forum.index.start_discussion_button":"core.forum.index.cannot_start_discussion_button")}})),(0,c.extend)(U().prototype,"params",(function(t){t.tags=m.route.param("tags")})),(0,c.extend)(K().prototype,"requestParams",(function(t){var e;"string"==typeof t.include?t.include=[t.include]:null==(e=t.include)||e.push("tags","tags.parent"),this.params.tags&&(t.filter||(t.filter={}),t.filter.tag=this.params.tags)})),(0,c.extend)(Y().prototype,"infoItems",(function(t){const e=this.attrs.discussion.tags();e&&e.length&&t.add("tags",st(e),10)})),(0,c.extend)(et().prototype,"view",(function(t){const e=(0,O.Z)(this.attrs.discussion.tags());if(e&&e.length){const s=e[0].color();s&&(t.attrs.style={"--hero-bg":s},t.attrs.className=y()(t.attrs.className,"DiscussionHero--colored",E()(s)))}})),(0,c.extend)(et().prototype,"items",(function(t){const e=this.attrs.discussion.tags();e&&e.length&&t.add("tags",st(e,{link:!0}),5)})),(0,c.extend)(at(),"moderationControls",(function(t,e){e.canTag()&&t.add("tags",m(nt(),{icon:"fas fa-tag",onclick:()=>app.modal.show((()=>s.e(642).then(s.bind(s,884))),{discussion:e})},app.translator.trans("flarum-tags.forum.discussion_controls.edit_tags_button")))})),(0,c.extend)(d().prototype,"newDiscussionAction",(function(t){const e=a().currentTag();if(e){const s=e.parent(),r=s?[s,e]:[e];t.then((t=>t.fields.tags=r))}else a().composer.fields.tags=[]})),(0,c.extend)("flarum/forum/components/DiscussionComposer","oninit",(function(){a().tagList.load(["parent"]).then((()=>m.redraw())),this.constructor.prototype.chooseTags=function(){(0,it.Z)().length&&a().modal.show((()=>s.e(642).then(s.bind(s,884))),{selectedTags:(this.composer.fields.tags||[]).slice(0),onsubmit:t=>{this.composer.fields.tags=t,this.$("textarea").focus()}})}})),(0,c.extend)("flarum/forum/components/DiscussionComposer","headerItems",(function(t){const e=this.composer.fields.tags||[],s=(0,it.Z)();t.add("tags",m(nt(),{className:y()(["DiscussionComposer-changeTags","Button Button--ua-reset",!s.length&&"disabled"]),onclick:this.chooseTags.bind(this)},e.length?st(e):m("span",{className:"TagLabel untagged"},a().translator.trans("flarum-tags.forum.composer_discussion.choose_tags_link"))),10)})),(0,c.override)("flarum/forum/components/DiscussionComposer","onsubmit",(function(t){const e=this.composer.fields.tags||[],r=e.filter((t=>null!==t.position()&&!t.isChild())),o=e.filter((t=>null===t.position())),n=(0,it.Z)(),i=parseInt(a().forum.attribute("minPrimaryTags")),l=parseInt(a().forum.attribute("minSecondaryTags")),c=parseInt(a().forum.attribute("maxPrimaryTags")),u=parseInt(a().forum.attribute("maxSecondaryTags"));(!e.length&&0!==c&&0!==u||r.lengths.e(642).then(s.bind(s,884))),{selectedTags:e,onsubmit:e=>{this.composer.fields.tags=e,t()}}):t()})),(0,c.extend)("flarum/forum/components/DiscussionComposer","data",(function(t){t.relationships=t.relationships||{},t.relationships.tags=this.composer.fields.tags}))}))},490:(t,e,s)=>{"use strict";function r(t){let e=app.store.all("tags");if(t){const s=t.tags()||[];e=e.filter((t=>t.canAddToDiscussion()||s.includes(t)))}else e=e.filter((t=>t.canStartDiscussion()));return e}s.d(e,{Z:()=>r}),flarum.reg.add("flarum-tags","forum/utils/getSelectableTags",r)},433:t=>{"use strict";t.exports=flarum.reg.get("core","common/Component")},351:t=>{"use strict";t.exports=flarum.reg.get("core","common/app")},645:t=>{"use strict";t.exports=flarum.reg.get("core","common/components/Button")},44:t=>{"use strict";t.exports=flarum.reg.get("core","common/components/FormModal")},678:t=>{"use strict";t.exports=flarum.reg.get("core","common/components/Link")},149:t=>{"use strict";t.exports=flarum.reg.get("core","common/components/LoadingIndicator")},291:t=>{"use strict";t.exports=flarum.reg.get("core","common/helpers/highlight")},679:t=>{"use strict";t.exports=flarum.reg.get("core","common/helpers/textContrastClass")},657:t=>{"use strict";t.exports=flarum.reg.get("core","common/utils/KeyboardNavigatable")},636:t=>{"use strict";t.exports=flarum.reg.get("core","common/utils/Stream")},836:t=>{"use strict";t.exports=flarum.reg.get("core","common/utils/classList")},780:t=>{"use strict";t.exports=flarum.reg.get("core","common/utils/extract")},596:t=>{"use strict";t.exports=flarum.reg.get("core","common/utils/extractText")},892:t=>{"use strict";t.exports=flarum.reg.get("core","forum/app")},232:t=>{"use strict";t.exports=flarum.reg.get("core","forum/components/DiscussionPage")},905:(t,e,s)=>{"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function a(t,e,s){return(e=function(t){var e=function(t,e){if("object"!==r(t)||null===t)return t;var s=t[Symbol.toPrimitive];if(void 0!==s){var a=s.call(t,e);if("object"!==r(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t,"string");return"symbol"===r(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:s,enumerable:!0,configurable:!0,writable:!0}):t[e]=s,t}s.d(e,{Z:()=>a})}},r={};function a(t){var e=r[t];if(void 0!==e)return e.exports;var o=r[t]={exports:{}};return s[t](o,o.exports,a),o.exports}a.m=s,a.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return a.d(e,{a:e}),e},a.d=(t,e)=>{for(var s in e)a.o(e,s)&&!a.o(t,s)&&Object.defineProperty(t,s,{enumerable:!0,get:e[s]})},a.f={},a.e=t=>Promise.all(Object.keys(a.f).reduce(((e,s)=>(a.f[s](t,e),e)),[])),a.u=t=>"forum/components/TagDiscussionModal.js",a.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),a.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),t={},e="module.exports:",a.l=(s,r,o,n)=>{if(t[s])t[s].push(r);else{var i,l;if(void 0!==o)for(var c=document.getElementsByTagName("script"),u=0;u{i.onerror=i.onload=null,clearTimeout(g);var a=t[s];if(delete t[s],i.parentNode&&i.parentNode.removeChild(i),a&&a.forEach((t=>t(r))),e)return e(r)},g=setTimeout(d.bind(null,void 0,{type:"timeout",target:i}),12e4);i.onerror=d.bind(null,i.onerror),i.onload=d.bind(null,i.onload),l&&document.head.appendChild(i)}},a.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},(()=>{var t;a.g.importScripts&&(t=a.g.location+"");var e=a.g.document;if(!t&&e&&(e.currentScript&&(t=e.currentScript.src),!t)){var s=e.getElementsByTagName("script");s.length&&(t=s[s.length-1].src)}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),a.p=t})(),a.f.compat=(t,e)=>{const s=a.l;a.l=flarum.reg.loadChunk.bind(flarum.reg,s)},(()=>{var t={315:0};a.f.j=(e,s)=>{var r=a.o(t,e)?t[e]:void 0;if(0!==r)if(r)s.push(r[2]);else{var o=new Promise(((s,a)=>r=t[e]=[s,a]));s.push(r[2]=o);var n=a.p+a.u(e),i=new Error;a.l(n,(s=>{if(a.o(t,e)&&(0!==(r=t[e])&&(t[e]=void 0),r)){var o=s&&("load"===s.type?"missing":s.type),n=s&&s.target&&s.target.src;i.message="Loading chunk "+e+" failed.\n("+o+": "+n+")",i.name="ChunkLoadError",i.type=o,i.request=n,r[1](i)}}),"chunk-"+e,e)}};var e=(e,s)=>{var r,o,[n,i,l]=s,c=0;if(n.some((e=>0!==t[e]))){for(r in i)a.o(i,r)&&(a.m[r]=i[r]);l&&l(a)}for(e&&e(s);c{"use strict";a.r(o),a.d(o,{extend:()=>s.l});var t=a(270),e={};for(const s in t)"default"!==s&&(e[s]=()=>t[s]);a.d(o,e);var s=a(664)})(),module.exports=o})(); //# 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 9d10560ba..4709a77d5 100644 --- a/extensions/tags/js/dist/forum.js.map +++ b/extensions/tags/js/dist/forum.js.map @@ -1 +1 @@ -{"version":3,"file":"forum.js","mappings":"UAAIA,EACAC,E,qECAW,SAASC,EAAQC,EAAKC,EAAOC,QAC5B,IAAVD,IACFA,EAAQ,CAAC,QAEM,IAAbC,IACFA,EAAW,CAAC,GAEd,MAAMC,EAAUH,GAAOA,EAAII,QACrB,SACJC,GAAW,GACTH,EAQJ,OAPAD,EAAMK,UAAY,IAAU,CAACL,EAAMK,UAAW,oBAAqBH,EAAUH,EAAII,OAAS,YACtFJ,GAAOK,GACTJ,EAAMM,MAAQN,EAAMM,OAAS,CAAC,EAC9BN,EAAMM,MAAM,WAAaP,EAAIQ,SACnBR,IACVC,EAAMK,WAAa,aAEdH,EAAUM,EAAE,IAAKR,GAASQ,EAAE,OAAQR,EAC7C,CACAS,OAAOC,IAAIC,IAAI,cAAe,yBAA0Bb,E,mIChBzC,SAASc,EAASb,EAAKC,QACtB,IAAVA,IACFA,EAAQ,CAAC,GAEXA,EAAMM,MAAQN,EAAMM,OAAS,CAAC,EAC9BN,EAAMK,UAAY,aAAeL,EAAMK,WAAa,IACpD,MAAMQ,EAAO,IAAQb,EAAO,QACtBc,EAAUf,EAAMA,EAAIgB,OAASC,IAAIC,WAAWC,MAAM,oCACxD,GAAInB,E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AAiBvD,IAAYuD,EAAgBvD,IACrEuD,EAAgBvD,GAAS,KAE1BuD,EAAgBvD,GAAW,CAC5B,EAIGsE,EAAqBC,KAAiC,2BAAIA,KAAiC,4BAAK,GACpGD,EAAmBhP,QAAQ0O,EAAqBtN,KAAK,KAAM,IAC3D4N,EAAmBrM,KAAO+L,EAAqBtN,KAAK,KAAM4N,EAAmBrM,KAAKvB,KAAK4N,G","sources":["webpack://@flarum/tags/webpack/runtime/load script","webpack://@flarum/tags/./src/common/helpers/tagIcon.js","webpack://@flarum/tags/./src/common/helpers/tagLabel.js","webpack://@flarum/tags/./src/common/utils/sortTags.tsx","webpack://@flarum/tags/./src/common/states/TagListState.ts","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'common/extend')\"","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'forum/components/IndexSidebar')\"","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'common/components/Separator')\"","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'common/components/LinkButton')\"","webpack://@flarum/tags/./src/forum/components/TagLinkButton.js","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'common/components/Page')\"","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'forum/components/PageStructure')\"","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'forum/components/WelcomeHero')\"","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'common/utils/ItemList')\"","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'common/helpers/humanTime')\"","webpack://@flarum/tags/./src/forum/components/TagsPage.tsx","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'forum/components/IndexPage')\"","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'forum/states/DiscussionListState')\"","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'forum/states/GlobalSearchState')\"","webpack://@flarum/tags/./src/forum/components/TagHero.js","webpack://@flarum/tags/./src/forum/addTagFilter.tsx","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'forum/components/DiscussionListItem')\"","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'forum/components/DiscussionHero')\"","webpack://@flarum/tags/./src/common/helpers/tagsLabel.js","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'forum/utils/DiscussionControls')\"","webpack://@flarum/tags/./src/forum/addTagControl.js","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'common/extenders')\"","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'common/models/Discussion')\"","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'forum/components/EventPost')\"","webpack://@flarum/tags/./src/forum/components/DiscussionTaggedPost.js","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'common/utils/computed')\"","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'common/Model')\"","webpack://@flarum/tags/./src/common/models/Tag.ts","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'common/query/IGambit')\"","webpack://@flarum/tags/./src/common/query/discussions/TagGambit.ts","webpack://@flarum/tags/./src/common/extend.ts","webpack://@flarum/tags/./src/forum/extend.ts","webpack://@flarum/tags/./src/forum/index.ts","webpack://@flarum/tags/./src/forum/addTagList.js","webpack://@flarum/tags/./src/forum/addTagLabels.js","webpack://@flarum/tags/./src/forum/addTagComposer.js","webpack://@flarum/tags/./src/forum/utils/getSelectableTags.ts","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'common/Component')\"","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'common/app')\"","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'common/components/Button')\"","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'common/components/FormModal')\"","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'common/components/Link')\"","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'common/components/LoadingIndicator')\"","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'common/helpers/highlight')\"","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'common/helpers/textContrastClass')\"","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'common/utils/KeyboardNavigatable')\"","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'common/utils/Stream')\"","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'common/utils/classList')\"","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'common/utils/extract')\"","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'common/utils/extractText')\"","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'forum/app')\"","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'forum/components/DiscussionPage')\"","webpack://@flarum/tags/../../../js-packages/webpack-config/node_modules/@babel/runtime/helpers/esm/typeof.js","webpack://@flarum/tags/../../../js-packages/webpack-config/node_modules/@babel/runtime/helpers/esm/defineProperty.js","webpack://@flarum/tags/../../../js-packages/webpack-config/node_modules/@babel/runtime/helpers/esm/toPropertyKey.js","webpack://@flarum/tags/../../../js-packages/webpack-config/node_modules/@babel/runtime/helpers/esm/toPrimitive.js","webpack://@flarum/tags/webpack/bootstrap","webpack://@flarum/tags/webpack/runtime/compat get default export","webpack://@flarum/tags/webpack/runtime/define property getters","webpack://@flarum/tags/webpack/runtime/ensure chunk","webpack://@flarum/tags/webpack/runtime/get javascript chunk filename","webpack://@flarum/tags/webpack/runtime/global","webpack://@flarum/tags/webpack/runtime/hasOwnProperty shorthand","webpack://@flarum/tags/webpack/runtime/make namespace object","webpack://@flarum/tags/webpack/runtime/publicPath","webpack://@flarum/tags/webpack/runtime/compat","webpack://@flarum/tags/webpack/runtime/jsonp chunk loading"],"sourcesContent":["var inProgress = {};\nvar dataWebpackPrefix = \"module.exports:\";\n// loadScript function to load a script via script tag\n__webpack_require__.l = (url, done, key, chunkId) => {\n\tif(inProgress[url]) { inProgress[url].push(done); return; }\n\tvar script, needAttach;\n\tif(key !== undefined) {\n\t\tvar scripts = document.getElementsByTagName(\"script\");\n\t\tfor(var i = 0; i < scripts.length; i++) {\n\t\t\tvar s = scripts[i];\n\t\t\tif(s.getAttribute(\"src\") == url || s.getAttribute(\"data-webpack\") == dataWebpackPrefix + key) { script = s; break; }\n\t\t}\n\t}\n\tif(!script) {\n\t\tneedAttach = true;\n\t\tscript = document.createElement('script');\n\n\t\tscript.charset = 'utf-8';\n\t\tscript.timeout = 120;\n\t\tif (__webpack_require__.nc) {\n\t\t\tscript.setAttribute(\"nonce\", __webpack_require__.nc);\n\t\t}\n\t\tscript.setAttribute(\"data-webpack\", dataWebpackPrefix + key);\n\t\tscript.src = url;\n\t}\n\tinProgress[url] = [done];\n\tvar onScriptComplete = (prev, event) => {\n\t\t// avoid mem leaks in IE.\n\t\tscript.onerror = script.onload = null;\n\t\tclearTimeout(timeout);\n\t\tvar doneFns = inProgress[url];\n\t\tdelete inProgress[url];\n\t\tscript.parentNode && script.parentNode.removeChild(script);\n\t\tdoneFns && doneFns.forEach((fn) => (fn(event)));\n\t\tif(prev) return prev(event);\n\t};\n\tvar timeout = setTimeout(onScriptComplete.bind(null, undefined, { type: 'timeout', target: script }), 120000);\n\tscript.onerror = onScriptComplete.bind(null, script.onerror);\n\tscript.onload = onScriptComplete.bind(null, script.onload);\n\tneedAttach && document.head.appendChild(script);\n};","import classList from 'flarum/common/utils/classList';\nexport default function tagIcon(tag, attrs, settings) {\n if (attrs === void 0) {\n attrs = {};\n }\n if (settings === void 0) {\n settings = {};\n }\n const hasIcon = tag && tag.icon();\n const {\n useColor = true\n } = settings;\n attrs.className = classList([attrs.className, 'icon text-colored', hasIcon ? tag.icon() : 'TagIcon']);\n if (tag && useColor) {\n attrs.style = attrs.style || {};\n attrs.style['--color'] = tag.color();\n } else if (!tag) {\n attrs.className += ' untagged';\n }\n return hasIcon ? m(\"i\", attrs) : m(\"span\", attrs);\n}\nflarum.reg.add('flarum-tags', 'common/helpers/tagIcon', tagIcon);","import extract from 'flarum/common/utils/extract';\nimport Link from 'flarum/common/components/Link';\nimport classList from 'flarum/common/utils/classList';\nimport textContrastClass from 'flarum/common/helpers/textContrastClass';\nimport tagIcon from './tagIcon';\nexport default function tagLabel(tag, attrs) {\n if (attrs === void 0) {\n attrs = {};\n }\n attrs.style = attrs.style || {};\n attrs.className = 'TagLabel ' + (attrs.className || '');\n const link = extract(attrs, 'link');\n const tagText = tag ? tag.name() : app.translator.trans('flarum-tags.lib.deleted_tag_text');\n if (tag) {\n const color = tag.color();\n if (color) {\n attrs.style['--tag-bg'] = color;\n attrs.className = classList(attrs.className, 'colored', textContrastClass(color));\n }\n if (link) {\n attrs.title = tag.description() || '';\n attrs.href = app.route('tag', {\n tags: tag.slug()\n });\n }\n if (tag.isChild()) {\n attrs.className += ' TagLabel--child';\n }\n } else {\n attrs.className += ' untagged';\n }\n return m(link ? Link : 'span', attrs, m(\"span\", {\n className: \"TagLabel-text\"\n }, tag && tag.icon() && tagIcon(tag, {\n className: 'TagLabel-icon'\n }, {\n useColor: false\n }), m(\"span\", {\n className: \"TagLabel-name\"\n }, tagText)));\n}\nflarum.reg.add('flarum-tags', 'common/helpers/tagLabel', tagLabel);","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) 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 // If they are both child tags, then we will compare the positions of their\n // parents.\n else if (aParent && bParent) return aParent.position() - bParent.position();\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) return aParent === b ? 1 : aParent.position() - bPos;else if (bParent) return bParent === a ? -1 : aPos - bParent.position();\n return 0;\n });\n}\nflarum.reg.add('flarum-tags', 'common/utils/sortTags', sortTags);","import _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport app from 'flarum/common/app';\nexport default class TagListState {\n constructor() {\n _defineProperty(this, \"loadedIncludes\", void 0);\n }\n async load(includes) {\n if (includes === void 0) {\n includes = [];\n }\n if (!this.loadedIncludes) {\n return this.query(includes);\n }\n const unloadedIncludes = includes.filter(include => !this.loadedIncludes.has(include));\n if (unloadedIncludes.length === 0) {\n return Promise.resolve(app.store.all('tags'));\n }\n return this.query(unloadedIncludes);\n }\n async query(includes) {\n var _this$loadedIncludes;\n if (includes === void 0) {\n includes = [];\n }\n (_this$loadedIncludes = this.loadedIncludes) != null ? _this$loadedIncludes : this.loadedIncludes = new Set();\n return app.store.find('tags', {\n include: includes.join(',')\n }).then(val => {\n const tags = Array.isArray(val) ? val : [val];\n includes.forEach(include => this.loadedIncludes.add(include));\n return tags;\n });\n }\n}\nflarum.reg.add('flarum-tags', 'common/states/TagListState', TagListState);","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/extend');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/components/IndexSidebar');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/components/Separator');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/components/LinkButton');","import Link from 'flarum/common/components/Link';\nimport LinkButton from 'flarum/common/components/LinkButton';\nimport classList from 'flarum/common/utils/classList';\nimport tagIcon from '../../common/helpers/tagIcon';\nexport default class TagLinkButton extends LinkButton {\n view(vnode) {\n const tag = this.attrs.model;\n const description = tag && tag.description();\n const className = classList('TagLinkButton hasIcon', {\n child: tag.isChild()\n }, this.attrs.className);\n return m(Link, {\n className: className,\n href: this.attrs.route,\n style: tag ? {\n '--color': tag.color()\n } : undefined,\n title: description || undefined\n }, tagIcon(tag, {\n className: 'Button-icon'\n }), m(\"span\", {\n className: \"Button-label\"\n }, tag ? tag.name() : app.translator.trans('flarum-tags.forum.index.untagged_link')));\n }\n static initAttrs(attrs) {\n super.initAttrs(attrs);\n const tag = attrs.model;\n attrs.params.tags = tag ? tag.slug() : 'untagged';\n attrs.route = app.route('tag', attrs.params);\n }\n}\nflarum.reg.add('flarum-tags', 'forum/components/TagLinkButton', TagLinkButton);","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/components/Page');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/components/PageStructure');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/components/WelcomeHero');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/utils/ItemList');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/helpers/humanTime');","import _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport app from 'flarum/forum/app';\nimport Page from 'flarum/common/components/Page';\nimport PageStructure from 'flarum/forum/components/PageStructure';\nimport WelcomeHero from 'flarum/forum/components/WelcomeHero';\nimport IndexSidebar from 'flarum/forum/components/IndexSidebar';\nimport Link from 'flarum/common/components/Link';\nimport LoadingIndicator from 'flarum/common/components/LoadingIndicator';\nimport ItemList from 'flarum/common/utils/ItemList';\nimport humanTime from 'flarum/common/helpers/humanTime';\nimport textContrastClass from 'flarum/common/helpers/textContrastClass';\nimport classList from 'flarum/common/utils/classList';\nimport extractText from 'flarum/common/utils/extractText';\nimport tagIcon from '../../common/helpers/tagIcon';\nimport tagLabel from '../../common/helpers/tagLabel';\nimport sortTags from '../../common/utils/sortTags';\nexport default class TagsPage extends Page {\n constructor() {\n super(...arguments);\n _defineProperty(this, \"tags\", void 0);\n _defineProperty(this, \"loading\", void 0);\n }\n oninit(vnode) {\n super.oninit(vnode);\n app.history.push('tags', extractText(app.translator.trans('flarum-tags.forum.header.back_to_tags_tooltip')));\n this.tags = [];\n const preloaded = app.preloadedApiDocument();\n if (preloaded) {\n this.tags = sortTags(preloaded.filter(tag => !tag.isChild()));\n return;\n }\n this.loading = true;\n app.tagList.load(['children', 'lastPostedDiscussion', 'parent']).then(() => {\n this.tags = sortTags(app.store.all('tags').filter(tag => !tag.isChild()));\n this.loading = false;\n m.redraw();\n });\n }\n oncreate(vnode) {\n super.oncreate(vnode);\n app.setTitle(extractText(app.translator.trans('flarum-tags.forum.all_tags.meta_title_text')));\n app.setTitleCount(0);\n }\n view() {\n return m(PageStructure, {\n className: \"TagsPage\",\n hero: this.hero.bind(this),\n sidebar: this.sidebar.bind(this)\n }, this.contentItems().toArray());\n }\n contentItems() {\n const items = new ItemList();\n if (this.loading) {\n items.add('loading', m(LoadingIndicator, null));\n } else {\n const pinned = this.tags.filter(tag => tag.position() !== null);\n const cloud = this.tags.filter(tag => tag.position() === null);\n items.add('tagTiles', this.tagTileListView(pinned), 100);\n if (cloud.length) {\n items.add('cloud', this.cloudView(cloud), 10);\n }\n }\n return items;\n }\n hero() {\n return m(WelcomeHero, null);\n }\n sidebar() {\n return m(IndexSidebar, null);\n }\n tagTileListView(pinned) {\n return m(\"ul\", {\n className: \"TagTiles\"\n }, pinned.map(this.tagTileView.bind(this)));\n }\n tagTileView(tag) {\n const lastPostedDiscussion = tag.lastPostedDiscussion();\n const children = sortTags(tag.children() || []);\n return m(\"li\", {\n className: classList('TagTile', {\n colored: tag.color()\n }, textContrastClass(tag.color())),\n style: {\n '--tag-bg': tag.color()\n }\n }, m(Link, {\n className: \"TagTile-info\",\n href: app.route.tag(tag)\n }, m(\"div\", {\n className: \"TagTile-heading\"\n }, tag.icon() && tagIcon(tag, {}, {\n useColor: false\n }), m(\"h3\", {\n className: \"TagTile-name\"\n }, tag.name())), m(\"p\", {\n className: \"TagTile-description\"\n }, tag.description()), !!children && m(\"div\", {\n className: \"TagTile-children\"\n }, children.map(child => [m(Link, {\n href: app.route.tag(child)\n }, child.name()), ' ']))), lastPostedDiscussion ? m(Link, {\n className: \"TagTile-lastPostedDiscussion\",\n href: app.route.discussion(lastPostedDiscussion, lastPostedDiscussion.lastPostNumber())\n }, m(\"span\", {\n className: \"TagTile-lastPostedDiscussion-title\"\n }, lastPostedDiscussion.title()), humanTime(lastPostedDiscussion.lastPostedAt())) : m(\"span\", {\n className: \"TagTile-lastPostedDiscussion\"\n }));\n }\n cloudView(cloud) {\n return m(\"div\", {\n className: \"TagCloud\"\n }, cloud.map(tag => [tagLabel(tag, {\n link: true\n }), ' ']));\n }\n}\nflarum.reg.add('flarum-tags', 'forum/components/TagsPage', TagsPage);","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/components/IndexPage');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/states/DiscussionListState');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/states/GlobalSearchState');","import Component from 'flarum/common/Component';\nimport textContrastClass from 'flarum/common/helpers/textContrastClass';\nimport tagIcon from '../../common/helpers/tagIcon';\nimport classList from 'flarum/common/utils/classList';\nexport default class TagHero extends Component {\n view() {\n const tag = this.attrs.model;\n const color = tag.color();\n return m(\"header\", {\n className: classList('Hero', 'TagHero', {\n 'TagHero--colored': color,\n [textContrastClass(color)]: color\n }),\n style: color ? {\n '--hero-bg': color\n } : undefined\n }, m(\"div\", {\n className: \"container\"\n }, m(\"div\", {\n className: \"containerNarrow\"\n }, m(\"h1\", {\n className: \"Hero-title\"\n }, tag.icon() && tagIcon(tag, {}, {\n useColor: false\n }), \" \", tag.name()), m(\"div\", {\n className: \"Hero-subtitle\"\n }, tag.description()))));\n }\n}\nflarum.reg.add('flarum-tags', 'forum/components/TagHero', TagHero);","import app from 'flarum/forum/app';\nimport { extend, override } from 'flarum/common/extend';\nimport IndexPage from 'flarum/forum/components/IndexPage';\nimport IndexSidebar from 'flarum/forum/components/IndexSidebar';\nimport DiscussionListState from 'flarum/forum/states/DiscussionListState';\nimport GlobalSearchState from 'flarum/forum/states/GlobalSearchState';\nimport classList from 'flarum/common/utils/classList';\nimport textContrastClass from 'flarum/common/helpers/textContrastClass';\nimport TagHero from './components/TagHero';\nconst findTag = slug => app.store.all('tags').find(tag => tag.slug().localeCompare(slug, undefined, {\n sensitivity: 'base'\n}) === 0);\nexport default function addTagFilter() {\n app.currentTag = function (reload) {\n if (this.currentActiveTag && !reload) {\n return this.currentActiveTag;\n }\n const slug = this.search.state.params().tags;\n let tag = null;\n if (slug) {\n tag = findTag(slug);\n }\n if (slug && !tag || tag && !tag.isChild() && !tag.children()) {\n if (this.currentTagLoading) {\n return;\n }\n this.currentTagLoading = true;\n\n // Unlike the backend, no need to fetch parent.children because if we're on\n // a child tag page, then either:\n // - We loaded in that child tag (and its siblings) in the API document\n // - We first navigated to the current tag's parent, which would have loaded in the current tag's siblings.\n this.store.find('tags', slug, {\n include: 'children,children.parent,parent'\n }).then(() => {\n this.currentActiveTag = findTag(slug);\n m.redraw();\n }).finally(() => {\n this.currentTagLoading = false;\n });\n }\n if (tag) {\n this.currentActiveTag = tag;\n return this.currentActiveTag;\n }\n this.currentActiveTag = undefined;\n return;\n };\n extend(IndexPage.prototype, 'view', function (vdom) {\n app.currentTag(true);\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 = app.currentTag();\n if (tag) return m(TagHero, {\n model: tag\n });\n return original();\n });\n extend(IndexPage.prototype, 'view', function (vdom) {\n const tag = app.currentTag();\n if (tag) vdom.attrs.className += ' IndexPage--tag' + tag.id();\n });\n extend(IndexPage.prototype, 'setTitle', function () {\n const tag = app.currentTag();\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(IndexSidebar.prototype, 'items', function (items) {\n const tag = app.currentTag();\n if (tag) {\n const color = tag.color();\n const canStartDiscussion = tag.canStartDiscussion() || !app.session.user;\n const newDiscussion = items.get('newDiscussion');\n if (color) {\n newDiscussion.attrs.className = classList([newDiscussion.attrs.className, 'Button--tagColored', textContrastClass(color)]);\n newDiscussion.attrs.style = {\n '--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 if (typeof params.include === 'string') {\n params.include = [params.include];\n } else {\n var _params$include;\n (_params$include = params.include) == null ? void 0 : _params$include.push('tags', 'tags.parent');\n }\n if (this.params.tags) {\n params.filter || (params.filter = {});\n params.filter.tag = this.params.tags;\n }\n });\n}","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/components/DiscussionListItem');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/components/DiscussionHero');","import extract from 'flarum/common/utils/extract';\nimport tagLabel from './tagLabel';\nimport sortTags from '../utils/sortTags';\nimport classList from 'flarum/common/utils/classList';\nexport default function tagsLabel(tags, attrs) {\n if (attrs === void 0) {\n attrs = {};\n }\n const children = [];\n const {\n link,\n ...otherAttrs\n } = attrs;\n otherAttrs.className = classList('TagsLabel', otherAttrs.className);\n if (tags) {\n sortTags(tags).forEach(tag => {\n if (tag || tags.length === 1) {\n children.push(tagLabel(tag, {\n link\n }));\n }\n });\n } else {\n children.push(tagLabel());\n }\n return m(\"span\", otherAttrs, children);\n}\nflarum.reg.add('flarum-tags', 'common/helpers/tagsLabel', tagsLabel);","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/utils/DiscussionControls');","import { extend } from 'flarum/common/extend';\nimport DiscussionControls from 'flarum/forum/utils/DiscussionControls';\nimport Button from 'flarum/common/components/Button';\nexport default function addTagControl() {\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', m(Button, {\n icon: \"fas fa-tag\",\n onclick: () => app.modal.show(() => import(/* webpackChunkName: 'forum/components/TagDiscussionModal', webpackMode: 'lazy-once' */ './components/TagDiscussionModal'), {\n discussion\n })\n }, app.translator.trans('flarum-tags.forum.discussion_controls.edit_tags_button')));\n }\n });\n}flarum.reg.addChunkModule('642', '884', 'flarum-tags', 'forum/components/TagDiscussionModal');\nflarum.reg.addChunkModule('642', '884', 'flarum-tags', 'common/components/TagSelectionModal');\nflarum.reg.addChunkModule('642', '884', 'flarum-tags', 'forum/components/ToggleButton');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/extenders');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/models/Discussion');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/components/EventPost');","import EventPost from 'flarum/forum/components/EventPost';\nimport tagsLabel from '../../common/helpers/tagsLabel';\nexport default class DiscussionTaggedPost extends EventPost {\n static initAttrs(attrs) {\n super.initAttrs(attrs);\n const oldTags = attrs.post.content()[0];\n const newTags = attrs.post.content()[1];\n function diffTags(tags1, tags2) {\n return tags1.filter(tag => tags2.indexOf(tag) === -1).map(id => app.store.getById('tags', id));\n }\n attrs.tagsAdded = diffTags(newTags, oldTags);\n attrs.tagsRemoved = diffTags(oldTags, newTags);\n }\n icon() {\n return 'fas fa-tag';\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 return 'flarum-tags.forum.post_stream.added_tags_text';\n }\n return 'flarum-tags.forum.post_stream.removed_tags_text';\n }\n descriptionData() {\n const data = {};\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, {\n link: true\n }),\n count: this.attrs.tagsAdded.length\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, {\n link: true\n }),\n count: this.attrs.tagsRemoved.length\n });\n }\n return data;\n }\n}\nflarum.reg.add('flarum-tags', 'forum/components/DiscussionTaggedPost', DiscussionTaggedPost);","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/utils/computed');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/Model');","import computed from 'flarum/common/utils/computed';\nimport Model from 'flarum/common/Model';\nexport default class Tag extends Model {\n name() {\n return Model.attribute('name').call(this);\n }\n slug() {\n return Model.attribute('slug').call(this);\n }\n description() {\n return Model.attribute('description').call(this);\n }\n color() {\n return Model.attribute('color').call(this);\n }\n backgroundUrl() {\n return Model.attribute('backgroundUrl').call(this);\n }\n backgroundMode() {\n return Model.attribute('backgroundMode').call(this);\n }\n icon() {\n return Model.attribute('icon').call(this);\n }\n position() {\n return Model.attribute('position').call(this);\n }\n parent() {\n return Model.hasOne('parent').call(this);\n }\n children() {\n return Model.hasMany('children').call(this);\n }\n defaultSort() {\n return Model.attribute('defaultSort').call(this);\n }\n isChild() {\n return Model.attribute('isChild').call(this);\n }\n isHidden() {\n return Model.attribute('isHidden').call(this);\n }\n isPrimary() {\n return Model.attribute('isPrimary').call(this);\n }\n discussionCount() {\n return Model.attribute('discussionCount').call(this);\n }\n lastPostedAt() {\n return Model.attribute('lastPostedAt', Model.transformDate).call(this);\n }\n lastPostedDiscussion() {\n return Model.hasOne('lastPostedDiscussion').call(this);\n }\n isRestricted() {\n return Model.attribute('isRestricted').call(this);\n }\n canStartDiscussion() {\n return Model.attribute('canStartDiscussion').call(this);\n }\n canAddToDiscussion() {\n return Model.attribute('canAddToDiscussion').call(this);\n }\n isPrimaryParent() {\n return computed('position', 'parent', (position, parent) => position !== null && parent === false).call(this);\n }\n}\nflarum.reg.add('flarum-tags', 'common/models/Tag', Tag);","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/query/IGambit');","import _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport app from 'flarum/common/app';\nimport { KeyValueGambit } from 'flarum/common/query/IGambit';\nexport default class TagGambit extends KeyValueGambit {\n constructor() {\n super(...arguments);\n _defineProperty(this, \"predicates\", true);\n }\n key() {\n return app.translator.trans('flarum-tags.lib.gambits.discussions.tag.key', {}, true);\n }\n hint() {\n return app.translator.trans('flarum-tags.lib.gambits.discussions.tag.hint', {}, true);\n }\n filterKey() {\n return 'tag';\n }\n gambitValueToFilterValue(value) {\n return [value];\n }\n fromFilter(value, negate) {\n let gambits = [];\n if (Array.isArray(value)) {\n gambits = value.map(value => this.fromFilter(value.toString(), negate));\n } else {\n return \"\".concat(negate ? '-' : '').concat(this.key(), \":\").concat(this.filterValueToGambitValue(value));\n }\n return gambits.join(' ');\n }\n filterValueToGambitValue(value) {\n return value;\n }\n}\nflarum.reg.add('flarum-tags', 'common/query/discussions/TagGambit', TagGambit);","import Extend from 'flarum/common/extenders';\nimport Tag from './models/Tag';\nimport TagGambit from './query/discussions/TagGambit';\nexport default [new Extend.Store() //\n.add('tags', Tag), new Extend.Search() //\n.gambit('discussions', TagGambit)];","import app from 'flarum/forum/app';\nimport Extend from 'flarum/common/extenders';\nimport IndexPage from 'flarum/forum/components/IndexPage';\nimport Discussion from 'flarum/common/models/Discussion';\nimport DiscussionTaggedPost from './components/DiscussionTaggedPost';\nimport TagsPage from './components/TagsPage';\nimport commonExtend from '../common/extend';\nexport default [...commonExtend, new Extend.Routes() //\n.add('tags', '/tags', TagsPage) //\n.add('tag', '/t/:tags', IndexPage) //\n.helper('tag', tag => app.route('tag', {\n tags: tag.slug()\n})), new Extend.PostTypes() //\n.add('discussionTagged', DiscussionTaggedPost), new Extend.Model(Discussion) //\n.hasMany('tags') //\n.attribute('canTag')];","import app from 'flarum/forum/app';\nimport TagListState from '../common/states/TagListState';\nimport addTagList from './addTagList';\nimport addTagFilter from './addTagFilter';\nimport addTagLabels from './addTagLabels';\nimport addTagControl from './addTagControl';\nimport addTagComposer from './addTagComposer';\nexport { default as extend } from './extend';\napp.initializers.add('flarum-tags', () => {\n app.tagList = new TagListState();\n addTagList();\n addTagFilter();\n addTagLabels();\n addTagControl();\n addTagComposer();\n});\nimport './forum';","import app from 'flarum/forum/app';\nimport { extend } from 'flarum/common/extend';\nimport IndexSidebar from 'flarum/forum/components/IndexSidebar';\nimport Separator from 'flarum/common/components/Separator';\nimport LinkButton from 'flarum/common/components/LinkButton';\nimport TagLinkButton from './components/TagLinkButton';\nimport TagsPage from './components/TagsPage';\nimport sortTags from '../common/utils/sortTags';\nexport default function addTagList() {\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(IndexSidebar.prototype, 'navItems', function (items) {\n items.add('tags', m(LinkButton, {\n icon: \"fas fa-th-large\",\n href: app.route('tags')\n }, app.translator.trans('flarum-tags.forum.index.tags_link')), -10);\n if (app.current.matches(TagsPage)) return;\n items.add('separator', m(Separator, null), -12);\n const params = app.search.state.stickyParams();\n const tags = app.store.all('tags');\n const currentTag = app.currentTag();\n const addTag = tag => {\n let active = currentTag === tag;\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(), m(TagLinkButton, {\n model: tag,\n params: params,\n active: active\n }, tag == null ? void 0 : tag.name()), -14);\n };\n sortTags(tags).filter(tag => tag.position() !== null && (!tag.isChild() || currentTag && (tag.parent() === currentTag || tag.parent() === currentTag.parent()))).forEach(addTag);\n const more = tags.filter(tag => tag.position() === null).sort((a, b) => b.discussionCount() - a.discussionCount());\n more.splice(0, 3).forEach(addTag);\n if (more.length) {\n items.add('moreTags', m(LinkButton, {\n href: app.route('tags')\n }, app.translator.trans('flarum-tags.forum.index.more_link')), -16);\n }\n });\n}","import { extend } from 'flarum/common/extend';\nimport DiscussionListItem from 'flarum/forum/components/DiscussionListItem';\nimport DiscussionHero from 'flarum/forum/components/DiscussionHero';\nimport textContrastClass from 'flarum/common/helpers/textContrastClass';\nimport classList from 'flarum/common/utils/classList';\nimport tagsLabel from '../common/helpers/tagsLabel';\nimport sortTags from '../common/utils/sortTags';\nexport default function addTagLabels() {\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 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 if (tags && tags.length) {\n const color = tags[0].color();\n if (color) {\n view.attrs.style = {\n '--hero-bg': color\n };\n view.attrs.className = classList(view.attrs.className, 'DiscussionHero--colored', textContrastClass(color));\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 if (tags && tags.length) {\n items.add('tags', tagsLabel(tags, {\n link: true\n }), 5);\n }\n });\n}","import app from 'flarum/forum/app';\nimport { extend, override } from 'flarum/common/extend';\nimport IndexSidebar from 'flarum/forum/components/IndexSidebar';\nimport classList from 'flarum/common/utils/classList';\nimport tagsLabel from '../common/helpers/tagsLabel';\nimport getSelectableTags from './utils/getSelectableTags';\nexport default function addTagComposer() {\n extend(IndexSidebar.prototype, 'newDiscussionAction', function (promise) {\n // From `addTagFilter\n const tag = app.currentTag();\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 extend('flarum/forum/components/DiscussionComposer', 'oninit', function () {\n app.tagList.load(['parent']).then(() => m.redraw());\n\n // Add tag-selection abilities to the discussion composer.\n this.constructor.prototype.chooseTags = function () {\n const selectableTags = getSelectableTags();\n if (!selectableTags.length) return;\n app.modal.show(() => import(/* webpackChunkName: 'forum/components/TagDiscussionModal', webpackMode: 'lazy-once' */ './components/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\n // Add a tag-selection menu to the discussion composer's header, after the\n // title.\n extend('flarum/forum/components/DiscussionComposer', 'headerItems', function (items) {\n const tags = this.composer.fields.tags || [];\n const selectableTags = getSelectableTags();\n items.add('tags', m(\"a\", {\n className: classList(['DiscussionComposer-changeTags', !selectableTags.length && 'disabled']),\n onclick: this.chooseTags.bind(this)\n }, tags.length ? tagsLabel(tags) : m(\"span\", {\n className: \"TagLabel untagged\"\n }, app.translator.trans('flarum-tags.forum.composer_discussion.choose_tags_link'))), 10);\n });\n override('flarum/forum/components/DiscussionComposer', '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 const minPrimaryTags = parseInt(app.forum.attribute('minPrimaryTags'));\n const minSecondaryTags = parseInt(app.forum.attribute('minSecondaryTags'));\n const maxPrimaryTags = parseInt(app.forum.attribute('maxPrimaryTags'));\n const maxSecondaryTags = parseInt(app.forum.attribute('maxSecondaryTags'));\n if ((!chosenTags.length && maxPrimaryTags !== 0 && maxSecondaryTags !== 0 || chosenPrimaryTags.length < minPrimaryTags || chosenSecondaryTags.length < minSecondaryTags) && selectableTags.length) {\n app.modal.show(() => import(/* webpackChunkName: 'forum/components/TagDiscussionModal', webpackMode: 'lazy-once' */ './components/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('flarum/forum/components/DiscussionComposer', 'data', function (data) {\n data.relationships = data.relationships || {};\n data.relationships.tags = this.composer.fields.tags;\n });\n}","export default function getSelectableTags(discussion) {\n let tags = app.store.all('tags');\n if (discussion) {\n const discussionTags = discussion.tags() || [];\n tags = tags.filter(tag => tag.canAddToDiscussion() || discussionTags.includes(tag));\n } else {\n tags = tags.filter(tag => tag.canStartDiscussion());\n }\n return tags;\n}\nflarum.reg.add('flarum-tags', 'forum/utils/getSelectableTags', getSelectableTags);","module.exports = flarum.reg.get('core', 'common/Component');","module.exports = flarum.reg.get('core', 'common/app');","module.exports = flarum.reg.get('core', 'common/components/Button');","module.exports = flarum.reg.get('core', 'common/components/FormModal');","module.exports = flarum.reg.get('core', 'common/components/Link');","module.exports = flarum.reg.get('core', 'common/components/LoadingIndicator');","module.exports = flarum.reg.get('core', 'common/helpers/highlight');","module.exports = flarum.reg.get('core', 'common/helpers/textContrastClass');","module.exports = flarum.reg.get('core', 'common/utils/KeyboardNavigatable');","module.exports = flarum.reg.get('core', 'common/utils/Stream');","module.exports = flarum.reg.get('core', 'common/utils/classList');","module.exports = flarum.reg.get('core', 'common/utils/extract');","module.exports = flarum.reg.get('core', 'common/utils/extractText');","module.exports = flarum.reg.get('core', 'forum/app');","module.exports = flarum.reg.get('core', 'forum/components/DiscussionPage');","export default function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) {\n return typeof obj;\n } : function (obj) {\n return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n }, _typeof(obj);\n}","import toPropertyKey from \"./toPropertyKey.js\";\nexport default function _defineProperty(obj, key, value) {\n key = toPropertyKey(key);\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}","import _typeof from \"./typeof.js\";\nimport toPrimitive from \"./toPrimitive.js\";\nexport default function _toPropertyKey(arg) {\n var key = toPrimitive(arg, \"string\");\n return _typeof(key) === \"symbol\" ? key : String(key);\n}","import _typeof from \"./typeof.js\";\nexport default function _toPrimitive(input, hint) {\n if (_typeof(input) !== \"object\" || input === null) return input;\n var prim = input[Symbol.toPrimitive];\n if (prim !== undefined) {\n var res = prim.call(input, hint || \"default\");\n if (_typeof(res) !== \"object\") return res;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (hint === \"string\" ? String : Number)(input);\n}","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.f = {};\n// This file contains only the entry chunk.\n// The chunk loading function for additional chunks\n__webpack_require__.e = (chunkId) => {\n\treturn Promise.all(Object.keys(__webpack_require__.f).reduce((promises, key) => {\n\t\t__webpack_require__.f[key](chunkId, promises);\n\t\treturn promises;\n\t}, []));\n};","// This function allow to reference async chunks\n__webpack_require__.u = (chunkId) => {\n\t// return url for filenames based on template\n\treturn \"\" + \"forum/components/TagDiscussionModal\" + \".js\";\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","var scriptUrl;\nif (__webpack_require__.g.importScripts) scriptUrl = __webpack_require__.g.location + \"\";\nvar document = __webpack_require__.g.document;\nif (!scriptUrl && document) {\n\tif (document.currentScript)\n\t\tscriptUrl = document.currentScript.src\n\tif (!scriptUrl) {\n\t\tvar scripts = document.getElementsByTagName(\"script\");\n\t\tif(scripts.length) scriptUrl = scripts[scripts.length - 1].src\n\t}\n}\n// When supporting browsers where an automatic publicPath is not supported you must specify an output.publicPath manually via configuration\n// or pass an empty string (\"\") and set the __webpack_public_path__ variable from your code to use your own logic.\nif (!scriptUrl) throw new Error(\"Automatic publicPath is not supported in this browser\");\nscriptUrl = scriptUrl.replace(/#.*$/, \"\").replace(/\\?.*$/, \"\").replace(/\\/[^\\/]+$/, \"/\");\n__webpack_require__.p = scriptUrl;","__webpack_require__.f.compat = (chunkId, promises) => {\n\n\tconst originalLoadChunk = __webpack_require__.l;\n\t__webpack_require__.l = flarum.reg.loadChunk.bind(flarum.reg, originalLoadChunk);\n};","// no baseURI\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t315: 0\n};\n\n__webpack_require__.f.j = (chunkId, promises) => {\n\t\t// JSONP chunk loading for javascript\n\t\tvar installedChunkData = __webpack_require__.o(installedChunks, chunkId) ? installedChunks[chunkId] : undefined;\n\t\tif(installedChunkData !== 0) { // 0 means \"already installed\".\n\n\t\t\t// a Promise means \"currently loading\".\n\t\t\tif(installedChunkData) {\n\t\t\t\tpromises.push(installedChunkData[2]);\n\t\t\t} else {\n\t\t\t\tif(true) { // all chunks have JS\n\t\t\t\t\t// setup Promise in chunk cache\n\t\t\t\t\tvar promise = new Promise((resolve, reject) => (installedChunkData = installedChunks[chunkId] = [resolve, reject]));\n\t\t\t\t\tpromises.push(installedChunkData[2] = promise);\n\n\t\t\t\t\t// start chunk loading\n\t\t\t\t\tvar url = __webpack_require__.p + __webpack_require__.u(chunkId);\n\t\t\t\t\t// create error before stack unwound to get useful stacktrace later\n\t\t\t\t\tvar error = new Error();\n\t\t\t\t\tvar loadingEnded = (event) => {\n\t\t\t\t\t\tif(__webpack_require__.o(installedChunks, chunkId)) {\n\t\t\t\t\t\t\tinstalledChunkData = installedChunks[chunkId];\n\t\t\t\t\t\t\tif(installedChunkData !== 0) installedChunks[chunkId] = undefined;\n\t\t\t\t\t\t\tif(installedChunkData) {\n\t\t\t\t\t\t\t\tvar errorType = event && (event.type === 'load' ? 'missing' : event.type);\n\t\t\t\t\t\t\t\tvar realSrc = event && event.target && event.target.src;\n\t\t\t\t\t\t\t\terror.message = 'Loading chunk ' + chunkId + ' failed.\\n(' + errorType + ': ' + realSrc + ')';\n\t\t\t\t\t\t\t\terror.name = 'ChunkLoadError';\n\t\t\t\t\t\t\t\terror.type = errorType;\n\t\t\t\t\t\t\t\terror.request = realSrc;\n\t\t\t\t\t\t\t\tinstalledChunkData[1](error);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t\t__webpack_require__.l(url, loadingEnded, \"chunk-\" + chunkId, chunkId);\n\t\t\t\t} else installedChunks[chunkId] = 0;\n\t\t\t}\n\t\t}\n};\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n// no on chunks loaded\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = (parentChunkLoadingFunction, data) => {\n\tvar [chunkIds, moreModules, runtime] = data;\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tif(chunkIds.some((id) => (installedChunks[id] !== 0))) {\n\t\tfor(moduleId in moreModules) {\n\t\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t\t}\n\t\t}\n\t\tif(runtime) var result = runtime(__webpack_require__);\n\t}\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkId] = 0;\n\t}\n\n}\n\nvar chunkLoadingGlobal = self[\"webpackChunkmodule_exports\"] = self[\"webpackChunkmodule_exports\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));"],"names":["inProgress","dataWebpackPrefix","tagIcon","tag","attrs","settings","hasIcon","icon","useColor","className","style","color","m","flarum","reg","add","tagLabel","link","tagText","name","app","translator","trans","title","description","href","route","tags","slug","isChild","sortTags","slice","sort","a","b","aPos","position","bPos","discussionCount","aParent","parent","bParent","TagListState","constructor","this","async","includes","loadedIncludes","query","unloadedIncludes","filter","include","has","length","Promise","resolve","Set","join","then","val","Array","isArray","forEach","get","TagLinkButton","view","vnode","model","child","undefined","static","super","initAttrs","params","TagsPage","arguments","oninit","preloaded","loading","redraw","oncreate","hero","bind","sidebar","contentItems","toArray","items","pinned","cloud","tagTileListView","cloudView","map","tagTileView","lastPostedDiscussion","children","colored","lastPostNumber","lastPostedAt","TagHero","findTag","find","localeCompare","sensitivity","tagsLabel","otherAttrs","push","addChunkModule","DiscussionTaggedPost","oldTags","post","content","newTags","diffTags","tags1","tags2","indexOf","id","store","getById","tagsAdded","tagsRemoved","descriptionKey","descriptionData","data","count","Tag","call","backgroundUrl","backgroundMode","defaultSort","isHidden","isPrimary","isRestricted","canStartDiscussion","canAddToDiscussion","isPrimaryParent","TagGambit","KeyValueGambit","key","hint","filterKey","gambitValueToFilterValue","value","fromFilter","negate","gambits","toString","concat","filterValueToGambitValue","gambit","helper","hasMany","attribute","extend","currentTag","addTag","active","more","splice","reload","currentActiveTag","search","state","currentTagLoading","finally","vdom","override","original","newDiscussion","disabled","param","_params$include","discussion","canTag","onclick","modal","show","promise","composer","fields","prototype","chooseTags","getSelectableTags","selectedTags","onsubmit","$","focus","selectableTags","chosenTags","chosenPrimaryTags","chosenSecondaryTags","minPrimaryTags","parseInt","minSecondaryTags","maxPrimaryTags","maxSecondaryTags","relationships","all","discussionTags","module","exports","_typeof","obj","Symbol","iterator","_defineProperty","arg","input","prim","toPrimitive","res","TypeError","String","toPropertyKey","Object","defineProperty","enumerable","configurable","writable","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","n","getter","__esModule","d","definition","o","f","e","chunkId","keys","reduce","promises","u","g","globalThis","Function","window","prop","hasOwnProperty","l","url","done","script","needAttach","scripts","document","getElementsByTagName","i","s","getAttribute","createElement","charset","timeout","nc","setAttribute","src","onScriptComplete","prev","event","onerror","onload","clearTimeout","doneFns","parentNode","removeChild","fn","setTimeout","type","target","head","appendChild","r","toStringTag","scriptUrl","importScripts","location","currentScript","Error","replace","p","compat","originalLoadChunk","loadChunk","installedChunks","j","installedChunkData","reject","error","errorType","realSrc","message","request","webpackJsonpCallback","parentChunkLoadingFunction","chunkIds","moreModules","runtime","some","chunkLoadingGlobal","self"],"sourceRoot":""} \ No newline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AAgBvD,QAAWnK,GACrD4N,GAAoB,CACtB,IAAIG,EAAY9B,IAAyB,SAAfA,EAAMS,KAAkB,UAAYT,EAAMS,MAChEsB,EAAU/B,GAASA,EAAMU,QAAUV,EAAMU,OAAOb,IACpDgC,EAAMG,QAAU,iBAAmB9D,EAAU,cAAgB4D,EAAY,KAAOC,EAAU,IAC1FF,EAAMhR,KAAO,iBACbgR,EAAMpB,KAAOqB,EACbD,EAAMI,QAAUF,EAChBJ,EAAmB,GAAGE,EACvB,CACD,GAEwC,SAAW3D,EAASA,EAE/D,CACD,EAcF,IAAIgE,EAAuB,CAACC,EAA4B9K,KACvD,IAGIkG,EAAUW,GAHTkE,EAAUC,EAAaC,GAAWjL,EAGhBgI,EAAI,EAC3B,GAAG+C,EAASG,MAAMzL,GAAgC,IAAxB2K,EAAgB3K,KAAa,CACtD,IAAIyG,KAAY8E,EACZ/E,EAAoBS,EAAEsE,EAAa9E,KACrCD,EAAoBhN,EAAEiN,GAAY8E,EAAY9E,IAG7C+E,GAAsBA,EAAQhF,EAClC,CAEA,IADG6E,GAA4BA,EAA2B9K,GACrDgI,EAAI+C,EAASrP,OAAQsM,IACzBnB,EAAUkE,EAAS/C,GAChB/B,EAAoBS,EAAE0D,EAAiBvD,IAAYuD,EAAgBvD,IACrEuD,EAAgBvD,GAAS,KAE1BuD,EAAgBvD,GAAW,CAC5B,EAIGsE,EAAqBC,KAAiC,2BAAIA,KAAiC,4BAAK,GACpGD,EAAmBhP,QAAQ0O,EAAqBtN,KAAK,KAAM,IAC3D4N,EAAmBrM,KAAO+L,EAAqBtN,KAAK,KAAM4N,EAAmBrM,KAAKvB,KAAK4N,G","sources":["webpack://@flarum/tags/webpack/runtime/load script","webpack://@flarum/tags/./src/common/helpers/tagIcon.js","webpack://@flarum/tags/./src/common/helpers/tagLabel.js","webpack://@flarum/tags/./src/common/utils/sortTags.tsx","webpack://@flarum/tags/./src/common/states/TagListState.ts","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'common/extend')\"","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'forum/components/IndexSidebar')\"","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'common/components/Separator')\"","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'common/components/LinkButton')\"","webpack://@flarum/tags/./src/forum/components/TagLinkButton.js","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'common/components/Page')\"","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'forum/components/PageStructure')\"","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'forum/components/WelcomeHero')\"","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'common/utils/ItemList')\"","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'common/helpers/humanTime')\"","webpack://@flarum/tags/./src/forum/components/TagsPage.tsx","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'forum/components/IndexPage')\"","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'forum/states/DiscussionListState')\"","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'forum/states/GlobalSearchState')\"","webpack://@flarum/tags/./src/forum/components/TagHero.js","webpack://@flarum/tags/./src/forum/addTagFilter.tsx","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'forum/components/DiscussionListItem')\"","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'forum/components/DiscussionHero')\"","webpack://@flarum/tags/./src/common/helpers/tagsLabel.js","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'forum/utils/DiscussionControls')\"","webpack://@flarum/tags/./src/forum/addTagControl.js","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'common/extenders')\"","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'common/models/Discussion')\"","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'forum/components/EventPost')\"","webpack://@flarum/tags/./src/forum/components/DiscussionTaggedPost.js","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'common/utils/computed')\"","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'common/Model')\"","webpack://@flarum/tags/./src/common/models/Tag.ts","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'common/query/IGambit')\"","webpack://@flarum/tags/./src/common/query/discussions/TagGambit.ts","webpack://@flarum/tags/./src/common/extend.ts","webpack://@flarum/tags/./src/forum/extend.ts","webpack://@flarum/tags/./src/forum/index.ts","webpack://@flarum/tags/./src/forum/addTagList.js","webpack://@flarum/tags/./src/forum/addTagLabels.js","webpack://@flarum/tags/./src/forum/addTagComposer.js","webpack://@flarum/tags/./src/forum/utils/getSelectableTags.ts","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'common/Component')\"","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'common/app')\"","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'common/components/Button')\"","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'common/components/FormModal')\"","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'common/components/Link')\"","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'common/components/LoadingIndicator')\"","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'common/helpers/highlight')\"","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'common/helpers/textContrastClass')\"","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'common/utils/KeyboardNavigatable')\"","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'common/utils/Stream')\"","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'common/utils/classList')\"","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'common/utils/extract')\"","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'common/utils/extractText')\"","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'forum/app')\"","webpack://@flarum/tags/external root \"flarum.reg.get('core', 'forum/components/DiscussionPage')\"","webpack://@flarum/tags/../../../js-packages/webpack-config/node_modules/@babel/runtime/helpers/esm/typeof.js","webpack://@flarum/tags/../../../js-packages/webpack-config/node_modules/@babel/runtime/helpers/esm/defineProperty.js","webpack://@flarum/tags/../../../js-packages/webpack-config/node_modules/@babel/runtime/helpers/esm/toPropertyKey.js","webpack://@flarum/tags/../../../js-packages/webpack-config/node_modules/@babel/runtime/helpers/esm/toPrimitive.js","webpack://@flarum/tags/webpack/bootstrap","webpack://@flarum/tags/webpack/runtime/compat get default export","webpack://@flarum/tags/webpack/runtime/define property getters","webpack://@flarum/tags/webpack/runtime/ensure chunk","webpack://@flarum/tags/webpack/runtime/get javascript chunk filename","webpack://@flarum/tags/webpack/runtime/global","webpack://@flarum/tags/webpack/runtime/hasOwnProperty shorthand","webpack://@flarum/tags/webpack/runtime/make namespace object","webpack://@flarum/tags/webpack/runtime/publicPath","webpack://@flarum/tags/webpack/runtime/compat","webpack://@flarum/tags/webpack/runtime/jsonp chunk loading"],"sourcesContent":["var inProgress = {};\nvar dataWebpackPrefix = \"module.exports:\";\n// loadScript function to load a script via script tag\n__webpack_require__.l = (url, done, key, chunkId) => {\n\tif(inProgress[url]) { inProgress[url].push(done); return; }\n\tvar script, needAttach;\n\tif(key !== undefined) {\n\t\tvar scripts = document.getElementsByTagName(\"script\");\n\t\tfor(var i = 0; i < scripts.length; i++) {\n\t\t\tvar s = scripts[i];\n\t\t\tif(s.getAttribute(\"src\") == url || s.getAttribute(\"data-webpack\") == dataWebpackPrefix + key) { script = s; break; }\n\t\t}\n\t}\n\tif(!script) {\n\t\tneedAttach = true;\n\t\tscript = document.createElement('script');\n\n\t\tscript.charset = 'utf-8';\n\t\tscript.timeout = 120;\n\t\tif (__webpack_require__.nc) {\n\t\t\tscript.setAttribute(\"nonce\", __webpack_require__.nc);\n\t\t}\n\t\tscript.setAttribute(\"data-webpack\", dataWebpackPrefix + key);\n\t\tscript.src = url;\n\t}\n\tinProgress[url] = [done];\n\tvar onScriptComplete = (prev, event) => {\n\t\t// avoid mem leaks in IE.\n\t\tscript.onerror = script.onload = null;\n\t\tclearTimeout(timeout);\n\t\tvar doneFns = inProgress[url];\n\t\tdelete inProgress[url];\n\t\tscript.parentNode && script.parentNode.removeChild(script);\n\t\tdoneFns && doneFns.forEach((fn) => (fn(event)));\n\t\tif(prev) return prev(event);\n\t};\n\tvar timeout = setTimeout(onScriptComplete.bind(null, undefined, { type: 'timeout', target: script }), 120000);\n\tscript.onerror = onScriptComplete.bind(null, script.onerror);\n\tscript.onload = onScriptComplete.bind(null, script.onload);\n\tneedAttach && document.head.appendChild(script);\n};","import classList from 'flarum/common/utils/classList';\nexport default function tagIcon(tag, attrs, settings) {\n if (attrs === void 0) {\n attrs = {};\n }\n if (settings === void 0) {\n settings = {};\n }\n const hasIcon = tag && tag.icon();\n const {\n useColor = true\n } = settings;\n attrs.className = classList([attrs.className, 'icon text-colored', hasIcon ? tag.icon() : 'TagIcon']);\n if (tag && useColor) {\n attrs.style = attrs.style || {};\n attrs.style['--color'] = tag.color();\n } else if (!tag) {\n attrs.className += ' untagged';\n }\n return hasIcon ? m(\"i\", attrs) : m(\"span\", attrs);\n}\nflarum.reg.add('flarum-tags', 'common/helpers/tagIcon', tagIcon);","import extract from 'flarum/common/utils/extract';\nimport Link from 'flarum/common/components/Link';\nimport classList from 'flarum/common/utils/classList';\nimport textContrastClass from 'flarum/common/helpers/textContrastClass';\nimport tagIcon from './tagIcon';\nexport default function tagLabel(tag, attrs) {\n if (attrs === void 0) {\n attrs = {};\n }\n attrs.style = attrs.style || {};\n attrs.className = 'TagLabel ' + (attrs.className || '');\n const link = extract(attrs, 'link');\n const tagText = tag ? tag.name() : app.translator.trans('flarum-tags.lib.deleted_tag_text');\n if (tag) {\n const color = tag.color();\n if (color) {\n attrs.style['--tag-bg'] = color;\n attrs.className = classList(attrs.className, 'colored', textContrastClass(color));\n }\n if (link) {\n attrs.title = tag.description() || '';\n attrs.href = app.route('tag', {\n tags: tag.slug()\n });\n }\n if (tag.isChild()) {\n attrs.className += ' TagLabel--child';\n }\n } else {\n attrs.className += ' untagged';\n }\n return m(link ? Link : 'span', attrs, m(\"span\", {\n className: \"TagLabel-text\"\n }, tag && tag.icon() && tagIcon(tag, {\n className: 'TagLabel-icon'\n }, {\n useColor: false\n }), m(\"span\", {\n className: \"TagLabel-name\"\n }, tagText)));\n}\nflarum.reg.add('flarum-tags', 'common/helpers/tagLabel', tagLabel);","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) 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 // If they are both child tags, then we will compare the positions of their\n // parents.\n else if (aParent && bParent) return aParent.position() - bParent.position();\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) return aParent === b ? 1 : aParent.position() - bPos;else if (bParent) return bParent === a ? -1 : aPos - bParent.position();\n return 0;\n });\n}\nflarum.reg.add('flarum-tags', 'common/utils/sortTags', sortTags);","import _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport app from 'flarum/common/app';\nexport default class TagListState {\n constructor() {\n _defineProperty(this, \"loadedIncludes\", void 0);\n }\n async load(includes) {\n if (includes === void 0) {\n includes = [];\n }\n if (!this.loadedIncludes) {\n return this.query(includes);\n }\n const unloadedIncludes = includes.filter(include => !this.loadedIncludes.has(include));\n if (unloadedIncludes.length === 0) {\n return Promise.resolve(app.store.all('tags'));\n }\n return this.query(unloadedIncludes);\n }\n async query(includes) {\n var _this$loadedIncludes;\n if (includes === void 0) {\n includes = [];\n }\n (_this$loadedIncludes = this.loadedIncludes) != null ? _this$loadedIncludes : this.loadedIncludes = new Set();\n return app.store.find('tags', {\n include: includes.join(',')\n }).then(val => {\n const tags = Array.isArray(val) ? val : [val];\n includes.forEach(include => this.loadedIncludes.add(include));\n return tags;\n });\n }\n}\nflarum.reg.add('flarum-tags', 'common/states/TagListState', TagListState);","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/extend');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/components/IndexSidebar');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/components/Separator');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/components/LinkButton');","import Link from 'flarum/common/components/Link';\nimport LinkButton from 'flarum/common/components/LinkButton';\nimport classList from 'flarum/common/utils/classList';\nimport tagIcon from '../../common/helpers/tagIcon';\nexport default class TagLinkButton extends LinkButton {\n view(vnode) {\n const tag = this.attrs.model;\n const description = tag && tag.description();\n const className = classList('TagLinkButton hasIcon', {\n child: tag.isChild()\n }, this.attrs.className);\n return m(Link, {\n className: className,\n href: this.attrs.route,\n style: tag ? {\n '--color': tag.color()\n } : undefined,\n title: description || undefined\n }, tagIcon(tag, {\n className: 'Button-icon'\n }), m(\"span\", {\n className: \"Button-label\"\n }, tag ? tag.name() : app.translator.trans('flarum-tags.forum.index.untagged_link')));\n }\n static initAttrs(attrs) {\n super.initAttrs(attrs);\n const tag = attrs.model;\n attrs.params.tags = tag ? tag.slug() : 'untagged';\n attrs.route = app.route('tag', attrs.params);\n }\n}\nflarum.reg.add('flarum-tags', 'forum/components/TagLinkButton', TagLinkButton);","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/components/Page');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/components/PageStructure');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/components/WelcomeHero');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/utils/ItemList');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/helpers/humanTime');","import _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport app from 'flarum/forum/app';\nimport Page from 'flarum/common/components/Page';\nimport PageStructure from 'flarum/forum/components/PageStructure';\nimport WelcomeHero from 'flarum/forum/components/WelcomeHero';\nimport IndexSidebar from 'flarum/forum/components/IndexSidebar';\nimport Link from 'flarum/common/components/Link';\nimport LoadingIndicator from 'flarum/common/components/LoadingIndicator';\nimport ItemList from 'flarum/common/utils/ItemList';\nimport humanTime from 'flarum/common/helpers/humanTime';\nimport textContrastClass from 'flarum/common/helpers/textContrastClass';\nimport classList from 'flarum/common/utils/classList';\nimport extractText from 'flarum/common/utils/extractText';\nimport tagIcon from '../../common/helpers/tagIcon';\nimport tagLabel from '../../common/helpers/tagLabel';\nimport sortTags from '../../common/utils/sortTags';\nexport default class TagsPage extends Page {\n constructor() {\n super(...arguments);\n _defineProperty(this, \"tags\", void 0);\n _defineProperty(this, \"loading\", void 0);\n }\n oninit(vnode) {\n super.oninit(vnode);\n app.history.push('tags', extractText(app.translator.trans('flarum-tags.forum.header.back_to_tags_tooltip')));\n this.tags = [];\n const preloaded = app.preloadedApiDocument();\n if (preloaded) {\n this.tags = sortTags(preloaded.filter(tag => !tag.isChild()));\n return;\n }\n this.loading = true;\n app.tagList.load(['children', 'lastPostedDiscussion', 'parent']).then(() => {\n this.tags = sortTags(app.store.all('tags').filter(tag => !tag.isChild()));\n this.loading = false;\n m.redraw();\n });\n }\n oncreate(vnode) {\n super.oncreate(vnode);\n app.setTitle(extractText(app.translator.trans('flarum-tags.forum.all_tags.meta_title_text')));\n app.setTitleCount(0);\n }\n view() {\n return m(PageStructure, {\n className: \"TagsPage\",\n hero: this.hero.bind(this),\n sidebar: this.sidebar.bind(this)\n }, this.contentItems().toArray());\n }\n contentItems() {\n const items = new ItemList();\n if (this.loading) {\n items.add('loading', m(LoadingIndicator, null));\n } else {\n const pinned = this.tags.filter(tag => tag.position() !== null);\n const cloud = this.tags.filter(tag => tag.position() === null);\n items.add('tagTiles', this.tagTileListView(pinned), 100);\n if (cloud.length) {\n items.add('cloud', this.cloudView(cloud), 10);\n }\n }\n return items;\n }\n hero() {\n return m(WelcomeHero, null);\n }\n sidebar() {\n return m(IndexSidebar, null);\n }\n tagTileListView(pinned) {\n return m(\"ul\", {\n className: \"TagTiles\"\n }, pinned.map(this.tagTileView.bind(this)));\n }\n tagTileView(tag) {\n const lastPostedDiscussion = tag.lastPostedDiscussion();\n const children = sortTags(tag.children() || []);\n return m(\"li\", {\n className: classList('TagTile', {\n colored: tag.color()\n }, textContrastClass(tag.color())),\n style: {\n '--tag-bg': tag.color()\n }\n }, m(Link, {\n className: \"TagTile-info\",\n href: app.route.tag(tag)\n }, m(\"div\", {\n className: \"TagTile-heading\"\n }, tag.icon() && tagIcon(tag, {}, {\n useColor: false\n }), m(\"h3\", {\n className: \"TagTile-name\"\n }, tag.name())), m(\"p\", {\n className: \"TagTile-description\"\n }, tag.description()), !!children && m(\"div\", {\n className: \"TagTile-children\"\n }, children.map(child => [m(Link, {\n href: app.route.tag(child)\n }, child.name()), ' ']))), lastPostedDiscussion ? m(Link, {\n className: \"TagTile-lastPostedDiscussion\",\n href: app.route.discussion(lastPostedDiscussion, lastPostedDiscussion.lastPostNumber())\n }, m(\"span\", {\n className: \"TagTile-lastPostedDiscussion-title\"\n }, lastPostedDiscussion.title()), humanTime(lastPostedDiscussion.lastPostedAt())) : m(\"span\", {\n className: \"TagTile-lastPostedDiscussion\"\n }));\n }\n cloudView(cloud) {\n return m(\"div\", {\n className: \"TagCloud\"\n }, cloud.map(tag => [tagLabel(tag, {\n link: true\n }), ' ']));\n }\n}\nflarum.reg.add('flarum-tags', 'forum/components/TagsPage', TagsPage);","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/components/IndexPage');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/states/DiscussionListState');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/states/GlobalSearchState');","import Component from 'flarum/common/Component';\nimport textContrastClass from 'flarum/common/helpers/textContrastClass';\nimport tagIcon from '../../common/helpers/tagIcon';\nimport classList from 'flarum/common/utils/classList';\nexport default class TagHero extends Component {\n view() {\n const tag = this.attrs.model;\n const color = tag.color();\n return m(\"header\", {\n className: classList('Hero', 'TagHero', {\n 'TagHero--colored': color,\n [textContrastClass(color)]: color\n }),\n style: color ? {\n '--hero-bg': color\n } : undefined\n }, m(\"div\", {\n className: \"container\"\n }, m(\"div\", {\n className: \"containerNarrow\"\n }, m(\"h1\", {\n className: \"Hero-title\"\n }, tag.icon() && tagIcon(tag, {}, {\n useColor: false\n }), \" \", tag.name()), m(\"div\", {\n className: \"Hero-subtitle\"\n }, tag.description()))));\n }\n}\nflarum.reg.add('flarum-tags', 'forum/components/TagHero', TagHero);","import app from 'flarum/forum/app';\nimport { extend, override } from 'flarum/common/extend';\nimport IndexPage from 'flarum/forum/components/IndexPage';\nimport IndexSidebar from 'flarum/forum/components/IndexSidebar';\nimport DiscussionListState from 'flarum/forum/states/DiscussionListState';\nimport GlobalSearchState from 'flarum/forum/states/GlobalSearchState';\nimport classList from 'flarum/common/utils/classList';\nimport textContrastClass from 'flarum/common/helpers/textContrastClass';\nimport TagHero from './components/TagHero';\nconst findTag = slug => app.store.all('tags').find(tag => tag.slug().localeCompare(slug, undefined, {\n sensitivity: 'base'\n}) === 0);\nexport default function addTagFilter() {\n app.currentTag = function (reload) {\n if (this.currentActiveTag && !reload) {\n return this.currentActiveTag;\n }\n const slug = this.search.state.params().tags;\n let tag = null;\n if (slug) {\n tag = findTag(slug);\n }\n if (slug && !tag || tag && !tag.isChild() && !tag.children()) {\n if (this.currentTagLoading) {\n return;\n }\n this.currentTagLoading = true;\n\n // Unlike the backend, no need to fetch parent.children because if we're on\n // a child tag page, then either:\n // - We loaded in that child tag (and its siblings) in the API document\n // - We first navigated to the current tag's parent, which would have loaded in the current tag's siblings.\n this.store.find('tags', slug, {\n include: 'children,children.parent,parent'\n }).then(() => {\n this.currentActiveTag = findTag(slug);\n m.redraw();\n }).finally(() => {\n this.currentTagLoading = false;\n });\n }\n if (tag) {\n this.currentActiveTag = tag;\n return this.currentActiveTag;\n }\n this.currentActiveTag = undefined;\n return;\n };\n extend(IndexPage.prototype, 'view', function (vdom) {\n app.currentTag(true);\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 = app.currentTag();\n if (tag) return m(TagHero, {\n model: tag\n });\n return original();\n });\n extend(IndexPage.prototype, 'view', function (vdom) {\n const tag = app.currentTag();\n if (tag) vdom.attrs.className += ' IndexPage--tag' + tag.id();\n });\n extend(IndexPage.prototype, 'setTitle', function () {\n const tag = app.currentTag();\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(IndexSidebar.prototype, 'items', function (items) {\n const tag = app.currentTag();\n if (tag) {\n const color = tag.color();\n const canStartDiscussion = tag.canStartDiscussion() || !app.session.user;\n const newDiscussion = items.get('newDiscussion');\n if (color) {\n newDiscussion.attrs.className = classList([newDiscussion.attrs.className, 'Button--tagColored', textContrastClass(color)]);\n newDiscussion.attrs.style = {\n '--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 if (typeof params.include === 'string') {\n params.include = [params.include];\n } else {\n var _params$include;\n (_params$include = params.include) == null ? void 0 : _params$include.push('tags', 'tags.parent');\n }\n if (this.params.tags) {\n params.filter || (params.filter = {});\n params.filter.tag = this.params.tags;\n }\n });\n}","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/components/DiscussionListItem');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/components/DiscussionHero');","import extract from 'flarum/common/utils/extract';\nimport tagLabel from './tagLabel';\nimport sortTags from '../utils/sortTags';\nimport classList from 'flarum/common/utils/classList';\nexport default function tagsLabel(tags, attrs) {\n if (attrs === void 0) {\n attrs = {};\n }\n const children = [];\n const {\n link,\n ...otherAttrs\n } = attrs;\n otherAttrs.className = classList('TagsLabel', otherAttrs.className);\n if (tags) {\n sortTags(tags).forEach(tag => {\n if (tag || tags.length === 1) {\n children.push(tagLabel(tag, {\n link\n }));\n }\n });\n } else {\n children.push(tagLabel());\n }\n return m(\"span\", otherAttrs, children);\n}\nflarum.reg.add('flarum-tags', 'common/helpers/tagsLabel', tagsLabel);","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/utils/DiscussionControls');","import { extend } from 'flarum/common/extend';\nimport DiscussionControls from 'flarum/forum/utils/DiscussionControls';\nimport Button from 'flarum/common/components/Button';\nexport default function addTagControl() {\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', m(Button, {\n icon: \"fas fa-tag\",\n onclick: () => app.modal.show(() => import(/* webpackChunkName: 'forum/components/TagDiscussionModal', webpackMode: 'lazy-once' */ './components/TagDiscussionModal'), {\n discussion\n })\n }, app.translator.trans('flarum-tags.forum.discussion_controls.edit_tags_button')));\n }\n });\n}flarum.reg.addChunkModule('642', '884', 'flarum-tags', 'forum/components/TagDiscussionModal');\nflarum.reg.addChunkModule('642', '884', 'flarum-tags', 'common/components/TagSelectionModal');\nflarum.reg.addChunkModule('642', '884', 'flarum-tags', 'forum/components/ToggleButton');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/extenders');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/models/Discussion');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/components/EventPost');","import EventPost from 'flarum/forum/components/EventPost';\nimport tagsLabel from '../../common/helpers/tagsLabel';\nexport default class DiscussionTaggedPost extends EventPost {\n static initAttrs(attrs) {\n super.initAttrs(attrs);\n const oldTags = attrs.post.content()[0];\n const newTags = attrs.post.content()[1];\n function diffTags(tags1, tags2) {\n return tags1.filter(tag => tags2.indexOf(tag) === -1).map(id => app.store.getById('tags', id));\n }\n attrs.tagsAdded = diffTags(newTags, oldTags);\n attrs.tagsRemoved = diffTags(oldTags, newTags);\n }\n icon() {\n return 'fas fa-tag';\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 return 'flarum-tags.forum.post_stream.added_tags_text';\n }\n return 'flarum-tags.forum.post_stream.removed_tags_text';\n }\n descriptionData() {\n const data = {};\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, {\n link: true\n }),\n count: this.attrs.tagsAdded.length\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, {\n link: true\n }),\n count: this.attrs.tagsRemoved.length\n });\n }\n return data;\n }\n}\nflarum.reg.add('flarum-tags', 'forum/components/DiscussionTaggedPost', DiscussionTaggedPost);","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/utils/computed');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/Model');","import computed from 'flarum/common/utils/computed';\nimport Model from 'flarum/common/Model';\nexport default class Tag extends Model {\n name() {\n return Model.attribute('name').call(this);\n }\n slug() {\n return Model.attribute('slug').call(this);\n }\n description() {\n return Model.attribute('description').call(this);\n }\n color() {\n return Model.attribute('color').call(this);\n }\n backgroundUrl() {\n return Model.attribute('backgroundUrl').call(this);\n }\n backgroundMode() {\n return Model.attribute('backgroundMode').call(this);\n }\n icon() {\n return Model.attribute('icon').call(this);\n }\n position() {\n return Model.attribute('position').call(this);\n }\n parent() {\n return Model.hasOne('parent').call(this);\n }\n children() {\n return Model.hasMany('children').call(this);\n }\n defaultSort() {\n return Model.attribute('defaultSort').call(this);\n }\n isChild() {\n return Model.attribute('isChild').call(this);\n }\n isHidden() {\n return Model.attribute('isHidden').call(this);\n }\n isPrimary() {\n return Model.attribute('isPrimary').call(this);\n }\n discussionCount() {\n return Model.attribute('discussionCount').call(this);\n }\n lastPostedAt() {\n return Model.attribute('lastPostedAt', Model.transformDate).call(this);\n }\n lastPostedDiscussion() {\n return Model.hasOne('lastPostedDiscussion').call(this);\n }\n isRestricted() {\n return Model.attribute('isRestricted').call(this);\n }\n canStartDiscussion() {\n return Model.attribute('canStartDiscussion').call(this);\n }\n canAddToDiscussion() {\n return Model.attribute('canAddToDiscussion').call(this);\n }\n isPrimaryParent() {\n return computed('position', 'parent', (position, parent) => position !== null && parent === false).call(this);\n }\n}\nflarum.reg.add('flarum-tags', 'common/models/Tag', Tag);","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/query/IGambit');","import _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport app from 'flarum/common/app';\nimport { KeyValueGambit } from 'flarum/common/query/IGambit';\nexport default class TagGambit extends KeyValueGambit {\n constructor() {\n super(...arguments);\n _defineProperty(this, \"predicates\", true);\n }\n key() {\n return app.translator.trans('flarum-tags.lib.gambits.discussions.tag.key', {}, true);\n }\n hint() {\n return app.translator.trans('flarum-tags.lib.gambits.discussions.tag.hint', {}, true);\n }\n filterKey() {\n return 'tag';\n }\n gambitValueToFilterValue(value) {\n return [value];\n }\n fromFilter(value, negate) {\n let gambits = [];\n if (Array.isArray(value)) {\n gambits = value.map(value => this.fromFilter(value.toString(), negate));\n } else {\n return \"\".concat(negate ? '-' : '').concat(this.key(), \":\").concat(this.filterValueToGambitValue(value));\n }\n return gambits.join(' ');\n }\n filterValueToGambitValue(value) {\n return value;\n }\n}\nflarum.reg.add('flarum-tags', 'common/query/discussions/TagGambit', TagGambit);","import Extend from 'flarum/common/extenders';\nimport Tag from './models/Tag';\nimport TagGambit from './query/discussions/TagGambit';\nexport default [new Extend.Store() //\n.add('tags', Tag), new Extend.Search() //\n.gambit('discussions', TagGambit)];","import app from 'flarum/forum/app';\nimport Extend from 'flarum/common/extenders';\nimport IndexPage from 'flarum/forum/components/IndexPage';\nimport Discussion from 'flarum/common/models/Discussion';\nimport DiscussionTaggedPost from './components/DiscussionTaggedPost';\nimport TagsPage from './components/TagsPage';\nimport commonExtend from '../common/extend';\nexport default [...commonExtend, new Extend.Routes() //\n.add('tags', '/tags', TagsPage) //\n.add('tag', '/t/:tags', IndexPage) //\n.helper('tag', tag => app.route('tag', {\n tags: tag.slug()\n})), new Extend.PostTypes() //\n.add('discussionTagged', DiscussionTaggedPost), new Extend.Model(Discussion) //\n.hasMany('tags') //\n.attribute('canTag')];","import app from 'flarum/forum/app';\nimport TagListState from '../common/states/TagListState';\nimport addTagList from './addTagList';\nimport addTagFilter from './addTagFilter';\nimport addTagLabels from './addTagLabels';\nimport addTagControl from './addTagControl';\nimport addTagComposer from './addTagComposer';\nexport { default as extend } from './extend';\napp.initializers.add('flarum-tags', () => {\n app.tagList = new TagListState();\n addTagList();\n addTagFilter();\n addTagLabels();\n addTagControl();\n addTagComposer();\n});\nimport './forum';","import app from 'flarum/forum/app';\nimport { extend } from 'flarum/common/extend';\nimport IndexSidebar from 'flarum/forum/components/IndexSidebar';\nimport Separator from 'flarum/common/components/Separator';\nimport LinkButton from 'flarum/common/components/LinkButton';\nimport TagLinkButton from './components/TagLinkButton';\nimport TagsPage from './components/TagsPage';\nimport sortTags from '../common/utils/sortTags';\nexport default function addTagList() {\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(IndexSidebar.prototype, 'navItems', function (items) {\n items.add('tags', m(LinkButton, {\n icon: \"fas fa-th-large\",\n href: app.route('tags')\n }, app.translator.trans('flarum-tags.forum.index.tags_link')), -10);\n if (app.current.matches(TagsPage)) return;\n items.add('separator', m(Separator, null), -12);\n const params = app.search.state.stickyParams();\n const tags = app.store.all('tags');\n const currentTag = app.currentTag();\n const addTag = tag => {\n let active = currentTag === tag;\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(), m(TagLinkButton, {\n model: tag,\n params: params,\n active: active\n }, tag == null ? void 0 : tag.name()), -14);\n };\n sortTags(tags).filter(tag => tag.position() !== null && (!tag.isChild() || currentTag && (tag.parent() === currentTag || tag.parent() === currentTag.parent()))).forEach(addTag);\n const more = tags.filter(tag => tag.position() === null).sort((a, b) => b.discussionCount() - a.discussionCount());\n more.splice(0, 3).forEach(addTag);\n if (more.length) {\n items.add('moreTags', m(LinkButton, {\n href: app.route('tags')\n }, app.translator.trans('flarum-tags.forum.index.more_link')), -16);\n }\n });\n}","import { extend } from 'flarum/common/extend';\nimport DiscussionListItem from 'flarum/forum/components/DiscussionListItem';\nimport DiscussionHero from 'flarum/forum/components/DiscussionHero';\nimport textContrastClass from 'flarum/common/helpers/textContrastClass';\nimport classList from 'flarum/common/utils/classList';\nimport tagsLabel from '../common/helpers/tagsLabel';\nimport sortTags from '../common/utils/sortTags';\nexport default function addTagLabels() {\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 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 if (tags && tags.length) {\n const color = tags[0].color();\n if (color) {\n view.attrs.style = {\n '--hero-bg': color\n };\n view.attrs.className = classList(view.attrs.className, 'DiscussionHero--colored', textContrastClass(color));\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 if (tags && tags.length) {\n items.add('tags', tagsLabel(tags, {\n link: true\n }), 5);\n }\n });\n}","import app from 'flarum/forum/app';\nimport { extend, override } from 'flarum/common/extend';\nimport IndexSidebar from 'flarum/forum/components/IndexSidebar';\nimport classList from 'flarum/common/utils/classList';\nimport Button from 'flarum/common/components/Button';\nimport tagsLabel from '../common/helpers/tagsLabel';\nimport getSelectableTags from './utils/getSelectableTags';\nexport default function addTagComposer() {\n extend(IndexSidebar.prototype, 'newDiscussionAction', function (promise) {\n // From `addTagFilter\n const tag = app.currentTag();\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 extend('flarum/forum/components/DiscussionComposer', 'oninit', function () {\n app.tagList.load(['parent']).then(() => m.redraw());\n\n // Add tag-selection abilities to the discussion composer.\n this.constructor.prototype.chooseTags = function () {\n const selectableTags = getSelectableTags();\n if (!selectableTags.length) return;\n app.modal.show(() => import(/* webpackChunkName: 'forum/components/TagDiscussionModal', webpackMode: 'lazy-once' */ './components/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\n // Add a tag-selection menu to the discussion composer's header, after the\n // title.\n extend('flarum/forum/components/DiscussionComposer', 'headerItems', function (items) {\n const tags = this.composer.fields.tags || [];\n const selectableTags = getSelectableTags();\n items.add('tags', m(Button, {\n className: classList(['DiscussionComposer-changeTags', 'Button Button--ua-reset', !selectableTags.length && 'disabled']),\n onclick: this.chooseTags.bind(this)\n }, tags.length ? tagsLabel(tags) : m(\"span\", {\n className: \"TagLabel untagged\"\n }, app.translator.trans('flarum-tags.forum.composer_discussion.choose_tags_link'))), 10);\n });\n override('flarum/forum/components/DiscussionComposer', '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 const minPrimaryTags = parseInt(app.forum.attribute('minPrimaryTags'));\n const minSecondaryTags = parseInt(app.forum.attribute('minSecondaryTags'));\n const maxPrimaryTags = parseInt(app.forum.attribute('maxPrimaryTags'));\n const maxSecondaryTags = parseInt(app.forum.attribute('maxSecondaryTags'));\n if ((!chosenTags.length && maxPrimaryTags !== 0 && maxSecondaryTags !== 0 || chosenPrimaryTags.length < minPrimaryTags || chosenSecondaryTags.length < minSecondaryTags) && selectableTags.length) {\n app.modal.show(() => import(/* webpackChunkName: 'forum/components/TagDiscussionModal', webpackMode: 'lazy-once' */ './components/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('flarum/forum/components/DiscussionComposer', 'data', function (data) {\n data.relationships = data.relationships || {};\n data.relationships.tags = this.composer.fields.tags;\n });\n}","export default function getSelectableTags(discussion) {\n let tags = app.store.all('tags');\n if (discussion) {\n const discussionTags = discussion.tags() || [];\n tags = tags.filter(tag => tag.canAddToDiscussion() || discussionTags.includes(tag));\n } else {\n tags = tags.filter(tag => tag.canStartDiscussion());\n }\n return tags;\n}\nflarum.reg.add('flarum-tags', 'forum/utils/getSelectableTags', getSelectableTags);","module.exports = flarum.reg.get('core', 'common/Component');","module.exports = flarum.reg.get('core', 'common/app');","module.exports = flarum.reg.get('core', 'common/components/Button');","module.exports = flarum.reg.get('core', 'common/components/FormModal');","module.exports = flarum.reg.get('core', 'common/components/Link');","module.exports = flarum.reg.get('core', 'common/components/LoadingIndicator');","module.exports = flarum.reg.get('core', 'common/helpers/highlight');","module.exports = flarum.reg.get('core', 'common/helpers/textContrastClass');","module.exports = flarum.reg.get('core', 'common/utils/KeyboardNavigatable');","module.exports = flarum.reg.get('core', 'common/utils/Stream');","module.exports = flarum.reg.get('core', 'common/utils/classList');","module.exports = flarum.reg.get('core', 'common/utils/extract');","module.exports = flarum.reg.get('core', 'common/utils/extractText');","module.exports = flarum.reg.get('core', 'forum/app');","module.exports = flarum.reg.get('core', 'forum/components/DiscussionPage');","export default function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) {\n return typeof obj;\n } : function (obj) {\n return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n }, _typeof(obj);\n}","import toPropertyKey from \"./toPropertyKey.js\";\nexport default function _defineProperty(obj, key, value) {\n key = toPropertyKey(key);\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}","import _typeof from \"./typeof.js\";\nimport toPrimitive from \"./toPrimitive.js\";\nexport default function _toPropertyKey(arg) {\n var key = toPrimitive(arg, \"string\");\n return _typeof(key) === \"symbol\" ? key : String(key);\n}","import _typeof from \"./typeof.js\";\nexport default function _toPrimitive(input, hint) {\n if (_typeof(input) !== \"object\" || input === null) return input;\n var prim = input[Symbol.toPrimitive];\n if (prim !== undefined) {\n var res = prim.call(input, hint || \"default\");\n if (_typeof(res) !== \"object\") return res;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (hint === \"string\" ? String : Number)(input);\n}","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.f = {};\n// This file contains only the entry chunk.\n// The chunk loading function for additional chunks\n__webpack_require__.e = (chunkId) => {\n\treturn Promise.all(Object.keys(__webpack_require__.f).reduce((promises, key) => {\n\t\t__webpack_require__.f[key](chunkId, promises);\n\t\treturn promises;\n\t}, []));\n};","// This function allow to reference async chunks\n__webpack_require__.u = (chunkId) => {\n\t// return url for filenames based on template\n\treturn \"\" + \"forum/components/TagDiscussionModal\" + \".js\";\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","var scriptUrl;\nif (__webpack_require__.g.importScripts) scriptUrl = __webpack_require__.g.location + \"\";\nvar document = __webpack_require__.g.document;\nif (!scriptUrl && document) {\n\tif (document.currentScript)\n\t\tscriptUrl = document.currentScript.src\n\tif (!scriptUrl) {\n\t\tvar scripts = document.getElementsByTagName(\"script\");\n\t\tif(scripts.length) scriptUrl = scripts[scripts.length - 1].src\n\t}\n}\n// When supporting browsers where an automatic publicPath is not supported you must specify an output.publicPath manually via configuration\n// or pass an empty string (\"\") and set the __webpack_public_path__ variable from your code to use your own logic.\nif (!scriptUrl) throw new Error(\"Automatic publicPath is not supported in this browser\");\nscriptUrl = scriptUrl.replace(/#.*$/, \"\").replace(/\\?.*$/, \"\").replace(/\\/[^\\/]+$/, \"/\");\n__webpack_require__.p = scriptUrl;","__webpack_require__.f.compat = (chunkId, promises) => {\n\n\tconst originalLoadChunk = __webpack_require__.l;\n\t__webpack_require__.l = flarum.reg.loadChunk.bind(flarum.reg, originalLoadChunk);\n};","// no baseURI\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t315: 0\n};\n\n__webpack_require__.f.j = (chunkId, promises) => {\n\t\t// JSONP chunk loading for javascript\n\t\tvar installedChunkData = __webpack_require__.o(installedChunks, chunkId) ? installedChunks[chunkId] : undefined;\n\t\tif(installedChunkData !== 0) { // 0 means \"already installed\".\n\n\t\t\t// a Promise means \"currently loading\".\n\t\t\tif(installedChunkData) {\n\t\t\t\tpromises.push(installedChunkData[2]);\n\t\t\t} else {\n\t\t\t\tif(true) { // all chunks have JS\n\t\t\t\t\t// setup Promise in chunk cache\n\t\t\t\t\tvar promise = new Promise((resolve, reject) => (installedChunkData = installedChunks[chunkId] = [resolve, reject]));\n\t\t\t\t\tpromises.push(installedChunkData[2] = promise);\n\n\t\t\t\t\t// start chunk loading\n\t\t\t\t\tvar url = __webpack_require__.p + __webpack_require__.u(chunkId);\n\t\t\t\t\t// create error before stack unwound to get useful stacktrace later\n\t\t\t\t\tvar error = new Error();\n\t\t\t\t\tvar loadingEnded = (event) => {\n\t\t\t\t\t\tif(__webpack_require__.o(installedChunks, chunkId)) {\n\t\t\t\t\t\t\tinstalledChunkData = installedChunks[chunkId];\n\t\t\t\t\t\t\tif(installedChunkData !== 0) installedChunks[chunkId] = undefined;\n\t\t\t\t\t\t\tif(installedChunkData) {\n\t\t\t\t\t\t\t\tvar errorType = event && (event.type === 'load' ? 'missing' : event.type);\n\t\t\t\t\t\t\t\tvar realSrc = event && event.target && event.target.src;\n\t\t\t\t\t\t\t\terror.message = 'Loading chunk ' + chunkId + ' failed.\\n(' + errorType + ': ' + realSrc + ')';\n\t\t\t\t\t\t\t\terror.name = 'ChunkLoadError';\n\t\t\t\t\t\t\t\terror.type = errorType;\n\t\t\t\t\t\t\t\terror.request = realSrc;\n\t\t\t\t\t\t\t\tinstalledChunkData[1](error);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t\t__webpack_require__.l(url, loadingEnded, \"chunk-\" + chunkId, chunkId);\n\t\t\t\t} else installedChunks[chunkId] = 0;\n\t\t\t}\n\t\t}\n};\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n// no on chunks loaded\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = (parentChunkLoadingFunction, data) => {\n\tvar [chunkIds, moreModules, runtime] = data;\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tif(chunkIds.some((id) => (installedChunks[id] !== 0))) {\n\t\tfor(moduleId in moreModules) {\n\t\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t\t}\n\t\t}\n\t\tif(runtime) var result = runtime(__webpack_require__);\n\t}\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkId] = 0;\n\t}\n\n}\n\nvar chunkLoadingGlobal = self[\"webpackChunkmodule_exports\"] = self[\"webpackChunkmodule_exports\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));"],"names":["inProgress","dataWebpackPrefix","tagIcon","tag","attrs","settings","hasIcon","icon","useColor","className","style","color","m","flarum","reg","add","tagLabel","link","tagText","name","app","translator","trans","title","description","href","route","tags","slug","isChild","sortTags","slice","sort","a","b","aPos","position","bPos","discussionCount","aParent","parent","bParent","TagListState","constructor","this","async","includes","loadedIncludes","query","unloadedIncludes","filter","include","has","length","Promise","resolve","Set","join","then","val","Array","isArray","forEach","get","TagLinkButton","view","vnode","model","child","undefined","static","super","initAttrs","params","TagsPage","arguments","oninit","preloaded","loading","redraw","oncreate","hero","bind","sidebar","contentItems","toArray","items","pinned","cloud","tagTileListView","cloudView","map","tagTileView","lastPostedDiscussion","children","colored","lastPostNumber","lastPostedAt","TagHero","findTag","find","localeCompare","sensitivity","tagsLabel","otherAttrs","push","addChunkModule","DiscussionTaggedPost","oldTags","post","content","newTags","diffTags","tags1","tags2","indexOf","id","store","getById","tagsAdded","tagsRemoved","descriptionKey","descriptionData","data","count","Tag","call","backgroundUrl","backgroundMode","defaultSort","isHidden","isPrimary","isRestricted","canStartDiscussion","canAddToDiscussion","isPrimaryParent","TagGambit","KeyValueGambit","key","hint","filterKey","gambitValueToFilterValue","value","fromFilter","negate","gambits","toString","concat","filterValueToGambitValue","gambit","helper","hasMany","attribute","extend","currentTag","addTag","active","more","splice","reload","currentActiveTag","search","state","currentTagLoading","finally","vdom","override","original","newDiscussion","disabled","param","_params$include","discussion","canTag","onclick","modal","show","promise","composer","fields","prototype","chooseTags","getSelectableTags","selectedTags","onsubmit","$","focus","selectableTags","chosenTags","chosenPrimaryTags","chosenSecondaryTags","minPrimaryTags","parseInt","minSecondaryTags","maxPrimaryTags","maxSecondaryTags","relationships","all","discussionTags","module","exports","_typeof","obj","Symbol","iterator","_defineProperty","arg","input","prim","toPrimitive","res","TypeError","String","toPropertyKey","Object","defineProperty","enumerable","configurable","writable","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","n","getter","__esModule","d","definition","o","f","e","chunkId","keys","reduce","promises","u","g","globalThis","Function","window","prop","hasOwnProperty","l","url","done","script","needAttach","scripts","document","getElementsByTagName","i","s","getAttribute","createElement","charset","timeout","nc","setAttribute","src","onScriptComplete","prev","event","onerror","onload","clearTimeout","doneFns","parentNode","removeChild","fn","setTimeout","type","target","head","appendChild","r","toStringTag","scriptUrl","importScripts","location","currentScript","Error","replace","p","compat","originalLoadChunk","loadChunk","installedChunks","j","installedChunkData","reject","error","errorType","realSrc","message","request","webpackJsonpCallback","parentChunkLoadingFunction","chunkIds","moreModules","runtime","some","chunkLoadingGlobal","self"],"sourceRoot":""} \ No newline at end of file diff --git a/framework/core/js/dist/admin.js b/framework/core/js/dist/admin.js index 083fa5a25..6cd7b4076 100644 --- a/framework/core/js/dist/admin.js +++ b/framework/core/js/dist/admin.js @@ -1,3 +1,3 @@ /*! For license information please see admin.js.LICENSE.txt */ -(()=>{var t,e,n={1207:(t,e,n)=>{"use strict";n.d(e,{J:()=>B,Z:()=>R});var r=n(7905),s=n(7465),o=n(4041),a=n(8312),i=n(7224),l=n(8588),c=n(406),u=n(4153);function d(t){return Array.isArray(t.data)}class h{constructor(t){(0,r.Z)(this,"data",{}),(0,r.Z)(this,"models",void 0),this.models=t}pushPayload(t){t.included&&t.included.map(this.pushObject.bind(this));const e=t.data instanceof Array?t.data.map((t=>this.pushObject(t))):this.pushObject(t.data);return e.payload=t,e}pushObject(t){if(!this.models[t.type])return setTimeout((()=>{throw new Error("Pushing object of type `".concat(t.type,"` not allowed, as type not yet registered in the store."))})),null;const e=this.data[t.type]=this.data[t.type]||{},n=e[t.id],r=n?n.pushData(t):this.createRecord(t.type,t);return e[t.id]=r,r.exists=!0,r}async find(t,e,n,r){var o,a;void 0===n&&(n={}),void 0===r&&(r={});let i=n,l=s.Z.forum.attribute("apiUrl")+"/"+t;return e instanceof Array?l+="?filter[id]="+e.join(","):"object"==typeof e?i=e:e&&(l+="/"+e),"filter"in i&&null!=(o=i)&&null!=(a=o.filter)&&a.q&&(i.filter=s.Z.search.gambits.apply(t,i.filter)),s.Z.request({method:"GET",url:l,params:i,...r}).then((t=>(d(t),this.pushPayload(t))))}getById(t,e){var n,r;return null==(n=this.data)||null==(r=n[t])?void 0:r[e]}getBy(t,e,n){return this.all(t).filter((t=>t[e]()===n))[0]}all(t){const e=this.data[t];return e?Object.values(e):[]}remove(t){delete this.data[t.data.type][t.id()]}createRecord(t,e){return void 0===e&&(e={}),e.type=e.type||t,new this.models[t](e,this)}}flarum.reg.add("core","common/Store",h);class p{constructor(t,e){(0,r.Z)(this,"user",void 0),(0,r.Z)(this,"csrfToken",void 0),this.user=t,this.csrfToken=e}login(t,e){return void 0===e&&(e={}),s.Z.request({method:"POST",url:"".concat(s.Z.forum.attribute("baseUrl"),"/login"),body:t,...e})}logout(){window.location.href="".concat(s.Z.forum.attribute("baseUrl"),"/logout?token=").concat(this.csrfToken)}}flarum.reg.add("core","common/Session",p);var f=n(6786),g=n(1552),v=n(7569),b=n(4430),y=n(6386),w=n(4718),Z=n(9423);function x(){$("[data-humantime]").each((function(){const t=$(this),e=(0,Z.Z)(t.attr("datetime"));t.html(e)}))}function N(){setInterval(x,1e4)}flarum.reg.add("core","common/utils/liveHumanTimes",N);var C=n(8134),k=n(3813),_=n(7498),S=n(6322),E=n(4125),T=n(7645),A=n(5788),P=n(5104),M=n(5123),D=n(5278);function I(t,e,n){var r,o;console.group("%c".concat(e),"background-color: #d83e3e; color: #ffffff; font-weight: bold;"),console.error(n),console.groupEnd(),null!=(r=s.Z.session)&&null!=(o=r.user)&&o.isAdmin()&&s.Z.alerts.show({type:"error"},"".concat(t))}flarum.reg.add("core","common/helpers/fireApplicationError",I);var L=n(9175);class O extends L.Z{token(){return L.Z.attribute("token").call(this)}userId(){return L.Z.attribute("userId").call(this)}title(){return L.Z.attribute("title").call(this)}type(){return L.Z.attribute("type").call(this)}createdAt(){return L.Z.attribute("createdAt",L.Z.transformDate).call(this)}lastActivityAt(){return L.Z.attribute("lastActivityAt",L.Z.transformDate).call(this)}lastIpAddress(){return L.Z.attribute("lastIpAddress").call(this)}device(){return L.Z.attribute("device").call(this)}isCurrent(){return L.Z.attribute("isCurrent").call(this)}isSessionToken(){return L.Z.attribute("isSessionToken").call(this)}}flarum.reg.add("core","common/models/AccessToken",O);var j=n(8394);let B=function(t){return t.NO_MAINTENANCE="none",t.HIGH_MAINTENANCE="high",t.LOW_MAINTENANCE="low",t.SAFE_MODE="safe",t}({});class R{constructor(){(0,r.Z)(this,"forum",void 0),(0,r.Z)(this,"routes",{}),(0,r.Z)(this,"initializers",new o.Z),(0,r.Z)(this,"session",void 0),(0,r.Z)(this,"translator",new u.Z),(0,r.Z)(this,"store",new h({"access-tokens":O,forums:k.Z,users:_.Z,discussions:S.Z,posts:E.Z,groups:T.Z,notifications:A.Z})),(0,r.Z)(this,"search",void 0),(0,r.Z)(this,"cache",{}),(0,r.Z)(this,"booted",!1),(0,r.Z)(this,"current",new P.Z(null)),(0,r.Z)(this,"previous",new P.Z(null)),(0,r.Z)(this,"modal",new M.Z),(0,r.Z)(this,"alerts",new D.Z),(0,r.Z)(this,"drawer",void 0),(0,r.Z)(this,"history",null),(0,r.Z)(this,"pane",null),(0,r.Z)(this,"data",void 0),(0,r.Z)(this,"allowUserColorScheme",void 0),(0,r.Z)(this,"_title",""),(0,r.Z)(this,"_titleCount",0),(0,r.Z)(this,"requestErrorAlert",null),(0,r.Z)(this,"initialRoute",void 0)}set title(t){this._title=t}get title(){return this._title}set titleCount(t){this._titleCount=t}get titleCount(){return this._titleCount}load(t){this.data=t,this.translator.setLocale(t.locale)}boot(){var t;const e=[];this.initializers.toArray().forEach((t=>{try{t(this)}catch(n){const r=t.itemName.includes("/")?t.itemName.replace(/(\/flarum-ext-)|(\/flarum-)/g,"-"):t.itemName;e.push((()=>I((0,g.Z)(s.Z.translator.trans("core.lib.error.extension_initialiation_failed_message",{extension:r})),"".concat(r," failed to initialize"),n)))}})),this.store.pushPayload({data:this.data.resources}),this.forum=this.store.getById("forums","1"),this.session=new p(null!=(t=this.store.getById("users",String(this.data.session.userId)))?t:null,this.data.session.csrfToken),this.mount(),this.initialRoute=window.location.href,e.forEach((t=>t()))}bootExtensions(t){Object.keys(t).forEach((e=>{const n=t[e];if(!n.extend)return;const r=n.extend.flat(1/0);for(const t of r)t.extend(this,{name:e,exports:n})}))}mount(t){void 0===t&&(t=""),m.mount(document.getElementById("modal"),{view:()=>m(i.Z,{state:this.modal})}),m.mount(document.getElementById("alerts"),{view:()=>m(l.Z,{state:this.alerts})}),this.drawer=new v.Z,m.route(document.getElementById("content"),t+"/",(0,b.Z)(this.routes,t));const e=document.getElementById("app"),n=document.querySelector(".App-header"),r=new w.Z((t=>{const r=e.getBoundingClientRect().top+document.body.scrollTop;e.classList.toggle("affix",t>=r),e.classList.toggle("scrolled",t>r),n.classList.toggle("navbar-fixed-top",t>=r)}));r.start(),r.update(),document.body.classList.add("ontouchstart"in window?"touch":"no-touch"),this.initColorScheme(),N()}initColorScheme(t){var e,n,r;void 0===t&&(t=null),null!=t||(t=null!=(e=document.documentElement.getAttribute("data-theme"))?e:"auto"),this.allowUserColorScheme="auto"===t;const s=null==(n=this.session.user)||null==(r=n.preferences())?void 0:r.colorScheme;let o;this.allowUserColorScheme&&(o=s),o||(o=t),this.setColorScheme(o),this.allowUserColorScheme&&this.watchSystemColorSchemePreference((()=>{this.initColorScheme(t)}))}getSystemColorSchemePreference(){let t=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";return window.matchMedia("(prefers-contrast: more)").matches&&(t+="-hc"),t}watchSystemColorSchemePreference(t){window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",t),window.matchMedia("(prefers-contrast: more)").addEventListener("change",t)}setColorScheme(t){t===j.e.Auto&&(t=this.getSystemColorSchemePreference()),document.documentElement.setAttribute("data-theme",t)}setColoredHeader(t){document.documentElement.setAttribute("data-colored-header",t?"true":"false")}preloadedApiDocument(){if(this.data.apiDocument&&window.location.href===this.initialRoute){const t=(d(this.data.apiDocument),this.store.pushPayload(this.data.apiDocument));return this.data.apiDocument=null,t}return null}screen(){return getComputedStyle(document.documentElement).getPropertyValue("--flarum-screen")}setTitle(t){this.title=t,this.updateTitle()}setTitleCount(t){this.titleCount=t,this.updateTitle()}updateTitle(){const t=this.titleCount?"(".concat(this.titleCount,") "):"",e=m.route.get()===this.forum.attribute("basePath")+"/",n={pageTitle:this.title,forumName:this.forum.attribute("title"),pageNumber:1};let r=e||!this.title?(0,g.Z)(s.Z.translator.trans("core.lib.meta_titles.without_page_title",n)):(0,g.Z)(s.Z.translator.trans("core.lib.meta_titles.with_page_title",n));r=t+r;const o=new DOMParser;document.title=o.parseFromString(r,"text/html").body.innerText}transformRequestOptions(t){const{background:e,deserialize:n,modifyText:r,...o}={...t},a={background:null==e||e,deserialize:null!=n?n:t=>t,...o};if((0,C.l)(a,"config",((t,e)=>{e.setRequestHeader("X-CSRF-Token",this.session.csrfToken)})),a.method&&!["GET","POST"].includes(a.method)){const t=a.method;(0,C.l)(a,"config",((e,n)=>{n.setRequestHeader("X-HTTP-Method-Override",t)})),a.method="POST"}return a.extract=t=>{let e;e=r?r(t.responseText):t.responseText;const n=t.status;if(n<200||n>299)throw new y.Z(n,"".concat(e),a,t);if(t.getResponseHeader){const e=t.getResponseHeader("X-CSRF-Token");e&&(s.Z.session.csrfToken=e)}try{return""===e?null:JSON.parse(e)}catch(n){throw new y.Z(500,"".concat(e),a,t)}},a}request(t){const e=this.transformRequestOptions(t);return this.requestErrorAlert&&this.alerts.dismiss(this.requestErrorAlert),m.request(e).catch((e=>this.requestErrorCatch(e,t.errorHandler)))}requestErrorCatch(t,e){var n,r,o,i,l,c,u;const d=null!=(n=null==(r=t.response)||null==(o=r.errors)?void 0:o.map((t=>{var e;return decodeURI(null!=(e=t.detail)?e:"")})))?n:[];let h;switch(t.status){case 422:h=d.map((t=>[t,m("br",null)])).flat().slice(0,-1);break;case 401:case 403:h=s.Z.translator.trans("core.lib.error.permission_denied_message");break;case 404:case 410:h=s.Z.translator.trans("core.lib.error.not_found_message");break;case 413:h=s.Z.translator.trans("core.lib.error.payload_too_large_message");break;case 429:h=s.Z.translator.trans("core.lib.error.rate_limit_exceeded_message");break;default:h="db_error"===(null==(i=t.response)||null==(l=i.errors)||null==(c=l[0])?void 0:c.code)&&null!=(u=s.Z.session.user)&&u.isAdmin()?s.Z.translator.trans("core.lib.error.db_error_message"):this.requestWasCrossOrigin(t)?s.Z.translator.trans("core.lib.error.generic_cross_origin_message"):s.Z.translator.trans("core.lib.error.generic_message")}const p=s.Z.forum.attribute("debug");return t.alert={type:"error",content:h,controls:p&&[m(a.Z,{className:"Button Button--link",onclick:this.showDebug.bind(this,t,d)},s.Z.translator.trans("core.lib.debug_button"))]},e?e(t):this.requestErrorDefaultHandler(t,p,d),Promise.reject(t)}requestWasCrossOrigin(t){return new URL(t.options.url,document.baseURI).origin!==window.location.origin}requestErrorDefaultHandler(t,e,n){if(!(t instanceof y.Z))throw t;if(e&&t.xhr){const{method:e,url:r}=t.options,{status:s=""}=t.xhr;console.group("".concat(e," ").concat(r," ").concat(s)),n.length?console.error(...n):console.error(t),console.groupEnd()}500===t.status&&e?s.Z.modal.show(c.Z,{error:t,formattedError:n}):t.alert&&(this.requestErrorAlert=this.alerts.show(t.alert,t.alert.content))}showDebug(t,e){null!==this.requestErrorAlert&&this.alerts.dismiss(this.requestErrorAlert),this.modal.show(c.Z,{error:t,formattedError:e})}route(t,e){void 0===e&&(e={});const n=this.routes[t];if(!n)throw new Error("Route '".concat(t,"' does not exist"));const r=n.path.replace(/:([^\/]+)/g,((t,n)=>"".concat((0,f.Z)(e,n))));for(const t in e)e.hasOwnProperty(t)&&!e[t]&&delete e[t];const s=m.buildQueryString(e);return(""===m.route.prefix?this.forum.attribute("basePath"):"")+r+(s?"?"+s:"")}}flarum.reg.add("core","common/Application",R)},2190:(t,e,n)=>{"use strict";n.d(e,{Z:()=>s});var r=n(7905);class s{constructor(){(0,r.Z)(this,"element",void 0),(0,r.Z)(this,"attrs",void 0),(0,r.Z)(this,"state",void 0)}oninit(t){this.setAttrs(t.attrs)}oncreate(t){this.element=t.dom}onbeforeupdate(t){this.setAttrs(t.attrs)}onupdate(t){}onbeforeremove(t){}onremove(t){}$(t){const e=$(this.element);return t?e.find(t):e}static component(t,e){void 0===t&&(t={}),void 0===e&&(e=null);const n={...t};return m(this,n,e)}setAttrs(t){if(void 0===t&&(t={}),this.constructor.initAttrs(t),t){if("children"in t)throw new Error("[".concat(this.constructor.name,'] The "children" attribute of attrs should never be used. Either pass children in as the vnode children or rename the attribute'));if("tag"in t)throw new Error("[".concat(this.constructor.name,'] You cannot use the "tag" attribute name with Mithril 2.'))}this.attrs=t}static initAttrs(t){}}flarum.reg.add("core","common/Component",s)},9175:(t,e,n)=>{"use strict";n.d(e,{Z:()=>o});var r=n(7905),s=n(7465);class o{constructor(t,e){void 0===t&&(t={}),void 0===e&&(e=s.Z.store),(0,r.Z)(this,"data",{}),(0,r.Z)(this,"freshness",new Date),(0,r.Z)(this,"exists",!1),(0,r.Z)(this,"store",void 0),this.data=t,this.store=e}id(){return"id"in this.data?this.data.id:void 0}attribute(t){var e,n;return null==(e=this.data)||null==(n=e.attributes)?void 0:n[t]}pushData(t){if("id"in t&&(this.data.id=t.id),"type"in t&&(this.data.type=t.type),"attributes"in t){var e;(e=this.data).attributes||(e.attributes={});for(const e in t.attributes){const n=t.attributes[e];n&&n instanceof o&&delete t.attributes[e]}Object.assign(this.data.attributes,t.attributes)}if("relationships"in t){var n;const e=null!=(n=this.data.relationships)?n:{};for(const n in t.relationships){const r=t.relationships[n];if(null===r){delete e[n],delete t.relationships[n];continue}let s;s=r instanceof o?{data:o.getIdentifier(r)}:r instanceof Array?{data:r.map(o.getIdentifier)}:r,t.relationships[n]=s,e[n]=s}this.data.relationships=e}return this.freshness=new Date,this}pushAttributes(t){this.pushData({attributes:t})}save(t,e){void 0===e&&(e={});const n={type:this.data.type,attributes:t};if("id"in this.data&&(n.id=this.data.id),t.relationships){n.relationships={};for(const e in t.relationships){const r=t.relationships[e];null!==r&&(n.relationships[e]={data:r instanceof Array?r.map(o.getIdentifier):o.getIdentifier(r)})}delete t.relationships}const r=this.copyData();this.pushData(n);const a={data:n,meta:e.meta||void 0};return s.Z.request({method:this.exists?"PATCH":"POST",url:s.Z.forum.attribute("apiUrl")+this.apiEndpoint(),body:a,...e}).then((t=>this.store.pushPayload(t)),(t=>{throw this.pushData(r),m.redraw(),t}))}delete(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),this.exists?s.Z.request({method:"DELETE",url:s.Z.forum.attribute("apiUrl")+this.apiEndpoint(),body:t,...e}).then((()=>{this.exists=!1,this.store.remove(this)})):Promise.resolve()}apiEndpoint(){return"/"+this.data.type+("id"in this.data?"/"+this.data.id:"")}copyData(){return JSON.parse(JSON.stringify(this.data))}rawRelationship(t){var e,n;return null==(e=this.data.relationships)||null==(n=e[t])?void 0:n.data}static attribute(t,e){return function(){return e?e(this.attribute(t)):this.attribute(t)}}static hasOne(t){return function(){var e,n;const r=null==(e=this.data.relationships)||null==(n=e[t])?void 0:n.data;if(r&&r instanceof Array)throw new Error("Relationship ".concat(t," on model ").concat(this.data.type," is plural, so the hasOne method cannot be used to access it."));return!!r&&this.store.getById(r.type,r.id)}}static hasMany(t){return function(){var e,n;const r=null==(e=this.data.relationships)||null==(n=e[t])?void 0:n.data;if(r&&!(r instanceof Array))throw new Error("Relationship ".concat(t," on model ").concat(this.data.type," is singular, so the hasMany method cannot be used to access it."));return!!r&&r.map((t=>this.store.getById(t.type,t.id)))}}static transformDate(t){return null!=t?new Date(t):t}static getIdentifier(t){return t&&t.data&&"id"in t.data?{type:t.data.type,id:t.data.id}:null}}flarum.reg.add("core","common/Model",o)},4773:(t,e,n)=>{"use strict";n.d(e,{Z:()=>p});var r=n(7905),s=n(7465),o=n(1586);class a extends o.y3{key(){return s.Z.translator.trans("core.lib.gambits.discussions.author.key",{},!0)}hint(){return s.Z.translator.trans("core.lib.gambits.discussions.author.hint",{},!0)}filterKey(){return"author"}}flarum.reg.add("core","common/query/discussions/AuthorGambit",a);class i extends o.y3{key(){return s.Z.translator.trans("core.lib.gambits.discussions.created.key",{},!0)}hint(){return s.Z.translator.trans("core.lib.gambits.discussions.created.hint",{},!0)}valuePattern(){return"(\\d{4}\\-\\d\\d\\-\\d\\d(?:\\.\\.(\\d{4}\\-\\d\\d\\-\\d\\d))?)"}filterKey(){return"created"}}flarum.reg.add("core","common/query/discussions/CreatedGambit",i);class l extends o.gD{key(){return s.Z.translator.trans("core.lib.gambits.discussions.hidden.key",{},!0)}filterKey(){return"hidden"}enabled(){return!!s.Z.session.user}}flarum.reg.add("core","common/query/discussions/HiddenGambit",l);class c extends o.gD{key(){return s.Z.translator.trans("core.lib.gambits.discussions.unread.key",{},!0)}filterKey(){return"unread"}enabled(){return!!s.Z.session.user}}flarum.reg.add("core","common/query/discussions/UnreadGambit",c);class u extends o.y3{key(){return s.Z.translator.trans("core.lib.gambits.users.email.key",{},!0)}hint(){return s.Z.translator.trans("core.lib.gambits.users.email.hint",{},!0)}filterKey(){return"email"}enabled(){return!(!s.Z.session.user||!s.Z.forum.attribute("canEditUserCredentials"))}}flarum.reg.add("core","common/query/users/EmailGambit",u);class d extends o.y3{key(){return s.Z.translator.trans("core.lib.gambits.users.group.key",{},!0)}hint(){return s.Z.translator.trans("core.lib.gambits.users.group.hint",{},!0)}filterKey(){return"group"}}flarum.reg.add("core","common/query/users/GroupGambit",d);class m extends o.y3{key(){return s.Z.translator.trans("core.lib.gambits.posts.discussion.key",{},!0)}hint(){return s.Z.translator.trans("core.lib.gambits.posts.discussion.hint",{},!0)}filterKey(){return"discussion"}}flarum.reg.add("core","common/query/discussions/DiscussionGambit",m);class h{constructor(){(0,r.Z)(this,"gambits",{discussions:[a,i,l,c],posts:[a,m],users:[u,d]})}apply(t,e){return e.q=this.match(t,e.q,((t,n,r)=>{const s=t.toFilter(n,r);Object.keys(s).forEach((n=>{n in e&&t.predicates&&Array.isArray(s[n])?e[n]=e[n].concat(s[n]):e[n]=s[n]}))})),e}match(t,e,n){const r=this.for(t).filter((t=>t.enabled()));if(0===r.length)return e;const s=e.split(" ");for(const t of r)for(const r of s){const s=new RegExp("^(-?)".concat(t.pattern(),"$"),"i");let o=r.match(s);if(o){const s="-"===o[1];o.splice(1,1),n(t,o,s,r),e=e.replace(r,"")}}return e.trim().replace(/\s+/g," ")}from(t,e,n){const r=this.for(t);return 0===r.length||Object.keys(n).forEach((t=>{for(const s of r){const r="-"===t[0];r&&(t=t.substring(1)),s.filterKey()===t&&(e+=" ".concat(s.fromFilter(n[t],r)))}})),e}for(t){return(this.gambits[t]||[]).map((t=>new t))}}flarum.reg.add("core","common/GambitManager",h);class p{constructor(t){(0,r.Z)(this,"state",void 0),(0,r.Z)(this,"gambits",new h),this.state=t}}(0,r.Z)(p,"MIN_SEARCH_LEN",3),flarum.reg.add("core","common/SearchManager",p)},4153:(t,e,n)=>{"use strict";n.d(e,{Z:()=>V});var r,s=n(7905),o=n(6880),a=n.n(o),i=n(6353),l=n.n(i),c=n(2512),u=n.n(c),d=n(8328),h=n.n(d),p=n(9939),f=n.n(p),g=n(1627),v=n.n(g),b=n(871),y=n.n(b);function w(t){return t.reduce((function(t,e){return t.concat(Array.isArray(e)?w(e):e)}),[])}function Z(t){var e={};return function(){for(var n=arguments.length,r=new Array(n),s=0;s3&&void 0!==arguments[3]?arguments[3]:[];if(!t)return r;if(1===n)return r.push(t),r;var s=t.indexOf(e);if(-1===s)return r.push(t),r;var o=t.substring(0,s).trim(),a=t.substring(s+e.length+1).trim();return r.push(o),k(a,e,n-1,r)}function _(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function S(t){for(var e=1;e1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2?arguments[2]:void 0,s=arguments.length>3?arguments[3]:void 0,o=arguments.length>4?arguments[4]:void 0,a=x(e),i=a.args,l=a.cases,c=parseInt(t);i.forEach((function(t){t.startsWith("offset:")&&(c-=parseInt(t.slice("offset:".length)))}));var u=[];if("PluralRules"in Intl){void 0!==r&&r.resolvedOptions().locale===n||(r=new Intl.PluralRules(n));var d=r.select(c);d!==T&&u.push(d)}1===c&&u.push("one"),u.push("=".concat(c),T);for(var m=0;m1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>3?arguments[3]:void 0,r=arguments.length>4?arguments[4]:void 0,s=x(e),o=s.cases;return t in o?r(o[t],n):M in o?r(o.other,n):t}function I(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],s=[],o=function(r,o,a,i,l,c){if(o)return{break:!0};var u=L(t,a,i,l);if(!u)return s;var d=u.segmentIndex===i,m=t[u.segmentIndex],h=[];if(d)h.push(r.slice(l+1,u.segmentStart));else{h.push(r.slice(l+1));for(var p=i+1;p"===i[m]){var h=i.slice(c+1+l,m),p=s(i,l,h,a,m,c);if(p.exit)return;if(p.newSegmentIndex&&(a=p.newSegmentIndex),p.processedSegment&&(d=!0),p.break)break;l=!1,c=null,u=!1}else u&&(o=i[m],!/[a-zA-Z-_]/.test(o))&&(l=!1,c=null,u=!1);else c=m,u=!0,"/"===i[m+1]&&(l=!0,m++);d||r.push(i)}else r.push(i)}}function j(t){return Object.keys(t).reduce((function(e,n){return e[n]=R(t[n]),e}),{})}function B(t){return"string"!=typeof t?t:t.replace(/</g,"<").replace(/>/g,">").replace(/"/g,'"').replace(/'/g,"'").replace(/&/g,"&")}function R(t){return"string"==typeof t||t instanceof String?t.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'"):Array.isArray(t)?t.map(R):t}function H(t,e,n){return"<".concat(t,">").concat(B(n),"")}var $=function(t){h()(s,t);var e,n,r=(e=s,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,r=v()(e);if(n){var s=v()(this).constructor;t=Reflect.construct(r,arguments,s)}else t=r.apply(this,arguments);return f()(this,t)});function s(t){var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return l()(this,s),(e=r.call(this,t,n)).richHandler=o||H,e}return u()(s,[{key:"rich",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=j(e),r=w(this.process(t,n)),s=Math.random().toString(36)+Math.random().toString(36)+Math.random().toString(36),o=Object.fromEntries(Object.entries(e).map((function(t){var e=a()(t,2),n=e[0];return e[1],[n,s]}))),i=w(this.process(t,o)),l=I(i,o,(function(){return s})),c=l.map((function(t,e){return t===s?null:e})).filter((function(t){return null!==t}));return I(r,n,this.richHandler,c)}}]),s}(function(){function t(e){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};l()(this,t),y()(this,"format",Z((function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return w(n.process(t,e)).join("")}))),this.locale=e,this.typeHandlers=r}return u()(t,[{key:"process",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!t)return[];var n=t.indexOf("{");if(-1!==n){var r=N(t,n);if(-1===r)throw new Error('Unbalanced curly braces in string: "'.concat(t,'"'));var s=t.substring(n,r+1);if(s){var o=[],i=t.substring(0,n);i&&o.push(i);var l=C(s),c=a()(l,3),u=c[0],d=c[1],m=c[2],h=e[u];null==h&&(h="");var p=d&&this.typeHandlers[d];o.push(p?p(h,m,this.locale,e,this.process.bind(this)):h);var f=t.substring(r+1);return f&&o.push(this.process(f,e)),o}}return[t]}}]),t}());function F(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function q(t){for(var e=1;e{"use strict";n.d(e,{Z:()=>o});const r=window,s=new Proxy({},{get:(t,e)=>Reflect.get(r.app,e,r.app),set:(t,e,n)=>Reflect.set(r.app,e,n,r.app)}),o=s;flarum.reg.add("core","common/app",s)},3817:(t,e,n)=>{"use strict";n.d(e,{Z:()=>u});var r=n(2190),s=n(8312),o=n(1268),a=n(6786),i=n(3344),l=n(7465),c=n(9133);class u extends r.Z{view(t){const e=Object.assign({},this.attrs),n=(0,a.Z)(e,"type");e.className=(0,i.Z)("Alert","Alert--".concat(n),e.className);const r=(0,a.Z)(e,"title"),u=(0,a.Z)(e,"icon"),d=(0,a.Z)(e,"content")||t.children,h=(0,a.Z)(e,"controls")||[],p=(0,a.Z)(e,"dismissible"),f=(0,a.Z)(e,"ondismiss"),g=[];return(p||void 0===p)&&g.push(m(s.Z,{"aria-label":l.Z.translator.trans("core.lib.alert.dismiss_a11y_label"),icon:"fas fa-times",className:"Button Button--link Button--icon Alert-dismiss",onclick:f})),m("div",e,m("div",{className:(0,i.Z)("Alert-container",e.containerClassName)},!!r&&m("div",{className:"Alert-title"},!!u&&m("span",{className:"Alert-title-icon"},m(c.Z,{name:u})),m("span",{className:"Alert-title-text"},r)),m("span",{className:"Alert-body"},d),m("ul",{className:"Alert-controls"},(0,o.Z)(h.concat(g)))))}}flarum.reg.add("core","common/components/Alert",u)},8588:(t,e,n)=>{"use strict";n.d(e,{Z:()=>s});var r=n(2190);class s extends r.Z{oninit(t){super.oninit(t),this.state=this.attrs.state}view(){const t=this.state.getActiveAlerts();return m("div",{className:"AlertManager"},Object.keys(t).map(Number).map((e=>{const n=t[e],r="error"===n.attrs.type;return m("div",{className:"AlertManager-alert",role:"alert","aria-live":r?"assertive":"polite"},m(n.componentClass,Object.assign({},n.attrs,{ondismiss:this.state.dismiss.bind(this.state,e)}),n.children))})))}}flarum.reg.add("core","common/components/AlertManager",s)},7323:(t,e,n)=>{"use strict";n.d(e,{Z:()=>o});var r=n(3344),s=n(2190);class o extends s.Z{view(t){const{user:e,...n}=t.attrs;n.className=(0,r.Z)("Avatar",n.className),null!=n.loading||(n.loading="lazy");let s="";const o="undefined"===n.title||n.title;if(o||delete n.title,e){const t=e.displayName()||"?",r=e.avatarUrl();if(o&&(n.title=n.title||t),r)return m("img",Object.assign({},n,{src:r,alt:""}));s=t.charAt(0).toUpperCase(),n.style={"--avatar-bg":e.color()}}return m("span",n,s)}}flarum.reg.add("core","common/components/Avatar",o)},3804:(t,e,n)=>{"use strict";n.d(e,{Z:()=>l});var r=n(6439),s=n(2190),o=n(3344),a=n(9215),i=n(9133);class l extends s.Z{view(){const{type:t,icon:e,label:n,color:s,style:l={},...c}=this.attrs,u=(0,o.Z)("Badge",[t&&"Badge--".concat(t)],c.className,(0,a.Z)(s)),d=e?m(i.Z,{name:e,className:"Badge-icon"}):m.trust(" "),h={...l,"--badge-bg":s},p={...c,className:u,style:h},f=m("div",p,d);return n?m(r.Z,{text:n},f):f}}flarum.reg.add("core","common/components/Badge",l)},8312:(t,e,n)=>{"use strict";n.d(e,{Z:()=>u});var r=n(2190),s=n(7465);function o(){s.Z.forum.attribute("debug")&&console.warn(...arguments)}flarum.reg.add("core","common/helpers/fireDebugWarning",o);var a=n(3344),i=n(1552),l=n(5226),c=n(9133);class u extends r.Z{view(t){let{type:e,"aria-label":n,icon:r,disabled:s,loading:o,className:l,class:c,...u}=this.attrs;e||(e="button"),"object"==typeof n&&(n=(0,i.Z)(n)),(s||o)&&delete u.onclick,l=(0,a.Z)(c,l,{hasIcon:r,disabled:s||o,loading:o});const d={disabled:s,className:l,type:e,"aria-label":n,...u};return m("button",d,this.getButtonContent(t.children))}oncreate(t){var e,n;super.oncreate(t);const{"aria-label":r}=this.attrs;this.view!==u.prototype.view||r||(0,i.Z)(t.children)||null!=(e=this.element)&&null!=(n=e.getAttribute)&&n.call(e,"aria-label")||o('[Flarum Accessibility Warning] Button has no content and no accessible label. This means that screen-readers will not be able to interpret its meaning and just read "Button". Consider providing accessible text via the `aria-label` attribute. https://web.dev/button-name',this.element)}getButtonContent(t){const e=this.attrs.icon;return[e&&m(c.Z,{name:e,className:"Button-icon"}),t&&m("span",{className:"Button-label"},t),this.attrs.loading&&m(l.Z,{size:"small",display:"inline"})]}}flarum.reg.add("core","common/components/Button",u)},7298:(t,e,n)=>{"use strict";n.d(e,{Z:()=>l});var r=n(2190),s=n(5226),o=n(3344),a=n(7669),i=n(9133);class l extends r.Z{view(t){const e=(0,o.Z)(["Checkbox",this.attrs.state?"on":"off",this.attrs.className,this.attrs.loading&&"loading",this.attrs.disabled&&"disabled"]);return m("label",{className:e},m("input",{type:"checkbox",checked:this.attrs.state,disabled:this.attrs.disabled,onchange:(0,a.Z)("checked",this.onchange.bind(this))}),m("div",{className:"Checkbox-display","aria-hidden":"true"},this.getDisplay()),t.children)}getDisplay(){return this.attrs.loading?m(s.Z,{display:"unset",size:"small"}):m(i.Z,{name:this.attrs.state?"fas fa-check":"fas fa-times"})}onchange(t){this.attrs.onchange&&this.attrs.onchange(t,this)}}flarum.reg.add("core","common/components/Checkbox",l)},344:(t,e,n)=>{"use strict";n.d(e,{Z:()=>u});var r=n(7905),s=n(7465),o=n(2190),a=n(1268),i=n(1552),l=n(6439),c=n(9133);class u extends o.Z{constructor(){super(...arguments),(0,r.Z)(this,"showing",!1)}static initAttrs(t){t.className||(t.className=""),t.buttonClassName||(t.buttonClassName=""),t.menuClassName||(t.menuClassName=""),t.label||(t.label=""),null!=t.caretIcon||(t.caretIcon="fas fa-caret-down"),t.accessibleToggleLabel||(t.accessibleToggleLabel=(0,i.Z)(s.Z.translator.trans("core.lib.dropdown.toggle_dropdown_accessible_label")))}view(t){const e=t.children?(0,a.Z)(t.children):[],n=!this.attrs.lazyDraw||this.showing;return m("div",{className:"ButtonGroup Dropdown dropdown "+this.attrs.className+" itemCount"+e.length+(this.showing?" open":"")},this.getButton(t.children),n&&this.getMenu(e))}oncreate(t){super.oncreate(t),this.$().on("shown.bs.dropdown",(()=>{var t,e,n,r,s,o,a,i,l,c,u;const{lazyDraw:d,onshow:h}=this.attrs;this.showing=!0,d&&m.redraw.sync(),"function"==typeof h&&h(),d||m.redraw();const p=this.$(".Dropdown-menu"),f=p.hasClass("Dropdown-menu--right"),g=null!=(t=null==(e=p.offset())?void 0:e.top)?t:0,v=null!=(n=p.height())?n:0,b=null!=(r=$(window).scrollTop())?r:0,y=null!=(s=$(window).height())?s:0;p.removeClass("Dropdown-menu--top Dropdown-menu--right"),p.toggleClass("Dropdown-menu--top",g+v>b+y),((null==(o=p.offset())?void 0:o.top)||0)<0&&p.removeClass("Dropdown-menu--top");const w=null!=(a=null==(i=p.offset())?void 0:i.left)?a:0,Z=null!=(l=p.width())?l:0,x=null!=(c=$(window).scrollLeft())?c:0,N=null!=(u=$(window).width())?u:0;p.toggleClass("Dropdown-menu--right",f||w+Z>x+N)})),this.$().on("hidden.bs.dropdown",(()=>{this.showing=!1,this.attrs.onhide&&this.attrs.onhide(),m.redraw()}))}getButton(t){let e=m("button",Object.assign({className:"Dropdown-toggle "+this.attrs.buttonClassName,"aria-haspopup":"menu","aria-label":this.attrs.accessibleToggleLabel,"data-toggle":"dropdown",onclick:this.attrs.onclick},this.attrs.buttonAttrs),this.getButtonContent(t));return this.attrs.tooltip&&(e=m(l.Z,{text:this.attrs.tooltip,position:"bottom"},e)),e}getButtonContent(t){return[this.attrs.icon?m(c.Z,{name:this.attrs.icon,className:"Button-icon"}):"",m("span",{className:"Button-label"},this.attrs.label),this.attrs.caretIcon?m(c.Z,{name:this.attrs.caretIcon,className:"Button-caret"}):""]}getMenu(t){return m("ul",{className:"Dropdown-menu dropdown-menu "+this.attrs.menuClassName},t)}}flarum.reg.add("core","common/components/Dropdown",u)},8034:(t,e,n)=>{"use strict";n.d(e,{Z:()=>o});var r=n(2190),s=n(3344);class o extends r.Z{view(t){return m("div",{className:(0,s.Z)("FieldSet",this.attrs.className),role:"group","aria-label":this.attrs.label,"aria-disabled":!1},m("label",{className:"FieldSet-label","aria-hidden":"true"},this.attrs.label),this.attrs.description?m("div",{className:"FieldSet-description helpText"},this.attrs.description):null,m("div",{className:"FieldSet-items"},t.children))}}flarum.reg.add("core","common/components/FieldSet",o)},6352:(t,e,n)=>{"use strict";n.d(e,{Z:()=>o});var r=n(2190),s=n(3344);class o extends r.Z{view(t){const{label:e,description:n,className:r,...o}=t.attrs;return m("div",Object.assign({className:(0,s.Z)("Form",r)},o),m("div",{className:"Form-header"},e&&m("label",null,e),n&&m("p",{className:"helpText"},n)),m("div",{className:"Form-body"},t.children))}}flarum.reg.add("core","common/components/Form",o)},899:(t,e,n)=>{"use strict";n.d(e,{Z:()=>s});var r=n(7108);class s extends r.Z{wrapper(t){return m("form",{onsubmit:this.onsubmit.bind(this)},t)}onsubmit(t){}onready(){this.$().find("input, select, textarea").first().trigger("focus").trigger("select")}onerror(t){var e;this.alertAttrs=t.alert,m.redraw(),422===t.status&&null!=(e=t.response)&&e.errors?this.$("form [name="+t.response.errors[0].source.pointer.replace("/data/attributes/","")+"]").trigger("select"):this.onready()}}flarum.reg.add("core","common/components/FormModal",s)},6697:(t,e,n)=>{"use strict";n.d(e,{Z:()=>s});var r=n(3804);class s extends r.Z{static initAttrs(t){super.initAttrs(t),t.group&&(t.icon=t.group.icon()||"",t.color=t.group.color()||"",t.label=void 0===t.label?t.group.nameSingular():t.label,t.type="group--"+t.group.id(),delete t.group)}}flarum.reg.add("core","common/components/GroupBadge",s)},9133:(t,e,n)=>{"use strict";n.d(e,{Z:()=>o});var r=n(3344),s=n(2190);class o extends s.Z{view(t){const{name:e,...n}=t.attrs;return n.className=(0,r.Z)("icon",e,n.className),m("i",Object.assign({"aria-hidden":"true"},n))}}flarum.reg.add("core","common/components/Icon",o)},3986:(t,e,n)=>{"use strict";n.d(e,{Z:()=>a});var r=n(2190),s=n(9133),o=n(3344);class a extends r.Z{view(t){const{icon:e,className:n,...r}=t.attrs;return m("div",Object.assign({className:(0,o.Z)("InfoTile",n)},r),this.icon(),m("div",{className:"InfoTile-text"},t.children))}icon(){return this.attrs.iconElement?this.attrs.iconElement:this.attrs.icon?m(s.Z,{name:(0,o.Z)(this.attrs.icon,"InfoTile-icon")}):null}}flarum.reg.add("core","common/components/InfoTile",a)},9908:(t,e,n)=>{"use strict";n.d(e,{Z:()=>c});var r=n(6789),s=n(2190),o=n(9133),a=n(5226),i=n(3344),l=n(8312);class c extends s.Z{oninit(t){super.oninit(t)}view(t){var e,n;const{className:s,...c}=this.attrs.inputAttrs||{},u=this.attrs.value||(null==(e=(n=this.attrs).stream)?void 0:e.call(n))||"";return m("div",{className:(0,i.Z)("Input",this.attrs.className,{"Input--withPrefix":this.attrs.prefixIcon,"Input--withClear":this.attrs.clearable})},this.attrs.prefixIcon&&m(o.Z,{name:(0,i.Z)(this.attrs.prefixIcon,"Input-prefix-icon")}),this.input({inputClassName:s,value:u,inputAttrs:c}),this.attrs.loading&&m(a.Z,{size:"small",display:"inline",containerClassName:"Button Button--icon Button--link"}),this.attrs.clearable&&u&&!this.attrs.loading&&m(l.Z,{className:"Input-clear Button Button--icon Button--link",onclick:this.clear.bind(this),"aria-label":this.attrs.clearLabel||r.Z.translator.trans("core.lib.input.clear_button"),type:"button",icon:"fas fa-times-circle"}))}input(t){let{inputClassName:e,value:n,inputAttrs:r}=t;const s={className:(0,i.Z)("FormControl",e),type:this.attrs.type||"text",value:n,oninput:t=>{var e;return null==(e=this.onchange)?void 0:e.call(this,t.target.value)},"aria-label":this.attrs.ariaLabel,placeholder:this.attrs.placeholder,readonly:this.attrs.readonly||void 0,disabled:this.attrs.disabled||void 0,...r};return this.attrs.renderInput?this.attrs.renderInput(s):m("input",s)}onchange(t){var e,n;this.attrs.stream?this.attrs.stream(t):null==(e=(n=this.attrs).onchange)||e.call(n,t)}clear(){this.onchange("")}}flarum.reg.add("core","common/components/Input",c)},5226:(t,e,n)=>{"use strict";n.d(e,{Z:()=>a});var r=n(7465),s=n(2190),o=n(3344);class a extends s.Z{view(){const{display:t="block",size:e="medium",containerClassName:n,className:s,...a}=this.attrs,i=(0,o.Z)("LoadingIndicator",s),l=(0,o.Z)("LoadingIndicator-container","unset"!==t&&"LoadingIndicator-container--".concat(t),e&&"LoadingIndicator-container--".concat(e),n);return m("div",Object.assign({"aria-label":r.Z.translator.trans("core.lib.loading_indicator.accessible_label"),role:"status"},a.containerAttrs,{"data-size":e,className:l}),m("div",Object.assign({"aria-hidden":"true",className:i},a)))}}flarum.reg.add("core","common/components/LoadingIndicator",a)},7108:(t,e,n)=>{"use strict";n.d(e,{Z:()=>c});var r=n(7905),s=n(7465),o=n(2190),a=n(3817),i=n(8312),l=n(3344);class c extends o.Z{constructor(){super(...arguments),(0,r.Z)(this,"loading",!1),(0,r.Z)(this,"alertAttrs",null)}static get dismissibleOptions(){return{viaCloseButton:this.isDismissibleViaCloseButton,viaEscKey:this.isDismissibleViaEscKey,viaBackdropClick:this.isDismissibleViaBackdropClick}}oncreate(t){super.oncreate(t),this.attrs.animateShow((()=>this.onready()))}onbeforeremove(t){if(super.onbeforeremove(t),!this.attrs.state.modal)return new Promise((t=>setTimeout(t,300)))}view(){return this.alertAttrs&&(this.alertAttrs.dismissible=!1),m("div",{className:(0,l.Z)("Modal modal-dialog fade",this.className())},m("div",{className:"Modal-content"},this.dismissibleOptions.viaCloseButton&&m("div",{className:"Modal-close App-backControl"},m(i.Z,{icon:"fas fa-times",onclick:()=>this.hide(),className:"Button Button--icon Button--link","aria-label":s.Z.translator.trans("core.lib.modal.close")})),this.wrapper(this.inner())))}wrapper(t){return m("[",null,t)}inner(){return m("[",null,m("div",{className:"Modal-header"},m("h3",{className:"App-titleControl App-titleControl--text"},this.title())),!!this.alertAttrs&&m("div",{className:"Modal-alert"},m(a.Z,this.alertAttrs)),this.content())}onready(){}hide(){this.attrs.animateHide()}loaded(){this.loading=!1,m.redraw()}get dismissibleOptions(){return this.constructor.dismissibleOptions}}(0,r.Z)(c,"isDismissibleViaCloseButton",!0),(0,r.Z)(c,"isDismissibleViaEscKey",!0),(0,r.Z)(c,"isDismissibleViaBackdropClick",!0),flarum.reg.add("core","common/components/Modal",c)},7224:(t,e,n)=>{"use strict";n.d(e,{Z:()=>w});var r=n(7905),s=n(2190),o=n(7835),a=!1;if("undefined"!=typeof window){var i={get passive(){a=!0}};window.addEventListener("testPassive",null,i),window.removeEventListener("testPassive",null,i)}var l="undefined"!=typeof window&&window.navigator&&window.navigator.platform&&(/iP(ad|hone|od)/.test(window.navigator.platform)||"MacIntel"===window.navigator.platform&&window.navigator.maxTouchPoints>1),c=[],u=!1,d=-1,h=void 0,p=void 0,f=void 0,g=function(t){return c.some((function(e){return!(!e.options.allowTouchMove||!e.options.allowTouchMove(t))}))},v=function(t){var e=t||window.event;return!!g(e.target)||e.touches.length>1||(e.preventDefault&&e.preventDefault(),!1)},b=function(){l&&(c.forEach((function(t){t.targetElement.ontouchstart=null,t.targetElement.ontouchmove=null})),u&&(document.removeEventListener("touchmove",v,a?{passive:!1}:void 0),u=!1),d=-1),l?function(){if(void 0!==p){var t=-parseInt(document.body.style.top,10),e=-parseInt(document.body.style.left,10);document.body.style.position=p.position,document.body.style.top=p.top,document.body.style.left=p.left,window.scrollTo(e,t),p=void 0}}():(void 0!==f&&(document.body.style.paddingRight=f,f=void 0),void 0!==h&&(document.body.style.overflow=h,h=void 0)),c=[]},y=n(5226);class w extends s.Z{constructor(){super(...arguments),(0,r.Z)(this,"focusTrap",void 0),(0,r.Z)(this,"lastSetFocusTrap",void 0),(0,r.Z)(this,"modalClosing",!1),(0,r.Z)(this,"keyUpListener",null)}view(t){return m("[",null,this.attrs.state.modalList.map(((t,e)=>{const n=null==t?void 0:t.componentClass;return m("div",{key:t.key,className:"ModalManager modal","data-modal-key":t.key,"data-modal-number":e,role:"dialog","aria-modal":"true",style:{"--modal-number":e},"aria-hidden":this.attrs.state.modal!==t&&"true"},!!n&&[m(n,Object.assign({key:t.key},t.attrs,{animateShow:this.animateShow.bind(this),animateHide:this.animateHide.bind(this),state:this.attrs.state})),m("div",{key:t.key,className:"ModalManager-invisibleBackdrop",onclick:this.handlePossibleBackdropClick.bind(this)})])})),(this.attrs.state.backdropShown||this.attrs.state.loadingModal)&&m("div",{className:"Modal-backdrop backdrop",ontransitionend:this.onBackdropTransitionEnd.bind(this),"data-showing":!!this.attrs.state.modalList.length||this.attrs.state.loadingModal,style:{"--modal-count":this.attrs.state.modalList.length+Number(this.attrs.state.loadingModal)}},this.attrs.state.loadingModal&&m(y.Z,null)))}oncreate(t){super.oncreate(t),this.keyUpListener=this.handleEscPress.bind(this),document.body.addEventListener("keyup",this.keyUpListener)}onbeforeremove(t){super.onbeforeremove(t),this.keyUpListener&&document.body.removeEventListener("keyup",this.keyUpListener),this.keyUpListener=null}onupdate(t){super.onupdate(t),requestAnimationFrame((()=>{try{var t,e,n,r;if(!this.attrs.state.isModalOpen())return null==(e=document.getElementById("app"))||e.setAttribute("aria-hidden","false"),null==(n=(r=this.focusTrap).deactivate)||n.call(r),void b();null==(t=document.getElementById("app"))||t.setAttribute("aria-hidden","true");const w=this.attrs.state.modal.key;var s,i,m,y;this.focusTrap&&this.lastSetFocusTrap!==w&&(null==(s=(i=this.focusTrap).deactivate)||s.call(i),b()),this.activeDialogElement&&this.lastSetFocusTrap!==w&&(this.focusTrap=(0,o.v)(this.activeDialogElement,{allowOutsideClick:!0}),null==(m=(y=this.focusTrap).activate)||m.call(y),function(t,e){if(t){if(!c.some((function(e){return e.targetElement===t}))){var n={targetElement:t,options:e||{}};c=[].concat(function(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e=r&&(document.body.style.top=-(e+t))}))}),300)}})):function(t){if(void 0===f){var e=!!t&&!0===t.reserveScrollBarGap,n=window.innerWidth-document.documentElement.clientWidth;if(e&&n>0){var r=parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right"),10);f=document.body.style.paddingRight,document.body.style.paddingRight=r+n+"px"}}void 0===h&&(h=document.body.style.overflow,document.body.style.overflow="hidden")}(e),l&&(t.ontouchstart=function(t){1===t.targetTouches.length&&(d=t.targetTouches[0].clientY)},t.ontouchmove=function(e){1===e.targetTouches.length&&function(t,e){var n=t.targetTouches[0].clientY-d;!g(t.target)&&(e&&0===e.scrollTop&&n>0||function(t){return!!t&&t.scrollHeight-t.scrollTop<=t.clientHeight}(e)&&n<0?v(t):t.stopPropagation())}(e,t)},u||(document.addEventListener("touchmove",v,a?{passive:!1}:void 0),u=!0))}}else console.error("disableBodyScroll unsuccessful - targetElement must be provided when calling disableBodyScroll on IOS devices.")}(this.activeDialogManagerElement,{reserveScrollBarGap:!0})),this.lastSetFocusTrap=w}catch{}}))}get activeDialogElement(){var t;return document.body.querySelector('.ModalManager[data-modal-key="'.concat(null==(t=this.attrs.state.modal)?void 0:t.key,'"] .Modal'))}get activeDialogManagerElement(){var t;return document.body.querySelector('.ModalManager[data-modal-key="'.concat(null==(t=this.attrs.state.modal)?void 0:t.key,'"]'))}animateShow(t){void 0===t&&(t=()=>{}),this.attrs.state.modal&&(this.activeDialogElement.addEventListener("transitionend",(()=>{t()}),{once:!0}),requestAnimationFrame((()=>{this.activeDialogElement.classList.add("in")})))}animateHide(t){void 0===t&&(t=()=>{}),this.modalClosing||(this.modalClosing=!0,this.activeDialogElement.addEventListener("transitionend",(()=>{this.modalClosing=!1,this.attrs.state.close(),t()}),{once:!0}),this.activeDialogElement.classList.remove("in"),this.activeDialogElement.classList.add("out"))}handleEscPress(t){if(!this.attrs.state.modal)return;const e=this.attrs.state.modal.componentClass.dismissibleOptions;"Escape"===t.key&&e.viaEscKey&&(t.preventDefault(),this.animateHide())}handlePossibleBackdropClick(t){this.attrs.state.modal&&this.attrs.state.modal.componentClass.dismissibleOptions.viaBackdropClick&&this.animateHide()}onBackdropTransitionEnd(t){"opacity"===t.propertyName&&null===t.currentTarget.getAttribute("data-showing")&&(this.attrs.state.backdropShown=!1,m.redraw())}}flarum.reg.add("core","common/components/ModalManager",w)},5386:(t,e,n)=>{"use strict";n.d(e,{Z:()=>l});var r=n(7465),s=n(2190),o=n(8312),a=n(2360),i=n(3344);class l extends s.Z{view(){const{history:t,pane:e}=r.Z;return m("div",{className:(0,i.Z)("Navigation ButtonGroup",this.attrs.className),onmouseenter:e&&e.show.bind(e),onmouseleave:e&&e.onmouseleave.bind(e)},null!=t&&t.canGoBack()?[this.getBackButton(),this.getPaneButton()]:this.getDrawerButton())}getBackButton(){const{history:t}=r.Z,e=null==t?void 0:t.getPrevious();return m(a.Z,{className:"Button Navigation-back Button--icon",href:null==t?void 0:t.backUrl(),icon:"fas fa-chevron-left","aria-label":null==e?void 0:e.title,onclick:e=>{e.shiftKey||e.ctrlKey||e.metaKey||2===e.which||(e.preventDefault(),null==t||t.back())}})}getPaneButton(){const{pane:t}=r.Z;return t&&t.active?m(o.Z,{className:(0,i.Z)("Button Button--icon Navigation-pin",{active:t.pinned}),onclick:t.togglePinned.bind(t),icon:"fas fa-thumbtack"}):null}getDrawerButton(){if(!this.attrs.drawer)return null;const{drawer:t}=r.Z,e=r.Z.session.user;return m(o.Z,{className:(0,i.Z)("Button Button--icon Navigation-drawer",{new:null==e?void 0:e.newNotificationCount()}),onclick:e=>{e.stopPropagation(),t.show()},icon:"fas fa-bars","aria-label":r.Z.translator.trans("core.lib.nav.drawer_button")})}}flarum.reg.add("core","common/components/Navigation",l)},4661:(t,e,n)=>{"use strict";n.d(e,{Z:()=>i});var r=n(7905),s=n(7465),o=n(2190),a=n(5104);class i extends o.Z{constructor(){super(...arguments),(0,r.Z)(this,"bodyClass",""),(0,r.Z)(this,"scrollTopOnCreate",!0),(0,r.Z)(this,"useBrowserScrollRestoration",!0)}oninit(t){super.oninit(t),s.Z.previous=s.Z.current,s.Z.current=new a.Z(this.constructor,{routeName:this.attrs.routeName}),s.Z.drawer.hide(),s.Z.modal.close()}oncreate(t){super.oncreate(t),this.bodyClass&&$("#app").addClass(this.bodyClass),this.scrollTopOnCreate&&$(window).scrollTop(0),"scrollRestoration"in history&&(history.scrollRestoration=this.useBrowserScrollRestoration?"auto":"manual")}onremove(t){super.onremove(t),this.bodyClass&&$("#app").removeClass(this.bodyClass)}}flarum.reg.add("core","common/components/Page",i)},406:(t,e,n)=>{"use strict";n.d(e,{Z:()=>s});var r=n(7108);class s extends r.Z{className(){return"RequestErrorModal Modal--large"}title(){return!!this.attrs.error.xhr&&"".concat(this.attrs.error.xhr.status," ").concat(this.attrs.error.xhr.statusText)}content(){var t;const{error:e,formattedError:n}=this.attrs;let r;return r=n.length?n.join("\n\n"):e.response?JSON.stringify(e.response,null,2):e.responseText,null!=(t=r)&&t.includes("