"use strict";(self.webpackChunkflow_web_extension=self.webpackChunkflow_web_extension||[]).push([["53649"],{237968:function(e,s,t){var n=t(397458);t(652983);var i=t(465031),r=t(940661);s.Z=(0,i.G)((0,n.jsx)(r.r,{}))},812109:function(e,s,t){t.d(s,{tk:()=>r});var n=t(590745),i=t(642494),r=e=>{if(!e)return n.LY.MESSAGE_TYPE_TEXT;if((0,i.qP0)(e))return n.LY.MESSAGE_TYPE_PIC;if((0,i.RkI)(e))return n.LY.MESSAGE_TYPE_VIDEO;if((0,i.vU5)(e))return n.LY.MESSAGE_TYPE_MUSIC;if((0,i.A8i)(e))return n.LY.MESSAGE_TYPE_FILE;if((0,i.s27)(e))return n.LY.MESSAGE_TYPE_SEARCH_CARD;else if((0,i.d8)(e))return n.LY.MESSAGE_TYPE_LYRICS_TO_SONG_LYRIC;else if((0,i.C_i)(e))return n.LY.MESSAGE_TYPE_LYRICS_TO_SONG_MUSIC;else if((0,i.zTh)(e))return n.LY.MESSAGE_TYPE_VIDEO_GENERATION;else return n.LY.MESSAGE_TYPE_TEXT}},865771:function(e,s,t){t.d(s,{Z:()=>l});var n=t(698127),i=t(706790),r=t(181267),a=t(397458),_=t(87608),o=t.n(_),d=t(313389),l=e=>{var{prefix:s,disabled:t,onClick:_,children:l,type:c}=e,g=(0,r._)(e,["prefix","disabled","onClick","children","type"]);return(0,a.jsx)(d.Z.Item,(0,i._)((0,n._)({className:o()("w-full !rounded-4 !text-14 h-32 !p-4 !pr-14"),icon:s,type:c,onClick:_,disabled:t},g),{children:l}))}},852188:function(e,s,t){t.r(s),t.d(s,{SearchDeleteReceiveMessageActionButtonPlugin:()=>g});var n=t(397458),i=t(237968),r=t(650222),a=t(865771),_=t(828005),o=t(651481),d=t(221330),l=t(211914),c=e=>{var{message:s}=e,t=(0,d.g1)(),l=(0,_.Rm)(o.GH.getState(),s),{onDeleteClick:c}=(0,r.B)({message:s,deleteMessages:(null==l?void 0:l.length)?l:void 0});return(0,n.jsxs)(a.Z,{"data-testid":"message_action_delete",type:"danger",prefix:(0,n.jsx)(i.Z,{className:"text-16 p-2"}),onClick:c,children:[t("long_press_delete_message")," "]})};class g{constructor(){this.pluginIdentifier=l.X,this.DropdownItemContentGroups=[c]}}},650222:function(e,s,t){t.d(s,{B:()=>p});var n=t(771197),i=t(698127),r=t(706790),a=t(624682),_=t(642494),o=t(825022),d=t(812109),l=t(481812),c=t(651481),g=t(747597),u=t(441925),v=t(632434),m=t(788704),E=t(221330),f=t(628098),p=e=>{var{message:s,deleteMessages:t,deleteRegenMessages:p}=e,S=(0,E.g1)(),{getPopupContainer:h=()=>document.body}=(0,g.R)(),Y=(0,u.p)(),I=c.GH.getState(),L=()=>{var e;(t||[s]).forEach((e=(0,n._)(function*(e){var t,n={bot_id:s.bot_id,conversation_id:s.conversation_id,message_id:s.message_id,message_type:(0,d.tk)(e),is_onboarding:+!!(0,_.qF)(e),click_from:"long_press_message",is_read:0,voice_id:void 0,user_type:+!!(0,_.Yns)(e)};try{if((null==e?void 0:e.message_id)&&!(0,o.K)(e)){(0,m.L)("message_delete",n),yield(yield(0,l.p)()).deleteMessage({conversation_id:s.conversation_id,message_id:e.message_id,regen_message_ids:null==p?void 0:p.map(e=>e.message_id).filter(a.Z)});var c={isLocalMessage:!1,messageId:e.message_id};I.logicalDeleteMessage({conversationId:s.conversation_id||"",messageLink:c}),I.updateMessageList({conversationId:s.conversation_id||"",immerUpdate:(e,s)=>s.resetMessageLink(c.messageId)}),(0,m.L)("message_delete_result",(0,r._)((0,i._)({},n),{is_success:1})),v.v.emit("chat.message.delete",{conversationId:s.conversation_id||"",messageId:c.messageId})}}catch(e){(0,m.L)("message_delete_result",(0,r._)((0,i._)({},n),{is_success:0,error:(null==e?void 0:null===(t=e.errorOption)||void 0===t?void 0:t.message)||(null==e?void 0:e.message)})),Y.error(S("system_error_toast"))}}),function(s){return e.apply(this,arguments)}))};return{onDeleteClick:()=>{f.Z.warning({centered:!0,title:S("delete_message_toast_text"),content:S("web_deleteChat_desc"),cancelText:S("delete_message_btn_cancel"),okText:S("delete_message_btn_confirm"),okButtonProps:{type:"danger"},onOk:L,getPopupContainer:h})}}}},940661:function(e,s,t){t.d(s,{r:()=>a});var n=t(698127),i=t(706790),r=t(397458);t(652983);var a=e=>(0,r.jsx)("svg",(0,i._)((0,n._)({xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"none",viewBox:"0 0 24 24"},e),{children:(0,r.jsx)("path",{fill:"currentColor",d:"M8 4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2h5a1 1 0 1 1 0 2h-1v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6H3a1 1 0 0 1 0-2zM6 6v14h12V6zm4 3a1 1 0 0 1 1 1v6a1 1 0 1 1-2 0v-6a1 1 0 0 1 1-1m4 0a1 1 0 0 1 1 1v6a1 1 0 1 1-2 0v-6a1 1 0 0 1 1-1"})}))}}]);
//# sourceMappingURL=53649.js.map