{"version":3,"file":"discourse-post-voting.js","names":["define","_exports","_component","_service","_dButton","_concatClass","_component2","_templateFactory","Object","defineProperty","value","default","PostVotingAnswerButton","shouldRender","args","state","canCreatePost","post","post_number","dt7948","g","this","prototype","service","site","i","showLabel","desktopView","setComponentTemplate","createTemplateFactory","id","block","moduleName","scope","isStrictMode","_object","_truthHelpers","_discourseI18n","ORDER_BY_ACTIVITY_FILTER","PostVotingAnswerHeader","topic","is_post_voting","repliesToPostNumber","topicPageQueryParams","replies_to_post_number","positionInStream","parseInt","posts_count","postStream","stream","outletArgs","answersCount","sortedByActivity","filter","orderByVotes","orderStreamByVotes","actions","updateTopicPageQueryParams","n","action","orderByActivity","orderStreamByActivity","i18n","not","_modifier","PostVotingButton","buttonClasses","classes","direction","voted","disabled","loading","iconName","onClick","removeVote","vote","on","_flag","_ajax","_ajaxError","_postVotingFlag","PostVotingCommentActions","dialog","modal","currentUser","comment","hasPermission","user_id","admin","moderator","canEdit","canFlag","can_flag_post_voting_comments","deleteConfirm","message","didConfirm","data","comment_id","ajax","type","then","removeComment","catch","popupAjaxError","showFlag","availableFlags","available_flags","show","model","flagTarget","flagModel","setHidden","hidden","_tracking","PostVotingCommentComposer","siteSettings","tracked","raw","onInput","event","target","errorMessage","length","min_post_length","count","post_voting_comment_max_raw_length","remainingCharacters","_postVotingCommentComposer","PostVotingCommentEditor","submitDisabled","updateValue","onKeyDown","e","key","ctrlKey","metaKey","saveComment","onSave","finally","_template","_formatDate","_formatUsername","_routeAction","_url","_postVotingButton","_postVotingCommentActions","_postVotingCommentEditor","buildAnchorId","commentId","PostVotingComment","isEditing","isVoting","anchorId","updateComment","collapseEditor","onCancel","expandEditor","htmlSafe","userPath","PostVotingCommentsMenuComposer","post_id","response","_runloop","_rsvp","_postVotingCommentsMenuComposer","PostVotingCommentsMenu","expanded","hasMoreComments","moreCommentCount","handleSave","closeComposer","appendComments","expandComposer","fetchComments","schedule","textArea","document","querySelector","postNumber","focus","select","Promise","resolve","last_comment_id","lastCommentId","comments","_postVotingComment","_postVotingCommentsMenu","PostVotingComments","comments_count","at","closed","archived","push","indexToRemove","findIndex","deleted","splice","index","oldComment","updatedComment","post_voting_vote_count","user_voted","_postVotingUtilities","_postVotingWhoVotedList","PostVotingVoteControls","showWhoVoted","hasVotes","post_voting_has_votes","votedUp","post_voting_user_voted_direction","votedDown","countChange","voteCount","error","showLogin","isUpVote","castVote","setProperties","toggleWhoVoted","_helper","_asyncContent","_smallUserList","_dIcon","_decorators","_closeOnClickOutside","_templateOnly","PostVotingWhoVotedList","calcRemainingCount","voters","bind","splitUpAndDownLists","upVoters","downVoters","forEach","voter","up","down","loadWhoVoted","result","whoVoted","map","userAttrs","smallUserAttrs","hash","PostVotingSmallUserList","get","eq","undefined","_routing","_reviewableCreatedBy","_reviewablePostHeader","_categoryBadge","ReviewablePostVotingComment","store","constructor","super","arguments","fetchPost","find","reviewable","or","LinkTo","array","_reviewablePostEdits","_createdBy","_topicLink","_highlightWatchedWords","PostVotingCategorySettings","c","Input","classNames","tagName","_bodyClass","_postVotingAnswerHeader","AddPostVotingTopicPageClass","_pluginApi","name","initialize","container","lookup","post_voting_enabled","withPluginApi","api","registerCustomPostMessageCallback","topicController","findLoadedPost","indexToUpdate","comment_raw","cooked","comment_cooked","indexToDelete","set","some","props","post_voting_user_voted_id","_composer","after","serializeOnCreate","customizeComposerText","actionTitle","createAsPostVoting","onlyPostVotingInThisCategory","saveLabel","modifyClass","pluginId","togglePostVotingSelected","options","toggleProperty","notifyPropertyChange","modifySelectKit","appendContent","CREATE_TOPIC","composerModel","description","icon","categoryCreateAsPostVotingDefault","observer","category","create_as_post_voting_default","only_post_voting_in_this_category","creatingTopic","_trackedTools","_postVotingAnswerButton","_postVotingComments","_postVotingVoteControls","initPlugin","Superclass","trackedArray","addTrackedPostProperties","cancelFilter","refreshAndJumpToSecondVisible","renderAfterWrapperOutlet","renderBeforeWrapperOutlet","customizePost","registerValueTransformer","dag","context","buttonKeys","add","SHOW_MORE","REPLY","delete","post_voting_enable_likes_on_answers","LIKE","renderInOutlet","post_voting_comment_enabled","reply_to_post_number","filteredRepliesView","repliesShown","customizePostMenu","registerCustomLastUnreadUrlCallback","last_read_post_number","highest_post_number","urlForPostNumber","_utilities","registerNotificationTypeRenderer","NotificationTypeBase","linkTitle","linkHref","postUrl","notification","slug","topicId","post_voting_comment_id","PostVotingFlag","title","customSubmitLabel","submitLabel","flagCreatedEvent","flagsAvailable","flagModal","flagTypes","flag","includes","name_key","notifyUserIndex","notifyUser","create","opts","closeModal","method","flag_type_id","selected","is_warning","isWarning","take_action","takeAction","queue_for_review"],"sources":["discourse/plugins/discourse-post-voting/discourse/components/post-voting-answer-button.js","discourse/plugins/discourse-post-voting/discourse/components/post-voting-answer-header.js","discourse/plugins/discourse-post-voting/discourse/components/post-voting-button.js","discourse/plugins/discourse-post-voting/discourse/components/post-voting-comment-actions.js","discourse/plugins/discourse-post-voting/discourse/components/post-voting-comment-composer.js","discourse/plugins/discourse-post-voting/discourse/components/post-voting-comment-editor.js","discourse/plugins/discourse-post-voting/discourse/components/post-voting-comment.js","discourse/plugins/discourse-post-voting/discourse/components/post-voting-comments-menu-composer.js","discourse/plugins/discourse-post-voting/discourse/components/post-voting-comments-menu.js","discourse/plugins/discourse-post-voting/discourse/components/post-voting-comments.js","discourse/plugins/discourse-post-voting/discourse/components/post-voting-vote-controls.js","discourse/plugins/discourse-post-voting/discourse/components/post-voting-who-voted-list.js","discourse/plugins/discourse-post-voting/discourse/components/reviewable-post-voting-comment.js","discourse/plugins/discourse-post-voting/discourse/components/reviewable-refresh/post-voting-comment.js","discourse/plugins/discourse-post-voting/discourse/connectors/category-custom-settings/post-voting-category-settings.js","discourse/plugins/discourse-post-voting/discourse/connectors/topic-above-post-stream/add-post-voting-topic-page-class.js","discourse/plugins/discourse-post-voting/discourse/initializers/custom-post-message-callbacks.js","discourse/plugins/discourse-post-voting/discourse/initializers/extend-composer-actions.js","discourse/plugins/discourse-post-voting/discourse/initializers/post-voting-edits.js","discourse/plugins/discourse-post-voting/discourse/initializers/post-voting-icon.js","discourse/plugins/discourse-post-voting/discourse/lib/post-voting-flag.js","discourse/plugins/discourse-post-voting/discourse/lib/post-voting-utilities.js"],"sourcesContent":["define(\"discourse/plugins/discourse-post-voting/discourse/components/post-voting-answer-button\", [\"exports\", \"@glimmer/component\", \"@ember/service\", \"discourse/components/d-button\", \"discourse/helpers/concat-class\", \"@ember/component\", \"@ember/template-factory\"], function (_exports, _component, _service, _dButton, _concatClass, _component2, _templateFactory) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.default = void 0;\n  class PostVotingAnswerButton extends _component.default {\n    static shouldRender(args) {\n      return args.state.canCreatePost && args.post.post_number === 1;\n    }\n    static {\n      dt7948.g(this.prototype, \"site\", [_service.service]);\n    }\n    #site = (dt7948.i(this, \"site\"), void 0);\n    get showLabel() {\n      return this.site.desktopView;\n    }\n    static {\n      (0, _component2.setComponentTemplate)((0, _templateFactory.createTemplateFactory)(\n      /*\n        \n          <DButton\n            class={{concatClass\n              \"post-action-menu__post-voting-answer\"\n              \"reply\"\n              (if this.showLabel \"create fade-out\")\n            }}\n            ...attributes\n            @action={{@buttonActions.replyToPost}}\n            @icon=\"reply\"\n            @label={{if this.showLabel \"post_voting.topic.answer.label\"}}\n            @title=\"post_voting.topic.answer.help\"\n          />\n        \n      */\n      {\n        \"id\": \"Hav4KRsf\",\n        \"block\": \"[[[1,\\\"\\\\n    \\\"],[8,[32,0],[[16,0,[28,[32,1],[\\\"post-action-menu__post-voting-answer\\\",\\\"reply\\\",[52,[30,0,[\\\"showLabel\\\"]],\\\"create fade-out\\\"]],null]],[17,1]],[[\\\"@action\\\",\\\"@icon\\\",\\\"@label\\\",\\\"@title\\\"],[[30,2,[\\\"replyToPost\\\"]],\\\"reply\\\",[52,[30,0,[\\\"showLabel\\\"]],\\\"post_voting.topic.answer.label\\\"],\\\"post_voting.topic.answer.help\\\"]],null],[1,\\\"\\\\n  \\\"]],[\\\"&attrs\\\",\\\"@buttonActions\\\"],[\\\"if\\\"]]\",\n        \"moduleName\": \"/var/www/discourse/frontend/discourse/discourse/plugins/discourse-post-voting/discourse/components/post-voting-answer-button.js\",\n        \"scope\": () => [_dButton.default, _concatClass.default],\n        \"isStrictMode\": true\n      }), this);\n    }\n  }\n  _exports.default = PostVotingAnswerButton;\n});","define(\"discourse/plugins/discourse-post-voting/discourse/components/post-voting-answer-header\", [\"exports\", \"@glimmer/component\", \"@ember/object\", \"discourse/components/d-button\", \"discourse/helpers/concat-class\", \"discourse/truth-helpers\", \"discourse-i18n\", \"@ember/component\", \"@ember/template-factory\"], function (_exports, _component, _object, _dButton, _concatClass, _truthHelpers, _discourseI18n, _component2, _templateFactory) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.default = _exports.ORDER_BY_ACTIVITY_FILTER = void 0;\n  const ORDER_BY_ACTIVITY_FILTER = _exports.ORDER_BY_ACTIVITY_FILTER = \"activity\";\n  class PostVotingAnswerHeader extends _component.default {\n    static shouldRender(args) {\n      const post = args.post;\n      if (!post?.topic?.is_post_voting) {\n        return false;\n      }\n      const repliesToPostNumber = args.topicPageQueryParams.replies_to_post_number;\n      const positionInStream = repliesToPostNumber && parseInt(repliesToPostNumber, 10) !== 1 ? 2 : 1;\n      const answersCount = post.topic.posts_count - 1;\n      return answersCount > 0 && post.id === post.topic.postStream.stream[positionInStream];\n    }\n    get post() {\n      return this.args.outletArgs.post;\n    }\n    get answersCount() {\n      return this.post.topic.posts_count - 1;\n    }\n    get sortedByActivity() {\n      return this.args.outletArgs.topicPageQueryParams.filter === ORDER_BY_ACTIVITY_FILTER;\n    }\n    async orderByVotes() {\n      await this.post.topic.postStream.orderStreamByVotes();\n      this.args.outletArgs.actions.updateTopicPageQueryParams();\n    }\n    static {\n      dt7948.n(this.prototype, \"orderByVotes\", [_object.action]);\n    }\n    async orderByActivity() {\n      await this.post.topic.postStream.orderStreamByActivity();\n      this.args.outletArgs.actions.updateTopicPageQueryParams();\n    }\n    static {\n      dt7948.n(this.prototype, \"orderByActivity\", [_object.action]);\n    }\n    static {\n      (0, _component2.setComponentTemplate)((0, _templateFactory.createTemplateFactory)(\n      /*\n        \n          <div class=\"post-voting-answers-header small-action\">\n            <span class=\"post-voting-answers-headers-count\">\n              {{i18n \"post_voting.topic.answer_count\" count=this.answersCount}}\n            </span>\n            <span class=\"post-voting-answers-headers-sort\">\n              <span>\n                {{i18n \"post_voting.topic.activity\"}}\n              </span>\n              <DButton\n                class={{concatClass\n                  \"post-voting-answers-headers-sort-votes\"\n                  (unless this.sortedByActivity \"active\")\n                }}\n                @disabled={{not this.sortedByActivity}}\n                @label=\"post_voting.topic.votes\"\n                @action={{this.orderByVotes}}\n              />\n              <DButton\n                class={{concatClass\n                  \"post-voting-answers-headers-sort-activity\"\n                  (if this.sortedByActivity \"active\")\n                }}\n                @disabled={{this.sortedByActivity}}\n                @label=\"post_voting.topic.activity\"\n                @action={{this.orderByActivity}}\n              />\n            </span>\n          </div>\n        \n      */\n      {\n        \"id\": \"ZNBgD7p8\",\n        \"block\": \"[[[1,\\\"\\\\n    \\\"],[10,0],[14,0,\\\"post-voting-answers-header small-action\\\"],[12],[1,\\\"\\\\n      \\\"],[10,1],[14,0,\\\"post-voting-answers-headers-count\\\"],[12],[1,\\\"\\\\n        \\\"],[1,[28,[32,0],[\\\"post_voting.topic.answer_count\\\"],[[\\\"count\\\"],[[30,0,[\\\"answersCount\\\"]]]]]],[1,\\\"\\\\n      \\\"],[13],[1,\\\"\\\\n      \\\"],[10,1],[14,0,\\\"post-voting-answers-headers-sort\\\"],[12],[1,\\\"\\\\n        \\\"],[10,1],[12],[1,\\\"\\\\n          \\\"],[1,[28,[32,0],[\\\"post_voting.topic.activity\\\"],null]],[1,\\\"\\\\n        \\\"],[13],[1,\\\"\\\\n        \\\"],[8,[32,1],[[16,0,[28,[32,2],[\\\"post-voting-answers-headers-sort-votes\\\",[52,[51,[30,0,[\\\"sortedByActivity\\\"]]],\\\"active\\\"]],null]]],[[\\\"@disabled\\\",\\\"@label\\\",\\\"@action\\\"],[[28,[32,3],[[30,0,[\\\"sortedByActivity\\\"]]],null],\\\"post_voting.topic.votes\\\",[30,0,[\\\"orderByVotes\\\"]]]],null],[1,\\\"\\\\n        \\\"],[8,[32,1],[[16,0,[28,[32,2],[\\\"post-voting-answers-headers-sort-activity\\\",[52,[30,0,[\\\"sortedByActivity\\\"]],\\\"active\\\"]],null]]],[[\\\"@disabled\\\",\\\"@label\\\",\\\"@action\\\"],[[30,0,[\\\"sortedByActivity\\\"]],\\\"post_voting.topic.activity\\\",[30,0,[\\\"orderByActivity\\\"]]]],null],[1,\\\"\\\\n      \\\"],[13],[1,\\\"\\\\n    \\\"],[13],[1,\\\"\\\\n  \\\"]],[],[\\\"unless\\\",\\\"if\\\"]]\",\n        \"moduleName\": \"/var/www/discourse/frontend/discourse/discourse/plugins/discourse-post-voting/discourse/components/post-voting-answer-header.js\",\n        \"scope\": () => [_discourseI18n.i18n, _dButton.default, _concatClass.default, _truthHelpers.not],\n        \"isStrictMode\": true\n      }), this);\n    }\n  }\n  _exports.default = PostVotingAnswerHeader;\n});","define(\"discourse/plugins/discourse-post-voting/discourse/components/post-voting-button\", [\"exports\", \"@glimmer/component\", \"@ember/modifier\", \"@ember/object\", \"discourse/components/d-button\", \"discourse/helpers/concat-class\", \"@ember/component\", \"@ember/template-factory\"], function (_exports, _component, _modifier, _object, _dButton, _concatClass, _component2, _templateFactory) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.default = void 0;\n  class PostVotingButton extends _component.default {\n    get buttonClasses() {\n      let classes = this.args.direction === \"up\" ? \"post-voting-button-upvote\" : \"post-voting-button-downvote\";\n      if (this.args.voted) {\n        classes += \" post-voting-button-voted\";\n      }\n      return classes;\n    }\n    get disabled() {\n      return this.args.disabled || this.args.loading;\n    }\n    get iconName() {\n      return this.args.direction === \"up\" ? \"caret-up\" : \"caret-down\";\n    }\n    onClick() {\n      if (this.args.loading) {\n        return false;\n      }\n      if (this.args.voted) {\n        this.args.removeVote(this.args.direction);\n      } else {\n        this.args.vote(this.args.direction);\n      }\n    }\n    static {\n      dt7948.n(this.prototype, \"onClick\", [_object.action]);\n    }\n    static {\n      (0, _component2.setComponentTemplate)((0, _templateFactory.createTemplateFactory)(\n      /*\n        \n          <DButton\n            {{on \"click\" this.onClick}}\n            @disabled={{this.disabled}}\n            @icon={{this.iconName}}\n            class={{concatClass \"btn-flat post-voting-button\" this.buttonClasses}}\n          />\n        \n      */\n      {\n        \"id\": \"PmCyb6UB\",\n        \"block\": \"[[[1,\\\"\\\\n    \\\"],[8,[32,0],[[16,0,[28,[32,1],[\\\"btn-flat post-voting-button\\\",[30,0,[\\\"buttonClasses\\\"]]],null]],[4,[32,2],[\\\"click\\\",[30,0,[\\\"onClick\\\"]]],null]],[[\\\"@disabled\\\",\\\"@icon\\\"],[[30,0,[\\\"disabled\\\"]],[30,0,[\\\"iconName\\\"]]]],null],[1,\\\"\\\\n  \\\"]],[],[]]\",\n        \"moduleName\": \"/var/www/discourse/frontend/discourse/discourse/plugins/discourse-post-voting/discourse/components/post-voting-button.js\",\n        \"scope\": () => [_dButton.default, _concatClass.default, _modifier.on],\n        \"isStrictMode\": true\n      }), this);\n    }\n  }\n  _exports.default = PostVotingButton;\n});","define(\"discourse/plugins/discourse-post-voting/discourse/components/post-voting-comment-actions\", [\"exports\", \"@glimmer/component\", \"@ember/object\", \"@ember/service\", \"discourse/components/d-button\", \"discourse/components/modal/flag\", \"discourse/lib/ajax\", \"discourse/lib/ajax-error\", \"discourse-i18n\", \"discourse/plugins/discourse-post-voting/discourse/lib/post-voting-flag\", \"@ember/component\", \"@ember/template-factory\"], function (_exports, _component, _object, _service, _dButton, _flag, _ajax, _ajaxError, _discourseI18n, _postVotingFlag, _component2, _templateFactory) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.default = void 0;\n  class PostVotingCommentActions extends _component.default {\n    static {\n      dt7948.g(this.prototype, \"dialog\", [_service.service]);\n    }\n    #dialog = (dt7948.i(this, \"dialog\"), void 0);\n    static {\n      dt7948.g(this.prototype, \"modal\", [_service.service]);\n    }\n    #modal = (dt7948.i(this, \"modal\"), void 0);\n    static {\n      dt7948.g(this.prototype, \"currentUser\", [_service.service]);\n    }\n    #currentUser = (dt7948.i(this, \"currentUser\"), void 0);\n    static {\n      dt7948.g(this.prototype, \"site\", [_service.service]);\n    }\n    #site = (dt7948.i(this, \"site\"), void 0);\n    comment = this.args.comment;\n    get hasPermission() {\n      return this.comment.user_id === this.currentUser.id || this.currentUser.admin || this.currentUser.moderator;\n    }\n    get canEdit() {\n      return this.currentUser && this.hasPermission && !this.args.disabled;\n    }\n    get canFlag() {\n      return this.currentUser && (this.hasPermission || this.currentUser.can_flag_post_voting_comments) && !this.args.disabled;\n    }\n    deleteConfirm() {\n      this.dialog.deleteConfirm({\n        message: (0, _discourseI18n.i18n)(\"post_voting.post.post_voting_comment.delete.confirm\"),\n        didConfirm: () => {\n          const data = {\n            comment_id: this.args.id\n          };\n          (0, _ajax.ajax)(\"/post_voting/comments\", {\n            type: \"DELETE\",\n            data\n          }).then(() => {\n            this.args.removeComment(this.args.id);\n          }).catch(_ajaxError.popupAjaxError);\n        }\n      });\n    }\n    static {\n      dt7948.n(this.prototype, \"deleteConfirm\", [_object.action]);\n    }\n    showFlag() {\n      this.comment.availableFlags = this.comment.available_flags;\n      this.modal.show(_flag.default, {\n        model: {\n          flagTarget: new _postVotingFlag.default(),\n          flagModel: this.comment,\n          setHidden: () => this.comment.hidden = true,\n          site: this.site\n        }\n      });\n    }\n    static {\n      dt7948.n(this.prototype, \"showFlag\", [_object.action]);\n    }\n    static {\n      (0, _component2.setComponentTemplate)((0, _templateFactory.createTemplateFactory)(\n      /*\n        \n          {{#if this.canEdit}}\n            <span class=\"post-voting-comment-actions\">\n              <DButton\n                @display=\"link\"\n                class=\"post-voting-comment-actions-edit-link\"\n                @action={{@updateComment}}\n                @icon=\"pencil\"\n              />\n              <DButton\n                @display=\"link\"\n                class=\"post-voting-comment-actions-delete-link\"\n                @action={{this.deleteConfirm}}\n                @icon=\"far-trash-can\"\n              />\n              {{#if this.canFlag}}\n                <DButton\n                  @display=\"link\"\n                  class=\"post-voting-comment-actions-flag-link\"\n                  @action={{this.showFlag}}\n                  @icon=\"flag\"\n                />\n              {{/if}}\n            </span>\n          {{/if}}\n        \n      */\n      {\n        \"id\": \"2zJ4MUFi\",\n        \"block\": \"[[[1,\\\"\\\\n\\\"],[41,[30,0,[\\\"canEdit\\\"]],[[[1,\\\"      \\\"],[10,1],[14,0,\\\"post-voting-comment-actions\\\"],[12],[1,\\\"\\\\n        \\\"],[8,[32,0],[[24,0,\\\"post-voting-comment-actions-edit-link\\\"]],[[\\\"@display\\\",\\\"@action\\\",\\\"@icon\\\"],[\\\"link\\\",[30,1],\\\"pencil\\\"]],null],[1,\\\"\\\\n        \\\"],[8,[32,0],[[24,0,\\\"post-voting-comment-actions-delete-link\\\"]],[[\\\"@display\\\",\\\"@action\\\",\\\"@icon\\\"],[\\\"link\\\",[30,0,[\\\"deleteConfirm\\\"]],\\\"far-trash-can\\\"]],null],[1,\\\"\\\\n\\\"],[41,[30,0,[\\\"canFlag\\\"]],[[[1,\\\"          \\\"],[8,[32,0],[[24,0,\\\"post-voting-comment-actions-flag-link\\\"]],[[\\\"@display\\\",\\\"@action\\\",\\\"@icon\\\"],[\\\"link\\\",[30,0,[\\\"showFlag\\\"]],\\\"flag\\\"]],null],[1,\\\"\\\\n\\\"]],[]],null],[1,\\\"      \\\"],[13],[1,\\\"\\\\n\\\"]],[]],null],[1,\\\"  \\\"]],[\\\"@updateComment\\\"],[\\\"if\\\"]]\",\n        \"moduleName\": \"/var/www/discourse/frontend/discourse/discourse/plugins/discourse-post-voting/discourse/components/post-voting-comment-actions.js\",\n        \"scope\": () => [_dButton.default],\n        \"isStrictMode\": true\n      }), this);\n    }\n  }\n  _exports.default = PostVotingCommentActions;\n});","define(\"discourse/plugins/discourse-post-voting/discourse/components/post-voting-comment-composer\", [\"exports\", \"@glimmer/component\", \"@glimmer/tracking\", \"@ember/modifier\", \"@ember/object\", \"@ember/service\", \"discourse-i18n\", \"@ember/component\", \"@ember/template-factory\"], function (_exports, _component, _tracking, _modifier, _object, _service, _discourseI18n, _component2, _templateFactory) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.default = void 0;\n  class PostVotingCommentComposer extends _component.default {\n    static {\n      dt7948.g(this.prototype, \"siteSettings\", [_service.service]);\n    }\n    #siteSettings = (dt7948.i(this, \"siteSettings\"), void 0);\n    static {\n      dt7948.g(this.prototype, \"value\", [_tracking.tracked], function () {\n        return this.args.raw ?? \"\";\n      });\n    }\n    #value = (dt7948.i(this, \"value\"), void 0);\n    onInput(event) {\n      this.value = event.target.value;\n      this.args.onInput?.(event.target.value);\n    }\n    static {\n      dt7948.n(this.prototype, \"onInput\", [_object.action]);\n    }\n    get errorMessage() {\n      if (this.value.length < this.siteSettings.min_post_length) {\n        return (0, _discourseI18n.i18n)(\"post_voting.post.post_voting_comment.composer.too_short\", {\n          count: this.siteSettings.min_post_length\n        });\n      }\n      if (this.value.length > this.siteSettings.post_voting_comment_max_raw_length) {\n        return (0, _discourseI18n.i18n)(\"post_voting.post.post_voting_comment.composer.too_long\", {\n          count: this.siteSettings.post_voting_comment_max_raw_length\n        });\n      }\n    }\n    get remainingCharacters() {\n      return this.siteSettings.post_voting_comment_max_raw_length - this.value.length;\n    }\n    static {\n      (0, _component2.setComponentTemplate)((0, _templateFactory.createTemplateFactory)(\n      /*\n        \n          <div class=\"post-voting-comment-composer\">\n            <textarea\n              class=\"post-voting-comment-composer-textarea\"\n              value={{this.value}}\n              {{on \"input\" this.onInput}}\n              {{on \"keydown\" @onKeyDown}}\n            ></textarea>\n      \n            {{#if this.value.length}}\n              {{#if this.errorMessage}}\n                <div class=\"post-voting-comment-composer-flash error\">\n                  {{this.errorMessage}}\n                </div>\n              {{else}}\n                <div class=\"post-voting-comment-composer-flash\">\n                  {{i18n\n                    \"post_voting.post.post_voting_comment.composer.length_ok\"\n                    count=this.remainingCharacters\n                  }}\n                </div>\n              {{/if}}\n            {{/if}}\n          </div>\n        \n      */\n      {\n        \"id\": \"Kqxq6y+S\",\n        \"block\": \"[[[1,\\\"\\\\n    \\\"],[10,0],[14,0,\\\"post-voting-comment-composer\\\"],[12],[1,\\\"\\\\n      \\\"],[11,\\\"textarea\\\"],[24,0,\\\"post-voting-comment-composer-textarea\\\"],[16,2,[30,0,[\\\"value\\\"]]],[4,[32,0],[\\\"input\\\",[30,0,[\\\"onInput\\\"]]],null],[4,[32,0],[\\\"keydown\\\",[30,1]],null],[12],[13],[1,\\\"\\\\n\\\\n\\\"],[41,[30,0,[\\\"value\\\",\\\"length\\\"]],[[[41,[30,0,[\\\"errorMessage\\\"]],[[[1,\\\"          \\\"],[10,0],[14,0,\\\"post-voting-comment-composer-flash error\\\"],[12],[1,\\\"\\\\n            \\\"],[1,[30,0,[\\\"errorMessage\\\"]]],[1,\\\"\\\\n          \\\"],[13],[1,\\\"\\\\n\\\"]],[]],[[[1,\\\"          \\\"],[10,0],[14,0,\\\"post-voting-comment-composer-flash\\\"],[12],[1,\\\"\\\\n            \\\"],[1,[28,[32,1],[\\\"post_voting.post.post_voting_comment.composer.length_ok\\\"],[[\\\"count\\\"],[[30,0,[\\\"remainingCharacters\\\"]]]]]],[1,\\\"\\\\n          \\\"],[13],[1,\\\"\\\\n\\\"]],[]]]],[]],null],[1,\\\"    \\\"],[13],[1,\\\"\\\\n  \\\"]],[\\\"@onKeyDown\\\"],[\\\"if\\\"]]\",\n        \"moduleName\": \"/var/www/discourse/frontend/discourse/discourse/plugins/discourse-post-voting/discourse/components/post-voting-comment-composer.js\",\n        \"scope\": () => [_modifier.on, _discourseI18n.i18n],\n        \"isStrictMode\": true\n      }), this);\n    }\n  }\n  _exports.default = PostVotingCommentComposer;\n});","define(\"discourse/plugins/discourse-post-voting/discourse/components/post-voting-comment-editor\", [\"exports\", \"@glimmer/component\", \"@glimmer/tracking\", \"@ember/object\", \"@ember/service\", \"discourse/components/d-button\", \"discourse/lib/ajax\", \"discourse/lib/ajax-error\", \"discourse/plugins/discourse-post-voting/discourse/components/post-voting-comment-composer\", \"@ember/component\", \"@ember/template-factory\"], function (_exports, _component, _tracking, _object, _service, _dButton, _ajax, _ajaxError, _postVotingCommentComposer, _component2, _templateFactory) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.default = void 0;\n  class PostVotingCommentEditor extends _component.default {\n    static {\n      dt7948.g(this.prototype, \"siteSettings\", [_service.service]);\n    }\n    #siteSettings = (dt7948.i(this, \"siteSettings\"), void 0);\n    static {\n      dt7948.g(this.prototype, \"value\", [_tracking.tracked], function () {\n        return this.args.raw;\n      });\n    }\n    #value = (dt7948.i(this, \"value\"), void 0);\n    static {\n      dt7948.g(this.prototype, \"submitDisabled\", [_tracking.tracked], function () {\n        return true;\n      });\n    }\n    #submitDisabled = (dt7948.i(this, \"submitDisabled\"), void 0);\n    updateValue(value) {\n      this.value = value;\n      this.submitDisabled = value.length < this.siteSettings.min_post_length || value.length > this.siteSettings.post_voting_comment_max_raw_length;\n    }\n    static {\n      dt7948.n(this.prototype, \"updateValue\", [_object.action]);\n    }\n    onKeyDown(e) {\n      if (e.key === \"Enter\" && (e.ctrlKey || e.metaKey)) {\n        this.saveComment();\n      }\n    }\n    static {\n      dt7948.n(this.prototype, \"onKeyDown\", [_object.action]);\n    }\n    saveComment() {\n      this.submitDisabled = true;\n      const data = {\n        comment_id: this.args.id,\n        raw: this.value\n      };\n      return (0, _ajax.ajax)(\"/post_voting/comments\", {\n        type: \"PUT\",\n        data\n      }).then(this.args.onSave).catch(_ajaxError.popupAjaxError).finally(() => {\n        this.submitDisabled = false;\n      });\n    }\n    static {\n      dt7948.n(this.prototype, \"saveComment\", [_object.action]);\n    }\n    static {\n      (0, _component2.setComponentTemplate)((0, _templateFactory.createTemplateFactory)(\n      /*\n        \n          <div class=\"post-voting-comment-editor post-voting-comment-editor-{{@id}}\">\n            <PostVotingCommentComposer\n              @onInput={{this.updateValue}}\n              @raw={{@raw}}\n              @onKeyDown={{this.onKeyDown}}\n            />\n      \n            <DButton\n              @action={{this.saveComment}}\n              @disabled={{this.submitDisabled}}\n              @label=\"post_voting.post.post_voting_comment.edit\"\n              @icon=\"pencil\"\n              class=\"btn-primary post-voting-comment-editor-submit\"\n            />\n      \n            <DButton\n              @display=\"link\"\n              @action={{@onCancel}}\n              @label=\"post_voting.post.post_voting_comment.cancel\"\n              class=\"post-voting-comment-editor-cancel\"\n            />\n          </div>\n        \n      */\n      {\n        \"id\": \"ljaE5ovz\",\n        \"block\": \"[[[1,\\\"\\\\n    \\\"],[10,0],[15,0,[29,[\\\"post-voting-comment-editor post-voting-comment-editor-\\\",[30,1]]]],[12],[1,\\\"\\\\n      \\\"],[8,[32,0],null,[[\\\"@onInput\\\",\\\"@raw\\\",\\\"@onKeyDown\\\"],[[30,0,[\\\"updateValue\\\"]],[30,2],[30,0,[\\\"onKeyDown\\\"]]]],null],[1,\\\"\\\\n\\\\n      \\\"],[8,[32,1],[[24,0,\\\"btn-primary post-voting-comment-editor-submit\\\"]],[[\\\"@action\\\",\\\"@disabled\\\",\\\"@label\\\",\\\"@icon\\\"],[[30,0,[\\\"saveComment\\\"]],[30,0,[\\\"submitDisabled\\\"]],\\\"post_voting.post.post_voting_comment.edit\\\",\\\"pencil\\\"]],null],[1,\\\"\\\\n\\\\n      \\\"],[8,[32,1],[[24,0,\\\"post-voting-comment-editor-cancel\\\"]],[[\\\"@display\\\",\\\"@action\\\",\\\"@label\\\"],[\\\"link\\\",[30,3],\\\"post_voting.post.post_voting_comment.cancel\\\"]],null],[1,\\\"\\\\n    \\\"],[13],[1,\\\"\\\\n  \\\"]],[\\\"@id\\\",\\\"@raw\\\",\\\"@onCancel\\\"],[]]\",\n        \"moduleName\": \"/var/www/discourse/frontend/discourse/discourse/plugins/discourse-post-voting/discourse/components/post-voting-comment-editor.js\",\n        \"scope\": () => [_postVotingCommentComposer.default, _dButton.default],\n        \"isStrictMode\": true\n      }), this);\n    }\n  }\n  _exports.default = PostVotingCommentEditor;\n});","define(\"discourse/plugins/discourse-post-voting/discourse/components/post-voting-comment\", [\"exports\", \"@glimmer/component\", \"@glimmer/tracking\", \"@ember/object\", \"@ember/service\", \"@ember/template\", \"discourse/helpers/format-date\", \"discourse/helpers/format-username\", \"discourse/helpers/route-action\", \"discourse/lib/ajax\", \"discourse/lib/ajax-error\", \"discourse/lib/url\", \"discourse-i18n\", \"discourse/plugins/discourse-post-voting/discourse/components/post-voting-button\", \"discourse/plugins/discourse-post-voting/discourse/components/post-voting-comment-actions\", \"discourse/plugins/discourse-post-voting/discourse/components/post-voting-comment-editor\", \"@ember/component\", \"@ember/template-factory\"], function (_exports, _component, _tracking, _object, _service, _template, _formatDate, _formatUsername, _routeAction, _ajax, _ajaxError, _url, _discourseI18n, _postVotingButton, _postVotingCommentActions, _postVotingCommentEditor, _component2, _templateFactory) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.buildAnchorId = buildAnchorId;\n  _exports.default = void 0;\n  function buildAnchorId(commentId) {\n    return `post-voting-comment-${commentId}`;\n  }\n  class PostVotingComment extends _component.default {\n    static {\n      dt7948.g(this.prototype, \"currentUser\", [_service.service]);\n    }\n    #currentUser = (dt7948.i(this, \"currentUser\"), void 0);\n    static {\n      dt7948.g(this.prototype, \"isEditing\", [_tracking.tracked], function () {\n        return false;\n      });\n    }\n    #isEditing = (dt7948.i(this, \"isEditing\"), void 0);\n    static {\n      dt7948.g(this.prototype, \"isVoting\", [_tracking.tracked], function () {\n        return false;\n      });\n    }\n    #isVoting = (dt7948.i(this, \"isVoting\"), void 0);\n    static {\n      dt7948.g(this.prototype, \"hidden\", [_tracking.tracked], function () {\n        return false;\n      });\n    }\n    #hidden = (dt7948.i(this, \"hidden\"), void 0);\n    get anchorId() {\n      return buildAnchorId(this.args.comment.id);\n    }\n    onSave(comment) {\n      this.args.updateComment(comment);\n      this.collapseEditor();\n    }\n    static {\n      dt7948.n(this.prototype, \"onSave\", [_object.action]);\n    }\n    onCancel() {\n      this.collapseEditor();\n    }\n    static {\n      dt7948.n(this.prototype, \"onCancel\", [_object.action]);\n    }\n    removeVote() {\n      this.isVoting = true;\n      this.args.removeVote(this.args.comment.id);\n      return (0, _ajax.ajax)(\"/post_voting/vote/comment\", {\n        type: \"DELETE\",\n        data: {\n          comment_id: this.args.comment.id\n        }\n      }).catch(e => {\n        this.args.vote(this.args.comment.id);\n        (0, _ajaxError.popupAjaxError)(e);\n      }).finally(() => {\n        this.isVoting = false;\n      });\n    }\n    static {\n      dt7948.n(this.prototype, \"removeVote\", [_object.action]);\n    }\n    vote(direction) {\n      if (direction !== \"up\") {\n        return;\n      }\n      this.isVoting = true;\n      this.args.vote(this.args.comment.id);\n      return (0, _ajax.ajax)(\"/post_voting/vote/comment\", {\n        type: \"POST\",\n        data: {\n          comment_id: this.args.comment.id\n        }\n      }).catch(e => {\n        this.args.removeVote(this.args.comment.id);\n        (0, _ajaxError.popupAjaxError)(e);\n      }).finally(() => {\n        this.isVoting = false;\n      });\n    }\n    static {\n      dt7948.n(this.prototype, \"vote\", [_object.action]);\n    }\n    expandEditor() {\n      this.isEditing = true;\n    }\n    static {\n      dt7948.n(this.prototype, \"expandEditor\", [_object.action]);\n    }\n    collapseEditor() {\n      this.isEditing = false;\n    }\n    static {\n      dt7948.n(this.prototype, \"collapseEditor\", [_object.action]);\n    }\n    static {\n      (0, _component2.setComponentTemplate)((0, _templateFactory.createTemplateFactory)(\n      /*\n        \n          <div\n            id={{this.anchorId}}\n            class=\"post-voting-comment\n              {{if @comment.deleted 'post-voting-comment-deleted'}}\"\n          >\n            {{#if this.isEditing}}\n              <PostVotingCommentEditor\n                @id={{@comment.id}}\n                @raw={{@comment.raw}}\n                @onSave={{this.onSave}}\n                @onCancel={{this.onCancel}}\n              />\n            {{else}}\n              <div class=\"post-voting-comment-actions-vote\">\n                {{#if @comment.post_voting_vote_count}}\n                  <span\n                    class=\"post-voting-comment-actions-vote-count\"\n                  >{{@comment.post_voting_vote_count}}</span>\n                {{/if}}\n      \n                <PostVotingButton\n                  @direction=\"up\"\n                  @loading={{@isVoting}}\n                  @voted={{@comment.user_voted}}\n                  @removeVote={{this.removeVote}}\n                  @vote={{if this.currentUser this.vote (routeAction \"showLogin\")}}\n                  @disabled={{@disabled}}\n                />\n              </div>\n      \n              <div class=\"post-voting-comment-post\">\n                <span class=\"post-voting-comment-cooked\">{{htmlSafe\n                    @comment.cooked\n                  }}</span>\n      \n                <span class=\"post-voting-comment-info-separator\">–</span>\n      \n                {{#if @comment.username}}\n                  <a\n                    href={{userPath @comment.username}}\n                    class=\"post-voting-comment-info-username\"\n                    data-user-card={{@comment.username}}\n                  >\n                    {{formatUsername @comment.username}}\n                  </a>\n                {{else}}\n                  <span\n                    class=\"post-voting-comment-info-username post-voting-comment-info-username-deleted\"\n                  >\n                    {{i18n \"post_voting.post.post_voting_comment.user.deleted\"}}\n                  </span>\n                {{/if}}\n      \n                <span class=\"post-voting-comment-info-created\">\n                  {{formatDate @comment.created_at}}\n                </span>\n      \n                <PostVotingCommentActions\n                  @id={{@comment.id}}\n                  @updateComment={{this.expandEditor}}\n                  @removeComment={{@removeComment}}\n                  @comment={{@comment}}\n                  @disabled={{@disabled}}\n                />\n      \n              </div>\n            {{/if}}\n          </div>\n        \n      */\n      {\n        \"id\": \"7oVJdyAa\",\n        \"block\": \"[[[1,\\\"\\\\n    \\\"],[10,0],[15,1,[30,0,[\\\"anchorId\\\"]]],[15,0,[29,[\\\"post-voting-comment\\\\n        \\\",[52,[30,1,[\\\"deleted\\\"]],\\\"post-voting-comment-deleted\\\"]]]],[12],[1,\\\"\\\\n\\\"],[41,[30,0,[\\\"isEditing\\\"]],[[[1,\\\"        \\\"],[8,[32,0],null,[[\\\"@id\\\",\\\"@raw\\\",\\\"@onSave\\\",\\\"@onCancel\\\"],[[30,1,[\\\"id\\\"]],[30,1,[\\\"raw\\\"]],[30,0,[\\\"onSave\\\"]],[30,0,[\\\"onCancel\\\"]]]],null],[1,\\\"\\\\n\\\"]],[]],[[[1,\\\"        \\\"],[10,0],[14,0,\\\"post-voting-comment-actions-vote\\\"],[12],[1,\\\"\\\\n\\\"],[41,[30,1,[\\\"post_voting_vote_count\\\"]],[[[1,\\\"            \\\"],[10,1],[14,0,\\\"post-voting-comment-actions-vote-count\\\"],[12],[1,[30,1,[\\\"post_voting_vote_count\\\"]]],[13],[1,\\\"\\\\n\\\"]],[]],null],[1,\\\"\\\\n          \\\"],[8,[32,1],null,[[\\\"@direction\\\",\\\"@loading\\\",\\\"@voted\\\",\\\"@removeVote\\\",\\\"@vote\\\",\\\"@disabled\\\"],[\\\"up\\\",[30,2],[30,1,[\\\"user_voted\\\"]],[30,0,[\\\"removeVote\\\"]],[52,[30,0,[\\\"currentUser\\\"]],[30,0,[\\\"vote\\\"]],[28,[32,2],[\\\"showLogin\\\"],null]],[30,3]]],null],[1,\\\"\\\\n        \\\"],[13],[1,\\\"\\\\n\\\\n        \\\"],[10,0],[14,0,\\\"post-voting-comment-post\\\"],[12],[1,\\\"\\\\n          \\\"],[10,1],[14,0,\\\"post-voting-comment-cooked\\\"],[12],[1,[28,[32,3],[[30,1,[\\\"cooked\\\"]]],null]],[13],[1,\\\"\\\\n\\\\n          \\\"],[10,1],[14,0,\\\"post-voting-comment-info-separator\\\"],[12],[1,\\\"–\\\"],[13],[1,\\\"\\\\n\\\\n\\\"],[41,[30,1,[\\\"username\\\"]],[[[1,\\\"            \\\"],[10,3],[15,6,[28,[32,4],[[30,1,[\\\"username\\\"]]],null]],[14,0,\\\"post-voting-comment-info-username\\\"],[15,\\\"data-user-card\\\",[30,1,[\\\"username\\\"]]],[12],[1,\\\"\\\\n              \\\"],[1,[28,[32,5],[[30,1,[\\\"username\\\"]]],null]],[1,\\\"\\\\n            \\\"],[13],[1,\\\"\\\\n\\\"]],[]],[[[1,\\\"            \\\"],[10,1],[14,0,\\\"post-voting-comment-info-username post-voting-comment-info-username-deleted\\\"],[12],[1,\\\"\\\\n              \\\"],[1,[28,[32,6],[\\\"post_voting.post.post_voting_comment.user.deleted\\\"],null]],[1,\\\"\\\\n            \\\"],[13],[1,\\\"\\\\n\\\"]],[]]],[1,\\\"\\\\n          \\\"],[10,1],[14,0,\\\"post-voting-comment-info-created\\\"],[12],[1,\\\"\\\\n            \\\"],[1,[28,[32,7],[[30,1,[\\\"created_at\\\"]]],null]],[1,\\\"\\\\n          \\\"],[13],[1,\\\"\\\\n\\\\n          \\\"],[8,[32,8],null,[[\\\"@id\\\",\\\"@updateComment\\\",\\\"@removeComment\\\",\\\"@comment\\\",\\\"@disabled\\\"],[[30,1,[\\\"id\\\"]],[30,0,[\\\"expandEditor\\\"]],[30,4],[30,1],[30,3]]],null],[1,\\\"\\\\n\\\\n        \\\"],[13],[1,\\\"\\\\n\\\"]],[]]],[1,\\\"    \\\"],[13],[1,\\\"\\\\n  \\\"]],[\\\"@comment\\\",\\\"@isVoting\\\",\\\"@disabled\\\",\\\"@removeComment\\\"],[\\\"if\\\"]]\",\n        \"moduleName\": \"/var/www/discourse/frontend/discourse/discourse/plugins/discourse-post-voting/discourse/components/post-voting-comment.js\",\n        \"scope\": () => [_postVotingCommentEditor.default, _postVotingButton.default, _routeAction.default, _template.htmlSafe, _url.userPath, _formatUsername.default, _discourseI18n.i18n, _formatDate.default, _postVotingCommentActions.default],\n        \"isStrictMode\": true\n      }), this);\n    }\n  }\n  _exports.default = PostVotingComment;\n});","define(\"discourse/plugins/discourse-post-voting/discourse/components/post-voting-comments-menu-composer\", [\"exports\", \"@glimmer/component\", \"@glimmer/tracking\", \"@ember/object\", \"@ember/service\", \"discourse/components/d-button\", \"discourse/lib/ajax\", \"discourse/lib/ajax-error\", \"discourse/plugins/discourse-post-voting/discourse/components/post-voting-comment-composer\", \"@ember/component\", \"@ember/template-factory\"], function (_exports, _component, _tracking, _object, _service, _dButton, _ajax, _ajaxError, _postVotingCommentComposer, _component2, _templateFactory) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.default = void 0;\n  class PostVotingCommentsMenuComposer extends _component.default {\n    static {\n      dt7948.g(this.prototype, \"siteSettings\", [_service.service]);\n    }\n    #siteSettings = (dt7948.i(this, \"siteSettings\"), void 0);\n    static {\n      dt7948.g(this.prototype, \"value\", [_tracking.tracked], function () {\n        return \"\";\n      });\n    }\n    #value = (dt7948.i(this, \"value\"), void 0);\n    static {\n      dt7948.g(this.prototype, \"submitDisabled\", [_tracking.tracked], function () {\n        return true;\n      });\n    }\n    #submitDisabled = (dt7948.i(this, \"submitDisabled\"), void 0);\n    onKeyDown(e) {\n      if (e.key === \"Enter\" && (e.ctrlKey || e.metaKey)) {\n        this.saveComment();\n      }\n    }\n    static {\n      dt7948.n(this.prototype, \"onKeyDown\", [_object.action]);\n    }\n    updateValue(value) {\n      this.submitDisabled = value.length < this.siteSettings.min_post_length || value.length > this.siteSettings.post_voting_comment_max_raw_length;\n      this.value = value;\n    }\n    static {\n      dt7948.n(this.prototype, \"updateValue\", [_object.action]);\n    }\n    saveComment() {\n      this.submitDisabled = true;\n      return (0, _ajax.ajax)(\"/post_voting/comments\", {\n        type: \"POST\",\n        data: {\n          raw: this.value,\n          post_id: this.args.id\n        }\n      }).then(response => {\n        this.args.onSave(response);\n        this.value = \"\";\n      }).catch(_ajaxError.popupAjaxError).finally(() => {\n        this.submitDisabled = false;\n      });\n    }\n    static {\n      dt7948.n(this.prototype, \"saveComment\", [_object.action]);\n    }\n    static {\n      (0, _component2.setComponentTemplate)((0, _templateFactory.createTemplateFactory)(\n      /*\n        \n          <div class=\"post-voting-comments-menu-composer\">\n            <PostVotingCommentComposer\n              @onInput={{this.updateValue}}\n              @onKeyDown={{this.onKeyDown}}\n            />\n      \n            <DButton\n              @action={{this.saveComment}}\n              @disabled={{this.submitDisabled}}\n              @icon=\"reply\"\n              @label=\"post_voting.post.post_voting_comment.submit\"\n              class=\"btn-primary post-voting-comments-menu-composer-submit\"\n            />\n      \n            <DButton\n              @display=\"link\"\n              @action={{@onCancel}}\n              @label=\"post_voting.post.post_voting_comment.cancel\"\n              class=\"post-voting-comments-menu-composer-cancel\"\n            />\n          </div>\n        \n      */\n      {\n        \"id\": \"H/GXMqLH\",\n        \"block\": \"[[[1,\\\"\\\\n    \\\"],[10,0],[14,0,\\\"post-voting-comments-menu-composer\\\"],[12],[1,\\\"\\\\n      \\\"],[8,[32,0],null,[[\\\"@onInput\\\",\\\"@onKeyDown\\\"],[[30,0,[\\\"updateValue\\\"]],[30,0,[\\\"onKeyDown\\\"]]]],null],[1,\\\"\\\\n\\\\n      \\\"],[8,[32,1],[[24,0,\\\"btn-primary post-voting-comments-menu-composer-submit\\\"]],[[\\\"@action\\\",\\\"@disabled\\\",\\\"@icon\\\",\\\"@label\\\"],[[30,0,[\\\"saveComment\\\"]],[30,0,[\\\"submitDisabled\\\"]],\\\"reply\\\",\\\"post_voting.post.post_voting_comment.submit\\\"]],null],[1,\\\"\\\\n\\\\n      \\\"],[8,[32,1],[[24,0,\\\"post-voting-comments-menu-composer-cancel\\\"]],[[\\\"@display\\\",\\\"@action\\\",\\\"@label\\\"],[\\\"link\\\",[30,1],\\\"post_voting.post.post_voting_comment.cancel\\\"]],null],[1,\\\"\\\\n    \\\"],[13],[1,\\\"\\\\n  \\\"]],[\\\"@onCancel\\\"],[]]\",\n        \"moduleName\": \"/var/www/discourse/frontend/discourse/discourse/plugins/discourse-post-voting/discourse/components/post-voting-comments-menu-composer.js\",\n        \"scope\": () => [_postVotingCommentComposer.default, _dButton.default],\n        \"isStrictMode\": true\n      }), this);\n    }\n  }\n  _exports.default = PostVotingCommentsMenuComposer;\n});","define(\"discourse/plugins/discourse-post-voting/discourse/components/post-voting-comments-menu\", [\"exports\", \"@glimmer/component\", \"@glimmer/tracking\", \"@ember/object\", \"@ember/runloop\", \"@ember/service\", \"rsvp\", \"discourse/components/d-button\", \"discourse/helpers/route-action\", \"discourse/lib/ajax\", \"discourse/lib/ajax-error\", \"discourse-i18n\", \"discourse/plugins/discourse-post-voting/discourse/components/post-voting-comments-menu-composer\", \"@ember/component\", \"@ember/template-factory\"], function (_exports, _component, _tracking, _object, _runloop, _service, _rsvp, _dButton, _routeAction, _ajax, _ajaxError, _discourseI18n, _postVotingCommentsMenuComposer, _component2, _templateFactory) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.default = void 0;\n  class PostVotingCommentsMenu extends _component.default {\n    static {\n      dt7948.g(this.prototype, \"currentUser\", [_service.service]);\n    }\n    #currentUser = (dt7948.i(this, \"currentUser\"), void 0);\n    static {\n      dt7948.g(this.prototype, \"expanded\", [_tracking.tracked], function () {\n        return false;\n      });\n    }\n    #expanded = (dt7948.i(this, \"expanded\"), void 0);\n    get hasMoreComments() {\n      return this.args.moreCommentCount > 0;\n    }\n    handleSave(comment) {\n      this.closeComposer();\n      this.args.appendComments([comment]);\n    }\n    static {\n      dt7948.n(this.prototype, \"handleSave\", [_object.action]);\n    }\n    expandComposer() {\n      this.expanded = true;\n      this.fetchComments().then(() => {\n        (0, _runloop.schedule)(\"afterRender\", () => {\n          const textArea = document.querySelector(`#post_${this.args.postNumber} .post-voting-comment-composer .post-voting-comment-composer-textarea`);\n          textArea.focus();\n          textArea.select();\n        });\n      });\n    }\n    static {\n      dt7948.n(this.prototype, \"expandComposer\", [_object.action]);\n    }\n    closeComposer() {\n      this.expanded = false;\n    }\n    static {\n      dt7948.n(this.prototype, \"closeComposer\", [_object.action]);\n    }\n    fetchComments() {\n      if (!this.args.id) {\n        return _rsvp.Promise.resolve();\n      }\n      const data = {\n        post_id: this.args.id,\n        last_comment_id: this.args.lastCommentId\n      };\n      return (0, _ajax.ajax)(\"/post_voting/comments\", {\n        type: \"GET\",\n        data\n      }).then(response => {\n        if (response.comments.length > 0) {\n          this.args.appendComments(response.comments);\n        }\n      }).catch(_ajaxError.popupAjaxError);\n    }\n    static {\n      dt7948.n(this.prototype, \"fetchComments\", [_object.action]);\n    }\n    static {\n      (0, _component2.setComponentTemplate)((0, _templateFactory.createTemplateFactory)(\n      /*\n        \n          <div class=\"post-voting-comments-menu\">\n            {{#if this.expanded}}\n              <PostVotingCommentsMenuComposer\n                @id={{@id}}\n                @onSave={{this.handleSave}}\n                @onCancel={{this.closeComposer}}\n              />\n            {{else}}\n              <DButton\n                @display=\"link\"\n                @action={{if\n                  this.currentUser\n                  this.expandComposer\n                  (routeAction \"showLogin\")\n                }}\n                @label=\"post_voting.post.post_voting_comment.add\"\n                class=\"post-voting-comment-add-link\"\n              />\n            {{/if}}\n      \n            {{#if this.hasMoreComments}}\n              {{#unless this.expanded}}\n                <span class=\"post-voting-comments-menu-separator\"></span>\n              {{/unless}}\n      \n              <div class=\"post-voting-comments-menu-show-more\">\n                <DButton\n                  @display=\"link\"\n                  @action={{this.fetchComments}}\n                  @translatedLabel={{i18n\n                    \"post_voting.post.post_voting_comment.show\"\n                    count=@moreCommentCount\n                  }}\n                  class=\"post-voting-comments-menu-show-more-link\"\n                />\n              </div>\n            {{/if}}\n          </div>\n        \n      */\n      {\n        \"id\": \"iX0EPYOG\",\n        \"block\": \"[[[1,\\\"\\\\n    \\\"],[10,0],[14,0,\\\"post-voting-comments-menu\\\"],[12],[1,\\\"\\\\n\\\"],[41,[30,0,[\\\"expanded\\\"]],[[[1,\\\"        \\\"],[8,[32,0],null,[[\\\"@id\\\",\\\"@onSave\\\",\\\"@onCancel\\\"],[[30,1],[30,0,[\\\"handleSave\\\"]],[30,0,[\\\"closeComposer\\\"]]]],null],[1,\\\"\\\\n\\\"]],[]],[[[1,\\\"        \\\"],[8,[32,1],[[24,0,\\\"post-voting-comment-add-link\\\"]],[[\\\"@display\\\",\\\"@action\\\",\\\"@label\\\"],[\\\"link\\\",[52,[30,0,[\\\"currentUser\\\"]],[30,0,[\\\"expandComposer\\\"]],[28,[32,2],[\\\"showLogin\\\"],null]],\\\"post_voting.post.post_voting_comment.add\\\"]],null],[1,\\\"\\\\n\\\"]],[]]],[1,\\\"\\\\n\\\"],[41,[30,0,[\\\"hasMoreComments\\\"]],[[[41,[51,[30,0,[\\\"expanded\\\"]]],[[[1,\\\"          \\\"],[10,1],[14,0,\\\"post-voting-comments-menu-separator\\\"],[12],[13],[1,\\\"\\\\n\\\"]],[]],null],[1,\\\"\\\\n        \\\"],[10,0],[14,0,\\\"post-voting-comments-menu-show-more\\\"],[12],[1,\\\"\\\\n          \\\"],[8,[32,1],[[24,0,\\\"post-voting-comments-menu-show-more-link\\\"]],[[\\\"@display\\\",\\\"@action\\\",\\\"@translatedLabel\\\"],[\\\"link\\\",[30,0,[\\\"fetchComments\\\"]],[28,[32,3],[\\\"post_voting.post.post_voting_comment.show\\\"],[[\\\"count\\\"],[[30,2]]]]]],null],[1,\\\"\\\\n        \\\"],[13],[1,\\\"\\\\n\\\"]],[]],null],[1,\\\"    \\\"],[13],[1,\\\"\\\\n  \\\"]],[\\\"@id\\\",\\\"@moreCommentCount\\\"],[\\\"if\\\",\\\"unless\\\"]]\",\n        \"moduleName\": \"/var/www/discourse/frontend/discourse/discourse/plugins/discourse-post-voting/discourse/components/post-voting-comments-menu.js\",\n        \"scope\": () => [_postVotingCommentsMenuComposer.default, _dButton.default, _routeAction.default, _discourseI18n.i18n],\n        \"isStrictMode\": true\n      }), this);\n    }\n  }\n  _exports.default = PostVotingCommentsMenu;\n});","define(\"discourse/plugins/discourse-post-voting/discourse/components/post-voting-comments\", [\"exports\", \"@glimmer/component\", \"@ember/object\", \"discourse/plugins/discourse-post-voting/discourse/components/post-voting-comment\", \"discourse/plugins/discourse-post-voting/discourse/components/post-voting-comments-menu\", \"@ember/component\", \"@ember/template-factory\"], function (_exports, _component, _object, _postVotingComment, _postVotingCommentsMenu, _component2, _templateFactory) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.default = void 0;\n  class PostVotingComments extends _component.default {\n    comments = this.args.post.comments;\n    get moreCommentCount() {\n      return this.args.post.comments_count - this.comments.length;\n    }\n    get lastCommentId() {\n      return this.comments?.at(-1)?.id ?? 0;\n    }\n    get disabled() {\n      return this.args.post.topic.closed || this.args.post.topic.archived;\n    }\n    appendComments(comments) {\n      this.comments.push(...comments);\n    }\n    static {\n      dt7948.n(this.prototype, \"appendComments\", [_object.action]);\n    }\n    removeComment(commentId) {\n      const indexToRemove = this.comments.findIndex(comment => comment.id === commentId);\n      if (indexToRemove !== -1) {\n        const comment = {\n          ...this.comments[indexToRemove],\n          deleted: true\n        };\n        this.comments.splice(indexToRemove, 1, comment);\n        this.args.post.comments_count--;\n      }\n    }\n    static {\n      dt7948.n(this.prototype, \"removeComment\", [_object.action]);\n    }\n    updateComment(comment) {\n      const index = this.comments.findIndex(oldComment => oldComment.id === comment.id);\n      this.comments.splice(index, 1, comment);\n    }\n    static {\n      dt7948.n(this.prototype, \"updateComment\", [_object.action]);\n    }\n    vote(commentId) {\n      const index = this.comments.findIndex(oldComment => oldComment.id === commentId);\n      const comment = this.comments[index];\n      const updatedComment = {\n        ...comment,\n        post_voting_vote_count: comment.post_voting_vote_count + 1,\n        user_voted: true\n      };\n      this.comments.splice(index, 1, updatedComment);\n    }\n    static {\n      dt7948.n(this.prototype, \"vote\", [_object.action]);\n    }\n    removeVote(commentId) {\n      const index = this.comments.findIndex(oldComment => oldComment.id === commentId);\n      const comment = this.comments[index];\n      const updatedComment = {\n        ...comment,\n        post_voting_vote_count: comment.post_voting_vote_count - 1,\n        user_voted: false\n      };\n      this.comments.splice(index, 1, updatedComment);\n    }\n    static {\n      dt7948.n(this.prototype, \"removeVote\", [_object.action]);\n    }\n    static {\n      (0, _component2.setComponentTemplate)((0, _templateFactory.createTemplateFactory)(\n      /*\n        \n          <div class=\"post-voting-comments\">\n            {{#each this.comments as |comment|}}\n              <PostVotingComment\n                @comment={{comment}}\n                @removeComment={{this.removeComment}}\n                @updateComment={{this.updateComment}}\n                @vote={{this.vote}}\n                @removeVote={{this.removeVote}}\n                @disabled={{this.disabled}}\n              />\n            {{/each}}\n      \n            {{#if @canCreatePost}}\n              <PostVotingCommentsMenu\n                @id={{@post.id}}\n                @postNumber={{@post.post_number}}\n                @moreCommentCount={{this.moreCommentCount}}\n                @lastCommentId={{this.lastCommentId}}\n                @appendComments={{this.appendComments}}\n              />\n            {{/if}}\n          </div>\n        \n      */\n      {\n        \"id\": \"872DMEas\",\n        \"block\": \"[[[1,\\\"\\\\n    \\\"],[10,0],[14,0,\\\"post-voting-comments\\\"],[12],[1,\\\"\\\\n\\\"],[42,[28,[31,1],[[28,[31,1],[[30,0,[\\\"comments\\\"]]],null]],null],null,[[[1,\\\"        \\\"],[8,[32,0],null,[[\\\"@comment\\\",\\\"@removeComment\\\",\\\"@updateComment\\\",\\\"@vote\\\",\\\"@removeVote\\\",\\\"@disabled\\\"],[[30,1],[30,0,[\\\"removeComment\\\"]],[30,0,[\\\"updateComment\\\"]],[30,0,[\\\"vote\\\"]],[30,0,[\\\"removeVote\\\"]],[30,0,[\\\"disabled\\\"]]]],null],[1,\\\"\\\\n\\\"]],[1]],null],[1,\\\"\\\\n\\\"],[41,[30,2],[[[1,\\\"        \\\"],[8,[32,1],null,[[\\\"@id\\\",\\\"@postNumber\\\",\\\"@moreCommentCount\\\",\\\"@lastCommentId\\\",\\\"@appendComments\\\"],[[30,3,[\\\"id\\\"]],[30,3,[\\\"post_number\\\"]],[30,0,[\\\"moreCommentCount\\\"]],[30,0,[\\\"lastCommentId\\\"]],[30,0,[\\\"appendComments\\\"]]]],null],[1,\\\"\\\\n\\\"]],[]],null],[1,\\\"    \\\"],[13],[1,\\\"\\\\n  \\\"]],[\\\"comment\\\",\\\"@canCreatePost\\\",\\\"@post\\\"],[\\\"each\\\",\\\"-track-array\\\",\\\"if\\\"]]\",\n        \"moduleName\": \"/var/www/discourse/frontend/discourse/discourse/plugins/discourse-post-voting/discourse/components/post-voting-comments.js\",\n        \"scope\": () => [_postVotingComment.default, _postVotingCommentsMenu.default],\n        \"isStrictMode\": true\n      }), this);\n    }\n  }\n  _exports.default = PostVotingComments;\n});","define(\"discourse/plugins/discourse-post-voting/discourse/components/post-voting-vote-controls\", [\"exports\", \"@glimmer/component\", \"@glimmer/tracking\", \"@ember/object\", \"@ember/service\", \"discourse/components/d-button\", \"discourse/lib/ajax-error\", \"discourse/plugins/discourse-post-voting/discourse/lib/post-voting-utilities\", \"discourse/plugins/discourse-post-voting/discourse/components/post-voting-button\", \"discourse/plugins/discourse-post-voting/discourse/components/post-voting-who-voted-list\", \"@ember/component\", \"@ember/template-factory\"], function (_exports, _component, _tracking, _object, _service, _dButton, _ajaxError, _postVotingUtilities, _postVotingButton, _postVotingWhoVotedList, _component2, _templateFactory) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.default = void 0;\n  class PostVotingVoteControls extends _component.default {\n    static {\n      dt7948.g(this.prototype, \"currentUser\", [_service.service]);\n    }\n    #currentUser = (dt7948.i(this, \"currentUser\"), void 0);\n    static {\n      dt7948.g(this.prototype, \"loading\", [_tracking.tracked]);\n    }\n    #loading = (dt7948.i(this, \"loading\"), void 0);\n    static {\n      dt7948.g(this.prototype, \"showWhoVoted\", [_tracking.tracked], function () {\n        return false;\n      });\n    }\n    #showWhoVoted = (dt7948.i(this, \"showWhoVoted\"), void 0);\n    get count() {\n      return this.args.post_voting_vote_count || 0;\n    }\n    get disabled() {\n      return this.args.post.topic.archived || this.args.post.topic.closed;\n    }\n    get hasVotes() {\n      return this.args.post.post_voting_has_votes;\n    }\n    get votedUp() {\n      return this.args.post.post_voting_user_voted_direction === \"up\";\n    }\n    get votedDown() {\n      return this.args.post.post_voting_user_voted_direction === \"down\";\n    }\n    async removeVote(direction) {\n      const post = this.args.post;\n      const countChange = direction === \"up\" ? -1 : 1;\n      post.post_voting_user_voted_direction = null;\n      post.post_voting_vote_count = post.post_voting_vote_count + countChange;\n      const voteCount = post.post_voting_vote_count;\n      this.loading = true;\n      try {\n        return await (0, _postVotingUtilities.removeVote)({\n          post_id: post.id\n        });\n      } catch (error) {\n        post.post_voting_user_voted_direction = direction;\n        post.post_voting_vote_count = voteCount - countChange;\n        (0, _ajaxError.popupAjaxError)(error);\n      } finally {\n        this.loading = false;\n      }\n    }\n    static {\n      dt7948.n(this.prototype, \"removeVote\", [_object.action]);\n    }\n    async vote(direction) {\n      if (!this.currentUser) {\n        return this.args.showLogin();\n      }\n      const post = this.args.post;\n      let vote = {\n        post_id: post.id,\n        direction\n      };\n      const isUpVote = direction === \"up\";\n      let countChange;\n      if (post.post_voting_user_voted_direction) {\n        countChange = isUpVote ? 2 : -2;\n      } else {\n        countChange = isUpVote ? 1 : -1;\n      }\n      post.post_voting_user_voted_direction = direction;\n      post.post_voting_vote_count = post.post_voting_vote_count + countChange;\n      const voteCount = post.post_voting_vote_count;\n      this.loading = true;\n      try {\n        return await (0, _postVotingUtilities.castVote)(vote);\n      } catch (error) {\n        post.setProperties({\n          post_voting_user_voted_direction: null,\n          post_voting_vote_count: voteCount - countChange\n        });\n        (0, _ajaxError.popupAjaxError)(error);\n      } finally {\n        this.loading = false;\n      }\n    }\n    static {\n      dt7948.n(this.prototype, \"vote\", [_object.action]);\n    }\n    toggleWhoVoted() {\n      this.showWhoVoted = !this.showWhoVoted;\n    }\n    static {\n      dt7948.n(this.prototype, \"toggleWhoVoted\", [_object.action]);\n    }\n    static {\n      (0, _component2.setComponentTemplate)((0, _templateFactory.createTemplateFactory)(\n      /*\n        \n          <div class=\"post-voting-post\">\n            <PostVotingButton\n              @direction=\"up\"\n              @disabled={{this.disabled}}\n              @loading={{this.loading}}\n              @removeVote={{this.removeVote}}\n              @vote={{this.vote}}\n              @voted={{this.votedUp}}\n            />\n      \n            {{#if this.hasVotes}}\n              <DButton\n                class=\"post-voting-post-toggle-voters btn-flat\"\n                @action={{this.toggleWhoVoted}}\n                @translatedLabel={{@post.post_voting_vote_count}}\n              />\n              {{#if this.showWhoVoted}}\n                <PostVotingWhoVotedList\n                  @post={{@post}}\n                  @onClickOutside={{this.toggleWhoVoted}}\n                />\n              {{/if}}\n            {{else}}\n              <span class=\"post-voting-post-toggle-voters\">\n                {{this.count}}\n              </span>\n            {{/if}}\n      \n            <PostVotingButton\n              @direction=\"down\"\n              @disabled={{this.disabled}}\n              @loading={{this.loading}}\n              @removeVote={{this.removeVote}}\n              @vote={{this.vote}}\n              @voted={{this.votedDown}}\n            />\n          </div>\n        \n      */\n      {\n        \"id\": \"JYpuMrYe\",\n        \"block\": \"[[[1,\\\"\\\\n    \\\"],[10,0],[14,0,\\\"post-voting-post\\\"],[12],[1,\\\"\\\\n      \\\"],[8,[32,0],null,[[\\\"@direction\\\",\\\"@disabled\\\",\\\"@loading\\\",\\\"@removeVote\\\",\\\"@vote\\\",\\\"@voted\\\"],[\\\"up\\\",[30,0,[\\\"disabled\\\"]],[30,0,[\\\"loading\\\"]],[30,0,[\\\"removeVote\\\"]],[30,0,[\\\"vote\\\"]],[30,0,[\\\"votedUp\\\"]]]],null],[1,\\\"\\\\n\\\\n\\\"],[41,[30,0,[\\\"hasVotes\\\"]],[[[1,\\\"        \\\"],[8,[32,1],[[24,0,\\\"post-voting-post-toggle-voters btn-flat\\\"]],[[\\\"@action\\\",\\\"@translatedLabel\\\"],[[30,0,[\\\"toggleWhoVoted\\\"]],[30,1,[\\\"post_voting_vote_count\\\"]]]],null],[1,\\\"\\\\n\\\"],[41,[30,0,[\\\"showWhoVoted\\\"]],[[[1,\\\"          \\\"],[8,[32,2],null,[[\\\"@post\\\",\\\"@onClickOutside\\\"],[[30,1],[30,0,[\\\"toggleWhoVoted\\\"]]]],null],[1,\\\"\\\\n\\\"]],[]],null]],[]],[[[1,\\\"        \\\"],[10,1],[14,0,\\\"post-voting-post-toggle-voters\\\"],[12],[1,\\\"\\\\n          \\\"],[1,[30,0,[\\\"count\\\"]]],[1,\\\"\\\\n        \\\"],[13],[1,\\\"\\\\n\\\"]],[]]],[1,\\\"\\\\n      \\\"],[8,[32,0],null,[[\\\"@direction\\\",\\\"@disabled\\\",\\\"@loading\\\",\\\"@removeVote\\\",\\\"@vote\\\",\\\"@voted\\\"],[\\\"down\\\",[30,0,[\\\"disabled\\\"]],[30,0,[\\\"loading\\\"]],[30,0,[\\\"removeVote\\\"]],[30,0,[\\\"vote\\\"]],[30,0,[\\\"votedDown\\\"]]]],null],[1,\\\"\\\\n    \\\"],[13],[1,\\\"\\\\n  \\\"]],[\\\"@post\\\"],[\\\"if\\\"]]\",\n        \"moduleName\": \"/var/www/discourse/frontend/discourse/discourse/plugins/discourse-post-voting/discourse/components/post-voting-vote-controls.js\",\n        \"scope\": () => [_postVotingButton.default, _dButton.default, _postVotingWhoVotedList.default],\n        \"isStrictMode\": true\n      }), this);\n    }\n  }\n  _exports.default = PostVotingVoteControls;\n});","define(\"discourse/plugins/discourse-post-voting/discourse/components/post-voting-who-voted-list\", [\"exports\", \"@glimmer/component\", \"@ember/helper\", \"@ember/object\", \"discourse/components/async-content\", \"discourse/components/small-user-list\", \"discourse/helpers/d-icon\", \"discourse/lib/decorators\", \"discourse/modifiers/close-on-click-outside\", \"discourse/truth-helpers\", \"discourse-i18n\", \"discourse/plugins/discourse-post-voting/discourse/lib/post-voting-utilities\", \"@ember/component\", \"@ember/template-factory\", \"@ember/component/template-only\"], function (_exports, _component, _helper, _object, _asyncContent, _smallUserList, _dIcon, _decorators, _closeOnClickOutside, _truthHelpers, _discourseI18n, _postVotingUtilities, _component2, _templateFactory, _templateOnly) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.default = void 0;\n  class PostVotingWhoVotedList extends _component.default {\n    calcRemainingCount(voters) {\n      return this.args.post.post_voting_vote_count - voters.length;\n    }\n    static {\n      dt7948.n(this.prototype, \"calcRemainingCount\", [_decorators.bind]);\n    }\n    splitUpAndDownLists(voters) {\n      const upVoters = [];\n      const downVoters = [];\n      voters.forEach(voter => {\n        if (voter.direction === \"up\") {\n          upVoters.push(voter);\n        } else if (voter.direction === \"down\") {\n          downVoters.push(voter);\n        }\n      });\n      return {\n        up: upVoters,\n        down: downVoters\n      };\n    }\n    static {\n      dt7948.n(this.prototype, \"splitUpAndDownLists\", [_decorators.bind]);\n    }\n    async loadWhoVoted() {\n      const result = await (0, _postVotingUtilities.whoVoted)({\n        post_id: this.args.post.id\n      });\n      return result.voters?.map(voter => {\n        const userAttrs = (0, _smallUserList.smallUserAttrs)(voter);\n        userAttrs.direction = voter.direction;\n        return userAttrs;\n      });\n    }\n    static {\n      dt7948.n(this.prototype, \"loadWhoVoted\", [_object.action]);\n    }\n    static {\n      (0, _component2.setComponentTemplate)((0, _templateFactory.createTemplateFactory)(\n      /*\n        \n          <div\n            class=\"post-voting-post-list\"\n            {{closeOnClickOutside\n              @onClickOutside\n              (hash\n                targetSelector=\".post-voting-post-list\"\n                secondaryTargetSelector=\".post-voting-post-toggle-voters\"\n              )\n            }}\n          >\n            <AsyncContent @asyncData={{this.loadWhoVoted}}>\n              <:loading>\n                {{i18n \"loading\"}}\n              </:loading>\n              <:content as |voters|>\n                {{#if whoVoted}}\n                  {{#let (this.splitUpAndDownLists voters) as |splitVoters|}}\n                    <PostVotingSmallUserList\n                      @list={{get splitVoters \"up\"}}\n                      @direction=\"up\"\n                    />\n                    <PostVotingSmallUserList\n                      @list={{get splitVoters \"down\"}}\n                      @direction=\"down\"\n                    />\n                  {{/let}}\n                  {{#let (this.calcRemainingCount voters) as |remainingCount|}}\n                    {{#if remainingCount}}\n                      <span>\n                        {{i18n\n                          \"post_voting.topic.voters_count_diff\"\n                          count=remainingCount\n                        }}\n                      </span>\n                    {{/if}}\n                  {{/let}}\n                {{/if}}\n              </:content>\n            </AsyncContent>\n          </div>\n        \n      */\n      {\n        \"id\": \"x8IzQJ+B\",\n        \"block\": \"[[[1,\\\"\\\\n    \\\"],[11,0],[24,0,\\\"post-voting-post-list\\\"],[4,[32,0],[[30,1],[28,[32,1],null,[[\\\"targetSelector\\\",\\\"secondaryTargetSelector\\\"],[\\\".post-voting-post-list\\\",\\\".post-voting-post-toggle-voters\\\"]]]],null],[12],[1,\\\"\\\\n      \\\"],[8,[32,2],null,[[\\\"@asyncData\\\"],[[30,0,[\\\"loadWhoVoted\\\"]]]],[[\\\"loading\\\",\\\"content\\\"],[[[[1,\\\"\\\\n          \\\"],[1,[28,[32,3],[\\\"loading\\\"],null]],[1,\\\"\\\\n        \\\"]],[]],[[[1,\\\"\\\\n\\\"],[41,[32,4],[[[44,[[28,[30,0,[\\\"splitUpAndDownLists\\\"]],[[30,2]],null]],[[[1,\\\"              \\\"],[8,[32,5],null,[[\\\"@list\\\",\\\"@direction\\\"],[[28,[32,6],[[30,3],\\\"up\\\"],null],\\\"up\\\"]],null],[1,\\\"\\\\n              \\\"],[8,[32,5],null,[[\\\"@list\\\",\\\"@direction\\\"],[[28,[32,6],[[30,3],\\\"down\\\"],null],\\\"down\\\"]],null],[1,\\\"\\\\n\\\"]],[3]]],[44,[[28,[30,0,[\\\"calcRemainingCount\\\"]],[[30,2]],null]],[[[41,[30,4],[[[1,\\\"                \\\"],[10,1],[12],[1,\\\"\\\\n                  \\\"],[1,[28,[32,3],[\\\"post_voting.topic.voters_count_diff\\\"],[[\\\"count\\\"],[[30,4]]]]],[1,\\\"\\\\n                \\\"],[13],[1,\\\"\\\\n\\\"]],[]],null]],[4]]]],[]],null],[1,\\\"        \\\"]],[2]]]]],[1,\\\"\\\\n    \\\"],[13],[1,\\\"\\\\n  \\\"]],[\\\"@onClickOutside\\\",\\\"voters\\\",\\\"splitVoters\\\",\\\"remainingCount\\\"],[\\\"if\\\",\\\"let\\\"]]\",\n        \"moduleName\": \"/var/www/discourse/frontend/discourse/discourse/plugins/discourse-post-voting/discourse/components/post-voting-who-voted-list.js\",\n        \"scope\": () => [_closeOnClickOutside.default, _helper.hash, _asyncContent.default, _discourseI18n.i18n, _postVotingUtilities.whoVoted, PostVotingSmallUserList, _object.get],\n        \"isStrictMode\": true\n      }), this);\n    }\n  }\n  _exports.default = PostVotingWhoVotedList;\n  const PostVotingSmallUserList = (0, _component2.setComponentTemplate)((0, _templateFactory.createTemplateFactory)(\n  /*\n    \n    {{#if @list}}\n      <div class=\"post-voting-post-list-voters-wrapper\">\n        <span class=\"post-voting-post-list-icon\">\n          {{icon (if (eq @direction \"up\") \"caret-up\" \"caret-down\")}}\n        </span>\n        <span class=\"post-voting-post-list-count\">{{@list.length}}</span>\n        <SmallUserList class=\"post-voting-post-list-voters\" @users={{@list}} />\n      </div>\n    {{/if}}\n  \n  */\n  {\n    \"id\": \"tlJuXj+0\",\n    \"block\": \"[[[1,\\\"\\\\n\\\"],[41,[30,1],[[[1,\\\"    \\\"],[10,0],[14,0,\\\"post-voting-post-list-voters-wrapper\\\"],[12],[1,\\\"\\\\n      \\\"],[10,1],[14,0,\\\"post-voting-post-list-icon\\\"],[12],[1,\\\"\\\\n        \\\"],[1,[28,[32,0],[[52,[28,[32,1],[[30,2],\\\"up\\\"],null],\\\"caret-up\\\",\\\"caret-down\\\"]],null]],[1,\\\"\\\\n      \\\"],[13],[1,\\\"\\\\n      \\\"],[10,1],[14,0,\\\"post-voting-post-list-count\\\"],[12],[1,[30,1,[\\\"length\\\"]]],[13],[1,\\\"\\\\n      \\\"],[8,[32,2],[[24,0,\\\"post-voting-post-list-voters\\\"]],[[\\\"@users\\\"],[[30,1]]],null],[1,\\\"\\\\n    \\\"],[13],[1,\\\"\\\\n\\\"]],[]],null]],[\\\"@list\\\",\\\"@direction\\\"],[\\\"if\\\"]]\",\n    \"moduleName\": \"/var/www/discourse/frontend/discourse/discourse/plugins/discourse-post-voting/discourse/components/post-voting-who-voted-list.js\",\n    \"scope\": () => [_dIcon.default, _truthHelpers.eq, _smallUserList.default],\n    \"isStrictMode\": true\n  }), (0, _templateOnly.default)(undefined, \"post-voting-who-voted-list:PostVotingSmallUserList\"));\n});","define(\"discourse/plugins/discourse-post-voting/discourse/components/reviewable-post-voting-comment\", [\"exports\", \"@glimmer/component\", \"@glimmer/tracking\", \"@ember/helper\", \"@ember/routing\", \"@ember/service\", \"@ember/template\", \"discourse/components/reviewable-created-by\", \"discourse/components/reviewable-post-header\", \"discourse/helpers/category-badge\", \"discourse/truth-helpers\", \"discourse-i18n\", \"@ember/component\", \"@ember/template-factory\"], function (_exports, _component, _tracking, _helper, _routing, _service, _template, _reviewableCreatedBy, _reviewablePostHeader, _categoryBadge, _truthHelpers, _discourseI18n, _component2, _templateFactory) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.default = void 0;\n  class ReviewablePostVotingComment extends _component.default {\n    static {\n      dt7948.g(this.prototype, \"store\", [_service.service]);\n    }\n    #store = (dt7948.i(this, \"store\"), void 0);\n    static {\n      dt7948.g(this.prototype, \"post\", [_tracking.tracked]);\n    }\n    #post = (dt7948.i(this, \"post\"), void 0);\n    constructor() {\n      super(...arguments);\n      this.fetchPost();\n    }\n    async fetchPost() {\n      const post = await this.store.find(\"post\", this.args.reviewable.post_id);\n      this.post = post;\n    }\n    static {\n      (0, _component2.setComponentTemplate)((0, _templateFactory.createTemplateFactory)(\n      /*\n        \n          <div class=\"post-topic\">\n            <a class=\"title-text\" href={{this.post.url}}>\n              {{htmlSafe @reviewable.topic.fancyTitle}}</a>\n            {{categoryBadge @reviewable.category}}\n          </div>\n      \n          <div class=\"post-contents-wrapper\">\n            <ReviewableCreatedBy\n              @user={{@reviewable.target_created_by}}\n              @tagName=\"\"\n            />\n            <div class=\"post-contents\">\n              <ReviewablePostHeader\n                @reviewable={{@reviewable}}\n                @createdBy={{@reviewable.target_created_by}}\n                @tagName=\"\"\n              />\n      \n              <div class=\"post-body\">\n                {{htmlSafe\n                  (or @reviewable.payload.comment_cooked @reviewable.cooked)\n                }}\n              </div>\n      \n              {{#if @reviewable.payload.transcript_topic_id}}\n                <div class=\"transcript\">\n                  <LinkTo\n                    @route=\"topic\"\n                    @models={{array \"-\" @reviewable.payload.transcript_topic_id}}\n                    class=\"btn btn-small\"\n                  >\n                    {{i18n \"review.transcript.view\"}}\n                  </LinkTo>\n                </div>\n              {{/if}}\n      \n              {{yield}}\n            </div>\n          </div>\n        \n      */\n      {\n        \"id\": \"Nm/yqJIb\",\n        \"block\": \"[[[1,\\\"\\\\n    \\\"],[10,0],[14,0,\\\"post-topic\\\"],[12],[1,\\\"\\\\n      \\\"],[10,3],[14,0,\\\"title-text\\\"],[15,6,[30,0,[\\\"post\\\",\\\"url\\\"]]],[12],[1,\\\"\\\\n        \\\"],[1,[28,[32,0],[[30,1,[\\\"topic\\\",\\\"fancyTitle\\\"]]],null]],[13],[1,\\\"\\\\n      \\\"],[1,[28,[32,1],[[30,1,[\\\"category\\\"]]],null]],[1,\\\"\\\\n    \\\"],[13],[1,\\\"\\\\n\\\\n    \\\"],[10,0],[14,0,\\\"post-contents-wrapper\\\"],[12],[1,\\\"\\\\n      \\\"],[8,[32,2],null,[[\\\"@user\\\",\\\"@tagName\\\"],[[30,1,[\\\"target_created_by\\\"]],\\\"\\\"]],null],[1,\\\"\\\\n      \\\"],[10,0],[14,0,\\\"post-contents\\\"],[12],[1,\\\"\\\\n        \\\"],[8,[32,3],null,[[\\\"@reviewable\\\",\\\"@createdBy\\\",\\\"@tagName\\\"],[[30,1],[30,1,[\\\"target_created_by\\\"]],\\\"\\\"]],null],[1,\\\"\\\\n\\\\n        \\\"],[10,0],[14,0,\\\"post-body\\\"],[12],[1,\\\"\\\\n          \\\"],[1,[28,[32,0],[[28,[32,4],[[30,1,[\\\"payload\\\",\\\"comment_cooked\\\"]],[30,1,[\\\"cooked\\\"]]],null]],null]],[1,\\\"\\\\n        \\\"],[13],[1,\\\"\\\\n\\\\n\\\"],[41,[30,1,[\\\"payload\\\",\\\"transcript_topic_id\\\"]],[[[1,\\\"          \\\"],[10,0],[14,0,\\\"transcript\\\"],[12],[1,\\\"\\\\n            \\\"],[8,[32,5],[[24,0,\\\"btn btn-small\\\"]],[[\\\"@route\\\",\\\"@models\\\"],[\\\"topic\\\",[28,[32,6],[\\\"-\\\",[30,1,[\\\"payload\\\",\\\"transcript_topic_id\\\"]]],null]]],[[\\\"default\\\"],[[[[1,\\\"\\\\n              \\\"],[1,[28,[32,7],[\\\"review.transcript.view\\\"],null]],[1,\\\"\\\\n            \\\"]],[]]]]],[1,\\\"\\\\n          \\\"],[13],[1,\\\"\\\\n\\\"]],[]],null],[1,\\\"\\\\n        \\\"],[18,2,null],[1,\\\"\\\\n      \\\"],[13],[1,\\\"\\\\n    \\\"],[13],[1,\\\"\\\\n  \\\"]],[\\\"@reviewable\\\",\\\"&default\\\"],[\\\"if\\\",\\\"yield\\\"]]\",\n        \"moduleName\": \"/var/www/discourse/frontend/discourse/discourse/plugins/discourse-post-voting/discourse/components/reviewable-post-voting-comment.js\",\n        \"scope\": () => [_template.htmlSafe, _categoryBadge.default, _reviewableCreatedBy.default, _reviewablePostHeader.default, _truthHelpers.or, _routing.LinkTo, _helper.array, _discourseI18n.i18n],\n        \"isStrictMode\": true\n      }), this);\n    }\n  }\n  _exports.default = ReviewablePostVotingComment;\n});","define(\"discourse/plugins/discourse-post-voting/discourse/components/reviewable-refresh/post-voting-comment\", [\"exports\", \"discourse/components/reviewable-post-edits\", \"discourse/components/reviewable-refresh/created-by\", \"discourse/components/reviewable-refresh/topic-link\", \"discourse/lib/highlight-watched-words\", \"discourse-i18n\", \"@ember/component\", \"@ember/template-factory\", \"@ember/component/template-only\"], function (_exports, _reviewablePostEdits, _createdBy, _topicLink, _highlightWatchedWords, _discourseI18n, _component, _templateFactory, _templateOnly) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.default = void 0;\n  var _default = _exports.default = (0, _component.setComponentTemplate)((0, _templateFactory.createTemplateFactory)(\n  /*\n    \n    <div class=\"review-item__meta-content\">\n      <div class=\"review-item__meta-label\">{{i18n \"review.posted_in\"}}</div>\n  \n      <div class=\"review-item__meta-topic-title\">\n        <ReviewableTopicLink @reviewable={{@reviewable}} @tagName=\"\" />\n        <ReviewablePostEdits @reviewable={{@reviewable}} @tagName=\"\" />\n      </div>\n  \n      <div class=\"review-item__meta-label\">{{i18n \"review.review_user\"}}</div>\n  \n      <div class=\"review-item__meta-flagged-user\">\n        <ReviewableCreatedBy @user={{@reviewable.target_created_by}} />\n      </div>\n    </div>\n  \n    <div class=\"review-item__post\">\n      <div class=\"review-item__post-content-wrapper\">\n        <div class=\"review-item__post-content\">\n          {{#if @reviewable.blank_post}}\n            <p>{{i18n \"review.deleted_post\"}}</p>\n          {{else}}\n            {{highlightWatchedWords @reviewable.cooked @reviewable}}\n          {{/if}}\n          {{yield}}\n        </div>\n      </div>\n    </div>\n  \n  */\n  {\n    \"id\": \"VrizZE8+\",\n    \"block\": \"[[[1,\\\"\\\\n  \\\"],[10,0],[14,0,\\\"review-item__meta-content\\\"],[12],[1,\\\"\\\\n    \\\"],[10,0],[14,0,\\\"review-item__meta-label\\\"],[12],[1,[28,[32,0],[\\\"review.posted_in\\\"],null]],[13],[1,\\\"\\\\n\\\\n    \\\"],[10,0],[14,0,\\\"review-item__meta-topic-title\\\"],[12],[1,\\\"\\\\n      \\\"],[8,[32,1],null,[[\\\"@reviewable\\\",\\\"@tagName\\\"],[[30,1],\\\"\\\"]],null],[1,\\\"\\\\n      \\\"],[8,[32,2],null,[[\\\"@reviewable\\\",\\\"@tagName\\\"],[[30,1],\\\"\\\"]],null],[1,\\\"\\\\n    \\\"],[13],[1,\\\"\\\\n\\\\n    \\\"],[10,0],[14,0,\\\"review-item__meta-label\\\"],[12],[1,[28,[32,0],[\\\"review.review_user\\\"],null]],[13],[1,\\\"\\\\n\\\\n    \\\"],[10,0],[14,0,\\\"review-item__meta-flagged-user\\\"],[12],[1,\\\"\\\\n      \\\"],[8,[32,3],null,[[\\\"@user\\\"],[[30,1,[\\\"target_created_by\\\"]]]],null],[1,\\\"\\\\n    \\\"],[13],[1,\\\"\\\\n  \\\"],[13],[1,\\\"\\\\n\\\\n  \\\"],[10,0],[14,0,\\\"review-item__post\\\"],[12],[1,\\\"\\\\n    \\\"],[10,0],[14,0,\\\"review-item__post-content-wrapper\\\"],[12],[1,\\\"\\\\n      \\\"],[10,0],[14,0,\\\"review-item__post-content\\\"],[12],[1,\\\"\\\\n\\\"],[41,[30,1,[\\\"blank_post\\\"]],[[[1,\\\"          \\\"],[10,2],[12],[1,[28,[32,0],[\\\"review.deleted_post\\\"],null]],[13],[1,\\\"\\\\n\\\"]],[]],[[[1,\\\"          \\\"],[1,[28,[32,4],[[30,1,[\\\"cooked\\\"]],[30,1]],null]],[1,\\\"\\\\n\\\"]],[]]],[1,\\\"        \\\"],[18,2,null],[1,\\\"\\\\n      \\\"],[13],[1,\\\"\\\\n    \\\"],[13],[1,\\\"\\\\n  \\\"],[13],[1,\\\"\\\\n\\\"]],[\\\"@reviewable\\\",\\\"&default\\\"],[\\\"if\\\",\\\"yield\\\"]]\",\n    \"moduleName\": \"/var/www/discourse/frontend/discourse/discourse/plugins/discourse-post-voting/discourse/components/reviewable-refresh/post-voting-comment.js\",\n    \"scope\": () => [_discourseI18n.i18n, _topicLink.default, _reviewablePostEdits.default, _createdBy.default, _highlightWatchedWords.default],\n    \"isStrictMode\": true\n  }), (0, _templateOnly.default)(undefined, \"post-voting-comment\"));\n});","define(\"discourse/plugins/discourse-post-voting/discourse/connectors/category-custom-settings/post-voting-category-settings\", [\"exports\", \"@ember/component\", \"@ember-decorators/component\", \"discourse-i18n\", \"@ember/template-factory\"], function (_exports, _component, _component2, _discourseI18n, _templateFactory) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.default = void 0;\n  /* eslint-disable ember/no-classic-components */\n  const PostVotingCategorySettings = dt7948.c(class PostVotingCategorySettings extends _component.default {\n    static {\n      (0, _component.setComponentTemplate)((0, _templateFactory.createTemplateFactory)(\n      /*\n        \n          <h3>{{i18n \"category.post_voting_settings_heading\"}}</h3>\n          <section class=\"field\">\n            <label>\n              <Input\n                id=\"create-as-post-voting-default\"\n                @type=\"checkbox\"\n                @checked={{this.category.custom_fields.create_as_post_voting_default}}\n              />\n              {{i18n \"category.create_as_post_voting_default\"}}\n            </label>\n            <label>\n              <Input\n                id=\"only-post-voting-in-this-category\"\n                @type=\"checkbox\"\n                @checked={{this.category.custom_fields.only_post_voting_in_this_category}}\n              />\n              {{i18n \"category.only_post_voting_in_this_category\"}}\n            </label>\n          </section>\n        \n      */\n      {\n        \"id\": \"EiVRSaTF\",\n        \"block\": \"[[[1,\\\"\\\\n    \\\"],[10,\\\"h3\\\"],[12],[1,[28,[32,0],[\\\"category.post_voting_settings_heading\\\"],null]],[13],[1,\\\"\\\\n    \\\"],[10,\\\"section\\\"],[14,0,\\\"field\\\"],[12],[1,\\\"\\\\n      \\\"],[10,\\\"label\\\"],[12],[1,\\\"\\\\n        \\\"],[8,[32,1],[[24,1,\\\"create-as-post-voting-default\\\"]],[[\\\"@type\\\",\\\"@checked\\\"],[\\\"checkbox\\\",[30,0,[\\\"category\\\",\\\"custom_fields\\\",\\\"create_as_post_voting_default\\\"]]]],null],[1,\\\"\\\\n        \\\"],[1,[28,[32,0],[\\\"category.create_as_post_voting_default\\\"],null]],[1,\\\"\\\\n      \\\"],[13],[1,\\\"\\\\n      \\\"],[10,\\\"label\\\"],[12],[1,\\\"\\\\n        \\\"],[8,[32,1],[[24,1,\\\"only-post-voting-in-this-category\\\"]],[[\\\"@type\\\",\\\"@checked\\\"],[\\\"checkbox\\\",[30,0,[\\\"category\\\",\\\"custom_fields\\\",\\\"only_post_voting_in_this_category\\\"]]]],null],[1,\\\"\\\\n        \\\"],[1,[28,[32,0],[\\\"category.only_post_voting_in_this_category\\\"],null]],[1,\\\"\\\\n      \\\"],[13],[1,\\\"\\\\n    \\\"],[13],[1,\\\"\\\\n  \\\"]],[],[]]\",\n        \"moduleName\": \"/var/www/discourse/frontend/discourse/discourse/plugins/discourse-post-voting/discourse/connectors/category-custom-settings/post-voting-category-settings.js\",\n        \"scope\": () => [_discourseI18n.i18n, _component.Input],\n        \"isStrictMode\": true\n      }), this);\n    }\n  }, [(0, _component2.classNames)(\"category-custom-settings-outlet\", \"post-voting-category-settings\"), (0, _component2.tagName)(\"\")]);\n  var _default = _exports.default = PostVotingCategorySettings;\n});","define(\"discourse/plugins/discourse-post-voting/discourse/connectors/topic-above-post-stream/add-post-voting-topic-page-class\", [\"exports\", \"discourse/helpers/body-class\", \"discourse/truth-helpers\", \"discourse/plugins/discourse-post-voting/discourse/components/post-voting-answer-header\", \"@ember/component\", \"@ember/template-factory\", \"@ember/component/template-only\"], function (_exports, _bodyClass, _truthHelpers, _postVotingAnswerHeader, _component, _templateFactory, _templateOnly) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.default = void 0;\n  const AddPostVotingTopicPageClass = (0, _component.setComponentTemplate)((0, _templateFactory.createTemplateFactory)(\n  /*\n    \n    {{#if @outletArgs.model.is_post_voting}}\n      {{bodyClass\n        (if\n          (eq @outletArgs.model.postStream.filter ORDER_BY_ACTIVITY_FILTER)\n          \"post-voting-topic-sort-by-activity\"\n          \"post-voting-topic\"\n        )\n      }}\n    {{/if}}\n  \n  */\n  {\n    \"id\": \"he14HTiH\",\n    \"block\": \"[[[1,\\\"\\\\n\\\"],[41,[30,1,[\\\"model\\\",\\\"is_post_voting\\\"]],[[[1,\\\"    \\\"],[1,[28,[32,0],[[52,[28,[32,1],[[30,1,[\\\"model\\\",\\\"postStream\\\",\\\"filter\\\"]],[32,2]],null],\\\"post-voting-topic-sort-by-activity\\\",\\\"post-voting-topic\\\"]],null]],[1,\\\"\\\\n\\\"]],[]],null]],[\\\"@outletArgs\\\"],[\\\"if\\\"]]\",\n    \"moduleName\": \"/var/www/discourse/frontend/discourse/discourse/plugins/discourse-post-voting/discourse/connectors/topic-above-post-stream/add-post-voting-topic-page-class.js\",\n    \"scope\": () => [_bodyClass.default, _truthHelpers.eq, _postVotingAnswerHeader.ORDER_BY_ACTIVITY_FILTER],\n    \"isStrictMode\": true\n  }), (0, _templateOnly.default)(undefined, \"add-post-voting-topic-page-class:AddPostVotingTopicPageClass\"));\n  var _default = _exports.default = AddPostVotingTopicPageClass;\n});","define(\"discourse/plugins/discourse-post-voting/discourse/initializers/custom-post-message-callbacks\", [\"exports\", \"discourse/lib/plugin-api\"], function (_exports, _pluginApi) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.default = void 0;\n  var _default = _exports.default = {\n    name: \"custom-post-message-callbacks\",\n    initialize(container) {\n      const siteSettings = container.lookup(\"service:site-settings\");\n      if (!siteSettings.post_voting_enabled) {\n        return;\n      }\n      (0, _pluginApi.withPluginApi)(api => {\n        api.registerCustomPostMessageCallback(\"post_voting_post_comment_edited\", (topicController, message) => {\n          const postStream = topicController.get(\"model.postStream\");\n          const post = postStream.findLoadedPost(message.id);\n          if (post) {\n            const indexToUpdate = post.comments.findIndex(comment => comment.id === message.comment_id && comment.raw !== message.comment_raw);\n            if (indexToUpdate !== -1) {\n              const updatedComment = {\n                ...post.comments[indexToUpdate],\n                raw: message.comment_raw,\n                cooked: message.comment_cooked\n              };\n              post.comments.splice(indexToUpdate, 1, updatedComment);\n            }\n          }\n        });\n        api.registerCustomPostMessageCallback(\"post_voting_post_comment_trashed\", (topicController, message) => {\n          const postStream = topicController.get(\"model.postStream\");\n          const post = postStream.findLoadedPost(message.id);\n          if (post) {\n            const indexToDelete = post.comments.findIndex(comment => comment.id === message.comment_id && !comment.deleted);\n            if (indexToDelete !== -1) {\n              const comment = {\n                ...post.comments[indexToDelete],\n                deleted: true\n              };\n              post.comments.splice(indexToDelete, 1, comment);\n            }\n            post.set(\"comments_count\", message.comments_count);\n          }\n        });\n        api.registerCustomPostMessageCallback(\"post_voting_post_commented\", (topicController, message) => {\n          const postStream = topicController.get(\"model.postStream\");\n          const post = postStream.findLoadedPost(message.id);\n          if (post && !post.comments.some(comment => comment.id === message.comment.id)) {\n            post.setProperties({\n              comments_count: message.comments_count\n            });\n            if (post.comments_count - post.comments.length <= 1 && topicController.currentUser.id !== message.comment.user_id) {\n              post.comments.push(message.comment);\n            }\n          }\n        });\n        api.registerCustomPostMessageCallback(\"post_voting_post_voted\", (topicController, message) => {\n          const postStream = topicController.get(\"model.postStream\");\n          const post = postStream.findLoadedPost(message.id);\n          if (post) {\n            const props = {\n              post_voting_vote_count: message.post_voting_vote_count,\n              post_voting_has_votes: message.post_voting_has_votes\n            };\n            if (topicController.currentUser.id === message.post_voting_user_voted_id) {\n              props.post_voting_user_voted_direction = message.post_voting_user_voted_direction;\n            }\n            post.setProperties(props);\n          }\n        });\n      });\n    }\n  };\n});","define(\"discourse/plugins/discourse-post-voting/discourse/initializers/extend-composer-actions\", [\"exports\", \"@ember/object\", \"discourse/lib/plugin-api\", \"discourse/models/composer\", \"discourse-i18n\"], function (_exports, _object, _pluginApi, _composer, _discourseI18n) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.default = void 0;\n  var _default = _exports.default = {\n    name: \"extend-composer-actions\",\n    after: \"inject-objects\",\n    initialize(container) {\n      const siteSettings = container.lookup(\"service:site-settings\");\n      if (!siteSettings.post_voting_enabled) {\n        return;\n      }\n      (0, _pluginApi.withPluginApi)(api => {\n        api.serializeOnCreate(\"create_as_post_voting\", \"createAsPostVoting\");\n        api.serializeOnCreate(\"only_post_voting_in_this_category\", \"onlyPostVotingInThisCategory\");\n        api.customizeComposerText({\n          actionTitle(model) {\n            if (model.createAsPostVoting || model.onlyPostVotingInThisCategory) {\n              return (0, _discourseI18n.i18n)(\"composer.create_post_voting.label\");\n            } else if (model.topic?.is_post_voting) {\n              return (0, _discourseI18n.i18n)(\"post_voting.topic.answer.label\");\n            } else {\n              return null;\n            }\n          },\n          saveLabel(model) {\n            if (model.createAsPostVoting || model.onlyPostVotingInThisCategory) {\n              return \"composer.create_post_voting.label\";\n            } else if (model.topic?.is_post_voting) {\n              return \"post_voting.topic.answer.label\";\n            } else {\n              return null;\n            }\n          }\n        });\n        api.modifyClass(\"component:composer-actions\", {\n          pluginId: \"discourse-post-voting\",\n          togglePostVotingSelected(options, model) {\n            model.toggleProperty(\"createAsPostVoting\");\n            model.notifyPropertyChange(\"replyOptions\");\n            model.notifyPropertyChange(\"action\");\n          }\n        });\n        api.modifySelectKit(\"composer-actions\").appendContent(options => {\n          if (options.action === _composer.CREATE_TOPIC) {\n            if (options.composerModel.createAsPostVoting && !options.composerModel.onlyPostVotingInThisCategory) {\n              return [{\n                name: (0, _discourseI18n.i18n)(\"composer.composer_actions.remove_as_post_voting.label\"),\n                description: (0, _discourseI18n.i18n)(\"composer.composer_actions.remove_as_post_voting.desc\"),\n                icon: \"plus\",\n                id: \"togglePostVoting\"\n              }];\n            } else if (options.composerModel.onlyPostVotingInThisCategory) {\n              return [];\n            } else {\n              return [{\n                name: (0, _discourseI18n.i18n)(\"composer.composer_actions.create_as_post_voting.label\"),\n                description: (0, _discourseI18n.i18n)(\"composer.composer_actions.create_as_post_voting.desc\"),\n                icon: \"plus\",\n                id: \"togglePostVoting\"\n              }];\n            }\n          } else {\n            return [];\n          }\n        });\n        api.modifyClass(\"model:composer\", {\n          pluginId: \"discourse-post-voting\",\n          categoryCreateAsPostVotingDefault: (0, _object.observer)(\"categoryId\", function () {\n            const createAsPostVoting = this.category?.create_as_post_voting_default;\n            const onlyPostVotingInThisCategory = this.category?.only_post_voting_in_this_category;\n            if (this.creatingTopic && onlyPostVotingInThisCategory) {\n              this.set(\"createAsPostVoting\", true);\n              this.set(\"onlyPostVotingInThisCategory\", onlyPostVotingInThisCategory);\n              this.notifyPropertyChange(\"replyOptions\");\n              this.notifyPropertyChange(\"action\");\n            } else if (this.creatingTopic && createAsPostVoting !== this.createAsPostVoting) {\n              this.set(\"createAsPostVoting\", createAsPostVoting);\n              this.notifyPropertyChange(\"replyOptions\");\n              this.notifyPropertyChange(\"action\");\n            }\n          })\n        });\n      });\n    }\n  };\n});","define(\"discourse/plugins/discourse-post-voting/discourse/initializers/post-voting-edits\", [\"exports\", \"@glimmer/component\", \"discourse/helpers/route-action\", \"discourse/lib/plugin-api\", \"discourse/lib/tracked-tools\", \"discourse/plugins/discourse-post-voting/discourse/components/post-voting-answer-button\", \"discourse/plugins/discourse-post-voting/discourse/components/post-voting-answer-header\", \"discourse/plugins/discourse-post-voting/discourse/components/post-voting-comments\", \"discourse/plugins/discourse-post-voting/discourse/components/post-voting-vote-controls\", \"@ember/component\", \"@ember/template-factory\"], function (_exports, _component, _routeAction, _pluginApi, _trackedTools, _postVotingAnswerButton, _postVotingAnswerHeader, _postVotingComments, _postVotingVoteControls, _component2, _templateFactory) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.default = void 0;\n  function initPlugin(api, container) {\n    customizePost(api);\n    customizePostMenu(api, container);\n    function customLastUnreadUrl(context) {\n      if (context.is_post_voting && context.last_read_post_number) {\n        if (context.highest_post_number <= context.last_read_post_number) {\n          // link to OP if no unread\n          return context.urlForPostNumber(1);\n        } else if (context.last_read_post_number === context.highest_post_number - 1) {\n          return context.urlForPostNumber(context.last_read_post_number + 1);\n        } else {\n          // sort by activity if user has 2+ unread posts\n          return `${context.urlForPostNumber(context.last_read_post_number + 1)}?filter=activity`;\n        }\n      }\n    }\n    api.registerCustomLastUnreadUrlCallback(customLastUnreadUrl);\n  }\n  function customizePost(api) {\n    api.modifyClass(\"model:post\", Superclass => class extends Superclass {\n      static {\n        dt7948.g(this.prototype, \"comments\", [_trackedTools.trackedArray]);\n      }\n      #comments = (dt7948.i(this, \"comments\"), void 0);\n    });\n    api.addTrackedPostProperties(\"comments_count\", \"post_voting_user_voted_direction\", \"post_voting_has_votes\");\n    api.modifyClass(\"model:post-stream\", Superclass => class extends Superclass {\n      orderStreamByActivity() {\n        this.cancelFilter();\n        this.set(\"filter\", _postVotingAnswerHeader.ORDER_BY_ACTIVITY_FILTER);\n        return this.refreshAndJumpToSecondVisible();\n      }\n      orderStreamByVotes() {\n        this.cancelFilter();\n        return this.refreshAndJumpToSecondVisible();\n      }\n    });\n    api.renderAfterWrapperOutlet(\"post-avatar\", class extends _component.default {\n      static shouldRender(args) {\n        return args.post.topic?.is_post_voting;\n      }\n      static {\n        (0, _component2.setComponentTemplate)((0, _templateFactory.createTemplateFactory)(\n        /*\n          \n                <PostVotingVoteControls\n                  @post={{@outletArgs.post}}\n                  @showLogin={{routeAction \"showLogin\"}}\n                />\n              \n        */\n        {\n          \"id\": \"ZUnj+3ki\",\n          \"block\": \"[[[1,\\\"\\\\n        \\\"],[8,[32,0],null,[[\\\"@post\\\",\\\"@showLogin\\\"],[[30,1,[\\\"post\\\"]],[28,[32,1],[\\\"showLogin\\\"],null]]],null],[1,\\\"\\\\n      \\\"]],[\\\"@outletArgs\\\"],[]]\",\n          \"moduleName\": \"/var/www/discourse/frontend/discourse/discourse/plugins/discourse-post-voting/discourse/initializers/post-voting-edits.js\",\n          \"scope\": () => [_postVotingVoteControls.default, _routeAction.default],\n          \"isStrictMode\": true\n        }), this);\n      }\n    });\n    api.renderBeforeWrapperOutlet(\"post-article\", _postVotingAnswerHeader.default);\n  }\n  function customizePostMenu(api, container) {\n    const siteSettings = container.lookup(\"service:site-settings\");\n    api.registerValueTransformer(\"post-menu-buttons\", ({\n      value: dag,\n      context: {\n        post,\n        buttonKeys\n      }\n    }) => {\n      if (post.post_voting_has_votes !== undefined) {\n        dag.add(\"post-voting-answer\", _postVotingAnswerButton.default, {\n          after: [buttonKeys.SHOW_MORE, buttonKeys.REPLY]\n        });\n        dag.delete(buttonKeys.REPLY);\n        if (post.post_number !== 1 && !siteSettings.post_voting_enable_likes_on_answers) {\n          dag.delete(buttonKeys.LIKE);\n        }\n      }\n    });\n    api.renderInOutlet(\"post-menu__after\", class extends _component.default {\n      static shouldRender(args) {\n        if (!siteSettings.post_voting_comment_enabled) {\n          return false;\n        }\n        return args.post.post_voting_has_votes !== undefined && !args.post.reply_to_post_number && !(args.state.filteredRepliesView && args.state.repliesShown);\n      }\n      static {\n        (0, _component2.setComponentTemplate)((0, _templateFactory.createTemplateFactory)(\n        /*\n          \n                <PostVotingComments\n                  @post={{@outletArgs.post}}\n                  @canCreatePost={{@outletArgs.state.canCreatePost}}\n                />\n              \n        */\n        {\n          \"id\": \"yR8zZvLb\",\n          \"block\": \"[[[1,\\\"\\\\n        \\\"],[8,[32,0],null,[[\\\"@post\\\",\\\"@canCreatePost\\\"],[[30,1,[\\\"post\\\"]],[30,1,[\\\"state\\\",\\\"canCreatePost\\\"]]]],null],[1,\\\"\\\\n      \\\"]],[\\\"@outletArgs\\\"],[]]\",\n          \"moduleName\": \"/var/www/discourse/frontend/discourse/discourse/plugins/discourse-post-voting/discourse/initializers/post-voting-edits.js\",\n          \"scope\": () => [_postVotingComments.default],\n          \"isStrictMode\": true\n        }), this);\n      }\n    });\n  }\n  var _default = _exports.default = {\n    name: \"post-voting-edits\",\n    initialize(container) {\n      const siteSettings = container.lookup(\"service:site-settings\");\n      if (!siteSettings.post_voting_enabled) {\n        return;\n      }\n      (0, _pluginApi.withPluginApi)(api => {\n        initPlugin(api, container);\n      });\n    }\n  };\n});","define(\"discourse/plugins/discourse-post-voting/discourse/initializers/post-voting-icon\", [\"exports\", \"discourse/lib/plugin-api\", \"discourse/lib/utilities\", \"discourse-i18n\", \"discourse/plugins/discourse-post-voting/discourse/components/post-voting-comment\"], function (_exports, _pluginApi, _utilities, _discourseI18n, _postVotingComment) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.default = void 0;\n  var _default = _exports.default = {\n    name: \"post-voting-icon\",\n    initialize(container) {\n      const siteSettings = container.lookup(\"service:site-settings\");\n      if (!siteSettings.post_voting_enabled) {\n        return;\n      }\n      (0, _pluginApi.withPluginApi)(api => {\n        api.registerNotificationTypeRenderer(\"question_answer_user_commented\", NotificationTypeBase => {\n          return class extends NotificationTypeBase {\n            get linkTitle() {\n              return (0, _discourseI18n.i18n)(\"notifications.titles.question_answer_user_commented\");\n            }\n            get linkHref() {\n              const url = (0, _utilities.postUrl)(this.notification.slug, this.topicId, this.notification.post_number);\n              return `${url}#${(0, _postVotingComment.buildAnchorId)(this.notification.data.post_voting_comment_id)}`;\n            }\n            get icon() {\n              return \"comment\";\n            }\n          };\n        });\n      });\n    }\n  };\n});","define(\"discourse/plugins/discourse-post-voting/discourse/lib/post-voting-flag\", [\"exports\", \"discourse/lib/ajax\", \"discourse/lib/ajax-error\", \"discourse/lib/flag-targets/flag\"], function (_exports, _ajax, _ajaxError, _flag) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.default = void 0;\n  class PostVotingFlag extends _flag.default {\n    title() {\n      return \"flagging.title\";\n    }\n    customSubmitLabel() {\n      return \"flagging.notify_action\";\n    }\n    submitLabel() {\n      return \"flagging.action\";\n    }\n    flagCreatedEvent() {\n      return \"post:flag-created\";\n    }\n    flagsAvailable(flagModal) {\n      let flagsAvailable = flagModal.site.flagTypes;\n      flagsAvailable = flagsAvailable.filter(flag => {\n        return flagModal.args.model.flagModel.availableFlags.includes(flag.name_key);\n      });\n      const notifyUserIndex = flagsAvailable.findIndex(flag => flag.name_key === \"notify_user\");\n      if (notifyUserIndex !== -1) {\n        const notifyUser = flagsAvailable[notifyUserIndex];\n        flagsAvailable.splice(notifyUserIndex, 1);\n        flagsAvailable.splice(0, 0, notifyUser);\n      }\n      return flagsAvailable;\n    }\n    async create(flagModal, opts) {\n      flagModal.args.closeModal();\n      return (0, _ajax.ajax)(\"/post_voting/comments/flag\", {\n        method: \"PUT\",\n        data: {\n          comment_id: flagModal.args.model.flagModel.id,\n          flag_type_id: flagModal.selected.id,\n          message: opts.message,\n          is_warning: opts.isWarning,\n          take_action: opts.takeAction,\n          queue_for_review: opts.queue_for_review\n        }\n      }).catch(error => (0, _ajaxError.popupAjaxError)(error));\n    }\n  }\n  _exports.default = PostVotingFlag;\n});","define(\"discourse/plugins/discourse-post-voting/discourse/lib/post-voting-utilities\", [\"exports\", \"discourse/lib/ajax\", \"discourse/lib/ajax-error\"], function (_exports, _ajax, _ajaxError) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.whoVoted = _exports.removeVote = _exports.castVote = void 0;\n  const vote = function (type, data) {\n    return (0, _ajax.ajax)(\"/post_voting/vote\", {\n      type,\n      data\n    });\n  };\n  const removeVote = function (data) {\n    return vote(\"DELETE\", data);\n  };\n  _exports.removeVote = removeVote;\n  const castVote = function (data) {\n    return vote(\"POST\", data);\n  };\n  _exports.castVote = castVote;\n  const whoVoted = function (data) {\n    return (0, _ajax.ajax)(\"/post_voting/voters\", {\n      type: \"GET\",\n      data\n    }).catch(_ajaxError.popupAjaxError);\n  };\n  _exports.whoVoted = whoVoted;\n});"],"mappings":"AAAAA,OAAA,kQAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,GACA;AAEAC,OAAAC,eAAAR,EAAA,cACAS,OAAA,IAEAT,EAAAU,aAAA;AACA,MAAAC,UAAAV,EAAAS,QACA,mBAAAE,CAAAC,GACA,OAAAA,EAAAC,MAAAC,eAAA,IAAAF,EAAAG,KAAAC,WACA,QAEAC,OAAAC,EAAAC,KAAAC,UAAA,QAAAnB,EAAAoB,SACA,CACAC,QAAAL,OAAAM,EAAAJ,KAAA;AACA,aAAAK,GACA,OAAAL,KAAAG,KAAAG,WACA,SAEA,EAAArB,EAAAsB,uBAAA,EAAArB,EAAAsB,uBAiBA,CACAC,GAAA,WACAC,MAAA,qXACAC,WAAA,kIACAC,MAAA,KAAA7B,EAAAO,QAAAN,EAAAM,SACAuB,cAAA,IACAb,KACA,EAEApB,EAAAU,QAAAC,C,GC7CAZ,OAAA,4SAAAC,EAAAC,EAAAiC,EA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