@department-of-veterans-affairs/component-library 54.5.2 → 54.6.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.
Files changed (122) hide show
  1. package/dist/1214.app.bundle.js +1 -1
  2. package/dist/1339.app.bundle.js +1 -1
  3. package/dist/1365.app.bundle.js +1 -1
  4. package/dist/1450.app.bundle.js +1 -1
  5. package/dist/196.app.bundle.js +2 -0
  6. package/dist/2222.app.bundle.js +1 -1
  7. package/dist/2387.app.bundle.js +1 -1
  8. package/dist/2472.app.bundle.js +1 -1
  9. package/dist/2515.app.bundle.js +2 -0
  10. package/dist/2654.app.bundle.js +1 -1
  11. package/dist/2664.app.bundle.js +1 -1
  12. package/dist/2801.app.bundle.js +1 -1
  13. package/dist/2858.app.bundle.js +1 -1
  14. package/dist/3071.app.bundle.js +1 -1
  15. package/dist/3156.app.bundle.js +1 -1
  16. package/dist/3349.app.bundle.js +1 -0
  17. package/dist/4064.app.bundle.js +1 -1
  18. package/dist/4117.app.bundle.js +1 -1
  19. package/dist/4140.app.bundle.js +1 -1
  20. package/dist/415.app.bundle.js +1 -1
  21. package/dist/4708.app.bundle.js +1 -1
  22. package/dist/4715.app.bundle.js +1 -1
  23. package/dist/5019.app.bundle.js +1 -1
  24. package/dist/5155.app.bundle.js +1 -1
  25. package/dist/5189.app.bundle.js +1 -1
  26. package/dist/5306.app.bundle.js +1 -1
  27. package/dist/5610.app.bundle.js +1 -1
  28. package/dist/5699.app.bundle.js +1 -1
  29. package/dist/575.app.bundle.js +1 -1
  30. package/dist/5830.app.bundle.js +1 -1
  31. package/dist/6034.app.bundle.js +1 -1
  32. package/dist/6247.app.bundle.js +1 -1
  33. package/dist/6349.app.bundle.js +1 -1
  34. package/dist/641.app.bundle.js +1 -1
  35. package/dist/6527.app.bundle.js +1 -1
  36. package/dist/6633.app.bundle.js +1 -1
  37. package/dist/6683.app.bundle.js +1 -1
  38. package/dist/6771.app.bundle.js +1 -1
  39. package/dist/6824.app.bundle.js +1 -1
  40. package/dist/712.app.bundle.js +1 -1
  41. package/dist/7367.app.bundle.js +1 -1
  42. package/dist/7531.app.bundle.js +1 -1
  43. package/dist/7663.app.bundle.js +1 -1
  44. package/dist/7814.app.bundle.js +1 -1
  45. package/dist/7821.app.bundle.js +1 -1
  46. package/dist/817.app.bundle.js +1 -0
  47. package/dist/8175.app.bundle.js +1 -1
  48. package/dist/82.app.bundle.js +1 -1
  49. package/dist/8206.app.bundle.js +1 -1
  50. package/dist/8495.app.bundle.js +1 -1
  51. package/dist/8735.app.bundle.js +1 -1
  52. package/dist/8762.app.bundle.js +1 -1
  53. package/dist/8859.app.bundle.js +1 -1
  54. package/dist/890.app.bundle.js +1 -1
  55. package/dist/9096.app.bundle.js +1 -0
  56. package/dist/{3126.app.bundle.js → 9176.app.bundle.js} +1 -1
  57. package/dist/9288.app.bundle.js +1 -1
  58. package/dist/9409.app.bundle.js +1 -1
  59. package/dist/9463.app.bundle.js +1 -1
  60. package/dist/9670.app.bundle.js +1 -1
  61. package/dist/9724.app.bundle.js +1 -1
  62. package/dist/9755.app.bundle.js +1 -1
  63. package/dist/9794.app.bundle.js +1 -1
  64. package/dist/9800.app.bundle.js +1 -1
  65. package/dist/9915.app.bundle.js +1 -1
  66. package/dist/app.bundle.js +1 -1
  67. package/dist/components/index.d.ts +2 -0
  68. package/dist/components/index.js +1 -1
  69. package/dist/components/types/components.d.ts +113 -0
  70. package/dist/components/va-card-status.d.ts +11 -0
  71. package/dist/components/va-card-status.js +1 -0
  72. package/dist/components/va-checkbox-group2.js +1 -1
  73. package/dist/components/va-checkbox2.js +1 -1
  74. package/dist/components/va-combo-box2.js +1 -1
  75. package/dist/components/va-crisis-line-modal2.js +1 -1
  76. package/dist/components/va-file-input-multiple.js +1 -1
  77. package/dist/components/va-file-input2.js +1 -1
  78. package/dist/components/va-header-minimal.js +1 -1
  79. package/dist/components/va-icon2.js +1 -1
  80. package/dist/components/va-language-toggle.js +1 -1
  81. package/dist/components/va-link-action.js +1 -1
  82. package/dist/components/va-link-action2.js +1 -0
  83. package/dist/components/va-loading-indicator.js +1 -1
  84. package/dist/components/va-minimal-footer.js +1 -1
  85. package/dist/components/va-need-help.js +1 -1
  86. package/dist/components/va-official-gov-banner2.js +1 -1
  87. package/dist/components/va-omb-info.js +1 -1
  88. package/dist/components/va-pagination.js +1 -1
  89. package/dist/components/va-privacy-agreement.js +1 -1
  90. package/dist/components/va-process-list-item.js +1 -1
  91. package/dist/components/va-process-list.js +1 -1
  92. package/dist/components/va-progress-bar2.js +1 -1
  93. package/dist/components/va-radio-option.js +1 -1
  94. package/dist/components/va-radio.js +1 -1
  95. package/dist/components/va-search-input.js +1 -1
  96. package/dist/components/va-select2.js +1 -1
  97. package/dist/components/va-sidenav-item.js +1 -1
  98. package/dist/components/va-sidenav-submenu.js +1 -1
  99. package/dist/components/va-statement-of-truth.js +1 -1
  100. package/dist/components/va-summary-box.js +1 -1
  101. package/dist/components/va-tab-item.js +1 -1
  102. package/dist/components/va-tab-panel.js +1 -1
  103. package/dist/components/va-table-inner2.js +1 -1
  104. package/dist/components/va-table-row.js +1 -1
  105. package/dist/components/va-table.js +1 -1
  106. package/dist/components/va-tag-status.js +1 -1
  107. package/dist/components/va-tag-status2.js +1 -0
  108. package/dist/components/va-telephone-input.js +1 -1
  109. package/dist/components/va-telephone2.js +1 -1
  110. package/dist/components/va-textarea.js +1 -1
  111. package/dist/react-bindings/index.d.ts +1 -0
  112. package/dist/react-bindings/index.js +1 -1
  113. package/dist/react-bindings/index.js.map +1 -1
  114. package/dist/react-bindings/index.ts +1 -0
  115. package/package.json +3 -3
  116. package/dist/3238.app.bundle.js +0 -1
  117. package/dist/6246.app.bundle.js +0 -2
  118. package/dist/6655.app.bundle.js +0 -2
  119. package/dist/9966.app.bundle.js +0 -2
  120. package/dist/9966.app.bundle.js.LICENSE.txt +0 -5
  121. /package/dist/{6246.app.bundle.js.LICENSE.txt → 196.app.bundle.js.LICENSE.txt} +0 -0
  122. /package/dist/{6655.app.bundle.js.LICENSE.txt → 2515.app.bundle.js.LICENSE.txt} +0 -0
