1import{k as me,l as le}from"./chunk-KJUD54TR.js";import{b as fe}from"./chunk-S46OKC2S.js";import"./chunk-4D2J2JE5.js";import"./chunk-GXXRNSBZ.js";import{Sa as ne,cb as ae,e as Y,i as Z}from"./chunk-UOCVC65W.js";import{B as ee,F as te,G as re,Q as oe,R as ie,o as $,q as c,t as W,u as J,w as X,z as u}from"./chunk-LOEMP4YU.js";import"./chunk-JNGJABXR.js";import"./chunk-GLQ2GEPF.js";import"./chunk-ADGZKV2X.js";import"./chunk-P4S4MVU6.js";import{h as Q}from"./chunk-LC35BJX7.js";import{a as z}from"./chunk-H7FJWLCW.js";import{W as q,ga as j,ha as H}from"./chunk-VMOL7TFU.js";import{Ec as S,Ed as K,Fd as O,Ga as v,Ha as A,Ia as C,Ja as w,K as k,Kd as F,Lc as L,Ma as T,Nc as y,P as V,Qb as G,R as D,Rc as N,Sc as _,Tc as h,V as B,Wb as b,ad as a,ee as P,h as M,sa as U,uc as l,vc as o,wc as r,wd as E,xa as f,xc as s,zb as p}from"./chunk-YO2RX74J.js";import"./chunk-CJN3JB5D.js";var x="lfid";var ce=(()=>{class e{constructor(){this.http=f(Q),this.env=f(fe),this.rootPath=this.env.exchangeApiUrl()}sendWalletIdForWhitelist(t){return this.http.post(this.rootPath+"/legionfarm/user-info",t)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=U({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var de=["formView"],ge=["submitSuccess"],_e=["submitError"],he=["submitAlready"],R=e=>({"lf-form__item-field-error":e});function Fe(e,g){}function Ue(e,g){e&1&&b(0,Fe,0,0,"ng-template")}function Ce(e,g){if(e&1){let t=S();o(0,"form",7)(1,"label",8)(2,"div",9),a(3,"Twitch nickname"),r(),s(4,"input",10),r(),o(5,"label",8)(6,"div",9),a(7,"Your email"),r(),s(8,"input",11),r(),o(9,"label",8)(10,"div",9),a(11,"Your phone"),r(),s(12,"input",12),r(),o(13,"div",13),a(14,"Required for AirDrop NFT"),r(),o(15,"div",8)(16,"div",9),a(17,"You ETH wallet"),r(),s(18,"input",14),o(19,"div",15),a(20,"*fill in if you want to participate in LF NFT airdrop"),r()(),o(21,"button",16),K(22,"async"),L("click",function(){v(t);let n=y();return A(n.send())}),a(23," Continue "),r()()}if(e&2){let t=y();l("formGroup",t.formGroup),p(4),l("ngClass",E(11,R,t.formGroup.get("twitch_login").touched&&t.formGroup.get("twitch_login").hasError("required")))("placeholder","Enter your twitch nickname"),p(4),l("ngClass",E(13,R,t.formGroup.get("email").touched&&t.formGroup.get("email").hasError("required")||t.formGroup.get("email").hasError("email")))("placeholder","Enter your email"),p(4),l("ngClass",E(15,R,t.formGroup.get("phone_number").touched&&t.formGroup.get("phone_number").hasError("required")||t.formGroup.get("phone_number").hasError("pattern")))("placeholder","Enter your phone number"),p(6),l("placeholder","Enter your ETH wallet"),p(3),l("disabled",O(22,9,t.sendBtnClicked$))}}function we(e,g){e&1&&(o(0,"div",17)(1,"div",18),C(),o(2,"svg",19),s(3,"rect",20)(4,"path",21),r()(),w(),o(5,"div",22),a(6,"Submission successfull! You will be hearing from us soon."),r()())}function be(e,g){e&1&&(o(0,"div",17)(1,"div",18),C(),o(2,"svg",19),s(3,"rect",20)(4,"path",21),r()(),w(),o(5,"div",22),a(6,"Such application form has already been recorded. Thank you!"),r()())}function ye(e,g){if(e&1){let t=S();o(0,"div",17)(1,"div",18),C(),o(2,"svg",19),s(3,"rect",20)(4,"path",23)(5,"path",24),r()(),w(),o(6,"div",22),a(7,"Oops, something went wrong... Please try again later"),r(),o(8,"button",25),L("click",function(){v(t);let n=y();return A(n.backToForm())}),a(9," Back "),r()()}}var Ee=/[^+\d]/g,xe=10,d=(function(e){return e.FormView="formView",e.SubmitSuccess="SubmitSuccess",e.SubmitError="SubmitError",e.SubmitAlready="SubmitAlready",e})(d||{}),pe=(()=>{class e{constructor(){this.legionFarmFormService=f(ce),this.route=f(Y),this.cdr=f(P),this.destroyRef=f(T),this.isMetamaskSupported=!1,this.currentViewType=d.FormView,this.formGroup=new X({twitch_login:new u("",c.required),email:new u("",[c.required,c.email]),phone_number:new u("",[c.required,c.pattern(/[+0-9]{9,14}$/)]),ethereum_address:new u(""),legion_farm_token:new u("",[c.required]),legion_farm_id:new u("",[c.required])}),this.sendBtnClicked$=new M(!1)}ngOnInit(){this.setLegionFarmUserData(),this.phone_numberInputNotDigitalCutter()}setLegionFarmUserData(){this.formGroup.get("legion_farm_token").setValue(this.route.
1snapshot.queryParams["lft"]),this.formGroup.get("legion_farm_id").setValue(this.route.snapshot.queryParams[x])}phone_numberInputNotDigitalCutter(){this.formGroup.get("phone_number").valueChanges.pipe(V(xe),B(),k(ae),z(this.destroyRef)).subscribe(t=>{let i=t.replace(Ee,"");this.formGroup.get("phone_number").setValue(i)})}send(){ne(this.formGroup),this.formGroup.valid&&(this.sendBtnClicked$.next(!0),this.legionFarmFormService.sendWalletIdForWhitelist(this.formGroup.value).pipe(D(1)).subscribe(t=>{t.alreadyExists?this.changeFormView(d.SubmitAlready):this.changeFormView(d.SubmitSuccess),this.sendBtnClicked$.next(!1)},()=>{this.changeFormView(d.SubmitError),this.sendBtnClicked$.next(!1)}))}backToForm(){this.changeFormView(d.FormView)}changeFormView(t){this.currentViewType=t,this.cdr.markForCheck()}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=G({type:e,selectors:[["legion-farm-form"]],viewQuery:function(i,n){if(i&1&&N(de,7)(ge,7)(_e,7)(he,7),i&2){let m;_(m=h())&&(n.formView=m.first),_(m=h())&&(n.submitSuccess=m.first),_(m=h())&&(n.submitError=m.first),_(m=h())&&(n.submitAlready=m.first)}},decls:12,vars:1,consts:[["formView",""],["SubmitSuccess",""],["SubmitAlready",""],["SubmitError",""],[1,"lf-frame"],[1,"lf-title"],[4,"ngTemplateOutlet"],[1,"lf-form",3,"formGroup"],[1,"lf-form__item"],[1,"lf-form__item-title"],["type","text","formControlName","twitch_login",1,"lf-form__item-field",3,"ngClass","placeholder"],["type","email","formControlName","email",1,"lf-form__item-field",3,"ngClass","placeholder"],["type","tel","formControlName","phone_number",1,"lf-form__item-field",3,"ngClass","placeholder"],[1,"lf-form__title"],["type","text","formControlName","ethereum_address",1,"lf-form__item-field",3,"placeholder"],[1,"lf-form__item-note"],[1,"lf-form__submit",3,"click","disabled"],[1,"lf-form"],[1,"lf-form__icon"],["width","80","height","80","viewBox","0 0 80 80","fill","none","xmlns","http://www.w3.org/2000/svg"],["opacity","0.4","width","80","height","80","rx","3","fill","#1A1D29"],["d","M54.1935 33.2648L49.0927 28.3871L35.0063 41.8575L29.6169 36.7038L24.5161 41.5816L35.0063 51.6129L54.1935 33.2648Z","fill","#04B17D"],[1,"lf-form__submit-state-text"],["d","M40.9615 32.104C40.9615 30.6346 41.4231 29.4102 42.3462 28.4307C43.2949 27.4769 44.5 27 45.9615 27C47.4231 27 48.6026 27.4769 49.5 28.4307C50.4231 29.4102 50.8846 30.6346 50.8846 32.104C50.8846 33.5733 50.4231 34.7848 49.5 35.7386C48.6026 36.7181 47.4231 37.2079 45.9615 37.2079C44.5 37.2079 43.2949 36.7181 42.3462 35.7386C41.4231 34.7848 40.9615 33.5733 40.9615 32.104ZM29.0769 32.104C29.0769 30.6346 29.5385 29.4102 30.4615 28.4307C31.4103 27.4769 32.6154 27 34.0769 27C35.5385 27 36.7179 27.4769 37.6154 28.4307C38.5385 29.4102 39 30.6346 39 32.104C39 33.5733 38.5385 34.7848 37.6154 35.7386C36.7179 36.7181 35.5385 37.2079 34.0769 37.2079C32.6154 37.2079 31.4103 36.7181 30.4615 35.7386C29.5385 34.7848 29.0769 33.5733 29.0769 32.104Z","fill","#EB5757"],["d","M22 45.6481C24.3077 43.9725 27 42.6966 30.0769 41.8201C33.1795 40.9437 36.4872 40.5055 40 40.5055C43.5128 40.5055 46.8077 40.9437 49.8846 41.8201C52.9872 42.6966 55.6923 43.9725 58 45.6481L58 54C54.9487 52.2729 51.9615 51.0098 49.0385 50.2107C46.141 49.4374 43.1282 49.0507 40 49.0507C36.8718 49.0507 33.8462 49.4374 30.9231 50.2107C28.0256 51.0098 25.0513 52.2729 22 54L22 45.6481Z","fill","#EB5757"],[1,"lf-form__submit",3,"click"]],template:function(i,n){i&1&&(o(0,"div",4)(1,"div",5),a(2,"Drops\u2019 application form"),r(),b(3,Ue,1,0,null,6),r(),b(4,Ce,24,17,"ng-template",null,0,F)(6,we,7,0,"ng-template",null,1,F)(8,be,7,0,"ng-template",null,2,F)(10,ye,10,0,"ng-template",null,3,F)),i&2&&(p(3),l("ngTemplateOutlet",n[n.currentViewType]))},dependencies:[j,oe,ee,$,W,J,ie,re,te,q,H],styles:[`@font-face{font-family:Blinker;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/blinker/v14/cIf9MaFatEE-VTaP9CChYVkH.woff2) format("woff2");unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Blinker;font-style:normal;font-weight:400;font-display:swap;
1src:url(https://fonts.gstatic.com/s/blinker/v14/cIf9MaFatEE-VTaP9C6hYQ.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Inter;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/inter/v20/UcCO3FwrK3iLTeHuS_nVMrMxCp50SjIw2boKoduKmMEVuLyfAZJhiI2B.woff2) format("woff2");unicode-range:U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:Inter;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/inter/v20/UcCO3FwrK3iLTeHuS_nVMrMxCp50SjIw2boKoduKmMEVuLyfAZthiI2B.woff2) format("woff2");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:Inter;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/inter/v20/UcCO3FwrK3iLTeHuS_nVMrMxCp50SjIw2boKoduKmMEVuLyfAZNhiI2B.woff2) format("woff2");unicode-range:U+1F00-1FFF}@font-face{font-family:Inter;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/inter/v20/UcCO3FwrK3iLTeHuS_nVMrMxCp50SjIw2boKoduKmMEVuLyfAZxhiI2B.woff2) format("woff2");unicode-range:U+0370-0377,U+037A-037F,U+0384-038A,U+038C,U+038E-03A1,U+03A3-03FF}@font-face{font-family:Inter;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/inter/v20/UcCO3FwrK3iLTeHuS_nVMrMxCp50SjIw2boKoduKmMEVuLyfAZBhiI2B.woff2) format("woff2");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB}@font-face{font-family:Inter;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/inter/v20/UcCO3FwrK3iLTeHuS_nVMrMxCp50SjIw2boKoduKmMEVuLyfAZFhiI2B.woff2) format("woff2");unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Inter;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/inter/v20/UcCO3FwrK3iLTeHuS_nVMrMxCp50SjIw2boKoduKmMEVuLyfAZ9hiA.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}:root{--scrollbar-track: #1f1f1f;--scrollbar-thumb: #323232}@keyframes pulse{0%{transform:scale(1);opacity:1}to{transform:scale(2);opacity:0}}.lf-frame{line-height:1.3;font-family:Inter,sans-serif;height:100vh;background:#2b2f43;color:#fff;width:100%;padding:32px;box-sizing:border-box;margin:auto}.lf-form{max-width:422px;margin:0 auto}.lf-title{width:90%;margin:0 auto;font-family:Blinker,sans-serif;font-size:36px;font-weight:700;color:#fff}.lf-title+.lf-form{margin-top:40px}.lf-form__title{font-size:17px;text-align:center;margin-top:20px}.lf-form__submit{height:64px;width:100%;background:#2ac9ff;color:#fff;font-family:Inter,sans-serif;font-weight:700;font-size:26px;border-radius:10px;outline:none;border:none;transition:.3s;cursor:pointer}.lf-form__submit:hover,.lf-form__submit:active{background:#6ad9ff}.lf-form__submit:focus{background:#0e5ed7}.lf-form__submit:disabled{background:#fff3;color:#fff3}.lf-form__item{display:block;margin-top:20px}.lf-form__item+.lf-form__title{margin-top:40px}.lf-form__item+.lf-form__submit{margin-top:25px}.lf-form__item-field{height:64px;width:100%;border:1px solid rgba(255,255,255,.4);box-sizing:border-box;border-radius:10px;color:#fff;font-family:Inter,sans-serif;font-size:19px;background:transparent;padding:0 16px;outline:none;transition:.3s}.lf-form__item-field:hover,.lf-form__item-field:active{background:#0006;border-color:#6ad9ff}.lf-form__item-title{font-size:15px;font-weight:600}.lf-form__item-title+.lf-form__item-field{margin-top:8px}.lf-form__item-field-error{background:#eb57570d;border-color:#eb5757}.lf-form__item-button{height:64px;width:100%;border:2px solid #2ac9ff;border-radius:10px;color:#2ac9ff;background:transparent;outline:none;font-size:26px;font-family:Inter,sans-serif;font-weight:700;transition:.3s;
1cursor:pointer}.lf-form__item-button:hover,.lf-form__item-button:active{background:#6ad9ff;border-color:#6ad9ff;color:#fff}.lf-form__item-button:focus{background:#0e5ed7;border-color:#0e5ed7;color:#fff}.lf-form__item-note{margin-top:6px;color:#80838f;font-size:14px}.lf-form__icon{margin-bottom:30px;margin-top:30%;display:flex;justify-content:center}.lf-form__submit-state-text{font-family:Inter,sans-serif;font-style:normal;font-weight:600;font-size:17px;margin:0 auto 30px;max-width:380px;text-align:center} 2`],encapsulation:2,changeDetection:0})}}return e})();var ue=(()=>{class e{constructor(){this.router=f(Z),this.languageService=f(le)}canActivate(t,i){if(t.queryParams&&t.queryParams["lft"]&&t.queryParams[x])return!0;let n=me("/error",this.languageService.currentLanguage);return this.router.parseUrl(n)}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275prov=U({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var rt=[{path:"",component:pe,canActivate:[ue]}];export{rt as legionFarmRegFormRoutes};
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.