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
|
@@ -1,46 +1,55 @@
|
|
|
1
1
|
import compare from './tools/semver-compare.js';
|
|
2
2
|
import isObject from './helpers/isObject.js';
|
|
3
3
|
|
|
4
|
-
function _typeof(
|
|
4
|
+
function _typeof(o) {
|
|
5
5
|
"@babel/helpers - typeof";
|
|
6
6
|
|
|
7
|
-
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (
|
|
8
|
-
return typeof
|
|
9
|
-
} : function (
|
|
10
|
-
return
|
|
11
|
-
}, _typeof(
|
|
7
|
+
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
|
|
8
|
+
return typeof o;
|
|
9
|
+
} : function (o) {
|
|
10
|
+
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
11
|
+
}, _typeof(o);
|
|
12
12
|
}
|
|
13
|
-
function _classCallCheck(
|
|
14
|
-
if (!(
|
|
15
|
-
throw new TypeError("Cannot call a class as a function");
|
|
16
|
-
}
|
|
13
|
+
function _classCallCheck(a, n) {
|
|
14
|
+
if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function");
|
|
17
15
|
}
|
|
18
|
-
function _defineProperties(
|
|
19
|
-
for (var
|
|
20
|
-
var
|
|
21
|
-
|
|
22
|
-
descriptor.configurable = true;
|
|
23
|
-
if ("value" in descriptor) descriptor.writable = true;
|
|
24
|
-
Object.defineProperty(target, descriptor.key, descriptor);
|
|
16
|
+
function _defineProperties(e, r) {
|
|
17
|
+
for (var t = 0; t < r.length; t++) {
|
|
18
|
+
var o = r[t];
|
|
19
|
+
o.enumerable = o.enumerable || false, o.configurable = true, "value" in o && (o.writable = true), Object.defineProperty(e, _toPropertyKey(o.key), o);
|
|
25
20
|
}
|
|
26
21
|
}
|
|
27
|
-
function _createClass(
|
|
28
|
-
|
|
29
|
-
Object.defineProperty(Constructor, "prototype", {
|
|
22
|
+
function _createClass(e, r, t) {
|
|
23
|
+
return r && _defineProperties(e.prototype, r), Object.defineProperty(e, "prototype", {
|
|
30
24
|
writable: false
|
|
31
|
-
});
|
|
32
|
-
|
|
25
|
+
}), e;
|
|
26
|
+
}
|
|
27
|
+
function _toPropertyKey(t) {
|
|
28
|
+
var i = _toPrimitive(t, "string");
|
|
29
|
+
return "symbol" == _typeof(i) ? i : i + "";
|
|
30
|
+
}
|
|
31
|
+
function _toPrimitive(t, r) {
|
|
32
|
+
if ("object" != _typeof(t) || !t) return t;
|
|
33
|
+
var e = t[Symbol.toPrimitive];
|
|
34
|
+
if (void 0 !== e) {
|
|
35
|
+
var i = e.call(t, r);
|
|
36
|
+
if ("object" != _typeof(i)) return i;
|
|
37
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
38
|
+
}
|
|
39
|
+
return (String )(t);
|
|
33
40
|
}
|
|
34
41
|
|
|
35
|
-
|
|
42
|
+
// Added "idd_prefix" and "default_idd_prefix".
|
|
43
|
+
var V3 = '1.2.0';
|
|
36
44
|
|
|
45
|
+
// Moved `001` country code to "nonGeographic" section of metadata.
|
|
37
46
|
var V4 = '1.7.35';
|
|
38
47
|
var DEFAULT_EXT_PREFIX = ' ext. ';
|
|
39
48
|
var CALLING_CODE_REG_EXP = /^\d+$/;
|
|
49
|
+
|
|
40
50
|
/**
|
|
41
51
|
* See: https://gitlab.com/catamphetamine/libphonenumber-js/blob/master/METADATA.md
|
|
42
52
|
*/
|
|
43
|
-
|
|
44
53
|
var Metadata = /*#__PURE__*/function () {
|
|
45
54
|
function Metadata(metadata) {
|
|
46
55
|
_classCallCheck(this, Metadata);
|
|
@@ -48,7 +57,7 @@ var Metadata = /*#__PURE__*/function () {
|
|
|
48
57
|
this.metadata = metadata;
|
|
49
58
|
setVersion.call(this, metadata);
|
|
50
59
|
}
|
|
51
|
-
_createClass(Metadata, [{
|
|
60
|
+
return _createClass(Metadata, [{
|
|
52
61
|
key: "getCountries",
|
|
53
62
|
value: function getCountries() {
|
|
54
63
|
return Object.keys(this.metadata.countries).filter(function (_) {
|
|
@@ -63,10 +72,10 @@ var Metadata = /*#__PURE__*/function () {
|
|
|
63
72
|
}, {
|
|
64
73
|
key: "nonGeographic",
|
|
65
74
|
value: function nonGeographic() {
|
|
66
|
-
if (this.v1 || this.v2 || this.v3) return;
|
|
75
|
+
if (this.v1 || this.v2 || this.v3) return;
|
|
76
|
+
// `nonGeographical` was a typo.
|
|
67
77
|
// It's present in metadata generated from `1.7.35` to `1.7.37`.
|
|
68
78
|
// The test case could be found by searching for "nonGeographical".
|
|
69
|
-
|
|
70
79
|
return this.metadata.nonGeographic || this.metadata.nonGeographical;
|
|
71
80
|
}
|
|
72
81
|
}, {
|
|
@@ -100,7 +109,9 @@ var Metadata = /*#__PURE__*/function () {
|
|
|
100
109
|
} else {
|
|
101
110
|
return this.getCountryCodesForCallingCode(callingCode) ? false : true;
|
|
102
111
|
}
|
|
103
|
-
}
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
// Deprecated.
|
|
104
115
|
}, {
|
|
105
116
|
key: "country",
|
|
106
117
|
value: function country(countryCode) {
|
|
@@ -180,62 +191,86 @@ var Metadata = /*#__PURE__*/function () {
|
|
|
180
191
|
return this.metadata.countries['001'];
|
|
181
192
|
}
|
|
182
193
|
}
|
|
183
|
-
}
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
// Deprecated.
|
|
184
197
|
}, {
|
|
185
198
|
key: "countryCallingCode",
|
|
186
199
|
value: function countryCallingCode() {
|
|
187
200
|
return this.numberingPlan.callingCode();
|
|
188
|
-
}
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
// Deprecated.
|
|
189
204
|
}, {
|
|
190
205
|
key: "IDDPrefix",
|
|
191
206
|
value: function IDDPrefix() {
|
|
192
207
|
return this.numberingPlan.IDDPrefix();
|
|
193
|
-
}
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
// Deprecated.
|
|
194
211
|
}, {
|
|
195
212
|
key: "defaultIDDPrefix",
|
|
196
213
|
value: function defaultIDDPrefix() {
|
|
197
214
|
return this.numberingPlan.defaultIDDPrefix();
|
|
198
|
-
}
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
// Deprecated.
|
|
199
218
|
}, {
|
|
200
219
|
key: "nationalNumberPattern",
|
|
201
220
|
value: function nationalNumberPattern() {
|
|
202
221
|
return this.numberingPlan.nationalNumberPattern();
|
|
203
|
-
}
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
// Deprecated.
|
|
204
225
|
}, {
|
|
205
226
|
key: "possibleLengths",
|
|
206
227
|
value: function possibleLengths() {
|
|
207
228
|
return this.numberingPlan.possibleLengths();
|
|
208
|
-
}
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
// Deprecated.
|
|
209
232
|
}, {
|
|
210
233
|
key: "formats",
|
|
211
234
|
value: function formats() {
|
|
212
235
|
return this.numberingPlan.formats();
|
|
213
|
-
}
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
// Deprecated.
|
|
214
239
|
}, {
|
|
215
240
|
key: "nationalPrefixForParsing",
|
|
216
241
|
value: function nationalPrefixForParsing() {
|
|
217
242
|
return this.numberingPlan.nationalPrefixForParsing();
|
|
218
|
-
}
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
// Deprecated.
|
|
219
246
|
}, {
|
|
220
247
|
key: "nationalPrefixTransformRule",
|
|
221
248
|
value: function nationalPrefixTransformRule() {
|
|
222
249
|
return this.numberingPlan.nationalPrefixTransformRule();
|
|
223
|
-
}
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
// Deprecated.
|
|
224
253
|
}, {
|
|
225
254
|
key: "leadingDigits",
|
|
226
255
|
value: function leadingDigits() {
|
|
227
256
|
return this.numberingPlan.leadingDigits();
|
|
228
|
-
}
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
// Deprecated.
|
|
229
260
|
}, {
|
|
230
261
|
key: "hasTypes",
|
|
231
262
|
value: function hasTypes() {
|
|
232
263
|
return this.numberingPlan.hasTypes();
|
|
233
|
-
}
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
// Deprecated.
|
|
234
267
|
}, {
|
|
235
268
|
key: "type",
|
|
236
269
|
value: function type(_type) {
|
|
237
270
|
return this.numberingPlan.type(_type);
|
|
238
|
-
}
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
// Deprecated.
|
|
239
274
|
}, {
|
|
240
275
|
key: "ext",
|
|
241
276
|
value: function ext() {
|
|
@@ -246,7 +281,9 @@ var Metadata = /*#__PURE__*/function () {
|
|
|
246
281
|
value: function countryCallingCodes() {
|
|
247
282
|
if (this.v1) return this.metadata.country_phone_code_to_countries;
|
|
248
283
|
return this.metadata.country_calling_codes;
|
|
249
|
-
}
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
// Deprecated.
|
|
250
287
|
}, {
|
|
251
288
|
key: "chooseCountryByCountryCallingCode",
|
|
252
289
|
value: function chooseCountryByCountryCallingCode(callingCode) {
|
|
@@ -258,7 +295,6 @@ var Metadata = /*#__PURE__*/function () {
|
|
|
258
295
|
return this.numberingPlan !== undefined;
|
|
259
296
|
}
|
|
260
297
|
}]);
|
|
261
|
-
return Metadata;
|
|
262
298
|
}();
|
|
263
299
|
var NumberingPlan = /*#__PURE__*/function () {
|
|
264
300
|
function NumberingPlan(metadata, globalMetadataObject) {
|
|
@@ -267,11 +303,13 @@ var NumberingPlan = /*#__PURE__*/function () {
|
|
|
267
303
|
this.metadata = metadata;
|
|
268
304
|
setVersion.call(this, globalMetadataObject.metadata);
|
|
269
305
|
}
|
|
270
|
-
_createClass(NumberingPlan, [{
|
|
306
|
+
return _createClass(NumberingPlan, [{
|
|
271
307
|
key: "callingCode",
|
|
272
308
|
value: function callingCode() {
|
|
273
309
|
return this.metadata[0];
|
|
274
|
-
}
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
// Formatting information for regions which share
|
|
275
313
|
// a country calling code is contained by only one region
|
|
276
314
|
// for performance reasons. For example, for NANPA region
|
|
277
315
|
// ("North American Numbering Plan Administration",
|
|
@@ -281,13 +319,17 @@ var NumberingPlan = /*#__PURE__*/function () {
|
|
|
281
319
|
key: "getDefaultCountryMetadataForRegion",
|
|
282
320
|
value: function getDefaultCountryMetadataForRegion() {
|
|
283
321
|
return this.globalMetadataObject.getNumberingPlanMetadata(this.callingCode());
|
|
284
|
-
}
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
// Is always present.
|
|
285
325
|
}, {
|
|
286
326
|
key: "IDDPrefix",
|
|
287
327
|
value: function IDDPrefix() {
|
|
288
328
|
if (this.v1 || this.v2) return;
|
|
289
329
|
return this.metadata[1];
|
|
290
|
-
}
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
// Is only present when a country supports multiple IDD prefixes.
|
|
291
333
|
}, {
|
|
292
334
|
key: "defaultIDDPrefix",
|
|
293
335
|
value: function defaultIDDPrefix() {
|
|
@@ -299,7 +341,9 @@ var NumberingPlan = /*#__PURE__*/function () {
|
|
|
299
341
|
value: function nationalNumberPattern() {
|
|
300
342
|
if (this.v1 || this.v2) return this.metadata[1];
|
|
301
343
|
return this.metadata[2];
|
|
302
|
-
}
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
// "possible length" data is always present in Google's metadata.
|
|
303
347
|
}, {
|
|
304
348
|
key: "possibleLengths",
|
|
305
349
|
value: function possibleLengths() {
|
|
@@ -310,7 +354,9 @@ var NumberingPlan = /*#__PURE__*/function () {
|
|
|
310
354
|
key: "_getFormats",
|
|
311
355
|
value: function _getFormats(metadata) {
|
|
312
356
|
return metadata[this.v1 ? 2 : this.v2 ? 3 : 4];
|
|
313
|
-
}
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
// For countries of the same region (e.g. NANPA)
|
|
314
360
|
// formats are all stored in the "main" country for that region.
|
|
315
361
|
// E.g. "RU" and "KZ", "US" and "CA".
|
|
316
362
|
}, {
|
|
@@ -331,7 +377,9 @@ var NumberingPlan = /*#__PURE__*/function () {
|
|
|
331
377
|
key: "_getNationalPrefixFormattingRule",
|
|
332
378
|
value: function _getNationalPrefixFormattingRule(metadata) {
|
|
333
379
|
return metadata[this.v1 ? 4 : this.v2 ? 5 : 6];
|
|
334
|
-
}
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
// For countries of the same region (e.g. NANPA)
|
|
335
383
|
// national prefix formatting rule is stored in the "main" country for that region.
|
|
336
384
|
// E.g. "RU" and "KZ", "US" and "CA".
|
|
337
385
|
}, {
|
|
@@ -360,7 +408,9 @@ var NumberingPlan = /*#__PURE__*/function () {
|
|
|
360
408
|
key: "_getNationalPrefixIsOptionalWhenFormatting",
|
|
361
409
|
value: function _getNationalPrefixIsOptionalWhenFormatting() {
|
|
362
410
|
return !!this.metadata[this.v1 ? 7 : this.v2 ? 8 : 9];
|
|
363
|
-
}
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
// For countries of the same region (e.g. NANPA)
|
|
364
414
|
// "national prefix is optional when formatting" flag is
|
|
365
415
|
// stored in the "main" country for that region.
|
|
366
416
|
// E.g. "RU" and "KZ", "US" and "CA".
|
|
@@ -383,13 +433,12 @@ var NumberingPlan = /*#__PURE__*/function () {
|
|
|
383
433
|
key: "hasTypes",
|
|
384
434
|
value: function hasTypes() {
|
|
385
435
|
// Versions 1.2.0 - 1.2.4: can be `[]`.
|
|
386
|
-
|
|
387
436
|
/* istanbul ignore next */
|
|
388
437
|
if (this.types() && this.types().length === 0) {
|
|
389
438
|
return false;
|
|
390
|
-
}
|
|
439
|
+
}
|
|
440
|
+
// Versions <= 1.2.4: can be `undefined`.
|
|
391
441
|
// Version >= 1.2.5: can be `0`.
|
|
392
|
-
|
|
393
442
|
return !!this.types();
|
|
394
443
|
}
|
|
395
444
|
}, {
|
|
@@ -406,7 +455,6 @@ var NumberingPlan = /*#__PURE__*/function () {
|
|
|
406
455
|
return this.metadata[13] || DEFAULT_EXT_PREFIX;
|
|
407
456
|
}
|
|
408
457
|
}]);
|
|
409
|
-
return NumberingPlan;
|
|
410
458
|
}();
|
|
411
459
|
var Format = /*#__PURE__*/function () {
|
|
412
460
|
function Format(format, metadata) {
|
|
@@ -414,7 +462,7 @@ var Format = /*#__PURE__*/function () {
|
|
|
414
462
|
this._format = format;
|
|
415
463
|
this.metadata = metadata;
|
|
416
464
|
}
|
|
417
|
-
_createClass(Format, [{
|
|
465
|
+
return _createClass(Format, [{
|
|
418
466
|
key: "pattern",
|
|
419
467
|
value: function pattern() {
|
|
420
468
|
return this._format[0];
|
|
@@ -448,13 +496,16 @@ var Format = /*#__PURE__*/function () {
|
|
|
448
496
|
// national prefix is optional for this phone number format
|
|
449
497
|
// (and it is not enforced explicitly)
|
|
450
498
|
return this.usesNationalPrefix() && !this.nationalPrefixIsOptionalWhenFormattingInNationalFormat();
|
|
451
|
-
}
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
// Checks whether national prefix formatting rule contains national prefix.
|
|
452
502
|
}, {
|
|
453
503
|
key: "usesNationalPrefix",
|
|
454
504
|
value: function usesNationalPrefix() {
|
|
455
505
|
return this.nationalPrefixFormattingRule() &&
|
|
456
506
|
// Check that national prefix formatting rule is not a "dummy" one.
|
|
457
|
-
!FIRST_GROUP_ONLY_PREFIX_PATTERN.test(this.nationalPrefixFormattingRule())
|
|
507
|
+
!FIRST_GROUP_ONLY_PREFIX_PATTERN.test(this.nationalPrefixFormattingRule())
|
|
508
|
+
// In compressed metadata, `this.nationalPrefixFormattingRule()` is `0`
|
|
458
509
|
// when `national_prefix_formatting_rule` is not present.
|
|
459
510
|
// So, `true` or `false` are returned explicitly here, so that
|
|
460
511
|
// `0` number isn't returned.
|
|
@@ -466,14 +517,12 @@ var Format = /*#__PURE__*/function () {
|
|
|
466
517
|
return this._format[5] || this.format();
|
|
467
518
|
}
|
|
468
519
|
}]);
|
|
469
|
-
return Format;
|
|
470
520
|
}();
|
|
471
521
|
/**
|
|
472
522
|
* A pattern that is used to determine if the national prefix formatting rule
|
|
473
523
|
* has the first group only, i.e., does not start with the national prefix.
|
|
474
524
|
* Note that the pattern explicitly allows for unbalanced parentheses.
|
|
475
525
|
*/
|
|
476
|
-
|
|
477
526
|
var FIRST_GROUP_ONLY_PREFIX_PATTERN = /^\(?\$1\)?$/;
|
|
478
527
|
var Type = /*#__PURE__*/function () {
|
|
479
528
|
function Type(type, metadata) {
|
|
@@ -481,7 +530,7 @@ var Type = /*#__PURE__*/function () {
|
|
|
481
530
|
this.type = type;
|
|
482
531
|
this.metadata = metadata;
|
|
483
532
|
}
|
|
484
|
-
_createClass(Type, [{
|
|
533
|
+
return _createClass(Type, [{
|
|
485
534
|
key: "pattern",
|
|
486
535
|
value: function pattern() {
|
|
487
536
|
if (this.metadata.v1) return this.type;
|
|
@@ -494,7 +543,6 @@ var Type = /*#__PURE__*/function () {
|
|
|
494
543
|
return this.type[1] || this.metadata.possibleLengths();
|
|
495
544
|
}
|
|
496
545
|
}]);
|
|
497
|
-
return Type;
|
|
498
546
|
}();
|
|
499
547
|
function getType(types, type) {
|
|
500
548
|
switch (type) {
|
|
@@ -523,21 +571,23 @@ function getType(types, type) {
|
|
|
523
571
|
function validateMetadata(metadata) {
|
|
524
572
|
if (!metadata) {
|
|
525
573
|
throw new Error('[libphonenumber-js] `metadata` argument not passed. Check your arguments.');
|
|
526
|
-
}
|
|
574
|
+
}
|
|
575
|
+
|
|
576
|
+
// `country_phone_code_to_countries` was renamed to `country_calling_codes` in `1.0.18`.
|
|
527
577
|
// For that reason, it's not used in this detection algorithm.
|
|
528
578
|
// Instead, it detects by `countries: {}` property existence.
|
|
529
|
-
|
|
530
579
|
if (!isObject(metadata) || !isObject(metadata.countries)) {
|
|
531
580
|
throw new Error("[libphonenumber-js] `metadata` argument was passed but it's not a valid metadata. Must be an object having `.countries` child object property. Got ".concat(isObject(metadata) ? 'an object of shape: { ' + Object.keys(metadata).join(', ') + ' }' : 'a ' + typeOf(metadata) + ': ' + metadata, "."));
|
|
532
581
|
}
|
|
533
|
-
}
|
|
534
|
-
// so istanbul will show this as "branch not covered".
|
|
582
|
+
}
|
|
535
583
|
|
|
584
|
+
// Babel transforms `typeof` into some "branches"
|
|
585
|
+
// so istanbul will show this as "branch not covered".
|
|
536
586
|
/* istanbul ignore next */
|
|
537
|
-
|
|
538
587
|
var typeOf = function typeOf(_) {
|
|
539
588
|
return _typeof(_);
|
|
540
589
|
};
|
|
590
|
+
|
|
541
591
|
/**
|
|
542
592
|
* Returns "country calling code" for a country.
|
|
543
593
|
* Throws an error if the country doesn't exist or isn't supported by this library.
|
|
@@ -548,11 +598,10 @@ var typeOf = function typeOf(_) {
|
|
|
548
598
|
* // Returns "44"
|
|
549
599
|
* getCountryCallingCode("GB")
|
|
550
600
|
*/
|
|
551
|
-
|
|
552
601
|
function getCountryCallingCode(country, metadata) {
|
|
553
602
|
metadata = new Metadata(metadata);
|
|
554
603
|
if (metadata.hasCountry(country)) {
|
|
555
|
-
return metadata.
|
|
604
|
+
return metadata.selectNumberingPlan(country).countryCallingCode();
|
|
556
605
|
}
|
|
557
606
|
throw new Error("Unknown country: ".concat(country));
|
|
558
607
|
}
|
|
@@ -579,7 +628,9 @@ function setVersion(metadata) {
|
|
|
579
628
|
this.v4 = true;
|
|
580
629
|
}
|
|
581
630
|
}
|
|
582
|
-
}
|
|
631
|
+
}
|
|
632
|
+
|
|
633
|
+
// const ISO_COUNTRY_CODE = /^[A-Z]{2}$/
|
|
583
634
|
// function isCountryCode(countryCode) {
|
|
584
635
|
// return ISO_COUNTRY_CODE.test(countryCodeOrCountryCallingCode)
|
|
585
636
|
// }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"metadata.js","sources":["../../../../node_modules/libphonenumber-js/es6/metadata.js"],"sourcesContent":["function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\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 compare from './tools/semver-compare.js';\nimport isObject from './helpers/isObject.js'; // Added \"possibleLengths\" and renamed\n// \"country_phone_code_to_countries\" to \"country_calling_codes\".\n\nvar V2 = '1.0.18'; // Added \"idd_prefix\" and \"default_idd_prefix\".\n\nvar V3 = '1.2.0'; // Moved `001` country code to \"nonGeographic\" section of metadata.\n\nvar V4 = '1.7.35';\nvar DEFAULT_EXT_PREFIX = ' ext. ';\nvar CALLING_CODE_REG_EXP = /^\\d+$/;\n/**\r\n * See: https://gitlab.com/catamphetamine/libphonenumber-js/blob/master/METADATA.md\r\n */\n\nvar Metadata = /*#__PURE__*/function () {\n function Metadata(metadata) {\n _classCallCheck(this, Metadata);\n\n validateMetadata(metadata);\n this.metadata = metadata;\n setVersion.call(this, metadata);\n }\n\n _createClass(Metadata, [{\n key: \"getCountries\",\n value: function getCountries() {\n return Object.keys(this.metadata.countries).filter(function (_) {\n return _ !== '001';\n });\n }\n }, {\n key: \"getCountryMetadata\",\n value: function getCountryMetadata(countryCode) {\n return this.metadata.countries[countryCode];\n }\n }, {\n key: \"nonGeographic\",\n value: function nonGeographic() {\n if (this.v1 || this.v2 || this.v3) return; // `nonGeographical` was a typo.\n // It's present in metadata generated from `1.7.35` to `1.7.37`.\n // The test case could be found by searching for \"nonGeographical\".\n\n return this.metadata.nonGeographic || this.metadata.nonGeographical;\n }\n }, {\n key: \"hasCountry\",\n value: function hasCountry(country) {\n return this.getCountryMetadata(country) !== undefined;\n }\n }, {\n key: \"hasCallingCode\",\n value: function hasCallingCode(callingCode) {\n if (this.getCountryCodesForCallingCode(callingCode)) {\n return true;\n }\n\n if (this.nonGeographic()) {\n if (this.nonGeographic()[callingCode]) {\n return true;\n }\n } else {\n // A hacky workaround for old custom metadata (generated before V4).\n var countryCodes = this.countryCallingCodes()[callingCode];\n\n if (countryCodes && countryCodes.length === 1 && countryCodes[0] === '001') {\n return true;\n }\n }\n }\n }, {\n key: \"isNonGeographicCallingCode\",\n value: function isNonGeographicCallingCode(callingCode) {\n if (this.nonGeographic()) {\n return this.nonGeographic()[callingCode] ? true : false;\n } else {\n return this.getCountryCodesForCallingCode(callingCode) ? false : true;\n }\n } // Deprecated.\n\n }, {\n key: \"country\",\n value: function country(countryCode) {\n return this.selectNumberingPlan(countryCode);\n }\n }, {\n key: \"selectNumberingPlan\",\n value: function selectNumberingPlan(countryCode, callingCode) {\n // Supports just passing `callingCode` as the first argument.\n if (countryCode && CALLING_CODE_REG_EXP.test(countryCode)) {\n callingCode = countryCode;\n countryCode = null;\n }\n\n if (countryCode && countryCode !== '001') {\n if (!this.hasCountry(countryCode)) {\n throw new Error(\"Unknown country: \".concat(countryCode));\n }\n\n this.numberingPlan = new NumberingPlan(this.getCountryMetadata(countryCode), this);\n } else if (callingCode) {\n if (!this.hasCallingCode(callingCode)) {\n throw new Error(\"Unknown calling code: \".concat(callingCode));\n }\n\n this.numberingPlan = new NumberingPlan(this.getNumberingPlanMetadata(callingCode), this);\n } else {\n this.numberingPlan = undefined;\n }\n\n return this;\n }\n }, {\n key: \"getCountryCodesForCallingCode\",\n value: function getCountryCodesForCallingCode(callingCode) {\n var countryCodes = this.countryCallingCodes()[callingCode];\n\n if (countryCodes) {\n // Metadata before V4 included \"non-geographic entity\" calling codes\n // inside `country_calling_codes` (for example, `\"881\":[\"001\"]`).\n // Now the semantics of `country_calling_codes` has changed:\n // it's specifically for \"countries\" now.\n // Older versions of custom metadata will simply skip parsing\n // \"non-geographic entity\" phone numbers with new versions\n // of this library: it's not considered a bug,\n // because such numbers are extremely rare,\n // and developers extremely rarely use custom metadata.\n if (countryCodes.length === 1 && countryCodes[0].length === 3) {\n return;\n }\n\n return countryCodes;\n }\n }\n }, {\n key: \"getCountryCodeForCallingCode\",\n value: function getCountryCodeForCallingCode(callingCode) {\n var countryCodes = this.getCountryCodesForCallingCode(callingCode);\n\n if (countryCodes) {\n return countryCodes[0];\n }\n }\n }, {\n key: \"getNumberingPlanMetadata\",\n value: function getNumberingPlanMetadata(callingCode) {\n var countryCode = this.getCountryCodeForCallingCode(callingCode);\n\n if (countryCode) {\n return this.getCountryMetadata(countryCode);\n }\n\n if (this.nonGeographic()) {\n var metadata = this.nonGeographic()[callingCode];\n\n if (metadata) {\n return metadata;\n }\n } else {\n // A hacky workaround for old custom metadata (generated before V4).\n // In that metadata, there was no concept of \"non-geographic\" metadata\n // so metadata for `001` country code was stored along with other countries.\n // The test case can be found by searching for:\n // \"should work around `nonGeographic` metadata not existing\".\n var countryCodes = this.countryCallingCodes()[callingCode];\n\n if (countryCodes && countryCodes.length === 1 && countryCodes[0] === '001') {\n return this.metadata.countries['001'];\n }\n }\n } // Deprecated.\n\n }, {\n key: \"countryCallingCode\",\n value: function countryCallingCode() {\n return this.numberingPlan.callingCode();\n } // Deprecated.\n\n }, {\n key: \"IDDPrefix\",\n value: function IDDPrefix() {\n return this.numberingPlan.IDDPrefix();\n } // Deprecated.\n\n }, {\n key: \"defaultIDDPrefix\",\n value: function defaultIDDPrefix() {\n return this.numberingPlan.defaultIDDPrefix();\n } // Deprecated.\n\n }, {\n key: \"nationalNumberPattern\",\n value: function nationalNumberPattern() {\n return this.numberingPlan.nationalNumberPattern();\n } // Deprecated.\n\n }, {\n key: \"possibleLengths\",\n value: function possibleLengths() {\n return this.numberingPlan.possibleLengths();\n } // Deprecated.\n\n }, {\n key: \"formats\",\n value: function formats() {\n return this.numberingPlan.formats();\n } // Deprecated.\n\n }, {\n key: \"nationalPrefixForParsing\",\n value: function nationalPrefixForParsing() {\n return this.numberingPlan.nationalPrefixForParsing();\n } // Deprecated.\n\n }, {\n key: \"nationalPrefixTransformRule\",\n value: function nationalPrefixTransformRule() {\n return this.numberingPlan.nationalPrefixTransformRule();\n } // Deprecated.\n\n }, {\n key: \"leadingDigits\",\n value: function leadingDigits() {\n return this.numberingPlan.leadingDigits();\n } // Deprecated.\n\n }, {\n key: \"hasTypes\",\n value: function hasTypes() {\n return this.numberingPlan.hasTypes();\n } // Deprecated.\n\n }, {\n key: \"type\",\n value: function type(_type) {\n return this.numberingPlan.type(_type);\n } // Deprecated.\n\n }, {\n key: \"ext\",\n value: function ext() {\n return this.numberingPlan.ext();\n }\n }, {\n key: \"countryCallingCodes\",\n value: function countryCallingCodes() {\n if (this.v1) return this.metadata.country_phone_code_to_countries;\n return this.metadata.country_calling_codes;\n } // Deprecated.\n\n }, {\n key: \"chooseCountryByCountryCallingCode\",\n value: function chooseCountryByCountryCallingCode(callingCode) {\n return this.selectNumberingPlan(callingCode);\n }\n }, {\n key: \"hasSelectedNumberingPlan\",\n value: function hasSelectedNumberingPlan() {\n return this.numberingPlan !== undefined;\n }\n }]);\n\n return Metadata;\n}();\n\nexport { Metadata as default };\n\nvar NumberingPlan = /*#__PURE__*/function () {\n function NumberingPlan(metadata, globalMetadataObject) {\n _classCallCheck(this, NumberingPlan);\n\n this.globalMetadataObject = globalMetadataObject;\n this.metadata = metadata;\n setVersion.call(this, globalMetadataObject.metadata);\n }\n\n _createClass(NumberingPlan, [{\n key: \"callingCode\",\n value: function callingCode() {\n return this.metadata[0];\n } // Formatting information for regions which share\n // a country calling code is contained by only one region\n // for performance reasons. For example, for NANPA region\n // (\"North American Numbering Plan Administration\",\n // which includes USA, Canada, Cayman Islands, Bahamas, etc)\n // it will be contained in the metadata for `US`.\n\n }, {\n key: \"getDefaultCountryMetadataForRegion\",\n value: function getDefaultCountryMetadataForRegion() {\n return this.globalMetadataObject.getNumberingPlanMetadata(this.callingCode());\n } // Is always present.\n\n }, {\n key: \"IDDPrefix\",\n value: function IDDPrefix() {\n if (this.v1 || this.v2) return;\n return this.metadata[1];\n } // Is only present when a country supports multiple IDD prefixes.\n\n }, {\n key: \"defaultIDDPrefix\",\n value: function defaultIDDPrefix() {\n if (this.v1 || this.v2) return;\n return this.metadata[12];\n }\n }, {\n key: \"nationalNumberPattern\",\n value: function nationalNumberPattern() {\n if (this.v1 || this.v2) return this.metadata[1];\n return this.metadata[2];\n } // \"possible length\" data is always present in Google's metadata.\n\n }, {\n key: \"possibleLengths\",\n value: function possibleLengths() {\n if (this.v1) return;\n return this.metadata[this.v2 ? 2 : 3];\n }\n }, {\n key: \"_getFormats\",\n value: function _getFormats(metadata) {\n return metadata[this.v1 ? 2 : this.v2 ? 3 : 4];\n } // For countries of the same region (e.g. NANPA)\n // formats are all stored in the \"main\" country for that region.\n // E.g. \"RU\" and \"KZ\", \"US\" and \"CA\".\n\n }, {\n key: \"formats\",\n value: function formats() {\n var _this = this;\n\n var formats = this._getFormats(this.metadata) || this._getFormats(this.getDefaultCountryMetadataForRegion()) || [];\n return formats.map(function (_) {\n return new Format(_, _this);\n });\n }\n }, {\n key: \"nationalPrefix\",\n value: function nationalPrefix() {\n return this.metadata[this.v1 ? 3 : this.v2 ? 4 : 5];\n }\n }, {\n key: \"_getNationalPrefixFormattingRule\",\n value: function _getNationalPrefixFormattingRule(metadata) {\n return metadata[this.v1 ? 4 : this.v2 ? 5 : 6];\n } // For countries of the same region (e.g. NANPA)\n // national prefix formatting rule is stored in the \"main\" country for that region.\n // E.g. \"RU\" and \"KZ\", \"US\" and \"CA\".\n\n }, {\n key: \"nationalPrefixFormattingRule\",\n value: function nationalPrefixFormattingRule() {\n return this._getNationalPrefixFormattingRule(this.metadata) || this._getNationalPrefixFormattingRule(this.getDefaultCountryMetadataForRegion());\n }\n }, {\n key: \"_nationalPrefixForParsing\",\n value: function _nationalPrefixForParsing() {\n return this.metadata[this.v1 ? 5 : this.v2 ? 6 : 7];\n }\n }, {\n key: \"nationalPrefixForParsing\",\n value: function nationalPrefixForParsing() {\n // If `national_prefix_for_parsing` is not set explicitly,\n // then infer it from `national_prefix` (if any)\n return this._nationalPrefixForParsing() || this.nationalPrefix();\n }\n }, {\n key: \"nationalPrefixTransformRule\",\n value: function nationalPrefixTransformRule() {\n return this.metadata[this.v1 ? 6 : this.v2 ? 7 : 8];\n }\n }, {\n key: \"_getNationalPrefixIsOptionalWhenFormatting\",\n value: function _getNationalPrefixIsOptionalWhenFormatting() {\n return !!this.metadata[this.v1 ? 7 : this.v2 ? 8 : 9];\n } // For countries of the same region (e.g. NANPA)\n // \"national prefix is optional when formatting\" flag is\n // stored in the \"main\" country for that region.\n // E.g. \"RU\" and \"KZ\", \"US\" and \"CA\".\n\n }, {\n key: \"nationalPrefixIsOptionalWhenFormattingInNationalFormat\",\n value: function nationalPrefixIsOptionalWhenFormattingInNationalFormat() {\n return this._getNationalPrefixIsOptionalWhenFormatting(this.metadata) || this._getNationalPrefixIsOptionalWhenFormatting(this.getDefaultCountryMetadataForRegion());\n }\n }, {\n key: \"leadingDigits\",\n value: function leadingDigits() {\n return this.metadata[this.v1 ? 8 : this.v2 ? 9 : 10];\n }\n }, {\n key: \"types\",\n value: function types() {\n return this.metadata[this.v1 ? 9 : this.v2 ? 10 : 11];\n }\n }, {\n key: \"hasTypes\",\n value: function hasTypes() {\n // Versions 1.2.0 - 1.2.4: can be `[]`.\n\n /* istanbul ignore next */\n if (this.types() && this.types().length === 0) {\n return false;\n } // Versions <= 1.2.4: can be `undefined`.\n // Version >= 1.2.5: can be `0`.\n\n\n return !!this.types();\n }\n }, {\n key: \"type\",\n value: function type(_type2) {\n if (this.hasTypes() && getType(this.types(), _type2)) {\n return new Type(getType(this.types(), _type2), this);\n }\n }\n }, {\n key: \"ext\",\n value: function ext() {\n if (this.v1 || this.v2) return DEFAULT_EXT_PREFIX;\n return this.metadata[13] || DEFAULT_EXT_PREFIX;\n }\n }]);\n\n return NumberingPlan;\n}();\n\nvar Format = /*#__PURE__*/function () {\n function Format(format, metadata) {\n _classCallCheck(this, Format);\n\n this._format = format;\n this.metadata = metadata;\n }\n\n _createClass(Format, [{\n key: \"pattern\",\n value: function pattern() {\n return this._format[0];\n }\n }, {\n key: \"format\",\n value: function format() {\n return this._format[1];\n }\n }, {\n key: \"leadingDigitsPatterns\",\n value: function leadingDigitsPatterns() {\n return this._format[2] || [];\n }\n }, {\n key: \"nationalPrefixFormattingRule\",\n value: function nationalPrefixFormattingRule() {\n return this._format[3] || this.metadata.nationalPrefixFormattingRule();\n }\n }, {\n key: \"nationalPrefixIsOptionalWhenFormattingInNationalFormat\",\n value: function nationalPrefixIsOptionalWhenFormattingInNationalFormat() {\n return !!this._format[4] || this.metadata.nationalPrefixIsOptionalWhenFormattingInNationalFormat();\n }\n }, {\n key: \"nationalPrefixIsMandatoryWhenFormattingInNationalFormat\",\n value: function nationalPrefixIsMandatoryWhenFormattingInNationalFormat() {\n // National prefix is omitted if there's no national prefix formatting rule\n // set for this country, or when the national prefix formatting rule\n // contains no national prefix itself, or when this rule is set but\n // national prefix is optional for this phone number format\n // (and it is not enforced explicitly)\n return this.usesNationalPrefix() && !this.nationalPrefixIsOptionalWhenFormattingInNationalFormat();\n } // Checks whether national prefix formatting rule contains national prefix.\n\n }, {\n key: \"usesNationalPrefix\",\n value: function usesNationalPrefix() {\n return this.nationalPrefixFormattingRule() && // Check that national prefix formatting rule is not a \"dummy\" one.\n !FIRST_GROUP_ONLY_PREFIX_PATTERN.test(this.nationalPrefixFormattingRule()) // In compressed metadata, `this.nationalPrefixFormattingRule()` is `0`\n // when `national_prefix_formatting_rule` is not present.\n // So, `true` or `false` are returned explicitly here, so that\n // `0` number isn't returned.\n ? true : false;\n }\n }, {\n key: \"internationalFormat\",\n value: function internationalFormat() {\n return this._format[5] || this.format();\n }\n }]);\n\n return Format;\n}();\n/**\r\n * A pattern that is used to determine if the national prefix formatting rule\r\n * has the first group only, i.e., does not start with the national prefix.\r\n * Note that the pattern explicitly allows for unbalanced parentheses.\r\n */\n\n\nvar FIRST_GROUP_ONLY_PREFIX_PATTERN = /^\\(?\\$1\\)?$/;\n\nvar Type = /*#__PURE__*/function () {\n function Type(type, metadata) {\n _classCallCheck(this, Type);\n\n this.type = type;\n this.metadata = metadata;\n }\n\n _createClass(Type, [{\n key: \"pattern\",\n value: function pattern() {\n if (this.metadata.v1) return this.type;\n return this.type[0];\n }\n }, {\n key: \"possibleLengths\",\n value: function possibleLengths() {\n if (this.metadata.v1) return;\n return this.type[1] || this.metadata.possibleLengths();\n }\n }]);\n\n return Type;\n}();\n\nfunction getType(types, type) {\n switch (type) {\n case 'FIXED_LINE':\n return types[0];\n\n case 'MOBILE':\n return types[1];\n\n case 'TOLL_FREE':\n return types[2];\n\n case 'PREMIUM_RATE':\n return types[3];\n\n case 'PERSONAL_NUMBER':\n return types[4];\n\n case 'VOICEMAIL':\n return types[5];\n\n case 'UAN':\n return types[6];\n\n case 'PAGER':\n return types[7];\n\n case 'VOIP':\n return types[8];\n\n case 'SHARED_COST':\n return types[9];\n }\n}\n\nexport function validateMetadata(metadata) {\n if (!metadata) {\n throw new Error('[libphonenumber-js] `metadata` argument not passed. Check your arguments.');\n } // `country_phone_code_to_countries` was renamed to `country_calling_codes` in `1.0.18`.\n // For that reason, it's not used in this detection algorithm.\n // Instead, it detects by `countries: {}` property existence.\n\n\n if (!isObject(metadata) || !isObject(metadata.countries)) {\n throw new Error(\"[libphonenumber-js] `metadata` argument was passed but it's not a valid metadata. Must be an object having `.countries` child object property. Got \".concat(isObject(metadata) ? 'an object of shape: { ' + Object.keys(metadata).join(', ') + ' }' : 'a ' + typeOf(metadata) + ': ' + metadata, \".\"));\n }\n} // Babel transforms `typeof` into some \"branches\"\n// so istanbul will show this as \"branch not covered\".\n\n/* istanbul ignore next */\n\nvar typeOf = function typeOf(_) {\n return _typeof(_);\n};\n/**\r\n * Returns extension prefix for a country.\r\n * @param {string} country\r\n * @param {object} metadata\r\n * @return {string?}\r\n * @example\r\n * // Returns \" ext. \"\r\n * getExtPrefix(\"US\")\r\n */\n\n\nexport function getExtPrefix(country, metadata) {\n metadata = new Metadata(metadata);\n\n if (metadata.hasCountry(country)) {\n return metadata.country(country).ext();\n }\n\n return DEFAULT_EXT_PREFIX;\n}\n/**\r\n * Returns \"country calling code\" for a country.\r\n * Throws an error if the country doesn't exist or isn't supported by this library.\r\n * @param {string} country\r\n * @param {object} metadata\r\n * @return {string}\r\n * @example\r\n * // Returns \"44\"\r\n * getCountryCallingCode(\"GB\")\r\n */\n\nexport function getCountryCallingCode(country, metadata) {\n metadata = new Metadata(metadata);\n\n if (metadata.hasCountry(country)) {\n return metadata.country(country).countryCallingCode();\n }\n\n throw new Error(\"Unknown country: \".concat(country));\n}\nexport function isSupportedCountry(country, metadata) {\n // metadata = new Metadata(metadata)\n // return metadata.hasCountry(country)\n return metadata.countries.hasOwnProperty(country);\n}\n\nfunction setVersion(metadata) {\n var version = metadata.version;\n\n if (typeof version === 'number') {\n this.v1 = version === 1;\n this.v2 = version === 2;\n this.v3 = version === 3;\n this.v4 = version === 4;\n } else {\n if (!version) {\n this.v1 = true;\n } else if (compare(version, V3) === -1) {\n this.v2 = true;\n } else if (compare(version, V4) === -1) {\n this.v3 = true;\n } else {\n this.v4 = true;\n }\n }\n} // const ISO_COUNTRY_CODE = /^[A-Z]{2}$/\n// function isCountryCode(countryCode) {\n// \treturn ISO_COUNTRY_CODE.test(countryCodeOrCountryCallingCode)\n// }\n//# sourceMappingURL=metadata.js.map"],"names":["V3","V4","DEFAULT_EXT_PREFIX","CALLING_CODE_REG_EXP","Metadata","metadata","_classCallCheck","validateMetadata","setVersion","call","getCountries","Object","keys","countries","filter","_","getCountryMetadata","countryCode","nonGeographic","v1","v2","v3","nonGeographical","hasCountry","country","undefined","hasCallingCode","callingCode","getCountryCodesForCallingCode","countryCodes","countryCallingCodes","length","isNonGeographicCallingCode","selectNumberingPlan","test","Error","concat","numberingPlan","NumberingPlan","getNumberingPlanMetadata","getCountryCodeForCallingCode","countryCallingCode","IDDPrefix","defaultIDDPrefix","nationalNumberPattern","possibleLengths","formats","nationalPrefixForParsing","nationalPrefixTransformRule","leadingDigits","hasTypes","type","_type","ext","country_phone_code_to_countries","country_calling_codes","chooseCountryByCountryCallingCode","hasSelectedNumberingPlan","globalMetadataObject","getDefaultCountryMetadataForRegion","_getFormats","_this","map","Format","nationalPrefix","_getNationalPrefixFormattingRule","nationalPrefixFormattingRule","_nationalPrefixForParsing","_getNationalPrefixIsOptionalWhenFormatting","nationalPrefixIsOptionalWhenFormattingInNationalFormat","types","_type2","getType","Type","format","_format","pattern","leadingDigitsPatterns","nationalPrefixIsMandatoryWhenFormattingInNationalFormat","usesNationalPrefix","FIRST_GROUP_ONLY_PREFIX_PATTERN","internationalFormat","isObject","join","typeOf","_typeof","getCountryCallingCode","isSupportedCountry","hasOwnProperty","version","v4","compare"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAQA,IAAMA,EAAE,GAAG,OAAX;;AAGA,IAAMC,EAAE,GAAG,QAAX;AAEA,IAAMC,kBAAkB,GAAG,QAA3B;AAEA,IAAMC,oBAAoB,GAAG,OAA7B;AAEA;AACA;AACA;;IACqBC;EACpB,SAAAA,QAAAA,CAAYC,QAAZ,EAAsB;AAAAC,IAAAA,eAAA,OAAAF,QAAA,CAAA;IACrBG,gBAAgB,CAACF,QAAD,CAAhB;IACA,IAAA,CAAKA,QAAL,GAAgBA,QAAhB;AACAG,IAAAA,UAAU,CAACC,IAAX,CAAgB,IAAhB,EAAsBJ,QAAtB,CAAA;AACA,EAAA;;;AAED,IAAA,KAAA,EAAA,SAAAK,eAAe;AACd,MAAA,OAAOC,MAAM,CAACC,IAAP,CAAY,IAAA,CAAKP,QAAL,CAAcQ,SAA1B,CAAA,CAAqCC,MAArC,CAA4C,UAAAC,CAAC,EAAA;QAAA,OAAIA,CAAC,KAA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;MACvC,IAAA,CAAKoB,EAAL,GAAU,IAAV;IACA,CAFM,MAEA,IAAIuE,OAAO,CAACF,OAAD,EAAUxF,EAAV,CAAP,KAAyB,EAA7B,EAAiC;MACvC,IAAA,CAAKoB,EAAL,GAAU,IAAV;AACA,IAAA,CAFM,MAEA;MACN,IAAA,CAAKqE,EAAL,GAAU,IAAV;AACA,IAAA;AACD,EAAA;AACD;AAGD;AACA;AACA;;;;","x_google_ignoreList":[0]}
|
|
1
|
+
{"version":3,"file":"metadata.js","sources":["../../../../node_modules/libphonenumber-js/es6/metadata.js"],"sourcesContent":["function _readOnlyError(r) { throw new TypeError('\"' + r + '\" is read-only'); }\nfunction _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 _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 compare from './tools/semver-compare.js';\nimport isObject from './helpers/isObject.js';\n\n// Added \"possibleLengths\" and renamed\n// \"country_phone_code_to_countries\" to \"country_calling_codes\".\nvar V2 = '1.0.18';\n\n// Added \"idd_prefix\" and \"default_idd_prefix\".\nvar V3 = '1.2.0';\n\n// Moved `001` country code to \"nonGeographic\" section of metadata.\nvar V4 = '1.7.35';\nvar DEFAULT_EXT_PREFIX = ' ext. ';\nvar CALLING_CODE_REG_EXP = /^\\d+$/;\n\n/**\r\n * See: https://gitlab.com/catamphetamine/libphonenumber-js/blob/master/METADATA.md\r\n */\nvar Metadata = /*#__PURE__*/function () {\n function Metadata(metadata) {\n _classCallCheck(this, Metadata);\n validateMetadata(metadata);\n this.metadata = metadata;\n setVersion.call(this, metadata);\n }\n return _createClass(Metadata, [{\n key: \"getCountries\",\n value: function getCountries() {\n return Object.keys(this.metadata.countries).filter(function (_) {\n return _ !== '001';\n });\n }\n }, {\n key: \"getCountryMetadata\",\n value: function getCountryMetadata(countryCode) {\n return this.metadata.countries[countryCode];\n }\n }, {\n key: \"nonGeographic\",\n value: function nonGeographic() {\n if (this.v1 || this.v2 || this.v3) return;\n // `nonGeographical` was a typo.\n // It's present in metadata generated from `1.7.35` to `1.7.37`.\n // The test case could be found by searching for \"nonGeographical\".\n return this.metadata.nonGeographic || this.metadata.nonGeographical;\n }\n }, {\n key: \"hasCountry\",\n value: function hasCountry(country) {\n return this.getCountryMetadata(country) !== undefined;\n }\n }, {\n key: \"hasCallingCode\",\n value: function hasCallingCode(callingCode) {\n if (this.getCountryCodesForCallingCode(callingCode)) {\n return true;\n }\n if (this.nonGeographic()) {\n if (this.nonGeographic()[callingCode]) {\n return true;\n }\n } else {\n // A hacky workaround for old custom metadata (generated before V4).\n var countryCodes = this.countryCallingCodes()[callingCode];\n if (countryCodes && countryCodes.length === 1 && countryCodes[0] === '001') {\n return true;\n }\n }\n }\n }, {\n key: \"isNonGeographicCallingCode\",\n value: function isNonGeographicCallingCode(callingCode) {\n if (this.nonGeographic()) {\n return this.nonGeographic()[callingCode] ? true : false;\n } else {\n return this.getCountryCodesForCallingCode(callingCode) ? false : true;\n }\n }\n\n // Deprecated.\n }, {\n key: \"country\",\n value: function country(countryCode) {\n return this.selectNumberingPlan(countryCode);\n }\n }, {\n key: \"selectNumberingPlan\",\n value: function selectNumberingPlan(countryCode, callingCode) {\n // Supports just passing `callingCode` as the first argument.\n if (countryCode && CALLING_CODE_REG_EXP.test(countryCode)) {\n callingCode = countryCode;\n countryCode = null;\n }\n if (countryCode && countryCode !== '001') {\n if (!this.hasCountry(countryCode)) {\n throw new Error(\"Unknown country: \".concat(countryCode));\n }\n this.numberingPlan = new NumberingPlan(this.getCountryMetadata(countryCode), this);\n } else if (callingCode) {\n if (!this.hasCallingCode(callingCode)) {\n throw new Error(\"Unknown calling code: \".concat(callingCode));\n }\n this.numberingPlan = new NumberingPlan(this.getNumberingPlanMetadata(callingCode), this);\n } else {\n this.numberingPlan = undefined;\n }\n return this;\n }\n }, {\n key: \"getCountryCodesForCallingCode\",\n value: function getCountryCodesForCallingCode(callingCode) {\n var countryCodes = this.countryCallingCodes()[callingCode];\n if (countryCodes) {\n // Metadata before V4 included \"non-geographic entity\" calling codes\n // inside `country_calling_codes` (for example, `\"881\":[\"001\"]`).\n // Now the semantics of `country_calling_codes` has changed:\n // it's specifically for \"countries\" now.\n // Older versions of custom metadata will simply skip parsing\n // \"non-geographic entity\" phone numbers with new versions\n // of this library: it's not considered a bug,\n // because such numbers are extremely rare,\n // and developers extremely rarely use custom metadata.\n if (countryCodes.length === 1 && countryCodes[0].length === 3) {\n return;\n }\n return countryCodes;\n }\n }\n }, {\n key: \"getCountryCodeForCallingCode\",\n value: function getCountryCodeForCallingCode(callingCode) {\n var countryCodes = this.getCountryCodesForCallingCode(callingCode);\n if (countryCodes) {\n return countryCodes[0];\n }\n }\n }, {\n key: \"getNumberingPlanMetadata\",\n value: function getNumberingPlanMetadata(callingCode) {\n var countryCode = this.getCountryCodeForCallingCode(callingCode);\n if (countryCode) {\n return this.getCountryMetadata(countryCode);\n }\n if (this.nonGeographic()) {\n var metadata = this.nonGeographic()[callingCode];\n if (metadata) {\n return metadata;\n }\n } else {\n // A hacky workaround for old custom metadata (generated before V4).\n // In that metadata, there was no concept of \"non-geographic\" metadata\n // so metadata for `001` country code was stored along with other countries.\n // The test case can be found by searching for:\n // \"should work around `nonGeographic` metadata not existing\".\n var countryCodes = this.countryCallingCodes()[callingCode];\n if (countryCodes && countryCodes.length === 1 && countryCodes[0] === '001') {\n return this.metadata.countries['001'];\n }\n }\n }\n\n // Deprecated.\n }, {\n key: \"countryCallingCode\",\n value: function countryCallingCode() {\n return this.numberingPlan.callingCode();\n }\n\n // Deprecated.\n }, {\n key: \"IDDPrefix\",\n value: function IDDPrefix() {\n return this.numberingPlan.IDDPrefix();\n }\n\n // Deprecated.\n }, {\n key: \"defaultIDDPrefix\",\n value: function defaultIDDPrefix() {\n return this.numberingPlan.defaultIDDPrefix();\n }\n\n // Deprecated.\n }, {\n key: \"nationalNumberPattern\",\n value: function nationalNumberPattern() {\n return this.numberingPlan.nationalNumberPattern();\n }\n\n // Deprecated.\n }, {\n key: \"possibleLengths\",\n value: function possibleLengths() {\n return this.numberingPlan.possibleLengths();\n }\n\n // Deprecated.\n }, {\n key: \"formats\",\n value: function formats() {\n return this.numberingPlan.formats();\n }\n\n // Deprecated.\n }, {\n key: \"nationalPrefixForParsing\",\n value: function nationalPrefixForParsing() {\n return this.numberingPlan.nationalPrefixForParsing();\n }\n\n // Deprecated.\n }, {\n key: \"nationalPrefixTransformRule\",\n value: function nationalPrefixTransformRule() {\n return this.numberingPlan.nationalPrefixTransformRule();\n }\n\n // Deprecated.\n }, {\n key: \"leadingDigits\",\n value: function leadingDigits() {\n return this.numberingPlan.leadingDigits();\n }\n\n // Deprecated.\n }, {\n key: \"hasTypes\",\n value: function hasTypes() {\n return this.numberingPlan.hasTypes();\n }\n\n // Deprecated.\n }, {\n key: \"type\",\n value: function type(_type) {\n return this.numberingPlan.type(_type);\n }\n\n // Deprecated.\n }, {\n key: \"ext\",\n value: function ext() {\n return this.numberingPlan.ext();\n }\n }, {\n key: \"countryCallingCodes\",\n value: function countryCallingCodes() {\n if (this.v1) return this.metadata.country_phone_code_to_countries;\n return this.metadata.country_calling_codes;\n }\n\n // Deprecated.\n }, {\n key: \"chooseCountryByCountryCallingCode\",\n value: function chooseCountryByCountryCallingCode(callingCode) {\n return this.selectNumberingPlan(callingCode);\n }\n }, {\n key: \"hasSelectedNumberingPlan\",\n value: function hasSelectedNumberingPlan() {\n return this.numberingPlan !== undefined;\n }\n }]);\n}();\nexport { Metadata as default };\nvar NumberingPlan = /*#__PURE__*/function () {\n function NumberingPlan(metadata, globalMetadataObject) {\n _classCallCheck(this, NumberingPlan);\n this.globalMetadataObject = globalMetadataObject;\n this.metadata = metadata;\n setVersion.call(this, globalMetadataObject.metadata);\n }\n return _createClass(NumberingPlan, [{\n key: \"callingCode\",\n value: function callingCode() {\n return this.metadata[0];\n }\n\n // Formatting information for regions which share\n // a country calling code is contained by only one region\n // for performance reasons. For example, for NANPA region\n // (\"North American Numbering Plan Administration\",\n // which includes USA, Canada, Cayman Islands, Bahamas, etc)\n // it will be contained in the metadata for `US`.\n }, {\n key: \"getDefaultCountryMetadataForRegion\",\n value: function getDefaultCountryMetadataForRegion() {\n return this.globalMetadataObject.getNumberingPlanMetadata(this.callingCode());\n }\n\n // Is always present.\n }, {\n key: \"IDDPrefix\",\n value: function IDDPrefix() {\n if (this.v1 || this.v2) return;\n return this.metadata[1];\n }\n\n // Is only present when a country supports multiple IDD prefixes.\n }, {\n key: \"defaultIDDPrefix\",\n value: function defaultIDDPrefix() {\n if (this.v1 || this.v2) return;\n return this.metadata[12];\n }\n }, {\n key: \"nationalNumberPattern\",\n value: function nationalNumberPattern() {\n if (this.v1 || this.v2) return this.metadata[1];\n return this.metadata[2];\n }\n\n // \"possible length\" data is always present in Google's metadata.\n }, {\n key: \"possibleLengths\",\n value: function possibleLengths() {\n if (this.v1) return;\n return this.metadata[this.v2 ? 2 : 3];\n }\n }, {\n key: \"_getFormats\",\n value: function _getFormats(metadata) {\n return metadata[this.v1 ? 2 : this.v2 ? 3 : 4];\n }\n\n // For countries of the same region (e.g. NANPA)\n // formats are all stored in the \"main\" country for that region.\n // E.g. \"RU\" and \"KZ\", \"US\" and \"CA\".\n }, {\n key: \"formats\",\n value: function formats() {\n var _this = this;\n var formats = this._getFormats(this.metadata) || this._getFormats(this.getDefaultCountryMetadataForRegion()) || [];\n return formats.map(function (_) {\n return new Format(_, _this);\n });\n }\n }, {\n key: \"nationalPrefix\",\n value: function nationalPrefix() {\n return this.metadata[this.v1 ? 3 : this.v2 ? 4 : 5];\n }\n }, {\n key: \"_getNationalPrefixFormattingRule\",\n value: function _getNationalPrefixFormattingRule(metadata) {\n return metadata[this.v1 ? 4 : this.v2 ? 5 : 6];\n }\n\n // For countries of the same region (e.g. NANPA)\n // national prefix formatting rule is stored in the \"main\" country for that region.\n // E.g. \"RU\" and \"KZ\", \"US\" and \"CA\".\n }, {\n key: \"nationalPrefixFormattingRule\",\n value: function nationalPrefixFormattingRule() {\n return this._getNationalPrefixFormattingRule(this.metadata) || this._getNationalPrefixFormattingRule(this.getDefaultCountryMetadataForRegion());\n }\n }, {\n key: \"_nationalPrefixForParsing\",\n value: function _nationalPrefixForParsing() {\n return this.metadata[this.v1 ? 5 : this.v2 ? 6 : 7];\n }\n }, {\n key: \"nationalPrefixForParsing\",\n value: function nationalPrefixForParsing() {\n // If `national_prefix_for_parsing` is not set explicitly,\n // then infer it from `national_prefix` (if any)\n return this._nationalPrefixForParsing() || this.nationalPrefix();\n }\n }, {\n key: \"nationalPrefixTransformRule\",\n value: function nationalPrefixTransformRule() {\n return this.metadata[this.v1 ? 6 : this.v2 ? 7 : 8];\n }\n }, {\n key: \"_getNationalPrefixIsOptionalWhenFormatting\",\n value: function _getNationalPrefixIsOptionalWhenFormatting() {\n return !!this.metadata[this.v1 ? 7 : this.v2 ? 8 : 9];\n }\n\n // For countries of the same region (e.g. NANPA)\n // \"national prefix is optional when formatting\" flag is\n // stored in the \"main\" country for that region.\n // E.g. \"RU\" and \"KZ\", \"US\" and \"CA\".\n }, {\n key: \"nationalPrefixIsOptionalWhenFormattingInNationalFormat\",\n value: function nationalPrefixIsOptionalWhenFormattingInNationalFormat() {\n return this._getNationalPrefixIsOptionalWhenFormatting(this.metadata) || this._getNationalPrefixIsOptionalWhenFormatting(this.getDefaultCountryMetadataForRegion());\n }\n }, {\n key: \"leadingDigits\",\n value: function leadingDigits() {\n return this.metadata[this.v1 ? 8 : this.v2 ? 9 : 10];\n }\n }, {\n key: \"types\",\n value: function types() {\n return this.metadata[this.v1 ? 9 : this.v2 ? 10 : 11];\n }\n }, {\n key: \"hasTypes\",\n value: function hasTypes() {\n // Versions 1.2.0 - 1.2.4: can be `[]`.\n /* istanbul ignore next */\n if (this.types() && this.types().length === 0) {\n return false;\n }\n // Versions <= 1.2.4: can be `undefined`.\n // Version >= 1.2.5: can be `0`.\n return !!this.types();\n }\n }, {\n key: \"type\",\n value: function type(_type2) {\n if (this.hasTypes() && getType(this.types(), _type2)) {\n return new Type(getType(this.types(), _type2), this);\n }\n }\n }, {\n key: \"ext\",\n value: function ext() {\n if (this.v1 || this.v2) return DEFAULT_EXT_PREFIX;\n return this.metadata[13] || DEFAULT_EXT_PREFIX;\n }\n }]);\n}();\nvar Format = /*#__PURE__*/function () {\n function Format(format, metadata) {\n _classCallCheck(this, Format);\n this._format = format;\n this.metadata = metadata;\n }\n return _createClass(Format, [{\n key: \"pattern\",\n value: function pattern() {\n return this._format[0];\n }\n }, {\n key: \"format\",\n value: function format() {\n return this._format[1];\n }\n }, {\n key: \"leadingDigitsPatterns\",\n value: function leadingDigitsPatterns() {\n return this._format[2] || [];\n }\n }, {\n key: \"nationalPrefixFormattingRule\",\n value: function nationalPrefixFormattingRule() {\n return this._format[3] || this.metadata.nationalPrefixFormattingRule();\n }\n }, {\n key: \"nationalPrefixIsOptionalWhenFormattingInNationalFormat\",\n value: function nationalPrefixIsOptionalWhenFormattingInNationalFormat() {\n return !!this._format[4] || this.metadata.nationalPrefixIsOptionalWhenFormattingInNationalFormat();\n }\n }, {\n key: \"nationalPrefixIsMandatoryWhenFormattingInNationalFormat\",\n value: function nationalPrefixIsMandatoryWhenFormattingInNationalFormat() {\n // National prefix is omitted if there's no national prefix formatting rule\n // set for this country, or when the national prefix formatting rule\n // contains no national prefix itself, or when this rule is set but\n // national prefix is optional for this phone number format\n // (and it is not enforced explicitly)\n return this.usesNationalPrefix() && !this.nationalPrefixIsOptionalWhenFormattingInNationalFormat();\n }\n\n // Checks whether national prefix formatting rule contains national prefix.\n }, {\n key: \"usesNationalPrefix\",\n value: function usesNationalPrefix() {\n return this.nationalPrefixFormattingRule() &&\n // Check that national prefix formatting rule is not a \"dummy\" one.\n !FIRST_GROUP_ONLY_PREFIX_PATTERN.test(this.nationalPrefixFormattingRule())\n // In compressed metadata, `this.nationalPrefixFormattingRule()` is `0`\n // when `national_prefix_formatting_rule` is not present.\n // So, `true` or `false` are returned explicitly here, so that\n // `0` number isn't returned.\n ? true : false;\n }\n }, {\n key: \"internationalFormat\",\n value: function internationalFormat() {\n return this._format[5] || this.format();\n }\n }]);\n}();\n/**\r\n * A pattern that is used to determine if the national prefix formatting rule\r\n * has the first group only, i.e., does not start with the national prefix.\r\n * Note that the pattern explicitly allows for unbalanced parentheses.\r\n */\nvar FIRST_GROUP_ONLY_PREFIX_PATTERN = /^\\(?\\$1\\)?$/;\nvar Type = /*#__PURE__*/function () {\n function Type(type, metadata) {\n _classCallCheck(this, Type);\n this.type = type;\n this.metadata = metadata;\n }\n return _createClass(Type, [{\n key: \"pattern\",\n value: function pattern() {\n if (this.metadata.v1) return this.type;\n return this.type[0];\n }\n }, {\n key: \"possibleLengths\",\n value: function possibleLengths() {\n if (this.metadata.v1) return;\n return this.type[1] || this.metadata.possibleLengths();\n }\n }]);\n}();\nfunction getType(types, type) {\n switch (type) {\n case 'FIXED_LINE':\n return types[0];\n case 'MOBILE':\n return types[1];\n case 'TOLL_FREE':\n return types[2];\n case 'PREMIUM_RATE':\n return types[3];\n case 'PERSONAL_NUMBER':\n return types[4];\n case 'VOICEMAIL':\n return types[5];\n case 'UAN':\n return types[6];\n case 'PAGER':\n return types[7];\n case 'VOIP':\n return types[8];\n case 'SHARED_COST':\n return types[9];\n }\n}\nexport function validateMetadata(metadata) {\n if (!metadata) {\n throw new Error('[libphonenumber-js] `metadata` argument not passed. Check your arguments.');\n }\n\n // `country_phone_code_to_countries` was renamed to `country_calling_codes` in `1.0.18`.\n // For that reason, it's not used in this detection algorithm.\n // Instead, it detects by `countries: {}` property existence.\n if (!isObject(metadata) || !isObject(metadata.countries)) {\n throw new Error(\"[libphonenumber-js] `metadata` argument was passed but it's not a valid metadata. Must be an object having `.countries` child object property. Got \".concat(isObject(metadata) ? 'an object of shape: { ' + Object.keys(metadata).join(', ') + ' }' : 'a ' + typeOf(metadata) + ': ' + metadata, \".\"));\n }\n}\n\n// Babel transforms `typeof` into some \"branches\"\n// so istanbul will show this as \"branch not covered\".\n/* istanbul ignore next */\nvar typeOf = function typeOf(_) {\n return _typeof(_);\n};\n\n/**\r\n * Returns extension prefix for a country.\r\n * @param {string} country\r\n * @param {object} metadata\r\n * @return {string?}\r\n * @example\r\n * // Returns \" ext. \"\r\n * getExtPrefix(\"US\")\r\n */\nexport function getExtPrefix(country, metadata) {\n metadata = new Metadata(metadata);\n if (metadata.hasCountry(country)) {\n return metadata.selectNumberingPlan(country).ext();\n }\n return DEFAULT_EXT_PREFIX;\n}\n\n/**\r\n * Returns \"country calling code\" for a country.\r\n * Throws an error if the country doesn't exist or isn't supported by this library.\r\n * @param {string} country\r\n * @param {object} metadata\r\n * @return {string}\r\n * @example\r\n * // Returns \"44\"\r\n * getCountryCallingCode(\"GB\")\r\n */\nexport function getCountryCallingCode(country, metadata) {\n metadata = new Metadata(metadata);\n if (metadata.hasCountry(country)) {\n return metadata.selectNumberingPlan(country).countryCallingCode();\n }\n throw new Error(\"Unknown country: \".concat(country));\n}\nexport function isSupportedCountry(country, metadata) {\n // metadata = new Metadata(metadata)\n // return metadata.hasCountry(country)\n return metadata.countries.hasOwnProperty(country);\n}\nfunction setVersion(metadata) {\n var version = metadata.version;\n if (typeof version === 'number') {\n this.v1 = version === 1;\n this.v2 = version === 2;\n this.v3 = version === 3;\n this.v4 = version === 4;\n } else {\n if (!version) {\n this.v1 = true;\n } else if (compare(version, V3) === -1) {\n this.v2 = true;\n } else if (compare(version, V4) === -1) {\n this.v3 = true;\n } else {\n this.v4 = true;\n }\n }\n}\n\n// const ISO_COUNTRY_CODE = /^[A-Z]{2}$/\n// function isCountryCode(countryCode) {\n// \treturn ISO_COUNTRY_CODE.test(countryCodeOrCountryCallingCode)\n// }\n//# sourceMappingURL=metadata.js.map"],"names":["V3","V4","DEFAULT_EXT_PREFIX","CALLING_CODE_REG_EXP","Metadata","metadata","_classCallCheck","validateMetadata","setVersion","call","_createClass","key","value","getCountries","Object","keys","countries","filter","_","getCountryMetadata","countryCode","nonGeographic","v1","v2","v3","nonGeographical","hasCountry","country","undefined","hasCallingCode","callingCode","getCountryCodesForCallingCode","countryCodes","countryCallingCodes","length","isNonGeographicCallingCode","selectNumberingPlan","test","Error","concat","numberingPlan","NumberingPlan","getNumberingPlanMetadata","getCountryCodeForCallingCode","countryCallingCode","IDDPrefix","defaultIDDPrefix","nationalNumberPattern","possibleLengths","formats","nationalPrefixForParsing","nationalPrefixTransformRule","leadingDigits","hasTypes","type","_type","ext","country_phone_code_to_countries","country_calling_codes","chooseCountryByCountryCallingCode","hasSelectedNumberingPlan","globalMetadataObject","getDefaultCountryMetadataForRegion","_getFormats","_this","map","Format","nationalPrefix","_getNationalPrefixFormattingRule","nationalPrefixFormattingRule","_nationalPrefixForParsing","_getNationalPrefixIsOptionalWhenFormatting","nationalPrefixIsOptionalWhenFormattingInNationalFormat","types","_type2","getType","Type","format","_format","pattern","leadingDigitsPatterns","nationalPrefixIsMandatoryWhenFormattingInNationalFormat","usesNationalPrefix","FIRST_GROUP_ONLY_PREFIX_PATTERN","internationalFormat","isObject","join","typeOf","_typeof","getCountryCallingCode","isSupportedCountry","hasOwnProperty","version","v4","compare"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOA;AACA,IAAMA,EAAE,GAAG,OAAO;;AAElB;AACA,IAAMC,EAAE,GAAG,QAAQ;AAEnB,IAAMC,kBAAkB,GAAG,QAAQ;AAEnC,IAAMC,oBAAoB,GAAG,OAAO;;AAEpC;AACA;AACA;AAFA,IAGqBC,QAAQ,gBAAA,YAAA;EAC5B,SAAAA,QAAAA,CAAYC,QAAQ,EAAE;AAAAC,IAAAA,eAAA,OAAAF,QAAA,CAAA;IACrBG,gBAAgB,CAACF,QAAQ,CAAC;IAC1B,IAAI,CAACA,QAAQ,GAAGA,QAAQ;AACxBG,IAAAA,UAAU,CAACC,IAAI,CAAC,IAAI,EAAEJ,QAAQ,CAAC;AAChC,EAAA;EAAC,OAAAK,YAAA,CAAAN,QAAA,EAAA,CAAA;IAAAO,GAAA,EAAA,cAAA;AAAAC,IAAAA,KAAA,EAED,SAAAC,YAAYA,GAAG;AACd,MAAA,OAAOC,MAAM,CAACC,IAAI,CAAC,IAAI,CAACV,QAAQ,CAACW,SAAS,CAAC,CAACC,MAAM,CAAC,UAAAC,CAAC,EAAA;QAAA,OAAIA,CAAC,KAAK,KAAK;MAAA,CAAA,CAAC;AACrE,IAAA;AAAC,GAAA,EAAA;IAAAP,GAAA,EAAA,oBAAA;AAAAC,IAAAA,KAAA,EAED,SAAAO,kBAAkBA,CAACC,WAAW,EAAE;AAC/B,MAAA,OAAO,IAAI,CAACf,QAAQ,CAACW,SAAS,CAACI,WAAW,CAAC;AAC5C,IAAA;AAAC,GAAA,EAAA;IAAAT,GAAA,EAAA,eAAA;AAAAC,IAAAA,KAAA,EAED,SAAAS,aAAaA,GAAG;MACf,IAAI,IAAI,CAACC,EAAE,IAAI,IAAI,CAACC,EAAE,IAAI,IAAI,CAACC,EAAE,EAAE;AACnC;AACA;AACA;MAC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