PageSourceSearch

https://partners.hswf.co.uk/assets/DisplayContract-D0dJgS71.js

js hswf.co.uk collected 2026-10-02 23:54:40 UTC 2,322 bytes, 2 lines download raw bytes

1import{X as _,r as a,aR as k,a4 as F,d as L,a as R,e as w,p as A,c2 as E,j as e,S as M,M as i,bQ as U,c3 as P,aO as v,z,c4 as I}from"./index-BPR3l8qa.js";function T(){const[s,l]=a.useState({pixelArray:[],dataURL:null}),[o,d]=a.useState(!1),[n,u]=a.useState(null),[h,x]=a.useState(!1),[j,m]=a.useState(null),[G,y]=a.useState(!1),p=k(),S=F(),c=L();a.useEffect(()=>{R()?(d(!0),w("/contract/"+c.contract_id).then(t=>{t.file?u({file:t.file}):t.error?m(t.error):t.contract&&u(t.contract),d(!1)}).catch(()=>{d(!1)})):p("/login?next="+S.pathname)},[S.pathname,p,c.contract_id]);const[g,D]=a.useState({}),C=a.useCallback(t=>{const{dataURL:b}=s;x(!0),m(null),A("/contract/"+c.contract_id,{signature:b,customData:E(g)}).then(f=>{f.url&&(y(!0),u({file:f})),x(!1)}).catch(f=>{x(!1),m(!0)})},[c.contract_id,g,s]),N=a.useCallback(t=>{l({pixelArray:t.target.value||[],dataURL:t.target.dataURL})},[]);return o?e.jsx(r,{children:e.jsx("div",{className:"text-center",children:e.jsx(M,{})})}):n&&n.file&&n.file.url?e.jsxs(r,{children:[e.jsx("p",{children:e.jsx(i,{id:"Download the signed contract"})}),e.jsx("a",{title:"Download",href:n.file.url,download:!0,children:e.jsx(i,{id:"Download"})})]}):j?e.jsx(r,{children:e.jsx("span",{className:"text-danger",children:j})}):n&&n.url?e.jsx(r,{children:e.jsxs(e.Fragment,{children:[e.jsx(U,{source:n.url}),n.custom_fields?e.jsxs(e.Fragment,{children:[e.jsx(P,{onChange:t=>{D(b=>t)},value:g,formFields:n.custom_fields}),e.jsx(v,{onClick:C,loading:h,className:"btn btn-primary",children:e.jsx(i,{id:"Submit"})})]}):e.jsxs(e.Fragment,{children:[e.jsx(z,{label:"Signature",children:e.jsx(I,{onChange:N,value:s.pixelArray})}),e.jsx(v,{onClick:C,loading:h,disabled:s.pixelArray.length===0,className:"btn btn-primary",children:e.jsx(i,{id:"I agree"})})]})]})}):e.jsx(r,{children:e.jsx("span",{className:"text-danger",children:"No contract found"})})}function r({children:s}){return e.jsx("div",{className:"py-4",children:e.jsx("div",{className:"py-4 container",children:e.jsx("div",{className:"mt-4 card",children:e.jsx("div",{className:"card-body",children:s})})})})}function B(s){const{name:l,email:o}=s.settings;return{contract_html:s.settings.contract_html,access_token:s.settings.access_token,name:l,email:o}}const Q=_(B)(T);export{Q as default};
2//# sourceMappingURL=DisplayContract-D0dJgS71.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.