PageSourceSearch

https://perplant.com/assets/RoiSimulator-DpNsKGEO.js

js perplant.com collected 2026-10-04 20:59:43 UTC 23,313 bytes, 10 lines download raw bytes

1import{c as K,r as f,j as e,q as V}from"./index-BQmLG9di.js";import{C as ee,N as te,F as ae}from"./Footer-DMJ9zkOW.js";import{s as U}from"./client-D9Lli9Gh.js";import{f as c,C as M,O as $,R as Y,c as se,P as re,a as H,b as ne,m as le,d as E}from"./roi-compute-DXiyyUwd.js";import"./button-CfztRBVR.js";/**
2 * @license lucide-react v0.462.0 - ISC
3 *
4 * This source code is licensed under the ISC license.
5 * See the LICENSE file in the root directory of this source tree.
6 */const ie=K("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]),oe=["Dealer","Agronomist","Distributor","Farmer / Grower","Other"],F="h-12 w-full rounded-2xl border border-border bg-white px-4 text-[15px] text-foreground focus:border-primary focus:outline-none focus:ring-2 focus:ring-primary/20",de=({open:n,onToggle:d,customerName:p,regionLabel:g,crops:u,results:m,onSaveScenario:A})=>{const[l,R]=f.useState({name:"",company:"",email:"",phone:"",role:"",message:""}),[P,a]=f.useState(!1),[j,w]=f.useState(!1),b=(o,y)=>R(S=>({...S,[o]:y})),h=()=>{const o=u.map(y=>{var _;const S=((_=M.find(k=>k.key===y.type))==null?void 0:_.label)??y.type,O=Object.entries(y.ops).filter(([,k])=>k.enabled).map(([k])=>{var T;return((T=$[k])==null?void 0:T.label)??k}).join("; ");return`- ${S}: ${y.area} ha${O?` (${O})`:""}`});return[`Scenario: ${p||"Unnamed"} · Region: ${g}`,`Total area: ${Math.round(m.totalArea).toLocaleString("en")} ha`,...o,`Input savings: ${c(m.totalSavings)}`,`Year 1 net: ${c(m.year1Net)} · Year 2: ${c(m.year2Net)} · Year 3: ${c(m.year3Net)}`,`Upside — yield: ${c(m.yieldGainGeneral)}, seeding: ${c(m.yieldGainSeeding)}, time: ${c(m.timeSaved)}`].join(`
7`)},r=async o=>{if(o.preventDefault(),!l.name.trim()||!l.company.trim()||!/^\S+@\S+\.\S+$/.test(l.email)){V.error("Please add your name, company and a valid email.");return}a(!0);const y=`${l.message.trim()?l.message.trim()+`
8
9`:""}--- ROI scenario ---
10${h()}`;try{const{error:S}=await U.from("partner_applications").insert({name:l.name.trim().slice(0,200),company:l.company.trim().slice(0,200),email:l.email.trim().slice(0,255),phone:l.phone.trim()||null,country:g,partner_type:l.role?`ROI enquiry · ${l.role}`:"ROI enquiry",description:y.slice(0,5e3)});if(S)throw S;try{await A(l.name.trim()||p)}catch(O){console.error("Scenario save failed",O)}await U.functions.invoke("forward-enquiry",{body:{type:"partner",name:l.name,company:l.company,email:l.email,phone:l.phone,country:g,partnerType:l.role?`ROI enquiry · ${l.role}`:"ROI enquiry",message:y}}),w(!0)}catch{V.error("Something went wrong. Please try again.")}finally{a(!1)}};return e.jsxs("div",{id:"discuss-scenario",className:"mt-8 overflow-hidden rounded-2xl border border-primary/30 bg-white shadow-card print:hidden",children:[e.jsxs("button",{type:"button",onClick:d,"aria-expanded":n,className:"flex w-full items-center justify-between gap-4 p-6 text-left",children:[e.jsxs("div",{children:[e.jsx("div",{className:"text-[11px] font-bold uppercase tracking-widest text-primary",children:"Next step"}),e.jsx("div",{className:"mt-1 text-[22px] font-bold leading-tight text-foreground",children:"Discuss this scenario with PerPlant"}),e.jsx("p",{className:"mt-1 text-[15px] text-foreground/60",children:"Share your numbers with our team — we'll reply with a tailored proposal."})]}),e.jsx(ee,{className:`h-6 w-6 shrink-0 text-primary transition-transform duration-300 ${n?"rotate-180":""}`})]}),e.jsx("div",{className:`grid transition-all duration-300 ${n?"grid-rows-[1fr]":"grid-rows-[0fr]"}`,children:e.jsx("div",{className:"overflow-hidden",children:e.jsx("div",{className:"border-t border-border p-6",children:j?e.jsxs("div",{className:"flex items-start gap-3 py-4",children:[e.jsx(ie,{className:"h-7 w-7 shrink-0 text-primary"}),e.jsxs("div",{children:[e.jsx("div",{className:"text-[18px] font-bold text-foreground",children:"Thanks — we've got your scenario."}),e.jsxs("p",{className:"mt-1 text-[15px] text-foreground/60",children:["The PerPlant team will be in touch at ",l.email," shortly."]})]})]}):e.jsxs("form",{onSubmit:r,className:"space-y-4",children:[e.jsxs("div",{className:"grid gap-4 md:grid-cols-2",children:[e.jsx("input",{className:F,placeholder:"Full name *","aria-label":"Full name",value:l.name,onChange:o=>b("name",o.target.value),maxLength:200}),e.jsx("input",{className:F,placeholder:"Company *","aria-label":"Company",value:l.company,onChange:o=>b("company",o.target.value),maxLength:200}),e.jsx("input",{className:F,type:"email",placeholder:"Email *","aria-label":"Email",value:l.email,onChange:o=>b("email",o.target.value),maxLength:255}),e.jsx("input",{className:F,type:"tel",placeholder:"Phone","aria-label":"Phone",value:l.phone,onChange:o=>b("phone",o.target.value),maxLength:50})]}),e.jsxs("select",{className:F,"aria-label":"Your role",value:l.role,onChange:o=>b("role",o.target.value),children:[e.jsx("option",{value:"",children:"I am a…"}),oe.map(o=>e.jsx("option",{value:o,children:o},o))]}),e.jsx("textarea",{rows:4,placeholder:"Anything else we should know? (optional)","aria-label":"Message",value:l.message,onChange:o=>b("message",o.target.value),maxLength:2e3,className:"w-full rounded-2xl border border-border bg-white p-4 text-[15px] text-foreground focus:border-primary focus:outline-none focus:ring-2 focus:ring-primary/20"}),e.jsxs("div",{className:"rounded-xl bg-accent/20 p-4 text-[13.5px] text-foreground
10/70",children:["Your scenario (",Math.round(m.totalArea).toLocaleString("en")," ha, Year 1 net ",c(m.year1Net),") will be attached automatically."]}),e.jsx("button",{type:"submit",disabled:P,className:"inline-flex h-12 items-center rounded-[10px] bg-primary px-6 text-[15px] font-medium text-primary-foreground hover:bg-primary/90 disabled:opacity-60",children:P?"Sending…":"Send to PerPlant"})]})})})})]})},ce=()=>{const n={id:"c1",type:"wheat",area:400,yield:5.5,price:230,ops:E("wheat")};n.ops.fert_redist={enabled:!0,cost:110,machinery:"isobus_spreader"},n.ops.fert={enabled:!0,cost:110,machinery:"isobus_spreader"},n.ops.fungicide={enabled:!0,cost:45,machinery:"isobus_section"};const d={id:"c2",type:"cotton",area:150,yield:2.8,price:1750,ops:E("cotton")};d.ops.fert={...d.ops.fert,enabled:!0,cost:260},d.ops.seed={enabled:!0,cost:95,machinery:"isobus_seeder"},d.ops.harvestaid={enabled:!0,cost:60,machinery:"isobus_nozzle"};const p={id:"c3",type:"grassseed",area:80,yield:1.4,price:2600,ops:E("grassseed")};return p.ops.fert={...p.ops.fert,enabled:!0,cost:140},p.ops.gog={enabled:!0,cost:35,machinery:"isobus_nozzle"},[n,d,p]},pe=()=>{var q,z;const[n,d]=f.useState(""),[p,g]=f.useState(Y[2].v),[u,m]=f.useState(ce),[A,l]=f.useState(4),[R,P]=f.useState({}),[a,j]=f.useState({yieldGainPct:3,timePerHa:.5,laborRate:25}),[w,b]=f.useState(!1),h=()=>{b(!0),setTimeout(()=>{var t;return(t=document.getElementById("discuss-scenario"))==null?void 0:t.scrollIntoView({behavior:"smooth",block:"start"})},50)};f.useEffect(()=>{const t=new Set;u.forEach(s=>Object.keys(s.ops).forEach(i=>{s.ops[i].enabled&&t.add(i)})),P(s=>{const i={...s};let x=!1;return t.forEach(v=>{const G=$[v];G&&G.mode!=="fixed"&&i[v]===void 0&&G.def!==void 0&&(i[v]=G.def,x=!0)}),x?i:s})},[u]);const r=f.useMemo(()=>se(u,R,a),[u,R,a]),o=f.useMemo(()=>{const t=new Set;return u.forEach(s=>Object.keys(s.ops).forEach(i=>{s.ops[i].enabled&&t.add(i)})),Array.from(t)},[u]),y=o.filter(t=>$[t].mode!=="fixed"),S=o.filter(t=>$[t].mode==="fixed"),O=((q=Y.find(t=>t.v===p))==null?void 0:q.note)??"",_=()=>{const t="c"+A;l(A+1),m([...u,{id:t,type:"wheat",area:100,yield:5,price:220,ops:E("wheat")}])},k=t=>m(u.filter(s=>s.id!==t)),T=(t,s)=>m(u.map(i=>i.id===t?{...i,type:s,ops:E(s)}:i)),J=(t,s,i)=>m(u.map(x=>x.id===t?{...x,[s]:parseFloat(i)||0}:x)),Q=(t,s,i)=>m(u.map(x=>x.id===t?{...x,ops:{...x.ops,[s]:{...x.ops[s],enabled:i}}}:x)),X=(t,s,i,x)=>m(u.map(v=>v.id===t?{...v,ops:{...v.ops,[s]:{...v.ops[s],[i]:i==="cost"?x===""?"":parseFloat(x)||0:x}}}:v)),Z=async t=>{const{error:s}=await U.from("roi_scenarios").insert({customer_name:n||t||null,region:p,crops:u,savings_assumptions:R,upside_assumptions:a,results:r,user_agent:typeof navigator<"u"?navigator.userAgent:null});if(s)throw s};return e.jsxs("div",{className:"grid gap-8 lg:grid-cols-[1fr_340px] items-start",children:[e.jsxs("main",{className:"min-w-0",children:[e.jsxs(I,{step:"Step 01",title:"Customer & Region",subtitle:"Set the context for this conversation.",children:[e.jsxs("div",{className:"grid gap-5 md:grid-cols-2",children:[e.jsx(C,{label:"Customer / Farm name",children:e.jsx("input",{type:"text",value:n,onChange:t=>d(t.target.value),placeholder:"e.g. Andersen Farms",className:N})}),e.jsx(C,{label:"Region",children:e.jsx("select",{value:p,onChange:t=>g(t.target.value),className:N,children:Y.map(t=>e.jsx("option",{value:t.v,children:t.l},t.v))})})]}),O&&e.jsx("p",{className:"mt-2 text-[13px] italic text-foreground/50",children:O})]}),e.jsxs(I,{step:"Step 02",title:"Crops & Operations",subtitle:"Add each crop the farm grows. Applicable Perplant operations appear automatically based on crop type. If a crop isn't listed, select the closest crop by morphology to simulate returns.",children:[e.jsx("div",{children:u.map(t=>e.jsx(me,{crop:t,onRemove:()=>k(t.id),onTypeChange:s=>T(t.id,s),onFieldChange:(s,i)=>J(t.id,s,i),onToggleOp:(s,i)=>Q(t.id,s,i),onOpField:(s,i,x)=>X(t.id,s,i,x)},t.id))}),e.jsx("button",{onClick:_,className:"mt-2 inline-flex h-12 items-center rounded-[10px] bg-primary px-6 text-[15px] font-medium text-primary-foreground hover:bg-primary/90",children:"+ Add crop"})]}),e.jsx(I,{step:"Step 03",title:"Perplant Savings by Operation",subtitle:"One recommended assumption per operation, shared across every crop using it. Drag to adjust — the Perplant-recommended value is preselected.",children:e.jsxs("div",{className:"rounded-2xl bg-white p-8 shadow-card",children:[y.length===0?e.jsx("p",{className:"text-foreground
10/60",children:"Enable a rate- or coverage-based operation on a crop above to set its savings assumption here."}):y.map(t=>{const s=$[t],i=R[t]??s.def??0,x=s.max??100;return e.jsxs("div",{className:"grid grid-cols-1 items-center gap-5 border-b border-border py-4 last:border-b-0 md:grid-cols-[1.8fr_0.9fr_1.4fr]",children:[e.jsxs("div",{children:[e.jsx("div",{className:"text-base font-bold text-foreground",children:s.label}),e.jsx("div",{className:"mt-1 text-[13px] text-foreground/60",children:s.mode==="rate"?"Rate reduction vs blanket":"Coverage reduction (spray only where weeds detected)"})]}),e.jsx("div",{className:"text-[13px] text-foreground/60",children:s.unitLabel}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("input",{type:"range",min:0,max:x,step:1,value:i,onChange:v=>P({...R,[t]:parseFloat(v.target.value)||0}),className:"w-full accent-primary","aria-label":`${s.label} savings percentage`}),e.jsxs("span",{className:"min-w-[46px] text-right text-[15px] font-bold text-primary",children:[i,"%"]})]})]},t)}),S.length>0&&e.jsxs("p",{className:"mt-4 text-[13px] italic text-foreground/50",children:["Fixed at 0% cost savings by design: ",S.map(t=>$[t].label).join(", "),".",S.includes("seed")&&" VRA Seeding instead drives a fixed +5% yield uplift — see Upside Potential below."]})]})}),e.jsx(I,{step:"Step 04",title:"Upside Potential Assumptions",subtitle:"Kept separate from the core ROI below — these drive the estimates, but are directional, not guaranteed.",children:e.jsxs("div",{className:"grid gap-5 md:grid-cols-3",children:[e.jsx(C,{label:"General yield gain (%)",children:e.jsx("input",{type:"number",min:0,step:.5,value:a.yieldGainPct,onChange:t=>j({...a,yieldGainPct:parseFloat(t.target.value)||0}),className:N})}),e.jsx(C,{label:"Time saved (hr/ha)",children:e.jsx("input",{type:"number",min:0,step:.1,value:a.timePerHa,onChange:t=>j({...a,timePerHa:parseFloat(t.target.value)||0}),className:N})}),e.jsx(C,{label:"Labor rate (€/hr)",children:e.jsx("input",{type:"number",min:0,value:a.laborRate,onChange:t=>j({...a,laborRate:parseFloat(t.target.value)||0}),className:N})})]})}),e.jsx(I,{step:"Step 05",title:"3-Year ROI",children:e.jsxs("div",{className:"rounded-2xl bg-white p-8 shadow-card",children:[e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full text-right text-[15px] tabular-nums",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b border-foreground text-[11px] font-bold uppercase tracking-wider text-foreground/50",children:[e.jsx("th",{className:"py-3 text-left",children:" "}),e.jsx("th",{className:"py-3",children:"Year 1"}),e.jsx("th",{className:"py-3",children:"Year 2"}),e.jsx("th",{className:"py-3",children:"Year 3"})]})}),e.jsxs("tbody",{children:[e.jsx(L,{label:"Input spend — without Perplant",values:[r.totalBlanket,r.totalBlanket,r.totalBlanket]}),e.jsx(L,{label:"Input spend — with Perplant",values:[r.totalPerplant,r.totalPerplant,r.totalPerplant]}),e.jsx(L,{label:"Input € saved",values:[r.totalSavings,r.totalSavings,r.totalSavings]}),e.jsx(L,{label:"Perplant cost (hardware + subscription)",values:[re,H,H]}),e.jsxs("tr",{className:"text-[17px] font-bold text-foreground",children:[e.jsx("td",{className:"py-3 text-left",children:"Net ROI"}),[r.year1Net,r.year2Net,r.year3Net].map((t,s)=>e.jsx("td",{className:`py-3 ${t>=0?"text-primary":""}`,children:c(t)},s))]})]})]})}),e.jsxs("div",{className:"mt-8",children:[e.jsx("div",{className:"mb-3 text-[11px] font-bold uppercase tracking-wider text-foreground/50",children:"Breakdown by crop & operation (Year 1 basis)"}),e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full text-right text-[14px] tabular-nums",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"text-[10.5px] font-bold uppercase tracking-wider text-foreground/50",children:[e.jsx("th",{className:"py-2 text-left",children:"Crop"}),e.jsx("th",{className:"py-2 text-left",children:"Operation"}),e.jsx("th",{className:"py-2",children:"Blanket €"}),e.jsx("th",{className:"py-2",children:"With Perplant €"}),e.jsx("th",{className:"py-2",children:"Saved €"})]})}),e.jsx("tbody",{children:r.rows.length===0?e.jsx("tr",{children:e.jsx("td",{colSpan:5,className:"py-5 text-center text-foreground
10/50",children:"Enable an operation on a crop to see its breakdown here."})}):r.rows.map((t,s)=>e.jsxs("tr",{className:"border-b border-border last:border-b-0",children:[e.jsx("td",{className:"py-2 text-left",children:t.crop}),e.jsx("td",{className:"py-2 text-left",children:t.op}),e.jsx("td",{className:"py-2",children:c(t.blanket)}),e.jsx("td",{className:"py-2",children:c(t.perplant)}),e.jsx("td",{className:"py-2 font-bold text-primary",children:c(t.saved)})]},s))})]})})]}),e.jsxs("div",{className:"mt-8 rounded-2xl bg-accent/20 p-6",children:[e.jsx("div",{className:"mb-4 text-[11px] font-bold uppercase tracking-wider text-foreground",children:"Potential upside — not guaranteed"}),e.jsx(B,{name:"Yield gain (general)",value:c(r.yieldGainGeneral),desc:`${a.yieldGainPct}% general yield-gain assumption applied to total crop revenue (€${Math.round(r.totalRevenueBase).toLocaleString("en")} across all crops, area × yield × price).`}),e.jsx(B,{name:"VRA seeding yield uplift",value:c(r.yieldGainSeeding),desc:`Fixed +5% yield uplift from improved stand uniformity, applied only to crops using VRA Seeding: ${r.seedCrops.length?r.seedCrops.join(", "):"none yet"}.`}),e.jsx(B,{name:"Time saved",value:c(r.timeSaved),desc:`${a.timePerHa} hr/ha saved across ${Math.round(r.totalArea).toLocaleString("en")} ha total farmed area, valued at €${a.laborRate}/hr labor rate.`})]}),e.jsx("p",{className:"mt-6 text-[13px] italic leading-relaxed text-foreground/50",children:"Figures are illustrative planning estimates based on the assumptions entered above, not guaranteed outcomes. Actual results vary by field conditions, season, and execution."}),e.jsxs("div",{className:"mt-6 flex flex-wrap gap-3 print:hidden",children:[e.jsx("button",{onClick:h,className:"inline-flex h-12 items-center rounded-[10px] bg-primary px-6 text-[15px] font-medium text-primary-foreground hover:bg-primary/90",children:"Discuss this scenario with PerPlant"}),e.jsx("button",{onClick:()=>window.print(),className:"inline-flex h-12 items-center rounded-[10px] border border-primary bg-white px-6 text-[15px] font-medium text-primary hover:bg-primary/5",children:"Export / Print"})]}),e.jsx(de,{open:w,onToggle:()=>b(t=>!t),customerName:n,regionLabel:((z=Y.find(t=>t.v===p))==null?void 0:z.l)??p,crops:u,results:r,onSaveScenario:Z})]})})]}),e.jsx("aside",{className:"lg:sticky lg:top-24 print:static",children:e.jsxs("div",{className:"rounded-2xl bg-white p-7 shadow-card",children:[e.jsx("div",{className:"text-[11px] font-bold uppercase tracking-wider text-foreground/50",children:"Live Year 1 Net"}),e.jsx("div",{className:`my-2 text-[44px] font-bold leading-none tabular-nums ${r.year1Net<0?"text-foreground":"text-primary"}`,children:c(r.year1Net)}),e.jsxs("div",{className:"mb-5 text-[13.5px] text-foreground/60",children:["Total input savings: ",c(r.totalSavings)]}),e.jsx(W,{label:"Year 2 net",value:c(r.year2Net)}),e.jsx(W,{label:"Year 3 net",value:c(r.year3Net)}),e.jsxs("div",{className:"mt-5 rounded-xl bg-accent/20 p-4",children:[e.jsx("div",{className:"mb-2 text-[10.5px] font-bold uppercase tracking-wider text-foreground",children:"Potential upside"}),e.jsx(D,{label:"Yield gain (general)",value:c(r.yieldGainGeneral)}),e.jsx(D,{label:"VRA seeding uplift",value:c(r.yieldGainSeeding)}),e.jsx(D,{label:"Time saved",value:c(r.timeSaved)})]}),e.jsx("button",{onClick:h,className:"mt-5 inline-flex h-11 w-full items-center justify-center rounded-[10px] border border-primary bg-white text-[14px] font-medium text-primary hover:bg-primary/5 print:hidden",children:"Discuss this scenario"})]})})]})},N="h-12 w-full rounded-2xl border border-border bg-white px-4 text-[15px] text-foreground focus:border-primary focus:outline-none focus:ring-2 focus:ring-primary/20",I=({step:n,title:d,subtitle:p,children:g})=>e.jsxs("section",{className:"mb-16",children:[e.jsx("span",{className:"mb-3 inline-block rounded-lg bg-accent/30 px-3 py-1 text-[11px] font-bold uppercase tracking-widest text-foreground",children:n}),e.jsx("h2",{className:"mb-3 text-[32px] font-bold leading-tight tracking-tight md:text-[40px]",children:d}),p&&e.jsx("p",{className:"mb-6 max-w-[680px] text-[17px] leading-relaxed text-foreground
10/60",children:p}),g]}),C=({label:n,children:d})=>e.jsxs("label",{className:"flex flex-col gap-1.5 text-[12px] font-medium uppercase tracking-wide text-foreground/60",children:[n,d]}),W=({label:n,value:d})=>e.jsxs("div",{className:"flex justify-between border-t border-border py-2.5 text-[15px] tabular-nums",children:[e.jsx("span",{children:n}),e.jsx("span",{children:d})]}),D=({label:n,value:d})=>e.jsxs("div",{className:"flex justify-between py-1 text-[13.5px] tabular-nums",children:[e.jsx("span",{children:n}),e.jsx("span",{children:d})]}),L=({label:n,values:d})=>e.jsxs("tr",{children:[e.jsx("td",{className:"py-3 text-left font-medium text-foreground/60",children:n}),d.map((p,g)=>e.jsx("td",{className:"py-3",children:c(p)},g))]}),B=({name:n,value:d,desc:p})=>e.jsxs("div",{className:"border-b border-foreground/10 py-3 last:border-b-0",children:[e.jsxs("div",{className:"mb-1 flex items-baseline justify-between",children:[e.jsx("span",{className:"text-[15px] font-bold text-foreground",children:n}),e.jsx("span",{className:"text-[17px] font-bold text-primary tabular-nums",children:d})]}),e.jsx("div",{className:"text-[13.5px] leading-relaxed text-foreground/60",children:p})]}),me=({crop:n,onRemove:d,onTypeChange:p,onFieldChange:g,onToggleOp:u,onOpField:m})=>{const A=M.find(a=>a.key===n.type),l=ne(n.type),R=M.filter(a=>a.tags.includes("cereal")),P=M.filter(a=>!a.tags.includes("cereal"));return e.jsxs("div",{className:"mb-5 rounded-2xl bg-white p-7 shadow-card",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsxs("select",{value:n.type,onChange:a=>p(a.target.value),className:`${N} flex-1 !text-[17px] !font-bold`,children:[e.jsx("optgroup",{label:"Cereals & Grasses",children:R.map(a=>e.jsx("option",{value:a.key,children:a.label},a.key))}),e.jsx("optgroup",{label:"Broadleaf & Row Crops",children:P.map(a=>e.jsx("option",{value:a.key,children:a.label},a.key))})]}),e.jsx("button",{onClick:d,"aria-label":"Remove crop",className:"h-10 w-10 flex-shrink-0 rounded-[10px] border border-border text-foreground/60 hover:border-foreground hover:text-foreground",children:"✕"})]}),e.jsx("p",{className:"mt-2 mb-5 text-[13px] italic text-foreground/50",children:"Not listed? Choose the closest crop by morphology to simulate returns."}),e.jsxs("div",{className:"mb-5 grid gap-5 md:grid-cols-3",children:[e.jsx(C,{label:"Farmed area (ha)",children:e.jsx("input",{type:"number",min:0,value:n.area,onChange:a=>g("area",a.target.value),className:N})}),e.jsx(C,{label:"Avg yield (t/ha)",children:e.jsx("input",{type:"number",min:0,step:.1,value:n.yield,onChange:a=>g("yield",a.target.value),className:N})}),e.jsx(C,{label:"Selling price (€/t)",children:e.jsx("input",{type:"number",min:0,value:n.price,onChange:a=>g("price",a.target.value),className:N})})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"mb-3 text-[11px] font-bold uppercase tracking-widest text-foreground/50",children:["Operations for ",A.label]}),l.map(a=>{const j=$[a],w=n.ops[a];if(!w)return null;const b=le(j.machinery);return e.jsxs("div",{className:`mb-2.5 rounded-xl border px-4 py-3.5 ${w.enabled?"border-primary bg-primary/5":"border-border bg-background"}`,children:[e.jsxs("label",{className:"flex cursor-pointer items-center gap-2.5 text-[15px] font-medium text-foreground",children:[e.jsx("input",{type:"checkbox",checked:w.enabled,onChange:h=>u(a,h.target.checked),className:"h-[18px] w-[18px] flex-shrink-0 accent-primary"}),e.jsx("span",{children:j.label})]}),w.enabled&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"mt-3 grid items-end gap-4 md:grid-cols-2",children:[e.jsx(C,{label:"Blanket cost (€/ha)",children:e.jsx("input",{type:"number",min:0,value:w.cost,onChange:h=>m(a,"cost",h.target.value),className:N})}),b.length===1?e.jsxs("div",{className:"pt-2 text-[14px] text-foreground/60",children:["Machinery: ",e.jsx("strong",{className:"font-bold text-foreground",children:b[0].l})]}):e.jsx(C,{label:"Machinery",children:e.jsx("select",{value:w.machinery,onChange:h=>m(a,"machinery",h.target.value),className:N,children:b.map(h=>e.jsx("option",{value:h.v,children:h.l},h.v))})})]}),j.mode==="fixed"&&j.note&&e.jsx("p",{className:"mt-3 text-[13px] italic leading-relaxed text-foreground
10/50",children:j.note})]})]},a)})]})]})},fe=()=>e.jsxs("div",{className:"min-h-screen bg-background",children:[e.jsx(te,{}),e.jsx("main",{className:"pt-[72px]",children:e.jsxs("section",{className:"content-width section-padding",children:[e.jsxs("div",{className:"mb-10 max-w-[720px]",children:[e.jsx("p",{className:"label-text mb-3",children:"ROI SIMULATOR"}),e.jsx("h1",{className:"mb-4",children:"Model the return for a specific farm."}),e.jsx("p",{className:"text-lg text-foreground/70",children:"Add each crop the farm grows, pick the operations that apply, and refine the input costs and savings assumptions. The 3-year net updates live."})]}),e.jsx(pe,{})]})}),e.jsx(ae,{})]});export{fe 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.