diff --git a/extensions/mentions/js/dist/admin.js b/extensions/mentions/js/dist/admin.js index 180a0a730..6bd6ae8ec 100644 --- a/extensions/mentions/js/dist/admin.js +++ b/extensions/mentions/js/dist/admin.js @@ -1,2 +1,2 @@ -module.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=37)}({14:function(e,t){app.initializers.add("flarum-mentions",(function(){app.extensionData.for("flarum-mentions").registerSetting({setting:"flarum-mentions.allow_username_format",type:"boolean",label:app.translator.trans("flarum-mentions.admin.settings.allow_username_format_label"),help:app.translator.trans("flarum-mentions.admin.settings.allow_username_format_text")})}))},37:function(e,t,n){"use strict";n.r(t);var r=n(14);for(var o in r)["default"].indexOf(o)<0&&function(e){n.d(t,e,(function(){return r[e]}))}(o)}}); +module.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=32)}({32:function(e,t,n){"use strict";n.r(t);var r=n(6),o=n.n(r);o.a.initializers.add("flarum-mentions",(function(){o.a.extensionData.for("flarum-mentions").registerSetting({setting:"flarum-mentions.allow_username_format",type:"boolean",label:o.a.translator.trans("flarum-mentions.admin.settings.allow_username_format_label"),help:o.a.translator.trans("flarum-mentions.admin.settings.allow_username_format_text")})}))},6:function(e,t){e.exports=flarum.core.compat["admin/app"]}}); //# sourceMappingURL=admin.js.map \ No newline at end of file diff --git a/extensions/mentions/js/dist/admin.js.map b/extensions/mentions/js/dist/admin.js.map index b9feb16e9..f0bd93027 100644 --- a/extensions/mentions/js/dist/admin.js.map +++ b/extensions/mentions/js/dist/admin.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack://@flarum/mentions/webpack/bootstrap","webpack://@flarum/mentions/./src/admin/index.js","webpack://@flarum/mentions/./admin.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","app","initializers","add","extensionData","registerSetting","setting","type","label","translator","trans","help"],"mappings":"2BACE,IAAIA,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUC,QAGnC,IAAIC,EAAS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EAAQC,IAGzG/B,EAAoBkC,EAAI,GAIjBlC,EAAoBA,EAAoBmC,EAAI,I,mBClFrDC,IAAIC,aAAaC,IAAI,mBAAmB,WACtCF,IAAIG,cAAJ,IAAsB,mBAAmBC,gBAAgB,CACvDC,QAAS,wCACTC,KAAM,UACNC,MAAOP,IAAIQ,WAAWC,MAAM,8DAC5BC,KAAMV,IAAIQ,WAAWC,MAAM,mE,gCCL/B","file":"admin.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 37);\n","app.initializers.add('flarum-mentions', function () {\n app.extensionData.for('flarum-mentions').registerSetting({\n setting: 'flarum-mentions.allow_username_format',\n type: 'boolean',\n label: app.translator.trans('flarum-mentions.admin.settings.allow_username_format_label'),\n help: app.translator.trans('flarum-mentions.admin.settings.allow_username_format_text'),\n });\n});\n","export * from './src/admin';\n"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack://@flarum/mentions/webpack/bootstrap","webpack://@flarum/mentions/./src/admin/index.ts","webpack://@flarum/mentions/external \"flarum.core.compat['admin/app']\""],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","app","initializers","add","extensionData","registerSetting","setting","type","label","translator","trans","help","flarum","core","compat"],"mappings":"2BACE,IAAIA,EAAmB,GAGvB,SAASC,EAAoBC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Ba,EAAI,SAASiB,EAAQC,GAAY,OAAOjB,OAAOkB,UAAUC,eAAe1B,KAAKuB,EAAQC,IAGzG/B,EAAoBkC,EAAI,GAIjBlC,EAAoBA,EAAoBmC,EAAI,I,6DChFrDC,IAAIC,aAAaC,IAAI,mBAAmB,WACtCF,IAAIG,cAAJ,IAAsB,mBAAmBC,gBAAgB,CACvDC,QAAS,wCACTC,KAAM,UACNC,MAAOP,IAAIQ,WAAWC,MAAM,8DAC5BC,KAAMV,IAAIQ,WAAWC,MAAM,mE,gBCP/B1C,EAAOD,QAAU6C,OAAOC,KAAKC,OAAO","file":"admin.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 32);\n","import app from 'flarum/admin/app';\n\napp.initializers.add('flarum-mentions', function () {\n app.extensionData.for('flarum-mentions').registerSetting({\n setting: 'flarum-mentions.allow_username_format',\n type: 'boolean',\n label: app.translator.trans('flarum-mentions.admin.settings.allow_username_format_label'),\n help: app.translator.trans('flarum-mentions.admin.settings.allow_username_format_text'),\n });\n});\n","module.exports = flarum.core.compat['admin/app'];"],"sourceRoot":""} \ No newline at end of file diff --git a/extensions/mentions/js/dist/forum.js b/extensions/mentions/js/dist/forum.js index 0b743f439..676eb2bc2 100644 --- a/extensions/mentions/js/dist/forum.js +++ b/extensions/mentions/js/dist/forum.js @@ -1,2 +1,2 @@ -module.exports=function(t){var e={};function n(o){if(e[o])return e[o].exports;var r=e[o]={i:o,l:!1,exports:{}};return t[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=t,n.c=e,n.d=function(t,e,o){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)n.d(o,r,function(e){return t[e]}.bind(null,r));return o},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=38)}([function(t,e){t.exports=flarum.core.compat["common/extend"]},function(t,e){t.exports=flarum.core.compat.app},function(t,e){t.exports=flarum.core.compat.extend},function(t,e){t.exports=flarum.core.compat["utils/string"]},function(t,e){t.exports=flarum.core.compat["forum/components/CommentPost"]},function(t,e){t.exports=flarum.core.compat["forum/components/PostPreview"]},function(t,e){t.exports=flarum.core.compat["common/helpers/username"]},function(t,e){t.exports=flarum.core.compat["components/CommentPost"]},function(t,e){t.exports=flarum.core.compat["forum/components/EditPostComposer"]},function(t,e){t.exports=flarum.core.compat.Fragment},function(t,e){t.exports=flarum.core.compat["components/Notification"]},function(t,e){t.exports=flarum.core.compat["common/components/TextEditor"]},function(t,e){t.exports=flarum.core.compat["helpers/username"]},function(t,e){t.exports=flarum.core.compat["utils/extractText"]},,function(t,e){t.exports=flarum.core.compat["components/NotificationGrid"]},function(t,e){t.exports=flarum.core.compat["common/components/LoadingIndicator"]},function(t,e){t.exports=flarum.core.compat["common/Model"]},function(t,e){t.exports=flarum.core.compat["common/models/Post"]},function(t,e){t.exports=flarum.core.compat["common/components/Link"]},function(t,e){t.exports=flarum.core.compat["common/helpers/punctuateSeries"]},function(t,e){t.exports=flarum.core.compat["common/helpers/icon"]},function(t,e){t.exports=flarum.core.compat["components/Button"]},function(t,e){t.exports=flarum.core.compat["forum/utils/DiscussionControls"]},function(t,e){t.exports=flarum.core.compat["common/utils/extractText"]},function(t,e){t.exports=flarum.core.compat["helpers/icon"]},function(t,e){t.exports=flarum.core.compat["common/components/TextEditorButton"]},function(t,e){t.exports=flarum.core.compat["forum/components/ReplyComposer"]},function(t,e){t.exports=flarum.core.compat["common/helpers/avatar"]},function(t,e){t.exports=flarum.core.compat["common/helpers/highlight"]},function(t,e){t.exports=flarum.core.compat["forum/utils/KeyboardNavigatable"]},function(t,e){t.exports=flarum.core.compat["common/utils/string"]},function(t,e){t.exports=flarum.core.compat["common/utils/throttleDebounce"]},function(t,e){t.exports=flarum.core.compat["components/UserPage"]},function(t,e){t.exports=flarum.core.compat["components/LinkButton"]},function(t,e){t.exports=flarum.core.compat["components/PostsUserPage"]},function(t,e){t.exports=flarum.core},,function(t,e,n){"use strict";n.r(e),n.d(e,"filterUserMentions",(function(){return kt})),n.d(e,"filterPostMentions",(function(){return Nt}));var o={};n.r(o),n.d(o,"insertMention",(function(){return F})),n.d(o,"default",(function(){return z}));var r={};n.r(r),n.d(r,"filterUserMentions",(function(){return kt})),n.d(r,"filterPostMentions",(function(){return Nt}));var s=n(2),i=n(1),a=n.n(i),u=n(15),c=n.n(u),f=n(3),p=n(0),l=n(4),d=n.n(l),h=n(5),v=n.n(h),b=n(16),g=n.n(b);var y=n(17),x=n.n(y),w=n(18),P=n.n(w),C=n(19),M=n.n(C),T=n(20),_=n.n(T),j=n(6),O=n.n(j),B=n(21),A=n.n(B);var k=n(22),N=n.n(k),S=n(7),H=n.n(S),D=n(23),I=n.n(D),U=n(8),E=n.n(U),W=n(24),L=n.n(W),R=function(){return L()(app.translator.trans("core.lib.username.deleted_text"))};function q(t,e){return void 0===e&&(e=!0),t?((e?t.displayName():t.username())||R()).replace(/"#[a-z]{0,3}[0-9]+/,"_"):R().replace(/"#[a-z]{0,3}[0-9]+/,"_")}function J(t,e){return void 0===e?app.forum.attribute("allowUsernameMentionFormat")?"@"+q(t,!1):'@"'+q(t)+'"#'+t.id():'@"'+q(t)+'"#p'+e}function F(t,e,n){return new Promise((function(o){var r=J(t.user(),t.id())+" ";e.fields.content()||(e.body.attrs.originalContent=r);var s=e.editor.getSelectionRange()[0],i=e.fields.content().slice(0,s),a=0==i.length?0:3-i.match(/(\n{0,2})$/)[0].length;return e.editor.insertAtCursor(Array(a).join("\n")+(n?"> "+r+n.trim().replace(/\n/g,"\n> ")+"\n\n":r),!1),o(e)}))}function z(t,e){return app.composer.bodyMatches(E.a)&&app.composer.body.attrs.post.discussion()===t.discussion()?F(t,app.composer,e):I.a.replyAction.call(t.discussion()).then((function(n){return F(t,n,e)}))}function Q(t,e){return(Q=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function X(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,Q(t,e)}var Y=n(9),G=n.n(Y),K=n(25),V=n.n(K),Z=function(t){function e(e){var n;return(n=t.call(this)||this).post=e,n}X(e,t);var n=e.prototype;return n.view=function(){var t=this;return m("button",{class:"Button PostQuoteButton",onclick:function(){z(t.post,t.content)}},V()("fas fa-quote-left",{className:"Button-icon"}),app.translator.trans("flarum-mentions.forum.post.quote_button"))},n.show=function(t,e){var n=this.$().show(),o=n.offsetParent().offset();n.css("left",t-o.left).css("top",e-o.top),this.hideHandler=this.hide.bind(this),$(document).on("mouseup",this.hideHandler)},n.showStart=function(t,e){var n=this.$();this.show(t,$(window).scrollTop()+e-n.outerHeight()-5)},n.showEnd=function(t,e){var n=this.$();this.show(t-n.outerWidth(),$(window).scrollTop()+e+5)},n.hide=function(){this.$().hide(),$(document).off("mouseup",this.hideHandler)},e}(G.a);function tt(t){var e=window.getSelection();if(null!=e&&e.rangeCount){var n=e.getRangeAt(0),o=n.commonAncestorContainer;if(t[0]===o||$.contains(t[0],o)){var r=$("
").append(n.cloneContents());return r.find("img.emoji").replaceWith((function(){return this.alt})),r.find("img").replaceWith((function(){return"![]("+this.src+")"})),r.find("a").replaceWith((function(){return"["+this.innerText+"]("+this.href+")"})),r.text()}}return""}var et=n(11),nt=n.n(et),ot=n(26),rt=n.n(ot),st=n(27),it=n.n(st),at=n(28),ut=n.n(at),ct=n(29),ft=n.n(ct),pt=n(30),mt=n.n(pt),lt=n(31),dt=n(32),ht=function(t){function e(){for(var e,n=arguments.length,o=new Array(n),r=0;r=o.length&&(r=0),this.index=r;var s=o.removeClass("active").eq(r).addClass("active");if(e){var i,a=n.scrollTop(),u=n.offset().top,c=u+n.outerHeight(),f=s.offset().top,p=f+s.outerHeight();fc&&(i=a-c+p+parseInt(n.css("padding-bottom"),10)),void 0!==i&&n.stop(!0).animate({scrollTop:i},100)}}},e}(G.a),vt=Object(dt.throttle)(250,(function(t,e,n,o,r,s){var i=t.toLowerCase();e.includes(i)||(app.store.find("users",{filter:{q:t},page:{limit:5}}).then((function(t){t.forEach((function(t){o.has(t.id())||(o.add(t.id()),n.push(t))})),s()})),e.push(i))}));function bt(){var t=$('
'),e=new ht;Object(p.extend)(nt.a.prototype,"oncreate",(function(){var n=this.$(".TextEditor-editor").wrap('
');this.navigator=new mt.a,this.navigator.when((function(){return e.active})).onUp((function(){return e.navigate(-1)})).onDown((function(){return e.navigate(1)})).onSelect(e.complete.bind(e)).onCancel(e.hide.bind(e)).bindTo(n),n.after(t)})),Object(p.extend)(nt.a.prototype,"buildEditorParams",(function(n){var o,r,s,i,a=this,u=[],c=Array.from(app.store.all("users")),f=new Set(c.map((function(t){return t.id()})));n.inputListeners.push((function(){var n=a.attrs.composer.editor.getSelectionRange(),p=n[0];if(!(n[1]-p>0)){var l=a.attrs.composer.editor.getLastNChars(30);r=0;for(var d=l.length-1;d>=0;d--){if("@"===l.substr(d,1)&&(0==d||/\s/.test(l.substr(d-1,1)))){o=d+1,r=p-l.length+d+1;break}}if(e.hide(),e.active=!1,r){s=l.substring(o).toLowerCase(),i=s.match(/^["|“]((?:(?!"#).)+)$/),s=i&&i[1]||s;var h=function(t,n,o,i){void 0===i&&(i="");var u=O()(t);return s&&(u.children=[ft()(u.text,s)],delete u.text),m("button",{className:"PostPreview "+i,onclick:function(){return function(t){a.attrs.composer.editor.replaceBeforeCursor(r-1,t+" "),e.hide()}(n)},onmouseenter:function(){e.setIndex($(this).parent().index())}},m("span",{className:"PostPreview-content"},ut()(t),u," ",o))},v=function(t){return[t.username(),t.displayName()].some((function(t){return t.toLowerCase().substr(0,s.length)===s}))},b=function(){var n=[];if(s&&c.forEach((function(t){v(t)&&n.push(h(t,J(t),"","MentionsDropdown-user"))})),a.attrs.composer.bodyMatches(it.a)||a.attrs.composer.bodyMatches(E.a)){var o=a.attrs.composer.body.attrs,i=o.post,u=i&&i.discussion()||o.discussion;u&&u.posts().filter((function(t){return t&&"comment"===t.contentType()&&(!i||t.number()d.height()&&(g=f.top-l-15),b+p>d.width()&&(b=d.width()-p),g=Math.max(-(d.offset().top-$(document).scrollTop()),g),b=Math.max(-d.offset().left,b),e.show(b,g)}else e.active=!1,e.hide()};e.active=!0,b(),e.setIndex(0),e.$().scrollTop(0),s.length>1&&app.forum.attribute("canSearchUsers")&&vt(s,u,c,f,e,b)}}}))})),Object(p.extend)(nt.a.prototype,"toolbarItems",(function(t){var e=this;t.add("mention",m(rt.a,{onclick:function(){return e.attrs.composer.editor.insertAtCursor(" @")},icon:"fas fa-at"},app.translator.trans("flarum-mentions.forum.composer.mention_tooltip")))}))}var gt=n(10),yt=n.n(gt),xt=function(t){function e(){return t.apply(this,arguments)||this}X(e,t);var n=e.prototype;return n.icon=function(){return"fas fa-reply"},n.href=function(){var t=this.attrs.notification,e=t.subject(),n=t.content();return app.route.discussion(e.discussion(),n&&n.replyNumber)},n.content=function(){var t=this.attrs.notification.fromUser();return app.translator.trans("flarum-mentions.forum.notifications.post_mentioned_text",{user:t,count:1})},n.excerpt=function(){return Object(f.truncate)(this.attrs.notification.subject().contentPlain(),200)},e}(yt.a),wt=function(t){function e(){return t.apply(this,arguments)||this}X(e,t);var n=e.prototype;return n.icon=function(){return"fas fa-at"},n.href=function(){var t=this.attrs.notification.subject();return app.route.discussion(t.discussion(),t.number())},n.content=function(){var t=this.attrs.notification.fromUser();return app.translator.trans("flarum-mentions.forum.notifications.user_mentioned_text",{user:t})},n.excerpt=function(){return Object(f.truncate)(this.attrs.notification.subject().contentPlain(),200)},e}(yt.a),Pt=n(33),$t=n.n(Pt),Ct=n(34),Mt=n.n(Ct),Tt=n(35),_t=function(t){function e(){return t.apply(this,arguments)||this}return X(e,t),e.prototype.loadResults=function(t){return app.store.find("posts",{filter:{type:"comment",mentioned:this.user.id()},page:{offset:t,limit:this.loadLimit},sort:"-createdAt"})},e}(n.n(Tt).a),jt=n(12),Ot=n.n(jt),Bt=n(13),At=n.n(Bt);function kt(t){var e;if(app.forum.attribute("allowUsernameMentionFormat")&&t.hasAttribute("username")?e=app.store.getBy("users","username",t.getAttribute("username")):t.hasAttribute("id")&&(e=app.store.getById("users",t.getAttribute("id"))),e)return t.setAttribute("id",e.id()),t.setAttribute("slug",e.slug()),t.setAttribute("displayname",At()(Ot()(e))),!0;t.invalidate()}function Nt(t){var e=app.store.getById("posts",t.getAttribute("id"));if(e)return t.setAttribute("discussionid",e.discussion().id()),t.setAttribute("number",e.number()),t.setAttribute("displayname",At()(Ot()(e.user()))),!0}var St={"mentions/components/MentionsUserPage":_t,"mentions/components/PostMentionedNotification":xt,"mentions/components/UserMentionedNotification":wt,"mentions/fragments/AutocompleteDropdown":ht,"mentions/fragments/PostQuoteButton":Z,"mentions/utils/getCleanDisplayName":q,"mentions/utils/getMentionText":J,"mentions/utils/reply":o,"mentions/utils/selectedText":tt,"mentions/utils/textFormatter":r},Ht=n(36);a.a.initializers.add("flarum-mentions",(function(){!function(){function t(){var t=this.attrs.post.contentHtml();if(t!==this.oldPostContentHtml&&!this.isEditing()){this.oldPostContentHtml=t;var e=this.attrs.post,n=this.$();this.$().on("click",".UserMention:not(.UserMention--deleted), .PostMention:not(.PostMention--deleted)",(function(t){m.route.set(this.getAttribute("href")),t.preventDefault()})),this.$(".PostMention:not(.PostMention--deleted)").each((function(){var t,o=$(this),r=o.data("id"),s=$('