@department-of-veterans-affairs/component-library 52.0.0 → 52.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/141.app.bundle.js +1 -1
- package/dist/1822.app.bundle.js +1 -1
- package/dist/1966.app.bundle.js +1 -1
- package/dist/2205.app.bundle.js +1 -1
- package/dist/2236.app.bundle.js +1 -1
- package/dist/2482.app.bundle.js +1 -1
- package/dist/251.app.bundle.js +1 -1
- package/dist/2923.app.bundle.js +1 -1
- package/dist/2986.app.bundle.js +1 -1
- package/dist/323.app.bundle.js +1 -1
- package/dist/3397.app.bundle.js +1 -1
- package/dist/3589.app.bundle.js +1 -1
- package/dist/3601.app.bundle.js +1 -1
- package/dist/4351.app.bundle.js +1 -1
- package/dist/4400.app.bundle.js +1 -1
- package/dist/4432.app.bundle.js +1 -1
- package/dist/4475.app.bundle.js +1 -1
- package/dist/4780.app.bundle.js +1 -1
- package/dist/4996.app.bundle.js +1 -1
- package/dist/5119.app.bundle.js +1 -1
- package/dist/5341.app.bundle.js +1 -1
- package/dist/5663.app.bundle.js +1 -1
- package/dist/5689.app.bundle.js +1 -1
- package/dist/5845.app.bundle.js +1 -1
- package/dist/5938.app.bundle.js +1 -1
- package/dist/5990.app.bundle.js +1 -1
- package/dist/6104.app.bundle.js +1 -0
- package/dist/6308.app.bundle.js +1 -1
- package/dist/6498.app.bundle.js +1 -1
- package/dist/6555.app.bundle.js +1 -1
- package/dist/6650.app.bundle.js +1 -1
- package/dist/6696.app.bundle.js +1 -1
- package/dist/6718.app.bundle.js +1 -1
- package/dist/6832.app.bundle.js +1 -1
- package/dist/6849.app.bundle.js +1 -1
- package/dist/7166.app.bundle.js +1 -1
- package/dist/7307.app.bundle.js +1 -1
- package/dist/7372.app.bundle.js +1 -1
- package/dist/7481.app.bundle.js +1 -1
- package/dist/7495.app.bundle.js +1 -1
- package/dist/7734.app.bundle.js +1 -1
- package/dist/8255.app.bundle.js +1 -1
- package/dist/8463.app.bundle.js +1 -1
- package/dist/8762.app.bundle.js +1 -1
- package/dist/8913.app.bundle.js +1 -1
- package/dist/9186.app.bundle.js +1 -1
- package/dist/9496.app.bundle.js +1 -1
- package/dist/9851.app.bundle.js +1 -1
- package/dist/app.bundle.js +1 -1
- package/dist/components/types/components.d.ts +62 -9
- package/dist/components/utils.js +1 -1
- package/dist/components/va-accordion-item2.js +1 -1
- package/dist/components/va-additional-info.js +1 -1
- package/dist/components/va-alert-expandable.js +1 -1
- package/dist/components/va-checkbox-group2.js +1 -1
- package/dist/components/va-checkbox2.js +1 -1
- package/dist/components/va-combo-box2.js +3 -3
- package/dist/components/va-date.js +1 -1
- package/dist/components/va-file-input-multiple.js +1 -1
- package/dist/components/va-file-input2.js +1 -1
- package/dist/components/va-header-minimal.js +1 -1
- package/dist/components/va-icon2.js +1 -1
- package/dist/components/va-language-toggle.js +1 -1
- package/dist/components/va-link-action.js +1 -1
- package/dist/components/va-loading-indicator.js +1 -1
- package/dist/components/va-memorable-date.js +1 -1
- package/dist/components/va-minimal-footer.js +1 -1
- package/dist/components/va-modal2.js +1 -1
- package/dist/components/va-need-help.js +1 -1
- package/dist/components/va-official-gov-banner2.js +1 -1
- package/dist/components/va-omb-info.js +1 -1
- package/dist/components/va-privacy-agreement.js +1 -1
- package/dist/components/va-process-list-item.js +1 -1
- package/dist/components/va-process-list.js +1 -1
- package/dist/components/va-progress-bar2.js +1 -1
- package/dist/components/va-radio-option.js +1 -1
- package/dist/components/va-radio.js +1 -1
- package/dist/components/va-search-input.js +1 -1
- package/dist/components/va-segmented-progress-bar.js +1 -1
- package/dist/components/va-select2.js +1 -1
- package/dist/components/va-sidenav-item.js +1 -1
- package/dist/components/va-sidenav-submenu.js +1 -1
- package/dist/components/va-statement-of-truth.js +1 -1
- package/dist/components/va-summary-box.js +1 -1
- package/dist/components/va-tab-item.js +1 -1
- package/dist/components/va-tab-panel.js +1 -1
- package/dist/components/va-table-inner2.js +1 -1
- package/dist/components/va-table-row.js +1 -1
- package/dist/components/va-table.js +1 -1
- package/dist/components/va-telephone-input.js +1 -1
- package/dist/components/va-telephone2.js +1 -1
- package/dist/components/va-text-input2.js +1 -1
- package/dist/components/va-textarea.js +1 -1
- package/package.json +2 -2
- package/dist/8039.app.bundle.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{proxyCustomElement,HTMLElement,h,Host}from"@stencil/core/internal/client";const vaTableRowCss=":host{display:table-row}::slotted([role='cell']){padding-top:1rem;padding-bottom:1rem;padding-left:1rem;word-wrap:break-word;vertical-align:top;border-left:0;border-right:0;border-top:0}::slotted(*::first-letter){text-transform:capitalize}::slotted(*){display:table-cell;border:1px solid var(--vads-color-base-dark);padding:0.625rem 0.938rem}::slotted(*:empty):before{content:'---'}@media screen and (max-width: 768px){:host{border-bottom:1px solid var(--vads-color-gray-medium)}:host:first-child{border-top:1px solid var(--vads-color-gray-medium)}::slotted([role='cell']){border:none;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}::slotted([role='cell']:first-child){margin-top:1rem}::slotted([role='cell']:last-child){margin-bottom:1rem;border-bottom:0}::slotted([role='cell'])::before{display:block;content:attr(data-label);font-weight:700}}",VaTableRowStyle0=vaTableRowCss,VaTableRow$1=proxyCustomElement(class extends HTMLElement{constructor(){super(),this.__registerHost(),this.__attachShadow()}render(){return h(Host,{key:"
|
|
1
|
+
import{proxyCustomElement,HTMLElement,h,Host}from"@stencil/core/internal/client";const vaTableRowCss=":host{display:table-row}::slotted([role='cell']){padding-top:1rem;padding-bottom:1rem;padding-left:1rem;word-wrap:break-word;vertical-align:top;border-left:0;border-right:0;border-top:0}::slotted(*::first-letter){text-transform:capitalize}::slotted(*){display:table-cell;border:1px solid var(--vads-color-base-dark);padding:0.625rem 0.938rem}::slotted(*:empty):before{content:'---'}@media screen and (max-width: 768px){:host{border-bottom:1px solid var(--vads-color-gray-medium)}:host:first-child{border-top:1px solid var(--vads-color-gray-medium)}::slotted([role='cell']){border:none;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}::slotted([role='cell']:first-child){margin-top:1rem}::slotted([role='cell']:last-child){margin-bottom:1rem;border-bottom:0}::slotted([role='cell'])::before{display:block;content:attr(data-label);font-weight:700}}",VaTableRowStyle0=vaTableRowCss,VaTableRow$1=proxyCustomElement(class extends HTMLElement{constructor(){super(),this.__registerHost(),this.__attachShadow()}render(){return h(Host,{key:"28462bb10471699e5b73eb8a563c98abcca33889"},h("slot",{key:"d93b4d61e87d04c197a295ab6c89a48034947fb5"}))}static get style(){return VaTableRowStyle0}},[1,"va-table-row"]);function defineCustomElement$1(){"undefined"!=typeof customElements&&["va-table-row"].forEach((e=>{"va-table-row"===e&&(customElements.get(e)||customElements.define(e,VaTableRow$1))}))}const VaTableRow=VaTableRow$1,defineCustomElement=defineCustomElement$1;export{VaTableRow,defineCustomElement};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{proxyCustomElement,HTMLElement,h,Host}from"@stencil/core/internal/client";import{b as isNumeric}from"./utils.js";import{d as defineCustomElement$3}from"./va-icon2.js";import{d as defineCustomElement$2}from"./va-table-inner2.js";const months={january:1,february:2,march:3,april:4,may:5,june:6,july:7,august:8,september:9,october:10,november:11,december:12},ordinals={first:1,second:2,third:3,fourth:4,fifth:5,sixth:6,seventh:7,eighth:8,ninth:9,tenth:10,eleventh:11,twelfth:12,thirteenth:13,fourteenth:14,fifteenth:15,sixteenth:16,seventeenth:17,eighteenth:18,nineteenth:19,twentieth:20},dateRegex=/^(\d{1,2}\/){1,2}(\d{2}|\d{4})$/;function _isNumeric(a){const t=cleanString(a);return!dateRegex.test(a)&&("number"==typeof t||isNumeric(t))}function cleanString(a){if(""===a)return-1/0;const t=a.toLowerCase();return t in ordinals?ordinals[t]:a.replace(/[$%,]|(th)|(st)|(rd)|(nd)/g,"")}function numSort(a){return function(t,e){return difference(+cleanString(t),+cleanString(e),a)}}function isValidDate(a){const t=new Date(a);return!isNaN(t.getTime())||!!months[a.toLowerCase()]}function getDateValue(a){if(""===a)return-1/0;return months[a.toLowerCase()]||new Date(a).getTime()}function dateSort(a){return function(t,e){return difference(getDateValue(t),getDateValue(e),a)}}function alphaSort(a){var t;let e=null===(t=null==this?void 0:this.el)||void 0===t?void 0:t.getAttribute("lang");return e=e||"en-US",function(t,r){const s="ascending"===a,o=s?t:r,d=s?r:t;return new Intl.Collator(e,{sensitivity:"base"}).compare(o,d)}}function difference(a,t,e){return"ascending"===e?a-t:t-a}function _getCompareFunc(a,t){let e;return e=_isNumeric(a)?numSort(t):isValidDate(a)?dateSort(t):alphaSort.bind(this)(t),e}function getCompareFunc(a,t,e){for(const r of a){const a=r.children[t],s=a.getAttribute("data-sort-value");if(null!==s)return _getCompareFunc.bind(this)(s,e);const o=a.innerHTML.trim();if(""!==o)return _getCompareFunc.bind(this)(o,e)}return null}const vaTableCss='.usa-table{font-family:Source Sans Pro Web, Helvetica Neue, Helvetica, Roboto, Arial, sans-serif;font-size:1.06rem;line-height:1.5;border-collapse:collapse;border-spacing:0;color:#1b1b1b;margin:1.25rem 0;text-align:left;}.usa-table thead th{background-clip:padding-box;color:#1b1b1b;font-weight:700;line-height:1.3}.usa-table thead th,.usa-table thead td{background-color:#dfe1e2;color:#1b1b1b}.usa-table tbody th{text-align:left}.usa-table th,.usa-table td{background-color:white;border:1px solid #1b1b1b;font-weight:normal;padding:0.5rem 1rem}.usa-table caption{font-family:Source Sans Pro Web, Helvetica Neue, Helvetica, Roboto, Arial, sans-serif;font-size:1rem;font-weight:700;margin-bottom:0.75rem;text-align:left}.usa-table th[data-sortable]{padding-right:2.5rem;position:relative}.usa-table th[data-sortable]::after{border-bottom-color:transparent;border-bottom-style:solid;border-bottom-width:1px;bottom:0;content:"";height:0;left:0;position:absolute;width:100%}.usa-table th[data-sortable]:not([aria-sort]) .usa-table__header__button,.usa-table th[data-sortable][aria-sort=none] .usa-table__header__button{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;height:2rem;width:2rem;background-position:center center;background-size:1.5rem;color:#71767a;cursor:pointer;display:inline-block;margin:0;position:absolute;right:0.25rem;text-align:center;text-decoration:none;top:50%;-webkit-transform:translate(0, -50%);transform:translate(0, -50%)}.usa-table th[data-sortable]:not([aria-sort]) .usa-table__header__button:visited,.usa-table th[data-sortable][aria-sort=none] .usa-table__header__button:visited{color:#54278f}.usa-table th[data-sortable]:not([aria-sort]) .usa-table__header__button:hover,.usa-table th[data-sortable][aria-sort=none] .usa-table__header__button:hover{color:#1a4480}.usa-table th[data-sortable]:not([aria-sort]) .usa-table__header__button:active,.usa-table th[data-sortable][aria-sort=none] .usa-table__header__button:active{color:#162e51}.usa-table th[data-sortable]:not([aria-sort]) .usa-table__header__button:focus,.usa-table th[data-sortable][aria-sort=none] .usa-table__header__button:focus{outline:0.25rem solid #2491ff;outline-offset:0rem}.usa-table th[data-sortable]:not([aria-sort]) .usa-table__header__button:hover,.usa-table th[data-sortable]:not([aria-sort]) .usa-table__header__button.usa-button--hover,.usa-table th[data-sortable]:not([aria-sort]) .usa-table__header__button:disabled:hover,.usa-table th[data-sortable]:not([aria-sort]) .usa-table__header__button[aria-disabled=true]:hover,.usa-table th[data-sortable]:not([aria-sort]) .usa-table__header__button:disabled.usa-button--hover,.usa-table th[data-sortable]:not([aria-sort]) .usa-table__header__button[aria-disabled=true].usa-button--hover,.usa-table th[data-sortable]:not([aria-sort]) .usa-table__header__button:active,.usa-table th[data-sortable]:not([aria-sort]) .usa-table__header__button.usa-button--active,.usa-table th[data-sortable]:not([aria-sort]) .usa-table__header__button:disabled:active,.usa-table th[data-sortable]:not([aria-sort]) .usa-table__header__button[aria-disabled=true]:active,.usa-table th[data-sortable]:not([aria-sort]) .usa-table__header__button:disabled.usa-button--active,.usa-table th[data-sortable]:not([aria-sort]) .usa-table__header__button[aria-disabled=true].usa-button--active,.usa-table th[data-sortable]:not([aria-sort]) .usa-table__header__button:disabled:focus,.usa-table th[data-sortable]:not([aria-sort]) .usa-table__header__button[aria-disabled=true]:focus,.usa-table th[data-sortable]:not([aria-sort]) .usa-table__header__button:disabled.usa-focus,.usa-table th[data-sortable]:not([aria-sort]) .usa-table__header__button[aria-disabled=true].usa-focus,.usa-table th[data-sortable]:not([aria-sort]) .usa-table__header__button:disabled,.usa-table th[data-sortable]:not([aria-sort]) .usa-table__header__button[aria-disabled=true],.usa-table th[data-sortable]:not([aria-sort]) .usa-table__header__button.usa-button--disabled,.usa-table th[data-sortable][aria-sort=none] .usa-table__header__button:hover,.usa-table th[data-sortable][aria-sort=none] .usa-table__header__button.usa-button--hover,.usa-table th[data-sortable][aria-sort=none] .usa-table__header__button:disabled:hover,.usa-table th[data-sortable][aria-sort=none] .usa-table__header__button[aria-disabled=true]:hover,.usa-table th[data-sortable][aria-sort=none] .usa-table__header__button:disabled.usa-button--hover,.usa-table th[data-sortable][aria-sort=none] .usa-table__header__button[aria-disabled=true].usa-button--hover,.usa-table th[data-sortable][aria-sort=none] .usa-table__header__button:active,.usa-table th[data-sortable][aria-sort=none] .usa-table__header__button.usa-button--active,.usa-table th[data-sortable][aria-sort=none] .usa-table__header__button:disabled:active,.usa-table th[data-sortable][aria-sort=none] .usa-table__header__button[aria-disabled=true]:active,.usa-table th[data-sortable][aria-sort=none] .usa-table__header__button:disabled.usa-button--active,.usa-table th[data-sortable][aria-sort=none] .usa-table__header__button[aria-disabled=true].usa-button--active,.usa-table th[data-sortable][aria-sort=none] .usa-table__header__button:disabled:focus,.usa-table th[data-sortable][aria-sort=none] .usa-table__header__button[aria-disabled=true]:focus,.usa-table th[data-sortable][aria-sort=none] .usa-table__header__button:disabled.usa-focus,.usa-table th[data-sortable][aria-sort=none] .usa-table__header__button[aria-disabled=true].usa-focus,.usa-table th[data-sortable][aria-sort=none] .usa-table__header__button:disabled,.usa-table th[data-sortable][aria-sort=none] .usa-table__header__button[aria-disabled=true],.usa-table th[data-sortable][aria-sort=none] .usa-table__header__button.usa-button--disabled{background-color:transparent;-webkit-box-shadow:none;box-shadow:none;text-decoration:underline}.usa-table th[data-sortable]:not([aria-sort]) .usa-table__header__button.usa-button--hover,.usa-table th[data-sortable][aria-sort=none] .usa-table__header__button.usa-button--hover{color:#1a4480}.usa-table th[data-sortable]:not([aria-sort]) .usa-table__header__button.usa-button--active,.usa-table th[data-sortable][aria-sort=none] .usa-table__header__button.usa-button--active{color:#162e51}.usa-table th[data-sortable]:not([aria-sort]) .usa-table__header__button:disabled,.usa-table th[data-sortable]:not([aria-sort]) .usa-table__header__button[aria-disabled=true],.usa-table th[data-sortable]:not([aria-sort]) .usa-table__header__button:disabled:hover,.usa-table th[data-sortable]:not([aria-sort]) .usa-table__header__button[aria-disabled=true]:hover,.usa-table th[data-sortable]:not([aria-sort]) .usa-table__header__button[aria-disabled=true]:focus,.usa-table th[data-sortable][aria-sort=none] .usa-table__header__button:disabled,.usa-table th[data-sortable][aria-sort=none] .usa-table__header__button[aria-disabled=true],.usa-table th[data-sortable][aria-sort=none] .usa-table__header__button:disabled:hover,.usa-table th[data-sortable][aria-sort=none] .usa-table__header__button[aria-disabled=true]:hover,.usa-table th[data-sortable][aria-sort=none] .usa-table__header__button[aria-disabled=true]:focus{color:#757575}@media (forced-colors: active){.usa-table th[data-sortable]:not([aria-sort]) .usa-table__header__button:disabled,.usa-table th[data-sortable]:not([aria-sort]) .usa-table__header__button[aria-disabled=true],.usa-table th[data-sortable]:not([aria-sort]) .usa-table__header__button:disabled:hover,.usa-table th[data-sortable]:not([aria-sort]) .usa-table__header__button[aria-disabled=true]:hover,.usa-table th[data-sortable]:not([aria-sort]) .usa-table__header__button[aria-disabled=true]:focus,.usa-table th[data-sortable][aria-sort=none] .usa-table__header__button:disabled,.usa-table th[data-sortable][aria-sort=none] .usa-table__header__button[aria-disabled=true],.usa-table th[data-sortable][aria-sort=none] .usa-table__header__button:disabled:hover,.usa-table th[data-sortable][aria-sort=none] .usa-table__header__button[aria-disabled=true]:hover,.usa-table th[data-sortable][aria-sort=none] .usa-table__header__button[aria-disabled=true]:focus{color:GrayText}}.usa-table th[data-sortable]:not([aria-sort]) .usa-table__header__button .usa-icon,.usa-table th[data-sortable][aria-sort=none] .usa-table__header__button .usa-icon{height:1.5rem;width:1.5rem;vertical-align:middle}.usa-table th[data-sortable]:not([aria-sort]) .usa-table__header__button .usa-icon>g,.usa-table th[data-sortable][aria-sort=none] .usa-table__header__button .usa-icon>g{fill:transparent}.usa-table th[data-sortable]:not([aria-sort]) .usa-table__header__button .usa-icon>g.unsorted,.usa-table th[data-sortable][aria-sort=none] .usa-table__header__button .usa-icon>g.unsorted{fill:#1b1b1b}.usa-table th[data-sortable]:not([aria-sort]) .usa-table__header__button:hover .usa-icon>g.unsorted,.usa-table th[data-sortable][aria-sort=none] .usa-table__header__button:hover .usa-icon>g.unsorted{fill:black}.usa-table th[data-sortable][aria-sort=descending],.usa-table th[data-sortable][aria-sort=ascending]{background-color:#97d4ea}.usa-table th[data-sortable][aria-sort=descending] .usa-table__header__button{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;height:2rem;width:2rem;background-position:center center;background-size:1.5rem;color:#71767a;cursor:pointer;display:inline-block;margin:0;position:absolute;right:0.25rem;text-align:center;text-decoration:none;top:50%;-webkit-transform:translate(0, -50%);transform:translate(0, -50%)}.usa-table th[data-sortable][aria-sort=descending] .usa-table__header__button:visited{color:#54278f}.usa-table th[data-sortable][aria-sort=descending] .usa-table__header__button:hover{color:#1a4480}.usa-table th[data-sortable][aria-sort=descending] .usa-table__header__button:active{color:#162e51}.usa-table th[data-sortable][aria-sort=descending] .usa-table__header__button:focus{outline:0.25rem solid #2491ff;outline-offset:0rem}.usa-table th[data-sortable][aria-sort=descending] .usa-table__header__button:hover,.usa-table th[data-sortable][aria-sort=descending] .usa-table__header__button.usa-button--hover,.usa-table th[data-sortable][aria-sort=descending] .usa-table__header__button:disabled:hover,.usa-table th[data-sortable][aria-sort=descending] .usa-table__header__button[aria-disabled=true]:hover,.usa-table th[data-sortable][aria-sort=descending] .usa-table__header__button:disabled.usa-button--hover,.usa-table th[data-sortable][aria-sort=descending] .usa-table__header__button[aria-disabled=true].usa-button--hover,.usa-table th[data-sortable][aria-sort=descending] .usa-table__header__button:active,.usa-table th[data-sortable][aria-sort=descending] .usa-table__header__button.usa-button--active,.usa-table th[data-sortable][aria-sort=descending] .usa-table__header__button:disabled:active,.usa-table th[data-sortable][aria-sort=descending] .usa-table__header__button[aria-disabled=true]:active,.usa-table th[data-sortable][aria-sort=descending] .usa-table__header__button:disabled.usa-button--active,.usa-table th[data-sortable][aria-sort=descending] .usa-table__header__button[aria-disabled=true].usa-button--active,.usa-table th[data-sortable][aria-sort=descending] .usa-table__header__button:disabled:focus,.usa-table th[data-sortable][aria-sort=descending] .usa-table__header__button[aria-disabled=true]:focus,.usa-table th[data-sortable][aria-sort=descending] .usa-table__header__button:disabled.usa-focus,.usa-table th[data-sortable][aria-sort=descending] .usa-table__header__button[aria-disabled=true].usa-focus,.usa-table th[data-sortable][aria-sort=descending] .usa-table__header__button:disabled,.usa-table th[data-sortable][aria-sort=descending] .usa-table__header__button[aria-disabled=true],.usa-table th[data-sortable][aria-sort=descending] .usa-table__header__button.usa-button--disabled{background-color:transparent;-webkit-box-shadow:none;box-shadow:none;text-decoration:underline}.usa-table th[data-sortable][aria-sort=descending] .usa-table__header__button.usa-button--hover{color:#1a4480}.usa-table th[data-sortable][aria-sort=descending] .usa-table__header__button.usa-button--active{color:#162e51}.usa-table th[data-sortable][aria-sort=descending] .usa-table__header__button:disabled,.usa-table th[data-sortable][aria-sort=descending] .usa-table__header__button[aria-disabled=true],.usa-table th[data-sortable][aria-sort=descending] .usa-table__header__button:disabled:hover,.usa-table th[data-sortable][aria-sort=descending] .usa-table__header__button[aria-disabled=true]:hover,.usa-table th[data-sortable][aria-sort=descending] .usa-table__header__button[aria-disabled=true]:focus{color:#757575}@media (forced-colors: active){.usa-table th[data-sortable][aria-sort=descending] .usa-table__header__button:disabled,.usa-table th[data-sortable][aria-sort=descending] .usa-table__header__button[aria-disabled=true],.usa-table th[data-sortable][aria-sort=descending] .usa-table__header__button:disabled:hover,.usa-table th[data-sortable][aria-sort=descending] .usa-table__header__button[aria-disabled=true]:hover,.usa-table th[data-sortable][aria-sort=descending] .usa-table__header__button[aria-disabled=true]:focus{color:GrayText}}.usa-table th[data-sortable][aria-sort=descending] .usa-table__header__button .usa-icon{height:1.5rem;width:1.5rem;vertical-align:middle}.usa-table th[data-sortable][aria-sort=descending] .usa-table__header__button .usa-icon>g{fill:transparent}.usa-table th[data-sortable][aria-sort=descending] .usa-table__header__button .usa-icon>g.descending{fill:#1b1b1b}.usa-table th[data-sortable][aria-sort=ascending] .usa-table__header__button{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;height:2rem;width:2rem;background-position:center center;background-size:1.5rem;color:#71767a;cursor:pointer;display:inline-block;margin:0;position:absolute;right:0.25rem;text-align:center;text-decoration:none;top:50%;-webkit-transform:translate(0, -50%);transform:translate(0, -50%)}.usa-table th[data-sortable][aria-sort=ascending] .usa-table__header__button:visited{color:#54278f}.usa-table th[data-sortable][aria-sort=ascending] .usa-table__header__button:hover{color:#1a4480}.usa-table th[data-sortable][aria-sort=ascending] .usa-table__header__button:active{color:#162e51}.usa-table th[data-sortable][aria-sort=ascending] .usa-table__header__button:focus{outline:0.25rem solid #2491ff;outline-offset:0rem}.usa-table th[data-sortable][aria-sort=ascending] .usa-table__header__button:hover,.usa-table th[data-sortable][aria-sort=ascending] .usa-table__header__button.usa-button--hover,.usa-table th[data-sortable][aria-sort=ascending] .usa-table__header__button:disabled:hover,.usa-table th[data-sortable][aria-sort=ascending] .usa-table__header__button[aria-disabled=true]:hover,.usa-table th[data-sortable][aria-sort=ascending] .usa-table__header__button:disabled.usa-button--hover,.usa-table th[data-sortable][aria-sort=ascending] .usa-table__header__button[aria-disabled=true].usa-button--hover,.usa-table th[data-sortable][aria-sort=ascending] .usa-table__header__button:active,.usa-table th[data-sortable][aria-sort=ascending] .usa-table__header__button.usa-button--active,.usa-table th[data-sortable][aria-sort=ascending] .usa-table__header__button:disabled:active,.usa-table th[data-sortable][aria-sort=ascending] .usa-table__header__button[aria-disabled=true]:active,.usa-table th[data-sortable][aria-sort=ascending] .usa-table__header__button:disabled.usa-button--active,.usa-table th[data-sortable][aria-sort=ascending] .usa-table__header__button[aria-disabled=true].usa-button--active,.usa-table th[data-sortable][aria-sort=ascending] .usa-table__header__button:disabled:focus,.usa-table th[data-sortable][aria-sort=ascending] .usa-table__header__button[aria-disabled=true]:focus,.usa-table th[data-sortable][aria-sort=ascending] .usa-table__header__button:disabled.usa-focus,.usa-table th[data-sortable][aria-sort=ascending] .usa-table__header__button[aria-disabled=true].usa-focus,.usa-table th[data-sortable][aria-sort=ascending] .usa-table__header__button:disabled,.usa-table th[data-sortable][aria-sort=ascending] .usa-table__header__button[aria-disabled=true],.usa-table th[data-sortable][aria-sort=ascending] .usa-table__header__button.usa-button--disabled{background-color:transparent;-webkit-box-shadow:none;box-shadow:none;text-decoration:underline}.usa-table th[data-sortable][aria-sort=ascending] .usa-table__header__button.usa-button--hover{color:#1a4480}.usa-table th[data-sortable][aria-sort=ascending] .usa-table__header__button.usa-button--active{color:#162e51}.usa-table th[data-sortable][aria-sort=ascending] .usa-table__header__button:disabled,.usa-table th[data-sortable][aria-sort=ascending] .usa-table__header__button[aria-disabled=true],.usa-table th[data-sortable][aria-sort=ascending] .usa-table__header__button:disabled:hover,.usa-table th[data-sortable][aria-sort=ascending] .usa-table__header__button[aria-disabled=true]:hover,.usa-table th[data-sortable][aria-sort=ascending] .usa-table__header__button[aria-disabled=true]:focus{color:#757575}@media (forced-colors: active){.usa-table th[data-sortable][aria-sort=ascending] .usa-table__header__button:disabled,.usa-table th[data-sortable][aria-sort=ascending] .usa-table__header__button[aria-disabled=true],.usa-table th[data-sortable][aria-sort=ascending] .usa-table__header__button:disabled:hover,.usa-table th[data-sortable][aria-sort=ascending] .usa-table__header__button[aria-disabled=true]:hover,.usa-table th[data-sortable][aria-sort=ascending] .usa-table__header__button[aria-disabled=true]:focus{color:GrayText}}.usa-table th[data-sortable][aria-sort=ascending] .usa-table__header__button .usa-icon{height:1.5rem;width:1.5rem;vertical-align:middle}.usa-table th[data-sortable][aria-sort=ascending] .usa-table__header__button .usa-icon>g{fill:transparent}.usa-table th[data-sortable][aria-sort=ascending] .usa-table__header__button .usa-icon>g.ascending{fill:#1b1b1b}.usa-table thead th[aria-sort]{background-color:#97d4ea;color:#1b1b1b}.usa-table td[data-sort-active],.usa-table th[data-sort-active]{background-color:#e1f3f8;color:#1b1b1b}.usa-table--borderless thead{}.usa-table--borderless thead th{background-color:white;border-top:0;color:#1b1b1b}.usa-table--borderless thead th[aria-sort]{color:#1b1b1b}.usa-table--borderless thead th[data-sortable]:not([aria-sort]) .usa-table__header__button .usa-icon>g.unsorted{fill:#1b1b1b}.usa-table--borderless thead th[data-sortable]:not([aria-sort]) .usa-table__header__button:hover .usa-icon>g.unsorted{fill:black}.usa-table--borderless th,.usa-table--borderless td{border-left:0;border-right:0}.usa-table--compact th,.usa-table--compact td{padding:0.25rem 0.75rem}.usa-table--striped tbody tr:nth-child(odd) td,.usa-table--striped tbody tr:nth-child(odd) th{background-color:#f0f0f0;color:#1b1b1b}.usa-table--striped tbody tr:nth-child(odd) td[data-sort-active],.usa-table--striped tbody tr:nth-child(odd) th[data-sort-active]{background-color:#c3ebfa;color:#1b1b1b}@media all and (max-width: 29.99em){.usa-table--stacked thead{display:none}.usa-table--stacked th,.usa-table--stacked td{border-bottom-width:0;display:block;width:100%}.usa-table--stacked tr{border-bottom:0.25rem solid #1b1b1b;border-top-width:0;width:100%}.usa-table--stacked tr th:first-child,.usa-table--stacked tr td:first-child{border-top-width:0}.usa-table--stacked tr:nth-child(odd) td,.usa-table--stacked tr:nth-child(odd) th{background-color:inherit}.usa-table--stacked tr:first-child th:first-child,.usa-table--stacked tr:first-child td:first-child{border-top:0.25rem solid #1b1b1b}.usa-table--stacked th[data-label],.usa-table--stacked td[data-label]{padding-bottom:0.75rem}.usa-table--stacked th[data-label]:before,.usa-table--stacked td[data-label]:before{content:attr(data-label);display:block;font-weight:700;margin:-0.5rem -1rem 0rem;padding:0.75rem 1rem 0.25rem}}@media all and (max-width: 29.99em){.usa-table--stacked-header thead{display:none}.usa-table--stacked-header th,.usa-table--stacked-header td{border-bottom-width:0;display:block;width:100%}.usa-table--stacked-header tr{border-bottom:0.25rem solid #1b1b1b;border-top-width:0;width:100%}.usa-table--stacked-header tr th:first-child,.usa-table--stacked-header tr td:first-child{border-top-width:0}.usa-table--stacked-header tr:nth-child(odd) td,.usa-table--stacked-header tr:nth-child(odd) th{background-color:inherit}.usa-table--stacked-header tr:first-child th:first-child,.usa-table--stacked-header tr:first-child td:first-child{border-top:0.25rem solid #1b1b1b}.usa-table--stacked-header th[data-label],.usa-table--stacked-header td[data-label]{padding-bottom:0.75rem}.usa-table--stacked-header th[data-label]:before,.usa-table--stacked-header td[data-label]:before{content:attr(data-label);display:block;font-weight:700;margin:-0.5rem -1rem 0rem;padding:0.75rem 1rem 0.25rem}.usa-table--stacked-header tr td:first-child,.usa-table--stacked-header tr th:first-child{font-family:Source Sans Pro Web, Helvetica Neue, Helvetica, Roboto, Arial, sans-serif;font-size:1.06rem;line-height:1.1;background-color:#dfe1e2;color:#1b1b1b;font-weight:700;padding:0.75rem 1rem}.usa-table--stacked-header tr td:first-child:before,.usa-table--stacked-header tr th:first-child:before{display:none}}.width-mobile .usa-table--stacked thead{display:none}.width-mobile .usa-table--stacked th,.width-mobile .usa-table--stacked td{border-bottom-width:0;display:block;width:100%}.width-mobile .usa-table--stacked tr{border-bottom:0.25rem solid #1b1b1b;border-top-width:0;width:100%}.width-mobile .usa-table--stacked tr th:first-child,.width-mobile .usa-table--stacked tr td:first-child{border-top-width:0}.width-mobile .usa-table--stacked tr:nth-child(odd) td,.width-mobile .usa-table--stacked tr:nth-child(odd) th{background-color:inherit}.width-mobile .usa-table--stacked tr:first-child th:first-child,.width-mobile .usa-table--stacked tr:first-child td:first-child{border-top:0.25rem solid #1b1b1b}.width-mobile .usa-table--stacked th[data-label],.width-mobile .usa-table--stacked td[data-label]{padding-bottom:0.75rem}.width-mobile .usa-table--stacked th[data-label]:before,.width-mobile .usa-table--stacked td[data-label]:before{content:attr(data-label);display:block;font-weight:700;margin:-0.5rem -1rem 0rem;padding:0.75rem 1rem 0.25rem}.width-mobile .usa-table--stacked-header thead{display:none}.width-mobile .usa-table--stacked-header th,.width-mobile .usa-table--stacked-header td{border-bottom-width:0;display:block;width:100%}.width-mobile .usa-table--stacked-header tr{border-bottom:0.25rem solid #1b1b1b;border-top-width:0;width:100%}.width-mobile .usa-table--stacked-header tr th:first-child,.width-mobile .usa-table--stacked-header tr td:first-child{border-top-width:0}.width-mobile .usa-table--stacked-header tr:nth-child(odd) td,.width-mobile .usa-table--stacked-header tr:nth-child(odd) th{background-color:inherit}.width-mobile .usa-table--stacked-header tr:first-child th:first-child,.width-mobile .usa-table--stacked-header tr:first-child td:first-child{border-top:0.25rem solid #1b1b1b}.width-mobile .usa-table--stacked-header th[data-label],.width-mobile .usa-table--stacked-header td[data-label]{padding-bottom:0.75rem}.width-mobile .usa-table--stacked-header th[data-label]:before,.width-mobile .usa-table--stacked-header td[data-label]:before{content:attr(data-label);display:block;font-weight:700;margin:-0.5rem -1rem 0rem;padding:0.75rem 1rem 0.25rem}.width-mobile .usa-table--stacked-header tr td:first-child,.width-mobile .usa-table--stacked-header tr th:first-child{font-family:Source Sans Pro Web, Helvetica Neue, Helvetica, Roboto, Arial, sans-serif;font-size:1.06rem;line-height:1.1;background-color:#dfe1e2;color:#1b1b1b;font-weight:700;padding:0.75rem 1rem}.width-mobile .usa-table--stacked-header tr td:first-child:before,.width-mobile .usa-table--stacked-header tr th:first-child:before{display:none}.usa-table--sticky-header{border:1px solid #1b1b1b;border-collapse:separate}.usa-table--sticky-header td,.usa-table--sticky-header th{border-left:none;border-top:none}.usa-table--sticky-header td:last-child,.usa-table--sticky-header th:last-child{border-right:none}.usa-table--sticky-header tbody tr:last-child td,.usa-table--sticky-header tbody tr:last-child th{border-bottom:none}.usa-table--sticky-header thead{position:-webkit-sticky;position:sticky;top:-1px}.usa-table--sticky-header.usa-table--borderless{border:none}.usa-table--sticky-header.usa-table--borderless thead th{background-color:white}.usa-table--sticky-header.usa-table--borderless td,.usa-table--sticky-header.usa-table--borderless th{border-right:none}.usa-table-container--scrollable{margin:1.25rem 0;overflow-y:hidden}.usa-table-container--scrollable .usa-table{margin:0}.usa-table-container--scrollable td{white-space:nowrap}va-table-row{display:none}',VaTableStyle0=vaTableCss,VaTable$1=proxyCustomElement(class extends HTMLElement{constructor(){super(),this.__registerHost(),this.__attachShadow(),this.tableTitle=void 0,this.tableType="borderless",this.stacked=!0,this.scrollable=!1,this.sortable=!1,this.striped=!1,this.fullWidth=!1,this.rightAlignCols=void 0,this.rows=void 0,this.cols=void 0,this.cells=null}getCellsInRow(a){const t=Array.from(a.querySelectorAll(":scope > span"));return this.cols||(this.cols=t.length),t}getRows(){const a=Array.from(this.el.querySelectorAll("va-table-row"));return a.forEach((a=>a.removeAttribute("role"))),this.rows||(this.rows=a.length),a}getAllCells(a=this.getRows()){const t=[];let e=0;for(const r of a){const a=this.getCellsInRow(r);a.forEach((a=>{a.setAttribute("slot",`va-table-slot-${e}`),e++})),t.push(...a)}this.cells=t}makeFragment(){const a=document.createDocumentFragment();return this.cells.forEach((t=>{a.appendChild(t.cloneNode(!0))})),a}makeVATable(a,t){const e=document.createElement("va-table-inner");e.setAttribute("rows",`${this.rows}`),e.setAttribute("cols",`${this.cols}`),e.setAttribute("stacked",this.stacked&&!this.sortable?"true":"false"),e.setAttribute("sortable",`${this.sortable}`),e.setAttribute("scrollable",this.scrollable?"true":"false"),e.setAttribute("striped",this.striped?"true":"false"),this.sortable&&a&&t&&(e.dataset.sortdir=a,e.dataset.sortindex=`${t}`),this.tableTitle&&e.setAttribute("table-title",this.tableTitle),this.tableType&&e.setAttribute("table-type",this.tableType),this.fullWidth&&e.setAttribute("full-width",String(this.fullWidth)),this.rightAlignCols&&e.setAttribute("right-align-cols",this.rightAlignCols);const r=this.makeFragment();return e.appendChild(r),e}resetVaTableInner(){const a=this.el.querySelector("va-table-inner");a&&(a.remove(),this.rows=null,this.cols=null,this.cells=null)}watchForDataChanges(){const a=this.el.querySelectorAll("va-table-row")[1];this.observer=new MutationObserver((()=>{this.resetVaTableInner(),this.addVaTableInner()})),this.observer.observe(a,{childList:!0,subtree:!0,characterData:!0})}disconnectedCallback(){this.observer&&this.observer.disconnect()}addVaTableInner(a=null,t=null){this.getAllCells();const e=this.makeVATable(a,t);this.el.appendChild(e)}componentWillLoad(){this.addVaTableInner(),this.watchForDataChanges()}doSort(a){a.stopPropagation();const{index:t,sortdir:e}=a.detail,[r,...s]=this.getRows(),o=getCompareFunc.bind(this)(s,t,e);if(null!==o){s.sort(((a,e)=>{const r=a.children[t],s=e.children[t],d=r.getAttribute("data-sort-value"),l=s.getAttribute("data-sort-value");if(null!==d&&null!==l)return o(d,l);const b=null!==d?d:r.innerHTML.trim(),i=null!==l?l:s.innerHTML.trim();return o(b,i)}));const a=[r,...s];this.resetVaTableInner(),this.el.replaceChildren(...a),this.addVaTableInner("ascending"===e?"descending":"ascending",t)}}render(){return h(Host,{key:"51a90a943fb25ef62dd24bdd1fc3a84f9e63d85d"},h("slot",{key:"3c93bec5c9fdd2591bf6d8152a1a97f852a16f3d"}))}get el(){return this}static get style(){return VaTableStyle0}},[1,"va-table",{tableTitle:[1,"table-title"],tableType:[1,"table-type"],stacked:[4],scrollable:[4],sortable:[4],striped:[4],fullWidth:[4,"full-width"],rightAlignCols:[1,"right-align-cols"],rows:[32],cols:[32],cells:[32]},[[0,"sortTable","doSort"]]]);function defineCustomElement$1(){"undefined"!=typeof customElements&&["va-table","va-icon","va-table-inner"].forEach((a=>{switch(a){case"va-table":customElements.get(a)||customElements.define(a,VaTable$1);break;case"va-icon":customElements.get(a)||defineCustomElement$3();break;case"va-table-inner":customElements.get(a)||defineCustomElement$2()}}))}const VaTable=VaTable$1,defineCustomElement=defineCustomElement$1;export{VaTable,defineCustomElement};
|
|
1
|
+
import{proxyCustomElement,HTMLElement,h,Host}from"@stencil/core/internal/client";import{b as isNumeric}from"./utils.js";import{d as defineCustomElement$3}from"./va-icon2.js";import{d as defineCustomElement$2}from"./va-table-inner2.js";const months={january:1,february:2,march:3,april:4,may:5,june:6,july:7,august:8,september:9,october:10,november:11,december:12},ordinals={first:1,second:2,third:3,fourth:4,fifth:5,sixth:6,seventh:7,eighth:8,ninth:9,tenth:10,eleventh:11,twelfth:12,thirteenth:13,fourteenth:14,fifteenth:15,sixteenth:16,seventeenth:17,eighteenth:18,nineteenth:19,twentieth:20},dateRegex=/^(\d{1,2}\/){1,2}(\d{2}|\d{4})$/;function _isNumeric(a){const t=cleanString(a);return!dateRegex.test(a)&&("number"==typeof t||isNumeric(t))}function cleanString(a){if(""===a)return-1/0;const t=a.toLowerCase();return t in ordinals?ordinals[t]:a.replace(/[$%,]|(th)|(st)|(rd)|(nd)/g,"")}function numSort(a){return function(t,e){return difference(+cleanString(t),+cleanString(e),a)}}function isValidDate(a){const t=new Date(a);return!isNaN(t.getTime())||!!months[a.toLowerCase()]}function getDateValue(a){if(""===a)return-1/0;return months[a.toLowerCase()]||new Date(a).getTime()}function dateSort(a){return function(t,e){return difference(getDateValue(t),getDateValue(e),a)}}function alphaSort(a){var t;let e=null===(t=null==this?void 0:this.el)||void 0===t?void 0:t.getAttribute("lang");return e=e||"en-US",function(t,r){const s="ascending"===a,o=s?t:r,l=s?r:t;return new Intl.Collator(e,{sensitivity:"base"}).compare(o,l)}}function difference(a,t,e){return"ascending"===e?a-t:t-a}function _getCompareFunc(a,t){let e;return e=_isNumeric(a)?numSort(t):isValidDate(a)?dateSort(t):alphaSort.bind(this)(t),e}function getCompareFunc(a,t,e){for(const r of a){const a=r.children[t],s=a.getAttribute("data-sort-value");if(null!==s)return _getCompareFunc.bind(this)(s,e);const o=a.innerHTML.trim();if(""!==o)return _getCompareFunc.bind(this)(o,e)}return null}const vaTableCss='.usa-table{font-family:Source Sans Pro Web, Helvetica Neue, Helvetica, Roboto, Arial, sans-serif;font-size:1.06rem;line-height:1.5;border-collapse:collapse;border-spacing:0;color:#1b1b1b;margin:1.25rem 0;text-align:left;}.usa-table thead th{background-clip:padding-box;color:#1b1b1b;font-weight:700;line-height:1.3}.usa-table thead th,.usa-table thead td{background-color:#dfe1e2;color:#1b1b1b}.usa-table tbody th{text-align:left}.usa-table th,.usa-table td{background-color:white;border:1px solid #1b1b1b;font-weight:normal;padding:0.5rem 1rem}.usa-table caption{font-family:Source Sans Pro Web, Helvetica Neue, Helvetica, Roboto, Arial, sans-serif;font-size:1rem;font-weight:700;margin-bottom:0.75rem;text-align:left}.usa-table th[data-sortable]{padding-right:2.5rem;position:relative}.usa-table th[data-sortable]::after{border-bottom-color:transparent;border-bottom-style:solid;border-bottom-width:1px;bottom:0;content:"";height:0;left:0;position:absolute;width:100%}.usa-table th[data-sortable]:not([aria-sort]) .usa-table__header__button,.usa-table th[data-sortable][aria-sort=none] .usa-table__header__button{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;height:2rem;width:2rem;background-position:center center;background-size:1.5rem;color:#71767a;cursor:pointer;display:inline-block;margin:0;position:absolute;right:0.25rem;text-align:center;text-decoration:none;top:50%;-webkit-transform:translate(0, -50%);transform:translate(0, -50%)}.usa-table th[data-sortable]:not([aria-sort]) .usa-table__header__button:visited,.usa-table th[data-sortable][aria-sort=none] .usa-table__header__button:visited{color:#54278f}.usa-table th[data-sortable]:not([aria-sort]) .usa-table__header__button:hover,.usa-table th[data-sortable][aria-sort=none] .usa-table__header__button:hover{color:#1a4480}.usa-table th[data-sortable]:not([aria-sort]) .usa-table__header__button:active,.usa-table th[data-sortable][aria-sort=none] .usa-table__header__button:active{color:#162e51}.usa-table th[data-sortable]:not([aria-sort]) .usa-table__header__button:focus,.usa-table th[data-sortable][aria-sort=none] .usa-table__header__button:focus{outline:0.25rem solid #2491ff;outline-offset:0rem}.usa-table th[data-sortable]:not([aria-sort]) .usa-table__header__button:hover,.usa-table th[data-sortable]:not([aria-sort]) .usa-table__header__button.usa-button--hover,.usa-table th[data-sortable]:not([aria-sort]) .usa-table__header__button:disabled:hover,.usa-table th[data-sortable]:not([aria-sort]) .usa-table__header__button[aria-disabled=true]:hover,.usa-table th[data-sortable]:not([aria-sort]) .usa-table__header__button:disabled.usa-button--hover,.usa-table th[data-sortable]:not([aria-sort]) .usa-table__header__button[aria-disabled=true].usa-button--hover,.usa-table th[data-sortable]:not([aria-sort]) .usa-table__header__button:active,.usa-table th[data-sortable]:not([aria-sort]) .usa-table__header__button.usa-button--active,.usa-table th[data-sortable]:not([aria-sort]) .usa-table__header__button:disabled:active,.usa-table th[data-sortable]:not([aria-sort]) .usa-table__header__button[aria-disabled=true]:active,.usa-table th[data-sortable]:not([aria-sort]) .usa-table__header__button:disabled.usa-button--active,.usa-table th[data-sortable]:not([aria-sort]) .usa-table__header__button[aria-disabled=true].usa-button--active,.usa-table th[data-sortable]:not([aria-sort]) .usa-table__header__button:disabled:focus,.usa-table th[data-sortable]:not([aria-sort]) .usa-table__header__button[aria-disabled=true]:focus,.usa-table th[data-sortable]:not([aria-sort]) .usa-table__header__button:disabled.usa-focus,.usa-table th[data-sortable]:not([aria-sort]) .usa-table__header__button[aria-disabled=true].usa-focus,.usa-table th[data-sortable]:not([aria-sort]) .usa-table__header__button:disabled,.usa-table th[data-sortable]:not([aria-sort]) .usa-table__header__button[aria-disabled=true],.usa-table th[data-sortable]:not([aria-sort]) .usa-table__header__button.usa-button--disabled,.usa-table th[data-sortable][aria-sort=none] .usa-table__header__button:hover,.usa-table th[data-sortable][aria-sort=none] .usa-table__header__button.usa-button--hover,.usa-table th[data-sortable][aria-sort=none] .usa-table__header__button:disabled:hover,.usa-table th[data-sortable][aria-sort=none] .usa-table__header__button[aria-disabled=true]:hover,.usa-table th[data-sortable][aria-sort=none] .usa-table__header__button:disabled.usa-button--hover,.usa-table th[data-sortable][aria-sort=none] .usa-table__header__button[aria-disabled=true].usa-button--hover,.usa-table th[data-sortable][aria-sort=none] .usa-table__header__button:active,.usa-table th[data-sortable][aria-sort=none] .usa-table__header__button.usa-button--active,.usa-table th[data-sortable][aria-sort=none] .usa-table__header__button:disabled:active,.usa-table th[data-sortable][aria-sort=none] .usa-table__header__button[aria-disabled=true]:active,.usa-table th[data-sortable][aria-sort=none] .usa-table__header__button:disabled.usa-button--active,.usa-table th[data-sortable][aria-sort=none] .usa-table__header__button[aria-disabled=true].usa-button--active,.usa-table th[data-sortable][aria-sort=none] .usa-table__header__button:disabled:focus,.usa-table th[data-sortable][aria-sort=none] .usa-table__header__button[aria-disabled=true]:focus,.usa-table th[data-sortable][aria-sort=none] .usa-table__header__button:disabled.usa-focus,.usa-table th[data-sortable][aria-sort=none] .usa-table__header__button[aria-disabled=true].usa-focus,.usa-table th[data-sortable][aria-sort=none] .usa-table__header__button:disabled,.usa-table th[data-sortable][aria-sort=none] .usa-table__header__button[aria-disabled=true],.usa-table th[data-sortable][aria-sort=none] .usa-table__header__button.usa-button--disabled{background-color:transparent;-webkit-box-shadow:none;box-shadow:none;text-decoration:underline}.usa-table th[data-sortable]:not([aria-sort]) .usa-table__header__button.usa-button--hover,.usa-table th[data-sortable][aria-sort=none] .usa-table__header__button.usa-button--hover{color:#1a4480}.usa-table th[data-sortable]:not([aria-sort]) .usa-table__header__button.usa-button--active,.usa-table th[data-sortable][aria-sort=none] .usa-table__header__button.usa-button--active{color:#162e51}.usa-table th[data-sortable]:not([aria-sort]) .usa-table__header__button:disabled,.usa-table th[data-sortable]:not([aria-sort]) .usa-table__header__button[aria-disabled=true],.usa-table th[data-sortable]:not([aria-sort]) .usa-table__header__button:disabled:hover,.usa-table th[data-sortable]:not([aria-sort]) .usa-table__header__button[aria-disabled=true]:hover,.usa-table th[data-sortable]:not([aria-sort]) .usa-table__header__button[aria-disabled=true]:focus,.usa-table th[data-sortable][aria-sort=none] .usa-table__header__button:disabled,.usa-table th[data-sortable][aria-sort=none] .usa-table__header__button[aria-disabled=true],.usa-table th[data-sortable][aria-sort=none] .usa-table__header__button:disabled:hover,.usa-table th[data-sortable][aria-sort=none] .usa-table__header__button[aria-disabled=true]:hover,.usa-table th[data-sortable][aria-sort=none] .usa-table__header__button[aria-disabled=true]:focus{color:#757575}@media (forced-colors: active){.usa-table th[data-sortable]:not([aria-sort]) .usa-table__header__button:disabled,.usa-table th[data-sortable]:not([aria-sort]) .usa-table__header__button[aria-disabled=true],.usa-table th[data-sortable]:not([aria-sort]) .usa-table__header__button:disabled:hover,.usa-table th[data-sortable]:not([aria-sort]) .usa-table__header__button[aria-disabled=true]:hover,.usa-table th[data-sortable]:not([aria-sort]) .usa-table__header__button[aria-disabled=true]:focus,.usa-table th[data-sortable][aria-sort=none] .usa-table__header__button:disabled,.usa-table th[data-sortable][aria-sort=none] .usa-table__header__button[aria-disabled=true],.usa-table th[data-sortable][aria-sort=none] .usa-table__header__button:disabled:hover,.usa-table th[data-sortable][aria-sort=none] .usa-table__header__button[aria-disabled=true]:hover,.usa-table th[data-sortable][aria-sort=none] .usa-table__header__button[aria-disabled=true]:focus{color:GrayText}}.usa-table th[data-sortable]:not([aria-sort]) .usa-table__header__button .usa-icon,.usa-table th[data-sortable][aria-sort=none] .usa-table__header__button .usa-icon{height:1.5rem;width:1.5rem;vertical-align:middle}.usa-table th[data-sortable]:not([aria-sort]) .usa-table__header__button .usa-icon>g,.usa-table th[data-sortable][aria-sort=none] .usa-table__header__button .usa-icon>g{fill:transparent}.usa-table th[data-sortable]:not([aria-sort]) .usa-table__header__button .usa-icon>g.unsorted,.usa-table th[data-sortable][aria-sort=none] .usa-table__header__button .usa-icon>g.unsorted{fill:#1b1b1b}.usa-table th[data-sortable]:not([aria-sort]) .usa-table__header__button:hover .usa-icon>g.unsorted,.usa-table th[data-sortable][aria-sort=none] .usa-table__header__button:hover .usa-icon>g.unsorted{fill:black}.usa-table th[data-sortable][aria-sort=descending],.usa-table th[data-sortable][aria-sort=ascending]{background-color:#97d4ea}.usa-table th[data-sortable][aria-sort=descending] .usa-table__header__button{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;height:2rem;width:2rem;background-position:center center;background-size:1.5rem;color:#71767a;cursor:pointer;display:inline-block;margin:0;position:absolute;right:0.25rem;text-align:center;text-decoration:none;top:50%;-webkit-transform:translate(0, -50%);transform:translate(0, -50%)}.usa-table th[data-sortable][aria-sort=descending] .usa-table__header__button:visited{color:#54278f}.usa-table th[data-sortable][aria-sort=descending] .usa-table__header__button:hover{color:#1a4480}.usa-table th[data-sortable][aria-sort=descending] .usa-table__header__button:active{color:#162e51}.usa-table th[data-sortable][aria-sort=descending] .usa-table__header__button:focus{outline:0.25rem solid #2491ff;outline-offset:0rem}.usa-table th[data-sortable][aria-sort=descending] .usa-table__header__button:hover,.usa-table th[data-sortable][aria-sort=descending] .usa-table__header__button.usa-button--hover,.usa-table th[data-sortable][aria-sort=descending] .usa-table__header__button:disabled:hover,.usa-table th[data-sortable][aria-sort=descending] .usa-table__header__button[aria-disabled=true]:hover,.usa-table th[data-sortable][aria-sort=descending] .usa-table__header__button:disabled.usa-button--hover,.usa-table th[data-sortable][aria-sort=descending] .usa-table__header__button[aria-disabled=true].usa-button--hover,.usa-table th[data-sortable][aria-sort=descending] .usa-table__header__button:active,.usa-table th[data-sortable][aria-sort=descending] .usa-table__header__button.usa-button--active,.usa-table th[data-sortable][aria-sort=descending] .usa-table__header__button:disabled:active,.usa-table th[data-sortable][aria-sort=descending] .usa-table__header__button[aria-disabled=true]:active,.usa-table th[data-sortable][aria-sort=descending] .usa-table__header__button:disabled.usa-button--active,.usa-table th[data-sortable][aria-sort=descending] .usa-table__header__button[aria-disabled=true].usa-button--active,.usa-table th[data-sortable][aria-sort=descending] .usa-table__header__button:disabled:focus,.usa-table th[data-sortable][aria-sort=descending] .usa-table__header__button[aria-disabled=true]:focus,.usa-table th[data-sortable][aria-sort=descending] .usa-table__header__button:disabled.usa-focus,.usa-table th[data-sortable][aria-sort=descending] .usa-table__header__button[aria-disabled=true].usa-focus,.usa-table th[data-sortable][aria-sort=descending] .usa-table__header__button:disabled,.usa-table th[data-sortable][aria-sort=descending] .usa-table__header__button[aria-disabled=true],.usa-table th[data-sortable][aria-sort=descending] .usa-table__header__button.usa-button--disabled{background-color:transparent;-webkit-box-shadow:none;box-shadow:none;text-decoration:underline}.usa-table th[data-sortable][aria-sort=descending] .usa-table__header__button.usa-button--hover{color:#1a4480}.usa-table th[data-sortable][aria-sort=descending] .usa-table__header__button.usa-button--active{color:#162e51}.usa-table th[data-sortable][aria-sort=descending] .usa-table__header__button:disabled,.usa-table th[data-sortable][aria-sort=descending] .usa-table__header__button[aria-disabled=true],.usa-table th[data-sortable][aria-sort=descending] .usa-table__header__button:disabled:hover,.usa-table th[data-sortable][aria-sort=descending] .usa-table__header__button[aria-disabled=true]:hover,.usa-table th[data-sortable][aria-sort=descending] .usa-table__header__button[aria-disabled=true]:focus{color:#757575}@media (forced-colors: active){.usa-table th[data-sortable][aria-sort=descending] .usa-table__header__button:disabled,.usa-table th[data-sortable][aria-sort=descending] .usa-table__header__button[aria-disabled=true],.usa-table th[data-sortable][aria-sort=descending] .usa-table__header__button:disabled:hover,.usa-table th[data-sortable][aria-sort=descending] .usa-table__header__button[aria-disabled=true]:hover,.usa-table th[data-sortable][aria-sort=descending] .usa-table__header__button[aria-disabled=true]:focus{color:GrayText}}.usa-table th[data-sortable][aria-sort=descending] .usa-table__header__button .usa-icon{height:1.5rem;width:1.5rem;vertical-align:middle}.usa-table th[data-sortable][aria-sort=descending] .usa-table__header__button .usa-icon>g{fill:transparent}.usa-table th[data-sortable][aria-sort=descending] .usa-table__header__button .usa-icon>g.descending{fill:#1b1b1b}.usa-table th[data-sortable][aria-sort=ascending] .usa-table__header__button{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;height:2rem;width:2rem;background-position:center center;background-size:1.5rem;color:#71767a;cursor:pointer;display:inline-block;margin:0;position:absolute;right:0.25rem;text-align:center;text-decoration:none;top:50%;-webkit-transform:translate(0, -50%);transform:translate(0, -50%)}.usa-table th[data-sortable][aria-sort=ascending] .usa-table__header__button:visited{color:#54278f}.usa-table th[data-sortable][aria-sort=ascending] .usa-table__header__button:hover{color:#1a4480}.usa-table th[data-sortable][aria-sort=ascending] .usa-table__header__button:active{color:#162e51}.usa-table th[data-sortable][aria-sort=ascending] .usa-table__header__button:focus{outline:0.25rem solid #2491ff;outline-offset:0rem}.usa-table th[data-sortable][aria-sort=ascending] .usa-table__header__button:hover,.usa-table th[data-sortable][aria-sort=ascending] .usa-table__header__button.usa-button--hover,.usa-table th[data-sortable][aria-sort=ascending] .usa-table__header__button:disabled:hover,.usa-table th[data-sortable][aria-sort=ascending] .usa-table__header__button[aria-disabled=true]:hover,.usa-table th[data-sortable][aria-sort=ascending] .usa-table__header__button:disabled.usa-button--hover,.usa-table th[data-sortable][aria-sort=ascending] .usa-table__header__button[aria-disabled=true].usa-button--hover,.usa-table th[data-sortable][aria-sort=ascending] .usa-table__header__button:active,.usa-table th[data-sortable][aria-sort=ascending] .usa-table__header__button.usa-button--active,.usa-table th[data-sortable][aria-sort=ascending] .usa-table__header__button:disabled:active,.usa-table th[data-sortable][aria-sort=ascending] .usa-table__header__button[aria-disabled=true]:active,.usa-table th[data-sortable][aria-sort=ascending] .usa-table__header__button:disabled.usa-button--active,.usa-table th[data-sortable][aria-sort=ascending] .usa-table__header__button[aria-disabled=true].usa-button--active,.usa-table th[data-sortable][aria-sort=ascending] .usa-table__header__button:disabled:focus,.usa-table th[data-sortable][aria-sort=ascending] .usa-table__header__button[aria-disabled=true]:focus,.usa-table th[data-sortable][aria-sort=ascending] .usa-table__header__button:disabled.usa-focus,.usa-table th[data-sortable][aria-sort=ascending] .usa-table__header__button[aria-disabled=true].usa-focus,.usa-table th[data-sortable][aria-sort=ascending] .usa-table__header__button:disabled,.usa-table th[data-sortable][aria-sort=ascending] .usa-table__header__button[aria-disabled=true],.usa-table th[data-sortable][aria-sort=ascending] .usa-table__header__button.usa-button--disabled{background-color:transparent;-webkit-box-shadow:none;box-shadow:none;text-decoration:underline}.usa-table th[data-sortable][aria-sort=ascending] .usa-table__header__button.usa-button--hover{color:#1a4480}.usa-table th[data-sortable][aria-sort=ascending] .usa-table__header__button.usa-button--active{color:#162e51}.usa-table th[data-sortable][aria-sort=ascending] .usa-table__header__button:disabled,.usa-table th[data-sortable][aria-sort=ascending] .usa-table__header__button[aria-disabled=true],.usa-table th[data-sortable][aria-sort=ascending] .usa-table__header__button:disabled:hover,.usa-table th[data-sortable][aria-sort=ascending] .usa-table__header__button[aria-disabled=true]:hover,.usa-table th[data-sortable][aria-sort=ascending] .usa-table__header__button[aria-disabled=true]:focus{color:#757575}@media (forced-colors: active){.usa-table th[data-sortable][aria-sort=ascending] .usa-table__header__button:disabled,.usa-table th[data-sortable][aria-sort=ascending] .usa-table__header__button[aria-disabled=true],.usa-table th[data-sortable][aria-sort=ascending] .usa-table__header__button:disabled:hover,.usa-table th[data-sortable][aria-sort=ascending] .usa-table__header__button[aria-disabled=true]:hover,.usa-table th[data-sortable][aria-sort=ascending] .usa-table__header__button[aria-disabled=true]:focus{color:GrayText}}.usa-table th[data-sortable][aria-sort=ascending] .usa-table__header__button .usa-icon{height:1.5rem;width:1.5rem;vertical-align:middle}.usa-table th[data-sortable][aria-sort=ascending] .usa-table__header__button .usa-icon>g{fill:transparent}.usa-table th[data-sortable][aria-sort=ascending] .usa-table__header__button .usa-icon>g.ascending{fill:#1b1b1b}.usa-table thead th[aria-sort]{background-color:#97d4ea;color:#1b1b1b}.usa-table td[data-sort-active],.usa-table th[data-sort-active]{background-color:#e1f3f8;color:#1b1b1b}.usa-table--borderless thead{}.usa-table--borderless thead th{background-color:white;border-top:0;color:#1b1b1b}.usa-table--borderless thead th[aria-sort]{color:#1b1b1b}.usa-table--borderless thead th[data-sortable]:not([aria-sort]) .usa-table__header__button .usa-icon>g.unsorted{fill:#1b1b1b}.usa-table--borderless thead th[data-sortable]:not([aria-sort]) .usa-table__header__button:hover .usa-icon>g.unsorted{fill:black}.usa-table--borderless th,.usa-table--borderless td{border-left:0;border-right:0}.usa-table--compact th,.usa-table--compact td{padding:0.25rem 0.75rem}.usa-table--striped tbody tr:nth-child(odd) td,.usa-table--striped tbody tr:nth-child(odd) th{background-color:#f0f0f0;color:#1b1b1b}.usa-table--striped tbody tr:nth-child(odd) td[data-sort-active],.usa-table--striped tbody tr:nth-child(odd) th[data-sort-active]{background-color:#c3ebfa;color:#1b1b1b}@media all and (max-width: 29.99em){.usa-table--stacked thead{display:none}.usa-table--stacked th,.usa-table--stacked td{border-bottom-width:0;display:block;width:100%}.usa-table--stacked tr{border-bottom:0.25rem solid #1b1b1b;border-top-width:0;width:100%}.usa-table--stacked tr th:first-child,.usa-table--stacked tr td:first-child{border-top-width:0}.usa-table--stacked tr:nth-child(odd) td,.usa-table--stacked tr:nth-child(odd) th{background-color:inherit}.usa-table--stacked tr:first-child th:first-child,.usa-table--stacked tr:first-child td:first-child{border-top:0.25rem solid #1b1b1b}.usa-table--stacked th[data-label],.usa-table--stacked td[data-label]{padding-bottom:0.75rem}.usa-table--stacked th[data-label]:before,.usa-table--stacked td[data-label]:before{content:attr(data-label);display:block;font-weight:700;margin:-0.5rem -1rem 0rem;padding:0.75rem 1rem 0.25rem}}@media all and (max-width: 29.99em){.usa-table--stacked-header thead{display:none}.usa-table--stacked-header th,.usa-table--stacked-header td{border-bottom-width:0;display:block;width:100%}.usa-table--stacked-header tr{border-bottom:0.25rem solid #1b1b1b;border-top-width:0;width:100%}.usa-table--stacked-header tr th:first-child,.usa-table--stacked-header tr td:first-child{border-top-width:0}.usa-table--stacked-header tr:nth-child(odd) td,.usa-table--stacked-header tr:nth-child(odd) th{background-color:inherit}.usa-table--stacked-header tr:first-child th:first-child,.usa-table--stacked-header tr:first-child td:first-child{border-top:0.25rem solid #1b1b1b}.usa-table--stacked-header th[data-label],.usa-table--stacked-header td[data-label]{padding-bottom:0.75rem}.usa-table--stacked-header th[data-label]:before,.usa-table--stacked-header td[data-label]:before{content:attr(data-label);display:block;font-weight:700;margin:-0.5rem -1rem 0rem;padding:0.75rem 1rem 0.25rem}.usa-table--stacked-header tr td:first-child,.usa-table--stacked-header tr th:first-child{font-family:Source Sans Pro Web, Helvetica Neue, Helvetica, Roboto, Arial, sans-serif;font-size:1.06rem;line-height:1.1;background-color:#dfe1e2;color:#1b1b1b;font-weight:700;padding:0.75rem 1rem}.usa-table--stacked-header tr td:first-child:before,.usa-table--stacked-header tr th:first-child:before{display:none}}.width-mobile .usa-table--stacked thead{display:none}.width-mobile .usa-table--stacked th,.width-mobile .usa-table--stacked td{border-bottom-width:0;display:block;width:100%}.width-mobile .usa-table--stacked tr{border-bottom:0.25rem solid #1b1b1b;border-top-width:0;width:100%}.width-mobile .usa-table--stacked tr th:first-child,.width-mobile .usa-table--stacked tr td:first-child{border-top-width:0}.width-mobile .usa-table--stacked tr:nth-child(odd) td,.width-mobile .usa-table--stacked tr:nth-child(odd) th{background-color:inherit}.width-mobile .usa-table--stacked tr:first-child th:first-child,.width-mobile .usa-table--stacked tr:first-child td:first-child{border-top:0.25rem solid #1b1b1b}.width-mobile .usa-table--stacked th[data-label],.width-mobile .usa-table--stacked td[data-label]{padding-bottom:0.75rem}.width-mobile .usa-table--stacked th[data-label]:before,.width-mobile .usa-table--stacked td[data-label]:before{content:attr(data-label);display:block;font-weight:700;margin:-0.5rem -1rem 0rem;padding:0.75rem 1rem 0.25rem}.width-mobile .usa-table--stacked-header thead{display:none}.width-mobile .usa-table--stacked-header th,.width-mobile .usa-table--stacked-header td{border-bottom-width:0;display:block;width:100%}.width-mobile .usa-table--stacked-header tr{border-bottom:0.25rem solid #1b1b1b;border-top-width:0;width:100%}.width-mobile .usa-table--stacked-header tr th:first-child,.width-mobile .usa-table--stacked-header tr td:first-child{border-top-width:0}.width-mobile .usa-table--stacked-header tr:nth-child(odd) td,.width-mobile .usa-table--stacked-header tr:nth-child(odd) th{background-color:inherit}.width-mobile .usa-table--stacked-header tr:first-child th:first-child,.width-mobile .usa-table--stacked-header tr:first-child td:first-child{border-top:0.25rem solid #1b1b1b}.width-mobile .usa-table--stacked-header th[data-label],.width-mobile .usa-table--stacked-header td[data-label]{padding-bottom:0.75rem}.width-mobile .usa-table--stacked-header th[data-label]:before,.width-mobile .usa-table--stacked-header td[data-label]:before{content:attr(data-label);display:block;font-weight:700;margin:-0.5rem -1rem 0rem;padding:0.75rem 1rem 0.25rem}.width-mobile .usa-table--stacked-header tr td:first-child,.width-mobile .usa-table--stacked-header tr th:first-child{font-family:Source Sans Pro Web, Helvetica Neue, Helvetica, Roboto, Arial, sans-serif;font-size:1.06rem;line-height:1.1;background-color:#dfe1e2;color:#1b1b1b;font-weight:700;padding:0.75rem 1rem}.width-mobile .usa-table--stacked-header tr td:first-child:before,.width-mobile .usa-table--stacked-header tr th:first-child:before{display:none}.usa-table--sticky-header{border:1px solid #1b1b1b;border-collapse:separate}.usa-table--sticky-header td,.usa-table--sticky-header th{border-left:none;border-top:none}.usa-table--sticky-header td:last-child,.usa-table--sticky-header th:last-child{border-right:none}.usa-table--sticky-header tbody tr:last-child td,.usa-table--sticky-header tbody tr:last-child th{border-bottom:none}.usa-table--sticky-header thead{position:-webkit-sticky;position:sticky;top:-1px}.usa-table--sticky-header.usa-table--borderless{border:none}.usa-table--sticky-header.usa-table--borderless thead th{background-color:white}.usa-table--sticky-header.usa-table--borderless td,.usa-table--sticky-header.usa-table--borderless th{border-right:none}.usa-table-container--scrollable{margin:1.25rem 0;overflow-y:hidden}.usa-table-container--scrollable .usa-table{margin:0}.usa-table-container--scrollable td{white-space:nowrap}va-table-row{display:none}',VaTableStyle0=vaTableCss,VaTable$1=proxyCustomElement(class extends HTMLElement{constructor(){super(),this.__registerHost(),this.__attachShadow(),this.tableTitle=void 0,this.tableType="borderless",this.stacked=!0,this.scrollable=!1,this.sortable=!1,this.striped=!1,this.fullWidth=!1,this.rightAlignCols=void 0,this.rows=void 0,this.cols=void 0,this.cells=null}getCellsInRow(a){const t=Array.from(a.querySelectorAll(":scope > span"));return this.cols||(this.cols=t.length),t}getRows(){const a=Array.from(this.el.querySelectorAll("va-table-row"));return a.forEach((a=>a.removeAttribute("role"))),this.rows||(this.rows=a.length),a}getAllCells(a=this.getRows()){const t=[];let e=0;for(const r of a){const a=this.getCellsInRow(r);a.forEach((a=>{a.setAttribute("slot",`va-table-slot-${e}`),e++})),t.push(...a)}this.cells=t}makeFragment(){const a=document.createDocumentFragment();return this.cells.forEach((t=>{a.appendChild(t.cloneNode(!0))})),a}makeVATable(a,t){const e=document.createElement("va-table-inner");e.setAttribute("rows",`${this.rows}`),e.setAttribute("cols",`${this.cols}`),e.setAttribute("stacked",this.stacked&&!this.sortable?"true":"false"),e.setAttribute("sortable",`${this.sortable}`),e.setAttribute("scrollable",this.scrollable?"true":"false"),e.setAttribute("striped",this.striped?"true":"false"),this.sortable&&a&&t&&(e.dataset.sortdir=a,e.dataset.sortindex=`${t}`),this.tableTitle&&e.setAttribute("table-title",this.tableTitle),this.tableType&&e.setAttribute("table-type",this.tableType),this.fullWidth&&e.setAttribute("full-width",String(this.fullWidth)),this.rightAlignCols&&e.setAttribute("right-align-cols",this.rightAlignCols);const r=this.makeFragment();return e.appendChild(r),e}resetVaTableInner(){const a=this.el.querySelector("va-table-inner");a&&(a.remove(),this.rows=null,this.cols=null,this.cells=null)}watchForDataChanges(){const a=this.el.querySelectorAll("va-table-row")[1];this.observer=new MutationObserver((()=>{this.resetVaTableInner(),this.addVaTableInner()})),this.observer.observe(a,{childList:!0,subtree:!0,characterData:!0})}disconnectedCallback(){this.observer&&this.observer.disconnect()}addVaTableInner(a=null,t=null){this.getAllCells();const e=this.makeVATable(a,t);this.el.appendChild(e)}componentWillLoad(){this.addVaTableInner(),this.watchForDataChanges()}doSort(a){a.stopPropagation();const{index:t,sortdir:e}=a.detail,[r,...s]=this.getRows(),o=getCompareFunc.bind(this)(s,t,e);if(null!==o){s.sort(((a,e)=>{const r=a.children[t],s=e.children[t],l=r.getAttribute("data-sort-value"),d=s.getAttribute("data-sort-value");if(null!==l&&null!==d)return o(l,d);const b=null!==l?l:r.innerHTML.trim(),i=null!==d?d:s.innerHTML.trim();return o(b,i)}));const a=[r,...s];this.resetVaTableInner(),this.el.replaceChildren(...a),this.addVaTableInner("ascending"===e?"descending":"ascending",t)}}render(){return h(Host,{key:"4e6b5e26e8d5aaf2f5886dbf3bb8b0c8216dd060"},h("slot",{key:"bb7ca14a1a8d4f028267911a5effa863a6426d08"}))}get el(){return this}static get style(){return VaTableStyle0}},[1,"va-table",{tableTitle:[1,"table-title"],tableType:[1,"table-type"],stacked:[4],scrollable:[4],sortable:[4],striped:[4],fullWidth:[4,"full-width"],rightAlignCols:[1,"right-align-cols"],rows:[32],cols:[32],cells:[32]},[[0,"sortTable","doSort"]]]);function defineCustomElement$1(){"undefined"!=typeof customElements&&["va-table","va-icon","va-table-inner"].forEach((a=>{switch(a){case"va-table":customElements.get(a)||customElements.define(a,VaTable$1);break;case"va-icon":customElements.get(a)||defineCustomElement$3();break;case"va-table-inner":customElements.get(a)||defineCustomElement$2()}}))}const VaTable=VaTable$1,defineCustomElement=defineCustomElement$1;export{VaTable,defineCustomElement};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{proxyCustomElement,HTMLElement,createEvent,h,Host}from"@stencil/core/internal/client";import{c as classnames}from"./index2.js";import"./i18n-setup.js";import"./contacts.js";import{n as normalizeArguments,p as parsePhoneNumberWithError$2,a as parsePhoneNumber,c as checkNumberLength,f as formatNationalNumberUsingFormat,b as parseDigits,F as FIRST_GROUP_PATTERN,d as applyInternationalSeparatorStyle,V as VALID_PUNCTUATION,e as extractCountryCallingCode,g as extractNationalNumberFromPossiblyIncompleteNumber,s as stripIddPrefix,h as extractCountryCallingCodeFromInternationalNumberWithoutPlusSign,i as VALID_DIGITS,P as PLUS_CHARS,M as Metadata,j as getCountryByCallingCode,k as getCountryByNationalNumber,l as PhoneNumber,m as isObject,w as withMetadataArgument,o as metadata,q as isSupportedCountry$1,r as getCountryCallingCode$1}from"./parsePhoneNumber_.js";import{e as getArticle}from"./utils.js";import{d as defineCustomElement$4}from"./va-combo-box2.js";import{d as defineCustomElement$3}from"./va-icon2.js";import{d as defineCustomElement$2}from"./va-text-input2.js";import{i as instance}from"./i18next.js";function parsePhoneNumberWithError$1(){var n=normalizeArguments(arguments),e=n.text,t=n.options,a=n.metadata;return parsePhoneNumberWithError$2(e,t,a)}function ownKeys(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(n);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),t.push.apply(t,a)}return t}function _objectSpread(n){for(var e=1;e<arguments.length;e++){var t=null!=arguments[e]?arguments[e]:{};e%2?ownKeys(Object(t),!0).forEach((function(e){_defineProperty(n,e,t[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(t,e))}))}return n}function _defineProperty(n,e,t){return e in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function isPossiblePhoneNumber$1(){var n=normalizeArguments(arguments),e=n.text,t=n.options,a=n.metadata;t=_objectSpread(_objectSpread({},t),{},{extract:!1});var r=parsePhoneNumber(e,t,a);return r&&r.isPossible()||!1}function _classCallCheck$5(n,e){if(!(n instanceof e))throw new TypeError("Cannot call a class as a function")}function _defineProperties$5(n,e){for(var t=0;t<e.length;t++){var a=e[t];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(n,a.key,a)}}function _createClass$5(n,e,t){return e&&_defineProperties$5(n.prototype,e),t&&_defineProperties$5(n,t),Object.defineProperty(n,"prototype",{writable:!1}),n}var AsYouTypeState=function(){function n(e){var t=e.onCountryChange,a=e.onCallingCodeChange;_classCallCheck$5(this,n),this.onCountryChange=t,this.onCallingCodeChange=a}return _createClass$5(n,[{key:"reset",value:function(n){var e=n.country,t=n.callingCode;this.international=!1,this.missingPlus=!1,this.IDDPrefix=void 0,this.callingCode=void 0,this.digits="",this.resetNationalSignificantNumber(),this.initCountryAndCallingCode(e,t)}},{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(n){for(var e=0,t=Object.keys(n);e<t.length;e++){var a=t[e];this[a]=n[a]}}},{key:"initCountryAndCallingCode",value:function(n,e){this.setCountry(n),this.setCallingCode(e)}},{key:"setCountry",value:function(n){this.country=n,this.onCountryChange(n)}},{key:"setCallingCode",value:function(n){this.callingCode=n,this.onCallingCodeChange(n,this.country)}},{key:"startInternationalNumber",value:function(n,e){this.international=!0,this.initCountryAndCallingCode(n,e)}},{key:"appendDigits",value:function(n){this.digits+=n}},{key:"appendNationalSignificantNumberDigits",value:function(n){this.nationalSignificantNumber+=n}},{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}}]),n}();function _createForOfIteratorHelperLoose$2(n,e){var t="undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(t)return(t=t.call(n)).next.bind(t);if(Array.isArray(n)||(t=_unsupportedIterableToArray$4(n))||e&&n&&"number"==typeof n.length){t&&(n=t);var a=0;return function(){return a>=n.length?{done:!0}:{done:!1,value:n[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 _unsupportedIterableToArray$4(n,e){if(n){if("string"==typeof n)return _arrayLikeToArray$4(n,e);var t=Object.prototype.toString.call(n).slice(8,-1);return"Object"===t&&n.constructor&&(t=n.constructor.name),"Map"===t||"Set"===t?Array.from(n):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?_arrayLikeToArray$4(n,e):void 0}}function _arrayLikeToArray$4(n,e){(null==e||e>n.length)&&(e=n.length);for(var t=0,a=new Array(e);t<e;t++)a[t]=n[t];return a}var DIGIT_PLACEHOLDER="x",DIGIT_PLACEHOLDER_MATCHER=new RegExp(DIGIT_PLACEHOLDER);function repeat(n,e){if(e<1)return"";for(var t="";e>1;)1&e&&(t+=n),e>>=1,n+=n;return t+n}function cutAndStripNonPairedParens(n,e){return")"===n[e]&&e++,stripNonPairedParens(n.slice(0,e))}function stripNonPairedParens(n){for(var e=[],t=0;t<n.length;)"("===n[t]?e.push(t):")"===n[t]&&e.pop(),t++;var a=0,r="";e.push(n.length);for(var o=0,i=e;o<i.length;o++){var s=i[o];r+=n.slice(a,s),a=s+1}return r}function populateTemplateWithDigits(n,e,t){for(var a,r=_createForOfIteratorHelperLoose$2(t.split(""));!(a=r()).done;){var o=a.value;if(n.slice(e+1).search(DIGIT_PLACEHOLDER_MATCHER)<0)return;e=n.search(DIGIT_PLACEHOLDER_MATCHER),n=n.replace(DIGIT_PLACEHOLDER_MATCHER,o)}return[n,e]}function formatCompleteNumber(n,e,t){var a=t.metadata,r=t.shouldTryNationalPrefixFormattingRule,o=t.getSeparatorAfterNationalPrefix;if(new RegExp("^(?:".concat(e.pattern(),")$")).test(n.nationalSignificantNumber))return formatNationalNumberWithAndWithoutNationalPrefixFormattingRule(n,e,{metadata:a,shouldTryNationalPrefixFormattingRule:r,getSeparatorAfterNationalPrefix:o})}function canFormatCompleteNumber(n,e){return"IS_POSSIBLE"===checkNumberLength(n,e)}function formatNationalNumberWithAndWithoutNationalPrefixFormattingRule(n,e,t){var a=t.metadata,r=t.shouldTryNationalPrefixFormattingRule,o=t.getSeparatorAfterNationalPrefix;if(r(e)){var i=formatNationalNumber(n,e,{useNationalPrefixFormattingRule:!0,getSeparatorAfterNationalPrefix:o,metadata:a});if(i)return i}return formatNationalNumber(n,e,{useNationalPrefixFormattingRule:!1,getSeparatorAfterNationalPrefix:o,metadata:a})}function formatNationalNumber(n,e,t){var a=t.metadata,r=t.useNationalPrefixFormattingRule,o=t.getSeparatorAfterNationalPrefix,i=formatNationalNumberUsingFormat(n.nationalSignificantNumber,e,{carrierCode:n.carrierCode,useInternationalFormat:n.international,withNationalPrefix:r,metadata:a});if(r||(n.nationalPrefix?i=n.nationalPrefix+o(e)+i:n.complexPrefixBeforeNationalSignificantNumber&&(i=n.complexPrefixBeforeNationalSignificantNumber+" "+i)),isValidFormattedNationalNumber(i,n))return i}function isValidFormattedNationalNumber(n,e){return parseDigits(n)===e.getNationalDigits()}function _classCallCheck$4(n,e){if(!(n instanceof e))throw new TypeError("Cannot call a class as a function")}function _defineProperties$4(n,e){for(var t=0;t<e.length;t++){var a=e[t];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(n,a.key,a)}}function _createClass$4(n,e,t){return e&&_defineProperties$4(n.prototype,e),t&&_defineProperties$4(n,t),Object.defineProperty(n,"prototype",{writable:!1}),n}var PatternParser=function(){function n(){_classCallCheck$4(this,n)}return _createClass$4(n,[{key:"parse",value:function(n){if(this.context=[{or:!0,instructions:[]}],this.parsePattern(n),1!==this.context.length)throw new Error("Non-finalized contexts left when pattern parse ended");var e=this.context[0],t=e.branches,a=e.instructions;if(t)return{op:"|",args:t.concat([expandSingleElementArray(a)])};if(0===a.length)throw new Error("Pattern is required");return 1===a.length?a[0]:a}},{key:"startContext",value:function(n){this.context.push(n)}},{key:"endContext",value:function(){this.context.pop()}},{key:"getContext",value:function(){return this.context[this.context.length-1]}},{key:"parsePattern",value:function(n){if(!n)throw new Error("Pattern is required");var e=n.match(OPERATOR);if(e){var t=e[1],a=n.slice(0,e.index),r=n.slice(e.index+t.length);switch(t){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 o=this.getContext().branches;o.push(expandSingleElementArray(this.getContext().instructions)),this.endContext(),this.getContext().instructions.push({op:"|",args:o});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(expandSingleElementArray(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:parseOneOfSet(a)});break;default:throw new Error("Unknown operator: ".concat(t))}r&&this.parsePattern(r)}else{if(ILLEGAL_CHARACTER_REGEXP.test(n))throw new Error("Illegal characters found in a pattern: ".concat(n));this.getContext().instructions=this.getContext().instructions.concat(n.split(""))}}}]),n}();function parseOneOfSet(n){for(var e=[],t=0;t<n.length;){if("-"===n[t]){if(0===t||t===n.length-1)throw new Error("Couldn't parse a one-of set pattern: ".concat(n));for(var a=n[t-1].charCodeAt(0)+1,r=n[t+1].charCodeAt(0)-1,o=a;o<=r;)e.push(String.fromCharCode(o)),o++}else e.push(n[t]);t++}return e}var ILLEGAL_CHARACTER_REGEXP=/[\(\)\[\]\?\:\|]/,OPERATOR=new RegExp("(\\||\\(\\?\\:|\\)|\\[|\\])");function expandSingleElementArray(n){return 1===n.length?n[0]:n}function _createForOfIteratorHelperLoose$1(n,e){var t="undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(t)return(t=t.call(n)).next.bind(t);if(Array.isArray(n)||(t=_unsupportedIterableToArray$3(n))||e&&n&&"number"==typeof n.length){t&&(n=t);var a=0;return function(){return a>=n.length?{done:!0}:{done:!1,value:n[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 _unsupportedIterableToArray$3(n,e){if(n){if("string"==typeof n)return _arrayLikeToArray$3(n,e);var t=Object.prototype.toString.call(n).slice(8,-1);return"Object"===t&&n.constructor&&(t=n.constructor.name),"Map"===t||"Set"===t?Array.from(n):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?_arrayLikeToArray$3(n,e):void 0}}function _arrayLikeToArray$3(n,e){(null==e||e>n.length)&&(e=n.length);for(var t=0,a=new Array(e);t<e;t++)a[t]=n[t];return a}function _classCallCheck$3(n,e){if(!(n instanceof e))throw new TypeError("Cannot call a class as a function")}function _defineProperties$3(n,e){for(var t=0;t<e.length;t++){var a=e[t];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(n,a.key,a)}}function _createClass$3(n,e,t){return e&&_defineProperties$3(n.prototype,e),t&&_defineProperties$3(n,t),Object.defineProperty(n,"prototype",{writable:!1}),n}var PatternMatcher=function(){function n(e){_classCallCheck$3(this,n),this.matchTree=(new PatternParser).parse(e)}return _createClass$3(n,[{key:"match",value:function(n){var e=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).allowOverflow;if(!n)throw new Error("String is required");var t=_match(n.split(""),this.matchTree,!0);if(t&&t.match&&delete t.matchedChars,!t||!t.overflow||e)return t}}]),n}();function _match(n,e,t){if("string"==typeof e){var a=n.join("");return 0===e.indexOf(a)?n.length===e.length?{match:!0,matchedChars:n}:{partialMatch:!0}:0===a.indexOf(e)?t&&n.length>e.length?{overflow:!0}:{match:!0,matchedChars:n.slice(0,e.length)}:void 0}if(Array.isArray(e)){for(var r=n.slice(),o=0;o<e.length;){var i=_match(r,e[o],t&&o===e.length-1);if(!i)return;if(i.overflow)return i;if(!i.match){if(i.partialMatch)return{partialMatch:!0};throw new Error("Unsupported match result:\n".concat(JSON.stringify(i,null,2)))}if(0===(r=r.slice(i.matchedChars.length)).length)return o===e.length-1?{match:!0,matchedChars:n}:{partialMatch:!0};o++}return t?{overflow:!0}:{match:!0,matchedChars:n.slice(0,n.length-r.length)}}switch(e.op){case"|":for(var s,l,u=_createForOfIteratorHelperLoose$1(e.args);!(l=u()).done;){var c=_match(n,l.value,t);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 d,h=_createForOfIteratorHelperLoose$1(e.args);!(d=h()).done;){var f=d.value;if(n[0]===f)return 1===n.length?{match:!0,matchedChars:n}:t?{overflow:!0}:{match:!0,matchedChars:[f]}}return;default:throw new Error("Unsupported instruction tree: ".concat(e))}}function _createForOfIteratorHelperLoose(n,e){var t="undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(t)return(t=t.call(n)).next.bind(t);if(Array.isArray(n)||(t=_unsupportedIterableToArray$2(n))||e&&n&&"number"==typeof n.length){t&&(n=t);var a=0;return function(){return a>=n.length?{done:!0}:{done:!1,value:n[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 _unsupportedIterableToArray$2(n,e){if(n){if("string"==typeof n)return _arrayLikeToArray$2(n,e);var t=Object.prototype.toString.call(n).slice(8,-1);return"Object"===t&&n.constructor&&(t=n.constructor.name),"Map"===t||"Set"===t?Array.from(n):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?_arrayLikeToArray$2(n,e):void 0}}function _arrayLikeToArray$2(n,e){(null==e||e>n.length)&&(e=n.length);for(var t=0,a=new Array(e);t<e;t++)a[t]=n[t];return a}function _classCallCheck$2(n,e){if(!(n instanceof e))throw new TypeError("Cannot call a class as a function")}function _defineProperties$2(n,e){for(var t=0;t<e.length;t++){var a=e[t];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(n,a.key,a)}}function _createClass$2(n,e,t){return e&&_defineProperties$2(n.prototype,e),t&&_defineProperties$2(n,t),Object.defineProperty(n,"prototype",{writable:!1}),n}var DUMMY_DIGIT="9",LONGEST_NATIONAL_PHONE_NUMBER_LENGTH=15,LONGEST_DUMMY_PHONE_NUMBER=repeat(DUMMY_DIGIT,LONGEST_NATIONAL_PHONE_NUMBER_LENGTH),NATIONAL_PREFIX_SEPARATORS_PATTERN=/[- ]/,CREATE_CHARACTER_CLASS_PATTERN=function(){return/\[([^\[\]])*\]/g},CREATE_STANDALONE_DIGIT_PATTERN=function(){return/\d(?=[^,}][^,}])/g},NON_ALTERING_FORMAT_REG_EXP=new RegExp("["+VALID_PUNCTUATION+"]*\\$1["+VALID_PUNCTUATION+"]*(\\$\\d["+VALID_PUNCTUATION+"]*)*$"),MIN_LEADING_DIGITS_LENGTH=3,AsYouTypeFormatter=function(){function n(e){var t=e.metadata;_classCallCheck$2(this,n),this.metadata=t,this.resetFormat()}return _createClass$2(n,[{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(n,e){this.resetFormat(),n?(this.isNANP="1"===n.callingCode(),this.matchingFormats=n.formats(),e.nationalSignificantNumber&&this.narrowDownMatchingFormats(e)):(this.isNANP=void 0,this.matchingFormats=[])}},{key:"format",value:function(n,e){var t=this;if(canFormatCompleteNumber(e.nationalSignificantNumber,this.metadata))for(var a,r=_createForOfIteratorHelperLoose(this.matchingFormats);!(a=r()).done;){var o=a.value,i=formatCompleteNumber(e,o,{metadata:this.metadata,shouldTryNationalPrefixFormattingRule:function(n){return t.shouldTryNationalPrefixFormattingRule(n,{international:e.international,nationalPrefix:e.nationalPrefix})},getSeparatorAfterNationalPrefix:function(n){return t.getSeparatorAfterNationalPrefix(n)}});if(i)return this.resetFormat(),this.chosenFormat=o,this.setNationalNumberTemplate(i.replace(/\d/g,DIGIT_PLACEHOLDER),e),this.populatedNationalNumberTemplate=i,this.populatedNationalNumberTemplatePosition=this.template.lastIndexOf(DIGIT_PLACEHOLDER),i}return this.formatNationalNumberWithNextDigits(n,e)}},{key:"formatNationalNumberWithNextDigits",value:function(n,e){var t=this.chosenFormat,a=this.chooseFormat(e);if(a)return a===t?this.formatNextNationalNumberDigits(n):this.formatNextNationalNumberDigits(e.getNationalDigits())}},{key:"narrowDownMatchingFormats",value:function(n){var e=this,t=n.nationalSignificantNumber,a=n.nationalPrefix,r=n.international,o=t,i=o.length-MIN_LEADING_DIGITS_LENGTH;i<0&&(i=0),this.matchingFormats=this.matchingFormats.filter((function(n){return e.formatSuits(n,r,a)&&e.formatMatches(n,o,i)})),this.chosenFormat&&-1===this.matchingFormats.indexOf(this.chosenFormat)&&this.resetFormat()}},{key:"formatSuits",value:function(n,e,t){return!(t&&!n.usesNationalPrefix()&&!n.nationalPrefixIsOptionalWhenFormattingInNationalFormat()||!e&&!t&&n.nationalPrefixIsMandatoryWhenFormattingInNationalFormat())}},{key:"formatMatches",value:function(n,e,t){var a=n.leadingDigitsPatterns().length;if(0===a)return!0;t=Math.min(t,a-1);var r=n.leadingDigitsPatterns()[t];if(e.length<MIN_LEADING_DIGITS_LENGTH)try{return void 0!==new PatternMatcher(r).match(e,{allowOverflow:!0})}catch(n){return console.error(n),!0}return new RegExp("^(".concat(r,")")).test(e)}},{key:"getFormatFormat",value:function(n,e){return e?n.internationalFormat():n.format()}},{key:"chooseFormat",value:function(n){for(var e,t=this,a=function(){var a=e.value;return t.chosenFormat===a?"break":NON_ALTERING_FORMAT_REG_EXP.test(t.getFormatFormat(a,n.international))?t.createTemplateForFormat(a,n)?(t.chosenFormat=a,"break"):(t.matchingFormats=t.matchingFormats.filter((function(n){return n!==a})),"continue"):"continue"},r=_createForOfIteratorHelperLoose(this.matchingFormats.slice());!(e=r()).done;){if("break"===a())break}return this.chosenFormat||this.resetFormat(),this.chosenFormat}},{key:"createTemplateForFormat",value:function(n,e){if(!(n.pattern().indexOf("|")>=0)){var t=this.getTemplateForFormat(n,e);return t?(this.setNationalNumberTemplate(t,e),!0):void 0}}},{key:"getSeparatorAfterNationalPrefix",value:function(n){return this.isNANP||n&&n.nationalPrefixFormattingRule()&&NATIONAL_PREFIX_SEPARATORS_PATTERN.test(n.nationalPrefixFormattingRule())?" ":""}},{key:"getInternationalPrefixBeforeCountryCallingCode",value:function(n,e){var t=n.IDDPrefix,a=n.missingPlus;return t?e&&!1===e.spacing?t:t+" ":a?"":"+"}},{key:"getTemplate",value:function(n){if(this.template){for(var e=-1,t=0,a=n.international?this.getInternationalPrefixBeforeCountryCallingCode(n,{spacing:!1}):"";t<a.length+n.getDigitsWithoutInternationalPrefix().length;)e=this.template.indexOf(DIGIT_PLACEHOLDER,e+1),t++;return cutAndStripNonPairedParens(this.template,e+1)}}},{key:"setNationalNumberTemplate",value:function(n,e){this.nationalNumberTemplate=n,this.populatedNationalNumberTemplate=n,this.populatedNationalNumberTemplatePosition=-1,e.international?this.template=this.getInternationalPrefixBeforeCountryCallingCode(e).replace(/[\d\+]/g,DIGIT_PLACEHOLDER)+repeat(DIGIT_PLACEHOLDER,e.callingCode.length)+" "+n:this.template=n}},{key:"getTemplateForFormat",value:function(n,e){var t=e.nationalSignificantNumber,a=e.international,r=e.nationalPrefix,o=e.complexPrefixBeforeNationalSignificantNumber,i=n.pattern();i=i.replace(CREATE_CHARACTER_CLASS_PATTERN(),"\\d").replace(CREATE_STANDALONE_DIGIT_PATTERN(),"\\d");var s=LONGEST_DUMMY_PHONE_NUMBER.match(i)[0];if(!(t.length>s.length)){var l=new RegExp("^"+i+"$"),u=t.replace(/\d/g,DUMMY_DIGIT);l.test(u)&&(s=u);var c,d=this.getFormatFormat(n,a);if(this.shouldTryNationalPrefixFormattingRule(n,{international:a,nationalPrefix:r})){var h=d.replace(FIRST_GROUP_PATTERN,n.nationalPrefixFormattingRule());if(parseDigits(n.nationalPrefixFormattingRule())===(r||"")+parseDigits("$1")&&(d=h,c=!0,r))for(var f=r.length;f>0;)d=d.replace(/\d/,DIGIT_PLACEHOLDER),f--}var m=s.replace(new RegExp(i),d).replace(new RegExp(DUMMY_DIGIT,"g"),DIGIT_PLACEHOLDER);return c||(o?m=repeat(DIGIT_PLACEHOLDER,o.length)+" "+m:r&&(m=repeat(DIGIT_PLACEHOLDER,r.length)+this.getSeparatorAfterNationalPrefix(n)+m)),a&&(m=applyInternationalSeparatorStyle(m)),m}}},{key:"formatNextNationalNumberDigits",value:function(n){var e=populateTemplateWithDigits(this.populatedNationalNumberTemplate,this.populatedNationalNumberTemplatePosition,n);if(e)return this.populatedNationalNumberTemplate=e[0],this.populatedNationalNumberTemplatePosition=e[1],cutAndStripNonPairedParens(this.populatedNationalNumberTemplate,this.populatedNationalNumberTemplatePosition+1);this.resetFormat()}},{key:"shouldTryNationalPrefixFormattingRule",value:function(n,e){var t=e.international,a=e.nationalPrefix;if(n.nationalPrefixFormattingRule()){var r=n.usesNationalPrefix();if(r&&a||!r&&!t)return!0}}}]),n}();function _slicedToArray$1(n,e){return _arrayWithHoles$1(n)||_iterableToArrayLimit$1(n,e)||_unsupportedIterableToArray$1(n,e)||_nonIterableRest$1()}function _nonIterableRest$1(){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 _unsupportedIterableToArray$1(n,e){if(n){if("string"==typeof n)return _arrayLikeToArray$1(n,e);var t=Object.prototype.toString.call(n).slice(8,-1);return"Object"===t&&n.constructor&&(t=n.constructor.name),"Map"===t||"Set"===t?Array.from(n):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?_arrayLikeToArray$1(n,e):void 0}}function _arrayLikeToArray$1(n,e){(null==e||e>n.length)&&(e=n.length);for(var t=0,a=new Array(e);t<e;t++)a[t]=n[t];return a}function _iterableToArrayLimit$1(n,e){var t=null==n?null:"undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(null!=t){var a,r,o=[],i=!0,s=!1;try{for(t=t.call(n);!(i=(a=t.next()).done)&&(o.push(a.value),!e||o.length!==e);i=!0);}catch(n){s=!0,r=n}finally{try{i||null==t.return||t.return()}finally{if(s)throw r}}return o}}function _arrayWithHoles$1(n){if(Array.isArray(n))return n}function _classCallCheck$1(n,e){if(!(n instanceof e))throw new TypeError("Cannot call a class as a function")}function _defineProperties$1(n,e){for(var t=0;t<e.length;t++){var a=e[t];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(n,a.key,a)}}function _createClass$1(n,e,t){return e&&_defineProperties$1(n.prototype,e),t&&_defineProperties$1(n,t),Object.defineProperty(n,"prototype",{writable:!1}),n}var VALID_FORMATTED_PHONE_NUMBER_DIGITS_PART="["+VALID_PUNCTUATION+VALID_DIGITS+"]+",VALID_FORMATTED_PHONE_NUMBER_DIGITS_PART_PATTERN=new RegExp("^"+VALID_FORMATTED_PHONE_NUMBER_DIGITS_PART+"$","i"),VALID_FORMATTED_PHONE_NUMBER_PART="(?:["+PLUS_CHARS+"]["+VALID_PUNCTUATION+VALID_DIGITS+"]*|["+VALID_PUNCTUATION+VALID_DIGITS+"]+)",AFTER_PHONE_NUMBER_DIGITS_END_PATTERN=new RegExp("[^"+VALID_PUNCTUATION+VALID_DIGITS+"]+.*$"),COMPLEX_NATIONAL_PREFIX=/[^\d\[\]]/,AsYouTypeParser=function(){function n(e){var t=e.defaultCountry,a=e.defaultCallingCode,r=e.metadata,o=e.onNationalSignificantNumberChange;_classCallCheck$1(this,n),this.defaultCountry=t,this.defaultCallingCode=a,this.metadata=r,this.onNationalSignificantNumberChange=o}return _createClass$1(n,[{key:"input",value:function(n,e){var t,a=_slicedToArray$1(extractFormattedDigitsAndPlus(n),2),r=a[0],o=a[1],i=parseDigits(r);return o&&(e.digits||(e.startInternationalNumber(),i||(t=!0))),i&&this.inputDigits(i,e),{digits:i,justLeadingPlus:t}}},{key:"inputDigits",value:function(n,e){var t=e.digits,a=t.length<3&&t.length+n.length>=3;if(e.appendDigits(n),a&&this.extractIddPrefix(e),this.isWaitingForCountryCallingCode(e)){if(!this.extractCountryCallingCode(e))return}else e.appendNationalSignificantNumberDigits(n);e.international||this.hasExtractedNationalSignificantNumber||this.extractNationalSignificantNumber(e.getNationalDigits(),(function(n){return e.update(n)}))}},{key:"isWaitingForCountryCallingCode",value:function(n){var e=n.international,t=n.callingCode;return e&&!t}},{key:"extractCountryCallingCode",value:function(n){var e=extractCountryCallingCode("+"+n.getDigitsWithoutInternationalPrefix(),this.defaultCountry,this.defaultCallingCode,this.metadata.metadata),t=e.countryCallingCode,a=e.number;if(t)return n.setCallingCode(t),n.update({nationalSignificantNumber:a}),!0}},{key:"reset",value:function(n){if(n){this.hasSelectedNumberingPlan=!0;var e=n._nationalPrefixForParsing();this.couldPossiblyExtractAnotherNationalSignificantNumber=e&&COMPLEX_NATIONAL_PREFIX.test(e)}else this.hasSelectedNumberingPlan=void 0,this.couldPossiblyExtractAnotherNationalSignificantNumber=void 0}},{key:"extractNationalSignificantNumber",value:function(n,e){if(this.hasSelectedNumberingPlan){var t=extractNationalNumberFromPossiblyIncompleteNumber(n,this.metadata),a=t.nationalPrefix,r=t.nationalNumber,o=t.carrierCode;if(r!==n)return this.onExtractedNationalNumber(a,o,r,n,e),!0}}},{key:"extractAnotherNationalSignificantNumber",value:function(n,e,t){if(!this.hasExtractedNationalSignificantNumber)return this.extractNationalSignificantNumber(n,t);if(this.couldPossiblyExtractAnotherNationalSignificantNumber){var a=extractNationalNumberFromPossiblyIncompleteNumber(n,this.metadata),r=a.nationalPrefix,o=a.nationalNumber,i=a.carrierCode;if(o!==e)return this.onExtractedNationalNumber(r,i,o,n,t),!0}}},{key:"onExtractedNationalNumber",value:function(n,e,t,a,r){var o,i,s=a.lastIndexOf(t);if(s>=0&&s===a.length-t.length){i=!0;var l=a.slice(0,s);l!==n&&(o=l)}r({nationalPrefix:n,carrierCode:e,nationalSignificantNumber:t,nationalSignificantNumberMatchesInput:i,complexPrefixBeforeNationalSignificantNumber:o}),this.hasExtractedNationalSignificantNumber=!0,this.onNationalSignificantNumberChange()}},{key:"reExtractNationalSignificantNumber",value:function(n){return!!this.extractAnotherNationalSignificantNumber(n.getNationalDigits(),n.nationalSignificantNumber,(function(e){return n.update(e)}))||(this.extractIddPrefix(n)||this.fixMissingPlus(n)?(this.extractCallingCodeAndNationalSignificantNumber(n),!0):void 0)}},{key:"extractIddPrefix",value:function(n){var e=n.international,t=n.IDDPrefix,a=n.digits;if(!e&&!t){var r=stripIddPrefix(a,this.defaultCountry,this.defaultCallingCode,this.metadata.metadata);return void 0!==r&&r!==a?(n.update({IDDPrefix:a.slice(0,a.length-r.length)}),this.startInternationalNumber(n,{country:void 0,callingCode:void 0}),!0):void 0}}},{key:"fixMissingPlus",value:function(n){if(!n.international){var e=extractCountryCallingCodeFromInternationalNumberWithoutPlusSign(n.digits,this.defaultCountry,this.defaultCallingCode,this.metadata.metadata).countryCallingCode;if(e)return n.update({missingPlus:!0}),this.startInternationalNumber(n,{country:n.country,callingCode:e}),!0}}},{key:"startInternationalNumber",value:function(n,e){var t=e.country,a=e.callingCode;n.startInternationalNumber(t,a),n.nationalSignificantNumber&&(n.resetNationalSignificantNumber(),this.onNationalSignificantNumberChange(),this.hasExtractedNationalSignificantNumber=void 0)}},{key:"extractCallingCodeAndNationalSignificantNumber",value:function(n){this.extractCountryCallingCode(n)&&this.extractNationalSignificantNumber(n.getNationalDigits(),(function(e){return n.update(e)}))}}]),n}();function extractFormattedPhoneNumber(n){var e,t=n.search(VALID_FORMATTED_PHONE_NUMBER_PART);if(!(t<0))return"+"===(n=n.slice(t))[0]&&(e=!0,n=n.slice(1)),n=n.replace(AFTER_PHONE_NUMBER_DIGITS_END_PATTERN,""),e&&(n="+"+n),n}function _extractFormattedDigitsAndPlus(n){var e=extractFormattedPhoneNumber(n)||"";return"+"===e[0]?[e.slice(1),!0]:[e]}function extractFormattedDigitsAndPlus(n){var e=_slicedToArray$1(_extractFormattedDigitsAndPlus(n),2),t=e[0],a=e[1];return VALID_FORMATTED_PHONE_NUMBER_DIGITS_PART_PATTERN.test(t)||(t=""),[t,a]}function _slicedToArray(n,e){return _arrayWithHoles(n)||_iterableToArrayLimit(n,e)||_unsupportedIterableToArray(n,e)||_nonIterableRest()}function _nonIterableRest(){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 _unsupportedIterableToArray(n,e){if(n){if("string"==typeof n)return _arrayLikeToArray(n,e);var t=Object.prototype.toString.call(n).slice(8,-1);return"Object"===t&&n.constructor&&(t=n.constructor.name),"Map"===t||"Set"===t?Array.from(n):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?_arrayLikeToArray(n,e):void 0}}function _arrayLikeToArray(n,e){(null==e||e>n.length)&&(e=n.length);for(var t=0,a=new Array(e);t<e;t++)a[t]=n[t];return a}function _iterableToArrayLimit(n,e){var t=null==n?null:"undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(null!=t){var a,r,o=[],i=!0,s=!1;try{for(t=t.call(n);!(i=(a=t.next()).done)&&(o.push(a.value),!e||o.length!==e);i=!0);}catch(n){s=!0,r=n}finally{try{i||null==t.return||t.return()}finally{if(s)throw r}}return o}}function _arrayWithHoles(n){if(Array.isArray(n))return n}function _classCallCheck(n,e){if(!(n instanceof e))throw new TypeError("Cannot call a class as a function")}function _defineProperties(n,e){for(var t=0;t<e.length;t++){var a=e[t];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(n,a.key,a)}}function _createClass(n,e,t){return e&&_defineProperties(n.prototype,e),t&&_defineProperties(n,t),Object.defineProperty(n,"prototype",{writable:!1}),n}var AsYouType$1=function(){function n(e,t){_classCallCheck(this,n),this.metadata=new Metadata(t);var a=_slicedToArray(this.getCountryAndCallingCode(e),2),r=a[0],o=a[1];this.defaultCountry=r,this.defaultCallingCode=o,this.reset()}return _createClass(n,[{key:"getCountryAndCallingCode",value:function(n){var e,t;return n&&(isObject(n)?(e=n.defaultCountry,t=n.defaultCallingCode):e=n),e&&!this.metadata.hasCountry(e)&&(e=void 0),[e,t]}},{key:"input",value:function(n){var e=this.parser.input(n,this.state),t=e.digits;if(e.justLeadingPlus)this.formattedOutput="+";else if(t){var a;if(this.determineTheCountryIfNeeded(),this.state.nationalSignificantNumber&&this.formatter.narrowDownMatchingFormats(this.state),this.metadata.hasSelectedNumberingPlan()&&(a=this.formatter.format(t,this.state)),void 0===a&&this.parser.reExtractNationalSignificantNumber(this.state)){this.determineTheCountryIfNeeded();var r=this.state.getNationalDigits();r&&(a=this.formatter.format(r,this.state))}this.formattedOutput=a?this.getFullNumber(a):this.getNonFormattedNumber()}return this.formattedOutput}},{key:"reset",value:function(){var n=this;return this.state=new AsYouTypeState({onCountryChange:function(e){n.country=e},onCallingCodeChange:function(e,t){n.metadata.selectNumberingPlan(t,e),n.formatter.reset(n.metadata.numberingPlan,n.state),n.parser.reset(n.metadata.numberingPlan)}}),this.formatter=new AsYouTypeFormatter({state:this.state,metadata:this.metadata}),this.parser=new AsYouTypeParser({defaultCountry:this.defaultCountry,defaultCallingCode:this.defaultCallingCode,metadata:this.metadata,state:this.state,onNationalSignificantNumberChange:function(){n.determineTheCountryIfNeeded(),n.formatter.reset(n.metadata.numberingPlan,n.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(n){var e,t=this;if(this.isInternational()){var a=this.state.callingCode;return e=a?n?"".concat(a," ").concat(n):a:"".concat(this.state.getDigitsWithoutInternationalPrefix()),t.formatter.getInternationalPrefixBeforeCountryCallingCode(t.state,{spacing:!!e})+e}return n}},{key:"getNonFormattedNationalNumberWithPrefix",value:function(){var n=this.state,e=n.nationalSignificantNumber,t=n.complexPrefixBeforeNationalSignificantNumber,a=n.nationalPrefix,r=e,o=t||a;return o&&(r=o+r),r}},{key:"getNonFormattedNumber",value:function(){var n=this.state.nationalSignificantNumberMatchesInput;return this.getFullNumber(n?this.getNonFormattedNationalNumberWithPrefix():this.state.getNationalDigits())}},{key:"getNonFormattedTemplate",value:function(){var n=this.getNonFormattedNumber();if(n)return n.replace(/[\+\d]/g,DIGIT_PLACEHOLDER)}},{key:"isCountryCallingCodeAmbiguous",value:function(){var n=this.state.callingCode,e=this.metadata.getCountryCodesForCallingCode(n);return e&&e.length>1}},{key:"determineTheCountry",value:function(){this.state.setCountry(getCountryByCallingCode(this.isInternational()?this.state.callingCode:this.defaultCallingCode,{nationalNumber:this.state.nationalSignificantNumber,defaultCountry:this.defaultCountry,metadata:this.metadata}))}},{key:"getNumberValue",value:function(){var n=this.state,e=n.digits,t=n.callingCode,a=n.country,r=n.nationalSignificantNumber;if(e)return this.isInternational()?t?"+"+t+r:"+"+e:a||t?"+"+(a?this.metadata.countryCallingCode():t)+r:void 0}},{key:"getNumber",value:function(){var n=this.state,e=n.nationalSignificantNumber,t=n.carrierCode,a=n.callingCode,r=this._getCountry();if(e&&(r||a)){if(r&&r===this.defaultCountry){var o=new Metadata(this.metadata.metadata);o.selectNumberingPlan(r);var i=o.numberingPlan.callingCode(),s=this.metadata.getCountryCodesForCallingCode(i);if(s.length>1){var l=getCountryByNationalNumber(e,{countries:s,defaultCountry:this.defaultCountry,metadata:this.metadata.metadata});l&&(r=l)}}var u=new PhoneNumber(r||a,e,this.metadata.metadata);return t&&(u.carrierCode=t),u}}},{key:"isPossible",value:function(){var n=this.getNumber();return!!n&&n.isPossible()}},{key:"isValid",value:function(){var n=this.getNumber();return!!n&&n.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()||""}}]),n}();function getCountries$1(n){return new Metadata(n).getCountries()}function getExampleNumber$1(n,e,t){if(e[n])return new PhoneNumber(n,e[n],t)}function parsePhoneNumberWithError(){return withMetadataArgument(parsePhoneNumberWithError$1,arguments)}function isPossiblePhoneNumber(){return withMetadataArgument(isPossiblePhoneNumber$1,arguments)}function AsYouType(n){return AsYouType$1.call(this,n,metadata)}function isSupportedCountry(){return withMetadataArgument(isSupportedCountry$1,arguments)}function getCountries(){return withMetadataArgument(getCountries$1,arguments)}function getCountryCallingCode(){return withMetadataArgument(getCountryCallingCode$1,arguments)}function getExampleNumber(){return withMetadataArgument(getExampleNumber$1,arguments)}AsYouType.prototype=Object.create(AsYouType$1.prototype,{}),AsYouType.prototype.constructor=AsYouType;const AC="40123",AD="312345",AE="501234567",AF="701234567",AG="2684641234",AI="2642351234",AL="672123456",AM="77123456",AO="923123456",AR="91123456789",AS="6847331234",AT="664123456",AU="412345678",AW="5601234",AX="412345678",AZ="401234567",BA="61123456",BB="2462501234",BD="1812345678",BE="470123456",BF="70123456",BG="43012345",BH="36001234",BI="79561234",BJ="0195123456",BL="690001234",BM="4413701234",BN="7123456",BO="71234567",BQ="3181234",BR="11961234567",BS="2423591234",BT="17123456",BW="71123456",BY="294911911",BZ="6221234",CA="5062345678",CC="412345678",CD="991234567",CF="70012345",CG="061234567",CH="781234567",CI="0123456789",CK="71234",CL="221234567",CM="671234567",CN="13123456789",CO="3211234567",CR="83123456",CU="51234567",CV="9911234",CW="95181234",CX="412345678",CY="96123456",CZ="601123456",DE="15123456789",DJ="77831001",DK="34412345",DM="7672251234",DO="8092345678",DZ="551234567",EC="991234567",EE="51234567",EG="1001234567",EH="650123456",ER="7123456",ES="612345678",ET="911234567",FI="412345678",FJ="7012345",FK="51234",FM="3501234",FO="211234",FR="612345678",GA="06031234",GB="7400123456",GD="4734031234",GE="555123456",GF="694201234",GG="7781123456",GH="231234567",GI="57123456",GL="221234",GM="3012345",GN="601123456",GP="690001234",GQ="222123456",GR="6912345678",GT="51234567",GU="6713001234",GW="955012345",GY="6091234",HK="51234567",HN="91234567",HR="921234567",HT="34101234",HU="201234567",ID="812345678",IE="850123456",IL="502345678",IM="7924123456",IN="8123456789",IO="3801234",IQ="7912345678",IR="9123456789",IS="6111234",IT="3123456789",JE="7797712345",JM="8762101234",JO="790123456",JP="9012345678",KE="712123456",KG="700123456",KH="91234567",KI="72001234",KM="3212345",KN="8697652917",KP="1921234567",KR="1020000000",KW="50012345",KY="3453231234",KZ="7710009998",LA="2023123456",LB="71123456",LC="7582845678",LI="660234567",LK="712345678",LR="770123456",LS="50123456",LT="61234567",LU="628123456",LV="21234567",LY="912345678",MA="650123456",MC="612345678",MD="62112345",ME="67622901",MF="690001234",MG="321234567",MH="2351234",MK="72345678",ML="65012345",MM="92123456",MN="88123456",MO="66123456",MP="6702345678",MQ="696201234",MR="22123456",MS="6644923456",MT="96961234",MU="52512345",MV="7712345",MW="991234567",MX="2221234567",MY="123456789",MZ="821234567",NA="811234567",NC="751234",NE="93123456",NF="381234",NG="8021234567",NI="81234567",NL="612345678",NO="40612345",NP="9841234567",NR="5551234",NU="8884012",NZ="211234567",OM="92123456",PA="61234567",PE="912345678",PF="87123456",PG="70123456",PH="9051234567",PK="3012345678",PL="512345678",PM="551234",PR="7872345678",PS="599123456",PT="912345678",PW="6201234",PY="961456789",QA="33123456",RE="692123456",RO="712034567",RS="601234567",RU="9123456789",RW="720123456",SA="512345678",SB="7421234",SC="2510123",SD="911231234",SE="701234567",SG="81234567",SH="51234",SI="31234567",SJ="41234567",SK="912123456",SL="25123456",SM="66661212",SN="701234567",SO="71123456",SR="7412345",SS="977123456",ST="9812345",SV="70123456",SX="7215205678",SY="944567890",SZ="76123456",TA="8999",TC="6492311234",TD="63012345",TG="90112345",TH="812345678",TJ="917123456",TK="7290",TL="77212345",TM="66123456",TN="20123456",TO="7715123",TR="5012345678",TT="8682911234",TV="901234",TW="912345678",TZ="621234567",UA="501234567",UG="712345678",US="2015550123",UY="94231234",UZ="912345678",VA="3123456789",VC="7844301234",VE="4121234567",VG="2843001234",VI="3406421234",VN="912345678",VU="5912345",WF="821234",WS="7212345",XK="43201234",YE="712345678",YT="639012345",ZA="711234567",ZM="955123456",ZW="712345678",examples={AC:AC,AD:AD,AE:AE,AF:AF,AG:AG,AI:AI,AL:AL,AM:AM,AO:AO,AR:AR,AS:AS,AT:AT,AU:AU,AW:AW,AX:AX,AZ:AZ,BA:BA,BB:BB,BD:BD,BE:BE,BF:BF,BG:BG,BH:BH,BI:BI,BJ:BJ,BL:BL,BM:BM,BN:BN,BO:BO,BQ:BQ,BR:BR,BS:BS,BT:BT,BW:BW,BY:BY,BZ:BZ,CA:CA,CC:CC,CD:CD,CF:CF,CG:CG,CH:CH,CI:CI,CK:CK,CL:CL,CM:CM,CN:CN,CO:CO,CR:CR,CU:CU,CV:CV,CW:CW,CX:CX,CY:CY,CZ:CZ,DE:DE,DJ:DJ,DK:DK,DM:DM,DO:DO,DZ:DZ,EC:EC,EE:EE,EG:EG,EH:EH,ER:ER,ES:ES,ET:ET,FI:FI,FJ:FJ,FK:FK,FM:FM,FO:FO,FR:FR,GA:GA,GB:GB,GD:GD,GE:GE,GF:GF,GG:GG,GH:GH,GI:GI,GL:GL,GM:GM,GN:GN,GP:GP,GQ:GQ,GR:GR,GT:GT,GU:GU,GW:GW,GY:GY,HK:HK,HN:HN,HR:HR,HT:HT,HU:HU,ID:ID,IE:IE,IL:IL,IM:IM,IN:IN,IO:IO,IQ:IQ,IR:IR,IS:IS,IT:IT,JE:JE,JM:JM,JO:JO,JP:JP,KE:KE,KG:KG,KH:KH,KI:KI,KM:KM,KN:KN,KP:KP,KR:KR,KW:KW,KY:KY,KZ:KZ,LA:LA,LB:LB,LC:LC,LI:LI,LK:LK,LR:LR,LS:LS,LT:LT,LU:LU,LV:LV,LY:LY,MA:MA,MC:MC,MD:MD,ME:ME,MF:MF,MG:MG,MH:MH,MK:MK,ML:ML,MM:MM,MN:MN,MO:MO,MP:MP,MQ:MQ,MR:MR,MS:MS,MT:MT,MU:MU,MV:MV,MW:MW,MX:MX,MY:MY,MZ:MZ,NA:NA,NC:NC,NE:NE,NF:NF,NG:NG,NI:NI,NL:NL,NO:NO,NP:NP,NR:NR,NU:NU,NZ:NZ,OM:OM,PA:PA,PE:PE,PF:PF,PG:PG,PH:PH,PK:PK,PL:PL,PM:PM,PR:PR,PS:PS,PT:PT,PW:PW,PY:PY,QA:QA,RE:RE,RO:RO,RS:RS,RU:RU,RW:RW,SA:SA,SB:SB,SC:SC,SD:SD,SE:SE,SG:SG,SH:SH,SI:SI,SJ:SJ,SK:SK,SL:SL,SM:SM,SN:SN,SO:SO,SR:SR,SS:SS,ST:ST,SV:SV,SX:SX,SY:SY,SZ:SZ,TA:TA,TC:TC,TD:TD,TG:TG,TH:TH,TJ:TJ,TK:TK,TL:TL,TM:TM,TN:TN,TO:TO,TR:TR,TT:TT,TV:TV,TW:TW,TZ:TZ,UA:UA,UG:UG,US:US,UY:UY,UZ:UZ,VA:VA,VC:VC,VE:VE,VG:VG,VI:VI,VN:VN,VU:VU,WF:WF,WS:WS,XK:XK,YE:YE,YT:YT,ZA:ZA,ZM:ZM,ZW:ZW},DATA_MAP={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 mapCountry(n){return isSupportedCountry(n)?n:n in DATA_MAP.countries?DATA_MAP.countries[n]:void console.error(`Not a valid country: ${n}`)}const vaTelephoneInputCss='/* From the USWDS styles: */\n/* https://github.com/uswds/uswds/blob/3dc296ec56cd621fe52d918701fd94621d96a198/src/stylesheets/core/mixins/_focus.scss#L12-L13 */\nbutton:not([disabled]):focus,\nselect:not([disabled]):focus,\na:not([disabled]):focus,\nh1:focus,\ninput:not([disabled]):focus,\ntextarea:not([disabled]):focus,\n#form-question\n[role=\'option\']:focus,\n*[tabindex]:focus, \na.va-sidenav-submenu__link:focus {\n outline: 2px solid var(--vads-color-action-focus-on-light);\n outline-offset: 2px;\n z-index: 2;\n}\n\n#error-message {\n margin-bottom: 0.75rem;\n}\n\n#error-message,\n#input-error-message {\n color: var(--vads-color-secondary-dark);\n display: block;\n font-weight: 700;\n font-size: 1.06rem;\n}\n\n:host([error]:not([error=\'\'])) {\n border-left: 0.3rem solid var(--vads-color-secondary-dark);\n padding-left: 1.25rem;\n position: relative;\n}\n\n@media screen and (min-width: 1008px) {\n :host([error]:not([error=\'\'])) {\n margin-left: -1.4375rem; /* padding left + border left */\n }\n}\n\n/*\n* * * * * ==============================\n* * * * * ==============================\n* * * * * ==============================\n* * * * * ==============================\n========================================\n========================================\n========================================\n----------------------------------------\nGENERAL SETTINGS\n----------------------------------------\nRead more about settings and\nUSWDS style tokens in the documentation:\nhttps://designsystem.digital.gov/design-tokens\n----------------------------------------\n*/\n/*\n----------------------------------------\nImage path\n----------------------------------------\nRelative image file path\n----------------------------------------\n*/\n/*\n----------------------------------------\nShow compile warnings\n----------------------------------------\nShow Sass warnings when functions and\nmixins use non-standard tokens.\nAND\nShow updates and notifications.\n----------------------------------------\n*/\n/*\n----------------------------------------\nNamespace\n----------------------------------------\n*/\n/*\n----------------------------------------\nPrefix separator\n----------------------------------------\nSet the character the separates\nresponsive and state prefixes from the\nmain class name.\nThe default (":") needs to be preceded\nby two backslashes to be properly\nescaped.\n----------------------------------------\n*/\n/*\n----------------------------------------\nLayout grid\n----------------------------------------\nShould the layout grid classes output\nwith !important\n----------------------------------------\n*/\n/*\n----------------------------------------\nBorder box sizing\n----------------------------------------\nWhen set to true, sets the box-sizing\nproperty of all site elements to\n`border-box`.\n----------------------------------------\n*/\n/*\n----------------------------------------\nFocus styles\n----------------------------------------\n*/\n/*\n----------------------------------------\nIcons\n----------------------------------------\n*/\n/*\n* * * * * ==============================\n* * * * * ==============================\n* * * * * ==============================\n* * * * * ==============================\n========================================\n========================================\n========================================\n----------------------------------------\nTYPOGRAPHY SETTINGS\n----------------------------------------\nRead more about settings and\nUSWDS typography tokens in the documentation:\nhttps://designsystem.digital.gov/design-tokens/typesetting/overview/\n----------------------------------------\n*/\n/*\n----------------------------------------\nRoot font size\n----------------------------------------\nSetting $theme-respect-user-font-size to\ntrue sets the root font size to 100% and\nuses ems for media queries\n----------------------------------------\n$theme-root-font-size only applies when\n$theme-respect-user-font-size is set to\nfalse.\n\nThis will set the root font size\nas a specific px value and use px values\nfor media queries.\n\nAccepts true or false\n----------------------------------------\n*/\n/*\n----------------------------------------\nGlobal styles\n----------------------------------------\nAdds basic styling for the following\nunclassed elements:\n\n- paragraph: paragraph text\n- link: links\n- content: paragraph text, links,\n headings, lists, and tables\n----------------------------------------\n*/\n/*\n----------------------------------------\nBroswer compatibility mode\n----------------------------------------\nWhen true, outputs woff and ttf font \nformats in addition to woff2\n----------------------------------------\n*/\n/*\n----------------------------------------\nFont path\n----------------------------------------\nRelative font file path\n----------------------------------------\n*/\n/*\n----------------------------------------\nCustom typeface tokens\n----------------------------------------\nAdd a new custom typeface token if\nyour project uses a typeface not already\ndefined by USWDS.\n----------------------------------------\nUSWDS defines the following tokens\nby default:\n----------------------------------------\n\'georgia\'\n\'helvetica\'\n\'merriweather\'\n\'open-sans\'\n\'public-sans\'\n\'roboto-mono\'\n\'source-sans-pro\'\n\'system\'\n\'tahoma\'\n\'verdana\'\n----------------------------------------\nAdd as many new tokens as you have\ncustom typefaces. Reference your new\ntoken(s) in the type-based font settings\nusing the quoted name of the token.\n\nFor example:\n\n$theme-font-type-cond: \'example-font-token\';\n\ndisplay-name:\nThe display name of your font\n\ncap-height:\nThe height of a 500px `N` in Sketch\n----------------------------------------\nYou should change `example-[style]-token`\nnames to something more descriptive.\n----------------------------------------\n*/\n/*\n----------------------------------------\nType-based font settings\n----------------------------------------\nSet the type-based tokens for your\nproject from the following tokens,\nor from any new font tokens you added in\n$theme-typeface-tokens.\n----------------------------------------\n\'georgia\'\n\'helvetica\'\n\'merriweather\'\n\'open-sans\'\n\'public-sans\'\n\'roboto-mono\'\n\'source-sans-pro\'\n\'system\'\n\'tahoma\'\n\'verdana\'\n----------------------------------------\n*/\n/*\n----------------------------------------\nCustom font stacks\n----------------------------------------\nAdd custom font stacks to any of the\ntype-based fonts. Any USWDS typeface\ntoken already has a default stack.\n\nCustom stacks don\'t need to include the\nfont\'s display name. It will\nautomatically appear at the start of\nthe stack.\n----------------------------------------\nExample:\n$theme-font-type-sans: \'source-sans-pro\';\n$theme-font-sans-custom-stack: "Helvetica Neue", Helvetica, Arial, sans;\n\nOutput:\nfont-family: "Source Sans Pro", "Helvetica Neue", Helvetica, Arial, sans;\n----------------------------------------\n*/\n/*\n----------------------------------------\nAdd any custom font source files\n----------------------------------------\nIf you want USWDS to generate additional\n@font-face declarations, add your font\ndata below, following the example that\nfollows.\n----------------------------------------\nUSWDS automatically generates @font-face\ndeclarations for the following\n\n\'merriweather\'\n\'public-sans\'\n\'roboto-mono\'\n\'source-sans-pro\'\n\nThese typefaces not require custom\nsource files.\n----------------------------------------\nEXAMPLE\n\n- dir:\n Directory relative to $theme-font-path\n- This directory should include fonts saved as\n .woff2\n ExampleSerif-Normal.woff2\n\n$theme-font-serif-custom-src: (\n dir: \'custom/example-serif\',\n roman: (\n 100: false,\n 200: false,\n 300: \'ExampleSerif-Light\',\n 400: \'ExampleSerif-Normal\',\n 500: false,\n 600: false,\n 700: \'ExampleSerif-Bold\',\n 800: false,\n 900: false,\n ),\n italic: (\n 100: false,\n 200: false,\n 300: \'ExampleSerif-LightItalic\',\n 400: \'ExampleSerif-Italic\',\n 500: false,\n 600: false,\n 700: \'ExampleSerif-BoldItalic\',\n 800: false,\n 900: false,\n ),\n);\n----------------------------------------\n*/\n/*\n----------------------------------------\nRole-based font settings\n----------------------------------------\nSet the role-based tokens for your\nproject from the following font-type\ntokens.\n----------------------------------------\n\'cond\'\n\'icon\'\n\'lang\'\n\'mono\'\n\'sans\'\n\'serif\'\n----------------------------------------\n*/\n/*\n----------------------------------------\nType scale\n----------------------------------------\nDefine your project\'s type scale using\nvalues from the USWDS system type scale\n\n1-20\n----------------------------------------\n*/\n/*\n----------------------------------------\nFont weights\n----------------------------------------\nAssign weights 100-900\nOr use `false` for unneeded weights.\n----------------------------------------\n*/\n/*\n----------------------------------------\nGeneral typography settings\n----------------------------------------\nType scale tokens\n----------------------------------------\nmicro: 10px\n1: 12px\n2: 13px\n3: 14px\n4: 15px\n5: 16px\n6: 17px\n7: 18px\n8: 20px\n9: 22px\n10: 24px\n11: 28px\n12: 32px\n13: 36px\n14: 40px\n15: 48px\n16: 56px\n17: 64px\n18: 80px\n19: 120px\n20: 140px\n----------------------------------------\nLine height tokens\n----------------------------------------\n1: 1\n2: 1.15\n3: 1.35\n4: 1.5\n5: 1.62\n6: 1.75\n----------------------------------------\nFont role tokens\n----------------------------------------\n\'ui\'\n\'heading\'\n\'body\'\n\'code\'\n\'alt\'\n----------------------------------------\nMeasure (max-width) tokens\n----------------------------------------\n1: 44ex\n2: 60ex\n3: 64ex\n4: 68ex\n5: 74ex\n6: 88ex\nnone: none\n----------------------------------------\n*/\n/*\n* * * * * ==============================\n* * * * * ==============================\n* * * * * ==============================\n* * * * * ==============================\n========================================\n========================================\n========================================\n----------------------------------------\nCOLOR SETTINGS\n----------------------------------------\nRead more about settings and\nUSWDS color tokens in the documentation:\nhttps://designsystem.digital.gov/design-tokens/color\n----------------------------------------\n*/\n/*\n----------------------------------------\nTheme palette colors\n----------------------------------------\n*/\n/*\n----------------------------------------\nState palette colors\n----------------------------------------\n*/\n/*\n----------------------------------------\nGeneral colors\n----------------------------------------\n*/\n/*\n* * * * * ==============================\n* * * * * ==============================\n* * * * * ==============================\n* * * * * ==============================\n========================================\n========================================\n========================================\n----------------------------------------\nCOMPONENT SETTINGS\n----------------------------------------\nRead more about settings and\nUSWDS style tokens in the documentation:\nhttps://designsystem.digital.gov/design-tokens\n----------------------------------------\n*/\n/*\n* * * * * ==============================\n* * * * * ==============================\n* * * * * ==============================\n* * * * * ==============================\n========================================\n========================================\n========================================\n----------------------------------------\nSPACING SETTINGS\n----------------------------------------\nRead more about settings and\nUSWDS spacing units tokens in the\ndocumentation:\nhttps://designsystem.digital.gov/design-tokens/spacing-units\n----------------------------------------\n*/\n/*\n----------------------------------------\nBorder radius\n----------------------------------------\n2px 2px\n0.5 4px\n1 8px\n1.5 12px\n2 16px\n2.5 20px\n3 24px\n4 32px\n5 40px\n6 48px\n7 56px\n8 64px\n9 72px\n----------------------------------------\n*/\n/*\n----------------------------------------\nColumn gap\n----------------------------------------\n2px 2px\n0.5 4px\n1 8px\n2 16px\n3 24px\n4 32px\n5 40px\n6 48px\n----------------------------------------\n*/\n/*\n----------------------------------------\nGrid container max-width\n----------------------------------------\nmobile\nmobile-lg\ntablet\ntablet-lg\ndesktop\ndesktop-lg\nwidescreen\n----------------------------------------\n*/\n/*\n----------------------------------------\nSite\n----------------------------------------\n*/\n/*\n----------------------------------------\nmap-collect()\n----------------------------------------\nCollect multiple maps into a single\nlarge map\nsource: https://gist.github.com/bigglesrocks/d75091700f8f2be5abfe\n----------------------------------------\n*/\n/*\n* * * * * ==============================\n* * * * * ==============================\n* * * * * ==============================\n* * * * * ==============================\n========================================\n========================================\n========================================\n----------------------------------------\nUTILITIES SETTINGS\n----------------------------------------\nRead more about settings and\nUSWDS utilities in the documentation:\nhttps://designsystem.digital.gov/utilities\n----------------------------------------\n*/\n/*\n----------------------------------------\nUtility breakpoints\n----------------------------------------\nWhich breakpoints does your project\nneed? Select as `true` any breakpoint\nused by utilities or layout grid\n----------------------------------------\n*/\n/*\n----------------------------------------\nGlobal colors\n----------------------------------------\nThe following palettes will be added to\n- background-color\n- border-color\n- color\n- text-decoration-color\n----------------------------------------\n*/\n/*\n----------------------------------------\nSettings\n----------------------------------------\n*/\n/*\n----------------------------------------\nValues\n----------------------------------------\n*/\n/*\n----------------------------------------\nget-last()\n----------------------------------------\nReturn the last item of a list,\nReturn null if the value is null\n----------------------------------------\n*/\n/*\n----------------------------------------\nappend-important()\n----------------------------------------\nAppend `!important` to a list\n----------------------------------------\n*/\n/*\n----------------------------------------\nde-list()\n----------------------------------------\nTransform a one-element list or arglist\ninto that single element.\n----------------------------------------\n(1) => 1\n((1)) => (1)\n----------------------------------------\n*/\n/*\n----------------------------------------\nuswds-error()\n----------------------------------------\nAllow the system to pass an error as text\nto test error states in unit testing\n----------------------------------------\n*/\n/*\n----------------------------------------\nerror-not-token()\n----------------------------------------\nReturns a common not-a-token error.\n----------------------------------------\n*/\n/*\n----------------------------------------\nget-default()\n----------------------------------------\nReturns the default value from a map\nof project defaults\nget-default("bg-color")\n> $theme-body-background-color\n----------------------------------------\n*/\n/*\n----------------------------------------\nhas-important()\n----------------------------------------\nCheck to see if `!important` is\nbeing passed in a mixin\'s props\n----------------------------------------\n*/\n/*\n----------------------------------------\nmap-deep-get()\n----------------------------------------\n@author Hugo Giraudel\n@access public\n@param {Map} $map - Map\n@param {Arglist} $keys - Key chain\n@return {*} - Desired value\n----------------------------------------\n*/\n/*\n----------------------------------------\nmulti-cat()\n----------------------------------------\nConcatenate two lists\n----------------------------------------\n*/\n/*\n----------------------------------------\nremove()\n----------------------------------------\nRemove a value from a list\n----------------------------------------\n*/\n/*\n----------------------------------------\nsmart-quote()\n----------------------------------------\nQuotes strings\nInspects `px`, `xs`, and `xl` numbers\nLeaves bools as is\n----------------------------------------\n*/\n/*\n----------------------------------------\nstr-replace()\n----------------------------------------\nReplace any substring with another\nstring\n----------------------------------------\n*/\n/*\n----------------------------------------\nstr-split()\n----------------------------------------\nSplit a string at a given separator\nand convert into a list of substrings\n----------------------------------------\n*/\n/*\n----------------------------------------\nstrip-unit()\n----------------------------------------\nRemove the unit of a length\n@author Hugo Giraudel\n@param {Number} $number - Number to remove unit from\n@return {Number} - Unitless number\n----------------------------------------\n*/\n/*\n----------------------------------------\nbase-to-map()\n@TODO: Deprecate and delete\n----------------------------------------\nConvert a single base to a USWDS\nvalue map.\n\nCandidate for deprecation if we remove\nisReadable\n----------------------------------------\n*/\n/*\n----------------------------------------\nto-number()\n----------------------------------------\nCasts a string into a number\n----------------------------------------\n@param {String | Number} $value - Value to be parsed\n@return {Number}\n----------------------------------------\n*/\n/*\n----------------------------------------\nunpack()\n----------------------------------------\nCreate lists of single items from lists\nof lists.\n----------------------------------------\n(1, (2.1, 2.2), 3) --\x3e\n(1, 2.1, 2.2, 3)\n----------------------------------------\n*/\n/*\n----------------------------------------\nget-system-color()\n----------------------------------------\nDerive a system color from its\nfamily, value, and vivid or a passed\nvariable that is, itself, a list\n----------------------------------------\n*/\n/*\n----------------------------------------\nset-theme-color()\n----------------------------------------\nDerive a color from a system color token\nor a hex value\n----------------------------------------\n*/\n/*\n----------------------------------------\ncolor()\n----------------------------------------\nDerive a color from a color shortcode\n----------------------------------------\n*/\n/*\n----------------------------------------\npx-to-rem()\n----------------------------------------\nConverts a value in px to a value in rem\n----------------------------------------\n*/\n/*\n----------------------------------------\nrem-to-user-em()\n----------------------------------------\nConverts a value in rem to a value in\n[user-settings] em for use in media\nqueries\n----------------------------------------\n*/\n/*\n----------------------------------------\npx-to-user-em()\n----------------------------------------\nConverts a value in px to a value in em\n----------------------------------------\n*/\n/*\n----------------------------------------\nrem-to-px()\n----------------------------------------\nConverts a value in rem to a value in px\n----------------------------------------\n*/\n/*\n----------------------------------------\nspacing-multiple()\n----------------------------------------\nConverts a spacing unit multiple into\nthe desired final units (currently rem)\n----------------------------------------\n*/\n/*\n----------------------------------------\nnumber-to-token()\n----------------------------------------\nConverts an integer or numeric value\ninto a system value\n\nEx: 0.5 --\x3e \'05\'\n -1px --\x3e \'neg-1px\'\n----------------------------------------\n*/\n/*\n----------------------------------------\nunits()\n----------------------------------------\nConverts a spacing unit into\nthe desired final units (currently rem)\n----------------------------------------\n*/\n/*\n----------------------------------------\nProject fonts\n----------------------------------------\nCollects font settings in a map for\nlooping.\n----------------------------------------\n*/\n/*\n----------------------------------------\nLuminance ranges\n----------------------------------------\n*/\n/*\n----------------------------------------\nns()\n----------------------------------------\nAdd a namesspace of $type if that\nnamespace is set to output\n----------------------------------------\n*/\n/*\n----------------------------------------\nLine height\n----------------------------------------\n*/\n/*\n----------------------------------------\nMeasure\n----------------------------------------\n*/\n/*\n----------------------------------------\nvalidate-typeface-token()\n----------------------------------------\nCheck to see if a typeface-token exists.\nThrow an error if a passed token does\nnot exist in the typeface-token map.\n----------------------------------------\n*/\n/*\n----------------------------------------\ncap-height()\n----------------------------------------\nGet the cap height of a valid typeface\n----------------------------------------\n*/\n/*\n----------------------------------------\nconvert-to-font-type()\n----------------------------------------\nConverts a font-role token into a\nfont-type token. Leaves font-type tokens\nunchanged.\n----------------------------------------\n*/\n/*\n----------------------------------------\nfont-sources()\n----------------------------------------\nOutputs a list of font sources used in\na @font-face declaration.\n\n$theme-font-browser-compatibility: true - output woff2, woff, ttf\n$theme-font-browser-compatibility: false - output woff2\n\n@param stem: string - [font path]/[custom-src.dir]/[custom-src.[style].[weight]]\n@output: string\n\nfiletypes must be one of the filetypes set in variables/$project-font-face-filetypes (woff, woff2, ttf)\n----------------------------------------\n*/\n/*\n----------------------------------------\nget-font-stack()\n----------------------------------------\nGet a font stack from a style- or\nrole-based font token.\n----------------------------------------\n*/\n/*\n----------------------------------------\nget-typeface-token()\n----------------------------------------\nGet a typeface token from a font-type or\nfont-role token.\n----------------------------------------\n*/\n/*\n----------------------------------------\nnormalize-type-scale()\n----------------------------------------\nNormalizes a specific face\'s optical size\nto a set target\n----------------------------------------\n*/\n/*\n----------------------------------------\nsystem-type-scale()\n----------------------------------------\nGet a value from the system type scale\n----------------------------------------\n*/\n/*\n----------------------------------------\nEasing\n----------------------------------------\n*/\n/* deprecated.scss\n ---\n Occasionally the design system will deprecate\n old variables or functionality. If we replace\n the old functionality with something new, this is a\n place to connect the old functionality to the\n new functionality, in the service of better\n continuity and backwards compatibility within a\n major release cycle.\n\n Note the USWDS version where we deprecated the\n old functionality in a comment.\n\n Be sure to update notifications.scss.\n\n This file should started fresh at each\n major version.\n*/\n/*\n----------------------------------------\nadvanced-color()\n----------------------------------------\nDerive a color from a color triplet:\n[family], [grade], [variant]\n----------------------------------------\n*/\n/*\n----------------------------------------\nis-system-color-token()\n----------------------------------------\nReturn whether a token is a system\ncolor token\n----------------------------------------\n*/\n/*\n----------------------------------------\nis-theme-color-token()\n----------------------------------------\nReturn whether a token is a theme\ncolor token\n----------------------------------------\n*/\n/*\n----------------------------------------\ncolor-token-assignment()\n----------------------------------------\nGet the system token equivalent of any\ntheme color token\n----------------------------------------\n*/\n/*\n----------------------------------------\ndecompose()\n----------------------------------------\nConvert a color token into into a list\nof form [family], [grade], [variant]\nVivid variants return "vivid" as the\nvariant.\nIf neither grade nor variant exists,\nreturns \'null\'\n----------------------------------------\n*/\n/*\n----------------------------------------\ncolor-token-family()\n----------------------------------------\nReturns the family of a color token.\nReturns: color-family\ncolor-token-family("accent-warm-vivid")\n> "accent-warm"\ncolor-token-family("red-50v")\n> "red"\ncolor-token-variant(("red", 50, "vivid"))\n> "red"\n----------------------------------------\n*/\n/*\n----------------------------------------\ncolor-token-grade()\n----------------------------------------\nReturns the grade of a USWDS color token.\nReturns: color-grade\ncolor-token-grade("accent-warm")\n> "root"\ncolor-token-grade("accent-warm-vivid")\n> "root"\ncolor-token-grade("accent-warm-darker")\n> "darker"\ncolor-token-grade("red-50v")\n> 50\ncolor-token-variant(("red", 50, "vivid"))\n> 50\n----------------------------------------\n*/\n/*\n----------------------------------------\nis-color-token()\n----------------------------------------\nReturns whether a given string is a\nUSWDS color token.\n----------------------------------------\n*/\n/*\n----------------------------------------\npow()\n----------------------------------------\nRaises a unitless number to the power\nof another unitless number\nIncludes helper functions\n----------------------------------------\n*/\n/*\n----------------------------------------\nHelper functions\n----------------------------------------\n*/\n/* factorial()\n----------------------------------------\n*/\n/* summation()\n----------------------------------------\n*/\n/* exp-maclaurin()\n----------------------------------------\n*/\n/* ln()\n----------------------------------------\n*/\n/*\n----------------------------------------\ncalculate-grade()\n----------------------------------------\nDerive the grade equivalent any color,\neven non-token colors\n----------------------------------------\n*/\n/*\n----------------------------------------\ncolor-token-type()\n----------------------------------------\nReturns the type of a color token.\nReturns: "system" | "theme"\n----------------------------------------\n*/\n/*\n----------------------------------------\ncolor-token-variant()\n----------------------------------------\nReturns the variant of color token.\nReturns: "vivid" | false\ncolor-token-variant("accent-warm")\n> false\ncolor-token-variant("accent-warm-vivid")\n> "vivid"\ncolor-token-variant("red-50v")\n> "vivid"\ncolor-token-variant(("red", 50, "vivid"))\n> "vivid"\n----------------------------------------\n*/\n/*\n----------------------------------------\nmagic-number()\n----------------------------------------\nReturns the magic number of two color\ngrades. Takes numbers or color tokens.\nmagic-number(50, 10)\nreturn: 40\nmagic-number("red-50", "red-10")\nreturn: 40\n----------------------------------------\n*/\n/*\n----------------------------------------\nwcag-magic-number()\n----------------------------------------\nReturns the magic number of a specific\nwcag grade:\n"AA"\n"AA-Large"\n"AAA"\nwcag-magic-number("AA")\n> 50\n----------------------------------------\n*/\n/*\n----------------------------------------\nis-accessible-magic-number()\n----------------------------------------\nReturns whether two grades achieve\nspecified target color contrast\nReturns: true | false\nis-accessible-magic-number(10, 50, "AA")\n> false\nis-accessible-magic-number(10, 60, "AA")\n> true\n----------------------------------------\n*/\n/*\n----------------------------------------\nnext-token()\n----------------------------------------\nReturns next "darker" or "lighter" color\ntoken of the same token type and variant.\nReturns: color-token | false\nnext-token("accent-warm", "lighter")\n> "accent-warm-light"\nnext-token("gray-10", "lighter")\n> "gray-5"\nnext-token("gray-5", "lighter")\n> "white"\nnext-token("white", "lighter")\n> false\nnext-token("red-50v", "darker")\n> "red-60v"\nnext-token("red-50", "darker")\n> "red-60"\nnext-token("red-80v", "darker")\n> "red-90"\nnext-token("red-90", "darker")\n> "black"\nnext-token("white", "darker")\n> "gray-5"\nnext-token("black", "lighter")\n> "gray-90"\n----------------------------------------\n*/\n/*\n----------------------------------------\nget-link-tokens-from-bg()\n----------------------------------------\nGet accessible link colors for a given\nbackground color\nreturns: link-token, hover-token\nget-link-tokens-from-bg(\n "black",\n "red-60",\n "red-10",\n "AA")\n> "red-10", "red-5"\nget-link-tokens-from-bg(\n "black",\n "red-60v",\n "red-10v",\n "AA-large")\n> "red-60v", "red-50v"\nget-link-tokens-from-bg(\n "black",\n "red-5v",\n "red-60v",\n "AA")\n> "red-5v", "white"\nget-link-tokens-from-bg(\n "black",\n "white",\n "red-60v",\n "AA")\n> "white", "white"\n----------------------------------------\n*/\n/*\n----------------------------------------\ntest-colors()\n----------------------------------------\nCheck to see if all system colors\nfall between the proper relative\nluminance range for their grade.\nHas a couple quirks, as the luminance()\nfunction returns slightly different\nresults than expected.\n----------------------------------------\n*/\n/*\n----------------------------------------\ncolumns()\n----------------------------------------\noutputs a grid-col number based on\nthe number of desired columns in the\n12-column grid\n\nEx: columns(2) --\x3e 6\n grid-col(columns(2))\n----------------------------------------\n*/\n/*\n----------------------------------------\nUSWDS Properties\n----------------------------------------\n*/\n/*\n----------------------------------------\nget-uswds-value()\n----------------------------------------\nFinds and outputs a value from the\nUSWDS standard values.\n\nUsed to build other standard utility\nfunctions and mixins.\n----------------------------------------\n*/\n/*\n----------------------------------------\nget-standard-values()\n----------------------------------------\nGets a map of USWDS standard values\nfor a property\n----------------------------------------\n*/\n/*\n----------------------------------------\nborder-radius()\n----------------------------------------\nGet a border-radius from the system\nborder-radii\n----------------------------------------\n*/\n/*\n----------------------------------------\nfont-weight()\nfw()\n----------------------------------------\nGet a font-weight value from the\nsystem font-weight\n----------------------------------------\n*/\n/*\n----------------------------------------\nfeature()\n----------------------------------------\nGets a valid USWDS font feature setting\n----------------------------------------\n*/\n/*\n----------------------------------------\nflex()\n----------------------------------------\nGets a valid USWDS flex value\n----------------------------------------\n*/\n/*\n----------------------------------------\nfont-family()\nfamily()\n----------------------------------------\nGet a font-family stack from a\nrole-based or type-based font family\n----------------------------------------\n*/\n/*\n----------------------------------------\nletter-spacing()\nls()\n----------------------------------------\nGet a letter-spacing value from the\nsystem letter-spacing\n----------------------------------------\n*/\n/*\n----------------------------------------\nmeasure()\n----------------------------------------\nGets a valid USWDS reading line length\n----------------------------------------\n*/\n/*\n----------------------------------------\nopacity()\n----------------------------------------\nGet an opacity from the system\nopacities\n----------------------------------------\n*/\n/*\n----------------------------------------\norder()\n----------------------------------------\nGet an order value from the\nsystem orders\n----------------------------------------\n*/\n/*\n----------------------------------------\nradius()\n----------------------------------------\nGet a border-radius value from the\nsystem letter-spacing\n----------------------------------------\n*/\n/*\n----------------------------------------\nfont-size()\n----------------------------------------\nGet type scale value from a [family] and\n[scale]\n----------------------------------------\n*/\n/*\n----------------------------------------\nz-index()\nz()\n----------------------------------------\nGet a z-index value from the\nsystem z-index\n----------------------------------------\n*/\n/*\n----------------------------------------\nutility-font()\n----------------------------------------\nGet a normalized font-size in rem from\na family and a type size in either\nsystem scale or project scale\n----------------------------------------\nNot the public-facing function.\nUsed for building the utilities and\nwithholds certain errors.\n----------------------------------------\n*/\n/*\n----------------------------------------\nfamily()\n----------------------------------------\nGet a font-family stack\n----------------------------------------\n*/\n/*\n----------------------------------------\nsize()\n----------------------------------------\nGet a normalized font-size in rem from\na family and a type size in either\nsystem scale or project scale\n----------------------------------------\n*/\n/*\n----------------------------------------\nfont()\n----------------------------------------\nGet a font-family stack\nAND\nGet a normalized font-size in rem from\na family and a type size in either\nsystem scale or project scale\n----------------------------------------\n*/\n/*\n----------------------------------------\ntypeset()\n----------------------------------------\nSets:\n- family\n- size\n- line-height\n----------------------------------------\n*/\n/* stylelint-disable max-nesting-depth */\n/*\n----------------------------------------\n@render-pseudoclass\n----------------------------------------\nBuild a pseucoclass utiliy from values\ncalculated in the @render-utilities-in\nloop\n----------------------------------------\n*/\n/*\n----------------------------------------\n@render-utility\n----------------------------------------\nBuild a utility from values calculated\nin the @render-utilities-in loop\n----------------------------------------\nTODO: Determine the proper use of\nunquote() in the following. Changed to\naccount for a \'interpolation near\noperators will be simplified in a\nfuture version of Sass\' warning.\n----------------------------------------\n*/\n/*\n----------------------------------------\n@render-utilities-in\n----------------------------------------\nThe master loop that sets the building\nblocks of utilities from the values\nin individual rule settings and loops\nthrough all possible variants\n----------------------------------------\n*/\n/* stylelint-enable */\n/* notifications.scss\n ---\n Adds a notification at the top of each USWDS\n compile. Use this file for important notifications\n and updates to the design system.\n\n This file should started fresh at each\n major version.\n\n*/\n/* prettier-ignore */\n/* prettier-ignore */\n.usa-hint, .usa-fieldset {\n font-family: Source Sans Pro Web, "Source Sans Pro", "Helvetica Neue", Helvetica, Arial, sans;\n font-size: 1.06rem;\n line-height: 1.3;\n}\n\n.usa-sr-only {\n position: absolute;\n left: -999em;\n right: auto;\n}\n\n.usa-form {\n font-family: Source Sans Pro Web, "Source Sans Pro", "Helvetica Neue", Helvetica, Arial, sans;\n font-size: 1.06rem;\n line-height: 1.3;\n}\n@media all and (min-width: 30em) {\n .usa-form {\n max-width: 20rem;\n }\n}\n.usa-form abbr[title=required] {\n text-decoration: none;\n}\n.usa-form .usa-input,\n.usa-form .usa-range,\n.usa-form .usa-select,\n.usa-form .usa-textarea {\n max-width: none;\n}\n.usa-form .usa-input--2xs,\n.usa-form .usa-input-group--2xs {\n max-width: 5ex;\n}\n.usa-form .usa-input--xs,\n.usa-form .usa-input-group--xs {\n max-width: 9ex;\n}\n.usa-form .usa-input--sm, .usa-form .usa-input--small,\n.usa-form .usa-input-group--sm,\n.usa-form .usa-input-group--small {\n max-width: 13ex;\n}\n.usa-form .usa-input--md, .usa-form .usa-input--medium,\n.usa-form .usa-input-group--md,\n.usa-form .usa-input-group--medium {\n max-width: 20ex;\n}\n.usa-form .usa-input--lg,\n.usa-form .usa-input-group--lg {\n max-width: 30ex;\n}\n.usa-form .usa-input--xl,\n.usa-form .usa-input-group--xl {\n max-width: 40ex;\n}\n.usa-form .usa-input--2xl,\n.usa-form .usa-input-group--2xl {\n max-width: 50ex;\n}\n.usa-form .usa-button {\n margin-top: 0.5rem;\n}\n@media all and (min-width: 30em) {\n .usa-form .usa-button {\n margin-top: 1.5rem;\n }\n}\n.usa-form a:where(:not(.usa-button)) {\n color: #005ea2;\n text-decoration: underline;\n}\n.usa-form a:where(:not(.usa-button)):visited {\n color: #54278f;\n}\n.usa-form a:where(:not(.usa-button)):hover {\n color: #1a4480;\n}\n.usa-form a:where(:not(.usa-button)):active {\n color: #162e51;\n}\n.usa-form a:where(:not(.usa-button)):focus {\n outline: 0.25rem solid #2491ff;\n outline-offset: 0rem;\n}\n\n@media all and (min-width: 30em) {\n .usa-form--large {\n max-width: 30rem;\n }\n}\n\n.usa-show-password {\n color: #005ea2;\n text-decoration: underline;\n background-color: transparent;\n border: 0;\n border-radius: 0;\n -webkit-box-shadow: none;\n box-shadow: none;\n font-weight: normal;\n -ms-flex-pack: normal;\n justify-content: normal;\n text-align: left;\n margin: 0;\n padding: 0;\n width: auto;\n cursor: pointer;\n}\n.usa-show-password:visited {\n color: #54278f;\n}\n.usa-show-password:hover {\n color: #1a4480;\n}\n.usa-show-password:active {\n color: #162e51;\n}\n.usa-show-password:focus {\n outline: 0.25rem solid #2491ff;\n outline-offset: 0rem;\n}\n.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 {\n background-color: transparent;\n -webkit-box-shadow: none;\n box-shadow: none;\n text-decoration: underline;\n}\n.usa-show-password.usa-button--hover {\n color: #1a4480;\n}\n.usa-show-password.usa-button--active {\n color: #162e51;\n}\n.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 {\n color: #757575;\n}\n@media (forced-colors: active) {\n .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 {\n color: GrayText;\n }\n}\n\n.usa-form__note,\n.usa-show-password {\n font-family: Source Sans Pro Web, "Source Sans Pro", "Helvetica Neue", Helvetica, Arial, sans;\n font-size: 0.93rem;\n line-height: 1.3;\n float: right;\n margin: 0.25rem 0 1rem;\n}\n\n.usa-fieldset {\n border: none;\n margin: 0;\n padding: 0;\n}\n\n.usa-legend {\n font-family: Source Sans Pro Web, "Source Sans Pro", "Helvetica Neue", Helvetica, Arial, sans;\n font-size: 1.06rem;\n line-height: 1.3;\n display: block;\n font-weight: normal;\n margin-top: 1.5rem;\n max-width: 30rem;\n}\n\n.usa-legend--large {\n font-size: 2.13rem;\n font-weight: 700;\n margin-top: 1rem;\n}\n\n.usa-label {\n font-family: Source Sans Pro Web, "Source Sans Pro", "Helvetica Neue", Helvetica, Arial, sans;\n font-size: 1.06rem;\n line-height: 1.3;\n display: block;\n font-weight: normal;\n margin-top: 1.5rem;\n max-width: 30rem;\n}\n\n.usa-label--error {\n font-weight: 700;\n margin-top: 0;\n}\n\n.usa-label--required {\n color: #b50909;\n}\n\n.usa-hint {\n color: #71767a;\n}\n\n.usa-hint--required {\n color: #b50909;\n}\n\n.usa-form-group {\n margin-top: 1.5rem;\n}\n.usa-form-group .usa-label:first-child {\n margin-top: 0;\n}\n\n.usa-form-group--error {\n border-left-width: 0.25rem;\n border-left-color: #b50909;\n border-left-style: solid;\n padding-left: 1rem;\n position: relative;\n}\n@media all and (min-width: 64em) {\n .usa-form-group--error {\n margin-left: -1.25rem;\n }\n}\n\n.usa-error-message {\n padding-bottom: 0.25rem;\n padding-top: 0.25rem;\n color: #b50909;\n display: block;\n font-weight: 700;\n}\n\n.usa-error-message {\n font-size: 1.06rem;\n}\n\n:host([error]:not([error=""])) {\n border-left: 0.25rem solid #b50909;\n padding-left: 1rem;\n position: relative;\n}\n\n:host([error]:not([error=""])[use-forms-pattern=multiple]) {\n border-left: none;\n}\n\n:host([error]:not([error=""])[use-forms-pattern=multiple]) .input-wrap {\n border-left: 0.25rem solid #b50909;\n padding-left: 1rem;\n position: relative;\n}\n\n@media screen and (min-width: 1008px) {\n :host([error]:not([error=""])) {\n margin-left: -0.9rem;\n }\n\n :host([error]:not([error=""])[use-forms-pattern=multiple]) .input-wrap {\n margin-left: -0.9rem;\n }\n}\n@media screen and (max-width: 1008px) {\n :host([error]:not([error=""])[use-forms-pattern=multiple]) {\n padding-left: 0;\n }\n}\n:host {\n display: block;\n margin-top: 24px;\n}\n\nva-text-input::part(label),\nva-combo-box::part(label) {\n margin-top: 0;\n}\n\ndiv.input-wrap {\n max-width: var(--mobile-lg) !important;\n}\n\nfieldset {\n max-width: var(--mobile-lg) !important;\n container-name: component-wrapper;\n container-type: inline-size;\n}\n\nva-combo-box {\n -ms-flex: 1;\n flex: 1;\n min-width: 216px;\n}\n\nva-text-input {\n width: 20ch;\n}\n\n.va-input-telephone-wrapper {\n display: -ms-flexbox;\n display: flex;\n -ms-flex-align: start;\n align-items: flex-start;\n -ms-flex-wrap: wrap;\n flex-wrap: wrap;\n gap: 8px;\n margin-top: 8px;\n width: 100%;\n max-width: var(--mobile-lg);\n}\n\n@container component-wrapper (max-width: 360px) {\n va-combo-box, va-text-input {\n width: 100%;\n max-width: 100% !important;\n margin-top: 16px;\n -ms-flex: 0;\n flex: 0;\n width: 288px;\n }\n\n .va-input-telephone-wrapper {\n display: block;\n }\n}\n@media (max-width: 360px) {\n va-combo-box, va-text-input {\n width: 100%;\n max-width: 100% !important;\n margin-top: 16px;\n -ms-flex: 0;\n flex: 0;\n width: 288px;\n }\n\n .va-input-telephone-wrapper {\n display: block;\n }\n}',VaTelephoneInputStyle0=vaTelephoneInputCss,VaTelephoneInput$1=proxyCustomElement(class extends HTMLElement{constructor(){super(),this.__registerHost(),this.__attachShadow(),this.vaContact=createEvent(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}syncErrorMessages(n){(null==n?void 0:n.includes(this.CONTACT_ERROR))?this.contactError=this.error:n===this.COUNTRY_ERROR?this.countryError=n:this.resetErrors()}resetErrors(){this.countryError="",this.contactError="",this.error=""}setValidityState(){this.country&&this.contact?(this.isValid=isPossiblePhoneNumber(this.contact,mapCountry(this.country)),this.formattedContact=this.formatContact(this.contact)):this.isValid=!1}updateContact(n){const e=n.target,{value:t}=e;this.contact=t,this.formattedContact=this.formatContact(t),this.validateContact(),this.handleEmit()}getTemplate(){const n=mapCountry(this.country);let e=getExampleNumber(n,examples).format("NATIONAL");const t=new AsYouType(n);return t.input(e),t.getTemplate()}getErrorMessageForCountry(){const n=mapCountry(this.country),e=this.getCountryName(n);return`Enter ${getArticle(e,!1)} ${e} phone number in a valid format, for example, ${this.getTemplate()}`}validateContact(){this.country?(this.resetErrors(),this.setValidityState(),!this.isValid&&this.touched&&this.showInternalErrors&&(this.error=this.getErrorMessageForCountry(),this.contactError=this.error)):this.validateCountry()}handleEmit(){const n=!!this.contact&&!!this.country;let e;try{e=n?parsePhoneNumberWithError(this.contact,mapCountry(this.country)):null}catch(n){e=null}let t=null;this.isValid||(t=this.country?this.getErrorMessageForCountry():this.COUNTRY_ERROR),this.vaContact.emit({callingCode:n&&null!==e?e.countryCallingCode:void 0,countryCode:this.country,contact:n&&null!==e?e.nationalNumber:this.contact,isValid:this.isValid,error:t,touched:this.touched})}validateCountry(){this.resetErrors(),this.touched||(this.touched=!0),this.country||(this.isValid=!1,this.showInternalErrors&&(this.error=this.COUNTRY_ERROR,this.countryError=this.error))}countryChange(n){const{value:e}=n.detail;this.country=e,this.validateContact(),this.handleEmit()}formatContact(n){const e=new AsYouType(mapCountry(this.country)).input(n);return""===e?n:e}buildCountryList(){const n=getCountries().filter((n=>n!==this.DEFAULT_COUNTRY));n.push(...Object.keys(DATA_MAP.countries));const e=n.sort(((n,e)=>{const t=this.getCountryName(n),a=this.getCountryName(e);return t.localeCompare(a)}));return[this.DEFAULT_COUNTRY,...e]}getCountryName(n){return n in DATA_MAP.names?DATA_MAP.names[n]:new Intl.DisplayNames(["en"],{type:"region"}).of(n.toUpperCase()).replace(/&/g,"and").replace(/St\./,"Saint")}componentWillLoad(){this.countries=this.buildCountryList(),""===this.country&&(this.country=this.DEFAULT_COUNTRY)}componentDidLoad(){this.contact&&(this.formattedContact=this.formatContact(this.contact),this.validateContact());const n=this.el.shadowRoot.querySelector("va-combo-box");n&&n.addEventListener("vaSelect",this.countryChange.bind(this)),this.handleEmit()}disconnectedCallback(){const n=this.el.shadowRoot.querySelector("va-combo-box");n&&n.removeEventListener("vaSelect",this.countryChange.bind(this))}getOptionText(n){const e=mapCountry(n);return n?`${this.getCountryName(n)} +${getCountryCallingCode(e)}`:""}handleBlur(){this.touched||(this.touched=!0),this.validateContact(),this.handleEmit()}render(){const{label:n,hint:e,countries:t,error:a,formattedContact:r,country:o,countryError:i,contactError:s,noCountry:l,required:u}=this,c=classnames({"usa-legend":!0,"usa-label--error":!!a});return h(Host,{key:"6c12d33344dedc5ba87e015f7f5ae1797a143ec5"},h("div",{key:"56cf5f9906e4a5bd92455be4aef463421d662b8c",class:"input-wrap"},h("fieldset",{key:"698591eab9d31fc9dd511a80f196e3231b71ac34",class:"usa-form usa-fieldset"},h("legend",{key:"2a768423889b8a82629454c5fa056d86a39a9196",class:c},n,u&&h("span",{key:"69c69e9373fb6f1d43903f5295a2c48f7e633d00",class:"usa-label--required"}," ",instance.t("required")),e&&h("div",{key:"9f9ff003e8a6dfc307ef8dc7b25a736b2f18c295",class:"usa-hint"},e)),a&&h("span",{key:"80c6ed0026ca98bde4cf5461aa57b6d15a52494d",id:"error-message",role:"alert"},a),h("div",{key:"8633f92022cea3dd9a654b7ff9dd22f2f78c8594",class:"va-input-telephone-wrapper",tabIndex:0},!l&&h("va-combo-box",{key:"2fb5c2b476407aefa2eba282eb3097f01ef52878",label:"Country code",name:"country-codes","show-input-error":"false",error:i,value:o},t.map((n=>h("option",{value:n,key:n},this.getOptionText(n))))),h("va-text-input",{key:"880ece9a9753f1792ce5b03551dfb8a275e58c5f",label:"Phone number",type:"tel",autocomplete:"tel",inputmode:"tel",value:r,"show-input-error":"false",error:s,onInput:n=>this.updateContact(n),onBlur:()=>this.handleBlur()})))))}get el(){return this}static get watchers(){return{error:["syncErrorMessages"]}}static get style(){return VaTelephoneInputStyle0}},[1,"va-telephone-input",{contact:[1537],country:[1537],label:[1],hint:[1],error:[1537],noCountry:[4,"no-country"],required:[4],showInternalErrors:[4,"show-internal-errors"],formattedContact:[32],countries:[32],countryError:[32],contactError:[32],isValid:[32],touched:[32]},void 0,{error:["syncErrorMessages"]}]);function defineCustomElement$1(){"undefined"!=typeof customElements&&["va-telephone-input","va-combo-box","va-icon","va-text-input"].forEach((n=>{switch(n){case"va-telephone-input":customElements.get(n)||customElements.define(n,VaTelephoneInput$1);break;case"va-combo-box":customElements.get(n)||defineCustomElement$4();break;case"va-icon":customElements.get(n)||defineCustomElement$3();break;case"va-text-input":customElements.get(n)||defineCustomElement$2()}}))}const VaTelephoneInput=VaTelephoneInput$1,defineCustomElement=defineCustomElement$1;export{VaTelephoneInput,defineCustomElement};
|
|
1
|
+
import{proxyCustomElement,HTMLElement,createEvent,h,Host}from"@stencil/core/internal/client";import{c as classnames}from"./index2.js";import"./i18n-setup.js";import"./contacts.js";import{n as normalizeArguments,p as parsePhoneNumberWithError$2,a as parsePhoneNumber,c as checkNumberLength,f as formatNationalNumberUsingFormat,b as parseDigits,F as FIRST_GROUP_PATTERN,d as applyInternationalSeparatorStyle,V as VALID_PUNCTUATION,e as extractCountryCallingCode,g as extractNationalNumberFromPossiblyIncompleteNumber,s as stripIddPrefix,h as extractCountryCallingCodeFromInternationalNumberWithoutPlusSign,i as VALID_DIGITS,P as PLUS_CHARS,M as Metadata$1,j as getCountryByCallingCode,k as getCountryByNationalNumber,l as PhoneNumber,m as isObject,w as withMetadataArgument,o as metadata,q as isSupportedCountry$1,r as getCountryCallingCode$1}from"./parsePhoneNumber_.js";import{d as defineCustomElement$4}from"./va-combo-box2.js";import{d as defineCustomElement$3}from"./va-icon2.js";import{d as defineCustomElement$2}from"./va-text-input2.js";import{i as instance}from"./i18next.js";function parsePhoneNumberWithError$1(){var t=normalizeArguments(arguments),e=t.text,r=t.options,a=t.metadata;return parsePhoneNumberWithError$2(e,r,a)}function ownKeys(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 _objectSpread(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?ownKeys(Object(r),!0).forEach((function(e){_defineProperty(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ownKeys(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function _defineProperty(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function isPossiblePhoneNumber$1(){var t=normalizeArguments(arguments),e=t.text,r=t.options,a=t.metadata;r=_objectSpread(_objectSpread({},r),{},{extract:!1});var n=parsePhoneNumber(e,r,a);return n&&n.isPossible()||!1}function _classCallCheck$5(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function _defineProperties$5(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)}}function _createClass$5(t,e,r){return e&&_defineProperties$5(t.prototype,e),r&&_defineProperties$5(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}var AsYouTypeState=function(){function t(e){var r=e.onCountryChange,a=e.onCallingCodeChange;_classCallCheck$5(this,t),this.onCountryChange=r,this.onCallingCodeChange=a}return _createClass$5(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 _createForOfIteratorHelperLoose$2(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=_unsupportedIterableToArray$4(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 _unsupportedIterableToArray$4(t,e){if(t){if("string"==typeof t)return _arrayLikeToArray$4(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)?_arrayLikeToArray$4(t,e):void 0}}function _arrayLikeToArray$4(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 DIGIT_PLACEHOLDER="x",DIGIT_PLACEHOLDER_MATCHER=new RegExp(DIGIT_PLACEHOLDER);function repeat(t,e){if(e<1)return"";for(var r="";e>1;)1&e&&(r+=t),e>>=1,t+=t;return r+t}function cutAndStripNonPairedParens(t,e){return")"===t[e]&&e++,stripNonPairedParens(t.slice(0,e))}function stripNonPairedParens(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}function populateTemplateWithDigits(t,e,r){for(var a,n=_createForOfIteratorHelperLoose$2(r.split(""));!(a=n()).done;){var i=a.value;if(t.slice(e+1).search(DIGIT_PLACEHOLDER_MATCHER)<0)return;e=t.search(DIGIT_PLACEHOLDER_MATCHER),t=t.replace(DIGIT_PLACEHOLDER_MATCHER,i)}return[t,e]}function formatCompleteNumber(t,e,r){var a=r.metadata,n=r.shouldTryNationalPrefixFormattingRule,i=r.getSeparatorAfterNationalPrefix;if(new RegExp("^(?:".concat(e.pattern(),")$")).test(t.nationalSignificantNumber))return formatNationalNumberWithAndWithoutNationalPrefixFormattingRule(t,e,{metadata:a,shouldTryNationalPrefixFormattingRule:n,getSeparatorAfterNationalPrefix:i})}function canFormatCompleteNumber(t,e){return"IS_POSSIBLE"===checkNumberLength(t,e)}function formatNationalNumberWithAndWithoutNationalPrefixFormattingRule(t,e,r){var a=r.metadata,n=r.shouldTryNationalPrefixFormattingRule,i=r.getSeparatorAfterNationalPrefix;if(n(e)){var o=formatNationalNumber(t,e,{useNationalPrefixFormattingRule:!0,getSeparatorAfterNationalPrefix:i,metadata:a});if(o)return o}return formatNationalNumber(t,e,{useNationalPrefixFormattingRule:!1,getSeparatorAfterNationalPrefix:i,metadata:a})}function formatNationalNumber(t,e,r){var a=r.metadata,n=r.useNationalPrefixFormattingRule,i=r.getSeparatorAfterNationalPrefix,o=formatNationalNumberUsingFormat(t.nationalSignificantNumber,e,{carrierCode:t.carrierCode,useInternationalFormat:t.international,withNationalPrefix:n,metadata:a});if(n||(t.nationalPrefix?o=t.nationalPrefix+i(e)+o:t.complexPrefixBeforeNationalSignificantNumber&&(o=t.complexPrefixBeforeNationalSignificantNumber+" "+o)),isValidFormattedNationalNumber(o,t))return o}function isValidFormattedNationalNumber(t,e){return parseDigits(t)===e.getNationalDigits()}function _classCallCheck$4(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function _defineProperties$4(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)}}function _createClass$4(t,e,r){return e&&_defineProperties$4(t.prototype,e),r&&_defineProperties$4(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}var PatternParser=function(){function t(){_classCallCheck$4(this,t)}return _createClass$4(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([expandSingleElementArray(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(OPERATOR);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(expandSingleElementArray(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(expandSingleElementArray(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:parseOneOfSet(a)});break;default:throw new Error("Unknown operator: ".concat(r))}n&&this.parsePattern(n)}else{if(ILLEGAL_CHARACTER_REGEXP.test(t))throw new Error("Illegal characters found in a pattern: ".concat(t));this.getContext().instructions=this.getContext().instructions.concat(t.split(""))}}}]),t}();function parseOneOfSet(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 ILLEGAL_CHARACTER_REGEXP=/[\(\)\[\]\?\:\|]/,OPERATOR=new RegExp("(\\||\\(\\?\\:|\\)|\\[|\\])");function expandSingleElementArray(t){return 1===t.length?t[0]:t}function _createForOfIteratorHelperLoose$1(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=_unsupportedIterableToArray$3(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 _unsupportedIterableToArray$3(t,e){if(t){if("string"==typeof t)return _arrayLikeToArray$3(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)?_arrayLikeToArray$3(t,e):void 0}}function _arrayLikeToArray$3(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 _classCallCheck$3(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function _defineProperties$3(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)}}function _createClass$3(t,e,r){return e&&_defineProperties$3(t.prototype,e),r&&_defineProperties$3(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}var PatternMatcher=function(){function t(e){_classCallCheck$3(this,t),this.matchTree=(new PatternParser).parse(e)}return _createClass$3(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=_match(t.split(""),this.matchTree,!0);if(r&&r.match&&delete r.matchedChars,!r||!r.overflow||e)return r}}]),t}();function _match(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=_match(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,l,u=_createForOfIteratorHelperLoose$1(e.args);!(l=u()).done;){var c=_match(t,l.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,d=_createForOfIteratorHelperLoose$1(e.args);!(h=d()).done;){var f=h.value;if(t[0]===f)return 1===t.length?{match:!0,matchedChars:t}:r?{overflow:!0}:{match:!0,matchedChars:[f]}}return;default:throw new Error("Unsupported instruction tree: ".concat(e))}}function _createForOfIteratorHelperLoose(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=_unsupportedIterableToArray$2(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 _unsupportedIterableToArray$2(t,e){if(t){if("string"==typeof t)return _arrayLikeToArray$2(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)?_arrayLikeToArray$2(t,e):void 0}}function _arrayLikeToArray$2(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 _classCallCheck$2(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function _defineProperties$2(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)}}function _createClass$2(t,e,r){return e&&_defineProperties$2(t.prototype,e),r&&_defineProperties$2(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}var DUMMY_DIGIT="9",LONGEST_NATIONAL_PHONE_NUMBER_LENGTH=15,LONGEST_DUMMY_PHONE_NUMBER=repeat(DUMMY_DIGIT,LONGEST_NATIONAL_PHONE_NUMBER_LENGTH),NATIONAL_PREFIX_SEPARATORS_PATTERN=/[- ]/,CREATE_CHARACTER_CLASS_PATTERN=function(){return/\[([^\[\]])*\]/g},CREATE_STANDALONE_DIGIT_PATTERN=function(){return/\d(?=[^,}][^,}])/g},NON_ALTERING_FORMAT_REG_EXP=new RegExp("["+VALID_PUNCTUATION+"]*\\$1["+VALID_PUNCTUATION+"]*(\\$\\d["+VALID_PUNCTUATION+"]*)*$"),MIN_LEADING_DIGITS_LENGTH=3,AsYouTypeFormatter=function(){function t(e){var r=e.metadata;_classCallCheck$2(this,t),this.metadata=r,this.resetFormat()}return _createClass$2(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(canFormatCompleteNumber(e.nationalSignificantNumber,this.metadata))for(var a,n=_createForOfIteratorHelperLoose(this.matchingFormats);!(a=n()).done;){var i=a.value,o=formatCompleteNumber(e,i,{metadata:this.metadata,shouldTryNationalPrefixFormattingRule:function(t){return r.shouldTryNationalPrefixFormattingRule(t,{international:e.international,nationalPrefix:e.nationalPrefix})},getSeparatorAfterNationalPrefix:function(t){return r.getSeparatorAfterNationalPrefix(t)}});if(o)return this.resetFormat(),this.chosenFormat=i,this.setNationalNumberTemplate(o.replace(/\d/g,DIGIT_PLACEHOLDER),e),this.populatedNationalNumberTemplate=o,this.populatedNationalNumberTemplatePosition=this.template.lastIndexOf(DIGIT_PLACEHOLDER),o}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-MIN_LEADING_DIGITS_LENGTH;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){var a=t.leadingDigitsPatterns().length;if(0===a)return!0;r=Math.min(r,a-1);var n=t.leadingDigitsPatterns()[r];if(e.length<MIN_LEADING_DIGITS_LENGTH)try{return void 0!==new PatternMatcher(n).match(e,{allowOverflow:!0})}catch(t){return console.error(t),!0}return new RegExp("^(".concat(n,")")).test(e)}},{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":NON_ALTERING_FORMAT_REG_EXP.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=_createForOfIteratorHelperLoose(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()&&NATIONAL_PREFIX_SEPARATORS_PATTERN.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(DIGIT_PLACEHOLDER,e+1),r++;return cutAndStripNonPairedParens(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,DIGIT_PLACEHOLDER)+repeat(DIGIT_PLACEHOLDER,e.callingCode.length)+" "+t:this.template=t}},{key:"getTemplateForFormat",value:function(t,e){var r=e.nationalSignificantNumber,a=e.international,n=e.nationalPrefix,i=e.complexPrefixBeforeNationalSignificantNumber,o=t.pattern();o=o.replace(CREATE_CHARACTER_CLASS_PATTERN(),"\\d").replace(CREATE_STANDALONE_DIGIT_PATTERN(),"\\d");var s=LONGEST_DUMMY_PHONE_NUMBER.match(o)[0];if(!(r.length>s.length)){var l=new RegExp("^"+o+"$"),u=r.replace(/\d/g,DUMMY_DIGIT);l.test(u)&&(s=u);var c,h=this.getFormatFormat(t,a);if(this.shouldTryNationalPrefixFormattingRule(t,{international:a,nationalPrefix:n})){var d=h.replace(FIRST_GROUP_PATTERN,t.nationalPrefixFormattingRule());if(parseDigits(t.nationalPrefixFormattingRule())===(n||"")+parseDigits("$1")&&(h=d,c=!0,n))for(var f=n.length;f>0;)h=h.replace(/\d/,DIGIT_PLACEHOLDER),f--}var m=s.replace(new RegExp(o),h).replace(new RegExp(DUMMY_DIGIT,"g"),DIGIT_PLACEHOLDER);return c||(i?m=repeat(DIGIT_PLACEHOLDER,i.length)+" "+m:n&&(m=repeat(DIGIT_PLACEHOLDER,n.length)+this.getSeparatorAfterNationalPrefix(t)+m)),a&&(m=applyInternationalSeparatorStyle(m)),m}}},{key:"formatNextNationalNumberDigits",value:function(t){var e=populateTemplateWithDigits(this.populatedNationalNumberTemplate,this.populatedNationalNumberTemplatePosition,t);if(e)return this.populatedNationalNumberTemplate=e[0],this.populatedNationalNumberTemplatePosition=e[1],cutAndStripNonPairedParens(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 _slicedToArray$1(t,e){return _arrayWithHoles$1(t)||_iterableToArrayLimit$1(t,e)||_unsupportedIterableToArray$1(t,e)||_nonIterableRest$1()}function _nonIterableRest$1(){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 _unsupportedIterableToArray$1(t,e){if(t){if("string"==typeof t)return _arrayLikeToArray$1(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)?_arrayLikeToArray$1(t,e):void 0}}function _arrayLikeToArray$1(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 _iterableToArrayLimit$1(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}}function _arrayWithHoles$1(t){if(Array.isArray(t))return t}function _classCallCheck$1(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function _defineProperties$1(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)}}function _createClass$1(t,e,r){return e&&_defineProperties$1(t.prototype,e),r&&_defineProperties$1(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}var VALID_FORMATTED_PHONE_NUMBER_DIGITS_PART="["+VALID_PUNCTUATION+VALID_DIGITS+"]+",VALID_FORMATTED_PHONE_NUMBER_DIGITS_PART_PATTERN=new RegExp("^"+VALID_FORMATTED_PHONE_NUMBER_DIGITS_PART+"$","i"),VALID_FORMATTED_PHONE_NUMBER_PART="(?:["+PLUS_CHARS+"]["+VALID_PUNCTUATION+VALID_DIGITS+"]*|["+VALID_PUNCTUATION+VALID_DIGITS+"]+)",AFTER_PHONE_NUMBER_DIGITS_END_PATTERN=new RegExp("[^"+VALID_PUNCTUATION+VALID_DIGITS+"]+.*$"),COMPLEX_NATIONAL_PREFIX=/[^\d\[\]]/,AsYouTypeParser=function(){function t(e){var r=e.defaultCountry,a=e.defaultCallingCode,n=e.metadata,i=e.onNationalSignificantNumberChange;_classCallCheck$1(this,t),this.defaultCountry=r,this.defaultCallingCode=a,this.metadata=n,this.onNationalSignificantNumberChange=i}return _createClass$1(t,[{key:"input",value:function(t,e){var r,a=_slicedToArray$1(extractFormattedDigitsAndPlus(t),2),n=a[0],i=a[1],o=parseDigits(n);return i&&(e.digits||(e.startInternationalNumber(),o||(r=!0))),o&&this.inputDigits(o,e),{digits:o,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=extractCountryCallingCode("+"+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&&COMPLEX_NATIONAL_PREFIX.test(e)}else this.hasSelectedNumberingPlan=void 0,this.couldPossiblyExtractAnotherNationalSignificantNumber=void 0}},{key:"extractNationalSignificantNumber",value:function(t,e){if(this.hasSelectedNumberingPlan){var r=extractNationalNumberFromPossiblyIncompleteNumber(t,this.metadata),a=r.nationalPrefix,n=r.nationalNumber,i=r.carrierCode;if(n!==t)return this.onExtractedNationalNumber(a,i,n,t,e),!0}}},{key:"extractAnotherNationalSignificantNumber",value:function(t,e,r){if(!this.hasExtractedNationalSignificantNumber)return this.extractNationalSignificantNumber(t,r);if(this.couldPossiblyExtractAnotherNationalSignificantNumber){var a=extractNationalNumberFromPossiblyIncompleteNumber(t,this.metadata),n=a.nationalPrefix,i=a.nationalNumber,o=a.carrierCode;if(i!==e)return this.onExtractedNationalNumber(n,o,i,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 l=a.slice(0,s);l!==t&&(i=l)}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=stripIddPrefix(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=extractCountryCallingCodeFromInternationalNumberWithoutPlusSign(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 extractFormattedPhoneNumber(t){var e,r=t.search(VALID_FORMATTED_PHONE_NUMBER_PART);if(!(r<0))return"+"===(t=t.slice(r))[0]&&(e=!0,t=t.slice(1)),t=t.replace(AFTER_PHONE_NUMBER_DIGITS_END_PATTERN,""),e&&(t="+"+t),t}function _extractFormattedDigitsAndPlus(t){var e=extractFormattedPhoneNumber(t)||"";return"+"===e[0]?[e.slice(1),!0]:[e]}function extractFormattedDigitsAndPlus(t){var e=_slicedToArray$1(_extractFormattedDigitsAndPlus(t),2),r=e[0],a=e[1];return VALID_FORMATTED_PHONE_NUMBER_DIGITS_PART_PATTERN.test(r)||(r=""),[r,a]}function _slicedToArray(t,e){return _arrayWithHoles(t)||_iterableToArrayLimit(t,e)||_unsupportedIterableToArray(t,e)||_nonIterableRest()}function _nonIterableRest(){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 _unsupportedIterableToArray(t,e){if(t){if("string"==typeof t)return _arrayLikeToArray(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)?_arrayLikeToArray(t,e):void 0}}function _arrayLikeToArray(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 _iterableToArrayLimit(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}}function _arrayWithHoles(t){if(Array.isArray(t))return t}function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function _defineProperties(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)}}function _createClass(t,e,r){return e&&_defineProperties(t.prototype,e),r&&_defineProperties(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}var AsYouType$1=function(){function t(e,r){_classCallCheck(this,t),this.metadata=new Metadata$1(r);var a=_slicedToArray(this.getCountryAndCallingCode(e),2),n=a[0],i=a[1];this.defaultCountry=n,this.defaultCallingCode=i,this.reset()}return _createClass(t,[{key:"getCountryAndCallingCode",value:function(t){var e,r;return t&&(isObject(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 AsYouTypeState({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 AsYouTypeFormatter({state:this.state,metadata:this.metadata}),this.parser=new AsYouTypeParser({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,r=this;if(this.isInternational()){var a=this.state.callingCode;return e=a?t?"".concat(a," ").concat(t):a:"".concat(this.state.getDigitsWithoutInternationalPrefix()),r.formatter.getInternationalPrefixBeforeCountryCallingCode(r.state,{spacing:!!e})+e}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,DIGIT_PLACEHOLDER)}},{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(getCountryByCallingCode(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 i=new Metadata$1(this.metadata.metadata);i.selectNumberingPlan(n);var o=i.numberingPlan.callingCode(),s=this.metadata.getCountryCodesForCallingCode(o);if(s.length>1){var l=getCountryByNationalNumber(e,{countries:s,defaultCountry:this.defaultCountry,metadata:this.metadata.metadata});l&&(n=l)}}var u=new PhoneNumber(n||a,e,this.metadata.metadata);return r&&(u.carrierCode=r),u}}},{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 getCountries$1(t){return new Metadata$1(t).getCountries()}function parsePhoneNumberWithError(){return withMetadataArgument(parsePhoneNumberWithError$1,arguments)}function isPossiblePhoneNumber(){return withMetadataArgument(isPossiblePhoneNumber$1,arguments)}function AsYouType(t){return AsYouType$1.call(this,t,metadata)}function isSupportedCountry(){return withMetadataArgument(isSupportedCountry$1,arguments)}function getCountries(){return withMetadataArgument(getCountries$1,arguments)}function getCountryCallingCode(){return withMetadataArgument(getCountryCallingCode$1,arguments)}function Metadata(){return Metadata$1.call(this,metadata)}AsYouType.prototype=Object.create(AsYouType$1.prototype,{}),AsYouType.prototype.constructor=AsYouType,Metadata.prototype=Object.create(Metadata$1.prototype,{}),Metadata.prototype.constructor=Metadata;const DATA_MAP={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 mapCountry(t){return isSupportedCountry(t)?t:t in DATA_MAP.countries?DATA_MAP.countries[t]:void console.error(`Not a valid country: ${t}`)}const vaTelephoneInputCss='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}#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: 1008px){:host([error]:not([error=\'\'])),:host(.va-form-group--error){margin-left:-1.4375rem;}}.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}.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: 1008px){: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: 1008px){: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}}',VaTelephoneInputStyle0=vaTelephoneInputCss,VaTelephoneInput$1=proxyCustomElement(class extends HTMLElement{constructor(){super(),this.__registerHost(),this.__attachShadow(),this.vaContact=createEvent(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}syncErrorMessages(t){(null==t?void 0:t.includes(this.CONTACT_ERROR))?this.contactError=this.error:t===this.COUNTRY_ERROR?this.countryError=t:this.resetErrors()}resetErrors(){this.countryError="",this.contactError="",this.visibleError=this.error}setValidityState(){this.country&&this.contact?(this.isValid=isPossiblePhoneNumber(this.contact,mapCountry(this.country)),this.formattedContact=this.formatContact(this.contact)):this.isValid=!1}updateContact(t){const e=t.target,{value:r}=e;this.contact=r,this.formattedContact=this.formatContact(r),this.validateContact(),this.handleEmit()}getPhoneNumberLengthString(t){if(!t.length)return"";const e=t.slice().sort(((t,e)=>t-e));let r=!0;for(let t=1;t<e.length;t++)if(e[t]!==e[t-1]+1){r=!1;break}return r&&e.length>1?`${e[0]} to ${e[e.length-1]}`:1===e.length?String(e[0]):2===e.length&&e[1]===e[0]+1?`${e[0]} to ${e[1]}`:2===e.length?`${e[0]} or ${e[1]}`:`${e.slice(0,-1).join(", ")} or ${e[e.length-1]}`}getValidPhoneNumberLengths(){const t=mapCountry(this.country),e=new Metadata;e.selectNumberingPlan(t);const r=e.numberingPlan.possibleLengths();return this.getPhoneNumberLengthString(r)}getErrorMessageForCountry(){const t=mapCountry(this.country);return`Enter a valid ${this.getCountryName(t)} phone number. Use ${this.getValidPhoneNumberLengths()} digits.`}validateContact(){this.country?(this.resetErrors(),this.setValidityState(),!this.isValid&&this.touched&&this.showInternalErrors&&(this.visibleError=this.getErrorMessageForCountry(),this.contactError=this.visibleError)):this.validateCountry()}handleEmit(){const t=!!this.contact&&!!this.country;let e;try{e=t?parsePhoneNumberWithError(this.contact,mapCountry(this.country)):null}catch(t){e=null}let r=null;this.isValid||(r=this.country?this.getErrorMessageForCountry():this.COUNTRY_ERROR),this.vaContact.emit({callingCode:t&&null!==e?e.countryCallingCode:void 0,countryCode:this.country,contact:t&&null!==e?e.nationalNumber:this.contact,isValid:this.isValid,error:r,touched:this.touched})}validateCountry(){this.resetErrors(),this.touched||(this.touched=!0),this.country||(this.isValid=!1,this.showInternalErrors&&(this.visibleError=this.COUNTRY_ERROR,this.countryError=this.visibleError))}countryChange(t){const{value:e}=t.detail;this.country=e,this.validateContact(),this.handleEmit()}formatContact(t){const e=new AsYouType(mapCountry(this.country)).input(t);return""===e?t:e}buildCountryList(){const t=getCountries().filter((t=>t!==this.DEFAULT_COUNTRY));t.push(...Object.keys(DATA_MAP.countries));const e=t.sort(((t,e)=>{const r=this.getCountryName(t),a=this.getCountryName(e);return r.localeCompare(a)}));return[this.DEFAULT_COUNTRY,...e]}getCountryName(t){return t in DATA_MAP.names?DATA_MAP.names[t]:new Intl.DisplayNames(["en"],{type:"region"}).of(t.toUpperCase()).replace(/&/g,"and").replace(/St\./,"Saint")}componentWillLoad(){this.countries=this.buildCountryList(),""===this.country&&(this.country=this.DEFAULT_COUNTRY),this.visibleError=this.error}componentDidLoad(){this.contact&&(this.formattedContact=this.formatContact(this.contact),this.validateContact());const t=this.el.shadowRoot.querySelector("va-combo-box");t&&t.addEventListener("vaSelect",this.countryChange.bind(this)),this.handleEmit()}disconnectedCallback(){const t=this.el.shadowRoot.querySelector("va-combo-box");t&&t.removeEventListener("vaSelect",this.countryChange.bind(this))}getOptionText(t){const e=mapCountry(t);return t?`${this.getCountryName(t)} +${getCountryCallingCode(e)}`:""}handleBlur(){this.touched||(this.touched=!0),this.validateContact(),this.handleEmit()}render(){const{label:t,hint:e,countries:r,formattedContact:a,country:n,countryError:i,contactError:o,visibleError:s,noCountry:l,required:u}=this,c=classnames({"va-form-group--error":!!s}),d=classnames({"usa-legend":!0,"usa-label--error":!!s});return h(Host,{key:"6021907f5666a788c2fa1512cd031aecd86a4905",class:c},h("div",{key:"04da2dcf564bcfe6dfb1e66a6991cd8ba563960f",class:"input-wrap"},h("fieldset",{key:"e4e2f49a4ad2c9918e8188056585699c8fdcf394",class:"usa-form usa-fieldset"},h("legend",{key:"aa9c327bcb8bdf6a822322abfbdd8f26363244d1",class:d},t,u&&h("span",{key:"49d6ee1f8a35137146821eb5f0fc64e5c5b8858d",class:"usa-label--required"}," ",instance.t("required")),e&&h("div",{key:"e4ed7c0e035d38fce83404157eb5c24689f69ca8",class:"usa-hint"},e)),h("span",{key:"14199d3f835cc92a1c6a579fbff8ea13d00c6a63",id:"error-message",role:"alert"},s&&s),h("div",{key:"e45e3be21e5cff48531bcbc0d84c105da4f952fb",class:"va-input-telephone-wrapper",tabIndex:0},!l&&h("va-combo-box",{key:"f696c979b3c69b6876e10677b6bb4a0e1d61af28",label:"Country code",name:"country-codes","show-input-error":"false",error:i,value:n},r.map((t=>h("option",{value:t,key:t},this.getOptionText(t))))),h("va-text-input",{key:"85bf2a1a94c090e9ed2b719b35669edf6d416874",label:"Phone number",type:"tel",autocomplete:"tel",inputmode:"tel",value:a,"show-input-error":"false",error:o,onInput:t=>this.updateContact(t),onBlur:()=>this.handleBlur()})))))}get el(){return this}static get watchers(){return{error:["syncErrorMessages"]}}static get style(){return VaTelephoneInputStyle0}},[1,"va-telephone-input",{contact:[1537],country:[1537],label:[1],hint:[1],error:[513],noCountry:[4,"no-country"],required:[4],showInternalErrors:[4,"show-internal-errors"],formattedContact:[32],countries:[32],countryError:[32],contactError:[32],isValid:[32],touched:[32],visibleError:[32]},void 0,{error:["syncErrorMessages"]}]);function defineCustomElement$1(){"undefined"!=typeof customElements&&["va-telephone-input","va-combo-box","va-icon","va-text-input"].forEach((t=>{switch(t){case"va-telephone-input":customElements.get(t)||customElements.define(t,VaTelephoneInput$1);break;case"va-combo-box":customElements.get(t)||defineCustomElement$4();break;case"va-icon":customElements.get(t)||defineCustomElement$3();break;case"va-text-input":customElements.get(t)||defineCustomElement$2()}}))}const VaTelephoneInput=VaTelephoneInput$1,defineCustomElement=defineCustomElement$1;export{VaTelephoneInput,defineCustomElement};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{proxyCustomElement,HTMLElement,createEvent,h,Host,Fragment}from"@stencil/core/internal/client";import{i as isMessageSet}from"./utils.js";import{n as normalizeArguments,a as parsePhoneNumber$2,w as withMetadataArgument}from"./parsePhoneNumber_.js";function parsePhoneNumber$1(){var t=normalizeArguments(arguments),e=t.text,n=t.options,o=t.metadata;return parsePhoneNumber$2(e,n,o)}function parsePhoneNumber(){return withMetadataArgument(parsePhoneNumber$1,arguments)}const vaTelephoneCss="button:not([disabled]):focus,select:not([disabled]):focus,a:not([disabled]):focus,h1:focus,input:not([disabled]):focus,textarea:not([disabled]):focus,#form-question [role='option']:focus,*[tabindex]:focus,a.va-sidenav-submenu__link:focus{outline:2px solid var(--vads-color-action-focus-on-light);outline-offset:2px;z-index:2}a{text-decoration:none;color:var(--vads-color-link);-webkit-transition-duration:0.3s;transition-duration:0.3s;-webkit-transition-timing-function:ease-in-out;transition-timing-function:ease-in-out;-webkit-transition-property:color, background-color, border-color;transition-property:color, background-color, border-color}a:hover{background-color:rgba(0, 0, 0, 0.05);color:inherit}a:visited{color:var(--vads-color-link-visited)}.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}:host{font-size:1.06rem}a{white-space:nowrap}a,a:hover{text-decoration:underline}",VaTelephoneStyle0=vaTelephoneCss,VaTelephone=proxyCustomElement(class t extends HTMLElement{constructor(){super(),this.__registerHost(),this.__attachShadow(),this.componentLibraryAnalytics=createEvent(this,"component-library-analytics",7),this.contact=void 0,this.extension=void 0,this.notClickable=!1,this.international=!1,this.countryCode=void 0,this.tty=!1,this.sms=!1,this.vanity=void 0,this.messageAriaDescribedby=void 0,this.disableAnalytics=!1}static cleanContact(t){return(t||"").replace(/[^\d]/g,"")}static splitContact(e){const n=t.cleanContact(e);if(10===n.length){const t=[.../^(\d{3})(\d{3})(\d{4})$/g.exec(n)];return 4===t.length?t.slice(-3):[n]}return[n]}static formatPhoneNumber({contact:e,extension:n,international:o=!1,countryCode:i,vanity:a,tty:s=!1}){const r=i?[e]:t.splitContact(e);let c=r.join("");if(10===c.length&&!i){const[t,e,i]=r;c=`${t}-${e}-${i}`,o&&(c=`+1-${c}`),n&&(c=`${c}, ext. ${n}`),a&&(c=4===a.length?`${t}-${e}-${a} (${i})`:`${a} (${c})`)}if(i){let t=null;try{t=parsePhoneNumber(`+${i}${c}`)}catch(t){console.error("Error parsing phone number:",t)}c=t?t.formatInternational():c.startsWith("+")?`${c}`:`+${i} ${c}`}return s&&(c=`TTY: ${c}`),c}static createHref({contact:e,extension:n,sms:o,countryCode:i}){const a=t.cleanContact(e),s=3===a.length;let r=null;return r=o?`sms:${a}`:s?`tel:${a}`:i?`tel:+${i}${a}`:`tel:+1${a}`,`${r}${n?`,${n}`:""}`}handleClick(){this.disableAnalytics||this.componentLibraryAnalytics.emit({componentName:"va-telephone",action:"click",details:{contact:this.contact,extension:this.extension}})}render(){const{contact:e,extension:n,notClickable:o,international:i,countryCode:a,tty:s,vanity:r,sms:c,messageAriaDescribedby:l}=this,d=t.formatPhoneNumber({contact:e,extension:n,international:i,countryCode:a,vanity:r,tty:s}),u=t.createHref({contact:e,extension:n,sms:c,countryCode:a}),m=isMessageSet(l),p=m?"number-description":null;return h(Host,{key:"
|
|
1
|
+
import{proxyCustomElement,HTMLElement,createEvent,h,Host,Fragment}from"@stencil/core/internal/client";import{i as isMessageSet}from"./utils.js";import{n as normalizeArguments,a as parsePhoneNumber$2,w as withMetadataArgument}from"./parsePhoneNumber_.js";function parsePhoneNumber$1(){var t=normalizeArguments(arguments),e=t.text,n=t.options,o=t.metadata;return parsePhoneNumber$2(e,n,o)}function parsePhoneNumber(){return withMetadataArgument(parsePhoneNumber$1,arguments)}const vaTelephoneCss="button:not([disabled]):focus,select:not([disabled]):focus,a:not([disabled]):focus,h1:focus,input:not([disabled]):focus,textarea:not([disabled]):focus,#form-question [role='option']:focus,*[tabindex]:focus,a.va-sidenav-submenu__link:focus{outline:2px solid var(--vads-color-action-focus-on-light);outline-offset:2px;z-index:2}a{text-decoration:none;color:var(--vads-color-link);-webkit-transition-duration:0.3s;transition-duration:0.3s;-webkit-transition-timing-function:ease-in-out;transition-timing-function:ease-in-out;-webkit-transition-property:color, background-color, border-color;transition-property:color, background-color, border-color}a:hover{background-color:rgba(0, 0, 0, 0.05);color:inherit}a:visited{color:var(--vads-color-link-visited)}.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}:host{font-size:1.06rem}a{white-space:nowrap}a,a:hover{text-decoration:underline}",VaTelephoneStyle0=vaTelephoneCss,VaTelephone=proxyCustomElement(class t extends HTMLElement{constructor(){super(),this.__registerHost(),this.__attachShadow(),this.componentLibraryAnalytics=createEvent(this,"component-library-analytics",7),this.contact=void 0,this.extension=void 0,this.notClickable=!1,this.international=!1,this.countryCode=void 0,this.tty=!1,this.sms=!1,this.vanity=void 0,this.messageAriaDescribedby=void 0,this.disableAnalytics=!1}static cleanContact(t){return(t||"").replace(/[^\d]/g,"")}static splitContact(e){const n=t.cleanContact(e);if(10===n.length){const t=[.../^(\d{3})(\d{3})(\d{4})$/g.exec(n)];return 4===t.length?t.slice(-3):[n]}return[n]}static formatPhoneNumber({contact:e,extension:n,international:o=!1,countryCode:i,vanity:a,tty:s=!1}){const r=i?[e]:t.splitContact(e);let c=r.join("");if(10===c.length&&!i){const[t,e,i]=r;c=`${t}-${e}-${i}`,o&&(c=`+1-${c}`),n&&(c=`${c}, ext. ${n}`),a&&(c=4===a.length?`${t}-${e}-${a} (${i})`:`${a} (${c})`)}if(i){let t=null;try{t=parsePhoneNumber(`+${i}${c}`)}catch(t){console.error("Error parsing phone number:",t)}c=t?t.formatInternational():c.startsWith("+")?`${c}`:`+${i} ${c}`}return s&&(c=`TTY: ${c}`),c}static createHref({contact:e,extension:n,sms:o,countryCode:i}){const a=t.cleanContact(e),s=3===a.length;let r=null;return r=o?`sms:${a}`:s?`tel:${a}`:i?`tel:+${i}${a}`:`tel:+1${a}`,`${r}${n?`,${n}`:""}`}handleClick(){this.disableAnalytics||this.componentLibraryAnalytics.emit({componentName:"va-telephone",action:"click",details:{contact:this.contact,extension:this.extension}})}render(){const{contact:e,extension:n,notClickable:o,international:i,countryCode:a,tty:s,vanity:r,sms:c,messageAriaDescribedby:l}=this,d=t.formatPhoneNumber({contact:e,extension:n,international:i,countryCode:a,vanity:r,tty:s}),u=t.createHref({contact:e,extension:n,sms:c,countryCode:a}),m=isMessageSet(l),p=m?"number-description":null;return h(Host,{key:"f9d22e06d0a63678281dd5da22f897f3cad5d624"},o?h(Fragment,null,h("span",{"aria-describedby":p},d)):h("a",{"aria-describedby":p,href:u,onClick:this.handleClick.bind(this)},d),m&&h("span",{key:"225cb1cd581dfed17965b6a9e58f2f22fce25a3b",id:"number-description",class:"sr-only"},l))}static get style(){return VaTelephoneStyle0}},[1,"va-telephone",{contact:[1],extension:[1],notClickable:[4,"not-clickable"],international:[4],countryCode:[1,"country-code"],tty:[4],sms:[4],vanity:[1],messageAriaDescribedby:[1,"message-aria-describedby"],disableAnalytics:[4,"disable-analytics"]}]);function defineCustomElement(){"undefined"!=typeof customElements&&["va-telephone"].forEach((t=>{"va-telephone"===t&&(customElements.get(t)||customElements.define(t,VaTelephone))}))}export{VaTelephone as V,defineCustomElement as d};
|