Files
pgsql-jellyfin/Jellyfin.Server/wwwroot/users-profile.267b9136593bb210de4f.chunk.js
T
2026-07-08 13:13:46 -04:00

1 line
27 KiB
JavaScript

"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[18373],{19284:function(e,t,n){n.r(t),n.d(t,{default:function(){return O}});var l=n(62540),r=n(22696),i=n.n(r),o=n(63696),c=n(87404),a=n(9055),s=n(5898),d=n(50723),u=n(91281),h=n(84851),v=n(42301),y=n(30658),b=n(58702),f=n(8566),m=n(67692),p=n(65242),k=n(648),x=n(80401),A=n(69410),P=n(61432),S=function(){var e=(0,A.gf)().api;return(0,x.I)({queryKey:["AuthProviders"],queryFn:function(t){var n=t.signal;return function(e,t){return n=void 0,l=void 0,i=function(){return function(e,t){var n,l,r,i={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]},o=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return o.next=c(0),o.throw=c(1),o.return=c(2),"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function c(c){return function(a){return function(c){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,c[0]&&(i=0)),i;)try{if(n=1,l&&(r=2&c[0]?l.return:c[0]?l.throw||((r=l.return)&&r.call(l),0):l.next)&&!(r=r.call(l,c[1])).done)return r;switch(l=0,r&&(c=[2&c[0],r.value]),c[0]){case 0:case 1:r=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,l=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!((r=(r=i.trys).length>0&&r[r.length-1])||6!==c[0]&&2!==c[0])){i=0;continue}if(3===c[0]&&(!r||c[1]>r[0]&&c[1]<r[3])){i.label=c[1];break}if(6===c[0]&&i.label<r[1]){i.label=r[1],r=c;break}if(r&&i.label<r[2]){i.label=r[2],i.ops.push(c);break}r[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],l=0}finally{n=r=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([c,a])}}}(this,(function(n){switch(n.label){case 0:return[4,(0,P.v)(e).getAuthProviders(t)];case 1:return[2,n.sent().data]}}))},new((r=void 0)||(r=Promise))((function(e,t){function o(e){try{a(i.next(e))}catch(e){t(e)}}function c(e){try{a(i.throw(e))}catch(e){t(e)}}function a(t){var n;t.done?e(t.value):(n=t.value,n instanceof r?n:new r((function(e){e(n)}))).then(o,c)}a((i=i.apply(n,l||[])).next())}));var n,l,r,i}(e,{signal:n})},enabled:!!e})},g=function(){var e=(0,A.gf)().api;return(0,x.I)({queryKey:["PasswordResetProviders"],queryFn:function(t){var n=t.signal;return function(e,t){return n=void 0,l=void 0,i=function(){return function(e,t){var n,l,r,i={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]},o=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return o.next=c(0),o.throw=c(1),o.return=c(2),"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function c(c){return function(a){return function(c){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,c[0]&&(i=0)),i;)try{if(n=1,l&&(r=2&c[0]?l.return:c[0]?l.throw||((r=l.return)&&r.call(l),0):l.next)&&!(r=r.call(l,c[1])).done)return r;switch(l=0,r&&(c=[2&c[0],r.value]),c[0]){case 0:case 1:r=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,l=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!((r=(r=i.trys).length>0&&r[r.length-1])||6!==c[0]&&2!==c[0])){i=0;continue}if(3===c[0]&&(!r||c[1]>r[0]&&c[1]<r[3])){i.label=c[1];break}if(6===c[0]&&i.label<r[1]){i.label=r[1],r=c;break}if(r&&i.label<r[2]){i.label=r[2],i.ops.push(c);break}r[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],l=0}finally{n=r=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([c,a])}}}(this,(function(n){switch(n.label){case 0:return[4,(0,P.v)(e).getPasswordResetProviders(t)];case 1:return[2,n.sent().data]}}))},new((r=void 0)||(r=Promise))((function(e,t){function o(e){try{a(i.next(e))}catch(e){t(e)}}function c(e){try{a(i.throw(e))}catch(e){t(e)}}function a(t){var n;t.done?e(t.value):(n=t.value,n instanceof r?n:new r((function(e){e(n)}))).then(o,c)}a((i=i.apply(n,l||[])).next())}));var n,l,r,i}(e,{signal:n})},enabled:!!e})},j=n(35049),w=n(95271),N=n(18879),E=n(38596),L=n(31297),C=n(36135),q=n(94732),D=function(){var e=(0,A.gf)().api;return(0,x.I)({queryKey:["NetConfig"],queryFn:function(t){var n=t.signal;return function(e,t){return n=void 0,l=void 0,i=function(){return function(e,t){var n,l,r,i={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]},o=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return o.next=c(0),o.throw=c(1),o.return=c(2),"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function c(c){return function(a){return function(c){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,c[0]&&(i=0)),i;)try{if(n=1,l&&(r=2&c[0]?l.return:c[0]?l.throw||((r=l.return)&&r.call(l),0):l.next)&&!(r=r.call(l,c[1])).done)return r;switch(l=0,r&&(c=[2&c[0],r.value]),c[0]){case 0:case 1:r=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,l=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!((r=(r=i.trys).length>0&&r[r.length-1])||6!==c[0]&&2!==c[0])){i=0;continue}if(3===c[0]&&(!r||c[1]>r[0]&&c[1]<r[3])){i.label=c[1];break}if(6===c[0]&&i.label<r[1]){i.label=r[1],r=c;break}if(r&&i.label<r[2]){i.label=r[2],i.ops.push(c);break}r[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],l=0}finally{n=r=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([c,a])}}}(this,(function(n){switch(n.label){case 0:return[4,(0,q.T)(e).getNamedConfiguration({key:"network"},t)];case 1:return[2,n.sent().data]}}))},new((r=void 0)||(r=Promise))((function(e,t){function o(e){try{a(i.next(e))}catch(e){t(e)}}function c(e){try{a(i.throw(e))}catch(e){t(e)}}function a(t){var n;t.done?e(t.value):(n=t.value,n instanceof r?n:new r((function(e){e(n)}))).then(o,c)}a((i=i.apply(n,l||[])).next())}));var n,l,r,i}(e,{signal:n})},enabled:!!e})},I=function(){return I=Object.assign||function(e){for(var t,n=1,l=arguments.length;n<l;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},I.apply(this,arguments)},R=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var l,r,i=n.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(l=i.next()).done;)o.push(l.value)}catch(e){r={error:e}}finally{try{l&&!l.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return o},T=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],l=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&l>=e.length&&(e=void 0),{value:e&&e[l++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},O=function(){var e,t=(0,c.Zp)(),r=R((0,a.ok)(),1)[0].get("userId"),x=R((0,o.useState)([]),2),P=x[0],q=x[1],O=(0,o.useMemo)((function(){return e=void 0,t=void 0,r=function(){return function(e,t){var n,l,r,i={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]},o=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return o.next=c(0),o.throw=c(1),o.return=c(2),"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function c(c){return function(a){return function(c){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,c[0]&&(i=0)),i;)try{if(n=1,l&&(r=2&c[0]?l.return:c[0]?l.throw||((r=l.return)&&r.call(l),0):l.next)&&!(r=r.call(l,c[1])).done)return r;switch(l=0,r&&(c=[2&c[0],r.value]),c[0]){case 0:case 1:r=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,l=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!((r=(r=i.trys).length>0&&r[r.length-1])||6!==c[0]&&2!==c[0])){i=0;continue}if(3===c[0]&&(!r||c[1]>r[0]&&c[1]<r[3])){i.label=c[1];break}if(6===c[0]&&i.label<r[1]){i.label=r[1],r=c;break}if(r&&i.label<r[2]){i.label=r[2],i.ops.push(c);break}r[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],l=0}finally{n=r=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([c,a])}}}(this,(function(e){switch(e.label){case 0:return[4,Promise.all([n.e(45642),n.e(45568),n.e(73233),n.e(68603)]).then(n.bind(n,73233))];case 1:return[2,e.sent().default]}}))},new((l=void 0)||(l=Promise))((function(n,i){function o(e){try{a(r.next(e))}catch(e){i(e)}}function c(e){try{a(r.throw(e))}catch(e){i(e)}}function a(e){var t;e.done?n(e.value):(t=e.value,t instanceof l?t:new l((function(e){e(t)}))).then(o,c)}a((r=r.apply(e,t||[])).next())}));var e,t,l,r}),[]),M=R((0,o.useState)(""),2),U=M[0],F=M[1],H=R((0,o.useState)(""),2),B=H[0],V=H[1],G=(0,k.J)(r?{userId:r}:void 0),J=G.data,K=G.isSuccess,_=S(),z=_.data,Q=_.isSuccess,Z=g(),W=Z.data,X=Z.isSuccess,Y=(0,j.g)({isHidden:!1}),$=Y.data,ee=Y.isSuccess,te=(0,w.e)({supportsMediaDeletion:!0}),ne=te.data,le=te.isSuccess,re=D(),ie=re.data,oe=re.isSuccess,ce=(e=(0,A.gf)().api,(0,E.n)({mutationFn:function(t){return(0,N.q)(e).updateUser(t)},onSuccess:function(e,t){L.q.invalidateQueries({queryKey:[k.t,t.userId]})}})),ae=(0,C.E)(),se=(0,o.useRef)(null),de=(0,o.useCallback)((function(e,t,n){var l;e.querySelector(".fldSelectLoginProvider").classList.toggle("hide",n.length<=1);var r=(null===(l=t.Policy)||void 0===l?void 0:l.AuthenticationProviderId)||"";F(r)}),[]),ue=(0,o.useCallback)((function(e,t,n){var l;e.querySelector(".fldSelectPasswordResetProvider").classList.toggle("hide",n.length<=1);var r=(null===(l=t.Policy)||void 0===l?void 0:l.PasswordResetProviderId)||"";V(r)}),[]),he=(0,o.useCallback)((function(e,t,n){var l,r,i,o,c,a,s,d,u,h,v,y,b=[];try{for(var f=T(n),m=f.next();!m.done;m=f.next()){var p=m.value;y=(null===(c=t.Policy)||void 0===c?void 0:c.EnableContentDeletion)||-1!=(null===(s=null===(a=t.Policy)||void 0===a?void 0:a.EnableContentDeletionFromFolders)||void 0===s?void 0:s.indexOf(p.Id||""))?' checked="checked"':"",b.push(I(I({},p),{checkedAttribute:y}))}}catch(e){l={error:e}}finally{try{m&&!m.done&&(r=f.return)&&r.call(f)}finally{if(l)throw l.error}}if(null==ne?void 0:ne.Items)try{for(var k=T(ne.Items),x=k.next();!x.done;x=k.next()){var A=x.value;y=(null===(d=t.Policy)||void 0===d?void 0:d.EnableContentDeletion)||-1!=(null===(h=null===(u=t.Policy)||void 0===u?void 0:u.EnableContentDeletionFromFolders)||void 0===h?void 0:h.indexOf(A.Id||""))?' checked="checked"':"",b.push(I(I({},A),{checkedAttribute:y}))}}catch(e){i={error:e}}finally{try{x&&!x.done&&(o=k.return)&&o.call(k)}finally{if(i)throw i.error}}q(b);var P,S,g=e.querySelector(".chkEnableDeleteAllFolders");g.checked=(null===(v=t.Policy)||void 0===v?void 0:v.EnableContentDeletion)||!1,P=g,S=new Event("change",{bubbles:!1,cancelable:!0}),P.dispatchEvent(S)}),[ne]);(0,o.useEffect)((function(){var e=se.current;e?J&&Q&&null!=z&&de(e,J,z):console.error("[useredit] Unexpected null page reference")}),[z,Q,J,de]),(0,o.useEffect)((function(){var e=se.current;e?J&&X&&null!=W&&ue(e,J,W):console.error("[useredit] Unexpected null page reference")}),[W,X,J,ue]),(0,o.useEffect)((function(){var e=se.current;e?J&&ee&&le&&null!=(null==$?void 0:$.Items)&&he(e,J,$.Items):console.error("[useredit] Unexpected null page reference")}),[J,$,ee,le,ne,he]),(0,o.useEffect)((function(){var e=se.current;e?ie&&oe&&e.querySelector(".fldRemoteAccess").classList.toggle("hide",!ie.EnableRemoteAccess):console.error("[useredit] Unexpected null page reference")}),[ie,oe]);var ve=(0,o.useCallback)((function(e){var t,n,l,r,i,o,c,a,s,d,u,h,v,y,b,m,p,k,x,A,P,S,g,j,w=se.current;if(w){w.querySelector(".disabledUserBanner").classList.toggle("hide",!(null===(t=e.Policy)||void 0===t?void 0:t.IsDisabled));var N=w.querySelector("#txtUserName");N.disabled=!1,N.removeAttribute("disabled"),O.then((function(t){return t.setTitle(e.Name)})),w.querySelector("#txtUserName").value=e.Name||"",w.querySelector(".chkIsAdmin").checked=!!(null===(n=e.Policy)||void 0===n?void 0:n.IsAdministrator),w.querySelector(".chkDisabled").checked=!!(null===(l=e.Policy)||void 0===l?void 0:l.IsDisabled),w.querySelector(".chkIsHidden").checked=!!(null===(r=e.Policy)||void 0===r?void 0:r.IsHidden),w.querySelector(".chkEnableCollectionManagement").checked=!!(null===(i=e.Policy)||void 0===i?void 0:i.EnableCollectionManagement),w.querySelector(".chkEnableSubtitleManagement").checked=!!(null===(o=e.Policy)||void 0===o?void 0:o.EnableSubtitleManagement),w.querySelector(".chkRemoteControlSharedDevices").checked=!!(null===(c=e.Policy)||void 0===c?void 0:c.EnableSharedDeviceControl),w.querySelector(".chkEnableRemoteControlOtherUsers").checked=!!(null===(a=e.Policy)||void 0===a?void 0:a.EnableRemoteControlOfOtherUsers),w.querySelector(".chkEnableDownloading").checked=!!(null===(s=e.Policy)||void 0===s?void 0:s.EnableContentDownloading),w.querySelector(".chkManageLiveTv").checked=!!(null===(d=e.Policy)||void 0===d?void 0:d.EnableLiveTvManagement),w.querySelector(".chkEnableLiveTvAccess").checked=!!(null===(u=e.Policy)||void 0===u?void 0:u.EnableLiveTvAccess),w.querySelector(".chkEnableMediaPlayback").checked=!!(null===(h=e.Policy)||void 0===h?void 0:h.EnableMediaPlayback),w.querySelector(".chkEnableAudioPlaybackTranscoding").checked=!!(null===(v=e.Policy)||void 0===v?void 0:v.EnableAudioPlaybackTranscoding),w.querySelector(".chkEnableVideoPlaybackTranscoding").checked=!!(null===(y=e.Policy)||void 0===y?void 0:y.EnableVideoPlaybackTranscoding),w.querySelector(".chkEnableVideoPlaybackRemuxing").checked=!!(null===(b=e.Policy)||void 0===b?void 0:b.EnablePlaybackRemuxing),w.querySelector(".chkForceRemoteSourceTranscoding").checked=!!(null===(m=e.Policy)||void 0===m?void 0:m.ForceRemoteSourceTranscoding),w.querySelector(".chkRemoteAccess").checked=null==(null===(p=e.Policy)||void 0===p?void 0:p.EnableRemoteAccess)||(null===(k=e.Policy)||void 0===k?void 0:k.EnableRemoteAccess),w.querySelector("#txtRemoteClientBitrateLimit").value=(null===(x=e.Policy)||void 0===x?void 0:x.RemoteClientBitrateLimit)&&(null===(A=e.Policy)||void 0===A?void 0:A.RemoteClientBitrateLimit)>0?((null===(P=e.Policy)||void 0===P?void 0:P.RemoteClientBitrateLimit)/1e6).toLocaleString(void 0,{maximumFractionDigits:6}):"",w.querySelector("#txtLoginAttemptsBeforeLockout").value=String(null===(S=e.Policy)||void 0===S?void 0:S.LoginAttemptsBeforeLockout)||"-1",w.querySelector("#txtMaxActiveSessions").value=String(null===(g=e.Policy)||void 0===g?void 0:g.MaxActiveSessions)||"0",w.querySelector("#selectSyncPlayAccess").value=String(null===(j=e.Policy)||void 0===j?void 0:j.SyncPlayAccess),f.Ay.hide()}else console.error("[useredit] Unexpected null page reference")}),[O]),ye=(0,o.useCallback)((function(){J?(f.Ay.show(),ve(J)):console.error("[profile] No user available")}),[J,ve]);(0,o.useEffect)((function(){K&&ye()}),[ye,K]),(0,o.useEffect)((function(){var e=se.current;if(e){var n=function(n){return f.Ay.show(),J&&function(n){if(!n.Id||!n.Policy)throw new Error("Unexpected null user id or policy");var l;n.Name=e.querySelector("#txtUserName").value.trim(),n.Policy.IsAdministrator=e.querySelector(".chkIsAdmin").checked,n.Policy.IsHidden=e.querySelector(".chkIsHidden").checked,n.Policy.IsDisabled=e.querySelector(".chkDisabled").checked,n.Policy.EnableRemoteControlOfOtherUsers=e.querySelector(".chkEnableRemoteControlOtherUsers").checked,n.Policy.EnableLiveTvManagement=e.querySelector(".chkManageLiveTv").checked,n.Policy.EnableLiveTvAccess=e.querySelector(".chkEnableLiveTvAccess").checked,n.Policy.EnableSharedDeviceControl=e.querySelector(".chkRemoteControlSharedDevices").checked,n.Policy.EnableMediaPlayback=e.querySelector(".chkEnableMediaPlayback").checked,n.Policy.EnableAudioPlaybackTranscoding=e.querySelector(".chkEnableAudioPlaybackTranscoding").checked,n.Policy.EnableVideoPlaybackTranscoding=e.querySelector(".chkEnableVideoPlaybackTranscoding").checked,n.Policy.EnablePlaybackRemuxing=e.querySelector(".chkEnableVideoPlaybackRemuxing").checked,n.Policy.EnableCollectionManagement=e.querySelector(".chkEnableCollectionManagement").checked,n.Policy.EnableSubtitleManagement=e.querySelector(".chkEnableSubtitleManagement").checked,n.Policy.ForceRemoteSourceTranscoding=e.querySelector(".chkForceRemoteSourceTranscoding").checked,n.Policy.EnableContentDownloading=e.querySelector(".chkEnableDownloading").checked,n.Policy.EnableRemoteAccess=e.querySelector(".chkRemoteAccess").checked,n.Policy.RemoteClientBitrateLimit=Math.floor(1e6*parseFloat(e.querySelector("#txtRemoteClientBitrateLimit").value||"0")),n.Policy.LoginAttemptsBeforeLockout=parseInt(e.querySelector("#txtLoginAttemptsBeforeLockout").value||"0",10),n.Policy.MaxActiveSessions=parseInt(e.querySelector("#txtMaxActiveSessions").value||"0",10),n.Policy.AuthenticationProviderId=e.querySelector("#selectLoginProvider").value,n.Policy.PasswordResetProviderId=e.querySelector("#selectPasswordResetProvider").value,n.Policy.EnableContentDeletion=e.querySelector(".chkEnableDeleteAllFolders").checked,n.Policy.EnableContentDeletionFromFolders=n.Policy.EnableContentDeletion?[]:(l=e.querySelectorAll(".chkFolder"),Array.prototype.filter.call(l,(function(e){return e.checked})).map((function(e){return e.getAttribute("data-id")}))),n.Policy.SyncPlayAccess=e.querySelector("#selectSyncPlayAccess").value,ce.mutate({userId:n.Id,userDto:n},{onSuccess:function(){n.Id&&ae.mutate({userId:n.Id,userPolicy:n.Policy||{PasswordResetProviderId:"",AuthenticationProviderId:""}},{onSuccess:function(){f.Ay.hide(),t("/dashboard/users",{state:{openSavedToast:!0}})}})}})}(J),n.preventDefault(),n.stopPropagation(),!1},l=function(){window.history.back()};return e.querySelector(".chkEnableDeleteAllFolders").addEventListener("change",(function(){e.querySelector(".deleteAccess").classList.toggle("hide",this.checked)})),e.querySelector(".editUserProfileForm").addEventListener("submit",n),e.querySelector("#btnCancel").addEventListener("click",l),function(){e.querySelector(".editUserProfileForm").removeEventListener("submit",n),e.querySelector("#btnCancel").removeEventListener("click",l)}}console.error("[useredit] Unexpected null page reference")}),[ye,ce,J,ae,t]);var be,fe=null==z?void 0:z.map((function(e){var t=e.Id===U||z.length<2?" selected":"";return'<option value="'.concat(e.Id,'"').concat(t,">").concat(i()(e.Name),"</option>")})),me=null==W?void 0:W.map((function(e){var t=e.Id===B||W.length<2?" selected":"";return'<option value="'.concat(e.Id,'"').concat(t,">").concat(i()(e.Name),"</option>")}));return(0,l.jsx)(p.A,{id:"editUserPage",className:"mainAnimatedPage type-interior",children:(0,l.jsxs)("div",{ref:se,className:"content-primary",children:[(0,l.jsx)("div",{className:"verticalSection",children:(0,l.jsx)(y.A,{title:(null==J?void 0:J.Name)||""})}),(0,l.jsx)(b.A,{activeTab:"useredit"}),(0,l.jsx)("div",{className:"lnkEditUserPreferencesContainer",style:{paddingBottom:"1em"},children:(0,l.jsx)(h.A,{className:"lnkEditUserPreferences button-link",href:(null==J?void 0:J.Id)?"mypreferencesmenu?userId=".concat(J.Id):void 0,children:s.Ay.translate("ButtonEditOtherUserPreferences")})}),(0,l.jsxs)("form",{className:"editUserProfileForm",children:[(0,l.jsx)("div",{className:"disabledUserBanner hide",children:(0,l.jsxs)("div",{className:"btn btnDarkAccent btnStatic",children:[(0,l.jsx)("div",{children:s.Ay.translate("HeaderThisUserIsCurrentlyDisabled")}),(0,l.jsx)("div",{style:{marginTop:5},children:s.Ay.translate("MessageReenableUser")})]})}),(0,l.jsx)("div",{id:"fldUserName",className:"inputContainer",children:(0,l.jsx)(v.A,{type:"text",id:"txtUserName",label:s.Ay.translate("LabelName"),required:!0})}),(0,l.jsxs)("div",{className:"selectContainer fldSelectLoginProvider hide",children:[(0,l.jsx)(m.A,{id:"selectLoginProvider",label:"LabelAuthProvider",children:fe}),(0,l.jsx)("div",{className:"fieldDescription",children:s.Ay.translate("AuthProviderHelp")})]}),(0,l.jsxs)("div",{className:"selectContainer fldSelectPasswordResetProvider hide",children:[(0,l.jsx)(m.A,{id:"selectPasswordResetProvider",label:"LabelPasswordResetProvider",children:me}),(0,l.jsx)("div",{className:"fieldDescription",children:s.Ay.translate("PasswordResetProviderHelp")})]}),(0,l.jsxs)("div",{className:"checkboxContainer checkboxContainer-withDescription fldRemoteAccess hide",children:[(0,l.jsx)(u.A,{className:"chkRemoteAccess",title:"AllowRemoteAccess"}),(0,l.jsx)("div",{className:"fieldDescription checkboxFieldDescription",children:s.Ay.translate("AllowRemoteAccessHelp")})]}),(0,l.jsx)(u.A,{labelClassName:"checkboxContainer",className:"chkIsAdmin",title:"OptionAllowUserToManageServer"}),(0,l.jsx)(u.A,{labelClassName:"checkboxContainer",className:"chkEnableCollectionManagement",title:"AllowCollectionManagement"}),(0,l.jsx)(u.A,{labelClassName:"checkboxContainer",className:"chkEnableSubtitleManagement",title:"AllowSubtitleManagement"}),(0,l.jsxs)("div",{id:"featureAccessFields",className:"verticalSection",children:[(0,l.jsx)("h2",{className:"paperListLabel",children:s.Ay.translate("HeaderFeatureAccess")}),(0,l.jsxs)("div",{className:"checkboxList paperList",style:{padding:".5em 1em"},children:[(0,l.jsx)(u.A,{className:"chkEnableLiveTvAccess",title:"OptionAllowBrowsingLiveTv"}),(0,l.jsx)(u.A,{className:"chkManageLiveTv",title:"OptionAllowManageLiveTv"})]})]}),(0,l.jsxs)("div",{className:"verticalSection",children:[(0,l.jsx)("h2",{className:"paperListLabel",children:s.Ay.translate("HeaderPlayback")}),(0,l.jsxs)("div",{className:"checkboxList paperList",style:{padding:".5em 1em"},children:[(0,l.jsx)(u.A,{className:"chkEnableMediaPlayback",title:"OptionAllowMediaPlayback"}),(0,l.jsx)(u.A,{className:"chkEnableAudioPlaybackTranscoding",title:"OptionAllowAudioPlaybackTranscoding"}),(0,l.jsx)(u.A,{className:"chkEnableVideoPlaybackTranscoding",title:"OptionAllowVideoPlaybackTranscoding"}),(0,l.jsx)(u.A,{className:"chkEnableVideoPlaybackRemuxing",title:"OptionAllowVideoPlaybackRemuxing"}),(0,l.jsx)(u.A,{className:"chkForceRemoteSourceTranscoding",title:"OptionForceRemoteSourceTranscoding"})]}),(0,l.jsx)("div",{className:"fieldDescription",children:s.Ay.translate("OptionAllowMediaPlaybackTranscodingHelp")})]}),(0,l.jsx)("br",{}),(0,l.jsx)("div",{className:"verticalSection",children:(0,l.jsxs)("div",{className:"inputContainer",children:[(0,l.jsx)(v.A,{type:"number",id:"txtRemoteClientBitrateLimit",label:s.Ay.translate("LabelRemoteClientBitrateLimit"),inputMode:"decimal",pattern:"[0-9]*(.[0-9]+)?",min:"0",step:".25"}),(0,l.jsx)("div",{className:"fieldDescription",children:s.Ay.translate("LabelRemoteClientBitrateLimitHelp")}),(0,l.jsx)("div",{className:"fieldDescription",children:s.Ay.translate("LabelUserRemoteClientBitrateLimitHelp")})]})}),(0,l.jsx)("div",{className:"verticalSection",children:(0,l.jsxs)("div",{className:"selectContainer fldSelectSyncPlayAccess",children:[(0,l.jsx)(m.A,{id:"selectSyncPlayAccess",label:"LabelSyncPlayAccess",children:(be="",be+="<option value='CreateAndJoinGroups'>".concat(s.Ay.translate("LabelSyncPlayAccessCreateAndJoinGroups"),"</option>"),be+="<option value='JoinGroups'>".concat(s.Ay.translate("LabelSyncPlayAccessJoinGroups"),"</option>"),be+="<option value='None'>".concat(s.Ay.translate("LabelSyncPlayAccessNone"),"</option>"))}),(0,l.jsx)("div",{className:"fieldDescription",children:s.Ay.translate("SyncPlayAccessHelp")})]})}),(0,l.jsxs)("div",{className:"verticalSection",children:[(0,l.jsx)("h2",{className:"checkboxListLabel",style:{marginBottom:"1em"},children:s.Ay.translate("HeaderAllowMediaDeletionFrom")}),(0,l.jsxs)("div",{className:"checkboxList paperList checkboxList-paperList",children:[(0,l.jsx)(u.A,{labelClassName:"checkboxContainer",className:"chkEnableDeleteAllFolders",title:"AllLibraries"}),(0,l.jsx)("div",{className:"deleteAccess",children:P.map((function(e){return(0,l.jsx)(u.A,{className:"chkFolder",itemId:e.Id,itemName:e.Name,itemCheckedAttribute:e.checkedAttribute},e.Id)}))})]})]}),(0,l.jsxs)("div",{className:"verticalSection",children:[(0,l.jsx)("h2",{className:"checkboxListLabel",children:s.Ay.translate("HeaderRemoteControl")}),(0,l.jsxs)("div",{className:"checkboxList paperList",style:{padding:".5em 1em"},children:[(0,l.jsx)(u.A,{className:"chkEnableRemoteControlOtherUsers",title:"OptionAllowRemoteControlOthers"}),(0,l.jsx)(u.A,{className:"chkRemoteControlSharedDevices",title:"OptionAllowRemoteSharedDevices"})]}),(0,l.jsx)("div",{className:"fieldDescription",children:s.Ay.translate("OptionAllowRemoteSharedDevicesHelp")})]}),(0,l.jsx)("h2",{className:"checkboxListLabel",children:s.Ay.translate("Other")}),(0,l.jsxs)("div",{className:"checkboxContainer checkboxContainer-withDescription",children:[(0,l.jsx)(u.A,{className:"chkEnableDownloading",title:"OptionAllowContentDownload"}),(0,l.jsx)("div",{className:"fieldDescription checkboxFieldDescription",children:s.Ay.translate("OptionAllowContentDownloadHelp")})]}),(0,l.jsxs)("div",{className:"checkboxContainer checkboxContainer-withDescription",id:"fldIsEnabled",children:[(0,l.jsx)(u.A,{className:"chkDisabled",title:"OptionDisableUser"}),(0,l.jsx)("div",{className:"fieldDescription checkboxFieldDescription",children:s.Ay.translate("OptionDisableUserHelp")})]}),(0,l.jsxs)("div",{className:"checkboxContainer checkboxContainer-withDescription",id:"fldIsHidden",children:[(0,l.jsx)(u.A,{className:"chkIsHidden",title:"OptionHideUser"}),(0,l.jsx)("div",{className:"fieldDescription checkboxFieldDescription",children:s.Ay.translate("OptionHideUserFromLoginHelp")})]}),(0,l.jsx)("br",{}),(0,l.jsx)("div",{className:"verticalSection",children:(0,l.jsxs)("div",{className:"inputContainer",id:"fldLoginAttemptsBeforeLockout",children:[(0,l.jsx)(v.A,{type:"number",id:"txtLoginAttemptsBeforeLockout",label:s.Ay.translate("LabelUserLoginAttemptsBeforeLockout"),min:-1,step:1}),(0,l.jsx)("div",{className:"fieldDescription",children:s.Ay.translate("OptionLoginAttemptsBeforeLockout")}),(0,l.jsx)("div",{className:"fieldDescription",children:s.Ay.translate("OptionLoginAttemptsBeforeLockoutHelp")})]})}),(0,l.jsx)("br",{}),(0,l.jsx)("div",{className:"verticalSection",children:(0,l.jsxs)("div",{className:"inputContainer",id:"fldMaxActiveSessions",children:[(0,l.jsx)(v.A,{type:"number",id:"txtMaxActiveSessions",label:s.Ay.translate("LabelUserMaxActiveSessions"),min:0,step:1}),(0,l.jsx)("div",{className:"fieldDescription",children:s.Ay.translate("OptionMaxActiveSessions")}),(0,l.jsx)("div",{className:"fieldDescription",children:s.Ay.translate("OptionMaxActiveSessionsHelp")})]})}),(0,l.jsx)("br",{}),(0,l.jsxs)("div",{children:[(0,l.jsx)(d.A,{type:"submit",className:"raised button-submit block",title:s.Ay.translate("Save")}),(0,l.jsx)(d.A,{type:"button",id:"btnCancel",className:"raised button-cancel block",title:s.Ay.translate("ButtonCancel")})]})]})]})})}},58702:function(e,t,n){var l=n(62540),r=n(63696),i=n(5898),o=n(89100),c=n(84851);function a(e){return r.useCallback((function(){(0,o.navigate)(e,!0).catch((function(e){console.warn("Error navigating to dashboard url",e)}))}),[e])}t.A=function(e){var t=e.activeTab,n=a("/dashboard/users/profile"),r=a("/dashboard/users/access"),o=a("/dashboard/users/parentalcontrol"),s=a("/dashboard/users/password");return(0,l.jsxs)("div",{"data-role":"controlgroup","data-type":"horizontal",className:"localnav",children:[(0,l.jsx)(c.A,{href:"#","data-role":"button",className:"useredit"===t?"ui-btn-active":"",onClick:n,children:i.Ay.translate("Profile")}),(0,l.jsx)(c.A,{href:"#","data-role":"button",className:"userlibraryaccess"===t?"ui-btn-active":"",onClick:r,children:i.Ay.translate("TabAccess")}),(0,l.jsx)(c.A,{href:"#","data-role":"button",className:"userparentalcontrol"===t?"ui-btn-active":"",onClick:o,children:i.Ay.translate("TabParentalControl")}),(0,l.jsx)(c.A,{href:"#","data-role":"button",className:"userpassword"===t?"ui-btn-active":"",onClick:s,children:i.Ay.translate("HeaderPassword")})]})}},67692:function(e,t,n){var l=n(62540),r=(n(63696),n(5898)),i=function(e){var t=e.name,n=e.id,l=e.required,r=e.label,i=e.option;return{__html:'<select\n is="emby-select"\n '.concat(t,'\n id="').concat(n,'"\n ').concat(l,'\n label="').concat(r,'"\n >\n ').concat(i,"\n </select>")}};t.A=function(e){var t=e.name,n=e.id,o=e.required,c=e.label,a=e.children;return(0,l.jsx)("div",{dangerouslySetInnerHTML:i({name:t?"name='".concat(t,"'"):"",id:n,required:o?"required='".concat(o,"'"):"",label:r.Ay.translate(c),option:a})})}}}]);