!function(){"use strict";vare,t={6081:function(e,t,n){vara=n(2541),i=(n(2322),n(9268),n(9006),n(5090),n(3233),n(9808),n(4458),n(2004),n(8407),n(6394),n(8288),n(5677),n(2129),n(4655),n(288),n(3675),n(5101),n(3080),n(5466)),l=n(541),r=n(3613),o=n(2546),s=n(8578),u=n(4234),c=n(7642),d=n(2819),p=n(473),f=n(3074),y=n.n(f),m=n(7777);functiong(e){returni.createElement(m.s,{items:e.media,playlistId:e.playlistId,hidePlaylistOptions:e.hidePlaylistOptions,singleLinkContent:!0,hideDate:!0,hideViews:!0,hidePlaylistOrderNumber:!1,horizontalItemsOrientation:!0,itemsCountCallback:e.itemsCountCallback,itemsLoadCallback:e.itemsLoadCallback,pageItems:99999,inPlaylistPage:!0})}functionv(e){return(v="function"==typeofSymbol&&"symbol"==typeofSymbol.iterator?function(e){returntypeofe}:function(e){returne&&"function"==typeofSymbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeofe})(e)}functionh(e,t){for(varn=0;n<t.length;n++){vara=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"ina&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}functionb(e,t){return(b=Object.setPrototypeOf||function(e,t){returne.__proto__=t,e})(e,t)}functionP(e,t){return!t||"object"!==v(t)&&"function"!=typeoft?S(e):t}functionS(e){if(void0===e)thrownewReferenceError("this hasn't been initialised - super() hasn't been called");returne}functionE(e){return(E=Object.setPrototypeOf?Object.getPrototypeOf:function(e){returne.__proto__||Object.getPrototypeOf(e)})(e)}g.propTypes={media:y().array.isRequired,playlistId:y().string.isRequired,itemsCountCallback:y().func,itemsLoadCallback:y().func,hidePlaylistOptions:y().bool},g.defaultProps={hidePlaylistOptions:!0};vark=function(e){!function(e,t){if("function"!=typeoft&&null!==t)thrownewTypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&b(e,t)}(u,e);vart,n,a,o,s=(a=u,o=function(){if("undefined"==typeofReflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeofProxy)return!0;try{returnBoolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){vare,t=E(a);if(o){varn=E(this).constructor;e=Reflect.construct(t,arguments,n)}elsee=t.apply(this,arguments);returnP(this,e)});functionu(e){vart;returnfunction(e,t){if(!(einstanceoft))thrownewTypeError("Cannot call a class as a function")}(this,u),(t=s.call(this,e)).state={media:e.media},t.containerRef=i.createRef(),t.onItemsLoad=t.onItemsLoad.bind(S(t)),t}returnt=u,(n=[{key:"onItemsLoad",value:function(){if(this.props.loggedinUserPlaylist){vare=this.containerRef.current.querySelector(".items-list");if(e){vart=this.props.id,n=function(e){returnthis.state.media[e]}.bind(this),a=function(e){for(vart=this,n=[],a=0;a<e.length;)n.push(this.state.media[e[a]]),a+=1;this.setState({media:n},(function(){l.PlaylistPageActions.reorderedMediaInPlaylist(t.state.media)}))}.bind(this);d.ZP.create(e,{onStart:function(t){e.classList.add("on-dragging")},onEnd:function(l){for(vars,u,c,d=[],f=e.querySelectorAll(".item-order-number div div"),y=0;y<f.length;)(u=y+1)!==(s=parseInt(f[y].getAttribute("data-order"),10))&&(c=n(s-1).friendly_token,(0,p.putRequest)(r.ApiUrlContext._currentValue.playlists+"/"+t,{type:"ordering",ordering:u,media_friendly_token:c},{headers:{"X-CSRFToken":(0,p.csrfToken)()}},!1,i,o)),d.push(s-1),f[y].setAttribute("data-order",u),f[y].innerHTML=u,y+=1;e.classList.remove("on-dragging"),a(d)}})}}functioni(e){}functiono(e){}}},{key:"render",value:function(){returni.createElement("div",{ref:this.containerRef,className:"playlist-videos-list"+(this.props.loggedinUserPlaylist?" draggable":"")},this.state.media.length?i.createElement(g,{itemsLoadCallback:this.onItemsLoad,playlistId:this.props.id,media:this.state.media,hidePlaylistOptions:!this.props.loggedinUserPlaylist}):null)}}])&&h(t.prototype,n),u}(i.PureComponent),_=n(8204);functionw(e){return(w="function"==typeofSymbol&&"symbol"==typeofSymbol.iterator?function(e){returntypeof