(self.webpackChunk_digicms_admin=self.webpackChunk_digicms_admin||[]).push([[5538],{78834:function(w,h,e){"use strict";e.d(h,{Z:function(){return rt}});var t=e(5173),r=e(58521),a=e(32735),v=e(5636),E=e(60216),m=e.n(E),P=e(72850),W=e(27677),x=e(27649),X=e(87933),k=e(41415),f=e(10369),M=e(49372),B=e(83281),R=e(954),T=e(10190);const b=({onSubmit:z,schema:Ze})=>{const{formatMessage:le}=(0,v.useIntl)();return a.createElement(R.ZP,null,a.createElement(x.o,null,a.createElement(R.bU,null,a.createElement(B.Formik,{enableReinitialize:!0,initialValues:{email:""},onSubmit:z,validationSchema:Ze,validateOnChange:!1},({values:Ee,errors:je,handleChange:re})=>a.createElement(r.Form,{noValidate:!0},a.createElement(R.sg,null,a.createElement(T.Z,null),a.createElement(P.x,{paddingTop:6,paddingBottom:7},a.createElement(M.Z,{as:"h1",variant:"alpha"},le({id:"Auth.form.button.password-recovery",defaultMessage:"Password Recovery"}))),je.errorMessage&&a.createElement(M.Z,{id:"global-form-error",role:"alert",tabIndex:-1,textColor:"danger600"},le({id:je.errorMessage,defaultMessage:"An error occurred"}))),a.createElement(W.K,{spacing:6},a.createElement(f.o,{error:je.email?le({id:je.email,defaultMessage:"This email is invalid."}):"",value:Ee.email,onChange:re,label:le({id:"Auth.form.email.label",defaultMessage:"Email"}),placeholder:le({id:"Auth.form.email.placeholder",defaultMessage:"kai@doe.com"}),name:"email",required:!0}),a.createElement(k.z,{type:"submit",fullWidth:!0},le({id:"Auth.form.button.forgot-password",defaultMessage:"Send Email"})))))),a.createElement(X.k,{justifyContent:"center"},a.createElement(P.x,{paddingTop:4},a.createElement(r.Link,{to:"/auth/login"},le({id:"Auth.link.ready",defaultMessage:"Ready to sign in?"}))))))};b.defaultProps={onSubmit:z=>z.preventDefault()},b.propTypes={onSubmit:m().func,schema:m().shape({type:m().string.isRequired}).isRequired};var _=b,y=()=>{const{formatMessage:z}=(0,v.useIntl)();return a.createElement(R.ZP,null,a.createElement(x.o,null,a.createElement(R.bU,null,a.createElement(R.sg,null,a.createElement(T.Z,null),a.createElement(P.x,{paddingTop:6,paddingBottom:7},a.createElement(M.Z,{as:"h1",variant:"alpha"},z({id:"app.containers.AuthPage.ForgotPasswordSuccess.title",defaultMessage:"Email sent"}))),a.createElement(M.Z,null,z({id:"app.containers.AuthPage.ForgotPasswordSuccess.text.email",defaultMessage:"It can take a few minutes to receive your password recovery link."})),a.createElement(P.x,{paddingTop:4},a.createElement(M.Z,null,z({id:"app.containers.AuthPage.ForgotPasswordSuccess.text.contact-admin",defaultMessage:"If you do not receive this link, please contact your administrator."}))))),a.createElement(X.k,{justifyContent:"center"},a.createElement(P.x,{paddingTop:4},a.createElement(r.Link,{to:"/auth/login"},z({id:"Auth.link.signin",defaultMessage:"Sign in"}))))))},Qe=()=>{const{formatMessage:z}=(0,v.useIntl)(),le=(0,r.useQuery)().get("info")||z({id:"Auth.components.Oops.text",defaultMessage:"Your account has been suspended."});return a.createElement(R.ZP,null,a.createElement(x.o,null,a.createElement(R.bU,null,a.createElement(R.sg,null,a.createElement(T.Z,null),a.createElement(P.x,{paddingTop:6,paddingBottom:7},a.createElement(M.Z,{as:"h1",variant:"alpha"},z({id:"Auth.components.Oops.title",defaultMessage:"Oops..."}))),a.createElement(M.Z,null,le),a.createElement(P.x,{paddingTop:4},a.createElement(M.Z,null,z({id:"Auth.components.Oops.text.admin",defaultMessage:"If this is a mistake, please contact your administrator."}))))),a.createElement(X.k,{justifyContent:"center"},a.createElement(P.x,{paddingTop:4},a.createElement(r.Link,{to:"/auth/login"},z({id:"Auth.link.signin",defaultMessage:"Sign in"}))))))},de=e(83292),ke=e(33795),o=e.n(ke),ge=e(9086),S=e.n(ge),O=e(5141),A=e(55721),pe=e(15335),$=e(5803),fe=e(60492),te=e(54894),Q=e(72218);const Re=(0,de.default)(P.x)`
  text-align: center;
`,mt=(0,de.default)(f.o)`
  ::-ms-reveal {
    display: none;
  }
`,tt=({authType:z,fieldsToDisable:Ze,noSignin:le,onSubmit:Ee,schema:je})=>{const re=(0,r.useNotification)(),{push:ve}=(0,O.useHistory)(),[Ye,Ce]=(0,a.useState)(!1),[He,$e]=(0,a.useState)(!1),[We,pt]=(0,a.useState)(0),[it,lt]=(0,a.useState)({}),{trackUsage:ft}=(0,r.useTracking)(),{formatMessage:se}=(0,v.useIntl)(),Xe=(0,r.useQuery)().get("registrationToken");return(0,a.useEffect)(()=>{Xe&&(async()=>{try{const{data:{data:G}}=await A.Z.get(`${strapi.backendURL}/admin/registration-info?registrationToken=${Xe}`);G&&lt(G)}catch(G){const Ae=o()(G,["response","data","message"],"An error occurred");re({type:"warning",message:Ae}),ve(`/auth/oops?info=${encodeURIComponent(Ae)}`)}})()},[Xe]),a.createElement(R.ZP,null,a.createElement(R.bU,null,a.createElement(B.Formik,{enableReinitialize:!0,initialValues:{firstname:it.firstname||"",lastname:it.lastname||"",email:it.email||"",password:"",confirmPassword:"",registrationToken:Xe||void 0,news:!1},onSubmit:async(Se,G)=>{try{await je.validate(Se,{abortEarly:!1}),We>0&&z==="register-admin"&&ft("didSubmitWithErrorsFirstAdmin",{count:We.toString()}),Ee(Xe?{userInfo:S()(Se,["registrationToken"]),registrationToken:Xe}:Se,G)}catch(Ae){const Ue=(0,r.getYupInnerErrors)(Ae);pt(We+1),G.setErrors(Ue)}},validateOnChange:!1},({values:Se,errors:G,handleChange:Ae})=>a.createElement(r.Form,{noValidate:!0},a.createElement(x.o,null,a.createElement(R.sg,null,a.createElement(T.Z,null),a.createElement(P.x,{paddingTop:6,paddingBottom:1},a.createElement(M.Z,{as:"h1",variant:"alpha"},se({id:"Auth.form.welcome.title",defaultMessage:"Welcome to Digi!"}))),a.createElement(Re,{paddingBottom:7},a.createElement(M.Z,{variant:"epsilon",textColor:"neutral600"},se({id:"Auth.form.register.subtitle",defaultMessage:"Credentials are only used to authenticate in Digicommerce. All saved data will be stored in your database."})))),a.createElement(W.K,{spacing:6},a.createElement(pe.r,{gap:4},a.createElement($.P,{col:6},a.createElement(f.o,{name:"firstname",required:!0,value:Se.firstname,error:G.firstname?se(G.firstname):void 0,onChange:Ae,label:se({id:"Auth.form.firstname.label",defaultMessage:"Firstname"})})),a.createElement($.P,{col:6},a.createElement(f.o,{name:"lastname",value:Se.lastname,onChange:Ae,label:se({id:"Auth.form.lastname.label",defaultMessage:"Lastname"})}))),a.createElement(f.o,{name:"email",disabled:Ze.includes("email"),value:Se.email,onChange:Ae,error:G.email?se(G.email):void 0,required:!0,label:se({id:"Auth.form.email.label",defaultMessage:"Email"}),type:"email"}),a.createElement(mt,{name:"password",onChange:Ae,value:Se.password,error:G.password?se(G.password):void 0,endAction:a.createElement(Q.Z,{onClick:Ue=>{Ue.preventDefault(),Ce(Ne=>!Ne)},label:se(Ye?{id:"Auth.form.password.show-password",defaultMessage:"Show password"}:{id:"Auth.form.password.hide-password",defaultMessage:"Hide password"})},Ye?a.createElement(te.default,null):a.createElement(fe.default,null)),hint:se({id:"Auth.form.password.hint",defaultMessage:"Must be at least 8 characters, 1 uppercase, 1 lowercase & 1 number"}),required:!0,label:se({id:"global.password",defaultMessage:"Password"}),type:Ye?"text":"password"}),a.createElement(mt,{name:"confirmPassword",onChange:Ae,value:Se.confirmPassword,error:G.confirmPassword?se(G.confirmPassword):void 0,endAction:a.createElement(Q.Z,{onClick:Ue=>{Ue.preventDefault(),$e(Ne=>!Ne)},label:se(He?{id:"Auth.form.password.show-password",defaultMessage:"Show password"}:{id:"Auth.form.password.hide-password",defaultMessage:"Hide password"})},He?a.createElement(te.default,null):a.createElement(fe.default,null)),required:!0,label:se({id:"Auth.form.confirmPassword.label",defaultMessage:"Confirm Password"}),type:He?"text":"password"}),a.createElement(k.z,{fullWidth:!0,size:"L",type:"submit"},se({id:"Auth.form.button.register",defaultMessage:"Let's start"})))))),!le&&a.createElement(P.x,{paddingTop:4},a.createElement(X.k,{justifyContent:"center"},a.createElement(r.Link,{label:"Auth.link.signin",to:"/auth/login"},se({id:"Auth.link.signin.account",defaultMessage:"Already have an account?"}))))))};tt.defaultProps={fieldsToDisable:[],noSignin:!1,onSubmit:z=>z.preventDefault()},tt.propTypes={authType:m().string.isRequired,fieldsToDisable:m().array,noSignin:m().bool,onSubmit:m().func,schema:m().shape({validate:m().func.isRequired,type:m().string.isRequired}).isRequired};var gt=tt;const he=(0,de.default)(f.o)`
  ::-ms-reveal {
    display: none;
  }
`,st=({onSubmit:z,schema:Ze})=>{const[le,Ee]=(0,a.useState)(!1),[je,re]=(0,a.useState)(!1),{formatMessage:ve}=(0,v.useIntl)();return a.createElement(R.ZP,null,a.createElement(x.o,null,a.createElement(R.bU,null,a.createElement(B.Formik,{enableReinitialize:!0,initialValues:{password:"",confirmPassword:""},onSubmit:z,validationSchema:Ze,validateOnChange:!1},({values:Ye,errors:Ce,handleChange:He})=>a.createElement(r.Form,{noValidate:!0},a.createElement(R.sg,null,a.createElement(T.Z,null),a.createElement(P.x,{paddingTop:6,paddingBottom:7},a.createElement(M.Z,{as:"h1",variant:"alpha"},ve({id:"global.reset-password",defaultMessage:"Reset password"}))),Ce.errorMessage&&a.createElement(M.Z,{id:"global-form-error",role:"alert",tabIndex:-1,textColor:"danger600"},ve({id:Ce.errorMessage,defaultMessage:"An error occurred"}))),a.createElement(W.K,{spacing:6},a.createElement(he,{name:"password",onChange:He,value:Ye.password,error:Ce.password?ve({id:Ce.password,defaultMessage:"This field is required."}):void 0,endAction:a.createElement(Q.Z,{onClick:$e=>{$e.preventDefault(),Ee(We=>!We)},label:ve(le?{id:"Auth.form.password.show-password",defaultMessage:"Show password"}:{id:"Auth.form.password.hide-password",defaultMessage:"Hide password"})},le?a.createElement(te.default,null):a.createElement(fe.default,null)),hint:ve({id:"Auth.form.password.hint",defaultMessage:"Password must contain at least 8 characters, 1 uppercase, 1 lowercase and 1 number"}),required:!0,label:ve({id:"global.password",defaultMessage:"Password"}),type:le?"text":"password"}),a.createElement(he,{name:"confirmPassword",onChange:He,value:Ye.confirmPassword,error:Ce.confirmPassword?ve({id:Ce.confirmPassword,defaultMessage:"This value is required."}):void 0,endAction:a.createElement(Q.Z,{onClick:$e=>{$e.preventDefault(),re(We=>!We)},label:ve(le?{id:"Auth.form.password.show-password",defaultMessage:"Show password"}:{id:"Auth.form.password.hide-password",defaultMessage:"Hide password"})},je?a.createElement(te.default,null):a.createElement(fe.default,null)),required:!0,label:ve({id:"Auth.form.confirmPassword.label",defaultMessage:"Confirm Password"}),type:je?"text":"password"}),a.createElement(k.z,{fullwidth:!0,type:"submit"},ve({id:"global.change-password",defaultMessage:"Change password"})))))),a.createElement(X.k,{justifyContent:"center"},a.createElement(P.x,{paddingTop:4},a.createElement(r.Link,{to:"/auth/login"},ve({id:"Auth.link.ready",defaultMessage:"Ready to sign in?"}))))))};st.defaultProps={onSubmit:z=>z.preventDefault()},st.propTypes={onSubmit:m().func,schema:m().shape({type:m().string.isRequired}).isRequired};var nt=st,et=function(){return window&&window.strapi&&window.strapi.isEE?e(98768).Z:e(5365).Z}(),at={"forgot-password":{Component:_,endPoint:"forgot-password",fieldsToDisable:[],fieldsToOmit:[],schema:t.Ry().shape({email:t.Z_().email(r.translatedErrors.email).required(r.translatedErrors.required)}),inputsPrefix:""},"forgot-password-success":{Component:y,endPoint:"",fieldsToDisable:[],fieldsToOmit:[],schema:null,inputsPrefix:""},login:{Component:et,endPoint:"login",fieldsToDisable:[],fieldsToOmit:["rememberMe"],schema:t.Ry().shape({email:t.Z_().email(r.translatedErrors.email).required(r.translatedErrors.required),password:t.Z_().required(r.translatedErrors.required),rememberMe:t.Xg().nullable()}),inputsPrefix:""},oops:{Component:Qe,endPoint:null,fieldsToDisable:[],fieldsToOmit:[],schema:null,inputsPrefix:""},register:{Component:gt,endPoint:"register",fieldsToDisable:["email"],fieldsToOmit:["userInfo.confirmPassword","userInfo.news","userInfo.email"],schema:t.Ry().shape({firstname:t.Z_().trim().required(r.translatedErrors.required),lastname:t.Z_(),password:t.Z_().min(8,r.translatedErrors.minLength).matches(/[a-z]/,"components.Input.error.contain.lowercase").matches(/[A-Z]/,"components.Input.error.contain.uppercase").matches(/\d/,"components.Input.error.contain.number").required(r.translatedErrors.required),confirmPassword:t.Z_().oneOf([t.iH("password"),null],"components.Input.error.password.noMatch").required(r.translatedErrors.required),registrationToken:t.Z_().required(r.translatedErrors.required)}),inputsPrefix:"userInfo."},"register-admin":{Component:gt,endPoint:"register-admin",noSignin:!0,fieldsToDisable:[],fieldsToOmit:["confirmPassword","news"],schema:t.Ry().shape({firstname:t.Z_().trim().required(r.translatedErrors.required),lastname:t.Z_(),password:t.Z_().min(8,r.translatedErrors.minLength).matches(/[a-z]/,"components.Input.error.contain.lowercase").matches(/[A-Z]/,"components.Input.error.contain.uppercase").matches(/\d/,"components.Input.error.contain.number").required(r.translatedErrors.required),email:t.Z_().email(r.translatedErrors.email).strict().lowercase(r.translatedErrors.lowercase).required(r.translatedErrors.required),confirmPassword:t.Z_().oneOf([t.iH("password"),null],"components.Input.error.password.noMatch").required(r.translatedErrors.required)}),inputsPrefix:""},"reset-password":{Component:nt,endPoint:"reset-password",fieldsToDisable:[],fieldsToOmit:["confirmPassword"],schema:t.Ry().shape({password:t.Z_().min(8,r.translatedErrors.minLength).matches(/[a-z]/,"components.Input.error.contain.lowercase").matches(/[A-Z]/,"components.Input.error.contain.uppercase").matches(/\d/,"components.Input.error.contain.number").required(r.translatedErrors.required),confirmPassword:t.Z_().oneOf([t.iH("password"),null],"components.Input.error.password.noMatch").required(r.translatedErrors.required)})}},rt=at},83983:function(w,h,e){"use strict";e.d(h,{Z:function(){return m}});var t=e(92891),a={contentManager:{main:[],collectionTypesConfigurations:[{action:"plugin::content-manager.collection-types.configure-view",subject:null}],componentsConfigurations:[{action:"plugin::content-manager.components.configure-layout",subject:null}],singleTypesConfigurations:[{action:"plugin::content-manager.single-types.configure-view",subject:null}]},marketplace:{main:[{action:"admin::marketplace.read",subject:null},{action:"admin::marketplace.plugins.install",subject:null},{action:"admin::marketplace.plugins.uninstall",subject:null}],install:[{action:"admin::marketplace.plugins.install",subject:null}],read:[{action:"admin::marketplace.read",subject:null},{action:"admin::marketplace.plugins.uninstall",subject:null}],uninstall:[{action:"admin::marketplace.plugins.uninstall",subject:null}]},settings:{auditLogs:{main:[{action:"admin::audit-logs.read",subject:null}],read:[{action:"admin::audit-logs.read",subject:null}]},roles:{main:[{action:"admin::roles.create",subject:null},{action:"admin::roles.update",subject:null},{action:"admin::roles.read",subject:null},{action:"admin::roles.delete",subject:null}],create:[{action:"admin::roles.create",subject:null}],delete:[{action:"admin::roles.delete",subject:null}],read:[{action:"admin::roles.read",subject:null}],update:[{action:"admin::roles.update",subject:null}]},users:{main:[{action:"admin::users.create",subject:null},{action:"admin::users.read",subject:null},{action:"admin::users.update",subject:null},{action:"admin::users.delete",subject:null}],create:[{action:"admin::users.create",subject:null}],delete:[{action:"admin::users.delete",subject:null}],read:[{action:"admin::users.read",subject:null}],update:[{action:"admin::users.update",subject:null}]},webhooks:{main:[{action:"admin::webhooks.create",subject:null},{action:"admin::webhooks.read",subject:null},{action:"admin::webhooks.update",subject:null},{action:"admin::webhooks.delete",subject:null}],create:[{action:"admin::webhooks.create",subject:null}],delete:[{action:"admin::webhooks.delete",subject:null}],read:[{action:"admin::webhooks.read",subject:null},{action:"admin::webhooks.update",subject:null},{action:"admin::webhooks.delete",subject:null}],update:[{action:"admin::webhooks.update",subject:null}]},"api-tokens":{main:[{action:"admin::api-tokens.access",subject:null}],create:[{action:"admin::api-tokens.create",subject:null}],delete:[{action:"admin::api-tokens.delete",subject:null}],read:[{action:"admin::api-tokens.read",subject:null}],update:[{action:"admin::api-tokens.update",subject:null}],regenerate:[{action:"admin::api-tokens.regenerate",subject:null}]},"project-settings":{read:[{action:"admin::project-settings.read",subject:null}],update:[{action:"admin::project-settings.update",subject:null}]}}},v=function(){return window&&window.strapi&&window.strapi.isEE?e(99568).Z:e(26123).Z}(),E=(0,t.merge)(a,v),m=E},16577:function(w,h,e){"use strict";e.r(h),e.d(h,{default:function(){return qs}});var t=e(32735),r=e(5141),a=e(12301),v=e(65810),E=e(86349),m=e.n(E),P=e(88423),W=e.n(P),x=e(93839),X=e.n(x),k=e(56784),f=e.n(k),M=e(99357),B=e(17247),R=e(13055);const T=(u,s)=>{let n=R.compose;const l=[];u.forEach(p=>{l.push(p())});const d=(0,R.createStore)(b(s,{}),{},n((0,R.applyMiddleware)(...l)));return d.asyncReducers={},d.injectReducer=(p,C)=>{d.asyncReducers[p]=C,d.replaceReducer(b(s,d.asyncReducers))},d},b=(u,s)=>(0,R.combineReducers)({...u,...s});var _=T,V=e(20284),y=e(58521),Pe=e(55721),Qe=e(10728),de=e(5636),ke=e(60216),o=e.n(ke);const ge=({component:u,path:s,...n})=>{const{pathname:l,search:d}=(0,r.useLocation)();return t.createElement(r.Route,{path:s,render:p=>y.auth.getToken()!==null?t.createElement(u,{...n,...p}):t.createElement(r.Redirect,{to:{pathname:"/auth/login",search:l!=="/"&&`?redirectTo=${encodeURIComponent(`${l}${d}`)}`}})})};ge.propTypes={component:o().any.isRequired,path:o().string.isRequired};var S=(0,t.memo)(ge),O=e(64421),A=e(41925),pe=e(16584),$=e(52136),fe=e(39515),te=e(7943),Q=e(33997),Re=e.n(Q),mt=e(39935),tt=e.n(mt),gt=e(33795),he=e.n(gt),st=e(9086),nt=e.n(st);const et="GUIDED_TOUR_CURRENT_STEP",at="GUIDED_TOUR_COMPLETED_STEPS",rt="GUIDED_TOUR_SKIPPED",z=JSON.parse,Ze=JSON.stringify;var Ee={clear(){localStorage.removeItem(et),localStorage.removeItem(at)},addCompletedStep(u){const s=z(localStorage.getItem(at))?.slice()||[];s.includes(u)||(s.push(u),localStorage.setItem(at,Ze(s)))},addCurrentStep(u){localStorage.setItem(et,Ze(u))},setSkipped(u){localStorage.setItem(rt,Ze(u))},get(u){return z(localStorage.getItem(u))}},je=e(20139),re=e(41832),Ye=u=>u,Ce=e(97889),He=e(92891);const $e={formErrors:{},modifiedData:{},requestError:null},We=(u,s)=>(0,Ce.default)(u,n=>{switch(s.type){case"ON_CHANGE":{(0,He.set)(n.modifiedData,s.keys.split("."),s.value);break}case"RESET_PROPS":return $e;case"SET_DATA":{n.modifiedData=s.data;break}case"SET_ERRORS":{n.formErrors=s.errors;break}case"SET_REQUEST_ERROR":{n.requestError={errorMessage:s.errorMessage,errorStatus:s.errorStatus};break}default:return n}});var pt=e(98399),it=["Component","endPoint","fieldsToDisable","fieldsToOmit","inputsPrefix","schema"];function lt(u,s){var n=Object.keys(u);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(u);s&&(l=l.filter(function(d){return Object.getOwnPropertyDescriptor(u,d).enumerable})),n.push.apply(n,l)}return n}function ft(u){for(var s=1;s<arguments.length;s++){var n=arguments[s]!=null?arguments[s]:{};s%2?lt(Object(n),!0).forEach(function(l){(0,pe.Z)(u,l,n[l])}):Object.getOwnPropertyDescriptors?Object.defineProperties(u,Object.getOwnPropertyDescriptors(n)):lt(Object(n)).forEach(function(l){Object.defineProperty(u,l,Object.getOwnPropertyDescriptor(n,l))})}return u}var se=function(){return window&&window.strapi&&window.strapi.isEE?e(7277).Z:e(78834).Z}(),Je=function(s){var n=s.hasAdmin,l=s.setHasAdmin,d=(0,r.useHistory)(),p=d.push,C=d.location.search,D=(0,je.Z)(),K=D.changeLocale,I=(0,y.useGuidedTour)(),F=I.setSkipped,Z=(0,y.useTracking)(),ee=Z.trackUsage,ce=(0,r.useRouteMatch)("/auth/:authType"),H=ce.params.authType,ae=(0,y.useQuery)(),be=he()(se,H,{}),Wt=be.Component,Nt=be.endPoint,Kt=be.fieldsToDisable,Ft=be.fieldsToOmit,_s=be.inputsPrefix,en=be.schema,tn=(0,te.Z)(be,it),sn=(0,t.useReducer)(We,$e,Ye),fs=(0,fe.Z)(sn,2),Gt=fs[0],nn=Gt.formErrors,an=Gt.modifiedData,on=Gt.requestError,Dt=fs[1],rn=Pe.Z.CancelToken,yt=rn.source();(0,t.useEffect)(function(){return function(){yt.cancel("Component unmounted")}},[]),(0,t.useEffect)(function(){Dt({type:"RESET_PROPS"})},[H]);var ln=function(ue){var Y=ue.target,ye=Y.name,q=Y.value;Dt({type:"ON_CHANGE",keys:ye,value:q})},un=function(){var Ke=(0,$.Z)(Re().mark(function ue(Y,ye){var q,Te,Le,Me;return Re().wrap(function(ie){for(;;)switch(ie.prev=ie.next){case 0:if(q=ye.setSubmitting,Te=ye.setErrors,q(!0),Le=nt()(Y,Ft),Me="/admin/".concat(Nt),H!=="login"){ie.next=7;break}return ie.next=7,cn(Y,Me,{setSubmitting:q,setErrors:Te});case 7:if(!(H==="register"||H==="register-admin")){ie.next=10;break}return ie.next=10,mn(Y,Me,{setSubmitting:q,setErrors:Te});case 10:if(H!=="forgot-password"){ie.next=13;break}return ie.next=13,dn(Le,Me,{setSubmitting:q,setErrors:Te});case 13:if(H!=="reset-password"){ie.next=16;break}return ie.next=16,gn(Le,Me,{setSubmitting:q,setErrors:Te});case 16:case"end":return ie.stop()}},ue)}));return function(Y,ye){return Ke.apply(this,arguments)}}(),dn=function(){var Ke=(0,$.Z)(Re().mark(function ue(Y,ye,q){var Te,Le;return Re().wrap(function(J){for(;;)switch(J.prev=J.next){case 0:return Te=q.setSubmitting,Le=q.setErrors,J.prev=1,J.next=4,(0,Pe.Z)({method:"POST",url:"".concat(strapi.backendURL).concat(ye),data:Y,cancelToken:yt.token});case 4:p("/auth/forgot-password-success"),J.next=11;break;case 7:J.prev=7,J.t0=J.catch(1),pt.error(J.t0),Le({errorMessage:"notification.error"});case 11:return J.prev=11,Te(!1),J.finish(11);case 14:case"end":return J.stop()}},ue,null,[[1,7,11,14]])}));return function(Y,ye,q){return Ke.apply(this,arguments)}}(),cn=function(){var Ke=(0,$.Z)(Re().mark(function ue(Y,ye,q){var Te,Le,Me,J,ie,Fe,Ge;return Re().wrap(function(oe){for(;;)switch(oe.prev=oe.next){case 0:return Te=q.setSubmitting,Le=q.setErrors,oe.prev=1,oe.next=4,(0,Pe.Z)({method:"POST",url:"".concat(strapi.backendURL).concat(ye),data:nt()(Y,Ft),cancelToken:yt.token});case 4:Me=oe.sent,J=Me.data.data,ie=J.token,Fe=J.user,Fe.preferedLanguage&&K(Fe.preferedLanguage),y.auth.setToken(ie,Y.rememberMe),y.auth.setUserInfo(Fe,Y.rememberMe),hs(),oe.next=23;break;case 14:if(oe.prev=14,oe.t0=oe.catch(1),!oe.t0.response){oe.next=23;break}if(Ge=he()(oe.t0,["response","data","error","message"],"Something went wrong"),tt()(Ge).toLowerCase()!=="usernotactive"){oe.next=22;break}return p("/auth/oops"),Dt({type:"RESET_PROPS"}),oe.abrupt("return");case 22:Le({errorMessage:Ge});case 23:return oe.prev=23,Te(!1),oe.finish(23);case 26:case"end":return oe.stop()}},ue,null,[[1,14,23,26]])}));return function(Y,ye,q){return Ke.apply(this,arguments)}}(),mn=function(){var Ke=(0,$.Z)(Re().mark(function ue(Y,ye,q){var Te,Le,Me,J,ie,Fe,Ge,ct,oe,me;return Re().wrap(function(Ie){for(;;)switch(Ie.prev=Ie.next){case 0:return Te=q.setSubmitting,Le=q.setErrors,Ie.prev=1,ee("willCreateFirstAdmin"),Ie.next=5,(0,Pe.Z)({method:"POST",url:"".concat(strapi.backendURL).concat(ye),data:nt()(Y,Ft),cancelToken:yt.token});case 5:if(Me=Ie.sent,J=Me.data.data,ie=J.token,Fe=J.user,y.auth.setToken(ie,!1),y.auth.setUserInfo(Fe,!1),Te(!1),l(!0),Ge=Fe.roles,Ge&&(ct=Ge.find(function(pn){var fn=pn.code;return fn==="strapi-super-admin"}),ct&&(Ee.setSkipped(!1),F(!1),ee("didLaunchGuidedtour"))),!(H==="register"&&Y.userInfo.news===!0||H==="register-admin"&&Y.news===!0)){Ie.next=18;break}return p({pathname:"/usecase",search:"?hasAdmin=".concat(n)}),Ie.abrupt("return");case 18:hs(),Ie.next=25;break;case 21:Ie.prev=21,Ie.t0=Ie.catch(1),ee("didNotCreateFirstAdmin"),Ie.t0.response&&(oe=Ie.t0.response.data,me=(0,re.Z)(oe),Le({apiErrors:me}));case 25:case"end":return Ie.stop()}},ue,null,[[1,21]])}));return function(Y,ye,q){return Ke.apply(this,arguments)}}(),gn=function(){var Ke=(0,$.Z)(Re().mark(function ue(Y,ye,q){var Te,Le,Me,J,ie,Fe,Ge,ct;return Re().wrap(function(me){for(;;)switch(me.prev=me.next){case 0:return Te=q.setErrors,Le=q.setSubmitting,me.prev=1,me.next=4,(0,Pe.Z)({method:"POST",url:"".concat(strapi.backendURL).concat(ye),data:ft(ft({},Y),{},{resetPasswordToken:ae.get("code")}),cancelToken:yt.token});case 4:Me=me.sent,J=Me.data.data,ie=J.token,Fe=J.user,y.auth.setToken(ie,!1),y.auth.setUserInfo(Fe,!1),p("/"),me.next=16;break;case 13:me.prev=13,me.t0=me.catch(1),me.t0.response&&(Ge=he()(me.t0,["response","data","message"],"Something went wrong"),ct=he()(me.t0,["response","data","statusCode"],400),Dt({type:"SET_REQUEST_ERROR",errorMessage:Ge,errorStatus:ct}),Te({errorMessage:Ge}));case 16:return me.prev=16,Le(!1),me.finish(16);case 19:case"end":return me.stop()}},ue,null,[[1,13,16,19]])}));return function(Y,ye,q){return Ke.apply(this,arguments)}}(),hs=function(){if(H==="login"){var ue=ae.get("redirectTo"),Y=ue?decodeURIComponent(ue):"/";p(Y)}else p("/")};return!se[H]||n&&H==="register-admin"||y.auth.getToken()?t.createElement(r.Redirect,{to:"/"}):!n&&H!=="register-admin"?t.createElement(r.Redirect,{to:{pathname:"/auth/register-admin",search:C}}):t.createElement(Wt,(0,A.Z)({},tn,{authType:H,fieldsToDisable:Kt,formErrors:nn,inputsPrefix:_s,modifiedData:an,onChange:ln,onSubmit:un,requestError:on,schema:en}))};Je.defaultProps={hasAdmin:!1},Je.propTypes={hasAdmin:o().bool,setHasAdmin:o().func.isRequired};var Xe=Je,Se=e(53951),G=e(83292),Ae=e(27649),Ue=e(87933),Ne=e(72850),ut=e(27677),ht=e(49372),Ht=e(70218),Ot=e(84967),$t=e(10369),bt=e(7563),Tt=e(41415),Pt=e(10190),Rt=e(954);const zt=[{intlLabel:{id:"Usecase.front-end",defaultMessage:"Front-end developer"},value:"front_end_developer"},{intlLabel:{id:"Usecase.back-end",defaultMessage:"Back-end developer"},value:"back_end_developer"},{intlLabel:{id:"Usecase.full-stack",defaultMessage:"Full-stack developer"},value:"full_stack_developer"},{intlLabel:{id:"global.content-manager",defaultMessage:"Content Manager"},value:"content_manager"},{intlLabel:{id:"Usecase.content-creator",defaultMessage:"Content Creator"},value:"content_creator"},{intlLabel:{id:"Usecase.other",defaultMessage:"Other"},value:"other"}],It=(0,G.default)(ht.Z)`
  text-align: center;
`;var Qt=()=>{const u=(0,y.useNotification)(),{push:s}=(0,r.useHistory)(),{formatMessage:n}=(0,de.useIntl)(),[l,d]=(0,t.useState)(),[p,C]=(0,t.useState)(""),D=l==="other",K=I=>{try{u({type:"success",message:{id:"Usecase.notification.success.project-created",defaultMessage:"Project has been successfully created"}}),s("/")}catch{}};return t.createElement(Rt.ZP,null,t.createElement(Ae.o,{labelledBy:"usecase-title"},t.createElement(Rt.bU,null,t.createElement("form",{onSubmit:()=>K(!1)},t.createElement(Ue.k,{direction:"column",paddingBottom:7},t.createElement(Pt.Z,null),t.createElement(Ne.x,{paddingTop:6,paddingBottom:1,width:(0,y.pxToRem)(250)},t.createElement(It,{variant:"alpha",as:"h1",id:"usecase-title"},n({id:"Usecase.title",defaultMessage:"Tell us a bit more about yourself"})))),t.createElement(ut.K,{spacing:6},t.createElement(Ht.P,{id:"usecase","data-testid":"usecase",label:n({id:"Usecase.input.work-type",defaultMessage:"What type of work do you do?"}),onChange:d,value:l},zt.map(({intlLabel:I,value:F})=>t.createElement(Ot.W,{key:F,value:F},n(I)))),D&&t.createElement($t.o,{name:"other",label:n({id:"Usecase.other",defaultMessage:"Other"}),value:p,onChange:I=>C(I.target.value),"data-testid":"other"}),t.createElement(Tt.z,{type:"submit",size:"L",fullWidth:!0,disabled:!l},n({id:"global.finish",defaultMessage:"Finish"}))))),t.createElement(Ue.k,{justifyContent:"center"},t.createElement(Ne.x,{paddingTop:4},t.createElement(bt.A,{onClick:()=>K(!0)},n({id:"Usecase.button.skip",defaultMessage:"Skip this question"}))))))},kt=e(61605),jt=async()=>`web-fingerprint-${(await(await kt.ZP.load()).get()).visitorId}`,Ut=e(15685),Jt=[],wt=function(){return window&&window.strapi&&window.strapi.isEE?e(68944).Z:e(56761).Z}(),g=[].concat((0,Ut.Z)(wt),(0,Ut.Z)(Jt)),c=e(31842);const i=(0,t.lazy)(()=>Promise.all([e.e(8469),e.e(2977),e.e(801)]).then(e.bind(e,4507)));function L(){const u=(0,y.useNotification)(),{updateProjectSettings:s}=(0,c.um)(),{formatMessage:n}=(0,de.useIntl)(),[{isLoading:l,hasAdmin:d},p]=(0,t.useState)({isLoading:!0,hasAdmin:!1}),C=(0,t.useMemo)(()=>(0,O.WW)(g.map(({to:K,Component:I,exact:F})=>(0,O.ot)(I,K,F))),[]);(0,t.useEffect)(()=>{const K=y.auth.getToken();K&&(async()=>{try{const{data:{token:F}}=await(0,y.request)("/admin/renew-token",{method:"POST",body:{token:K}});y.auth.updateToken(F)}catch{y.auth.clearAppStorage(),window.location.reload()}})()},[]),(0,t.useEffect)(()=>{(async()=>{try{const{data:{data:{hasAdmin:I,uuid:F,menuLogo:Z,authLogo:ee}}}=await Pe.Z.get(`${strapi.backendURL}/admin/init`);s({menuLogo:(0,y.prefixFileUrlWithBackendUrl)(Z),authLogo:(0,y.prefixFileUrlWithBackendUrl)(ee)});const ce=await jt();p({isLoading:!1,hasAdmin:I,uuid:F,deviceId:ce})}catch{u({type:"warning",message:{id:"app.containers.App.notification.error.init"}})}})()},[u,s]);const D=K=>p(I=>({...I,hasAdmin:K}));return l?t.createElement(y.LoadingIndicatorPage,null):t.createElement(t.Suspense,{fallback:t.createElement(y.LoadingIndicatorPage,null)},t.createElement(Qe.z,null,n({id:"skipToContent"})),t.createElement(y.TrackingProvider,{value:null},t.createElement(r.Switch,null,C,t.createElement(r.Route,{path:"/auth/:authType",render:K=>t.createElement(Xe,{...K,setHasAdmin:D,hasAdmin:d}),exact:!0}),t.createElement(S,{path:"/usecase",component:Qt}),t.createElement(S,{path:"/",component:i}),t.createElement(r.Route,{path:"",component:Se.default}))))}var j=L,N=e(68507),U=e(84968),ne=e(4409),De=e(66694);const xe={menuLogo:null,authLogo:null};var ze=(u=xe,s)=>(0,Ce.default)(u,n=>{switch(s.type){case"UPDATE_PROJECT_SETTINGS":{Object.assign(n,s.values);break}default:return n}});const Ve=({children:u,authLogo:s,menuLogo:n,showReleaseNotification:l,showTutorials:d})=>{const[{menuLogo:p,authLogo:C},D]=(0,t.useReducer)(ze,xe),K=(0,t.useCallback)(({menuLogo:F,authLogo:Z})=>D({type:"UPDATE_PROJECT_SETTINGS",values:{menuLogo:F||n,authLogo:Z||s}}),[s,n]),I=(0,t.useMemo)(()=>({logos:{menu:{custom:p,default:n},auth:{custom:C,default:s}},updateProjectSettings:K,showReleaseNotification:l,showTutorials:d}),[p,n,C,s,K,l,d]);return t.createElement(De._5.Provider,{value:I},u)};Ve.propTypes={authLogo:o().string.isRequired,children:o().element.isRequired,menuLogo:o().string.isRequired,showReleaseNotification:o().bool.isRequired,showTutorials:o().bool.isRequired};var ot=Ve,Et=e(58732),Ct=e.n(Et),Lt=e(5985);const dt=({changeLocale:u,children:s,localeNames:n,messages:l})=>t.createElement(Lt.Z.Provider,{value:{changeLocale:u,localeNames:n,messages:l}},s);dt.propTypes={changeLocale:o().func.isRequired,children:o().element.isRequired,localeNames:o().object.isRequired,messages:o().object.isRequired};var qe=dt,Be="strapi-admin-language",vt=u=>{const s=window.localStorage.getItem(Be);return{locale:u[s]?s:"en",localeNames:u}};const Xt={localeNames:{en:"English"},locale:"en"};var vs=(u=Xt,s)=>{switch(s.type){case"CHANGE_LOCALE":{const{locale:n}=s;return u.localeNames[n]?{...u,locale:n}:u}default:return u}};const qt=({children:u,localeNames:s,messages:n})=>{const[{locale:l},d]=(0,t.useReducer)(vs,Xt,()=>vt(s));(0,t.useEffect)(()=>{window.localStorage.setItem(Be,l),document.documentElement.setAttribute("lang",l)},[l]);const p=D=>{d({type:"CHANGE_LOCALE",locale:D})},C=Ct()(n[l],n.en);return t.createElement(de.IntlProvider,{locale:l,defaultLocale:"en",messages:C,textComponent:"span"},t.createElement(qe,{changeLocale:p,localeNames:s,messages:C},u))};qt.propTypes={children:o().element.isRequired,localeNames:o().objectOf(o().string).isRequired,messages:o().object.isRequired};var ys=qt,Ts=(u,s)=>{const n=Object.entries(s),l=n.findIndex(([p])=>p===u);return n.slice(0,l).every(([,p])=>Object.values(p).every(Boolean))},Ps=(u,s)=>{const n=u.split("."),l=n[1],d=Object.entries(s[n[0]]),p=d.findIndex(([D])=>D===l);return d.slice(0,p).every(([,D])=>D)};const _t={currentStep:null,guidedTourState:{contentTypeBuilder:{create:!1,success:!1},contentManager:{create:!1,success:!1},apiTokens:{create:!1,success:!1}},isGuidedTourVisible:!1,isSkipped:!0};var Rs=(u=_t,s)=>(0,Ce.default)(u,n=>{switch(s.type){case"SET_CURRENT_STEP":{n.currentStep=s.step;break}case"SET_STEP_STATE":{const[l,d]=s.currentStep.split(".");n.guidedTourState[l][d]=s.value;break}case"SET_SKIPPED":{n.isSkipped=s.value;break}case"SET_GUIDED_TOUR_VISIBILITY":{n.isGuidedTourVisible=s.value;break}default:return n}}),Cs=e(3040),xt=e.n(Cs),Ls=u=>{const s={...u},n=Ee.get(at),l=Ee.get(et),d=Ee.get(rt);if(n&&n.forEach(p=>{const[C,D]=p.split(".");xt()(s,["guidedTourState",C,D],!0)}),l){const[p,C]=l.split(".");xt()(s,["guidedTourState",p,C],!0),Ee.addCompletedStep(l),Ee.addCurrentStep(null)}return d!==null&&xt()(s,"isSkipped",d),s};const es=({children:u})=>{const[{currentStep:s,guidedTourState:n,isGuidedTourVisible:l,isSkipped:d},p]=(0,t.useReducer)(Rs,_t,Ls),C=Z=>{if(Z!==null){const ee=he()(n,Z),ce=Ps(Z,n);if(ee||d||!ce)return null}return Ee.addCurrentStep(Z),p({type:"SET_CURRENT_STEP",step:Z})},D=Z=>{p({type:"SET_GUIDED_TOUR_VISIBILITY",value:Z})},K=(Z,ee)=>{Ee.addCompletedStep(Z),p({type:"SET_STEP_STATE",currentStep:Z,value:ee})},I=Z=>{const ee=n[Z];if(ee){const ce=Ts(Z,n),H=Object.keys(ee)[0],ae=ee[H];if(ce&&!s&&!ae)return C(`${Z}.${H}`)}return null},F=Z=>{Ee.setSkipped(Z),p({type:"SET_SKIPPED",value:Z})};return t.createElement(y.GuidedTourProvider,{guidedTourState:n,currentStep:s,setCurrentStep:C,setGuidedTourVisibility:D,setSkipped:F,setStepState:K,startSection:I,isGuidedTourVisible:l,isSkipped:d},u)};es.propTypes={children:o().element.isRequired};var Ms=es,ts=e(12788),Ss=e(72536),As=e(44647),ss=e(41502);const Ds=(0,G.default)(Ne.x)`
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1140;
  &:before {
    content: '';
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: ${({theme:u})=>u.colors.neutral0};
    opacity: 0.9;
  }
`,Os=(0,G.default)(ut.K)`
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  padding-top: ${(0,y.pxToRem)(160)};
`,ns=(0,G.default)(Ne.x)`
  border-radius: 50%;
  svg {
    > path {
      fill: ${({theme:u})=>u.colors.primary600} !important;
    }
  }
`,Mt=document.createElement("div"),bs="autoReloadOverlayBlocker";Mt.setAttribute("id",bs);const Is=G.keyframes`
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(359deg);
  }
`,ks=(0,G.default)(As.Z)`
  animation: ${Is} 1s infinite linear;
`,as=({displayedIcon:u,description:s,title:n,isOpen:l})=>{const{formatMessage:d}=(0,de.useIntl)();return(0,t.useEffect)(()=>(document.body.appendChild(Mt),()=>{document.body.removeChild(Mt)}),[]),l?ts.createPortal(t.createElement(Ds,null,t.createElement(Os,{spacing:6},t.createElement(ut.K,{spacing:2},t.createElement(Ue.k,{justifyContent:"center"},t.createElement(ht.Z,{as:"h1",variant:"alpha"},d(n))),t.createElement(Ue.k,{justifyContent:"center"},t.createElement(ht.Z,{as:"h2",textColor:"neutral600",fontSize:4,fontWeight:"regular"},d(s)))),t.createElement(Ue.k,{justifyContent:"center"},u==="reload"&&t.createElement(ns,{padding:6,background:"primary100",borderColor:"primary200"},t.createElement(ks,{width:(0,y.pxToRem)(36),height:(0,y.pxToRem)(36)})),u==="time"&&t.createElement(ns,{padding:6,background:"primary100",borderColor:"primary200"},t.createElement(Ss.Z,{width:(0,y.pxToRem)(40),height:(0,y.pxToRem)(40)}))),t.createElement(Ue.k,{justifyContent:"center"},t.createElement(Ne.x,{paddingTop:2},t.createElement(ss.r,{href:"https://docs.strapi.io",isExternal:!0},d({id:"global.documentation",defaultMessage:"Read the documentation"})))))),Mt):null};as.propTypes={displayedIcon:o().oneOfType([o().string,o().array]).isRequired,description:o().object.isRequired,isOpen:o().bool.isRequired,title:o().object.isRequired};var js=as;const os=30,rs=({children:u})=>{const[s,n]=(0,t.useState)(!1),[{elapsed:l},d]=(0,t.useState)({elapsed:0,start:0}),[p,C]=(0,t.useState)(void 0),D=(ae=void 0)=>{n(!0),C(ae),d(be=>({...be,start:Date.now()}))},K=()=>{n(!1),d({start:0,elapsed:0}),C(void 0)},I=(0,t.useRef)(D),F=(0,t.useRef)(K);(0,t.useEffect)(()=>{let ae=null;return s?ae=setInterval(()=>l>os?(clearInterval(ae),null):(d(be=>({...be,elapsed:Math.round(Date.now()-be.start)/1e3})),null),1e3):clearInterval(ae),()=>{clearInterval(ae)}},[s,l]);let Z=p?.icon||"reload",ee={id:p?.description||"components.OverlayBlocker.description",defaultMessage:"You're using a feature that needs the server to restart. Please wait until the server is up."},ce={id:p?.title||"components.OverlayBlocker.title",defaultMessage:"Waiting for restart"};l>os&&(Z="time",ee={id:"components.OverlayBlocker.description.serverError",defaultMessage:"The server should have restarted, please check your logs in the terminal."},ce={id:"components.OverlayBlocker.title.serverError",defaultMessage:"The restart is taking longer than expected"});const H=(0,t.useMemo)(()=>({lockApp:I.current,unlockApp:F.current}),[I,F]);return t.createElement(y.AutoReloadOverlayBockerContext.Provider,{value:H},t.createElement(js,{displayedIcon:Z,isOpen:s,description:ee,title:ce}),u)};rs.propTypes={children:o().element.isRequired};var Us=rs,ws=e(67719);const Bt=({dispatch:u,notification:s})=>{const{formatMessage:n}=(0,de.useIntl)(),{message:l,link:d,type:p,id:C,onClose:D,timeout:K,blockTransition:I,title:F}=s,Z=ae=>typeof ae=="string"?ae:n(ae,ae.values),ee=(0,t.useCallback)(()=>{D&&D(),u({type:"HIDE_NOTIFICATION",id:C})},[C]);(0,t.useEffect)(()=>{let ae;return I||(ae=setTimeout(()=>{ee()},K||2500)),()=>clearTimeout(ae)},[I,ee,K]);let ce,H;return p==="info"?(ce="default",H=n({id:"notification.default.title",defaultMessage:"Information:"})):p==="warning"?(ce="danger",H=n({id:"notification.warning.title",defaultMessage:"Warning:"})):p==="softWarning"?(ce="warning",H=n({id:"notification.warning.title",defaultMessage:"Warning:"})):(ce="success",H=n({id:"notification.success.title",defaultMessage:"Success:"})),F&&(H=typeof F=="string"?F:n(F)),t.createElement(ws.b,{action:d?t.createElement(ss.r,{href:d.url,isExternal:!0},n({id:d.label?.id||d.label,defaultMessage:d.label?.defaultMessage||d.label?.id||d.label})):void 0,onClose:ee,closeLabel:"Close",title:H,variant:ce},Z({id:l?.id||l,defaultMessage:l?.defaultMessage||l?.id||l,values:l?.values}))};Bt.defaultProps={notification:{id:1,type:"success",message:{id:"notification.success.saved",defaultMessage:"Saved"},onClose:()=>null,timeout:2500,blockTransition:!1}},Bt.propTypes={dispatch:o().func.isRequired,notification:o().shape({id:o().number,message:o().oneOfType([o().string,o().shape({id:o().string.isRequired,defaultMessage:o().string,values:o().object})]),link:o().shape({target:o().string,url:o().string.isRequired,label:o().oneOfType([o().string,o().shape({id:o().string.isRequired,defaultMessage:o().string,values:o().object})]).isRequired}),type:o().string,onClose:o().func,timeout:o().number,blockTransition:o().bool,title:o().oneOfType([o().string,o().shape({id:o().string.isRequired,defaultMessage:o().string,values:o().object})])})};var xs=Bt;const is={notifId:0,notifications:[]};var Bs=(u=is,s)=>(0,Ce.default)(u,n=>{switch(s.type){case"SHOW_NOTIFICATION":{n.notifications.push({id:u.notifId,type:he()(s,["config","type"],"success"),message:he()(s,["config","message"],{id:"notification.success.saved",defaultMessage:"Saved"}),link:he()(s,["config","link"],null),timeout:he()(s,["config","timeout"],2500),blockTransition:he()(s,["config","blockTransition"],!1),onClose:he()(s,["config","onClose"],null),title:he()(s,["config","title"],null)}),n.notifId=u.notifId+1;break}case"HIDE_NOTIFICATION":{const l=u.notifications.findIndex(d=>d.id===s.id);l!==-1&&n.notifications.splice(l,1);break}default:return n}});const ls=({children:u})=>{const[{notifications:s},n]=(0,t.useReducer)(Bs,is),l=d=>{n({type:"SHOW_NOTIFICATION",config:d})};return t.createElement(y.NotificationsProvider,{toggleNotification:l},t.createElement(ut.K,{left:"50%",marginLeft:"-250px",position:"fixed",spacing:2,top:`${46/16}rem`,width:`${500/16}rem`,zIndex:10},s.map(d=>t.createElement(xs,{key:d.id,dispatch:n,notification:d}))),u)};ls.propTypes={children:o().element.isRequired};var Zs=ls;const St=document.createElement("div");St.setAttribute("id","overlayBlocker");const Ws=G.default.div`
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1140;
`,us=({isOpen:u})=>((0,t.useEffect)(()=>(document.body.appendChild(St),()=>{document.body.removeChild(St)}),[]),u?ts.createPortal(t.createElement(Ws,null),St):null);us.propTypes={isOpen:o().bool.isRequired};const ds=({children:u})=>{const[s,n]=(0,t.useState)(!1),l=()=>{n(!0)},d=()=>{n(!1)};return t.createElement(y.OverlayBlockerContext.Provider,{value:{lockApp:l,unlockApp:d}},u,t.createElement(us,{isOpen:s}))};ds.propTypes={children:o().node.isRequired};var Ns=ds;const Zt="STRAPI_THEME",Ks=()=>{const u=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light",s=localStorage.getItem(Zt);return s||localStorage.setItem(Zt,u),s||u},cs=({children:u,themes:s})=>{const[n,l]=(0,t.useState)(Ks()),d=(0,t.useCallback)(C=>{l(C),localStorage.setItem(Zt,C)},[l]),p=(0,t.useMemo)(()=>({currentTheme:n,onChangeTheme:d,themes:s}),[n,d,s]);return t.createElement(De.Rj.Provider,{value:p},u)};cs.propTypes={children:o().node.isRequired,themes:o().shape({light:o().shape({colors:o().object.isRequired,shadows:o().object.isRequired,sizes:o().object.isRequired,zIndices:o().array.isRequired,spaces:o().array.isRequired,borderRadius:o().string.isRequired,mediaQueries:o().object.isRequired,fontSizes:o().array.isRequired,lineHeights:o().array.isRequired,fontWeights:o().object.isRequired}).isRequired,dark:o().shape({colors:o().object.isRequired,shadows:o().object.isRequired,sizes:o().object.isRequired,zIndices:o().array.isRequired,spaces:o().array.isRequired,borderRadius:o().string.isRequired,mediaQueries:o().object.isRequired,fontSizes:o().array.isRequired,lineHeights:o().array.isRequired,fontWeights:o().object.isRequired}).isRequired,custom:o().object}).isRequired};var Fs=cs,Gs=e(86861),Hs=G.createGlobalStyle`
  body {
    background: ${({theme:u})=>u.colors.neutral100};
  }
`;const ms=({children:u})=>{const{currentTheme:s,themes:n}=(0,c.M1)();return t.createElement(Gs.f,{theme:n[s]||n.light},u,t.createElement(Hs,null))};ms.propTypes={children:o().element.isRequired};var $s=ms;const zs=new U.QueryClient({defaultOptions:{queries:{refetchOnWindowFocus:!1}}}),gs=({authLogo:u,children:s,components:n,customFields:l,fields:d,getAdminInjectedComponents:p,getPlugin:C,localeNames:D,menu:K,menuLogo:I,messages:F,plugins:Z,runHookParallel:ee,runHookSeries:ce,runHookWaterfall:H,settings:ae,showReleaseNotification:be,showTutorials:Wt,store:Nt,themes:Kt})=>t.createElement(Fs,{themes:Kt},t.createElement($s,null,t.createElement(U.QueryClientProvider,{client:zs},t.createElement(ne.Provider,{store:Nt},t.createElement(De.ux.Provider,{value:{getAdminInjectedComponents:p}},t.createElement(ot,{authLogo:u,menuLogo:I,showReleaseNotification:be,showTutorials:Wt},t.createElement(y.StrapiAppProvider,{getPlugin:C,menu:K,plugins:Z,runHookParallel:ee,runHookWaterfall:H,runHookSeries:ce,settings:ae},t.createElement(y.LibraryProvider,{components:n,fields:d},t.createElement(y.CustomFieldsProvider,{customFields:l},t.createElement(ys,{messages:F,localeNames:D},t.createElement(Us,null,t.createElement(Ns,null,t.createElement(Ms,null,t.createElement(Zs,null,s))))))))))))));gs.propTypes={authLogo:o().oneOfType([o().string,o().any]).isRequired,children:o().element.isRequired,components:o().object.isRequired,customFields:o().object.isRequired,fields:o().object.isRequired,getAdminInjectedComponents:o().func.isRequired,getPlugin:o().func.isRequired,localeNames:o().objectOf(o().string).isRequired,menu:o().arrayOf(o().shape({to:o().string.isRequired,icon:o().func.isRequired,intlLabel:o().shape({id:o().string.isRequired,defaultMessage:o().string.isRequired}).isRequired,permissions:o().array,Component:o().func})).isRequired,menuLogo:o().oneOfType([o().string,o().any]).isRequired,messages:o().object.isRequired,plugins:o().object.isRequired,runHookParallel:o().func.isRequired,runHookWaterfall:o().func.isRequired,runHookSeries:o().func.isRequired,settings:o().object.isRequired,showReleaseNotification:o().bool.isRequired,showTutorials:o().bool.isRequired,store:o().object.isRequired,themes:o().shape({light:o().shape({colors:o().object.isRequired,shadows:o().object.isRequired,sizes:o().object.isRequired,zIndices:o().array.isRequired,spaces:o().array.isRequired,borderRadius:o().string.isRequired,mediaQueries:o().object.isRequired,fontSizes:o().array.isRequired,lineHeights:o().array.isRequired,fontWeights:o().object.isRequired}).isRequired,dark:o().shape({colors:o().object.isRequired,shadows:o().object.isRequired,sizes:o().object.isRequired,zIndices:o().array.isRequired,spaces:o().array.isRequired,borderRadius:o().string.isRequired,mediaQueries:o().object.isRequired,fontSizes:o().array.isRequired,lineHeights:o().array.isRequired,fontWeights:o().object.isRequired}).isRequired,custom:o().object}).isRequired};var Vs=gs,Qs={ar:"\u0627\u0644\u0639\u0631\u0628\u064A\u0629",ca:"Catal\xE0",cs:"\u010Ce\u0161tina",de:"Deutsch",dk:"Dansk",en:"English",es:"Espa\xF1ol",fr:"Fran\xE7ais",gu:"Gujarati",he:"\u05E2\u05D1\u05E8\u05D9\u05EA",hu:"Magyar",id:"Indonesian",it:"Italiano",ja:"\u65E5\u672C\u8A9E",ko:"\uD55C\uAD6D\uC5B4",ml:"Malayalam",ms:"Melayu",nl:"Nederlands",no:"Norwegian",pl:"Polski","pt-BR":"Portugu\xEAs (Brasil)",pt:"Portugu\xEAs (Portugal)",ru:"\u0420\u0443\u0441\u0441\u043A\u0438\u0439",sk:"Sloven\u010Dina",sv:"Swedish",th:"\u0E44\u0E17\u0E22",tr:"T\xFCrk\xE7e",uk:"\u0423\u043A\u0440\u0430\u0457\u043D\u0441\u044C\u043A\u0430",vi:"Ti\u1EBFng Vi\u1EC7t","zh-Hans":"\u4E2D\u6587 (\u7B80\u4F53)",zh:"\u4E2D\u6587 (\u7E41\u9AD4)",sa:"\u0938\u0902\u0938\u094D\u0915\u0943\u0924",hi:"\u0939\u093F\u0928\u094D\u0926\u0940"},At=e(70836),Ys={admin:{tutorials:{links:[]}},contentManager:{editView:{informations:[],"right-links":[]},listView:{actions:[],deleteModalAdditionalInfos:[]}}},Js=e.p+"474a770a55f7d3009513.png",ps=e(98399);class Xs{constructor({adminConfig:s,appPlugins:n,library:l,middlewares:d,reducers:p}){this.customConfigurations=s.config,this.customBootstrapConfiguration=s.bootstrap,this.configurations={authLogo:N,head:{favicon:Js},locales:["en"],menuLogo:N,notifications:{releases:!0},themes:{light:a.W,dark:v.$},translations:{},tutorials:!0},this.appPlugins=n||{},this.library=l,this.middlewares=d,this.plugins={},this.reducers=p,this.translations={},this.hooksDict={},this.admin={injectionZones:Ys},this.customFields=V.rh,this.menu=[],this.settings={global:{id:"global",intlLabel:{id:"Settings.global",defaultMessage:"Global Settings"},links:[]}}}addComponents=s=>{Array.isArray(s)?s.map(n=>this.library.components.add(n)):this.library.components.add(s)};addCorePluginMenuLink=s=>{const n=JSON.stringify(s);f()(s.to,`link.to should be defined for ${n}`),f()(typeof s.to=="string",`Expected link.to to be a string instead received ${typeof s.to}`),f()(["/plugins/content-type-builder","/plugins/upload"].includes(s.to),"This method is not available for your plugin"),f()(s.intlLabel?.id&&s.intlLabel?.defaultMessage,`link.intlLabel.id & link.intlLabel.defaultMessage for ${n}`),this.menu.push(s)};addFields=s=>{Array.isArray(s)?s.map(n=>this.library.fields.add(n)):this.library.fields.add(s)};addMenuLink=s=>{const n=JSON.stringify(s);f()(s.to,`link.to should be defined for ${n}`),f()(typeof s.to=="string",`Expected link.to to be a string instead received ${typeof s.to}`),f()(s.intlLabel?.id&&s.intlLabel?.defaultMessage,`link.intlLabel.id & link.intlLabel.defaultMessage for ${n}`),f()(s.Component&&typeof s.Component=="function","link.Component should be a valid React Component"),f()(s.icon&&typeof s.icon=="function","link.Icon should be a valid React Component"),this.menu.push(s)};addMiddlewares=s=>{s.forEach(n=>{this.middlewares.add(n)})};addReducers=s=>{Object.keys(s).forEach(n=>{this.reducers.add(n,s[n])})};addSettingsLink=(s,n)=>{f()(this.settings[s],"The section does not exist");const l=JSON.stringify(n);f()(n.id,`link.id should be defined for ${l}`),f()(n.intlLabel?.id&&n.intlLabel?.defaultMessage,`link.intlLabel.id & link.intlLabel.defaultMessage for ${l}`),f()(n.to,`link.to should be defined for ${l}`),f()(n.Component&&typeof n.Component=="function","link.Component should be a valid React Component"),this.settings[s].links.push(n)};addSettingsLinks=(s,n)=>{f()(this.settings[s],"The section does not exist"),f()(Array.isArray(n),"TypeError expected links to be an array"),n.forEach(l=>{this.addSettingsLink(s,l)})};async bootstrap(){Object.keys(this.appPlugins).forEach(s=>{const n=this.appPlugins[s].bootstrap;n&&n({addSettingsLink:this.addSettingsLink,addSettingsLinks:this.addSettingsLinks,getPlugin:this.getPlugin,injectContentManagerComponent:this.injectContentManagerComponent,injectAdminComponent:this.injectAdminComponent,registerHook:this.registerHook})}),X()(this.customBootstrapConfiguration)&&this.customBootstrapConfiguration({addComponents:this.addComponents,addFields:this.addFields,addMenuLink:this.addMenuLink,addReducers:this.addReducers,addSettingsLink:this.addSettingsLink,addSettingsLinks:this.addSettingsLinks,getPlugin:this.getPlugin,injectContentManagerComponent:this.injectContentManagerComponent,injectAdminComponent:this.injectAdminComponent,registerHook:this.registerHook})}bootstrapAdmin=async()=>(await this.createCustomConfigurations(),this.createHook(At.No),this.createHook(At.LK),this.createHook(At.dV),this.createHook(At.Eo),Promise.resolve());createCustomConfigurations=async()=>{if(this.customConfigurations?.locales&&(this.configurations.locales=["en",...this.customConfigurations.locales?.filter(s=>s!=="en")||[]]),this.customConfigurations?.auth?.logo&&(this.configurations.authLogo=this.customConfigurations.auth.logo),this.customConfigurations?.menu?.logo&&(this.configurations.menuLogo=this.customConfigurations.menu.logo),this.customConfigurations?.head?.favicon&&(this.configurations.head.favicon=this.customConfigurations.head.favicon),this.customConfigurations?.theme){const s=this.customConfigurations.theme.dark,n=this.customConfigurations.theme.light;!s&&!n&&(ps.warn("[deprecated] In future versions, Strapi will stop supporting this theme customization syntax. The theme configuration accepts a light and a dark key to customize each theme separately. See https://docs.strapi.io/developer-docs/latest/development/admin-customization.html#theme-extension."),m()(this.configurations.themes.light,this.customConfigurations.theme)),n&&m()(this.configurations.themes.light,n),s&&m()(this.configurations.themes.dark,s)}this.customConfigurations?.notifications?.releases!==void 0&&(this.configurations.notifications.releases=this.customConfigurations.notifications.releases),this.customConfigurations?.tutorials!==void 0&&(this.configurations.tutorials=this.customConfigurations.tutorials)};createHook=s=>{this.hooksDict[s]=(0,B.Bi)()};createSettingSection=(s,n)=>{f()(s.id,"section.id should be defined"),f()(s.intlLabel?.id&&s.intlLabel?.defaultMessage,"section.intlLabel should be defined"),f()(Array.isArray(n),"TypeError expected links to be an array"),f()(this.settings[s.id]===void 0,"A similar section already exists"),this.settings[s.id]={...s,links:[]},n.forEach(l=>{this.addSettingsLink(s.id,l)})};createStore=()=>_(this.middlewares.middlewares,this.reducers.reducers);getAdminInjectedComponents=(s,n,l)=>{try{return this.admin.injectionZones[s][n][l]||[]}catch(d){return ps.error("Cannot get injected component",d),d}};getPlugin=s=>this.plugins[s];async initialize(){Object.keys(this.appPlugins).forEach(s=>{this.appPlugins[s].register(this)})}injectContentManagerComponent=(s,n,l)=>{f()(this.admin.injectionZones.contentManager[s]?.[n],`The ${s} ${n} zone is not defined in the content manager`),f()(l,"A Component must be provided"),this.admin.injectionZones.contentManager[s][n].push(l)};injectAdminComponent=(s,n,l)=>{f()(this.admin.injectionZones.admin[s]?.[n],`The ${s} ${n} zone is not defined in the admin`),f()(l,"A Component must be provided"),this.admin.injectionZones.admin[s][n].push(l)};async loadAdminTrads(){const s=this.configurations.locales.map(d=>e(48224)(`./${d}.json`).then(({default:p})=>({data:p,locale:d})).catch(()=>({data:null,locale:d})));return(await Promise.all(s)).reduce((d,p)=>(p.data&&(d[p.locale]=p.data),d),{})}async loadTrads(){const s=await this.loadAdminTrads(),n=Object.keys(this.appPlugins).map(C=>{const D=this.appPlugins[C].registerTrads;return D?D({locales:this.configurations.locales}):null}).filter(C=>C),d=(await Promise.all(n)).reduce((C,D)=>{const K=D.reduce((I,F)=>(I[F.locale]=F.data,I),{});return Object.keys(K).forEach(I=>{C[I]={...C[I],...K[I]}}),C},{}),p=this.configurations.locales.reduce((C,D)=>(C[D]={...s[D],...d[D]||{},...this.customConfigurations?.translations?.[D]},C),{});return this.configurations.translations=p,Promise.resolve()}registerHook=(s,n)=>{f()(this.hooksDict[s],`The hook ${s} is not defined. You are trying to register a hook that does not exist in the application.`),this.hooksDict[s].register(n)};registerPlugin=s=>{const n=(0,V.Sy)(s);this.plugins[n.pluginId]=n};runHookSeries=(s,n=!1)=>n?this.hooksDict[s].runSeriesAsync():this.hooksDict[s].runSeries();runHookWaterfall=(s,n,l=!1,d)=>l?this.hooksDict[s].runWaterfallAsync(n,d):this.hooksDict[s].runWaterfall(n,d);runHookParallel=s=>this.hooksDict[s].runParallel();render(){const s=this.createStore(),n=W()(Qs,this.configurations.locales||[]),{components:{components:l},fields:{fields:d}}=this.library;return t.createElement(Vs,{authLogo:this.configurations.authLogo,components:l,fields:d,customFields:this.customFields,localeNames:n,getAdminInjectedComponents:this.getAdminInjectedComponents,getPlugin:this.getPlugin,messages:this.configurations.translations,menu:this.menu,menuLogo:this.configurations.menuLogo,plugins:this.plugins,runHookParallel:this.runHookParallel,runHookWaterfall:(p,C,D=!1)=>this.runHookWaterfall(p,C,D,s),runHookSeries:this.runHookSeries,themes:this.configurations.themes,settings:this.settings,showTutorials:this.configurations.tutorials,showReleaseNotification:this.configurations.notifications.releases,store:s},t.createElement(t.Fragment,null,t.createElement(M.Helmet,{link:[{rel:"icon",type:"image/png",href:this.configurations.head.favicon}],htmlAttributes:{lang:localStorage.getItem(Be)||"en"}}),t.createElement(r.BrowserRouter,{basename:B.EZ},t.createElement(j,{store:s}))))}}var qs=({adminConfig:u={},appPlugins:s,library:n,middlewares:l,reducers:d})=>new Xs({adminConfig:u,appPlugins:s,library:n,middlewares:l,reducers:d})},5985:function(w,h,e){"use strict";var t=e(32735);const r=(0,t.createContext)();h.Z=r},20139:function(w,h,e){"use strict";var t=e(32735),r=e(5985);const a=()=>{const{changeLocale:v,localeNames:E,messages:m}=(0,t.useContext)(r.Z);return{changeLocale:v,localeNames:E,messages:m}};h.Z=a},10190:function(w,h,e){"use strict";var t=e(32735),r=e(83292),a=e(31842);const v=r.default.img`
  height: ${72/16}rem;
`,E=()=>{const{logos:{auth:m}}=(0,a.um)();return t.createElement(v,{src:m?.custom??m.default,"aria-hidden":!0,alt:""})};h.Z=E},66694:function(w,h,e){"use strict";e.d(h,{ux:function(){return a},_5:function(){return E},$l:function(){return P},Rj:function(){return x}});var t=e(32735),a=(0,t.createContext)({}),E=(0,t.createContext)({}),P=(0,t.createContext)({}),x=(0,t.createContext)({})},70836:function(w,h,e){"use strict";e.d(h,{Eo:function(){return a},LK:function(){return r},No:function(){return t},dV:function(){return v}});const t="Admin/CM/pages/ListView/inject-column-in-table",r="Admin/CM/pages/App/mutate-collection-types-links",a="Admin/CM/pages/EditView/mutate-edit-view-layout",v="Admin/CM/pages/App/mutate-single-types-links"},31842:function(w,h,e){"use strict";e.d(h,{um:function(){return v},U_:function(){return T},Dq:function(){return Qe},H9:function(){return he},bP:function(){return k},$_:function(){return jt},rW:function(){return wt},bF:function(){return je},G4:function(){return kt},Te:function(){return bt},M1:function(){return Yt}});var t=e(32735),r=e(66694),v=()=>(0,t.useContext)(r._5),E=e(58521),m=e(97889);const P={collectionTypes:[],components:[],isLoading:!0,singleTypes:[]};var x=(g,c)=>(0,m.default)(g,i=>{switch(c.type){case"GET_MODELS":{i.collectionTypes=P.collectionTypes,i.singleTypes=P.singleTypes,i.components=P.components,i.isLoading=!0;break}case"GET_MODELS_ERROR":{i.collectionTypes=P.collectionTypes,i.singleTypes=P.singleTypes,i.components=P.components,i.isLoading=!1;break}case"GET_MODELS_SUCCEDED":{const L=j=>c.contentTypes.filter(N=>N.isDisplayed&&N.kind===j);i.isLoading=!1,i.collectionTypes=L("collectionType"),i.singleTypes=L("singleType"),i.components=c.components;break}default:return i}}),k=()=>{const g=(0,E.useNotification)(),[c,i]=(0,t.useReducer)(x,P);(0,t.useEffect)(()=>{L()},[]);const L=async()=>{i({type:"GET_MODELS"});try{const[{data:j},{data:N}]=await Promise.all(["components","content-types"].map(U=>(0,E.request)(`/content-manager/${U}`,{method:"GET"})));i({type:"GET_MODELS_SUCCEDED",contentTypes:N,components:j})}catch{i({type:"GET_MODELS_ERROR"}),g({type:"warning",message:{id:"notification.error"}})}};return{...c,getData:L}};const f={data:{},error:null,isLoading:!0};var B=(g,c)=>(0,m.default)(g,i=>{switch(c.type){case"GET_DATA":{i.isLoading=!0,i.data={},i.error=null;break}case"GET_DATA_SUCCEEDED":{i.data=c.data,i.isLoading=!1,i.error=null;break}case"GET_DATA_ERROR":{i.isLoading=!1,i.error=c.error;break}default:return i}}),T=g=>{const[{data:c,error:i,isLoading:L},j]=(0,t.useReducer)(B,f);return(0,t.useEffect)(()=>{(async()=>{j({type:"GET_DATA"});const{data:U}=await(0,E.request)("/admin/permissions",{method:"GET",params:{role:g}});j({type:"GET_DATA_SUCCEEDED",data:U})})()},[g]),{data:c,error:i,isLoading:L}};const b={role:{},permissions:{},isLoading:!0};var V=(g,c)=>(0,m.default)(g,i=>{switch(c.type){case"GET_DATA_SUCCEEDED":{i.role=c.role,i.permissions=c.permissions,i.isLoading=!1;break}case"GET_DATA_ERROR":{i.isLoading=!1;break}case"ON_SUBMIT_SUCCEEDED":{i.role.name=c.name,i.role.description=c.description;break}default:return i}}),y=e(98399),Qe=g=>{const c=(0,E.useNotification)(),[i,L]=(0,t.useReducer)(V,b);(0,t.useEffect)(()=>{g?j(g):L({type:"GET_DATA_SUCCEEDED",role:{},permissions:[]})},[g]);const j=async U=>{try{const[{data:ne},{data:De}]=await Promise.all([`roles/${U}`,`roles/${U}/permissions`].map(xe=>(0,E.request)(`/admin/${xe}`,{method:"GET"})));L({type:"GET_DATA_SUCCEEDED",role:ne,permissions:De})}catch(ne){y.error(ne),L({type:"GET_DATA_ERROR"}),c({type:"warning",message:{id:"notification.error"}})}},N=(0,t.useCallback)(U=>{L({type:"ON_SUBMIT_SUCCEEDED",...U})},[]);return{...i,onSubmitSucceeded:N}},ke=(g,c)=>c.map(({permissions:i})=>(0,E.hasPermissions)(g,i)),ge=async(g,c)=>{const i=ke(g,c),L=await Promise.all(i);return c.filter((N,U)=>L[U])},S=e(99381),O=e.n(S),pe=async(g,c,i)=>{const L=ke(g,c),j=await Promise.all(L),N=c.filter((De,xe)=>j[xe]),U=N.findIndex(De=>De.to==="/settings");if(U===-1)return[];const ne=O()(N);return ne[U].notificationsCount=i?1:0,ne},$=e(45112),fe=e(2287),te=e(36919),Q=e(83983);const Re={generalSectionLinks:[{icon:fe.Z,intlLabel:{id:"global.plugins",defaultMessage:"Plugins"},to:"/list-plugins",permissions:Q.Z.marketplace.main},{icon:te.Z,intlLabel:{id:"global.marketplace",defaultMessage:"Marketplace"},to:"/marketplace",permissions:Q.Z.marketplace.main},{icon:$.Z,intlLabel:{id:"global.settings",defaultMessage:"Settings"},to:"/settings",permissions:[],notificationsCount:0}],pluginsSectionLinks:[],isLoading:!0};var tt=(g=Re,c)=>(0,m.default)(g,i=>{switch(c.type){case"SET_SECTION_LINKS":{const{authorizedGeneralSectionLinks:L,authorizedPluginSectionLinks:j}=c.data;i.generalSectionLinks=L,i.pluginsSectionLinks=j;break}case"UNSET_IS_LOADING":{i.isLoading=!1;break}default:return i}}),he=()=>{const[g,c]=(0,t.useReducer)(tt,Re),{allPermissions:i}=(0,E.useRBACProvider)(),{shouldUpdateStrapi:L}=(0,E.useAppInfos)(),{menu:j}=(0,E.useStrapiApp)(),N=(0,t.useRef)(g.generalSectionLinks),U=(0,t.useRef)(L),ne=async(xe=i)=>{const ze=await ge(xe,j),Ve=await pe(xe,N.current,U.current);c({type:"SET_SECTION_LINKS",data:{authorizedGeneralSectionLinks:Ve,authorizedPluginSectionLinks:ze}}),c({type:"UNSET_IS_LOADING"})},De=(0,t.useRef)(ne);return(0,t.useEffect)(()=>{De.current(i)},[i,c]),g},st=e(33795),nt=e.n(st),et=e(17247),rt=(g,c)=>({...g,isLoading:c});const z={roles:[],isLoading:!0};var le=(g,c)=>(0,m.default)(g,i=>{switch(c.type){case"GET_DATA":{i.isLoading=!0,i.roles=[];break}case"GET_DATA_SUCCEEDED":{i.roles=c.data,i.isLoading=!1;break}case"GET_DATA_ERROR":{i.isLoading=!1;break}default:return i}}),je=(g=!0)=>{const c=(0,E.useNotification)(),[{roles:i,isLoading:L},j]=(0,t.useReducer)(le,z,()=>rt(z,g));(0,t.useEffect)(()=>{g&&N()},[g]);const N=(0,t.useCallback)(async()=>{try{j({type:"GET_DATA"});const{data:{data:U}}=await et.be.get("/admin/roles");j({type:"GET_DATA_SUCCEEDED",data:U})}catch(U){const ne=nt()(U,["response","payload","message"],"An error occured");j({type:"GET_DATA_ERROR"}),ne!=="Forbidden"&&c({type:"warning",message:ne})}},[c]);return{roles:i,isLoading:L,getData:N}},re=e(92891);const ve={menu:[],isLoading:!0};var Ce=(g,c)=>(0,m.default)(g,i=>{switch(c.type){case"CHECK_PERMISSIONS_SUCCEEDED":{c.data.forEach(L=>{L.hasPermission&&(0,re.set)(i,["menu",...L.path.split("."),"isDisplayed"],L.hasPermission)}),i.menu.forEach((L,j)=>{i.menu[j].links=L.links.filter(N=>N.isDisplayed===!0)}),i.isLoading=!1;break}default:return i}}),He=e(9086),$e=e.n(He),We=e(98978),pt=e.n(We),lt=g=>pt()(g,c=>c.id),se=g=>g.map(c=>{const i=c.links.map(L=>({...L,isDisplayed:!1}));return{...c,links:i}}),Je=e(15685),Se=[{intlLabel:{id:"global.roles",defaultMessage:"Roles"},to:"/settings/roles",id:"roles",isDisplayed:!1,permissions:Q.Z.settings.roles.main},{intlLabel:{id:"global.users"},to:"/settings/users?pageSize=10&page=1&sort=firstname",id:"users",isDisplayed:!1,permissions:Q.Z.settings.users.main}],G=function(){return window&&window.strapi&&window.strapi.isEE?e(66334).Z:e(47950).Z}(),Ae=[].concat((0,Je.Z)(G),(0,Je.Z)(Se)),Ne=[{intlLabel:{id:"Settings.application.title",defaultMessage:"Overview"},to:"/settings/application-infos",id:"000-application-infos",isDisplayed:!1,permissions:[]},{intlLabel:{id:"Settings.webhooks.title",defaultMessage:"Webhooks"},to:"/settings/webhooks",id:"webhooks",isDisplayed:!1,permissions:Q.Z.settings.webhooks.main},{intlLabel:{id:"Settings.apiTokens.title",defaultMessage:"API Tokens"},to:"/settings/api-tokens?sort=name:ASC",id:"api-tokens",isDisplayed:!1,permissions:Q.Z.settings["api-tokens"].main}],ut=function(){return window&&window.strapi&&window.strapi.isEE?e(11545).Z:e(73086).Z}(),ht=[].concat((0,Je.Z)(Ne),(0,Je.Z)(ut)),Ot=(g,{settings:c,shouldUpdateStrapi:i})=>{const L=c.global.links,j=lt([...L,...ht]).map(ne=>({...ne,hasNotification:ne.id==="000-application-infos"&&i})),N=Object.values($e()(c,"global")),U=[{...c.global,links:j},{id:"permissions",intlLabel:{id:"Settings.permissions",defaultMessage:"Administration Panel"},links:Ae},...N];return{...g,menu:se(U)}},bt=(g=!1)=>{const{allPermissions:c}=(0,E.useRBACProvider)(),{shouldUpdateStrapi:i}=(0,E.useAppInfos)(),{settings:L}=(0,E.useStrapiApp)(),[{isLoading:j,menu:N},U]=(0,t.useReducer)(Ce,ve,()=>Ot(ve,{settings:L,shouldUpdateStrapi:i}));return(0,t.useEffect)(()=>{g||(async()=>{const De=async(Ve,ot)=>({hasPermission:await(0,E.hasPermissions)(c,Ve),path:ot}),we=(Ve=>Ve.reduce((ot,Et,Ct)=>{const Lt=dt=>dt.map((qe,Oe)=>De(dt[Oe].permissions,`${Ct}.links.${Oe}`));return[...ot,...Lt(Et.links)]},[]))(N),ze=await Promise.all(we);U({type:"CHECK_PERMISSIONS_SUCCEEDED",data:ze})})()},[c,g]),{isLoading:j,menu:N}},Tt=e(64421);const Pt={fieldsToPick:[],formErrors:{},initialData:{},isLoading:!0,modifiedData:{},showHeaderButtonLoader:!1,showHeaderLoader:!0},Rt=(g,c)=>(0,m.default)(g,i=>{switch(c.type){case"GET_DATA_SUCCEEDED":{i.isLoading=!1,i.showHeaderLoader=!1,i.initialData=(0,re.pick)(c.data,g.fieldsToPick),i.modifiedData=(0,re.pick)(c.data,g.fieldsToPick);break}case"ON_CANCEL":{i.modifiedData=g.initialData,i.formErrors={};break}case"ON_CHANGE":{c.inputType==="password"&&!c.value?(0,re.unset)(i.modifiedData,c.keys.split(".")):c.keys.includes("username")&&!c.value?(0,re.set)(i.modifiedData,c.keys.split("."),null):(0,re.set)(i.modifiedData,c.keys.split("."),c.value);break}case"ON_SUBMIT":{i.showHeaderButtonLoader=!0;break}case"ON_SUBMIT_SUCCEEDED":{i.initialData=(0,re.pick)(c.data,g.fieldsToPick),i.modifiedData=(0,re.pick)(c.data,g.fieldsToPick),i.showHeaderButtonLoader=!1;break}case"SET_ERRORS":{i.formErrors=c.errors,i.showHeaderButtonLoader=!1;break}default:return i}});var It=(g,c)=>({...g,fieldsToPick:c}),Vt=e(98399),kt=(g,c,i,L)=>{const[{formErrors:j,initialData:N,isLoading:U,modifiedData:ne,showHeaderButtonLoader:De,showHeaderLoader:xe},we]=(0,t.useReducer)(Rt,Pt,()=>It(Pt,L)),ze=(0,E.useNotification)(),{lockApp:Ve,unlockApp:ot}=(0,E.useOverlayBlocker)();return(0,t.useEffect)(()=>{g&&(async()=>{try{const{data:Oe}=await(0,E.request)(g,{method:"GET"});we({type:"GET_DATA_SUCCEEDED",data:Oe,fieldsToPick:L})}catch(Oe){Vt.error(Oe.response),ze({type:"warning",message:{id:"notification.error"}})}})()},[g]),[{formErrors:j,initialData:N,isLoading:U,modifiedData:ne,showHeaderButtonLoader:De,showHeaderLoader:xe},we,{handleCancel:()=>{we({type:"ON_CANCEL"})},handleChange:({target:{name:qe,value:Oe,type:Be}})=>{we({type:"ON_CHANGE",inputType:Be,keys:qe,value:Oe})},handleSubmit:async qe=>{qe.preventDefault();const Oe=await(0,Tt.R6)(ne,c);if(we({type:"SET_ERRORS",errors:Oe||{}}),!Oe)try{Ve(),we({type:"ON_SUBMIT"});const Be=(0,re.omit)(ne,["confirmPassword","registrationToken"]);Be.roles&&(Be.roles=Be.roles.map(vt=>vt.id));const{data:_e}=await(0,E.request)(g,{method:"PUT",body:Be});i(_e),we({type:"ON_SUBMIT_SUCCEEDED",data:_e}),ze({type:"success",message:{id:"notification.success.saved"}})}catch(Be){const _e=(0,re.get)(Be,"response.payload",{data:{}});(0,re.has)(_e,"data")&&typeof _e.data=="string"?ze({type:"warning",message:_e.data}):ze({type:"warning",message:_e.message});const vt=(0,Tt.Iz)(_e);we({type:"SET_ERRORS",errors:vt})}finally{ot()}},setField:(qe,Oe)=>{we({type:"ON_CHANGE",keys:qe,value:Oe})}}]},jt=()=>(0,t.useContext)(r.$l),Yt=()=>(0,t.useContext)(r.Rj),wt=(g,c)=>{const[i,L]=(0,t.useState)(!1),j=(0,E.useNotification)();return{regenerateData:async()=>{try{const{data:{data:{accessKey:U}}}=await et.be.post(`/admin/api-tokens/${g}/regenerate`);L(!1),c(U)}catch(U){L(!1),j({type:"warning",message:(0,re.get)(U,"response.data.message","notification.error")})}},isLoadingConfirmation:i}}},47950:function(w,h){"use strict";h.Z=[]},73086:function(w,h){"use strict";h.Z=[]},954:function(w,h,e){"use strict";e.d(h,{sg:function(){return M},bU:function(){return B},ZP:function(){return T}});var t=e(32735),r=e(83292),a=e(60216),v=e.n(a),E=e(72850),m=e(87933),P=e(5636),W=e(46788),x=e(20139),k=()=>{const{changeLocale:b,localeNames:_}=(0,x.Z)(),{locale:V}=(0,P.useIntl)();return t.createElement(W.O,{label:_[V]},Object.keys(_).map(y=>t.createElement(W.s,{onClick:()=>b(y),key:y},_[y])))};const f=(0,r.default)(E.x)`
  margin: 0 auto;
  width: 552px;
`,M=(0,r.default)(m.k)`
  flex-direction: column;
`,B=({children:b})=>t.createElement(f,{shadow:"tableShadow",hasRadius:!0,paddingTop:9,paddingBottom:9,paddingLeft:10,paddingRight:10,background:"neutral0",justifyContent:"center"},b);B.propTypes={children:v().node.isRequired};const R=({children:b})=>t.createElement("div",null,t.createElement(m.k,{as:"header",justifyContent:"flex-end"},t.createElement(E.x,{paddingTop:6,paddingRight:8},t.createElement(k,null))),t.createElement(E.x,{paddingTop:2,paddingBottom:11},b));R.propTypes={children:v().node.isRequired};var T=R},56761:function(w,h){"use strict";const e=[];h.Z=e},72218:function(w,h,e){"use strict";var t=e(83292),r=e(63642);const a=(0,t.default)(r.E)`
  svg {
    height: 1rem;
    width: 1rem;
    path {
      fill: ${({theme:v})=>v.colors.neutral600};
    }
  }
`;h.Z=a},1115:function(w,h,e){"use strict";var t=e(32735),r=e(58521),a=e.n(r),v=e(60492),E=e(54894),m=e(72850),P=e(27677),W=e(27649),x=e(87933),X=e(41415),k=e(10369),f=e(8284),M=e(49372),B=e(60216),R=e.n(B),T=e(5636),b=e(83292),_=e(83281),V=e(954),y=e(10190),Pe=e(72218);const Qe=(0,b.default)(k.o)`
  ::-ms-reveal {
    display: none;
  }
`,de=({onSubmit:ke,schema:o,children:ge})=>{const[S,O]=(0,t.useState)(!1),{formatMessage:A}=(0,T.useIntl)();return t.createElement(W.o,null,t.createElement(V.bU,null,t.createElement(_.Formik,{enableReinitialize:!0,initialValues:{email:"",password:"",rememberMe:!1},onSubmit:ke,validationSchema:o,validateOnChange:!1},({values:pe,errors:$,handleChange:fe})=>t.createElement(r.Form,{noValidate:!0},t.createElement(V.sg,null,t.createElement(y.Z,null),t.createElement(m.x,{paddingTop:6,paddingBottom:1},t.createElement(M.Z,{variant:"alpha",as:"h1"},A({id:"Auth.form.welcome.title",defaultMessage:"Welcome!"}))),t.createElement(m.x,{paddingBottom:7},t.createElement(M.Z,{variant:"epsilon",textColor:"neutral600"},A({id:"Auth.form.welcome.subtitle",defaultMessage:"Log in to your Digicommerce account"}))),$.errorMessage&&t.createElement(M.Z,{id:"global-form-error",role:"alert",tabIndex:-1,textColor:"danger600"},$.errorMessage)),t.createElement(P.K,{spacing:6},t.createElement(k.o,{error:$.email?A({id:$.email,defaultMessage:"This value is required."}):"",value:pe.email,onChange:fe,label:A({id:"Auth.form.email.label",defaultMessage:"Email"}),placeholder:A({id:"Auth.form.email.placeholder",defaultMessage:"kai@doe.com"}),name:"email",required:!0}),t.createElement(Qe,{error:$.password?A({id:$.password,defaultMessage:"This value is required."}):"",onChange:fe,value:pe.password,label:A({id:"global.password",defaultMessage:"Password"}),name:"password",type:S?"text":"password",endAction:t.createElement(Pe.Z,{onClick:te=>{te.stopPropagation(),O(Q=>!Q)},label:A(S?{id:"Auth.form.password.show-password",defaultMessage:"Show password"}:{id:"Auth.form.password.hide-password",defaultMessage:"Hide password"})},S?t.createElement(E.default,null):t.createElement(v.default,null)),required:!0}),t.createElement(f.X,{onValueChange:te=>{fe({target:{value:te,name:"rememberMe"}})},value:pe.rememberMe,"aria-label":"rememberMe",name:"rememberMe"},A({id:"Auth.form.rememberMe.label",defaultMessage:"Remember me"})),t.createElement(X.z,{fullWidth:!0,type:"submit"},A({id:"Auth.form.button.login",defaultMessage:"Login"}))))),ge),t.createElement(x.k,{justifyContent:"center"},t.createElement(m.x,{paddingTop:4},t.createElement(r.Link,{to:"/auth/forgot-password"},A({id:"Auth.link.forgot-password",defaultMessage:"Forgot your password?"})))))};de.defaultProps={children:null,onSubmit(){}},de.propTypes={children:R().node,onSubmit:R().func,schema:R().shape({type:R().string.isRequired}).isRequired},h.Z=de},5365:function(w,h,e){"use strict";var t=e(32735),r=e(60216),a=e.n(r),v=e(1115),E=e(954);const m=P=>t.createElement(E.ZP,null,t.createElement(v.Z,{...P}));m.defaultProps={onSubmit:P=>P.preventDefault()},m.propTypes={onSubmit:a().func},h.Z=m},53951:function(w,h,e){"use strict";e.r(h);var t=e(32735),r=e(58521),a=e.n(r),v=e(27649),E=e(28356),m=e(17e3),P=e(9695),W=e(25386),x=e(8482),X=e(5636);const k=()=>{const{formatMessage:f}=(0,X.useIntl)();return(0,r.useFocusWhenNavigate)(),t.createElement(v.o,{labelledBy:"title"},t.createElement(E.T,{id:"title",title:f({id:"content-manager.pageNotFound",defaultMessage:"Page not found"})}),t.createElement(m.D,null,t.createElement(P.x,{action:t.createElement(r.LinkButton,{variant:"secondary",endIcon:t.createElement(x.Z,null),to:"/"},f({id:"app.components.NotFoundPage.back",defaultMessage:"Back to homepage"})),content:f({id:"app.page.not.found",defaultMessage:"Oops! We can't seem to find the page you're looging for..."}),hasRadius:!0,icon:t.createElement(W.default,{width:"10rem"}),shadow:"tableShadow"})))};h.default=k},26123:function(w,h){"use strict";h.Z={}},41832:function(w,h){"use strict";const e=({data:t})=>{try{return Object.keys(t).reduce((r,a)=>{const v=t[a][0];return r[a]={id:v,defaultMessage:v},r},{})}catch{return{}}};h.Z=e},64421:function(w,h,e){"use strict";e.d(h,{R6:function(){return a},ot:function(){return k},Iz:function(){return f.Z},Pp:function(){return ke},IF:function(){return de},Qy:function(){return ge},WW:function(){return b}});var t=e(58521),a=async(S,O)=>{let A=null;try{await O.validate(S,{abortEarly:!1})}catch(pe){A=(0,t.getYupInnerErrors)(pe)}return A},v=e(32735),E=e(60216),m=e.n(E),P=e(5141),W=e(98399);const x=({loadComponent:S})=>{const[O,A]=(0,v.useState)(null);return(0,v.useEffect)(()=>{(async()=>{try{const $=await S();A(()=>$.default)}catch($){W.log($)}})()},[S]),O?v.createElement(O,null):v.createElement(t.LoadingIndicatorPage,null)},X=(S,O,A)=>v.createElement(P.Route,{render:()=>v.createElement(x,{loadComponent:S}),key:O,path:O,exact:A||!1});x.propTypes={loadComponent:m().func.isRequired};var k=X,f=e(41832),M=e(92891);const B=S=>{const O=get(S,["options","timestamps"]);let A=Array.isArray(O)?O:[];const $=[...["id","_id"],...A,"publishedAt"],fe=get(S,["attributes"],{});return Object.keys(fe).reduce((te,Q)=>($.includes(Q)||te.push({...fe[Q],attributeName:Q}),te),[])};var R=null,b=S=>S.filter((O,A,pe)=>pe.findIndex($=>$.key===O.key)===A);const _=S=>sortBy(S,O=>O.name);var V=null;const y=S=>Array.from(new Set(Object.entries(S).reduce((O,A)=>{const pe=$=>$.reduce((fe,te)=>{let Q=fe;return te.actions&&(Q=[...Q,...te.actions]),typeof te=="object"&&!te.actions&&(Q=[...Q,...Object.keys(te)]),Q},[]);return[...O,...pe([...Object.values(A[1].attributes||{}),get(A[1],"contentTypeActions",{})])]},[])));var Pe=null,de=S=>`/admin/${S}`,ke=(S,O="")=>[S,O].filter(A=>A).join(" ");const o={bufferToHex(S){return[...new Uint8Array(S)].map(O=>O.toString(16).padStart(2,"0")).join("")},async digestMessage(S){const O=new TextEncoder().encode(S),A=await crypto.subtle.digest("SHA-256",O);return this.bufferToHex(A)}};async function ge(S){if(!S)return null;try{return await o.digestMessage(S.email)}catch{return null}}},58414:function(w,h,e){"use strict";e.d(h,{p:function(){return X}});var t=e(32735),r=e(58521),a=e(64421),v=e(97889);const E={data:[],isLoading:!0};var P=(k,f)=>(0,v.default)(k,M=>{switch(f.type){case"GET_DATA_SUCCEEDED":{M.data=f.data,M.isLoading=!1;break}case"GET_DATA_ERROR":{M.isLoading=!1;break}default:return M}}),W=e(98399),X=({ssoEnabled:k})=>{const[f,M]=(0,t.useReducer)(P,E),B=(0,r.useNotification)();(0,t.useEffect)(()=>{R()},[]);const R=async()=>{try{if(!k){M({type:"GET_DATA_SUCCEEDED",data:[]});return}const T=(0,a.IF)("providers"),b=await(0,r.request)(T,{method:"GET"});M({type:"GET_DATA_SUCCEEDED",data:b})}catch(T){W.error(T),M({type:"GET_DATA_ERROR"}),B({type:"warning",message:{id:"notification.error"}})}};return f}},66334:function(w,h,e){"use strict";var t=e(83983);const a=[...strapi.features.isEnabled(strapi.features.AUDIT_LOGS)?[{intlLabel:{id:"global.auditLogs",defaultMessage:"Audit Logs"},to:"/settings/audit-logs?pageSize=50&page=1&sort=date:DESC",id:"auditLogs",isDisplayed:!1,permissions:t.Z.settings.auditLogs.main}]:[]];h.Z=a},11545:function(w,h,e){"use strict";var t=e(83983);const a=[...strapi.features.isEnabled(strapi.features.SSO)?[{intlLabel:{id:"Settings.sso.title",defaultMessage:"Single Sign-On"},to:"/settings/single-sign-on",id:"sso",isDisplayed:!1,permissions:t.Z.settings.sso.main}]:[]];h.Z=a},68944:function(w,h,e){"use strict";e.d(h,{Z:function(){return k}});var t=e(32735),r=e(5141),a=e(5636),v=e(49189),E=e.n(v),m=e(58521),P=e(64421),x=()=>{const{params:{authResponse:f}}=(0,r.useRouteMatch)("/auth/login/:authResponse"),{formatMessage:M}=(0,a.useIntl)(),{push:B}=(0,r.useHistory)(),R=(0,t.useRef)(M);let T=(0,t.useCallback)(()=>{B(`/auth/oops?info=${encodeURIComponent(R.current({id:"Auth.form.button.login.providers.error",defaultMessage:"We cannot connect you through the selected provider."}))}`)},[B]);const b=(0,t.useCallback)(async()=>{try{const _=E().get("jwtToken");if(m.auth.clearAppStorage(),_){m.auth.setToken(_,!0);const V=(0,P.IF)("users/me"),{data:y}=await(0,m.request)(V,{method:"GET"});m.auth.setUserInfo(y,!0),E().remove("jwtToken"),B("/auth/login")}}catch{T()}},[B,T]);return(0,t.useEffect)(()=>{f==="error"&&T(),f==="success"&&b()},[f,b,T]),t.createElement(m.LoadingIndicatorPage,null)},k=[{Component:()=>({default:x}),to:"/auth/login/:authResponse",exact:!0}]},98768:function(w,h,e){"use strict";var t=e(32735),r=e(60216),a=e.n(r),v=e(83292),E=e(72850),m=e(87933),P=e(9026),W=e(27677),x=e(49372),X=e(5636),k=e(1115),f=e(58414),M=e(954),B=e(33205);const R=(0,v.default)(P.i)`
  flex: 1;
`,T=b=>{const _=strapi.features.isEnabled(strapi.features.SSO),{isLoading:V,data:y}=(0,f.p)({ssoEnabled:_}),{formatMessage:Pe}=(0,X.useIntl)();return!_||!V&&y.length===0?t.createElement(M.ZP,null,t.createElement(k.Z,{...b})):t.createElement(M.ZP,null,t.createElement(k.Z,{...b},t.createElement(E.x,{paddingTop:7},t.createElement(W.K,{spacing:7},t.createElement(m.k,null,t.createElement(R,null),t.createElement(E.x,{paddingLeft:3,paddingRight:3},t.createElement(x.Z,{variant:"sigma",textColor:"neutral600"},Pe({id:"Auth.login.sso.divider"}))),t.createElement(R,null)),t.createElement(B.Z,{providers:y,displayAllProviders:!1})))))};T.defaultProps={onSubmit:b=>b.preventDefault(),requestError:null},T.propTypes={formErrors:a().object.isRequired,modifiedData:a().object.isRequired,onChange:a().func.isRequired,onSubmit:a().func,requestError:a().object},h.Z=T},33205:function(w,h,e){"use strict";var t=e(32735),r=e(60216),a=e.n(r),v=e(15335),E=e(5803),m=e(87933),P=e(49372),W=e(63919),x=e(83292),X=e(5636),k=e(5141);const f=x.default.a`
  width: ${136/16}rem;
  display: flex;
  justify-content: center;
  align-items: center;
  height: ${48/16}rem;
  border: 1px solid ${({theme:T})=>T.colors.neutral150};
  border-radius: ${({theme:T})=>T.borderRadius};
  text-decoration: inherit;
  &:link {
    text-decoration: none;
  }
  color: ${({theme:T})=>T.colors.neutral600};
`,M=(0,x.default)(m.k)`
  & a:not(:first-child):not(:last-child) {
    margin: 0 ${({theme:T})=>T.spaces[2]};
  }
  & a:first-child {
    margin-right: ${({theme:T})=>T.spaces[2]};
  }
  & a:last-child {
    margin-left: ${({theme:T})=>T.spaces[2]};
  }
`,B=({provider:T})=>t.createElement(W.u,{label:T.displayName},t.createElement(f,{href:`${strapi.backendURL}/admin/connect/${T.uid}`},T.icon?t.createElement("img",{src:T.icon,"aria-hidden":!0,alt:"",height:"32px"}):t.createElement(P.Z,null,T.displayName)));B.propTypes={provider:a().shape({icon:a().string,displayName:a().string.isRequired,uid:a().string.isRequired}).isRequired};const R=({providers:T,displayAllProviders:b})=>{const{formatMessage:_}=(0,X.useIntl)();return b?t.createElement(v.r,{gap:4},T.map(V=>t.createElement(E.P,{key:V.uid,col:4},t.createElement(B,{provider:V})))):T.length>2&&!b?t.createElement(v.r,{gap:4},T.slice(0,2).map(V=>t.createElement(E.P,{key:V.uid,col:4},t.createElement(B,{provider:V}))),t.createElement(E.P,{col:4},t.createElement(W.u,{label:_({id:"global.see-more"})},t.createElement(f,{as:k.Link,to:"/auth/providers"},t.createElement("span",{"aria-hidden":!0},"\u2022\u2022\u2022"))))):t.createElement(M,{justifyContent:"center"},T.map(V=>t.createElement(B,{key:V.uid,provider:V})))};R.defaultProps={displayAllProviders:!0},R.propTypes={providers:a().arrayOf(a().object).isRequired,displayAllProviders:a().bool},h.Z=R},7277:function(w,h,e){"use strict";e.d(h,{Z:function(){return de}});var t=e(32735),r=e(5141),a=e(83292),v=e(58521),E=e(9026),m=e(27677),P=e(87933),W=e(72850),x=e(41415),X=e(97405),k=e(49372),f=e(27649),M=e(5636),B=e(58414),R=e(954),T=e(33205),b=e(10190);const _=(0,a.default)(E.i)`
  flex: 1;
`;var y=()=>{const ke=strapi.features.isEnabled(strapi.features.SSO),{push:o}=(0,r.useHistory)(),{formatMessage:ge}=(0,M.useIntl)(),{isLoading:S,data:O}=(0,B.p)({ssoEnabled:ke}),A=()=>{o("/auth/login")};return!ke||!S&&O.length===0?t.createElement(r.Redirect,{to:"/auth/login"}):t.createElement(R.ZP,null,t.createElement(f.o,null,t.createElement(R.bU,null,t.createElement(R.sg,null,t.createElement(b.Z,null),t.createElement(W.x,{paddingTop:6,paddingBottom:1},t.createElement(k.Z,{as:"h1",variant:"alpha"},ge({id:"Auth.form.welcome.title"}))),t.createElement(W.x,{paddingBottom:7},t.createElement(k.Z,{variant:"epsilon",textColor:"neutral600"},ge({id:"Auth.login.sso.subtitle"})))),t.createElement(m.K,{spacing:7},S?t.createElement(P.k,{justifyContent:"center"},t.createElement(X.a,null,ge({id:"Auth.login.sso.loading"}))):t.createElement(T.Z,{providers:O}),t.createElement(P.k,null,t.createElement(_,null),t.createElement(W.x,{paddingLeft:3,paddingRight:3},t.createElement(k.Z,{variant:"sigma",textColor:"neutral600"},ge({id:"or"}))),t.createElement(_,null)),t.createElement(x.z,{fullWidth:!0,size:"L",onClick:A},ge({id:"Auth.form.button.login.strapi"})))),t.createElement(P.k,{justifyContent:"center"},t.createElement(W.x,{paddingTop:4},t.createElement(v.Link,{to:"/auth/forgot-password"},t.createElement(k.Z,{variant:"pi"},ge({id:"Auth.link.forgot-password"})))))))},Pe=e(78834),de={...Pe.Z,providers:{Component:y,endPoint:null,fieldsToDisable:[],fieldsToOmit:[],schema:null,inputsPrefix:""}}},99568:function(w,h){"use strict";const e={settings:{sso:{main:[{action:"admin::provider-login.read",subject:null}],read:[{action:"admin::provider-login.read",subject:null}],update:[{action:"admin::provider-login.update",subject:null}]}}};h.Z=e},48224:function(w,h,e){var t={"./ar.json":[38677,7958],"./ca.json":[90169,3516],"./cs.json":[43186,7519],"./de.json":[8343,6901],"./dk.json":[65668,7898],"./en.json":[10329,320],"./es.json":[45445,8367],"./fr.json":[8399,8006],"./gu.json":[10182,2248],"./he.json":[21757,830],"./hi.json":[43206,6332],"./hu.json":[72320,5894],"./id.json":[74221,8897],"./it.json":[90685,6817],"./ja.json":[21727,1312],"./ko.json":[30986,1377],"./ml.json":[11309,9903],"./ms.json":[75973,3025],"./nl.json":[80381,2671],"./no.json":[82446,562],"./pl.json":[84008,7846],"./pt-BR.json":[91417,9647],"./pt.json":[41830,3340],"./ru.json":[57098,123],"./sa.json":[92900,9726],"./sk.json":[52204,606],"./sv.json":[43211,9303],"./th.json":[49582,749],"./tr.json":[99154,395],"./uk.json":[2987,7403],"./vi.json":[50576,3278],"./zh-Hans.json":[35964,2553],"./zh.json":[91999,1011]};function r(a){if(!e.o(t,a))return Promise.resolve().then(function(){var m=new Error("Cannot find module '"+a+"'");throw m.code="MODULE_NOT_FOUND",m});var v=t[a],E=v[0];return e.e(v[1]).then(function(){return e.t(E,19)})}r.keys=function(){return Object.keys(t)},r.id=48224,w.exports=r},68507:function(w,h,e){"use strict";w.exports=e.p+"b10a3bda3d2f18d804ad.png"}}]);
