ultisuite-client/out/_next/static/chunks/9731-4e57aaa90a88eac7.js
R3D347HR4Y d6d18f911b
Some checks failed
E2E / Playwright e2e (push) Has been cancelled
Lots of stuff and mobile app
2026-06-17 00:13:28 +02:00

1 line
7.0 KiB
JavaScript

"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9731],{13746:(e,t,a)=>{a.d(t,{p:()=>r});var s=a(4208),n=a(91356),l=a(58113);let r=n.forwardRef(function({className:e,type:t,...a},n){return(0,s.jsx)("input",{ref:n,type:t,"data-slot":"input",className:(0,l.cn)("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",e),...a})});r.displayName="Input"},18753:(e,t,a)=>{a.d(t,{W:()=>l,b:()=>r});var s=a(29994),n=a(62805);async function l(e){(0,s.bo)(e);try{await (0,n.Lj)(JSON.stringify(e))}catch{}}async function r(){if((0,s.PC)())return(0,s.PC)();try{let e=await (0,n.kT)();if(e){let t=JSON.parse(e);return(0,s.bo)(t),t}}catch{}return null}},29731:(e,t,a)=>{a.d(t,{t:()=>m});var s=a(4208),n=a(91356),l=a(19984),r=a(61554),i=a(69640),c=a(82386),o=a(60112),d=a(29994),u=a(49039);let x=(0,a(58113).cn)("w-full gap-4 border-0 bg-transparent px-4 py-6 shadow-none","sm:gap-5 sm:bg-card sm:px-8 sm:py-8");function m({returnTo:e}){let t=(0,l.useRouter)(),[a,p]=(0,n.useState)(()=>!!(0,d.PC)()),[f,h]=(0,n.useState)(!1),[g,b]=(0,n.useState)(null);if(!a)return(0,s.jsx)(c.A,{onSelected:()=>p(!0)});let j=(0,d.PC)();async function v(){h(!0),b(null);try{await (0,o.PA)({returnTo:e}),t.replace(e.startsWith("/")?e:"/mail/inbox")}catch(e){b(e instanceof Error?e.message:"Connexion \xe9chou\xe9e.")}finally{h(!1)}}return(0,s.jsx)("div",{className:"flex flex-1 flex-col items-center justify-center px-4",children:(0,s.jsx)("div",{className:"mx-auto w-full max-w-sm",children:(0,s.jsxs)(i.Zp,{className:x,children:[(0,s.jsxs)(i.aR,{className:"gap-3 px-0 text-center",children:[(0,s.jsxs)("div",{className:"flex flex-col items-center gap-3 py-2",children:[(0,s.jsx)("img",{src:"/ultisuite-mark.svg",alt:"",width:64,height:64,className:"h-14 w-14 select-none","aria-hidden":!0}),(0,s.jsxs)("span",{className:"text-xl font-bold tracking-tight",children:["Ulti",(0,s.jsx)("span",{className:"text-[#4285F4]",children:"Suite"})]})]}),(0,s.jsx)(i.BT,{children:j?`Connect\xe9 \xe0 ${j.label}`:"Connecte-toi \xe0 ton compte Ulti."}),g?(0,s.jsx)("p",{className:"text-sm text-destructive",role:"alert",children:g}):null]}),(0,s.jsxs)(i.Wu,{className:"flex flex-col items-center gap-3 px-0",children:[(0,s.jsx)(r.$,{size:"lg",className:"w-full",disabled:f,onClick:()=>void v(),children:f?"Connexion…":"Se connecter"}),(0,s.jsx)(r.$,{size:"sm",variant:"ghost",className:"w-full",disabled:f,onClick:()=>p(!1),children:"Changer de serveur"})]}),(0,s.jsx)(i.wL,{className:"px-0",children:(0,s.jsxs)("p",{className:"w-full text-center text-sm text-muted-foreground",children:["Pas encore de compte ?"," ",(0,s.jsx)("a",{className:"font-medium text-primary underline",href:(0,u.z0)(),target:"_blank",rel:"noreferrer",children:"Cr\xe9er un compte"})]})})]})})})}},49039:(e,t,a)=>{a.d(t,{EJ:()=>c,xb:()=>r,z0:()=>i});var s=a(81887),n=a(29994),l=a(82108);function r(){var e;return((e="http://localhost/auth/application/o/ulti/").endsWith("/")?e:`${e}/`).replace(/application\/o\/[^/]+\/?$/,"")}function i(){if((0,s.B8)()){let e=(0,n.PC)();if(e?.oidc.enrollmentUrl)return e.oidc.enrollmentUrl}return`${r()}if/flow/ulti-enrollment/`}function c(){return"true"!==l.env.NEXT_PUBLIC_OIDC_DISABLED}},69640:(e,t,a)=>{a.d(t,{BT:()=>c,Wu:()=>o,ZB:()=>i,Zp:()=>l,aR:()=>r,wL:()=>d});var s=a(4208);a(91356);var n=a(58113);function l({className:e,...t}){return(0,s.jsx)("div",{"data-slot":"card",className:(0,n.cn)("bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm",e),...t})}function r({className:e,...t}){return(0,s.jsx)("div",{"data-slot":"card-header",className:(0,n.cn)("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-2 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",e),...t})}function i({className:e,...t}){return(0,s.jsx)("div",{"data-slot":"card-title",className:(0,n.cn)("leading-none font-semibold",e),...t})}function c({className:e,...t}){return(0,s.jsx)("div",{"data-slot":"card-description",className:(0,n.cn)("text-muted-foreground text-sm",e),...t})}function o({className:e,...t}){return(0,s.jsx)("div",{"data-slot":"card-content",className:(0,n.cn)("px-6",e),...t})}function d({className:e,...t}){return(0,s.jsx)("div",{"data-slot":"card-footer",className:(0,n.cn)("flex items-center px-6 [.border-t]:pt-6",e),...t})}},82386:(e,t,a)=>{a.d(t,{A:()=>u});var s=a(4208),n=a(91356),l=a(61554),r=a(13746),i=a(69640),c=a(29994),o=a(18753);let d=(0,a(58113).cn)("w-full gap-4 border-0 bg-transparent px-4 py-6 shadow-none","sm:gap-5 sm:bg-card sm:px-8 sm:py-8");function u({onSelected:e}){let[t,a]=(0,n.useState)("choose"),[x,m]=(0,n.useState)(""),[p,f]=(0,n.useState)(!1),[h,g]=(0,n.useState)(null);async function b(t,a){f(!0),g(null);try{let s=await (0,c.Ij)(t,{label:a});await (0,o.W)(s),e(s)}catch(e){g(e instanceof Error?e.message:"Connexion impossible.")}finally{f(!1)}}return(0,s.jsx)("div",{className:"flex flex-1 flex-col items-center justify-center px-4",children:(0,s.jsx)("div",{className:"mx-auto w-full max-w-sm",children:(0,s.jsxs)(i.Zp,{className:d,children:[(0,s.jsxs)(i.aR,{className:"gap-3 px-0 text-center",children:[(0,s.jsxs)("div",{className:"flex flex-col items-center gap-3 py-2",children:[(0,s.jsx)("img",{src:"/ultisuite-mark.svg",alt:"",width:64,height:64,className:"h-14 w-14 select-none","aria-hidden":!0}),(0,s.jsxs)("span",{className:"text-xl font-bold tracking-tight",children:["Ulti",(0,s.jsx)("span",{className:"text-[#4285F4]",children:"Suite"})]})]}),(0,s.jsx)(i.BT,{children:"Choisis ton serveur pour te connecter."}),h?(0,s.jsx)("p",{className:"text-sm text-destructive",role:"alert",children:h}):null]}),(0,s.jsx)(i.Wu,{className:"flex flex-col gap-3 px-0",children:"choose"===t?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(l.$,{type:"button",size:"lg",className:"w-full",disabled:p,onClick:()=>void b((0,c.zB)(),"UltiSpace"),children:p?"Connexion…":"UltiSpace (h\xe9berg\xe9)"}),(0,s.jsx)(l.$,{type:"button",size:"lg",variant:"outline",className:"w-full",disabled:p,onClick:()=>a("self"),children:"Instance auto-h\xe9berg\xe9e"})]}):(0,s.jsxs)("form",{className:"flex flex-col gap-3",onSubmit:e=>{e.preventDefault(),x.trim()&&b(x.trim())},children:[(0,s.jsx)(r.p,{type:"url",inputMode:"url",autoCapitalize:"none",autoCorrect:"off",placeholder:"https://mail.exemple.org",value:x,onChange:e=>m(e.target.value),disabled:p}),(0,s.jsx)(l.$,{size:"lg",type:"submit",className:"w-full",disabled:p||!x.trim(),children:p?"Connexion…":"Continuer"}),(0,s.jsx)(l.$,{type:"button",variant:"ghost",className:"w-full",disabled:p,onClick:()=>a("choose"),children:"Retour"})]})})]})})})}}}]);