@department-of-veterans-affairs/component-library 54.0.0 → 54.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/12.app.bundle.js +1 -1
- package/dist/2205.app.bundle.js +1 -1
- package/dist/2236.app.bundle.js +1 -1
- package/dist/2923.app.bundle.js +1 -1
- package/dist/3589.app.bundle.js +1 -1
- package/dist/4475.app.bundle.js +1 -1
- package/dist/4780.app.bundle.js +1 -1
- package/dist/5341.app.bundle.js +1 -1
- package/dist/5663.app.bundle.js +1 -1
- package/dist/6555.app.bundle.js +1 -1
- package/dist/6650.app.bundle.js +1 -1
- package/dist/6696.app.bundle.js +1 -1
- package/dist/6849.app.bundle.js +1 -1
- package/dist/7166.app.bundle.js +1 -1
- package/dist/7372.app.bundle.js +1 -1
- package/dist/7734.app.bundle.js +1 -1
- package/dist/8255.app.bundle.js +1 -1
- package/dist/8913.app.bundle.js +1 -1
- package/dist/9496.app.bundle.js +1 -1
- package/dist/app.bundle.js +1 -1
- package/dist/components/contacts.js +1 -1
- package/dist/components/types/components.d.ts +64 -0
- package/dist/components/types/contacts.d.ts +16 -0
- package/dist/components/va-alert-expandable.js +1 -1
- package/dist/components/va-combo-box2.js +2 -2
- package/dist/components/va-crisis-line-modal2.js +1 -1
- package/dist/components/va-file-input-multiple.js +1 -1
- package/dist/components/va-file-input2.js +1 -1
- package/dist/components/va-table.js +1 -1
- package/dist/components/va-text-input2.js +1 -1
- package/dist/components/va-textarea.js +1 -1
- package/package.json +2 -2
package/dist/6555.app.bundle.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_department_of_veterans_affairs_component_library=self.webpackChunk_department_of_veterans_affairs_component_library||[]).push([[6104,6555],{6104:function(e,t,i){function n(e){return!Number.isNaN(parseFloat(e))}function r(e,t,i){void 0===i&&(i="slot");var n=e.shadowRoot.querySelector(i).assignedNodes();return null!==t?Array.from(n).filter((function(e){return e.nodeName.toLowerCase()===t})):Array.from(n)}function a(e){return 1===e?"":"s"}function o(e,t){if(void 0===e||""===e)return"".concat(t," character").concat(a(t)," allowed");var i;if(e.length<=t){var n=t-e.length;i="".concat(n," character").concat(a(n)," left")}else n=e.length-t,i="".concat(n," character").concat(a(n)," over limit");return i}function s(e,t){return Array.from({length:t-e+1},(function(t,i){return e+i}))}i.r(t),i.d(t,{S:function(){return u},a:function(){return r},b:function(){return n},c:function(){return g},d:function(){return m},e:function(){return v},f:function(){return o},g:function(){return d},h:function(){return h},i:function(){return f},m:function(){return s},s:function(){return c},u:function(){return b}}),i(7911);var l=function(e){return e&&"object"==typeof e&&1===e.nodeType};function c(e,t){var i=function(e,t){if("string"!=typeof e)return[];if(!t||!l(t))return[];var i=t.shadowRoot.querySelectorAll(e);return Array.from(i)}(e,t);return"string"!=typeof e||l(t)&&t.matches(e)&&i.push(t),i}var u={_entity:/[&<>"'/]/g,_entities:{"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"},getEntity:function(e){return u._entities[e]},escapeHTML:function(e){for(var t="",i=0;i<e.length;i++)t+=e[i],i+1<arguments.length&&(t+=String(arguments[i+1]||"").replace(u._entity,u.getEntity));return t}};function d(e){var t;return(t="string"==typeof e?parseInt(e,10):Math.floor(e))>=1&&t<=6?"h".concat(t):null}function h(e){return["VA-BUTTON","VA-LINK","BUTTON","A"].includes(e.tagName)}function f(e){return e&&"false"!==e||!1}function p(e){return"[object Arguments]"===Object.prototype.toString.call(e)}function m(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];if(e===t)return!0;if("function"==typeof e||"function"==typeof t)return!0;if("object"!=typeof e||"object"!=typeof t)return!1;if(null===e||null===t)return!1;if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(e instanceof RegExp&&t instanceof RegExp)return e.source===t.source&&e.global===t.global&&e.multiline===t.multiline&&e.lastIndex===t.lastIndex&&e.ignoreCase===t.ignoreCase;if(p(e)||p(t)){if(!p(e)||!p(t))return!1;var r=Array.prototype.slice;return m(r.call(e),r.call(t),i,n)}if(e.constructor!==t.constructor)return!1;var a=Object.keys(e),o=Object.keys(t);if(0===a.length&&0===o.length)return!0;if(a.length!==o.length)return!1;for(var s=i.length;s--;)if(i[s]===e)return n[s]===t;i.push(e),n.push(t),a.sort(),o.sort();for(var l=a.length-1;l>=0;l--)if(a[l]!==o[l])return!1;for(var c=void 0,u=a.length-1;u>=0;u--)if(!m(e[c=a[u]],t[c],i,n))return!1;return i.pop(),n.pop(),!0}function g(e,t){var i;return function(){for(var n=this,r=[],a=0;a<arguments.length;a++)r[a]=arguments[a];clearTimeout(i),i=setTimeout((function(){return e.apply(n,r)}),t)}}function v(e){if(null!=e){var t="string"==typeof e?parseInt(e,10):e;if(!(t<=0||isNaN(t)))return t}}function b(e,t,i){e&&(e.innerText=o(t,v(i)))}},6555:function(e,t,i){i.r(t),i.d(t,{va_file_input:function(){return P}});var n=i(7911),r=(i(8014),i(6104)),a=i(4665),o="usa",s="".concat(o,"-file-input"),l=".".concat(s),c="".concat(o,"-file-input__input"),u="".concat(o,"-file-input__target"),d=".".concat(c),h="".concat(o,"-file-input__box"),f="".concat(o,"-file-input__instructions"),p="".concat(o,"-file-input__preview"),m="".concat(o,"-file-input__preview-heading"),g="".concat(o,"-file-input--disabled"),v="".concat(o,"-file-input__choose"),b="".concat(o,"-file-input__accepted-files-message"),y="".concat(o,"-file-input__drag-text"),x="".concat(o,"-file-input--drag"),w="is-loading",A="has-invalid-file",S="".concat(o,"-file-input__preview-image"),z="".concat(S,"--generic"),T="".concat(S,"--pdf"),k="".concat(S,"--word"),F="".concat(S,"--video"),C="".concat(S,"--excel"),E="".concat(o,"-sr-only"),L="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",_=Boolean(!0),M="",q="",I=function(e){var t=e.charCodeAt(0);return 32===t?"-":t>=65&&t<=90?"img_".concat(e.toLowerCase()):"__000".concat(t.toString(16).slice(-4))},N=function(e){return e.hasAttribute("multiple")?"files":"file"},H=function(e){var t=e.hasAttribute("aria-disabled")||e.hasAttribute("disabled"),i=function(e){var t=document.createElement("div"),i=document.createElement("div"),n=document.createElement("div");return e.classList.remove(s),e.classList.add(c),t.classList.add(s),n.classList.add(h),i.classList.add(u),i.prepend(n),e.parentNode.insertBefore(i,e),e.parentNode.insertBefore(t,i),i.appendChild(e),t.appendChild(i),i}(e),n=function(e){var t=e.closest(l),i=N(e),n=document.createElement("div"),a="Drag ".concat(i," here or"),o="choose from folder";return M="".concat(a," ").concat(o),n.classList.add(f),n.setAttribute("aria-hidden","true"),e.setAttribute("aria-label",M),n.innerHTML=r.S.escapeHTML('<span class="'.concat(y,'">').concat(a,'</span> <span class="').concat(v,'">').concat(o,"</span>")),e.parentNode.insertBefore(n,e),(/rv:11.0/i.test(navigator.userAgent)||/Edge\/\d./i.test(navigator.userAgent))&&(t.querySelector(".".concat(y)).outerHTML=""),n}(e),a=function(e){var t=e.closest(l);if(!t)throw new Error("Element is missing outer ".concat(l));var i=t.querySelector(d);return{dropZoneEl:t,inputEl:i}}(e).dropZoneEl;return t?a.classList.add(g):function(e){var t=document.createElement("div"),i=N(e),n=e.closest(l),r=e.closest(".".concat(u));q="No ".concat(i," selected."),t.classList.add(E),t.setAttribute("aria-live","polite"),t.textContent=q,n.insertBefore(t,r)}(e),{instructions:n,dropTarget:i}},B=function(e,t){var i=e.querySelectorAll(".".concat(p)),n=e.querySelector(".".concat(m)),r=e.querySelector(".".concat(b));n&&(n.outerHTML=""),r&&(r.outerHTML="",e.classList.remove(A)),null!==i&&(t&&t.removeAttribute("hidden"),Array.prototype.forEach.call(i,(function(e){e.parentNode.removeChild(e)})))},R=function(e,t,i,n){!function(e,t,i,n){var r=t.getAttribute("accept");n.classList.remove(A);var a=function(e,t){var i=!1;return e.indexOf(t)>=0&&(i=!0),i};if(r){for(var o=r.split(","),s=document.createElement("div"),l=!0,c=e.target.files||e.dataTransfer.files,u=0;u<c.length;u+=1){var d=c[u];if(!l)break;for(var h=0;h<o.length;h+=1){var f=o[h];if(l=d.name.indexOf(f)>0||a(d.type,f.replace(/\*/g,""))){_=!0;break}}}l||(B(n,i),t.value="",n.insertBefore(s,t),s.textContent=t.dataset.errormessage||"This is not a valid file type.",s.classList.add(b),n.classList.add(A),_=!1,e.preventDefault(),e.stopPropagation())}}(e,t,i,n),!0===_&&function(e,t,i,n){var a=t.getAttribute("multiple")?e.target.files:[e.target.files[0]],o=n.closest(".".concat(s)).querySelector(".".concat(E)),l=[];B(n,i);for(var c=function(e){var t,o=new FileReader,s=a[e].name;l.push(s),o.onloadstart=function(){t=function(e){return"".concat(e,"-").concat(Math.floor(Date.now()/1e3))}(function(e){return e.replace(/[^a-z0-9]/g,I)}(s)),i.insertAdjacentHTML("afterend",r.S.escapeHTML('<div class="'.concat(p,'" aria-hidden="true">\n <img id="').concat(t,'" src="').concat(L,'" alt="" class="').concat(S," ").concat(w,'"/>').concat(s,"\n <div>")))},o.onloadend=function(){var e=n.querySelector("#".concat(t));s.indexOf(".pdf")>0?e.setAttribute("onerror",'this.onerror=null;this.src="'.concat(L,'"; this.classList.add("').concat(T,'")')):s.indexOf(".doc")>0||s.indexOf(".pages")>0?e.setAttribute("onerror",'this.onerror=null;this.src="'.concat(L,'"; this.classList.add("').concat(k,'")')):s.indexOf(".xls")>0||s.indexOf(".numbers")>0?e.setAttribute("onerror",'this.onerror=null;this.src="'.concat(L,'"; this.classList.add("').concat(C,'")')):s.indexOf(".mov")>0||s.indexOf(".mp4")>0?e.setAttribute("onerror",'this.onerror=null;this.src="'.concat(L,'"; this.classList.add("').concat(F,'")')):e.setAttribute("onerror",'this.onerror=null;this.src="'.concat(L,'"; this.classList.add("').concat(z,'")')),e.classList.remove(w),e.src=o.result},a[e]&&o.readAsDataURL(a[e])},d=0;d<a.length;d+=1)c(d);0===a.length?t.setAttribute("aria-label",M):function(e,t){var i=document.createElement("div"),n=e.closest(".".concat(u)),a=n.querySelector(".".concat(f)),o="Change file",s="";1===t.length?s=r.S.escapeHTML('Selected file <span class="usa-file-input__choose">'.concat(o,"</span>")):t.length>1&&(o="Change files",s=r.S.escapeHTML("".concat(t.length,' files selected <span class="usa-file-input__choose">').concat(o,"</span>"))),a.setAttribute("hidden","true"),i.classList.add(m),i.innerHTML=s,n.insertBefore(i,a),e.setAttribute("aria-label",o)}(t,a),function(e,t,i){var n=e,r=q;1===t.length?r="You have selected the file: ".concat(i):t.length>1&&(r="You have selected ".concat(t.length," files: ").concat(i.join(", "))),setTimeout((function(){n.textContent=r}),1e3)}(o,a,l)}(e,t,i,n)},j={".txt":"text/plain",".pdf":"application/pdf",".doc":"application/msword",".docx":"application/vnd.openxmlformats-officedocument.wordprocessingml.document",".odt":"application/vnd.oasis.opendocument.text",".rtf":"application/rtf",".csv":"text/csv",".xls":"application/vnd.ms-excel",".xlsx":"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",".ppt":"application/vnd.ms-powerpoint",".pptx":"application/vnd.openxmlformats-officedocument.presentationml.presentation",".jpg":"image/jpeg",".jpeg":"image/jpeg",".png":"image/png",".gif":"image/gif",".bmp":"image/bmp",".webp":"image/webp",".tif":"image/tiff",".tiff":"image/tiff",".svg":"image/svg+xml",".mp3":"audio/mpeg",".wav":"audio/wav",".ogg":"audio/ogg",".m4a":"audio/mp4",".aac":"audio/aac",".mp4":"video/mp4",".avi":"video/x-msvideo",".mov":"video/quicktime",".wmv":"video/x-ms-wmv",".flv":"video/x-flv",".mkv":"video/x-matroska",".webm":"video/webm",".zip":"application/zip",".rar":"application/x-rar-compressed",".7z":"application/x-7z-compressed",".tar":"application/x-tar",".gz":"application/gzip",".json":"application/json",".xml":"application/xml",".html":"text/html",".htm":"text/html",".css":"text/css",".js":"application/javascript"},P=function(){function e(e){var t=this;(0,n.r)(this,e),this.vaChange=(0,n.c)(this,"vaChange",7),this.vaPasswordChange=(0,n.c)(this,"vaPasswordChange",7),this.vaFileInputError=(0,n.c)(this,"vaFileInputError",7),this.componentLibraryAnalytics=(0,n.c)(this,"component-library-analytics",7),this.uploadStatus="idle",this.chooseFileString="choose from folder",this.dragFileString="Drag a file here or ",this.FILE_PREVIEW_SIZE_LIMIT=5242880,this.handleChange=function(e){var i=e.target;i.files&&i.files.length>0&&t.handleFile(i.files[0]),i.value=""},this.handleDrop=function(e){e.preventDefault(),e.stopPropagation();var i=e.dataTransfer.files;i.length>0&&t.handleFile(i[0])},this.getExtension=function(e){var t=e.name.replace(/^\./,"");return(t.includes(".")?".".concat(t.split(".").pop()):null)||e.type},this.getFileTypeErrorMessage=function(e){var i=t.getExtension(e),n=i?"".concat(i," files"):"this file type";return"We do not accept ".concat(n,". Choose a new file.")},this.handleFile=function(e,i){void 0===i&&(i=!0);var n=null;if(t.accept){var r=t.normalizeAcceptProp(t.accept);t.isAcceptedFileType(e.type,r)||(t.removeFile(!1),n=t.getFileTypeErrorMessage(e))}if(0===e.size&&(n="The file you selected is empty. Files must be larger than 0B."),e.size>t.maxFileSize&&(n="\n We can't upload your file because it's too big. Files must be less than ".concat(t.formatFileSize(t.maxFileSize),".")),e.size<t.minFileSize&&(n="We can't upload your file because it's too small. Files must be at least ".concat(t.formatFileSize(t.minFileSize),".")),t.uploadedFile=null,t.file=e,n)return t.internalError=n,t.vaFileInputError.emit({error:n}),void t.resetState();i&&t.vaChange.emit({files:[t.file]}),t.uploadStatus="success",t.internalError=null,e.size<t.FILE_PREVIEW_SIZE_LIMIT&&t.generateFileContents(t.file),t.updateStatusMessage("You have selected the file: ".concat(t.file.name)),t.el.focus(),t.enableAnalytics&&t.componentLibraryAnalytics.emit({componentName:"va-file-input",action:"change",details:{label:t.label}})},this.removeFile=function(e){void 0===e&&(e=!0),t.closeModal(),t.uploadStatus="idle",t.internalError=null,e&&t.vaChange.emit({files:[]}),t.file=null,t.uploadedFile=null,t.updateStatusMessage("File deleted. No file selected."),t.el.focus()},this.openModal=function(){t.el.shadowRoot.querySelector("va-modal").setAttribute("status","warning"),t.showModal=!0},this.closeModal=function(){t.showModal=!1,setTimeout((function(){t.fileInputRef.focus()}),0)},this.changeFile=function(){t.fileInputRef&&t.fileInputRef.click()},this.formatFileSize=function(e){var t=["B","KB","MB","GB","TB"];if(0===e)return"0 B";var i=Math.floor(Math.log(e)/Math.log(1024));if(0===i)return"".concat(e," ").concat(t[i]);var n=(e/Math.pow(1024,i)).toFixed(i<2?0:1);return"".concat(n," ").concat(t[i])},this.normalizeAcceptProp=function(e){return e.split(",").map((function(e){return(e=e.trim()).startsWith(".")?j[e]:e}))},this.isAcceptedFileType=function(e,t){for(var i=0,n=t;i<n.length;i++){var r=n[i];if(r===e)return!0;if(r.endsWith("/*")&&e.startsWith(r.slice(0,-1)))return!0}return!1},this.renderLabelOrHeader=function(e,t,i){var r=t?(0,n.h)("span",{class:"required"}," ",a.i.t("required")):null;if(i&&i>=1&&i<=6){var o="h".concat(i);return(0,n.h)("div",{class:"label-header"},(0,n.h)(o,{htmlFor:"fileInputField",part:"label",class:"label-header-tag"},e,r))}return(0,n.h)("div",{class:"label-header"},(0,n.h)("label",{htmlFor:"fileInputField",part:"label",class:"usa-label"},e,r))},this.file=void 0,this.fileContents=void 0,this.internalError=void 0,this.showModal=!1,this.showSeparator=!0,this.label=void 0,this.name=void 0,this.value=void 0,this.required=!1,this.accept=void 0,this.error=void 0,this.hint=void 0,this.statusText=void 0,this.uploadMessage=null,this.enableAnalytics=!1,this.headerSize=void 0,this.headless=!1,this.readOnly=!1,this.encrypted=!1,this.uploadedFile=void 0,this.maxFileSize=1/0,this.minFileSize=0,this.percentUploaded=null,this.passwordError=void 0}return e.prototype.handleValueChange=function(e){var t=this;setTimeout((function(){t.updateStatusMessage(e)}))},e.prototype.percentHandler=function(e){e>=100&&this.resetState()},e.prototype.handleError=function(e,t){t&&e&&this.resetState()},e.prototype.resetState=function(){this.fileContents=null,this.uploadStatus="idle",this.percentUploaded=null,(0,n.f)(this.el)},e.prototype.updateStatusMessage=function(e){var t=this;setTimeout((function(){var i=t.el.shadowRoot.querySelector("#statusMessage");i&&(i.textContent=e)}),1e3)},e.prototype.generateFileContents=function(e){return function(e,t,i,n){function r(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,a){function o(e){try{l(n.next(e))}catch(e){a(e)}}function s(e){try{l(n.throw(e))}catch(e){a(e)}}function l(e){e.done?i(e.value):r(e.value).then(o,s)}l((n=n.apply(e,t||[])).next())}))}(this,void 0,void 0,(function(){var t,i,n,r,a=this;return function(e,t){var i,n,r,a,o={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(e){return function(t){return l([e,t])}}function l(s){if(i)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(o=0)),o;)try{if(i=1,n&&(r=2&s[0]?n.return:s[0]?n.throw||((r=n.return)&&r.call(n),0):n.next)&&!(r=r.call(n,s[1])).done)return r;switch(n=0,r&&(s=[2&s[0],r.value]),s[0]){case 0:case 1:r=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,n=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!((r=(r=o.trys).length>0&&r[r.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!r||s[1]>r[0]&&s[1]<r[3])){o.label=s[1];break}if(6===s[0]&&o.label<r[1]){o.label=r[1],r=s;break}if(r&&o.label<r[2]){o.label=r[2],o.ops.push(s);break}r[2]&&o.ops.pop(),o.trys.pop();continue}s=t.call(e,o)}catch(e){s=[6,e],n=0}finally{i=r=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}}(this,(function(o){switch(o.label){case 0:return e?[4,e.slice(0,20).arrayBuffer()]:[2];case 1:return t=o.sent(),i=new Uint8Array(t),n=i.every((function(e){return 0===e})),n||(r=new FileReader,this.fileType=e.type,r.onloadend=function(){a.fileContents=r.result},this.fileType&&("application/pdf"===this.fileType||this.fileType.startsWith("image/"))&&r.readAsDataURL(e)),[2]}}))}))},e.prototype.componentWillRender=function(){var e=!!this.el.querySelector(":scope > *"),t=!(!this.value&&!this.file||this.readOnly);this.showSeparator=e||t},e.prototype.componentDidLoad=function(){!function(e){(0,r.s)(l,e).forEach((function(e){var t=H(e),i=t.instructions,n=t.dropTarget;n.addEventListener("dragover",(function(){this.classList.add(x)}),!1),n.addEventListener("dragleave",(function(){this.classList.remove(x)}),!1),n.addEventListener("drop",(function(t){t.preventDefault(),this.classList.remove(x);var r=t.dataTransfer;if(t.target.files=r.files,!(r.files.length>1)){R(t,e,i,n);var a=new CustomEvent("change",{detail:{files:r.files}});e.dispatchEvent(a)}}),!1),e.addEventListener("input",(function(t){return R(t,e,i,n)}),!1)}))}(this.el)},e.prototype.connectedCallback=function(){this.el.addEventListener("change",this.handleChange)},e.prototype.disconnectedCallback=function(){this.el.removeEventListener("change",this.handleChange)},e.prototype.getDefaultUploadMessage=function(){return(0,n.h)("span",null,this.dragFileString,(0,n.h)("span",{class:"file-input-choose-text"},this.chooseFileString))},e.prototype.handlePasswordChange=function(e){this.vaPasswordChange.emit({password:e.target.value})},e.prototype.render=function(){var e=this,t=this,i=t.label,r=t.name,o=t.required,s=t.accept,l=t.error,c=t.hint,u=t.dragFileString,d=t.chooseFileString,h=t.uploadMessage,f=t.headerSize,p=t.fileContents,m=t.fileType,g=t.headless,v=t.value,b=t.readOnly,y=t.encrypted,x=t.statusText,w=t.uploadedFile,A=t.percentUploaded,S=t.passwordError;v&&!this.file&&this.handleFile(v,!1);var z=this.uploadStatus,T=this.file,k=l||this.internalError,F="".concat(c?"input-hint-message":""," ").concat(k?"input-error-message":"").trim()||null,C="file-input-target ".concat(k?"file-input-target-error":"").trim(),E=(0,n.h)("div",{key:"127a104800f7ef1f8e7200728f13d7136e661ebc",class:"thumbnail-container"},(0,n.h)("svg",{key:"4104282602ee5f6fed49bb2661664d3b88965958",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 384 512",fill:"#07648d",width:"40px",height:"40px"},(0,n.h)("path",{key:"52486121ff470e98ea62977d9a47fe9c5221a60f",d:"M224 136V0H24C10.7 0 0 10.7 0 24v464c0 13.3 10.7 24 24 24h336c13.3 0 24-10.7 24-24V160H248c-13.2 0-24-10.8-24-24zm160-14.1v6.1H256V0h6.1c6.4 0 12.5 2.5 17 7l97.9 98c4.5 4.5 7 10.6 7 16.9z"})));k?E=(0,n.h)("div",{key:"5ec5a8b91f016f73dd2c54d187289b1e038e9724",class:"thumbnail-container"},(0,n.h)("va-icon",{key:"515ad83da7abd9e78c2e58b9124889d5c168f22a",icon:"error",size:3,class:"thumbnail-preview thumbnail-error"})):p&&(m.startsWith("image/")?E=(0,n.h)("div",{key:"357017d01150bff7baae23f81f927b147a0cc578",class:"thumbnail-container","aria-hidden":"true"},(0,n.h)("img",{key:"0491347dc314952df837ed87f6b72dec909e27dc",class:"thumbnail-preview",src:p,alt:"image"})):"application/pdf"===m&&(E=(0,n.h)("div",{key:"38f3b35401d49d8eb1d571155c15f412fc38dd99",class:"thumbnail-container","aria-hidden":"true"},(0,n.h)("object",{key:"d5d89acd923f3364eb882cdaea2a93347eb2448e",class:"thumbnail-preview",data:p,type:"application/pdf",tabIndex:-1}))));var L=g?"headless-selected-files-wrapper":"selected-files-wrapper",_="usa-hint"+(g?" usa-sr-only":""),M=null!==A&&A<100,q="file-status-label";return M&&(q="".concat(q," uploading-status")),(0,n.h)(n.H,{key:"bff5e87618329c9a8244c7d1e9f9b82dd07d797f",class:{"has-error":!!k}},!b&&(0,n.h)("span",{key:"42b76f94434c471da1ac06bc11c55b993da59fb1",class:{"usa-sr-only":!!g}},i&&this.renderLabelOrHeader(i,o,f)),c&&!b&&(0,n.h)("div",{key:"463a758d16bf26217e7a1d29a50956fcefcdea22",class:_,id:"input-hint-message"},c),(0,n.h)("div",{key:"d460773b145b534a829a8f5335a76d4204b041e7",class:"file-input-wrapper",onDrop:this.handleDrop},(0,n.h)("input",{key:"8cd614a4e706ce493f73b6cca298d75c0e989d35",id:"fileInputField",class:"file-input","aria-label":"".concat(i).concat(o?" "+a.i.t("required"):"",". ").concat(u).concat(d),style:{visibility:"success"===z||w||k?"hidden":"unset"},type:"file",ref:function(t){return e.fileInputRef=t},name:r,accept:s,"aria-describedby":F,onChange:this.handleChange}),w||T?(0,n.h)("div",{class:L},!g&&(0,n.h)("div",{class:"selected-files-label"},b?"Files you uploaded":"Selected files"),(0,n.h)("div",{class:"usa-sr-only","aria-live":"polite",id:"statusMessage"}),(0,n.h)("va-card",{class:"va-card"},(0,n.h)("div",{class:"file-info-section"},E,(0,n.h)("div",{class:"file-info-group vads-u-line-height--2"},(0,n.h)("span",{class:"file-label"},T?T.name:w.name),k&&(0,n.h)("span",{id:"input-error-message",role:"alert"},(0,n.h)("span",{class:"usa-sr-only"},a.i.t("error")),(0,n.h)("span",{"aria-live":"polite",class:"usa-error-message"},k)),!M&&(0,n.h)("span",{class:"file-size-label"},this.formatFileSize(T?T.size:w.size)),(0,n.h)("span",{class:q,"aria-live":"polite"},M?"Uploading...":x))),(0,n.h)("div",{class:this.showSeparator?"with-separator":void 0},!b&&M&&(0,n.h)(n.F,null,(0,n.h)("va-progress-bar",{percent:A}),(0,n.h)("va-button-icon",{buttonType:"cancel",onClick:this.resetState.bind(this)})),!M&&(0,n.h)(n.F,null,y&&(0,n.h)("va-text-input",{type:"password",onInput:function(t){e.handlePasswordChange(t)},label:"File password",required:!0,error:S}),(0,n.h)("div",{class:"additional-info-slot"},(0,n.h)("slot",null))),!b&&!M&&(0,n.h)(n.F,null,(0,n.h)("div",{class:"file-button-section"},(0,n.h)("va-button-icon",{buttonType:"change-file",onClick:this.changeFile,label:"change file ".concat(T?T.name:w.name)}),(0,n.h)("va-button-icon",{buttonType:"delete",onClick:this.openModal,label:"delete file ".concat(T?T.name:w.name)})),(0,n.h)("va-modal",{modalTitle:"Delete this file?",visible:this.showModal,primaryButtonText:"Yes, delete this",secondaryButtonText:"No, keep this",onCloseEvent:this.closeModal,onPrimaryButtonClick:function(){return e.removeFile(!0)},onSecondaryButtonClick:this.closeModal},"We'll delete the uploaded file"," ",(0,n.h)("span",{class:"file-label"},T?T.name:w.name)))))):(0,n.h)("div",null,(0,n.h)("span",{id:"file-input-error-alert",role:"alert"},k&&(0,n.h)(n.F,null,(0,n.h)("span",{class:"usa-sr-only"},a.i.t("error")),(0,n.h)("span",{class:"usa-error-message"},k))),(0,n.h)("div",{class:"usa-sr-only","aria-live":"polite",id:"statusMessage"}),(0,n.h)("div",{class:C},(0,n.h)("div",{class:"file-input-box"}),(0,n.h)("div",{class:"file-input-instructions"},h||this.getDefaultUploadMessage())))))},Object.defineProperty(e.prototype,"el",{get:function(){return(0,n.g)(this)},enumerable:!1,configurable:!0}),Object.defineProperty(e,"watchers",{get:function(){return{statusText:["handleValueChange"],percentUploaded:["percentHandler"],error:["handleError"]}},enumerable:!1,configurable:!0}),e}();P.style='button:not([disabled]):focus,select:not([disabled]):focus,a:not([disabled]):focus,h1:focus,input:not([disabled]):focus,textarea:not([disabled]):focus,#form-question [role=\'option\']:focus,*[tabindex]:focus,a.va-sidenav-submenu__link:focus{outline:2px solid var(--vads-color-action-focus-on-light);outline-offset:2px;z-index:2}h1{margin-top:0}h1,h2,h3,h4,h5,h6{margin-bottom:0;margin-top:0;clear:both}*+h1,*+h2,*+h3,*+h4,*+h5,*+h6{margin-top:1.5em}h1+*,h2+*,h3+*,h4+*,h5+*,h6+*{margin-top:1em}h1{font-family:Merriweather Web, Georgia, Cambria, Times New Roman, Times, serif;font-size:2.44rem;line-height:1.2;font-weight:700}h2{font-family:Merriweather Web, Georgia, Cambria, Times New Roman, Times, serif;font-size:1.95rem;line-height:1.2;font-weight:700}h3{font-family:Merriweather Web, Georgia, Cambria, Times New Roman, Times, serif;font-size:1.34rem;line-height:1.2;font-weight:700}h4{font-family:Merriweather Web, Georgia, Cambria, Times New Roman, Times, serif;font-size:0.98rem;line-height:1.2;font-weight:700}h5{font-family:Merriweather Web, Georgia, Cambria, Times New Roman, Times, serif;font-size:0.91rem;line-height:1.2;font-weight:700}h6{font-family:Source Sans Pro Web, Helvetica Neue, Helvetica, Roboto, Arial, sans-serif;font-size:0.87rem;line-height:1.1;font-weight:normal;letter-spacing:0.025em;text-transform:uppercase}h1,h2,h3,h4,h5{font-family:Bitter, Georgia, Cambria, "Times New Roman", Times, serif;font-weight:700}h6{font-family:"Source Sans Pro Web", "Source Sans Pro", "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif;font-weight:700}h1{margin-top:0;font-size:2.5rem}h2{font-size:2rem}h3{font-size:1.25rem}h4{font-size:1.0625rem}h5{font-size:0.9375rem}h6{font-size:0.9375rem}@media (max-width: 481px){h1{font-size:1.875rem}h2{font-size:1.5rem}}h6{margin:0.5em 0 0;text-transform:none;font-weight:700}@media (max-width: 481px){h1{font-size:1.875rem}h2{font-size:1.5rem}}h6{margin:0.5em 0 0;text-transform:none;font-weight:700}:host legend :is(h1,h2,h3,h4,h5,h6),:host label :is(h1,h2,h3,h4,h5,h6){display:inline;margin:0px}:host legend :is(h1,h2,h3,h4,h5),:host label :is(h1,h2,h3,h4,h5){font-family:var(--font-serif)}:host h1+*,:host h2+*,:host h3+*,:host h4+*,:host h5+*,:host h6+*{margin-top:unset}:host #form-question{margin-bottom:1rem}.usa-hint{font-family:Source Sans Pro Web, "Source Sans Pro", "Helvetica Neue", Helvetica, Arial, sans;font-size:1.06rem;line-height:1.3}.usa-label{font-family:Source Sans Pro Web, "Source Sans Pro", "Helvetica Neue", Helvetica, Arial, sans;font-size:1.06rem;line-height:1.3;display:block;font-weight:normal;margin-top:1.5rem;max-width:30rem}.usa-label--error{font-weight:700;margin-top:0}.usa-label--required{color:#b50909}.usa-hint{color:#71767a}.usa-hint--required{color:#b50909}.usa-sr-only{position:absolute;left:-999em;right:auto}.usa-error-message{padding-bottom:0.25rem;padding-top:0.25rem;color:#b50909;display:block;font-weight:700}.usa-error-message{font-size:1.06rem}:host([error]:not([error=""])),:host(.va-form-group--error){border-left:0.25rem solid #b50909;padding-left:1rem;position:relative}:host([error]:not([error=""])[use-forms-pattern=multiple]),:host(.va-form-group--error[use-forms-pattern=multiple]){border-left:none}:host([error]:not([error=""])[use-forms-pattern=multiple]) .input-wrap,:host(.va-form-group--error[use-forms-pattern=multiple]) .input-wrap{border-left:0.25rem solid #b50909;padding-left:1rem;position:relative}@media screen and (min-width: 1024px){:host([error]:not([error=""])),:host(.va-form-group--error){margin-left:-0.9rem}:host([error]:not([error=""])[use-forms-pattern=multiple]) .input-wrap,:host(.va-form-group--error[use-forms-pattern=multiple]) .input-wrap{margin-left:-0.9rem}}@media screen and (max-width: 1023px){:host([error]:not([error=""])[use-forms-pattern=multiple]),:host(.va-form-group--error[use-forms-pattern=multiple]){padding-left:0}}[hidden]{display:none}:host{display:block;font-family:var(--font-source-sans);font-size:16.96px;}:host .label-header{color:var(--vads-color-base);font-weight:var(--font-weight-normal)}:host .label-header-tag{margin:0;display:inline-block}:host .file-input-wrapper{display:block;max-width:30rem;width:100%;position:relative;margin:8px 0}:host .file-input{cursor:pointer;height:100%;width:100%;max-width:none;top:0;left:0;z-index:1;margin:0;position:absolute;text-indent:-999em;-webkit-box-sizing:border-box;box-sizing:border-box}:host .file-input-target{border:1px dashed var(--vads-color-action-border-base-active-on-dark);display:block;margin-top:0.3125rem;position:relative;text-align:center;width:100%;-webkit-box-sizing:border-box;box-sizing:border-box}:host .file-input-target.file-input-target-error{border:2px dashed var(--vads-color-secondary-dark)}:host .file-input-box{background:var(--vads-color-white);height:100%;left:0;pointer-events:none;position:absolute;top:0;width:100%;z-index:2}:host .file-input-instructions{font-size:1.06rem;padding:1.25rem 0.625rem;pointer-events:none;position:relative;z-index:3}:host .file-input-choose-text{color:var(--vads-color-link);text-decoration:underline;font-weight:var(--font-weight-normal)}:host .file-icon{color:var(--vads-color-primary-alt-darkest)}:host .selected-files-wrapper{background-color:var(--vads-color-primary-lighter);border:1px solid var(--vads-color-base-light)}:host .selected-files-label{color:var(--vads-color-base);font-weight:var(--font-weight-bold);font-size:1.06rem;border-bottom:1px solid var(--vads-color-white);margin-bottom:8px;padding:8px}:host .va-card{margin:8px}:host .file-label{color:var(--vads-color-base);font-weight:var(--font-weight-bold);font-size:1.06rem;padding:0 8px;display:block;width:100%;word-wrap:break-word;word-break:break-word;overflow:hidden}:host #input-error-message{padding:0 8px;width:100%}:host .file-size-label,:host .file-status-label{color:var(--vads-color-base-dark);font-weight:var(--font-weight-normal);font-size:1.06rem;padding:0 8px;display:block}:host .file-status-label{font-style:italic}:host .file-info-section{padding:0 8px 8px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}:host .file-button-section{margin-top:8px;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-direction:row;flex-direction:row}:host .file-button-section>va-button-icon{font-size:1.06rem}@media screen and (max-width: 320px){:host .file-button-section{-ms-flex-direction:column;flex-direction:column;-ms-flex-align:start;align-items:flex-start}}:host .with-separator{border-top:1px solid var(--vads-color-base-lighter)}:host .vads-u-line-height--2{line-height:1.15}:host .thumbnail-container{height:40px;width:40px;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}:host .thumbnail-preview{max-width:40px;width:auto;max-height:40px;height:auto}:host .thumbnail-error{color:#b21d38}:host va-progress-bar{font-size:var(--vads-font-size-root);display:block;margin-left:16px}:host .uploading-status{font-style:var(--font-style-italic)}:host(.has-error){border-left:0.25rem solid #b50909;padding-left:1rem;position:relative}@media screen and (min-width: 1024px){:host(.has-error){margin-left:-0.9rem}}.required{color:var(--vads-color-secondary-dark);margin-left:0.25rem}h1 .required,h2 .required,h3 .required,h4 .required,h5 .required,h6 .required{font-family:var(--font-source-sans);font-size:initial;font-weight:initial}'}}]);
|
|
1
|
+
"use strict";(self.webpackChunk_department_of_veterans_affairs_component_library=self.webpackChunk_department_of_veterans_affairs_component_library||[]).push([[6104,6555],{6104:function(e,t,i){function n(e){return!Number.isNaN(parseFloat(e))}function r(e,t,i){void 0===i&&(i="slot");var n=e.shadowRoot.querySelector(i).assignedNodes();return null!==t?Array.from(n).filter((function(e){return e.nodeName.toLowerCase()===t})):Array.from(n)}function a(e){return 1===e?"":"s"}function o(e,t){if(void 0===e||""===e)return"".concat(t," character").concat(a(t)," allowed");var i;if(e.length<=t){var n=t-e.length;i="".concat(n," character").concat(a(n)," left")}else n=e.length-t,i="".concat(n," character").concat(a(n)," over limit");return i}function s(e,t){return Array.from({length:t-e+1},(function(t,i){return e+i}))}i.r(t),i.d(t,{S:function(){return u},a:function(){return r},b:function(){return n},c:function(){return g},d:function(){return m},e:function(){return v},f:function(){return o},g:function(){return d},h:function(){return h},i:function(){return f},m:function(){return s},s:function(){return c},u:function(){return b}}),i(7911);var l=function(e){return e&&"object"==typeof e&&1===e.nodeType};function c(e,t){var i=function(e,t){if("string"!=typeof e)return[];if(!t||!l(t))return[];var i=t.shadowRoot.querySelectorAll(e);return Array.from(i)}(e,t);return"string"!=typeof e||l(t)&&t.matches(e)&&i.push(t),i}var u={_entity:/[&<>"'/]/g,_entities:{"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"},getEntity:function(e){return u._entities[e]},escapeHTML:function(e){for(var t="",i=0;i<e.length;i++)t+=e[i],i+1<arguments.length&&(t+=String(arguments[i+1]||"").replace(u._entity,u.getEntity));return t}};function d(e){var t;return(t="string"==typeof e?parseInt(e,10):Math.floor(e))>=1&&t<=6?"h".concat(t):null}function h(e){return["VA-BUTTON","VA-LINK","BUTTON","A"].includes(e.tagName)}function f(e){return e&&"false"!==e||!1}function p(e){return"[object Arguments]"===Object.prototype.toString.call(e)}function m(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];if(e===t)return!0;if("function"==typeof e||"function"==typeof t)return!0;if("object"!=typeof e||"object"!=typeof t)return!1;if(null===e||null===t)return!1;if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(e instanceof RegExp&&t instanceof RegExp)return e.source===t.source&&e.global===t.global&&e.multiline===t.multiline&&e.lastIndex===t.lastIndex&&e.ignoreCase===t.ignoreCase;if(p(e)||p(t)){if(!p(e)||!p(t))return!1;var r=Array.prototype.slice;return m(r.call(e),r.call(t),i,n)}if(e.constructor!==t.constructor)return!1;var a=Object.keys(e),o=Object.keys(t);if(0===a.length&&0===o.length)return!0;if(a.length!==o.length)return!1;for(var s=i.length;s--;)if(i[s]===e)return n[s]===t;i.push(e),n.push(t),a.sort(),o.sort();for(var l=a.length-1;l>=0;l--)if(a[l]!==o[l])return!1;for(var c=void 0,u=a.length-1;u>=0;u--)if(!m(e[c=a[u]],t[c],i,n))return!1;return i.pop(),n.pop(),!0}function g(e,t){var i;return function(){for(var n=this,r=[],a=0;a<arguments.length;a++)r[a]=arguments[a];clearTimeout(i),i=setTimeout((function(){return e.apply(n,r)}),t)}}function v(e){if(null!=e){var t="string"==typeof e?parseInt(e,10):e;if(!(t<=0||isNaN(t)))return t}}function b(e,t,i){e&&(e.innerText=o(t,v(i)))}},6555:function(e,t,i){i.r(t),i.d(t,{va_file_input:function(){return P}});var n=i(7911),r=(i(8181),i(6104)),a=i(4665),o="usa",s="".concat(o,"-file-input"),l=".".concat(s),c="".concat(o,"-file-input__input"),u="".concat(o,"-file-input__target"),d=".".concat(c),h="".concat(o,"-file-input__box"),f="".concat(o,"-file-input__instructions"),p="".concat(o,"-file-input__preview"),m="".concat(o,"-file-input__preview-heading"),g="".concat(o,"-file-input--disabled"),v="".concat(o,"-file-input__choose"),b="".concat(o,"-file-input__accepted-files-message"),y="".concat(o,"-file-input__drag-text"),x="".concat(o,"-file-input--drag"),w="is-loading",A="has-invalid-file",S="".concat(o,"-file-input__preview-image"),z="".concat(S,"--generic"),T="".concat(S,"--pdf"),k="".concat(S,"--word"),F="".concat(S,"--video"),C="".concat(S,"--excel"),E="".concat(o,"-sr-only"),L="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",_=Boolean(!0),M="",q="",I=function(e){var t=e.charCodeAt(0);return 32===t?"-":t>=65&&t<=90?"img_".concat(e.toLowerCase()):"__000".concat(t.toString(16).slice(-4))},N=function(e){return e.hasAttribute("multiple")?"files":"file"},H=function(e){var t=e.hasAttribute("aria-disabled")||e.hasAttribute("disabled"),i=function(e){var t=document.createElement("div"),i=document.createElement("div"),n=document.createElement("div");return e.classList.remove(s),e.classList.add(c),t.classList.add(s),n.classList.add(h),i.classList.add(u),i.prepend(n),e.parentNode.insertBefore(i,e),e.parentNode.insertBefore(t,i),i.appendChild(e),t.appendChild(i),i}(e),n=function(e){var t=e.closest(l),i=N(e),n=document.createElement("div"),a="Drag ".concat(i," here or"),o="choose from folder";return M="".concat(a," ").concat(o),n.classList.add(f),n.setAttribute("aria-hidden","true"),e.setAttribute("aria-label",M),n.innerHTML=r.S.escapeHTML('<span class="'.concat(y,'">').concat(a,'</span> <span class="').concat(v,'">').concat(o,"</span>")),e.parentNode.insertBefore(n,e),(/rv:11.0/i.test(navigator.userAgent)||/Edge\/\d./i.test(navigator.userAgent))&&(t.querySelector(".".concat(y)).outerHTML=""),n}(e),a=function(e){var t=e.closest(l);if(!t)throw new Error("Element is missing outer ".concat(l));var i=t.querySelector(d);return{dropZoneEl:t,inputEl:i}}(e).dropZoneEl;return t?a.classList.add(g):function(e){var t=document.createElement("div"),i=N(e),n=e.closest(l),r=e.closest(".".concat(u));q="No ".concat(i," selected."),t.classList.add(E),t.setAttribute("aria-live","polite"),t.textContent=q,n.insertBefore(t,r)}(e),{instructions:n,dropTarget:i}},B=function(e,t){var i=e.querySelectorAll(".".concat(p)),n=e.querySelector(".".concat(m)),r=e.querySelector(".".concat(b));n&&(n.outerHTML=""),r&&(r.outerHTML="",e.classList.remove(A)),null!==i&&(t&&t.removeAttribute("hidden"),Array.prototype.forEach.call(i,(function(e){e.parentNode.removeChild(e)})))},R=function(e,t,i,n){!function(e,t,i,n){var r=t.getAttribute("accept");n.classList.remove(A);var a=function(e,t){var i=!1;return e.indexOf(t)>=0&&(i=!0),i};if(r){for(var o=r.split(","),s=document.createElement("div"),l=!0,c=e.target.files||e.dataTransfer.files,u=0;u<c.length;u+=1){var d=c[u];if(!l)break;for(var h=0;h<o.length;h+=1){var f=o[h];if(l=d.name.indexOf(f)>0||a(d.type,f.replace(/\*/g,""))){_=!0;break}}}l||(B(n,i),t.value="",n.insertBefore(s,t),s.textContent=t.dataset.errormessage||"This is not a valid file type.",s.classList.add(b),n.classList.add(A),_=!1,e.preventDefault(),e.stopPropagation())}}(e,t,i,n),!0===_&&function(e,t,i,n){var a=t.getAttribute("multiple")?e.target.files:[e.target.files[0]],o=n.closest(".".concat(s)).querySelector(".".concat(E)),l=[];B(n,i);for(var c=function(e){var t,o=new FileReader,s=a[e].name;l.push(s),o.onloadstart=function(){t=function(e){return"".concat(e,"-").concat(Math.floor(Date.now()/1e3))}(function(e){return e.replace(/[^a-z0-9]/g,I)}(s)),i.insertAdjacentHTML("afterend",r.S.escapeHTML('<div class="'.concat(p,'" aria-hidden="true">\n <img id="').concat(t,'" src="').concat(L,'" alt="" class="').concat(S," ").concat(w,'"/>').concat(s,"\n <div>")))},o.onloadend=function(){var e=n.querySelector("#".concat(t));s.indexOf(".pdf")>0?e.setAttribute("onerror",'this.onerror=null;this.src="'.concat(L,'"; this.classList.add("').concat(T,'")')):s.indexOf(".doc")>0||s.indexOf(".pages")>0?e.setAttribute("onerror",'this.onerror=null;this.src="'.concat(L,'"; this.classList.add("').concat(k,'")')):s.indexOf(".xls")>0||s.indexOf(".numbers")>0?e.setAttribute("onerror",'this.onerror=null;this.src="'.concat(L,'"; this.classList.add("').concat(C,'")')):s.indexOf(".mov")>0||s.indexOf(".mp4")>0?e.setAttribute("onerror",'this.onerror=null;this.src="'.concat(L,'"; this.classList.add("').concat(F,'")')):e.setAttribute("onerror",'this.onerror=null;this.src="'.concat(L,'"; this.classList.add("').concat(z,'")')),e.classList.remove(w),e.src=o.result},a[e]&&o.readAsDataURL(a[e])},d=0;d<a.length;d+=1)c(d);0===a.length?t.setAttribute("aria-label",M):function(e,t){var i=document.createElement("div"),n=e.closest(".".concat(u)),a=n.querySelector(".".concat(f)),o="Change file",s="";1===t.length?s=r.S.escapeHTML('Selected file <span class="usa-file-input__choose">'.concat(o,"</span>")):t.length>1&&(o="Change files",s=r.S.escapeHTML("".concat(t.length,' files selected <span class="usa-file-input__choose">').concat(o,"</span>"))),a.setAttribute("hidden","true"),i.classList.add(m),i.innerHTML=s,n.insertBefore(i,a),e.setAttribute("aria-label",o)}(t,a),function(e,t,i){var n=e,r=q;1===t.length?r="You have selected the file: ".concat(i):t.length>1&&(r="You have selected ".concat(t.length," files: ").concat(i.join(", "))),setTimeout((function(){n.textContent=r}),1e3)}(o,a,l)}(e,t,i,n)},j={".txt":"text/plain",".pdf":"application/pdf",".doc":"application/msword",".docx":"application/vnd.openxmlformats-officedocument.wordprocessingml.document",".odt":"application/vnd.oasis.opendocument.text",".rtf":"application/rtf",".csv":"text/csv",".xls":"application/vnd.ms-excel",".xlsx":"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",".ppt":"application/vnd.ms-powerpoint",".pptx":"application/vnd.openxmlformats-officedocument.presentationml.presentation",".jpg":"image/jpeg",".jpeg":"image/jpeg",".png":"image/png",".gif":"image/gif",".bmp":"image/bmp",".webp":"image/webp",".tif":"image/tiff",".tiff":"image/tiff",".svg":"image/svg+xml",".mp3":"audio/mpeg",".wav":"audio/wav",".ogg":"audio/ogg",".m4a":"audio/mp4",".aac":"audio/aac",".mp4":"video/mp4",".avi":"video/x-msvideo",".mov":"video/quicktime",".wmv":"video/x-ms-wmv",".flv":"video/x-flv",".mkv":"video/x-matroska",".webm":"video/webm",".zip":"application/zip",".rar":"application/x-rar-compressed",".7z":"application/x-7z-compressed",".tar":"application/x-tar",".gz":"application/gzip",".json":"application/json",".xml":"application/xml",".html":"text/html",".htm":"text/html",".css":"text/css",".js":"application/javascript",".heic":"image/heic"},P=function(){function e(e){var t=this;(0,n.r)(this,e),this.vaChange=(0,n.c)(this,"vaChange",7),this.vaPasswordChange=(0,n.c)(this,"vaPasswordChange",7),this.vaFileInputError=(0,n.c)(this,"vaFileInputError",7),this.componentLibraryAnalytics=(0,n.c)(this,"component-library-analytics",7),this.uploadStatus="idle",this.chooseFileString="choose from folder",this.dragFileString="Drag a file here or ",this.FILE_PREVIEW_SIZE_LIMIT=5242880,this.handleChange=function(e){var i=e.target;t.fileContents=null,i.files&&i.files.length>0&&t.handleFile(i.files[0]),i.value=""},this.handleDrop=function(e){e.preventDefault(),e.stopPropagation();var i=e.dataTransfer.files;i.length>0&&t.handleFile(i[0])},this.getExtension=function(e){var t=e.name.replace(/^\./,"");return(t.includes(".")?".".concat(t.split(".").pop()):null)||e.type},this.getFileTypeErrorMessage=function(e){var i=t.getExtension(e),n=i?"".concat(i," files"):"this file type";return"We do not accept ".concat(n,". Choose a new file.")},this.handleFile=function(e,i){void 0===i&&(i=!0);var n=null;if(t.accept){var r=t.normalizeAcceptProp(t.accept);t.isAcceptedFileType(e.type,r)||(t.removeFile(!1),n=t.getFileTypeErrorMessage(e))}if(0===e.size&&(n="The file you selected is empty. Files must be larger than 0B."),e.size>t.maxFileSize&&(n="\n We can't upload your file because it's too big. Files must be less than ".concat(t.formatFileSize(t.maxFileSize),".")),e.size<t.minFileSize&&(n="We can't upload your file because it's too small. Files must be at least ".concat(t.formatFileSize(t.minFileSize),".")),t.uploadedFile=null,t.file=e,n)return t.internalError=n,t.vaFileInputError.emit({error:n}),void t.resetState();i&&t.vaChange.emit({files:[t.file]}),t.uploadStatus="success",t.internalError=null,e.size<t.FILE_PREVIEW_SIZE_LIMIT&&t.generateFileContents(t.file),t.updateStatusMessage("You have selected the file: ".concat(t.file.name)),t.el.focus(),t.enableAnalytics&&t.componentLibraryAnalytics.emit({componentName:"va-file-input",action:"change",details:{label:t.label}})},this.removeFile=function(e){void 0===e&&(e=!0),t.closeModal(),t.uploadStatus="idle",t.internalError=null,e&&t.vaChange.emit({files:[]}),t.file=null,t.uploadedFile=null,t.updateStatusMessage("File deleted. No file selected."),t.el.focus()},this.openModal=function(){t.el.shadowRoot.querySelector("va-modal").setAttribute("status","warning"),t.showModal=!0},this.closeModal=function(){t.showModal=!1,setTimeout((function(){t.fileInputRef.focus()}),0)},this.changeFile=function(){t.fileInputRef&&t.fileInputRef.click()},this.formatFileSize=function(e){var t=["B","KB","MB","GB","TB"];if(0===e)return"0 B";var i=Math.floor(Math.log(e)/Math.log(1024));if(0===i)return"".concat(e," ").concat(t[i]);var n=(e/Math.pow(1024,i)).toFixed(i<2?0:1);return"".concat(n," ").concat(t[i])},this.normalizeAcceptProp=function(e){return e.split(",").map((function(e){return(e=e.trim()).startsWith(".")?j[e]:e}))},this.isAcceptedFileType=function(e,t){for(var i=0,n=t;i<n.length;i++){var r=n[i];if(r===e)return!0;if(r.endsWith("/*")&&e.startsWith(r.slice(0,-1)))return!0}return!1},this.renderLabelOrHeader=function(e,t,i){var r=t?(0,n.h)("span",{class:"required"}," ",a.i.t("required")):null;if(i&&i>=1&&i<=6){var o="h".concat(i);return(0,n.h)("div",{class:"label-header"},(0,n.h)(o,{htmlFor:"fileInputField",part:"label",class:"label-header-tag"},e,r))}return(0,n.h)("div",{class:"label-header"},(0,n.h)("label",{htmlFor:"fileInputField",part:"label",class:"usa-label"},e,r))},this.file=void 0,this.fileContents=void 0,this.internalError=void 0,this.showModal=!1,this.showSeparator=!0,this.label=void 0,this.name=void 0,this.value=void 0,this.required=!1,this.accept=void 0,this.error=void 0,this.hint=void 0,this.statusText=void 0,this.uploadMessage=null,this.enableAnalytics=!1,this.headerSize=void 0,this.headless=!1,this.readOnly=!1,this.encrypted=!1,this.uploadedFile=void 0,this.maxFileSize=1/0,this.minFileSize=0,this.percentUploaded=null,this.passwordError=void 0}return e.prototype.handleValueChange=function(e){var t=this;setTimeout((function(){t.updateStatusMessage(e)}))},e.prototype.percentHandler=function(e){e>=100&&this.resetState()},e.prototype.handleError=function(e,t){t&&e&&this.resetState()},e.prototype.resetState=function(){this.fileContents=null,this.uploadStatus="idle",this.percentUploaded=null,(0,n.f)(this.el)},e.prototype.updateStatusMessage=function(e){var t=this;setTimeout((function(){var i=t.el.shadowRoot.querySelector("#statusMessage");i&&(i.textContent=e)}),1e3)},e.prototype.generateFileContents=function(e){return function(e,t,i,n){function r(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,a){function o(e){try{l(n.next(e))}catch(e){a(e)}}function s(e){try{l(n.throw(e))}catch(e){a(e)}}function l(e){e.done?i(e.value):r(e.value).then(o,s)}l((n=n.apply(e,t||[])).next())}))}(this,void 0,void 0,(function(){var t,i,n,r,a=this;return function(e,t){var i,n,r,a,o={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(e){return function(t){return l([e,t])}}function l(s){if(i)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(o=0)),o;)try{if(i=1,n&&(r=2&s[0]?n.return:s[0]?n.throw||((r=n.return)&&r.call(n),0):n.next)&&!(r=r.call(n,s[1])).done)return r;switch(n=0,r&&(s=[2&s[0],r.value]),s[0]){case 0:case 1:r=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,n=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!((r=(r=o.trys).length>0&&r[r.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!r||s[1]>r[0]&&s[1]<r[3])){o.label=s[1];break}if(6===s[0]&&o.label<r[1]){o.label=r[1],r=s;break}if(r&&o.label<r[2]){o.label=r[2],o.ops.push(s);break}r[2]&&o.ops.pop(),o.trys.pop();continue}s=t.call(e,o)}catch(e){s=[6,e],n=0}finally{i=r=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}}(this,(function(o){switch(o.label){case 0:return e?[4,e.slice(0,20).arrayBuffer()]:[2];case 1:return t=o.sent(),i=new Uint8Array(t),n=i.every((function(e){return 0===e})),n||(r=new FileReader,this.fileType=e.type,r.onloadend=function(){a.fileContents=r.result},!this.fileType||"application/pdf"!==this.fileType&&!this.fileType.startsWith("image/")||this.fileType.includes("heic")||r.readAsDataURL(e)),[2]}}))}))},e.prototype.componentWillRender=function(){var e=!!this.el.querySelector(":scope > *"),t=!(!this.value&&!this.file||this.readOnly);this.showSeparator=e||t},e.prototype.componentDidLoad=function(){!function(e){(0,r.s)(l,e).forEach((function(e){var t=H(e),i=t.instructions,n=t.dropTarget;n.addEventListener("dragover",(function(){this.classList.add(x)}),!1),n.addEventListener("dragleave",(function(){this.classList.remove(x)}),!1),n.addEventListener("drop",(function(t){t.preventDefault(),this.classList.remove(x);var r=t.dataTransfer;if(t.target.files=r.files,!(r.files.length>1)){R(t,e,i,n);var a=new CustomEvent("change",{detail:{files:r.files}});e.dispatchEvent(a)}}),!1),e.addEventListener("input",(function(t){return R(t,e,i,n)}),!1)}))}(this.el)},e.prototype.connectedCallback=function(){this.el.addEventListener("change",this.handleChange)},e.prototype.disconnectedCallback=function(){this.el.removeEventListener("change",this.handleChange)},e.prototype.getDefaultUploadMessage=function(){return(0,n.h)("span",null,this.dragFileString,(0,n.h)("span",{class:"file-input-choose-text"},this.chooseFileString))},e.prototype.handlePasswordChange=function(e){this.vaPasswordChange.emit({password:e.target.value})},e.prototype.render=function(){var e=this,t=this,i=t.label,r=t.name,o=t.required,s=t.accept,l=t.error,c=t.hint,u=t.dragFileString,d=t.chooseFileString,h=t.uploadMessage,f=t.headerSize,p=t.fileContents,m=t.fileType,g=t.headless,v=t.value,b=t.readOnly,y=t.encrypted,x=t.statusText,w=t.uploadedFile,A=t.percentUploaded,S=t.passwordError,z=t.internalError;v&&!this.file&&this.handleFile(v,!1);var T=this.uploadStatus,k=this.file,F=l||z,C="".concat(c?"input-hint-message":""," ").concat(F?"input-error-message":"").trim()||null,E="file-input-target ".concat(F?"file-input-target-error":"").trim(),L=(0,n.h)("div",{key:"1be2173ac82c62d752bcd6cb2df252d49ad8e82f",class:"thumbnail-container"},(0,n.h)("svg",{key:"c58ec29d3a3a66bed6a1dfc21c08afdd40f61853",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 384 512",fill:"#07648d",width:"40px",height:"40px"},(0,n.h)("path",{key:"2c52d9de3f4036fdad9cdf1583c4eb400d2f0878",d:"M224 136V0H24C10.7 0 0 10.7 0 24v464c0 13.3 10.7 24 24 24h336c13.3 0 24-10.7 24-24V160H248c-13.2 0-24-10.8-24-24zm160-14.1v6.1H256V0h6.1c6.4 0 12.5 2.5 17 7l97.9 98c4.5 4.5 7 10.6 7 16.9z"})));F?L=(0,n.h)("div",{key:"ed76a5e6b2d6f03db7bf4d5e8bd2e1c1bd9ca339",class:"thumbnail-container"},(0,n.h)("va-icon",{key:"4f000236785434d191c72b852db5d26b6039c9fb",icon:"error",size:3,class:"thumbnail-preview thumbnail-error"})):p&&(m.startsWith("image/")?L=(0,n.h)("div",{key:"063672591b3ce4295609ee1408588205cc594347",class:"thumbnail-container","aria-hidden":"true"},(0,n.h)("img",{key:"10c3e58c18b797b651b3ca153668ece409710357",class:"thumbnail-preview",src:p,alt:"image"})):"application/pdf"===m&&(L=(0,n.h)("div",{key:"82b9f4f8384d68770262d3f24467bcbbd792fb2e",class:"thumbnail-container","aria-hidden":"true"},(0,n.h)("object",{key:"cec3668d7d579439a656e36f7f6af4d71493af78",class:"thumbnail-preview",data:p,type:"application/pdf",tabIndex:-1}))));var _=g?"headless-selected-files-wrapper":"selected-files-wrapper",M="usa-hint"+(g?" usa-sr-only":""),q=null!==A&&A<100,I="file-status-label";return q&&(I="".concat(I," uploading-status")),(0,n.h)(n.H,{key:"defb19a05b1c19ddb6ae3b74b2a83367f46a9acd",class:{"has-error":!!F}},!b&&(0,n.h)("span",{key:"9262a4982379c1c029913c256310a5964a5dee00",class:{"usa-sr-only":!!g}},i&&this.renderLabelOrHeader(i,o,f)),c&&!b&&(0,n.h)("div",{key:"ba691a847704d4732c3828ec6fb2c142b576e0b4",class:M,id:"input-hint-message"},c),(0,n.h)("div",{key:"171535846a71cc09377269c5e9666863d00dc1df",class:"file-input-wrapper",onDrop:this.handleDrop},(0,n.h)("input",{key:"b704c188faaaea962372f5e2bbb08be982cf6df1",id:"fileInputField",class:"file-input","aria-label":"".concat(i).concat(o?" "+a.i.t("required"):"",". ").concat(u).concat(d),style:{visibility:"success"===T||w||z?"hidden":"unset"},type:"file",ref:function(t){return e.fileInputRef=t},name:r,accept:s,"aria-describedby":C,onChange:this.handleChange}),w||k?(0,n.h)("div",{class:_},!g&&(0,n.h)("div",{class:"selected-files-label"},b?"Files you uploaded":"Selected files"),(0,n.h)("div",{class:"usa-sr-only","aria-live":"polite",id:"statusMessage"}),(0,n.h)("va-card",{class:"va-card"},(0,n.h)("div",{class:"file-info-section"},L,(0,n.h)("div",{class:"file-info-group vads-u-line-height--2"},(0,n.h)("span",{class:"file-label"},k?k.name:w.name),F&&(0,n.h)("span",{id:"input-error-message",role:"alert"},(0,n.h)("span",{class:"usa-sr-only"},a.i.t("error")),(0,n.h)("span",{"aria-live":"polite",class:"usa-error-message"},F)),!q&&(0,n.h)("span",{class:"file-size-label"},this.formatFileSize(k?k.size:w.size)),(0,n.h)("span",{class:I,"aria-live":"polite"},q?"Uploading...":x))),(0,n.h)("div",{class:this.showSeparator?"with-separator":void 0},!b&&q&&(0,n.h)(n.F,null,(0,n.h)("va-progress-bar",{percent:A}),(0,n.h)("va-button-icon",{buttonType:"cancel",onClick:this.resetState.bind(this)})),!q&&(0,n.h)(n.F,null,y&&(0,n.h)("va-text-input",{type:"password",onInput:function(t){e.handlePasswordChange(t)},label:"File password",required:!0,error:S}),(0,n.h)("div",{class:"additional-info-slot"},(0,n.h)("slot",null))),!b&&!q&&(0,n.h)(n.F,null,(0,n.h)("div",{class:"file-button-section"},(0,n.h)("va-button-icon",{buttonType:"change-file",onClick:this.changeFile,label:"change file ".concat(k?k.name:w.name)}),(0,n.h)("va-button-icon",{buttonType:"delete",onClick:this.openModal,label:"delete file ".concat(k?k.name:w.name)})),(0,n.h)("va-modal",{modalTitle:"Delete this file?",visible:this.showModal,primaryButtonText:"Yes, delete this",secondaryButtonText:"No, keep this",onCloseEvent:this.closeModal,onPrimaryButtonClick:function(){return e.removeFile(!0)},onSecondaryButtonClick:this.closeModal},"We'll delete the uploaded file"," ",(0,n.h)("span",{class:"file-label"},k?k.name:w.name)))))):(0,n.h)("div",null,(0,n.h)("span",{id:"file-input-error-alert",role:"alert"},F&&(0,n.h)(n.F,null,(0,n.h)("span",{class:"usa-sr-only"},a.i.t("error")),(0,n.h)("span",{class:"usa-error-message"},F))),(0,n.h)("div",{class:"usa-sr-only","aria-live":"polite",id:"statusMessage"}),(0,n.h)("div",{class:E},(0,n.h)("div",{class:"file-input-box"}),(0,n.h)("div",{class:"file-input-instructions"},h||this.getDefaultUploadMessage())))))},Object.defineProperty(e.prototype,"el",{get:function(){return(0,n.g)(this)},enumerable:!1,configurable:!0}),Object.defineProperty(e,"watchers",{get:function(){return{statusText:["handleValueChange"],percentUploaded:["percentHandler"],error:["handleError"]}},enumerable:!1,configurable:!0}),e}();P.style='button:not([disabled]):focus,select:not([disabled]):focus,a:not([disabled]):focus,h1:focus,input:not([disabled]):focus,textarea:not([disabled]):focus,#form-question [role=\'option\']:focus,*[tabindex]:focus,a.va-sidenav-submenu__link:focus{outline:2px solid var(--vads-color-action-focus-on-light);outline-offset:2px;z-index:2}h1{margin-top:0}h1,h2,h3,h4,h5,h6{margin-bottom:0;margin-top:0;clear:both}*+h1,*+h2,*+h3,*+h4,*+h5,*+h6{margin-top:1.5em}h1+*,h2+*,h3+*,h4+*,h5+*,h6+*{margin-top:1em}h1{font-family:Merriweather Web, Georgia, Cambria, Times New Roman, Times, serif;font-size:2.44rem;line-height:1.2;font-weight:700}h2{font-family:Merriweather Web, Georgia, Cambria, Times New Roman, Times, serif;font-size:1.95rem;line-height:1.2;font-weight:700}h3{font-family:Merriweather Web, Georgia, Cambria, Times New Roman, Times, serif;font-size:1.34rem;line-height:1.2;font-weight:700}h4{font-family:Merriweather Web, Georgia, Cambria, Times New Roman, Times, serif;font-size:0.98rem;line-height:1.2;font-weight:700}h5{font-family:Merriweather Web, Georgia, Cambria, Times New Roman, Times, serif;font-size:0.91rem;line-height:1.2;font-weight:700}h6{font-family:Source Sans Pro Web, Helvetica Neue, Helvetica, Roboto, Arial, sans-serif;font-size:0.87rem;line-height:1.1;font-weight:normal;letter-spacing:0.025em;text-transform:uppercase}h1,h2,h3,h4,h5{font-family:Bitter, Georgia, Cambria, "Times New Roman", Times, serif;font-weight:700}h6{font-family:"Source Sans Pro Web", "Source Sans Pro", "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif;font-weight:700}h1{margin-top:0;font-size:2.5rem}h2{font-size:2rem}h3{font-size:1.25rem}h4{font-size:1.0625rem}h5{font-size:0.9375rem}h6{font-size:0.9375rem}@media (max-width: 481px){h1{font-size:1.875rem}h2{font-size:1.5rem}}h6{margin:0.5em 0 0;text-transform:none;font-weight:700}@media (max-width: 481px){h1{font-size:1.875rem}h2{font-size:1.5rem}}h6{margin:0.5em 0 0;text-transform:none;font-weight:700}:host legend :is(h1,h2,h3,h4,h5,h6),:host label :is(h1,h2,h3,h4,h5,h6){display:inline;margin:0px}:host legend :is(h1,h2,h3,h4,h5),:host label :is(h1,h2,h3,h4,h5){font-family:var(--font-serif)}:host h1+*,:host h2+*,:host h3+*,:host h4+*,:host h5+*,:host h6+*{margin-top:unset}:host #form-question{margin-bottom:1rem}.usa-hint{font-family:Source Sans Pro Web, "Source Sans Pro", "Helvetica Neue", Helvetica, Arial, sans;font-size:1.06rem;line-height:1.3}.usa-label{font-family:Source Sans Pro Web, "Source Sans Pro", "Helvetica Neue", Helvetica, Arial, sans;font-size:1.06rem;line-height:1.3;display:block;font-weight:normal;margin-top:1.5rem;max-width:30rem}.usa-label--error{font-weight:700;margin-top:0}.usa-label--required{color:#b50909}.usa-hint{color:#71767a}.usa-hint--required{color:#b50909}.usa-sr-only{position:absolute;left:-999em;right:auto}.usa-error-message{padding-bottom:0.25rem;padding-top:0.25rem;color:#b50909;display:block;font-weight:700}.usa-error-message{font-size:1.06rem}:host([error]:not([error=""])),:host(.va-form-group--error){border-left:0.25rem solid #b50909;padding-left:1rem;position:relative}:host([error]:not([error=""])[use-forms-pattern=multiple]),:host(.va-form-group--error[use-forms-pattern=multiple]){border-left:none}:host([error]:not([error=""])[use-forms-pattern=multiple]) .input-wrap,:host(.va-form-group--error[use-forms-pattern=multiple]) .input-wrap{border-left:0.25rem solid #b50909;padding-left:1rem;position:relative}@media screen and (min-width: 1024px){:host([error]:not([error=""])),:host(.va-form-group--error){margin-left:-0.9rem}:host([error]:not([error=""])[use-forms-pattern=multiple]) .input-wrap,:host(.va-form-group--error[use-forms-pattern=multiple]) .input-wrap{margin-left:-0.9rem}}@media screen and (max-width: 1023px){:host([error]:not([error=""])[use-forms-pattern=multiple]),:host(.va-form-group--error[use-forms-pattern=multiple]){padding-left:0}}[hidden]{display:none}:host{display:block;font-family:var(--font-source-sans);font-size:16.96px;}:host .label-header{color:var(--vads-color-base);font-weight:var(--font-weight-normal)}:host .label-header-tag{margin:0;display:inline-block}:host .file-input-wrapper{display:block;max-width:30rem;width:100%;position:relative;margin:8px 0}:host .file-input{cursor:pointer;height:100%;width:100%;max-width:none;top:0;left:0;z-index:1;margin:0;position:absolute;text-indent:-999em;-webkit-box-sizing:border-box;box-sizing:border-box}:host .file-input-target{border:1px dashed var(--vads-color-action-border-base-active-on-dark);display:block;margin-top:0.3125rem;position:relative;text-align:center;width:100%;-webkit-box-sizing:border-box;box-sizing:border-box}:host .file-input-target.file-input-target-error{border:2px dashed var(--vads-color-secondary-dark)}:host .file-input-box{background:var(--vads-color-white);height:100%;left:0;pointer-events:none;position:absolute;top:0;width:100%;z-index:2}:host .file-input-instructions{font-size:1.06rem;padding:1.25rem 0.625rem;pointer-events:none;position:relative;z-index:3}:host .file-input-choose-text{color:var(--vads-color-link);text-decoration:underline;font-weight:var(--font-weight-normal)}:host .file-icon{color:var(--vads-color-primary-alt-darkest)}:host .selected-files-wrapper{background-color:var(--vads-color-primary-lighter);border:1px solid var(--vads-color-base-light)}:host .selected-files-label{color:var(--vads-color-base);font-weight:var(--font-weight-bold);font-size:1.06rem;border-bottom:1px solid var(--vads-color-white);margin-bottom:8px;padding:8px}:host .va-card{margin:8px}:host .file-label{color:var(--vads-color-base);font-weight:var(--font-weight-bold);font-size:1.06rem;padding:0 8px;display:block;width:100%;word-wrap:break-word;word-break:break-word;overflow:hidden}:host #input-error-message{padding:0 8px;width:100%}:host .file-size-label,:host .file-status-label{color:var(--vads-color-base-dark);font-weight:var(--font-weight-normal);font-size:1.06rem;padding:0 8px;display:block}:host .file-status-label{font-style:italic}:host .file-info-section{padding:0 8px 8px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}:host .file-button-section{margin-top:8px;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-direction:row;flex-direction:row}:host .file-button-section>va-button-icon{font-size:1.06rem}@media screen and (max-width: 320px){:host .file-button-section{-ms-flex-direction:column;flex-direction:column;-ms-flex-align:start;align-items:flex-start}}:host .with-separator{border-top:1px solid var(--vads-color-base-lighter)}:host .vads-u-line-height--2{line-height:1.15}:host .thumbnail-container{height:40px;width:40px;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}:host .thumbnail-preview{max-width:40px;width:auto;max-height:40px;height:auto}:host .thumbnail-error{color:#b21d38}:host va-progress-bar{font-size:var(--vads-font-size-root);display:block;margin-left:16px}:host .uploading-status{font-style:var(--font-style-italic)}:host(.has-error){border-left:0.25rem solid #b50909;padding-left:1rem;position:relative}@media screen and (min-width: 1024px){:host(.has-error){margin-left:-0.9rem}}.required{color:var(--vads-color-secondary-dark);margin-left:0.25rem}h1 .required,h2 .required,h3 .required,h4 .required,h5 .required,h6 .required{font-family:var(--font-source-sans);font-size:initial;font-weight:initial}'}}]);
|
package/dist/6650.app.bundle.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see 6650.app.bundle.js.LICENSE.txt */
|
|
2
|
-
"use strict";(self.webpackChunk_department_of_veterans_affairs_component_library=self.webpackChunk_department_of_veterans_affairs_component_library||[]).push([[4569,6104,6650],{4569:function(e,a,r){r.r(a),r.d(a,{c:function(){return o}});var t,i={exports:{}};t=i,function(){var e={}.hasOwnProperty;function a(){for(var r=[],t=0;t<arguments.length;t++){var i=arguments[t];if(i){var o=typeof i;if("string"===o||"number"===o)r.push(i);else if(Array.isArray(i)){if(i.length){var n=a.apply(null,i);n&&r.push(n)}}else if("object"===o)if(i.toString===Object.prototype.toString)for(var s in i)e.call(i,s)&&i[s]&&r.push(s);else r.push(i.toString())}}return r.join(" ")}t.exports?(a.default=a,t.exports=a):window.classNames=a}();var o=i.exports},6104:function(e,a,r){function t(e){return!Number.isNaN(parseFloat(e))}function i(e,a,r){void 0===r&&(r="slot");var t=e.shadowRoot.querySelector(r).assignedNodes();return null!==a?Array.from(t).filter((function(e){return e.nodeName.toLowerCase()===a})):Array.from(t)}function o(e){return 1===e?"":"s"}function n(e,a){if(void 0===e||""===e)return"".concat(a," character").concat(o(a)," allowed");var r;if(e.length<=a){var t=a-e.length;r="".concat(t," character").concat(o(t)," left")}else t=e.length-a,r="".concat(t," character").concat(o(t)," over limit");return r}function s(e,a){return Array.from({length:a-e+1},(function(a,r){return e+r}))}r.r(a),r.d(a,{S:function(){return c},a:function(){return i},b:function(){return t},c:function(){return p},d:function(){return m},e:function(){return g},f:function(){return n},g:function(){return d},h:function(){return h},i:function(){return f},m:function(){return s},s:function(){return l},u:function(){return v}}),r(7911);var u=function(e){return e&&"object"==typeof e&&1===e.nodeType};function l(e,a){var r=function(e,a){if("string"!=typeof e)return[];if(!a||!u(a))return[];var r=a.shadowRoot.querySelectorAll(e);return Array.from(r)}(e,a);return"string"!=typeof e||u(a)&&a.matches(e)&&r.push(a),r}var c={_entity:/[&<>"'/]/g,_entities:{"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"},getEntity:function(e){return c._entities[e]},escapeHTML:function(e){for(var a="",r=0;r<e.length;r++)a+=e[r],r+1<arguments.length&&(a+=String(arguments[r+1]||"").replace(c._entity,c.getEntity));return a}};function d(e){var a;return(a="string"==typeof e?parseInt(e,10):Math.floor(e))>=1&&a<=6?"h".concat(a):null}function h(e){return["VA-BUTTON","VA-LINK","BUTTON","A"].includes(e.tagName)}function f(e){return e&&"false"!==e||!1}function b(e){return"[object Arguments]"===Object.prototype.toString.call(e)}function m(e,a){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],t=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];if(e===a)return!0;if("function"==typeof e||"function"==typeof a)return!0;if("object"!=typeof e||"object"!=typeof a)return!1;if(null===e||null===a)return!1;if(e instanceof Date&&a instanceof Date)return e.getTime()===a.getTime();if(e instanceof RegExp&&a instanceof RegExp)return e.source===a.source&&e.global===a.global&&e.multiline===a.multiline&&e.lastIndex===a.lastIndex&&e.ignoreCase===a.ignoreCase;if(b(e)||b(a)){if(!b(e)||!b(a))return!1;var i=Array.prototype.slice;return m(i.call(e),i.call(a),r,t)}if(e.constructor!==a.constructor)return!1;var o=Object.keys(e),n=Object.keys(a);if(0===o.length&&0===n.length)return!0;if(o.length!==n.length)return!1;for(var s=r.length;s--;)if(r[s]===e)return t[s]===a;r.push(e),t.push(a),o.sort(),n.sort();for(var u=o.length-1;u>=0;u--)if(o[u]!==n[u])return!1;for(var l=void 0,c=o.length-1;c>=0;c--)if(!m(e[l=o[c]],a[l],r,t))return!1;return r.pop(),t.pop(),!0}function p(e,a){var r;return function(){for(var t=this,i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];clearTimeout(r),r=setTimeout((function(){return e.apply(t,i)}),a)}}function g(e){if(null!=e){var a="string"==typeof e?parseInt(e,10):e;if(!(a<=0||isNaN(a)))return a}}function v(e,a,r){e&&(e.innerText=n(a,g(r)))}},6650:function(e,a,r){r.r(a),r.d(a,{va_textarea:function(){return s}});var t=r(7911),i=r(4569),o=(r(8014),r(6104)),n=r(4665),s=function(){function e(e){var a=this;(0,t.r)(this,e),this.componentLibraryAnalytics=(0,t.c)(this,"component-library-analytics",7),this.debouncedUpdateScreenReaderCount=(0,o.c)(o.u,1e3),this.handleInput=function(e){var r=e.target;a.value=r.value,a.debouncedUpdateScreenReaderCount(a.charCountElement,a.value,(0,o.e)(a.maxlength))},this.handleBlur=function(){a.enableAnalytics&&a.value&&a.componentLibraryAnalytics.emit({componentName:"va-textarea",action:"blur",details:{label:a.label,value:a.value}})},this.label=void 0,this.error=void 0,this.placeholder=void 0,this.name=void 0,this.required=!1,this.hint=void 0,this.messageAriaDescribedby=void 0,this.maxlength=void 0,this.value=void 0,this.enableAnalytics=!1,this.labelHeaderLevel=void 0,this.headerAriaDescribedby=void 0,this.useFormsPattern=void 0,this.formHeadingLevel=3,this.formHeading=void 0,this.charcount=!1}return e.prototype.connectedCallback=function(){var e=this;n.i.on("languageChanged",(function(){(0,t.f)(e.el)}))},e.prototype.disconnectedCallback=function(){n.i.off("languageChanged")},e.prototype.componentDidRender=function(){this.charCountElement&&!this.charCountElement.innerText&&(this.charCountElement.innerText=(0,o.f)(this.value,(0,o.e)(this.maxlength)))},e.prototype.render=function(){var e=this,a=this,r=a.label,s=a.error,u=a.placeholder,l=a.name,c=a.required,d=a.value,h=a.hint,f=a.charcount,b=a.messageAriaDescribedby,m=a.useFormsPattern,p=a.formHeadingLevel,g=a.headerAriaDescribedby,v=a.formHeading,y=(0,o.e)(this.maxlength),x="".concat(s?"input-error-message":""," ").concat(f&&y?"charcount-message":""," ").concat(b?"input-message":"").trim()||null,w="".concat(m&&v?"form-question":""," ").concat(m?"form-description":""," ").concat(m&&r?"input-label":"").trim()||null,k=(0,o.g)(this.labelHeaderLevel),T=g?"header-message":null,_=f&&(null==d?void 0:d.length)>y,z=(0,i.c)({"usa-label":!0,"usa-label--error":s}),A=(0,i.c)({"usa-textarea":!0,"usa-input--error":s}),S=(0,i.c)({"usa-hint":!0,"usa-character-count__status":f,"usa-character-count__status--invalid":f&&y&&(null==d?void 0:d.length)>y}),N=null;if("single"===m||"multiple"===m){var C=(0,o.g)(p);N=(0,t.h)(t.F,{key:"34491741cc1140547c135f76d57aeb34ffb082e4"},v&&(0,t.h)(C,{key:"f30217fb24dea8abe346787390516c1e99299ef1",id:"form-question",part:"form-header"},v),(0,t.h)("div",{key:"282443fe0575f1c92633fac597a73e1ed0c40707",id:"form-description"},(0,t.h)("slot",{key:"9f9a35b1e306756ec6f6db92bd11afb892410b39",name:"form-description"})))}var q=(0,t.h)("label",{key:"dead3290693dd529d2bd24f5a31f9dc34d2a6a67",htmlFor:"input-type-textarea",id:"input-label",class:z,part:"label"},r,"multiple"===m&&g?(0,t.h)("span",{id:"header-message",class:"usa-sr-only"},(0,t.h)("span",null,r),(0,t.h)("span",null,g)):"multiple"===m?(0,t.h)("span",{id:"header-message",class:"usa-sr-only"},r):g?(0,t.h)("span",{id:"header-message",class:"usa-sr-only"},g):null,c&&(0,t.h)("span",{key:"c1a70e7f48dba299f95c2ecea754826c5342b8ec",class:"usa-label--required"}," ",n.i.t("required")),h&&(0,t.h)("div",{key:"d28f99c54c3c745ace0a22a1c97f1f39913bcb25",class:"usa-hint"},h));return(0,t.h)(t.H,{key:"4fed118ee8389c2c6a339059d730f5c452bd13f5"},N,(0,t.h)("div",{key:"5caa97bdf99390e77aa8be661826137355cceb2e",class:"input-wrap"},r&&k?(0,t.h)(k,{part:"header","aria-describedby":T},q):q,(0,t.h)("slot",{key:"da9c4b8d6a80dba86a3536eee74f060a3a432264"}),(0,t.h)("span",{key:"4109e9a8217d87db12481cb3e6dc1837c0bdca8b",id:"input-error-message",role:"alert"},s&&(0,t.h)(t.F,{key:"e3973000ca44db8f0bcab2bfd4ffe8902d1aa3d3"},(0,t.h)("span",{key:"b3a13dc9f3e3b5e63f09bae95df4adb58d66f899",class:"usa-sr-only"},n.i.t("error")),(0,t.h)("span",{key:"4338917b8ddcd0942239bf90c41cc040a340c4ba",class:"usa-error-message"},s))),(0,t.h)("textarea",{key:"692907cd68c836ef4427c9a98a47dd94495676b3",class:A,"aria-describedby":x,"aria-invalid":s||_?"true":"false","aria-labelledby":w,onInput:this.handleInput,onBlur:this.handleBlur,id:"input-type-textarea",placeholder:u,name:l,maxLength:f?void 0:y,value:d,part:"input-type-textarea"}),!f&&y&&(null==d?void 0:d.length)>=y&&(0,t.h)("span",{key:"f60d711533ae5f10cc1e512649c46a4b250a8531",class:S,"aria-live":"polite"},n.i.t("max-chars",{length:y})),f&&y&&(0,t.h)(t.F,{key:"893eb4b7099e034afd4f8a9064cb46a9e984fe46"},(0,t.h)("span",{key:"bbb4e59cd3dd6b582fb2d05b37944bd8eacf383f","aria-hidden":"true",class:S},(0,o.f)(this.value,(0,o.e)(this.maxlength))),(0,t.h)("span",{key:"6c39f58d3b2c8fa02a84c0849992ef96d8b15af0",id:"charcount-message","aria-live":"polite",class:"usa-sr-only",ref:function(a){return e.charCountElement=a}})),(0,o.i)(b)&&(0,t.h)("span",{key:"8a9ca2e11484492732674d49eaf8b89c7a5219a2",id:"input-message",class:"usa-sr-only dd-privacy-hidden"},b)))},Object.defineProperty(e.prototype,"el",{get:function(){return(0,t.g)(this)},enumerable:!1,configurable:!0}),e}();s.style='button:not([disabled]):focus,select:not([disabled]):focus,a:not([disabled]):focus,h1:focus,input:not([disabled]):focus,textarea:not([disabled]):focus,#form-question [role=\'option\']:focus,*[tabindex]:focus,a.va-sidenav-submenu__link:focus{outline:2px solid var(--vads-color-action-focus-on-light);outline-offset:2px;z-index:2}h1{margin-top:0}h1,h2,h3,h4,h5,h6{margin-bottom:0;margin-top:0;clear:both}*+h1,*+h2,*+h3,*+h4,*+h5,*+h6{margin-top:1.5em}h1+*,h2+*,h3+*,h4+*,h5+*,h6+*{margin-top:1em}h1{font-family:Merriweather Web, Georgia, Cambria, Times New Roman, Times, serif;font-size:2.44rem;line-height:1.2;font-weight:700}h2{font-family:Merriweather Web, Georgia, Cambria, Times New Roman, Times, serif;font-size:1.95rem;line-height:1.2;font-weight:700}h3{font-family:Merriweather Web, Georgia, Cambria, Times New Roman, Times, serif;font-size:1.34rem;line-height:1.2;font-weight:700}h4{font-family:Merriweather Web, Georgia, Cambria, Times New Roman, Times, serif;font-size:0.98rem;line-height:1.2;font-weight:700}h5{font-family:Merriweather Web, Georgia, Cambria, Times New Roman, Times, serif;font-size:0.91rem;line-height:1.2;font-weight:700}h6{font-family:Source Sans Pro Web, Helvetica Neue, Helvetica, Roboto, Arial, sans-serif;font-size:0.87rem;line-height:1.1;font-weight:normal;letter-spacing:0.025em;text-transform:uppercase}h1,h2,h3,h4,h5{font-family:Bitter, Georgia, Cambria, "Times New Roman", Times, serif;font-weight:700}h6{font-family:"Source Sans Pro Web", "Source Sans Pro", "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif;font-weight:700}h1{margin-top:0;font-size:2.5rem}h2{font-size:2rem}h3{font-size:1.25rem}h4{font-size:1.0625rem}h5{font-size:0.9375rem}h6{font-size:0.9375rem}@media (max-width: 481px){h1{font-size:1.875rem}h2{font-size:1.5rem}}h6{margin:0.5em 0 0;text-transform:none;font-weight:700}@media (max-width: 481px){h1{font-size:1.875rem}h2{font-size:1.5rem}}h6{margin:0.5em 0 0;text-transform:none;font-weight:700}:host legend :is(h1,h2,h3,h4,h5,h6),:host label :is(h1,h2,h3,h4,h5,h6){display:inline;margin:0px}:host legend :is(h1,h2,h3,h4,h5),:host label :is(h1,h2,h3,h4,h5){font-family:var(--font-serif)}:host h1+*,:host h2+*,:host h3+*,:host h4+*,:host h5+*,:host h6+*{margin-top:unset}:host #form-question{margin-bottom:1rem}.usa-textarea,.usa-hint,.usa-input{font-family:Source Sans Pro Web, "Source Sans Pro", "Helvetica Neue", Helvetica, Arial, sans;font-size:1.06rem;line-height:1.3}.usa-textarea,.usa-input{border-width:1px;border-color:#565c65;border-style:solid;-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:0;color:#1b1b1b;display:block;height:2.5rem;margin-top:0.5rem;max-width:30rem;padding:0.5rem;width:100%}.usa-sr-only{position:absolute;left:-999em;right:auto}.usa-label{font-family:Source Sans Pro Web, "Source Sans Pro", "Helvetica Neue", Helvetica, Arial, sans;font-size:1.06rem;line-height:1.3;display:block;font-weight:normal;margin-top:1.5rem;max-width:30rem}.usa-label--error{font-weight:700;margin-top:0}.usa-label--required{color:#b50909}.usa-input:disabled,.usa-input[aria-disabled=true]{color:#454545;background-color:#c9c9c9;cursor:not-allowed;opacity:1;-webkit-text-fill-color:#454545}.usa-input:disabled:hover,.usa-input:disabled:active,.usa-input:disabled:focus,.usa-input:disabled.usa-focus,.usa-input[aria-disabled=true]:hover,.usa-input[aria-disabled=true]:active,.usa-input[aria-disabled=true]:focus,.usa-input[aria-disabled=true].usa-focus{color:#454545;background-color:#c9c9c9}@media (forced-colors: active){.usa-input:disabled,.usa-input[aria-disabled=true]{border:0;color:GrayText}.usa-input:disabled:hover,.usa-input:disabled:active,.usa-input:disabled:focus,.usa-input:disabled.usa-focus,.usa-input[aria-disabled=true]:hover,.usa-input[aria-disabled=true]:active,.usa-input[aria-disabled=true]:focus,.usa-input[aria-disabled=true].usa-focus{color:GrayText}}@media (forced-colors: active){.usa-input:disabled,.usa-input[aria-disabled=true]{border:2px solid GrayText}}.usa-input--error{border-width:0.25rem;border-color:#b50909;border-style:solid;padding-top:calc(0.5rem - 0.25rem);padding-bottom:calc(0.5rem - 0.25rem)}.usa-input--success{border-width:0.25rem;border-color:#00a91c;border-style:solid;padding-top:calc(0.5rem - 0.25rem);padding-bottom:calc(0.5rem - 0.25rem)}.usa-error-message{padding-bottom:0.25rem;padding-top:0.25rem;color:#b50909;display:block;font-weight:700}.usa-hint{color:#71767a}.usa-hint--required{color:#b50909}.usa-textarea:disabled,.usa-textarea[aria-disabled=true]{color:#454545;background-color:#c9c9c9;cursor:not-allowed;opacity:1}.usa-textarea:disabled:hover,.usa-textarea:disabled:active,.usa-textarea:disabled:focus,.usa-textarea:disabled.usa-focus,.usa-textarea[aria-disabled=true]:hover,.usa-textarea[aria-disabled=true]:active,.usa-textarea[aria-disabled=true]:focus,.usa-textarea[aria-disabled=true].usa-focus{color:#454545;background-color:#c9c9c9}@media (forced-colors: active){.usa-textarea:disabled,.usa-textarea[aria-disabled=true]{border:0;color:GrayText}.usa-textarea:disabled:hover,.usa-textarea:disabled:active,.usa-textarea:disabled:focus,.usa-textarea:disabled.usa-focus,.usa-textarea[aria-disabled=true]:hover,.usa-textarea[aria-disabled=true]:active,.usa-textarea[aria-disabled=true]:focus,.usa-textarea[aria-disabled=true].usa-focus{color:GrayText}}@media (forced-colors: active){.usa-textarea:disabled,.usa-textarea[aria-disabled=true]{border:2px solid GrayText}}.usa-textarea{height:10rem}.usa-character-count__status{display:inline-block;padding-top:0.25rem}.usa-character-count__status.usa-character-count__status--invalid{color:#b50909;font-weight:700}.usa-error-message{font-size:1.06rem}:host([error]:not([error=""])),:host(.va-form-group--error){border-left:0.25rem solid #b50909;padding-left:1rem;position:relative}:host([error]:not([error=""])[use-forms-pattern=multiple]),:host(.va-form-group--error[use-forms-pattern=multiple]){border-left:none}:host([error]:not([error=""])[use-forms-pattern=multiple]) .input-wrap,:host(.va-form-group--error[use-forms-pattern=multiple]) .input-wrap{border-left:0.25rem solid #b50909;padding-left:1rem;position:relative}@media screen and (min-width: 1024px){:host([error]:not([error=""])),:host(.va-form-group--error){margin-left:-0.9rem}:host([error]:not([error=""])[use-forms-pattern=multiple]) .input-wrap,:host(.va-form-group--error[use-forms-pattern=multiple]) .input-wrap{margin-left:-0.9rem}}@media screen and (max-width: 1023px){:host([error]:not([error=""])[use-forms-pattern=multiple]),:host(.va-form-group--error[use-forms-pattern=multiple]){padding-left:0}}h1 .usa-label,h2 .usa-label,h3 .usa-label,h4 .usa-label,h5 .usa-label,h6 .usa-label{font-family:inherit;font-size:inherit;font-weight:inherit}h1 .usa-label .usa-label--required,h2 .usa-label .usa-label--required,h3 .usa-label .usa-label--required,h4 .usa-label .usa-label--required,h5 .usa-label .usa-label--required,h6 .usa-label .usa-label--required{font-family:var(--font-source-sans);font-size:initial;font-weight:initial}:host{color:var(--vads-color-base);display:block;resize:both;font-family:var(--font-source-sans)}:host(:focus){outline:none !important}.usa-hint{display:block;font-weight:normal}textarea{-webkit-box-sizing:border-box;box-sizing:border-box}'}}]);
|
|
2
|
+
"use strict";(self.webpackChunk_department_of_veterans_affairs_component_library=self.webpackChunk_department_of_veterans_affairs_component_library||[]).push([[4569,6104,6650],{4569:function(e,a,t){t.r(a),t.d(a,{c:function(){return o}});var r,i={exports:{}};r=i,function(){var e={}.hasOwnProperty;function a(){for(var t=[],r=0;r<arguments.length;r++){var i=arguments[r];if(i){var o=typeof i;if("string"===o||"number"===o)t.push(i);else if(Array.isArray(i)){if(i.length){var n=a.apply(null,i);n&&t.push(n)}}else if("object"===o)if(i.toString===Object.prototype.toString)for(var s in i)e.call(i,s)&&i[s]&&t.push(s);else t.push(i.toString())}}return t.join(" ")}r.exports?(a.default=a,r.exports=a):window.classNames=a}();var o=i.exports},6104:function(e,a,t){function r(e){return!Number.isNaN(parseFloat(e))}function i(e,a,t){void 0===t&&(t="slot");var r=e.shadowRoot.querySelector(t).assignedNodes();return null!==a?Array.from(r).filter((function(e){return e.nodeName.toLowerCase()===a})):Array.from(r)}function o(e){return 1===e?"":"s"}function n(e,a){if(void 0===e||""===e)return"".concat(a," character").concat(o(a)," allowed");var t;if(e.length<=a){var r=a-e.length;t="".concat(r," character").concat(o(r)," left")}else r=e.length-a,t="".concat(r," character").concat(o(r)," over limit");return t}function s(e,a){return Array.from({length:a-e+1},(function(a,t){return e+t}))}t.r(a),t.d(a,{S:function(){return c},a:function(){return i},b:function(){return r},c:function(){return p},d:function(){return m},e:function(){return g},f:function(){return n},g:function(){return d},h:function(){return f},i:function(){return h},m:function(){return s},s:function(){return l},u:function(){return v}}),t(7911);var u=function(e){return e&&"object"==typeof e&&1===e.nodeType};function l(e,a){var t=function(e,a){if("string"!=typeof e)return[];if(!a||!u(a))return[];var t=a.shadowRoot.querySelectorAll(e);return Array.from(t)}(e,a);return"string"!=typeof e||u(a)&&a.matches(e)&&t.push(a),t}var c={_entity:/[&<>"'/]/g,_entities:{"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"},getEntity:function(e){return c._entities[e]},escapeHTML:function(e){for(var a="",t=0;t<e.length;t++)a+=e[t],t+1<arguments.length&&(a+=String(arguments[t+1]||"").replace(c._entity,c.getEntity));return a}};function d(e){var a;return(a="string"==typeof e?parseInt(e,10):Math.floor(e))>=1&&a<=6?"h".concat(a):null}function f(e){return["VA-BUTTON","VA-LINK","BUTTON","A"].includes(e.tagName)}function h(e){return e&&"false"!==e||!1}function b(e){return"[object Arguments]"===Object.prototype.toString.call(e)}function m(e,a){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];if(e===a)return!0;if("function"==typeof e||"function"==typeof a)return!0;if("object"!=typeof e||"object"!=typeof a)return!1;if(null===e||null===a)return!1;if(e instanceof Date&&a instanceof Date)return e.getTime()===a.getTime();if(e instanceof RegExp&&a instanceof RegExp)return e.source===a.source&&e.global===a.global&&e.multiline===a.multiline&&e.lastIndex===a.lastIndex&&e.ignoreCase===a.ignoreCase;if(b(e)||b(a)){if(!b(e)||!b(a))return!1;var i=Array.prototype.slice;return m(i.call(e),i.call(a),t,r)}if(e.constructor!==a.constructor)return!1;var o=Object.keys(e),n=Object.keys(a);if(0===o.length&&0===n.length)return!0;if(o.length!==n.length)return!1;for(var s=t.length;s--;)if(t[s]===e)return r[s]===a;t.push(e),r.push(a),o.sort(),n.sort();for(var u=o.length-1;u>=0;u--)if(o[u]!==n[u])return!1;for(var l=void 0,c=o.length-1;c>=0;c--)if(!m(e[l=o[c]],a[l],t,r))return!1;return t.pop(),r.pop(),!0}function p(e,a){var t;return function(){for(var r=this,i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];clearTimeout(t),t=setTimeout((function(){return e.apply(r,i)}),a)}}function g(e){if(null!=e){var a="string"==typeof e?parseInt(e,10):e;if(!(a<=0||isNaN(a)))return a}}function v(e,a,t){e&&(e.innerText=n(a,g(t)))}},6650:function(e,a,t){t.r(a),t.d(a,{va_textarea:function(){return s}});var r=t(7911),i=t(4569),o=(t(8181),t(6104)),n=t(4665),s=function(){function e(e){var a=this;(0,r.r)(this,e),this.componentLibraryAnalytics=(0,r.c)(this,"component-library-analytics",7),this.debouncedUpdateScreenReaderCount=(0,o.c)(o.u,1e3),this.handleInput=function(e){var t=e.target;a.value=t.value,a.debouncedUpdateScreenReaderCount(a.charCountElement,a.value,(0,o.e)(a.maxlength))},this.handleBlur=function(){a.enableAnalytics&&a.value&&a.componentLibraryAnalytics.emit({componentName:"va-textarea",action:"blur",details:{label:a.label,value:a.value}})},this.label=void 0,this.error=void 0,this.placeholder=void 0,this.name=void 0,this.required=!1,this.hint=void 0,this.messageAriaDescribedby=void 0,this.maxlength=void 0,this.value=void 0,this.enableAnalytics=!1,this.labelHeaderLevel=void 0,this.headerAriaDescribedby=void 0,this.useFormsPattern=void 0,this.formHeadingLevel=3,this.formHeading=void 0,this.charcount=!1}return e.prototype.connectedCallback=function(){var e=this;n.i.on("languageChanged",(function(){(0,r.f)(e.el)}))},e.prototype.disconnectedCallback=function(){n.i.off("languageChanged")},e.prototype.componentDidRender=function(){var e=this;this.charCountElement&&!this.charCountElement.innerText&&(this.charCountElement.innerText=(0,o.f)(this.value,(0,o.e)(this.maxlength)),setTimeout((function(){e.charCountElement.setAttribute("aria-live","polite")}),0))},e.prototype.render=function(){var e=this,a=this,t=a.label,s=a.error,u=a.placeholder,l=a.name,c=a.required,d=a.value,f=a.hint,h=a.charcount,b=a.messageAriaDescribedby,m=a.useFormsPattern,p=a.formHeadingLevel,g=a.headerAriaDescribedby,v=a.formHeading,y=(0,o.e)(this.maxlength),x="".concat(s?"input-error-message":""," ").concat(h&&y?"charcount-message":""," ").concat(b?"input-message":"").trim()||null,w="".concat(m&&v?"form-question":""," ").concat(m?"form-description":""," ").concat(m&&t?"input-label":"").trim()||null,k=(0,o.g)(this.labelHeaderLevel),T=g?"header-message":null,_=h&&(null==d?void 0:d.length)>y,z=(0,i.c)({"usa-label":!0,"usa-label--error":s}),A=(0,i.c)({"usa-textarea":!0,"usa-input--error":s}),S=(0,i.c)({"usa-hint":!0,"usa-character-count__status":h,"usa-character-count__status--invalid":h&&y&&(null==d?void 0:d.length)>y}),C=null;if("single"===m||"multiple"===m){var N=(0,o.g)(p);C=(0,r.h)(r.F,{key:"f8bf43385dabb03154f3ec65ff770e8f632f4a22"},v&&(0,r.h)(N,{key:"ea18e29de6d788f0904a74f4591e4bb86d5f63e9",id:"form-question",part:"form-header"},v),(0,r.h)("div",{key:"b4b786e974a3206184b09cc1025ec4da64fae04c",id:"form-description"},(0,r.h)("slot",{key:"8129877e14e67652ad1abf501a357884a9006be4",name:"form-description"})))}var q=(0,r.h)("label",{key:"a1147013dadc2aec2e7bf5ec957b8f930f4d8f0b",htmlFor:"input-type-textarea",id:"input-label",class:z,part:"label"},t,"multiple"===m&&g?(0,r.h)("span",{id:"header-message",class:"usa-sr-only"},(0,r.h)("span",null,t),(0,r.h)("span",null,g)):"multiple"===m?(0,r.h)("span",{id:"header-message",class:"usa-sr-only"},t):g?(0,r.h)("span",{id:"header-message",class:"usa-sr-only"},g):null,c&&(0,r.h)("span",{key:"38396d137cebffcf61f2f40b099f421c967ece98",class:"usa-label--required"}," ",n.i.t("required")),f&&(0,r.h)("div",{key:"aa89ec4e85a64481d39122df6e08a3024ea25e29",class:"usa-hint"},f));return(0,r.h)(r.H,{key:"4e49ea7f7ad58fc6f8f6798d3f67713c4f141ff6"},C,(0,r.h)("div",{key:"7c800753b8e994e7b3158316ed079c7c45ac5193",class:"input-wrap"},t&&k?(0,r.h)(k,{part:"header","aria-describedby":T},q):q,(0,r.h)("slot",{key:"eee7fb5c19aacd2cafd9ccca9faea0a3bb94df4a"}),(0,r.h)("span",{key:"d5a18677d22fa33c58c9b3bfdf0001b4fa18d79c",id:"input-error-message",role:"alert"},s&&(0,r.h)(r.F,{key:"f525221748b93acf647674525e93f5a11fc058df"},(0,r.h)("span",{key:"844b8c4ecceed7c23dc0c613198b8571a9214b4c",class:"usa-sr-only"},n.i.t("error")),(0,r.h)("span",{key:"dfcdb6a5b400f937bdd1ed10d90976234aca371c",class:"usa-error-message"},s))),(0,r.h)("textarea",{key:"f606585d267fbf0f51efdc9b3f8389991100cc50",class:A,"aria-describedby":x,"aria-invalid":s||_?"true":"false","aria-labelledby":w,onInput:this.handleInput,onBlur:this.handleBlur,id:"input-type-textarea",placeholder:u,name:l,maxLength:h?void 0:y,value:d,part:"input-type-textarea"}),!h&&y&&(null==d?void 0:d.length)>=y&&(0,r.h)("span",{key:"ebfea5820327b6423a86dfe08e8b6b3eec1890a1",class:S,"aria-live":"polite"},n.i.t("max-chars",{length:y})),h&&y&&(0,r.h)(r.F,{key:"f4e499f7c1b1f900ea40ed46e59651b5467c2974"},(0,r.h)("span",{key:"0b2d958ed373c74621b429ed202b55fbe2c2590d","aria-hidden":"true",class:S},(0,o.f)(this.value,(0,o.e)(this.maxlength))),(0,r.h)("span",{key:"0ee0d68a126b559b9c3f0c0a757102e4822c736d",id:"charcount-message",class:"usa-sr-only",ref:function(a){return e.charCountElement=a}})),(0,o.i)(b)&&(0,r.h)("span",{key:"3b9a7040e2938d9b9a786444d5655235d423accd",id:"input-message",class:"usa-sr-only dd-privacy-hidden"},b)))},Object.defineProperty(e.prototype,"el",{get:function(){return(0,r.g)(this)},enumerable:!1,configurable:!0}),e}();s.style='button:not([disabled]):focus,select:not([disabled]):focus,a:not([disabled]):focus,h1:focus,input:not([disabled]):focus,textarea:not([disabled]):focus,#form-question [role=\'option\']:focus,*[tabindex]:focus,a.va-sidenav-submenu__link:focus{outline:2px solid var(--vads-color-action-focus-on-light);outline-offset:2px;z-index:2}h1{margin-top:0}h1,h2,h3,h4,h5,h6{margin-bottom:0;margin-top:0;clear:both}*+h1,*+h2,*+h3,*+h4,*+h5,*+h6{margin-top:1.5em}h1+*,h2+*,h3+*,h4+*,h5+*,h6+*{margin-top:1em}h1{font-family:Merriweather Web, Georgia, Cambria, Times New Roman, Times, serif;font-size:2.44rem;line-height:1.2;font-weight:700}h2{font-family:Merriweather Web, Georgia, Cambria, Times New Roman, Times, serif;font-size:1.95rem;line-height:1.2;font-weight:700}h3{font-family:Merriweather Web, Georgia, Cambria, Times New Roman, Times, serif;font-size:1.34rem;line-height:1.2;font-weight:700}h4{font-family:Merriweather Web, Georgia, Cambria, Times New Roman, Times, serif;font-size:0.98rem;line-height:1.2;font-weight:700}h5{font-family:Merriweather Web, Georgia, Cambria, Times New Roman, Times, serif;font-size:0.91rem;line-height:1.2;font-weight:700}h6{font-family:Source Sans Pro Web, Helvetica Neue, Helvetica, Roboto, Arial, sans-serif;font-size:0.87rem;line-height:1.1;font-weight:normal;letter-spacing:0.025em;text-transform:uppercase}h1,h2,h3,h4,h5{font-family:Bitter, Georgia, Cambria, "Times New Roman", Times, serif;font-weight:700}h6{font-family:"Source Sans Pro Web", "Source Sans Pro", "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif;font-weight:700}h1{margin-top:0;font-size:2.5rem}h2{font-size:2rem}h3{font-size:1.25rem}h4{font-size:1.0625rem}h5{font-size:0.9375rem}h6{font-size:0.9375rem}@media (max-width: 481px){h1{font-size:1.875rem}h2{font-size:1.5rem}}h6{margin:0.5em 0 0;text-transform:none;font-weight:700}@media (max-width: 481px){h1{font-size:1.875rem}h2{font-size:1.5rem}}h6{margin:0.5em 0 0;text-transform:none;font-weight:700}:host legend :is(h1,h2,h3,h4,h5,h6),:host label :is(h1,h2,h3,h4,h5,h6){display:inline;margin:0px}:host legend :is(h1,h2,h3,h4,h5),:host label :is(h1,h2,h3,h4,h5){font-family:var(--font-serif)}:host h1+*,:host h2+*,:host h3+*,:host h4+*,:host h5+*,:host h6+*{margin-top:unset}:host #form-question{margin-bottom:1rem}.usa-textarea,.usa-hint,.usa-input{font-family:Source Sans Pro Web, "Source Sans Pro", "Helvetica Neue", Helvetica, Arial, sans;font-size:1.06rem;line-height:1.3}.usa-textarea,.usa-input{border-width:1px;border-color:#565c65;border-style:solid;-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:0;color:#1b1b1b;display:block;height:2.5rem;margin-top:0.5rem;max-width:30rem;padding:0.5rem;width:100%}.usa-sr-only{position:absolute;left:-999em;right:auto}.usa-label{font-family:Source Sans Pro Web, "Source Sans Pro", "Helvetica Neue", Helvetica, Arial, sans;font-size:1.06rem;line-height:1.3;display:block;font-weight:normal;margin-top:1.5rem;max-width:30rem}.usa-label--error{font-weight:700;margin-top:0}.usa-label--required{color:#b50909}.usa-input:disabled,.usa-input[aria-disabled=true]{color:#454545;background-color:#c9c9c9;cursor:not-allowed;opacity:1;-webkit-text-fill-color:#454545}.usa-input:disabled:hover,.usa-input:disabled:active,.usa-input:disabled:focus,.usa-input:disabled.usa-focus,.usa-input[aria-disabled=true]:hover,.usa-input[aria-disabled=true]:active,.usa-input[aria-disabled=true]:focus,.usa-input[aria-disabled=true].usa-focus{color:#454545;background-color:#c9c9c9}@media (forced-colors: active){.usa-input:disabled,.usa-input[aria-disabled=true]{border:0;color:GrayText}.usa-input:disabled:hover,.usa-input:disabled:active,.usa-input:disabled:focus,.usa-input:disabled.usa-focus,.usa-input[aria-disabled=true]:hover,.usa-input[aria-disabled=true]:active,.usa-input[aria-disabled=true]:focus,.usa-input[aria-disabled=true].usa-focus{color:GrayText}}@media (forced-colors: active){.usa-input:disabled,.usa-input[aria-disabled=true]{border:2px solid GrayText}}.usa-input--error{border-width:0.25rem;border-color:#b50909;border-style:solid;padding-top:calc(0.5rem - 0.25rem);padding-bottom:calc(0.5rem - 0.25rem)}.usa-input--success{border-width:0.25rem;border-color:#00a91c;border-style:solid;padding-top:calc(0.5rem - 0.25rem);padding-bottom:calc(0.5rem - 0.25rem)}.usa-error-message{padding-bottom:0.25rem;padding-top:0.25rem;color:#b50909;display:block;font-weight:700}.usa-hint{color:#71767a}.usa-hint--required{color:#b50909}.usa-textarea:disabled,.usa-textarea[aria-disabled=true]{color:#454545;background-color:#c9c9c9;cursor:not-allowed;opacity:1}.usa-textarea:disabled:hover,.usa-textarea:disabled:active,.usa-textarea:disabled:focus,.usa-textarea:disabled.usa-focus,.usa-textarea[aria-disabled=true]:hover,.usa-textarea[aria-disabled=true]:active,.usa-textarea[aria-disabled=true]:focus,.usa-textarea[aria-disabled=true].usa-focus{color:#454545;background-color:#c9c9c9}@media (forced-colors: active){.usa-textarea:disabled,.usa-textarea[aria-disabled=true]{border:0;color:GrayText}.usa-textarea:disabled:hover,.usa-textarea:disabled:active,.usa-textarea:disabled:focus,.usa-textarea:disabled.usa-focus,.usa-textarea[aria-disabled=true]:hover,.usa-textarea[aria-disabled=true]:active,.usa-textarea[aria-disabled=true]:focus,.usa-textarea[aria-disabled=true].usa-focus{color:GrayText}}@media (forced-colors: active){.usa-textarea:disabled,.usa-textarea[aria-disabled=true]{border:2px solid GrayText}}.usa-textarea{height:10rem}.usa-character-count__status{display:inline-block;padding-top:0.25rem}.usa-character-count__status.usa-character-count__status--invalid{color:#b50909;font-weight:700}.usa-error-message{font-size:1.06rem}:host([error]:not([error=""])),:host(.va-form-group--error){border-left:0.25rem solid #b50909;padding-left:1rem;position:relative}:host([error]:not([error=""])[use-forms-pattern=multiple]),:host(.va-form-group--error[use-forms-pattern=multiple]){border-left:none}:host([error]:not([error=""])[use-forms-pattern=multiple]) .input-wrap,:host(.va-form-group--error[use-forms-pattern=multiple]) .input-wrap{border-left:0.25rem solid #b50909;padding-left:1rem;position:relative}@media screen and (min-width: 1024px){:host([error]:not([error=""])),:host(.va-form-group--error){margin-left:-0.9rem}:host([error]:not([error=""])[use-forms-pattern=multiple]) .input-wrap,:host(.va-form-group--error[use-forms-pattern=multiple]) .input-wrap{margin-left:-0.9rem}}@media screen and (max-width: 1023px){:host([error]:not([error=""])[use-forms-pattern=multiple]),:host(.va-form-group--error[use-forms-pattern=multiple]){padding-left:0}}h1 .usa-label,h2 .usa-label,h3 .usa-label,h4 .usa-label,h5 .usa-label,h6 .usa-label{font-family:inherit;font-size:inherit;font-weight:inherit}h1 .usa-label .usa-label--required,h2 .usa-label .usa-label--required,h3 .usa-label .usa-label--required,h4 .usa-label .usa-label--required,h5 .usa-label .usa-label--required,h6 .usa-label .usa-label--required{font-family:var(--font-source-sans);font-size:initial;font-weight:initial}:host{color:var(--vads-color-base);display:block;resize:both;font-family:var(--font-source-sans)}:host(:focus){outline:none !important}.usa-hint{display:block;font-weight:normal}textarea{-webkit-box-sizing:border-box;box-sizing:border-box}'}}]);
|
package/dist/6696.app.bundle.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_department_of_veterans_affairs_component_library=self.webpackChunk_department_of_veterans_affairs_component_library||[]).push([[4534,6696],{4534:function(e,r,t){t.r(r),t.d(r,{a:function(){return b},b:function(){return g},d:function(){return f},f:function(){return y},g:function(){return p},i:function(){return D},m:function(){return s},v:function(){return v},z:function(){return w}}),t(4665),t(7911);var a=(new Date).getFullYear()+100,n=1900,o=12,i=1,l=1,s=[{label:"January",value:1},{label:"February",value:2},{label:"March",value:3},{label:"April",value:4},{label:"May",value:5},{label:"June",value:6},{label:"July",value:7},{label:"August",value:8},{label:"September",value:9},{label:"October",value:10},{label:"November",value:11},{label:"December",value:12}],d=["1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","30"],u=["1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","30","31"],h={1:u,2:["1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29"],3:u,4:d,5:u,6:d,7:u,8:u,9:d,10:u,11:d,12:u},c=["year-range","day-range","month-range","date-error","month-select"];function m(e){return e?"month-select":"month-range"}function v(e){var r=e.component,t=e.year,s=e.month,d=e.day,u=e.monthYearOnly,h=e.yearTouched,v=e.monthTouched,p=e.dayTouched,y=e.monthSelect,g=e.monthOptional;if(t||s||d){var b=f(t,s);r.invalidYear=!1,r.invalidMonth=!1,r.invalidDay=!1;var D=!(u&&g);if(D&&isNaN(s)&&v)return r.invalidMonth=!0,void(r.error=m(y));if(!u&&isNaN(d)&&p)return r.invalidDay=!0,void(r.error="day-range");if(isNaN(t)&&h)return r.invalidYear=!0,void(r.error="year-range");if(r.required&&(!t||D&&!s||!u&&!d)){if(D&&v&&!s)return r.invalidMonth=!0,void(r.error="date-error");if(p&&!d&&!u)return r.invalidDay=!0,void(r.error="date-error");if(h&&!t)return r.invalidYear=!0,void(r.error="date-error")}if(D&&!s&&v)return r.invalidMonth=!0,void(r.error=m(y));if(!d&&!u&&p)return r.invalidDay=!0,void(r.error="day-range");if(!t&&h)return r.invalidYear=!0,void(r.error="year-range");if(D&&s&&(s<i||s>o)&&v)return r.invalidMonth=!0,void(r.error=m(y));if(d&&!u&&(d<l||d>b)&&p)return r.invalidDay=!0,void(r.error="day-range");if(t&&(t<n||t>a)&&h)return r.invalidYear=!0,void(r.error="year-range");if(!s||!v||p||h)return s&&v&&d&&p&&!h?(r.invalidYear=!0,void(r.error="date-error")):void(r.invalidYear||r.invalidMonth||r.invalidDay||r.error&&!c.includes(r.error)||(r.error=null));u?(r.invalidYear=!0,r.error="date-error"):(r.invalidDay=!0,r.error="date-error")}}function p(e,r,t){var i=f(r,t);switch(e){case"month-range":case"month-select":return{start:1,end:o};case"day-range":return{start:1,end:i};case"year-range":return{start:n,end:a};default:return null}}var f=function(e,r){var t;return e&&r?new Date(e,r,0).getDate():(null===(t=h[r])||void 0===t?void 0:t.length)||31},y=function(e,r,t){if(void 0===r&&(r={dateStyle:"full",timeStyle:"short"}),void 0===t&&(t="America/New_York"),e&&e instanceof Date)return e.toLocaleString("en-US",Object.assign(Object.assign({},r),{timeZone:t}))},g=function(e,r){if(e&&e instanceof Date&&r&&r instanceof Date)return e.getTime()>r.getTime()},b=function(e,r){if(e&&e instanceof Date&&r&&r instanceof Date)return e.getTime()<r.getTime()},D=function(e,r){if(e&&e instanceof Date&&r&&r instanceof Date)return e.getFullYear()===r.getFullYear()&&e.getMonth()===r.getMonth()&&e.getDay()===r.getDay()},w=function(e){return"00".concat((e||"").toString()).slice(-2)}},6696:function(e,r,t){t.r(r),t.d(r,{va_date:function(){return i}});var a=t(7911),n=(t(
|
|
1
|
+
"use strict";(self.webpackChunk_department_of_veterans_affairs_component_library=self.webpackChunk_department_of_veterans_affairs_component_library||[]).push([[4534,6696],{4534:function(e,r,t){t.r(r),t.d(r,{a:function(){return b},b:function(){return g},d:function(){return f},f:function(){return y},g:function(){return p},i:function(){return D},m:function(){return s},v:function(){return v},z:function(){return w}}),t(4665),t(7911);var a=(new Date).getFullYear()+100,n=1900,o=12,i=1,l=1,s=[{label:"January",value:1},{label:"February",value:2},{label:"March",value:3},{label:"April",value:4},{label:"May",value:5},{label:"June",value:6},{label:"July",value:7},{label:"August",value:8},{label:"September",value:9},{label:"October",value:10},{label:"November",value:11},{label:"December",value:12}],d=["1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","30"],u=["1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","30","31"],h={1:u,2:["1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29"],3:u,4:d,5:u,6:d,7:u,8:u,9:d,10:u,11:d,12:u},c=["year-range","day-range","month-range","date-error","month-select"];function m(e){return e?"month-select":"month-range"}function v(e){var r=e.component,t=e.year,s=e.month,d=e.day,u=e.monthYearOnly,h=e.yearTouched,v=e.monthTouched,p=e.dayTouched,y=e.monthSelect,g=e.monthOptional;if(t||s||d){var b=f(t,s);r.invalidYear=!1,r.invalidMonth=!1,r.invalidDay=!1;var D=!(u&&g);if(D&&isNaN(s)&&v)return r.invalidMonth=!0,void(r.error=m(y));if(!u&&isNaN(d)&&p)return r.invalidDay=!0,void(r.error="day-range");if(isNaN(t)&&h)return r.invalidYear=!0,void(r.error="year-range");if(r.required&&(!t||D&&!s||!u&&!d)){if(D&&v&&!s)return r.invalidMonth=!0,void(r.error="date-error");if(p&&!d&&!u)return r.invalidDay=!0,void(r.error="date-error");if(h&&!t)return r.invalidYear=!0,void(r.error="date-error")}if(D&&!s&&v)return r.invalidMonth=!0,void(r.error=m(y));if(!d&&!u&&p)return r.invalidDay=!0,void(r.error="day-range");if(!t&&h)return r.invalidYear=!0,void(r.error="year-range");if(D&&s&&(s<i||s>o)&&v)return r.invalidMonth=!0,void(r.error=m(y));if(d&&!u&&(d<l||d>b)&&p)return r.invalidDay=!0,void(r.error="day-range");if(t&&(t<n||t>a)&&h)return r.invalidYear=!0,void(r.error="year-range");if(!s||!v||p||h)return s&&v&&d&&p&&!h?(r.invalidYear=!0,void(r.error="date-error")):void(r.invalidYear||r.invalidMonth||r.invalidDay||r.error&&!c.includes(r.error)||(r.error=null));u?(r.invalidYear=!0,r.error="date-error"):(r.invalidDay=!0,r.error="date-error")}}function p(e,r,t){var i=f(r,t);switch(e){case"month-range":case"month-select":return{start:1,end:o};case"day-range":return{start:1,end:i};case"year-range":return{start:n,end:a};default:return null}}var f=function(e,r){var t;return e&&r?new Date(e,r,0).getDate():(null===(t=h[r])||void 0===t?void 0:t.length)||31},y=function(e,r,t){if(void 0===r&&(r={dateStyle:"full",timeStyle:"short"}),void 0===t&&(t="America/New_York"),e&&e instanceof Date)return e.toLocaleString("en-US",Object.assign(Object.assign({},r),{timeZone:t}))},g=function(e,r){if(e&&e instanceof Date&&r&&r instanceof Date)return e.getTime()>r.getTime()},b=function(e,r){if(e&&e instanceof Date&&r&&r instanceof Date)return e.getTime()<r.getTime()},D=function(e,r){if(e&&e instanceof Date&&r&&r instanceof Date)return e.getFullYear()===r.getFullYear()&&e.getMonth()===r.getMonth()&&e.getDay()===r.getDay()},w=function(e){return"00".concat((e||"").toString()).slice(-2)}},6696:function(e,r,t){t.r(r),t.d(r,{va_date:function(){return i}});var a=t(7911),n=(t(8181),t(4534)),o=t(4665),i=function(){function e(e){var r=this;(0,a.r)(this,e),this.dateChange=(0,a.c)(this,"dateChange",7),this.dateBlur=(0,a.c)(this,"dateBlur",7),this.componentLibraryAnalytics=(0,a.c)(this,"component-library-analytics",7),this.dayTouched=!1,this.monthTouched=!1,this.yearTouched=!1,this.handleDateBlur=function(e){var t=(r.value||"").split("-").map((function(e){return Number(e)})),a=t[0],o=t[1],i=t[2];if((0,n.v)({component:r,year:a,month:o,day:i,yearTouched:r.yearTouched,monthTouched:r.monthTouched,dayTouched:r.dayTouched,monthSelect:!0,monthYearOnly:r.monthYearOnly,monthOptional:r.monthOptional}),!r.error&&(r.setValue(a,o,i),r.dateBlur.emit(e),r.enableAnalytics)){var l={componentName:"va-date",action:"blur",details:{year:a,month:o,day:i,"month-year-only":r.monthYearOnly}};r.componentLibraryAnalytics.emit(l)}},this.handleDateChange=function(e){var t=e.target,a=(r.value||"").split("-"),n=a[0],o=a[1],i=a[2];t.classList.contains("select-month")&&(o=t.value),t.classList.contains("select-day")&&(i=t.value),t.classList.contains("input-year")&&(n=t.value),r.setValue(parseInt(n),parseInt(o),parseInt(i)),r.dateChange.emit(e)},this.handleMonthBlur=function(){r.monthTouched=!0},this.handleDayBlur=function(){r.dayTouched=!0},this.handleYearBlur=function(){r.yearTouched=!0},this.required=!1,this.label=void 0,this.name=void 0,this.hint=void 0,this.error=void 0,this.monthYearOnly=!1,this.monthOptional=!1,this.value=void 0,this.invalidDay=!1,this.invalidMonth=!1,this.invalidYear=!1,this.enableAnalytics=!1}return e.prototype.setValue=function(e,r,t){var a="".concat(e||"","-").concat(r?(0,n.z)(r):"","-").concat(t?(0,n.z)(t):"").replace(/-+$/,"");this.value=a||null},e.prototype.render=function(){var e=this,r=e.required,t=e.label,i=e.name,l=e.error,s=e.handleDateBlur,d=e.handleDateChange,u=e.monthYearOnly,h=e.value,c=e.hint,m=(h||"").split("-").map((function(e){return parseInt(e)})),v=m[0],p=m[1],f=m[2],y=Array.from({length:(0,n.d)(v,p)},(function(e,r){return r+1}));return(0,a.h)(a.H,{onBlur:s},(0,a.h)("fieldset",null,(0,a.h)("legend",null,t," ",r&&(0,a.h)("span",{class:"required"},"(*Required)")),c&&(0,a.h)("span",{class:"hint-text"},c),(0,a.h)("slot",null),(0,a.h)("span",{id:"error-message",role:"alert"},l&&(0,a.h)(a.F,null,(0,a.h)("span",{class:"sr-only"},"Error")," ",o.i.t(l,function(e){return(0,n.g)(e,v,p)}(l)))),(0,a.h)("div",{class:"date-container"},(0,a.h)("va-select",{label:"Month","aria-describedby":l?"error-message":void 0,name:"".concat(i,"Month"),value:null==p?void 0:p.toString(),onVaSelect:d,onBlur:this.handleMonthBlur,invalid:this.invalidMonth,class:"select-month",required:r,hideRequiredText:!0,error:this.monthTouched&&this.invalidMonth?l:null,showError:!1},n.m&&n.m.map((function(e){return(0,a.h)("option",{value:e.value},e.label)}))),!u&&(0,a.h)("va-select",{label:"Day","aria-describedby":l?"error-message":void 0,name:"".concat(i,"Day"),value:null==f?void 0:f.toString(),onVaSelect:d,onBlur:this.handleDayBlur,invalid:this.invalidDay,class:"select-day",required:r,hideRequiredText:!0,error:this.dayTouched&&this.invalidDay?this.error:null,showError:!1},y.map((function(e){return(0,a.h)("option",{value:e},e)}))),(0,a.h)("va-text-input",{label:"Year","aria-describedby":l?"error-message":void 0,name:"".concat(i,"Year"),maxlength:4,pattern:"[0-9]{4}",value:v?v.toString():"",invalid:this.invalidYear,onInput:d,onBlur:this.handleYearBlur,required:r,hideRequiredText:!0,error:this.yearTouched&&this.invalidYear?l:null,"show-input-error":"false",class:"input-year",inputmode:"numeric",type:"text","aria-label":"Please enter four digits for the year"}))))},Object.defineProperty(e.prototype,"el",{get:function(){return(0,a.g)(this)},enumerable:!1,configurable:!0}),e}();i.style='.sr-only{border:0;clip:rect(0, 0, 0, 0);-webkit-clip-path:inset(50%);clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute !important;width:1px;word-wrap:normal !important}.hint-text{color:#71767A;display:block;font-size:1.06rem}#error-message{margin-bottom:0.75rem}#error-message,#input-error-message{color:var(--vads-color-secondary-dark);display:block;font-weight:700;font-size:1.06rem}:host([error]:not([error=""])),:host(.va-form-group--error){border-left:0.3rem solid var(--vads-color-secondary-dark);padding-left:1.25rem;position:relative}@media screen and (min-width: 1024px){:host([error]:not([error=""])),:host(.va-form-group--error){margin-left:-1.4375rem;}}.usa-error-message{font-size:1.06rem}:host([error]:not([error=""])),:host(.va-form-group--error){border-left:0.25rem solid #b50909;padding-left:1rem;position:relative}:host([error]:not([error=""])[use-forms-pattern=multiple]),:host(.va-form-group--error[use-forms-pattern=multiple]){border-left:none}:host([error]:not([error=""])[use-forms-pattern=multiple]) .input-wrap,:host(.va-form-group--error[use-forms-pattern=multiple]) .input-wrap{border-left:0.25rem solid #b50909;padding-left:1rem;position:relative}@media screen and (min-width: 1024px){:host([error]:not([error=""])),:host(.va-form-group--error){margin-left:-0.9rem}:host([error]:not([error=""])[use-forms-pattern=multiple]) .input-wrap,:host(.va-form-group--error[use-forms-pattern=multiple]) .input-wrap{margin-left:-0.9rem}}@media screen and (max-width: 1023px){:host([error]:not([error=""])[use-forms-pattern=multiple]),:host(.va-form-group--error[use-forms-pattern=multiple]){padding-left:0}}.usa-label--required{color:var(--vads-color-secondary-dark)}.usa-error-message{color:var(--vads-color-secondary-dark)}:host{display:block;font-family:var(--font-source-sans);margin-top:1.875rem}fieldset{border:none;margin:0;padding:0}legend{border:0;font-size:1.06rem;padding:0}span.required{color:var(--vads-color-secondary-dark)}#error-message{color:var(--vads-color-secondary-dark);display:block;margin-bottom:0}.date-container{display:-ms-flexbox;display:flex;margin-top:12px;-ms-flex-wrap:wrap;flex-wrap:wrap;row-gap:12px}:host([error]:not([error=""])) .date-container{padding-top:0}.select-month{width:8.125rem;margin-right:0.9375rem}.select-day{width:5rem;margin-right:0.9375rem}.input-year{width:5rem}va-select::part(label),va-text-input::part(label){margin-top:0;margin-bottom:12px}va-text-input::part(validation){display:none}'}}]);
|
package/dist/6849.app.bundle.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see 6849.app.bundle.js.LICENSE.txt */
|
|
2
|
-
"use strict";(self.webpackChunk_department_of_veterans_affairs_component_library=self.webpackChunk_department_of_veterans_affairs_component_library||[]).push([[4569,6849],{4569:function(e,t,a){a.r(t),a.d(t,{c:function(){return i}});var o,r={exports:{}};o=r,function(){var e={}.hasOwnProperty;function t(){for(var a=[],o=0;o<arguments.length;o++){var r=arguments[o];if(r){var i=typeof r;if("string"===i||"number"===i)a.push(r);else if(Array.isArray(r)){if(r.length){var n=t.apply(null,r);n&&a.push(n)}}else if("object"===i)if(r.toString===Object.prototype.toString)for(var s in r)e.call(r,s)&&r[s]&&a.push(s);else a.push(r.toString())}}return a.join(" ")}o.exports?(t.default=t,o.exports=t):window.classNames=t}();var i=r.exports},6849:function(e,t,a){a.r(t),a.d(t,{va_alert_expandable:function(){return i}});var o=a(7911),r=a(4569),i=function(){function e(e){(0,o.r)(this,e),this.componentLibraryAnalytics=(0,o.c)(this,"component-library-analytics",7),this.open=void 0,this.status=void 0,this.trigger=void 0,this.disableAnalytics=!1,this.iconless=!1}return e.prototype.handleResize=function(){this.updateAlertBodyMaxHeight()},e.prototype.toggleOpen=function(){this.disableAnalytics||this.componentLibraryAnalytics.emit({componentName:"va-alert-expandable",action:this.open?"collapse":"expand",details:{triggerText:this.trigger}}),this.open=!this.open},e.prototype.handleKeydown=function(e){" "!==e.key&&"Enter"!==e.key||(e.preventDefault(),this.toggleOpen())},e.prototype.updateAlertBodyMaxHeight=function(){var e,t=null===(e=this.el.shadowRoot)||void 0===e?void 0:e.getElementById("alert-body");if(t){var a=t.scrollHeight+"px";t.style.setProperty("--calc-max-height","calc("+a+" + 2rem)")}},e.prototype.componentDidLoad=function(){var e=this;requestAnimationFrame((function(){return e.updateAlertBodyMaxHeight()}))},e.prototype.render=function(){var e=this,t=e.status,a=e.open,i=e.iconless,n=(0,r.c)("alert-expandable",t,{"hide-icon":i}),s=(0,r.c)("alert-expandable-body",{open:a,closed:!a});return(0,o.h)(o.H,{key:"
|
|
2
|
+
"use strict";(self.webpackChunk_department_of_veterans_affairs_component_library=self.webpackChunk_department_of_veterans_affairs_component_library||[]).push([[4569,6849],{4569:function(e,t,a){a.r(t),a.d(t,{c:function(){return i}});var o,r={exports:{}};o=r,function(){var e={}.hasOwnProperty;function t(){for(var a=[],o=0;o<arguments.length;o++){var r=arguments[o];if(r){var i=typeof r;if("string"===i||"number"===i)a.push(r);else if(Array.isArray(r)){if(r.length){var n=t.apply(null,r);n&&a.push(n)}}else if("object"===i)if(r.toString===Object.prototype.toString)for(var s in r)e.call(r,s)&&r[s]&&a.push(s);else a.push(r.toString())}}return a.join(" ")}o.exports?(t.default=t,o.exports=t):window.classNames=t}();var i=r.exports},6849:function(e,t,a){a.r(t),a.d(t,{va_alert_expandable:function(){return i}});var o=a(7911),r=a(4569),i=function(){function e(e){(0,o.r)(this,e),this.componentLibraryAnalytics=(0,o.c)(this,"component-library-analytics",7),this.open=void 0,this.status=void 0,this.trigger=void 0,this.disableAnalytics=!1,this.iconless=!1}return e.prototype.handleResize=function(){this.updateAlertBodyMaxHeight()},e.prototype.toggleOpen=function(){this.disableAnalytics||this.componentLibraryAnalytics.emit({componentName:"va-alert-expandable",action:this.open?"collapse":"expand",details:{triggerText:this.trigger}}),this.open=!this.open},e.prototype.handleKeydown=function(e){" "!==e.key&&"Enter"!==e.key||(e.preventDefault(),this.toggleOpen())},e.prototype.updateAlertBodyMaxHeight=function(){var e,t=null===(e=this.el.shadowRoot)||void 0===e?void 0:e.getElementById("alert-body");if(t){var a=t.scrollHeight+"px";t.style.setProperty("--calc-max-height","calc("+a+" + 2rem)")}},e.prototype.componentDidLoad=function(){var e=this;requestAnimationFrame((function(){return e.updateAlertBodyMaxHeight()}))},e.prototype.render=function(){var e=this,t=e.status,a=e.open,i=e.iconless,n=(0,r.c)("alert-expandable",t,{"hide-icon":i}),s=(0,r.c)("alert-expandable-body",{open:a,closed:!a});return(0,o.h)(o.H,{key:"5ea0af5f0558d6ee0624e7f92791efd94ba1c4df"},(0,o.h)("div",{key:"4115ea4fec5dfee79cb89b8b286d8a5b7183ed22",class:n},(0,o.h)("a",{key:"8776efb5c735cec192135ba64589249e225786e8",role:"button","aria-controls":"alert-body","aria-expanded":this.open?"true":"false",tabIndex:0,onClick:this.toggleOpen.bind(this),onKeyDown:this.handleKeydown.bind(this),class:"alert-expandable-trigger"},!i&&(0,o.h)("va-icon",{key:"f1bbccd44fa57f2644c3ca837aead419b9172db0",class:"alert-expandable__status-icon",icon:{continue:"lock",error:"info",warning:"warning",info:"info",success:"check_circle"}[t]||"info",size:3}),(0,o.h)("div",{key:"50c53962be3cfad3727704208544d2f748120d2e"},(0,o.h)("span",{key:"445835725b87dd9ab8345d65cd5f308fcd66abf4",class:"alert-expandable-title"},(0,o.h)("span",{key:"e9eaf60e35f3cb32eb97bdf93eb3d4e426cd2c9e",class:"usa-sr-only"},"".concat({continue:"Continue",error:"Error",warning:"Warning",info:"Information",success:"Success"}[t]||"Information"," Alert")," "),this.trigger),(0,o.h)("va-icon",{key:"9b309ac19189390a6b750aee296793f7bcb4aae1",class:"alert-expandable-icon",icon:"chevron_right",size:3}))),(0,o.h)("div",{key:"38c4a4ed76a166335977c226e5dde624600718d5",id:"alert-body",class:s},(0,o.h)("div",{key:"3d61d3a4f7f9baad1e9b20d8bc2ff12bf9942a66",id:"slot-wrap"},(0,o.h)("slot",{key:"dc996601268d23f3af322c18967ad19e526b8a35"})))))},Object.defineProperty(e.prototype,"el",{get:function(){return(0,o.g)(this)},enumerable:!1,configurable:!0}),e}();i.style='p,a,ol,ul,li,dl,dt,dd,form,label,button{font-family:Source Sans Pro Web, "Source Sans Pro", "Helvetica Neue", Helvetica, Arial, sans;font-size:1.06rem;line-height:1.5}button:not([disabled]):focus,select:not([disabled]):focus,a:not([disabled]):focus,h1:focus,input:not([disabled]):focus,textarea:not([disabled]):focus,#form-question [role=\'option\']:focus,*[tabindex]:focus,a.va-sidenav-submenu__link:focus{outline:2px solid var(--vads-color-action-focus-on-light);outline-offset:2px;z-index:2}a{text-decoration:none;color:var(--vads-color-link);-webkit-transition-duration:0.3s;transition-duration:0.3s;-webkit-transition-timing-function:ease-in-out;transition-timing-function:ease-in-out;-webkit-transition-property:color, background-color, border-color;transition-property:color, background-color, border-color}a:hover{background-color:rgba(0, 0, 0, 0.05);color:inherit}a:visited{color:var(--vads-color-link-visited)}.usa-sr-only{position:absolute;left:-999em;right:auto}:host{display:block}:host([status=warning]){background-color:var(--vads-alert-color-background-warning-on-light)}:host([status=info]){background-color:var(--vads-alert-color-background-info-on-light)}:host([status=success]){background-color:var(--vads-alert-color-background-success-on-light)}:host([status=continue]){background-color:var(--vads-color-base-lightest)}.alert-expandable-trigger{-ms-flex-align:start;align-items:flex-start;cursor:pointer;display:-ms-flexbox;display:flex;padding:0.75rem}div.warning .alert-expandable-trigger:hover{background-color:var(--vads-color-gold-lighter)}div.info .alert-expandable-trigger:hover{background-color:var(--vads-color-primary-alt-light)}div.success .alert-expandable-trigger:hover{background-color:var(--vads-color-green-lighter)}div.continue .alert-expandable-trigger:hover{background-color:var(--vads-color-base-lighter)}.alert-expandable-title{border-bottom-right-radius:1px;border-bottom:2px dotted var(--vads-color-primary-alt-dark);color:var(--vads-color-base-darker);cursor:pointer;font-weight:600}.alert-expandable:not(.hide-icon) .alert-expandable-body{padding-left:32px;}.alert-expandable-body{overflow:hidden}.alert-expandable-body.closed{opacity:0;max-height:0;visibility:hidden;overflow:hidden}.alert-expandable-body.open{height:auto;opacity:1;-webkit-transition:max-height 700ms 0ms, opacity 500ms 200ms, visibility 500ms 200ms;transition:max-height 700ms 0ms, opacity 500ms 200ms, visibility 500ms 200ms;max-height:var(--calc-max-height)}#slot-wrap{margin:0.75rem}.alert-expandable-icon{display:inline-block;color:var(--vads-color-primary-alt-darkest);font-size:16px;-webkit-transform:rotate(90deg);transform:rotate(90deg);-webkit-transition:-webkit-transform 0.15s linear;transition:-webkit-transform 0.15s linear;transition:transform 0.15s linear;transition:transform 0.15s linear, -webkit-transform 0.15s linear;line-height:1;vertical-align:bottom}a[aria-expanded=true] .alert-expandable-icon{-webkit-transform:rotate(270deg);transform:rotate(270deg);-webkit-transition:-webkit-transform 0.15s linear;transition:-webkit-transform 0.15s linear;transition:transform 0.15s linear;transition:transform 0.15s linear, -webkit-transform 0.15s linear}.alert-expandable__status-icon{color:var(--vads-color-base-darker);margin-right:8px}::slotted(*:first-child){margin-top:0 !important}::slotted(*:last-child){margin-bottom:0 !important}'}}]);
|
package/dist/7166.app.bundle.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see 7166.app.bundle.js.LICENSE.txt */
|
|
2
|
-
"use strict";(self.webpackChunk_department_of_veterans_affairs_component_library=self.webpackChunk_department_of_veterans_affairs_component_library||[]).push([[4569,6104,7166],{4569:function(e,t,i){i.r(t),i.d(t,{c:function(){return n}});var r,a={exports:{}};r=a,function(){var e={}.hasOwnProperty;function t(){for(var i=[],r=0;r<arguments.length;r++){var a=arguments[r];if(a){var n=typeof a;if("string"===n||"number"===n)i.push(a);else if(Array.isArray(a)){if(a.length){var u=t.apply(null,a);u&&i.push(u)}}else if("object"===n)if(a.toString===Object.prototype.toString)for(var o in a)e.call(a,o)&&a[o]&&i.push(o);else i.push(a.toString())}}return i.join(" ")}r.exports?(t.default=t,r.exports=t):window.classNames=t}();var n=a.exports},6104:function(e,t,i){function r(e){return!Number.isNaN(parseFloat(e))}function a(e,t,i){void 0===i&&(i="slot");var r=e.shadowRoot.querySelector(i).assignedNodes();return null!==t?Array.from(r).filter((function(e){return e.nodeName.toLowerCase()===t})):Array.from(r)}function n(e){return 1===e?"":"s"}function u(e,t){if(void 0===e||""===e)return"".concat(t," character").concat(n(t)," allowed");var i;if(e.length<=t){var r=t-e.length;i="".concat(r," character").concat(n(r)," left")}else r=e.length-t,i="".concat(r," character").concat(n(r)," over limit");return i}function o(e,t){return Array.from({length:t-e+1},(function(t,i){return e+i}))}i.r(t),i.d(t,{S:function(){return l},a:function(){return a},b:function(){return r},c:function(){return g},d:function(){return m},e:function(){return b},f:function(){return u},g:function(){return d},h:function(){return c},i:function(){return h},m:function(){return o},s:function(){return p},u:function(){return v}}),i(7911);var s=function(e){return e&&"object"==typeof e&&1===e.nodeType};function p(e,t){var i=function(e,t){if("string"!=typeof e)return[];if(!t||!s(t))return[];var i=t.shadowRoot.querySelectorAll(e);return Array.from(i)}(e,t);return"string"!=typeof e||s(t)&&t.matches(e)&&i.push(t),i}var l={_entity:/[&<>"'/]/g,_entities:{"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"},getEntity:function(e){return l._entities[e]},escapeHTML:function(e){for(var t="",i=0;i<e.length;i++)t+=e[i],i+1<arguments.length&&(t+=String(arguments[i+1]||"").replace(l._entity,l.getEntity));return t}};function d(e){var t;return(t="string"==typeof e?parseInt(e,10):Math.floor(e))>=1&&t<=6?"h".concat(t):null}function c(e){return["VA-BUTTON","VA-LINK","BUTTON","A"].includes(e.tagName)}function h(e){return e&&"false"!==e||!1}function f(e){return"[object Arguments]"===Object.prototype.toString.call(e)}function m(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];if(e===t)return!0;if("function"==typeof e||"function"==typeof t)return!0;if("object"!=typeof e||"object"!=typeof t)return!1;if(null===e||null===t)return!1;if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(e instanceof RegExp&&t instanceof RegExp)return e.source===t.source&&e.global===t.global&&e.multiline===t.multiline&&e.lastIndex===t.lastIndex&&e.ignoreCase===t.ignoreCase;if(f(e)||f(t)){if(!f(e)||!f(t))return!1;var a=Array.prototype.slice;return m(a.call(e),a.call(t),i,r)}if(e.constructor!==t.constructor)return!1;var n=Object.keys(e),u=Object.keys(t);if(0===n.length&&0===u.length)return!0;if(n.length!==u.length)return!1;for(var o=i.length;o--;)if(i[o]===e)return r[o]===t;i.push(e),r.push(t),n.sort(),u.sort();for(var s=n.length-1;s>=0;s--)if(n[s]!==u[s])return!1;for(var p=void 0,l=n.length-1;l>=0;l--)if(!m(e[p=n[l]],t[p],i,r))return!1;return i.pop(),r.pop(),!0}function g(e,t){var i;return function(){for(var r=this,a=[],n=0;n<arguments.length;n++)a[n]=arguments[n];clearTimeout(i),i=setTimeout((function(){return e.apply(r,a)}),t)}}function b(e){if(null!=e){var t="string"==typeof e?parseInt(e,10):e;if(!(t<=0||isNaN(t)))return t}}function v(e,t,i){e&&(e.innerText=u(t,b(i)))}},7166:function(e,t,i){i.r(t),i.d(t,{va_text_input:function(){return o}});var r=i(7911),a=i(4569),n=(i(8014),i(6104)),u=i(4665),o=function(){function e(e){var t=this;(0,r.r)(this,e),this.componentLibraryAnalytics=(0,r.c)(this,"component-library-analytics",7),this.vaInput=(0,r.c)(this,"vaInput",7),this.allowedInputTypes=["email","number","password","search","tel","text","url"],this.updatePaddingLeft=function(){if(t.inputIconPrefix)t.paddingLeftValue="2.5rem";else if(t.inputPrefix){var e=t.inputPrefix?Math.min(t.inputPrefix.length,25):null;t.paddingLeftValue="".concat(.5*e+1,"rem")}},this.updatePaddingRight=function(){var e=t.inputSuffix?Math.min(t.inputSuffix.length,25):null;t.paddingRightValue="".concat(.5*e+1,"rem")},this.debouncedUpdateScreenReaderCount=(0,n.c)(n.u,1e3),this.handleInput=function(e){var i=e.target;t.value=i.value,t.debouncedUpdateScreenReaderCount(t.charCountElement,t.value,(0,n.e)(t.maxlength)),t.vaInput.emit({value:t.value})},this.handleBlur=function(e){if(t.enableAnalytics&&t.componentLibraryAnalytics.emit({componentName:"va-text-input",action:"blur",details:{label:t.label,value:t.value}}),("decimal"===t.inputmode||"numeric"===t.inputmode||t.currency)&&t.value){var i=u.i.t("number-error"),r=e.target.checkValidity();t.error||r?t.error&&t.error===i&&r&&(t.error=null,t.el.setAttribute("error","")):(t.error=i,t.el.setAttribute("error",i))}},this.label=void 0,this.error=void 0,this.reflectInputError=!1,this.showInputError=!0,this.invalid=!1,this.required=!1,this.hideRequiredText=!1,this.inputmode=void 0,this.step=void 0,this.type="text",this.maxlength=void 0,this.autocomplete=void 0,this.enableAnalytics=!1,this.name=void 0,this.pattern=void 0,this.hint=void 0,this.messageAriaDescribedby=void 0,this.value=void 0,this.success=!1,this.width=void 0,this.useFormsPattern=void 0,this.formHeadingLevel=3,this.formHeading=void 0,this.charcount=!1,this.currency=!1,this.inputPrefix=void 0,this.inputIconPrefix=void 0,this.inputSuffix=void 0,this.inputIconSuffix=void 0,this.min=void 0,this.max=void 0,this.errorHasPii=!1,this.paddingLeftValue="0",this.paddingRightValue="0"}return e.prototype.connectedCallback=function(){var e=this;u.i.on("languageChanged",(function(){(0,r.f)(e.el)}))},e.prototype.disconnectedCallback=function(){u.i.off("languageChanged")},e.prototype.componentDidRender=function(){this.charCountElement&&!this.charCountElement.innerText&&(this.charCountElement.innerText=(0,n.f)(this.value,(0,n.e)(this.maxlength)))},e.prototype.componentWillLoad=function(){this.updatePaddingLeft(),this.updatePaddingRight()},e.prototype.componentDidUpdate=function(){this.updatePaddingLeft(),this.updatePaddingRight()},e.prototype.getInputType=function(){return this.allowedInputTypes.includes(this.type)?this.max||this.min?"number":this.type:"text"},e.prototype.getPattern=function(){return this.currency?"^[0-9]+(.[0-9]{2})?$":void 0!==this.pattern||"decimal"!==this.inputmode&&"numeric"!==this.inputmode?this.pattern:"[0-9]+(.[0-9]{1,})?"},e.prototype.getInputmode=function(){return this.currency?"numeric":this.inputmode?this.inputmode:void 0},e.prototype.getStep=function(){return this.step||"decimal"!==this.inputmode?this.step?this.step:void 0:".01"},e.prototype.render=function(){var e,t=this,i=this,o=i.label,s=i.error,p=i.reflectInputError,l=i.showInputError,d=i.invalid,c=i.required,h=i.hideRequiredText,f=i.value,m=i.name,g=i.autocomplete,b=i.hint,v=i.handleInput,x=i.handleBlur,y=i.success,w=i.messageAriaDescribedby,T=i.width,S=i.useFormsPattern,_=i.formHeadingLevel,P=i.formHeading,z=i.charcount,k=i.min,I=i.max,A=i.currency,R=i.inputPrefix,N=i.inputIconPrefix,C=i.inputSuffix,L=i.inputIconSuffix,q=i.errorHasPii,H=void 0!==q&&q,G=this.getInputType(),E=(0,n.e)(this.maxlength),j=this.getInputmode(),F=this.getStep(),V="".concat(w?"input-message":""," ").concat(s?"input-error-message":""," ").concat(z&&E?"charcount-message":"").trim()||null,W="".concat(S&&P?"form-question":""," ").concat(S?"form-description":""," ").concat(S&&o?"input-label":"").trim()||null,M=this.getPattern(),O=(0,a.c)({"currency-wrapper":A,"usa-input-group":C||R||N||L}),B="0"!==t.paddingLeftValue&&R?{paddingLeft:t.paddingLeftValue}:C?{paddingRight:t.paddingRightValue}:{},D=E&&(null==f?void 0:f.length)>E,U=(0,a.c)({"usa-label":!0,"usa-label--error":s}),$=(0,a.c)(((e={"usa-input":!0,"usa-input--success":y,"usa-input--error":s||p})["usa-input--".concat(T)]=T,e)),K=(0,a.c)({"usa-hint":!0,"usa-character-count__status":E,"usa-character-count__status--invalid":E&&(null==f?void 0:f.length)>E}),J=(0,a.c)({"usa-sr-only":!l}),Q=(0,a.c)({"usa-error-message":!0,"dd-privacy-hidden":H}),X=null;if("single"===S||"multiple"===S){var Y=(0,n.g)(_);X=(0,r.h)(r.F,null,P&&(0,r.h)(Y,{id:"form-question",part:"form-header"},P),(0,r.h)("div",{id:"form-description"},(0,r.h)("slot",{name:"form-description"})))}return(0,r.h)(r.H,null,X,(0,r.h)("div",{class:"input-wrap"},o&&(0,r.h)("label",{htmlFor:"inputField",id:"input-label",class:U,part:"label"},o,c&&!h&&(0,r.h)("span",{class:"usa-label--required"}," ",u.i.t("required")),b&&(0,r.h)("span",{class:"usa-hint"},b)),(0,r.h)("slot",null),(0,r.h)("span",{id:"input-error-message",role:"alert",class:J},s&&(0,r.h)(r.F,null,(0,r.h)("span",{class:"usa-sr-only"},u.i.t("error")),(0,r.h)("span",{class:Q,"data-dd-action-name":H?"input error":void 0},s))),(0,r.h)("div",{class:O},A&&(0,r.h)("div",{id:"symbol"},"$"),R&&(0,r.h)("div",{class:"usa-input-prefix",part:"input-prefix"},R.substring(0,25)),N&&(0,r.h)("div",{class:"usa-input-prefix",part:"input-prefix"},(0,r.h)("va-icon",{icon:N,size:3,part:"icon"})),(0,r.h)("input",{class:$,id:"inputField",type:G,onInput:v,onBlur:x,"aria-describedby":V,style:B,"aria-labelledby":W,"aria-invalid":d||s||D?"true":"false",inputmode:j,step:F,maxlength:E,pattern:M,name:m,autocomplete:g,required:c||null,part:"input",min:k,max:I,value:f}),C&&(0,r.h)("div",{class:"usa-input-suffix",part:"suffix","aria-hidden":"true"},C.substring(0,25)),L&&(0,r.h)("div",{class:"usa-input-suffix",part:"input-suffix"},(0,r.h)("va-icon",{icon:L,size:3,part:"icon"}))),(0,n.i)(w)&&(0,r.h)("span",{id:"input-message",class:"usa-sr-only dd-privacy-hidden"},w),z&&E&&(0,r.h)(r.F,null,(0,r.h)("span",{"aria-hidden":"true",class:K},(0,n.f)(this.value,(0,n.e)(this.maxlength))),(0,r.h)("span",{id:"charcount-message",class:"usa-sr-only","aria-live":"polite",ref:function(e){return t.charCountElement=e}}))))},Object.defineProperty(e.prototype,"el",{get:function(){return(0,r.g)(this)},enumerable:!1,configurable:!0}),e}();o.style='button:not([disabled]):focus,select:not([disabled]):focus,a:not([disabled]):focus,h1:focus,input:not([disabled]):focus,textarea:not([disabled]):focus,#form-question [role=\'option\']:focus,*[tabindex]:focus,a.va-sidenav-submenu__link:focus{outline:2px solid var(--vads-color-action-focus-on-light);outline-offset:2px;z-index:2}h1{margin-top:0}h1,h2,h3,h4,h5,h6{margin-bottom:0;margin-top:0;clear:both}*+h1,*+h2,*+h3,*+h4,*+h5,*+h6{margin-top:1.5em}h1+*,h2+*,h3+*,h4+*,h5+*,h6+*{margin-top:1em}h1{font-family:Merriweather Web, Georgia, Cambria, Times New Roman, Times, serif;font-size:2.44rem;line-height:1.2;font-weight:700}h2{font-family:Merriweather Web, Georgia, Cambria, Times New Roman, Times, serif;font-size:1.95rem;line-height:1.2;font-weight:700}h3{font-family:Merriweather Web, Georgia, Cambria, Times New Roman, Times, serif;font-size:1.34rem;line-height:1.2;font-weight:700}h4{font-family:Merriweather Web, Georgia, Cambria, Times New Roman, Times, serif;font-size:0.98rem;line-height:1.2;font-weight:700}h5{font-family:Merriweather Web, Georgia, Cambria, Times New Roman, Times, serif;font-size:0.91rem;line-height:1.2;font-weight:700}h6{font-family:Source Sans Pro Web, Helvetica Neue, Helvetica, Roboto, Arial, sans-serif;font-size:0.87rem;line-height:1.1;font-weight:normal;letter-spacing:0.025em;text-transform:uppercase}h1,h2,h3,h4,h5{font-family:Bitter, Georgia, Cambria, "Times New Roman", Times, serif;font-weight:700}h6{font-family:"Source Sans Pro Web", "Source Sans Pro", "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif;font-weight:700}h1{margin-top:0;font-size:2.5rem}h2{font-size:2rem}h3{font-size:1.25rem}h4{font-size:1.0625rem}h5{font-size:0.9375rem}h6{font-size:0.9375rem}@media (max-width: 481px){h1{font-size:1.875rem}h2{font-size:1.5rem}}h6{margin:0.5em 0 0;text-transform:none;font-weight:700}@media (max-width: 481px){h1{font-size:1.875rem}h2{font-size:1.5rem}}h6{margin:0.5em 0 0;text-transform:none;font-weight:700}:host legend :is(h1,h2,h3,h4,h5,h6),:host label :is(h1,h2,h3,h4,h5,h6){display:inline;margin:0px}:host legend :is(h1,h2,h3,h4,h5),:host label :is(h1,h2,h3,h4,h5){font-family:var(--font-serif)}:host h1+*,:host h2+*,:host h3+*,:host h4+*,:host h5+*,:host h6+*{margin-top:unset}:host #form-question{margin-bottom:1rem}.usa-hint,.usa-input-group,.usa-input{font-family:Source Sans Pro Web, "Source Sans Pro", "Helvetica Neue", Helvetica, Arial, sans;font-size:1.06rem;line-height:1.3}.usa-input-group,.usa-input{border-width:1px;border-color:#565c65;border-style:solid;-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:0;color:#1b1b1b;display:block;height:2.5rem;margin-top:0.5rem;max-width:30rem;padding:0.5rem;width:100%}.usa-sr-only{position:absolute;left:-999em;right:auto}.usa-label{font-family:Source Sans Pro Web, "Source Sans Pro", "Helvetica Neue", Helvetica, Arial, sans;font-size:1.06rem;line-height:1.3;display:block;font-weight:normal;margin-top:1.5rem;max-width:30rem}.usa-label--error{font-weight:700;margin-top:0}.usa-label--required{color:#b50909}.usa-input:disabled,.usa-input[aria-disabled=true]{color:#454545;background-color:#c9c9c9;cursor:not-allowed;opacity:1;-webkit-text-fill-color:#454545}.usa-input:disabled:hover,.usa-input:disabled:active,.usa-input:disabled:focus,.usa-input:disabled.usa-focus,.usa-input[aria-disabled=true]:hover,.usa-input[aria-disabled=true]:active,.usa-input[aria-disabled=true]:focus,.usa-input[aria-disabled=true].usa-focus{color:#454545;background-color:#c9c9c9}@media (forced-colors: active){.usa-input:disabled,.usa-input[aria-disabled=true]{border:0;color:GrayText}.usa-input:disabled:hover,.usa-input:disabled:active,.usa-input:disabled:focus,.usa-input:disabled.usa-focus,.usa-input[aria-disabled=true]:hover,.usa-input[aria-disabled=true]:active,.usa-input[aria-disabled=true]:focus,.usa-input[aria-disabled=true].usa-focus{color:GrayText}}@media (forced-colors: active){.usa-input:disabled,.usa-input[aria-disabled=true]{border:2px solid GrayText}}.usa-input--error{border-width:0.25rem;border-color:#b50909;border-style:solid;padding-top:calc(0.5rem - 0.25rem);padding-bottom:calc(0.5rem - 0.25rem)}.usa-input--success{border-width:0.25rem;border-color:#00a91c;border-style:solid;padding-top:calc(0.5rem - 0.25rem);padding-bottom:calc(0.5rem - 0.25rem)}.usa-input-group{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;padding:0;position:relative}.usa-input-group--error input:focus,.usa-input-group--success input:focus{outline-offset:0.25rem}.usa-input-group--error{border-width:0.25rem;border-color:#b50909;border-style:solid}.usa-input-group--success{border-width:0.25rem;border-color:#00a91c;border-style:solid}.usa-input-group input{padding-right:2.5rem;border:0;height:100%;margin-top:0;min-width:0;width:100%}.usa-input-group input:disabled+.usa-input-suffix,.usa-input-group input[aria-disabled=true]+.usa-input-suffix{color:#454545;background-color:#c9c9c9;cursor:not-allowed;opacity:1}.usa-input-group input:disabled+.usa-input-suffix:hover,.usa-input-group input:disabled+.usa-input-suffix:active,.usa-input-group input:disabled+.usa-input-suffix:focus,.usa-input-group input:disabled+.usa-input-suffix.usa-focus,.usa-input-group input[aria-disabled=true]+.usa-input-suffix:hover,.usa-input-group input[aria-disabled=true]+.usa-input-suffix:active,.usa-input-group input[aria-disabled=true]+.usa-input-suffix:focus,.usa-input-group input[aria-disabled=true]+.usa-input-suffix.usa-focus{color:#454545;background-color:#c9c9c9}@media (forced-colors: active){.usa-input-group input:disabled+.usa-input-suffix,.usa-input-group input[aria-disabled=true]+.usa-input-suffix{border:0;color:GrayText}.usa-input-group input:disabled+.usa-input-suffix:hover,.usa-input-group input:disabled+.usa-input-suffix:active,.usa-input-group input:disabled+.usa-input-suffix:focus,.usa-input-group input:disabled+.usa-input-suffix.usa-focus,.usa-input-group input[aria-disabled=true]+.usa-input-suffix:hover,.usa-input-group input[aria-disabled=true]+.usa-input-suffix:active,.usa-input-group input[aria-disabled=true]+.usa-input-suffix:focus,.usa-input-group input[aria-disabled=true]+.usa-input-suffix.usa-focus{color:GrayText}}@media (forced-colors: active){.usa-input-group input:disabled,.usa-input-group input[aria-disabled=true]{border:0}}@media (forced-colors: active){.usa-input-group:has(input:disabled),.usa-input-group:has(input[aria-disabled=true]){border:2px solid GrayText}}.usa-input-prefix:has(+input:disabled),.usa-input-prefix:has(+input[aria-disabled=true]){color:#454545;background-color:#c9c9c9;cursor:not-allowed;opacity:1}.usa-input-prefix:has(+input:disabled):hover,.usa-input-prefix:has(+input:disabled):active,.usa-input-prefix:has(+input:disabled):focus,.usa-input-prefix:has(+input:disabled).usa-focus,.usa-input-prefix:has(+input[aria-disabled=true]):hover,.usa-input-prefix:has(+input[aria-disabled=true]):active,.usa-input-prefix:has(+input[aria-disabled=true]):focus,.usa-input-prefix:has(+input[aria-disabled=true]).usa-focus{color:#454545;background-color:#c9c9c9}@media (forced-colors: active){.usa-input-prefix:has(+input:disabled),.usa-input-prefix:has(+input[aria-disabled=true]){border:0;color:GrayText}.usa-input-prefix:has(+input:disabled):hover,.usa-input-prefix:has(+input:disabled):active,.usa-input-prefix:has(+input:disabled):focus,.usa-input-prefix:has(+input:disabled).usa-focus,.usa-input-prefix:has(+input[aria-disabled=true]):hover,.usa-input-prefix:has(+input[aria-disabled=true]):active,.usa-input-prefix:has(+input[aria-disabled=true]):focus,.usa-input-prefix:has(+input[aria-disabled=true]).usa-focus{color:GrayText}}.usa-input-prefix,.usa-input-suffix{position:absolute;color:#71767a;line-height:0;padding:0 0.5rem;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;white-space:nowrap}.usa-input-prefix .usa-icon,.usa-input-suffix .usa-icon{height:1.5rem;width:1.5rem}.usa-input-prefix+input{padding-left:2.5rem;padding-right:0.5rem}.usa-input-suffix{right:0}.usa-error-message{padding-bottom:0.25rem;padding-top:0.25rem;color:#b50909;display:block;font-weight:700}.usa-hint{color:#71767a}.usa-hint--required{color:#b50909}.usa-character-count__status{display:inline-block;padding-top:0.25rem}.usa-character-count__status.usa-character-count__status--invalid{color:#b50909;font-weight:700}.usa-error-message{font-size:1.06rem}:host([error]:not([error=""])),:host(.va-form-group--error){border-left:0.25rem solid #b50909;padding-left:1rem;position:relative}:host([error]:not([error=""])[use-forms-pattern=multiple]),:host(.va-form-group--error[use-forms-pattern=multiple]){border-left:none}:host([error]:not([error=""])[use-forms-pattern=multiple]) .input-wrap,:host(.va-form-group--error[use-forms-pattern=multiple]) .input-wrap{border-left:0.25rem solid #b50909;padding-left:1rem;position:relative}@media screen and (min-width: 1024px){:host([error]:not([error=""])),:host(.va-form-group--error){margin-left:-0.9rem}:host([error]:not([error=""])[use-forms-pattern=multiple]) .input-wrap,:host(.va-form-group--error[use-forms-pattern=multiple]) .input-wrap{margin-left:-0.9rem}}@media screen and (max-width: 1023px){:host([error]:not([error=""])[use-forms-pattern=multiple]),:host(.va-form-group--error[use-forms-pattern=multiple]){padding-left:0}}:host .usa-input--2xs{max-width:5ex}:host .usa-input--xs{max-width:9ex}:host .usa-input--sm,:host .usa-input--small{max-width:13ex}:host .usa-input--md,:host .usa-input--medium{max-width:20ex}:host .usa-input--lg{max-width:30ex}:host .usa-input--xl{max-width:40ex}:host .usa-input--2xl{max-width:50ex}:host{color:var(--vads-color-base)}:host{display:block;font-family:var(--font-source-sans)}.usa-input-group{-webkit-box-sizing:border-box;box-sizing:border-box}input{-webkit-box-sizing:border-box;box-sizing:border-box}input.usa-input{color:var(--vads-color-base)}.usa-hint{display:block}.currency-wrapper{position:relative;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.currency-wrapper>div{position:absolute;left:10px}.currency-wrapper #symbol{margin-top:8px}.currency-wrapper #inputField{padding-left:25px}:host([error]:not([error=""])[show-input-error=false]){border-left:0;padding-left:0;margin-left:0}'}}]);
|
|
2
|
+
"use strict";(self.webpackChunk_department_of_veterans_affairs_component_library=self.webpackChunk_department_of_veterans_affairs_component_library||[]).push([[4569,6104,7166],{4569:function(e,t,i){i.r(t),i.d(t,{c:function(){return n}});var r,a={exports:{}};r=a,function(){var e={}.hasOwnProperty;function t(){for(var i=[],r=0;r<arguments.length;r++){var a=arguments[r];if(a){var n=typeof a;if("string"===n||"number"===n)i.push(a);else if(Array.isArray(a)){if(a.length){var u=t.apply(null,a);u&&i.push(u)}}else if("object"===n)if(a.toString===Object.prototype.toString)for(var o in a)e.call(a,o)&&a[o]&&i.push(o);else i.push(a.toString())}}return i.join(" ")}r.exports?(t.default=t,r.exports=t):window.classNames=t}();var n=a.exports},6104:function(e,t,i){function r(e){return!Number.isNaN(parseFloat(e))}function a(e,t,i){void 0===i&&(i="slot");var r=e.shadowRoot.querySelector(i).assignedNodes();return null!==t?Array.from(r).filter((function(e){return e.nodeName.toLowerCase()===t})):Array.from(r)}function n(e){return 1===e?"":"s"}function u(e,t){if(void 0===e||""===e)return"".concat(t," character").concat(n(t)," allowed");var i;if(e.length<=t){var r=t-e.length;i="".concat(r," character").concat(n(r)," left")}else r=e.length-t,i="".concat(r," character").concat(n(r)," over limit");return i}function o(e,t){return Array.from({length:t-e+1},(function(t,i){return e+i}))}i.r(t),i.d(t,{S:function(){return l},a:function(){return a},b:function(){return r},c:function(){return g},d:function(){return m},e:function(){return b},f:function(){return u},g:function(){return d},h:function(){return c},i:function(){return h},m:function(){return o},s:function(){return p},u:function(){return v}}),i(7911);var s=function(e){return e&&"object"==typeof e&&1===e.nodeType};function p(e,t){var i=function(e,t){if("string"!=typeof e)return[];if(!t||!s(t))return[];var i=t.shadowRoot.querySelectorAll(e);return Array.from(i)}(e,t);return"string"!=typeof e||s(t)&&t.matches(e)&&i.push(t),i}var l={_entity:/[&<>"'/]/g,_entities:{"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"},getEntity:function(e){return l._entities[e]},escapeHTML:function(e){for(var t="",i=0;i<e.length;i++)t+=e[i],i+1<arguments.length&&(t+=String(arguments[i+1]||"").replace(l._entity,l.getEntity));return t}};function d(e){var t;return(t="string"==typeof e?parseInt(e,10):Math.floor(e))>=1&&t<=6?"h".concat(t):null}function c(e){return["VA-BUTTON","VA-LINK","BUTTON","A"].includes(e.tagName)}function h(e){return e&&"false"!==e||!1}function f(e){return"[object Arguments]"===Object.prototype.toString.call(e)}function m(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];if(e===t)return!0;if("function"==typeof e||"function"==typeof t)return!0;if("object"!=typeof e||"object"!=typeof t)return!1;if(null===e||null===t)return!1;if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(e instanceof RegExp&&t instanceof RegExp)return e.source===t.source&&e.global===t.global&&e.multiline===t.multiline&&e.lastIndex===t.lastIndex&&e.ignoreCase===t.ignoreCase;if(f(e)||f(t)){if(!f(e)||!f(t))return!1;var a=Array.prototype.slice;return m(a.call(e),a.call(t),i,r)}if(e.constructor!==t.constructor)return!1;var n=Object.keys(e),u=Object.keys(t);if(0===n.length&&0===u.length)return!0;if(n.length!==u.length)return!1;for(var o=i.length;o--;)if(i[o]===e)return r[o]===t;i.push(e),r.push(t),n.sort(),u.sort();for(var s=n.length-1;s>=0;s--)if(n[s]!==u[s])return!1;for(var p=void 0,l=n.length-1;l>=0;l--)if(!m(e[p=n[l]],t[p],i,r))return!1;return i.pop(),r.pop(),!0}function g(e,t){var i;return function(){for(var r=this,a=[],n=0;n<arguments.length;n++)a[n]=arguments[n];clearTimeout(i),i=setTimeout((function(){return e.apply(r,a)}),t)}}function b(e){if(null!=e){var t="string"==typeof e?parseInt(e,10):e;if(!(t<=0||isNaN(t)))return t}}function v(e,t,i){e&&(e.innerText=u(t,b(i)))}},7166:function(e,t,i){i.r(t),i.d(t,{va_text_input:function(){return o}});var r=i(7911),a=i(4569),n=(i(8181),i(6104)),u=i(4665),o=function(){function e(e){var t=this;(0,r.r)(this,e),this.componentLibraryAnalytics=(0,r.c)(this,"component-library-analytics",7),this.vaInput=(0,r.c)(this,"vaInput",7),this.allowedInputTypes=["email","number","password","search","tel","text","url"],this.updatePaddingLeft=function(){if(t.inputIconPrefix)t.paddingLeftValue="2.5rem";else if(t.inputPrefix){var e=t.inputPrefix?Math.min(t.inputPrefix.length,25):null;t.paddingLeftValue="".concat(.5*e+1,"rem")}},this.updatePaddingRight=function(){var e=t.inputSuffix?Math.min(t.inputSuffix.length,25):null;t.paddingRightValue="".concat(.5*e+1,"rem")},this.debouncedUpdateScreenReaderCount=(0,n.c)(n.u,1e3),this.handleInput=function(e){var i=e.target;t.value=i.value,t.debouncedUpdateScreenReaderCount(t.charCountElement,t.value,(0,n.e)(t.maxlength)),t.vaInput.emit({value:t.value})},this.handleBlur=function(e){if(t.enableAnalytics&&t.componentLibraryAnalytics.emit({componentName:"va-text-input",action:"blur",details:{label:t.label,value:t.value}}),("decimal"===t.inputmode||"numeric"===t.inputmode||t.currency)&&t.value){var i=u.i.t("number-error"),r=e.target.checkValidity();t.error||r?t.error&&t.error===i&&r&&(t.error=null,t.el.setAttribute("error","")):(t.error=i,t.el.setAttribute("error",i))}},this.label=void 0,this.error=void 0,this.reflectInputError=!1,this.showInputError=!0,this.invalid=!1,this.required=!1,this.hideRequiredText=!1,this.inputmode=void 0,this.step=void 0,this.type="text",this.maxlength=void 0,this.autocomplete=void 0,this.enableAnalytics=!1,this.name=void 0,this.pattern=void 0,this.hint=void 0,this.messageAriaDescribedby=void 0,this.value=void 0,this.success=!1,this.width=void 0,this.useFormsPattern=void 0,this.formHeadingLevel=3,this.formHeading=void 0,this.charcount=!1,this.currency=!1,this.inputPrefix=void 0,this.inputIconPrefix=void 0,this.inputSuffix=void 0,this.inputIconSuffix=void 0,this.min=void 0,this.max=void 0,this.errorHasPii=!1,this.paddingLeftValue="0",this.paddingRightValue="0"}return e.prototype.connectedCallback=function(){var e=this;u.i.on("languageChanged",(function(){(0,r.f)(e.el)}))},e.prototype.disconnectedCallback=function(){u.i.off("languageChanged")},e.prototype.componentDidRender=function(){var e=this;this.charCountElement&&!this.charCountElement.innerText&&(this.charCountElement.innerText=(0,n.f)(this.value,(0,n.e)(this.maxlength)),setTimeout((function(){e.charCountElement.setAttribute("aria-live","polite")}),0))},e.prototype.componentWillLoad=function(){this.updatePaddingLeft(),this.updatePaddingRight()},e.prototype.componentDidUpdate=function(){this.updatePaddingLeft(),this.updatePaddingRight()},e.prototype.getInputType=function(){return this.allowedInputTypes.includes(this.type)?this.max||this.min?"number":this.type:"text"},e.prototype.getPattern=function(){return this.currency?"^[0-9]+(.[0-9]{2})?$":void 0!==this.pattern||"decimal"!==this.inputmode&&"numeric"!==this.inputmode?this.pattern:"[0-9]+(.[0-9]{1,})?"},e.prototype.getInputmode=function(){return this.currency?"numeric":this.inputmode?this.inputmode:void 0},e.prototype.getStep=function(){return this.step||"decimal"!==this.inputmode?this.step?this.step:void 0:".01"},e.prototype.render=function(){var e,t=this,i=this,o=i.label,s=i.error,p=i.reflectInputError,l=i.showInputError,d=i.invalid,c=i.required,h=i.hideRequiredText,f=i.value,m=i.name,g=i.autocomplete,b=i.hint,v=i.handleInput,x=i.handleBlur,y=i.success,w=i.messageAriaDescribedby,T=i.width,S=i.useFormsPattern,_=i.formHeadingLevel,P=i.formHeading,z=i.charcount,k=i.min,I=i.max,A=i.currency,R=i.inputPrefix,C=i.inputIconPrefix,N=i.inputSuffix,L=i.inputIconSuffix,q=i.errorHasPii,H=void 0!==q&&q,E=this.getInputType(),G=(0,n.e)(this.maxlength),j=this.getInputmode(),F=this.getStep(),V="".concat(w?"input-message":""," ").concat(s?"input-error-message":""," ").concat(z&&G?"charcount-message":"").trim()||null,W="".concat(S&&P?"form-question":""," ").concat(S?"form-description":""," ").concat(S&&o?"input-label":"").trim()||null,M=this.getPattern(),O=(0,a.c)({"currency-wrapper":A,"usa-input-group":N||R||C||L}),B="0"!==t.paddingLeftValue&&R?{paddingLeft:t.paddingLeftValue}:N?{paddingRight:t.paddingRightValue}:{},D=G&&(null==f?void 0:f.length)>G,U=(0,a.c)({"usa-label":!0,"usa-label--error":s}),$=(0,a.c)(((e={"usa-input":!0,"usa-input--success":y,"usa-input--error":s||p})["usa-input--".concat(T)]=T,e)),K=(0,a.c)({"usa-hint":!0,"usa-character-count__status":G,"usa-character-count__status--invalid":G&&(null==f?void 0:f.length)>G}),J=(0,a.c)({"usa-sr-only":!l}),Q=(0,a.c)({"usa-error-message":!0,"dd-privacy-hidden":H}),X=null;if("single"===S||"multiple"===S){var Y=(0,n.g)(_);X=(0,r.h)(r.F,null,P&&(0,r.h)(Y,{id:"form-question",part:"form-header"},P),(0,r.h)("div",{id:"form-description"},(0,r.h)("slot",{name:"form-description"})))}return(0,r.h)(r.H,null,X,(0,r.h)("div",{class:"input-wrap"},o&&(0,r.h)("label",{htmlFor:"inputField",id:"input-label",class:U,part:"label"},o,c&&!h&&(0,r.h)("span",{class:"usa-label--required"}," ",u.i.t("required")),b&&(0,r.h)("span",{class:"usa-hint"},b)),(0,r.h)("slot",null),(0,r.h)("span",{id:"input-error-message",role:"alert",class:J},s&&(0,r.h)(r.F,null,(0,r.h)("span",{class:"usa-sr-only"},u.i.t("error")),(0,r.h)("span",{class:Q,"data-dd-action-name":H?"input error":void 0},s))),(0,r.h)("div",{class:O},A&&(0,r.h)("div",{id:"symbol"},"$"),R&&(0,r.h)("div",{class:"usa-input-prefix",part:"input-prefix"},R.substring(0,25)),C&&(0,r.h)("div",{class:"usa-input-prefix",part:"input-prefix"},(0,r.h)("va-icon",{icon:C,size:3,part:"icon"})),(0,r.h)("input",{class:$,id:"inputField",type:E,onInput:v,onBlur:x,"aria-describedby":V,style:B,"aria-labelledby":W,"aria-invalid":d||s||D?"true":"false",inputmode:j,step:F,maxlength:G,pattern:M,name:m,autocomplete:g,required:c||null,part:"input",min:k,max:I,value:f}),N&&(0,r.h)("div",{class:"usa-input-suffix",part:"suffix","aria-hidden":"true"},N.substring(0,25)),L&&(0,r.h)("div",{class:"usa-input-suffix",part:"input-suffix"},(0,r.h)("va-icon",{icon:L,size:3,part:"icon"}))),(0,n.i)(w)&&(0,r.h)("span",{id:"input-message",class:"usa-sr-only dd-privacy-hidden"},w),z&&G&&(0,r.h)(r.F,null,(0,r.h)("span",{"aria-hidden":"true",class:K},(0,n.f)(this.value,(0,n.e)(this.maxlength))),(0,r.h)("span",{id:"charcount-message",class:"usa-sr-only",ref:function(e){return t.charCountElement=e}}))))},Object.defineProperty(e.prototype,"el",{get:function(){return(0,r.g)(this)},enumerable:!1,configurable:!0}),e}();o.style='button:not([disabled]):focus,select:not([disabled]):focus,a:not([disabled]):focus,h1:focus,input:not([disabled]):focus,textarea:not([disabled]):focus,#form-question [role=\'option\']:focus,*[tabindex]:focus,a.va-sidenav-submenu__link:focus{outline:2px solid var(--vads-color-action-focus-on-light);outline-offset:2px;z-index:2}h1{margin-top:0}h1,h2,h3,h4,h5,h6{margin-bottom:0;margin-top:0;clear:both}*+h1,*+h2,*+h3,*+h4,*+h5,*+h6{margin-top:1.5em}h1+*,h2+*,h3+*,h4+*,h5+*,h6+*{margin-top:1em}h1{font-family:Merriweather Web, Georgia, Cambria, Times New Roman, Times, serif;font-size:2.44rem;line-height:1.2;font-weight:700}h2{font-family:Merriweather Web, Georgia, Cambria, Times New Roman, Times, serif;font-size:1.95rem;line-height:1.2;font-weight:700}h3{font-family:Merriweather Web, Georgia, Cambria, Times New Roman, Times, serif;font-size:1.34rem;line-height:1.2;font-weight:700}h4{font-family:Merriweather Web, Georgia, Cambria, Times New Roman, Times, serif;font-size:0.98rem;line-height:1.2;font-weight:700}h5{font-family:Merriweather Web, Georgia, Cambria, Times New Roman, Times, serif;font-size:0.91rem;line-height:1.2;font-weight:700}h6{font-family:Source Sans Pro Web, Helvetica Neue, Helvetica, Roboto, Arial, sans-serif;font-size:0.87rem;line-height:1.1;font-weight:normal;letter-spacing:0.025em;text-transform:uppercase}h1,h2,h3,h4,h5{font-family:Bitter, Georgia, Cambria, "Times New Roman", Times, serif;font-weight:700}h6{font-family:"Source Sans Pro Web", "Source Sans Pro", "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif;font-weight:700}h1{margin-top:0;font-size:2.5rem}h2{font-size:2rem}h3{font-size:1.25rem}h4{font-size:1.0625rem}h5{font-size:0.9375rem}h6{font-size:0.9375rem}@media (max-width: 481px){h1{font-size:1.875rem}h2{font-size:1.5rem}}h6{margin:0.5em 0 0;text-transform:none;font-weight:700}@media (max-width: 481px){h1{font-size:1.875rem}h2{font-size:1.5rem}}h6{margin:0.5em 0 0;text-transform:none;font-weight:700}:host legend :is(h1,h2,h3,h4,h5,h6),:host label :is(h1,h2,h3,h4,h5,h6){display:inline;margin:0px}:host legend :is(h1,h2,h3,h4,h5),:host label :is(h1,h2,h3,h4,h5){font-family:var(--font-serif)}:host h1+*,:host h2+*,:host h3+*,:host h4+*,:host h5+*,:host h6+*{margin-top:unset}:host #form-question{margin-bottom:1rem}.usa-hint,.usa-input-group,.usa-input{font-family:Source Sans Pro Web, "Source Sans Pro", "Helvetica Neue", Helvetica, Arial, sans;font-size:1.06rem;line-height:1.3}.usa-input-group,.usa-input{border-width:1px;border-color:#565c65;border-style:solid;-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:0;color:#1b1b1b;display:block;height:2.5rem;margin-top:0.5rem;max-width:30rem;padding:0.5rem;width:100%}.usa-sr-only{position:absolute;left:-999em;right:auto}.usa-label{font-family:Source Sans Pro Web, "Source Sans Pro", "Helvetica Neue", Helvetica, Arial, sans;font-size:1.06rem;line-height:1.3;display:block;font-weight:normal;margin-top:1.5rem;max-width:30rem}.usa-label--error{font-weight:700;margin-top:0}.usa-label--required{color:#b50909}.usa-input:disabled,.usa-input[aria-disabled=true]{color:#454545;background-color:#c9c9c9;cursor:not-allowed;opacity:1;-webkit-text-fill-color:#454545}.usa-input:disabled:hover,.usa-input:disabled:active,.usa-input:disabled:focus,.usa-input:disabled.usa-focus,.usa-input[aria-disabled=true]:hover,.usa-input[aria-disabled=true]:active,.usa-input[aria-disabled=true]:focus,.usa-input[aria-disabled=true].usa-focus{color:#454545;background-color:#c9c9c9}@media (forced-colors: active){.usa-input:disabled,.usa-input[aria-disabled=true]{border:0;color:GrayText}.usa-input:disabled:hover,.usa-input:disabled:active,.usa-input:disabled:focus,.usa-input:disabled.usa-focus,.usa-input[aria-disabled=true]:hover,.usa-input[aria-disabled=true]:active,.usa-input[aria-disabled=true]:focus,.usa-input[aria-disabled=true].usa-focus{color:GrayText}}@media (forced-colors: active){.usa-input:disabled,.usa-input[aria-disabled=true]{border:2px solid GrayText}}.usa-input--error{border-width:0.25rem;border-color:#b50909;border-style:solid;padding-top:calc(0.5rem - 0.25rem);padding-bottom:calc(0.5rem - 0.25rem)}.usa-input--success{border-width:0.25rem;border-color:#00a91c;border-style:solid;padding-top:calc(0.5rem - 0.25rem);padding-bottom:calc(0.5rem - 0.25rem)}.usa-input-group{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;padding:0;position:relative}.usa-input-group--error input:focus,.usa-input-group--success input:focus{outline-offset:0.25rem}.usa-input-group--error{border-width:0.25rem;border-color:#b50909;border-style:solid}.usa-input-group--success{border-width:0.25rem;border-color:#00a91c;border-style:solid}.usa-input-group input{padding-right:2.5rem;border:0;height:100%;margin-top:0;min-width:0;width:100%}.usa-input-group input:disabled+.usa-input-suffix,.usa-input-group input[aria-disabled=true]+.usa-input-suffix{color:#454545;background-color:#c9c9c9;cursor:not-allowed;opacity:1}.usa-input-group input:disabled+.usa-input-suffix:hover,.usa-input-group input:disabled+.usa-input-suffix:active,.usa-input-group input:disabled+.usa-input-suffix:focus,.usa-input-group input:disabled+.usa-input-suffix.usa-focus,.usa-input-group input[aria-disabled=true]+.usa-input-suffix:hover,.usa-input-group input[aria-disabled=true]+.usa-input-suffix:active,.usa-input-group input[aria-disabled=true]+.usa-input-suffix:focus,.usa-input-group input[aria-disabled=true]+.usa-input-suffix.usa-focus{color:#454545;background-color:#c9c9c9}@media (forced-colors: active){.usa-input-group input:disabled+.usa-input-suffix,.usa-input-group input[aria-disabled=true]+.usa-input-suffix{border:0;color:GrayText}.usa-input-group input:disabled+.usa-input-suffix:hover,.usa-input-group input:disabled+.usa-input-suffix:active,.usa-input-group input:disabled+.usa-input-suffix:focus,.usa-input-group input:disabled+.usa-input-suffix.usa-focus,.usa-input-group input[aria-disabled=true]+.usa-input-suffix:hover,.usa-input-group input[aria-disabled=true]+.usa-input-suffix:active,.usa-input-group input[aria-disabled=true]+.usa-input-suffix:focus,.usa-input-group input[aria-disabled=true]+.usa-input-suffix.usa-focus{color:GrayText}}@media (forced-colors: active){.usa-input-group input:disabled,.usa-input-group input[aria-disabled=true]{border:0}}@media (forced-colors: active){.usa-input-group:has(input:disabled),.usa-input-group:has(input[aria-disabled=true]){border:2px solid GrayText}}.usa-input-prefix:has(+input:disabled),.usa-input-prefix:has(+input[aria-disabled=true]){color:#454545;background-color:#c9c9c9;cursor:not-allowed;opacity:1}.usa-input-prefix:has(+input:disabled):hover,.usa-input-prefix:has(+input:disabled):active,.usa-input-prefix:has(+input:disabled):focus,.usa-input-prefix:has(+input:disabled).usa-focus,.usa-input-prefix:has(+input[aria-disabled=true]):hover,.usa-input-prefix:has(+input[aria-disabled=true]):active,.usa-input-prefix:has(+input[aria-disabled=true]):focus,.usa-input-prefix:has(+input[aria-disabled=true]).usa-focus{color:#454545;background-color:#c9c9c9}@media (forced-colors: active){.usa-input-prefix:has(+input:disabled),.usa-input-prefix:has(+input[aria-disabled=true]){border:0;color:GrayText}.usa-input-prefix:has(+input:disabled):hover,.usa-input-prefix:has(+input:disabled):active,.usa-input-prefix:has(+input:disabled):focus,.usa-input-prefix:has(+input:disabled).usa-focus,.usa-input-prefix:has(+input[aria-disabled=true]):hover,.usa-input-prefix:has(+input[aria-disabled=true]):active,.usa-input-prefix:has(+input[aria-disabled=true]):focus,.usa-input-prefix:has(+input[aria-disabled=true]).usa-focus{color:GrayText}}.usa-input-prefix,.usa-input-suffix{position:absolute;color:#71767a;line-height:0;padding:0 0.5rem;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;white-space:nowrap}.usa-input-prefix .usa-icon,.usa-input-suffix .usa-icon{height:1.5rem;width:1.5rem}.usa-input-prefix+input{padding-left:2.5rem;padding-right:0.5rem}.usa-input-suffix{right:0}.usa-error-message{padding-bottom:0.25rem;padding-top:0.25rem;color:#b50909;display:block;font-weight:700}.usa-hint{color:#71767a}.usa-hint--required{color:#b50909}.usa-character-count__status{display:inline-block;padding-top:0.25rem}.usa-character-count__status.usa-character-count__status--invalid{color:#b50909;font-weight:700}.usa-error-message{font-size:1.06rem}:host([error]:not([error=""])),:host(.va-form-group--error){border-left:0.25rem solid #b50909;padding-left:1rem;position:relative}:host([error]:not([error=""])[use-forms-pattern=multiple]),:host(.va-form-group--error[use-forms-pattern=multiple]){border-left:none}:host([error]:not([error=""])[use-forms-pattern=multiple]) .input-wrap,:host(.va-form-group--error[use-forms-pattern=multiple]) .input-wrap{border-left:0.25rem solid #b50909;padding-left:1rem;position:relative}@media screen and (min-width: 1024px){:host([error]:not([error=""])),:host(.va-form-group--error){margin-left:-0.9rem}:host([error]:not([error=""])[use-forms-pattern=multiple]) .input-wrap,:host(.va-form-group--error[use-forms-pattern=multiple]) .input-wrap{margin-left:-0.9rem}}@media screen and (max-width: 1023px){:host([error]:not([error=""])[use-forms-pattern=multiple]),:host(.va-form-group--error[use-forms-pattern=multiple]){padding-left:0}}:host .usa-input--2xs{max-width:5ex}:host .usa-input--xs{max-width:9ex}:host .usa-input--sm,:host .usa-input--small{max-width:13ex}:host .usa-input--md,:host .usa-input--medium{max-width:20ex}:host .usa-input--lg{max-width:30ex}:host .usa-input--xl{max-width:40ex}:host .usa-input--2xl{max-width:50ex}:host{color:var(--vads-color-base)}:host{display:block;font-family:var(--font-source-sans)}.usa-input-group{-webkit-box-sizing:border-box;box-sizing:border-box}input{-webkit-box-sizing:border-box;box-sizing:border-box}input.usa-input{color:var(--vads-color-base)}.usa-hint{display:block}.currency-wrapper{position:relative;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.currency-wrapper>div{position:absolute;left:10px}.currency-wrapper #symbol{margin-top:8px}.currency-wrapper #inputField{padding-left:25px}:host([error]:not([error=""])[show-input-error=false]){border-left:0;padding-left:0;margin-left:0}'}}]);
|