PageSourceSearch

https://proobruch.ru/assets/RegisterPage-CJTak_lC.js

js proobruch.ru collected 2026-10-09 22:38:52 UTC 11,990 bytes, 1 lines download raw bytes

1import{F as r,n as k,r as E,j as e,$ as A,ai as o,aj as l,I as i,N as D,ak as x,C as h,al as O,Y as _,q as V,B,S as $,T as M,L as H}from"./vendor-0v--kTIY.js";import{u as U,P as W,a as z,D as u,L as d,B as G,N as K,c as j,b as Q,d as Y}from"./index-D44GA20K.js";import{u as Z,a as J,F as m}from"./FormSection-BmYlKEjr.js";import{p as X,a as ee,P as se,b as re}from"./PhoneInput-Bf9OYfeX.js";import{P as f}from"./PasswordInput-BZTIpF21.js";import"./phone-BBsMb66W.js";const{Text:te}=M,{Option:c}=x,ce=()=>{const[n]=r.useForm(),{register:C,isLoading:P}=U(),{data:p}=k({queryKey:["email-domain-policy"],queryFn:Y.emailDomainPolicy,staleTime:3600*1e3}),w=new Set(p),{data:g,isLoading:v}=Z(),[I,L]=E.useState(null),{data:y,isLoading:S}=J(I),[b,F]=E.useState(!1);E.useEffect(()=>{p&&n.getFieldValue("email")&&n.validateFields(["email"]).catch(()=>{})},[p,n]);const T=s=>{L(s),n.setFieldValue("cityId",void 0)},q=s=>{F(s),s?n.setFieldValue("cityId",void 0):n.setFieldValue("cityCustom","")},R=s=>{var a;const t={...s,email:s.email.trim()};b?t.cityId=void 0:t.cityCustom=void 0,t.postalIndex=((a=s.postalIndex)==null?void 0:a.trim())??"",t.consentDocuments={consent:j(d.consent),privacy:j(d.privacy),terms:j(d.terms),newsletter:s.newsletterSubscription?j(Q):void 0},C(t)};return e.jsxs(W,{width:"medium",children:[e.jsx(z,{title:"Регистрация организатора",subtitle:"ФИО и название школы попадут в дипломы и благодарности, поэтому проверьте написание. Заполнение займёт около 5 минут."}),e.jsx(A,{children:e.jsxs(r,{form:n,layout:"vertical",onFinish:R,requiredMark:"optional",scrollToFirstError:!0,initialValues:{newsletterSubscription:!1},children:[e.jsx(m,{title:"Персональные данные",first:!0}),e.jsxs(o,{gutter:16,children:[e.jsx(l,{xs:24,md:8,children:e.jsx(r.Item,{name:"lastName",label:"Фамилия",rules:[{required:!0,message:"Введите фамилию"},{pattern:/^[А-Яа-яЁё-]+$/,message:"Только кириллица"}],children:e.jsx(i,{prefix:e.jsx(D,{}),placeholder:"Иванов"})})}),e.jsx(l,{xs:24,md:8,children:e.jsx(r.Item,{name:"firstName",label:"Имя",rules:[{required:!0,message:"Введите имя"},{pattern:/^[А-Яа-яЁё-]+$/,message:"Только кириллица"}],children:e.jsx(i,{placeholder:"Иван"})})}),e.jsx(l,{xs:24,md:8,children:e.jsx(r.Item,{name:"middleName",label:"Отчество",rules:[{pattern:/^[А-Яа-яЁё-]*$/,message:"Только кириллица"}],children:e.jsx(i,{placeholder:"Иванович"})})})]}),e.jsxs(o,{gutter:16,children:[e.jsx(l,{xs:24,md:12,children:e.jsx(r.Item,{name:"gender",label:"Пол",rules:[{required:!0,message:"Выберите пол"}],children:e.jsxs(x,{placeholder:"Выберите пол",children:[e.jsx(c,{value:"MALE",children:"Мужской"}),e.jsx(c,{value:"FEMALE",children:"Женский"})]})})}),e.jsx(l,{xs:24,md:12,children:e.jsx(r.Item,{name:"phone",label:"Контактный телефон",rules:se,getValueFromEvent:ee,getValueProps:X,children:e.jsx(re,{})})})]}),e.jsx(m,{title:"Местоположение"}),e.jsxs(o,{gutter:16,children:[e.jsx(l,{xs:24,md:12,children:e.jsx(r.Item,{name:"regionId",label:"Регион",rules:[{required:!0,message:"Выберите регион"}],children:e.jsx(x,{showSearch:!0,placeholder:"Выберите регион",loading:v,onChange:T,optionFilterProp:"children",filterOption:(s,t)=>{var a;return(a=t==null?void 0:t.children)==null?void 0:a.toLowerCase().includes(s.toLowerCase())},children:g==null?void 0:g.map(s=>e.jsx(c,{value:s.id,children:s.name},s.id))})})}),e.jsxs(l,{xs:24,md:12,children:[b?e.jsx(r.Item,{name:"cityCustom",label:"Населённый пункт (свой вариант)",rules:[{required:!0,message:"Введите название населённого пункта"},{max:255,message:"Максимум 255 символов"}],children:e.jsx(i,{placeholder:"Например: с. Ямашево"})}):e.jsx(r.Item,{name:"cityId",label:"Город/Район",rules:[{required:!0,message:"Выберите город"}],children:e.jsx(x,{showSearch:!0,placeholder:I?"Выберите город":"Сначала выберите регион",disabled:!I,loading:S,optionFilterProp:"children",filterOption:(s,t)=>{var a;return(a=t==null?void 0:t.children)==null?void 0:a.toLowerCase().includes(s.toLowerCase())},children:y==null?void 0:y.map(s=>e.jsx(c,{value:s.id,children:s.name},s.id))})}),e.jsx(h,{checked:b,onChange:s=>q(s.target.checked),style:{marginTop:-8,marginBottom:8}
1,children:"Моего населённого пункта нет в списке"})]})]}),e.jsx(o,{gutter:16,children:e.jsx(l,{xs:24,md:12,children:e.jsx(r.Item,{name:"districtCustom",label:"Район / сельское поселение",tooltip:"Заполните, если нужно уточнить район или сельское поселение. Необязательно.",rules:[{max:255,message:"Максимум 255 символов"}],children:e.jsx(i,{placeholder:"Например: Нурлатский район"})})})}),e.jsx(r.Item,{name:"postalAddress",label:"Почтовый адрес школы",tooltip:"Понадобится для отправки печатных наградных материалов. Можно заполнить позже в личном кабинете.",rules:[{max:500,message:"Максимум 500 символов"}],children:e.jsx(i.TextArea,{rows:2,placeholder:"Улица, дом, населённый пункт"})}),e.jsx(r.Item,{name:"postalIndex",label:"Почтовый индекс",tooltip:"Понадобится для отправки печатных наградных материалов. Можно заполнить позже в личном кабинете.",rules:[{pattern:/^\d{6}$/,message:"Индекс состоит из 6 цифр"}],getValueFromEvent:s=>s.target.value.replaceAll(/\D/g,"").slice(0,6),children:e.jsx(i,{placeholder:"420000",maxLength:6,style:{maxWidth:220}})}),e.jsx(m,{title:"Образовательная организация"}),e.jsx(r.Item,{name:"institutionType",label:"Тип образовательной организации",rules:[{required:!0,message:"Выберите тип организации"}],children:e.jsxs(x,{placeholder:"Выберите тип организации",children:[e.jsx(c,{value:"GENERAL_EDUCATION",children:"Общеобразовательная (школа, гимназия, лицей)"}),e.jsx(c,{value:"PROFESSIONAL",children:"Профессиональная (колледж, техникум)"})]})}),e.jsxs(o,{gutter:16,children:[e.jsx(l,{xs:24,md:12,children:e.jsx(r.Item,{name:"institutionShortName",label:"Сокращённое название",rules:[{required:!0,message:"Введите сокращённое название"},{max:255,message:"Максимум 255 символов"}],children:e.jsx(i,{prefix:e.jsx(O,{}),placeholder:'МБОУ "Лицей № 20"'})})}),e.jsx(l,{xs:24,md:12,children:e.jsx(r.Item,{name:"directorFullName",label:"ФИО директора (полностью)",rules:[{required:!0,message:"Введите ФИО директора"}],children:e.jsx(i,{placeholder:"Петров Пётр Петрович"})})})]}),e.jsx(r.Item,{name:"institutionFullName",label:"Полное название организации",rules:[{required:!0,message:"Введите полное название"}],children:e.jsx(i.TextArea,{rows:2,placeholder:'Муниципальное бюджетное общеобразовательное учреждение "Лицей № 20" г. Казань'})}),e.jsx(m,{title:"Учётные данные"}),e.jsx(r.Item,{name:"email",label:"Электронная почта (логин)",validateTrigger:"onChange",rules:[{required:!0,message:"Введите электронную почту"},{type:"email",message:"Проверьте адрес: он должен быть вида [email protected]"},{validator:(s,t)=>{var N;const a=(N=t==null?void 0:t.trim().split("@").pop())==null?void 0:N.toLowerCase();return a&&w.has(a)?Promise.reject(new Error("Регистрация с адресов зарубежных почтовых сервисов недоступна в связи с требованиями 406-ФЗ. Укажите Яндекс.Почту, Mail.ru или рабочую почту учреждения")):Promise.resolve()}}],children:e.jsx(i,{prefix:e.jsx(_,{}),placeholder:"[email protected]"})}),e.jsxs(o,{gutter:16,children:[e.jsx(l,{xs:24,md:12,children:e.jsx(r.Item,{name:"password",label:"Пароль",rules:[{required:!0,message:"Введите пароль"},{min:5,message:"Минимум 5 символов"}
1,{pattern:/^(?=.*[A-Za-zА-Яа-яЁё])(?=.*\d).+$/,message:"Должен содержать буквы и цифры"}],children:e.jsx(f,{placeholder:"Пароль"})})}),e.jsx(l,{xs:24,md:12,children:e.jsx(r.Item,{name:"confirmPassword",label:"Повторите пароль",dependencies:["password"],rules:[{required:!0,message:"Подтвердите пароль"},({getFieldValue:s})=>({validator(t,a){return!a||s("password")===a?Promise.resolve():Promise.reject(new Error("Пароли не совпадают"))}})],children:e.jsx(f,{placeholder:"Повторите пароль"})})})]}),e.jsx(m,{title:"Согласия"}),e.jsx(r.Item,{className:"registration-consent-item registration-consent-required",name:"personalDataConsent",valuePropName:"checked",style:{marginBottom:8},rules:[{validator:(s,t)=>t?Promise.resolve():Promise.reject(new Error("Отметьте согласие на обработку персональных данных — без него зарегистрироваться нельзя"))}],children:e.jsxs(h,{className:"consent-checkbox",children:["Даю"," ",e.jsx(u,{to:d.consent.path,children:"согласие на обработку моих персональных данных"})," ","на условиях"," ",e.jsx(u,{to:d.privacy.path,children:"Политики обработки персональных данных"})]})}),e.jsx(r.Item,{className:"registration-consent-item registration-consent-required",name:"siteRulesConsent",valuePropName:"checked",style:{marginBottom:8},rules:[{validator:(s,t)=>t?Promise.resolve():Promise.reject(new Error("Отметьте согласие с Пользовательским соглашением — без него зарегистрироваться нельзя"))}],children:e.jsxs(h,{className:"consent-checkbox",children:["Принимаю"," ",e.jsx(u,{to:d.terms.path,children:"Пользовательское соглашение"}),", в том числе обязанность получать согласия родителей (законных представителей) учеников и самих педагогов, которых я вношу на платформу"]})}),e.jsx(r.Item,{className:"registration-consent-item",name:"newsletterSubscription",valuePropName:"checked",children:e.jsxs(h,{className:"consent-checkbox",children:["Соглашаюсь получать информационные сообщения, полезные материалы и предложения от ",e.jsx(G,{})," на условиях"," ",e.jsx(u,{to:K,children:"согласия на рассылку"})]})}),e.jsx(V,{message:"После регистрации вам будет отправлено письмо для подтверждения email",type:"info",showIcon:!0,style:{marginBottom:24}}),e.jsx(r.Item,{children:e.jsx(B,{type:"primary",htmlType:"submit",loading:P,block:!0,size:"large",children:"Зарегистрироваться"})}),e.jsxs($,{style:{width:"100%",justifyContent:"center"},children:[e.jsx(te,{children:"Уже есть аккаунт?"}),e.jsx(H,{to:"/login",children:"Войти"})]})]})})]})};export{ce as default};

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.