§
    EqgK&  ã                   ó¸  — d Z ddlmZmZmZ ddlmZmZmZm	Z	 ddl
mZ ddlmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZm Z m!Z!m"Z"m#Z#m$Z$m%Z%m&Z&m'Z'm(Z(m)Z)m*Z*m+Z+m,Z,m-Z-m.Z.m/Z/m0Z0m1Z1m2Z2m3Z3m4Z4m5Z5m6Z6m7Z7m8Z8m9Z9m:Z:m;Z;m<Z<m=Z=m>Z>m?Z?m@Z@mAZAmBZBmCZC ddlDmEZEmFZFmGZGmHZHmIZImJZJmKZKmLZLmMZMmNZNmOZOmPZPmQZQ ddlRmSZSmTZTmUZU dZVg d	¢ZWeXd
k    rddlYZY eYjZ        ¦   «          dS dS )až  Python phone number parsing and formatting library

Examples of use:

>>> import phonenumbers
>>> from phonenumbers.util import prnt  # equivalent to Py3k print()
>>> x = phonenumbers.parse("+442083661177", None)
>>> prnt(x)
Country Code: 44 National Number: 2083661177
>>> type(x)
<class 'phonenumbers.phonenumber.PhoneNumber'>
>>> str(phonenumbers.format_number(x, phonenumbers.PhoneNumberFormat.NATIONAL))
'020 8366 1177'
>>> str(phonenumbers.format_number(x, phonenumbers.PhoneNumberFormat.INTERNATIONAL))
'+44 20 8366 1177'
>>> str(phonenumbers.format_number(x, phonenumbers.PhoneNumberFormat.E164))
'+442083661177'
>>> y = phonenumbers.parse("020 8366 1177", "GB")
>>> prnt(y)
Country Code: 44 National Number: 2083661177
>>> x == y
True
>>>
>>> formatter = phonenumbers.AsYouTypeFormatter("US")
>>> prnt(formatter.input_digit("6"))
6
>>> prnt(formatter.input_digit("5"))
65
>>> prnt(formatter.input_digit("0"))
650
>>> prnt(formatter.input_digit("2"))
650-2
>>> prnt(formatter.input_digit("5"))
650-25
>>> prnt(formatter.input_digit("3"))
650-253
>>> prnt(formatter.input_digit("2"))
650-2532
>>> prnt(formatter.input_digit("2"))
(650) 253-22
>>> prnt(formatter.input_digit("2"))
(650) 253-222
>>> prnt(formatter.input_digit("2"))
(650) 253-2222
>>>
>>> text = "Call me at 510-748-8230 if it's before 9:30, or on 703-4800500 after 10am."
>>> for match in phonenumbers.PhoneNumberMatcher(text, "US"):
...     prnt(match)
...
PhoneNumberMatch [11,23) 510-748-8230
PhoneNumberMatch [51,62) 703-4800500
>>> for match in phonenumbers.PhoneNumberMatcher(text, "US"):
...     prnt(phonenumbers.format_number(match.number, phonenumbers.PhoneNumberFormat.E164))
...
+15107488230
+17034800500
>>>
é   )ÚPhoneNumberÚCountryCodeSourceÚFrozenPhoneNumber)ÚREGION_CODE_FOR_NON_GEO_ENTITYÚNumberFormatÚPhoneNumberDescÚPhoneMetadata)ÚAsYouTypeFormatter)7ÚCOUNTRY_CODE_TO_REGION_CODEÚSUPPORTED_REGIONSÚUNKNOWN_REGIONÚ!COUNTRY_CODES_FOR_NON_GEO_REGIONSÚNON_DIGITS_PATTERNÚ	MatchTypeÚNumberParseExceptionÚPhoneNumberFormatÚPhoneNumberTypeÚValidationResultÚcan_be_internationally_dialledÚ"convert_alpha_characters_in_numberÚcountry_code_for_regionÚcountry_code_for_valid_regionÚcountry_mobile_tokenÚexample_numberÚexample_number_for_typeÚ!example_number_for_non_geo_entityÚformat_by_patternÚformat_in_original_formatÚ(format_national_number_with_carrier_codeÚ2format_national_number_with_preferred_carrier_codeÚ format_number_for_mobile_dialingÚformat_numberÚ$format_out_of_country_calling_numberÚ)format_out_of_country_keeping_alpha_charsÚinvalid_example_numberÚis_alpha_numberÚis_nanpa_countryÚis_number_matchÚis_number_geographicalÚis_number_type_geographicalÚis_possible_numberÚis_possible_number_for_typeÚ'is_possible_number_for_type_with_reasonÚis_possible_number_stringÚis_possible_number_with_reasonÚis_valid_numberÚis_valid_number_for_regionÚ length_of_geographical_area_codeÚ#length_of_national_destination_codeÚnational_significant_numberÚndd_prefix_for_regionÚnormalize_digits_onlyÚnormalize_diallable_chars_onlyÚnumber_typeÚparseÚregion_code_for_country_codeÚregion_codes_for_country_codeÚregion_code_for_numberÚsupported_calling_codesÚsupported_types_for_regionÚ"supported_types_for_non_geo_entityÚtruncate_too_long_numberÚ is_mobile_number_portable_region)ÚSUPPORTED_SHORT_REGIONSÚShortNumberCostÚ#is_possible_short_number_for_regionÚis_possible_short_numberÚ is_valid_short_number_for_regionÚis_valid_short_numberÚexpected_cost_for_regionÚexpected_costÚconnects_to_emergency_numberÚis_emergency_numberÚis_carrier_specificÚis_carrier_specific_for_regionÚis_sms_service_for_region)ÚPhoneNumberMatchÚPhoneNumberMatcherÚLeniencyz8.13.52)Or   r   r   r   r   r   r	   r
   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r    r!   r"   r#   r$   r%   r&   r'   r)   r*   r(   r+   r,   r-   r.   r/   r0   r1   r2   r3   r4   r5   r6   r7   r8   r9   r:   r;   r<   r=   r>   r?   r@   rA   rB   rC   rD   rE   rF   rG   rH   rI   rJ   rK   rL   rM   rN   rO   rP   rQ   Ú__main__é    N)[Ú__doc__Úphonenumberr   r   r   Úphonemetadatar   r   r   r	   Úasyoutypeformatterr
   Úphonenumberutilr   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r    r!   r"   r#   r$   r%   r&   r'   r(   r)   r*   r+   r,   r-   r.   r/   r0   r1   r2   r3   r4   r5   r6   r7   r8   r9   r:   r;   r<   r=   r>   r?   r@   rA   ÚshortnumberinforB   rC   rD   rE   rF   rG   rH   rI   rJ   rK   rL   rM   rN   ÚphonenumbermatcherrO   rP   rQ   Ú__version__Ú__all__Ú__name__ÚdoctestÚtestmod© ó    úG/var/www/html/env/lib/python3.11/site-packages/phonenumbers/__init__.pyú<module>rc      s  ðð9ð 9ðX KÐ JÐ JÐ JÐ JÐ JÐ JÐ JÐ JÐ JØ gÐ gÐ gÐ gÐ gÐ gÐ gÐ gÐ gÐ gÐ gÐ gà 2Ð 2Ð 2Ð 2Ð 2Ð 2ð1Að 1Að 1Að 1Að 1Að 1Að 1Að 1Að 1Að 1Að 1Að 1Að 1Að 1Að 1Að 1Að 1Að 1Að 1Að 1Að 1Að 1Að 1Að 1Að 1Að 1Að 1Að 1Að 1Að 1Að 1Að 1Að 1Að 1Að 1Að 1Að 1Að 1Að 1Að 1Að 1Að 1Að 1Að 1Að 1Að 1Að 1Að 1Að 1Að 1Að 1Að 1Að 1Að 1Að 1Að 1Að 1Að 1Að 1Að 1Að 1Að 1Að 1Að 1Að 1Að 1Að 1Að 1Að 1Að 1Að 1Að 1Að 1Að 1Að 1Að 1Að 1Að 1Að 1Að 1Að 1Að 1Að 1Að 1Að 1Að 1Að 1Að 1Að 1Að 1Að 1Að 1Að 1Að 1Að 1Að 1Að 1Að 1Að 1Að 1Að 1Að 1Að 1Að 1Að 1Að 1Að 1Að 1Að 1Að 1Að 1Að 1Að 1Að 1Aðd9ð 9ð 9ð 9ð 9ð 9ð 9ð 9ð 9ð 9ð 9ð 9ð 9ð 9ð 9ð 9ð 9ð 9ð 9ð 9ð 9ð 9ð 9ð 9ð 9ð 9ð 9ð 9ð 9ð 9ð OÐ NÐ NÐ NÐ NÐ NÐ NÐ NÐ NÐ Nð
 €ðGð Gð G€ðR ˆzÒÐØ€N€N€NØ€G„OÑÔÐÐÐð Ðra   