1import{d as e,Q as s,m as l,B as a,a0 as i,a7 as n,o as t,c,b as o,w as r,K as p,V as d,L as u,t as g,y as h,s as v,D as y,a as m,q as k,F as w,p as f,A as x,$ as b}from"./inertia-d40fdd82.js";import{u as B}from"./buildercomponents-5bad979b.js";import{a as P}from"./_plugin-vue_export-helper-f51aa658.js";const _={id:"plans",class:"plans-section py-5"},C={class:"container px-3 px-lg-0 mx-auto pt-lg-3"},I={class:"section-head"},S={class:"section-head-text col-lg-9"},R={key:0,class:"plans-title"},M=["innerHTML"],U={key:0,class:"plans-rating"},V={class:"stars","aria-hidden":"true"},j={class:"rating-text"},A={key:0,class:"plans-wrap position-relative"},F={key:0,class:"popular-ribbon"},T={class:"plan-head"},W={class:"plan-name"},$={class:"save-pill"},D={class:"plan-price"},L={class:"amount"},N={class:"normally"},q={class:"old-price"},E={class:"plan-price"},H={class:"amount"},O={class:"plan-specs px-4"},G={key:0},J={class:"spec-value"},K={key:1},Q={class:"spec-value"},z={key:2},X={class:"spec-value"},Y={key:3},Z={class:"spec-value"},ee={key:0,class:"tooltip-icon"},se={key:1,class:"spec-note"},le={key:4},ae={class:"spec-value"},ie={key:5},ne={class:"spec-value"},te={class:"plan-foot"},ce=["href","onClick"],oe=P(e({__name:"BuilderVpsPlans2",props:{sectionTitle:{},sectionDescription:{},gId:{},monthlyBillingCycle:{},schemaTitle:{},schemaImage:{},recommendedPlan:{},hideRating:{type:Boolean}},setup(e){const P=e,oe=B(),re=s("rate"),pe=s("slug","string"),de=s("products",null),ue=null==de?void 0:de[P.gId],ge=l((null==ue?void 0:ue.length)?ue:null),he=l(null),ve=a((()=>{var e;return((null==(e=ge.value)?void 0:e.length)??0)>4})),ye=l(null),me=e=>{const s=ye.value;if(!s)return;const l=s.querySelector('[class*="col-"]'),a=l?l.offsetWidth:.8*s.clientWidth;s.scrollBy({left:e*a,behavior:"smooth"})},ke=()=>{he.value=JSON.stringify({"@context":"https://schema.org","@type":"Product",name:P.schemaTitle,url:"https://1gbits.com/"+pe+"/",description:P.sectionDescription.replace(/(<([^>]+)>)/gi,""),image:P.schemaImage||oe.value,offers:{"@type":"AggregateOffer",offerCount:ge.value.length,priceCurrency:"USD",lowPrice:Math.min(...ge.value.map((e=>e.prices.triennially&&!P.monthlyBillingCycle?(e.prices.triennially/36).toFixed(2):e.prices.monthly))).toFixed(2),highPrice:Math.max(...ge.value.map((e=>e.prices.triennially&&!P.monthlyBillingCycle?(e.prices.triennially/36).toFixed(2):e.prices.monthly))).toFixed(2),availability:"https://schema.org/InStock",url:"https://1gbits.com/"+pe+"/"},aggregateRating:{"@type":"AggregateRating",ratingCount:re.count,ratingValue:re.average,bestRating:"5",worstRating:"1"},brand:{"@type":"Brand",name:"1gbits"}})},we=async()=>{try{const e=await b.get(`https://1gbits.com/api/get-products?gid=${P.gId}`);ge.value=e.data,ke()}catch(e){ge.value=null}},fe=e=>String(e??"").replace(/^[\s:]+/,""),xe=e=>{const s=fe(e).match(/\(([^)]*)\)\s*$/);return s?s[1].replace(/\s*,\s*/g," & "):""},be=e=>{const s=String(e??"");return s.includes("Unlimited (Europe, USA)")||s.includes("Unlimited(Europe)")},Be=e=>Math.floor((e.prices.monthly-e.prices.triennially/36)/e.prices.monthly*100);return i((()=>P.gId),((e,s)=>{we()})),ge.value?ke():we(),n((async()=>{ge.value||await we()})),(e,s)=>(t(),c(w,null,[o(v(y),null,{default:r((()=>[ge.value?(t(),p(d("script"),{key:0,type:"application/ld+json"},{default:r((()=>[u(g(he.value),1)])),_:1})):h("",!0)])),_:1}),m("section",_,[m("div",C,[m("div",I,[m("div",S,[e.sectionTitle?(t(),c("h2",R,g(e.sectionTitle),1)):h("",!0),m("div",{class:"plans-intro",innerHTML:e.sectionDescription},null,8,M)]),e.hideRating?h("",!0):(t(),c("div",U,[m("div",V,[m("i",{class:k(["icon text-yellow",v(re).average>0?"icon-star":"icon-star-stroke"])},null,2),m("i",{class:k(["icon text-yellow",v(re).average>1?"icon-star":"icon-star-stroke"])},null,2),m("i",{class:k(["icon text-yellow",v(re).average>2?"icon-star":"icon-star-stroke"])},null,2),m("i",{class:k(["icon text-yellow",v(re).average>3?"icon-star":"icon-star-stroke"])},null,2),m("i",{class:k(["icon text-yellow",v(re).average>4?"icon-star":"icon-star-stroke"])},null,2)]),m("span",j,"Rating "+g(v(re).average)+" · "+g(v(re).count)+" reviews",1)]))]),ge.value&&ge.value.length>
10?(t(),c("div",A,[ve.value?(t(),c("button",{key:0,type:"button",class:"scroll-btn scroll-prev","aria-label":"Previous plans",onClick:s[0]||(s[0]=e=>me(-1))},s[2]||(s[2]=[m("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[m("polyline",{points:"15 18 9 12 15 6"})],-1)]))):h("",!0),ve.value?(t(),c("button",{key:1,type:"button",class:"scroll-btn scroll-next","aria-label":"Next plans",onClick:s[1]||(s[1]=e=>me(1))},s[3]||(s[3]=[m("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[m("polyline",{points:"9 18 15 12 9 6"})],-1)]))):h("",!0),m("div",{ref_key:"scroller",ref:ye,class:k(["row g-3 mt-4",{"plans-scroll":ve.value}])},[(t(!0),c(w,null,f(ge.value,((l,a)=>{var i,n,o;return t(),c("div",{key:a,class:"col-12 col-md-6 col-xl"},[m("div",{class:k(["plan-card",{"is-popular":P.recommendedPlan==a+1}])},[P.recommendedPlan==a+1?(t(),c("div",F,"Most Popular")):h("",!0),m("div",T,[m("h3",W,g(l.name),1),l.prices.triennially&&!e.monthlyBillingCycle?(t(),c(w,{key:0},[m("span",$,"Save "+g(Be(l))+" %",1),m("p",D,[m("span",L,"$"+g((l.prices.triennially/36).toFixed(2)),1),s[4]||(s[4]=m("span",{class:"per"},"/mo",-1))]),s[6]||(s[6]=m("p",{class:"billing-cycle"},"Billed for 36 months",-1)),m("p",N,[s[5]||(s[5]=u(" Normally ")),m("span",q,"$"+g(l.prices.monthly),1)])],64)):l.prices.monthly?(t(),c(w,{key:1},[m("p",E,[m("span",H,"$"+g(l.prices.monthly),1),s[7]||(s[7]=m("span",{class:"per"},"/mo",-1))]),s[8]||(s[8]=m("p",{class:"billing-cycle"},"Billed monthly",-1))],64)):h("",!0)]),m("ul",O,[l.description.CPU?(t(),c("li",G,[s[9]||(s[9]=m("span",{class:"spec-label"},[m("span",{class:"icon icon-check-circle","aria-hidden":"true"}),u("CPU")],-1)),m("span",J,g(fe(l.description.CPU)),1)])):h("",!0),l.description.RAM?(t(),c("li",K,[s[10]||(s[10]=m("span",{class:"spec-label"},[m("span",{class:"icon icon-check-circle","aria-hidden":"true"}),u("RAM")],-1)),m("span",Q,g(fe(l.description.RAM)),1)])):h("",!0),l.description.Storage&&(null==(i=l.description.Storage)?void 0:i.length)>0?(t(),c("li",z,[s[11]||(s[11]=m("span",{class:"spec-label"},[m("span",{class:"icon icon-check-circle","aria-hidden":"true"}),u("Storage")],-1)),m("span",X,g(fe(l.description.Storage)),1)])):h("",!0),l.description.BW?(t(),c("li",Y,[s[13]||(s[13]=m("span",{class:"spec-label"},[m("span",{class:"icon icon-check-circle","aria-hidden":"true"}),u("Bandwidth")],-1)),m("span",Z,[u(g((o=l.description.BW,fe(o).replace(/\s*\([^)]*\)\s*$/,"")))+" ",1),be(l.description.BW)?(t(),c("span",ee,s[12]||(s[12]=[x('<svg class="align-middle" xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" data-v-05ef5f97><circle cx="12" cy="12" r="10" data-v-05ef5f97></circle><line x1="12" y1="16" x2="12" y2="12" data-v-05ef5f97></line><line x1="12" y1="8" x2="12" y2="8" data-v-05ef5f97></line></svg><span class="tooltip-text" data-v-05ef5f97>Under Fair Usage Policies!</span>',2)]))):h("",!0),xe(l.description.BW)?(t(),c("small",se,g(xe(l.description.BW)),1)):h("",!0)])])):h("",!0),l.description.IP_V4?(t(),c("li",le,[s[14]||(s[14]=m("span",{class:"spec-label"},[m("span",{class:"icon icon-check-circle","aria-hidden":"true"}),u("IP V4")],-1)),m("span",ae,g(fe(l.description.IP_V4)),1)])):h("",!0),l.description.IP_V6?(t(),c("li",ie,[s[15]||(s[15]=m("span",{class:"spec-label"},[m("span",{class:"icon icon-check-circle","aria-hidden":"true"}),u("IP V6")],-1)),m("span",ne,g(fe(l.description.IP_V6)),1)])):h("",!0)]),m("div",te,[m("a",{class:"plan-cta",href:(n=l.pid,n?"https://dashboard.1gbits.com/deploy/vps?pid="+n:"https://dashboard.1gbits.com/deploy/vps"),target:"_blank",rel:"noopener",onClick:e=>(e=>{var s;null==(s=window.dataLayer)||s.push({event:"plan_cta_click",plan_pid:e,page_path:window.location.pathname})})(l.pid)},"Start Now",8,ce)])],2)])})),128))],2)])):h("",!0)])])],64))}}),[["__scopeId","data-v-05ef5f97"]]);export{oe 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.