1function f(t){const i={price:t.dataset.price,downloads:JSON.parse(t.dataset.downloads)},u=t.querySelector("li-slider"),d=t.querySelector(".api-calc__downloads span"),l=t.querySelector(".api-calc__price span"),n=[1500,5e3,5e4,1e6],s=o=>{let e=+i.price;if(o<=0)return e;const c=i.downloads.sort((a,p)=>a.count-p.count);if(c.length<1||o<=c[0].count)return e;let r=Math.max(0,o-c[0].count);for(const a of c)if(e+=Math.min(a.count,r)*a.price,r-=a.count,r<=0)return e;return e};u.addEventListener("change",o=>{let e=0;const c=o.detail.value/1e3;c<.25?e=n[0]*c/.25:c<.5?e=n[0]+(n[1]-n[0])*(c-.25)/.25:c<.75?e=n[1]+(n[2]-n[1])*(c-.5)/.25:e=n[2]+(n[3]-n[2])*(c-.75)/.25,e=Math.round(e),d.innerText=""+e,l.innerText=`$${Math.round(s(e)*100)/100}/month`}),l.innerText=`$${Math.round(s(0)*100)/100}/month`}async function h(){document.querySelectorAll(".api-calc").forEach(t=>{f(t)})}export{h as default}; 2//# sourceMappingURL=api-calc.slot.CoSr850u.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.