import{q as C,n as e,w as ce,L as X}from"./vendor-react-Br0ZiotI.js";import{bX as J,az as de,b5 as H,a2 as L,br as j,aa as me,B as K,by as N,G as I,H as U,ay as D,aB as B,D as Y,aC as Z,b7 as xe,bc as he,bd as ue,b8 as pe,ba as ee,aA as te,s as fe}from"./index-DHmWpjgK.js";import"./vendor-dayjs-CbzZgysf.js";import{d as be,C as ge,c as je}from"./MarketingShell-B9Sa-0Uh.js";import{T as Ce}from"./ToolPageSEO-B2OTMwdS.js";import{T as ye}from"./toolsMeta-CeuNOhcH.js";import{u as oe}from"./vendor-i18n-C54Hc0CQ.js";import{A as Ne}from"./arrow-left-26ItqGyo.js";import{B as ve}from"./boxes-BXpQehNN.js";import{P as le}from"./users-CcdVsMxi.js";import{T as we}from"./trash-2-LVg9XXy5.js";import{P as Fe}from"./plus-d-A6sPRo.js";import{C as ke}from"./globe-CjEndryE.js";import{R as qe}from"./ruler-pLzGj3Fh.js";import"./vendor-query-9i1Av1pr.js";import"./vendor-antd-core-CbYNMZQB.js";import"./vendor-sentry-Cx26FE6p.js";import"./zap-hgyIfjkp.js";import"./shield-check-B-6jEzxu.js";import"./file-text-E6Bk5t1Q.js";import"./SiteFooter-6EXToXJZ.js";import"./send-BBOKHuXM.js";import"./building-2-N2Q_sRKX.js";const ie={"20DC":{name:"20' Standard",L:590,W:235,H:239,vol:33.2,payload:28200},"40DC":{name:"40' Standard",L:1203,W:235,H:239,vol:67.7,payload:26700},"40HC":{name:"40' High Cube",L:1203,W:235,H:269,vol:76.4,payload:26580}},re=["20DC","40DC","40HC"];function Se(t,a="Груз"){const n=[];for(const c of t){const r=Number(c.l),f=Number(c.w),u=Number(c.h),d=Number(c.q),b=Number(c.wt);r>0&&f>0&&u>0&&d>0&&n.push({name:c.name||a,l:r,w:f,h:u,wt:Number.isFinite(b)&&b>0?b:0,q:d})}return n}function ze(t,a){let n=0;const c=[];for(const r of t){const f=Math.floor(a.H/r.h),u=[{across:Math.floor(a.W/r.w),layers:f,len:r.l},{across:Math.floor(a.W/r.l),layers:f,len:r.w}].filter(x=>x.across>0&&x.layers>0&&x.len<=a.L);if(u.length===0)return null;const d=u.reduce((x,g)=>x.across*x.layers>=g.across*g.layers?x:g),b=d.across*d.layers,v=Math.ceil(r.q/b);c.push({item:r,columns:v,layers:d.layers,across:d.across,colLen:d.len}),n+=v*d.len}return{usedLen:n,blocks:c}}function Ae(t,a,n){const c=ie[a],r=t.reduce((i,h)=>i+h.l*h.w*h.h/1e6*h.q,0),f=t.reduce((i,h)=>i+h.wt*h.q,0),u=c.vol*n,d=r/u,b=f/c.payload,v=ze(t,c),x=v?v.usedLen/c.L:1/0,g=Math.max(1,Math.ceil(Math.max(d,b,x))),o=b>d?"weight":"volume";return{key:a,spec:c,totalVol:r,totalWt:f,byVol:d,byWt:b,byLen:x,need:g,fits:v!==null,limit:o,plan:v,volPct:Number.isFinite(g)?d/g*100:0,wtPct:Number.isFinite(g)?b/g*100:0}}function se(t,a){return re.map(n=>Ae(t,n,a))}function Me(t){return[...t].sort((a,n)=>a.need-n.need||a.need*a.spec.vol-n.need*n.spec.vol)[0]}function _e(t,a){return Number.isFinite(t.need)?Math.max(0,t.need*t.spec.vol*a-t.totalVol):0}const V=["#ff7a1a","#2e86de","#1fa971","#8e44ad","#e84393","#f1c40f"],w=1080,F=320,R=40;function He({result:t}){var g;const{t:a}=oe(),n=(t==null?void 0:t.spec)??null,c=C.useMemo(()=>{if(!n)return null;const o=Math.min((w-R*2)/n.L,(F-R*2)/n.H),i=n.L*o,h=n.H*o,s=(w-i)/2,P=(F-h)/2,z=[];let A=!0;if(t!=null&&t.plan){let k=0;for(let q=0;q<t.plan.blocks.length;q++){const y=t.plan.blocks[q],S=V[q%V.length];let M=y.item.q;const $=y.across*y.layers;for(let _=0;_<y.columns&&M>0;_++){if(k+y.colLen>n.L){A=!1;break}const T=Math.min($,M),l=Math.ceil(T/y.across);for(let m=0;m<l;m++)z.push({x:s+k*o+1,y:P+h-(m+1)*y.item.h*o+1,w:y.colLen*o-2,h:y.item.h*o-2,color:S});M-=T,k+=y.colLen}if(!A)break}}return{scale:o,cw:i,ch:h,x0:s,y0:P,rects:z,placedAll:A}},[n,t==null?void 0:t.plan]);if(!n||!c||!t){const o=w-R*2,i=o*(239/1203),h=R,s=(F-i)/2;return e.jsx("div",{className:"mt-4",children:e.jsxs("svg",{viewBox:`0 0 ${w} ${F}`,className:"w-full h-auto rounded-lg border border-border bg-surface",role:"img","aria-label":a("toolsContainerFill.viz.emptyAria","Схема загрузки: добавьте РіСЂСѓР·"),children:[e.jsx("rect",{x:h,y:s,width:o,height:i,fill:"#fff",stroke:"#cbd5e1",strokeWidth:2,strokeDasharray:"8 6"}),e.jsx("text",{x:w/2,y:F/2+5,textAnchor:"middle",fontSize:15,fill:"#6b7c8f",children:a("toolsContainerFill.viz.empty","Добавьте РіСЂСѓР· — схема появится здесь")})]})})}const{cw:r,ch:f,x0:u,y0:d,rects:b,placedAll:v}=c;if(!t.fits)return e.jsx("div",{className:"mt-4",children:e.jsxs("svg",{viewBox:`0 0 ${w} ${F}`,className:"w-full h-auto rounded-lg border border-border bg-surface",role:"img","aria-label":a("toolsContainerFill.viz.noFitAria","Груз РЅРµ помещается РІ контейнер"),children:[e.jsx("rect",{x:u,y:d,width:r,height:f,fill:"#fff",stroke:"#0e2a47",strokeWidth:3}),e.jsx("text",{x:w/2,y:F/2-6,textAnchor:"middle",fontSize:16,fontWeight:700,fill:"#d9534f",children:a("toolsContainerFill.viz.noFitTitle","Груз РЅРµ помещается РїРѕ габаритам")}),e.jsx("text",{x:w/2,y:F/2+18,textAnchor:"middle",fontSize:13,fill:"#6b7c8f",children:a("toolsContainerFill.viz.noFitSub","Р’РѕР·РјРѕР¶РЅРѕ, нужен flat rack или open top — свяжитесь СЃ нами")})]})});const x=v&&t.need===1?a("toolsContainerFill.viz.hintSingle","Р’РёРґ СЃР±РѕРєСѓ: {{container}}. Р’ сечении: {{blocks}}",{container:n.name,blocks:(((g=t.plan)==null?void 0:g.blocks)??[]).map(o=>a("toolsContainerFill.viz.hintBlock","{{name}} — {{across}}Г—{{layers}} шт.",{name:o.item.name,across:o.across,layers:o.layers})).join(" В· ")}):a("toolsContainerFill.viz.hintMulti","Показан первый РёР· {{count}} контейнеров ({{container}}). Остальной РіСЂСѓР· — РІ следующих.",{count:t.need,container:n.name});return e.jsxs("div",{className:"mt-4",children:[e.jsxs("svg",{viewBox:`0 0 ${w} ${F}`,className:"w-full h-auto rounded-lg border border-border bg-surface",role:"img","aria-label":a("toolsContainerFill.viz.aria","Схема загрузки контейнера {{container}} (РІРёРґ СЃР±РѕРєСѓ)",{container:n.name}),children:[e.jsx("rect",{x:u,y:d,width:r,height:f,fill:"#fff",stroke:"#0e2a47",strokeWidth:3}),b.map((o,i)=>e.jsx("rect",{x:o.x,y:o.y,width:Math.max(0,o.w),height:Math.max(0,o.h),fill:o.color,fillOpacity:.88,stroke:"rgba(255,255,255,.7)",strokeWidth:1},i)),e.jsxs("text",{x:u+r/2,y:d+f+18,textAnchor:"middle",fontSize:12,fill:"#6b7c8f",children:[(n.L/100).toFixed(2)," ",a("toolsContainerFill.viz.meters","Рј")]}),e.jsxs("text",{x:u-12,y:d+f/2,textAnchor:"middle",fontSize:12,fill:"#6b7c8f",transform:`rotate(-90 ${u-12} ${d+f/2})`,children:[(n.H/100).toFixed(2)," ",a("toolsContainerFill.viz.meters","Рј")]})]}),e.jsx("p",{className:"mt-2 text-xs text-text-muted leading-relaxed",children:x})]})}const Le=C.memo(He),ae=6,De=300,Pe=85,$e={"20DC":"20 DC","40DC":"40 HC","40HC":"40 HC"};function Q(){return Math.random().toString(36).slice(2,10)}function Te(){return[{id:Q(),name:"РљРѕСЂРѕР±РєРё СЃ товаром",l:"60",w:"40",h:"40",wt:"18",q:"250"},{id:Q(),name:"Паллеты СЃ техникой",l:"120",w:"80",h:"145",wt:"320",q:"8"}]}const W=new Intl.NumberFormat("ru-RU",{maximumFractionDigits:1}),G=new Intl.NumberFormat("ru-RU",{maximumFractionDigits:0});function ne({label:t,pct:a}){const n=a>100?"bg-gradient-to-r from-red-500 to-red-300":a>90?"bg-gradient-to-r from-amber-500 to-amber-300":"bg-gradient-to-r from-emerald-500 to-emerald-300";return e.jsxs("div",{children:[e.jsxs("div",{className:"flex justify-between items-baseline mb-1",children:[e.jsx(N,{variant:"muted",className:"text-xs",children:t}),e.jsxs(N,{className:"text-sm font-semibold tabular-nums",children:[a.toFixed(0),"%"]})]}),e.jsx("div",{className:"h-3 rounded-full bg-border/60 overflow-hidden",children:e.jsx("div",{className:`h-full rounded-full transition-all duration-300 ${n}`,style:{width:`${Math.min(100,Math.max(0,a))}%`}})})]})}function rt(){const{t}=oe(),a=ce(),[n,c]=C.useState(Te),[r,f]=C.useState("auto"),[u,d]=C.useState(Pe),[b,v]=C.useState(null),[x,g]=C.useState({rows:n,eff:u});C.useEffect(()=>{const l=setTimeout(()=>g({rows:n,eff:u}),De);return()=>clearTimeout(l)},[n,u]);const o=C.useMemo(()=>Se(x.rows,t("toolsContainerFill.defaultCargoName","Груз")),[x.rows,t]),i=C.useMemo(()=>o.length?se(o,x.eff/100):null,[o,x.eff]),h=C.useMemo(()=>i?Me(i):null,[i]),s=i&&h?r==="auto"?h:i.find(l=>l.key===r)??h:null,P=i!==null&&i.every(l=>!l.fits),z=x.eff/100,A=s?_e(s,z):0,k=C.useRef(null);C.useEffect(()=>{if(!s||!s.fits)return;const l=`${s.key}|${s.need}|${s.totalVol.toFixed(1)}|${x.eff}`;k.current!==l&&(k.current=l,J("tool_fill_calc_used",{tool_slug:"container-fill-calculator",container_type:s.key,containers_needed:s.need,volume_m3:Number(s.totalVol.toFixed(1)),weight_kg:Math.round(s.totalWt),fill_volume_pct:Math.round(s.volPct),fill_weight_pct:Math.round(s.wtPct),limit:s.limit,efficiency_pct:x.eff,auto_mode:r==="auto"}))},[s,x.eff,r]);function q(){c(l=>l.length>=ae?l:[...l,{id:Q(),name:"",l:"",w:"",h:"",wt:"",q:""}])}function y(l){c(m=>m.filter(p=>p.id!==l))}function S(l,m,p){c(E=>E.map(O=>O.id===l?{...O,[m]:p}:O))}function M(){if(!s)return;const l=new URLSearchParams({volume:s.totalVol.toFixed(1),weight:String(Math.round(s.totalWt)),size:$e[s.key],tab:"containers"});s.need>1&&l.set("containers",String(s.need)),J("tool_fill_calc_cta_clicked",{tool_slug:"container-fill-calculator",container_type:s.key,containers_needed:s.need,volume_m3:Number(s.totalVol.toFixed(1)),weight_kg:Math.round(s.totalWt)}),a(`/calculator?${l.toString()}`)}const $=l=>l==="weight"?t("toolsContainerFill.limit.weight","вес"):t("toolsContainerFill.limit.volume","объём"),_=[{question:t("toolsContainerFill.faq.q1.question","Сколько РєРѕСЂРѕР±РѕРє помещается РІ 40-футовый контейнер?"),answer:t("toolsContainerFill.faq.q1.answer","Зависит РѕС‚ габаритов РєРѕСЂРѕР±РєРё Рё плотности укладки. Внутренний объём 40DC — 67,7 РјВі, 40HC — 76,4 РјВі. Например, РєРѕСЂРѕР±РѕРє 60Г—40Г—40 СЃРј РїСЂРё ручной укладке (85%) РІ 40HC помещается РїРѕСЂСЏРґРєР° 650–680 шт. Введите СЃРІРѕРё габариты РІ калькулятор выше — РѕРЅ покажет точную оценку Рё схему.")},{question:t("toolsContainerFill.faq.q2.question","Чем 40HC отличается РѕС‚ 40DC Рё РєРѕРіРґР° брать High Cube?"),answer:t("toolsContainerFill.faq.q2.answer","40HC выше РЅР° 30 СЃРј (внутренняя высота 2,69 Рј против 2,39 Рј) — это +8,7 РјВі объёма РїСЂРё той Р¶Рµ длине Рё ширине. High Cube выгоден для лёгких объёмных РіСЂСѓР·РѕРІ Рё высоких мест (паллеты РѕС‚ 1,2 Рј, мебель, пластик). Грузоподъёмность почти одинаковая, поэтому для тяжёлых РіСЂСѓР·РѕРІ разницы нет.")},{question:t("toolsContainerFill.faq.q3.question","Что такое плотность укладки Рё какую выбрать?"),answer:t("toolsContainerFill.faq.q3.answer","Плотность укладки учитывает зазоры между коробками, паллеты Рё крепёж. 85% — типовая ручная укладка РєРѕСЂРѕР±РѕРє; 75% — паллетированный РіСЂСѓР·; 92–95% — идеальная штабелировка одинаковых РєРѕСЂРѕР±РѕРє. Реальную схему загрузки подтверждает логист после получения упаковочного листа.")},{question:t("toolsContainerFill.faq.q4.question","Что делать, если РіСЂСѓР· РЅРµ помещается РїРѕ габаритам?"),answer:t("toolsContainerFill.faq.q4.answer","Если место выше 2,69 Рј или шире 2,35 Рј, стандартный контейнер РЅРµ подойдёт — нужен flat rack или open top. Рто РЅРµ проблема: отправьте запрос через РєРЅРѕРїРєСѓ «Запросить ставку», Рё логист Avalog подберёт оборудование Рё схему крепления РїРѕРґ ваш негабарит.")}],T={"@context":"https://schema.org","@type":"FAQPage",mainEntity:_.map(l=>({"@type":"Question",name:l.question,acceptedAnswer:{"@type":"Answer",text:l.answer}}))};return e.jsxs(be,{active:"tools",children:[e.jsx(Ce,{...ye["container-fill-calculator"]}),e.jsx(de,{children:e.jsx("script",{type:"application/ld+json",children:JSON.stringify(T)})}),e.jsx(H,{py:"md",bg:"surface",children:e.jsx(L,{size:"base",children:e.jsxs(j,{gap:4,children:[e.jsxs(X,{to:"/tools",className:"inline-flex items-center gap-1.5 text-sm text-text-muted hover:text-text transition-colors w-fit",children:[e.jsx(Ne,{className:"h-4 w-4"}),t("toolsContainerFill.backToTools","Р’СЃРµ инструменты")]}),e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx("div",{className:"h-12 w-12 rounded-xl bg-primary-light flex items-center justify-center flex-shrink-0",children:e.jsx(ve,{className:"h-6 w-6 text-primary"})}),e.jsxs(j,{gap:1,children:[e.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[e.jsx(me,{size:"sm",children:t("toolsContainerFill.title","Калькулятор заполняемости контейнера")}),e.jsx(K,{variant:"default",children:t("toolsContainerFill.badge","Логистика")})]}),e.jsx(N,{variant:"lead",className:"text-text-muted max-w-2xl",children:t("toolsContainerFill.subtitle","Узнайте Р·Р° 30 секунд, какой контейнер вам нужен: введите габариты РіСЂСѓР·Р° — калькулятор подберёт 20DC / 40DC / 40HC Рё покажет схему загрузки")})]})]})]})})}),e.jsx(H,{py:"lg",children:e.jsx(L,{size:"base",children:e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-8 items-start",children:[e.jsx(I,{children:e.jsx(U,{className:"pt-6",children:e.jsxs(j,{gap:4,children:[e.jsxs(j,{gap:1,children:[e.jsxs(D,{size:"h3",className:"flex items-center gap-2",children:[e.jsx(le,{className:"h-5 w-5 text-primary"}),t("toolsContainerFill.cargo.title","1. Ваш РіСЂСѓР·")]}),e.jsx(N,{variant:"muted",className:"text-xs",children:t("toolsContainerFill.cargo.subtitle","Габариты РѕРґРЅРѕР№ РєРѕСЂРѕР±РєРё/места Рё количество (РґРѕ 6 РІРёРґРѕРІ РіСЂСѓР·Р°)")})]}),e.jsx("div",{className:"overflow-x-auto -mx-2 px-2",children:e.jsxs("table",{className:"w-full min-w-[560px] border-collapse text-sm",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"text-left text-[11px] uppercase tracking-wide text-text-muted",children:[e.jsx("th",{className:"py-1 px-1 font-semibold"}),e.jsx("th",{className:"py-1 px-1 font-semibold",children:t("toolsContainerFill.cargo.name","Наименование")}),e.jsx("th",{className:"py-1 px-1 font-semibold",children:t("toolsContainerFill.cargo.length","Длина, СЃРј")}),e.jsx("th",{className:"py-1 px-1 font-semibold",children:t("toolsContainerFill.cargo.width","РЁРёСЂРёРЅР°, СЃРј")}),e.jsx("th",{className:"py-1 px-1 font-semibold",children:t("toolsContainerFill.cargo.height","Высота, СЃРј")}),e.jsx("th",{className:"py-1 px-1 font-semibold",children:t("toolsContainerFill.cargo.weight","Вес, РєРі")}),e.jsx("th",{className:"py-1 px-1 font-semibold",children:t("toolsContainerFill.cargo.qty","РљРѕР»-РІРѕ")}),e.jsx("th",{className:"py-1 px-1 font-semibold"})]})}),e.jsx("tbody",{children:n.map((l,m)=>e.jsxs("tr",{children:[e.jsx("td",{className:"py-1 px-1",children:e.jsx("span",{className:"inline-block h-3.5 w-3.5 rounded",style:{background:V[m%V.length]},"aria-hidden":!0})}),e.jsx("td",{className:"py-1 px-1",children:e.jsx(B,{"aria-label":t("toolsContainerFill.cargo.nameAria","Наименование РіСЂСѓР·Р° {{n}}",{n:m+1}),type:"text",className:"min-w-[120px] h-9",placeholder:t("toolsContainerFill.cargo.namePlaceholder","Груз {{n}}",{n:m+1}),value:l.name,onChange:p=>S(l.id,"name",p.target.value)})}),[["l","Длина, СЃРј"],["w","РЁРёСЂРёРЅР°, СЃРј"],["h","Высота, СЃРј"]].map(([p])=>e.jsx("td",{className:"py-1 px-1",children:e.jsx(B,{"aria-label":`${p}-${m+1}`,type:"number",min:"1",className:"w-[72px] h-9",value:l[p],onChange:E=>S(l.id,p,E.target.value)})},p)),e.jsx("td",{className:"py-1 px-1",children:e.jsx(B,{"aria-label":`wt-${m+1}`,type:"number",min:"0",step:"0.1",className:"w-[76px] h-9",value:l.wt,onChange:p=>S(l.id,"wt",p.target.value)})}),e.jsx("td",{className:"py-1 px-1",children:e.jsx(B,{"aria-label":`qty-${m+1}`,type:"number",min:"1",className:"w-[68px] h-9",value:l.q,onChange:p=>S(l.id,"q",p.target.value)})}),e.jsx("td",{className:"py-1 px-1",children:e.jsx("button",{type:"button",onClick:()=>y(l.id),disabled:n.length===1,"aria-label":t("toolsContainerFill.cargo.removeAria","Удалить РіСЂСѓР· {{n}}",{n:m+1}),className:"inline-flex items-center justify-center h-8 w-8 rounded-md text-text-muted hover:text-red-500 hover:bg-red-50 disabled:opacity-30 disabled:cursor-not-allowed transition-colors",children:e.jsx(we,{className:"h-4 w-4"})})})]},l.id))})]})}),e.jsxs(Y,{variant:"outline",size:"sm",onClick:q,disabled:n.length>=ae,className:"w-fit",children:[e.jsx(Fe,{className:"h-4 w-4"}),t("toolsContainerFill.cargo.addRow","Добавить РіСЂСѓР·")]}),e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4 pt-2",children:[e.jsxs("div",{children:[e.jsx(Z,{htmlFor:"cf-container",className:"text-xs mb-1.5 block",children:t("toolsContainerFill.settings.containerType","РўРёРї контейнера")}),e.jsxs(xe,{value:r,onValueChange:l=>{l&&f(l)},children:[e.jsx(he,{id:"cf-container",children:e.jsx(ue,{})}),e.jsxs(pe,{children:[e.jsx(ee,{value:"auto",children:t("toolsContainerFill.settings.auto","Авто-РїРѕРґР±РѕСЂ (рекомендуем)")}),re.map(l=>e.jsxs(ee,{value:l,children:[ie[l].name," (",l,")"]},l))]})]})]}),e.jsxs("div",{children:[e.jsx(Z,{htmlFor:"cf-eff",className:"text-xs mb-1.5 block",children:t("toolsContainerFill.settings.efficiency","Плотность укладки: {{value}}%",{value:u})}),e.jsx("input",{id:"cf-eff",type:"range",min:70,max:95,step:1,value:u,onChange:l=>d(Number(l.target.value)),className:"w-full accent-primary mt-2.5"})]})]}),e.jsxs("div",{className:"flex items-start gap-2 rounded-lg border border-border bg-surface px-3 py-2.5",children:[e.jsx(te,{className:"h-4 w-4 text-text-muted flex-shrink-0 mt-0.5"}),e.jsx(N,{variant:"muted",className:"text-xs leading-relaxed",children:t("toolsContainerFill.settings.effHint","Плотность укладки учитывает зазоры между коробками, паллеты Рё крепёж. 85% — типовая ручная укладка РєРѕСЂРѕР±РѕРє; 75% — паллетированный РіСЂСѓР·; 92-95% — идеальная штабелировка одинаковых РєРѕСЂРѕР±РѕРє.")})]})]})})}),e.jsx(I,{children:e.jsx(U,{className:"pt-6",children:e.jsxs(j,{gap:4,children:[e.jsxs(D,{size:"h3",className:"flex items-center gap-2",children:[e.jsx(ge,{className:"h-5 w-5 text-primary"}),t("toolsContainerFill.result.title","2. Результат")]}),e.jsx("div",{className:"rounded-xl bg-gradient-to-br from-slate-800 to-slate-900 text-white px-5 py-4 flex items-center justify-between gap-3",children:s?s.fits?e.jsxs(e.Fragment,{children:[e.jsxs("div",{children:[e.jsx("div",{className:"text-xl font-extrabold",children:s.need>1?`${s.need} Г— ${s.spec.name}`:s.spec.name}),e.jsx("div",{className:"text-xs opacity-80 mt-0.5",children:t("toolsContainerFill.result.summary","{{vol}} РјВі В· {{wt}} РєРі В· лимитирует {{limit}}",{vol:W.format(s.totalVol),wt:G.format(s.totalWt),limit:$(s.limit)})})]}),h&&s.key===h.key&&e.jsx("span",{className:"shrink-0 rounded-full bg-primary px-3 py-1 text-[11px] font-bold text-white whitespace-nowrap",children:t("toolsContainerFill.result.recommended","РЕКОМЕНДУЕМ")})]}):e.jsxs("div",{children:[e.jsx("div",{className:"text-xl font-extrabold text-red-300",children:t("toolsContainerFill.result.noFitTitle","РќРµ помещается РїРѕ габаритам")}),e.jsx("div",{className:"text-xs opacity-80 mt-0.5",children:P?t("toolsContainerFill.result.noFitAllSub","РџРѕС…РѕР¶Рµ, нужен flat rack или open top — запросите ставку, подберём оборудование"):t("toolsContainerFill.result.noFitSub","Р’ этот тип РЅРµ РІС…РѕРґРёС‚ — посмотрите сравнение РЅРёР¶Рµ или выберите «Авто-РїРѕРґР±РѕСЂВ»")})]}):e.jsxs("div",{children:[e.jsx("div",{className:"text-xl font-extrabold",children:t("toolsContainerFill.result.emptyTitle","Добавьте РіСЂСѓР·")}),e.jsx("div",{className:"text-xs opacity-80 mt-0.5",children:t("toolsContainerFill.result.emptySub","габариты, вес Рё количество — расчёт обновится сам")})]})}),e.jsxs(j,{gap:3,children:[e.jsx(ne,{label:t("toolsContainerFill.result.volumeBar","Заполнение РїРѕ объёму"),pct:s!=null&&s.fits?s.volPct:0}),e.jsx(ne,{label:t("toolsContainerFill.result.weightBar","Загрузка РїРѕ весу"),pct:s!=null&&s.fits?s.wtPct:0})]}),e.jsxs("div",{className:"grid grid-cols-3 gap-2.5",children:[e.jsxs("div",{className:"rounded-lg border border-border bg-surface px-3 py-2.5",children:[e.jsx("div",{className:"text-lg font-extrabold tabular-nums",children:s?W.format(s.totalVol):"—"}),e.jsx("div",{className:"text-[11px] text-text-muted mt-0.5",children:t("toolsContainerFill.result.statVol","объём РіСЂСѓР·Р°, РјВі")})]}),e.jsxs("div",{className:"rounded-lg border border-border bg-surface px-3 py-2.5",children:[e.jsx("div",{className:"text-lg font-extrabold tabular-nums",children:s?G.format(s.totalWt):"—"}),e.jsx("div",{className:"text-[11px] text-text-muted mt-0.5",children:t("toolsContainerFill.result.statWt","вес РіСЂСѓР·Р°, РєРі")})]}),e.jsxs("div",{className:"rounded-lg border border-border bg-surface px-3 py-2.5",children:[e.jsx("div",{className:"text-lg font-extrabold tabular-nums",children:s!=null&&s.fits?W.format(A):"—"}),e.jsx("div",{className:"text-[11px] text-text-muted mt-0.5",children:t("toolsContainerFill.result.statFree","остаётся места, РјВі")})]})]}),e.jsx(Le,{result:s}),e.jsxs(Y,{size:"lg",onClick:M,disabled:!s,className:"w-full",children:[t("toolsContainerFill.result.cta","Запросить ставку РЅР° этот РіСЂСѓР·"),e.jsx(fe,{className:"h-4 w-4"})]}),e.jsx(N,{variant:"muted",className:"text-xs text-center -mt-2",children:t("toolsContainerFill.result.ctaHint","Откроется калькулятор ставок СЃ вашим объёмом, весом Рё типом контейнера")})]})})})]})})}),e.jsx(H,{py:"lg",bg:"surface",children:e.jsx(L,{size:"base",children:e.jsxs(j,{gap:6,children:[e.jsxs(j,{gap:2,className:"text-center max-w-2xl mx-auto",children:[e.jsx(D,{size:"h2",children:t("toolsContainerFill.compare.title","Сравнение контейнеров для вашего РіСЂСѓР·Р°")}),e.jsx(N,{variant:"muted",children:t("toolsContainerFill.compare.subtitle","20DC, 40DC Рё 40HC — заполнение, количество Рё лимитирующий фактор")})]}),e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full min-w-[640px] text-sm border-collapse bg-white rounded-lg",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b border-border text-left text-[11px] uppercase tracking-wide text-text-muted",children:[e.jsx("th",{className:"py-3 px-4 font-semibold",children:t("toolsContainerFill.compare.container","Контейнер")}),e.jsx("th",{className:"py-3 px-4 font-semibold",children:t("toolsContainerFill.compare.volume","Внутр. объём")}),e.jsx("th",{className:"py-3 px-4 font-semibold",children:t("toolsContainerFill.compare.payload","Грузоподъёмность")}),e.jsx("th",{className:"py-3 px-4 font-semibold",children:t("toolsContainerFill.compare.byVol","Заполнение РїРѕ объёму")}),e.jsx("th",{className:"py-3 px-4 font-semibold",children:t("toolsContainerFill.compare.byWt","РџРѕ весу")}),e.jsx("th",{className:"py-3 px-4 font-semibold",children:t("toolsContainerFill.compare.need","Контейнеров РЅСѓР¶РЅРѕ")}),e.jsx("th",{className:"py-3 px-4 font-semibold",children:t("toolsContainerFill.compare.limit","Лимитирует")})]})}),e.jsx("tbody",{children:(i??se([],z)).map(l=>{const m=!!(i&&h&&l.key===h.key);return e.jsxs("tr",{className:`border-b border-border ${m?"bg-emerald-50/70 font-semibold":""}`,children:[e.jsx("td",{className:"py-3 px-4",children:e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx("b",{children:l.spec.name}),m&&e.jsx(K,{variant:"success",children:t("toolsContainerFill.compare.best","Оптимально")})]})}),e.jsxs("td",{className:"py-3 px-4 tabular-nums",children:[W.format(l.spec.vol)," ",t("toolsContainerFill.compare.m3","РјВі")]}),e.jsxs("td",{className:"py-3 px-4 tabular-nums",children:[G.format(l.spec.payload)," ",t("toolsContainerFill.compare.kg","РєРі")]}),e.jsx("td",{className:"py-3 px-4 tabular-nums",children:i&&l.fits&&l.volPct>0?`${l.volPct.toFixed(0)}%`:"—"}),e.jsx("td",{className:"py-3 px-4 tabular-nums",children:i&&l.fits&&l.wtPct>0?`${l.wtPct.toFixed(0)}%`:"—"}),e.jsx("td",{className:"py-3 px-4 tabular-nums",children:i?l.fits?e.jsx("b",{children:l.need}):e.jsx("span",{className:"text-red-500 font-semibold",children:t("toolsContainerFill.compare.noFit","РЅРµ влезает")}):"—"}),e.jsx("td",{className:"py-3 px-4",children:i&&l.fits?$(l.limit):"—"})]},l.key)})})]})}),e.jsxs("div",{className:"flex items-start gap-2 rounded-lg border border-border bg-white px-3 py-2.5",children:[e.jsx(te,{className:"h-4 w-4 text-text-muted flex-shrink-0 mt-0.5"}),e.jsx(N,{variant:"muted",className:"text-xs leading-relaxed",children:t("toolsContainerFill.disclaimer","Внутренние габариты: 20DC — 5,90Г—2,35Г—2,39 Рј (33,2 РјВі, payload 28 200 РєРі) В· 40DC — 12,03Г—2,35Г—2,39 Рј (67,7 РјВі, payload 26 700 РєРі) В· 40HC — 12,03Г—2,35Г—2,69 Рј (76,4 РјВі, payload 26 580 РєРі). Расчёт оценочный: финальную схему загрузки подтверждает логист Avalog.")})]})]})})}),e.jsx(H,{py:"lg",children:e.jsx(L,{size:"base",children:e.jsxs(j,{gap:6,children:[e.jsx(j,{gap:2,className:"max-w-2xl",children:e.jsx(D,{size:"h2",children:t("toolsContainerFill.faq.title","Часто задаваемые РІРѕРїСЂРѕСЃС‹")})}),e.jsx(j,{gap:2,className:"max-w-3xl",children:_.map((l,m)=>{const p=b===m;return e.jsxs("div",{className:"rounded-lg border border-border bg-white overflow-hidden",children:[e.jsxs("button",{type:"button",onClick:()=>v(p?null:m),className:"w-full flex items-start justify-between gap-4 px-5 py-4 text-left hover:bg-surface transition-colors",children:[e.jsx(N,{className:"font-semibold text-sm leading-snug",children:l.question}),e.jsx("span",{className:"text-text-muted text-lg leading-none shrink-0 mt-0.5",children:p?"в€’":"+"})]}),p&&e.jsx("div",{className:"px-5 pb-5 pt-1 border-t border-border/60",children:e.jsx(N,{variant:"muted",className:"text-sm leading-relaxed",children:l.answer})})]},m)})})]})})}),e.jsx(H,{py:"md",bg:"surface",children:e.jsx(L,{size:"base",children:e.jsxs(j,{gap:4,children:[e.jsx(D,{size:"h3",children:t("toolsContainerFill.related.title","РџРѕС…РѕР¶РёРµ инструменты")}),e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-4",children:[{to:"/tools/cbm",icon:le,title:t("toolsContainerFill.related.cbm","CBM-калькулятор"),desc:t("toolsContainerFill.related.cbmDesc","Объём РІ РјВі Рё chargeable weight для авиа Рё LCL")},{to:"/tools/load-plan",icon:ke,title:t("toolsContainerFill.related.loadPlan","Планирование загрузки"),desc:t("toolsContainerFill.related.loadPlanDesc","Утилизация РїРѕ объёму Рё весу для контейнеров Рё фуры")},{to:"/tools/pallet-calc",icon:qe,title:t("toolsContainerFill.related.palletCalc","Паллетный калькулятор"),desc:t("toolsContainerFill.related.palletCalcDesc","Сколько РєРѕСЂРѕР±РѕРє помещается РЅР° паллету")}].map(l=>e.jsx(X,{to:l.to,className:"group block",children:e.jsx(I,{className:"h-full transition-all hover:shadow-md hover:border-primary/40",children:e.jsx(U,{className:"pt-5",children:e.jsxs(j,{gap:2,children:[e.jsx("div",{className:"h-9 w-9 rounded-lg bg-primary-light flex items-center justify-center",children:e.jsx(l.icon,{className:"h-5 w-5 text-primary"})}),e.jsx(N,{weight:"semibold",className:"text-sm",children:l.title}),e.jsx(N,{variant:"muted",className:"text-xs",children:l.desc})]})})})},l.to))})]})})}),e.jsx(je,{title:t("toolsContainerFill.ctaBar","Нужен расчёт стоимости перевозки?"),ctaLabel:t("toolsContainerFill.ctaBarLabel","Рассчитать"),ctaTo:"/calculator"})]})}export{rt as default};