mirror of
https://github.com/flarum/framework.git
synced 2024-12-03 07:33:36 +08:00
f66a1b998f
Includes transpiled JS/TS, and Typescript declaration files (typings). [skip ci]
1 line
100 KiB
Plaintext
Generated
1 line
100 KiB
Plaintext
Generated
{"version":3,"file":"forum.js","mappings":"MACA,IAAIA,EAAsB,CCA1BA,EAAyBC,IACxB,IAAIC,EAASD,GAAUA,EAAOE,WAC7B,IAAOF,EAAiB,QACxB,IAAM,EAEP,OADAD,EAAoBI,EAAEF,EAAQ,CAAEG,EAAGH,IAC5BA,CAAM,ECLdF,EAAwB,CAACM,EAASC,KACjC,IAAI,IAAIC,KAAOD,EACXP,EAAoBS,EAAEF,EAAYC,KAASR,EAAoBS,EAAEH,EAASE,IAC5EE,OAAOC,eAAeL,EAASE,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,IAE1E,ECNDR,EAAwB,CAACc,EAAKC,IAAUL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,GCClFf,EAAyBM,IACH,oBAAXa,QAA0BA,OAAOC,aAC1CV,OAAOC,eAAeL,EAASa,OAAOC,YAAa,CAAEC,MAAO,WAE7DX,OAAOC,eAAeL,EAAS,aAAc,CAAEe,OAAO,GAAO,G,sRCL9D,MAAM,EAA+BC,OAAOC,IAAIV,IAAI,OAAQ,iBCAtD,EAA+BS,OAAOC,IAAIV,IAAI,OAAQ,a,aCA5D,MAAM,EAA+BS,OAAOC,IAAIV,IAAI,OAAQ,uBCAtD,EAA+BS,OAAOC,IAAIV,IAAI,OAAQ,oC,aCA5D,MAAM,EAA+BS,OAAOC,IAAIV,IAAI,OAAQ,yB,aCA5D,MAAM,EAA+BS,OAAOC,IAAIV,IAAI,OAAQ,gC,aCA5D,MAAM,EAA+BS,OAAOC,IAAIV,IAAI,OAAQ,gC,aCA5D,MAAM,EAA+BS,OAAOC,IAAIV,IAAI,OAAQ,sC,aCA5D,MAAM,EAA+BS,OAAOC,IAAIV,IAAI,OAAQ,0B,aCA5D,MAAM,EAA+B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C,kBAAoB,wBACxFA,EAAQlK,MAAMwC,UAAY,iCAE9B,GAAE,G","sources":["webpack://@flarum/mentions/webpack/bootstrap","webpack://@flarum/mentions/webpack/runtime/compat get default export","webpack://@flarum/mentions/webpack/runtime/define property getters","webpack://@flarum/mentions/webpack/runtime/hasOwnProperty shorthand","webpack://@flarum/mentions/webpack/runtime/make namespace object","webpack://@flarum/mentions/external root \"flarum.reg.get('core', 'common/extend')\"","webpack://@flarum/mentions/external root \"flarum.reg.get('core', 'forum/app')\"","webpack://@flarum/mentions/external root \"flarum.reg.get('core', 'common/utils/string')\"","webpack://@flarum/mentions/external root \"flarum.reg.get('core', 'common/helpers/textContrastClass')\"","webpack://@flarum/mentions/external root \"flarum.reg.get('core', 'forum/components/Post')\"","webpack://@flarum/mentions/external root \"flarum.reg.get('core', 'forum/components/CommentPost')\"","webpack://@flarum/mentions/external root \"flarum.reg.get('core', 'forum/components/PostPreview')\"","webpack://@flarum/mentions/external root \"flarum.reg.get('core', 'common/components/LoadingIndicator')\"","webpack://@flarum/mentions/external root \"flarum.reg.get('core', 'common/components/Link')\"","webpack://@flarum/mentions/external root \"flarum.reg.get('core', 'common/helpers/punctuateSeries')\"","webpack://@flarum/mentions/external root \"flarum.reg.get('core', 'common/helpers/username')\"","webpack://@flarum/mentions/external root \"flarum.reg.get('core', 'common/components/Icon')\"","webpack://@flarum/mentions/external root \"flarum.reg.get('core', 'common/components/Button')\"","webpack://@flarum/mentions/external root \"flarum.reg.get('core', 'common/components/Modal')\"","webpack://@flarum/mentions/external root \"flarum.reg.get('core', 'common/states/PaginatedListState')\"","webpack://@flarum/mentions/./src/forum/state/MentionedByModalState.ts","webpack://@flarum/mentions/external root \"flarum.reg.get('core', 'common/components/Form')\"","webpack://@flarum/mentions/./src/forum/components/MentionedByModal.tsx","webpack://@flarum/mentions/external root \"flarum.reg.get('core', 'forum/utils/DiscussionControls')\"","webpack://@flarum/mentions/./src/forum/utils/reply.js","webpack://@flarum/mentions/external root \"flarum.reg.get('core', 'common/Fragment')\"","webpack://@flarum/mentions/./src/forum/fragments/PostQuoteButton.js","webpack://@flarum/mentions/./src/forum/utils/selectedText.js","webpack://@flarum/mentions/external root \"flarum.reg.get('core', 'common/components/TextEditorButton')\"","webpack://@flarum/mentions/external root \"flarum.reg.get('core', 'common/utils/KeyboardNavigatable')\"","webpack://@flarum/mentions/external root \"flarum.reg.get('core', 'common/utils/AutocompleteReader')\"","webpack://@flarum/mentions/external root \"flarum.reg.get('core', 'common/utils/throttleDebounce')\"","webpack://@flarum/mentions/../../../js-packages/webpack-config/node_modules/@babel/runtime/helpers/esm/typeof.js","webpack://@flarum/mentions/../../../js-packages/webpack-config/node_modules/@babel/runtime/helpers/esm/defineProperty.js","webpack://@flarum/mentions/../../../js-packages/webpack-config/node_modules/@babel/runtime/helpers/esm/toPropertyKey.js","webpack://@flarum/mentions/../../../js-packages/webpack-config/node_modules/@babel/runtime/helpers/esm/toPrimitive.js","webpack://@flarum/mentions/./src/forum/fragments/AutocompleteDropdown.js","webpack://@flarum/mentions/external root \"flarum.reg.get('core', 'common/Component')\"","webpack://@flarum/mentions/external root \"flarum.reg.get('core', 'common/utils/classList')\"","webpack://@flarum/mentions/./src/forum/components/MentionsDropdownItem.tsx","webpack://@flarum/mentions/./src/forum/mentionables/MentionableModels.tsx","webpack://@flarum/mentions/./src/forum/mentionables/formats/MentionFormat.ts","webpack://@flarum/mentions/external root \"flarum.reg.get('core', 'common/components/Avatar')\"","webpack://@flarum/mentions/external root \"flarum.reg.get('core', 'common/helpers/highlight')\"","webpack://@flarum/mentions/./src/forum/mentionables/MentionableModel.ts","webpack://@flarum/mentions/external root \"flarum.reg.get('core', 'common/utils/extractText')\"","webpack://@flarum/mentions/./src/forum/utils/getCleanDisplayName.js","webpack://@flarum/mentions/./src/forum/mentionables/UserMention.tsx","webpack://@flarum/mentions/./src/forum/mentionables/PostMention.tsx","webpack://@flarum/mentions/external root \"flarum.reg.get('core', 'common/models/Group')\"","webpack://@flarum/mentions/external root \"flarum.reg.get('core', 'common/components/Badge')\"","webpack://@flarum/mentions/./src/forum/mentionables/GroupMention.tsx","webpack://@flarum/mentions/./src/forum/mentionables/formats/AtMentionFormat.ts","webpack://@flarum/mentions/./src/forum/mentionables/TagMention.tsx","webpack://@flarum/mentions/./src/forum/mentionables/formats/HashMentionFormat.ts","webpack://@flarum/mentions/./src/forum/mentionables/formats/MentionFormats.ts","webpack://@flarum/mentions/external root \"flarum.reg.get('core', 'forum/components/UserPage')\"","webpack://@flarum/mentions/external root \"flarum.reg.get('core', 'common/components/LinkButton')\"","webpack://@flarum/mentions/external root \"flarum.reg.get('core', 'common/extenders')\"","webpack://@flarum/mentions/external root \"flarum.reg.get('core', 'common/models/Post')\"","webpack://@flarum/mentions/external root \"flarum.reg.get('core', 'common/models/User')\"","webpack://@flarum/mentions/external root \"flarum.reg.get('core', 'forum/components/PostsUserPage')\"","webpack://@flarum/mentions/./src/forum/components/MentionsUserPage.ts","webpack://@flarum/mentions/external root \"flarum.reg.get('core', 'forum/components/Notification')\"","webpack://@flarum/mentions/./src/forum/components/PostMentionedNotification.js","webpack://@flarum/mentions/./src/forum/components/UserMentionedNotification.js","webpack://@flarum/mentions/./src/forum/components/GroupMentionedNotification.js","webpack://@flarum/mentions/external root \"flarum.reg.get('core', 'common/query/IGambit')\"","webpack://@flarum/mentions/external root \"flarum.reg.get('core', 'common/app')\"","webpack://@flarum/mentions/./src/common/query/posts/MentionedGambit.ts","webpack://@flarum/mentions/./src/common/extend.ts","webpack://@flarum/mentions/./src/forum/extend.ts","webpack://@flarum/mentions/./src/forum/utils/textFormatter.js","webpack://@flarum/mentions/./src/forum/extenders/Mentionables.ts","webpack://@flarum/mentions/./src/forum/index.js","webpack://@flarum/mentions/./src/forum/addPostMentionPreviews.js","webpack://@flarum/mentions/./src/forum/addMentionedByList.js","webpack://@flarum/mentions/./src/forum/addPostReplyAction.js","webpack://@flarum/mentions/./src/forum/addPostQuoteButton.js","webpack://@flarum/mentions/./src/forum/addComposerAutocomplete.js"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/extend');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/app');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/utils/string');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/helpers/textContrastClass');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/components/Post');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/components/CommentPost');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/components/PostPreview');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/components/LoadingIndicator');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/components/Link');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/helpers/punctuateSeries');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/helpers/username');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/components/Icon');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/components/Button');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/components/Modal');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/states/PaginatedListState');","import PaginatedListState from 'flarum/common/states/PaginatedListState';\nexport default class MentionedByModalState extends PaginatedListState {\n constructor(params, page) {\n if (page === void 0) {\n page = 1;\n }\n const limit = 10;\n params.page = {\n ...(params.page || {}),\n limit\n };\n super(params, page, limit);\n }\n get type() {\n return 'posts';\n }\n}\nflarum.reg.add('flarum-mentions', 'forum/state/MentionedByModalState', MentionedByModalState);","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/components/Form');","import app from 'flarum/forum/app';\nimport PostPreview from 'flarum/forum/components/PostPreview';\nimport Modal from 'flarum/common/components/Modal';\nimport LoadingIndicator from 'flarum/common/components/LoadingIndicator';\nimport Button from 'flarum/common/components/Button';\nimport MentionedByModalState from '../state/MentionedByModalState';\nimport Form from 'flarum/common/components/Form';\nexport default class MentionedByModal extends Modal {\n oninit(vnode) {\n super.oninit(vnode);\n this.state = new MentionedByModalState({\n filter: {\n mentionedPost: this.attrs.post.id()\n },\n sort: 'number'\n });\n this.state.refresh();\n }\n className() {\n return 'MentionedByModal';\n }\n title() {\n return app.translator.trans('flarum-mentions.forum.mentioned_by.title');\n }\n content() {\n return m('[', null, m(\"div\", {\n className: \"Modal-body\"\n }, this.state.isInitialLoading() ? m(LoadingIndicator, null) : m('[', null, m(\"ul\", {\n className: \"MentionedByModal-list Dropdown-menu Dropdown-menu--inline Post-mentionedBy-preview\"\n }, this.state.getPages().map(page => page.items.map(reply => m(\"li\", {\n \"data-number\": reply.number()\n }, m(PostPreview, {\n post: reply,\n onclick: () => app.modal.close()\n }))))))), this.state.hasNext() && m(\"div\", {\n className: \"Modal-footer\"\n }, m(Form, {\n className: \"Form--centered\"\n }, m(\"div\", {\n className: \"Form-group\"\n }, m(Button, {\n className: \"Button Button--block\",\n onclick: () => this.state.loadNext(),\n loading: this.state.isLoadingNext()\n }, app.translator.trans('flarum-mentions.forum.mentioned_by.load_more_button'))))));\n }\n}\nflarum.reg.add('flarum-mentions', 'forum/components/MentionedByModal', MentionedByModal);","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/utils/DiscussionControls');","import app from 'flarum/forum/app';\nimport DiscussionControls from 'flarum/forum/utils/DiscussionControls';\nexport function insertMention(post, composer, quote) {\n return new Promise(resolve => {\n const mention = app.mentionFormats.mentionable('post').replacement(post) + ' ';\n\n // If the composer is empty, then assume we're starting a new reply.\n // In which case we don't want the user to have to confirm if they\n // close the composer straight away.\n if (!composer.fields.content()) {\n composer.body.attrs.originalContent = mention;\n }\n const cursorPosition = composer.editor.getSelectionRange()[0];\n const preceding = composer.fields.content().slice(0, cursorPosition);\n const precedingNewlines = preceding.length == 0 ? 0 : 3 - preceding.match(/(\\n{0,2})$/)[0].length;\n composer.editor.insertAtCursor(Array(precedingNewlines).join('\\n') + (\n // Insert up to two newlines, depending on preceding whitespace\n quote ? '> ' + mention + quote.trim().replace(/\\n/g, '\\n> ') + '\\n\\n' : mention), false);\n return resolve(composer);\n });\n}\nexport default function reply(post, quote) {\n const EditPostComposer = flarum.reg.checkModule('core', 'forum/components/EditPostComposer');\n if (EditPostComposer && app.composer.bodyMatches(EditPostComposer) && app.composer.body.attrs.post.discussion() === post.discussion()) {\n // If we're already editing a post in the discussion of post we're quoting,\n // insert the mention directly.\n return insertMention(post, app.composer, quote);\n } else {\n // The default \"Reply\" action behavior will only open a new composer if\n // necessary, but it will always be a ReplyComposer, hence the exceptional\n // case above.\n return DiscussionControls.replyAction.call(post.discussion()).then(composer => insertMention(post, composer, quote));\n }\n}\nflarum.reg.add('flarum-mentions', 'forum/utils/reply', reply);","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/Fragment');","import app from 'flarum/forum/app';\nimport Fragment from 'flarum/common/Fragment';\nimport Icon from 'flarum/common/components/Icon';\nimport reply from '../utils/reply';\nexport default class PostQuoteButton extends Fragment {\n constructor(post) {\n super();\n this.post = post;\n }\n view() {\n return m(\"button\", {\n className: \"Button PostQuoteButton\",\n onclick: () => {\n reply(this.post, this.content);\n }\n }, m(Icon, {\n name: \"fas fa-quote-left\",\n className: \"Button-icon\"\n }), app.translator.trans('flarum-mentions.forum.post.quote_button'));\n }\n show(left, top) {\n const $this = this.$().show();\n const parentOffset = $this.offsetParent().offset();\n $this.css('left', left - parentOffset.left).css('top', top - parentOffset.top);\n this.hideHandler = this.hide.bind(this);\n $(document).on('mouseup', this.hideHandler);\n }\n showStart(left, top) {\n const $this = this.$();\n this.show(left, $(window).scrollTop() + top - $this.outerHeight() - 5);\n }\n showEnd(right, bottom) {\n const $this = this.$();\n this.show(right - $this.outerWidth(), $(window).scrollTop() + bottom + 5);\n }\n hide() {\n this.$().hide();\n $(document).off('mouseup', this.hideHandler);\n }\n}\nflarum.reg.add('flarum-mentions', 'forum/fragments/PostQuoteButton', PostQuoteButton);","/**\n * Finds the selected text in the provided composer body.\n */\nexport default function selectedText(body) {\n const selection = window.getSelection();\n if (!selection.isCollapsed) {\n const range = selection.getRangeAt(0);\n const parent = range.commonAncestorContainer;\n if (body[0] === parent || $.contains(body[0], parent)) {\n const clone = $('<div>').append(range.cloneContents());\n\n // Replace emoji images with their shortcode (found in alt attribute)\n clone.find('img.emoji').replaceWith(function () {\n return this.alt;\n });\n\n // Replace all other images with a Markdown image\n clone.find('img').replaceWith(function () {\n return \"![](\".concat(this.src, \")\");\n });\n\n // Replace all links with a Markdown link\n clone.find('a').replaceWith(function () {\n return \"[\".concat(this.innerText, \"](\").concat(this.href, \")\");\n });\n return clone.text();\n }\n }\n return '';\n}\nflarum.reg.add('flarum-mentions', 'forum/utils/selectedText', selectedText);","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/components/TextEditorButton');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/utils/KeyboardNavigatable');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/utils/AutocompleteReader');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/utils/throttleDebounce');","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}","import _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport Fragment from 'flarum/common/Fragment';\nexport default class AutocompleteDropdown extends Fragment {\n constructor() {\n super(...arguments);\n _defineProperty(this, \"items\", []);\n _defineProperty(this, \"active\", false);\n _defineProperty(this, \"index\", 0);\n _defineProperty(this, \"keyWasJustPressed\", false);\n }\n view() {\n return m(\"ul\", {\n className: \"Dropdown-menu MentionsDropdown\"\n }, this.items.map(item => m(\"li\", null, item)));\n }\n show(left, top) {\n this.$().show().css({\n left: left + 'px',\n top: top + 'px'\n });\n this.active = true;\n }\n hide() {\n this.$().hide();\n this.active = false;\n }\n navigate(delta) {\n this.keyWasJustPressed = true;\n this.setIndex(this.index + delta, true);\n clearTimeout(this.keyWasJustPressedTimeout);\n this.keyWasJustPressedTimeout = setTimeout(() => this.keyWasJustPressed = false, 500);\n }\n complete() {\n this.$('li').eq(this.index).find('button').click();\n }\n setIndex(index, scrollToItem) {\n if (this.keyWasJustPressed && !scrollToItem) return;\n const $dropdown = this.$();\n const $items = $dropdown.find('li');\n let rangedIndex = index;\n if (rangedIndex < 0) {\n rangedIndex = $items.length - 1;\n } else if (rangedIndex >= $items.length) {\n rangedIndex = 0;\n }\n this.index = rangedIndex;\n const $item = $items.removeClass('active').eq(rangedIndex).addClass('active');\n if (scrollToItem) {\n const dropdownScroll = $dropdown.scrollTop();\n const dropdownTop = $dropdown.offset().top;\n const dropdownBottom = dropdownTop + $dropdown.outerHeight();\n const itemTop = $item.offset().top;\n const itemBottom = itemTop + $item.outerHeight();\n let scrollTop;\n if (itemTop < dropdownTop) {\n scrollTop = dropdownScroll - dropdownTop + itemTop - parseInt($dropdown.css('padding-top'), 10);\n } else if (itemBottom > dropdownBottom) {\n scrollTop = dropdownScroll - dropdownBottom + itemBottom + parseInt($dropdown.css('padding-bottom'), 10);\n }\n if (typeof scrollTop !== 'undefined') {\n $dropdown.stop(true).animate({\n scrollTop\n }, 100);\n }\n }\n }\n}\nflarum.reg.add('flarum-mentions', 'forum/fragments/AutocompleteDropdown', AutocompleteDropdown);","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/Component');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/utils/classList');","import Component from 'flarum/common/Component';\nimport classList from 'flarum/common/utils/classList';\nexport default class MentionsDropdownItem extends Component {\n view(vnode) {\n const {\n mentionable,\n ...attrs\n } = this.attrs;\n const className = classList('MentionsDropdownItem', 'PostPreview', \"MentionsDropdown-\".concat(mentionable.type()));\n return m(\"button\", Object.assign({\n className: className\n }, attrs), m(\"span\", {\n className: \"PostPreview-content\"\n }, vnode.children));\n }\n}\nflarum.reg.add('flarum-mentions', 'forum/components/MentionsDropdownItem', MentionsDropdownItem);","import _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport MentionsDropdownItem from '../components/MentionsDropdownItem';\nexport default class MentionableModels {\n constructor(dropdownItemAttrs) {\n _defineProperty(this, \"mentionables\", void 0);\n /**\n * We store models returned from an API here to preserve order in which they are returned\n * This prevents the list jumping around while models are returned.\n * We also use a hashmap for model IDs to provide O(1) lookup for the users already in the list.\n */\n _defineProperty(this, \"results\", {});\n _defineProperty(this, \"typed\", null);\n _defineProperty(this, \"searched\", []);\n _defineProperty(this, \"dropdownItemAttrs\", {});\n /**\n * Don't send API calls searching for models until at least 2 characters have been typed.\n * This focuses the mention results on models already loaded.\n */\n _defineProperty(this, \"search\", async () => {\n if (!this.typed || this.typed.length <= 1) return;\n const typedLower = this.typed.toLowerCase();\n if (this.searched.includes(typedLower)) return;\n for (const mentionable of this.mentionables) {\n for (const model of await mentionable.search(typedLower)) {\n if (!this.results[mentionable.type()].has(model.id())) {\n this.results[mentionable.type()].set(model.id(), model);\n }\n }\n }\n this.searched.push(typedLower);\n return Promise.resolve();\n });\n this.dropdownItemAttrs = dropdownItemAttrs;\n }\n init(mentionables) {\n this.typed = null;\n this.mentionables = mentionables;\n for (const mentionable of this.mentionables) {\n this.results[mentionable.type()] = new Map(mentionable.initialResults().map(result => [result.id(), result]));\n }\n }\n matches(mentionable, model) {\n var _this$typed;\n return mentionable.matches(model, ((_this$typed = this.typed) == null ? void 0 : _this$typed.toLowerCase()) || '');\n }\n makeSuggestion(mentionable, model) {\n const content = mentionable.suggestion(model, this.typed);\n const replacement = mentionable.replacement(model);\n const {\n onclick,\n ...attrs\n } = this.dropdownItemAttrs;\n return m(MentionsDropdownItem, Object.assign({\n mentionable: mentionable,\n onclick: () => onclick(replacement)\n }, attrs), content);\n }\n buildSuggestions() {\n const suggestions = [];\n for (const mentionable of this.mentionables) {\n if (!mentionable.enabled()) continue;\n let matches = Array.from(this.results[mentionable.type()].values()).filter(model => this.matches(mentionable, model));\n const max = mentionable.maxStoreMatchedResults();\n if (max) matches = matches.splice(0, max);\n for (const model of matches) {\n const dropdownItem = this.makeSuggestion(mentionable, model);\n suggestions.push(dropdownItem);\n }\n }\n return suggestions;\n }\n}\nflarum.reg.add('flarum-mentions', 'forum/mentionables/MentionableModels', MentionableModels);","import _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nexport default class MentionFormat {\n constructor() {\n _defineProperty(this, \"instances\", void 0);\n _defineProperty(this, \"mentionables\", void 0);\n _defineProperty(this, \"extendable\", void 0);\n }\n makeMentionables() {\n var _this$instances;\n return (_this$instances = this.instances) != null ? _this$instances : this.instances = this.mentionables.map(Mentionable => new Mentionable(this));\n }\n getMentionable(type) {\n var _this$makeMentionable;\n return (_this$makeMentionable = this.makeMentionables().find(mentionable => mentionable.type() === type)) != null ? _this$makeMentionable : null;\n }\n extend(mentionable) {\n if (!this.extendable) throw new Error('This mention format does not allow extending.');\n this.mentionables.push(mentionable);\n }\n\n /**\n * Picks the term to search in the API from the typed text.\n * @example:\n * * Full text = `Hello @\"John D`\n * * Typed text = `\"John D`\n * * Query = `John D`\n */\n}\nflarum.reg.add('flarum-mentions', 'forum/mentionables/formats/MentionFormat', MentionFormat);","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/components/Avatar');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/helpers/highlight');","import _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nexport default class MentionableModel {\n constructor(format) {\n _defineProperty(this, \"format\", void 0);\n this.format = format;\n }\n}\nflarum.reg.add('flarum-mentions', 'forum/mentionables/MentionableModel', MentionableModel);","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/utils/extractText');","import app from 'flarum/forum/app';\nimport extractText from 'flarum/common/utils/extractText';\n\n/**\n * Whether to use the old mentions format.\n *\n * `'@username'` or `'@\"Display name\"'`\n */\nexport const shouldUseOldFormat = () => app.forum.attribute('allowUsernameMentionFormat') || false;\nconst getDeletedUserText = () => extractText(app.translator.trans('core.lib.username.deleted_text'));\n\n/**\n * Fetches a user's username or display name.\n *\n * Chooses based on the format option set in the admin settings page.\n *\n * @param user An instance of the User model to fetch the username for\n * @param useDisplayName If `true`, uses `user.displayName()`, otherwise, uses `user.username()`\n */\nexport default function getCleanDisplayName(user, useDisplayName) {\n if (useDisplayName === void 0) {\n useDisplayName = true;\n }\n if (!user) return getDeletedUserText().replace(/\"#[a-z]{0,3}[0-9]+/, '_');\n const text = (useDisplayName ? user.displayName() : user.username()) || getDeletedUserText();\n return text.replace(/\"#[a-z]{0,3}[0-9]+/, '_');\n}\nflarum.reg.add('flarum-mentions', 'forum/utils/getCleanDisplayName', getCleanDisplayName);","import app from 'flarum/forum/app';\nimport usernameHelper from 'flarum/common/helpers/username';\nimport Avatar from 'flarum/common/components/Avatar';\nimport highlight from 'flarum/common/helpers/highlight';\nimport MentionableModel from './MentionableModel';\nimport getCleanDisplayName, { shouldUseOldFormat } from '../utils/getCleanDisplayName';\nexport default class UserMention extends MentionableModel {\n type() {\n return 'user';\n }\n initialResults() {\n return Array.from(app.store.all('users'));\n }\n\n /**\n * Automatically determines which mention syntax to be used based on the option in the\n * admin dashboard. Also performs display name clean-up automatically.\n *\n * @\"Display name\"#UserID or `@username`\n *\n * @example <caption>New display name syntax</caption>\n * // '@\"user\"#1'\n * forUser(User) // User is ID 1, display name is 'User'\n *\n * @example <caption>Using old syntax</caption>\n * // '@username'\n * forUser(user) // User's username is 'username'\n */\n replacement(user) {\n if (shouldUseOldFormat()) {\n const cleanText = getCleanDisplayName(user, false);\n return this.format.format(cleanText);\n }\n const cleanText = getCleanDisplayName(user);\n return this.format.format(cleanText, '', user.id());\n }\n suggestion(model, typed) {\n const username = usernameHelper(model, name => highlight(name, typed));\n return m('[', null, m(Avatar, {\n user: model\n }), username);\n }\n matches(model, typed) {\n if (!typed) return false;\n const names = [model.username(), model.displayName()];\n return names.some(name => name.toLowerCase().substr(0, typed.length) === typed);\n }\n maxStoreMatchedResults() {\n return null;\n }\n async search(typed) {\n return await app.store.find('users', {\n filter: {\n q: typed\n },\n page: {\n limit: 5\n }\n });\n }\n enabled() {\n return true;\n }\n}\nflarum.reg.add('flarum-mentions', 'forum/mentionables/UserMention', UserMention);","import app from 'flarum/forum/app';\nimport MentionableModel from './MentionableModel';\nimport usernameHelper from 'flarum/common/helpers/username';\nimport Avatar from 'flarum/common/components/Avatar';\nimport highlight from 'flarum/common/helpers/highlight';\nimport { truncate } from 'flarum/common/utils/string';\nimport getCleanDisplayName from '../utils/getCleanDisplayName';\nexport default class PostMention extends MentionableModel {\n type() {\n return 'post';\n }\n\n /**\n * If the user is replying to a discussion, or if they are editing a\n * post, then we can suggest other posts in the discussion to mention.\n * We will add the 5 most recent comments in the discussion which\n * match any username characters that have been typed.\n */\n initialResults() {\n const EditPostComposer = flarum.reg.checkModule('core', 'forum/components/EditPostComposer');\n const ReplyComposer = flarum.reg.checkModule('core', 'forum/components/ReplyComposer');\n if ((!ReplyComposer || !app.composer.bodyMatches(ReplyComposer)) && (!EditPostComposer || !app.composer.bodyMatches(EditPostComposer))) {\n return [];\n }\n\n // @ts-ignore\n const composerAttrs = app.composer.body.attrs;\n const composerPost = composerAttrs.post;\n const discussion = composerPost && composerPost.discussion() || composerAttrs.discussion;\n return discussion.posts()\n // Filter to only comment posts, and replies before this message\n .filter(post => post && post.contentType() === 'comment' && (!composerPost || post.number() < composerPost.number()))\n // Sort by new to old\n .sort((a, b) => b.createdAt().getTime() - a.createdAt().getTime());\n }\n\n /**\n * Generates the syntax for mentioning of a post. Also cleans up the display name.\n *\n * @example <caption>Post mention</caption>\n * // '@\"User\"#p13'\n * // @\"Display name\"#pPostID\n * forPostMention(user, 13) // User display name is 'User', post ID is 13\n */\n replacement(post) {\n const user = post.user();\n const cleanText = getCleanDisplayName(user);\n return this.format.format(cleanText, 'p', post.id());\n }\n suggestion(model, typed) {\n var _model$contentPlain;\n const user = model.user() || null;\n const username = usernameHelper(user, name => highlight(name, typed));\n return m('[', null, m(Avatar, {\n user: user\n }), username, [app.translator.trans('flarum-mentions.forum.composer.reply_to_post_text', {\n number: model.number()\n }), ' — ', truncate((_model$contentPlain = model.contentPlain()) != null ? _model$contentPlain : '', 200)]);\n }\n matches(model, typed) {\n const user = model.user();\n const userMentionable = app.mentionFormats.mentionable('user');\n return !typed || user && userMentionable.matches(user, typed);\n }\n maxStoreMatchedResults() {\n return 5;\n }\n\n /**\n * Post mention suggestions are only offered from current discussion posts.\n */\n search(typed) {\n return Promise.resolve([]);\n }\n enabled() {\n return true;\n }\n}\nflarum.reg.add('flarum-mentions', 'forum/mentionables/PostMention', PostMention);","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/models/Group');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/components/Badge');","import app from 'flarum/forum/app';\nimport Group from 'flarum/common/models/Group';\nimport MentionableModel from './MentionableModel';\nimport Badge from 'flarum/common/components/Badge';\nimport highlight from 'flarum/common/helpers/highlight';\nexport default class GroupMention extends MentionableModel {\n type() {\n return 'group';\n }\n initialResults() {\n return Array.from(app.store.all('groups').filter(g => {\n return g.id() !== Group.GUEST_ID && g.id() !== Group.MEMBER_ID;\n }));\n }\n\n /**\n * Generates the mention syntax for a group mention.\n *\n * @\"Name Plural\"#gGroupID\n *\n * @example <caption>Group mention</caption>\n * // '@\"Mods\"#g4'\n * forGroup(group) // Group display name is 'Mods', group ID is 4\n */\n replacement(group) {\n return this.format.format(group.namePlural(), 'g', group.id());\n }\n suggestion(model, typed) {\n let groupName = model.namePlural();\n if (typed) {\n groupName = highlight(groupName, typed);\n }\n return m('[', null, m(Badge, {\n className: \"Avatar Badge Badge--group--\".concat(model.id(), \" Badge-icon\"),\n color: model.color(),\n type: \"group\",\n icon: model.icon()\n }), m(\"span\", {\n className: \"username\"\n }, groupName));\n }\n matches(model, typed) {\n if (!typed) return false;\n const names = [model.namePlural().toLowerCase(), model.nameSingular().toLowerCase()];\n return names.some(name => name.toLowerCase().substr(0, typed.length) === typed);\n }\n maxStoreMatchedResults() {\n return null;\n }\n\n /**\n * All groups are already loaded, so we don't need to search for them.\n */\n search(typed) {\n return Promise.resolve([]);\n }\n enabled() {\n var _app$session$user$can, _app$session, _app$session$user;\n return (_app$session$user$can = (_app$session = app.session) == null ? void 0 : (_app$session$user = _app$session.user) == null ? void 0 : _app$session$user.canMentionGroups()) != null ? _app$session$user$can : false;\n }\n}\nflarum.reg.add('flarum-mentions', 'forum/mentionables/GroupMention', GroupMention);","import _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport MentionFormat from './MentionFormat';\nimport UserMention from '../UserMention';\nimport PostMention from '../PostMention';\nimport GroupMention from '../GroupMention';\nexport default class AtMentionFormat extends MentionFormat {\n constructor() {\n super(...arguments);\n _defineProperty(this, \"mentionables\", [UserMention, PostMention, GroupMention]);\n _defineProperty(this, \"extendable\", true);\n }\n trigger() {\n return '@';\n }\n queryFromTyped(typed) {\n const matchTyped = typed.match(/^[\"“]?((?:(?!\"#).)+)$/);\n return matchTyped ? matchTyped[1] : null;\n }\n format(name, char, id) {\n if (char === void 0) {\n char = '';\n }\n if (id === void 0) {\n id = null;\n }\n return {\n simple: \"@\".concat(name),\n safe: \"@\\\"\".concat(name, \"\\\"#\").concat(char).concat(id)\n }[id ? 'safe' : 'simple'];\n }\n}\nflarum.reg.add('flarum-mentions', 'forum/mentionables/formats/AtMentionFormat', AtMentionFormat);","import app from 'flarum/forum/app';\nimport Badge from 'flarum/common/components/Badge';\nimport highlight from 'flarum/common/helpers/highlight';\nimport MentionableModel from './MentionableModel';\nexport default class TagMention extends MentionableModel {\n type() {\n return 'tag';\n }\n initialResults() {\n return Array.from(app.store.all('tags'));\n }\n\n /**\n * Generates the mention syntax for a tag mention.\n *\n * ~tagSlug\n *\n * @example <caption>Tag mention</caption>\n * // ~general\n * forTag(tag) // Tag display name is 'Tag', tag ID is 5\n */\n replacement(tag) {\n return this.format.format(tag.slug());\n }\n matches(model, typed) {\n if (!typed) return false;\n const names = [model.name().toLowerCase()];\n return names.some(name => name.toLowerCase().substr(0, typed.length) === typed);\n }\n maxStoreMatchedResults() {\n return null;\n }\n async search(typed) {\n return await app.store.find('tags', {\n filter: {\n q: typed\n },\n page: {\n limit: 5\n }\n });\n }\n suggestion(model, typed) {\n let tagName = model.name();\n if (typed) {\n tagName = highlight(tagName, typed);\n }\n return m('[', null, m(Badge, {\n className: \"Avatar\",\n icon: model.icon(),\n color: model.color(),\n type: \"tag\"\n }), m(\"span\", {\n className: \"username\"\n }, tagName));\n }\n enabled() {\n return 'flarum-tags' in flarum.extensions;\n }\n}\nflarum.reg.add('flarum-mentions', 'forum/mentionables/TagMention', TagMention);","import _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport MentionFormat from './MentionFormat';\nimport TagMention from '../TagMention';\nexport default class HashMentionFormat extends MentionFormat {\n constructor() {\n super(...arguments);\n _defineProperty(this, \"mentionables\", [TagMention]);\n _defineProperty(this, \"extendable\", true);\n }\n trigger() {\n return '#';\n }\n queryFromTyped(typed) {\n const matchTyped = typed.match(/^[-_\\p{L}\\p{N}\\p{M}]+$/giu);\n return matchTyped ? matchTyped[0] : null;\n }\n format(slug) {\n return \"#\".concat(slug);\n }\n}\nflarum.reg.add('flarum-mentions', 'forum/mentionables/formats/HashMentionFormat', HashMentionFormat);","import _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport AtMentionFormat from './AtMentionFormat';\nimport HashMentionFormat from './HashMentionFormat';\nexport default class MentionFormats {\n constructor() {\n _defineProperty(this, \"formats\", [new AtMentionFormat(), new HashMentionFormat()]);\n }\n get(symbol) {\n var _this$formats$find;\n return (_this$formats$find = this.formats.find(f => f.trigger() === symbol)) != null ? _this$formats$find : null;\n }\n mentionable(type) {\n for (const format of this.formats) {\n const mentionable = format.getMentionable(type);\n if (mentionable) return mentionable;\n }\n return null;\n }\n extend(format) {\n this.formats.push(new format());\n }\n}\nflarum.reg.add('flarum-mentions', 'forum/mentionables/formats/MentionFormats', MentionFormats);","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/components/UserPage');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/components/LinkButton');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/extenders');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/models/Post');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/models/User');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/components/PostsUserPage');","import PostsUserPage from 'flarum/forum/components/PostsUserPage';\n/**\n * The `MentionsUserPage` component shows post which user Mentioned at\n */\nexport default class MentionsUserPage extends PostsUserPage {\n params(user) {\n return {\n filter: {\n type: 'comment',\n mentioned: user.id()\n }\n };\n }\n}\nflarum.reg.add('flarum-mentions', 'forum/components/MentionsUserPage', MentionsUserPage);","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/components/Notification');","import app from 'flarum/forum/app';\nimport Notification from 'flarum/forum/components/Notification';\nimport { truncate } from 'flarum/common/utils/string';\nexport default class PostMentionedNotification extends Notification {\n icon() {\n return 'fas fa-reply';\n }\n href() {\n const notification = this.attrs.notification;\n const post = notification.subject();\n const content = notification.content();\n return app.route.discussion(post.discussion(), content && content.replyNumber);\n }\n content() {\n const notification = this.attrs.notification;\n const user = notification.fromUser();\n return app.translator.trans('flarum-mentions.forum.notifications.post_mentioned_text', {\n user,\n count: 1\n });\n }\n excerpt() {\n return truncate(this.attrs.notification.subject().contentPlain() || '', 200);\n }\n}\nflarum.reg.add('flarum-mentions', 'forum/components/PostMentionedNotification', PostMentionedNotification);","import app from 'flarum/forum/app';\nimport Notification from 'flarum/forum/components/Notification';\nimport { truncate } from 'flarum/common/utils/string';\nexport default class UserMentionedNotification extends Notification {\n icon() {\n return 'fas fa-at';\n }\n href() {\n const post = this.attrs.notification.subject();\n return app.route.discussion(post.discussion(), post.number());\n }\n content() {\n const user = this.attrs.notification.fromUser();\n return app.translator.trans('flarum-mentions.forum.notifications.user_mentioned_text', {\n user\n });\n }\n excerpt() {\n return truncate(this.attrs.notification.subject().contentPlain(), 200);\n }\n}\nflarum.reg.add('flarum-mentions', 'forum/components/UserMentionedNotification', UserMentionedNotification);","import app from 'flarum/forum/app';\nimport Notification from 'flarum/forum/components/Notification';\nimport { truncate } from 'flarum/common/utils/string';\nexport default class GroupMentionedNotification extends Notification {\n icon() {\n return 'fas fa-at';\n }\n href() {\n const post = this.attrs.notification.subject();\n return app.route.discussion(post.discussion(), post.number());\n }\n content() {\n const user = this.attrs.notification.fromUser();\n return app.translator.trans('flarum-mentions.forum.notifications.group_mentioned_text', {\n user\n });\n }\n excerpt() {\n return truncate(this.attrs.notification.subject().contentPlain(), 200);\n }\n}\nflarum.reg.add('flarum-mentions', 'forum/components/GroupMentionedNotification', GroupMentionedNotification);","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/query/IGambit');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/app');","import { KeyValueGambit } from 'flarum/common/query/IGambit';\nimport app from 'flarum/common/app';\nexport default class MentionedGambit extends KeyValueGambit {\n key() {\n return app.translator.trans('flarum-mentions.lib.gambits.posts.mentioned.key', {}, true);\n }\n hint() {\n return app.translator.trans('flarum-mentions.lib.gambits.posts.mentioned.hint', {}, true);\n }\n filterKey() {\n return 'mentioned';\n }\n}\nflarum.reg.add('flarum-mentions', 'common/query/posts/MentionedGambit', MentionedGambit);","import Extend from 'flarum/common/extenders';\nimport MentionedGambit from './query/posts/MentionedGambit';\nexport default [new Extend.Search() //\n.gambit('posts', MentionedGambit)];","import Extend from 'flarum/common/extenders';\nimport Post from 'flarum/common/models/Post';\nimport User from 'flarum/common/models/User';\nimport MentionsUserPage from './components/MentionsUserPage';\nimport PostMentionedNotification from './components/PostMentionedNotification';\nimport UserMentionedNotification from './components/UserMentionedNotification';\nimport GroupMentionedNotification from './components/GroupMentionedNotification';\nimport commonExtend from '../common/extend';\nexport default [...commonExtend, new Extend.Routes() //\n.add('user.mentions', '/u/:username/mentions', MentionsUserPage), new Extend.Model(Post) //\n.hasMany('mentionedBy').attribute('mentionedByCount'), new Extend.Notification() //\n.add('postMentioned', PostMentionedNotification).add('userMentioned', UserMentionedNotification).add('groupMentioned', GroupMentionedNotification), new Extend.Model(User) //\n.attribute('canMentionGroups')];","import app from 'flarum/forum/app';\nimport username from 'flarum/common/helpers/username';\nimport extractText from 'flarum/common/utils/extractText';\nexport function filterUserMentions(tag) {\n let user;\n if (app.forum.attribute('allowUsernameMentionFormat') && tag.hasAttribute('username')) user = app.store.getBy('users', 'username', tag.getAttribute('username'));else if (tag.hasAttribute('id')) user = app.store.getById('users', tag.getAttribute('id'));\n if (user) {\n tag.setAttribute('id', user.id());\n tag.setAttribute('slug', user.slug());\n tag.setAttribute('displayname', extractText(username(user)));\n return true;\n }\n tag.invalidate();\n}\nexport function postFilterUserMentions(tag) {\n tag.setAttribute('deleted', false);\n}\nexport function filterPostMentions(tag) {\n const post = app.store.getById('posts', tag.getAttribute('id'));\n if (post) {\n tag.setAttribute('discussionid', post.discussion().id());\n tag.setAttribute('number', post.number());\n tag.setAttribute('displayname', extractText(username(post.user())));\n return true;\n }\n}\nexport function postFilterPostMentions(tag) {\n tag.setAttribute('deleted', false);\n}\nexport function filterGroupMentions(tag) {\n var _app$session, _app$session$user;\n if ((_app$session = app.session) != null && (_app$session$user = _app$session.user) != null && _app$session$user.canMentionGroups()) {\n const group = app.store.getById('groups', tag.getAttribute('id'));\n if (group) {\n tag.setAttribute('groupname', extractText(group.namePlural()));\n return true;\n }\n }\n tag.invalidate();\n}\nexport function postFilterGroupMentions(tag) {\n var _app$session2, _app$session2$user;\n if ((_app$session2 = app.session) != null && (_app$session2$user = _app$session2.user) != null && _app$session2$user.canMentionGroups()) {\n const group = app.store.getById('groups', tag.getAttribute('id'));\n tag.setAttribute('color', group.color());\n tag.setAttribute('icon', group.icon());\n tag.setAttribute('deleted', false);\n }\n}\nexport function filterTagMentions(tag) {\n if ('flarum-tags' in flarum.extensions) {\n const model = app.store.getBy('tags', 'slug', tag.getAttribute('slug'));\n if (model) {\n tag.setAttribute('id', model.id());\n tag.setAttribute('tagname', model.name());\n return true;\n }\n }\n tag.invalidate();\n}\nexport function postFilterTagMentions(tag) {\n if ('flarum-tags' in flarum.extensions) {\n const model = app.store.getBy('tags', 'slug', tag.getAttribute('slug'));\n tag.setAttribute('icon', model.icon());\n tag.setAttribute('color', model.color());\n tag.setAttribute('deleted', false);\n }\n}\nflarum.reg.add('flarum-mentions', 'forum/utils/textFormatter', { filterUserMentions: filterUserMentions,postFilterUserMentions: postFilterUserMentions,filterPostMentions: filterPostMentions,postFilterPostMentions: postFilterPostMentions,filterGroupMentions: filterGroupMentions,postFilterGroupMentions: postFilterGroupMentions,filterTagMentions: filterTagMentions,postFilterTagMentions: postFilterTagMentions, });","import _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nexport default class Mentionables {\n constructor() {\n _defineProperty(this, \"formats\", []);\n _defineProperty(this, \"mentionables\", {});\n }\n /**\n * Register a new mention format.\n * Must extend MentionFormat and have a unique unused trigger symbol.\n */\n format(format) {\n this.formats.push(format);\n return this;\n }\n\n /**\n * Register a new mentionable model to a mention format.\n * Only works if the format has already been registered,\n * and the format allows using multiple mentionables.\n *\n * @param symbol The trigger symbol of the format to extend (ex: @).\n * @param mentionable The mentionable instance to register.\n * Must extend MentionableModel.\n */\n mentionable(symbol, mentionable) {\n if (!this.mentionables[symbol]) {\n this.mentionables[symbol] = [];\n }\n this.mentionables[symbol].push(mentionable);\n return this;\n }\n extend(app) {\n for (const format of this.formats) {\n app.mentionFormats.extend(format);\n }\n for (const symbol in this.mentionables) {\n const format = app.mentionFormats.get(symbol);\n if (!format) continue;\n for (const mentionable of this.mentionables[symbol]) {\n format.extend(mentionable);\n }\n }\n }\n}\nflarum.reg.add('flarum-mentions', 'forum/extenders/Mentionables', Mentionables);","import { extend, override } from 'flarum/common/extend';\nimport app from 'flarum/forum/app';\nimport { getPlainContent } from 'flarum/common/utils/string';\nimport textContrastClass from 'flarum/common/helpers/textContrastClass';\nimport Post from 'flarum/forum/components/Post';\nimport addPostMentionPreviews from './addPostMentionPreviews';\nimport addMentionedByList from './addMentionedByList';\nimport addPostReplyAction from './addPostReplyAction';\nimport addPostQuoteButton from './addPostQuoteButton';\nimport addComposerAutocomplete from './addComposerAutocomplete';\nimport MentionFormats from './mentionables/formats/MentionFormats';\nimport UserPage from 'flarum/forum/components/UserPage';\nimport LinkButton from 'flarum/common/components/LinkButton';\napp.mentionFormats = new MentionFormats();\nexport { default as extend } from './extend';\napp.initializers.add('flarum-mentions', () => {\n // For every mention of a post inside a post's content, set up a hover handler\n // that shows a preview of the mentioned post.\n addPostMentionPreviews();\n\n // In the footer of each post, show information about who has replied (i.e.\n // who the post has been mentioned by).\n addMentionedByList();\n\n // Add a 'reply' control to the footer of each post. When clicked, it will\n // open up the composer and add a post mention to its contents.\n addPostReplyAction();\n\n // Show a Quote button when Post text is selected\n addPostQuoteButton();\n\n // After typing '@' in the composer, show a dropdown suggesting a bunch of\n // posts or users that the user could mention.\n addComposerAutocomplete();\n\n // Add notification preferences.\n extend('flarum/forum/components/NotificationGrid', 'notificationTypes', function (items) {\n items.add('postMentioned', {\n name: 'postMentioned',\n icon: 'fas fa-reply',\n label: app.translator.trans('flarum-mentions.forum.settings.notify_post_mentioned_label')\n });\n items.add('userMentioned', {\n name: 'userMentioned',\n icon: 'fas fa-at',\n label: app.translator.trans('flarum-mentions.forum.settings.notify_user_mentioned_label')\n });\n items.add('groupMentioned', {\n name: 'groupMentioned',\n icon: 'fas fa-at',\n label: app.translator.trans('flarum-mentions.forum.settings.notify_group_mentioned_label')\n });\n });\n\n // Add mentions tab in user profile\n extend(UserPage.prototype, 'navItems', function (items) {\n const user = this.user;\n items.add('mentions', m(LinkButton, {\n href: app.route('user.mentions', {\n username: user.slug()\n }),\n name: \"mentions\",\n icon: \"fas fa-at\"\n }, app.translator.trans('flarum-mentions.forum.user.mentions_link')), 80);\n });\n\n // Remove post mentions when rendering post previews.\n getPlainContent.removeSelectors.push('a.PostMention');\n\n // Apply color contrast fix on group mentions.\n extend(Post.prototype, 'oncreate', function () {\n this.$('.GroupMention--colored, .TagMention--colored').each(function () {\n this.classList.add(textContrastClass(getComputedStyle(this).getPropertyValue('--color')));\n });\n });\n\n // Auto scope the search to the current user mentioned posts.\n override('flarum/forum/components/SearchModal', 'defaultActiveSource', function (original) {\n const orig = original();\n if (!orig && app.current.data.routeName && app.current.data.routeName.includes('user.mentions') && app.current.data.user) {\n return 'posts';\n }\n return orig;\n });\n extend('flarum/forum/components/SearchModal', 'defaultFilters', function (filters) {\n if (app.current.data.routeName && app.current.data.routeName.includes('user.mentions') && app.current.data.user) {\n filters.posts.mentioned = app.current.data.user.username();\n }\n });\n});\nexport * from './utils/textFormatter';\nimport './forum';","import { extend } from 'flarum/common/extend';\nimport CommentPost from 'flarum/forum/components/CommentPost';\nimport PostPreview from 'flarum/forum/components/PostPreview';\nimport LoadingIndicator from 'flarum/common/components/LoadingIndicator';\nexport default function addPostMentionPreviews() {\n function addPreviews() {\n const contentHtml = this.attrs.post.contentHtml();\n if (contentHtml === this.oldPostContentHtml || this.isEditing()) return;\n this.oldPostContentHtml = contentHtml;\n const parentPost = this.attrs.post;\n const $parentPost = this.$();\n this.$().on('click', '.UserMention:not(.UserMention--deleted), .PostMention:not(.PostMention--deleted), .TagMention:not(.TagMention--deleted)', function (e) {\n m.route.set(this.getAttribute('href'));\n e.preventDefault();\n });\n this.$('.PostMention:not(.PostMention--deleted)').each(function () {\n const $this = $(this);\n const id = $this.data('id');\n let timeout;\n\n // Wrap the mention link in a wrapper element so that we can insert a\n // preview popup as its sibling and relatively position it.\n const $preview = $('<ul class=\"Dropdown-menu PostMention-preview fade\"/>');\n $parentPost.append($preview);\n const getPostElement = () => {\n return $(\".PostStream-item[data-id=\\\"\".concat(id, \"\\\"]\"));\n };\n const showPreview = () => {\n // When the user hovers their mouse over the mention, look for the\n // post that it's referring to in the stream, and determine if it's\n // in the viewport. If it is, we will \"pulsate\" it.\n const $post = getPostElement();\n let visible = false;\n if ($post.length) {\n const top = $post.offset().top;\n const scrollTop = window.pageYOffset;\n if (top > scrollTop && top + $post.height() < scrollTop + $(window).height()) {\n $post.addClass('pulsate');\n visible = true;\n }\n }\n\n // Otherwise, we will show a popup preview of the post. If the post\n // hasn't yet been loaded, we will need to do that.\n if (!visible) {\n // Position the preview so that it appears above the mention.\n // (The offsetParent should be .Post-body.)\n const positionPreview = () => {\n const previewHeight = $preview.outerHeight(true);\n let offset = 0;\n\n // If the preview goes off the top of the viewport, reposition it to\n // be below the mention.\n if ($this.offset().top - previewHeight < $(window).scrollTop() + $('#header').outerHeight()) {\n offset += $this.outerHeight(true);\n } else {\n offset -= previewHeight;\n }\n $preview.show().css('top', $this.offset().top - $parentPost.offset().top + offset).css('left', $this.offsetParent().offset().left - $parentPost.offset().left).css('max-width', $this.offsetParent().width());\n };\n const showPost = post => {\n const discussion = post.discussion();\n m.render($preview[0], [discussion !== parentPost.discussion() && m(\"li\", null, m(\"span\", {\n className: \"PostMention-preview-discussion\"\n }, discussion.title())), m(\"li\", null, m(PostPreview, {\n post: post\n }))]);\n positionPreview();\n };\n const post = app.store.getById('posts', id);\n if (post && post.discussion()) {\n showPost(post);\n } else {\n m.render($preview[0], m(LoadingIndicator, null));\n app.store.find('posts', id).then(showPost);\n positionPreview();\n }\n setTimeout(() => $preview.off('transitionend').addClass('in'));\n }\n };\n const hidePreview = () => {\n getPostElement().removeClass('pulsate');\n if ($preview.hasClass('in')) {\n $preview.removeClass('in').one('transitionend', () => $preview.hide());\n }\n };\n\n // On a touch (mobile) device we cannot hover the link to reveal the preview.\n // Instead we cancel the navigation so that a click reveals the preview.\n // Users can then click on the preview to go to the post if desired.\n $this.on('touchend', e => {\n if (e.cancelable) {\n e.preventDefault();\n }\n });\n $this.add($preview).hover(() => {\n clearTimeout(timeout);\n timeout = setTimeout(showPreview, 250);\n }, () => {\n clearTimeout(timeout);\n getPostElement().removeClass('pulsate');\n timeout = setTimeout(hidePreview, 250);\n }).on('touchend', e => {\n showPreview();\n e.stopPropagation();\n });\n $(document).on('touchend', hidePreview);\n });\n }\n extend(CommentPost.prototype, 'oncreate', addPreviews);\n extend(CommentPost.prototype, 'onupdate', addPreviews);\n}","import app from 'flarum/forum/app';\nimport { extend } from 'flarum/common/extend';\nimport CommentPost from 'flarum/forum/components/CommentPost';\nimport Link from 'flarum/common/components/Link';\nimport PostPreview from 'flarum/forum/components/PostPreview';\nimport punctuateSeries from 'flarum/common/helpers/punctuateSeries';\nimport username from 'flarum/common/helpers/username';\nimport Icon from 'flarum/common/components/Icon';\nimport Button from 'flarum/common/components/Button';\nimport MentionedByModal from './components/MentionedByModal';\nexport default function addMentionedByList() {\n function hidePreview() {\n this.$('.Post-mentionedBy-preview').removeClass('in').one('transitionend', function () {\n $(this).hide();\n });\n }\n extend(CommentPost.prototype, 'oncreate', function () {\n let timeout;\n const post = this.attrs.post;\n const replies = post.mentionedBy();\n if (replies && replies.length) {\n const $preview = $('<ul class=\"Dropdown-menu Post-mentionedBy-preview fade\"/>');\n this.$().append($preview);\n const $parentPost = this.$();\n const $this = this.$('.Post-mentionedBy');\n const showPreview = () => {\n if (!$preview.hasClass('in') && $preview.is(':visible')) return;\n\n // When the user hovers their mouse over the list of people who have\n // replied to the post, render a list of reply previews into a\n // popup.\n m.render($preview[0], m('[', null, replies.map(reply => m(\"li\", {\n \"data-number\": reply.number()\n }, m(PostPreview, {\n post: reply,\n onclick: hidePreview.bind(this)\n }))), replies.length < post.mentionedByCount() && m(\"li\", {\n className: \"Post-mentionedBy-preview-more\"\n }, m(Button, {\n className: \"PostPreview Button\",\n onclick: () => {\n hidePreview.call(this);\n app.modal.show(MentionedByModal, {\n post\n });\n }\n }, m(\"span\", {\n className: \"PostPreview-content\"\n }, m(\"span\", {\n className: \"PostPreview-badge Avatar\"\n }, m(Icon, {\n name: 'fas fa-reply-all'\n })), m(\"span\", null, app.translator.trans('flarum-mentions.forum.post.mentioned_by_more_text', {\n count: post.mentionedByCount() - replies.length\n })))))));\n $preview.show().css('top', $this.offset().top - $parentPost.offset().top + $this.outerHeight(true)).css('left', $this.offsetParent().offset().left - $parentPost.offset().left).css('max-width', $parentPost.width());\n setTimeout(() => $preview.off('transitionend').addClass('in'));\n };\n $this.add($preview).hover(() => {\n clearTimeout(timeout);\n timeout = setTimeout(showPreview, 250);\n }, () => {\n clearTimeout(timeout);\n timeout = setTimeout(hidePreview, 250);\n });\n\n // Whenever the user hovers their mouse over a particular name in the\n // list of repliers, highlight the corresponding post in the preview\n // popup.\n this.$().find('.Post-mentionedBy-summary a').hover(function () {\n $preview.find('[data-number=\"' + $(this).data('number') + '\"]').addClass('active');\n }, function () {\n $preview.find('[data-number]').removeClass('active');\n });\n }\n });\n extend(CommentPost.prototype, 'footerItems', function (items) {\n const post = this.attrs.post;\n const replies = post.mentionedBy();\n if (replies && replies.length) {\n const users = [];\n const repliers = replies.sort(reply => reply.user() === app.session.user ? -1 : 0).filter(reply => {\n const user = reply.user();\n if (users.indexOf(user) === -1) {\n users.push(user);\n return true;\n }\n });\n const limit = 4;\n const overLimit = post.mentionedByCount() > limit;\n\n // Create a list of unique users who have replied. So even if a user has\n // replied twice, they will only be in this array once.\n const names = repliers.slice(0, overLimit ? limit - 1 : limit).map(reply => {\n const user = reply.user();\n return m(Link, {\n href: app.route.post(reply),\n onclick: hidePreview.bind(this),\n \"data-number\": reply.number()\n }, app.session.user === user ? app.translator.trans('flarum-mentions.forum.post.you_text') : username(user));\n });\n\n // If there are more users that we've run out of room to display, add a \"x\n // others\" name to the end of the list. Clicking on it will display a modal\n // with a full list of names.\n if (overLimit) {\n const count = post.mentionedByCount() - names.length;\n names.push(app.translator.trans('flarum-mentions.forum.post.others_text', {\n count\n }));\n }\n items.add('replies', m(\"div\", {\n className: \"Post-mentionedBy\"\n }, m(\"span\", {\n className: \"Post-mentionedBy-summary\"\n }, m(Icon, {\n name: 'fas fa-reply'\n }), app.translator.trans(\"flarum-mentions.forum.post.mentioned_by\".concat(repliers[0].user() === app.session.user ? '_self' : '', \"_text\"), {\n count: names.length,\n users: punctuateSeries(names)\n }))));\n }\n });\n}","import app from 'flarum/forum/app';\nimport { extend } from 'flarum/common/extend';\nimport Button from 'flarum/common/components/Button';\nimport CommentPost from 'flarum/forum/components/CommentPost';\nimport reply from './utils/reply';\nexport default function addPostReplyAction() {\n extend(CommentPost.prototype, 'actionItems', function (items) {\n const post = this.attrs.post;\n if (post.isHidden() || app.session.user && !post.discussion().canReply()) return;\n items.add('reply', m(Button, {\n className: \"Button Button--link\",\n onclick: () => reply(post)\n }, app.translator.trans('flarum-mentions.forum.post.reply_link')));\n });\n}","import app from 'flarum/forum/app';\nimport { extend } from 'flarum/common/extend';\nimport CommentPost from 'flarum/forum/components/CommentPost';\nimport PostQuoteButton from './fragments/PostQuoteButton';\nimport selectedText from './utils/selectedText';\nexport default function addPostQuoteButton() {\n extend(CommentPost.prototype, 'oncreate', function () {\n const post = this.attrs.post;\n if (post.isHidden() || app.session.user && !post.discussion().canReply()) return;\n const $postBody = this.$('.Post-body');\n\n // Wrap the quote button in a wrapper element so that we can render\n // button into it.\n const $container = $('<div class=\"Post-quoteButtonContainer\"></div>');\n const button = new PostQuoteButton(post);\n const handler = function (e) {\n setTimeout(() => {\n const content = selectedText($postBody);\n if (content) {\n button.content = content;\n m.render($container[0], button.render());\n const rects = window.getSelection().getRangeAt(0).getClientRects();\n const firstRect = rects[0];\n if (e.clientY < firstRect.bottom && e.clientX - firstRect.right < firstRect.left - e.clientX) {\n button.showStart(firstRect.left, firstRect.top);\n } else {\n const lastRect = rects[rects.length - 1];\n button.showEnd(lastRect.right, lastRect.bottom);\n }\n }\n }, 1);\n };\n this.$().after($container).on('mouseup', handler);\n if ('ontouchstart' in window) {\n document.addEventListener('selectionchange', handler, false);\n }\n });\n}","import app from 'flarum/forum/app';\nimport { extend } from 'flarum/common/extend';\nimport TextEditorButton from 'flarum/common/components/TextEditorButton';\nimport KeyboardNavigatable from 'flarum/common/utils/KeyboardNavigatable';\nimport AutocompleteReader from 'flarum/common/utils/AutocompleteReader';\nimport { throttle } from 'flarum/common/utils/throttleDebounce';\nimport AutocompleteDropdown from './fragments/AutocompleteDropdown';\nimport MentionableModels from './mentionables/MentionableModels';\nexport default function addComposerAutocomplete() {\n extend('flarum/common/components/TextEditor', 'onbuild', function () {\n this.mentionsDropdown = new AutocompleteDropdown();\n this.searchMentions = throttle(250, (mentionables, buildSuggestions) => mentionables.search().then(buildSuggestions));\n const $editor = this.$('.TextEditor-editor').wrap('<div class=\"ComposerBody-mentionsWrapper\"></div>');\n this.navigator = new KeyboardNavigatable();\n this.navigator.when(() => this.mentionsDropdown.active).onUp(() => this.mentionsDropdown.navigate(-1)).onDown(() => this.mentionsDropdown.navigate(1)).onSelect(this.mentionsDropdown.complete.bind(this.mentionsDropdown)).onCancel(this.mentionsDropdown.hide.bind(this.mentionsDropdown)).bindTo($editor);\n $editor.after($('<div class=\"ComposerBody-mentionsDropdownContainer\"></div>'));\n });\n extend('flarum/common/components/TextEditor', 'buildEditorParams', function (params) {\n let matchTyped;\n const suggestionsInputListener = () => {\n const selection = this.attrs.composer.editor.getSelectionRange();\n const cursor = selection[0];\n if (selection[1] - cursor > 0) return;\n let activeFormat = null;\n const autocompleteReader = new AutocompleteReader(character => !!(activeFormat = app.mentionFormats.get(character)));\n const autocompleting = autocompleteReader.check(this.attrs.composer.editor.getLastNChars(30), cursor, /\\S+/);\n const mentionsDropdown = this.mentionsDropdown;\n let mentionables = new MentionableModels({\n onmouseenter: function () {\n mentionsDropdown.setIndex($(this).parent().index());\n },\n onclick: replacement => {\n this.attrs.composer.editor.replaceBeforeCursor(autocompleting.absoluteStart - 1, replacement + ' ');\n this.mentionsDropdown.hide();\n }\n });\n this.mentionsDropdown.hide();\n this.mentionsDropdown.active = false;\n if (autocompleting) {\n mentionables.init(activeFormat.makeMentionables());\n matchTyped = activeFormat.queryFromTyped(autocompleting.typed);\n if (!matchTyped) return;\n mentionables.typed = matchTyped;\n const buildSuggestions = () => {\n // If the user has started to type a mention,\n // then suggest models matching.\n const suggestions = mentionables.buildSuggestions();\n if (suggestions.length) {\n this.mentionsDropdown.items = suggestions;\n m.render(this.$('.ComposerBody-mentionsDropdownContainer')[0], this.mentionsDropdown.render());\n this.mentionsDropdown.show();\n const coordinates = this.attrs.composer.editor.getCaretCoordinates(autocompleting.absoluteStart);\n const width = this.mentionsDropdown.$().outerWidth();\n const height = this.mentionsDropdown.$().outerHeight();\n const parent = this.mentionsDropdown.$().offsetParent();\n let left = coordinates.left;\n let top = coordinates.top + 15;\n\n // Keep the dropdown inside the editor.\n if (top + height > parent.height()) {\n top = coordinates.top - height - 15;\n }\n if (left + width > parent.width()) {\n left = parent.width() - width;\n }\n\n // Prevent the dropdown from going off screen on mobile\n top = Math.max(-(parent.offset().top - $(document).scrollTop()), top);\n left = Math.max(-parent.offset().left, left);\n this.mentionsDropdown.show(left, top);\n } else {\n this.mentionsDropdown.active = false;\n this.mentionsDropdown.hide();\n }\n };\n this.mentionsDropdown.active = true;\n buildSuggestions();\n this.mentionsDropdown.setIndex(0);\n this.mentionsDropdown.$().scrollTop(0);\n this.searchMentions(mentionables, buildSuggestions);\n }\n };\n params.inputListeners.push(suggestionsInputListener);\n });\n extend('flarum/common/components/TextEditor', 'toolbarItems', function (items) {\n items.add('mention', m(TextEditorButton, {\n onclick: () => this.attrs.composer.editor.insertAtCursor(' @'),\n icon: \"fas fa-at\"\n }, app.translator.trans('flarum-mentions.forum.composer.mention_tooltip')));\n });\n}"],"names":["__webpack_require__","module","getter","__esModule","d","a","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","flarum","reg","MentionedByModalState","constructor","params","page","limit","super","type","add","MentionedByModal","oninit","vnode","this","state","filter","mentionedPost","attrs","post","id","sort","refresh","className","title","content","m","isInitialLoading","getPages","map","items","reply","number","onclick","hasNext","loadNext","loading","isLoadingNext","insertMention","composer","quote","Promise","resolve","mention","replacement","fields","body","originalContent","cursorPosition","editor","getSelectionRange","preceding","slice","precedingNewlines","length","match","insertAtCursor","Array","join","trim","replace","EditPostComposer","checkModule","discussion","then","PostQuoteButton","view","name","show","left","top","$this","$","parentOffset","offsetParent","offset","css","hideHandler","hide","bind","document","on","showStart","window","scrollTop","outerHeight","showEnd","right","bottom","outerWidth","off","selectedText","selection","getSelection","isCollapsed","range","getRangeAt","parent","commonAncestorContainer","contains","clone","append","cloneContents","find","replaceWith","alt","concat","src","innerText","href","text","_typeof","iterator","_defineProperty","arg","input","hint","prim","toPrimitive","undefined","res","TypeError","String","toPropertyKey","configurable","writable","AutocompleteDropdown","arguments","item","active","navigate","delta","keyWasJustPressed","setIndex","index","clearTimeout","keyWasJustPressedTimeout","setTimeout","complete","eq","click","scrollToItem","$dropdown","$items","rangedIndex","$item","removeClass","addClass","dropdownScroll","dropdownTop","dropdownBottom","itemTop","itemBottom","parseInt","stop","animate","MentionsDropdownItem","mentionable","assign","children","MentionableModels","dropdownItemAttrs","async","typed","typedLower","toLowerCase","searched","includes","mentionables","model","search","results","has","set","push","init","Map","initialResults","result","matches","_this$typed","makeSuggestion","suggestion","buildSuggestions","suggestions","enabled","from","values","max","maxStoreMatchedResults","splice","dropdownItem","MentionFormat","makeMentionables","_this$instances","instances","Mentionable","getMentionable","_this$makeMentionable","extend","extendable","Error","MentionableModel","format","getDeletedUserText","getCleanDisplayName","user","useDisplayName","displayName","username","UserMention","cleanText","some","substr","q","PostMention","ReplyComposer","composerAttrs","composerPost","posts","contentType","b","createdAt","getTime","_model$contentPlain","truncate","contentPlain","userMentionable","GroupMention","g","group","namePlural","groupName","color","icon","nameSingular","_app$session$user$can","_app$session","_app$session$user","canMentionGroups","AtMentionFormat","trigger","queryFromTyped","matchTyped","char","simple","safe","TagMention","tag","slug","tagName","extensions","HashMentionFormat","MentionFormats","symbol","_this$formats$find","formats","f","MentionsUserPage","mentioned","PostMentionedNotification","notification","subject","replyNumber","fromUser","count","excerpt","UserMentionedNotification","GroupMentionedNotification","MentionedGambit","KeyValueGambit","filterKey","gambit","hasMany","attribute","filterUserMentions","hasAttribute","getAttribute","setAttribute","invalidate","postFilterUserMentions","filterPostMentions","postFilterPostMentions","filterGroupMentions","postFilterGroupMentions","_app$session2","_app$session2$user","filterTagMentions","postFilterTagMentions","app","mentionFormats","addPreviews","contentHtml","oldPostContentHtml","isEditing","parentPost","$parentPost","e","route","preventDefault","each","data","timeout","$preview","getPostElement","showPreview","$post","visible","pageYOffset","height","positionPreview","previewHeight","width","showPost","render","store","getById","hidePreview","hasClass","one","cancelable","hover","stopPropagation","addPostMentionPreviews","replies","mentionedBy","is","mentionedByCount","users","repliers","indexOf","overLimit","names","addMentionedByList","isHidden","canReply","$postBody","$container","button","handler","rects","getClientRects","firstRect","clientY","clientX","lastRect","after","addEventListener","mentionsDropdown","searchMentions","throttle","$editor","wrap","navigator","when","onUp","onDown","onSelect","onCancel","bindTo","inputListeners","cursor","activeFormat","autocompleting","character","check","getLastNChars","onmouseenter","replaceBeforeCursor","absoluteStart","coordinates","getCaretCoordinates","Math","label","getPlainContent","classList","getComputedStyle","getPropertyValue","override","original","orig","filters"],"sourceRoot":""} |