1"use strict";(self.rspackChunkryfma=self.rspackChunkryfma||[]).push([[18191],{61146(e,t,r){r.r(t),r.d(t,{default:()=>y});var o=r(74848),a=r(70111),i=r(82804),s=r(95420),n=r(54953),l=r(21540),c=r(90537),m=r(38036),d=r(7358),g=r(86952),u=r(85137),f=r(59302),$=r(48515),h=r(38784);let k=(0,h.J1)` 2 mutation deleteBook($_id: ID!) { 3 deleteBook(_id: $_id) 4 } 5`,p=(0,h.J1)` 6 mutation updateBook( 7 $_id: ID! 8 $coverImg: String 9 $coverColor: String 10 $title: String! 11 $slug: String 12 $workType: String 13 $teaser: String 14 $genres: [String]! 15 $series: [String] 16 $language: String! 17 $year: String! 18 $publisher: String 19 $EPUBISBN: String 20 $MOBIISBN: String 21 $PDFISBN: String 22 $PrintISBN: String 23 $originalTitle: String 24 $originalAuthorName: String 25 $translatorName: String 26 $graphicDepictionOfViolence: Boolean 27 $majorCharacterDeath: Boolean 28 $genders: String 29 $fandoms: [String] 30 $nameOfCharacters: [String] 31 $relationships: [String] 32 $isPreview: Boolean 33 $isAdultContent: Boolean 34 $paymentType: Int 35 $status: Int 36 ) { 37 updateBook( 38 _id: $_id 39 coverImg: $coverImg 40 coverColor: $coverColor 41 title: $title 42 slug: $slug 43 workType: $workType 44 teaser: $teaser 45 genres: $genres 46 series: $series 47 language: $language 48 year: $year 49 publisher: $publisher 50 EPUBISBN: $EPUBISBN 51 MOBIISBN: $MOBIISBN 52 PDFISBN: $PDFISBN 53 PrintISBN: $PrintISBN 54 originalTitle: $originalTitle 55 originalAuthorName: $originalAuthorName 56 translatorName: $translatorName 57 graphicDepictionOfViolence: $graphicDepictionOfViolence 58 majorCharacterDeath: $majorCharacterDeath 59 genders: $genders 60 fandoms: $fandoms 61 nameOfCharacters: $nameOfCharacters 62 relationships: $relationships 63 isPreview: $isPreview 64 isAdultContent: $isAdultContent 65 paymentType: $paymentType 66 status: $status 67 ) 68 } 69`,B=(0,h.J1)` 70 query getBookData($bookId: ID!) { 71 book(bookId: $bookId) { 72 _id 73 coverImg 74 coverColor 75 title 76 slug 77 workType 78 teaser 79 genres 80 series 81 language 82 year 83 status 84 publisher 85 EPUBISBN 86 MOBIISBN 87 PDFISBN 88 PrintISBN 89 originalTitle 90 originalAuthorName 91 translatorName 92 audioFiles 93 graphicDepictionOfViolence 94 majorCharacterDeath 95 genders 96 fandoms 97 nameOfCharacters 98 relationships 99 coins 100 isPreview 101 isAdultContent 102 paymentType 103 isBought 104 giftsCount 105 likersCount 106 isLiked 107 } 108 } 109`,I=(0,n.lazy)(()=>r.e(76033).then(r.bind(r,55137))),y=function(){let[e]=(0,l.Bd)(["notif","book"]),t=(0,c.Zp)(),r=(0,a.m)(),{bookId:h}=(0,c.g)(),{currUser:y,currUserId:N}=(0,u.As)(),{staticContext:S}=(0,u.t0)(),{loading:b,error:C,data:v}=(0,i.I)(B,{variables:{bookId:h,noCache:!0},fetchPolicy:"network-only"}),[A]=(0,s.n)(p),[x]=(0,s.n)(k),w=async(r,o)=>{try{await x({variables:{_id:r,albumId:o},update:e=>{e.evict({fieldName:"book"}),e.evict({fieldName:"books"}),e.evict({fieldName:"mybooks"}),e.gc()}}),d.Notification.success(e("notif:bookDeleted")),f.A.setItem("ryfmaBookCoverSrc",""),f.A.setItem("ryfmaBookTitle",""),f.A.setItem("ryfmaBookTeaser",""),f.A.setItem("ryfmaBookChapters",""),f.A.setItem("ryfmaBookAudio",""),f.A.setItem("ryfmaContentBookMetaContext",""),window.ReactGA&&window.ReactGA.event({category:"Book",action:"BookDeleted",label:`BookDeleted: ${y?._id??""}, bId: ${r}`,value:1}),t(`/u/${y?.username??""}/books`)}catch(e){d.Notification.error(e)}},T=async o=>{let a={_id:h,...o};try{await A({variables:a}),d.Notification.success(e("notif:bookUpdated"));try{r.cache.evict({fieldName:"book"}),r.cache.evict({fieldName:"books"}),r.cache.evict({fieldName:"mybooks"}),r.cache.gc()}catch{}f.A.setItem("ryfmaBookCoverSrc",""),f.A.setItem("ryfmaBookTitle",""),f.A.setItem("ryfmaBookTeaser",""),f.A.setItem("ryfmaBookChapters",""),f.A.setItem("ryfmaBookAudio",""),f.A.setItem("ryfmaContentBookMetaContext",""),t(`/b/${h}/edit`)}catch(e){d.Notification.error(e)}};if(b)return(0,o.jsxs)("div",{className:"container mx-auto mt-4 max-w-5xl px-4 pb-12",children:[(0,o.jsx)(g.E,{className:"mb-4 h-8 w-56 rounded-full"}),(0,o.jsxs)("div",{className:"flex flex-col gap-6 md:flex-row",children:[(0,o.jsx)(g.E,{className:"aspect-[194/250] w-full max-w-[250px] rounded-2xl"}),(0,o.jsxs)("div",{className:"flex-1 space-y-3",children:[(0,o.jsx)(g.E,{className:"h-10 w-full rounded-full"}),(0,o.jsx)(g.E,{className:"h-24 w-full rounded-lg"}
109),(0,o.jsx)(g.E,{className:"h-10 w-1/2 rounded-full"})]})]})]});if(C||!v?.book)return(0,o.jsx)(n.Suspense,{fallback:(0,o.jsx)("div",{}),children:(0,o.jsx)(I,{schema:"ItemList",title:e("book:bookNotFoundTitle"),description:e("book:bookNotFoundDesc"),path:`/b/${h}/edit`,contentType:"article",backLinkText:e("book:bookNotFoundLink")})});if(!N){let e=`/login?referer=/b/${h}/edit`;return S?(S.status=301,S.redirectTo=e,null):(0,o.jsx)(m.C5,{to:e})}let j=v.book,D=f.A.getItem("ryfmaContentBookMetaContext")||"",P=j.genres||[],O={metaContext:D,coverImg:"",coverColor:"#f7f7f7",title:"",slug:"",workType:"",teaser:"",genres:[],series:[],language:"",year:"",status:1,numPages:0,weight:0,publisher:"",EPUBISBN:"",MOBIISBN:"",PDFISBN:"",PrintISBN:"",originalTitle:"",originalAuthorName:"",translatorName:"",audioFiles:[],graphicDepictionOfViolence:!1,majorCharacterDeath:!1,genders:"",fandoms:[],nameOfCharacters:[],relationships:[],isPreview:!1,isAdultContent:!1,paymentType:0,errTitle:!1,errTeaser:!1,errGenres:!1,errLanguages:!1,errYear:!1,...j,genres:P};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)("title",{children:["string"==typeof j.title&&j.title?`${j.title} â `:"","РедакÑиÑование книги | Ryfma"]}),(0,o.jsx)($.A,{initData:O,deleteBook:w,updateBook:T,isEditMode:!0})]})}},86952(e,t,r){var o=r(74848),a=r(26073);function i({className:e,...t}){return(0,o.jsx)("div",{"data-slot":"skeleton",className:(0,a.cn)("bg-accent animate-pulse rounded-md",e),...t})}r.d(t,{E:()=>i})},38445(e){e.exports={lZ:"YwKUAz",QI:"_6ejKQA",pf:"H5gAyO",ZI:"_2MhWIw",kz:"kqwemF",Zy:"jU5-ao",tV:"ijTAHA",zP:"_71Qsrc",yl:"Xrg8xu"}}}]);
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.