PageSourceSearch

https://thepaypers.com/_nuxt/hl6EbVDz.js

js thepaypers.com collected 2026-09-24 08:28:25 UTC 6,239 bytes, 15 lines download raw bytes

1import{_ as A}from"./CntMTLcG.js";import{_ as B}from"./BJlMqvan.js";import{_ as N}from"./fZgLquya.js";import{z as s,_ as F,a as D}from"./Dpdp0QYK.js";import{u as E,_ as J}from"./BtLVrN7B.js";import{_ as R}from"./5TdI7TNq.js";import{e as G,f as M,g as b,h as O,r as H,i as h,j as I,k as L,c as u,o as m,b as n,a as _,w as i,l as Y,m as K,n as o,t as x,d as Q,p as C,F as V}from"./Bcs_NwEm.js";import"./DlAUqK2U.js";import"./Dla3y5is.js";import"./CYMf82zc.js";import"./Db8xi0CW.js";import"./B9GYCAbm.js";const W={class:"flex flex-col gap-4 my-8"},X={class:"flex flex-col gap-4 bg-accent rounded p-6"},Z={class:"grid grid-cols-1 md:grid-cols-2 gap-4"},ee={key:0,class:"block truncate"},te={key:1,class:"text-secondary/50"},oe={key:0,class:"block truncate"},ae={key:1,class:"text-secondary/50"},ne={class:"grid grid-cols-1 md:grid-cols-2 gap-4"},re={class:"flex flex-row flex-wrap gap-2"},be=G({__name:"claim",async setup(se){let d,g;const q=s.object({country:s.object({id:s.string({required_error:"Country selection is required"}).min(1,"Please select your country"),name:s.string({required_error:"Country name is required"}).trim().min(3,"Country name must be at least 3 characters")},{required_error:"Please select your country"}),job_title:s.string({required_error:"Job title is required"}).trim().min(3,"Job title must be at least 3 characters"),company:s.string({required_error:"Company name is required"}).trim().min(3,"Company name must be at least 3 characters"),company_type:s.object({id:s.string({required_error:"Company Type selection is required"}).trim().min(1,"Please select your company type"),name:s.string({required_error:"Company type name is required"}).trim().min(3,"Company type name must be at least 3 characters")},{required_error:"Please select your company type"}),password:s.string().min(8,"Password must be at least 8 characters long"),password_confirmation:s.string()}).refine(a=>a.country.name.length!=0,{message:"A country is required.",path:["country"]}).refine(a=>a.password==a.password_confirmation,{message:"Passwords do not match. Please check and try again.",path:["password_confirmation"]}),f=M(),{$directus:k}=b(),{login:j}=O(),p=H(null),t=h({country:{id:"",name:""},job_title:"",company:"",company_type:{id:"",name:""},password:"",password_confirmation:""}),c=h({submission:!1,countries:!1}),{data:S}=([d,g]=I(async()=>E("register-company-types",async()=>{const{$directus:a}=b();try{return(await a.query(`
2      query RegisterCompanyTypes {
3        company_types {
4          id
5          name
6        }
7      }
8    `)).company_types}catch(e){return console.error("failed to fetch company types:",e),{company_types:[]}}})),d=await d,g(),d),U=async a=>{if(!a.trim().length)return[];try{c.countries=!0;const{countries:e}=await k.query(`
9        query GetCountries($search: String!) {
10          countries(filter: { name: { _icontains: $search } }, sort: ["name"], limit: 10) {
11            id
12            name
13          }
14        }
15      `,{search:a.trim()});return e}finally{c.countries=!1}},v=async()=>{c.submission=!0,p.value=null;try{const a=await $fetch("/api/auth/claim-account",{method:"POST",body:{token:f.query.token,domainSlug:f.query.domainSlug,country:t.country,job_title:t.job_title,company:t.company,company_type:t.company_type,password:t.password}});a.user&&(await j({email:a.user?.email.trim().toLowerCase(),password:t.password}),await C("/welcome"))}catch(a){p.value=a instanceof V?a.data?.message:"an unexpected error occurred"}finally{c.submission=!1}};return L(()=>f.query.token,async a=>{if(!a?.toString()?.trim()?.length)await C({path:"/"});else try{const e=await $fetch("/api/auth/claimer",{method:"POST",body:{token:a}});e.user&&(t.country.name=e.user.country??"",t.country.id=e.user.country_id??"",t.job_title=e.user.job_title,t.company=e.user.company,t.company_type.name=e.user.company_type??"",t.company_type.id=e.user.company_type_id??"")}catch(e){p.value=e instanceof V?e.data?.message:"an unexpected error occurred"}},{immediate:!0}),(a,e)=>{const P=A,T=B,w=N,l=F,y=J,$=R,z=D;return m(),u("div",W,[n(P,{title:"Claim Your Personal Space"}),_("div",X,[n(z,{schema:o(q),state:o(t),class:"flex flex-col gap-4",onSubmit:v},{default:i(()=>[o(p)?(m(),Y(T,{key:0,color:"red",variant:"subtle",description:o(p)},null,8,["description"])):K("",!0),_("div",Z,[n(l,{name:"country"},{default:i(()=>[n(w,{modelValue:o(t).country,"onUpdate:modelValue":e[0]||(e[0]=r=>o(t).country=r),loading:o(c).countries,searchable:U,placeholder:"Country","option-attribute":"name",trailing:"",size:"lg"},{label:i(()=>[o(t).country?.name?.length>0?(m(),u("span",ee,x(o(t).country.name),1)):(m(),u("span",te,"Country"))]),_:1},8,["modelValue","loading"])]),_:1}),n(l,{name:"job_title"},{default:i(()=>[n(y,{modelValue:o(t).job_title,"onUpdate:modelValue":e[1]||(e[1]=r=>o(t).job_title=r),placeholder:"Job Title",type:"text",size:"lg"},null,8,["modelValue"])]),_:1}),n(l,{name:"company"},{default:i(()=>[n(y,{modelValue:o(t).company,"onUpdate:modelValue":e[2]||(e[2]=r=>o(t).company=r),placeholder:"Company",type:"text",size:"lg"},null,8,["modelValue"])]),_:1}),n(l,{name:"company_type"},{default:i(()=>[n(w,{modelValue:o(t).company_type,"onUpdate:modelValue":e[3]||(e[3]=r=>o(t).company_type=r),options:o(S),placeholder:"Company Type","option-attribute":"name",trailing:"",size:"lg"},{label:i(()=>[o(t).company_type?.name?.length>0?(m(),u("span",oe,x(o(t).company_type.name),1)):(m(),u("span",ae,"Company Type"))]),_:1},8,["modelValue","options"])]),_:1})]),_("div",ne,[n(l,{name:"password"},{default:i(()=>[n(y,{modelValue:o(t).password,"onUpdate:modelValue":e[4]||(e[4]=r=>o(t).password=r),placeholder:"Set password",type:"password",size:"lg"},null,8,["modelValue"])]),_:1}),n(l,{name:"password_confirmation"},{default:i(()=>[n(y,{modelValue:o(t).password_confirmation,"onUpdate:modelValue":e[5]||(e[5]=r=>o(t).password_confirmation=r),placeholder:"Repeat password",type:"password",size:"lg"},null,8,["modelValue"])]),_:1})]),_("div",re,[n($,{type:"submit",class:"bg-main text-secondary px-8 py-2 rounded-full font-medium tracking-wider up
15percase",loading:o(c).submission},{default:i(()=>e[6]||(e[6]=[Q(" claim ",-1)])),_:1,__:[6]},8,["loading"])])]),_:1},8,["schema","state"])])])}}});export{be 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.