File: /www/server/panel/BTPanel/static/js/index43.js
import{c as V,r as i,g as v,w as et,j as B,k as L,q as o,M as P,C as ot,p as T,bR as st,y as at,L as nt,o as lt,e as h,v as w,x as F,s as it,F as rt,B as ct,aE as ut,aG as mt}from"./base-lib.js?v=1777008528";import{cZ as O,L as dt,c7 as pt,a as ft}from"./utils-lib.js?v=1777008528";import{_ as xt}from"./we-com.js?v=1777008528";import{a0 as H}from"./index3.js?v=1777008528";import{j as vt}from"./useMethods.js?v=1777008528";import"./__commonjsHelpers__.js?v=1777008528";import"./index119.js?v=1777008528";import"./index116.js?v=1777008528";const ht=["src"],gt=["src"],_t=V({__name:"index",props:{topImg:{},bottomImg:{},width:{default:"100%"},height:{default:660},aspectRatio:{},autoHeight:{type:Boolean,default:!0},fit:{default:"cover"},keepOnLeave:{type:Boolean,default:!0},className:{default:""},style:{default:()=>({})}},setup(g){const t=g,C=i(null),r=i(!1),c=i(.5),u=i(.5),a=i({x:.5,y:.5}),p=i(!1),k=i(0),D=v(()=>[t.topImg,t.bottomImg]),I=v(()=>({objectFit:t.fit})),f=i(null),_=v(()=>{var e;return(e=t.aspectRatio)!=null?e:f.value});function W(){const e=t.bottomImg||t.topImg;if(!e)return;const n=new Image;n.onload=()=>{n.naturalWidth&&n.naturalHeight&&(f.value=n.naturalWidth/n.naturalHeight)},n.src=e}function X(e,n){const m=Math.min(100,Math.max(0,e))/100,M=Math.min(100,Math.max(0,n))/100,S=(45-Math.max(-75,(M-m)*40))*Math.PI/180,j={x:Math.cos(S),y:Math.sin(S)},U=[{x:0,y:0},{x:1,y:0},{x:1,y:1},{x:0,y:1}],R=s=>(s.x-m)*j.x+(s.y-M)*j.y,z=(s,d)=>{const l=R(s),b=R(d),x=l/(l-b);return{x:s.x+(d.x-s.x)*x,y:s.y+(d.y-s.y)*x}},$=U,y=[];for(let s=0;s<$.length;s++){const d=$[s],l=$[(s+1)%$.length],b=R(d)<=0,x=R(l)<=0;b&&x?y.push(l):b&&!x?y.push(z(d,l)):!b&&x&&(y.push(z(d,l)),y.push(l))}const tt=y.map(s=>"".concat((s.x*100).toFixed(2),"% ").concat((s.y*100).toFixed(2),"%")).join(", ");return"polygon(".concat(tt,")")}function E(e){const m=e.currentTarget.getBoundingClientRect(),M=(e.clientX-m.left)/m.width,N=(e.clientY-m.top)/m.height;c.value=Math.min(1,Math.max(0,M)),u.value=Math.min(1,Math.max(0,N)),a.value={x:c.value,y:u.value}}function Y(e){r.value=!0,E(e)}function q(e){r.value&&E(e)}function G(){r.value=!1}et(()=>[t.bottomImg,t.topImg],()=>W(),{immediate:!0});function Z(){const e=(c.value+u.value)/2;k.value=e>=.5?1:0,p.value=!0}function A(){p.value=!1}const J=v(()=>r.value?{x:c.value,y:u.value}:t.keepOnLeave?a.value:{x:1,y:1}),K=v(()=>({width:typeof t.width=="number"?"".concat(t.width,"px"):t.width,height:t.autoHeight!==!1&&_.value?void 0:typeof t.height=="number"?"".concat(t.height,"px"):t.height,aspectRatio:t.autoHeight!==!1&&_.value?"".concat(_.value," / 1"):void 0,position:"relative",overflow:"hidden",borderRadius:"12px",...t.style})),Q=v(()=>{const e=J.value;return{clipPath:X(e.x*100,e.y*100),transition:r.value?"none":"clip-path 120ms ease"}});return(e,n)=>(B(),L("div",{ref_key:"wrapRef",ref:C,class:nt(["lr-mask-wrap",g.className]),style:P(K.value),onMouseenter:Y,onMousemove:q,onMouseleave:G,onClick:Z},[o("img",{src:g.bottomImg,class:"lr-mask-bottom",style:P(I.value)},null,12,ht),o("img",{src:g.topImg,class:"lr-mask-top",style:P([I.value,Q.value])},null,12,gt),p.value?(B(),ot(T(st),{key:0,class:"autofix-image-viewer",teleported:"","zoom-rate":1,"url-list":D.value,"initial-index":k.value,"hide-on-click-modal":!0,onClose:A},null,8,["url-list","initial-index"])):at("",!0)],38))}}),yt=O(_t,[["__scopeId","data-v-1c2ad00d"]]),bt={class:"p-16px"},wt={class:"py-52px flex justify-center flex-col items-center"},kt={class:"flex mb-16px justify-center"},It={class:"text-center mb-40px"},Mt={class:"w-76% rounded-base overflow-hidden"},Rt={class:"rounded-base overflow-hidden text-0"},$t=V({__name:"index",setup(g){const{refs:{settingData:t}}=dt(),C=[["应用商店","appstore"],["总览","conmanger"],["网站","dockersite"],["容器","container"],["线上镜像","cloudimages"],["本地镜像","images"],["容器编排","orchestration"],["网络","network"],["存储卷","storage"],["仓库","warehouse"],["设置","setting"]],r=async()=>{if(t.value.installing){H();return}else vt()},c=(u,a)=>"https://www.bt.cn/Public/new/plugin/dockermode/".concat(u,"-").concat(a,".png");return lt(async()=>{t.value.installing===1&&H()}),(u,a)=>{const p=pt,k=ft,D=ut,I=mt;return B(),L("div",bt,[o("div",wt,[a[3]||(a[3]=o("div",{class:"mb-12px text-center text-subtitleLarge font-bold"},"宝塔Docker模块",-1)),o("div",kt,[a[2]||(a[2]=o("div",{class:"text-center text-base mr-[10px] color-desc text-tertiary"},"可视化Docker模块,提供图形用户界面,能够以更直观的方式管理和操作Docker容器",-1)),h(p,{href:"https://www.bt.cn/new/wechat_customer",class:"!text-base mr-[10px]"},{default:w(()=>[...a[0]||(a[0]=[o("img",{src:xt,class:"w-[16px] h-[16px]"},null,-1),o("span",null,"联系客服",-1)])]),_:1}),h(p,{href:"https://www.bt.cn/bbs/thread-141215-1-1.html",class:"!text-base mr-[4px]"},{default:w(()=>[...a[1]||(a[1]=[F(">> 使用文档",-1)])]),_:1})]),a[4]||(a[4]=o("div",{class:"mb-16px"},[o("ul",{class:"ul-style"},[o("li",null,"一键部署应用"),o("li",null,"Docker快速建站"),o("li",null,"容器管理"),o("li",null,"容器编排")])],-1)),o("div",It,[h(k,{type:"primary",size:"large",class:"!text-medium w-[140px]",onClick:r},{default:w(()=>[F(it(T(t).installing?"正在安装...":"立即安装"),1)]),_:1})]),o("div",Mt,[h(I,{"tab-position":"left",class:"carousel"},{default:w(()=>[(B(),L(rt,null,ct(C,(f,_)=>h(D,{label:f[0],lazy:"",key:_},{default:w(()=>[o("div",Rt,[h(yt,{topImg:c(f[1],"white"),bottomImg:c(f[1],"black")},null,8,["topImg","bottomImg"])])]),_:2},1032,["label"])),64))]),_:1})])])])}}}),jt=O($t,[["__scopeId","data-v-feeda76b"]]);export{jt as default};