diff --git a/js/dist/admin.js.map b/js/dist/admin.js.map index 35a3f4c5..60677d75 100644 --- a/js/dist/admin.js.map +++ b/js/dist/admin.js.map @@ -1 +1 @@ -{"version":3,"file":"admin.js","mappings":";;;;;;;;;;;;;;AAAmC;AAEnCA,oEAAgB,CAACE,GAAG,CAAC,WAAW,EAAE,YAAM;EACtCF,qEAAiB,OACX,CAAC,WAAW,CAAC,CAChBI,eAAe,CAAC;IACfC,OAAO,EAAE,4BAA4B;IACrCC,IAAI,EAAE,QAAQ;IACdC,KAAK,EAAEP,kEAAc,CAACS,KAAK,CAAC,6CAA6C;EAC3E,CAAC,CAAC,CACDL,eAAe,CAAC;IACfC,OAAO,EAAE,6BAA6B;IACtCC,IAAI,EAAE,QAAQ;IACdC,KAAK,EAAEP,kEAAc,CAACS,KAAK,CAAC,8CAA8C,CAAC;IAC3EC,IAAI,EAAEV,kEAAc,CAACS,KAAK,CAAC,mDAAmD;EAChF,CAAC,CAAC,CACDL,eAAe,CAAC;IACfC,OAAO,EAAE,sBAAsB;IAC/BC,IAAI,EAAE,QAAQ;IACdC,KAAK,EAAEP,kEAAc,CAACS,KAAK,CAAC,sCAAsC,CAAC;IACnEE,GAAG,EAAE;EACP,CAAC,CAAC,CACDP,eAAe,CAAC;IACfC,OAAO,EAAE,6BAA6B;IACtCC,IAAI,EAAE,SAAS;IACfC,KAAK,EAAEP,kEAAc,CAACS,KAAK,CAAC,8CAA8C,CAAC;IAC3EC,IAAI,EAAEV,kEAAc,CAACS,KAAK,CAAC,mDAAmD;EAChF,CAAC,CAAC,CACDG,kBAAkB,CACjB;IACEC,IAAI,EAAE,aAAa;IACnBN,KAAK,EAAEP,kEAAc,CAACS,KAAK,CAAC,yDAAyD,CAAC;IACtFK,UAAU,EAAE,2CAA2C;IACvDC,UAAU,EAAE;EACd,CAAC,EACD,MACF,CAAC,CACAH,kBAAkB,CACjB;IACEC,IAAI,EAAE,aAAa;IACnBN,KAAK,EAAEP,kEAAc,CAACS,KAAK,CAA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jF;WACA;WACA;;;;;WCPA;;;;;WCAA;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D","sources":["webpack://@fof/polls/./src/admin/index.ts","webpack://@fof/polls/external root \"flarum.core.compat['admin/app']\"","webpack://@fof/polls/webpack/bootstrap","webpack://@fof/polls/webpack/runtime/compat get default export","webpack://@fof/polls/webpack/runtime/define property getters","webpack://@fof/polls/webpack/runtime/hasOwnProperty shorthand","webpack://@fof/polls/webpack/runtime/make namespace object"],"sourcesContent":["import app from 'flarum/admin/app';\n\napp.initializers.add('fof/polls', () => {\n app.extensionData\n .for('fof-polls')\n .registerSetting({\n setting: 'fof-polls.allowOptionImage',\n type: 'switch',\n label: app.translator.trans('fof-polls.admin.settings.allow_option_image'),\n })\n .registerSetting({\n setting: 'fof-polls.optionsColorBlend',\n type: 'switch',\n label: app.translator.trans('fof-polls.admin.settings.options_color_blend'),\n help: app.translator.trans('fof-polls.admin.settings.options_color_blend_help'),\n })\n .registerSetting({\n setting: 'fof-polls.maxOptions',\n type: 'number',\n label: app.translator.trans('fof-polls.admin.settings.max_options'),\n min: 2,\n })\n .registerSetting({\n setting: 'fof-polls.enableGlobalPolls',\n type: 'boolean',\n label: app.translator.trans('fof-polls.admin.settings.enable_global_polls'),\n help: app.translator.trans('fof-polls.admin.settings.enable_global_polls_help'),\n })\n .registerPermission(\n {\n icon: 'fas fa-poll',\n label: app.translator.trans('fof-polls.admin.permissions.view_results_without_voting'),\n permission: 'discussion.polls.viewResultsWithoutVoting',\n allowGuest: true,\n },\n 'view'\n )\n .registerPermission(\n {\n icon: 'fas fa-poll',\n label: app.translator.trans('fof-polls.admin.permissions.start'),\n permission: 'discussion.polls.start',\n },\n 'start'\n )\n .registerPermission(\n {\n icon: 'fas fa-poll',\n label: app.translator.trans('fof-polls.admin.permissions.start_global'),\n permission: 'startGlobalPoll',\n },\n 'start'\n )\n .registerPermission(\n {\n icon: 'fas fa-pencil-alt',\n label: app.translator.trans('fof-polls.admin.permissions.self_edit'),\n permission: 'polls.selfEdit',\n },\n 'start'\n )\n .registerPermission(\n {\n icon: 'fas fa-pencil-alt',\n label: app.translator.trans('fof-polls.admin.permissions.self_post_edit'),\n permission: 'polls.selfPostEdit',\n },\n 'start'\n )\n .registerPermission(\n {\n icon: 'fas fa-poll',\n label: app.translator.trans('fof-polls.admin.permissions.vote'),\n permission: 'discussion.polls.vote',\n },\n 'reply'\n )\n .registerPermission(\n {\n icon: 'fas fa-poll',\n label: app.translator.trans('fof-polls.admin.permissions.change_vote'),\n permission: 'polls.changeVote',\n },\n 'reply'\n )\n .registerPermission(\n {\n icon: 'fas fa-pencil-alt',\n label: app.translator.trans('fof-polls.admin.permissions.moderate'),\n permission: 'discussion.polls.moderate',\n },\n 'moderate'\n );\n});\n","module.exports = flarum.core.compat['admin/app'];","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};"],"names":["app","initializers","add","extensionData","registerSetting","setting","type","label","translator","trans","help","min","registerPermission","icon","permission","allowGuest"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"admin.js","mappings":";;;;;;;;;;;;;;AAAmC;AAEnCA,oEAAgB,CAACE,GAAG,CAAC,WAAW,EAAE,YAAM;EACtCF,qEAAiB,OACX,CAAC,WAAW,CAAC,CAChBI,eAAe,CAAC;IACfC,OAAO,EAAE,4BAA4B;IACrCC,IAAI,EAAE,QAAQ;IACdC,KAAK,EAAEP,kEAAc,CAACS,KAAK,CAAC,6CAA6C;EAC3E,CAAC,CAAC,CACDL,eAAe,CAAC;IACfC,OAAO,EAAE,6BAA6B;IACtCC,IAAI,EAAE,QAAQ;IACdC,KAAK,EAAEP,kEAAc,CAACS,KAAK,CAAC,8CAA8C,CAAC;IAC3EC,IAAI,EAAEV,kEAAc,CAACS,KAAK,CAAC,mDAAmD;EAChF,CAAC,CAAC,CACDL,eAAe,CAAC;IACfC,OAAO,EAAE,sBAAsB;IAC/BC,IAAI,EAAE,QAAQ;IACdC,KAAK,EAAEP,kEAAc,CAACS,KAAK,CAAC,sCAAsC,CAAC;IACnEE,GAAG,EAAE;EACP,CAAC,CAAC,CACDP,eAAe,CAAC;IACfC,OAAO,EAAE,6BAA6B;IACtCC,IAAI,EAAE,SAAS;IACfC,KAAK,EAAEP,kEAAc,CAACS,KAAK,CAAC,8CAA8C,CAAC;IAC3EC,IAAI,EAAEV,kEAAc,CAACS,KAAK,CAAC,mDAAmD;EAChF,CAAC,CAAC,CACDG,kBAAkB,CACjB;IACEC,IAAI,EAAE,aAAa;IACnBN,KAAK,EAAEP,kEAAc,CAACS,KAAK,CAAC,yDAAyD,C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;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;;;;WCtBA;WACA;WACA;WACA;WACA;WACA,iCAAiC,WAAW;WAC5C;WACA;;;;;WCPA;WACA;WACA;WACA;WACA,yCAAyC,wCAAwC;WACjF;WACA;WACA;;;;;WCPA;;;;;WCAA;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D","sources":["webpack://@fof/polls/./src/admin/index.ts","webpack://@fof/polls/external root \"flarum.core.compat['admin/app']\"","webpack://@fof/polls/webpack/bootstrap","webpack://@fof/polls/webpack/runtime/compat get default export","webpack://@fof/polls/webpack/runtime/define property getters","webpack://@fof/polls/webpack/runtime/hasOwnProperty shorthand","webpack://@fof/polls/webpack/runtime/make namespace object","webpack://@fof/polls/./admin.ts"],"sourcesContent":["import app from 'flarum/admin/app';\n\napp.initializers.add('fof/polls', () => {\n app.extensionData\n .for('fof-polls')\n .registerSetting({\n setting: 'fof-polls.allowOptionImage',\n type: 'switch',\n label: app.translator.trans('fof-polls.admin.settings.allow_option_image'),\n })\n .registerSetting({\n setting: 'fof-polls.optionsColorBlend',\n type: 'switch',\n label: app.translator.trans('fof-polls.admin.settings.options_color_blend'),\n help: app.translator.trans('fof-polls.admin.settings.options_color_blend_help'),\n })\n .registerSetting({\n setting: 'fof-polls.maxOptions',\n type: 'number',\n label: app.translator.trans('fof-polls.admin.settings.max_options'),\n min: 2,\n })\n .registerSetting({\n setting: 'fof-polls.enableGlobalPolls',\n type: 'boolean',\n label: app.translator.trans('fof-polls.admin.settings.enable_global_polls'),\n help: app.translator.trans('fof-polls.admin.settings.enable_global_polls_help'),\n })\n .registerPermission(\n {\n icon: 'fas fa-poll',\n label: app.translator.trans('fof-polls.admin.permissions.view_results_without_voting'),\n permission: 'discussion.polls.viewResultsWithoutVoting',\n allowGuest: true,\n },\n 'view'\n )\n .registerPermission(\n {\n icon: 'fas fa-poll',\n label: app.translator.trans('fof-polls.admin.permissions.start'),\n permission: 'discussion.polls.start',\n },\n 'start'\n )\n .registerPermission(\n {\n icon: 'fas fa-poll',\n label: app.translator.trans('fof-polls.admin.permissions.start_global'),\n permission: 'startGlobalPoll',\n },\n 'start'\n )\n .registerPermission(\n {\n icon: 'fas fa-pencil-alt',\n label: app.translator.trans('fof-polls.admin.permissions.self_edit'),\n permission: 'polls.selfEdit',\n },\n 'start'\n )\n .registerPermission(\n {\n icon: 'fas fa-pencil-alt',\n label: app.translator.trans('fof-polls.admin.permissions.self_post_edit'),\n permission: 'polls.selfPostEdit',\n },\n 'start'\n )\n .registerPermission(\n {\n icon: 'fas fa-poll',\n label: app.translator.trans('fof-polls.admin.permissions.vote'),\n permission: 'discussion.polls.vote',\n },\n 'reply'\n )\n .registerPermission(\n {\n icon: 'fas fa-poll',\n label: app.translator.trans('fof-polls.admin.permissions.change_vote'),\n permission: 'polls.changeVote',\n },\n 'reply'\n )\n .registerPermission(\n {\n icon: 'fas fa-pencil-alt',\n label: app.translator.trans('fof-polls.admin.permissions.moderate'),\n permission: 'discussion.polls.moderate',\n },\n 'moderate'\n );\n});\n","module.exports = flarum.core.compat['admin/app'];","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","export * from './src/admin';\n"],"names":["app","initializers","add","extensionData","registerSetting","setting","type","label","translator","trans","help","min","registerPermission","icon","permission","allowGuest"],"sourceRoot":""} \ No newline at end of file diff --git a/js/dist/forum.js b/js/dist/forum.js index d6e24927..86756f40 100644 --- a/js/dist/forum.js +++ b/js/dist/forum.js @@ -1523,6 +1523,9 @@ __webpack_require__.r(__webpack_exports__); /* harmony import */ var _utils_PollControls__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../utils/PollControls */ "./src/forum/utils/PollControls.tsx"); /* harmony import */ var _UploadPollImageButton__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./UploadPollImageButton */ "./src/forum/components/UploadPollImageButton.tsx"); /* harmony import */ var _UploadPollOptionImageButton__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./UploadPollOptionImageButton */ "./src/forum/components/UploadPollOptionImageButton.tsx"); +/* harmony import */ var flarum_common_components_Tooltip__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! flarum/common/components/Tooltip */ "flarum/common/components/Tooltip"); +/* harmony import */ var flarum_common_components_Tooltip__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(flarum_common_components_Tooltip__WEBPACK_IMPORTED_MODULE_15__); + @@ -1636,10 +1639,6 @@ var PollForm = /*#__PURE__*/function (_Component) { name: "pollImage", poll: this.state.poll, onUpload: this.pollImageUploadSuccess.bind(this) - }), m("input", { - type: "hidden", - name: "pollImage", - value: this.image() })), 90); if (this.image()) { items.add('poll_image_alt', m("div", { @@ -1660,11 +1659,13 @@ var PollForm = /*#__PURE__*/function (_Component) { className: "PollModal--answers Form-group" }, m("label", { className: "label PollModal--answers-title" - }, m("span", null, flarum_forum_app__WEBPACK_IMPORTED_MODULE_4___default().translator.trans('fof-polls.forum.modal.options_label')), flarum_common_components_Button__WEBPACK_IMPORTED_MODULE_5___default().component({ - className: 'Button PollModal--button Button--icon small', - icon: 'fas fa-plus', + }, m("span", null, flarum_forum_app__WEBPACK_IMPORTED_MODULE_4___default().translator.trans('fof-polls.forum.modal.options_label'))), this.displayOptions(), m((flarum_common_components_Tooltip__WEBPACK_IMPORTED_MODULE_15___default()), { + text: flarum_forum_app__WEBPACK_IMPORTED_MODULE_4___default().translator.trans('fof-polls.forum.modal.tooltip.options.add-button') + }, m((flarum_common_components_Button__WEBPACK_IMPORTED_MODULE_5___default()), { + className: "Button PollModal--button Button--icon PollModal--add-button", + icon: "fas fa-plus", onclick: this.addOption.bind(this) - })), this.displayOptions()), 80); + }))), 80); items.add('date', m("div", { className: "Form-group" }, m("label", { @@ -1779,14 +1780,10 @@ var PollForm = /*#__PURE__*/function (_Component) { }, flarum_forum_app__WEBPACK_IMPORTED_MODULE_4___default().translator.trans('fof-polls.forum.modal.option_image.label') + ' #' + number), m(_UploadPollOptionImageButton__WEBPACK_IMPORTED_MODULE_14__["default"], { name: 'optionImage' + number, poll: this.state.poll, - option: this.options[i], + option: option, onUpload: function onUpload(fileName) { return _this3.optionImage[i](fileName); } - }), m("input", { - type: "hidden", - name: 'optionImage' + number, - value: this.optionImage[i] }))); } return items; @@ -1807,7 +1804,6 @@ var PollForm = /*#__PURE__*/function (_Component) { this.options.splice(i, 1); this.optionAnswers.splice(i, 1); this.optionImage.splice(i, 1); - this.optionImageAlt.splice(i, 1); }; _proto.data = function data() { var _this4 = this, @@ -2905,18 +2901,17 @@ var UploadPollImageButton = /*#__PURE__*/function (_Button) { } _this = _Button.call.apply(_Button, [this].concat(args)) || this; _this.loading = false; - _this.uploadedImageUrl = undefined; - _this.fileName = undefined; + _this.uploadedImageUrl = void 0; + _this.fileName = void 0; + _this.$input = void 0; return _this; } var _proto = UploadPollImageButton.prototype; _proto.view = function view(vnode) { - var _this$attrs$poll; this.attrs.loading = this.loading; this.attrs.className = flarum_common_utils_classList__WEBPACK_IMPORTED_MODULE_4___default()(this.attrs.className, 'Button'); - if ((_this$attrs$poll = this.attrs.poll) != null && _this$attrs$poll.imageUrl() || this.uploadedImageUrl) { - var _this$attrs$poll2; - var imageUrl = this.uploadedImageUrl || ((_this$attrs$poll2 = this.attrs.poll) == null ? void 0 : _this$attrs$poll2.imageUrl()); + var imageUrl = this.getImageUrl(); + if (imageUrl) { this.attrs.onclick = this.remove.bind(this); return m("div", null, m("p", null, m("img", { src: imageUrl, @@ -2938,15 +2933,15 @@ var UploadPollImageButton = /*#__PURE__*/function (_Button) { _proto.upload = function upload() { var _this2 = this; if (this.loading) return; - var $input = $(''); - $input.appendTo('body').hide().trigger('click').on('change', function (e) { + this.$input = $(''); + this.$input.appendTo('body').hide().trigger('click').on('change', function (e) { var body = new FormData(); - body.append('image', $(e.target)[0].files[0]); + body.append('image', e.target.files[0]); _this2.loading = true; m.redraw(); flarum_forum_app__WEBPACK_IMPORTED_MODULE_2___default().request({ method: 'POST', - url: _this2.resourceUrl(), + url: _this2.resourceUrl('save'), serialize: function serialize(raw) { return raw; }, @@ -2963,14 +2958,21 @@ var UploadPollImageButton = /*#__PURE__*/function (_Button) { m.redraw(); flarum_forum_app__WEBPACK_IMPORTED_MODULE_2___default().request({ method: 'DELETE', - url: this.resourceUrl() + url: this.resourceUrl('delete') }).then(this.success.bind(this), this.failure.bind(this)); }; - _proto.resourceUrl = function resourceUrl() { + _proto.resourceUrl = function resourceUrl(context) { var url = flarum_forum_app__WEBPACK_IMPORTED_MODULE_2___default().forum.attribute('apiUrl') + '/fof/polls/' + this.attrs.name; var poll = this.attrs.poll; if (poll != null && poll.exists) url += '/' + (poll == null ? void 0 : poll.id()); return url; + }; + _proto.getImageUrl = function getImageUrl() { + var _this$attrs$poll; + if (typeof this.uploadedImageUrl !== 'undefined') { + return this.uploadedImageUrl; + } + return (_this$attrs$poll = this.attrs.poll) == null ? void 0 : _this$attrs$poll.imageUrl(); } /** @@ -2980,12 +2982,13 @@ var UploadPollImageButton = /*#__PURE__*/function (_Button) { * @protected */; _proto.success = function success(response) { - var _this$attrs$onUpload, _this$attrs; + var _response$fileUrl, _this$attrs$onUpload, _this$attrs, _this$$input; this.loading = false; - this.uploadedImageUrl = response == null ? void 0 : response.fileUrl; + this.uploadedImageUrl = (_response$fileUrl = response == null ? void 0 : response.fileUrl) != null ? _response$fileUrl : null; this.fileName = response == null ? void 0 : response.fileName; (_this$attrs$onUpload = (_this$attrs = this.attrs).onUpload) == null || _this$attrs$onUpload.call(_this$attrs, response == null ? void 0 : response.fileName); m.redraw(); + (_this$$input = this.$input) == null || _this$$input.remove(); } /** @@ -2995,8 +2998,10 @@ var UploadPollImageButton = /*#__PURE__*/function (_Button) { * @protected */; _proto.failure = function failure(response) { + var _this$$input2; this.loading = false; m.redraw(); + (_this$$input2 = this.$input) == null || _this$$input2.remove(); }; return UploadPollImageButton; }((flarum_common_components_Button__WEBPACK_IMPORTED_MODULE_3___default())); @@ -3037,11 +3042,18 @@ var UploadPollOptionImageButton = /*#__PURE__*/function (_UploadPollImageButto) className: "UploadPollOptionImageButton-info" }, flarum_forum_app__WEBPACK_IMPORTED_MODULE_1___default().translator.trans('fof-polls.forum.modal.option_image.requires_saved_poll')); }; - _proto.resourceUrl = function resourceUrl() { + _proto.getImageUrl = function getImageUrl() { + var _this$attrs$option; + if (typeof this.uploadedImageUrl !== 'undefined') { + return this.uploadedImageUrl; + } + return (_this$attrs$option = this.attrs.option) == null ? void 0 : _this$attrs$option.imageUrl(); + }; + _proto.resourceUrl = function resourceUrl(context) { var url = flarum_forum_app__WEBPACK_IMPORTED_MODULE_1___default().forum.attribute('apiUrl') + '/fof/polls/pollOptionImage'; var poll = this.attrs.poll; var option = this.attrs.option; - if (poll != null && poll.exists) url += '/' + (poll == null ? void 0 : poll.id()); + if (poll != null && poll.exists && context === 'save') url += '/' + (poll == null ? void 0 : poll.id()); if (option != null && option.exists) url += '/' + (option == null ? void 0 : option.id()); return url; }; diff --git a/js/dist/forum.js.map b/js/dist/forum.js.map index d7edd7aa..2d3ac0e5 100644 --- a/js/dist/forum.js.map +++ b/js/dist/forum.js.map @@ -1 +1 @@ -{"version":3,"file":"forum.js","mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAmC;AAEW;AACQ;AACsB;AACV;AACP;AAM3D,SAASM,MAAMA,CAACC,IAAyB,EAAE;EACzC,IAAIA,IAAI,EAAE;IACR,IAAMC,IAAI,GAAGR,6DAAS,CAACU,YAAY,CAAO,OAAO,CAAC;IAElDF,IAAI,CAACG,WAAW,GAAGJ,IAAI,CAACK,OAAO,CAACC,GAAG,CAAC,UAACC,MAAuB,EAAK;MAC/D,IAAMC,UAAU,GAAGf,6DAAS,CAACU,YAAY,CAAa,cAAc,CAAC;MACrEK,UAAU,CAACC,cAAc,CAACF,MAAM,CAAC;MACjC,OAAOC,UAAU;IACnB,CAAC,CAAC;IACFP,IAAI,CAACQ,cAAc,CAACT,IAAI,CAAC;IAEzB,OAAOC,IAAI;EACb;EACA,OAAOD,IAAI;AACb;AAEO,IAAMU,aAAa,GAAG,SAAhBA,aAAaA,CAAIC,QAAwB,EAAK;EACzD;EACAA,QAAQ,CAACC,SAAS,CAACC,OAAO,GAAG,YAAY;IAAA,IAAAC,KAAA;IACvCrB,6DAAS,CAACuB,IAAI,CAAClB,mEAAe,EAAE;MAC9BG,IAAI,EAAEF,MAAM,CAAC,IAAI,CAACY,QAAQ,CAACM,MAAM,CAAChB,IAAI,CAAC;MACvCiB,QAAQ,EAAE,SAAAA,SAACjB,IAAyB;QAAA,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,OAAOlM,gBAAgB,CAACkM,KAAK,CAAC;AAChC;;;;;;UC7BA;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;;;;WCtBA;WACA;WACA;WACA;WACA;WACA,iCAAiC,WAAW;WAC5C;WACA;;;;;WCPA;WACA;WACA;WACA;WACA,yCAAyC,wCAAwC;WACjF;WACA;WACA;;;;;WCPA;;;;;WCAA;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D","sources":["webpack://@fof/polls/./src/forum/addComposerItems.tsx","webpack://@fof/polls/./src/forum/addDiscussionBadge.tsx","webpack://@fof/polls/./src/forum/addNavItem.ts","webpack://@fof/polls/./src/forum/addPollsToPost.tsx","webpack://@fof/polls/./src/forum/addPostControls.tsx","webpack://@fof/polls/./src/forum/components/AbstractPollPage.tsx","webpack://@fof/polls/./src/forum/components/ComposePollHero.tsx","webpack://@fof/polls/./src/forum/components/ComposePollPage.tsx","webpack://@fof/polls/./src/forum/components/CreatePollModal.tsx","webpack://@fof/polls/./src/forum/components/EditPollModal.tsx","webpack://@fof/polls/./src/forum/components/ListVotersModal.tsx","webpack://@fof/polls/./src/forum/components/Poll/PollImage.tsx","webpack://@fof/polls/./src/forum/components/Poll/PollList.tsx","webpack://@fof/polls/./src/forum/components/Poll/PollListItem.tsx","webpack://@fof/polls/./src/forum/components/Poll/PollOption.tsx","webpack://@fof/polls/./src/forum/components/Poll/PollOptions.tsx","webpack://@fof/polls/./src/forum/components/Poll/PollSubmitButton.tsx","webpack://@fof/polls/./src/forum/components/PollForm.tsx","webpack://@fof/polls/./src/forum/components/PollShowcase.tsx","webpack://@fof/polls/./src/forum/components/PollShowcaseItem.tsx","webpack://@fof/polls/./src/forum/components/PollView.tsx","webpack://@fof/polls/./src/forum/components/PollViewPage.tsx","webpack://@fof/polls/./src/forum/components/PollsPage.tsx","webpack://@fof/polls/./src/forum/components/PollsShowcasePage.tsx","webpack://@fof/polls/./src/forum/components/PostPoll.tsx","webpack://@fof/polls/./src/forum/components/UploadPollImageButton.tsx","webpack://@fof/polls/./src/forum/components/UploadPollOptionImageButton.tsx","webpack://@fof/polls/./src/forum/components/form/FormError.tsx","webpack://@fof/polls/./src/forum/components/index.ts","webpack://@fof/polls/./src/forum/extend.ts","webpack://@fof/polls/./src/forum/index.ts","webpack://@fof/polls/./src/forum/models/Poll.ts","webpack://@fof/polls/./src/forum/models/PollOption.ts","webpack://@fof/polls/./src/forum/models/PollVote.ts","webpack://@fof/polls/./src/forum/models/index.ts","webpack://@fof/polls/./src/forum/states/PollFormState.ts","webpack://@fof/polls/./src/forum/states/PollListState.ts","webpack://@fof/polls/./src/forum/states/PollState.ts","webpack://@fof/polls/./src/forum/states/index.ts","webpack://@fof/polls/./src/forum/utils/PollControls.tsx","webpack://@fof/polls/external root \"flarum.core.compat['common/Component']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/Model']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/components/Badge']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/components/Button']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/components/Dropdown']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/components/Link']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/components/LinkButton']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/components/LoadingIndicator']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/components/Modal']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/components/Page']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/components/Placeholder']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/components/SelectDropdown']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/components/Separator']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/components/Switch']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/components/Tooltip']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/extend']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/extenders']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/helpers/avatar']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/helpers/highlight']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/helpers/icon']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/helpers/listItems']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/helpers/username']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/models/Discussion']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/models/Forum']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/models/Post']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/states/PaginatedListState']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/utils/EventEmitter']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/utils/ItemList']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/utils/Stream']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/utils/SubtreeRetainer']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/utils/abbreviateNumber']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/utils/classList']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/utils/computed']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/utils/extractText']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/utils/string']\"","webpack://@fof/polls/external root \"flarum.core.compat['forum/app']\"","webpack://@fof/polls/external root \"flarum.core.compat['forum/components/CommentPost']\"","webpack://@fof/polls/external root \"flarum.core.compat['forum/components/DiscussionComposer']\"","webpack://@fof/polls/external root \"flarum.core.compat['forum/components/DiscussionList']\"","webpack://@fof/polls/external root \"flarum.core.compat['forum/components/DiscussionPage']\"","webpack://@fof/polls/external root \"flarum.core.compat['forum/components/IndexPage']\"","webpack://@fof/polls/external root \"flarum.core.compat['forum/components/LogInModal']\"","webpack://@fof/polls/external root \"flarum.core.compat['forum/components/ReplyComposer']\"","webpack://@fof/polls/external root \"flarum.core.compat['forum/utils/PostControls']\"","webpack://@fof/polls/external root \"flarum.core.compat['forum/utils/slidable']\"","webpack://@fof/polls/./node_modules/@babel/runtime/helpers/regeneratorRuntime.js","webpack://@fof/polls/./node_modules/@babel/runtime/helpers/typeof.js","webpack://@fof/polls/./node_modules/@babel/runtime/regenerator/index.js","webpack://@fof/polls/./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js","webpack://@fof/polls/./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js","webpack://@fof/polls/./node_modules/@babel/runtime/helpers/esm/construct.js","webpack://@fof/polls/./node_modules/@babel/runtime/helpers/esm/createClass.js","webpack://@fof/polls/./node_modules/@babel/runtime/helpers/esm/extends.js","webpack://@fof/polls/./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js","webpack://@fof/polls/./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js","webpack://@fof/polls/./node_modules/@babel/runtime/helpers/esm/isNativeFunction.js","webpack://@fof/polls/./node_modules/@babel/runtime/helpers/esm/isNativeReflectConstruct.js","webpack://@fof/polls/./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js","webpack://@fof/polls/./node_modules/@babel/runtime/helpers/esm/toPrimitive.js","webpack://@fof/polls/./node_modules/@babel/runtime/helpers/esm/toPropertyKey.js","webpack://@fof/polls/./node_modules/@babel/runtime/helpers/esm/typeof.js","webpack://@fof/polls/./node_modules/@babel/runtime/helpers/esm/wrapNativeSuper.js","webpack://@fof/polls/webpack/bootstrap","webpack://@fof/polls/webpack/runtime/compat get default export","webpack://@fof/polls/webpack/runtime/define property getters","webpack://@fof/polls/webpack/runtime/hasOwnProperty shorthand","webpack://@fof/polls/webpack/runtime/make namespace object"],"sourcesContent":["import app from 'flarum/forum/app';\n\nimport { extend } from 'flarum/common/extend';\nimport classList from 'flarum/common/utils/classList';\nimport DiscussionComposer from 'flarum/forum/components/DiscussionComposer';\nimport ReplyComposer from 'flarum/forum/components/ReplyComposer';\nimport CreatePollModal from './components/CreatePollModal';\nimport Poll from './models/Poll';\nimport PollOption from './models/PollOption';\nimport { ModelAttributes } from 'flarum/common/Model';\nimport PollModelAttributes from './models/PollModelAttributes';\n\nfunction toPoll(data: PollModelAttributes) {\n if (data) {\n const poll = app.store.createRecord('polls');\n\n poll.tempOptions = data.options.map((option: ModelAttributes) => {\n const pollOption = app.store.createRecord('poll_options');\n pollOption.pushAttributes(option);\n return pollOption;\n });\n poll.pushAttributes(data);\n\n return poll;\n }\n return data;\n}\n\nexport const addToComposer = (composer: ComponentClass) => {\n // @ts-ignore\n composer.prototype.addPoll = function () {\n app.modal.show(CreatePollModal, {\n poll: toPoll(this.composer.fields.poll),\n onsubmit: (poll: PollModelAttributes) => (this.composer.fields.poll = poll),\n });\n };\n\n // Add button to DiscussionComposer header\n extend(composer.prototype, 'headerItems', function (items) {\n const discussion = this.composer.body?.attrs?.discussion;\n\n // @ts-ignore\n const canStartPoll = discussion?.canStartPoll() ?? app.forum.canStartPolls();\n\n if (canStartPoll) {\n items.add(\n 'polls',\n \n \n {app.translator.trans(`fof-polls.forum.composer_discussion.${this.composer.fields.poll ? 'edit' : 'add'}_poll`)}\n \n ,\n 1\n );\n }\n });\n\n extend(composer.prototype, 'data', function (data) {\n if (this.composer.fields.poll) {\n data.poll = this.composer.fields.poll;\n }\n });\n};\n\nexport default () => {\n addToComposer(DiscussionComposer);\n addToComposer(ReplyComposer);\n};\n","import app from 'flarum/forum/app';\n\nimport { extend } from 'flarum/common/extend';\nimport Badge from 'flarum/common/components/Badge';\nimport DiscussionList from 'flarum/forum/components/DiscussionList';\nimport Discussion from 'flarum/common/models/Discussion';\nimport { PaginatedListRequestParams } from 'flarum/common/states/PaginatedListState';\n\nexport default () => {\n // @ts-ignore\n extend(DiscussionList.prototype, 'requestParams', (params: PaginatedListRequestParams) => {\n (params.include as string[]).push('poll');\n });\n\n extend(Discussion.prototype, 'badges', function (badges) {\n // @ts-ignore\n if (this.hasPoll()) {\n badges.add(\n 'poll',\n Badge.component({\n type: 'poll',\n label: app.translator.trans('fof-polls.forum.tooltip.badge'),\n icon: 'fas fa-poll',\n }),\n 5\n );\n }\n });\n};\n","import app from 'flarum/forum/app';\nimport { extend } from 'flarum/common/extend';\nimport IndexPage from 'flarum/forum/components/IndexPage';\nimport LinkButton from 'flarum/common/components/LinkButton';\n\nexport default function addNavItem() {\n extend(IndexPage.prototype, 'navItems', (items) => {\n if (!app.forum.attribute('globalPollsEnabled')) {\n return;\n }\n\n items.add(\n 'fof-polls-showcase',\n LinkButton.component(\n {\n href: app.route('fof.polls.showcase'),\n icon: 'fas fa-poll',\n },\n app.translator.trans('fof-polls.forum.page.nav')\n ),\n 35\n );\n\n const showAllGlobalPolls = app.forum.attribute('canStartGlobalPolls');\n\n if (showAllGlobalPolls) {\n items.add(\n 'fof-polls-list',\n LinkButton.component(\n {\n href: app.route('fof.polls.list'),\n icon: 'fas fa-list',\n },\n app.translator.trans('fof-polls.forum.page.nav-all')\n ),\n 32\n );\n }\n });\n}\n","import app from 'flarum/forum/app';\n\nimport { extend } from 'flarum/common/extend';\nimport CommentPost from 'flarum/forum/components/CommentPost';\nimport PollView from './components/PollView';\nimport DiscussionPage from 'flarum/forum/components/DiscussionPage';\nimport Poll from './models/Poll';\nimport Post from 'flarum/common/models/Post';\nimport PollOption from './models/PollOption';\n\ninterface PollPost extends Post {\n polls: () => Poll[];\n}\n\ninterface PusherPollDto {\n pollId: string;\n pollVoteCount: number;\n options: { [key: string]: number };\n}\n\nexport default () => {\n extend(CommentPost.prototype, 'content', function (content) {\n const post = this.attrs.post as PollPost;\n\n if ((!post.isHidden() || this.revealContent) && post.polls()) {\n for (const poll of post.polls()) {\n if (poll) {\n content.push();\n }\n }\n }\n });\n\n extend(CommentPost.prototype, 'oninit', function () {\n this.subtree.check(() => {\n const polls = (this.attrs.post as PollPost).polls();\n\n const checks = polls?.map?.(\n (poll) =>\n poll && [\n poll.data?.attributes,\n poll.options().map?.((option) => option?.data?.attributes),\n poll.myVotes().map?.((vote) => vote.option()?.id()),\n ]\n );\n\n return JSON.stringify(checks);\n });\n });\n\n extend(DiscussionPage.prototype, 'oncreate', function () {\n // @ts-ignore\n if (app.pusher) {\n // @ts-ignore\n app.pusher.then((binding) => {\n // We will listen for updates to all polls and options\n // Even if that model is not in the current discussion, it doesn't really matter\n binding.channels.main.bind('updatedPollOptions', (data: PusherPollDto) => {\n const poll = app.store.getById('polls', data['pollId']);\n\n if (poll) {\n poll.pushAttributes({\n voteCount: data['pollVoteCount'],\n });\n\n // Not redrawing here, as the option below should trigger the redraw already\n }\n\n const changedOptions = data['options'];\n\n for (const optionId in changedOptions) {\n const option = app.store.getById('poll_options', optionId);\n\n if (option && option.voteCount() !== undefined) {\n option.pushAttributes({\n voteCount: changedOptions[optionId],\n });\n }\n }\n\n m.redraw();\n });\n });\n }\n });\n\n extend(DiscussionPage.prototype, 'onremove', function () {\n // @ts-ignore\n if (app.pusher) {\n // @ts-ignore\n app.pusher.then((binding) => {\n binding.channels.main.unbind('updatedPollOptions');\n });\n }\n });\n};\n","import app from 'flarum/forum/app';\n\nimport { extend } from 'flarum/common/extend';\nimport PostControls from 'flarum/forum/utils/PostControls';\nimport CreatePollModal from './components/CreatePollModal';\nimport Button from 'flarum/common/components/Button';\nimport Post from 'flarum/common/models/Post';\nimport PollModelAttributes from './models/PollModelAttributes';\n\nexport default () => {\n const createPoll = (post: Post) =>\n app.modal.show(CreatePollModal, {\n onsubmit: (data: PollModelAttributes) =>\n app.store\n .createRecord('polls')\n .save(\n {\n ...data,\n relationships: {\n post,\n },\n },\n {\n data: {\n include: 'options,myVotes,myVotes.option',\n },\n }\n )\n .then((poll) => {\n // @ts-ignore\n post.rawRelationship('polls')?.push?.({ type: 'polls', id: poll.id() });\n\n return poll;\n }),\n });\n\n extend(PostControls, 'moderationControls', function (items, post) {\n // @ts-ignore\n if (!post.isHidden() && post.canStartPoll()) {\n items.add(\n 'addPoll',\n \n );\n }\n });\n};\n","import Page, { IPageAttrs } from 'flarum/common/components/Page';\nimport PollListState from '../states/PollListState';\nimport Poll from '../models/Poll';\nimport ItemList from 'flarum/common/utils/ItemList';\nimport type Mithril from 'mithril';\nimport LoadingIndicator from 'flarum/common/components/LoadingIndicator';\nimport IndexPage from 'flarum/forum/components/IndexPage';\nimport listItems from 'flarum/common/helpers/listItems';\nimport app from 'flarum/forum/app';\nimport SelectDropdown from 'flarum/common/components/SelectDropdown';\n\nexport abstract class AbstractPollPage extends Page {\n loading: boolean = false;\n poll: Poll | null | undefined = null;\n polls: Poll[] = [];\n\n view(): Mithril.Children {\n return
{this.pageContent().toArray()}
;\n }\n\n pageContent(): ItemList {\n const items = new ItemList();\n\n items.add('hero', this.hero(), 100);\n items.add('main',
{this.mainContent().toArray()}
, 10);\n\n return items;\n }\n\n mainContent(): ItemList {\n const items = new ItemList();\n\n items.add('sidebar', this.sidebar(), 100);\n items.add('content', this.content(), 10);\n\n return items;\n }\n\n content(): Mithril.Children {\n return
{this.contentItems().toArray()}
;\n }\n\n contentItems(): ItemList {\n const items = new ItemList();\n\n if (this.loading) {\n items.add('loading', );\n }\n\n return items;\n }\n\n hero(): Mithril.Children {\n return IndexPage.prototype.hero();\n }\n\n sidebar(): Mithril.Children {\n return (\n \n );\n }\n\n sidebarItems(): ItemList {\n const items = IndexPage.prototype.sidebarItems();\n\n items.setContent(\n 'nav',\n \n {this.navItems().toArray()}\n \n );\n\n return items;\n }\n\n navItems(): ItemList {\n const items = IndexPage.prototype.navItems();\n\n if (app.initializers.has('flarum-tags')) {\n // remove the tags from the nav items\n items.remove('separator');\n items.remove('moreTags');\n\n // each tag is added using the key \"tag{id}\". We need to remove all of them\n for (const key in items.toObject()) {\n if (key.startsWith('tag') && key !== 'tags') {\n items.remove(key);\n }\n }\n }\n\n return items;\n }\n}\n","import Mithril from 'mithril';\nimport app from 'flarum/forum/app';\nimport Component, { ComponentAttrs } from 'flarum/common/Component';\nimport LinkButton from 'flarum/common/components/LinkButton';\nimport Poll from '../models/Poll';\nimport ItemList from 'flarum/common/utils/ItemList';\n\nexport interface ComposePollHeroAttrs extends ComponentAttrs {\n poll: Poll;\n}\n\nexport default class ComposePollHero extends Component {\n poll!: Poll;\n\n oninit(vnode: Mithril.Vnode): void {\n super.oninit(vnode);\n\n this.poll = this.attrs.poll;\n }\n\n view(): Mithril.Children {\n return (\n
\n
\n
\n

{app.translator.trans(`fof-polls.forum.compose.${!!this.poll.id() ? 'edit' : 'add'}_title`)}

\n
{this.controlItems().toArray()}
\n
\n
\n
\n );\n }\n\n controlItems(): ItemList {\n const items = new ItemList();\n\n items.add(\n 'edit',\n \n {app.translator.trans('fof-polls.forum.compose.polls_manager')}\n \n );\n\n if (this.poll.exists) {\n items.add(\n 'view',\n \n {app.translator.trans('fof-polls.forum.compose.polls_preview')}\n \n );\n }\n\n return items;\n }\n}\n","import type Mithril from 'mithril';\nimport app from 'flarum/forum/app';\nimport Page from 'flarum/common/components/Page';\nimport Poll from '../models/Poll';\nimport LoadingIndicator from 'flarum/common/components/LoadingIndicator';\nimport PollForm from './PollForm';\nimport PollFormState from '../states/PollFormState';\nimport ComposePollHero from './ComposePollHero';\nimport Button from 'flarum/common/components/Button';\nimport listItems from 'flarum/common/helpers/listItems';\nimport ItemList from 'flarum/common/utils/ItemList';\nimport SelectDropdown from 'flarum/common/components/SelectDropdown';\nimport IndexPage from 'flarum/forum/components/IndexPage';\n\nexport default class ComposePollPage extends Page {\n poll: Poll | null | undefined = null;\n\n loading: boolean = false;\n\n oninit(vnode: Mithril.Vnode) {\n super.oninit(vnode);\n\n if (!app.forum.attribute('globalPollsEnabled')) {\n m.route.set('/');\n return;\n }\n\n // Get the `edit` parameter from the URL\n const editId = m.route.param('id');\n if (editId) {\n this.poll = app.store.getById('poll', editId);\n\n if (!this.poll) {\n this.loading = true;\n\n app.store.find('fof/polls', editId).then((item) => {\n this.poll = item;\n this.loading = false;\n app.setTitle(app.translator.trans(`fof-polls.forum.compose.${!!this.poll?.id() ? 'edit' : 'add'}_title`) as string);\n m.redraw();\n });\n }\n } else {\n this.poll = PollFormState.createNewPoll();\n }\n\n app.history.push('compose-poll', app.translator.trans(`fof-polls.forum.compose.${!!this.poll?.id() ? 'edit' : 'add'}_title`) as string);\n this.bodyClass = 'App--compose-poll';\n app.setTitle(app.translator.trans(`fof-polls.forum.compose.${!!this.poll?.id() ? 'edit' : 'add'}_title`) as string);\n }\n\n view(): Mithril.Children {\n // prevent users from accessing the page if they can't start global polls\n if (!app.forum.attribute('canStartGlobalPolls')) {\n m.route.set('/');\n return;\n }\n\n if (this.loading) {\n return ;\n }\n\n return (\n
\n \n
\n
\n \n
\n \n
\n
\n
\n
\n );\n }\n\n async onsubmit(data: Object, state: PollFormState) {\n const isNew = state.poll.id() === undefined;\n await state.save(data);\n\n const alertAttrs = isNew\n ? {\n type: 'success',\n controls: [\n \n m.route.set(\n app.route('fof.polls.compose', {\n id: state.poll.id(),\n })\n )\n }\n >\n {app.translator.trans('fof-polls.forum.compose.continue_editing')}\n ,\n ],\n }\n : {\n type: 'success',\n };\n\n // Show success alert\n const alertId = app.alerts.show(alertAttrs, app.translator.trans('fof-polls.forum.compose.success'));\n\n // Hide alert after 10 seconds\n setTimeout(() => app.alerts.dismiss(alertId), 10000);\n\n if (isNew) {\n m.route.set(app.route('fof.polls.list'));\n }\n }\n\n sidebarItems(): ItemList {\n const items = new ItemList();\n\n items.add(\n 'nav',\n \n {this.navItems().toArray()}\n \n );\n\n return items;\n }\n\n navItems() {\n return IndexPage.prototype.navItems();\n }\n}\n","import type Mithril from 'mithril';\nimport app from 'flarum/forum/app';\nimport Modal, { IInternalModalAttrs } from 'flarum/common/components/Modal';\nimport PollForm from './PollForm';\nimport PollModel from '../models/Poll';\nimport PollFormState from '../states/PollFormState';\n\ninterface CreatePollModalAttrs extends IInternalModalAttrs {\n poll: PollModel;\n onsubmit: (data: object) => Promise;\n}\n\nexport default class CreatePollModal extends Modal {\n title(): Mithril.Children {\n return app.translator.trans('fof-polls.forum.modal.add_title');\n }\n\n className(): string {\n return 'PollDiscussionModal Modal--medium';\n }\n\n content(): Mithril.Children {\n return [\n
\n \n
,\n ];\n }\n\n async onFormSubmit(data: object, state: PollFormState): Promise {\n this.hide();\n await this.attrs.onsubmit(data);\n }\n}\n","import type Mithril from 'mithril';\nimport app from 'flarum/forum/app';\nimport CreatePollModal from './CreatePollModal';\nimport PollFormState from '../states/PollFormState';\n\nexport default class EditPollModal extends CreatePollModal {\n title(): Mithril.Children {\n return app.translator.trans('fof-polls.forum.modal.edit_title');\n }\n\n async onFormSubmit(data: object, state: PollFormState): Promise {\n await state.save(data);\n\n // Show success alert\n const alertId = app.alerts.show(\n {\n type: 'success',\n },\n app.translator.trans('fof-polls.forum.compose.success')\n );\n\n // Hide alert after 10 seconds\n setTimeout(() => app.alerts.dismiss(alertId), 10000);\n }\n}\n","import type Mithril from 'mithril';\nimport app from 'flarum/forum/app';\nimport Modal, { IInternalModalAttrs } from 'flarum/common/components/Modal';\nimport avatar from 'flarum/common/helpers/avatar';\nimport username from 'flarum/common/helpers/username';\nimport Link from 'flarum/common/components/Link';\nimport LoadingIndicator from 'flarum/common/components/LoadingIndicator';\nimport PollModel from '../models/Poll';\nimport PollVote from '../models/PollVote';\nimport User from 'flarum/common/models/User';\nimport PollOption from '../models/PollOption';\n\ninterface ListVotersModalAttrs extends IInternalModalAttrs {\n poll: PollModel;\n onsubmit: (data: object) => Promise;\n}\n\nexport default class ListVotersModal extends Modal {\n oninit(vnode: Mithril.Vnode): void {\n super.oninit(vnode);\n\n this.loading = true;\n\n app.store\n .find('fof/polls', this.attrs.poll.id()!, {\n include: 'votes,votes.user,votes.option',\n })\n .then(() => (this.loading = false))\n .finally(() => m.redraw());\n }\n\n className(): string {\n return 'Modal--medium VotesModal';\n }\n\n title(): Mithril.Children {\n return app.translator.trans('fof-polls.forum.votes_modal.title');\n }\n\n content(): Mithril.Children {\n const options = this.attrs.poll.options() as PollOption[];\n return
{this.loading ? : options.map(this.optionContent.bind(this))}
;\n }\n\n optionContent(opt: PollOption): Mithril.Children {\n const votes = (this.attrs.poll.votes() || []).filter((v) => opt.id() === v!.option()!.id()) as PollVote[];\n\n return (\n
\n

{opt.answer()! + ':'}

\n\n {votes.length ? (\n
{votes.map(this.voteContent.bind(this))}
\n ) : (\n

{app.translator.trans('fof-polls.forum.modal.no_voters')}

\n )}\n
\n );\n }\n\n voteContent(vote: PollVote): Mithril.Children {\n const user = vote.user() as User;\n const attrs = user && { href: app.route.user(user) };\n\n return (\n \n {avatar(user)} {username(user)}\n \n );\n }\n}\n","import type Mithril from 'mithril';\nimport Component, { ComponentAttrs } from 'flarum/common/Component';\n\ninterface PollImageAttrs extends ComponentAttrs {\n imageUrl: string;\n alt: string | null;\n}\n\nexport default class PollImage extends Component {\n view(): Mithril.Children {\n return (\n
\n {this.attrs.alt}\n
\n );\n }\n}\n","import app from 'flarum/forum/app';\nimport Component, { ComponentAttrs } from 'flarum/common/Component';\nimport PollListItem from './PollListItem';\nimport Button from 'flarum/common/components/Button';\nimport LoadingIndicator from 'flarum/common/components/LoadingIndicator';\nimport Placeholder from 'flarum/common/components/Placeholder';\nimport classList from 'flarum/common/utils/classList';\nimport PollListState from '../../states/PollListState';\n\nexport interface PollListAttrs extends ComponentAttrs {\n state: PollListState;\n}\n\n/**\n * The `PollList` component displays a list of polls.\n */\nexport default class PollList extends Component {\n view() {\n const state = this.attrs.state;\n const params = state.getParams();\n const isLoading = state.isInitialLoading() || state.isLoadingNext();\n\n let loading;\n\n if (isLoading) {\n loading = ;\n } else if (state.hasNext()) {\n loading = (\n \n );\n }\n\n if (state.isEmpty()) {\n const text = app.translator.trans('fof-polls.forum.polls_list.empty_text');\n return (\n
\n \n
\n );\n }\n\n return (\n
\n
    \n {state.getPages().map((pg) => {\n return pg.items.map((poll) => (\n
  • \n \n
  • \n ));\n })}\n
\n
{loading}
\n
\n );\n }\n}\n","import type Mithril from 'mithril';\nimport app from 'flarum/forum/app';\nimport Component, { ComponentAttrs } from 'flarum/common/Component';\nimport type { PollListParams } from '../../states/PollListState';\nimport SubtreeRetainer from 'flarum/common/utils/SubtreeRetainer';\nimport classList from 'flarum/common/utils/classList';\nimport Dropdown from 'flarum/common/components/Dropdown';\nimport Link from 'flarum/common/components/Link';\nimport highlight from 'flarum/common/helpers/highlight';\nimport slidable from 'flarum/forum/utils/slidable';\nimport icon from 'flarum/common/helpers/icon';\nimport abbreviateNumber from 'flarum/common/utils/abbreviateNumber';\nimport Poll from '../../models/Poll';\nimport PollControls from '../../utils/PollControls';\nimport ItemList from 'flarum/common/utils/ItemList';\nimport listItems from 'flarum/common/helpers/listItems';\nimport PollViewPage from '../PollViewPage';\n\nexport interface IPollListItemAttrs extends ComponentAttrs {\n poll: Poll;\n params: PollListParams;\n}\n\n/**\n * The `PollListItem` component shows a single poll in the\n * poll list.\n */\nexport default class PollListItem extends Component {\n /**\n * Ensures that the poll will not be redrawn\n * unless new data comes in.\n */\n subtree!: SubtreeRetainer;\n poll!: Poll;\n\n highlightRegExp?: RegExp;\n\n oninit(vnode: Mithril.Vnode) {\n super.oninit(vnode);\n\n this.poll = this.attrs.poll;\n\n this.subtree = new SubtreeRetainer(\n () => this.poll.freshness,\n () => {\n const time = app.session.user && app.session.user.markedAllAsReadAt();\n return time && time.getTime();\n },\n () => this.active()\n );\n }\n\n elementAttrs() {\n return {\n className: classList('PollListItem', {\n active: this.active(),\n 'PollListItem--hidden': this.poll.isHidden(),\n Slidable: 'ontouchstart' in window,\n }),\n };\n }\n\n view() {\n const controls = PollControls.controls(this.poll, this).toArray();\n const attrs = this.elementAttrs();\n\n return (\n
\n {this.controlsView(controls)}\n {this.contentView()}\n {this.slidableUnderneathView()}\n
\n );\n }\n\n controlsView(controls: Mithril.ChildArray): Mithril.Children {\n return (\n !!controls.length && (\n \n {controls}\n \n )\n );\n }\n\n slidableUnderneathView(): Mithril.Children {\n const isUnread = this.poll.isUnread();\n\n return (\n \n {icon('fas fa-check')}\n \n );\n }\n\n contentView(): Mithril.Children {\n // const isUnread = this.poll.isUnread();\n // const isRead = this.poll.isRead();\n\n return (\n //
\n
{this.mainView()}
\n );\n }\n\n mainView(): Mithril.Children {\n return (\n \n

{highlight(this.poll.question(), this.highlightRegExp)}

\n {this.poll.subtitle() &&

{this.poll.subtitle()}

}\n
    {listItems(this.infoItems().toArray())}
\n \n );\n }\n\n // infoView() {\n // return (\n //
\n // {this.poll.subtitle() &&

{this.poll.subtitle()}

}\n //
    {listItems(this.infoItems().toArray())}
\n //
\n // );\n // }\n\n oncreate(vnode: Mithril.VnodeDOM) {\n super.oncreate(vnode);\n\n // If we're on a touch device, set up the discussion row to be slidable.\n // This allows the user to drag the row to either side of the screen to\n // reveal controls.\n if ('ontouchstart' in window) {\n const slidableInstance = slidable(this.element);\n\n this.$('.PollListItem-controls').on('hidden.bs.dropdown', () => slidableInstance.reset());\n }\n }\n\n onbeforeupdate(vnode: Mithril.VnodeDOM) {\n super.onbeforeupdate(vnode);\n\n return this.subtree.needsRebuild();\n }\n\n /**\n * Determine whether or not the discussion is currently being viewed.\n */\n active() {\n return app.current.matches(PollViewPage, { poll: this.poll });\n }\n\n /**\n * Mark the poll as read.\n */\n markAsRead() {\n if (this.poll.isUnread()) {\n this.poll.save({ lastVotedNumber: this.poll.voteCount() });\n m.redraw();\n }\n }\n\n infoItems(): ItemList {\n const items = new ItemList();\n const active = !this.poll.hasEnded();\n const activeView = this.poll.endDate()\n ? [\n icon('fas fa-clock'),\n ' ',\n active\n ? app.translator.trans('fof-polls.forum.days_remaining', { time: dayjs(this.poll.endDate()).fromNow() })\n : app.translator.trans('fof-polls.forum.poll_ended'),\n ]\n : [icon('fas fa-infinity'), ' ', app.translator.trans('fof-polls.forum.poll_never_ends')];\n\n items.add('active', {activeView});\n\n const voteCount = this.poll.voteCount();\n if (voteCount !== undefined) {\n items.add(\n 'voteCount',\n \n {icon('fas fa-poll fa-fw')}\n {[\n ' ',\n app.translator.trans('fof-polls.forum.polls_count', {\n count: abbreviateNumber(voteCount),\n }),\n ]}\n ,\n 70\n );\n }\n\n return items;\n }\n}\n","import app from 'flarum/forum/app';\nimport type Mithril from 'mithril';\nimport Component, { ComponentAttrs } from 'flarum/common/Component';\nimport PollOptionModel from '../../models/PollOption';\nimport PollState from '../../states/PollState';\nimport Tooltip, { TooltipAttrs } from 'flarum/common/components/Tooltip';\nimport icon from 'flarum/common/helpers/icon';\nimport classList from 'flarum/common/utils/classList';\n\ninterface PollOptionAttrs extends ComponentAttrs {\n option: PollOptionModel;\n name: String;\n state: PollState;\n}\n\nexport default class PollOption extends Component {\n view(): Mithril.Children {\n const option = this.attrs.option;\n const state = this.attrs.state;\n const hasVoted = state.hasVoted();\n const totalVotes = state.overallVoteCount();\n const votes = option.voteCount();\n const voted = state.hasVotedFor(option);\n const percent = totalVotes > 0 ? Math.round((votes / totalVotes) * 100) : 0;\n\n // @ts-ignore\n const poll = state.poll;\n\n // isNaN(null) is false, so we have to check type directly now that API always returns the field\n const canSeeVoteCount = typeof votes === 'number';\n const isDisabled = state.loadingOptions || (hasVoted && !poll.canChangeVote());\n const width = canSeeVoteCount ? percent : (Number(voted) / (poll.myVotes()?.length || 1)) * 100;\n\n const bar = (\n
\n {state.showCheckMarks && (\n \n )}\n\n
\n {option.answer()}\n {voted && !state.showCheckMarks && icon('fas fa-check-circle', { className: 'PollAnswer-check' })}\n {canSeeVoteCount && {percent}%}\n
\n\n {option.imageUrl() ? {option.answer()} : null}\n
\n );\n\n return (\n
\n {canSeeVoteCount ? (\n \n {bar}\n \n ) : (\n bar\n )}\n
\n );\n }\n\n /**\n * Attempting to use the `tooltipVisible` attr on the Tooltip component set to 'false' when no vote count\n * caused the tooltip to break on click. This is a workaround to hide the tooltip when no vote count is available,\n * called on 'onremove' of the Tooltip component. It doesn't always work as intended either, but it does the job.\n */\n hideOptionTooltip(vnode: Mithril.Vnode) {\n vnode.attrs.tooltipVisible = false;\n\n // @ts-ignore\n vnode.state.updateVisibility();\n }\n}\n","import type Mithril from 'mithril';\nimport Component, { ComponentAttrs } from 'flarum/common/Component';\nimport PollOption from './PollOption';\nimport PollOptionModel from '../../models/PollOption';\nimport ItemList from 'flarum/common/utils/ItemList';\nimport PollState from '../../states/PollState';\n\ninterface PollOptionsAttrs extends ComponentAttrs {\n options: PollOptionModel[];\n name: String;\n state: PollState;\n}\n\nexport default class PollOptions extends Component {\n view(): Mithril.Children {\n return
{this.pollOptions().toArray()}
;\n }\n\n pollOptions(): ItemList {\n const items = new ItemList();\n\n this.attrs.options.forEach((option: PollOptionModel): void => {\n items.add('option' + option.id(), this.createOptionView(option));\n });\n\n return items;\n }\n\n createOptionView(option: PollOptionModel): Mithril.Children {\n return ;\n }\n}\n","import type Mithril from 'mithril';\nimport app from 'flarum/forum/app';\nimport Component, { ComponentAttrs } from 'flarum/common/Component';\nimport Button from 'flarum/common/components/Button';\nimport PollState from '../../states/PollState';\n\ninterface PollSubmitButtonAttrs extends ComponentAttrs {\n state: PollState;\n}\n\nexport default class PollSubmitButton extends Component {\n view(): Mithril.Children {\n const state = this.attrs.state;\n return (\n this.pollButtonSubmit(state, event)}\n disabled={!state.hasSelectedOptions()}\n >\n {app.translator.trans('fof-polls.forum.poll.submit_button')}\n \n );\n }\n\n /**\n * Event handler for submit button being clicked\n */\n\n pollButtonSubmit(state: PollState, event: Event): void {\n state.onsubmit();\n }\n}\n","import Component, { ComponentAttrs } from 'flarum/common/Component';\nimport type Mithril from 'mithril';\nimport app from 'flarum/forum/app';\nimport Button from 'flarum/common/components/Button';\nimport Switch from 'flarum/common/components/Switch';\nimport ItemList from 'flarum/common/utils/ItemList';\nimport Stream from 'flarum/common/utils/Stream';\nimport extractText from 'flarum/common/utils/extractText';\nimport FormError from './form/FormError';\nimport PollFormState from '../states/PollFormState';\nimport PollControls from '../utils/PollControls';\nimport PollModel from '../models/Poll';\nimport PollOption from '../models/PollOption';\nimport UploadPollImageButton from './UploadPollImageButton';\nimport UploadPollOptionImageButton from './UploadPollOptionImageButton';\n\ninterface PollFormAttrs extends ComponentAttrs {\n poll: PollModel;\n onsubmit: (data: object, state: PollFormState) => Promise;\n}\n\nexport default class PollForm extends Component {\n protected options: PollOption[] = [];\n protected optionAnswers: Stream[] = [];\n protected optionImage: Stream[] = [];\n protected question: Stream;\n protected subtitle: Stream;\n protected image: Stream;\n protected imageAlt: Stream;\n protected endDate: Stream;\n protected publicPoll: Stream;\n protected allowMultipleVotes: Stream;\n protected hideVotes: Stream;\n protected allowChangeVote: Stream;\n protected maxVotes: Stream;\n protected datepickerMinDate: string = '';\n\n oninit(vnode: Mithril.Vnode): void {\n super.oninit(vnode);\n this.state = new PollFormState(this.attrs.poll);\n\n // state handles poll initialization\n const poll = this.state.poll;\n\n this.options = (poll.tempOptions ?? poll.options()) as PollOption[];\n this.optionAnswers = this.options.map((o) => Stream(o.answer()));\n this.optionImage = this.options.map((o) => Stream(o.image()));\n\n this.question = Stream(poll.question());\n this.subtitle = Stream(poll.subtitle());\n this.image = Stream(poll.image());\n this.imageAlt = Stream(poll.imageAlt());\n this.endDate = Stream(this.formatDate(poll.endDate()));\n this.publicPoll = Stream(poll.publicPoll());\n this.allowMultipleVotes = Stream(poll.allowMultipleVotes());\n this.hideVotes = Stream(poll.hideVotes());\n this.allowChangeVote = Stream(poll.allowChangeVote());\n this.maxVotes = Stream(poll.maxVotes() || 0);\n\n // Set minimum date for datepicker to current date\n this.datepickerMinDate = this.formatDate() as string;\n\n // Replace minimum of 'today' for poll end date only if the poll is not already closed\n if (this.endDate() && dayjs(poll.endDate).isAfter(dayjs())) {\n // We know that endDate is set, so we can safely cast the result to string\n this.datepickerMinDate = this.formatDate(poll.endDate()) as string;\n }\n }\n\n view(): Mithril.Children {\n return (\n
\n
{this.fields().toArray()}
\n
\n );\n }\n\n fields(): ItemList {\n const items = new ItemList();\n\n items.add(\n 'question',\n
\n \n\n \n
,\n 100\n );\n\n items.add(\n 'subtitle',\n
\n \n\n \n
,\n 95\n );\n\n items.add(\n 'poll_image',\n
\n \n

{app.translator.trans('fof-polls.forum.modal.poll_image.help')}

\n \n \n
,\n 90\n );\n\n if (this.image()) {\n items.add(\n 'poll_image_alt',\n
\n \n\n \n\n

{app.translator.trans('fof-polls.forum.modal.poll_image.alt_help_text')}

\n
,\n 90\n );\n }\n\n items.add(\n 'answers',\n
\n \n\n {this.displayOptions()}\n
,\n 80\n );\n\n items.add(\n 'date',\n
\n \n\n
\n \n {Button.component({\n className: 'Button PollModal--button Button--icon',\n icon: 'fas fa-times',\n onclick: this.endDate.bind(this, null),\n })}\n
\n\n {this.endDate() && (\n

\n \n  \n {dayjs(this.endDate()).isBefore(dayjs())\n ? app.translator.trans('fof-polls.forum.poll_ended')\n : app.translator.trans('fof-polls.forum.days_remaining', { time: dayjs(this.endDate()).fromNow() })}\n

\n )}\n
,\n 40\n );\n\n items.add(\n 'public',\n
\n {Switch.component(\n {\n state: this.publicPoll() || false,\n onchange: this.publicPoll,\n },\n app.translator.trans('fof-polls.forum.modal.public_poll_label')\n )}\n
,\n 20\n );\n\n items.add(\n 'hide-votes',\n
\n \n {app.translator.trans('fof-polls.forum.modal.hide_votes_label')}\n \n
,\n 20\n );\n\n items.add(\n 'allow-change-vote',\n
\n \n {app.translator.trans('fof-polls.forum.modal.allow_change_vote_label')}\n \n
,\n 20\n );\n\n items.add(\n 'allow-multiple-votes',\n
\n {Switch.component(\n {\n state: this.allowMultipleVotes() || false,\n onchange: this.allowMultipleVotes,\n },\n app.translator.trans('fof-polls.forum.modal.allow_multiple_votes_label')\n )}\n
,\n 15\n );\n\n if (this.allowMultipleVotes()) {\n items.add(\n 'max-votes',\n
\n \n\n \n\n

{app.translator.trans('fof-polls.forum.modal.max_votes_help')}

\n
,\n 15\n );\n }\n\n items.add(\n 'submit',\n
\n \n {this.state.poll.exists && (\n \n {app.translator.trans('fof-polls.forum.modal.delete')}\n \n )}\n
,\n -10\n );\n\n return items;\n }\n\n displayOptions() {\n return this.options.map((option, i) => (\n
\n
{this.createOptionFields(option, i).toArray()}
\n {i >= 2\n ? Button.component({\n type: 'button',\n className: 'Button PollModal--button Button--icon',\n icon: 'fas fa-minus',\n onclick: i >= 2 ? this.removeOption.bind(this, i) : '',\n })\n : ''}\n
\n ));\n }\n\n createOptionFields(option: PollOption, i: number): ItemList {\n const items = new ItemList();\n const number = i + 1;\n\n items.add(\n 'answer',\n \n );\n\n if (app.forum.attribute('allowPollOptionImage')) {\n items.add(\n 'image',\n
\n \n this.optionImage[i](fileName)}\n />\n \n
\n );\n }\n\n return items;\n }\n\n addOption() {\n const max = Math.max(app.forum.attribute('pollMaxOptions'), 2);\n\n if (this.options.length < max) {\n this.options.push(app.store.createRecord('poll_options'));\n this.optionAnswers.push(Stream(''));\n this.optionImage.push(Stream(''));\n } else {\n alert(extractText(app.translator.trans('fof-polls.forum.modal.max', { max })));\n }\n }\n\n removeOption(i: number): void {\n this.options.splice(i, 1);\n this.optionAnswers.splice(i, 1);\n this.optionImage.splice(i, 1);\n this.optionImageAlt.splice(i, 1);\n }\n\n data(): object {\n if (this.question() === '') {\n throw new FormError(app.translator.trans('fof-polls.forum.modal.include_question'));\n }\n\n if (this.options.length < 2) {\n throw new FormError(app.translator.trans('fof-polls.forum.modal.min'));\n }\n\n const pollExists = this.state.poll.exists;\n const options = this.options.map((option, i) => {\n option.pushAttributes({\n answer: this.optionAnswers[i](),\n image: this.optionImage[i](),\n });\n\n return pollExists ? option.data : option.data.attributes;\n });\n\n return {\n question: this.question(),\n subtitle: this.subtitle(),\n pollImage: this.image(),\n imageAlt: this.imageAlt(),\n endDate: this.dateToTimestamp(this.endDate()) ?? false,\n publicPoll: this.publicPoll(),\n hideVotes: this.hideVotes(),\n allowChangeVote: this.allowChangeVote(),\n allowMultipleVotes: this.allowMultipleVotes(),\n maxVotes: this.maxVotes(),\n options,\n };\n }\n\n async onsubmit(event: Event) {\n event.preventDefault();\n\n try {\n await this.attrs.onsubmit(this.data(), this.state);\n } catch (error) {\n if (error instanceof FormError) {\n app.alerts.show({ type: 'error' }, error.message);\n } else {\n console.error(error);\n // Show error alert\n app.alerts.show({ type: 'error' }, app.translator.trans('fof-polls.forum.modal.error'));\n }\n }\n }\n\n async delete(): Promise {\n this.state.loading = true;\n try {\n await PollControls.deleteAction(this.state.poll);\n this.state.deleting = true;\n } finally {\n this.state.loading = false;\n m.redraw();\n }\n }\n\n formatDate(date: Date | string | false | undefined | null = undefined, def: Date | false = false): string | false {\n const dayjsDate = dayjs(date);\n\n if (date === false || !dayjsDate.isValid()) return def !== false ? this.formatDate(def) : false;\n\n return dayjsDate.format('YYYY-MM-DDTHH:mm');\n }\n\n dateToTimestamp(date: Date | false): string | null {\n const dayjsDate = dayjs(date);\n\n if (!date || !dayjsDate.isValid()) return null;\n\n return dayjsDate.format();\n }\n\n pollImageUploadSuccess(fileName: string | null | undefined): void {\n this.image(fileName);\n }\n}\n","import Component, { ComponentAttrs } from 'flarum/common/Component';\nimport PollListState from '../states/PollListState';\nimport type Mithril from 'mithril';\nimport ItemList from 'flarum/common/utils/ItemList';\nimport PollShowcaseItem from './PollShowcaseItem';\nimport Placeholder from 'flarum/common/components/Placeholder';\nimport app from 'flarum/forum/app';\n\nexport interface PollListAttrs extends ComponentAttrs {\n state: PollListState;\n}\n\nexport default class PollShowcase extends Component {\n oninit(vnode: Mithril.Vnode) {\n super.oninit(vnode);\n\n this.attrs.state.refresh();\n }\n\n view(): Mithril.Children {\n return (\n
\n
\n

{app.translator.trans('fof-polls.forum.showcase.active-polls')}

\n {this.showcaseItems().toArray()}\n {this.showcaseItems().toArray().length === 0 && }\n
\n
\n

{app.translator.trans('fof-polls.forum.showcase.ended-polls')}

\n {this.endedItems().toArray()}\n {this.endedItems().toArray().length === 0 && }\n
\n
\n );\n }\n\n showcaseItems(): ItemList {\n const items = new ItemList();\n\n this.attrs.state.getPages().map((page) => {\n page.items.map((poll) => {\n if (!poll.hasEnded()) {\n items.add('poll-active-' + poll.id(), );\n }\n });\n });\n\n return items;\n }\n\n endedItems(): ItemList {\n const items = new ItemList();\n\n this.attrs.state.getPages().map((page) => {\n page.items.map((poll) => {\n if (poll.hasEnded()) {\n items.add('poll-ended-' + poll.id(), );\n }\n });\n });\n\n return items;\n }\n}\n","import Component, { ComponentAttrs } from 'flarum/common/Component';\nimport Poll from '../models/Poll';\nimport type Mithril from 'mithril';\nimport PollView from './PollView';\n\nexport interface PollShowcaseItemAttrs extends ComponentAttrs {\n poll: Poll;\n}\n\nexport default class PollShowcaseItem extends Component {\n poll!: Poll;\n\n oninit(vnode: Mithril.Vnode) {\n super.oninit(vnode);\n\n this.poll = this.attrs.poll;\n }\n\n view() {\n return (\n
\n \n
\n );\n }\n}\n","import Mithril from 'mithril';\nimport Component, { ComponentAttrs } from 'flarum/common/Component';\nimport app from 'flarum/forum/app';\nimport PollOptions from './Poll/PollOptions';\nimport PollImage from './Poll/PollImage';\nimport PollModel from '../models/Poll';\nimport PollState from '../states/PollState';\nimport Button from 'flarum/common/components/Button';\nimport ItemList from 'flarum/common/utils/ItemList';\nimport PollControls from '../utils/PollControls';\nimport Dropdown from 'flarum/common/components/Dropdown';\nimport PollSubmitButton from './Poll/PollSubmitButton';\nimport { slug } from 'flarum/common/utils/string';\nimport classList from 'flarum/common/utils/classList';\n\ninterface PollAttrs extends ComponentAttrs {\n poll: PollModel;\n}\n\nexport default class PollView extends Component {\n state!: PollState;\n\n oninit(vnode: Mithril.Vnode) {\n super.oninit(vnode);\n this.state = new PollState(this.attrs.poll);\n }\n\n oncreate(vnode: Mithril.Vnode) {\n super.oncreate(vnode);\n\n this.preventClose = this.preventClose.bind(this);\n window.addEventListener('beforeunload', this.preventClose);\n }\n\n onremove(vnode: Mithril.Vnode) {\n super.onremove(vnode);\n\n window.removeEventListener('beforeunload', this.preventClose);\n }\n\n view(): Mithril.Children {\n const poll = this.attrs.poll;\n const state = this.state;\n const controls = PollControls.controls(poll, this);\n\n controls.add(\n 'view',\n \n );\n\n return (\n
\n {this.controlsView(controls.toArray())}\n
{this.createMainView().toArray()}
\n
\n );\n }\n\n createMainView(): ItemList {\n const items = new ItemList();\n const poll = this.attrs.poll;\n\n items.add('header',
{this.createPollHeader().toArray()}
);\n items.add('content',
{this.createPollContent().toArray()}
);\n items.add('footer',
{this.createPollFooter().toArray()}
);\n\n return items;\n }\n\n createPollHeader(): ItemList {\n const items = new ItemList();\n const poll = this.attrs.poll;\n\n items.add('title',

{poll.question()}

);\n if (poll.subtitle()) items.add('subtitle',

{poll.subtitle()}

);\n\n return items;\n }\n\n createPollContent(): ItemList {\n const items = new ItemList();\n const poll = this.attrs.poll;\n\n if (poll.imageUrl()) {\n items.add('image', );\n }\n\n items.add('form',
{this.createFormItems().toArray()}
);\n\n return items;\n }\n\n createPollFooter(): ItemList {\n const items = new ItemList();\n const state = this.state;\n\n const infoItems = this.infoItems(state.getMaxVotes());\n\n items.add(\n 'sticky',\n
\n {!infoItems.isEmpty() &&
{infoItems.toArray()}
}\n {state.showButton() && }\n
\n );\n\n return items;\n }\n\n createFormItems(): ItemList {\n const items = new ItemList();\n const poll = this.attrs.poll;\n const state = this.state;\n const questionSlug = slug(poll.question());\n\n items.add(\n 'elements',\n
\n {poll.question()}\n \n
\n );\n\n return items;\n }\n\n controlsView(controls: Mithril.ChildArray): Mithril.Children {\n return (\n !!controls.length && (\n \n {controls}\n \n )\n );\n }\n\n infoItems(maxVotes: number) {\n const items = new ItemList();\n const poll = this.attrs.poll;\n\n if (app.session.user && !poll.canVote() && !poll.hasEnded()) {\n items.add(\n 'no-permission',\n \n \n {app.translator.trans('fof-polls.forum.no_permission')}\n \n );\n }\n\n if (poll.endDate()) {\n items.add(\n 'end-date',\n \n \n {poll.hasEnded()\n ? app.translator.trans('fof-polls.forum.poll_ended')\n : app.translator.trans('fof-polls.forum.days_remaining', { time: dayjs(poll.endDate()).fromNow() })}\n \n );\n }\n\n if (poll.canVote()) {\n items.add(\n 'max-votes',\n \n \n {app.translator.trans('fof-polls.forum.max_votes_allowed', { max: maxVotes })}\n \n );\n\n if (!poll.canChangeVote()) {\n items.add(\n 'cannot-change-vote',\n \n \n {app.translator.trans('fof-polls.forum.poll.cannot_change_vote')}\n \n );\n }\n }\n\n return items;\n }\n\n /**\n * Alert before navigating away using browser's 'beforeunload' event\n */\n preventClose = (e: Event): boolean | void => {\n if (this.state.hasSelectedOptions()) {\n e.preventDefault();\n return true;\n }\n };\n}\n","import type Mithril from 'mithril';\nimport app from 'flarum/forum/app';\nimport PollModel from '../models/Poll';\nimport PollView from './PollView';\nimport { AbstractPollPage } from './AbstractPollPage';\nimport ItemList from 'flarum/common/utils/ItemList';\n\nexport default class PollViewPage extends AbstractPollPage {\n oninit(vnode: Mithril.Vnode) {\n super.oninit(vnode);\n\n if (!app.forum.attribute('globalPollsEnabled')) {\n m.route.set('/');\n return;\n }\n\n const editId = m.route.param('id');\n this.poll = app.store.getById('poll', editId);\n\n if (!this.poll) {\n this.loading = true;\n\n app.store.find('fof/polls', editId).then((item) => {\n this.poll = item;\n this.loading = false;\n app.setTitle(this.poll.question());\n m.redraw();\n });\n }\n }\n\n contentItems(): ItemList {\n const items = super.contentItems();\n\n if (!this.loading) {\n items.add('poll', );\n }\n\n return items;\n }\n}\n","import type Mithril from 'mithril';\nimport app from 'flarum/forum/app';\nimport listItems from 'flarum/common/helpers/listItems';\nimport ItemList from 'flarum/common/utils/ItemList';\nimport Page, { IPageAttrs } from 'flarum/common/components/Page';\nimport IndexPage from 'flarum/forum/components/IndexPage';\nimport PollList from './Poll/PollList';\nimport LogInModal from 'flarum/forum/components/LogInModal';\nimport extractText from 'flarum/common/utils/extractText';\nimport PollListState from '../states/PollListState';\nimport Button from 'flarum/common/components/Button';\nimport SelectDropdown from 'flarum/common/components/SelectDropdown';\nimport LoadingIndicator from 'flarum/common/components/LoadingIndicator';\nimport PollModel from '../models/Poll';\nimport PollView from './PollView';\nimport { AbstractPollPage } from './AbstractPollPage';\n\nexport default class PollsPage extends AbstractPollPage {\n oninit(vnode: Mithril.Vnode) {\n super.oninit(vnode);\n\n if (!app.forum.attribute('globalPollsEnabled')) {\n m.route.set('/');\n return;\n }\n\n this.state = new PollListState({\n sort: m.route.param('sort'),\n filter: m.route.param('filter'),\n });\n\n this.state.refresh();\n\n app.setTitle(extractText(app.translator.trans('fof-polls.forum.page.nav')));\n }\n\n view(): Mithril.Children {\n if (this.loading) {\n return ;\n }\n\n if (this.poll) {\n return (\n
\n
\n \n
\n
\n );\n }\n\n return (\n
\n {super.hero()}\n
\n
\n \n
\n
\n
    {listItems(this.viewItems().toArray())}
\n
    {listItems(this.actionItems().toArray())}
\n
\n \n
\n
\n
\n
\n );\n }\n\n sidebarItems(): ItemList {\n const items = new ItemList();\n const canStartPoll = app.forum.attribute('canStartGlobalPolls');\n\n items.add(\n 'newGlobalPoll',\n {\n this.newPollAction();\n }}\n disabled={!canStartPoll}\n >\n {app.translator.trans(`fof-polls.forum.poll.${canStartPoll ? 'start_poll_button' : 'cannot_start_poll_button'}`)}\n \n );\n\n items.add(\n 'nav',\n \n {this.navItems().toArray()}\n \n );\n\n return items;\n }\n\n actionItems(): ItemList {\n const items = new ItemList();\n\n items.add(\n 'refresh',\n Button.component({\n title: app.translator.trans('fof-polls.forum.page.refresh_tooltip'),\n icon: 'fas fa-sync',\n className: 'Button Button--icon',\n onclick: () => {\n this.state.refresh();\n },\n })\n );\n\n return items;\n }\n\n viewItems() {\n return IndexPage.prototype.viewItems();\n }\n\n navItems() {\n return IndexPage.prototype.navItems();\n }\n\n /**\n * Change to create new poll page\n */\n newPollAction(): void {\n if (!app.session.user) {\n app.modal.show(LogInModal);\n return;\n }\n\n m.route.set(app.route('fof.polls.compose'));\n }\n}\n","import app from 'flarum/forum/app';\nimport { IPageAttrs } from 'flarum/common/components/Page';\nimport ItemList from 'flarum/common/utils/ItemList';\nimport Mithril from 'mithril';\nimport PollListState from '../states/PollListState';\nimport extractText from 'flarum/common/utils/extractText';\nimport Button from 'flarum/common/components/Button';\nimport LogInModal from 'flarum/forum/components/LogInModal';\nimport { AbstractPollPage } from './AbstractPollPage';\nimport PollShowcase from './PollShowcase';\n\nexport default class PollsShowcasePage extends AbstractPollPage {\n oninit(vnode: Mithril.Vnode) {\n super.oninit(vnode);\n\n if (!app.forum.attribute('globalPollsEnabled')) {\n m.route.set('/');\n return;\n }\n\n this.state = new PollListState({\n sort: m.route.param('sort'),\n filter: m.route.param('filter'),\n include: ['options', 'votes', 'myVotes', 'myVotes.option'],\n });\n\n this.state.refresh();\n\n app.setTitle(extractText(app.translator.trans('fof-polls.forum.page.nav')));\n }\n\n contentItems(): ItemList {\n const items = super.contentItems();\n\n if (!this.loading) {\n items.add('poll-showcase', );\n }\n\n return items;\n }\n\n sidebarItems(): ItemList {\n const items = super.sidebarItems();\n const canStartPoll = app.forum.attribute('canStartGlobalPolls');\n\n if (canStartPoll) {\n items.remove('newDiscussion');\n items.add(\n 'newGlobalPoll',\n {\n this.newPollAction();\n }}\n disabled={!canStartPoll}\n >\n {app.translator.trans(`fof-polls.forum.poll.${canStartPoll ? 'start_poll_button' : 'cannot_start_poll_button'}`)}\n ,\n 100\n );\n }\n\n return items;\n }\n\n newPollAction(): void {\n if (!app.session.user) {\n app.modal.show(LogInModal);\n return;\n }\n\n m.route.set(app.route('fof.polls.compose'));\n }\n}\n","import app from 'flarum/forum/app';\nimport Component, { ComponentAttrs } from 'flarum/common/Component';\nimport Button from 'flarum/common/components/Button';\nimport LogInModal from 'flarum/forum/components/LogInModal';\nimport ListVotersModal from './ListVotersModal';\nimport classList from 'flarum/common/utils/classList';\nimport ItemList from 'flarum/common/utils/ItemList';\nimport Tooltip from 'flarum/common/components/Tooltip';\nimport icon from 'flarum/common/helpers/icon';\nimport EditPollModal from './EditPollModal';\nimport Poll from '../models/Poll';\nimport type Mithril from 'mithril';\nimport PollOption from '../models/PollOption';\nimport Post from 'flarum/common/models/Post';\nimport extractText from 'flarum/common/utils/extractText';\n\nexport interface PostPollAttrs extends ComponentAttrs {\n poll: Poll;\n post?: Post;\n}\n\nexport default class PostPoll extends Component {\n loadingOptions: boolean = false;\n useSubmitUI!: boolean;\n pendingSubmit: boolean = false;\n pendingOptions: any;\n\n oninit(vnode: Mithril.Vnode) {\n super.oninit(vnode);\n\n this.useSubmitUI = !this.attrs.poll?.canChangeVote() && this.attrs.poll?.allowMultipleVotes();\n this.pendingOptions = null;\n }\n\n oncreate(vnode: Mithril.Vnode) {\n super.oncreate(vnode);\n\n this.preventClose = this.preventClose.bind(this);\n window.addEventListener('beforeunload', this.preventClose);\n }\n\n onremove(vnode: Mithril.Vnode) {\n super.onremove(vnode);\n\n window.removeEventListener('beforeunload', this.preventClose);\n }\n\n view() {\n const poll = this.attrs.poll;\n const options = poll.options() || [];\n let maxVotes = poll.allowMultipleVotes() ? poll.maxVotes() : 1;\n\n if (maxVotes === 0) maxVotes = options.length;\n\n const infoItems = this.infoItems(maxVotes);\n\n return (\n
\n
\n
\n

{poll.question()}

\n {poll.subtitle() &&

{poll.subtitle()}

}\n
\n\n
\n {poll.canSeeVoters() && (\n \n
\n
\n\n
\n
{options.map(this.viewOption.bind(this))}
\n\n
\n {!infoItems.isEmpty() &&
{infoItems.toArray()}
}\n\n {this.useSubmitUI && this.pendingSubmit && (\n \n )}\n
\n
\n
\n );\n }\n\n infoItems(maxVotes: number) {\n const items = new ItemList();\n const poll = this.attrs.poll;\n const hasVoted = poll.myVotes()?.length > 0;\n\n if (app.session.user && !poll.canVote() && !poll.hasEnded()) {\n items.add(\n 'no-permission',\n \n \n {app.translator.trans('fof-polls.forum.no_permission')}\n \n );\n }\n\n if (poll.endDate()) {\n items.add(\n 'end-date',\n \n \n {poll.hasEnded()\n ? app.translator.trans('fof-polls.forum.poll_ended')\n : app.translator.trans('fof-polls.forum.days_remaining', { time: dayjs(poll.endDate()).fromNow() })}\n \n );\n }\n\n if (poll.canVote()) {\n items.add(\n 'max-votes',\n \n \n {app.translator.trans('fof-polls.forum.max_votes_allowed', { max: maxVotes })}\n \n );\n\n if (!poll.canChangeVote()) {\n items.add(\n 'cannot-change-vote',\n \n \n {app.translator.trans('fof-polls.forum.poll.cannot_change_vote')}\n \n );\n }\n }\n\n return items;\n }\n\n viewOption(opt: PollOption) {\n const poll = this.attrs.poll;\n const hasVoted = poll.myVotes()?.length > 0;\n const totalVotes = poll.voteCount();\n\n const voted = this.pendingOptions ? this.pendingOptions.has(opt.id()) : poll.myVotes()?.some?.((vote) => vote.option() === opt);\n const votes = opt.voteCount();\n const percent = totalVotes > 0 ? Math.round((votes / totalVotes) * 100) : 0;\n\n // isNaN(null) is false, so we have to check type directly now that API always returns the field\n const canSeeVoteCount = typeof votes === 'number';\n const isDisabled = this.loadingOptions || (hasVoted && !poll.canChangeVote());\n const width = canSeeVoteCount ? percent : (Number(voted) / (poll.myVotes()?.length || 1)) * 100;\n\n const showCheckmark = !app.session.user || (!poll.hasEnded() && poll.canVote() && (!hasVoted || poll.canChangeVote()));\n\n const bar = (\n
\n {showCheckmark && (\n \n )}\n\n
\n {opt.answer()}\n {voted && !showCheckmark && icon('fas fa-check-circle', { className: 'PollAnswer-check' })}\n {canSeeVoteCount && {percent}%}\n
\n\n {opt.imageUrl() ? {opt.answer()} : null}\n
\n );\n\n return (\n \n {canSeeVoteCount ? (\n \n {bar}\n \n ) : (\n bar\n )}\n
\n );\n }\n\n changeVote(option: PollOption, evt: Event) {\n if (!app.session.user) {\n app.modal.show(LogInModal);\n evt.target.checked = false;\n return;\n }\n\n const optionIds = this.pendingOptions || new Set(this.attrs.poll.myVotes().map?.((v) => v.option().id()));\n const isUnvoting = optionIds.delete(option.id());\n const allowsMultiple = this.attrs.poll.allowMultipleVotes();\n\n if (!allowsMultiple) {\n optionIds.clear();\n }\n\n if (!isUnvoting) {\n optionIds.add(option.id());\n }\n\n if (this.useSubmitUI) {\n this.pendingOptions = optionIds.size ? optionIds : null;\n this.pendingSubmit = !!this.pendingOptions;\n return;\n }\n\n return this.submit(optionIds, null, () => (evt.target.checked = isUnvoting));\n }\n\n onsubmit() {\n return this.submit(this.pendingOptions, () => {\n this.pendingOptions = null;\n this.pendingSubmit = false;\n });\n }\n\n submit(optionIds, cb, onerror) {\n this.loadingOptions = true;\n m.redraw();\n\n return app\n .request({\n method: 'PATCH',\n url: `${app.forum.attribute('apiUrl')}/fof/polls/${this.attrs.poll.id()}/votes`,\n body: {\n data: {\n optionIds: Array.from(optionIds),\n },\n },\n })\n .then((res) => {\n app.store.pushPayload(res);\n cb?.();\n })\n .catch((err) => {\n onerror?.(err);\n })\n .finally(() => {\n this.loadingOptions = false;\n\n m.redraw();\n });\n }\n\n showVoters() {\n // Load all the votes only when opening the votes list\n app.modal.show(ListVotersModal, {\n poll: this.attrs.poll,\n post: this.attrs.post,\n });\n }\n\n deletePoll() {\n if (confirm(extractText(app.translator.trans('fof-polls.forum.moderation.delete_confirm')))) {\n this.attrs.poll.delete().then(() => {\n m.redraw.sync();\n });\n }\n }\n\n /**\n * Attempting to use the `tooltipVisible` attr on the Tooltip component set to 'false' when no vote count\n * caused the tooltip to break on click. This is a workaround to hide the tooltip when no vote count is available,\n * called on 'onremove' of the Tooltip component. It doesn't always work as intended either, but it does the job.\n */\n hideOptionTooltip(vnode: Mithril.Vnode) {\n vnode.attrs.tooltipVisible = false;\n vnode.state.updateVisibility();\n }\n\n /**\n * Alert before navigating away using browser's 'beforeunload' event\n */\n preventClose(e) {\n if (this.pendingOptions) {\n e.preventDefault();\n return true;\n }\n }\n}\n","import app from 'flarum/forum/app';\nimport Button, { IButtonAttrs } from 'flarum/common/components/Button';\nimport classList from 'flarum/common/utils/classList';\nimport type Mithril from 'mithril';\nimport Poll from '../models/Poll';\n\nexport interface UploadPollImageButtonAttrs extends IButtonAttrs {\n className?: string;\n loading?: boolean;\n name: string;\n onclick: () => void;\n poll?: Poll | null;\n onUpload: (fileName: string | null | undefined) => void;\n}\n\nexport interface PollUploadObject {\n fileUrl: string;\n fileName: string;\n}\n\nexport default class UploadPollImageButton extends Button {\n loading: boolean = false;\n uploadedImageUrl: string | undefined = undefined;\n fileName: string | undefined = undefined;\n\n view(vnode: Mithril.Vnode) {\n this.attrs.loading = this.loading;\n this.attrs.className = classList(this.attrs.className, 'Button');\n\n if (this.attrs.poll?.imageUrl() || this.uploadedImageUrl) {\n const imageUrl = this.uploadedImageUrl || this.attrs.poll?.imageUrl();\n this.attrs.onclick = this.remove.bind(this);\n\n return (\n
\n

\n \"\"\n

\n

{super.view({ ...vnode, children: app.translator.trans('fof-polls.forum.upload_image.remove_button') })}

\n
\n );\n } else {\n this.attrs.onclick = this.upload.bind(this);\n }\n\n return super.view({ ...vnode, children: app.translator.trans('fof-polls.forum.upload_image.upload_button') });\n }\n\n /**\n * Prompt the user to upload an image.\n */\n upload() {\n if (this.loading) return;\n\n const $input = $('');\n\n $input\n .appendTo('body')\n .hide()\n .trigger('click')\n .on('change', (e) => {\n const body = new FormData();\n body.append('image', $(e.target)[0].files[0]);\n\n this.loading = true;\n m.redraw();\n\n app\n .request({\n method: 'POST',\n url: this.resourceUrl(),\n serialize: (raw) => raw,\n body,\n })\n .then(this.success.bind(this), this.failure.bind(this));\n });\n }\n\n /**\n * Remove the image.\n */\n remove() {\n this.loading = true;\n m.redraw();\n\n app\n .request({\n method: 'DELETE',\n url: this.resourceUrl(),\n })\n .then(this.success.bind(this), this.failure.bind(this));\n }\n\n resourceUrl() {\n let url = app.forum.attribute('apiUrl') + '/fof/polls/' + this.attrs.name;\n const poll = this.attrs.poll;\n\n if (poll?.exists) url += '/' + poll?.id();\n\n return url;\n }\n\n /**\n * After a successful upload/removal, redraw the page.\n *\n * @param {PollUploadObject} response\n * @protected\n */\n success(response: PollUploadObject | null) {\n this.loading = false;\n this.uploadedImageUrl = response?.fileUrl;\n this.fileName = response?.fileName;\n\n this.attrs.onUpload?.(response?.fileName);\n m.redraw();\n }\n\n /**\n * If upload/removal fails, stop loading.\n *\n * @param {object} response\n * @protected\n */\n failure(response: object) {\n this.loading = false;\n m.redraw();\n }\n}\n","import app from 'flarum/forum/app';\nimport type Mithril from 'mithril';\nimport UploadPollImageButton, { UploadPollImageButtonAttrs } from './UploadPollImageButton';\nimport PollOption from '../models/PollOption';\n\nexport interface UploadPollOptionImageButtonAttrs extends UploadPollImageButtonAttrs {\n option: PollOption;\n}\n\nexport default class UploadPollOptionImageButton extends UploadPollImageButton {\n view(vnode: Mithril.Vnode) {\n const poll = this.attrs.poll;\n if(poll?.exists) {\n\n return super.view(vnode);\n }\n\n return

{app.translator.trans('fof-polls.forum.modal.option_image.requires_saved_poll')}

\n }\n\n resourceUrl() {\n let url = app.forum.attribute('apiUrl') + '/fof/polls/pollOptionImage';\n const poll = this.attrs.poll;\n const option = this.attrs.option;\n\n if (poll?.exists) url += '/' + poll?.id();\n if (option?.exists) url += '/' + option?.id();\n\n return url;\n }\n}\n","import { NestedStringArray } from '@askvortsov/rich-icu-message-formatter';\n\nexport default class FormError extends Error {\n constructor(props: NestedStringArray | string) {\n super(props + '');\n }\n}\n","import CreatePollModal from './CreatePollModal';\nimport PostPoll from './PostPoll';\nimport EditPollModal from './EditPollModal';\nimport ListVotersModal from './ListVotersModal';\nimport PollForm from './PollForm';\nimport ComposePollHero from './ComposePollHero';\nimport ComposePollPage from './ComposePollPage';\nimport PollsPage from './PollsPage';\nimport PollView from './PollView';\nimport PollViewPage from './PollViewPage';\nimport PollSubmitButton from './Poll/PollSubmitButton';\nimport PollOptions from './Poll/PollOptions';\nimport PollsShowcasePage from './PollsShowcasePage';\nimport PollShowcase from './PollShowcase';\nimport PollShowcaseItem from './PollShowcaseItem';\nimport { AbstractPollPage } from './AbstractPollPage';\n\nexport const components = {\n CreatePollModal,\n PostPoll,\n EditPollModal,\n ListVotersModal,\n PollForm,\n ComposePollHero,\n ComposePollPage,\n PollsPage,\n PollView,\n PollViewPage,\n PollSubmitButton,\n PollOptions,\n PollsShowcasePage,\n PollShowcase,\n PollShowcaseItem,\n AbstractPollPage,\n};\n","import Extend from 'flarum/common/extenders';\nimport Post from 'flarum/common/models/Post';\nimport Forum from 'flarum/common/models/Forum';\nimport Discussion from 'flarum/common/models/Discussion';\nimport Poll from './models/Poll';\nimport PollOption from './models/PollOption';\nimport PollVote from './models/PollVote';\nimport PollsPage from './components/PollsPage';\nimport ComposePollPage from './components/ComposePollPage';\nimport PollViewPage from './components/PollViewPage';\nimport PollsShowcasePage from './components/PollsShowcasePage';\n\nexport default [\n new Extend.Routes() //\n .add('fof.polls.showcase', '/polls', PollsShowcasePage)\n .add('fof.polls.list', '/polls/all', PollsPage)\n .add('fof.polls.view', '/polls/view/:id', PollViewPage)\n .add('fof.polls.compose', '/polls/composer', ComposePollPage),\n\n new Extend.Store() //\n .add('polls', Poll)\n .add('poll_options', PollOption)\n .add('poll_votes', PollVote),\n\n new Extend.Model(Post) //\n .hasMany('polls')\n .attribute('canStartPoll'),\n\n new Extend.Model(Forum) //\n .attribute('canStartPolls'),\n\n new Extend.Model(Discussion) //\n .attribute('hasPoll')\n .attribute('canStartPoll'),\n];\n","import app from 'flarum/forum/app';\n\nimport addDiscussionBadge from './addDiscussionBadge';\nimport addComposerItems from './addComposerItems';\nimport addPollsToPost from './addPollsToPost';\nimport addPostControls from './addPostControls';\nimport addNavItem from './addNavItem';\n\nexport * from './components';\nexport * from './models';\nexport * from './states';\n\napp.initializers.add('fof/polls', () => {\n addDiscussionBadge();\n addComposerItems();\n addPollsToPost();\n addPostControls();\n addNavItem();\n});\n\nexport { default as extend } from './extend';\n","import Model from 'flarum/common/Model';\nimport PollOption from './PollOption';\nimport PollVote from './PollVote';\nimport computed from 'flarum/common/utils/computed';\n\nexport default class Poll extends Model {\n public tempOptions: PollOption[] | undefined;\n\n question() {\n return Model.attribute('question').call(this);\n }\n\n subtitle() {\n return Model.attribute('subtitle').call(this);\n }\n\n image() {\n return Model.attribute('image').call(this);\n }\n\n imageUrl() {\n return Model.attribute('imageUrl').call(this);\n }\n\n imageAlt() {\n return Model.attribute('imageAlt').call(this);\n }\n\n hasEnded() {\n return Model.attribute('hasEnded').call(this);\n }\n\n endDate() {\n return Model.attribute('endDate', Model.transformDate).call(this);\n }\n\n publicPoll() {\n return Model.attribute('publicPoll').call(this);\n }\n\n hideVotes() {\n return Model.attribute('hideVotes').call(this);\n }\n\n allowChangeVote() {\n return Model.attribute('allowChangeVote').call(this);\n }\n\n allowMultipleVotes() {\n return Model.attribute('allowMultipleVotes').call(this);\n }\n\n maxVotes() {\n return Model.attribute('maxVotes').call(this);\n }\n\n voteCount() {\n return Model.attribute('voteCount').call(this);\n }\n\n canVote() {\n return Model.attribute('canVote').call(this);\n }\n\n canEdit() {\n return Model.attribute('canEdit').call(this);\n }\n\n canDelete() {\n return Model.attribute('canDelete').call(this);\n }\n\n canSeeVoters() {\n return Model.attribute('canSeeVoters').call(this);\n }\n\n canChangeVote() {\n return Model.attribute('canChangeVote').call(this);\n }\n\n options() {\n const options = Model.hasMany('options').call(this);\n return options ? (options as PollOption[]) : [];\n }\n\n votes() {\n return Model.hasMany('votes').call(this);\n }\n\n myVotes(): PollVote[] {\n const myVotes = Model.hasMany('myVotes').call(this);\n return myVotes ? (myVotes as PollVote[]) : [];\n }\n\n isGlobal() {\n return Model.attribute('isGlobal').call(this);\n }\n\n isHidden() {\n return computed('hiddenAt', (hiddenAt) => !!hiddenAt).call(this);\n }\n\n // TODO: These two don't make sense as of now\n isUnread() {\n return false;\n }\n\n apiEndpoint() {\n /** @ts-ignore */\n return `/fof/polls${this.exists ? `/${this.data.id}` : ''}`;\n }\n}\n","import Model from 'flarum/common/Model';\nimport Poll from './Poll';\nimport PollVote from './PollVote';\n\nexport default class PollOption extends Model {\n answer() {\n return Model.attribute('answer').call(this);\n }\n\n image() {\n return Model.attribute('image').call(this);\n }\n\n imageUrl() {\n return Model.attribute('imageUrl').call(this);\n }\n\n voteCount() {\n return Model.attribute('voteCount').call(this);\n }\n\n poll() {\n return Model.hasOne('polls').call(this);\n }\n\n votes() {\n return Model.hasMany('votes').call(this);\n }\n\n apiEndpoint() {\n /** @ts-ignore */\n return `/fof/polls/answers${this.exists ? `/${this.data.id}` : ''}`;\n }\n}\n","import Model from 'flarum/common/Model';\nimport Poll from './Poll';\nimport PollOption from './PollOption';\nimport User from 'flarum/common/models/User';\n\nexport default class PollVote extends Model {\n poll() {\n return Model.hasOne('poll').call(this);\n }\n\n option() {\n const result = Model.hasOne('option').call(this);\n return result === false ? null : result;\n }\n\n user() {\n return Model.hasOne('user').call(this);\n }\n\n pollId() {\n return Model.attribute('pollId').call(this);\n }\n\n optionId() {\n return Model.attribute('optionId').call(this);\n }\n\n apiEndpoint() {\n return `/fof/polls/${this.pollId()}/vote`;\n }\n}\n","import Poll from './Poll';\nimport PollOption from './PollOption';\nimport PollVote from './PollVote';\n\nexport const models = {\n Poll,\n PollOption,\n PollVote,\n};\n","import app from 'flarum/forum/app';\nimport Poll from '../models/Poll';\nimport PollOption from '../models/PollOption';\n\nexport default class PollFormState {\n poll: Poll;\n loading: boolean;\n deleting: boolean;\n expandedGroup: string;\n\n static createNewPoll() {\n const poll = app.store.createRecord('polls');\n\n poll.pushAttributes({\n question: '',\n endDate: '',\n publicPoll: false,\n allowMultipleVotes: false,\n hideVotes: false,\n allowChangeVote: false,\n maxVotes: 0,\n });\n\n poll.tempOptions = [app.store.createRecord('poll_options'), app.store.createRecord('poll_options')];\n\n return poll;\n }\n\n constructor(poll: Poll) {\n if (!poll) {\n poll = PollFormState.createNewPoll();\n }\n\n this.loading = false;\n this.deleting = false;\n this.poll = poll;\n this.expandedGroup = 'setup';\n }\n\n isExpanded(groupKey: string) {\n return this.expandedGroup === groupKey;\n }\n\n expand(groupKey: string) {\n this.expandedGroup = groupKey;\n m.redraw();\n }\n\n async save(data: any) {\n this.loading = true;\n m.redraw();\n\n try {\n this.poll = await this.poll.save(data);\n /**\n * Cleanup attributes:\n * For the saving process, we add the options directly to the attributes.\n * As we currently cannot add new PollOptions as relationships.\n */\n delete this.poll!.data!.attributes!.options;\n } finally {\n this.loading = false;\n m.redraw();\n }\n }\n\n async delete() {\n this.loading = true;\n m.redraw();\n\n try {\n await this.poll.delete();\n this.deleting = true;\n } finally {\n this.loading = false;\n m.redraw();\n }\n }\n}\n","import app from 'flarum/forum/app';\nimport PaginatedListState, { Page, PaginatedListParams, PaginatedListRequestParams } from 'flarum/common/states/PaginatedListState';\nimport Poll from '../models/Poll';\nimport { ApiResponsePlural } from 'flarum/common/Store';\nimport EventEmitter from 'flarum/common/utils/EventEmitter';\n\nexport interface PollListParams extends PaginatedListParams {\n sort?: string;\n}\n\nconst globalEventEmitter = new EventEmitter();\n\nexport default class PollListState

extends PaginatedListState {\n protected extraPolls: Poll[] = [];\n protected eventEmitter: EventEmitter;\n\n constructor(params: P, page: number = 1) {\n super(params, page, 20);\n\n this.eventEmitter = globalEventEmitter.on('poll.deleted', this.deletePoll.bind(this));\n }\n\n get type(): string {\n return 'fof/polls';\n }\n\n requestParams(): PaginatedListRequestParams {\n const params = {\n include: this.params.include || ['options', 'votes'],\n filter: this.params.filter || {},\n sort: this.sortMap()[this.params.sort ?? ''],\n };\n\n if (this.params.q) {\n params.filter.q = this.params.q;\n }\n\n return params;\n }\n\n protected loadPage(page: number = 1): Promise> {\n const preloadedPolls = app.preloadedApiDocument();\n\n if (preloadedPolls) {\n this.initialLoading = false;\n\n return Promise.resolve(preloadedPolls);\n }\n\n return super.loadPage(page);\n }\n\n clear(): void {\n super.clear();\n\n this.extraPolls = [];\n }\n\n /**\n * Get a map of sort keys (which appear in the URL, and are used for\n * translation) to the API sort value that they represent.\n */\n sortMap() {\n const map: any = {};\n\n if (this.params.q) {\n map.relevance = '';\n }\n map.newest = '-createdAt';\n map.oldest = 'createdAt';\n\n return map;\n }\n\n /**\n * In the last request, has the user searched for a poll?\n */\n isSearchResults(): boolean {\n return !!this.params.q;\n }\n\n removePoll(poll: Poll): void {\n this.eventEmitter.emit('poll.deleted', poll);\n }\n\n deletePoll(poll: Poll): void {\n for (const page of this.pages) {\n const index = page.items.indexOf(poll);\n\n if (index !== -1) {\n page.items.splice(index, 1);\n break;\n }\n }\n\n const index = this.extraPolls.indexOf(poll);\n\n if (index !== -1) {\n this.extraPolls.splice(index);\n }\n\n m.redraw();\n }\n\n /**\n * Add a poll to the top of the list.\n */\n addPoll(poll: Poll): void {\n this.removePoll(poll);\n this.extraPolls.unshift(poll);\n\n m.redraw();\n }\n\n protected getAllItems(): Poll[] {\n return this.extraPolls.concat(super.getAllItems());\n }\n\n public getPages(): Page[] {\n const pages = super.getPages();\n\n if (this.extraPolls.length) {\n return [\n {\n number: -1,\n items: this.extraPolls,\n },\n ...pages,\n ];\n }\n\n return pages;\n }\n}\n","import app from 'flarum/forum/app';\nimport Poll from '../models/Poll';\nimport LogInModal from 'flarum/forum/components/LogInModal';\nimport PollOption from '../models/PollOption';\nimport PollVote from '../models/PollVote';\nimport ListVotersModal from '../components/ListVotersModal';\nimport { ApiPayloadSingle } from 'flarum/common/Store';\n\nexport default class PollState {\n protected poll: Poll;\n protected pendingSubmit: boolean = false;\n protected pendingOptions: Set | null = null;\n public loadingOptions: boolean = false;\n public useSubmitUI: boolean;\n public showCheckMarks: boolean;\n public canSeeVoteCount: boolean;\n\n constructor(poll: Poll) {\n this.poll = poll;\n this.useSubmitUI = !poll?.canChangeVote() && poll?.allowMultipleVotes();\n this.showCheckMarks = !app.session.user || (!poll.hasEnded() && poll.canVote() && (!this.hasVoted() || poll.canChangeVote()));\n this.canSeeVoteCount = typeof poll.voteCount() === 'number';\n this.init();\n }\n\n /**\n * used as en extendable entry point for init customizations\n */\n init(): void {}\n\n isShowResult(): boolean {\n return this.poll.hasEnded() || (this.canSeeVoteCount && this.hasVoted());\n }\n\n hasVoted(): boolean {\n return this.poll.myVotes().length > 0;\n }\n\n overallVoteCount(): number {\n return this.poll.voteCount();\n }\n\n hasVotedFor(option: PollOption): boolean {\n return this.pendingOptions ? this.pendingOptions.has(option.id()!) : this.poll.myVotes().some((vote: PollVote) => vote.option() === option);\n }\n\n getMaxVotes(): number {\n const poll = this.poll;\n let maxVotes = poll.allowMultipleVotes() ? poll.maxVotes() : 1;\n if (maxVotes === 0) maxVotes = poll.options().length;\n return maxVotes;\n }\n\n showButton(): boolean {\n return this.useSubmitUI && this.pendingSubmit;\n }\n\n changeVote(option: PollOption, evt: Event): void {\n const target = evt.target as HTMLInputElement;\n\n if (!app.session.user) {\n app.modal.show(LogInModal);\n target.checked = false;\n return;\n }\n\n const optionIds = this.pendingOptions || new Set(this.poll.myVotes().map((v: PollVote) => v.option()!.id()!));\n const isUnvoting = optionIds.delete(option.id()!);\n const allowsMultiple = this.poll.allowMultipleVotes();\n\n if (!allowsMultiple) {\n optionIds.clear();\n }\n\n if (!isUnvoting) {\n optionIds.add(option.id()!);\n }\n\n this.pendingOptions = optionIds.size ? optionIds : null;\n this.pendingSubmit = !!this.pendingOptions;\n\n if (this.useSubmitUI) {\n this.pendingOptions = optionIds.size ? optionIds : null;\n this.pendingSubmit = !!this.pendingOptions;\n m.redraw();\n return;\n }\n\n this.submit(optionIds, null, () => (target.checked = isUnvoting));\n }\n\n hasSelectedOptions(): boolean {\n return this.pendingSubmit;\n }\n\n onsubmit(): Promise {\n return this.submit(this.pendingOptions!, () => {\n this.pendingOptions = null;\n this.pendingSubmit = false;\n });\n }\n\n submit(optionIds: Set, cb: Function | null, onerror: Function | null = null) {\n this.loadingOptions = true;\n m.redraw();\n\n return app\n .request({\n method: 'PATCH',\n url: `${app.forum.attribute('apiUrl')}/fof/polls/${this.poll.id()}/votes`,\n body: {\n data: {\n optionIds: Array.from(optionIds),\n },\n },\n })\n .then((res: ApiPayloadSingle) => {\n app.store.pushPayload(res);\n cb?.();\n })\n .catch((err) => {\n onerror?.(err);\n })\n .finally(() => {\n this.loadingOptions = false;\n this.canSeeVoteCount = typeof this.poll.voteCount() === 'number';\n m.redraw();\n });\n }\n\n showVoters = () => {\n // Load all the votes only when opening the votes list\n app.modal.show(ListVotersModal, {\n poll: this.poll,\n });\n };\n}\n","import PollFormState from './PollFormState';\nimport PollListState from './PollListState';\nimport PollState from './PollState';\n\nexport const states = {\n PollFormState,\n PollListState,\n PollState,\n};\n","import type Mithril from 'mithril';\nimport app from 'flarum/forum/app';\nimport Poll from '../models/Poll';\nimport Component from 'flarum/common/Component';\nimport ComposePollPage from '../components/ComposePollPage';\nimport PollsPage from '../components/PollsPage';\nimport ItemList from 'flarum/common/utils/ItemList';\nimport Separator from 'flarum/common/components/Separator';\nimport Button from 'flarum/common/components/Button';\n\n/**\n * The `UserControls` utility constructs a list of buttons for a user which\n * perform actions on it.\n */\nexport default {\n /**\n * Get a list of controls for a user.\n */\n controls(poll: Poll, context: Component): ItemList {\n const items = new ItemList();\n\n ['poll', 'moderation', 'destructive'].forEach((section) => {\n const controls = (this[section + 'Controls'](poll, context) as ItemList).toArray();\n if (controls.length) {\n controls.forEach((item) => items.add(item.itemName, item));\n items.add(section + 'Separator', );\n }\n });\n\n return items;\n },\n\n /**\n * Get controls for direct modifcation actions on polls (e.g. vote, view voters).\n */\n pollControls(poll: Poll, context: Component): ItemList {\n return new ItemList();\n },\n\n /**\n * Get controls for a user pertaining to moderation (e.g. suspend, edit).\n */\n moderationControls(poll: Poll, context: Component): ItemList {\n const items = new ItemList();\n\n if (poll.canEdit()) {\n items.add(\n 'edit',\n \n );\n }\n\n return items;\n },\n\n /**\n * Get controls for a user which are destructive (e.g. delete).\n * @protected\n */\n destructiveControls(poll: Poll, context: Component): ItemList {\n const items = new ItemList();\n\n if (poll.canDelete()) {\n items.add(\n 'delete',\n \n );\n }\n\n return items;\n },\n\n /**\n * Delete the user.\n */\n async deleteAction(poll: Poll): Promise {\n if (!confirm(app.translator.trans(`fof-polls.forum.poll_controls.delete_confirmation`) as string)) {\n return;\n }\n\n return poll\n .delete()\n .then(() => {\n this.showDeletionAlert(poll, 'success');\n if (app.current.matches(ComposePollPage, { id: poll.id() }) || app.current.matches(PollsPage, { id: poll.id() })) {\n app.history.back();\n } else {\n window.location.reload();\n }\n })\n .catch(() => this.showDeletionAlert(poll, 'error'));\n },\n\n /**\n * Show deletion alert of poll\n */\n showDeletionAlert(poll: Poll, type: string): void {\n const message = {\n success: `fof-polls.forum.poll_controls.delete_success_message`,\n error: `fof-polls.forum.poll_controls.delete_error_message`,\n }[type]!;\n\n app.alerts.show({ type }, app.translator.trans(message, { poll: poll }));\n },\n\n /**\n * Edit the poll.\n */\n editAction(poll: Poll): void {\n m.route.set(app.route('fof.polls.compose', { id: poll.id() }));\n },\n};\n","module.exports = flarum.core.compat['common/Component'];","module.exports = flarum.core.compat['common/Model'];","module.exports = flarum.core.compat['common/components/Badge'];","module.exports = flarum.core.compat['common/components/Button'];","module.exports = flarum.core.compat['common/components/Dropdown'];","module.exports = flarum.core.compat['common/components/Link'];","module.exports = flarum.core.compat['common/components/LinkButton'];","module.exports = flarum.core.compat['common/components/LoadingIndicator'];","module.exports = flarum.core.compat['common/components/Modal'];","module.exports = flarum.core.compat['common/components/Page'];","module.exports = flarum.core.compat['common/components/Placeholder'];","module.exports = flarum.core.compat['common/components/SelectDropdown'];","module.exports = flarum.core.compat['common/components/Separator'];","module.exports = flarum.core.compat['common/components/Switch'];","module.exports = flarum.core.compat['common/components/Tooltip'];","module.exports = flarum.core.compat['common/extend'];","module.exports = flarum.core.compat['common/extenders'];","module.exports = flarum.core.compat['common/helpers/avatar'];","module.exports = flarum.core.compat['common/helpers/highlight'];","module.exports = flarum.core.compat['common/helpers/icon'];","module.exports = flarum.core.compat['common/helpers/listItems'];","module.exports = flarum.core.compat['common/helpers/username'];","module.exports = flarum.core.compat['common/models/Discussion'];","module.exports = flarum.core.compat['common/models/Forum'];","module.exports = flarum.core.compat['common/models/Post'];","module.exports = flarum.core.compat['common/states/PaginatedListState'];","module.exports = flarum.core.compat['common/utils/EventEmitter'];","module.exports = flarum.core.compat['common/utils/ItemList'];","module.exports = flarum.core.compat['common/utils/Stream'];","module.exports = flarum.core.compat['common/utils/SubtreeRetainer'];","module.exports = flarum.core.compat['common/utils/abbreviateNumber'];","module.exports = flarum.core.compat['common/utils/classList'];","module.exports = flarum.core.compat['common/utils/computed'];","module.exports = flarum.core.compat['common/utils/extractText'];","module.exports = flarum.core.compat['common/utils/string'];","module.exports = flarum.core.compat['forum/app'];","module.exports = flarum.core.compat['forum/components/CommentPost'];","module.exports = flarum.core.compat['forum/components/DiscussionComposer'];","module.exports = flarum.core.compat['forum/components/DiscussionList'];","module.exports = flarum.core.compat['forum/components/DiscussionPage'];","module.exports = flarum.core.compat['forum/components/IndexPage'];","module.exports = flarum.core.compat['forum/components/LogInModal'];","module.exports = flarum.core.compat['forum/components/ReplyComposer'];","module.exports = flarum.core.compat['forum/utils/PostControls'];","module.exports = flarum.core.compat['forum/utils/slidable'];","var _typeof = require(\"./typeof.js\")[\"default\"];\nfunction _regeneratorRuntime() {\n \"use strict\"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */\n module.exports = _regeneratorRuntime = function _regeneratorRuntime() {\n return e;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n var t,\n e = {},\n r = Object.prototype,\n n = r.hasOwnProperty,\n o = Object.defineProperty || function (t, e, r) {\n t[e] = r.value;\n },\n i = \"function\" == typeof Symbol ? Symbol : {},\n a = i.iterator || \"@@iterator\",\n c = i.asyncIterator || \"@@asyncIterator\",\n u = i.toStringTag || \"@@toStringTag\";\n function define(t, e, r) {\n return Object.defineProperty(t, e, {\n value: r,\n enumerable: !0,\n configurable: !0,\n writable: !0\n }), t[e];\n }\n try {\n define({}, \"\");\n } catch (t) {\n define = function define(t, e, r) {\n return t[e] = r;\n };\n }\n function wrap(t, e, r, n) {\n var i = e && e.prototype instanceof Generator ? e : Generator,\n a = Object.create(i.prototype),\n c = new Context(n || []);\n return o(a, \"_invoke\", {\n value: makeInvokeMethod(t, r, c)\n }), a;\n }\n function tryCatch(t, e, r) {\n try {\n return {\n type: \"normal\",\n arg: t.call(e, r)\n };\n } catch (t) {\n return {\n type: \"throw\",\n arg: t\n };\n }\n }\n e.wrap = wrap;\n var h = \"suspendedStart\",\n l = \"suspendedYield\",\n f = \"executing\",\n s = \"completed\",\n y = {};\n function Generator() {}\n function GeneratorFunction() {}\n function GeneratorFunctionPrototype() {}\n var p = {};\n define(p, a, function () {\n return this;\n });\n var d = Object.getPrototypeOf,\n v = d && d(d(values([])));\n v && v !== r && n.call(v, a) && (p = v);\n var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p);\n function defineIteratorMethods(t) {\n [\"next\", \"throw\", \"return\"].forEach(function (e) {\n define(t, e, function (t) {\n return this._invoke(e, t);\n });\n });\n }\n function AsyncIterator(t, e) {\n function invoke(r, o, i, a) {\n var c = tryCatch(t[r], t, o);\n if (\"throw\" !== c.type) {\n var u = c.arg,\n h = u.value;\n return h && \"object\" == _typeof(h) && n.call(h, \"__await\") ? e.resolve(h.__await).then(function (t) {\n invoke(\"next\", t, i, a);\n }, function (t) {\n invoke(\"throw\", t, i, a);\n }) : e.resolve(h).then(function (t) {\n u.value = t, i(u);\n }, function (t) {\n return invoke(\"throw\", t, i, a);\n });\n }\n a(c.arg);\n }\n var r;\n o(this, \"_invoke\", {\n value: function value(t, n) {\n function callInvokeWithMethodAndArg() {\n return new e(function (e, r) {\n invoke(t, n, e, r);\n });\n }\n return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();\n }\n });\n }\n function makeInvokeMethod(e, r, n) {\n var o = h;\n return function (i, a) {\n if (o === f) throw new Error(\"Generator is already running\");\n if (o === s) {\n if (\"throw\" === i) throw a;\n return {\n value: t,\n done: !0\n };\n }\n for (n.method = i, n.arg = a;;) {\n var c = n.delegate;\n if (c) {\n var u = maybeInvokeDelegate(c, n);\n if (u) {\n if (u === y) continue;\n return u;\n }\n }\n if (\"next\" === n.method) n.sent = n._sent = n.arg;else if (\"throw\" === n.method) {\n if (o === h) throw o = s, n.arg;\n n.dispatchException(n.arg);\n } else \"return\" === n.method && n.abrupt(\"return\", n.arg);\n o = f;\n var p = tryCatch(e, r, n);\n if (\"normal\" === p.type) {\n if (o = n.done ? s : l, p.arg === y) continue;\n return {\n value: p.arg,\n done: n.done\n };\n }\n \"throw\" === p.type && (o = s, n.method = \"throw\", n.arg = p.arg);\n }\n };\n }\n function maybeInvokeDelegate(e, r) {\n var n = r.method,\n o = e.iterator[n];\n if (o === t) return r.delegate = null, \"throw\" === n && e.iterator[\"return\"] && (r.method = \"return\", r.arg = t, maybeInvokeDelegate(e, r), \"throw\" === r.method) || \"return\" !== n && (r.method = \"throw\", r.arg = new TypeError(\"The iterator does not provide a '\" + n + \"' method\")), y;\n var i = tryCatch(o, e.iterator, r.arg);\n if (\"throw\" === i.type) return r.method = \"throw\", r.arg = i.arg, r.delegate = null, y;\n var a = i.arg;\n return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, \"return\" !== r.method && (r.method = \"next\", r.arg = t), r.delegate = null, y) : a : (r.method = \"throw\", r.arg = new TypeError(\"iterator result is not an object\"), r.delegate = null, y);\n }\n function pushTryEntry(t) {\n var e = {\n tryLoc: t[0]\n };\n 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e);\n }\n function resetTryEntry(t) {\n var e = t.completion || {};\n e.type = \"normal\", delete e.arg, t.completion = e;\n }\n function Context(t) {\n this.tryEntries = [{\n tryLoc: \"root\"\n }], t.forEach(pushTryEntry, this), this.reset(!0);\n }\n function values(e) {\n if (e || \"\" === e) {\n var r = e[a];\n if (r) return r.call(e);\n if (\"function\" == typeof e.next) return e;\n if (!isNaN(e.length)) {\n var o = -1,\n i = function next() {\n for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next;\n return next.value = t, next.done = !0, next;\n };\n return i.next = i;\n }\n }\n throw new TypeError(_typeof(e) + \" is not iterable\");\n }\n return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, \"constructor\", {\n value: GeneratorFunctionPrototype,\n configurable: !0\n }), o(GeneratorFunctionPrototype, \"constructor\", {\n value: GeneratorFunction,\n configurable: !0\n }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, \"GeneratorFunction\"), e.isGeneratorFunction = function (t) {\n var e = \"function\" == typeof t && t.constructor;\n return !!e && (e === GeneratorFunction || \"GeneratorFunction\" === (e.displayName || e.name));\n }, e.mark = function (t) {\n return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, \"GeneratorFunction\")), t.prototype = Object.create(g), t;\n }, e.awrap = function (t) {\n return {\n __await: t\n };\n }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () {\n return this;\n }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) {\n void 0 === i && (i = Promise);\n var a = new AsyncIterator(wrap(t, r, n, o), i);\n return e.isGeneratorFunction(r) ? a : a.next().then(function (t) {\n return t.done ? t.value : a.next();\n });\n }, defineIteratorMethods(g), define(g, u, \"Generator\"), define(g, a, function () {\n return this;\n }), define(g, \"toString\", function () {\n return \"[object Generator]\";\n }), e.keys = function (t) {\n var e = Object(t),\n r = [];\n for (var n in e) r.push(n);\n return r.reverse(), function next() {\n for (; r.length;) {\n var t = r.pop();\n if (t in e) return next.value = t, next.done = !1, next;\n }\n return next.done = !0, next;\n };\n }, e.values = values, Context.prototype = {\n constructor: Context,\n reset: function reset(e) {\n if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = \"next\", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) \"t\" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t);\n },\n stop: function stop() {\n this.done = !0;\n var t = this.tryEntries[0].completion;\n if (\"throw\" === t.type) throw t.arg;\n return this.rval;\n },\n dispatchException: function dispatchException(e) {\n if (this.done) throw e;\n var r = this;\n function handle(n, o) {\n return a.type = \"throw\", a.arg = e, r.next = n, o && (r.method = \"next\", r.arg = t), !!o;\n }\n for (var o = this.tryEntries.length - 1; o >= 0; --o) {\n var i = this.tryEntries[o],\n a = i.completion;\n if (\"root\" === i.tryLoc) return handle(\"end\");\n if (i.tryLoc <= this.prev) {\n var c = n.call(i, \"catchLoc\"),\n u = n.call(i, \"finallyLoc\");\n if (c && u) {\n if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);\n if (this.prev < i.finallyLoc) return handle(i.finallyLoc);\n } else if (c) {\n if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);\n } else {\n if (!u) throw new Error(\"try statement without catch or finally\");\n if (this.prev < i.finallyLoc) return handle(i.finallyLoc);\n }\n }\n }\n },\n abrupt: function abrupt(t, e) {\n for (var r = this.tryEntries.length - 1; r >= 0; --r) {\n var o = this.tryEntries[r];\n if (o.tryLoc <= this.prev && n.call(o, \"finallyLoc\") && this.prev < o.finallyLoc) {\n var i = o;\n break;\n }\n }\n i && (\"break\" === t || \"continue\" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null);\n var a = i ? i.completion : {};\n return a.type = t, a.arg = e, i ? (this.method = \"next\", this.next = i.finallyLoc, y) : this.complete(a);\n },\n complete: function complete(t, e) {\n if (\"throw\" === t.type) throw t.arg;\n return \"break\" === t.type || \"continue\" === t.type ? this.next = t.arg : \"return\" === t.type ? (this.rval = this.arg = t.arg, this.method = \"return\", this.next = \"end\") : \"normal\" === t.type && e && (this.next = e), y;\n },\n finish: function finish(t) {\n for (var e = this.tryEntries.length - 1; e >= 0; --e) {\n var r = this.tryEntries[e];\n if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y;\n }\n },\n \"catch\": function _catch(t) {\n for (var e = this.tryEntries.length - 1; e >= 0; --e) {\n var r = this.tryEntries[e];\n if (r.tryLoc === t) {\n var n = r.completion;\n if (\"throw\" === n.type) {\n var o = n.arg;\n resetTryEntry(r);\n }\n return o;\n }\n }\n throw new Error(\"illegal catch attempt\");\n },\n delegateYield: function delegateYield(e, r, n) {\n return this.delegate = {\n iterator: values(e),\n resultName: r,\n nextLoc: n\n }, \"next\" === this.method && (this.arg = t), y;\n }\n }, e;\n}\nmodule.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _typeof(o) {\n \"@babel/helpers - typeof\";\n\n return (module.exports = _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) {\n return typeof o;\n } : function (o) {\n return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports), _typeof(o);\n}\nmodule.exports = _typeof, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","// TODO(Babel 8): Remove this file.\n\nvar runtime = require(\"../helpers/regeneratorRuntime\")();\nmodule.exports = runtime;\n\n// Copied from https://github.com/facebook/regenerator/blob/main/packages/runtime/runtime.js#L736=\ntry {\n regeneratorRuntime = runtime;\n} catch (accidentalStrictMode) {\n if (typeof globalThis === \"object\") {\n globalThis.regeneratorRuntime = runtime;\n } else {\n Function(\"r\", \"regeneratorRuntime = r\")(runtime);\n }\n}\n","export default function _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n return self;\n}","function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n if (info.done) {\n resolve(value);\n } else {\n Promise.resolve(value).then(_next, _throw);\n }\n}\nexport default function _asyncToGenerator(fn) {\n return function () {\n var self = this,\n args = arguments;\n return new Promise(function (resolve, reject) {\n var gen = fn.apply(self, args);\n function _next(value) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n }\n function _throw(err) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n }\n _next(undefined);\n });\n };\n}","import setPrototypeOf from \"./setPrototypeOf.js\";\nimport isNativeReflectConstruct from \"./isNativeReflectConstruct.js\";\nexport default function _construct(t, e, r) {\n if (isNativeReflectConstruct()) return Reflect.construct.apply(null, arguments);\n var o = [null];\n o.push.apply(o, e);\n var p = new (t.bind.apply(t, o))();\n return r && setPrototypeOf(p, r.prototype), p;\n}","import toPropertyKey from \"./toPropertyKey.js\";\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, toPropertyKey(descriptor.key), descriptor);\n }\n}\nexport default function _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n Object.defineProperty(Constructor, \"prototype\", {\n writable: false\n });\n return Constructor;\n}","export default function _extends() {\n _extends = Object.assign ? Object.assign.bind() : function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n };\n return _extends.apply(this, arguments);\n}","export default function _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}","import setPrototypeOf from \"./setPrototypeOf.js\";\nexport default function _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n setPrototypeOf(subClass, superClass);\n}","export default function _isNativeFunction(fn) {\n try {\n return Function.toString.call(fn).indexOf(\"[native code]\") !== -1;\n } catch (e) {\n return typeof fn === \"function\";\n }\n}","export default function _isNativeReflectConstruct() {\n try {\n var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));\n } catch (t) {}\n return (_isNativeReflectConstruct = function _isNativeReflectConstruct() {\n return !!t;\n })();\n}","export default function _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n return _setPrototypeOf(o, p);\n}","import _typeof from \"./typeof.js\";\nexport default function toPrimitive(t, r) {\n if (\"object\" != _typeof(t) || !t) return t;\n var e = t[Symbol.toPrimitive];\n if (void 0 !== e) {\n var i = e.call(t, r || \"default\");\n if (\"object\" != _typeof(i)) return i;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (\"string\" === r ? String : Number)(t);\n}","import _typeof from \"./typeof.js\";\nimport toPrimitive from \"./toPrimitive.js\";\nexport default function toPropertyKey(t) {\n var i = toPrimitive(t, \"string\");\n return \"symbol\" == _typeof(i) ? i : String(i);\n}","export default function _typeof(o) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) {\n return typeof o;\n } : function (o) {\n return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n }, _typeof(o);\n}","import getPrototypeOf from \"./getPrototypeOf.js\";\nimport setPrototypeOf from \"./setPrototypeOf.js\";\nimport isNativeFunction from \"./isNativeFunction.js\";\nimport construct from \"./construct.js\";\nexport default function _wrapNativeSuper(Class) {\n var _cache = typeof Map === \"function\" ? new Map() : undefined;\n _wrapNativeSuper = function _wrapNativeSuper(Class) {\n if (Class === null || !isNativeFunction(Class)) return Class;\n if (typeof Class !== \"function\") {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n if (typeof _cache !== \"undefined\") {\n if (_cache.has(Class)) return _cache.get(Class);\n _cache.set(Class, Wrapper);\n }\n function Wrapper() {\n return construct(Class, arguments, getPrototypeOf(this).constructor);\n }\n Wrapper.prototype = Object.create(Class.prototype, {\n constructor: {\n value: Wrapper,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n return setPrototypeOf(Wrapper, Class);\n };\n return _wrapNativeSuper(Class);\n}","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};"],"names":["app","extend","classList","DiscussionComposer","ReplyComposer","CreatePollModal","toPoll","data","poll","store","createRecord","tempOptions","options","map","option","pollOption","pushAttributes","addToComposer","composer","prototype","addPoll","_this","modal","show","fields","onsubmit","items","_this$composer$body","_discussion$canStartP","discussion","body","attrs","canStartPoll","forum","canStartPolls","add","m","className","onclick","bind","translator","trans","Badge","DiscussionList","Discussion","params","include","push","badges","hasPoll","component","type","label","icon","IndexPage","LinkButton","addNavItem","attribute","href","route","showAllGlobalPolls","CommentPost","PollView","DiscussionPage","content","post","isHidden","revealContent","polls","_iterator","_createForOfIteratorHelperLoose","_step","done","value","subtree","check","checks","_poll$data","_poll$options$map","_poll$options","_poll$myVotes$map","_poll$myVotes","attributes","call","_option$data","myVotes","vote","_vote$option","id","JSON","stringify","pusher","then","binding","channels","main","getById","voteCount","changedOptions","optionId","undefined","redraw","unbind","PostControls","Button","createPoll","save","_extends","relationships","_post$rawRelationship","rawRelationship","Page","ItemList","LoadingIndicator","listItems","SelectDropdown","AbstractPollPage","_Page","_inheritsLoose","_len","arguments","length","args","Array","_key","apply","concat","loading","_proto","view","pageContent","toArray","hero","mainContent","sidebar","contentItems","sidebarItems","setContent","buttonClassName","accessibleToggleLabel","navItems","initializers","has","remove","key","toObject","startsWith","Component","ComposePollHero","_Component","oninit","vnode","controlItems","itemClassName","exists","default","PollForm","PollFormState","ComposePollPage","_this2","_this$poll","_this$poll2","set","editId","param","find","item","_this2$poll","setTitle","createNewPoll","history","bodyClass","_onsubmit","_asyncToGenerator","_regeneratorRuntime","mark","_callee","state","isNew","alertAttrs","alertId","wrap","_callee$","_context","prev","next","controls","alerts","setTimeout","dismiss","stop","_x","_x2","Modal","_Modal","title","onFormSubmit","_onFormSubmit","hide","EditPollModal","_CreatePollModal","avatar","username","Link","ListVotersModal","optionContent","opt","votes","filter","v","answer","voteContent","user","PollImage","src","imageUrl","alt","PollListItem","Placeholder","PollList","getParams","isLoading","isInitialLoading","isLoadingNext","hasNext","loadNext","isEmpty","text","isSearchResults","getPages","pg","SubtreeRetainer","Dropdown","highlight","slidable","abbreviateNumber","PollControls","PollViewPage","highlightRegExp","freshness","time","session","markedAllAsReadAt","getTime","active","elementAttrs","Slidable","window","controlsView","contentView","slidableUnderneathView","menuClassName","isUnread","disabled","markAsRead","mainView","question","subtitle","infoItems","oncreate","slidableInstance","element","$","on","reset","onbeforeupdate","needsRebuild","current","matches","lastVotedNumber","hasEnded","activeView","endDate","dayjs","fromNow","count","Tooltip","PollOption","hasVoted","totalVotes","overallVoteCount","voted","hasVotedFor","percent","Math","round","canSeeVoteCount","isDisabled","loadingOptions","canChangeVote","width","Number","bar","style","showCheckMarks","onchange","changeVote","checked","onremove","hideOptionTooltip","tooltipVisible","updateVisibility","PollOptions","pollOptions","forEach","createOptionView","name","PollSubmitButton","event","pollButtonSubmit","hasSelectedOptions","Switch","Stream","extractText","FormError","UploadPollImageButton","UploadPollOptionImageButton","optionAnswers","optionImage","image","imageAlt","publicPoll","allowMultipleVotes","hideVotes","allowChangeVote","maxVotes","datepickerMinDate","_poll$tempOptions","o","formatDate","isAfter","bidi","onUpload","pollImageUploadSuccess","required","addOption","displayOptions","min","max","isBefore","deleting","i","createOptionFields","removeOption","_this3","number","placeholder","fileName","alert","splice","optionImageAlt","_this4","_this$dateToTimestamp","pollExists","pollImage","dateToTimestamp","preventDefault","t0","message","console","error","_delete2","_callee2","_callee2$","_context2","deleteAction","finish","_delete","date","def","dayjsDate","isValid","format","PollShowcaseItem","PollShowcase","refresh","showcaseItems","endedItems","page","PollState","slug","preventClose","e","addEventListener","removeEventListener","showVoters","createMainView","createPollHeader","createPollContent","createPollFooter","createFormItems","getMaxVotes","showButton","questionSlug","canVote","_AbstractPollPage","LogInModal","PollListState","PollsPage","sort","viewItems","actionItems","newPollAction","PollsShowcasePage","PostPoll","useSubmitUI","pendingSubmit","pendingOptions","_this$attrs$poll","_this$attrs$poll2","canSeeVoters","canEdit","canDelete","deletePoll","viewOption","_poll$myVotes2","_poll$myVotes3","_poll$myVotes4","some","showCheckmark","evt","_this$attrs$poll$myVo","_this$attrs$poll$myVo2","target","optionIds","Set","isUnvoting","allowsMultiple","clear","size","submit","cb","onerror","request","method","url","from","res","pushPayload","err","confirm","sync","_Button","uploadedImageUrl","children","upload","$input","appendTo","trigger","FormData","append","files","resourceUrl","serialize","raw","success","failure","response","_this$attrs$onUpload","_this$attrs","fileUrl","_UploadPollImageButto","_Error","props","_wrapNativeSuper","Error","components","Extend","Post","Forum","Poll","PollVote","Routes","Store","Model","hasMany","addDiscussionBadge","addComposerItems","addPollsToPost","addPostControls","computed","_Model","transformDate","isGlobal","hiddenAt","apiEndpoint","hasOne","result","pollId","models","expandedGroup","isExpanded","groupKey","expand","_save","sent","PaginatedListState","EventEmitter","globalEventEmitter","_PaginatedListState","extraPolls","eventEmitter","_assertThisInitialized","requestParams","_this$params$sort","sortMap","q","loadPage","preloadedPolls","preloadedApiDocument","initialLoading","Promise","resolve","relevance","newest","oldest","removePoll","emit","pages","index","indexOf","unshift","getAllItems","_createClass","get","init","isShowResult","states","Separator","context","section","itemName","pollControls","moderationControls","editAction","destructiveControls","abrupt","showDeletionAlert","back","location","reload","_typeof","require","module","exports","__esModule","t","r","Object","n","hasOwnProperty","defineProperty","Symbol","a","iterator","c","asyncIterator","u","toStringTag","define","enumerable","configurable","writable","Generator","create","Context","makeInvokeMethod","tryCatch","arg","h","l","f","s","y","GeneratorFunction","GeneratorFunctionPrototype","p","d","getPrototypeOf","values","g","defineIteratorMethods","_invoke","AsyncIterator","invoke","__await","callInvokeWithMethodAndArg","delegate","maybeInvokeDelegate","_sent","dispatchException","TypeError","resultName","nextLoc","pushTryEntry","tryLoc","catchLoc","finallyLoc","afterLoc","tryEntries","resetTryEntry","completion","isNaN","displayName","isGeneratorFunction","constructor","setPrototypeOf","__proto__","awrap","async","keys","reverse","pop","charAt","slice","rval","handle","complete","_catch","delegateYield","runtime","regeneratorRuntime","accidentalStrictMode","globalThis","Function","self","ReferenceError","asyncGeneratorStep","gen","reject","_next","_throw","info","fn","isNativeReflectConstruct","_construct","Reflect","construct","toPropertyKey","_defineProperties","descriptor","Constructor","protoProps","staticProps","assign","source","_getPrototypeOf","subClass","superClass","_isNativeFunction","toString","_isNativeReflectConstruct","Boolean","valueOf","_setPrototypeOf","toPrimitive","String","isNativeFunction","Class","_cache","Map","Wrapper"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"forum.js","mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAmC;AAEW;AACQ;AACsB;AACV;AACP;AAM3D,SAASM,MAAMA,CAACC,IAAyB,EAAE;EACzC,IAAIA,IAAI,EAAE;IACR,IAAMC,IAAI,GAAGR,6DAAS,CAACU,YAAY,CAAO,OAAO,CAAC;IA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WCPA;WACA;WACA;WACA;WACA,yCAAyC,wCAAwC;WACjF;WACA;WACA;;;;;WCPA;;;;;WCAA;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D","sources":["webpack://@fof/polls/./src/forum/addComposerItems.tsx","webpack://@fof/polls/./src/forum/addDiscussionBadge.tsx","webpack://@fof/polls/./src/forum/addNavItem.ts","webpack://@fof/polls/./src/forum/addPollsToPost.tsx","webpack://@fof/polls/./src/forum/addPostControls.tsx","webpack://@fof/polls/./src/forum/components/AbstractPollPage.tsx","webpack://@fof/polls/./src/forum/components/ComposePollHero.tsx","webpack://@fof/polls/./src/forum/components/ComposePollPage.tsx","webpack://@fof/polls/./src/forum/components/CreatePollModal.tsx","webpack://@fof/polls/./src/forum/components/EditPollModal.tsx","webpack://@fof/polls/./src/forum/components/ListVotersModal.tsx","webpack://@fof/polls/./src/forum/components/Poll/PollImage.tsx","webpack://@fof/polls/./src/forum/components/Poll/PollList.tsx","webpack://@fof/polls/./src/forum/components/Poll/PollListItem.tsx","webpack://@fof/polls/./src/forum/components/Poll/PollOption.tsx","webpack://@fof/polls/./src/forum/components/Poll/PollOptions.tsx","webpack://@fof/polls/./src/forum/components/Poll/PollSubmitButton.tsx","webpack://@fof/polls/./src/forum/components/PollForm.tsx","webpack://@fof/polls/./src/forum/components/PollShowcase.tsx","webpack://@fof/polls/./src/forum/components/PollShowcaseItem.tsx","webpack://@fof/polls/./src/forum/components/PollView.tsx","webpack://@fof/polls/./src/forum/components/PollViewPage.tsx","webpack://@fof/polls/./src/forum/components/PollsPage.tsx","webpack://@fof/polls/./src/forum/components/PollsShowcasePage.tsx","webpack://@fof/polls/./src/forum/components/PostPoll.tsx","webpack://@fof/polls/./src/forum/components/UploadPollImageButton.tsx","webpack://@fof/polls/./src/forum/components/UploadPollOptionImageButton.tsx","webpack://@fof/polls/./src/forum/components/form/FormError.tsx","webpack://@fof/polls/./src/forum/components/index.ts","webpack://@fof/polls/./src/forum/extend.ts","webpack://@fof/polls/./src/forum/index.ts","webpack://@fof/polls/./src/forum/models/Poll.ts","webpack://@fof/polls/./src/forum/models/PollOption.ts","webpack://@fof/polls/./src/forum/models/PollVote.ts","webpack://@fof/polls/./src/forum/models/index.ts","webpack://@fof/polls/./src/forum/states/PollFormState.ts","webpack://@fof/polls/./src/forum/states/PollListState.ts","webpack://@fof/polls/./src/forum/states/PollState.ts","webpack://@fof/polls/./src/forum/states/index.ts","webpack://@fof/polls/./src/forum/utils/PollControls.tsx","webpack://@fof/polls/external root \"flarum.core.compat['common/Component']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/Model']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/components/Badge']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/components/Button']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/components/Dropdown']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/components/Link']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/components/LinkButton']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/components/LoadingIndicator']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/components/Modal']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/components/Page']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/components/Placeholder']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/components/SelectDropdown']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/components/Separator']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/components/Switch']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/components/Tooltip']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/extend']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/extenders']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/helpers/avatar']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/helpers/highlight']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/helpers/icon']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/helpers/listItems']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/helpers/username']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/models/Discussion']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/models/Forum']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/models/Post']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/states/PaginatedListState']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/utils/EventEmitter']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/utils/ItemList']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/utils/Stream']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/utils/SubtreeRetainer']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/utils/abbreviateNumber']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/utils/classList']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/utils/computed']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/utils/extractText']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/utils/string']\"","webpack://@fof/polls/external root \"flarum.core.compat['forum/app']\"","webpack://@fof/polls/external root \"flarum.core.compat['forum/components/CommentPost']\"","webpack://@fof/polls/external root \"flarum.core.compat['forum/components/DiscussionComposer']\"","webpack://@fof/polls/external root \"flarum.core.compat['forum/components/DiscussionList']\"","webpack://@fof/polls/external root \"flarum.core.compat['forum/components/DiscussionPage']\"","webpack://@fof/polls/external root \"flarum.core.compat['forum/components/IndexPage']\"","webpack://@fof/polls/external root \"flarum.core.compat['forum/components/LogInModal']\"","webpack://@fof/polls/external root \"flarum.core.compat['forum/components/ReplyComposer']\"","webpack://@fof/polls/external root \"flarum.core.compat['forum/utils/PostControls']\"","webpack://@fof/polls/external root \"flarum.core.compat['forum/utils/slidable']\"","webpack://@fof/polls/./node_modules/@babel/runtime/helpers/regeneratorRuntime.js","webpack://@fof/polls/./node_modules/@babel/runtime/helpers/typeof.js","webpack://@fof/polls/./node_modules/@babel/runtime/regenerator/index.js","webpack://@fof/polls/./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js","webpack://@fof/polls/./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js","webpack://@fof/polls/./node_modules/@babel/runtime/helpers/esm/construct.js","webpack://@fof/polls/./node_modules/@babel/runtime/helpers/esm/createClass.js","webpack://@fof/polls/./node_modules/@babel/runtime/helpers/esm/extends.js","webpack://@fof/polls/./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js","webpack://@fof/polls/./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js","webpack://@fof/polls/./node_modules/@babel/runtime/helpers/esm/isNativeFunction.js","webpack://@fof/polls/./node_modules/@babel/runtime/helpers/esm/isNativeReflectConstruct.js","webpack://@fof/polls/./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js","webpack://@fof/polls/./node_modules/@babel/runtime/helpers/esm/toPrimitive.js","webpack://@fof/polls/./node_modules/@babel/runtime/helpers/esm/toPropertyKey.js","webpack://@fof/polls/./node_modules/@babel/runtime/helpers/esm/typeof.js","webpack://@fof/polls/./node_modules/@babel/runtime/helpers/esm/wrapNativeSuper.js","webpack://@fof/polls/webpack/bootstrap","webpack://@fof/polls/webpack/runtime/compat get default export","webpack://@fof/polls/webpack/runtime/define property getters","webpack://@fof/polls/webpack/runtime/hasOwnProperty shorthand","webpack://@fof/polls/webpack/runtime/make namespace object"],"sourcesContent":["import app from 'flarum/forum/app';\n\nimport { extend } from 'flarum/common/extend';\nimport classList from 'flarum/common/utils/classList';\nimport DiscussionComposer from 'flarum/forum/components/DiscussionComposer';\nimport ReplyComposer from 'flarum/forum/components/ReplyComposer';\nimport CreatePollModal from './components/CreatePollModal';\nimport Poll from './models/Poll';\nimport PollOption from './models/PollOption';\nimport { ModelAttributes } from 'flarum/common/Model';\nimport PollModelAttributes from './models/PollModelAttributes';\n\nfunction toPoll(data: PollModelAttributes) {\n if (data) {\n const poll = app.store.createRecord('polls');\n\n poll.tempOptions = data.options.map((option: ModelAttributes) => {\n const pollOption = app.store.createRecord('poll_options');\n pollOption.pushAttributes(option);\n return pollOption;\n });\n poll.pushAttributes(data);\n\n return poll;\n }\n return data;\n}\n\nexport const addToComposer = (composer: ComponentClass) => {\n // @ts-ignore\n composer.prototype.addPoll = function () {\n app.modal.show(CreatePollModal, {\n poll: toPoll(this.composer.fields.poll),\n onsubmit: (poll: PollModelAttributes) => (this.composer.fields.poll = poll),\n });\n };\n\n // Add button to DiscussionComposer header\n extend(composer.prototype, 'headerItems', function (items) {\n const discussion = this.composer.body?.attrs?.discussion;\n\n // @ts-ignore\n const canStartPoll = discussion?.canStartPoll() ?? app.forum.canStartPolls();\n\n if (canStartPoll) {\n items.add(\n 'polls',\n \n \n {app.translator.trans(`fof-polls.forum.composer_discussion.${this.composer.fields.poll ? 'edit' : 'add'}_poll`)}\n \n ,\n 1\n );\n }\n });\n\n extend(composer.prototype, 'data', function (data) {\n if (this.composer.fields.poll) {\n data.poll = this.composer.fields.poll;\n }\n });\n};\n\nexport default () => {\n addToComposer(DiscussionComposer);\n addToComposer(ReplyComposer);\n};\n","import app from 'flarum/forum/app';\n\nimport { extend } from 'flarum/common/extend';\nimport Badge from 'flarum/common/components/Badge';\nimport DiscussionList from 'flarum/forum/components/DiscussionList';\nimport Discussion from 'flarum/common/models/Discussion';\nimport { PaginatedListRequestParams } from 'flarum/common/states/PaginatedListState';\n\nexport default () => {\n // @ts-ignore\n extend(DiscussionList.prototype, 'requestParams', (params: PaginatedListRequestParams) => {\n (params.include as string[]).push('poll');\n });\n\n extend(Discussion.prototype, 'badges', function (badges) {\n // @ts-ignore\n if (this.hasPoll()) {\n badges.add(\n 'poll',\n Badge.component({\n type: 'poll',\n label: app.translator.trans('fof-polls.forum.tooltip.badge'),\n icon: 'fas fa-poll',\n }),\n 5\n );\n }\n });\n};\n","import app from 'flarum/forum/app';\nimport { extend } from 'flarum/common/extend';\nimport IndexPage from 'flarum/forum/components/IndexPage';\nimport LinkButton from 'flarum/common/components/LinkButton';\n\nexport default function addNavItem() {\n extend(IndexPage.prototype, 'navItems', (items) => {\n if (!app.forum.attribute('globalPollsEnabled')) {\n return;\n }\n\n items.add(\n 'fof-polls-showcase',\n LinkButton.component(\n {\n href: app.route('fof.polls.showcase'),\n icon: 'fas fa-poll',\n },\n app.translator.trans('fof-polls.forum.page.nav')\n ),\n 35\n );\n\n const showAllGlobalPolls = app.forum.attribute('canStartGlobalPolls');\n\n if (showAllGlobalPolls) {\n items.add(\n 'fof-polls-list',\n LinkButton.component(\n {\n href: app.route('fof.polls.list'),\n icon: 'fas fa-list',\n },\n app.translator.trans('fof-polls.forum.page.nav-all')\n ),\n 32\n );\n }\n });\n}\n","import app from 'flarum/forum/app';\n\nimport { extend } from 'flarum/common/extend';\nimport CommentPost from 'flarum/forum/components/CommentPost';\nimport PollView from './components/PollView';\nimport DiscussionPage from 'flarum/forum/components/DiscussionPage';\nimport Poll from './models/Poll';\nimport Post from 'flarum/common/models/Post';\nimport PollOption from './models/PollOption';\n\ninterface PollPost extends Post {\n polls: () => Poll[];\n}\n\ninterface PusherPollDto {\n pollId: string;\n pollVoteCount: number;\n options: { [key: string]: number };\n}\n\nexport default () => {\n extend(CommentPost.prototype, 'content', function (content) {\n const post = this.attrs.post as PollPost;\n\n if ((!post.isHidden() || this.revealContent) && post.polls()) {\n for (const poll of post.polls()) {\n if (poll) {\n content.push();\n }\n }\n }\n });\n\n extend(CommentPost.prototype, 'oninit', function () {\n this.subtree.check(() => {\n const polls = (this.attrs.post as PollPost).polls();\n\n const checks = polls?.map?.(\n (poll) =>\n poll && [\n poll.data?.attributes,\n poll.options().map?.((option) => option?.data?.attributes),\n poll.myVotes().map?.((vote) => vote.option()?.id()),\n ]\n );\n\n return JSON.stringify(checks);\n });\n });\n\n extend(DiscussionPage.prototype, 'oncreate', function () {\n // @ts-ignore\n if (app.pusher) {\n // @ts-ignore\n app.pusher.then((binding) => {\n // We will listen for updates to all polls and options\n // Even if that model is not in the current discussion, it doesn't really matter\n binding.channels.main.bind('updatedPollOptions', (data: PusherPollDto) => {\n const poll = app.store.getById('polls', data['pollId']);\n\n if (poll) {\n poll.pushAttributes({\n voteCount: data['pollVoteCount'],\n });\n\n // Not redrawing here, as the option below should trigger the redraw already\n }\n\n const changedOptions = data['options'];\n\n for (const optionId in changedOptions) {\n const option = app.store.getById('poll_options', optionId);\n\n if (option && option.voteCount() !== undefined) {\n option.pushAttributes({\n voteCount: changedOptions[optionId],\n });\n }\n }\n\n m.redraw();\n });\n });\n }\n });\n\n extend(DiscussionPage.prototype, 'onremove', function () {\n // @ts-ignore\n if (app.pusher) {\n // @ts-ignore\n app.pusher.then((binding) => {\n binding.channels.main.unbind('updatedPollOptions');\n });\n }\n });\n};\n","import app from 'flarum/forum/app';\n\nimport { extend } from 'flarum/common/extend';\nimport PostControls from 'flarum/forum/utils/PostControls';\nimport CreatePollModal from './components/CreatePollModal';\nimport Button from 'flarum/common/components/Button';\nimport Post from 'flarum/common/models/Post';\nimport PollModelAttributes from './models/PollModelAttributes';\n\nexport default () => {\n const createPoll = (post: Post) =>\n app.modal.show(CreatePollModal, {\n onsubmit: (data: PollModelAttributes) =>\n app.store\n .createRecord('polls')\n .save(\n {\n ...data,\n relationships: {\n post,\n },\n },\n {\n data: {\n include: 'options,myVotes,myVotes.option',\n },\n }\n )\n .then((poll) => {\n // @ts-ignore\n post.rawRelationship('polls')?.push?.({ type: 'polls', id: poll.id() });\n\n return poll;\n }),\n });\n\n extend(PostControls, 'moderationControls', function (items, post) {\n // @ts-ignore\n if (!post.isHidden() && post.canStartPoll()) {\n items.add(\n 'addPoll',\n \n );\n }\n });\n};\n","import Page, { IPageAttrs } from 'flarum/common/components/Page';\nimport PollListState from '../states/PollListState';\nimport Poll from '../models/Poll';\nimport ItemList from 'flarum/common/utils/ItemList';\nimport type Mithril from 'mithril';\nimport LoadingIndicator from 'flarum/common/components/LoadingIndicator';\nimport IndexPage from 'flarum/forum/components/IndexPage';\nimport listItems from 'flarum/common/helpers/listItems';\nimport app from 'flarum/forum/app';\nimport SelectDropdown from 'flarum/common/components/SelectDropdown';\n\nexport abstract class AbstractPollPage extends Page {\n loading: boolean = false;\n poll: Poll | null | undefined = null;\n polls: Poll[] = [];\n\n view(): Mithril.Children {\n return

{this.pageContent().toArray()}
;\n }\n\n pageContent(): ItemList {\n const items = new ItemList();\n\n items.add('hero', this.hero(), 100);\n items.add('main',
{this.mainContent().toArray()}
, 10);\n\n return items;\n }\n\n mainContent(): ItemList {\n const items = new ItemList();\n\n items.add('sidebar', this.sidebar(), 100);\n items.add('content', this.content(), 10);\n\n return items;\n }\n\n content(): Mithril.Children {\n return
{this.contentItems().toArray()}
;\n }\n\n contentItems(): ItemList {\n const items = new ItemList();\n\n if (this.loading) {\n items.add('loading', );\n }\n\n return items;\n }\n\n hero(): Mithril.Children {\n return IndexPage.prototype.hero();\n }\n\n sidebar(): Mithril.Children {\n return (\n \n );\n }\n\n sidebarItems(): ItemList {\n const items = IndexPage.prototype.sidebarItems();\n\n items.setContent(\n 'nav',\n \n {this.navItems().toArray()}\n \n );\n\n return items;\n }\n\n navItems(): ItemList {\n const items = IndexPage.prototype.navItems();\n\n if (app.initializers.has('flarum-tags')) {\n // remove the tags from the nav items\n items.remove('separator');\n items.remove('moreTags');\n\n // each tag is added using the key \"tag{id}\". We need to remove all of them\n for (const key in items.toObject()) {\n if (key.startsWith('tag') && key !== 'tags') {\n items.remove(key);\n }\n }\n }\n\n return items;\n }\n}\n","import Mithril from 'mithril';\nimport app from 'flarum/forum/app';\nimport Component, { ComponentAttrs } from 'flarum/common/Component';\nimport LinkButton from 'flarum/common/components/LinkButton';\nimport Poll from '../models/Poll';\nimport ItemList from 'flarum/common/utils/ItemList';\n\nexport interface ComposePollHeroAttrs extends ComponentAttrs {\n poll: Poll;\n}\n\nexport default class ComposePollHero extends Component {\n poll!: Poll;\n\n oninit(vnode: Mithril.Vnode): void {\n super.oninit(vnode);\n\n this.poll = this.attrs.poll;\n }\n\n view(): Mithril.Children {\n return (\n
\n
\n
\n

{app.translator.trans(`fof-polls.forum.compose.${!!this.poll.id() ? 'edit' : 'add'}_title`)}

\n
{this.controlItems().toArray()}
\n
\n
\n
\n );\n }\n\n controlItems(): ItemList {\n const items = new ItemList();\n\n items.add(\n 'edit',\n \n {app.translator.trans('fof-polls.forum.compose.polls_manager')}\n \n );\n\n if (this.poll.exists) {\n items.add(\n 'view',\n \n {app.translator.trans('fof-polls.forum.compose.polls_preview')}\n \n );\n }\n\n return items;\n }\n}\n","import type Mithril from 'mithril';\nimport app from 'flarum/forum/app';\nimport Page from 'flarum/common/components/Page';\nimport Poll from '../models/Poll';\nimport LoadingIndicator from 'flarum/common/components/LoadingIndicator';\nimport PollForm from './PollForm';\nimport PollFormState from '../states/PollFormState';\nimport ComposePollHero from './ComposePollHero';\nimport Button from 'flarum/common/components/Button';\nimport listItems from 'flarum/common/helpers/listItems';\nimport ItemList from 'flarum/common/utils/ItemList';\nimport SelectDropdown from 'flarum/common/components/SelectDropdown';\nimport IndexPage from 'flarum/forum/components/IndexPage';\n\nexport default class ComposePollPage extends Page {\n poll: Poll | null | undefined = null;\n\n loading: boolean = false;\n\n oninit(vnode: Mithril.Vnode) {\n super.oninit(vnode);\n\n if (!app.forum.attribute('globalPollsEnabled')) {\n m.route.set('/');\n return;\n }\n\n // Get the `edit` parameter from the URL\n const editId = m.route.param('id');\n if (editId) {\n this.poll = app.store.getById('poll', editId);\n\n if (!this.poll) {\n this.loading = true;\n\n app.store.find('fof/polls', editId).then((item) => {\n this.poll = item;\n this.loading = false;\n app.setTitle(app.translator.trans(`fof-polls.forum.compose.${!!this.poll?.id() ? 'edit' : 'add'}_title`) as string);\n m.redraw();\n });\n }\n } else {\n this.poll = PollFormState.createNewPoll();\n }\n\n app.history.push('compose-poll', app.translator.trans(`fof-polls.forum.compose.${!!this.poll?.id() ? 'edit' : 'add'}_title`) as string);\n this.bodyClass = 'App--compose-poll';\n app.setTitle(app.translator.trans(`fof-polls.forum.compose.${!!this.poll?.id() ? 'edit' : 'add'}_title`) as string);\n }\n\n view(): Mithril.Children {\n // prevent users from accessing the page if they can't start global polls\n if (!app.forum.attribute('canStartGlobalPolls')) {\n m.route.set('/');\n return;\n }\n\n if (this.loading) {\n return ;\n }\n\n return (\n
\n \n
\n
\n \n
\n \n
\n
\n
\n
\n );\n }\n\n async onsubmit(data: Object, state: PollFormState) {\n const isNew = state.poll.id() === undefined;\n await state.save(data);\n\n const alertAttrs = isNew\n ? {\n type: 'success',\n controls: [\n \n m.route.set(\n app.route('fof.polls.compose', {\n id: state.poll.id(),\n })\n )\n }\n >\n {app.translator.trans('fof-polls.forum.compose.continue_editing')}\n ,\n ],\n }\n : {\n type: 'success',\n };\n\n // Show success alert\n const alertId = app.alerts.show(alertAttrs, app.translator.trans('fof-polls.forum.compose.success'));\n\n // Hide alert after 10 seconds\n setTimeout(() => app.alerts.dismiss(alertId), 10000);\n\n if (isNew) {\n m.route.set(app.route('fof.polls.list'));\n }\n }\n\n sidebarItems(): ItemList {\n const items = new ItemList();\n\n items.add(\n 'nav',\n \n {this.navItems().toArray()}\n \n );\n\n return items;\n }\n\n navItems() {\n return IndexPage.prototype.navItems();\n }\n}\n","import type Mithril from 'mithril';\nimport app from 'flarum/forum/app';\nimport Modal, { IInternalModalAttrs } from 'flarum/common/components/Modal';\nimport PollForm from './PollForm';\nimport PollModel from '../models/Poll';\nimport PollFormState from '../states/PollFormState';\n\ninterface CreatePollModalAttrs extends IInternalModalAttrs {\n poll: PollModel;\n onsubmit: (data: object) => Promise;\n}\n\nexport default class CreatePollModal extends Modal {\n title(): Mithril.Children {\n return app.translator.trans('fof-polls.forum.modal.add_title');\n }\n\n className(): string {\n return 'PollDiscussionModal Modal--medium';\n }\n\n content(): Mithril.Children {\n return [\n
\n \n
,\n ];\n }\n\n async onFormSubmit(data: object, state: PollFormState): Promise {\n this.hide();\n await this.attrs.onsubmit(data);\n }\n}\n","import type Mithril from 'mithril';\nimport app from 'flarum/forum/app';\nimport CreatePollModal from './CreatePollModal';\nimport PollFormState from '../states/PollFormState';\n\nexport default class EditPollModal extends CreatePollModal {\n title(): Mithril.Children {\n return app.translator.trans('fof-polls.forum.modal.edit_title');\n }\n\n async onFormSubmit(data: object, state: PollFormState): Promise {\n await state.save(data);\n\n // Show success alert\n const alertId = app.alerts.show(\n {\n type: 'success',\n },\n app.translator.trans('fof-polls.forum.compose.success')\n );\n\n // Hide alert after 10 seconds\n setTimeout(() => app.alerts.dismiss(alertId), 10000);\n }\n}\n","import type Mithril from 'mithril';\nimport app from 'flarum/forum/app';\nimport Modal, { IInternalModalAttrs } from 'flarum/common/components/Modal';\nimport avatar from 'flarum/common/helpers/avatar';\nimport username from 'flarum/common/helpers/username';\nimport Link from 'flarum/common/components/Link';\nimport LoadingIndicator from 'flarum/common/components/LoadingIndicator';\nimport PollModel from '../models/Poll';\nimport PollVote from '../models/PollVote';\nimport User from 'flarum/common/models/User';\nimport PollOption from '../models/PollOption';\n\ninterface ListVotersModalAttrs extends IInternalModalAttrs {\n poll: PollModel;\n onsubmit: (data: object) => Promise;\n}\n\nexport default class ListVotersModal extends Modal {\n oninit(vnode: Mithril.Vnode): void {\n super.oninit(vnode);\n\n this.loading = true;\n\n app.store\n .find('fof/polls', this.attrs.poll.id()!, {\n include: 'votes,votes.user,votes.option',\n })\n .then(() => (this.loading = false))\n .finally(() => m.redraw());\n }\n\n className(): string {\n return 'Modal--medium VotesModal';\n }\n\n title(): Mithril.Children {\n return app.translator.trans('fof-polls.forum.votes_modal.title');\n }\n\n content(): Mithril.Children {\n const options = this.attrs.poll.options() as PollOption[];\n return
{this.loading ? : options.map(this.optionContent.bind(this))}
;\n }\n\n optionContent(opt: PollOption): Mithril.Children {\n const votes = (this.attrs.poll.votes() || []).filter((v) => opt.id() === v!.option()!.id()) as PollVote[];\n\n return (\n
\n

{opt.answer()! + ':'}

\n\n {votes.length ? (\n
{votes.map(this.voteContent.bind(this))}
\n ) : (\n

{app.translator.trans('fof-polls.forum.modal.no_voters')}

\n )}\n
\n );\n }\n\n voteContent(vote: PollVote): Mithril.Children {\n const user = vote.user() as User;\n const attrs = user && { href: app.route.user(user) };\n\n return (\n \n {avatar(user)} {username(user)}\n \n );\n }\n}\n","import type Mithril from 'mithril';\nimport Component, { ComponentAttrs } from 'flarum/common/Component';\n\ninterface PollImageAttrs extends ComponentAttrs {\n imageUrl: string;\n alt: string | null;\n}\n\nexport default class PollImage extends Component {\n view(): Mithril.Children {\n return (\n
\n {this.attrs.alt}\n
\n );\n }\n}\n","import app from 'flarum/forum/app';\nimport Component, { ComponentAttrs } from 'flarum/common/Component';\nimport PollListItem from './PollListItem';\nimport Button from 'flarum/common/components/Button';\nimport LoadingIndicator from 'flarum/common/components/LoadingIndicator';\nimport Placeholder from 'flarum/common/components/Placeholder';\nimport classList from 'flarum/common/utils/classList';\nimport PollListState from '../../states/PollListState';\n\nexport interface PollListAttrs extends ComponentAttrs {\n state: PollListState;\n}\n\n/**\n * The `PollList` component displays a list of polls.\n */\nexport default class PollList extends Component {\n view() {\n const state = this.attrs.state;\n const params = state.getParams();\n const isLoading = state.isInitialLoading() || state.isLoadingNext();\n\n let loading;\n\n if (isLoading) {\n loading = ;\n } else if (state.hasNext()) {\n loading = (\n \n );\n }\n\n if (state.isEmpty()) {\n const text = app.translator.trans('fof-polls.forum.polls_list.empty_text');\n return (\n
\n \n
\n );\n }\n\n return (\n
\n
    \n {state.getPages().map((pg) => {\n return pg.items.map((poll) => (\n
  • \n \n
  • \n ));\n })}\n
\n
{loading}
\n
\n );\n }\n}\n","import type Mithril from 'mithril';\nimport app from 'flarum/forum/app';\nimport Component, { ComponentAttrs } from 'flarum/common/Component';\nimport type { PollListParams } from '../../states/PollListState';\nimport SubtreeRetainer from 'flarum/common/utils/SubtreeRetainer';\nimport classList from 'flarum/common/utils/classList';\nimport Dropdown from 'flarum/common/components/Dropdown';\nimport Link from 'flarum/common/components/Link';\nimport highlight from 'flarum/common/helpers/highlight';\nimport slidable from 'flarum/forum/utils/slidable';\nimport icon from 'flarum/common/helpers/icon';\nimport abbreviateNumber from 'flarum/common/utils/abbreviateNumber';\nimport Poll from '../../models/Poll';\nimport PollControls from '../../utils/PollControls';\nimport ItemList from 'flarum/common/utils/ItemList';\nimport listItems from 'flarum/common/helpers/listItems';\nimport PollViewPage from '../PollViewPage';\n\nexport interface IPollListItemAttrs extends ComponentAttrs {\n poll: Poll;\n params: PollListParams;\n}\n\n/**\n * The `PollListItem` component shows a single poll in the\n * poll list.\n */\nexport default class PollListItem extends Component {\n /**\n * Ensures that the poll will not be redrawn\n * unless new data comes in.\n */\n subtree!: SubtreeRetainer;\n poll!: Poll;\n\n highlightRegExp?: RegExp;\n\n oninit(vnode: Mithril.Vnode) {\n super.oninit(vnode);\n\n this.poll = this.attrs.poll;\n\n this.subtree = new SubtreeRetainer(\n () => this.poll.freshness,\n () => {\n const time = app.session.user && app.session.user.markedAllAsReadAt();\n return time && time.getTime();\n },\n () => this.active()\n );\n }\n\n elementAttrs() {\n return {\n className: classList('PollListItem', {\n active: this.active(),\n 'PollListItem--hidden': this.poll.isHidden(),\n Slidable: 'ontouchstart' in window,\n }),\n };\n }\n\n view() {\n const controls = PollControls.controls(this.poll, this).toArray();\n const attrs = this.elementAttrs();\n\n return (\n
\n {this.controlsView(controls)}\n {this.contentView()}\n {this.slidableUnderneathView()}\n
\n );\n }\n\n controlsView(controls: Mithril.ChildArray): Mithril.Children {\n return (\n !!controls.length && (\n \n {controls}\n \n )\n );\n }\n\n slidableUnderneathView(): Mithril.Children {\n const isUnread = this.poll.isUnread();\n\n return (\n \n {icon('fas fa-check')}\n \n );\n }\n\n contentView(): Mithril.Children {\n // const isUnread = this.poll.isUnread();\n // const isRead = this.poll.isRead();\n\n return (\n //
\n
{this.mainView()}
\n );\n }\n\n mainView(): Mithril.Children {\n return (\n \n

{highlight(this.poll.question(), this.highlightRegExp)}

\n {this.poll.subtitle() &&

{this.poll.subtitle()}

}\n
    {listItems(this.infoItems().toArray())}
\n \n );\n }\n\n // infoView() {\n // return (\n //
\n // {this.poll.subtitle() &&

{this.poll.subtitle()}

}\n //
    {listItems(this.infoItems().toArray())}
