1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1489],{80320:function(e,t,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/formResponses/[formResponseId]",function(){return s(57501)}])},57501:function(e,t,s){"use strict";s.r(t),s.d(t,{default:function(){return _}});var r=s(85893),n=s(67294),l=s(1778),o=s(74665),i=s(39202),a=s(85835),d=s(49781),p=s(18715),u=s(22004),m=s.n(u),c=s(41664),f=s.n(c);let b=e=>{var t,s,u,c,b,h,U,v,j,x,g,_,w,P,I,A,y,R,N;return(0,r.jsx)(l.M,{title:e.t("common:pages.show.title",{typeLabel:e.t("formResponses:label")}),children:(0,r.jsx)(o._P.Ar,{children:e.loading?null:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(a.c,{routes:e.routes}),(0,r.jsx)(o.mr,{title:e.t("common:pages.show.title",{typeLabel:e.t("formResponses:label")})}),(0,r.jsx)(o._P.Ar.Content,{...i.o8,children:(0,r.jsx)(o._P.X2,{children:(0,r.jsx)(o._P.JX,{...i.wM,children:(0,r.jsxs)(o._P.w5,{column:1,bordered:!0,children:[e.projectSettingsUtils.enabledModules().includes("appUserAttributes")&&e.projectSettingsUtils.getProjectSettings().modules.appUserAttributes.options.iconUrl?(0,r.jsx)(o._P.w5.Item,{label:e.t("appUserAttributes:iconUrl"),children:(null===(s=e.appUser)||void 0===s?void 0:null===(t=s.appUserAttribute)||void 0===t?void 0:t.iconUrl)?(0,r.jsx)(p.Z,{width:50,src:null===(u=e.appUser.appUserAttribute)||void 0===u?void 0:u.iconUrl}):null},"iconUrl"):null,e.projectSettingsUtils.enabledModules().includes("usernamePasswordAuthentications")?(0,r.jsx)(o._P.w5.Item,{label:e.t("usernamePasswordAuthentications:username"),children:(0,r.jsx)(f(),{href:"/appUsers/".concat(null===(c=e.appUser)||void 0===c?void 0:c.id,"?tabKey=formResponses"),children:(null===(h=e.appUser)||void 0===h?void 0:null===(b=h.usernamePasswordAuthentication)||void 0===b?void 0:b.username)||""})},"username"):null,e.projectSettingsUtils.enabledModules().includes("appUserAttributes")?(0,r.jsxs)(r.Fragment,{children:[e.projectSettingsUtils.getProjectSettings().modules.appUserAttributes.options.displayName?(0,r.jsx)(o._P.w5.Item,{label:e.t("appUserAttributes:displayName"),children:(0,r.jsx)(f(),{href:"/appUsers/".concat(null===(U=e.appUser)||void 0===U?void 0:U.id,"?tabKey=formResponses"),children:(null===(j=e.appUser)||void 0===j?void 0:null===(v=j.appUserAttribute)||void 0===v?void 0:v.displayName)||""})},"displayName"):null,e.projectSettingsUtils.getProjectSettings().modules.appUserAttributes.options.name?(0,r.jsx)(o._P.w5.Item,{label:e.t("appUserAttributes:name"),children:(0,r.jsx)(f(),{href:"/appUsers/".concat(null===(x=e.appUser)||void 0===x?void 0:x.id,"?tabKey=formResponses"),children:(null===(_=e.appUser)||void 0===_?void 0:null===(g=_.appUserAttribute)||void 0===g?void 0:g.name)||""})},"name"):null,e.projectSettingsUtils.getProjectSettings().modules.appUserAttributes.options.organizationName?(0,r.jsx)(o._P.w5.Item,{label:e.t("appUserAttributes:organizationName"),children:(null===(P=e.appUser)||void 0===P?void 0:null===(w=P.appUserAttribute)||void 0===w?void 0:w.organizationName)||""},"organizationName"):null]}):null,(0,r.jsx)(o._P.w5.Item,{label:"".concat(e.t("forms:label")," ").concat(e.t("forms:title")),children:(0,r.jsx)(f(),{href:"/forms/".concat(null===(A=e.data)||void 0===A?void 0:null===(I=A.formResponses_by_pk)||void 0===I?void 0:I.formId),children:(null===(N=e.data)||void 0===N?void 0:null===(R=N.formResponses_by_pk)||void 0===R?void 0:null===(y=R.form)||void 0===y?void 0:y.title)||""})},"formTitle"),e.formContents.map(t=>{let s=e.formResponseContents.find(e=>e.formContentId===t.id);if(!s)return(0,r.jsx)(o._P.w5.Item,{label:t.title||"",children:""},t.id);let l=d.FormResponseContent.parse(s);switch(l.type){case"shortAnswer":case"multipleChoice":case"dropDown":return(0,r.jsx)(r.Fragment,{children:(0,r.jsx)(o._P.w5.Item,{label:t.title||"",children:l.answer||""},l.formContentId)});case"paragraph":return(0,r.jsx)(r.Fragment,{children:(0,r.jsx)(o._P.w5.Item,{label:t.title||"",children:l.answer.split(/(\n)/).map((e,t)=>(0,r.jsx)(n.Fragment,{children:/\n/.exec(e)?(0,r.jsx)("br",{}):e},t))},l.formContentId)});case"date":return(0,r.jsx)(r.Fragment,{children:(0,r.jsx)(o._P.w5.Item,{label:t.title||"",children:l.answer?(0,d.dayjs)(l.answer).format("YYYY-MM-DD"):""},l.formContentId)});case"checkBoxes":var i;return(0,r.jsx)(r.Fragment,{children:(0,r.jsx)(o._P.w5.Item,{label:t.title||"",children:String(null!==(i=l.answers
1)&&void 0!==i?i:"")},l.formContentId)});case"fileUpload":return(0,r.jsx)(r.Fragment,{children:(0,r.jsxs)(o._P.w5.Item,{label:t.title||"",children:[d.StringUtils.isVideo({text:l.fileUrl})?(0,r.jsx)(m(),{url:l.fileUrl,playing:!1,loop:!0,controls:!0}):null,d.StringUtils.isImage({text:l.fileUrl})?(0,r.jsx)(o._P.Ee,{width:200,src:l.fileUrl}):null,d.StringUtils.isAudio({text:l.fileUrl})?(0,r.jsxs)("audio",{controls:!0,children:[(0,r.jsx)("source",{src:l.fileUrl,type:"audio/mp3"}),(0,r.jsx)("p",{children:e.t("common:messages.audioPlayerNotWorkingOnYourBrowser")})]}):null,!l.fileUrl||d.StringUtils.isVideo({text:l.fileUrl})||d.StringUtils.isImage({text:l.fileUrl})||d.StringUtils.isAudio({text:l.fileUrl})?null:(0,r.jsx)(f(),{href:l.fileUrl,target:"_blank",rel:"noopener noreferrer",children:e.t("formResponses:file")})]},l.formContentId)});default:return null}})]})})})})]})})})};var h=s(26982),U=s(31567),v=s(95321);let j=e=>{var t,s;let{loading:r,data:n}=(0,h.HNP)({variables:{id:e.formResponseId}}),{t:l}=(0,U.$)(["common","forms","formResponses","appUsers","usernamePasswordAuthentications"]),{projectSettingsUtils:o}=(0,v.Yq)(),i=d.FormContents.parse(null==n?void 0:n.formResponses_by_pk.form.contents),a=d.FormResponseContents.parse(null==n?void 0:n.formResponses_by_pk.contents.filter(Boolean)),p=[{path:"/",breadcrumbName:l("common:pages.root.home")},{path:"/forms",breadcrumbName:l("forms:label")},{path:"/forms/".concat(null==n?void 0:null===(t=n.formResponses_by_pk)||void 0===t?void 0:t.formId),breadcrumbName:l("common:pages.show.title",{typeLabel:l("forms:label")})},{path:"",breadcrumbName:l("common:pages.show.title",{typeLabel:l("formResponses:label")})}];return{loading:r,data:n,formContents:i,formResponseContents:a,routes:p,t:l,projectSettingsUtils:o,appUser:null==n?void 0:null===(s=n.formResponses_by_pk)||void 0===s?void 0:s.appUser}},x=e=>(0,r.jsx)(b,{...j({...e})});var g=s(11163),_=()=>{let{formResponseId:e}=(0,g.useRouter)().query;return x({formResponseId:Number(e)})}},1778:function(e,t,s){"use strict";s.d(t,{M:function(){return r.M}});var r=s(98930)}},function(e){e.O(0,[712,1664,2004,3827,2888,9774,179],function(){return e(e.s=80320)}),_N_E=e.O()}]);
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.