!function(){"use strict";vare={6266:function(e,t,n){varr=n(2667),o=(n(5101),n(5466)),u=n(3074),s=n.n(u),i=n(8204),a=n(4426),l=n(8349),c=n(9174),f=n(1784);functionp(e){return(p="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++){varr=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"inr&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}functiong(e,t){return(g=Object.setPrototypeOf||function(e,t){returne.__proto__=t,e})(e,t)}functiony(e,t){return!t||"object"!==p(t)&&"function"!=typeoft?m(e):t}functionm(e){if(void0===e)thrownewReferenceError("this hasn't been initialised - super() hasn't been called");returne}functiond(e){return(d=Object.setPrototypeOf?Object.getPrototypeOf:function(e){returne.__proto__||Object.getPrototypeOf(e)})(e)}functionb(e,t,n){returne+"?"+t+(""===t?"":"&")+"page="+n}varv=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&&g(e,t)}(i,e);vart,n,r,u,s=(r=i,u=function(){if("undefined"==typeofReflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeofProxy)return!0;try{returnDate.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){vare,t=d(r);if(u){varn=d(this).constructor;e=Reflect.construct(t,arguments,n)}elsee=t.apply(this,arguments);returny(this,e)});functioni(e){vart;returnfunction(e,t){if(!(einstanceoft))thrownewTypeError("Cannot call a class as a function")}(this,i),(t=s.call(this,e,"manage-users")).state={resultsCount:null,requestUrl:e.api_url,currentPage:1,sortingArgs:"",sortBy:"add_date",ordering:"desc",refresh:0},t.getCountFunc=t.getCountFunc.bind(m(t)),t.onTablePageChange=t.onTablePageChange.bind(m(t)),t.onColumnSortClick=t.onColumnSortClick.bind(m(t)),t.onItemsRemoval=t.onItemsRemoval.bind(m(t)),t.onItemsRemovalFail=t.onItemsRemovalFail.bind(m(t)),t}returnt=i,(n=[{key:"onTablePageChange",value:function(e,t){this.setState({currentPage:t,requestUrl:b(this.props.api_url,this.state.sortingArgs,t)})}},{key:"getCountFunc",value:function(e){this.setState({resultsCount:e})}},{key:"onColumnSortClick",value:function(e,t){varn="sort_by="+e+"&ordering="+t;this.setState({sortBy:e,ordering:t,sortingArgs:n,requestUrl:b(this.props.api_url,n,this.state.currentPage)})}},{key:"onItemsRemoval",value:function(e){this.setState({resultsCount:null,refresh:this.state.refresh+1,requestUrl:this.props.api_url},(function(){e?l.wN("The users deleted successfully.","usersRemovalSucceed"):l.wN("The user deleted successfully.","userRemovalSucceed")}))}},{key:"onItemsRemovalFail",value:function(e){e?l.wN("The users removal failed. Please try again.","usersRemovalFailed"):l.wN("The user removal failed. Please try again.","userRemovalFailed")}},{key:"pageContent",value:function(){returno.createElement(c._,{title:this.props.title+(null===this.state.resultsCount?"":" ("+this.state.resultsCount+")"),className:"search-results-wrap items-list-hor"},o.createElement(f.x,{pageItems:50,manageType:"users",key:this.state.requestUrl+"["+this.state.refresh+"]",itemsCountCallback:this.getCountFunc,requestUrl:this.state.requestUrl,onPageChange:this.onTablePageChange,sortBy:this.state.sortBy,ordering:this.state.ordering,onRowsDelete:this.onItemsRemoval,onRowsDeleteFail:this.onItemsRemovalFail,onClickColumnSort:this.onColumnSortClick}))}}])&&h(t.prototype,n),i}(i.T);v.propTypes={title:s().string.isRequired,api_url:s().string.isRequired},v.defaultProps={title:"Manage users",api_url:a.Z.get("api-manage-users")},(0,r.X)("page-manage-users",v)}},t={};functionn(r){if(t[r])returnt[r].exports;varo=t[r]={exports:{}};returne[r].call(o.exports,o,o.exports,n),o.exports}n.m=e,n.x=function(){},n.n=function(e){vart=e&&e.__esModule?function(){returne.d