{"version":3,"file":"client_message_mixin-BKAfXnyz.js","sources":["../../../app/frontend/images/icons/ic_login_done.png","../../../app/frontend/entrypoints/vue/clients/messages/chat_card.vue?vue&type=template&lang.js","../../../app/frontend/entrypoints/vue/clients/messages/chat_card.vue","../../../app/frontend/entrypoints/vue/clients/messages/confirm_modal.vue?vue&type=template&lang.js","../../../app/frontend/entrypoints/vue/clients/messages/confirm_modal.vue","../../../app/frontend/entrypoints/vue/clients/messages/decline_modal.vue?vue&type=template&lang.js","../../../app/frontend/entrypoints/vue/clients/messages/decline_modal.vue","../../../app/frontend/entrypoints/vue/clients/messages/chat_controls.vue?vue&type=template&lang.js","../../../app/frontend/entrypoints/vue/clients/messages/chat_controls.vue","../../../app/frontend/entrypoints/vue/clients/messages/chatroom.vue?vue&type=template&lang.js","../../../app/frontend/entrypoints/vue/clients/messages/chatroom.vue","../../../app/frontend/entrypoints/vue/clients/messages/splash.vue?vue&type=template&lang.js","../../../app/frontend/entrypoints/vue/clients/messages/splash.vue","../../../app/frontend/entrypoints/vue/clients/messages/app.vue?vue&type=template&lang.js","../../../app/frontend/entrypoints/vue/clients/messages/app.vue","../../../app/frontend/entrypoints/vue/client_message_mixin.js"],"sourcesContent":["export default \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAD8AAAA/CAMAAABggeDtAAAAe1BMVEUAAADX19fX19fZ2dnm5ubX19fX19fX19fX19fW1tbX19fW1tbY2NjX19fY2NjW1tbg4ODj4+P////X19fX19fX19fW1tbu7u7////////w8PDW1tb////9/f3Z2dnn5+fj4+P5+fnz8/P39/ff39/b29vt7e3p6enw8PBmz3j5AAAAG3RSTlMA7JsxCPLm2LevrZBpWk4sGhICyqV58+PKpXlk9FOgAAACh0lEQVRIx7WX7ZaiMAyGi4CoKDqM43yElraAcv9XuNIZR2le2O7x7PPHQyRNE9K3rZigjLf5KlumlC6zVb6NS/EPJLtNRGOizS4J9N4vUkKki32Ad7ymadaxmOdlQfMsXubci4j+RlRMu79RCG9TVT9SGEf4JQ6vFMrrAbgvKZwlGyBx0cNn4KfAc5/nGFT5VmvdBnyFggDaympAWk2A4qHrIuDdVHcaMEJ070TQtOdqzBm08u+SIYZ1E+9127W6d2lYYtwW0xpGl2f186TOEs5g/bPeee6Du340DAPwGuwnsjff7t4ABlcgYWpTu9nyjGqmSEMX7lDxjPJsyqAS7q7+G9+opAvPJyCVb9wIUUaoei1vZVTBqBQxofQVsypXAN4CW2a7XN8kztV6YcatyJ+Kn4sVzLQNtK5ExmydmynKqmPWTADZa6rKoJ5sgBCKE8EC1NDGOAn3wxtIduOcpGsfDorvgpnu0d3g8JQKKPt2vIC1hALi8s+QWTVO9epuiF1/PygCZGJFCGUrhzSycljnDr5/jv1rWT0ia+yfe/1/FzwPJ4ecLRLfW2xpGtvbxtweayTBZYRTl73+1V/dS1yEqGT605l7LDYn03n6w/SvlYP3Bazfi/unZfqXpF6fVqbFm7GpvL5OE0//VcM7Zebfhb//2OEFmqYZ9/He2//culEz/mq0jtbe/quMVyBOKx8ixN7+f7kLF4C9s/DOHwrtkXBvVd75QxRTEjUjboV//rIgPJ6A5afgo5t+H+DfuwSO7Pyp2QaJce+x86c4vF/HpRCu83xHB+gP0Hq4CT8OApB82iB/+5kIzFeQ/9eT958n71/P3f+eu3/+x/svvn+f6DR///4DnfBLy0sJ63YAAAAASUVORK5CYII=\"","\n<div @click=\"$emit('chatClick', id)\" class=\"chat\">\n  <div class=\"title -no-img\">\n    <div class=\"u-flex -row -items-center u-gap6\">\n      <div :class=\"{ notification: hasNotification }\">\n        <img src=\"../../../../images/icons/ic_login_done.png\" class=\"u-w20\" width=\"20\" height=\"20\" />\n      </div>\n      <div class=\"truncate\">\n        <h1>{{ chat.applicant.name }} ({{ chat.applicant.age }}歳)</h1>\n      </div>\n    </div>\n    <div class=\"u-mt2 u-px0 u-flex -row u-gap4 tags\">\n      <p v-if=\"chat.job.is_incentive_ad\" class=\"tags -premium\">採用課金</p>\n      <p v-if=\"chat.is_scout\" class=\"tags -scout\">スカウト</p>\n      <h1 class=\"u-flex-1 u-truncate\">{{ chat.applicant.license_names }}</h1>\n    </div>\n    <div class=\"u-px0 u-flex -row u-gap4 tags -with-date\">\n      <p class=\"content u-wp80\" v-if=\"lastMessage\"> {{ lastMessage.content }}</p>\n      <p class=\"u-mt-auto\" v-if=\"lastMessage\">{{ lastMessageDate }}</p>\n    </div>\n  </div>\n</div>\n","<template>\n  <div @click=\"$emit('chatClick', id)\" class=\"chat\">\n    <div class=\"title -no-img\">\n      <div class=\"u-flex -row -items-center u-gap6\">\n        <div :class=\"{ notification: hasNotification }\">\n          <img src=\"../../../../images/icons/ic_login_done.png\" class=\"u-w20\" width=\"20\" height=\"20\" />\n        </div>\n        <div class=\"truncate\">\n          <h1>{{ chat.applicant.name }} ({{ chat.applicant.age }}歳)</h1>\n        </div>\n      </div>\n      <div class=\"u-mt2 u-px0 u-flex -row u-gap4 tags\">\n        <p v-if=\"chat.job.is_incentive_ad\" class=\"tags -premium\">採用課金</p>\n        <p v-if=\"chat.is_scout\" class=\"tags -scout\">スカウト</p>\n        <h1 class=\"u-flex-1 u-truncate\">{{ chat.applicant.license_names }}</h1>\n      </div>\n      <div class=\"u-px0 u-flex -row u-gap4 tags -with-date\">\n        <p class=\"content u-wp80\" v-if=\"lastMessage\"> {{ lastMessage.content }}</p>\n        <p class=\"u-mt-auto\" v-if=\"lastMessage\">{{ lastMessageDate }}</p>\n      </div>\n    </div>\n  </div>\n</template>\n<script>\nexport default {\n  props: {\n    id: Number,\n    chat: Object\n  },\n  computed: {\n    lastMessage() {\n      if (this.chat.messages.length === 0) {\n        return null\n      }\n      // 最新日順に並んでいるため一番先頭が最新のメッセージ\n      return [...this.chat.messages][0]\n    },\n    lastMessageDate() {\n      let dt = new Date(this.lastMessage.created_at)\n      return dt.toLocaleDateString('ja-JP')\n    },\n    hasNotification() {\n      return this.chat.messages.map(v => !v.is_opened && v.sender === 'applicant').some(u => u)\n    }\n  }\n}\n</script>\n","\n<div class=\"active\">\n  <div class=\"c-modal__background\" @click=\"closeMessageModal\"></div>\n  <div class=\"c-modal p-client-page-message__modal\">\n    <div class=\"c-modal__header p-client-page-message__modal-header\">\n      <div\n        class=\"c-modal__header__close p-client-page-message__modal-close\"\n        @click=\"closeMessageModal\"\n      />\n      送信の確認\n    </div>\n    <div class=\"c-modal__body p-client-page-message__modal-body\">\n      <p>\n        求職者名:\n        <span class=\"u-font-bold\">{{ applicantName }}</span>\n      </p>\n      <p class=\"u-mt8\">送信内容</p>\n      <div\n        class=\"u-mt8 u-p8 c-card -border u-fs12 u-overflow-y-scroll u-max-h300\"\n      >\n        <div v-html=\"formattedEmailContent\"></div>\n      </div>\n      <div\n        v-if=\"attachmentFilenames.length > 0\"\n        class=\"u-py4 u-flex -scroll-x u-gap8\"\n      >\n        <span\n          v-for=\"(attachment, i) in attachmentFilenames\"\n          :key=\"i\"\n          class=\"attachment-label\"\n        >\n          {{ attachment }}\n        </span>\n      </div>\n      <p class=\"u-mt16 u-lh24\">\n        上記の内容で送信します。<br />\n        求職者の名前や内容の確認をしてください。\n      </p>\n    </div>\n    <div class=\"c-modal__body p-client-page-message__modal-body\">\n      <div class=\"p-client-page-message__modal-action-button\">\n        <button\n          type=\"button\"\n          class=\"c-button -green -middle p-client-page-message__modal-button\"\n          @click=\"submitModal\"\n        >\n          送信\n        </button>\n        <div\n          class=\"c-button -white -middle p-client-page-message__modal-button\"\n          @click=\"closeMessageModal\"\n        >\n          やめる\n        </div>\n      </div>\n    </div>\n  </div>\n</div>\n","<template>\n  <div class=\"active\">\n    <div class=\"c-modal__background\" @click=\"closeMessageModal\"></div>\n    <div class=\"c-modal p-client-page-message__modal\">\n      <div class=\"c-modal__header p-client-page-message__modal-header\">\n        <div\n          class=\"c-modal__header__close p-client-page-message__modal-close\"\n          @click=\"closeMessageModal\"\n        />\n        送信の確認\n      </div>\n      <div class=\"c-modal__body p-client-page-message__modal-body\">\n        <p>\n          求職者名:\n          <span class=\"u-font-bold\">{{ applicantName }}</span>\n        </p>\n        <p class=\"u-mt8\">送信内容</p>\n        <div\n          class=\"u-mt8 u-p8 c-card -border u-fs12 u-overflow-y-scroll u-max-h300\"\n        >\n          <div v-html=\"formattedEmailContent\"></div>\n        </div>\n        <div\n          v-if=\"attachmentFilenames.length > 0\"\n          class=\"u-py4 u-flex -scroll-x u-gap8\"\n        >\n          <span\n            v-for=\"(attachment, i) in attachmentFilenames\"\n            :key=\"i\"\n            class=\"attachment-label\"\n          >\n            {{ attachment }}\n          </span>\n        </div>\n        <p class=\"u-mt16 u-lh24\">\n          上記の内容で送信します。<br />\n          求職者の名前や内容の確認をしてください。\n        </p>\n      </div>\n      <div class=\"c-modal__body p-client-page-message__modal-body\">\n        <div class=\"p-client-page-message__modal-action-button\">\n          <button\n            type=\"button\"\n            class=\"c-button -green -middle p-client-page-message__modal-button\"\n            @click=\"submitModal\"\n          >\n            送信\n          </button>\n          <div\n            class=\"c-button -white -middle p-client-page-message__modal-button\"\n            @click=\"closeMessageModal\"\n          >\n            やめる\n          </div>\n        </div>\n      </div>\n    </div>\n  </div>\n</template>\n<script>\nexport default {\n  props: {\n    applicantName: {\n      type: String,\n      required: true,\n    },\n    emailContent: {\n      type: String,\n      required: true,\n    },\n    attachmentFilenames: {\n      type: Array,\n    },\n  },\n  methods: {\n    submitModal() {\n      this.$emit('submit');\n    },\n    closeMessageModal() {\n      this.$emit('close');\n    },\n  },\n  computed: {\n    formattedEmailContent() {\n      return this.emailContent.replace(/\\n/g, '<br>');\n    },\n  },\n};\n</script>\n","\n<div class=\"active\">\n  <div class=\"c-modal__background\"></div>\n  <div class=\"c-modal -decline\">\n    <div class=\"u-p20\">\n      <div class=\"u-flex u-align-center\">\n        <div class=\"u-p12 u-w120 u-fs18 u-font-bold\">不合格判定</div>\n        <div\n          class=\"u-flex u-align-center u-gap8 u-px12 u-border-w2 u-border-l-solid u-border-light-gray\"\n        >\n          <div class=\"-ic-person\"></div>\n          <div class=\"u-color-gray\">{{ applicant.name }}</div>\n        </div>\n      </div>\n      <div class=\"u-p15\">\n        <div class=\"u-flex\">\n          <div class=\"u-wp20\">\n            <label\n              class=\"c-label__small p-form__label -required u-fs14 u-font-normal\"\n              >不合格理由</label\n            >\n          </div>\n          <div class=\"u-wp80 u-flex -wrap u-gap8 u-pl12\">\n            <label\n              class=\"c-checkbox\"\n              v-for=\"reason in declinedReasons\"\n              :key=\"reason.id\"\n            >\n              <input\n                type=\"checkbox\"\n                v-model=\"selectedDeclinedReasons\"\n                :value=\"reason.name\"\n              />\n              <span class=\"c-checkbox__text\">{{ reason.name }}</span>\n            </label>\n          </div>\n        </div>\n        <div class=\"u-flex u-mt20\">\n          <div class=\"u-wp20\">\n            <label\n              for=\"internalMemo\"\n              class=\"c-label__small u-fs14 u-font-normal\"\n              >メモ・備考</label\n            >\n          </div>\n          <div class=\"u-flex -wrap u-gap8\">\n            <textarea\n              id=\"internalMemo\"\n              v-model=\"internalMemo\"\n              placeholder=\"面接の評価、申し送り事項を入力してください\"\n              rows=\"5\"\n              class=\"c-input -text-area -resize-none -declined-reason u-h-auto u-fs14\"\n            ></textarea>\n            <div class=\"c-label__small\">\n              ※ 記入したメモ・備考は通知されません\n            </div>\n          </div>\n        </div>\n      </div>\n      <div class=\"c-modal__footer -decline u-flex -justify-center\">\n        <div type=\"submit\" class=\"c-button -green\" @click=\"submitModal\">\n          確 定\n        </div>\n      </div>\n    </div>\n  </div>\n</div>\n","<template>\n  <div class=\"active\">\n    <div class=\"c-modal__background\"></div>\n    <div class=\"c-modal -decline\">\n      <div class=\"u-p20\">\n        <div class=\"u-flex u-align-center\">\n          <div class=\"u-p12 u-w120 u-fs18 u-font-bold\">不合格判定</div>\n          <div\n            class=\"u-flex u-align-center u-gap8 u-px12 u-border-w2 u-border-l-solid u-border-light-gray\"\n          >\n            <div class=\"-ic-person\"></div>\n            <div class=\"u-color-gray\">{{ applicant.name }}</div>\n          </div>\n        </div>\n        <div class=\"u-p15\">\n          <div class=\"u-flex\">\n            <div class=\"u-wp20\">\n              <label\n                class=\"c-label__small p-form__label -required u-fs14 u-font-normal\"\n                >不合格理由</label\n              >\n            </div>\n            <div class=\"u-wp80 u-flex -wrap u-gap8 u-pl12\">\n              <label\n                class=\"c-checkbox\"\n                v-for=\"reason in declinedReasons\"\n                :key=\"reason.id\"\n              >\n                <input\n                  type=\"checkbox\"\n                  v-model=\"selectedDeclinedReasons\"\n                  :value=\"reason.name\"\n                />\n                <span class=\"c-checkbox__text\">{{ reason.name }}</span>\n              </label>\n            </div>\n          </div>\n          <div class=\"u-flex u-mt20\">\n            <div class=\"u-wp20\">\n              <label\n                for=\"internalMemo\"\n                class=\"c-label__small u-fs14 u-font-normal\"\n                >メモ・備考</label\n              >\n            </div>\n            <div class=\"u-flex -wrap u-gap8\">\n              <textarea\n                id=\"internalMemo\"\n                v-model=\"internalMemo\"\n                placeholder=\"面接の評価、申し送り事項を入力してください\"\n                rows=\"5\"\n                class=\"c-input -text-area -resize-none -declined-reason u-h-auto u-fs14\"\n              ></textarea>\n              <div class=\"c-label__small\">\n                ※ 記入したメモ・備考は通知されません\n              </div>\n            </div>\n          </div>\n        </div>\n        <div class=\"c-modal__footer -decline u-flex -justify-center\">\n          <div type=\"submit\" class=\"c-button -green\" @click=\"submitModal\">\n            確 定\n          </div>\n        </div>\n      </div>\n    </div>\n  </div>\n</template>\n\n<script>\nimport axios from 'axios';\nimport { CSRF_TOKEN } from '../../constants';\nimport Routes from '../../routes';\nimport toastr from 'toastr';\n\nexport default {\n  props: {\n    applicant: {\n      type: Object,\n    },\n  },\n  data() {\n    return {\n      declinedReasons: [],\n      internalMemo: '',\n      selectedDeclinedReasons: [],\n    };\n  },\n  created() {\n    Promise.all([this.getDeclinedReasons(), this.getJobApplicant()]).catch(\n      (error) => {\n        this.handleAxiosError(error);\n      }\n    );\n  },\n  methods: {\n    // エラーハンドリング\n    handleAxiosError(error) {\n      if (error.response && error.response.status === 401) {\n        window.location.href = '/';\n      } else {\n        toastr.error('エラーが発生しました');\n      }\n      console.error(error);\n    },\n    // `declined_reasons`のActiveHashを取得\n    getDeclinedReasons() {\n      axios\n        .get(Routes.api.clients.declined_reasons)\n        .then((response) => {\n          this.declinedReasons = response.data;\n        })\n        .catch((error) => {\n          this.handleAxiosError(error);\n        });\n    },\n    // `job_applicants`レコードの取得\n    getJobApplicant() {\n      const jobApplicantId = this.applicant.job_applicant_id;\n      axios\n        .get(`${Routes.api.clients.job_applicants}/${jobApplicantId}`)\n        .then((response) => {\n          this.selectedDeclinedReasons = this.parseDeclinedReasons(\n            response.data.declined_reasons\n          );\n          this.internalMemo = response.data.internal_memo;\n        })\n        .catch((error) => {\n          this.handleAxiosError(error);\n        });\n    },\n    // `declined_reasons`のJSON形式を配列に変換\n    parseDeclinedReasons(jsonDeclinedReason) {\n      if (!jsonDeclinedReason) return [];\n\n      try {\n        const parsed = JSON.parse(jsonDeclinedReason);\n        return Array.isArray(parsed) ? parsed : [parsed];\n      } catch (error) {\n        return [jsonDeclinedReason];\n      }\n    },\n    // `job_applicants`レコードを更新\n    async updateJobApplicant() {\n      try {\n        await axios\n          .put(\n            `${Routes.api.clients.job_applicants}/${this.applicant.job_applicant_id}`,\n            {\n              job_applicant: {\n                declined_reasons: this.selectedDeclinedReasons,\n              },\n              internal_memo: this.internalMemo,\n            },\n            {\n              headers: { 'X-CSRF-Token': CSRF_TOKEN },\n            }\n          )\n          .then((response) => {\n            toastr.success(response.data.text);\n            this.$emit('updateSelectionStatus', this.currentSelectionStatus);\n          });\n      } catch (error) {\n        this.handleAxiosError(error);\n      }\n    },\n    // `確定`ボタン押下時のアクション\n    submitModal() {\n      if (this.selectedDeclinedReasons.length === 0) {\n        toastr.error('不合格理由を選択して下さい');\n        return;\n      }\n      this.updateJobApplicant();\n      this.$emit('submit');\n    },\n  },\n};\n</script>\n","\n<form\n  ref=\"form\"\n  @submit=\"showConfirmModal\"\n  :action=\"`/clients/messages?job_id=${job_id}&applicant_id=${applicant.id}`\"\n  method=\"post\"\n  enctype=\"multipart/form-data\"\n  class=\"chat-controls\"\n>\n  <input type=\"hidden\" name=\"authenticity_token\" value=\"\" ref=\"csrf\" />\n  <input type=\"hidden\" name=\"sender\" value=\"applicant\" />\n  <input type=\"hidden\" name=\"job_id\" :value=\"job_id\" />\n  <div>\n    <h3>\n      テンプレートからメッセージを作成 (\n      <b>\n        <a\n          class=\"u-color-blue-light\"\n          href=\"/clients/template_messages\"\n          target=\"_blank\"\n          rel=\"noopener noreferrer\"\n        >\n          テンプレートの管理はこちら\n        </a>\n      </b>\n      )\n    </h3>\n    <div class=\"u-mt4 u-py4 u-flex -scroll-x u-gap8 u-min-h31\">\n      <span\n        @mousedown.prevent=\"setTemplate(template)\"\n        class=\"button -template\"\n        v-for=\"(template, i) in templates\"\n        :key=\"i\"\n      >\n        {{ template.name }}\n      </span>\n    </div>\n  </div>\n  <div class=\"flex flex-col\">\n    <textarea\n      ref=\"textarea\"\n      class=\"u-fs14\"\n      name=\"content\"\n      v-model=\"messageDraft.content\"\n      placeholder=\"メッセージを入力\"\n    />\n  </div>\n  <div\n    v-if=\"attachmentFilenames.length > 0\"\n    class=\"u-py4 u-flex -scroll-x u-gap8\"\n  >\n    <span\n      v-for=\"(attachment, i) in attachmentFilenames\"\n      :key=\"i\"\n      class=\"attachment-label\"\n    >\n      {{ attachment }}\n    </span>\n  </div>\n  <div class=\"u-flex -justify-between\">\n    <div class=\"u-flex -items-end\">\n      <div>\n        <h2 class=\"u-mb4 u-fs13\">選考ステータス</h2>\n        <div class=\"c-select-wrapper -small\">\n          <select\n            class=\"u-fs14\"\n            v-model=\"currentSelectionStatus\"\n            v-on:change=\"updateSelectionStatus\"\n            :disabled=\"loading\"\n          >\n            <option\n              v-for=\"(selectionStatus, i) in selectionStatuses\"\n              :key=\"i\"\n              :value=\"selectionStatus.id\"\n            >\n              {{ selectionStatus.name }}\n            </option>\n          </select>\n        </div>\n      </div>\n      <span class=\"u-fs12 u-color-gray\">\n        ※送信前に選考ステータスの確認・変更をお願い致します。\n      </span>\n    </div>\n    <div class=\"buttons\">\n      <input\n        type=\"file\"\n        name=\"attachments[]\"\n        id=\"attachments\"\n        multiple\n        v-on:input=\"updateAttachments\"\n      />\n      <label for=\"attachments\" class=\"u-py6 u-px20 button -attach\">\n        添付\n      </label>\n      <button\n        type=\"submit\"\n        class=\"u-py7 u-px20 button -send\"\n        :disabled=\"messageDraft.content.length <= 0 || loading\"\n      >\n        送信\n      </button>\n    </div>\n  </div>\n  <ConfirmModal\n    v-if=\"showModal\"\n    @submit=\"confirmedSendMessage\"\n    @close=\"closeConfirmModal\"\n    :applicantName=\"applicant.name\"\n    :emailContent=\"messageDraft.content\"\n    :attachmentFilenames=\"attachmentFilenames\"\n  />\n  <DeclineModal\n    v-if=\"showDeclineModal\"\n    :applicant=\"applicant\"\n    @submit=\"closeDeclineModal\"\n  />\n</form>\n","<template>\n  <form\n    ref=\"form\"\n    @submit=\"showConfirmModal\"\n    :action=\"`/clients/messages?job_id=${job_id}&applicant_id=${applicant.id}`\"\n    method=\"post\"\n    enctype=\"multipart/form-data\"\n    class=\"chat-controls\"\n  >\n    <input type=\"hidden\" name=\"authenticity_token\" value=\"\" ref=\"csrf\" />\n    <input type=\"hidden\" name=\"sender\" value=\"applicant\" />\n    <input type=\"hidden\" name=\"job_id\" :value=\"job_id\" />\n    <div>\n      <h3>\n        テンプレートからメッセージを作成 (\n        <b>\n          <a\n            class=\"u-color-blue-light\"\n            href=\"/clients/template_messages\"\n            target=\"_blank\"\n            rel=\"noopener noreferrer\"\n          >\n            テンプレートの管理はこちら\n          </a>\n        </b>\n        )\n      </h3>\n      <div class=\"u-mt4 u-py4 u-flex -scroll-x u-gap8 u-min-h31\">\n        <span\n          @mousedown.prevent=\"setTemplate(template)\"\n          class=\"button -template\"\n          v-for=\"(template, i) in templates\"\n          :key=\"i\"\n        >\n          {{ template.name }}\n        </span>\n      </div>\n    </div>\n    <div class=\"flex flex-col\">\n      <textarea\n        ref=\"textarea\"\n        class=\"u-fs14\"\n        name=\"content\"\n        v-model=\"messageDraft.content\"\n        placeholder=\"メッセージを入力\"\n      />\n    </div>\n    <div\n      v-if=\"attachmentFilenames.length > 0\"\n      class=\"u-py4 u-flex -scroll-x u-gap8\"\n    >\n      <span\n        v-for=\"(attachment, i) in attachmentFilenames\"\n        :key=\"i\"\n        class=\"attachment-label\"\n      >\n        {{ attachment }}\n      </span>\n    </div>\n    <div class=\"u-flex -justify-between\">\n      <div class=\"u-flex -items-end\">\n        <div>\n          <h2 class=\"u-mb4 u-fs13\">選考ステータス</h2>\n          <div class=\"c-select-wrapper -small\">\n            <select\n              class=\"u-fs14\"\n              v-model=\"currentSelectionStatus\"\n              v-on:change=\"updateSelectionStatus\"\n              :disabled=\"loading\"\n            >\n              <option\n                v-for=\"(selectionStatus, i) in selectionStatuses\"\n                :key=\"i\"\n                :value=\"selectionStatus.id\"\n              >\n                {{ selectionStatus.name }}\n              </option>\n            </select>\n          </div>\n        </div>\n        <span class=\"u-fs12 u-color-gray\">\n          ※送信前に選考ステータスの確認・変更をお願い致します。\n        </span>\n      </div>\n      <div class=\"buttons\">\n        <input\n          type=\"file\"\n          name=\"attachments[]\"\n          id=\"attachments\"\n          multiple\n          v-on:input=\"updateAttachments\"\n        />\n        <label for=\"attachments\" class=\"u-py6 u-px20 button -attach\">\n          添付\n        </label>\n        <button\n          type=\"submit\"\n          class=\"u-py7 u-px20 button -send\"\n          :disabled=\"messageDraft.content.length <= 0 || loading\"\n        >\n          送信\n        </button>\n      </div>\n    </div>\n    <ConfirmModal\n      v-if=\"showModal\"\n      @submit=\"confirmedSendMessage\"\n      @close=\"closeConfirmModal\"\n      :applicantName=\"applicant.name\"\n      :emailContent=\"messageDraft.content\"\n      :attachmentFilenames=\"attachmentFilenames\"\n    />\n    <DeclineModal\n      v-if=\"showDeclineModal\"\n      :applicant=\"applicant\"\n      @submit=\"closeDeclineModal\"\n    />\n  </form>\n</template>\n<script>\nimport Routes from '../../routes';\nimport { CSRF_TOKEN } from '../../constants';\nimport axios from 'axios';\nimport toastr from 'toastr';\nimport ConfirmModal from './confirm_modal.vue';\nimport DeclineModal from './decline_modal.vue';\n\nexport default {\n  components: {\n    ConfirmModal,\n    DeclineModal,\n  },\n  props: {\n    job_id: {\n      type: Number,\n      default: 0,\n    },\n    applicant: {\n      type: Object,\n      default: function () {\n        return {};\n      },\n    },\n    company_name: {\n      type: String,\n      default: '',\n    },\n  },\n  data() {\n    return {\n      showModal: false,\n      showDeclineModal: false,\n      attachments: [],\n      templates: [],\n      messageDraft: {\n        content: '',\n        sender: 'company',\n        job_id: this.job_id,\n        applicant_id: this.applicant.id,\n        attachments: [],\n      },\n      selectionStatuses: [],\n      currentSelectionStatus: this.applicant.selection_id,\n      loading: false,\n    };\n  },\n  // TO-DO: vue3 に upgrade したら、 vuex も導入したい\n  watch: {\n    $props: {\n      handler() {\n        this.messageDraft.job_id = this.job_id;\n        this.messageDraft.applicant_id = this.applicant.id;\n        this.currentSelectionStatus = this.applicant.selection_id;\n      },\n      deep: true,\n    },\n  },\n  created() {\n    this.getTemplates();\n    this.getSelectionStatuses();\n  },\n  mounted() {\n    this.$refs.csrf.value = CSRF_TOKEN;\n  },\n  computed: {\n    attachmentFilenames() {\n      return Array.from(this.messageDraft.attachments).map((f) => f.name);\n    },\n  },\n  methods: {\n    updateAttachments(e) {\n      this.messageDraft.attachments = e.target.files;\n    },\n    getSelectionStatuses() {\n      axios\n        .get(Routes.api.clients.selection_statuses)\n        .then((r) => {\n          this.selectionStatuses = r.data;\n        })\n        .catch((e) => {\n          // CSRFトークン認証エラーが発生した場合トップヘリダイレクト\n          if (e.response.status === 401) {\n            window.location.href = '/';\n          }\n          toastr.error('選考ステータスの取得に失敗しました');\n          console.error(e);\n        });\n    },\n    showDeclinedReasonModal() {\n      this.loading = true;\n      this.showDeclineModal = true;\n    },\n    async updateSelectionStatus() {\n      this.loading = true;\n      if (this.currentSelectionStatus === 10)\n        return this.showDeclinedReasonModal();\n\n      try {\n        await axios.put(\n          Routes.api.clients.selection_statuses,\n          {\n            selection_id: this.currentSelectionStatus,\n            job_applicant_id: this.applicant.job_applicant_id,\n          },\n          {\n            headers: { 'X-CSRF-Token': CSRF_TOKEN },\n          }\n        );\n\n        toastr.success('選考ステータスを変更しました');\n        this.$emit('updateSelectionStatus', this.currentSelectionStatus);\n      } catch (error) {\n        if (error.response && error.response.status === 401) {\n          // CSRFトークン認証エラーが発生した場合トップヘリダイレクト\n          window.location.href = '/';\n        } else {\n          toastr.error('選考ステータスの更新に失敗しました');\n          console.error(error);\n        }\n      } finally {\n        this.loading = false;\n      }\n    },\n    getTemplates() {\n      axios\n        .get(Routes.api.clients.template_messages)\n        .then((r) => {\n          this.templates = r.data;\n        })\n        .catch((e) => {\n          // CSRFトークン認証エラーが発生した場合トップヘリダイレクト\n          if (e.response.status === 401) {\n            window.location.href = '/';\n          }\n          console.error(e);\n        });\n    },\n    setTemplate(template) {\n      this.messageDraft.content = this.replaceShirtCode(template.content);\n      // テンプレートボタンを押した後もフォーカスを保持する\n      this.$nextTick(() => {\n        this.$refs.textarea.focus();\n      });\n    },\n    // `{$ APPLICANT_NAME $}`を求職者名に置換する\n    // `{$ COMPANY_NAME $}`を企業名に置換する\n    replaceShirtCode(content) {\n      return content\n        .replaceAll('{$ APPLICANT_NAME $}', this.applicant.name)\n        .replaceAll(\n          '{$ COMPANY_NAME $}',\n          this.company_name.replace('株式会社', '')\n        );\n    },\n    sendMessage() {\n      axios\n        .post(Routes.api.clients.messages, this.messageDraft, {\n          headers: { 'X-CSRF-Token': CSRF_TOKEN },\n        })\n        .then((r) => {\n          this.$emit('messageSent', r.data);\n          this.messageDraft.title = '';\n          this.messageDraft.content = '';\n        })\n        .catch((e) => {\n          // CSRFトークン認証エラーが発生した場合トップヘリダイレクト\n          if (e.response.status === 401) {\n            window.location.href = '/';\n          }\n          console.error(e);\n        })\n        .finally(() => {\n          this.loading = false;\n        });\n    },\n    showConfirmModal(e) {\n      e.preventDefault(); // フォームのデフォルトの送信動作をキャンセル\n      this.loading = true;\n      this.showModal = true;\n    },\n    // モーダルで「送信」ボタンが押されたときの処理\n    confirmedSendMessage() {\n      this.showModal = false;\n      this.loading = false;\n      if (this.messageDraft.attachments.length > 0) {\n        this.$refs.form.submit();\n      } else {\n        this.sendMessage();\n      }\n    },\n    closeConfirmModal() {\n      this.showModal = false;\n      this.loading = false;\n    },\n    closeDeclineModal() {\n      this.showDeclineModal = false;\n      this.loading = false;\n    },\n  },\n};\n</script>\n","\n<div class=\"chatroom\" v-if=\"chat != undefined\">\n  <div class=\"job-title-client\">\n    <a target=\"_blank\" :href=\"`/clients/applicants/${chat.applicant.id}?job=${chat.job.id}`\">\n      <div class=\"c-icon-link -file -bg-red\">\n        WEB履歴書\n      </div>\n    </a>\n    <span>求人:</span>\n    <div class=\"truncate\">\n      <a class=\"job-link\" :href=\"`/jobs/${chat.job.id}`\" target=\"_blank\" rel=\"noopener noreferrer\"><h2>{{ chat.job.title }}</h2></a>\n    </div>\n  </div>\n  <div class=\"chat-body\">\n    <div class=\"u-flex -column-reverse u-gap14\">\n      <div v-for=\"(message, i) in chat.messages\" :key=\"`message-${i}`\" class=\"chat-entry\" :class=\"{ sender: message.sender === 'company' }\">\n        <div class=\"u-flex -column\">\n          <h2 v-if=\"message.sender === 'applicant'\" class=\"u-mb8 u-font-normal u-fs12 u-color-gray\"> {{ chat.applicant.name }}</h2>\n          <div v-if=\"message.content || message.title\" class=\"chat-bubble\">\n            <h3 v-if=\"message.title\" class=\"u-mb8\">{{ message.title }}</h3>\n            <p v-if=\"message.content\" v-html=\"parseContent(message.content)\" />\n          </div>\n          <div v-if=\"message.attachments.length > 0\" class=\"u-mt8 attachments\" :class=\"{ '-sender': message.sender === 'company' }\">\n            <a v-for=\"(attachment, i) in message.attachments\" :key=\"`attachment-${i}`\" class=\"attachment-label\" :href=\"attachment.url\">\n              {{ parseAttachmentName(attachment.url) }}\n            </a>\n          </div>\n        </div>\n        <div v-if=\"message.sender === 'company'\">\n          <div class=\"u-flex -justify-end -column u-gap8\">\n            <div class=\"u-flex -justify-end\">\n              <p class=\"is-opened\">\n                <span :class=\"{ 'u-font-bold': message.is_opened }\">\n                  {{ message.is_opened ? '既読' : '未読' }}\n                </span>\n              </p>\n            </div>\n            <p class=\"timestamp\">\n              {{ messageTimestamp(message.created_at) }}\n            </p>\n          </div>\n        </div>\n        <div v-if=\"message.sender === 'applicant'\">\n          <p class=\"timestamp\">\n            {{ messageTimestamp(message.created_at) }}\n          </p>\n        </div>\n      </div>\n    </div>\n  </div>\n  <chat_controls\n    @messageSent=\"onMessageSent\"\n    @updateSelectionStatus=\"onUpdateSelectionStatus\"\n    :applicant=\"chat.applicant\"\n    :job_id=\"chat.job.id\"\n    :company_name=\"chat.company_name\"\n  />\n</div>\n","<template>\n  <div class=\"chatroom\" v-if=\"chat != undefined\">\n    <div class=\"job-title-client\">\n      <a target=\"_blank\" :href=\"`/clients/applicants/${chat.applicant.id}?job=${chat.job.id}`\">\n        <div class=\"c-icon-link -file -bg-red\">\n          WEB履歴書\n        </div>\n      </a>\n      <span>求人:</span>\n      <div class=\"truncate\">\n        <a class=\"job-link\" :href=\"`/jobs/${chat.job.id}`\" target=\"_blank\" rel=\"noopener noreferrer\"><h2>{{ chat.job.title }}</h2></a>\n      </div>\n    </div>\n    <div class=\"chat-body\">\n      <div class=\"u-flex -column-reverse u-gap14\">\n        <div v-for=\"(message, i) in chat.messages\" :key=\"`message-${i}`\" class=\"chat-entry\" :class=\"{ sender: message.sender === 'company' }\">\n          <div class=\"u-flex -column\">\n            <h2 v-if=\"message.sender === 'applicant'\" class=\"u-mb8 u-font-normal u-fs12 u-color-gray\"> {{ chat.applicant.name }}</h2>\n            <div v-if=\"message.content || message.title\" class=\"chat-bubble\">\n              <h3 v-if=\"message.title\" class=\"u-mb8\">{{ message.title }}</h3>\n              <p v-if=\"message.content\" v-html=\"parseContent(message.content)\" />\n            </div>\n            <div v-if=\"message.attachments.length > 0\" class=\"u-mt8 attachments\" :class=\"{ '-sender': message.sender === 'company' }\">\n              <a v-for=\"(attachment, i) in message.attachments\" :key=\"`attachment-${i}`\" class=\"attachment-label\" :href=\"attachment.url\">\n                {{ parseAttachmentName(attachment.url) }}\n              </a>\n            </div>\n          </div>\n          <div v-if=\"message.sender === 'company'\">\n            <div class=\"u-flex -justify-end -column u-gap8\">\n              <div class=\"u-flex -justify-end\">\n                <p class=\"is-opened\">\n                  <span :class=\"{ 'u-font-bold': message.is_opened }\">\n                    {{ message.is_opened ? '既読' : '未読' }}\n                  </span>\n                </p>\n              </div>\n              <p class=\"timestamp\">\n                {{ messageTimestamp(message.created_at) }}\n              </p>\n            </div>\n          </div>\n          <div v-if=\"message.sender === 'applicant'\">\n            <p class=\"timestamp\">\n              {{ messageTimestamp(message.created_at) }}\n            </p>\n          </div>\n        </div>\n      </div>\n    </div>\n    <chat_controls\n      @messageSent=\"onMessageSent\"\n      @updateSelectionStatus=\"onUpdateSelectionStatus\"\n      :applicant=\"chat.applicant\"\n      :job_id=\"chat.job.id\"\n      :company_name=\"chat.company_name\"\n    />\n  </div>\n</template>\n<script>\nimport chat_controls from './chat_controls.vue';\n\nexport default {\n  props: {\n    chat: Object\n  },\n  components: {\n    chat_controls\n  },\n  mounted() {\n    // 初期表示で最新までスクロールする\n    this.scrollToBottom();\n  },\n  watch: {\n    chat() {\n      // ページ切り替えで最新までスクロールする(ページ切り替えを考慮し、遅延で実行する)\n      setTimeout(() => {\n        this.scrollToBottom();\n      }, 1);\n    }\n  },\n  methods: {\n    // 最新までスクロールする\n    scrollToBottom() {\n      var chatBody = document.querySelector('.chat-body');\n      chatBody.scrollTop = chatBody.scrollHeight;\n    },\n    messageTimestamp(timestamp) {\n      let dt = new Date(timestamp)\n      return dt.toLocaleString('ja-JP').replace(/:\\d{2}$/, '') // 秒数は表示しない\n    },\n    // TO-DO: Vuex を導入したら、このメソッドは削除する\n    onMessageSent(e) {\n      this.$emit('messageSent', e)\n    },\n    onUpdateSelectionStatus(e) {\n      this.$emit('updateSelectionStatus', e)\n    },\n    parseContent(content) {\n      return content.replace(/\\n/g, '<br>')\n    },\n    parseAttachmentName(attachmentUrl) {\n      let x = attachmentUrl.split('/')\n      const fileName = x[x.length - 1].split('?')[0]; // クエリパラメータは除去\n      // 日本語ファイル名の場合、エンコードされているのでデコードする\n      return decodeURIComponent(fileName)\n    }\n  }\n}\n</script>\n","\n<div class=\"splash\">\n  <div class=\"banner\" v-show=\"unreadMessages > 0\">\n    <div>\n      <h1>未読のメッセージが\n        <span class=\"emph\">\n          {{unreadMessages}}\n        </span>\n        件あります</h1>\n      <p>\n        未返信のメッセージはありませんか?<br />\n        メッセージを確認してみましょう!\n      </p>\n    </div>\n    <img src=\"../../../../images/banner/bell.png\">\n  </div>\n  <div class=\"banner\">\n    <div>\n      <h1>メッセージについて</h1>\n      <p>\n        応募者とメッセージのやり取りが可能です。<br />\n        WEB履歴書の情報が不足している場合、積極的にWEB履歴書の入力をお願いする連絡をしましょう。\n      </p>\n    </div>\n    <img src=\"../../../../images/banner/mail.png\">\n  </div>\n</div>\n","<template>\n  <div class=\"splash\">\n    <div class=\"banner\" v-show=\"unreadMessages > 0\">\n      <div>\n        <h1>未読のメッセージが\n          <span class=\"emph\">\n            {{unreadMessages}}\n          </span>\n          件あります</h1>\n        <p>\n          未返信のメッセージはありませんか?<br />\n          メッセージを確認してみましょう!\n        </p>\n      </div>\n      <img src=\"../../../../images/banner/bell.png\">\n    </div>\n    <div class=\"banner\">\n      <div>\n        <h1>メッセージについて</h1>\n        <p>\n          応募者とメッセージのやり取りが可能です。<br />\n          WEB履歴書の情報が不足している場合、積極的にWEB履歴書の入力をお願いする連絡をしましょう。\n        </p>\n      </div>\n      <img src=\"../../../../images/banner/mail.png\">\n    </div>\n  </div>\n</template>\n<script>\nexport default {\n  props: {\n    unreadMessages: Number\n  }\n}\n</script>\n","\n<div class=\"app -clients l-container\">\n  <div class=\"chats\">\n    <chat_card v-for=\"(chat, i) in chats\" :key=\"i\" @chatClick=\"setActiveChat(i)\" :class=\"{ active: i === activeChat }\"\n      :chat=\"chat\" :id=\"i\" />\n  </div>\n  <splash :unreadMessages=\"unreadMessages.length\" v-if=\"activeChat == -1\" />\n  <chatroom @updateSelectionStatus=\"onUpdateSelectionStatus\" @messageSent=\"onMessageSent\" v-if=\"activeChat > -1\" :chat=\"chats[activeChat]\" />\n</div>\n","<template>\n  <div class=\"app -clients l-container\">\n    <div class=\"chats\">\n      <chat_card v-for=\"(chat, i) in chats\" :key=\"i\" @chatClick=\"setActiveChat(i)\" :class=\"{ active: i === activeChat }\"\n        :chat=\"chat\" :id=\"i\" />\n    </div>\n    <splash :unreadMessages=\"unreadMessages.length\" v-if=\"activeChat == -1\" />\n    <chatroom @updateSelectionStatus=\"onUpdateSelectionStatus\" @messageSent=\"onMessageSent\" v-if=\"activeChat > -1\" :chat=\"chats[activeChat]\" />\n  </div>\n</template>\n<script>\nimport axios from \"axios\";\nimport Routes from \"../../routes\";\nimport chat_card from \"./chat_card.vue\";\nimport chatroom from \"./chatroom.vue\";\nimport splash from \"./splash.vue\"\nimport { CSRF_TOKEN } from \"../../constants\";\n\nexport default {\n  components: {\n    chat_card,\n    chatroom,\n    splash,\n  },\n  data() {\n    return {\n      chats: [],\n      activeChat: -1,\n    };\n  },\n  computed: {\n    unreadMessages() {\n      let allMessages = this.chats.flatMap(chat => chat.messages)\n      return allMessages.filter(message => message.sender == 'applicant' && message.is_opened == false)\n    },\n    jobApplicantIds() {\n      return this.chats.map(c => c.applicant).map(a => a.job_applicant_id)\n    }\n  },\n  created() {\n    this.getMessages()\n      .then(() => {\n        this.setActiveChatFromUrl()\n      })\n\n    // ブラウザバック時の処理\n    window.addEventListener('popstate', () => {\n      if (this.activeChat > -1) {\n        this.hasJobApplicantParam() ? this.setDetailPage() : this.goBack();\n      }\n    })\n  },\n  methods: {\n    jobApplicantId() {\n      const urlParams = new URLSearchParams(window.location.search);\n      return parseInt(urlParams.get('job_applicant'));\n    },\n    hasJobApplicantParam() {\n      // this.jobApplicantId()が数字以外のときはfalseを返す\n      return !isNaN(this.jobApplicantId());\n    },\n    setDetailPage() {\n      this.setActiveChat(this.jobApplicantIds.indexOf(this.jobApplicantId()), true)\n    },\n    goBack() {\n      this.activeChat = -1\n      history.replaceState('', '', '/clients/messages')\n    },\n    setActiveChatFromUrl() {\n      if (this.hasJobApplicantParam()) {\n        this.setActiveChat(this.jobApplicantIds.indexOf(this.jobApplicantId()))\n      }\n    },\n    getMessages() {\n      return axios\n        .get(Routes.api.clients.messages)\n        .then((r) => {\n          this.chats = r.data;\n        })\n        .catch((e) => {\n          // CSRFトークン認証エラーが発生した場合トップヘリダイレクト\n          if (e.response.status === 401) {\n            window.location.href = '/';\n          }\n          console.error(e);\n        });\n    },\n    markMessageRead() {\n      let activeJobApplicant = this.chats[this.activeChat]\n      return axios\n        .put(\n          Routes.api.clients.messages,\n          {\n            'job_id': activeJobApplicant.job.id,\n            'applicant_id': activeJobApplicant.applicant.id,\n          },\n          {\n            headers: { 'X-CSRF-TOKEN': CSRF_TOKEN }\n          }\n        )\n        .then(() => {\n          let readMessages = this.chats[this.activeChat].messages\n          readMessages.forEach(m => m.is_opened = true)\n          this.$set(this.chats[this.activeChat], 'messages', readMessages)\n        })\n        .catch((e) => {\n          // CSRFトークン認証エラーが発生した場合トップヘリダイレクト\n          if (e.response.status === 401) {\n            window.location.href = '/';\n          }\n          console.error(e)\n        })\n    },\n    onUpdateSelectionStatus(selectionStatus) {\n      this.chats[this.activeChat].applicant.selection_id = selectionStatus\n    },\n    onMessageSent(message) {\n      let activeChat = this.chats[this.activeChat]\n      this.$set(\n        this.chats,\n        this.activeChat,\n        {\n          ...activeChat,\n          \"messages\": [message, ...activeChat.messages]\n        }\n      )\n    },\n    setActiveChat(i, back = false) {\n      // 現在のページと同じページをクリックした場合何もしない\n      if (this.activeChat === i) return\n\n      this.activeChat = i\n      if (!back) {\n        // ブラウザバックじゃない時、ページ切り替えと同時にURLも変更(履歴を残す)\n        history.pushState('', '', `/clients/messages?job_applicant=${this.jobApplicantIds[i]}`)\n      }\n      if (this.unreadMessages.length > 0) {\n        this.markMessageRead()\n      }\n    },\n    hasQueryParam(key) {\n      const urlParams = new URLSearchParams(window.location.search);\n      return urlParams.has(key);\n    }\n  },\n};\n</script>\n","import App from '../vue/clients/messages/app.vue';\n\nexport default {\n  el: '#messages',\n  components: {\n    App,\n  }\n};\n"],"names":["__$_require_381326aa__","render","_vm","_h","_c","$event","staticRenderFns","__vue2_script","v","u","attachment","i","reason","$$a","$$el","$$c","$$v","$$i","error","toastr","axios","Routes","response","jobApplicantId","jsonDeclinedReason","parsed","CSRF_TOKEN","template","$$selectedVal","o","val","selectionStatus","ConfirmModal","DeclineModal","f","e","r","content","message","chat_controls","chatBody","timestamp","attachmentUrl","x","fileName","__$_require_29e9870c__","__$_require_4aa2e6d8__","chat","chat_card","chatroom","splash","c","a","urlParams","activeJobApplicant","readMessages","m","activeChat","back","key","ClientMessageMixin","App"],"mappings":"oVAAA,MAAeA,EAAA,6qCCCf,IAAIC,EAAS,UAAY,CACvB,IAAIC,EAAI,KACJC,EAAGD,EAAI,eACPE,EAAGF,EAAI,MAAM,IAAIC,EAErB,OAAOC,EAAG,MAAO,CACf,YAAa,OACb,GAAI,CACF,MAAS,SAAUC,EAAQ,CACzB,OAAOH,EAAI,MAAM,YAAaA,EAAI,EAAE,CACrC,CACF,CACL,EAAK,CAACE,EAAG,MAAO,CACZ,YAAa,eACjB,EAAK,CAACA,EAAG,MAAO,CACZ,YAAa,kCACjB,EAAK,CAACA,EAAG,MAAO,CACZ,MAAO,CACL,aAAcF,EAAI,eACnB,CACL,EAAK,CAACE,EAAG,MAAO,CACZ,YAAa,QACb,MAAO,CACL,IAAOJ,EACP,MAAS,KACT,OAAU,IACX,CACL,CAAG,CAAC,CAAC,EAAGI,EAAG,MAAO,CACd,YAAa,UACd,EAAE,CAACA,EAAG,KAAM,CAACF,EAAI,GAAGA,EAAI,GAAGA,EAAI,KAAK,UAAU,IAAI,EAAI,KAAOA,EAAI,GAAGA,EAAI,KA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