PageSourceSearch

https://partner.elvari.de/assets/W9FormInput-Cjz3q0Ml.js

js elvari.de collected 2026-10-04 13:26:35 UTC 3,329 bytes, 2 lines download raw bytes

1import{r as i,h as F,p as g,an as k,j as e,cg as y,q as N,ch as C}from"./index-BPR3l8qa.js";import{c as W,s as D,a as S,R as _}from"./RenderW9Form-CxYTiS0s.js";import{RenderW8Form as R}from"./W8BENForm-zLicgHDA.js";function Y(t){return t.name&&t.country&&t.address_1&&t.address_2&&t.tax_identification_number&&t.citizenship_country&&t.signature}function I({value:t,label:h,w9_year:x,onChange:f}){const[s,c]=i.useState(null),[j,o]=F();i.useEffect(()=>{d((t==null?void 0:t.data)||{})},[t==null?void 0:t.data]);const[r,d]=i.useState({}),[p,a]=i.useState(!1),[n,l]=i.useState(null),b=s==="w9"?W(r):Y(r),w=i.useCallback(m=>{m&&(m.preventDefault(),m.stopPropagation()),a(!0),s==="w8"?n?g("/legal/w8/submit",{file_id:n.file_id}).then(()=>{a(!1),f({target:{value:n}}),o()}):(l(null),g("/legal/w8",{data:{...r,w9_year:x,today:k().format("MM-DD-YYYY")}}).then(u=>{a(!1),l(u)})):n?D(n.file_id).then(()=>{a(!1),f({target:{value:n}}),o()}):(l(null),S({...r,w9_year:x}).then(u=>{a(!1),l(u)}))},[r,s,n]);return e.jsx(e.Fragment,{children:e.jsxs("div",{className:"list-group mt-1",children:[e.jsxs("button",{onClick:o,type:"button",className:"d-flex align-items-center justify-content-between list-group-item list-group-item-action",children:[h,t!=null&&t.url?e.jsx("span",{className:"text-success",children:e.jsx(y,{})}):null]}),t!=null&&t.url?e.jsx("div",{className:"text-right",children:e.jsx("a",{href:t.url,target:"_blank",download:!0,children:"Download submitted form"})}):null,e.jsxs(N,{title:h,size:"lg",confirmLoading:p,visible:j,disabled:!b,okText:s?n?"Done":"Submit":void 0,onClose:o,onCancel:s?o:void 0,onSubmit:s?w:void 0,children:[s?e.jsxs("button",{className:"btn p-0 mb-2",onClick:()=>c(null),children:[e.jsx(C,{})," Go back"]}):e.jsx(e.Fragment,{children:e.jsxs("div",{className:"text-center",children:[e.jsx("p",{className:"lead",children:"Are you a US citizen or resident alien? "}),e.jsxs(e.Fragment,{children:[e.jsx("button",{onClick:()=>{c("w9")},className:"btn btn-outline-primary mr-2",children:"Yes"}),e.jsx("button",{onClick:()=>c("w8"),className:"btn btn-outline-danger",children:"NO"})]})]})}),s==="w9"?e.jsxs(e.Fragment,{children:[n?e.jsxs(e.Fragment,{children:[e.jsxs("p",{children:["Download and review your completed W-9 Form. Click Done to send the form to us. If you want change the content, ",e.jsx("span",{className:"text-primary pointer-cursor",onClick:()=>l(null),children:"click here"})," to fill it again"]}),e.jsx("p",{children:e.jsx("a",{href:n.url,target:"_blank",download:!0,children:"Download W-9 Form"})})]}):e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"lead",children:"W9 form"}),e.jsx(_,{value:r,onChange:d})]}),"              "]}):null,s==="w8"?e.jsx(e.Fragment,{children:n?e.jsxs(e.Fragment,{children:[e.jsxs("p",{children:["Download and review your completed W-8 Form. Click Done to send the form to us. If you want change the content, ",e.jsx("span",{className:"text-primary pointer-cursor",onClick:()=>l(null),children:"click here"})," to fill it again"]}),e.jsx("p",{children:e.jsx("a",{href:n.url,target:"_blank",download:!0,children:"Download W-8 Form"})})]}):e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"lead text-decoration-underline",children:"W8 form"}),e.jsx(R,{value:r,onChange:d})]})}):null]})]})})}export{I as default};
2//# sourceMappingURL=W9FormInput-Cjz3q0Ml.js.map

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.