\n //
\n // );\n // }\n\n oncreate(vnode: Mithril.VnodeDOM) {\n super.oncreate(vnode);\n\n // If we're on a touch device, set up the discussion row to be slidable.\n // This allows the user to drag the row to either side of the screen to\n // reveal controls.\n if ('ontouchstart' in window) {\n const slidableInstance = slidable(this.element);\n\n this.$('.PollListItem-controls').on('hidden.bs.dropdown', () => slidableInstance.reset());\n }\n }\n\n onbeforeupdate(vnode: Mithril.VnodeDOM) {\n super.onbeforeupdate(vnode);\n\n return this.subtree.needsRebuild();\n }\n\n /**\n * Determine whether or not the discussion is currently being viewed.\n */\n active() {\n return app.current.matches(PollViewPage, { poll: this.poll });\n }\n\n /**\n * Mark the poll as read.\n */\n markAsRead() {\n if (this.poll.isUnread()) {\n this.poll.save({ lastVotedNumber: this.poll.voteCount() });\n m.redraw();\n }\n }\n\n infoItems(): ItemList {\n const items = new ItemList();\n const active = !this.poll.hasEnded();\n const activeView = this.poll.endDate()\n ? [\n icon('fas fa-clock'),\n ' ',\n active\n ? app.translator.trans('fof-polls.forum.days_remaining', { time: dayjs(this.poll.endDate()).fromNow() })\n : app.translator.trans('fof-polls.forum.poll_ended'),\n ]\n : [icon('fas fa-infinity'), ' ', app.translator.trans('fof-polls.forum.poll_never_ends')];\n\n items.add('active', {activeView});\n\n const voteCount = this.poll.voteCount();\n if (voteCount !== undefined) {\n items.add(\n 'voteCount',\n \n {icon('fas fa-poll fa-fw')}\n {[\n ' ',\n app.translator.trans('fof-polls.forum.polls_count', {\n count: abbreviateNumber(voteCount),\n }),\n ]}\n ,\n 70\n );\n }\n\n return items;\n }\n}\n","import app from 'flarum/forum/app';\nimport type Mithril from 'mithril';\nimport Component, { ComponentAttrs } from 'flarum/common/Component';\nimport PollOptionModel from '../../models/PollOption';\nimport PollState from '../../states/PollState';\nimport Tooltip, { TooltipAttrs } from 'flarum/common/components/Tooltip';\nimport icon from 'flarum/common/helpers/icon';\nimport classList from 'flarum/common/utils/classList';\n\ninterface PollOptionAttrs extends ComponentAttrs {\n option: PollOptionModel;\n name: String;\n state: PollState;\n}\n\nexport default class PollOption extends Component {\n view(): Mithril.Children {\n const option = this.attrs.option;\n const state = this.attrs.state;\n const hasVoted = state.hasVoted();\n const totalVotes = state.overallVoteCount();\n const votes = option.voteCount();\n const voted = state.hasVotedFor(option);\n const percent = totalVotes > 0 ? Math.round((votes / totalVotes) * 100) : 0;\n\n // @ts-ignore\n const poll = state.poll;\n\n // isNaN(null) is false, so we have to check type directly now that API always returns the field\n const canSeeVoteCount = typeof votes === 'number';\n const isDisabled = state.loadingOptions || (hasVoted && !poll.canChangeVote());\n const width = canSeeVoteCount ? percent : (Number(voted) / (poll.myVotes()?.length || 1)) * 100;\n\n const bar = (\n
\n {state.showCheckMarks && (\n \n )}\n\n
\n {option.answer()}\n {voted && !state.showCheckMarks && icon('fas fa-check-circle', { className: 'PollAnswer-check' })}\n {canSeeVoteCount && {percent}%}\n
\n\n {option.imageUrl() ? {option.answer()} : null}\n
\n );\n\n return (\n
\n {canSeeVoteCount ? (\n \n {bar}\n \n ) : (\n bar\n )}\n
\n );\n }\n\n /**\n * Attempting to use the `tooltipVisible` attr on the Tooltip component set to 'false' when no vote count\n * caused the tooltip to break on click. This is a workaround to hide the tooltip when no vote count is available,\n * called on 'onremove' of the Tooltip component. It doesn't always work as intended either, but it does the job.\n */\n hideOptionTooltip(vnode: Mithril.Vnode) {\n vnode.attrs.tooltipVisible = false;\n\n // @ts-ignore\n vnode.state.updateVisibility();\n }\n}\n","import type Mithril from 'mithril';\nimport Component, { ComponentAttrs } from 'flarum/common/Component';\nimport PollOption from './PollOption';\nimport PollOptionModel from '../../models/PollOption';\nimport ItemList from 'flarum/common/utils/ItemList';\nimport PollState from '../../states/PollState';\n\ninterface PollOptionsAttrs extends ComponentAttrs {\n options: PollOptionModel[];\n name: String;\n state: PollState;\n}\n\nexport default class PollOptions extends Component {\n view(): Mithril.Children {\n return
{this.pollOptions().toArray()}
;\n }\n\n pollOptions(): ItemList {\n const items = new ItemList();\n\n this.attrs.options.forEach((option: PollOptionModel): void => {\n items.add('option' + option.id(), this.createOptionView(option));\n });\n\n return items;\n }\n\n createOptionView(option: PollOptionModel): Mithril.Children {\n return ;\n }\n}\n","import type Mithril from 'mithril';\nimport app from 'flarum/forum/app';\nimport Component, { ComponentAttrs } from 'flarum/common/Component';\nimport Button from 'flarum/common/components/Button';\nimport PollState from '../../states/PollState';\n\ninterface PollSubmitButtonAttrs extends ComponentAttrs {\n state: PollState;\n}\n\nexport default class PollSubmitButton extends Component {\n view(): Mithril.Children {\n const state = this.attrs.state;\n return (\n this.pollButtonSubmit(state, event)}\n disabled={!state.hasSelectedOptions()}\n >\n {app.translator.trans('fof-polls.forum.poll.submit_button')}\n \n );\n }\n\n /**\n * Event handler for submit button being clicked\n */\n\n pollButtonSubmit(state: PollState, event: Event): void {\n state.onsubmit();\n }\n}\n","import Component, { ComponentAttrs } from 'flarum/common/Component';\nimport type Mithril from 'mithril';\nimport app from 'flarum/forum/app';\nimport Button from 'flarum/common/components/Button';\nimport Switch from 'flarum/common/components/Switch';\nimport ItemList from 'flarum/common/utils/ItemList';\nimport Stream from 'flarum/common/utils/Stream';\nimport extractText from 'flarum/common/utils/extractText';\nimport FormError from './form/FormError';\nimport PollFormState from '../states/PollFormState';\nimport PollControls from '../utils/PollControls';\nimport PollModel from '../models/Poll';\nimport PollOption from '../models/PollOption';\nimport UploadPollImageButton from './UploadPollImageButton';\nimport UploadPollOptionImageButton from './UploadPollOptionImageButton';\nimport Tooltip from 'flarum/common/components/Tooltip';\n\ninterface PollFormAttrs extends ComponentAttrs {\n poll: PollModel;\n onsubmit: (data: object, state: PollFormState) => Promise;\n}\n\nexport default class PollForm extends Component {\n protected options: PollOption[] = [];\n protected optionAnswers: Stream[] = [];\n protected optionImage: Stream[] = [];\n protected question: Stream;\n protected subtitle: Stream;\n protected image: Stream;\n protected imageAlt: Stream;\n protected endDate: Stream;\n protected publicPoll: Stream;\n protected allowMultipleVotes: Stream;\n protected hideVotes: Stream;\n protected allowChangeVote: Stream;\n protected maxVotes: Stream;\n protected datepickerMinDate: string = '';\n\n oninit(vnode: Mithril.Vnode): void {\n super.oninit(vnode);\n this.state = new PollFormState(this.attrs.poll);\n\n // state handles poll initialization\n const poll = this.state.poll;\n\n this.options = (poll.tempOptions ?? poll.options()) as PollOption[];\n this.optionAnswers = this.options.map((o) => Stream(o.answer()));\n this.optionImage = this.options.map((o) => Stream(o.image()));\n\n this.question = Stream(poll.question());\n this.subtitle = Stream(poll.subtitle());\n this.image = Stream(poll.image());\n this.imageAlt = Stream(poll.imageAlt());\n this.endDate = Stream(this.formatDate(poll.endDate()));\n this.publicPoll = Stream(poll.publicPoll());\n this.allowMultipleVotes = Stream(poll.allowMultipleVotes());\n this.hideVotes = Stream(poll.hideVotes());\n this.allowChangeVote = Stream(poll.allowChangeVote());\n this.maxVotes = Stream(poll.maxVotes() || 0);\n\n // Set minimum date for datepicker to current date\n this.datepickerMinDate = this.formatDate() as string;\n\n // Replace minimum of 'today' for poll end date only if the poll is not already closed\n if (this.endDate() && dayjs(poll.endDate).isAfter(dayjs())) {\n // We know that endDate is set, so we can safely cast the result to string\n this.datepickerMinDate = this.formatDate(poll.endDate()) as string;\n }\n }\n\n view(): Mithril.Children {\n return (\n
\n
{this.fields().toArray()}
\n
\n );\n }\n\n fields(): ItemList {\n const items = new ItemList();\n\n items.add(\n 'question',\n
\n \n\n \n
,\n 100\n );\n\n items.add(\n 'subtitle',\n
\n \n\n \n
,\n 95\n );\n\n items.add(\n 'poll_image',\n
\n \n

{app.translator.trans('fof-polls.forum.modal.poll_image.help')}

\n \n
,\n 90\n );\n\n if (this.image()) {\n items.add(\n 'poll_image_alt',\n
\n \n\n \n\n

{app.translator.trans('fof-polls.forum.modal.poll_image.alt_help_text')}

\n
,\n 90\n );\n }\n\n items.add(\n 'answers',\n
\n \n\n {this.displayOptions()}\n\n \n
,\n 80\n );\n\n items.add(\n 'date',\n
\n \n\n
\n \n {Button.component({\n className: 'Button PollModal--button Button--icon',\n icon: 'fas fa-times',\n onclick: this.endDate.bind(this, null),\n })}\n
\n\n {this.endDate() && (\n

\n \n  \n {dayjs(this.endDate()).isBefore(dayjs())\n ? app.translator.trans('fof-polls.forum.poll_ended')\n : app.translator.trans('fof-polls.forum.days_remaining', { time: dayjs(this.endDate()).fromNow() })}\n

\n )}\n
,\n 40\n );\n\n items.add(\n 'public',\n
\n {Switch.component(\n {\n state: this.publicPoll() || false,\n onchange: this.publicPoll,\n },\n app.translator.trans('fof-polls.forum.modal.public_poll_label')\n )}\n
,\n 20\n );\n\n items.add(\n 'hide-votes',\n
\n \n {app.translator.trans('fof-polls.forum.modal.hide_votes_label')}\n \n
,\n 20\n );\n\n items.add(\n 'allow-change-vote',\n
\n \n {app.translator.trans('fof-polls.forum.modal.allow_change_vote_label')}\n \n
,\n 20\n );\n\n items.add(\n 'allow-multiple-votes',\n
\n {Switch.component(\n {\n state: this.allowMultipleVotes() || false,\n onchange: this.allowMultipleVotes,\n },\n app.translator.trans('fof-polls.forum.modal.allow_multiple_votes_label')\n )}\n
,\n 15\n );\n\n if (this.allowMultipleVotes()) {\n items.add(\n 'max-votes',\n
\n \n\n \n\n

{app.translator.trans('fof-polls.forum.modal.max_votes_help')}

\n
,\n 15\n );\n }\n\n items.add(\n 'submit',\n
\n \n {this.state.poll.exists && (\n \n {app.translator.trans('fof-polls.forum.modal.delete')}\n \n )}\n
,\n -10\n );\n\n return items;\n }\n\n displayOptions() {\n return this.options.map((option, i) => (\n
\n
{this.createOptionFields(option, i).toArray()}
\n {i >= 2\n ? Button.component({\n type: 'button',\n className: 'Button PollModal--button Button--icon',\n icon: 'fas fa-minus',\n onclick: i >= 2 ? this.removeOption.bind(this, i) : '',\n })\n : ''}\n
\n ));\n }\n\n createOptionFields(option: PollOption, i: number): ItemList {\n const items = new ItemList();\n const number = i + 1;\n\n items.add(\n 'answer',\n \n );\n\n if (app.forum.attribute('allowPollOptionImage')) {\n items.add(\n 'image',\n
\n \n this.optionImage[i](fileName)}\n />\n
\n );\n }\n\n return items;\n }\n\n addOption() {\n const max = Math.max(app.forum.attribute('pollMaxOptions'), 2);\n\n if (this.options.length < max) {\n this.options.push(app.store.createRecord('poll_options'));\n this.optionAnswers.push(Stream(''));\n this.optionImage.push(Stream(''));\n } else {\n alert(extractText(app.translator.trans('fof-polls.forum.modal.max', { max })));\n }\n }\n\n removeOption(i: number): void {\n this.options.splice(i, 1);\n this.optionAnswers.splice(i, 1);\n this.optionImage.splice(i, 1);\n }\n\n data(): object {\n if (this.question() === '') {\n throw new FormError(app.translator.trans('fof-polls.forum.modal.include_question'));\n }\n\n if (this.options.length < 2) {\n throw new FormError(app.translator.trans('fof-polls.forum.modal.min'));\n }\n\n const pollExists = this.state.poll.exists;\n const options = this.options.map((option, i) => {\n option.pushAttributes({\n answer: this.optionAnswers[i](),\n image: this.optionImage[i](),\n });\n\n return pollExists ? option.data : option.data.attributes;\n });\n\n return {\n question: this.question(),\n subtitle: this.subtitle(),\n pollImage: this.image(),\n imageAlt: this.imageAlt(),\n endDate: this.dateToTimestamp(this.endDate()) ?? false,\n publicPoll: this.publicPoll(),\n hideVotes: this.hideVotes(),\n allowChangeVote: this.allowChangeVote(),\n allowMultipleVotes: this.allowMultipleVotes(),\n maxVotes: this.maxVotes(),\n options,\n };\n }\n\n async onsubmit(event: Event) {\n event.preventDefault();\n\n try {\n await this.attrs.onsubmit(this.data(), this.state);\n } catch (error) {\n if (error instanceof FormError) {\n app.alerts.show({ type: 'error' }, error.message);\n } else {\n console.error(error);\n // Show error alert\n app.alerts.show({ type: 'error' }, app.translator.trans('fof-polls.forum.modal.error'));\n }\n }\n }\n\n async delete(): Promise {\n this.state.loading = true;\n try {\n await PollControls.deleteAction(this.state.poll);\n this.state.deleting = true;\n } finally {\n this.state.loading = false;\n m.redraw();\n }\n }\n\n formatDate(date: Date | string | false | undefined | null = undefined, def: Date | false = false): string | false {\n const dayjsDate = dayjs(date);\n\n if (date === false || !dayjsDate.isValid()) return def !== false ? this.formatDate(def) : false;\n\n return dayjsDate.format('YYYY-MM-DDTHH:mm');\n }\n\n dateToTimestamp(date: Date | false): string | null {\n const dayjsDate = dayjs(date);\n\n if (!date || !dayjsDate.isValid()) return null;\n\n return dayjsDate.format();\n }\n\n pollImageUploadSuccess(fileName: string | null | undefined): void {\n this.image(fileName);\n }\n}\n","import Component, { ComponentAttrs } from 'flarum/common/Component';\nimport PollListState from '../states/PollListState';\nimport type Mithril from 'mithril';\nimport ItemList from 'flarum/common/utils/ItemList';\nimport PollShowcaseItem from './PollShowcaseItem';\nimport Placeholder from 'flarum/common/components/Placeholder';\nimport app from 'flarum/forum/app';\n\nexport interface PollListAttrs extends ComponentAttrs {\n state: PollListState;\n}\n\nexport default class PollShowcase extends Component {\n oninit(vnode: Mithril.Vnode) {\n super.oninit(vnode);\n\n this.attrs.state.refresh();\n }\n\n view(): Mithril.Children {\n return (\n
\n
\n

{app.translator.trans('fof-polls.forum.showcase.active-polls')}

\n {this.showcaseItems().toArray()}\n {this.showcaseItems().toArray().length === 0 && }\n
\n
\n

{app.translator.trans('fof-polls.forum.showcase.ended-polls')}

\n {this.endedItems().toArray()}\n {this.endedItems().toArray().length === 0 && }\n
\n
\n );\n }\n\n showcaseItems(): ItemList {\n const items = new ItemList();\n\n this.attrs.state.getPages().map((page) => {\n page.items.map((poll) => {\n if (!poll.hasEnded()) {\n items.add('poll-active-' + poll.id(), );\n }\n });\n });\n\n return items;\n }\n\n endedItems(): ItemList {\n const items = new ItemList();\n\n this.attrs.state.getPages().map((page) => {\n page.items.map((poll) => {\n if (poll.hasEnded()) {\n items.add('poll-ended-' + poll.id(), );\n }\n });\n });\n\n return items;\n }\n}\n","import Component, { ComponentAttrs } from 'flarum/common/Component';\nimport Poll from '../models/Poll';\nimport type Mithril from 'mithril';\nimport PollView from './PollView';\n\nexport interface PollShowcaseItemAttrs extends ComponentAttrs {\n poll: Poll;\n}\n\nexport default class PollShowcaseItem extends Component {\n poll!: Poll;\n\n oninit(vnode: Mithril.Vnode) {\n super.oninit(vnode);\n\n this.poll = this.attrs.poll;\n }\n\n view() {\n return (\n
\n \n
\n );\n }\n}\n","import Mithril from 'mithril';\nimport Component, { ComponentAttrs } from 'flarum/common/Component';\nimport app from 'flarum/forum/app';\nimport PollOptions from './Poll/PollOptions';\nimport PollImage from './Poll/PollImage';\nimport PollModel from '../models/Poll';\nimport PollState from '../states/PollState';\nimport Button from 'flarum/common/components/Button';\nimport ItemList from 'flarum/common/utils/ItemList';\nimport PollControls from '../utils/PollControls';\nimport Dropdown from 'flarum/common/components/Dropdown';\nimport PollSubmitButton from './Poll/PollSubmitButton';\nimport { slug } from 'flarum/common/utils/string';\nimport classList from 'flarum/common/utils/classList';\n\ninterface PollAttrs extends ComponentAttrs {\n poll: PollModel;\n}\n\nexport default class PollView extends Component {\n state!: PollState;\n\n oninit(vnode: Mithril.Vnode) {\n super.oninit(vnode);\n this.state = new PollState(this.attrs.poll);\n }\n\n oncreate(vnode: Mithril.Vnode) {\n super.oncreate(vnode);\n\n this.preventClose = this.preventClose.bind(this);\n window.addEventListener('beforeunload', this.preventClose);\n }\n\n onremove(vnode: Mithril.Vnode) {\n super.onremove(vnode);\n\n window.removeEventListener('beforeunload', this.preventClose);\n }\n\n view(): Mithril.Children {\n const poll = this.attrs.poll;\n const state = this.state;\n const controls = PollControls.controls(poll, this);\n\n controls.add(\n 'view',\n \n );\n\n return (\n
\n {this.controlsView(controls.toArray())}\n
{this.createMainView().toArray()}
\n
\n );\n }\n\n createMainView(): ItemList {\n const items = new ItemList();\n const poll = this.attrs.poll;\n\n items.add('header',
{this.createPollHeader().toArray()}
);\n items.add('content',
{this.createPollContent().toArray()}
);\n items.add('footer',
{this.createPollFooter().toArray()}
);\n\n return items;\n }\n\n createPollHeader(): ItemList {\n const items = new ItemList();\n const poll = this.attrs.poll;\n\n items.add('title',

{poll.question()}

);\n if (poll.subtitle()) items.add('subtitle',

{poll.subtitle()}

);\n\n return items;\n }\n\n createPollContent(): ItemList {\n const items = new ItemList();\n const poll = this.attrs.poll;\n\n if (poll.imageUrl()) {\n items.add('image', );\n }\n\n items.add('form',
{this.createFormItems().toArray()}
);\n\n return items;\n }\n\n createPollFooter(): ItemList {\n const items = new ItemList();\n const state = this.state;\n\n const infoItems = this.infoItems(state.getMaxVotes());\n\n items.add(\n 'sticky',\n
\n {!infoItems.isEmpty() &&
{infoItems.toArray()}
}\n {state.showButton() && }\n
\n );\n\n return items;\n }\n\n createFormItems(): ItemList {\n const items = new ItemList();\n const poll = this.attrs.poll;\n const state = this.state;\n const questionSlug = slug(poll.question());\n\n items.add(\n 'elements',\n
\n {poll.question()}\n \n
\n );\n\n return items;\n }\n\n controlsView(controls: Mithril.ChildArray): Mithril.Children {\n return (\n !!controls.length && (\n \n {controls}\n \n )\n );\n }\n\n infoItems(maxVotes: number) {\n const items = new ItemList();\n const poll = this.attrs.poll;\n\n if (app.session.user && !poll.canVote() && !poll.hasEnded()) {\n items.add(\n 'no-permission',\n \n \n {app.translator.trans('fof-polls.forum.no_permission')}\n \n );\n }\n\n if (poll.endDate()) {\n items.add(\n 'end-date',\n \n \n {poll.hasEnded()\n ? app.translator.trans('fof-polls.forum.poll_ended')\n : app.translator.trans('fof-polls.forum.days_remaining', { time: dayjs(poll.endDate()).fromNow() })}\n \n );\n }\n\n if (poll.canVote()) {\n items.add(\n 'max-votes',\n \n \n {app.translator.trans('fof-polls.forum.max_votes_allowed', { max: maxVotes })}\n \n );\n\n if (!poll.canChangeVote()) {\n items.add(\n 'cannot-change-vote',\n \n \n {app.translator.trans('fof-polls.forum.poll.cannot_change_vote')}\n \n );\n }\n }\n\n return items;\n }\n\n /**\n * Alert before navigating away using browser's 'beforeunload' event\n */\n preventClose = (e: Event): boolean | void => {\n if (this.state.hasSelectedOptions()) {\n e.preventDefault();\n return true;\n }\n };\n}\n","import type Mithril from 'mithril';\nimport app from 'flarum/forum/app';\nimport PollModel from '../models/Poll';\nimport PollView from './PollView';\nimport { AbstractPollPage } from './AbstractPollPage';\nimport ItemList from 'flarum/common/utils/ItemList';\n\nexport default class PollViewPage extends AbstractPollPage {\n oninit(vnode: Mithril.Vnode) {\n super.oninit(vnode);\n\n if (!app.forum.attribute('globalPollsEnabled')) {\n m.route.set('/');\n return;\n }\n\n const editId = m.route.param('id');\n this.poll = app.store.getById('poll', editId);\n\n if (!this.poll) {\n this.loading = true;\n\n app.store.find('fof/polls', editId).then((item) => {\n this.poll = item;\n this.loading = false;\n app.setTitle(this.poll.question());\n m.redraw();\n });\n }\n }\n\n contentItems(): ItemList {\n const items = super.contentItems();\n\n if (!this.loading) {\n items.add('poll', );\n }\n\n return items;\n }\n}\n","import type Mithril from 'mithril';\nimport app from 'flarum/forum/app';\nimport listItems from 'flarum/common/helpers/listItems';\nimport ItemList from 'flarum/common/utils/ItemList';\nimport Page, { IPageAttrs } from 'flarum/common/components/Page';\nimport IndexPage from 'flarum/forum/components/IndexPage';\nimport PollList from './Poll/PollList';\nimport LogInModal from 'flarum/forum/components/LogInModal';\nimport extractText from 'flarum/common/utils/extractText';\nimport PollListState from '../states/PollListState';\nimport Button from 'flarum/common/components/Button';\nimport SelectDropdown from 'flarum/common/components/SelectDropdown';\nimport LoadingIndicator from 'flarum/common/components/LoadingIndicator';\nimport PollModel from '../models/Poll';\nimport PollView from './PollView';\nimport { AbstractPollPage } from './AbstractPollPage';\n\nexport default class PollsPage extends AbstractPollPage {\n oninit(vnode: Mithril.Vnode) {\n super.oninit(vnode);\n\n if (!app.forum.attribute('globalPollsEnabled')) {\n m.route.set('/');\n return;\n }\n\n this.state = new PollListState({\n sort: m.route.param('sort'),\n filter: m.route.param('filter'),\n });\n\n this.state.refresh();\n\n app.setTitle(extractText(app.translator.trans('fof-polls.forum.page.nav')));\n }\n\n view(): Mithril.Children {\n if (this.loading) {\n return ;\n }\n\n if (this.poll) {\n return (\n
\n
\n \n
\n
\n );\n }\n\n return (\n
\n {super.hero()}\n
\n
\n \n
\n
\n
    {listItems(this.viewItems().toArray())}
\n
    {listItems(this.actionItems().toArray())}
\n
\n \n
\n
\n
\n
\n );\n }\n\n sidebarItems(): ItemList {\n const items = new ItemList();\n const canStartPoll = app.forum.attribute('canStartGlobalPolls');\n\n items.add(\n 'newGlobalPoll',\n {\n this.newPollAction();\n }}\n disabled={!canStartPoll}\n >\n {app.translator.trans(`fof-polls.forum.poll.${canStartPoll ? 'start_poll_button' : 'cannot_start_poll_button'}`)}\n \n );\n\n items.add(\n 'nav',\n \n {this.navItems().toArray()}\n \n );\n\n return items;\n }\n\n actionItems(): ItemList {\n const items = new ItemList();\n\n items.add(\n 'refresh',\n Button.component({\n title: app.translator.trans('fof-polls.forum.page.refresh_tooltip'),\n icon: 'fas fa-sync',\n className: 'Button Button--icon',\n onclick: () => {\n this.state.refresh();\n },\n })\n );\n\n return items;\n }\n\n viewItems() {\n return IndexPage.prototype.viewItems();\n }\n\n navItems() {\n return IndexPage.prototype.navItems();\n }\n\n /**\n * Change to create new poll page\n */\n newPollAction(): void {\n if (!app.session.user) {\n app.modal.show(LogInModal);\n return;\n }\n\n m.route.set(app.route('fof.polls.compose'));\n }\n}\n","import app from 'flarum/forum/app';\nimport { IPageAttrs } from 'flarum/common/components/Page';\nimport ItemList from 'flarum/common/utils/ItemList';\nimport Mithril from 'mithril';\nimport PollListState from '../states/PollListState';\nimport extractText from 'flarum/common/utils/extractText';\nimport Button from 'flarum/common/components/Button';\nimport LogInModal from 'flarum/forum/components/LogInModal';\nimport { AbstractPollPage } from './AbstractPollPage';\nimport PollShowcase from './PollShowcase';\n\nexport default class PollsShowcasePage extends AbstractPollPage {\n oninit(vnode: Mithril.Vnode) {\n super.oninit(vnode);\n\n if (!app.forum.attribute('globalPollsEnabled')) {\n m.route.set('/');\n return;\n }\n\n this.state = new PollListState({\n sort: m.route.param('sort'),\n filter: m.route.param('filter'),\n include: ['options', 'votes', 'myVotes', 'myVotes.option'],\n });\n\n this.state.refresh();\n\n app.setTitle(extractText(app.translator.trans('fof-polls.forum.page.nav')));\n }\n\n contentItems(): ItemList {\n const items = super.contentItems();\n\n if (!this.loading) {\n items.add('poll-showcase', );\n }\n\n return items;\n }\n\n sidebarItems(): ItemList {\n const items = super.sidebarItems();\n const canStartPoll = app.forum.attribute('canStartGlobalPolls');\n\n if (canStartPoll) {\n items.remove('newDiscussion');\n items.add(\n 'newGlobalPoll',\n {\n this.newPollAction();\n }}\n disabled={!canStartPoll}\n >\n {app.translator.trans(`fof-polls.forum.poll.${canStartPoll ? 'start_poll_button' : 'cannot_start_poll_button'}`)}\n ,\n 100\n );\n }\n\n return items;\n }\n\n newPollAction(): void {\n if (!app.session.user) {\n app.modal.show(LogInModal);\n return;\n }\n\n m.route.set(app.route('fof.polls.compose'));\n }\n}\n","import app from 'flarum/forum/app';\nimport Component, { ComponentAttrs } from 'flarum/common/Component';\nimport Button from 'flarum/common/components/Button';\nimport LogInModal from 'flarum/forum/components/LogInModal';\nimport ListVotersModal from './ListVotersModal';\nimport classList from 'flarum/common/utils/classList';\nimport ItemList from 'flarum/common/utils/ItemList';\nimport Tooltip from 'flarum/common/components/Tooltip';\nimport icon from 'flarum/common/helpers/icon';\nimport EditPollModal from './EditPollModal';\nimport Poll from '../models/Poll';\nimport type Mithril from 'mithril';\nimport PollOption from '../models/PollOption';\nimport Post from 'flarum/common/models/Post';\nimport extractText from 'flarum/common/utils/extractText';\n\nexport interface PostPollAttrs extends ComponentAttrs {\n poll: Poll;\n post?: Post;\n}\n\nexport default class PostPoll extends Component {\n loadingOptions: boolean = false;\n useSubmitUI!: boolean;\n pendingSubmit: boolean = false;\n pendingOptions: any;\n\n oninit(vnode: Mithril.Vnode) {\n super.oninit(vnode);\n\n this.useSubmitUI = !this.attrs.poll?.canChangeVote() && this.attrs.poll?.allowMultipleVotes();\n this.pendingOptions = null;\n }\n\n oncreate(vnode: Mithril.Vnode) {\n super.oncreate(vnode);\n\n this.preventClose = this.preventClose.bind(this);\n window.addEventListener('beforeunload', this.preventClose);\n }\n\n onremove(vnode: Mithril.Vnode) {\n super.onremove(vnode);\n\n window.removeEventListener('beforeunload', this.preventClose);\n }\n\n view() {\n const poll = this.attrs.poll;\n const options = poll.options() || [];\n let maxVotes = poll.allowMultipleVotes() ? poll.maxVotes() : 1;\n\n if (maxVotes === 0) maxVotes = options.length;\n\n const infoItems = this.infoItems(maxVotes);\n\n return (\n
\n
\n
\n

{poll.question()}

\n {poll.subtitle() &&

{poll.subtitle()}

}\n
\n\n
\n {poll.canSeeVoters() && (\n \n
\n
\n\n
\n
{options.map(this.viewOption.bind(this))}
\n\n
\n {!infoItems.isEmpty() &&
{infoItems.toArray()}
}\n\n {this.useSubmitUI && this.pendingSubmit && (\n \n )}\n
\n
\n
\n );\n }\n\n infoItems(maxVotes: number) {\n const items = new ItemList();\n const poll = this.attrs.poll;\n const hasVoted = poll.myVotes()?.length > 0;\n\n if (app.session.user && !poll.canVote() && !poll.hasEnded()) {\n items.add(\n 'no-permission',\n \n \n {app.translator.trans('fof-polls.forum.no_permission')}\n \n );\n }\n\n if (poll.endDate()) {\n items.add(\n 'end-date',\n \n \n {poll.hasEnded()\n ? app.translator.trans('fof-polls.forum.poll_ended')\n : app.translator.trans('fof-polls.forum.days_remaining', { time: dayjs(poll.endDate()).fromNow() })}\n \n );\n }\n\n if (poll.canVote()) {\n items.add(\n 'max-votes',\n \n \n {app.translator.trans('fof-polls.forum.max_votes_allowed', { max: maxVotes })}\n \n );\n\n if (!poll.canChangeVote()) {\n items.add(\n 'cannot-change-vote',\n \n \n {app.translator.trans('fof-polls.forum.poll.cannot_change_vote')}\n \n );\n }\n }\n\n return items;\n }\n\n viewOption(opt: PollOption) {\n const poll = this.attrs.poll;\n const hasVoted = poll.myVotes()?.length > 0;\n const totalVotes = poll.voteCount();\n\n const voted = this.pendingOptions ? this.pendingOptions.has(opt.id()) : poll.myVotes()?.some?.((vote) => vote.option() === opt);\n const votes = opt.voteCount();\n const percent = totalVotes > 0 ? Math.round((votes / totalVotes) * 100) : 0;\n\n // isNaN(null) is false, so we have to check type directly now that API always returns the field\n const canSeeVoteCount = typeof votes === 'number';\n const isDisabled = this.loadingOptions || (hasVoted && !poll.canChangeVote());\n const width = canSeeVoteCount ? percent : (Number(voted) / (poll.myVotes()?.length || 1)) * 100;\n\n const showCheckmark = !app.session.user || (!poll.hasEnded() && poll.canVote() && (!hasVoted || poll.canChangeVote()));\n\n const bar = (\n
\n {showCheckmark && (\n \n )}\n\n
\n {opt.answer()}\n {voted && !showCheckmark && icon('fas fa-check-circle', { className: 'PollAnswer-check' })}\n {canSeeVoteCount && {percent}%}\n
\n\n {opt.imageUrl() ? {opt.answer()} : null}\n
\n );\n\n return (\n \n {canSeeVoteCount ? (\n \n {bar}\n \n ) : (\n bar\n )}\n
\n );\n }\n\n changeVote(option: PollOption, evt: Event) {\n if (!app.session.user) {\n app.modal.show(LogInModal);\n evt.target.checked = false;\n return;\n }\n\n const optionIds = this.pendingOptions || new Set(this.attrs.poll.myVotes().map?.((v) => v.option().id()));\n const isUnvoting = optionIds.delete(option.id());\n const allowsMultiple = this.attrs.poll.allowMultipleVotes();\n\n if (!allowsMultiple) {\n optionIds.clear();\n }\n\n if (!isUnvoting) {\n optionIds.add(option.id());\n }\n\n if (this.useSubmitUI) {\n this.pendingOptions = optionIds.size ? optionIds : null;\n this.pendingSubmit = !!this.pendingOptions;\n return;\n }\n\n return this.submit(optionIds, null, () => (evt.target.checked = isUnvoting));\n }\n\n onsubmit() {\n return this.submit(this.pendingOptions, () => {\n this.pendingOptions = null;\n this.pendingSubmit = false;\n });\n }\n\n submit(optionIds, cb, onerror) {\n this.loadingOptions = true;\n m.redraw();\n\n return app\n .request({\n method: 'PATCH',\n url: `${app.forum.attribute('apiUrl')}/fof/polls/${this.attrs.poll.id()}/votes`,\n body: {\n data: {\n optionIds: Array.from(optionIds),\n },\n },\n })\n .then((res) => {\n app.store.pushPayload(res);\n cb?.();\n })\n .catch((err) => {\n onerror?.(err);\n })\n .finally(() => {\n this.loadingOptions = false;\n\n m.redraw();\n });\n }\n\n showVoters() {\n // Load all the votes only when opening the votes list\n app.modal.show(ListVotersModal, {\n poll: this.attrs.poll,\n post: this.attrs.post,\n });\n }\n\n deletePoll() {\n if (confirm(extractText(app.translator.trans('fof-polls.forum.moderation.delete_confirm')))) {\n this.attrs.poll.delete().then(() => {\n m.redraw.sync();\n });\n }\n }\n\n /**\n * Attempting to use the `tooltipVisible` attr on the Tooltip component set to 'false' when no vote count\n * caused the tooltip to break on click. This is a workaround to hide the tooltip when no vote count is available,\n * called on 'onremove' of the Tooltip component. It doesn't always work as intended either, but it does the job.\n */\n hideOptionTooltip(vnode: Mithril.Vnode) {\n vnode.attrs.tooltipVisible = false;\n vnode.state.updateVisibility();\n }\n\n /**\n * Alert before navigating away using browser's 'beforeunload' event\n */\n preventClose(e) {\n if (this.pendingOptions) {\n e.preventDefault();\n return true;\n }\n }\n}\n","import app from 'flarum/forum/app';\nimport Button, { IButtonAttrs } from 'flarum/common/components/Button';\nimport classList from 'flarum/common/utils/classList';\nimport type Mithril from 'mithril';\nimport Poll from '../models/Poll';\n\nexport interface UploadPollImageButtonAttrs extends IButtonAttrs {\n className?: string;\n loading?: boolean;\n name: string;\n onclick: () => void;\n poll?: Poll | null;\n onUpload: (fileName: string | null | undefined) => void;\n}\n\nexport interface PollUploadObject {\n fileUrl: string;\n fileName: string;\n}\n\nexport default class UploadPollImageButton extends Button {\n loading: boolean = false;\n uploadedImageUrl: string | null | undefined;\n fileName: string | undefined;\n $input: JQuery | undefined;\n\n view(vnode: Mithril.Vnode) {\n this.attrs.loading = this.loading;\n this.attrs.className = classList(this.attrs.className, 'Button');\n const imageUrl = this.getImageUrl();\n\n if (imageUrl) {\n this.attrs.onclick = this.remove.bind(this);\n\n return (\n
\n

\n \"\"\n

\n

{super.view({ ...vnode, children: app.translator.trans('fof-polls.forum.upload_image.remove_button') })}

\n
\n );\n } else {\n this.attrs.onclick = this.upload.bind(this);\n }\n\n return super.view({ ...vnode, children: app.translator.trans('fof-polls.forum.upload_image.upload_button') });\n }\n\n /**\n * Prompt the user to upload an image.\n */\n upload() {\n if (this.loading) return;\n this.$input = $('');\n\n this.$input\n .appendTo('body')\n .hide()\n .trigger('click')\n .on('change', (e) => {\n const body = new FormData();\n body.append('image', e.target.files[0]);\n\n this.loading = true;\n m.redraw();\n\n app\n .request({\n method: 'POST',\n url: this.resourceUrl('save'),\n serialize: (raw) => raw,\n body,\n })\n .then(this.success.bind(this), this.failure.bind(this));\n });\n }\n\n /**\n * Remove the image.\n */\n remove() {\n this.loading = true;\n m.redraw();\n\n app\n .request({\n method: 'DELETE',\n url: this.resourceUrl('delete'),\n })\n .then(this.success.bind(this), this.failure.bind(this));\n }\n\n resourceUrl(context:string) {\n let url = app.forum.attribute('apiUrl') + '/fof/polls/' + this.attrs.name;\n const poll = this.attrs.poll;\n\n if (poll?.exists) url += '/' + poll?.id();\n\n return url;\n }\n\n getImageUrl() {\n if(typeof this.uploadedImageUrl !== 'undefined') {\n return this.uploadedImageUrl;\n }\n\n return this.attrs.poll?.imageUrl();\n }\n\n /**\n * After a successful upload/removal, redraw the page.\n *\n * @param {PollUploadObject} response\n * @protected\n */\n success(response: PollUploadObject | null) {\n this.loading = false;\n this.uploadedImageUrl = response?.fileUrl ?? null;\n this.fileName = response?.fileName;\n\n this.attrs.onUpload?.(response?.fileName);\n m.redraw();\n this.$input?.remove();\n }\n\n /**\n * If upload/removal fails, stop loading.\n *\n * @param {object} response\n * @protected\n */\n failure(response: object) {\n this.loading = false;\n m.redraw();\n this.$input?.remove();\n }\n}\n","import app from 'flarum/forum/app';\nimport type Mithril from 'mithril';\nimport UploadPollImageButton, { UploadPollImageButtonAttrs } from './UploadPollImageButton';\nimport PollOption from '../models/PollOption';\n\nexport interface UploadPollOptionImageButtonAttrs extends UploadPollImageButtonAttrs {\n option: PollOption;\n}\n\nexport default class UploadPollOptionImageButton extends UploadPollImageButton {\n view(vnode: Mithril.Vnode) {\n const poll = this.attrs.poll;\n if (poll?.exists) {\n return super.view(vnode);\n }\n\n return

{app.translator.trans('fof-polls.forum.modal.option_image.requires_saved_poll')}

;\n }\n\n getImageUrl() {\n if(typeof this.uploadedImageUrl !== 'undefined') {\n return this.uploadedImageUrl;\n }\n\n return this.attrs.option?.imageUrl();\n }\n\n resourceUrl(context:string) {\n let url = app.forum.attribute('apiUrl') + '/fof/polls/pollOptionImage';\n const poll = this.attrs.poll;\n const option = this.attrs.option;\n\n if (poll?.exists && context === 'save') url += '/' + poll?.id();\n if (option?.exists) url += '/' + option?.id();\n\n return url;\n }\n}\n","import { NestedStringArray } from '@askvortsov/rich-icu-message-formatter';\n\nexport default class FormError extends Error {\n constructor(props: NestedStringArray | string) {\n super(props + '');\n }\n}\n","import CreatePollModal from './CreatePollModal';\nimport PostPoll from './PostPoll';\nimport EditPollModal from './EditPollModal';\nimport ListVotersModal from './ListVotersModal';\nimport PollForm from './PollForm';\nimport ComposePollHero from './ComposePollHero';\nimport ComposePollPage from './ComposePollPage';\nimport PollsPage from './PollsPage';\nimport PollView from './PollView';\nimport PollViewPage from './PollViewPage';\nimport PollSubmitButton from './Poll/PollSubmitButton';\nimport PollOptions from './Poll/PollOptions';\nimport PollsShowcasePage from './PollsShowcasePage';\nimport PollShowcase from './PollShowcase';\nimport PollShowcaseItem from './PollShowcaseItem';\nimport { AbstractPollPage } from './AbstractPollPage';\n\nexport const components = {\n CreatePollModal,\n PostPoll,\n EditPollModal,\n ListVotersModal,\n PollForm,\n ComposePollHero,\n ComposePollPage,\n PollsPage,\n PollView,\n PollViewPage,\n PollSubmitButton,\n PollOptions,\n PollsShowcasePage,\n PollShowcase,\n PollShowcaseItem,\n AbstractPollPage,\n};\n","import Extend from 'flarum/common/extenders';\nimport Post from 'flarum/common/models/Post';\nimport Forum from 'flarum/common/models/Forum';\nimport Discussion from 'flarum/common/models/Discussion';\nimport Poll from './models/Poll';\nimport PollOption from './models/PollOption';\nimport PollVote from './models/PollVote';\nimport PollsPage from './components/PollsPage';\nimport ComposePollPage from './components/ComposePollPage';\nimport PollViewPage from './components/PollViewPage';\nimport PollsShowcasePage from './components/PollsShowcasePage';\n\nexport default [\n new Extend.Routes() //\n .add('fof.polls.showcase', '/polls', PollsShowcasePage)\n .add('fof.polls.list', '/polls/all', PollsPage)\n .add('fof.polls.view', '/polls/view/:id', PollViewPage)\n .add('fof.polls.compose', '/polls/composer', ComposePollPage),\n\n new Extend.Store() //\n .add('polls', Poll)\n .add('poll_options', PollOption)\n .add('poll_votes', PollVote),\n\n new Extend.Model(Post) //\n .hasMany('polls')\n .attribute('canStartPoll'),\n\n new Extend.Model(Forum) //\n .attribute('canStartPolls'),\n\n new Extend.Model(Discussion) //\n .attribute('hasPoll')\n .attribute('canStartPoll'),\n];\n","import app from 'flarum/forum/app';\n\nimport addDiscussionBadge from './addDiscussionBadge';\nimport addComposerItems from './addComposerItems';\nimport addPollsToPost from './addPollsToPost';\nimport addPostControls from './addPostControls';\nimport addNavItem from './addNavItem';\n\nexport * from './components';\nexport * from './models';\nexport * from './states';\n\napp.initializers.add('fof/polls', () => {\n addDiscussionBadge();\n addComposerItems();\n addPollsToPost();\n addPostControls();\n addNavItem();\n});\n\nexport { default as extend } from './extend';\n","import Model from 'flarum/common/Model';\nimport PollOption from './PollOption';\nimport PollVote from './PollVote';\nimport computed from 'flarum/common/utils/computed';\n\nexport default class Poll extends Model {\n public tempOptions: PollOption[] | undefined;\n\n question() {\n return Model.attribute('question').call(this);\n }\n\n subtitle() {\n return Model.attribute('subtitle').call(this);\n }\n\n image() {\n return Model.attribute('image').call(this);\n }\n\n imageUrl() {\n return Model.attribute('imageUrl').call(this);\n }\n\n imageAlt() {\n return Model.attribute('imageAlt').call(this);\n }\n\n hasEnded() {\n return Model.attribute('hasEnded').call(this);\n }\n\n endDate() {\n return Model.attribute('endDate', Model.transformDate).call(this);\n }\n\n publicPoll() {\n return Model.attribute('publicPoll').call(this);\n }\n\n hideVotes() {\n return Model.attribute('hideVotes').call(this);\n }\n\n allowChangeVote() {\n return Model.attribute('allowChangeVote').call(this);\n }\n\n allowMultipleVotes() {\n return Model.attribute('allowMultipleVotes').call(this);\n }\n\n maxVotes() {\n return Model.attribute('maxVotes').call(this);\n }\n\n voteCount() {\n return Model.attribute('voteCount').call(this);\n }\n\n canVote() {\n return Model.attribute('canVote').call(this);\n }\n\n canEdit() {\n return Model.attribute('canEdit').call(this);\n }\n\n canDelete() {\n return Model.attribute('canDelete').call(this);\n }\n\n canSeeVoters() {\n return Model.attribute('canSeeVoters').call(this);\n }\n\n canChangeVote() {\n return Model.attribute('canChangeVote').call(this);\n }\n\n options() {\n const options = Model.hasMany('options').call(this);\n return options ? (options as PollOption[]) : [];\n }\n\n votes() {\n return Model.hasMany('votes').call(this);\n }\n\n myVotes(): PollVote[] {\n const myVotes = Model.hasMany('myVotes').call(this);\n return myVotes ? (myVotes as PollVote[]) : [];\n }\n\n isGlobal() {\n return Model.attribute('isGlobal').call(this);\n }\n\n isHidden() {\n return computed('hiddenAt', (hiddenAt) => !!hiddenAt).call(this);\n }\n\n // TODO: These two don't make sense as of now\n isUnread() {\n return false;\n }\n\n apiEndpoint() {\n /** @ts-ignore */\n return `/fof/polls${this.exists ? `/${this.data.id}` : ''}`;\n }\n}\n","import Model from 'flarum/common/Model';\nimport Poll from './Poll';\nimport PollVote from './PollVote';\n\nexport default class PollOption extends Model {\n answer() {\n return Model.attribute('answer').call(this);\n }\n\n image() {\n return Model.attribute('image').call(this);\n }\n\n imageUrl() {\n return Model.attribute('imageUrl').call(this);\n }\n\n voteCount() {\n return Model.attribute('voteCount').call(this);\n }\n\n poll() {\n return Model.hasOne('polls').call(this);\n }\n\n votes() {\n return Model.hasMany('votes').call(this);\n }\n\n apiEndpoint() {\n /** @ts-ignore */\n return `/fof/polls/answers${this.exists ? `/${this.data.id}` : ''}`;\n }\n}\n","import Model from 'flarum/common/Model';\nimport Poll from './Poll';\nimport PollOption from './PollOption';\nimport User from 'flarum/common/models/User';\n\nexport default class PollVote extends Model {\n poll() {\n return Model.hasOne('poll').call(this);\n }\n\n option() {\n const result = Model.hasOne('option').call(this);\n return result === false ? null : result;\n }\n\n user() {\n return Model.hasOne('user').call(this);\n }\n\n pollId() {\n return Model.attribute('pollId').call(this);\n }\n\n optionId() {\n return Model.attribute('optionId').call(this);\n }\n\n apiEndpoint() {\n return `/fof/polls/${this.pollId()}/vote`;\n }\n}\n","import Poll from './Poll';\nimport PollOption from './PollOption';\nimport PollVote from './PollVote';\n\nexport const models = {\n Poll,\n PollOption,\n PollVote,\n};\n","import app from 'flarum/forum/app';\nimport Poll from '../models/Poll';\nimport PollOption from '../models/PollOption';\n\nexport default class PollFormState {\n poll: Poll;\n loading: boolean;\n deleting: boolean;\n expandedGroup: string;\n\n static createNewPoll() {\n const poll = app.store.createRecord('polls');\n\n poll.pushAttributes({\n question: '',\n endDate: '',\n publicPoll: false,\n allowMultipleVotes: false,\n hideVotes: false,\n allowChangeVote: false,\n maxVotes: 0,\n });\n\n poll.tempOptions = [app.store.createRecord('poll_options'), app.store.createRecord('poll_options')];\n\n return poll;\n }\n\n constructor(poll: Poll) {\n if (!poll) {\n poll = PollFormState.createNewPoll();\n }\n\n this.loading = false;\n this.deleting = false;\n this.poll = poll;\n this.expandedGroup = 'setup';\n }\n\n isExpanded(groupKey: string) {\n return this.expandedGroup === groupKey;\n }\n\n expand(groupKey: string) {\n this.expandedGroup = groupKey;\n m.redraw();\n }\n\n async save(data: any) {\n this.loading = true;\n m.redraw();\n\n try {\n this.poll = await this.poll.save(data);\n /**\n * Cleanup attributes:\n * For the saving process, we add the options directly to the attributes.\n * As we currently cannot add new PollOptions as relationships.\n */\n delete this.poll!.data!.attributes!.options;\n } finally {\n this.loading = false;\n m.redraw();\n }\n }\n\n async delete() {\n this.loading = true;\n m.redraw();\n\n try {\n await this.poll.delete();\n this.deleting = true;\n } finally {\n this.loading = false;\n m.redraw();\n }\n }\n}\n","import app from 'flarum/forum/app';\nimport PaginatedListState, { Page, PaginatedListParams, PaginatedListRequestParams } from 'flarum/common/states/PaginatedListState';\nimport Poll from '../models/Poll';\nimport { ApiResponsePlural } from 'flarum/common/Store';\nimport EventEmitter from 'flarum/common/utils/EventEmitter';\n\nexport interface PollListParams extends PaginatedListParams {\n sort?: string;\n}\n\nconst globalEventEmitter = new EventEmitter();\n\nexport default class PollListState

extends PaginatedListState {\n protected extraPolls: Poll[] = [];\n protected eventEmitter: EventEmitter;\n\n constructor(params: P, page: number = 1) {\n super(params, page, 20);\n\n this.eventEmitter = globalEventEmitter.on('poll.deleted', this.deletePoll.bind(this));\n }\n\n get type(): string {\n return 'fof/polls';\n }\n\n requestParams(): PaginatedListRequestParams {\n const params = {\n include: this.params.include || ['options', 'votes'],\n filter: this.params.filter || {},\n sort: this.sortMap()[this.params.sort ?? ''],\n };\n\n if (this.params.q) {\n params.filter.q = this.params.q;\n }\n\n return params;\n }\n\n protected loadPage(page: number = 1): Promise> {\n const preloadedPolls = app.preloadedApiDocument();\n\n if (preloadedPolls) {\n this.initialLoading = false;\n\n return Promise.resolve(preloadedPolls);\n }\n\n return super.loadPage(page);\n }\n\n clear(): void {\n super.clear();\n\n this.extraPolls = [];\n }\n\n /**\n * Get a map of sort keys (which appear in the URL, and are used for\n * translation) to the API sort value that they represent.\n */\n sortMap() {\n const map: any = {};\n\n if (this.params.q) {\n map.relevance = '';\n }\n map.newest = '-createdAt';\n map.oldest = 'createdAt';\n\n return map;\n }\n\n /**\n * In the last request, has the user searched for a poll?\n */\n isSearchResults(): boolean {\n return !!this.params.q;\n }\n\n removePoll(poll: Poll): void {\n this.eventEmitter.emit('poll.deleted', poll);\n }\n\n deletePoll(poll: Poll): void {\n for (const page of this.pages) {\n const index = page.items.indexOf(poll);\n\n if (index !== -1) {\n page.items.splice(index, 1);\n break;\n }\n }\n\n const index = this.extraPolls.indexOf(poll);\n\n if (index !== -1) {\n this.extraPolls.splice(index);\n }\n\n m.redraw();\n }\n\n /**\n * Add a poll to the top of the list.\n */\n addPoll(poll: Poll): void {\n this.removePoll(poll);\n this.extraPolls.unshift(poll);\n\n m.redraw();\n }\n\n protected getAllItems(): Poll[] {\n return this.extraPolls.concat(super.getAllItems());\n }\n\n public getPages(): Page[] {\n const pages = super.getPages();\n\n if (this.extraPolls.length) {\n return [\n {\n number: -1,\n items: this.extraPolls,\n },\n ...pages,\n ];\n }\n\n return pages;\n }\n}\n","import app from 'flarum/forum/app';\nimport Poll from '../models/Poll';\nimport LogInModal from 'flarum/forum/components/LogInModal';\nimport PollOption from '../models/PollOption';\nimport PollVote from '../models/PollVote';\nimport ListVotersModal from '../components/ListVotersModal';\nimport { ApiPayloadSingle } from 'flarum/common/Store';\n\nexport default class PollState {\n protected poll: Poll;\n protected pendingSubmit: boolean = false;\n protected pendingOptions: Set | null = null;\n public loadingOptions: boolean = false;\n public useSubmitUI: boolean;\n public showCheckMarks: boolean;\n public canSeeVoteCount: boolean;\n\n constructor(poll: Poll) {\n this.poll = poll;\n this.useSubmitUI = !poll?.canChangeVote() && poll?.allowMultipleVotes();\n this.showCheckMarks = !app.session.user || (!poll.hasEnded() && poll.canVote() && (!this.hasVoted() || poll.canChangeVote()));\n this.canSeeVoteCount = typeof poll.voteCount() === 'number';\n this.init();\n }\n\n /**\n * used as en extendable entry point for init customizations\n */\n init(): void {}\n\n isShowResult(): boolean {\n return this.poll.hasEnded() || (this.canSeeVoteCount && this.hasVoted());\n }\n\n hasVoted(): boolean {\n return this.poll.myVotes().length > 0;\n }\n\n overallVoteCount(): number {\n return this.poll.voteCount();\n }\n\n hasVotedFor(option: PollOption): boolean {\n return this.pendingOptions ? this.pendingOptions.has(option.id()!) : this.poll.myVotes().some((vote: PollVote) => vote.option() === option);\n }\n\n getMaxVotes(): number {\n const poll = this.poll;\n let maxVotes = poll.allowMultipleVotes() ? poll.maxVotes() : 1;\n if (maxVotes === 0) maxVotes = poll.options().length;\n return maxVotes;\n }\n\n showButton(): boolean {\n return this.useSubmitUI && this.pendingSubmit;\n }\n\n changeVote(option: PollOption, evt: Event): void {\n const target = evt.target as HTMLInputElement;\n\n if (!app.session.user) {\n app.modal.show(LogInModal);\n target.checked = false;\n return;\n }\n\n const optionIds = this.pendingOptions || new Set(this.poll.myVotes().map((v: PollVote) => v.option()!.id()!));\n const isUnvoting = optionIds.delete(option.id()!);\n const allowsMultiple = this.poll.allowMultipleVotes();\n\n if (!allowsMultiple) {\n optionIds.clear();\n }\n\n if (!isUnvoting) {\n optionIds.add(option.id()!);\n }\n\n this.pendingOptions = optionIds.size ? optionIds : null;\n this.pendingSubmit = !!this.pendingOptions;\n\n if (this.useSubmitUI) {\n this.pendingOptions = optionIds.size ? optionIds : null;\n this.pendingSubmit = !!this.pendingOptions;\n m.redraw();\n return;\n }\n\n this.submit(optionIds, null, () => (target.checked = isUnvoting));\n }\n\n hasSelectedOptions(): boolean {\n return this.pendingSubmit;\n }\n\n onsubmit(): Promise {\n return this.submit(this.pendingOptions!, () => {\n this.pendingOptions = null;\n this.pendingSubmit = false;\n });\n }\n\n submit(optionIds: Set, cb: Function | null, onerror: Function | null = null) {\n this.loadingOptions = true;\n m.redraw();\n\n return app\n .request({\n method: 'PATCH',\n url: `${app.forum.attribute('apiUrl')}/fof/polls/${this.poll.id()}/votes`,\n body: {\n data: {\n optionIds: Array.from(optionIds),\n },\n },\n })\n .then((res: ApiPayloadSingle) => {\n app.store.pushPayload(res);\n cb?.();\n })\n .catch((err) => {\n onerror?.(err);\n })\n .finally(() => {\n this.loadingOptions = false;\n this.canSeeVoteCount = typeof this.poll.voteCount() === 'number';\n m.redraw();\n });\n }\n\n showVoters = () => {\n // Load all the votes only when opening the votes list\n app.modal.show(ListVotersModal, {\n poll: this.poll,\n });\n };\n}\n","import PollFormState from './PollFormState';\nimport PollListState from './PollListState';\nimport PollState from './PollState';\n\nexport const states = {\n PollFormState,\n PollListState,\n PollState,\n};\n","import type Mithril from 'mithril';\nimport app from 'flarum/forum/app';\nimport Poll from '../models/Poll';\nimport Component from 'flarum/common/Component';\nimport ComposePollPage from '../components/ComposePollPage';\nimport PollsPage from '../components/PollsPage';\nimport ItemList from 'flarum/common/utils/ItemList';\nimport Separator from 'flarum/common/components/Separator';\nimport Button from 'flarum/common/components/Button';\n\n/**\n * The `UserControls` utility constructs a list of buttons for a user which\n * perform actions on it.\n */\nexport default {\n /**\n * Get a list of controls for a user.\n */\n controls(poll: Poll, context: Component): ItemList {\n const items = new ItemList();\n\n ['poll', 'moderation', 'destructive'].forEach((section) => {\n const controls = (this[section + 'Controls'](poll, context) as ItemList).toArray();\n if (controls.length) {\n controls.forEach((item) => items.add(item.itemName, item));\n items.add(section + 'Separator', );\n }\n });\n\n return items;\n },\n\n /**\n * Get controls for direct modifcation actions on polls (e.g. vote, view voters).\n */\n pollControls(poll: Poll, context: Component): ItemList {\n return new ItemList();\n },\n\n /**\n * Get controls for a user pertaining to moderation (e.g. suspend, edit).\n */\n moderationControls(poll: Poll, context: Component): ItemList {\n const items = new ItemList();\n\n if (poll.canEdit()) {\n items.add(\n 'edit',\n \n );\n }\n\n return items;\n },\n\n /**\n * Get controls for a user which are destructive (e.g. delete).\n * @protected\n */\n destructiveControls(poll: Poll, context: Component): ItemList {\n const items = new ItemList();\n\n if (poll.canDelete()) {\n items.add(\n 'delete',\n \n );\n }\n\n return items;\n },\n\n /**\n * Delete the user.\n */\n async deleteAction(poll: Poll): Promise {\n if (!confirm(app.translator.trans(`fof-polls.forum.poll_controls.delete_confirmation`) as string)) {\n return;\n }\n\n return poll\n .delete()\n .then(() => {\n this.showDeletionAlert(poll, 'success');\n if (app.current.matches(ComposePollPage, { id: poll.id() }) || app.current.matches(PollsPage, { id: poll.id() })) {\n app.history.back();\n } else {\n window.location.reload();\n }\n })\n .catch(() => this.showDeletionAlert(poll, 'error'));\n },\n\n /**\n * Show deletion alert of poll\n */\n showDeletionAlert(poll: Poll, type: string): void {\n const message = {\n success: `fof-polls.forum.poll_controls.delete_success_message`,\n error: `fof-polls.forum.poll_controls.delete_error_message`,\n }[type]!;\n\n app.alerts.show({ type }, app.translator.trans(message, { poll: poll }));\n },\n\n /**\n * Edit the poll.\n */\n editAction(poll: Poll): void {\n m.route.set(app.route('fof.polls.compose', { id: poll.id() }));\n },\n};\n","module.exports = flarum.core.compat['common/Component'];","module.exports = flarum.core.compat['common/Model'];","module.exports = flarum.core.compat['common/components/Badge'];","module.exports = flarum.core.compat['common/components/Button'];","module.exports = flarum.core.compat['common/components/Dropdown'];","module.exports = flarum.core.compat['common/components/Link'];","module.exports = flarum.core.compat['common/components/LinkButton'];","module.exports = flarum.core.compat['common/components/LoadingIndicator'];","module.exports = flarum.core.compat['common/components/Modal'];","module.exports = flarum.core.compat['common/components/Page'];","module.exports = flarum.core.compat['common/components/Placeholder'];","module.exports = flarum.core.compat['common/components/SelectDropdown'];","module.exports = flarum.core.compat['common/components/Separator'];","module.exports = flarum.core.compat['common/components/Switch'];","module.exports = flarum.core.compat['common/components/Tooltip'];","module.exports = flarum.core.compat['common/extend'];","module.exports = flarum.core.compat['common/extenders'];","module.exports = flarum.core.compat['common/helpers/avatar'];","module.exports = flarum.core.compat['common/helpers/highlight'];","module.exports = flarum.core.compat['common/helpers/icon'];","module.exports = flarum.core.compat['common/helpers/listItems'];","module.exports = flarum.core.compat['common/helpers/username'];","module.exports = flarum.core.compat['common/models/Discussion'];","module.exports = flarum.core.compat['common/models/Forum'];","module.exports = flarum.core.compat['common/models/Post'];","module.exports = flarum.core.compat['common/states/PaginatedListState'];","module.exports = flarum.core.compat['common/utils/EventEmitter'];","module.exports = flarum.core.compat['common/utils/ItemList'];","module.exports = flarum.core.compat['common/utils/Stream'];","module.exports = flarum.core.compat['common/utils/SubtreeRetainer'];","module.exports = flarum.core.compat['common/utils/abbreviateNumber'];","module.exports = flarum.core.compat['common/utils/classList'];","module.exports = flarum.core.compat['common/utils/computed'];","module.exports = flarum.core.compat['common/utils/extractText'];","module.exports = flarum.core.compat['common/utils/string'];","module.exports = flarum.core.compat['forum/app'];","module.exports = flarum.core.compat['forum/components/CommentPost'];","module.exports = flarum.core.compat['forum/components/DiscussionComposer'];","module.exports = flarum.core.compat['forum/components/DiscussionList'];","module.exports = flarum.core.compat['forum/components/DiscussionPage'];","module.exports = flarum.core.compat['forum/components/IndexPage'];","module.exports = flarum.core.compat['forum/components/LogInModal'];","module.exports = flarum.core.compat['forum/components/ReplyComposer'];","module.exports = flarum.core.compat['forum/utils/PostControls'];","module.exports = flarum.core.compat['forum/utils/slidable'];","var _typeof = require(\"./typeof.js\")[\"default\"];\nfunction _regeneratorRuntime() {\n \"use strict\"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */\n module.exports = _regeneratorRuntime = function _regeneratorRuntime() {\n return e;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n var t,\n e = {},\n r = Object.prototype,\n n = r.hasOwnProperty,\n o = Object.defineProperty || function (t, e, r) {\n t[e] = r.value;\n },\n i = \"function\" == typeof Symbol ? Symbol : {},\n a = i.iterator || \"@@iterator\",\n c = i.asyncIterator || \"@@asyncIterator\",\n u = i.toStringTag || \"@@toStringTag\";\n function define(t, e, r) {\n return Object.defineProperty(t, e, {\n value: r,\n enumerable: !0,\n configurable: !0,\n writable: !0\n }), t[e];\n }\n try {\n define({}, \"\");\n } catch (t) {\n define = function define(t, e, r) {\n return t[e] = r;\n };\n }\n function wrap(t, e, r, n) {\n var i = e && e.prototype instanceof Generator ? e : Generator,\n a = Object.create(i.prototype),\n c = new Context(n || []);\n return o(a, \"_invoke\", {\n value: makeInvokeMethod(t, r, c)\n }), a;\n }\n function tryCatch(t, e, r) {\n try {\n return {\n type: \"normal\",\n arg: t.call(e, r)\n };\n } catch (t) {\n return {\n type: \"throw\",\n arg: t\n };\n }\n }\n e.wrap = wrap;\n var h = \"suspendedStart\",\n l = \"suspendedYield\",\n f = \"executing\",\n s = \"completed\",\n y = {};\n function Generator() {}\n function GeneratorFunction() {}\n function GeneratorFunctionPrototype() {}\n var p = {};\n define(p, a, function () {\n return this;\n });\n var d = Object.getPrototypeOf,\n v = d && d(d(values([])));\n v && v !== r && n.call(v, a) && (p = v);\n var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p);\n function defineIteratorMethods(t) {\n [\"next\", \"throw\", \"return\"].forEach(function (e) {\n define(t, e, function (t) {\n return this._invoke(e, t);\n });\n });\n }\n function AsyncIterator(t, e) {\n function invoke(r, o, i, a) {\n var c = tryCatch(t[r], t, o);\n if (\"throw\" !== c.type) {\n var u = c.arg,\n h = u.value;\n return h && \"object\" == _typeof(h) && n.call(h, \"__await\") ? e.resolve(h.__await).then(function (t) {\n invoke(\"next\", t, i, a);\n }, function (t) {\n invoke(\"throw\", t, i, a);\n }) : e.resolve(h).then(function (t) {\n u.value = t, i(u);\n }, function (t) {\n return invoke(\"throw\", t, i, a);\n });\n }\n a(c.arg);\n }\n var r;\n o(this, \"_invoke\", {\n value: function value(t, n) {\n function callInvokeWithMethodAndArg() {\n return new e(function (e, r) {\n invoke(t, n, e, r);\n });\n }\n return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();\n }\n });\n }\n function makeInvokeMethod(e, r, n) {\n var o = h;\n return function (i, a) {\n if (o === f) throw new Error(\"Generator is already running\");\n if (o === s) {\n if (\"throw\" === i) throw a;\n return {\n value: t,\n done: !0\n };\n }\n for (n.method = i, n.arg = a;;) {\n var c = n.delegate;\n if (c) {\n var u = maybeInvokeDelegate(c, n);\n if (u) {\n if (u === y) continue;\n return u;\n }\n }\n if (\"next\" === n.method) n.sent = n._sent = n.arg;else if (\"throw\" === n.method) {\n if (o === h) throw o = s, n.arg;\n n.dispatchException(n.arg);\n } else \"return\" === n.method && n.abrupt(\"return\", n.arg);\n o = f;\n var p = tryCatch(e, r, n);\n if (\"normal\" === p.type) {\n if (o = n.done ? s : l, p.arg === y) continue;\n return {\n value: p.arg,\n done: n.done\n };\n }\n \"throw\" === p.type && (o = s, n.method = \"throw\", n.arg = p.arg);\n }\n };\n }\n function maybeInvokeDelegate(e, r) {\n var n = r.method,\n o = e.iterator[n];\n if (o === t) return r.delegate = null, \"throw\" === n && e.iterator[\"return\"] && (r.method = \"return\", r.arg = t, maybeInvokeDelegate(e, r), \"throw\" === r.method) || \"return\" !== n && (r.method = \"throw\", r.arg = new TypeError(\"The iterator does not provide a '\" + n + \"' method\")), y;\n var i = tryCatch(o, e.iterator, r.arg);\n if (\"throw\" === i.type) return r.method = \"throw\", r.arg = i.arg, r.delegate = null, y;\n var a = i.arg;\n return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, \"return\" !== r.method && (r.method = \"next\", r.arg = t), r.delegate = null, y) : a : (r.method = \"throw\", r.arg = new TypeError(\"iterator result is not an object\"), r.delegate = null, y);\n }\n function pushTryEntry(t) {\n var e = {\n tryLoc: t[0]\n };\n 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e);\n }\n function resetTryEntry(t) {\n var e = t.completion || {};\n e.type = \"normal\", delete e.arg, t.completion = e;\n }\n function Context(t) {\n this.tryEntries = [{\n tryLoc: \"root\"\n }], t.forEach(pushTryEntry, this), this.reset(!0);\n }\n function values(e) {\n if (e || \"\" === e) {\n var r = e[a];\n if (r) return r.call(e);\n if (\"function\" == typeof e.next) return e;\n if (!isNaN(e.length)) {\n var o = -1,\n i = function next() {\n for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next;\n return next.value = t, next.done = !0, next;\n };\n return i.next = i;\n }\n }\n throw new TypeError(_typeof(e) + \" is not iterable\");\n }\n return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, \"constructor\", {\n value: GeneratorFunctionPrototype,\n configurable: !0\n }), o(GeneratorFunctionPrototype, \"constructor\", {\n value: GeneratorFunction,\n configurable: !0\n }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, \"GeneratorFunction\"), e.isGeneratorFunction = function (t) {\n var e = \"function\" == typeof t && t.constructor;\n return !!e && (e === GeneratorFunction || \"GeneratorFunction\" === (e.displayName || e.name));\n }, e.mark = function (t) {\n return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, \"GeneratorFunction\")), t.prototype = Object.create(g), t;\n }, e.awrap = function (t) {\n return {\n __await: t\n };\n }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () {\n return this;\n }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) {\n void 0 === i && (i = Promise);\n var a = new AsyncIterator(wrap(t, r, n, o), i);\n return e.isGeneratorFunction(r) ? a : a.next().then(function (t) {\n return t.done ? t.value : a.next();\n });\n }, defineIteratorMethods(g), define(g, u, \"Generator\"), define(g, a, function () {\n return this;\n }), define(g, \"toString\", function () {\n return \"[object Generator]\";\n }), e.keys = function (t) {\n var e = Object(t),\n r = [];\n for (var n in e) r.push(n);\n return r.reverse(), function next() {\n for (; r.length;) {\n var t = r.pop();\n if (t in e) return next.value = t, next.done = !1, next;\n }\n return next.done = !0, next;\n };\n }, e.values = values, Context.prototype = {\n constructor: Context,\n reset: function reset(e) {\n if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = \"next\", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) \"t\" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t);\n },\n stop: function stop() {\n this.done = !0;\n var t = this.tryEntries[0].completion;\n if (\"throw\" === t.type) throw t.arg;\n return this.rval;\n },\n dispatchException: function dispatchException(e) {\n if (this.done) throw e;\n var r = this;\n function handle(n, o) {\n return a.type = \"throw\", a.arg = e, r.next = n, o && (r.method = \"next\", r.arg = t), !!o;\n }\n for (var o = this.tryEntries.length - 1; o >= 0; --o) {\n var i = this.tryEntries[o],\n a = i.completion;\n if (\"root\" === i.tryLoc) return handle(\"end\");\n if (i.tryLoc <= this.prev) {\n var c = n.call(i, \"catchLoc\"),\n u = n.call(i, \"finallyLoc\");\n if (c && u) {\n if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);\n if (this.prev < i.finallyLoc) return handle(i.finallyLoc);\n } else if (c) {\n if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);\n } else {\n if (!u) throw new Error(\"try statement without catch or finally\");\n if (this.prev < i.finallyLoc) return handle(i.finallyLoc);\n }\n }\n }\n },\n abrupt: function abrupt(t, e) {\n for (var r = this.tryEntries.length - 1; r >= 0; --r) {\n var o = this.tryEntries[r];\n if (o.tryLoc <= this.prev && n.call(o, \"finallyLoc\") && this.prev < o.finallyLoc) {\n var i = o;\n break;\n }\n }\n i && (\"break\" === t || \"continue\" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null);\n var a = i ? i.completion : {};\n return a.type = t, a.arg = e, i ? (this.method = \"next\", this.next = i.finallyLoc, y) : this.complete(a);\n },\n complete: function complete(t, e) {\n if (\"throw\" === t.type) throw t.arg;\n return \"break\" === t.type || \"continue\" === t.type ? this.next = t.arg : \"return\" === t.type ? (this.rval = this.arg = t.arg, this.method = \"return\", this.next = \"end\") : \"normal\" === t.type && e && (this.next = e), y;\n },\n finish: function finish(t) {\n for (var e = this.tryEntries.length - 1; e >= 0; --e) {\n var r = this.tryEntries[e];\n if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y;\n }\n },\n \"catch\": function _catch(t) {\n for (var e = this.tryEntries.length - 1; e >= 0; --e) {\n var r = this.tryEntries[e];\n if (r.tryLoc === t) {\n var n = r.completion;\n if (\"throw\" === n.type) {\n var o = n.arg;\n resetTryEntry(r);\n }\n return o;\n }\n }\n throw new Error(\"illegal catch attempt\");\n },\n delegateYield: function delegateYield(e, r, n) {\n return this.delegate = {\n iterator: values(e),\n resultName: r,\n nextLoc: n\n }, \"next\" === this.method && (this.arg = t), y;\n }\n }, e;\n}\nmodule.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _typeof(o) {\n \"@babel/helpers - typeof\";\n\n return (module.exports = _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) {\n return typeof o;\n } : function (o) {\n return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports), _typeof(o);\n}\nmodule.exports = _typeof, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","// TODO(Babel 8): Remove this file.\n\nvar runtime = require(\"../helpers/regeneratorRuntime\")();\nmodule.exports = runtime;\n\n// Copied from https://github.com/facebook/regenerator/blob/main/packages/runtime/runtime.js#L736=\ntry {\n regeneratorRuntime = runtime;\n} catch (accidentalStrictMode) {\n if (typeof globalThis === \"object\") {\n globalThis.regeneratorRuntime = runtime;\n } else {\n Function(\"r\", \"regeneratorRuntime = r\")(runtime);\n }\n}\n","export default function _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n return self;\n}","function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n if (info.done) {\n resolve(value);\n } else {\n Promise.resolve(value).then(_next, _throw);\n }\n}\nexport default function _asyncToGenerator(fn) {\n return function () {\n var self = this,\n args = arguments;\n return new Promise(function (resolve, reject) {\n var gen = fn.apply(self, args);\n function _next(value) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n }\n function _throw(err) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n }\n _next(undefined);\n });\n };\n}","import setPrototypeOf from \"./setPrototypeOf.js\";\nimport isNativeReflectConstruct from \"./isNativeReflectConstruct.js\";\nexport default function _construct(t, e, r) {\n if (isNativeReflectConstruct()) return Reflect.construct.apply(null, arguments);\n var o = [null];\n o.push.apply(o, e);\n var p = new (t.bind.apply(t, o))();\n return r && setPrototypeOf(p, r.prototype), p;\n}","import toPropertyKey from \"./toPropertyKey.js\";\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, toPropertyKey(descriptor.key), descriptor);\n }\n}\nexport default function _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n Object.defineProperty(Constructor, \"prototype\", {\n writable: false\n });\n return Constructor;\n}","export default function _extends() {\n _extends = Object.assign ? Object.assign.bind() : function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n };\n return _extends.apply(this, arguments);\n}","export default function _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}","import setPrototypeOf from \"./setPrototypeOf.js\";\nexport default function _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n setPrototypeOf(subClass, superClass);\n}","export default function _isNativeFunction(fn) {\n try {\n return Function.toString.call(fn).indexOf(\"[native code]\") !== -1;\n } catch (e) {\n return typeof fn === \"function\";\n }\n}","export default function _isNativeReflectConstruct() {\n try {\n var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));\n } catch (t) {}\n return (_isNativeReflectConstruct = function _isNativeReflectConstruct() {\n return !!t;\n })();\n}","export default function _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n return _setPrototypeOf(o, p);\n}","import _typeof from \"./typeof.js\";\nexport default function toPrimitive(t, r) {\n if (\"object\" != _typeof(t) || !t) return t;\n var e = t[Symbol.toPrimitive];\n if (void 0 !== e) {\n var i = e.call(t, r || \"default\");\n if (\"object\" != _typeof(i)) return i;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (\"string\" === r ? String : Number)(t);\n}","import _typeof from \"./typeof.js\";\nimport toPrimitive from \"./toPrimitive.js\";\nexport default function toPropertyKey(t) {\n var i = toPrimitive(t, \"string\");\n return \"symbol\" == _typeof(i) ? i : String(i);\n}","export default function _typeof(o) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) {\n return typeof o;\n } : function (o) {\n return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n }, _typeof(o);\n}","import getPrototypeOf from \"./getPrototypeOf.js\";\nimport setPrototypeOf from \"./setPrototypeOf.js\";\nimport isNativeFunction from \"./isNativeFunction.js\";\nimport construct from \"./construct.js\";\nexport default function _wrapNativeSuper(Class) {\n var _cache = typeof Map === \"function\" ? new Map() : undefined;\n _wrapNativeSuper = function _wrapNativeSuper(Class) {\n if (Class === null || !isNativeFunction(Class)) return Class;\n if (typeof Class !== \"function\") {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n if (typeof _cache !== \"undefined\") {\n if (_cache.has(Class)) return _cache.get(Class);\n _cache.set(Class, Wrapper);\n }\n function Wrapper() {\n return construct(Class, arguments, getPrototypeOf(this).constructor);\n }\n Wrapper.prototype = Object.create(Class.prototype, {\n constructor: {\n value: Wrapper,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n return setPrototypeOf(Wrapper, Class);\n };\n return _wrapNativeSuper(Class);\n}","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};"],"names":["app","extend","classList","DiscussionComposer","ReplyComposer","CreatePollModal","toPoll","data","poll","store","createRecord","tempOptions","options","map","option","pollOption","pushAttributes","addToComposer","composer","prototype","addPoll","_this","modal","show","fields","onsubmit","items","_this$composer$body","_discussion$canStartP","discussion","body","attrs","canStartPoll","forum","canStartPolls","add","m","className","onclick","bind","translator","trans","Badge","DiscussionList","Discussion","params","include","push","badges","hasPoll","component","type","label","icon","IndexPage","LinkButton","addNavItem","attribute","href","route","showAllGlobalPolls","CommentPost","PollView","DiscussionPage","content","post","isHidden","revealContent","polls","_iterator","_createForOfIteratorHelperLoose","_step","done","value","subtree","check","checks","_poll$data","_poll$options$map","_poll$options","_poll$myVotes$map","_poll$myVotes","attributes","call","_option$data","myVotes","vote","_vote$option","id","JSON","stringify","pusher","then","binding","channels","main","getById","voteCount","changedOptions","optionId","undefined","redraw","unbind","PostControls","Button","createPoll","save","_extends","relationships","_post$rawRelationship","rawRelationship","Page","ItemList","LoadingIndicator","listItems","SelectDropdown","AbstractPollPage","_Page","_inheritsLoose","_len","arguments","length","args","Array","_key","apply","concat","loading","_proto","view","pageContent","toArray","hero","mainContent","sidebar","contentItems","sidebarItems","setContent","buttonClassName","accessibleToggleLabel","navItems","initializers","has","remove","key","toObject","startsWith","Component","ComposePollHero","_Component","oninit","vnode","controlItems","itemClassName","exists","default","PollForm","PollFormState","ComposePollPage","_this2","_this$poll","_this$poll2","set","editId","param","find","item","_this2$poll","setTitle","createNewPoll","history","bodyClass","_onsubmit","_asyncToGenerator","_regeneratorRuntime","mark","_callee","state","isNew","alertAttrs","alertId","wrap","_callee$","_context","prev","next","controls","alerts","setTimeout","dismiss","stop","_x","_x2","Modal","_Modal","title","onFormSubmit","_onFormSubmit","hide","EditPollModal","_CreatePollModal","avatar","username","Link","ListVotersModal","optionContent","opt","votes","filter","v","answer","voteContent","user","PollImage","src","imageUrl","alt","PollListItem","Placeholder","PollList","getParams","isLoading","isInitialLoading","isLoadingNext","hasNext","loadNext","isEmpty","text","isSearchResults","getPages","pg","SubtreeRetainer","Dropdown","highlight","slidable","abbreviateNumber","PollControls","PollViewPage","highlightRegExp","freshness","time","session","markedAllAsReadAt","getTime","active","elementAttrs","Slidable","window","controlsView","contentView","slidableUnderneathView","menuClassName","isUnread","disabled","markAsRead","mainView","question","subtitle","infoItems","oncreate","slidableInstance","element","$","on","reset","onbeforeupdate","needsRebuild","current","matches","lastVotedNumber","hasEnded","activeView","endDate","dayjs","fromNow","count","Tooltip","PollOption","hasVoted","totalVotes","overallVoteCount","voted","hasVotedFor","percent","Math","round","canSeeVoteCount","isDisabled","loadingOptions","canChangeVote","width","Number","bar","style","showCheckMarks","onchange","changeVote","checked","onremove","hideOptionTooltip","tooltipVisible","updateVisibility","PollOptions","pollOptions","forEach","createOptionView","name","PollSubmitButton","event","pollButtonSubmit","hasSelectedOptions","Switch","Stream","extractText","FormError","UploadPollImageButton","UploadPollOptionImageButton","optionAnswers","optionImage","image","imageAlt","publicPoll","allowMultipleVotes","hideVotes","allowChangeVote","maxVotes","datepickerMinDate","_poll$tempOptions","o","formatDate","isAfter","bidi","onUpload","pollImageUploadSuccess","required","displayOptions","addOption","min","max","isBefore","deleting","i","createOptionFields","removeOption","_this3","number","placeholder","fileName","alert","splice","_this4","_this$dateToTimestamp","pollExists","pollImage","dateToTimestamp","preventDefault","t0","message","console","error","_delete2","_callee2","_callee2$","_context2","deleteAction","finish","_delete","date","def","dayjsDate","isValid","format","PollShowcaseItem","PollShowcase","refresh","showcaseItems","endedItems","page","PollState","slug","preventClose","e","addEventListener","removeEventListener","showVoters","createMainView","createPollHeader","createPollContent","createPollFooter","createFormItems","getMaxVotes","showButton","questionSlug","canVote","_AbstractPollPage","LogInModal","PollListState","PollsPage","sort","viewItems","actionItems","newPollAction","PollsShowcasePage","PostPoll","useSubmitUI","pendingSubmit","pendingOptions","_this$attrs$poll","_this$attrs$poll2","canSeeVoters","canEdit","canDelete","deletePoll","viewOption","_poll$myVotes2","_poll$myVotes3","_poll$myVotes4","some","showCheckmark","evt","_this$attrs$poll$myVo","_this$attrs$poll$myVo2","target","optionIds","Set","isUnvoting","allowsMultiple","clear","size","submit","cb","onerror","request","method","url","from","res","pushPayload","err","confirm","sync","_Button","uploadedImageUrl","$input","getImageUrl","children","upload","appendTo","trigger","FormData","append","files","resourceUrl","serialize","raw","success","failure","context","response","_response$fileUrl","_this$attrs$onUpload","_this$attrs","_this$$input","fileUrl","_this$$input2","_UploadPollImageButto","_this$attrs$option","_Error","props","_wrapNativeSuper","Error","components","Extend","Post","Forum","Poll","PollVote","Routes","Store","Model","hasMany","addDiscussionBadge","addComposerItems","addPollsToPost","addPostControls","computed","_Model","transformDate","isGlobal","hiddenAt","apiEndpoint","hasOne","result","pollId","models","expandedGroup","isExpanded","groupKey","expand","_save","sent","PaginatedListState","EventEmitter","globalEventEmitter","_PaginatedListState","extraPolls","eventEmitter","_assertThisInitialized","requestParams","_this$params$sort","sortMap","q","loadPage","preloadedPolls","preloadedApiDocument","initialLoading","Promise","resolve","relevance","newest","oldest","removePoll","emit","pages","index","indexOf","unshift","getAllItems","_createClass","get","init","isShowResult","states","Separator","section","itemName","pollControls","moderationControls","editAction","destructiveControls","abrupt","showDeletionAlert","back","location","reload","_typeof","require","module","exports","__esModule","t","r","Object","n","hasOwnProperty","defineProperty","Symbol","a","iterator","c","asyncIterator","u","toStringTag","define","enumerable","configurable","writable","Generator","create","Context","makeInvokeMethod","tryCatch","arg","h","l","f","s","y","GeneratorFunction","GeneratorFunctionPrototype","p","d","getPrototypeOf","values","g","defineIteratorMethods","_invoke","AsyncIterator","invoke","__await","callInvokeWithMethodAndArg","delegate","maybeInvokeDelegate","_sent","dispatchException","TypeError","resultName","nextLoc","pushTryEntry","tryLoc","catchLoc","finallyLoc","afterLoc","tryEntries","resetTryEntry","completion","isNaN","displayName","isGeneratorFunction","constructor","setPrototypeOf","__proto__","awrap","async","keys","reverse","pop","charAt","slice","rval","handle","complete","_catch","delegateYield","runtime","regeneratorRuntime","accidentalStrictMode","globalThis","Function","self","ReferenceError","asyncGeneratorStep","gen","reject","_next","_throw","info","fn","isNativeReflectConstruct","_construct","Reflect","construct","toPropertyKey","_defineProperties","descriptor","Constructor","protoProps","staticProps","assign","source","_getPrototypeOf","subClass","superClass","_isNativeFunction","toString","_isNativeReflectConstruct","Boolean","valueOf","_setPrototypeOf","toPrimitive","String","isNativeFunction","Class","_cache","Map","Wrapper"],"sourceRoot":""} \ No newline at end of file diff --git a/js/src/forum/components/PollForm.tsx b/js/src/forum/components/PollForm.tsx index 41941836..0a760101 100644 --- a/js/src/forum/components/PollForm.tsx +++ b/js/src/forum/components/PollForm.tsx @@ -105,7 +105,6 @@ export default class PollForm extends Component {

{app.translator.trans('fof-polls.forum.modal.poll_image.help')}

- , 90 ); @@ -298,10 +297,9 @@ export default class PollForm extends Component { this.optionImage[i](fileName)} + option={option} + onUpload={(fileName: string | null) => this.optionImage[i](fileName)} /> - ); } @@ -325,7 +323,6 @@ export default class PollForm extends Component { this.options.splice(i, 1); this.optionAnswers.splice(i, 1); this.optionImage.splice(i, 1); - this.optionImageAlt.splice(i, 1); } data(): object { diff --git a/js/src/forum/components/UploadPollImageButton.tsx b/js/src/forum/components/UploadPollImageButton.tsx index 19d021bd..b01e5cea 100644 --- a/js/src/forum/components/UploadPollImageButton.tsx +++ b/js/src/forum/components/UploadPollImageButton.tsx @@ -20,15 +20,16 @@ export interface PollUploadObject { export default class UploadPollImageButton extends Button { loading: boolean = false; - uploadedImageUrl: string | undefined = undefined; - fileName: string | undefined = undefined; + uploadedImageUrl: string | null | undefined; + fileName: string | undefined; + $input: JQuery | undefined; view(vnode: Mithril.Vnode) { this.attrs.loading = this.loading; this.attrs.className = classList(this.attrs.className, 'Button'); + const imageUrl = this.getImageUrl(); - if (this.attrs.poll?.imageUrl() || this.uploadedImageUrl) { - const imageUrl = this.uploadedImageUrl || this.attrs.poll?.imageUrl(); + if (imageUrl) { this.attrs.onclick = this.remove.bind(this); return ( @@ -51,16 +52,15 @@ export default class UploadPollImageButton(''); - const $input = $(''); - - $input + this.$input .appendTo('body') .hide() .trigger('click') .on('change', (e) => { const body = new FormData(); - body.append('image', $(e.target)[0].files[0]); + body.append('image', e.target.files[0]); this.loading = true; m.redraw(); @@ -68,7 +68,7 @@ export default class UploadPollImageButton({ method: 'POST', - url: this.resourceUrl(), + url: this.resourceUrl('save'), serialize: (raw) => raw, body, }) @@ -86,12 +86,12 @@ export default class UploadPollImageButton({ method: 'DELETE', - url: this.resourceUrl(), + url: this.resourceUrl('delete'), }) .then(this.success.bind(this), this.failure.bind(this)); } - resourceUrl() { + resourceUrl(context: string) { let url = app.forum.attribute('apiUrl') + '/fof/polls/' + this.attrs.name; const poll = this.attrs.poll; @@ -100,6 +100,14 @@ export default class UploadPollImageButton{app.translator.trans('fof-polls.forum.modal.option_image.requires_saved_poll')}

; } - resourceUrl() { + getImageUrl() { + if (typeof this.uploadedImageUrl !== 'undefined') { + return this.uploadedImageUrl; + } + + return this.attrs.option?.imageUrl(); + } + + resourceUrl(context: string) { let url = app.forum.attribute('apiUrl') + '/fof/polls/pollOptionImage'; const poll = this.attrs.poll; const option = this.attrs.option; - if (poll?.exists) url += '/' + poll?.id(); + if (poll?.exists && context === 'save') url += '/' + poll?.id(); if (option?.exists) url += '/' + option?.id(); return url; diff --git a/resources/less/forum.less b/resources/less/forum.less index da6c7ce8..7d465dc9 100755 --- a/resources/less/forum.less +++ b/resources/less/forum.less @@ -199,6 +199,13 @@ } } +.Poll-answer-input { + .Form-group { + display: flex; + column-gap: 2em; + } +} + .ComposePollHero { &-controls { margin-left:2em;display: flex; diff --git a/src/Api/Controllers/DeletePollImageController.php b/src/Api/Controllers/DeletePollImageController.php index 1b2b543a..f67c4543 100644 --- a/src/Api/Controllers/DeletePollImageController.php +++ b/src/Api/Controllers/DeletePollImageController.php @@ -36,7 +36,7 @@ public function __construct(Factory $filesystemFactory) public function handle(ServerRequestInterface $request): ResponseInterface { $pollId = Arr::get($request->getQueryParams(), 'pollId'); - $poll = Poll::find($pollId); + $poll = Poll::findOrFail($pollId); $actor = RequestUtil::getActor($request); $actor->assertCan('edit', $poll); diff --git a/src/Api/Controllers/DeletePollOptionImageController.php b/src/Api/Controllers/DeletePollOptionImageController.php index 63aaee43..758b570b 100644 --- a/src/Api/Controllers/DeletePollOptionImageController.php +++ b/src/Api/Controllers/DeletePollOptionImageController.php @@ -35,8 +35,8 @@ public function __construct(Factory $filesystemFactory) public function handle(ServerRequestInterface $request): ResponseInterface { - $pollOptionId = Arr::get($request->getQueryParams(), 'id'); - $pollOption = PollOption::find($pollOptionId); + $pollOptionId = Arr::get($request->getQueryParams(), 'optionId'); + $pollOption = PollOption::findOrFail($pollOptionId); $actor = RequestUtil::getActor($request); $actor->assertCan('edit', $pollOption->poll); diff --git a/src/Api/Controllers/UploadPollImageController.php b/src/Api/Controllers/UploadPollImageController.php index e08947ea..dfffc56c 100644 --- a/src/Api/Controllers/UploadPollImageController.php +++ b/src/Api/Controllers/UploadPollImageController.php @@ -63,13 +63,13 @@ public function handle(ServerRequestInterface $request): ResponseInterface $encodedImage = $this->makeImage($file); $uploadName = $this->filenamePrefix.'-'.Str::lower(Str::random(8)).'.png'; - - $this->uploadDir->put($this->createLocalPath($uploadName, $pollId), $encodedImage); + $path = $this->createLocalPath($uploadName, $pollId); + $this->uploadDir->put($path, $encodedImage); $this->linkToRecord($pollId, $uploadName); return new JsonResponse([ - 'fileUrl' => $this->uploadDir->url($uploadName), + 'fileUrl' => $this->uploadDir->url($path), 'fileName' => $uploadName, ]); } diff --git a/src/Api/Serializers/PollOptionSerializer.php b/src/Api/Serializers/PollOptionSerializer.php index 093b2bc1..651a77df 100755 --- a/src/Api/Serializers/PollOptionSerializer.php +++ b/src/Api/Serializers/PollOptionSerializer.php @@ -35,6 +35,7 @@ protected function getDefaultAttributes($option) $attributes = [ 'answer' => $option->answer, 'imageUrl' => $this->getImageUrl($option), + 'image' => $option->image, 'createdAt' => $this->formatDate($option->created_at), 'updatedAt' => $this->formatDate($option->updated_at), 'voteCount' => $this->actor->can('seeVoteCount', $option->poll) ? (int) $option->vote_count : null, diff --git a/src/PollOption.php b/src/PollOption.php index aa96a569..3f2d347e 100755 --- a/src/PollOption.php +++ b/src/PollOption.php @@ -17,7 +17,6 @@ * @property int $id * @property string $answer * @property string $image - * @property string $image_alt * @property Poll $poll * @property int $poll_id * @property int $vote_count @@ -36,7 +35,7 @@ class PollOption extends AbstractModel 'updated_at', ]; - protected $fillable = ['answer', 'image', 'image_alt']; + protected $fillable = ['answer', 'image']; /** * @param $answer