PageSourceSearch

https://playbooks.com/build/assets/form-responses-CgaK7Cis.js

js playbooks.com collected 2026-10-03 23:47:10 UTC 11,251 bytes, 1 lines download raw bytes

vendor: 5,761 bytes, line 1
1import{r as a,j as o,c as w,H as B}from"./app-Bda8uKs2.js";import{B as I}from"./button-BuIdVqHk.js";import{c as H,u as L}from"./index-Cc7c74ib.js";import{u as V}from"./index-CC_PGypA.js";import{b as k,u as z}from"./index-CLnS0zot.js";import{P as W}from"./index-pfPRIMe8.js";import{u as G}from"./index-DxvRt983.js";import{b as q,d as K,A as Z,$ as J}from"./app-layout-BL4dJpGM.js";import{f as Q}from"./date-XbsfC_ni.js";import{T as U}from"./triangle-alert-DXHk9dsj.js";import{D as X}from"./download-fU486mo4.js";import{C as Y}from"./chevron-down-YdLk_IEP.js";/* empty css            */import"./utils-Bk3hkyGf.js";import"./index-CkG_IHiz.js";import"./index-vv8FLJdC.js";import"./input-BBm_UpVq.js";import"./spinner-CvOcmIhb.js";import"./loader-circle-qMI-OBPc.js";import"./createLucideIcon-q0nE9J3F.js";import"./index-CMZkZNjY.js";import"./index-Dag5ztfA.js";import"./dialog-T9bT4uTJ.js";import"./x-DFO_egex.js";import"./index-LNXt3Z-q.js";import"./index-BMKvap4h.js";import"./flash-toaster-DoFWjaT9.js";import"./index-BusHtOjd.js";import"./index-Ba8OW6IL.js";import"./use-current-url-CtX1zGQm.js";import"./use-initials-CgrGPAEX.js";import"./index-HTteRQBt.js";import"./index-eIYmd7L3.js";import"./index-BhgVjuNu.js";import"./index-DyYE4xxu.js";import"./check-Bw8_CLnN.js";import"./plus-C4TRfT3x.js";import"./index-RfzaMjoS.js";import"./app-logo-icon-8QGdaQo7.js";import"./search-DJyBxQad.js";function ee(n,e=[]){let s=[];function t(p,i){const l=a.createContext(i),c=s.length;s=[...s,i];const d=f=>{const{scope:h,children:g,...x}=f,j=h?.[n]?.[c]||l,b=a.useMemo(()=>x,Object.values(x));return o.jsx(j.Provider,{value:b,children:g})};d.displayName=p+"Provider";function u(f,h){const g=h?.[n]?.[c]||l,x=a.useContext(g);if(x)return x;if(i!==void 0)return i;throw new Error(`\`${f}\` must be used within \`${p}\``)}return[d,u]}const r=()=>{const p=s.map(i=>a.createContext(i));return function(l){const c=l?.[n]||p;return a.useMemo(()=>({[`__scope${n}`]:{...l,[n]:c}}),[l,c])}};return r.scopeName=n,[t,te(r,...e)]}function te(...n){const e=n[0];if(n.length===1)return e;const s=()=>{const t=n.map(r=>({useScope:r(),scopeName:r.scopeName}));return function(p){const i=t.reduce((l,{useScope:c,scopeName:d})=>{const f=c(p)[`__scope${d}`];return{...l,...f}},{});return a.useMemo(()=>({[`__scope${e.scopeName}`]:i}),[i])}};return s.scopeName=e.scopeName,s}function se(n){const e=ne(n),s=a.forwardRef((t,r)=>{const{children:p,...i}=t,l=a.Children.toArray(p),c=l.find(oe);if(c){const d=c.props.children,u=l.map(f=>f===c?a.Children.count(d)>1?a.Children.only(null):a.isValidElement(d)?d.props.children:null:f);return o.jsx(e,{...i,ref:r,children:a.isValidElement(d)?a.cloneElement(d,void 0,u):null})}return o.jsx(e,{...i,ref:r,children:p})});return s.displayName=`${n}.Slot`,s}function ne(n){const e=a.forwardRef((s,t)=>{const{children:r,...p}=s;if(a.isValidElement(r)){const i=le(r),l=ie(p,r.props);return r.type!==a.Fragment&&(l.ref=t?k(t,i):i),a.cloneElement(r,l)}return a.Children.count(r)>1?a.Children.only(null):null});return e.displayName=`${n}.SlotClone`,e}var re=Symbol("radix.slottable");function oe(n){return a.isValidElement(n)&&typeof n.type=="function"&&"__radixId"in n.type&&n.type.__radixId===re}function ie(n,e){const s={...e};for(const t in e){const r=n[t],p=e[t];/^on[A-Z]/.test(t)?r&&p?s[t]=(...l)=>{const c=p(...l);return r(...l),c}:r&&(s[t]=r):t==="style"?s[t]={...r,...p}:t==="className"&&(s[t]=[r,p].filter(Boolean).join(" "))}return{...n,...s}}function le(n){let e=Object.getOwnPropertyDescriptor(n.props,"ref")?.get,s=e&&"isReactWarning"in e&&e.isReactWarning;return s?n.ref:(e=Object.getOwnPropertyDescriptor(n,"ref")?.get,s=e&&"isReactWarning"in e&&e.isReactWarning,s?n.props.ref:n.props.ref||n.ref)}var ae=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],E=ae.reduce((n,e)=>{const s=se(`Primitive.${e}`),t=a.forwardRef((r,p)=>{const{asChild:i,...l}=r,c=i?s:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),o.jsx(c,{...l,ref:p})});return t.displayName=`Primitive.${e}`,{...n,[e]:t}},{}),P="Collapsible",[ce]=ee(P),[pe,$]=ce(P),D=a.forwardRef((n,e)=>{const{__scopeCollapsible:s,open:t,defaultOpen:r,disabled:p,onOpenChange:i,...l}=n,[c,d]=L({prop:t,defaultProp:r??!1,onChange:i,caller:P});return o.jsx(pe,{scope:s,disabled:p,contentId:G(),open:c,onOpenToggle:a.useCallback(()=>d(u=>!u),[d]),children:o.jsx(E.div,{"data-state":A(c),"data-disabled":p?"":void 0,...l,ref:e})})});D.displayName=P;var T="CollapsibleTrigger",F=a.forwardRef((n,e)=>{const{__scopeCollapsible:s,...t}=n,r=$(T,s);return o.jsx(E.button,{type:"button","aria-controls":r.contentId,"aria-expanded":r.open||!1,"data-state":A(r.open),"data-disabled":r.disabled?"":void 0,disabled:r.disabled,...t,ref:e,onClick:H(n.onClick,r.onOpenToggle)})});F.displayName=T;var O="CollapsibleContent",M=a.forwardRef((n,e)=>{const{forceMount:s,...t}=n,r=$(O,n.__scopeCollapsible);return o.jsx(W,{present:s||r.open,children:({present:p})=>o.jsx(de,{...t,ref:e,present:p})})});M.displayName=O;var de=a.forwardRef((n,e)=>{const{__scopeCollapsible:s,present:t,children:r,...p}=n,i=$(O,s),[l,c]=a.useState(t),d=a.useRef(null),u=z(e,d),f=a.useRef(0),h=f.current,g=a.useRef(0),x=g.current,j=i.open||l,b=a.useRef(j),C=a.useRef(void 0);return a.useEffect(()=>{const m=requestAnimationFrame(()=>b.current=!1);return()=>cancelAnimationFrame(m)},[]),V(()=>{const m=d.current;if(m){C.current=C.current||{transitionDuration:m.style.transitionDuration,animationName:m.style.animationName},m.style.transitionDuration="0s",m.style.animationName="none";const v=m.getBoundingClientRect();f.current=v.height,g.current=v.width,b.current||(m.style.transitionDuration=C.current.transitionDuration,m.style.animationName=C.current.animationName),c(t)}}
1,[i.open,t]),o.jsx(E.div,{"data-state":A(i.open),"data-disabled":i.disabled?"":void 0,id:i.contentId,hidden:!j,...p,ref:u,style:{"--radix-collapsible-content-height":h?`${h}px`:void 0,"--radix-collapsible-content-width":x?`${x}px`:void 0,...n.style},children:j&&r})});function A(n){return n?"open":"closed"}var me=D;function fe(n){const e=w.c(4);let s;e[0]!==n?({...s}=n,e[0]=n,e[1]=s):s=e[1];let t;return e[2]!==s?(t=o.jsx(me,{"data-slot":"collapsible",...s}),e[2]=s,e[3]=t):t=e[3],t}function ue(n){const e=w.c(4);let s;e[0]!==n?({...s}=n,e[0]=n,e[1]=s):s=e[1];let t;return e[2]!==s?(t=o.jsx(F,{"data-slot":"collapsible-trigger",...s}),e[2]=s,e[3]=t):t=e[3],t}function xe(n){const e=w.c(4);let s;e[0]!==n?({...s}=n,e[0]=n,e[1]=s):s=e[1];let t;return e[2]!==s?(t=o.jsx(M,{"data-slot":"collapsible-content",...s}),e[2]=s,e[3]=t):t=e[3],t}function he(n){const e=w.c(42),{articleId:s,row:t}=n,[r,p]=a.useState(!1);let i;e[0]!==t.user.name?(i=o.jsx("span",{className:"font-medium",children:t.user.name}),e[0]=t.user.name,e[1]=i):i=e[1];let l;e[2]!==t.completed_at?(l=Q(t.completed_at),e[2]=t.completed_at,e[3]=l):l=e[3];let c;e[4]!==t.stale?(c=t.stale&&o.jsxs("span",{className:"ml-2 inline-flex items-center gap-1 text-amber-600 dark:text-amber-500","data-test":"form-response-stale",children:[o.jsx(U,{className:"size-4"}),"Submitted against an earlier version"]}),e[4]=t.stale,e[5]=c):c=e[5];let d;e[6]!==l||e[7]!==c?(d=o.jsxs("span",{className:"text-sm text-muted-foreground",children:[l,c]}),e[6]=l,e[7]=c,e[8]=d):d=e[8];let u;e[9]!==i||e[10]!==d?(u=o.jsxs("div",{className:"flex flex-col",children:[i,d]}),e[9]=i,e[10]=d,e[11]=u):u=e[11];let f;e[12]!==s||e[13]!==t.id?(f=J.url([s,t.id]),e[12]=s,e[13]=t.id,e[14]=f):f=e[14];let h;e[15]===Symbol.for("react.memo_cache_sentinel")?(h=o.jsx(X,{className:"size-4"}),e[15]=h):h=e[15];let g;e[16]!==f?(g=o.jsx(I,{asChild:!0,variant:"outline",size:"sm","data-test":"form-response-pdf",children:o.jsxs("a",{href:f,children:[h," PDF"]})}),e[16]=f,e[17]=g):g=e[17];const x=r?"Hide response details":"Show response details",j=`size-4 transition-transform ${r?"rotate-180":""}`;let b;e[18]!==j?(b=o.jsx(Y,{className:j}),e[18]=j,e[19]=b):b=e[19];let C;e[20]!==b||e[21]!==x?(C=o.jsx(ue,{asChild:!0,children:o.jsx(I,{variant:"ghost",size:"sm","aria-label":x,"data-test":"form-response-toggle",children:b})}),e[20]=b,e[21]=x,e[22]=C):C=e[22];let m;e[23]!==C||e[24]!==g?(m=o.jsxs("div",{className:"flex items-center gap-2",children:[g,C]}),e[23]=C,e[24]=g,e[25]=m):m=e[25];let v;e[26]!==m||e[27]!==u?(v=o.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[u,m]}),e[26]=m,e[27]=u,e[28]=v):v=e[28];let y;e[29]!==t.answers?(y=t.answers.map(ge),e[29]=t.answers,e[30]=y):y=e[30];let N;e[31]!==y?(N=o.jsx("dl",{className:"mt-4 divide-y divide-border border-t",children:y}),e[31]=y,e[32]=N):N=e[32];let _;e[33]!==t.signature_name?(_=t.signature_name!==null&&o.jsxs("p",{className:"mt-2 text-sm text-muted-foreground",children:["Signed"," ",o.jsx("span",{className:"font-signature text-xl leading-none",children:t.signature_name})]}),e[33]=t.signature_name,e[34]=_):_=e[34];let S;e[35]!==N||e[36]!==_?(S=o.jsxs(xe,{children:[N,_]}),e[35]=N,e[36]=_,e[37]=S):S=e[37];let R;return e[38]!==r||e[39]!==v||e[40]!==S?(R=o.jsxs(fe,{open:r,onOpenChange:p,className:"rounded-lg border p-4","data-test":"form-response-row",children:[v,S]}),e[38]=r,e[39]=v,e[40]=S,e[41]=R):R=e[41],R}function ge(n,e){return o.jsxs("div",{className:"flex flex-col gap-1 py-2",children:[o.jsx("dt",{className:"text-sm font-medium text-muted-foreground",children:n.label}),o.jsx("dd",{className:"text-sm whitespace-pre-wrap",children:n.value})]},e)}function rt(n){const e=w.c(32),{article:s,log:t}=n;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r={title:"Knowledge base",href:q().url},e[0]=r):r=e[0];const p=s.title;let i;e[1]!==s.id?(i=K(s.id),e[1]=s.id,e[2]=i):i=e[2];let l;e[3]!==s.title||e[4]!==i.url?(l={title:p,href:i.url},e[3]=s.title,e[4]=i.url,e[5]=l):l=e[5];let c;e[6]===Symbol.for("react.memo_cache_sentinel")?(c={title:"Form responses",href:"#"},e[6]=c):c=e[6];let d;e[7]!==l?(d=[r,l,c],e[7]=l,e[8]=d):d=e[8];const u=d,f=`Form responses · ${s.title}`;let h;e[9]!==f?(h=o.jsx(B,{title:f}),e[9]=f,e[10]=h):h=e[10];let g;e[11]===Symbol.for("react.memo_cache_sentinel")?(g=o.jsx("h1",{className:"text-xl font-semibold",children:"Form responses"}),e[11]=g):g=e[11];let x;e[12]!==s.title?(x=o.jsx("p",{className:"text-sm font-medium text-muted-foreground",children:s.title}),e[12]=s.title,e[13]=x):x=e[13];const j=t.length===1?"response":"responses";let b;e[14]!==t.length||e[15]!==j?(b=o.jsxs("p",{className:"text-sm text-muted-foreground",children:[t.length," ",j," submitted."]}),e[14]=t.length,e[15]=j,e[16]=b):b=e[16];let C;e[17]!==x||e[18]!==b?(C=o.jsxs("div",{children:[g,x,b]}),e[17]=x,e[18]=b,e[19]=C):C=e[19];let m;e[20]!==s.id||e[21]!==t?(m=t.length===0?o.jsx("p",{className:"text-sm text-muted-foreground",children:"No one has submitted this form yet."}):t.map(_=>o.jsx(he,{articleId:s.id,row:_},_.id)),e[20]=s.id,e[21]=t,e[22]=m):m=e[22];let v;e[23]!==m?(v=o.jsx("section",{className:"space-y-4",children:m}),e[23]=m,e[24]=v):v=e[24];let y;e[25]!==C||e[26]!==v?(y=o.jsxs("div",{className:"mx-auto w-full max-w-3xl space-y-8 p-4",children:[C,v]}),e[25]=C,e[26]=v,e[27]=y):y=e[27];let N;return e[28]!==u||e[29]!==y||e[30]!==h?(N=o.jsxs(Z,{breadcrumbs:u,children:[h,y]}),e[28]=u,e[29]=y,e[30]=h,e[31]=N):N=e[31],N}export{rt 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.