1import{ba as U,bH as N,bI as O,cx as R,u as q,aK as E,i as A,U as M,o as F,f as c,j as f,l as C,w as o,k as n,v as H,H as K,p as I,q as p,I as Q,A as W,n as m,t as y,h as l,X,s as k,z as Y,g as V,F as J,D as Z,V as S,m as ee,cA as te,M as d,L as se,O as ae}from"./DkI6cOfr.js";import{V as oe}from"./d5_k1qoq.js";import{V as le}from"./LzkyKzjq.js";(function(){try{var u=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new u.Error().stack;a&&(u._sentryDebugIds=u._sentryDebugIds||{},u._sentryDebugIds[a]="a2206efb-667f-44b1-bb59-a035f15944bf",u._sentryDebugIdIdentifier="sentry-dbid-a2206efb-667f-44b1-bb59-a035f15944bf")}catch{}})();const ne={class:"d-flex justify-space-between align-center mt-4 mb-4"},re={class:"text-muted text-15"},ie={class:"text-darkBlue"},ce={class:"d-flex pt-2"},de={key:0,class:"text-warning"},ue={class:"d-flex align-center justify-space-between"},pe={class:"resLabel text-caption text-medium-emphasis"},me=U({__name:"PlanSection",setup(u){const a=N(),r=O(),b=R(),w=q(),B=E(),v=A("showSnackbar"),g=se(!0),h=d({get:()=>r.selectedPlan,set:e=>{a.selectPlanByIndex(e)}}),x=d(()=>a.selectedPlan),D=d(()=>Object.values(a.product?.configoptions||{}).some(e=>e.setting==="backups")),T=d(()=>Object.values(a.product?.configoptions||{}).some(e=>e.setting==="snapshots")),$=d(()=>a.isPromoDisabled),_=d(()=>(x.value?.client??0)>0),j=d(()=>{const e=x.value;return e?[{key:"cpu",label:"CPU vCores",value:e.cpu,unit:`vCore${(e.cpu??0)>1?"s":""}`,displayValue:`${e.cpu} vCore${(e.cpu??0)>1?"s":""}`,visible:!0},{key:"ram",label:"Memory",value:e.ram,unit:"GB",displayValue:`${e.ram} GB`,visible:!0},{key:"storage",label:"Storage",value:e.disk,unit:"GB",displayValue:`${e.disk} GB`,visible:!0},{key:"backups",label:"Backups",value:e.backups,displayValue:`${e.backups}`,visible:!!(e.backups&&D.value)},{key:"snapshots",label:"Snapshots",value:e.snapshots,displayValue:`${e.snapshots}`,visible:!!(e.snapshots&&T.value)},{key:"bandwidth",label:"Bandwidth",value:e.bandwidth,unit:"GB",isUnlimited:g.value,hasTooltip:g.value,tooltipText:"Subject to fair usage policy",displayValue:g.value?"Unlimited":`${e.bandwidth} GB`,visible:!0}].filter(t=>t.visible):[]}),z=()=>{const e=w.query.plan;if(!e)return;const s=e.toLowerCase().trim();if(!s)return;const t=a.plans;if(!t?.length)return;const i=t.findIndex(L=>L.name?.toLowerCase()===s),G=t[i];i>=0&&G?a.selectPlanByIndex(i):v?.("Plan not found","error");const P={...w.query};delete P.plan,B.replace({query:P})};return M(()=>$.value,async e=>{if(e){const i=r.promoCode||b.promoData?.code;i&&(r.stashPromoCode(i),b.clearPromo(),r.setPromoCode(""),v?.("Promotions not available for this plan","error"));return}const s=r.stashedPromoCode;if(!s||b.promoData||b.promoLoading)return;const t=await b.applyPromoCode(s);t.ok?r.setPromoCode(s):v?.(t.message||"Promo no longer valid","error"),r.clearStashedPromo()}),F(()=>{z();const e=a.plans;if(e?.length&&r.selectedID===0){const s=e.findIndex(i=>i.id===a.selectedPlanId),t=s>=0?s:0;a.selectPlanByIndex(t)}}),(e,s)=>(c(),f(C,null,{default:o(()=>[n(S,{cols:"12"},{default:o(()=>[n(H,null,{default:o(()=>[n(K,{class:"d-flex align-center"},{default:o(()=>[n(I,{class:"mr-2",size:"32px"},{default:o(()=>[...s[1]||(s[1]=[p(" $planIcon ",-1)])]),_:1}),s[2]||(s[2]=p(" Choose your plan ",-1))]),_:1}),n(Q),n(W,{class:"pt-4"},{default:o(()=>[m("div",ne,[m("span",re,[s[4]||(s[4]=p(" Selected Plan: ",-1)),m("strong",ie,[p(y(l(a).product?.name)+" - "+y(l(x)?.name)+" ",1),l(_)?(c(),f(X,{key:0,size:"x-small",class:"mt-n1 ml-2",variant:"elevated",label:"",color:"warning"},{default:o(()=>[...s[3]||(s[3]=[p(" Custom ",-1)])]),_:1})):k("",!0)])])]),n(oe,{modelValue:l(h),"onUpdate:modelValue":s[0]||(s[0]=t=>Y(h)?h.value=t:null),"thumb-color":l(_)?"warning":"primary",color:l(_)?"warning":"primary","track-color":"grey-lighten-2","track-fill-color":"grey-darken-3",class:"mb-6","track-size":"8","tick-labels":l(a).plans,max:(l(a).plans?.length||1)-1,step:"1","tick-size":"7","show-ticks":"always","hide-details":""},{"tick-label":o(({tick:t})=>[m("span",ce,[p(y(l(a).plans?.[t.value]?.name)+" ",1),(l(a).plans?.[t.value]?.client??0)>0?(c(),V("p",de," * ")):k("",!0)])]),_:1},8,["modelValue","thumb-color","color","tick-labels","max"]),n(C,{class:"mt-2"},{default:o(()=>[(c(!0),V(J,null,Z(l(j),t=>(c(),f(S,{key:t.key,cols:"12",sm:"6",md:"3"},{default:o(()=>[n(ee,{border:"",rounded:"lg",class:"pa-4 w-100"},{default:o(()=>[t.hasTooltip?(c(),f(le,{key:0,activator:"parent",location:"bottom",text:t.tooltipText},null,8,["text"])):k("",!0),m("div",ue,[n(te,{mode:"out-in"},{default:o(()=>[(c(),V("strong",{key:t.displayValue,class:"resCount text-body-1 font-weight-medium pb-2"},y(t.displayValue),1))]),_:2},1024),t.hasTooltip?(c(),f(I,{key:0,color:"blackAccent",icon:"$infoIcon",size:"32px",class:"mt-2 mb-n2"})):k("",!0)]),m("span",pe,y(t.label),1)]),_:2},1024)]),_:2},1024))),128))]),_:1})]),_:1})]),_:1})]),_:1})]),_:1}))}}
1),ke=Object.assign(ae(me,[["__scopeId","data-v-af48e739"]]),{__name:"CheckoutPlanSection"});export{ke 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.