"use strict";(self.webpackChunkcentreon=self.webpackChunkcentreon||[]).push([["1663"],{53994:function(e,t,r){var n=r(88619);t.default=void 0;var o=n(r(14420)),a=r(52676);t.default=(0,o.default)((0,a.jsx)("path",{d:"M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5M12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5m0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3"}),"Visibility")},64113:function(e,t,r){var n=r(88619);t.default=void 0;var o=n(r(14420)),a=r(52676);t.default=(0,o.default)((0,a.jsx)("path",{d:"M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7M2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2m4.31-.78 3.15 3.15.02-.16c0-1.66-1.34-3-3-3z"}),"VisibilityOff")},63128:function(e,t,r){var n=r(59869),o=r(83192),a=r(1975),i=r(54461),s=r(46436),u=r(56517),c=r(81775),l=r(99045),d=r(44445),f=r(47883),p=r(52676);let m=["className","color","disableShrink","size","style","thickness","value","variant"],b=e=>e,g,v,h,y,w=(0,u.F4)(g||(g=b`
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
`)),O=(0,u.F4)(v||(v=b`
  0% {
    stroke-dasharray: 1px, 200px;
    stroke-dashoffset: 0;
  }

  50% {
    stroke-dasharray: 100px, 200px;
    stroke-dashoffset: -15px;
  }

  100% {
    stroke-dasharray: 100px, 200px;
    stroke-dashoffset: -125px;
  }
`)),P=e=>{let{classes:t,variant:r,color:n,disableShrink:o}=e,a={root:["root",r,`color${(0,c.Z)(n)}`],svg:["svg"],circle:["circle",`circle${(0,c.Z)(r)}`,o&&"circleDisableShrink"]};return(0,s.Z)(a,f.C,t)},Z=(0,d.ZP)("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.root,t[r.variant],t[`color${(0,c.Z)(r.color)}`]]}})(({ownerState:e,theme:t})=>(0,o.Z)({display:"inline-block"},"determinate"===e.variant&&{transition:t.transitions.create("transform")},"inherit"!==e.color&&{color:(t.vars||t).palette[e.color].main}),({ownerState:e})=>"indeterminate"===e.variant&&(0,u.iv)(h||(h=b`
      animation: ${0} 1.4s linear infinite;
    `),w)),S=(0,d.ZP)("svg",{name:"MuiCircularProgress",slot:"Svg",overridesResolver:(e,t)=>t.svg})({display:"block"}),E=(0,d.ZP)("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(e,t)=>{let{ownerState:r}=e;return[t.circle,t[`circle${(0,c.Z)(r.variant)}`],r.disableShrink&&t.circleDisableShrink]}})(({ownerState:e,theme:t})=>(0,o.Z)({stroke:"currentColor"},"determinate"===e.variant&&{transition:t.transitions.create("stroke-dashoffset")},"indeterminate"===e.variant&&{strokeDasharray:"80px, 200px",strokeDashoffset:0}),({ownerState:e})=>"indeterminate"===e.variant&&!e.disableShrink&&(0,u.iv)(y||(y=b`
      animation: ${0} 1.4s ease-in-out infinite;
    `),O)),j=a.forwardRef(function(e,t){let r=(0,l.i)({props:e,name:"MuiCircularProgress"}),{className:a,color:s="primary",disableShrink:u=!1,size:c=40,style:d,thickness:f=3.6,value:b=0,variant:g="indeterminate"}=r,v=(0,n.Z)(r,m),h=(0,o.Z)({},r,{color:s,disableShrink:u,size:c,thickness:f,value:b,variant:g}),y=P(h),w={},O={},j={};if("determinate"===g){let e=2*Math.PI*((44-f)/2);w.strokeDasharray=e.toFixed(3),j["aria-valuenow"]=Math.round(b),w.strokeDashoffset=`${((100-b)/100*e).toFixed(3)}px`,O.transform="rotate(-90deg)"}return(0,p.jsx)(Z,(0,o.Z)({className:(0,i.Z)(y.root,a),style:(0,o.Z)({width:c,height:c},O,d),ownerState:h,ref:t,role:"progressbar"},j,v,{children:(0,p.jsx)(S,{className:y.svg,ownerState:h,viewBox:`${22} ${22} 44 44`,children:(0,p.jsx)(E,{className:y.circle,style:w,ownerState:h,cx:44,cy:44,r:(44-f)/2,fill:"none",strokeWidth:f})})}))});t.Z=j},47883:function(e,t,r){r.d(t,{C:function(){return a}});var n=r(94078),o=r(82626);function a(e){return(0,o.ZP)("MuiCircularProgress",e)}let i=(0,n.Z)("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);t.Z=i},63363:function(e,t,r){var n=r(87146),o=r(22833),a=r(59544),i=r(8663),s=r(1975),u=(0,n.ZL)()(function(e){return{button:{padding:e.spacing(.25)},tooltip:{background:e.palette.background.tooltip}}});t.Z=function(e){var t=e.title,r=e.ariaLabel,n=e.className,c=e.tooltipPlacement,l=e.tooltipClassName,d=function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],!(t.indexOf(r)>=0)&&(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++){if(r=a[n],!(t.indexOf(r)>=0))Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}}return o}(e,["title","ariaLabel","className","tooltipPlacement","tooltipClassName"]),f=u(),p=f.classes,m=f.cx;return s.createElement(o.Z,{classes:{tooltip:m(p.tooltip,l)},placement:c,title:void 0===t?"":t},s.createElement("span",{"aria-label":void 0},s.createElement(a.Z,function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){var n,o,a;n=e,o=t,a=r[t],o in n?Object.defineProperty(n,o,{value:a,enumerable:!0,configurable:!0,writable:!0}):n[o]=a})}return e}({"aria-label":r,className:m(p.button,n),color:"primary","data-testid":r,id:(0,i.t)(r||"")},d))))}},48873:function(e,t,r){var n=r(1975),o=r(85824),a=r(4822),i=r(87146),s=r(76014),u=r(49559),c=r(22833),l=r(6943),d=r(78653),f=r(8663),p=r(23562),m=r(1975);function b(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function g(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){b(e,t,r[t])})}return e}function v(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r.push.apply(r,n)}return r})(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}var h=(0,i.ZL)()(function(e){return{autoSizeCompact:{paddingRight:e.spacing(1),paddingTop:e.spacing(.6)},hiddenText:{display:"table",lineHeight:0,transform:"scaleY(0)"},input:{fontSize:e.typography.body1.fontSize},inputBase:{display:"inline-flex",justifyItems:"start",paddingRight:e.spacing(1)},noLabelInput:{padding:e.spacing(1)},textField:{transition:e.transitions.create(["width"],{duration:e.transitions.duration.shortest})},transparent:{backgroundColor:"transparent"}}}),y=function(e){var t=e.label,r=e.position,n=e.children;return m.createElement(s.Z,v(g({},!t&&{style:{marginTop:0}}),{position:r}),n)},w=(0,n.forwardRef)(function(e,t){var r,i,s=e.StartAdornment,w=e.EndAdornment,O=e.label,P=e.error,Z=e.ariaLabel,S=e.dataTestId,E=e.transparent,j=e.size,x=e.displayErrorInTooltip,C=void 0!==x&&x,M=e.className,k=e.autoSize,D=void 0!==k&&k,T=e.debounced,I=void 0!==T&&T,A=e.autoSizeDefaultWidth,N=e.externalValueForAutoSize,z=e.autoSizeCustomPadding,R=e.defaultValue,V=e.required,F=e.containerClassName,_=e.type,L=e.forceUncontrolled,$=function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],!(t.indexOf(r)>=0)&&(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++){if(r=a[n],!(t.indexOf(r)>=0))Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}}return o}(e,["StartAdornment","EndAdornment","label","error","ariaLabel","dataTestId","transparent","size","displayErrorInTooltip","className","autoSize","debounced","autoSizeDefaultWidth","externalValueForAutoSize","autoSizeCustomPadding","defaultValue","required","containerClassName","type","forceUncontrolled"]),q=h(),H=q.classes,U=q.cx,B=(0,p.Z)({autoSize:D,autoSizeCustomPadding:(0,o.Z)(_,"number")?Math.max(6,z||0):z,autoSizeDefaultWidth:void 0===A?0:A,value:N||$.value}),K=B.inputRef,W=B.width,G=B.changeInputValue,X=B.innerValue,J=C&&!(0,a.Z)(P)?P:"",Y=(0,n.useCallback)(function(){return I||L?{}:R?{defaultValue:R}:{value:X}},[X,I,R,L]);return m.createElement(u.Z,{className:F,sx:{width:D?"auto":"100%"}},m.createElement(c.Z,{placement:"top",title:J},m.createElement(l.Z,v(g({"data-testid":S,error:!(0,a.Z)(P),helperText:C?void 0:P,id:(0,f.t)(S||""),inputProps:g({"aria-label":Z,"data-testid":S},$.inputProps),label:O,ref:t,size:j||"small",onChange:G},Y(),$),{InputProps:g({className:U(H.inputBase,(b(i={},H.transparent,void 0!==E&&E),b(i,H.autoSizeCompact,D&&(0,o.Z)(j,"compact")),i),M),endAdornment:m.createElement(y,{label:O,position:"end"},w?m.createElement(w,null):null===(r=$.InputProps)||void 0===r?void 0:r.endAdornment),startAdornment:s&&m.createElement(y,{label:O,position:"start"},m.createElement(s,null))},$.InputProps),className:H.textField,required:void 0!==V&&V,sx:g({width:D?W:void 0},null==$?void 0:$.sx),type:_}))),D&&m.createElement(d.Z,{className:H.hiddenText,ref:K},$.value||N||X))});t.Z=w},23562:function(e,t,r){var n=r(1975),o=r(21294);function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r,n,o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var a=[],i=!0,s=!1;try{for(o=o.call(e);!(i=(r=o.next()).done)&&(a.push(r.value),!t||a.length!==t);i=!0);}catch(e){s=!0,n=e}finally{try{!i&&null!=o.return&&o.return()}finally{if(s)throw n}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return a(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return a(e,t)}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}t.Z=function(e){var t=e.autoSize,r=e.autoSizeDefaultWidth,a=e.value,s=e.autoSizeCustomPadding,u=i((0,n.useState)(a||""),2),c=u[0],l=u[1],d=i((0,n.useState)(r),2),f=d[0],p=d[1],m=(0,n.useRef)(),b=(0,o.Z)(),g=t&&(a||c);return(0,n.useEffect)(function(){if(!!t){var e,n=(null===(e=m.current)||void 0===e?void 0:e.getBoundingClientRect().width)||0;p(n<r?r:n)}},[g]),{changeInputValue:function(e){l(e.target.value)},innerValue:c,inputRef:m,width:"calc(".concat(f,"px + ").concat(b.spacing(s||4.5),")")}}},56864:function(e,t,r){r.d(t,{r:function(){return s}});var n=r(4822),o=r(94600),a=r(85824),i=r(48713),s=function(e){var t,r,s,u,c=e.endpoint,l=e.catchError,d=void 0===l?function(){}:l,f=e.signal,p=e.headers,m=e.decoder,b=e.defaultFailureMessage,g=void 0===b?"Something went wrong":b,v=e.isMutation,h=e.payload,y=e.method,w=void 0===y?"GET":y,O=e.baseEndpoint,P=void 0===O?"./api/latest":O,Z={headers:p,method:w,signal:f};return fetch((0,n.Z)(P)||(0,o.Z)(P,c)||(0,o.Z)("./api/internal.php",c)?c:"".concat(P).concat(c),void 0!==v&&v?(s=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){var n,o,a;n=e,o=t,a=r[t],o in n?Object.defineProperty(n,o,{value:a,enumerable:!0,configurable:!0,writable:!0}):n[o]=a})}return e}({},Z),u=(u={body:(t=h,null!=(r=FormData)&&"undefined"!=typeof Symbol&&r[Symbol.hasInstance]?!!r[Symbol.hasInstance](t):t instanceof r)?h:JSON.stringify(h)},u),Object.getOwnPropertyDescriptors?Object.defineProperties(s,Object.getOwnPropertyDescriptors(u)):(function(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r.push.apply(r,n)}return r})(Object(u)).forEach(function(e){Object.defineProperty(s,e,Object.getOwnPropertyDescriptor(u,e))}),s):Z).then(function(e){return(0,a.Z)(e.status,204)?{isError:!1,message:""}:e.json().then(function(t){if(!e.ok){var r={code:-1,message:t.message||g};return d({data:t||r,statusCode:e.status}),{additionalInformation:t,isError:!0,message:t.message||g,statusCode:e.status}}return(0,a.Z)(e.status,207)?{data:t.results,isError:!1,message:"",statusCode:e.status}:m?m.decodeToPromise(t).catch(function(t){return d({data:{code:-1,message:t||g},statusCode:e.status}),{isError:!0,message:t||g,statusCode:e.status}}):t}).catch(function(){return(0,a.Z)(w,i.n.GET)?{isError:!0,message:g,statusCode:0}:null})}).catch(function(e){return d({data:{code:-1,message:e.message||g},statusCode:0}),{isError:!0,message:e.message||g,statusCode:0}})}},48713:function(e,t,r){r.d(t,{n:function(){return o}});var n,o,a=r(1975),i=r(33475),s=r(40281),u=r(70590),c=r(22850),l=r(39782),d=r(56864);function f(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){var n,o,a;n=e,o=t,a=r[t],o in n?Object.defineProperty(n,o,{value:a,enumerable:!0,configurable:!0,writable:!0}):n[o]=a})}return e}(n=o||(o={})).DELETE="DELETE",n.GET="GET",n.PATCH="PATCH",n.POST="POST",n.PUT="PUT";var p=console;t.Z=function(e){var t,r,n,o=e.getEndpoint,m=e.catchError,b=e.decoder,g=e.defaultFailureMessage,v=e.fetchHeaders,h=e.httpCodesBypassErrorSnackbar,y=void 0===h?[]:h,w=e.method,O=e.onMutate,P=e.onError,Z=e.onSuccess,S=e.onSettled,E=e.baseEndpoint,j=(0,c.Z)().showErrorMessage,x=(0,i.D)({mutationFn:function(e){var t=e||{},r=t._meta,n=t.payload;return(0,d.r)({baseEndpoint:E,catchError:m,decoder:b,defaultFailureMessage:g,endpoint:o(r),headers:new Headers(f({"Content-Type":"application/x-www-form-urlencoded"},v)),isMutation:!0,method:w,payload:n})},onError:P,onMutate:O,onSettled:S,onSuccess:function(e,t,r){if(null==e?void 0:e.isError){null==P||P(e,t,r);return}null==Z||Z(e,t,r)}}),C=function(){var e=x.data;(null==e?void 0:e.isError)&&(p.error(e.message),!(0,s.Z)((null==e?void 0:e.statusCode)||0,y)&&j(null==e?void 0:e.message))};return(0,a.useEffect)(function(){C()},(0,l.cZ)([x.data])),t=f({},(0,u.Z)(["isError"],x)),r=(r={isError:(null===(n=x.data)||void 0===n?void 0:n.isError)||!1,isMutating:x.isPending},r),Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):(function(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r.push.apply(r,n)}return r})(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}),t}},8663:function(e,t,r){r.d(t,{t:function(){return n}});var n=function(e){return null==e?void 0:e.replace(/[^A-Z0-9]+/gi,"")}},39782:function(e,t,r){r.d(t,{cZ:function(){return a},n7:function(){return i}});var n=r(1975),o=r(85824),a=function(e){var t=(0,n.useRef)(),r=(0,n.useRef)(0);return!(0,o.Z)(e,t.current)&&(t.current=e,r.current+=1),[r.current]},i=function(e){var t=e.Component,r=e.memoProps;return(0,n.useMemo)(function(){return t},a(r))}},84973:function(e,t,r){var n=r(89130),o=r(76014),a=r(53994),i=r(64113),s=r(63363),u=r(10548),c=r(1975);t.Z=function(e){var t=e.isVisible,r=e.changeVisibility,l=(0,n.useTranslation)().t,d=t?c.createElement(i.default,null):c.createElement(a.default,null),f=t?u.Yx:u.Xn;return c.createElement(o.Z,{position:"end"},c.createElement(s.Z,{ariaLabel:l(f),size:"small",onClick:r},d))}},93796:function(e,t,r){r.d(t,{CX:function(){return i},F8:function(){return o},xm:function(){return s}});var n=r(45067),o=n.hM.object({passwordIsExpired:n.hM.optional(n.hM.boolean),redirectUri:n.hM.string},"Redirect Decoder",{passwordIsExpired:"password_is_expired",redirectUri:"redirect_uri"}),a=n.hM.object({authenticationUri:n.hM.string,id:n.hM.number,isActive:n.hM.boolean,isForced:n.hM.optional(n.hM.boolean),name:n.hM.string},"Provider Condifugration",{authenticationUri:"authentication_uri",isActive:"is_active",isForced:"is_forced"}),i=n.hM.object({customText:n.hM.nullable(n.hM.string),iconSource:n.hM.nullable(n.hM.string),imageSource:n.hM.nullable(n.hM.string),platformName:n.hM.nullable(n.hM.string),textPosition:n.hM.nullable(n.hM.string)},"Provider Condifugration",{customText:"custom_text",iconSource:"icon_source",imageSource:"image_source",platformName:"platform_name",textPosition:"text_position"}),s=n.hM.array(a,"Providers Configuration List")},97830:function(e,t,r){r.d(t,{HI:function(){return i},gs:function(){return o},iz:function(){return a}});var n=r(25118),o="".concat(n.Zb,"/authentication/providers/configurations/local"),a="".concat(n.Zb,"/authentication/providers/configurations"),i="".concat(n.Zb,"/it-edition-extensions/login_page")},68901:function(e,t,r){var n=r(48713),o=r(93796),a=r(97830);t.Z=function(){return{sendLogin:(0,n.Z)({decoder:o.F8,getEndpoint:function(){return a.gs},httpCodesBypassErrorSnackbar:[401],method:n.n.POST}).mutateAsync}}},32473:function(e,t,r){var n=r(1975),o=r(45931),a=r(93535),i=r(71898),s=r(54082),u=r(85824),c=r(89130),l=r(87146),d=r(51688),f=r(80509),p=r(63128),m=r(48873),b=r(84973),g=r(16238),v=r(1975);function h(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function y(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var w="oldPassword",O="newPassword",P="newPasswordConfirmation",Z=[{getError:function(e){var t=e.errors,r=e.touched;return(0,a.Z)(w,r)?(0,a.Z)(w,t):void 0},getValue:function(e){return(0,a.Z)(w,e)},label:g.HC,name:w},{getError:function(e){var t=e.errors,r=e.touched;return(0,a.Z)(O,r)?(0,a.Z)(O,t):void 0},getValue:function(e){return(0,a.Z)(O,e)},label:g.KI,name:O},{getError:function(e){var t=e.errors,r=e.touched;return(0,a.Z)(P,r)?(0,a.Z)(P,t):void 0},getValue:function(e){return(0,a.Z)(P,e)},label:g.Xx,name:P}],S=(0,l.ZL)()(function(e){return{form:{display:"flex",flexDirection:"column",marginTop:e.spacing(3),rowGap:e.spacing(2)}}});t.Z=function(){var e,t,r,a=S().classes,l=(0,c.useTranslation)().t;var E=(e=(0,n.useState)((y(r={},P,!1),y(r,O,!1),y(r,w,!1),r)),t=2,function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r,n,o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var a=[],i=!0,s=!1;try{for(o=o.call(e);!(i=(r=o.next()).done)&&(a.push(r.value),!t||a.length!==t);i=!0);}catch(e){s=!0,n=e}finally{try{!i&&null!=o.return&&o.return()}finally{if(s)throw n}}return a}}(e,2)||function(e,t){if(e){if("string"==typeof e)return h(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return h(e,t)}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),j=E[0],x=E[1],C=(0,o.u6)(),M=C.handleSubmit,k=C.values,D=C.handleChange,T=C.errors,I=C.touched,A=C.handleBlur,N=C.isSubmitting,z=C.dirty,R=function(e){x(function(t){var r,n;return r=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){y(e,t,r[t])})}return e}({},t),n=null!=(n=y({},e,!t[e]))?n:{},Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(n)):(function(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r.push.apply(r,n)}return r})(Object(n)).forEach(function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(n,e))}),r})},V=(0,i.Z)((0,s.Z)(T))||N||(0,i.Z)(z);return v.createElement("form",{className:a.form,onSubmit:M},Z.map(function(e){var t=e.name,r=e.label,o=e.getValue,a=e.getError;return v.createElement(n.Fragment,{key:t},v.createElement(m.Z,{fullWidth:!0,required:!0,EndAdornment:function(){return v.createElement(b.Z,{changeVisibility:function(){return R(t)},isVisible:j[t]})},ariaLabel:l(r),error:a({errors:T,touched:I}),label:l(r),name:t,type:j[t]?"text":"password",value:o(k),onBlur:A(t),onChange:D(t)}),(0,u.Z)(t,w)&&v.createElement(d.Z,null))}),v.createElement(f.Z,{fullWidth:!0,"aria-label":l(g.HX),color:"primary",disabled:V,endIcon:N&&v.createElement(p.Z,{color:"inherit",size:20}),type:"submit",variant:"contained"},l(g.HX)))}},23161:function(e,t,r){r.d(t,{K:function(){return o}});var n=r(25118),o=function(e){return"".concat(n.Zb,"/authentication/users/").concat(e,"/password")}},26555:function(e,t,r){r.r(t);var n=r(1975),o=r(89130),a=r(9691),i=r(71898),s=r(4822),u=r(45931),c=r(87146),l=r(45749),d=r(78653),f=r(7697),p=r(99298),m=r(60736),b=r(79764),g=r(16238),v=r(30292),h=r(32473),y=r(1975),w=(0,c.ZL)()(function(e){return{container:{alignItems:"center",backgroundColor:e.palette.background.paper,display:"flex",flexDirection:"column",height:"100vh",justifyContent:"center",maxWidth:e.spacing(60),rowGap:e.spacing(2)},paper:{padding:e.spacing(4,3)}}}),O={newPassword:"",newPasswordConfirmation:"",oldPassword:""};t.default=function(){var e=w().classes,t=(0,o.useTranslation)().t,r=v.N.useNavigate(),c=(0,a.useAtomValue)(b.S),P=(0,v.Z)(),Z=P.submitResetPassword,S=P.validationSchema;return((0,n.useEffect)(function(){if(!(0,i.Z)((0,s.Z)(c))||(null==c?!void 0:!c.alias))r(p.Z.login)},[c]),(0,s.Z)(c)||(0,i.Z)(null==c?void 0:c.alias))?y.createElement(m.q,null):y.createElement("div",{className:e.container},y.createElement(f.d,null),y.createElement(l.Z,{className:e.paper},y.createElement(d.Z,{variant:"h4"},t(g.Ae)),y.createElement(u.J9,{initialValues:O,validationSchema:S,onSubmit:Z},y.createElement(h.Z,null))))}},79764:function(e,t,r){r.d(t,{S:function(){return n}});var n=(0,r(9691).atom)(null)},16238:function(e,t,r){r.d(t,{$I:function(){return u},Ae:function(){return n},HC:function(){return a},HX:function(){return l},KI:function(){return i},Ke:function(){return o},Xx:function(){return s},py:function(){return c},ut:function(){return d}});var n="Reset your password",o="Required",a="Current password",i="New password",s="New password confirmation",u="New passwords must match",c="The new password is the same as the old password",l="Reset password",d="Password renewed"},30292:function(e,t,r){r.d(t,{N:function(){return w}});var n=r(85824),o=r(71898),a=r(89130),i=r(70119),s=r(9691),u=r(83004),c=r(22850),l=r(7274),d=r(20268),f=r(36417),p=r(10548),m=r(68901),b=r(16238),g=r(23161),v=r(79764);function h(e){return(0,n.Z)(e,this.parent.newPassword)}function y(e){return(0,o.Z)((0,n.Z)(e,this.parent.oldPassword))}var w={useNavigate:u.useNavigate};t.Z=function(){var e=(0,a.useTranslation)().t,t=w.useNavigate(),r=(0,c.Z)().showSuccessMessage,n=(0,l.Z)({request:d.fP}).sendRequest,o=(0,s.useAtomValue)(v.S),u=(0,f.Z)(),O=(0,m.Z)().sendLogin;return{submitResetPassword:function(a,i){var s=i.setSubmitting;n({data:{new_password:a.newPassword,old_password:a.oldPassword},endpoint:(0,g.K)(null==o?void 0:o.alias)}).then(function(){r(e(b.ut)),O({payload:{login:null==o?void 0:o.alias,password:a.newPassword}}).then(function(n){var o,a=n.redirectUri;r(e(p.G1)),null===(o=u())||void 0===o||o.then(function(){return t(a)})})}).catch(function(){s(!1)})},validationSchema:i.Ry().shape({newPassword:i.Z_().test("match",e(b.py),y).required(e(b.Ke)),newPasswordConfirmation:i.Z_().test("match",e(b.$I),h).required(e(b.Ke)),oldPassword:i.Z_().required(e(b.Ke))})}}}}]);
//# sourceMappingURL=1663.7d601bfb07ce9b79e727.4cab0e9117605447936a.e8e7040a846d504f76a8.js.map