PageSourceSearch

https://www.supliichain.io/assets/LaunchReplenRunner-DGN7PqDu.js

js supliichain.io collected 2026-10-08 22:55:11 UTC 3,236 bytes, 1 lines download raw bytes

1import{j as e}from"./markdown-B-XC8faE.js";import{r as i}from"./icons-FOYoml-d.js";const W=()=>{const[r,p]=i.useState(2e3),[h,b]=i.useState(18),[d,g]=i.useState(8),[u,j]=i.useState(35),l=i.useMemo(()=>{var m;const s=Math.round(r*(h/100)),n=[];let a=r;for(let c=1;c<=12;c++){a=Math.max(0,a-s);const k=s>0?a/s:999,f=a===0?"STOCKOUT":k<2?"RED":k<4?"YELLOW":"GREEN";n.push({week:c,remaining:a,status:f})}const o=Math.ceil(u/7),w=Math.max(1,Math.floor((r-d*s)/s)-o),N=Math.round(s*(d+o)),y=(m=n.find(c=>c.status==="STOCKOUT"))==null?void 0:m.week;return{weeklyVelocity:s,burn:n,reorderWeek:w,reorderUnits:N,stockoutWeek:y,leadWeeks:o}},[r,h,d,u]),x=({label:t,value:s,onChange:n,unit:a})=>e.jsxs("label",{className:"block",children:[e.jsxs("span",{className:"text-xs uppercase tracking-wider",children:[t,a?` (${a})`:""]}),e.jsx("input",{type:"number",value:s,onChange:o=>n(Number(o.target.value)||0),className:"mt-1 w-full border-2 border-black px-3 py-2 font-mono text-base bg-white text-black"})]});return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"border-2 border-black p-5",children:[e.jsx("h2",{className:"text-lg font-bold uppercase mb-4",children:"Inputs"}),e.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[e.jsx(x,{label:"Launch units",unit:"initial PO",value:r,onChange:p}),e.jsx(x,{label:"Week-1 sell-through",unit:"%",value:h,onChange:b}),e.jsx(x,{label:"Target weeks of cover",unit:"weeks",value:d,onChange:g}),e.jsx(x,{label:"Lead time",unit:"days",value:u,onChange:j})]})]}),e.jsxs("div",{className:"border-2 border-black p-5 bg-black text-white",children:[e.jsx("h2",{className:"text-lg font-bold uppercase mb-3",children:"Recommendation"}),e.jsxs("p",{className:"text-sm",children:["Reorder by ",e.jsxs("strong",{className:"text-yellow-300",children:["week ",l.reorderWeek]})," with a PO of ",e.jsxs("strong",{className:"text-yellow-300",children:[l.reorderUnits.toLocaleString()," units"]}),"."]}),l.stockoutWeek&&e.jsxs("p",{className:"text-sm mt-2 text-red-300",children:["⚠ Stockout projected week ",l.stockoutWeek," if no reorder. Lead time is ",l.leadWeeks," weeks — fire PO now."]}),e.jsxs("p",{className:"text-xs mt-3 opacity-70",children:["Weekly velocity assumption: ",l.weeklyVelocity.toLocaleString()," units/week (baseline from week-1 sell-through)."]})]}),e.jsx("div",{className:"border-2 border-black overflow-x-auto",children:e.jsxs("table",{className:"w-full text-sm",children:[e.jsx("thead",{className:"bg-black text-white",children:e.jsxs("tr",{children:[e.jsx("th",{className:"px-3 py-2 text-left",children:"Week"}),e.jsx("th",{className:"px-3 py-2 text-right",children:"Remaining"}),e.jsx("th",{className:"px-3 py-2 text-left",children:"Status"})]})}),e.jsx("tbody",{children:l.burn.map(t=>e.jsxs("tr",{className:"border-t border-black",children:[e.jsxs("td",{className:"px-3 py-2 font-bold",children:["W",t.week]}),e.jsx("td",{className:"px-3 py-2 text-right font-mono",children:t.remaining.toLocaleString()}),e.jsx("td",{className:`px-3 py-2 font-bold ${t.status==="STOCKOUT"||t.status==="RED"?"bg-red-600 text-white":t.status==="YELLOW"?"bg-yellow-300 text-black":"bg-green-600 text-white"}`,children:t.status})]},t.week))})]})})]})};export{W 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.