PageSourceSearch

https://starvell.com/_next/static/chunks/pages/favorites-ee47e885c798a752.js

js starvell.com collected 2026-10-04 04:10:38 UTC 15,487 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8503],{1278:(e,t,a)=>{"use strict";a.d(t,{A:()=>d});var i=a(37876),l=a(70727),_=a(73207),r=a(14232);let s=function(){let{viewportMultiplier:e=.5,anchorRef:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},[a,i]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{let a=()=>{var a;let l=null==t||null==(a=t.current)?void 0:a.getBoundingClientRect(),_=window.innerHeight*e;i(l&&(l.width>0||l.height>0)?-l.top>_:window.scrollY>_)},l=(0,_.nF)(200,a);return a(),window.addEventListener("scroll",l,{passive:!0}),()=>{window.removeEventListener("scroll",l)}},[e,t]),a};var n=a(69241),o=a(55717),c=a.n(o);function d(e){let{anchorRef:t}=e,a=(0,l.Y7)(e=>e.searchPanelOpen),_=s({viewportMultiplier:0,anchorRef:t});return(0,i.jsx)("button",{type:"button","aria-label":"Наверх",className:(0,n.A)(c().button,{[c().hidden]:!_,[c().hidden_instant]:a}),onClick:()=>window.scrollTo({top:0,behavior:"smooth"}),children:(0,i.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,i.jsx)("path",{d:"M12 19V5M12 5L5 12M12 5L19 12",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})})}},9534:(e,t,a)=>{"use strict";a.d(t,{A:()=>b});var i=a(37876),l=a(54587),_=a.n(l),r=a(35284),s=a.n(r);let n={src:"/_next/static/media/arrow-left.aa44af1c.svg",height:20,width:20,blurWidth:0,blurHeight:0};var o=a(89099),c=a(69241),d=a(77328),f=a.n(d),u=a(49908);function b(e){let{children:t,marginBottom:a=8,backButton:l,setDocumentTitle:r=!0,documentTitle:d,size:b="default",backButtonInline:h=!1,onBackButtonClick:m}=e,v=(0,o.useRouter)(),{back:p}=(0,u.O)();return(0,i.jsxs)("h1",{style:{marginBottom:a},className:(0,c.A)(s().title,s().has_back_button,s()["size_".concat(b)],{[s().inline]:h}),children:[("string"==typeof t||d)&&r&&(0,i.jsx)(f(),{children:(0,i.jsx)("title",{children:null!=d?d:t})}),(l||m)&&(0,i.jsx)(_(),{className:s().back_button,src:n,alt:"Назад",draggable:!1,onClick:null!=m?m:()=>{"string"==typeof l?v.push(l):"function"==typeof l?l(v):p()}}),(0,i.jsx)("div",{children:t})]})}},11185:(e,t,a)=>{"use strict";a.d(t,{A:()=>l});var i=a(37876);let l=()=>(0,i.jsx)("svg",{width:"15",height:"14",viewBox:"0 0 15 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,i.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.32858 1.14591C5.76865 -0.217351 3.46168 -0.496322 1.67014 1.0344C-0.267718 2.69015 -0.549271 5.47869 0.983141 7.45059C1.56482 8.1991 2.70015 9.32362 3.79123 10.3535C4.89508 11.3954 5.99638 12.3799 6.53949 12.8609C6.54288 12.8639 6.54634 12.867 6.54986 12.8701C6.60091 12.9153 6.66447 12.9717 6.7254 13.0175C6.79836 13.0725 6.9031 13.1407 7.04297 13.1824C7.22891 13.2379 7.42878 13.2379 7.61472 13.1824C7.75459 13.1407 7.85933 13.0725 7.93229 13.0175C7.99322 12.9717 8.05678 12.9153 8.10784 12.8701C8.11135 12.867 8.11481 12.8639 8.1182 12.8609C8.66131 12.3799 9.76261 11.3954 10.8665 10.3535C11.9575 9.32362 13.0929 8.1991 13.6745 7.45059C15.2011 5.48627 14.963 2.67622 12.9806 1.02856C11.1691 -0.477059 8.88676 -0.21787 7.32858 1.14591Z",fill:"currentColor"})})},14545:e=>{e.exports={table:"table_table__1aAxY",not_found:"table_not_found__BbT1_",table_head:"table_table_head__Ox64l",table_body:"table_table_body__9SFfO",table_item:"table_table_item__VN7KC",ver:"table_ver__dvmOR",table_filter_button:"table_table_filter_button__nQHv9",align_right:"table_align_right__3zXaP",table_empty:"table_table_empty__L7w0a",loading:"table_loading__Wj8TJ",new_table__head:"table_new_table__head__J_x1J",new_table__head__cell:"table_new_table__head__cell__GfkZC",full_width:"table_full_width__9Pp2t",flat:"table_flat__fjoDw",no_margin:"table_no_margin__UXU4D"}},33261:e=>{e.exports={separator:"separator_separator__omtZw",force:"separator_force__03VEc",separator_light:"separator_separator_light__hZ4l2",separator_margins:"separator_separator_margins__I3Tsf",fading:"separator_fading__NT45f"}},35284:e=>{e.exports={title:"title_title__rb9tp",back_button:"title_back_button__rC0dy",size_medium:"title_size_medium__898B4",size_small:"title_size_small__KTExz",inline:"title_inline__RV1QZ",has_back_button:"title_has_back_button__tiNiF"}},46667:e=>{e.exports={button:"favorite-button_button__WjjEA",active:"favorite-button_active__AznWT",loading:"favorite-button_loading__Zbuz4",offer:"favorite-button_offer__IWfD4",hover_disabled:"favorite-button_hover_disabled__Ft6nY",table:"favorite-button_table__PGQ_y"}},48978:(e,t,a)=>{"use strict";a.d(t,{w:()=>s});var i=a(37876),l=a(33261),_=a.n(l),r=a(69241);function s(e){let{marginTop:t,marginBottom:a,defaultMargins:l,className:s,light:n,force:o=!1,fading:c=!1}=e;return(0,i.jsx)("div",{className:(0,r.A)(_().separator,{[_().separator_margins]:!!l,[_
1().separator_light]:!!n,[_().force]:o,[_().fading]:c},s),style:{marginTop:t,marginBottom:a}})}},50635:e=>{e.exports={filters:"favorites-page_filters__c9U5b",search_field:"favorites-page_search_field__INNtN",no_results:"favorites-page_no_results__q5B7V",empty:"favorites-page_empty__2wjkv",empty_sticker:"favorites-page_empty_sticker__46x2x",empty_title:"favorites-page_empty_title__gjjEA",empty_text:"favorites-page_empty_text__JXYy5",empty_heart:"favorites-page_empty_heart__m3v6P"}},55717:e=>{e.exports={button:"scroll-to-top_button__lnpaz",hidden:"scroll-to-top_hidden__G1Frm",hidden_instant:"scroll-to-top_hidden_instant__CMUwa"}},61217:(e,t,a)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/favorites",function(){return a(61430)}])},61430:(e,t,a)=>{"use strict";a.r(t),a.d(t,{__N_SSP:()=>H,default:()=>J});var i=a(37876),l=a(57507),_=a(11185);let r={src:"/_next/static/media/favorites-picture.f2ad75e9.webp",height:320,width:320,blurDataURL:"data:image/webp;base64,UklGRtYAAABXRUJQVlA4WAoAAAAQAAAABwAABwAAQUxQSEEAAAAAABCUyrZNAAABx/////+mALb///////48/P//////9xZj////////eQDX///////nAF7D+////+AAAAg8hYiDVQBWUDggbgAAABACAJ0BKggACAACQDglsAJ0BbqpcFEbVAAA/rhXr69Qfp6dNlIcJ8f2eJ1vHnJDtuXWj/SlTj8CEsf96lSUzujV06G+CsZpOll/FnN9+1uDaOubxO/b2+OKd7u6W9T71a+ewNY2/BU0L/g36MAA",blurWidth:8,blurHeight:8};var s=a(89318),n=a(56750),o=a(1278),c=a(48978),d=a(9534),f=a(15955),u=a.n(f),b=a(61948),h=a(36649),m=a(77328),v=a.n(m),p=a(54587),x=a.n(p),A=a(14232),g=a(83985),w=a(53412),y=a(98935),j=a(14545),N=a.n(j),C=a(89728),k=a.n(C),B=a(83245),E=a(56591),O=a(69241),S=a(8932),z=a(5414),P=a(71784),U=a(84169),L=a.n(U);function T(e){let{offers:t,popularPaymentSystem:a,onRemove:l,scrollTopAnchorRef:_}=e;return(0,i.jsxs)("div",{ref:e=>{_&&(_.current=e)},className:(0,O.A)(N().table,L().table),children:[(0,i.jsxs)("div",{className:(0,O.A)(N().table_head,L().head),children:[(0,i.jsx)("span",{className:L().head_description,children:"Описание"}),(0,i.jsx)("span",{className:L().head_user,children:"Продавец"}),(0,i.jsx)("span",{className:(0,O.A)(k().availability_head_cell,L().head_availability),children:"Наличие"}),(0,i.jsx)("span",{className:(0,O.A)(k().price_head_cell,L().head_price),children:"Цена"})]}),(0,i.jsx)("div",{className:N().table_body,children:t.map(e=>(0,i.jsx)(I,{favorite:e,popularPaymentSystem:a,onRemove:l},e.id))})]})}function I(e){let{favorite:t,popularPaymentSystem:a,onRemove:l}=e,_=t.game,r=t.category,s=(0,h.qI)(t),n=(0,h.Nt)(t,r),o=!t.isActive;return(0,i.jsx)("section",{className:(0,O.A)(L().row,{[L().inactive]:o}),children:(0,i.jsxs)("div",{className:(0,O.A)(N().table_item,L().item),children:[(0,i.jsx)(S.A,{href:s,className:L().row_link,children:(0,i.jsx)("span",{children:n})}),(0,i.jsx)(P.A,{variant:"table",active:!0,onClick:()=>l(t.publicId),className:L().favorite}),(0,i.jsxs)("div",{className:L().title_username_combined,children:[(0,i.jsx)(S.A,{href:s,className:L().cell_link,children:(0,i.jsx)("span",{children:n})}),(0,i.jsxs)("div",{className:L().description,children:[(0,i.jsx)("div",{className:L().title,children:n}),(0,i.jsxs)(S.A,{href:(0,E.Me)(_,r),className:L().subtitle,children:[_.name,", ",r.name]})]}),(0,i.jsx)("div",{className:L().user_wrapper,children:(0,i.jsx)(z.Ay,{coloredUsernameByOnlineStatus:!0,isFullAreaLinkable:!1,mobileFriendly:!0,showRating:!0,showOnlineStatus:!1,showInfo:!0,data:t.user,className:L().user})})]}),!r.offersAvailabilityIsHidden&&(0,i.jsxs)("div",{className:(0,O.A)(k().availability_cell,L().availability,{[L().availability_zero]:0===t.availability}),children:[(0,i.jsx)("div",{children:(0,h.xO)(t)}),(0,h.S4)(t.minOrderCurrencyAmount,t.availabilityUnit)&&(0,i.jsxs)("div",{className:(0,O.A)(k().min_quantity,k().mobile_hide),children:["мин. ",t.minOrderCurrencyAmount," ",B.lH[t.availabilityUnit]]})]}),(0,i.jsxs)("div",{className:(0,O.A)(k().price_cell,L().price_cell),children:[(0,i.jsxs)("div",{className:(0,O.A)(k().price_box,"js-opb"),children:[(0,i.jsx)("div",{className:k().price,children:(0,i.jsx)("b",{children:(0,h.vq)(t,_,r,a)})}),(0,h.S4)(t.minOrderCurrencyAmount,t.availabilityUnit)&&(0,i.jsxs)("div",{className:(0,O.A)(k().min_quantity,k().desktop_hide),children:["мин. ",t.minOrderCurrencyAmount," ",B.lH[t.availabilityUnit]]})]}),(0,i.jsxs)("div",{className:k().offer_status,children:[t.instantDelivery&&(0,i.jsx)(x(),{src:w.A,width:12,height:12,alt:"",title:"Доступна моментальная доставка"}),t.autoDelivery&&(0,i.jsx)(x(),{src:y.A,width:12,height:12,alt:"",title:"Автоматизированная доставка"})]})]})]})})}var D=a(50635),F=a.n(D);function R(e){return t=>Math.max(0,(null!=t?t:0)+e)}function W(e){let{initialOffers:t,popularPaymentSystem:a}=e,{setCurrentUser:f}=(0,g.Jd)(),[m,p]=(0,A.useState)(t),[w,y]=(0,A.useState)(""),[j,N]=(0,A.useState)(""),C=(0,A.useRef)(null);(0,A.useEffect)(()=>{let e=setTimeout(()=>N(w.trim().toLowerCase()),50);return()=>clearTimeout(e)},[w]);let k=(0,A.useMemo)(()=>m.map(e=>{var t,a,i,l,_,r;return{favorite:e,searchIndex:[(0,h.Nt)(e,e.category),e.game.name,e.category.name,null==(t=e.subCategory)?void 0:t.name,null==(i=e.descriptions)||null==(a=i.rus)?void 0:a.briefDescription,...null!=(l=e.game.tags)?l:[],...null!=(_=e.category.tags)?_:[],...(null!=(r=e.attributes)?r:[]).map(e=>{var t,a;return"".concat(null!=(t=e.fieldLabel)?t:""," ").concat(null!=(a=e.valueLabel)?a:"")}
1)].filter(Boolean).join(" ").toLowerCase()}}),[m]),B=(0,A.useMemo)(()=>j?k.filter(e=>e.searchIndex.includes(j)).map(e=>e.favorite):m,[k,m,j]);async function E(e){let t=m.findIndex(t=>t.publicId===e);if(-1===t)return;let a=m[t];p(t=>t.filter(t=>t.publicId!==e)),f(e=>e?{...e,favoriteOffersCount:R(-1)(e.favoriteOffersCount)}:e);try{await s.m.delete(e)}catch(e){p(e=>{let i=[...e];return i.splice(t,0,a),i}),f(e=>e?{...e,favoriteOffersCount:R(1)(e.favoriteOffersCount)}:e),(0,b.T)(e)}}let O=0===m.length,S=!O&&0===B.length;return(0,i.jsxs)("div",{className:u().content_wide,children:[(0,i.jsxs)(v(),{children:[(0,i.jsx)("title",{children:"Избранное"}),(0,i.jsx)("meta",{name:"robots",content:"noindex, nofollow"})]}),(0,i.jsx)(d.A,{marginBottom:16,children:"Избранное"}),O?(0,i.jsxs)("div",{className:F().empty,children:[(0,i.jsx)(x(),{className:F().empty_sticker,src:r,alt:"",width:160,height:160,draggable:!1}),(0,i.jsx)("div",{className:F().empty_title,children:"В избранном пока пусто"}),(0,i.jsxs)("div",{className:F().empty_text,children:["Добавляйте товары с помощью кнопки"," ",(0,i.jsx)("span",{className:F().empty_heart,children:(0,i.jsx)(_.A,{})}),", чтобы не потерять и купить их позже"]})]}):(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("div",{className:F().filters,children:(0,i.jsx)(n.A,{name:"favorites_search",className:F().search_field,icon:(0,i.jsx)(l.A,{}),size:"filter",placeholder:"Поиск среди избранных товаров",autoComplete:"off",value:w,onInput:e=>y(e)})}),(0,i.jsx)(c.w,{marginBottom:"16px"}),S?(0,i.jsx)("div",{className:F().no_results,children:"Ничего не найдено. Попробуйте изменить запрос поиска."}):(0,i.jsx)(T,{offers:B,popularPaymentSystem:a,onRemove:E,scrollTopAnchorRef:C})]}),!O&&(0,i.jsx)(o.A,{anchorRef:C})]})}var H=!0;function J(e){let{initialOffers:t,popularPaymentSystem:a}=e;return(0,i.jsx)(W,{initialOffers:t,popularPaymentSystem:null!=a?a:void 0})}},71784:(e,t,a)=>{"use strict";a.d(t,{A:()=>o});var i=a(37876),l=a(11185),_=a(69241),r=a(14232),s=a(46667),n=a.n(s);function o(e){let{active:t,onClick:a,loading:s=!1,variant:o="offer",className:c}=e,d=(0,r.useRef)(null),[f,u]=(0,r.useState)(!1);(0,r.useEffect)(()=>{var e;!s&&f&&((null==(e=d.current)?void 0:e.matches(":hover"))||u(!1))},[s,f]);let b=s?t?"Добавляем в избранное":"Убираем из избранного":t?"Убрать из избранного":"Добавить в избранное";return(0,i.jsx)("button",{ref:d,type:"button",disabled:s,"aria-label":b,"aria-pressed":t,"aria-busy":s,title:b,className:(0,_.A)(n().button,n()[o],{[n().active]:t,[n().loading]:s,[n().hover_disabled]:f},c),onClick:e=>{e.stopPropagation(),u(!0),a()},onPointerLeave:()=>u(!1),children:(0,i.jsx)(l.A,{})})}},84169:e=>{e.exports={table:"favorites_table__6yTj_",head_description:"favorites_head_description__f0Ggk",head_user:"favorites_head_user__UFUki",head_availability:"favorites_head_availability__By5xz",head_price:"favorites_head_price__qDw3l",row:"favorites_row__K_cEO",row_link:"favorites_row_link__8PN6i",title_username_combined:"favorites_title_username_combined__3xkhn",cell_link:"favorites_cell_link__dFTwD",description:"favorites_description__ktz_n",title:"favorites_title__scmS5",subtitle:"favorites_subtitle__cjaUP",user_wrapper:"favorites_user_wrapper__riz6r",user:"favorites_user__26kzY",availability:"favorites_availability__H9HEg",availability_zero:"favorites_availability_zero__HwJs1",price_cell:"favorites_price_cell__4Br8E",favorite:"favorites_favorite__xEqSL",item:"favorites_item__P0ArL",inactive:"favorites_inactive__nYwCf"}},89728:e=>{e.exports={price_head_cell:"offers-table_price_head_cell__yFpmB",availability_head_cell:"offers-table_availability_head_cell__Sxban",user_head_cell:"offers-table_user_head_cell__XUts1",column_filters_box:"offers-table_column_filters_box__aFKhe",filter_cell:"offers-table_filter_cell__Hj6M1",desktop_hide:"offers-table_desktop_hide__g4cdd",price_cell:"offers-table_price_cell__rkthI",availability_cell:"offers-table_availability_cell__YlEK8",min_quantity:"offers-table_min_quantity__iPGxb",price:"offers-table_price__u4ShL",old_price:"offers-table_old_price__eZuq5",multiple_filters:"offers-table_multiple_filters__BEfCN",title:"offers-table_title__nSz6f",head_cell__title:"offers-table_head_cell__title__AzbCM",show_user:"offers-table_show_user__v0SLp",offer_status:"offers-table_offer_status__sJaFP",user_wrapper:"offers-table_user_wrapper__7TAW6",user:"offers-table_user__bwYeK",user_short_col:"offers-table_user_short_col__yT2q6",t
1itle_username_combined:"offers-table_title_username_combined__n462t",official_title_box:"offers-table_official_title_box__IV3v3",official_note:"offers-table_official_note__V8ZWD",official_note_wide:"offers-table_official_note_wide__4Y6na",official_item:"offers-table_official_item__H_Vdd",official_section:"offers-table_official_section__rIcuC",price_box:"offers-table_price_box__5eArm",mobile_hide:"offers-table_mobile_hide__PPKIW",hidden_xs:"offers-table_hidden_xs__22eun"}},98935:(e,t,a)=>{"use strict";a.d(t,{A:()=>i});let i={src:"/_next/static/media/robot.a4f91a4f.svg",height:12,width:12,blurWidth:0,blurHeight:0}}},e=>{e.O(0,[636,6593,8792],()=>e(e.s=61217)),_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.