1try{let e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},r=(new e.Error).stack;r&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[r]="6880d5e5-197c-4552-ac74-bccc3eb19d2c",e._sentryDebugIdIdentifier="sentry-dbid-6880d5e5-197c-4552-ac74-bccc3eb19d2c")}catch(e){}try{let e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},r=(new e.Error).stack;r&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[r]="6880d5e5-197c-4552-ac74-bccc3eb19d2c",e._sentryDebugIdIdentifier="sentry-dbid-6880d5e5-197c-4552-ac74-bccc3eb19d2c")}catch(e){}(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6792],{44848:function(e,r,n){"use strict";n.d(r,{B:function(){return w}});var o=n(59499),t=n(94184),i=n.n(t),a=n(74707),s=n(20165),c=n(67294),l=n(14416),u=n(50184),d=n(38739),p=n(87025),f=n(66890),h=n(89637),m=n(95126),g=function(e){var r,n,o,t=(null===(r=e[0])||void 0===r?void 0:r.options)||[],i=null===(n=t[0])||void 0===n?void 0:n.label.split(" ")[0].replace(".00",""),a=null===(o=t[t.length-1])||void 0===o?void 0:o.label.split(" ")[0].replace(".00","");return 1===t.length?"".concat(a):"".concat(a," â ").concat(i)},b=n(91157),v=n(9e4),_=n(41987),x=n(72910),y=n.n(x),P=n(85893),k=function(e){var r,n=e.isDisabled,t=e.onPriceChange,a=e.className,c=e.hasDiscounts,x=e.minDiscountPrice,k=e.bookId,j=e.audioId,D=e.titleText,A=e.value,O=e.errorMessage,w=e.hasErrors,C=e.description,N=e.recommendedPriceAB,L=(0,l.v9)(_.K),R=(0,l.v9)(v.e1),S=(0,l.v9)(b.gU).genres,T="/books/".concat(String(k),"/discounts").concat(j?"/?audioId="+String(j):""),B=(0,P.jsxs)(P.Fragment,{children:["ÐелÑÐ·Ñ Ð½Ð°Ð·Ð½Ð°ÑиÑÑ ÑÐµÐ½Ñ Ð½Ð¸Ð¶Ðµ"," ",(r=Number(x))>100?"".concat(r,".00"):4===String(r).length?"".concat(r,"0"):String(r)," â½, поÑÐ¾Ð¼Ñ ÑÑо Ñ Ð²Ð°Ñ ÑÑÑановлена или запланиÑована Ñкидка."," ",!!k&&(0,P.jsx)(u.a,{href:T,dataTestId:"bookPriceRange__alertLink",children:"ÐодÑобнее"})]}),E=(0,m.D)({data:L,bookPrices:R,genres:S});return(0,P.jsx)(f.A,{children:(0,P.jsxs)("div",{className:i()("shadowLevel0",y().container,a,(0,o.Z)({},s.As,w)),"data-testid":"book-price-section",id:"price",children:[(0,P.jsx)(h.H3,{className:y().title,children:D||"Цена за книгÑ"}),!!C&&(0,P.jsx)(h.OE,{className:y().text,children:C}),(0,P.jsx)(p.c,{value:A,options:E,isDisabled:n,onChange:function(e){t&&t(e)},noOptionsMessage:function(){return"ÐиÑего не найдено"},errorMessage:O,hasError:w,dataTestId:"book-price-range-select",placeholder:"ÐÑбеÑиÑе ÑенÑ"}),c&&(0,P.jsx)(d.b,{className:y().bookPriceAlert,type:d.o.info,isWrapper:!0,textInformation:B}),!!N&&(null==A?void 0:A.value)!==N.value&&!n&&(0,P.jsx)(d.b,{className:y().bookPriceAlert,type:d.o.info,isWrapper:!0,textInformation:"ÐÑ Ð¿ÑоанализиÑовали книги в ваÑем жанÑе и подобÑали ÑекомендованнÑÑ ÑенÑ: ".concat(N.label),buttonText:"ÐÑбÑаÑÑ",onButtonClick:function(){t&&N&&t(N)}}),(0,P.jsxs)("div",{className:y().recommendedPriceInfo,children:[(0,P.jsxs)(h.OE,{className:y().recommendedPriceLabel,children:["Ð ÐµÐºÐ¾Ð¼ÐµÐ½Ð´Ð¾Ð²Ð°Ð½Ð½Ð°Ñ Ñена: ",g(E)," â½"]}),(0,P.jsx)(h.OE,{children:"Ðниги в ваÑем жанÑе ÑаÑе покÑпаÑÑ Ð¿Ð¾ ÑÑой Ñене. УÑÑановиÑе еÑ, ÑÑÐ¾Ð±Ñ Ð¿ÑивлеÑÑ Ð±Ð¾Ð»ÑÑе ÑиÑаÑелей"})]})]})})},j=n(41594),D=n(54096),A=n(41981),O=n.n(A),w=function(e){var r,n=e.isDisabled,t=e.onPriceChange,m=e.onSelectClick,g=e.className,v=e.priceList,x=e.hasDiscounts,y=e.minDiscountPrice,A=e.bookId,w=e.audioId,C=e.titleText,N=e.value,L=e.errorMessage,R=e.hasErrors,S=e.description,T=e.recommendedPriceAB,B=e.isUnderModerationOrPublished,E=(0,l.v9)(_.K),I=(0,l.v9)(b.gU),F=I.genres,M=I.is_draft_book,U=(0,l.I0)();(0,c.useEffect)(function(){M||(U((0,D.T)()),U((0,j.Ag)({isMasterSaving:!1,isMasterSaved:!1})))},[U]);var W="/books/".concat(String(A),"/discounts").concat(w?"/?audioId="+String(w):""),V=(0,P.jsxs)(P.Fragment,{children:["ÐелÑÐ·Ñ Ð½Ð°Ð·Ð½Ð°ÑиÑÑ ÑÐµÐ½Ñ Ð½Ð¸Ð¶Ðµ"," ",(r=Number(y))>100?"".concat(r,".00"):4===String(r).length?"".concat(r,"0"):String(r)," â½, поÑÐ¾Ð¼Ñ ÑÑо Ñ Ð²Ð°Ñ ÑÑÑановлена или запланиÑована Ñкидка."," ",!!A&&(0,P.jsx)(u.a,{href:W,dataTestId:"bookPrice__alertLink",children:"ÐодÑобнее"})]});return E.filter(function(e){return null==F?void 0:F.some(function(r){return r.value===e.genre})}).length>0?(0,P.jsx)(k,{isDisabled:n,onPriceChange:t,className:g,hasDiscounts:x,minDiscountPrice:y,bookId:A,audio
1Id:w,titleText:C,value:N,errorMessage:L,hasErrors:R,description:S,recommendedPriceAB:T}):(0,P.jsx)(f.A,{children:(0,P.jsxs)("div",{className:i()("shadowLevel0",O().container,g,(0,o.Z)({},s.As,R)),"data-testid":"book-price-section",id:"price",children:[(0,P.jsx)(h.H3,{className:O().title,children:C||"Цена за книгÑ"}),!!S&&(0,P.jsx)(h.OE,{className:O().text,children:S}),(0,P.jsx)(p.c,{value:B&&!N?a.gY:N,options:v,isDisabled:n,onChange:function(e){t&&t(e)},onClick:m,noOptionsMessage:function(){return"ÐиÑего не найдено"},errorMessage:L,hasError:R,dataTestId:"book-price-select",placeholder:"ÐÑбеÑиÑе ÑенÑ"}),x&&(0,P.jsx)(d.b,{className:O().bookPriceAlert,type:d.o.info,isWrapper:!0,textInformation:V}),!!T&&!M&&(null==N?void 0:N.value)!==T.value&&!n&&(0,P.jsx)(d.b,{className:O().bookPriceAlert,type:d.o.info,isWrapper:!0,textInformation:"ÐÑ Ð¿ÑоанализиÑовали книги в ваÑем жанÑе и подобÑали ÑекомендованнÑÑ ÑенÑ: ".concat(T.label),buttonText:"ÐÑбÑаÑÑ",onButtonClick:function(){t&&T&&t(T)}})]})})}},95126:function(e,r,n){"use strict";n.d(r,{D:function(){return u}});var o=n(90116),t=n(59499);function i(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),n.push.apply(n,o)}return n}var a=" â½",s=function(e){var r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return function(e){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?i(Object(n),!0).forEach(function(r){(0,t.Z)(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}({value:String(e.id),label:"".concat(e.value).concat(a)},r&&{isRecommended:!0})},c=function(e,r){var n=!(arguments.length>2)||void 0===arguments[2]||arguments[2],o=Number(e.label.split(a)[0]),t=Number(r.label.split(a)[0]);return n?o-t:t-o},l=function(e){var r=(0,o.Z)(e);return r.length>0?(r.unshift({value:"0",label:"ÐеÑплаÑно"}),r):e},u=function(e){var r=e.data,n=void 0===r?[]:r,o=e.bookPrices,t=void 0===o?[]:o,i=e.genres,a=void 0===i?[]:i;if(!n.length||!t.length||!a.length)return[];var u=a.length?n.filter(function(e){return a.some(function(r){return r.value===e.genre})}):n;if(!u.length)return[{label:"ÐÑе ÑенÑ",value:"all",options:l(t.map(function(e){return s(e)}).sort(function(e,r){return c(e,r,!0)}))}];var d=u.map(function(e){return e.main_price}),p=t.filter(function(e){return d.includes(e.id)});if(0===p.length)return[];var f=p.reduce(function(e,r){return Number(r.value)>Number(e.value)?r:e},p[0]),h=u.find(function(e){return e.main_price===f.id});if(!h)return[];var m=h.price_range,g=t.filter(function(e){return m.includes(e.id)}).map(function(e){return s(e,!0)}).sort(function(e,r){return c(e,r,!1)}),b=l(t.filter(function(e){return!m.includes(e.id)}).map(function(e){return s(e)}).sort(function(e,r){return c(e,r,!0)})),v=[{label:"РекомендÑÐµÐ¼Ð°Ñ Ñена",value:"recommended",isRecommended:!0,options:g}];return b.length>0&&v.push({label:"ÐÑе ÑенÑ",value:"all",options:b}),v}},28970:function(e,r,n){"use strict";n.d(r,{j:function(){return eb}});var o=n(94184),t=n.n(o),i=n(17610),a=n(85893),s=function(e){var r=e.isFree,n=e.isModeratedFree,o=e.isPhonogram,t=e.isReader,s=e.isFreeReader,c=e.isNoAudio,l=[];return r&&l.push({value:i.zT.free,label:"ÐеÑплаÑно озвÑÑиÑÑ ÑинÑезом ÑеÑи",innerContent:(0,a.jsxs)(a.Fragment,{children:["ÐÑдиокниги, озвÑÑеннÑе ÑинÑезом ÑеÑи, пÑиноÑÑÑ +18% к пÑодажам.",(0,a.jsx)("br",{}),"СÑеднÑÑ Ð¾Ñенка Ð¾Ñ ÑлÑÑаÑелей аÑдиокниг 4,5 из 5."]})}),n&&!r&&l.push({value:i.zT.moderatedAudio,label:"СоздаÑÑ Ð°ÑдиовеÑÑÐ¸Ñ Ð·Ð° ÑÑÐµÑ ÐиÑÑеÑ"}),s&&l.push({value:i.zT.reader,label:"ÐеÑплаÑно озвÑÑиÑÑ ÑÑаÑÑником пÑоекÑа ÐиÑÑÐµÑ Ð§ÑеÑ"}),o&&l.push({value:i.zT.phonogram,label:"ÐагÑÑзиÑÑ Ð³Ð¾ÑовÑÑ Ð°ÑдиокнигÑ",innerContent:c?"ÐоÑле оÑпÑавки на пÑбликаÑÐ¸Ñ Ð¾ÑкÑоем ÑÑÑаниÑÑ Ð·Ð°Ð³ÑÑзки аÑдиокниги":""}),t&&!s&&l.push({value:i.zT.commerce,label:"ÐаказаÑÑ Ð¾Ð·Ð²ÑÑÐºÑ Ð¿ÑоÑеÑÑионалÑнÑм ÑÑеÑом",innerContent:c?"ÐоÑле оÑпÑавки на пÑбликаÑÐ¸Ñ Ð¾ÑкÑоем ÑÑÑаниÑÑ Ñ Ð¸Ð½ÑоÑмаÑией об ÑÑлÑге":""}),c&&l.push({value:i.zT.withoutAudiobook,label:"Ðез аÑдиовеÑÑии"}),l},c=n(84594),l=n(3490),u=n(35407),d=n(89637),p=n(37668),f=n.n(p),h=function(e){var r=e.isLocked;return(0,a.jsxs)("div",{className:f().textWrapper,"data-testid":"commercialSegment__wrapper",children:[(0,a.jsx)(d.OE,{className:f().text,children:"ÐÑ Ð¼Ð¾Ð¶ÐµÑе заказаÑÑ Ð°ÑдиовеÑÑÐ¸Ñ Ð²Ð°Ñей книги на коммеÑÑеÑкиÑ
ÑÑловиÑÑ
, вÑбÑав Ð³Ð¾Ð»Ð¾Ñ Ð¿Ð¾Ð½ÑавивÑегоÑÑ Ð²Ð°Ð¼ ÑÑеÑа."}),(0,a.jsx)(u.z,{href:l.x.services.audio.index,target:"_blank",className:f().audioProductionButton,size:"medium",look:"secondary",disabled:r,dataTestId:"commercialSegment__button--learnMore",children:"УзнаÑÑ Ð¿Ð¾Ð´Ñобнее"})]})},m=n(64729),g=n(91634),b=n(73842),v=n(99533),_=n(37083),x=n(20165),y=n(11163),P=n(14416),k=n(38739),j=n(54507),D=n(6686),A=n(36613),O=n(8635),w=n(37473),C=function(e){var r,n=e.handleChangeDisablePublicationButton,o=e.isLocked,s=e.className,c=e.handleChangeLicense,l=e.licenseType,u=e.genderVoice,p=e.onChangeGenderVoice,h=e.onChangeGlossary,C=e.glossary,N=e.hasPublishTries,L=e.audioType,R=(0,P.v9)(A.d),S=(0,y.useRouter)().query.audioId,T=R.account_royalty_offer_status,B=(0,w.W)(i.zT.free,T),E=B.nonExclusiveRoyaltyPercent,I=B.exclusiveRoyaltyPercent,F=null!==(r=R.non_standard_royalty_rate)&&void 0!==r?r:null,M=L===i.zT.free?b.ck.filter(function(e){return e.voiceName!==i.pi.any}
1):b.ck;return(0,a.jsxs)(a.Fragment,{children:[!!S&&(0,a.jsx)(v.l,{isDisabled:!!o,hasPublishTries:N}),N&&!l&&(0,a.jsx)(k.b,{className:t()(f().alert,x.As),type:k.o.error,textInformation:"ÐÑбеÑиÑе Ñип лиÑензии",isWrapper:!0}),(0,a.jsxs)("div",{className:t()(["shadowLevel0",f().sectionContainer]),"data-testid":"audiobook-licence-free-section",children:[(0,a.jsx)(d.H3,{className:f().sectionTitle,children:"ÐиÑензиÑ"}),!F&&(0,a.jsx)(d.OE,{className:f().sectionDescription,children:"ÐÑбеÑиÑе Ñип лиÑензии Ð´Ð»Ñ ÑаÑпÑоÑÑÑÐ°Ð½ÐµÐ½Ð¸Ñ Ð²Ð°Ñей аÑдиокниги и заÑабаÑÑвайÑе пÑоÑÐµÐ½Ñ ÑоÑлÑи Ñ ÐºÐ°Ð¶Ð´Ð¾Ð¹ пÑодажи"}),(0,a.jsx)("div",{className:t()(f().licenseCardWrapper,s),children:F?(0,a.jsx)(D.K,{royaltyRate:F,isAudio:!0}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(j.L,{className:f().licenseCard,title:"ÐкÑклÑзивнаÑ",royaltyRate:I,items:T===O.FV.basic?_.SO:_.zO,isActive:l===m.f.exclusive,onClick:function(){c(m.f.exclusive)},isLocked:o,shouldHideButton:o,shouldHidePercent:o,isExclusive:!0,isAudio:!0,dataTestId:"audio-licence-card-exclusive"}),(0,a.jsx)(j.L,{className:t()(f().licenseCard,f().licenseCardRight),title:"ÐазоваÑ",royaltyRate:E,items:T===O.FV.basic?_.Ub:_.hd,isActive:l===m.f.nonExclusive,onClick:function(){c(m.f.nonExclusive)},isLocked:o,shouldHideButton:o,shouldHidePercent:o,isAudio:!0,dataTestId:"audio-licence-card-basic"})]})})]}),(0,a.jsx)(g.f,{voicesOptions:M,genderVoice:u,onChangeGenderVoice:p,onChangeGlossary:h,glossary:C,isLocked:o,handleChangeDisablePublicationButton:n})]})},N=n(50029),L=n(59499),R=n(64687),S=n.n(R),T=n(84035),B=n(83535),E=n(42507),I=n.n(E),F=function(e){var r=e.items,n=void 0===r?[]:r,o=e.onChangeFile,i=e.onDeleteFile,s=e.errorMessage,c=e.isLoading,l=e.isLocked,u=n.length>=B.R;return(0,a.jsxs)("div",{className:t()(I().audioProofDocumentsUploaderWrapper),children:[(0,a.jsx)(d.mj,{className:I().audioProofDocumentsUploaderText,children:"ÐагÑÑзиÑе Ñкан/ÑоÑо ÑоглаÑÐµÐ½Ð¸Ñ Ñ Ð¿ÑоизводиÑелем"}),(0,a.jsx)(B.B,{items:n,onChange:o,onDeleteFile:i,isLoading:c,isLocked:l,isLoadFileButtonDisabled:u,className:I().audioProofDocumentsUploaderMiniFileUploader,accept:".pdf,.jpg,.jpeg"}),!!s&&(0,a.jsx)(d.OE,{className:I().audioProofDocumentsUploaderErrorText,children:s})]})},M=n(62754),U=n(66709),W=n(93469),V=n.n(W),z=[{label:"ÐÑоизведена на заказ",value:i.q.madeToOrder,tooltipInfo:"ÐÑоизведено на заказ â еÑли Ð²Ñ Ð·Ð°ÐºÐ°Ð·Ð°Ð»Ð¸ Ñоздание аÑдиовеÑÑии ÑамоÑÑоÑÑелÑно в ÑÑÑдии звÑкозапиÑи.",viewInfo:"default"},{label:"ÐÑоизведена в ÐиÑÑеÑ",value:i.q.madeInLitres,tooltipInfo:"ÐÑбеÑиÑе ÑÑÐ¾Ñ Ð²Ð°ÑианÑ, еÑли ÐаÑа книга озвÑÑена ÑеÑез ÑÑлÑÐ³Ñ \xabÐÑдио на заказ\xbb Ð¾Ñ ÐиÑÑеÑ",viewInfo:"default"},{label:"ÐвÑоÑÑкое пÑоÑÑение",value:i.q.authorsReading}],H=function(e){var r=e.onSelect,n=e.defaultValue,o=void 0===n?i.q.madeToOrder:n,s=e.phonogramLegalStatus,c=e.itemsForDocuments,l=e.isLoading,u=e.handleAddProofDocument,p=e.handleDeleteProofDocument,f=e.proofDocumentsErrorMessage,h=e.reader,m=e.handleChangeReaderName,g=e.handleSaveReaderName,b=e.hasReaderError,v=e.readerErrorText,_=e.isLocked;return(0,a.jsxs)("div",{className:t()(V().audioLawStatusWrapper,(0,L.Z)({},x.As,b||!!f)),"data-testid":"audioMasterLawStatus-section",children:[(0,a.jsx)(d.H3,{className:V().audioLawStatusTitle,children:"ÐÑавовой ÑÑаÑÑÑ ÑоногÑаммÑ"}),(0,a.jsx)(U.E,{className:V().audioLawStatusRadio,items:z,onChange:r,value:o,isLocked:_}),s===i.q.madeToOrder&&(0,a.jsx)(F,{items:c,isLoading:l,onChangeFile:u,onDeleteFile:p,errorMessage:f,isLocked:_}),s!==i.q.authorsReading&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(d.mj,{className:V().readersNameTitle,children:"ÐÐ¼Ñ ÑÑеÑа пÑи пÑбликаÑии"}),(0,a.jsx)(M.o,{className:V().input,labelText:"ÐÐ¼Ñ Ð¸ ÑÐ°Ð¼Ð¸Ð»Ð¸Ñ ÑÑеÑа или пÑевдоним",value:h||"",onChange:m,onBlur:g,hasError:b,errorMessage:v,isDisabled:_,dataTestId:"audioLawStatus__input--readerName"})]})]})},Z=n(67294),q=n(44848),G=n(67386),J=n(54799),K=n.n(J),Q=function(e){var r=e.selectedValue,n=void 0===r?null:r,o=e.priceList,t=e.onPriceChange,i=e.hasErrors,s=e.isLocked,c=(0,P.v9)(A.d),l=(0,P.v9)(G.MY),u=(0,Z.useState)(n),d=u[0],p=u[1];(0,Z.useEffect)(function(){n&&p(n)},[n]);var f=function(e){e&&(p(e),t(e))};return(0,a.jsx)("div",{className:K().audioPriceWrapper,children:(0,a.jsx)(q.B,{className:K().audioPriceSelect,priceList:o,value:d,onPriceChange:function(e){f(e),
1(0,T.tV)("choose_price_click",c,l,{option:e?e.label:""})},onSelectClick:function(){(0,T.tV)("choose_price_click",c,l)},hasErrors:i,isDisabled:s,titleText:"Цена за аÑдиокнигÑ"})})},Y=function(e){return e.replace(/â½/g,"").trim()},X=n(40886),$=n(31955),ee=n(81703),er=n(5397),en=n(14441),eo=n(86657),et=n(66890),ei=n(18246),ea=n(18839),es=n(67958),ec=n(9e4),el=n(72701);function eu(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),n.push.apply(n,o)}return n}function ed(e){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?eu(Object(n),!0).forEach(function(r){(0,L.Z)(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):eu(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var ep="yes"===$.Z.get("recommended_price")?b.rE:b.oU,ef=function(e){var r,n,o=e.validationErrors,s=e.handleClearValidationError,c=e.handleRevalidationFiles,l=e.hasPublishTries,u=e.isLocked,p=e.className,h=e.isHidePercentRoyalty,C=e.genderVoice,R=e.onChangeGenderVoice,B=e.onChangeGlossary,E=e.glossary,I=e.handleChangeDisablePublicationButton,F=(0,P.v9)(A.d),M=(0,P.v9)(G.MY),U=(0,P.v9)(G.p),W=(0,P.v9)(G.O6),V=(0,P.v9)(G.Q4),z=(0,P.v9)(ec.e1),q=null!==(n=F.non_standard_royalty_rate)&&void 0!==n?n:null,J=M.license_type,K=M.price,$=M.phonogram_legal_status,eu=M.reader,ef=M.has_musical_fragments,eh=M.agreed_with_audio_responsibility,em=M.production_type,eg=M.preview_length_seconds,eb=F.account_royalty_offer_status,ev=(0,Z.useState)([]),e_=ev[0],ex=ev[1],ey=(0,y.useRouter)().query,eP=ey.audioId,ek=ey.ebook_id,ej=(0,P.I0)(),eD=(0,w.W)(i.zT.phonogram,eb,em),eA=eD.nonExclusiveRoyaltyPercent,eO=eD.exclusiveRoyaltyPercent,ew=(0,Z.useMemo)(function(){var e=e_.find(function(e){return Y(e.label)===K});return(null==e?void 0:e.value)===ep.value?ed(ed({},ep),{},{label:"".concat(e.label," (ÑекомендованнаÑ)")}):e},[e_,K]);(0,Z.useEffect)(function(){ew||eG(ep)},[]);var eC=(0,Z.useMemo)(function(){return W.map(function(e,r){var n,o;return{id:e.id||r,value:r,title:(0,X.a)(e),link:e.link,isError:!!(null!==(n=e.errors)&&void 0!==n&&n.length),errorText:null!==(o=e.errors)&&void 0!==o&&o.length?e.errors[0]:void 0}})},[W]),eN=(0,ee.I)(eP,ek),eL=eN.handleUploadPhonogrammAgreements,eR=eN.handleDeletePhonogrammAgreements,eS=eN.handleAddPhonogramAudioBookFiles,eT=eN.handleDeletePhonogramAudioBookFile,eB=eN.handleUpdatePhonogramAudioBookFields,eE=eN.handleReorderAudioFiles,eI=eN.isLoadingAgreements,eF=eN.isLoadingAudioFragments,eM=(0,en.V)(),eU=eM.acceptAudioResponsibility,eW=eM.changeAudioFragments,eV=(0,eo.p)(String(eP)),ez=eV.updateAudioFragments,eH=eV.updateAudioResponsibilityAccepted,eZ=eV.updateAudioBookPreviewLength,eq=(r=(0,N.Z)(S().mark(function e(r){var n,o;return S().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=r.endSeconds,e.next=3,eZ(n,!0);case 3:return(o=e.sent)&&ej((0,el.aG)(n)),e.abrupt("return",o);case 6:case"end":return e.stop()}},e)})),function(e){return r.apply(this,arguments)}),eG=function(e){var r=Y(e.label);eB({price:r}),ej((0,el.Tz)(r)),s(er.v.price)},eJ=function(e){eB({license_type:e}),ej((0,el.Q4)(e)),s(er.v.license)};(0,Z.useEffect)(function(){ex(z.map(function(e){return{value:String(e.id),label:"".concat(e.value," â½")}}))},[eb,z]),(0,Z.useEffect)(function(){c(U)},[U]);var eK=l&&!U.length?"ÐагÑÑзиÑе ÑÐ°Ð¹Ð»Ñ ÑоногÑаммÑ":"",eQ=l&&$===i.q.madeToOrder&&!eC.length?b.eb.proofDocuments:"";return(0,a.jsxs)("div",{className:t()(p,(0,L.Z)({},x.As,!!o.price.length)),children:[!!eP&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(es.B,{className:f().phonogrammDownload,audioFiles:U,previewLengthSeconds:eg,onUploadFiles:eS,onDeleteFile:eT,onReorderAudioFiles:eE,isLoading:eF,errorMessage:eK,isLocked:u,onSaveFreeFragment:eq}),(0,a.jsx)(H,{onSelect:function(e){eB({phonogram_legal_status:e}),ej((0,el.cO)(e)),e===i.q.authorsReading&&(s(er.v.readersName),s(er.v.proofDocuments)),(0,T.tV)("choose_phono_status",F,M,{option:e})},defaultValue:$,phonogramLegalStatus:$,itemsForDocuments:eC,isLoading:eI,handleAddProofDocument:function(e){var r,n=null===(r=e.target.files)||void 0===r?void 0:r.item(0);n&&(eL(n),s(er.v.proofDocuments),e.target.value="")},handleDeleteProofDocument:function(e){eR(W.filter(function(r){return r.id===e.id})[0]),s(er.v.proofDocuments)},proofDocumentsErrorMessage:eQ,reader:eu,handleChangeReaderName:function(e){ej((0,el.Hd)(e)),e&&s(er.v.readersName)},handleSaveReaderName:function(e){var r=e&&e.length>b.Hy&&e.length<=b.ew;e&&r&&eB({reader:e})},hasReaderError:!!o.readersName.length,readerErrorText:o.readersName[0],isLocked:u}),($===i.q.authorsReading||$===i.q.madeToOrder)&&(0,a.jsx)(ei.x,{onChangeAudioFragmentsRights:function(e){eW(e),ez(e,!0),(0,T.tV)("choose_music_inserts",F,M,{option:e})},value:ef?ea.V.hasMusicFragments:ea.V.noMusicFragments,audioResponsibilityAccepted:eh,isAudioResponsibilityWarningHighlighted:!!V,onAcceptAudioResponsibility:function(e){eU(e),eH(e,!0)},isLocked:u}),(0,a.jsx)(v.l,{isDisabled:!!u,hasPublishTries:l}),(0,a.jsx)(Q,{selectedValue:ew,priceList:e_,onPriceChange:eG,hasErrors:!!o.price.length,isLocked:u})]}),l&&(!ew||!J)&&(0,a.jsx)(k.b,{size:"medium",type:k.o.error,isWrapper:!0,textInformation:"ÐÑбеÑиÑе Ñип лиÑензии и ÑенÑ",className:t()(f().priceAlert,x.As)}),(0,a.jsx)(et.A,{children:(0,a.jsxs)("div",{className:t()(["shadowLevel0",f().sectionContainer]),"data-testid":"audiobook-licence-phonogram-section",children:[(0,a.jsx)(d.H3,{className:f().sectionTitle,children:"ÐиÑензиÑ"}),!q&&(0,a.jsx)(d.OE,{className:f().sectionDescription,children:"ÐÑбеÑиÑе Ñип лиÑензии Ð´Ð»Ñ ÑаÑпÑоÑÑÑÐ°Ð½ÐµÐ½Ð¸Ñ Ð²Ð°Ñей аÑдиокниги и заÑабаÑÑвайÑе пÑоÑÐµÐ½Ñ ÑоÑлÑи Ñ ÐºÐ°Ð¶Ð´Ð¾Ð¹ пÑодажи"}),(0,a.jsx)("div",{className:f().cardsContainer,children:q?(0,a.jsx)(D.K,{royaltyRate:q,isAudio:!0}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(j.L,{className:f().licenseCard,title:"ÐкÑклÑзивнаÑ",price:void 0,royaltyRate:eO,items:eb===O.FV.basic?_.wX:_.zO,isActive:J===m.f.exclusive,onClick:function(){eJ(m.f.exclusive)},isLocked:u,shouldHideButton:u,shouldHidePercent:u||h,isExclusive:!0,isAudio:!0,dataTestId:"audio-licence-card-exclusive"}),(0,a.jsx)(j.L,{className:t()(f().licenseCard,f().licenseCardRight),title:"ÐазоваÑ",price:void 0,royaltyRate:eA,items:eb===O.FV.basic?_.ug:_.hd,isActive:J===m.f.nonExclusive,onClick:function(){eJ(m.f.nonExclusive)},isLocked:u,shouldHideButton:u,shouldHidePercent:u||h,isAudio:!0,dataTestId:"audio-licence-card-basic"})]})})]})}),!eP&&(0,a.jsx)(g.f,{voicesOptions:b.ck,genderVoice:C,onChangeGenderVoice:R,onChangeGlossary:B,glossary:E,isLocked:u,handleChangeDisablePublicationButton:I})]})},eh=n(91695),em=n(78053),eg=n.n(em),eb=function(e){var r=e.audioType,n=e.onCh
1angeTypeAudiobook,o=e.isLocked,l=e.isFree,p=e.isPhonogram,f=e.isReader,m=e.isFreeReader,g=e.isModeratedFree,b=e.isLoading,v=e.onSendToModeration,_=e.isNotificationShown,x=e.onCloseNotificationHandler,y=e.validationErrors,P=e.handleClearValidationError,k=e.handleRevalidationFiles,j=e.hasPublishTries,D=e.isDisablePublicationButton,A=e.handleChangeDisablePublicationButton,O=e.isNoAudioRadio,w=e.handleChangeLicense,N=e.licenseType,L=e.genderVoice,R=e.onChangeGenderVoice,S=e.onChangeGlossary,T=e.glossary,B=e.recommendedAudioBookType,E=e.productionStatus;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:t()("shadowLevel0",eg().audioRightsBlock),id:"audio_rights","data-testid":"audioRights__section",children:[(0,a.jsx)(d.H3,{className:eg().text,children:"ÐÑдиовеÑÑÐ¸Ñ ÐºÐ½Ð¸Ð³Ð¸"}),(0,a.jsxs)(d.u5,{className:eg().text,children:["ÐÑдиокниги помогаÑÑ ÑвелиÑиÑÑ Ð´Ð¾Ñ
од и оÑ
Ð²Ð°Ñ Ð²Ð°Ñей аÑдиÑоÑии.",(0,a.jsx)("br",{})," ÐÑбеÑиÑе ÑпоÑоб ÑÐ¾Ð·Ð´Ð°Ð½Ð¸Ñ Ð°ÑдиовеÑÑии Ð´Ð»Ñ Ð²Ð°Ñей книги:"]}),(0,a.jsx)(U.E,{className:eg().radio,items:s({isFree:l,isModeratedFree:g,isPhonogram:p,isReader:f,isFreeReader:m,isNoAudio:O}),onChange:n,value:r||B||void 0,isLocked:o,isWrapper:!0}),r===i.zT.commerce&&!O&&!m&&(0,a.jsx)(h,{isLocked:o})]}),(r===i.zT.free&&E!==i.s.canceled||r===i.zT.moderatedAudio||r===i.zT.reader)&&(0,a.jsx)(C,{className:eg().cardsContainer,handleChangeDisablePublicationButton:A,audioType:r,isLocked:o,handleChangeLicense:w,licenseType:N,genderVoice:L,onChangeGenderVoice:R,onChangeGlossary:S,glossary:T,hasPublishTries:j}),r===i.zT.phonogram&&!O&&(0,a.jsx)(ef,{validationErrors:y,handleClearValidationError:P,handleRevalidationFiles:k,hasPublishTries:j,isLocked:o,className:eg().segmentWrapper,genderVoice:L,onChangeGenderVoice:R,onChangeGlossary:S,glossary:T,handleChangeDisablePublicationButton:A}),(0,c.S)(r,m)&&!O&&(0,a.jsx)("div",{className:eg().buttonsWrapper,children:(0,a.jsx)(u.z,{isLoading:b,onClick:v,size:"medium",disabled:D,dataTestId:"publish-button",children:"ÐпÑбликоваÑÑ"})}),_&&(0,a.jsx)(eh.P,{position:"bottomRight",header:"ÐÑибка пÑи пÑовеÑке",description:"Ðдно или неÑколÑко полей оÑÑалиÑÑ Ð¿ÑÑÑÑми или ÑодеÑÐ¶Ð°Ñ Ð¾ÑибкÑ",status:"error",buttonClose:x})]})}},84594:function(e,r,n){"use strict";n.d(r,{S:function(){return t}});var o=n(17610),t=function(e,r){return e===o.zT.free||e===o.zT.phonogram||e===o.zT.moderatedAudio||e===o.zT.reader||e===o.zT.commerce&&!!r}},81703:function(e,r,n){"use strict";n.d(r,{I:function(){return C}});var o=n(59499),t=n(50029),i=n(64687),a=n.n(i),s=n(39424),c=n(67282),l=n(72363),u=n(84035),d=n(25869),p=n(51270),f=n(63043),h=n(17610),m=n(11163),g=n(67294),b=n(14416),v=n(67386),_=n(36613),x=n(72701),y=n(58748),P=n(76864),k=n(24690),j=n(42221),D=n(5785);function A(e,r){(null==r||r>e.length)&&(r=e.length);for(var n=0,o=Array(r);n<r;n++)o[n]=e[n];return o}function O(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),n.push.apply(n,o)}return n}function w(e){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?O(Object(n),!0).forEach(function(r){(0,o.Z)(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):O(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var C=function(e,r){var n,o,i,O,C,N,L,R,S=(0,b.v9)(_.d),T=(0,b.v9)(v.MY),B=(0,g.useState)(!1),E=B[0],I=B[1],F=(0,g.useState)(!1),M=F[0],U=F[1],W=(0,g.useState)(!1),V=W[0],z=W[1],H=(0,b.I0)(),Z=(0,m.useRouter)(),q=(n=(0,t.Z)(a().mark(function r(n){return a().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return I(!0),r.next=3,H((0,k.h)({audioBookId:e,meta:n}));case 3:I(!1);case 4:case"end":return r.stop()}},r)})),function(e){return n.apply(this,arguments)}),G=(o=(0,t.Z)(a().mark(function r(n){var o,t,i,s,u,m,g,b,v,_,y,P,k,D;return a().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:var a;if(o=new FormData,t=(0,c.DM)(),!n.file){r.next=19;break}if(i=(0,p.a)([n.file],d.aM),s=(0,f.x)(n.file_name||n.file.name),a=n.file.type,u=/(\.|\/)(mp3|mpeg)$/i.test(a),!(!i&&s&&u)){r.next=18;break}return o.append("file",n.file),o.append("audio_book_id",e),m="uploadSingleAudioFragment",r.next=12,(0,j.B)({apiPointName:m,body:o});case 12:b=(g=r.sent).result,g.errors.length||(P=b[0],k=w(w({},n),{},{file_name:P.title,isLoading:!1,isUploaded:!0,id:null!==(v=P.file_id)&&void 0!==v?v:t,ordering:null!==(_=P.order)&&void 0!==_?_:0}),H((0,x.PR)(k)),D="audio_phonogram_file_upload_success",(0,l.I)({action:D,goalParams:{source:h.dJ.configure,user_id:null!==(y=S.uuid)&&void 0!==y?y:""}})),r.next=19;break;case 18:i?H((0,x.PR)(w(w({},n),{},{id:t,isLoading:!1,errors:["ÐедопÑÑÑимÑй ÑÐ°Ð·Ð¼ÐµÑ Ñайла"]}))):s?u||H((0,x.PR)(w(w({},n),{},{id:t,isLoading:!1,errors:["ÐевеÑнÑй ÑоÑÐ¼Ð°Ñ Ñайла"]}))):H((0,x.PR)(w(w({},n),{},{id:t,isLoading:!1,errors:["Ðазвание Ñайла не должно пÑевÑÑаÑÑ ".concat(d._H," Ñимволов")]})));case 19:case"end":return r.stop()}},r)})),function(e){return o.apply(this,arguments)});return{handleUpdatePhonogramAudioBookFields:q,handleUploadPhonogrammAgreements:(i=(0,t.Z)(a().mark(function r(n){var o,t,i,l,u,f,h;return a().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:if(U(!0),o=(0,c.DM)(),!(0,p.a)([n],d.co)){r.next=9;break}return U(!1),H((0,x.bW)({file:n,link:"",id:o,file_name:n.name,isLoading:!1,ordering:0,errors:["ÐедопÑÑÑимÑй ÑÐ°Ð·Ð¼ÐµÑ Ñайла"]})),r.abrupt("return");case 9:return(t=new FormData).append("file",n),t.append("audio_book_id",e),i="uploadPhonogrammAgreements",r.next=15,(0,j.B)({apiPointName:i,body:t});case 15:u=(l=r.sent).result,(f=l.errors).length?s.Tb(f):(h=u[0],H((0,x.bW)({file:n,link:h.link,id:h.file_id||o,file_name:h.title,isLoading:!1,ordering:h.order||0})));case 19:U(!1);case 20:case"end":return r.stop()}},r)})),function(e){return i.apply(this,arguments)}),handleDeletePhonogrammAgreements:(O=(0,t.Z)(a().mark(function r(n){var o,t,i;return a().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:if(U(!0),!(n&&!(null!==(o=n.errors)&&void 0!==o&&o.length))){r.next=12;break}return(t=new FormData).append("id",n.id),i="deleteAudioBookProofDocument",r.next=7,(0,j.B)({apiPointName:i,body:t,urlParam
1s:{audioBookId:e}});case 7:0===r.sent.errors.length&&H((0,x.LD)(n)),r.next=13;break;case 12:n&&H((0,x.LD)(n));case 13:U(!1);case 14:case"end":return r.stop()}},r)})),function(e){return O.apply(this,arguments)}),handleAddPhonogramAudioBookFiles:(C=(0,t.Z)(a().mark(function e(r){var n,o,t;return a().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:z(!0),n=function(e,r){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,r){if(e){if("string"==typeof e)return A(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return A(e,void 0)}}(e))){n&&(e=n);var o=0,t=function(){};return{s:t,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:t}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}(r),e.prev=2,n.s();case 4:if((o=n.n()).done){e.next=10;break}return t=o.value,e.next=8,G(t);case 8:e.next=4;break;case 10:e.next=15;break;case 12:e.prev=12,e.t0=e.catch(2),n.e(e.t0);case 15:return e.prev=15,n.f(),e.finish(15);case 18:z(!1);case 19:case"end":return e.stop()}},e,null,[[2,12,15,18]])})),function(e){return C.apply(this,arguments)}),handleDeletePhonogramAudioBookFile:(N=(0,t.Z)(a().mark(function r(n){var o,t,i;return a().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:if(z(!0),!(n&&!(null!==(o=n.errors)&&void 0!==o&&o.length))){r.next=12;break}return(t=new FormData).append("id",n.id),i="deleteAudioFragment",r.next=7,(0,j.B)({apiPointName:i,body:t,urlParams:{audioId:e}});case 7:0===r.sent.errors.length&&H((0,y.j)({bookId:e})),r.next=13;break;case 12:n&&H((0,x.lC)(n));case 13:z(!1);case 14:case"end":return r.stop()}},r)})),function(e){return N.apply(this,arguments)}),handlePublishPhonogramAudioBook:(L=(0,t.Z)(a().mark(function n(){var o,t;return a().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return I(!0),n.next=3,(0,D.h)("/api/audio/configuration/".concat(e,"/publication/"),{method:"POST"}).then(function(n){n.ok&&Z.replace("/audiobooks/configure/".concat(e,"/phonogramm_success/?ebook_id=").concat(r))});case 3:t="sent_moderation_success",(0,l.I)({action:t,goalParams:{source:h.dJ.configure,user_id:null!==(o=S.uuid)&&void 0!==o?o:""}}),(0,u.tV)(t,S,T),I(!1);case 7:case"end":return n.stop()}},n)})),function(){return L.apply(this,arguments)}),handleReorderAudioFiles:(R=(0,t.Z)(a().mark(function r(n){return a().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return H((0,x.Pf)(n)),r.next=3,H((0,P.F)({audioId:e,ordering:n.map(function(e){return e.ordering})}));case 3:H((0,y.j)({bookId:e}));case 4:case"end":return r.stop()}},r)})),function(e){return R.apply(this,arguments)}),isLoading:E,isLoadingAgreements:M,isLoadingAudioFragments:V}}},39568:function(e,r,n){"use strict";n.d(r,{J:function(){return v}});var o=n(59499),t=n(73842),i=n(25869),a=n(51270),s=n(63043),c=function(e){var r=[];return e.length?e.reduce(function(e,r){return r.file&&e.push(r.file),e},[]).forEach(function(e){var n=(0,a.a)([e],i.aM),o=!(0,s.x)(e.name),t=!e.name.endsWith("mp3");n&&r.push("ÐедопÑÑÑимÑй ÑÐ°Ð·Ð¼ÐµÑ Ñайла \xab".concat(e.name,"\xbb")),o&&r.push("Ðазвание Ñайла \xab".concat(e.name,"\xbb не должно пÑевÑÑаÑÑ 55 Ñимволов")),t&&r.push("ÐевеÑнÑй ÑоÑÐ¼Ð°Ñ Ñайла \xab".concat(e.name,"\xbb"))}):r.push(t.eb.files),r},l=n(67294),u=n(17610),d=function(e){var r=e.find(function(e){var r;return null===(r=e.errors)||void 0===r?void 0:r.length});return e.length?null!=r&&r.errors?[r.errors[0]]:[]:[t.eb.proofDocuments]},p=function(e){var r=[];return e||r.push(t.eb.noReaderName),e&&e.length<t.Hy&&r.push(t.eb.readerNameMinLength),e&&e.length>t.ew&&r.push(t.eb.readerNameMaxLength),r};function f(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),n.push.apply(n,o)}return n}var h=function(e,r,n){var i=function(e){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};
1r%2?f(Object(n),!0).forEach(function(r){(0,o.Z)(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}({},t.aQ);return i.price=e.price?[]:[t.eb.price],i.files=c(r),i.license=e.license_type?[]:["ÐÑбеÑиÑе Ñип лиÑензии"],e.has_musical_fragments&&!e.agreed_with_audio_responsibility&&(i.musical_fragments=["ÐаннÑй пÑÐ½ÐºÑ ÑвлÑеÑÑÑ Ð¾Ð±ÑзаÑелÑнÑм"]),e.phonogram_legal_status!==u.q.authorsReading&&(i.readersName=p(e.reader),e.phonogram_legal_status!==u.q.madeInLitres&&(i.proofDocuments=d(n))),i},m=n(5397);function g(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),n.push.apply(n,o)}return n}function b(e){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?g(Object(n),!0).forEach(function(r){(0,o.Z)(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):g(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var v=function(){var e=(0,l.useState)(t.aQ),r=e[0],n=e[1],o=(0,l.useState)([]),i=o[0],a=o[1],s=(0,l.useState)(!1),u=s[0],d=s[1];return{handleValidateAudioBook:function(e){var r=e.meta,o=e.audioFiles,i=h(r,o,e.proofDocuments);return a(o.length?[]:[t.eb.files]),Object.values(i).some(function(e){return Array.isArray(e)&&e.length>0})&&d(!0),n(function(){return i}),Object.values(i).every(function(e){return!e.length})},handleClearValidationError:function(e){switch(e){case m.v.price:n(function(e){return{price:[],files:e.files,readersName:e.readersName,proofDocuments:e.proofDocuments,license:[]}});break;case m.v.files:n(function(e){return{price:e.price,files:[],readersName:e.readersName,proofDocuments:e.proofDocuments,license:[]}}),a([]);break;case m.v.readersName:n(function(e){return{price:e.price,files:e.files,readersName:[],proofDocuments:e.proofDocuments,license:[]}});break;case m.v.proofDocuments:n(function(e){return{price:e.price,files:e.files,readersName:e.readersName,proofDocuments:[],license:[]}});break;case m.v.license:n(function(e){return{price:e.price,files:e.files,readersName:e.readersName,proofDocuments:e.proofDocuments,license:[]}})}},handleRevalidationFiles:function(e){var o=c(e);r.files.length&&(a(e.length?[]:[t.eb.files]),n(b(b({},r),{},{files:o})))},validationErrors:r,emptyPhonogrammError:i,isNotificationShown:u,closeNotificationHandler:function(){d(!1)}}}},5397:function(e,r,n){"use strict";n.d(r,{v:function(){return t}});var o,t=((o={}).price="price",o.files="files",o.readersName="readersName",o.proofDocuments="proofDocuments",o.license="license",o)},41987:function(e,r,n){"use strict";n.d(r,{K:function(){return o}});var o=function(e){return e.recommendedPrices.data}},41981:function(e){e.exports={container:"BookPrice_container__5CqPj",title:"BookPrice_title__aexiv",bookPriceAlert:"BookPrice_bookPriceAlert__IQcD7",text:"BookPrice_text__jQ81D"}},72910:function(e){e.exports={container:"BookPriceRange_container__C45xI",title:"BookPriceRange_title__DESat",bookPriceAlert:"BookPriceRange_bookPriceAlert__s4BWI",text:"BookPriceRange_text__gfwmh",recommendedPriceInfo:"BookPriceRange_recommendedPriceInfo__gSDBk",re
1commendedPriceLabel:"BookPriceRange_recommendedPriceLabel__JcHLM"}},93469:function(e){e.exports={audioLawStatusWrapper:"AudioLawStatus_audioLawStatusWrapper__J9C0S",audioLawStatusTitle:"AudioLawStatus_audioLawStatusTitle__lL_nK",audioLawStatusRadio:"AudioLawStatus_audioLawStatusRadio__Ilxk0",readersNameTitle:"AudioLawStatus_readersNameTitle__3yqvM",input:"AudioLawStatus_input__Mpfi4"}},54799:function(e){e.exports={audioPriceWrapper:"AudioPriceWithRoyalty_audioPriceWrapper__JvU3_",audioPriceSelect:"AudioPriceWithRoyalty_audioPriceSelect__Rr3xK"}},42507:function(e){e.exports={audioProofDocumentsUploaderTitle:"AudioProofDocumentsUploader_audioProofDocumentsUploaderTitle__LM9Ob",audioProofDocumentsUploaderCheckBoxWrapper:"AudioProofDocumentsUploader_audioProofDocumentsUploaderCheckBoxWrapper__s7IR6",audioProofDocumentsUploaderCheckBoxTitleWrapper:"AudioProofDocumentsUploader_audioProofDocumentsUploaderCheckBoxTitleWrapper__HAcnV",audioProofDocumentsUploaderCheckBoxTitle:"AudioProofDocumentsUploader_audioProofDocumentsUploaderCheckBoxTitle__hk4Z4",audioProofDocumentsUploaderWrapper:"AudioProofDocumentsUploader_audioProofDocumentsUploaderWrapper__hMcCU",audioProofDocumentsUploaderText:"AudioProofDocumentsUploader_audioProofDocumentsUploaderText__r6C2M",audioProofDocumentsUploaderMiniFileUploader:"AudioProofDocumentsUploader_audioProofDocumentsUploaderMiniFileUploader__txis0",audioProofDocumentsUploaderErrorText:"AudioProofDocumentsUploader_audioProofDocumentsUploaderErrorText__gCq9L"}},78053:function(e){e.exports={audioRightsBlock:"AudioRightsBlock_audioRightsBlock__yD7A_",text:"AudioRightsBlock_text__TZSv7",radio:"AudioRightsBlock_radio__Mlu0X",segmentWrapper:"AudioRightsBlock_segmentWrapper__c6yw4",cardsContainer:"AudioRightsBlock_cardsContainer__AKT_w",buttonsWrapper:"AudioRightsBlock_buttonsWrapper__JslJb",titleLicense:"AudioRightsBlock_titleLicense__axeyz",licenseCardWrapper:"AudioRightsBlock_licenseCardWrapper__877H5",licenseCard:"AudioRightsBlock_licenseCard__vnW79",licenseCardRight:"AudioRightsBlock_licenseCardRight__hf1E8",alert:"AudioRightsBlock_alert__l4slL",section:"AudioRightsBlock_section__qheCc",subtitle:"AudioRightsBlock_subtitle__BNM8H",select:"AudioRightsBlock_select__MNO1l"}},37668:function(e){e.exports={sectionContainer:"Segment_sectionContainer__ZVWJ1",sectionTitle:"Segment_sectionTitle__x80m5",sectionDescription:"Segment_sectionDescription__AIQZh",priceAlert:"Segment_priceAlert__RIbaq",alert:"Segment_alert__IxP66",licenseCardWrapper:"Segment_licenseCardWrapper__nbh8y",cardsContainer:"Segment_cardsContainer__eEwE6",licenseCard:"Segment_licenseCard__rKM__",licenseCardRight:"Segment_licenseCardRight___x3n0",phonogrammDownload:"Segment_phonogrammDownload__cbMHU",textWrapper:"Segment_textWrapper__R0B8I",text:"Segment_text__oW31O",audioProductionButton:"Segment_audioProductionButton__2eFXi"}}}]); 2//# sourceMappingURL=6792-8663af5b81352fd0.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.