/*! VERSION | 10.78.9 */"use strict";(self.__LOADABLE_LOADED_CHUNKS__=self.__LOADABLE_LOADED_CHUNKS__||[]).push([[9997],{1017:(e,t,l)=>{l.d(t,{Z:()=>m});var i=l(27378),n=l(11679),r=l(99382),s=l(58927),o=l(99748),a=l(56509),d=l(98846);let c=(0,d.n)({resolved:{},chunkName:()=>"editableCollection-components",isReady(e){let t=this.resolve(e);return!0===this.resolved[t]&&!!l.m[t]},importAsync:()=>l.e(2959).then(l.bind(l,32730)),requireAsync(e){let t=this.resolve(e);return this.resolved[t]=!1,this.importAsync(e).then(e=>(this.resolved[t]=!0,e))},requireSync(e){let t=this.resolve(e);return l(t)},resolve:()=>32730},{resolveComponent:e=>e.EditCollectionButton,fallback:void 0}),m=({className:e,iconSize:t})=>i.createElement(c,null,({isEditMode:l,handleCancel:d,handleMouseLeave:c,handleStartEditing:m,buttonId:u,isErrorDisplaying:h})=>i.createElement(i.Fragment,null,i.createElement("div",{className:(0,o.AK)("edit-collection-button",e)},l?i.createElement(r.ZP,{size:"extra-small",style:"second",onClick:d,className:"edit-collection-button"},(0,a.dW)("button.cancel")):i.createElement(n.Z,{onClick:m,id:u,onMouseLeave:c,iconSize:t})),h&&u&&i.createElement(s.Z,{placement:"left",isMobileRelative:!1,targetId:u,error:{message:(0,a.dW)("editableCollection.finishEditing")}})))},51302:(e,t,l)=>{l.d(t,{Z:()=>d});var i=l(27378),n=l(41499),r=l(40547),s=l(56509),o=l(98846);let a=(0,o.n)({resolved:{},chunkName:()=>"editableCollection-components",isReady(e){let t=this.resolve(e);return!0===this.resolved[t]&&!!l.m[t]},importAsync:()=>l.e(2959).then(l.bind(l,32730)),requireAsync(e){let t=this.resolve(e);return this.resolved[t]=!1,this.importAsync(e).then(e=>(this.resolved[t]=!0,e))},requireSync(e){let t=this.resolve(e);return l(t)},resolve:()=>32730},{resolveComponent:e=>e.EditableCollection}),d=e=>{let{sectionName:t,additionalConfirmationText:l,getRemoveButtonTextTranslationKey:o,itemsNameForConfirmTranslationsKey:d,fallback:c}=e;return i.createElement(a,{...e,fallback:null!=c?c:i.createElement(r.Z,null),getSelectAllText:e=>(0,s.dW)(e?"editableCollection.clearAll":"editableCollection.selectAll"),cancelText:(0,s.dW)("button.cancel"),getRemoveButtonText:e=>{var t;let l=null!==(t=null==o?void 0:o(e))&&void 0!==t?t:"button.remove";return(0,s.dW)(l)},renderConfirmationModal:({isConfirmationModalOpen:e,handleCloseConfirmationModal:r,handleConfirmationOk:s,itemsCount:o})=>i.createElement(n.Z,{isConfirmationModalOpen:e,handleCloseConfirmationModal:r,itemsNameForConfirmTranslationsKey:d,sectionName:t,handleConfirmationOk:s,itemsCount:o,additionalConfirmationText:l})})}},41499:(e,t,l)=>{l.d(t,{Z:()=>a});var i=l(27378),n=l(99382),r=l(30486),s=l(21313),o=l(56509);let a=({isConfirmationModalOpen:e,handleCloseConfirmationModal:t,itemsNameForConfirmTranslationsKey:l,sectionName:a,additionalConfirmationText:d,handleConfirmationOk:c,itemsCount:m})=>{let u=a?{parameters:{sectionName:a},messageId:"editableCollection.removeFrom"}:{messageId:"editableCollection.remove"};return i.createElement(s.Z,{open:e,onClose:t,closeIconPosition:"rightHeader",contentClassName:"editable-collection__modal",closeIconClassName:"editable-collection__modal-close-icon"},i.createElement("div",{className:"editable-collection__confirm-content"},i.createElement(r.Z,{...u,className:"editable-collection__confirm-text",elements:{nowrap:i.createElement("span",{className:"nowrap"}),items:i.createElement(r.Z,{messageId:l,parameters:{itemsCount:m},choiceParameter:"itemsCount"})}}),!!d&&i.createElement("div",{className:"editable-collection__confirm-additional-text"},d)),i.createElement("div",null,i.createElement(n.ZP,{onClick:t,className:"editable-collection__modal-button"},(0,o.dW)("button.cancel")),i.createElement(n.ZP,{className:"editable-collection__modal-button",style:"delete",onClick:c},(0,o.dW)("button.remove"))))}},71447:(e,t,l)=>{l.d(t,{Z:()=>s});var i=l(27378),n=l(98846);let r=(0,n.n)({resolved:{},chunkName:()=>"editableCollection-components",isReady(e){let t=this.resolve(e);return!0===this.resolved[t]&&!!l.m[t]},importAsync:()=>l.e(2959).then(l.bind(l,32730)),requireAsync(e){let t=this.resolve(e);return this.resolved[t]=!1,this.importAsync(e).then(e=>(this.resolved[t]=!0,e))},requireSync(e){let t=this.resolve(e);return l(t)},resolve:()=>32730},{resolveComponent:e=>e.EditableCollectionItemTypeWrapper,fallback:void 0}),s=({type:e,children:t})=>i.createElement(r,{type:e},t)},55363:(e,t,l)=>{l.d(t,{Z:()=>s});var i=l(27378),n=l(98846);let r=(0,n.n)({resolved:{},chunkName:()=>"editableCollection-components",isReady(e){let t=this.resolve(e);return!0===this.resolved[t]&&!!l.m[t]},importAsync:()=>l.e(2959).then(l.bind(l,32730)),requireAsync(e){let t=this.resolve(e);return this.resolved[t]=!1,this.importAsync(e).then(e=>(this.resolved[t]=!0,e))},requireSync(e){let t=this.resolve(e);return l(t)},resolve:()=>32730},{resolveComponent:e=>e.EditableItemWrapper,fallback:void 0}),s=e=>i.createElement(r,e)},11679:(e,t,l)=>{l.d(t,{Z:()=>d});var i=l(64553),n=l(27378),r=l(29413),s=l(99748),o=l(56509);let a=20,d=({id:e,onClick:t,onMouseLeave:l,iconSize:d=a,className:c})=>n.createElement(i.Z,{id:e,className:(0,s.AK)("editable-collection-edit-button",c),onClick:t,type:"button",onMouseLeave:l},n.createElement(r.Z,{img:"edit-underlined",size:d,className:"editable-collection-edit-button-icon"}),(0,o.dW)("editableCollection.buttons.edit"))},40547:(e,t,l)=>{l.d(t,{Z:()=>s});var i=l(27378),n=l(85353),r=l(99748);let s=({className:e})=>i.createElement("div",{className:(0,r.AK)("editable-collection-loader",e),style:{height:64}},i.createElement(n.Z,{size:64,isCentered:!0}))},64687:(e,t,l)=>{l.d(t,{Z:()=>N});var i,n=l(18775),r=l(49280),s=l(37051),o=l(27378),a=l(48204),d=l(38901),c=l(28865),m=l(94853),u=l(71447),h=l(80936),v=l(91090),p=l(59593),b=l(99748),C=l(63256),E=l(62591),f=l(74012),y=l(65754),_=l(41813);class A extends(i=o.Component){render(){let{isOwnProfile:e,listClassName:t,lostVideoIds:l,shouldShowUploader:i,uploaderClickHandler:n,videos:r,isPublicRecordingVideos:s,needVerifyAge:a,modelData:h,user:p,...C}=this.props,{playingTrailerId:E}=this.state;return o.createElement("div",{className:"videos-list-v2"},a&&o.createElement(d.u,{model:p,modelData:h},o.createElement(c.R,{isForceWhiteText:!0,triggerSource:v.Dt.AVP_MODELS_VIDEOS})),!a&&o.createElement("div",{className:(0,b.AK)(t,"videos-list-v2__content"),onClick:this.listClickHandler},i&&o.createElement(u.Z,{type:m.d.video},o.createElement(_.Z,{isUploader:!0,uploaderClickHandler:n})),null==r?void 0:r.map((t,i)=>o.createElement(u.Z,{key:t.id,type:m.d.video},o.createElement(_.Z,{isVideoElementAutoDisplayed:i<20,isOwnProfile:e,isPlaying:E===t.id,isLost:l.includes(t.id),video:t,videoRefHandler:this.videoRefHandler,thumbMouseEnterHandler:this.thumbMouseEnterHandler,thumbMouseLeaveHandler:this.thumbMouseLeaveHandler,listItemRefHandler:this.listItemRefHandler,isRecordedPrivate:!!t.showId,isPublicRecordingVideo:s||t.isHls,user:p,...C})))))}constructor(e){super(e),(0,n._)(this,"trailerRefs",{}),(0,n._)(this,"listItemRefs",{}),(0,n._)(this,"stopTrailer",e=>{e&&(e.pause(),e.currentTime&&(e.currentTime=0))}),(0,n._)(this,"stopAllTrailers",()=>{(0,r.Z)(this.trailerRefs,e=>this.stopTrailer(e))}),(0,n._)(this,"videoRefHandler",e=>{if(!e)return;let{videoId:t}=e.dataset;t&&(this.trailerRefs[t]=e)}),(0,n._)(this,"listItemRefHandler",e=>{if(!e)return;let{videoId:t}=e.dataset;t&&(this.listItemRefs[t]=e)}),(0,n._)(this,"listClickHandler",()=>{this.stopAllTrailers()}),(0,n._)(this,"thumbMouseEnterHandler",e=>{let{videoId:t,hasFailedProcessing:l,isLost:i}=e.currentTarget.dataset;l||i||p.BROWSER_CAPABILITIES.iOS||this.setState({playingTrailerId:Number(t)})}),(0,n._)(this,"thumbMouseLeaveHandler",e=>{let{videoId:t}=e.currentTarget.dataset;if(!t)return;let l=this.trailerRefs[t];this.stopTrailer(l),this.setState({playingTrailerId:null})}),this.state={playingTrailerId:null}}}(0,n._)(A,"defaultProps",{uploaderClickHandler:s.Z,lostVideoIds:[],scrollBarLibOptions:{}});let N=(0,h.y)("isLayoutUpToS")((0,a.$j)((e,t)=>({currentUser:(0,f.ts)(e),isCurrentUserFriendOfOwner:(0,y.zM)(e,t.user.id),lostVideoIds:(0,E._9)(e),needVerifyAge:(0,C.m5e)(e)}),{})(A))}}]);