1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[22243],{22243:(e,t,a)=>{a.r(t),a.d(t,{default:()=>z});var s=a(95155),n=a(12115),l=a(33789),i=a(27784),r=a(90235),o=a(97003),d=a(33534),h=a(52863),c=a(25016);let u=[{key:"mm",label:"mm",m:.001},{key:"cm",label:"cm",m:.01},{key:"m",label:"m",m:1},{key:"in",label:"in",m:.0254},{key:"ft",label:"ft",m:.3048}];function m(e){return u.find(t=>t.key===e)?.m??.0254}let p=[{key:"rect",label:"Rectangle",fields:["Length","Width"],hint:"Length times width."},{key:"circle",label:"Circle, by diameter",fields:["Diameter",null],hint:"Measure straight across the widest point, not from the middle."},{key:"annulus",label:"Ring, by two diameters",fields:["Outer diameter","Inner diameter"],hint:"A fire pit surround or a tree ring. The middle comes out."},{key:"tri",label:"Triangle",fields:["Base","Height"],hint:"Base times height, halved."},{key:"area",label:"Area I already measured",fields:["Area",null],hint:"Type the square footage or square meters straight in."}],g=[{id:"pea",label:"Pea gravel, 10 mm",kgM3:1600,lo:1500,hi:1700,stoneMm:10,note:"Rounded, so it rolls underfoot and creeps down a slope."},{id:"crushed20",label:"Crushed stone, 20 mm angular",kgM3:1650,lo:1500,hi:1750,stoneMm:20,note:"Angular faces lock together, which is why drives use it."},{id:"crushed40",label:"Crushed stone, 40 mm angular",kgM3:1600,lo:1500,hi:1700,stoneMm:40,note:"Coarse. Wants real depth or it just spreads apart."},{id:"river",label:"River rock, 40 mm",kgM3:1500,lo:1400,hi:1600,stoneMm:40,note:"Smooth and decorative, never a driving surface."},{id:"slate",label:"Slate chippings",kgM3:1450,lo:1300,hi:1550,stoneMm:20,note:"Flat pieces, so it settles thinner than you expect."},{id:"mot",label:"Crusher run or MOT Type 1",kgM3:2e3,lo:1900,hi:2200,stoneMm:40,note:"Graded fines and stone, the sub base that compacts hard."},{id:"dg",label:"Decomposed granite",kgM3:1600,lo:1500,hi:1750,stoneMm:6,note:"Packs to a firm path surface, washes in heavy rain."},{id:"screen",label:"Limestone screenings or stone dust",kgM3:1750,lo:1600,hi:1900,stoneMm:5,note:"The bedding layer under pavers."},{id:"ballast",label:"Ballast, sand and gravel mix",kgM3:1750,lo:1600,hi:1900,stoneMm:20,note:"Sold for mixing concrete rather than spreading."},{id:"sharpsand",label:"Sharp sand",kgM3:1600,lo:1500,hi:1700,stoneMm:null,note:"Gritty, used for bedding and screeding."},{id:"buildsand",label:"Building or masonry sand",kgM3:1500,lo:1400,hi:1650,stoneMm:null,note:"Soft and fine, for mortar rather than a base."},{id:"recycled",label:"Recycled crushed concrete",kgM3:1500,lo:1350,hi:1650,stoneMm:40,note:"Cheaper sub base, weight varies most of anything here."}];function x(e){return g.find(t=>t.id===e)??g[0]}let y=[{label:"Decorative stone, foot traffic",mm:50,inch:2,why:"Deep enough to cover the ground and the membrane."},{label:"Garden path",mm:50,inch:2,why:"Any thinner and the path shows through in a season."},{label:"Driveway top course",mm:50,inch:2,why:"The wearing layer that sits on the base."},{label:"Driveway base course",mm:100,inch:4,why:"Coarse stone under the top, this is what carries the car."},{label:"Shed or patio sub base",mm:100,inch:4,why:"Compacted before anything is laid on it."},{label:"Dog run or play area",mm:75,inch:3,why:"Enough to drain and stay put under traffic."}],f=[{id:"bag50",label:"50 lb bag",kind:"mass",size:"50",enabled:!0},{id:"yard",label:"Cubic yard, loose",kind:"volume",size:"1",enabled:!0},{id:"ston",label:"Short ton, loose",kind:"mass",size:"2000",enabled:!0}],v=[{id:"bag25",label:"25 kg bag",kind:"mass",size:"25",enabled:!0},{id:"bulk850",label:"850 kg bulk bag",kind:"mass",size:"850",enabled:!0},{id:"tonne",label:"Tonne, loose",kind:"mass",size:"1000",enabled:!0},{id:"cubem",label:"Cubic meter, loose",kind:"volume",size:"1",enabled:!1}],b=1,j=1,w={id:0,name:"Driveway",shape:"rect",a:"40",b:"12"},N={id:0,name:"Gravel",materialId:"crushed20",density:"2781",depth:"2",depthUnit:"in",allowance:"compact",allowancePct:"20",prices:{}};function $(e){let t=String(e??"").replace(/,/g,"").trim();if(""===t)return{ok:!1,value:0,problem:"blank"};let a=Number(t);return Number.isFinite(a)?a<0?{ok:!1,value:a,problem:"negative"}:{ok:!0,value:a,problem:null}:{ok:!1,value:0,problem:"nan"}}
1function k(e,t=2){return Number.isFinite(e)?e.toLocaleString("en-US",{maximumFractionDigits:t}):"0"}function M(e,t,a){let s=$(e);if(!s.ok||0===s.value)return e;let n=s.value*t/a;return Number.isFinite(n)?String(Number(n.toFixed(6))):e}let S="flex h-9 w-full rounded-md border border-input bg-background px-2 text-sm shadow-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",C="rounded-md border p-3 space-y-3",T="rounded-md border bg-muted px-4 py-3 text-sm",U="rounded-md border border-amber-500/40 bg-amber-500/10 px-3 py-2 text-sm";function z(){let[e,t]=(0,n.useState)("us"),[a,z]=(0,n.useState)([w]),[A,F]=(0,n.useState)([N]),[J,P]=(0,n.useState)(f),[L,I]=(0,n.useState)("$"),[R,D]=(0,n.useState)(""),[K,B]=(0,n.useState)(""),[W,q]=(0,n.useState)("ston"),[_,E]=(0,n.useState)(0),[G,O]=(0,n.useState)(""),[H,Y]=(0,n.useState)(""),[V,Q]=(0,n.useState)("10"),[X,Z]=(0,n.useState)(!1),[ee,et]=(0,n.useState)([]),[ea,es]=(0,n.useState)(!1),[en,el]=(0,n.useState)(null),ei=(0,n.useRef)(!1),er="us"===e;(0,n.useEffect)(()=>{if(ei.current)return;ei.current=!0;let e=new URLSearchParams(window.location.search),a=e.get("j"),s=e.get("d");s&&et(s.split("|").filter(Boolean));let n=!1,l=e=>{let a=JSON.parse(e);if(1!==Number(a.v))throw Error("version");let s="metric"===String(a.u)?"metric":"us";t(s);let l=Array.isArray(a.s)?a.s:[],i=[];for(let e of l.slice(0,12)){let t=e,a=p.find(e=>e.key===String(t.k));a&&i.push({id:b++,name:String(t.n??"").slice(0,40)||`Section ${i.length+1}`,shape:a.key,a:String(t.a??""),b:String(t.b??"")})}let r=Array.isArray(a.l)?a.l:[],o=[];for(let e of r.slice(0,4)){let t=e,a=g.find(e=>e.id===String(t.m));if(!a)continue;let n=u.find(e=>e.key===String(t.du));o.push({id:j++,name:String(t.n??"").slice(0,40)||`Layer ${o.length+1}`,materialId:a.id,density:String(t.g??""),depth:String(t.d??""),depthUnit:n?n.key:"us"===s?"in":"mm",allowance:"settle"===String(t.ak)?"settle":"compact",allowancePct:String(t.av??"20"),prices:"object"==typeof t.p&&t.p?t.p:{}})}let d=Array.isArray(a.bu)?a.bu:[],h=("us"===s?f:v).map(e=>{let t=d.find(t=>String(t.i)===e.id);return t?{...e,size:String(t.z??e.size),enabled:!!t.e}:{...e}});if(0===i.length||0===o.length)throw Error("empty");z(i),F(o),P(h),q(h[0]?.id??"ston"),"string"==typeof a.c&&I(a.c.slice(0,3)),"string"==typeof a.dl&&D(a.dl),n=!0};if(a)try{l(decodeURIComponent(a))}catch{Z(!0),n=!1}if(!n){let e=null;try{e=localStorage.getItem("tb-gravel-job")}catch{e=null}if(e)try{l(e),n=!0}catch{n=!1}}if(!n){let[e,a]=("undefined"!=typeof navigator&&navigator.language||"").split("-"),s=(a?/^(US|LR|MM)$/i.test(a):!e||/^en$/i.test(e))?"us":"metric";t(s),P("us"===s?f.map(e=>({...e})):v.map(e=>({...e}))),q("us"===s?"ston":"tonne"),z([{id:b++,name:"Driveway",shape:"rect",a:"us"===s?"40":"12",b:"us"===s?"12":"3.6"}]);let n=x("crushed20");F([{id:j++,name:"Gravel",materialId:n.id,density:"us"===s?String(Math.round(n.kgM3/.5932764212577829)):String(n.kgM3),depth:"us"===s?"2":"50",depthUnit:"us"===s?"in":"mm",allowance:"compact",allowancePct:"20",prices:{}}])}},[]);let eo=er?"ft":"m",ed=er?.3048:1,eh=er?"sq ft":"m2",ec=er?.09290304:1,eu=er?"cu yd":"m3",em=er?.764554857984:1,ep=er?"short tons":"tonnes",eg=er?907.18474:1e3,ex=er?"lb":"kg",ey=er?.45359237:1,ef=er?"lb/cu yd":"kg/m3",ev=er?.5932764212577829:1,eb=er?"lb":"kg",ej=er?.45359237:1,ew=e=>er?10.763910416709722*e:e,eN=e=>e/em,e$=e=>e/eg,ek=e=>e/ey,eM=[],eS=a.map((e,t)=>{let a=e.name.trim()||`Section ${t+1}`,s=p.find(t=>t.key===e.shape)??p[0],n=s?.fields[0]??"Length",l=s?.fields[1]??"Width",i=$(e.a),r=$(e.b),o=(e,t)=>"negative"===e.problem?`${a}: ${t.toLowerCase()} is ${e.value}, and a measurement cannot be negative.`:"nan"===e.problem?`${a}: ${t.toLowerCase()} is not a number.`:null;if("area"===e.shape){let t=o(i,n);if(t)return{section:e,area:0,error:t};if(!i.ok)return{section:e,area:0,error:null};let s=i.value*ec;return s>6e4&&(eM.push(`${a} was capped: ${k(i.value,0)} ${eh} is past the ${k(ew(6e4),0)} ${eh} limit this tool works to, so ${k(ew(6e4),0)} ${eh} was used.`),s=6e4),{section:e,area:s,error:null}}let d=o(i,n);if(d)return{section:e,area:0,error:d};let h=l?o(r,l):null;if(h)return{section:e,area:0,error:h};let c=(e,t)=>{let s=e.value*ed;return s>300?(eM.push(`${a} ${t.toLowerCase()} was capped: ${k(e.value,1)} ${eo} is past the ${k(300/ed,0)} ${eo} limit, so ${k(300/ed,0)} ${eo} was used.`),300):s};
1switch(e.shape){case"rect":if(!i.ok||!r.ok)return{section:e,area:0,error:null};return{section:e,area:c(i,"length")*c(r,"width"),error:null};case"circle":{if(!i.ok)return{section:e,area:0,error:null};let t=c(i,"diameter")/2;return{section:e,area:Math.PI*t*t,error:null}}case"annulus":{if(!i.ok||!r.ok)return{section:e,area:0,error:null};if(r.value>=i.value)return{section:e,area:0,error:`${a}: the inner diameter (${k(r.value,2)} ${eo}) has to be smaller than the outer diameter (${k(i.value,2)} ${eo}), otherwise there is no ring left.`};let t=c(i,"outer diameter")/2,s=c(r,"inner diameter")/2;return{section:e,area:Math.PI*(t*t-s*s),error:null}}case"tri":if(!i.ok||!r.ok)return{section:e,area:0,error:null};if(0===i.value||0===r.value)return{section:e,area:0,error:`${a}: a triangle needs both a base and a height above zero.`};return{section:e,area:c(i,"base")*c(r,"height")/2,error:null};default:return{section:e,area:0,error:null}}}),eC=eS.filter(e=>e.area>0),eT=eS.filter(e=>null!==e.error),eU=eC.reduce((e,t)=>e+t.area,0),ez=eU>0,eA=J.filter(e=>e.enabled),eF=[],eJ=eA.filter(e=>{let t=$(e.size);return!!t.ok&&!(t.value<=0)||(eF.push(`${e.label} has no usable size, so it was left out of the order options.`),!1)}),eP=(e,t)=>{let a=$(e.size);return!a.ok||a.value<=0?0:"mass"===e.kind?a.value*ej:a.value*em*t},eL=A.map((e,t)=>{let a=e.name.trim()||`Layer ${t+1}`,s=x(e.materialId),n=[],l=[],i=$(e.depth);"negative"===i.problem&&n.push(`${a}: the depth is ${i.value}, and a depth cannot be negative.`),"nan"===i.problem&&n.push(`${a}: the depth is not a number.`);let r=i.ok?i.value*m(e.depthUnit):0;r>1.5&&(l.push(`The depth was capped at ${k(1.5/m(e.depthUnit),1)} ${e.depthUnit}, which is the deepest single layer this tool will price.`),r=1.5);let o=$(e.density);("negative"===o.problem||o.ok&&o.value<=0&&""!==e.density.trim())&&n.push(`${a}: the density has to be a positive number of ${ef}.`),"nan"===o.problem&&n.push(`${a}: the density is not a number.`);let d=o.ok&&o.value>0?o.value*ev:0,h=$(e.allowancePct),c=h.ok?h.value:0;"negative"===h.problem&&n.push(`${a}: the allowance cannot be negative.`),"compact"===e.allowance&&c>=95&&l.push("A compaction figure that high is almost certainly a typo, so the order was held at 20 times the measured volume.");let u=function(e,t){if("settle"===e)return 1+t/100;let a=1-t/100;return a<=.05?20:1/a}(e.allowance,c);null!==s.stoneMm&&r>0&&r<2*s.stoneMm/1e3&&l.push(`${s.label} is nominally ${s.stoneMm} mm stone, and a common rule of thumb is at least two stones deep, so around ${k(2*s.stoneMm/1e3/m(e.depthUnit),1)} ${e.depthUnit}. At ${k(i.value,2)} ${e.depthUnit} the stones sit in a single layer and shift underfoot.`),r>.3&&l.push(`That depth is ${k(1e3*r,0)} mm, or about ${k(r/.0254,1)} in. Worth a second look before you order, since nothing is blocked here.`),"mot"===e.materialId&&"settle"===e.allowance&&l.push("Crusher run is a sub base that gets compacted rather than left to settle, so the compaction setting is usually the right one for it.");let p=eU*r,g=p*u,y=g*d,f=null;!i.ok||r<=0?f=`${a} has no depth yet, so it is not in the total.`:d<=0?f=`${a} has no density yet, so it has a volume but no weight.`:ez||(f="There is no measured area yet, so this layer has nothing to sit on.");let v=eJ.map(e=>eP(e,d)),b=eJ.map(t=>{let a=$(e.prices[t.id]??"");return a.ok&&a.value>0?a.value:null}),j=y>0&&eJ.length>0?function(e,t,a){let s=t.length;if(0===s)return{rows:[],rankedByPrice:!1,hitCandidateCap:!1,overCap:!1,fellBack:!1};let n=t.map((e,t)=>t).sort((e,a)=>(t[a]??0)-(t[e]??0)),l=n.map(e=>t[e]??0),i=a.length>0&&a.every(e=>null!==e&&e>0),r=[],o=Array(s).fill(0),d=0,h=!1,c=!1,u=(e,t)=>{if(d>=4e4){h=!0;return}let a=l[e]??0;if(a<=0)return;if(e===s-1){d++;let s=Math.max(0,Math.ceil((t-1e-9)/a));if(s>30){c=!0;return}o[e]=s,r.push(o.slice());return}let n=Math.ceil((t-1e-9)/a),i=Math.min(30,Math.max(0,n));n>30&&(c=!0);for(let s=0;s<=i&&(o[e]=s,u(e+1,t-s*a),!(d>=4e4));s++);o[e]=0};u(0,e);let m=t=>{let r=0,o=0,d=0;for(let e=0;e<s;e++){let s=t[e]??0;r+=s*(l[e]??0),o+=s,d+=s*(a[n[e]??0]??0)}if(0===o||r<e-1e-9)return null;for(let a=0;a<s;
1a++)if((t[a]??0)>0&&r-(l[a]??0)>=e-1e-9)return null;let h=Array(s).fill(0);for(let e=0;e<s;e++)h[n[e]??0]=t[e]??0;return{counts:h,kg:r,surplusKg:r-e,price:i?d:null,units:o,exact:1e-6>Math.abs(r-e)}},p=[];for(let e of r){let t=m(e);t&&p.push(t)}let g=!1;if(0===p.length){let t=l[0]??0;if(t>0){let l=Math.max(1,Math.ceil((e-1e-9)/t)),r=Array(s).fill(0);r[n[0]??0]=l;let o=l*t;p.push({counts:r,kg:o,surplusKg:o-e,price:i?l*(a[n[0]??0]??0):null,units:l,exact:1e-6>Math.abs(o-e)}),g=!0}}let x=i&&p.length>0;return p.sort((e,t)=>{if(x){let a=(e.price??0)-(t.price??0);if(Math.abs(a)>1e-9)return a}let a=e.surplusKg-t.surplusKg;return Math.abs(a)>1e-6?a:e.units-t.units}),{rows:p.slice(0,5),rankedByPrice:x,hitCandidateCap:h,overCap:c,fellBack:g}}(y,v,b):null,w=j?.rows[0]??null;return{layer:e,material:s,depthM:r,densityKgM3:d,geoM3:p,factor:u,orderM3:g,needKg:y,buy:j,unitKg:v,cost:w&&null!==w.price?w.price:null,errors:n,warnings:l,excluded:f}}),eI=eL.filter(e=>null===e.excluded),eR=eI.reduce((e,t)=>e+t.orderM3,0),eD=eI.reduce((e,t)=>e+t.needKg,0),eK=$(R),eB=eI.length>0&&eI.every(e=>null!==e.cost)?eI.reduce((e,t)=>e+(t.cost??0),0)+(eK.ok?eK.value:0):null,eW=J.find(e=>e.id===W)??J[0],eq=eL[Math.min(_,eL.length-1)]??null,e_=$(K),eE=null;if(eW&&eq&&e_.ok&&e_.value>0&&eq.densityKgM3>0&&eq.depthM>0){let e=eP(eW,eq.densityKgM3);if(e>0){let t=e_.value*e,a=t/eq.densityKgM3,s=a/eq.factor;eE={kg:t,looseM3:a,finishedM3:s,area:s/eq.depthM}}}let eG=$(G),eO=$(H),eH=$(V),eY=eG.ok&&eO.ok?eG.value*ed*(eO.value*ed):0,eV=ez&&eH.ok?eU*(1+eH.value/100):0,eQ=eY>0&&eV>0?Math.ceil(eV/eY-1e-9):0;function eX(t,a){return JSON.stringify({v:1,u:e,c:L,dl:R,s:t.map(e=>({n:e.name,k:e.shape,a:e.a,b:e.b})),l:a.map(e=>({n:e.name,m:e.materialId,g:e.density,d:e.depth,du:e.depthUnit,ak:e.allowance,av:e.allowancePct,p:e.prices})),bu:J.map(e=>({i:e.id,z:e.size,e:e.enabled}))})}function eZ(){let e=new URLSearchParams,t=a.slice(),s=A.slice(),n=[],l=encodeURIComponent(eX(t,s));for(;l.length>1700&&t.length>1;){let e=t.pop();e&&n.push(e.name.trim()||"an unnamed section"),l=encodeURIComponent(eX(t,s))}for(;l.length>1700&&s.length>1;){let e=s.pop();e&&n.push(`the ${e.name.trim()||"unnamed"} layer`),l=encodeURIComponent(eX(t,s))}return e.set("j",l),n.length&&e.set("d",n.join("|")),{params:e,lost:n}}let e0=eZ().lost;(0,i.Vd)("tb-gravel-job",()=>eX(a,A),[a,A,J,e,L,R]);let e1=(e,t)=>z(a=>a.map(a=>a.id===e?{...a,...t}:a)),e2=(e,t)=>F(a=>a.map(a=>a.id===e?{...a,...t}:a));function e3(e){let t=[];return eJ.forEach((a,s)=>{let n=e.counts[s]??0;n>0&&t.push(`${n} x ${a.label}`)}),t.length?t.join(" plus "):"nothing"}function e5(e,t){return e.densityKgM3<=0||e.depthM<=0||e.factor<=0?0:t.surplusKg/e.densityKgM3/e.factor/e.depthM}async function e4(){let{ok:e,note:t}=await (0,h.copyText)(function(){let e=[];for(let t of(e.push("Gravel order, worked out on ToolBreezy"),e.push(`Area: ${k(ew(eU),1)} ${eh} across ${eC.length} section${1===eC.length?"":"s"}${eC.length!==a.length?` (${a.length-eC.length} not counted)`:""}`),eC))e.push(` ${t.section.name.trim()||"Section"}: ${k(ew(t.area),1)} ${eh}`);for(let t of(e.push(""),eL)){let a=t.layer.name.trim()||"Layer";if(t.excluded){e.push(`${a}: not counted, ${t.excluded}`);continue}let s=`${k(t.depthM/m(t.layer.depthUnit),2)} ${t.layer.depthUnit}`;e.push(`${a}: ${t.material.label} at ${s}`),e.push(` Measured volume: ${k(eN(t.geoM3),2)} ${eu}`),e.push(` ${"compact"===t.layer.allowance?"Compaction":"Settlement"} allowance ${k($(t.layer.allowancePct).value,1)}%, so order ${k(eN(t.orderM3),2)} ${eu}`);let n=$(t.layer.density).value,l=er?t.material.kgM3/.5932764212577829:t.material.kgM3;e.push(Math.round(n)===Math.round(l)?` Density used: ${k(n,0)} ${ef}, the typical figure for ${t.material.label}`:` Density used: ${k(n,0)} ${ef}, your own figure, against ${k(l,0)} ${ef} typical for ${t.material.label}`),e.push(` Weight: ${k(e$(t.needKg),2)} ${ep} (${k(ek(t.needKg),0)} ${ex})`);let i=t.buy?.rows[0];i&&(e.push(` Order: ${e3(i)}`),e.push(` Surplus: ${k(e$(i.surplusKg),2)} ${ep}, which is another ${k(ew(e5(t,i)),1)} ${eh} at the same depth`)),e.push("")}return null!==eB&&e.push(`Total with delivery: ${L}${k(eB,2)}`),e.push("Confirm the density and the minimum load with the yard before ordering."),e.join("\n")}());el(t),e&&(es(!0),setTimeout(()=>es(!1),1600))}let e7=eI.length>0&&eD>0;return(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,s.jsx)(r.J,{className:"text-sm",children:"Measurements in"}),(0,s.jsx)("div",{className:"flex rounded-md border p-0.5",children:["us","metric"].map(a=>(0,s.jsx)("button",{type:"button",onClick:()=>
1(function(a){if(a===e)return;let s="us"===a?.3048:1,n="us"===a?.09290304:1,l="us"===a?.5932764212577829:1;z(e=>e.map(e=>"area"===e.shape?{...e,a:M(e.a,ec,n)}:{...e,a:M(e.a,ed,s),b:M(e.b,ed,s)})),F(e=>e.map(e=>({...e,density:M(e.density,ev,l)}))),P("us"===a?f.map(e=>({...e})):v.map(e=>({...e}))),q("us"===a?"ston":"tonne"),O(M(G,ed,s)),Y(M(H,ed,s)),t(a)})(a),className:(0,c.cn)("rounded px-3 py-1 text-sm",e===a?"bg-primary text-primary-foreground":"text-muted-foreground"),children:"us"===a?"Feet and tons":"Meters and tonnes"},a))}),(0,s.jsx)("span",{className:"text-xs text-muted-foreground",children:"Switching reconverts your measurements and densities, so the answer stays the same size. The bag and bulk sizes below go back to the ones that system sells."})]}),X&&(0,s.jsx)("p",{className:U,children:"That shared link could not be read, so nothing was filled in from it. Type your own job below, or ask whoever sent it for a fresh link."}),ee.length>0&&(0,s.jsxs)("p",{className:U,children:["The link that opened this page was too long to carry everything, so ",ee.join(", ")," did not come across. Add ",1===ee.length?"it":"them"," back before you trust the total."]}),(0,s.jsxs)("div",{className:C,children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-baseline justify-between gap-2",children:[(0,s.jsx)(r.J,{children:"The ground you are covering"}),(0,s.jsxs)("span",{className:"text-xs text-muted-foreground",children:[a.length," of ",12," sections used"]})]}),a.map((e,t)=>{let n=p.find(t=>t.key===e.shape)??p[0],i=eS[t];return(0,s.jsxs)("div",{className:"rounded-md border bg-background p-2 space-y-2",children:[(0,s.jsxs)("div",{className:"grid gap-2 sm:grid-cols-[1fr_1fr_auto]",children:[(0,s.jsxs)("div",{className:"space-y-1",children:[(0,s.jsx)(r.J,{htmlFor:`gv-name-${e.id}`,className:"text-xs",children:"Name"}),(0,s.jsx)(l.p,{id:`gv-name-${e.id}`,value:e.name,maxLength:40,onChange:t=>e1(e.id,{name:t.target.value})})]}),(0,s.jsxs)("div",{className:"space-y-1",children:[(0,s.jsx)(r.J,{htmlFor:`gv-shape-${e.id}`,className:"text-xs",children:"Shape"}),(0,s.jsx)("select",{id:`gv-shape-${e.id}`,className:S,value:e.shape,onChange:t=>e1(e.id,{shape:t.target.value}),children:p.map(e=>(0,s.jsx)("option",{value:e.key,children:e.label},e.key))})]}),(0,s.jsx)("div",{className:"flex items-end",children:(0,s.jsx)(o.$,{variant:"ghost",size:"sm",onClick:()=>z(t=>t.length>1?t.filter(t=>t.id!==e.id):t),disabled:1===a.length,children:"Remove"})})]}),(0,s.jsxs)("div",{className:"grid gap-2 sm:grid-cols-2",children:[n?.fields[0]&&(0,s.jsxs)("div",{className:"space-y-1",children:[(0,s.jsxs)(r.J,{htmlFor:`gv-a-${e.id}`,className:"text-xs",children:[n.fields[0]," (","area"===e.shape?eh:eo,")"]}),(0,s.jsx)(l.p,{id:`gv-a-${e.id}`,type:"number",inputMode:"decimal",min:0,step:"any",value:e.a,onChange:t=>e1(e.id,{a:t.target.value})})]}),n?.fields[1]&&(0,s.jsxs)("div",{className:"space-y-1",children:[(0,s.jsxs)(r.J,{htmlFor:`gv-b-${e.id}`,className:"text-xs",children:[n.fields[1]," (",eo,")"]}),(0,s.jsx)(l.p,{id:`gv-b-${e.id}`,type:"number",inputMode:"decimal",min:0,step:"any",value:e.b,onChange:t=>e1(e.id,{b:t.target.value})})]})]}),(0,s.jsxs)("p",{className:"text-xs text-muted-foreground",children:[n?.hint," ",i&&i.area>0&&!i.error?`That is ${k(ew(i.area),1)} ${eh}.`:"No area from this one yet."]}),i?.error&&(0,s.jsx)("p",{className:"rounded-md border border-red-500/40 bg-red-500/10 px-2 py-1.5 text-xs",children:i.error})]},e.id)}),(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,s.jsx)(o.$,{variant:"outline",size:"sm",onClick:function(){z(e=>e.length>=12?e:[...e,{id:b++,name:`Section ${e.length+1}`,shape:"rect",a:"",b:""}])},disabled:a.length>=12,children:"Add a section"}),(0,s.jsx)("span",{className:"text-xs text-muted-foreground",children:a.length>=12?"That is the 12 section limit, so add the rest as a second job.":"Up to 12 sections, which is how an odd shaped plot gets measured in pieces."})]}),(0,s.jsxs)("div",{className:T,children:[ez?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-baseline justify-between gap-2",children:[(0,s.jsx)("span",{className:"text-muted-foreground",children:"Total area"}),(0,s.jsxs)("span",{className:"text-lg font-semibold text-foreground",children:[k(ew(eU),1)," ",eh
1]})]}),(0,s.jsxs)("p",{className:"mt-1 text-xs text-muted-foreground",children:["Counted from ",eC.length," of ",a.length," section",1===a.length?"":"s",".",eC.length!==a.length?` The rest are blank or unusable, so they add nothing: ${eS.filter(e=>e.area<=0).map(e=>e.section.name.trim()||"unnamed").join(", ")}.`:""]})]}):(0,s.jsx)("span",{className:"text-muted-foreground",children:"Put a size on at least one section. Until then there is nothing to work out, so nothing is shown."}),eT.length>0&&(0,s.jsxs)("p",{className:"mt-1 text-xs text-muted-foreground",children:[eT.length," section",1===eT.length?"":"s"," could not be read and"," ",1===eT.length?"is":"are"," not in the total:"," ",eT.map(e=>e.section.name.trim()||"unnamed").join(", "),"."]})]})]}),eM.length>0&&(0,s.jsx)("div",{className:U,children:(0,s.jsx)("ul",{className:"list-disc space-y-1 pl-4",children:eM.map((e,t)=>(0,s.jsx)("li",{children:e},`${t}-${e}`))})}),(0,s.jsxs)("div",{className:"space-y-3",children:[eL.map((e,t)=>{let a=e.layer;return $(a.depth),(0,s.jsxs)("div",{className:C,children:[(0,s.jsxs)("div",{className:"grid gap-2 sm:grid-cols-[1fr_2fr_auto]",children:[(0,s.jsxs)("div",{className:"space-y-1",children:[(0,s.jsx)(r.J,{htmlFor:`gv-lname-${a.id}`,className:"text-xs",children:"Layer name"}),(0,s.jsx)(l.p,{id:`gv-lname-${a.id}`,value:a.name,maxLength:40,onChange:e=>e2(a.id,{name:e.target.value})})]}),(0,s.jsxs)("div",{className:"space-y-1",children:[(0,s.jsx)(r.J,{htmlFor:`gv-mat-${a.id}`,className:"text-xs",children:"Material"}),(0,s.jsx)("select",{id:`gv-mat-${a.id}`,className:S,value:a.materialId,onChange:e=>(function(e,t){let a=x(t);e2(e.id,{materialId:t,density:er?String(Math.round(a.kgM3/.5932764212577829)):String(a.kgM3)})})(a,e.target.value),children:g.map(e=>(0,s.jsx)("option",{value:e.id,children:e.label},e.id))})]}),(0,s.jsx)("div",{className:"flex items-end",children:(0,s.jsx)(o.$,{variant:"ghost",size:"sm",onClick:()=>F(e=>e.length>1?e.filter(e=>e.id!==a.id):e),disabled:1===A.length,children:"Remove"})})]}),(0,s.jsx)("p",{className:"text-xs text-muted-foreground",children:e.material.note}),(0,s.jsxs)("div",{className:"grid gap-2 sm:grid-cols-3",children:[(0,s.jsxs)("div",{className:"space-y-1",children:[(0,s.jsx)(r.J,{htmlFor:`gv-depth-${a.id}`,className:"text-xs",children:"Depth"}),(0,s.jsxs)("div",{className:"flex gap-1",children:[(0,s.jsx)(l.p,{id:`gv-depth-${a.id}`,type:"number",inputMode:"decimal",min:0,step:"any",value:a.depth,onChange:e=>e2(a.id,{depth:e.target.value})}),(0,s.jsx)("select",{"aria-label":`Depth unit for ${a.name||"this layer"}`,className:(0,c.cn)(S,"w-20"),value:a.depthUnit,onChange:e=>e2(a.id,{depthUnit:e.target.value}),children:u.map(e=>(0,s.jsx)("option",{value:e.key,children:e.label},e.key))})]})]}),(0,s.jsxs)("div",{className:"space-y-1",children:[(0,s.jsxs)(r.J,{htmlFor:`gv-dens-${a.id}`,className:"text-xs",children:["Density (",ef,")"]}),(0,s.jsx)(l.p,{id:`gv-dens-${a.id}`,type:"number",inputMode:"decimal",min:0,step:"any",value:a.density,onChange:e=>e2(a.id,{density:e.target.value})})]}),(0,s.jsxs)("div",{className:"space-y-1",children:[(0,s.jsx)(r.J,{htmlFor:`gv-allow-${a.id}`,className:"text-xs",children:"compact"===a.allowance?"Compaction loss (%)":"Settlement (%)"}),(0,s.jsxs)("div",{className:"flex gap-1",children:[(0,s.jsx)(l.p,{id:`gv-allow-${a.id}`,type:"number",inputMode:"decimal",min:0,step:"any",value:a.allowancePct,onChange:e=>e2(a.id,{allowancePct:e.target.value})}),(0,s.jsxs)("select",{"aria-label":`Allowance type for ${a.name||"this layer"}`,className:(0,c.cn)(S,"w-28"),value:a.allowance,onChange:e=>e2(a.id,{allowance:e.target.value,allowancePct:"settle"===e.target.value?"8":"20"}),children:[(0,s.jsx)("option",{value:"compact",children:"Compacted"}),(0,s.jsx)("option",{value:"settle",children:"Left to settle"})]})]})]})]}),(0,s.jsxs)("p",{className:"text-xs text-muted-foreground",children:["The density starts at a typical loose figure for ",e.material.label.toLowerCase(),", usually somewhere between ",k(er?e.material.lo/.5932764212577829:e.material.lo,0)," and"," ",k(er?e.material.hi/.5932764212577829:e.material.hi,0)," ",ef,". It is y
1our assumption, not a fact about your pile, so if the quarry quotes their own figure type it in and the order moves with it. All ",g.length," materials work the same way."]}),(0,s.jsx)("div",{className:"flex flex-wrap gap-1",children:y.map(e=>(0,s.jsxs)("button",{type:"button",title:e.why,onClick:()=>{e2(a.id,{depth:String(er?e.inch:e.mm),depthUnit:er?"in":"mm"})},className:"rounded-full border px-2 py-1 text-xs text-muted-foreground hover:bg-muted",children:[e.label," (",er?`${e.inch} in`:`${e.mm} mm`,")"]},e.label))}),(0,s.jsx)("p",{className:"text-xs text-muted-foreground",children:"Those are rules of thumb with the reason attached, not a specification. Hover one to see why it is that deep. Nothing here is enforced, so you can type whatever the job actually needs."}),eJ.length>0&&(0,s.jsx)("div",{className:"grid gap-2 sm:grid-cols-3",children:eJ.map(e=>(0,s.jsxs)("div",{className:"space-y-1",children:[(0,s.jsxs)(r.J,{htmlFor:`gv-price-${a.id}-${e.id}`,className:"text-xs",children:[L," per ",e.label]}),(0,s.jsx)(l.p,{id:`gv-price-${a.id}-${e.id}`,type:"number",inputMode:"decimal",min:0,step:"any",placeholder:"optional",value:a.prices[e.id]??"",onChange:t=>e2(a.id,{prices:{...a.prices,[e.id]:t.target.value}})})]},e.id))}),e.errors.map(e=>(0,s.jsx)("p",{className:"rounded-md border border-red-500/40 bg-red-500/10 px-2 py-1.5 text-xs",children:e},e)),e.warnings.map(e=>(0,s.jsx)("p",{className:(0,c.cn)(U,"text-xs"),children:e},e)),(0,s.jsx)("div",{className:T,"aria-live":"polite",children:e.excluded?(0,s.jsx)("span",{className:"text-muted-foreground",children:e.excluded}):(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsxs)("div",{className:"space-y-1 text-xs text-muted-foreground",children:[(0,s.jsxs)("div",{children:[k(ew(eU),1)," ",eh," at"," ",k(e.depthM/m(a.depthUnit),2)," ",a.depthUnit," is"," ",(0,s.jsxs)("span",{className:"text-foreground",children:[k(eN(e.geoM3),2)," ",eu]})," ","measured."]}),(0,s.jsxs)("div",{children:["compact"===a.allowance?`Compacting loses ${k($(a.allowancePct).value,1)}%, so the buy is the measured volume divided by ${k(1/e.factor,3)}, which is x${k(e.factor,3)}.`:`Settling adds ${k($(a.allowancePct).value,1)}%, so the buy is the measured volume x${k(e.factor,3)}.`," ","Order"," ",(0,s.jsxs)("span",{className:"text-foreground",children:[k(eN(e.orderM3),2)," ",eu]}),"."]}),(0,s.jsxs)("div",{children:["At ",k($(a.density).value,0)," ",ef," that weighs"," ",(0,s.jsxs)("span",{className:"text-foreground",children:[k(e$(e.needKg),2)," ",ep]})," ","(",k(ek(e.needKg),0)," ",ex,")."]})]}),e.buy&&e.buy.rows.length>0?(0,s.jsxs)("div",{className:"space-y-1",children:[(0,s.jsxs)("div",{className:"text-xs text-muted-foreground",children:[e.buy.rankedByPrice?"Ranked by your own prices, cheapest first.":"Ranked by least left over, because no price was entered for every unit."," ","Combinations were searched up to ",30," of each unit.",e.buy.overCap?" This job needs more than that of at least one unit, so the bigger units carry it.":"",e.buy.hitCandidateCap?" The search stopped at its limit, so treat this as a good list rather than every possibility.":"",e.buy.fellBack?" Nothing fit inside the search, so this is a straight count of the largest unit.":""]}),(0,s.jsx)("div",{className:"overflow-x-auto",children:(0,s.jsxs)("table",{className:"w-full min-w-[24rem] text-left text-xs",children:[(0,s.jsx)("thead",{className:"text-muted-foreground",children:(0,s.jsxs)("tr",{children:[(0,s.jsx)("th",{className:"py-1 pr-2 font-medium",children:"Buy"}),(0,s.jsx)("th",{className:"py-1 pr-2 font-medium",children:"Weight"}),(0,s.jsx)("th",{className:"py-1 pr-2 font-medium",children:"Spare"}),(0,s.jsx)("th",{className:"py-1 font-medium",children:e.buy.rankedByPrice?"Price":"Units"})]})}),(0,s.jsx)("tbody",{children:e.buy.rows.map((t,a)=>(0,s.jsxs)("tr",{className:0===a?"font-medium text-foreground":"",children:[(0,s.jsx)("td",{className:"py-1 pr-2",children:e3(t)}),(0,s.jsxs)("td",{className:"py-1 pr-2",children:[k(e$(t.kg),2)," ",ep]}),(0,s.jsx)("td",{className:"py-1 pr-2",children:t.exact?"lands exactly":`${k(e$(t.surplusKg),2)} ${ep}, another ${k(ew(e5(e,t)),1)} ${eh} at this depth`}),(0,s.jsx)("td",{className:"py-1",children:e.buy?.rankedByPrice&&null!==t.price?`${L}${k(t.price,2)}`:`${t.units}`})]},t.counts.join("-")))})]})})]}):(0,s.jsx)("p",{className:"text-xs text-muted-foreground",children:0===eJ.length?"No purchasable unit is switched on, so there is nothing to add up into an order. Turn one on below.":"No combination of the units you switched on covers this weight, so nothing is listed rather than an empty order."})]})}),0===t&&1===A.length&&(0,s.jsx)("p",{className:"text-xs text-muted-foreground",children:"A driveway is usually two layers, coarse stone underneath and something finer on top. Add a second layer and each one gets its own material, density, depth and order line."})]},a.id)}),(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,s.jsx)(o.$,{variant:"outline",size:"sm",onClick:function(){F(e=>{if(e.length>=4)return e;let t=x(0===e.length?"crushed20":"mot");return[...e,{id:j++,name:0===e.length?"Gravel":1===e.length?"Base course":`L
1ayer ${e.length+1}`,materialId:t.id,density:er?String(Math.round(t.kgM3/.5932764212577829)):String(t.kgM3),depth:er?"4":"100",depthUnit:er?"in":"mm",allowance:"compact",allowancePct:"20",prices:{}}]})},disabled:A.length>=4,children:"Add a layer"}),(0,s.jsx)("span",{className:"text-xs text-muted-foreground",children:A.length>=4?"That is the 4 layer limit.":`${A.length} of 4 layers. Every layer sits on the same total area.`})]})]}),(0,s.jsx)("div",{className:(0,c.cn)(T,"space-y-2"),"aria-live":"polite",children:e7?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-baseline justify-between gap-2",children:[(0,s.jsxs)("span",{className:"text-muted-foreground",children:["Whole job, ",eI.length," of ",A.length," layer",1===A.length?"":"s"]}),(0,s.jsxs)("span",{className:"text-lg font-semibold text-foreground",children:[k(e$(eD),2)," ",ep]})]}),(0,s.jsxs)("p",{className:"text-xs text-muted-foreground",children:[k(eN(eR),2)," ",eu," to order in total, which is ",k(ek(eD),0)," ",ex,". Different layers are different materials, so the weight is a sum of separate orders rather than one pile.",eI.length!==A.length?` ${A.length-eI.length} layer is left out until it has a depth and a density.`:""]}),null!==eB?(0,s.jsxs)("p",{className:"text-xs text-muted-foreground",children:["Cheapest option on every layer plus delivery comes to ",L,k(eB,2),", using the prices you typed and nothing else."]}):(0,s.jsx)("p",{className:"text-xs text-muted-foreground",children:"No cost is shown because at least one layer has no price on every unit. Type your quoted prices above and the ranking switches from least spare to cheapest."})]}):(0,s.jsx)("span",{className:"text-muted-foreground",children:"Nothing to total yet. A layer needs an area, a depth and a density before it can produce a weight."})}),(0,s.jsxs)("div",{className:C,children:[(0,s.jsx)(r.J,{children:"What your supplier actually sells"}),(0,s.jsx)("div",{className:"space-y-2",children:J.map(e=>(0,s.jsxs)("div",{className:"grid gap-2 sm:grid-cols-[auto_1fr_1fr] sm:items-end",children:[(0,s.jsxs)("label",{className:"flex items-center gap-2 text-sm",children:[(0,s.jsx)("input",{type:"checkbox",checked:e.enabled,onChange:t=>P(a=>a.map(a=>a.id===e.id?{...a,enabled:t.target.checked}:a))}),e.label]}),(0,s.jsxs)("div",{className:"space-y-1",children:[(0,s.jsxs)(r.J,{htmlFor:`gv-unit-${e.id}`,className:"text-xs",children:["Holds (","mass"===e.kind?eb:eu,")"]}),(0,s.jsx)(l.p,{id:`gv-unit-${e.id}`,type:"number",inputMode:"decimal",min:0,step:"any",value:e.size,onChange:t=>P(a=>a.map(a=>a.id===e.id?{...a,size:t.target.value}:a))})]}),(0,s.jsx)("p",{className:"text-xs text-muted-foreground",children:"mass"===e.kind?"Sold by weight, so the fill varies with the stone. Change it to whatever the bag says.":"Sold by volume, so its weight follows the density on each layer."})]},e.id))}),eF.map(e=>(0,s.jsx)("p",{className:(0,c.cn)(U,"text-xs"),children:e},e)),(0,s.jsxs)("div",{className:"grid gap-2 sm:grid-cols-2",children:[(0,s.jsxs)("div",{className:"space-y-1",children:[(0,s.jsx)(r.J,{htmlFor:"gv-cur",className:"text-xs",children:"Currency symbol"}),(0,s.jsx)(l.p,{id:"gv-cur",value:L,maxLength:3,onChange:e=>I(e.target.value)})]}),(0,s.jsxs)("div",{className:"space-y-1",children:[(0,s.jsx)(r.J,{htmlFor:"gv-del",className:"text-xs",children:"Delivery charge"}),(0,s.jsx)(l.p,{id:"gv-del",type:"number",inputMode:"decimal",min:0,step:"any",placeholder:"optional",value:R,onChange:e=>D(e.target.value)})]})]})]}),(0,s.jsxs)("div",{className:C,children:[(0,s.jsx)(r.J,{children:"Already ordered? See what it covers"}),(0,s.jsxs)("div",{className:"grid gap-2 sm:grid-cols-3",children:[(0,s.jsxs)("div",{className:"space-y-1",children:[(0,s.jsx)(r.J,{htmlFor:"gv-bqty",className:"text-xs",children:"How many"}),(0,s.jsx)(l.p,{id:"gv-bqty",type:"number",inputMode:"decimal",min:0,step:"any",value:K,onChange:e=>B(e.target.value)})]}),(0,s.jsxs)("div",{className:"space-y-1",children:[(0,s.jsx)(r.J,{htmlFor:"gv-bunit",className:"text-xs",children:"Of what"}),(0,s.jsx)("select",{id:"gv-bunit",className:S,value:W,onChange:e=>q(e.target.value),children:J.map(e=>(0,s.jsx)("option",{value:e.id,children:e.label},e.id))})]}),(0,s.jsxs)("div",{className:"space-y-1",children:[(0,s.jsx)(r.J,{htmlFor:"gv-blayer",className:"text-xs",children:"For which layer"}),(0,s.jsx)("select",{id:"gv-blayer",className:S,value:String(_),onChange:e=>E(Number(e.target.value)),children:A.map((e,t)=>(0,s.jsx)("option",{value:t,children:e.name.trim()||`Layer ${t+1}`},e.id))})]})]}),(0,s.jsx)("div",{className:T,"aria-live":"polite",children:eE&&eq?(0,s.jsxs)("div",{className:"space-y-1 text-xs text-muted-foreground",children:[(0,s.jsxs)("div",{children:["That is ",k(e$(eE.kg),2)," ",ep,", about ",k(eN(eE.looseM3),2)," ",eu," ","loose."]}),(0,s.jsxs)("div",{children:["After the ","compact"===eq.layer.allowance?"compaction":"settlement"," allowance it finishes as ",k(eN(eE.finishedM3),2)," ",eu," in place, which covers"," ",(0,s.jsxs)("span",{className:"text-foreground",children:[k(ew(eE.area),1)," ",eh
1]})," ","at ",k(eq.depthM/m(eq.layer.depthUnit),2)," ",eq.layer.depthUnit,"."]}),ez&&(0,s.jsx)("div",{children:eE.area>=eU?`Your ${k(ew(eU),1)} ${eh} is covered, with ${k(ew(eE.area-eU),1)} ${eh} of that depth spare.`:`You are short by ${k(ew(eU-eE.area),1)} ${eh} at that depth, so the last stretch either goes thinner or waits for another load.`})]}):(0,s.jsx)("span",{className:"text-muted-foreground",children:"Type what you already bought and pick the layer it was for. The layer needs a depth and a density first, since that is what turns weight back into ground covered."})})]}),(0,s.jsxs)("div",{className:C,children:[(0,s.jsx)(r.J,{children:"Weed membrane, if you are laying any"}),(0,s.jsxs)("div",{className:"grid gap-2 sm:grid-cols-3",children:[(0,s.jsxs)("div",{className:"space-y-1",children:[(0,s.jsxs)(r.J,{htmlFor:"gv-rw",className:"text-xs",children:["Roll width (",eo,")"]}),(0,s.jsx)(l.p,{id:"gv-rw",type:"number",inputMode:"decimal",min:0,step:"any",value:G,onChange:e=>O(e.target.value)})]}),(0,s.jsxs)("div",{className:"space-y-1",children:[(0,s.jsxs)(r.J,{htmlFor:"gv-rl",className:"text-xs",children:["Roll length (",eo,")"]}),(0,s.jsx)(l.p,{id:"gv-rl",type:"number",inputMode:"decimal",min:0,step:"any",value:H,onChange:e=>Y(e.target.value)})]}),(0,s.jsxs)("div",{className:"space-y-1",children:[(0,s.jsx)(r.J,{htmlFor:"gv-ov",className:"text-xs",children:"Overlap allowance (%)"}),(0,s.jsx)(l.p,{id:"gv-ov",type:"number",inputMode:"decimal",min:0,step:"any",value:V,onChange:e=>Q(e.target.value)})]})]}),(0,s.jsx)("p",{className:"text-xs text-muted-foreground",children:eQ>0?`${eQ} roll${1===eQ?"":"s"} covers ${k(ew(eV),1)} ${eh} including the overlap. This counts area only, so an awkward shape wastes more than the numbers suggest and one spare roll is cheap insurance.`:"Type a roll size and this counts the rolls, overlap included. It is an area count rather than a cutting plan."})]}),(0,s.jsxs)("div",{className:C,children:[(0,s.jsx)(r.J,{children:"What these numbers assume"}),(0,s.jsxs)("ul",{className:"list-disc space-y-1 pl-4 text-xs text-muted-foreground",children:[(0,s.jsx)("li",{children:"The density on every layer is a typical figure you can overwrite. Wet stone weighs more than dry stone from the same pile, so a few percent either way is normal."}),(0,s.jsx)("li",{children:"The compaction and settlement allowances are estimates. What you actually finish at depends on the equipment, the subgrade and the material."}),(0,s.jsx)("li",{children:"Depth suggestions are rules of thumb, not an engineering specification for anything carrying vehicles."}),(0,s.jsx)("li",{children:"Prices, bag fill weights, delivery minimums and availability are yours to type. Nothing is fetched and nothing here is a quote."})]})]}),(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,s.jsx)(o.$,{variant:"outline",size:"sm",onClick:e4,disabled:!e7,children:ea?"Summary copied":"Copy the order as text"}),(0,s.jsx)(o.$,{variant:"outline",size:"sm",onClick:()=>window.print(),children:"Print"}),en&&(0,s.jsx)("span",{role:"status","aria-live":"polite",className:"text-xs text-destructive",children:en}),(0,s.jsx)("span",{className:"text-xs text-muted-foreground",children:"The text version carries the density and the allowance with it, so nobody can quote the tonnage without the assumptions behind it."})]}),e0.length>0&&(0,s.jsxs)("p",{className:(0,c.cn)(U,"text-xs"),children:["This job is long enough that a share link cannot carry all of it, so ",e0.join(", ")," came off the end. The link names ",1===e0.length?"it":"them",", so whoever opens it knows what is missing."]}),(0,s.jsx)("p",{className:"text-xs text-muted-foreground",children:"Everything runs in your browser and nothing you type is uploaded. Your job is kept on this device so you can measure on a Saturday and order on a Tuesday, and the share link carries the whole thing including the densities you edited."}),(0,s.jsx)(d.ToolActions,{getParams:function(){return eZ().params},title:"Gravel Calculator"})]})}}}]);
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.