(function(){ window.__DSCFF_CC_CONFIG__={"sendUrl":"https:\/\/discoff.net\/index.php?route=extension\/module\/dscff_cc\/siteMessage","messagesUrl":"https:\/\/discoff.net\/index.php?route=extension\/module\/dscff_cc\/siteMessages","profileUrl":"https:\/\/discoff.net\/index.php?route=extension\/module\/dscff_cc\/siteProfile","ratingUrl":"https:\/\/discoff.net\/index.php?route=extension\/module\/dscff_cc\/siteRating","visitorUrl":"https:\/\/discoff.net\/index.php?route=extension\/module\/dscff_cc\/siteVisitor","title":"Discoff.NET","subtitle":"\u041e\u0431\u044b\u0447\u043d\u043e \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u043c \u0432 \u0442\u0435\u0447\u0435\u043d\u0438\u0435 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u043c\u0438\u043d\u0443\u0442","knownCustomer":false,"serverProfile":{"first_name":"","last_name":"","telephone":"","email":""}}; window.__DSCFF_CC_CSS__=".dccw-launcher{position:fixed;right:18px;bottom:18px;z-index:99999;display:flex;align-items:flex-end;gap:12px}.dccw-launcher:hover .dccw-dock,.dccw-launcher.dccw-open .dccw-dock{display:block}.dccw-dock{display:none;width:260px;margin-bottom:4px;background:#fff;border:1px solid #e2e8f4;border-radius:13px;box-shadow:0 18px 45px rgba(15,23,42,.18);overflow:hidden}.dccw-dock-item{width:100%;height:52px;border:0;background:#fff;color:#18233d;display:flex;align-items:center;gap:12px;padding:0 16px;font:700 14px Arial,sans-serif;cursor:pointer;text-align:left}.dccw-dock-item:hover{background:#f6f9ff}.dccw-dock-item svg{width:22px;height:22px;color:#0b6cff}.dccw-btn{position:relative;width:54px;height:54px;border-radius:50%;border:0;background:linear-gradient(135deg,#0d7cff,#075de8);color:#fff;box-shadow:0 16px 38px rgba(18,94,231,.34);font:24px Arial;cursor:pointer;display:grid;place-items:center}.dccw-btn svg{width:28px;height:28px}.dccw-box{position:fixed;right:18px;bottom:84px;z-index:99999;width:356px;max-width:calc(100vw - 28px);height:600px;max-height:calc(100vh - 104px);background:#fff;border:1px solid #dfe8f6;border-radius:16px;box-shadow:0 22px 70px rgba(15,23,42,.22);display:none;overflow:hidden;font-family:Arial,sans-serif;color:#06143a}.dccw-box.open{display:flex;flex-direction:column}.dccw-head{background:linear-gradient(135deg,#0d74ff,#075de8);color:#fff;padding:16px 18px 14px;position:relative;flex:0 0 auto}.dccw-title{display:flex;align-items:flex-start;justify-content:space-between;gap:10px}.dccw-title b{display:block;font-size:20px;line-height:1.1}.dccw-actions{display:flex;gap:10px;align-items:center}.dccw-actions button{border:0;background:transparent;color:#fff;font-size:22px;line-height:1;cursor:pointer;padding:0}.dccw-sub{display:grid;grid-template-columns:12px 1fr;gap:10px;align-items:start;margin-top:9px;font-size:13px;line-height:1.45}.dccw-dot{width:10px;height:10px;border-radius:50%;background:#28d465;margin-top:4px}.dccw-prompt{height:50px;display:flex;align-items:center;gap:12px;padding:0 18px;border-bottom:1px solid #e8eef7;background:#fff;color:#65718c;font-weight:700;flex:0 0 auto}.dccw-prompt svg{width:24px;height:24px;color:#0d6efd}.dccw-profile-strip{display:none;flex-direction:row;align-items:center;gap:12px;min-height:58px;padding:9px 16px;border-bottom:1px solid #e8eef7;background:#fbfdff;box-sizing:border-box;flex:0 0 auto}.dccw-profile-strip.show{display:flex!important}.dccw-profile-strip .dccw-avatar{width:38px;height:38px;flex:0 0 38px;background:#eaf2ff}.dccw-avatar{width:44px;height:44px;border-radius:50%;background:#eaf2ff;color:#64748b;display:grid;place-items:center;font-weight:800;font-size:20px}.dccw-avatar svg{width:24px;height:24px}.dccw-profile-text{display:block;min-width:0;flex:1}.dccw-profile-text b,.dccw-profile-text span{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dccw-profile-text b{font-size:14px;line-height:1.25}.dccw-profile-text span{font-size:13px;color:#66728b;margin-top:2px}.dccw-profile-edit{flex:0 0 auto;border:0;background:transparent;color:#0b6cff;font-size:13px;font-weight:800;cursor:pointer;margin-left:auto;padding:6px 0;white-space:nowrap}.dccw-profile-edit:before{content:'\u270e';margin-right:5px}.dccw-body{background:radial-gradient(circle at top,#fbfdff,#f7f9fd 58%,#fff);padding:14px 14px 10px;overflow:auto;flex:1 1 auto;min-height:0}.dccw-date{width:max-content;margin:8px auto 18px;background:#eef3fb;color:#7b879d;border-radius:999px;padding:5px 13px;font-size:12px}.dccw-msg{margin:0 0 12px;display:flex}.dccw-msg.out{justify-content:flex-end}.dccw-bubble{max-width:78%;background:#fff;border:1px solid #e1e9f4;border-radius:13px;padding:11px 13px;color:#07143a;font-size:13px;line-height:1.48;white-space:pre-wrap;box-shadow:0 10px 28px rgba(15,23,42,.06)}.dccw-msg.out .dccw-bubble{background:linear-gradient(135deg,#0d72ff,#075de8);border-color:#0b67ef;color:#fff}.dccw-file{display:grid;grid-template-columns:30px minmax(0,1fr);gap:8px;align-items:center;margin-top:8px;padding:7px;border:1px solid #bed5ff;border-radius:10px;background:rgba(255,255,255,.45);color:inherit;font-weight:700;text-decoration:none}.dccw-file:before{content:'\ud83d\udcce';width:30px;height:30px;border-radius:8px;background:rgba(13,114,255,.12);display:grid;place-items:center}.dccw-file span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dccw-rating{display:flex;gap:8px;margin-top:12px}.dccw-rating button{height:34px;border-radius:999px;border:1px solid #bed5ff;background:#f2f7ff;color:#0b6cff;font-weight:800;padding:0 13px;cursor:pointer}.dccw-rating button:hover{background:#e6f0ff}.dccw-rating.done{color:#66728b;font-weight:700;font-size:13px}.dccw-bubble small{display:block;text-align:right;color:#8591aa;font-size:11px;margin-top:8px}.dccw-msg.out .dccw-bubble small{color:rgba(255,255,255,.85)}.dccw-note{color:#778399;text-align:center;margin:32px 14px;font-size:14px;line-height:1.45}.dccw-lead{border:1px solid #bed5ff;border-radius:12px;background:#f2f7ff;margin:8px 10px 12px;padding:12px;display:none;grid-template-columns:40px 1fr 24px;gap:12px;align-items:start;flex:0 0 auto}.dccw-lead.show{display:grid}.dccw-lead-close{border:0;background:transparent;color:#0d6efd;font-size:24px;line-height:1;cursor:pointer}.dccw-lead b{display:block;font-size:14px;line-height:1.35}.dccw-lead p{margin:4px 0 12px;color:#07143a;font-size:13px;line-height:1.35}.dccw-lead-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px;grid-column:1 \/ -1}.dccw-lead-actions button,.dccw-submit,.dccw-skip{height:40px;border-radius:9px;font-weight:800;cursor:pointer}.dccw-fill,.dccw-submit{border:0;background:linear-gradient(135deg,#0d72ff,#075de8);color:#fff}.dccw-later,.dccw-skip{border:1px solid #bed5ff;background:#fff;color:#0b6cff}.dccw-form{border-top:1px solid #e6edf7;background:#fff;padding:10px;display:grid;grid-template-columns:38px 1fr 42px;gap:8px;align-items:end;flex:0 0 auto}.dccw-file-preview{grid-column:1\/-1;display:none;align-items:center;justify-content:space-between;gap:10px;min-height:34px;border:1px solid #bed5ff;border-radius:10px;background:#f2f7ff;color:#06143a;padding:7px 9px;font-size:12px}.dccw-file-preview.show{display:flex}.dccw-file-preview b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dccw-file-preview button{width:24px;height:24px;border:0;border-radius:50%;background:#dbeafe;color:#0b6cff;font-size:16px;line-height:1}.dccw-attach,.dccw-form button{border:0;border-radius:12px;background:#eef4ff;color:#0b6cff;font-size:0;cursor:pointer;height:38px;display:grid;place-items:center}.dccw-attach svg,.dccw-form button svg{width:22px;height:22px}.dccw-attach input{display:none}.dccw-form button{background:linear-gradient(135deg,#0d72ff,#075de8);color:#fff}.dccw-form textarea{border:1px solid #dfe8f4;border-radius:12px;resize:none;padding:9px 12px;color:#07143a;outline:0;min-height:38px;max-height:80px}.dccw-powered{text-align:center;color:#7c89a4;font-size:12px;padding:0 0 14px;background:#fff;flex:0 0 auto}.dccw-powered:before{content:'\u25c7';margin-right:6px;color:#71809c}.dccw-profile-page{display:none;background:#fff;padding:30px 20px 16px;overflow:auto;flex:1 1 auto;min-height:0}.dccw-box.profile-mode .dccw-body,.dccw-box.profile-mode .dccw-form,.dccw-box.profile-mode .dccw-profile-strip,.dccw-box.profile-mode .dccw-prompt,.dccw-box.profile-mode .dccw-lead{display:none!important}.dccw-box.profile-mode .dccw-profile-page{display:block}.dccw-profile-page h3{margin:0 auto 14px;text-align:center;max-width:290px;font-size:18px;line-height:1.32}.dccw-profile-page p{margin:0 auto 20px;text-align:center;max-width:310px;color:#74809a;line-height:1.45}.dccw-profile-page label{display:block;font-weight:700;color:#65718c;margin:13px 0 7px}.dccw-profile-page input{width:100%;height:40px;border:1px solid #dfe8f4;border-radius:10px;padding:0 13px;outline:0;box-sizing:border-box}.dccw-privacy{display:flex;gap:10px;color:#7a86a0;font-size:12px;line-height:1.35;margin:18px 0 24px}.dccw-profile-actions{display:grid;gap:10px}.dccw-submit{width:100%;font-size:15px}.dccw-skip{width:100%;font-size:14px}.dccw-hidden{display:none!important}@media(max-width:520px){.dccw-box{right:10px;bottom:78px;width:calc(100vw - 20px);height:min(600px,calc(100vh - 92px))}.dccw-launcher{right:12px;bottom:12px}.dccw-dock{width:245px}.dccw-btn{width:52px;height:52px}}\n.dccw-rating{display:grid!important;grid-template-columns:1fr 1fr;gap:10px;margin-top:14px}.dccw-rating button{min-width:0;height:auto!important;min-height:74px;border-radius:16px!important;border:1px solid #bed5ff!important;background:#f5f9ff!important;color:#07143a!important;font-weight:800!important;padding:10px 8px!important;cursor:pointer;display:grid;place-items:center;gap:5px;text-align:center;line-height:1.15}.dccw-rating button:hover{background:#eaf3ff!important;border-color:#8cb8ff!important}.dccw-rating-ico{font-size:26px;line-height:1}.dccw-rating-text{font-size:13px}.dccw-rating-title{font-weight:800;margin:12px 0 8px;font-size:13px;color:#07143a}.dccw-rating-options{display:flex;flex-wrap:wrap;gap:7px;margin-top:2px}.dccw-rating-options button{border:1px solid #bed5ff;background:#f2f7ff;color:#0b6cff;border-radius:999px;padding:7px 10px;font-weight:700;font-size:12px;cursor:pointer}.dccw-rating-options button:hover{background:#e6f0ff}.dccw-rating.done{display:block!important;color:#66728b;font-weight:700;font-size:13px;margin-top:12px}"; function mountDscffWidget(){ if(!document.body){setTimeout(mountDscffWidget,50);return;} if(window.DSCFF_CC_WIDGET)return;window.DSCFF_CC_WIDGET=true; var cfg=window.__DSCFF_CC_CONFIG__; var style=document.createElement('style');style.textContent=window.__DSCFF_CC_CSS__;document.head.appendChild(style); function esc(s){return String(s||'').replace(/[&<>"']/g,function(c){return {'&':'&','<':'<','>':'>','"':'"',"'":'''}[c];});} function iconChat(){return '';} function iconUser(){return '';} function iconClip(){return '';} function iconSend(){return '';} var box=document.createElement('div'); box.className='dccw-box'; box.innerHTML='
'+esc(cfg.title)+'
'+esc(cfg.subtitle)+'
'+iconChat()+'Напишите свой вопрос, мы онлайн!
'+iconUser()+'
Напишите нам, и сообщение появится у оператора в Chat Center.

Заполните форму, чтобы мы не потеряли ваш вопрос

Если вы закроете сайт, мы сможем ответить вам на e-mail.

Данные защищены
'+iconUser()+'Чтобы мы могли ответить вам позже

Оставьте свои контакты — это займет меньше минуты.

Работает на Discoff Chat Center
'; document.body.appendChild(box); var launcher=document.createElement('div');launcher.className='dccw-launcher'; var dock=document.createElement('div');dock.className='dccw-dock';dock.innerHTML=''; var btn=document.createElement('button');btn.className='dccw-btn';btn.type='button';btn.innerHTML=iconChat(); launcher.appendChild(dock);launcher.appendChild(btn);document.body.appendChild(launcher); var dockChat=dock.querySelector('.dccw-dock-chat'); var body=box.querySelector('.dccw-body'),form=box.querySelector('.dccw-form'),input=box.querySelector('textarea'),fileInput=box.querySelector('.dccw-attach input'),filePreview=box.querySelector('.dccw-file-preview'),profileForm=box.querySelector('.dccw-profile-form'),lead=box.querySelector('.dccw-lead'),strip=box.querySelector('.dccw-profile-strip'),timer=null,last='',sentOnce=false,currentDialogId=0,currentInviteKey='',currentRated=false; var profile=cfg.knownCustomer?cfg.serverProfile:null;try{if(!profile){profile=JSON.parse(localStorage.getItem('dccwProfile')||'null');}}catch(e){profile=null;} function hasProfile(){return profile&&(profile.first_name||profile.email||profile.telephone);} function displayName(){if(!profile)return '';return [profile.first_name||'',profile.last_name||''].join(' ').trim()||profile.email||profile.telephone||'Посетитель сайта';} function saveLocal(){try{localStorage.setItem('dccwProfile',JSON.stringify(profile));}catch(e){}} function syncProfile(){strip.classList.toggle('show',!!hasProfile());if(hasProfile()){strip.querySelector('b').textContent=displayName();strip.querySelector('span span').textContent=profile.email||profile.telephone||'Контакты сохранены';}box.classList.toggle('profile-mode',false);} function today(){return '
Сегодня
';} function ratingHtml(text){return !currentRated&&/Оцените качество обслуживания/i.test(text||'')?'
':'';} function ratingOptions(type){var title=type==='like'?'Что понравилось?':'Что не понравилось?';var items=type==='like'?['Вопрос решен','Внимание к деталям','Быстро ответили','Вежливый оператор','Помогли выбрать товар']:['Вопрос не решен','Невнимательный оператор','Долгое ожидание','Ответ непонятен','Не нашли, что искали'];return '
'+esc(title)+'
'+items.map(function(item){return '';}).join('')+'
';} function sendRating(rate,reason){currentRated=true;var data='rating='+encodeURIComponent(rate)+'&comment='+encodeURIComponent(reason||'');var x=new XMLHttpRequest();x.open('POST',cfg.ratingUrl,true);x.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8');x.send(data);} function bindRatings(){body.querySelectorAll('.dccw-rating button[data-rate]').forEach(function(button){button.onclick=function(){var rate=button.getAttribute('data-rate');var wrap=button.parentNode;wrap.className='dccw-rating-followup';wrap.innerHTML=ratingOptions(rate);wrap.querySelectorAll('[data-reason]').forEach(function(reason){reason.onclick=function(){var text=reason.getAttribute('data-reason');sendRating(rate,text);wrap.className='dccw-rating done';wrap.textContent='Спасибо за оценку. Мы учтем ваш ответ: '+text;};});};});} function draw(messages){var html=messages.length?today():'';for(var i=0;i'+esc(m.attachment_name||'Вложение')+'':'';var rate=ratingHtml(m.body);html+='
'+esc(m.body)+file+rate+''+esc((m.date_added||'').slice(11,16))+(out?' ✓✓':'')+'
';}if(html&&html!==last){last=html;body.innerHTML=html;bindRatings();body.scrollTop=body.scrollHeight;}} function load(){var x=new XMLHttpRequest();x.open('GET',cfg.messagesUrl,true);x.onreadystatechange=function(){if(x.readyState===4){try{var r=JSON.parse(x.responseText);if(r.success){currentRated=!!r.rated;draw(r.messages||[]);}}catch(e){}}};x.send();} function start(){if(timer)return;load();timer=setInterval(load,4500);} function stop(){if(timer){clearInterval(timer);timer=null;}} function openProfile(){box.classList.add('profile-mode');profileForm.first_name.value=(profile&&profile.first_name)||'';profileForm.last_name.value=(profile&&profile.last_name)||'';profileForm.email.value=(profile&&profile.email)||'';profileForm.telephone.value=(profile&&profile.telephone)||'';profileForm.first_name.focus();} function closeProfile(){box.classList.remove('profile-mode');input.focus();} function leadDismissKey(){return 'dccwLeadDismissed:'+(currentDialogId||'visitor');} function showLead(){if(!hasProfile()&&sentOnce&&localStorage.getItem(leadDismissKey())!=='1')lead.classList.add('show');} function fileSize(bytes){bytes=Number(bytes||0);if(bytes>1048576)return (bytes/1048576).toFixed(1)+' МБ';if(bytes>1024)return Math.ceil(bytes/1024)+' КБ';return bytes+' Б';} function clearFilePreview(){fileInput.value='';filePreview.classList.remove('show');filePreview.innerHTML='';} function updateFilePreview(){var file=fileInput.files&&fileInput.files[0]?fileInput.files[0]:null;if(!file){clearFilePreview();return;}if(!/^(image|video)\//.test(file.type||'')){alert('Можно прикреплять только фото или видео');clearFilePreview();return;}filePreview.innerHTML=''+esc(file.name)+''+esc(fileSize(file.size))+'';filePreview.classList.add('show');filePreview.querySelector('button').onclick=clearFilePreview;} function dismissedInviteKey(){try{return localStorage.getItem('dccwDismissedInvite')||'';}catch(e){return '';}} function dismissInvite(key){if(!key)return;try{localStorage.setItem('dccwDismissedInvite',String(key));}catch(e){}} function clearDismissedInvite(){try{localStorage.removeItem('dccwDismissedInvite');}catch(e){}} function visitorPing(eventName){if(!cfg.visitorUrl)return;var p=profile||{};var data='event='+encodeURIComponent(eventName||'ping')+'&first_name='+encodeURIComponent(p.first_name||'')+'&last_name='+encodeURIComponent(p.last_name||'')+'&telephone='+encodeURIComponent(p.telephone||'')+'&email='+encodeURIComponent(p.email||'')+'&page_url='+encodeURIComponent(location.href)+'&referrer='+encodeURIComponent(document.referrer||'');var x=new XMLHttpRequest();x.open('POST',cfg.visitorUrl,true);x.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8');x.onreadystatechange=function(){if(x.readyState===4){try{var r=JSON.parse(x.responseText);if(r.success&&r.dialog_id){currentDialogId=r.dialog_id;currentInviteKey=r.invite_key||String(r.dialog_id);}if(r.success&&r.open&&eventName!=='close'&&String(r.invite_key||r.dialog_id||'')!==dismissedInviteKey()){box.classList.add('open');syncProfile();start();}}catch(e){}}};x.send(data);} function postProfile(cb){var p=profile||{};var data='first_name='+encodeURIComponent(p.first_name||'')+'&last_name='+encodeURIComponent(p.last_name||'')+'&telephone='+encodeURIComponent(p.telephone||'')+'&email='+encodeURIComponent(p.email||'')+'&page_url='+encodeURIComponent(location.href)+'&referrer='+encodeURIComponent(document.referrer||'');var x=new XMLHttpRequest();x.open('POST',cfg.profileUrl,true);x.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8');x.onreadystatechange=function(){if(x.readyState===4&&cb)cb();};x.send(data);} btn.onclick=function(){var willOpen=!box.classList.contains('open');box.classList.toggle('open');syncProfile();if(willOpen)clearDismissedInvite();else dismissInvite(currentInviteKey||currentDialogId);visitorPing(willOpen?'open':'close');if(willOpen)start();else stop();}; if(dockChat){dockChat.onclick=function(){box.classList.add('open');syncProfile();clearDismissedInvite();visitorPing('open');start();};} box.querySelector('.dccw-close').onclick=function(){dismissInvite(currentInviteKey||currentDialogId);box.classList.remove('open');visitorPing('close');stop();}; box.querySelector('.dccw-fill').onclick=openProfile; box.querySelector('.dccw-profile-edit').onclick=openProfile; box.querySelector('.dccw-later').onclick=box.querySelector('.dccw-lead-close').onclick=function(){lead.classList.remove('show');localStorage.setItem(leadDismissKey(),'1');}; box.querySelector('.dccw-skip').onclick=function(){localStorage.setItem(leadDismissKey(),'1');closeProfile();}; fileInput.onchange=updateFilePreview; profileForm.onsubmit=function(e){e.preventDefault();var first=profileForm.first_name.value.trim(),email=profileForm.email.value.trim();if(!first||!email){if(!first)profileForm.first_name.focus();else profileForm.email.focus();return;}profile={first_name:first,last_name:profileForm.last_name.value.trim(),telephone:profileForm.telephone.value.trim(),email:email};saveLocal();postProfile(function(){lead.classList.remove('show');syncProfile();});}; form.onsubmit=function(e){e.preventDefault();var text=input.value.trim();var file=fileInput.files&&fileInput.files[0]?fileInput.files[0]:null;if(!text&&!file)return;if(file&&!/^(image|video)\//.test(file.type||'')){alert('Можно прикреплять только фото или видео');clearFilePreview();return;}input.value='';sentOnce=true;var p=profile||{};var fd=new FormData();fd.append('body',text);fd.append('first_name',p.first_name||'');fd.append('last_name',p.last_name||'');fd.append('telephone',p.telephone||'');fd.append('email',p.email||'');fd.append('page_url',location.href);fd.append('referrer',document.referrer||'');if(file)fd.append('attachment',file);var x=new XMLHttpRequest();x.open('POST',cfg.sendUrl,true);x.onreadystatechange=function(){if(x.readyState===4){try{var r=JSON.parse(x.responseText);if(r.success&&r.dialog_id){currentDialogId=r.dialog_id;currentInviteKey=r.invite_key||String(r.dialog_id);}if(r.error==='blocked'){body.innerHTML='
Диалог недоступен.
';input.disabled=true;}else if(r.error){alert(r.error);}}catch(e){}clearFilePreview();load();setTimeout(showLead,500);}};x.send(fd);}; syncProfile(); visitorPing('load'); setInterval(function(){visitorPing(box.classList.contains('open')?'open':'ping');},30000); } if(document.body){mountDscffWidget();}else if(document.readyState==='loading'){document.addEventListener('DOMContentLoaded',mountDscffWidget,{once:true});}else{setTimeout(mountDscffWidget,50);} })();