1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[472],{52774:function(e,t,n){"use strict";e.exports=function(e){let t,a;let o=n(6668),r=e?e.preset:"ru",i={а:"a",б:"b",в:"v",д:"d",з:"z",й:"y",к:"k",л:"l",м:"m",н:"n",о:"o",п:"p",Ñ:"r",Ñ:"s",Ñ:"t",Ñ:"u",Ñ:"f",Ñ:""};"ru"===r?Object.assign(i,{г:"g",и:"i",Ñ:"",Ñ:"i",Ñ:"e"}):"uk"===r?Object.assign(i,{г:"h",Ò:"g",е:"e",и:"y",Ñ:"i","'":"","â":"",ʼ:""}):"mn"===r&&Object.assign(i,{г:"g",Ó©:"o",Ò¯:"u",и:"i",Ñ:"y",Ñ:"e",Ñ:""}),"ru"===r?t=Object.assign(o(i),{i:"и","":""}):"uk"===r?t=Object.assign(o(i),{"":""}):"mn"===r&&(t=Object.assign(o(i),{"":""}));let l={Ñ:"yo",ж:"zh",Ñ
:"kh",Ñ:"ts",Ñ:"ch",Ñ:"sh",Ñ:"shch",Ñ:"yu",Ñ:"ya"},c=Object.assign({},l,"ru"===r?{е:"ye"}:{Ñ:"ye",Ñ:"yi"}),s=Object.assign(o(c)),d=Object.assign(i,c),u=Object.assign({},i,{й:"i"});"ru"===r?Object.assign(u,{е:"e"}):"uk"===r?Object.assign(u,{Ñ:"i"}):"mn"===r&&Object.assign(u,{е:"e"}),"ru"===r?a=Object.assign(o(i),{i:"и",y:"Ñ",e:"е","":""}):"uk"===r&&(a=Object.assign(o(i),{"":""}));let p={};"uk"===r&&(p={Ñ:"ie",Ñ:"iu",Ñ:"ia"});let m=Object.assign(l,p),f=Object.assign(o(m)),v=Object.assign(u,m);return{transform:function(e,t){if(!e)return"";let n=e.normalize(),a="",o=!1;for(let e=0;e<n.length;e++){let i;let l=n[e]===n[e].toUpperCase(),c=n[e].toLowerCase();if(" "===c){a+=t||" ",o=!0;continue}"uk"===r&&"зг"===n.slice(e-1,e+1).toLowerCase()?i="gh":0===e||o?(i=d[c],o=!1):i=v[c],void 0===i?a+=l?c.toUpperCase():c:l?i.length>1?a+=i[0].toUpperCase()+i.slice(1):a+=i.toUpperCase():a+=i}return a},reverse:function(e,n){if(!e)return"";let o=e.normalize(),r="",i=!1,l=0;for(;l<o.length;){let e;let c=o[l]===o[l].toUpperCase(),d=o[l].toLowerCase(),u=l;if(" "===d||d===n){r+=" ",i=!0,l++;continue}let p=o.slice(l,l+2).toLowerCase();0===l||i?((e=s[p])?l+=2:(e=t[d],l++),i=!1):(e=f[p])?l+=2:(e=a[d],l++),"shch"===o.slice(u,u+4).toLowerCase()?(e="Ñ",l=u+4):"zgh"===o.slice(u-1,u+2).toLowerCase()&&(e="г",l=u+2),void 0===e?r+=c?d.toUpperCase():d:c?e.length>1?r+=e[0].toUpperCase()+e.slice(1):r+=e.toUpperCase():r+=e}return r}}}},6668:function(e){var t,n,a,o=/^(?:0|[1-9]\d*)$/,r=Object.prototype,i=r.hasOwnProperty,l=r.toString,c=r.propertyIsEnumerable,s=(t=Object.keys,n=Object,function(e){return t(n(e))}),baseFor=function(e,t,n){for(var a=-1,o=Object(e),r=n(e),i=r.length;i--;){var l=r[++a];if(!1===t(o[l],l,o))break}return e},d=Array.isArray;function isArrayLike(e){var t,n,a;return null!=e&&"number"==typeof(t=e.length)&&t>-1&&t%1==0&&t<=9007199254740991&&!("[object Function]"==(n=typeof e,a=e&&("object"==n||"function"==n)?l.call(e):"")||"[object GeneratorFunction]"==a)}var u=(a=function(e,t,n){e[t]=n},function(e,t){var n;return n={},e&&baseFor(e,function(e,t,o){a(n,e,t,o)},keys),n});function keys(e){return isArrayLike(e)?function(e,t){var n,a=d(e)||e&&"object"==typeof e&&isArrayLike(e)&&i.call(e,"callee")&&(!c.call(e,"callee")||"[object Arguments]"==l.call(e))?function(e,t){for(var n=-1,a=Array(e);++n<e;)a[n]=t(n);return a}(e.length,String):[],r=a.length,s=!!r;for(var u in e)i.call(e,u)&&!(s&&("length"==u||(n=null==(n=r)?9007199254740991:n)&&("number"==typeof u||o.test(u))&&u>-1&&u%1==0&&u<n))&&a.push(u);return a}(e):function(e){if(t=e&&e.constructor,e!==("function"==typeof t&&t.prototype||r))return s(e);var t,n=[];for(var a in Object(e))i.call(e,a)&&"constructor"!=a&&n.push(a);return n}(e)}e.exports=u},46964:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/offer",function(){return n(40297)}])},40297:function(e,t,n){"use strict";n.r(t),n.d(t,{__N_SSG:function(){return B},default:function(){return offer_Offer},fetchCache:function(){return Z}});var a=n(85893),o=n(87019),r=n.n(o),i=n(67294),l=n(42636),c=n(85115),s=n(11141),d=n(52774),u=n.n(d);let formatFuelID=e=>u()().transform(e,"_").toLowerCase().replace("+","_plus").replace("-","_"),formatFuelName=e=>e.replace("Ðи ","ÐÐ-").replace("ÐÑ","ÐТ"),formatPrice=e=>(0,l.uf)(e,{hasFractionDigits:!0}),p=[c.At.GAZPROM,c.At.GAZPROMNEFT],getFuelQueryParams=e=>p.reduce((t,n)=>{var a;let o=null==e?void 0:null===(a=e.find(e=>e.includes(n)))||void 0===a?void 0:a.split("".concat(n,"-"))[1];if(!o)return t;let r=o.split("-"),i=Number(r.pop())/100,l=Number(r.pop())/100,c=r[0];
1return{...t,[n]:{fuelType:c,minPrice:l,maxPrice:i}}},{}),m="".concat(s.L9,"?map=offer"),preparePointsData=(e,t)=>{let{fuelType:n,minPrice:a,maxPrice:o}=t;return e?e.map((e,t)=>{var n;return{id:"".concat(e.provider,"-").concat(t),type:e.provider,brand:e.brand,name:e.name,address:e.address,logo:e.ico,color:e.color,coordinates:e.latitude&&e.longitude?[Number(e.latitude),Number(e.longitude)]:void 0,fuelTypes:null===(n=e.price)||void 0===n?void 0:n.map(e=>{var t,n;return{id:e.fuelId?formatFuelID(e.fuelId):void 0,name:e.fuelId?formatFuelName(e.fuelId):void 0,price:null===(t=e.fuelPrice)||void 0===t?void 0:t.original,clientPrice:null===(n=e.fuelPrice)||void 0===n?void 0:n.client}}),hasDynamicPrices:1===e.loyalty}}).filter(e=>{var t;let r=null===(t=e.fuelTypes)||void 0===t?void 0:t.filter(e=>{let{id:t,clientPrice:r}=e;return t&&t.includes(n)&&r&&r>=a&&r<=o});return r&&r.length>0}):[]},getMapData=async e=>{let{offerID:t,provider:n,owner:a,fuel:o}=e,r=null==a?void 0:a.filter(e=>e.includes(c.At.GAZPROMNEFT)).map(e=>e.replace("".concat(c.At.GAZPROMNEFT,"-"),"")),i=null==a?void 0:a.filter(e=>e.includes(c.At.GAZPROM)).map(e=>e.replace("".concat(c.At.GAZPROM,"-"),"")),l=getFuelQueryParams(o),d={data:void 0,error:void 0};return l.gazprom&&(!n||n.includes(c.At.GAZPROMNEFT))&&await (0,s.U2)("".concat(m,"&id=").concat(t,"&provider=").concat(c.At.GAZPROMNEFT).concat((null==r?void 0:r.length)?"&network=".concat(r.join("-")):"")).then(e=>{if(l.gazprom&&e&&"points_gazprom"in e){var t;let n=preparePointsData(null===(t=e.points_gazprom)||void 0===t?void 0:t.data,l.gazprom);d.data={...d.data,gazprom:{count:n.length,data:n}}}}),l.ppr&&(!n||n.includes(c.At.GAZPROM))&&await (0,s.U2)("".concat(m,"&id=").concat(t,"&provider=").concat(c.At.GAZPROM).concat((null==i?void 0:i.length)?"&network=".concat(i.join("-")):"")).then(e=>{if(l.ppr&&e&&"points_ppr"in e){var t;let n=preparePointsData(null===(t=e.points_ppr)||void 0===t?void 0:t.data,l.ppr);d.data={...d.data,ppr:{count:n.length,data:n}}}}),d},f="".concat(s.L9,"?map=offer"),getOfferData=async e=>{let{offerID:t}=e,n={data:void 0,error:void 0};return await (0,s.U2)("".concat(f,"&id=").concat(t)).then(e=>{var t,a,o,r,i,l,s,d,u,p,m;if(e||(n.error="Ðе ÑдалоÑÑ Ð·Ð°Ð³ÑÑзиÑÑ Ð´Ð°Ð½Ð½Ñе"),e&&"errors"in e&&(null===(t=e.errors)||void 0===t?void 0:t.length)&&(n.error=e.errors[0]),e&&"client"in e&&(n.data={...n.data,expiration:null===(a=e.client)||void 0===a?void 0:a.expiration,client:{...null===(o=n.data)||void 0===o?void 0:o.client,company:null===(r=e.client)||void 0===r?void 0:r.name}}),e&&"contact"in e&&(n.data={...n.data,client:{...null===(i=n.data)||void 0===i?void 0:i.client,name:null===(l=e.contact)||void 0===l?void 0:l.fio}}),e&&"manager"in e&&(n.data={...n.data,client:{...null===(s=n.data)||void 0===s?void 0:s.client,manager:{name:null===(d=e.manager)||void 0===d?void 0:d.fio,tel:null===(u=e.manager)||void 0===u?void 0:u.tel}}}),e&&"fuel_guide"in e){let t={dt:{id:"dt",name:"ÐТ",min:1,max:99.99,type:"dt"}};for(let n in e.fuel_guide){let e=formatFuelID(n);e.includes("dt")||(t[e]={id:e,name:formatFuelName(n),min:1,max:99.99,type:"other"})}n.data={...n.data,fuelGuide:t}}if(e&&"tarif"in e){let t=[];if(null===(p=e.tarif)||void 0===p?void 0:p.gpn){let a=Object.entries(e.tarif.gpn).filter(e=>{let[t,n]=e;return"number"==typeof(null==n?void 0:n.gas)||"number"==typeof(null==n?void 0:n.dt)});a.length&&t.push({id:c.At.GAZPROMNEFT,network:a.map(e=>{let[t]=e;return"".concat(c.At.GAZPROMNEFT,"-").concat(t)})}),a.forEach(e=>{var t,a,o;let[r,i]=e;n.data={...n.data,rates:{...null===(t=n.data)||void 0===t?void 0:t.rates,[c.At.GAZPROMNEFT]:{...null===(o=n.data)||void 0===o?void 0:null===(a=o.rates)||void 0===a?void 0:a[c.At.GAZPROMNEFT],[r]:{dt:(null==i?void 0:i.dt)||0,other:(null==i?void 0:i.gas)||0}}}}})}if(null===(m=e.tarif)||void 0===m?void 0:m.ppr){let a=Object.entries(e.tarif.ppr).filter(e=>{let[t,n]=e;return"number"==typeof(null==n?void 0:n.gas)||"number"==typeof(null==n?void 0:n.dt)});a.length&&t.push({id:c.At.GAZPROM,network:a.map(e=>{let[t]=e;return"".concat(c.At.GAZPROM,"-").concat(t)})}
1),a.forEach(e=>{var t,a,o;let[r,i]=e;n.data={...n.data,rates:{...null===(t=n.data)||void 0===t?void 0:t.rates,[c.At.GAZPROM]:{...null===(o=n.data)||void 0===o?void 0:null===(a=o.rates)||void 0===a?void 0:a[c.At.GAZPROM],[r]:{dt:(null==i?void 0:i.dt)||0,other:(null==i?void 0:i.gas)||0}}}}})}n.data={...n.data,providers:t}}}),n};var v=n(14921);let _="".concat(s.Qz,"/clients/0/notification/sendsmsofferapprove"),sendVerificationCode=async e=>{let{offerID:t,phoneNumber:n}=e;v.yy.setLoadingStatus("operation-loading");let a=await (0,s.U2)("".concat(_,"?id=").concat(t,"&tel=").concat(n.replace(/\D/g,""))).then(e=>{var t,n;if(e&&(null===(t=e.success)||void 0===t?void 0:t.id)&&(null===(n=e.success)||void 0===n?void 0:n.text)){let{id:t,text:n}=e.success;return v.yy.addLoadingSuccessMessage(n),t}e&&e.error?v.yy.addLoadingErrorMessage(e.error):v.yy.addLoadingErrorMessage("Ðе ÑдалоÑÑ Ð¾ÑпÑавиÑÑ ÐºÐ¾Ð´ подÑвеÑждениÑ")});return v.yy.setLoadingStatus("finished"),a},h="".concat(s.Qz,"/clients/0/notification/checksmsofferapprove"),verifyCode=async e=>{let{sessionID:t,code:n,onSuccess:a}=e;v.yy.setLoadingStatus("operation-loading"),await (0,s.U2)("".concat(h,"?id=").concat(t,"&code=").concat(n)).then(e=>{e&&e.success?a():v.yy.addLoadingErrorMessage("Ðод подÑвеÑÐ¶Ð´ÐµÐ½Ð¸Ñ Ð½Ðµ пÑинÑÑ")}),v.yy.setLoadingStatus("finished")},useLoadMapData=()=>{let[e,t]=(0,i.useState)(!1),[n,a]=(0,i.useState)(void 0),[o,r]=(0,i.useState)(void 0),{id:c,provider:s,owner:d,fuel:u}=(0,l.oN)(),p=(null==c?void 0:c.length)?c[0]:null;return(0,i.useEffect)(()=>{p&&u&&(t(!0),getMapData({offerID:p,provider:s,owner:d,fuel:u}).then(e=>{let{data:n,error:o}=e;a(n),r(o),t(!1)}))},[p,s,d,u]),{isLoading:e,data:n,error:o}};var g=n(11163);let useLoadOfferData=()=>{let[e,t]=(0,i.useState)(!1),[n,a]=(0,i.useState)(void 0),[o,r]=(0,i.useState)(void 0),{id:c,fuel:s}=(0,l.oN)(),d=(null==c?void 0:c.length)?c[0]:null,u=(0,g.useRouter)();return(0,i.useEffect)(()=>{d&&(t(!0),getOfferData({offerID:d}).then(e=>{let{data:n,error:o}=e;a(n),r(o),t(!1)}))},[d]),(0,i.useEffect)(()=>{let{providers:e,fuelGuide:t}=n||{},{min:a,max:o}=(null==t?void 0:t.dt)||{};!s&&e&&a&&o&&u.push({query:{...u.query,fuel:e.map(e=>"".concat(e.id,"-dt-").concat(Math.trunc(100*a),"-").concat(Math.trunc(100*o)))}})},[s,n,u]),{isLoading:e,data:n,error:o}},x="offer-session-id",useLogin=()=>{let{manager:e}=(0,l.oN)(),t=e&&"true"===e[0],[n,a]=(0,i.useState)(!1);return(0,i.useEffect)(()=>{var e;let t=null===(e=sessionStorage)||void 0===e?void 0:e.getItem(x);t&&a(!0)},[]),(0,i.useEffect)(()=>{t&&a(!0)},[t]),{isLoggedIn:n,handleLogin:e=>{var t;a(!0),null===(t=sessionStorage)||void 0===t||t.setItem(x,e)}}};var j=n(32099),y=n(97762),b=n(47962),C=n.n(b),F=n(19406),N=n(71492),O=n(94184),P=n.n(O),S=n(96518),L=n.n(S),I=n(96498);let Root=e=>{let{componentRef:t,className:n,isOpen:o,handleClose:r,children:i}=e,l=(0,N.iP)().windowSize.width,s=l<c.GV.TabletPortrait;return(0,a.jsx)(a.Fragment,{children:(0,a.jsx)("div",{className:P()(L().root,o&&L().root_isOpen),children:s?(0,a.jsx)(a.Fragment,{children:(0,a.jsxs)("div",{ref:t,className:P()(n,L().contentWrapper),children:[(0,a.jsx)("button",{className:L().closeButton,type:"button","aria-label":"ÐакÑÑÑÑ Ð¸Ð½ÑоÑмаÑÐ¸Ñ Ð¾Ð± ÐÐС",onClick:r,children:(0,a.jsx)(I.Wc,{})}),(0,a.jsx)(j.W2,{className:L().container,children:(0,a.jsx)(j.l$,{className:L().scrollContainer,children:i})})]})}):(0,a.jsx)(a.Fragment,{children:(0,a.jsxs)(j.$0,{componentRef:t,className:P()(n,L().contentWrapper),title:{tag:"h2",text:"ÐнÑоÑмаÑÐ¸Ñ Ð¾ ÐÐС",isHidden:!0},children:[(0,a.jsx)("button",{className:L().closeButton,type:"button","aria-label":"ÐакÑÑÑÑ Ð¸Ð½ÑоÑмаÑÐ¸Ñ Ð¾Ð± ÐÐС",onClick:r,children:(0,a.jsx)(I.Wc,{})}),i]})})})})},StationInfo=e=>{let{className:t,data:n,onClose:o}=e,[r,s]=(0,i.useState)(!0),d=(0,i.useRef)(null),handleClose=()=>{s(!1),setTimeout(o,400)};return(0,N.t$)(handleClose,[d]),(0,N.WI)(r,handleClose),(0,a.jsx)(a.Fragment,{children:(0,a.jsxs)(Root,{componentRef:d,className:t,isOpen:r,handleClose:handleClose,children:[(0,a.jsx)(j.FR,{className:L().datalist,data:[{title:"Ðид каÑÑÑ",content:n.type&&c.eT[n.type]?c.eT[n.type].name:null,asideContent:n.type&&c.eT[n.type]?(0,a.jsx)(a.Fragment,{children:(0,a.jsx)("div",{className:L().cardImage,children:c.eT[n.type].icon.full()})}):null},{title:"ÐÑенд",content:n.brand},{title:"Ðаименование",content:n.name},{title:"ÐдÑеÑ",content:n.address},{title:"ÐÐ¸Ð´Ñ Ñоплива",content:n.fuelTypes?(0,a.jsx)(a.Fragment,{children:(0,a.jsxs)("table",{className:L().fuels,children:[(0,a.jsx)("thead",{children:(0,a.jsxs)("tr",{children:[(0,a.jsx)(j.TX,{tag:"th",children:"Ðид Ñоплива"}),(0,a.jsx)("th",{children:"ÐÐС Ñена"}),(0,a.jsx)("th",{children:"ÐаÑа Ñена"})]})}),(0,a.jsx)("tbody",{children:(0,l.bs)({array:n.fuelTypes,key:"name"}).map(e=>{let{id:t,name:n,price:o,clientPrice:r}=e;return(0,a.jsxs)("tr",{children:[(0,a.jsxs)("td",{children:[n,":"]}),(0,a.jsxs)("td",{children:[formatPrice(o)," Ñ"]}),(0,a.jsxs)("td",{children:[formatPrice(r)," Ñ "]})]},t)})})]})}):null}]}),n.hasDynamicPrices&&(0,a.jsx)(a.Fragment,{children:(0,a.jsxs)("div",{className:L().notice,children:[(0,a.jsx)("span",{className:L().noticeSign,children:"!"}),(0,a.jsx)("p",{className:L().noticeText,children:"Ðа\xa0данной ÐÐС динамиÑеÑкое ÑенообÑазование (Ñена завиÑÐ¸Ñ Ð¾Ñ\xa0ÑпÑоÑа и\xa0вÑемени ÑÑÑок)"})]})})]})})},Map=e=>{let{className:t,data:n,isLoading:o}=e,{fuel:r}=(0,l.oN)(),s=getFuelQueryParams(r),d=(0,N.iP)().windowSize.width,[u,p]=(0,i.useState)(null),m=d>=c.GV.Desktop,f=d<c.GV.TabletPortrait,v=f?15:20,_=2*v+450,h=v+40,createPriceTemplate=e=>{let{regularPrice:t,clientPrice:n}=e;return"\n <div class='point-text-wrapper'>
1\n <span class='\n point-text\n point-text--price\n ".concat(n<t?"point-text--price-discount":"","\n ").concat(n>t?"point-text--price-charge":"","\n '>\n ").concat(formatPrice(n),"\n\n ").concat(n<t?"<span class='point-text-percent'>%</span>":"","\n </span>\n </div>\n ")};return(0,i.useEffect)(()=>{p(null)},[o]),(0,a.jsx)(a.Fragment,{children:(0,a.jsxs)("div",{className:C().root,children:[(0,a.jsx)(j.Eg,{className:C().map,controlsPositions:m?{zoom:{top:v,right:_},geolocation:{bottom:v,right:_}}:{search:{top:h,left:v},zoom:{top:h,right:v}},filter:void 0,points:n,currentPointState:[u,p],isLoading:o,clustererMaxZoom:12,clustererTemplateCreator:e=>{let t,{points:n,currentZoom:a}=e,o=n.length;if(o<(a>12?10:20)){let e=n.map(e=>{var t;let n=e.type?s[e.type]:void 0,{fuelType:a}=n||{};return null===(t=e.fuelTypes)||void 0===t?void 0:t.find(e=>{var t;return a&&(null===(t=e.id)||void 0===t?void 0:t.includes(a))})});t=e.reduce((e,t)=>e&&e.clientPrice?(null==t?void 0:t.clientPrice)&&t.clientPrice<e.clientPrice?t:e:t,void 0)}let r=(null==t?void 0:t.price)||0,i=(null==t?void 0:t.clientPrice)||0;return"\n <div class='point-cluster'>\n ".concat(o,"\n\n ").concat(r&&i?createPriceTemplate({regularPrice:r,clientPrice:i}):"","\n </div>\n ")},pointTemplateCreator:e=>{var t;let{point:n,isCurrent:a}=e,o=n.type?s[n.type]:void 0,{fuelType:r}=o||{},i=null===(t=n.fuelTypes)||void 0===t?void 0:t.filter(e=>{var t;return r&&(null===(t=e.id)||void 0===t?void 0:t.includes(r))}),c=i?(0,l.bs)({array:i,key:"clientPrice"})[0]:void 0,d=(null==c?void 0:c.price)||0,u=(null==c?void 0:c.clientPrice)||0,p=F.zt[n.type].icon.mini();return'\n <div\n class="point"\n style="--bg-color: '.concat(n.color,'"\n >\n ').concat(a&&n.logo?'\n <div class="point-marker">\n <img src='.concat(n.logo," alt='ÐÐС ").concat(n.brand,"'/>\n </div>\n "):'\n <div class="point-text-wrapper">\n '.concat(d&&u?createPriceTemplate({regularPrice:d,clientPrice:u}):"","\n\n ").concat(n.brand?'\n <span class="point-text point-text--name">\n '.concat(y.renderToString(p)," ").concat(n.brand,"\n </span>\n "):"","\n </div>\n "),"\n </div>\n ")},pinSize:40,hasNoZoomOnPinClick:!0}),u&&(0,a.jsx)(a.Fragment,{children:(0,a.jsx)(StationInfo,{className:C().stationInfo,data:u,onClose:()=>p(null)})})]})})};var A=n(39910),k=n.n(A),M=n(51059),w=n.n(M),D=n(960),T=n(38591),R=n(99764),E=n.n(R);let Chip=e=>{let{className:t,value:n,removeButton:o}=e;return(0,a.jsx)(a.Fragment,{children:(0,a.jsxs)("span",{className:P()(t,E().root),children:[n,o&&(0,a.jsx)(a.Fragment,{children:(0,a.jsx)("button",{className:E().removeButton,"aria-label":o.text,onClick:o.onClick,children:(0,a.jsx)(I.u5,{})})})]})})},OfferCard=e=>{var t,n,o;let{className:r,rates:s,fuelGuide:d,providers:u,pointsCount:p}=e,m=u.filter(e=>e.isCurrent)[0],{provider:f}=m,v=f.id,_=F.zt[v],h=(null===(t=_.network)||void 0===t?void 0:t.filter(e=>m.provider.network.includes(e.id)))||[],x=(0,l.bs)({array:Object.values(d),key:"name"}),y=(0,g.useRouter)(),[b,C]=(0,i.useState)([]),[N,O]=(0,i.useState)(!1),[S,L]=(0,i.useState)(!1),[I,A]=(0,i.useState)(!1),{provider:k,owner:M,fuel:R}=(0,l.oN)(),E=getFuelQueryParams(R),{fuelType:z,minPrice:W,maxPrice:G}=E[v]||{},B=null==M?void 0:M.filter(e=>e.includes(v)),Z=B&&B.length&&_.network?null===(n=_.network)||void 0===n?void 0:n.filter(e=>null==B?void 0:B.includes(e.id)):h,U=Z.find(e=>e.id==="".concat(v,"-partner")),q=!B||(null==U?void 0:null===(o=U.childrenIDs)||void 0===o?void 0:o.every(e=>null==B?void 0:B.includes(e)))?Z.filter(e=>{var t;return!(null==U?void 0:null===(t=U.childrenIDs)||void 0===t?void 0:t.includes(e.id))}):Z,[J,Q]=(0,i.useState)(G&&W?[W,G]:[]),V=Math.min(...q.map(e=>{var t,n;return z&&(null===(n=s[v])||void 0===n?void 0:n[e.id.split("-")[1]][null===(t=d[z])||void 0===t?void 0:t.type])||0})),X=0===V,$=V<0,H=V>0,K=z?d[z]:void 0;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:P()(r,w().root),children:(0,a.jsx)(j.FR,{itemClassName:w().dataListItem,data:[{title:"Ðид каÑÑÑ",content:F.zt[v].name,asideContent:(0,a.jsx)(a.Fragment,{children:(0,a.jsx)("div",{className:w().cardImage,children:_.icon.full()})}),button:{ariaLabel:"ÐÑбÑаÑÑ Ñип каÑÑÑ",onClick:()=>O(!0)}},{title:q.map(e=>{let{name:t}=e;return t}).join(", "),content:p?"~ ".concat((0,l.uf)(p)," ÐÐС"):"ÐÐС не\xa0найденÑ",asideContent:(0,a.jsx)(a.Fragment,{children:(0,a.jsx)("div",{className:w().stationIcons,children:Z.map(e=>{let{id:t,icon:n}=e;return n&&(0,a.jsx)("div",{className:w().stationIcon,children:n},t)})})}),button:{ariaLabel:"ÐÑбÑаÑÑ Ñип ÑеÑи ÐÐС",onClick:()=>L(!0)}},{title:z?d[z].name:"ÐÑбеÑиÑе вид Ñоплива",content:z?"".concat(H?"+":"").concat((0,l.uf)(V,{hasFractionDigits:!0})," %"):"\xa0",asideContent:z&&(0,a.jsx)(a.Fragment,{children:(0,a.jsxs)("div",{className:w().priceWrapper,children:[W&&G&&(0,a.jsx)(a.Fragment,{children:(0,a.jsx)(Chip,{value:"".concat((0,l.uf)(W,{hasFractionDigits:!0})," Ñ - ").concat((0,l.uf)(G,{hasFractionDigits:!0})," Ñ"),removeButton:K&&((null==K?void 0:K.min)!==W||(null==K?void 0:K.max)!==G)?{text:"УбÑаÑÑ ÑилÑÑÑ Ð¿Ð¾ Ñене Ñоплива",onClick:()=>{let e=null==R?void 0:R.filter(e=>!e.includes(v));K&&y.push({query:{...y.query,fuel:["".concat(v,"-").concat(K.id,"-").concat(Math.trunc(100*K.min),"-").concat(Math.trunc(100*K.max)
1),...e||[]]}})}}:void 0})}),(0,a.jsxs)("p",{className:P()(w().priceLabel,$&&w().priceLabel_discount,H&&w().priceLabel_charge),children:[$&&"Ñкидка Ð¾Ñ ÑÐµÐ½Ñ ÐÐС",X&&"по Ñене ÐÐС",H&&"наÑенка к Ñене ÐÐС"]})]})}),button:{ariaLabel:"ÐÑбÑаÑÑ Ð²Ð¸Ð´ Ñоплива",onClick:()=>A(!0)}}]})}),N&&(0,a.jsx)(a.Fragment,{children:(0,a.jsx)(T.sB,{title:"ÐÑбеÑиÑе вид каÑÑÑ",type:"checkbox",filters:u.map(e=>{let{provider:{id:t}}=e;return{id:t,name:F.zt[t].name}}),currentFiltersIDs:k||[c.At.GAZPROMNEFT,c.At.GAZPROM],onChoose:e=>{y.push({query:{...y.query,provider:e}})},onClose:()=>O(!1)})}),S&&(0,a.jsx)(a.Fragment,{children:(0,a.jsx)(T.sB,{title:"ÐÑбеÑиÑе ÑеÑÑ ÐÐС",type:"checkbox",filters:h.map(e=>{let{id:t,name:n,childrenIDs:a,excludeIDs:o}=e;return{id:t,name:n,childrenIDs:a,excludeIDs:o}}),currentFiltersIDs:Z.map(e=>{let{id:t}=e;return t}),onChoose:e=>{let t=null==M?void 0:M.filter(e=>!e.includes(v));y.push({query:{...y.query,owner:t?[...new Set([...t,...e])]:e}})},onClose:()=>L(!1)})}),I&&(0,a.jsx)(a.Fragment,{children:(0,a.jsx)(T.sB,{title:"ÐÑбеÑиÑе вид Ñоплива",type:"radio",filtersLabel:"Ðид Ñоплива",filters:x.map(e=>{let{id:t,name:n}=e;return{id:t,name:n}}),currentFiltersIDs:z?[z]:[],additionalTrackingValues:J,onPreChoose:e=>{if(C(e),e.length||!J.length){let t=e.map(e=>d[e]);Q([Math.min(...t.map(e=>e.min)),Math.max(...t.map(e=>e.max))])}},onChoose:e=>{let t=null==R?void 0:R.filter(e=>!e.includes(v));y.push({query:{...y.query,fuel:["".concat(v,"-").concat(e.join("-"),"-").concat(Math.trunc(100*J[0]),"-").concat(Math.trunc(100*J[1])),...t||[]]}})},onClose:()=>{A(!1),C([])},isFixedHeight:!1,children:1===b.length&&(0,a.jsx)(a.Fragment,{children:(0,a.jsx)(j.U2,{className:w().rangeSlider,label:"Цена на\xa0ÐÐС",min:(null==b?void 0:b.length)&&d[b[0]].min||z&&d[z].min||0,max:(null==b?void 0:b.length)&&d[b[0]].max||z&&d[z].max||0,step:.1,values:[(0,D.Xy)(b,[z])&&W||(null==b?void 0:b.length)&&d[b[0]].min||0,(0,D.Xy)(b,[z])&&G||(null==b?void 0:b.length)&&d[b[0]].max||0],unit:"Ñ",onChange:e=>Q(e)},b[0])})})})]})},ContentWrapper=e=>{let{children:t}=e,[n,o]=(0,i.useState)(!1),r=(0,N.iP)().windowSize.width,l=r>=c.GV.Desktop,s=(0,i.useRef)(null),d=(0,i.useRef)(null),closeMenu=()=>{o(!1)};return(0,N.Pr)(!l&&n),(0,N.Tb)(!l&&n,d.current),(0,N.t$)(closeMenu,[s,d]),(0,N.WI)(!l&&n,closeMenu),l?(0,a.jsx)(a.Fragment,{children:(0,a.jsx)("div",{className:k().contentWrapper,children:(0,a.jsx)(j.$0,{className:k().content,theme:"dark",title:{tag:"h1",text:"ÐоммеÑÑеÑкое пÑедложение"},children:t})})}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("button",{ref:s,className:P()(k().toggleButton,n&&k().toggleButton_close),type:"button","aria-label":"".concat(n?"ÐакÑÑÑÑ":"ÐÑкÑÑÑÑ"," деÑали пÑедложениÑ"),onClick:()=>o(!n),children:(0,a.jsx)("span",{className:k().toggleButtonIcon})}),(0,a.jsx)("div",{ref:d,className:P()(k().contentWrapper,n&&k().contentWrapper_isOpened),children:(0,a.jsx)("div",{className:k().scrollContainer,children:t})})]})},Content=e=>{var t,n,o,r,i,l,c,s;let{offerData:d,mapData:u}=e,{expiration:p,client:m,rates:f,fuelGuide:v,providers:_}=d;return(0,a.jsx)(a.Fragment,{children:(0,a.jsxs)(ContentWrapper,{children:[(0,a.jsx)(j.FR,{className:k().offerData,data:[{title:"Ðазвание клиенÑа",content:null==m?void 0:m.company},{title:"ÐеÑÑоналÑнÑй менеджеÑ",content:((null==m?void 0:null===(t=m.manager)||void 0===t?void 0:t.name)||(null==m?void 0:null===(n=m.manager)||void 0===n?void 0:n.tel))&&(0,a.jsxs)(a.Fragment,{children:[null==m?void 0:null===(o=m.manager)||void 0===o?void 0:o.name,(null==m?void 0:null===(r=m.manager)||void 0===r?void 0:r.name)&&(null==m?void 0:null===(i=m.manager)||void 0===i?void 0:i.tel)&&" / ",(null==m?void 0:null===(l=m.manager)||void 0===l?void 0:l.tel)&&(0,a.jsx)(a.Fragment,{children:(0,a.jsx)(j.rU,{modifier:"opacity",href:"tel:".concat(null==m?void 0:null===(c=m.manager)||void 0===c?void 0:c.tel),children:null==m?void 0:null===(s=m.manager)||void 0===s?void 0:s.tel})})]})},{title:"СÑок дейÑÑÐ²Ð¸Ñ Ð¿ÑедложениÑ",content:p&&"до ".concat(p)}]}),_&&f&&v&&_.map(e=>{var t;return(0,a.jsx)(OfferCard,{className:k().card,rates:f,fuelGuide:v,providers:_.map(t=>({provider:t,isCurrent:t.id===e.id})),pointsCount:(null==u?void 0:null===(t=u[e.id])||void 0===t?void 0:t.count)||0},e.id)})]})})};var z=n(47899),W=n.n(z);let G={min:500,max:1e3},LoginForm=e=>{var t,n;let{expiration:o,clientData:r,onLogin:c}=e,[s,d]=(0,i.useState)("initial"),u="phone"===s||"code"===s,[p,m]=(0,i.useState)(""),[f,v]=(0,i.useState)(!1),[_,h]=(0,i.useState)(""),[g,x]=(0,i.useState)(!1),[y,b]=(0,i.useState)(void 0),{id:C}=(0,l.oN)(),F=(null==C?void 0:C.length)?C[0]:null,N=o&&(0,D.qb)(o,"dd.MM.yyyy")?(0,D.sG)(o,"dd.MM.yyyy"):void 0,O=N&&(0,D.QS)(N,"day","end")<new Date,handlePhoneSubmit=()=>{11===p.replace(/\D/g,"").length&&F?sendVerificationCode({offerID:F,phoneNumber:p}).then(e=>{e&&(b(e),d("code"))}):v(!0)},handleCodeSubmit=()=>{4===_.length&&y?verifyCode({sessionID:y,code:_,onSuccess:()=>{c(y)}}):x(!0)};return(0,a.jsx)(a.Fragment,{children:(0,a.jsx)(j.$0,{className:W().root,title:{tag:"h1",text:"ÐаÑÑа ÐÐС"},children:(0,a.jsx)("div",{className:W().content,children:"loading"===s?(0,a.jsx)(a.Fragment,{children:(0,a.jsx)(j.nt,{className:W().loader})}):(0,a.jsxs)(a.Fragment,{children:["initial"===s&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("p",{className:W().text,children:"ÐоÑмоÑÑеÑÑ Ð½Ð°\xa0каÑÑе ÑÐµÐ½Ñ ÐÐС Ñ\xa0ÑÑеÑом индивидÑалÑнÑÑ
ÑаÑиÑов длÑ:"}),(0,a.jsx)(j.FR,{data:[{title:"ÐлиенÑ",content:r.name},{title:"ÐомпаниÑ",content:r.company}]})]}),"expired"===s&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:W().textWrapper,children:[(0,a.jsx)("p",{className:W().text,children:"СÑок дейÑÑÐ²Ð¸Ñ ÐаÑего ÐоммеÑÑеÑкого пÑÐµÐ´Ð»Ð¾Ð¶ÐµÐ½Ð¸Ñ Ð¸ÑÑÑк."}),(0,a.jsx)("p",{className:W().text,children:"ÐеÑÑоналÑнÑй Ð¼ÐµÐ½ÐµÐ´Ð¶ÐµÑ Ð¼Ð¾Ð¶ÐµÑ Ð¸Ð·Ð¼ÐµÐ½Ð¸ÑÑ Ð¸Ð»Ð¸ пÑодлиÑÑ ÑÑок дейÑÑÐ²Ð¸Ñ ÑекÑÑего пÑедложениÑ"})]}),(0,a.jsx)(j.FR,{data:[{title:"ÐенеджеÑ",content:null===(t=r.manager)||void 0===t?void 0:t.name},{title:"ÐÐ¾Ð¼ÐµÑ ÑелеÑона",content:(null===(n=r.manager)||void 0===n?void 0:n.tel)&&(0,a.jsx)(a.Fragment,{children:(0,a.jsx)(j.rU,{modifier:"opacity",href:"tel:".concat(r.manager.tel),children:r.manager.tel})})}]})]}),u&&(0,a.jsx)(a.Fragment,{children:(0,a.jsxs)("form",{id:"login-form",className:W().form,onSubmit:e=>{e.preventDefault(),"phone"===s&&handlePhoneSubmit(),"code"===s&&handleCodeSubmit()},children:[(0,a.jsx)("p",{className:W().text,children:"ÐаннÑе Ð´Ð»Ñ Ð²Ñ
ода"}
1),"phone"===s&&(0,a.jsx)(a.Fragment,{children:(0,a.jsx)(j.Wi,{className:W().formField,label:"ТелеÑон",name:"phone-number",type:"tel",inputMode:"tel",autocomplete:"tel",mask:"+7 999 999 99 99",placeholder:"ÐведиÑе Ð½Ð¾Ð¼ÐµÑ ÑелеÑона",value:p,onChange:e=>{let t=e.target;m(t.value),v(!1)},isInvalid:f})}),"code"===s&&(0,a.jsx)(a.Fragment,{children:(0,a.jsx)(j.Wi,{className:W().formField,modifiers:["monospace"],label:"Ðод подÑвеÑждениÑ",name:"verification-code",inputMode:"numeric",autocomplete:"off",placeholder:"___ ___ ___ ___",value:_,onChange:e=>{let t=e.target,n=t.value.replace(/\D/g,"");n.length<=4&&h(n),x(!1)},isInvalid:g,isRequired:!1})})]})}),(0,a.jsxs)("div",{className:W().buttonsWrrapper,children:[("expired"===s||"phone"===s||"code"===s)&&(0,a.jsx)(a.Fragment,{children:(0,a.jsx)(j.zx,{className:W().button,type:"button",onClick:()=>{("expired"===s||"phone"===s)&&d("initial"),"code"===s&&d("phone")},children:"Ðазад"})}),"expired"!==s&&(0,a.jsx)(a.Fragment,{children:(0,a.jsx)(j.zx,{className:W().button,modifiers:["yellow"],type:u?"submit":"button",form:u?"login-form":void 0,onClick:()=>{"initial"===s&&(d("loading"),setTimeout(()=>{d(O?"expired":"phone")},(0,D.t$)(G)))},children:"Ðалее"})})]})]})})})})},Offer=()=>{var e,t;let{isLoading:n,data:o,error:i}=useLoadOfferData(),{isLoading:l,data:c}=useLoadMapData(),{isLoggedIn:s,handleLogin:d}=useLogin();return(0,a.jsx)(a.Fragment,{children:(0,a.jsx)("main",{className:r().root,children:(0,a.jsx)(j.W2,{className:r().container,isCentered:!0,children:n?(0,a.jsx)(a.Fragment,{children:(0,a.jsx)(j.nt,{className:r().loader})}):(0,a.jsxs)(a.Fragment,{children:[o&&(0,a.jsx)(a.Fragment,{children:s?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(Map,{className:r().map,data:[...(null==c?void 0:null===(e=c.gazprom)||void 0===e?void 0:e.data)||[],...(null==c?void 0:null===(t=c.ppr)||void 0===t?void 0:t.data)||[]],isLoading:l}),(0,a.jsx)(Content,{offerData:o,mapData:c})]}):o.expiration&&o.client&&(0,a.jsx)(a.Fragment,{children:(0,a.jsx)(LoginForm,{expiration:o.expiration,clientData:o.client,onLogin:d})})}),i&&(0,a.jsx)(a.Fragment,{children:(0,a.jsx)(j.Am,{status:{type:"error",title:i}})})]})})})})};var B=!0;let Z="force-no-store";function offer_Offer(){return(0,a.jsx)(Offer,{})}},51059:function(e){e.exports={root:"_OfferCard_root__57JBE",dataListItem:"_OfferCard_dataListItem__qtcGe",cardImage:"_OfferCard_cardImage__zKgxc",stationIcons:"_OfferCard_stationIcons__AYM6h",stationIcon:"_OfferCard_stationIcon__oQrwo",priceWrapper:"_OfferCard_priceWrapper__idkHt",priceLabel:"_OfferCard_priceLabel__o3PMA",priceLabel_discount:"_OfferCard_priceLabel_discount__5SF5q",priceLabel_charge:"_OfferCard_priceLabel_charge__xLc77",rangeSlider:"_OfferCard_rangeSlider__PQVlr"}},39910:function(e){e.exports={contentWrapper:"_Content_contentWrapper__LNDAK",disableBreakpointAnimation:"_Content_disableBreakpointAnimation__zjfXh",contentWrapper_isOpened:"_Content_contentWrapper_isOpened__yAA5n",content:"_Content_content__XCOJc",toggleButton:"_Content_toggleButton__r6Hvd",toggleButtonIcon:"_Content_toggleButtonIcon__rKQI6",toggleButton_close:"_Content_toggleButton_close__TTLyY",scrollC
1ontainer:"_Content_scrollContainer__hwXoN",offerData:"_Content_offerData__1o9Sc",card:"_Content_card__3l3i1"}},47899:function(e){e.exports={root:"_LoginForm_root__R6ROr",content:"_LoginForm_content__JJF1v",loader:"_LoginForm_loader__Jswk5",text:"_LoginForm_text__h8JEF",textWrapper:"_LoginForm_textWrapper__PvPZw",form:"_LoginForm_form__IDsJ4",formField:"_LoginForm_formField__aar5w",buttonsWrrapper:"_LoginForm_buttonsWrrapper__sydzp",button:"_LoginForm_button__4tvuE"}},96518:function(e){e.exports={root:"_StationInfo_root__UIPJI",close:"_StationInfo_close__Wp40A",root_isOpen:"_StationInfo_root_isOpen__SuK_P",open:"_StationInfo_open__ohF1U",contentWrapper:"_StationInfo_contentWrapper__9_5Sm",container:"_StationInfo_container__kbjJy",scrollContainer:"_StationInfo_scrollContainer__59aDP",closeButton:"_StationInfo_closeButton__l_A3P",datalist:"_StationInfo_datalist__LfncO",cardImage:"_StationInfo_cardImage__V2lEq",fuels:"_StationInfo_fuels__DNQIY",notice:"_StationInfo_notice__OdZDn",noticeSign:"_StationInfo_noticeSign___gDSo",noticeText:"_StationInfo_noticeText__yzOza"}},47962:function(e){e.exports={root:"_Map_root__JhQMo",map:"_Map_map__JJaLf",stationInfo:"_Map_stationInfo__Yx2M_"}},87019:function(e){e.exports={root:"_Offer_root__6BE2N",container:"_Offer_container__ld7c0",loader:"_Offer_loader___scvp"}},99764:function(e){e.exports={root:"_Chip_root__ubdP1",removeButton:"_Chip_removeButton__PdRFw"}}},function(e){e.O(0,[774,888,179],function(){return e(e.s=46964)}),_N_E=e.O()}]);
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.