PageSourceSearch

https://aiven.io/remix-chunks/acu-kafka-calculator-Cz00Av2o.js

js aiven.io collected 2026-09-24 08:42:53 UTC 7,662 bytes, 12 lines download raw bytes

1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["remix-chunks/accordion-h3UzN4IZ.js","remix-chunks/typography-C5LMSFAT.js","remix-chunks/lodash-DoHr7-26.js","remix-chunks/index-DwOcx85B.js","remix-chunks/button-BhJu3BAA.js","remix-chunks/chunk-4ZMWKKQ3-DUC2OUNA.js","remix-chunks/misc-bYcQwmo8.js","remix-chunks/site-CNjt5fhN.js","remix-chunks/index-DAQ2EKXp.js","remix-chunks/index-BHMilhH0.js","remix-chunks/image-QydxE1Ws.js"])))=>i.map(i=>d[i]);
2import{j as e,r as n}from"./typography-C5LMSFAT.js";import{S as C,a as g}from"./StreamingCalculatorSlider-00-rwfQN.js";import{D as v}from"./divider-YGsrq6Ny.js";import{I as k,B as T,v as E}from"./button-BhJu3BAA.js";import{_ as R}from"./preload-helper-q99iadPR.js";import{f as _}from"./skeleton-2lT-3jZm.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};s.SENTRY_RELEASE={id:"bb7bd624a8a3321ff6d1587f421551039a69f342"}}catch{}})();try{(function(){var s=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new s.Error().stack;o&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[o]="39296f2f-b067-4c29-a4e7-6c8c6b579b31",s._sentryDebugIdIdentifier="sentry-dbid-39296f2f-b067-4c29-a4e7-6c8c6b579b31")})()}catch{}var h=(s=>(s.SAAS="SAAS",s.BYOC="Bring Your Own Cloud",s))(h||{}),A=(s=>(s.AWS="AWS",s.GCP="GCP",s.AZURE="Azure",s))(A||{}),r=(s=>(s.UpTo1="1 Mb/s",s.UpTo5="5 Mb/s",s.UpTo10="10 Mb/s",s.Custom="Custom",s))(r||{});function B({deploymentType:s,cloudType:o,throughputRate:c,produceRate:l,consumeRate:d,retentionDays:u,trafficAlloc:m,onDeploymentTypeChange:t,onCloudTypeChange:p,onThroughputRateChange:x,onProduceRateChange:j,onConsumeRateChange:f,onRetentionDaysChange:y,onTrafficAllocChange:b}){return e.jsxs("div",{children:[e.jsx("div",{className:"my-6 ml-6",children:e.jsx(C,{legend:"Deployment type",name:"deployment_type",value:s,onChange:(i,a)=>t(a),options:[{value:"SAAS",label:"SAAS"},{value:"Bring Your Own Cloud",label:"Bring Your Own Cloud"}]})}),e.jsx("div",{className:"my-6 ml-6",children:e.jsx(C,{legend:"Cloud",name:"cloud",value:o,onChange:(i,a)=>p(a),options:[{icon:"aws",value:"AWS",label:"AWS"},{icon:"gcp",value:"GCP",label:"GCP"},{icon:"azure",value:"Azure",label:"Azure"}]})}),e.jsx("div",{className:"m-6",children:e.jsx(C,{legend:"Throughput rate",name:"throughput_rate",value:c,onChange:(i,a)=>x(a),options:[{value:"1 Mb/s",label:"1 Mb/s"},{value:"5 Mb/s",label:"5 Mb/s"},{value:"10 Mb/s",label:"10 Mb/s"},{value:"Custom",label:"Custom"}]})}),c==="Custom"&&e.jsxs(e.Fragment,{children:[e.jsx(v,{size:"layout3"}),e.jsxs("div",{className:"mx-6 grid grid-cols-2 gap-6 pb-3",children:[e.jsx("div",{className:"col-1 row-1",children:e.jsx(g,{label:"Produce rate",unit:"MB/sec",name:"produce_mibs_rate",onChange:(i,a)=>j(a),ticks:[1,50,100],min:1,max:100,step:1,value:l,thumbColor:"green",trackColorStart:"#5FFA74",trackColorEnd:"#5FFA74"})}),e.jsx("div",{className:"col-2 row-1",children:e.jsx(g,{label:"Consume rate",unit:"MB/sec",name:"consume_mibs_rate",onChange:(i,a)=>f(a),ticks:[1,50,100],min:1,max:100,step:1,value:d,thumbColor:"green",trackColorStart:"#5FFA74",trackColorEnd:"#5FFA74"})}),e.jsx("div",{className:"col-1 row-2",children:e.jsx(g,{label:"Retention",unit:"days",name:"produce_mibs_rate",onChange:(i,a)=>y(a),ticks:[1,15,30],min:1,max:30,step:1,value:u,thumbColor:"orange",trackColorStart:"#5FFA74",trackColorEnd:"#5FFA74"})})]}),e.jsx(v,{size:"layout3"}),e.jsx("div",{className:"mx-6 mb-6",children:e.jsx("div",{className:`
3								flex flex-row items-center justify-between rounded-sm
4								border border-grey-60 bg-grey-90 p-3 text-secondary
5							`,children:e.jsxs("p",{className:`
6									flex flex-row items-center gap-3 pr-1
7									text-xs
8								`,children:[e.jsx(k,{name:"info"}),e.jsx("b",{children:"Optimize for growth."}),"At 258 MB/s, diskless mode could save you $2444 monthly while improving scalability."]})})}),e.jsxs("div",{className:"col-span-2 row-3 mx-6 mb-6",children:[e.jsx(g,{label:"Traffic allocation",unit:"% Diskless topics",name:"inkless_topics_percentage",onCh
8ange:(i,a)=>b(a/100),ticks:[50,60,70,80,90,100],min:50,max:100,step:10,value:m*100,tickColorEnabled:!0,tickLegendLeft:"Replicated",tickLegendRight:"Diskless",tooltip:"Optimal ratio",tooltipTick:90}),e.jsx("div",{className:"mb-8",children:" "})]})]})]})}const F=n.lazy(()=>R(()=>import("./accordion-h3UzN4IZ.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10])).then(s=>({default:s.Accordion})));function M({estimatedCost:s,signupUrl:o}){return e.jsxs("div",{className:"text-secondary",children:[e.jsxs("div",{className:"my-6",children:[e.jsx("p",{className:"text-center text-xs font-semibold text-grey-30",children:"Estimated monthly cost"}),e.jsx("p",{className:"text-center text-lg font-bold",children:s?_(Number(s)):"-"})]}),e.jsx(v,{size:"layout1"}),e.jsxs("div",{className:"px-5 text-xs text-grey-30",children:[e.jsxs("p",{className:"mb-6 flex items-center justify-between",children:[e.jsx("div",{className:"font-semibold",children:"40% saved vs"}),e.jsx("div",{children:"Kafka 3AZ"})]}),e.jsxs("p",{className:"mb-3 flex items-center justify-between",children:[e.jsx("div",{children:"Their cost"}),e.jsx("div",{children:_(200)})]}),e.jsxs("p",{className:"mb-6 flex items-center justify-between",children:[e.jsx("div",{children:"Your savings"}),e.jsxs("div",{className:"text-success",children:["-",_(100)]})]})]}),e.jsx(v,{size:"layout1",className:"mt-0"}),e.jsx(F,{items:[{title:"Cost breakdown",panel:e.jsx("div",{})}]}),e.jsx("div",{className:"p-6 text-center",children:e.jsx(T,{to:o,size:"dense",className:"block w-full",children:"Start trial"})})]})}function U(s){return s.rates.at(0)?.rate.price_usd}function z({deploymentType:s,cloudType:o,throughputRate:c,produceRate:l,consumeRate:d,retentionDays:u,trafficAlloc:m}){let t="https://console.aiven.io/signup?campaign=kafka&web_source=calculator";switch(t+=`&deployment_type=${s}`,t+=`&cloud_type=${o}`,c){case r.UpTo1:t+="&produce_rate=1",t+="&consume_rate=1";break;case r.UpTo5:t+="&produce_rate=5",t+="&consume_rate=5";break;case r.UpTo10:t+="&produce_rate=10",t+="&consume_rate=10";break;case r.Custom:t+=`&produce_rate=${l}`,t+=`&consume_rate=${d}`,t+=`&retention_days=${u}`,t+=`&traffic_alloc=${m}`;break}return t}const P=({acuKafkaOfferingData:s,acuKafkaPricingData:o,isDarkTheme:c})=>{const[l,d]=n.useState(h.BYOC),[u,m]=n.useState(A.AWS),[t,p]=n.useState(r.UpTo1),[x,j]=n.useState(50),[f,y]=n.useState(50),[b,i]=n.useState(7),[a,S]=n.useState(.9);if(n.useEffect(()=>{t===r.Custom&&d(h.BYOC)},[t]),n.useEffect(()=>{t===r.Custom&&l!==h.BYOC&&p(r.UpTo1)},[l]),!s||!o||"error"in o)return null;const w=U(o),N=z({deploymentType:l,cloudType:u,consumeRate:f,produceRate:x,retentionDays:b,throughputRate:t,trafficAlloc:a});return e.jsxs("div",{className:"flex flex-row gap-6 pt-[20px] pb-4",children:[e.jsxs("div",{className:"grow border border-base bg-surface-muted",children:[e.jsx("div",{className:`
9						p-6 text-md font-semibold text-grey-20
10						lg:pb-0
11					`,children:"Service configuration"}),e.jsx(B,{deploymentType:l,cloudType:u,throughputRate:t,produceRate:x,consumeRate:f,retentionDays:b,trafficAlloc:a,onDeploymentTypeChange:d,onCloudTypeChange:m,onThroughputRateChange:p,onProduceRateChange:j,onConsumeRateChange:y,onRetentionDaysChange:i,onTrafficAllocChange:S,isDarkTheme:c})]}),e.jsx("div",{className:"border border-base bg-surface-muted",style:{flexBasis:"300px",alignSelf:"flex-start"},children:s&&o?e.jsx(M,{estimatedCost:w,signupUrl:N}):e.jsx(E,{})})]})};export{P as default};
12//# sourceMappingURL=acu-kafka-calculator-Cz00Av2o.js.map

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.