1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7107],{74446:function(e,a,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/auth/signup/tenant-ateneo",function(){return n(3685)}])},53484:function(e,a,n){"use strict";n.d(a,{Fc:function(){return l}});var i=n(83454);let l={unibg:{callbackUrl:i.env.APP_SAML_CALLBACK_URL+"/api/auth/ateneo/unibg/callback",entryPoint:"https://idp-idm.unibg.it/idp/profile/SAML2/Redirect/SSO",issuer:"http://localhost:3000"===i.env.APP_SAML_CALLBACK_URL?"cercoalloggio-saml-unibg-local":"cercoalloggio-saml-unibg",city:["Bergamo"],profileName:"urn:oid:2.5.4.4",profileSurname:"urn:oid:2.5.4.42",profileEmail:"email"},uninsubria:{callbackUrl:i.env.APP_SAML_CALLBACK_URL+"/api/auth/ateneo/uninsubria/callback",entryPoint:"https://idp.uninsubria.it/idp/profile/SAML2/Redirect/SSO",issuer:"http://localhost:3000"===i.env.APP_SAML_CALLBACK_URL?"cercoalloggio-saml-uninsubria-local":"cercoalloggio-saml-uninsubria",city:["Varese","Como"],profileName:"urn:oid:2.5.4.4",profileSurname:"urn:oid:2.5.4.42",profileEmail:"email"},univpm:{callbackUrl:i.env.APP_SAML_CALLBACK_URL+"/api/auth/ateneo/univpm/callback",entryPoint:"https://sso.univpm.it/idp/profile/SAML2/Redirect/SSO",issuer:"http://localhost:3000"===i.env.APP_SAML_CALLBACK_URL?"cercoalloggio-saml-univpm-local":"cercoalloggio-saml-univpm",city:["Ancona"],profileName:"urn:oid:2.5.4.4",profileSurname:"urn:oid:2.5.4.42",profileEmail:"urn:oid:0.9.2342.19200300.100.1.3"}}},3685:function(e,a,n){"use strict";n.r(a),n.d(a,{__N_SSP:function(){return w},default:function(){return F}});var i=n(85893),l=n(67294),s=n(19883),r=n(3368),t=n(84441),o=n(15544),m=n(15658),u=n(30681),c=n(69222),d=n(63286),p=n(23277),g=n(43127),h=n(80775),b=n(95152),f=n(19326),x=n(68326),j=n(1604),v=n(53484);let _=Object.keys(v.Fc).map(e=>v.Fc[e].city).flat(),S=j.z.object({name:j.z.string().trim().min(1).max(32),surname:j.z.string().trim().min(1).max(32),phone:j.z.string().trim().max(24),city:j.z.enum(_),whatsapp:j.z.union([j.z.literal("true"),j.z.literal("false")]),...x.CT,ref:j.z.string().trim().length(64),m:j.z.enum(["saml"])});var A=n(8414),C=n(11163),y=n(61798),L=n(51910),N=n(5982),P=n(35292),k=n(36628),z=n(19099),w=!0;function F(){let{user:e,isLoading:a}=(0,A.a)(),n=(0,C.useRouter)(),{t:x,i18n:j}=(0,y.$G)(["signup","passwordStrength","helpModal",...L.UD]),[v,_]=(0,l.useState)(!1),[w,F]=(0,l.useState)("init"),[R,E]=(0,l.useState)(null),[M,U]=(0,l.useState)(!1),T=(0,l.useRef)(null),q=n.query,{data:B}=(0,N.k)((null==q?void 0:q.ref)?"/api/auth/get-saml-id?ref=".concat(q.ref):null);return a?null:!n.isReady||(null==q?void 0:q.m)&&"saml"===q.m&&q.ref?e&&!a?(n.push("/"+j.language+"/dashboard/tenant"),null):e?void 0:(0,i.jsx)(g.A,{global:h.b,pageData:{seo:{metaTitle:x("signup:titleTenant")}},className:"SignupTenant",children:(0,i.jsx)("div",{ref:T,className:"SignupPage",children:(0,i.jsx)(s.$,{className:"my-0 py-12 bg-signup bg-cover bg-left-bottom",children:(0,i.jsx)(u.W,{children:(0,i.jsx)("div",{className:"grid grid-cols-12 lg:gap-x-12 items-center",children:(0,i.jsx)("div",{className:"col-span-12 md:col-span-10 md:col-start-2 lg:col-span-8 lg:col-start-3",children:(0,i.jsxs)(o.X,{className:"p-6",children:[(0,i.jsx)(r.D,{variant:"h4",color:"primary",size:"lg",className:"text-center",children:x("signup:title")}),(0,i.jsxs)("form",{onSubmit:e=>{(0,f.i)(e,{schema:S,scrollTo:T,endpoint:"/api/auth/ateneo/signup",onStart:()=>{F("submit"),R&&E(null)},onSuccess:e=>{n.push("/"+j.language+"/dashboard/tenant")},onError:e=>{E(e)},setStage:F})},children:[(0,i.jsxs)("div",{className:"lg:grid lg:grid-cols-12 lg:gap-x-12 lg:items-start",children:[R?(0,i.jsx)(b.z,{classes:"col-span-12 mb-1",icon:"error",text:x("errors:".concat(R)),setErrorMsg:E}):null,(0,i.jsx)("div",{className:"lg:col-span-6 pb-4",children:B&&B.name?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(m.o,{id:"samlName",name:"samlName",label:x("signup:formCommon:name"),disabled:!0,defaultValue:(0,z.F)(B.name)||""}),(0,i.jsx)("input",{type:"hidden",name:"name",id:"name",value:(0,z.F)(B.name)})]}):(0,i.jsx)(m.o,{id:"name",name:"name",label:x("signup:formCommon:name"),required:!0,requiredmessage:x("errors:requiredField")})}),(0,i.jsx)("div",{className:"lg:col-span-6 pb-4",children:B&&B.surname?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(m.o,{id:"samlSurname",name:"samlSurname",label:x("signup:formCommon:surname"),disabled:!0,defaultValue:(0,z.F)(B.surname)||""}),(0,i.jsx)("input",{type:"hidden",name:"surname",id:"surname",value:(0,z.F)(B.surname)})]}):(0,i.jsx)(m.o,{id:"surname",name:"surname",label:x("signup:formCommon:surname"),required:!0,requiredmessage:x("errors:requiredField")})}),B&&"Como"===B.city?(0,i.jsx)("div",{className:"lg:col-span-12 pb-4",children:(0,i.jsx)(P.P,{id:"city",name:"city",label:x("signup:formCommon:city"),options:[{value:"Como",label:"Como"},{value:"Varese",label:"Varese"}],required:!0})}
1):(0,i.jsx)("input",{type:"hidden",name:"city",id:"city",value:B&&B.city?B.city:null}),(0,i.jsx)("div",{className:"lg:col-span-12 pb-8",children:(0,i.jsx)(p.a,{label:x("signup:formCommon:phone"),withWhatsapp:!0,labelWhatsapp:x("signup:formCommon:whatsapp")})})]}),(0,i.jsxs)("div",{className:"lg:grid lg:grid-cols-12 lg:gap-x-12 lg:items-center",children:[(0,i.jsx)("div",{className:"col-span-12 mb-4",children:(0,i.jsx)(k.Z,{acknowledged:v,onAcknowledgedChange:_})}),q&&"saml"===q.m&&q.ref?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("input",{type:"hidden",name:"ref",id:"ref",value:q.ref||""}),(0,i.jsx)("input",{type:"hidden",name:"m",id:"m",value:q.m||""})]}):null]}),(0,i.jsxs)("div",{className:"grid grid-cols-12 lg:gap-x-12 items-center",children:[(0,i.jsxs)("div",{className:"col-span-6",children:[(0,i.jsx)(t.z,{variant:"secondary",label:x("signup:formCommon:help"),onClick:()=>U(!0)}),(0,i.jsx)(c.u,{isOpen:M,onClose:()=>U(!1),children:(0,i.jsx)(d.B,{})})]}),(0,i.jsx)("div",{className:"col-span-6 text-end",children:(0,i.jsx)(t.z,{loading:"init"!==w,type:"submit",variant:"primary",label:x("signup:formCommon:submit"),disabled:!v})})]})]})]})})})})})})}):(n.replace("/".concat(j.language,"/auth/error?code=NOT_VALID_EXT")),null)}}},function(e){e.O(0,[3714,4969,9734,9332,1830,9238,7441,3690,5358,6571,9530,2075,6198,2888,9774,179],function(){return e(e.s=74446)}),_N_E=e.O()}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.