1import{E as G}from"./D9FiDDir.js";import{a as H,fG as J,av as K,s as W,au as Y,aA as Q,i as X,H as b,a3 as Z,aE as ee,o as d,c as k,w as a,q as e,l as u,F as _,E as $,A as n,G as te,x as s,am as S,t as i,al as se,y as oe,J as le,z as j,Y as ae,K as ne,b$ as ie,n as re,aO as D,fH as de,fI as pe,U as me,g as I,_ as ue}from"./Cz8qy4BE.js";import{E as ce}from"./XUUGREFG.js";import{_ as fe}from"./DOD3c1Ln.js";import{_ as we}from"./Dq6uInOK.js";import{r as x}from"./DdVNB4FM.js";import"./-zdDswT9.js";import"./CJ52BK0-.js";import"./t9FoYkK8.js";import"./CawDA7EM.js";import"./ChlyAFSW.js";import"./C9uNOgiN.js";const ve={class:"space-template"},_e={class:"flex-1 w-0 py-[.3rem]"},ye={class:"space-template"},ge={class:"flex gap-3 md:gap-5"},be={class:"w-40 md:w-56 min-h-20 md:min-h-32 rounded-lg overflow-hidden border border-content-card"},ke={class:"flex-1"},$e={class:"title"},je={class:"flex gap-2"},xe={class:"desc"},he={key:0,class:"action"},Ce={class:"flex-center justify-center gap-10 mb-0.5"},Te={class:"flex justify-between items-end px-2 pt-1"},ze={class:"font-bold text-md mb-1"},Ee={class:"text-ssm text-secondary"},Se={class:"preview-window"},De={key:0,class:"top-controls"},Ie={class:"text-center"},Me={class:"font-medium text-sm"},Ve={class:"text-xs text-unimportant"},Be=["src"],Fe=H({__name:"list",setup(Le){const h=b(),{toggle:M,isFullscreen:V}=J(h),{width:C}=K(),m=W(),{realPx:T,mobileOrElse:B}=m,{t:f}=Y(),F=Q(),L=X("searchText",b("")),w=b(!1),r=me({display:!1,template:"",name:"",download:"",code:"",index:"",previewId:""}),z=o=>{Object.assign(r,o),r.display=!0},N=I(()=>{let o=F.fontSize/16;return V.value&&(o=1),w.value?{position:"fixed",zIndex:3e3,top:0,left:0,width:"100vw",height:"100vh"}:{scale:o===1?"":o,width:`${1/o*100}%`,height:`${1/o*100}%`}}),y=I(()=>S()+`/template/preview/${r.previewId}${r.index}`);return Z(()=>{ee({title:f("title.prefix",{model:f("navigation.space"),title:f("space.project.navigation[3].name")}),description:f("space.project.desc")})}),(o,t)=>{const v=G,P=te,U=se,p=le,q=ae,E=ce,O=fe,R=ne,A=we;return d(),k(A,{class:"pt-[3.25rem] pb-14 md:p-0","page-size":8,"fetch-list":s(pe),"search-list":s(de),"search-text":s(L),"reset-scroll":""},{skeleton:a(()=>[e("div",ve,[(d(),u(_,null,$(4,g=>e("div",{class:"space-template-item flex gap-3 md:gap-5",key:g},[n(v,{variant:"rect",class:"!w-40 md:!w-56 min-h-20 md:min-h-32 !rounded-lg"}),e("div",_e,[n(v,{variant:"p",style:{width:"70%"},class:"mb-3"}),n(v,{variant:"text",style:{width:"90%"}}),n(v,{variant:"text",style:{width:"70%"}})])])),64))])]),default:a(({list:g})=>[e("div",ye,[(d(!0),u(_,null,$(g,l=>(d(),k(O,{class:"space-template-item",padding:7},{default:a(()=>[e("div",ge,[e("div",be,[n(P,{src:s(S)()+`/internal/static/space/projects/template/${l.image}`},null,8,["src"])]),e("div",ke,[e("div",$e,i(l.name),1),e("div",je,[(d(!0),u(_,null,$(l.tags,c=>(d(),k(U,{type:"info",size:"small",round:""},{default:a(()=>[oe(i(c),1)]),_:2},1024))),256))]),e("div",xe,i(l.description),1),s(m).isMobile?j("",!0):(d(),u("div",he,[n(p,{type:"primary",size:"small",round:"",plain:"",onClick:c=>z(l)},{default:a(()=>[t[6]||(t[6]=e("i",{class:"fa-regular fa-window"},null,-1)),e("span",null,i(o.$t("space.project.template.view")),1)]),_:1},8,["onClick"]),n(p,{type:"primary",size:"small",round:"",plain:"",onClick:c=>("routeToDownload"in o?o.routeToDownload:s(x))(l.download,l.code)},{default:a(()=>[t[7]||(t[7]=e("i",{class:"fa-solid fa-arrow-down-to-line"},null,-1)),e("span",null,i(o.$t("space.project.template.download")),1)]),_:1},8,["onClick"])]))])]),s(m).isMobile?(d(),u(_,{key:0},[n(q,{top:"10",bottom:"7"}),e("div",Ce,[n(E,{type:l.mobile?"primary":"info",onClick:c=>z(l),disabled:!l.mobile},{default:a(()=>[t[8]||(t[8]=e("i",{class:"fa-regular fa-window"},null,-1)),e("span",null,i(l.mobile?o.$t("space.project.template.view"):o.$t("space.project.template.mobile")),1)]),_:2},1032,["type","onClick","disabled"]),n(E,{type:"primary",onClick:c=>("routeToDownload"in o?o.routeToDownload:s(x))(l.download,l.code)},{default:a(()=>[t[9]||(t[9]=e("i",{class:"fa-solid fa-arrow-down-to-line"},null,-1)),e("span",null,i(o.$t("space.project.template.download")),1)]),_:1},8,["onClick"])])],64)):j("",!0)]),_:2},1024))),256)),n(R,{modelValue:s(r).display,"onUpdate:modelValue":t[5]||(t[5]=l=>s(r).display=l),title:"space.project.template.preview.title",desc:s(r).name,icon:"fa-regular fa-window","
1show-close":"",inset:!s(m).isMobile,"use-real-size":!1,width:s(B)(s(C)-s(T)(20),s(C)-s(T)(160))},ie({default:a(()=>[e("div",Se,[e("div",{style:re([s(N),{"transform-origin":"0 0"}]),class:"flex flex-col h-full"},[s(w)?(d(),u("div",De,[n(p,{size:"small",type:"primary",plain:"",round:"",onClick:t[2]||(t[2]=l=>w.value=!1)},{default:a(()=>[t[14]||(t[14]=e("i",{class:"fa-solid fa-arrow-left-from-line"},null,-1)),e("span",null,i(o.$t("space.project.template.window.exit")),1)]),_:1}),e("div",Ie,[e("div",Me,[t[15]||(t[15]=e("i",{class:"fa-regular fa-window"},null,-1)),e("span",null,i(s(r).name),1)]),e("div",Ve,i(o.$t("space.project.template.window.desc")),1)]),n(p,{size:"small",type:"primary",plain:"",round:"",onClick:t[3]||(t[3]=l=>("routeTo"in o?o.routeTo:s(D))(s(y)))},{default:a(()=>[t[16]||(t[16]=e("i",{class:"fa-solid fa-arrow-up-right-from-square"},null,-1)),e("span",null,i(o.$t("space.project.template.window.new")),1)]),_:1})])):j("",!0),e("iframe",{class:"w-full h-0 flex-1",ref_key:"previewRef",ref:h,src:s(y)},null,8,Be)],4)])]),_:2},[s(m).isMobile?void 0:{name:"header",fn:a(()=>[e("div",Te,[e("div",null,[e("div",ze,[t[10]||(t[10]=e("i",{class:"fa-regular fa-window"},null,-1)),e("span",null,i(o.$t("space.project.template.preview.title")),1)]),e("div",Ee,i(s(r).name),1)]),e("div",null,[n(p,{type:"primary",size:"small",round:"",plain:"",onClick:t[0]||(t[0]=l=>("routeToDownload"in o?o.routeToDownload:s(x))(s(r).download,s(r).code))},{default:a(()=>[t[11]||(t[11]=e("i",{class:"fa-solid fa-arrow-down-to-line"},null,-1)),e("span",null,i(o.$t("space.project.template.preview.download")),1)]),_:1}),n(p,{type:"primary",size:"small",round:"",plain:"",onClick:t[1]||(t[1]=l=>w.value=!0)},{default:a(()=>[t[12]||(t[12]=e("i",{class:"fa-regular fa-window"},null,-1)),e("span",null,i(o.$t("space.project.template.window.name")),1)]),_:1}),n(p,{onClick:s(M),type:"primary",size:"small",round:"",plain:""},{default:a(()=>[t[13]||(t[13]=e("i",{class:"fa-solid fa-expand"},null,-1)),e("span",null,i(o.$t("space.project.template.preview.fullscreen")),1)]),_:1},8,["onClick"])])])]),key:"0"},s(m).isMobile?{name:"footer",fn:a(()=>[n(p,{type:"primary",round:"",onClick:t[4]||(t[4]=l=>("routeTo"in o?o.routeTo:s(D))(s(y)))},{default:a(()=>[t[17]||(t[17]=e("i",{class:"fa-solid fa-arrow-up-right-from-square"},null,-1)),e("span",null,i(o.$t("space.project.template.window.new")),1)]),_:1})]),key:"1"}:void 0]),1032,["modelValue","desc","inset","width"])])]),_:1},8,["fetch-list","search-list","search-text"])}}}),Ye=ue(Fe,[["__scopeId","data-v-f22f3b6c"]]);export{Ye 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.