1import{E as m,S as x,g as h}from"./react-vendor.D2780ePa.js";import{t as v}from"./ui-vendor.BTz6WPHv.js";import{h as i,o as u,p as n,s as f}from"./index.C8VrBg5s.js";import{t as o}from"./Link.CmbkEEsR.js";import{t as d}from"./formatBytes.DZBEbYcv.js";var e=m();function j(){const r=[{label:"ÐополниÑÑ",href:`${i.CABINET.PAYMENT}/?form=payment#payment-form`,hidden:"",icon:(0,e.jsx)("svg",{className:"h-5 w-5 text-[var(--primary-color)] group-hover:text-white",fill:"none",viewBox:"0 0 20 18",children:(0,e.jsx)("path",{d:"M11.67 7.537C11.5908 7.53646 11.5146 7.56729 11.458 7.62274C11.4014 7.6782 11.3691 7.75378 11.368 7.833V10.045C11.3691 10.1244 11.4015 10.2001 11.4583 10.2556C11.5151 10.3111 11.5916 10.3418 11.671 10.341H18.334C18.4134 10.3418 18.4899 10.3111 18.5467 10.2556C18.6035 10.2001 18.6359 10.1244 18.637 10.045V7.833C18.6359 7.75361 18.6035 7.67787 18.5467 7.62239C18.4899 7.5669 18.4134 7.5362 18.334 7.537H11.67ZM15.756 0.501C16.678 0.545 17.341 0.727 17.761 1.113C18.176 1.495 18.389 2.048 18.431 2.78V4.877C18.4289 5.05558 18.356 5.22603 18.2283 5.3509C18.1006 5.47578 17.9286 5.54487 17.75 5.543C17.6615 5.54406 17.5736 5.52767 17.4915 5.49477C17.4093 5.46187 17.3344 5.41311 17.2711 5.35126C17.2077 5.28942 17.1572 5.2157 17.1224 5.13433C17.0875 5.05295 17.069 4.96551 17.068 4.877L17.069 2.818C17.047 2.438 16.956 2.202 16.826 2.082C16.7 1.966 16.316 1.862 15.723 1.832H2.647C2.11 1.852 1.761 1.954 1.592 2.099C1.462 2.21 1.364 2.516 1.363 3.045L1.36 14.815C1.41 15.329 1.523 15.672 1.668 15.843C1.778 15.973 2.119 16.103 2.621 16.167H15.737C16.351 16.179 16.713 16.087 16.835 15.964C16.97 15.827 17.068 15.467 17.068 14.878V12.833C17.068 12.466 17.373 12.167 17.75 12.167C18.126 12.167 18.431 12.466 18.431 12.833V14.878C18.431 15.778 18.247 16.451 17.816 16.888C17.372 17.338 16.666 17.518 15.723 17.498L2.54 17.495C1.643 17.391 1 17.145 0.617 16.692C0.27 16.282 0.077 15.697 0 14.879V3.044C0.002 2.168 0.212 1.509 0.694 1.097C1.136 0.717 1.774 0.532 2.621 0.5L15.756 0.501ZM18.334 6.205C19.254 6.205 20 6.934 20 7.833V10.045C20 10.944 19.254 11.673 18.334 11.673H11.671C10.751 11.673 10.005 10.943 10.005 10.045V7.833C10.005 6.934 10.751 6.205 11.671 6.205H18.334ZM13.337 8.145C12.877 8.145 12.504 8.505 12.504 8.948C12.504 9.391 12.877 9.751 13.337 9.751C13.797 9.751 14.17 9.391 14.17 8.948C14.17 8.505 13.797 8.144 13.337 8.144",fill:"currentColor"})})},{label:"ÐбеÑаннÑй плаÑеж",href:`${i.CABINET.PROMISED_PAYMENT}`,icon:(0,e.jsxs)("svg",{className:"h-5 w-5 text-[var(--primary-color)] group-hover:text-white",fill:"none",height:"24",viewBox:"0 0 24 24",width:"24",children:[(0,e.jsx)("path",{d:"M12 6V12H18",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5"}),(0,e.jsx)("path",{d:"M12 22C17.523 22 22 17.523 22 12C22 6.477 17.523 2 12 2C6.477 2 2 6.477 2 12C2 17.523 6.477 22 12 22Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5"})]})},{label:"ТÑÑбо-Ñежим",href:`${i.CABINET.TURBO}`,icon:(0,e.jsx)("svg",{className:"h-5 w-5 text-[var(--primary-color)] group-hover:text-white",fill:"none",height:"24",viewBox:"0 0 24 24",width:"24",children:(0,e.jsx)("path",{d:"M17.6842 3.60303C18.2052 2.94403 17.7142 2.00003 16.8482 2.00003H10.1322C9.95032 1.9987 9.77119 2.04418 9.612 2.1321C9.4528 2.22001 9.3189 2.34741 9.22318 2.50203L4.14118 10.958C3.74018 11.624 4.24418 12.455 5.04918 12.455H8.47818L5.24818 20.52C4.78118 21.54 6.04318 22.473 6.89118 21.735L20.0002 9.33103H13.1512L17.6842 3.60303Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5"})})},{label:"ÐомоÑÑ",href:i.CABINET.SUPPORT,hidden:"flex sm:hidden",icon:(0,e.jsx)("svg",{className:"h-5 w-5 text-[var(--primary-color)] group-hover:text-white",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,e.jsx)("path",{d:"M8.228 9c.549-1.165 2.03-2 3.772-2 2.21 0 4 1.343 4 3 0 1.4-1.278 2.575-3.006 2.907-.542.104-.994.54-.994 1.093m0 3h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5})})}];return(0,e.jsx)("div",{className:"grid grid-cols-1 gap-6 md:grid-cols-3",children:r.map(s=>(0,e.jsxs)(h,{className:`group flex flex-col items-center rounded-md border border-[var(--border-color)] bg-[var(--bg-color-secondary)] px-4 py-6 transition-colors hover:border-[var(--primary-color)] ${s.hidden}`,to:s.href,children:[(0,e.jsx)("div",{className:"mb-2 flex h-10 w-10 items-center justify-center rounded-full bg-[var(--primary-color-transparent)] group-hover:bg-[var(--primary-color)]",children:s.icon}),(0,e.jsx)("span",{className:"w-full text-center text-sm font-medium text-black dark:text-white",children:s.label})]},s.href))})}var p=({client:r})=>{const s=x();return(0,e.jsxs)("div",{className:"space-y-6 rounded-md border border-[var(--border-color)] bg-[var(--bg-color-secondary)] p-6",children:[(0,e.jsx)("div",{className:"flex items-start justify-between",children:(0,e.jsxs)("div",{className:"space-y-1",children:[(0,e.jsx)("h3",{className:"text-sm font-medium text-black/60 dark:text-white/60",children:"ÐаланÑ"}),(0,e.jsxs)("div",{className:"flex items-center gap-2",children:[(0,e.jsx)("span",{className:"text-4xl font-bold tracking-tight text-black tabular-nums dark:text-white",children:(()=>{const t=r?.account?.balance??"0",a=Number(t);return Number.isNaN(a)?t:new Intl.NumberFormat("ru-RU").format(a)})()}),(0,e.jsx)("span",{className:"text-2xl font-semibold text-black/60 dark:text-white/60",children:"â½"})]}),(0,e.jsx)("div",{className:"text-xs text-black/60 dark:text-white/60",children:"ÐоÑÑÑпно к оплаÑе"})]})}),(0,e.jsx)("div",{className:"rounded-md bg-[var(--primary-color-transparent)] px-6 py-3",children:(0,e.jsxs)("div",{className:"mb-1 flex items-center justify-between gap-3 lg:flex-col xl:flex-row",children:[(0,e.jsxs)("div",{className:"flex flex-col items-baseline gap-1",children:[(0,e.jsx)("span",{className:"text-sm font-semibold text-[var(--primary-color)]",children:"ÐонÑÑÑ"}),(0,e.jsx)("span",{className:"text-3xl font-bold text-[var(--primary-color)]",children:r?.account?.bonus})]}),r.account?.bonus.trim()!="0.00"&&(0,e.jsx)(n,{className:"h-10",onClick:()=>s(i.CABINET.BONUS),variant:"orange",children:"ÐоÑÑаÑиÑÑ"})]})}),(0,e.jsxs)("div",{className:"mt-4 grid grid-cols-1 gap-3 xl:grid-cols-2",children:[(0,e.jsx)(n,{onClick:()=>s(`${i.CABINET.PAYMENT}?form=payment#payment-form`),variant:"orange",children:"ÐополниÑÑ"}),(0,e.jsx)(n,{onClick:()=>s(`${i.CABINET.DETAILING}#payments-history`),variant:"bordered",children:"ÐÑÑоÑиÑ"})]})]})},b=({earlyPayment:r})=>(0,e.jsx)(o,{className:"w-full rounded-md border border-[var(--border-color)] bg-[var(--bg-color-secondary)] p-6 hover:border-[var(--primary-color)]",href:i.CABINET.EARLY_REPAYMENT,children:(0,e.jsxs)("div",{className:"flex items-center justify-between",children:[(0,e.jsxs)("div",{children:[(0,e.jsx)("div",{className:"text-sm font-medium text-[var(--primary-color)]",children:"РаÑÑÑоÑка"}),(0,e.jsxs)("div",{className:"mt-1 text-sm text-[var(--primary-color)]",children:["ÐлаÑежей оÑÑалоÑÑ: ",r.options]})]}),(0,e.jsx)("div",{className:"text-right font-medium text-[var(--primary-color)]",children:"по 500 â½"})]})}),g=({client:r,isTariffActive:s})=>{const t=[{title:"ÐÐ°Ñ ÑаÑиÑ",value:r?.tariff?.name,color:"bg-[#fb8b2420]",textColor:"text-[#fb8b24]",subtitle:(0,e.jsxs)("div",{className:"flex items-center gap-2",children:[(0,e.jsx)("div",{className:`h-2 w-2 rounded-full ${s?"bg-green-500":"bg-red-500"}`}),(0,e.jsx)("span",{className:`text-sm ${s?"text-green-500":"text-red-500"}`,children:s?"акÑивен":"не акÑивен"})]})},{title:"ТекÑÑÐ°Ñ ÑкоÑоÑÑÑ",value:r?.tariff?.speed+" ÐбиÑ/Ñ",color:"bg-[#3b82f620]",textColor:"text-blue-500 ",subtitle:(0,e.jsx)("div",{className:"text-sm text-blue-500",children:r?.tariff?.quota===0?"без огÑаниÑений":`иÑполÑзовано: ${d(r.tariff.traffic,0)} из ${d(r.tariff.quota,0)}`})}];return(0,e.jsx)("div",{className:"grid grid-cols-1 gap-6 sm:grid-cols-2",children:t.map((a,l)=>(0,e.jsxs)("div",{className:`space-y-2 rounded-md p-6 ${a.color}`,children:[(0,e.jsx)("div",{className:`text-sm font-medium ${a.textColor}`,children:a.title}),(0,e.jsx)("div",{className:"text-2xl font-semibold text-black dark:text-white",children:a.value}),(0,e.jsx)("div",{className:"flex items-center gap-2",children:a.subtitle})]},l))})},N=({client:r})=>(0,e.jsx)("div",{className:"rounded-md border border-[var(--border-color)] bg-[var(--bg-color-secondary)] p-6",children:(0,e.jsxs)("div",{className:"flex flex-col items-start justify-between gap-4 sm:flex-row",children:[(0,e.jsxs)("div",{className:"flex items-center gap-4",children:[(0,e.jsx)("div",{className:"flex aspect-square h-12 w-12 items-center justify-center rounded-full bg-[var(--primary-color-transparent)]",children:(0,e.jsxs)("svg",{className:"h-6 w-6 text-[var(--primary-color)]",fill:"none",height:"24",viewBox:"0 0 24 24",width:"24",children:[(0,e.jsx)("path",{d:"M12 10C14.2091 10 16 8.20914 16 6C16 3.79086 14.2091 2 12 2C9.79086 2 8 3.79086 8 6C8 8.20914 9.79086 10 12 10Z",stroke:"currentColor",strokeWidth:"1.5"}),(0,e.jsx)("path",{d:"M20 17.5C20 19.985 20 22 12 22C4 22 4 19.985 4 17.5C4 15.015 7.582 13 12 13C16.418 13 20 15.015 20 17.5Z",stroke:"currentColor",strokeWidth:"1.5"})]})}),(0,e.jsxs)("div",{children:[(0,e.jsx)("h2",{className:"text-lg font-medium text-black dark:text-white",children:r?.name||"ÐагÑÑзка..."}),(0,e.jsx)("p",{className:"text-sm text-black dark:text-white",children:r?.address||"ÐдÑÐµÑ Ð½Ðµ Ñказан"})]})]}),(0,e.jsxs)(o,{className:"hidden gap-2 sm:flex",href:i.CABINET.SUPPORT,isFlex:!0,variant:"orange-no-hover",children:[(0,e.jsx)("svg",{className:"h-5 w-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,e.jsx)("path",{d:"M8.228 9c.549-1.165 2.03-2 3.772-2 2.21 0 4 1.343 4 3 0 1.4-1.278 2.575-3.006 2.907-.542.104-.994.54-.994 1.093m0 3h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2})}),"ÐоддеÑжка"]})]})}),C=({promisedPayment:r})=>(0,e.jsx)(o,{className:"w-full rounded-md border border-[var(--border-color)] bg-[var(--bg-color-secondary)] p-6 hover:border-[var(--primary-color)]",href:i.CABINET.PROMISED_PAYMENT,children:(0,e.jsxs)("div",{className:"flex items-center justify-between",children:[(0,e.jsxs)("div",{children:[(0,e.jsx)("div",{className:"text-sm font-medium text-blue-500",children:"ÐбеÑаннÑй плаÑеж"}),(0,e.jsxs)("div",{className:"mt-1 text-sm text-blue-500",children:["до"," ",r.creditEnd.toLocaleDateString("ru-RU",{day:"2-digit",month:"2-digit",year:"numeric"})]})]}),(0,e.jsxs)("div",{className:"text-right font-medium text-blue-500",children:[r.credit," â½"]})]})}),y=({client:r})=>(0,e.jsxs)("div",{className:"rounded-md border border-[var(--border-color)] bg-[var(--bg-color-secondary)] p-6 lg:col-span-2",children:[(0,e.jsx)("div",{className:"mb-4 flex items-center justify-between",children:(0,e.jsx)("h3",{className:"text-base font-semibold text-black dark:text-white",children:"ÐкÑивнÑе ÑÑлÑги"})}),r?.services&&r.services.length>0&&(0,e.jsx)("ul",{className:"divide-y divide-[var(--border-color)]",children:r.services.map((s,t)=>(0,e.jsxs)("li",{className:"flex items-center justify-between py-3",children:[(0,e.jsx)("div",{className:"min-w-0",children:(0,e.jsx)("div",{className:"truncate text-sm font-medium text-black dark:text-white",children:s.name})}),(0,e.jsx)("div",{className:"ml-4 shrink-0",children:(0,e.jsx)("span",{className:"inline-flex items-center rounded-md text-sm font-semibold text-black dark:text-white",children:(()=>{const a=s.cost??"0",l=Number(a),c=Number.isNaN(l)?a:new Intl.NumberFormat("ru-RU").format(l);return(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("span",{className:"tabular-nums",children:c}),(0,e.jsx)("span",{className:"ml-1 opacity-70",children:"â½/меÑ"})]})})()})})]},t))})]}),k=({client:r})=>{const s=[{title:"Скидка",isActive:r?.benefit>0,value:r?.benefit+"%",containerClass:"bg-green-600/15 px-3 py-1 rounded-full text-green-500 dark:text-green-500"},{title:"СÑоимоÑÑÑ ÑаÑиÑа",isActive:!0,value:r?.tariff?.cost+" â½"},{title:"РаÑÑеÑнÑй денÑ",isActive:!0,value:new Date(r?.account.discount_period.end*1e3).toLocaleDateString("ru-RU",{day:"2-digit",month:"2-digit",year:"numeric"})}
1,{title:`Ðогин полÑзоваÑÐµÐ»Ñ 2`,isActive:!0,value:r?.login},{title:"СÑаÑÑÑ",isActive:r?.account?.blocking!=="none",value:"ÐаблокиÑован",containerClass:"text-red-400"}];return(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("div",{className:"space-y-6",children:s.map((t,a)=>t.isActive&&(0,e.jsxs)("div",{className:"flex items-center justify-between border-b border-[var(--border-color)] py-3",children:[(0,e.jsx)("span",{className:"text-back dark:text-white",children:t.title}),(0,e.jsx)("span",{className:`font-medium ${t.containerClass}`,children:t.value})]},a))}),(0,e.jsxs)(o,{className:"group inline-flex items-center gap-1 text-sm",href:i.CABINET.DETAILING,variant:"orange-no-hover",children:["ÐодÑÐ¾Ð±Ð½Ð°Ñ ÑÑаÑиÑÑика",(0,e.jsx)("svg",{className:"h-4 w-4 transition-transform group-hover:translate-x-1",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,e.jsx)("path",{d:"M9 5l7 7-7 7",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2})})]})]})},w=()=>(0,e.jsx)(o,{className:"w-full rounded-md border border-[var(--border-color)] bg-[var(--bg-color-secondary)] p-6 hover:border-[var(--primary-color)]",href:"/",children:(0,e.jsxs)("div",{className:"flex items-center justify-between",children:[(0,e.jsxs)("div",{children:[(0,e.jsx)("div",{className:"text-sm font-medium text-green-600",children:"ТÑÑбо-Ñежим"}),(0,e.jsx)("div",{className:"mt-1 text-sm text-green-600/90",children:"ÐкÑивен"})]}),(0,e.jsx)("div",{className:"text-right",children:(0,e.jsx)("svg",{className:"h-5 w-5 text-green-500 group-hover:text-white",fill:"none",height:"24",viewBox:"0 0 24 24",width:"24",children:(0,e.jsx)("path",{d:"M17.6842 3.60303C18.2052 2.94403 17.7142 2.00003 16.8482 2.00003H10.1322C9.95032 1.9987 9.77119 2.04418 9.612 2.1321C9.4528 2.22001 9.3189 2.34741 9.22318 2.50203L4.14118 10.958C3.74018 11.624 4.24418 12.455 5.04918 12.455H8.47818L5.24818 20.52C4.78118 21.54 6.04318 22.473 6.89118 21.735L20.0002 9.33103H13.1512L17.6842 3.60303Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5"})})})]})});function M(){const{client:r,earlyPayment:s,promisedPayment:t}=u();return r?(0,e.jsx)(v.div,{animate:{opacity:1,y:0},initial:{opacity:0,y:20},children:(0,e.jsxs)("div",{className:"grid grid-cols-1 gap-6 lg:grid-cols-3",children:[(0,e.jsxs)("div",{className:"space-y-6 lg:col-span-2",children:[(0,e.jsx)(N,{client:r}),(0,e.jsx)(j,{}),(0,e.jsx)("div",{className:"space-y-6 rounded-md border border-[var(--border-color)] bg-[var(--bg-color-secondary)] p-6 text-black dark:text-white",children:(0,e.jsxs)("div",{className:"space-y-6",children:[(0,e.jsx)(g,{client:r,isTariffActive:r?.tariff?.slink_exist===1}),(0,e.jsx)(k,{client:r})]})})]}),(0,e.jsxs)("div",{className:"space-y-6",children:[(0,e.jsx)(p,{client:r}),r?.turbo_enabled&&(0,e.jsx)(w,{}),s&&s.options>0&&(0,e.jsx)(b,{earlyPayment:s}),t&&t?.credit!=0&&(0,e.jsx)(C,{promisedPayment:t})]}),r?.services&&r?.services.length>0&&(0,e.jsx)(y,{client:r})]})}):(0,e.jsx)(f,{})}export{M 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.