PageSourceSearch

https://www.jackmassa.com/_next/static/chunks/pages/betacopies/[be…/edit-b555a47107bb50bc.js

js jackmassa.com collected 2026-10-10 02:26:52 UTC 15,319 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6439],{2028:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/betacopies/[betaCopyId]/betacopysections/[betaCopySectionId]/edit",function(){return n(89064)}])},64856:function(e,t,n){"use strict";n.d(t,{Z:function(){return h}});var i=n(52676),a=n(24754),r=n(48018),s=n(39893),l=n(63828),o=n(31647),c=n(99089),d=n(89830),u=n(87649);function h(e){let{loading:t,onSave:n,onCancel:h,onEdit:p,readOnly:f=!1,isCreateForm:Z,sectionType:x,sectionDividerType:g,...m}=e,b=(0,a.cI)(),{control:v,handleSubmit:y}=b;return(0,i.jsx)(a.RV,{...b,children:(0,i.jsxs)(r.Z,{id:"betaCopySectionForm",size:"large",onSubmit:y(n),noValidate:!0,children:[(0,i.jsx)(u.Z,{name:"sectionType",label:"Section Type",value:x,readOnly:!0,disabled:!0,defaultValue:x}),(0,i.jsx)(u.Z,{name:"title",label:"Content"===x?"".concat(g," Title"):"Questionnaire Title",placeholder:"Title",rules:{required:"Title is required"},defaultValue:m.title,readOnly:f,onEdit:p}),"Content"===x&&(0,i.jsx)(d.Z,{name:"critiqueGuidance",label:"Critique Guidance (2,000 character limit)",description:"At the end of each ".concat(g.toLowerCase(),", what should readers include in their feedback?"),rows:5,placeholder:"How realistic do you find the character's decisions/motivations?",rules:{maxLength:{value:2e3,message:"Maximum of 2,000 characters for your review"}},defaultValue:m.critiqueGuidance,readOnly:f,onEdit:p}),Z?"Content"===x?(0,i.jsx)(c.Z,{name:"content",control:v,label:x,rules:{required:"Content is required",validate:e=>!!e&&(!!e.reduce((e,t)=>e+t.children.reduce((e,t)=>e+t.text,""),"")||"Must enter content")}}):(0,i.jsx)(d.Z,{name:"content",label:"Questionnaire",rows:5,placeholder:"1) What did you think of the last 3 chapters? ...",rules:{required:"Questionnaire content is required",maxLength:{value:2e3,message:"Maximum of 2,000 characters for your review"}}}):null,Z&&(0,i.jsx)(s.Z,{children:"Additions are aggregated every few hours and beta readers subscribed to updates will be notified of new content"}),f?null:(0,i.jsxs)("div",{style:{display:"flex",justifyContent:"flex-end"},children:[(0,i.jsxs)(l.Z,{type:"button",basic:!0,color:"red",disabled:t,onClick:h,children:[(0,i.jsx)(o.Z,{name:"remove"})," Cancel"]}),(0,i.jsxs)(l.Z,{form:"betaCopySectionForm",type:"submit",color:"green",disabled:t,loading:t,children:[(0,i.jsx)(o.Z,{name:"checkmark"}),Z?"Create":"Save Changes"]})]})]})})}},87649:function(e,t,n){"use strict";var i=n(52676),a=n(75271),r=n(24754),s=n(76887),l=n(9029),o=n(24380),c=n(14476),d=n(53655);t.Z=(0,d.K)(function(e){var t,n;let{name:d,control:u,defaultValue:h,rules:p,shouldUnregister:f=!0,onChange:Z,onBlur:x,label:g,labelStyle:m,description:b,instructions:v,width:y,readOnly:j=!1,onEdit:w,setFocus:C,editAriaLabel:G,...N}=e,A="".concat(d,"-").concat((0,a.useId)()),T="".concat(A,"-description"),S="".concat(A,"-instructions"),[k,E]=(0,a.useState)(null!==(n=null==v?void 0:v.defaultOpen)&&void 0!==n&&n),{field:{value:q,onChange:R,ref:I,...B},fieldState:_}=(0,r.bc)({name:d,control:u,defaultValue:h||"",rules:p,shouldUnregister:f}),P=null===(t=_.error)||void 0===t?void 0:t.message,V=P?"".concat(A,"-error-message"):void 0,O=[b?T:null,v&&k?S:null,V].filter(Boolean).join(" ")||void 0;return(0,i.jsxs)(s.Z,{required:!!(null==p?void 0:p.required),error:!!P,width:y,children:[(0,c.b)({label:g,labelStyle:m,inputId:A,name:d,description:b,descriptionId:T,instructions:v,instructionsId:S,instructionsOpen:k,onInstructionsOpenChange:E,onEdit:w,showEditButton:j&&!!w,setFocus:C,editAriaLabel:G,required:!!(null==p?void 0:p.required)}),(0,i.jsx)(l.Z,{...B,...N,id:A,name:d,ref:I,readOnly:j,required:!!(null==p?void 0:p.required),value:q,tabIndex:j?-1:N.tabIndex,"aria-describedby":O,"aria-invalid":!!P||void 0,onChange:(e,t)=>
1{let{value:n}=t;R(Z?Z(n):n)},onBlur:e=>{j||R(x?x(e.target.value):e.target.value.trim())}}),P?(0,i.jsx)(o.Z,{prompt:!0,pointing:"above",id:V,role:"alert",children:P}):null]})})},89064:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return O}});var i=n(52676),a=n(68266),r=n(8934),s=n(2639),l=n(25572),o=n.n(l),c=n(58754),d=n(75271),u=n(6399),h=n(55907),p=n(52832),f=n(80338),Z=n(41913),x=n(28083),g=n(26791),m=n(61009),b=n(63828),v=n(31647),y=n(9963),j=n(77576),w=n(68887),C=n(52612),G=n(64843),N=n(33494),A=n(66413),T=n(43515),S=n(22965),k=n(77526),E=n(57907),q=n(64856),R=n(51487),I=n(76913),B=n(14489);function _(){let e=(0,B._)(["\n  mutation EditBetaCopySection(\n    $betaCopySectionId: ID!\n    $title: String!\n    $critiqueGuidance: String\n  ) {\n    editBetaCopySection(\n      betaCopySectionId: $betaCopySectionId\n      title: $title\n      critiqueGuidance: $critiqueGuidance\n    ) {\n      id\n      databaseId\n      title\n      critiqueGuidance\n    }\n  }\n"]);return _=function(){return e},e}var P=(0,n(90790).Ps)(_()),V=n(46872),O=(0,R.Z)(function(){let{betaCopyId:e,betaCopySectionId:t,justCreated:n}=(0,c.useRouter)().query,[l,R]=(0,d.useState)(!1),[B,_]=(0,d.useState)(0),[O,z]=(0,d.useState)("true"===n),{loading:D,error:H,data:L}=(0,a.a)(V.Z,{variables:{id:(0,I.Q)("BetaCopySection",t)}}),[$,{loading:F}]=(0,r.D)(P);if(H)return"Error! ".concat(H.message);if(D)return(0,i.jsx)(p.Z,{active:!0,children:(0,i.jsx)(f.Z,{children:"Loading"})});let{title:K,tags:U,sectionType:W,sectionNumber:X,description:M,critiqueGuidance:Q,betaCopy:Y,betaCopySectionVersionsArray:J}=L.node;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(Z.Z,{size:"tiny",open:O,onClose:()=>z(!1),children:[(0,i.jsx)(x.Z,{size:"huge",children:"Congratulations!"}),(0,i.jsx)(g.Z,{children:(0,i.jsxs)(m.Z,{style:{display:"flex",justifyContent:"center",alignItems:"center",flexDirection:"column"},children:[(0,i.jsx)("p",{style:{fontSize:"2rem"},children:"Your landing page is up!"}),(0,i.jsxs)(b.Z,{size:"huge",primary:!0,as:"a",target:"_blank",rel:"noopener noreferrer",href:"/giveaways/".concat(e),children:[(0,i.jsx)(v.Z,{name:"external"}),"Check it out"]})]})}),(0,i.jsxs)(y.Z,{children:[(0,i.jsxs)(b.Z,{onClick:()=>z(!1),children:[(0,i.jsx)(v.Z,{name:"pencil"}),"Back to editing"]}),(0,i.jsx)(o(),{passHref:!0,href:"/dashboard/giveaways",legacyBehavior:!0,children:(0,i.jsxs)(b.Z,{as:"a",children:[(0,i.jsx)(v.Z,{name:"dashboard"}),"Go to the dashboard"]})})]})]}),(0,i.jsx)("div",{style:{padding:"0 20px",marginBottom:"1rem",width:"100%"},children:(0,i.jsxs)(j.Z,{children:[(0,i.jsx)(w.Z,{}),(0,i.jsx)(C.Z,{children:(0,i.jsx)(o(),{href:"/dashboard",children:"Home"})}),(0,i.jsx)(w.Z,{}),(0,i.jsx)(C.Z,{children:(0,i.jsx)(o(),{href:"/dashboard/betacopies",children:"My Beta Copies"})}),(0,i.jsx)(w.Z,{}),(0,i.jsx)(C.Z,{children:Y.title.length>40?"".concat(Y.title.substring(0,40),"..."):Y.title}),(0,i.jsx)(w.Z,{}),(0,i.jsx)(C.Z,{children:(0,i.jsx)(o(),{href:"/betacopies/".concat(Y.databaseId,"/betacopysections"),children:"Contents & Annotations"})}),(0,i.jsx)(w.Z,{}),(0,i.jsxs)(C.Z,{active:!0,children:[X," - ",K.length>25?"".concat(K.substring(0,25),"..."):K]})]})}),(0,i.jsxs)("div",{style:{maxWidth:"600px",margin:"0 auto",padding:"0 20px",width:"100%"},children:[(0,i.jsx)(G.Z,{size:"huge",textAlign:"center",children:Y.title}),(0,i.jsx)(q.Z,{isCreateForm:!1,readOnly:!l,onEdit:()=>R(!0),title:K,sectionDividerType:Y.sectionDividerType,sectionType:W,tags:U,description:M,critiqueGuidance:Q,loading:F,onCancel:()=>{_(e=>e+1),R(!1)},onSave:async e=>{let{title:n,critiqueGuidance:i}=e,[a]=await (0,s.Z)($({variables:{betaCopySectionId:t,title:n,critiqueGuidance:i}}));if(a){(0,h.Am)("There was an error editing your beta copy section.",{className:"ui negative message"});return}_(e=>e+1),R(!1)}},B),(0,i.jsx)(G.Z,{size:"huge",children:"Versions"}),(0,i.jsxs)(N.Z,{children:[(0,i.jsx)(A.Z,{children:(0,i.jsxs)(T.Z,{children:[(0,i.jsx)(S.Z,{width:5,children:"Versions"}),(0,i.jsx)(S.Z,{width:5,textAlign:"right",children:"Word Count"}),(0,i.jsx)(S.Z,{width:5,textAlign:"right",children:"Comments"}),(0,i.jsx)(S.Z,{width:5,textAlign:"right",children:"Responses"})]})}),(0,i.jsx)(k.Z,{children:J.map(e=>{let{id:t,databaseId:n,wordCount:a,version:r,betaCopySectionVersionCommentsCount:s,betaCopySectionVersionResponsesCount:l}=e;return(0,i.jsxs)(T.Z,{children:[(0,i.jsx)(E.Z,{children:(0,i.jsxs)(o(),{href:"/betacopysectionversions/".concat(n,"/feedback"),children:["Version ",r]})}),(0,i.jsx)(E.Z,{textAlign:"right",children:(0,i.jsx)(u.Z,{value:a,displayType:"text",thousandSeparator:!0})}),(0,i.jsx)(E.Z,{textAlign:"right",children:(0,i.jsx)(u.Z,{value:s,displayType:"text",thousandSeparator:!0})}),(0,i.jsx)(E.Z,{textAlign:"right",children:(0,i.jsx)(u.Z,{value:l,displayType:"text",thousandSeparator:!0})})]},t)})})]}),(0,i.jsx)(o(),{passHref:!0,href:"/betacopies/".concat(e,"/betacopysections/").concat(t,"/betacopysectionversions/new"),legacyBehavior:!0,children:(0,i.jsx)(b.Z,{as:"a",size:"huge",primary:!0,children:"Upload New Version"})})]})]})})},46872:function(e,t,n){"use strict";var i=n(14489),a=n(90790);function r(){let e=(0,i._)(["\n  query BetaCopySectionEdit($id: ID!) {\n    node(id: $id) {\n      ... on BetaCopySection {\n        id\n        databaseId\n        title\n        critiqueGuidance\n        sectionNumber\n        sectionType\n        betaCopy {\n          id\n          databaseId\n          title\n          sectionDividerType\n        }\n        betaCopySectionVersionsArray {\n          id\n          databaseId\n          wordCount\n          version\n          betaCopySectionVersionCommentsCount\n          betaCopySectionVersionResponsesCount\n        }\n      }\n    }\n  }\n"]);return r=function(){return e},e}t.Z=(0,a.Ps)(r())},33494:function(e,t,n){"use strict";var i=n(47510),a=n(45064),r=n(45924),s=n(75271),l=n(79326),o=n(86687),c=n(4543),d=n(66206),u=n(77526),h=n(57907),p=n(26449),f=n(66413),Z=n(22965),x=n(43515),g=s.forwardRef(function(e,t){var n=e.attached,h=e.basic,Z=e.celled,m=e.children,b=e.className,v=e.collapsing,y=e.color,j=e.columns,w=e.compact,C=e.definition,G=e.fixed,N=e.footerRow,A=e.headerRow,T=e.headerRows,S=e.inverted,k=e.padded,E=e.renderBodyRow,q=e.selectable,R=e.singleLine,I=e.size,B=e.sortable,_=e.stackable,P=e.striped,V=e.structured,O=e.tableData,z=e.textAlign,D=e.unstackable,H=e.verticalAlign,L=(0,r.Z)("ui",y,I,(0,l.lG)(Z,"celled"),(0,l.lG)(v,"collapsing"),(0,l.lG)(C,"definition"),(0,l.lG)(G,"fixed"),(0,l.lG)(S,"inverted"),(0,l.lG)(q,"selectable"),(0,l.lG)(R,"single line"),(0,l.lG)(B,"sortable"),(0,l.lG)(_,"stackable"),
1(0,l.lG)(P,"striped"),(0,l.lG)(V,"structured"),(0,l.lG)(D,"unstackable"),(0,l.sU)(n,"attached"),(0,l.sU)(h,"basic"),(0,l.sU)(w,"compact"),(0,l.sU)(k,"padded"),(0,l.X4)(z),(0,l.Ok)(H),(0,l.H0)(j,"column"),"table",b),$=(0,o.Z)(g,e),F=(0,c.Z)(e,{defaultAs:"table"});if(!d.kK(m))return s.createElement(F,(0,i.Z)({},$,{className:L,ref:t}),m);var K={defaultProps:{cellAs:"th"}},U=(A||T)&&s.createElement(f.Z,null,x.Z.create(A,K),(0,a.Z)(T,function(e){return x.Z.create(e,K)}));return s.createElement(F,(0,i.Z)({},$,{className:L,ref:t}),U,s.createElement(u.Z,null,E&&(0,a.Z)(O,function(e,t){return x.Z.create(E(e,t))})),N&&s.createElement(p.Z,null,x.Z.create(N)))});g.handledProps=["as","attached","basic","celled","children","className","collapsing","color","columns","compact","definition","fixed","footerRow","headerRow","headerRows","inverted","padded","renderBodyRow","selectable","singleLine","size","sortable","stackable","striped","structured","tableData","textAlign","unstackable","verticalAlign"],g.displayName="Table",g.propTypes={},g.Body=u.Z,g.Cell=h.Z,g.Footer=p.Z,g.Header=f.Z,g.HeaderCell=Z.Z,g.Row=x.Z,t.Z=g},77526:function(e,t,n){"use strict";var i=n(47510),a=n(45924),r=n(75271),s=n(86687),l=n(4543),o=r.forwardRef(function(e,t){var n=e.children,c=e.className,d=(0,a.Z)(c),u=(0,s.Z)(o,e),h=(0,l.Z)(e,{defaultAs:"tbody"});return r.createElement(h,(0,i.Z)({},u,{className:d,ref:t}),n)});o.handledProps=["as","children","className"],o.displayName="TableBody",o.propTypes={},t.Z=o},57907:function(e,t,n){"use strict";var i=n(47510),a=n(45924),r=n(75271),s=n(79326),l=n(86687),o=n(4543),c=n(66206),d=n(67958),u=n(31647),h=r.forwardRef(function(e,t){var n=e.active,d=e.children,p=e.className,f=e.collapsing,Z=e.content,x=e.disabled,g=e.error,m=e.icon,b=e.negative,v=e.positive,y=e.selectable,j=e.singleLine,w=e.textAlign,C=e.verticalAlign,G=e.warning,N=e.width,A=(0,a.Z)((0,s.lG)(n,"active"),(0,s.lG)(f,"collapsing"),(0,s.lG)(x,"disabled"),(0,s.lG)(g,"error"),(0,s.lG)(b,"negative"),(0,s.lG)(v,"positive"),(0,s.lG)(y,"selectable"),(0,s.lG)(j,"single line"),(0,s.lG)(G,"warning"),(0,s.X4)(w),(0,s.Ok)(C),(0,s.H0)(N,"wide"),p),T=(0,l.Z)(h,e),S=(0,o.Z)(e,{defaultAs:"td"});return c.kK(d)?r.createElement(S,(0,i.Z)({},T,{className:A,ref:t}),u.Z.create(m),Z):r.createElement(S,(0,i.Z)({},T,{className:A,ref:t}),d)});h.handledProps=["active","as","children","className","collapsing","content","disabled","error","icon","negative","positive","selectable","singleLine","textAlign","verticalAlign","warning","width"],h.displayName="TableCell",h.propTypes={},h.create=(0,d.u5)(h,function(e){return{content:e}}),t.Z=h},26449:function(e,t,n){"use strict";var i=n(47510),a=n(75271),r=n(86687),s=n(66413),l=a.forwardRef(function(e,t){var n=e.as,o=(0,r.Z)(l,e);return a.createElement(s.Z,(0,i.Z)({},o,{as:void 0===n?"tfoot":n,ref:t}))});l.handledProps=["as"],l.displayName="TableFooter",l.propTypes={},t.Z=l},66413:function(e,t,n){"use strict";var i=n(47510),a=n(45924),r=n(75271),s=n(79326),l=n(86687),o=n(4543),c=n(66206),d=r.forwardRef(function(e,t){var n=e.children,u=e.className,h=e.content,p=e.fullWidth,f=(0,a.Z)((0,s.lG)(p,"full-width"),u),Z=(0,l.Z)(d,e),x=(0,o.Z)(e,{defaultAs:"thead"});return r.createElement(x,(0,i.Z)({},Z,{className:f,ref:t}),c.kK(n)?h:n)});d.handledProps=["as","children","className","content","fullWidth"],d.displayName="TableHeader",d.propTypes={},t.Z=d},22965:function(e,t,n){"use strict";var i=n(47510),a=n(45924),r=n(75271),s=n(79326),l=n(86687),o=n(57907),c=r.forwardRef(function(e,t){var n=e.as,d=e.className,u=e.sorted,h=(0,a.Z)((0,s.cD)(u,"sorted"),d),p=(0,l.Z)(c,e);return r.createElement(o.Z,(0,i.Z)({},p,{as:void 0===n?"th":n,className:h,ref:t}))});c.handledProps=["as","className","sorted"],c.displayName="TableHeaderCell",c.propTypes={},t.Z=c},43515:function(e,t,n){"use strict";var i=n(47510),a=n(45064),r=n(45924),s=n(75271),l=n(79326),o=n(86687),c=n(4543),d=n(66206),u=n(67958),h=n(57907),p=s.forwardRef(function(e,t){var n=e.active,u=e.cellAs,f=void 0===u?"td":u,Z=e.cells,x=e.children,g=e.className,m=e.disabled,b=e.error,v=e.negative,y=e.positive,j=e.textAlign,w=e.verticalAlign,C=e.w
1arning,G=(0,r.Z)((0,l.lG)(n,"active"),(0,l.lG)(m,"disabled"),(0,l.lG)(b,"error"),(0,l.lG)(v,"negative"),(0,l.lG)(y,"positive"),(0,l.lG)(C,"warning"),(0,l.X4)(j),(0,l.Ok)(w),g),N=(0,o.Z)(p,e),A=(0,c.Z)(e,{defaultAs:"tr"});return d.kK(x)?s.createElement(A,(0,i.Z)({},N,{className:G,ref:t}),(0,a.Z)(Z,function(e){return h.Z.create(e,{defaultProps:{as:f}})})):s.createElement(A,(0,i.Z)({},N,{className:G,ref:t}),x)});p.handledProps=["active","as","cellAs","cells","children","className","disabled","error","negative","positive","textAlign","verticalAlign","warning"],p.displayName="TableRow",p.propTypes={},p.create=(0,u.u5)(p,function(e){return{cells:e}}),t.Z=p}},function(e){e.O(0,[532,8359,9029,8018,1913,4754,8446,2403,718,1610,8650,9922,7099,2888,9774,179],function(){return e(e.s=2028)}),_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.