"use strict";(globalThis.webpackChunkinfinity_hitab_client=globalThis.webpackChunkinfinity_hitab_client||[]).push([[6054],{81752:(t,e,i)=>{i.r(e),i.d(e,{mountHome:()=>d,widgetApp:()=>p});var a=i(29445),o=i(68398),s=i(57268),n=i(90868);const r=(0,s.aZ)({__name:"widget-ai-write-home",props:{size:null,id:null},setup(t){const e=t,{HomeComp:i}=(0,n.$c)(e),{clickWidget:o}=(0,n.dd)();return(t,e)=>((0,s.wg)(),(0,s.iD)("section",{class:"contents cursor-pointer",onClick:e[0]||(e[0]=function(){return(0,a.SU)(o)&&(0,a.SU)(o)(...arguments)})},[((0,s.wg)(),(0,s.j4)((0,s.LL)((0,a.SU)(i))))]))}});var c=i(96755),l=i(18023);const p=(0,a.iH)(null),d=(t,e)=>{const i=(0,o.createApp)(r,e);return(0,l.f)(i),p.value=i,i.use(c.M),i.mount(t),p.value}},90868:(t,e,i)=>{i.d(e,{$c:()=>y,dd:()=>S,UV:()=>C});var a=i(57268);const o={class:"bg-ai-write relative flex h-full w-full items-center"},s=[(t=>((0,a.dD)("data-v-21cfa1f9"),t=t(),(0,a.Cn)(),t))((()=>(0,a._)("div",{class:"ml-[88px] flex flex-col justify-center gap-[8px] icon-m:ml-[78px] icon-s:ml-[64px]"},[(0,a._)("span",{class:"text-[16px] font-bold leading-[22px] text-[#1C1C1E]"},"AI 写作"),(0,a._)("span",{class:"text-[12px] text-[#3A3A3C]"},"启发灵感、一键成文")],-1)))];var n=i(76911);const r={},c=(0,n.Z)(r,[["render",function(t,e){return(0,a.wg)(),(0,a.iD)("section",o,s)}],["__scopeId","data-v-21cfa1f9"]]),l={class:"bg-ai-write relative z-0 flex h-full flex-col overflow-hidden p-[20px] icon-m:p-[16px] icon-s:p-[12px]"},p=[(0,a.uE)('<div class="flex h-full w-full flex-col items-center justify-end" data-v-616555a1><span class="text-[16px] font-bold leading-[22px] text-[#1C1C1E]" data-v-616555a1>AI 写作</span><span class="mt-[4px] text-[12px] text-[#3A3A3C]" data-v-616555a1>启发您的写作灵感与思路</span><div class="mt-[19px] flex items-center gap-[4px] text-[12px] leading-[16px] text-color-write-t1 icon-m:mt-[14px] icon-s:mt-[10px]" data-v-616555a1><span data-v-616555a1>一键成文</span><i class="iconfont icon-more_icon text-[12px]" data-v-616555a1></i></div></div>',1)];const d={},u=(0,n.Z)(d,[["render",function(t,e){return(0,a.wg)(),(0,a.iD)("section",l,p)}],["__scopeId","data-v-616555a1"]]);var m=i(81752),v=i(22854),x=i(96339),f=i(56413),g=i(10435),w=i(95329),h=i(17319);const y=t=>{const e={s:c,m:u};return(0,v.C)(t,m.widgetApp.value,e)},S=()=>{const t=(0,f.useAiWriteStore)(),e=(0,g.Jk)(t);return{clickWidget:()=>{t.setModal(!0)},onCloseModal:()=>{t.setModal(!1)},show:e.modalShow,modalFullScreen:e.modalFullScreen,pageState:e.pageState,setFull:e=>{t.setModalFullScreen(e)}}},C=()=>{const t=(0,w.useUserStore)(),e=(0,f.useAiWriteStore)(),i=(0,g.Jk)(e),a=()=>{if(t.isLogin)return!0;h.R.warn({message:"此功能需要先登录",btnText:"去登录",onBtnClick:()=>{t.showLogin(!1)},duration:3e3})},o=t=>{e.setPageState(t)};return{pageState:i.pageState,domainList:i.domainList,commonDomainList:i.commonDomainList,activeDomainId:i.activeDomainId,activeDomain:i.activeDomain,activeCatId:i.activeCatId,currentTemplates:i.currentTemplates,formData:i.formData,answerStr:i.answerStr,answerStatus:i.answerStatus,currentWriteId:i.currentWriteId,showHistory:i.showHistory,historyList:i.historyList,historyPagination:i.historyPagination,activeHistoryDomain:i.activeHistoryDomain,activeHistory:i.activeHistory,vipGroup:i.vipGroup,showFeedback:i.showFeedback,isVip:i.isVip,vipInfo:i.vipInfo,buyList:i.buyList,checkLogin:a,openWriteTemplate:function(t){let i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;t&&(e.setActiveCatId(t),e.getTemplate(t)),e.setActiveHistory(i),e.setShowHistory(!1),o(x.yv.Content)},goToHome:()=>{e.setActiveCatId(""),e.setShowHistory(!1),o(x.yv.Home)},goToHistory:()=>{a()&&(i.showHistory.value||(e.resetHistoryPagination(),e.getWriteHistoryList(),e.setActiveCatId(""),e.setShowHistory(!0),o(x.yv.Content)))},handleShowFeedback:t=>{e.setShowFeedback(t)}}}}}]);