PageSourceSearch

https://socialgravity.ai/assets/DocumentsPage-CiLoWk7D.js

js socialgravity.ai collected 2026-10-05 13:56:15 UTC 10,552 bytes, 6 lines download raw bytes

1import{g as v,j as e,r as c,L as u}from"./react-D6Y9hML7.js";import{u as h}from"./useQuery-DtTYXR9K.js";import{e as _,u as p,v as S,c as b,E as w,L as g,a6 as E,a7 as D,r as L,a8 as C,a9 as T}from"./index-we3y_myF.js";import{V as P}from"./VerifyHeader-D0l5eRnw.js";import{D as q,a as $,o as I}from"./DocusealEmbed-DNcgI4Ki.js";import{a as Y}from"./SigningCeremony-CEdLlk_3.js";import{P as f}from"./pen-line-cymZWQA3.js";import{F}from"./file-text-BsQzx5Ck.js";import{C as K}from"./check-nHMPfp5S.js";import"./supabase-CI_V8wt2.js";import"./LogoMark-DeHCpl4c.js";import"./houseTypography-CrsMyTER.js";/**
2 * @license lucide-react v0.475.0 - ISC
3 *
4 * This source code is licensed under the ISC license.
5 * See the LICENSE file in the root directory of this source tree.
6 */const M=[["path",{d:"M15 12h-5",key:"r7krc0"}],["path",{d:"M15 8h-5",key:"1khuty"}],["path",{d:"M19 17V5a2 2 0 0 0-2-2H4",key:"zz82l3"}],["path",{d:"M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3",key:"1ph1d7"}]],y=_("ScrollText",M),V={platform_agreement:()=>D("sync"),biometric_release:()=>E()},N={open:"Waiting for a signature",completed:"Signed",cancelled:"Cancelled",declined:"Declined"};function j({title:s,note:a,count:r,children:n}){return e.jsxs("section",{className:"mt-12 first:mt-10",children:[e.jsxs("div",{className:"flex items-baseline justify-between gap-4 border-b border-white/[0.12] pb-2.5",children:[e.jsx("h2",{className:"text-[11px] font-medium uppercase tracking-[0.18em] text-white/50",children:s}),r!=null?e.jsx("span",{className:"shrink-0 font-mono text-[11px] tabular-nums text-white/25",children:String(r).padStart(2,"0")}):null]}),e.jsx("p",{className:"mt-3 max-w-xl text-[12.5px] leading-relaxed tracking-[-0.01em] text-white/35",children:a}),e.jsx("div",{className:"mt-4",children:n})]})}function x({to:s,index:a,icon:r,title:n,meta:l,trailing:t,footnote:i}){return e.jsxs(u,{to:s,className:"group flex min-h-11 flex-wrap items-center gap-x-4 gap-y-2 border-b border-white/[0.07] px-2 py-4 transition-colors duration-300 first:border-t first:border-white/[0.07] hover:bg-white/[0.035] lg:flex-nowrap",children:[e.jsx("span",{className:"hidden w-6 shrink-0 font-mono text-[11px] tabular-nums text-white/20 sm:block",children:a}),e.jsx("span",{className:"flex h-9 w-9 shrink-0 items-center justify-center rounded-lg bg-white/[0.06] transition-colors duration-300 group-hover:bg-white/[0.1]",children:r}),e.jsxs("span",{className:"min-w-0 flex-1",children:[e.jsx("span",{className:"block text-[15px] tracking-[-0.01em] text-white/90 lg:truncate",children:n}),e.jsx("span",{className:"mt-1 block font-mono text-[11px] tracking-[0.01em] text-white/35",children:l}),i?e.jsx("span",{className:"mt-1 block text-[11.5px] leading-relaxed tracking-[-0.01em] text-white/30",children:i}):null]}),t]})}function W({doc:s}){return s.status==="open"&&s.sign_url?e.jsxs("span",{className:"inline-flex basis-full shrink-0 items-center gap-1.5 text-[10px] font-medium uppercase tracking-[0.14em] text-amber-200/80 lg:basis-auto",children:[e.jsx(f,{className:"h-3 w-3"})," Your signature"]}):e.jsxs("span",{className:"inline-flex basis-full shrink-0 items-center gap-1.5 text-[10px] font-medium uppercase tracking-[0.14em] text-white/40 lg:basis-auto",children:[s.status==="completed"&&e.jsx(K,{className:"h-3 w-3",strokeWidth:2.5}),N[s.status]??s.status]})}function B(){const{profile:s}=p(),{data:a,isLoading:r}=h({queryKey:["permission-profile",s==null?void 0:s.talent_id],queryFn:L}),n=(a==null?void 0:a.published)??null;return r?e.jsxs("p",{className:"flex items-center gap-2 py-4 text-[13px] text-white/40",children:[e.jsx(g,{className:"h-3.5 w-3.5 animate-spin"})," Loading your terms…"]}):n?e.jsx(x,{to:"/documents/terms",index:"01",icon:e.jsx(y,{className:"h-4 w-4 text-white/60",strokeWidth:1.6}),title:"Standing licence terms",meta:`Version ${n.version}${n.published_at?` · published ${n.published_at.slice(0,10)}`:""}`,footnote:"Published by you, not signed by anyone. No signature, no hash: the versioned publish is the record.",trailing:e.jsx("span",{className:"inline-flex basis-full shrink-0 items-center gap-1.5 text-[10px] font-medium uppercase tracking-[0.14em] text-white/40 lg:basis-auto",children:"Published"})}):e.jsx(x,{to:"/documents/terms",index:"01",icon:e.jsx(y,{className:"h-4 w-4 text-white/45",strokeWidth:1.6}),title:"Standing licence terms",meta:"Not published yet",footnote:"Publish your terms and this becomes the document an agency reads.",trailing:e.jsx("span",{className:"inline-flex basis-full shrink-0 items-center text-[10px] font-medium uppercase tracking-[0.14em] text-white/30 lg:basis-auto",children:"Nothing to read yet"})})}function R(){const{profile:s}=p(),{data:a,isLoading:r,error:n}=h({queryKey:["talent-documents",s==null?void 0:s.talent_id],queryFn:C}),l=(a==null?void 0:a.documents)??[],t=l.filter(i=>i.status==="open"&&i.sign_url).length;return e.jsxs("main",{className:"pb-24",children:[e.jsxs("header",{className:"border-b border-white/[0.12] pb-7",children:[e.jsx("h1",{className:"font-heading text-[clamp(26px,4.5vw,40px)] font-normal leading-[1.05] tracking-[-0.035em] text-white",children:"Your documents"}),e.jsx("p",{className:"mt-4 max-w-xl text-[13.5px] leading-relaxed tracking-[-0.01em] text-white/45",children:"Your terms, and every instrument you have been asked to sign. Each signed document here is the exact file behind its recorded hash, and anything still waiting can be read and signed without leaving this page."}),t>0?e.jsxs("p",{className:"mt-4 inline-flex items-center gap-2 rounded-full border border-amber-200/25 bg-amber-200/[0.06] px-3.5 py-1.5 text-[12px] tracking-[-0.01em] text-amber-100/80",children:[e.jsx(f,{className:"h-3.5 w-3.5"}
6),t===1?"1 document is waiting for you":`${t} documents are waiting for you`]}):null]}),e.jsx(j,{title:"Your terms",note:"What you allow, in your own words. Standing terms are not a licence and carry no signature; each licence is created per deal, inside them.",children:e.jsx(B,{})}),e.jsxs(j,{title:"Signed instruments",count:l.length,note:"Everything we have asked you to sign, and what each signature committed to. Open one to read the exact stored bytes behind its hash.",children:[r&&e.jsxs("p",{className:"flex items-center gap-2 py-4 text-[13px] text-white/40",children:[e.jsx(g,{className:"h-3.5 w-3.5 animate-spin"})," Loading your documents…"]}),n&&e.jsx("p",{className:"py-4 text-[13px] leading-relaxed text-[#ff9d9d]/80",children:"Could not load your documents. Refresh to try again."}),!r&&!n&&l.length===0&&e.jsx("p",{className:"py-4 text-[13px] leading-relaxed tracking-[-0.01em] text-white/40",children:"Nothing yet. Your platform agreement and any releases you sign will appear here."}),l.map((i,m)=>e.jsx(x,{to:`/documents/${i.envelope_id}`,index:String(m+1).padStart(2,"0"),icon:e.jsx(F,{className:"h-4 w-4 text-white/60",strokeWidth:1.6}),title:i.title,meta:`${i.instrument_version} · ${i.created_at.slice(0,10)} · ${i.document_sha256?`sha256 ${i.document_sha256.slice(0,12)}`:"no hash recorded"}`,trailing:e.jsx(W,{doc:i})},i.envelope_id))]})]})}function Q({envelopeId:s}){const{profile:a}=p(),r=S(),[n,l]=c.useState(!1),{data:t,isLoading:i,error:m}=h({queryKey:["talent-document",a==null?void 0:a.talent_id,s],queryFn:()=>T(s),refetchInterval:o=>{var d;return((d=o.state.data)==null?void 0:d.status)==="open"?1e4:!1}});return c.useEffect(()=>{(t==null?void 0:t.status)==="completed"&&(l(!1),r.invalidateQueries({queryKey:["talent-documents"]}),r.invalidateQueries({queryKey:["onboarding-state"]}))},[t==null?void 0:t.status,r]),c.useEffect(()=>{if(!n||!t||t.status!=="open")return;const o=V[t.kind];if(!o)return;const k=setInterval(()=>o().then(()=>r.invalidateQueries({queryKey:["talent-document"]})).catch(()=>{}),1e4);return()=>clearInterval(k)},[n,t,r]),c.useEffect(()=>{t&&b(w.DOCUMENT_VIEWED,{kind:t.kind,status:t.status})},[t==null?void 0:t.envelope_id]),i?e.jsx("main",{className:"flex items-center justify-center py-32",children:e.jsx(g,{className:"h-6 w-6 animate-spin text-white/40","aria-hidden":"true"})}):m||!t?e.jsxs("main",{className:"pb-24",children:[e.jsx("p",{className:"text-[13px] leading-relaxed text-[#ff9d9d]/80",children:"That document could not be loaded. It may not be yours, or it may not exist."}),e.jsx(u,{to:"/documents",className:"mt-4 inline-flex min-h-11 items-center text-[11px] font-medium uppercase tracking-[0.14em] text-white/40 hover:text-white",children:"Back to your documents"})]}):e.jsxs("main",{className:"pb-24",children:[e.jsxs("div",{className:"mb-6",children:[e.jsx("h1",{className:"text-[19px] tracking-[-0.01em] text-white/90",children:t.title}),e.jsxs("p",{className:"mt-1 text-[12px] tracking-[-0.01em] text-white/40",children:[t.instrument_version," · ",N[t.status]??t.status,t.completed_at?` ${t.completed_at.slice(0,10)}`:""]}),e.jsxs("p",{className:"mt-2 break-all font-mono text-[11px] leading-relaxed text-white/30",children:["sha256 ",t.document_sha256]})]}),e.jsx(Y,{doc:t,signed:t.status==="completed"}),t.status==="open"&&t.sign_url&&!n&&e.jsxs("div",{className:"mb-6 flex flex-wrap items-center gap-4 roun
6ded-2xl border border-white/10 bg-white/[0.03] px-5 py-4",children:[e.jsx("p",{className:"min-w-0 flex-1 text-[13px] leading-relaxed tracking-[-0.01em] text-white/60",children:"This document is waiting for your signature. Read it below, then sign it without leaving this page."}),e.jsxs("button",{onClick:()=>{b(w.DOCUMENT_SIGN_OPENED,{kind:t.kind}),l(!0)},className:"inline-flex min-h-11 shrink-0 items-center gap-2 rounded-full border border-white/25 px-5 py-2 text-[13px] text-white/80 tracking-[-0.01em] transition-all duration-300 hover:border-white/70 hover:bg-white/[0.1] hover:text-white",children:[e.jsx(f,{className:"h-3.5 w-3.5"})," Sign it here"]})]}),n&&t.status==="open"&&t.sign_url?e.jsx(q,{src:t.sign_url,title:t.title}):e.jsx($,{mediaType:t.media_type,content:t.content,title:t.title,officialPdfUrl:I(t.kind,t.instrument_version),doc:t}),e.jsx(u,{to:"/documents",className:"mt-8 inline-flex min-h-11 items-center text-[11px] font-medium uppercase tracking-[0.14em] text-white/35 transition-colors hover:text-white",children:"Back to your documents"})]})}function ne(){const{envelopeId:s}=v();return e.jsx("div",{className:"min-h-screen bg-[#0a0a0a] text-neutral-100",children:e.jsxs("div",{className:"mx-auto w-full max-w-3xl px-5 pt-8 sm:px-8",children:[e.jsx(P,{title:"Your documents",backTo:"/dashboard"}),s?e.jsx(Q,{envelopeId:s}):e.jsx(R,{})]})})}export{ne 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.