{"version":3,"file":"discourse-topic-voting.js","names":["define","_exports","_component","_tracking","_helper","_object","_service","_template","_concatClass","_routeAction","_ajax","_ajaxError","_closeOnClickOutside","_discourseI18n","_voteButton","_voteCount","_voteOptions","_component2","_templateFactory","Object","defineProperty","value","default","VoteBox","static","dt7948","g","this","prototype","service","siteSettings","i","currentUser","tracked","votesAlert","allowClick","initialVote","showOptions","addVote","topic","args","ajax","type","data","topic_id","id","then","result","vote_count","user_voted","votes_exceeded","can_vote","votes_left","alert","catch","popupAjaxError","n","action","removeVote","showVoteOptions","closeVoteOptions","closeVotesAlert","setComponentTemplate","createTemplateFactory","block","moduleName","scope","hash","htmlSafe","i18n","isStrictMode","_dButton","_transformer","wrapperClasses","classes","closed","push","topic_voting_show_who_voted","join","buttonContent","count","click","applyBehaviorTransformer","showLogin","_modifier","_truthHelpers","_asyncContent","_smallUserList","_decorators","_getUrl","showWhoVoted","loadWhoVoted","users","map","user","template","avatar_template","username","post_url","url","toLowerCase","bind","event","preventDefault","stopPropagation","clickOutside","eq","on","_dIcon","FeatureVotingSettings","c","Input","classNames","tagName","_voteBox","TopicTitleVoting","_routing","UserVotedTopics","LinkTo","resource","path","route","resetNamespace","_pluginApi","_navItem","name","initialize","withPluginApi","api","container","lookup","topic_voting_enabled","sortOrders","pushObject","term","addNavigationBarItem","before","customFilter","category","customHref","pathFor","forceActive","router","queryParams","currentRoute","keys","length","getCurrentUser","addSearchSuggestion","registerValueTransformer","_ref","context","customFields","enable_topic_voting","addPostClassesCallback","post","post_number","addTrackedPostProperties","addTagsHtmlCallback","buffer","title","userVotedClass","priority","modifyClass","Superclass","addCategorySortCriteria","addBehaviorTransformerName","_userAction","_userTopicList","UserActivityVotes","userActionType","TYPES","topics","model","store","findFiltered","filter","modelFor","get","set","emptyState","isCurrentUser","body"],"sources":["discourse/plugins/discourse-topic-voting/discourse/components/vote-box.js","discourse/plugins/discourse-topic-voting/discourse/components/vote-button.js","discourse/plugins/discourse-topic-voting/discourse/components/vote-count.js","discourse/plugins/discourse-topic-voting/discourse/components/vote-options.js","discourse/plugins/discourse-topic-voting/discourse/connectors/category-custom-settings/feature-voting-settings.js","discourse/plugins/discourse-topic-voting/discourse/connectors/topic-above-post-stream/topic-title-voting.js","discourse/plugins/discourse-topic-voting/discourse/connectors/user-activity-bottom/user-voted-topics.js","discourse/plugins/discourse-topic-voting/discourse/feature-voting-route-map.js","discourse/plugins/discourse-topic-voting/discourse/initializers/discourse-topic-voting.js","discourse/plugins/discourse-topic-voting/discourse/pre-initializers/extend-category-for-voting.js","discourse/plugins/discourse-topic-voting/discourse/pre-initializers/transformers.js","discourse/plugins/discourse-topic-voting/discourse/routes/user-activity-votes.js"],"sourcesContent":["define(\"discourse/plugins/discourse-topic-voting/discourse/components/vote-box\", [\"exports\", \"@glimmer/component\", \"@glimmer/tracking\", \"@ember/helper\", \"@ember/object\", \"@ember/service\", \"@ember/template\", \"discourse/helpers/concat-class\", \"discourse/helpers/route-action\", \"discourse/lib/ajax\", \"discourse/lib/ajax-error\", \"discourse/modifiers/close-on-click-outside\", \"discourse-i18n\", \"discourse/plugins/discourse-topic-voting/discourse/components/vote-button\", \"discourse/plugins/discourse-topic-voting/discourse/components/vote-count\", \"discourse/plugins/discourse-topic-voting/discourse/components/vote-options\", \"@ember/component\", \"@ember/template-factory\"], function (_exports, _component, _tracking, _helper, _object, _service, _template, _concatClass, _routeAction, _ajax, _ajaxError, _closeOnClickOutside, _discourseI18n, _voteButton, _voteCount, _voteOptions, _component2, _templateFactory) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.default = void 0;\n  class VoteBox extends _component.default {\n    static #_ = (() => dt7948.g(this.prototype, \"siteSettings\", [_service.service]))();\n    #siteSettings = (() => (dt7948.i(this, \"siteSettings\"), void 0))();\n    static #_2 = (() => dt7948.g(this.prototype, \"currentUser\", [_service.service]))();\n    #currentUser = (() => (dt7948.i(this, \"currentUser\"), void 0))();\n    static #_3 = (() => dt7948.g(this.prototype, \"votesAlert\", [_tracking.tracked]))();\n    #votesAlert = (() => (dt7948.i(this, \"votesAlert\"), void 0))();\n    static #_4 = (() => dt7948.g(this.prototype, \"allowClick\", [_tracking.tracked], function () {\n      return true;\n    }))();\n    #allowClick = (() => (dt7948.i(this, \"allowClick\"), void 0))();\n    static #_5 = (() => dt7948.g(this.prototype, \"initialVote\", [_tracking.tracked], function () {\n      return false;\n    }))();\n    #initialVote = (() => (dt7948.i(this, \"initialVote\"), void 0))();\n    static #_6 = (() => dt7948.g(this.prototype, \"showOptions\", [_tracking.tracked], function () {\n      return false;\n    }))();\n    #showOptions = (() => (dt7948.i(this, \"showOptions\"), void 0))();\n    addVote() {\n      let topic = this.args.topic;\n      return (0, _ajax.ajax)(\"/voting/vote\", {\n        type: \"POST\",\n        data: {\n          topic_id: topic.id\n        }\n      }).then(result => {\n        topic.vote_count = result.vote_count;\n        topic.user_voted = true;\n        this.currentUser.votes_exceeded = !result.can_vote;\n        this.currentUser.votes_left = result.votes_left;\n        this.votesAlert = result.alert;\n        this.allowClick = true;\n        this.showOptions = false;\n      }).catch(_ajaxError.popupAjaxError);\n    }\n    static #_7 = (() => dt7948.n(this.prototype, \"addVote\", [_object.action]))();\n    removeVote() {\n      const topic = this.args.topic;\n      return (0, _ajax.ajax)(\"/voting/unvote\", {\n        type: \"POST\",\n        data: {\n          topic_id: topic.id\n        }\n      }).then(result => {\n        topic.vote_count = result.vote_count;\n        topic.user_voted = false;\n        this.currentUser.votes_exceeded = !result.can_vote;\n        this.currentUser.votes_left = result.votes_left;\n        this.allowClick = true;\n        this.showOptions = false;\n      }).catch(_ajaxError.popupAjaxError);\n    }\n    static #_8 = (() => dt7948.n(this.prototype, \"removeVote\", [_object.action]))();\n    showVoteOptions() {\n      this.showOptions = true;\n    }\n    static #_9 = (() => dt7948.n(this.prototype, \"showVoteOptions\", [_object.action]))();\n    closeVoteOptions() {\n      this.showOptions = false;\n    }\n    static #_10 = (() => dt7948.n(this.prototype, \"closeVoteOptions\", [_object.action]))();\n    closeVotesAlert() {\n      this.votesAlert = null;\n    }\n    static #_11 = (() => dt7948.n(this.prototype, \"closeVotesAlert\", [_object.action]))();\n    static #_12 = (() => (0, _component2.setComponentTemplate)((0, _templateFactory.createTemplateFactory)(\n    /*\n      \n        <div\n          class={{concatClass\n            \"voting-wrapper\"\n            (if this.siteSettings.topic_voting_show_who_voted \"show-pointer\")\n          }}\n        >\n          <VoteCount @topic={{@topic}} @showLogin={{routeAction \"showLogin\"}} />\n          <VoteButton\n            @topic={{@topic}}\n            @allowClick={{this.allowClick}}\n            @showVoteOptions={{this.showVoteOptions}}\n            @addVote={{this.addVote}}\n            @showLogin={{routeAction \"showLogin\"}}\n          />\n    \n          {{#if this.showOptions}}\n            <VoteOptions\n              @topic={{@topic}}\n              @removeVote={{this.removeVote}}\n              {{closeOnClickOutside this.closeVoteOptions (hash)}}\n            />\n          {{/if}}\n    \n          {{#if this.votesAlert}}\n            <div\n              class=\"voting-popup-menu vote-options popup-menu\"\n              {{closeOnClickOutside this.closeVotesAlert (hash)}}\n            >\n              {{htmlSafe\n                (i18n\n                  \"topic_voting.votes_left\"\n                  count=this.currentUser.votes_left\n                  path=\"/my/activity/votes\"\n                )\n              }}\n            </div>\n          {{/if}}\n        </div>\n      \n    */\n    {\n      \"id\": \"1oSLlFUI\",\n      \"block\": \"[[[1,\\\"\\\\n    \\\"],[10,0],[15,0,[28,[32,0],[\\\"voting-wrapper\\\",[52,[30,0,[\\\"siteSettings\\\",\\\"topic_voting_show_who_voted\\\"]],\\\"show-pointer\\\"]],null]],[12],[1,\\\"\\\\n      \\\"],[8,[32,1],null,[[\\\"@topic\\\",\\\"@showLogin\\\"],[[30,1],[28,[32,2],[\\\"showLogin\\\"],null]]],null],[1,\\\"\\\\n      \\\"],[8,[32,3],null,[[\\\"@topic\\\",\\\"@allowClick\\\",\\\"@showVoteOptions\\\",\\\"@addVote\\\",\\\"@showLogin\\\"],[[30,1],[30,0,[\\\"allowClick\\\"]],[30,0,[\\\"showVoteOptions\\\"]],[30,0,[\\\"addVote\\\"]],[28,[32,2],[\\\"showLogin\\\"],null]]],null],[1,\\\"\\\\n\\\\n\\\"],[41,[30,0,[\\\"showOptions\\\"]],[[[1,\\\"        \\\"],[8,[32,4],[[4,[32,5],[[30,0,[\\\"closeVoteOptions\\\"]],[28,[32,6],null,null]],null]],[[\\\"@topic\\\",\\\"@removeVote\\\"],[[30,1],[30,0,[\\\"removeVote\\\"]]]],null],[1,\\\"\\\\n\\\"]],[]],null],[1,\\\"\\\\n\\\"],[41,[30,0,[\\\"votesAlert\\\"]],[[[1,\\\"        \\\"],[11,0],[24,0,\\\"voting-popup-menu vote-options popup-menu\\\"],[4,[32,5],[[30,0,[\\\"closeVotesAlert\\\"]],[28,[32,6],null,null]],null],[12],[1,\\\"\\\\n          \\\"],[1,[28,[32,7],[[28,[32,8],[\\\"topic_voting.votes_left\\\"],[[\\\"count\\\",\\\"path\\\"],[[30,0,[\\\"currentUser\\\",\\\"votes_left\\\"]],\\\"/my/activity/votes\\\"]]]],null]],[1,\\\"\\\\n        \\\"],[13],[1,\\\"\\\\n\\\"]],[]],null],[1,\\\"    \\\"],[13],[1,\\\"\\\\n  \\\"]],[\\\"@topic\\\"],false,[\\\"if\\\"]]\",\n      \"moduleName\": \"/var/www/discourse/app/assets/javascripts/discourse/discourse/plugins/discourse-topic-voting/discourse/components/vote-box.js\",\n      \"scope\": () => [_concatClass.default, _voteCount.default, _routeAction.default, _voteButton.default, _voteOptions.default, _closeOnClickOutside.default, _helper.hash, _template.htmlSafe, _discourseI18n.i18n],\n      \"isStrictMode\": true\n    }), this))();\n  }\n  _exports.default = VoteBox;\n});","define(\"discourse/plugins/discourse-topic-voting/discourse/components/vote-button\", [\"exports\", \"@glimmer/component\", \"@ember/object\", \"@ember/service\", \"discourse/components/d-button\", \"discourse/lib/transformer\", \"discourse-i18n\", \"@ember/component\", \"@ember/template-factory\"], function (_exports, _component, _object, _service, _dButton, _transformer, _discourseI18n, _component2, _templateFactory) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.default = void 0;\n  class VoteBox extends _component.default {\n    static #_ = (() => dt7948.g(this.prototype, \"siteSettings\", [_service.service]))();\n    #siteSettings = (() => (dt7948.i(this, \"siteSettings\"), void 0))();\n    static #_2 = (() => dt7948.g(this.prototype, \"currentUser\", [_service.service]))();\n    #currentUser = (() => (dt7948.i(this, \"currentUser\"), void 0))();\n    get wrapperClasses() {\n      const classes = [];\n      const {\n        topic\n      } = this.args;\n      if (topic.closed) {\n        classes.push(\"voting-closed\");\n      } else {\n        if (!topic.user_voted) {\n          classes.push(\"nonvote\");\n        } else {\n          if (this.currentUser && this.currentUser.votes_exceeded) {\n            classes.push(\"vote-limited nonvote\");\n          } else {\n            classes.push(\"vote\");\n          }\n        }\n      }\n      if (this.siteSettings.topic_voting_show_who_voted) {\n        classes.push(\"show-pointer\");\n      }\n      return classes.join(\" \");\n    }\n    get buttonContent() {\n      const {\n        topic\n      } = this.args;\n      if (this.currentUser) {\n        if (topic.closed) {\n          return (0, _discourseI18n.i18n)(\"topic_voting.voting_closed_title\");\n        }\n        if (topic.user_voted) {\n          return (0, _discourseI18n.i18n)(\"topic_voting.voted_title\");\n        }\n        if (this.currentUser.votes_exceeded) {\n          return (0, _discourseI18n.i18n)(\"topic_voting.voting_limit\");\n        }\n        return (0, _discourseI18n.i18n)(\"topic_voting.vote_title\");\n      }\n      if (topic.vote_count) {\n        return (0, _discourseI18n.i18n)(\"topic_voting.anonymous_button\", {\n          count: topic.vote_count\n        });\n      }\n      return (0, _discourseI18n.i18n)(\"topic_voting.anonymous_button\", {\n        count: 1\n      });\n    }\n    click() {\n      (0, _transformer.applyBehaviorTransformer)(\"topic-vote-button-click\", () => {\n        if (!this.currentUser) {\n          return this.args.showLogin();\n        }\n        const {\n          topic\n        } = this.args;\n        if (!topic.closed && !topic.user_voted && !this.currentUser.votes_exceeded) {\n          this.args.addVote();\n        }\n        if (topic.user_voted || this.currentUser.votes_exceeded) {\n          this.args.showVoteOptions();\n        }\n      });\n    }\n    static #_3 = (() => dt7948.n(this.prototype, \"click\", [_object.action]))();\n    static #_4 = (() => (0, _component2.setComponentTemplate)((0, _templateFactory.createTemplateFactory)(\n    /*\n      \n        <div class={{this.wrapperClasses}}>\n          <DButton\n            @translatedTitle={{if\n              this.currentUser\n              (i18n\n                \"topic_voting.votes_left_button_title\"\n                count=this.currentUser.votes_left\n              )\n              \"\"\n            }}\n            @translatedLabel={{this.buttonContent}}\n            class=\"btn-primary vote-button\"\n            @action={{this.click}}\n          />\n        </div>\n      \n    */\n    {\n      \"id\": \"d3YMfFZR\",\n      \"block\": \"[[[1,\\\"\\\\n    \\\"],[10,0],[15,0,[30,0,[\\\"wrapperClasses\\\"]]],[12],[1,\\\"\\\\n      \\\"],[8,[32,0],[[24,0,\\\"btn-primary vote-button\\\"]],[[\\\"@translatedTitle\\\",\\\"@translatedLabel\\\",\\\"@action\\\"],[[52,[30,0,[\\\"currentUser\\\"]],[28,[32,1],[\\\"topic_voting.votes_left_button_title\\\"],[[\\\"count\\\"],[[30,0,[\\\"currentUser\\\",\\\"votes_left\\\"]]]]],\\\"\\\"],[30,0,[\\\"buttonContent\\\"]],[30,0,[\\\"click\\\"]]]],null],[1,\\\"\\\\n    \\\"],[13],[1,\\\"\\\\n  \\\"]],[],false,[\\\"if\\\"]]\",\n      \"moduleName\": \"/var/www/discourse/app/assets/javascripts/discourse/discourse/plugins/discourse-topic-voting/discourse/components/vote-button.js\",\n      \"scope\": () => [_dButton.default, _discourseI18n.i18n],\n      \"isStrictMode\": true\n    }), this))();\n  }\n  _exports.default = VoteBox;\n});","define(\"discourse/plugins/discourse-topic-voting/discourse/components/vote-count\", [\"exports\", \"@glimmer/component\", \"@glimmer/tracking\", \"@ember/helper\", \"@ember/modifier\", \"@ember/object\", \"@ember/service\", \"truth-helpers\", \"discourse/components/async-content\", \"discourse/components/small-user-list\", \"discourse/helpers/concat-class\", \"discourse/lib/ajax\", \"discourse/lib/decorators\", \"discourse/lib/get-url\", \"discourse/modifiers/close-on-click-outside\", \"@ember/component\", \"@ember/template-factory\"], function (_exports, _component, _tracking, _helper, _modifier, _object, _service, _truthHelpers, _asyncContent, _smallUserList, _concatClass, _ajax, _decorators, _getUrl, _closeOnClickOutside, _component2, _templateFactory) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.default = void 0;\n  class VoteBox extends _component.default {\n    static #_ = (() => dt7948.g(this.prototype, \"siteSettings\", [_service.service]))();\n    #siteSettings = (() => (dt7948.i(this, \"siteSettings\"), void 0))();\n    static #_2 = (() => dt7948.g(this.prototype, \"currentUser\", [_service.service]))();\n    #currentUser = (() => (dt7948.i(this, \"currentUser\"), void 0))();\n    static #_3 = (() => dt7948.g(this.prototype, \"showWhoVoted\", [_tracking.tracked], function () {\n      return false;\n    }))();\n    #showWhoVoted = (() => (dt7948.i(this, \"showWhoVoted\"), void 0))();\n    async loadWhoVoted() {\n      return (0, _ajax.ajax)(\"/voting/who\", {\n        type: \"GET\",\n        data: {\n          topic_id: this.args.topic.id\n        }\n      }).then(users => users.map(user => {\n        return {\n          template: user.avatar_template,\n          username: user.username,\n          post_url: user.post_url,\n          url: (0, _getUrl.default)(\"/u/\") + user.username.toLowerCase()\n        };\n      }));\n    }\n    static #_4 = (() => dt7948.n(this.prototype, \"loadWhoVoted\", [_decorators.bind]))();\n    click(event) {\n      event.preventDefault();\n      event.stopPropagation();\n      if (!this.currentUser) {\n        return this.args.showLogin();\n      }\n      if (this.showWhoVoted) {\n        this.showWhoVoted = false;\n      } else if (this.siteSettings.topic_voting_show_who_voted) {\n        this.showWhoVoted = true;\n      }\n    }\n    static #_5 = (() => dt7948.n(this.prototype, \"click\", [_object.action]))();\n    clickOutside() {\n      this.showWhoVoted = false;\n    }\n    static #_6 = (() => dt7948.n(this.prototype, \"clickOutside\", [_object.action]))();\n    static #_7 = (() => (0, _component2.setComponentTemplate)((0, _templateFactory.createTemplateFactory)(\n    /*\n      \n        <div\n          class={{concatClass\n            \"vote-count-wrapper\"\n            (if (eq @topic.vote_count 0) \"no-votes\")\n          }}\n          {{on \"click\" this.click}}\n          role=\"button\"\n        >\n          <div class=\"vote-count\">\n            {{@topic.vote_count}}\n          </div>\n        </div>\n    \n        {{#if this.showWhoVoted}}\n          <div\n            class=\"who-voted popup-menu voting-popup-menu\"\n            {{closeOnClickOutside\n              this.clickOutside\n              (hash secondaryTargetSelector=\".vote-count-wrapper\")\n            }}\n          >\n            <AsyncContent @asyncData={{this.loadWhoVoted}}>\n              <:content as |voters|>\n                <SmallUserList @users={{voters}} class=\"regular-votes\" />\n              </:content>\n            </AsyncContent>\n          </div>\n        {{/if}}\n      \n    */\n    {\n      \"id\": \"qF9Ehya9\",\n      \"block\": \"[[[1,\\\"\\\\n    \\\"],[11,0],[16,0,[28,[32,0],[\\\"vote-count-wrapper\\\",[52,[28,[32,1],[[30,1,[\\\"vote_count\\\"]],0],null],\\\"no-votes\\\"]],null]],[24,\\\"role\\\",\\\"button\\\"],[4,[32,2],[\\\"click\\\",[30,0,[\\\"click\\\"]]],null],[12],[1,\\\"\\\\n      \\\"],[10,0],[14,0,\\\"vote-count\\\"],[12],[1,\\\"\\\\n        \\\"],[1,[30,1,[\\\"vote_count\\\"]]],[1,\\\"\\\\n      \\\"],[13],[1,\\\"\\\\n    \\\"],[13],[1,\\\"\\\\n\\\\n\\\"],[41,[30,0,[\\\"showWhoVoted\\\"]],[[[1,\\\"      \\\"],[11,0],[24,0,\\\"who-voted popup-menu voting-popup-menu\\\"],[4,[32,3],[[30,0,[\\\"clickOutside\\\"]],[28,[32,4],null,[[\\\"secondaryTargetSelector\\\"],[\\\".vote-count-wrapper\\\"]]]],null],[12],[1,\\\"\\\\n        \\\"],[8,[32,5],null,[[\\\"@asyncData\\\"],[[30,0,[\\\"loadWhoVoted\\\"]]]],[[\\\"content\\\"],[[[[1,\\\"\\\\n            \\\"],[8,[32,6],[[24,0,\\\"regular-votes\\\"]],[[\\\"@users\\\"],[[30,2]]],null],[1,\\\"\\\\n          \\\"]],[2]]]]],[1,\\\"\\\\n      \\\"],[13],[1,\\\"\\\\n\\\"]],[]],null],[1,\\\"  \\\"]],[\\\"@topic\\\",\\\"voters\\\"],false,[\\\"if\\\"]]\",\n      \"moduleName\": \"/var/www/discourse/app/assets/javascripts/discourse/discourse/plugins/discourse-topic-voting/discourse/components/vote-count.js\",\n      \"scope\": () => [_concatClass.default, _truthHelpers.eq, _modifier.on, _closeOnClickOutside.default, _helper.hash, _asyncContent.default, _smallUserList.default],\n      \"isStrictMode\": true\n    }), this))();\n  }\n  _exports.default = VoteBox;\n});","define(\"discourse/plugins/discourse-topic-voting/discourse/components/vote-options\", [\"exports\", \"@glimmer/component\", \"@ember/modifier\", \"@ember/service\", \"discourse/helpers/d-icon\", \"discourse-i18n\", \"@ember/component\", \"@ember/template-factory\"], function (_exports, _component, _modifier, _service, _dIcon, _discourseI18n, _component2, _templateFactory) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.default = void 0;\n  class VoteBox extends _component.default {\n    static #_ = (() => dt7948.g(this.prototype, \"currentUser\", [_service.service]))();\n    #currentUser = (() => (dt7948.i(this, \"currentUser\"), void 0))();\n    static #_2 = (() => (0, _component2.setComponentTemplate)((0, _templateFactory.createTemplateFactory)(\n    /*\n      \n        <div class=\"vote-options voting-popup-menu popup-menu\" ...attributes>\n          {{#if @topic.user_voted}}\n            <div\n              role=\"button\"\n              class=\"remove-vote vote-option\"\n              {{on \"click\" @removeVote}}\n            >\n              {{icon \"xmark\"}}\n              {{i18n \"topic_voting.remove_vote\"}}\n            </div>\n          {{else if this.currentUser.votes_exceeded}}\n            <div>{{i18n \"topic_voting.reached_limit\"}}</div>\n            <p>\n              <a href=\"/my/activity/votes\">{{i18n \"topic_voting.list_votes\"}}</a>\n            </p>\n          {{/if}}\n        </div>\n      \n    */\n    {\n      \"id\": \"1m7usocZ\",\n      \"block\": \"[[[1,\\\"\\\\n    \\\"],[11,0],[24,0,\\\"vote-options voting-popup-menu popup-menu\\\"],[17,1],[12],[1,\\\"\\\\n\\\"],[41,[30,2,[\\\"user_voted\\\"]],[[[1,\\\"        \\\"],[11,0],[24,\\\"role\\\",\\\"button\\\"],[24,0,\\\"remove-vote vote-option\\\"],[4,[32,0],[\\\"click\\\",[30,3]],null],[12],[1,\\\"\\\\n          \\\"],[1,[28,[32,1],[\\\"xmark\\\"],null]],[1,\\\"\\\\n          \\\"],[1,[28,[32,2],[\\\"topic_voting.remove_vote\\\"],null]],[1,\\\"\\\\n        \\\"],[13],[1,\\\"\\\\n\\\"]],[]],[[[41,[30,0,[\\\"currentUser\\\",\\\"votes_exceeded\\\"]],[[[1,\\\"        \\\"],[10,0],[12],[1,[28,[32,2],[\\\"topic_voting.reached_limit\\\"],null]],[13],[1,\\\"\\\\n        \\\"],[10,2],[12],[1,\\\"\\\\n          \\\"],[10,3],[14,6,\\\"/my/activity/votes\\\"],[12],[1,[28,[32,2],[\\\"topic_voting.list_votes\\\"],null]],[13],[1,\\\"\\\\n        \\\"],[13],[1,\\\"\\\\n      \\\"]],[]],null]],[]]],[1,\\\"    \\\"],[13],[1,\\\"\\\\n  \\\"]],[\\\"&attrs\\\",\\\"@topic\\\",\\\"@removeVote\\\"],false,[\\\"if\\\"]]\",\n      \"moduleName\": \"/var/www/discourse/app/assets/javascripts/discourse/discourse/plugins/discourse-topic-voting/discourse/components/vote-options.js\",\n      \"scope\": () => [_modifier.on, _dIcon.default, _discourseI18n.i18n],\n      \"isStrictMode\": true\n    }), this))();\n  }\n  _exports.default = VoteBox;\n});","define(\"discourse/plugins/discourse-topic-voting/discourse/connectors/category-custom-settings/feature-voting-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 FeatureVotingSettings = dt7948.c(class FeatureVotingSettings extends _component.default {\n    static #_ = (() => (0, _component.setComponentTemplate)((0, _templateFactory.createTemplateFactory)(\n    /*\n      \n        <h3>{{i18n \"topic_voting.title\"}}</h3>\n        <section class=\"field\">\n          <div class=\"enable-topic-voting\">\n            <label class=\"checkbox-label\">\n              <Input\n                @type=\"checkbox\"\n                @checked={{this.category.custom_fields.enable_topic_voting}}\n              />\n              {{i18n \"topic_voting.allow_topic_voting\"}}\n            </label>\n          </div>\n        </section>\n      \n    */\n    {\n      \"id\": \"D69Rqwsp\",\n      \"block\": \"[[[1,\\\"\\\\n    \\\"],[10,\\\"h3\\\"],[12],[1,[28,[32,0],[\\\"topic_voting.title\\\"],null]],[13],[1,\\\"\\\\n    \\\"],[10,\\\"section\\\"],[14,0,\\\"field\\\"],[12],[1,\\\"\\\\n      \\\"],[10,0],[14,0,\\\"enable-topic-voting\\\"],[12],[1,\\\"\\\\n        \\\"],[10,\\\"label\\\"],[14,0,\\\"checkbox-label\\\"],[12],[1,\\\"\\\\n          \\\"],[8,[32,1],null,[[\\\"@type\\\",\\\"@checked\\\"],[\\\"checkbox\\\",[30,0,[\\\"category\\\",\\\"custom_fields\\\",\\\"enable_topic_voting\\\"]]]],null],[1,\\\"\\\\n          \\\"],[1,[28,[32,0],[\\\"topic_voting.allow_topic_voting\\\"],null]],[1,\\\"\\\\n        \\\"],[13],[1,\\\"\\\\n      \\\"],[13],[1,\\\"\\\\n    \\\"],[13],[1,\\\"\\\\n  \\\"]],[],false,[]]\",\n      \"moduleName\": \"/var/www/discourse/app/assets/javascripts/discourse/discourse/plugins/discourse-topic-voting/discourse/connectors/category-custom-settings/feature-voting-settings.js\",\n      \"scope\": () => [_discourseI18n.i18n, _component.Input],\n      \"isStrictMode\": true\n    }), this))();\n  }, [(0, _component2.classNames)(\"category-custom-settings-outlet\", \"feature-voting-settings\"), (0, _component2.tagName)(\"\")]);\n  var _default = _exports.default = FeatureVotingSettings;\n});","define(\"discourse/plugins/discourse-topic-voting/discourse/connectors/topic-above-post-stream/topic-title-voting\", [\"exports\", \"@ember/component\", \"@ember-decorators/component\", \"discourse/helpers/route-action\", \"discourse/plugins/discourse-topic-voting/discourse/components/vote-box\", \"@ember/template-factory\"], function (_exports, _component, _component2, _routeAction, _voteBox, _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 TopicTitleVoting = dt7948.c(class TopicTitleVoting extends _component.default {\n    static #_ = (() => (0, _component.setComponentTemplate)((0, _templateFactory.createTemplateFactory)(\n    /*\n      \n        {{#if this.model.can_vote}}\n          {{#if this.model.postStream.loaded}}\n            {{#if this.model.postStream.firstPostPresent}}\n              <div class=\"voting title-voting\">\n                <VoteBox\n                  @topic={{this.model}}\n                  @showLogin={{routeAction \"showLogin\"}}\n                />\n              </div>\n            {{/if}}\n          {{/if}}\n        {{/if}}\n      \n    */\n    {\n      \"id\": \"Z17smIYz\",\n      \"block\": \"[[[1,\\\"\\\\n\\\"],[41,[30,0,[\\\"model\\\",\\\"can_vote\\\"]],[[[41,[30,0,[\\\"model\\\",\\\"postStream\\\",\\\"loaded\\\"]],[[[41,[30,0,[\\\"model\\\",\\\"postStream\\\",\\\"firstPostPresent\\\"]],[[[1,\\\"          \\\"],[10,0],[14,0,\\\"voting title-voting\\\"],[12],[1,\\\"\\\\n            \\\"],[8,[32,0],null,[[\\\"@topic\\\",\\\"@showLogin\\\"],[[30,0,[\\\"model\\\"]],[28,[32,1],[\\\"showLogin\\\"],null]]],null],[1,\\\"\\\\n          \\\"],[13],[1,\\\"\\\\n\\\"]],[]],null]],[]],null]],[]],null],[1,\\\"  \\\"]],[],false,[\\\"if\\\"]]\",\n      \"moduleName\": \"/var/www/discourse/app/assets/javascripts/discourse/discourse/plugins/discourse-topic-voting/discourse/connectors/topic-above-post-stream/topic-title-voting.js\",\n      \"scope\": () => [_voteBox.default, _routeAction.default],\n      \"isStrictMode\": true\n    }), this))();\n  }, [(0, _component2.classNames)(\"topic-above-post-stream-outlet\", \"topic-title-voting\"), (0, _component2.tagName)(\"div\")]);\n  var _default = _exports.default = TopicTitleVoting;\n});","define(\"discourse/plugins/discourse-topic-voting/discourse/connectors/user-activity-bottom/user-voted-topics\", [\"exports\", \"@glimmer/component\", \"@ember/routing\", \"@ember/service\", \"discourse/helpers/d-icon\", \"discourse-i18n\", \"@ember/component\", \"@ember/template-factory\"], function (_exports, _component, _routing, _service, _dIcon, _discourseI18n, _component2, _templateFactory) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.default = void 0;\n  class UserVotedTopics extends _component.default {\n    static #_ = (() => dt7948.g(this.prototype, \"siteSettings\", [_service.service]))();\n    #siteSettings = (() => (dt7948.i(this, \"siteSettings\"), void 0))();\n    static #_2 = (() => (0, _component2.setComponentTemplate)((0, _templateFactory.createTemplateFactory)(\n    /*\n      \n        {{#if this.siteSettings.topic_voting_show_votes_on_profile}}\n          <li class=\"user-nav__activity-votes\">\n    \n            <LinkTo @route=\"userActivity.votes\">\n              {{icon \"heart\"}}\n              {{i18n \"topic_voting.vote_title_plural\"}}\n            </LinkTo>\n          </li>\n        {{/if}}\n      \n    */\n    {\n      \"id\": \"UdQFAOT8\",\n      \"block\": \"[[[1,\\\"\\\\n\\\"],[41,[30,0,[\\\"siteSettings\\\",\\\"topic_voting_show_votes_on_profile\\\"]],[[[1,\\\"      \\\"],[10,\\\"li\\\"],[14,0,\\\"user-nav__activity-votes\\\"],[12],[1,\\\"\\\\n\\\\n        \\\"],[8,[32,0],null,[[\\\"@route\\\"],[\\\"userActivity.votes\\\"]],[[\\\"default\\\"],[[[[1,\\\"\\\\n          \\\"],[1,[28,[32,1],[\\\"heart\\\"],null]],[1,\\\"\\\\n          \\\"],[1,[28,[32,2],[\\\"topic_voting.vote_title_plural\\\"],null]],[1,\\\"\\\\n        \\\"]],[]]]]],[1,\\\"\\\\n      \\\"],[13],[1,\\\"\\\\n\\\"]],[]],null],[1,\\\"  \\\"]],[],false,[\\\"if\\\"]]\",\n      \"moduleName\": \"/var/www/discourse/app/assets/javascripts/discourse/discourse/plugins/discourse-topic-voting/discourse/connectors/user-activity-bottom/user-voted-topics.js\",\n      \"scope\": () => [_routing.LinkTo, _dIcon.default, _discourseI18n.i18n],\n      \"isStrictMode\": true\n    }), this))();\n  }\n  _exports.default = UserVotedTopics;\n});","define(\"discourse/plugins/discourse-topic-voting/discourse/feature-voting-route-map\", [\"exports\"], function (_exports) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.default = void 0;\n  var _default = _exports.default = {\n    resource: \"user\",\n    path: \"users/:username\",\n    map() {\n      this.route(\"userActivity\", {\n        path: \"activity\",\n        resetNamespace: true\n      }, function () {\n        this.route(\"votes\");\n      });\n    }\n  };\n});","define(\"discourse/plugins/discourse-topic-voting/discourse/initializers/discourse-topic-voting\", [\"exports\", \"discourse/lib/plugin-api\", \"discourse/models/nav-item\", \"discourse-i18n\"], function (_exports, _pluginApi, _navItem, _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: \"discourse-topic-voting\",\n    initialize() {\n      (0, _pluginApi.withPluginApi)(api => {\n        const siteSettings = api.container.lookup(\"service:site-settings\");\n        if (siteSettings.topic_voting_enabled) {\n          const pageSearchController = api.container.lookup(\"controller:full-page-search\");\n          pageSearchController.sortOrders.pushObject({\n            name: (0, _discourseI18n.i18n)(\"search.most_votes\"),\n            id: 5,\n            term: \"order:votes\"\n          });\n          api.addNavigationBarItem({\n            name: \"votes\",\n            before: \"top\",\n            customFilter: category => {\n              return category && category.can_vote;\n            },\n            customHref: (category, args) => {\n              const path = _navItem.default.pathFor(\"latest\", args);\n              return `${path}?order=votes`;\n            },\n            forceActive: (category, args, router) => {\n              const queryParams = router.currentRoute.queryParams;\n              return queryParams && Object.keys(queryParams).length === 1 && queryParams[\"order\"] === \"votes\";\n            }\n          });\n          api.addNavigationBarItem({\n            name: \"my_votes\",\n            before: \"top\",\n            customFilter: category => {\n              return category && category.can_vote && api.getCurrentUser();\n            },\n            customHref: (category, args) => {\n              const path = _navItem.default.pathFor(\"latest\", args);\n              return `${path}?state=my_votes`;\n            },\n            forceActive: (category, args, router) => {\n              const queryParams = router.currentRoute.queryParams;\n              return queryParams && Object.keys(queryParams).length === 1 && queryParams[\"state\"] === \"my_votes\";\n            }\n          });\n        }\n        if (siteSettings.topic_voting_enabled) {\n          api.addSearchSuggestion(\"order:votes\");\n        }\n        api.registerValueTransformer(\"category-available-views\", _ref => {\n          let {\n            value,\n            context\n          } = _ref;\n          if (context.customFields.enable_topic_voting) {\n            value.push({\n              name: (0, _discourseI18n.i18n)(\"filters.votes.title\"),\n              value: \"votes\"\n            });\n          }\n        });\n      });\n    }\n  };\n});","define(\"discourse/plugins/discourse-topic-voting/discourse/pre-initializers/extend-category-for-voting\", [\"exports\", \"@glimmer/tracking\", \"discourse/lib/plugin-api\", \"discourse-i18n\"], function (_exports, _tracking, _pluginApi, _discourseI18n) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.default = void 0;\n  function initialize(api) {\n    api.addPostClassesCallback(post => {\n      if (post.post_number === 1 && post.can_vote) {\n        return [\"voting-post\"];\n      }\n    });\n    api.addTrackedPostProperties(\"can_vote\");\n    api.addTagsHtmlCallback(topic => {\n      if (!topic.can_vote) {\n        return;\n      }\n      let buffer = [];\n      let title = \"\";\n      if (topic.user_voted) {\n        title = ` title='${(0, _discourseI18n.i18n)(\"topic_voting.voted\")}'`;\n      }\n      let userVotedClass = topic.user_voted ? \" voted\" : \"\";\n      buffer.push(`<a href='${topic.url}' class='list-vote-count vote-count-${topic.vote_count} discourse-tag simple${userVotedClass}'${title}>`);\n      buffer.push((0, _discourseI18n.i18n)(\"topic_voting.votes\", {\n        count: topic.vote_count\n      }));\n      buffer.push(\"</a>\");\n      if (buffer.length > 0) {\n        return buffer.join(\"\");\n      }\n    }, {\n      priority: -100\n    });\n    api.modifyClass(\"model:topic\", Superclass => class extends Superclass {\n      static #_ = (() => dt7948.g(this.prototype, \"vote_count\", [_tracking.tracked]))();\n      #vote_count = (() => (dt7948.i(this, \"vote_count\"), void 0))();\n      static #_2 = (() => dt7948.g(this.prototype, \"user_voted\", [_tracking.tracked]))();\n      #user_voted = (() => (dt7948.i(this, \"user_voted\"), void 0))();\n    });\n    api.modifyClass(\"model:user\", Superclass => class extends Superclass {\n      static #_ = (() => dt7948.g(this.prototype, \"votes_exceeded\", [_tracking.tracked]))();\n      #votes_exceeded = (() => (dt7948.i(this, \"votes_exceeded\"), void 0))();\n      static #_2 = (() => dt7948.g(this.prototype, \"votes_left\", [_tracking.tracked]))();\n      #votes_left = (() => (dt7948.i(this, \"votes_left\"), void 0))();\n    });\n  }\n  var _default = _exports.default = {\n    name: \"extend-category-for-voting\",\n    before: \"inject-discourse-objects\",\n    initialize() {\n      (0, _pluginApi.withPluginApi)(api => initialize(api));\n      (0, _pluginApi.withPluginApi)(api => api.addCategorySortCriteria(\"votes\"));\n    }\n  };\n});","define(\"discourse/plugins/discourse-topic-voting/discourse/pre-initializers/transformers\", [\"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: \"discourse-topic-voting-transformers\",\n    before: \"freeze-valid-transformers\",\n    initialize() {\n      (0, _pluginApi.withPluginApi)(api => {\n        api.addBehaviorTransformerName(\"topic-vote-button-click\");\n      });\n    }\n  };\n});","define(\"discourse/plugins/discourse-topic-voting/discourse/routes/user-activity-votes\", [\"exports\", \"discourse/models/user-action\", \"discourse/routes/user-topic-list\", \"discourse-i18n\"], function (_exports, _userAction, _userTopicList, _discourseI18n) {\n  \"use strict\";\n\n  Object.defineProperty(_exports, \"__esModule\", {\n    value: true\n  });\n  _exports.default = void 0;\n  class UserActivityVotes extends _userTopicList.default {\n    userActionType = (() => _userAction.default.TYPES.topics)();\n    model() {\n      return this.store.findFiltered(\"topicList\", {\n        filter: \"topics/voted-by/\" + this.modelFor(\"user\").get(\"username_lower\")\n      }).then(model => {\n        model.set(\"emptyState\", this.emptyState());\n        return model;\n      });\n    }\n    emptyState() {\n      const user = this.modelFor(\"user\");\n      const title = this.isCurrentUser(user) ? (0, _discourseI18n.i18n)(\"topic_voting.no_votes_title_self\") : (0, _discourseI18n.i18n)(\"topic_voting.no_votes_title_others\", {\n        username: user.username\n      });\n      return {\n        title,\n        body: \"\"\n      };\n    }\n  }\n  _exports.default = UserActivityVotes;\n});"],"mappings":"AAAAA,OAAA,2oBAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,GACA;AAEAC,OAAAC,eAAAnB,EAAA,cACAoB,OAAA,IAEApB,EAAAqB,aAAA;AACA,MAAAC,UAAArB,EAAAoB,QACAE,SAAA,KAAAC,OAAAC,EAAAC,KAAAC,UAAA,gBAAAtB,EAAAuB,UAAA;AACAC,GAAA,MAAAL,OAAAM,EAAAJ,KAAA;AACAH,SAAA,KAAAC,OAAAC,EAAAC,KAAAC,UAAA,eAAAtB,EAAAuB,UAAA;AACAG,GAAA,MAAAP,OAAAM,EAAAJ,KAAA;AACAH,SAAA,KAAAC,OAAAC,EAAAC,KAAAC,UAAA,cAAAzB,EAAA8B,UAAA;AACAC,GAAA,MAAAT,OAAAM,EAAAJ,KAAA;AACAH,SAAA,KAAAC,OAAAC,EAAAC,KAAAC,UAAA,cAAAzB,EAAA8B,SAAA,WACA,QACA,GAFA;AA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