1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[542],{95118:function(e,r,t){var s=t(85893),l=t(15201),i=t(22054),a=t(50036),n=t(45697),c=t.n(n),o=t(67294);let SortIndicator=e=>{let{direction:r}=e;return(0,s.jsxs)("span",{className:"flex flex-col",children:[(0,s.jsx)(l.Z,{className:(0,a.cn)("-mb-1",{"text-gray-900":"asc"===r}),icon:"chevron-up",size:"xs"}),(0,s.jsx)(l.Z,{className:(0,a.cn)({"text-gray-900":"desc"===r}),icon:"chevron-down",size:"xs"})]})},CloudPricingTable=e=>{let{columns:r,rowKey:t=e=>e.name,rows:l,wrap:n=!1}=e,[c,d]=(0,o.useState)(null),m=(0,o.useMemo)(()=>new Map(r.filter(e=>e.sort).map(e=>[e.key,e.sort])),[r]),toggleSort=e=>d(r=>(null==r?void 0:r.key)===e?{direction:"asc"===r.direction?"desc":"asc",key:e}:{direction:"asc",key:e}),p=(0,o.useMemo)(()=>{let e=c&&m.get(c.key);return e?[...l].sort((r,t)=>{let s=e(r)-e(t);return"asc"===c.direction?s:-s}):l},[l,c,m]),[u,...h]=r,x=r.some(e=>e.width),renderLabel=e=>{let r=e.sort?(0,s.jsxs)("button",{className:"flex gap-1 items-center",onClick:()=>toggleSort(e.key),type:"button",children:[e.label,(0,s.jsx)(SortIndicator,{direction:(null==c?void 0:c.key)===e.key?c.direction:null})]}):e.label;return e.tooltip?(0,s.jsxs)("span",{className:"flex gap-1.5 items-center",children:[r,(0,s.jsx)(i.Z,{tooltip:e.tooltip,children:e.label})]}):r};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:"border border-gray-200 hidden overflow-x-auto shadow-sm md:block",children:(0,s.jsxs)("table",{className:(0,a.cn)("text-sm w-full",n?"whitespace-normal":"whitespace-nowrap",x&&"table-fixed"),children:[x&&(0,s.jsx)("colgroup",{children:r.map(e=>(0,s.jsx)("col",{style:e.width?{width:e.width}:void 0},e.key))}),(0,s.jsx)("thead",{className:"bg-gray-50",children:(0,s.jsx)("tr",{className:"border-b border-gray-200 text-gray-500 text-left",children:r.map(e=>(0,s.jsx)("th",{className:(0,a.cn)("pr-6 first:pl-6",n?"py-4":"h-16"),children:renderLabel(e)},e.key))})}),(0,s.jsx)("tbody",{className:"bg-white",children:p.map(e=>(0,s.jsx)("tr",{className:"border-b border-gray-100 text-gray-600",children:r.map(r=>(0,s.jsx)("td",{className:(0,a.cn)("pr-6 first:font-medium first:pl-6 first:text-gray-900",n?"align-top py-5":"h-[72px]"),children:r.render?r.render(e):e[r.key]},r.key))},t(e)))})]})}),(0,s.jsx)("ul",{className:"space-y-4 md:hidden",children:p.map(e=>(0,s.jsxs)("li",{className:"bg-white border border-gray-200 divide-y divide-gray-100 shadow-sm",children:[(0,s.jsx)("p",{className:"bg-gray-50 font-semibold px-6 py-4 text-gray-900",children:u.render?u.render(e):e[u.key]}),(0,s.jsx)("dl",{className:"divide-y divide-gray-100",children:h.map(r=>(0,s.jsxs)("div",{className:"flex gap-4 items-start justify-between px-6 py-4",children:[(0,s.jsx)("dt",{className:"text-gray-500",children:renderLabel(r)}),(0,s.jsx)("dd",{className:"text-gray-600 text-right",children:r.render?r.render(e):e[r.key]})]},r.key))})]},t(e)))})]})};CloudPricingTable.propTypes={columns:c().arrayOf(c().shape({key:c().string.isRequired,label:c().node.isRequired,render:c().func,sort:c().func,tooltip:c().node,width:c().string})).isRequired,rowKey:c().func,rows:c().arrayOf(c().object).isRequired,wrap:c().bool},r.Z=CloudPricingTable},542:function(e,r,t){var s=t(85893),l=t(95118),i=t(85956),a=t(69062),n=t(6828),c=t(50036),o=t(11901),d=t(67294),m=t(49210),p=t(74307);let getPrice=e=>{var r,t;let s=(null===(t=e.pricing)||void 0===t?void 0:null===(r=t[0])||void 0===r?void 0:r.prices)||[],l=s.find(e=>{var r,t;return(null===(t=e.currency)||void 0===t?void 0:null===(r=t.iso_code)||void 0===r?void 0:r.toUpperCase())===o.Aq.TU.toUpperCase()});return(null==l?void 0:l.price)||0},getTotalPrice=(e,r)=>getPrice(e)+r*e.storage_in_gb,formatHourly=e=>(0,c.T4)(e/n.zH,{fractionDigits:4,strip:!1}),formatTransfer=e=>e?e>=1024?"".concat((e/1024).toFixed(2),"TB"):"".concat(e,"GB"):"-",buildColumns=(e,r)=>[{key:"name",label:"Package"},{key:"memory",label:"Memory",render:e=>"".concat(e.memory_in_gb,"GB")},{key:"cpu",label:"dedicated"===e?"Dedicated vCPU":"vCPU",render:e=>e.cpu_cores,tooltip:"The number of virtual CPU cores included with this package."},{key:"storage",label:"Storage",render:e=>"".concat(e.storage_in_gb,"GB"),tooltip:"The amount of SSD block storage included with this package."},{key:"transfer",label:"Transfer",render:e=>formatTransfer(e.monthly_bandwidth_allowance_in_gb),tooltip:"The amount of outbound data transfer included each month."},{key:"price",label:"Price",render:e=>{let t=getTotalPrice(e,r);return(0,s.jsxs)("span",{className:"flex flex-col",children:[(0,s.jsxs)("span",{className:"font-medium",children:[(0,c.T4)(t,{strip:!1}),"/mo"]}),(0,s.jsxs)("span",{children:[formatHourly(t),"/hr"]})]})},sort:e=>getTotalPrice(e,r)}];r.Z=e=>{let{center:r=!0,id:t,lead:n,packages:o=[],preheading:u,storagePrice:h=0,title:x}=e,[g,y]=(0,d.useState)("regular"),f=o.filter(e=>!e.use_dedicated_cpus),b=o.filter(e=>e.use_dedicated_cpus),j=b.length>0,w="dedicated"===g?b:f,v=(0,d.useMemo)(()=>buildColumns(g,h),[g,h]);return(0,s.jsxs)(i.ZP,{className:r?"space-y-12 md:space-y-16":"space-y-8",id:t,children:[(0,s.jsx)(a.ZP,{center:r,className:(0,
1c.cn)({"!px-0":!r}),title:(0,s.jsx)(a.ZP.Title,{children:x}),...n?{lead:(0,s.jsx)(a.ZP.Lead,{children:n})}:{},...u?{preheading:(0,s.jsx)(a.ZP.Preheading,{children:u})}:{}}),(0,s.jsxs)("div",{className:(0,c.cn)("space-y-8",{"md:space-y-12":r}),children:[j&&(0,s.jsxs)("div",{className:(0,c.cn)("flex flex-col gap-x-6 gap-y-4 sm:flex-row sm:items-center",{"items-center justify-center":r}),children:[(0,s.jsx)(p.Z,{size:"md",tag:"p",children:"CPU Options:"}),(0,s.jsxs)("div",{className:(0,c.cn)("flex gap-2 items-center",{"justify-center":r}),children:[(0,s.jsx)(m.ZP,{className:"flex-1",onClick:()=>y("regular"),size:"sm",type:"button",variant:"regular"===g?"primary":"secondarycolor",children:"Regular"}),(0,s.jsx)(m.ZP,{className:"flex-1",onClick:()=>y("dedicated"),size:"sm",type:"button",variant:"dedicated"===g?"primary":"secondarycolor",children:"Dedicated"})]})]}),(0,s.jsx)(l.Z,{columns:v,rowKey:e=>e.name,rows:w})]})]})}},22054:function(e,r,t){t.d(r,{R:function(){return m}});var s=t(85893),l=t(45697),i=t.n(l),a=t(67294),n=t(15201),c=t(66291),o=t(84750),d=t(50036);let m=(0,a.forwardRef)((e,r)=>{let{children:t="More info",tooltip:l,className:i,...m}=e;return(0,s.jsx)(o.ZP,{tooltip:(0,s.jsx)(c.Z,{..."string"==typeof l||(0,a.isValidElement)(l)?{children:l}:l}),children:(0,s.jsxs)("button",{className:(0,d.cn)("block text-gray-400 h-4 shrink-0 w-4 hover:text-gray-600 active:scale-105",i),ref:r,type:"button",...m,children:[(0,s.jsx)(n.Z,{icon:"help-circle",size:"sm"}),(0,s.jsx)("span",{className:"sr-only",children:t})]})})});m.displayName="InfoButton",m.propTypes={children:i().node,className:i().string},r.Z=a.memo(m)},66291:function(e,r,t){t.d(r,{u:function(){return Tooltip}});var s=t(85893),l=t(45697),i=t.n(l),a=t(79732),n=t(50036),c=t(12003);let o=(0,c.j)("w-max z-20",{defaultVariants:{size:"md"},variants:{size:{sm:"sm:max-w-min sm:min-w-[12rem]",md:"sm:max-w-xs"}}}),Tooltip=e=>{let{center:r,children:t,size:l,title:i,...c}=e;return(0,s.jsx)("div",{className:(0,n.cn)("bg-gray-900 max-w-[calc(100vw-32px)] p-3 rounded-lg text-white whitespace-normal",o({size:l}),{"balance py-2":null==i}),...c,children:(0,s.jsxs)("div",{className:(0,n.cn)("flex flex-col gap-y-1",{"items-center text-center":r||null==r&&null==i}),children:[i&&(0,s.jsx)(a.Z,{size:"xs",weight:"semibold",children:i}),(0,s.jsx)(a.Z,{size:"xs",tag:"div",weight:null==i?"semibold":"medium",children:t})]})})};Tooltip.propTypes={center:i().bool,children:i().node,title:i().node},r.Z=Tooltip},84750:function(e,r,t){t.d(r,{u:function(){return p.u}});var s=t(85893),l=t(45697),i=t.n(l),a=t(13072),n=t(85983),c=t(58463),o=t(66037),d=t(67294),m=t(50036),p=t(66291);let u=Object.freeze({gap:4,height:6,width:16}),Tooltipped=e=>{let{children:r,open:t=!1,placement:l="top",tooltip:i}=e,p=(0,d.useRef)(null),[h,x]=(0,d.useState)(t);(0,d.useEffect)(()=>{x(t)},[t]);
1let{context:g,floatingStyles:y,refs:f}=(0,a.YF)({middleware:[(0,n.cv)(u.gap+u.height),(0,n.RR)({fallbackAxisSideDirection:"start"}),(0,n.uY)(),(0,c.x7)({element:p})],placement:l,onOpenChange:e=>!t&&x(e),open:h,whileElementsMounted:o.Me}),b=(0,a.eS)(g),j=(0,a.bQ)(g),w=(0,a.KK)(g),v=(0,a.XI)(g),N=(0,a.qs)(g,{role:"tooltip"}),{getFloatingProps:k,getReferenceProps:T}=(0,a.NI)([j,w,v,b,N]),P=d.Children.only(r);return(0,s.jsxs)(s.Fragment,{children:[(0,d.cloneElement)(P,{...P.props,ref:f.setReference,...T()}),h&&(0,s.jsxs)("div",{className:(0,m.cn)("z-30 sm:max-w-xs max-w-[calc(100vw-32px)]"),ref:f.setFloating,style:y,...k(),children:[(0,s.jsx)(a.Y$,{className:"fill-gray-900",context:g,height:u.height,ref:p,width:u.width}),i]})]})};Tooltipped.propTypes={children:i().node,permanent:i().bool,tooltip:i().node.isRequired},r.ZP=Tooltipped},6828:function(e,r,t){t.d(r,{zH:function(){return s}}),t(11901);let s=730}}]);
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.