{"version":3,"sources":["webpack:///./app/javascript/src/mixins/init_evaporate.js","webpack:///./app/javascript/src/vue_shared/components/RequestFieldInput.vue?eccb","webpack:///./app/javascript/src/vue_shared/types/request_fields.ts","webpack:///./app/javascript/src/vue_shared/components/RequestFieldInput.vue?0cae","webpack:///./app/javascript/src/vue_shared/components/RequestFieldInput.vue","webpack:///./app/javascript/src/pages/create_request/components/create_request.vue?d264","webpack:///./app/javascript/src/pages/create_request/components/create_request.vue?e8da","webpack:///./app/javascript/src/pages/create_request/components/create_request.vue?6e3a","webpack:///./app/javascript/src/pages/create_request/components/create_request.vue"],"names":["methods","setupEvaporateFileUploader","_this","Evaporate","create","aws_key","process","bucket","awsRegion","signerUrl","awsSignatureVersion","partSize","sendCanonicalRequestToSignerUrl","onlyRetryForSameFileName","computeContentMd5","mockLocalStorage","cryptoMd5Method","data","AWS","util","crypto","md5","cryptoHexEncodedHash256","sha256","then","evaporateResponse","catch","e","nrError","Error","cause","NrSentry","captureError","FieldType","_hoisted_1","key","class","_hoisted_2","__name","props","definition","modelValue","emits","setup","__props","__emit","emit","typedProps","value","field_type","Text","type_settings","Checkbox","Array","isArray","noLabel","hideLabel","labelText","isChecked","option","currentlyChecked","some","checked","uuid","isCheckboxValid","isMandatory","length","_ctx","_cache","type","fieldValue","tag","isTextArea","label","placeholder","placeholderText","help","helperText","required","maxLength","characterLimitMax","toString","minLength","characterLimitMin","withTooltip","tooltipText","iconTooltipText","options","name","alreadyChecked","selectedOptions","filter","other","checkOption","__exports__","id","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","_hoisted_9","_hoisted_10","_hoisted_11","_hoisted_12","_hoisted_13","_hoisted_14","_hoisted_15","_hoisted_16","_hoisted_17","_hoisted_18","_hoisted_19","_hoisted_20","_hoisted_21","_hoisted_22","_hoisted_23","_hoisted_24","_hoisted_25","_hoisted_26","_hoisted_27","_hoisted_28","_hoisted_29","_hoisted_30","_hoisted_31","_hoisted_32","_hoisted_33","_hoisted_34","_hoisted_35","_hoisted_36","_hoisted_37","_hoisted_38","_hoisted_39","_hoisted_40","for","_hoisted_41","_hoisted_42","_hoisted_43","selected","_hoisted_44","_hoisted_45","_hoisted_46","_hoisted_47","_hoisted_48","_hoisted_49","_hoisted_50","_hoisted_51","_hoisted_52","_hoisted_53","_hoisted_54","_hoisted_55","_hoisted_56","_hoisted_57","_hoisted_58","_hoisted_59","_hoisted_60","EMAIL_REGEX","mixins","components","DocumentUploadModal","NrIcon","NrSelect","NrFormInput","NrFormSelect","NrButton","NrTooltip","NrDatepicker","RequestFieldInput","showNoRequesterEmailModal","isMakingRequest","invisibleCaptcha","dateReceived","Date","departmentSearchTerm","documentsToAdd","formats","formatReceived","embargoVisibilityTip","emailDisabled","emailNotice","keywordAlerts","requestText","isRequesterValid","email","phone","address","city","state","zip","requester","company","selectedDepartments","selectedFolder","showUploadModal","states","termsAndConditionsChecked","uploadedDocuments","requestVisibility","isRequesterFieldsDisabled","customFields","requestFields","mounted","this","getNewRequestData","handleRequestInput","parseQueryParams","computed","account","currentUser","showDepartments","$can","show_dept_select","departmentRequired","require_department","departments","sidebarRequestText","sidebar_request_text","subheader","request_page_subheader","termsAndConditions","terms_and_conditions","requesterRequired","required_fields","defaultVisibility","visibility_default","showRequester","show_requester","usStates","map","isRequesterFieldsValid","Object","keys","every","hasRequiredRequestFields","field","trim","disabledCreate","selectedDeptIds","termsAndConditionsRequired","noDeptsSelected","multipleDeptSelection","department","formatedFormData","phone_number","zipcode","request_date","request_submit_type_id","visibility","request_text","documents","custom_field_data","request_field_values","request_field_version_id","version_id","folder","folder_name","request","department_ids","get","set","visibilityTips","restricted_visibilities_feature_flag","tip","join","visibilities","isSignedIn","canManageDocuments","s3Bucket","departmentSelectionText","isOptional","createRequestClassnames","handleCreateRequestByRole","no_email","createRequest","toggleNoRequesterEmailModal","handleRequesterInputValidState","isValid","validState","assign","validateEmailInput","input","test","http","pretty_id","window","location","href","err","response","error","errorMessage","$toasted","handleEmailInput","handleEmailCheck","encodeURIComponent","accountUser","enabled","setRequesterInfo","console","info","handleFolderSelection","names","pop","text","search_text","handleDocumentUploads","document","push","handleDocumentRemoveClick","assetUrl","url","success","handleUploadModalClick","toggleUploadModal","undefined","embargo_visibility_tooltip","custom_fields","request_fields","email_or_name","handleSaveDocumentsToRequest","handleDepartmentSelectionEvent","eventType","$route","query","deptId","dept","find","formatDate","date","watch","next","_prev","disabled","$props","$setup","$data","$options","_component_NrFormInput","_component_nr_editor","_component_NrIcon","_component_NrButton","_component_NrTooltip","_component_NrSelect","_component_RequestFieldInput","_component_NrFormSelect","_component_NrDatepicker","_component_nr_documentuploadmodal","_component_nr_modal","innerHTML","onSubmit","$event","bulletList","orderedList","autofocus","rows","onInput","alert","index","variant","title","onClick","default","_","onSearch","multiple","slug","description","position","validations","message","validate","onBlur","onOnValidate","readonly","maxDate","trigger","format","show","folders","isModalActive","onOnCloseModal","onOnFileUploadComplete","onOnSubmit","onSelectedFolder","secondaryButtonText","primaryButtonText","hasSecondaryButton","onOnSecondaryClick","onOnCloseClick","onOnPrimaryClick"],"mappings":"gHAAA,mDAIe,KACbA,QAAS,CACPC,2BAA0B,WAAI,IAADC,EAAA,KAC3BC,IAAUC,OAAO,CACfC,QAASC,uBACTC,OAAQD,iBACRE,UAAWF,YACXG,UAAW,iBACXC,oBAAqB,IAErBC,SAAU,SACVC,iCAAiC,EACjCC,0BAA0B,EAC1BC,mBAAmB,EACnBC,kBAAkB,EAClBC,gBAAiB,SAACC,GAChB,OAAOC,IAAIC,KAAKC,OAAOC,IAAIJ,EAAM,SACnC,EACAK,wBAAyB,SAACL,GACxB,OAAOC,IAAIC,KAAKC,OAAOG,OAAON,EAAM,MACtC,IAECO,MAAK,SAACP,GAELf,EAAKuB,kBAAoBR,CAC3B,IACCS,OAAM,SAACC,GACN,IAAMC,EAAU,IAAIC,MAAM,0BAA2B,CACnDC,MAAOH,IAETI,IAASC,aAAaJ,EACxB,GACJ,G,2DCpCJ,O,wCCAY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":"js/CreateRequestPage-0a983cd81323ed6663f3.chunk.js","sourcesContent":["import Evaporate from 'evaporate'\nimport AWS from 'aws-sdk/global'\nimport NrSentry from '../utils/nr_sentry'\n\nexport default {\n methods: {\n setupEvaporateFileUploader() {\n Evaporate.create({\n aws_key: process.env.S3_MULTIPART_UPLOAD_KEY_ID, // Required\n bucket: process.env.S3_BUCKET, // Required\n awsRegion: process.env.S3_AWS_REGION, // Defaults to us-east-1\n signerUrl: '/aws_signature', // Required\n awsSignatureVersion: '4',\n // partSize - 20 MB per part. AWS's 10,000 part maximum means max upload size is 195 GB.\n partSize: 20 * 1024 * 1024,\n sendCanonicalRequestToSignerUrl: true,\n onlyRetryForSameFileName: true,\n computeContentMd5: true,\n mockLocalStorage: true,\n cryptoMd5Method: (data) => {\n return AWS.util.crypto.md5(data, 'base64')\n },\n cryptoHexEncodedHash256: (data) => {\n return AWS.util.crypto.sha256(data, 'hex')\n }\n })\n .then((data) => {\n // set state so we know Evaporate.js is ready to upload docs to s3\n this.evaporateResponse = data\n })\n .catch((e) => {\n const nrError = new Error('Evaporate.create failed', {\n cause: e\n })\n NrSentry.captureError(nrError)\n })\n }\n }\n}\n","export * from \"-!../../../../../node_modules/mini-css-extract-plugin/dist/loader.js!../../../../../node_modules/css-loader/dist/cjs.js??ref--7-1!../../../../../node_modules/vue-loader/dist/stylePostLoader.js!../../../../../node_modules/postcss-loader/src/index.js??ref--7-2!../../../../../node_modules/sass-loader/dist/cjs.js??ref--7-3!../../../../../node_modules/vue-loader/dist/index.js??ref--21-0!./RequestFieldInput.vue?vue&type=style&index=0&id=27551116&scoped=true&lang=scss\"","export enum FieldType {\n Text = 'text',\n Checkbox = 'checkbox'\n}\n\nexport type RequestFieldValue = string\n\nexport interface TextSettings {\n isMandatory: boolean\n labelText: string | null\n hideLabel: boolean\n placeholderText: string | null\n helperText: string | null\n tooltipText: string | null\n isTextArea: boolean\n characterLimitMin: number | null\n characterLimitMax: number | null\n}\n\nexport interface CheckboxOption {\n uuid: string\n name: string\n}\n\nexport interface CheckboxSettings {\n isMandatory: boolean\n labelText: string | null\n hideLabel: boolean\n options: CheckboxOption[]\n}\n\nexport type TypedSettings =\n | {\n field_type: FieldType.Text // eslint-disable-line camelcase\n type_settings: TextSettings // eslint-disable-line camelcase\n }\n | {\n field_type: FieldType.Checkbox // eslint-disable-line camelcase\n type_settings: CheckboxSettings // eslint-disable-line camelcase\n }\n\nexport type FieldDefinition = {\n id: number\n version_id: number // eslint-disable-line camelcase\n visibility: string\n} & TypedSettings\n","import { defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, normalizeClass as _normalizeClass, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, toDisplayString as _toDisplayString, createElementBlock as _createElementBlock, renderList as _renderList, Fragment as _Fragment, createVNode as _createVNode, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-27551116\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = {\n key: 1,\n class: \"checkbox-group\"\n}\nconst _hoisted_2 = {\n key: 1,\n class: \"help is-danger\"\n}\n\nimport { computed } from 'vue'\nimport { isEmpty } from 'lodash'\nimport NrFormInput from '@nextrequestco/components/src/components/NrFormInput/nr-form-input.vue'\nimport {\n FieldType,\n FieldDefinition,\n CheckboxOption,\n TextSettings,\n CheckboxSettings,\n RequestFieldValue\n} from '../types/request_fields'\n\ntype TypedProps =\n | {\n field_type: FieldType.Text // eslint-disable-line camelcase\n type_settings: TextSettings // eslint-disable-line camelcase\n modelValue: string\n }\n | {\n field_type: FieldType.Checkbox // eslint-disable-line camelcase\n type_settings: CheckboxSettings // eslint-disable-line camelcase\n modelValue: CheckboxOption[]\n }\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'RequestFieldInput',\n props: {\n definition: {},\n modelValue: {}\n },\n emits: [\"update:modelValue\"],\n setup(__props: any, { emit: __emit }) {\n\nconst props = __props\nconst emit = __emit\n\n// This combines the definition and modelValue into one type so that code can know the type of the `modelValue` depending on the `field_type`.\nconst typedProps = computed(() => {\n let value = props.modelValue\n switch (props.definition.field_type) {\n case FieldType.Text:\n value = value || ''\n if (typeof value !== 'string') {\n throw new Error('Unexpected type')\n }\n return {\n field_type: props.definition.field_type,\n modelValue: value || '',\n type_settings: props.definition.type_settings\n }\n case FieldType.Checkbox:\n value = value || []\n if (!Array.isArray(value)) {\n throw new Error('Unexpected type')\n }\n return {\n field_type: props.definition.field_type,\n modelValue: value,\n type_settings: props.definition.type_settings\n }\n default:\n throw new Error('Unexpected field type')\n }\n})\n\nconst noLabel = computed(\n () =>\n props.definition.type_settings.hideLabel ||\n isEmpty(props.definition.type_settings.labelText)\n)\n\nconst isChecked = (\n option: CheckboxOption,\n currentlyChecked: CheckboxOption[]\n) => {\n return currentlyChecked.some((checked) => checked.uuid === option.uuid)\n}\n\nconst checkOption = (\n option: CheckboxOption,\n checked: boolean,\n currentlyChecked: CheckboxOption[]\n) => {\n const alreadyChecked = isChecked(option, currentlyChecked)\n if (alreadyChecked && !checked) {\n const selectedOptions: CheckboxOption[] = currentlyChecked.filter(\n (other: CheckboxOption) => other.uuid !== option.uuid\n )\n emit('update:modelValue', selectedOptions)\n } else if (!alreadyChecked && checked) {\n const selectedOptions: CheckboxOption[] = [\n option,\n ...(currentlyChecked || [])\n ]\n emit('update:modelValue', selectedOptions)\n }\n}\nconst isCheckboxValid = computed(() => {\n return (\n !typedProps.value.type_settings.isMandatory ||\n (typedProps.value.modelValue && typedProps.value.modelValue.length > 0)\n )\n})\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(_Fragment, null, [\n (typedProps.value.field_type === _unref(FieldType).Text)\n ? (_openBlock(), _createBlock(NrFormInput, {\n key: 0,\n type: \"text\",\n modelValue: typedProps.value.modelValue,\n \"onUpdate:modelValue\": _cache[0] || (_cache[0] = \n (fieldValue) => emit('update:modelValue', fieldValue)\n ),\n tag: typedProps.value.type_settings.isTextArea ? 'textarea' : 'input',\n label: typedProps.value.type_settings.labelText,\n hideLabel: noLabel.value,\n class: _normalizeClass(noLabel.value ? 'request-field-no-label' : null),\n placeholder: typedProps.value.type_settings.placeholderText,\n help: typedProps.value.type_settings.helperText,\n required: typedProps.value.type_settings.isMandatory,\n maxLength: typedProps.value.type_settings.characterLimitMax?.toString(),\n minLength: typedProps.value.type_settings.characterLimitMin?.toString(),\n withTooltip: !_unref(isEmpty)(typedProps.value.type_settings.tooltipText),\n iconTooltipText: typedProps.value.type_settings.tooltipText\n }, null, 8, [\"modelValue\", \"tag\", \"label\", \"hideLabel\", \"class\", \"placeholder\", \"help\", \"required\", \"maxLength\", \"minLength\", \"withTooltip\", \"iconTooltipText\"]))\n : _createCommentVNode(\"\", true),\n (typedProps.value.field_type === _unref(FieldType).Checkbox)\n ? (_openBlock(), _createElementBlock(\"fieldset\", _hoisted_1, [\n (typedProps.value.type_settings.labelText)\n ? (_openBlock(), _createElementBlock(\"legend\", {\n key: 0,\n class: _normalizeClass(noLabel.value ? 'is-sr-only' : 'checkbox-header')\n }, _toDisplayString(typedProps.value.type_settings.labelText) + \" \" + _toDisplayString(typedProps.value.type_settings.isMandatory ? '*' : ''), 3))\n : _createCommentVNode(\"\", true),\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(typedProps.value.type_settings.options, (option) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n key: option.uuid,\n class: \"checkbox-item\"\n }, [\n _createVNode(NrFormInput, {\n type: \"checkbox\",\n label: option.name,\n modelValue: isChecked(option, typedProps.value.modelValue),\n \"onUpdate:modelValue\": \n (checked) =>\n checkOption(option, checked, typedProps.value.modelValue)\n \n }, null, 8, [\"label\", \"modelValue\", \"onUpdate:modelValue\"])\n ]))\n }), 128)),\n (!isCheckboxValid.value)\n ? (_openBlock(), _createElementBlock(\"p\", _hoisted_2, \" At least one option must be selected. \"))\n : _createCommentVNode(\"\", true)\n ]))\n : _createCommentVNode(\"\", true)\n ], 64))\n}\n}\n\n})","import script from \"./RequestFieldInput.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./RequestFieldInput.vue?vue&type=script&setup=true&lang=ts\"\n\nimport \"./RequestFieldInput.vue?vue&type=style&index=0&id=27551116&scoped=true&lang=scss\"\n\nimport exportComponent from \"/app/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-27551116\"]])\n\nexport default __exports__","export * from \"-!../../../../../../node_modules/mini-css-extract-plugin/dist/loader.js!../../../../../../node_modules/css-loader/dist/cjs.js??ref--7-1!../../../../../../node_modules/vue-loader/dist/stylePostLoader.js!../../../../../../node_modules/postcss-loader/src/index.js??ref--7-2!../../../../../../node_modules/sass-loader/dist/cjs.js??ref--7-3!../../../../../../node_modules/vue-loader/dist/index.js??ref--21-0!./create_request.vue?vue&type=style&index=0&id=1c563ad6&lang=scss\"","import { createElementVNode as _createElementVNode, resolveComponent as _resolveComponent, createVNode as _createVNode, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, toDisplayString as _toDisplayString, withModifiers as _withModifiers, withCtx as _withCtx, createBlock as _createBlock, createCommentVNode as _createCommentVNode, createTextVNode as _createTextVNode, vModelSelect as _vModelSelect, withDirectives as _withDirectives, normalizeClass as _normalizeClass } from \"vue\"\n\nconst _hoisted_1 = {\n id: \"skip-to-main-content\",\n class: \"create-request-page container mb-6\"\n}\nconst _hoisted_2 = { class: \"section\" }\nconst _hoisted_3 = { class: \"columns is-variable\" }\nconst _hoisted_4 = { class: \"column is-7\" }\nconst _hoisted_5 = /*#__PURE__*/_createElementVNode(\"h1\", { class: \"is-uppercase is-size-5 has-text-weight-bold\" }, \" Request a public record \", -1)\nconst _hoisted_6 = [\"innerHTML\"]\nconst _hoisted_7 = { class: \"block\" }\nconst _hoisted_8 = { class: \"field\" }\nconst _hoisted_9 = { \"aria-live\": \"polite\" }\nconst _hoisted_10 = [\"innerHTML\"]\nconst _hoisted_11 = { class: \"field\" }\nconst _hoisted_12 = { class: \"document-upload\" }\nconst _hoisted_13 = {\n key: 0,\n class: \"document-upload__list\"\n}\nconst _hoisted_14 = /*#__PURE__*/_createElementVNode(\"p\", null, \"Upload and attach files (optional)\", -1)\nconst _hoisted_15 = {\n key: 0,\n class: \"field\"\n}\nconst _hoisted_16 = {\n key: 0,\n class: \"block\"\n}\nconst _hoisted_17 = /*#__PURE__*/_createElementVNode(\"h2\", { class: \"is-uppercase is-size-5 has-text-weight-bold\" }, \" Requester information \", -1)\nconst _hoisted_18 = { class: \"field\" }\nconst _hoisted_19 = { class: \"columns is-variable\" }\nconst _hoisted_20 = { class: \"column\" }\nconst _hoisted_21 = { class: \"column is-3\" }\nconst _hoisted_22 = { class: \"column is-3\" }\nconst _hoisted_23 = {\n key: 1,\n class: \"block\"\n}\nconst _hoisted_24 = /*#__PURE__*/_createElementVNode(\"h2\", { class: \"is-uppercase is-size-5 has-text-weight-bold\" }, \" Your information \", -1)\nconst _hoisted_25 = { class: \"columns is-variable\" }\nconst _hoisted_26 = { class: \"column\" }\nconst _hoisted_27 = { class: \"column is-3\" }\nconst _hoisted_28 = { class: \"column is-3\" }\nconst _hoisted_29 = {\n key: 2,\n class: \"block\"\n}\nconst _hoisted_30 = /*#__PURE__*/_createElementVNode(\"h2\", { class: \"is-size-5 has-text-weight-bold\" }, \" Terms and Conditions \", -1)\nconst _hoisted_31 = [\"innerHTML\"]\nconst _hoisted_32 = /*#__PURE__*/_createElementVNode(\"hr\", null, null, -1)\nconst _hoisted_33 = { class: \"field\" }\nconst _hoisted_34 = {\n key: 3,\n class: \"block\"\n}\nconst _hoisted_35 = /*#__PURE__*/_createElementVNode(\"h2\", { class: \"is-uppercase is-size-5 has-text-weight-bold\" }, \" Additional request information \", -1)\nconst _hoisted_36 = { class: \"columns is-variable\" }\nconst _hoisted_37 = { class: \"column is-4\" }\nconst _hoisted_38 = { class: \"column is-4\" }\nconst _hoisted_39 = { class: \"field\" }\nconst _hoisted_40 = /*#__PURE__*/_createElementVNode(\"label\", {\n class: \"label\",\n for: \"formatReceived\"\n}, \" Format received \", -1)\nconst _hoisted_41 = { class: \"control\" }\nconst _hoisted_42 = { class: \"select\" }\nconst _hoisted_43 = /*#__PURE__*/_createElementVNode(\"option\", {\n selected: \"\",\n value: \"\"\n}, \"Select\", -1)\nconst _hoisted_44 = [\"value\"]\nconst _hoisted_45 = {\n key: 0,\n class: \"column is-4\"\n}\nconst _hoisted_46 = { class: \"field\" }\nconst _hoisted_47 = {\n class: \"label\",\n for: \"visibility\"\n}\nconst _hoisted_48 = [\"innerHTML\"]\nconst _hoisted_49 = { class: \"control\" }\nconst _hoisted_50 = { class: \"select\" }\nconst _hoisted_51 = [\"value\", \"selected\"]\nconst _hoisted_52 = /*#__PURE__*/_createElementVNode(\"div\", null, null, -1)\nconst _hoisted_53 = { class: \"block mt-6\" }\nconst _hoisted_54 = /*#__PURE__*/_createElementVNode(\"div\", { class: \"block\" }, [\n /*#__PURE__*/_createElementVNode(\"p\", null, \"* Indicates required field\")\n], -1)\nconst _hoisted_55 = { class: \"column is-4 is-offset-1\" }\nconst _hoisted_56 = { class: \"notification content\" }\nconst _hoisted_57 = [\"innerHTML\"]\nconst _hoisted_58 = /*#__PURE__*/_createElementVNode(\"h3\", { class: \"is-size-5\" }, \"Tips\", -1)\nconst _hoisted_59 = /*#__PURE__*/_createElementVNode(\"ul\", null, [\n /*#__PURE__*/_createElementVNode(\"li\", null, \" Don't put personal information, like your social security number in your public request. \"),\n /*#__PURE__*/_createElementVNode(\"li\", null, \" If you don't know the name of the record, describe the information you believe is contained in it. \")\n], -1)\nconst _hoisted_60 = /*#__PURE__*/_createElementVNode(\"div\", { class: \"content\" }, [\n /*#__PURE__*/_createElementVNode(\"p\", null, \" Are you sure? If you don't provide an email address, you won't be able to: \"),\n /*#__PURE__*/_createElementVNode(\"ul\", null, [\n /*#__PURE__*/_createElementVNode(\"li\", null, \"receive automatic email updates about request status\"),\n /*#__PURE__*/_createElementVNode(\"li\", null, \"see the request status here whenever you choose\"),\n /*#__PURE__*/_createElementVNode(\"li\", null, \" easily download your documents from this site unless this request is made available to the general public \"),\n /*#__PURE__*/_createElementVNode(\"li\", null, \" have your contact information automatically added to any future requests \")\n ]),\n /*#__PURE__*/_createElementVNode(\"p\", null, \" If you wish to continue anyway without providing an email address, click \\\"Continue\\\". \")\n], -1)\n\nexport function render(_ctx: any,_cache: any,$props: any,$setup: any,$data: any,$options: any) {\n const _component_NrFormInput = _resolveComponent(\"NrFormInput\")!\n const _component_nr_editor = _resolveComponent(\"nr-editor\")!\n const _component_NrIcon = _resolveComponent(\"NrIcon\")!\n const _component_NrButton = _resolveComponent(\"NrButton\")!\n const _component_NrTooltip = _resolveComponent(\"NrTooltip\")!\n const _component_NrSelect = _resolveComponent(\"NrSelect\")!\n const _component_RequestFieldInput = _resolveComponent(\"RequestFieldInput\")!\n const _component_NrFormSelect = _resolveComponent(\"NrFormSelect\")!\n const _component_NrDatepicker = _resolveComponent(\"NrDatepicker\")!\n const _component_nr_documentuploadmodal = _resolveComponent(\"nr-documentuploadmodal\")!\n const _component_nr_modal = _resolveComponent(\"nr-modal\")!\n\n return (_openBlock(), _createElementBlock(\"main\", _hoisted_1, [\n _createElementVNode(\"section\", _hoisted_2, [\n _createElementVNode(\"div\", _hoisted_3, [\n _createElementVNode(\"div\", _hoisted_4, [\n _hoisted_5,\n _createElementVNode(\"div\", {\n innerHTML: _ctx.subheader,\n class: \"content\"\n }, null, 8, _hoisted_6),\n _createElementVNode(\"form\", {\n class: \"block\",\n onSubmit: _cache[38] || (_cache[38] = _withModifiers(() => {}, [\"prevent\",\"stop\"]))\n }, [\n _createElementVNode(\"div\", _hoisted_7, [\n _createVNode(_component_NrFormInput, {\n modelValue: _ctx.invisibleCaptcha,\n \"onUpdate:modelValue\": _cache[0] || (_cache[0] = ($event: any) => ((_ctx.invisibleCaptcha) = $event)),\n name: \"description\",\n class: \"description\",\n label: \"Description\"\n }, null, 8, [\"modelValue\"]),\n _createElementVNode(\"div\", _hoisted_8, [\n _createVNode(_component_nr_editor, {\n bulletList: \"\",\n label: \"Request description\",\n orderedList: \"\",\n autofocus: \"\",\n placeholder: \"Enter your request - please include all information that could help fulfill this request.\",\n rows: 12,\n \"data-id\": \"request_text\",\n modelValue: _ctx.requestText,\n \"onUpdate:modelValue\": _cache[1] || (_cache[1] = ($event: any) => ((_ctx.requestText) = $event)),\n onInput: _ctx.handleRequestInput\n }, null, 8, [\"modelValue\", \"onInput\"]),\n _createElementVNode(\"div\", _hoisted_9, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.keywordAlerts, (alert, index) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n innerHTML: alert,\n key: `request-alert-${index}`,\n class: \"notification is-warning\"\n }, null, 8, _hoisted_10))\n }), 128))\n ])\n ]),\n _createElementVNode(\"div\", _hoisted_11, [\n _createElementVNode(\"div\", _hoisted_12, [\n (!!_ctx.documentsToAdd.length)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_13, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.documentsToAdd, (document) => {\n return (_openBlock(), _createBlock(_component_NrButton, {\n variant: \"minimal-neutral\",\n class: \"has-icon document-upload__list-item\",\n \"aria-label\": `Remove document: ${document.title}`,\n key: document.id,\n onClick: _withModifiers(($event: any) => (_ctx.handleDocumentRemoveClick(document.url)), [\"prevent\"])\n }, {\n default: _withCtx(() => [\n _createElementVNode(\"span\", null, _toDisplayString(document.title), 1),\n _createVNode(_component_NrIcon, {\n name: \"times\",\n class: \"m-left-8\"\n })\n ]),\n _: 2\n }, 1032, [\"aria-label\", \"onClick\"]))\n }), 128))\n ]))\n : _createCommentVNode(\"\", true),\n _hoisted_14,\n (_ctx.isSignedIn)\n ? (_openBlock(), _createBlock(_component_NrButton, {\n key: 1,\n onClick: _withModifiers(_ctx.handleUploadModalClick, [\"prevent\"]),\n variant: \"filled-neutral\"\n }, {\n default: _withCtx(() => [\n _createTextVNode(\" Choose file(s) \")\n ]),\n _: 1\n }, 8, [\"onClick\"]))\n : (_openBlock(), _createBlock(_component_NrTooltip, {\n key: 2,\n label: \"Need to upload supporting documentation? If you have a NextRequest account for this agency, sign in to enable the upload button. Otherwise, finish making your request. You will be prompted to set up a your new user account which will allow you to upload any supporting documents on the request after it has been submitted.\"\n }, {\n default: _withCtx(() => [\n _createVNode(_component_NrButton, {\n disabled: true,\n variant: \"filled-neutral\"\n }, {\n default: _withCtx(() => [\n _createTextVNode(\" Choose file(s) \")\n ]),\n _: 1\n })\n ]),\n _: 1\n }))\n ])\n ]),\n (_ctx.showDepartments)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_15, [\n _createVNode(_component_NrSelect, {\n label: \"name\",\n placeholder: _ctx.departmentSelectionText,\n modelValue: _ctx.selectedDepartments,\n \"onUpdate:modelValue\": _cache[2] || (_cache[2] = ($event: any) => ((_ctx.selectedDepartments) = $event)),\n onInput: _cache[3] || (_cache[3] = ($event: any) => (_ctx.handleDepartmentSelectionEvent('input', $event))),\n onSearch: _cache[4] || (_cache[4] = ($event: any) => (_ctx.handleDepartmentSelectionEvent('typing', $event))),\n options: _ctx.departments,\n required: !!_ctx.departmentRequired,\n multiple: _ctx.multipleDeptSelection,\n class: \"department-select\"\n }, {\n label: _withCtx(() => [\n _createTextVNode(_toDisplayString(_ctx.departmentRequired) + \" Department\" + _toDisplayString(_ctx.multipleDeptSelection ? 's' : ''), 1)\n ]),\n _: 1\n }, 8, [\"placeholder\", \"modelValue\", \"options\", \"required\", \"multiple\"])\n ]))\n : _createCommentVNode(\"\", true),\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.customFields || [], (field, index) => {\n return (_openBlock(), _createBlock(_component_NrFormInput, {\n key: field.slug,\n label: field.label,\n description: field.description,\n name: field.slug,\n modelValue: _ctx.customFields[index].value,\n \"onUpdate:modelValue\": ($event: any) => ((_ctx.customFields[index].value) = $event)\n }, null, 8, [\"label\", \"description\", \"name\", \"modelValue\", \"onUpdate:modelValue\"]))\n }), 128)),\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.requestFields, (field) => {\n return (_openBlock(), _createBlock(_component_RequestFieldInput, {\n definition: field.definition,\n key: field.definition.id,\n modelValue: field.value,\n \"onUpdate:modelValue\": ($event: any) => ((field.value) = $event)\n }, null, 8, [\"definition\", \"modelValue\", \"onUpdate:modelValue\"]))\n }), 128))\n ]),\n (_ctx.$can('read', 'staff_only_items'))\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_16, [\n _hoisted_17,\n _createVNode(_component_NrTooltip, {\n position: \"right\",\n label: \"Personal information is visible only to staff by default,\\n but requests are part of the public record and the\\n information may be released in response to a public\\n records request.\"\n }, {\n default: _withCtx(() => [\n _createTextVNode(\" Who can see this information? \"),\n _createVNode(_component_NrIcon, {\n class: \"info-circle-icon request-personal-information-icon\",\n name: \"info-circle\"\n })\n ]),\n _: 1\n }),\n _createVNode(_component_NrFormInput, {\n label: \"Email\",\n type: \"email\",\n name: \"email\",\n modelValue: _ctx.requester.email,\n \"onUpdate:modelValue\": _cache[5] || (_cache[5] = ($event: any) => ((_ctx.requester.email) = $event)),\n help: _ctx.emailNotice,\n disabled: _ctx.emailDisabled,\n validations: {\n email: {\n message: 'Email must be valid.',\n validate: _ctx.validateEmailInput\n }\n },\n onBlur: _ctx.handleEmailCheck,\n onInput: _ctx.handleEmailInput,\n onOnValidate: _cache[6] || (_cache[6] = ($event: any) => (_ctx.handleRequesterInputValidState('email', $event)))\n }, null, 8, [\"modelValue\", \"help\", \"disabled\", \"validations\", \"onBlur\", \"onInput\"]),\n _createElementVNode(\"div\", _hoisted_18, [\n _createVNode(_component_NrFormInput, {\n type: \"checkbox\",\n label: \"No email address available\",\n name: \"no_email\",\n modelValue: _ctx.emailDisabled,\n \"onUpdate:modelValue\": _cache[7] || (_cache[7] = ($event: any) => ((_ctx.emailDisabled) = $event))\n }, null, 8, [\"modelValue\"])\n ]),\n _createVNode(_component_NrFormInput, {\n label: \"Name\",\n name: \"name\",\n modelValue: _ctx.requester.name,\n \"onUpdate:modelValue\": _cache[8] || (_cache[8] = ($event: any) => ((_ctx.requester.name) = $event)),\n disabled: _ctx.isRequesterFieldsDisabled,\n required: !!_ctx.requesterRequired,\n onOnValidate: _cache[9] || (_cache[9] = ($event: any) => (_ctx.handleRequesterInputValidState('name', $event)))\n }, null, 8, [\"modelValue\", \"disabled\", \"required\"]),\n _createVNode(_component_NrFormInput, {\n label: \"Phone\",\n name: \"phone_number\",\n modelValue: _ctx.requester.phone,\n \"onUpdate:modelValue\": _cache[10] || (_cache[10] = ($event: any) => ((_ctx.requester.phone) = $event)),\n disabled: _ctx.isRequesterFieldsDisabled,\n required: !!_ctx.requesterRequired,\n onOnValidate: _cache[11] || (_cache[11] = ($event: any) => (_ctx.handleRequesterInputValidState('phone', $event)))\n }, null, 8, [\"modelValue\", \"disabled\", \"required\"]),\n _createVNode(_component_NrFormInput, {\n label: \"Street address\",\n name: \"street_address\",\n tag: \"textarea\",\n modelValue: _ctx.requester.address,\n \"onUpdate:modelValue\": _cache[12] || (_cache[12] = ($event: any) => ((_ctx.requester.address) = $event)),\n disabled: _ctx.isRequesterFieldsDisabled,\n required: !!_ctx.requesterRequired,\n onOnValidate: _cache[13] || (_cache[13] = ($event: any) => (\n _ctx.handleRequesterInputValidState('address', $event)\n ))\n }, null, 8, [\"modelValue\", \"disabled\", \"required\"]),\n _createElementVNode(\"div\", _hoisted_19, [\n _createElementVNode(\"div\", _hoisted_20, [\n _createVNode(_component_NrFormInput, {\n label: \"City\",\n name: \"city\",\n modelValue: _ctx.requester.city,\n \"onUpdate:modelValue\": _cache[14] || (_cache[14] = ($event: any) => ((_ctx.requester.city) = $event)),\n disabled: _ctx.isRequesterFieldsDisabled,\n required: !!_ctx.requesterRequired,\n onOnValidate: _cache[15] || (_cache[15] = ($event: any) => (\n _ctx.handleRequesterInputValidState('city', $event)\n ))\n }, null, 8, [\"modelValue\", \"disabled\", \"required\"])\n ]),\n _createElementVNode(\"div\", _hoisted_21, [\n _createVNode(_component_NrFormSelect, {\n label: \"State\",\n name: \"state\",\n \"include-blank\": \"\",\n modelValue: _ctx.requester.state,\n \"onUpdate:modelValue\": _cache[16] || (_cache[16] = ($event: any) => ((_ctx.requester.state) = $event)),\n disabled: _ctx.isRequesterFieldsDisabled,\n required: !!_ctx.requesterRequired,\n options: _ctx.usStates\n }, null, 8, [\"modelValue\", \"disabled\", \"required\", \"options\"])\n ]),\n _createElementVNode(\"div\", _hoisted_22, [\n _createVNode(_component_NrFormInput, {\n label: \"Zip\",\n name: \"zip\",\n modelValue: _ctx.requester.zip,\n \"onUpdate:modelValue\": _cache[17] || (_cache[17] = ($event: any) => ((_ctx.requester.zip) = $event)),\n disabled: _ctx.isRequesterFieldsDisabled,\n required: !!_ctx.requesterRequired,\n onOnValidate: _cache[18] || (_cache[18] = ($event: any) => (\n _ctx.handleRequesterInputValidState('zip', $event)\n ))\n }, null, 8, [\"modelValue\", \"disabled\", \"required\"])\n ])\n ]),\n _createVNode(_component_NrFormInput, {\n label: \"Company\",\n name: \"company\",\n modelValue: _ctx.requester.company,\n \"onUpdate:modelValue\": _cache[19] || (_cache[19] = ($event: any) => ((_ctx.requester.company) = $event)),\n disabled: _ctx.isRequesterFieldsDisabled\n }, null, 8, [\"modelValue\", \"disabled\"])\n ]))\n : (_openBlock(), _createElementBlock(\"div\", _hoisted_23, [\n _hoisted_24,\n _createVNode(_component_NrFormInput, {\n label: \"Email\",\n type: \"email\",\n name: \"email\",\n modelValue: _ctx.requester.email,\n \"onUpdate:modelValue\": _cache[20] || (_cache[20] = ($event: any) => ((_ctx.requester.email) = $event)),\n disabled: _ctx.isSignedIn && !_ctx.$can('read', 'staff_only_items'),\n readonly: _ctx.isSignedIn && !_ctx.$can('read', 'staff_only_items'),\n validations: {\n email: {\n message: 'Email must be valid.',\n validate: _ctx.validateEmailInput\n }\n },\n onOnValidate: _cache[21] || (_cache[21] = ($event: any) => (_ctx.handleRequesterInputValidState('email', $event)))\n }, null, 8, [\"modelValue\", \"disabled\", \"readonly\", \"validations\"]),\n _createVNode(_component_NrFormInput, {\n label: \"Name\",\n name: \"name\",\n modelValue: _ctx.requester.name,\n \"onUpdate:modelValue\": _cache[22] || (_cache[22] = ($event: any) => ((_ctx.requester.name) = $event)),\n required: !!_ctx.requesterRequired,\n onOnValidate: _cache[23] || (_cache[23] = ($event: any) => (_ctx.handleRequesterInputValidState('name', $event)))\n }, null, 8, [\"modelValue\", \"required\"]),\n _createVNode(_component_NrFormInput, {\n label: \"Phone\",\n name: \"phone_number\",\n modelValue: _ctx.requester.phone,\n \"onUpdate:modelValue\": _cache[24] || (_cache[24] = ($event: any) => ((_ctx.requester.phone) = $event)),\n required: !!_ctx.requesterRequired,\n onOnValidate: _cache[25] || (_cache[25] = ($event: any) => (_ctx.handleRequesterInputValidState('phone', $event)))\n }, null, 8, [\"modelValue\", \"required\"]),\n _createVNode(_component_NrFormInput, {\n label: \"Street address\",\n name: \"street_address\",\n tag: \"textarea\",\n modelValue: _ctx.requester.address,\n \"onUpdate:modelValue\": _cache[26] || (_cache[26] = ($event: any) => ((_ctx.requester.address) = $event)),\n required: !!_ctx.requesterRequired,\n onOnValidate: _cache[27] || (_cache[27] = ($event: any) => (\n _ctx.handleRequesterInputValidState('address', $event)\n ))\n }, null, 8, [\"modelValue\", \"required\"]),\n _createElementVNode(\"div\", _hoisted_25, [\n _createElementVNode(\"div\", _hoisted_26, [\n _createVNode(_component_NrFormInput, {\n label: \"City\",\n name: \"city\",\n modelValue: _ctx.requester.city,\n \"onUpdate:modelValue\": _cache[28] || (_cache[28] = ($event: any) => ((_ctx.requester.city) = $event)),\n required: !!_ctx.requesterRequired,\n onOnValidate: _cache[29] || (_cache[29] = ($event: any) => (\n _ctx.handleRequesterInputValidState('city', $event)\n ))\n }, null, 8, [\"modelValue\", \"required\"])\n ]),\n _createElementVNode(\"div\", _hoisted_27, [\n _createVNode(_component_NrFormSelect, {\n label: \"State\",\n name: \"state\",\n \"include-blank\": \"\",\n modelValue: _ctx.requester.state,\n \"onUpdate:modelValue\": _cache[30] || (_cache[30] = ($event: any) => ((_ctx.requester.state) = $event)),\n required: !!_ctx.requesterRequired,\n options: _ctx.usStates\n }, null, 8, [\"modelValue\", \"required\", \"options\"])\n ]),\n _createElementVNode(\"div\", _hoisted_28, [\n _createVNode(_component_NrFormInput, {\n label: \"Zip\",\n name: \"zip\",\n modelValue: _ctx.requester.zip,\n \"onUpdate:modelValue\": _cache[31] || (_cache[31] = ($event: any) => ((_ctx.requester.zip) = $event)),\n required: !!_ctx.requesterRequired,\n onOnValidate: _cache[32] || (_cache[32] = ($event: any) => (\n _ctx.handleRequesterInputValidState('zip', $event)\n ))\n }, null, 8, [\"modelValue\", \"required\"])\n ])\n ]),\n _createVNode(_component_NrFormInput, {\n label: \"Company\",\n name: \"company\",\n modelValue: _ctx.requester.company,\n \"onUpdate:modelValue\": _cache[33] || (_cache[33] = ($event: any) => ((_ctx.requester.company) = $event))\n }, null, 8, [\"modelValue\"])\n ])),\n (_ctx.termsAndConditionsRequired)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_29, [\n _hoisted_30,\n _createElementVNode(\"div\", {\n class: \"terms-and-conditions content\",\n innerHTML: _ctx.termsAndConditions\n }, null, 8, _hoisted_31),\n _hoisted_32,\n _createElementVNode(\"div\", _hoisted_33, [\n _createVNode(_component_NrFormInput, {\n type: \"checkbox\",\n label: \"I acknowledge the above terms and conditions.*\",\n name: \"terms\",\n modelValue: _ctx.termsAndConditionsChecked,\n \"onUpdate:modelValue\": _cache[34] || (_cache[34] = ($event: any) => ((_ctx.termsAndConditionsChecked) = $event))\n }, null, 8, [\"modelValue\"])\n ])\n ]))\n : _createCommentVNode(\"\", true),\n (_ctx.$can('update', 'Request'))\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_34, [\n _hoisted_35,\n _createElementVNode(\"div\", _hoisted_36, [\n _createElementVNode(\"div\", _hoisted_37, [\n _createVNode(_component_NrDatepicker, {\n name: \"date\",\n modelValue: _ctx.dateReceived,\n \"onUpdate:modelValue\": _cache[35] || (_cache[35] = ($event: any) => ((_ctx.dateReceived) = $event)),\n maxDate: _ctx.formatDate(new Date())\n }, {\n label: _withCtx(() => [\n _createTextVNode(\"Date received\")\n ]),\n trigger: _withCtx(() => [\n _createVNode(_component_NrIcon, { name: \"calendar-alt\" })\n ]),\n _: 1\n }, 8, [\"modelValue\", \"maxDate\"])\n ]),\n _createElementVNode(\"div\", _hoisted_38, [\n _createElementVNode(\"div\", _hoisted_39, [\n _hoisted_40,\n _createElementVNode(\"div\", _hoisted_41, [\n _createElementVNode(\"div\", _hoisted_42, [\n _withDirectives(_createElementVNode(\"select\", {\n id: \"formatReceived\",\n name: \"format_received\",\n \"onUpdate:modelValue\": _cache[36] || (_cache[36] = ($event: any) => ((_ctx.formatReceived) = $event))\n }, [\n _hoisted_43,\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.formats, (format) => {\n return (_openBlock(), _createElementBlock(\"option\", {\n key: format.id,\n value: format.id\n }, _toDisplayString(format.name), 9, _hoisted_44))\n }), 128))\n ], 512), [\n [_vModelSelect, _ctx.formatReceived]\n ])\n ])\n ])\n ])\n ]),\n (_ctx.$can('publish', 'Request'))\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_45, [\n _createElementVNode(\"div\", _hoisted_46, [\n _createElementVNode(\"label\", _hoisted_47, [\n _createTextVNode(\" Visibility \"),\n _createVNode(_component_NrTooltip, { position: \"right\" }, {\n label: _withCtx(() => [\n _createElementVNode(\"p\", { innerHTML: _ctx.visibilityTips }, null, 8, _hoisted_48)\n ]),\n default: _withCtx(() => [\n _createVNode(_component_NrIcon, {\n class: \"info-circle-icon request-personal-information-icon\",\n name: \"info-circle\"\n })\n ]),\n _: 1\n })\n ]),\n _createElementVNode(\"div\", _hoisted_49, [\n _createElementVNode(\"div\", _hoisted_50, [\n _withDirectives(_createElementVNode(\"select\", {\n id: \"visibility\",\n name: \"visibility\",\n \"onUpdate:modelValue\": _cache[37] || (_cache[37] = ($event: any) => ((_ctx.visibility) = $event))\n }, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.visibilities, (visibility) => {\n return (_openBlock(), _createElementBlock(\"option\", {\n key: visibility.name,\n value: visibility.value,\n selected: \n _ctx.defaultVisibility === visibility.value\n \n }, _toDisplayString(visibility.name), 9, _hoisted_51))\n }), 128))\n ], 512), [\n [_vModelSelect, _ctx.visibility]\n ])\n ])\n ])\n ])\n ]))\n : _createCommentVNode(\"\", true)\n ]),\n _hoisted_52\n ]))\n : _createCommentVNode(\"\", true),\n _createElementVNode(\"div\", _hoisted_53, [\n _createVNode(_component_NrButton, {\n variant: \"filled-neutral\",\n class: _normalizeClass(_ctx.createRequestClassnames),\n disabled: _ctx.disabledCreate,\n onClick: _ctx.handleCreateRequestByRole\n }, {\n default: _withCtx(() => [\n _createTextVNode(\" Make request \")\n ]),\n _: 1\n }, 8, [\"class\", \"disabled\", \"onClick\"])\n ]),\n _hoisted_54\n ], 32)\n ]),\n _createElementVNode(\"div\", _hoisted_55, [\n _createElementVNode(\"aside\", _hoisted_56, [\n (!!_ctx.sidebarRequestText)\n ? (_openBlock(), _createElementBlock(\"div\", {\n key: 0,\n innerHTML: _ctx.sidebarRequestText\n }, null, 8, _hoisted_57))\n : (_openBlock(), _createElementBlock(_Fragment, { key: 1 }, [\n _hoisted_58,\n _hoisted_59\n ], 64))\n ])\n ])\n ]),\n _createVNode(_component_nr_documentuploadmodal, {\n show: _ctx.showUploadModal,\n account: _ctx.account,\n evaporateResponse: _ctx.evaporateResponse,\n folders: [],\n folder: _ctx.selectedFolder,\n isModalActive: _ctx.showUploadModal,\n \"s3-bucket\": _ctx.s3Bucket,\n \"uploaded-docs\": _ctx.uploadedDocuments,\n onOnCloseModal: _cache[39] || (_cache[39] = ($event: any) => (_ctx.toggleUploadModal(false))),\n onOnFileUploadComplete: _ctx.handleDocumentUploads,\n onOnSubmit: _ctx.handleSaveDocumentsToRequest,\n onSelectedFolder: _ctx.handleFolderSelection\n }, null, 8, [\"show\", \"account\", \"evaporateResponse\", \"folder\", \"isModalActive\", \"s3-bucket\", \"uploaded-docs\", \"onOnFileUploadComplete\", \"onOnSubmit\", \"onSelectedFolder\"])\n ]),\n _createVNode(_component_nr_modal, {\n title: \"No email entered\",\n secondaryButtonText: \"Cancel\",\n primaryButtonText: \"Continue\",\n hasSecondaryButton: true,\n show: _ctx.showNoRequesterEmailModal,\n onOnSecondaryClick: _cache[40] || (_cache[40] = ($event: any) => (_ctx.toggleNoRequesterEmailModal(false))),\n onOnCloseClick: _cache[41] || (_cache[41] = ($event: any) => (_ctx.toggleNoRequesterEmailModal(false))),\n onOnPrimaryClick: _ctx.createRequest\n }, {\n default: _withCtx(() => [\n _hoisted_60\n ]),\n _: 1\n }, 8, [\"show\", \"onOnPrimaryClick\"])\n ]))\n}","\nimport { defineComponent } from 'vue'\nimport { mapState } from 'vuex'\nimport { debounce, isEmpty } from 'lodash'\nimport { format as dateFormat } from 'date-fns'\nimport NrEditor from '@nextrequestco/components/src/components/NrEditor/nr-editor.vue'\nimport DocumentUploadModal from '@nextrequestco/components/src/components/DocumentUploadModal/DocumentUploadModal.vue'\nimport NrIcon from '@nextrequestco/components/src/components/NrIcon/NrIcon.vue'\nimport NrButton from '@nextrequestco/components/src/components/NrButton/nr-button.vue'\nimport NrTooltip from '@nextrequestco/components/src/components/NrTooltip/NrTooltip.vue'\nimport NrModal from '@nextrequestco/components/src/components/NrModal/nr-modal.vue'\nimport NrSelect from '@nextrequestco/components/src/components/NrSelect/nr-select.vue'\nimport NrFormInput from '@nextrequestco/components/src/components/NrFormInput/nr-form-input.vue'\nimport NrFormSelect from '@nextrequestco/components/src/components/NrFormSelect/nr-form-select'\nimport {\n State,\n RequestVisibilityValue,\n RequestVisibility,\n accountRequestVisibilities\n} from 'src/store/globalModule'\nimport * as http from '../../../vue_shared/http'\nimport setupEvaporateFileUploader from '../../../mixins/init_evaporate'\nimport NrDatepicker from '@nextrequestco/components/src/components/NrDatePicker/nr-datepicker.vue'\nimport RequestFieldInput from '../../../vue_shared/components/RequestFieldInput.vue'\nimport {\n FieldDefinition,\n RequestFieldValue\n} from '../../../vue_shared/types/request_fields'\n\ninterface NewRequestPrep {\n states: [string, string][]\n formats: { id: number; name: string }[]\n embargo_visibility_tooltip: string | undefined // eslint-disable-line camelcase\n // eslint-disable-next-line camelcase\n custom_fields: {\n slug: string\n label: string\n description: string\n field_type: string // eslint-disable-line camelcase\n }[]\n request_fields: FieldDefinition[] // eslint-disable-line camelcase\n}\n\ninterface Document {\n id: number\n asset_url: string // eslint-disable-line camelcase\n [key: string]: unknown\n}\n\ninterface Requester {\n email?: string\n name?: string\n phone?: string\n address?: string\n city?: string\n state?: string\n zip?: string\n company?: string\n}\n\ninterface CustomField {\n slug: string\n label: string\n description?: string\n field_type: string // eslint-disable-line camelcase\n value?: string\n}\n\ninterface NewRequest {\n requester: Requester\n documents: object[]\n folder: string\n request: {\n request_text: string // eslint-disable-line camelcase\n request_date: string // eslint-disable-line camelcase\n request_submit_type_id: number // eslint-disable-line camelcase\n visibility: string\n department_ids: number[] // eslint-disable-line camelcase\n custom_field_data?: CustomField[] // eslint-disable-line camelcase\n }\n}\n\ninterface AccountUser extends Requester {\n active: boolean\n enabled: boolean\n}\n\ninterface RequestField {\n definition: FieldDefinition\n value: RequestFieldValue | null\n}\n\ninterface Data {\n showNoRequesterEmailModal: boolean\n isMakingRequest: boolean\n invisibleCaptcha: string\n dateReceived: string\n departmentSearchTerm: string\n documentsToAdd: Document[]\n embargoVisibilityTip: string | undefined\n emailDisabled: boolean\n emailNotice: string\n evaporateResponse: object\n formats: []\n formatReceived: number | ''\n keywordAlerts: string[]\n requestText: string\n requester: Requester\n isRequesterValid: { [key: string]: boolean }\n selectedDepartments: []\n selectedFolder: object | null\n showUploadModal: boolean\n states: []\n termsAndConditionsChecked: boolean\n uploadedDocuments: []\n requestVisibility: RequestVisibilityValue | null\n customFields: CustomField[]\n requestFields: RequestField[]\n}\n\n// Regular expression taken from https://html.spec.whatwg.org/multipage/input.html#valid-e-mail-address\nconst EMAIL_REGEX =\n /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/\n\nexport default defineComponent({\n mixins: [setupEvaporateFileUploader],\n components: {\n 'nr-documentuploadmodal': DocumentUploadModal,\n 'nr-editor': NrEditor,\n NrIcon,\n 'nr-modal': NrModal,\n NrSelect,\n NrFormInput,\n NrFormSelect,\n NrButton,\n NrTooltip,\n NrDatepicker,\n RequestFieldInput\n },\n\n data() {\n return {\n showNoRequesterEmailModal: false,\n isMakingRequest: false,\n invisibleCaptcha: '',\n dateReceived: dateFormat(new Date(), 'MM/dd/yyyy'),\n departmentSearchTerm: '',\n documentsToAdd: [],\n formats: [],\n formatReceived: '',\n embargoVisibilityTip: null,\n emailDisabled: false,\n emailNotice: '',\n evaporateResponse: {},\n keywordAlerts: [],\n requestText: '',\n isRequesterValid: {\n email: true,\n name: true,\n phone: true,\n address: true,\n city: true,\n state: true,\n zip: true\n },\n requester: {\n email: '',\n name: '',\n phone: '',\n address: '',\n city: '',\n state: '',\n zip: '',\n company: ''\n },\n selectedDepartments: [],\n selectedFolder: null,\n showUploadModal: false,\n states: [],\n termsAndConditionsChecked: false,\n uploadedDocuments: [],\n requestVisibility: null,\n isRequesterFieldsDisabled: false,\n customFields: [],\n requestFields: []\n }\n },\n\n mounted() {\n this.getNewRequestData()\n this.setupEvaporateFileUploader()\n this.handleRequestInput = debounce(this.handleRequestInput, 400)\n this.parseQueryParams()\n },\n\n computed: {\n ...mapState({\n account: (state: State): object | null => state.account,\n currentUser: (state: State): object | null => state.currentUser,\n showDepartments(state: State): boolean {\n return (\n this.$can('read', 'staff_only_items') ||\n state.account?.show_dept_select\n )\n },\n departmentRequired: (state: State): '*' | '' =>\n state.account?.require_department ? '*' : '',\n departments: (state: State): { id: number; name: string }[] =>\n state.account?.departments || [],\n sidebarRequestText: (state: State): string =>\n state.account?.sidebar_request_text || '',\n subheader: (state: State): string =>\n state.account?.request_page_subheader || '',\n termsAndConditions: (state: State): string =>\n state.account?.terms_and_conditions || '',\n requesterRequired(state: State): '*' | null {\n if (this.isRequesterFieldsDisabled) {\n return null\n } else {\n return (\n (state.account?.required_fields &&\n !this.$can('read', 'staff_only_items') &&\n '*') ||\n null\n )\n }\n },\n defaultVisibility(state: State): RequestVisibilityValue {\n return this.requestVisibility || state.account?.visibility_default\n },\n showRequester(state: State): boolean {\n return state.account?.show_requester || false\n }\n }),\n usStates(): { name: string; value: string }[] {\n const states: [string, string][] = this.states\n\n return states.map((state) => ({\n name: state[0],\n value: state[1]\n }))\n },\n\n isRequesterFieldsValid(): boolean {\n return Object.keys(this.isRequesterValid).every((key) => {\n if (key === 'email' && !this.requester[key]) {\n return true\n }\n return this.requester[key] && this.isRequesterValid[key]\n })\n },\n\n hasRequiredRequestFields(): boolean {\n return this.requestFields.some((field: RequestField) => {\n const isRequired = field.definition.type_settings?.isMandatory\n return (\n isRequired &&\n (!field.value ||\n (typeof field.value === 'string' && !field.value.trim()) ||\n isEmpty(field.value))\n )\n })\n },\n\n disabledCreate(): boolean {\n if (!this.selectedDeptIds.length && this.departmentRequired) {\n return true\n }\n\n if (\n this.invisibleCaptcha ||\n this.isMakingRequest ||\n !this.requestText.trim() ||\n (this.termsAndConditionsRequired && !this.termsAndConditionsChecked) ||\n this.hasRequiredRequestFields\n ) {\n return true\n }\n\n if (!this.isRequesterFieldsDisabled && this.requesterRequired) {\n return !this.isRequesterFieldsValid\n }\n\n return false\n },\n\n noDeptsSelected(): boolean {\n return isEmpty(this.selectedDepartments)\n },\n\n selectedDeptIds(): Array {\n if (this.noDeptsSelected) return []\n\n if (this.multipleDeptSelection) {\n return this.selectedDepartments.map(\n (department: { name: string; id: number }) => department.id\n )\n }\n return [this.selectedDepartments.id]\n },\n formatedFormData(): object {\n const {\n email,\n name,\n phone: phone_number, // eslint-disable-line camelcase\n address,\n city,\n state,\n zip: zipcode,\n company\n } = this.requester\n\n const {\n invisibleCaptcha,\n dateReceived: request_date, // eslint-disable-line camelcase\n formatReceived: request_submit_type_id, // eslint-disable-line camelcase\n visibility,\n requestText: request_text, // eslint-disable-line camelcase\n selectedFolder,\n documentsToAdd: documents,\n customFields: custom_field_data // eslint-disable-line camelcase\n } = this\n\n if (invisibleCaptcha) {\n return\n }\n\n // eslint-disable-next-line camelcase\n const request_field_values = this.requestFields.map(\n (field: RequestField) => ({\n request_field_version_id: field.definition.version_id,\n value: field.value\n })\n )\n\n return {\n requester: {\n email,\n name,\n phone_number,\n address,\n city,\n state,\n zipcode,\n company\n },\n state: this.$can('read', 'staff_only_items') ? 'staff' : 'requester',\n documents,\n folder: selectedFolder?.folder_name,\n request: {\n request_text,\n request_date: dateFormat(new Date(request_date), 'MM/dd/yy'),\n request_submit_type_id,\n visibility,\n department_ids: this.selectedDeptIds,\n custom_field_data,\n request_field_values\n }\n }\n },\n\n visibility: {\n get() {\n return this.requestVisibility || this.defaultVisibility\n },\n set(state: RequestVisibilityValue) {\n this.requestVisibility = state\n }\n },\n\n visibilityTips() {\n return [\n 'Published: Everyone',\n ...(this.account.restricted_visibilities_feature_flag\n ? [\n 'Published - department only: Admins, all assigned departments’ staff, requester, and any public user'\n ]\n : []),\n this.embargoVisibilityTip,\n 'Staff: Staff + requester',\n \"Department: Admins, assigned departments' staff + requester\",\n 'Restricted: Admins, assigned staff, + requester'\n ]\n .filter((tip) => !!tip)\n .join('

')\n },\n\n visibilities(): RequestVisibility[] {\n return accountRequestVisibilities(this.account)\n },\n\n isSignedIn(): boolean {\n return !!this.currentUser\n },\n\n canManageDocuments(): boolean {\n return this.isSignedIn ? this.$can('read', 'staff_only_items') : false\n },\n\n s3Bucket(): string {\n return process.env.S3_BUCKET || ''\n },\n\n departmentSelectionText(): string {\n const isOptional = this.departmentRequired ? 'required' : 'optional'\n\n if (this.$can('read', 'staff_only_items')) {\n return `Assign departments (${isOptional})`\n } else {\n return `Select a department (${isOptional})`\n }\n },\n\n termsAndConditionsRequired(): boolean {\n if (this.$can('read', 'staff_only_items')) {\n return false\n } else {\n return !!this.termsAndConditions\n }\n },\n\n createRequestClassnames(): object {\n return {\n 'is-loading': this.isMakingRequest\n }\n },\n\n multipleDeptSelection(): boolean {\n return this.$can('read', 'staff_only_items')\n }\n },\n\n methods: {\n handleCreateRequestByRole(): void {\n if (!this.requester.email && !this.no_email) {\n return this.toggleNoRequesterEmailModal(true)\n } else {\n return this.createRequest()\n }\n },\n\n handleRequesterInputValidState(field: string, isValid: boolean) {\n if (!field) {\n return\n }\n\n const validState =\n field === 'email' ? (this.emailDisabled ? true : isValid) : isValid\n\n this.isRequesterValid = Object.assign({}, this.isRequesterValid, {\n [`${field}`]: validState\n })\n },\n\n validateEmailInput(input: string): boolean {\n return input.length ? EMAIL_REGEX.test(input) : true\n },\n createRequest(): void {\n this.toggleNoRequesterEmailModal(false)\n if (this.invisibleCaptcha) return\n\n this.isMakingRequest = true\n http\n // eslint-disable-next-line camelcase\n .post<\n NewRequest,\n { pretty_id?: string; email?: string; error?: string } // eslint-disable-line camelcase\n >('/requests', this.formatedFormData)\n .then((data) => {\n if (data.pretty_id) {\n // NOTE(TODO): We cannot let vue-router optimize loading and\n // rendering the requests how page until we stop loading the legacy\n // page. Or load the legacy request show with a different path\n // e.g., /requests/:id/legacy\n // This is because the RequestsController#show gets called and ends\n // up loading the legacy view for guest users.\n // this.$router.push({\n // path: `/requests/${data.pretty_id}`\n // })\n window.location.href = `/requests/${data.pretty_id}?email=${data.email}`\n }\n })\n .catch((err) => {\n this.isMakingRequest = false\n const { email, error } = err.response.data\n if (email) {\n this.requester.email = email\n }\n const errorMessage =\n error || 'Request failed to save, please contact support'\n this.$toasted.error(errorMessage)\n })\n },\n\n handleEmailInput(): void {\n if (!this.requester.email) {\n this.isRequesterFieldsDisabled = false\n this.emailNotice = ''\n }\n\n if (this.requester.email === this.currentUser.email) {\n this.isRequesterFieldsDisabled = true\n } else {\n this.isRequesterFieldsDisabled = false\n }\n },\n\n handleEmailCheck(): void {\n if (!this.isSignedIn) {\n return\n }\n\n if (!this.$can('read', 'staff_only_items')) {\n return\n }\n\n if (!this.requester.email) {\n return\n }\n\n if (!EMAIL_REGEX.test(this.requester.email)) {\n return\n }\n\n http\n .get(\n `/account_lookup?email=${encodeURIComponent(this.requester.email)}`\n )\n .then((accountUser) => {\n if (accountUser.email) {\n if (accountUser.email === this.currentUser.email) {\n // Make the current user the requester\n this.emailNotice =\n 'Staff member: Are you sure? This will make YOU the requester.'\n this.isRequesterFieldsDisabled = true\n } else if (!accountUser.enabled) {\n // User account is deactived\n this.emailNotice =\n 'This user account has been deactivated. It will need to be reactivated before the requester can sign in and receive emails'\n } else {\n this.emailNotice = 'Account found'\n }\n\n this.setRequesterInfo(accountUser)\n } else {\n this.emailNotice =\n 'New email address. An account will be created for this requester.'\n }\n })\n .catch((error) => console.error(error))\n },\n\n setRequesterInfo(info: Requester) {\n this.requester = Object.assign({}, this.requester, info)\n },\n\n handleFolderSelection(names?: string[]): void {\n if (names && names.length) {\n this.selectedFolder = { id: -1, folder_name: names.pop() }\n } else {\n this.selectedFolder = null\n }\n },\n\n handleRequestInput(): void {\n if (this.requestText) {\n http\n .post('/alerts', { text: { search_text: this.requestText } })\n .then((data) => {\n this.keywordAlerts = data\n })\n .catch(() => {\n this.keywordAlerts = []\n })\n } else {\n this.keywordAlerts = []\n }\n },\n\n handleDocumentUploads(document: object) {\n this.uploadedDocuments.push(document)\n },\n\n handleDocumentRemoveClick(assetUrl: string): void {\n this.documentsToAdd = this.documentsToAdd.filter(\n (document: Document) => document.url !== assetUrl\n )\n this.$toasted.success('Successfully removed document')\n },\n\n handleUploadModalClick(): void {\n this.toggleUploadModal()\n },\n\n toggleNoRequesterEmailModal(state?: boolean): void {\n if (state === undefined || state === null) {\n this.showNoRequesterEmailModal = !this.showNoRequesterEmailModal\n } else {\n this.showNoRequesterEmailModal = state\n }\n },\n\n toggleUploadModal(state?: boolean): void {\n if (state === undefined || state === null) {\n this.showUploadModal = !this.showUploadModal\n } else {\n this.showUploadModal = state\n }\n if (!this.showUploadModal) this.uploadedDocuments = []\n },\n\n getNewRequestData(): void {\n http.get('/requests/new').then((data) => {\n this.states = (data.states || []).filter(\n (state: [string, string]) => state && state[0] && state[1]\n )\n this.formats = data.formats\n this.embargoVisibilityTip = data.embargo_visibility_tooltip\n this.customFields = data.custom_fields || []\n this.requestFields = (data.request_fields || []).map((definition) => ({\n definition: definition,\n value: null\n }))\n\n if (this.isSignedIn && !this.$can('read', 'staff_only_items')) {\n this.requester.email = this.currentUser.email\n if (this.currentUser.email !== this.currentUser.email_or_name) {\n this.requester.name = this.currentUser.email_or_name\n }\n }\n })\n },\n handleSaveDocumentsToRequest(data: {\n [key: string]: any\n documents: []\n }): void {\n this.documentsToAdd = [...this.documentsToAdd, ...data.documents]\n this.$toasted.success('Successfully uploaded document(s)')\n },\n\n handleDepartmentSelectionEvent(eventType: string, data?: any) {\n if (eventType === 'typing') {\n this.departmentSearchTerm = (data || '').trim()\n } else {\n this.departmentSearchTerm = ''\n }\n },\n\n parseQueryParams(): void {\n if (isEmpty(this.$route.query)) return\n\n const { dept_id: deptId } = this.$route.query\n if (deptId) {\n const dept = this.departments.find(\n (dept: { id: number; name: string }) => +dept.id === +deptId\n )\n if (!dept) return\n if (this.multipleDeptSelection) {\n this.selectedDepartments = [dept]\n } else {\n this.selectedDepartments = dept\n }\n }\n },\n\n formatDate(date) {\n return dateFormat(new Date(date), 'MM/dd/yyyy')\n }\n },\n\n watch: {\n departments(next) {\n if (!next) return\n if (!next.length) return\n\n this.parseQueryParams()\n },\n\n currentUser(next, _prev) {\n if (!next) {\n return\n }\n if (!next.email) {\n return\n }\n if (this.$can('read', 'staff_only_items')) {\n return\n }\n\n this.requester.email = next.email\n },\n emailDisabled(disabled) {\n if (disabled) {\n this.isRequesterFieldsDisabled = false\n }\n if (this.requester.email) {\n this.requester.email = ''\n }\n }\n }\n})\n","import { render } from \"./create_request.vue?vue&type=template&id=1c563ad6&ts=true\"\nimport script from \"./create_request.vue?vue&type=script&lang=ts\"\nexport * from \"./create_request.vue?vue&type=script&lang=ts\"\n\nimport \"./create_request.vue?vue&type=style&index=0&id=1c563ad6&lang=scss\"\n\nimport exportComponent from \"/app/node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render]])\n\nexport default __exports__"],"sourceRoot":""}