PageSourceSearch

https://app.mykeylive.com/assets/KeychainSignUp-GAAUmOhQ.js

js mykeylive.com collected 2026-10-04 11:16:04 UTC 8,430 bytes, 1 lines download raw bytes

1import{u as Y,z as W,a4 as q,j as a,ad as j,aO as p,B as z,i as E,g as U,cX as G,I as $,cY as Z,cZ as Q,c_ as V,c$ as J,ag as X,d0 as S,d1 as M,N as B,r as o,d2 as ee,W as H,b2 as ae,a as ie,b as ne,O as te,ac as re}from"./index-ujPEiNXP.js";import{F as se,a as oe,E as ce}from"./formik.esm-CIARZCFs.js";import{O as le,S as he}from"./array-C1htNE8-.js";import{A as ue,a as de}from"./index-BsWC6j6w.js";import{k as ge,C as me}from"./CustomDomainDropdown-CIa8ruCu.js";import{E as ye}from"./ErrorComp-DK4Khedb.js";import{u as pe}from"./useMutation-DygFU-1C.js";import{L as fe}from"./Loading-BVL7w481.js";import"./toPath-yUCUBQAV.js";import"./_baseIteratee-qSONHmnL.js";import"./emotion-react.browser.esm-BzxqBWJO.js";const Le="ManageKeychianProfileURL-module_urlInput_hJzWo",Re="ManageKeychianProfileURL-module_placeholder_wWCfL",Ue="ManageKeychianProfileURL-module_inputLength_zZlOn",Se="ManageKeychianProfileURL-module_registerEnabled_oIvoN",ke="ManageKeychianProfileURL-module_registerDisabled_RXpst",Pe="ManageKeychianProfileURL-module_container_YY7MP",Ce="ManageKeychianProfileURL-module_form_p1--5",_e="ManageKeychianProfileURL-module_inputContainer_NGijG",Ie="ManageKeychianProfileURL-module_pageContainer_pHqW4",Ee="ManageKeychianProfileURL-module_submitContainer_34n0z",De="ManageKeychianProfileURL-module_submitWrapper_CbvkQ",Ne="ManageKeychianProfileURL-module_error_j5D4Q",Ke="ManageKeychianProfileURL-module_inputInfoContainer_xbOnm",ve="ManageKeychianProfileURL-module_errorMessage_cWa7Y",xe="ManageKeychianProfileURL-module_loadingSmall_KMaDN",Te="ManageKeychianProfileURL-module_loadingWrapper_0tJj0",n={urlInput:Le,placeholder:Re,inputLength:Ue,registerEnabled:Se,registerDisabled:ke,container:Pe,form:Ce,inputContainer:_e,pageContainer:Ie,submitContainer:Ee,submitWrapper:De,error:Ne,inputInfoContainer:Ke,errorMessage:ve,loadingSmall:xe,loadingWrapper:Te},be=({values:c,isCheckingAvailability:e,URLParam:s,redirectToEditor:k,...r})=>{const{t:y}=B(),[f,l]=o.useState(ge),i=new RegExp(/[^a-zA-Z0-9 ]/g),P=new RegExp(/\s+/g),[h,C]=o.useState(M),t=document.getElementById(ee);o.useEffect(()=>{if(s!==""&&s){let d;i.test(s)||P.test(s)?(d=s.replace(/[^a-zA-Z0-9 ]/g,"").replace(/\s+/g,""),r.setFieldValue("keychainProfileURL",d)):r.setFieldValue("keychainProfileURL",s),t&&(t==null||t.click())}},[t]),o.useEffect(()=>{r.setFieldValue("keychainProfileURLDomain",f.DomainURL)},[f]),o.useEffect(()=>{C(M-c.keychainProfileURL.length)},[c.keychainProfileURL.length]);const u=r.dirty&&r.isValid&&!r.isSubmitting;return a.jsx("div",{className:n.container,children:a.jsx(oe,{autoComplete:"off",className:n.form,children:a.jsxs("div",{className:n.pageContainer,children:[a.jsx(me,{selectedDomain:f,setSelectedDomain:l}),a.jsxs("div",{className:n.inputContainer,children:[a.jsx("div",{className:n.placeholder,children:`${f.DomainURL}/`}),a.jsx("input",{className:n.urlInput,type:"text",id:"keychain-profileURL",spellCheck:!1,name:"keychainProfileURL",placeholder:y("keychain.signup.keychain-url-placeholder-two"),onBlur:r.handleBlur,onChange:d=>{r.setFieldValue("keychainProfileURL",d.target.value.replace(/[^a-zA-Z0-9 ]/g,"").replace(/\s+/g,""))},value:c.keychainProfileURL})]}),a.jsxs("div",{className:n.inputInfoContainer,children:[!r.isValid&&a.jsx(ce,{className:n.errorMessage,render:d=>a.jsx(ye,{children:d}),name:"keychainProfileURL"}),a.jsx("div",{className:H(n.inputLength,h<0&&n.error),children:y("manage-event.characters-max",{max:h})})]}),a.jsx("button",{id:"submit-button",className:H(n.submitContainer,u&&n.registerEnabled,!u&&n.registerDisabled),disabled:!u,onClick:()=>r.handleSubmit(),children:a.jsx("div",{className:n.submitWrapper,children:a.jsx("div",{className:n.registerEnabled,children:e===p.IN_PROGRESS?a.jsx("div",{className:n.loadingWrapper,children:a.jsx(ae,{size:19,className:n.loadingSmall})}):y("keychain.content-registration.submit")})})})]})})})},Ae=c=>{const e=Y(),s=W(),{mutateAsync:k}=pe(q.talents.resyncKeychainSearch.mutationOptions()),{isSignedIn:r,shouldCreateKeychainPage:y,setSignUpStep:f,setIsCheckingAvailability:l,setKeychainProfileURL:i,setKeychainCustomURL:P,URLParam:h,setURLParam:C,talentID:t,currentUserName:u,orgID:d,userID:_,isTalent:N,redirectToEditor:K}=c,v={keychainProfileURL:"",keychainProfileURLDomain:j};return a.jsx("div",{children:a.jsx(se,{initialValues:v,validateOnMount:!1,validationSchema:()=>le().shape({keychainProfileURL:he().max(M,E.t("yup-schema-messages.max-characters")).trim().required(E.t("yup-schema-messages.required"))}),onSubmit:(g,{setSubmitting:L,setFieldError:O})=>{const x=new RegExp(/[^a-zA-Z0-9 ]/g),w=new RegExp(/\s+/g);l(p.NOT_STARTED);const T=[{Section:"Social",Rank:1},{Section:"Affiliate",Rank:2},{Section:"Shopping",Rank:3},{Section:"Web",Rank:4},{Section:"Embed",Rank:5}];(async()=>
1{if(h&&(x.test(h)||w.test(h)))z(E.t("keychain.signup.keychain-url-invalid"),"error"),C(""),L(!1);else{l(p.IN_PROGRESS);try{const b=await(e==null?void 0:e.query({query:U(G),fetchPolicy:"no-cache",variables:{KeychainProfileURL:g.keychainProfileURL,KeychainCustomURL:j}})),{data:R}=b||{};if(R!=null&&R.getIsKeychainProfileURLValid)O("keychainProfileURL",E.t("keychain.signup.keychain-url-not-available")),L(!1),l(p.FAILED);else if(i(g.keychainProfileURL),P(g.keychainProfileURLDomain),r&&y){await(e==null?void 0:e.mutate({mutation:U(Z),variables:{profileURL:g.keychainProfileURL,domainURL:g.keychainProfileURLDomain,displayName:u,isTrialUser:!1,subscriptionID:null,TalentID:t,Env:$()}})),t&&await k({talentID:t}),await(e==null?void 0:e.refetchQueries({include:[U(Q)]}));let A=null;try{const m=await(e==null?void 0:e.query({query:U(V),fetchPolicy:"network-only",variables:{TalentID:t||0}})),{data:I,error:F}=m||{};F&&console.log("error",F),A=(I==null?void 0:I.getKeychainTalentID)||0}catch(m){console.log("err",m)}A&&T.map(async m=>{try{await(e==null?void 0:e.mutate({mutation:U(J),variables:{KeychainTalentID:A||0,Section:(m==null?void 0:m.Section)||"",Rank:(m==null?void 0:m.Rank)||0}}))}catch(I){console.error("GetIndustryPrimaryAnswersQuery",{data:R,err:I})}}),_&&t&&await(e==null?void 0:e.mutate({mutation:U(X),variables:{OrganizationID:d,UserID:_,TalentID:t,ActivityName:de.KEYCHAIN_CREATED,ActivityDetail:g.keychainProfileURL,ActivitySubDetail:u,Category:ue.Keychain}})),l(p.SUCCESSFUL),s(K?`/talent/${t}/keychain-editor`:N?"/keychain/gateway":`/talent/${t}/keychain/gateway`)}else l(p.FAILED),setTimeout(()=>{L(!1),f(S.ACCOUNT_PAGE)},2e3)}catch{l(p.FAILED),z(E.t("keychain.signup.error-submitting"),"error"),L(!1)}}})()},children:g=>a.jsx(be,{...c,...g})})})},je="KeychainSignUp-module_keychainSignUpHeader_pEpmF",Me="KeychainSignUp-module_keychainHeaderBold_WU-Mz",Oe="KeychainSignUp-module_container_zdOay",we="KeychainSignUp-module_divider_NPz5Q",D={keychainSignUpHeader:je,keychainHeaderBold:Me,container:Oe,divider:we},Ve=({keychainTalentID:c})=>{W();const{t:e}=B(),s=ie(),k=new URLSearchParams(s.search),r=k.get("keychainProfileURL")||null,y=s.state,f=y==null?void 0:y.redirectToEditor,{isSignedIn:l,dbUser:i}=ne(),P=te(),{talentData:h,loading:C}=re(),t=h?`${h.UserFirstName} ${h.UserLastName}`:i==null?void 0:i.UserFirstName.concat(" ",i.UserLastName),[u,d]=o.useState(r||c?S.ACCOUNT_PAGE:S.URL_SELECTION),[_,N]=o.useState(p.NOT_STARTED),[K,v]=o.useState(p.NOT_STARTED),[g,L]=o.useState(k.get("url")),[O,x]=o.useState(""),[w,T]=o.useState(j);o.useEffect(()=>{document.title="Create Your Key Link URL | Key"},[]);const b=()=>c?e("keychain.signup.subscription-header"):u===S.URL_SELECTION?e("keychain.signup.link-header"):e("keychain.signup.account-header"),R=()=>c?e("keychain.signup.subscription-subheader"):u===S.URL_SELECTION?e("keychain.signup.link-subheader"):e("keychain.signup.account-subheader");return C?a.jsx(fe,{}):a.jsxs("div",{className:D.container,children:[a.jsxs("div",{className:D.keychainSignUpHeader,children:[a.jsx("div",{children:b()}),a.jsx("div",{className:D.keychainHeaderBold,children:R()}),a.jsx("div",{className:D.divider})]}),u===S.URL_SELECTION&&a.jsx(Ae,{URLParam:g,setURLParam:L,isCheckingAvailability:_,isSettingUpPage:K,setIsSettingUpPage:v,setIsCheckingAvailability:N,setSignUpStep:d,setKeychainProfileURL:x,setKeychainCustomURL:T,isSignedIn:l,currentUserName:t,talentID:P,userID:i!=null&&i.UserID?i.UserID:null,orgID:i!=null&&i.OrganizationID?i.OrganizationID:null,shouldCreateKeychainPage:!!(i!=null&&i.OrganizationID),isTalent:(i==null?void 0:i.UserIsTalent)||!1,redirectToEditor:f})]})};export{Ve 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.