(this["webpackJsonpsynapse-admin"]=this["webpackJsonpsynapse-admin"]||[]).push([[0],{634:function(e,t){},673:function(e,t,r){"use strict";r.r(t);var s=r(0),a=r(23),n=r.n(a),i=r(365),o=r(763),c=r(762),d=r(232),l=r(102),u={login:function(e){var t=e.base_url,r=e.username,s=e.password,a=e.loginToken;t=Object({NODE_ENV:"production",PUBLIC_URL:".",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0,REACT_APP_VERSION:""}).REACT_APP_SERVER||t,console.log("login ");var n={method:"POST",body:JSON.stringify(Object.assign({device_id:localStorage.getItem("device_id"),initial_device_display_name:"Synapse Admin"},a?{type:"m.login.token",token:a}:{type:"m.login.password",user:r,password:s}))};t=t.replace(/\/+$/g,""),localStorage.setItem("base_url",t);var i=window.decodeURIComponent(t)+"/_matrix/client/r0/login";return l.a.fetchJson(i,n).then((function(e){var t=e.json;localStorage.setItem("home_server",t.home_server),localStorage.setItem("user_id",t.user_id),localStorage.setItem("access_token",t.access_token),localStorage.setItem("device_id",t.device_id)}))},logout:function(){console.log("logout");var e=localStorage.getItem("base_url")+"/_matrix/client/r0/logout",t=localStorage.getItem("access_token"),r={method:"POST",user:{authenticated:!0,token:"Bearer ".concat(t)}};return"string"===typeof t&&l.a.fetchJson(e,r).then((function(e){e.json;localStorage.removeItem("access_token")})),Promise.resolve()},checkError:function(e){var t=e.status;return console.log("checkError "+t),401===t||403===t?Promise.reject():Promise.resolve()},checkAuth:function(){var e=localStorage.getItem("access_token");return console.log("checkAuth "+e),"string"===typeof e?Promise.resolve():Promise.reject()},getPermissions:function(){return Promise.resolve()}},m=r(6),j=r(90),b=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=localStorage.getItem("access_token");return console.log("httpClient "+e),null!=r&&(t.user={authenticated:!0,token:"Bearer ".concat(r)}),l.a.fetchJson(e,t)},p=function(e){var t=localStorage.getItem("base_url"),r=/^mxc:\/\/([^/]+)\/(\w+)/.exec(e);if(console.log("mxcClient "+r),null==r)return null;var s=r[1],a=r[2];return"".concat(t,"/_matrix/media/r0/thumbnail/").concat(s,"/").concat(a,"?width=24&height=24&method=scale")},_={users:{path:"/_synapse/admin/v2/users",map:function(e){return Object(m.a)(Object(m.a)({},e),{},{id:e.name,avatar_src:p(e.avatar_url),is_guest:!!e.is_guest,admin:!!e.admin,deactivated:!!e.deactivated,creation_ts_ms:1e3*e.creation_ts})},data:"users",total:function(e){return e.total},create:function(e){return{endpoint:"/_synapse/admin/v2/users/@".concat(e.id,":").concat(localStorage.getItem("home_server")),body:e,method:"PUT"}},delete:function(e){return{endpoint:"/_synapse/admin/v1/deactivate/".concat(e.id),body:{erase:!0},method:"POST"}}},rooms:{path:"/_synapse/admin/v1/rooms",map:function(e){return Object(m.a)(Object(m.a)({},e),{},{id:e.room_id,alias:e.canonical_alias,members:e.joined_members,is_encrypted:!!e.encryption,federatable:!!e.federatable,public:!!e.public})},data:"rooms",total:function(e){return e.total_rooms},delete:function(e){return{endpoint:"/_synapse/admin/v1/rooms/".concat(e.id),body:{block:!1}}}},reports:{path:"/_synapse/admin/v1/event_reports",map:function(e){return Object(m.a)(Object(m.a)({},e),{},{id:e.id})},data:"event_reports",total:function(e){return e.total}},devices:{map:function(e){return Object(m.a)(Object(m.a)({},e),{},{id:e.device_id})},data:"devices",total:function(e){return e.total},reference:function(e){return{endpoint:"/_synapse/admin/v2/users/".concat(e,"/devices")}},delete:function(e){return{endpoint:"/_synapse/admin/v2/users/".concat(e.user_id,"/devices/").concat(e.id)}}},connections:{path:"/_synapse/admin/v1/whois",map:function(e){return Object(m.a)(Object(m.a)({},e),{},{id:e.user_id})},data:"connections"},room_members:{map:function(e){return{id:e}},reference:function(e){return{endpoint:"/_synapse/admin/v1/rooms/".concat(e,"/members")}},data:"members",total:function(e){return e.total}},room_state:{map:function(e){return Object(m.a)(Object(m.a)({},e),{},{id:e.event_id})},reference:function(e){return{endpoint:"/_synapse/admin/v1/rooms/".concat(e,"/state")}},data:"state",total:function(e){return e.state.length}},pushers:{map:function(e){return Object(m.a)(Object(m.a)({},e),{},{id:e.pushkey})},reference:function(e){return{endpoint:"/_synapse/admin/v1/users/".concat(e,"/pushers")}},data:"pushers",total:function(e){return e.total}},joined_rooms:{map:function(e){return{id:e}},reference:function(e){return{endpoint:"/_synapse/admin/v1/users/".concat(e,"/joined_rooms")}},data:"joined_rooms",total:function(e){return e.total}},users_media:{map:function(e){return Object(m.a)(Object(m.a)({},e),{},{id:e.media_id})},reference:function(e){return{endpoint:"/_synapse/admin/v1/users/".concat(e,"/media")}},data:"media",total:function(e){return e.total},delete:function(e){return{endpoint:"/_synapse/admin/v1/media/".concat(localStorage.getItem("home_server"),"/").concat(e.id)}}},delete_media:{delete:function(e){return{endpoint:"/_synapse/admin/v1/media/".concat(localStorage.getItem("home_server"),"/delete?before_ts=").concat(e.before_ts,"&size_gt=").concat(e.size_gt,"&keep_profiles=").concat(e.keep_profiles),method:"POST"}}},protect_media:{map:function(e){return{id:e.media_id}},create:function(e){return{endpoint:"/_synapse/admin/v1/media/protect/".concat(e.media_id),method:"POST"}},delete:function(e){return{endpoint:"/_synapse/admin/v1/media/unprotect/".concat(e.media_id),method:"POST"}}},quarantine_media:{map:function(e){return{id:e.media_id}},create:function(e){return{endpoint:"/_synapse/admin/v1/media/quarantine/".concat(localStorage.getItem("home_server"),"/").concat(e.media_id),method:"POST"}},delete:function(e){return{endpoint:"/_synapse/admin/v1/media/unquarantine/".concat(localStorage.getItem("home_server"),"/").concat(e.media_id),method:"POST"}}},servernotices:{map:function(e){return{id:e.event_id}},create:function(e){return{endpoint:"/_synapse/admin/v1/send_server_notice",body:{user_id:e.id,content:{msgtype:"m.text",body:e.body}},method:"POST"}}},user_media_statistics:{path:"/_synapse/admin/v1/statistics/users/media",map:function(e){return Object(m.a)(Object(m.a)({},e),{},{id:e.user_id})},data:"users",total:function(e){return e.total}},forward_extremities:{map:function(e){return Object(m.a)(Object(m.a)({},e),{},{id:e.event_id})},reference:function(e){return{endpoint:"/_synapse/admin/v1/rooms/".concat(e,"/forward_extremities")}},data:"results",total:function(e){return e.count},delete:function(e){return{endpoint:"/_synapse/admin/v1/rooms/".concat(e.id,"/forward_extremities")}}},room_directory:{path:"/_matrix/client/r0/publicRooms",map:function(e){return Object(m.a)(Object(m.a)({},e),{},{id:e.room_id,public:!!e.public,guest_access:!!e.guest_access,avatar_src:p(e.avatar_url)})},data:"chunk",total:function(e){return e.total_room_count_estimate},create:function(e){return{endpoint:"/_matrix/client/r0/directory/list/room/".concat(e.id),body:{visibility:"public"},method:"PUT"}},delete:function(e){return{endpoint:"/_matrix/client/r0/directory/list/room/".concat(e.id),body:{visibility:"private"},method:"PUT"}}},registration_tokens:{path:"/_synapse/admin/v1/registration_tokens",map:function(e){return Object(m.a)(Object(m.a)({},e),{},{id:e.token})},data:"registration_tokens",total:function(e){return e.registration_tokens.length},create:function(e){return{endpoint:"/_synapse/admin/v1/registration_tokens/new",body:e,method:"POST"}},delete:function(e){return{endpoint:"/_synapse/admin/v1/registration_tokens/".concat(e.id)}}}};function h(e,t){if(null!==t)return t}function O(e){return"DESC"===e?"b":"f"}var f={getList:function(e,t){console.log("getList "+e);var r=t.filter,s=r.user_id,a=r.name,n=r.guests,i=r.deactivated,o=r.search_term,c=r.valid,d=t.pagination,l=d.page,u=d.perPage,m=t.sort,p=m.field,h=m.order,f=(l-1)*u,g={from:f,limit:u,user_id:s,search_term:o,name:a,guests:n,deactivated:i,valid:c,order_by:p,dir:O(h)},v=localStorage.getItem("base_url");if(!v||!(e in _))return Promise.reject();var x=_[e],y=v+x.path,w="".concat(y,"?").concat(Object(j.stringify)(g));return b(w).then((function(e){var t=e.json;return{data:t[x.data].map(x.map),total:x.total(t,f,u)}}))},getOne:function(e,t){console.log("getOne "+e);var r=localStorage.getItem("base_url");if(!r||!(e in _))return Promise.reject();var s=_[e],a=r+s.path;return b("".concat(a,"/").concat(t.id)).then((function(e){var t=e.json;return{data:s.map(t)}}))},getMany:function(e,t){console.log("getMany "+e);var r=localStorage.getItem("base_url");if(!r||!(e in _))return Promise.reject();var s=_[e],a=r+s.path;return Promise.all(t.ids.map((function(e){return b("".concat(a,"/").concat(e))}))).then((function(e){return{data:e.map((function(e){var t=e.json;return s.map(t)})),total:e.length}}))},getManyReference:function(e,t){console.log("getManyReference "+e);var r=t.pagination,s=r.page,a=r.perPage,n=t.sort,i=n.field,o=n.order,c=(s-1)*a,d={from:c,limit:a,order_by:i,dir:O(o)},l=localStorage.getItem("base_url");if(!l||!(e in _))return Promise.reject();var u=_[e],m=u.reference(t.id),p="".concat(l).concat(m.endpoint,"?").concat(Object(j.stringify)(d));return b(p).then((function(e){e.headers;var t=e.json;return{data:t[u.data].map(u.map),total:u.total(t,c,a)}}))},update:function(e,t){console.log("update "+e);var r=localStorage.getItem("base_url");if(!r||!(e in _))return Promise.reject();var s=_[e],a=r+s.path;return b("".concat(a,"/").concat(t.data.id),{method:"PUT",body:JSON.stringify(t.data,h)}).then((function(e){var t=e.json;return{data:s.map(t)}}))},updateMany:function(e,t){console.log("updateMany "+e);var r=localStorage.getItem("base_url");if(!r||!(e in _))return Promise.reject();var s=r+_[e].path;return Promise.all(t.ids.map((function(e){return b("".concat(s,"/").concat(e))}),{method:"PUT",body:JSON.stringify(t.data,h)})).then((function(e){return{data:e.map((function(e){return e.json}))}}))},create:function(e,t){console.log("create "+e);var r=localStorage.getItem("base_url");if(!r||!(e in _))return Promise.reject();var s=_[e];if(!("create"in s))return Promise.reject();var a=s.create(t.data),n=r+a.endpoint;return b(n,{method:a.method,body:JSON.stringify(a.body,h)}).then((function(e){var t=e.json;return{data:s.map(t)}}))},createMany:function(e,t){console.log("createMany "+e);var r=localStorage.getItem("base_url");if(!r||!(e in _))return Promise.reject();var s=_[e];return"create"in s?Promise.all(t.ids.map((function(e){t.data.id=e;var a=s.create(t.data),n=r+a.endpoint;return b(n,{method:a.method,body:JSON.stringify(a.body,h)})}))).then((function(e){return{data:e.map((function(e){return e.json}))}})):Promise.reject()},delete:function(e,t){console.log("delete "+e);var r=localStorage.getItem("base_url");if(!r||!(e in _))return Promise.reject();var s=_[e];if("delete"in s){var a=s.delete(t),n=r+a.endpoint;return b(n,{method:"method"in a?a.method:"DELETE",body:"body"in a?JSON.stringify(a.body):null}).then((function(e){return{data:e.json}}))}var i=r+s.path;return b("".concat(i,"/").concat(t.id),{method:"DELETE",body:JSON.stringify(t.data,h)}).then((function(e){return{data:e.json}}))},deleteMany:function(e,t){console.log("deleteMany "+e);var r=localStorage.getItem("base_url");if(!r||!(e in _))return Promise.reject();var s=_[e];if("delete"in s)return Promise.all(t.ids.map((function(e){var a=s.delete(Object(m.a)(Object(m.a)({},t),{},{id:e})),n=r+a.endpoint;return b(n,{method:"method"in a?a.method:"DELETE",body:"body"in a?JSON.stringify(a.body):null})}))).then((function(e){return{data:e.map((function(e){return e.json}))}}));var a=r+s.path;return Promise.all(t.ids.map((function(e){return b("".concat(a,"/").concat(e),{method:"DELETE",body:JSON.stringify(t.data,h)})}))).then((function(e){return{data:e.map((function(e){return e.json}))}}))}},g=r(4),v=r(781),x=r(408),y=r.n(x),w=r(407),S=r.n(w),k=r(409),I=r.n(k),P=r(145),D=r.n(P),A=r(414),C=r.n(A),E=r(413),R=r.n(E),T=r(406),z=r.n(T),F=r(410),V=r.n(F),N=r(89),B=r.n(N),M=r(110),L=r(450),q=r(782),U=r(783),G=r(31),W=r(435),Z=r(741),J=r(742),H=r(774),K=r(437),Q=r(770),$=r(764),Y=r(745),X=r(746),ee=r(747),te=r(215),re=r(39),se=r(236),ae=r(722),ne=r(769),ie=r(771),oe=r(778),ce=r(213),de=r(748),le=r(780),ue=r(765),me=r(785),je=r(766),be=r(779),pe=r(776),_e=r(773),he=r(777),Oe=r(752),fe=r(753),ge=r(24),ve=r(20),xe=r(161),ye=r(338),we=r(726),Se=r(87),ke=r(279),Ie=r.n(ke),Pe=r(211),De=r.n(Pe),Ae=r(728),Ce=r(730),Ee=r(731),Re=r(729),Te=r(2),ze=function(e){var t=e.open,r=e.loading,s=e.onClose,a=e.onSend,n=Object(re.a)(),i=function(e){return Object(Te.jsxs)(se.a,Object(m.a)(Object(m.a)({},e),{},{children:[Object(Te.jsx)(ae.a,{label:"resources.servernotices.action.send",disabled:e.pristine}),Object(Te.jsx)(G.a,{label:"ra.action.cancel",onClick:s,children:Object(Te.jsx)(De.a,{})})]}))};return Object(Te.jsxs)(Ae.a,{open:t,onClose:s,loading:r,children:[Object(Te.jsx)(Re.a,{children:n("resources.servernotices.action.send")}),Object(Te.jsxs)(Ce.a,{children:[Object(Te.jsx)(Ee.a,{children:n("resources.servernotices.helper.send")}),Object(Te.jsx)(oe.a,{toolbar:Object(Te.jsx)(i,{}),submitOnEnter:!1,redirect:!1,save:a,children:Object(Te.jsx)(ce.a,{source:"body",label:"resources.servernotices.fields.body",fullWidth:!0,multiline:!0,rows:"4",resettable:!0,validate:Object(te.g)()})})]})]})},Fe=function(e){var t=e.record,r=Object(s.useState)(!1),a=Object(ve.a)(r,2),n=a[0],i=a[1],o=Object(xe.a)(),c=Object(ye.a)("servernotices"),d=Object(ve.a)(c,2),l=d[0],u=d[1].loading,j=function(){return i(!1)};return Object(Te.jsxs)(s.Fragment,{children:[Object(Te.jsx)(G.a,{label:"resources.servernotices.send",onClick:function(){return i(!0)},disabled:u,children:Object(Te.jsx)(Ie.a,{})}),Object(Te.jsx)(ze,{open:n,onClose:j,onSend:function(e){l({payload:{data:Object(m.a)({id:t.id},e)}},{onSuccess:function(){o("resources.servernotices.action.send_success"),j()},onFailure:function(){return o("resources.servernotices.action.send_failure","error")}})}})]})},Ve=function(e){var t=e.selectedIds,r=Object(s.useState)(!1),a=Object(ve.a)(r,2),n=a[0],i=a[1],o=Object(xe.a)(),c=Object(we.a)(),d=Object(Se.a)(),l=Object(ve.a)(d,2),u=l[0],m=l[1].loading,j=function(){return i(!1)};return Object(Te.jsxs)(s.Fragment,{children:[Object(Te.jsx)(G.a,{label:"resources.servernotices.send",onClick:function(){return i(!0)},disabled:m,children:Object(Te.jsx)(Ie.a,{})}),Object(Te.jsx)(ze,{open:n,onClose:j,onSend:function(e){u({type:"createMany",resource:"servernotices",payload:{ids:t,data:e}},{onSuccess:function(e){e.data;o("resources.servernotices.action.send_success"),c("users"),j()},onFailure:function(e){return o("resources.servernotices.action.send_failure","error")}})}})]})},Ne=r(680),Be=r(237),Me=r(88),Le=r.n(Me),qe=r(101),Ue=r(45),Ge=r(218),We=r.n(Ge),Ze=Object(qe.a)((function(e){return{deleteButton:{color:e.palette.error.main,"&:hover":{backgroundColor:Object(Ue.alpha)(e.palette.error.main,.12),"@media (hover: none)":{backgroundColor:"transparent"}}}}}),{name:"RaDeleteDeviceButton"}),Je=function(e){var t=e.record,r=Ze(e),a=Object(s.useState)(!1),n=Object(ve.a)(a,2),i=n[0],o=n[1],c=Object(Ne.a)(),d=Object(xe.a)(),l=Object(Se.a)(),u=Object(ve.a)(l,2),m=u[0],j=u[1].loading;if(!t)return null;return Object(Te.jsxs)(s.Fragment,{children:[Object(Te.jsx)(G.a,{label:"ra.action.remove",onClick:function(){return o(!0)},className:We()("ra-delete-button",r.deleteButton),children:Object(Te.jsx)(Le.a,{})}),Object(Te.jsx)(Be.a,{isOpen:i,loading:j,onConfirm:function(){m({type:"delete",resource:"devices",payload:{id:t.id,user_id:t.user_id}},{onSuccess:function(){d("resources.devices.action.erase.success"),c()},onFailure:function(){return d("resources.devices.action.erase.failure","error")}}),o(!1)},onClose:function(){return o(!1)},title:"resources.devices.action.erase.title",content:"resources.devices.action.erase.content",translateOptions:{id:t.id,name:t.display_name?t.display_name:t.id}})]})},He=r(451),Ke=r(733),Qe=r(734),$e=r(322),Ye=r(281),Xe=r.n(Ye),et=r(116),tt=r.n(et),rt=r(280),st=r.n(rt),at=r(143),nt=r.n(at),it=r(387),ot=r.n(it),ct=Object(qe.a)((function(e){return{deleteButton:{color:e.palette.error.main,"&:hover":{backgroundColor:Object(Ue.alpha)(e.palette.error.main,.12),"@media (hover: none)":{backgroundColor:"transparent"}}}}}),{name:"RaDeleteDeviceButton"}),dt=function(e){var t=e.open,r=e.loading,s=e.onClose,a=e.onSend,n=Object(re.a)(),i=function(e){return Object(Te.jsxs)(se.a,Object(m.a)(Object(m.a)({},e),{},{children:[Object(Te.jsx)(ae.a,{label:"resources.delete_media.action.send",icon:Object(Te.jsx)(st.a,{})}),Object(Te.jsx)(G.a,{label:"ra.action.cancel",onClick:s,children:Object(Te.jsx)(De.a,{})})]}))};return Object(Te.jsxs)(Ae.a,{open:t,onClose:s,loading:r,children:[Object(Te.jsx)(Re.a,{children:n("resources.delete_media.action.send")}),Object(Te.jsxs)(Ce.a,{children:[Object(Te.jsx)(Ee.a,{children:n("resources.delete_media.helper.send")}),Object(Te.jsxs)(oe.a,{toolbar:Object(Te.jsx)(i,{}),submitOnEnter:!1,redirect:!1,save:a,children:[Object(Te.jsx)(Ke.a,{fullWidth:!0,source:"before_ts",label:"resources.delete_media.fields.before_ts",defaultValue:0,parse:function(e){var t=new Date(e);return isNaN(t)?0:t.getTime()}}),Object(Te.jsx)(Qe.a,{fullWidth:!0,source:"size_gt",label:"resources.delete_media.fields.size_gt",defaultValue:0,min:0,step:1024}),Object(Te.jsx)(H.a,{fullWidth:!0,source:"keep_profiles",label:"resources.delete_media.fields.keep_profiles",defaultValue:!0})]})]})]})},lt=function(e){var t=ct(e),r=Object(s.useState)(!1),a=Object(ve.a)(r,2),n=a[0],i=a[1],o=Object(xe.a)(),c=Object($e.a)("delete_media"),d=Object(ve.a)(c,2),l=d[0],u=d[1].loading,j=function(){return i(!1)};return Object(Te.jsxs)(s.Fragment,{children:[Object(Te.jsx)(G.a,{label:"resources.delete_media.action.send",onClick:function(){return i(!0)},disabled:u,className:We()("ra-delete-button",t.deleteButton),children:Object(Te.jsx)(st.a,{})}),Object(Te.jsx)(dt,{open:n,onClose:j,onSend:function(e){l({payload:Object(m.a)({},e)},{onSuccess:function(){o("resources.delete_media.action.send_success"),j()},onFailure:function(){return o("resources.delete_media.action.send_failure","error")}})}})]})},ut=function(e){var t=e.record,r=Object(re.a)(),a=Object(Ne.a)(),n=Object(xe.a)(),i=Object(ye.a)("protect_media"),o=Object(ve.a)(i,2),c=o[0],d=o[1].loading,l=Object($e.a)("protect_media"),u=Object(ve.a)(l,1)[0];if(!t)return null;return Object(Te.jsxs)(s.Fragment,{children:[t.quarantined_by&&Object(Te.jsx)(He.a,{title:r("resources.protect_media.action.none",{_:"resources.protect_media.action.none"}),children:Object(Te.jsx)("div",{children:Object(Te.jsx)(G.a,{disabled:!0,children:Object(Te.jsx)(tt.a,{})})})}),t.safe_from_quarantine&&Object(Te.jsx)(He.a,{title:r("resources.protect_media.action.delete",{_:"resources.protect_media.action.delete"}),arrow:!0,children:Object(Te.jsx)("div",{children:Object(Te.jsx)(G.a,{onClick:function(){u({payload:Object(m.a)({},t)},{onSuccess:function(){n("resources.protect_media.action.send_success"),a()},onFailure:function(){return n("resources.protect_media.action.send_failure","error")}})},disabled:d,children:Object(Te.jsx)(nt.a,{})})})}),!t.safe_from_quarantine&&!t.quarantined_by&&Object(Te.jsx)(He.a,{title:r("resources.protect_media.action.create",{_:"resources.protect_media.action.create"}),children:Object(Te.jsx)("div",{children:Object(Te.jsx)(G.a,{onClick:function(){c({payload:{data:t}},{onSuccess:function(){n("resources.protect_media.action.send_success"),a()},onFailure:function(){return n("resources.protect_media.action.send_failure","error")}})},disabled:d,children:Object(Te.jsx)(ot.a,{})})})})]})},mt=function(e){var t=e.record,r=Object(re.a)(),a=Object(Ne.a)(),n=Object(xe.a)(),i=Object(ye.a)("quarantine_media"),o=Object(ve.a)(i,2),c=o[0],d=o[1].loading,l=Object($e.a)("quarantine_media"),u=Object(ve.a)(l,1)[0];if(!t)return null;return Object(Te.jsxs)(s.Fragment,{children:[t.safe_from_quarantine&&Object(Te.jsx)(He.a,{title:r("resources.quarantine_media.action.none",{_:"resources.quarantine_media.action.none"}),children:Object(Te.jsx)("div",{children:Object(Te.jsx)(G.a,{disabled:!0,children:Object(Te.jsx)(tt.a,{})})})}),t.quarantined_by&&Object(Te.jsx)(He.a,{title:r("resources.quarantine_media.action.delete",{_:"resources.quarantine_media.action.delete"}),children:Object(Te.jsx)("div",{children:Object(Te.jsx)(G.a,{onClick:function(){u({payload:Object(m.a)({},t)},{onSuccess:function(){n("resources.quarantine_media.action.send_success"),a()},onFailure:function(){return n("resources.quarantine_media.action.send_failure","error")}})},disabled:d,children:Object(Te.jsx)(Xe.a,{color:"error"})})})}),!t.safe_from_quarantine&&!t.quarantined_by&&Object(Te.jsx)(He.a,{title:r("resources.quarantine_media.action.create",{_:"resources.quarantine_media.action.create"}),children:Object(Te.jsx)("div",{children:Object(Te.jsx)(G.a,{onClick:function(){c({payload:{data:t}},{onSuccess:function(){n("resources.quarantine_media.action.send_success"),a()},onFailure:function(){return n("resources.quarantine_media.action.send_failure","error")}})},disabled:d,children:Object(Te.jsx)(Xe.a,{})})})})]})},jt=["currentSort","className","resource","filters","displayedFilters","exporter","filterValues","permanentFilter","hasCreate","basePath","selectedIds","onUnselectItems","showFilter","maxResults","total"],bt=function(){return{pathname:"/import_users"}},pt=Object(qe.a)({small:{height:"40px",width:"40px"},large:{height:"120px",width:"120px",float:"right"}}),_t={year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"},ht=function(e){var t=e.currentSort,r=e.className,a=e.resource,n=e.filters,i=e.displayedFilters,o=e.exporter,c=e.filterValues,d=e.permanentFilter,l=(e.hasCreate,e.basePath),u=(e.selectedIds,e.onUnselectItems,e.showFilter),j=e.maxResults,b=e.total,p=Object(g.a)(e,jt);return Object(Te.jsxs)(M.a,Object(m.a)(Object(m.a)({className:r},Object(L.c)(p)),{},{children:[n&&Object(s.cloneElement)(n,{resource:a,showFilter:u,displayedFilters:i,filterValues:c,context:"button"}),Object(Te.jsx)(q.a,{basePath:l}),Object(Te.jsx)(U.a,{disabled:0===b,resource:a,sort:t,filter:Object(m.a)(Object(m.a)({},c),d),exporter:o,maxResults:j}),Object(Te.jsx)(G.a,{component:ge.a,to:bt,label:"CSV Import",children:Object(Te.jsx)(D.a,{style:{transform:"rotate(180deg)",fontSize:"20"}})})]}))};ht.defaultProps={selectedIds:[],onUnselectItems:function(){return null}};var Ot=function(e){return Object(Te.jsx)(W.a,Object(m.a)(Object(m.a)({},e),{},{rowsPerPageOptions:[10,25,50,100,500,1e3]}))},ft=function(e){return Object(Te.jsxs)(Z.a,Object(m.a)(Object(m.a)({},e),{},{children:[Object(Te.jsx)(J.a,{source:"name",alwaysOn:!0}),Object(Te.jsx)(H.a,{source:"guests",alwaysOn:!0}),Object(Te.jsx)(H.a,{label:"resources.users.fields.show_deactivated",source:"deactivated",alwaysOn:!0})]}))},gt=function(e){return Object(Te.jsxs)(s.Fragment,{children:[Object(Te.jsx)(Ve,Object(m.a)({},e)),Object(Te.jsx)(K.a,Object(m.a)(Object(m.a)({},e),{},{label:"resources.users.action.erase",confirmTitle:"resources.users.helper.erase",mutationMode:"pessimistic"}))]})},vt=function(e){var t=e.source,r=e.className,s=e.record,a=void 0===s?{}:s;return Object(Te.jsx)(v.a,{src:a[t],className:r})},xt=function(e){var t=pt();return Object(Te.jsx)(Q.a,Object(m.a)(Object(m.a)({},e),{},{filters:Object(Te.jsx)(ft,{}),filterDefaultValues:{guests:!0,deactivated:!1},sort:{field:"name",order:"ASC"},actions:Object(Te.jsx)(ht,{maxResults:1e4}),bulkActionButtons:Object(Te.jsx)(gt,{}),pagination:Object(Te.jsx)(Ot,{}),children:Object(Te.jsxs)($.a,{rowClick:"edit",children:[Object(Te.jsx)(vt,{source:"avatar_src",className:t.small,sortBy:"avatar_url"}),Object(Te.jsx)(Y.a,{source:"id",sortBy:"name"}),Object(Te.jsx)(Y.a,{source:"displayname"}),Object(Te.jsx)(X.a,{source:"is_guest"}),Object(Te.jsx)(X.a,{source:"admin"}),Object(Te.jsx)(X.a,{source:"deactivated"}),Object(Te.jsx)(ee.a,{source:"creation_ts",label:"resources.users.fields.creation_ts_ms",showTime:!0,options:_t})]})}))},yt=[Object(te.g)(),Object(te.c)(253),Object(te.f)(/^[a-z0-9._=\-/]+$/,"synapseadmin.users.invalid_user_id")],wt=[Object(te.g)(),Object(te.c)(255)];function St(){var e=localStorage.getItem("home_server");return{id:"@"+Array(8).fill("0123456789abcdefghijklmnopqrstuvwxyz").map((function(e){return e[Math.floor(crypto.getRandomValues(new Uint32Array(1))[0]/4294967296*e.length)]})).join("")+":"+e,password:Array(20).fill("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz~!@-#$").map((function(e){return e[Math.floor(crypto.getRandomValues(new Uint32Array(1))[0]/4294967296*e.length)]})).join("")}}var kt=function(e){var t=Object(re.a)();return Object(Te.jsxs)(se.a,Object(m.a)(Object(m.a)({},e),{},{children:[Object(Te.jsx)(ae.a,{submitOnEnter:!0,disabled:e.pristine}),Object(Te.jsx)(ne.a,{label:"resources.users.action.erase",confirmTitle:t("resources.users.helper.erase",{smart_count:1}),mutationMode:"pessimistic"}),Object(Te.jsx)(Fe,{})]}))},It=function(e){return Object(Te.jsx)(ie.a,Object(m.a)(Object(m.a)({},e),{},{children:Object(Te.jsxs)(oe.a,{children:[Object(Te.jsx)(ce.a,{source:"id",autoComplete:"off",validate:yt}),Object(Te.jsx)(ce.a,{source:"displayname",validate:Object(te.c)(256)}),Object(Te.jsx)(de.a,{source:"password",autoComplete:"new-password",validate:Object(te.c)(512)}),Object(Te.jsx)(H.a,{source:"admin"}),Object(Te.jsx)(le.a,{source:"threepids",children:Object(Te.jsxs)(ue.a,{disableReordering:!0,children:[Object(Te.jsx)(me.a,{source:"medium",choices:[{id:"email",name:"resources.users.email"},{id:"msisdn",name:"resources.users.msisdn"}],validate:Object(te.g)()}),Object(Te.jsx)(ce.a,{source:"address",validate:wt})]})}),Object(Te.jsx)(le.a,{source:"external_ids",label:"synapseadmin.users.tabs.sso",children:Object(Te.jsxs)(ue.a,{disableReordering:!0,children:[Object(Te.jsx)(ce.a,{source:"auth_provider",validate:Object(te.g)()}),Object(Te.jsx)(ce.a,{source:"external_id",label:"resources.users.fields.id",validate:Object(te.g)()})]})})]})}))},Pt=function(e){var t=e.record,r=Object(re.a)();return Object(Te.jsxs)("span",{children:[r("resources.users.name",{smart_count:1})," ",t?'"'.concat(t.displayname,'"'):""]})},Dt=function(e){var t=pt(),r=Object(re.a)();return Object(Te.jsx)(je.a,Object(m.a)(Object(m.a)({},e),{},{title:Object(Te.jsx)(Pt,{}),children:Object(Te.jsxs)(be.a,{toolbar:Object(Te.jsx)(kt,{}),children:[Object(Te.jsxs)(pe.a,{label:r("resources.users.name",{smart_count:1}),icon:Object(Te.jsx)(z.a,{}),children:[Object(Te.jsx)(vt,{source:"avatar_src",sortable:!1,className:t.large}),Object(Te.jsx)(ce.a,{source:"id",disabled:!0}),Object(Te.jsx)(ce.a,{source:"displayname"}),Object(Te.jsx)(de.a,{source:"password",autoComplete:"new-password"}),Object(Te.jsx)(H.a,{source:"admin"}),Object(Te.jsx)(H.a,{source:"deactivated",helperText:"resources.users.helper.deactivate"}),Object(Te.jsx)(ee.a,{source:"creation_ts_ms",showTime:!0,options:_t}),Object(Te.jsx)(Y.a,{source:"consent_version"})]}),Object(Te.jsx)(pe.a,{label:"resources.users.threepid",icon:Object(Te.jsx)(S.a,{}),path:"threepid",children:Object(Te.jsx)(le.a,{source:"threepids",children:Object(Te.jsxs)(ue.a,{disableReordering:!0,children:[Object(Te.jsx)(me.a,{source:"medium",choices:[{id:"email",name:"resources.users.email"},{id:"msisdn",name:"resources.users.msisdn"}]}),Object(Te.jsx)(ce.a,{source:"address"})]})})}),Object(Te.jsx)(pe.a,{label:"synapseadmin.users.tabs.sso",icon:Object(Te.jsx)(y.a,{}),path:"sso",children:Object(Te.jsx)(le.a,{source:"external_ids",label:!1,children:Object(Te.jsxs)(ue.a,{disableReordering:!0,children:[Object(Te.jsx)(ce.a,{source:"auth_provider",validate:Object(te.g)()}),Object(Te.jsx)(ce.a,{source:"external_id",label:"resources.users.fields.id",validate:Object(te.g)()})]})})}),Object(Te.jsx)(pe.a,{label:r("resources.devices.name",{smart_count:2}),icon:Object(Te.jsx)(I.a,{}),path:"devices",children:Object(Te.jsx)(_e.a,{reference:"devices",target:"user_id",addLabel:!1,children:Object(Te.jsxs)($.a,{style:{width:"100%"},children:[Object(Te.jsx)(Y.a,{source:"device_id",sortable:!1}),Object(Te.jsx)(Y.a,{source:"display_name",sortable:!1}),Object(Te.jsx)(Y.a,{source:"last_seen_ip",sortable:!1}),Object(Te.jsx)(ee.a,{source:"last_seen_ts",showTime:!0,options:_t,sortable:!1}),Object(Te.jsx)(Je,{})]})})}),Object(Te.jsx)(pe.a,{label:"resources.connections.name",icon:Object(Te.jsx)(V.a,{}),path:"connections",children:Object(Te.jsx)(he.a,{reference:"connections",source:"id",addLabel:!1,link:!1,children:Object(Te.jsx)(Oe.a,{source:"devices[].sessions[0].connections",label:"resources.connections.name",children:Object(Te.jsxs)($.a,{style:{width:"100%"},children:[Object(Te.jsx)(Y.a,{source:"ip",sortable:!1}),Object(Te.jsx)(ee.a,{source:"last_seen",showTime:!0,options:_t,sortable:!1}),Object(Te.jsx)(Y.a,{source:"user_agent",sortable:!1,style:{width:"100%"}})]})})})}),Object(Te.jsx)(pe.a,{label:r("resources.users_media.name",{smart_count:2}),icon:Object(Te.jsx)(R.a,{}),path:"media",children:Object(Te.jsx)(_e.a,{reference:"users_media",target:"user_id",addLabel:!1,pagination:Object(Te.jsx)(Ot,{}),perPage:50,sort:{field:"created_ts",order:"DESC"},children:Object(Te.jsxs)($.a,{style:{width:"100%"},children:[Object(Te.jsx)(ee.a,{source:"created_ts",showTime:!0,options:_t}),Object(Te.jsx)(ee.a,{source:"last_access_ts",showTime:!0,options:_t}),Object(Te.jsx)(Y.a,{source:"media_id"}),Object(Te.jsx)(fe.a,{source:"media_length"}),Object(Te.jsx)(Y.a,{source:"media_type"}),Object(Te.jsx)(Y.a,{source:"upload_name"}),Object(Te.jsx)(Y.a,{source:"quarantined_by"}),Object(Te.jsx)(mt,{label:"resources.quarantine_media.action.name"}),Object(Te.jsx)(ut,{label:"resources.users_media.fields.safe_from_quarantine"}),Object(Te.jsx)(ne.a,{mutationMode:"pessimistic",redirect:!1})]})})}),Object(Te.jsx)(pe.a,{label:r("resources.rooms.name",{smart_count:2}),icon:Object(Te.jsx)(B.a,{}),path:"rooms",children:Object(Te.jsx)(_e.a,{reference:"joined_rooms",target:"user_id",addLabel:!1,children:Object(Te.jsxs)($.a,{style:{width:"100%"},rowClick:function(e,t,r){return"/rooms/"+e+"/show"},children:[Object(Te.jsx)(Y.a,{source:"id",sortable:!1,label:"resources.rooms.fields.room_id"}),Object(Te.jsx)(he.a,{label:"resources.rooms.fields.name",source:"id",reference:"rooms",sortable:!1,link:"",children:Object(Te.jsx)(Y.a,{source:"name",sortable:!1})})]})})}),Object(Te.jsx)(pe.a,{label:r("resources.pushers.name",{smart_count:2}),icon:Object(Te.jsx)(C.a,{}),path:"pushers",children:Object(Te.jsx)(_e.a,{reference:"pushers",target:"user_id",addLabel:!1,children:Object(Te.jsxs)($.a,{style:{width:"100%"},children:[Object(Te.jsx)(Y.a,{source:"kind",sortable:!1}),Object(Te.jsx)(Y.a,{source:"app_display_name",sortable:!1}),Object(Te.jsx)(Y.a,{source:"app_id",sortable:!1}),Object(Te.jsx)(Y.a,{source:"data.url",sortable:!1}),Object(Te.jsx)(Y.a,{source:"device_display_name",sortable:!1}),Object(Te.jsx)(Y.a,{source:"lang",sortable:!1}),Object(Te.jsx)(Y.a,{source:"profile_tag",sortable:!1}),Object(Te.jsx)(Y.a,{source:"pushkey",sortable:!1})]})})})]})}))},At=r(10),Ct=r(767),Et=r(787),Rt=r(754),Tt=r(755),zt=r(78),Ft=r(14),Vt=r.n(Ft),Nt=r(36),Bt=r(786),Mt=r(418),Lt=r.n(Mt),qt=r(285),Ut=r.n(qt),Gt=r(415),Wt=r.n(Gt),Zt=r(229),Jt=r.n(Zt),Ht=r(230),Kt=r.n(Ht),Qt=r(227),$t=r.n(Qt),Yt=r(417),Xt=r.n(Yt),er=r(129),tr=r.n(er),rr=["roomDirectoryFilters","dispatch"],sr=Object(qe.a)({small:{height:"40px",width:"40px"}}),ar=function(e){return Object(Te.jsx)(W.a,Object(m.a)(Object(m.a)({},e),{},{rowsPerPageOptions:[100,500,1e3,2e3]}))},nr=function(e){var t=Object(re.a)();return Object(Te.jsx)(ne.a,Object(m.a)(Object(m.a)({},e),{},{label:"resources.room_directory.action.erase",redirect:!1,mutationMode:"pessimistic",confirmTitle:t("resources.room_directory.action.title",{smart_count:1}),confirmContent:t("resources.room_directory.action.content",{smart_count:1}),resource:"room_directory",icon:Object(Te.jsx)(tr.a,{})}))},ir=function(e){return Object(Te.jsx)(K.a,Object(m.a)(Object(m.a)({},e),{},{label:"resources.room_directory.action.erase",mutationMode:"pessimistic",confirmTitle:"resources.room_directory.action.title",confirmContent:"resources.room_directory.action.content",resource:"room_directory",icon:Object(Te.jsx)(tr.a,{})}))},or=function(e){var t=e.selectedIds,r=Object(xe.a)(),s=Object(Ne.a)(),a=Object(we.a)(),n=Object(Se.a)(),i=Object(ve.a)(n,2),o=i[0],c=i[1].loading;return Object(Te.jsx)(G.a,{label:"resources.room_directory.action.create",onClick:function(e){o({type:"createMany",resource:"room_directory",payload:{ids:t,data:{}}},{onSuccess:function(e){e.data;r("resources.room_directory.action.send_success"),a("rooms"),s()},onFailure:function(e){return r("resources.room_directory.action.send_failure","error")}})},disabled:c,children:Object(Te.jsx)(tr.a,{})})},cr=function(e){var t=e.record,r=Object(xe.a)(),s=Object(Ne.a)(),a=Object(ye.a)("room_directory"),n=Object(ve.a)(a,2),i=n[0],o=n[1].loading;return Object(Te.jsx)(G.a,{label:"resources.room_directory.action.create",onClick:function(e){i({payload:{data:{id:t.id}}},{onSuccess:function(e){e.data;r("resources.room_directory.action.send_success"),s()},onFailure:function(e){return r("resources.room_directory.action.send_failure","error")}})},disabled:o,children:Object(Te.jsx)(tr.a,{})})},dr=function(e){return Object(Te.jsx)(s.Fragment,{children:Object(Te.jsx)(ir,Object(m.a)({},e))})},lr=function(e){var t=e.source,r=e.className,s=e.record,a=void 0===s?{}:s;return Object(Te.jsx)(v.a,{src:a[t],className:r})},ur=function(e){var t=Object.assign({},e),r=Object(re.a)();return Object(Te.jsxs)(Z.a,Object(m.a)(Object(m.a)({},t),{},{children:[Object(Te.jsx)(Bt.a,{label:r("resources.rooms.fields.room_id"),source:"room_id",defaultValue:!1,style:{marginBottom:8}}),Object(Te.jsx)(Bt.a,{label:r("resources.rooms.fields.topic"),source:"topic",defaultValue:!1,style:{marginBottom:8}}),Object(Te.jsx)(Bt.a,{label:r("resources.rooms.fields.canonical_alias"),source:"canonical_alias",defaultValue:!1,style:{marginBottom:8}})]}))};var mr=Object(At.c)((function(e){return{roomDirectoryFilters:e.admin.resources.room_directory.list.params.displayedFilters}}))((function(e){var t=e.roomDirectoryFilters,r=(e.dispatch,Object(g.a)(e,rr)),s=sr(),a=Object(re.a)(),n=t,i=!(!n||!n.room_id),o=!(!n||!n.topic),c=!(!n||!n.canonical_alias);return Object(Te.jsx)(Q.a,Object(m.a)(Object(m.a)({},r),{},{pagination:Object(Te.jsx)(ar,{}),bulkActionButtons:Object(Te.jsx)(dr,{}),filters:Object(Te.jsx)(ur,{}),perPage:100,children:Object(Te.jsxs)($.a,{rowClick:function(e,t,r){return"/rooms/"+e+"/show"},children:[Object(Te.jsx)(lr,{source:"avatar_src",sortable:!1,className:s.small,label:a("resources.rooms.fields.avatar")}),Object(Te.jsx)(Y.a,{source:"name",sortable:!1,label:a("resources.rooms.fields.name")}),i&&Object(Te.jsx)(Y.a,{source:"room_id",sortable:!1,label:a("resources.rooms.fields.room_id")}),c&&Object(Te.jsx)(Y.a,{source:"canonical_alias",sortable:!1,label:a("resources.rooms.fields.canonical_alias")}),o&&Object(Te.jsx)(Y.a,{source:"topic",sortable:!1,label:a("resources.rooms.fields.topic")}),Object(Te.jsx)(fe.a,{source:"num_joined_members",sortable:!1,label:a("resources.rooms.fields.joined_members")}),Object(Te.jsx)(X.a,{source:"world_readable",sortable:!1,label:a("resources.room_directory.fields.world_readable")}),Object(Te.jsx)(X.a,{source:"guest_can_join",sortable:!1,label:a("resources.room_directory.fields.guest_can_join")})]})}))})),jr=["roomFilters","dispatch"],br={year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"},pr=Object(qe.a)((function(e){return{helper_forward_extremities:{fontFamily:"Roboto, Helvetica, Arial, sans-serif",margin:"0.5em"}}})),_r=function(e){return Object(Te.jsx)(W.a,Object(m.a)(Object(m.a)({},e),{},{rowsPerPageOptions:[10,25,50,100,500,1e3]}))},hr=function(e){var t=e.source,r=e.record,s=void 0===r?{}:r,a=e.emptyText,n=Object(re.a)(),i=Vt()(s,t),o=!1===i?"ra.boolean.false":"ra.boolean.true";return!1===i||!0===i?Object(Te.jsx)(Nt.a,{component:"span",variant:"body2",children:Object(Te.jsx)(He.a,{title:n(o,{_:o}),children:!0===i?Object(Te.jsx)(Ut.a,{"data-testid":"true",htmlColor:"limegreen"}):Object(Te.jsx)(Wt.a,{"data-testid":"false",color:"error"})})}):Object(Te.jsx)(Nt.a,{component:"span",variant:"body2",children:a})},Or=function(e){var t=e.record,r=Object(re.a)(),s="";return t&&(s=""!==t.name?t.name:t.id),Object(Te.jsxs)("span",{children:[r("resources.rooms.name",1)," ",s]})},fr=function(e){var t=e.basePath,r=e.data,s=e.resource,a="";return r&&(a=r.public),Object(Te.jsxs)(M.a,{children:[!1===a&&Object(Te.jsx)(cr,{record:r}),!0===a&&Object(Te.jsx)(nr,{record:r}),Object(Te.jsx)(ne.a,{basePath:t,record:r,resource:s,mutationMode:"pessimistic",confirmTitle:"resources.rooms.action.erase.title",confirmContent:"resources.rooms.action.erase.content"})]})},gr=function(e){var t=pr({props:e}),r=Object(re.a)();return Object(Te.jsx)(Ct.a,Object(m.a)(Object(m.a)({},e),{},{actions:Object(Te.jsx)(fr,{}),title:Object(Te.jsx)(Or,{}),children:Object(Te.jsxs)(Et.a,{children:[Object(Te.jsxs)(Rt.a,{label:"synapseadmin.rooms.tabs.basic",icon:Object(Te.jsx)(B.a,{}),children:[Object(Te.jsx)(Y.a,{source:"room_id"}),Object(Te.jsx)(Y.a,{source:"name"}),Object(Te.jsx)(Y.a,{source:"canonical_alias"}),Object(Te.jsx)(he.a,{source:"creator",reference:"users",children:Object(Te.jsx)(Y.a,{source:"id"})})]}),Object(Te.jsxs)(Rt.a,{label:"synapseadmin.rooms.tabs.detail",icon:Object(Te.jsx)(Jt.a,{}),path:"detail",children:[Object(Te.jsx)(Y.a,{source:"joined_members"}),Object(Te.jsx)(Y.a,{source:"joined_local_members"}),Object(Te.jsx)(Y.a,{source:"joined_local_devices"}),Object(Te.jsx)(Y.a,{source:"state_events"}),Object(Te.jsx)(Y.a,{source:"version"}),Object(Te.jsx)(Y.a,{source:"encryption",emptyText:r("resources.rooms.enums.unencrypted")})]}),Object(Te.jsx)(Rt.a,{label:"synapseadmin.rooms.tabs.members",icon:Object(Te.jsx)(Kt.a,{}),children:Object(Te.jsx)(_e.a,{reference:"room_members",target:"room_id",addLabel:!1,children:Object(Te.jsxs)($.a,{style:{width:"100%"},rowClick:function(e,t,r){return"/users/"+e},children:[Object(Te.jsx)(Y.a,{source:"id",sortable:!1,label:"resources.users.fields.id"}),Object(Te.jsx)(he.a,{label:"resources.users.fields.displayname",source:"id",reference:"users",sortable:!1,link:"",children:Object(Te.jsx)(Y.a,{source:"displayname",sortable:!1})})]})})}),Object(Te.jsxs)(Rt.a,{label:"synapseadmin.rooms.tabs.permission",icon:Object(Te.jsx)($t.a,{}),path:"permission",children:[Object(Te.jsx)(X.a,{source:"federatable"}),Object(Te.jsx)(X.a,{source:"public"}),Object(Te.jsx)(Tt.a,{source:"join_rules",choices:[{id:"public",name:"resources.rooms.enums.join_rules.public"},{id:"knock",name:"resources.rooms.enums.join_rules.knock"},{id:"invite",name:"resources.rooms.enums.join_rules.invite"},{id:"private",name:"resources.rooms.enums.join_rules.private"}]}),Object(Te.jsx)(Tt.a,{source:"guest_access",choices:[{id:"can_join",name:"resources.rooms.enums.guest_access.can_join"},{id:"forbidden",name:"resources.rooms.enums.guest_access.forbidden"}]}),Object(Te.jsx)(Tt.a,{source:"history_visibility",choices:[{id:"invited",name:"resources.rooms.enums.history_visibility.invited"},{id:"joined",name:"resources.rooms.enums.history_visibility.joined"},{id:"shared",name:"resources.rooms.enums.history_visibility.shared"},{id:"world_readable",name:"resources.rooms.enums.history_visibility.world_readable"}]})]}),Object(Te.jsx)(Rt.a,{label:r("resources.room_state.name",{smart_count:2}),icon:Object(Te.jsx)(Xt.a,{}),path:"state",children:Object(Te.jsx)(_e.a,{reference:"room_state",target:"room_id",addLabel:!1,children:Object(Te.jsxs)($.a,{style:{width:"100%"},children:[Object(Te.jsx)(Y.a,{source:"type",sortable:!1}),Object(Te.jsx)(ee.a,{source:"origin_server_ts",showTime:!0,options:br,sortable:!1}),Object(Te.jsx)(Y.a,{source:"content",sortable:!1}),Object(Te.jsx)(he.a,{source:"sender",reference:"users",sortable:!1,children:Object(Te.jsx)(Y.a,{source:"id"})})]})})}),Object(Te.jsxs)(Rt.a,{label:"resources.forward_extremities.name",icon:Object(Te.jsx)(Lt.a,{}),path:"forward_extremities",children:[Object(Te.jsx)("div",{className:t.helper_forward_extremities,children:r("resources.rooms.helper.forward_extremities")}),Object(Te.jsx)(_e.a,{reference:"forward_extremities",target:"room_id",addLabel:!1,children:Object(Te.jsxs)($.a,{style:{width:"100%"},children:[Object(Te.jsx)(Y.a,{source:"id",sortable:!1}),Object(Te.jsx)(ee.a,{source:"received_ts",showTime:!0,options:br,sortable:!1}),Object(Te.jsx)(fe.a,{source:"depth",sortable:!1}),Object(Te.jsx)(Y.a,{source:"state_group",sortable:!1})]})})]})]})}))},vr=function(e){return Object(Te.jsxs)(s.Fragment,{children:[Object(Te.jsx)(or,Object(m.a)({},e)),Object(Te.jsx)(ir,Object(m.a)({},e)),Object(Te.jsx)(K.a,Object(m.a)(Object(m.a)({},e),{},{confirmTitle:"resources.rooms.action.erase.title",confirmContent:"resources.rooms.action.erase.content",mutationMode:"pessimistic"}))]})},xr=function(e){var t=Object.assign({},e),r=Object(re.a)();return Object(Te.jsxs)(Z.a,Object(m.a)(Object(m.a)({},t),{},{children:[Object(Te.jsx)(J.a,{source:"search_term",alwaysOn:!0}),Object(Te.jsx)(Bt.a,{label:r("resources.rooms.fields.joined_local_members"),source:"joined_local_members",defaultValue:!1,style:{marginBottom:8}}),Object(Te.jsx)(Bt.a,{label:r("resources.rooms.fields.state_events"),source:"state_events",defaultValue:!1,style:{marginBottom:8}}),Object(Te.jsx)(Bt.a,{label:r("resources.rooms.fields.version"),source:"version",defaultValue:!1,style:{marginBottom:8}}),Object(Te.jsx)(Bt.a,{label:r("resources.rooms.fields.federatable"),source:"federatable",defaultValue:!1,style:{marginBottom:8}})]}))},yr=function(e){var t=e.source,r=Object(zt.b)(e);return Object(Te.jsx)("span",{children:r[t]||r.canonical_alias||r.id})};var wr=Object(At.c)((function(e){return{roomFilters:e.admin.resources.rooms.list.params.displayedFilters}}))((function(e){var t=e.roomFilters,r=(e.dispatch,Object(g.a)(e,jr)),s=t,a=!(!s||!s.joined_local_members),n=!(!s||!s.state_events),i=!(!s||!s.version),o=!(!s||!s.federatable);return Object(Te.jsx)(Q.a,Object(m.a)(Object(m.a)({},r),{},{pagination:Object(Te.jsx)(_r,{}),sort:{field:"name",order:"ASC"},filters:Object(Te.jsx)(xr,{}),bulkActionButtons:Object(Te.jsx)(vr,{}),children:Object(Te.jsxs)($.a,{rowClick:"show",children:[Object(Te.jsx)(hr,{source:"is_encrypted",sortBy:"encryption",label:Object(Te.jsx)(Ut.a,{})}),Object(Te.jsx)(yr,{source:"name"}),Object(Te.jsx)(Y.a,{source:"joined_members"}),a&&Object(Te.jsx)(Y.a,{source:"joined_local_members"}),n&&Object(Te.jsx)(Y.a,{source:"state_events"}),i&&Object(Te.jsx)(Y.a,{source:"version"}),o&&Object(Te.jsx)(X.a,{source:"federatable"}),Object(Te.jsx)(X.a,{source:"public"})]})}))})),Sr={year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"},kr=function(e){return Object(Te.jsx)(W.a,Object(m.a)(Object(m.a)({},e),{},{rowsPerPageOptions:[10,25,50,100,500,1e3]}))},Ir=function(e){var t=Object(re.a)();return Object(Te.jsx)(Ct.a,Object(m.a)(Object(m.a)({},e),{},{children:Object(Te.jsxs)(Et.a,{children:[Object(Te.jsxs)(Rt.a,{label:t("synapseadmin.reports.tabs.basic",{smart_count:1}),icon:Object(Te.jsx)(B.a,{}),children:[Object(Te.jsx)(ee.a,{source:"received_ts",showTime:!0,options:Sr,sortable:!0}),Object(Te.jsx)(he.a,{source:"user_id",reference:"users",children:Object(Te.jsx)(Y.a,{source:"id"})}),Object(Te.jsx)(fe.a,{source:"score"}),Object(Te.jsx)(Y.a,{source:"reason"}),Object(Te.jsx)(Y.a,{source:"name"}),Object(Te.jsx)(Y.a,{source:"canonical_alias",label:"resources.rooms.fields.canonical_alias"}),Object(Te.jsx)(he.a,{source:"room_id",reference:"rooms",link:"show",label:"resources.rooms.fields.room_id",children:Object(Te.jsx)(Y.a,{source:"id"})})]}),Object(Te.jsxs)(Rt.a,{label:"synapseadmin.reports.tabs.detail",icon:Object(Te.jsx)(Jt.a,{}),path:"detail",children:[Object(Te.jsx)(ee.a,{source:"event_json.origin_server_ts",showTime:!0,options:Sr,sortable:!0}),Object(Te.jsx)(he.a,{source:"sender",reference:"users",children:Object(Te.jsx)(Y.a,{source:"id"})}),Object(Te.jsx)(Y.a,{source:"event_id"}),Object(Te.jsx)(Y.a,{source:"event_json.origin"}),Object(Te.jsx)(Y.a,{source:"event_json.type"}),Object(Te.jsx)(Y.a,{source:"event_json.content.msgtype"}),Object(Te.jsx)(Y.a,{source:"event_json.content.body"}),Object(Te.jsx)(Y.a,{source:"event_json.content.format"}),Object(Te.jsx)(Y.a,{source:"event_json.content.formatted_body"}),Object(Te.jsx)(Y.a,{source:"event_json.content.algorithm"}),Object(Te.jsx)(Y.a,{source:"event_json.content.device_id",label:"resources.users.fields.device_id"})]})]})}))},Pr=function(e){var t=Object.assign({},e);return Object(Te.jsx)(Q.a,Object(m.a)(Object(m.a)({},t),{},{pagination:Object(Te.jsx)(kr,{}),sort:{field:"received_ts",order:"DESC"},bulkActionButtons:!1,children:Object(Te.jsxs)($.a,{rowClick:"show",children:[Object(Te.jsx)(Y.a,{source:"id",sortable:!1}),Object(Te.jsx)(ee.a,{source:"received_ts",showTime:!0,options:Sr,sortable:!0}),Object(Te.jsx)(Y.a,{sortable:!1,source:"user_id"}),Object(Te.jsx)(Y.a,{sortable:!1,source:"name"}),Object(Te.jsx)(Y.a,{sortable:!1,source:"score"})]})}))},Dr=r(756),Ar=r(196),Cr=r(373),Er=r(757),Rr=r(235),Tr=r(27),zr=r(288),Fr=r(744),Vr=r(691),Nr=r(784),Br=r(758),Mr=r(442),Lr=r(679),qr=["meta","input"],Ur=Object(qe.a)((function(e){return{main:{display:"flex",flexDirection:"column",minHeight:"calc(100vh - 1em)",alignItems:"center",justifyContent:"flex-start",background:"url(./images/floating-cogs.svg)",backgroundColor:"#f9f9f9",backgroundRepeat:"no-repeat",backgroundSize:"cover"},card:{minWidth:"30em",marginTop:"6em",marginBottom:"6em"},avatar:{margin:"1em",display:"flex",justifyContent:"center"},icon:{backgroundColor:e.palette.secondary.main},hint:{marginTop:"1em",display:"flex",justifyContent:"center",color:e.palette.grey[500]},form:{padding:"0 1em 1em 1em"},input:{marginTop:"1em"},actions:{padding:"0 1em 1em 1em"},serverVersion:{color:"#9e9e9e",fontFamily:"Roboto, Helvetica, Arial, sans-serif",marginBottom:"1em",marginLeft:"0.5em"}}})),Gr=function(e){var t=e.theme,r=Ur({theme:t}),a=Object(Dr.a)(),n=Object(xe.a)(),i=Object(s.useState)(!1),o=Object(ve.a)(i,2),c=o[0],d=o[1],u=Object(s.useState)(!0),j=Object(ve.a)(u,2),b=j[0],p=j[1],_=Object(Ar.a)(),h=Object(Cr.a)(),O=Object(re.a)(),f=localStorage.getItem("base_url"),x=Object({NODE_ENV:"production",PUBLIC_URL:".",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0,REACT_APP_VERSION:""}).REACT_APP_SERVER,y=Object(s.useState)(""),w=Object(ve.a)(y,2),S=w[0],k=w[1],I=/\?loginToken=([a-zA-Z0-9_-]+)/.exec(window.location.href);if(I){var P=I[1];console.log("SSO token is",P),window.history.replaceState({},"",window.location.href.replace(I[0],"#").split("#")[0]);var D=localStorage.getItem("sso_base_url");if(localStorage.removeItem("sso_base_url"),D){var A={base_url:D,username:null,password:null,loginToken:P};console.log("Base URL is:",D),console.log("SSO Token is:",P),console.log("Let's try token login..."),a(A).catch((function(e){alert("string"===typeof e?e:"undefined"!==typeof e&&e.message?e.message:"ra.auth.sign_in_error"),console.error(e)}))}}var C=function(e){var t=e.meta,r=(t=void 0===t?{}:t).touched,s=t.error,a=Object.assign({},e.input),n=Object(g.a)(e,qr);return Object(Te.jsx)(zr.a,Object(m.a)(Object(m.a)(Object(m.a)({error:!(!r||!s),helperText:r&&s},a),n),{},{fullWidth:!0}))},E=function(){localStorage.setItem("sso_base_url",S);var e="".concat(S,"/_matrix/client/r0/login/sso/redirect?redirectUrl=").concat(encodeURIComponent(window.location.href));window.location.href=e},R=function(e){var t=e.formData,a=Object(Tr.e)(),n=Object(s.useState)(""),i=Object(ve.a)(n,2),o=i[0],d=i[1];return Object(s.useEffect)((function(e){if(t.base_url&&t.base_url.match(/^(http|https):\/\/[a-zA-Z0-9\-.]+$/)){var r="".concat(t.base_url,"/_synapse/admin/v1/server_version");l.a.fetchJson(r,{method:"GET"}).then((function(e){var t=e.json;d("".concat(O("synapseadmin.auth.server_version")," ").concat(t.server_version))})).catch((function(e){d("")}));var s="".concat(t.base_url,"/_matrix/client/r0/login"),a=!1,n=!1;l.a.fetchJson(s,{method:"GET"}).then((function(e){e.json.flows.forEach((function(e){"m.login.password"===e.type?a=!0:"m.login.sso"===e.type&&(n=!0)})),p(a),k(n?t.base_url:"")})).catch((function(e){k("")}))}}),[t.base_url]),Object(Te.jsxs)("div",{children:[Object(Te.jsx)("div",{className:r.input,children:Object(Te.jsx)(ce.a,{autoFocus:!0,name:"username",component:C,label:O("ra.auth.username"),disabled:c||!b,onBlur:function(e){if(!t.base_url&&!x){var r=function(e){if(!e)return null;var t=e.match(/@[a-zA-Z0-9._=\-/]+:([a-zA-Z0-9\-.]+\.[a-zA-Z]+)/);return t?t[1]:null}(t.username),s="https://".concat(r,"/.well-known/matrix/client");r&&l.a.fetchJson(s,{method:"GET"}).then((function(e){var t=e.json;a.change("base_url",t["m.homeserver"].base_url)})).catch((function(e){a.change("base_url","https://".concat(r))}))}},resettable:!0,fullWidth:!0})}),Object(Te.jsx)("div",{className:r.input,children:Object(Te.jsx)(de.a,{name:"password",component:C,label:O("ra.auth.password"),type:"password",disabled:c||!b,resettable:!0,fullWidth:!0})}),Object(Te.jsx)("div",{className:r.input,children:Object(Te.jsx)(ce.a,{name:"base_url",component:C,label:O("synapseadmin.auth.base_url"),disabled:x||c,resettable:!0,fullWidth:!0})}),Object(Te.jsx)("div",{className:r.serverVersion,children:o})]})};return Object(Te.jsx)(Tr.b,{initialValues:{base_url:x||f},onSubmit:function(e){d(!0),a(e).catch((function(e){d(!1),n("string"===typeof e?e:"undefined"!==typeof e&&e.message?e.message:"ra.auth.sign_in_error","warning")}))},validate:function(e){var t={};return e.username||(t.username=O("ra.validation.required")),e.password||(t.password=O("ra.validation.required")),e.base_url?e.base_url.match(/^(http|https):\/\//)?e.base_url.match(/^(http|https):\/\/[a-zA-Z0-9\-.]+(:\d{1,5})?[^?&\s]*$/)||(t.base_url=O("synapseadmin.auth.url_error")):t.base_url=O("synapseadmin.auth.protocol_error"):t.base_url=O("ra.validation.required"),t},render:function(e){var t=e.handleSubmit;return Object(Te.jsx)("form",{onSubmit:t,noValidate:!0,children:Object(Te.jsxs)("div",{className:r.main,children:[Object(Te.jsxs)(Fr.a,{className:r.card,children:[Object(Te.jsx)("div",{className:r.avatar,children:Object(Te.jsx)(v.a,{className:r.icon,children:Object(Te.jsx)(nt.a,{})})}),Object(Te.jsx)("div",{className:r.hint,children:O("synapseadmin.auth.welcome")}),Object(Te.jsxs)("div",{className:r.form,children:[Object(Te.jsx)("div",{className:r.input,children:Object(Te.jsxs)(Vr.a,{value:_,onChange:function(e){h(e.target.value)},fullWidth:!0,disabled:c,children:[Object(Te.jsx)(Nr.a,{value:"de",children:"Deutsch"}),Object(Te.jsx)(Nr.a,{value:"en",children:"English"}),Object(Te.jsx)(Nr.a,{value:"zh",children:"\u7b80\u4f53\u4e2d\u6587"})]})}),Object(Te.jsx)(Er.a,{children:function(e){return Object(Te.jsx)(R,Object(m.a)({},e))}})]}),Object(Te.jsxs)(Br.a,{className:r.actions,children:[Object(Te.jsxs)(Mr.a,{variant:"contained",type:"submit",color:"primary",disabled:c||!b,className:r.button,fullWidth:!0,children:[c&&Object(Te.jsx)(Lr.a,{size:25,thickness:2}),O("ra.auth.sign_in")]}),Object(Te.jsxs)(Mr.a,{variant:"contained",color:"secondary",onClick:E,disabled:c||""===S,className:r.button,fullWidth:!0,children:[c&&Object(Te.jsx)(Lr.a,{size:25,thickness:2}),O("synapseadmin.auth.sso_sign_in")]})]})]}),Object(Te.jsx)(Rr.a,{})]})})}})},Wr=r(433),Zr=r.n(Wr),Jr=r(431),Hr=r.n(Jr),Kr=r(685),Qr=["className","exporter","filters","maxResults"],$r=function(e){var t=e.className,r=(e.exporter,e.filters),a=e.maxResults,n=Object(g.a)(e,Qr),i=Object(Kr.a)(),o=i.currentSort,c=i.resource,d=i.displayedFilters,l=i.filterValues,u=i.showFilter,j=i.total;return Object(Te.jsxs)(M.a,Object(m.a)(Object(m.a)({className:t},Object(L.c)(n)),{},{children:[r&&Object(s.cloneElement)(r,{resource:c,showFilter:u,displayedFilters:d,filterValues:l,context:"button"}),Object(Te.jsx)(lt,{}),Object(Te.jsx)(U.a,{disabled:0===j,resource:c,sort:o,filterValues:l,maxResults:a})]}))},Yr=function(e){return Object(Te.jsx)(W.a,Object(m.a)(Object(m.a)({},e),{},{rowsPerPageOptions:[10,25,50,100,500,1e3]}))},Xr=function(e){return Object(Te.jsx)(Z.a,Object(m.a)(Object(m.a)({},e),{},{children:Object(Te.jsx)(J.a,{source:"search_term",alwaysOn:!0})}))},es=function(e){return Object(Te.jsx)(Q.a,Object(m.a)(Object(m.a)({},e),{},{actions:Object(Te.jsx)($r,{}),filters:Object(Te.jsx)(Xr,{}),pagination:Object(Te.jsx)(Yr,{}),sort:{field:"media_length",order:"DESC"},bulkActionButtons:!1,children:Object(Te.jsxs)($.a,{rowClick:function(e,t,r){return"/users/"+e+"/media"},children:[Object(Te.jsx)(Y.a,{source:"user_id",label:"resources.users.fields.id"}),Object(Te.jsx)(Y.a,{source:"displayname",label:"resources.users.fields.displayname"}),Object(Te.jsx)(fe.a,{source:"media_count"}),Object(Te.jsx)(fe.a,{source:"media_length"})]})}))},ts=r(432),rs=r.n(ts),ss=r(75),as=r(419),ns=r(118),is=r(48),os=r.n(is),cs=r(86),ds=r(67),ls=r(286),us=r(761),ms=r(732),js=r(386),bs=r(735),ps=r(775),_s=r(131),hs=r.n(_s),Os=["id","displayname"].sort(),fs=["user_type","guest","admin","deactivated","avatar_url","password"].sort();function gs(e){var t=e.value,r=e.text,s=Object(re.a)();return Object(Te.jsx)("option",{value:t,children:s(r)})}var vs=function(e){var t=Object(s.useState)(null),r=Object(ve.a)(t,2),a=r[0],n=r[1],i=Object(s.useState)(null),o=Object(ve.a)(i,2),c=o[0],d=o[1],l=Object(s.useState)(null),u=Object(ve.a)(l,2),m=u[0],j=u[1],b=Object(s.useState)(!0),p=Object(ve.a)(b,2),_=p[0],h=p[1],O=Object(s.useState)(null),f=Object(ve.a)(O,2),g=f[0],v=f[1],x=Object(s.useState)(null),y=Object(ve.a)(x,2),w=y[0],S=y[1],k=Object(s.useState)(null),I=Object(ve.a)(k,2),P=I[0],D=I[1],A=Object(s.useState)("stop"),C=Object(ve.a)(A,2),E=C[0],R=C[1],T=Object(s.useState)(!0),z=Object(ve.a)(T,2),F=z[0],V=z[1],N=Object(s.useState)("ignore"),B=Object(ve.a)(N,2),M=B[0],L=B[1],q=Object(re.a)(),U=Object(xe.a)(),G=Object(cs.a)(),W=function(){var e=Object(ns.a)(os.a.mark((function e(t){var r,s;return os.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null===g){e.next=2;break}return e.abrupt("return");case 2:if(n(null),d(null),j(null),S(null),!((r=t.target.files?t.target.files[0]:null).size>1e8)){e.next=12;break}return s=q("import_users.errors.unreasonably_big",{size:(r.size/1048576).toFixed(2)}),U(s),d(s),e.abrupt("return");case 12:e.prev=12,Object(ls.parse)(r,{header:!0,skipEmptyLines:!0,complete:function(e){e.error&&d(e.error),Z(e,{setValues:n,setStats:j,setError:d})}}),e.next=20;break;case 16:return e.prev=16,e.t0=e.catch(12),d(!0),e.abrupt("return",null);case 20:case"end":return e.stop()}}),e,null,[[12,16]])})));return function(t){return e.apply(this,arguments)}}(),Z=function(e,t){var r=e.data,s=e.meta,a=e.errors,n=t.setValues,i=t.setStats,o=t.setError,c=Array.from(Os),d=Array.from(fs);if(s.fields.forEach((function(e){c.includes(e)&&(c=c.filter((function(t){return t!==e}))),d.includes(e)&&(d=d.filter((function(t){return t!==e})))})),0!==c.length)return o(q("import_users.error.required_field",{field:c[0]})),!1;var l={user_types:{default:0},is_guest:0,admin:0,deactivated:0,password:0,avatar_url:0,id:0,total:r.length};return r.forEach((function(e,t){void 0===e.user_type||""===e.user_type?l.user_types.default++:l.user_types[e.user_type]+=1,s.fields.includes("name")&&delete e.name,s.fields.includes("user_type")&&delete e.user_type,s.fields.includes("is_admin")&&(e.admin=e.is_admin,delete e.is_admin),["is_guest","admin","deactivated"].forEach((function(r){"true"===e[r]?(l[r]++,e[r]=!0):("false"!==e[r]&&""!==e[r]&&a.push(q("import_users.error.invalid_value",{field:r,row:t})),e[r]=!1)})),void 0!==e.password&&""!==e.password&&l.password++,void 0!==e.avatar_url&&""!==e.avatar_url&&l.avatar_url++,void 0!==e.id&&""!==e.id&&l.id++})),a.length>0&&o(a),i(l),n(r),!0},J=function(){var e=Object(ns.a)(os.a.mark((function e(t){var r;return os.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null===g){e.next=3;break}return U("import_users.errors.already_in_progress"),e.abrupt("return");case 3:return e.next=5,H(G,a,E,F,M,_,v,d);case 5:r=e.sent,S(r),D(Object(ls.unparse)(r.skippedRecords)),console.log("Skipped records:"),console.log(P);case 10:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),H=function(){var e=Object(ns.a)(os.a.mark((function e(t,r,s,a,n,i,o,c){var d,l,u,m,j,b,p,_,h;return os.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:d=[],l=[],u=[],m={toAdmin:0,toGuest:0,toRegular:0,replacedPassword:0},j=0,b=r.length,e.prev=6,o({done:j,limit:b}),p=Object(as.a)(r),e.prev=9,h=os.a.mark((function e(){var c,l,m,b,p;return os.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return c=_.value,l={},m={},"ignore"!==n&&void 0!==c.id&&void 0!==c.password&&!1!==a||(m=St(),"ignore"!==n&&void 0!==c.id&&delete m.id,!1!==a&&void 0!==c.password&&""!==c.password&&delete m.password),Object.assign(l,c),Object.assign(l,m),console.log("will check for existence of record "+JSON.stringify(l)),b=0,p=function e(r){return t.getOne("users",{id:r.id}).then(function(){var t=Object(ns.a)(os.a.mark((function t(a){var i,o;return os.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(console.log("already existed"),"update"!==n&&"skip"!==s){t.next=5;break}d.push(r),t.next=19;break;case 5:if("stop"!==s){t.next=9;break}throw new Error(q("import_users.error.id_exits",{id:r.id}));case 9:if(i=St(),o=Object.assign({},r,{id:i.id}),!(++b>512)){t.next=17;break}console.warn("retry loop got stuck? pathological situation?"),d.push(r),t.next=19;break;case 17:return t.next=19,e(o);case 19:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),function(){var e=Object(ns.a)(os.a.mark((function e(s){return os.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(console.log("OK to create record "+r.id+" ("+r.displayname+")."),i){e.next=4;break}return e.next=4,t.create("users",{data:r});case 4:u.push(r);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())},e.next=11,p(l);case 11:j++,o({done:j,limit:r.length});case 13:case"end":return e.stop()}}),e)})),p.s();case 12:if((_=p.n()).done){e.next=16;break}return e.delegateYield(h(),"t0",14);case 14:e.next=12;break;case 16:e.next=21;break;case 18:e.prev=18,e.t1=e.catch(9),p.e(e.t1);case 21:return e.prev=21,p.f(),e.finish(21);case 24:o(null),e.next=31;break;case 27:e.prev=27,e.t2=e.catch(6),c(q("import_users.error.at_entry",{entry:j+1,message:e.t2.message})),o(null);case 31:return e.abrupt("return",{skippedRecords:d,erroredRecords:l,succeededRecords:u,totalRecordCount:b,changeStats:m,wasDryRun:i});case 32:case"end":return e.stop()}}),e,null,[[6,27],[9,18,21,24]])})));return function(t,r,s,a,n,i,o,c){return e.apply(this,arguments)}}(),K=function(){var e=Object(ns.a)(os.a.mark((function e(t){var r;return os.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null===g){e.next=2;break}return e.abrupt("return");case 2:r=t.target.value,R(r);case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),Q=function(){var e=Object(ns.a)(os.a.mark((function e(t){var r;return os.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null===g){e.next=2;break}return e.abrupt("return");case 2:r=t.target.value,L(r);case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),$=m&&!w&&[Object(Te.jsxs)(hs.a,{children:[Object(Te.jsx)(us.a,{title:q("import_users.cards.importstats.header")}),Object(Te.jsxs)(ms.a,{children:[Object(Te.jsx)("div",{children:q("import_users.cards.importstats.users_total",m.total)}),Object(Te.jsx)("div",{children:q("import_users.cards.importstats.guest_count",m.is_guest)}),Object(Te.jsx)("div",{children:q("import_users.cards.importstats.admin_count",m.admin)})]})]}),Object(Te.jsxs)(hs.a,{children:[Object(Te.jsx)(us.a,{title:q("import_users.cards.ids.header")}),Object(Te.jsxs)(ms.a,{children:[Object(Te.jsx)("div",{children:m.id===m.total?q("import_users.cards.ids.all_ids_present"):q("import_users.cards.ids.count_ids_present",m.id)}),m.id>0?Object(Te.jsx)("div",{children:Object(Te.jsxs)(js.a,{onChange:Q,value:M,enabled:(null!==g).toString(),children:[Object(Te.jsx)(gs,{value:"ignore",text:"import_users.cards.ids.mode.ignore"}),Object(Te.jsx)(gs,{value:"update",text:"import_users.cards.ids.mode.update"})]})}):""]})]}),Object(Te.jsxs)(hs.a,{children:[Object(Te.jsx)(us.a,{title:q("import_users.cards.passwords.header")}),Object(Te.jsxs)(ms.a,{children:[Object(Te.jsx)("div",{children:m.password===m.total?q("import_users.cards.passwords.all_passwords_present"):q("import_users.cards.passwords.count_passwords_present",m.password)}),m.password>0?Object(Te.jsx)("div",{children:Object(Te.jsx)(bs.a,{control:Object(Te.jsx)(ps.a,{checked:F,enabled:(null!==g).toString(),onChange:function(e){null===g&&V(e.target.checked)}}),label:q("import_users.cards.passwords.use_passwords")})}):""]})]})],Y=m&&!w&&Object(Te.jsxs)(hs.a,{children:[Object(Te.jsx)(us.a,{title:q("import_users.cards.conflicts.header")}),Object(Te.jsx)(ms.a,{children:Object(Te.jsx)("div",{children:Object(Te.jsxs)(js.a,{onChange:K,value:E,enabled:(null!==g).toString(),children:[Object(Te.jsx)(gs,{value:"stop",text:"import_users.cards.conflicts.mode.stop"}),Object(Te.jsx)(gs,{value:"skip",text:"import_users.cards.conflicts.mode.skip"})]})})})]}),X=c&&Object(Te.jsxs)(hs.a,{children:[Object(Te.jsx)(us.a,{title:q("import_users.error.error")}),Object(Te.jsx)(ms.a,{children:(Array.isArray(c)?c:[c]).map((function(e){return Object(Te.jsx)("div",{children:e})}))})]}),ee=!w&&Object(Te.jsxs)(hs.a,{children:[Object(Te.jsx)(us.a,{title:q("import_users.cards.upload.header")}),Object(Te.jsxs)(ms.a,{children:[q("import_users.cards.upload.explanation"),Object(Te.jsx)("a",{href:"./data/example.csv",children:"example.csv"}),Object(Te.jsx)("br",{}),Object(Te.jsx)("br",{}),Object(Te.jsx)("input",{type:"file",onChange:W,enabled:(null!==g).toString()})]})]}),te=w&&Object(Te.jsxs)(ms.a,{children:[Object(Te.jsx)(us.a,{title:q("import_users.cards.results.header")}),Object(Te.jsxs)("div",{children:[q("import_users.cards.results.total",w.totalRecordCount),Object(Te.jsx)("br",{}),q("import_users.cards.results.successful",w.succeededRecords.length),Object(Te.jsx)("br",{}),w.skippedRecords.length?[q("import_users.cards.results.skipped",w.skippedRecords.length),Object(Te.jsx)("div",{children:Object(Te.jsx)("button",{onClick:function(){var e=document.createElement("a");console.log(P);var t=new Blob([P],{type:"text/comma-separated-values"});e.href=URL.createObjectURL(t),e.download="skippedRecords.csv",document.body.appendChild(e),e.click()},children:q("import_users.cards.results.download_skipped")})}),Object(Te.jsx)("br",{})]:"",w.erroredRecords.length?[q("import_users.cards.results.skipped",w.erroredRecords.length),Object(Te.jsx)("br",{})]:"",Object(Te.jsx)("br",{}),w.wasDryRun&&[q("import_users.cards.results.simulated_only"),Object(Te.jsx)("br",{})]]})]}),se=!a||0===a.length||w?void 0:Object(Te.jsxs)(Br.a,{children:[Object(Te.jsx)(bs.a,{control:Object(Te.jsx)(ps.a,{checked:_,onChange:function(e){null===g&&h(e.target.checked)},enabled:(null!==g).toString()}),label:q("import_users.cards.startImport.simulate_only")}),Object(Te.jsx)(Mr.a,{size:"large",onClick:J,enabled:(null!==g).toString(),children:q("import_users.cards.startImport.run_import")}),null!==g?Object(Te.jsxs)("div",{children:[g.done," of ",g.limit," done"]}):null]}),ae=[];ee&&ae.push(ee),X&&ae.push(X),Y&&ae.push(Y),$&&ae.push.apply(ae,Object(ss.a)($)),se&&ae.push(se),te&&ae.push(te);var ne=Object(Te.jsx)(Fr.a,{children:ae});return[Object(Te.jsx)(ds.b,{defaultTitle:q("import_users.title")}),ne]},xs={year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"},ys=[Object(te.f)(/^[A-Za-z0-9._~-]{0,64}$/)],ws=[Object(te.e)()],Ss=[Object(te.e)(),Object(te.d)(64)],ks=function(e){var t=new Date(e);return isNaN(t)?0:t.getTime()},Is=function(e){if(void 0!==e&&null!==e){var t=new Date(e),r="00",s=t.getFullYear().toString(),a=(r+(t.getMonth()+1).toString()).slice(-2),n=(r+t.getDate().toString()).slice(-2),i=(r+t.getHours().toString()).slice(-2),o=(r+t.getMinutes().toString()).slice(-2);return"".concat(s,"-").concat(a,"-").concat(n,"T").concat(i,":").concat(o)}},Ps=function(e){return Object(Te.jsx)(Z.a,Object(m.a)(Object(m.a)({},e),{},{children:Object(Te.jsx)(H.a,{source:"valid",alwaysOn:!0})}))},Ds=function(e){return Object(Te.jsx)(Q.a,Object(m.a)(Object(m.a)({},e),{},{filters:Object(Te.jsx)(Ps,{}),filterDefaultValues:{valid:!0},pagination:!1,perPage:500,children:Object(Te.jsxs)($.a,{rowClick:"edit",children:[Object(Te.jsx)(Y.a,{source:"token",sortable:!1}),Object(Te.jsx)(fe.a,{source:"uses_allowed",sortable:!1}),Object(Te.jsx)(fe.a,{source:"pending",sortable:!1}),Object(Te.jsx)(fe.a,{source:"completed",sortable:!1}),Object(Te.jsx)(ee.a,{source:"expiry_time",showTime:!0,options:xs,sortable:!1})]})}))},As=function(e){return Object(Te.jsx)(ie.a,Object(m.a)(Object(m.a)({},e),{},{children:Object(Te.jsxs)(oe.a,{redirect:"list",toolbar:Object(Te.jsx)(se.a,{alwaysEnableSaveButton:!0}),children:[Object(Te.jsx)(ce.a,{source:"token",autoComplete:"off",validate:ys,resettable:!0}),Object(Te.jsx)(Qe.a,{source:"length",validate:Ss,helperText:"resources.registration_tokens.helper.length",step:1}),Object(Te.jsx)(Qe.a,{source:"uses_allowed",validate:ws,step:1}),Object(Te.jsx)(Ke.a,{source:"expiry_time",parse:ks})]})}))},Cs=function(e){return Object(Te.jsx)(je.a,Object(m.a)(Object(m.a)({},e),{},{children:Object(Te.jsxs)(oe.a,{children:[Object(Te.jsx)(ce.a,{source:"token",disabled:!0}),Object(Te.jsx)(Qe.a,{source:"pending",disabled:!0}),Object(Te.jsx)(Qe.a,{source:"completed",disabled:!0}),Object(Te.jsx)(Qe.a,{source:"uses_allowed",validate:ws,step:1}),Object(Te.jsx)(Ke.a,{source:"expiry_time",parse:ks,format:Is})]})}))},Es=r(22),Rs=r(94),Ts=r.n(Rs),zs=Object(m.a)(Object(m.a)({},Ts.a),{},{synapseadmin:{auth:{base_url:"Heimserver URL",welcome:"Willkommen bei Synapse-admin",server_version:"Synapse Version",username_error:"Bitte vollst\xe4ndigen Nutzernamen angeben: '@user:domain'",protocol_error:"Die URL muss mit 'http://' oder 'https://' beginnen",url_error:"Keine g\xfcltige Matrix Server URL",sso_sign_in:"Anmeldung mit SSO"},users:{invalid_user_id:"Lokaler Anteil der Matrix Benutzer-ID ohne Homeserver.",tabs:{sso:"SSO"}},rooms:{details:"Raumdetails",tabs:{basic:"Allgemein",members:"Mitglieder",detail:"Details",permission:"Berechtigungen"}},reports:{tabs:{basic:"Allgemein",detail:"Details"}}},import_users:{error:{at_entry:"Bei Eintrag %{entry}: %{message}",error:"Fehler",required_field:"Pflichtfeld '%{field}' fehlt",invalid_value:"Ung\xfcltiger Wert in Zeile %{row}. Feld '%{field}' darf nur die Werte 'true' oder 'false' enthalten",unreasonably_big:"Datei ist zu gro\xdf f\xfcr den Import (%{size} Megabytes)",already_in_progress:"Es l\xe4uft bereits ein Import",id_exits:"ID %{id} existiert bereits"},title:"Benutzer aus CSV importieren",goToPdf:"Gehe zum PDF",cards:{importstats:{header:"Benutzer importieren",users_total:"%{smart_count} Benutzer in der CSV Datei |||| %{smart_count} Benutzer in der CSV Datei",guest_count:"%{smart_count} Gast |||| %{smart_count} G\xe4ste",admin_count:"%{smart_count} Server Administrator |||| %{smart_count} Server Administratoren"},conflicts:{header:"Konfliktstrategie",mode:{stop:"Stoppe bei Fehlern",skip:"Zeige Fehler und \xfcberspringe fehlerhafte Eintr\xe4ge"}},ids:{header:"IDs",all_ids_present:"IDs in jedem Eintrag vorhanden",count_ids_present:"%{smart_count} Eintrag mit ID |||| %{smart_count} Eintr\xe4ge mit IDs",mode:{ignore:"Ignoriere IDs der CSV-Datei und erstelle neue",update:"Aktualisiere existierende Benutzer"}},passwords:{header:"Passw\xf6rter",all_passwords_present:"Passw\xf6rter in jedem Eintrag vorhanden",count_passwords_present:"%{smart_count} Eintrag mit Passwort |||| %{smart_count} Eintr\xe4ge mit Passw\xf6rtern",use_passwords:"Verwende Passw\xf6rter aus der CSV Datei"},upload:{header:"CSV Datei importieren",explanation:"Hier k\xf6nnen Sie eine Datei mit kommagetrennten Daten hochladen, die verwendet werden um Benutzer anzulegen oder zu \xe4ndern. Die Datei muss mindestens die Felder 'id' und 'displayname' enthalten. Hier k\xf6nnen Sie eine Beispieldatei herunterladen und anpassen: "},startImport:{simulate_only:"Nur simulieren",run_import:"Importieren"},results:{header:"Ergebnis",total:"%{smart_count} Eintrag insgesamt |||| %{smart_count} Eintr\xe4ge insgesamt",successful:"%{smart_count} Eintr\xe4ge erfolgreich importiert",skipped:"%{smart_count} Eintr\xe4ge \xfcbersprungen",download_skipped:"\xdcbersprungene Eintr\xe4ge herunterladen",with_error:"%{smart_count} Eintrag mit Fehlern ||| %{smart_count} Eintr\xe4ge mit Fehlern",simulated_only:"Import-Vorgang war nur simuliert"}}},resources:{users:{name:"Benutzer",email:"E-Mail",msisdn:"Telefon",threepid:"E-Mail / Telefon",fields:{avatar:"Avatar",id:"Benutzer-ID",name:"Name",is_guest:"Gast",admin:"Server Administrator",deactivated:"Deaktiviert",guests:"Zeige G\xe4ste",show_deactivated:"Zeige deaktivierte Benutzer",user_id:"Suche Benutzer",displayname:"Anzeigename",password:"Passwort",avatar_url:"Avatar URL",avatar_src:"Avatar",medium:"Medium",threepids:"3PIDs",address:"Adresse",creation_ts_ms:"Zeitpunkt der Erstellung",consent_version:"Zugestimmte Gesch\xe4ftsbedingungen",auth_provider:"Provider"},helper:{deactivate:"Sie m\xfcssen ein Passwort angeben, um ein Konto wieder zu aktivieren.",erase:"DSGVO konformes L\xf6schen der Benutzerdaten"},action:{erase:"L\xf6sche Benutzerdaten"}},rooms:{name:"Raum |||| R\xe4ume",fields:{room_id:"Raum-ID",name:"Name",canonical_alias:"Alias",joined_members:"Mitglieder",joined_local_members:"Lokale Mitglieder",joined_local_devices:"Lokale Endger\xe4te",state_events:"Zustandsereignisse / Komplexit\xe4t",version:"Version",is_encrypted:"Verschl\xfcsselt",encryption:"Verschl\xfcsselungs-Algorithmus",federatable:"F\xf6\xadde\xadrierbar",public:"Sichtbar im Raumverzeichnis",creator:"Ersteller",join_rules:"Beitrittsregeln",guest_access:"Gastzugriff",history_visibility:"Historie-Sichtbarkeit",topic:"Thema",avatar:"Avatar"},helper:{forward_extremities:"Forward extremities are the leaf events at the end of a Directed acyclic graph (DAG) in a room, aka events that have no children. The more exist in a room, the more state resolution that Synapse needs to perform (hint: it's an expensive operation). While Synapse has code to prevent too many of these existing at one time in a room, bugs can sometimes make them crop up again. If a room has >10 forward extremities, it's worth checking which room is the culprit and potentially removing them using the SQL queries mentioned in #1760."},enums:{join_rules:{public:"\xd6ffentlich",knock:"Auf Anfrage",invite:"Nur auf Einladung",private:"Privat"},guest_access:{can_join:"G\xe4ste k\xf6nnen beitreten",forbidden:"G\xe4ste k\xf6nnen nicht beitreten"},history_visibility:{invited:"Ab Einladung",joined:"Ab Beitritt",shared:"Ab Setzen der Einstellung",world_readable:"Jeder"},unencrypted:"Nicht verschl\xfcsselt"},action:{erase:{title:"Raum l\xf6schen",content:"Sind Sie sicher dass Sie den Raum l\xf6schen m\xf6chten? Diese Aktion kann nicht r\xfcckg\xe4ngig gemacht werden. Alle Nachrichten und Medien, die der Raum beinhaltet werden vom Server gel\xf6scht!"}}},reports:{name:"Ereignisbericht |||| Ereignisberichte",fields:{id:"ID",received_ts:"Meldezeit",user_id:"Meldender",name:"Raumname",score:"Wert",reason:"Grund",event_id:"Event-ID",event_json:{origin:"Ursprungsserver",origin_server_ts:"Sendezeit",type:"Eventtyp",content:{msgtype:"Inhaltstyp",body:"Nachrichteninhalt",format:"Nachrichtenformat",formatted_body:"Formatierter Nachrichteninhalt",algorithm:"Verschl\xfcsselungsalgorithmus"}}}},connections:{name:"Verbindungen",fields:{last_seen:"Datum",ip:"IP-Adresse",user_agent:"User Agent"}},devices:{name:"Ger\xe4t |||| Ger\xe4te",fields:{device_id:"Ger\xe4te-ID",display_name:"Ger\xe4tename",last_seen_ts:"Zeitstempel",last_seen_ip:"IP-Adresse"},action:{erase:{title:"Entferne %{id}",content:'M\xf6chten Sie das Ger\xe4t "%{name}" wirklich entfernen?',success:"Ger\xe4t erfolgreich entfernt.",failure:"Beim Entfernen ist ein Fehler aufgetreten."}}},users_media:{name:"Medien",fields:{media_id:"Medien ID",media_length:"Gr\xf6\xdfe",media_type:"Typ",upload_name:"Dateiname",quarantined_by:"Zur Quarant\xe4ne hinzugef\xfcgt",safe_from_quarantine:"Schutz vor Quarant\xe4ne",created_ts:"Erstellt",last_access_ts:"Letzter Zugriff"}},delete_media:{name:"Medien",fields:{before_ts:"Letzter Zugriff vor",size_gt:"Gr\xf6\xdfer als (in Bytes)",keep_profiles:"Behalte Profilbilder"},action:{send:"Medien l\xf6schen",send_success:"Anfrage erfolgreich versendet.",send_failure:"Beim Versenden ist ein Fehler aufgetreten."},helper:{send:"Diese API l\xf6scht die lokalen Medien von der Festplatte des eigenen Servers. Dies umfasst alle lokalen Miniaturbilder und Kopien von Medien. Diese API wirkt sich nicht auf Medien aus, die sich in externen Medien-Repositories befinden."}},protect_media:{action:{create:"Ungesch\xfctzt, Schutz erstellen",delete:"Gesch\xfctzt, Schutz aufheben",none:"In Quarant\xe4ne",send_success:"Erfolgreich den Schutz-Status ge\xe4ndert.",send_failure:"Beim Versenden ist ein Fehler aufgetreten."}},quarantine_media:{action:{name:"Quarant\xe4ne",create:"Zur Quarant\xe4ne hinzuf\xfcgen",delete:"In Quarant\xe4ne, Quarant\xe4ne aufheben",none:"Gesch\xfctzt vor Quarant\xe4ne",send_success:"Erfolgreich den Quarant\xe4ne-Status ge\xe4ndert.",send_failure:"Beim Versenden ist ein Fehler aufgetreten."}},pushers:{name:"Pusher |||| Pushers",fields:{app:"App",app_display_name:"App-Anzeigename",app_id:"App ID",device_display_name:"Ger\xe4te-Anzeigename",kind:"Art",lang:"Sprache",profile_tag:"Profil-Tag",pushkey:"Pushkey",data:{url:"URL"}}},servernotices:{name:"Serverbenachrichtigungen",send:"Servernachricht versenden",fields:{body:"Nachricht"},action:{send:"Sende Nachricht",send_success:"Nachricht erfolgreich versendet.",send_failure:"Beim Versenden ist ein Fehler aufgetreten."},helper:{send:'Sendet eine Serverbenachrichtigung an die ausgew\xe4hlten Nutzer. Hierf\xfcr muss das Feature "Server Notices" auf dem Server aktiviert sein.'}},user_media_statistics:{name:"Dateien je Benutzer",fields:{media_count:"Anzahl der Dateien",media_length:"Gr\xf6\xdfe der Dateien"}},forward_extremities:{name:"Vorderextremit\xe4ten",fields:{id:"Event-ID",received_ts:"Zeitstempel",depth:"Tiefe",state_group:"Zustandsgruppe"}},room_state:{name:"Zustandsereignisse",fields:{type:"Typ",content:"Inhalt",origin_server_ts:"Sendezeit",sender:"Absender"}},room_directory:{name:"Raumverzeichnis",fields:{world_readable:"Gastbenutzer d\xfcrfen ohne Beitritt lesen",guest_can_join:"Gastbenutzer d\xfcrfen beitreten"},action:{title:"Raum aus Verzeichnis l\xf6schen |||| %{smart_count} R\xe4ume aus Verzeichnis l\xf6schen",content:"M\xf6chten Sie den Raum wirklich aus dem Raumverzeichnis l\xf6schen? |||| M\xf6chten Sie die %{smart_count} R\xe4ume wirklich aus dem Raumverzeichnis l\xf6schen?",erase:"L\xf6sche aus Verzeichnis",create:"Eintragen ins Verzeichnis",send_success:"Raum erfolgreich eingetragen.",send_failure:"Beim Entfernen ist ein Fehler aufgetreten."}},registration_tokens:{name:"Registrierungstoken",fields:{token:"Token",valid:"G\xfcltige Token",uses_allowed:"Anzahl",pending:"Ausstehend",completed:"Abgeschlossen",expiry_time:"Ablaufzeit",length:"L\xe4nge"},helper:{length:"L\xe4nge des Tokens, wenn kein Token vorgegeben wird."}}},ra:Object(m.a)(Object(m.a)({},Ts.a.ra),{},{action:Object(m.a)(Object(m.a)({},Ts.a.ra.action),{},{unselect:"Abw\xe4hlen"}),auth:Object(m.a)(Object(m.a)({},Ts.a.ra.auth),{},{auth_check_error:"Anmeldung fehlgeschlagen"}),input:Object(m.a)(Object(m.a)({},Ts.a.ra.input),{},{password:Object(m.a)(Object(m.a)({},Ts.a.ra.input.password),{},{toggle_hidden:"Anzeigen",toggle_visible:"Verstecken"})}),notification:Object(m.a)(Object(m.a)({},Ts.a.ra.notification),{},{logged_out:"Abgemeldet"}),page:Object(m.a)(Object(m.a)({},Ts.a.ra.page),{},{empty:"Keine Eintr\xe4ge vorhanden",invite:""}),navigation:Object(m.a)(Object(m.a)({},Ts.a.ra.navigation),{},{skip_nav:"Zum Inhalt springen"})})}),Fs=r(231),Vs=Object(m.a)(Object(m.a)({},Fs.a),{},{synapseadmin:{auth:{base_url:"Homeserver URL",welcome:"Welcome to Synapse-admin",server_version:"Synapse version",username_error:"Please enter fully qualified user ID: '@user:domain'",protocol_error:"URL has to start with 'http://' or 'https://'",url_error:"Not a valid Matrix server URL",sso_sign_in:"Sign in with SSO"},users:{invalid_user_id:"Localpart of a Matrix user-id without homeserver.",tabs:{sso:"SSO"}},rooms:{tabs:{basic:"Basic",members:"Members",detail:"Details",permission:"Permissions"}},reports:{tabs:{basic:"Basic",detail:"Details"}}},import_users:{error:{at_entry:"At entry %{entry}: %{message}",error:"Error",required_field:"Required field '%{field}' is not present",invalid_value:"Invalid value on line %{row}. '%{field}' field may only be 'true' or 'false'",unreasonably_big:"Refused to load unreasonably big file of %{size} megabytes",already_in_progress:"An import run is already in progress",id_exits:"ID %{id} already present"},title:"Import users via CSV",goToPdf:"Go to PDF",cards:{importstats:{header:"Import users",users_total:"%{smart_count} user in CSV file |||| %{smart_count} users in CSV file",guest_count:"%{smart_count} guest |||| %{smart_count} guests",admin_count:"%{smart_count} admin |||| %{smart_count} admins"},conflicts:{header:"Conflict strategy",mode:{stop:"Stop on conflict",skip:"Show error and skip on conflict"}},ids:{header:"IDs",all_ids_present:"IDs present on every entry",count_ids_present:"%{smart_count} entry with ID |||| %{smart_count} entries with IDs",mode:{ignore:"Ignore IDs in CSV and create new ones",update:"Update existing records"}},passwords:{header:"Passwords",all_passwords_present:"Passwords present on every entry",count_passwords_present:"%{smart_count} entry with password |||| %{smart_count} entries with passwords",use_passwords:"Use passwords from CSV"},upload:{header:"Input CSV file",explanation:"Here you can upload a file with comma separated values that is processed to create or update users. The file must include the fields 'id' and 'displayname'. You can download and adapt an example file here: "},startImport:{simulate_only:"Simulate only",run_import:"Import"},results:{header:"Import results",total:"%{smart_count} entry in total |||| %{smart_count} entries in total",successful:"%{smart_count} entries successfully imported",skipped:"%{smart_count} entries skipped",download_skipped:"Download skipped records",with_error:"%{smart_count} entry with errors ||| %{smart_count} entries with errors",simulated_only:"Run was only simulated"}}},resources:{users:{name:"User |||| Users",email:"Email",msisdn:"Phone",threepid:"Email / Phone",fields:{avatar:"Avatar",id:"User-ID",name:"Name",is_guest:"Guest",admin:"Server Administrator",deactivated:"Deactivated",guests:"Show guests",show_deactivated:"Show deactivated users",user_id:"Search user",displayname:"Displayname",password:"Password",avatar_url:"Avatar URL",avatar_src:"Avatar",medium:"Medium",threepids:"3PIDs",address:"Address",creation_ts_ms:"Creation timestamp",consent_version:"Consent version",auth_provider:"Provider"},helper:{deactivate:"You must provide a password to re-activate an account.",erase:"Mark the user as GDPR-erased"},action:{erase:"Erase user data"}},rooms:{name:"Room |||| Rooms",fields:{room_id:"Room-ID",name:"Name",canonical_alias:"Alias",joined_members:"Members",joined_local_members:"Local members",joined_local_devices:"Local devices",state_events:"State events / Complexity",version:"Version",is_encrypted:"Encrypted",encryption:"Encryption",federatable:"Federatable",public:"Visible in room directory",creator:"Creator",join_rules:"Join rules",guest_access:"Guest access",history_visibility:"History visibility",topic:"Topic",avatar:"Avatar"},helper:{forward_extremities:"Forward extremities are the leaf events at the end of a Directed acyclic graph (DAG) in a room, aka events that have no children. The more exist in a room, the more state resolution that Synapse needs to perform (hint: it's an expensive operation). While Synapse has code to prevent too many of these existing at one time in a room, bugs can sometimes make them crop up again. If a room has >10 forward extremities, it's worth checking which room is the culprit and potentially removing them using the SQL queries mentioned in #1760."},enums:{join_rules:{public:"Public",knock:"Knock",invite:"Invite",private:"Private"},guest_access:{can_join:"Guests can join",forbidden:"Guests can not join"},history_visibility:{invited:"Since invited",joined:"Since joined",shared:"Since shared",world_readable:"Anyone"},unencrypted:"Unencrypted"},action:{erase:{title:"Delete room",content:"Are you sure you want to delete the room? This cannot be undone. All messages and shared media in the room will be deleted from the server!"}}},reports:{name:"Reported event |||| Reported events",fields:{id:"ID",received_ts:"report time",user_id:"announcer",name:"name of the room",score:"score",reason:"reason",event_id:"event ID",event_json:{origin:"origin server",origin_server_ts:"time of send",type:"event typ",content:{msgtype:"content type",body:"content",format:"format",formatted_body:"formatted content",algorithm:"algorithm"}}}},connections:{name:"Connections",fields:{last_seen:"Date",ip:"IP address",user_agent:"User agent"}},devices:{name:"Device |||| Devices",fields:{device_id:"Device-ID",display_name:"Device name",last_seen_ts:"Timestamp",last_seen_ip:"IP address"},action:{erase:{title:"Removing %{id}",content:'Are you sure you want to remove the device "%{name}"?',success:"Device successfully removed.",failure:"An error has occurred."}}},users_media:{name:"Media",fields:{media_id:"Media ID",media_length:"File Size (in Bytes)",media_type:"Type",upload_name:"File name",quarantined_by:"Quarantined by",safe_from_quarantine:"Safe from quarantine",created_ts:"Created",last_access_ts:"Last access"}},delete_media:{name:"Media",fields:{before_ts:"last access before",size_gt:"Larger then (in bytes)",keep_profiles:"Keep profile images"},action:{send:"Delete media",send_success:"Request successfully sent.",send_failure:"An error has occurred."},helper:{send:"This API deletes the local media from the disk of your own server. This includes any local thumbnails and copies of media downloaded. This API will not affect media that has been uploaded to external media repositories."}},protect_media:{action:{create:"Unprotected, create protection",delete:"Protected, remove protection",none:"In quarantine",send_success:"Successfully changed the protection status.",send_failure:"An error has occurred."}},quarantine_media:{action:{name:"Quarantine",create:"Add to quarantine",delete:"In quarantine, unquarantine",none:"Protected from quarantine",send_success:"Successfully changed the quarantine status.",send_failure:"An error has occurred."}},pushers:{name:"Pusher |||| Pushers",fields:{app:"App",app_display_name:"App display name",app_id:"App ID",device_display_name:"Device display name",kind:"Kind",lang:"Language",profile_tag:"Profile tag",pushkey:"Pushkey",data:{url:"URL"}}},servernotices:{name:"Server Notices",send:"Send server notices",fields:{body:"Message"},action:{send:"Send note",send_success:"Server notice successfully sent.",send_failure:"An error has occurred."},helper:{send:'Sends a server notice to the selected users. The feature "Server Notices" has to be activated at the server.'}},user_media_statistics:{name:"Users' media",fields:{media_count:"Media count",media_length:"Media length"}},forward_extremities:{name:"Forward Extremities",fields:{id:"Event ID",received_ts:"Timestamp",depth:"Depth",state_group:"State group"}},room_state:{name:"State events",fields:{type:"Type",content:"Content",origin_server_ts:"time of send",sender:"Sender"}},room_directory:{name:"Room directory",fields:{world_readable:"guest users may view without joining",guest_can_join:"guest users may join"},action:{title:"Delete room from directory |||| Delete %{smart_count} rooms from directory",content:"Are you sure you want to remove this room from directory? |||| Are you sure you want to remove these %{smart_count} rooms from directory",erase:"Delete from room directory",create:"Publish in room directory",send_success:"Room successfully published.",send_failure:"An error has occurred."}}},registration_tokens:{name:"Registration tokens",fields:{token:"Token",valid:"Valid token",uses_allowed:"Uses allowed",pending:"Pending",completed:"Completed",expiry_time:"Expiry time",length:"Length"},helper:{length:"Length of the token if no token is given."}}}),Ns=r(420),Bs=r.n(Ns),Ms={de:zs,en:Vs,zh:Object(m.a)(Object(m.a)({},Bs.a),{},{synapseadmin:{auth:{base_url:"\u670d\u52a1\u5668 URL",welcome:"\u6b22\u8fce\u6765\u5230 Synapse-admin",server_version:"Synapse \u7248\u672c",username_error:"\u8bf7\u8f93\u5165\u5b8c\u6574\u6709\u6548\u7684\u7528\u6237 ID: '@user:domain'",protocol_error:"URL \u9700\u8981\u4ee5'http://'\u6216'https://'\u4f5c\u4e3a\u8d77\u59cb",url_error:"\u4e0d\u662f\u4e00\u4e2a\u6709\u6548\u7684 Matrix \u670d\u52a1\u5668\u5730\u5740",sso_sign_in:"\u4f7f\u7528 SSO \u767b\u5f55"},users:{invalid_user_id:"\u5fc5\u987b\u8981\u662f\u4e00\u4e2a\u6709\u6548\u7684 Matrix \u7528\u6237 ID \uff0c\u4f8b\u5982 @user_id:homeserver",tabs:{sso:"SSO"}},rooms:{tabs:{basic:"\u57fa\u672c",members:"\u6210\u5458",detail:"\u7ec6\u8282",permission:"\u6743\u9650"},delete:{title:"\u5220\u9664\u623f\u95f4",message:"\u60a8\u786e\u5b9a\u8981\u5220\u9664\u8fd9\u4e2a\u623f\u95f4\u5417\uff1f\u8be5\u64cd\u4f5c\u65e0\u6cd5\u88ab\u64a4\u9500\u3002\u8fd9\u4e2a\u623f\u95f4\u91cc\u6240\u6709\u7684\u6d88\u606f\u548c\u5206\u4eab\u7684\u5a92\u4f53\u90fd\u5c06\u88ab\u4ece\u670d\u52a1\u5668\u4e0a\u5220\u9664\uff01"}},reports:{tabs:{basic:"\u57fa\u672c",detail:"\u7ec6\u8282"}}},import_users:{error:{at_entry:"\u5728\u6761\u76ee %{entry}: %{message}",error:"\u9519\u8bef",required_field:"\u9700\u8981\u7684\u503c '%{field}' \u672a\u88ab\u8bbe\u7f6e\u3002",invalid_value:"\u7b2c %{row} \u884c\u51fa\u73b0\u65e0\u6548\u503c\u3002 '%{field}' \u53ea\u53ef\u4ee5\u662f 'true' \u6216 'false'\u3002",unreasonably_big:"\u62d2\u7edd\u52a0\u8f7d\u8fc7\u5927\u7684\u6587\u4ef6\uff1a %{size} MB",already_in_progress:"\u4e00\u4e2a\u5bfc\u5165\u8fdb\u7a0b\u5df2\u7ecf\u5728\u8fd0\u884c\u4e2d",id_exits:"ID %{id} \u5df2\u7ecf\u5b58\u5728"},title:"\u901a\u8fc7 CSV \u5bfc\u5165\u7528\u6237",goToPdf:"\u8f6c\u5230 PDF",cards:{importstats:{header:"\u5bfc\u5165\u7528\u6237",users_total:"%{smart_count} \u7528\u6237\u5728 CSV \u6587\u4ef6\u4e2d |||| %{smart_count} \u7528\u6237\u5728 CSV \u6587\u4ef6\u4e2d",guest_count:"%{smart_count} \u8bbf\u5ba2 |||| %{smart_count} \u8bbf\u5ba2",admin_count:"%{smart_count} \u7ba1\u7406\u5458 |||| %{smart_count} \u7ba1\u7406\u5458"},conflicts:{header:"\u51b2\u7a81\u5904\u7406\u7b56\u7565",mode:{stop:"\u5728\u51b2\u7a81\u5904\u505c\u6b62",skip:"\u663e\u793a\u9519\u8bef\u5e76\u8df3\u8fc7\u51b2\u7a81"}},ids:{header:"IDs",all_ids_present:"\u6bcf\u6761\u8bb0\u5f55\u7684 ID",count_ids_present:"%{smart_count} \u4e2a\u542b ID \u7684\u8bb0\u5f55 |||| %{smart_count} \u4e2a\u542b ID \u7684\u8bb0\u5f55",mode:{ignore:"\u5ffd\u7565 CSV \u4e2d\u7684 ID \u5e76\u521b\u5efa\u65b0\u7684",update:"\u66f4\u65b0\u5df2\u7ecf\u5b58\u5728\u7684\u8bb0\u5f55"}},passwords:{header:"\u5bc6\u7801",all_passwords_present:"\u6bcf\u6761\u8bb0\u5f55\u7684\u5bc6\u7801",count_passwords_present:"%{smart_count} \u4e2a\u542b\u5bc6\u7801\u7684\u8bb0\u5f55 |||| %{smart_count} \u4e2a\u542b\u5bc6\u7801\u7684\u8bb0\u5f55",use_passwords:"\u4f7f\u7528 CSV \u4e2d\u6807\u8bb0\u7684\u5bc6\u7801"},upload:{header:"\u5bfc\u5165 CSV \u6587\u4ef6",explanation:"\u5728\u8fd9\u91cc\uff0c\u4f60\u53ef\u4ee5\u4e0a\u4f20\u4e00\u4e2a\u7528\u9017\u53f7\u5206\u9694\u7684\u6587\u4ef6\uff0c\u7528\u4e8e\u521b\u5efa\u6216\u66f4\u65b0\u7528\u6237\u3002\u8be5\u6587\u4ef6\u5fc5\u987b\u5305\u62ec 'id' \u548c 'displayname' \u5b57\u6bb5\u3002\u4f60\u53ef\u4ee5\u5728\u8fd9\u91cc\u4e0b\u8f7d\u5e76\u4fee\u6539\u4e00\u4e2a\u793a\u4f8b\u6587\u4ef6\uff1a"},startImport:{simulate_only:"\u6a21\u62df\u6a21\u5f0f",run_import:"\u5bfc\u5165"},results:{header:"\u5bfc\u5165\u7ed3\u679c",total:"\u5171\u8ba1 %{smart_count} \u6761\u8bb0\u5f55 |||| \u5171\u8ba1 %{smart_count} \u6761\u8bb0\u5f55",successful:"%{smart_count} \u6761\u8bb0\u5f55\u5bfc\u5165\u6210\u529f",skipped:"\u8df3\u8fc7 %{smart_count} \u6761\u8bb0\u5f55",download_skipped:"\u4e0b\u8f7d\u8df3\u8fc7\u7684\u8bb0\u5f55",with_error:"%{smart_count} \u6761\u8bb0\u5f55\u51fa\u73b0\u9519\u8bef ||| %{smart_count} \u6761\u8bb0\u5f55\u51fa\u73b0\u9519\u8bef",simulated_only:"\u53ea\u662f\u4e00\u6b21\u6a21\u62df\u8fd0\u884c"}}},resources:{users:{name:"\u7528\u6237",email:"\u90ae\u7bb1",msisdn:"\u7535\u8bdd",threepid:"\u90ae\u7bb1 / \u7535\u8bdd",fields:{avatar:"\u90ae\u7bb1",id:"\u7528\u6237 ID",name:"\u7528\u6237\u540d",is_guest:"\u8bbf\u5ba2",admin:"\u670d\u52a1\u5668\u7ba1\u7406\u5458",deactivated:"\u88ab\u7981\u7528",guests:"\u663e\u793a\u8bbf\u5ba2",show_deactivated:"\u663e\u793a\u88ab\u7981\u7528\u7684\u8d26\u6237",user_id:"\u641c\u7d22\u7528\u6237",displayname:"\u663e\u793a\u540d\u5b57",password:"\u5bc6\u7801",avatar_url:"\u5934\u50cf URL",avatar_src:"\u5934\u50cf",medium:"Medium",threepids:"3PIDs",address:"\u5730\u5740",creation_ts_ms:"\u521b\u5efa\u65f6\u95f4\u6233",consent_version:"\u534f\u8bae\u7248\u672c"},helper:{deactivate:"\u60a8\u5fc5\u987b\u63d0\u4f9b\u4e00\u4e32\u5bc6\u7801\u6765\u6fc0\u6d3b\u8d26\u6237\u3002",erase:"\u5c06\u7528\u6237\u6807\u8bb0\u4e3a\u6839\u636e GDPR \u7684\u8981\u6c42\u62b9\u9664\u4e86"},action:{erase:"\u62b9\u9664\u7528\u6237\u4fe1\u606f"}},rooms:{name:"\u623f\u95f4",fields:{room_id:"\u623f\u95f4 ID",name:"\u623f\u95f4\u540d",canonical_alias:"\u522b\u540d",joined_members:"\u6210\u5458",joined_local_members:"\u672c\u5730\u6210\u5458",state_events:"\u72b6\u6001\u4e8b\u4ef6",version:"\u7248\u672c",is_encrypted:"\u5df2\u7ecf\u52a0\u5bc6",encryption:"\u52a0\u5bc6",federatable:"\u53ef\u8054\u5408\u7684",public:"\u516c\u5f00",creator:"\u521b\u5efa\u8005",join_rules:"\u52a0\u5165\u89c4\u5219",guest_access:"\u8bbf\u5ba2\u8bbf\u95ee",history_visibility:"\u5386\u53f2\u53ef\u89c1\u6027"},enums:{join_rules:{public:"\u516c\u5f00",knock:"\u7533\u8bf7",invite:"\u9080\u8bf7",private:"\u79c1\u6709"},guest_access:{can_join:"\u8bbf\u5ba2\u53ef\u4ee5\u52a0\u5165",forbidden:"\u8bbf\u5ba2\u4e0d\u53ef\u52a0\u5165"},history_visibility:{invited:"\u81ea\u4ece\u88ab\u9080\u8bf7",joined:"\u81ea\u4ece\u52a0\u5165",shared:"\u81ea\u4ece\u5206\u4eab",world_readable:"\u4efb\u4f55\u4eba"},unencrypted:"\u672a\u52a0\u5bc6"}},reports:{name:"\u62a5\u544a\u4e8b\u4ef6",fields:{id:"ID",received_ts:"\u62a5\u544a\u65f6\u95f4",user_id:"\u62a5\u544a\u8005",name:"\u623f\u95f4\u540d",score:"\u5206\u6570",reason:"\u539f\u56e0",event_id:"\u4e8b\u4ef6 ID",event_json:{origin:"\u539f\u59cb\u670d\u52a1\u5668",origin_server_ts:"\u53d1\u9001\u65f6\u95f4",type:"\u4e8b\u4ef6\u7c7b\u578b",content:{msgtype:"\u5185\u5bb9\u7c7b\u578b",body:"\u5185\u5bb9",format:"\u683c\u5f0f",formatted_body:"\u683c\u5f0f\u5316\u7684\u6570\u636e",algorithm:"\u7b97\u6cd5"}}}},connections:{name:"\u8fde\u63a5",fields:{last_seen:"\u65e5\u671f",ip:"IP \u5730\u5740",user_agent:"\u7528\u6237\u4ee3\u7406 (UA)"}},devices:{name:"\u8bbe\u5907",fields:{device_id:"\u8bbe\u5907 ID",display_name:"\u8bbe\u5907\u540d",last_seen_ts:"\u65f6\u95f4\u6233",last_seen_ip:"IP \u5730\u5740"},action:{erase:{title:"\u79fb\u9664 %{id}",content:'\u60a8\u786e\u5b9a\u8981\u79fb\u9664\u8bbe\u5907 "%{name}"?',success:"\u8bbe\u5907\u79fb\u9664\u6210\u529f\u3002",failure:"\u51fa\u73b0\u4e86\u4e00\u4e2a\u9519\u8bef\u3002"}}},users_media:{name:"\u5a92\u4f53\u6587\u4ef6",fields:{media_id:"\u5a92\u4f53\u6587\u4ef6 ID",media_length:"\u957f\u5ea6",media_type:"\u7c7b\u578b",upload_name:"\u6587\u4ef6\u540d",quarantined_by:"\u88ab\u9694\u79bb",safe_from_quarantine:"\u53d6\u6d88\u9694\u79bb",created_ts:"\u521b\u5efa",last_access_ts:"\u4e0a\u4e00\u6b21\u8bbf\u95ee"}},delete_media:{name:"\u5a92\u4f53\u6587\u4ef6",fields:{before_ts:"\u6700\u540e\u8bbf\u95ee\u65f6\u95f4",size_gt:"\u5927\u4e8e (\u5b57\u8282)",keep_profiles:"\u4fdd\u7559\u5934\u50cf"},action:{send:"\u5220\u9664\u5a92\u4f53",send_success:"\u8bf7\u6c42\u53d1\u9001\u6210\u529f\u3002",send_failure:"\u51fa\u73b0\u4e86\u4e00\u4e2a\u9519\u8bef\u3002"},helper:{send:"\u8fd9\u4e2aAPI\u4f1a\u5220\u9664\u60a8\u786c\u76d8\u4e0a\u7684\u672c\u5730\u5a92\u4f53\u3002\u5305\u542b\u4e86\u4efb\u4f55\u7684\u672c\u5730\u7f13\u5b58\u548c\u4e0b\u8f7d\u7684\u5a92\u4f53\u5907\u4efd\u3002\u8fd9\u4e2aAPI\u4e0d\u4f1a\u5f71\u54cd\u4e0a\u4f20\u5230\u5916\u90e8\u5a92\u4f53\u5b58\u50a8\u5e93\u4e0a\u7684\u5a92\u4f53\u6587\u4ef6\u3002"}},pushers:{name:"\u53d1\u5e03\u8005",fields:{app:"App",app_display_name:"App \u540d\u79f0",app_id:"App ID",device_display_name:"\u8bbe\u5907\u663e\u793a\u540d",kind:"\u7c7b\u578b",lang:"\u8bed\u8a00",profile_tag:"\u6570\u636e\u6807\u7b7e",pushkey:"Pushkey",data:{url:"URL"}}},servernotices:{name:"\u670d\u52a1\u5668\u63d0\u793a",send:"\u53d1\u9001\u670d\u52a1\u5668\u63d0\u793a",fields:{body:"\u4fe1\u606f"},action:{send:"\u53d1\u9001\u63d0\u793a",send_success:"\u670d\u52a1\u5668\u63d0\u793a\u53d1\u9001\u6210\u529f\u3002",send_failure:"\u51fa\u73b0\u4e86\u4e00\u4e2a\u9519\u8bef\u3002"},helper:{send:'\u5411\u9009\u4e2d\u7684\u7528\u6237\u53d1\u9001\u670d\u52a1\u5668\u63d0\u793a\u3002\u670d\u52a1\u5668\u914d\u7f6e\u4e2d\u7684 "\u670d\u52a1\u5668\u63d0\u793a(Server Notices)" \u9009\u9879\u9700\u8981\u88ab\u8bbe\u7f6e\u4e3a\u542f\u7528\u3002'}},user_media_statistics:{name:"\u7528\u6237\u7684\u5a92\u4f53\u6587\u4ef6",fields:{media_count:"\u5a92\u4f53\u6587\u4ef6\u7edf\u8ba1",media_length:"\u5a92\u4f53\u6587\u4ef6\u957f\u5ea6"}}}})},Ls=Object(d.a)((function(e){return Ms[e]?Ms[e]:Ms.en}),Object(i.a)()),qs=function(){return Object(Te.jsxs)(o.a,{disableTelemetry:!0,loginPage:Gr,authProvider:u,dataProvider:f,i18nProvider:Ls,customRoutes:[Object(Te.jsx)(Es.b,{path:"/import_users",component:vs},"userImport")],children:[Object(Te.jsx)(c.a,{name:"users",list:xt,create:It,edit:Dt,icon:Kt.a}),Object(Te.jsx)(c.a,{name:"rooms",list:wr,show:gr,icon:B.a}),Object(Te.jsx)(c.a,{name:"user_media_statistics",list:es,icon:Hr.a}),Object(Te.jsx)(c.a,{name:"reports",list:Pr,show:Ir,icon:rs.a}),Object(Te.jsx)(c.a,{name:"room_directory",list:mr,icon:tr.a}),Object(Te.jsx)(c.a,{name:"registration_tokens",list:Ds,create:As,edit:Cs,icon:Zr.a}),Object(Te.jsx)(c.a,{name:"connections"}),Object(Te.jsx)(c.a,{name:"devices"}),Object(Te.jsx)(c.a,{name:"room_members"}),Object(Te.jsx)(c.a,{name:"users_media"}),Object(Te.jsx)(c.a,{name:"joined_rooms"}),Object(Te.jsx)(c.a,{name:"pushers"}),Object(Te.jsx)(c.a,{name:"servernotices"}),Object(Te.jsx)(c.a,{name:"forward_extremities"}),Object(Te.jsx)(c.a,{name:"room_state"})]})};n.a.render(Object(Te.jsx)(qs,{}),document.getElementById("root"))}},[[673,1,2]]]); //# sourceMappingURL=main.e947bb6f.chunk.js.map