"use strict";(self.webpackChunkflow_web_extension=self.webpackChunkflow_web_extension||[]).push([["24677"],{501108:function(t,e,i){i.d(e,{L:()=>s,P:()=>a});class s{}class a{constructor(){this.render=void 0,this.onClick=void 0}}},711363:function(t,e,i){i.d(e,{y:()=>a});var s=i(620638);class a{focusOnEditor(){s.zm.getState().updateFocusedState(!0)}updateEditorValue(){}clearEditorValue(){}}},620638:function(t,e,i){i.d(e,{zm:()=>g});var s=i(837222),a=i(531484),n=i(771197),r=i(698127),l=i(706790),o=i(497176),d=i(434463),c=i(754751),p=i(41139),u={editorValue:"",focused:!1,cardList:[],isWriteConfigInited:!1,isWriteConfigLoading:!1,writeConfig:{},tagList:[],styleList:[],templatePage:1,templateList:[],hasMore:!0,loading:!1,showSkeleton:!0},g=(0,a.Ue)()((0,s.XR)((t,e)=>{var i;return(0,l._)((0,r._)({},u),{updateFocusedState:e=>{t((0,o.Uy)(t=>{t.focused=e}))},fetchCardList:(0,n._)(function*(){try{var{data:e}=yield d.mH.SkillPack({skill_type:c.SkillType.AiPPT});t((0,o.Uy)(t=>{if(e){var i;t.cardList=(null===(i=e.ai_ppt)||void 0===i?void 0:i.items)||[]}}))}catch(t){p.k.persist.warning({eventName:"init_ppt_list_error"})}}),fetchWriteConfig:(0,n._)(function*(){if(!e().isWriteConfigLoading&&!e().isWriteConfigInited)try{t((0,o.Uy)(t=>{t.isWriteConfigLoading=!0,t.isWriteConfigInited=!1}));var{data:i}=yield d.mH.SkillPack({skill_type:c.SkillType.WriteAssistant,condition:{}});t((0,o.Uy)(t=>{(null==i?void 0:i.write)?(t.isWriteConfigLoading=!1,t.isWriteConfigInited=!0,t.writeConfig=i.write):t.isWriteConfigLoading=!1}))}catch(t){p.k.persist.warning({eventName:"init_ppt_config_error"})}}),fetchTemplateList:(i=(0,n._)(function*(i,s,a,n){if((s||e().hasMore)&&!e().loading)try{t((0,o.Uy)(t=>{t.loading=!0,s&&(t.templatePage=1,t.templateList=[],t.hasMore=!0,t.showSkeleton=!0)}));var{data:r}=yield d.mH.GetAiPPTTemplateList({selected_tag_id:a,selected_style_id:n,page:s?1:e().templatePage,size:10,is_doubao_exclusive:i});t((0,o.Uy)(t=>{if(r){var i,s,a;t.loading=!1,t.showSkeleton=!1,t.hasMore=null===(a=r.has_more)||void 0===a||a,t.templatePage=e().templatePage+1,r.tags&&(null===(i=r.tags)||void 0===i?void 0:i.length)>0&&(t.tagList=r.tags),r.styles&&(null===(s=r.styles)||void 0===s?void 0:s.length)>0&&(t.styleList=r.styles),r.detail_list&&(t.templateList=[...t.templateList,...r.detail_list])}}))}catch(e){t((0,o.Uy)(t=>{t.loading=!1,t.showSkeleton=!1})),p.k.persist.warning({eventName:"fetch_ppt_template_error"})}}),function(t,e,s,a){return i.apply(this,arguments)})})}))},674620:function(t,e,i){i.r(e),i.d(e,{PptChatGuidanceCardPlugin:()=>u});var s=i(397458),a=i(599776);i(652983);var n=i(87608),r=i.n(n),l=i(501108),o=i(170246),d=i(932842),c=i(754751),p=i(711363);class u extends l.P{getTitleKey(){return"skill_aippt_title"}getDescKey(){return"onboarding_aippt_description"}constructor(...t){super(...t),this.skillType=c.SkillType.AiPPT,this._chatInputService=new p.y,this._route="/chat/aippt",this.renderIcon=t=>{var{className:e}=t;return(0,s.jsx)(a.Z,{className:r()("icon-N0Q3ol",e)})},this.renderTitle=t=>{var{renderTitleRaw:e}=t;return e()},this.renderDesc=t=>{var{renderDescRaw:e}=t;return e()},this.onClick=t=>{var{type:e,conversationId:i,navigate:s}=t;"open_skill"===e&&i?((0,d.GX)("chatInputStore").updateActiveSkillTypeMap(i,this.skillType,o.u.ClickSkill),this._chatInputService.focusOnEditor()):"navigate"===e&&s&&s(this._route,{state:{from:"guidance_page"}})}}}}}]);
//# sourceMappingURL=24677.js.map