1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9722],{1186:(e,t,a)=>{a.d(t,{bq:()=>m,eb:()=>u,gC:()=>h,l6:()=>d,yv:()=>c});var r=a(5155),i=a(2115),s=a(3926),n=a(4033),l=a(5917),o=a(4269);let d=s.bL;s.YJ;let c=s.WT,m=i.forwardRef((e,t)=>{let{className:a,children:i,...l}=e;return(0,r.jsxs)(s.l9,{ref:t,className:(0,o.cn)("flex h-12 w-full items-center justify-between gap-2 rounded-xl border border-gray-200 bg-white px-4 py-3 text-sm font-medium text-gray-900 shadow-sm transition-all duration-200","hover:border-gray-300","focus:border-primary-500 focus:outline-none focus:ring-2 focus:ring-primary-100","disabled:cursor-not-allowed disabled:opacity-50","data-[placeholder]:text-gray-400",a),...l,children:[i,(0,r.jsx)(s.In,{asChild:!0,children:(0,r.jsx)(n.A,{className:"h-4 w-4 text-gray-400 shrink-0"})})]})});m.displayName=s.l9.displayName;let h=i.forwardRef((e,t)=>{let{className:a,children:i,position:n="popper",...l}=e;return(0,r.jsx)(s.ZL,{children:(0,r.jsx)(s.UC,{ref:t,className:(0,o.cn)("relative z-50 max-h-72 min-w-[8rem] overflow-hidden rounded-xl border border-gray-200 bg-white shadow-lg","data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95","data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95","data-[side=bottom]:slide-in-from-top-2 data-[side=top]:slide-in-from-bottom-2","popper"===n&&"data-[side=bottom]:translate-y-1 data-[side=top]:-translate-y-1",a),position:n,...l,children:(0,r.jsx)(s.LM,{className:(0,o.cn)("p-1","popper"===n&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:i})})})});h.displayName=s.UC.displayName;let u=i.forwardRef((e,t)=>{let{className:a,children:i,...n}=e;return(0,r.jsxs)(s.q7,{ref:t,className:(0,o.cn)("relative flex w-full cursor-pointer select-none items-center rounded-lg py-2.5 pl-3 pr-8 text-sm text-gray-700 outline-none transition-colors","hover:bg-primary-50 hover:text-primary-700","focus:bg-primary-50 focus:text-primary-700","data-[disabled]:pointer-events-none data-[disabled]:opacity-50",a),...n,children:[(0,r.jsx)("span",{className:"absolute right-2 flex h-4 w-4 items-center justify-center",children:(0,r.jsx)(s.VF,{children:(0,r.jsx)(l.A,{className:"h-4 w-4 text-primary-600"})})}),(0,r.jsx)(s.p4,{children:i})]})});u.displayName=s.q7.displayName},1546:(e,t,a)=>{a.d(t,{l:()=>n});var r=a(9203),i=a(1138),s=a(9863);let n=(0,i.v)()((0,s.Zr)(e=>({mode:"direct",setMode:t=>e({mode:t}),directValue:1,directUnit:"cubic_feet",setDirectValue:t=>e({directValue:t}),setDirectUnit:t=>e({directUnit:t}),shape:"box",setShape:t=>e({shape:t}),dimLength:1,dimWidth:1,dimHeight:1,dimRadius:1,dimLengthUnit:"feet",dimWidthUnit:"feet",dimHeightUnit:"feet",dimRadiusUnit:"feet",setDimLength:t=>e({dimLength:t}),setDimWidth:t=>e({dimWidth:t}),setDimHeight:t=>e({dimHeight:t}),setDimRadius:t=>e({dimRadius:t}),setDimLengthUnit:t=>e({dimLengthUnit:t}),setDimWidthUnit:t=>e({dimWidthUnit:t}),setDimHeightUnit:t=>e({dimHeightUnit:t}),setDimRadiusUnit:t=>e({dimRadiusUnit:t}),sceneType:"concrete",setSceneType:t=>e({sceneType:t}),precision:4,setPrecision:t=>e({precision:t}),show3D:!0,toggle3D:()=>e(e=>({show3D:!e.show3D})),history:[],addHistory:t=>e(e=>({history:[{...t,id:(0,r.h)("history"),timestamp:Date.now(),favorite:!1},...e.history].slice(0,100)})),toggleFavorite:t=>e(e=>({history:e.history.map(e=>e.id===t?{...e,favorite:!e.favorite}:e)})),clearHistory:()=>e({history:[]}),updateNote:(t,a)=>e(e=>({history:e.history.map(e=>e.id===t?{...e,note:a}:e)})),deleteHistoryEntry:t=>e(e=>({history:e.history.filter(e=>e.id!==t)})),historyFilter:"all",setHistoryFilter:t=>e({historyFilter:t}),historySearch:"",setHistorySearch:t=>e({historySearch:t})}),{name:"cubic-calculator-storage",partialize:e=>({history:e.history,precision:e.precision,show3D:e.show3D})}))},5142:(e,t,a)=>{a.d(t,{p:()=>n});var r=a(5155),i=a(2115),s=a(4269);let n=i.forwardRef((e,t)=>{let{className:a,label:n,suffix:l,error:o,helperText:d,type:c="number",id:m,...h}=e,u=m||i.useId(),p="".concat(u,"-message"),x=o||d;return(0,r.jsxs)("div",{className:"flex flex-col gap-1.5",children:[n&&(0,r.jsx)("label",{htmlFor:u,className:"text-sm font-medium text-gray-700",children:n}),(0,r.jsxs)("div",{className:"relative flex items-center",children:[(0,r.jsx)("input",{id:u,type:c,className:(0,s.cn)("flex h-12 w-full rounded-xl border border-gray-200 bg-white px-4 py-3 text-base font-medium text-gray-900 shadow-sm transition-all duration-200","placeholder:text-gray-400","hover:border-gray-300 hover:shadow","focus:border-primary-500 focus:outline-none focus:ring-4 focus:ring-blue-100 focus:shadow-md","aria-[invalid=true]:border-red-400 aria-[invalid=true]:ring-4 aria-[invalid=true]:ring-red-100","disabled:cursor-not-allowed disabled:opacity-50 disabled:bg-gray-50",l&&"pr-14",a),"aria-invalid":!!o,"aria-describedby":x?p:void 0,ref:t,...h}),l&&(0,r.jsx)("span",{className:"absolute right-4 text-sm font-medium text-gray-400 pointer-events-none",children:l})]}),x&&(0,r.jsx)("p",{id:p,className:(0,s.cn)("text-xs",o?"text-red-600":"text-gray-500"),children:x})]})});n.displayName="Input"},6140:(e,t,a)=>{a.d(t,{A:()=>r});let r=(0,a(1847).A)("Box",[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]])},6948:(e,t,a)=>{a.d(t,{Wu:()=>n,Zp:()=>s});var r=a(5155);a(2115);var i=a(4269);function s(e){let{className:t,...a}=e;return(0,r.jsx)("div",{className:(0,i.cn)("rounded-xl border border-gray-100 bg-white shadow-sm transition-all duration-200",t),...a})}function n(e){let{className:t,...a}=e;return(0,r.jsx)("div",{className:(0,i.cn)("p-6 pt-0",t),...a})}},9203:(e,t,a)=>{a.d(t,{h:()=>r});function r(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"id";if("undefined"!=typeof crypto){if("function"==typeof crypto.randomUUID)return crypto.randomUUID();if("function"==typeof crypto.getRandomValues){let t=crypto.getRandomValues(new Uint32Array(2));return"".concat(e,"-").concat(t[0].toString(36),"-").concat(t[1].toString(36))}}return"".concat(e,"-").concat(Date.now().toString(36),"-").concat(Math.random().toString(36).slice(2))}},9722:(e,t,a)=>{a.r(t),a.d(t,{DimensionCalculator:()=>g});var r=a(5155),i=a(1546),s=a(1065),n=a(5142),l=a(1186),o=a(6948),d=a(6140),c=a(1847);
1let m=(0,c.A)("Cylinder",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5v14a9 3 0 0 0 18 0V5",key:"aqi0yr"}]]),h=(0,c.A)("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]),u=(0,c.A)("Triangle",[["path",{d:"M13.73 4a2 2 0 0 0-3.46 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z",key:"14u9p9"}]]),p=[{id:"box",label:"Box / Rectangular",icon:(0,r.jsx)(d.A,{className:"h-5 w-5"})},{id:"cylinder",label:"Cylinder",icon:(0,r.jsx)(m,{className:"h-5 w-5"})},{id:"sphere",label:"Sphere",icon:(0,r.jsx)(h,{className:"h-5 w-5"})},{id:"cone",label:"Cone",icon:(0,r.jsx)(u,{className:"h-5 w-5"})}];function x(e){let{value:t,onChange:a}=e;return(0,r.jsxs)(l.l6,{value:t,onValueChange:e=>a(e),children:[(0,r.jsx)(l.bq,{className:"h-12 w-32",children:(0,r.jsx)(l.yv,{})}),(0,r.jsx)(l.gC,{children:s.HJ.map(e=>(0,r.jsxs)(l.eb,{value:e.id,children:[e.label," (",e.abbreviation,")"]},e.id))})]})}function g(){let e=(0,i.l)(e=>e.shape),t=(0,i.l)(e=>e.setShape),a=(0,i.l)(e=>e.dimLength),l=(0,i.l)(e=>e.dimWidth),d=(0,i.l)(e=>e.dimHeight),c=(0,i.l)(e=>e.dimRadius),m=(0,i.l)(e=>e.dimLengthUnit),h=(0,i.l)(e=>e.dimWidthUnit),u=(0,i.l)(e=>e.dimHeightUnit),g=(0,i.l)(e=>e.dimRadiusUnit),y=(0,i.l)(e=>e.setDimLength),f=(0,i.l)(e=>e.setDimWidth),b=(0,i.l)(e=>e.setDimHeight),v=(0,i.l)(e=>e.setDimRadius),j=(0,i.l)(e=>e.setDimLengthUnit),N=(0,i.l)(e=>e.setDimWidthUnit),w=(0,i.l)(e=>e.setDimHeightUnit),D=(0,i.l)(e=>e.setDimRadiusUnit),C=(0,i.l)(e=>e.addHistory),U=function(){let t=Math.max(0,a||0),r=Math.max(0,l||0),i=Math.max(0,d||0),n=Math.max(0,c||0);switch(e){case"box":return(0,s.GH)(t,r,i,m,h,u);case"cylinder":return(0,s.vC)(n,i,g,u);case"sphere":return(0,s.wn)(n,g);case"cone":return(0,s.k_)(n,i,g,u);default:return 0}}(),H=(0,s.oE)(U,"cubic_feet");function R(){U>0&&C({mode:"dimension",inputValue:U,inputUnit:e,resultCubicFeet:U,note:""})}function k(e,t){return Number.isNaN(e)?"Enter a valid number.":void 0!==t&&e<t?"Must be at least ".concat(t,"."):""}function W(e){return t=>{let a=parseFloat(t.target.value);e(isNaN(a)?0:a)}}function A(e){return t=>{var a;return a=()=>e(0),void("Enter"===t.key&&(t.preventDefault(),R(),t.currentTarget.blur()),"Escape"===t.key&&(t.preventDefault(),a()))}}return(0,r.jsxs)("div",{className:"space-y-6",children:[(0,r.jsx)("div",{className:"grid grid-cols-2 gap-2 sm:grid-cols-4",children:p.map(a=>(0,r.jsxs)("button",{onClick:()=>t(a.id),className:"flex items-center gap-2.5 rounded-xl border-2 px-4 py-3.5 text-sm font-medium transition-all duration-200 ".concat(e===a.id?"border-primary-500 bg-primary-50 text-primary-700 shadow-sm":"border-gray-200 bg-white text-gray-600 hover:border-gray-300 hover:bg-gray-50"),children:[a.icon,a.label]},a.id))}),(0,r.jsx)(o.Zp,{className:"border-primary-100 bg-gradient-to-br from-primary-50/30 to-white",children:(0,r.jsx)(o.Wu,{className:"p-6",children:(0,r.jsxs)("div",{className:"space-y-4",children:["box"===e&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"flex items-end gap-3",children:[(0,r.jsx)("div",{className:"flex-1",children:(0,r.jsx)(n.p,{label:"Length",value:a||"",onChange:W(y),onBlur:R,onKeyDown:A(y),min:0,step:"any",placeholder:"0",error:k(a,0)||void 0,autoFocus:!0})}),(0,r.jsx)(x,{value:m,onChange:j})]}),(0,r.jsxs)("div",{className:"flex items-end gap-3",children:[(0,r.jsx)("div",{className:"flex-1",children:(0,r.jsx)(n.p,{label:"Width",value:l||"",onChange:W(f),onBlur:R,onKeyDown:A(f),min:0,step:"any",placeholder:"0",error:k(l,0)||void 0})}),(0,r.jsx)(x,{value:h,onChange:N})]}),(0,r.jsxs)("div",{className:"flex items-end gap-3",children:[(0,r.jsx)("div",{className:"flex-1",children:(0,r.jsx)(n.p,{label:"Height",value:d||"",onChange:W(b),onBlur:R,onKeyDown:A(b),min:0,step:"any",placeholder:"0",error:k(d,0)||void 0})}),(0,r.jsx)(x,{value:u,onChange:w})]})]}),("cylinder"===e||"cone"===e)&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"flex items-end gap-3",children:[(0,r.jsx)("div",{className:"flex-1",children:(0,r.jsx)(n.p,{label:"Radius",value:c||"",onChange:W(v),onBlur:R,onKeyDown:A(v),min:0,step:"any",placeholder:"0",error:k(c,0)||void 0,autoFocus:!0})}),(0,r.jsx)(x,{value:g,onChange:D})]}),(0,r.jsxs)("div",{className:"flex items-end gap-3",children:[(0,r.jsx)("div",{className:"flex-1",children:(0,r.jsx)(n.p,{label:"Height",value:d||"",onChange:W(b),onBlur:R,onKeyDown:A(b),min:0,step:"any",placeholder:"0",error:k(d,0)||void 0})}),(0,r.jsx)(x,{value:u,onChange:w})]})]}),"sphere"===e&&(0,r.jsxs)("div",{className:"flex items-end gap-3",children:[(0,r.jsx)("div",{className:"flex-1",children:(0,r.jsx)(n.p,{label:"Radius",value:c||"",onChange:W(v),onBlur:R,onKeyDown:A(v),min:0,step:"any",placeholder:"0",error:k(c,0)||void 0,autoFocus:!0})}),(0,r.jsx)(x,{value:g,onChange:D})]})]})})}),(0,r.jsx)(o.Zp,{className:"border-green-100 bg-green-50/50",children:(0,r.jsxs)(o.Wu,{className:"p-6",children:[(0,r.jsx)("p",{className:"text-sm font-medium text-green-700",children:"Volume Result"}),(0,r.jsxs)("p",{className:"mt-1 font-mono text-3xl font-bold text-green-900",children:[(0,s.ZV)(U)," ",(0,r.jsx)("span",{className:"text-lg font-medium text-green-600",children:"ft\xb3"})]})]})}),(0,r.jsx)("div",{className:"grid grid-cols-2 gap-3 sm:grid-cols-3 lg:grid-cols-5",children:H.filter(e=>"cubic_feet"!==e.unit).map(e=>(0,r.jsx)(o.Zp,{className:"hover:border-gray-200 hover:shadow-md",children:(0,r.jsxs)(o.Wu,{className:"p-4",children:[(0,r.jsx)("p",{className:"text-xs font-medium uppercase tracking-wider text-gray-400",children:e.abbreviation}),(0,r.jsx)("p",{className:"mt-1 font-mono text-lg font-semibold text-gray-900",children:(0,s.ZV)(e.value)}),(0,r.jsx)("p",{className:"mt-0.5 text-xs text-gray-500",children:e.label})]})},e.unit))})]})}}}]);
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.