const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/iframes.dJs8gRyz.js","assets/vue.D1BjjNmv.js"])))=>i.map(i=>d[i]);
import{n as I,u as B,e as w,S as P,_ as x}from"./index.CL7yl-Wb.js";import{a as K,aB as E,aH as S,aC as _,_ as D,r as M,f,a5 as O,t as c,q as U,W as J,w as j,aj as q,c as H,o as v,S as o,K as h,U as d,J as V,M as W,aJ as b,L as R,O as z,T as y,u as F,aA as G,C as Q}from"./vue.D1BjjNmv.js";const X={class:"layout-parent"},Y=K({name:"layoutParentView"}),se=K({...Y,setup(Z){const g=G(()=>x(()=>import("./iframes.dJs8gRyz.js"),__vite__mapDeps([0,1]))),t=E(),A=S(),L=I(),T=B(),{keepAliveNames:i,cachedViews:n}=_(L),{themeConfig:u}=_(T),e=D({refreshRouterViewKey:"",iframeRefreshKey:"",keepAliveNameList:[],iframeList:[]}),m=M(!0);Q("refreshView",function(){m.value=!1,c(()=>{m.value=!0})});const l=f(()=>u.value.animation),k=f(()=>(console.log(n.value),u.value.isTagsview?n.value:e.keepAliveNameList)),p=f(()=>t.meta.isIframe),C=async()=>{A.getRoutes().forEach(a=>{a.meta.isIframe&&(a.meta.isIframeOpen=!1,a.meta.loading=!0,e.iframeList.push({...a}))})};return O(()=>{e.keepAliveNameList=i.value,w.on("onTagsViewRefreshRouterView",a=>{e.keepAliveNameList=i.value.filter(s=>t.name!==s),e.refreshRouterViewKey="",e.iframeRefreshKey="",c(()=>{e.refreshRouterViewKey=a,e.iframeRefreshKey=a,e.keepAliveNameList=i.value})})}),U(()=>{C(),c(()=>{setTimeout(()=>{if(u.value.isCacheTagsView){let a=P.get("tagsViewList")||[];n.value=a.filter(s=>{var r;return(r=s.meta)==null?void 0:r.isKeepAlive}).map(s=>s.name)}},0)})}),J(()=>{w.off("onTagsViewRefreshRouterView",()=>{})}),j(()=>t.fullPath,()=>{e.refreshRouterViewKey=decodeURI(t.fullPath)},{immediate:!0}),(a,s)=>{const r=q("router-view");return v(),H("div",X,[o(r,null,{default:h(({Component:N})=>[o(d,{name:l.value,mode:"out-in"},{default:h(()=>[m.value?(v(),V(b,{key:0,include:k.value},[R((v(),V(z(N),{key:e.refreshRouterViewKey,class:"w100"})),[[y,!p.value]])],1032,["include"])):W("",!0)]),_:2},1032,["name"])]),_:1}),o(d,{name:l.value,mode:"out-in"},{default:h(()=>[R(o(F(g),{class:"w100",refreshKey:e.iframeRefreshKey,name:l.value,list:e.iframeList},null,8,["refreshKey","name","list"]),[[y,p.value]])]),_:1},8,["name"])])}}});export{se as default};
