pixel-react 1.15.13 → 1.15.15
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/README.md +75 -75
- package/lib/_virtual/index10.js +2 -2
- package/lib/_virtual/index11.js +2 -2
- package/lib/_virtual/index12.js +2 -2
- package/lib/_virtual/index9.js +2 -2
- package/lib/assets/icons/navigate_to_pages.svg.js +6 -0
- package/lib/assets/icons/navigate_to_pages.svg.js.map +1 -0
- package/lib/assets/icons/spinner.svg.js +1 -1
- package/lib/assets/icons/spinner.svg.js.map +1 -1
- package/lib/components/Accordion/Accordion.d.ts +1 -1
- package/lib/components/Accordion/Accordion.js +5 -3
- package/lib/components/Accordion/Accordion.js.map +1 -1
- package/lib/components/Accordion/types.d.ts +1 -0
- package/lib/components/Editor/VariableDropdown.js +2 -2
- package/lib/components/Icon/iconList.js +2 -0
- package/lib/components/Icon/iconList.js.map +1 -1
- package/lib/components/InputWithDropdown/InputWithDropdown.js +4 -3
- package/lib/components/InputWithDropdown/InputWithDropdown.js.map +1 -1
- package/lib/index.cjs +9901 -3778
- package/lib/index.cjs.map +1 -1
- package/lib/index.d.ts +3 -2
- package/lib/node_modules/@date-fns/tz/date/index.js +1 -19
- package/lib/node_modules/@date-fns/tz/date/index.js.map +1 -1
- package/lib/node_modules/@date-fns/tz/date/mini.js +34 -6
- package/lib/node_modules/@date-fns/tz/date/mini.js.map +1 -1
- package/lib/node_modules/@date-fns/tz/tzName/index.js +40 -0
- package/lib/node_modules/@date-fns/tz/tzName/index.js.map +1 -0
- package/lib/node_modules/@date-fns/tz/tzOffset/index.js +6 -5
- package/lib/node_modules/@date-fns/tz/tzOffset/index.js.map +1 -1
- package/lib/node_modules/@monaco-editor/loader/lib/es/_virtual/_rollupPluginBabelHelpers.js +93 -98
- package/lib/node_modules/@monaco-editor/loader/lib/es/_virtual/_rollupPluginBabelHelpers.js.map +1 -1
- package/lib/node_modules/@monaco-editor/loader/lib/es/config/index.js +1 -1
- package/lib/node_modules/@monaco-editor/loader/lib/es/config/index.js.map +1 -1
- package/lib/node_modules/@monaco-editor/loader/lib/es/loader/index.js +15 -13
- package/lib/node_modules/@monaco-editor/loader/lib/es/loader/index.js.map +1 -1
- package/lib/node_modules/@monaco-editor/loader/lib/es/utils/compose.js.map +1 -1
- package/lib/node_modules/@monaco-editor/loader/lib/es/utils/curry.js.map +1 -1
- package/lib/node_modules/@monaco-editor/loader/lib/es/utils/deepMerge.js.map +1 -1
- package/lib/node_modules/@monaco-editor/loader/lib/es/utils/isObject.js.map +1 -1
- package/lib/node_modules/@monaco-editor/loader/lib/es/utils/makeCancelable.js +1 -0
- package/lib/node_modules/@monaco-editor/loader/lib/es/utils/makeCancelable.js.map +1 -1
- package/lib/node_modules/@monaco-editor/loader/lib/es/validators/index.js +1 -2
- package/lib/node_modules/@monaco-editor/loader/lib/es/validators/index.js.map +1 -1
- package/lib/node_modules/janus-gateway/npm/dist/janus.es.js +26 -57
- package/lib/node_modules/janus-gateway/npm/dist/janus.es.js.map +1 -1
- package/lib/node_modules/js-beautify/js/src/css/beautifier.js +1 -1
- package/lib/node_modules/js-beautify/js/src/css/index.js +1 -1
- package/lib/node_modules/js-beautify/js/src/css/options.js +1 -1
- package/lib/node_modules/js-beautify/js/src/html/index.js +1 -1
- package/lib/node_modules/js-beautify/js/src/html/options.js +1 -1
- package/lib/node_modules/js-beautify/js/src/html/tokenizer.js +1 -1
- package/lib/node_modules/js-beautify/js/src/javascript/beautifier.js +1 -1
- package/lib/node_modules/js-beautify/js/src/javascript/index.js +1 -1
- package/lib/node_modules/js-beautify/js/src/javascript/options.js +1 -1
- package/lib/node_modules/js-beautify/js/src/javascript/tokenizer.js +1 -1
- package/lib/node_modules/jsencrypt/lib/JSEncrypt.js +246 -0
- package/lib/node_modules/jsencrypt/lib/JSEncrypt.js.map +1 -0
- package/lib/node_modules/jsencrypt/lib/JSEncryptRSAKey.js +325 -0
- package/lib/node_modules/jsencrypt/lib/JSEncryptRSAKey.js.map +1 -0
- package/lib/node_modules/jsencrypt/lib/index.js +6 -0
- package/lib/node_modules/jsencrypt/lib/index.js.map +1 -0
- package/lib/node_modules/jsencrypt/lib/lib/asn1js/asn1.js +570 -0
- package/lib/node_modules/jsencrypt/lib/lib/asn1js/asn1.js.map +1 -0
- package/lib/node_modules/jsencrypt/lib/lib/asn1js/base64.js +88 -0
- package/lib/node_modules/jsencrypt/lib/lib/asn1js/base64.js.map +1 -0
- package/lib/node_modules/jsencrypt/lib/lib/asn1js/hex.js +66 -0
- package/lib/node_modules/jsencrypt/lib/lib/asn1js/hex.js.map +1 -0
- package/lib/node_modules/jsencrypt/lib/lib/asn1js/int10.js +87 -0
- package/lib/node_modules/jsencrypt/lib/lib/asn1js/int10.js.map +1 -0
- package/lib/node_modules/jsencrypt/lib/lib/jsbn/base64.js +65 -0
- package/lib/node_modules/jsencrypt/lib/lib/jsbn/base64.js.map +1 -0
- package/lib/node_modules/jsencrypt/lib/lib/jsbn/jsbn.js +1700 -0
- package/lib/node_modules/jsencrypt/lib/lib/jsbn/jsbn.js.map +1 -0
- package/lib/node_modules/jsencrypt/lib/lib/jsbn/prng4.js +48 -0
- package/lib/node_modules/jsencrypt/lib/lib/jsbn/prng4.js.map +1 -0
- package/lib/node_modules/jsencrypt/lib/lib/jsbn/rng.js +77 -0
- package/lib/node_modules/jsencrypt/lib/lib/jsbn/rng.js.map +1 -0
- package/lib/node_modules/jsencrypt/lib/lib/jsbn/rsa.js +415 -0
- package/lib/node_modules/jsencrypt/lib/lib/jsbn/rsa.js.map +1 -0
- package/lib/node_modules/jsencrypt/lib/lib/jsbn/sha256.js +307 -0
- package/lib/node_modules/jsencrypt/lib/lib/jsbn/sha256.js.map +1 -0
- package/lib/node_modules/jsencrypt/lib/lib/jsbn/util.js +61 -0
- package/lib/node_modules/jsencrypt/lib/lib/jsbn/util.js.map +1 -0
- package/lib/node_modules/jsencrypt/lib/lib/jsrsasign/asn1-1.0.js +1559 -0
- package/lib/node_modules/jsencrypt/lib/lib/jsrsasign/asn1-1.0.js.map +1 -0
- package/lib/node_modules/libphonenumber-js/es6/AsYouType.js +115 -82
- package/lib/node_modules/libphonenumber-js/es6/AsYouType.js.map +1 -1
- package/lib/node_modules/libphonenumber-js/es6/AsYouTypeFormatter.PatternMatcher.js +68 -58
- package/lib/node_modules/libphonenumber-js/es6/AsYouTypeFormatter.PatternMatcher.js.map +1 -1
- package/lib/node_modules/libphonenumber-js/es6/AsYouTypeFormatter.PatternParser.js +36 -23
- package/lib/node_modules/libphonenumber-js/es6/AsYouTypeFormatter.PatternParser.js.map +1 -1
- package/lib/node_modules/libphonenumber-js/es6/AsYouTypeFormatter.complete.js +13 -9
- package/lib/node_modules/libphonenumber-js/es6/AsYouTypeFormatter.complete.js.map +1 -1
- package/lib/node_modules/libphonenumber-js/es6/AsYouTypeFormatter.js +226 -187
- package/lib/node_modules/libphonenumber-js/es6/AsYouTypeFormatter.js.map +1 -1
- package/lib/node_modules/libphonenumber-js/es6/AsYouTypeFormatter.util.js +21 -27
- package/lib/node_modules/libphonenumber-js/es6/AsYouTypeFormatter.util.js.map +1 -1
- package/lib/node_modules/libphonenumber-js/es6/AsYouTypeParser.js +150 -117
- package/lib/node_modules/libphonenumber-js/es6/AsYouTypeParser.js.map +1 -1
- package/lib/node_modules/libphonenumber-js/es6/AsYouTypeState.js +57 -38
- package/lib/node_modules/libphonenumber-js/es6/AsYouTypeState.js.map +1 -1
- package/lib/node_modules/libphonenumber-js/es6/ParseError.js +70 -109
- package/lib/node_modules/libphonenumber-js/es6/ParseError.js.map +1 -1
- package/lib/node_modules/libphonenumber-js/es6/PhoneNumber.js +72 -57
- package/lib/node_modules/libphonenumber-js/es6/PhoneNumber.js.map +1 -1
- package/lib/node_modules/libphonenumber-js/es6/constants.js +15 -9
- package/lib/node_modules/libphonenumber-js/es6/constants.js.map +1 -1
- package/lib/node_modules/libphonenumber-js/es6/format.js +67 -93
- package/lib/node_modules/libphonenumber-js/es6/format.js.map +1 -1
- package/lib/node_modules/libphonenumber-js/es6/formatIncompletePhoneNumber.js +0 -1
- package/lib/node_modules/libphonenumber-js/es6/formatIncompletePhoneNumber.js.map +1 -1
- package/lib/node_modules/libphonenumber-js/es6/getCountries.js.map +1 -1
- package/lib/node_modules/libphonenumber-js/es6/helpers/RFC3966.js +0 -1
- package/lib/node_modules/libphonenumber-js/es6/helpers/RFC3966.js.map +1 -1
- package/lib/node_modules/libphonenumber-js/es6/helpers/applyInternationalSeparatorStyle.js +1 -1
- package/lib/node_modules/libphonenumber-js/es6/helpers/applyInternationalSeparatorStyle.js.map +1 -1
- package/lib/node_modules/libphonenumber-js/es6/helpers/checkNumberLength.js +49 -10
- package/lib/node_modules/libphonenumber-js/es6/helpers/checkNumberLength.js.map +1 -1
- package/lib/node_modules/libphonenumber-js/es6/helpers/extension/createExtensionPattern.js +20 -32
- package/lib/node_modules/libphonenumber-js/es6/helpers/extension/createExtensionPattern.js.map +1 -1
- package/lib/node_modules/libphonenumber-js/es6/helpers/extension/extractExtension.js +5 -4
- package/lib/node_modules/libphonenumber-js/es6/helpers/extension/extractExtension.js.map +1 -1
- package/lib/node_modules/libphonenumber-js/es6/helpers/extractCountryCallingCode.js +25 -18
- package/lib/node_modules/libphonenumber-js/es6/helpers/extractCountryCallingCode.js.map +1 -1
- package/lib/node_modules/libphonenumber-js/es6/helpers/extractCountryCallingCodeFromInternationalNumberWithoutPlusSign.js +12 -11
- package/lib/node_modules/libphonenumber-js/es6/helpers/extractCountryCallingCodeFromInternationalNumberWithoutPlusSign.js.map +1 -1
- package/lib/node_modules/libphonenumber-js/es6/helpers/extractFormattedPhoneNumberFromPossibleRfc3966NumberUri.js +13 -11
- package/lib/node_modules/libphonenumber-js/es6/helpers/extractFormattedPhoneNumberFromPossibleRfc3966NumberUri.js.map +1 -1
- package/lib/node_modules/libphonenumber-js/es6/helpers/extractNationalNumber.js +21 -11
- package/lib/node_modules/libphonenumber-js/es6/helpers/extractNationalNumber.js.map +1 -1
- package/lib/node_modules/libphonenumber-js/es6/helpers/extractNationalNumberFromPossiblyIncompleteNumber.js +12 -11
- package/lib/node_modules/libphonenumber-js/es6/helpers/extractNationalNumberFromPossiblyIncompleteNumber.js.map +1 -1
- package/lib/node_modules/libphonenumber-js/es6/helpers/extractPhoneContext.js +15 -12
- package/lib/node_modules/libphonenumber-js/es6/helpers/extractPhoneContext.js.map +1 -1
- package/lib/node_modules/libphonenumber-js/es6/helpers/formatNationalNumberUsingFormat.js +1 -1
- package/lib/node_modules/libphonenumber-js/es6/helpers/formatNationalNumberUsingFormat.js.map +1 -1
- package/lib/node_modules/libphonenumber-js/es6/helpers/getCountryByCallingCode.js +4 -4
- package/lib/node_modules/libphonenumber-js/es6/helpers/getCountryByCallingCode.js.map +1 -1
- package/lib/node_modules/libphonenumber-js/es6/helpers/getCountryByNationalNumber.js +59 -35
- package/lib/node_modules/libphonenumber-js/es6/helpers/getCountryByNationalNumber.js.map +1 -1
- package/lib/node_modules/libphonenumber-js/es6/helpers/getIddPrefix.js +2 -2
- package/lib/node_modules/libphonenumber-js/es6/helpers/getIddPrefix.js.map +1 -1
- package/lib/node_modules/libphonenumber-js/es6/helpers/getNumberType.js +38 -36
- package/lib/node_modules/libphonenumber-js/es6/helpers/getNumberType.js.map +1 -1
- package/lib/node_modules/libphonenumber-js/es6/helpers/getPossibleCountriesForNumber.js +0 -1
- package/lib/node_modules/libphonenumber-js/es6/helpers/getPossibleCountriesForNumber.js.map +1 -1
- package/lib/node_modules/libphonenumber-js/es6/helpers/isObject.js.map +1 -1
- package/lib/node_modules/libphonenumber-js/es6/helpers/isViablePhoneNumber.js +14 -10
- package/lib/node_modules/libphonenumber-js/es6/helpers/isViablePhoneNumber.js.map +1 -1
- package/lib/node_modules/libphonenumber-js/es6/helpers/matchesEntirely.js +4 -4
- package/lib/node_modules/libphonenumber-js/es6/helpers/matchesEntirely.js.map +1 -1
- package/lib/node_modules/libphonenumber-js/es6/helpers/parseDigits.js +22 -27
- package/lib/node_modules/libphonenumber-js/es6/helpers/parseDigits.js.map +1 -1
- package/lib/node_modules/libphonenumber-js/es6/helpers/stripIddPrefix.js +6 -6
- package/lib/node_modules/libphonenumber-js/es6/helpers/stripIddPrefix.js.map +1 -1
- package/lib/node_modules/libphonenumber-js/es6/isPossible.js +6 -7
- package/lib/node_modules/libphonenumber-js/es6/isPossible.js.map +1 -1
- package/lib/node_modules/libphonenumber-js/es6/isValid.js +6 -5
- package/lib/node_modules/libphonenumber-js/es6/isValid.js.map +1 -1
- package/lib/node_modules/libphonenumber-js/es6/isValidPhoneNumber.js +44 -26
- package/lib/node_modules/libphonenumber-js/es6/isValidPhoneNumber.js.map +1 -1
- package/lib/node_modules/libphonenumber-js/es6/metadata.js +120 -69
- package/lib/node_modules/libphonenumber-js/es6/metadata.js.map +1 -1
- package/lib/node_modules/libphonenumber-js/es6/normalizeArguments.js +87 -68
- package/lib/node_modules/libphonenumber-js/es6/normalizeArguments.js.map +1 -1
- package/lib/node_modules/libphonenumber-js/es6/parse.js +58 -40
- package/lib/node_modules/libphonenumber-js/es6/parse.js.map +1 -1
- package/lib/node_modules/libphonenumber-js/es6/parseIncompletePhoneNumber.js +32 -36
- package/lib/node_modules/libphonenumber-js/es6/parseIncompletePhoneNumber.js.map +1 -1
- package/lib/node_modules/libphonenumber-js/es6/parsePhoneNumber.js.map +1 -1
- package/lib/node_modules/libphonenumber-js/es6/parsePhoneNumberWithError_.js +44 -26
- package/lib/node_modules/libphonenumber-js/es6/parsePhoneNumberWithError_.js.map +1 -1
- package/lib/node_modules/libphonenumber-js/es6/parsePhoneNumber_.js +46 -28
- package/lib/node_modules/libphonenumber-js/es6/parsePhoneNumber_.js.map +1 -1
- package/lib/node_modules/libphonenumber-js/es6/tools/semver-compare.js.map +1 -1
- package/lib/node_modules/libphonenumber-js/metadata.min.json.js +19 -19
- package/lib/node_modules/libphonenumber-js/metadata.min.json.js.map +1 -1
- package/lib/node_modules/prop-types/index.js +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/DayPicker.js +88 -64
- package/lib/node_modules/react-day-picker/dist/esm/DayPicker.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/UI.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/classes/CalendarDay.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/classes/CalendarMonth.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/classes/CalendarWeek.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/classes/DateLib.js +71 -6
- package/lib/node_modules/react-day-picker/dist/esm/classes/DateLib.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/components/Button.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/components/CaptionLabel.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/components/Chevron.js +18 -14
- package/lib/node_modules/react-day-picker/dist/esm/components/Chevron.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/components/Day.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/components/DayButton.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/components/Dropdown.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/components/DropdownNav.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/components/Footer.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/components/Month.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/components/MonthCaption.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/components/MonthGrid.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/components/Months.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/components/MonthsDropdown.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/components/Nav.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/components/NextMonthButton.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/components/Option.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/components/PreviousMonthButton.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/components/Root.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/components/Select.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/components/Week.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/components/WeekNumber.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/components/WeekNumberHeader.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/components/Weekday.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/components/Weekdays.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/components/Weeks.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/components/YearsDropdown.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/formatters/formatCaption.js +3 -2
- package/lib/node_modules/react-day-picker/dist/esm/formatters/formatCaption.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/formatters/formatDay.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/formatters/formatMonthDropdown.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/formatters/formatWeekNumber.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/formatters/formatWeekNumberHeader.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/formatters/formatWeekdayName.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/formatters/formatYearDropdown.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/formatters/index.js +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/helpers/calculateFocusTarget.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/helpers/createGetModifiers.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/helpers/endOfBroadcastWeek.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/helpers/getBroadcastWeeksInMonth.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/helpers/getClassNamesForModifiers.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/helpers/getComponents.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/helpers/getDataAttributes.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/helpers/getDates.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/helpers/getDays.js +4 -4
- package/lib/node_modules/react-day-picker/dist/esm/helpers/getDays.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/helpers/getDefaultClassNames.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/helpers/getDisplayMonths.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/helpers/getFocusableDate.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/helpers/getFormatters.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/helpers/getInitialMonth.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/helpers/getMonthOptions.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/helpers/getMonths.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/helpers/getNavMonth.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/helpers/getNextFocus.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/helpers/getNextMonth.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/helpers/getPreviousMonth.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/helpers/getStyleForModifiers.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/helpers/getWeekdays.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/helpers/getWeeks.js +2 -2
- package/lib/node_modules/react-day-picker/dist/esm/helpers/getWeeks.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/helpers/getYearOptions.js +9 -11
- package/lib/node_modules/react-day-picker/dist/esm/helpers/getYearOptions.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/helpers/startOfBroadcastWeek.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/helpers/useControlledValue.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/labels/index.js +2 -2
- package/lib/node_modules/react-day-picker/dist/esm/labels/labelDayButton.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/labels/labelGrid.js +3 -2
- package/lib/node_modules/react-day-picker/dist/esm/labels/labelGrid.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/labels/labelGridcell.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/labels/labelMonthDropdown.js +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/labels/labelMonthDropdown.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/labels/labelNav.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/labels/labelNext.js +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/labels/labelNext.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/labels/labelPrevious.js +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/labels/labelPrevious.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/labels/labelWeekNumber.js +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/labels/labelWeekNumber.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/labels/labelWeekNumberHeader.js +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/labels/labelWeekNumberHeader.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/labels/labelWeekday.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/labels/labelYearDropdown.js +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/labels/labelYearDropdown.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/selection/useMulti.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/selection/useRange.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/selection/useSingle.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/useAnimation.js +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/useAnimation.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/useCalendar.js +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/useCalendar.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/useDayPicker.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/useFocus.js +6 -0
- package/lib/node_modules/react-day-picker/dist/esm/useFocus.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/useSelection.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/utils/addToRange.js +6 -1
- package/lib/node_modules/react-day-picker/dist/esm/utils/addToRange.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/utils/dateMatchModifiers.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/utils/rangeContainsDayOfWeek.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/utils/rangeContainsModifiers.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/utils/rangeIncludesDate.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/utils/rangeOverlaps.js.map +1 -1
- package/lib/node_modules/react-day-picker/dist/esm/utils/typeguards.js.map +1 -1
- package/lib/node_modules/react-day-picker/node_modules/date-fns/eachYearOfInterval.js +64 -0
- package/lib/node_modules/react-day-picker/node_modules/date-fns/eachYearOfInterval.js.map +1 -0
- package/lib/node_modules/react-hook-form/dist/index.esm.js +67 -44
- package/lib/node_modules/react-hook-form/dist/index.esm.js.map +1 -1
- package/lib/node_modules/react-virtuoso/dist/index.js +1246 -1200
- package/lib/node_modules/react-virtuoso/dist/index.js.map +1 -1
- package/lib/node_modules/ua-parser-js/src/ua-parser.js +85 -71
- package/lib/node_modules/ua-parser-js/src/ua-parser.js.map +1 -1
- package/lib/styles.css +1 -1
- package/lib/styles.css.map +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/lib/utils/getEncryptedData/getEncryptedData.d.ts +1 -1
- package/lib/utils/getEncryptedData/getEncryptedData.js +8 -17
- package/lib/utils/getEncryptedData/getEncryptedData.js.map +1 -1
- package/package.json +107 -106
|
@@ -8,74 +8,87 @@ import getCountryByNationalNumber from './helpers/getCountryByNationalNumber.js'
|
|
|
8
8
|
import isObject from './helpers/isObject.js';
|
|
9
9
|
import { DIGIT_PLACEHOLDER } from './AsYouTypeFormatter.util.js';
|
|
10
10
|
|
|
11
|
-
function
|
|
12
|
-
|
|
11
|
+
function _typeof(o) {
|
|
12
|
+
"@babel/helpers - typeof";
|
|
13
|
+
|
|
14
|
+
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
|
|
15
|
+
return typeof o;
|
|
16
|
+
} : function (o) {
|
|
17
|
+
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
18
|
+
}, _typeof(o);
|
|
19
|
+
}
|
|
20
|
+
function _slicedToArray(r, e) {
|
|
21
|
+
return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest();
|
|
13
22
|
}
|
|
14
23
|
function _nonIterableRest() {
|
|
15
24
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
16
25
|
}
|
|
17
|
-
function _unsupportedIterableToArray(
|
|
18
|
-
if (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
if (n === "Map" || n === "Set") return Array.from(o);
|
|
23
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
24
|
-
}
|
|
25
|
-
function _arrayLikeToArray(arr, len) {
|
|
26
|
-
if (len == null || len > arr.length) len = arr.length;
|
|
27
|
-
for (var i = 0, arr2 = new Array(len); i < len; i++) {
|
|
28
|
-
arr2[i] = arr[i];
|
|
26
|
+
function _unsupportedIterableToArray(r, a) {
|
|
27
|
+
if (r) {
|
|
28
|
+
if ("string" == typeof r) return _arrayLikeToArray(r, a);
|
|
29
|
+
var t = {}.toString.call(r).slice(8, -1);
|
|
30
|
+
return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;
|
|
29
31
|
}
|
|
30
|
-
return arr2;
|
|
31
32
|
}
|
|
32
|
-
function
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
var
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
} finally {
|
|
33
|
+
function _arrayLikeToArray(r, a) {
|
|
34
|
+
(null == a || a > r.length) && (a = r.length);
|
|
35
|
+
for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
|
|
36
|
+
return n;
|
|
37
|
+
}
|
|
38
|
+
function _iterableToArrayLimit(r, l) {
|
|
39
|
+
var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
|
|
40
|
+
if (null != t) {
|
|
41
|
+
var e,
|
|
42
|
+
n,
|
|
43
|
+
i,
|
|
44
|
+
u,
|
|
45
|
+
a = [],
|
|
46
|
+
f = true,
|
|
47
|
+
o = false;
|
|
48
48
|
try {
|
|
49
|
-
if (!
|
|
49
|
+
if (i = (t = t.call(r)).next, 0 === l) ; else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
|
|
50
|
+
} catch (r) {
|
|
51
|
+
o = true, n = r;
|
|
50
52
|
} finally {
|
|
51
|
-
|
|
53
|
+
try {
|
|
54
|
+
if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return;
|
|
55
|
+
} finally {
|
|
56
|
+
if (o) throw n;
|
|
57
|
+
}
|
|
52
58
|
}
|
|
59
|
+
return a;
|
|
53
60
|
}
|
|
54
|
-
return _arr;
|
|
55
61
|
}
|
|
56
|
-
function _arrayWithHoles(
|
|
57
|
-
if (Array.isArray(
|
|
62
|
+
function _arrayWithHoles(r) {
|
|
63
|
+
if (Array.isArray(r)) return r;
|
|
58
64
|
}
|
|
59
|
-
function _classCallCheck(
|
|
60
|
-
if (!(
|
|
61
|
-
throw new TypeError("Cannot call a class as a function");
|
|
62
|
-
}
|
|
65
|
+
function _classCallCheck(a, n) {
|
|
66
|
+
if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function");
|
|
63
67
|
}
|
|
64
|
-
function _defineProperties(
|
|
65
|
-
for (var
|
|
66
|
-
var
|
|
67
|
-
|
|
68
|
-
descriptor.configurable = true;
|
|
69
|
-
if ("value" in descriptor) descriptor.writable = true;
|
|
70
|
-
Object.defineProperty(target, descriptor.key, descriptor);
|
|
68
|
+
function _defineProperties(e, r) {
|
|
69
|
+
for (var t = 0; t < r.length; t++) {
|
|
70
|
+
var o = r[t];
|
|
71
|
+
o.enumerable = o.enumerable || false, o.configurable = true, "value" in o && (o.writable = true), Object.defineProperty(e, _toPropertyKey(o.key), o);
|
|
71
72
|
}
|
|
72
73
|
}
|
|
73
|
-
function _createClass(
|
|
74
|
-
|
|
75
|
-
Object.defineProperty(Constructor, "prototype", {
|
|
74
|
+
function _createClass(e, r, t) {
|
|
75
|
+
return r && _defineProperties(e.prototype, r), Object.defineProperty(e, "prototype", {
|
|
76
76
|
writable: false
|
|
77
|
-
});
|
|
78
|
-
|
|
77
|
+
}), e;
|
|
78
|
+
}
|
|
79
|
+
function _toPropertyKey(t) {
|
|
80
|
+
var i = _toPrimitive(t, "string");
|
|
81
|
+
return "symbol" == _typeof(i) ? i : i + "";
|
|
82
|
+
}
|
|
83
|
+
function _toPrimitive(t, r) {
|
|
84
|
+
if ("object" != _typeof(t) || !t) return t;
|
|
85
|
+
var e = t[Symbol.toPrimitive];
|
|
86
|
+
if (void 0 !== e) {
|
|
87
|
+
var i = e.call(t, r);
|
|
88
|
+
if ("object" != _typeof(i)) return i;
|
|
89
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
90
|
+
}
|
|
91
|
+
return (String )(t);
|
|
79
92
|
}
|
|
80
93
|
var AsYouType = /*#__PURE__*/function () {
|
|
81
94
|
/**
|
|
@@ -88,21 +101,21 @@ var AsYouType = /*#__PURE__*/function () {
|
|
|
88
101
|
var _this$getCountryAndCa = this.getCountryAndCallingCode(optionsOrDefaultCountry),
|
|
89
102
|
_this$getCountryAndCa2 = _slicedToArray(_this$getCountryAndCa, 2),
|
|
90
103
|
defaultCountry = _this$getCountryAndCa2[0],
|
|
91
|
-
defaultCallingCode = _this$getCountryAndCa2[1];
|
|
104
|
+
defaultCallingCode = _this$getCountryAndCa2[1];
|
|
105
|
+
// `this.defaultCountry` and `this.defaultCallingCode` aren't required to be in sync.
|
|
92
106
|
// For example, `this.defaultCountry` could be `"AR"` and `this.defaultCallingCode` could be `undefined`.
|
|
93
107
|
// So `this.defaultCountry` and `this.defaultCallingCode` are totally independent.
|
|
94
|
-
|
|
95
108
|
this.defaultCountry = defaultCountry;
|
|
96
109
|
this.defaultCallingCode = defaultCallingCode;
|
|
97
110
|
this.reset();
|
|
98
111
|
}
|
|
99
|
-
_createClass(AsYouType, [{
|
|
112
|
+
return _createClass(AsYouType, [{
|
|
100
113
|
key: "getCountryAndCallingCode",
|
|
101
114
|
value: function getCountryAndCallingCode(optionsOrDefaultCountry) {
|
|
102
115
|
// Set `defaultCountry` and `defaultCallingCode` options.
|
|
103
116
|
var defaultCountry;
|
|
104
|
-
var defaultCallingCode;
|
|
105
|
-
|
|
117
|
+
var defaultCallingCode;
|
|
118
|
+
// Turns out `null` also has type "object". Weird.
|
|
106
119
|
if (optionsOrDefaultCountry) {
|
|
107
120
|
if (isObject(optionsOrDefaultCountry)) {
|
|
108
121
|
defaultCountry = optionsOrDefaultCountry.defaultCountry;
|
|
@@ -116,6 +129,7 @@ var AsYouType = /*#__PURE__*/function () {
|
|
|
116
129
|
}
|
|
117
130
|
return [defaultCountry, defaultCallingCode];
|
|
118
131
|
}
|
|
132
|
+
|
|
119
133
|
/**
|
|
120
134
|
* Inputs "next" phone number characters.
|
|
121
135
|
* @param {string} text
|
|
@@ -130,8 +144,8 @@ var AsYouType = /*#__PURE__*/function () {
|
|
|
130
144
|
if (justLeadingPlus) {
|
|
131
145
|
this.formattedOutput = '+';
|
|
132
146
|
} else if (digits) {
|
|
133
|
-
this.determineTheCountryIfNeeded();
|
|
134
|
-
|
|
147
|
+
this.determineTheCountryIfNeeded();
|
|
148
|
+
// Match the available formats by the currently available leading digits.
|
|
135
149
|
if (this.state.nationalSignificantNumber) {
|
|
136
150
|
this.formatter.narrowDownMatchingFormats(this.state);
|
|
137
151
|
}
|
|
@@ -142,8 +156,8 @@ var AsYouType = /*#__PURE__*/function () {
|
|
|
142
156
|
if (formattedNationalNumber === undefined) {
|
|
143
157
|
// See if another national (significant) number could be re-extracted.
|
|
144
158
|
if (this.parser.reExtractNationalSignificantNumber(this.state)) {
|
|
145
|
-
this.determineTheCountryIfNeeded();
|
|
146
|
-
|
|
159
|
+
this.determineTheCountryIfNeeded();
|
|
160
|
+
// If it could, then re-try formatting the new national (significant) number.
|
|
147
161
|
var nationalDigits = this.state.getNationalDigits();
|
|
148
162
|
if (nationalDigits) {
|
|
149
163
|
formattedNationalNumber = this.formatter.format(nationalDigits, this.state);
|
|
@@ -161,7 +175,7 @@ var AsYouType = /*#__PURE__*/function () {
|
|
|
161
175
|
this.state = new AsYouTypeState({
|
|
162
176
|
onCountryChange: function onCountryChange(country) {
|
|
163
177
|
// Before version `1.6.0`, the official `AsYouType` formatter API
|
|
164
|
-
// included
|
|
178
|
+
// included a `.country` property on an `AsYouType` instance.
|
|
165
179
|
// Since that property (along with the others) have been moved to
|
|
166
180
|
// `this.state`, `this.country` property is emulated for compatibility
|
|
167
181
|
// with the old versions.
|
|
@@ -194,6 +208,7 @@ var AsYouType = /*#__PURE__*/function () {
|
|
|
194
208
|
this.formattedOutput = '';
|
|
195
209
|
return this;
|
|
196
210
|
}
|
|
211
|
+
|
|
197
212
|
/**
|
|
198
213
|
* Returns `true` if the phone number is being input in international format.
|
|
199
214
|
* In other words, returns `true` if and only if the parsed phone number starts with a `"+"`.
|
|
@@ -204,6 +219,7 @@ var AsYouType = /*#__PURE__*/function () {
|
|
|
204
219
|
value: function isInternational() {
|
|
205
220
|
return this.state.international;
|
|
206
221
|
}
|
|
222
|
+
|
|
207
223
|
/**
|
|
208
224
|
* Returns the "calling code" part of the phone number when it's being input
|
|
209
225
|
* in an international format.
|
|
@@ -224,12 +240,15 @@ var AsYouType = /*#__PURE__*/function () {
|
|
|
224
240
|
if (this.isInternational()) {
|
|
225
241
|
return this.state.callingCode;
|
|
226
242
|
}
|
|
227
|
-
}
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
// A legacy alias.
|
|
228
246
|
}, {
|
|
229
247
|
key: "getCountryCallingCode",
|
|
230
248
|
value: function getCountryCallingCode() {
|
|
231
249
|
return this.getCallingCode();
|
|
232
250
|
}
|
|
251
|
+
|
|
233
252
|
/**
|
|
234
253
|
* Returns a two-letter country code of the phone number.
|
|
235
254
|
* Returns `undefined` for "non-geographic" phone numbering plans.
|
|
@@ -239,12 +258,13 @@ var AsYouType = /*#__PURE__*/function () {
|
|
|
239
258
|
}, {
|
|
240
259
|
key: "getCountry",
|
|
241
260
|
value: function getCountry() {
|
|
242
|
-
var digits = this.state.digits;
|
|
243
|
-
|
|
261
|
+
var digits = this.state.digits;
|
|
262
|
+
// Return `undefined` if no digits have been input yet.
|
|
244
263
|
if (digits) {
|
|
245
264
|
return this._getCountry();
|
|
246
265
|
}
|
|
247
266
|
}
|
|
267
|
+
|
|
248
268
|
/**
|
|
249
269
|
* Returns a two-letter country code of the phone number.
|
|
250
270
|
* Returns `undefined` for "non-geographic" phone numbering plans.
|
|
@@ -278,7 +298,9 @@ var AsYouType = /*#__PURE__*/function () {
|
|
|
278
298
|
if (!this.state.country || this.isCountryCallingCodeAmbiguous()) {
|
|
279
299
|
this.determineTheCountry();
|
|
280
300
|
}
|
|
281
|
-
}
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
// Prepends `+CountryCode ` in case of an international phone number
|
|
282
304
|
}, {
|
|
283
305
|
key: "getFullNumber",
|
|
284
306
|
value: function getFullNumber(formattedNationalNumber) {
|
|
@@ -305,10 +327,10 @@ var AsYouType = /*#__PURE__*/function () {
|
|
|
305
327
|
value: function getNonFormattedNationalNumberWithPrefix() {
|
|
306
328
|
var _this$state = this.state,
|
|
307
329
|
nationalSignificantNumber = _this$state.nationalSignificantNumber,
|
|
308
|
-
|
|
330
|
+
prefixBeforeNationalSignificantNumberThatIsNotNationalPrefix = _this$state.prefixBeforeNationalSignificantNumberThatIsNotNationalPrefix,
|
|
309
331
|
nationalPrefix = _this$state.nationalPrefix;
|
|
310
332
|
var number = nationalSignificantNumber;
|
|
311
|
-
var prefix =
|
|
333
|
+
var prefix = prefixBeforeNationalSignificantNumberThatIsNotNationalPrefix || nationalPrefix;
|
|
312
334
|
if (prefix) {
|
|
313
335
|
number = prefix + number;
|
|
314
336
|
}
|
|
@@ -317,8 +339,8 @@ var AsYouType = /*#__PURE__*/function () {
|
|
|
317
339
|
}, {
|
|
318
340
|
key: "getNonFormattedNumber",
|
|
319
341
|
value: function getNonFormattedNumber() {
|
|
320
|
-
var
|
|
321
|
-
return this.getFullNumber(
|
|
342
|
+
var nationalSignificantNumberIsModified = this.state.nationalSignificantNumberIsModified;
|
|
343
|
+
return this.getFullNumber(nationalSignificantNumberIsModified ? this.state.getNationalDigits() : this.getNonFormattedNationalNumberWithPrefix());
|
|
322
344
|
}
|
|
323
345
|
}, {
|
|
324
346
|
key: "getNonFormattedTemplate",
|
|
@@ -334,7 +356,9 @@ var AsYouType = /*#__PURE__*/function () {
|
|
|
334
356
|
var callingCode = this.state.callingCode;
|
|
335
357
|
var countryCodes = this.metadata.getCountryCodesForCallingCode(callingCode);
|
|
336
358
|
return countryCodes && countryCodes.length > 1;
|
|
337
|
-
}
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
// Determines the exact country of the phone number
|
|
338
362
|
// entered so far based on the country phone code
|
|
339
363
|
// and the national phone number.
|
|
340
364
|
}, {
|
|
@@ -342,10 +366,10 @@ var AsYouType = /*#__PURE__*/function () {
|
|
|
342
366
|
value: function determineTheCountry() {
|
|
343
367
|
this.state.setCountry(getCountryByCallingCode(this.isInternational() ? this.state.callingCode : this.defaultCallingCode, {
|
|
344
368
|
nationalNumber: this.state.nationalSignificantNumber,
|
|
345
|
-
defaultCountry: this.defaultCountry,
|
|
346
369
|
metadata: this.metadata
|
|
347
370
|
}));
|
|
348
371
|
}
|
|
372
|
+
|
|
349
373
|
/**
|
|
350
374
|
* Returns a E.164 phone number value for the user's input.
|
|
351
375
|
*
|
|
@@ -371,8 +395,9 @@ var AsYouType = /*#__PURE__*/function () {
|
|
|
371
395
|
digits = _this$state2.digits,
|
|
372
396
|
callingCode = _this$state2.callingCode,
|
|
373
397
|
country = _this$state2.country,
|
|
374
|
-
nationalSignificantNumber = _this$state2.nationalSignificantNumber;
|
|
398
|
+
nationalSignificantNumber = _this$state2.nationalSignificantNumber;
|
|
375
399
|
|
|
400
|
+
// Will return `undefined` if no digits have been input.
|
|
376
401
|
if (!digits) {
|
|
377
402
|
return;
|
|
378
403
|
}
|
|
@@ -389,6 +414,7 @@ var AsYouType = /*#__PURE__*/function () {
|
|
|
389
414
|
}
|
|
390
415
|
}
|
|
391
416
|
}
|
|
417
|
+
|
|
392
418
|
/**
|
|
393
419
|
* Returns an instance of `PhoneNumber` class.
|
|
394
420
|
* Will return `undefined` if no national (significant) number
|
|
@@ -401,20 +427,25 @@ var AsYouType = /*#__PURE__*/function () {
|
|
|
401
427
|
var _this$state3 = this.state,
|
|
402
428
|
nationalSignificantNumber = _this$state3.nationalSignificantNumber,
|
|
403
429
|
carrierCode = _this$state3.carrierCode,
|
|
404
|
-
callingCode = _this$state3.callingCode;
|
|
430
|
+
callingCode = _this$state3.callingCode;
|
|
431
|
+
|
|
432
|
+
// `this._getCountry()` is basically same as `this.state.country`
|
|
405
433
|
// with the only change that it return `undefined` in case of a
|
|
406
434
|
// "non-geographic" numbering plan instead of `"001"` "internal use" value.
|
|
407
|
-
|
|
408
435
|
var country = this._getCountry();
|
|
409
436
|
if (!nationalSignificantNumber) {
|
|
410
437
|
return;
|
|
411
|
-
}
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
// `state.country` and `state.callingCode` aren't required to be in sync.
|
|
412
441
|
// For example, `country` could be `"AR"` and `callingCode` could be `undefined`.
|
|
413
442
|
// So `country` and `callingCode` are totally independent.
|
|
414
443
|
|
|
415
444
|
if (!country && !callingCode) {
|
|
416
445
|
return;
|
|
417
|
-
}
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
// By default, if `defaultCountry` parameter was passed when
|
|
418
449
|
// creating `AsYouType` instance, `state.country` is gonna be
|
|
419
450
|
// that `defaultCountry`, which doesn't entirely conform with
|
|
420
451
|
// `parsePhoneNumber()`'s behavior where it attempts to determine
|
|
@@ -427,7 +458,6 @@ var AsYouType = /*#__PURE__*/function () {
|
|
|
427
458
|
// then it should also behave accordingly in cases of `country` ambiguity.
|
|
428
459
|
// That's how users of this library would expect it to behave anyway.
|
|
429
460
|
//
|
|
430
|
-
|
|
431
461
|
if (country) {
|
|
432
462
|
if (country === this.defaultCountry) {
|
|
433
463
|
// `state.country` and `state.callingCode` aren't required to be in sync.
|
|
@@ -440,7 +470,6 @@ var AsYouType = /*#__PURE__*/function () {
|
|
|
440
470
|
if (ambiguousCountries.length > 1) {
|
|
441
471
|
var exactCountry = getCountryByNationalNumber(nationalSignificantNumber, {
|
|
442
472
|
countries: ambiguousCountries,
|
|
443
|
-
defaultCountry: this.defaultCountry,
|
|
444
473
|
metadata: this.metadata.metadata
|
|
445
474
|
});
|
|
446
475
|
if (exactCountry) {
|
|
@@ -452,10 +481,11 @@ var AsYouType = /*#__PURE__*/function () {
|
|
|
452
481
|
var phoneNumber = new PhoneNumber(country || callingCode, nationalSignificantNumber, this.metadata.metadata);
|
|
453
482
|
if (carrierCode) {
|
|
454
483
|
phoneNumber.carrierCode = carrierCode;
|
|
455
|
-
}
|
|
456
|
-
|
|
484
|
+
}
|
|
485
|
+
// Phone number extensions are not supported by "As You Type" formatter.
|
|
457
486
|
return phoneNumber;
|
|
458
487
|
}
|
|
488
|
+
|
|
459
489
|
/**
|
|
460
490
|
* Returns `true` if the phone number is "possible".
|
|
461
491
|
* Is just a shortcut for `PhoneNumber.isPossible()`.
|
|
@@ -470,6 +500,7 @@ var AsYouType = /*#__PURE__*/function () {
|
|
|
470
500
|
}
|
|
471
501
|
return phoneNumber.isPossible();
|
|
472
502
|
}
|
|
503
|
+
|
|
473
504
|
/**
|
|
474
505
|
* Returns `true` if the phone number is "valid".
|
|
475
506
|
* Is just a shortcut for `PhoneNumber.isValid()`.
|
|
@@ -484,6 +515,7 @@ var AsYouType = /*#__PURE__*/function () {
|
|
|
484
515
|
}
|
|
485
516
|
return phoneNumber.isValid();
|
|
486
517
|
}
|
|
518
|
+
|
|
487
519
|
/**
|
|
488
520
|
* @deprecated
|
|
489
521
|
* This method is used in `react-phone-number-input/source/input-control.js`
|
|
@@ -494,6 +526,7 @@ var AsYouType = /*#__PURE__*/function () {
|
|
|
494
526
|
value: function getNationalNumber() {
|
|
495
527
|
return this.state.nationalSignificantNumber;
|
|
496
528
|
}
|
|
529
|
+
|
|
497
530
|
/**
|
|
498
531
|
* Returns the phone number characters entered by the user.
|
|
499
532
|
* @return {string}
|
|
@@ -503,6 +536,7 @@ var AsYouType = /*#__PURE__*/function () {
|
|
|
503
536
|
value: function getChars() {
|
|
504
537
|
return (this.state.international ? '+' : '') + this.state.digits;
|
|
505
538
|
}
|
|
539
|
+
|
|
506
540
|
/**
|
|
507
541
|
* Returns the template for the formatted phone number.
|
|
508
542
|
* @return {string}
|
|
@@ -513,7 +547,6 @@ var AsYouType = /*#__PURE__*/function () {
|
|
|
513
547
|
return this.formatter.getTemplate(this.state) || this.getNonFormattedTemplate() || '';
|
|
514
548
|
}
|
|
515
549
|
}]);
|
|
516
|
-
return AsYouType;
|
|
517
550
|
}();
|
|
518
551
|
|
|
519
552
|
export { AsYouType as default };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AsYouType.js","sources":["../../../../node_modules/libphonenumber-js/es6/AsYouType.js"],"sourcesContent":["function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\n\nfunction _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.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nimport Metadata from './metadata.js';\nimport PhoneNumber from './PhoneNumber.js';\nimport AsYouTypeState from './AsYouTypeState.js';\nimport AsYouTypeFormatter, { DIGIT_PLACEHOLDER } from './AsYouTypeFormatter.js';\nimport AsYouTypeParser, { extractFormattedDigitsAndPlus } from './AsYouTypeParser.js';\nimport getCountryByCallingCode from './helpers/getCountryByCallingCode.js';\nimport getCountryByNationalNumber from './helpers/getCountryByNationalNumber.js';\nimport isObject from './helpers/isObject.js';\nvar USE_NON_GEOGRAPHIC_COUNTRY_CODE = false;\n\nvar AsYouType = /*#__PURE__*/function () {\n /**\r\n * @param {(string|object)?} [optionsOrDefaultCountry] - The default country used for parsing non-international phone numbers. Can also be an `options` object.\r\n * @param {Object} metadata\r\n */\n function AsYouType(optionsOrDefaultCountry, metadata) {\n _classCallCheck(this, AsYouType);\n\n this.metadata = new Metadata(metadata);\n\n var _this$getCountryAndCa = this.getCountryAndCallingCode(optionsOrDefaultCountry),\n _this$getCountryAndCa2 = _slicedToArray(_this$getCountryAndCa, 2),\n defaultCountry = _this$getCountryAndCa2[0],\n defaultCallingCode = _this$getCountryAndCa2[1]; // `this.defaultCountry` and `this.defaultCallingCode` aren't required to be in sync.\n // For example, `this.defaultCountry` could be `\"AR\"` and `this.defaultCallingCode` could be `undefined`.\n // So `this.defaultCountry` and `this.defaultCallingCode` are totally independent.\n\n\n this.defaultCountry = defaultCountry;\n this.defaultCallingCode = defaultCallingCode;\n this.reset();\n }\n\n _createClass(AsYouType, [{\n key: \"getCountryAndCallingCode\",\n value: function getCountryAndCallingCode(optionsOrDefaultCountry) {\n // Set `defaultCountry` and `defaultCallingCode` options.\n var defaultCountry;\n var defaultCallingCode; // Turns out `null` also has type \"object\". Weird.\n\n if (optionsOrDefaultCountry) {\n if (isObject(optionsOrDefaultCountry)) {\n defaultCountry = optionsOrDefaultCountry.defaultCountry;\n defaultCallingCode = optionsOrDefaultCountry.defaultCallingCode;\n } else {\n defaultCountry = optionsOrDefaultCountry;\n }\n }\n\n if (defaultCountry && !this.metadata.hasCountry(defaultCountry)) {\n defaultCountry = undefined;\n }\n\n if (defaultCallingCode) {\n /* istanbul ignore if */\n if (USE_NON_GEOGRAPHIC_COUNTRY_CODE) {\n if (this.metadata.isNonGeographicCallingCode(defaultCallingCode)) {\n defaultCountry = '001';\n }\n }\n }\n\n return [defaultCountry, defaultCallingCode];\n }\n /**\r\n * Inputs \"next\" phone number characters.\r\n * @param {string} text\r\n * @return {string} Formatted phone number characters that have been input so far.\r\n */\n\n }, {\n key: \"input\",\n value: function input(text) {\n var _this$parser$input = this.parser.input(text, this.state),\n digits = _this$parser$input.digits,\n justLeadingPlus = _this$parser$input.justLeadingPlus;\n\n if (justLeadingPlus) {\n this.formattedOutput = '+';\n } else if (digits) {\n this.determineTheCountryIfNeeded(); // Match the available formats by the currently available leading digits.\n\n if (this.state.nationalSignificantNumber) {\n this.formatter.narrowDownMatchingFormats(this.state);\n }\n\n var formattedNationalNumber;\n\n if (this.metadata.hasSelectedNumberingPlan()) {\n formattedNationalNumber = this.formatter.format(digits, this.state);\n }\n\n if (formattedNationalNumber === undefined) {\n // See if another national (significant) number could be re-extracted.\n if (this.parser.reExtractNationalSignificantNumber(this.state)) {\n this.determineTheCountryIfNeeded(); // If it could, then re-try formatting the new national (significant) number.\n\n var nationalDigits = this.state.getNationalDigits();\n\n if (nationalDigits) {\n formattedNationalNumber = this.formatter.format(nationalDigits, this.state);\n }\n }\n }\n\n this.formattedOutput = formattedNationalNumber ? this.getFullNumber(formattedNationalNumber) : this.getNonFormattedNumber();\n }\n\n return this.formattedOutput;\n }\n }, {\n key: \"reset\",\n value: function reset() {\n var _this = this;\n\n this.state = new AsYouTypeState({\n onCountryChange: function onCountryChange(country) {\n // Before version `1.6.0`, the official `AsYouType` formatter API\n // included the `.country` property of an `AsYouType` instance.\n // Since that property (along with the others) have been moved to\n // `this.state`, `this.country` property is emulated for compatibility\n // with the old versions.\n _this.country = country;\n },\n onCallingCodeChange: function onCallingCodeChange(callingCode, country) {\n _this.metadata.selectNumberingPlan(country, callingCode);\n\n _this.formatter.reset(_this.metadata.numberingPlan, _this.state);\n\n _this.parser.reset(_this.metadata.numberingPlan);\n }\n });\n this.formatter = new AsYouTypeFormatter({\n state: this.state,\n metadata: this.metadata\n });\n this.parser = new AsYouTypeParser({\n defaultCountry: this.defaultCountry,\n defaultCallingCode: this.defaultCallingCode,\n metadata: this.metadata,\n state: this.state,\n onNationalSignificantNumberChange: function onNationalSignificantNumberChange() {\n _this.determineTheCountryIfNeeded();\n\n _this.formatter.reset(_this.metadata.numberingPlan, _this.state);\n }\n });\n this.state.reset({\n country: this.defaultCountry,\n callingCode: this.defaultCallingCode\n });\n this.formattedOutput = '';\n return this;\n }\n /**\r\n * Returns `true` if the phone number is being input in international format.\r\n * In other words, returns `true` if and only if the parsed phone number starts with a `\"+\"`.\r\n * @return {boolean}\r\n */\n\n }, {\n key: \"isInternational\",\n value: function isInternational() {\n return this.state.international;\n }\n /**\r\n * Returns the \"calling code\" part of the phone number when it's being input\r\n * in an international format.\r\n * If no valid calling code has been entered so far, returns `undefined`.\r\n * @return {string} [callingCode]\r\n */\n\n }, {\n key: \"getCallingCode\",\n value: function getCallingCode() {\n // If the number is being input in national format and some \"default calling code\"\n // has been passed to `AsYouType` constructor, then `this.state.callingCode`\n // is equal to that \"default calling code\".\n //\n // If the number is being input in national format and no \"default calling code\"\n // has been passed to `AsYouType` constructor, then returns `undefined`,\n // even if a \"default country\" has been passed to `AsYouType` constructor.\n //\n if (this.isInternational()) {\n return this.state.callingCode;\n }\n } // A legacy alias.\n\n }, {\n key: \"getCountryCallingCode\",\n value: function getCountryCallingCode() {\n return this.getCallingCode();\n }\n /**\r\n * Returns a two-letter country code of the phone number.\r\n * Returns `undefined` for \"non-geographic\" phone numbering plans.\r\n * Returns `undefined` if no phone number has been input yet.\r\n * @return {string} [country]\r\n */\n\n }, {\n key: \"getCountry\",\n value: function getCountry() {\n var digits = this.state.digits; // Return `undefined` if no digits have been input yet.\n\n if (digits) {\n return this._getCountry();\n }\n }\n /**\r\n * Returns a two-letter country code of the phone number.\r\n * Returns `undefined` for \"non-geographic\" phone numbering plans.\r\n * @return {string} [country]\r\n */\n\n }, {\n key: \"_getCountry\",\n value: function _getCountry() {\n var country = this.state.country;\n /* istanbul ignore if */\n\n if (USE_NON_GEOGRAPHIC_COUNTRY_CODE) {\n // `AsYouType.getCountry()` returns `undefined`\n // for \"non-geographic\" phone numbering plans.\n if (country === '001') {\n return;\n }\n }\n\n return country;\n }\n }, {\n key: \"determineTheCountryIfNeeded\",\n value: function determineTheCountryIfNeeded() {\n // Suppose a user enters a phone number in international format,\n // and there're several countries corresponding to that country calling code,\n // and a country has been derived from the number, and then\n // a user enters one more digit and the number is no longer\n // valid for the derived country, so the country should be re-derived\n // on every new digit in those cases.\n //\n // If the phone number is being input in national format,\n // then it could be a case when `defaultCountry` wasn't specified\n // when creating `AsYouType` instance, and just `defaultCallingCode` was specified,\n // and that \"calling code\" could correspond to a \"non-geographic entity\",\n // or there could be several countries corresponding to that country calling code.\n // In those cases, `this.country` is `undefined` and should be derived\n // from the number. Again, if country calling code is ambiguous, then\n // `this.country` should be re-derived with each new digit.\n //\n if (!this.state.country || this.isCountryCallingCodeAmbiguous()) {\n this.determineTheCountry();\n }\n } // Prepends `+CountryCode ` in case of an international phone number\n\n }, {\n key: \"getFullNumber\",\n value: function getFullNumber(formattedNationalNumber) {\n var _this2 = this;\n\n if (this.isInternational()) {\n var prefix = function prefix(text) {\n return _this2.formatter.getInternationalPrefixBeforeCountryCallingCode(_this2.state, {\n spacing: text ? true : false\n }) + text;\n };\n\n var callingCode = this.state.callingCode;\n\n if (!callingCode) {\n return prefix(\"\".concat(this.state.getDigitsWithoutInternationalPrefix()));\n }\n\n if (!formattedNationalNumber) {\n return prefix(callingCode);\n }\n\n return prefix(\"\".concat(callingCode, \" \").concat(formattedNationalNumber));\n }\n\n return formattedNationalNumber;\n }\n }, {\n key: \"getNonFormattedNationalNumberWithPrefix\",\n value: function getNonFormattedNationalNumberWithPrefix() {\n var _this$state = this.state,\n nationalSignificantNumber = _this$state.nationalSignificantNumber,\n complexPrefixBeforeNationalSignificantNumber = _this$state.complexPrefixBeforeNationalSignificantNumber,\n nationalPrefix = _this$state.nationalPrefix;\n var number = nationalSignificantNumber;\n var prefix = complexPrefixBeforeNationalSignificantNumber || nationalPrefix;\n\n if (prefix) {\n number = prefix + number;\n }\n\n return number;\n }\n }, {\n key: \"getNonFormattedNumber\",\n value: function getNonFormattedNumber() {\n var nationalSignificantNumberMatchesInput = this.state.nationalSignificantNumberMatchesInput;\n return this.getFullNumber(nationalSignificantNumberMatchesInput ? this.getNonFormattedNationalNumberWithPrefix() : this.state.getNationalDigits());\n }\n }, {\n key: \"getNonFormattedTemplate\",\n value: function getNonFormattedTemplate() {\n var number = this.getNonFormattedNumber();\n\n if (number) {\n return number.replace(/[\\+\\d]/g, DIGIT_PLACEHOLDER);\n }\n }\n }, {\n key: \"isCountryCallingCodeAmbiguous\",\n value: function isCountryCallingCodeAmbiguous() {\n var callingCode = this.state.callingCode;\n var countryCodes = this.metadata.getCountryCodesForCallingCode(callingCode);\n return countryCodes && countryCodes.length > 1;\n } // Determines the country of the phone number\n // entered so far based on the country phone code\n // and the national phone number.\n\n }, {\n key: \"determineTheCountry\",\n value: function determineTheCountry() {\n this.state.setCountry(getCountryByCallingCode(this.isInternational() ? this.state.callingCode : this.defaultCallingCode, {\n nationalNumber: this.state.nationalSignificantNumber,\n defaultCountry: this.defaultCountry,\n metadata: this.metadata\n }));\n }\n /**\r\n * Returns a E.164 phone number value for the user's input.\r\n *\r\n * For example, for country `\"US\"` and input `\"(222) 333-4444\"`\r\n * it will return `\"+12223334444\"`.\r\n *\r\n * For international phone number input, it will also auto-correct\r\n * some minor errors such as using a national prefix when writing\r\n * an international phone number. For example, if the user inputs\r\n * `\"+44 0 7400 000000\"` then it will return an auto-corrected\r\n * `\"+447400000000\"` phone number value.\r\n *\r\n * Will return `undefined` if no digits have been input,\r\n * or when inputting a phone number in national format and no\r\n * default country or default \"country calling code\" have been set.\r\n *\r\n * @return {string} [value]\r\n */\n\n }, {\n key: \"getNumberValue\",\n value: function getNumberValue() {\n var _this$state2 = this.state,\n digits = _this$state2.digits,\n callingCode = _this$state2.callingCode,\n country = _this$state2.country,\n nationalSignificantNumber = _this$state2.nationalSignificantNumber; // Will return `undefined` if no digits have been input.\n\n if (!digits) {\n return;\n }\n\n if (this.isInternational()) {\n if (callingCode) {\n return '+' + callingCode + nationalSignificantNumber;\n } else {\n return '+' + digits;\n }\n } else {\n if (country || callingCode) {\n var callingCode_ = country ? this.metadata.countryCallingCode() : callingCode;\n return '+' + callingCode_ + nationalSignificantNumber;\n }\n }\n }\n /**\r\n * Returns an instance of `PhoneNumber` class.\r\n * Will return `undefined` if no national (significant) number\r\n * digits have been entered so far, or if no `defaultCountry` has been\r\n * set and the user enters a phone number not in international format.\r\n */\n\n }, {\n key: \"getNumber\",\n value: function getNumber() {\n var _this$state3 = this.state,\n nationalSignificantNumber = _this$state3.nationalSignificantNumber,\n carrierCode = _this$state3.carrierCode,\n callingCode = _this$state3.callingCode; // `this._getCountry()` is basically same as `this.state.country`\n // with the only change that it return `undefined` in case of a\n // \"non-geographic\" numbering plan instead of `\"001\"` \"internal use\" value.\n\n var country = this._getCountry();\n\n if (!nationalSignificantNumber) {\n return;\n } // `state.country` and `state.callingCode` aren't required to be in sync.\n // For example, `country` could be `\"AR\"` and `callingCode` could be `undefined`.\n // So `country` and `callingCode` are totally independent.\n\n\n if (!country && !callingCode) {\n return;\n } // By default, if `defaultCountry` parameter was passed when\n // creating `AsYouType` instance, `state.country` is gonna be\n // that `defaultCountry`, which doesn't entirely conform with\n // `parsePhoneNumber()`'s behavior where it attempts to determine\n // the country more precisely in cases when multiple countries\n // could correspond to the same `countryCallingCode`.\n // https://gitlab.com/catamphetamine/libphonenumber-js/-/issues/103#note_1417192969\n //\n // Because `AsYouType.getNumber()` method is supposed to be a 1:1\n // equivalent for `parsePhoneNumber(AsYouType.getNumberValue())`,\n // then it should also behave accordingly in cases of `country` ambiguity.\n // That's how users of this library would expect it to behave anyway.\n //\n\n\n if (country) {\n if (country === this.defaultCountry) {\n // `state.country` and `state.callingCode` aren't required to be in sync.\n // For example, `state.country` could be `\"AR\"` and `state.callingCode` could be `undefined`.\n // So `state.country` and `state.callingCode` are totally independent.\n var metadata = new Metadata(this.metadata.metadata);\n metadata.selectNumberingPlan(country);\n\n var _callingCode = metadata.numberingPlan.callingCode();\n\n var ambiguousCountries = this.metadata.getCountryCodesForCallingCode(_callingCode);\n\n if (ambiguousCountries.length > 1) {\n var exactCountry = getCountryByNationalNumber(nationalSignificantNumber, {\n countries: ambiguousCountries,\n defaultCountry: this.defaultCountry,\n metadata: this.metadata.metadata\n });\n\n if (exactCountry) {\n country = exactCountry;\n }\n }\n }\n }\n\n var phoneNumber = new PhoneNumber(country || callingCode, nationalSignificantNumber, this.metadata.metadata);\n\n if (carrierCode) {\n phoneNumber.carrierCode = carrierCode;\n } // Phone number extensions are not supported by \"As You Type\" formatter.\n\n\n return phoneNumber;\n }\n /**\r\n * Returns `true` if the phone number is \"possible\".\r\n * Is just a shortcut for `PhoneNumber.isPossible()`.\r\n * @return {boolean}\r\n */\n\n }, {\n key: \"isPossible\",\n value: function isPossible() {\n var phoneNumber = this.getNumber();\n\n if (!phoneNumber) {\n return false;\n }\n\n return phoneNumber.isPossible();\n }\n /**\r\n * Returns `true` if the phone number is \"valid\".\r\n * Is just a shortcut for `PhoneNumber.isValid()`.\r\n * @return {boolean}\r\n */\n\n }, {\n key: \"isValid\",\n value: function isValid() {\n var phoneNumber = this.getNumber();\n\n if (!phoneNumber) {\n return false;\n }\n\n return phoneNumber.isValid();\n }\n /**\r\n * @deprecated\r\n * This method is used in `react-phone-number-input/source/input-control.js`\r\n * in versions before `3.0.16`.\r\n */\n\n }, {\n key: \"getNationalNumber\",\n value: function getNationalNumber() {\n return this.state.nationalSignificantNumber;\n }\n /**\r\n * Returns the phone number characters entered by the user.\r\n * @return {string}\r\n */\n\n }, {\n key: \"getChars\",\n value: function getChars() {\n return (this.state.international ? '+' : '') + this.state.digits;\n }\n /**\r\n * Returns the template for the formatted phone number.\r\n * @return {string}\r\n */\n\n }, {\n key: \"getTemplate\",\n value: function getTemplate() {\n return this.formatter.getTemplate(this.state) || this.getNonFormattedTemplate() || '';\n }\n }]);\n\n return AsYouType;\n}();\n\nexport { AsYouType as default };\n//# sourceMappingURL=AsYouType.js.map"],"names":["AsYouType","optionsOrDefaultCountry","metadata","_classCallCheck","Metadata","_this$getCountryAndCa","getCountryAndCallingCode","_this$getCountryAndCa2","_slicedToArray","defaultCountry","defaultCallingCode","reset","isObject","hasCountry","undefined","input","text","_this$parser$input","parser","state","digits","justLeadingPlus","formattedOutput","determineTheCountryIfNeeded","nationalSignificantNumber","formatter","narrowDownMatchingFormats","formattedNationalNumber","hasSelectedNumberingPlan","format","reExtractNationalSignificantNumber","nationalDigits","getNationalDigits","getFullNumber","getNonFormattedNumber","_this","AsYouTypeState","onCountryChange","country","onCallingCodeChange","callingCode","selectNumberingPlan","numberingPlan","AsYouTypeFormatter","AsYouTypeParser","onNationalSignificantNumberChange","isInternational","international","getCallingCode","getCountryCallingCode","getCountry","_getCountry","isCountryCallingCodeAmbiguous","determineTheCountry","_this2","prefix","getInternationalPrefixBeforeCountryCallingCode","spacing","concat","getDigitsWithoutInternationalPrefix","getNonFormattedNationalNumberWithPrefix","_this$state","complexPrefixBeforeNationalSignificantNumber","nationalPrefix","number","nationalSignificantNumberMatchesInput","getNonFormattedTemplate","replace","DIGIT_PLACEHOLDER","countryCodes","getCountryCodesForCallingCode","length","setCountry","getCountryByCallingCode","nationalNumber","getNumberValue","_this$state2","callingCode_","countryCallingCode","getNumber","_this$state3","carrierCode","_callingCode","ambiguousCountries","exactCountry","getCountryByNationalNumber","countries","phoneNumber","PhoneNumber","isPossible","isValid","getNationalNumber","getChars","getTemplate"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAWqBA;AACpB;AACD;AACA;AACA;AACC,EAAA,SAAAA,SAAAA,CAAYC,uBAAZ,EAAqCC,QAArC,EAA+C;AAAAC,IAAAA,eAAA,OAAAH,SAAA,CAAA;AAC9C,IAAA,IAAA,CAAKE,QAAL,GAAgB,IAAIE,QAAJ,CAAaF,QAAb,CAAhB;AACA,IAAA,IAAAG,qBAAA,GAA6C,IAAA,CAAKC,wBAAL,CAA8BL,uBAA9B,CAA7C;MAAAM,sBAAA,GAAAC,cAAA,CAAAH,qBAAA,EAAA,CAAA,CAAA;AAAOI,MAAAA,cAAP,GAAAF,sBAAA,CAAA,CAAA,CAAA;MAAuBG,kBAAvB,GAAAH,sBAAA,CAAA,CAAA,CAAA,CAF8C;AAI9C;AACA;;IACA,IAAA,CAAKE,cAAL,GAAsBA,cAAtB;IACA,IAAA,CAAKC,kBAAL,GAA0BA,kBAA1B;AACA,IAAA,IAAA,CAAKC,KAAL,EAAA;AACA,EAAA;;;WAED,SAAAL,wBAAAA,CAAyBL,uBAAzB,EAAkD;AACjD;AACA,MAAA,IAAIQ,cAAJ;MACA,IAAIC,kBAAJ,CAHiD;;AAKjD,MAAA,IAAIT,uBAAJ,EAA6B;AAC5B,QAAA,IAAIW,QAAQ,CAACX,uBAAD,CAAZ,EAAuC;UACtCQ,cAAc,GAAGR,uBAAuB,CAACQ,cAAzC;UACAC,kBAAkB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AwC,IAAA,CAAK5B,KAAL,CAAWC,MAA1D;AACA,IAAA;AAED;AACD;AACA;AACA;;;AACC,IAAA,KAAA,EAAA,SAAAyE,cAAc;AACb,MAAA,OAAO,IAAA,CAAKpE,SAAL,CAAeoE,WAAf,CAA2B,IAAA,CAAK1E,KAAhC,CAAA,IAA0C,IAAA,CAAK+C,uBAAL,EAA1C,IAA4E,EAAnF;AACA,IAAA;;;;;;;","x_google_ignoreList":[0]}
|
|
1
|
+
{"version":3,"file":"AsYouType.js","sources":["../../../../node_modules/libphonenumber-js/es6/AsYouType.js"],"sourcesContent":["function _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\nfunction _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }\nfunction _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.\"); }\nfunction _unsupportedIterableToArray(r, a) { if (r) { if (\"string\" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return \"Object\" === t && r.constructor && (t = r.constructor.name), \"Map\" === t || \"Set\" === t ? Array.from(r) : \"Arguments\" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }\nfunction _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }\nfunction _iterableToArrayLimit(r, l) { var t = null == r ? null : \"undefined\" != typeof Symbol && r[Symbol.iterator] || r[\"@@iterator\"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t[\"return\"] && (u = t[\"return\"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }\nfunction _arrayWithHoles(r) { if (Array.isArray(r)) return r; }\nfunction _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError(\"Cannot call a class as a function\"); }\nfunction _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, \"value\" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }\nfunction _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, \"prototype\", { writable: !1 }), e; }\nfunction _toPropertyKey(t) { var i = _toPrimitive(t, \"string\"); return \"symbol\" == _typeof(i) ? i : i + \"\"; }\nfunction _toPrimitive(t, r) { if (\"object\" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || \"default\"); if (\"object\" != _typeof(i)) return i; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (\"string\" === r ? String : Number)(t); }\nimport Metadata from './metadata.js';\nimport PhoneNumber from './PhoneNumber.js';\nimport AsYouTypeState from './AsYouTypeState.js';\nimport AsYouTypeFormatter, { DIGIT_PLACEHOLDER } from './AsYouTypeFormatter.js';\nimport AsYouTypeParser, { extractFormattedDigitsAndPlus } from './AsYouTypeParser.js';\nimport getCountryByCallingCode from './helpers/getCountryByCallingCode.js';\nimport getCountryByNationalNumber from './helpers/getCountryByNationalNumber.js';\nimport isObject from './helpers/isObject.js';\nvar USE_NON_GEOGRAPHIC_COUNTRY_CODE = false;\nvar AsYouType = /*#__PURE__*/function () {\n /**\r\n * @param {(string|object)?} [optionsOrDefaultCountry] - The default country used for parsing non-international phone numbers. Can also be an `options` object.\r\n * @param {Object} metadata\r\n */\n function AsYouType(optionsOrDefaultCountry, metadata) {\n _classCallCheck(this, AsYouType);\n this.metadata = new Metadata(metadata);\n var _this$getCountryAndCa = this.getCountryAndCallingCode(optionsOrDefaultCountry),\n _this$getCountryAndCa2 = _slicedToArray(_this$getCountryAndCa, 2),\n defaultCountry = _this$getCountryAndCa2[0],\n defaultCallingCode = _this$getCountryAndCa2[1];\n // `this.defaultCountry` and `this.defaultCallingCode` aren't required to be in sync.\n // For example, `this.defaultCountry` could be `\"AR\"` and `this.defaultCallingCode` could be `undefined`.\n // So `this.defaultCountry` and `this.defaultCallingCode` are totally independent.\n this.defaultCountry = defaultCountry;\n this.defaultCallingCode = defaultCallingCode;\n this.reset();\n }\n return _createClass(AsYouType, [{\n key: \"getCountryAndCallingCode\",\n value: function getCountryAndCallingCode(optionsOrDefaultCountry) {\n // Set `defaultCountry` and `defaultCallingCode` options.\n var defaultCountry;\n var defaultCallingCode;\n // Turns out `null` also has type \"object\". Weird.\n if (optionsOrDefaultCountry) {\n if (isObject(optionsOrDefaultCountry)) {\n defaultCountry = optionsOrDefaultCountry.defaultCountry;\n defaultCallingCode = optionsOrDefaultCountry.defaultCallingCode;\n } else {\n defaultCountry = optionsOrDefaultCountry;\n }\n }\n if (defaultCountry && !this.metadata.hasCountry(defaultCountry)) {\n defaultCountry = undefined;\n }\n if (defaultCallingCode) {\n /* istanbul ignore if */\n if (USE_NON_GEOGRAPHIC_COUNTRY_CODE) {\n if (this.metadata.isNonGeographicCallingCode(defaultCallingCode)) {\n defaultCountry = '001';\n }\n }\n }\n return [defaultCountry, defaultCallingCode];\n }\n\n /**\r\n * Inputs \"next\" phone number characters.\r\n * @param {string} text\r\n * @return {string} Formatted phone number characters that have been input so far.\r\n */\n }, {\n key: \"input\",\n value: function input(text) {\n var _this$parser$input = this.parser.input(text, this.state),\n digits = _this$parser$input.digits,\n justLeadingPlus = _this$parser$input.justLeadingPlus;\n if (justLeadingPlus) {\n this.formattedOutput = '+';\n } else if (digits) {\n this.determineTheCountryIfNeeded();\n // Match the available formats by the currently available leading digits.\n if (this.state.nationalSignificantNumber) {\n this.formatter.narrowDownMatchingFormats(this.state);\n }\n var formattedNationalNumber;\n if (this.metadata.hasSelectedNumberingPlan()) {\n formattedNationalNumber = this.formatter.format(digits, this.state);\n }\n if (formattedNationalNumber === undefined) {\n // See if another national (significant) number could be re-extracted.\n if (this.parser.reExtractNationalSignificantNumber(this.state)) {\n this.determineTheCountryIfNeeded();\n // If it could, then re-try formatting the new national (significant) number.\n var nationalDigits = this.state.getNationalDigits();\n if (nationalDigits) {\n formattedNationalNumber = this.formatter.format(nationalDigits, this.state);\n }\n }\n }\n this.formattedOutput = formattedNationalNumber ? this.getFullNumber(formattedNationalNumber) : this.getNonFormattedNumber();\n }\n return this.formattedOutput;\n }\n }, {\n key: \"reset\",\n value: function reset() {\n var _this = this;\n this.state = new AsYouTypeState({\n onCountryChange: function onCountryChange(country) {\n // Before version `1.6.0`, the official `AsYouType` formatter API\n // included a `.country` property on an `AsYouType` instance.\n // Since that property (along with the others) have been moved to\n // `this.state`, `this.country` property is emulated for compatibility\n // with the old versions.\n _this.country = country;\n },\n onCallingCodeChange: function onCallingCodeChange(callingCode, country) {\n _this.metadata.selectNumberingPlan(country, callingCode);\n _this.formatter.reset(_this.metadata.numberingPlan, _this.state);\n _this.parser.reset(_this.metadata.numberingPlan);\n }\n });\n this.formatter = new AsYouTypeFormatter({\n state: this.state,\n metadata: this.metadata\n });\n this.parser = new AsYouTypeParser({\n defaultCountry: this.defaultCountry,\n defaultCallingCode: this.defaultCallingCode,\n metadata: this.metadata,\n state: this.state,\n onNationalSignificantNumberChange: function onNationalSignificantNumberChange() {\n _this.determineTheCountryIfNeeded();\n _this.formatter.reset(_this.metadata.numberingPlan, _this.state);\n }\n });\n this.state.reset({\n country: this.defaultCountry,\n callingCode: this.defaultCallingCode\n });\n this.formattedOutput = '';\n return this;\n }\n\n /**\r\n * Returns `true` if the phone number is being input in international format.\r\n * In other words, returns `true` if and only if the parsed phone number starts with a `\"+\"`.\r\n * @return {boolean}\r\n */\n }, {\n key: \"isInternational\",\n value: function isInternational() {\n return this.state.international;\n }\n\n /**\r\n * Returns the \"calling code\" part of the phone number when it's being input\r\n * in an international format.\r\n * If no valid calling code has been entered so far, returns `undefined`.\r\n * @return {string} [callingCode]\r\n */\n }, {\n key: \"getCallingCode\",\n value: function getCallingCode() {\n // If the number is being input in national format and some \"default calling code\"\n // has been passed to `AsYouType` constructor, then `this.state.callingCode`\n // is equal to that \"default calling code\".\n //\n // If the number is being input in national format and no \"default calling code\"\n // has been passed to `AsYouType` constructor, then returns `undefined`,\n // even if a \"default country\" has been passed to `AsYouType` constructor.\n //\n if (this.isInternational()) {\n return this.state.callingCode;\n }\n }\n\n // A legacy alias.\n }, {\n key: \"getCountryCallingCode\",\n value: function getCountryCallingCode() {\n return this.getCallingCode();\n }\n\n /**\r\n * Returns a two-letter country code of the phone number.\r\n * Returns `undefined` for \"non-geographic\" phone numbering plans.\r\n * Returns `undefined` if no phone number has been input yet.\r\n * @return {string} [country]\r\n */\n }, {\n key: \"getCountry\",\n value: function getCountry() {\n var digits = this.state.digits;\n // Return `undefined` if no digits have been input yet.\n if (digits) {\n return this._getCountry();\n }\n }\n\n /**\r\n * Returns a two-letter country code of the phone number.\r\n * Returns `undefined` for \"non-geographic\" phone numbering plans.\r\n * @return {string} [country]\r\n */\n }, {\n key: \"_getCountry\",\n value: function _getCountry() {\n var country = this.state.country;\n /* istanbul ignore if */\n if (USE_NON_GEOGRAPHIC_COUNTRY_CODE) {\n // `AsYouType.getCountry()` returns `undefined`\n // for \"non-geographic\" phone numbering plans.\n if (country === '001') {\n return;\n }\n }\n return country;\n }\n }, {\n key: \"determineTheCountryIfNeeded\",\n value: function determineTheCountryIfNeeded() {\n // Suppose a user enters a phone number in international format,\n // and there're several countries corresponding to that country calling code,\n // and a country has been derived from the number, and then\n // a user enters one more digit and the number is no longer\n // valid for the derived country, so the country should be re-derived\n // on every new digit in those cases.\n //\n // If the phone number is being input in national format,\n // then it could be a case when `defaultCountry` wasn't specified\n // when creating `AsYouType` instance, and just `defaultCallingCode` was specified,\n // and that \"calling code\" could correspond to a \"non-geographic entity\",\n // or there could be several countries corresponding to that country calling code.\n // In those cases, `this.country` is `undefined` and should be derived\n // from the number. Again, if country calling code is ambiguous, then\n // `this.country` should be re-derived with each new digit.\n //\n if (!this.state.country || this.isCountryCallingCodeAmbiguous()) {\n this.determineTheCountry();\n }\n }\n\n // Prepends `+CountryCode ` in case of an international phone number\n }, {\n key: \"getFullNumber\",\n value: function getFullNumber(formattedNationalNumber) {\n var _this2 = this;\n if (this.isInternational()) {\n var prefix = function prefix(text) {\n return _this2.formatter.getInternationalPrefixBeforeCountryCallingCode(_this2.state, {\n spacing: text ? true : false\n }) + text;\n };\n var callingCode = this.state.callingCode;\n if (!callingCode) {\n return prefix(\"\".concat(this.state.getDigitsWithoutInternationalPrefix()));\n }\n if (!formattedNationalNumber) {\n return prefix(callingCode);\n }\n return prefix(\"\".concat(callingCode, \" \").concat(formattedNationalNumber));\n }\n return formattedNationalNumber;\n }\n }, {\n key: \"getNonFormattedNationalNumberWithPrefix\",\n value: function getNonFormattedNationalNumberWithPrefix() {\n var _this$state = this.state,\n nationalSignificantNumber = _this$state.nationalSignificantNumber,\n prefixBeforeNationalSignificantNumberThatIsNotNationalPrefix = _this$state.prefixBeforeNationalSignificantNumberThatIsNotNationalPrefix,\n nationalPrefix = _this$state.nationalPrefix;\n var number = nationalSignificantNumber;\n var prefix = prefixBeforeNationalSignificantNumberThatIsNotNationalPrefix || nationalPrefix;\n if (prefix) {\n number = prefix + number;\n }\n return number;\n }\n }, {\n key: \"getNonFormattedNumber\",\n value: function getNonFormattedNumber() {\n var nationalSignificantNumberIsModified = this.state.nationalSignificantNumberIsModified;\n return this.getFullNumber(nationalSignificantNumberIsModified ? this.state.getNationalDigits() : this.getNonFormattedNationalNumberWithPrefix());\n }\n }, {\n key: \"getNonFormattedTemplate\",\n value: function getNonFormattedTemplate() {\n var number = this.getNonFormattedNumber();\n if (number) {\n return number.replace(/[\\+\\d]/g, DIGIT_PLACEHOLDER);\n }\n }\n }, {\n key: \"isCountryCallingCodeAmbiguous\",\n value: function isCountryCallingCodeAmbiguous() {\n var callingCode = this.state.callingCode;\n var countryCodes = this.metadata.getCountryCodesForCallingCode(callingCode);\n return countryCodes && countryCodes.length > 1;\n }\n\n // Determines the exact country of the phone number\n // entered so far based on the country phone code\n // and the national phone number.\n }, {\n key: \"determineTheCountry\",\n value: function determineTheCountry() {\n this.state.setCountry(getCountryByCallingCode(this.isInternational() ? this.state.callingCode : this.defaultCallingCode, {\n nationalNumber: this.state.nationalSignificantNumber,\n metadata: this.metadata\n }));\n }\n\n /**\r\n * Returns a E.164 phone number value for the user's input.\r\n *\r\n * For example, for country `\"US\"` and input `\"(222) 333-4444\"`\r\n * it will return `\"+12223334444\"`.\r\n *\r\n * For international phone number input, it will also auto-correct\r\n * some minor errors such as using a national prefix when writing\r\n * an international phone number. For example, if the user inputs\r\n * `\"+44 0 7400 000000\"` then it will return an auto-corrected\r\n * `\"+447400000000\"` phone number value.\r\n *\r\n * Will return `undefined` if no digits have been input,\r\n * or when inputting a phone number in national format and no\r\n * default country or default \"country calling code\" have been set.\r\n *\r\n * @return {string} [value]\r\n */\n }, {\n key: \"getNumberValue\",\n value: function getNumberValue() {\n var _this$state2 = this.state,\n digits = _this$state2.digits,\n callingCode = _this$state2.callingCode,\n country = _this$state2.country,\n nationalSignificantNumber = _this$state2.nationalSignificantNumber;\n\n // Will return `undefined` if no digits have been input.\n if (!digits) {\n return;\n }\n if (this.isInternational()) {\n if (callingCode) {\n return '+' + callingCode + nationalSignificantNumber;\n } else {\n return '+' + digits;\n }\n } else {\n if (country || callingCode) {\n var callingCode_ = country ? this.metadata.countryCallingCode() : callingCode;\n return '+' + callingCode_ + nationalSignificantNumber;\n }\n }\n }\n\n /**\r\n * Returns an instance of `PhoneNumber` class.\r\n * Will return `undefined` if no national (significant) number\r\n * digits have been entered so far, or if no `defaultCountry` has been\r\n * set and the user enters a phone number not in international format.\r\n */\n }, {\n key: \"getNumber\",\n value: function getNumber() {\n var _this$state3 = this.state,\n nationalSignificantNumber = _this$state3.nationalSignificantNumber,\n carrierCode = _this$state3.carrierCode,\n callingCode = _this$state3.callingCode;\n\n // `this._getCountry()` is basically same as `this.state.country`\n // with the only change that it return `undefined` in case of a\n // \"non-geographic\" numbering plan instead of `\"001\"` \"internal use\" value.\n var country = this._getCountry();\n if (!nationalSignificantNumber) {\n return;\n }\n\n // `state.country` and `state.callingCode` aren't required to be in sync.\n // For example, `country` could be `\"AR\"` and `callingCode` could be `undefined`.\n // So `country` and `callingCode` are totally independent.\n\n if (!country && !callingCode) {\n return;\n }\n\n // By default, if `defaultCountry` parameter was passed when\n // creating `AsYouType` instance, `state.country` is gonna be\n // that `defaultCountry`, which doesn't entirely conform with\n // `parsePhoneNumber()`'s behavior where it attempts to determine\n // the country more precisely in cases when multiple countries\n // could correspond to the same `countryCallingCode`.\n // https://gitlab.com/catamphetamine/libphonenumber-js/-/issues/103#note_1417192969\n //\n // Because `AsYouType.getNumber()` method is supposed to be a 1:1\n // equivalent for `parsePhoneNumber(AsYouType.getNumberValue())`,\n // then it should also behave accordingly in cases of `country` ambiguity.\n // That's how users of this library would expect it to behave anyway.\n //\n if (country) {\n if (country === this.defaultCountry) {\n // `state.country` and `state.callingCode` aren't required to be in sync.\n // For example, `state.country` could be `\"AR\"` and `state.callingCode` could be `undefined`.\n // So `state.country` and `state.callingCode` are totally independent.\n var metadata = new Metadata(this.metadata.metadata);\n metadata.selectNumberingPlan(country);\n var _callingCode = metadata.numberingPlan.callingCode();\n var ambiguousCountries = this.metadata.getCountryCodesForCallingCode(_callingCode);\n if (ambiguousCountries.length > 1) {\n var exactCountry = getCountryByNationalNumber(nationalSignificantNumber, {\n countries: ambiguousCountries,\n metadata: this.metadata.metadata\n });\n if (exactCountry) {\n country = exactCountry;\n }\n }\n }\n }\n var phoneNumber = new PhoneNumber(country || callingCode, nationalSignificantNumber, this.metadata.metadata);\n if (carrierCode) {\n phoneNumber.carrierCode = carrierCode;\n }\n // Phone number extensions are not supported by \"As You Type\" formatter.\n return phoneNumber;\n }\n\n /**\r\n * Returns `true` if the phone number is \"possible\".\r\n * Is just a shortcut for `PhoneNumber.isPossible()`.\r\n * @return {boolean}\r\n */\n }, {\n key: \"isPossible\",\n value: function isPossible() {\n var phoneNumber = this.getNumber();\n if (!phoneNumber) {\n return false;\n }\n return phoneNumber.isPossible();\n }\n\n /**\r\n * Returns `true` if the phone number is \"valid\".\r\n * Is just a shortcut for `PhoneNumber.isValid()`.\r\n * @return {boolean}\r\n */\n }, {\n key: \"isValid\",\n value: function isValid() {\n var phoneNumber = this.getNumber();\n if (!phoneNumber) {\n return false;\n }\n return phoneNumber.isValid();\n }\n\n /**\r\n * @deprecated\r\n * This method is used in `react-phone-number-input/source/input-control.js`\r\n * in versions before `3.0.16`.\r\n */\n }, {\n key: \"getNationalNumber\",\n value: function getNationalNumber() {\n return this.state.nationalSignificantNumber;\n }\n\n /**\r\n * Returns the phone number characters entered by the user.\r\n * @return {string}\r\n */\n }, {\n key: \"getChars\",\n value: function getChars() {\n return (this.state.international ? '+' : '') + this.state.digits;\n }\n\n /**\r\n * Returns the template for the formatted phone number.\r\n * @return {string}\r\n */\n }, {\n key: \"getTemplate\",\n value: function getTemplate() {\n return this.formatter.getTemplate(this.state) || this.getNonFormattedTemplate() || '';\n }\n }]);\n}();\nexport { AsYouType as default };\n//# sourceMappingURL=AsYouType.js.map"],"names":["AsYouType","optionsOrDefaultCountry","metadata","_classCallCheck","Metadata","_this$getCountryAndCa","getCountryAndCallingCode","_this$getCountryAndCa2","_slicedToArray","defaultCountry","defaultCallingCode","reset","_createClass","key","value","isObject","hasCountry","undefined","input","text","_this$parser$input","parser","state","digits","justLeadingPlus","formattedOutput","determineTheCountryIfNeeded","nationalSignificantNumber","formatter","narrowDownMatchingFormats","formattedNationalNumber","hasSelectedNumberingPlan","format","reExtractNationalSignificantNumber","nationalDigits","getNationalDigits","getFullNumber","getNonFormattedNumber","_this","AsYouTypeState","onCountryChange","country","onCallingCodeChange","callingCode","selectNumberingPlan","numberingPlan","AsYouTypeFormatter","AsYouTypeParser","onNationalSignificantNumberChange","isInternational","international","getCallingCode","getCountryCallingCode","getCountry","_getCountry","isCountryCallingCodeAmbiguous","determineTheCountry","_this2","prefix","getInternationalPrefixBeforeCountryCallingCode","spacing","concat","getDigitsWithoutInternationalPrefix","getNonFormattedNationalNumberWithPrefix","_this$state","prefixBeforeNationalSignificantNumberThatIsNotNationalPrefix","nationalPrefix","number","nationalSignificantNumberIsModified","getNonFormattedTemplate","replace","DIGIT_PLACEHOLDER","countryCodes","getCountryCodesForCallingCode","length","setCountry","getCountryByCallingCode","nationalNumber","getNumberValue","_this$state2","callingCode_","countryCallingCode","getNumber","_this$state3","carrierCode","_callingCode","ambiguousCountries","exactCountry","getCountryByNationalNumber","countries","phoneNumber","PhoneNumber","isPossible","isValid","getNationalNumber","getChars","getTemplate"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAS6C,IAExBA,SAAS,gBAAA,YAAA;AAC7B;AACD;AACA;AACA;AACC,EAAA,SAAAA,SAAAA,CAAYC,uBAAuB,EAAEC,QAAQ,EAAE;AAAAC,IAAAA,eAAA,OAAAH,SAAA,CAAA;AAC9C,IAAA,IAAI,CAACE,QAAQ,GAAG,IAAIE,QAAQ,CAACF,QAAQ,CAAC;AACtC,IAAA,IAAAG,qBAAA,GAA6C,IAAI,CAACC,wBAAwB,CAACL,uBAAuB,CAAC;MAAAM,sBAAA,GAAAC,cAAA,CAAAH,qBAAA,EAAA,CAAA,CAAA;AAA5FI,MAAAA,cAAc,GAAAF,sBAAA,CAAA,CAAA,CAAA;AAAEG,MAAAA,kBAAkB,GAAAH,sBAAA,CAAA,CAAA,CAAA;AACz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