PageSourceSearch

https://selfpub.ru/_next/static/chunks/pages/books/[bookId]/comments/new-d03826bb2339e5d5.js

js selfpub.ru collected 2026-10-03 23:28:44 UTC 9,768 bytes, 2 lines download raw bytes

1try{let e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="8eff56a3-4249-4dee-9dea-e0b8b7cad212",e._sentryDebugIdIdentifier="sentry-dbid-8eff56a3-4249-4dee-9dea-e0b8b7cad212")}catch(e){}try{let e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="8eff56a3-4249-4dee-9dea-e0b8b7cad212",e._sentryDebugIdIdentifier="sentry-dbid-8eff56a3-4249-4dee-9dea-e0b8b7cad212")}catch(e){}(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[149],{61568:function(e,t,i){"use strict";i.d(t,{Fh:function(){return N},iB:function(){return p},vv:function(){return k}});var o,n=i(59499),r=i(94184),a=i.n(r),l=i(11752),d=i.n(l),s=i(25675),u=i.n(s),c=i(67294),h=i(42467),_=i(89637),m=i(60312),g={small:{width:42,he
1ight:60},medium:{width:85,height:120},large:{width:113,height:160},extraLarge:{width:190,height:270},smallAudio:{width:42,height:42},betweenSmallAndMediumAudio:{width:60,height:60},mediumAudio:{width:85,height:85},largeAudio:{width:113,height:113},extraLargeAudio:{width:190,height:190},extraSmall:{width:24,height:36}},v=i(37371),f=i.n(v),b=i(85893),p=((o={}).small="small",o.medium="medium",o.large="large",o.extraLarge="extraLarge",o.smallAudio="smallAudio",o.betweenSmallAndMediumAudio="betweenSmallAndMediumAudio",o.mediumAudio="mediumAudio",o.largeAudio="largeAudio",o.extraLargeAudio="extraLargeAudio",o.extraSmall="extraSmall",o),w=function(e){if(!e)return null;var t=e.trim();return t?/^https?:\/\//i.test(t)?t.replace(/\/$/,""):"https://".concat(t.replace(/^\/+/,"")):null},x=function(){var e=(d()()||{}).publicRuntimeConfig;return w(null==e?void 0:e.host)||(window.location.origin?window.location.origin:"https://selfpub.dev")},k=function(e){if(!e)return e;if(/^(https?:)?\/\//i.test(e)||e.startsWith("blob:")||e.startsWith("data:"))return e.startsWith("//")?"https:".concat(e):e;var t=x();try{return new URL(e,t).toString()}catch(t){return e}},N=function(e){var t=e.pictureFile,i=void 0===t?null:t,o=e.pathToPicture,r=e.bookName,l=e.className,d=e.classNameImg,s=e.size,v=void 0===s?"medium":s,p=e.ageRating,w=e.censored,x=e.onClick,N=e.pathToFullSize,I=e.isLink,C=void 0===I||I,T=e.isLoading,y=e.forceShowIllustration,S=void 0!==y&&y,j=e.dataTestId,B=r.slice(0,1).toLocaleUpperCase(),A=g[v].width/3.6,L=g[v].height/11.25,W=g[v].width/7.5,D=(0,c.useMemo)(function(){return!!w&&!!S||!!(w&&!o)},[w,o,S]),F=(0,c.useMemo)(function(){return(!!p||!!w)&&!!S||!!((p||w)&&!o)},[w,o,S,p]);return(0,b.jsxs)("div",{className:a()("shadowLevel0",f().coverBlock,l,f()[v]),onClick:x,"data-testid":j,children:[void 0!==T&&T&&(0,b.jsx)("div",{className:f().loaderContainer,children:(0,b.jsx)(m.D,{})}),(0,b.jsxs)("div",{className:a()(f().illustrationWrapper,(0,n.Z)({},f().censored,p&&!w)),children:[D&&(0,b.jsx)(h.Q,{className:f().illustrationIcon,imageType:"censored",width:A,height:L}),F&&(0,b.jsx)(h.Q,{className:f().illustrationIcon,imageType:"ageRating",width:W,height:W})]}),function(){if(i){var e=URL.createObjectURL(i);return(0,b.jsx)(u(),{src:e,alt:r,width:g[v].width,height:g[v].height})}return o?(0,b.jsx)("a",{href:N||o,target:"_blank",rel:"noreferrer",className:a()(f().cover,f().coverImg,d,(0,n.Z)({},f().notLink,!C)),children:(0,b.jsx)(u(),{src:k(o),alt:r,width:g[v].width,height:g[v].height})}):(0,b.jsx)("div",{className:a()(f().cover,d,(0,n.Z)({},f()[v],v)),children:(0,b.jsx)(_.H1,{className:f().firstLetter,children:B})})}()]})}},33960:function(e,t,i){"use strict";i.d(t,{o:function(){return _}});var o=i(59499),n=i(94184),r=i.n(n),a=i(35407),l=i(42467),d=i(89637),s=i(61568),u=i(81029),c=i.n(u),h=i(85893),_=function(e){var t,i=e.className,n=e.illustrationName,u=e.illustrationHeight,_=e.illustrationWidth,m=e.illustrationFormat,g=e.isBookCover,v=e.bookCoverSize,f=void 0===v?s.iB.small:v,b=e.bookCoverPathToPicture,p=e.headTitle,w=e.title,x=e.subTitle,k=e.buttonText,N=e.buttonHandler,I=e.buttonHref,C=e.dataTestId;return(0,h.jsxs)("div",{className:r()(c().container,i),"data-testid":C,children:[n&&(0,h.jsx)(l.Q,{imageType:n,height:u,width:_,format:m}),g&&(0,h.jsx)(s.Fh,{bookName:null!=p?p:"",size:f,pathToPicture:b}),p&&(0,h.jsx)(d.H2,{className:r()(c().headTitle,(t={},(0,o.Z)(t,c().headTitleWithButton,k),(0,o.Z)(t,c().headTitleWithBookCover,g),t)),children:(0,h.jsx)(d.T,{children:p})}),(0,h.jsx)(d.K0,{className:r()(c().title,(0,o.Z)({},c().titleWithButton,k)),dataTestId:"no-content-stub-text",children:w}),x&&(0,h.jsx)(d.K0,{className:c().subTitle,children:(0,h.jsx)(d.T,{children:x})}),k&&(0,h.jsx)(a.z,{onClick:N,href:I,size:"large",dataTestId:"no-content-stub-button",children:(0,h.jsx)(d.T,{children:k})})]})}},13571:function(e,t,i){"use strict";i.r(t),i.d(t,{__N_SSP:function(){return A},default:function(){return L}});var o=i(50029),n=i(64687),r=i.n(n),a=i(60371),l=i(71893),d=i(97077),s=i(31122),u=i(70298),c=i(11163),h=i(67294),_=i(14416),m=i(89637),g=i(63690),v=i(33960),f=i(67386),b=i(91157),p=i(94021),w=i(98138),x=i(36613),k=i(66562),N=i(14098),I=i(89801),C=i(42221),T=i(52065),y=i(6180),S=i.n(y),j=i(85893),B=function(){var e,t,i,n,y,B=(0,_.v9)(b.gU),A=(0,_.v9)(f.MY),L=(0,_.v9)(x.d),W=(0,_.v9)(w.hU),D=(0,_.v9)(w.ND),F=(0,_.v9)(p.FJ),E=(0,_.v9)(w.e$),P=(0,c.useRouter)(),R=(0,_.I0)(),M=P.query,O=M.bookId,U=M.audioId,Z=M.chapterId,z=M.reviewId,H=M.commentId,K=L.litres_account,q=U?A.book_name:B.title,X=null!=U?U:O,G=U?"audio":"text",Q=(U?A:B).litres_art_id,Y=B.rating,J=L.id,$=null===(i=F.find(function(e){return e.id===Number(Z)}))||void 0===i?void 0:i.title,V=Z?{label:String($),value:String(Z)}:d.dl[1],ee=(0,h.useState)(!1),et=ee[0],ei=ee[1],eo=(0,h.useState)(!1),en=eo[0],er=eo[1],ea=function(){ei(!1),er(!1)}
1,el=U?"/books/".concat(String(O),"/comments/?audioId=").concat(String(U)):"/books/".concat(String(O),"/comments/"),ed=(e=(0,o.Z)(r().mark(function e(){var t;return r().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return ei(!0),t="getOauthLitresScope",e.next=4,(0,C.B)({apiPointName:t});case 4:case"end":return e.stop()}},e)})),function(){return e.apply(this,arguments)}),es=(t=(0,o.Z)(r().mark(function e(t,i,o){var n;return r().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,R((0,I.o)({review_litres_id:t,reply_text:i,employee_id:o,artId:Number(X),userId:null!=J?J:0,userUuid:null!==(n=L.uuid)&&void 0!==n?n:""}));case 2:if(!Z){e.next=7;break}return e.next=5,R((0,k.u)({chapterId:String(Z),limit:d.y1,reviewId:Number(z)||void 0,replyId:Number(H)||void 0}));case 5:e.next=9;break;case 7:return e.next=9,R((0,N.h)({litresArtId:String(Q),limit:d.y1,reviewId:Number(z)||void 0,replyId:Number(H)||void 0}));case 9:case"end":return e.stop()}},e)})),function(e,i,o){return t.apply(this,arguments)});return(0,h.useEffect)(function(){localStorage.getItem("oauthSuccess")&&(ei(!1),er(!0),localStorage.removeItem("oauthSuccess"))},[]),(0,j.jsxs)(g.T,{breadCrumbs:{name:"Вернуться к отзывам",link:el},isMediumWidth:!0,children:[(0,j.jsxs)("div",{className:S().wrapper,children:[(0,j.jsx)(m.H1,{className:S().title,children:"Отзыв на ".concat(U?"аудиокнигу":"книгу"," \xab").concat((0,T.I)(q||""),"\xbb")}),(0,j.jsx)(a.w,{rating:null!==(n=null==Y?void 0:Y.rated_avg)&&void 0!==n?n:0,totalRating:null!==(y=null==Y?void 0:Y.rated_total_count)&&void 0!==y?y:0}),(0,j.jsx)("div",{className:S().content,children:W.length||E.length?(0,j.jsx)(l.j,{reviews:Z?E:W,litresAccount:Number(K),oauthLitres:ed,onReply:es,employees:D,isAudio:!!U,litresArtId:Number(Q),paginationCounter:1,artType:G,artId:String(X),canDeleteReviews:L.can_delete_reviews,chapters:F,filterType:V,isNew:!0}):(0,j.jsx)(v.o,{illustrationWidth:224,illustrationHeight:151,headTitle:"Нет отзывов",title:(0,T.I)("У вашей книги пока нет отзывов и комментариев"),illustrationName:"notFoundStub"})})]}),(0,j.jsx)(s.Y,{isOpenModal:et,onClose:ea}),(0,j.jsx)(u.v,{isOpenModal:en,link:el,onClose:ea})]})},A=!0,L=function(){return(0,j.jsx)(B,{})}},86107:function(e,t,i){(window.__NEXT_P=window.__NEXT_P||[]).push(["/books/[bookId]/comments/new",function(){return i(13571)}])},37371:function(e){e.exports={coverBlock:"BookCover_coverBlock__uzymg",cover:"BookCover_cover__Lo3iT",coverImg:"BookCover_coverImg__1XJDF",illustrationIcon:"BookCover_illustrationIcon__ZvfhP",illustrationWrapper:"BookCover_illustrationWrapper__tN0Dv",censored:"BookCover_censored__SFHOV",firstLetter:"BookCover_firstLetter__XSqbs",small:"BookCover_small__hRdGW",medium:"BookCover_medium__LT9rU",large:"BookCover_large__O4sUM",extraLarge:"BookCover_extraLarge__7qogP",mediumAudio:"BookCover_mediumAudio__Em4_F",largeAudio:"BookCover_largeAudio__LhzZ8",extraLargeAudio:"BookCover_extraLargeAudio__11dtW",notLink:"BookCover_notLink__9wLEC",loaderContainer:"BookCover_loaderContainer__p1YUn"}},81029:function(e){e.exports={container:"NoContentStub_container__697do",headTitle:"NoContentStub_headTitle___d_BK",headTitleWithButton:"NoContentStub_headTitleWithButton__5FoAq",headTitleWithBookCover:"NoContentStub_headTitleWithBookCover__KPIv8",title:"NoContentStub_title__Gwdpe",titleWithButton:"NoContentStub_titleWithButton__o_sil",subTitle:"NoContentStub_subTitle__jl7On"}},6180:function(e){e.exports={wrapper:"NewComment_wrapper__9l82N",title:"NewComment_title__K1FIG"}}},function(e){e.O(0,[149],function(){e.E(2052)},5),e.O(0,[5675,9593,2238,540,9081,2519,8410,1362,8067,8764,4608,4423,3189,2675,7853,5579,5115,878,2329,2888,9774,179],function(){return e(e.s=86107)}),_N_E=e.O()}]);
2//# sourceMappingURL=new-d03826bb2339e5d5.js.map

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.