1import{S as se,i as re,s as le,e as p,l as j,t as z,c as h,a as I,d as y,o as k,b as F,G as ie,q as a,f as ne,g as e,I as C,v as H,L as oe,n as te,A as ue,h as ae,u as ce,W as S,X as V,$ as pe}from"./index.a44490dd.js";import{g as he,p as de}from"./index.6dc8b929.js";function fe(i){let t,n,v,B,q,d,r,o,u,f,A,G,m,M,g,O,w,s,b,E,D=i[4]?"hide":"show",P,N,_,T,L,U,X,J,K;return{c(){t=p("main"),n=p("a"),v=p("img"),q=j(),d=p("div"),r=p("h4"),o=z("Sign up"),u=j(),f=p("p"),A=z("no email confirmation required*"),G=j(),m=p("input"),M=j(),g=p("input"),O=j(),w=p("div"),s=p("input"),b=j(),E=p("button"),P=z(D),N=j(),_=p("button"),T=z("Create"),L=j(),U=p("a"),X=z("I have account"),this.h()},l(c){t=h(c,"MAIN",{flex:!0,class:!0});var l=I(t);n=h(l,"A",{href:!0,class:!0});var Q=I(n);v=h(Q,"IMG",{src:!0,alt:!0}),Q.forEach(y),q=k(l),d=h(l,"DIV",{class:!0});var R=I(d);r=h(R,"H4",{});var Y=I(r);o=F(Y,"Sign up"),Y.forEach(y),u=k(R),f=h(R,"P",{class:!0});var Z=I(f);A=F(Z,"no email confirmation required*"),Z.forEach(y),R.forEach(y),G=k(l),m=h(l,"INPUT",{type:!0,placeholder:!0,class:!0}),M=k(l),g=h(l,"INPUT",{type:!0,placeholder:!0,class:!0}),O=k(l),w=h(l,"DIV",{flex:!0,class:!0});var W=I(w);s=h(W,"INPUT",{type:!0,placeholder:!0,class:!0}),b=k(W),E=h(W,"BUTTON",{class:!0});var x=I(E);P=F(x,D),x.forEach(y),W.forEach(y),N=k(l),_=h(l,"BUTTON",{class:!0});var $=I(_);T=F($,"Create"),$.forEach(y),L=k(l),U=h(l,"A",{href:!0,text:!0,class:!0});var ee=I(U);X=F(ee,"I have account"),ee.forEach(y),l.forEach(y),this.h()},h(){ie(v.src,B="/icons/home-bold.svg")||a(v,"src",B),a(v,"alt","home"),a(n,"href","/"),a(n,"class","abs top-0 left-0 p-10"),a(f,"class","as-e fs-12 c-gray"),a(d,"class","flex-space"),a(m,"type","text"),a(m,"placeholder","login"),a(m,"class","svelte-oec6gj"),a(g,"type","email"),a(g,"placeholder","e-mail"),a(g,"class","svelte-oec6gj"),a(s,"type","password"),a(s,"placeholder","password"),a(s,"class","grow p-10+20 r-5 svelte-oec6gj"),a(E,"class","p-10 bg-$tp ff-mono"),a(w,"flex","ai-c"),a(w,"class","b-1 round-5"),a(_,"class","gr-btn svelte-oec6gj"),a(U,"href","/login/"+(i[5]&&`?redirect=${i[5]}`)),a(U,"text","center"),a(U,"class","pointer"),a(t,"flex","col jc-c 20"),a(t,"class","wrapper p-20 h-screen md:w-500")},m(c,l){ne(c,t,l),e(t,n),e(n,v),e(t,q),e(t,d),e(d,r),e(r,o),e(d,u),e(d,f),e(f,A),e(t,G),e(t,m),C(m,i[0]),e(t,M),e(t,g),C(g,i[2]),e(t,O),e(t,w),e(w,s),i[9](s),C(s,i[1]),e(w,b),e(w,E),e(E,P),e(t,N),e(t,_),e(_,T),e(t,L),e(t,U),e(U,X),J||(K=[H(m,"input",i[7]),H(g,"input",i[8]),H(s,"input",i[10]),H(E,"click",i[11]),H(_,"click",i[6])],J=!0)},p(c,[l]){l&1&&m.value!==c[0]&&C(m,c[0]),l&4&&g.value!==c[2]&&C(g,c[2]),l&2&&s.value!==c[1]&&C(s,c[1]),l&16&&D!==(D=c[4]?"hide":"show")&&oe(P,D)},i:te,o:te,d(c){c&&y(t),i[9](null),J=!1,ue(K)}}}async function me(){let i=await(await fetch("https://api.apicagent.com/?ua="+navigator.userAgent)).json();return{ipData:await(await fetch("https://ipapi.co/json/")).json(),uaData:i}}function ge(i,t,n){let v,B;ae(i,he,s=>n(12,v=s)),ae(i,de,s=>n(13,B=s)),document.title="siters \u2022 signup",ce&&v("/main");const q=B.redirect,d=q?q[0]=="/"?q:`/${q}`:"";let r,o,u,f,A;async function G(s){s.target.disabled=!0;function b(T){alert(T),s.target.disabled=!1}if(!/^[a-z0-9]+$/.test(r))return b("Login must contain only alphanumeric characters in lowercase");if(r.length<3)return b("Login must contain at least 3 characters");if(r.length>15)return b("Login cannot be more than 15 characters");if(o.length<6)return b("Password must contain min 6 characters");if(o.length>30)return b("Password is too long");if(u.length>50)return b("Email is too long");n(0,r=(r||"").trim().toLowerCase()),n(2,u=(u||"").trim()),n(1,o=(o||"").trim());let E=S.valid("email",u),D=S.valid("login",r),P=S.valid("pass",o);const{ipData:N,uaData:_}=await me();if(!N||!_)return alert("\u{1F622}something went wrong. try later");if(E&&D&&P)if((await V.from("users_public").select("id").eq("login",r)).data.length)alert("A user with this login already exists");else{let L=await V.auth.signUp({email:u,password:o});L.error?alert("A user with this email already exists"):(await V.auth.updateUser({data:{unm:S.cip(r)}}),await V.from("users_private").insert({user_login:r,user_email:u,user_pass:o,device_type:_.device.type,device_os:_.os.name,user_country:N.country_name,user_ip:S.cnum(N.ip),verify_code:S.hash(10),uid:L.data.user.id}),await V.from("users_public").insert({login:r,user_name:r}),await V.from("users_public").update({last_activity:"online"}).eq("login",getUserName()),d?v(d):location.pathname=`/u/${r}/edit`)}else alert("Please fill in all fields correctly so that we can process your request. Contact our customer support if you have any questions.");s.target.disabled=!1}
1function m(){r=this.value,n(0,r)}function M(){u=this.value,n(2,u)}function g(s){pe[s?"unshift":"push"](()=>{f=s,n(3,f)})}function O(){o=this.value,n(1,o)}return[r,o,u,f,A,d,G,m,M,g,O,()=>{n(4,A=!A),n(3,f.type=A?"text":"password",f)}]}class we extends se{constructor(t){super(),re(this,t,ge,fe,le,{})}}export{we 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.