@@ -1,2 +1,2 @@
1
1
  /*! For license information please see 9794.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([[9794,4164],{4164:function(t,e,r){r.r(e),r.d(e,{c:function(){return i}});var a,n={exports:{}};a=n,function(){var t={}.hasOwnProperty;function e(){for(var r=[],a=0;a<arguments.length;a++){var n=arguments[a];if(n){var i=typeof n;if("string"===i||"number"===i)r.push(n);else if(Array.isArray(n)){if(n.length){var o=e.apply(null,n);o&&r.push(o)}}else if("object"===i)if(n.toString===Object.prototype.toString)for(var s in n)t.call(n,s)&&n[s]&&r.push(s);else r.push(n.toString())}}return r.join(" ")}a.exports?(e.default=e,a.exports=e):window.classNames=e}();var i=n.exports},9794:function(t,e,r){r.r(e),r.d(e,{va_telephone_input:function(){return rt}});var a=r(2625),n=r(4164),i=(r(2404),r(1351)),o=r(2265);function s(){var t=(0,i.n)(arguments),e=t.text,r=t.options,a=t.metadata;return(0,i.p)(e,r,a)}function u(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,a)}return r}function l(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?u(Object(r),!0).forEach(function(e){c(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):u(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function c(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function h(){var t=(0,i.n)(arguments),e=t.text,r=t.options,a=t.metadata;r=l(l({},r),{},{extract:!1});var n=(0,i.a)(e,r,a);return n&&n.isPossible()||!1}function f(t,e){for(var r=0;r<e.length;r++){var a=e[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,a.key,a)}}var d=function(){function t(e){var r=e.onCountryChange,a=e.onCallingCodeChange;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.onCountryChange=r,this.onCallingCodeChange=a}return function(t,e){e&&f(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1})}(t,[{key:"reset",value:function(t){var e=t.country,r=t.callingCode;this.international=!1,this.missingPlus=!1,this.IDDPrefix=void 0,this.callingCode=void 0,this.digits="",this.resetNationalSignificantNumber(),this.initCountryAndCallingCode(e,r)}},{key:"resetNationalSignificantNumber",value:function(){this.nationalSignificantNumber=this.getNationalDigits(),this.nationalSignificantNumberMatchesInput=!0,this.nationalPrefix=void 0,this.carrierCode=void 0,this.complexPrefixBeforeNationalSignificantNumber=void 0}},{key:"update",value:function(t){for(var e=0,r=Object.keys(t);e<r.length;e++){var a=r[e];this[a]=t[a]}}},{key:"initCountryAndCallingCode",value:function(t,e){this.setCountry(t),this.setCallingCode(e)}},{key:"setCountry",value:function(t){this.country=t,this.onCountryChange(t)}},{key:"setCallingCode",value:function(t){this.callingCode=t,this.onCallingCodeChange(t,this.country)}},{key:"startInternationalNumber",value:function(t,e){this.international=!0,this.initCountryAndCallingCode(t,e)}},{key:"appendDigits",value:function(t){this.digits+=t}},{key:"appendNationalSignificantNumberDigits",value:function(t){this.nationalSignificantNumber+=t}},{key:"getNationalDigits",value:function(){return this.international?this.digits.slice((this.IDDPrefix?this.IDDPrefix.length:0)+(this.callingCode?this.callingCode.length:0)):this.digits}},{key:"getDigitsWithoutInternationalPrefix",value:function(){return this.international&&this.IDDPrefix?this.digits.slice(this.IDDPrefix.length):this.digits}}]),t}();function m(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,a=new Array(e);r<e;r++)a[r]=t[r];return a}var p="x",g=new RegExp(p);function b(t,e){if(e<1)return"";for(var r="";e>1;)1&e&&(r+=t),e>>=1,t+=t;return r+t}function v(t,e){return")"===t[e]&&e++,function(t){for(var e=[],r=0;r<t.length;)"("===t[r]?e.push(r):")"===t[r]&&e.pop(),r++;var a=0,n="";e.push(t.length);for(var i=0,o=e;i<o.length;i++){var s=o[i];n+=t.slice(a,s),a=s+1}return n}(t.slice(0,e))}function y(t,e,r){var a=r.metadata,n=r.shouldTryNationalPrefixFormattingRule,i=r.getSeparatorAfterNationalPrefix;if(new RegExp("^(?:".concat(e.pattern(),")$")).test(t.nationalSignificantNumber))return function(t,e,r){var a=r.metadata,n=r.getSeparatorAfterNationalPrefix;if((0,r.shouldTryNationalPrefixFormattingRule)(e)){var i=C(t,e,{useNationalPrefixFormattingRule:!0,getSeparatorAfterNationalPrefix:n,metadata:a});if(i)return i}return C(t,e,{useNationalPrefixFormattingRule:!1,getSeparatorAfterNationalPrefix:n,metadata:a})}(t,e,{metadata:a,shouldTryNationalPrefixFormattingRule:n,getSeparatorAfterNationalPrefix:i})}function C(t,e,r){var a=r.metadata,n=r.useNationalPrefixFormattingRule,o=r.getSeparatorAfterNationalPrefix,s=(0,i.f)(t.nationalSignificantNumber,e,{carrierCode:t.carrierCode,useInternationalFormat:t.international,withNationalPrefix:n,metadata:a});if(n||(t.nationalPrefix?s=t.nationalPrefix+o(e)+s:t.complexPrefixBeforeNationalSignificantNumber&&(s=t.complexPrefixBeforeNationalSignificantNumber+" "+s)),function(t,e){return(0,i.b)(t)===e.getNationalDigits()}(s,t))return s}function w(t,e){for(var r=0;r<e.length;r++){var a=e[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,a.key,a)}}var N=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}return function(t,e){e&&w(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1})}(t,[{key:"parse",value:function(t){if(this.context=[{or:!0,instructions:[]}],this.parsePattern(t),1!==this.context.length)throw new Error("Non-finalized contexts left when pattern parse ended");var e=this.context[0],r=e.branches,a=e.instructions;if(r)return{op:"|",args:r.concat([k(a)])};if(0===a.length)throw new Error("Pattern is required");return 1===a.length?a[0]:a}},{key:"startContext",value:function(t){this.context.push(t)}},{key:"endContext",value:function(){this.context.pop()}},{key:"getContext",value:function(){return this.context[this.context.length-1]}},{key:"parsePattern",value:function(t){if(!t)throw new Error("Pattern is required");var e=t.match(S);if(e){var r=e[1],a=t.slice(0,e.index),n=t.slice(e.index+r.length);switch(r){case"(?:":a&&this.parsePattern(a),this.startContext({or:!0,instructions:[],branches:[]});break;case")":if(!this.getContext().or)throw new Error('")" operator must be preceded by "(?:" operator');if(a&&this.parsePattern(a),0===this.getContext().instructions.length)throw new Error('No instructions found after "|" operator in an "or" group');var i=this.getContext().branches;i.push(k(this.getContext().instructions)),this.endContext(),this.getContext().instructions.push({op:"|",args:i});break;case"|":if(!this.getContext().or)throw new Error('"|" operator can only be used inside "or" groups');if(a&&this.parsePattern(a),!this.getContext().branches){if(1!==this.context.length)throw new Error('"branches" not found in an "or" group context');this.getContext().branches=[]}this.getContext().branches.push(k(this.getContext().instructions)),this.getContext().instructions=[];break;case"[":a&&this.parsePattern(a),this.startContext({oneOfSet:!0});break;case"]":if(!this.getContext().oneOfSet)throw new Error('"]" operator must be preceded by "[" operator');this.endContext(),this.getContext().instructions.push({op:"[]",args:x(a)});break;default:throw new Error("Unknown operator: ".concat(r))}n&&this.parsePattern(n)}else{if(P.test(t))throw new Error("Illegal characters found in a pattern: ".concat(t));this.getContext().instructions=this.getContext().instructions.concat(t.split(""))}}}]),t}();function x(t){for(var e=[],r=0;r<t.length;){if("-"===t[r]){if(0===r||r===t.length-1)throw new Error("Couldn't parse a one-of set pattern: ".concat(t));for(var a=t[r-1].charCodeAt(0)+1,n=t[r+1].charCodeAt(0)-1,i=a;i<=n;)e.push(String.fromCharCode(i)),i++}else e.push(t[r]);r++}return e}var P=/[\(\)\[\]\?\:\|]/,S=new RegExp("(\\||\\(\\?\\:|\\)|\\[|\\])");function k(t){return 1===t.length?t[0]:t}function E(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(r)return(r=r.call(t)).next.bind(r);if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return F(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?F(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var a=0;return function(){return a>=t.length?{done:!0}:{done:!1,value:t[a++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function F(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,a=new Array(e);r<e;r++)a[r]=t[r];return a}function O(t,e){for(var r=0;r<e.length;r++){var a=e[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,a.key,a)}}var A=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.matchTree=(new N).parse(e)}return function(t,e){e&&O(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1})}(t,[{key:"match",value:function(t){var e=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).allowOverflow;if(!t)throw new Error("String is required");var r=T(t.split(""),this.matchTree,!0);if(r&&r.match&&delete r.matchedChars,!r||!r.overflow||e)return r}}]),t}();function T(t,e,r){if("string"==typeof e){var a=t.join("");return 0===e.indexOf(a)?t.length===e.length?{match:!0,matchedChars:t}:{partialMatch:!0}:0===a.indexOf(e)?r&&t.length>e.length?{overflow:!0}:{match:!0,matchedChars:t.slice(0,e.length)}:void 0}if(Array.isArray(e)){for(var n=t.slice(),i=0;i<e.length;){var o=T(n,e[i],r&&i===e.length-1);if(!o)return;if(o.overflow)return o;if(!o.match){if(o.partialMatch)return{partialMatch:!0};throw new Error("Unsupported match result:\n".concat(JSON.stringify(o,null,2)))}if(0===(n=n.slice(o.matchedChars.length)).length)return i===e.length-1?{match:!0,matchedChars:t}:{partialMatch:!0};i++}return r?{overflow:!0}:{match:!0,matchedChars:t.slice(0,t.length-n.length)}}switch(e.op){case"|":for(var s,u,l=E(e.args);!(u=l()).done;){var c=T(t,u.value,r);if(c){if(c.overflow)return c;if(c.match)return{match:!0,matchedChars:c.matchedChars};if(!c.partialMatch)throw new Error("Unsupported match result:\n".concat(JSON.stringify(c,null,2)));s=!0}}return s?{partialMatch:!0}:void 0;case"[]":for(var h,f=E(e.args);!(h=f()).done;){var d=h.value;if(t[0]===d)return 1===t.length?{match:!0,matchedChars:t}:r?{overflow:!0}:{match:!0,matchedChars:[d]}}return;default:throw new Error("Unsupported instruction tree: ".concat(e))}}function I(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(r)return(r=r.call(t)).next.bind(r);if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return R(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?R(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var a=0;return function(){return a>=t.length?{done:!0}:{done:!1,value:t[a++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function R(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,a=new Array(e);r<e;r++)a[r]=t[r];return a}function D(t,e){for(var r=0;r<e.length;r++){var a=e[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,a.key,a)}}var j=b("9",15),M=/[- ]/,U=new RegExp("["+i.V+"]*\\$1["+i.V+"]*(\\$\\d["+i.V+"]*)*$"),_=function(){function t(e){var r=e.metadata;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.metadata=r,this.resetFormat()}return function(t,e){e&&D(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1})}(t,[{key:"resetFormat",value:function(){this.chosenFormat=void 0,this.template=void 0,this.nationalNumberTemplate=void 0,this.populatedNationalNumberTemplate=void 0,this.populatedNationalNumberTemplatePosition=-1}},{key:"reset",value:function(t,e){this.resetFormat(),t?(this.isNANP="1"===t.callingCode(),this.matchingFormats=t.formats(),e.nationalSignificantNumber&&this.narrowDownMatchingFormats(e)):(this.isNANP=void 0,this.matchingFormats=[])}},{key:"format",value:function(t,e){var r=this;if(function(t,e){return"IS_POSSIBLE"===(0,i.c)(t,e)}(e.nationalSignificantNumber,this.metadata))for(var a,n=I(this.matchingFormats);!(a=n()).done;){var o=a.value,s=y(e,o,{metadata:this.metadata,shouldTryNationalPrefixFormattingRule:function(t){return r.shouldTryNationalPrefixFormattingRule(t,{international:e.international,nationalPrefix:e.nationalPrefix})},getSeparatorAfterNationalPrefix:function(t){return r.getSeparatorAfterNationalPrefix(t)}});if(s)return this.resetFormat(),this.chosenFormat=o,this.setNationalNumberTemplate(s.replace(/\d/g,p),e),this.populatedNationalNumberTemplate=s,this.populatedNationalNumberTemplatePosition=this.template.lastIndexOf(p),s}return this.formatNationalNumberWithNextDigits(t,e)}},{key:"formatNationalNumberWithNextDigits",value:function(t,e){var r=this.chosenFormat,a=this.chooseFormat(e);if(a)return a===r?this.formatNextNationalNumberDigits(t):this.formatNextNationalNumberDigits(e.getNationalDigits())}},{key:"narrowDownMatchingFormats",value:function(t){var e=this,r=t.nationalSignificantNumber,a=t.nationalPrefix,n=t.international,i=r,o=i.length-3;o<0&&(o=0),this.matchingFormats=this.matchingFormats.filter(function(t){return e.formatSuits(t,n,a)&&e.formatMatches(t,i,o)}),this.chosenFormat&&-1===this.matchingFormats.indexOf(this.chosenFormat)&&this.resetFormat()}},{key:"formatSuits",value:function(t,e,r){return!(r&&!t.usesNationalPrefix()&&!t.nationalPrefixIsOptionalWhenFormattingInNationalFormat()||!e&&!r&&t.nationalPrefixIsMandatoryWhenFormattingInNationalFormat())}},{key:"formatMatches",value:function t(e,r,a){var n=e.leadingDigitsPatterns().length;if(0===n)return!0;a=Math.min(a,n-1);var i=e.leadingDigitsPatterns()[a];if(r.length<3)try{return void 0!==new A(i).match(r,{allowOverflow:!0})}catch(t){return console.error(t),!0}return new RegExp("^(".concat(i,")")).test(r)}},{key:"getFormatFormat",value:function(t,e){return e?t.internationalFormat():t.format()}},{key:"chooseFormat",value:function(t){for(var e,r=this,a=function(){var a=e.value;return r.chosenFormat===a?"break":U.test(r.getFormatFormat(a,t.international))?r.createTemplateForFormat(a,t)?(r.chosenFormat=a,"break"):(r.matchingFormats=r.matchingFormats.filter(function(t){return t!==a}),"continue"):"continue"},n=I(this.matchingFormats.slice());!(e=n()).done;){if("break"===a())break}return this.chosenFormat||this.resetFormat(),this.chosenFormat}},{key:"createTemplateForFormat",value:function(t,e){if(!(t.pattern().indexOf("|")>=0)){var r=this.getTemplateForFormat(t,e);return r?(this.setNationalNumberTemplate(r,e),!0):void 0}}},{key:"getSeparatorAfterNationalPrefix",value:function(t){return this.isNANP||t&&t.nationalPrefixFormattingRule()&&M.test(t.nationalPrefixFormattingRule())?" ":""}},{key:"getInternationalPrefixBeforeCountryCallingCode",value:function(t,e){var r=t.IDDPrefix,a=t.missingPlus;return r?e&&!1===e.spacing?r:r+" ":a?"":"+"}},{key:"getTemplate",value:function(t){if(this.template){for(var e=-1,r=0,a=t.international?this.getInternationalPrefixBeforeCountryCallingCode(t,{spacing:!1}):"";r<a.length+t.getDigitsWithoutInternationalPrefix().length;)e=this.template.indexOf(p,e+1),r++;return v(this.template,e+1)}}},{key:"setNationalNumberTemplate",value:function(t,e){this.nationalNumberTemplate=t,this.populatedNationalNumberTemplate=t,this.populatedNationalNumberTemplatePosition=-1,e.international?this.template=this.getInternationalPrefixBeforeCountryCallingCode(e).replace(/[\d\+]/g,p)+b(p,e.callingCode.length)+" "+t:this.template=t}},{key:"getTemplateForFormat",value:function(t,e){var r=e.nationalSignificantNumber,a=e.international,n=e.nationalPrefix,o=e.complexPrefixBeforeNationalSignificantNumber,s=t.pattern();s=s.replace(/\[([^\[\]])*\]/g,"\\d").replace(/\d(?=[^,}][^,}])/g,"\\d");var u=j.match(s)[0];if(!(r.length>u.length)){var l=new RegExp("^"+s+"$"),c=r.replace(/\d/g,"9");l.test(c)&&(u=c);var h,f=this.getFormatFormat(t,a);if(this.shouldTryNationalPrefixFormattingRule(t,{international:a,nationalPrefix:n})){var d=f.replace(i.F,t.nationalPrefixFormattingRule());if((0,i.b)(t.nationalPrefixFormattingRule())===(n||"")+(0,i.b)("$1")&&(f=d,h=!0,n))for(var m=n.length;m>0;)f=f.replace(/\d/,p),m--}var g=u.replace(new RegExp(s),f).replace(new RegExp("9","g"),p);return h||(o?g=b(p,o.length)+" "+g:n&&(g=b(p,n.length)+this.getSeparatorAfterNationalPrefix(t)+g)),a&&(g=(0,i.d)(g)),g}}},{key:"formatNextNationalNumberDigits",value:function(t){var e=function(t,e,r){for(var a,n=function(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(r)return(r=r.call(t)).next.bind(r);if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return m(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?m(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var a=0;return function(){return a>=t.length?{done:!0}:{done:!1,value:t[a++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(r.split(""));!(a=n()).done;){var i=a.value;if(t.slice(e+1).search(g)<0)return;e=t.search(g),t=t.replace(g,i)}return[t,e]}(this.populatedNationalNumberTemplate,this.populatedNationalNumberTemplatePosition,t);if(e)return this.populatedNationalNumberTemplate=e[0],this.populatedNationalNumberTemplatePosition=e[1],v(this.populatedNationalNumberTemplate,this.populatedNationalNumberTemplatePosition+1);this.resetFormat()}},{key:"shouldTryNationalPrefixFormattingRule",value:function(t,e){var r=e.international,a=e.nationalPrefix;if(t.nationalPrefixFormattingRule()){var n=t.usesNationalPrefix();if(n&&a||!n&&!r)return!0}}}]),t}();function V(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var a,n,i=[],o=!0,s=!1;try{for(r=r.call(t);!(o=(a=r.next()).done)&&(i.push(a.value),!e||i.length!==e);o=!0);}catch(t){s=!0,n=t}finally{try{o||null==r.return||r.return()}finally{if(s)throw n}}return i}}(t,e)||function(t,e){if(t){if("string"==typeof t)return L(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?L(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function L(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,a=new Array(e);r<e;r++)a[r]=t[r];return a}function W(t,e){for(var r=0;r<e.length;r++){var a=e[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,a.key,a)}}var B="["+i.V+i.i+"]+",q=new RegExp("^"+B+"$","i"),H="(?:["+i.P+"]["+i.V+i.i+"]*|["+i.V+i.i+"]+)",$=new RegExp("[^"+i.V+i.i+"]+.*$"),z=/[^\d\[\]]/,Y=function(){function t(e){var r=e.defaultCountry,a=e.defaultCallingCode,n=e.metadata,i=e.onNationalSignificantNumberChange;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.defaultCountry=r,this.defaultCallingCode=a,this.metadata=n,this.onNationalSignificantNumberChange=i}return function(t,e){e&&W(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1})}(t,[{key:"input",value:function(t,e){var r,a=function(t){var e=function(t){var e=function(t){var e,r=t.search(H);if(!(r<0))return"+"===(t=t.slice(r))[0]&&(e=!0,t=t.slice(1)),t=t.replace($,""),e&&(t="+"+t),t}(t)||"";return"+"===e[0]?[e.slice(1),!0]:[e]}(t),r=V(e,2),a=r[0],n=r[1];return q.test(a)||(a=""),[a,n]}(t),n=V(a,2),o=n[0],s=n[1],u=(0,i.b)(o);return s&&(e.digits||(e.startInternationalNumber(),u||(r=!0))),u&&this.inputDigits(u,e),{digits:u,justLeadingPlus:r}}},{key:"inputDigits",value:function(t,e){var r=e.digits,a=r.length<3&&r.length+t.length>=3;if(e.appendDigits(t),a&&this.extractIddPrefix(e),this.isWaitingForCountryCallingCode(e)){if(!this.extractCountryCallingCode(e))return}else e.appendNationalSignificantNumberDigits(t);e.international||this.hasExtractedNationalSignificantNumber||this.extractNationalSignificantNumber(e.getNationalDigits(),function(t){return e.update(t)})}},{key:"isWaitingForCountryCallingCode",value:function(t){var e=t.international,r=t.callingCode;return e&&!r}},{key:"extractCountryCallingCode",value:function(t){var e=(0,i.e)("+"+t.getDigitsWithoutInternationalPrefix(),this.defaultCountry,this.defaultCallingCode,this.metadata.metadata),r=e.countryCallingCode,a=e.number;if(r)return t.setCallingCode(r),t.update({nationalSignificantNumber:a}),!0}},{key:"reset",value:function(t){if(t){this.hasSelectedNumberingPlan=!0;var e=t._nationalPrefixForParsing();this.couldPossiblyExtractAnotherNationalSignificantNumber=e&&z.test(e)}else this.hasSelectedNumberingPlan=void 0,this.couldPossiblyExtractAnotherNationalSignificantNumber=void 0}},{key:"extractNationalSignificantNumber",value:function(t,e){if(this.hasSelectedNumberingPlan){var r=(0,i.g)(t,this.metadata),a=r.nationalPrefix,n=r.nationalNumber,o=r.carrierCode;if(n!==t)return this.onExtractedNationalNumber(a,o,n,t,e),!0}}},{key:"extractAnotherNationalSignificantNumber",value:function(t,e,r){if(!this.hasExtractedNationalSignificantNumber)return this.extractNationalSignificantNumber(t,r);if(this.couldPossiblyExtractAnotherNationalSignificantNumber){var a=(0,i.g)(t,this.metadata),n=a.nationalPrefix,o=a.nationalNumber,s=a.carrierCode;if(o!==e)return this.onExtractedNationalNumber(n,s,o,t,r),!0}}},{key:"onExtractedNationalNumber",value:function(t,e,r,a,n){var i,o,s=a.lastIndexOf(r);if(s>=0&&s===a.length-r.length){o=!0;var u=a.slice(0,s);u!==t&&(i=u)}n({nationalPrefix:t,carrierCode:e,nationalSignificantNumber:r,nationalSignificantNumberMatchesInput:o,complexPrefixBeforeNationalSignificantNumber:i}),this.hasExtractedNationalSignificantNumber=!0,this.onNationalSignificantNumberChange()}},{key:"reExtractNationalSignificantNumber",value:function(t){return!!this.extractAnotherNationalSignificantNumber(t.getNationalDigits(),t.nationalSignificantNumber,function(e){return t.update(e)})||(this.extractIddPrefix(t)||this.fixMissingPlus(t)?(this.extractCallingCodeAndNationalSignificantNumber(t),!0):void 0)}},{key:"extractIddPrefix",value:function(t){var e=t.international,r=t.IDDPrefix,a=t.digits;if(!e&&!r){var n=(0,i.s)(a,this.defaultCountry,this.defaultCallingCode,this.metadata.metadata);return void 0!==n&&n!==a?(t.update({IDDPrefix:a.slice(0,a.length-n.length)}),this.startInternationalNumber(t,{country:void 0,callingCode:void 0}),!0):void 0}}},{key:"fixMissingPlus",value:function(t){if(!t.international){var e=(0,i.h)(t.digits,this.defaultCountry,this.defaultCallingCode,this.metadata.metadata).countryCallingCode;if(e)return t.update({missingPlus:!0}),this.startInternationalNumber(t,{country:t.country,callingCode:e}),!0}}},{key:"startInternationalNumber",value:function(t,e){var r=e.country,a=e.callingCode;t.startInternationalNumber(r,a),t.nationalSignificantNumber&&(t.resetNationalSignificantNumber(),this.onNationalSignificantNumberChange(),this.hasExtractedNationalSignificantNumber=void 0)}},{key:"extractCallingCodeAndNationalSignificantNumber",value:function(t){this.extractCountryCallingCode(t)&&this.extractNationalSignificantNumber(t.getNationalDigits(),function(e){return t.update(e)})}}]),t}();function K(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,a=new Array(e);r<e;r++)a[r]=t[r];return a}function G(t,e){for(var r=0;r<e.length;r++){var a=e[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,a.key,a)}}var J=function(){function t(e,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.metadata=new i.M(r);var a=function(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var a,n,i=[],o=!0,s=!1;try{for(r=r.call(t);!(o=(a=r.next()).done)&&(i.push(a.value),!e||i.length!==e);o=!0);}catch(t){s=!0,n=t}finally{try{o||null==r.return||r.return()}finally{if(s)throw n}}return i}}(t,e)||function(t,e){if(t){if("string"==typeof t)return K(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?K(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(this.getCountryAndCallingCode(e),2),n=a[0],o=a[1];this.defaultCountry=n,this.defaultCallingCode=o,this.reset()}return function(t,e){e&&G(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1})}(t,[{key:"getCountryAndCallingCode",value:function(t){var e,r;return t&&((0,i.m)(t)?(e=t.defaultCountry,r=t.defaultCallingCode):e=t),e&&!this.metadata.hasCountry(e)&&(e=void 0),[e,r]}},{key:"input",value:function(t){var e=this.parser.input(t,this.state),r=e.digits;if(e.justLeadingPlus)this.formattedOutput="+";else if(r){var a;if(this.determineTheCountryIfNeeded(),this.state.nationalSignificantNumber&&this.formatter.narrowDownMatchingFormats(this.state),this.metadata.hasSelectedNumberingPlan()&&(a=this.formatter.format(r,this.state)),void 0===a&&this.parser.reExtractNationalSignificantNumber(this.state)){this.determineTheCountryIfNeeded();var n=this.state.getNationalDigits();n&&(a=this.formatter.format(n,this.state))}this.formattedOutput=a?this.getFullNumber(a):this.getNonFormattedNumber()}return this.formattedOutput}},{key:"reset",value:function(){var t=this;return this.state=new d({onCountryChange:function(e){t.country=e},onCallingCodeChange:function(e,r){t.metadata.selectNumberingPlan(r,e),t.formatter.reset(t.metadata.numberingPlan,t.state),t.parser.reset(t.metadata.numberingPlan)}}),this.formatter=new _({state:this.state,metadata:this.metadata}),this.parser=new Y({defaultCountry:this.defaultCountry,defaultCallingCode:this.defaultCallingCode,metadata:this.metadata,state:this.state,onNationalSignificantNumberChange:function(){t.determineTheCountryIfNeeded(),t.formatter.reset(t.metadata.numberingPlan,t.state)}}),this.state.reset({country:this.defaultCountry,callingCode:this.defaultCallingCode}),this.formattedOutput="",this}},{key:"isInternational",value:function(){return this.state.international}},{key:"getCallingCode",value:function(){if(this.isInternational())return this.state.callingCode}},{key:"getCountryCallingCode",value:function(){return this.getCallingCode()}},{key:"getCountry",value:function(){if(this.state.digits)return this._getCountry()}},{key:"_getCountry",value:function(){return this.state.country}},{key:"determineTheCountryIfNeeded",value:function(){this.state.country&&!this.isCountryCallingCodeAmbiguous()||this.determineTheCountry()}},{key:"getFullNumber",value:function(t){var e=this;if(this.isInternational()){var r=this.state.callingCode;return function(t){return e.formatter.getInternationalPrefixBeforeCountryCallingCode(e.state,{spacing:!!t})+t}(r?t?"".concat(r," ").concat(t):r:"".concat(this.state.getDigitsWithoutInternationalPrefix()))}return t}},{key:"getNonFormattedNationalNumberWithPrefix",value:function(){var t=this.state,e=t.nationalSignificantNumber,r=t.complexPrefixBeforeNationalSignificantNumber,a=t.nationalPrefix,n=e,i=r||a;return i&&(n=i+n),n}},{key:"getNonFormattedNumber",value:function(){var t=this.state.nationalSignificantNumberMatchesInput;return this.getFullNumber(t?this.getNonFormattedNationalNumberWithPrefix():this.state.getNationalDigits())}},{key:"getNonFormattedTemplate",value:function(){var t=this.getNonFormattedNumber();if(t)return t.replace(/[\+\d]/g,p)}},{key:"isCountryCallingCodeAmbiguous",value:function(){var t=this.state.callingCode,e=this.metadata.getCountryCodesForCallingCode(t);return e&&e.length>1}},{key:"determineTheCountry",value:function(){this.state.setCountry((0,i.j)(this.isInternational()?this.state.callingCode:this.defaultCallingCode,{nationalNumber:this.state.nationalSignificantNumber,defaultCountry:this.defaultCountry,metadata:this.metadata}))}},{key:"getNumberValue",value:function(){var t=this.state,e=t.digits,r=t.callingCode,a=t.country,n=t.nationalSignificantNumber;if(e)return this.isInternational()?r?"+"+r+n:"+"+e:a||r?"+"+(a?this.metadata.countryCallingCode():r)+n:void 0}},{key:"getNumber",value:function(){var t=this.state,e=t.nationalSignificantNumber,r=t.carrierCode,a=t.callingCode,n=this._getCountry();if(e&&(n||a)){if(n&&n===this.defaultCountry){var o=new i.M(this.metadata.metadata);o.selectNumberingPlan(n);var s=o.numberingPlan.callingCode(),u=this.metadata.getCountryCodesForCallingCode(s);if(u.length>1){var l=(0,i.k)(e,{countries:u,defaultCountry:this.defaultCountry,metadata:this.metadata.metadata});l&&(n=l)}}var c=new i.l(n||a,e,this.metadata.metadata);return r&&(c.carrierCode=r),c}}},{key:"isPossible",value:function(){var t=this.getNumber();return!!t&&t.isPossible()}},{key:"isValid",value:function(){var t=this.getNumber();return!!t&&t.isValid()}},{key:"getNationalNumber",value:function(){return this.state.nationalSignificantNumber}},{key:"getChars",value:function(){return(this.state.international?"+":"")+this.state.digits}},{key:"getTemplate",value:function(){return this.formatter.getTemplate(this.state)||this.getNonFormattedTemplate()||""}}]),t}();function Q(t){return new i.M(t).getCountries()}function X(t){return J.call(this,t,i.o)}function Z(){return i.M.call(this,i.o)}X.prototype=Object.create(J.prototype,{}),X.prototype.constructor=X,Z.prototype=Object.create(i.M.prototype,{}),Z.prototype.constructor=Z;var tt={names:{BQ:"Bonaire, Sint Eustatius and Saba",MF:"Saint Martin (French part)",PN:"Pitcairn",UM:"United States Minor Outlying Islands",FK:"Falkland Islands (Malvinas)",CG:"Congo",CD:"Congo, Democratic Republic of the",MM:"Myanmar",MD:"Moldova, Republic of",KP:"Korea, Democratic People's Republic of",SH:"Saint Helena, Ascension and Tristan da Cunha",RU:"Russian Federation",VC:"Saint Vincent and the Grenadines",SX:"Sint Maarten (Dutch part)",KR:"Korea, Republic of",SY:"Syrian Arab Republic",VI:"Virgin Islands (U.S.)",US:"United States of America",VA:"Holy See",VN:"Viet Nam"},countries:{GS:"FK",AQ:"NF",BV:"NO",TF:"RE",HM:"AU",UM:"US",PN:"NZ"}};function et(t){return function(){return(0,i.w)(i.q,arguments)}(t)?t:t in tt.countries?tt.countries[t]:void console.error("Not a valid country: ".concat(t))}var rt=function(){function t(t){(0,a.r)(this,t),this.vaContact=(0,a.c)(this,"vaContact",7),this.DEFAULT_COUNTRY="US",this.COUNTRY_ERROR="Please choose a country",this.CONTACT_ERROR="phone number in a valid format, for example,",this.contact="",this.country=this.DEFAULT_COUNTRY,this.label="Home phone number",this.hint=void 0,this.error="",this.noCountry=!1,this.required=!1,this.showInternalErrors=!0,this.formattedContact="",this.countries=null,this.countryError="",this.contactError="",this.isValid=!1,this.touched=!1,this.visibleError=void 0}return t.prototype.syncErrorMessages=function(t){(null==t?void 0:t.includes(this.CONTACT_ERROR))?this.contactError=this.error:t===this.COUNTRY_ERROR?this.countryError=t:this.resetErrors()},t.prototype.resetErrors=function(){this.countryError="",this.contactError="",this.visibleError=this.error},t.prototype.setValidityState=function(){this.country&&this.contact?(this.isValid=function(){return(0,i.w)(h,arguments)}(this.contact,et(this.country)),this.formattedContact=this.formatContact(this.contact)):this.isValid=!1},t.prototype.updateContact=function(t){var e=t.target.value;this.contact=e,this.formattedContact=this.formatContact(e),this.validateContact(),this.handleEmit()},t.prototype.getPhoneNumberLengthString=function(t){if(!t.length)return"";for(var e=t.slice().sort(function(t,e){return t-e}),r=!0,a=1;a<e.length;a++)if(e[a]!==e[a-1]+1){r=!1;break}return r&&e.length>1?"".concat(e[0]," to ").concat(e[e.length-1]):1===e.length?String(e[0]):2===e.length&&e[1]===e[0]+1?"".concat(e[0]," to ").concat(e[1]):2===e.length?"".concat(e[0]," or ").concat(e[1]):"".concat(e.slice(0,-1).join(", ")," or ").concat(e[e.length-1])},t.prototype.getValidPhoneNumberLengths=function(){var t=et(this.country),e=new Z;e.selectNumberingPlan(t);var r=e.numberingPlan.possibleLengths();return this.getPhoneNumberLengthString(r)},t.prototype.getErrorMessageForCountry=function(){var t=et(this.country),e=this.getCountryName(t);return"Enter a valid ".concat(e," phone number. Use ").concat(this.getValidPhoneNumberLengths()," digits.")},t.prototype.validateContact=function(){this.country?(this.resetErrors(),this.setValidityState(),!this.isValid&&this.touched&&this.showInternalErrors&&(this.visibleError=this.getErrorMessageForCountry(),this.contactError=this.visibleError)):this.validateCountry()},t.prototype.handleEmit=function(){var t,e=!!this.contact&&!!this.country;try{t=e?function(){return(0,i.w)(s,arguments)}(this.contact,et(this.country)):null}catch(e){t=null}var r=null;this.isValid||(r=this.country?this.getErrorMessageForCountry():this.COUNTRY_ERROR),this.vaContact.emit({callingCode:e&&null!==t?t.countryCallingCode:void 0,countryCode:this.country,contact:e&&null!==t?t.nationalNumber:this.contact,isValid:this.isValid,error:r,touched:this.touched})},t.prototype.validateCountry=function(){this.resetErrors(),this.touched||(this.touched=!0),this.country||(this.isValid=!1,this.showInternalErrors&&(this.visibleError=this.COUNTRY_ERROR,this.countryError=this.visibleError))},t.prototype.countryChange=function(t){var e=t.detail.value;this.country=e,this.validateContact(),this.handleEmit()},t.prototype.formatContact=function(t){var e=new X(et(this.country)).input(t);return""===e?t:e},t.prototype.buildCountryList=function(){var t=this,e=function(){return(0,i.w)(Q,arguments)}().filter(function(e){return e!==t.DEFAULT_COUNTRY});e.push.apply(e,Object.keys(tt.countries));var r=e.sort(function(e,r){var a=t.getCountryName(e),n=t.getCountryName(r);return a.localeCompare(n)});return function(t,e,r){if(r||2===arguments.length)for(var a,n=0,i=e.length;n<i;n++)!a&&n in e||(a||(a=Array.prototype.slice.call(e,0,n)),a[n]=e[n]);return t.concat(a||Array.prototype.slice.call(e))}([this.DEFAULT_COUNTRY],r,!0)},t.prototype.getCountryName=function(t){return t in tt.names?tt.names[t]:new Intl.DisplayNames(["en"],{type:"region"}).of(t.toUpperCase()).replace(/&/g,"and").replace(/St\./,"Saint")},t.prototype.componentWillLoad=function(){this.countries=this.buildCountryList(),""===this.country&&(this.country=this.DEFAULT_COUNTRY),this.visibleError=this.error},t.prototype.componentDidLoad=function(){this.contact&&(this.formattedContact=this.formatContact(this.contact),this.validateContact());var t=this.el.shadowRoot.querySelector("va-combo-box");t&&t.addEventListener("vaSelect",this.countryChange.bind(this)),this.handleEmit()},t.prototype.disconnectedCallback=function(){var t=this.el.shadowRoot.querySelector("va-combo-box");t&&t.removeEventListener("vaSelect",this.countryChange.bind(this))},t.prototype.getOptionText=function(t){var e=et(t);return t?"".concat(this.getCountryName(t)," +").concat(function(){return(0,i.w)(i.r,arguments)}(e)):""},t.prototype.handleBlur=function(){this.formattedContact&&(this.touched||(this.touched=!0),this.validateContact(),this.handleEmit())},t.prototype.render=function(){var t=this,e=this,r=e.label,i=e.hint,s=e.countries,u=e.formattedContact,l=e.country,c=e.countryError,h=e.contactError,f=e.visibleError,d=e.noCountry,m=e.required,p=(0,n.c)({"va-form-group--error":!!f}),g=(0,n.c)({"usa-legend":!0,"usa-label--error":!!f});return(0,a.h)(a.H,{key:"53625df7739e4f1c308ef12cc92ae6de96b654d2",class:p},(0,a.h)("div",{key:"fbbb34fc00770b2b11c5a01936df76c12faf9218",class:"input-wrap"},(0,a.h)("fieldset",{key:"daad221c5c9321ce1cb64cad35daa8eea1e703f3",class:"usa-form usa-fieldset"},(0,a.h)("legend",{key:"3005cf4dea06d08b338201d33fb86daae4fa9397",class:g},r,m&&(0,a.h)("span",{key:"f84ebe0d1f9d57d2dfd6c04f47a43aa06b79078b",class:"usa-label--required"}," ",o.i.t("required")),i&&(0,a.h)("div",{key:"d37602bd9e7488fff48e3d843b761e10583e6d7a",class:"usa-hint"},i)),(0,a.h)("span",{key:"604add2f3eacddb64806ba112fc7b7913f1cb500",id:"error-message",role:"alert"},f&&f),(0,a.h)("div",{key:"b82c0b595e0c0b010bf408c885bb698f1673fccd",class:"va-input-telephone-wrapper",tabIndex:0},!d&&(0,a.h)("va-combo-box",{key:"400d7f082d1f86ef72d2e8c7e1387017bba1cd72",label:"Country code",name:"country-codes","show-input-error":"false",error:c,value:l},s.map(function(e){return(0,a.h)("option",{value:e,key:e},t.getOptionText(e))})),(0,a.h)("va-text-input",{key:"40c3d58ea9ce0df91e8ff4292d55a2d43724ffff",label:"Phone number",type:"tel",autocomplete:"tel",inputmode:"tel",value:u,"show-input-error":"false",required:m,hideRequiredText:!0,error:h,onInput:function(e){return t.updateContact(e)},onBlur:function(){return t.handleBlur()}})))))},Object.defineProperty(t.prototype,"el",{get:function(){return(0,a.g)(this)},enumerable:!1,configurable:!0}),Object.defineProperty(t,"watchers",{get:function(){return{error:["syncErrorMessages"]}},enumerable:!1,configurable:!0}),t}();rt.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}.usa-hint,.usa-fieldset{font-family:Source Sans Pro Web, "Source Sans Pro", "Helvetica Neue", Helvetica, Arial, sans;font-size:1.06rem;line-height:1.3}.usa-sr-only{position:absolute;left:-999em;right:auto}.usa-form{font-family:Source Sans Pro Web, "Source Sans Pro", "Helvetica Neue", Helvetica, Arial, sans;font-size:1.06rem;line-height:1.3}@media all and (min-width: 30em){.usa-form{max-width:20rem}}.usa-form abbr[title=required]{text-decoration:none}.usa-form .usa-input,.usa-form .usa-range,.usa-form .usa-select,.usa-form .usa-textarea{max-width:none}.usa-form .usa-input--2xs,.usa-form .usa-input-group--2xs{max-width:5ex}.usa-form .usa-input--xs,.usa-form .usa-input-group--xs{max-width:9ex}.usa-form .usa-input--sm,.usa-form .usa-input--small,.usa-form .usa-input-group--sm,.usa-form .usa-input-group--small{max-width:13ex}.usa-form .usa-input--md,.usa-form .usa-input--medium,.usa-form .usa-input-group--md,.usa-form .usa-input-group--medium{max-width:20ex}.usa-form .usa-input--lg,.usa-form .usa-input-group--lg{max-width:30ex}.usa-form .usa-input--xl,.usa-form .usa-input-group--xl{max-width:40ex}.usa-form .usa-input--2xl,.usa-form .usa-input-group--2xl{max-width:50ex}.usa-form .usa-button{margin-top:0.5rem}@media all and (min-width: 30em){.usa-form .usa-button{margin-top:1.5rem}}.usa-form a:where(:not(.usa-button)){color:#005ea2;text-decoration:underline}.usa-form a:where(:not(.usa-button)):visited{color:#54278f}.usa-form a:where(:not(.usa-button)):hover{color:#1a4480}.usa-form a:where(:not(.usa-button)):active{color:#162e51}.usa-form a:where(:not(.usa-button)):focus{outline:0.25rem solid #2491ff;outline-offset:0rem}@media all and (min-width: 30em){.usa-form--large{max-width:30rem}}.usa-show-password{color:#005ea2;text-decoration:underline;background-color:transparent;border:0;border-radius:0;-webkit-box-shadow:none;box-shadow:none;font-weight:normal;-ms-flex-pack:normal;justify-content:normal;text-align:left;margin:0;padding:0;width:auto;cursor:pointer}.usa-show-password:visited{color:#54278f}.usa-show-password:hover{color:#1a4480}.usa-show-password:active{color:#162e51}.usa-show-password:focus{outline:0.25rem solid #2491ff;outline-offset:0rem}.usa-show-password:hover,.usa-show-password.usa-button--hover,.usa-show-password:disabled:hover,.usa-show-password[aria-disabled=true]:hover,.usa-show-password:disabled.usa-button--hover,.usa-show-password[aria-disabled=true].usa-button--hover,.usa-show-password:active,.usa-show-password.usa-button--active,.usa-show-password:disabled:active,.usa-show-password[aria-disabled=true]:active,.usa-show-password:disabled.usa-button--active,.usa-show-password[aria-disabled=true].usa-button--active,.usa-show-password:disabled:focus,.usa-show-password[aria-disabled=true]:focus,.usa-show-password:disabled.usa-focus,.usa-show-password[aria-disabled=true].usa-focus,.usa-show-password:disabled,.usa-show-password[aria-disabled=true],.usa-show-password.usa-button--disabled{background-color:transparent;-webkit-box-shadow:none;box-shadow:none;text-decoration:underline}.usa-show-password.usa-button--hover{color:#1a4480}.usa-show-password.usa-button--active{color:#162e51}.usa-show-password:disabled,.usa-show-password[aria-disabled=true],.usa-show-password:disabled:hover,.usa-show-password[aria-disabled=true]:hover,.usa-show-password[aria-disabled=true]:focus{color:#757575}@media (forced-colors: active){.usa-show-password:disabled,.usa-show-password[aria-disabled=true],.usa-show-password:disabled:hover,.usa-show-password[aria-disabled=true]:hover,.usa-show-password[aria-disabled=true]:focus{color:GrayText}}.usa-form__note,.usa-show-password{font-family:Source Sans Pro Web, "Source Sans Pro", "Helvetica Neue", Helvetica, Arial, sans;font-size:0.93rem;line-height:1.3;float:right;margin:0.25rem 0 1rem}.usa-fieldset{border:none;margin:0;padding:0}.usa-legend{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-legend--large{font-size:2.13rem;font-weight:700;margin-top:1rem}.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-form-group{margin-top:1.5rem}.usa-form-group .usa-label:first-child{margin-top:0}.usa-form-group--error{border-left-width:0.25rem;border-left-color:#b50909;border-left-style:solid;padding-left:1rem;position:relative}@media all and (min-width: 64em){.usa-form-group--error{margin-left:-1.25rem}}.usa-error-message{padding-bottom:0.25rem;padding-top:0.25rem;color:#b50909;display:block;font-weight:700}#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}}:host{display:block;margin-top:24px}va-text-input::part(label),va-combo-box::part(label){margin-top:0}div.input-wrap{max-width:var(--mobile-lg) !important}fieldset{max-width:var(--mobile-lg) !important;container-name:component-wrapper;container-type:inline-size}va-combo-box{-ms-flex:1;flex:1;min-width:216px}va-text-input{width:20ch}.va-input-telephone-wrapper{display:-ms-flexbox;display:flex;-ms-flex-align:start;align-items:flex-start;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:8px;margin-top:8px;width:100%;max-width:var(--mobile-lg)}@media (max-width: 480px){va-combo-box,va-text-input{width:100%;max-width:100% !important;margin-top:16px;-ms-flex:0;flex:0}.va-input-telephone-wrapper{display:block}}'}}]);
2
+ "use strict";(self.webpackChunk_department_of_veterans_affairs_component_library=self.webpackChunk_department_of_veterans_affairs_component_library||[]).push([[9794,4164],{4164:function(t,e,r){r.r(e),r.d(e,{c:function(){return i}});var a,n={exports:{}};a=n,function(){var t={}.hasOwnProperty;function e(){for(var r=[],a=0;a<arguments.length;a++){var n=arguments[a];if(n){var i=typeof n;if("string"===i||"number"===i)r.push(n);else if(Array.isArray(n)){if(n.length){var o=e.apply(null,n);o&&r.push(o)}}else if("object"===i)if(n.toString===Object.prototype.toString)for(var s in n)t.call(n,s)&&n[s]&&r.push(s);else r.push(n.toString())}}return r.join(" ")}a.exports?(e.default=e,a.exports=e):window.classNames=e}();var i=n.exports},9794:function(t,e,r){r.r(e),r.d(e,{va_telephone_input:function(){return rt}});var a=r(9213),n=r(4164),i=(r(2404),r(1351)),o=r(2265);function s(){var t=(0,i.n)(arguments),e=t.text,r=t.options,a=t.metadata;return(0,i.p)(e,r,a)}function u(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,a)}return r}function l(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?u(Object(r),!0).forEach(function(e){c(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):u(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function c(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function h(){var t=(0,i.n)(arguments),e=t.text,r=t.options,a=t.metadata;r=l(l({},r),{},{extract:!1});var n=(0,i.a)(e,r,a);return n&&n.isPossible()||!1}function f(t,e){for(var r=0;r<e.length;r++){var a=e[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,a.key,a)}}var d=function(){function t(e){var r=e.onCountryChange,a=e.onCallingCodeChange;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.onCountryChange=r,this.onCallingCodeChange=a}return function(t,e){e&&f(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1})}(t,[{key:"reset",value:function(t){var e=t.country,r=t.callingCode;this.international=!1,this.missingPlus=!1,this.IDDPrefix=void 0,this.callingCode=void 0,this.digits="",this.resetNationalSignificantNumber(),this.initCountryAndCallingCode(e,r)}},{key:"resetNationalSignificantNumber",value:function(){this.nationalSignificantNumber=this.getNationalDigits(),this.nationalSignificantNumberMatchesInput=!0,this.nationalPrefix=void 0,this.carrierCode=void 0,this.complexPrefixBeforeNationalSignificantNumber=void 0}},{key:"update",value:function(t){for(var e=0,r=Object.keys(t);e<r.length;e++){var a=r[e];this[a]=t[a]}}},{key:"initCountryAndCallingCode",value:function(t,e){this.setCountry(t),this.setCallingCode(e)}},{key:"setCountry",value:function(t){this.country=t,this.onCountryChange(t)}},{key:"setCallingCode",value:function(t){this.callingCode=t,this.onCallingCodeChange(t,this.country)}},{key:"startInternationalNumber",value:function(t,e){this.international=!0,this.initCountryAndCallingCode(t,e)}},{key:"appendDigits",value:function(t){this.digits+=t}},{key:"appendNationalSignificantNumberDigits",value:function(t){this.nationalSignificantNumber+=t}},{key:"getNationalDigits",value:function(){return this.international?this.digits.slice((this.IDDPrefix?this.IDDPrefix.length:0)+(this.callingCode?this.callingCode.length:0)):this.digits}},{key:"getDigitsWithoutInternationalPrefix",value:function(){return this.international&&this.IDDPrefix?this.digits.slice(this.IDDPrefix.length):this.digits}}]),t}();function m(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,a=new Array(e);r<e;r++)a[r]=t[r];return a}var p="x",g=new RegExp(p);function b(t,e){if(e<1)return"";for(var r="";e>1;)1&e&&(r+=t),e>>=1,t+=t;return r+t}function v(t,e){return")"===t[e]&&e++,function(t){for(var e=[],r=0;r<t.length;)"("===t[r]?e.push(r):")"===t[r]&&e.pop(),r++;var a=0,n="";e.push(t.length);for(var i=0,o=e;i<o.length;i++){var s=o[i];n+=t.slice(a,s),a=s+1}return n}(t.slice(0,e))}function y(t,e,r){var a=r.metadata,n=r.shouldTryNationalPrefixFormattingRule,i=r.getSeparatorAfterNationalPrefix;if(new RegExp("^(?:".concat(e.pattern(),")$")).test(t.nationalSignificantNumber))return function(t,e,r){var a=r.metadata,n=r.getSeparatorAfterNationalPrefix;if((0,r.shouldTryNationalPrefixFormattingRule)(e)){var i=C(t,e,{useNationalPrefixFormattingRule:!0,getSeparatorAfterNationalPrefix:n,metadata:a});if(i)return i}return C(t,e,{useNationalPrefixFormattingRule:!1,getSeparatorAfterNationalPrefix:n,metadata:a})}(t,e,{metadata:a,shouldTryNationalPrefixFormattingRule:n,getSeparatorAfterNationalPrefix:i})}function C(t,e,r){var a=r.metadata,n=r.useNationalPrefixFormattingRule,o=r.getSeparatorAfterNationalPrefix,s=(0,i.f)(t.nationalSignificantNumber,e,{carrierCode:t.carrierCode,useInternationalFormat:t.international,withNationalPrefix:n,metadata:a});if(n||(t.nationalPrefix?s=t.nationalPrefix+o(e)+s:t.complexPrefixBeforeNationalSignificantNumber&&(s=t.complexPrefixBeforeNationalSignificantNumber+" "+s)),function(t,e){return(0,i.b)(t)===e.getNationalDigits()}(s,t))return s}function w(t,e){for(var r=0;r<e.length;r++){var a=e[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,a.key,a)}}var N=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}return function(t,e){e&&w(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1})}(t,[{key:"parse",value:function(t){if(this.context=[{or:!0,instructions:[]}],this.parsePattern(t),1!==this.context.length)throw new Error("Non-finalized contexts left when pattern parse ended");var e=this.context[0],r=e.branches,a=e.instructions;if(r)return{op:"|",args:r.concat([k(a)])};if(0===a.length)throw new Error("Pattern is required");return 1===a.length?a[0]:a}},{key:"startContext",value:function(t){this.context.push(t)}},{key:"endContext",value:function(){this.context.pop()}},{key:"getContext",value:function(){return this.context[this.context.length-1]}},{key:"parsePattern",value:function(t){if(!t)throw new Error("Pattern is required");var e=t.match(S);if(e){var r=e[1],a=t.slice(0,e.index),n=t.slice(e.index+r.length);switch(r){case"(?:":a&&this.parsePattern(a),this.startContext({or:!0,instructions:[],branches:[]});break;case")":if(!this.getContext().or)throw new Error('")" operator must be preceded by "(?:" operator');if(a&&this.parsePattern(a),0===this.getContext().instructions.length)throw new Error('No instructions found after "|" operator in an "or" group');var i=this.getContext().branches;i.push(k(this.getContext().instructions)),this.endContext(),this.getContext().instructions.push({op:"|",args:i});break;case"|":if(!this.getContext().or)throw new Error('"|" operator can only be used inside "or" groups');if(a&&this.parsePattern(a),!this.getContext().branches){if(1!==this.context.length)throw new Error('"branches" not found in an "or" group context');this.getContext().branches=[]}this.getContext().branches.push(k(this.getContext().instructions)),this.getContext().instructions=[];break;case"[":a&&this.parsePattern(a),this.startContext({oneOfSet:!0});break;case"]":if(!this.getContext().oneOfSet)throw new Error('"]" operator must be preceded by "[" operator');this.endContext(),this.getContext().instructions.push({op:"[]",args:x(a)});break;default:throw new Error("Unknown operator: ".concat(r))}n&&this.parsePattern(n)}else{if(P.test(t))throw new Error("Illegal characters found in a pattern: ".concat(t));this.getContext().instructions=this.getContext().instructions.concat(t.split(""))}}}]),t}();function x(t){for(var e=[],r=0;r<t.length;){if("-"===t[r]){if(0===r||r===t.length-1)throw new Error("Couldn't parse a one-of set pattern: ".concat(t));for(var a=t[r-1].charCodeAt(0)+1,n=t[r+1].charCodeAt(0)-1,i=a;i<=n;)e.push(String.fromCharCode(i)),i++}else e.push(t[r]);r++}return e}var P=/[\(\)\[\]\?\:\|]/,S=new RegExp("(\\||\\(\\?\\:|\\)|\\[|\\])");function k(t){return 1===t.length?t[0]:t}function E(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(r)return(r=r.call(t)).next.bind(r);if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return F(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?F(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var a=0;return function(){return a>=t.length?{done:!0}:{done:!1,value:t[a++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function F(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,a=new Array(e);r<e;r++)a[r]=t[r];return a}function O(t,e){for(var r=0;r<e.length;r++){var a=e[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,a.key,a)}}var A=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.matchTree=(new N).parse(e)}return function(t,e){e&&O(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1})}(t,[{key:"match",value:function(t){var e=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).allowOverflow;if(!t)throw new Error("String is required");var r=T(t.split(""),this.matchTree,!0);if(r&&r.match&&delete r.matchedChars,!r||!r.overflow||e)return r}}]),t}();function T(t,e,r){if("string"==typeof e){var a=t.join("");return 0===e.indexOf(a)?t.length===e.length?{match:!0,matchedChars:t}:{partialMatch:!0}:0===a.indexOf(e)?r&&t.length>e.length?{overflow:!0}:{match:!0,matchedChars:t.slice(0,e.length)}:void 0}if(Array.isArray(e)){for(var n=t.slice(),i=0;i<e.length;){var o=T(n,e[i],r&&i===e.length-1);if(!o)return;if(o.overflow)return o;if(!o.match){if(o.partialMatch)return{partialMatch:!0};throw new Error("Unsupported match result:\n".concat(JSON.stringify(o,null,2)))}if(0===(n=n.slice(o.matchedChars.length)).length)return i===e.length-1?{match:!0,matchedChars:t}:{partialMatch:!0};i++}return r?{overflow:!0}:{match:!0,matchedChars:t.slice(0,t.length-n.length)}}switch(e.op){case"|":for(var s,u,l=E(e.args);!(u=l()).done;){var c=T(t,u.value,r);if(c){if(c.overflow)return c;if(c.match)return{match:!0,matchedChars:c.matchedChars};if(!c.partialMatch)throw new Error("Unsupported match result:\n".concat(JSON.stringify(c,null,2)));s=!0}}return s?{partialMatch:!0}:void 0;case"[]":for(var h,f=E(e.args);!(h=f()).done;){var d=h.value;if(t[0]===d)return 1===t.length?{match:!0,matchedChars:t}:r?{overflow:!0}:{match:!0,matchedChars:[d]}}return;default:throw new Error("Unsupported instruction tree: ".concat(e))}}function I(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(r)return(r=r.call(t)).next.bind(r);if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return R(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?R(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var a=0;return function(){return a>=t.length?{done:!0}:{done:!1,value:t[a++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function R(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,a=new Array(e);r<e;r++)a[r]=t[r];return a}function D(t,e){for(var r=0;r<e.length;r++){var a=e[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,a.key,a)}}var j=b("9",15),M=/[- ]/,U=new RegExp("["+i.V+"]*\\$1["+i.V+"]*(\\$\\d["+i.V+"]*)*$"),_=function(){function t(e){var r=e.metadata;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.metadata=r,this.resetFormat()}return function(t,e){e&&D(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1})}(t,[{key:"resetFormat",value:function(){this.chosenFormat=void 0,this.template=void 0,this.nationalNumberTemplate=void 0,this.populatedNationalNumberTemplate=void 0,this.populatedNationalNumberTemplatePosition=-1}},{key:"reset",value:function(t,e){this.resetFormat(),t?(this.isNANP="1"===t.callingCode(),this.matchingFormats=t.formats(),e.nationalSignificantNumber&&this.narrowDownMatchingFormats(e)):(this.isNANP=void 0,this.matchingFormats=[])}},{key:"format",value:function(t,e){var r=this;if(function(t,e){return"IS_POSSIBLE"===(0,i.c)(t,e)}(e.nationalSignificantNumber,this.metadata))for(var a,n=I(this.matchingFormats);!(a=n()).done;){var o=a.value,s=y(e,o,{metadata:this.metadata,shouldTryNationalPrefixFormattingRule:function(t){return r.shouldTryNationalPrefixFormattingRule(t,{international:e.international,nationalPrefix:e.nationalPrefix})},getSeparatorAfterNationalPrefix:function(t){return r.getSeparatorAfterNationalPrefix(t)}});if(s)return this.resetFormat(),this.chosenFormat=o,this.setNationalNumberTemplate(s.replace(/\d/g,p),e),this.populatedNationalNumberTemplate=s,this.populatedNationalNumberTemplatePosition=this.template.lastIndexOf(p),s}return this.formatNationalNumberWithNextDigits(t,e)}},{key:"formatNationalNumberWithNextDigits",value:function(t,e){var r=this.chosenFormat,a=this.chooseFormat(e);if(a)return a===r?this.formatNextNationalNumberDigits(t):this.formatNextNationalNumberDigits(e.getNationalDigits())}},{key:"narrowDownMatchingFormats",value:function(t){var e=this,r=t.nationalSignificantNumber,a=t.nationalPrefix,n=t.international,i=r,o=i.length-3;o<0&&(o=0),this.matchingFormats=this.matchingFormats.filter(function(t){return e.formatSuits(t,n,a)&&e.formatMatches(t,i,o)}),this.chosenFormat&&-1===this.matchingFormats.indexOf(this.chosenFormat)&&this.resetFormat()}},{key:"formatSuits",value:function(t,e,r){return!(r&&!t.usesNationalPrefix()&&!t.nationalPrefixIsOptionalWhenFormattingInNationalFormat()||!e&&!r&&t.nationalPrefixIsMandatoryWhenFormattingInNationalFormat())}},{key:"formatMatches",value:function t(e,r,a){var n=e.leadingDigitsPatterns().length;if(0===n)return!0;a=Math.min(a,n-1);var i=e.leadingDigitsPatterns()[a];if(r.length<3)try{return void 0!==new A(i).match(r,{allowOverflow:!0})}catch(t){return console.error(t),!0}return new RegExp("^(".concat(i,")")).test(r)}},{key:"getFormatFormat",value:function(t,e){return e?t.internationalFormat():t.format()}},{key:"chooseFormat",value:function(t){for(var e,r=this,a=function(){var a=e.value;return r.chosenFormat===a?"break":U.test(r.getFormatFormat(a,t.international))?r.createTemplateForFormat(a,t)?(r.chosenFormat=a,"break"):(r.matchingFormats=r.matchingFormats.filter(function(t){return t!==a}),"continue"):"continue"},n=I(this.matchingFormats.slice());!(e=n()).done;){if("break"===a())break}return this.chosenFormat||this.resetFormat(),this.chosenFormat}},{key:"createTemplateForFormat",value:function(t,e){if(!(t.pattern().indexOf("|")>=0)){var r=this.getTemplateForFormat(t,e);return r?(this.setNationalNumberTemplate(r,e),!0):void 0}}},{key:"getSeparatorAfterNationalPrefix",value:function(t){return this.isNANP||t&&t.nationalPrefixFormattingRule()&&M.test(t.nationalPrefixFormattingRule())?" ":""}},{key:"getInternationalPrefixBeforeCountryCallingCode",value:function(t,e){var r=t.IDDPrefix,a=t.missingPlus;return r?e&&!1===e.spacing?r:r+" ":a?"":"+"}},{key:"getTemplate",value:function(t){if(this.template){for(var e=-1,r=0,a=t.international?this.getInternationalPrefixBeforeCountryCallingCode(t,{spacing:!1}):"";r<a.length+t.getDigitsWithoutInternationalPrefix().length;)e=this.template.indexOf(p,e+1),r++;return v(this.template,e+1)}}},{key:"setNationalNumberTemplate",value:function(t,e){this.nationalNumberTemplate=t,this.populatedNationalNumberTemplate=t,this.populatedNationalNumberTemplatePosition=-1,e.international?this.template=this.getInternationalPrefixBeforeCountryCallingCode(e).replace(/[\d\+]/g,p)+b(p,e.callingCode.length)+" "+t:this.template=t}},{key:"getTemplateForFormat",value:function(t,e){var r=e.nationalSignificantNumber,a=e.international,n=e.nationalPrefix,o=e.complexPrefixBeforeNationalSignificantNumber,s=t.pattern();s=s.replace(/\[([^\[\]])*\]/g,"\\d").replace(/\d(?=[^,}][^,}])/g,"\\d");var u=j.match(s)[0];if(!(r.length>u.length)){var l=new RegExp("^"+s+"$"),c=r.replace(/\d/g,"9");l.test(c)&&(u=c);var h,f=this.getFormatFormat(t,a);if(this.shouldTryNationalPrefixFormattingRule(t,{international:a,nationalPrefix:n})){var d=f.replace(i.F,t.nationalPrefixFormattingRule());if((0,i.b)(t.nationalPrefixFormattingRule())===(n||"")+(0,i.b)("$1")&&(f=d,h=!0,n))for(var m=n.length;m>0;)f=f.replace(/\d/,p),m--}var g=u.replace(new RegExp(s),f).replace(new RegExp("9","g"),p);return h||(o?g=b(p,o.length)+" "+g:n&&(g=b(p,n.length)+this.getSeparatorAfterNationalPrefix(t)+g)),a&&(g=(0,i.d)(g)),g}}},{key:"formatNextNationalNumberDigits",value:function(t){var e=function(t,e,r){for(var a,n=function(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(r)return(r=r.call(t)).next.bind(r);if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return m(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?m(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var a=0;return function(){return a>=t.length?{done:!0}:{done:!1,value:t[a++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(r.split(""));!(a=n()).done;){var i=a.value;if(t.slice(e+1).search(g)<0)return;e=t.search(g),t=t.replace(g,i)}return[t,e]}(this.populatedNationalNumberTemplate,this.populatedNationalNumberTemplatePosition,t);if(e)return this.populatedNationalNumberTemplate=e[0],this.populatedNationalNumberTemplatePosition=e[1],v(this.populatedNationalNumberTemplate,this.populatedNationalNumberTemplatePosition+1);this.resetFormat()}},{key:"shouldTryNationalPrefixFormattingRule",value:function(t,e){var r=e.international,a=e.nationalPrefix;if(t.nationalPrefixFormattingRule()){var n=t.usesNationalPrefix();if(n&&a||!n&&!r)return!0}}}]),t}();function V(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var a,n,i=[],o=!0,s=!1;try{for(r=r.call(t);!(o=(a=r.next()).done)&&(i.push(a.value),!e||i.length!==e);o=!0);}catch(t){s=!0,n=t}finally{try{o||null==r.return||r.return()}finally{if(s)throw n}}return i}}(t,e)||function(t,e){if(t){if("string"==typeof t)return L(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?L(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function L(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,a=new Array(e);r<e;r++)a[r]=t[r];return a}function W(t,e){for(var r=0;r<e.length;r++){var a=e[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,a.key,a)}}var B="["+i.V+i.i+"]+",q=new RegExp("^"+B+"$","i"),H="(?:["+i.P+"]["+i.V+i.i+"]*|["+i.V+i.i+"]+)",$=new RegExp("[^"+i.V+i.i+"]+.*$"),z=/[^\d\[\]]/,Y=function(){function t(e){var r=e.defaultCountry,a=e.defaultCallingCode,n=e.metadata,i=e.onNationalSignificantNumberChange;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.defaultCountry=r,this.defaultCallingCode=a,this.metadata=n,this.onNationalSignificantNumberChange=i}return function(t,e){e&&W(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1})}(t,[{key:"input",value:function(t,e){var r,a=function(t){var e=function(t){var e=function(t){var e,r=t.search(H);if(!(r<0))return"+"===(t=t.slice(r))[0]&&(e=!0,t=t.slice(1)),t=t.replace($,""),e&&(t="+"+t),t}(t)||"";return"+"===e[0]?[e.slice(1),!0]:[e]}(t),r=V(e,2),a=r[0],n=r[1];return q.test(a)||(a=""),[a,n]}(t),n=V(a,2),o=n[0],s=n[1],u=(0,i.b)(o);return s&&(e.digits||(e.startInternationalNumber(),u||(r=!0))),u&&this.inputDigits(u,e),{digits:u,justLeadingPlus:r}}},{key:"inputDigits",value:function(t,e){var r=e.digits,a=r.length<3&&r.length+t.length>=3;if(e.appendDigits(t),a&&this.extractIddPrefix(e),this.isWaitingForCountryCallingCode(e)){if(!this.extractCountryCallingCode(e))return}else e.appendNationalSignificantNumberDigits(t);e.international||this.hasExtractedNationalSignificantNumber||this.extractNationalSignificantNumber(e.getNationalDigits(),function(t){return e.update(t)})}},{key:"isWaitingForCountryCallingCode",value:function(t){var e=t.international,r=t.callingCode;return e&&!r}},{key:"extractCountryCallingCode",value:function(t){var e=(0,i.e)("+"+t.getDigitsWithoutInternationalPrefix(),this.defaultCountry,this.defaultCallingCode,this.metadata.metadata),r=e.countryCallingCode,a=e.number;if(r)return t.setCallingCode(r),t.update({nationalSignificantNumber:a}),!0}},{key:"reset",value:function(t){if(t){this.hasSelectedNumberingPlan=!0;var e=t._nationalPrefixForParsing();this.couldPossiblyExtractAnotherNationalSignificantNumber=e&&z.test(e)}else this.hasSelectedNumberingPlan=void 0,this.couldPossiblyExtractAnotherNationalSignificantNumber=void 0}},{key:"extractNationalSignificantNumber",value:function(t,e){if(this.hasSelectedNumberingPlan){var r=(0,i.g)(t,this.metadata),a=r.nationalPrefix,n=r.nationalNumber,o=r.carrierCode;if(n!==t)return this.onExtractedNationalNumber(a,o,n,t,e),!0}}},{key:"extractAnotherNationalSignificantNumber",value:function(t,e,r){if(!this.hasExtractedNationalSignificantNumber)return this.extractNationalSignificantNumber(t,r);if(this.couldPossiblyExtractAnotherNationalSignificantNumber){var a=(0,i.g)(t,this.metadata),n=a.nationalPrefix,o=a.nationalNumber,s=a.carrierCode;if(o!==e)return this.onExtractedNationalNumber(n,s,o,t,r),!0}}},{key:"onExtractedNationalNumber",value:function(t,e,r,a,n){var i,o,s=a.lastIndexOf(r);if(s>=0&&s===a.length-r.length){o=!0;var u=a.slice(0,s);u!==t&&(i=u)}n({nationalPrefix:t,carrierCode:e,nationalSignificantNumber:r,nationalSignificantNumberMatchesInput:o,complexPrefixBeforeNationalSignificantNumber:i}),this.hasExtractedNationalSignificantNumber=!0,this.onNationalSignificantNumberChange()}},{key:"reExtractNationalSignificantNumber",value:function(t){return!!this.extractAnotherNationalSignificantNumber(t.getNationalDigits(),t.nationalSignificantNumber,function(e){return t.update(e)})||(this.extractIddPrefix(t)||this.fixMissingPlus(t)?(this.extractCallingCodeAndNationalSignificantNumber(t),!0):void 0)}},{key:"extractIddPrefix",value:function(t){var e=t.international,r=t.IDDPrefix,a=t.digits;if(!e&&!r){var n=(0,i.s)(a,this.defaultCountry,this.defaultCallingCode,this.metadata.metadata);return void 0!==n&&n!==a?(t.update({IDDPrefix:a.slice(0,a.length-n.length)}),this.startInternationalNumber(t,{country:void 0,callingCode:void 0}),!0):void 0}}},{key:"fixMissingPlus",value:function(t){if(!t.international){var e=(0,i.h)(t.digits,this.defaultCountry,this.defaultCallingCode,this.metadata.metadata).countryCallingCode;if(e)return t.update({missingPlus:!0}),this.startInternationalNumber(t,{country:t.country,callingCode:e}),!0}}},{key:"startInternationalNumber",value:function(t,e){var r=e.country,a=e.callingCode;t.startInternationalNumber(r,a),t.nationalSignificantNumber&&(t.resetNationalSignificantNumber(),this.onNationalSignificantNumberChange(),this.hasExtractedNationalSignificantNumber=void 0)}},{key:"extractCallingCodeAndNationalSignificantNumber",value:function(t){this.extractCountryCallingCode(t)&&this.extractNationalSignificantNumber(t.getNationalDigits(),function(e){return t.update(e)})}}]),t}();function K(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,a=new Array(e);r<e;r++)a[r]=t[r];return a}function G(t,e){for(var r=0;r<e.length;r++){var a=e[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,a.key,a)}}var J=function(){function t(e,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.metadata=new i.M(r);var a=function(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var a,n,i=[],o=!0,s=!1;try{for(r=r.call(t);!(o=(a=r.next()).done)&&(i.push(a.value),!e||i.length!==e);o=!0);}catch(t){s=!0,n=t}finally{try{o||null==r.return||r.return()}finally{if(s)throw n}}return i}}(t,e)||function(t,e){if(t){if("string"==typeof t)return K(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?K(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(this.getCountryAndCallingCode(e),2),n=a[0],o=a[1];this.defaultCountry=n,this.defaultCallingCode=o,this.reset()}return function(t,e){e&&G(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1})}(t,[{key:"getCountryAndCallingCode",value:function(t){var e,r;return t&&((0,i.m)(t)?(e=t.defaultCountry,r=t.defaultCallingCode):e=t),e&&!this.metadata.hasCountry(e)&&(e=void 0),[e,r]}},{key:"input",value:function(t){var e=this.parser.input(t,this.state),r=e.digits;if(e.justLeadingPlus)this.formattedOutput="+";else if(r){var a;if(this.determineTheCountryIfNeeded(),this.state.nationalSignificantNumber&&this.formatter.narrowDownMatchingFormats(this.state),this.metadata.hasSelectedNumberingPlan()&&(a=this.formatter.format(r,this.state)),void 0===a&&this.parser.reExtractNationalSignificantNumber(this.state)){this.determineTheCountryIfNeeded();var n=this.state.getNationalDigits();n&&(a=this.formatter.format(n,this.state))}this.formattedOutput=a?this.getFullNumber(a):this.getNonFormattedNumber()}return this.formattedOutput}},{key:"reset",value:function(){var t=this;return this.state=new d({onCountryChange:function(e){t.country=e},onCallingCodeChange:function(e,r){t.metadata.selectNumberingPlan(r,e),t.formatter.reset(t.metadata.numberingPlan,t.state),t.parser.reset(t.metadata.numberingPlan)}}),this.formatter=new _({state:this.state,metadata:this.metadata}),this.parser=new Y({defaultCountry:this.defaultCountry,defaultCallingCode:this.defaultCallingCode,metadata:this.metadata,state:this.state,onNationalSignificantNumberChange:function(){t.determineTheCountryIfNeeded(),t.formatter.reset(t.metadata.numberingPlan,t.state)}}),this.state.reset({country:this.defaultCountry,callingCode:this.defaultCallingCode}),this.formattedOutput="",this}},{key:"isInternational",value:function(){return this.state.international}},{key:"getCallingCode",value:function(){if(this.isInternational())return this.state.callingCode}},{key:"getCountryCallingCode",value:function(){return this.getCallingCode()}},{key:"getCountry",value:function(){if(this.state.digits)return this._getCountry()}},{key:"_getCountry",value:function(){return this.state.country}},{key:"determineTheCountryIfNeeded",value:function(){this.state.country&&!this.isCountryCallingCodeAmbiguous()||this.determineTheCountry()}},{key:"getFullNumber",value:function(t){var e=this;if(this.isInternational()){var r=this.state.callingCode;return function(t){return e.formatter.getInternationalPrefixBeforeCountryCallingCode(e.state,{spacing:!!t})+t}(r?t?"".concat(r," ").concat(t):r:"".concat(this.state.getDigitsWithoutInternationalPrefix()))}return t}},{key:"getNonFormattedNationalNumberWithPrefix",value:function(){var t=this.state,e=t.nationalSignificantNumber,r=t.complexPrefixBeforeNationalSignificantNumber,a=t.nationalPrefix,n=e,i=r||a;return i&&(n=i+n),n}},{key:"getNonFormattedNumber",value:function(){var t=this.state.nationalSignificantNumberMatchesInput;return this.getFullNumber(t?this.getNonFormattedNationalNumberWithPrefix():this.state.getNationalDigits())}},{key:"getNonFormattedTemplate",value:function(){var t=this.getNonFormattedNumber();if(t)return t.replace(/[\+\d]/g,p)}},{key:"isCountryCallingCodeAmbiguous",value:function(){var t=this.state.callingCode,e=this.metadata.getCountryCodesForCallingCode(t);return e&&e.length>1}},{key:"determineTheCountry",value:function(){this.state.setCountry((0,i.j)(this.isInternational()?this.state.callingCode:this.defaultCallingCode,{nationalNumber:this.state.nationalSignificantNumber,defaultCountry:this.defaultCountry,metadata:this.metadata}))}},{key:"getNumberValue",value:function(){var t=this.state,e=t.digits,r=t.callingCode,a=t.country,n=t.nationalSignificantNumber;if(e)return this.isInternational()?r?"+"+r+n:"+"+e:a||r?"+"+(a?this.metadata.countryCallingCode():r)+n:void 0}},{key:"getNumber",value:function(){var t=this.state,e=t.nationalSignificantNumber,r=t.carrierCode,a=t.callingCode,n=this._getCountry();if(e&&(n||a)){if(n&&n===this.defaultCountry){var o=new i.M(this.metadata.metadata);o.selectNumberingPlan(n);var s=o.numberingPlan.callingCode(),u=this.metadata.getCountryCodesForCallingCode(s);if(u.length>1){var l=(0,i.k)(e,{countries:u,defaultCountry:this.defaultCountry,metadata:this.metadata.metadata});l&&(n=l)}}var c=new i.l(n||a,e,this.metadata.metadata);return r&&(c.carrierCode=r),c}}},{key:"isPossible",value:function(){var t=this.getNumber();return!!t&&t.isPossible()}},{key:"isValid",value:function(){var t=this.getNumber();return!!t&&t.isValid()}},{key:"getNationalNumber",value:function(){return this.state.nationalSignificantNumber}},{key:"getChars",value:function(){return(this.state.international?"+":"")+this.state.digits}},{key:"getTemplate",value:function(){return this.formatter.getTemplate(this.state)||this.getNonFormattedTemplate()||""}}]),t}();function Q(t){return new i.M(t).getCountries()}function X(t){return J.call(this,t,i.o)}function Z(){return i.M.call(this,i.o)}X.prototype=Object.create(J.prototype,{}),X.prototype.constructor=X,Z.prototype=Object.create(i.M.prototype,{}),Z.prototype.constructor=Z;var tt={names:{BQ:"Bonaire, Sint Eustatius and Saba",MF:"Saint Martin (French part)",PN:"Pitcairn",UM:"United States Minor Outlying Islands",FK:"Falkland Islands (Malvinas)",CG:"Congo",CD:"Congo, Democratic Republic of the",MM:"Myanmar",MD:"Moldova, Republic of",KP:"Korea, Democratic People's Republic of",SH:"Saint Helena, Ascension and Tristan da Cunha",RU:"Russian Federation",VC:"Saint Vincent and the Grenadines",SX:"Sint Maarten (Dutch part)",KR:"Korea, Republic of",SY:"Syrian Arab Republic",VI:"Virgin Islands (U.S.)",US:"United States of America",VA:"Holy See",VN:"Viet Nam"},countries:{GS:"FK",AQ:"NF",BV:"NO",TF:"RE",HM:"AU",UM:"US",PN:"NZ"}};function et(t){return function(){return(0,i.w)(i.q,arguments)}(t)?t:t in tt.countries?tt.countries[t]:void console.error("Not a valid country: ".concat(t))}var rt=function(){function t(t){(0,a.r)(this,t),this.vaContact=(0,a.c)(this,"vaContact",7),this.DEFAULT_COUNTRY="US",this.COUNTRY_ERROR="Please choose a country",this.CONTACT_ERROR="phone number in a valid format, for example,",this.contact="",this.country=this.DEFAULT_COUNTRY,this.label="Home phone number",this.hint=void 0,this.error="",this.noCountry=!1,this.required=!1,this.showInternalErrors=!0,this.formattedContact="",this.countries=null,this.countryError="",this.contactError="",this.isValid=!1,this.touched=!1,this.visibleError=void 0}return t.prototype.syncErrorMessages=function(t){(null==t?void 0:t.includes(this.CONTACT_ERROR))?this.contactError=this.error:t===this.COUNTRY_ERROR?this.countryError=t:this.resetErrors()},t.prototype.resetErrors=function(){this.countryError="",this.contactError="",this.visibleError=this.error},t.prototype.setValidityState=function(){this.country&&this.contact?(this.isValid=function(){return(0,i.w)(h,arguments)}(this.contact,et(this.country)),this.formattedContact=this.formatContact(this.contact)):this.isValid=!1},t.prototype.updateContact=function(t){var e=t.target.value;this.contact=e,this.formattedContact=this.formatContact(e),this.validateContact(),this.handleEmit()},t.prototype.getPhoneNumberLengthString=function(t){if(!t.length)return"";for(var e=t.slice().sort(function(t,e){return t-e}),r=!0,a=1;a<e.length;a++)if(e[a]!==e[a-1]+1){r=!1;break}return r&&e.length>1?"".concat(e[0]," to ").concat(e[e.length-1]):1===e.length?String(e[0]):2===e.length&&e[1]===e[0]+1?"".concat(e[0]," to ").concat(e[1]):2===e.length?"".concat(e[0]," or ").concat(e[1]):"".concat(e.slice(0,-1).join(", ")," or ").concat(e[e.length-1])},t.prototype.getValidPhoneNumberLengths=function(){var t=et(this.country),e=new Z;e.selectNumberingPlan(t);var r=e.numberingPlan.possibleLengths();return this.getPhoneNumberLengthString(r)},t.prototype.getErrorMessageForCountry=function(){var t=et(this.country),e=this.getCountryName(t);return"Enter a valid ".concat(e," phone number. Use ").concat(this.getValidPhoneNumberLengths()," digits.")},t.prototype.validateContact=function(){this.country?(this.resetErrors(),this.setValidityState(),!this.isValid&&this.touched&&this.showInternalErrors&&(this.visibleError=this.getErrorMessageForCountry(),this.contactError=this.visibleError)):this.validateCountry()},t.prototype.handleEmit=function(){var t,e=!!this.contact&&!!this.country;try{t=e?function(){return(0,i.w)(s,arguments)}(this.contact,et(this.country)):null}catch(e){t=null}var r=null;this.isValid||(r=this.country?this.getErrorMessageForCountry():this.COUNTRY_ERROR),this.vaContact.emit({callingCode:e&&null!==t?t.countryCallingCode:void 0,countryCode:this.country,contact:e&&null!==t?t.nationalNumber:this.contact,isValid:this.isValid,error:r,touched:this.touched})},t.prototype.validateCountry=function(){this.resetErrors(),this.touched||(this.touched=!0),this.country||(this.isValid=!1,this.showInternalErrors&&(this.visibleError=this.COUNTRY_ERROR,this.countryError=this.visibleError))},t.prototype.countryChange=function(t){var e=t.detail.value;this.country=e,this.validateContact(),this.handleEmit()},t.prototype.formatContact=function(t){var e=new X(et(this.country)).input(t);return""===e?t:e},t.prototype.buildCountryList=function(){var t=this,e=function(){return(0,i.w)(Q,arguments)}().filter(function(e){return e!==t.DEFAULT_COUNTRY});e.push.apply(e,Object.keys(tt.countries));var r=e.sort(function(e,r){var a=t.getCountryName(e),n=t.getCountryName(r);return a.localeCompare(n)});return function(t,e,r){if(r||2===arguments.length)for(var a,n=0,i=e.length;n<i;n++)!a&&n in e||(a||(a=Array.prototype.slice.call(e,0,n)),a[n]=e[n]);return t.concat(a||Array.prototype.slice.call(e))}([this.DEFAULT_COUNTRY],r,!0)},t.prototype.getCountryName=function(t){return t in tt.names?tt.names[t]:new Intl.DisplayNames(["en"],{type:"region"}).of(t.toUpperCase()).replace(/&/g,"and").replace(/St\./,"Saint")},t.prototype.componentWillLoad=function(){this.countries=this.buildCountryList(),""===this.country&&(this.country=this.DEFAULT_COUNTRY),this.visibleError=this.error},t.prototype.componentDidLoad=function(){this.contact&&(this.formattedContact=this.formatContact(this.contact),this.validateContact());var t=this.el.shadowRoot.querySelector("va-combo-box");t&&t.addEventListener("vaSelect",this.countryChange.bind(this)),this.handleEmit()},t.prototype.disconnectedCallback=function(){var t=this.el.shadowRoot.querySelector("va-combo-box");t&&t.removeEventListener("vaSelect",this.countryChange.bind(this))},t.prototype.getOptionText=function(t){var e=et(t);return t?"".concat(this.getCountryName(t)," +").concat(function(){return(0,i.w)(i.r,arguments)}(e)):""},t.prototype.handleBlur=function(){this.formattedContact&&(this.touched||(this.touched=!0),this.validateContact(),this.handleEmit())},t.prototype.render=function(){var t=this,e=this,r=e.label,i=e.hint,s=e.countries,u=e.formattedContact,l=e.country,c=e.countryError,h=e.contactError,f=e.visibleError,d=e.noCountry,m=e.required,p=(0,n.c)({"va-form-group--error":!!f}),g=(0,n.c)({"usa-legend":!0,"usa-label--error":!!f});return(0,a.h)(a.H,{key:"30c58ccd3a0a29ee8b4c80209929198c2b902fc1",class:p},(0,a.h)("div",{key:"085f920a5395325f2142ad36184260620cf202fd",class:"input-wrap"},(0,a.h)("fieldset",{key:"2338b3583bee3a552fc3349e8864873f42952d0b",class:"usa-form usa-fieldset"},(0,a.h)("legend",{key:"de557398810d58a7c31a50b8d6102d57d0ad6d6d",class:g},r,m&&(0,a.h)("span",{key:"3611c2cffbe77a39fef206f9308c102127bbe1ec",class:"usa-label--required"}," ",o.i.t("required")),i&&(0,a.h)("div",{key:"3896b51c27b82dd499c3d93e770670cfcd27bd7a",class:"usa-hint"},i)),(0,a.h)("span",{key:"3d815e15b2b68736ee130453ac99c79c5e7c06e5",id:"error-message",role:"alert"},f&&f),(0,a.h)("div",{key:"30a6b606145ab4ca25ebac1f2746cd3022e2a73d",class:"va-input-telephone-wrapper",tabIndex:0},!d&&(0,a.h)("va-combo-box",{key:"890cfb3374496e071d40a0b2b8f842619a30e1c8",label:"Country code",name:"country-codes","show-input-error":"false",error:c,value:l},s.map(function(e){return(0,a.h)("option",{value:e,key:e},t.getOptionText(e))})),(0,a.h)("va-text-input",{key:"f4fd276d7350dac17cdd3a985f87d6a97fc3faa9",label:"Phone number",type:"tel",autocomplete:"tel",inputmode:"tel",value:u,"show-input-error":"false",required:m,hideRequiredText:!0,error:h,onInput:function(e){return t.updateContact(e)},onBlur:function(){return t.handleBlur()}})))))},Object.defineProperty(t.prototype,"el",{get:function(){return(0,a.g)(this)},enumerable:!1,configurable:!0}),Object.defineProperty(t,"watchers",{get:function(){return{error:["syncErrorMessages"]}},enumerable:!1,configurable:!0}),t}();rt.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}.usa-hint,.usa-fieldset{font-family:Source Sans Pro Web, "Source Sans Pro", "Helvetica Neue", Helvetica, Arial, sans;font-size:1.06rem;line-height:1.3}.usa-sr-only{position:absolute;left:-999em;right:auto}.usa-form{font-family:Source Sans Pro Web, "Source Sans Pro", "Helvetica Neue", Helvetica, Arial, sans;font-size:1.06rem;line-height:1.3}@media all and (min-width: 30em){.usa-form{max-width:20rem}}.usa-form abbr[title=required]{text-decoration:none}.usa-form .usa-input,.usa-form .usa-range,.usa-form .usa-select,.usa-form .usa-textarea{max-width:none}.usa-form .usa-input--2xs,.usa-form .usa-input-group--2xs{max-width:5ex}.usa-form .usa-input--xs,.usa-form .usa-input-group--xs{max-width:9ex}.usa-form .usa-input--sm,.usa-form .usa-input--small,.usa-form .usa-input-group--sm,.usa-form .usa-input-group--small{max-width:13ex}.usa-form .usa-input--md,.usa-form .usa-input--medium,.usa-form .usa-input-group--md,.usa-form .usa-input-group--medium{max-width:20ex}.usa-form .usa-input--lg,.usa-form .usa-input-group--lg{max-width:30ex}.usa-form .usa-input--xl,.usa-form .usa-input-group--xl{max-width:40ex}.usa-form .usa-input--2xl,.usa-form .usa-input-group--2xl{max-width:50ex}.usa-form .usa-button{margin-top:0.5rem}@media all and (min-width: 30em){.usa-form .usa-button{margin-top:1.5rem}}.usa-form a:where(:not(.usa-button)){color:#005ea2;text-decoration:underline}.usa-form a:where(:not(.usa-button)):visited{color:#54278f}.usa-form a:where(:not(.usa-button)):hover{color:#1a4480}.usa-form a:where(:not(.usa-button)):active{color:#162e51}.usa-form a:where(:not(.usa-button)):focus{outline:0.25rem solid #2491ff;outline-offset:0rem}@media all and (min-width: 30em){.usa-form--large{max-width:30rem}}.usa-show-password{color:#005ea2;text-decoration:underline;background-color:transparent;border:0;border-radius:0;-webkit-box-shadow:none;box-shadow:none;font-weight:normal;-ms-flex-pack:normal;justify-content:normal;text-align:left;margin:0;padding:0;width:auto;cursor:pointer}.usa-show-password:visited{color:#54278f}.usa-show-password:hover{color:#1a4480}.usa-show-password:active{color:#162e51}.usa-show-password:focus{outline:0.25rem solid #2491ff;outline-offset:0rem}.usa-show-password:hover,.usa-show-password.usa-button--hover,.usa-show-password:disabled:hover,.usa-show-password[aria-disabled=true]:hover,.usa-show-password:disabled.usa-button--hover,.usa-show-password[aria-disabled=true].usa-button--hover,.usa-show-password:active,.usa-show-password.usa-button--active,.usa-show-password:disabled:active,.usa-show-password[aria-disabled=true]:active,.usa-show-password:disabled.usa-button--active,.usa-show-password[aria-disabled=true].usa-button--active,.usa-show-password:disabled:focus,.usa-show-password[aria-disabled=true]:focus,.usa-show-password:disabled.usa-focus,.usa-show-password[aria-disabled=true].usa-focus,.usa-show-password:disabled,.usa-show-password[aria-disabled=true],.usa-show-password.usa-button--disabled{background-color:transparent;-webkit-box-shadow:none;box-shadow:none;text-decoration:underline}.usa-show-password.usa-button--hover{color:#1a4480}.usa-show-password.usa-button--active{color:#162e51}.usa-show-password:disabled,.usa-show-password[aria-disabled=true],.usa-show-password:disabled:hover,.usa-show-password[aria-disabled=true]:hover,.usa-show-password[aria-disabled=true]:focus{color:#757575}@media (forced-colors: active){.usa-show-password:disabled,.usa-show-password[aria-disabled=true],.usa-show-password:disabled:hover,.usa-show-password[aria-disabled=true]:hover,.usa-show-password[aria-disabled=true]:focus{color:GrayText}}.usa-form__note,.usa-show-password{font-family:Source Sans Pro Web, "Source Sans Pro", "Helvetica Neue", Helvetica, Arial, sans;font-size:0.93rem;line-height:1.3;float:right;margin:0.25rem 0 1rem}.usa-fieldset{border:none;margin:0;padding:0}.usa-legend{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-legend--large{font-size:2.13rem;font-weight:700;margin-top:1rem}.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-form-group{margin-top:1.5rem}.usa-form-group .usa-label:first-child{margin-top:0}.usa-form-group--error{border-left-width:0.25rem;border-left-color:#b50909;border-left-style:solid;padding-left:1rem;position:relative}@media all and (min-width: 64em){.usa-form-group--error{margin-left:-1.25rem}}.usa-error-message{padding-bottom:0.25rem;padding-top:0.25rem;color:#b50909;display:block;font-weight:700}#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}}:host{display:block;margin-top:24px}va-text-input::part(label),va-combo-box::part(label){margin-top:0}div.input-wrap{max-width:var(--mobile-lg) !important}fieldset{max-width:var(--mobile-lg) !important;container-name:component-wrapper;container-type:inline-size}va-combo-box{-ms-flex:1;flex:1;min-width:216px}va-text-input{width:20ch}.va-input-telephone-wrapper{display:-ms-flexbox;display:flex;-ms-flex-align:start;align-items:flex-start;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:8px;margin-top:8px;width:100%;max-width:var(--mobile-lg)}@media (max-width: 480px){va-combo-box,va-text-input{width:100%;max-width:100% !important;margin-top:16px;-ms-flex:0;flex:0}.va-input-telephone-wrapper{display:block}}'}}]);
@@ -1,2 +1,2 @@
1
1
  /*! For license information please see 9800.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([[9800,4164,3126],{4164:function(e,r,t){t.r(r),t.d(r,{c:function(){return s}});var a,o={exports:{}};a=o,function(){var e={}.hasOwnProperty;function r(){for(var t=[],a=0;a<arguments.length;a++){var o=arguments[a];if(o){var s=typeof o;if("string"===s||"number"===s)t.push(o);else if(Array.isArray(o)){if(o.length){var i=r.apply(null,o);i&&t.push(i)}}else if("object"===s)if(o.toString===Object.prototype.toString)for(var n in o)e.call(o,n)&&o[n]&&t.push(n);else t.push(o.toString())}}return t.join(" ")}a.exports?(r.default=r,a.exports=r):window.classNames=r}();var s=o.exports},3126:function(e,r,t){function a(e){return!Number.isNaN(parseFloat(e))}function o(e,r,t){void 0===t&&(t="slot");var a=e.shadowRoot.querySelector(t).assignedNodes();return null!==r?Array.from(a).filter(function(e){return e.nodeName.toLowerCase()===r}):Array.from(a)}function s(e){return 1===e?"":"s"}function i(e,r){if(void 0===e||""===e)return"".concat(r," character").concat(s(r)," allowed");var t;if(e.length<=r){var a=r-e.length;t="".concat(a," character").concat(s(a)," left")}else a=e.length-r,t="".concat(a," character").concat(s(a)," over limit");return t}function n(e,r){return Array.from({length:r-e+1},function(r,t){return e+t})}t.r(r),t.d(r,{S:function(){return d},a:function(){return o},b:function(){return a},c:function(){return b},d:function(){return p},e:function(){return g},f:function(){return i},g:function(){return f},h:function(){return h},i:function(){return c},m:function(){return n},s:function(){return l},u:function(){return w}}),t(2625);var u=function(e){return e&&"object"==typeof e&&1===e.nodeType};function l(e,r){var t=function(e,r){if("string"!=typeof e)return[];if(!r||!u(r))return[];var t=r.shadowRoot.querySelectorAll(e);return Array.from(t)}(e,r);return"string"!=typeof e||u(r)&&r.matches(e)&&t.push(r),t}var d={_entity:/[&<>"'/]/g,_entities:{"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&apos;","/":"&#x2F;"},getEntity:function(e){return d._entities[e]},escapeHTML:function(e){for(var r="",t=0;t<e.length;t++)r+=e[t],t+1<arguments.length&&(r+=String(arguments[t+1]||"").replace(d._entity,d.getEntity));return r}};function f(e){var r;return(r="string"==typeof e?parseInt(e,10):Math.floor(e))>=1&&r<=6?"h".concat(r):null}function h(e){return["VA-BUTTON","VA-LINK","BUTTON","A"].includes(e.tagName)}function c(e){return e&&"false"!==e||!1}function m(e){return"[object Arguments]"===Object.prototype.toString.call(e)}function p(e,r){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];if(e===r)return!0;if("function"==typeof e||"function"==typeof r)return!0;if("object"!=typeof e||"object"!=typeof r)return!1;if(null===e||null===r)return!1;if(e instanceof Date&&r instanceof Date)return e.getTime()===r.getTime();if(e instanceof RegExp&&r instanceof RegExp)return e.source===r.source&&e.global===r.global&&e.multiline===r.multiline&&e.lastIndex===r.lastIndex&&e.ignoreCase===r.ignoreCase;if(m(e)||m(r)){if(!m(e)||!m(r))return!1;var o=Array.prototype.slice;return p(o.call(e),o.call(r),t,a)}if(e.constructor!==r.constructor)return!1;var s=Object.keys(e),i=Object.keys(r);if(0===s.length&&0===i.length)return!0;if(s.length!==i.length)return!1;for(var n=t.length;n--;)if(t[n]===e)return a[n]===r;t.push(e),a.push(r),s.sort(),i.sort();for(var u=s.length-1;u>=0;u--)if(s[u]!==i[u])return!1;for(var l=void 0,d=s.length-1;d>=0;d--)if(!p(e[l=s[d]],r[l],t,a))return!1;return t.pop(),a.pop(),!0}function b(e,r){var t;return function(){for(var a=this,o=[],s=0;s<arguments.length;s++)o[s]=arguments[s];clearTimeout(t),t=setTimeout(function(){return e.apply(a,o)},r)}}function g(e){if(null!=e){var r="string"==typeof e?parseInt(e,10):e;if(!(r<=0||isNaN(r)))return r}}function w(e,r,t){e&&(e.innerText=i(r,g(t)))}},9800:function(e,r,t){t.r(r),t.d(r,{va_radio:function(){return n}});var a=t(2625),o=t(4164),s=t(3126),i=(t(2404),t(2265)),n=function(){function e(e){(0,a.r)(this,e),this.componentLibraryAnalytics=(0,a.c)(this,"component-library-analytics",7),this.vaValueChange=(0,a.c)(this,"vaValueChange",7),this.label=void 0,this.hint=void 0,this.required=!1,this.error=void 0,this.enableAnalytics=!1,this.labelHeaderLevel=void 0,this.headerAriaDescribedby=void 0,this.messageAriaDescribedby=void 0,this.useFormsPattern=void 0,this.formHeadingLevel=3,this.formHeading=void 0}return e.prototype.handleKeyDown=function(e){var r=e.target,t=(0,s.a)(this.el,"va-radio-option").filter(function(e){return!e.disabled});if(t.length){var a=t.findIndex(function(e){return e===r});if(-1!==a){var o;switch(e.key){case" ":if(e.preventDefault(),r.checked)return;o=r,this.selectNextNode(r);break;case"ArrowDown":case"ArrowRight":e.preventDefault(),a===t.length-1?(o=t[0],this.deselectCurrentNode(r),this.selectNextNode(o)):(o=t[a+1],this.deselectCurrentNode(r),this.selectNextNode(o));break;case"ArrowUp":case"ArrowLeft":e.preventDefault(),0===a?(o=t[t.length-1],this.deselectCurrentNode(r),this.selectNextNode(o)):(o=t[a-1],this.deselectCurrentNode(r),this.selectNextNode(o))}o&&(this.enableAnalytics&&this.fireAnalyticsEvent(o.label),this.vaValueChange.emit({value:o.value}))}}},e.prototype.radioOptionSelectedHandler=function(e){var r=this,t=e.target;(0,s.a)(this.el,"va-radio-option").filter(function(e){return e!==t}).forEach(function(e){r.deselectCurrentNode(e)}),this.selectNextNode(t),this.enableAnalytics&&this.fireAnalyticsEvent(t.label),this.vaValueChange.emit({value:t.value})},e.prototype.fireAnalyticsEvent=function(e){this.componentLibraryAnalytics.emit({componentName:"va-radio",action:"change",details:{label:this.label,optionLabel:e,required:this.required}})},e.prototype.deselectCurrentNode=function(e){e.removeAttribute("checked")},e.prototype.selectNextNode=function(e){e.setAttribute("checked",""),e.focus()},e.prototype.getHeaderLevel=function(){var e=parseInt(this.labelHeaderLevel,10);return e>=1&&e<=6?"h".concat(e):null},e.prototype.connectedCallback=function(){var e=this;i.i.on("languageChanged",function(){(0,a.f)(e.el)})},e.prototype.disconnectedCallback=function(){i.i.off("languageChanged")},e.prototype.render=function(){var e=this,r=e.label,t=e.hint,n=e.required,u=e.error,l=e.headerAriaDescribedby,d=e.messageAriaDescribedby,f=e.useFormsPattern,h=e.formHeadingLevel,c=e.formHeading,m=this.getHeaderLevel(),p=l?"header-message":null,b=d?"description-message":null,g="".concat(f&&c?"form-question":""," ").concat(f?"form-description":""," ").concat("multiple"===f?"header-message":"").trim()||null,w=(0,o.c)({"usa-legend":!0,"usa-label--error":u}),v=null;if("single"===f||"multiple"===f){var y=(0,s.g)(h);v=(0,a.h)(a.F,{key:"f025abdb5234cac6d9b2a02a57a38b686f94945b"},c&&(0,a.h)(y,{key:"4516071a92a8a88e98ee9500b0eb065fdfa8d6bf",id:"form-question",part:"form-header"},c),(0,a.h)("div",{key:"975b9d201b74fd283468f2a328e32da7a64c0d02",id:"form-description"},(0,a.h)("slot",{key:"3302c53cd49400fa146731305d191e3ee92fceb0",name:"form-description"})))}return(0,a.h)(a.H,{key:"63f8d260f404be5740cbf938c5c9350ba670c549","aria-invalid":u?"true":"false"},v,(0,a.h)("div",{key:"5e72f458a043c43b0ddb8c839f32cd97bc044d54",class:"input-wrap"},(0,a.h)("fieldset",{key:"1250a4a98a532dbb517229d958ee828d626e58d8",class:"usa-fieldset","aria-labelledby":g},(0,a.h)("legend",{key:"5d4a617266e82473d715d68d95533f6238e69498",class:w,part:"legend","aria-describedby":b},m?(0,a.h)(m,{part:"header","aria-describedby":p},r):r," ","multiple"===f&&(0,a.h)("span",{key:"ee8491414999acc609c12ca9d4cb17009827026a",id:"header-message",class:"usa-sr-only"},r),l&&(0,a.h)("span",{key:"0c478442e3152a092a9046331aecab3bd5c0bba0",id:"header-message",class:"usa-sr-only"},l),(0,s.i)(d)&&(0,a.h)("span",{key:"5f63abaa25eca30897b9bfa8428196e4de7c7101",id:"description-message",class:"usa-sr-only"},d),n&&(0,a.h)("span",{key:"0cea030063b3683926dd79517016af5160b71ca0",class:"usa-label--required",part:"required"},i.i.t("required")),t&&(0,a.h)("div",{key:"76c4198fd908b6fc51bb0a82d24313e95b58880e",class:"usa-hint"},t)),(0,a.h)("span",{key:"8ceead1cd421ae884bd4030e780cdc23a0c35ab5",id:"radio-error-message",role:"alert"},u&&(0,a.h)(a.F,{key:"390cc205eb90bd630c857ce51e9c2f82b432addb"},(0,a.h)("span",{key:"0aa27a3397bf724108dd41b669a5879cd40383b7",class:"usa-sr-only"},i.i.t("error")),(0,a.h)("span",{key:"954c66a657bfe883a13d6cf72a9cce62d8d682f3",class:"usa-error-message"},u))),(0,a.h)("slot",{key:"dad28b6b7579baff9593d432f191c85969c421ac"}))))},Object.defineProperty(e.prototype,"el",{get:function(){return(0,a.g)(this)},enumerable:!1,configurable:!0}),e}();n.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}.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}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-fieldset{font-family:Source Sans Pro Web, "Source Sans Pro", "Helvetica Neue", Helvetica, Arial, sans;font-size:1.06rem;line-height:1.3}.usa-sr-only{position:absolute;left:-999em;right:auto}.usa-form{font-family:Source Sans Pro Web, "Source Sans Pro", "Helvetica Neue", Helvetica, Arial, sans;font-size:1.06rem;line-height:1.3}@media all and (min-width: 30em){.usa-form{max-width:20rem}}.usa-form abbr[title=required]{text-decoration:none}.usa-form .usa-input,.usa-form .usa-range,.usa-form .usa-select,.usa-form .usa-textarea{max-width:none}.usa-form .usa-input--2xs,.usa-form .usa-input-group--2xs{max-width:5ex}.usa-form .usa-input--xs,.usa-form .usa-input-group--xs{max-width:9ex}.usa-form .usa-input--sm,.usa-form .usa-input--small,.usa-form .usa-input-group--sm,.usa-form .usa-input-group--small{max-width:13ex}.usa-form .usa-input--md,.usa-form .usa-input--medium,.usa-form .usa-input-group--md,.usa-form .usa-input-group--medium{max-width:20ex}.usa-form .usa-input--lg,.usa-form .usa-input-group--lg{max-width:30ex}.usa-form .usa-input--xl,.usa-form .usa-input-group--xl{max-width:40ex}.usa-form .usa-input--2xl,.usa-form .usa-input-group--2xl{max-width:50ex}.usa-form .usa-button{margin-top:0.5rem}@media all and (min-width: 30em){.usa-form .usa-button{margin-top:1.5rem}}.usa-form a:where(:not(.usa-button)){color:#005ea2;text-decoration:underline}.usa-form a:where(:not(.usa-button)):visited{color:#54278f}.usa-form a:where(:not(.usa-button)):hover{color:#1a4480}.usa-form a:where(:not(.usa-button)):active{color:#162e51}.usa-form a:where(:not(.usa-button)):focus{outline:0.25rem solid #2491ff;outline-offset:0rem}@media all and (min-width: 30em){.usa-form--large{max-width:30rem}}.usa-show-password{color:#005ea2;text-decoration:underline;background-color:transparent;border:0;border-radius:0;-webkit-box-shadow:none;box-shadow:none;font-weight:normal;-ms-flex-pack:normal;justify-content:normal;text-align:left;margin:0;padding:0;width:auto;cursor:pointer}.usa-show-password:visited{color:#54278f}.usa-show-password:hover{color:#1a4480}.usa-show-password:active{color:#162e51}.usa-show-password:focus{outline:0.25rem solid #2491ff;outline-offset:0rem}.usa-show-password:hover,.usa-show-password.usa-button--hover,.usa-show-password:disabled:hover,.usa-show-password[aria-disabled=true]:hover,.usa-show-password:disabled.usa-button--hover,.usa-show-password[aria-disabled=true].usa-button--hover,.usa-show-password:active,.usa-show-password.usa-button--active,.usa-show-password:disabled:active,.usa-show-password[aria-disabled=true]:active,.usa-show-password:disabled.usa-button--active,.usa-show-password[aria-disabled=true].usa-button--active,.usa-show-password:disabled:focus,.usa-show-password[aria-disabled=true]:focus,.usa-show-password:disabled.usa-focus,.usa-show-password[aria-disabled=true].usa-focus,.usa-show-password:disabled,.usa-show-password[aria-disabled=true],.usa-show-password.usa-button--disabled{background-color:transparent;-webkit-box-shadow:none;box-shadow:none;text-decoration:underline}.usa-show-password.usa-button--hover{color:#1a4480}.usa-show-password.usa-button--active{color:#162e51}.usa-show-password:disabled,.usa-show-password[aria-disabled=true],.usa-show-password:disabled:hover,.usa-show-password[aria-disabled=true]:hover,.usa-show-password[aria-disabled=true]:focus{color:#757575}@media (forced-colors: active){.usa-show-password:disabled,.usa-show-password[aria-disabled=true],.usa-show-password:disabled:hover,.usa-show-password[aria-disabled=true]:hover,.usa-show-password[aria-disabled=true]:focus{color:GrayText}}.usa-form__note,.usa-show-password{font-family:Source Sans Pro Web, "Source Sans Pro", "Helvetica Neue", Helvetica, Arial, sans;font-size:0.93rem;line-height:1.3;float:right;margin:0.25rem 0 1rem}.usa-fieldset{border:none;margin:0;padding:0}.usa-legend{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-legend--large{font-size:2.13rem;font-weight:700;margin-top:1rem}.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-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}}:host{display:block;border:none;padding:0;margin-top:24px;max-width:480px}:host .usa-hint{font-weight:normal}'}}]);
2
+ "use strict";(self.webpackChunk_department_of_veterans_affairs_component_library=self.webpackChunk_department_of_veterans_affairs_component_library||[]).push([[9800,4164,9176],{4164:function(e,r,t){t.r(r),t.d(r,{c:function(){return s}});var a,o={exports:{}};a=o,function(){var e={}.hasOwnProperty;function r(){for(var t=[],a=0;a<arguments.length;a++){var o=arguments[a];if(o){var s=typeof o;if("string"===s||"number"===s)t.push(o);else if(Array.isArray(o)){if(o.length){var i=r.apply(null,o);i&&t.push(i)}}else if("object"===s)if(o.toString===Object.prototype.toString)for(var n in o)e.call(o,n)&&o[n]&&t.push(n);else t.push(o.toString())}}return t.join(" ")}a.exports?(r.default=r,a.exports=r):window.classNames=r}();var s=o.exports},9176:function(e,r,t){function a(e){return!Number.isNaN(parseFloat(e))}function o(e,r,t){void 0===t&&(t="slot");var a=e.shadowRoot.querySelector(t).assignedNodes();return null!==r?Array.from(a).filter(function(e){return e.nodeName.toLowerCase()===r}):Array.from(a)}function s(e){return 1===e?"":"s"}function i(e,r){if(void 0===e||""===e)return"".concat(r," character").concat(s(r)," allowed");var t;if(e.length<=r){var a=r-e.length;t="".concat(a," character").concat(s(a)," left")}else a=e.length-r,t="".concat(a," character").concat(s(a)," over limit");return t}function n(e,r){return Array.from({length:r-e+1},function(r,t){return e+t})}t.r(r),t.d(r,{S:function(){return f},a:function(){return o},b:function(){return a},c:function(){return b},d:function(){return p},e:function(){return g},f:function(){return i},g:function(){return d},h:function(){return h},i:function(){return c},m:function(){return n},s:function(){return l},u:function(){return w}}),t(9213);var u=function(e){return e&&"object"==typeof e&&1===e.nodeType};function l(e,r){var t=function(e,r){if("string"!=typeof e)return[];if(!r||!u(r))return[];var t=r.shadowRoot.querySelectorAll(e);return Array.from(t)}(e,r);return"string"!=typeof e||u(r)&&r.matches(e)&&t.push(r),t}var f={_entity:/[&<>"'/]/g,_entities:{"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&apos;","/":"&#x2F;"},getEntity:function(e){return f._entities[e]},escapeHTML:function(e){for(var r="",t=0;t<e.length;t++)r+=e[t],t+1<arguments.length&&(r+=String(arguments[t+1]||"").replace(f._entity,f.getEntity));return r}};function d(e){var r;return(r="string"==typeof e?parseInt(e,10):Math.floor(e))>=1&&r<=6?"h".concat(r):null}function h(e){return["VA-BUTTON","VA-LINK","BUTTON","A"].includes(e.tagName)}function c(e){return e&&"false"!==e||!1}function m(e){return"[object Arguments]"===Object.prototype.toString.call(e)}function p(e,r){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];if(e===r)return!0;if("function"==typeof e||"function"==typeof r)return!0;if("object"!=typeof e||"object"!=typeof r)return!1;if(null===e||null===r)return!1;if(e instanceof Date&&r instanceof Date)return e.getTime()===r.getTime();if(e instanceof RegExp&&r instanceof RegExp)return e.source===r.source&&e.global===r.global&&e.multiline===r.multiline&&e.lastIndex===r.lastIndex&&e.ignoreCase===r.ignoreCase;if(m(e)||m(r)){if(!m(e)||!m(r))return!1;var o=Array.prototype.slice;return p(o.call(e),o.call(r),t,a)}if(e.constructor!==r.constructor)return!1;var s=Object.keys(e),i=Object.keys(r);if(0===s.length&&0===i.length)return!0;if(s.length!==i.length)return!1;for(var n=t.length;n--;)if(t[n]===e)return a[n]===r;t.push(e),a.push(r),s.sort(),i.sort();for(var u=s.length-1;u>=0;u--)if(s[u]!==i[u])return!1;for(var l=void 0,f=s.length-1;f>=0;f--)if(!p(e[l=s[f]],r[l],t,a))return!1;return t.pop(),a.pop(),!0}function b(e,r){var t;return function(){for(var a=this,o=[],s=0;s<arguments.length;s++)o[s]=arguments[s];clearTimeout(t),t=setTimeout(function(){return e.apply(a,o)},r)}}function g(e){if(null!=e){var r="string"==typeof e?parseInt(e,10):e;if(!(r<=0||isNaN(r)))return r}}function w(e,r,t){e&&(e.innerText=i(r,g(t)))}},9800:function(e,r,t){t.r(r),t.d(r,{va_radio:function(){return n}});var a=t(9213),o=t(4164),s=t(9176),i=(t(2404),t(2265)),n=function(){function e(e){(0,a.r)(this,e),this.componentLibraryAnalytics=(0,a.c)(this,"component-library-analytics",7),this.vaValueChange=(0,a.c)(this,"vaValueChange",7),this.label=void 0,this.hint=void 0,this.required=!1,this.error=void 0,this.enableAnalytics=!1,this.labelHeaderLevel=void 0,this.headerAriaDescribedby=void 0,this.messageAriaDescribedby=void 0,this.useFormsPattern=void 0,this.formHeadingLevel=3,this.formHeading=void 0}return e.prototype.handleKeyDown=function(e){var r=e.target,t=(0,s.a)(this.el,"va-radio-option").filter(function(e){return!e.disabled});if(t.length){var a=t.findIndex(function(e){return e===r});if(-1!==a){var o;switch(e.key){case" ":if(e.preventDefault(),r.checked)return;o=r,this.selectNextNode(r);break;case"ArrowDown":case"ArrowRight":e.preventDefault(),a===t.length-1?(o=t[0],this.deselectCurrentNode(r),this.selectNextNode(o)):(o=t[a+1],this.deselectCurrentNode(r),this.selectNextNode(o));break;case"ArrowUp":case"ArrowLeft":e.preventDefault(),0===a?(o=t[t.length-1],this.deselectCurrentNode(r),this.selectNextNode(o)):(o=t[a-1],this.deselectCurrentNode(r),this.selectNextNode(o))}o&&(this.enableAnalytics&&this.fireAnalyticsEvent(o.label),this.vaValueChange.emit({value:o.value}))}}},e.prototype.radioOptionSelectedHandler=function(e){var r=this,t=e.target;(0,s.a)(this.el,"va-radio-option").filter(function(e){return e!==t}).forEach(function(e){r.deselectCurrentNode(e)}),this.selectNextNode(t),this.enableAnalytics&&this.fireAnalyticsEvent(t.label),this.vaValueChange.emit({value:t.value})},e.prototype.fireAnalyticsEvent=function(e){this.componentLibraryAnalytics.emit({componentName:"va-radio",action:"change",details:{label:this.label,optionLabel:e,required:this.required}})},e.prototype.deselectCurrentNode=function(e){e.removeAttribute("checked")},e.prototype.selectNextNode=function(e){e.setAttribute("checked",""),e.focus()},e.prototype.getHeaderLevel=function(){var e=parseInt(this.labelHeaderLevel,10);return e>=1&&e<=6?"h".concat(e):null},e.prototype.connectedCallback=function(){var e=this;i.i.on("languageChanged",function(){(0,a.f)(e.el)})},e.prototype.disconnectedCallback=function(){i.i.off("languageChanged")},e.prototype.render=function(){var e=this,r=e.label,t=e.hint,n=e.required,u=e.error,l=e.headerAriaDescribedby,f=e.messageAriaDescribedby,d=e.useFormsPattern,h=e.formHeadingLevel,c=e.formHeading,m=this.getHeaderLevel(),p=l?"header-message":null,b=f?"description-message":null,g="".concat(d&&c?"form-question":""," ").concat(d?"form-description":""," ").concat("multiple"===d?"header-message":"").trim()||null,w=(0,o.c)({"usa-legend":!0,"usa-label--error":u}),v=null;if("single"===d||"multiple"===d){var y=(0,s.g)(h);v=(0,a.h)(a.F,{key:"c810ba2bfce986c9b86c4b698207bcb029f3d1a9"},c&&(0,a.h)(y,{key:"7b8460878d9929b0fbb8a0594bd383984b0d53ed",id:"form-question",part:"form-header"},c),(0,a.h)("div",{key:"63f02faea68b19a12f83c3749aeaeb88af8cbd16",id:"form-description"},(0,a.h)("slot",{key:"a75c157fa22178783040f4c9ce73bc0ed0f88f35",name:"form-description"})))}return(0,a.h)(a.H,{key:"da12c2300ef0cef7f29f4fdf2e2f39ecd7e23ded","aria-invalid":u?"true":"false"},v,(0,a.h)("div",{key:"7daee5a36f4f10d60927494e905a26a8ae3ddcac",class:"input-wrap"},(0,a.h)("fieldset",{key:"1d2f0078a458b678f82538c499a7481452912001",class:"usa-fieldset","aria-labelledby":g},(0,a.h)("legend",{key:"a58d46e06246a96182dbe8424f8714df51aedc9b",class:w,part:"legend","aria-describedby":b},m?(0,a.h)(m,{part:"header","aria-describedby":p},r):r," ","multiple"===d&&(0,a.h)("span",{key:"7a2b4268c47f4047e832d83661888011c897f297",id:"header-message",class:"usa-sr-only"},r),l&&(0,a.h)("span",{key:"a0696129db1de773d26f72164afa60432be2e58b",id:"header-message",class:"usa-sr-only"},l),(0,s.i)(f)&&(0,a.h)("span",{key:"31f71a88603dc5eebebd0815fdf27f4dd7d5958f",id:"description-message",class:"usa-sr-only"},f),n&&(0,a.h)("span",{key:"c85158c4987d0bd2f5a8f8dc9ed9c5b86354e1e9",class:"usa-label--required",part:"required"},i.i.t("required")),t&&(0,a.h)("div",{key:"9ae5138bcec9d25602b819a8465c3ba51d1ae040",class:"usa-hint"},t)),(0,a.h)("span",{key:"ded7e8c50a1ea3594b39bfbe9232bce8cb40ae30",id:"radio-error-message",role:"alert"},u&&(0,a.h)(a.F,{key:"e8da728cd73a7a770363cb740e6e9b1e2a63d74e"},(0,a.h)("span",{key:"6c9f877ee7922aec406f3f4b5a990b47a83f6d7b",class:"usa-sr-only"},i.i.t("error")),(0,a.h)("span",{key:"ea57506f6b60ed354614471147671842256cfcb9",class:"usa-error-message"},u))),(0,a.h)("slot",{key:"f7142cba11ce545fcd4660f758d3d9c9a9b4ca0c"}))))},Object.defineProperty(e.prototype,"el",{get:function(){return(0,a.g)(this)},enumerable:!1,configurable:!0}),e}();n.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}.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}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-fieldset{font-family:Source Sans Pro Web, "Source Sans Pro", "Helvetica Neue", Helvetica, Arial, sans;font-size:1.06rem;line-height:1.3}.usa-sr-only{position:absolute;left:-999em;right:auto}.usa-form{font-family:Source Sans Pro Web, "Source Sans Pro", "Helvetica Neue", Helvetica, Arial, sans;font-size:1.06rem;line-height:1.3}@media all and (min-width: 30em){.usa-form{max-width:20rem}}.usa-form abbr[title=required]{text-decoration:none}.usa-form .usa-input,.usa-form .usa-range,.usa-form .usa-select,.usa-form .usa-textarea{max-width:none}.usa-form .usa-input--2xs,.usa-form .usa-input-group--2xs{max-width:5ex}.usa-form .usa-input--xs,.usa-form .usa-input-group--xs{max-width:9ex}.usa-form .usa-input--sm,.usa-form .usa-input--small,.usa-form .usa-input-group--sm,.usa-form .usa-input-group--small{max-width:13ex}.usa-form .usa-input--md,.usa-form .usa-input--medium,.usa-form .usa-input-group--md,.usa-form .usa-input-group--medium{max-width:20ex}.usa-form .usa-input--lg,.usa-form .usa-input-group--lg{max-width:30ex}.usa-form .usa-input--xl,.usa-form .usa-input-group--xl{max-width:40ex}.usa-form .usa-input--2xl,.usa-form .usa-input-group--2xl{max-width:50ex}.usa-form .usa-button{margin-top:0.5rem}@media all and (min-width: 30em){.usa-form .usa-button{margin-top:1.5rem}}.usa-form a:where(:not(.usa-button)){color:#005ea2;text-decoration:underline}.usa-form a:where(:not(.usa-button)):visited{color:#54278f}.usa-form a:where(:not(.usa-button)):hover{color:#1a4480}.usa-form a:where(:not(.usa-button)):active{color:#162e51}.usa-form a:where(:not(.usa-button)):focus{outline:0.25rem solid #2491ff;outline-offset:0rem}@media all and (min-width: 30em){.usa-form--large{max-width:30rem}}.usa-show-password{color:#005ea2;text-decoration:underline;background-color:transparent;border:0;border-radius:0;-webkit-box-shadow:none;box-shadow:none;font-weight:normal;-ms-flex-pack:normal;justify-content:normal;text-align:left;margin:0;padding:0;width:auto;cursor:pointer}.usa-show-password:visited{color:#54278f}.usa-show-password:hover{color:#1a4480}.usa-show-password:active{color:#162e51}.usa-show-password:focus{outline:0.25rem solid #2491ff;outline-offset:0rem}.usa-show-password:hover,.usa-show-password.usa-button--hover,.usa-show-password:disabled:hover,.usa-show-password[aria-disabled=true]:hover,.usa-show-password:disabled.usa-button--hover,.usa-show-password[aria-disabled=true].usa-button--hover,.usa-show-password:active,.usa-show-password.usa-button--active,.usa-show-password:disabled:active,.usa-show-password[aria-disabled=true]:active,.usa-show-password:disabled.usa-button--active,.usa-show-password[aria-disabled=true].usa-button--active,.usa-show-password:disabled:focus,.usa-show-password[aria-disabled=true]:focus,.usa-show-password:disabled.usa-focus,.usa-show-password[aria-disabled=true].usa-focus,.usa-show-password:disabled,.usa-show-password[aria-disabled=true],.usa-show-password.usa-button--disabled{background-color:transparent;-webkit-box-shadow:none;box-shadow:none;text-decoration:underline}.usa-show-password.usa-button--hover{color:#1a4480}.usa-show-password.usa-button--active{color:#162e51}.usa-show-password:disabled,.usa-show-password[aria-disabled=true],.usa-show-password:disabled:hover,.usa-show-password[aria-disabled=true]:hover,.usa-show-password[aria-disabled=true]:focus{color:#757575}@media (forced-colors: active){.usa-show-password:disabled,.usa-show-password[aria-disabled=true],.usa-show-password:disabled:hover,.usa-show-password[aria-disabled=true]:hover,.usa-show-password[aria-disabled=true]:focus{color:GrayText}}.usa-form__note,.usa-show-password{font-family:Source Sans Pro Web, "Source Sans Pro", "Helvetica Neue", Helvetica, Arial, sans;font-size:0.93rem;line-height:1.3;float:right;margin:0.25rem 0 1rem}.usa-fieldset{border:none;margin:0;padding:0}.usa-legend{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-legend--large{font-size:2.13rem;font-weight:700;margin-top:1rem}.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-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}}:host{display:block;border:none;padding:0;margin-top:24px;max-width:480px}:host .usa-hint{font-weight:normal}'}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunk_department_of_veterans_affairs_component_library=self.webpackChunk_department_of_veterans_affairs_component_library||[]).push([[9915],{9915:function(e,t,r){r.r(t),r.d(t,{va_sidenav:function(){return a}});var n=r(2625),a=function(){function e(e){var t=this;(0,n.r)(this,e),this.isDesktop=window.innerWidth>=768,this.iconBackgroundColorStyle=function(){return{backgroundColor:"var(--".concat(t.iconBackgroundColor,")")}},this.ariaLabel="Related pages menu",this.header=void 0,this.iconName=void 0,this.iconBackgroundColor="vads-color-primary"}return e.prototype.handleResize=function(){this.isDesktop=window.innerWidth>=768,(0,n.f)(this)},e.prototype.setOnlyOneCurrentPage=function(){this.el.querySelectorAll("va-sidenav-item[current-page], va-sidenav-submenu[current-page]").forEach(function(e,t){t>0&&e.removeAttribute("current-page")})},e.prototype.setupCurrentPageObserver=function(){var e=this;this.mutationObserver=new MutationObserver(function(t){var r=t.filter(function(e){return"attributes"===e.type&&"current-page"===e.attributeName});if(r.length>0){var n=r.find(function(e){var t=e.target.getAttribute("current-page");return null!==t&&"false"!==t});if(n){var a=n.target;e.el.querySelectorAll("va-sidenav-item[current-page], va-sidenav-submenu[current-page]").forEach(function(e){e!==a&&e.removeAttribute("current-page")})}}}),this.mutationObserver.observe(this.el,{attributes:!0,attributeFilter:["current-page"],subtree:!0})},e.prototype.componentWillLoad=function(){this.setOnlyOneCurrentPage()},e.prototype.componentDidLoad=function(){this.setupCurrentPageObserver()},e.prototype.disconnectedCallback=function(){this.mutationObserver&&this.mutationObserver.disconnect()},e.prototype.render=function(){return this.isDesktop?(0,n.h)(n.H,null,(0,n.h)("nav",{"aria-label":this.ariaLabel},this.header&&(0,n.h)("span",{class:"va-sidenav__header"},this.iconName?(0,n.h)("span",{class:"va-sidenav__icon-background",style:this.iconBackgroundColorStyle()},(0,n.h)("va-icon",{icon:this.iconName})):null,this.header),(0,n.h)("div",{role:"list",class:"va-sidenav__list"},(0,n.h)("slot",null)))):(0,n.h)(n.H,null,(0,n.h)("va-accordion",{"open-single":!0},(0,n.h)("va-accordion-item",{bordered:!0,header:this.ariaLabel},(0,n.h)("nav",{"aria-label":this.ariaLabel},(0,n.h)("div",{role:"list",class:"va-sidenav__list"},(0,n.h)("slot",null))))))},Object.defineProperty(e.prototype,"el",{get:function(){return(0,n.g)(this)},enumerable:!1,configurable:!0}),e}();a.style=":host{display:block}.va-sidenav__list{margin-bottom:0;margin-top:0;list-style-type:none;padding-left:0;font-size:var(--vads-font-size-source-sans-normalized);line-height:var(--vads-font-line-height-2);border-top:1px solid var(--vads-color-base-lighter)}.va-sidenav__header{-ms-flex-align:center;align-items:center;color:var(--vads-color-base);display:-ms-flexbox;display:flex;font-family:var(--font-serif);font-size:var(--font-size-h4);font-weight:var(--font-weight-bold);margin-bottom:12px;margin-top:0}.va-sidenav__header .va-sidenav__icon-background{font-size:24px}.va-sidenav__icon-background{color:var(--vads-color-white);border-radius:50%;width:40px;height:40px;margin-right:8px;position:relative}.va-sidenav__icon-background va-icon{position:absolute;top:50%;left:50%;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%)}va-accordion-item::part(accordion-header){padding-left:1.4rem}"}}]);
1
+ "use strict";(self.webpackChunk_department_of_veterans_affairs_component_library=self.webpackChunk_department_of_veterans_affairs_component_library||[]).push([[9915],{9915:function(e,t,r){r.r(t),r.d(t,{va_sidenav:function(){return a}});var n=r(9213),a=function(){function e(e){var t=this;(0,n.r)(this,e),this.isDesktop=window.innerWidth>=768,this.iconBackgroundColorStyle=function(){return{backgroundColor:"var(--".concat(t.iconBackgroundColor,")")}},this.ariaLabel="Related pages menu",this.header=void 0,this.iconName=void 0,this.iconBackgroundColor="vads-color-primary"}return e.prototype.handleResize=function(){this.isDesktop=window.innerWidth>=768,(0,n.f)(this)},e.prototype.setOnlyOneCurrentPage=function(){this.el.querySelectorAll("va-sidenav-item[current-page], va-sidenav-submenu[current-page]").forEach(function(e,t){t>0&&e.removeAttribute("current-page")})},e.prototype.setupCurrentPageObserver=function(){var e=this;this.mutationObserver=new MutationObserver(function(t){var r=t.filter(function(e){return"attributes"===e.type&&"current-page"===e.attributeName});if(r.length>0){var n=r.find(function(e){var t=e.target.getAttribute("current-page");return null!==t&&"false"!==t});if(n){var a=n.target;e.el.querySelectorAll("va-sidenav-item[current-page], va-sidenav-submenu[current-page]").forEach(function(e){e!==a&&e.removeAttribute("current-page")})}}}),this.mutationObserver.observe(this.el,{attributes:!0,attributeFilter:["current-page"],subtree:!0})},e.prototype.componentWillLoad=function(){this.setOnlyOneCurrentPage()},e.prototype.componentDidLoad=function(){this.setupCurrentPageObserver()},e.prototype.disconnectedCallback=function(){this.mutationObserver&&this.mutationObserver.disconnect()},e.prototype.render=function(){return this.isDesktop?(0,n.h)(n.H,null,(0,n.h)("nav",{"aria-label":this.ariaLabel},this.header&&(0,n.h)("span",{class:"va-sidenav__header"},this.iconName?(0,n.h)("span",{class:"va-sidenav__icon-background",style:this.iconBackgroundColorStyle()},(0,n.h)("va-icon",{icon:this.iconName})):null,this.header),(0,n.h)("div",{role:"list",class:"va-sidenav__list"},(0,n.h)("slot",null)))):(0,n.h)(n.H,null,(0,n.h)("va-accordion",{"open-single":!0},(0,n.h)("va-accordion-item",{bordered:!0,header:this.ariaLabel},(0,n.h)("nav",{"aria-label":this.ariaLabel},(0,n.h)("div",{role:"list",class:"va-sidenav__list"},(0,n.h)("slot",null))))))},Object.defineProperty(e.prototype,"el",{get:function(){return(0,n.g)(this)},enumerable:!1,configurable:!0}),e}();a.style=":host{display:block}.va-sidenav__list{margin-bottom:0;margin-top:0;list-style-type:none;padding-left:0;font-size:var(--vads-font-size-source-sans-normalized);line-height:var(--vads-font-line-height-2);border-top:1px solid var(--vads-color-base-lighter)}.va-sidenav__header{-ms-flex-align:center;align-items:center;color:var(--vads-color-base);display:-ms-flexbox;display:flex;font-family:var(--font-serif);font-size:var(--font-size-h4);font-weight:var(--font-weight-bold);margin-bottom:12px;margin-top:0}.va-sidenav__header .va-sidenav__icon-background{font-size:24px}.va-sidenav__icon-background{color:var(--vads-color-white);border-radius:50%;width:40px;height:40px;margin-right:8px;position:relative}.va-sidenav__icon-background va-icon{position:absolute;top:50%;left:50%;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%)}va-accordion-item::part(accordion-header){padding-left:1.4rem}"}}]);