(self.webpackChunk_digicommerce_cms_admin=self.webpackChunk_digicommerce_cms_admin||[]).push([[5538],{78834:(J,C,e)=>{"use strict";e.d(C,{Z:()=>ke});var t=e(5173),c=e(88425),a=e(32735),P=e(5636),A=e(60216),O=e.n(A),x=e(9808),H=e(90662),q=e(16540),Q=e(19192),L=e(44526),Z=e(37178),_=e(95602),D=e(83281),T=e(954),W=e(10190);const N=({onSubmit:ae,schema:Ge})=>{const{formatMessage:le}=(0,P.useIntl)();return a.createElement(T.ZP,null,a.createElement(q.Main,null,a.createElement(T.bU,null,a.createElement(D.Formik,{enableReinitialize:!0,initialValues:{email:""},onSubmit:ae,validationSchema:Ge,validateOnChange:!1},({values:We,errors:Ie,handleChange:qe})=>a.createElement(c.Form,{noValidate:!0},a.createElement(T.sg,null,a.createElement(W.Z,null),a.createElement(x.Box,{paddingTop:6,paddingBottom:7},a.createElement(_.Typography,{as:"h1",variant:"alpha"},le({id:"Auth.form.button.password-recovery",defaultMessage:"Password Recovery"}))),Ie.errorMessage&&a.createElement(_.Typography,{id:"global-form-error",role:"alert",tabIndex:-1,textColor:"danger600"},le({id:Ie.errorMessage,defaultMessage:"An error occurred"}))),a.createElement(H.Stack,{spacing:6},a.createElement(Z.TextInput,{error:Ie.email?le({id:Ie.email,defaultMessage:"This email is invalid."}):"",value:We.email,onChange:qe,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(L.Button,{type:"submit",fullWidth:!0},le({id:"Auth.form.button.forgot-password",defaultMessage:"Send Email"})))))),a.createElement(Q.Flex,{justifyContent:"center"},a.createElement(x.Box,{paddingTop:4},a.createElement(c.Link,{to:"/auth/login"},le({id:"Auth.link.ready",defaultMessage:"Ready to sign in?"}))))))};N.defaultProps={onSubmit:ae=>ae.preventDefault()},N.propTypes={onSubmit:O().func,schema:O().shape({type:O().string.isRequired}).isRequired};const G=N,y=()=>{const{formatMessage:ae}=(0,P.useIntl)();return a.createElement(T.ZP,null,a.createElement(q.Main,null,a.createElement(T.bU,null,a.createElement(T.sg,null,a.createElement(W.Z,null),a.createElement(x.Box,{paddingTop:6,paddingBottom:7},a.createElement(_.Typography,{as:"h1",variant:"alpha"},ae({id:"app.containers.AuthPage.ForgotPasswordSuccess.title",defaultMessage:"Email sent"}))),a.createElement(_.Typography,null,ae({id:"app.containers.AuthPage.ForgotPasswordSuccess.text.email",defaultMessage:"It can take a few minutes to receive your password recovery link."})),a.createElement(x.Box,{paddingTop:4},a.createElement(_.Typography,null,ae({id:"app.containers.AuthPage.ForgotPasswordSuccess.text.contact-admin",defaultMessage:"If you do not receive this link, please contact your administrator."}))))),a.createElement(Q.Flex,{justifyContent:"center"},a.createElement(x.Box,{paddingTop:4},a.createElement(c.Link,{to:"/auth/login"},ae({id:"Auth.link.signin",defaultMessage:"Sign in"}))))))},z=()=>{const{formatMessage:ae}=(0,P.useIntl)(),le=(0,c.useQuery)().get("info")||ae({id:"Auth.components.Oops.text",defaultMessage:"Your account has been suspended."});return a.createElement(T.ZP,null,a.createElement(q.Main,null,a.createElement(T.bU,null,a.createElement(T.sg,null,a.createElement(W.Z,null),a.createElement(x.Box,{paddingTop:6,paddingBottom:7},a.createElement(_.Typography,{as:"h1",variant:"alpha"},ae({id:"Auth.components.Oops.title",defaultMessage:"Oops..."}))),a.createElement(_.Typography,null,le),a.createElement(x.Box,{paddingTop:4},a.createElement(_.Typography,null,ae({id:"Auth.components.Oops.text.admin",defaultMessage:"If this is a mistake, please contact your administrator."}))))),a.createElement(Q.Flex,{justifyContent:"center"},a.createElement(x.Box,{paddingTop:4},a.createElement(c.Link,{to:"/auth/login"},ae({id:"Auth.link.signin",defaultMessage:"Sign in"}))))))};var Le=e(19615),ue=e(33795),be=e.n(ue),l=e(9086),et=e.n(l),Se=e(5141),Xe=e(43653),de=e.n(Xe),re=e(78330),fe=e(37341),te=e.n(fe),Y=e(33912),V=e.n(Y),b=e(72218),I=(ae,Ge,le)=>new Promise((We,Ie)=>{var qe=se=>{try{Qe(le.next(se))}catch(He){Ie(He)}},Te=se=>{try{Qe(le.throw(se))}catch(He){Ie(He)}},Qe=se=>se.done?We(se.value):Promise.resolve(se.value).then(qe,Te);Qe((le=le.apply(ae,Ge)).next())});const U=(0,Le.default)(x.Box)`
  text-align: center;
`,ie=(0,Le.default)(Z.TextInput)`
  ::-ms-reveal {
    display: none;
  }
`,ge=({authType:ae,fieldsToDisable:Ge,noSignin:le,onSubmit:We,schema:Ie})=>{const qe=(0,c.useNotification)(),{push:Te}=(0,Se.useHistory)(),[Qe,se]=(0,a.useState)(!1),[He,$e]=(0,a.useState)(!1),[tt,wt]=(0,a.useState)(0),[at,Ot]=(0,a.useState)({}),{trackUsage:Rt}=(0,c.useTracking)(),{formatMessage:Me}=(0,P.useIntl)(),it=(0,c.useQuery)().get("registrationToken");return(0,a.useEffect)(()=>{it&&I(void 0,null,function*(){try{const{data:{data:ve}}=yield de().get(`${strapi.backendURL}/admin/registration-info?registrationToken=${it}`);ve&&Ot(ve)}catch(ve){const Ke=be()(ve,["response","data","message"],"An error occurred");qe({type:"warning",message:Ke}),Te(`/auth/oops?info=${encodeURIComponent(Ke)}`)}})},[it]),a.createElement(T.ZP,null,a.createElement(T.bU,null,a.createElement(D.Formik,{enableReinitialize:!0,initialValues:{firstname:at.firstname||"",lastname:at.lastname||"",email:at.email||"",password:"",confirmPassword:"",registrationToken:it||void 0,news:!1},onSubmit:(Fe,ve)=>I(void 0,null,function*(){try{yield Ie.validate(Fe,{abortEarly:!1}),tt>0&&ae==="register-admin"&&Rt("didSubmitWithErrorsFirstAdmin",{count:tt.toString()}),We(it?{userInfo:et()(Fe,["registrationToken"]),registrationToken:it}:Fe,ve)}catch(Ke){const st=(0,c.getYupInnerErrors)(Ke);wt(tt+1),ve.setErrors(st)}}),validateOnChange:!1},({values:Fe,errors:ve,handleChange:Ke})=>a.createElement(c.Form,{noValidate:!0},a.createElement(q.Main,null,a.createElement(T.sg,null,a.createElement(W.Z,null),a.createElement(x.Box,{paddingTop:6,paddingBottom:1},a.createElement(_.Typography,{as:"h1",variant:"alpha"},Me({id:"Auth.form.welcome.title",defaultMessage:"Welcome to Digi!"}))),a.createElement(U,{paddingBottom:7},a.createElement(_.Typography,{variant:"epsilon",textColor:"neutral600"},Me({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(H.Stack,{spacing:6},a.createElement(re.Grid,{gap:4},a.createElement(re.GridItem,{col:6},a.createElement(Z.TextInput,{name:"firstname",required:!0,value:Fe.firstname,error:ve.firstname?Me(ve.firstname):void 0,onChange:Ke,label:Me({id:"Auth.form.firstname.label",defaultMessage:"Firstname"})})),a.createElement(re.GridItem,{col:6},a.createElement(Z.TextInput,{name:"lastname",value:Fe.lastname,onChange:Ke,label:Me({id:"Auth.form.lastname.label",defaultMessage:"Lastname"})}))),a.createElement(Z.TextInput,{name:"email",disabled:Ge.includes("email"),value:Fe.email,onChange:Ke,error:ve.email?Me(ve.email):void 0,required:!0,label:Me({id:"Auth.form.email.label",defaultMessage:"Email"}),type:"email"}),a.createElement(ie,{name:"password",onChange:Ke,value:Fe.password,error:ve.password?Me(ve.password):void 0,endAction:a.createElement(b.Z,{onClick:st=>{st.preventDefault(),se(gt=>!gt)},label:Me(Qe?{id:"Auth.form.password.show-password",defaultMessage:"Show password"}:{id:"Auth.form.password.hide-password",defaultMessage:"Hide password"})},Qe?a.createElement(V(),null):a.createElement(te(),null)),hint:Me({id:"Auth.form.password.hint",defaultMessage:"Must be at least 8 characters, 1 uppercase, 1 lowercase & 1 number"}),required:!0,label:Me({id:"global.password",defaultMessage:"Password"}),type:Qe?"text":"password"}),a.createElement(ie,{name:"confirmPassword",onChange:Ke,value:Fe.confirmPassword,error:ve.confirmPassword?Me(ve.confirmPassword):void 0,endAction:a.createElement(b.Z,{onClick:st=>{st.preventDefault(),$e(gt=>!gt)},label:Me(He?{id:"Auth.form.password.show-password",defaultMessage:"Show password"}:{id:"Auth.form.password.hide-password",defaultMessage:"Hide password"})},He?a.createElement(V(),null):a.createElement(te(),null)),required:!0,label:Me({id:"Auth.form.confirmPassword.label",defaultMessage:"Confirmation Password"}),type:He?"text":"password"}),a.createElement(L.Button,{fullWidth:!0,size:"L",type:"submit"},Me({id:"Auth.form.button.register",defaultMessage:"Let's start"})))))),!le&&a.createElement(x.Box,{paddingTop:4},a.createElement(Q.Flex,{justifyContent:"center"},a.createElement(c.Link,{label:"Auth.link.signin",to:"/auth/login"},Me({id:"Auth.link.signin.account",defaultMessage:"Already have an account?"}))))))};ge.defaultProps={fieldsToDisable:[],noSignin:!1,onSubmit:ae=>ae.preventDefault()},ge.propTypes={authType:O().string.isRequired,fieldsToDisable:O().array,noSignin:O().bool,onSubmit:O().func,schema:O().shape({validate:O().func.isRequired,type:O().string.isRequired}).isRequired};const oe=ge,Ee=(0,Le.default)(Z.TextInput)`
  ::-ms-reveal {
    display: none;
  }
`,F=({onSubmit:ae,schema:Ge})=>{const[le,We]=(0,a.useState)(!1),[Ie,qe]=(0,a.useState)(!1),{formatMessage:Te}=(0,P.useIntl)();return a.createElement(T.ZP,null,a.createElement(q.Main,null,a.createElement(T.bU,null,a.createElement(D.Formik,{enableReinitialize:!0,initialValues:{password:"",confirmPassword:""},onSubmit:ae,validationSchema:Ge,validateOnChange:!1},({values:Qe,errors:se,handleChange:He})=>a.createElement(c.Form,{noValidate:!0},a.createElement(T.sg,null,a.createElement(W.Z,null),a.createElement(x.Box,{paddingTop:6,paddingBottom:7},a.createElement(_.Typography,{as:"h1",variant:"alpha"},Te({id:"global.reset-password",defaultMessage:"Reset password"}))),se.errorMessage&&a.createElement(_.Typography,{id:"global-form-error",role:"alert",tabIndex:-1,textColor:"danger600"},Te({id:se.errorMessage,defaultMessage:"An error occurred"}))),a.createElement(H.Stack,{spacing:6},a.createElement(Ee,{name:"password",onChange:He,value:Qe.password,error:se.password?Te({id:se.password,defaultMessage:"This field is required."}):void 0,endAction:a.createElement(b.Z,{onClick:$e=>{$e.preventDefault(),We(tt=>!tt)},label:Te(le?{id:"Auth.form.password.show-password",defaultMessage:"Show password"}:{id:"Auth.form.password.hide-password",defaultMessage:"Hide password"})},le?a.createElement(V(),null):a.createElement(te(),null)),hint:Te({id:"Auth.form.password.hint",defaultMessage:"Password must contain at least 8 characters, 1 uppercase, 1 lowercase and 1 number"}),required:!0,label:Te({id:"global.password",defaultMessage:"Password"}),type:le?"text":"password"}),a.createElement(Ee,{name:"confirmPassword",onChange:He,value:Qe.confirmPassword,error:se.confirmPassword?Te({id:se.confirmPassword,defaultMessage:"This value is required."}):void 0,endAction:a.createElement(b.Z,{onClick:$e=>{$e.preventDefault(),qe(tt=>!tt)},label:Te(le?{id:"Auth.form.password.show-password",defaultMessage:"Show password"}:{id:"Auth.form.password.hide-password",defaultMessage:"Hide password"})},Ie?a.createElement(V(),null):a.createElement(te(),null)),required:!0,label:Te({id:"Auth.form.confirmPassword.label",defaultMessage:"Confirmation Password"}),type:Ie?"text":"password"}),a.createElement(L.Button,{fullwidth:!0,type:"submit"},Te({id:"global.change-password",defaultMessage:"Change password"})))))),a.createElement(Q.Flex,{justifyContent:"center"},a.createElement(x.Box,{paddingTop:4},a.createElement(c.Link,{to:"/auth/login"},Te({id:"Auth.link.ready",defaultMessage:"Ready to sign in?"}))))))};F.defaultProps={onSubmit:ae=>ae.preventDefault()},F.propTypes={onSubmit:O().func,schema:O().shape({type:O().string.isRequired}).isRequired};const ce=F;var Ue=function(){return window&&window.strapi&&window.strapi.isEE?e(98768).Z:e(5365).Z}(),ht={"forgot-password":{Component:G,endPoint:"forgot-password",fieldsToDisable:[],fieldsToOmit:[],schema:t.Ry().shape({email:t.Z_().email(c.translatedErrors.email).required(c.translatedErrors.required)}),inputsPrefix:""},"forgot-password-success":{Component:y,endPoint:"",fieldsToDisable:[],fieldsToOmit:[],schema:null,inputsPrefix:""},login:{Component:Ue,endPoint:"login",fieldsToDisable:[],fieldsToOmit:["rememberMe"],schema:t.Ry().shape({email:t.Z_().email(c.translatedErrors.email).required(c.translatedErrors.required),password:t.Z_().required(c.translatedErrors.required),rememberMe:t.Xg().nullable()}),inputsPrefix:""},oops:{Component:z,endPoint:null,fieldsToDisable:[],fieldsToOmit:[],schema:null,inputsPrefix:""},register:{Component:oe,endPoint:"register",fieldsToDisable:["email"],fieldsToOmit:["userInfo.confirmPassword","userInfo.news","userInfo.email"],schema:t.Ry().shape({firstname:t.Z_().required(c.translatedErrors.required),lastname:t.Z_(),password:t.Z_().min(8,c.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(c.translatedErrors.required),confirmPassword:t.Z_().oneOf([t.iH("password"),null],"components.Input.error.password.noMatch").required(c.translatedErrors.required),registrationToken:t.Z_().required(c.translatedErrors.required)}),inputsPrefix:"userInfo."},"register-admin":{Component:oe,endPoint:"register-admin",noSignin:!0,fieldsToDisable:[],fieldsToOmit:["confirmPassword","news"],schema:t.Ry().shape({firstname:t.Z_().required(c.translatedErrors.required),lastname:t.Z_(),password:t.Z_().min(8,c.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(c.translatedErrors.required),email:t.Z_().email(c.translatedErrors.email).strict().lowercase(c.translatedErrors.lowercase).required(c.translatedErrors.required),confirmPassword:t.Z_().oneOf([t.iH("password"),null],"components.Input.error.password.noMatch").required(c.translatedErrors.required)}),inputsPrefix:""},"reset-password":{Component:ce,endPoint:"reset-password",fieldsToDisable:[],fieldsToOmit:["confirmPassword"],schema:t.Ry().shape({password:t.Z_().min(8,c.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(c.translatedErrors.required),confirmPassword:t.Z_().oneOf([t.iH("password"),null],"components.Input.error.password.noMatch").required(c.translatedErrors.required)})}};const ke=ht},83983:(J,C,e)=>{"use strict";e.d(C,{Z:()=>O});var t=e(92891);const 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:{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.create",subject:null},{action:"admin::api-tokens.read",subject:null},{action:"admin::api-tokens.update",subject:null},{action:"admin::api-tokens.delete",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}]}}};var P=function(){return window&&window.strapi&&window.strapi.isEE?e(99568).Z:e(26123).Z}(),A=(0,t.merge)(a,P);const O=A},63527:(J,C,e)=>{"use strict";e.r(C),e.d(C,{default:()=>tr});var t=e(32735),c=e(5141),a=e(10345),P=e(86349),A=e.n(P),O=e(88423),x=e.n(O),H=e(93839),q=e.n(H),Q=e(56784),L=e.n(Q),Z=e(99357),_=e(17247),D=e(13055);const W=i=>(0,D.combineReducers)(i),G=(i,n)=>{const r=[];return i.forEach(p=>{r.push(p())}),(0,D.createStore)(W(n),{},(0,D.applyMiddleware)(...r))};var ee=e(46320),y=e(88425),j=e(43653),z=e.n(j),Le=e(16540),ue=e(5636),be=e(60216),l=e.n(be),et=Object.defineProperty,Se=Object.getOwnPropertySymbols,Xe=Object.prototype.hasOwnProperty,de=Object.prototype.propertyIsEnumerable,re=(i,n,r)=>n in i?et(i,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):i[n]=r,fe=(i,n)=>{for(var r in n||(n={}))Xe.call(n,r)&&re(i,r,n[r]);if(Se)for(var r of Se(n))de.call(n,r)&&re(i,r,n[r]);return i},te=(i,n)=>{var r={};for(var p in i)Xe.call(i,p)&&n.indexOf(p)<0&&(r[p]=i[p]);if(i!=null&&Se)for(var p of Se(i))n.indexOf(p)<0&&de.call(i,p)&&(r[p]=i[p]);return r};const Y=i=>{var n=i,{component:r,path:p}=n,g=te(n,["component","path"]);const{pathname:E,search:d}=(0,c.useLocation)();return t.createElement(c.Route,{path:p,render:m=>y.auth.getToken()!==null?t.createElement(r,fe(fe({},g),m)):t.createElement(c.Redirect,{to:{pathname:"/auth/login",search:E!=="/"&&`?redirectTo=${encodeURIComponent(`${E}${d}`)}`}})})};Y.propTypes={component:l().any.isRequired,path:l().string.isRequired};const V=(0,t.memo)(Y);var b=e(7602),I=e(41925),U=e(16584),ie=e(52136),ge=e(39515),oe=e(7943),Ee=e(33997),F=e.n(Ee),ce=e(39935),Ue=e.n(ce),ht=e(33795),ke=e.n(ht),ae=e(9086),Ge=e.n(ae);const le="GUIDED_TOUR_CURRENT_STEP",We="GUIDED_TOUR_COMPLETED_STEPS",Ie="GUIDED_TOUR_SKIPPED",qe=JSON.parse,Te=JSON.stringify,se={clear(){localStorage.removeItem(le),localStorage.removeItem(We)},addCompletedStep:i=>{var n;const r=((n=qe(localStorage.getItem(We)))==null?void 0:n.slice())||[];r.includes(i)||(r.push(i),localStorage.setItem(We,Te(r)))},addCurrentStep:i=>{localStorage.setItem(le,Te(i))},setSkipped:i=>{localStorage.setItem(Ie,Te(i))},get:i=>qe(localStorage.getItem(i))};var He=e(20139),$e=e(41832);const wt=i=>i;var at=e(49415),Ot=e(92891);const Rt={formErrors:{},modifiedData:{},requestError:null},Me=(i,n)=>(0,at.default)(i,r=>{switch(n.type){case"ON_CHANGE":{(0,Ot.set)(r.modifiedData,n.keys.split("."),n.value);break}case"RESET_PROPS":return Rt;case"SET_DATA":{r.modifiedData=n.data;break}case"SET_ERRORS":{r.formErrors=n.errors;break}case"SET_REQUEST_ERROR":{r.requestError={errorMessage:n.errorMessage,errorStatus:n.errorStatus};break}default:return r}});var xt=e(98399),it=["Component","endPoint","fieldsToDisable","fieldsToOmit","inputsPrefix","schema"];function Fe(i,n){var r=Object.keys(i);if(Object.getOwnPropertySymbols){var p=Object.getOwnPropertySymbols(i);n&&(p=p.filter(function(g){return Object.getOwnPropertyDescriptor(i,g).enumerable})),r.push.apply(r,p)}return r}function ve(i){for(var n=1;n<arguments.length;n++){var r=arguments[n]!=null?arguments[n]:{};n%2?Fe(Object(r),!0).forEach(function(p){(0,U.Z)(i,p,r[p])}):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(r)):Fe(Object(r)).forEach(function(p){Object.defineProperty(i,p,Object.getOwnPropertyDescriptor(r,p))})}return i}var Ke=function(){return window&&window.strapi&&window.strapi.isEE?e(7277).Z:e(78834).Z}(),st=function(n){var r=n.hasAdmin,p=n.setHasAdmin,g=(0,c.useHistory)(),E=g.push,d=g.location.search,m=(0,He.Z)(),h=m.changeLocale,v=(0,y.useGuidedTour)(),ne=v.setSkipped,K=(0,y.useTracking)(),X=K.trackUsage,Pe=(0,c.useRouteMatch)("/auth/:authType"),$=Pe.params.authType,Oe=(0,y.useQuery)(),_e=ke()(Ke,$,{}),ze=_e.Component,Bt=_e.endPoint,sr=_e.fieldsToDisable,Ns=_e.fieldsToOmit,nr=_e.inputsPrefix,rr=_e.schema,or=(0,oe.Z)(_e,it),ar=(0,t.useReducer)(Me,Rt,wt),Pn=(0,ge.Z)(ar,2),Zs=Pn[0],ir=Zs.formErrors,lr=Zs.modifiedData,ur=Zs.requestError,us=Pn[1],dr=z().CancelToken,Ut=dr.source();(0,t.useEffect)(function(){return function(){Ut.cancel("Component unmounted")}},[]),(0,t.useEffect)(function(){us({type:"RESET_PROPS"})},[$]);var cr=function(De){var me=De.target,je=me.name,he=me.value;us({type:"ON_CHANGE",keys:je,value:he})},mr=function(){var nt=(0,ie.Z)(F().mark(function De(me,je){var he,Be,Ne,Ze;return F().wrap(function(Ce){for(;;)switch(Ce.prev=Ce.next){case 0:if(he=je.setSubmitting,Be=je.setErrors,he(!0),Ne=Ge()(me,Ns),Ze="/admin/".concat(Bt),$!=="login"){Ce.next=7;break}return Ce.next=7,fr(me,Ze,{setSubmitting:he,setErrors:Be});case 7:if(!($==="register"||$==="register-admin")){Ce.next=10;break}return Ce.next=10,gr(me,Ze,{setSubmitting:he,setErrors:Be});case 10:if($!=="forgot-password"){Ce.next=13;break}return Ce.next=13,pr(Ne,Ze,{setSubmitting:he,setErrors:Be});case 13:if($!=="reset-password"){Ce.next=16;break}return Ce.next=16,hr(Ne,Ze,{setSubmitting:he,setErrors:Be});case 16:case"end":return Ce.stop()}},De)}));return function(me,je){return nt.apply(this,arguments)}}(),pr=function(){var nt=(0,ie.Z)(F().mark(function De(me,je,he){var Be,Ne;return F().wrap(function(pe){for(;;)switch(pe.prev=pe.next){case 0:return Be=he.setSubmitting,Ne=he.setErrors,pe.prev=1,pe.next=4,z()({method:"POST",url:"".concat(strapi.backendURL).concat(je),data:me,cancelToken:Ut.token});case 4:E("/auth/forgot-password-success"),pe.next=11;break;case 7:pe.prev=7,pe.t0=pe.catch(1),xt.error(pe.t0),Ne({errorMessage:"notification.error"});case 11:return pe.prev=11,Be(!1),pe.finish(11);case 14:case"end":return pe.stop()}},De,null,[[1,7,11,14]])}));return function(me,je,he){return nt.apply(this,arguments)}}(),fr=function(){var nt=(0,ie.Z)(F().mark(function De(me,je,he){var Be,Ne,Ze,pe,Ce,rt,ot;return F().wrap(function(Re){for(;;)switch(Re.prev=Re.next){case 0:return Be=he.setSubmitting,Ne=he.setErrors,Re.prev=1,Re.next=4,z()({method:"POST",url:"".concat(strapi.backendURL).concat(je),data:Ge()(me,Ns),cancelToken:Ut.token});case 4:Ze=Re.sent,pe=Ze.data.data,Ce=pe.token,rt=pe.user,rt.preferedLanguage&&h(rt.preferedLanguage),y.auth.setToken(Ce,me.rememberMe),y.auth.setUserInfo(rt,me.rememberMe),Tn(),Re.next=23;break;case 14:if(Re.prev=14,Re.t0=Re.catch(1),!Re.t0.response){Re.next=23;break}if(ot=ke()(Re.t0,["response","data","error","message"],"Something went wrong"),Ue()(ot).toLowerCase()!=="usernotactive"){Re.next=22;break}return E("/auth/oops"),us({type:"RESET_PROPS"}),Re.abrupt("return");case 22:Ne({errorMessage:ot});case 23:return Re.prev=23,Be(!1),Re.finish(23);case 26:case"end":return Re.stop()}},De,null,[[1,14,23,26]])}));return function(me,je,he){return nt.apply(this,arguments)}}(),gr=function(){var nt=(0,ie.Z)(F().mark(function De(me,je,he){var Be,Ne,Ze,pe,Ce,rt,ot,Tt,Re,Ae;return F().wrap(function(Ve){for(;;)switch(Ve.prev=Ve.next){case 0:return Be=he.setSubmitting,Ne=he.setErrors,Ve.prev=1,X("willCreateFirstAdmin"),Ve.next=5,z()({method:"POST",url:"".concat(strapi.backendURL).concat(je),data:Ge()(me,Ns),cancelToken:Ut.token});case 5:if(Ze=Ve.sent,pe=Ze.data.data,Ce=pe.token,rt=pe.user,y.auth.setToken(Ce,!1),y.auth.setUserInfo(rt,!1),Be(!1),p(!0),ot=rt.roles,ot&&(Tt=ot.find(function(Er){var vr=Er.code;return vr==="strapi-super-admin"}),Tt&&(se.setSkipped(!1),ne(!1),X("didLaunchGuidedtour"))),!($==="register"&&me.userInfo.news===!0||$==="register-admin"&&me.news===!0)){Ve.next=18;break}return E({pathname:"/usecase",search:"?hasAdmin=".concat(r)}),Ve.abrupt("return");case 18:Tn(),Ve.next=25;break;case 21:Ve.prev=21,Ve.t0=Ve.catch(1),X("didNotCreateFirstAdmin"),Ve.t0.response&&(Re=Ve.t0.response.data,Ae=(0,$e.Z)(Re),Ne({apiErrors:Ae}));case 25:case"end":return Ve.stop()}},De,null,[[1,21]])}));return function(me,je,he){return nt.apply(this,arguments)}}(),hr=function(){var nt=(0,ie.Z)(F().mark(function De(me,je,he){var Be,Ne,Ze,pe,Ce,rt,ot,Tt;return F().wrap(function(Ae){for(;;)switch(Ae.prev=Ae.next){case 0:return Be=he.setErrors,Ne=he.setSubmitting,Ae.prev=1,Ae.next=4,z()({method:"POST",url:"".concat(strapi.backendURL).concat(je),data:ve(ve({},me),{},{resetPasswordToken:Oe.get("code")}),cancelToken:Ut.token});case 4:Ze=Ae.sent,pe=Ze.data.data,Ce=pe.token,rt=pe.user,y.auth.setToken(Ce,!1),y.auth.setUserInfo(rt,!1),E("/"),Ae.next=16;break;case 13:Ae.prev=13,Ae.t0=Ae.catch(1),Ae.t0.response&&(ot=ke()(Ae.t0,["response","data","message"],"Something went wrong"),Tt=ke()(Ae.t0,["response","data","statusCode"],400),us({type:"SET_REQUEST_ERROR",errorMessage:ot,errorStatus:Tt}),Be({errorMessage:ot}));case 16:return Ae.prev=16,Ne(!1),Ae.finish(16);case 19:case"end":return Ae.stop()}},De,null,[[1,13,16,19]])}));return function(me,je,he){return nt.apply(this,arguments)}}(),Tn=function(){if($==="login"){var De=Oe.get("redirectTo"),me=De?decodeURIComponent(De):"/";E(me)}else E("/")};return!Ke[$]||r&&$==="register-admin"||y.auth.getToken()?t.createElement(c.Redirect,{to:"/"}):!r&&$!=="register-admin"?t.createElement(c.Redirect,{to:{pathname:"/auth/register-admin",search:d}}):t.createElement(ze,(0,I.Z)({},or,{authType:$,fieldsToDisable:sr,formErrors:ir,inputsPrefix:nr,modifiedData:lr,onChange:cr,onSubmit:mr,requestError:ur,schema:rr}))};st.defaultProps={hasAdmin:!1},st.propTypes={hasAdmin:l().bool,setHasAdmin:l().func.isRequired};const gt=st;var ds=e(53951),lt=e(19615),ct=e(19192),Et=e(9808),vt=e(90662),kt=e(95602),Wt=e(25716),Ft=e(37178),Gs=e(74201),cs=e(44526),ms=e(10190),ps=e(954);const fs=[{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"}],Ye=(0,lt.default)(kt.Typography)`
  text-align: center;
`,Hs=()=>{const i=(0,y.useNotification)(),{push:n}=(0,c.useHistory)(),{formatMessage:r}=(0,ue.useIntl)(),[p,g]=(0,t.useState)(),[E,d]=(0,t.useState)(""),m=p==="other",h=v=>{try{i({type:"success",message:{id:"Usecase.notification.success.project-created",defaultMessage:"Project has been successfully created"}}),n("/")}catch(ne){}};return t.createElement(ps.ZP,null,t.createElement(Le.Main,{labelledBy:"usecase-title"},t.createElement(ps.bU,null,t.createElement("form",{onSubmit:()=>h(!1)},t.createElement(ct.Flex,{direction:"column",paddingBottom:7},t.createElement(ms.Z,null),t.createElement(Et.Box,{paddingTop:6,paddingBottom:1,width:(0,y.pxToRem)(250)},t.createElement(Ye,{variant:"alpha",as:"h1",id:"usecase-title"},r({id:"Usecase.title",defaultMessage:"Tell us a bit more about yourself"})))),t.createElement(vt.Stack,{spacing:6},t.createElement(Wt.Select,{id:"usecase","data-testid":"usecase",label:r({id:"Usecase.input.work-type",defaultMessage:"What type of work do you do?"}),onChange:g,value:p},fs.map(({intlLabel:v,value:ne})=>t.createElement(Wt.Option,{key:ne,value:ne},r(v)))),m&&t.createElement(Ft.TextInput,{name:"other",label:r({id:"Usecase.other",defaultMessage:"Other"}),value:E,onChange:v=>d(v.target.value),"data-testid":"other"}),t.createElement(cs.Button,{type:"submit",size:"L",fullWidth:!0,disabled:!p},r({id:"global.finish",defaultMessage:"Finish"}))))),t.createElement(ct.Flex,{justifyContent:"center"},t.createElement(Et.Box,{paddingTop:4},t.createElement(Gs.TextButton,{onClick:()=>h(!0)},r({id:"Usecase.button.skip",defaultMessage:"Skip this question"}))))))};var Kt=e(15685);const hs=[];var Es=function(){return window&&window.strapi&&window.strapi.isEE?e(68944).Z:e(56761).Z}();const vs=[].concat((0,Kt.Z)(Es),(0,Kt.Z)(hs));var ys=e(78227),Ps=Object.defineProperty,Ts=Object.defineProperties,Os=Object.getOwnPropertyDescriptors,Nt=Object.getOwnPropertySymbols,Zt=Object.prototype.hasOwnProperty,Rs=Object.prototype.propertyIsEnumerable,Gt=(i,n,r)=>n in i?Ps(i,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):i[n]=r,Mt=(i,n)=>{for(var r in n||(n={}))Zt.call(n,r)&&Gt(i,r,n[r]);if(Nt)for(var r of Nt(n))Rs.call(n,r)&&Gt(i,r,n[r]);return i},Ct=(i,n)=>Ts(i,Os(n)),St=(i,n,r)=>new Promise((p,g)=>{var E=h=>{try{m(r.next(h))}catch(v){g(v)}},d=h=>{try{m(r.throw(h))}catch(v){g(v)}},m=h=>h.done?p(h.value):Promise.resolve(h.value).then(E,d);m((r=r.apply(i,n)).next())});const zs=(0,t.lazy)(()=>Promise.all([e.e(3050),e.e(801)]).then(e.bind(e,66244)));function Ms(){const i=(0,y.useNotification)(),{updateProjectSettings:n}=(0,ys.um)(),{formatMessage:r}=(0,ue.useIntl)(),[{isLoading:p,hasAdmin:g,uuid:E},d]=(0,t.useState)({isLoading:!0,hasAdmin:!1}),m=(0,t.useMemo)(()=>(0,b.WW)(vs.map(({to:K,Component:X,exact:Pe})=>(0,b.ot)(X,K,Pe))),[]),[h,v]=(0,t.useState)(null);(0,t.useEffect)(()=>{const K=y.auth.getToken();K&&(()=>St(this,null,function*(){try{const{data:{token:Pe}}=yield(0,y.request)("/admin/renew-token",{method:"POST",body:{token:K}});y.auth.updateToken(Pe)}catch(Pe){y.auth.clearAppStorage(),window.location.reload()}}))()},[]),(0,t.useEffect)(()=>{(()=>St(this,null,function*(){try{const{data:{data:{uuid:X,hasAdmin:Pe,menuLogo:$}}}=yield z().get(`${strapi.backendURL}/admin/init`);if(n({menuLogo:(0,y.prefixFileUrlWithBackendUrl)($)}),X){const{data:{data:Oe}}=yield z().get(`${strapi.backendURL}/admin/telemetry-properties`);v(Oe)}d({isLoading:!1,hasAdmin:Pe,uuid:X})}catch(X){i({type:"warning",message:{id:"app.containers.App.notification.error.init"}})}}))()},[i,n]);const ne=K=>d(X=>Ct(Mt({},X),{hasAdmin:K}));return p?t.createElement(y.LoadingIndicatorPage,null):t.createElement(t.Suspense,{fallback:t.createElement(y.LoadingIndicatorPage,null)},t.createElement(Le.SkipToContent,null,r({id:"skipToContent"})),t.createElement(y.TrackingContext.Provider,{value:{uuid:E,telemetryProperties:h}},t.createElement(c.Switch,null,m,t.createElement(c.Route,{path:"/auth/:authType",render:K=>t.createElement(gt,Ct(Mt({},K),{setHasAdmin:ne,hasAdmin:g})),exact:!0}),t.createElement(V,{path:"/usecase",component:Hs}),t.createElement(V,{path:"/",component:zs}),t.createElement(c.Route,{path:"",component:ds.default}))))}const Ht=Ms,Vs=e.p+"b10a3bda3d2f18d804ad.png",Cs=e.p+"b10a3bda3d2f18d804ad.png";var $t=e(84968),Ss=e(4409),Dt=e(66694);const zt={menuLogo:null},Vt=(i=zt,n)=>(0,at.default)(i,r=>{switch(n.type){case"UPDATE_PROJECT_SETTINGS":{Object.assign(r,n.values);break}default:return r}}),Xt=({children:i,authLogo:n,menuLogo:r,showReleaseNotification:p,showTutorials:g})=>{const[{menuLogo:E},d]=(0,t.useReducer)(Vt,zt),m=({menuLogo:v})=>d({type:"UPDATE_PROJECT_SETTINGS",values:{menuLogo:v||r}}),h=(0,t.useRef)(m);return t.createElement(Dt._5.Provider,{value:{logos:{menu:{custom:E,default:r},auth:{custom:null,default:n}},updateProjectSettings:h.current,showReleaseNotification:p,showTutorials:g}},i)};Xt.propTypes={authLogo:l().string.isRequired,children:l().element.isRequired,menuLogo:l().string.isRequired,showReleaseNotification:l().bool.isRequired,showTutorials:l().bool.isRequired};const Ds=Xt;var Qt=e(58732),At=e.n(Qt),Lt=e(5985);const As=({changeLocale:i,children:n,localeNames:r,messages:p})=>t.createElement(Lt.Z.Provider,{value:{changeLocale:i,localeNames:r,messages:p}},n);As.propTypes={changeLocale:l().func.isRequired,children:l().element.isRequired,localeNames:l().object.isRequired,messages:l().object.isRequired};const Ls=As,Is="strapi-admin-language",Yt=i=>{const n=window.localStorage.getItem(Is);return{locale:i[n]?n:"en",localeNames:i}};var Jt=Object.defineProperty,_s=Object.defineProperties,js=Object.getOwnPropertyDescriptors,qt=Object.getOwnPropertySymbols,Bs=Object.prototype.hasOwnProperty,es=Object.prototype.propertyIsEnumerable,ts=(i,n,r)=>n in i?Jt(i,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):i[n]=r,Us=(i,n)=>{for(var r in n||(n={}))Bs.call(n,r)&&ts(i,r,n[r]);if(qt)for(var r of qt(n))es.call(n,r)&&ts(i,r,n[r]);return i},ss=(i,n)=>_s(i,js(n));const ns={localeNames:{en:"English"},locale:"en"},Js=(i=ns,n)=>{switch(n.type){case"CHANGE_LOCALE":{const{locale:r}=n;return i.localeNames[r]?ss(Us({},i),{locale:r}):i}default:return i}},rs=({children:i,localeNames:n,messages:r})=>{const[{locale:p},g]=(0,t.useReducer)(Js,ns,()=>Yt(n));(0,t.useEffect)(()=>{window.localStorage.setItem(Is,p)},[p]);const E=m=>{g({type:"CHANGE_LOCALE",locale:m})},d=At()(r[p],r.en);return t.createElement(ue.IntlProvider,{locale:p,defaultLocale:"en",messages:d,textComponent:"span"},t.createElement(Ls,{changeLocale:E,localeNames:n,messages:d},i))};rs.propTypes={children:l().element.isRequired,localeNames:l().objectOf(l().string).isRequired,messages:l().object.isRequired};const ws=rs,qs=(i,n)=>{const r=Object.entries(n),p=r.findIndex(([E])=>E===i);return r.slice(0,p).every(([,E])=>Object.values(E).every(Boolean))},os=(i,n)=>{const r=i.split("."),p=r[1],g=Object.entries(n[r[0]]),E=g.findIndex(([m])=>m===p);return g.slice(0,E).every(([,m])=>m)},ks={currentStep:null,guidedTourState:{contentTypeBuilder:{create:!1,success:!1},contentManager:{create:!1,success:!1},apiTokens:{create:!1,success:!1}},isGuidedTourVisible:!1,isSkipped:!0},sn=(i=ks,n)=>(0,at.default)(i,r=>{switch(n.type){case"SET_CURRENT_STEP":{r.currentStep=n.step;break}case"SET_STEP_STATE":{const[p,g]=n.currentStep.split(".");r.guidedTourState[p][g]=n.value;break}case"SET_SKIPPED":{r.isSkipped=n.value;break}case"SET_GUIDED_TOUR_VISIBILITY":{r.isGuidedTourVisible=n.value;break}default:return r}});var Ws=e(3040),u=e.n(Ws),o=Object.defineProperty,s=Object.getOwnPropertySymbols,R=Object.prototype.hasOwnProperty,M=Object.prototype.propertyIsEnumerable,w=(i,n,r)=>n in i?o(i,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):i[n]=r,k=(i,n)=>{for(var r in n||(n={}))R.call(n,r)&&w(i,r,n[r]);if(s)for(var r of s(n))M.call(n,r)&&w(i,r,n[r]);return i};const f=i=>{const n=k({},i),r=se.get(We),p=se.get(le),g=se.get(Ie);if(r&&r.forEach(E=>{const[d,m]=E.split(".");u()(n,["guidedTourState",d,m],!0)}),p){const[E,d]=p.split(".");u()(n,["guidedTourState",E,d],!0),se.addCompletedStep(p),se.addCurrentStep(null)}return g!==null&&u()(n,"isSkipped",g),n},B=({children:i})=>{const[{currentStep:n,guidedTourState:r,isGuidedTourVisible:p,isSkipped:g},E]=(0,t.useReducer)(sn,ks,f),d=K=>{if(K!==null){const X=ke()(r,K),Pe=os(K,r);if(X||g||!Pe)return null}return se.addCurrentStep(K),E({type:"SET_CURRENT_STEP",step:K})},m=K=>{E({type:"SET_GUIDED_TOUR_VISIBILITY",value:K})},h=(K,X)=>{se.addCompletedStep(K),E({type:"SET_STEP_STATE",currentStep:K,value:X})},v=K=>{const X=r[K];if(X){const Pe=qs(K,r),$=Object.keys(X)[0],Oe=X[$];if(Pe&&!n&&!Oe)return d(`${K}.${$}`)}return null},ne=K=>{se.setSkipped(K),E({type:"SET_SKIPPED",value:K})};return t.createElement(y.GuidedTourProvider,{guidedTourState:r,currentStep:n,setCurrentStep:d,setGuidedTourVisibility:m,setSkipped:ne,setStepState:h,startSection:v,isGuidedTourVisible:p,isSkipped:g},i)};B.propTypes={children:l().element.isRequired};const we=B;var ut=e(12788),mt=e(70324),pt=e.n(mt),bt=e(23101),as=e.n(bt),It=e(14983);const _t=(0,lt.default)(Et.Box)`
  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:i})=>i.colors.neutral0};
    opacity: 0.9;
  }
`,ft=(0,lt.default)(vt.Stack)`
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  padding-top: ${(0,y.pxToRem)(160)};
`,xe=(0,lt.default)(Et.Box)`
  border-radius: 50%;
  svg {
    > path {
      fill: ${({theme:i})=>i.colors.primary600} !important;
    }
  }
`,Je=document.createElement("div"),dt="autoReloadOverlayBlocker";Je.setAttribute("id",dt);const jt=lt.keyframes`
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(359deg);
  }
`,On=(0,lt.default)(as())`
  animation: ${jt} 1s infinite linear;
`,nn=({displayedIcon:i,description:n,title:r,isOpen:p})=>{const{formatMessage:g}=(0,ue.useIntl)();return(0,t.useEffect)(()=>(document.body.appendChild(Je),()=>{document.body.removeChild(Je)}),[]),p?ut.createPortal(t.createElement(_t,null,t.createElement(ft,{spacing:6},t.createElement(vt.Stack,{spacing:2},t.createElement(ct.Flex,{justifyContent:"center"},t.createElement(kt.Typography,{as:"h1",variant:"alpha"},g(r))),t.createElement(ct.Flex,{justifyContent:"center"},t.createElement(kt.Typography,{as:"h2",textColor:"neutral600",fontSize:4,fontWeight:"regular"},g(n)))),t.createElement(ct.Flex,{justifyContent:"center"},i==="reload"&&t.createElement(xe,{padding:6,background:"primary100",borderColor:"primary200"},t.createElement(On,{width:(0,y.pxToRem)(36),height:(0,y.pxToRem)(36)})),i==="time"&&t.createElement(xe,{padding:6,background:"primary100",borderColor:"primary200"},t.createElement(pt(),{width:(0,y.pxToRem)(40),height:(0,y.pxToRem)(40)}))),t.createElement(ct.Flex,{justifyContent:"center"},t.createElement(Et.Box,{paddingTop:2},t.createElement(It.Link,{href:"https://docs.strapi.io",isExternal:!0},g({id:"global.documentation",defaultMessage:"Read the documentation"})))))),Je):null};nn.propTypes={displayedIcon:l().oneOfType([l().string,l().array]).isRequired,description:l().object.isRequired,isOpen:l().bool.isRequired,title:l().object.isRequired};const Rn=nn;var Mn=Object.defineProperty,Cn=Object.defineProperties,Sn=Object.getOwnPropertyDescriptors,rn=Object.getOwnPropertySymbols,Dn=Object.prototype.hasOwnProperty,An=Object.prototype.propertyIsEnumerable,on=(i,n,r)=>n in i?Mn(i,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):i[n]=r,an=(i,n)=>{for(var r in n||(n={}))Dn.call(n,r)&&on(i,r,n[r]);if(rn)for(var r of rn(n))An.call(n,r)&&on(i,r,n[r]);return i},ln=(i,n)=>Cn(i,Sn(n));const un=30,dn=({children:i})=>{const[n,r]=(0,t.useState)(!1),[{elapsed:p},g]=(0,t.useState)({elapsed:0,start:0}),[E,d]=(0,t.useState)(void 0),m=($=void 0)=>{r(!0),d($),g(Oe=>ln(an({},Oe),{start:Date.now()}))},h=()=>{r(!1),g({start:0,elapsed:0}),d(void 0)},v=(0,t.useRef)(m),ne=(0,t.useRef)(h);(0,t.useEffect)(()=>{let $=null;return n?$=setInterval(()=>p>un?(clearInterval($),null):(g(Oe=>ln(an({},Oe),{elapsed:Math.round(Date.now()-Oe.start)/1e3})),null),1e3):clearInterval($),()=>{clearInterval($)}},[n,p]);let K=(E==null?void 0:E.icon)||"reload",X={id:(E==null?void 0:E.description)||"components.OverlayBlocker.description",defaultMessage:"You're using a feature that needs the server to restart. Please wait until the server is up."},Pe={id:(E==null?void 0:E.title)||"components.OverlayBlocker.title",defaultMessage:"Waiting for restart"};return p>un&&(K="time",X={id:"components.OverlayBlocker.description.serverError",defaultMessage:"The server should have restarted, please check your logs in the terminal."},Pe={id:"components.OverlayBlocker.title.serverError",defaultMessage:"The restart is taking longer than expected"}),t.createElement(y.AutoReloadOverlayBockerContext.Provider,{value:{lockApp:v.current,unlockApp:ne.current}},t.createElement(Rn,{displayedIcon:K,isOpen:n,description:X,title:Pe}),i)};dn.propTypes={children:l().element.isRequired};const Ln=dn;var bn=e(63568);const Fs=({dispatch:i,notification:n})=>{var r,p,g;const{formatMessage:E}=(0,ue.useIntl)(),{message:d,link:m,type:h,id:v,onClose:ne,timeout:K,blockTransition:X}=n,Pe=ze=>typeof ze=="string"?ze:E(ze,ze.values),$=(0,t.useCallback)(()=>{ne&&ne(),i({type:"HIDE_NOTIFICATION",id:v})},[v]);(0,t.useEffect)(()=>{let ze;return X||(ze=setTimeout(()=>{$()},K||2500)),()=>clearTimeout(ze)},[X,$,K]);let Oe,_e;return h==="info"?(Oe="default",_e=E({id:"notification.default.title",defaultMessage:"Information:"})):h==="warning"?(_e=E({id:"notification.warning.title",defaultMessage:"Warning:"}),Oe="danger"):(_e=E({id:"notification.success.title",defaultMessage:"Success:"}),Oe="success"),t.createElement(bn.Alert,{action:m?t.createElement(It.Link,{href:m.url,isExternal:!0},E({id:((r=m.label)==null?void 0:r.id)||m.label,defaultMessage:((p=m.label)==null?void 0:p.defaultMessage)||((g=m.label)==null?void 0:g.id)||m.label})):void 0,onClose:$,closeLabel:"Close",title:_e,variant:Oe},Pe({id:(d==null?void 0:d.id)||d,defaultMessage:(d==null?void 0:d.defaultMessage)||(d==null?void 0:d.id)||d}))};Fs.defaultProps={notification:{id:1,type:"success",message:{id:"notification.success.saved",defaultMessage:"Saved"},onClose:()=>null,timeout:2500,blockTransition:!1}},Fs.propTypes={dispatch:l().func.isRequired,notification:l().shape({id:l().number,message:l().oneOfType([l().string,l().shape({id:l().string.isRequired,defaultMessage:l().string,values:l().object})]),link:l().shape({target:l().string,url:l().string.isRequired,label:l().oneOfType([l().string,l().shape({id:l().string.isRequired,defaultMessage:l().string,values:l().object})]).isRequired}),type:l().string,onClose:l().func,timeout:l().number,blockTransition:l().bool})};const In=Fs,cn={notifId:0,notifications:[]},_n=(i=cn,n)=>(0,at.default)(i,r=>{switch(n.type){case"SHOW_NOTIFICATION":{r.notifications.push({id:i.notifId,type:ke()(n,["config","type"],"success"),message:ke()(n,["config","message"],{id:"notification.success.saved",defaultMessage:"Saved"}),link:ke()(n,["config","link"],null),timeout:ke()(n,["config","timeout"],2500),blockTransition:ke()(n,["config","blockTransition"],!1),onClose:ke()(n,["config","onClose"],null)}),r.notifId=i.notifId+1;break}case"HIDE_NOTIFICATION":{const p=i.notifications.findIndex(g=>g.id===n.id);p!==-1&&r.notifications.splice(p,1);break}default:return r}}),mn=({children:i})=>{const[{notifications:n},r]=(0,t.useReducer)(_n,cn),p=g=>{r({type:"SHOW_NOTIFICATION",config:g})};return t.createElement(y.NotificationsProvider,{toggleNotification:p},t.createElement(vt.Stack,{left:"50%",marginLeft:"-250px",position:"fixed",spacing:2,top:`${46/16}rem`,width:`${500/16}rem`,zIndex:10},n.map(g=>t.createElement(In,{key:g.id,dispatch:r,notification:g}))),i)};mn.propTypes={children:l().element.isRequired};const jn=mn,is=document.createElement("div");is.setAttribute("id","overlayBlocker");const Bn=lt.default.div`
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1140;
`,pn=({isOpen:i})=>((0,t.useEffect)(()=>(document.body.appendChild(is),()=>{document.body.removeChild(is)}),[]),i?ut.createPortal(t.createElement(Bn,null),is):null);pn.propTypes={isOpen:l().bool.isRequired};const fn=({children:i})=>{const[n,r]=(0,t.useState)(!1),p=()=>{r(!0)},g=()=>{r(!1)};return t.createElement(y.OverlayBlockerContext.Provider,{value:{lockApp:p,unlockApp:g}},i,t.createElement(pn,{isOpen:n}))};fn.propTypes={children:l().node.isRequired};const Un=fn,gn="STRAPI_THEME",wn=()=>{const i=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";return localStorage.getItem(gn)||i},hn=({children:i,themes:n})=>{const[r,p]=(0,t.useState)(wn()),g=E=>{p(E),localStorage.setItem(gn,E)};return t.createElement(Dt.Rj.Provider,{value:{currentTheme:r,onChangeTheme:g,themes:n}},i)};hn.propTypes={children:l().node.isRequired,themes:l().shape({light:l().shape({colors:l().object.isRequired,shadows:l().object.isRequired,sizes:l().object.isRequired,zIndices:l().array.isRequired,spaces:l().array.isRequired,borderRadius:l().string.isRequired,mediaQueries:l().object.isRequired,fontSizes:l().array.isRequired,lineHeights:l().array.isRequired,fontWeights:l().object.isRequired}).isRequired,dark:l().shape({colors:l().object.isRequired,shadows:l().object.isRequired,sizes:l().object.isRequired,zIndices:l().array.isRequired,spaces:l().array.isRequired,borderRadius:l().string.isRequired,mediaQueries:l().object.isRequired,fontSizes:l().array.isRequired,lineHeights:l().array.isRequired,fontWeights:l().object.isRequired}).isRequired,custom:l().object}).isRequired};const xn=hn;var kn=e(45230),Wn=(i,n,r)=>new Promise((p,g)=>{var E=h=>{try{m(r.next(h))}catch(v){g(v)}},d=h=>{try{m(r.throw(h))}catch(v){g(v)}},m=h=>h.done?p(h.value):Promise.resolve(h.value).then(E,d);m((r=r.apply(i,n)).next())});(()=>Wn(void 0,null,function*(){yield e.e(7723).then(e.bind(e,69820)),yield e.e(7566).then(e.bind(e,53688)),yield e.e(8e3).then(e.t.bind(e,37433,23)),yield e.e(7784).then(e.bind(e,94300))}))();const Fn=lt.createGlobalStyle`
  body {
    background: ${({theme:i})=>i.colors.neutral100};
  }
`,En=({children:i})=>{const{currentTheme:n,themes:r}=(0,ys.M1)();return t.createElement(kn.ThemeProvider,{theme:r[n]||r.light},i,t.createElement(Fn,null))};En.propTypes={children:l().element.isRequired};const Kn=En,Nn=new $t.QueryClient({defaultOptions:{queries:{refetchOnWindowFocus:!1}}}),vn=({authLogo:i,children:n,components:r,fields:p,getAdminInjectedComponents:g,getPlugin:E,localeNames:d,menu:m,menuLogo:h,messages:v,plugins:ne,runHookParallel:K,runHookSeries:X,runHookWaterfall:Pe,settings:$,showReleaseNotification:Oe,showTutorials:_e,store:ze,themes:Bt})=>t.createElement(xn,{themes:Bt},t.createElement(Kn,null,t.createElement($t.QueryClientProvider,{client:Nn},t.createElement(Ss.Provider,{store:ze},t.createElement(Dt.ux.Provider,{value:{getAdminInjectedComponents:g}},t.createElement(Ds,{authLogo:i,menuLogo:h,showReleaseNotification:Oe,showTutorials:_e},t.createElement(y.StrapiAppProvider,{getPlugin:E,menu:m,plugins:ne,runHookParallel:K,runHookWaterfall:Pe,runHookSeries:X,settings:$},t.createElement(y.LibraryProvider,{components:r,fields:p},t.createElement(ws,{messages:v,localeNames:d},t.createElement(Ln,null,t.createElement(Un,null,t.createElement(we,null,t.createElement(jn,null,n)))))))))))));vn.propTypes={authLogo:l().oneOfType([l().string,l().any]).isRequired,children:l().element.isRequired,components:l().object.isRequired,fields:l().object.isRequired,getAdminInjectedComponents:l().func.isRequired,getPlugin:l().func.isRequired,localeNames:l().objectOf(l().string).isRequired,menu:l().arrayOf(l().shape({to:l().string.isRequired,icon:l().func.isRequired,intlLabel:l().shape({id:l().string.isRequired,defaultMessage:l().string.isRequired}).isRequired,permissions:l().array,Component:l().func})).isRequired,menuLogo:l().oneOfType([l().string,l().any]).isRequired,messages:l().object.isRequired,plugins:l().object.isRequired,runHookParallel:l().func.isRequired,runHookWaterfall:l().func.isRequired,runHookSeries:l().func.isRequired,settings:l().object.isRequired,showReleaseNotification:l().bool.isRequired,showTutorials:l().bool.isRequired,store:l().object.isRequired,themes:l().shape({light:l().shape({colors:l().object.isRequired,shadows:l().object.isRequired,sizes:l().object.isRequired,zIndices:l().array.isRequired,spaces:l().array.isRequired,borderRadius:l().string.isRequired,mediaQueries:l().object.isRequired,fontSizes:l().array.isRequired,lineHeights:l().array.isRequired,fontWeights:l().object.isRequired}).isRequired,dark:l().shape({colors:l().object.isRequired,shadows:l().object.isRequired,sizes:l().object.isRequired,zIndices:l().array.isRequired,spaces:l().array.isRequired,borderRadius:l().string.isRequired,mediaQueries:l().object.isRequired,fontSizes:l().array.isRequired,lineHeights:l().array.isRequired,fontWeights:l().object.isRequired}).isRequired,custom:l().object}).isRequired};const Zn=vn,Gn={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"};var ls=e(70836);const Hn={admin:{tutorials:{links:[]}},contentManager:{editView:{informations:[],"right-links":[]},listView:{actions:[],deleteModalAdditionalInfos:[]}}},$n=e.p+"393580d02eca7cceaef0.ico";var zn=e(98399),Vn=Object.defineProperty,Xn=Object.defineProperties,Qn=Object.getOwnPropertyDescriptors,yn=Object.getOwnPropertySymbols,Yn=Object.prototype.hasOwnProperty,Jn=Object.prototype.propertyIsEnumerable,Ks=(i,n,r)=>n in i?Vn(i,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):i[n]=r,yt=(i,n)=>{for(var r in n||(n={}))Yn.call(n,r)&&Ks(i,r,n[r]);if(yn)for(var r of yn(n))Jn.call(n,r)&&Ks(i,r,n[r]);return i},qn=(i,n)=>Xn(i,Qn(n)),ye=(i,n,r)=>(Ks(i,typeof n!="symbol"?n+"":n,r),r),Pt=(i,n,r)=>new Promise((p,g)=>{var E=h=>{try{m(r.next(h))}catch(v){g(v)}},d=h=>{try{m(r.throw(h))}catch(v){g(v)}},m=h=>h.done?p(h.value):Promise.resolve(h.value).then(E,d);m((r=r.apply(i,n)).next())});class er{constructor({adminConfig:n,appPlugins:r,library:p,middlewares:g,reducers:E}){ye(this,"addComponents",d=>{Array.isArray(d)?d.map(m=>this.library.components.add(m)):this.library.components.add(d)}),ye(this,"addCorePluginMenuLink",d=>{var m,h;const v=JSON.stringify(d);L()(d.to,`link.to should be defined for ${v}`),L()(typeof d.to=="string",`Expected link.to to be a string instead received ${typeof d.to}`),L()(["/plugins/content-type-builder","/plugins/upload"].includes(d.to),"This method is not available for your plugin"),L()(((m=d.intlLabel)==null?void 0:m.id)&&((h=d.intlLabel)==null?void 0:h.defaultMessage),`link.intlLabel.id & link.intlLabel.defaultMessage for ${v}`),this.menu.push(d)}),ye(this,"addFields",d=>{Array.isArray(d)?d.map(m=>this.library.fields.add(m)):this.library.fields.add(d)}),ye(this,"addMenuLink",d=>{var m,h;const v=JSON.stringify(d);L()(d.to,`link.to should be defined for ${v}`),L()(typeof d.to=="string",`Expected link.to to be a string instead received ${typeof d.to}`),L()(((m=d.intlLabel)==null?void 0:m.id)&&((h=d.intlLabel)==null?void 0:h.defaultMessage),`link.intlLabel.id & link.intlLabel.defaultMessage for ${v}`),L()(d.Component&&typeof d.Component=="function","link.Component should be a valid React Component"),L()(d.icon&&typeof d.icon=="function","link.Icon should be a valid React Component"),this.menu.push(d)}),ye(this,"addMiddlewares",d=>{d.forEach(m=>{this.middlewares.add(m)})}),ye(this,"addReducers",d=>{Object.keys(d).forEach(m=>{this.reducers.add(m,d[m])})}),ye(this,"addSettingsLink",(d,m)=>{var h,v;L()(this.settings[d],"The section does not exist");const ne=JSON.stringify(m);L()(m.id,`link.id should be defined for ${ne}`),L()(((h=m.intlLabel)==null?void 0:h.id)&&((v=m.intlLabel)==null?void 0:v.defaultMessage),`link.intlLabel.id & link.intlLabel.defaultMessage for ${ne}`),L()(m.to,`link.to should be defined for ${ne}`),L()(m.Component&&typeof m.Component=="function","link.Component should be a valid React Component"),this.settings[d].links.push(m)}),ye(this,"addSettingsLinks",(d,m)=>{L()(this.settings[d],"The section does not exist"),L()(Array.isArray(m),"TypeError expected links to be an array"),m.forEach(h=>{this.addSettingsLink(d,h)})}),ye(this,"bootstrapAdmin",()=>Pt(this,null,function*(){return yield this.createCustomConfigurations(),this.createHook(ls.No),this.createHook(ls.LK),this.createHook(ls.dV),this.createHook(ls.Eo),Promise.resolve()})),ye(this,"createCustomConfigurations",()=>Pt(this,null,function*(){var d,m,h,v,ne,K,X,Pe,$,Oe,_e,ze;(d=this.customConfigurations)!=null&&d.locales&&(this.configurations.locales=["en",...(m=this.customConfigurations.locales)==null?void 0:m.filter(Bt=>Bt!=="en")]),(v=(h=this.customConfigurations)==null?void 0:h.auth)!=null&&v.logo&&(this.configurations.authLogo=this.customConfigurations.auth.logo),(K=(ne=this.customConfigurations)==null?void 0:ne.menu)!=null&&K.logo&&(this.configurations.menuLogo=this.customConfigurations.menu.logo),(Pe=(X=this.customConfigurations)==null?void 0:X.head)!=null&&Pe.favicon&&(this.configurations.head.favicon=this.customConfigurations.head.favicon),($=this.customConfigurations)!=null&&$.theme&&A()(this.configurations.themes.light,this.customConfigurations.theme),((_e=(Oe=this.customConfigurations)==null?void 0:Oe.notifications)==null?void 0:_e.releases)!==void 0&&(this.configurations.notifications.releases=this.customConfigurations.notifications.releases),((ze=this.customConfigurations)==null?void 0:ze.tutorials)!==void 0&&(this.configurations.tutorials=this.customConfigurations.tutorials)})),ye(this,"createHook",d=>{this.hooksDict[d]=(0,_.Bi)()}),ye(this,"createSettingSection",(d,m)=>{var h,v;L()(d.id,"section.id should be defined"),L()(((h=d.intlLabel)==null?void 0:h.id)&&((v=d.intlLabel)==null?void 0:v.defaultMessage),"section.intlLabel should be defined"),L()(Array.isArray(m),"TypeError expected links to be an array"),L()(this.settings[d.id]===void 0,"A similar section already exists"),this.settings[d.id]=qn(yt({},d),{links:[]}),m.forEach(ne=>{this.addSettingsLink(d.id,ne)})}),ye(this,"createStore",()=>G(this.middlewares.middlewares,this.reducers.reducers)),ye(this,"getAdminInjectedComponents",(d,m,h)=>{try{return this.admin.injectionZones[d][m][h]||[]}catch(v){return zn.error("Cannot get injected component",v),v}}),ye(this,"getPlugin",d=>this.plugins[d]),ye(this,"injectContentManagerComponent",(d,m,h)=>{var v;L()((v=this.admin.injectionZones.contentManager[d])==null?void 0:v[m],`The ${d} ${m} zone is not defined in the content manager`),L()(h,"A Component must be provided"),this.admin.injectionZones.contentManager[d][m].push(h)}),ye(this,"injectAdminComponent",(d,m,h)=>{var v;L()((v=this.admin.injectionZones.admin[d])==null?void 0:v[m],`The ${d} ${m} zone is not defined in the admin`),L()(h,"A Component must be provided"),this.admin.injectionZones.admin[d][m].push(h)}),ye(this,"registerHook",(d,m)=>{L()(this.hooksDict[d],`The hook ${d} is not defined. You are trying to register a hook that does not exist in the application.`),this.hooksDict[d].register(m)}),ye(this,"registerPlugin",d=>{const m=(0,ee.Sy)(d);this.plugins[m.pluginId]=m}),ye(this,"runHookSeries",(d,m=!1)=>m?this.hooksDict[d].runSeriesAsync():this.hooksDict[d].runSeries()),ye(this,"runHookWaterfall",(d,m,h=!1,v)=>h?this.hooksDict[d].runWaterfallAsync(m,v):this.hooksDict[d].runWaterfall(m,v)),ye(this,"runHookParallel",d=>this.hooksDict[d].runParallel()),this.customConfigurations=n.config,this.customBootstrapConfiguration=n.bootstrap,this.configurations={authLogo:Vs,head:{favicon:$n},locales:["en"],menuLogo:Cs,notifications:{releases:!0},themes:{light:a.lightTheme,dark:a.darkTheme},translations:{},tutorials:!0},this.appPlugins=r||{},this.library=p,this.middlewares=g,this.plugins={},this.reducers=E,this.translations={},this.hooksDict={},this.admin={injectionZones:Hn},this.menu=[],this.settings={global:{id:"global",intlLabel:{id:"Settings.global",defaultMessage:"Global Settings"},links:[]}}}bootstrap(){return Pt(this,null,function*(){Object.keys(this.appPlugins).forEach(n=>{const r=this.appPlugins[n].bootstrap;r&&r({addSettingsLink:this.addSettingsLink,addSettingsLinks:this.addSettingsLinks,getPlugin:this.getPlugin,injectContentManagerComponent:this.injectContentManagerComponent,injectAdminComponent:this.injectAdminComponent,registerHook:this.registerHook})}),q()(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})})}initialize(){return Pt(this,null,function*(){Object.keys(this.appPlugins).forEach(n=>{this.appPlugins[n].register({addComponents:this.addComponents,addCorePluginMenuLink:this.addCorePluginMenuLink,addFields:this.addFields,addMenuLink:this.addMenuLink,addMiddlewares:this.addMiddlewares,addReducers:this.addReducers,createHook:this.createHook,createSettingSection:this.createSettingSection,registerPlugin:this.registerPlugin})})})}loadAdminTrads(){return Pt(this,null,function*(){const n=this.configurations.locales.map(g=>e(48224)(`./${g}.json`).then(({default:E})=>({data:E,locale:g})).catch(()=>({data:null,locale:g})));return(yield Promise.all(n)).reduce((g,E)=>(E.data&&(g[E.locale]=E.data),g),{})})}loadTrads(){return Pt(this,null,function*(){const n=yield this.loadAdminTrads(),r=Object.keys(this.appPlugins).map(d=>{const m=this.appPlugins[d].registerTrads;return m?m({locales:this.configurations.locales}):null}).filter(d=>d),g=(yield Promise.all(r)).reduce((d,m)=>{const h=m.reduce((v,ne)=>(v[ne.locale]=ne.data,v),{});return Object.keys(h).forEach(v=>{d[v]=yt(yt({},d[v]),h[v])}),d},{}),E=this.configurations.locales.reduce((d,m)=>{var h,v;return d[m]=yt(yt(yt({},n[m]),g[m]||{}),(v=(h=this.customConfigurations)==null?void 0:h.translations)==null?void 0:v[m]),d},{});return this.configurations.translations=E,Promise.resolve()})}render(){const n=this.createStore(),r=x()(Gn,this.configurations.locales||[]),{components:{components:p},fields:{fields:g}}=this.library;return t.createElement(Zn,{authLogo:this.configurations.authLogo,components:p,fields:g,localeNames:r,getAdminInjectedComponents:this.getAdminInjectedComponents,getPlugin:this.getPlugin,messages:this.configurations.translations,menu:this.menu,menuLogo:this.configurations.menuLogo,plugins:this.plugins,runHookParallel:this.runHookParallel,runHookWaterfall:(E,d,m=!1)=>this.runHookWaterfall(E,d,m,n),runHookSeries:this.runHookSeries,themes:this.configurations.themes,settings:this.settings,showTutorials:this.configurations.tutorials,showReleaseNotification:this.configurations.notifications.releases,store:n},t.createElement(t.Fragment,null,t.createElement(Z.Helmet,{link:[{rel:"icon",type:"image/png",href:this.configurations.head.favicon}]}),t.createElement(c.BrowserRouter,{basename:_.EZ},t.createElement(Ht,{store:n}))))}}const tr=({adminConfig:i={},appPlugins:n,library:r,middlewares:p,reducers:g})=>new er({adminConfig:i,appPlugins:n,library:r,middlewares:p,reducers:g})},5985:(J,C,e)=>{"use strict";e.d(C,{Z:()=>a});var t=e(32735);const a=(0,t.createContext)()},20139:(J,C,e)=>{"use strict";e.d(C,{Z:()=>P});var t=e(32735),c=e(5985);const P=()=>{const{changeLocale:A,localeNames:O,messages:x}=(0,t.useContext)(c.Z);return{changeLocale:A,localeNames:O,messages:x}}},10190:(J,C,e)=>{"use strict";e.d(C,{Z:()=>O});var t=e(32735),c=e(19615),a=e(78227);const P=c.default.img`
  height: ${72/16}rem;
`,O=()=>{const{logos:{auth:x}}=(0,a.um)();return t.createElement(P,{src:x.default,"aria-hidden":!0,alt:""})}},66694:(J,C,e)=>{"use strict";e.d(C,{ux:()=>a,_5:()=>A,$l:()=>x,Rj:()=>q});var t=e(32735);const a=(0,t.createContext)({}),A=(0,t.createContext)({}),x=(0,t.createContext)({}),q=(0,t.createContext)({})},70836:(J,C,e)=>{"use strict";e.d(C,{Eo:()=>a,LK:()=>c,No:()=>t,dV:()=>P});const t="Admin/CM/pages/ListView/inject-column-in-table",c="Admin/CM/pages/App/mutate-collection-types-links",a="Admin/CM/pages/EditView/mutate-edit-view-layout",P="Admin/CM/pages/App/mutate-single-types-links"},78227:(J,C,e)=>{"use strict";e.d(C,{um:()=>t.Z,U_:()=>be,Dq:()=>oe,H9:()=>Me,bP:()=>ee,$_:()=>tn,bF:()=>fs,G4:()=>en,Te:()=>Qs,M1:()=>Ws});var t=e(19799),c=e(32735),a=e(88425),P=e(49415);const A={collectionTypes:[],components:[],isLoading:!0,singleTypes:[]},x=(u,o)=>(0,P.default)(u,s=>{switch(o.type){case"GET_MODELS":{s.collectionTypes=A.collectionTypes,s.singleTypes=A.singleTypes,s.components=A.components,s.isLoading=!0;break}case"GET_MODELS_ERROR":{s.collectionTypes=A.collectionTypes,s.singleTypes=A.singleTypes,s.components=A.components,s.isLoading=!1;break}case"GET_MODELS_SUCCEDED":{const R=M=>o.contentTypes.filter(w=>w.isDisplayed&&w.kind===M);s.isLoading=!1,s.collectionTypes=R("collectionType"),s.singleTypes=R("singleType"),s.components=o.components;break}default:return s}});var H=Object.defineProperty,q=Object.defineProperties,Q=Object.getOwnPropertyDescriptors,L=Object.getOwnPropertySymbols,Z=Object.prototype.hasOwnProperty,_=Object.prototype.propertyIsEnumerable,D=(u,o,s)=>o in u?H(u,o,{enumerable:!0,configurable:!0,writable:!0,value:s}):u[o]=s,T=(u,o)=>{for(var s in o||(o={}))Z.call(o,s)&&D(u,s,o[s]);if(L)for(var s of L(o))_.call(o,s)&&D(u,s,o[s]);return u},W=(u,o)=>q(u,Q(o)),N=(u,o,s)=>new Promise((R,M)=>{var w=f=>{try{S(s.next(f))}catch(B){M(B)}},k=f=>{try{S(s.throw(f))}catch(B){M(B)}},S=f=>f.done?R(f.value):Promise.resolve(f.value).then(w,k);S((s=s.apply(u,o)).next())});const ee=()=>{const u=(0,a.useNotification)(),[o,s]=(0,c.useReducer)(x,A);(0,c.useEffect)(()=>{R()},[]);const R=()=>N(void 0,null,function*(){s({type:"GET_MODELS"});try{const[{data:M},{data:w}]=yield Promise.all(["components","content-types"].map(k=>(0,a.request)(`/content-manager/${k}`,{method:"GET"})));s({type:"GET_MODELS_SUCCEDED",contentTypes:w,components:M})}catch(M){s({type:"GET_MODELS_ERROR"}),u({type:"warning",message:{id:"notification.error"}})}});return W(T({},o),{getData:R})},y={data:{},error:null,isLoading:!0},z=(u,o)=>(0,P.default)(u,s=>{switch(o.type){case"GET_DATA":{s.isLoading=!0,s.data={},s.error=null;break}case"GET_DATA_SUCCEEDED":{s.data=o.data,s.isLoading=!1,s.error=null;break}case"GET_DATA_ERROR":{s.isLoading=!1,s.error=o.error;break}default:return s}});var Le=(u,o,s)=>new Promise((R,M)=>{var w=f=>{try{S(s.next(f))}catch(B){M(B)}},k=f=>{try{S(s.throw(f))}catch(B){M(B)}},S=f=>f.done?R(f.value):Promise.resolve(f.value).then(w,k);S((s=s.apply(u,o)).next())});const be=u=>{const[{data:o,error:s,isLoading:R},M]=(0,c.useReducer)(z,y);return(0,c.useEffect)(()=>{(()=>Le(void 0,null,function*(){M({type:"GET_DATA"});const{data:k}=yield(0,a.request)("/admin/permissions",{method:"GET",params:{role:u}});M({type:"GET_DATA_SUCCEEDED",data:k})}))()},[u]),{data:o,error:s,isLoading:R}},l={role:{},permissions:{},isLoading:!0},Se=(u,o)=>(0,P.default)(u,s=>{switch(o.type){case"GET_DATA_SUCCEEDED":{s.role=o.role,s.permissions=o.permissions,s.isLoading=!1;break}case"GET_DATA_ERROR":{s.isLoading=!1;break}case"ON_SUBMIT_SUCCEEDED":{s.role.name=o.name,s.role.description=o.description;break}default:return s}});var Xe=e(98399),de=Object.defineProperty,re=Object.defineProperties,fe=Object.getOwnPropertyDescriptors,te=Object.getOwnPropertySymbols,Y=Object.prototype.hasOwnProperty,V=Object.prototype.propertyIsEnumerable,b=(u,o,s)=>o in u?de(u,o,{enumerable:!0,configurable:!0,writable:!0,value:s}):u[o]=s,I=(u,o)=>{for(var s in o||(o={}))Y.call(o,s)&&b(u,s,o[s]);if(te)for(var s of te(o))V.call(o,s)&&b(u,s,o[s]);return u},U=(u,o)=>re(u,fe(o)),ie=(u,o,s)=>new Promise((R,M)=>{var w=f=>{try{S(s.next(f))}catch(B){M(B)}},k=f=>{try{S(s.throw(f))}catch(B){M(B)}},S=f=>f.done?R(f.value):Promise.resolve(f.value).then(w,k);S((s=s.apply(u,o)).next())});const oe=u=>{const o=(0,a.useNotification)(),[s,R]=(0,c.useReducer)(Se,l);(0,c.useEffect)(()=>{u?M(u):R({type:"GET_DATA_SUCCEEDED",role:{},permissions:[]})},[u]);const M=k=>ie(void 0,null,function*(){try{const[{data:S},{data:f}]=yield Promise.all([`roles/${k}`,`roles/${k}/permissions`].map(B=>(0,a.request)(`/admin/${B}`,{method:"GET"})));R({type:"GET_DATA_SUCCEEDED",role:S,permissions:f})}catch(S){Xe.error(S),R({type:"GET_DATA_ERROR"}),o({type:"warning",message:{id:"notification.error"}})}}),w=(0,c.useCallback)(k=>{R(I({type:"ON_SUBMIT_SUCCEEDED"},k))},[]);return U(I({},s),{onSubmitSucceeded:w})},F=(u,o)=>o.map(({permissions:s})=>(0,a.hasPermissions)(u,s));var ce=(u,o,s)=>new Promise((R,M)=>{var w=f=>{try{S(s.next(f))}catch(B){M(B)}},k=f=>{try{S(s.throw(f))}catch(B){M(B)}},S=f=>f.done?R(f.value):Promise.resolve(f.value).then(w,k);S((s=s.apply(u,o)).next())});const ht=(u,o)=>ce(void 0,null,function*(){const s=F(u,o),R=yield Promise.all(s);return o.filter((w,k)=>R[k])});var ke=e(99381),ae=e.n(ke),Ge=(u,o,s)=>new Promise((R,M)=>{var w=f=>{try{S(s.next(f))}catch(B){M(B)}},k=f=>{try{S(s.throw(f))}catch(B){M(B)}},S=f=>f.done?R(f.value):Promise.resolve(f.value).then(w,k);S((s=s.apply(u,o)).next())});const We=(u,o,s)=>Ge(void 0,null,function*(){const R=F(u,o),M=yield Promise.all(R),w=o.filter((f,B)=>M[B]),k=w.findIndex(f=>f.to==="/settings");if(k===-1)return[];const S=ae()(w);return S[k].notificationsCount=s?1:0,S});var Ie=e(42258),qe=e.n(Ie),Te=e(45619),Qe=e.n(Te),se=e(20223),He=e.n(se),$e=e(83983);const tt={generalSectionLinks:[{icon:Qe(),intlLabel:{id:"global.plugins",defaultMessage:"Plugins"},to:"/list-plugins",permissions:$e.Z.marketplace.main},{icon:He(),intlLabel:{id:"global.marketplace",defaultMessage:"Marketplace"},to:"/marketplace",permissions:$e.Z.marketplace.main},{icon:qe(),intlLabel:{id:"global.settings",defaultMessage:"Settings"},to:"/settings",permissions:[],notificationsCount:0}],pluginsSectionLinks:[],isLoading:!0},at=(u=tt,o)=>(0,P.default)(u,s=>{switch(o.type){case"SET_SECTION_LINKS":{const{authorizedGeneralSectionLinks:R,authorizedPluginSectionLinks:M}=o.data;s.generalSectionLinks=R,s.pluginsSectionLinks=M;break}case"UNSET_IS_LOADING":{s.isLoading=!1;break}default:return s}});var Ot=(u,o,s)=>new Promise((R,M)=>{var w=f=>{try{S(s.next(f))}catch(B){M(B)}},k=f=>{try{S(s.throw(f))}catch(B){M(B)}},S=f=>f.done?R(f.value):Promise.resolve(f.value).then(w,k);S((s=s.apply(u,o)).next())});const Me=()=>{const[u,o]=(0,c.useReducer)(at,tt),{allPermissions:s}=(0,a.useRBACProvider)(),{shouldUpdateStrapi:R}=(0,a.useAppInfos)(),{menu:M}=(0,a.useStrapiApp)(),w=(0,c.useRef)(u.generalSectionLinks),k=(0,c.useRef)(R),S=(...B)=>Ot(void 0,[...B],function*(we=s){const mt=yield ht(we,M),pt=yield We(we,w.current,k.current);o({type:"SET_SECTION_LINKS",data:{authorizedGeneralSectionLinks:pt,authorizedPluginSectionLinks:mt}}),o({type:"UNSET_IS_LOADING"})}),f=(0,c.useRef)(S);return(0,c.useEffect)(()=>{f.current(s)},[s,o]),u};var xt=e(33795),it=e.n(xt),Fe=e(17247),ve=Object.defineProperty,Ke=Object.defineProperties,st=Object.getOwnPropertyDescriptors,gt=Object.getOwnPropertySymbols,ds=Object.prototype.hasOwnProperty,lt=Object.prototype.propertyIsEnumerable,ct=(u,o,s)=>o in u?ve(u,o,{enumerable:!0,configurable:!0,writable:!0,value:s}):u[o]=s,Et=(u,o)=>{for(var s in o||(o={}))ds.call(o,s)&&ct(u,s,o[s]);if(gt)for(var s of gt(o))lt.call(o,s)&&ct(u,s,o[s]);return u},vt=(u,o)=>Ke(u,st(o));const Wt=(u,o)=>vt(Et({},u),{isLoading:o}),Ft={roles:[],isLoading:!0},cs=(u,o)=>(0,P.default)(u,s=>{switch(o.type){case"GET_DATA":{s.isLoading=!0,s.roles=[];break}case"GET_DATA_SUCCEEDED":{s.roles=o.data,s.isLoading=!1;break}case"GET_DATA_ERROR":{s.isLoading=!1;break}default:return s}});var ms=(u,o,s)=>new Promise((R,M)=>{var w=f=>{try{S(s.next(f))}catch(B){M(B)}},k=f=>{try{S(s.throw(f))}catch(B){M(B)}},S=f=>f.done?R(f.value):Promise.resolve(f.value).then(w,k);S((s=s.apply(u,o)).next())});const fs=(u=!0)=>{const o=(0,a.useNotification)(),[{roles:s,isLoading:R},M]=(0,c.useReducer)(cs,Ft,()=>Wt(Ft,u));(0,c.useEffect)(()=>{u&&w()},[u]);const w=(0,c.useCallback)(()=>ms(void 0,null,function*(){try{M({type:"GET_DATA"});const{data:{data:k}}=yield Fe.be.get("/admin/roles");M({type:"GET_DATA_SUCCEEDED",data:k})}catch(k){const S=it()(k,["response","payload","message"],"An error occured");M({type:"GET_DATA_ERROR"}),S!=="Forbidden"&&o({type:"warning",message:S})}}),[o]);return{roles:s,isLoading:R,getData:w}};var Ye=e(92891);const gs={menu:[],isLoading:!0},Kt=(u,o)=>(0,P.default)(u,s=>{switch(o.type){case"CHECK_PERMISSIONS_SUCCEEDED":{o.data.forEach(R=>{R.hasPermission&&(0,Ye.set)(s,["menu",...R.path.split("."),"isDisplayed"],R.hasPermission)}),s.menu.forEach((R,M)=>{s.menu[M].links=R.links.filter(w=>w.isDisplayed===!0)}),s.isLoading=!1;break}default:return s}});var $s=e(9086),hs=e.n($s),Es=e(98978),vs=e.n(Es);const Ps=u=>vs()(u,o=>o.id);var Ts=Object.defineProperty,Os=Object.defineProperties,Nt=Object.getOwnPropertyDescriptors,Zt=Object.getOwnPropertySymbols,Rs=Object.prototype.hasOwnProperty,Gt=Object.prototype.propertyIsEnumerable,Mt=(u,o,s)=>o in u?Ts(u,o,{enumerable:!0,configurable:!0,writable:!0,value:s}):u[o]=s,Ct=(u,o)=>{for(var s in o||(o={}))Rs.call(o,s)&&Mt(u,s,o[s]);if(Zt)for(var s of Zt(o))Gt.call(o,s)&&Mt(u,s,o[s]);return u},St=(u,o)=>Os(u,Nt(o));const Ms=u=>u.map(o=>{const s=o.links.map(R=>St(Ct({},R),{isDisplayed:!1}));return St(Ct({},o),{links:s})});var Ht=e(15685);const Cs=[{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:$e.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:$e.Z.settings["api-tokens"].main}];var $t=function(){return window&&window.strapi&&window.strapi.isEE?e(11545).Z:e(73086).Z}();const Ss=[].concat((0,Ht.Z)(Cs),(0,Ht.Z)($t));var Dt=Object.defineProperty,zt=Object.defineProperties,Xs=Object.getOwnPropertyDescriptors,Vt=Object.getOwnPropertySymbols,Xt=Object.prototype.hasOwnProperty,Ds=Object.prototype.propertyIsEnumerable,Qt=(u,o,s)=>o in u?Dt(u,o,{enumerable:!0,configurable:!0,writable:!0,value:s}):u[o]=s,At=(u,o)=>{for(var s in o||(o={}))Xt.call(o,s)&&Qt(u,s,o[s]);if(Vt)for(var s of Vt(o))Ds.call(o,s)&&Qt(u,s,o[s]);return u},Lt=(u,o)=>zt(u,Xs(o));const Ls=(u,{settings:o,shouldUpdateStrapi:s})=>{const R=o.global.links,M=Ps([...R,...Ss]).map(S=>Lt(At({},S),{hasNotification:S.id==="000-application-infos"&&s})),w=Object.values(hs()(o,"global")),k=[Lt(At({},o.global),{links:M}),{id:"permissions",intlLabel:{id:"Settings.permissions",defaultMessage:"Administration Panel"},links:[{intlLabel:{id:"global.roles",defaultMessage:"Roles"},to:"/settings/roles",id:"roles",isDisplayed:!1,permissions:$e.Z.settings.roles.main},{intlLabel:{id:"global.users"},to:"/settings/users?pageSize=10&page=1&sort=firstname",id:"users",isDisplayed:!1,permissions:$e.Z.settings.users.main}]},...w];return Lt(At({},u),{menu:Ms(k)})};var bs=(u,o,s)=>new Promise((R,M)=>{var w=f=>{try{S(s.next(f))}catch(B){M(B)}},k=f=>{try{S(s.throw(f))}catch(B){M(B)}},S=f=>f.done?R(f.value):Promise.resolve(f.value).then(w,k);S((s=s.apply(u,o)).next())});const Qs=(u=!1)=>{const{allPermissions:o}=(0,a.useRBACProvider)(),{shouldUpdateStrapi:s}=(0,a.useAppInfos)(),{settings:R}=(0,a.useStrapiApp)(),[{isLoading:M,menu:w},k]=(0,c.useReducer)(Kt,gs,()=>Ls(gs,{settings:R,shouldUpdateStrapi:s}));return(0,c.useEffect)(()=>{u||(()=>bs(void 0,null,function*(){const f=(mt,pt)=>bs(void 0,null,function*(){return{hasPermission:yield(0,a.hasPermissions)(o,mt),path:pt}}),we=(mt=>mt.reduce((pt,bt,as)=>{const It=_t=>_t.map((ft,xe)=>f(_t[xe].permissions,`${as}.links.${xe}`));return[...pt,...It(bt.links)]},[]))(w),ut=yield Promise.all(we);k({type:"CHECK_PERMISSIONS_SUCCEEDED",data:ut})}))()},[o,u]),{isLoading:M,menu:w}};var Yt=e(7602);const Jt={fieldsToPick:[],formErrors:{},initialData:{},isLoading:!0,modifiedData:{},showHeaderButtonLoader:!1,showHeaderLoader:!0},_s=(u,o)=>(0,P.default)(u,s=>{switch(o.type){case"GET_DATA_SUCCEEDED":{s.isLoading=!1,s.showHeaderLoader=!1,s.initialData=(0,Ye.pick)(o.data,u.fieldsToPick),s.modifiedData=(0,Ye.pick)(o.data,u.fieldsToPick);break}case"ON_CANCEL":{s.modifiedData=u.initialData,s.formErrors={};break}case"ON_CHANGE":{o.inputType==="password"&&!o.value?(0,Ye.unset)(s.modifiedData,o.keys.split(".")):o.keys.includes("username")&&!o.value?(0,Ye.set)(s.modifiedData,o.keys.split("."),null):(0,Ye.set)(s.modifiedData,o.keys.split("."),o.value);break}case"ON_SUBMIT":{s.showHeaderButtonLoader=!0;break}case"ON_SUBMIT_SUCCEEDED":{s.initialData=(0,Ye.pick)(o.data,u.fieldsToPick),s.modifiedData=(0,Ye.pick)(o.data,u.fieldsToPick),s.showHeaderButtonLoader=!1;break}case"SET_ERRORS":{s.formErrors=o.errors,s.showHeaderButtonLoader=!1;break}default:return s}});var js=Object.defineProperty,qt=Object.defineProperties,Bs=Object.getOwnPropertyDescriptors,es=Object.getOwnPropertySymbols,ts=Object.prototype.hasOwnProperty,Us=Object.prototype.propertyIsEnumerable,ss=(u,o,s)=>o in u?js(u,o,{enumerable:!0,configurable:!0,writable:!0,value:s}):u[o]=s,ns=(u,o)=>{for(var s in o||(o={}))ts.call(o,s)&&ss(u,s,o[s]);if(es)for(var s of es(o))Us.call(o,s)&&ss(u,s,o[s]);return u},Ys=(u,o)=>qt(u,Bs(o));const rs=(u,o)=>Ys(ns({},u),{fieldsToPick:o});var ws=e(98399),xs=(u,o,s)=>new Promise((R,M)=>{var w=f=>{try{S(s.next(f))}catch(B){M(B)}},k=f=>{try{S(s.throw(f))}catch(B){M(B)}},S=f=>f.done?R(f.value):Promise.resolve(f.value).then(w,k);S((s=s.apply(u,o)).next())});const en=(u,o,s,R)=>{const[{formErrors:M,initialData:w,isLoading:k,modifiedData:S,showHeaderButtonLoader:f,showHeaderLoader:B},we]=(0,c.useReducer)(_s,Jt,()=>rs(Jt,R)),ut=(0,a.useNotification)(),{lockApp:mt,unlockApp:pt}=(0,a.useOverlayBlocker)();return(0,c.useEffect)(()=>{u&&(()=>xs(void 0,null,function*(){try{const{data:xe}=yield(0,a.request)(u,{method:"GET"});we({type:"GET_DATA_SUCCEEDED",data:xe,fieldsToPick:R})}catch(xe){ws.error(xe.response),ut({type:"warning",message:{id:"notification.error"}})}}))()},[u]),[{formErrors:M,initialData:w,isLoading:k,modifiedData:S,showHeaderButtonLoader:f,showHeaderLoader:B},we,{handleCancel:()=>{we({type:"ON_CANCEL"})},handleChange:({target:{name:ft,value:xe,type:Je}})=>{we({type:"ON_CHANGE",inputType:Je,keys:ft,value:xe})},handleSubmit:ft=>xs(void 0,null,function*(){ft.preventDefault();const xe=yield(0,Yt.R6)(S,o);if(we({type:"SET_ERRORS",errors:xe||{}}),!xe)try{mt(),we({type:"ON_SUBMIT"});const Je=(0,Ye.omit)(S,["confirmPassword","registrationToken"]);Je.roles&&(Je.roles=Je.roles.map(jt=>jt.id));const{data:dt}=yield(0,a.request)(u,{method:"PUT",body:Je});s(dt),we({type:"ON_SUBMIT_SUCCEEDED",data:dt}),ut({type:"success",message:{id:"notification.success.saved"}})}catch(Je){const dt=(0,Ye.get)(Je,"response.payload",{data:{}});(0,Ye.has)(dt,"data")&&typeof dt.data=="string"?ut({type:"warning",message:dt.data}):ut({type:"warning",message:dt.message});const jt=(0,Yt.Iz)(dt);we({type:"SET_ERRORS",errors:jt})}finally{pt()}}),setField:(ft,xe)=>{we({type:"ON_CHANGE",keys:ft,value:xe})}}]};var os=e(66694);const tn=()=>(0,c.useContext)(os.$l),Ws=()=>(0,c.useContext)(os.Rj)},19799:(J,C,e)=>{"use strict";e.d(C,{Z:()=>P});var t=e(32735),c=e(66694);const P=()=>(0,t.useContext)(c._5)},73086:(J,C,e)=>{"use strict";e.d(C,{Z:()=>t});const t=[]},954:(J,C,e)=>{"use strict";e.d(C,{sg:()=>_,bU:()=>D,ZP:()=>W});var t=e(32735),c=e(19615),a=e(60216),P=e.n(a),A=e(9808),O=e(19192),x=e(5636),H=e(12611),q=e(20139);const L=()=>{const{changeLocale:N,localeNames:G}=(0,q.Z)(),{locale:ee}=(0,x.useIntl)();return t.createElement(H.SimpleMenu,{label:G[ee]},Object.keys(G).map(y=>t.createElement(H.MenuItem,{onClick:()=>N(y),key:y},G[y])))},Z=(0,c.default)(A.Box)`
  margin: 0 auto;
  width: 552px;
`,_=(0,c.default)(O.Flex)`
  flex-direction: column;
`,D=({children:N})=>t.createElement(Z,{shadow:"tableShadow",hasRadius:!0,paddingTop:9,paddingBottom:9,paddingLeft:10,paddingRight:10,background:"neutral0",justifyContent:"center"},N);D.propTypes={children:P().node.isRequired};const T=({children:N})=>t.createElement("div",null,t.createElement(O.Flex,{as:"header",justifyContent:"flex-end"},t.createElement(A.Box,{paddingTop:6,paddingRight:8},t.createElement(L,null))),t.createElement(A.Box,{paddingTop:2,paddingBottom:11},N));T.propTypes={children:P().node.isRequired};const W=T},56761:(J,C,e)=>{"use strict";e.d(C,{Z:()=>c});const c=[]},72218:(J,C,e)=>{"use strict";e.d(C,{Z:()=>A});var t=e(19615),c=e(20001),a=e.n(c);const A=(0,t.default)(c.FieldAction)`
  svg {
    height: 1rem;
    width: 1rem;
    path {
      fill: ${({theme:O})=>O.colors.neutral600};
    }
  }
`},1115:(J,C,e)=>{"use strict";e.d(C,{Z:()=>V});var t=e(32735),c=e(88425),a=e.n(c),P=e(37341),A=e.n(P),O=e(33912),x=e.n(O),H=e(9808),q=e.n(H),Q=e(90662),L=e.n(Q),Z=e(16540),_=e.n(Z),D=e(19192),T=e.n(D),W=e(44526),N=e.n(W),G=e(37178),ee=e.n(G),y=e(52111),j=e.n(y),z=e(95602),Le=e.n(z),ue=e(60216),be=e.n(ue),l=e(5636),et=e.n(l),Se=e(19615),Xe=e(83281),de=e(954),re=e(10190),fe=e(72218);const te=(0,Se.default)(G.TextInput)`
  ::-ms-reveal {
    display: none;
  }
`,Y=({onSubmit:b,schema:I,children:U})=>{const[ie,ge]=(0,t.useState)(!1),{formatMessage:oe}=(0,l.useIntl)();return t.createElement(Z.Main,null,t.createElement(de.bU,null,t.createElement(Xe.Formik,{enableReinitialize:!0,initialValues:{email:"",password:"",rememberMe:!1},onSubmit:b,validationSchema:I,validateOnChange:!1},({values:Ee,errors:F,handleChange:ce})=>t.createElement(c.Form,{noValidate:!0},t.createElement(de.sg,null,t.createElement(re.Z,null),t.createElement(H.Box,{paddingTop:6,paddingBottom:1},t.createElement(z.Typography,{variant:"alpha",as:"h1"},oe({id:"Auth.form.welcome.title",defaultMessage:"Welcome!"}))),t.createElement(H.Box,{paddingBottom:7},t.createElement(z.Typography,{variant:"epsilon",textColor:"neutral600"},oe({id:"Auth.form.welcome.subtitle",defaultMessage:"Log in to your Digicommerce account"}))),F.errorMessage&&t.createElement(z.Typography,{id:"global-form-error",role:"alert",tabIndex:-1,textColor:"danger600"},F.errorMessage)),t.createElement(Q.Stack,{spacing:6},t.createElement(G.TextInput,{error:F.email?oe({id:F.email,defaultMessage:"This value is required."}):"",value:Ee.email,onChange:ce,label:oe({id:"Auth.form.email.label",defaultMessage:"Email"}),placeholder:oe({id:"Auth.form.email.placeholder",defaultMessage:"kai@doe.com"}),name:"email",required:!0}),t.createElement(te,{error:F.password?oe({id:F.password,defaultMessage:"This value is required."}):"",onChange:ce,value:Ee.password,label:oe({id:"global.password",defaultMessage:"Password"}),name:"password",type:ie?"text":"password",endAction:t.createElement(fe.Z,{onClick:Ue=>{Ue.stopPropagation(),ge(ht=>!ht)},label:oe(ie?{id:"Auth.form.password.show-password",defaultMessage:"Show password"}:{id:"Auth.form.password.hide-password",defaultMessage:"Hide password"})},ie?t.createElement(x(),null):t.createElement(A(),null)),required:!0}),t.createElement(y.Checkbox,{onValueChange:Ue=>{ce({target:{value:Ue,name:"rememberMe"}})},value:Ee.rememberMe,"aria-label":"rememberMe",name:"rememberMe"},oe({id:"Auth.form.rememberMe.label",defaultMessage:"Remember me"})),t.createElement(W.Button,{fullWidth:!0,type:"submit"},oe({id:"Auth.form.button.login",defaultMessage:"Login"}))))),U),t.createElement(D.Flex,{justifyContent:"center"},t.createElement(H.Box,{paddingTop:4},t.createElement(c.Link,{to:"/auth/forgot-password"},oe({id:"Auth.link.forgot-password",defaultMessage:"Forgot your password?"})))))};Y.defaultProps={children:null,onSubmit:()=>{}},Y.propTypes={children:be().node,onSubmit:be().func,schema:be().shape({type:be().string.isRequired}).isRequired};const V=Y},5365:(J,C,e)=>{"use strict";e.d(C,{Z:()=>_});var t=e(32735),c=e(60216),a=e.n(c),P=e(1115),A=e(954),O=Object.defineProperty,x=Object.getOwnPropertySymbols,H=Object.prototype.hasOwnProperty,q=Object.prototype.propertyIsEnumerable,Q=(D,T,W)=>T in D?O(D,T,{enumerable:!0,configurable:!0,writable:!0,value:W}):D[T]=W,L=(D,T)=>{for(var W in T||(T={}))H.call(T,W)&&Q(D,W,T[W]);if(x)for(var W of x(T))q.call(T,W)&&Q(D,W,T[W]);return D};const Z=D=>t.createElement(A.ZP,null,t.createElement(P.Z,L({},D)));Z.defaultProps={onSubmit:D=>D.preventDefault()},Z.propTypes={onSubmit:a().func};const _=Z},53951:(J,C,e)=>{"use strict";e.r(C),e.d(C,{default:()=>N});var t=e(32735),c=e(88425),a=e.n(c),P=e(16540),A=e.n(P),O=e(11856),x=e.n(O),H=e(64354),q=e.n(H),Q=e(70733),L=e.n(Q),Z=e(30345),_=e.n(Z),D=e(5636),T=e.n(D);const N=()=>{const{formatMessage:G}=(0,D.useIntl)();return(0,c.useFocusWhenNavigate)(),t.createElement(P.Main,{labelledBy:"title"},t.createElement(O.HeaderLayout,{id:"title",title:G({id:"content-manager.pageNotFound",defaultMessage:"Page not found"})}),t.createElement(O.ContentLayout,null,t.createElement(H.EmptyStateLayout,{action:t.createElement(c.LinkButton,{variant:"secondary",endIcon:t.createElement(_(),null),to:"/"},G({id:"app.components.NotFoundPage.back",defaultMessage:"Back to homepage"})),content:G({id:"app.page.not.found",defaultMessage:"Oops! We can't seem to find the page you're looging for..."}),hasRadius:!0,icon:t.createElement(L(),{width:"10rem"}),shadow:"tableShadow"})))}},26123:(J,C,e)=>{"use strict";e.d(C,{Z:()=>t});const t={}},41832:(J,C,e)=>{"use strict";e.d(C,{Z:()=>c});const c=({data:a})=>{try{return Object.keys(a).reduce((P,A)=>{const O=a[A][0];return P[A]={id:O,defaultMessage:O},P},{})}catch(P){return{}}}},7602:(J,C,e)=>{"use strict";e.d(C,{R6:()=>P,ot:()=>_,Iz:()=>D.Z,Pp:()=>V,IF:()=>Y,WW:()=>Se});var t=e(88425),c=(b,I,U)=>new Promise((ie,ge)=>{var oe=ce=>{try{F(U.next(ce))}catch(Ue){ge(Ue)}},Ee=ce=>{try{F(U.throw(ce))}catch(Ue){ge(Ue)}},F=ce=>ce.done?ie(ce.value):Promise.resolve(ce.value).then(oe,Ee);F((U=U.apply(b,I)).next())});const P=(b,I)=>c(void 0,null,function*(){let U=null;try{yield I.validate(b,{abortEarly:!1})}catch(ie){U=(0,t.getYupInnerErrors)(ie)}return U});var A=e(32735),O=e(60216),x=e.n(O),H=e(5141),q=e(98399),Q=(b,I,U)=>new Promise((ie,ge)=>{var oe=ce=>{try{F(U.next(ce))}catch(Ue){ge(Ue)}},Ee=ce=>{try{F(U.throw(ce))}catch(Ue){ge(Ue)}},F=ce=>ce.done?ie(ce.value):Promise.resolve(ce.value).then(oe,Ee);F((U=U.apply(b,I)).next())});const L=({loadComponent:b})=>{const[I,U]=(0,A.useState)(null);return(0,A.useEffect)(()=>{(()=>Q(void 0,null,function*(){try{const ge=yield b();U(()=>ge.default)}catch(ge){q.log(ge)}}))()},[b]),I?A.createElement(I,null):A.createElement(t.LoadingIndicatorPage,null)},Z=(b,I,U)=>A.createElement(H.Route,{render:()=>A.createElement(L,{loadComponent:b}),key:I,path:I,exact:U||!1});L.propTypes={loadComponent:x().func.isRequired};const _=Z;var D=e(41832),T=e(92891),W=Object.defineProperty,N=Object.defineProperties,G=Object.getOwnPropertyDescriptors,ee=Object.getOwnPropertySymbols,y=Object.prototype.hasOwnProperty,j=Object.prototype.propertyIsEnumerable,z=(b,I,U)=>I in b?W(b,I,{enumerable:!0,configurable:!0,writable:!0,value:U}):b[I]=U,Le=(b,I)=>{for(var U in I||(I={}))y.call(I,U)&&z(b,U,I[U]);if(ee)for(var U of ee(I))j.call(I,U)&&z(b,U,I[U]);return b},ue=(b,I)=>N(b,G(I));const be=b=>{const I=get(b,["options","timestamps"]);let U=Array.isArray(I)?I:[];const ge=[...["id","_id"],...U,"publishedAt"],oe=get(b,["attributes"],{});return Object.keys(oe).reduce((Ee,F)=>(ge.includes(F)||Ee.push(ue(Le({},oe[F]),{attributeName:F})),Ee),[])},l=null,Se=b=>b.filter((I,U,ie)=>ie.findIndex(ge=>ge.key===I.key)===U),Xe=b=>sortBy(b,I=>I.name),de=null,re=b=>Array.from(new Set(Object.entries(b).reduce((I,U)=>{const ie=ge=>ge.reduce((oe,Ee)=>{let F=oe;return Ee.actions&&(F=[...F,...Ee.actions]),typeof Ee=="object"&&!Ee.actions&&(F=[...F,...Object.keys(Ee)]),F},[]);return[...I,...ie([...Object.values(U[1].attributes||{}),get(U[1],"contentTypeActions",{})])]},[]))),fe=null,Y=b=>`/admin/${b}`,V=(b,I="")=>[b,I].filter(U=>U).join(" ")},58414:(J,C,e)=>{"use strict";e.d(C,{p:()=>L});var t=e(32735),c=e(88425),a=e(7602),P=e(49415);const A={data:[],isLoading:!0},x=(Z,_)=>(0,P.default)(Z,D=>{switch(_.type){case"GET_DATA_SUCCEEDED":{D.data=_.data,D.isLoading=!1;break}case"GET_DATA_ERROR":{D.isLoading=!1;break}default:return D}});var H=e(98399),q=(Z,_,D)=>new Promise((T,W)=>{var N=y=>{try{ee(D.next(y))}catch(j){W(j)}},G=y=>{try{ee(D.throw(y))}catch(j){W(j)}},ee=y=>y.done?T(y.value):Promise.resolve(y.value).then(N,G);ee((D=D.apply(Z,_)).next())});const L=({ssoEnabled:Z})=>{const[_,D]=(0,t.useReducer)(x,A),T=(0,c.useNotification)();(0,t.useEffect)(()=>{W()},[]);const W=()=>q(void 0,null,function*(){try{if(!Z){D({type:"GET_DATA_SUCCEEDED",data:[]});return}const N=(0,a.IF)("providers"),G=yield(0,c.request)(N,{method:"GET"});D({type:"GET_DATA_SUCCEEDED",data:G})}catch(N){H.error(N),D({type:"GET_DATA_ERROR"}),T({type:"warning",message:{id:"notification.error"}})}});return _}},11545:(J,C,e)=>{"use strict";e.d(C,{Z:()=>P});var t=e(83983);const P=[...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}]:[]]},68944:(J,C,e)=>{"use strict";e.d(C,{Z:()=>Z});var t=e(32735),c=e(5141),a=e(5636),P=e(49189),A=e.n(P),O=e(88425),x=e(7602),H=(_,D,T)=>new Promise((W,N)=>{var G=j=>{try{y(T.next(j))}catch(z){N(z)}},ee=j=>{try{y(T.throw(j))}catch(z){N(z)}},y=j=>j.done?W(j.value):Promise.resolve(j.value).then(G,ee);y((T=T.apply(_,D)).next())});const Q=()=>{const{params:{authResponse:_}}=(0,c.useRouteMatch)("/auth/login/:authResponse"),{formatMessage:D}=(0,a.useIntl)(),{push:T}=(0,c.useHistory)(),W=(0,t.useRef)(D);let N=(0,t.useCallback)(()=>{T(`/auth/oops?info=${encodeURIComponent(W.current({id:"Auth.form.button.login.providers.error",defaultMessage:"We cannot connect you through the selected provider."}))}`)},[T]);const G=(0,t.useCallback)(()=>H(void 0,null,function*(){try{const ee=A().get("jwtToken");if(O.auth.clearAppStorage(),ee){O.auth.setToken(ee,!0);const y=(0,x.IF)("users/me"),{data:j}=yield(0,O.request)(y,{method:"GET"});O.auth.setUserInfo(j,!0),A().remove("jwtToken"),T("/auth/login")}}catch(ee){N()}}),[T,N]);return(0,t.useEffect)(()=>{_==="error"&&N(),_==="success"&&G()},[_,G,N]),t.createElement(O.LoadingIndicatorPage,null)},Z=[{Component:()=>({default:Q}),to:"/auth/login/:authResponse",exact:!0}]},98768:(J,C,e)=>{"use strict";e.d(C,{Z:()=>Xe});var t=e(32735),c=e(60216),a=e.n(c),P=e(19615),A=e(9808),O=e.n(A),x=e(19192),H=e.n(x),q=e(27635),Q=e.n(q),L=e(90662),Z=e.n(L),_=e(95602),D=e.n(_),T=e(5636),W=e.n(T),N=e(1115),G=e(58414),ee=e(954),y=e(33205),j=Object.defineProperty,z=Object.getOwnPropertySymbols,Le=Object.prototype.hasOwnProperty,ue=Object.prototype.propertyIsEnumerable,be=(de,re,fe)=>re in de?j(de,re,{enumerable:!0,configurable:!0,writable:!0,value:fe}):de[re]=fe,l=(de,re)=>{for(var fe in re||(re={}))Le.call(re,fe)&&be(de,fe,re[fe]);if(z)for(var fe of z(re))ue.call(re,fe)&&be(de,fe,re[fe]);return de};const et=(0,P.default)(q.Divider)`
  flex: 1;
`,Se=de=>{const re=strapi.features.isEnabled(strapi.features.SSO),{isLoading:fe,data:te}=(0,G.p)({ssoEnabled:re}),{formatMessage:Y}=(0,T.useIntl)();return!re||!fe&&te.length===0?t.createElement(ee.ZP,null,t.createElement(N.Z,l({},de))):t.createElement(ee.ZP,null,t.createElement(N.Z,l({},de),t.createElement(A.Box,{paddingTop:7},t.createElement(L.Stack,{spacing:7},t.createElement(x.Flex,null,t.createElement(et,null),t.createElement(A.Box,{paddingLeft:3,paddingRight:3},t.createElement(_.Typography,{variant:"sigma",textColor:"neutral600"},Y({id:"Auth.login.sso.divider"}))),t.createElement(et,null)),t.createElement(y.Z,{providers:te,displayAllProviders:!1})))))};Se.defaultProps={onSubmit:de=>de.preventDefault(),requestError:null},Se.propTypes={formErrors:a().object.isRequired,modifiedData:a().object.isRequired,onChange:a().func.isRequired,onSubmit:a().func,requestError:a().object};const Xe=Se},33205:(J,C,e)=>{"use strict";e.d(C,{Z:()=>y});var t=e(32735),c=e(60216),a=e.n(c),P=e(78330),A=e.n(P),O=e(19192),x=e.n(O),H=e(95602),q=e.n(H),Q=e(44826),L=e.n(Q),Z=e(19615),_=e(5636),D=e.n(_),T=e(5141);const W=Z.default.a`
  width: ${136/16}rem;
  display: flex;
  justify-content: center;
  align-items: center;
  height: ${48/16}rem;
  border: 1px solid ${({theme:j})=>j.colors.neutral150};
  border-radius: ${({theme:j})=>j.borderRadius};
  text-decoration: inherit;
  &:link {
    text-decoration: none;
  }
  color: ${({theme:j})=>j.colors.neutral600};
`,N=(0,Z.default)(O.Flex)`
  & a:not(:first-child):not(:last-child) {
    margin: 0 ${({theme:j})=>j.spaces[2]};
  }
  & a:first-child {
    margin-right: ${({theme:j})=>j.spaces[2]};
  }
  & a:last-child {
    margin-left: ${({theme:j})=>j.spaces[2]};
  }
`,G=({provider:j})=>t.createElement(Q.Tooltip,{label:j.displayName},t.createElement(W,{href:`${strapi.backendURL}/admin/connect/${j.uid}`},j.icon?t.createElement("img",{src:j.icon,"aria-hidden":!0,alt:"",height:"32px"}):t.createElement(H.Typography,null,j.displayName)));G.propTypes={provider:a().shape({icon:a().string,displayName:a().string.isRequired,uid:a().string.isRequired}).isRequired};const ee=({providers:j,displayAllProviders:z})=>{const{formatMessage:Le}=(0,_.useIntl)();return z?t.createElement(P.Grid,{gap:4},j.map(ue=>t.createElement(P.GridItem,{key:ue.uid,col:4},t.createElement(G,{provider:ue})))):j.length>2&&!z?t.createElement(P.Grid,{gap:4},j.slice(0,2).map(ue=>t.createElement(P.GridItem,{key:ue.uid,col:4},t.createElement(G,{provider:ue}))),t.createElement(P.GridItem,{col:4},t.createElement(Q.Tooltip,{label:Le({id:"global.see-more"})},t.createElement(W,{as:T.Link,to:"/auth/providers"},t.createElement("span",{"aria-hidden":!0},"\u2022\u2022\u2022"))))):t.createElement(N,{justifyContent:"center"},j.map(ue=>t.createElement(G,{key:ue.uid,provider:ue})))};ee.defaultProps={displayAllProviders:!0},ee.propTypes={providers:a().arrayOf(a().object).isRequired,displayAllProviders:a().bool};const y=ee},7277:(J,C,e)=>{"use strict";e.d(C,{Z:()=>fe});var t=e(32735),c=e(5141),a=e(19615),P=e(88425),A=e(27635),O=e(90662),x=e(19192),H=e(9808),q=e(44526),Q=e(82910),L=e(95602),Z=e(16540),_=e(5636),D=e(58414),T=e(954),W=e(33205),N=e(10190);const G=(0,a.default)(A.Divider)`
  flex: 1;
`,y=()=>{const te=strapi.features.isEnabled(strapi.features.SSO),{push:Y}=(0,c.useHistory)(),{formatMessage:V}=(0,_.useIntl)(),{isLoading:b,data:I}=(0,D.p)({ssoEnabled:te}),U=()=>{Y("/auth/login")};return!te||!b&&I.length===0?t.createElement(c.Redirect,{to:"/auth/login"}):t.createElement(T.ZP,null,t.createElement(Z.Main,null,t.createElement(T.bU,null,t.createElement(T.sg,null,t.createElement(N.Z,null),t.createElement(H.Box,{paddingTop:6,paddingBottom:1},t.createElement(L.Typography,{as:"h1",variant:"alpha"},V({id:"Auth.form.welcome.title"}))),t.createElement(H.Box,{paddingBottom:7},t.createElement(L.Typography,{variant:"epsilon",textColor:"neutral600"},V({id:"Auth.login.sso.subtitle"})))),t.createElement(O.Stack,{spacing:7},b?t.createElement(x.Flex,{justifyContent:"center"},t.createElement(Q.Loader,null,V({id:"Auth.login.sso.loading"}))):t.createElement(W.Z,{providers:I}),t.createElement(x.Flex,null,t.createElement(G,null),t.createElement(H.Box,{paddingLeft:3,paddingRight:3},t.createElement(L.Typography,{variant:"sigma",textColor:"neutral600"},V({id:"or"}))),t.createElement(G,null)),t.createElement(q.Button,{fullWidth:!0,size:"L",onClick:U},V({id:"Auth.form.button.login.strapi"})))),t.createElement(x.Flex,{justifyContent:"center"},t.createElement(H.Box,{paddingTop:4},t.createElement(P.Link,{to:"/auth/forgot-password"},t.createElement(L.Typography,{variant:"pi"},V({id:"Auth.link.forgot-password"})))))))};var j=e(78834),z=Object.defineProperty,Le=Object.defineProperties,ue=Object.getOwnPropertyDescriptors,be=Object.getOwnPropertySymbols,l=Object.prototype.hasOwnProperty,et=Object.prototype.propertyIsEnumerable,Se=(te,Y,V)=>Y in te?z(te,Y,{enumerable:!0,configurable:!0,writable:!0,value:V}):te[Y]=V,Xe=(te,Y)=>{for(var V in Y||(Y={}))l.call(Y,V)&&Se(te,V,Y[V]);if(be)for(var V of be(Y))et.call(Y,V)&&Se(te,V,Y[V]);return te},de=(te,Y)=>Le(te,ue(Y));const fe=de(Xe({},j.Z),{providers:{Component:y,endPoint:null,fieldsToDisable:[],fieldsToOmit:[],schema:null,inputsPrefix:""}})},99568:(J,C,e)=>{"use strict";e.d(C,{Z:()=>c});const c={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}]}}}},48224:(J,C,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 c(a){if(!e.o(t,a))return Promise.resolve().then(()=>{var O=new Error("Cannot find module '"+a+"'");throw O.code="MODULE_NOT_FOUND",O});var P=t[a],A=P[0];return e.e(P[1]).then(()=>e.t(A,19))}c.keys=()=>Object.keys(t),c.id=48224,J.exports=c}}]);
