!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["utils/comments/translate"]=t():e["utils/comments/translate"]=t()}(self,(function(){return function(){"use strict";var e,t,n={169:function(e){e.exports=coreApis.componentApis.utils.commentApis}},o={};function r(e){var t=o[e];if(void 0!==t)return t.exports;var c=o[e]={exports:{}};return n[e](c,c.exports,r),c.exports}r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,{a:t}),t},t=Object.getPrototypeOf?function(e){return Object.getPrototypeOf(e)}:function(e){return e.__proto__},r.t=function(n,o){if(1&o&&(n=this(n)),8&o)return n;if("object"==typeof n&&n){if(4&o&&n.__esModule)return n;if(16&o&&"function"==typeof n.then)return n}var c=Object.create(null);r.r(c);var i={};e=e||[null,t({}),t([]),t(t)];for(var a=2&o&&n;"object"==typeof a&&!~e.indexOf(a);a=t(a))Object.getOwnPropertyNames(a).forEach((function(e){i[e]=function(){return n[e]}}));return i.default=function(){return n},r.d(c,i),c},r.d=function(e,t){for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var c={};return function(){r.d(c,{component:function(){return n}});var e=coreApis.componentApis.i18N.machineTranslator.MachineTranslator,t=r.n(e);const n={name:"commentsTranslate",displayName:"评论翻译",description:{"zh-CN":"在每条评论下方添加翻译按钮."},tags:[componentsTags.utils,componentsTags.feeds],entry:async()=>{const e=e=>{const n=dqa(e,".text, .text-con");0!==n.length&&n.forEach((e=>{if(e.nextElementSibling?.classList.contains("translate-container"))return;const n=new(t())({propsData:{text:e.innerText}}).$mount();e.insertAdjacentElement("afterend",n.$el)}))},{forEachCommentItem:n}=await Promise.resolve().then(r.t.bind(r,169,23));n({added:t=>{const{element:n}=t;t.onRepliesUpdate=t=>t.forEach((t=>e(t.element))),e(n)}})}}}(),c=c.component}()}));