1import{Z as e}from"./Cth086h9.js";import{u as s}from"./DXEReEGX.js";import{H as i}from"./C4uGYEOS.js";import{d as a,w as t,V as l,a6 as r,m as o,a7 as m,O as n,an as p,W as c,a8 as d,u as v,$ as u,F as w,_ as f,X as g,Y as h,ak as j,a3 as b,au as k,f as y,e as _}from"./Cr1fGMKy.js";import{f as V,N as B}from"./CjREDNe_.js";import{a as x}from"./C2d5NoZG.js";import{_ as C}from"./CXiZhF7u.js";import"./DiewgfNs.js";import"./CuywDt9m.js";import"./BhucQsDV.js";import"./Cr-n271q.js";import"./DAfD2Ikl.js";import"./CDXFV7IG.js";import"./fWEIk8Le.js";import"./DM1vspZF.js";import"./DSXY0Md2.js";import"./56vMUtd6.js";import"./EjGB3Gp8.js";import"./D5K_4anA.js";import"./CUzHbT1P.js";import"./Dse9Mg1i.js";import"./68VeHwx2.js";import"./sfWIh72n.js";const P={class:"ai-preview-container"},M={class:"ai-preview-header"},S={class:"ai-preview-title"},L={class:"ai-preview-body"},T={class:"main-preview-container mb-4"},z=["src","alt"],E={class:"swiper-thumbs-wrapper"},I=["src"],N={class:"ai-preview-footer"},O=["disabled"],Z={key:0,class:"spinner",viewBox:"0 0 50 50"},$=C(a({__name:"generatePreviewModal",props:{modelValue:{type:Boolean},item:{},images:{},loading:{type:Boolean,default:!1}},emits:["update:modelValue","close","confirm"],setup(a,{emit:C}){const{Swiper:$,SwiperSlide:q}=s({delay:100}),{getTemplateBackgroundStyles:A}=x(),{t:F}=i(),G=a,H=C,K=y(null),Q=y(null),W=y("");t((()=>G.modelValue),(e=>{e&&G.item&&(W.value=G.item.preview[0]||"")}),{immediate:!0});const X=()=>{H("update:modelValue",!1),H("close")},Y=_((()=>A(G.item)));return(s,i)=>{const t=e;return l(),r(k,{to:"body"},[o(b,{name:"modal-fade"},{default:m((()=>[a.modelValue?(l(),n("div",{key:0,class:"ai-preview-overlay",onClick:p(X,["self"])},[c("div",P,[c("div",M,[c("h2",S,d(v(F)("aippt.preview")||"Preview"),1),c("button",{class:"ai-preview-close",onClick:X},[...i[1]||(i[1]=[c("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[c("path",{d:"M18 6L6 18M6 6l12 12"})],-1)])])]),c("div",L,[c("div",T,[c("div",{class:"main-preview-slide",style:u(v(Y))},[c("img",{src:v(W)||a.item?.preview[0],alt:a.item?.name||"Preview"},null,8,z)],4)]),c("div",E,[o(t,null,{default:m((()=>[(l(),r(v($),{key:`thumb-${a.item?.id||"gen"}`,spaceBetween:10,slidesPerView:5.5,breakpoints:{320:{slidesPerView:3.2},768:{slidesPerView:5.5}},freeMode:!0,watchSlidesProgress:!0,navigation:{prevEl:v(K),nextEl:v(Q)},modules:[v(V),v(B)],class:"mySwiper"},{default:m((()=>[(l(!0),n(w,null,f(a.item?.preview||[],((e,s)=>(l(),r(v(q),{key:s,class:g(["swiper-thumbs",{"is-active":(v(W)||a.item?.showImg)===e}]),onClick:s=>W.value=e},{default:m((()=>[c("img",{src:e,alt:"Thumbnail"},null,8,I)])),_:2},1032,["class","onClick"])))),128))])),_:1},8,["navigation","modules"]))])),_:1}),c("button",{ref_key:"prevBtn",ref:K,class:"swiper-prev"},[...i[2]||(i[2]=[c("svg",{viewBox:"0 0 1024 1024",width:"18",height:"18"},[c("path",{d:"M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 0 0 0 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z",fill:"#000"})],-1)])],512),c("button",{ref_key:"nextBtn",ref:Q,class:"swiper-next"},[...i[3]||(i[3]=[c("svg",{viewBox:"0 0 1024 1024",width:"18",height:"18"},[c("path",{d:"M765.7 486.8L314.9 134.7A7.97 7.97 0 0 0 302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 0 0 0-50.4z",fill:"#000"})],-1)])],512)])]),c("div",N,[c("button",{class:"ai-cancel-btn",onClick:X},d(v(F)("public.cancel")||"Cancel"),1),c("button",{class:"ai-generate-btn",onClick:i[0]||(i[0]=e=>H("confirm",a.item)),disabled:a.loading},[a.loading?(l(),n("svg",Z,[...i[4]||(i[4]=[c("circle",{class:"path",cx:"25",cy:"25",r:"20",fill:"none","stroke-width":"5"},null,-1)])])):h("",!0),j(" "+d(v(F)("aippt.generate")||"Generate"),1)],8,O)])])])):h("",!0)])),_:1})])}}}),[["__scopeId","data-v-49a607c7"]]);export{$ as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.