PageSourceSearch

https://www.stanfordndrd.org/_next/static/chunks/app/contribute/page-171ecc7e0873c997.js

js stanfordndrd.org collected 2026-10-09 22:06:47 UTC 21,682 bytes, 4 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[328],{16094:function(e,t,r){Promise.resolve().then(r.bind(r,20583))},95976:function(e,t,r){"use strict";r.d(t,{H1:function(){return i},H2:function(){return a},H5:function(){return o},H6:function(){return c},n:function(){return l}});var n=r(2265);let s=(e,t,r)=>{let s=n.forwardRef((r,s)=>{let{children:i,className:a="",muted:o,...c}=r,l="".concat("font-sans"," ").concat(t," ").concat(o?"text-muted-foreground":""," ").concat(a).trim();return n.createElement(e,{className:l,ref:s,...c},i)});return s.displayName=r,s},i=s("h1","text-4xl font-bold mb-4","H1"),a=s("h2","text-2xl font-semibold mb-3","H2");s("h3","text-xl font-medium mb-2 tracking-wide","H3"),s("h4","text-lg font-medium mb-2 tracking-wide","H4");let o=s("h5","font-normal mb-2 tracking-wide","H5"),c=s("h6","text-sm font-light mb-1 tracking-wide","H6"),l=s("p","text-sm mb-2 font-light tracking-wide leading-6","Paragraph");s("span","inline","Span")},20583:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return M}});var n=r(57437),s=r(2265),i=r(15714),a=r(84447),o=r(95976);function c(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function l(e,t){return(l=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}var u=Object.defineProperty,h=Object.defineProperties,d=Object.getOwnPropertyDescriptors,p=Object.getOwnPropertySymbols,f=Object.prototype.hasOwnProperty,m=Object.prototype.propertyIsEnumerable,v=(e,t,r)=>t in e?u(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,y=(e,t)=>{for(var r in t||(t={}))f.call(t,r)&&v(e,r,t[r]);if(p)for(var r of p(t))m.call(t,r)&&v(e,r,t[r]);return e},b=(e,t)=>h(e,d(t)),g=(e,t)=>{var r={};for(var n in e)f.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&p)for(var n of p(e))0>t.indexOf(n)&&m.call(e,n)&&(r[n]=e[n]);return r},x=(e,t,r)=>(v(e,"symbol"!=typeof t?t+"":t,r),r),w=(e,t,r)=>new Promise((n,s)=>{var i=e=>{try{o(r.next(e))}catch(e){s(e)}},a=e=>{try{o(r.throw(e))}catch(e){s(e)}},o=e=>e.done?n(e.value):Promise.resolve(e.value).then(i,a);o((r=r.apply(e,t)).next())}),R="hCaptchaOnLoad",O="script-error",E="@hCaptcha/loader";function C(e){let t=e&&e.ownerDocument||document,r=t.defaultView||t.parentWindow||window;return{document:t,window:r}}function _(e){return e||document.head}var S=class e{constructor(e){x(this,"_parent"),x(this,"breadcrumbs",[]),x(this,"context",{}),x(this,"extra",{}),x(this,"tags",{}),x(this,"request"),x(this,"user"),this._parent=e}get parent(){return this._parent}child(){return new e(this)}setRequest(e){return this.request=e,this}removeRequest(){return this.request=void 0,this}addBreadcrumb(e){return typeof e.timestamp>"u"&&(e.timestamp=new Date().toISOString()),this.breadcrumbs.push(e),this}setExtra(e,t){return this.extra[e]=t,this}removeExtra(e){return delete this.extra[e],this}setContext(e,t){return typeof t.type>"u"&&(t.type=e),this.context[e]=t,this}removeContext(e){return delete this.context[e],this}setTags(e){return this.tags=y(y({},this.tags),e),this}setTag(e,t){return this.tags[e]=t,this}removeTag(e){return delete this.tags[e],this}setUser(e){return this.user=e,this}removeUser(){return this.user=void 0,this}toBody(){let e=[],t=this;for(;t;)e.push(t),t=t.parent;return e.reverse().reduce((e,t)=>{var r;return e.breadcrumbs=[...null!=(r=e.breadcrumbs)?r:[],...t.breadcrumbs],e.extra=y(y({},e.extra),t.extra),e.contexts=y(y({},e.contexts),t.context),e.tags=y(y({},e.tags),t.tags),t.user&&(e.user=t.user),t.request&&(e.request=t.request),e},{breadcrumbs:[],extra:{},contexts:{},tags:{},request:void 0,user:void 0})}clear(){this.breadcrumbs=[],this.context={},this.tags={},this.user=void 0}},j=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+))?@)([\w.-]+)(?::(\d+))?\/(.+)/,k="An unknown error occurred";function P(e){return(e+256).toString(16).substring(1)}var A,I=[[/^\s*at (?:(.*?) ?\()?((?:file|https?|blob|chrome-extension|address|native|eval|webpack|<anonymous>|[-a-z]+:|.*bundle|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,"chrome"],[/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,"winjs"],[/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:file|https?|blob|chrome|webpack|resource|moz-extension).*?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js))(?::(\d+))?(?::(\d+))?\s*$/i,"gecko"]],N=(A=class{constructor(e){var t,r,n,s,i;x(this,"apiURL"),x(this,"dsn"),x(this,"environment"),x(this,"release"),x(this,"sampleRate"),x(this,"debug"),x(this,"_scope"),x(this,"shouldBuffer",!1),x(this,"bufferlimit",20),x(this,"buffer",[]),this.environment=e.environment,this.release=e.release,this.sampleRate=null!=(t=e.s
1ampleRate)?t:1,this.debug=null!=(r=e.debug)&&r,this._scope=null!=(n=e.scope)?n:new S,this.apiURL=function(e){let t=j.exec(e),r=t?t.slice(1):[];if(6!==r.length)throw Error("Invalid DSN");let n=r[5].split("/"),s=n.slice(0,-1).join("/");return r[0]+"://"+r[3]+(r[4]?":"+r[4]:"")+(s?"/"+s:"")+"/api/"+n.pop()+"/envelope/?sentry_version=7&sentry_key="+r[1]+(r[2]?"&sentry_secret="+r[2]:"")}(e.dsn),this.dsn=e.dsn,this.shouldBuffer=null!=(s=e.buffer)&&s,this.bufferlimit=null!=(i=e.bufferLimit)?i:20}static init(e){A._instance||(A._instance=new A(e))}static get instance(){if(!A._instance)throw Error("Sentry has not been initialized");return A._instance}log(...e){this.debug&&console.log(...e)}get scope(){return this._scope}static get scope(){return A.instance.scope}withScope(e){e(this._scope.child())}static withScope(e){A.instance.withScope(e)}captureException(e,t){this.captureEvent({type:"exception",level:"error",error:function(e){if(e instanceof Error)return e;if("string"==typeof e)return Error(e);if("object"==typeof e&&null!==e&&!Array.isArray(e)){let{message:t}=e,r=g(e,["message"]);return Object.assign(Error("string"==typeof t?t:k),r)}return Object.assign(Error(k),{cause:e})}(e),scope:null!=t?t:this._scope})}static captureException(e,t){A.instance.captureException(e,t)}captureMessage(e,t="info",r){this.captureEvent({type:"message",level:t,message:e,scope:null!=r?r:this._scope})}static captureMessage(e,t="info",r){A.instance.captureMessage(e,t,r)}captureEvent(e){if(Math.random()>=this.sampleRate){this.log("Dropped event due to sample rate");return}if(this.shouldBuffer){if(this.buffer.length>=this.bufferlimit)return;this.buffer.push(e)}else this.sendEvent(e)}sendEvent(e,t=5e3){return w(this,null,function*(){try{this.log("Sending sentry event",e);let r=function(e,t,r){var n,s,i;let a;let o=y({event_id:((a=function(e){for(let t=0;t<e.length;t++)e[t]=Math.floor(256*Math.random());return e}(Array(16)))[6]=15&a[6]|64,a[8]=63&a[8]|128,P(a[0])+P(a[1])+P(a[2])+P(a[3])+"-"+P(a[4])+P(a[5])+"-"+P(a[6])+P(a[7])+"-"+P(a[8])+P(a[9])+"-"+P(a[10])+P(a[11])+P(a[12])+P(a[13])+P(a[14])+P(a[15])).replaceAll("-",""),platform:"javascript",sdk:{name:"@hcaptcha/sentry",version:"0.0.4"},environment:t,release:r,timestamp:Date.now()/1e3},e.scope.toBody());if("exception"===e.type){let t;o.message=null!=(s=null==(n=e.error)?void 0:n.message)?s:"Unknown error",o.fingerprint=[o.message];let r=[],a=e.error;for(let e=0;e<5&&a&&(r.push((t=function(e){var t,r,n,s;if(!e.stack)return null;let i=[],a=null!=(n=null==(r=(t=e.stack).split)?void 0:r.call(t,`
2`))?n:[];for(let t=0;t<a.length;++t){let r=null,n=null,o=null;for(let[e,r]of I)if(n=e.exec(a[t])){o=r;break}if(!(!n||!o)){if("chrome"===o)r={filename:null!=(s=n[2])&&s.startsWith("address at ")?n[2].substring(11):n[2],function:n[1]||"?",lineno:n[3]?+n[3]:null,colno:n[4]?+n[4]:null};else if("winjs"===o)r={filename:n[2],function:n[1]||"?",lineno:+n[3],colno:n[4]?+n[4]:null};else{if("gecko"!==o)continue;0===t&&!n[5]&&void 0!==e.columnNumber&&i.length>0&&(i[0].column=e.columnNumber+1),r={filename:n[3],function:n[1]||"?",lineno:n[4]?+n[4]:null,colno:n[5]?+n[5]:null}}!r.function&&r.lineno&&(r.function="?"),i.push(r)}}return i.length?i.reverse():null}(i=a),{type:i.name,value:i.message,stacktrace:{frames:null!=t?t:[]}})),!(!a.cause||!(a.cause instanceof Error)));e++)a=a.cause;o.exception={values:r.reverse()}}return"message"===e.type&&(o.message=e.message,o.level=e.level),o}(e,this.environment,this.release),n={event_id:r.event_id,dsn:this.dsn},s=JSON.stringify(n)+`
3`+JSON.stringify({type:"event"})+`
4`+JSON.stringify(r),i=yield function(e,t,r){return w(this,null,function*(){var n,s;try{if("u">typeof fetch&&"u">typeof AbortSignal){let n;if(r){let e=new AbortController;n=e.signal,setTimeout(()=>e.abort(),r)}let s=yield fetch(e,b(y({},t),{signal:n})),i=yield s.text();return{status:s.status,body:i}}return yield new Promise((n,s)=>{var i,a;let o=new XMLHttpRequest;if(o.open(null!=(i=null==t?void 0:t.method)?i:"GET",e),o.onload=()=>n({status:o.status,body:o.responseText}),o.onerror=()=>s(Error("XHR Network Error")),null==t?void 0:t.headers)for(let[e,r]of Object.entries(t.headers))o.setRequestHeader(e,r);if(r){let e=setTimeout(()=>{o.abort(),s(Error("Request timed out"))},r);o.onloadend=()=>{clearTimeout(e)}}o.send(null==(a=null==t?void 0:t.body)?void 0:a.toString())})}catch(e){return{status:0,body:null!=(s=null==(n=null==e?void 0:e.toString)?void 0:n.call(e))?s:"Unknown error"}}})}(this.apiURL,{method:"POST",headers:{"Content-Type":"application/x-sentry-envelope"},body:s},t);this.log("Sentry response",i.status),200!==i.status&&(console.log(i.body),console.error("Failed to send event to Sentry",i))}catch(e){console.error("Failed to send event",e)}})}flush(e=5e3){return w(this,null,function*(){try{this.log("Flushing sentry events",this.buffer.length);let t=this.buffer.splice(0,this.buffer.length).map(t=>this.sendEvent(t,e));yield Promise.all(t),this.log("Flushed all events")}catch(e){console.error("Failed to flush events",e)}})}static flush(e=5e3){return A.instance.flush(e)}static reset(){A._instance=void 0}},x(A,"_instance"),A);function q(e=null){return{addBreadcrumb:t=>{e&&e.addBreadcrumb(t)},captureRequest:t=>
4{e&&e.setRequest(t)},captureException:t=>{e&&N.captureException(t,e)}}}var L=[];function T(e){var t=e&&e.ownerDocument||document,r=t.defaultView||t.parentWindow||window;return{document:t,window:r}}function U(e){return e||document.head}var H=function(e){function t(t){var r;return(r=e.call(this,t)||this)._hcaptcha=void 0,r.renderCaptcha=r.renderCaptcha.bind(c(r)),r.resetCaptcha=r.resetCaptcha.bind(c(r)),r.removeCaptcha=r.removeCaptcha.bind(c(r)),r.isReady=r.isReady.bind(c(r)),r._onReady=null,r.loadCaptcha=r.loadCaptcha.bind(c(r)),r.handleOnLoad=r.handleOnLoad.bind(c(r)),r.handleSubmit=r.handleSubmit.bind(c(r)),r.handleExpire=r.handleExpire.bind(c(r)),r.handleError=r.handleError.bind(c(r)),r.handleOpen=r.handleOpen.bind(c(r)),r.handleClose=r.handleClose.bind(c(r)),r.handleChallengeExpired=r.handleChallengeExpired.bind(c(r)),r.ref=s.createRef(),r.apiScriptRequested=!1,r.sentryHub=null,r.captchaId="",r.state={isApiReady:!1,isRemoved:!1,elementId:t.id},r}t.prototype=Object.create(e.prototype),t.prototype.constructor=t,l(t,e);var r=t.prototype;return r.componentDidMount=function(){var e=this,t=T(U(this.props.scriptLocation));if(this._hcaptcha=t.window.hcaptcha||void 0,void 0!==this._hcaptcha){this.setState({isApiReady:!0},function(){e.renderCaptcha()});return}this.loadCaptcha()},r.componentWillUnmount=function(){var e=this._hcaptcha,t=this.captchaId;this.isReady()&&(e.reset(t),e.remove(t))},r.shouldComponentUpdate=function(e,t){return this.state.isApiReady===t.isApiReady&&this.state.isRemoved===t.isRemoved},r.componentDidUpdate=function(e){var t=this;["sitekey","size","theme","tabindex","languageOverride","endpoint"].every(function(r){return e[r]===t.props[r]})||this.removeCaptcha(function(){t.renderCaptcha()})},r.loadCaptcha=function(){if(!this.apiScriptRequested){var e=this.props,t=e.apihost,r=e.assethost,n=e.endpoint,s=e.host,i=e.imghost,a=e.languageOverride,o=e.reCaptchaCompat,c=e.reportapi,l=e.sentry,u=e.custom,h=e.loadAsync,d=e.scriptLocation,p=e.scriptSource,f=e.secureApi,m=e.cleanup;(function(){return w(this,arguments,function*(e={}){let t=function(e=!0){var t,r,n,s,i,a,o;let c,l,u,h,d;if(!e)return q();N.init({dsn:"https://[email protected]/6",release:"2.0.0",environment:"production"});let p=N.scope;return p.setTag("source",E),p.setTag("url",document.URL),p.setContext("os",{UA:navigator.userAgent}),p.setContext("browser",y({},(-1!==(c=navigator.userAgent).indexOf("Firefox")?(l="Firefox",u=null==(r=c.match(/Firefox\/([\d.]+)/))?void 0:r[1]):-1!==c.indexOf("Edg")?(l="Microsoft Edge",u=null==(n=c.match(/Edg\/([\d.]+)/))?void 0:n[1]):-1!==c.indexOf("Chrome")&&-1!==c.indexOf("Safari")?(l="Chrome",u=null==(s=c.match(/Chrome\/([\d.]+)/))?void 0:s[1]):-1!==c.indexOf("Safari")&&-1===c.indexOf("Chrome")?(l="Safari",u=null==(i=c.match(/Version\/([\d.]+)/))?void 0:i[1]):-1!==c.indexOf("Opera")||-1!==c.indexOf("OPR")?(l="Opera",u=null==(a=c.match(/(Opera|OPR)\/([\d.]+)/))?void 0:a[2]):-1!==c.indexOf("MSIE")||-1!==c.indexOf("Trident")?(l="Internet Explorer",u=null==(o=c.match(/(MSIE |rv:)([\d.]+)/))?void 0:o[2]):(l="Unknown",u="Unknown"),{name:l,version:u}))),p.setContext("device",b(y({},{model:d=-1!==(h=navigator.userAgent).indexOf("Win")?"Windows":-1!==h.indexOf("Mac")?"Mac":-1!==h.indexOf("Linux")?"Linux":-1!==h.indexOf("Android")?"Android":-1!==h.indexOf("like Mac")||-1!==h.indexOf("iPhone")||-1!==h.indexOf("iPad")?"iOS":"Unknown",family:d,device:/Mobile|iPhone|iPod|Android/i.test(h)?"Mobile":/Tablet|iPad/i.test(h)?"Tablet":"Desktop"}),{screen_width_pixels:screen.width,screen_height_pixels:screen.height,language:navigator.language,orientation:(null==(t=screen.orientation)?void 0:t.type)||"Unknown",processor_count:navigator.hardwareConcurrency,platform:navigator.platform})),q(p)}(e.sentry);return yield function e(t,r,n=0){return w(this,null,function*(){let s=n<2?"Retry loading hCaptcha Api":"Exceeded maximum retries";try{return yield function(e={cleanup:!0},t){try{t.addBreadcrumb({category:E,message:"hCaptcha loader params",data:e});let r=_(e.scriptLocation),n=C(r),s=L.find(({scope:e})=>e===n.window);if(s)return t.addBreadcrumb({category:E,message:"hCaptcha already loaded"}),s.promise;let i=new Promise((r,i)=>w(this,null,function*(){try{var a;n.window[R]=()=>{t.addBreadcrumb({category:E,message:"hCaptcha script called onload function"}),r(n.window.hcaptcha)};let i=(a={custom:e.custom,render:e.render,sentry:e.sentry,assethost:e.assethost,imghost:e.imghost,reportapi:e.reportapi,endpoint:e.endpoint,host:e.host,recaptchacompat:e.recaptchacompat,hl:e.hl},Object.entries(a).filter(([,e])=>e||!1===e).map(([e,t])=>`${encodeURIComponent(e)}=${encodeURIComponent(String(t))}`).join("&"));yield function({scriptLocation:e,query:t,loadAsync:r=!0,crossOrigin:n,apihost:s="https://js.hcaptcha.com",cleanup:i=!0,secureApi:a=!1,scriptSource:o=""}={},c){let l=_(e),u=C(l);return new Promise((e,h)=>{let d=u.document.createElement("script");d.id="hCaptcha-script",o?d.src=`${o}?onload=${R}`:a?d.src=`${s}/1/secure-api.js?onload=${R}`:d.src=`${s}/1/api.js?onload=${R}`,d.crossOrigin=n,d.async=r;let p=(e,t)=>{try{!a&&i&&l.removeChild(d),t(e)}catch(e){h(e)}};d.onload=t=>p(t,e),d.onerror=e=>{c&&c(d.src),p(e,h)},d.src+=""!==t?`&${t}`:"",l.appendChild(d)})}(y({query:i},e),e=>{t.captureRequest({url:e,method:"GET"})}),t.addBreadcrumb({category:E,message:"hCaptcha loaded",data:s})}catch(r){t.addBreadcrumb({category:E,message:"hCaptcha failed to load"});let e=L.findIndex(e=>e.scope===n.window);-1!==e&&L.splice(e,1),i(Error(O))}}));return L.push({promise:i,scope:n.window}),i}catch(e){return t.captureException(e),Promise.reject(Error(O))}}(t,r)}catch(i){return r.addBreadcrumb({category:E,message:s}),n>=2?(r.captureException(i),Promise.reject(i)):e(t,r,n+=1)}})}(e,t)})})({render:"explicit",apihost:t,assethost:r,endpoint:n,hl:a,host:s,imghost:i,recaptchacompat:!1===o?"off":null,reportapi:c,sentry:l,custom:u,loadAsync:h,scriptLocation:d,scriptSource:p,secureApi:f,cleanup:void 0===m||m}).then(this.handleOnLoad,this.handleError).catch(this.handleError),this.apiScriptRequested=!0}},r.renderCaptcha=function(e){var t=this,r=this.props.onReady,n=this.state.isApiReady,s=this.captchaId;
4if(n&&!s){var i=Object.assign({"open-callback":this.handleOpen,"close-callback":this.handleClose,"error-callback":this.handleError,"chalexpired-callback":this.handleChallengeExpired,"expired-callback":this.handleExpire,callback:this.handleSubmit},this.props,{hl:this.props.hl||this.props.languageOverride,languageOverride:void 0}),a=this._hcaptcha.render(this.ref.current,i);this.captchaId=a,this.setState({isRemoved:!1},function(){e&&e(),r&&r(),t._onReady&&t._onReady(a)})}},r.resetCaptcha=function(){var e=this._hcaptcha,t=this.captchaId;this.isReady()&&e.reset(t)},r.removeCaptcha=function(e){var t=this,r=this._hcaptcha,n=this.captchaId;this.isReady()&&this.setState({isRemoved:!0},function(){t.captchaId="",r.remove(n),e&&e()})},r.handleOnLoad=function(){var e=this;this.setState({isApiReady:!0},function(){var t=T(U(e.props.scriptLocation));e._hcaptcha=t.window.hcaptcha,e.renderCaptcha(function(){var t=e.props.onLoad;t&&t()})})},r.handleSubmit=function(e){var t=this.props.onVerify,r=this.state.isRemoved,n=this._hcaptcha,s=this.captchaId;if(void 0!==n&&!r){var i=n.getResponse(s),a=n.getRespKey(s);t&&t(i,a)}},r.handleExpire=function(){var e=this.props.onExpire,t=this._hcaptcha,r=this.captchaId;this.isReady()&&(t.reset(r),e&&e())},r.handleError=function(e){var t=this.props.onError,r=this._hcaptcha,n=this.captchaId;this.isReady()&&r.reset(n),t&&t(e)},r.isReady=function(){var e=this.state,t=e.isApiReady,r=e.isRemoved;return t&&!r},r.handleOpen=function(){this.isReady()&&this.props.onOpen&&this.props.onOpen()},r.handleClose=function(){this.isReady()&&this.props.onClose&&this.props.onClose()},r.handleChallengeExpired=function(){this.isReady()&&this.props.onChalExpired&&this.props.onChalExpired()},r.execute=function(e){var t=this;void 0===e&&(e=null),e="object"==typeof e?e:null;try{var r=this._hcaptcha,n=this.captchaId;if(!this.isReady()){var s,i=new Promise(function(r,n){t._onReady=function(s){try{var i=t._hcaptcha;e&&e.async?i.execute(s,e).then(r).catch(n):r(i.execute(s,e))}catch(e){n(e)}}});return null!=(s=e)&&s.async?i:null}return r.execute(n,e)}catch(t){if(e&&e.async)return Promise.reject(t);return null}},r.close=function(){var e=this._hcaptcha,t=this.captchaId;if(this.isReady())return e.close(t)},r.setData=function(e){var t=this._hcaptcha,r=this.captchaId;this.isReady()&&(e&&"object"!=typeof e&&(e=null),t.setData(r,e))},r.getResponse=function(){return this._hcaptcha.getResponse(this.captchaId)},r.getRespKey=function(){return this._hcaptcha.getRespKey(this.captchaId)},r.render=function(){var e=this.state.elementId;return s.createElement("div",{ref:this.ref,id:e})},t}(s.Component);function M(){let[e,t]=(0,s.useState)({title:"",authors:"",url:"",keywords:"",abstract:""}),[r,c]=(0,s.useState)(!1),[l,u]=(0,s.useState)(""),[h,d]=(0,s.useState)(!1),[p,f]=(0,s.useState)(""),[m,v]=(0,s.useState)(!1),y=async n=>{if(n.preventDefault(),!e.title||!e.authors||!e.url||!e.keywords||!e.abstract){f("Please fill in all required fields");return}if(!r){c(!0);return}if(!l){f("Please complete the captcha");return}d(!0),f("");try{let r=await fetch("/api/papers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...e,captchaToken:l})});if(!r.ok){let e=await r.json();throw Error(e.error||"Error submitting paper")}v(!0),t({title:"",authors:"",url:"",keywords:"",abstract:""}),u(""),c(!1)}catch(e){f(e instanceof Error?e.message:"Error submitting paper")}finally{d(!1)}},b=e=>r=>{t(t=>({...t,[e]:r})),p&&f("")};return(0,n.jsx)("div",{className:"mx-auto p-6",children:(0,n.jsxs)("div",{className:"max-w-xl mx-auto",children:[(0,n.jsx)(o.H2,{className:"text-2xl",children:"Contribute to Neurodiversity Research"}),(0,n.jsx)(o.H5,{className:"text-gray-600 mb-6 text-sm",children:"Help us expand our database by submitting neurodiversity-related research papers. Your contributions help make neurodiversity resources more accessible to everyone."}),m?(0,n.jsx)("div",{className:"bg-green-50 text-green-800 p-4 rounded-lg mb-6",children:"Thank you for your submission! Our team will review it shortly."}):(0,n.jsxs)("form",{onSubmit:y,className:"space-y-4",children:[(0,n.jsx)(i.Y,{type:"text",label:"Paper Title",placeholder:"Enter the full title of the paper",className:"w-full",size:"sm",value:e.title,onValueChange:b("title"),isRequired:!0}),(0,n.jsx)(i.Y,{type:"text",label:"Authors",placeholder:"Enter author names (separated by commas)",className:"w-full",size:"sm",value:e.authors,onValueChange:b("authors"),isRequired:!0}),(0,n.jsx)(i.Y,{type:"url",label:"Paper URL or DOI",placeholder:"Enter the paper's URL or DOI",className:"w-full",size:"sm",value:e.url,onValueChange:b("url"),isRequired:!0}),(0,n.jsx)(i.Y,{type:"text",label:"Keywords",placeholder:"Enter relevant keywords (separated by commas)",className:"w-full",size:"sm",value:e.keywords,onValueChange:b("keywords"),isRequired:!0}),(0,n.jsx)("textarea",{className:"w-full p-2 rounded-lg border border-gray-300 focus:outline-none focus:ring-2 focus:ring-primary min-h-[100px] text-sm",placeholder:"Brief description or abstract of the paper",value:e.abstract,onChange:e=>b("abstract")(e.target.value),required:!0}),r&&(0,n.jsx)("div",{className:"my-4",children:(0,n.jsx)(H,{sitekey:"df5ccab0-3b5e-431e-99ce-377e7430ccc6",onVerify:e=>{u(e),f("")},onExpire:()=>u("")})}),p&&(0,n.jsx)("div",{className:"text-red-600 text-sm mb-4",children:p}),(0,n.jsx)("div",{children:(0,n.jsx)(a.A,{type:"submit",color:"primary",size:"md",radius:"sm",className:"px-4 py-2 text-sm",isLoading:h,children:r?"Submit Paper":"Continue"})})]})]})})}}},function(e){e.O(0,[96,971,23,744],function(){return e(e.s=16094)}),_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.