diff --git a/.slather.yml b/.slather.yml index d4ce5d1..b1c4036 100644 --- a/.slather.yml +++ b/.slather.yml @@ -5,8 +5,6 @@ ignore: - libPhoneNumber/AppDelegate.m - libPhoneNumber/main.m - libPhoneNumber/NBPhoneMetaDataGenerator.m - - libPhoneNumber/NBMetadataCore.m - - libPhoneNumber/NBMetadataCoreMapper.m - libPhoneNumber/NBPhoneMetaData.m - libPhoneNumber/NBPhoneNumberDesc.m - libPhoneNumber/NBMetadataHelper.m diff --git a/libPhoneNumber-macOS/libPhoneNumbermacOS.h b/libPhoneNumber-macOS/libPhoneNumbermacOS.h index 42151fe..bc17479 100644 --- a/libPhoneNumber-macOS/libPhoneNumbermacOS.h +++ b/libPhoneNumber-macOS/libPhoneNumbermacOS.h @@ -24,8 +24,6 @@ FOUNDATION_EXPORT const unsigned char libPhoneNumbermacOSVersionString[]; #import "NBAsYouTypeFormatter.h" // Metadata -#import "NBMetadataCore.h" -#import "NBMetadataCoreMapper.h" #import "NBMetadataHelper.h" // Model diff --git a/libPhoneNumber-tvOS/libPhoneNumbertvOS.h b/libPhoneNumber-tvOS/libPhoneNumbertvOS.h index f00f9d9..c019da5 100644 --- a/libPhoneNumber-tvOS/libPhoneNumbertvOS.h +++ b/libPhoneNumber-tvOS/libPhoneNumbertvOS.h @@ -25,8 +25,6 @@ FOUNDATION_EXPORT const unsigned char libPhoneNumber_tvOSVersionString[]; // Metadata #import "NBMetadataCore.h" -#import "NBMetadataCoreMapper.h" -#import "NBMetadataHelper.h" // Model #import "NBPhoneMetaData.h" diff --git a/libPhoneNumber-watchOS/libPhoneNumberwatchOS.h b/libPhoneNumber-watchOS/libPhoneNumberwatchOS.h index 3a3f894..0df7f71 100644 --- a/libPhoneNumber-watchOS/libPhoneNumberwatchOS.h +++ b/libPhoneNumber-watchOS/libPhoneNumberwatchOS.h @@ -25,8 +25,6 @@ FOUNDATION_EXPORT const unsigned char libPhoneNumber_watchOSVersionString[]; // Metadata #import "NBMetadataCore.h" -#import "NBMetadataCoreMapper.h" -#import "NBMetadataHelper.h" // Model #import "NBPhoneMetaData.h" diff --git a/libPhoneNumber/NBMetadataCore.m b/libPhoneNumber/NBMetadataCore.m deleted file mode 100644 index 83ea0b8..0000000 --- a/libPhoneNumber/NBMetadataCore.m +++ /dev/null @@ -1,23226 +0,0 @@ -// DO NOT EDIT (This file was auto-generated from NBPhoneMetaDataGenerator) - -#import "NBMetadataCore.h" -#import "NBPhoneNumberDefines.h" -#import "NBPhoneNumberDesc.h" - -#import "NBNumberFormat.h" - -@implementation NBPhoneMetadataIM -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:10]]; - - NSMutableArray *generalDesc_descArrayPLLO = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPLLO addObject: [NSNumber numberWithInt:6]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[135789]\\d{6,9}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:generalDesc_descArrayPLLO withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *fixedLine_descArrayPLLO = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPLLO addObject: [NSNumber numberWithInt:6]]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"1624\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:fixedLine_descArrayPLLO withExample:@"1624456789" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"7(?:4576|[59]24\\d)\\d{5}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"7924123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"808162\\d{4}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"8081624567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:872299|90[0167]624)\\d{4}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"9016247890" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"8(?:4(?:40[49]06|5624\\d)|70624\\d)\\d{3}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"8456247890" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"70\\d{8}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"7012345678" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"56\\d{8}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"5612345678" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"76242\\d{5}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"7624212345" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"3(?:08162\\d|3\\d{5}|4(?:40[49]06|5624\\d)|7(?:0624\\d|2299\\d))\\d{3}|55\\d{8}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"5512345678" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"IM"; - self.countryCode = [NSNumber numberWithInteger:44]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = @"0"; - self.preferredExtnPrefix = @" x"; - self.nationalPrefixForParsing = @"0"; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataHR -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:6]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:7]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:8]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[1-7]\\d{5,8}|[89]\\d{6,8}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *fixedLine_descArrayPL = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:8]]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:9]]; - - NSMutableArray *fixedLine_descArrayPLLO = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPLLO addObject: [NSNumber numberWithInt:6]]; - [fixedLine_descArrayPLLO addObject: [NSNumber numberWithInt:7]]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"1\\d{7}|(?:2[0-3]|3[1-5]|4[02-47-9]|5[1-3])\\d{6,7}" withPossibleNumberPattern:nil withPossibleLength:fixedLine_descArrayPL withPossibleLengthLocalOnly:fixedLine_descArrayPLLO withExample:@"12345678" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *mobile_descArrayPL = [[NSMutableArray alloc] init]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:8]]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"9(?:01\\d|[1259]\\d{2}|7(?:[0679]\\d|51)|8\\d{1,2})\\d{5}" withPossibleNumberPattern:nil withPossibleLength:mobile_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"921234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:7]]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:8]]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"80[01]\\d{4,6}" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"800123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:6]]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:7]]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:8]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"6(?:[01]\\d{0,2}|[459]\\d{2})\\d{4}" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"611234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:8]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"7[45]\\d{6}" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"74123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:8]]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:62\\d?|72)\\d{6}" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"62123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"HR"; - self.countryCode = [NSNumber numberWithInteger:385]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = @"0"; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = @"0"; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - [numberFormats0_patternArray addObject:@"1"]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(1)(\\d{4})(\\d{3})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - - NSMutableArray *numberFormats1_patternArray = [[NSMutableArray alloc] init]; - [numberFormats1_patternArray addObject:@"[2-5]"]; - NBNumberFormat *numberFormats1 = [[NBNumberFormat alloc] initWithPattern:@"([2-5]\\d)(\\d{3})(\\d{3,4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats1_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats1]; - - NSMutableArray *numberFormats2_patternArray = [[NSMutableArray alloc] init]; - [numberFormats2_patternArray addObject:@"9"]; - NBNumberFormat *numberFormats2 = [[NBNumberFormat alloc] initWithPattern:@"(9\\d)(\\d{3})(\\d{3,4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats2_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats2]; - - NSMutableArray *numberFormats3_patternArray = [[NSMutableArray alloc] init]; - [numberFormats3_patternArray addObject:@"6[01]"]; - NBNumberFormat *numberFormats3 = [[NBNumberFormat alloc] initWithPattern:@"(6[01])(\\d{2})(\\d{2,3})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats3_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats3]; - - NSMutableArray *numberFormats4_patternArray = [[NSMutableArray alloc] init]; - [numberFormats4_patternArray addObject:@"[67]"]; - NBNumberFormat *numberFormats4 = [[NBNumberFormat alloc] initWithPattern:@"([67]\\d)(\\d{3})(\\d{3,4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats4_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats4]; - - NSMutableArray *numberFormats5_patternArray = [[NSMutableArray alloc] init]; - [numberFormats5_patternArray addObject:@"8"]; - NBNumberFormat *numberFormats5 = [[NBNumberFormat alloc] initWithPattern:@"(80[01])(\\d{2})(\\d{2,3})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats5_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats5]; - - NSMutableArray *numberFormats6_patternArray = [[NSMutableArray alloc] init]; - [numberFormats6_patternArray addObject:@"8"]; - NBNumberFormat *numberFormats6 = [[NBNumberFormat alloc] initWithPattern:@"(80[01])(\\d{3})(\\d{3})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats6_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats6]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataGW -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:7]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:4(?:0\\d{5}|4\\d{7})|9\\d{8})" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *fixedLine_descArrayPL = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"443\\d{6}" withPossibleNumberPattern:nil withPossibleLength:fixedLine_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"443201234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *mobile_descArrayPL = [[NSMutableArray alloc] init]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"9(?:5(?:5\\d|6[0-2])|6(?:5[0-2]|6\\d|9[012])|77\\d)\\d{5}" withPossibleNumberPattern:nil withPossibleLength:mobile_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"955012345" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:7]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"40\\d{5}" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"4012345" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"GW"; - self.countryCode = [NSNumber numberWithInteger:245]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = nil; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = nil; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - [numberFormats0_patternArray addObject:@"44|9[567]"]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{3})(\\d{3})(\\d{3})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - - NSMutableArray *numberFormats1_patternArray = [[NSMutableArray alloc] init]; - [numberFormats1_patternArray addObject:@"40"]; - NBNumberFormat *numberFormats1 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{3})(\\d{4})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats1_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats1]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataIN -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:8]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:9]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:10]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:11]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:12]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:13]]; - - NSMutableArray *generalDesc_descArrayPLLO = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPLLO addObject: [NSNumber numberWithInt:6]]; - [generalDesc_descArrayPLLO addObject: [NSNumber numberWithInt:7]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"008\\d{9}|1\\d{7,12}|[2-9]\\d{9,10}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:generalDesc_descArrayPLLO withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *fixedLine_descArrayPL = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:10]]; - - NSMutableArray *fixedLine_descArrayPLLO = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPLLO addObject: [NSNumber numberWithInt:6]]; - [fixedLine_descArrayPLLO addObject: [NSNumber numberWithInt:7]]; - [fixedLine_descArrayPLLO addObject: [NSNumber numberWithInt:8]]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:11|2[02]|33|4[04]|79)[2-7]\\d{7}|80[2-467]\\d{7}|(?:1(?:2[0-249]|3[0-25]|4[145]|[59][14]|6[014]|7[1257]|8[01346])|2(?:1[257]|3[013]|4[01]|5[0137]|6[0158]|78|8[1568]|9[14])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|3[15]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|[36][25]|22|4[28]|5[12]|[78]1|9[15])|6(?:12|[2345]1|57|6[13]|7[14]|80)|7(?:12|2[14]|3[134]|4[47]|5[15]|[67]1|88)|8(?:16|2[014]|3[126]|6[136]|7[078]|8[34]|91))[2-7]\\d{6}|(?:(?:1(?:2[35-8]|3[346-9]|4[236-9]|[59][0235-9]|6[235-9]|7[34689]|8[257-9])|2(?:1[134689]|3[24-8]|4[2-8]|5[25689]|6[2-4679]|7[13-79]|8[2-479]|9[235-9])|3(?:01|1[79]|2[1-5]|4[25-8]|5[125689]|6[235-7]|7[157-9]|8[2-467])|4(?:1[14578]|2[5689]|3[2-467]|5[4-7]|6[35]|73|8[2689]|9[2389])|5(?:[16][146-9]|2[14-8]|3[1346]|4[14-69]|5[46]|7[2-4]|8[2-8]|9[246])|6(?:1[1358]|2[2457]|3[2-4]|4[235-7]|[57][2-689]|6[24-578]|8[1-6])|8(?:1[1357-9]|2[235-8]|3[03-57-9]|4[0-24-9]|5\\d|6[2457-9]|7[1-6]|8[1256]|9[2-4]))\\d|7(?:(?:1[013-9]|2[0235-9]|3[2679]|4[1-35689]|5[2-46-9]|[67][02-9]|9\\d)\\d|8(?:2[0-6]|[013-8]\\d)))[2-7]\\d{5}" withPossibleNumberPattern:nil withPossibleLength:fixedLine_descArrayPL withPossibleLengthLocalOnly:fixedLine_descArrayPLLO withExample:@"1123456789" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *mobile_descArrayPL = [[NSMutableArray alloc] init]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:10]]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:600[1-3]\\d|7(?:0\\d{3}|19[0-5]\\d|2(?:[0235679]\\d{2}|[14][017-9]\\d|8(?:[0-59]\\d|[678][089]))|3(?:[05-8]\\d{2}|1(?:[089]\\d|7[5-8])|2(?:[0-49][089]|[5-8]\\d)|3[017-9]\\d|4(?:[07-9]\\d|11)|9(?:[016-9]\\d|[2-5][089]))|4(?:0\\d{2}|1(?:[015-9]\\d|[23][089]|4[089])|2(?:0[089]|[1-7][089]|[89]\\d)|3(?:[0-8][089]|9\\d)|4(?:[089]\\d|11|7[02-8])|[56]\\d[089]|7(?:[089]\\d|11|7[02-8])|8(?:[0-24-7][089]|[389]\\d)|9(?:[0-6][089]|7[089]|[89]\\d))|5(?:[0346-8]\\d{2}|1(?:[07-9]\\d|11)|2(?:[04-9]\\d|[123][089])|5[017-9]\\d|9(?:[0-6][089]|[7-9]\\d))|6(?:0(?:[0-47]\\d|[5689][089])|(?:1[0-257-9]|[6-9]\\d)\\d|2(?:[0-4]\\d|[5-9][089])|3(?:[02-8][089]|[19]\\d)|4\\d[089]|5(?:[0-367][089]|[4589]\\d))|7(?:0(?:0[02-9]|[13-6][089]|[289]\\d|7[89])|[1-9]\\d{2})|8(?:[0-79]\\d{2}|8(?:[089]\\d|11|7[02-9]))|9(?:[089]\\d{2}|313|7(?:[02-8]\\d|9[07-9])))|8(?:0(?:[01589]\\d{2}|6[67]\\d|7(?:[02-8]\\d|9[05-9]))|1(?:[02-57-9]\\d{2}|1(?:[0-35-9]\\d|4[0-46-9])|6(?:[089]\\d|7[02-8]))|2(?:0(?:[089]\\d|7[02])|[14](?:[089]\\d|7[02-8])|[235-9]\\d{2})|3(?:[0357-9]\\d{2}|1(?:[089]\\d|7[02-6])|2(?:[09]\\d|77|8[0-689])|4(?:0[1-7]|[1-9]\\d)|6(?:[089]\\d|7[02-7]))|[45]\\d{3}|6(?:[02457-9]\\d{2}|1(?:[089]\\d|7[02-8])|3(?:[089]\\d|7[02-68])|6(?:[08]\\d|7[02-8]|9[01]))|7(?:0[07-9]\\d|[1-69]\\d{2}|[78](?:[089]\\d|7[02-8]))|8(?:[0-25-9]\\d{2}|3(?:[089]\\d|7[02-8])|4(?:[0489]\\d|7[02-68]))|9(?:[02-9]\\d{2}|1(?:[0289]\\d|7[2-6])))|9\\d{4})\\d{5}" withPossibleNumberPattern:nil withPossibleLength:mobile_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"8123456789" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"00800\\d{7}|1(?:600\\d{6}|80(?:0\\d{4,9}|3\\d{9}))" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"1800123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:13]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"186[12]\\d{9}" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"1861123456789" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:11]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"1860\\d{7}" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"18603451234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:10]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"140\\d{7}" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"1409305260" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"00800\\d{7}|1(?:600\\d{6}|8(?:0(?:0\\d{4,9}|3\\d{9})|6(?:0\\d{7}|[12]\\d{9})))" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"1800123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"IN"; - self.countryCode = [NSNumber numberWithInteger:91]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = @"0"; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = @"0"; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - [numberFormats0_patternArray addObject:@"600|7(?:[02-8]|19|9[037-9])|8(?:0[015-9]|[1-9])|9"]; - [numberFormats0_patternArray addObject:@"600|7(?:[078]|19[0-5]|2(?:[02356-9]|[14][017-9]|9[389])|3(?:[025-9]|1[07-9]|[34][017-9])|4(?:[0-35689]|[47][017-9])|5(?:[02346-9]|1[017-9]|5[017-9])|6(?:[02-9]|1[0-257-9])|9(?:[089]|31|7[02-9]))|8(?:0(?:[01589]|6[67]|7[02-9])|1(?:[0-57-9]|6[07-9])|2(?:0[07-9]|[14][07-9]|[235-9])|3(?:[03-57-9]|[126][07-9])|[45]|6(?:[02457-9]|[136][07-9])|7(?:[078][07-9]|[1-69])|8(?:[0-25-9]|3[07-9]|4[047-9])|9(?:[02-9]|1[027-9]))|9"]; - [numberFormats0_patternArray addObject:@"600|7(?:0|19[0-5]|2(?:[0235679]|[14][017-9]|8(?:[0-569]|[78][089])|9[389])|3(?:[05-8]|1(?:[089]|7[5-9])|2(?:[5-8]|[0-49][089])|3[017-9]|4(?:[07-9]|11)|9(?:[01689]|[2345][089]|40|7[0189]))|4(?:[056]|1(?:[0135-9]|[23][089]|2[089]|4[089])|2(?:0[089]|[1-7][089]|[89])|3(?:[0-8][089]|9)|4(?:[089]|11|7[02-8])|7(?:[089]|11|7[02-8])|8(?:[0-24-7][089]|[389])|9(?:[0-7][089]|[89]))|5(?:[0346-9]|1[017-9]|2(?:[03-9]|[12][089])|5[017-9])|6(?:[0346-9]|1[0-257-9]|2(?:[0-4]\\d|[5-9][089])|5(?:[0-367][089]|[4589]))|7(?:0(?:[02-9]|1[089])|[1-9])|8(?:[0-79]|8(?:0[0189]|11|8[013-9]|9))|9(?:[089]|313|7(?:[02-8]|9[07-9])))|8(?:0(?:[01589]|6[67]|7(?:[02-8]|9[05-9]))|1(?:[02-57-9]|1(?:[0-35-9]|4[0-46-9])|6(?:[089]|7[02-8]))|2(?:0(?:[089]|7[02])|[14](?:[089]|7[02-8])|[235-9])|3(?:[0357-9]|1(?:[089]|7[02-6])|2(?:[09]|77|8[0-689])|4(?:0[1-7]|[1-9])|6(?:[089]|7[02-7]))|[45]|6(?:[02457-9]|1(?:[089]|7[02-8])|3(?:[089]|7[02-68])|6(?:[08]|7[02-8]|9[01]))|7(?:0[07-9]|[1-69]|7(?:[089]|7[02-8])|8(?:[089]|7[02-8]))|8(?:[0-25-9]|3(?:[089]|7[02-8])|4(?:[0489]|7[02-68]))|9(?:[02-9]|1(?:[0289]|7[2-6])))|9"]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{5})(\\d{5})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:YES withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - - NSMutableArray *numberFormats1_patternArray = [[NSMutableArray alloc] init]; - [numberFormats1_patternArray addObject:@"11|2[02]|33|4[04]|79[1-9]|80[2-46]"]; - NBNumberFormat *numberFormats1 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{2})(\\d{4})(\\d{4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats1_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:YES withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats1]; - - NSMutableArray *numberFormats2_patternArray = [[NSMutableArray alloc] init]; - [numberFormats2_patternArray addObject:@"1(?:2[0-249]|3[0-25]|4[145]|[59][14]|7[1257]|[68][1-9])|2(?:1[257]|3[013]|4[01]|5[0137]|6[0158]|78|8[1568]|9[14])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|3[15]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|[36][25]|22|4[28]|5[12]|[78]1|9[15])|6(?:12|[2-4]1|5[17]|6[13]|7[14]|80)|7(?:12|2[14]|3[134]|4[47]|5[15]|[67]1|88)|8(?:16|2[014]|3[126]|6[136]|7[078]|8[34]|91)"]; - NBNumberFormat *numberFormats2 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{3})(\\d{3})(\\d{4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats2_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:YES withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats2]; - - NSMutableArray *numberFormats3_patternArray = [[NSMutableArray alloc] init]; - [numberFormats3_patternArray addObject:@"1(?:[23579]|[468][1-9])|[2-8]"]; - NBNumberFormat *numberFormats3 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{4})(\\d{3})(\\d{3})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats3_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:YES withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats3]; - - NSMutableArray *numberFormats4_patternArray = [[NSMutableArray alloc] init]; - [numberFormats4_patternArray addObject:@"008"]; - NBNumberFormat *numberFormats4 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{2})(\\d{3})(\\d{4})(\\d{3})" withFormat:@"$1 $2 $3 $4" withLeadingDigitsPatterns:numberFormats4_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:YES withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats4]; - - NSMutableArray *numberFormats5_patternArray = [[NSMutableArray alloc] init]; - [numberFormats5_patternArray addObject:@"140"]; - NBNumberFormat *numberFormats5 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{3})(\\d{3})(\\d{4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats5_patternArray withNationalPrefixFormattingRule:@"$1" whenFormatting:YES withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats5]; - - NSMutableArray *numberFormats6_patternArray = [[NSMutableArray alloc] init]; - [numberFormats6_patternArray addObject:@"160"]; - [numberFormats6_patternArray addObject:@"1600"]; - NBNumberFormat *numberFormats6 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{4})(\\d{2})(\\d{4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats6_patternArray withNationalPrefixFormattingRule:@"$1" whenFormatting:YES withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats6]; - - NSMutableArray *numberFormats7_patternArray = [[NSMutableArray alloc] init]; - [numberFormats7_patternArray addObject:@"180"]; - [numberFormats7_patternArray addObject:@"1800"]; - NBNumberFormat *numberFormats7 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{4})(\\d{4,5})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats7_patternArray withNationalPrefixFormattingRule:@"$1" whenFormatting:YES withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats7]; - - NSMutableArray *numberFormats8_patternArray = [[NSMutableArray alloc] init]; - [numberFormats8_patternArray addObject:@"180"]; - [numberFormats8_patternArray addObject:@"1800"]; - NBNumberFormat *numberFormats8 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{4})(\\d{2,4})(\\d{4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats8_patternArray withNationalPrefixFormattingRule:@"$1" whenFormatting:YES withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats8]; - - NSMutableArray *numberFormats9_patternArray = [[NSMutableArray alloc] init]; - [numberFormats9_patternArray addObject:@"186"]; - [numberFormats9_patternArray addObject:@"1860"]; - NBNumberFormat *numberFormats9 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{4})(\\d{3,4})(\\d{4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats9_patternArray withNationalPrefixFormattingRule:@"$1" whenFormatting:YES withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats9]; - - NSMutableArray *numberFormats10_patternArray = [[NSMutableArray alloc] init]; - [numberFormats10_patternArray addObject:@"18[06]"]; - NBNumberFormat *numberFormats10 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{4})(\\d{3})(\\d{3})(\\d{3})" withFormat:@"$1 $2 $3 $4" withLeadingDigitsPatterns:numberFormats10_patternArray withNationalPrefixFormattingRule:@"$1" whenFormatting:YES withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats10]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = YES; - } - return self; -} -@end - -@implementation NBPhoneMetadataKE -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:7]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:8]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:9]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:10]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"20\\d{6,7}|[4-9]\\d{6,9}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *fixedLine_descArrayPL = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:7]]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:8]]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"20\\d{6,7}|4(?:0\\d{6,7}|[136]\\d{7}|[245]\\d{5,7})|5(?:[08]\\d{7}|[1-79]\\d{5,7})|6(?:[01457-9]\\d{5,7}|2\\d{7}|6\\d{6,7})" withPossibleNumberPattern:nil withPossibleLength:fixedLine_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"202012345" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *mobile_descArrayPL = [[NSMutableArray alloc] init]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"7(?:[0-3679]\\d|4[0-479]|5[0-6]|8[0-25-9])\\d{6}" withPossibleNumberPattern:nil withPossibleLength:mobile_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"712123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:9]]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:10]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"800[24-8]\\d{5,6}" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"800223456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"900[02-9]\\d{5}" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"900223456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"KE"; - self.countryCode = [NSNumber numberWithInteger:254]; - self.internationalPrefix = @"000"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = @"0"; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = @"005|0"; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - [numberFormats0_patternArray addObject:@"[24-6]"]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{2})(\\d{5,7})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - - NSMutableArray *numberFormats1_patternArray = [[NSMutableArray alloc] init]; - [numberFormats1_patternArray addObject:@"7"]; - NBNumberFormat *numberFormats1 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{3})(\\d{6})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats1_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats1]; - - NSMutableArray *numberFormats2_patternArray = [[NSMutableArray alloc] init]; - [numberFormats2_patternArray addObject:@"[89]"]; - NBNumberFormat *numberFormats2 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{3})(\\d{3})(\\d{3,4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats2_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats2]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataLA -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:8]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:9]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:10]]; - - NSMutableArray *generalDesc_descArrayPLLO = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPLLO addObject: [NSNumber numberWithInt:6]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[2-8]\\d{7,9}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:generalDesc_descArrayPLLO withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *fixedLine_descArrayPL = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:8]]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:9]]; - - NSMutableArray *fixedLine_descArrayPLLO = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPLLO addObject: [NSNumber numberWithInt:6]]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:2[13]|3(?:0\\d|[14])|[5-7][14]|41|8[1468])\\d{6}" withPossibleNumberPattern:nil withPossibleLength:fixedLine_descArrayPL withPossibleLengthLocalOnly:fixedLine_descArrayPLLO withExample:@"21212862" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *mobile_descArrayPL = [[NSMutableArray alloc] init]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:10]]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"20(?:2[2389]|5[4-689]|7[6-8]|9[15-9])\\d{6}" withPossibleNumberPattern:nil withPossibleLength:mobile_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"2023123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"LA"; - self.countryCode = [NSNumber numberWithInteger:856]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = @"0"; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = @"0"; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - [numberFormats0_patternArray addObject:@"20"]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(20)(\\d{2})(\\d{3})(\\d{3})" withFormat:@"$1 $2 $3 $4" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - - NSMutableArray *numberFormats1_patternArray = [[NSMutableArray alloc] init]; - [numberFormats1_patternArray addObject:@"2[13]|3[14]|[4-8]"]; - NBNumberFormat *numberFormats1 = [[NBNumberFormat alloc] initWithPattern:@"([2-8]\\d)(\\d{3})(\\d{3})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats1_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats1]; - - NSMutableArray *numberFormats2_patternArray = [[NSMutableArray alloc] init]; - [numberFormats2_patternArray addObject:@"30"]; - NBNumberFormat *numberFormats2 = [[NBNumberFormat alloc] initWithPattern:@"(30)(\\d{2})(\\d{2})(\\d{3})" withFormat:@"$1 $2 $3 $4" withLeadingDigitsPatterns:numberFormats2_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats2]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataIO -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:7]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"3\\d{6}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"37\\d{5}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"3709100" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"38\\d{5}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"3801234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"IO"; - self.countryCode = [NSNumber numberWithInteger:246]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = nil; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = nil; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{3})(\\d{4})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataHT -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:8]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[2-489]\\d{7}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"2(?:2\\d|5[1-5]|81|9[149])\\d{5}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"22453300" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[34]\\d{7}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"34101234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"8\\d{7}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"80012345" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:9(?:[67][0-4]|8[0-3589]|9\\d))\\d{5}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"98901234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"HT"; - self.countryCode = [NSNumber numberWithInteger:509]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = nil; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = nil; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{2})(\\d{2})(\\d{4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataGY -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:7]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[2-46-9]\\d{6}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:2(?:1[6-9]|2[0-35-9]|3[1-4]|5[3-9]|6\\d|7[0-24-79])|3(?:2[25-9]|3\\d)|4(?:4[0-24]|5[56])|77[1-57])\\d{4}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"2201234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"6\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"6091234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:289|862)\\d{4}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"2891234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"9008\\d{3}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"9008123" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"GY"; - self.countryCode = [NSNumber numberWithInteger:592]; - self.internationalPrefix = @"001"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = nil; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = nil; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{3})(\\d{4})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataLB -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:7]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:8]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[13-9]\\d{6,7}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *fixedLine_descArrayPL = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:7]]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:[14-6]\\d{2}|7(?:[2-57]\\d|62|8[0-7]|9[04-9])|8[02-9]\\d|9\\d{2})\\d{4}" withPossibleNumberPattern:nil withPossibleLength:fixedLine_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"1123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:3\\d|7(?:[01]\\d|6[013-9]|8[89]|9[1-3])|81\\d)\\d{5}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"71123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:8]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"9[01]\\d{6}" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"90123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:8]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"80\\d{6}" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"80123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"LB"; - self.countryCode = [NSNumber numberWithInteger:961]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = @"0"; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = @"0"; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - [numberFormats0_patternArray addObject:@"[13-6]|7(?:[2-57]|62|8[0-7]|9[04-9])|8[02-9]|9"]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(\\d)(\\d{3})(\\d{3})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - - NSMutableArray *numberFormats1_patternArray = [[NSMutableArray alloc] init]; - [numberFormats1_patternArray addObject:@"[89][01]|7(?:[01]|6[013-9]|8[89]|9[1-3])"]; - NBNumberFormat *numberFormats1 = [[NBNumberFormat alloc] initWithPattern:@"([7-9]\\d)(\\d{3})(\\d{3})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats1_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats1]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataKG -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:9]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:10]]; - - NSMutableArray *generalDesc_descArrayPLLO = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPLLO addObject: [NSNumber numberWithInt:5]]; - [generalDesc_descArrayPLLO addObject: [NSNumber numberWithInt:6]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[235-8]\\d{8,9}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:generalDesc_descArrayPLLO withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *fixedLine_descArrayPL = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:9]]; - - NSMutableArray *fixedLine_descArrayPLLO = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPLLO addObject: [NSNumber numberWithInt:5]]; - [fixedLine_descArrayPLLO addObject: [NSNumber numberWithInt:6]]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:3(?:1(?:[256]\\d|3[1-9]|47)|2(?:22|3[0-479]|6[0-7])|4(?:22|5[6-9]|6\\d)|5(?:22|3[4-7]|59|6\\d)|6(?:22|5[35-7]|6\\d)|7(?:22|3[468]|4[1-9]|59|[67]\\d)|9(?:22|4[1-8]|6\\d))|6(?:09|12|2[2-4])\\d)\\d{5}" withPossibleNumberPattern:nil withPossibleLength:fixedLine_descArrayPL withPossibleLengthLocalOnly:fixedLine_descArrayPLLO withExample:@"312123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *mobile_descArrayPL = [[NSMutableArray alloc] init]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:20[0-35]|5[124-7]\\d|7[07]\\d)\\d{6}" withPossibleNumberPattern:nil withPossibleLength:mobile_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"700123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"800\\d{6,7}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"800123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"KG"; - self.countryCode = [NSNumber numberWithInteger:996]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = @"0"; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = @"0"; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - [numberFormats0_patternArray addObject:@"[25-7]|31[25]"]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{3})(\\d{3})(\\d{3})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - - NSMutableArray *numberFormats1_patternArray = [[NSMutableArray alloc] init]; - [numberFormats1_patternArray addObject:@"3(?:1[36]|[2-9])"]; - NBNumberFormat *numberFormats1 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{4})(\\d{5})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats1_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats1]; - - NSMutableArray *numberFormats2_patternArray = [[NSMutableArray alloc] init]; - [numberFormats2_patternArray addObject:@"8"]; - NBNumberFormat *numberFormats2 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{3})(\\d{3})(\\d)(\\d{3})" withFormat:@"$1 $2 $3 $4" withLeadingDigitsPatterns:numberFormats2_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats2]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataHU -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:8]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:9]]; - - NSMutableArray *generalDesc_descArrayPLLO = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPLLO addObject: [NSNumber numberWithInt:6]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[1-9]\\d{7,8}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:generalDesc_descArrayPLLO withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *fixedLine_descArrayPL = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:8]]; - - NSMutableArray *fixedLine_descArrayPLLO = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPLLO addObject: [NSNumber numberWithInt:6]]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:1\\d|2[2-9]|3[2-7]|4[24-9]|5[2-79]|6[23689]|7[2-9]|8[2-57-9]|9[2-69])\\d{6}" withPossibleNumberPattern:nil withPossibleLength:fixedLine_descArrayPL withPossibleLengthLocalOnly:fixedLine_descArrayPLLO withExample:@"12345678" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *mobile_descArrayPL = [[NSMutableArray alloc] init]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:[257]0|3[01])\\d{7}" withPossibleNumberPattern:nil withPossibleLength:mobile_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"201234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:8]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[48]0\\d{6}" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"80123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:8]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"9[01]\\d{6}" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"90123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"21\\d{7}" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"211234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"38\\d{7}" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"381234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:8]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[48]0\\d{6}" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"80123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"HU"; - self.countryCode = [NSNumber numberWithInteger:36]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = @"06"; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = @"06"; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - [numberFormats0_patternArray addObject:@"1"]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(1)(\\d{3})(\\d{4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:@"($1)" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - - NSMutableArray *numberFormats1_patternArray = [[NSMutableArray alloc] init]; - [numberFormats1_patternArray addObject:@"[2-9]"]; - NBNumberFormat *numberFormats1 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{2})(\\d{3})(\\d{3,4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats1_patternArray withNationalPrefixFormattingRule:@"($1)" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats1]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataLC -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:10]]; - - NSMutableArray *generalDesc_descArrayPLLO = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPLLO addObject: [NSNumber numberWithInt:7]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[5789]\\d{9}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:generalDesc_descArrayPLLO withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *fixedLine_descArrayPLLO = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPLLO addObject: [NSNumber numberWithInt:7]]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"758(?:4(?:30|5[0-9]|6[2-9]|8[0-2])|57[0-2]|638)\\d{4}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:fixedLine_descArrayPLLO withExample:@"7584305678" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *mobile_descArrayPLLO = [[NSMutableArray alloc] init]; - [mobile_descArrayPLLO addObject: [NSNumber numberWithInt:7]]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"758(?:28[4-7]|384|4(?:6[01]|8[4-9])|5(?:1[89]|20|84)|7(?:1[2-9]|2[0-8]))\\d{4}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:mobile_descArrayPLLO withExample:@"7582845678" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"8(?:00|33|44|55|66|77|88)[2-9]\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"8002123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"900[2-9]\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"9002123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"5(?:00|22|33|44|66|77|88)[2-9]\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"5002345678" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"LC"; - self.countryCode = [NSNumber numberWithInteger:1]; - self.internationalPrefix = @"011"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = @"1"; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = @"1"; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = @"758"; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataIQ -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:8]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:9]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:10]]; - - NSMutableArray *generalDesc_descArrayPLLO = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPLLO addObject: [NSNumber numberWithInt:6]]; - [generalDesc_descArrayPLLO addObject: [NSNumber numberWithInt:7]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[1-7]\\d{7,9}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:generalDesc_descArrayPLLO withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *fixedLine_descArrayPL = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:8]]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:9]]; - - NSMutableArray *fixedLine_descArrayPLLO = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPLLO addObject: [NSNumber numberWithInt:6]]; - [fixedLine_descArrayPLLO addObject: [NSNumber numberWithInt:7]]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"1\\d{7}|(?:2[13-5]|3[02367]|4[023]|5[03]|6[026])\\d{6,7}" withPossibleNumberPattern:nil withPossibleLength:fixedLine_descArrayPL withPossibleLengthLocalOnly:fixedLine_descArrayPLLO withExample:@"12345678" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *mobile_descArrayPL = [[NSMutableArray alloc] init]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:10]]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"7[3-9]\\d{8}" withPossibleNumberPattern:nil withPossibleLength:mobile_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"7912345678" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"IQ"; - self.countryCode = [NSNumber numberWithInteger:964]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = @"0"; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = @"0"; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - [numberFormats0_patternArray addObject:@"1"]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(1)(\\d{3})(\\d{4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - - NSMutableArray *numberFormats1_patternArray = [[NSMutableArray alloc] init]; - [numberFormats1_patternArray addObject:@"[2-6]"]; - NBNumberFormat *numberFormats1 = [[NBNumberFormat alloc] initWithPattern:@"([2-6]\\d)(\\d{3})(\\d{3,4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats1_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats1]; - - NSMutableArray *numberFormats2_patternArray = [[NSMutableArray alloc] init]; - [numberFormats2_patternArray addObject:@"7"]; - NBNumberFormat *numberFormats2 = [[NBNumberFormat alloc] initWithPattern:@"(7\\d{2})(\\d{3})(\\d{4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats2_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats2]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataKH -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:8]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:9]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:10]]; - - NSMutableArray *generalDesc_descArrayPLLO = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPLLO addObject: [NSNumber numberWithInt:6]]; - [generalDesc_descArrayPLLO addObject: [NSNumber numberWithInt:7]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[1-9]\\d{7,9}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:generalDesc_descArrayPLLO withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *fixedLine_descArrayPL = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:8]]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:9]]; - - NSMutableArray *fixedLine_descArrayPLLO = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPLLO addObject: [NSNumber numberWithInt:6]]; - [fixedLine_descArrayPLLO addObject: [NSNumber numberWithInt:7]]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:2[3-6]|3[2-6]|4[2-4]|[5-7][2-5])(?:[237-9]|4[56]|5\\d|6\\d?)\\d{5}|23(?:4[234]|8\\d{2})\\d{4}" withPossibleNumberPattern:nil withPossibleLength:fixedLine_descArrayPL withPossibleLengthLocalOnly:fixedLine_descArrayPLLO withExample:@"23756789" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *mobile_descArrayPL = [[NSMutableArray alloc] init]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:8]]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:1(?:[013-79]\\d|[28]\\d{1,2})|2[3-6]48|3(?:[18]\\d{2}|[2-6]48)|4[2-4]48|5[2-5]48|6(?:[016-9]\\d|[2-5]48)|7(?:[07-9]\\d|[16]\\d{2}|[2-5]48)|8(?:[013-79]\\d|8\\d{2})|9(?:6\\d{2}|7\\d{1,2}|[0-589]\\d))\\d{5}" withPossibleNumberPattern:nil withPossibleLength:mobile_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"91234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:10]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"1800(?:1\\d|2[019])\\d{4}" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"1800123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:10]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"1900(?:1\\d|2[09])\\d{4}" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"1900123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"KH"; - self.countryCode = [NSNumber numberWithInteger:855]; - self.internationalPrefix = @"00[14-9]"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = @"0"; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = @"0"; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - [numberFormats0_patternArray addObject:@"1\\d[1-9]|[2-9]"]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{2})(\\d{3})(\\d{3,4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - - NSMutableArray *numberFormats1_patternArray = [[NSMutableArray alloc] init]; - [numberFormats1_patternArray addObject:@"1[89]0"]; - NBNumberFormat *numberFormats1 = [[NBNumberFormat alloc] initWithPattern:@"(1[89]00)(\\d{3})(\\d{3})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats1_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats1]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataJM -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:10]]; - - NSMutableArray *generalDesc_descArrayPLLO = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPLLO addObject: [NSNumber numberWithInt:7]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[589]\\d{9}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:generalDesc_descArrayPLLO withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *fixedLine_descArrayPLLO = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPLLO addObject: [NSNumber numberWithInt:7]]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"876(?:5(?:0[12]|1[0-468]|2[35]|63)|6(?:0[1-3579]|1[027-9]|[23]\\d|40|5[06]|6[2-589]|7[05]|8[04]|9[4-9])|7(?:0[2-689]|[1-6]\\d|8[056]|9[45])|9(?:0[1-8]|1[02378]|[2-8]\\d|9[2-468]))\\d{4}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:fixedLine_descArrayPLLO withExample:@"8765123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *mobile_descArrayPLLO = [[NSMutableArray alloc] init]; - [mobile_descArrayPLLO addObject: [NSNumber numberWithInt:7]]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"876(?:2(?:[16-9]\\d|58)|[348]\\d{2}|5(?:0[3-9]|2[0-246-9]|6[0-24-9]|[3-578]\\d)|7(?:0[07]|7\\d|8[1-47-9]|9[0-36-9])|9(?:[01]9|9[0579]))\\d{4}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:mobile_descArrayPLLO withExample:@"8762101234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"8(?:00|33|44|55|66|77|88)[2-9]\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"8002123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"900[2-9]\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"9002123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"5(?:00|22|33|44|66|77|88)[2-9]\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"5002345678" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"JM"; - self.countryCode = [NSNumber numberWithInteger:1]; - self.internationalPrefix = @"011"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = @"1"; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = @"1"; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = @"876"; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataIR -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:4]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:5]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:6]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:7]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:8]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:9]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:10]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[1-8]\\d{9}|9(?:[0-4]\\d{8}|9\\d{2,8})" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *fixedLine_descArrayPL = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:10]]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:(?:1[137]|2[13-68]|3[1458]|4[145]|5[1468]|6[16]|7[1467]|8[13467])\\d{3}|94(?:000|2\\d{2}))\\d{5}" withPossibleNumberPattern:nil withPossibleLength:fixedLine_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"2123456789" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *mobile_descArrayPL = [[NSMutableArray alloc] init]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:10]]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"9(?:0[1-3]|[1-3]\\d|90)\\d{7}" withPossibleNumberPattern:nil withPossibleLength:mobile_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"9123456789" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:10]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:[2-6]0\\d|993)\\d{7}" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"9932123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:10]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"943\\d{7}" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"9432123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"9990\\d{0,6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"9990123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"IR"; - self.countryCode = [NSNumber numberWithInteger:98]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = @"0"; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = @"0"; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - [numberFormats0_patternArray addObject:@"21"]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(21)(\\d{3,5})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - - NSMutableArray *numberFormats1_patternArray = [[NSMutableArray alloc] init]; - [numberFormats1_patternArray addObject:@"[1-8]"]; - NBNumberFormat *numberFormats1 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{2})(\\d{4})(\\d{4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats1_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats1]; - - NSMutableArray *numberFormats2_patternArray = [[NSMutableArray alloc] init]; - [numberFormats2_patternArray addObject:@"9"]; - NBNumberFormat *numberFormats2 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{3})(\\d{3})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats2_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats2]; - - NSMutableArray *numberFormats3_patternArray = [[NSMutableArray alloc] init]; - [numberFormats3_patternArray addObject:@"9"]; - NBNumberFormat *numberFormats3 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{3})(\\d{2})(\\d{2,3})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats3_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats3]; - - NSMutableArray *numberFormats4_patternArray = [[NSMutableArray alloc] init]; - [numberFormats4_patternArray addObject:@"9"]; - NBNumberFormat *numberFormats4 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{3})(\\d{3})(\\d{3,4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats4_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats4]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataKI -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:5]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:8]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[2458]\\d{4}|3\\d{4,7}|7\\d{7}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:[24]\\d|3[1-9]|50|8[0-5])\\d{3}|7(?:27|31|5[0-4])\\d{5}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"31234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *mobile_descArrayPL = [[NSMutableArray alloc] init]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:8]]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"7[23]0\\d{5}" withPossibleNumberPattern:nil withPossibleLength:mobile_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"72012345" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:8]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"30(?:0[01]\\d{2}|12(?:11|20))\\d{2}" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"30010000" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"KI"; - self.countryCode = [NSNumber numberWithInteger:686]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = nil; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = @"0"; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataIS -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:7]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[4-9]\\d{6}|38\\d{7}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *fixedLine_descArrayPL = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:7]]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:4(?:1[0-24-69]|2[0-7]|[37][0-8]|4[0-245]|5[0-68]|6\\d|8[0-36-8])|5(?:05|[156]\\d|2[02578]|3[0-79]|4[03-7]|7[0-2578]|8[0-35-9]|9[013-689])|87[23])\\d{4}" withPossibleNumberPattern:nil withPossibleLength:fixedLine_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"4101234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"38[589]\\d{6}|(?:6(?:1[1-8]|2[0-6]|3[027-9]|4[014679]|5[0159]|[67][0-69]|9\\d)|7(?:5[057]|[6-8]\\d)|8(?:2[0-59]|3[0-4]|[469]\\d|5[1-9]|88))\\d{4}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"6111234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:7]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"800\\d{4}" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"8001234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:7]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"90\\d{5}" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"9011234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:7]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"49\\d{5}" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"4921234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:7]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"809\\d{4}" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"8091234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:7]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:6(?:2[78]|49|8\\d)|8(?:7[0189]|80)|95[48])\\d{4}" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"6271234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"IS"; - self.countryCode = [NSNumber numberWithInteger:354]; - self.internationalPrefix = @"1(?:0(?:01|10|20)|100)|00"; - self.preferredInternationalPrefix = @"00"; - self.nationalPrefix = nil; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = nil; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - [numberFormats0_patternArray addObject:@"[4-9]"]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{3})(\\d{4})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - - NSMutableArray *numberFormats1_patternArray = [[NSMutableArray alloc] init]; - [numberFormats1_patternArray addObject:@"3"]; - NBNumberFormat *numberFormats1 = [[NBNumberFormat alloc] initWithPattern:@"(3\\d{2})(\\d{3})(\\d{3})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats1_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats1]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataMA -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[5-9]\\d{8}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"5(?:2(?:[015-79]\\d|2[02-9]|3[2-57]|4[2-8]|8[235-7])\\d|3(?:[0-48]\\d|[57][2-9]|6[2-8]|9[3-9])\\d|4[067]\\d{2}|5[03]\\d{2})\\d{4}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"520123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:6(?:[0-79]\\d|8[0-247-9])|7(?:[07][07]|6[12]))\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"650123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"80\\d{7}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"801234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"89\\d{7}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"891234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"5924[01]\\d{4}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"592401234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"MA"; - self.countryCode = [NSNumber numberWithInteger:212]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = @"0"; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = @"0"; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - [numberFormats0_patternArray addObject:@"5(?:2[015-7]|3[0-4])|[67]"]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"([5-7]\\d{2})(\\d{6})" withFormat:@"$1-$2" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - - NSMutableArray *numberFormats1_patternArray = [[NSMutableArray alloc] init]; - [numberFormats1_patternArray addObject:@"5(?:2[2-489]|3[5-9]|92)|892"]; - [numberFormats1_patternArray addObject:@"5(?:2(?:[2-48]|9[0-7])|3(?:[5-79]|8[0-7])|924)|892"]; - NBNumberFormat *numberFormats1 = [[NBNumberFormat alloc] initWithPattern:@"([58]\\d{3})(\\d{5})" withFormat:@"$1-$2" withLeadingDigitsPatterns:numberFormats1_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats1]; - - NSMutableArray *numberFormats2_patternArray = [[NSMutableArray alloc] init]; - [numberFormats2_patternArray addObject:@"5(?:29|38)"]; - [numberFormats2_patternArray addObject:@"5(?:29|38)[89]"]; - NBNumberFormat *numberFormats2 = [[NBNumberFormat alloc] initWithPattern:@"(5\\d{4})(\\d{4})" withFormat:@"$1-$2" withLeadingDigitsPatterns:numberFormats2_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats2]; - - NSMutableArray *numberFormats3_patternArray = [[NSMutableArray alloc] init]; - [numberFormats3_patternArray addObject:@"5(?:4[067]|5[03])"]; - NBNumberFormat *numberFormats3 = [[NBNumberFormat alloc] initWithPattern:@"([5]\\d{2})(\\d{2})(\\d{2})(\\d{2})" withFormat:@"$1 $2 $3 $4" withLeadingDigitsPatterns:numberFormats3_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats3]; - - NSMutableArray *numberFormats4_patternArray = [[NSMutableArray alloc] init]; - [numberFormats4_patternArray addObject:@"8(?:0|9[013-9])"]; - NBNumberFormat *numberFormats4 = [[NBNumberFormat alloc] initWithPattern:@"(8[09])(\\d{7})" withFormat:@"$1-$2" withLeadingDigitsPatterns:numberFormats4_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats4]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = YES; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataJO -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:8]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[235-9]\\d{7,8}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *fixedLine_descArrayPL = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:8]]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:2(?:6(?:2[0-35-9]|3[0-57-8]|4[24-7]|5[0-24-8]|[6-8][023]|9[0-3])|7(?:0[1-79]|10|2[014-7]|3[0-689]|4[019]|5[0-3578]))|32(?:0[1-69]|1[1-35-7]|2[024-7]|3\\d|4[0-3]|[57][023]|6[03])|53(?:0[0-3]|[13][023]|2[0-59]|49|5[0-35-9]|6[15]|7[45]|8[1-6]|9[0-36-9])|6(?:2[50]0|3(?:00|33)|4(?:0[0125]|1[2-7]|2[0569]|[38][07-9]|4[025689]|6[0-589]|7\\d|9[0-2])|5(?:[01][056]|2[034]|3[0-57-9]|4[17-8]|5[0-69]|6[0-35-9]|7[1-379]|8[0-68]|9[02-39]))|87(?:[02]0|7[08]|90))\\d{4}" withPossibleNumberPattern:nil withPossibleLength:fixedLine_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"62001234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *mobile_descArrayPL = [[NSMutableArray alloc] init]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"7(?:55|7[025-9]|8[0-25-9]|9[0-25-9])\\d{6}" withPossibleNumberPattern:nil withPossibleLength:mobile_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"790123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:8]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"80\\d{6}" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"80012345" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:8]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"900\\d{5}" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"90012345" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:8]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"85\\d{6}" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"85012345" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"70\\d{7}" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"700123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"74(?:66|77)\\d{5}" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"746612345" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:8]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"8(?:10|8\\d)\\d{5}" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"88101234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"JO"; - self.countryCode = [NSNumber numberWithInteger:962]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = @"0"; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = @"0"; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - [numberFormats0_patternArray addObject:@"[2356]|87"]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(\\d)(\\d{3})(\\d{4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:@"(0$1)" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - - NSMutableArray *numberFormats1_patternArray = [[NSMutableArray alloc] init]; - [numberFormats1_patternArray addObject:@"7[457-9]"]; - NBNumberFormat *numberFormats1 = [[NBNumberFormat alloc] initWithPattern:@"(7)(\\d{4})(\\d{4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats1_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats1]; - - NSMutableArray *numberFormats2_patternArray = [[NSMutableArray alloc] init]; - [numberFormats2_patternArray addObject:@"70|8[0158]|9"]; - NBNumberFormat *numberFormats2 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{3})(\\d{5,6})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats2_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats2]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataIT -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:6]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:7]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:8]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:9]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:10]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:11]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[01589]\\d{5,10}|3(?:[12457-9]\\d{8}|[36]\\d{7,9})" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"0(?:[26]\\d{4,9}|(?:1(?:[0159]\\d|[27][1-5]|31|4[1-4]|6[1356]|8[2-57])|3(?:[0159]\\d|2[1-4]|3[12]|[48][1-6]|6[2-59]|7[1-7])|4(?:[0159]\\d|[23][1-9]|4[245]|6[1-5]|7[1-4]|81)|5(?:[0159]\\d|2[1-5]|3[2-6]|4[1-79]|6[4-6]|7[1-578]|8[3-8])|7(?:[0159]\\d|2[12]|3[1-7]|4[2346]|6[13569]|7[13-6]|8[1-59])|8(?:[0159]\\d|2[34578]|3[1-356]|[6-8][1-5])|9(?:[0159]\\d|[238][1-5]|4[12]|6[1-8]|7[1-6]))\\d{2,7})" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"0212345678" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *mobile_descArrayPL = [[NSMutableArray alloc] init]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:9]]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:10]]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:11]]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"3(?:[12457-9]\\d{8}|6\\d{7,8}|3\\d{7,9})" withPossibleNumberPattern:nil withPossibleLength:mobile_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"3123456789" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:6]]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"80(?:0\\d{6}|3\\d{3})" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"800123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:6]]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:8]]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:9]]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:10]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"0878\\d{5}|1(?:44|6[346])\\d{6}|89(?:2\\d{3}|4(?:[0-4]\\d{2}|[5-9]\\d{4})|5(?:[0-4]\\d{2}|[5-9]\\d{6})|9\\d{6})" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"899123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:6]]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"84(?:[08]\\d{6}|[17]\\d{3})" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"848123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:9]]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:10]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"1(?:78\\d|99)\\d{6}" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"1781234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:10]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"55\\d{8}" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"5512345678" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"848\\d{6}" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"848123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"IT"; - self.countryCode = [NSNumber numberWithInteger:39]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = nil; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = nil; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - [numberFormats0_patternArray addObject:@"0[26]|55"]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{2})(\\d{3,4})(\\d{4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - - NSMutableArray *numberFormats1_patternArray = [[NSMutableArray alloc] init]; - [numberFormats1_patternArray addObject:@"0[26]"]; - NBNumberFormat *numberFormats1 = [[NBNumberFormat alloc] initWithPattern:@"(0[26])(\\d{4})(\\d{5})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats1_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats1]; - - NSMutableArray *numberFormats2_patternArray = [[NSMutableArray alloc] init]; - [numberFormats2_patternArray addObject:@"0[26]"]; - NBNumberFormat *numberFormats2 = [[NBNumberFormat alloc] initWithPattern:@"(0[26])(\\d{4,6})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats2_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats2]; - - NSMutableArray *numberFormats3_patternArray = [[NSMutableArray alloc] init]; - [numberFormats3_patternArray addObject:@"0[13-57-9][0159]"]; - NBNumberFormat *numberFormats3 = [[NBNumberFormat alloc] initWithPattern:@"(0\\d{2})(\\d{3,4})(\\d{4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats3_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats3]; - - NSMutableArray *numberFormats4_patternArray = [[NSMutableArray alloc] init]; - [numberFormats4_patternArray addObject:@"0[13-57-9][0159]|8(?:03|4[17]|9[245])"]; - [numberFormats4_patternArray addObject:@"0[13-57-9][0159]|8(?:03|4[17]|9(?:2|[45][0-4]))"]; - NBNumberFormat *numberFormats4 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{3})(\\d{3,6})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats4_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats4]; - - NSMutableArray *numberFormats5_patternArray = [[NSMutableArray alloc] init]; - [numberFormats5_patternArray addObject:@"0[13-57-9][2-46-8]"]; - NBNumberFormat *numberFormats5 = [[NBNumberFormat alloc] initWithPattern:@"(0\\d{3})(\\d{3})(\\d{4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats5_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats5]; - - NSMutableArray *numberFormats6_patternArray = [[NSMutableArray alloc] init]; - [numberFormats6_patternArray addObject:@"0[13-57-9][2-46-8]"]; - NBNumberFormat *numberFormats6 = [[NBNumberFormat alloc] initWithPattern:@"(0\\d{3})(\\d{2,6})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats6_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats6]; - - NSMutableArray *numberFormats7_patternArray = [[NSMutableArray alloc] init]; - [numberFormats7_patternArray addObject:@"[13]|8(?:00|4[08]|9[59])"]; - [numberFormats7_patternArray addObject:@"[13]|8(?:00|4[08]|9(?:5[5-9]|9))"]; - NBNumberFormat *numberFormats7 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{3})(\\d{3})(\\d{3,4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats7_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats7]; - - NSMutableArray *numberFormats8_patternArray = [[NSMutableArray alloc] init]; - [numberFormats8_patternArray addObject:@"894"]; - [numberFormats8_patternArray addObject:@"894[5-9]"]; - NBNumberFormat *numberFormats8 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{4})(\\d{4})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats8_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats8]; - - NSMutableArray *numberFormats9_patternArray = [[NSMutableArray alloc] init]; - [numberFormats9_patternArray addObject:@"3"]; - NBNumberFormat *numberFormats9 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{3})(\\d{4})(\\d{4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats9_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats9]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = YES; - self.leadingDigits = nil; - self.leadingZeroPossible = YES; - } - return self; -} -@end - -@implementation NBPhoneMetadataJP -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:8]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:9]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:10]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:11]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:12]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:13]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:14]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:15]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:16]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:17]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[1-9]\\d{8,9}|00(?:[36]\\d{7,14}|7\\d{5,7}|8\\d{7})" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *fixedLine_descArrayPL = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:1(?:1[235-8]|2[3-6]|3[3-9]|4[2-6]|[58][2-8]|6[2-7]|7[2-9]|9[1-9])|2[2-9]\\d|[36][1-9]\\d|4(?:6[02-8]|[2-578]\\d|9[2-59])|5(?:6[1-9]|7[2-8]|[2-589]\\d)|7(?:3[4-9]|4[02-9]|[25-9]\\d)|8(?:3[2-9]|4[5-9]|5[1-9]|8[03-9]|[2679]\\d)|9(?:[679][1-9]|[2-58]\\d))\\d{6}" withPossibleNumberPattern:nil withPossibleLength:fixedLine_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"312345678" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *mobile_descArrayPL = [[NSMutableArray alloc] init]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:10]]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[7-9]0[1-9]\\d{7}" withPossibleNumberPattern:nil withPossibleLength:mobile_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"9012345678" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"120\\d{6}|800\\d{7}|00(?:37\\d{6,13}|66\\d{6,13}|777(?:[01]\\d{2}|5\\d{3}|8\\d{4})|882[1245]\\d{4})" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"120123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"990\\d{6}" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"990123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"60\\d{7}" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"601234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:10]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"50[1-9]\\d{7}" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"5012345678" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:10]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"20\\d{8}" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"2012345678" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"570\\d{6}" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"570123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"00(?:37\\d{6,13}|66\\d{6,13}|777(?:[01]\\d{2}|5\\d{3}|8\\d{4})|882[1245]\\d{4})" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"00777012" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"JP"; - self.countryCode = [NSNumber numberWithInteger:81]; - self.internationalPrefix = @"010"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = @"0"; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = @"0"; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - [numberFormats0_patternArray addObject:@"(?:12|57|99)0"]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{3})(\\d{3})(\\d{3})" withFormat:@"$1-$2-$3" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - - NSMutableArray *numberFormats1_patternArray = [[NSMutableArray alloc] init]; - [numberFormats1_patternArray addObject:@"800"]; - NBNumberFormat *numberFormats1 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{3})(\\d{3})(\\d{4})" withFormat:@"$1-$2-$3" withLeadingDigitsPatterns:numberFormats1_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats1]; - - NSMutableArray *numberFormats2_patternArray = [[NSMutableArray alloc] init]; - [numberFormats2_patternArray addObject:@"0077"]; - NBNumberFormat *numberFormats2 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{4})(\\d{4})" withFormat:@"$1-$2" withLeadingDigitsPatterns:numberFormats2_patternArray withNationalPrefixFormattingRule:@"$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats2]; - - NSMutableArray *numberFormats3_patternArray = [[NSMutableArray alloc] init]; - [numberFormats3_patternArray addObject:@"0077"]; - NBNumberFormat *numberFormats3 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{4})(\\d{2})(\\d{3,4})" withFormat:@"$1-$2-$3" withLeadingDigitsPatterns:numberFormats3_patternArray withNationalPrefixFormattingRule:@"$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats3]; - - NSMutableArray *numberFormats4_patternArray = [[NSMutableArray alloc] init]; - [numberFormats4_patternArray addObject:@"0088"]; - NBNumberFormat *numberFormats4 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{4})(\\d{2})(\\d{4})" withFormat:@"$1-$2-$3" withLeadingDigitsPatterns:numberFormats4_patternArray withNationalPrefixFormattingRule:@"$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats4]; - - NSMutableArray *numberFormats5_patternArray = [[NSMutableArray alloc] init]; - [numberFormats5_patternArray addObject:@"00(?:37|66)"]; - NBNumberFormat *numberFormats5 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{4})(\\d{3})(\\d{3,4})" withFormat:@"$1-$2-$3" withLeadingDigitsPatterns:numberFormats5_patternArray withNationalPrefixFormattingRule:@"$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats5]; - - NSMutableArray *numberFormats6_patternArray = [[NSMutableArray alloc] init]; - [numberFormats6_patternArray addObject:@"00(?:37|66)"]; - NBNumberFormat *numberFormats6 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{4})(\\d{4})(\\d{4,5})" withFormat:@"$1-$2-$3" withLeadingDigitsPatterns:numberFormats6_patternArray withNationalPrefixFormattingRule:@"$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats6]; - - NSMutableArray *numberFormats7_patternArray = [[NSMutableArray alloc] init]; - [numberFormats7_patternArray addObject:@"00(?:37|66)"]; - NBNumberFormat *numberFormats7 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{4})(\\d{5})(\\d{5,6})" withFormat:@"$1-$2-$3" withLeadingDigitsPatterns:numberFormats7_patternArray withNationalPrefixFormattingRule:@"$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats7]; - - NSMutableArray *numberFormats8_patternArray = [[NSMutableArray alloc] init]; - [numberFormats8_patternArray addObject:@"00(?:37|66)"]; - NBNumberFormat *numberFormats8 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{4})(\\d{6})(\\d{6,7})" withFormat:@"$1-$2-$3" withLeadingDigitsPatterns:numberFormats8_patternArray withNationalPrefixFormattingRule:@"$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats8]; - - NSMutableArray *numberFormats9_patternArray = [[NSMutableArray alloc] init]; - [numberFormats9_patternArray addObject:@"[2579]0|80[1-9]"]; - NBNumberFormat *numberFormats9 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{2})(\\d{4})(\\d{4})" withFormat:@"$1-$2-$3" withLeadingDigitsPatterns:numberFormats9_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats9]; - - NSMutableArray *numberFormats10_patternArray = [[NSMutableArray alloc] init]; - [numberFormats10_patternArray addObject:@"1(?:26|3[79]|4[56]|5[4-68]|6[3-5])|5(?:76|97)|499|746|8(?:3[89]|63|47|51)|9(?:49|80|9[16])"]; - [numberFormats10_patternArray addObject:@"1(?:267|3(?:7[247]|9[278])|4(?:5[67]|66)|5(?:47|58|64|8[67])|6(?:3[245]|48|5[4-68]))|5(?:76|97)9|499[2468]|7468|8(?:3(?:8[78]|96)|636|477|51[24])|9(?:496|802|9(?:1[23]|69))"]; - [numberFormats10_patternArray addObject:@"1(?:267|3(?:7[247]|9[278])|4(?:5[67]|66)|5(?:47|58|64|8[67])|6(?:3[245]|48|5[4-68]))|5(?:769|979[2-69])|499[2468]|7468|8(?:3(?:8[78]|96[2457-9])|636[2-57-9]|477|51[24])|9(?:496|802|9(?:1[23]|69))"]; - NBNumberFormat *numberFormats10 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{4})(\\d)(\\d{4})" withFormat:@"$1-$2-$3" withLeadingDigitsPatterns:numberFormats10_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats10]; - - NSMutableArray *numberFormats11_patternArray = [[NSMutableArray alloc] init]; - [numberFormats11_patternArray addObject:@"1(?:2[3-6]|3[3-9]|4[2-6]|5[2-8]|[68][2-7]|7[2-689]|9[1-578])|2(?:2[03-689]|3[3-58]|4[0-468]|5[04-8]|6[013-8]|7[06-9]|8[02-57-9]|9[13])|4(?:2[28]|3[689]|6[035-7]|7[05689]|80|9[3-5])|5(?:3[1-36-9]|4[4578]|5[013-8]|6[1-9]|7[2-8]|8[14-7]|9[4-9])|7(?:2[15]|3[5-9]|4[02-9]|6[135-8]|7[0-4689]|9[014-9])|8(?:2[49]|3[3-8]|4[5-8]|5[2-9]|6[35-9]|7[579]|8[03-579]|9[2-8])|9(?:[23]0|4[02-46-9]|5[024-79]|6[4-9]|7[2-47-9]|8[02-7]|9[3-7])"]; - [numberFormats11_patternArray addObject:@"1(?:2[3-6]|3[3-9]|4[2-6]|5(?:[236-8]|[45][2-69])|[68][2-7]|7[2-689]|9[1-578])|2(?:2(?:[04-689]|3[23])|3[3-58]|4[0-468]|5(?:5[78]|7[2-4]|[0468][2-9])|6(?:[0135-8]|4[2-5])|7(?:[0679]|8[2-7])|8(?:[024578]|3[25-9]|9[6-9])|9(?:11|3[2-4]))|4(?:2(?:2[2-9]|8[237-9])|3[689]|6[035-7]|7(?:[059][2-8]|[68])|80|9[3-5])|5(?:3[1-36-9]|4[4578]|5[013-8]|6[1-9]|7[2-8]|8[14-7]|9(?:[89][2-8]|[4-7]))|7(?:2[15]|3[5-9]|4[02-9]|6[135-8]|7[0-4689]|9(?:[017-9]|4[6-8]|5[2-478]|6[2-589]))|8(?:2(?:4[4-8]|9[2-8])|3(?:7[2-6]|[3-6][2-9]|8[2-5])|4[5-8]|5[2-9]|6(?:[37]|5[4-7]|6[2-9]|8[2-8]|9[236-9])|7[579]|8[03-579]|9[2-8])|9(?:[23]0|4[02-46-9]|5[024-79]|6[4-9]|7[2-47-9]|8[02-7]|9(?:3[34]|[4-7]))"]; - [numberFormats11_patternArray addObject:@"1(?:2[3-6]|3[3-9]|4[2-6]|5(?:[236-8]|[45][2-69])|[68][2-7]|7[2-689]|9[1-578])|2(?:2(?:[04-689]|3[23])|3[3-58]|4[0-468]|5(?:5[78]|7[2-4]|[0468][2-9])|6(?:[0135-8]|4[2-5])|7(?:[0679]|8[2-7])|8(?:[024578]|3[25-9]|9[6-9])|9(?:11|3[2-4]))|4(?:2(?:2[2-9]|8[237-9])|3[689]|6[035-7]|7(?:[059][2-8]|[68])|80|9[3-5])|5(?:3[1-36-9]|4[4578]|5[013-8]|6[1-9]|7[2-8]|8[14-7]|9(?:[89][2-8]|[4-7]))|7(?:2[15]|3[5-9]|4[02-9]|6[135-8]|7[0-4689]|9(?:[017-9]|4[6-8]|5[2-478]|6[2-589]))|8(?:2(?:4[4-8]|9(?:[3578]|20|4[04-9]|6[56]))|3(?:7(?:[2-5]|6[0-59])|[3-6][2-9]|8[2-5])|4[5-8]|5[2-9]|6(?:[37]|5(?:[467]|5[014-9])|6(?:[2-8]|9[02-69])|8[2-8]|9(?:[236-8]|9[23]))|7[579]|8[03-579]|9[2-8])|9(?:[23]0|4[02-46-9]|5[024-79]|6[4-9]|7[2-47-9]|8[02-7]|9(?:3(?:3[02-9]|4[0-24689])|4[2-69]|[5-7]))"]; - [numberFormats11_patternArray addObject:@"1(?:2[3-6]|3[3-9]|4[2-6]|5(?:[236-8]|[45][2-69])|[68][2-7]|7[2-689]|9[1-578])|2(?:2(?:[04-689]|3[23])|3[3-58]|4[0-468]|5(?:5[78]|7[2-4]|[0468][2-9])|6(?:[0135-8]|4[2-5])|7(?:[0679]|8[2-7])|8(?:[024578]|3[25-9]|9[6-9])|9(?:11|3[2-4]))|4(?:2(?:2[2-9]|8[237-9])|3[689]|6[035-7]|7(?:[059][2-8]|[68])|80|9[3-5])|5(?:3[1-36-9]|4[4578]|5[013-8]|6[1-9]|7[2-8]|8[14-7]|9(?:[89][2-8]|[4-7]))|7(?:2[15]|3[5-9]|4[02-9]|6[135-8]|7[0-4689]|9(?:[017-9]|4[6-8]|5[2-478]|6[2-589]))|8(?:2(?:4[4-8]|9(?:[3578]|20|4[04-9]|6(?:5[25]|60)))|3(?:7(?:[2-5]|6[0-59])|[3-6][2-9]|8[2-5])|4[5-8]|5[2-9]|6(?:[37]|5(?:[467]|5[014-9])|6(?:[2-8]|9[02-69])|8[2-8]|9(?:[236-8]|9[23]))|7[579]|8[03-579]|9[2-8])|9(?:[23]0|4[02-46-9]|5[024-79]|6[4-9]|7[2-47-9]|8[02-7]|9(?:3(?:3[02-9]|4[0-24689])|4[2-69]|[5-7]))"]; - NBNumberFormat *numberFormats11 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{3})(\\d{2})(\\d{4})" withFormat:@"$1-$2-$3" withLeadingDigitsPatterns:numberFormats11_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats11]; - - NSMutableArray *numberFormats12_patternArray = [[NSMutableArray alloc] init]; - [numberFormats12_patternArray addObject:@"1|2(?:2[37]|5[5-9]|64|78|8[39]|91)|4(?:2[2689]|64|7[347])|5(?:[2-589]|39)|60|8(?:[46-9]|3[279]|2[124589])|9(?:[235-8]|93)"]; - [numberFormats12_patternArray addObject:@"1|2(?:2[37]|5(?:[57]|[68]0|9[19])|64|78|8[39]|917)|4(?:2(?:[68]|20|9[178])|64|7[347])|5(?:[2-589]|39[67])|60|8(?:[46-9]|3[279]|2[124589])|9(?:[235-8]|93[34])"]; - [numberFormats12_patternArray addObject:@"1|2(?:2[37]|5(?:[57]|[68]0|9(?:17|99))|64|78|8[39]|917)|4(?:2(?:[68]|20|9[178])|64|7[347])|5(?:[2-589]|39[67])|60|8(?:[46-9]|3[279]|2[124589])|9(?:[235-8]|93(?:31|4))"]; - NBNumberFormat *numberFormats12 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{2})(\\d{3})(\\d{4})" withFormat:@"$1-$2-$3" withLeadingDigitsPatterns:numberFormats12_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats12]; - - NSMutableArray *numberFormats13_patternArray = [[NSMutableArray alloc] init]; - [numberFormats13_patternArray addObject:@"2(?:9[14-79]|74|[34]7|[56]9)|82|993"]; - NBNumberFormat *numberFormats13 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{3})(\\d{2})(\\d{4})" withFormat:@"$1-$2-$3" withLeadingDigitsPatterns:numberFormats13_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats13]; - - NSMutableArray *numberFormats14_patternArray = [[NSMutableArray alloc] init]; - [numberFormats14_patternArray addObject:@"3|4(?:2[09]|7[01])|6[1-9]"]; - NBNumberFormat *numberFormats14 = [[NBNumberFormat alloc] initWithPattern:@"(\\d)(\\d{4})(\\d{4})" withFormat:@"$1-$2-$3" withLeadingDigitsPatterns:numberFormats14_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats14]; - - NSMutableArray *numberFormats15_patternArray = [[NSMutableArray alloc] init]; - [numberFormats15_patternArray addObject:@"[2479][1-9]"]; - NBNumberFormat *numberFormats15 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{2})(\\d{3})(\\d{4})" withFormat:@"$1-$2-$3" withLeadingDigitsPatterns:numberFormats15_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats15]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *intlNumberFormats0_patternArray = [[NSMutableArray alloc] init]; - [intlNumberFormats0_patternArray addObject:@"(?:12|57|99)0"]; - NBNumberFormat *intlNumberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{3})(\\d{3})(\\d{3})" withFormat:@"$1-$2-$3" withLeadingDigitsPatterns:intlNumberFormats0_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [intlNumberFormats_FormatArray addObject:intlNumberFormats0]; - - NSMutableArray *intlNumberFormats1_patternArray = [[NSMutableArray alloc] init]; - [intlNumberFormats1_patternArray addObject:@"800"]; - NBNumberFormat *intlNumberFormats1 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{3})(\\d{3})(\\d{4})" withFormat:@"$1-$2-$3" withLeadingDigitsPatterns:intlNumberFormats1_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [intlNumberFormats_FormatArray addObject:intlNumberFormats1]; - - NSMutableArray *intlNumberFormats2_patternArray = [[NSMutableArray alloc] init]; - [intlNumberFormats2_patternArray addObject:@"[2579]0|80[1-9]"]; - NBNumberFormat *intlNumberFormats2 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{2})(\\d{4})(\\d{4})" withFormat:@"$1-$2-$3" withLeadingDigitsPatterns:intlNumberFormats2_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [intlNumberFormats_FormatArray addObject:intlNumberFormats2]; - - NSMutableArray *intlNumberFormats3_patternArray = [[NSMutableArray alloc] init]; - [intlNumberFormats3_patternArray addObject:@"1(?:26|3[79]|4[56]|5[4-68]|6[3-5])|5(?:76|97)|499|746|8(?:3[89]|63|47|51)|9(?:49|80|9[16])"]; - [intlNumberFormats3_patternArray addObject:@"1(?:267|3(?:7[247]|9[278])|4(?:5[67]|66)|5(?:47|58|64|8[67])|6(?:3[245]|48|5[4-68]))|5(?:76|97)9|499[2468]|7468|8(?:3(?:8[78]|96)|636|477|51[24])|9(?:496|802|9(?:1[23]|69))"]; - [intlNumberFormats3_patternArray addObject:@"1(?:267|3(?:7[247]|9[278])|4(?:5[67]|66)|5(?:47|58|64|8[67])|6(?:3[245]|48|5[4-68]))|5(?:769|979[2-69])|499[2468]|7468|8(?:3(?:8[78]|96[2457-9])|636[2-57-9]|477|51[24])|9(?:496|802|9(?:1[23]|69))"]; - NBNumberFormat *intlNumberFormats3 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{4})(\\d)(\\d{4})" withFormat:@"$1-$2-$3" withLeadingDigitsPatterns:intlNumberFormats3_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [intlNumberFormats_FormatArray addObject:intlNumberFormats3]; - - NSMutableArray *intlNumberFormats4_patternArray = [[NSMutableArray alloc] init]; - [intlNumberFormats4_patternArray addObject:@"1(?:2[3-6]|3[3-9]|4[2-6]|5[2-8]|[68][2-7]|7[2-689]|9[1-578])|2(?:2[03-689]|3[3-58]|4[0-468]|5[04-8]|6[013-8]|7[06-9]|8[02-57-9]|9[13])|4(?:2[28]|3[689]|6[035-7]|7[05689]|80|9[3-5])|5(?:3[1-36-9]|4[4578]|5[013-8]|6[1-9]|7[2-8]|8[14-7]|9[4-9])|7(?:2[15]|3[5-9]|4[02-9]|6[135-8]|7[0-4689]|9[014-9])|8(?:2[49]|3[3-8]|4[5-8]|5[2-9]|6[35-9]|7[579]|8[03-579]|9[2-8])|9(?:[23]0|4[02-46-9]|5[024-79]|6[4-9]|7[2-47-9]|8[02-7]|9[3-7])"]; - [intlNumberFormats4_patternArray addObject:@"1(?:2[3-6]|3[3-9]|4[2-6]|5(?:[236-8]|[45][2-69])|[68][2-7]|7[2-689]|9[1-578])|2(?:2(?:[04-689]|3[23])|3[3-58]|4[0-468]|5(?:5[78]|7[2-4]|[0468][2-9])|6(?:[0135-8]|4[2-5])|7(?:[0679]|8[2-7])|8(?:[024578]|3[25-9]|9[6-9])|9(?:11|3[2-4]))|4(?:2(?:2[2-9]|8[237-9])|3[689]|6[035-7]|7(?:[059][2-8]|[68])|80|9[3-5])|5(?:3[1-36-9]|4[4578]|5[013-8]|6[1-9]|7[2-8]|8[14-7]|9(?:[89][2-8]|[4-7]))|7(?:2[15]|3[5-9]|4[02-9]|6[135-8]|7[0-4689]|9(?:[017-9]|4[6-8]|5[2-478]|6[2-589]))|8(?:2(?:4[4-8]|9[2-8])|3(?:7[2-6]|[3-6][2-9]|8[2-5])|4[5-8]|5[2-9]|6(?:[37]|5[4-7]|6[2-9]|8[2-8]|9[236-9])|7[579]|8[03-579]|9[2-8])|9(?:[23]0|4[02-46-9]|5[024-79]|6[4-9]|7[2-47-9]|8[02-7]|9(?:3[34]|[4-7]))"]; - [intlNumberFormats4_patternArray addObject:@"1(?:2[3-6]|3[3-9]|4[2-6]|5(?:[236-8]|[45][2-69])|[68][2-7]|7[2-689]|9[1-578])|2(?:2(?:[04-689]|3[23])|3[3-58]|4[0-468]|5(?:5[78]|7[2-4]|[0468][2-9])|6(?:[0135-8]|4[2-5])|7(?:[0679]|8[2-7])|8(?:[024578]|3[25-9]|9[6-9])|9(?:11|3[2-4]))|4(?:2(?:2[2-9]|8[237-9])|3[689]|6[035-7]|7(?:[059][2-8]|[68])|80|9[3-5])|5(?:3[1-36-9]|4[4578]|5[013-8]|6[1-9]|7[2-8]|8[14-7]|9(?:[89][2-8]|[4-7]))|7(?:2[15]|3[5-9]|4[02-9]|6[135-8]|7[0-4689]|9(?:[017-9]|4[6-8]|5[2-478]|6[2-589]))|8(?:2(?:4[4-8]|9(?:[3578]|20|4[04-9]|6[56]))|3(?:7(?:[2-5]|6[0-59])|[3-6][2-9]|8[2-5])|4[5-8]|5[2-9]|6(?:[37]|5(?:[467]|5[014-9])|6(?:[2-8]|9[02-69])|8[2-8]|9(?:[236-8]|9[23]))|7[579]|8[03-579]|9[2-8])|9(?:[23]0|4[02-46-9]|5[024-79]|6[4-9]|7[2-47-9]|8[02-7]|9(?:3(?:3[02-9]|4[0-24689])|4[2-69]|[5-7]))"]; - [intlNumberFormats4_patternArray addObject:@"1(?:2[3-6]|3[3-9]|4[2-6]|5(?:[236-8]|[45][2-69])|[68][2-7]|7[2-689]|9[1-578])|2(?:2(?:[04-689]|3[23])|3[3-58]|4[0-468]|5(?:5[78]|7[2-4]|[0468][2-9])|6(?:[0135-8]|4[2-5])|7(?:[0679]|8[2-7])|8(?:[024578]|3[25-9]|9[6-9])|9(?:11|3[2-4]))|4(?:2(?:2[2-9]|8[237-9])|3[689]|6[035-7]|7(?:[059][2-8]|[68])|80|9[3-5])|5(?:3[1-36-9]|4[4578]|5[013-8]|6[1-9]|7[2-8]|8[14-7]|9(?:[89][2-8]|[4-7]))|7(?:2[15]|3[5-9]|4[02-9]|6[135-8]|7[0-4689]|9(?:[017-9]|4[6-8]|5[2-478]|6[2-589]))|8(?:2(?:4[4-8]|9(?:[3578]|20|4[04-9]|6(?:5[25]|60)))|3(?:7(?:[2-5]|6[0-59])|[3-6][2-9]|8[2-5])|4[5-8]|5[2-9]|6(?:[37]|5(?:[467]|5[014-9])|6(?:[2-8]|9[02-69])|8[2-8]|9(?:[236-8]|9[23]))|7[579]|8[03-579]|9[2-8])|9(?:[23]0|4[02-46-9]|5[024-79]|6[4-9]|7[2-47-9]|8[02-7]|9(?:3(?:3[02-9]|4[0-24689])|4[2-69]|[5-7]))"]; - NBNumberFormat *intlNumberFormats4 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{3})(\\d{2})(\\d{4})" withFormat:@"$1-$2-$3" withLeadingDigitsPatterns:intlNumberFormats4_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [intlNumberFormats_FormatArray addObject:intlNumberFormats4]; - - NSMutableArray *intlNumberFormats5_patternArray = [[NSMutableArray alloc] init]; - [intlNumberFormats5_patternArray addObject:@"1|2(?:2[37]|5[5-9]|64|78|8[39]|91)|4(?:2[2689]|64|7[347])|5(?:[2-589]|39)|60|8(?:[46-9]|3[279]|2[124589])|9(?:[235-8]|93)"]; - [intlNumberFormats5_patternArray addObject:@"1|2(?:2[37]|5(?:[57]|[68]0|9[19])|64|78|8[39]|917)|4(?:2(?:[68]|20|9[178])|64|7[347])|5(?:[2-589]|39[67])|60|8(?:[46-9]|3[279]|2[124589])|9(?:[235-8]|93[34])"]; - [intlNumberFormats5_patternArray addObject:@"1|2(?:2[37]|5(?:[57]|[68]0|9(?:17|99))|64|78|8[39]|917)|4(?:2(?:[68]|20|9[178])|64|7[347])|5(?:[2-589]|39[67])|60|8(?:[46-9]|3[279]|2[124589])|9(?:[235-8]|93(?:31|4))"]; - NBNumberFormat *intlNumberFormats5 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{2})(\\d{3})(\\d{4})" withFormat:@"$1-$2-$3" withLeadingDigitsPatterns:intlNumberFormats5_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [intlNumberFormats_FormatArray addObject:intlNumberFormats5]; - - NSMutableArray *intlNumberFormats6_patternArray = [[NSMutableArray alloc] init]; - [intlNumberFormats6_patternArray addObject:@"2(?:9[14-79]|74|[34]7|[56]9)|82|993"]; - NBNumberFormat *intlNumberFormats6 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{3})(\\d{2})(\\d{4})" withFormat:@"$1-$2-$3" withLeadingDigitsPatterns:intlNumberFormats6_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [intlNumberFormats_FormatArray addObject:intlNumberFormats6]; - - NSMutableArray *intlNumberFormats7_patternArray = [[NSMutableArray alloc] init]; - [intlNumberFormats7_patternArray addObject:@"3|4(?:2[09]|7[01])|6[1-9]"]; - NBNumberFormat *intlNumberFormats7 = [[NBNumberFormat alloc] initWithPattern:@"(\\d)(\\d{4})(\\d{4})" withFormat:@"$1-$2-$3" withLeadingDigitsPatterns:intlNumberFormats7_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [intlNumberFormats_FormatArray addObject:intlNumberFormats7]; - - NSMutableArray *intlNumberFormats8_patternArray = [[NSMutableArray alloc] init]; - [intlNumberFormats8_patternArray addObject:@"[2479][1-9]"]; - NBNumberFormat *intlNumberFormats8 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{2})(\\d{3})(\\d{4})" withFormat:@"$1-$2-$3" withLeadingDigitsPatterns:intlNumberFormats8_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [intlNumberFormats_FormatArray addObject:intlNumberFormats8]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = YES; - } - return self; -} -@end - -@implementation NBPhoneMetadataMC -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:8]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[34689]\\d{7,8}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *fixedLine_descArrayPL = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:8]]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"870\\d{5}|9[2-47-9]\\d{6}" withPossibleNumberPattern:nil withPossibleLength:fixedLine_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"99123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"3\\d{7}|4(?:4\\d|5[1-9])\\d{5}|6\\d{8}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"612345678" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:8]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"90\\d{6}" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"90123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:8]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"870\\d{5}" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"87012345" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"MC"; - self.countryCode = [NSNumber numberWithInteger:377]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = @"0"; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = @"0"; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - [numberFormats0_patternArray addObject:@"[39]"]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{2})(\\d{2})(\\d{2})(\\d{2})" withFormat:@"$1 $2 $3 $4" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:@"$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - - NSMutableArray *numberFormats1_patternArray = [[NSMutableArray alloc] init]; - [numberFormats1_patternArray addObject:@"4"]; - NBNumberFormat *numberFormats1 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{2})(\\d{3})(\\d{3})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats1_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats1]; - - NSMutableArray *numberFormats2_patternArray = [[NSMutableArray alloc] init]; - [numberFormats2_patternArray addObject:@"6"]; - NBNumberFormat *numberFormats2 = [[NBNumberFormat alloc] initWithPattern:@"(6)(\\d{2})(\\d{2})(\\d{2})(\\d{2})" withFormat:@"$1 $2 $3 $4 $5" withLeadingDigitsPatterns:numberFormats2_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats2]; - - NSMutableArray *numberFormats3_patternArray = [[NSMutableArray alloc] init]; - [numberFormats3_patternArray addObject:@"8"]; - NBNumberFormat *numberFormats3 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{3})(\\d{3})(\\d{2})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats3_patternArray withNationalPrefixFormattingRule:@"$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats3]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataKM -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:7]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[3478]\\d{6}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"7[4-7]\\d{5}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"7712345" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[34]\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"3212345" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:39[01]|8\\d{2})\\d{4}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"8001234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"KM"; - self.countryCode = [NSNumber numberWithInteger:269]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = nil; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = nil; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{3})(\\d{2})(\\d{2})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataMD -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:8]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[235-9]\\d{7}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:2[1-9]\\d|3[1-79]\\d|5(?:33|5[257]))\\d{5}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"22212345" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:562|6\\d{2}|7(?:[189]\\d|6[07]|7[457-9]))\\d{5}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"62112345" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"800\\d{5}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"80012345" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"90[056]\\d{5}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"90012345" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"808\\d{5}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"80812345" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"3[08]\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"30123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"803\\d{5}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"80312345" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"MD"; - self.countryCode = [NSNumber numberWithInteger:373]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = @"0"; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = @"0"; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - [numberFormats0_patternArray addObject:@"22|3"]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{2})(\\d{3})(\\d{3})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - - NSMutableArray *numberFormats1_patternArray = [[NSMutableArray alloc] init]; - [numberFormats1_patternArray addObject:@"2[13-9]|[5-7]"]; - NBNumberFormat *numberFormats1 = [[NBNumberFormat alloc] initWithPattern:@"([25-7]\\d{2})(\\d{2})(\\d{3})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats1_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats1]; - - NSMutableArray *numberFormats2_patternArray = [[NSMutableArray alloc] init]; - [numberFormats2_patternArray addObject:@"[89]"]; - NBNumberFormat *numberFormats2 = [[NBNumberFormat alloc] initWithPattern:@"([89]\\d{2})(\\d{5})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats2_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats2]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataLI -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:7]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"6\\d{8}|[23789]\\d{6}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *fixedLine_descArrayPL = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:7]]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:2(?:01|1[27]|3\\d|6[02-578]|96)|3(?:7[0135-7]|8[048]|9[0269]))\\d{4}" withPossibleNumberPattern:nil withPossibleLength:fixedLine_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"2345678" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"6(?:5(?:09|1\\d|20)|6(?:0[0-6]|10|2[06-9]|39))\\d{5}|7(?:[37-9]\\d|42|56)\\d{4}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"660234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:7]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"80(?:02[28]|9\\d{2})\\d{2}" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"8002222" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:7]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"90(?:02[258]|1(?:23|3[14])|66[136])\\d{2}" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"9002222" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:7]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"870(?:28|87)\\d{2}" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"8702812" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"697(?:42|56|[78]\\d)\\d{4}" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"697861234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"LI"; - self.countryCode = [NSNumber numberWithInteger:423]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = @"0"; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = @"0|10(?:01|20|66)"; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - [numberFormats0_patternArray addObject:@"[23789]"]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{3})(\\d{2})(\\d{2})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - - NSMutableArray *numberFormats1_patternArray = [[NSMutableArray alloc] init]; - [numberFormats1_patternArray addObject:@"6[56]"]; - NBNumberFormat *numberFormats1 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{3})(\\d{3})(\\d{3})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats1_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats1]; - - NSMutableArray *numberFormats2_patternArray = [[NSMutableArray alloc] init]; - [numberFormats2_patternArray addObject:@"697"]; - NBNumberFormat *numberFormats2 = [[NBNumberFormat alloc] initWithPattern:@"(69)(7\\d{2})(\\d{4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats2_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats2]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadata881 -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[67]\\d{8}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *fixedLine_descArrayPL = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:fixedLine_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[67]\\d{8}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"612345678" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"001"; - self.countryCode = [NSNumber numberWithInteger:881]; - self.internationalPrefix = nil; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = nil; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = nil; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - [numberFormats0_patternArray addObject:@"[67]"]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(\\d)(\\d{3})(\\d{5})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataKN -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:10]]; - - NSMutableArray *generalDesc_descArrayPLLO = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPLLO addObject: [NSNumber numberWithInt:7]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[589]\\d{9}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:generalDesc_descArrayPLLO withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *fixedLine_descArrayPLLO = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPLLO addObject: [NSNumber numberWithInt:7]]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"869(?:2(?:29|36)|302|4(?:6[015-9]|70))\\d{4}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:fixedLine_descArrayPLLO withExample:@"8692361234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *mobile_descArrayPLLO = [[NSMutableArray alloc] init]; - [mobile_descArrayPLLO addObject: [NSNumber numberWithInt:7]]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"869(?:5(?:5[6-8]|6[5-7])|66\\d|76[02-7])\\d{4}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:mobile_descArrayPLLO withExample:@"8697652917" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"8(?:00|33|44|55|66|77|88)[2-9]\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"8002123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"900[2-9]\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"9002123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"5(?:00|22|33|44|66|77|88)[2-9]\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"5002345678" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"KN"; - self.countryCode = [NSNumber numberWithInteger:1]; - self.internationalPrefix = @"011"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = @"1"; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = @"1"; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = @"869"; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataME -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:8]]; - - NSMutableArray *generalDesc_descArrayPLLO = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPLLO addObject: [NSNumber numberWithInt:6]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[2-9]\\d{7,8}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:generalDesc_descArrayPLLO withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *fixedLine_descArrayPLLO = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPLLO addObject: [NSNumber numberWithInt:6]]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:20[2-8]|3(?:0[2-7]|[12][235-7]|3[24-7])|4(?:0[2-467]|1[267])|5(?:0[2467]|1[267]|2[2367]))\\d{5}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:fixedLine_descArrayPLLO withExample:@"30234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"6(?:00\\d|3[024]\\d|6[0-25]\\d|[7-9]\\d{2})\\d{4}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"67622901" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"80[0-258]\\d{5}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"80080002" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:9(?:4[1568]|5[178]))\\d{5}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"94515151" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"78[1-49]\\d{5}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"78108780" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"77[1-9]\\d{5}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"77273012" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"ME"; - self.countryCode = [NSNumber numberWithInteger:382]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = @"0"; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = @"0"; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - [numberFormats0_patternArray addObject:@"[2-57-9]|6[036-9]"]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{2})(\\d{3})(\\d{3})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataNA -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:8]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[68]\\d{7,8}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"6(?:1(?:17|2(?:[0189]\\d|[2-6]|7\\d?)|3(?:[01378]|2\\d)|4(?:[024]|10?|3[15]?)|69|7[014])|2(?:17|5(?:[0-36-8]|4\\d?)|69|70)|3(?:17|2(?:[0237]\\d?|[14-689])|34|6[289]|7[01]|81)|4(?:17|2(?:[012]|7\\d?)|4(?:[06]|1\\d?)|5(?:[01357]|[25]\\d?)|69|7[01])|5(?:17|2(?:[0459]|[23678]\\d?)|69|7[01])|6(?:17|2(?:5|6\\d?)|38|42|69|7[01])|7(?:17|2(?:[569]|[234]\\d?)|3(?:0\\d?|[13])|6[89]|7[01]))\\d{4}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"61221234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *mobile_descArrayPL = [[NSMutableArray alloc] init]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:60|8[125])\\d{7}" withPossibleNumberPattern:nil withPossibleLength:mobile_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"811234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"8701\\d{5}" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"870123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"8(?:3\\d{2}|86)\\d{5}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"88612345" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"NA"; - self.countryCode = [NSNumber numberWithInteger:264]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = @"0"; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = @"0"; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - [numberFormats0_patternArray addObject:@"8[1235]"]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(8\\d)(\\d{3})(\\d{4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - - NSMutableArray *numberFormats1_patternArray = [[NSMutableArray alloc] init]; - [numberFormats1_patternArray addObject:@"6"]; - NBNumberFormat *numberFormats1 = [[NBNumberFormat alloc] initWithPattern:@"(6\\d)(\\d{3})(\\d{3,4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats1_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats1]; - - NSMutableArray *numberFormats2_patternArray = [[NSMutableArray alloc] init]; - [numberFormats2_patternArray addObject:@"88"]; - NBNumberFormat *numberFormats2 = [[NBNumberFormat alloc] initWithPattern:@"(88)(\\d{3})(\\d{3})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats2_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats2]; - - NSMutableArray *numberFormats3_patternArray = [[NSMutableArray alloc] init]; - [numberFormats3_patternArray addObject:@"870"]; - NBNumberFormat *numberFormats3 = [[NBNumberFormat alloc] initWithPattern:@"(870)(\\d{3})(\\d{3})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats3_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats3]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataMF -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[56]\\d{8}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"590(?:[02][79]|13|5[0-268]|[78]7)\\d{4}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"590271234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"690(?:0[0-7]|[1-9]\\d)\\d{4}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"690301234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"MF"; - self.countryCode = [NSNumber numberWithInteger:590]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = @"0"; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = @"0"; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataLK -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:9]]; - - NSMutableArray *generalDesc_descArrayPLLO = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPLLO addObject: [NSNumber numberWithInt:7]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[1-9]\\d{8}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:generalDesc_descArrayPLLO withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *fixedLine_descArrayPLLO = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPLLO addObject: [NSNumber numberWithInt:7]]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:[189]1|2[13-7]|3[1-8]|4[157]|5[12457]|6[35-7])[2-57]\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:fixedLine_descArrayPLLO withExample:@"112345678" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"7[0125-8]\\d{7}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"712345678" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"LK"; - self.countryCode = [NSNumber numberWithInteger:94]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = @"0"; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = @"0"; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - [numberFormats0_patternArray addObject:@"[1-689]"]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{2})(\\d{1})(\\d{6})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - - NSMutableArray *numberFormats1_patternArray = [[NSMutableArray alloc] init]; - [numberFormats1_patternArray addObject:@"7"]; - NBNumberFormat *numberFormats1 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{2})(\\d{3})(\\d{4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats1_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats1]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadata882 -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:7]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:8]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:9]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:10]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:11]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:12]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[13]\\d{6,11}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *fixedLine_descArrayPL = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:fixedLine_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *mobile_descArrayPL = [[NSMutableArray alloc] init]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:7]]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:9]]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:10]]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"3(?:2\\d{3}|37\\d{2}|4(?:2|7\\d{3}))\\d{4}" withPossibleNumberPattern:nil withPossibleLength:mobile_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"3421234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"1(?:3(?:0[0347]|[13][0139]|2[035]|4[013568]|6[0459]|7[06]|8[15678]|9[0689])\\d{4}|6\\d{5,10})|3(?:45|9\\d{3})\\d{7}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"390123456789" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:11]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"348[57]\\d{7}" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"34851234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"001"; - self.countryCode = [NSNumber numberWithInteger:882]; - self.internationalPrefix = nil; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = nil; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = nil; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - [numberFormats0_patternArray addObject:@"3[23]"]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{2})(\\d{4})(\\d{3})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - - NSMutableArray *numberFormats1_patternArray = [[NSMutableArray alloc] init]; - [numberFormats1_patternArray addObject:@"16|342"]; - NBNumberFormat *numberFormats1 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{2})(\\d{5})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats1_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats1]; - - NSMutableArray *numberFormats2_patternArray = [[NSMutableArray alloc] init]; - [numberFormats2_patternArray addObject:@"34[57]"]; - NBNumberFormat *numberFormats2 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{2})(\\d{4})(\\d{4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats2_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats2]; - - NSMutableArray *numberFormats3_patternArray = [[NSMutableArray alloc] init]; - [numberFormats3_patternArray addObject:@"348"]; - NBNumberFormat *numberFormats3 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{3})(\\d{4})(\\d{4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats3_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats3]; - - NSMutableArray *numberFormats4_patternArray = [[NSMutableArray alloc] init]; - [numberFormats4_patternArray addObject:@"1"]; - NBNumberFormat *numberFormats4 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{2})(\\d{2})(\\d{4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats4_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats4]; - - NSMutableArray *numberFormats5_patternArray = [[NSMutableArray alloc] init]; - [numberFormats5_patternArray addObject:@"16"]; - NBNumberFormat *numberFormats5 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{2})(\\d{3,4})(\\d{4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats5_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats5]; - - NSMutableArray *numberFormats6_patternArray = [[NSMutableArray alloc] init]; - [numberFormats6_patternArray addObject:@"16|39"]; - NBNumberFormat *numberFormats6 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{2})(\\d{4,5})(\\d{5})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats6_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats6]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataKP -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:8]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:10]]; - - NSMutableArray *generalDesc_descArrayPLLO = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPLLO addObject: [NSNumber numberWithInt:6]]; - [generalDesc_descArrayPLLO addObject: [NSNumber numberWithInt:7]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"1\\d{9}|[28]\\d{7}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:generalDesc_descArrayPLLO withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *fixedLine_descArrayPL = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:8]]; - - NSMutableArray *fixedLine_descArrayPLLO = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPLLO addObject: [NSNumber numberWithInt:6]]; - [fixedLine_descArrayPLLO addObject: [NSNumber numberWithInt:7]]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"2\\d{7}|85\\d{6}" withPossibleNumberPattern:nil withPossibleLength:fixedLine_descArrayPL withPossibleLengthLocalOnly:fixedLine_descArrayPLLO withExample:@"21234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *mobile_descArrayPL = [[NSMutableArray alloc] init]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:10]]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"19[123]\\d{7}" withPossibleNumberPattern:nil withPossibleLength:mobile_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"1921234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:8]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"2(?:[0-24-9]\\d{2}|3(?:[0-79]\\d|8[02-9]))\\d{4}" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"23821234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"KP"; - self.countryCode = [NSNumber numberWithInteger:850]; - self.internationalPrefix = @"00|99"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = @"0"; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = @"0"; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - [numberFormats0_patternArray addObject:@"1"]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{3})(\\d{3})(\\d{4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - - NSMutableArray *numberFormats1_patternArray = [[NSMutableArray alloc] init]; - [numberFormats1_patternArray addObject:@"2"]; - NBNumberFormat *numberFormats1 = [[NBNumberFormat alloc] initWithPattern:@"(\\d)(\\d{3})(\\d{4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats1_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats1]; - - NSMutableArray *numberFormats2_patternArray = [[NSMutableArray alloc] init]; - [numberFormats2_patternArray addObject:@"8"]; - NBNumberFormat *numberFormats2 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{2})(\\d{3})(\\d{3})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats2_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats2]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataMG -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:9]]; - - NSMutableArray *generalDesc_descArrayPLLO = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPLLO addObject: [NSNumber numberWithInt:7]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[23]\\d{8}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:generalDesc_descArrayPLLO withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *fixedLine_descArrayPLLO = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPLLO addObject: [NSNumber numberWithInt:7]]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"20(?:2\\d{2}|4[47]\\d|5[3467]\\d|6[279]\\d|7(?:2[29]|[35]\\d)|8[268]\\d|9[245]\\d)\\d{4}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:fixedLine_descArrayPLLO withExample:@"202123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"3[2-49]\\d{7}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"321234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"22\\d{7}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"221234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"MG"; - self.countryCode = [NSNumber numberWithInteger:261]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = @"0"; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = @"0"; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"([23]\\d)(\\d{2})(\\d{3})(\\d{2})" withFormat:@"$1 $2 $3 $4" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataNC -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:6]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[2-57-9]\\d{5}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:2[03-9]|3[0-5]|4[1-7]|88)\\d{4}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"201234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:5[0-4]|[79]\\d|8[0-79])\\d{4}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"751234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"36\\d{4}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"366711" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"NC"; - self.countryCode = [NSNumber numberWithInteger:687]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = nil; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = nil; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - [numberFormats0_patternArray addObject:@"[2-46-9]|5[0-4]"]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{2})(\\d{2})(\\d{2})" withFormat:@"$1.$2.$3" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataMH -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:7]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[2-6]\\d{6}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:247|528|625)\\d{4}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"2471234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:235|329|45[56]|545)\\d{4}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"2351234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"635\\d{4}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"6351234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"MH"; - self.countryCode = [NSNumber numberWithInteger:692]; - self.internationalPrefix = @"011"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = @"1"; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = @"1"; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{3})(\\d{4})" withFormat:@"$1-$2" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadata883 -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:9]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:12]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"51\\d{7}(?:\\d{3})?" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *fixedLine_descArrayPL = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:fixedLine_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *mobile_descArrayPL = [[NSMutableArray alloc] init]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:mobile_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"51(?:00\\d{5}(?:\\d{3})?|[13]0\\d{8})" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"510012345" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"001"; - self.countryCode = [NSNumber numberWithInteger:883]; - self.internationalPrefix = nil; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = nil; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = nil; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = YES; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - [numberFormats0_patternArray addObject:@"510"]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{3})(\\d{3})(\\d{3})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - - NSMutableArray *numberFormats1_patternArray = [[NSMutableArray alloc] init]; - [numberFormats1_patternArray addObject:@"510"]; - NBNumberFormat *numberFormats1 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{3})(\\d{3})(\\d{3})(\\d{3})" withFormat:@"$1 $2 $3 $4" withLeadingDigitsPatterns:numberFormats1_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats1]; - - NSMutableArray *numberFormats2_patternArray = [[NSMutableArray alloc] init]; - [numberFormats2_patternArray addObject:@"51[13]"]; - NBNumberFormat *numberFormats2 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{4})(\\d{4})(\\d{4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats2_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats2]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataKR -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:4]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:5]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:6]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:8]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:9]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:10]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:12]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:13]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:14]]; - - NSMutableArray *generalDesc_descArrayPLLO = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPLLO addObject: [NSNumber numberWithInt:3]]; - [generalDesc_descArrayPLLO addObject: [NSNumber numberWithInt:7]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"007\\d{9,11}|[1-7]\\d{3,9}|8\\d{8}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:generalDesc_descArrayPLLO withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *fixedLine_descArrayPL = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:4]]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:5]]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:6]]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:8]]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:9]]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:10]]; - - NSMutableArray *fixedLine_descArrayPLLO = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPLLO addObject: [NSNumber numberWithInt:3]]; - [fixedLine_descArrayPLLO addObject: [NSNumber numberWithInt:7]]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:2|3[1-3]|[46][1-4]|5[1-5])(?:1\\d{2,3}|[1-9]\\d{6,7})" withPossibleNumberPattern:nil withPossibleLength:fixedLine_descArrayPL withPossibleLengthLocalOnly:fixedLine_descArrayPLLO withExample:@"22123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *mobile_descArrayPL = [[NSMutableArray alloc] init]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:9]]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:10]]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"1[0-26-9]\\d{7,8}" withPossibleNumberPattern:nil withPossibleLength:mobile_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"1000000000" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:9]]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:12]]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:13]]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:14]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:00798\\d{0,2}|80)\\d{7}" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"801234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"60[2-9]\\d{6}" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"602345678" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:10]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"50\\d{8}" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"5012345678" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:10]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"70\\d{8}" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"7012345678" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:9]]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:10]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"15\\d{7,8}" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"1523456789" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:8]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"1(?:5(?:22|44|66|77|88|99)|6(?:00|44|6[16]|70|88)|8(?:00|33|55|77|99))\\d{4}" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"15441234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:12]]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:13]]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:14]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"00798\\d{7,9}" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"007981234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"KR"; - self.countryCode = [NSNumber numberWithInteger:82]; - self.internationalPrefix = @"00(?:[124-68]|3\\d{2}|7(?:[0-8]\\d|9[0-79]))"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = @"0"; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = @"0(8[1-46-8]|85\\d{2})?"; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - [numberFormats0_patternArray addObject:@"00798"]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{5})(\\d{3,4})(\\d{4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:@"$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:@"0$CC-$1"]; - [numberFormats_FormatArray addObject:numberFormats0]; - - NSMutableArray *numberFormats1_patternArray = [[NSMutableArray alloc] init]; - [numberFormats1_patternArray addObject:@"00798"]; - NBNumberFormat *numberFormats1 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{5})(\\d{2})(\\d{3})(\\d{4})" withFormat:@"$1 $2 $3 $4" withLeadingDigitsPatterns:numberFormats1_patternArray withNationalPrefixFormattingRule:@"$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:@"0$CC-$1"]; - [numberFormats_FormatArray addObject:numberFormats1]; - - NSMutableArray *numberFormats2_patternArray = [[NSMutableArray alloc] init]; - [numberFormats2_patternArray addObject:@"1(?:0|1[19]|[69]9|5[458])|[57]0"]; - [numberFormats2_patternArray addObject:@"1(?:0|1[19]|[69]9|5(?:44|59|8))|[57]0"]; - NBNumberFormat *numberFormats2 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{2})(\\d{4})(\\d{4})" withFormat:@"$1-$2-$3" withLeadingDigitsPatterns:numberFormats2_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:@"0$CC-$1"]; - [numberFormats_FormatArray addObject:numberFormats2]; - - NSMutableArray *numberFormats3_patternArray = [[NSMutableArray alloc] init]; - [numberFormats3_patternArray addObject:@"1(?:[01]|5[1-4]|6[2-8]|[7-9])|[68]0|[3-6][1-9][1-9]"]; - [numberFormats3_patternArray addObject:@"1(?:[01]|5(?:[1-3]|4[56])|6[2-8]|[7-9])|[68]0|[3-6][1-9][1-9]"]; - NBNumberFormat *numberFormats3 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{2})(\\d{3,4})(\\d{4})" withFormat:@"$1-$2-$3" withLeadingDigitsPatterns:numberFormats3_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:@"0$CC-$1"]; - [numberFormats_FormatArray addObject:numberFormats3]; - - NSMutableArray *numberFormats4_patternArray = [[NSMutableArray alloc] init]; - [numberFormats4_patternArray addObject:@"131"]; - [numberFormats4_patternArray addObject:@"1312"]; - NBNumberFormat *numberFormats4 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{3})(\\d)(\\d{4})" withFormat:@"$1-$2-$3" withLeadingDigitsPatterns:numberFormats4_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:@"0$CC-$1"]; - [numberFormats_FormatArray addObject:numberFormats4]; - - NSMutableArray *numberFormats5_patternArray = [[NSMutableArray alloc] init]; - [numberFormats5_patternArray addObject:@"131"]; - [numberFormats5_patternArray addObject:@"131[13-9]"]; - NBNumberFormat *numberFormats5 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{3})(\\d{2})(\\d{4})" withFormat:@"$1-$2-$3" withLeadingDigitsPatterns:numberFormats5_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:@"0$CC-$1"]; - [numberFormats_FormatArray addObject:numberFormats5]; - - NSMutableArray *numberFormats6_patternArray = [[NSMutableArray alloc] init]; - [numberFormats6_patternArray addObject:@"13[2-9]"]; - NBNumberFormat *numberFormats6 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{3})(\\d{3})(\\d{4})" withFormat:@"$1-$2-$3" withLeadingDigitsPatterns:numberFormats6_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:@"0$CC-$1"]; - [numberFormats_FormatArray addObject:numberFormats6]; - - NSMutableArray *numberFormats7_patternArray = [[NSMutableArray alloc] init]; - [numberFormats7_patternArray addObject:@"30"]; - NBNumberFormat *numberFormats7 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{2})(\\d{2})(\\d{3})(\\d{4})" withFormat:@"$1-$2-$3-$4" withLeadingDigitsPatterns:numberFormats7_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:@"0$CC-$1"]; - [numberFormats_FormatArray addObject:numberFormats7]; - - NSMutableArray *numberFormats8_patternArray = [[NSMutableArray alloc] init]; - [numberFormats8_patternArray addObject:@"2[1-9]"]; - NBNumberFormat *numberFormats8 = [[NBNumberFormat alloc] initWithPattern:@"(\\d)(\\d{3,4})(\\d{4})" withFormat:@"$1-$2-$3" withLeadingDigitsPatterns:numberFormats8_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:@"0$CC-$1"]; - [numberFormats_FormatArray addObject:numberFormats8]; - - NSMutableArray *numberFormats9_patternArray = [[NSMutableArray alloc] init]; - [numberFormats9_patternArray addObject:@"21[0-46-9]"]; - NBNumberFormat *numberFormats9 = [[NBNumberFormat alloc] initWithPattern:@"(\\d)(\\d{3,4})" withFormat:@"$1-$2" withLeadingDigitsPatterns:numberFormats9_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:@"0$CC-$1"]; - [numberFormats_FormatArray addObject:numberFormats9]; - - NSMutableArray *numberFormats10_patternArray = [[NSMutableArray alloc] init]; - [numberFormats10_patternArray addObject:@"[3-6][1-9]1"]; - [numberFormats10_patternArray addObject:@"[3-6][1-9]1(?:[0-46-9])"]; - NBNumberFormat *numberFormats10 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{2})(\\d{3,4})" withFormat:@"$1-$2" withLeadingDigitsPatterns:numberFormats10_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:@"0$CC-$1"]; - [numberFormats_FormatArray addObject:numberFormats10]; - - NSMutableArray *numberFormats11_patternArray = [[NSMutableArray alloc] init]; - [numberFormats11_patternArray addObject:@"1(?:5[246-9]|6[04678]|8[03579])"]; - [numberFormats11_patternArray addObject:@"1(?:5(?:22|44|66|77|88|99)|6(?:00|44|6[16]|70|88)|8(?:00|33|55|77|99))"]; - NBNumberFormat *numberFormats11 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{4})(\\d{4})" withFormat:@"$1-$2" withLeadingDigitsPatterns:numberFormats11_patternArray withNationalPrefixFormattingRule:@"$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:@"0$CC-$1"]; - [numberFormats_FormatArray addObject:numberFormats11]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *intlNumberFormats0_patternArray = [[NSMutableArray alloc] init]; - [intlNumberFormats0_patternArray addObject:@"1(?:0|1[19]|[69]9|5[458])|[57]0"]; - [intlNumberFormats0_patternArray addObject:@"1(?:0|1[19]|[69]9|5(?:44|59|8))|[57]0"]; - NBNumberFormat *intlNumberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{2})(\\d{4})(\\d{4})" withFormat:@"$1-$2-$3" withLeadingDigitsPatterns:intlNumberFormats0_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:@"0$CC-$1"]; - [intlNumberFormats_FormatArray addObject:intlNumberFormats0]; - - NSMutableArray *intlNumberFormats1_patternArray = [[NSMutableArray alloc] init]; - [intlNumberFormats1_patternArray addObject:@"1(?:[01]|5[1-4]|6[2-8]|[7-9])|[68]0|[3-6][1-9][1-9]"]; - [intlNumberFormats1_patternArray addObject:@"1(?:[01]|5(?:[1-3]|4[56])|6[2-8]|[7-9])|[68]0|[3-6][1-9][1-9]"]; - NBNumberFormat *intlNumberFormats1 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{2})(\\d{3,4})(\\d{4})" withFormat:@"$1-$2-$3" withLeadingDigitsPatterns:intlNumberFormats1_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:@"0$CC-$1"]; - [intlNumberFormats_FormatArray addObject:intlNumberFormats1]; - - NSMutableArray *intlNumberFormats2_patternArray = [[NSMutableArray alloc] init]; - [intlNumberFormats2_patternArray addObject:@"131"]; - [intlNumberFormats2_patternArray addObject:@"1312"]; - NBNumberFormat *intlNumberFormats2 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{3})(\\d)(\\d{4})" withFormat:@"$1-$2-$3" withLeadingDigitsPatterns:intlNumberFormats2_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:@"0$CC-$1"]; - [intlNumberFormats_FormatArray addObject:intlNumberFormats2]; - - NSMutableArray *intlNumberFormats3_patternArray = [[NSMutableArray alloc] init]; - [intlNumberFormats3_patternArray addObject:@"131"]; - [intlNumberFormats3_patternArray addObject:@"131[13-9]"]; - NBNumberFormat *intlNumberFormats3 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{3})(\\d{2})(\\d{4})" withFormat:@"$1-$2-$3" withLeadingDigitsPatterns:intlNumberFormats3_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:@"0$CC-$1"]; - [intlNumberFormats_FormatArray addObject:intlNumberFormats3]; - - NSMutableArray *intlNumberFormats4_patternArray = [[NSMutableArray alloc] init]; - [intlNumberFormats4_patternArray addObject:@"13[2-9]"]; - NBNumberFormat *intlNumberFormats4 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{3})(\\d{3})(\\d{4})" withFormat:@"$1-$2-$3" withLeadingDigitsPatterns:intlNumberFormats4_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:@"0$CC-$1"]; - [intlNumberFormats_FormatArray addObject:intlNumberFormats4]; - - NSMutableArray *intlNumberFormats5_patternArray = [[NSMutableArray alloc] init]; - [intlNumberFormats5_patternArray addObject:@"30"]; - NBNumberFormat *intlNumberFormats5 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{2})(\\d{2})(\\d{3})(\\d{4})" withFormat:@"$1-$2-$3-$4" withLeadingDigitsPatterns:intlNumberFormats5_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:@"0$CC-$1"]; - [intlNumberFormats_FormatArray addObject:intlNumberFormats5]; - - NSMutableArray *intlNumberFormats6_patternArray = [[NSMutableArray alloc] init]; - [intlNumberFormats6_patternArray addObject:@"2[1-9]"]; - NBNumberFormat *intlNumberFormats6 = [[NBNumberFormat alloc] initWithPattern:@"(\\d)(\\d{3,4})(\\d{4})" withFormat:@"$1-$2-$3" withLeadingDigitsPatterns:intlNumberFormats6_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:@"0$CC-$1"]; - [intlNumberFormats_FormatArray addObject:intlNumberFormats6]; - - NSMutableArray *intlNumberFormats7_patternArray = [[NSMutableArray alloc] init]; - [intlNumberFormats7_patternArray addObject:@"21[0-46-9]"]; - NBNumberFormat *intlNumberFormats7 = [[NBNumberFormat alloc] initWithPattern:@"(\\d)(\\d{3,4})" withFormat:@"$1-$2" withLeadingDigitsPatterns:intlNumberFormats7_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:@"0$CC-$1"]; - [intlNumberFormats_FormatArray addObject:intlNumberFormats7]; - - NSMutableArray *intlNumberFormats8_patternArray = [[NSMutableArray alloc] init]; - [intlNumberFormats8_patternArray addObject:@"[3-6][1-9]1"]; - [intlNumberFormats8_patternArray addObject:@"[3-6][1-9]1(?:[0-46-9])"]; - NBNumberFormat *intlNumberFormats8 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{2})(\\d{3,4})" withFormat:@"$1-$2" withLeadingDigitsPatterns:intlNumberFormats8_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:@"0$CC-$1"]; - [intlNumberFormats_FormatArray addObject:intlNumberFormats8]; - - NSMutableArray *intlNumberFormats9_patternArray = [[NSMutableArray alloc] init]; - [intlNumberFormats9_patternArray addObject:@"1(?:5[246-9]|6[04678]|8[03579])"]; - [intlNumberFormats9_patternArray addObject:@"1(?:5(?:22|44|66|77|88|99)|6(?:00|44|6[16]|70|88)|8(?:00|33|55|77|99))"]; - NBNumberFormat *intlNumberFormats9 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{4})(\\d{4})" withFormat:@"$1-$2" withLeadingDigitsPatterns:intlNumberFormats9_patternArray withNationalPrefixFormattingRule:@"$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:@"0$CC-$1"]; - [intlNumberFormats_FormatArray addObject:intlNumberFormats9]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = YES; - } - return self; -} -@end - -@implementation NBPhoneMetadataNE -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:8]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[0289]\\d{7}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"2(?:0(?:20|3[1-7]|4[134]|5[14]|6[14578]|7[1-578])|1(?:4[145]|5[14]|6[14-68]|7[169]|88))\\d{4}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"20201234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:8[089]|9\\d)\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"93123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"08\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"08123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"09\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"09123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"NE"; - self.countryCode = [NSNumber numberWithInteger:227]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = nil; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = nil; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - [numberFormats0_patternArray addObject:@"[289]|09"]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{2})(\\d{2})(\\d{2})(\\d{2})" withFormat:@"$1 $2 $3 $4" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - - NSMutableArray *numberFormats1_patternArray = [[NSMutableArray alloc] init]; - [numberFormats1_patternArray addObject:@"08"]; - NBNumberFormat *numberFormats1 = [[NBNumberFormat alloc] initWithPattern:@"(08)(\\d{3})(\\d{3})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats1_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats1]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = YES; - } - return self; -} -@end - -@implementation NBPhoneMetadataNF -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:6]]; - - NSMutableArray *generalDesc_descArrayPLLO = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPLLO addObject: [NSNumber numberWithInt:5]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[13]\\d{5}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:generalDesc_descArrayPLLO withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *fixedLine_descArrayPLLO = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPLLO addObject: [NSNumber numberWithInt:5]]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:1(?:06|17|28|39)|3[012]\\d)\\d{3}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:fixedLine_descArrayPLLO withExample:@"106609" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *mobile_descArrayPLLO = [[NSMutableArray alloc] init]; - [mobile_descArrayPLLO addObject: [NSNumber numberWithInt:5]]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"3[58]\\d{4}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:mobile_descArrayPLLO withExample:@"381234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"NF"; - self.countryCode = [NSNumber numberWithInteger:672]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = nil; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = nil; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - [numberFormats0_patternArray addObject:@"1"]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{2})(\\d{4})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - - NSMutableArray *numberFormats1_patternArray = [[NSMutableArray alloc] init]; - [numberFormats1_patternArray addObject:@"3"]; - NBNumberFormat *numberFormats1 = [[NBNumberFormat alloc] initWithPattern:@"(\\d)(\\d{5})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats1_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats1]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataMK -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:8]]; - - NSMutableArray *generalDesc_descArrayPLLO = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPLLO addObject: [NSNumber numberWithInt:6]]; - [generalDesc_descArrayPLLO addObject: [NSNumber numberWithInt:7]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[2-578]\\d{7}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:generalDesc_descArrayPLLO withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *fixedLine_descArrayPLLO = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPLLO addObject: [NSNumber numberWithInt:6]]; - [fixedLine_descArrayPLLO addObject: [NSNumber numberWithInt:7]]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:2(?:[23]\\d|5[124578]|6[01])|3(?:1[3-6]|[23][2-6]|4[2356])|4(?:[23][2-6]|4[3-6]|5[256]|6[25-8]|7[24-6]|8[4-6]))\\d{5}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:fixedLine_descArrayPLLO withExample:@"22212345" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"7(?:[0-25-8]\\d{2}|32\\d|421)\\d{4}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"72345678" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"800\\d{5}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"80012345" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"5[02-9]\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"50012345" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"8(?:0[1-9]|[1-9]\\d)\\d{5}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"80123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"MK"; - self.countryCode = [NSNumber numberWithInteger:389]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = @"0"; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = @"0"; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - [numberFormats0_patternArray addObject:@"2"]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(2)(\\d{3})(\\d{4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - - NSMutableArray *numberFormats1_patternArray = [[NSMutableArray alloc] init]; - [numberFormats1_patternArray addObject:@"[347]"]; - NBNumberFormat *numberFormats1 = [[NBNumberFormat alloc] initWithPattern:@"([347]\\d)(\\d{3})(\\d{3})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats1_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats1]; - - NSMutableArray *numberFormats2_patternArray = [[NSMutableArray alloc] init]; - [numberFormats2_patternArray addObject:@"[58]"]; - NBNumberFormat *numberFormats2 = [[NBNumberFormat alloc] initWithPattern:@"([58]\\d{2})(\\d)(\\d{2})(\\d{2})" withFormat:@"$1 $2 $3 $4" withLeadingDigitsPatterns:numberFormats2_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats2]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataNG -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:7]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:8]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:10]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:11]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:12]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:13]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:14]]; - - NSMutableArray *generalDesc_descArrayPLLO = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPLLO addObject: [NSNumber numberWithInt:5]]; - [generalDesc_descArrayPLLO addObject: [NSNumber numberWithInt:6]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[1-6]\\d{5,8}|9\\d{5,9}|[78]\\d{5,13}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:generalDesc_descArrayPLLO withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *fixedLine_descArrayPL = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:7]]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:8]]; - - NSMutableArray *fixedLine_descArrayPLLO = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPLLO addObject: [NSNumber numberWithInt:5]]; - [fixedLine_descArrayPLLO addObject: [NSNumber numberWithInt:6]]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[12]\\d{6,7}|9(?:0[3-9]|[1-9]\\d)\\d{5}|(?:3\\d|4[023568]|5[02368]|6[02-469]|7[4-69]|8[2-9])\\d{6}|(?:4[47]|5[14579]|6[1578]|7[0-357])\\d{5,6}|(?:78|41)\\d{5}" withPossibleNumberPattern:nil withPossibleLength:fixedLine_descArrayPL withPossibleLengthLocalOnly:fixedLine_descArrayPLLO withExample:@"12345678" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *mobile_descArrayPL = [[NSMutableArray alloc] init]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:8]]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:10]]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:1(?:7[34]\\d|8(?:04|[124579]\\d|8[0-3])|95\\d)|287[0-7]|3(?:18[1-8]|88[0-7]|9(?:8[5-9]|6[1-5]))|4(?:28[0-2]|6(?:7[1-9]|8[02-47])|88[0-2])|5(?:2(?:7[7-9]|8\\d)|38[1-79]|48[0-7]|68[4-7])|6(?:2(?:7[7-9]|8\\d)|4(?:3[7-9]|[68][129]|7[04-69]|9[1-8])|58[0-2]|98[7-9])|7(?:38[0-7]|69[1-8]|78[2-4])|8(?:28[3-9]|38[0-2]|4(?:2[12]|3[147-9]|5[346]|7[4-9]|8[014-689]|90)|58[1-8]|78[2-9]|88[5-7])|98[07]\\d)\\d{4}|(?:70(?:[1-689]\\d|7[0-3])|8(?:0(?:1[01]|[2-9]\\d)|1(?:[0-8]\\d|9[01]))|90[235-9]\\d)\\d{6}" withPossibleNumberPattern:nil withPossibleLength:mobile_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"8021234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:10]]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:11]]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:12]]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:13]]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:14]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"800\\d{7,11}" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"80017591759" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:10]]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:11]]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:12]]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:13]]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:14]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"700\\d{7,11}" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"7001234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"NG"; - self.countryCode = [NSNumber numberWithInteger:234]; - self.internationalPrefix = @"009"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = @"0"; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = @"0"; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - [numberFormats0_patternArray addObject:@"[12]|9(?:0[3-9]|[1-9])"]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(\\d)(\\d{3})(\\d{3,4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - - NSMutableArray *numberFormats1_patternArray = [[NSMutableArray alloc] init]; - [numberFormats1_patternArray addObject:@"[3-6]|7(?:[1-79]|0[1-9])|8[2-9]"]; - NBNumberFormat *numberFormats1 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{2})(\\d{3})(\\d{2,3})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats1_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats1]; - - NSMutableArray *numberFormats2_patternArray = [[NSMutableArray alloc] init]; - [numberFormats2_patternArray addObject:@"70|8[01]|90[235-9]"]; - NBNumberFormat *numberFormats2 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{3})(\\d{3})(\\d{3,4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats2_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats2]; - - NSMutableArray *numberFormats3_patternArray = [[NSMutableArray alloc] init]; - [numberFormats3_patternArray addObject:@"[78]00"]; - NBNumberFormat *numberFormats3 = [[NBNumberFormat alloc] initWithPattern:@"([78]00)(\\d{4})(\\d{4,5})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats3_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats3]; - - NSMutableArray *numberFormats4_patternArray = [[NSMutableArray alloc] init]; - [numberFormats4_patternArray addObject:@"[78]00"]; - NBNumberFormat *numberFormats4 = [[NBNumberFormat alloc] initWithPattern:@"([78]00)(\\d{5})(\\d{5,6})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats4_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats4]; - - NSMutableArray *numberFormats5_patternArray = [[NSMutableArray alloc] init]; - [numberFormats5_patternArray addObject:@"78"]; - NBNumberFormat *numberFormats5 = [[NBNumberFormat alloc] initWithPattern:@"(78)(\\d{2})(\\d{3})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats5_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats5]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataML -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:8]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[246-9]\\d{7}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:2(?:0(?:2\\d|7[0-8])|1(?:2[5-7]|[3-689]\\d))|44[1239]\\d)\\d{4}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"20212345" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:2(?:079|17\\d)|[679]\\d{3}|8[239]\\d{2})\\d{4}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"65012345" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"80\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"80012345" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"80\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"80012345" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"ML"; - self.countryCode = [NSNumber numberWithInteger:223]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = nil; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = nil; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - [numberFormats0_patternArray addObject:@"[246-9]"]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{2})(\\d{2})(\\d{2})(\\d{2})" withFormat:@"$1 $2 $3 $4" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - - NSMutableArray *numberFormats1_patternArray = [[NSMutableArray alloc] init]; - [numberFormats1_patternArray addObject:@"67|74"]; - NBNumberFormat *numberFormats1 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{4})" withFormat:@"$1" withLeadingDigitsPatterns:numberFormats1_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats1]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *intlNumberFormats0_patternArray = [[NSMutableArray alloc] init]; - [intlNumberFormats0_patternArray addObject:@"[246-9]"]; - NBNumberFormat *intlNumberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{2})(\\d{2})(\\d{2})(\\d{2})" withFormat:@"$1 $2 $3 $4" withLeadingDigitsPatterns:intlNumberFormats0_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [intlNumberFormats_FormatArray addObject:intlNumberFormats0]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataMM -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:6]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:7]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:8]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:9]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:10]]; - - NSMutableArray *generalDesc_descArrayPLLO = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPLLO addObject: [NSNumber numberWithInt:5]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[1478]\\d{5,7}|[256]\\d{5,8}|9(?:[279]\\d{0,2}|[58]|[34]\\d{1,2}|6\\d?)\\d{6}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:generalDesc_descArrayPLLO withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *fixedLine_descArrayPL = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:6]]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:7]]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:8]]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:9]]; - - NSMutableArray *fixedLine_descArrayPLLO = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPLLO addObject: [NSNumber numberWithInt:5]]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"1(?:2\\d{1,2}|[3-5]\\d|6\\d?|[89][0-6]\\d)\\d{4}|2(?:2(?:000\\d{3}|\\d{4})|3\\d{4}|4(?:0\\d{5}|\\d{4})|5(?:1\\d{3,6}|[02-9]\\d{3,5})|[6-9]\\d{4})|4(?:2[245-8]|3(?:[2-46]|56?)|[46][2-6]|5[3-5])\\d{4}|5(?:2(?:2(?:\\d{1,2})?|[3-8])|3[2-68]|4(?:21?|[4-8])|5[23]|6[2-4]|7[2-8]|8[24-7]|9[2-7])\\d{4}|6(?:0[23]|1(?:2(?:0|4\\d)?|[356])|2[2-6]|3[24-6]|4(?:2(?:4\\d)?|[3-6])|5[2-4]|6[2-8]|7(?:[2367]|4\\d|5\\d?|8[145]\\d)|8[245]|9(?:20?|4))\\d{4}|7(?:[04][24-8]|1(?:20?|[3-7])|22|3[2-4]|5[2-7])\\d{4}|8(?:1(?:2\\d{1,2}|[3-689]\\d)|2(?:2\\d|3(?:\\d|20)|[4-8]\\d)|3[24]\\d|4[24-7]\\d|5[245]\\d|6[23]\\d)\\d{3}" withPossibleNumberPattern:nil withPossibleLength:fixedLine_descArrayPL withPossibleLengthLocalOnly:fixedLine_descArrayPLLO withExample:@"1234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *mobile_descArrayPL = [[NSMutableArray alloc] init]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:7]]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:8]]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:9]]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:10]]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"17[01]\\d{4}|9(?:2(?:[0-4]|5\\d{2}|6[0-5]\\d)|3(?:[0-36]|4[069])\\d|4(?:0[0-4]\\d|[1379]\\d|2\\d{2}|4[0-589]\\d|5\\d{2}|88)|5[0-6]|61?\\d|7(?:3\\d|[6-9]\\d{2})|8\\d|9(?:1\\d|[5-7]\\d{2}|[089]))\\d{5}" withPossibleNumberPattern:nil withPossibleLength:mobile_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"92123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:8]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"1333\\d{4}" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"13331234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"MM"; - self.countryCode = [NSNumber numberWithInteger:95]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = @"0"; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = @"0"; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - [numberFormats0_patternArray addObject:@"1|2[245]"]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(\\d)(\\d{3})(\\d{3,4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - - NSMutableArray *numberFormats1_patternArray = [[NSMutableArray alloc] init]; - [numberFormats1_patternArray addObject:@"251"]; - NBNumberFormat *numberFormats1 = [[NBNumberFormat alloc] initWithPattern:@"(2)(\\d{4})(\\d{4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats1_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats1]; - - NSMutableArray *numberFormats2_patternArray = [[NSMutableArray alloc] init]; - [numberFormats2_patternArray addObject:@"16|2"]; - NBNumberFormat *numberFormats2 = [[NBNumberFormat alloc] initWithPattern:@"(\\d)(\\d{2})(\\d{3})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats2_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats2]; - - NSMutableArray *numberFormats3_patternArray = [[NSMutableArray alloc] init]; - [numberFormats3_patternArray addObject:@"67|81"]; - NBNumberFormat *numberFormats3 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{2})(\\d{3})(\\d{3,4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats3_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats3]; - - NSMutableArray *numberFormats4_patternArray = [[NSMutableArray alloc] init]; - [numberFormats4_patternArray addObject:@"[4-8]"]; - NBNumberFormat *numberFormats4 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{2})(\\d{2})(\\d{3,4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats4_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats4]; - - NSMutableArray *numberFormats5_patternArray = [[NSMutableArray alloc] init]; - [numberFormats5_patternArray addObject:@"9(?:2[0-4]|[35-9]|4[137-9])"]; - NBNumberFormat *numberFormats5 = [[NBNumberFormat alloc] initWithPattern:@"(9)(\\d{3})(\\d{4,6})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats5_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats5]; - - NSMutableArray *numberFormats6_patternArray = [[NSMutableArray alloc] init]; - [numberFormats6_patternArray addObject:@"9(?:3[0-36]|4[0-57-9])"]; - NBNumberFormat *numberFormats6 = [[NBNumberFormat alloc] initWithPattern:@"(9)([34]\\d{4})(\\d{4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats6_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats6]; - - NSMutableArray *numberFormats7_patternArray = [[NSMutableArray alloc] init]; - [numberFormats7_patternArray addObject:@"92[56]"]; - NBNumberFormat *numberFormats7 = [[NBNumberFormat alloc] initWithPattern:@"(9)(\\d{3})(\\d{3})(\\d{3})" withFormat:@"$1 $2 $3 $4" withLeadingDigitsPatterns:numberFormats7_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats7]; - - NSMutableArray *numberFormats8_patternArray = [[NSMutableArray alloc] init]; - [numberFormats8_patternArray addObject:@"93"]; - NBNumberFormat *numberFormats8 = [[NBNumberFormat alloc] initWithPattern:@"(9)(\\d{3})(\\d{3})(\\d{2})" withFormat:@"$1 $2 $3 $4" withLeadingDigitsPatterns:numberFormats8_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats8]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataLR -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:7]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:8]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"2\\d{7,8}|[378]\\d{8}|4\\d{6}|5\\d{6,8}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *fixedLine_descArrayPL = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:8]]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"2\\d{7}" withPossibleNumberPattern:nil withPossibleLength:fixedLine_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"21234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *mobile_descArrayPL = [[NSMutableArray alloc] init]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:7]]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:20\\d{3}|330\\d{2}|4[67]\\d|5(?:55)?\\d{2}|77\\d{3}|88\\d{3})\\d{4}" withPossibleNumberPattern:nil withPossibleLength:mobile_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"770123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"332(?:02|[25]\\d)\\d{4}" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"332021234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"LR"; - self.countryCode = [NSNumber numberWithInteger:231]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = @"0"; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = @"0"; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - [numberFormats0_patternArray addObject:@"2"]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(2\\d)(\\d{3})(\\d{3})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - - NSMutableArray *numberFormats1_patternArray = [[NSMutableArray alloc] init]; - [numberFormats1_patternArray addObject:@"[45]"]; - NBNumberFormat *numberFormats1 = [[NBNumberFormat alloc] initWithPattern:@"([4-5])(\\d{3})(\\d{3})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats1_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats1]; - - NSMutableArray *numberFormats2_patternArray = [[NSMutableArray alloc] init]; - [numberFormats2_patternArray addObject:@"[23578]"]; - NBNumberFormat *numberFormats2 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{2})(\\d{3})(\\d{4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats2_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats2]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataNI -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:8]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[12578]\\d{7}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"2\\d{7}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"21234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"5(?:5[0-7]\\d{5}|[78]\\d{6})|7[5-8]\\d{6}|8\\d{7}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"81234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"1800\\d{4}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"18001234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"NI"; - self.countryCode = [NSNumber numberWithInteger:505]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = nil; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = nil; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{4})(\\d{4})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataKW -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:7]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:8]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[12569]\\d{6,7}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:18\\d|2(?:[23]\\d{2}|4(?:[1-35-9]\\d|44)|5(?:0[034]|[2-46]\\d|5[1-3]|7[1-7])))\\d{4}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"22345678" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *mobile_descArrayPL = [[NSMutableArray alloc] init]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:8]]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:5(?:[05]\\d{2}|1[0-7]\\d|2(?:22|5[25])|66\\d)|6(?:0[034679]\\d|222|5[015-9]\\d|6\\d{2}|7[067]\\d|9[0369]\\d)|9(?:0[09]\\d|22\\d|4[01479]\\d|55\\d|6[0679]\\d|[79]\\d{2}|8[057-9]\\d))\\d{4}" withPossibleNumberPattern:nil withPossibleLength:mobile_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"50012345" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"KW"; - self.countryCode = [NSNumber numberWithInteger:965]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = nil; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = nil; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - [numberFormats0_patternArray addObject:@"[16]|2(?:[0-35-9]|4[0-35-9])|9[024-9]|52[25]"]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{4})(\\d{3,4})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - - NSMutableArray *numberFormats1_patternArray = [[NSMutableArray alloc] init]; - [numberFormats1_patternArray addObject:@"244|5(?:[015]|66)"]; - NBNumberFormat *numberFormats1 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{3})(\\d{5})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats1_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats1]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataMN -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:8]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:9]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:10]]; - - NSMutableArray *generalDesc_descArrayPLLO = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPLLO addObject: [NSNumber numberWithInt:6]]; - [generalDesc_descArrayPLLO addObject: [NSNumber numberWithInt:7]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[12]\\d{7,9}|[57-9]\\d{7}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:generalDesc_descArrayPLLO withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *fixedLine_descArrayPLLO = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPLLO addObject: [NSNumber numberWithInt:6]]; - [fixedLine_descArrayPLLO addObject: [NSNumber numberWithInt:7]]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[12](?:1\\d|2(?:[1-3]\\d?|7\\d)|3[2-8]\\d{1,2}|4[2-68]\\d{1,2}|5[1-4689]\\d{1,2})\\d{5}|5[0568]\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:fixedLine_descArrayPLLO withExample:@"50123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *mobile_descArrayPL = [[NSMutableArray alloc] init]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:8]]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:8(?:[05689]\\d|3[01])|9[013-9]\\d)\\d{5}" withPossibleNumberPattern:nil withPossibleLength:mobile_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"88123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:8]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"7[05-8]\\d{6}" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"75123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"MN"; - self.countryCode = [NSNumber numberWithInteger:976]; - self.internationalPrefix = @"001"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = @"0"; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = @"0"; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - [numberFormats0_patternArray addObject:@"[12]1"]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"([12]\\d)(\\d{2})(\\d{4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - - NSMutableArray *numberFormats1_patternArray = [[NSMutableArray alloc] init]; - [numberFormats1_patternArray addObject:@"[12]2[1-3]"]; - NBNumberFormat *numberFormats1 = [[NBNumberFormat alloc] initWithPattern:@"([12]2\\d)(\\d{5,6})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats1_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats1]; - - NSMutableArray *numberFormats2_patternArray = [[NSMutableArray alloc] init]; - [numberFormats2_patternArray addObject:@"[12](?:27|[3-5])"]; - [numberFormats2_patternArray addObject:@"[12](?:27|[3-5]\\d)2"]; - NBNumberFormat *numberFormats2 = [[NBNumberFormat alloc] initWithPattern:@"([12]\\d{3})(\\d{5})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats2_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats2]; - - NSMutableArray *numberFormats3_patternArray = [[NSMutableArray alloc] init]; - [numberFormats3_patternArray addObject:@"[57-9]"]; - NBNumberFormat *numberFormats3 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{4})(\\d{4})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats3_patternArray withNationalPrefixFormattingRule:@"$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats3]; - - NSMutableArray *numberFormats4_patternArray = [[NSMutableArray alloc] init]; - [numberFormats4_patternArray addObject:@"[12](?:27|[3-5])"]; - [numberFormats4_patternArray addObject:@"[12](?:27|[3-5]\\d)[4-9]"]; - NBNumberFormat *numberFormats4 = [[NBNumberFormat alloc] initWithPattern:@"([12]\\d{4})(\\d{4,5})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats4_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats4]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataLS -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:8]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[2568]\\d{7}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"2\\d{7}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"22123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[56]\\d{7}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"50123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"800[256]\\d{4}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"80021234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"LS"; - self.countryCode = [NSNumber numberWithInteger:266]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = nil; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = nil; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{4})(\\d{4})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataPA -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:7]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:8]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[1-9]\\d{6,7}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *fixedLine_descArrayPL = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:7]]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:1(?:0[0-8]|1[49]|2[37]|3[0137]|4[147]|5[05]|6[58]|7[0167]|8[58]|9[139])|2(?:[0235679]\\d|1[0-7]|4[04-9]|8[028])|3(?:[09]\\d|1[014-7]|2[0-3]|3[03]|4[03-57]|55|6[068]|7[06-8]|8[06-9])|4(?:3[013-69]|4\\d|7[0-589])|5(?:[01]\\d|2[0-7]|[56]0|79)|7(?:0[09]|2[0-267]|3[06]|[469]0|5[06-9]|7[0-24-79]|8[7-9])|8(?:09|[34]\\d|5[0134]|8[02])|9(?:0[6-9]|1[016-8]|2[036-8]|3[3679]|40|5[0489]|6[06-9]|7[046-9]|8[36-8]|9[1-9]))\\d{4}" withPossibleNumberPattern:nil withPossibleLength:fixedLine_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"2001234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:1[16]1|21[89]|8(?:1[01]|7[23]))\\d{4}|6(?:[024-9]\\d|1[0-5]|3[0-24-9])\\d{5}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"60012345" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:7]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"80[09]\\d{4}" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"8001234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:7]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:779|8(?:55|60|7[78])|9(?:00|81))\\d{4}" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"8601234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"PA"; - self.countryCode = [NSNumber numberWithInteger:507]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = nil; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = nil; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - [numberFormats0_patternArray addObject:@"[1-57-9]"]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{3})(\\d{4})" withFormat:@"$1-$2" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - - NSMutableArray *numberFormats1_patternArray = [[NSMutableArray alloc] init]; - [numberFormats1_patternArray addObject:@"6"]; - NBNumberFormat *numberFormats1 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{4})(\\d{4})" withFormat:@"$1-$2" withLeadingDigitsPatterns:numberFormats1_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats1]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataMO -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:8]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[268]\\d{7}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:28[2-57-9]|8[2-57-9]\\d)\\d{5}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"28212345" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"6(?:[2356]\\d|8[158])\\d{5}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"66123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"MO"; - self.countryCode = [NSNumber numberWithInteger:853]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = nil; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = nil; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"([268]\\d{3})(\\d{4})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataLT -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:8]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[3-9]\\d{7}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:3[1478]|4[124-6]|52)\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"31234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"6\\d{7}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"61234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"800\\d{5}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"80012345" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"9(?:0[0239]|10)\\d{5}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"90012345" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"808\\d{5}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"80812345" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"700\\d{5}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"70012345" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"70[67]\\d{5}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"70712345" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"LT"; - self.countryCode = [NSNumber numberWithInteger:370]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = @"8"; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = @"[08]"; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - [numberFormats0_patternArray addObject:@"37|4(?:1|5[45]|6[2-4])"]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"([34]\\d)(\\d{6})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:@"(8-$1)" whenFormatting:YES withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - - NSMutableArray *numberFormats1_patternArray = [[NSMutableArray alloc] init]; - [numberFormats1_patternArray addObject:@"3[148]|4(?:[24]|6[09])|528|6"]; - NBNumberFormat *numberFormats1 = [[NBNumberFormat alloc] initWithPattern:@"([3-6]\\d{2})(\\d{5})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats1_patternArray withNationalPrefixFormattingRule:@"(8-$1)" whenFormatting:YES withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats1]; - - NSMutableArray *numberFormats2_patternArray = [[NSMutableArray alloc] init]; - [numberFormats2_patternArray addObject:@"[7-9]"]; - NBNumberFormat *numberFormats2 = [[NBNumberFormat alloc] initWithPattern:@"([7-9]\\d{2})(\\d{2})(\\d{3})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats2_patternArray withNationalPrefixFormattingRule:@"8 $1" whenFormatting:YES withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats2]; - - NSMutableArray *numberFormats3_patternArray = [[NSMutableArray alloc] init]; - [numberFormats3_patternArray addObject:@"52[0-79]"]; - NBNumberFormat *numberFormats3 = [[NBNumberFormat alloc] initWithPattern:@"(5)(2\\d{2})(\\d{4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats3_patternArray withNationalPrefixFormattingRule:@"(8-$1)" whenFormatting:YES withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats3]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataKY -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:10]]; - - NSMutableArray *generalDesc_descArrayPLLO = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPLLO addObject: [NSNumber numberWithInt:7]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[3589]\\d{9}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:generalDesc_descArrayPLLO withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *fixedLine_descArrayPLLO = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPLLO addObject: [NSNumber numberWithInt:7]]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"345(?:2(?:22|44)|444|6(?:23|38|40)|7(?:4[35-79]|6[6-9]|77)|8(?:00|1[45]|25|[48]8)|9(?:14|4[035-9]))\\d{4}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:fixedLine_descArrayPLLO withExample:@"3452221234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *mobile_descArrayPLLO = [[NSMutableArray alloc] init]; - [mobile_descArrayPLLO addObject: [NSNumber numberWithInt:7]]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"345(?:32[1-9]|5(?:1[67]|2[5-7]|4[6-8]|76)|9(?:1[67]|2[2-9]|3[689]))\\d{4}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:mobile_descArrayPLLO withExample:@"3453231234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"8(?:00|33|44|55|66|77|88)[2-9]\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"8002345678" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"900[2-9]\\d{6}|345976\\d{4}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"9002345678" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"5(?:00|22|33|44|66|77|88)[2-9]\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"5002345678" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"345849\\d{4}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"3458491234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"KY"; - self.countryCode = [NSNumber numberWithInteger:1]; - self.internationalPrefix = @"011"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = @"1"; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = @"1"; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = @"345"; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataMP -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:10]]; - - NSMutableArray *generalDesc_descArrayPLLO = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPLLO addObject: [NSNumber numberWithInt:7]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[5689]\\d{9}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:generalDesc_descArrayPLLO withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *fixedLine_descArrayPLLO = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPLLO addObject: [NSNumber numberWithInt:7]]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"670(?:2(?:3[3-7]|56|8[5-8])|32[1238]|4(?:33|8[348])|5(?:32|55|88)|6(?:64|70|82)|78[3589]|8[3-9]8|989)\\d{4}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:fixedLine_descArrayPLLO withExample:@"6702345678" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *mobile_descArrayPLLO = [[NSMutableArray alloc] init]; - [mobile_descArrayPLLO addObject: [NSNumber numberWithInt:7]]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"670(?:2(?:3[3-7]|56|8[5-8])|32[1238]|4(?:33|8[348])|5(?:32|55|88)|6(?:64|70|82)|78[3589]|8[3-9]8|989)\\d{4}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:mobile_descArrayPLLO withExample:@"6702345678" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"8(?:00|33|44|55|66|77|88)[2-9]\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"8002123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"900[2-9]\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"9002123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"5(?:00|22|33|44|66|77|88)[2-9]\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"5002345678" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"MP"; - self.countryCode = [NSNumber numberWithInteger:1]; - self.internationalPrefix = @"011"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = @"1"; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = @"1"; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = YES; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = @"670"; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataLU -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:4]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:5]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:6]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:7]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:8]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:9]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:10]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:11]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[24-9]\\d{3,10}|3(?:[0-46-9]\\d{2,9}|5[013-9]\\d{1,8})" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:2[2-9]\\d{2,9}|(?:[3457]\\d{2}|8(?:0[2-9]|[13-9]\\d)|9(?:0[89]|[2-579]\\d))\\d{1,8})" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"27123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *mobile_descArrayPL = [[NSMutableArray alloc] init]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"6[25-79][18]\\d{6}" withPossibleNumberPattern:nil withPossibleLength:mobile_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"628123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:8]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"800\\d{5}" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"80012345" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:8]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"90[015]\\d{5}" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"90012345" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:8]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"801\\d{5}" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"80112345" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:8]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"70\\d{6}" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"70123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:4]]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:5]]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:6]]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:7]]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:8]]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:9]]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:10]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"20(?:1\\d{5}|[2-689]\\d{1,7})" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"20201234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"LU"; - self.countryCode = [NSNumber numberWithInteger:352]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = nil; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = @"(15(?:0[06]|1[12]|35|4[04]|55|6[26]|77|88|99)\\d)"; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - [numberFormats0_patternArray addObject:@"[2-5]|7[1-9]|[89](?:[1-9]|0[2-9])"]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{2})(\\d{3})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:@"$CC $1"]; - [numberFormats_FormatArray addObject:numberFormats0]; - - NSMutableArray *numberFormats1_patternArray = [[NSMutableArray alloc] init]; - [numberFormats1_patternArray addObject:@"[2-5]|7[1-9]|[89](?:[1-9]|0[2-9])"]; - NBNumberFormat *numberFormats1 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{2})(\\d{2})(\\d{2})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats1_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:@"$CC $1"]; - [numberFormats_FormatArray addObject:numberFormats1]; - - NSMutableArray *numberFormats2_patternArray = [[NSMutableArray alloc] init]; - [numberFormats2_patternArray addObject:@"20"]; - NBNumberFormat *numberFormats2 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{2})(\\d{2})(\\d{3})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats2_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:@"$CC $1"]; - [numberFormats_FormatArray addObject:numberFormats2]; - - NSMutableArray *numberFormats3_patternArray = [[NSMutableArray alloc] init]; - [numberFormats3_patternArray addObject:@"2(?:[0367]|4[3-8])"]; - NBNumberFormat *numberFormats3 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{2})(\\d{2})(\\d{2})(\\d{1,2})" withFormat:@"$1 $2 $3 $4" withLeadingDigitsPatterns:numberFormats3_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:@"$CC $1"]; - [numberFormats_FormatArray addObject:numberFormats3]; - - NSMutableArray *numberFormats4_patternArray = [[NSMutableArray alloc] init]; - [numberFormats4_patternArray addObject:@"20"]; - NBNumberFormat *numberFormats4 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{2})(\\d{2})(\\d{2})(\\d{3})" withFormat:@"$1 $2 $3 $4" withLeadingDigitsPatterns:numberFormats4_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:@"$CC $1"]; - [numberFormats_FormatArray addObject:numberFormats4]; - - NSMutableArray *numberFormats5_patternArray = [[NSMutableArray alloc] init]; - [numberFormats5_patternArray addObject:@"2(?:[0367]|4[3-8])"]; - NBNumberFormat *numberFormats5 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{1,2})" withFormat:@"$1 $2 $3 $4 $5" withLeadingDigitsPatterns:numberFormats5_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:@"$CC $1"]; - [numberFormats_FormatArray addObject:numberFormats5]; - - NSMutableArray *numberFormats6_patternArray = [[NSMutableArray alloc] init]; - [numberFormats6_patternArray addObject:@"2(?:[12589]|4[12])|[3-5]|7[1-9]|8(?:[1-9]|0[2-9])|9(?:[1-9]|0[2-46-9])"]; - NBNumberFormat *numberFormats6 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{2})(\\d{2})(\\d{2})(\\d{1,4})" withFormat:@"$1 $2 $3 $4" withLeadingDigitsPatterns:numberFormats6_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:@"$CC $1"]; - [numberFormats_FormatArray addObject:numberFormats6]; - - NSMutableArray *numberFormats7_patternArray = [[NSMutableArray alloc] init]; - [numberFormats7_patternArray addObject:@"70|80[01]|90[015]"]; - NBNumberFormat *numberFormats7 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{3})(\\d{2})(\\d{3})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats7_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:@"$CC $1"]; - [numberFormats_FormatArray addObject:numberFormats7]; - - NSMutableArray *numberFormats8_patternArray = [[NSMutableArray alloc] init]; - [numberFormats8_patternArray addObject:@"6"]; - NBNumberFormat *numberFormats8 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{3})(\\d{3})(\\d{3})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats8_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:@"$CC $1"]; - [numberFormats_FormatArray addObject:numberFormats8]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataNL -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:5]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:6]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:7]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:8]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:9]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:10]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"1\\d{4,8}|[2-7]\\d{8}|[89]\\d{6,9}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *fixedLine_descArrayPL = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:1[0135-8]|2[02-69]|3[0-68]|4[0135-9]|[57]\\d|8[478])\\d{7}" withPossibleNumberPattern:nil withPossibleLength:fixedLine_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"101234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *mobile_descArrayPL = [[NSMutableArray alloc] init]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"6[1-58]\\d{7}" withPossibleNumberPattern:nil withPossibleLength:mobile_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"612345678" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:7]]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:8]]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:9]]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:10]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"800\\d{4,7}" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"8001234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:7]]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:8]]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:9]]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:10]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"90[069]\\d{4,7}" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"9061234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:6760|85\\d{2})\\d{5}" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"851234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"66\\d{7}" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"662345678" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:5]]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:6]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"140(?:1(?:[035]|[16-8]\\d)|2(?:[0346]|[259]\\d)|3(?:[03568]|[124]\\d)|4(?:[0356]|[17-9]\\d)|5(?:[0358]|[124679]\\d)|7\\d|8[458])" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"14020" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:5]]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:6]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"14\\d{3,4}" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"14123" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"NL"; - self.countryCode = [NSNumber numberWithInteger:31]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = @"0"; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = @"0"; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - [numberFormats0_patternArray addObject:@"1[035]|2[0346]|3[03568]|4[0356]|5[0358]|7|8[4578]"]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"([1-578]\\d)(\\d{3})(\\d{4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - - NSMutableArray *numberFormats1_patternArray = [[NSMutableArray alloc] init]; - [numberFormats1_patternArray addObject:@"1[16-8]|2[259]|3[124]|4[17-9]|5[124679]"]; - NBNumberFormat *numberFormats1 = [[NBNumberFormat alloc] initWithPattern:@"([1-5]\\d{2})(\\d{3})(\\d{3})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats1_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats1]; - - NSMutableArray *numberFormats2_patternArray = [[NSMutableArray alloc] init]; - [numberFormats2_patternArray addObject:@"6[0-57-9]"]; - NBNumberFormat *numberFormats2 = [[NBNumberFormat alloc] initWithPattern:@"(6)(\\d{8})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats2_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats2]; - - NSMutableArray *numberFormats3_patternArray = [[NSMutableArray alloc] init]; - [numberFormats3_patternArray addObject:@"66"]; - NBNumberFormat *numberFormats3 = [[NBNumberFormat alloc] initWithPattern:@"(66)(\\d{7})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats3_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats3]; - - NSMutableArray *numberFormats4_patternArray = [[NSMutableArray alloc] init]; - [numberFormats4_patternArray addObject:@"14"]; - NBNumberFormat *numberFormats4 = [[NBNumberFormat alloc] initWithPattern:@"(14)(\\d{3,4})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats4_patternArray withNationalPrefixFormattingRule:@"$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats4]; - - NSMutableArray *numberFormats5_patternArray = [[NSMutableArray alloc] init]; - [numberFormats5_patternArray addObject:@"80|9"]; - NBNumberFormat *numberFormats5 = [[NBNumberFormat alloc] initWithPattern:@"([89]0\\d)(\\d{4,7})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats5_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats5]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataKZ -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:10]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:33\\d|7\\d{2}|80[09])\\d{7}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"33622\\d{5}|7(?:1(?:0(?:[23]\\d|4[0-3]|59|63)|1(?:[23]\\d|4[0-79]|59)|2(?:[23]\\d|59)|3(?:2\\d|3[0-79]|4[0-35-9]|59)|4(?:[24]\\d|3[013-9]|5[1-9])|5(?:2\\d|3[1-9]|4[0-7]|59)|6(?:[234]\\d|5[19]|61)|72\\d|8(?:[27]\\d|3[1-46-9]|4[0-5]))|2(?:1(?:[23]\\d|4[46-9]|5[3469])|2(?:2\\d|3[0679]|46|5[12679])|3(?:[234]\\d|5[139])|4(?:2\\d|3[1235-9]|59)|5(?:[23]\\d|4[01246-8]|59|61)|6(?:2\\d|3[1-9]|4[0-4]|59)|7(?:[2379]\\d|40|5[279])|8(?:[23]\\d|4[0-3]|59)|9(?:2\\d|3[124578]|59)))\\d{5}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"7123456789" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"7(?:0[012578]|47|6[02-4]|7[15-8]|85)\\d{7}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"7710009998" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"800\\d{7}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"8001234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"809\\d{7}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"8091234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"751\\d{7}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"7511234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"751\\d{7}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"7511234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"KZ"; - self.countryCode = [NSNumber numberWithInteger:7]; - self.internationalPrefix = @"810"; - self.preferredInternationalPrefix = @"8~10"; - self.nationalPrefix = @"8"; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = @"8"; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataMQ -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[56]\\d{8}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"596(?:0[2-5]|[12]0|3[05-9]|4[024-8]|[5-7]\\d|89|9[4-8])\\d{4}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"596301234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"696(?:[0-479]\\d|5[0-4]|8[0-689])\\d{4}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"696201234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"MQ"; - self.countryCode = [NSNumber numberWithInteger:596]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = @"0"; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = @"0"; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{3})(\\d{2})(\\d{2})(\\d{2})" withFormat:@"$1 $2 $3 $4" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadata888 -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:11]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"\\d{11}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *fixedLine_descArrayPL = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:fixedLine_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *mobile_descArrayPL = [[NSMutableArray alloc] init]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:mobile_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"\\d{11}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"12345678901" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"001"; - self.countryCode = [NSNumber numberWithInteger:888]; - self.internationalPrefix = nil; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = nil; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = nil; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = YES; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{3})(\\d{3})(\\d{5})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = YES; - } - return self; -} -@end - -@implementation NBPhoneMetadataLV -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:8]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[2689]\\d{7}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"6\\d{7}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"63123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"2\\d{7}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"21234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"80\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"80123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"90\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"90123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"81\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"81123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"LV"; - self.countryCode = [NSNumber numberWithInteger:371]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = nil; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = nil; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"([2689]\\d)(\\d{3})(\\d{3})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataMR -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:8]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[2-48]\\d{7}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"25[08]\\d{5}|35\\d{6}|45[1-7]\\d{5}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"35123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[234][0-46-9]\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"22123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"800\\d{5}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"80012345" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"MR"; - self.countryCode = [NSNumber numberWithInteger:222]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = nil; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = nil; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"([2-48]\\d)(\\d{2})(\\d{2})(\\d{2})" withFormat:@"$1 $2 $3 $4" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataPE -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:8]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:9]]; - - NSMutableArray *generalDesc_descArrayPLLO = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPLLO addObject: [NSNumber numberWithInt:6]]; - [generalDesc_descArrayPLLO addObject: [NSNumber numberWithInt:7]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[14-9]\\d{7,8}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:generalDesc_descArrayPLLO withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *fixedLine_descArrayPL = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:8]]; - - NSMutableArray *fixedLine_descArrayPLLO = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPLLO addObject: [NSNumber numberWithInt:6]]; - [fixedLine_descArrayPLLO addObject: [NSNumber numberWithInt:7]]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:1\\d|4[1-4]|5[1-46]|6[1-7]|7[2-46]|8[2-4])\\d{6}" withPossibleNumberPattern:nil withPossibleLength:fixedLine_descArrayPL withPossibleLengthLocalOnly:fixedLine_descArrayPLLO withExample:@"11234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *mobile_descArrayPL = [[NSMutableArray alloc] init]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"9\\d{8}" withPossibleNumberPattern:nil withPossibleLength:mobile_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"912345678" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:8]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"800\\d{5}" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"80012345" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:8]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"805\\d{5}" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"80512345" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:8]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"801\\d{5}" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"80112345" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:8]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"80[24]\\d{5}" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"80212345" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"PE"; - self.countryCode = [NSNumber numberWithInteger:51]; - self.internationalPrefix = @"19(?:1[124]|77|90)00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = @"0"; - self.preferredExtnPrefix = @" Anexo "; - self.nationalPrefixForParsing = @"0"; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - [numberFormats0_patternArray addObject:@"1"]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(1)(\\d{7})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:@"(0$1)" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - - NSMutableArray *numberFormats1_patternArray = [[NSMutableArray alloc] init]; - [numberFormats1_patternArray addObject:@"[4-7]|8[2-4]"]; - NBNumberFormat *numberFormats1 = [[NBNumberFormat alloc] initWithPattern:@"([4-8]\\d)(\\d{6})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats1_patternArray withNationalPrefixFormattingRule:@"(0$1)" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats1]; - - NSMutableArray *numberFormats2_patternArray = [[NSMutableArray alloc] init]; - [numberFormats2_patternArray addObject:@"80"]; - NBNumberFormat *numberFormats2 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{3})(\\d{5})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats2_patternArray withNationalPrefixFormattingRule:@"(0$1)" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats2]; - - NSMutableArray *numberFormats3_patternArray = [[NSMutableArray alloc] init]; - [numberFormats3_patternArray addObject:@"9"]; - NBNumberFormat *numberFormats3 = [[NBNumberFormat alloc] initWithPattern:@"(9\\d{2})(\\d{3})(\\d{3})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats3_patternArray withNationalPrefixFormattingRule:@"$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats3]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataMS -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:10]]; - - NSMutableArray *generalDesc_descArrayPLLO = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPLLO addObject: [NSNumber numberWithInt:7]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[5689]\\d{9}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:generalDesc_descArrayPLLO withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *fixedLine_descArrayPLLO = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPLLO addObject: [NSNumber numberWithInt:7]]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"664491\\d{4}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:fixedLine_descArrayPLLO withExample:@"6644912345" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *mobile_descArrayPLLO = [[NSMutableArray alloc] init]; - [mobile_descArrayPLLO addObject: [NSNumber numberWithInt:7]]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"66449[2-6]\\d{4}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:mobile_descArrayPLLO withExample:@"6644923456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"8(?:00|33|44|55|66|77|88)[2-9]\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"8002123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"900[2-9]\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"9002123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"5(?:00|22|33|44|66|77|88)[2-9]\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"5002345678" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"MS"; - self.countryCode = [NSNumber numberWithInteger:1]; - self.internationalPrefix = @"011"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = @"1"; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = @"1"; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = @"664"; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataQA -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:7]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:8]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[2-8]\\d{6,7}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *fixedLine_descArrayPL = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:8]]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"4[04]\\d{6}" withPossibleNumberPattern:nil withPossibleLength:fixedLine_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"44123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *mobile_descArrayPL = [[NSMutableArray alloc] init]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:8]]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[3567]\\d{7}" withPossibleNumberPattern:nil withPossibleLength:mobile_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"33123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:7]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"800\\d{4}" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"8001234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:7]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"2(?:[12]\\d|61)\\d{4}" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"2123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"QA"; - self.countryCode = [NSNumber numberWithInteger:974]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = nil; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = nil; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - [numberFormats0_patternArray addObject:@"[28]"]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"([28]\\d{2})(\\d{4})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - - NSMutableArray *numberFormats1_patternArray = [[NSMutableArray alloc] init]; - [numberFormats1_patternArray addObject:@"[3-7]"]; - NBNumberFormat *numberFormats1 = [[NBNumberFormat alloc] initWithPattern:@"([3-7]\\d{3})(\\d{4})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats1_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats1]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataNO -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:5]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:8]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"0\\d{4}|[2-9]\\d{7}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *fixedLine_descArrayPL = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:8]]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:2[1-4]|3[1-3578]|5[1-35-7]|6[1-4679]|7[0-8])\\d{6}" withPossibleNumberPattern:nil withPossibleLength:fixedLine_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"21234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *mobile_descArrayPL = [[NSMutableArray alloc] init]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:8]]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:4[015-8]|5[89]|87|9\\d)\\d{6}" withPossibleNumberPattern:nil withPossibleLength:mobile_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"40612345" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:8]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"80[01]\\d{5}" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"80012345" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:8]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"82[09]\\d{5}" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"82012345" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:8]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"810(?:0[0-6]|[2-8]\\d)\\d{3}" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"81021234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:8]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"880\\d{5}" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"88012345" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:8]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"85[0-5]\\d{5}" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"85012345" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"0\\d{4}|81(?:0(?:0[7-9]|1\\d)|5\\d{2})\\d{3}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"01234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:8]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"81[23]\\d{5}" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"81212345" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"NO"; - self.countryCode = [NSNumber numberWithInteger:47]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = nil; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = nil; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - [numberFormats0_patternArray addObject:@"[489]"]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"([489]\\d{2})(\\d{2})(\\d{3})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - - NSMutableArray *numberFormats1_patternArray = [[NSMutableArray alloc] init]; - [numberFormats1_patternArray addObject:@"[235-7]"]; - NBNumberFormat *numberFormats1 = [[NBNumberFormat alloc] initWithPattern:@"([235-7]\\d)(\\d{2})(\\d{2})(\\d{2})" withFormat:@"$1 $2 $3 $4" withLeadingDigitsPatterns:numberFormats1_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats1]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = YES; - self.leadingDigits = nil; - self.leadingZeroPossible = YES; - } - return self; -} -@end - -@implementation NBPhoneMetadataPF -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:6]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:8]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"4\\d{5,7}|8\\d{7}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"4(?:[09][45689]\\d|4)\\d{4}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"40412345" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *mobile_descArrayPL = [[NSMutableArray alloc] init]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:8]]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"8[79]\\d{6}" withPossibleNumberPattern:nil withPossibleLength:mobile_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"87123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:6]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"44\\d{4}" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"441234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"PF"; - self.countryCode = [NSNumber numberWithInteger:689]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = nil; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = nil; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - [numberFormats0_patternArray addObject:@"4[09]|8[79]"]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{2})(\\d{2})(\\d{2})(\\d{2})" withFormat:@"$1 $2 $3 $4" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - - NSMutableArray *numberFormats1_patternArray = [[NSMutableArray alloc] init]; - [numberFormats1_patternArray addObject:@"44"]; - NBNumberFormat *numberFormats1 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{2})(\\d{2})(\\d{2})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats1_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats1]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataMT -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:8]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[2357-9]\\d{7}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"2(?:0(?:1[0-6]|3[1-4]|[69]\\d)|[1-357]\\d{2})\\d{4}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"21001234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:7(?:210|[79]\\d{2})|9(?:2(?:1[01]|31)|696|8(?:1[1-3]|89|97)|9\\d{2}))\\d{4}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"96961234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"800[3467]\\d{4}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"80071234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"5(?:0(?:0(?:37|43)|6\\d{2}|70\\d|9[0168]\\d)|[12]\\d0[1-5])\\d{3}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"50037123" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"3550\\d{4}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"35501234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"7117\\d{4}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"71171234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"501\\d{5}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"50112345" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"MT"; - self.countryCode = [NSNumber numberWithInteger:356]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = nil; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = nil; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{4})(\\d{4})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataLY -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:9]]; - - NSMutableArray *generalDesc_descArrayPLLO = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPLLO addObject: [NSNumber numberWithInt:7]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[25679]\\d{8}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:generalDesc_descArrayPLLO withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *fixedLine_descArrayPLLO = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPLLO addObject: [NSNumber numberWithInt:7]]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:2[1345]|5[1347]|6[123479]|71)\\d{7}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:fixedLine_descArrayPLLO withExample:@"212345678" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"9[1-6]\\d{7}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"912345678" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"LY"; - self.countryCode = [NSNumber numberWithInteger:218]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = @"0"; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = @"0"; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"([25679]\\d)(\\d{7})" withFormat:@"$1-$2" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataNP -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:8]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:10]]; - - NSMutableArray *generalDesc_descArrayPLLO = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPLLO addObject: [NSNumber numberWithInt:6]]; - [generalDesc_descArrayPLLO addObject: [NSNumber numberWithInt:7]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[1-8]\\d{7}|9(?:[1-69]\\d{6,8}|7[2-6]\\d{5,7}|8\\d{8})" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:generalDesc_descArrayPLLO withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *fixedLine_descArrayPL = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:8]]; - - NSMutableArray *fixedLine_descArrayPLLO = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPLLO addObject: [NSNumber numberWithInt:6]]; - [fixedLine_descArrayPLLO addObject: [NSNumber numberWithInt:7]]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:1[0-6]\\d|2[13-79][2-6]|3[135-8][2-6]|4[146-9][2-6]|5[135-7][2-6]|6[13-9][2-6]|7[15-9][2-6]|8[1-46-9][2-6]|9[1-79][2-6])\\d{5}" withPossibleNumberPattern:nil withPossibleLength:fixedLine_descArrayPL withPossibleLengthLocalOnly:fixedLine_descArrayPLLO withExample:@"14567890" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *mobile_descArrayPL = [[NSMutableArray alloc] init]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:10]]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"9(?:6[013]|7[245]|8[0-24-6])\\d{7}" withPossibleNumberPattern:nil withPossibleLength:mobile_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"9841234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"NP"; - self.countryCode = [NSNumber numberWithInteger:977]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = @"0"; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = @"0"; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - [numberFormats0_patternArray addObject:@"1[2-6]"]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(1)(\\d{7})" withFormat:@"$1-$2" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - - NSMutableArray *numberFormats1_patternArray = [[NSMutableArray alloc] init]; - [numberFormats1_patternArray addObject:@"1[01]|[2-8]|9(?:[1-69]|7[15-9])"]; - NBNumberFormat *numberFormats1 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{2})(\\d{6})" withFormat:@"$1-$2" withLeadingDigitsPatterns:numberFormats1_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats1]; - - NSMutableArray *numberFormats2_patternArray = [[NSMutableArray alloc] init]; - [numberFormats2_patternArray addObject:@"9(?:6[013]|7[245]|8)"]; - NBNumberFormat *numberFormats2 = [[NBNumberFormat alloc] initWithPattern:@"(9\\d{2})(\\d{7})" withFormat:@"$1-$2" withLeadingDigitsPatterns:numberFormats2_patternArray withNationalPrefixFormattingRule:@"$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats2]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataPG -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:7]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:8]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[1-9]\\d{6,7}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *fixedLine_descArrayPL = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:7]]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:3[0-2]\\d|4[257]\\d|5[34]\\d|64[1-9]|77(?:[0-24]\\d|30)|85[02-46-9]|9[78]\\d)\\d{4}" withPossibleNumberPattern:nil withPossibleLength:fixedLine_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"3123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:20150|68\\d{2}|7(?:[0-689]\\d|75)\\d{2})\\d{3}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"6812345" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:7]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"180\\d{4}" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"1801234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:7]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"27[568]\\d{4}" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"2751234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"PG"; - self.countryCode = [NSNumber numberWithInteger:675]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = nil; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = nil; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - [numberFormats0_patternArray addObject:@"[13-689]|27"]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{3})(\\d{4})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - - NSMutableArray *numberFormats1_patternArray = [[NSMutableArray alloc] init]; - [numberFormats1_patternArray addObject:@"20|7"]; - NBNumberFormat *numberFormats1 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{4})(\\d{4})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats1_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats1]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataMU -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:7]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:8]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[2-9]\\d{6,7}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:2(?:[03478]\\d|1[0-7]|6[1-69])|4(?:[013568]\\d|2[4-7])|5(?:44\\d|471)|6\\d{2}|8(?:14|3[129]))\\d{4}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"2012345" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *mobile_descArrayPL = [[NSMutableArray alloc] init]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:8]]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"5(?:2[59]\\d|4(?:2[1-389]|4\\d|7[1-9]|9\\d)|7\\d{2}|8(?:[0-25689]\\d|4[3479]|7[15-8])|9[0-8]\\d)\\d{4}" withPossibleNumberPattern:nil withPossibleLength:mobile_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"52512345" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:7]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"80[012]\\d{4}" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"8001234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:7]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"30\\d{5}" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"3012345" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:7]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"3(?:20|9\\d)\\d{4}" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"3201234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"MU"; - self.countryCode = [NSNumber numberWithInteger:230]; - self.internationalPrefix = @"0(?:0|[2-7]0|33)"; - self.preferredInternationalPrefix = @"020"; - self.nationalPrefix = nil; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = nil; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - [numberFormats0_patternArray addObject:@"[2-46-9]"]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"([2-46-9]\\d{2})(\\d{4})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - - NSMutableArray *numberFormats1_patternArray = [[NSMutableArray alloc] init]; - [numberFormats1_patternArray addObject:@"5"]; - NBNumberFormat *numberFormats1 = [[NBNumberFormat alloc] initWithPattern:@"(5\\d{3})(\\d{4})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats1_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats1]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataPH -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:6]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:8]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:9]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:10]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:11]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:12]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:13]]; - - NSMutableArray *generalDesc_descArrayPLLO = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPLLO addObject: [NSNumber numberWithInt:5]]; - [generalDesc_descArrayPLLO addObject: [NSNumber numberWithInt:7]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"2\\d{5,7}|[3-9]\\d{7,9}|1800\\d{7,9}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:generalDesc_descArrayPLLO withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *fixedLine_descArrayPL = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:6]]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:8]]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:9]]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:10]]; - - NSMutableArray *fixedLine_descArrayPLLO = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPLLO addObject: [NSNumber numberWithInt:5]]; - [fixedLine_descArrayPLLO addObject: [NSNumber numberWithInt:7]]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"2\\d{5}(?:\\d{2})?|(?:3[2-68]|4[2-9]|5[2-6]|6[2-58]|7[24578]|8[2-8])\\d{7}|88(?:22\\d{6}|42\\d{4})" withPossibleNumberPattern:nil withPossibleLength:fixedLine_descArrayPL withPossibleLengthLocalOnly:fixedLine_descArrayPLLO withExample:@"21234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *mobile_descArrayPL = [[NSMutableArray alloc] init]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:10]]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:81[37]|9(?:0[5-9]|1[024-9]|2[0-35-9]|3[02-9]|4[235-9]|5[056]|6[5-7]|7[34-79]|89|9[4-9]))\\d{7}" withPossibleNumberPattern:nil withPossibleLength:mobile_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"9051234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:11]]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:12]]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:13]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"1800\\d{7,9}" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"180012345678" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"PH"; - self.countryCode = [NSNumber numberWithInteger:63]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = @"0"; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = @"0"; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - [numberFormats0_patternArray addObject:@"2"]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(2)(\\d{3})(\\d{4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:@"(0$1)" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - - NSMutableArray *numberFormats1_patternArray = [[NSMutableArray alloc] init]; - [numberFormats1_patternArray addObject:@"2"]; - NBNumberFormat *numberFormats1 = [[NBNumberFormat alloc] initWithPattern:@"(2)(\\d{5})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats1_patternArray withNationalPrefixFormattingRule:@"(0$1)" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats1]; - - NSMutableArray *numberFormats2_patternArray = [[NSMutableArray alloc] init]; - [numberFormats2_patternArray addObject:@"3(?:23|39|46)|4(?:2[3-6]|[35]9|4[26]|76)|5(?:22|44)|642|8(?:62|8[245])"]; - [numberFormats2_patternArray addObject:@"3(?:230|397|461)|4(?:2(?:35|[46]4|51)|396|4(?:22|63)|59[347]|76[15])|5(?:221|446)|642[23]|8(?:622|8(?:[24]2|5[13]))"]; - NBNumberFormat *numberFormats2 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{4})(\\d{4,6})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats2_patternArray withNationalPrefixFormattingRule:@"(0$1)" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats2]; - - NSMutableArray *numberFormats3_patternArray = [[NSMutableArray alloc] init]; - [numberFormats3_patternArray addObject:@"346|4(?:27|9[35])|883"]; - [numberFormats3_patternArray addObject:@"3469|4(?:279|9(?:30|56))|8834"]; - NBNumberFormat *numberFormats3 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{5})(\\d{4})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats3_patternArray withNationalPrefixFormattingRule:@"(0$1)" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats3]; - - NSMutableArray *numberFormats4_patternArray = [[NSMutableArray alloc] init]; - [numberFormats4_patternArray addObject:@"[3-8]"]; - NBNumberFormat *numberFormats4 = [[NBNumberFormat alloc] initWithPattern:@"([3-8]\\d)(\\d{3})(\\d{4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats4_patternArray withNationalPrefixFormattingRule:@"(0$1)" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats4]; - - NSMutableArray *numberFormats5_patternArray = [[NSMutableArray alloc] init]; - [numberFormats5_patternArray addObject:@"81|9"]; - NBNumberFormat *numberFormats5 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{3})(\\d{3})(\\d{4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats5_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats5]; - - NSMutableArray *numberFormats6_patternArray = [[NSMutableArray alloc] init]; - [numberFormats6_patternArray addObject:@"1"]; - NBNumberFormat *numberFormats6 = [[NBNumberFormat alloc] initWithPattern:@"(1800)(\\d{3})(\\d{4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats6_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats6]; - - NSMutableArray *numberFormats7_patternArray = [[NSMutableArray alloc] init]; - [numberFormats7_patternArray addObject:@"1"]; - NBNumberFormat *numberFormats7 = [[NBNumberFormat alloc] initWithPattern:@"(1800)(\\d{1,2})(\\d{3})(\\d{4})" withFormat:@"$1 $2 $3 $4" withLeadingDigitsPatterns:numberFormats7_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats7]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataMV -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:7]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:10]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[346-8]\\d{6,9}|9(?:00\\d{7}|\\d{6})" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *fixedLine_descArrayPL = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:7]]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:3(?:0[0-3]|3[0-59])|6(?:[57][02468]|6[024568]|8[024689]|90))\\d{4}" withPossibleNumberPattern:nil withPossibleLength:fixedLine_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"6701234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *mobile_descArrayPL = [[NSMutableArray alloc] init]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:7]]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:46[46]|7[3-9]\\d|9[15-9]\\d)\\d{4}" withPossibleNumberPattern:nil withPossibleLength:mobile_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"7712345" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:10]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"800\\d{7}" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"8001234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:10]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"900\\d{7}" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"9001234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:7]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"781\\d{4}" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"7812345" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:7]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"4[05]0\\d{4}" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"4001234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"MV"; - self.countryCode = [NSNumber numberWithInteger:960]; - self.internationalPrefix = @"0(?:0|19)"; - self.preferredInternationalPrefix = @"00"; - self.nationalPrefix = nil; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = nil; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - [numberFormats0_patternArray addObject:@"[3467]|9(?:[1-9]|0[1-9])"]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{3})(\\d{4})" withFormat:@"$1-$2" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - - NSMutableArray *numberFormats1_patternArray = [[NSMutableArray alloc] init]; - [numberFormats1_patternArray addObject:@"[89]00"]; - NBNumberFormat *numberFormats1 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{3})(\\d{3})(\\d{4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats1_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats1]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataOM -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:7]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:8]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:5|[279]\\d)\\d{6}|800\\d{5,6}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *fixedLine_descArrayPL = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:8]]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"2[2-6]\\d{6}" withPossibleNumberPattern:nil withPossibleLength:fixedLine_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"23123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *mobile_descArrayPL = [[NSMutableArray alloc] init]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:8]]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"7[19]\\d{6}|9(?:0[1-9]|[1-9]\\d)\\d{5}" withPossibleNumberPattern:nil withPossibleLength:mobile_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"92123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"8007\\d{4,5}|500\\d{4}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"80071234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:8]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"900\\d{5}" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"90012345" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"OM"; - self.countryCode = [NSNumber numberWithInteger:968]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = nil; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = nil; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - [numberFormats0_patternArray addObject:@"2"]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(2\\d)(\\d{6})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - - NSMutableArray *numberFormats1_patternArray = [[NSMutableArray alloc] init]; - [numberFormats1_patternArray addObject:@"[79]"]; - NBNumberFormat *numberFormats1 = [[NBNumberFormat alloc] initWithPattern:@"([79]\\d{3})(\\d{4})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats1_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats1]; - - NSMutableArray *numberFormats2_patternArray = [[NSMutableArray alloc] init]; - [numberFormats2_patternArray addObject:@"[58]"]; - NBNumberFormat *numberFormats2 = [[NBNumberFormat alloc] initWithPattern:@"([58]00)(\\d{4,6})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats2_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats2]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataNR -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:7]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[458]\\d{6}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:444|888)\\d{4}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"4441234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"55[5-9]\\d{4}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"5551234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"NR"; - self.countryCode = [NSNumber numberWithInteger:674]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = nil; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = nil; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{3})(\\d{4})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataMW -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:7]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:1(?:\\d{2})?|[2789]\\d{2})\\d{6}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:1[2-9]|21\\d{2})\\d{5}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"1234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *mobile_descArrayPL = [[NSMutableArray alloc] init]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:111|77\\d|88\\d|99\\d)\\d{6}" withPossibleNumberPattern:nil withPossibleLength:mobile_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"991234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"MW"; - self.countryCode = [NSNumber numberWithInteger:265]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = @"0"; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = @"0"; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - [numberFormats0_patternArray addObject:@"1"]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(\\d)(\\d{3})(\\d{3})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - - NSMutableArray *numberFormats1_patternArray = [[NSMutableArray alloc] init]; - [numberFormats1_patternArray addObject:@"2"]; - NBNumberFormat *numberFormats1 = [[NBNumberFormat alloc] initWithPattern:@"(2\\d{2})(\\d{3})(\\d{3})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats1_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats1]; - - NSMutableArray *numberFormats2_patternArray = [[NSMutableArray alloc] init]; - [numberFormats2_patternArray addObject:@"[1789]"]; - NBNumberFormat *numberFormats2 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{3})(\\d{2})(\\d{2})(\\d{2})" withFormat:@"$1 $2 $3 $4" withLeadingDigitsPatterns:numberFormats2_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats2]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataMX -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:10]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:11]]; - - NSMutableArray *generalDesc_descArrayPLLO = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPLLO addObject: [NSNumber numberWithInt:7]]; - [generalDesc_descArrayPLLO addObject: [NSNumber numberWithInt:8]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[1-9]\\d{9,10}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:generalDesc_descArrayPLLO withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *fixedLine_descArrayPL = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:10]]; - - NSMutableArray *fixedLine_descArrayPLLO = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPLLO addObject: [NSNumber numberWithInt:7]]; - [fixedLine_descArrayPLLO addObject: [NSNumber numberWithInt:8]]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:33|55|81)\\d{8}|(?:2(?:0[01]|2[2-9]|3[1-35-8]|4[13-9]|7[1-689]|8[1-578]|9[467])|3(?:1[1-79]|[2458][1-9]|7[1-8]|9[1-5])|4(?:1[1-57-9]|[24-6][1-9]|[37][1-8]|8[1-35-9]|9[2-689])|5(?:88|9[1-79])|6(?:1[2-68]|[234][1-9]|5[1-3689]|6[12457-9]|7[1-7]|8[67]|9[4-8])|7(?:[13467][1-9]|2[1-8]|5[13-9]|8[1-69]|9[17])|8(?:2[13-689]|3[1-6]|4[124-6]|6[1246-9]|7[1-378]|9[12479])|9(?:1[346-9]|2[1-4]|3[2-46-8]|5[1348]|[69][1-9]|7[12]|8[1-8]))\\d{7}" withPossibleNumberPattern:nil withPossibleLength:fixedLine_descArrayPL withPossibleLengthLocalOnly:fixedLine_descArrayPLLO withExample:@"2221234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *mobile_descArrayPL = [[NSMutableArray alloc] init]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:11]]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"1(?:(?:33|55|81)\\d{8}|(?:2(?:2[1-9]|3[1-35-8]|4[13-9]|7[1-689]|8[1-578]|9[467])|3(?:1[1-79]|[2458][1-9]|7[1-8]|9[1-5])|4(?:1[1-57-9]|[24-6][1-9]|[37][1-8]|8[1-35-9]|9[2-689])|5(?:88|9[1-79])|6(?:1[2-68]|[2-4][1-9]|5[1-3689]|6[12457-9]|7[1-7]|8[67]|9[4-8])|7(?:[13467][1-9]|2[1-8]|5[13-9]|8[1-69]|9[17])|8(?:2[13-689]|3[1-6]|4[124-6]|6[1246-9]|7[1-378]|9[12479])|9(?:1[346-9]|2[1-4]|3[2-46-8]|5[1348]|[69][1-9]|7[12]|8[1-8]))\\d{7})" withPossibleNumberPattern:nil withPossibleLength:mobile_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"12221234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:10]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"8(?:00|88)\\d{7}" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"8001234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:10]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"900\\d{7}" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"9001234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:10]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"300\\d{7}" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"3001234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:10]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"500\\d{7}" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"5001234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"MX"; - self.countryCode = [NSNumber numberWithInteger:52]; - self.internationalPrefix = @"0[09]"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = @"01"; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = @"0[12]|04[45](\\d{10})"; - self.nationalPrefixTransformRule = @"1$1"; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - [numberFormats0_patternArray addObject:@"33|55|81"]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"([358]\\d)(\\d{4})(\\d{4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:@"01 $1" whenFormatting:YES withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - - NSMutableArray *numberFormats1_patternArray = [[NSMutableArray alloc] init]; - [numberFormats1_patternArray addObject:@"[2467]|3[0-2457-9]|5[089]|8[02-9]|9[0-35-9]"]; - NBNumberFormat *numberFormats1 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{3})(\\d{3})(\\d{4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats1_patternArray withNationalPrefixFormattingRule:@"01 $1" whenFormatting:YES withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats1]; - - NSMutableArray *numberFormats2_patternArray = [[NSMutableArray alloc] init]; - [numberFormats2_patternArray addObject:@"1(?:33|55|81)"]; - NBNumberFormat *numberFormats2 = [[NBNumberFormat alloc] initWithPattern:@"(1)([358]\\d)(\\d{4})(\\d{4})" withFormat:@"044 $2 $3 $4" withLeadingDigitsPatterns:numberFormats2_patternArray withNationalPrefixFormattingRule:@"$1" whenFormatting:YES withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats2]; - - NSMutableArray *numberFormats3_patternArray = [[NSMutableArray alloc] init]; - [numberFormats3_patternArray addObject:@"1(?:[2467]|3[0-2457-9]|5[089]|8[2-9]|9[1-35-9])"]; - NBNumberFormat *numberFormats3 = [[NBNumberFormat alloc] initWithPattern:@"(1)(\\d{3})(\\d{3})(\\d{4})" withFormat:@"044 $2 $3 $4" withLeadingDigitsPatterns:numberFormats3_patternArray withNationalPrefixFormattingRule:@"$1" whenFormatting:YES withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats3]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *intlNumberFormats0_patternArray = [[NSMutableArray alloc] init]; - [intlNumberFormats0_patternArray addObject:@"33|55|81"]; - NBNumberFormat *intlNumberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"([358]\\d)(\\d{4})(\\d{4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:intlNumberFormats0_patternArray withNationalPrefixFormattingRule:@"01 $1" whenFormatting:YES withDomesticCarrierCodeFormattingRule:nil]; - [intlNumberFormats_FormatArray addObject:intlNumberFormats0]; - - NSMutableArray *intlNumberFormats1_patternArray = [[NSMutableArray alloc] init]; - [intlNumberFormats1_patternArray addObject:@"[2467]|3[0-2457-9]|5[089]|8[02-9]|9[0-35-9]"]; - NBNumberFormat *intlNumberFormats1 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{3})(\\d{3})(\\d{4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:intlNumberFormats1_patternArray withNationalPrefixFormattingRule:@"01 $1" whenFormatting:YES withDomesticCarrierCodeFormattingRule:nil]; - [intlNumberFormats_FormatArray addObject:intlNumberFormats1]; - - NSMutableArray *intlNumberFormats2_patternArray = [[NSMutableArray alloc] init]; - [intlNumberFormats2_patternArray addObject:@"1(?:33|55|81)"]; - NBNumberFormat *intlNumberFormats2 = [[NBNumberFormat alloc] initWithPattern:@"(1)([358]\\d)(\\d{4})(\\d{4})" withFormat:@"$1 $2 $3 $4" withLeadingDigitsPatterns:intlNumberFormats2_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [intlNumberFormats_FormatArray addObject:intlNumberFormats2]; - - NSMutableArray *intlNumberFormats3_patternArray = [[NSMutableArray alloc] init]; - [intlNumberFormats3_patternArray addObject:@"1(?:[2467]|3[0-2457-9]|5[089]|8[2-9]|9[1-35-9])"]; - NBNumberFormat *intlNumberFormats3 = [[NBNumberFormat alloc] initWithPattern:@"(1)(\\d{3})(\\d{3})(\\d{4})" withFormat:@"$1 $2 $3 $4" withLeadingDigitsPatterns:intlNumberFormats3_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [intlNumberFormats_FormatArray addObject:intlNumberFormats3]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = YES; - } - return self; -} -@end - -@implementation NBPhoneMetadataPK -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:8]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:9]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:10]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:11]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:12]]; - - NSMutableArray *generalDesc_descArrayPLLO = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPLLO addObject: [NSNumber numberWithInt:6]]; - [generalDesc_descArrayPLLO addObject: [NSNumber numberWithInt:7]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"1\\d{8}|[2-8]\\d{5,11}|9(?:[013-9]\\d{4,9}|2\\d(?:111\\d{6}|\\d{3,7}))" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:generalDesc_descArrayPLLO withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *fixedLine_descArrayPL = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:9]]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:10]]; - - NSMutableArray *fixedLine_descArrayPLLO = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPLLO addObject: [NSNumber numberWithInt:6]]; - [fixedLine_descArrayPLLO addObject: [NSNumber numberWithInt:7]]; - [fixedLine_descArrayPLLO addObject: [NSNumber numberWithInt:8]]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:21|42)[2-9]\\d{7}|(?:2[25]|4[0146-9]|5[1-35-7]|6[1-8]|7[14]|8[16]|91)[2-9]\\d{6}|(?:2(?:3[2358]|4[2-4]|9[2-8])|45[3479]|54[2-467]|60[468]|72[236]|8(?:2[2-689]|3[23578]|4[3478]|5[2356])|9(?:2[2-8]|3[27-9]|4[2-6]|6[3569]|9[25-8]))[2-9]\\d{5,6}|58[126]\\d{7}" withPossibleNumberPattern:nil withPossibleLength:fixedLine_descArrayPL withPossibleLengthLocalOnly:fixedLine_descArrayPLLO withExample:@"2123456789" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *mobile_descArrayPL = [[NSMutableArray alloc] init]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:10]]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"3(?:[014]\\d|2[0-5]|3[0-7]|55|64)\\d{7}" withPossibleNumberPattern:nil withPossibleLength:mobile_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"3012345678" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:8]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"800\\d{5}" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"80012345" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:8]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"900\\d{5}" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"90012345" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"122\\d{6}" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"122044444" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:11]]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:12]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:2(?:[125]|3[2358]|4[2-4]|9[2-8])|4(?:[0-246-9]|5[3479])|5(?:[1-35-7]|4[2-467])|6(?:[1-8]|0[468])|7(?:[14]|2[236])|8(?:[16]|2[2-689]|3[23578]|4[3478]|5[2356])|9(?:1|22|3[27-9]|4[2-6]|6[3569]|9[2-7]))111\\d{6}" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"21111825888" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"PK"; - self.countryCode = [NSNumber numberWithInteger:92]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = @"0"; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = @"0"; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - [numberFormats0_patternArray addObject:@"(?:2[125]|4[0-246-9]|5[1-35-7]|6[1-8]|7[14]|8[16]|91)1"]; - [numberFormats0_patternArray addObject:@"(?:2[125]|4[0-246-9]|5[1-35-7]|6[1-8]|7[14]|8[16]|91)11"]; - [numberFormats0_patternArray addObject:@"(?:2[125]|4[0-246-9]|5[1-35-7]|6[1-8]|7[14]|8[16]|91)111"]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{2})(111)(\\d{3})(\\d{3})" withFormat:@"$1 $2 $3 $4" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:@"(0$1)" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - - NSMutableArray *numberFormats1_patternArray = [[NSMutableArray alloc] init]; - [numberFormats1_patternArray addObject:@"2[349]|45|54|60|72|8[2-5]|9[2-9]"]; - [numberFormats1_patternArray addObject:@"(?:2[349]|45|54|60|72|8[2-5]|9[2-9])\\d1"]; - [numberFormats1_patternArray addObject:@"(?:2[349]|45|54|60|72|8[2-5]|9[2-9])\\d11"]; - [numberFormats1_patternArray addObject:@"(?:2[349]|45|54|60|72|8[2-5]|9[2-9])\\d111"]; - NBNumberFormat *numberFormats1 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{3})(111)(\\d{3})(\\d{3})" withFormat:@"$1 $2 $3 $4" withLeadingDigitsPatterns:numberFormats1_patternArray withNationalPrefixFormattingRule:@"(0$1)" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats1]; - - NSMutableArray *numberFormats2_patternArray = [[NSMutableArray alloc] init]; - [numberFormats2_patternArray addObject:@"(?:2[125]|4[0-246-9]|5[1-35-7]|6[1-8]|7[14]|8[16]|91)[2-9]"]; - NBNumberFormat *numberFormats2 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{2})(\\d{7,8})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats2_patternArray withNationalPrefixFormattingRule:@"(0$1)" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats2]; - - NSMutableArray *numberFormats3_patternArray = [[NSMutableArray alloc] init]; - [numberFormats3_patternArray addObject:@"2[349]|45|54|60|72|8[2-5]|9[2-9]"]; - [numberFormats3_patternArray addObject:@"(?:2[349]|45|54|60|72|8[2-5]|9[2-9])\\d[2-9]"]; - NBNumberFormat *numberFormats3 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{3})(\\d{6,7})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats3_patternArray withNationalPrefixFormattingRule:@"(0$1)" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats3]; - - NSMutableArray *numberFormats4_patternArray = [[NSMutableArray alloc] init]; - [numberFormats4_patternArray addObject:@"3"]; - NBNumberFormat *numberFormats4 = [[NBNumberFormat alloc] initWithPattern:@"(3\\d{2})(\\d{7})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats4_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats4]; - - NSMutableArray *numberFormats5_patternArray = [[NSMutableArray alloc] init]; - [numberFormats5_patternArray addObject:@"58[12]|1"]; - NBNumberFormat *numberFormats5 = [[NBNumberFormat alloc] initWithPattern:@"([15]\\d{3})(\\d{5,6})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats5_patternArray withNationalPrefixFormattingRule:@"(0$1)" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats5]; - - NSMutableArray *numberFormats6_patternArray = [[NSMutableArray alloc] init]; - [numberFormats6_patternArray addObject:@"586"]; - NBNumberFormat *numberFormats6 = [[NBNumberFormat alloc] initWithPattern:@"(586\\d{2})(\\d{5})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats6_patternArray withNationalPrefixFormattingRule:@"(0$1)" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats6]; - - NSMutableArray *numberFormats7_patternArray = [[NSMutableArray alloc] init]; - [numberFormats7_patternArray addObject:@"[89]00"]; - NBNumberFormat *numberFormats7 = [[NBNumberFormat alloc] initWithPattern:@"([89]00)(\\d{3})(\\d{2})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats7_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats7]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataMY -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:8]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:9]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:10]]; - - NSMutableArray *generalDesc_descArrayPLLO = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPLLO addObject: [NSNumber numberWithInt:6]]; - [generalDesc_descArrayPLLO addObject: [NSNumber numberWithInt:7]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[13-9]\\d{7,9}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:generalDesc_descArrayPLLO withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *fixedLine_descArrayPL = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:8]]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:9]]; - - NSMutableArray *fixedLine_descArrayPLLO = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPLLO addObject: [NSNumber numberWithInt:6]]; - [fixedLine_descArrayPLLO addObject: [NSNumber numberWithInt:7]]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:3[2-9]\\d|[4-9][2-9])\\d{6}" withPossibleNumberPattern:nil withPossibleLength:fixedLine_descArrayPL withPossibleLengthLocalOnly:fixedLine_descArrayPLLO withExample:@"323456789" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *mobile_descArrayPL = [[NSMutableArray alloc] init]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:9]]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:10]]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"1(?:1[1-5]\\d{2}|[02-4679][2-9]\\d|59\\d{2}|8(?:1[23]|[2-9]\\d))\\d{5}" withPossibleNumberPattern:nil withPossibleLength:mobile_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"123456789" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:10]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"1[378]00\\d{6}" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"1300123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:10]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"1600\\d{6}" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"1600123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:10]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"154\\d{7}" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"1541234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"MY"; - self.countryCode = [NSNumber numberWithInteger:60]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = @"0"; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = @"0"; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - [numberFormats0_patternArray addObject:@"[4-79]"]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"([4-79])(\\d{3})(\\d{4})" withFormat:@"$1-$2 $3" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - - NSMutableArray *numberFormats1_patternArray = [[NSMutableArray alloc] init]; - [numberFormats1_patternArray addObject:@"3"]; - NBNumberFormat *numberFormats1 = [[NBNumberFormat alloc] initWithPattern:@"(3)(\\d{4})(\\d{4})" withFormat:@"$1-$2 $3" withLeadingDigitsPatterns:numberFormats1_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats1]; - - NSMutableArray *numberFormats2_patternArray = [[NSMutableArray alloc] init]; - [numberFormats2_patternArray addObject:@"1[02-46-9][1-9]|8"]; - NBNumberFormat *numberFormats2 = [[NBNumberFormat alloc] initWithPattern:@"([18]\\d)(\\d{3})(\\d{3,4})" withFormat:@"$1-$2 $3" withLeadingDigitsPatterns:numberFormats2_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats2]; - - NSMutableArray *numberFormats3_patternArray = [[NSMutableArray alloc] init]; - [numberFormats3_patternArray addObject:@"1[36-8]0"]; - NBNumberFormat *numberFormats3 = [[NBNumberFormat alloc] initWithPattern:@"(1)([36-8]00)(\\d{2})(\\d{4})" withFormat:@"$1-$2-$3-$4" withLeadingDigitsPatterns:numberFormats3_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats3]; - - NSMutableArray *numberFormats4_patternArray = [[NSMutableArray alloc] init]; - [numberFormats4_patternArray addObject:@"11"]; - NBNumberFormat *numberFormats4 = [[NBNumberFormat alloc] initWithPattern:@"(11)(\\d{4})(\\d{4})" withFormat:@"$1-$2 $3" withLeadingDigitsPatterns:numberFormats4_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats4]; - - NSMutableArray *numberFormats5_patternArray = [[NSMutableArray alloc] init]; - [numberFormats5_patternArray addObject:@"15"]; - NBNumberFormat *numberFormats5 = [[NBNumberFormat alloc] initWithPattern:@"(15[49])(\\d{3})(\\d{4})" withFormat:@"$1-$2 $3" withLeadingDigitsPatterns:numberFormats5_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats5]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataNU -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:4]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[1-5]\\d{3}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[34]\\d{3}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"4002" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[125]\\d{3}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"1234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"NU"; - self.countryCode = [NSNumber numberWithInteger:683]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = nil; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = nil; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataPL -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:6]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:7]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:8]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[12]\\d{6,8}|[3-57-9]\\d{8}|6\\d{5,8}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *fixedLine_descArrayPL = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:7]]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:1[2-8]|2[2-69]|3[2-4]|4[1-468]|5[24-689]|6[1-3578]|7[14-7]|8[1-79]|9[145])\\d{7}|[12]2\\d{5}" withPossibleNumberPattern:nil withPossibleLength:fixedLine_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"123456789" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *mobile_descArrayPL = [[NSMutableArray alloc] init]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:5[0137]|6[069]|7[2389]|88)\\d{7}" withPossibleNumberPattern:nil withPossibleLength:mobile_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"512345678" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"800\\d{6}" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"800123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"70\\d{7}" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"701234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"801\\d{6}" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"801234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"39\\d{7}" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"391234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"64\\d{4,7}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"641234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"PL"; - self.countryCode = [NSNumber numberWithInteger:48]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = nil; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = nil; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - [numberFormats0_patternArray addObject:@"[14]|2[0-57-9]|3[2-4]|5[24-689]|6[1-3578]|7[14-7]|8[1-79]|9[145]"]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{2})(\\d{3})(\\d{2})(\\d{2})" withFormat:@"$1 $2 $3 $4" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - - NSMutableArray *numberFormats1_patternArray = [[NSMutableArray alloc] init]; - [numberFormats1_patternArray addObject:@"[12]2"]; - NBNumberFormat *numberFormats1 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{2})(\\d{1})(\\d{4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats1_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats1]; - - NSMutableArray *numberFormats2_patternArray = [[NSMutableArray alloc] init]; - [numberFormats2_patternArray addObject:@"26|39|5[0137]|6[0469]|7[02389]|8[08]"]; - NBNumberFormat *numberFormats2 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{3})(\\d{3})(\\d{3})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats2_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats2]; - - NSMutableArray *numberFormats3_patternArray = [[NSMutableArray alloc] init]; - [numberFormats3_patternArray addObject:@"64"]; - NBNumberFormat *numberFormats3 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{3})(\\d{2})(\\d{2,3})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats3_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats3]; - - NSMutableArray *numberFormats4_patternArray = [[NSMutableArray alloc] init]; - [numberFormats4_patternArray addObject:@"64"]; - NBNumberFormat *numberFormats4 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{3})(\\d{3})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats4_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats4]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataMZ -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:8]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[28]\\d{7,8}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *fixedLine_descArrayPL = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:8]]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"2(?:[1346]\\d|5[0-2]|[78][12]|93)\\d{5}" withPossibleNumberPattern:nil withPossibleLength:fixedLine_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"21123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *mobile_descArrayPL = [[NSMutableArray alloc] init]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"8[2-7]\\d{7}" withPossibleNumberPattern:nil withPossibleLength:mobile_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"821234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"800\\d{6}" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"800123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"MZ"; - self.countryCode = [NSNumber numberWithInteger:258]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = nil; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = nil; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - [numberFormats0_patternArray addObject:@"2|8[2-7]"]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"([28]\\d)(\\d{3})(\\d{3,4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - - NSMutableArray *numberFormats1_patternArray = [[NSMutableArray alloc] init]; - [numberFormats1_patternArray addObject:@"80"]; - NBNumberFormat *numberFormats1 = [[NBNumberFormat alloc] initWithPattern:@"(80\\d)(\\d{3})(\\d{3})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats1_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats1]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataPM -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:6]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[45]\\d{5}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"41\\d{4}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"411234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"55\\d{4}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"551234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"PM"; - self.countryCode = [NSNumber numberWithInteger:508]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = @"0"; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = @"0"; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"([45]\\d)(\\d{2})(\\d{2})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataRE -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[268]\\d{8}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"262\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"262161234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"69[23]\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"692123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"80\\d{7}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"801234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"89[1-37-9]\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"891123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"8(?:1[019]|2[0156]|84|90)\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"810123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"RE"; - self.countryCode = [NSNumber numberWithInteger:262]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = @"0"; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = @"0"; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"([268]\\d{2})(\\d{2})(\\d{2})(\\d{2})" withFormat:@"$1 $2 $3 $4" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = YES; - self.leadingDigits = @"262|6[49]|8"; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataSA -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:8]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:9]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:10]]; - - NSMutableArray *generalDesc_descArrayPLLO = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPLLO addObject: [NSNumber numberWithInt:7]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"1\\d{7,8}|(?:[2-467]|92)\\d{7}|5\\d{8}|8\\d{9}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:generalDesc_descArrayPLLO withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *fixedLine_descArrayPL = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:8]]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:9]]; - - NSMutableArray *fixedLine_descArrayPLLO = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPLLO addObject: [NSNumber numberWithInt:7]]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"11\\d{7}|1?(?:2[24-8]|3[35-8]|4[3-68]|6[2-5]|7[235-7])\\d{6}" withPossibleNumberPattern:nil withPossibleLength:fixedLine_descArrayPL withPossibleLengthLocalOnly:fixedLine_descArrayPLLO withExample:@"112345678" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *mobile_descArrayPL = [[NSMutableArray alloc] init]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:9]]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:10]]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:5(?:[013-689]\\d|7[0-26-8])|811\\d)\\d{6}" withPossibleNumberPattern:nil withPossibleLength:mobile_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"512345678" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:10]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"800\\d{7}" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"8001234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"92[05]\\d{6}" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"920012345" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"SA"; - self.countryCode = [NSNumber numberWithInteger:966]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = @"0"; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = @"0"; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - [numberFormats0_patternArray addObject:@"[1-467]"]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"([1-467])(\\d{3})(\\d{4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - - NSMutableArray *numberFormats1_patternArray = [[NSMutableArray alloc] init]; - [numberFormats1_patternArray addObject:@"1[1-467]"]; - NBNumberFormat *numberFormats1 = [[NBNumberFormat alloc] initWithPattern:@"(1\\d)(\\d{3})(\\d{4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats1_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats1]; - - NSMutableArray *numberFormats2_patternArray = [[NSMutableArray alloc] init]; - [numberFormats2_patternArray addObject:@"5"]; - NBNumberFormat *numberFormats2 = [[NBNumberFormat alloc] initWithPattern:@"(5\\d)(\\d{3})(\\d{4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats2_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats2]; - - NSMutableArray *numberFormats3_patternArray = [[NSMutableArray alloc] init]; - [numberFormats3_patternArray addObject:@"92"]; - NBNumberFormat *numberFormats3 = [[NBNumberFormat alloc] initWithPattern:@"(92\\d{2})(\\d{5})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats3_patternArray withNationalPrefixFormattingRule:@"$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats3]; - - NSMutableArray *numberFormats4_patternArray = [[NSMutableArray alloc] init]; - [numberFormats4_patternArray addObject:@"80"]; - NBNumberFormat *numberFormats4 = [[NBNumberFormat alloc] initWithPattern:@"(800)(\\d{3})(\\d{4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats4_patternArray withNationalPrefixFormattingRule:@"$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats4]; - - NSMutableArray *numberFormats5_patternArray = [[NSMutableArray alloc] init]; - [numberFormats5_patternArray addObject:@"81"]; - NBNumberFormat *numberFormats5 = [[NBNumberFormat alloc] initWithPattern:@"(811)(\\d{3})(\\d{3,4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats5_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats5]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataSB -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:5]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:7]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[1-9]\\d{4,6}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *fixedLine_descArrayPL = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:5]]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:1[4-79]|[23]\\d|4[0-2]|5[03]|6[0-37])\\d{3}" withPossibleNumberPattern:nil withPossibleLength:fixedLine_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"40123" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"48\\d{3}|7(?:30|[46-8]\\d|5[025-9]|9[0-5])\\d{4}|8[4-9]\\d{5}|9(?:1[2-9]|2[013-9]|3[0-2]|[46]\\d|5[0-46-9]|7[0-689]|8[0-79]|9[0-8])\\d{4}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"7421234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:5]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"1[38]\\d{3}" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"18123" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:5]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"5[12]\\d{3}" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"51123" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"SB"; - self.countryCode = [NSNumber numberWithInteger:677]; - self.internationalPrefix = @"0[01]"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = nil; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = nil; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - [numberFormats0_patternArray addObject:@"[7-9]"]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{2})(\\d{5})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataNZ -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:8]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:9]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:10]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:11]]; - - NSMutableArray *generalDesc_descArrayPLLO = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPLLO addObject: [NSNumber numberWithInt:7]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"6[235-9]\\d{6}|[2-57-9]\\d{7,10}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:generalDesc_descArrayPLLO withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *fixedLine_descArrayPL = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:8]]; - - NSMutableArray *fixedLine_descArrayPLLO = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPLLO addObject: [NSNumber numberWithInt:7]]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:3[2-79]|[49][2-9]|6[235-9]|7[2-57-9])\\d{6}|24099\\d{3}" withPossibleNumberPattern:nil withPossibleLength:fixedLine_descArrayPL withPossibleLengthLocalOnly:fixedLine_descArrayPLLO withExample:@"32345678" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *mobile_descArrayPL = [[NSMutableArray alloc] init]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:8]]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:9]]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:10]]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"2(?:[028]\\d{7,8}|1(?:[03]\\d{5,7}|[12457]\\d{5,6}|[689]\\d{5})|[79]\\d{7})" withPossibleNumberPattern:nil withPossibleLength:mobile_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"211234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:8]]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:9]]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:10]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"508\\d{6,7}|80\\d{6,8}" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"800123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:9]]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:10]]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:11]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"90\\d{7,9}" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"900123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"70\\d{7}" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"701234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:8]]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[28]6\\d{6,7}" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"26123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"NZ"; - self.countryCode = [NSNumber numberWithInteger:64]; - self.internationalPrefix = @"0(?:0|161)"; - self.preferredInternationalPrefix = @"00"; - self.nationalPrefix = @"0"; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = @"0"; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - [numberFormats0_patternArray addObject:@"[346]|7[2-57-9]|9[1-9]"]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"([34679])(\\d{3})(\\d{4})" withFormat:@"$1-$2 $3" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - - NSMutableArray *numberFormats1_patternArray = [[NSMutableArray alloc] init]; - [numberFormats1_patternArray addObject:@"240"]; - [numberFormats1_patternArray addObject:@"2409"]; - [numberFormats1_patternArray addObject:@"24099"]; - NBNumberFormat *numberFormats1 = [[NBNumberFormat alloc] initWithPattern:@"(24099)(\\d{3})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats1_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats1]; - - NSMutableArray *numberFormats2_patternArray = [[NSMutableArray alloc] init]; - [numberFormats2_patternArray addObject:@"21"]; - NBNumberFormat *numberFormats2 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{2})(\\d{3})(\\d{3})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats2_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats2]; - - NSMutableArray *numberFormats3_patternArray = [[NSMutableArray alloc] init]; - [numberFormats3_patternArray addObject:@"2(?:1[1-9]|[69]|7[0-35-9])|70|86"]; - NBNumberFormat *numberFormats3 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{2})(\\d{3})(\\d{3,5})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats3_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats3]; - - NSMutableArray *numberFormats4_patternArray = [[NSMutableArray alloc] init]; - [numberFormats4_patternArray addObject:@"2[028]"]; - NBNumberFormat *numberFormats4 = [[NBNumberFormat alloc] initWithPattern:@"(2\\d)(\\d{3,4})(\\d{4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats4_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats4]; - - NSMutableArray *numberFormats5_patternArray = [[NSMutableArray alloc] init]; - [numberFormats5_patternArray addObject:@"2(?:10|74)|5|[89]0"]; - NBNumberFormat *numberFormats5 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{3})(\\d{3})(\\d{3,4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats5_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats5]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataSC -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:7]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[24689]\\d{5,6}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"4[2-46]\\d{5}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"4217123" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"2[5-8]\\d{5}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"2510123" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"8000\\d{3}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"8000000" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:64\\d|971)\\d{4}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"6412345" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"SC"; - self.countryCode = [NSNumber numberWithInteger:248]; - self.internationalPrefix = @"0(?:[02]|10?)"; - self.preferredInternationalPrefix = @"00"; - self.nationalPrefix = nil; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = nil; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - [numberFormats0_patternArray addObject:@"[246]"]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(\\d)(\\d{3})(\\d{3})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataSD -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[19]\\d{8}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"1(?:[125]\\d|8[3567])\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"121231234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"9[0-3569]\\d{7}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"911231234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"SD"; - self.countryCode = [NSNumber numberWithInteger:249]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = @"0"; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = @"0"; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{2})(\\d{3})(\\d{4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataPR -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:10]]; - - NSMutableArray *generalDesc_descArrayPLLO = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPLLO addObject: [NSNumber numberWithInt:7]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[5789]\\d{9}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:generalDesc_descArrayPLLO withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *fixedLine_descArrayPLLO = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPLLO addObject: [NSNumber numberWithInt:7]]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:787|939)[2-9]\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:fixedLine_descArrayPLLO withExample:@"7872345678" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *mobile_descArrayPLLO = [[NSMutableArray alloc] init]; - [mobile_descArrayPLLO addObject: [NSNumber numberWithInt:7]]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:787|939)[2-9]\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:mobile_descArrayPLLO withExample:@"7872345678" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"8(?:00|33|44|55|66|77|88)[2-9]\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"8002345678" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"900[2-9]\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"9002345678" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"5(?:00|22|33|44|66|77|88)[2-9]\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"5002345678" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"PR"; - self.countryCode = [NSNumber numberWithInteger:1]; - self.internationalPrefix = @"011"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = @"1"; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = @"1"; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = YES; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = @"787|939"; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataSE -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:6]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:7]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:8]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:9]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:10]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:12]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[1-35-9]\\d{5,11}|4\\d{6,8}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *fixedLine_descArrayPL = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:7]]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:8]]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"1(?:0[1-8]\\d{6}|[136]\\d{5,7}|(?:2[0-35]|4[0-4]|5[0-25-9]|7[13-6]|[89]\\d)\\d{5,6})|2(?:[136]\\d{5,7}|(?:2[0-7]|4[0136-8]|5[0138]|7[018]|8[01]|9[0-57])\\d{5,6})|3(?:[356]\\d{5,7}|(?:0[0-4]|1\\d|2[0-25]|4[056]|7[0-2]|8[0-3]|9[023])\\d{5,6})|4(?:[0246]\\d{5,7}|(?:1[013-8]|3[0135]|5[14-79]|7[0-246-9]|8[0156]|9[0-689])\\d{5,6})|5(?:0[0-6]|[15][0-5]|2[0-68]|3[0-4]|4\\d|6[03-5]|7[013]|8[0-79]|9[01])\\d{5,6}|6(?:[03]\\d{5,7}|(?:1[1-3]|2[0-4]|4[02-57]|5[0-37]|6[0-3]|7[0-2]|8[0247]|9[0-356])\\d{5,6})|8\\d{6,8}|9(?:0[1-9]\\d{4,6}|(?:1[0-68]|2\\d|3[02-5]|4[0-3]|5[0-4]|[68][01]|7[0135-8])\\d{5,6})" withPossibleNumberPattern:nil withPossibleLength:fixedLine_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"8123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *mobile_descArrayPL = [[NSMutableArray alloc] init]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"7[02369]\\d{7}" withPossibleNumberPattern:nil withPossibleLength:mobile_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"701234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:6]]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:7]]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:8]]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"20\\d{4,7}" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"20123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:7]]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:8]]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:9]]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:10]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"649\\d{6}|9(?:00|39|44)[1-8]\\d{3,6}" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"9001234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:6]]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"77(?:0\\d{3}(?:\\d{3})?|[1-7]\\d{6})" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"771234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"75[1-8]\\d{6}" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"751234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"74[02-9]\\d{6}" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"740123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:12]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:25[245]|67[3-6])\\d{9}" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"254123456789" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"SE"; - self.countryCode = [NSNumber numberWithInteger:46]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = @"0"; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = @"0"; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - [numberFormats0_patternArray addObject:@"8"]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(8)(\\d{2,3})(\\d{2,3})(\\d{2})" withFormat:@"$1-$2 $3 $4" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - - NSMutableArray *numberFormats1_patternArray = [[NSMutableArray alloc] init]; - [numberFormats1_patternArray addObject:@"1[013689]|2[0136]|3[1356]|4[0246]|54|6[03]|90"]; - NBNumberFormat *numberFormats1 = [[NBNumberFormat alloc] initWithPattern:@"([1-69]\\d)(\\d{2,3})(\\d{2})(\\d{2})" withFormat:@"$1-$2 $3 $4" withLeadingDigitsPatterns:numberFormats1_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats1]; - - NSMutableArray *numberFormats2_patternArray = [[NSMutableArray alloc] init]; - [numberFormats2_patternArray addObject:@"1[136]|2[136]|3[356]|4[0246]|6[03]|90"]; - NBNumberFormat *numberFormats2 = [[NBNumberFormat alloc] initWithPattern:@"([1-469]\\d)(\\d{3})(\\d{2})" withFormat:@"$1-$2 $3" withLeadingDigitsPatterns:numberFormats2_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats2]; - - NSMutableArray *numberFormats3_patternArray = [[NSMutableArray alloc] init]; - [numberFormats3_patternArray addObject:@"1[2457]|2(?:[247-9]|5[0138])|3[0247-9]|4[1357-9]|5[0-35-9]|6(?:[124-689]|7[0-2])|9(?:[125-8]|3[0-5]|4[0-3])"]; - NBNumberFormat *numberFormats3 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{3})(\\d{2})(\\d{2})(\\d{2})" withFormat:@"$1-$2 $3 $4" withLeadingDigitsPatterns:numberFormats3_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats3]; - - NSMutableArray *numberFormats4_patternArray = [[NSMutableArray alloc] init]; - [numberFormats4_patternArray addObject:@"1[2457]|2(?:[247-9]|5[0138])|3[0247-9]|4[1357-9]|5[0-35-9]|6(?:[124-689]|7[0-2])|9(?:[125-8]|3[0-5]|4[0-3])"]; - NBNumberFormat *numberFormats4 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{3})(\\d{2,3})(\\d{2})" withFormat:@"$1-$2 $3" withLeadingDigitsPatterns:numberFormats4_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats4]; - - NSMutableArray *numberFormats5_patternArray = [[NSMutableArray alloc] init]; - [numberFormats5_patternArray addObject:@"7"]; - NBNumberFormat *numberFormats5 = [[NBNumberFormat alloc] initWithPattern:@"(7\\d)(\\d{3})(\\d{2})(\\d{2})" withFormat:@"$1-$2 $3 $4" withLeadingDigitsPatterns:numberFormats5_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats5]; - - NSMutableArray *numberFormats6_patternArray = [[NSMutableArray alloc] init]; - [numberFormats6_patternArray addObject:@"7"]; - NBNumberFormat *numberFormats6 = [[NBNumberFormat alloc] initWithPattern:@"(77)(\\d{2})(\\d{2})" withFormat:@"$1-$2$3" withLeadingDigitsPatterns:numberFormats6_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats6]; - - NSMutableArray *numberFormats7_patternArray = [[NSMutableArray alloc] init]; - [numberFormats7_patternArray addObject:@"20"]; - NBNumberFormat *numberFormats7 = [[NBNumberFormat alloc] initWithPattern:@"(20)(\\d{2,3})(\\d{2})" withFormat:@"$1-$2 $3" withLeadingDigitsPatterns:numberFormats7_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats7]; - - NSMutableArray *numberFormats8_patternArray = [[NSMutableArray alloc] init]; - [numberFormats8_patternArray addObject:@"9[034]"]; - NBNumberFormat *numberFormats8 = [[NBNumberFormat alloc] initWithPattern:@"(9[034]\\d)(\\d{2})(\\d{2})(\\d{3})" withFormat:@"$1-$2 $3 $4" withLeadingDigitsPatterns:numberFormats8_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats8]; - - NSMutableArray *numberFormats9_patternArray = [[NSMutableArray alloc] init]; - [numberFormats9_patternArray addObject:@"9[034]"]; - NBNumberFormat *numberFormats9 = [[NBNumberFormat alloc] initWithPattern:@"(9[034]\\d)(\\d{4})" withFormat:@"$1-$2" withLeadingDigitsPatterns:numberFormats9_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats9]; - - NSMutableArray *numberFormats10_patternArray = [[NSMutableArray alloc] init]; - [numberFormats10_patternArray addObject:@"25[245]|67[3-6]"]; - NBNumberFormat *numberFormats10 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{3})(\\d{2})(\\d{3})(\\d{2})(\\d{2})" withFormat:@"$1-$2 $3 $4 $5" withLeadingDigitsPatterns:numberFormats10_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats10]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *intlNumberFormats0_patternArray = [[NSMutableArray alloc] init]; - [intlNumberFormats0_patternArray addObject:@"8"]; - NBNumberFormat *intlNumberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(8)(\\d{2,3})(\\d{2,3})(\\d{2})" withFormat:@"$1 $2 $3 $4" withLeadingDigitsPatterns:intlNumberFormats0_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [intlNumberFormats_FormatArray addObject:intlNumberFormats0]; - - NSMutableArray *intlNumberFormats1_patternArray = [[NSMutableArray alloc] init]; - [intlNumberFormats1_patternArray addObject:@"1[013689]|2[0136]|3[1356]|4[0246]|54|6[03]|90"]; - NBNumberFormat *intlNumberFormats1 = [[NBNumberFormat alloc] initWithPattern:@"([1-69]\\d)(\\d{2,3})(\\d{2})(\\d{2})" withFormat:@"$1 $2 $3 $4" withLeadingDigitsPatterns:intlNumberFormats1_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [intlNumberFormats_FormatArray addObject:intlNumberFormats1]; - - NSMutableArray *intlNumberFormats2_patternArray = [[NSMutableArray alloc] init]; - [intlNumberFormats2_patternArray addObject:@"1[136]|2[136]|3[356]|4[0246]|6[03]|90"]; - NBNumberFormat *intlNumberFormats2 = [[NBNumberFormat alloc] initWithPattern:@"([1-469]\\d)(\\d{3})(\\d{2})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:intlNumberFormats2_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [intlNumberFormats_FormatArray addObject:intlNumberFormats2]; - - NSMutableArray *intlNumberFormats3_patternArray = [[NSMutableArray alloc] init]; - [intlNumberFormats3_patternArray addObject:@"1[2457]|2(?:[247-9]|5[0138])|3[0247-9]|4[1357-9]|5[0-35-9]|6(?:[124-689]|7[0-2])|9(?:[125-8]|3[0-5]|4[0-3])"]; - NBNumberFormat *intlNumberFormats3 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{3})(\\d{2})(\\d{2})(\\d{2})" withFormat:@"$1 $2 $3 $4" withLeadingDigitsPatterns:intlNumberFormats3_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [intlNumberFormats_FormatArray addObject:intlNumberFormats3]; - - NSMutableArray *intlNumberFormats4_patternArray = [[NSMutableArray alloc] init]; - [intlNumberFormats4_patternArray addObject:@"1[2457]|2(?:[247-9]|5[0138])|3[0247-9]|4[1357-9]|5[0-35-9]|6(?:[124-689]|7[0-2])|9(?:[125-8]|3[0-5]|4[0-3])"]; - NBNumberFormat *intlNumberFormats4 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{3})(\\d{2,3})(\\d{2})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:intlNumberFormats4_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [intlNumberFormats_FormatArray addObject:intlNumberFormats4]; - - NSMutableArray *intlNumberFormats5_patternArray = [[NSMutableArray alloc] init]; - [intlNumberFormats5_patternArray addObject:@"7"]; - NBNumberFormat *intlNumberFormats5 = [[NBNumberFormat alloc] initWithPattern:@"(7\\d)(\\d{3})(\\d{2})(\\d{2})" withFormat:@"$1 $2 $3 $4" withLeadingDigitsPatterns:intlNumberFormats5_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [intlNumberFormats_FormatArray addObject:intlNumberFormats5]; - - NSMutableArray *intlNumberFormats6_patternArray = [[NSMutableArray alloc] init]; - [intlNumberFormats6_patternArray addObject:@"7"]; - NBNumberFormat *intlNumberFormats6 = [[NBNumberFormat alloc] initWithPattern:@"(77)(\\d{2})(\\d{2})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:intlNumberFormats6_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [intlNumberFormats_FormatArray addObject:intlNumberFormats6]; - - NSMutableArray *intlNumberFormats7_patternArray = [[NSMutableArray alloc] init]; - [intlNumberFormats7_patternArray addObject:@"20"]; - NBNumberFormat *intlNumberFormats7 = [[NBNumberFormat alloc] initWithPattern:@"(20)(\\d{2,3})(\\d{2})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:intlNumberFormats7_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [intlNumberFormats_FormatArray addObject:intlNumberFormats7]; - - NSMutableArray *intlNumberFormats8_patternArray = [[NSMutableArray alloc] init]; - [intlNumberFormats8_patternArray addObject:@"9[034]"]; - NBNumberFormat *intlNumberFormats8 = [[NBNumberFormat alloc] initWithPattern:@"(9[034]\\d)(\\d{2})(\\d{2})(\\d{3})" withFormat:@"$1 $2 $3 $4" withLeadingDigitsPatterns:intlNumberFormats8_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [intlNumberFormats_FormatArray addObject:intlNumberFormats8]; - - NSMutableArray *intlNumberFormats9_patternArray = [[NSMutableArray alloc] init]; - [intlNumberFormats9_patternArray addObject:@"9[034]"]; - NBNumberFormat *intlNumberFormats9 = [[NBNumberFormat alloc] initWithPattern:@"(9[034]\\d)(\\d{4})" withFormat:@"$1 $2" withLeadingDigitsPatterns:intlNumberFormats9_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [intlNumberFormats_FormatArray addObject:intlNumberFormats9]; - - NSMutableArray *intlNumberFormats10_patternArray = [[NSMutableArray alloc] init]; - [intlNumberFormats10_patternArray addObject:@"25[245]|67[3-6]"]; - NBNumberFormat *intlNumberFormats10 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{3})(\\d{2})(\\d{3})(\\d{2})(\\d{2})" withFormat:@"$1 $2 $3 $4 $5" withLeadingDigitsPatterns:intlNumberFormats10_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [intlNumberFormats_FormatArray addObject:intlNumberFormats10]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataPS -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:4]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:5]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:8]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:9]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:10]]; - - NSMutableArray *generalDesc_descArrayPLLO = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPLLO addObject: [NSNumber numberWithInt:7]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[24589]\\d{7,8}|1(?:[78]\\d{8}|[49]\\d{2,3})" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:generalDesc_descArrayPLLO withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *fixedLine_descArrayPL = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:8]]; - - NSMutableArray *fixedLine_descArrayPLLO = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPLLO addObject: [NSNumber numberWithInt:7]]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:22[234789]|42[45]|82[01458]|92[369])\\d{5}" withPossibleNumberPattern:nil withPossibleLength:fixedLine_descArrayPL withPossibleLengthLocalOnly:fixedLine_descArrayPLLO withExample:@"22234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *mobile_descArrayPL = [[NSMutableArray alloc] init]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"5[69]\\d{7}" withPossibleNumberPattern:nil withPossibleLength:mobile_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"599123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:10]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"1800\\d{6}" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"1800123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:4]]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:5]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"1(?:4|9\\d)\\d{2}" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"19123" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:10]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"1700\\d{6}" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"1700123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"PS"; - self.countryCode = [NSNumber numberWithInteger:970]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = @"0"; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = @"0"; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - [numberFormats0_patternArray addObject:@"[2489]"]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"([2489])(2\\d{2})(\\d{4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - - NSMutableArray *numberFormats1_patternArray = [[NSMutableArray alloc] init]; - [numberFormats1_patternArray addObject:@"5"]; - NBNumberFormat *numberFormats1 = [[NBNumberFormat alloc] initWithPattern:@"(5[69]\\d)(\\d{3})(\\d{3})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats1_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats1]; - - NSMutableArray *numberFormats2_patternArray = [[NSMutableArray alloc] init]; - [numberFormats2_patternArray addObject:@"1[78]"]; - NBNumberFormat *numberFormats2 = [[NBNumberFormat alloc] initWithPattern:@"(1[78]00)(\\d{3})(\\d{3})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats2_patternArray withNationalPrefixFormattingRule:@"$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats2]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataTA -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:4]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"8\\d{3}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"8\\d{3}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"8999" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *mobile_descArrayPL = [[NSMutableArray alloc] init]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:mobile_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"TA"; - self.countryCode = [NSNumber numberWithInteger:290]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = nil; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = nil; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataPT -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[2-46-9]\\d{8}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"2(?:[12]\\d|[35][1-689]|4[1-59]|6[1-35689]|7[1-9]|8[1-69]|9[1256])\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"212345678" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"9(?:[1236]\\d{2}|480)\\d{5}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"912345678" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"80[02]\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"800123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"6(?:0[178]|4[68])\\d{6}|76(?:0[1-57]|1[2-47]|2[237])\\d{5}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"760123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"80(?:8\\d|9[1579])\\d{5}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"808123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"884[0-4689]\\d{5}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"884123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"30\\d{7}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"301234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"7(?:0(?:7\\d|8[17]))\\d{5}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"707123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"600\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"600110000" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"PT"; - self.countryCode = [NSNumber numberWithInteger:351]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = nil; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = nil; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - [numberFormats0_patternArray addObject:@"2[12]"]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(2\\d)(\\d{3})(\\d{4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - - NSMutableArray *numberFormats1_patternArray = [[NSMutableArray alloc] init]; - [numberFormats1_patternArray addObject:@"2[3-9]|[346-9]"]; - NBNumberFormat *numberFormats1 = [[NBNumberFormat alloc] initWithPattern:@"([2-46-9]\\d{2})(\\d{3})(\\d{3})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats1_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats1]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataSG -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:8]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:10]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:11]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[36]\\d{7}|[17-9]\\d{7,10}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *fixedLine_descArrayPL = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:8]]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"6[1-9]\\d{6}" withPossibleNumberPattern:nil withPossibleLength:fixedLine_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"61234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *mobile_descArrayPL = [[NSMutableArray alloc] init]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:8]]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:8[1-8]|9[0-8])\\d{6}" withPossibleNumberPattern:nil withPossibleLength:mobile_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"81234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:10]]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:11]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"1?800\\d{7}" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"18001234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:11]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"1900\\d{7}" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"19001234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:8]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"3[12]\\d{6}" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"31234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:11]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"7000\\d{7}" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"70001234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"SG"; - self.countryCode = [NSNumber numberWithInteger:65]; - self.internationalPrefix = @"0[0-3]\\d"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = nil; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = nil; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - [numberFormats0_patternArray addObject:@"[369]|8[1-9]"]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"([3689]\\d{3})(\\d{4})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - - NSMutableArray *numberFormats1_patternArray = [[NSMutableArray alloc] init]; - [numberFormats1_patternArray addObject:@"1[89]"]; - NBNumberFormat *numberFormats1 = [[NBNumberFormat alloc] initWithPattern:@"(1[89]00)(\\d{3})(\\d{4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats1_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats1]; - - NSMutableArray *numberFormats2_patternArray = [[NSMutableArray alloc] init]; - [numberFormats2_patternArray addObject:@"70"]; - NBNumberFormat *numberFormats2 = [[NBNumberFormat alloc] initWithPattern:@"(7000)(\\d{4})(\\d{3})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats2_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats2]; - - NSMutableArray *numberFormats3_patternArray = [[NSMutableArray alloc] init]; - [numberFormats3_patternArray addObject:@"80"]; - NBNumberFormat *numberFormats3 = [[NBNumberFormat alloc] initWithPattern:@"(800)(\\d{3})(\\d{4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats3_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats3]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataTC -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:10]]; - - NSMutableArray *generalDesc_descArrayPLLO = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPLLO addObject: [NSNumber numberWithInt:7]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[5689]\\d{9}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:generalDesc_descArrayPLLO withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *fixedLine_descArrayPLLO = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPLLO addObject: [NSNumber numberWithInt:7]]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"649(?:712|9(?:4\\d|50))\\d{4}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:fixedLine_descArrayPLLO withExample:@"6497121234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *mobile_descArrayPLLO = [[NSMutableArray alloc] init]; - [mobile_descArrayPLLO addObject: [NSNumber numberWithInt:7]]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"649(?:2(?:3[129]|4[1-7])|3(?:3[1-389]|4[1-8])|4[34][1-3])\\d{4}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:mobile_descArrayPLLO withExample:@"6492311234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"8(?:00|33|44|55|66|77|88)[2-9]\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"8002345678" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"900[2-9]\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"9002345678" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"5(?:00|22|33|44|66|77|88)[2-9]\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"5002345678" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPLLO = [[NSMutableArray alloc] init]; - [voip_descArrayPLLO addObject: [NSNumber numberWithInt:7]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"64971[01]\\d{4}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:voip_descArrayPLLO withExample:@"6497101234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"TC"; - self.countryCode = [NSNumber numberWithInteger:1]; - self.internationalPrefix = @"011"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = @"1"; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = @"1"; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = @"649"; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataSH -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:4]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:5]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[256]\\d{4}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"2(?:[0-57-9]\\d|6[4-9])\\d{2}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"22158" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *mobile_descArrayPL = [[NSMutableArray alloc] init]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:5]]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[56]\\d{4}" withPossibleNumberPattern:nil withPossibleLength:mobile_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"51234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:5]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"262\\d{2}" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"26212" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"SH"; - self.countryCode = [NSNumber numberWithInteger:290]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = nil; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = nil; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = YES; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataTD -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:8]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[2679]\\d{7}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"22(?:[3789]0|5[0-5]|6[89])\\d{4}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"22501234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:6[023568]\\d|77\\d|9\\d{2})\\d{5}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"63012345" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"TD"; - self.countryCode = [NSNumber numberWithInteger:235]; - self.internationalPrefix = @"00|16"; - self.preferredInternationalPrefix = @"00"; - self.nationalPrefix = nil; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = nil; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{2})(\\d{2})(\\d{2})(\\d{2})" withFormat:@"$1 $2 $3 $4" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataSI -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:5]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:6]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:7]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:8]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[1-7]\\d{6,7}|[89]\\d{4,7}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *fixedLine_descArrayPL = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:8]]; - - NSMutableArray *fixedLine_descArrayPLLO = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPLLO addObject: [NSNumber numberWithInt:7]]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:1\\d|[25][2-8]|3[24-8]|4[24-8]|7[3-8])\\d{6}" withPossibleNumberPattern:nil withPossibleLength:fixedLine_descArrayPL withPossibleLengthLocalOnly:fixedLine_descArrayPLLO withExample:@"11234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *mobile_descArrayPL = [[NSMutableArray alloc] init]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:8]]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:[37][01]|4[0139]|51|6[48])\\d{6}" withPossibleNumberPattern:nil withPossibleLength:mobile_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"31234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:6]]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:7]]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:8]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"80\\d{4,6}" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"80123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"90\\d{4,6}|89[1-3]\\d{2,5}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"90123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:8]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:59|8[1-3])\\d{6}" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"59012345" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"SI"; - self.countryCode = [NSNumber numberWithInteger:386]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = @"0"; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = @"0"; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - [numberFormats0_patternArray addObject:@"[12]|3[24-8]|4[24-8]|5[2-8]|7[3-8]"]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(\\d)(\\d{3})(\\d{2})(\\d{2})" withFormat:@"$1 $2 $3 $4" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:@"(0$1)" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - - NSMutableArray *numberFormats1_patternArray = [[NSMutableArray alloc] init]; - [numberFormats1_patternArray addObject:@"[37][01]|4[0139]|51|6"]; - NBNumberFormat *numberFormats1 = [[NBNumberFormat alloc] initWithPattern:@"([3-7]\\d)(\\d{3})(\\d{3})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats1_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats1]; - - NSMutableArray *numberFormats2_patternArray = [[NSMutableArray alloc] init]; - [numberFormats2_patternArray addObject:@"[89][09]"]; - NBNumberFormat *numberFormats2 = [[NBNumberFormat alloc] initWithPattern:@"([89][09])(\\d{3,6})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats2_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats2]; - - NSMutableArray *numberFormats3_patternArray = [[NSMutableArray alloc] init]; - [numberFormats3_patternArray addObject:@"59|8[1-3]"]; - NBNumberFormat *numberFormats3 = [[NBNumberFormat alloc] initWithPattern:@"([58]\\d{2})(\\d{5})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats3_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats3]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataPW -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:7]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[2-8]\\d{6}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"2552255|(?:277|345|488|5(?:35|44|87)|6(?:22|54|79)|7(?:33|47)|8(?:24|55|76))\\d{4}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"2771234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:6[234689]0|77[45789])\\d{4}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"6201234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"PW"; - self.countryCode = [NSNumber numberWithInteger:680]; - self.internationalPrefix = @"01[12]"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = nil; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = nil; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{3})(\\d{4})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataSJ -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:5]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:8]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"0\\d{4}|[45789]\\d{7}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *fixedLine_descArrayPL = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:8]]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"79\\d{6}" withPossibleNumberPattern:nil withPossibleLength:fixedLine_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"79123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *mobile_descArrayPL = [[NSMutableArray alloc] init]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:8]]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:4[015-8]|5[89]|9\\d)\\d{6}" withPossibleNumberPattern:nil withPossibleLength:mobile_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"41234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:8]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"80[01]\\d{5}" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"80012345" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:8]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"82[09]\\d{5}" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"82012345" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:8]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"810(?:0[0-6]|[2-8]\\d)\\d{3}" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"81021234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:8]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"880\\d{5}" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"88012345" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:8]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"85[0-5]\\d{5}" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"85012345" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"0\\d{4}|81(?:0(?:0[7-9]|1\\d)|5\\d{2})\\d{3}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"01234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:8]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"81[23]\\d{5}" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"81212345" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"SJ"; - self.countryCode = [NSNumber numberWithInteger:47]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = nil; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = nil; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = YES; - } - return self; -} -@end - -@implementation NBPhoneMetadataUA -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:9]]; - - NSMutableArray *generalDesc_descArrayPLLO = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPLLO addObject: [NSNumber numberWithInt:5]]; - [generalDesc_descArrayPLLO addObject: [NSNumber numberWithInt:6]]; - [generalDesc_descArrayPLLO addObject: [NSNumber numberWithInt:7]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[3-9]\\d{8}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:generalDesc_descArrayPLLO withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *fixedLine_descArrayPLLO = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPLLO addObject: [NSNumber numberWithInt:5]]; - [fixedLine_descArrayPLLO addObject: [NSNumber numberWithInt:6]]; - [fixedLine_descArrayPLLO addObject: [NSNumber numberWithInt:7]]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:3[1-8]|4[13-8]|5[1-7]|6[12459])\\d{7}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:fixedLine_descArrayPLLO withExample:@"311234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:39|50|6[36-8]|7[13]|9[1-9])\\d{7}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"391234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"800\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"800123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"900\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"900123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"89\\d{7}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"891234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"UA"; - self.countryCode = [NSNumber numberWithInteger:380]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = @"0~0"; - self.nationalPrefix = @"0"; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = @"0"; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - [numberFormats0_patternArray addObject:@"[38]9|4(?:[45][0-5]|87)|5(?:0|6[37]|7[37])|6[36-8]|7|9[1-9]"]; - [numberFormats0_patternArray addObject:@"[38]9|4(?:[45][0-5]|87)|5(?:0|6(?:3[14-7]|7)|7[37])|6[36-8]|7|9[1-9]"]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"([3-9]\\d)(\\d{3})(\\d{4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - - NSMutableArray *numberFormats1_patternArray = [[NSMutableArray alloc] init]; - [numberFormats1_patternArray addObject:@"3[1-8]2|4[13678]2|5(?:[12457]2|6[24])|6(?:[49]2|[12][29]|5[24])|8[0-8]|90"]; - [numberFormats1_patternArray addObject:@"3(?:[1-46-8]2[013-9]|52)|4(?:[1378]2|62[013-9])|5(?:[12457]2|6[24])|6(?:[49]2|[12][29]|5[24])|8[0-8]|90"]; - NBNumberFormat *numberFormats1 = [[NBNumberFormat alloc] initWithPattern:@"([3-689]\\d{2})(\\d{3})(\\d{3})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats1_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats1]; - - NSMutableArray *numberFormats2_patternArray = [[NSMutableArray alloc] init]; - [numberFormats2_patternArray addObject:@"3(?:5[013-9]|[1-46-8])|4(?:[137][013-9]|6|[45][6-9]|8[4-6])|5(?:[1245][013-9]|6[0135-9]|3|7[4-6])|6(?:[49][013-9]|5[0135-9]|[12][13-8])"]; - [numberFormats2_patternArray addObject:@"3(?:5[013-9]|[1-46-8](?:22|[013-9]))|4(?:[137][013-9]|6(?:[013-9]|22)|[45][6-9]|8[4-6])|5(?:[1245][013-9]|6(?:3[02389]|[015689])|3|7[4-6])|6(?:[49][013-9]|5[0135-9]|[12][13-8])"]; - NBNumberFormat *numberFormats2 = [[NBNumberFormat alloc] initWithPattern:@"([3-6]\\d{3})(\\d{5})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats2_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats2]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataRO -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:6]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[23]\\d{5,8}|[7-9]\\d{8}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"2(?:1(?:\\d{7}|9\\d{3})|[3-6](?:\\d{7}|\\d9\\d{2}))|3(?:1\\d{4}(?:\\d{3})?|[3-6]\\d{7})" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"211234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *mobile_descArrayPL = [[NSMutableArray alloc] init]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"7(?:[0-8]\\d{2}|99\\d)\\d{5}" withPossibleNumberPattern:nil withPossibleLength:mobile_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"712345678" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"800\\d{6}" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"800123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"90[036]\\d{6}" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"900123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"801\\d{6}" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"801123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"37\\d{7}" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"372123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"RO"; - self.countryCode = [NSNumber numberWithInteger:40]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = @"0"; - self.preferredExtnPrefix = @" int "; - self.nationalPrefixForParsing = @"0"; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - [numberFormats0_patternArray addObject:@"[23]1"]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{2})(\\d{3})(\\d{4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - - NSMutableArray *numberFormats1_patternArray = [[NSMutableArray alloc] init]; - [numberFormats1_patternArray addObject:@"[23]1"]; - NBNumberFormat *numberFormats1 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{2})(\\d{4})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats1_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats1]; - - NSMutableArray *numberFormats2_patternArray = [[NSMutableArray alloc] init]; - [numberFormats2_patternArray addObject:@"[23][3-7]|[7-9]"]; - NBNumberFormat *numberFormats2 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{3})(\\d{3})(\\d{3})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats2_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats2]; - - NSMutableArray *numberFormats3_patternArray = [[NSMutableArray alloc] init]; - [numberFormats3_patternArray addObject:@"2[3-6]"]; - NBNumberFormat *numberFormats3 = [[NBNumberFormat alloc] initWithPattern:@"(2\\d{2})(\\d{3})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats3_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats3]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataSK -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:6]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:7]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:[2-68]\\d{5,8}|9\\d{6,8})" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"2(?:1(?:6\\d{3,4}|7\\d{3})|[2-9]\\d{7})|[3-5][1-8](?:1(?:6\\d{2,3}|7\\d{3})|\\d{7})" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"221234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *mobile_descArrayPL = [[NSMutableArray alloc] init]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"9(?:0(?:[1-8]\\d|9[1-9])|(?:1[0-24-9]|[45]\\d)\\d)\\d{5}" withPossibleNumberPattern:nil withPossibleLength:mobile_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"912123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"800\\d{6}" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"800123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"9(?:[78]\\d{7}|00\\d{6})" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"900123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"8[5-9]\\d{7}" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"850123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"6(?:02|5[0-4]|9[0-6])\\d{6}" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"690123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:7]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"9090\\d{3}" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"9090123" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"96\\d{7}" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"961234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:7]]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:602|8(?:00|[5-9]\\d)|9(?:00|[78]\\d))\\d{6}|9090\\d{3}" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"800123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"SK"; - self.countryCode = [NSNumber numberWithInteger:421]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = @"0"; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = @"0"; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - [numberFormats0_patternArray addObject:@"21[67]"]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(2)(1[67])(\\d{3,4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - - NSMutableArray *numberFormats1_patternArray = [[NSMutableArray alloc] init]; - [numberFormats1_patternArray addObject:@"[3-5]"]; - NBNumberFormat *numberFormats1 = [[NBNumberFormat alloc] initWithPattern:@"([3-5]\\d)(1[67])(\\d{2,3})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats1_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats1]; - - NSMutableArray *numberFormats2_patternArray = [[NSMutableArray alloc] init]; - [numberFormats2_patternArray addObject:@"2"]; - NBNumberFormat *numberFormats2 = [[NBNumberFormat alloc] initWithPattern:@"(2)(\\d{3})(\\d{3})(\\d{2})" withFormat:@"$1/$2 $3 $4" withLeadingDigitsPatterns:numberFormats2_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats2]; - - NSMutableArray *numberFormats3_patternArray = [[NSMutableArray alloc] init]; - [numberFormats3_patternArray addObject:@"[3-5]"]; - NBNumberFormat *numberFormats3 = [[NBNumberFormat alloc] initWithPattern:@"([3-5]\\d)(\\d{3})(\\d{2})(\\d{2})" withFormat:@"$1/$2 $3 $4" withLeadingDigitsPatterns:numberFormats3_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats3]; - - NSMutableArray *numberFormats4_patternArray = [[NSMutableArray alloc] init]; - [numberFormats4_patternArray addObject:@"[689]"]; - NBNumberFormat *numberFormats4 = [[NBNumberFormat alloc] initWithPattern:@"([689]\\d{2})(\\d{3})(\\d{3})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats4_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats4]; - - NSMutableArray *numberFormats5_patternArray = [[NSMutableArray alloc] init]; - [numberFormats5_patternArray addObject:@"9090"]; - NBNumberFormat *numberFormats5 = [[NBNumberFormat alloc] initWithPattern:@"(9090)(\\d{3})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats5_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats5]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataPY -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:6]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:7]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:8]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:9]]; - - NSMutableArray *generalDesc_descArrayPLLO = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPLLO addObject: [NSNumber numberWithInt:5]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"5[0-5]\\d{4,7}|[2-46-9]\\d{5,8}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:generalDesc_descArrayPLLO withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *fixedLine_descArrayPL = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:7]]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:8]]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:9]]; - - NSMutableArray *fixedLine_descArrayPLLO = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPLLO addObject: [NSNumber numberWithInt:5]]; - [fixedLine_descArrayPLLO addObject: [NSNumber numberWithInt:6]]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:[26]1|3[289]|4[124678]|7[123]|8[1236])\\d{5,7}|(?:2(?:2[4568]|7[15]|9[1-5])|3(?:18|3[167]|4[2357]|51)|4(?:18|2[45]|3[12]|5[13]|64|71|9[1-47])|5(?:[1-4]\\d|5[0234])|6(?:3[1-3]|44|7[1-4678])|7(?:17|4[0-4]|6[1-578]|75|8[0-8])|858)\\d{5,6}" withPossibleNumberPattern:nil withPossibleLength:fixedLine_descArrayPL withPossibleLengthLocalOnly:fixedLine_descArrayPLLO withExample:@"212345678" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *mobile_descArrayPL = [[NSMutableArray alloc] init]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"9(?:6[12]|[78][1-6]|9[1-5])\\d{6}" withPossibleNumberPattern:nil withPossibleLength:mobile_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"961456789" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"8700[0-4]\\d{4}" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"870012345" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[2-9]0\\d{4,7}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"201234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"PY"; - self.countryCode = [NSNumber numberWithInteger:595]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = @"0"; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = @"0"; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - [numberFormats0_patternArray addObject:@"(?:[26]1|3[289]|4[124678]|7[123]|8[1236])"]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{2})(\\d{5})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:@"(0$1)" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - - NSMutableArray *numberFormats1_patternArray = [[NSMutableArray alloc] init]; - [numberFormats1_patternArray addObject:@"(?:[26]1|3[289]|4[124678]|7[123]|8[1236])"]; - NBNumberFormat *numberFormats1 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{2})(\\d{3})(\\d{3,4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats1_patternArray withNationalPrefixFormattingRule:@"(0$1)" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats1]; - - NSMutableArray *numberFormats2_patternArray = [[NSMutableArray alloc] init]; - [numberFormats2_patternArray addObject:@"[2-9]0"]; - NBNumberFormat *numberFormats2 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{3})(\\d{3,6})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats2_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats2]; - - NSMutableArray *numberFormats3_patternArray = [[NSMutableArray alloc] init]; - [numberFormats3_patternArray addObject:@"9[1-9]"]; - NBNumberFormat *numberFormats3 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{3})(\\d{6})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats3_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats3]; - - NSMutableArray *numberFormats4_patternArray = [[NSMutableArray alloc] init]; - [numberFormats4_patternArray addObject:@"8700"]; - NBNumberFormat *numberFormats4 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{2})(\\d{3})(\\d{4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats4_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats4]; - - NSMutableArray *numberFormats5_patternArray = [[NSMutableArray alloc] init]; - [numberFormats5_patternArray addObject:@"[2-8][1-9]"]; - NBNumberFormat *numberFormats5 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{3})(\\d{4,5})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats5_patternArray withNationalPrefixFormattingRule:@"(0$1)" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats5]; - - NSMutableArray *numberFormats6_patternArray = [[NSMutableArray alloc] init]; - [numberFormats6_patternArray addObject:@"[2-8][1-9]"]; - NBNumberFormat *numberFormats6 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{3})(\\d{3})(\\d{3})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats6_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats6]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataTG -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:8]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[29]\\d{7}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"2(?:2[2-7]|3[23]|44|55|66|77)\\d{5}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"22212345" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"9[0-36-9]\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"90112345" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"TG"; - self.countryCode = [NSNumber numberWithInteger:228]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = nil; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = nil; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - [numberFormats0_patternArray addObject:@"[29]"]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{2})(\\d{2})(\\d{2})(\\d{2})" withFormat:@"$1 $2 $3 $4" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataSL -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:8]]; - - NSMutableArray *generalDesc_descArrayPLLO = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPLLO addObject: [NSNumber numberWithInt:6]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[2-9]\\d{7}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:generalDesc_descArrayPLLO withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *fixedLine_descArrayPLLO = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPLLO addObject: [NSNumber numberWithInt:6]]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[235]2[2-4][2-9]\\d{4}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:fixedLine_descArrayPLLO withExample:@"22221234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:2[15]|3[03-5]|4[04]|5[05]|66|7[6-9]|88|99)\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"25123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"SL"; - self.countryCode = [NSNumber numberWithInteger:232]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = @"0"; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = @"0"; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{2})(\\d{6})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:@"(0$1)" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataTH -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:4]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:8]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:9]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:10]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[2-9]\\d{7,8}|1\\d{3}(?:\\d{5,6})?" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *fixedLine_descArrayPL = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:8]]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:2\\d|3[2-9]|4[2-5]|5[2-6]|7[3-7])\\d{6}" withPossibleNumberPattern:nil withPossibleLength:fixedLine_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"21234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *mobile_descArrayPL = [[NSMutableArray alloc] init]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:14|6[1-6]|[89]\\d)\\d{7}" withPossibleNumberPattern:nil withPossibleLength:mobile_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"812345678" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:10]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"1800\\d{6}" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"1800123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:10]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"1900\\d{6}" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"1900123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"6[08]\\d{7}" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"601234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:4]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"1\\d{3}" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"1100" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:4]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"1\\d{3}" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"1100" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"TH"; - self.countryCode = [NSNumber numberWithInteger:66]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = @"0"; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = @"0"; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - [numberFormats0_patternArray addObject:@"2"]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(2)(\\d{3})(\\d{4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - - NSMutableArray *numberFormats1_patternArray = [[NSMutableArray alloc] init]; - [numberFormats1_patternArray addObject:@"14|[3-9]"]; - NBNumberFormat *numberFormats1 = [[NBNumberFormat alloc] initWithPattern:@"([13-9]\\d)(\\d{3})(\\d{3,4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats1_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats1]; - - NSMutableArray *numberFormats2_patternArray = [[NSMutableArray alloc] init]; - [numberFormats2_patternArray addObject:@"1"]; - NBNumberFormat *numberFormats2 = [[NBNumberFormat alloc] initWithPattern:@"(1[89]00)(\\d{3})(\\d{3})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats2_patternArray withNationalPrefixFormattingRule:@"$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats2]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataSM -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:8]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:10]]; - - NSMutableArray *generalDesc_descArrayPLLO = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPLLO addObject: [NSNumber numberWithInt:6]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[05-7]\\d{7,9}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:generalDesc_descArrayPLLO withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *fixedLine_descArrayPL = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:10]]; - - NSMutableArray *fixedLine_descArrayPLLO = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPLLO addObject: [NSNumber numberWithInt:6]]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"0549(?:8[0157-9]|9\\d)\\d{4}" withPossibleNumberPattern:nil withPossibleLength:fixedLine_descArrayPL withPossibleLengthLocalOnly:fixedLine_descArrayPLLO withExample:@"0549886377" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *mobile_descArrayPL = [[NSMutableArray alloc] init]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:8]]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"6[16]\\d{6}" withPossibleNumberPattern:nil withPossibleLength:mobile_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"66661212" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:8]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"7[178]\\d{6}" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"71123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:8]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"5[158]\\d{6}" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"58001110" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"SM"; - self.countryCode = [NSNumber numberWithInteger:378]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = nil; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = @"(?:0549)?([89]\\d{5})"; - self.nationalPrefixTransformRule = @"0549$1"; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - [numberFormats0_patternArray addObject:@"[5-7]"]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{2})(\\d{2})(\\d{2})(\\d{2})" withFormat:@"$1 $2 $3 $4" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - - NSMutableArray *numberFormats1_patternArray = [[NSMutableArray alloc] init]; - [numberFormats1_patternArray addObject:@"0"]; - NBNumberFormat *numberFormats1 = [[NBNumberFormat alloc] initWithPattern:@"(0549)(\\d{6})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats1_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats1]; - - NSMutableArray *numberFormats2_patternArray = [[NSMutableArray alloc] init]; - [numberFormats2_patternArray addObject:@"[89]"]; - NBNumberFormat *numberFormats2 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{6})" withFormat:@"0549 $1" withLeadingDigitsPatterns:numberFormats2_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats2]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *intlNumberFormats0_patternArray = [[NSMutableArray alloc] init]; - [intlNumberFormats0_patternArray addObject:@"[5-7]"]; - NBNumberFormat *intlNumberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{2})(\\d{2})(\\d{2})(\\d{2})" withFormat:@"$1 $2 $3 $4" withLeadingDigitsPatterns:intlNumberFormats0_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [intlNumberFormats_FormatArray addObject:intlNumberFormats0]; - - NSMutableArray *intlNumberFormats1_patternArray = [[NSMutableArray alloc] init]; - [intlNumberFormats1_patternArray addObject:@"0"]; - NBNumberFormat *intlNumberFormats1 = [[NBNumberFormat alloc] initWithPattern:@"(0549)(\\d{6})" withFormat:@"($1) $2" withLeadingDigitsPatterns:intlNumberFormats1_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [intlNumberFormats_FormatArray addObject:intlNumberFormats1]; - - NSMutableArray *intlNumberFormats2_patternArray = [[NSMutableArray alloc] init]; - [intlNumberFormats2_patternArray addObject:@"[89]"]; - NBNumberFormat *intlNumberFormats2 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{6})" withFormat:@"(0549) $1" withLeadingDigitsPatterns:intlNumberFormats2_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [intlNumberFormats_FormatArray addObject:intlNumberFormats2]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = YES; - } - return self; -} -@end - -@implementation NBPhoneMetadataSN -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[3789]\\d{8}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"3(?:0(?:1[0-2]|80)|282|3(?:8[1-9]|9[3-9])|611)\\d{5}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"301012345" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"7(?:[06-8]\\d|21|90)\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"701234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"800\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"800123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"88[4689]\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"884123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"81[02468]\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"810123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"39[01]\\d{6}|3392\\d{5}|93330\\d{4}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"933301234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"SN"; - self.countryCode = [NSNumber numberWithInteger:221]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = nil; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = nil; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - [numberFormats0_patternArray addObject:@"[379]"]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{2})(\\d{3})(\\d{2})(\\d{2})" withFormat:@"$1 $2 $3 $4" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - - NSMutableArray *numberFormats1_patternArray = [[NSMutableArray alloc] init]; - [numberFormats1_patternArray addObject:@"8"]; - NBNumberFormat *numberFormats1 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{3})(\\d{2})(\\d{2})(\\d{2})" withFormat:@"$1 $2 $3 $4" withLeadingDigitsPatterns:numberFormats1_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats1]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataRS -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:6]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:7]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:8]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:9]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:10]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:11]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:12]]; - - NSMutableArray *generalDesc_descArrayPLLO = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPLLO addObject: [NSNumber numberWithInt:5]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[126-9]\\d{4,11}|3(?:[0-79]\\d{3,10}|8[2-9]\\d{2,9})" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:generalDesc_descArrayPLLO withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *fixedLine_descArrayPL = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:7]]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:8]]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:9]]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:10]]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:11]]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:12]]; - - NSMutableArray *fixedLine_descArrayPLLO = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPLLO addObject: [NSNumber numberWithInt:5]]; - [fixedLine_descArrayPLLO addObject: [NSNumber numberWithInt:6]]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:1(?:[02-9][2-9]|1[1-9])\\d|2(?:[0-24-7][2-9]\\d|[389](?:0[2-9]|[2-9]\\d))|3(?:[0-8][2-9]\\d|9(?:[2-9]\\d|0[2-9])))\\d{3,8}" withPossibleNumberPattern:nil withPossibleLength:fixedLine_descArrayPL withPossibleLengthLocalOnly:fixedLine_descArrayPLLO withExample:@"10234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *mobile_descArrayPL = [[NSMutableArray alloc] init]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:8]]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:9]]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:10]]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"6(?:[0-689]|7\\d)\\d{6,7}" withPossibleNumberPattern:nil withPossibleLength:mobile_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"601234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"800\\d{3,9}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"80012345" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:90[0169]|78\\d)\\d{3,7}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"90012345" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"7[06]\\d{4,10}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"700123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"RS"; - self.countryCode = [NSNumber numberWithInteger:381]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = @"0"; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = @"0"; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - [numberFormats0_patternArray addObject:@"(?:2[389]|39)0"]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"([23]\\d{2})(\\d{4,9})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - - NSMutableArray *numberFormats1_patternArray = [[NSMutableArray alloc] init]; - [numberFormats1_patternArray addObject:@"1|2(?:[0-24-7]|[389][1-9])|3(?:[0-8]|9[1-9])"]; - NBNumberFormat *numberFormats1 = [[NBNumberFormat alloc] initWithPattern:@"([1-3]\\d)(\\d{5,10})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats1_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats1]; - - NSMutableArray *numberFormats2_patternArray = [[NSMutableArray alloc] init]; - [numberFormats2_patternArray addObject:@"6"]; - NBNumberFormat *numberFormats2 = [[NBNumberFormat alloc] initWithPattern:@"(6\\d)(\\d{6,8})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats2_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats2]; - - NSMutableArray *numberFormats3_patternArray = [[NSMutableArray alloc] init]; - [numberFormats3_patternArray addObject:@"[89]"]; - NBNumberFormat *numberFormats3 = [[NBNumberFormat alloc] initWithPattern:@"([89]\\d{2})(\\d{3,9})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats3_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats3]; - - NSMutableArray *numberFormats4_patternArray = [[NSMutableArray alloc] init]; - [numberFormats4_patternArray addObject:@"7[26]"]; - NBNumberFormat *numberFormats4 = [[NBNumberFormat alloc] initWithPattern:@"(7[26])(\\d{4,9})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats4_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats4]; - - NSMutableArray *numberFormats5_patternArray = [[NSMutableArray alloc] init]; - [numberFormats5_patternArray addObject:@"7[08]"]; - NBNumberFormat *numberFormats5 = [[NBNumberFormat alloc] initWithPattern:@"(7[08]\\d)(\\d{4,9})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats5_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats5]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataTJ -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:9]]; - - NSMutableArray *generalDesc_descArrayPLLO = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPLLO addObject: [NSNumber numberWithInt:3]]; - [generalDesc_descArrayPLLO addObject: [NSNumber numberWithInt:5]]; - [generalDesc_descArrayPLLO addObject: [NSNumber numberWithInt:7]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[3-57-9]\\d{8}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:generalDesc_descArrayPLLO withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *fixedLine_descArrayPLLO = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPLLO addObject: [NSNumber numberWithInt:3]]; - [fixedLine_descArrayPLLO addObject: [NSNumber numberWithInt:5]]; - [fixedLine_descArrayPLLO addObject: [NSNumber numberWithInt:7]]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:3(?:1[3-5]|2[245]|3[12]|4[24-7]|5[25]|72)|4(?:46|74|87))\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:fixedLine_descArrayPLLO withExample:@"372123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:41[18]|(?:5[05]|77|88|9[0-35-9])\\d)\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"917123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"TJ"; - self.countryCode = [NSNumber numberWithInteger:992]; - self.internationalPrefix = @"810"; - self.preferredInternationalPrefix = @"8~10"; - self.nationalPrefix = @"8"; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = @"8"; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - [numberFormats0_patternArray addObject:@"[34]7|91[78]"]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"([349]\\d{2})(\\d{2})(\\d{4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:@"$1" whenFormatting:YES withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - - NSMutableArray *numberFormats1_patternArray = [[NSMutableArray alloc] init]; - [numberFormats1_patternArray addObject:@"4[148]|[578]|9(?:1[59]|[0235-9])"]; - NBNumberFormat *numberFormats1 = [[NBNumberFormat alloc] initWithPattern:@"([457-9]\\d)(\\d{3})(\\d{4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats1_patternArray withNationalPrefixFormattingRule:@"$1" whenFormatting:YES withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats1]; - - NSMutableArray *numberFormats2_patternArray = [[NSMutableArray alloc] init]; - [numberFormats2_patternArray addObject:@"331"]; - [numberFormats2_patternArray addObject:@"3317"]; - [numberFormats2_patternArray addObject:@"33170"]; - [numberFormats2_patternArray addObject:@"331700"]; - NBNumberFormat *numberFormats2 = [[NBNumberFormat alloc] initWithPattern:@"(331700)(\\d)(\\d{2})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats2_patternArray withNationalPrefixFormattingRule:@"$1" whenFormatting:YES withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats2]; - - NSMutableArray *numberFormats3_patternArray = [[NSMutableArray alloc] init]; - [numberFormats3_patternArray addObject:@"3[1-5]"]; - [numberFormats3_patternArray addObject:@"3(?:[1245]|3(?:[02-9]|1[0-589]))"]; - NBNumberFormat *numberFormats3 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{4})(\\d)(\\d{4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats3_patternArray withNationalPrefixFormattingRule:@"$1" whenFormatting:YES withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats3]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataVA -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:6]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:8]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:9]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:10]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:11]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:0(?:878\\d{5}|6698\\d{5})|[1589]\\d{5,10}|3(?:[12457-9]\\d{8}|[36]\\d{7,9}))" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *fixedLine_descArrayPL = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:10]]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"06698\\d{5}" withPossibleNumberPattern:nil withPossibleLength:fixedLine_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"0669812345" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *mobile_descArrayPL = [[NSMutableArray alloc] init]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:9]]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:10]]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:11]]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"3(?:[12457-9]\\d{8}|6\\d{7,8}|3\\d{7,9})" withPossibleNumberPattern:nil withPossibleLength:mobile_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"3123456789" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:6]]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"80(?:0\\d{6}|3\\d{3})" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"800123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:6]]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:8]]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:9]]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:10]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"0878\\d{5}|1(?:44|6[346])\\d{6}|89(?:2\\d{3}|4(?:[0-4]\\d{2}|[5-9]\\d{4})|5(?:[0-4]\\d{2}|[5-9]\\d{6})|9\\d{6})" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"899123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:6]]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"84(?:[08]\\d{6}|[17]\\d{3})" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"848123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:9]]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:10]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"1(?:78\\d|99)\\d{6}" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"1781234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:10]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"55\\d{8}" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"5512345678" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"848\\d{6}" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"848123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"VA"; - self.countryCode = [NSNumber numberWithInteger:39]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = nil; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = nil; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = YES; - } - return self; -} -@end - -@implementation NBPhoneMetadataSO -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:6]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:7]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:8]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[1-9]\\d{5,8}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *fixedLine_descArrayPL = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:6]]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:7]]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:1\\d{1,2}|2[0-79]\\d|3[0-46-8]?\\d|4[0-7]?\\d|59\\d|8[125])\\d{4}" withPossibleNumberPattern:nil withPossibleLength:fixedLine_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"4012345" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *mobile_descArrayPL = [[NSMutableArray alloc] init]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:7]]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:8]]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:15\\d|2(?:4\\d|8)|3[59]\\d{2}|4[89]\\d{2}|6[1-9]?\\d{2}|7(?:[1-8]\\d|9\\d{1,2})|8[08]\\d{2}|9(?:0[67]|[2-9])\\d)\\d{5}" withPossibleNumberPattern:nil withPossibleLength:mobile_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"71123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"SO"; - self.countryCode = [NSNumber numberWithInteger:252]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = @"0"; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = @"0"; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - [numberFormats0_patternArray addObject:@"[134]"]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{6})" withFormat:@"$1" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - - NSMutableArray *numberFormats1_patternArray = [[NSMutableArray alloc] init]; - [numberFormats1_patternArray addObject:@"2[0-79]|[13-5]"]; - NBNumberFormat *numberFormats1 = [[NBNumberFormat alloc] initWithPattern:@"(\\d)(\\d{6})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats1_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats1]; - - NSMutableArray *numberFormats2_patternArray = [[NSMutableArray alloc] init]; - [numberFormats2_patternArray addObject:@"24|[67]"]; - NBNumberFormat *numberFormats2 = [[NBNumberFormat alloc] initWithPattern:@"(\\d)(\\d{7})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats2_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats2]; - - NSMutableArray *numberFormats3_patternArray = [[NSMutableArray alloc] init]; - [numberFormats3_patternArray addObject:@"8[125]"]; - NBNumberFormat *numberFormats3 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{2})(\\d{4})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats3_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats3]; - - NSMutableArray *numberFormats4_patternArray = [[NSMutableArray alloc] init]; - [numberFormats4_patternArray addObject:@"15|28|6[1-35-9]|799|9[2-9]"]; - NBNumberFormat *numberFormats4 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{2})(\\d{5,7})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats4_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats4]; - - NSMutableArray *numberFormats5_patternArray = [[NSMutableArray alloc] init]; - [numberFormats5_patternArray addObject:@"3[59]|4[89]|6[24-6]|79|8[08]|90"]; - NBNumberFormat *numberFormats5 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{3})(\\d{3})(\\d{3})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats5_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats5]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataTK -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:4]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:5]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:6]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:7]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[2-47]\\d{3,6}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:2[2-4]|[34]\\d)\\d{2,5}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"3101" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"7[2-4]\\d{2,5}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"7290" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"TK"; - self.countryCode = [NSNumber numberWithInteger:690]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = nil; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = nil; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataUG -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:9]]; - - NSMutableArray *generalDesc_descArrayPLLO = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPLLO addObject: [NSNumber numberWithInt:5]]; - [generalDesc_descArrayPLLO addObject: [NSNumber numberWithInt:6]]; - [generalDesc_descArrayPLLO addObject: [NSNumber numberWithInt:7]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"\\d{9}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:generalDesc_descArrayPLLO withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *fixedLine_descArrayPLLO = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPLLO addObject: [NSNumber numberWithInt:5]]; - [fixedLine_descArrayPLLO addObject: [NSNumber numberWithInt:6]]; - [fixedLine_descArrayPLLO addObject: [NSNumber numberWithInt:7]]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"20(?:[0147]\\d{2}|2(?:40|[5-9]\\d)|3(?:0[0-4]|[23]\\d)|5[0-4]\\d|6[035-9]\\d|8[0-2]\\d)\\d{4}|[34]\\d{8}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:fixedLine_descArrayPLLO withExample:@"312345678" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"7(?:(?:0[0-7]|[15789]\\d|30|4[0-4])\\d|2(?:[03]\\d|60))\\d{5}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"712345678" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"800[123]\\d{5}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"800123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"90[123]\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"901123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"UG"; - self.countryCode = [NSNumber numberWithInteger:256]; - self.internationalPrefix = @"00[057]"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = @"0"; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = @"0"; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - [numberFormats0_patternArray addObject:@"[7-9]|20(?:[013-8]|2[5-9])|4(?:6[45]|[7-9])"]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{3})(\\d{6})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - - NSMutableArray *numberFormats1_patternArray = [[NSMutableArray alloc] init]; - [numberFormats1_patternArray addObject:@"3|4(?:[1-5]|6[0-36-9])"]; - NBNumberFormat *numberFormats1 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{2})(\\d{7})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats1_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats1]; - - NSMutableArray *numberFormats2_patternArray = [[NSMutableArray alloc] init]; - [numberFormats2_patternArray addObject:@"2024"]; - NBNumberFormat *numberFormats2 = [[NBNumberFormat alloc] initWithPattern:@"(2024)(\\d{5})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats2_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats2]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataRU -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:10]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[3489]\\d{9}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:3(?:0[12]|4[1-35-79]|5[1-3]|65|8[1-58]|9[0145])|4(?:01|1[1356]|2[13467]|7[1-5]|8[1-7]|9[1-689])|8(?:1[1-8]|2[01]|3[13-6]|4[0-8]|5[15]|6[1-35-79]|7[1-37-9]))\\d{7}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"3011234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"9\\d{9}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"9123456789" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"80[04]\\d{7}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"8001234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"80[39]\\d{7}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"8091234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"RU"; - self.countryCode = [NSNumber numberWithInteger:7]; - self.internationalPrefix = @"810"; - self.preferredInternationalPrefix = @"8~10"; - self.nationalPrefix = @"8"; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = @"8"; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - [numberFormats0_patternArray addObject:@"[1-79]"]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{3})(\\d{2})(\\d{2})" withFormat:@"$1-$2-$3" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:@"$1" whenFormatting:YES withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - - NSMutableArray *numberFormats1_patternArray = [[NSMutableArray alloc] init]; - [numberFormats1_patternArray addObject:@"[34689]"]; - NBNumberFormat *numberFormats1 = [[NBNumberFormat alloc] initWithPattern:@"([3489]\\d{2})(\\d{3})(\\d{2})(\\d{2})" withFormat:@"$1 $2-$3-$4" withLeadingDigitsPatterns:numberFormats1_patternArray withNationalPrefixFormattingRule:@"8 ($1)" whenFormatting:YES withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats1]; - - NSMutableArray *numberFormats2_patternArray = [[NSMutableArray alloc] init]; - [numberFormats2_patternArray addObject:@"7"]; - NBNumberFormat *numberFormats2 = [[NBNumberFormat alloc] initWithPattern:@"(7\\d{2})(\\d{3})(\\d{4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats2_patternArray withNationalPrefixFormattingRule:@"8 ($1)" whenFormatting:YES withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats2]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *intlNumberFormats0_patternArray = [[NSMutableArray alloc] init]; - [intlNumberFormats0_patternArray addObject:@"[34689]"]; - NBNumberFormat *intlNumberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"([3489]\\d{2})(\\d{3})(\\d{2})(\\d{2})" withFormat:@"$1 $2-$3-$4" withLeadingDigitsPatterns:intlNumberFormats0_patternArray withNationalPrefixFormattingRule:@"8 ($1)" whenFormatting:YES withDomesticCarrierCodeFormattingRule:nil]; - [intlNumberFormats_FormatArray addObject:intlNumberFormats0]; - - NSMutableArray *intlNumberFormats1_patternArray = [[NSMutableArray alloc] init]; - [intlNumberFormats1_patternArray addObject:@"7"]; - NBNumberFormat *intlNumberFormats1 = [[NBNumberFormat alloc] initWithPattern:@"(7\\d{2})(\\d{3})(\\d{4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:intlNumberFormats1_patternArray withNationalPrefixFormattingRule:@"8 ($1)" whenFormatting:YES withDomesticCarrierCodeFormattingRule:nil]; - [intlNumberFormats_FormatArray addObject:intlNumberFormats1]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = YES; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataTL -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:7]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:8]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[2-489]\\d{6}|7\\d{6,7}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *fixedLine_descArrayPL = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:7]]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:2[1-5]|3[1-9]|4[1-4])\\d{5}" withPossibleNumberPattern:nil withPossibleLength:fixedLine_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"2112345" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *mobile_descArrayPL = [[NSMutableArray alloc] init]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:8]]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"7[3-8]\\d{6}" withPossibleNumberPattern:nil withPossibleLength:mobile_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"77212345" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:7]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"80\\d{5}" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"8012345" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:7]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"90\\d{5}" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"9012345" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:7]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"70\\d{5}" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"7012345" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"TL"; - self.countryCode = [NSNumber numberWithInteger:670]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = nil; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = nil; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - [numberFormats0_patternArray addObject:@"[2-489]"]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{3})(\\d{4})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - - NSMutableArray *numberFormats1_patternArray = [[NSMutableArray alloc] init]; - [numberFormats1_patternArray addObject:@"7"]; - NBNumberFormat *numberFormats1 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{4})(\\d{4})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats1_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats1]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataVC -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:10]]; - - NSMutableArray *generalDesc_descArrayPLLO = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPLLO addObject: [NSNumber numberWithInt:7]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[5789]\\d{9}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:generalDesc_descArrayPLLO withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *fixedLine_descArrayPLLO = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPLLO addObject: [NSNumber numberWithInt:7]]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"784(?:266|3(?:6[6-9]|7\\d|8[0-24-6])|4(?:38|5[0-36-8]|8[0-8])|5(?:55|7[0-2]|93)|638|784)\\d{4}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:fixedLine_descArrayPLLO withExample:@"7842661234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *mobile_descArrayPLLO = [[NSMutableArray alloc] init]; - [mobile_descArrayPLLO addObject: [NSNumber numberWithInt:7]]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"784(?:4(?:3[0-4]|5[45]|89|9[0-58])|5(?:2[6-9]|3[0-4]))\\d{4}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:mobile_descArrayPLLO withExample:@"7844301234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"8(?:00|33|44|55|66|77|88)[2-9]\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"8002345678" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"900[2-9]\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"9002345678" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"5(?:00|22|33|44|66|77|88)[2-9]\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"5002345678" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"VC"; - self.countryCode = [NSNumber numberWithInteger:1]; - self.internationalPrefix = @"011"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = @"1"; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = @"1"; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = @"784"; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadata870 -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[35-7]\\d{8}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *fixedLine_descArrayPL = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:fixedLine_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:[356]\\d|7[6-8])\\d{7}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"301234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"001"; - self.countryCode = [NSNumber numberWithInteger:870]; - self.internationalPrefix = nil; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = nil; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = nil; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{3})(\\d{3})(\\d{3})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataTM -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:8]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[1-6]\\d{7}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:1(?:2\\d|3[1-9])|2(?:22|4[0-35-8])|3(?:22|4[03-9])|4(?:22|3[128]|4\\d|6[15])|5(?:22|5[7-9]|6[014-689]))\\d{5}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"12345678" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"6[1-9]\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"66123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"TM"; - self.countryCode = [NSNumber numberWithInteger:993]; - self.internationalPrefix = @"810"; - self.preferredInternationalPrefix = @"8~10"; - self.nationalPrefix = @"8"; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = @"8"; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - [numberFormats0_patternArray addObject:@"12"]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{2})(\\d{2})(\\d{2})(\\d{2})" withFormat:@"$1 $2-$3-$4" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:@"(8 $1)" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - - NSMutableArray *numberFormats1_patternArray = [[NSMutableArray alloc] init]; - [numberFormats1_patternArray addObject:@"6"]; - NBNumberFormat *numberFormats1 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{2})(\\d{6})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats1_patternArray withNationalPrefixFormattingRule:@"8 $1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats1]; - - NSMutableArray *numberFormats2_patternArray = [[NSMutableArray alloc] init]; - [numberFormats2_patternArray addObject:@"13|[2-5]"]; - NBNumberFormat *numberFormats2 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{3})(\\d)(\\d{2})(\\d{2})" withFormat:@"$1 $2-$3-$4" withLeadingDigitsPatterns:numberFormats2_patternArray withNationalPrefixFormattingRule:@"(8 $1)" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats2]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataSR -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:6]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:7]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[2-8]\\d{5,6}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:2[1-3]|3[0-7]|4\\d|5[2-58]|68\\d)\\d{4}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"211234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *mobile_descArrayPL = [[NSMutableArray alloc] init]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:7]]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:7[124-7]|8[1-9])\\d{5}" withPossibleNumberPattern:nil withPossibleLength:mobile_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"7412345" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:6]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"56\\d{4}" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"561234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"SR"; - self.countryCode = [NSNumber numberWithInteger:597]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = nil; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = nil; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - [numberFormats0_patternArray addObject:@"[2-4]|5[2-58]"]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{3})(\\d{3})" withFormat:@"$1-$2" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - - NSMutableArray *numberFormats1_patternArray = [[NSMutableArray alloc] init]; - [numberFormats1_patternArray addObject:@"56"]; - NBNumberFormat *numberFormats1 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{2})(\\d{2})(\\d{2})" withFormat:@"$1-$2-$3" withLeadingDigitsPatterns:numberFormats1_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats1]; - - NSMutableArray *numberFormats2_patternArray = [[NSMutableArray alloc] init]; - [numberFormats2_patternArray addObject:@"[6-8]"]; - NBNumberFormat *numberFormats2 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{3})(\\d{4})" withFormat:@"$1-$2" withLeadingDigitsPatterns:numberFormats2_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats2]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataRW -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:8]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[027-9]\\d{7,8}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"2[258]\\d{7}|06\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"250123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *mobile_descArrayPL = [[NSMutableArray alloc] init]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"7[238]\\d{7}" withPossibleNumberPattern:nil withPossibleLength:mobile_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"720123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"800\\d{6}" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"800123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"900\\d{6}" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"900123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"RW"; - self.countryCode = [NSNumber numberWithInteger:250]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = @"0"; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = @"0"; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - [numberFormats0_patternArray addObject:@"2"]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(2\\d{2})(\\d{3})(\\d{3})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:@"$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - - NSMutableArray *numberFormats1_patternArray = [[NSMutableArray alloc] init]; - [numberFormats1_patternArray addObject:@"[7-9]"]; - NBNumberFormat *numberFormats1 = [[NBNumberFormat alloc] initWithPattern:@"([7-9]\\d{2})(\\d{3})(\\d{3})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats1_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats1]; - - NSMutableArray *numberFormats2_patternArray = [[NSMutableArray alloc] init]; - [numberFormats2_patternArray addObject:@"0"]; - NBNumberFormat *numberFormats2 = [[NBNumberFormat alloc] initWithPattern:@"(0\\d)(\\d{2})(\\d{2})(\\d{2})" withFormat:@"$1 $2 $3 $4" withLeadingDigitsPatterns:numberFormats2_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats2]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = YES; - } - return self; -} -@end - -@implementation NBPhoneMetadataTN -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:8]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[2-57-9]\\d{7}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"3(?:[012]\\d|6[0-4]|91)\\d{5}|7\\d{7}|81200\\d{3}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"71234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:[259]\\d|4[0-6])\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"20123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"8010\\d{4}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"80101234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"88\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"88123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"8[12]10\\d{4}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"81101234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"TN"; - self.countryCode = [NSNumber numberWithInteger:216]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = nil; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = nil; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{2})(\\d{3})(\\d{3})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataVE -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:10]]; - - NSMutableArray *generalDesc_descArrayPLLO = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPLLO addObject: [NSNumber numberWithInt:7]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[24589]\\d{9}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:generalDesc_descArrayPLLO withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *fixedLine_descArrayPLLO = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPLLO addObject: [NSNumber numberWithInt:7]]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:2(?:12|3[457-9]|[58][1-9]|[467]\\d|9[1-6])|50[01])\\d{7}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:fixedLine_descArrayPLLO withExample:@"2121234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"4(?:1[24-8]|2[46])\\d{7}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"4121234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"800\\d{7}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"8001234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"900\\d{7}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"9001234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"VE"; - self.countryCode = [NSNumber numberWithInteger:58]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = @"0"; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = @"0"; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{3})(\\d{7})" withFormat:@"$1-$2" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:@"$CC $1"]; - [numberFormats_FormatArray addObject:numberFormats0]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataSS -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[19]\\d{8}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"18\\d{7}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"181234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:12|9[1257])\\d{7}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"977123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"SS"; - self.countryCode = [NSNumber numberWithInteger:211]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = @"0"; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = @"0"; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{3})(\\d{3})(\\d{3})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataTO -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:5]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:7]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[02-8]\\d{4,6}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *fixedLine_descArrayPL = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:5]]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:2\\d|3[1-8]|4[1-4]|[56]0|7[0149]|8[05])\\d{3}" withPossibleNumberPattern:nil withPossibleLength:fixedLine_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"20123" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *mobile_descArrayPL = [[NSMutableArray alloc] init]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:7]]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:7[578]|8[47-9])\\d{5}" withPossibleNumberPattern:nil withPossibleLength:mobile_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"7715123" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:7]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"0800\\d{3}" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"0800222" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"TO"; - self.countryCode = [NSNumber numberWithInteger:676]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = nil; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = nil; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - [numberFormats0_patternArray addObject:@"[1-6]|7[0-4]|8[05]"]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{2})(\\d{3})" withFormat:@"$1-$2" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - - NSMutableArray *numberFormats1_patternArray = [[NSMutableArray alloc] init]; - [numberFormats1_patternArray addObject:@"7[5-9]|8[47-9]"]; - NBNumberFormat *numberFormats1 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{3})(\\d{4})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats1_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats1]; - - NSMutableArray *numberFormats2_patternArray = [[NSMutableArray alloc] init]; - [numberFormats2_patternArray addObject:@"0"]; - NBNumberFormat *numberFormats2 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{4})(\\d{3})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats2_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats2]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = YES; - } - return self; -} -@end - -@implementation NBPhoneMetadataST -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:7]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[29]\\d{6}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"22\\d{5}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"2221234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"9(?:0(?:0[5-9]|[1-9]\\d)|[89]\\d{2})\\d{3}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"9812345" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"ST"; - self.countryCode = [NSNumber numberWithInteger:239]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = nil; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = nil; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{3})(\\d{4})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataVG -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:10]]; - - NSMutableArray *generalDesc_descArrayPLLO = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPLLO addObject: [NSNumber numberWithInt:7]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[2589]\\d{9}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:generalDesc_descArrayPLLO withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *fixedLine_descArrayPLLO = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPLLO addObject: [NSNumber numberWithInt:7]]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"284(?:(?:229|4(?:22|9[45])|774|8(?:52|6[459]))\\d{4}|496[0-5]\\d{3})" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:fixedLine_descArrayPLLO withExample:@"2842291234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *mobile_descArrayPLLO = [[NSMutableArray alloc] init]; - [mobile_descArrayPLLO addObject: [NSNumber numberWithInt:7]]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"284(?:(?:3(?:0[0-3]|4[0-7]|68|9[34])|4(?:4[0-6]|68|99)|54[0-57])\\d{4}|496[6-9]\\d{3})" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:mobile_descArrayPLLO withExample:@"2843001234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"8(?:00|33|44|55|66|77|88)[2-9]\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"8002345678" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"900[2-9]\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"9002345678" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"5(?:00|22|33|44|66|77|88)[2-9]\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"5002345678" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"VG"; - self.countryCode = [NSNumber numberWithInteger:1]; - self.internationalPrefix = @"011"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = @"1"; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = @"1"; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = @"284"; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataSV -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:7]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:8]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:11]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[267]\\d{7}|[89]\\d{6}(?:\\d{4})?" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *fixedLine_descArrayPL = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:8]]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"2[1-6]\\d{6}" withPossibleNumberPattern:nil withPossibleLength:fixedLine_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"21234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *mobile_descArrayPL = [[NSMutableArray alloc] init]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:8]]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[67]\\d{7}" withPossibleNumberPattern:nil withPossibleLength:mobile_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"70123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:7]]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:11]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"800\\d{4}(?:\\d{4})?" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"8001234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:7]]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:11]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"900\\d{4}(?:\\d{4})?" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"9001234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"SV"; - self.countryCode = [NSNumber numberWithInteger:503]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = nil; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = nil; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - [numberFormats0_patternArray addObject:@"[267]"]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{4})(\\d{4})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - - NSMutableArray *numberFormats1_patternArray = [[NSMutableArray alloc] init]; - [numberFormats1_patternArray addObject:@"[89]"]; - NBNumberFormat *numberFormats1 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{3})(\\d{4})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats1_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats1]; - - NSMutableArray *numberFormats2_patternArray = [[NSMutableArray alloc] init]; - [numberFormats2_patternArray addObject:@"[89]"]; - NBNumberFormat *numberFormats2 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{3})(\\d{4})(\\d{4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats2_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats2]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataTR -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:7]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:10]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[2-589]\\d{9}|444\\d{4}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *fixedLine_descArrayPL = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:10]]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:2(?:[13][26]|[28][2468]|[45][268]|[67][246])|3(?:[13][28]|[24-6][2468]|[78][02468]|92)|4(?:[16][246]|[23578][2468]|4[26]))\\d{7}" withPossibleNumberPattern:nil withPossibleLength:fixedLine_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"2123456789" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *mobile_descArrayPL = [[NSMutableArray alloc] init]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:10]]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"5(?:(?:0[1-7]|22|[34]\\d|5[1-59]|9[246])\\d{2}|6161)\\d{5}" withPossibleNumberPattern:nil withPossibleLength:mobile_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"5012345678" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:10]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"800\\d{7}" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"8001234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:10]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"900\\d{7}" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"9001234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:10]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"512\\d{7}" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"5123456789" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"444\\d{4}|850\\d{7}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"4441444" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:7]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"444\\d{4}" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"4441444" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"TR"; - self.countryCode = [NSNumber numberWithInteger:90]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = @"0"; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = @"0"; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - [numberFormats0_patternArray addObject:@"[23]|4(?:[0-35-9]|4[0-35-9])"]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{3})(\\d{3})(\\d{2})(\\d{2})" withFormat:@"$1 $2 $3 $4" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:@"(0$1)" whenFormatting:YES withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - - NSMutableArray *numberFormats1_patternArray = [[NSMutableArray alloc] init]; - [numberFormats1_patternArray addObject:@"5[02-69]"]; - NBNumberFormat *numberFormats1 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{3})(\\d{3})(\\d{2})(\\d{2})" withFormat:@"$1 $2 $3 $4" withLeadingDigitsPatterns:numberFormats1_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:YES withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats1]; - - NSMutableArray *numberFormats2_patternArray = [[NSMutableArray alloc] init]; - [numberFormats2_patternArray addObject:@"51|[89]"]; - NBNumberFormat *numberFormats2 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{3})(\\d{3})(\\d{4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats2_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:YES withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats2]; - - NSMutableArray *numberFormats3_patternArray = [[NSMutableArray alloc] init]; - [numberFormats3_patternArray addObject:@"444"]; - NBNumberFormat *numberFormats3 = [[NBNumberFormat alloc] initWithPattern:@"(444)(\\d{1})(\\d{3})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats3_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats3]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataVI -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:10]]; - - NSMutableArray *generalDesc_descArrayPLLO = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPLLO addObject: [NSNumber numberWithInt:7]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[3589]\\d{9}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:generalDesc_descArrayPLLO withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *fixedLine_descArrayPLLO = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPLLO addObject: [NSNumber numberWithInt:7]]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"340(?:2(?:01|2[0678]|44|77)|3(?:32|44)|4(?:22|7[34])|5(?:1[34]|55)|6(?:26|4[23]|77|9[023])|7(?:1[2-589]|27|7\\d)|884|998)\\d{4}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:fixedLine_descArrayPLLO withExample:@"3406421234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *mobile_descArrayPLLO = [[NSMutableArray alloc] init]; - [mobile_descArrayPLLO addObject: [NSNumber numberWithInt:7]]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"340(?:2(?:01|2[0678]|44|77)|3(?:32|44)|4(?:22|7[34])|5(?:1[34]|55)|6(?:26|4[23]|77|9[023])|7(?:1[2-589]|27|7\\d)|884|998)\\d{4}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:mobile_descArrayPLLO withExample:@"3406421234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"8(?:00|33|44|55|66|77|88)[2-9]\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"8002345678" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"900[2-9]\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"9002345678" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"5(?:00|22|33|44|66|77|88)[2-9]\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"5002345678" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"VI"; - self.countryCode = [NSNumber numberWithInteger:1]; - self.internationalPrefix = @"011"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = @"1"; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = @"1"; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = YES; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = @"340"; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataSX -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:10]]; - - NSMutableArray *generalDesc_descArrayPLLO = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPLLO addObject: [NSNumber numberWithInt:7]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[5789]\\d{9}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:generalDesc_descArrayPLLO withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *fixedLine_descArrayPLLO = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPLLO addObject: [NSNumber numberWithInt:7]]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"7215(?:4[2-8]|8[239]|9[056])\\d{4}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:fixedLine_descArrayPLLO withExample:@"7215425678" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *mobile_descArrayPLLO = [[NSMutableArray alloc] init]; - [mobile_descArrayPLLO addObject: [NSNumber numberWithInt:7]]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"7215(?:1[02]|2\\d|5[034679]|8[014-8])\\d{4}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:mobile_descArrayPLLO withExample:@"7215205678" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"8(?:00|33|44|55|66|77|88)[2-9]\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"8002123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"900[2-9]\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"9002123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"5(?:00|22|33|44|66|77|88)[2-9]\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"5002345678" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"SX"; - self.countryCode = [NSNumber numberWithInteger:1]; - self.internationalPrefix = @"011"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = @"1"; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = @"1"; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = @"721"; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataWF -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:6]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[4-8]\\d{5}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:50|68|72)\\d{4}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"501234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:50|68|72|8[23])\\d{4}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"501234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[48]0\\d{4}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"401234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"WF"; - self.countryCode = [NSNumber numberWithInteger:681]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = nil; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = nil; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{2})(\\d{2})(\\d{2})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataTT -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:10]]; - - NSMutableArray *generalDesc_descArrayPLLO = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPLLO addObject: [NSNumber numberWithInt:7]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[589]\\d{9}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:generalDesc_descArrayPLLO withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *fixedLine_descArrayPLLO = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPLLO addObject: [NSNumber numberWithInt:7]]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"868(?:2(?:01|[23]\\d)|6(?:0[79]|1[02-8]|2[1-9]|[3-69]\\d|7[0-79])|82[124])\\d{4}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:fixedLine_descArrayPLLO withExample:@"8682211234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *mobile_descArrayPLLO = [[NSMutableArray alloc] init]; - [mobile_descArrayPLLO addObject: [NSNumber numberWithInt:7]]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"868(?:2(?:6[6-9]|[789]\\d)|3(?:0[1-9]|1[02-9]|[2-9]\\d)|4[6-9]\\d|6(?:20|78|8\\d)|7(?:0[1-9]|1[02-9]|[2-9]\\d))\\d{4}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:mobile_descArrayPLLO withExample:@"8682911234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"8(?:00|33|44|55|66|77|88)[2-9]\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"8002345678" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"900[2-9]\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"9002345678" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"5(?:00|22|33|44|66|77|88)[2-9]\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"5002345678" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPLLO = [[NSMutableArray alloc] init]; - [voicemail_descArrayPLLO addObject: [NSNumber numberWithInt:7]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"868619\\d{4}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:voicemail_descArrayPLLO withExample:@"8686191234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"TT"; - self.countryCode = [NSNumber numberWithInteger:1]; - self.internationalPrefix = @"011"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = @"1"; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = @"1"; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = @"868"; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataSY -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:8]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:9]]; - - NSMutableArray *generalDesc_descArrayPLLO = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPLLO addObject: [NSNumber numberWithInt:6]]; - [generalDesc_descArrayPLLO addObject: [NSNumber numberWithInt:7]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[1-59]\\d{7,8}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:generalDesc_descArrayPLLO withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *fixedLine_descArrayPLLO = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPLLO addObject: [NSNumber numberWithInt:6]]; - [fixedLine_descArrayPLLO addObject: [NSNumber numberWithInt:7]]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:1(?:1\\d?|4\\d|[2356])|2(?:1\\d?|[235])|3(?:[13]\\d|4)|4[13]|5[1-3])\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:fixedLine_descArrayPLLO withExample:@"112345678" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *mobile_descArrayPL = [[NSMutableArray alloc] init]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"9(?:22|[3-589]\\d|6[024-9])\\d{6}" withPossibleNumberPattern:nil withPossibleLength:mobile_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"944567890" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"SY"; - self.countryCode = [NSNumber numberWithInteger:963]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = @"0"; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = @"0"; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - [numberFormats0_patternArray addObject:@"[1-5]"]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{2})(\\d{3})(\\d{3,4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:YES withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - - NSMutableArray *numberFormats1_patternArray = [[NSMutableArray alloc] init]; - [numberFormats1_patternArray addObject:@"9"]; - NBNumberFormat *numberFormats1 = [[NBNumberFormat alloc] initWithPattern:@"(9\\d{2})(\\d{3})(\\d{3})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats1_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:YES withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats1]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataSZ -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:8]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[027]\\d{7}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"2[2-5]\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"22171234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"7[6-8]\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"76123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"0800\\d{4}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"08001234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"0800\\d{4}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"08001234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"SZ"; - self.countryCode = [NSNumber numberWithInteger:268]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = nil; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = nil; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - [numberFormats0_patternArray addObject:@"[027]"]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{4})(\\d{4})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = YES; - } - return self; -} -@end - -@implementation NBPhoneMetadataTV -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:5]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:6]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:7]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[279]\\d{4,6}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *fixedLine_descArrayPL = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:5]]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"2[02-9]\\d{3}" withPossibleNumberPattern:nil withPossibleLength:fixedLine_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"20123" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *mobile_descArrayPL = [[NSMutableArray alloc] init]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:6]]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:7]]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:70\\d|90)\\d{4}" withPossibleNumberPattern:nil withPossibleLength:mobile_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"901234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"TV"; - self.countryCode = [NSNumber numberWithInteger:688]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = nil; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = nil; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataTW -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:7]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:8]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:9]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:10]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"2\\d{6,8}|[3-689]\\d{7,8}|7\\d{7,9}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *fixedLine_descArrayPL = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:8]]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"2(?:[235-8]\\d{7}|4\\d{6,7})|[3-8]\\d{7,8}" withPossibleNumberPattern:nil withPossibleLength:fixedLine_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"221234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *mobile_descArrayPL = [[NSMutableArray alloc] init]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"9\\d{8}" withPossibleNumberPattern:nil withPossibleLength:mobile_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"912345678" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"800\\d{6}" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"800123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:7]]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"20(?:2|[013-9]\\d{2})\\d{4}" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"203123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:10]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"70\\d{8}" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"7012345678" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"TW"; - self.countryCode = [NSNumber numberWithInteger:886]; - self.internationalPrefix = @"0(?:0[25679]|19)"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = @"0"; - self.preferredExtnPrefix = @"#"; - self.nationalPrefixForParsing = @"0"; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - [numberFormats0_patternArray addObject:@"202"]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(20)(\\d)(\\d{4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - - NSMutableArray *numberFormats1_patternArray = [[NSMutableArray alloc] init]; - [numberFormats1_patternArray addObject:@"20[013-9]"]; - NBNumberFormat *numberFormats1 = [[NBNumberFormat alloc] initWithPattern:@"(20)(\\d{3})(\\d{4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats1_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats1]; - - NSMutableArray *numberFormats2_patternArray = [[NSMutableArray alloc] init]; - [numberFormats2_patternArray addObject:@"2[23-8]|[3-6]|[78][1-9]"]; - NBNumberFormat *numberFormats2 = [[NBNumberFormat alloc] initWithPattern:@"([2-8])(\\d{3,4})(\\d{4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats2_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats2]; - - NSMutableArray *numberFormats3_patternArray = [[NSMutableArray alloc] init]; - [numberFormats3_patternArray addObject:@"80|9"]; - NBNumberFormat *numberFormats3 = [[NBNumberFormat alloc] initWithPattern:@"([89]\\d{2})(\\d{3})(\\d{3})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats3_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats3]; - - NSMutableArray *numberFormats4_patternArray = [[NSMutableArray alloc] init]; - [numberFormats4_patternArray addObject:@"70"]; - NBNumberFormat *numberFormats4 = [[NBNumberFormat alloc] initWithPattern:@"(70)(\\d{4})(\\d{4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats4_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats4]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataVN -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:7]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:8]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:9]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:10]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[167]\\d{6,9}|[2-59]\\d{7,9}|8\\d{6,8}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *fixedLine_descArrayPL = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:9]]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:10]]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:2(?:0(?:\\d|[3-9]\\d)|1[0-689]\\d|2(?:\\d|[0-25-9]\\d)|[5-7]\\d|3\\d{2}|[48][01]\\d|9(?:\\d|[0-4679]\\d))|3(?:[0136-9]|[25][01])\\d|4\\d{2}|5(?:[01][01]|[2-9])\\d|6(?:[0-46-8]|5[01])\\d|7(?:[02-79]|[18][01])\\d)\\d{6}|8(?:[2-5]\\d|6[236]|7[13])\\d{6}" withPossibleNumberPattern:nil withPossibleLength:fixedLine_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"2101234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *mobile_descArrayPL = [[NSMutableArray alloc] init]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:9]]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:10]]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:9\\d|1(?:2\\d|6[2-9]|8[68]|99))\\d{7}|8(?:6[89]|8\\d|9[89])\\d{6}" withPossibleNumberPattern:nil withPossibleLength:mobile_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"912345678" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:8]]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:9]]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:10]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"1800\\d{4,6}" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"1800123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:8]]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:9]]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:10]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"1900\\d{4,6}" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"1900123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:7]]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:8]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[17]99\\d{4}|69\\d{5,6}|80\\d{5}" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"1992000" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:7]]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:8]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[17]99\\d{4}|69\\d{5,6}" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"1992000" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"VN"; - self.countryCode = [NSNumber numberWithInteger:84]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = @"0"; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = @"0"; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - [numberFormats0_patternArray addObject:@"[17]99"]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"([17]99)(\\d{4})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:YES withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - - NSMutableArray *numberFormats1_patternArray = [[NSMutableArray alloc] init]; - [numberFormats1_patternArray addObject:@"4|8(?:[2-5]|6[236]|7[13])"]; - NBNumberFormat *numberFormats1 = [[NBNumberFormat alloc] initWithPattern:@"([48])(\\d{4})(\\d{4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats1_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:YES withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats1]; - - NSMutableArray *numberFormats2_patternArray = [[NSMutableArray alloc] init]; - [numberFormats2_patternArray addObject:@"2[025-79]|3[0136-9]|5[2-9]|6[0-46-8]|7[02-79]"]; - NBNumberFormat *numberFormats2 = [[NBNumberFormat alloc] initWithPattern:@"([235-7]\\d)(\\d{4})(\\d{3})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats2_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:YES withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats2]; - - NSMutableArray *numberFormats3_patternArray = [[NSMutableArray alloc] init]; - [numberFormats3_patternArray addObject:@"80"]; - NBNumberFormat *numberFormats3 = [[NBNumberFormat alloc] initWithPattern:@"(80)(\\d{5})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats3_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:YES withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats3]; - - NSMutableArray *numberFormats4_patternArray = [[NSMutableArray alloc] init]; - [numberFormats4_patternArray addObject:@"69"]; - NBNumberFormat *numberFormats4 = [[NBNumberFormat alloc] initWithPattern:@"(69\\d)(\\d{4,5})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats4_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:YES withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats4]; - - NSMutableArray *numberFormats5_patternArray = [[NSMutableArray alloc] init]; - [numberFormats5_patternArray addObject:@"2[0-489]|3[25]|5[01]|65|7[18]"]; - NBNumberFormat *numberFormats5 = [[NBNumberFormat alloc] initWithPattern:@"([235-7]\\d{2})(\\d{4})(\\d{3})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats5_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:YES withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats5]; - - NSMutableArray *numberFormats6_patternArray = [[NSMutableArray alloc] init]; - [numberFormats6_patternArray addObject:@"8(?:8|9[89])|9"]; - NBNumberFormat *numberFormats6 = [[NBNumberFormat alloc] initWithPattern:@"([89]\\d)(\\d{3})(\\d{2})(\\d{2})" withFormat:@"$1 $2 $3 $4" withLeadingDigitsPatterns:numberFormats6_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:YES withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats6]; - - NSMutableArray *numberFormats7_patternArray = [[NSMutableArray alloc] init]; - [numberFormats7_patternArray addObject:@"1(?:[26]|8[68]|99)"]; - NBNumberFormat *numberFormats7 = [[NBNumberFormat alloc] initWithPattern:@"(1[2689]\\d)(\\d{3})(\\d{4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats7_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:YES withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats7]; - - NSMutableArray *numberFormats8_patternArray = [[NSMutableArray alloc] init]; - [numberFormats8_patternArray addObject:@"86[89]"]; - NBNumberFormat *numberFormats8 = [[NBNumberFormat alloc] initWithPattern:@"(86[89])(\\d{3})(\\d{3})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats8_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:YES withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats8]; - - NSMutableArray *numberFormats9_patternArray = [[NSMutableArray alloc] init]; - [numberFormats9_patternArray addObject:@"1[89]0"]; - NBNumberFormat *numberFormats9 = [[NBNumberFormat alloc] initWithPattern:@"(1[89]00)(\\d{4,6})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats9_patternArray withNationalPrefixFormattingRule:@"$1" whenFormatting:YES withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats9]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataUS -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:10]]; - - NSMutableArray *generalDesc_descArrayPLLO = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPLLO addObject: [NSNumber numberWithInt:7]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[2-9]\\d{9}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:generalDesc_descArrayPLLO withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *fixedLine_descArrayPLLO = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPLLO addObject: [NSNumber numberWithInt:7]]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:2(?:0[1-35-9]|1[02-9]|2[04589]|3[149]|4[08]|5[1-46]|6[0279]|7[026]|8[13])|3(?:0[1-57-9]|1[02-9]|2[0135]|3[014679]|4[67]|5[12]|6[014]|8[056])|4(?:0[124-9]|1[02-579]|2[3-5]|3[0245]|4[0235]|58|6[39]|7[0589]|8[04])|5(?:0[1-57-9]|1[0235-8]|20|3[0149]|4[01]|5[19]|6[1-37]|7[013-5]|8[056])|6(?:0[1-35-9]|1[024-9]|2[03689]|3[016]|4[16]|5[017]|6[0-279]|78|8[012])|7(?:0[1-46-8]|1[02-9]|2[0457]|3[1247]|4[037]|5[47]|6[02359]|7[02-59]|8[156])|8(?:0[1-68]|1[02-8]|28|3[0-25]|4[3578]|5[046-9]|6[02-5]|7[028])|9(?:0[1346-9]|1[02-9]|2[0589]|3[014678]|4[0179]|5[12469]|7[0-3589]|8[0459]))[2-9]\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:fixedLine_descArrayPLLO withExample:@"2015550123" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *mobile_descArrayPLLO = [[NSMutableArray alloc] init]; - [mobile_descArrayPLLO addObject: [NSNumber numberWithInt:7]]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:2(?:0[1-35-9]|1[02-9]|2[04589]|3[149]|4[08]|5[1-46]|6[0279]|7[026]|8[13])|3(?:0[1-57-9]|1[02-9]|2[0135]|3[014679]|4[67]|5[12]|6[014]|8[056])|4(?:0[124-9]|1[02-579]|2[3-5]|3[0245]|4[0235]|58|6[39]|7[0589]|8[04])|5(?:0[1-57-9]|1[0235-8]|20|3[0149]|4[01]|5[19]|6[1-37]|7[013-5]|8[056])|6(?:0[1-35-9]|1[024-9]|2[03689]|3[016]|4[16]|5[017]|6[0-279]|78|8[012])|7(?:0[1-46-8]|1[02-9]|2[0457]|3[1247]|4[037]|5[47]|6[02359]|7[02-59]|8[156])|8(?:0[1-68]|1[02-8]|28|3[0-25]|4[3578]|5[046-9]|6[02-5]|7[028])|9(?:0[1346-9]|1[02-9]|2[0589]|3[014678]|4[0179]|5[12469]|7[0-3589]|8[0459]))[2-9]\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:mobile_descArrayPLLO withExample:@"2015550123" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"8(?:00|33|44|55|66|77|88)[2-9]\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"8002345678" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"900[2-9]\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"9002345678" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"5(?:00|22|33|44|66|77|88)[2-9]\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"5002345678" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"US"; - self.countryCode = [NSNumber numberWithInteger:1]; - self.internationalPrefix = @"011"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = @"1"; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = @"1"; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = YES; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{3})(\\d{4})" withFormat:@"$1-$2" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:nil whenFormatting:YES withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - - NSMutableArray *numberFormats1_patternArray = [[NSMutableArray alloc] init]; - NBNumberFormat *numberFormats1 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{3})(\\d{3})(\\d{4})" withFormat:@"($1) $2-$3" withLeadingDigitsPatterns:numberFormats1_patternArray withNationalPrefixFormattingRule:nil whenFormatting:YES withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats1]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *intlNumberFormats0_patternArray = [[NSMutableArray alloc] init]; - NBNumberFormat *intlNumberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{3})(\\d{3})(\\d{4})" withFormat:@"$1-$2-$3" withLeadingDigitsPatterns:intlNumberFormats0_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [intlNumberFormats_FormatArray addObject:intlNumberFormats0]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = YES; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataTZ -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:7]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"\\d{9}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"2[2-8]\\d{7}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"222345678" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *mobile_descArrayPL = [[NSMutableArray alloc] init]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:6[2-9]|7[13-9])\\d{7}" withPossibleNumberPattern:nil withPossibleLength:mobile_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"621234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"80[08]\\d{6}" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"800123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"90\\d{7}" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"900123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"8(?:40|6[01])\\d{6}" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"840123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"41\\d{7}" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"412345678" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:8(?:[04]0|6[01])|90\\d)\\d{6}" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"800123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"TZ"; - self.countryCode = [NSNumber numberWithInteger:255]; - self.internationalPrefix = @"00[056]"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = @"0"; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = @"0"; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - [numberFormats0_patternArray addObject:@"[24]"]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"([24]\\d)(\\d{3})(\\d{4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - - NSMutableArray *numberFormats1_patternArray = [[NSMutableArray alloc] init]; - [numberFormats1_patternArray addObject:@"[67]"]; - NBNumberFormat *numberFormats1 = [[NBNumberFormat alloc] initWithPattern:@"([67]\\d{2})(\\d{3})(\\d{3})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats1_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats1]; - - NSMutableArray *numberFormats2_patternArray = [[NSMutableArray alloc] init]; - [numberFormats2_patternArray addObject:@"[89]"]; - NBNumberFormat *numberFormats2 = [[NBNumberFormat alloc] initWithPattern:@"([89]\\d{2})(\\d{2})(\\d{4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats2_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats2]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadata878 -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:12]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"1\\d{11}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *fixedLine_descArrayPL = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:fixedLine_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *mobile_descArrayPL = [[NSMutableArray alloc] init]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:mobile_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"10\\d{10}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"101234567890" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"001"; - self.countryCode = [NSNumber numberWithInteger:878]; - self.internationalPrefix = nil; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = nil; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = nil; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = YES; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{2})(\\d{5})(\\d{5})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataYE -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:7]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:8]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:9]]; - - NSMutableArray *generalDesc_descArrayPLLO = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPLLO addObject: [NSNumber numberWithInt:6]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[1-7]\\d{6,8}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:generalDesc_descArrayPLLO withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *fixedLine_descArrayPL = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:7]]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:8]]; - - NSMutableArray *fixedLine_descArrayPLLO = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPLLO addObject: [NSNumber numberWithInt:6]]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:1(?:7\\d|[2-68])|2[2-68]|3[2358]|4[2-58]|5[2-6]|6[3-58]|7[24-68])\\d{5}" withPossibleNumberPattern:nil withPossibleLength:fixedLine_descArrayPL withPossibleLengthLocalOnly:fixedLine_descArrayPLLO withExample:@"1234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *mobile_descArrayPL = [[NSMutableArray alloc] init]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"7[0137]\\d{7}" withPossibleNumberPattern:nil withPossibleLength:mobile_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"712345678" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"YE"; - self.countryCode = [NSNumber numberWithInteger:967]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = @"0"; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = @"0"; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - [numberFormats0_patternArray addObject:@"[1-6]|7[24-68]"]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"([1-7])(\\d{3})(\\d{3,4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - - NSMutableArray *numberFormats1_patternArray = [[NSMutableArray alloc] init]; - [numberFormats1_patternArray addObject:@"7[0137]"]; - NBNumberFormat *numberFormats1 = [[NBNumberFormat alloc] initWithPattern:@"(7\\d{2})(\\d{3})(\\d{3})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats1_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats1]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataZA -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:5]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:6]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:7]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:8]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[1-79]\\d{8}|8\\d{4,8}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *fixedLine_descArrayPL = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:1[0-8]|2[1-378]|3[1-69]|4\\d|5[1346-8])\\d{7}" withPossibleNumberPattern:nil withPossibleLength:fixedLine_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"101234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:6\\d|7[0-46-9])\\d{7}|8(?:[1-4]\\d{1,5}|5\\d{5})\\d{2}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"711234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"80\\d{7}" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"801234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"86[2-9]\\d{6}|9[0-2]\\d{7}" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"862345678" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"860\\d{6}" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"860123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"87\\d{7}" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"871234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"861\\d{6}" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"861123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"ZA"; - self.countryCode = [NSNumber numberWithInteger:27]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = @"0"; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = @"0"; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - [numberFormats0_patternArray addObject:@"860"]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(860)(\\d{3})(\\d{3})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - - NSMutableArray *numberFormats1_patternArray = [[NSMutableArray alloc] init]; - [numberFormats1_patternArray addObject:@"8[1-4]"]; - NBNumberFormat *numberFormats1 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{2})(\\d{3,4})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats1_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats1]; - - NSMutableArray *numberFormats2_patternArray = [[NSMutableArray alloc] init]; - [numberFormats2_patternArray addObject:@"8[1-4]"]; - NBNumberFormat *numberFormats2 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{2})(\\d{3})(\\d{2,3})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats2_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats2]; - - NSMutableArray *numberFormats3_patternArray = [[NSMutableArray alloc] init]; - [numberFormats3_patternArray addObject:@"[1-79]|8(?:[0-57]|6[1-9])"]; - NBNumberFormat *numberFormats3 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{2})(\\d{3})(\\d{4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats3_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats3]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataUY -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:7]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:8]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[2489]\\d{6,7}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *fixedLine_descArrayPL = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:8]]; - - NSMutableArray *fixedLine_descArrayPLLO = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPLLO addObject: [NSNumber numberWithInt:7]]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"2\\d{7}|4[2-7]\\d{6}" withPossibleNumberPattern:nil withPossibleLength:fixedLine_descArrayPL withPossibleLengthLocalOnly:fixedLine_descArrayPLLO withExample:@"21231234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *mobile_descArrayPL = [[NSMutableArray alloc] init]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:8]]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"9[1-9]\\d{6}" withPossibleNumberPattern:nil withPossibleLength:mobile_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"94231234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:7]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"80[05]\\d{4}" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"8001234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:7]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"90[0-8]\\d{4}" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"9001234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"UY"; - self.countryCode = [NSNumber numberWithInteger:598]; - self.internationalPrefix = @"0(?:1[3-9]\\d|0)"; - self.preferredInternationalPrefix = @"00"; - self.nationalPrefix = @"0"; - self.preferredExtnPrefix = @" int. "; - self.nationalPrefixForParsing = @"0"; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - [numberFormats0_patternArray addObject:@"[24]"]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{4})(\\d{4})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - - NSMutableArray *numberFormats1_patternArray = [[NSMutableArray alloc] init]; - [numberFormats1_patternArray addObject:@"9[1-9]"]; - NBNumberFormat *numberFormats1 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{2})(\\d{3})(\\d{3})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats1_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats1]; - - NSMutableArray *numberFormats2_patternArray = [[NSMutableArray alloc] init]; - [numberFormats2_patternArray addObject:@"[89]0"]; - NBNumberFormat *numberFormats2 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{3})(\\d{4})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats2_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats2]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataVU -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:5]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:7]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[2-57-9]\\d{4,6}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *fixedLine_descArrayPL = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:5]]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:2[02-9]\\d|3(?:[5-7]\\d|8[0-8])|48[4-9]|88\\d)\\d{2}" withPossibleNumberPattern:nil withPossibleLength:fixedLine_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"22123" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *mobile_descArrayPL = [[NSMutableArray alloc] init]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:7]]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:5(?:7[2-5]|[0-689]\\d)|7[013-7]\\d)\\d{4}" withPossibleNumberPattern:nil withPossibleLength:mobile_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"5912345" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"3[03]\\d{3}|900\\d{4}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"30123" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"VU"; - self.countryCode = [NSNumber numberWithInteger:678]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = nil; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = nil; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - [numberFormats0_patternArray addObject:@"[579]"]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{3})(\\d{4})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataUZ -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:9]]; - - NSMutableArray *generalDesc_descArrayPLLO = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPLLO addObject: [NSNumber numberWithInt:7]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[679]\\d{8}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:generalDesc_descArrayPLLO withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *fixedLine_descArrayPLLO = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPLLO addObject: [NSNumber numberWithInt:7]]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:6(?:1(?:22|3[124]|4[1-4]|5[123578]|64)|2(?:22|3[0-57-9]|41)|5(?:22|3[3-7]|5[024-8])|6\\d{2}|7(?:[23]\\d|7[69])|9(?:22|4[1-8]|6[135]))|7(?:0(?:5[4-9]|6[0146]|7[12456]|9[135-8])|1[12]\\d|2(?:22|3[1345789]|4[123579]|5[14])|3(?:2\\d|3[1578]|4[1-35-7]|5[1-57]|61)|4(?:2\\d|3[1-579]|7[1-79])|5(?:22|5[1-9]|6[1457])|6(?:22|3[12457]|4[13-8])|9(?:22|5[1-9])))\\d{5}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:fixedLine_descArrayPLLO withExample:@"662345678" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"6(?:1(?:2(?:98|2[01])|35[0-4]|50\\d|61[23]|7(?:[01][017]|4\\d|55|9[5-9]))|2(?:11\\d|2(?:[12]1|9[01379])|5(?:[126]\\d|3[0-4])|7\\d{2})|5(?:19[01]|2(?:27|9[26])|30\\d|59\\d|7\\d{2})|6(?:2(?:1[5-9]|2[0367]|38|41|52|60)|3[79]\\d|4(?:56|83)|7(?:[07]\\d|1[017]|3[07]|4[047]|5[057]|67|8[0178]|9[79])|9[0-3]\\d)|7(?:2(?:24|3[237]|4[5-9]|7[15-8])|5(?:7[12]|8[0589])|7(?:0\\d|[39][07])|9(?:0\\d|7[079]))|9(?:2(?:1[1267]|5\\d|3[01]|7[0-4])|5[67]\\d|6(?:2[0-26]|8\\d)|7\\d{2}))\\d{4}|7(?:0\\d{3}|1(?:13[01]|6(?:0[47]|1[67]|66)|71[3-69]|98\\d)|2(?:2(?:2[79]|95)|3(?:2[5-9]|6[0-6])|57\\d|7(?:0\\d|1[17]|2[27]|3[37]|44|5[057]|66|88))|3(?:2(?:1[0-6]|21|3[469]|7[159])|33\\d|5(?:0[0-4]|5[579]|9\\d)|7(?:[0-3579]\\d|4[0467]|6[67]|8[078])|9[4-6]\\d)|4(?:2(?:29|5[0257]|6[0-7]|7[1-57])|5(?:1[0-4]|8\\d|9[5-9])|7(?:0\\d|1[024589]|2[0127]|3[0137]|[46][07]|5[01]|7[5-9]|9[079])|9(?:7[015-9]|[89]\\d))|5(?:112|2(?:0\\d|2[29]|[49]4)|3[1568]\\d|52[6-9]|7(?:0[01578]|1[017]|[23]7|4[047]|[5-7]\\d|8[78]|9[079]))|6(?:2(?:2[1245]|4[2-4])|39\\d|41[179]|5(?:[349]\\d|5[0-2])|7(?:0[017]|[13]\\d|22|44|55|67|88))|9(?:22[128]|3(?:2[0-4]|7\\d)|57[05629]|7(?:2[05-9]|3[37]|4\\d|60|7[2579]|87|9[07])))\\d{4}|9[0-57-9]\\d{7}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"912345678" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"UZ"; - self.countryCode = [NSNumber numberWithInteger:998]; - self.internationalPrefix = @"810"; - self.preferredInternationalPrefix = @"8~10"; - self.nationalPrefix = @"8"; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = @"8"; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"([679]\\d)(\\d{3})(\\d{2})(\\d{2})" withFormat:@"$1 $2 $3 $4" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:@"8 $1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataWS -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:5]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:6]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:7]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[2-8]\\d{4,6}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *fixedLine_descArrayPL = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:5]]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:7]]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:[2-5]\\d|6[1-9]|84\\d{2})\\d{3}" withPossibleNumberPattern:nil withPossibleLength:fixedLine_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"22123" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *mobile_descArrayPL = [[NSMutableArray alloc] init]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:6]]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:7]]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:60|7[25-7]\\d)\\d{4}" withPossibleNumberPattern:nil withPossibleLength:mobile_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"601234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:6]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"800\\d{3}" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"800123" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"WS"; - self.countryCode = [NSNumber numberWithInteger:685]; - self.internationalPrefix = @"0"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = nil; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = nil; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - [numberFormats0_patternArray addObject:@"8"]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(8\\d{2})(\\d{3,4})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - - NSMutableArray *numberFormats1_patternArray = [[NSMutableArray alloc] init]; - [numberFormats1_patternArray addObject:@"7"]; - NBNumberFormat *numberFormats1 = [[NBNumberFormat alloc] initWithPattern:@"(7\\d)(\\d{5})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats1_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats1]; - - NSMutableArray *numberFormats2_patternArray = [[NSMutableArray alloc] init]; - [numberFormats2_patternArray addObject:@"[2-6]"]; - NBNumberFormat *numberFormats2 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{5})" withFormat:@"$1" withLeadingDigitsPatterns:numberFormats2_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats2]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadata979 -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"\\d{9}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *fixedLine_descArrayPL = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:fixedLine_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *mobile_descArrayPL = [[NSMutableArray alloc] init]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:mobile_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"\\d{9}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"123456789" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"001"; - self.countryCode = [NSNumber numberWithInteger:979]; - self.internationalPrefix = nil; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = nil; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = nil; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = YES; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(\\d)(\\d{4})(\\d{4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = YES; - } - return self; -} -@end - -@implementation NBPhoneMetadataZM -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[289]\\d{8}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"21[1-8]\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"211234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"9(?:5[034589]|[67]\\d)\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"955123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"800\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"800123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"ZM"; - self.countryCode = [NSNumber numberWithInteger:260]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = @"0"; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = @"0"; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - [numberFormats0_patternArray addObject:@"[29]"]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"([29]\\d)(\\d{7})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - - NSMutableArray *numberFormats1_patternArray = [[NSMutableArray alloc] init]; - [numberFormats1_patternArray addObject:@"8"]; - NBNumberFormat *numberFormats1 = [[NBNumberFormat alloc] initWithPattern:@"(800)(\\d{3})(\\d{3})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats1_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats1]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataAC -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:5]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:6]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[46]\\d{4}|[01589]\\d{5}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *fixedLine_descArrayPL = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:5]]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"6[2-467]\\d{3}" withPossibleNumberPattern:nil withPossibleLength:fixedLine_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"62889" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *mobile_descArrayPL = [[NSMutableArray alloc] init]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:5]]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"4\\d{4}" withPossibleNumberPattern:nil withPossibleLength:mobile_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"40123" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:6]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[01589]\\d{5}" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"542011" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"AC"; - self.countryCode = [NSNumber numberWithInteger:247]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = nil; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = nil; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataAD -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:6]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:8]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[16]\\d{5,8}|[37-9]\\d{5}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *fixedLine_descArrayPL = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:6]]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[78]\\d{5}" withPossibleNumberPattern:nil withPossibleLength:fixedLine_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"712345" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *mobile_descArrayPL = [[NSMutableArray alloc] init]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:6]]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:3\\d|6(?:[0-8]|90\\d{2}))\\d{4}" withPossibleNumberPattern:nil withPossibleLength:mobile_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"312345" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:8]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"180[02]\\d{4}" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"18001234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:6]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[19]\\d{5}" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"912345" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:8]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"1800\\d{4}" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"18000000" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"AD"; - self.countryCode = [NSNumber numberWithInteger:376]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = nil; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = nil; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - [numberFormats0_patternArray addObject:@"[137-9]|6[0-8]"]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{3})(\\d{3})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - - NSMutableArray *numberFormats1_patternArray = [[NSMutableArray alloc] init]; - [numberFormats1_patternArray addObject:@"180"]; - [numberFormats1_patternArray addObject:@"180[02]"]; - NBNumberFormat *numberFormats1 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{4})(\\d{4})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats1_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats1]; - - NSMutableArray *numberFormats2_patternArray = [[NSMutableArray alloc] init]; - [numberFormats2_patternArray addObject:@"690"]; - NBNumberFormat *numberFormats2 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{3})(\\d{3})(\\d{3})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats2_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats2]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataYT -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[268]\\d{8}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"269(?:6[0-4]|50)\\d{4}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"269601234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"639\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"639123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"80\\d{7}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"801234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"YT"; - self.countryCode = [NSNumber numberWithInteger:262]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = @"0"; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = @"0"; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = @"269|63"; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataAE -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:5]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:6]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:7]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:8]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:9]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:10]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:11]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:12]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[2-79]\\d{7,8}|800\\d{2,9}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *fixedLine_descArrayPL = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:8]]; - - NSMutableArray *fixedLine_descArrayPLLO = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPLLO addObject: [NSNumber numberWithInt:7]]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[2-4679][2-8]\\d{6}" withPossibleNumberPattern:nil withPossibleLength:fixedLine_descArrayPL withPossibleLengthLocalOnly:fixedLine_descArrayPLLO withExample:@"22345678" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *mobile_descArrayPL = [[NSMutableArray alloc] init]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"5[024-68]\\d{7}" withPossibleNumberPattern:nil withPossibleLength:mobile_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"501234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"400\\d{6}|800\\d{2,9}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"800123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"900[02]\\d{5}" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"900234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"700[05]\\d{5}" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"700012345" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"600[25]\\d{5}" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"600212345" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"AE"; - self.countryCode = [NSNumber numberWithInteger:971]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = @"0"; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = @"0"; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - [numberFormats0_patternArray addObject:@"[2-4679][2-8]"]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"([2-4679])(\\d{3})(\\d{4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - - NSMutableArray *numberFormats1_patternArray = [[NSMutableArray alloc] init]; - [numberFormats1_patternArray addObject:@"5"]; - NBNumberFormat *numberFormats1 = [[NBNumberFormat alloc] initWithPattern:@"(5\\d)(\\d{3})(\\d{4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats1_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats1]; - - NSMutableArray *numberFormats2_patternArray = [[NSMutableArray alloc] init]; - [numberFormats2_patternArray addObject:@"[479]0"]; - NBNumberFormat *numberFormats2 = [[NBNumberFormat alloc] initWithPattern:@"([479]00)(\\d)(\\d{5})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats2_patternArray withNationalPrefixFormattingRule:@"$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats2]; - - NSMutableArray *numberFormats3_patternArray = [[NSMutableArray alloc] init]; - [numberFormats3_patternArray addObject:@"60|8"]; - NBNumberFormat *numberFormats3 = [[NBNumberFormat alloc] initWithPattern:@"([68]00)(\\d{2,9})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats3_patternArray withNationalPrefixFormattingRule:@"$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats3]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataBA -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:8]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:9]]; - - NSMutableArray *generalDesc_descArrayPLLO = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPLLO addObject: [NSNumber numberWithInt:6]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[3-9]\\d{7,8}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:generalDesc_descArrayPLLO withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *fixedLine_descArrayPL = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:8]]; - - NSMutableArray *fixedLine_descArrayPLLO = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPLLO addObject: [NSNumber numberWithInt:6]]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:[35]\\d|49)\\d{6}" withPossibleNumberPattern:nil withPossibleLength:fixedLine_descArrayPL withPossibleLengthLocalOnly:fixedLine_descArrayPLLO withExample:@"30123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"6(?:03|44|71|[1-356])\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"61123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:8]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"8[08]\\d{6}" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"80123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:8]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"9[0246]\\d{6}" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"90123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:8]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"8[12]\\d{6}" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"82123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:8]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"70[23]\\d{5}" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"70223456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"BA"; - self.countryCode = [NSNumber numberWithInteger:387]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = @"0"; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = @"0"; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - [numberFormats0_patternArray addObject:@"[3-5]"]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{2})(\\d{3})(\\d{3})" withFormat:@"$1 $2-$3" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - - NSMutableArray *numberFormats1_patternArray = [[NSMutableArray alloc] init]; - [numberFormats1_patternArray addObject:@"6[1-356]|[7-9]"]; - NBNumberFormat *numberFormats1 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{2})(\\d{3})(\\d{3})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats1_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats1]; - - NSMutableArray *numberFormats2_patternArray = [[NSMutableArray alloc] init]; - [numberFormats2_patternArray addObject:@"6[047]"]; - NBNumberFormat *numberFormats2 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{2})(\\d{2})(\\d{2})(\\d{3})" withFormat:@"$1 $2 $3 $4" withLeadingDigitsPatterns:numberFormats2_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats2]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataAF -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:9]]; - - NSMutableArray *generalDesc_descArrayPLLO = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPLLO addObject: [NSNumber numberWithInt:7]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[2-7]\\d{8}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:generalDesc_descArrayPLLO withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *fixedLine_descArrayPLLO = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPLLO addObject: [NSNumber numberWithInt:7]]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:[25][0-8]|[34][0-4]|6[0-5])[2-9]\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:fixedLine_descArrayPLLO withExample:@"234567890" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"7(?:[014-9]\\d|2[89]|30)\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"701234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"AF"; - self.countryCode = [NSNumber numberWithInteger:93]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = @"0"; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = @"0"; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - [numberFormats0_patternArray addObject:@"[2-7]"]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"([2-7]\\d)(\\d{3})(\\d{4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataBB -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:10]]; - - NSMutableArray *generalDesc_descArrayPLLO = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPLLO addObject: [NSNumber numberWithInt:7]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[2589]\\d{9}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:generalDesc_descArrayPLLO withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *fixedLine_descArrayPLLO = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPLLO addObject: [NSNumber numberWithInt:7]]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"246(?:2(?:2[78]|7[0-4])|4(?:1[024-6]|2\\d|3[2-9])|5(?:20|[34]\\d|54|7[1-3])|6(?:2\\d|38)|7(?:37|57)|9(?:1[89]|63))\\d{4}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:fixedLine_descArrayPLLO withExample:@"2464123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *mobile_descArrayPLLO = [[NSMutableArray alloc] init]; - [mobile_descArrayPLLO addObject: [NSNumber numberWithInt:7]]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"246(?:2(?:[356]\\d|4[0-57-9]|8[0-79])|45\\d|8(?:[2-5]\\d|83))\\d{4}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:mobile_descArrayPLLO withExample:@"2462501234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"8(?:00|33|44|55|66|77|88)[2-9]\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"8002123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPLLO = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPLLO addObject: [NSNumber numberWithInt:7]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"900\\d{7}|246976\\d{4}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:premiumRate_descArrayPLLO withExample:@"9002123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"5(?:00|22|33|44|66|77|88)[2-9]\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"5002345678" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPLLO = [[NSMutableArray alloc] init]; - [voip_descArrayPLLO addObject: [NSNumber numberWithInt:7]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"24631\\d{5}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:voip_descArrayPLLO withExample:@"2463101234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPLLO = [[NSMutableArray alloc] init]; - [uan_descArrayPLLO addObject: [NSNumber numberWithInt:7]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"246(?:292|367|4(?:1[7-9]|3[01]|44|67)|736)\\d{4}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:uan_descArrayPLLO withExample:@"2464301234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"BB"; - self.countryCode = [NSNumber numberWithInteger:1]; - self.internationalPrefix = @"011"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = @"1"; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = @"1"; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = @"246"; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataAG -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:10]]; - - NSMutableArray *generalDesc_descArrayPLLO = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPLLO addObject: [NSNumber numberWithInt:7]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[2589]\\d{9}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:generalDesc_descArrayPLLO withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *fixedLine_descArrayPLLO = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPLLO addObject: [NSNumber numberWithInt:7]]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"268(?:4(?:6[0-38]|84)|56[0-2])\\d{4}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:fixedLine_descArrayPLLO withExample:@"2684601234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *mobile_descArrayPLLO = [[NSMutableArray alloc] init]; - [mobile_descArrayPLLO addObject: [NSNumber numberWithInt:7]]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"268(?:464|7(?:2\\d|3[246]|64|7[0-689]|8[02-68]))\\d{4}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:mobile_descArrayPLLO withExample:@"2684641234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"8(?:00|33|44|55|66|77|88)[2-9]\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"8002123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"900[2-9]\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"9002123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"5(?:00|22|33|44|66|77|88)[2-9]\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"5002345678" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPLLO = [[NSMutableArray alloc] init]; - [voip_descArrayPLLO addObject: [NSNumber numberWithInt:7]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"26848[01]\\d{4}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:voip_descArrayPLLO withExample:@"2684801234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPLLO = [[NSMutableArray alloc] init]; - [pager_descArrayPLLO addObject: [NSNumber numberWithInt:7]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"26840[69]\\d{4}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:pager_descArrayPLLO withExample:@"2684061234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"AG"; - self.countryCode = [NSNumber numberWithInteger:1]; - self.internationalPrefix = @"011"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = @"1"; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = @"1"; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = @"268"; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataBD -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:6]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:7]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:8]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:9]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:10]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[2-79]\\d{5,9}|1\\d{9}|8[0-7]\\d{4,8}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *fixedLine_descArrayPL = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:6]]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:7]]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:8]]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"2(?:[45]\\d{3}|7(?:1[0-267]|2[0-289]|3[0-29]|4[01]|5[1-3]|6[013]|7[0178]|91)|8(?:0[125]|[139][1-6]|2[0157-9]|41|6[1-35]|7[1-5]|8[1-8]|90)|9(?:0[0-2]|1[0-4]|2[568]|3[3-6]|5[5-7]|6[0167]|7[15]|8[0146-9]))\\d{4}|3(?:12?[5-7]\\d{2}|0(?:2(?:[025-79]\\d|[348]\\d{1,2})|3(?:[2-4]\\d|[56]\\d?))|2(?:1\\d{2}|2(?:[12]\\d|[35]\\d{1,2}|4\\d?))|3(?:1\\d{2}|2(?:[2356]\\d|4\\d{1,2}))|4(?:1\\d{2}|2(?:2\\d{1,2}|[47]|5\\d{2}))|5(?:1\\d{2}|29)|[67]1\\d{2}|8(?:1\\d{2}|2(?:2\\d{2}|3|4\\d)))\\d{3}|4(?:0(?:2(?:[09]\\d|7)|33\\d{2})|1\\d{3}|2(?:1\\d{2}|2(?:[25]\\d?|[348]\\d|[67]\\d{1,2}))|3(?:1\\d{2}(?:\\d{2})?|2(?:[045]\\d|[236-9]\\d{1,2})|32\\d{2})|4(?:[18]\\d{2}|2(?:[2-46]\\d{2}|3)|5[25]\\d{2})|5(?:1\\d{2}|2(?:3\\d|5))|6(?:[18]\\d{2}|2(?:3(?:\\d{2})?|[46]\\d{1,2}|5\\d{2}|7\\d)|5(?:3\\d?|4\\d|[57]\\d{1,2}|6\\d{2}|8))|71\\d{2}|8(?:[18]\\d{2}|23\\d{2}|54\\d{2})|9(?:[18]\\d{2}|2[2-5]\\d{2}|53\\d{1,2}))\\d{3}|5(?:02[03489]\\d{2}|1\\d{2}|2(?:1\\d{2}|2(?:2(?:\\d{2})?|[457]\\d{2}))|3(?:1\\d{2}|2(?:[37](?:\\d{2})?|[569]\\d{2}))|4(?:1\\d{2}|2[46]\\d{2})|5(?:1\\d{2}|26\\d{1,2})|6(?:[18]\\d{2}|2|53\\d{2})|7(?:1|24)\\d{2}|8(?:1|26)\\d{2}|91\\d{2})\\d{3}|6(?:0(?:1\\d{2}|2(?:3\\d{2}|4\\d{1,2}))|2(?:2[2-5]\\d{2}|5(?:[3-5]\\d{2}|7)|8\\d{2})|3(?:1|2[3478])\\d{2}|4(?:1|2[34])\\d{2}|5(?:1|2[47])\\d{2}|6(?:[18]\\d{2}|6(?:2(?:2\\d|[34]\\d{2})|5(?:[24]\\d{2}|3\\d|5\\d{1,2})))|72[2-5]\\d{2}|8(?:1\\d{2}|2[2-5]\\d{2})|9(?:1\\d{2}|2[2-6]\\d{2}))\\d{3}|7(?:(?:02|[3-589]1|6[12]|72[24])\\d{2}|21\\d{3}|32)\\d{3}|8(?:(?:4[12]|[5-7]2|1\\d?)|(?:0|3[12]|[5-7]1|217)\\d)\\d{4}|9(?:[35]1|(?:[024]2|81)\\d|(?:1|[24]1)\\d{2})\\d{3}" withPossibleNumberPattern:nil withPossibleLength:fixedLine_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"27111234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *mobile_descArrayPL = [[NSMutableArray alloc] init]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:10]]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:1[13-9]\\d|(?:3[78]|44)[02-9]|6(?:44|6[02-9]))\\d{7}" withPossibleNumberPattern:nil withPossibleLength:mobile_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"1812345678" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:10]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"80[03]\\d{7}" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"8001234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:10]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"96(?:0[49]|1[0-4]|6[69])\\d{6}" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"9604123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"BD"; - self.countryCode = [NSNumber numberWithInteger:880]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = @"0"; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = @"0"; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - [numberFormats0_patternArray addObject:@"2"]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(2)(\\d{7,8})" withFormat:@"$1-$2" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - - NSMutableArray *numberFormats1_patternArray = [[NSMutableArray alloc] init]; - [numberFormats1_patternArray addObject:@"[3-79]1"]; - NBNumberFormat *numberFormats1 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{2})(\\d{4,6})" withFormat:@"$1-$2" withLeadingDigitsPatterns:numberFormats1_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats1]; - - NSMutableArray *numberFormats2_patternArray = [[NSMutableArray alloc] init]; - [numberFormats2_patternArray addObject:@"1|3(?:0|[2-58]2)|4(?:0|[25]2|3[23]|[4689][25])|5(?:[02-578]2|6[25])|6(?:[0347-9]2|[26][25])|7[02-9]2|8(?:[023][23]|[4-7]2)|9(?:[02][23]|[458]2|6[016])"]; - NBNumberFormat *numberFormats2 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{4})(\\d{3,6})" withFormat:@"$1-$2" withLeadingDigitsPatterns:numberFormats2_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats2]; - - NSMutableArray *numberFormats3_patternArray = [[NSMutableArray alloc] init]; - [numberFormats3_patternArray addObject:@"[3-79][2-9]|8"]; - NBNumberFormat *numberFormats3 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{3})(\\d{3,7})" withFormat:@"$1-$2" withLeadingDigitsPatterns:numberFormats3_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats3]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataAI -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:10]]; - - NSMutableArray *generalDesc_descArrayPLLO = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPLLO addObject: [NSNumber numberWithInt:7]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[2589]\\d{9}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:generalDesc_descArrayPLLO withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *fixedLine_descArrayPLLO = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPLLO addObject: [NSNumber numberWithInt:7]]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"2644(?:6[12]|9[78])\\d{4}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:fixedLine_descArrayPLLO withExample:@"2644612345" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *mobile_descArrayPLLO = [[NSMutableArray alloc] init]; - [mobile_descArrayPLLO addObject: [NSNumber numberWithInt:7]]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"264(?:235|476|5(?:3[6-9]|8[1-4])|7(?:29|72))\\d{4}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:mobile_descArrayPLLO withExample:@"2642351234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"8(?:00|33|44|55|66|77|88)[2-9]\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"8002123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"900[2-9]\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"9002123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"5(?:00|22|33|44|66|77|88)[2-9]\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"5002345678" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"AI"; - self.countryCode = [NSNumber numberWithInteger:1]; - self.internationalPrefix = @"011"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = @"1"; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = @"1"; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = @"264"; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataBE -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:8]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[1-9]\\d{7,8}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *fixedLine_descArrayPL = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:8]]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:1[0-69]|[23][2-8]|4[23]|5\\d|6[013-57-9]|71|8[1-79]|9[2-4])\\d{6}|80[2-8]\\d{5}" withPossibleNumberPattern:nil withPossibleLength:fixedLine_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"12345678" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *mobile_descArrayPL = [[NSMutableArray alloc] init]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"4(?:6[0135-8]|[79]\\d|8[3-9])\\d{6}" withPossibleNumberPattern:nil withPossibleLength:mobile_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"470123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:8]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"800\\d{5}" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"80012345" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:8]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:70[2-467]|90[0-79])\\d{5}" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"90123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:8]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"78\\d{6}" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"78123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"BE"; - self.countryCode = [NSNumber numberWithInteger:32]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = @"0"; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = @"0"; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - [numberFormats0_patternArray addObject:@"4[6-9]"]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{3})(\\d{2})(\\d{2})(\\d{2})" withFormat:@"$1 $2 $3 $4" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - - NSMutableArray *numberFormats1_patternArray = [[NSMutableArray alloc] init]; - [numberFormats1_patternArray addObject:@"[23]|4[23]|9[2-4]"]; - NBNumberFormat *numberFormats1 = [[NBNumberFormat alloc] initWithPattern:@"(\\d)(\\d{3})(\\d{2})(\\d{2})" withFormat:@"$1 $2 $3 $4" withLeadingDigitsPatterns:numberFormats1_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats1]; - - NSMutableArray *numberFormats2_patternArray = [[NSMutableArray alloc] init]; - [numberFormats2_patternArray addObject:@"[156]|7[018]|8(?:0[1-9]|[1-79])"]; - NBNumberFormat *numberFormats2 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{2})(\\d{2})(\\d{2})(\\d{2})" withFormat:@"$1 $2 $3 $4" withLeadingDigitsPatterns:numberFormats2_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats2]; - - NSMutableArray *numberFormats3_patternArray = [[NSMutableArray alloc] init]; - [numberFormats3_patternArray addObject:@"(?:80|9)0"]; - NBNumberFormat *numberFormats3 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{3})(\\d{2})(\\d{3})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats3_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats3]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataCA -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:7]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:10]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[2-9]\\d{9}|3\\d{6}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *fixedLine_descArrayPL = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:10]]; - - NSMutableArray *fixedLine_descArrayPLLO = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPLLO addObject: [NSNumber numberWithInt:7]]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:2(?:04|[23]6|[48]9|50)|3(?:06|43|65)|4(?:03|1[68]|3[178]|50)|5(?:06|1[49]|48|79|8[17])|6(?:0[04]|13|22|39|47)|7(?:0[59]|78|8[02])|8(?:[06]7|19|25|73)|90[25])[2-9]\\d{6}|310\\d{4}" withPossibleNumberPattern:nil withPossibleLength:fixedLine_descArrayPL withPossibleLengthLocalOnly:fixedLine_descArrayPLLO withExample:@"2042345678" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *mobile_descArrayPL = [[NSMutableArray alloc] init]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:10]]; - - NSMutableArray *mobile_descArrayPLLO = [[NSMutableArray alloc] init]; - [mobile_descArrayPLLO addObject: [NSNumber numberWithInt:7]]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:2(?:04|[23]6|[48]9|50)|3(?:06|43|65)|4(?:03|1[68]|3[178]|50)|5(?:06|1[49]|48|79|8[17])|6(?:0[04]|13|22|39|47)|7(?:0[59]|78|8[02])|8(?:[06]7|19|25|73)|90[25])[2-9]\\d{6}" withPossibleNumberPattern:nil withPossibleLength:mobile_descArrayPL withPossibleLengthLocalOnly:mobile_descArrayPLLO withExample:@"2042345678" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"8(?:00|33|44|55|66|77|88)[2-9]\\d{6}|310\\d{4}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"8002123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:10]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"900[2-9]\\d{6}" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"9002123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:10]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"5(?:00|22|33|44|66|77|88)[2-9]\\d{6}" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"5002345678" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"CA"; - self.countryCode = [NSNumber numberWithInteger:1]; - self.internationalPrefix = @"011"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = @"1"; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = @"1"; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataBF -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:8]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[25-7]\\d{7}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"2(?:0(?:49|5[23]|6[56]|9[016-9])|4(?:4[569]|5[4-6]|6[56]|7[0179])|5(?:[34]\\d|50|6[56]))\\d{4}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"20491234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:5(?:[15]\\d|6[0-4])|[67]\\d{2})\\d{5}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"70123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"BF"; - self.countryCode = [NSNumber numberWithInteger:226]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = nil; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = nil; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{2})(\\d{2})(\\d{2})(\\d{2})" withFormat:@"$1 $2 $3 $4" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataBG -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:6]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:7]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:8]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:9]]; - - NSMutableArray *generalDesc_descArrayPLLO = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPLLO addObject: [NSNumber numberWithInt:4]]; - [generalDesc_descArrayPLLO addObject: [NSNumber numberWithInt:5]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[23567]\\d{5,7}|[489]\\d{6,8}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:generalDesc_descArrayPLLO withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *fixedLine_descArrayPL = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:6]]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:7]]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:8]]; - - NSMutableArray *fixedLine_descArrayPLLO = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPLLO addObject: [NSNumber numberWithInt:4]]; - [fixedLine_descArrayPLLO addObject: [NSNumber numberWithInt:5]]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"2\\d{5,7}|(?:[36]\\d|5[1-9]|8[1-6]|9[1-7])\\d{5,6}|(?:4(?:[124-7]\\d|3[1-6])|7(?:0[1-9]|[1-9]\\d))\\d{4,5}" withPossibleNumberPattern:nil withPossibleLength:fixedLine_descArrayPL withPossibleLengthLocalOnly:fixedLine_descArrayPLLO withExample:@"2123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *mobile_descArrayPL = [[NSMutableArray alloc] init]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:8]]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:8[7-9]\\d|9(?:8\\d|99))\\d{6}|4(?:3[0789]|8\\d)\\d{5}" withPossibleNumberPattern:nil withPossibleLength:mobile_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"48123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:8]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"800\\d{5}" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"80012345" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:8]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"90\\d{6}" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"90123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:8]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"700\\d{5}" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"70012345" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"BG"; - self.countryCode = [NSNumber numberWithInteger:359]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = @"0"; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = @"0"; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - [numberFormats0_patternArray addObject:@"2"]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(2)(\\d)(\\d{2})(\\d{2})" withFormat:@"$1 $2 $3 $4" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - - NSMutableArray *numberFormats1_patternArray = [[NSMutableArray alloc] init]; - [numberFormats1_patternArray addObject:@"2"]; - NBNumberFormat *numberFormats1 = [[NBNumberFormat alloc] initWithPattern:@"(2)(\\d{3})(\\d{3,4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats1_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats1]; - - NSMutableArray *numberFormats2_patternArray = [[NSMutableArray alloc] init]; - [numberFormats2_patternArray addObject:@"43[124-7]|70[1-9]"]; - NBNumberFormat *numberFormats2 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{3})(\\d{4})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats2_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats2]; - - NSMutableArray *numberFormats3_patternArray = [[NSMutableArray alloc] init]; - [numberFormats3_patternArray addObject:@"43[124-7]|70[1-9]"]; - NBNumberFormat *numberFormats3 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{3})(\\d{3})(\\d{2})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats3_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats3]; - - NSMutableArray *numberFormats4_patternArray = [[NSMutableArray alloc] init]; - [numberFormats4_patternArray addObject:@"[78]00"]; - NBNumberFormat *numberFormats4 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{3})(\\d{2})(\\d{3})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats4_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats4]; - - NSMutableArray *numberFormats5_patternArray = [[NSMutableArray alloc] init]; - [numberFormats5_patternArray addObject:@"999"]; - NBNumberFormat *numberFormats5 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{3})(\\d{3})(\\d{3})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats5_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats5]; - - NSMutableArray *numberFormats6_patternArray = [[NSMutableArray alloc] init]; - [numberFormats6_patternArray addObject:@"[356]|4[124-7]|7[1-9]|8[1-6]|9[1-7]"]; - NBNumberFormat *numberFormats6 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{2})(\\d{3})(\\d{2,3})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats6_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats6]; - - NSMutableArray *numberFormats7_patternArray = [[NSMutableArray alloc] init]; - [numberFormats7_patternArray addObject:@"48|8[7-9]|9[08]"]; - NBNumberFormat *numberFormats7 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{2})(\\d{3})(\\d{3,4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats7_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats7]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataZW -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:5]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:6]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:7]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:8]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:9]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:10]]; - - NSMutableArray *generalDesc_descArrayPLLO = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPLLO addObject: [NSNumber numberWithInt:3]]; - [generalDesc_descArrayPLLO addObject: [NSNumber numberWithInt:4]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"2(?:[012457-9]\\d{3,8}|6(?:[14]\\d{7}|\\d{4}))|[13-79]\\d{4,9}|8[06]\\d{8}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:generalDesc_descArrayPLLO withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *fixedLine_descArrayPLLO = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPLLO addObject: [NSNumber numberWithInt:3]]; - [fixedLine_descArrayPLLO addObject: [NSNumber numberWithInt:4]]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:2(?:0(?:4\\d|5\\d{2})|2[278]\\d|48\\d|7(?:[1-7]\\d|[089]\\d{2})|8(?:[2-57-9]|[146]\\d{2})|98)|3(?:08|17|3[78]|7(?:[19]|[56]\\d)|8[37]|98)|5[15][78]|6(?:28\\d{2}|[36]7|75\\d|[69]8|8(?:7\\d|8)))\\d{3}|(?:2(?:1[39]|2[0157]|6[14]|7[35]|84)|329)\\d{7}|(?:1(?:3\\d{2}|9\\d|[4-8])|2(?:0\\d{2}|[569]\\d)|3(?:[26]|[013459]\\d)|5(?:0|5\\d{2}|[689]\\d)|6(?:[39]|[01246]\\d|[78]\\d{2}))\\d{3}|(?:29\\d|39|54)\\d{6}|(?:(?:25|54)83|2582\\d)\\d{3}|(?:4\\d{6,7}|9[2-9]\\d{4,5})" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:fixedLine_descArrayPLLO withExample:@"1312345" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *mobile_descArrayPL = [[NSMutableArray alloc] init]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"7[1378]\\d{7}" withPossibleNumberPattern:nil withPossibleLength:mobile_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"711234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:10]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"800\\d{7}" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"8001234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:10]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"86(?:1[12]|30|44|55|77|8[367]|99)\\d{6}" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"8686123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"ZW"; - self.countryCode = [NSNumber numberWithInteger:263]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = @"0"; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = @"0"; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - [numberFormats0_patternArray addObject:@"4|9[2-9]"]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"([49])(\\d{3})(\\d{2,4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - - NSMutableArray *numberFormats1_patternArray = [[NSMutableArray alloc] init]; - [numberFormats1_patternArray addObject:@"7"]; - NBNumberFormat *numberFormats1 = [[NBNumberFormat alloc] initWithPattern:@"(7\\d)(\\d{3})(\\d{3,4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats1_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats1]; - - NSMutableArray *numberFormats2_patternArray = [[NSMutableArray alloc] init]; - [numberFormats2_patternArray addObject:@"86[24]"]; - NBNumberFormat *numberFormats2 = [[NBNumberFormat alloc] initWithPattern:@"(86\\d{2})(\\d{3})(\\d{3})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats2_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats2]; - - NSMutableArray *numberFormats3_patternArray = [[NSMutableArray alloc] init]; - [numberFormats3_patternArray addObject:@"2(?:0[45]|2[278]|[49]8|[78])|3(?:08|17|3[78]|7[1569]|8[37]|98)|5[15][78]|6(?:[29]8|[38]7|6[78]|75|[89]8)"]; - NBNumberFormat *numberFormats3 = [[NBNumberFormat alloc] initWithPattern:@"([2356]\\d{2})(\\d{3,5})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats3_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats3]; - - NSMutableArray *numberFormats4_patternArray = [[NSMutableArray alloc] init]; - [numberFormats4_patternArray addObject:@"2(?:1[39]|2[0157]|6[14]|7[35]|84)|329"]; - NBNumberFormat *numberFormats4 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{3})(\\d{3})(\\d{3,4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats4_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats4]; - - NSMutableArray *numberFormats5_patternArray = [[NSMutableArray alloc] init]; - [numberFormats5_patternArray addObject:@"1[3-9]|2[0569]|3[0-69]|5[05689]|6[0-46-9]"]; - NBNumberFormat *numberFormats5 = [[NBNumberFormat alloc] initWithPattern:@"([1-356]\\d)(\\d{3,5})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats5_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats5]; - - NSMutableArray *numberFormats6_patternArray = [[NSMutableArray alloc] init]; - [numberFormats6_patternArray addObject:@"[23]9|54"]; - NBNumberFormat *numberFormats6 = [[NBNumberFormat alloc] initWithPattern:@"([235]\\d)(\\d{3})(\\d{3,4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats6_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats6]; - - NSMutableArray *numberFormats7_patternArray = [[NSMutableArray alloc] init]; - [numberFormats7_patternArray addObject:@"(?:25|54)8"]; - [numberFormats7_patternArray addObject:@"258[23]|5483"]; - NBNumberFormat *numberFormats7 = [[NBNumberFormat alloc] initWithPattern:@"([25]\\d{3})(\\d{3,5})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats7_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats7]; - - NSMutableArray *numberFormats8_patternArray = [[NSMutableArray alloc] init]; - [numberFormats8_patternArray addObject:@"86"]; - NBNumberFormat *numberFormats8 = [[NBNumberFormat alloc] initWithPattern:@"(8\\d{3})(\\d{6})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats8_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats8]; - - NSMutableArray *numberFormats9_patternArray = [[NSMutableArray alloc] init]; - [numberFormats9_patternArray addObject:@"80"]; - NBNumberFormat *numberFormats9 = [[NBNumberFormat alloc] initWithPattern:@"(80\\d)(\\d{3})(\\d{4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats9_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats9]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataAL -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:6]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:7]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:8]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:9]]; - - NSMutableArray *generalDesc_descArrayPLLO = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPLLO addObject: [NSNumber numberWithInt:5]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[2-57]\\d{7}|6\\d{8}|8\\d{5,7}|9\\d{5}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:generalDesc_descArrayPLLO withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *fixedLine_descArrayPL = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:8]]; - - NSMutableArray *fixedLine_descArrayPLLO = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPLLO addObject: [NSNumber numberWithInt:5]]; - [fixedLine_descArrayPLLO addObject: [NSNumber numberWithInt:6]]; - [fixedLine_descArrayPLLO addObject: [NSNumber numberWithInt:7]]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:2(?:1(?:0[2-9]|[1-9]\\d)|[247]\\d{2}|[35][2-9]\\d|[68](?:0[2-9]|[1-9]\\d)|9(?:[089][2-9]|[1-7]\\d))|3(?:1(?:[04-9][2-9]|[1-3]\\d)|[2-6]\\d{2}|[79](?:[09][2-9]|[1-8]\\d)|8(?:0[2-9]|[1-9]\\d))|4\\d{3}|5(?:1(?:[05-9][2-9]|[1-4]\\d)|[2-578]\\d{2}|6(?:[06-9][2-9]|[1-5]\\d)|9(?:[089][2-9]|[1-7]\\d))|8(?:[19](?:[06-9][2-9]|[1-5]\\d)|[2-6]\\d{2}|[78](?:[089][2-9]|[1-7]\\d)))\\d{4}" withPossibleNumberPattern:nil withPossibleLength:fixedLine_descArrayPL withPossibleLengthLocalOnly:fixedLine_descArrayPLLO withExample:@"22345678" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *mobile_descArrayPL = [[NSMutableArray alloc] init]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"6(?:[2-5][2-9]|[6-9]\\d)\\d{6}" withPossibleNumberPattern:nil withPossibleLength:mobile_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"661234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:7]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"800\\d{4}" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"8001234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:6]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"900\\d{3}" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"900123" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:6]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"808\\d{3}" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"808123" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:8]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"700\\d{5}" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"70012345" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"AL"; - self.countryCode = [NSNumber numberWithInteger:355]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = @"0"; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = @"0"; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - [numberFormats0_patternArray addObject:@"4[0-6]"]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(4)(\\d{3})(\\d{4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - - NSMutableArray *numberFormats1_patternArray = [[NSMutableArray alloc] init]; - [numberFormats1_patternArray addObject:@"6"]; - NBNumberFormat *numberFormats1 = [[NBNumberFormat alloc] initWithPattern:@"(6\\d)(\\d{3})(\\d{4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats1_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats1]; - - NSMutableArray *numberFormats2_patternArray = [[NSMutableArray alloc] init]; - [numberFormats2_patternArray addObject:@"[2358][2-5]|4[7-9]"]; - NBNumberFormat *numberFormats2 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{2})(\\d{3})(\\d{3})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats2_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats2]; - - NSMutableArray *numberFormats3_patternArray = [[NSMutableArray alloc] init]; - [numberFormats3_patternArray addObject:@"[235][16-9]|8[016-9]|[79]"]; - NBNumberFormat *numberFormats3 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{3})(\\d{3,5})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats3_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats3]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataCC -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:6]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:7]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:9]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:10]]; - - NSMutableArray *generalDesc_descArrayPLLO = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPLLO addObject: [NSNumber numberWithInt:8]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[1458]\\d{5,9}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:generalDesc_descArrayPLLO withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *fixedLine_descArrayPL = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:9]]; - - NSMutableArray *fixedLine_descArrayPLLO = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPLLO addObject: [NSNumber numberWithInt:8]]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"89162\\d{4}" withPossibleNumberPattern:nil withPossibleLength:fixedLine_descArrayPL withPossibleLengthLocalOnly:fixedLine_descArrayPLLO withExample:@"891621234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *mobile_descArrayPL = [[NSMutableArray alloc] init]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"14(?:5\\d|71)\\d{5}|4(?:[0-2]\\d|3[0-57-9]|4[47-9]|5[0-25-9]|6[6-9]|7[02-9]|8[147-9]|9[017-9])\\d{6}" withPossibleNumberPattern:nil withPossibleLength:mobile_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"412345678" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:7]]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:10]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"180(?:0\\d{3}|2)\\d{3}" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"1800123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:10]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"190[0126]\\d{6}" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"1900123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:6]]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:10]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"13(?:00\\d{2})?\\d{4}" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"1300123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"500\\d{6}" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"500123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"550\\d{6}" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"550123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"CC"; - self.countryCode = [NSNumber numberWithInteger:61]; - self.internationalPrefix = @"(?:14(?:1[14]|34|4[17]|[56]6|7[47]|88))?001[14-689]"; - self.preferredInternationalPrefix = @"0011"; - self.nationalPrefix = @"0"; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = @"0"; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataBH -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:8]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[136-9]\\d{7}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:1(?:3[1356]|6[0156]|7\\d)\\d|6(?:1[16]\\d|500|6(?:0\\d|3[12]|44|7[7-9])|9[69][69])|7(?:1(?:11|78)|7\\d{2}))\\d{4}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"17001234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:3(?:[1-4679]\\d|5[013-69]|8[0-47-9])\\d|6(?:3(?:00|33|6[16])|6(?:[69]\\d|3[03-9]|7[0-6])))\\d{4}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"36001234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"80\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"80123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:87|9[014578])\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"90123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"84\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"84123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"BH"; - self.countryCode = [NSNumber numberWithInteger:973]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = nil; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = nil; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{4})(\\d{4})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataAM -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:8]]; - - NSMutableArray *generalDesc_descArrayPLLO = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPLLO addObject: [NSNumber numberWithInt:5]]; - [generalDesc_descArrayPLLO addObject: [NSNumber numberWithInt:6]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[1-9]\\d{7}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:generalDesc_descArrayPLLO withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *fixedLine_descArrayPLLO = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPLLO addObject: [NSNumber numberWithInt:5]]; - [fixedLine_descArrayPLLO addObject: [NSNumber numberWithInt:6]]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:1[0-2]\\d|2(?:2[2-46]|3[1-8]|4[2-69]|5[2-7]|6[1-9]|8[1-7])|3[12]2|47\\d)\\d{5}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:fixedLine_descArrayPLLO withExample:@"10123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:4[1349]|55|77|9[1-9])\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"77123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"800\\d{5}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"80012345" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"90[016]\\d{5}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"90012345" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"80[1-4]\\d{5}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"80112345" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"60(?:2[078]|[3-7]\\d|8[0-5])\\d{4}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"60271234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"AM"; - self.countryCode = [NSNumber numberWithInteger:374]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = @"0"; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = @"0"; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - [numberFormats0_patternArray addObject:@"1|47"]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{2})(\\d{6})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:@"(0$1)" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - - NSMutableArray *numberFormats1_patternArray = [[NSMutableArray alloc] init]; - [numberFormats1_patternArray addObject:@"4[1349]|[5-7]|9[1-9]"]; - NBNumberFormat *numberFormats1 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{2})(\\d{6})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats1_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats1]; - - NSMutableArray *numberFormats2_patternArray = [[NSMutableArray alloc] init]; - [numberFormats2_patternArray addObject:@"[23]"]; - NBNumberFormat *numberFormats2 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{3})(\\d{5})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats2_patternArray withNationalPrefixFormattingRule:@"(0$1)" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats2]; - - NSMutableArray *numberFormats3_patternArray = [[NSMutableArray alloc] init]; - [numberFormats3_patternArray addObject:@"8|90"]; - NBNumberFormat *numberFormats3 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{3})(\\d{2})(\\d{3})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats3_patternArray withNationalPrefixFormattingRule:@"0 $1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats3]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataCD -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:7]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[2-6]\\d{6}|[18]\\d{6,8}|9\\d{8}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"1(?:2\\d{7}|\\d{6})|[2-6]\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"1234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"8(?:[0-2459]\\d{2}|8)\\d{5}|9[017-9]\\d{7}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"991234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"CD"; - self.countryCode = [NSNumber numberWithInteger:243]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = @"0"; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = @"0"; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - [numberFormats0_patternArray addObject:@"12"]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{2})(\\d{3})(\\d{4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - - NSMutableArray *numberFormats1_patternArray = [[NSMutableArray alloc] init]; - [numberFormats1_patternArray addObject:@"8[0-2459]|9"]; - NBNumberFormat *numberFormats1 = [[NBNumberFormat alloc] initWithPattern:@"([89]\\d{2})(\\d{3})(\\d{3})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats1_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats1]; - - NSMutableArray *numberFormats2_patternArray = [[NSMutableArray alloc] init]; - [numberFormats2_patternArray addObject:@"88"]; - NBNumberFormat *numberFormats2 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{2})(\\d{2})(\\d{3})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats2_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats2]; - - NSMutableArray *numberFormats3_patternArray = [[NSMutableArray alloc] init]; - [numberFormats3_patternArray addObject:@"[1-6]"]; - NBNumberFormat *numberFormats3 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{2})(\\d{5})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats3_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats3]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataBI -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:8]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[267]\\d{7}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"22\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"22201234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:29|6[189]|7[124-9])\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"79561234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"BI"; - self.countryCode = [NSNumber numberWithInteger:257]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = nil; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = nil; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{2})(\\d{2})(\\d{2})(\\d{2})" withFormat:@"$1 $2 $3 $4" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataBJ -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:4]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:8]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[2689]\\d{7}|7\\d{3}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *fixedLine_descArrayPL = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:8]]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"2(?:02|1[037]|2[45]|3[68])\\d{5}" withPossibleNumberPattern:nil withPossibleLength:fixedLine_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"20211234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *mobile_descArrayPL = [[NSMutableArray alloc] init]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:8]]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:6[1-8]|9[03-9])\\d{6}" withPossibleNumberPattern:nil withPossibleLength:mobile_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"90011234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:4]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"7[3-5]\\d{2}" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"7312" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:8]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"857[58]\\d{4}" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"85751234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:8]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"81\\d{6}" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"81123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"BJ"; - self.countryCode = [NSNumber numberWithInteger:229]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = nil; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = nil; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{2})(\\d{2})(\\d{2})(\\d{2})" withFormat:@"$1 $2 $3 $4" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataAO -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[29]\\d{8}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"2\\d(?:[26-9]\\d|\\d[26-9])\\d{5}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"222123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"9[1-49]\\d{7}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"923123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"AO"; - self.countryCode = [NSNumber numberWithInteger:244]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = nil; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = nil; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{3})(\\d{3})(\\d{3})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataCF -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:8]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[278]\\d{7}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"2[12]\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"21612345" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"7[0257]\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"70012345" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"8776\\d{4}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"87761234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"CF"; - self.countryCode = [NSNumber numberWithInteger:236]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = nil; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = nil; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{2})(\\d{2})(\\d{2})(\\d{2})" withFormat:@"$1 $2 $3 $4" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataCG -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[028]\\d{8}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"222[1-589]\\d{5}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"222123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"0[14-6]\\d{7}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"061234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"800\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"800123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"CG"; - self.countryCode = [NSNumber numberWithInteger:242]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = nil; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = nil; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - [numberFormats0_patternArray addObject:@"[02]"]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{2})(\\d{3})(\\d{4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - - NSMutableArray *numberFormats1_patternArray = [[NSMutableArray alloc] init]; - [numberFormats1_patternArray addObject:@"8"]; - NBNumberFormat *numberFormats1 = [[NBNumberFormat alloc] initWithPattern:@"(\\d)(\\d{4})(\\d{4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats1_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats1]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = YES; - } - return self; -} -@end - -@implementation NBPhoneMetadataBL -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[56]\\d{8}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"590(?:2[7-9]|5[12]|87)\\d{4}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"590271234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"690(?:0[0-7]|[1-9]\\d)\\d{4}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"690301234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"BL"; - self.countryCode = [NSNumber numberWithInteger:590]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = @"0"; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = @"0"; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadata800 -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:8]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"\\d{8}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *fixedLine_descArrayPL = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:fixedLine_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *mobile_descArrayPL = [[NSMutableArray alloc] init]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:mobile_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"\\d{8}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"12345678" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"001"; - self.countryCode = [NSNumber numberWithInteger:800]; - self.internationalPrefix = nil; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = nil; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = nil; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = YES; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{4})(\\d{4})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = YES; - } - return self; -} -@end - -@implementation NBPhoneMetadataCH -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:9]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:12]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[2-9]\\d{8}|860\\d{9}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *fixedLine_descArrayPL = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:2[12467]|3[1-4]|4[134]|5[256]|6[12]|[7-9]1)\\d{7}" withPossibleNumberPattern:nil withPossibleLength:fixedLine_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"212345678" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *mobile_descArrayPL = [[NSMutableArray alloc] init]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"7[5-9]\\d{7}" withPossibleNumberPattern:nil withPossibleLength:mobile_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"781234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"800\\d{6}" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"800123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"90[016]\\d{6}" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"900123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"84[0248]\\d{6}" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"840123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"878\\d{6}" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"878123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"74[0248]\\d{6}" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"740123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"5[18]\\d{7}" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"581234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:12]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"860\\d{9}" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"860123456789" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"CH"; - self.countryCode = [NSNumber numberWithInteger:41]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = @"0"; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = @"0"; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - [numberFormats0_patternArray addObject:@"[2-7]|[89]1"]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"([2-9]\\d)(\\d{3})(\\d{2})(\\d{2})" withFormat:@"$1 $2 $3 $4" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - - NSMutableArray *numberFormats1_patternArray = [[NSMutableArray alloc] init]; - [numberFormats1_patternArray addObject:@"8[047]|90"]; - NBNumberFormat *numberFormats1 = [[NBNumberFormat alloc] initWithPattern:@"([89]\\d{2})(\\d{3})(\\d{3})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats1_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats1]; - - NSMutableArray *numberFormats2_patternArray = [[NSMutableArray alloc] init]; - [numberFormats2_patternArray addObject:@"860"]; - NBNumberFormat *numberFormats2 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{3})(\\d{2})(\\d{3})(\\d{2})(\\d{2})" withFormat:@"$1 $2 $3 $4 $5" withLeadingDigitsPatterns:numberFormats2_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats2]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataBM -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:10]]; - - NSMutableArray *generalDesc_descArrayPLLO = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPLLO addObject: [NSNumber numberWithInt:7]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[4589]\\d{9}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:generalDesc_descArrayPLLO withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *fixedLine_descArrayPLLO = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPLLO addObject: [NSNumber numberWithInt:7]]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"441(?:2(?:02|23|61|[3479]\\d)|[46]\\d{2}|5(?:4\\d|60|89)|824)\\d{4}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:fixedLine_descArrayPLLO withExample:@"4412345678" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *mobile_descArrayPLLO = [[NSMutableArray alloc] init]; - [mobile_descArrayPLLO addObject: [NSNumber numberWithInt:7]]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"441(?:[37]\\d|5[0-39])\\d{5}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:mobile_descArrayPLLO withExample:@"4413701234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"8(?:00|33|44|55|66|77|88)[2-9]\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"8002123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"900[2-9]\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"9002123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"5(?:00|22|33|44|66|77|88)[2-9]\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"5002345678" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"BM"; - self.countryCode = [NSNumber numberWithInteger:1]; - self.internationalPrefix = @"011"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = @"1"; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = @"1"; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = @"441"; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataAR -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:10]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:11]]; - - NSMutableArray *generalDesc_descArrayPLLO = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPLLO addObject: [NSNumber numberWithInt:6]]; - [generalDesc_descArrayPLLO addObject: [NSNumber numberWithInt:7]]; - [generalDesc_descArrayPLLO addObject: [NSNumber numberWithInt:8]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"11\\d{8}|[2368]\\d{9}|9\\d{10}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:generalDesc_descArrayPLLO withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *fixedLine_descArrayPL = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:10]]; - - NSMutableArray *fixedLine_descArrayPLLO = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPLLO addObject: [NSNumber numberWithInt:6]]; - [fixedLine_descArrayPLLO addObject: [NSNumber numberWithInt:7]]; - [fixedLine_descArrayPLLO addObject: [NSNumber numberWithInt:8]]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"11\\d{8}|(?:2(?:2(?:[013]\\d|2[13-79]|4[1-6]|5[2457]|6[124-8]|7[1-4]|8[13-6]|9[1267])|3(?:1[467]|2[03-6]|3[13-8]|[49][2-6]|5[2-8]|[067]\\d)|4(?:7[3-8]|9\\d)|6(?:[01346]\\d|2[24-6]|5[15-8])|80\\d|9(?:[0124789]\\d|3[1-6]|5[234]|6[2-46]))|3(?:3(?:2[79]|6\\d|8[2578])|4(?:[78]\\d|0[0124-9]|[1-35]\\d|4[24-7]|6[02-9]|9[123678])|5(?:[138]\\d|2[1245]|4[1-9]|6[2-4]|7[1-6])|6[24]\\d|7(?:[0469]\\d|1[1568]|2[013-9]|3[145]|5[14-8]|7[2-57]|8[0-24-9])|8(?:[013578]\\d|2[15-7]|4[13-6]|6[1-357-9]|9[124]))|670\\d)\\d{6}" withPossibleNumberPattern:nil withPossibleLength:fixedLine_descArrayPL withPossibleLengthLocalOnly:fixedLine_descArrayPLLO withExample:@"1123456789" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *mobile_descArrayPLLO = [[NSMutableArray alloc] init]; - [mobile_descArrayPLLO addObject: [NSNumber numberWithInt:6]]; - [mobile_descArrayPLLO addObject: [NSNumber numberWithInt:7]]; - [mobile_descArrayPLLO addObject: [NSNumber numberWithInt:8]]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"675\\d{7}|9(?:11[2-9]\\d{7}|(?:2(?:2[013]|3[067]|49|6[01346]|80|9[147-9])|3(?:36|4[12358]|5[138]|6[24]|7[069]|8[013578]))[2-9]\\d{6}|\\d{4}[2-9]\\d{5})" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:mobile_descArrayPLLO withExample:@"91123456789" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:10]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"800\\d{7}" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"8001234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:10]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"60[04579]\\d{7}" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"6001234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:10]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"810\\d{7}" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"8101234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:10]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"810\\d{7}" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"8101234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"AR"; - self.countryCode = [NSNumber numberWithInteger:54]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = @"0"; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = @"0?(?:(11|2(?:2(?:02?|[13]|2[13-79]|4[1-6]|5[2457]|6[124-8]|7[1-4]|8[13-6]|9[1267])|3(?:02?|1[467]|2[03-6]|3[13-8]|[49][2-6]|5[2-8]|[67])|4(?:7[3-578]|9)|6(?:[0136]|2[24-6]|4[6-8]?|5[15-8])|80|9(?:0[1-3]|[19]|2\\d|3[1-6]|4[02568]?|5[2-4]|6[2-46]|72?|8[23]?))|3(?:3(?:2[79]|6|8[2578])|4(?:0[0-24-9]|[12]|3[5-8]?|4[24-7]|5[4-68]?|6[02-9]|7[126]|8[2379]?|9[1-36-8])|5(?:1|2[1245]|3[237]?|4[1-46-9]|6[2-4]|7[1-6]|8[2-5]?)|6[24]|7(?:[069]|1[1568]|2[15]|3[145]|4[13]|5[14-8]|7[2-57]|8[126])|8(?:[01]|2[15-7]|3[2578]?|4[13-6]|5[4-8]?|6[1-357-9]|7[36-8]?|8[5-8]?|9[124])))?15)?"; - self.nationalPrefixTransformRule = @"9$1"; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - [numberFormats0_patternArray addObject:@"[68]"]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"([68]\\d{2})(\\d{3})(\\d{4})" withFormat:@"$1-$2-$3" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - - NSMutableArray *numberFormats1_patternArray = [[NSMutableArray alloc] init]; - [numberFormats1_patternArray addObject:@"[2-9]"]; - NBNumberFormat *numberFormats1 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{2})(\\d{4})" withFormat:@"$1-$2" withLeadingDigitsPatterns:numberFormats1_patternArray withNationalPrefixFormattingRule:@"$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats1]; - - NSMutableArray *numberFormats2_patternArray = [[NSMutableArray alloc] init]; - [numberFormats2_patternArray addObject:@"[2-9]"]; - NBNumberFormat *numberFormats2 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{3})(\\d{4})" withFormat:@"$1-$2" withLeadingDigitsPatterns:numberFormats2_patternArray withNationalPrefixFormattingRule:@"$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats2]; - - NSMutableArray *numberFormats3_patternArray = [[NSMutableArray alloc] init]; - [numberFormats3_patternArray addObject:@"[2-9]"]; - NBNumberFormat *numberFormats3 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{4})(\\d{4})" withFormat:@"$1-$2" withLeadingDigitsPatterns:numberFormats3_patternArray withNationalPrefixFormattingRule:@"$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats3]; - - NSMutableArray *numberFormats4_patternArray = [[NSMutableArray alloc] init]; - [numberFormats4_patternArray addObject:@"911"]; - NBNumberFormat *numberFormats4 = [[NBNumberFormat alloc] initWithPattern:@"(9)(11)(\\d{4})(\\d{4})" withFormat:@"$2 15-$3-$4" withLeadingDigitsPatterns:numberFormats4_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats4]; - - NSMutableArray *numberFormats5_patternArray = [[NSMutableArray alloc] init]; - [numberFormats5_patternArray addObject:@"9(?:2[234689]|3[3-8])"]; - [numberFormats5_patternArray addObject:@"9(?:2(?:2[013]|3[067]|49|6[01346]|80|9[147-9])|3(?:36|4[1-358]|5[138]|6[24]|7[069]|8[013578]))"]; - [numberFormats5_patternArray addObject:@"9(?:2(?:2(?:0[013-9]|[13])|3(?:0[013-9]|[67])|49|6(?:[0136]|4[0-59])|8|9(?:[19]|44|7[013-9]|8[14]))|3(?:36|4(?:[12]|3[456]|[58]4)|5(?:1|3[0-24-689]|8[46])|6|7[069]|8(?:[01]|34|[578][45])))"]; - [numberFormats5_patternArray addObject:@"9(?:2(?:2(?:0[013-9]|[13])|3(?:0[013-9]|[67])|49|6(?:[0136]|4[0-59])|8|9(?:[19]|44|7[013-9]|8[14]))|3(?:36|4(?:[12]|3(?:4|5[014]|6[1239])|[58]4)|5(?:1|3[0-24-689]|8[46])|6|7[069]|8(?:[01]|34|[578][45])))"]; - NBNumberFormat *numberFormats5 = [[NBNumberFormat alloc] initWithPattern:@"(9)(\\d{3})(\\d{3})(\\d{4})" withFormat:@"$2 15-$3-$4" withLeadingDigitsPatterns:numberFormats5_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats5]; - - NSMutableArray *numberFormats6_patternArray = [[NSMutableArray alloc] init]; - [numberFormats6_patternArray addObject:@"9[23]"]; - NBNumberFormat *numberFormats6 = [[NBNumberFormat alloc] initWithPattern:@"(9)(\\d{4})(\\d{2})(\\d{4})" withFormat:@"$2 15-$3-$4" withLeadingDigitsPatterns:numberFormats6_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats6]; - - NSMutableArray *numberFormats7_patternArray = [[NSMutableArray alloc] init]; - [numberFormats7_patternArray addObject:@"1"]; - NBNumberFormat *numberFormats7 = [[NBNumberFormat alloc] initWithPattern:@"(11)(\\d{4})(\\d{4})" withFormat:@"$1 $2-$3" withLeadingDigitsPatterns:numberFormats7_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:YES withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats7]; - - NSMutableArray *numberFormats8_patternArray = [[NSMutableArray alloc] init]; - [numberFormats8_patternArray addObject:@"2(?:2[013]|3[067]|49|6[01346]|80|9[147-9])|3(?:36|4[1-358]|5[138]|6[24]|7[069]|8[013578])"]; - [numberFormats8_patternArray addObject:@"2(?:2(?:0[013-9]|[13])|3(?:0[013-9]|[67])|49|6(?:[0136]|4[0-59])|8|9(?:[19]|44|7[013-9]|8[14]))|3(?:36|4(?:[12]|3[456]|[58]4)|5(?:1|3[0-24-689]|8[46])|6|7[069]|8(?:[01]|34|[578][45]))"]; - [numberFormats8_patternArray addObject:@"2(?:2(?:0[013-9]|[13])|3(?:0[013-9]|[67])|49|6(?:[0136]|4[0-59])|8|9(?:[19]|44|7[013-9]|8[14]))|3(?:36|4(?:[12]|3(?:4|5[014]|6[1239])|[58]4)|5(?:1|3[0-24-689]|8[46])|6|7[069]|8(?:[01]|34|[578][45]))"]; - NBNumberFormat *numberFormats8 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{3})(\\d{3})(\\d{4})" withFormat:@"$1 $2-$3" withLeadingDigitsPatterns:numberFormats8_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:YES withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats8]; - - NSMutableArray *numberFormats9_patternArray = [[NSMutableArray alloc] init]; - [numberFormats9_patternArray addObject:@"[23]"]; - NBNumberFormat *numberFormats9 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{4})(\\d{2})(\\d{4})" withFormat:@"$1 $2-$3" withLeadingDigitsPatterns:numberFormats9_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:YES withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats9]; - - NSMutableArray *numberFormats10_patternArray = [[NSMutableArray alloc] init]; - [numberFormats10_patternArray addObject:@"1[012]|911"]; - NBNumberFormat *numberFormats10 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{3})" withFormat:@"$1" withLeadingDigitsPatterns:numberFormats10_patternArray withNationalPrefixFormattingRule:@"$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats10]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *intlNumberFormats0_patternArray = [[NSMutableArray alloc] init]; - [intlNumberFormats0_patternArray addObject:@"[68]"]; - NBNumberFormat *intlNumberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"([68]\\d{2})(\\d{3})(\\d{4})" withFormat:@"$1-$2-$3" withLeadingDigitsPatterns:intlNumberFormats0_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [intlNumberFormats_FormatArray addObject:intlNumberFormats0]; - - NSMutableArray *intlNumberFormats1_patternArray = [[NSMutableArray alloc] init]; - [intlNumberFormats1_patternArray addObject:@"911"]; - NBNumberFormat *intlNumberFormats1 = [[NBNumberFormat alloc] initWithPattern:@"(9)(11)(\\d{4})(\\d{4})" withFormat:@"$1 $2 $3-$4" withLeadingDigitsPatterns:intlNumberFormats1_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [intlNumberFormats_FormatArray addObject:intlNumberFormats1]; - - NSMutableArray *intlNumberFormats2_patternArray = [[NSMutableArray alloc] init]; - [intlNumberFormats2_patternArray addObject:@"9(?:2[234689]|3[3-8])"]; - [intlNumberFormats2_patternArray addObject:@"9(?:2(?:2[013]|3[067]|49|6[01346]|80|9[147-9])|3(?:36|4[1-358]|5[138]|6[24]|7[069]|8[013578]))"]; - [intlNumberFormats2_patternArray addObject:@"9(?:2(?:2(?:0[013-9]|[13])|3(?:0[013-9]|[67])|49|6(?:[0136]|4[0-59])|8|9(?:[19]|44|7[013-9]|8[14]))|3(?:36|4(?:[12]|3[456]|[58]4)|5(?:1|3[0-24-689]|8[46])|6|7[069]|8(?:[01]|34|[578][45])))"]; - [intlNumberFormats2_patternArray addObject:@"9(?:2(?:2(?:0[013-9]|[13])|3(?:0[013-9]|[67])|49|6(?:[0136]|4[0-59])|8|9(?:[19]|44|7[013-9]|8[14]))|3(?:36|4(?:[12]|3(?:4|5[014]|6[1239])|[58]4)|5(?:1|3[0-24-689]|8[46])|6|7[069]|8(?:[01]|34|[578][45])))"]; - NBNumberFormat *intlNumberFormats2 = [[NBNumberFormat alloc] initWithPattern:@"(9)(\\d{3})(\\d{3})(\\d{4})" withFormat:@"$1 $2 $3-$4" withLeadingDigitsPatterns:intlNumberFormats2_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [intlNumberFormats_FormatArray addObject:intlNumberFormats2]; - - NSMutableArray *intlNumberFormats3_patternArray = [[NSMutableArray alloc] init]; - [intlNumberFormats3_patternArray addObject:@"9[23]"]; - NBNumberFormat *intlNumberFormats3 = [[NBNumberFormat alloc] initWithPattern:@"(9)(\\d{4})(\\d{2})(\\d{4})" withFormat:@"$1 $2 $3-$4" withLeadingDigitsPatterns:intlNumberFormats3_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [intlNumberFormats_FormatArray addObject:intlNumberFormats3]; - - NSMutableArray *intlNumberFormats4_patternArray = [[NSMutableArray alloc] init]; - [intlNumberFormats4_patternArray addObject:@"1"]; - NBNumberFormat *intlNumberFormats4 = [[NBNumberFormat alloc] initWithPattern:@"(11)(\\d{4})(\\d{4})" withFormat:@"$1 $2-$3" withLeadingDigitsPatterns:intlNumberFormats4_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:YES withDomesticCarrierCodeFormattingRule:nil]; - [intlNumberFormats_FormatArray addObject:intlNumberFormats4]; - - NSMutableArray *intlNumberFormats5_patternArray = [[NSMutableArray alloc] init]; - [intlNumberFormats5_patternArray addObject:@"2(?:2[013]|3[067]|49|6[01346]|80|9[147-9])|3(?:36|4[1-358]|5[138]|6[24]|7[069]|8[013578])"]; - [intlNumberFormats5_patternArray addObject:@"2(?:2(?:0[013-9]|[13])|3(?:0[013-9]|[67])|49|6(?:[0136]|4[0-59])|8|9(?:[19]|44|7[013-9]|8[14]))|3(?:36|4(?:[12]|3[456]|[58]4)|5(?:1|3[0-24-689]|8[46])|6|7[069]|8(?:[01]|34|[578][45]))"]; - [intlNumberFormats5_patternArray addObject:@"2(?:2(?:0[013-9]|[13])|3(?:0[013-9]|[67])|49|6(?:[0136]|4[0-59])|8|9(?:[19]|44|7[013-9]|8[14]))|3(?:36|4(?:[12]|3(?:4|5[014]|6[1239])|[58]4)|5(?:1|3[0-24-689]|8[46])|6|7[069]|8(?:[01]|34|[578][45]))"]; - NBNumberFormat *intlNumberFormats5 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{3})(\\d{3})(\\d{4})" withFormat:@"$1 $2-$3" withLeadingDigitsPatterns:intlNumberFormats5_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:YES withDomesticCarrierCodeFormattingRule:nil]; - [intlNumberFormats_FormatArray addObject:intlNumberFormats5]; - - NSMutableArray *intlNumberFormats6_patternArray = [[NSMutableArray alloc] init]; - [intlNumberFormats6_patternArray addObject:@"[23]"]; - NBNumberFormat *intlNumberFormats6 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{4})(\\d{2})(\\d{4})" withFormat:@"$1 $2-$3" withLeadingDigitsPatterns:intlNumberFormats6_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:YES withDomesticCarrierCodeFormattingRule:nil]; - [intlNumberFormats_FormatArray addObject:intlNumberFormats6]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataCI -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:8]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[02-8]\\d{7}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:2(?:0[023]|1[02357]|[23][045]|4[03-5])|3(?:0[06]|1[069]|[2-4][07]|5[09]|6[08]))\\d{5}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"21234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:0[1-9]|4\\d|5[14-9]|6[015-79]|[78][4-9])\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"01234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"CI"; - self.countryCode = [NSNumber numberWithInteger:225]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = nil; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = nil; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{2})(\\d{2})(\\d{2})(\\d{2})" withFormat:@"$1 $2 $3 $4" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = YES; - } - return self; -} -@end - -@implementation NBPhoneMetadataBN -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:7]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[2-578]\\d{6}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"2(?:[013-9]\\d|2[0-7])\\d{4}|[3-5]\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"2345678" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"22[89]\\d{4}|[78]\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"7123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"BN"; - self.countryCode = [NSNumber numberWithInteger:673]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = nil; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = nil; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"([2-578]\\d{2})(\\d{4})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataDE -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:4]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:5]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:6]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:7]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:8]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:9]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:10]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:11]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:12]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:13]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:14]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:15]]; - - NSMutableArray *generalDesc_descArrayPLLO = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPLLO addObject: [NSNumber numberWithInt:3]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[1-35-9]\\d{3,14}|4(?:[0-8]\\d{3,12}|9(?:[0-37]\\d|4(?:[1-35-8]|4\\d?)|5\\d{1,2}|6[1-8]\\d?)\\d{2,8})" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:generalDesc_descArrayPLLO withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *fixedLine_descArrayPL = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:5]]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:6]]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:7]]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:8]]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:9]]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:10]]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:11]]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:12]]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:13]]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:14]]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:15]]; - - NSMutableArray *fixedLine_descArrayPLLO = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPLLO addObject: [NSNumber numberWithInt:3]]; - [fixedLine_descArrayPLLO addObject: [NSNumber numberWithInt:4]]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"2\\d{5,13}|3(?:0\\d{3,13}|2\\d{9}|[3-9]\\d{4,13})|4(?:0\\d{3,12}|\\d{5,13})|5(?:0[2-8]|[1256]\\d|[38][0-8]|4\\d{0,2}|[79][0-7])\\d{3,11}|6(?:\\d{5,13}|9\\d{3,12})|7(?:0[2-8]|[1-9]\\d)\\d{3,10}|8(?:0[2-9]|[1-8]\\d|9\\d?)\\d{3,10}|9(?:0[6-9]\\d{3,10}|1\\d{4,12}|[2-9]\\d{4,11})" withPossibleNumberPattern:nil withPossibleLength:fixedLine_descArrayPL withPossibleLengthLocalOnly:fixedLine_descArrayPLLO withExample:@"30123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *mobile_descArrayPL = [[NSMutableArray alloc] init]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:10]]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:11]]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"1(?:5[0-25-9]\\d{8}|6[023]\\d{7,8}|7\\d{8,9})" withPossibleNumberPattern:nil withPossibleLength:mobile_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"15123456789" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:10]]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:11]]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:12]]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:13]]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:14]]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:15]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"800\\d{7,12}" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"8001234567890" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:10]]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:11]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"137[7-9]\\d{6}|900(?:[135]\\d{6}|9\\d{7})" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"9001234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:7]]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:8]]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:9]]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:10]]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:11]]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:12]]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:13]]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:14]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"1(?:3(?:7[1-6]\\d{6}|8\\d{4})|80\\d{5,11})" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"18012345" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:11]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"700\\d{8}" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"70012345678" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:4]]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:5]]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:6]]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:7]]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:8]]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:9]]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:10]]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:11]]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:12]]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:13]]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:14]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"16(?:4\\d{1,10}|[89]\\d{1,11})" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"16412345" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:8]]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:9]]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:10]]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:11]]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:12]]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:13]]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:14]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"18(?:1\\d{5,11}|[2-9]\\d{8})" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"18500123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:12]]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:13]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"1(?:5(?:(?:2\\d55|7\\d99|9\\d33)\\d{7}|(?:[034568]00|113)\\d{8})|6(?:013|255|399)\\d{7,8}|7(?:[015]13|[234]55|[69]33|[78]99)\\d{7,8})" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"177991234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"DE"; - self.countryCode = [NSNumber numberWithInteger:49]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = @"0"; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = @"0"; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - [numberFormats0_patternArray addObject:@"1[67]"]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(1\\d{2})(\\d{7,8})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - - NSMutableArray *numberFormats1_patternArray = [[NSMutableArray alloc] init]; - [numberFormats1_patternArray addObject:@"15[0568]"]; - NBNumberFormat *numberFormats1 = [[NBNumberFormat alloc] initWithPattern:@"(15\\d{3})(\\d{6})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats1_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats1]; - - NSMutableArray *numberFormats2_patternArray = [[NSMutableArray alloc] init]; - [numberFormats2_patternArray addObject:@"15"]; - NBNumberFormat *numberFormats2 = [[NBNumberFormat alloc] initWithPattern:@"(1\\d{3})(\\d{7})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats2_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats2]; - - NSMutableArray *numberFormats3_patternArray = [[NSMutableArray alloc] init]; - [numberFormats3_patternArray addObject:@"3[02]|40|[68]9"]; - NBNumberFormat *numberFormats3 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{2})(\\d{3,11})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats3_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats3]; - - NSMutableArray *numberFormats4_patternArray = [[NSMutableArray alloc] init]; - [numberFormats4_patternArray addObject:@"2(?:\\d1|0[2389]|1[24]|28|34)|3(?:[3-9][15]|40)|[4-8][1-9]1|9(?:06|[1-9]1)"]; - NBNumberFormat *numberFormats4 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{3})(\\d{3,11})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats4_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats4]; - - NSMutableArray *numberFormats5_patternArray = [[NSMutableArray alloc] init]; - [numberFormats5_patternArray addObject:@"[24-6]|[7-9](?:\\d[1-9]|[1-9]\\d)|3(?:[3569][02-46-9]|4[2-4679]|7[2-467]|8[2-46-8])"]; - [numberFormats5_patternArray addObject:@"[24-6]|[7-9](?:\\d[1-9]|[1-9]\\d)|3(?:3(?:0[1-467]|2[127-9]|3[124578]|[46][1246]|7[1257-9]|8[1256]|9[145])|4(?:2[135]|3[1357]|4[13578]|6[1246]|7[1356]|9[1346])|5(?:0[14]|2[1-3589]|3[1357]|4[1246]|6[1-4]|7[1346]|8[13568]|9[1246])|6(?:0[356]|2[1-489]|3[124-6]|4[1347]|6[13]|7[12579]|8[1-356]|9[135])|7(?:2[1-7]|3[1357]|4[145]|6[1-5]|7[1-4])|8(?:21|3[1468]|4[1347]|6[0135-9]|7[1467]|8[136])|9(?:0[12479]|2[1358]|3[1357]|4[134679]|6[1-9]|7[136]|8[147]|9[1468]))"]; - NBNumberFormat *numberFormats5 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{4})(\\d{2,11})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats5_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats5]; - - NSMutableArray *numberFormats6_patternArray = [[NSMutableArray alloc] init]; - [numberFormats6_patternArray addObject:@"3"]; - NBNumberFormat *numberFormats6 = [[NBNumberFormat alloc] initWithPattern:@"(3\\d{4})(\\d{1,10})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats6_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats6]; - - NSMutableArray *numberFormats7_patternArray = [[NSMutableArray alloc] init]; - [numberFormats7_patternArray addObject:@"800"]; - NBNumberFormat *numberFormats7 = [[NBNumberFormat alloc] initWithPattern:@"(800)(\\d{7,12})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats7_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats7]; - - NSMutableArray *numberFormats8_patternArray = [[NSMutableArray alloc] init]; - [numberFormats8_patternArray addObject:@"(?:18|90)0|137"]; - [numberFormats8_patternArray addObject:@"1(?:37|80)|900[1359]"]; - NBNumberFormat *numberFormats8 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{3})(\\d)(\\d{4,10})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats8_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats8]; - - NSMutableArray *numberFormats9_patternArray = [[NSMutableArray alloc] init]; - [numberFormats9_patternArray addObject:@"181"]; - NBNumberFormat *numberFormats9 = [[NBNumberFormat alloc] initWithPattern:@"(1\\d{2})(\\d{5,11})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats9_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats9]; - - NSMutableArray *numberFormats10_patternArray = [[NSMutableArray alloc] init]; - [numberFormats10_patternArray addObject:@"185"]; - [numberFormats10_patternArray addObject:@"1850"]; - [numberFormats10_patternArray addObject:@"18500"]; - NBNumberFormat *numberFormats10 = [[NBNumberFormat alloc] initWithPattern:@"(18\\d{3})(\\d{6})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats10_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats10]; - - NSMutableArray *numberFormats11_patternArray = [[NSMutableArray alloc] init]; - [numberFormats11_patternArray addObject:@"18[68]"]; - NBNumberFormat *numberFormats11 = [[NBNumberFormat alloc] initWithPattern:@"(18\\d{2})(\\d{7})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats11_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats11]; - - NSMutableArray *numberFormats12_patternArray = [[NSMutableArray alloc] init]; - [numberFormats12_patternArray addObject:@"18[2-579]"]; - NBNumberFormat *numberFormats12 = [[NBNumberFormat alloc] initWithPattern:@"(18\\d)(\\d{8})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats12_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats12]; - - NSMutableArray *numberFormats13_patternArray = [[NSMutableArray alloc] init]; - [numberFormats13_patternArray addObject:@"700"]; - NBNumberFormat *numberFormats13 = [[NBNumberFormat alloc] initWithPattern:@"(700)(\\d{4})(\\d{4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats13_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats13]; - - NSMutableArray *numberFormats14_patternArray = [[NSMutableArray alloc] init]; - [numberFormats14_patternArray addObject:@"138"]; - NBNumberFormat *numberFormats14 = [[NBNumberFormat alloc] initWithPattern:@"(138)(\\d{4})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats14_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats14]; - - NSMutableArray *numberFormats15_patternArray = [[NSMutableArray alloc] init]; - [numberFormats15_patternArray addObject:@"15[013-68]"]; - NBNumberFormat *numberFormats15 = [[NBNumberFormat alloc] initWithPattern:@"(15[013-68])(\\d{2})(\\d{8})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats15_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats15]; - - NSMutableArray *numberFormats16_patternArray = [[NSMutableArray alloc] init]; - [numberFormats16_patternArray addObject:@"15[279]"]; - NBNumberFormat *numberFormats16 = [[NBNumberFormat alloc] initWithPattern:@"(15[279]\\d)(\\d{2})(\\d{7})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats16_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats16]; - - NSMutableArray *numberFormats17_patternArray = [[NSMutableArray alloc] init]; - [numberFormats17_patternArray addObject:@"1(?:6[023]|7)"]; - NBNumberFormat *numberFormats17 = [[NBNumberFormat alloc] initWithPattern:@"(1[67]\\d)(\\d{2})(\\d{7,8})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats17_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats17]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataAS -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:10]]; - - NSMutableArray *generalDesc_descArrayPLLO = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPLLO addObject: [NSNumber numberWithInt:7]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[5689]\\d{9}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:generalDesc_descArrayPLLO withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *fixedLine_descArrayPLLO = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPLLO addObject: [NSNumber numberWithInt:7]]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"6846(?:22|33|44|55|77|88|9[19])\\d{4}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:fixedLine_descArrayPLLO withExample:@"6846221234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *mobile_descArrayPLLO = [[NSMutableArray alloc] init]; - [mobile_descArrayPLLO addObject: [NSNumber numberWithInt:7]]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"684(?:2(?:5[2468]|72)|7(?:3[13]|70))\\d{4}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:mobile_descArrayPLLO withExample:@"6847331234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"8(?:00|33|44|55|66|77|88)[2-9]\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"8002123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"900[2-9]\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"9002123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"5(?:00|22|33|44|66|77|88)[2-9]\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"5002345678" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"AS"; - self.countryCode = [NSNumber numberWithInteger:1]; - self.internationalPrefix = @"011"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = @"1"; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = @"1"; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = @"684"; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataBO -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:8]]; - - NSMutableArray *generalDesc_descArrayPLLO = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPLLO addObject: [NSNumber numberWithInt:7]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[23467]\\d{7}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:generalDesc_descArrayPLLO withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *fixedLine_descArrayPLLO = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPLLO addObject: [NSNumber numberWithInt:7]]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:2(?:2\\d{2}|5(?:11|[258]\\d|9[67])|6(?:12|2\\d|9[34])|8(?:2[34]|39|62))|3(?:3\\d{2}|4(?:6\\d|8[24])|8(?:25|42|5[257]|86|9[25])|9(?:2\\d|3[234]|4[248]|5[24]|6[2-6]|7\\d))|4(?:4\\d{2}|6(?:11|[24689]\\d|72)))\\d{4}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:fixedLine_descArrayPLLO withExample:@"22123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[67]\\d{7}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"71234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"BO"; - self.countryCode = [NSNumber numberWithInteger:591]; - self.internationalPrefix = @"00(1\\d)?"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = @"0"; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = @"0(1\\d)?"; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - [numberFormats0_patternArray addObject:@"[234]"]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"([234])(\\d{7})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:@"0$CC $1"]; - [numberFormats_FormatArray addObject:numberFormats0]; - - NSMutableArray *numberFormats1_patternArray = [[NSMutableArray alloc] init]; - [numberFormats1_patternArray addObject:@"[67]"]; - NBNumberFormat *numberFormats1 = [[NBNumberFormat alloc] initWithPattern:@"([67]\\d{7})" withFormat:@"$1" withLeadingDigitsPatterns:numberFormats1_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:@"0$CC $1"]; - [numberFormats_FormatArray addObject:numberFormats1]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataAT -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:4]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:5]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:6]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:7]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:8]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:9]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:10]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:11]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:12]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:13]]; - - NSMutableArray *generalDesc_descArrayPLLO = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPLLO addObject: [NSNumber numberWithInt:3]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[1-9]\\d{3,12}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:generalDesc_descArrayPLLO withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *fixedLine_descArrayPLLO = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPLLO addObject: [NSNumber numberWithInt:3]]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"1\\d{3,12}|(?:2(?:1[467]|2[13-8]|5[2357]|6[1-46-8]|7[1-8]|8[124-7]|9[1458])|3(?:1[1-8]|3[23568]|4[5-7]|5[1378]|6[1-38]|8[3-68])|4(?:2[1-8]|35|63|7[1368]|8[2457])|5(?:12|2[1-8]|3[357]|4[147]|5[12578]|6[37])|6(?:13|2[1-47]|4[1-35-8]|5[468]|62)|7(?:2[1-8]|3[25]|4[13478]|5[68]|6[16-8]|7[1-6]|9[45]))\\d{3,10}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:fixedLine_descArrayPLLO withExample:@"1234567890" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *mobile_descArrayPL = [[NSMutableArray alloc] init]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:7]]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:8]]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:9]]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:10]]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:11]]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:12]]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:13]]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"6(?:5[0-3579]|6[013-9]|[7-9]\\d)\\d{4,10}" withPossibleNumberPattern:nil withPossibleLength:mobile_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"664123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:9]]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:10]]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:11]]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:12]]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:13]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"800\\d{6,10}" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"800123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:9]]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:10]]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:11]]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:12]]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:13]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"9(?:0[01]|3[019])\\d{6,10}" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"900123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:8]]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:9]]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:10]]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:11]]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:12]]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:13]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"8(?:10\\d|2(?:[01]\\d|8\\d?))\\d{5,9}" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"810123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:9]]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:10]]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:11]]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:12]]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:13]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"780\\d{6,10}" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"780123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:5]]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:6]]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:7]]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:8]]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:9]]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:10]]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:11]]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:12]]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:13]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"5(?:(?:0[1-9]|17)\\d{2,10}|[79]\\d{3,11})|720\\d{6,10}" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"50123" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"AT"; - self.countryCode = [NSNumber numberWithInteger:43]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = @"0"; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = @"0"; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - [numberFormats0_patternArray addObject:@"116"]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(116\\d{3})" withFormat:@"$1" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:@"$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - - NSMutableArray *numberFormats1_patternArray = [[NSMutableArray alloc] init]; - [numberFormats1_patternArray addObject:@"1"]; - NBNumberFormat *numberFormats1 = [[NBNumberFormat alloc] initWithPattern:@"(1)(\\d{3,12})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats1_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats1]; - - NSMutableArray *numberFormats2_patternArray = [[NSMutableArray alloc] init]; - [numberFormats2_patternArray addObject:@"5[079]"]; - NBNumberFormat *numberFormats2 = [[NBNumberFormat alloc] initWithPattern:@"(5\\d)(\\d{3,5})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats2_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats2]; - - NSMutableArray *numberFormats3_patternArray = [[NSMutableArray alloc] init]; - [numberFormats3_patternArray addObject:@"5[079]"]; - NBNumberFormat *numberFormats3 = [[NBNumberFormat alloc] initWithPattern:@"(5\\d)(\\d{3})(\\d{3,4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats3_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats3]; - - NSMutableArray *numberFormats4_patternArray = [[NSMutableArray alloc] init]; - [numberFormats4_patternArray addObject:@"5[079]"]; - NBNumberFormat *numberFormats4 = [[NBNumberFormat alloc] initWithPattern:@"(5\\d)(\\d{4})(\\d{4,7})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats4_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats4]; - - NSMutableArray *numberFormats5_patternArray = [[NSMutableArray alloc] init]; - [numberFormats5_patternArray addObject:@"316|46|51|732|6(?:5[0-3579]|[6-9])|7(?:[28]0)|[89]"]; - NBNumberFormat *numberFormats5 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{3})(\\d{3,10})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats5_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats5]; - - NSMutableArray *numberFormats6_patternArray = [[NSMutableArray alloc] init]; - [numberFormats6_patternArray addObject:@"2|3(?:1[1-578]|[3-8])|4[2378]|5[2-6]|6(?:[12]|4[1-9]|5[468])|7(?:2[1-8]|35|4[1-8]|[5-79])"]; - NBNumberFormat *numberFormats6 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{4})(\\d{3,9})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats6_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats6]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataCK -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:5]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[2-8]\\d{4}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:2\\d|3[13-7]|4[1-5])\\d{3}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"21234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[5-8]\\d{4}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"71234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"CK"; - self.countryCode = [NSNumber numberWithInteger:682]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = nil; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = nil; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{2})(\\d{3})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataAU -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:5]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:6]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:7]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:8]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:9]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:10]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"1\\d{4,9}|[2-578]\\d{8}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *fixedLine_descArrayPL = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:9]]; - - NSMutableArray *fixedLine_descArrayPLLO = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPLLO addObject: [NSNumber numberWithInt:8]]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[237]\\d{8}|8(?:[6-8]\\d{3}|9(?:[02-9]\\d{2}|1(?:[0-57-9]\\d|6[0135-9])))\\d{4}" withPossibleNumberPattern:nil withPossibleLength:fixedLine_descArrayPL withPossibleLengthLocalOnly:fixedLine_descArrayPLLO withExample:@"212345678" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *mobile_descArrayPL = [[NSMutableArray alloc] init]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"14(?:5\\d|71)\\d{5}|4(?:[0-3]\\d|4[47-9]|5[0-25-9]|6[6-9]|7[02-9]|8[147-9]|9[017-9])\\d{6}" withPossibleNumberPattern:nil withPossibleLength:mobile_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"412345678" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:7]]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:10]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"180(?:0\\d{3}|2)\\d{3}" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"1800123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:8]]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:10]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"19(?:0[0126]\\d|[679])\\d{5}" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"1900123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:6]]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:8]]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:10]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"13(?:00\\d{3}|45[0-4]|\\d)\\d{3}" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"1300123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"500\\d{6}" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"500123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"550\\d{6}" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"550123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:5]]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:6]]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:7]]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:8]]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"16\\d{3,7}" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"1612345" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:6]]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:7]]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:8]]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:10]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"1(?:3(?:00\\d{3}|45[0-4]|\\d)\\d{3}|80(?:0\\d{6}|2\\d{3}))" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"1300123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"AU"; - self.countryCode = [NSNumber numberWithInteger:61]; - self.internationalPrefix = @"(?:14(?:1[14]|34|4[17]|[56]6|7[47]|88))?001[14-689]"; - self.preferredInternationalPrefix = @"0011"; - self.nationalPrefix = @"0"; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = @"0"; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - [numberFormats0_patternArray addObject:@"[2378]"]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"([2378])(\\d{4})(\\d{4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:@"(0$1)" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - - NSMutableArray *numberFormats1_patternArray = [[NSMutableArray alloc] init]; - [numberFormats1_patternArray addObject:@"[45]|14"]; - NBNumberFormat *numberFormats1 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{3})(\\d{3})(\\d{3})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats1_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats1]; - - NSMutableArray *numberFormats2_patternArray = [[NSMutableArray alloc] init]; - [numberFormats2_patternArray addObject:@"16"]; - NBNumberFormat *numberFormats2 = [[NBNumberFormat alloc] initWithPattern:@"(16)(\\d{3,4})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats2_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats2]; - - NSMutableArray *numberFormats3_patternArray = [[NSMutableArray alloc] init]; - [numberFormats3_patternArray addObject:@"16"]; - NBNumberFormat *numberFormats3 = [[NBNumberFormat alloc] initWithPattern:@"(16)(\\d{3})(\\d{2,4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats3_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats3]; - - NSMutableArray *numberFormats4_patternArray = [[NSMutableArray alloc] init]; - [numberFormats4_patternArray addObject:@"1(?:[38]0|90)"]; - [numberFormats4_patternArray addObject:@"1(?:[38]00|90)"]; - NBNumberFormat *numberFormats4 = [[NBNumberFormat alloc] initWithPattern:@"(1[389]\\d{2})(\\d{3})(\\d{3})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats4_patternArray withNationalPrefixFormattingRule:@"$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats4]; - - NSMutableArray *numberFormats5_patternArray = [[NSMutableArray alloc] init]; - [numberFormats5_patternArray addObject:@"180"]; - [numberFormats5_patternArray addObject:@"1802"]; - NBNumberFormat *numberFormats5 = [[NBNumberFormat alloc] initWithPattern:@"(180)(2\\d{3})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats5_patternArray withNationalPrefixFormattingRule:@"$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats5]; - - NSMutableArray *numberFormats6_patternArray = [[NSMutableArray alloc] init]; - [numberFormats6_patternArray addObject:@"19[13]"]; - NBNumberFormat *numberFormats6 = [[NBNumberFormat alloc] initWithPattern:@"(19\\d)(\\d{3})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats6_patternArray withNationalPrefixFormattingRule:@"$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats6]; - - NSMutableArray *numberFormats7_patternArray = [[NSMutableArray alloc] init]; - [numberFormats7_patternArray addObject:@"19[679]"]; - NBNumberFormat *numberFormats7 = [[NBNumberFormat alloc] initWithPattern:@"(19\\d{2})(\\d{4})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats7_patternArray withNationalPrefixFormattingRule:@"$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats7]; - - NSMutableArray *numberFormats8_patternArray = [[NSMutableArray alloc] init]; - [numberFormats8_patternArray addObject:@"13[1-9]"]; - NBNumberFormat *numberFormats8 = [[NBNumberFormat alloc] initWithPattern:@"(13)(\\d{2})(\\d{2})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats8_patternArray withNationalPrefixFormattingRule:@"$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats8]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = YES; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataCL -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:9]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:10]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:11]]; - - NSMutableArray *generalDesc_descArrayPLLO = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPLLO addObject: [NSNumber numberWithInt:7]]; - [generalDesc_descArrayPLLO addObject: [NSNumber numberWithInt:8]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:[2-9]|600|123)\\d{7,8}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:generalDesc_descArrayPLLO withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *fixedLine_descArrayPL = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:9]]; - - NSMutableArray *fixedLine_descArrayPLLO = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPLLO addObject: [NSNumber numberWithInt:7]]; - [fixedLine_descArrayPLLO addObject: [NSNumber numberWithInt:8]]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"2(?:1962\\d{4}|2\\d{7}|32[0-2467]\\d{5})|(?:3[2-5]|[47][1-35]|5[1-3578]|6[13-57]|9[3-9])\\d{7}" withPossibleNumberPattern:nil withPossibleLength:fixedLine_descArrayPL withPossibleLengthLocalOnly:fixedLine_descArrayPLLO withExample:@"221234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *mobile_descArrayPL = [[NSMutableArray alloc] init]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:9]]; - - NSMutableArray *mobile_descArrayPLLO = [[NSMutableArray alloc] init]; - [mobile_descArrayPLLO addObject: [NSNumber numberWithInt:8]]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"2(?:1962\\d{4}|2\\d{7}|32[0-2467]\\d{5})|(?:3[2-5]|[47][1-35]|5[1-3578]|6[13-57]|9[3-9])\\d{7}" withPossibleNumberPattern:nil withPossibleLength:mobile_descArrayPL withPossibleLengthLocalOnly:mobile_descArrayPLLO withExample:@"961234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:9]]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:11]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"800\\d{6}|1230\\d{7}" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"800123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:10]]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:11]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"600\\d{7,8}" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"6001234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"44\\d{7}" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"441234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:10]]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:11]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"600\\d{7,8}" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"6001234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"CL"; - self.countryCode = [NSNumber numberWithInteger:56]; - self.internationalPrefix = @"(?:0|1(?:1[0-69]|2[0-57]|5[13-58]|69|7[0167]|8[018]))0"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = @"0"; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = @"0|(1(?:1[0-69]|2[0-57]|5[13-58]|69|7[0167]|8[018]))"; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = YES; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - [numberFormats0_patternArray addObject:@"2[23]"]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(\\d)(\\d{4})(\\d{4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:@"($1)" whenFormatting:NO withDomesticCarrierCodeFormattingRule:@"$CC ($1)"]; - [numberFormats_FormatArray addObject:numberFormats0]; - - NSMutableArray *numberFormats1_patternArray = [[NSMutableArray alloc] init]; - [numberFormats1_patternArray addObject:@"[357]|4[1-35]|6[13-57]"]; - NBNumberFormat *numberFormats1 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{2})(\\d{3})(\\d{4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats1_patternArray withNationalPrefixFormattingRule:@"($1)" whenFormatting:NO withDomesticCarrierCodeFormattingRule:@"$CC ($1)"]; - [numberFormats_FormatArray addObject:numberFormats1]; - - NSMutableArray *numberFormats2_patternArray = [[NSMutableArray alloc] init]; - [numberFormats2_patternArray addObject:@"9"]; - NBNumberFormat *numberFormats2 = [[NBNumberFormat alloc] initWithPattern:@"(9)(\\d{4})(\\d{4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats2_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats2]; - - NSMutableArray *numberFormats3_patternArray = [[NSMutableArray alloc] init]; - [numberFormats3_patternArray addObject:@"44"]; - NBNumberFormat *numberFormats3 = [[NBNumberFormat alloc] initWithPattern:@"(44)(\\d{3})(\\d{4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats3_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats3]; - - NSMutableArray *numberFormats4_patternArray = [[NSMutableArray alloc] init]; - [numberFormats4_patternArray addObject:@"60|8"]; - NBNumberFormat *numberFormats4 = [[NBNumberFormat alloc] initWithPattern:@"([68]00)(\\d{3})(\\d{3,4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats4_patternArray withNationalPrefixFormattingRule:@"$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats4]; - - NSMutableArray *numberFormats5_patternArray = [[NSMutableArray alloc] init]; - [numberFormats5_patternArray addObject:@"60"]; - NBNumberFormat *numberFormats5 = [[NBNumberFormat alloc] initWithPattern:@"(600)(\\d{3})(\\d{2})(\\d{3})" withFormat:@"$1 $2 $3 $4" withLeadingDigitsPatterns:numberFormats5_patternArray withNationalPrefixFormattingRule:@"$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats5]; - - NSMutableArray *numberFormats6_patternArray = [[NSMutableArray alloc] init]; - [numberFormats6_patternArray addObject:@"1"]; - NBNumberFormat *numberFormats6 = [[NBNumberFormat alloc] initWithPattern:@"(1230)(\\d{3})(\\d{4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats6_patternArray withNationalPrefixFormattingRule:@"$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats6]; - - NSMutableArray *numberFormats7_patternArray = [[NSMutableArray alloc] init]; - [numberFormats7_patternArray addObject:@"219"]; - NBNumberFormat *numberFormats7 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{5})(\\d{4})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats7_patternArray withNationalPrefixFormattingRule:@"($1)" whenFormatting:NO withDomesticCarrierCodeFormattingRule:@"$CC ($1)"]; - [numberFormats_FormatArray addObject:numberFormats7]; - - NSMutableArray *numberFormats8_patternArray = [[NSMutableArray alloc] init]; - [numberFormats8_patternArray addObject:@"[1-9]"]; - NBNumberFormat *numberFormats8 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{4,5})" withFormat:@"$1" withLeadingDigitsPatterns:numberFormats8_patternArray withNationalPrefixFormattingRule:@"$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats8]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *intlNumberFormats0_patternArray = [[NSMutableArray alloc] init]; - [intlNumberFormats0_patternArray addObject:@"2[23]"]; - NBNumberFormat *intlNumberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(\\d)(\\d{4})(\\d{4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:intlNumberFormats0_patternArray withNationalPrefixFormattingRule:@"($1)" whenFormatting:NO withDomesticCarrierCodeFormattingRule:@"$CC ($1)"]; - [intlNumberFormats_FormatArray addObject:intlNumberFormats0]; - - NSMutableArray *intlNumberFormats1_patternArray = [[NSMutableArray alloc] init]; - [intlNumberFormats1_patternArray addObject:@"[357]|4[1-35]|6[13-57]"]; - NBNumberFormat *intlNumberFormats1 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{2})(\\d{3})(\\d{4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:intlNumberFormats1_patternArray withNationalPrefixFormattingRule:@"($1)" whenFormatting:NO withDomesticCarrierCodeFormattingRule:@"$CC ($1)"]; - [intlNumberFormats_FormatArray addObject:intlNumberFormats1]; - - NSMutableArray *intlNumberFormats2_patternArray = [[NSMutableArray alloc] init]; - [intlNumberFormats2_patternArray addObject:@"9"]; - NBNumberFormat *intlNumberFormats2 = [[NBNumberFormat alloc] initWithPattern:@"(9)(\\d{4})(\\d{4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:intlNumberFormats2_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [intlNumberFormats_FormatArray addObject:intlNumberFormats2]; - - NSMutableArray *intlNumberFormats3_patternArray = [[NSMutableArray alloc] init]; - [intlNumberFormats3_patternArray addObject:@"44"]; - NBNumberFormat *intlNumberFormats3 = [[NBNumberFormat alloc] initWithPattern:@"(44)(\\d{3})(\\d{4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:intlNumberFormats3_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [intlNumberFormats_FormatArray addObject:intlNumberFormats3]; - - NSMutableArray *intlNumberFormats4_patternArray = [[NSMutableArray alloc] init]; - [intlNumberFormats4_patternArray addObject:@"60|8"]; - NBNumberFormat *intlNumberFormats4 = [[NBNumberFormat alloc] initWithPattern:@"([68]00)(\\d{3})(\\d{3,4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:intlNumberFormats4_patternArray withNationalPrefixFormattingRule:@"$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [intlNumberFormats_FormatArray addObject:intlNumberFormats4]; - - NSMutableArray *intlNumberFormats5_patternArray = [[NSMutableArray alloc] init]; - [intlNumberFormats5_patternArray addObject:@"60"]; - NBNumberFormat *intlNumberFormats5 = [[NBNumberFormat alloc] initWithPattern:@"(600)(\\d{3})(\\d{2})(\\d{3})" withFormat:@"$1 $2 $3 $4" withLeadingDigitsPatterns:intlNumberFormats5_patternArray withNationalPrefixFormattingRule:@"$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [intlNumberFormats_FormatArray addObject:intlNumberFormats5]; - - NSMutableArray *intlNumberFormats6_patternArray = [[NSMutableArray alloc] init]; - [intlNumberFormats6_patternArray addObject:@"1"]; - NBNumberFormat *intlNumberFormats6 = [[NBNumberFormat alloc] initWithPattern:@"(1230)(\\d{3})(\\d{4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:intlNumberFormats6_patternArray withNationalPrefixFormattingRule:@"$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [intlNumberFormats_FormatArray addObject:intlNumberFormats6]; - - NSMutableArray *intlNumberFormats7_patternArray = [[NSMutableArray alloc] init]; - [intlNumberFormats7_patternArray addObject:@"219"]; - NBNumberFormat *intlNumberFormats7 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{5})(\\d{4})" withFormat:@"$1 $2" withLeadingDigitsPatterns:intlNumberFormats7_patternArray withNationalPrefixFormattingRule:@"($1)" whenFormatting:NO withDomesticCarrierCodeFormattingRule:@"$CC ($1)"]; - [intlNumberFormats_FormatArray addObject:intlNumberFormats7]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataEC -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:8]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:9]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:10]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:11]]; - - NSMutableArray *generalDesc_descArrayPLLO = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPLLO addObject: [NSNumber numberWithInt:7]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"1\\d{9,10}|[2-8]\\d{7}|9\\d{8}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:generalDesc_descArrayPLLO withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *fixedLine_descArrayPL = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:8]]; - - NSMutableArray *fixedLine_descArrayPLLO = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPLLO addObject: [NSNumber numberWithInt:7]]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[2-7][2-7]\\d{6}" withPossibleNumberPattern:nil withPossibleLength:fixedLine_descArrayPL withPossibleLengthLocalOnly:fixedLine_descArrayPLLO withExample:@"22123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *mobile_descArrayPL = [[NSMutableArray alloc] init]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"9(?:(?:39|[45][89]|7[7-9]|[89]\\d)\\d|6(?:[017-9]\\d|2[0-4]))\\d{5}" withPossibleNumberPattern:nil withPossibleLength:mobile_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"991234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:10]]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:11]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"1800\\d{6,7}" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"18001234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:8]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[2-7]890\\d{4}" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"28901234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"EC"; - self.countryCode = [NSNumber numberWithInteger:593]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = @"0"; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = @"0"; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - [numberFormats0_patternArray addObject:@"[247]|[356][2-8]"]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(\\d)(\\d{3})(\\d{4})" withFormat:@"$1 $2-$3" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:@"(0$1)" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - - NSMutableArray *numberFormats1_patternArray = [[NSMutableArray alloc] init]; - [numberFormats1_patternArray addObject:@"9"]; - NBNumberFormat *numberFormats1 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{2})(\\d{3})(\\d{4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats1_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats1]; - - NSMutableArray *numberFormats2_patternArray = [[NSMutableArray alloc] init]; - [numberFormats2_patternArray addObject:@"1"]; - NBNumberFormat *numberFormats2 = [[NBNumberFormat alloc] initWithPattern:@"(1800)(\\d{3})(\\d{3,4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats2_patternArray withNationalPrefixFormattingRule:@"$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats2]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *intlNumberFormats0_patternArray = [[NSMutableArray alloc] init]; - [intlNumberFormats0_patternArray addObject:@"[247]|[356][2-8]"]; - NBNumberFormat *intlNumberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(\\d)(\\d{3})(\\d{4})" withFormat:@"$1-$2-$3" withLeadingDigitsPatterns:intlNumberFormats0_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [intlNumberFormats_FormatArray addObject:intlNumberFormats0]; - - NSMutableArray *intlNumberFormats1_patternArray = [[NSMutableArray alloc] init]; - [intlNumberFormats1_patternArray addObject:@"9"]; - NBNumberFormat *intlNumberFormats1 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{2})(\\d{3})(\\d{4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:intlNumberFormats1_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [intlNumberFormats_FormatArray addObject:intlNumberFormats1]; - - NSMutableArray *intlNumberFormats2_patternArray = [[NSMutableArray alloc] init]; - [intlNumberFormats2_patternArray addObject:@"1"]; - NBNumberFormat *intlNumberFormats2 = [[NBNumberFormat alloc] initWithPattern:@"(1800)(\\d{3})(\\d{3,4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:intlNumberFormats2_patternArray withNationalPrefixFormattingRule:@"$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [intlNumberFormats_FormatArray addObject:intlNumberFormats2]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataBQ -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:7]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[347]\\d{6}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:318[023]|41(?:6[023]|70)|7(?:1[578]|50)\\d)\\d{3}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"7151234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:31(?:8[14-8]|9[14578])|416[145-9]|7(?:0[01]|7[07]|8\\d|9[056])\\d)\\d{3}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"3181234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"BQ"; - self.countryCode = [NSNumber numberWithInteger:599]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = nil; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = nil; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataCM -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:8]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[2368]\\d{7,8}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *fixedLine_descArrayPL = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"2(?:22|33|4[23])\\d{6}" withPossibleNumberPattern:nil withPossibleLength:fixedLine_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"222123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *mobile_descArrayPL = [[NSMutableArray alloc] init]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"6[5-9]\\d{7}" withPossibleNumberPattern:nil withPossibleLength:mobile_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"671234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:8]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"800\\d{5}" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"80012345" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:8]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"88\\d{6}" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"88012345" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"CM"; - self.countryCode = [NSNumber numberWithInteger:237]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = nil; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = nil; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - [numberFormats0_patternArray addObject:@"[26]"]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"([26])(\\d{2})(\\d{2})(\\d{2})(\\d{2})" withFormat:@"$1 $2 $3 $4 $5" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - - NSMutableArray *numberFormats1_patternArray = [[NSMutableArray alloc] init]; - [numberFormats1_patternArray addObject:@"[23]|88"]; - NBNumberFormat *numberFormats1 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{2})(\\d{2})(\\d{2})(\\d{2})" withFormat:@"$1 $2 $3 $4" withLeadingDigitsPatterns:numberFormats1_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats1]; - - NSMutableArray *numberFormats2_patternArray = [[NSMutableArray alloc] init]; - [numberFormats2_patternArray addObject:@"80"]; - NBNumberFormat *numberFormats2 = [[NBNumberFormat alloc] initWithPattern:@"(800)(\\d{2})(\\d{3})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats2_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats2]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataBR -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:8]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:9]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:10]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:11]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[1-46-9]\\d{7,10}|5(?:[0-4]\\d{7,9}|5(?:[2-8]\\d{7}|9\\d{7,8}))" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *fixedLine_descArrayPL = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:10]]; - - NSMutableArray *fixedLine_descArrayPLLO = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPLLO addObject: [NSNumber numberWithInt:8]]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:[14689][1-9]|2[12478]|3[1-578]|5[13-5]|7[13-579])[2-5]\\d{7}" withPossibleNumberPattern:nil withPossibleLength:fixedLine_descArrayPL withPossibleLengthLocalOnly:fixedLine_descArrayPLLO withExample:@"1123456789" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *mobile_descArrayPL = [[NSMutableArray alloc] init]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:10]]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:11]]; - - NSMutableArray *mobile_descArrayPLLO = [[NSMutableArray alloc] init]; - [mobile_descArrayPLLO addObject: [NSNumber numberWithInt:8]]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"1[1-9](?:7|9\\d)\\d{7}|(?:2[12478]|3[1-578]|[4689][1-9]|5[13-5]|7[13-579])(?:[6-8]|9\\d?)\\d{7}" withPossibleNumberPattern:nil withPossibleLength:mobile_descArrayPL withPossibleLengthLocalOnly:mobile_descArrayPLLO withExample:@"11961234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:9]]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:10]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"800\\d{6,7}" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"800123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:9]]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:10]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:300|[59]00\\d?)\\d{6}" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"300123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:8]]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:10]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:300\\d(?:\\d{2})?|40(?:0\\d|20))\\d{4}" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"40041234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:8]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:300\\d|40(?:0\\d|20))\\d{4}" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"40041234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"BR"; - self.countryCode = [NSNumber numberWithInteger:55]; - self.internationalPrefix = @"00(?:1[245]|2[1-35]|31|4[13]|[56]5|99)"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = @"0"; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = @"0(?:(1[245]|2[1-35]|31|4[13]|[56]5|99)(\\d{10,11}))?"; - self.nationalPrefixTransformRule = @"$2"; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - [numberFormats0_patternArray addObject:@"[2-9](?:[1-9]|0[1-9])"]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{4})(\\d{4})" withFormat:@"$1-$2" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:@"$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - - NSMutableArray *numberFormats1_patternArray = [[NSMutableArray alloc] init]; - [numberFormats1_patternArray addObject:@"9(?:[1-9]|0[1-9])"]; - NBNumberFormat *numberFormats1 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{5})(\\d{4})" withFormat:@"$1-$2" withLeadingDigitsPatterns:numberFormats1_patternArray withNationalPrefixFormattingRule:@"$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats1]; - - NSMutableArray *numberFormats2_patternArray = [[NSMutableArray alloc] init]; - [numberFormats2_patternArray addObject:@"1[125689]"]; - NBNumberFormat *numberFormats2 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{3,5})" withFormat:@"$1" withLeadingDigitsPatterns:numberFormats2_patternArray withNationalPrefixFormattingRule:@"$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats2]; - - NSMutableArray *numberFormats3_patternArray = [[NSMutableArray alloc] init]; - [numberFormats3_patternArray addObject:@"[1-9][1-9]"]; - NBNumberFormat *numberFormats3 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{2})(\\d{4})(\\d{4})" withFormat:@"$1 $2-$3" withLeadingDigitsPatterns:numberFormats3_patternArray withNationalPrefixFormattingRule:@"($1)" whenFormatting:NO withDomesticCarrierCodeFormattingRule:@"0 $CC ($1)"]; - [numberFormats_FormatArray addObject:numberFormats3]; - - NSMutableArray *numberFormats4_patternArray = [[NSMutableArray alloc] init]; - [numberFormats4_patternArray addObject:@"(?:[14689][1-9]|2[12478]|3[1-578]|5[1-5]|7[13-579])9"]; - NBNumberFormat *numberFormats4 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{2})(\\d{5})(\\d{4})" withFormat:@"$1 $2-$3" withLeadingDigitsPatterns:numberFormats4_patternArray withNationalPrefixFormattingRule:@"($1)" whenFormatting:NO withDomesticCarrierCodeFormattingRule:@"0 $CC ($1)"]; - [numberFormats_FormatArray addObject:numberFormats4]; - - NSMutableArray *numberFormats5_patternArray = [[NSMutableArray alloc] init]; - [numberFormats5_patternArray addObject:@"(?:300|40(?:0|20))"]; - NBNumberFormat *numberFormats5 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{4})(\\d{4})" withFormat:@"$1-$2" withLeadingDigitsPatterns:numberFormats5_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats5]; - - NSMutableArray *numberFormats6_patternArray = [[NSMutableArray alloc] init]; - [numberFormats6_patternArray addObject:@"[3589]00"]; - NBNumberFormat *numberFormats6 = [[NBNumberFormat alloc] initWithPattern:@"([3589]00)(\\d{2,3})(\\d{4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats6_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats6]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *intlNumberFormats0_patternArray = [[NSMutableArray alloc] init]; - [intlNumberFormats0_patternArray addObject:@"[1-9][1-9]"]; - NBNumberFormat *intlNumberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{2})(\\d{4})(\\d{4})" withFormat:@"$1 $2-$3" withLeadingDigitsPatterns:intlNumberFormats0_patternArray withNationalPrefixFormattingRule:@"($1)" whenFormatting:NO withDomesticCarrierCodeFormattingRule:@"0 $CC ($1)"]; - [intlNumberFormats_FormatArray addObject:intlNumberFormats0]; - - NSMutableArray *intlNumberFormats1_patternArray = [[NSMutableArray alloc] init]; - [intlNumberFormats1_patternArray addObject:@"(?:[14689][1-9]|2[12478]|3[1-578]|5[1-5]|7[13-579])9"]; - NBNumberFormat *intlNumberFormats1 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{2})(\\d{5})(\\d{4})" withFormat:@"$1 $2-$3" withLeadingDigitsPatterns:intlNumberFormats1_patternArray withNationalPrefixFormattingRule:@"($1)" whenFormatting:NO withDomesticCarrierCodeFormattingRule:@"0 $CC ($1)"]; - [intlNumberFormats_FormatArray addObject:intlNumberFormats1]; - - NSMutableArray *intlNumberFormats2_patternArray = [[NSMutableArray alloc] init]; - [intlNumberFormats2_patternArray addObject:@"(?:300|40(?:0|20))"]; - NBNumberFormat *intlNumberFormats2 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{4})(\\d{4})" withFormat:@"$1-$2" withLeadingDigitsPatterns:intlNumberFormats2_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [intlNumberFormats_FormatArray addObject:intlNumberFormats2]; - - NSMutableArray *intlNumberFormats3_patternArray = [[NSMutableArray alloc] init]; - [intlNumberFormats3_patternArray addObject:@"[3589]00"]; - NBNumberFormat *intlNumberFormats3 = [[NBNumberFormat alloc] initWithPattern:@"([3589]00)(\\d{2,3})(\\d{4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:intlNumberFormats3_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [intlNumberFormats_FormatArray addObject:intlNumberFormats3]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataAW -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:7]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[25-9]\\d{6}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"5(?:2\\d|8[1-9])\\d{4}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"5212345" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:5(?:6\\d|9[2-478])|6(?:[039]0|22|4[01]|6[0-2])|7[34]\\d|9(?:6[45]|9[4-8]))\\d{4}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"5601234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"800\\d{4}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"8001234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"900\\d{4}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"9001234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"28\\d{5}|501\\d{4}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"5011234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"AW"; - self.countryCode = [NSNumber numberWithInteger:297]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = nil; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = nil; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{3})(\\d{4})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataCN -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:7]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:8]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:9]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:10]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:11]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:12]]; - - NSMutableArray *generalDesc_descArrayPLLO = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPLLO addObject: [NSNumber numberWithInt:5]]; - [generalDesc_descArrayPLLO addObject: [NSNumber numberWithInt:6]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[1-7]\\d{6,11}|8[0-357-9]\\d{6,9}|9\\d{7,10}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:generalDesc_descArrayPLLO withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *fixedLine_descArrayPLLO = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPLLO addObject: [NSNumber numberWithInt:5]]; - [fixedLine_descArrayPLLO addObject: [NSNumber numberWithInt:6]]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"21(?:100\\d{2}|95\\d{3,4}|\\d{8,10})|(?:10|2[02-57-9]|3(?:11|7[179])|4(?:[15]1|3[1-35])|5(?:1\\d|2[37]|3[12]|51|7[13-79]|9[15])|7(?:31|5[457]|6[09]|91)|8(?:[57]1|98))(?:100\\d{2}|95\\d{3,4}|\\d{8})|(?:3(?:1[02-9]|35|49|5\\d|7[02-68]|9[1-68])|4(?:1[02-9]|2[179]|3[3-9]|5[2-9]|6[4789]|7\\d|8[23])|5(?:3[03-9]|4[36]|5[02-9]|6[1-46]|7[028]|80|9[2-46-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[17]\\d|2[248]|3[04-9]|4[3-6]|5[0-4689]|6[2368]|9[02-9])|8(?:078|1[236-8]|2[5-7]|3\\d|5[1-9]|7[02-9]|8[3678]|9[1-7])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))(?:100\\d{2}|95\\d{3,4}|\\d{7})|80(?:29|6[03578]|7[018]|81)\\d{4}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:fixedLine_descArrayPLLO withExample:@"1012345678" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *mobile_descArrayPL = [[NSMutableArray alloc] init]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:11]]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"1(?:[38]\\d|4[57]|5[0-35-9]|7[0-35-8])\\d{8}" withPossibleNumberPattern:nil withPossibleLength:mobile_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"13123456789" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:10]]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:12]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:10)?800\\d{7}" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"8001234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:8]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"16[08]\\d{5}" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"16812345" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:7]]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:8]]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:9]]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:10]]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:11]]; - - NSMutableArray *sharedCost_descArrayPLLO = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPLLO addObject: [NSNumber numberWithInt:5]]; - [sharedCost_descArrayPLLO addObject: [NSNumber numberWithInt:6]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"400\\d{7}|950\\d{7,8}|(?:10|2[0-57-9]|3(?:[157]\\d|35|49|9[1-68])|4(?:[17]\\d|2[179]|[35][1-9]|6[4789]|8[23])|5(?:[1357]\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\d|5[14-9]|8[3678]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\d|4[13]|5[1-5]))96\\d{3,4}" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:sharedCost_descArrayPLLO withExample:@"4001234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:10]]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:11]]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:12]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:4|(?:10)?8)00\\d{7}|950\\d{7,8}" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"4001234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"CN"; - self.countryCode = [NSNumber numberWithInteger:86]; - self.internationalPrefix = @"(1(?:[129]\\d{3}|79\\d{2}))?00"; - self.preferredInternationalPrefix = @"00"; - self.nationalPrefix = @"0"; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = @"(1(?:[129]\\d{3}|79\\d{2}))|0"; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - [numberFormats0_patternArray addObject:@"80[2678]"]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(80\\d{2})(\\d{4})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:YES withDomesticCarrierCodeFormattingRule:@"$CC $1"]; - [numberFormats_FormatArray addObject:numberFormats0]; - - NSMutableArray *numberFormats1_patternArray = [[NSMutableArray alloc] init]; - [numberFormats1_patternArray addObject:@"[48]00"]; - NBNumberFormat *numberFormats1 = [[NBNumberFormat alloc] initWithPattern:@"([48]00)(\\d{3})(\\d{4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats1_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats1]; - - NSMutableArray *numberFormats2_patternArray = [[NSMutableArray alloc] init]; - [numberFormats2_patternArray addObject:@"100|95"]; - NBNumberFormat *numberFormats2 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{5,6})" withFormat:@"$1" withLeadingDigitsPatterns:numberFormats2_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats2]; - - NSMutableArray *numberFormats3_patternArray = [[NSMutableArray alloc] init]; - [numberFormats3_patternArray addObject:@"(?:10|2\\d)[19]"]; - [numberFormats3_patternArray addObject:@"(?:10|2\\d)(?:10|9[56])"]; - [numberFormats3_patternArray addObject:@"(?:10|2\\d)(?:100|9[56])"]; - NBNumberFormat *numberFormats3 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{2})(\\d{5,6})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats3_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:@"$CC $1"]; - [numberFormats_FormatArray addObject:numberFormats3]; - - NSMutableArray *numberFormats4_patternArray = [[NSMutableArray alloc] init]; - [numberFormats4_patternArray addObject:@"[3-9]"]; - [numberFormats4_patternArray addObject:@"[3-9]\\d{2}[19]"]; - [numberFormats4_patternArray addObject:@"[3-9]\\d{2}(?:10|9[56])"]; - NBNumberFormat *numberFormats4 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{3})(\\d{5,6})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats4_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:@"$CC $1"]; - [numberFormats_FormatArray addObject:numberFormats4]; - - NSMutableArray *numberFormats5_patternArray = [[NSMutableArray alloc] init]; - [numberFormats5_patternArray addObject:@"[2-9]"]; - NBNumberFormat *numberFormats5 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{3,4})(\\d{4})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats5_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats5]; - - NSMutableArray *numberFormats6_patternArray = [[NSMutableArray alloc] init]; - [numberFormats6_patternArray addObject:@"21"]; - NBNumberFormat *numberFormats6 = [[NBNumberFormat alloc] initWithPattern:@"(21)(\\d{4})(\\d{4,6})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats6_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:YES withDomesticCarrierCodeFormattingRule:@"$CC $1"]; - [numberFormats_FormatArray addObject:numberFormats6]; - - NSMutableArray *numberFormats7_patternArray = [[NSMutableArray alloc] init]; - [numberFormats7_patternArray addObject:@"10[1-9]|2[02-9]"]; - [numberFormats7_patternArray addObject:@"10[1-9]|2[02-9]"]; - [numberFormats7_patternArray addObject:@"10(?:[1-79]|8(?:[1-9]|0[1-9]))|2[02-9]"]; - NBNumberFormat *numberFormats7 = [[NBNumberFormat alloc] initWithPattern:@"([12]\\d)(\\d{4})(\\d{4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats7_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:YES withDomesticCarrierCodeFormattingRule:@"$CC $1"]; - [numberFormats_FormatArray addObject:numberFormats7]; - - NSMutableArray *numberFormats8_patternArray = [[NSMutableArray alloc] init]; - [numberFormats8_patternArray addObject:@"3(?:1[02-9]|35|49|5|7[02-68]|9[1-68])|4(?:1[02-9]|2[179]|[35][2-9]|6[4789]|7\\d|8[23])|5(?:3[03-9]|4[36]|5[02-9]|6[1-46]|7[028]|80|9[2-46-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]|2[248]|3[04-9]|4[3-6]|6[2368])|8(?:1[236-8]|2[5-7]|3|5[1-9]|7[02-9]|8[3678]|9[1-7])|9(?:0[1-3689]|1[1-79]|[379]|4[13]|5[1-5])"]; - NBNumberFormat *numberFormats8 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{3})(\\d{3})(\\d{4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats8_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:YES withDomesticCarrierCodeFormattingRule:@"$CC $1"]; - [numberFormats_FormatArray addObject:numberFormats8]; - - NSMutableArray *numberFormats9_patternArray = [[NSMutableArray alloc] init]; - [numberFormats9_patternArray addObject:@"3(?:11|7[179])|4(?:[15]1|3[1-35])|5(?:1|2[37]|3[12]|51|7[13-79]|9[15])|7(?:31|5[457]|6[09]|91)|8(?:[57]1|98)"]; - NBNumberFormat *numberFormats9 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{3})(\\d{4})(\\d{4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats9_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:YES withDomesticCarrierCodeFormattingRule:@"$CC $1"]; - [numberFormats_FormatArray addObject:numberFormats9]; - - NSMutableArray *numberFormats10_patternArray = [[NSMutableArray alloc] init]; - [numberFormats10_patternArray addObject:@"807"]; - [numberFormats10_patternArray addObject:@"8078"]; - NBNumberFormat *numberFormats10 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{4})(\\d{3})(\\d{4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats10_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:YES withDomesticCarrierCodeFormattingRule:@"$CC $1"]; - [numberFormats_FormatArray addObject:numberFormats10]; - - NSMutableArray *numberFormats11_patternArray = [[NSMutableArray alloc] init]; - [numberFormats11_patternArray addObject:@"1[3-578]"]; - NBNumberFormat *numberFormats11 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{3})(\\d{4})(\\d{4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats11_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:@"$CC $1"]; - [numberFormats_FormatArray addObject:numberFormats11]; - - NSMutableArray *numberFormats12_patternArray = [[NSMutableArray alloc] init]; - [numberFormats12_patternArray addObject:@"108"]; - [numberFormats12_patternArray addObject:@"1080"]; - [numberFormats12_patternArray addObject:@"10800"]; - NBNumberFormat *numberFormats12 = [[NBNumberFormat alloc] initWithPattern:@"(10800)(\\d{3})(\\d{4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats12_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats12]; - - NSMutableArray *numberFormats13_patternArray = [[NSMutableArray alloc] init]; - [numberFormats13_patternArray addObject:@"950"]; - NBNumberFormat *numberFormats13 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{3})(\\d{7,8})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats13_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats13]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *intlNumberFormats0_patternArray = [[NSMutableArray alloc] init]; - [intlNumberFormats0_patternArray addObject:@"80[2678]"]; - NBNumberFormat *intlNumberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(80\\d{2})(\\d{4})" withFormat:@"$1 $2" withLeadingDigitsPatterns:intlNumberFormats0_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:YES withDomesticCarrierCodeFormattingRule:@"$CC $1"]; - [intlNumberFormats_FormatArray addObject:intlNumberFormats0]; - - NSMutableArray *intlNumberFormats1_patternArray = [[NSMutableArray alloc] init]; - [intlNumberFormats1_patternArray addObject:@"[48]00"]; - NBNumberFormat *intlNumberFormats1 = [[NBNumberFormat alloc] initWithPattern:@"([48]00)(\\d{3})(\\d{4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:intlNumberFormats1_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [intlNumberFormats_FormatArray addObject:intlNumberFormats1]; - - NSMutableArray *intlNumberFormats2_patternArray = [[NSMutableArray alloc] init]; - [intlNumberFormats2_patternArray addObject:@"(?:10|2\\d)[19]"]; - [intlNumberFormats2_patternArray addObject:@"(?:10|2\\d)(?:10|9[56])"]; - [intlNumberFormats2_patternArray addObject:@"(?:10|2\\d)(?:100|9[56])"]; - NBNumberFormat *intlNumberFormats2 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{2})(\\d{5,6})" withFormat:@"$1 $2" withLeadingDigitsPatterns:intlNumberFormats2_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:@"$CC $1"]; - [intlNumberFormats_FormatArray addObject:intlNumberFormats2]; - - NSMutableArray *intlNumberFormats3_patternArray = [[NSMutableArray alloc] init]; - [intlNumberFormats3_patternArray addObject:@"[3-9]"]; - [intlNumberFormats3_patternArray addObject:@"[3-9]\\d{2}[19]"]; - [intlNumberFormats3_patternArray addObject:@"[3-9]\\d{2}(?:10|9[56])"]; - NBNumberFormat *intlNumberFormats3 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{3})(\\d{5,6})" withFormat:@"$1 $2" withLeadingDigitsPatterns:intlNumberFormats3_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:@"$CC $1"]; - [intlNumberFormats_FormatArray addObject:intlNumberFormats3]; - - NSMutableArray *intlNumberFormats4_patternArray = [[NSMutableArray alloc] init]; - [intlNumberFormats4_patternArray addObject:@"21"]; - NBNumberFormat *intlNumberFormats4 = [[NBNumberFormat alloc] initWithPattern:@"(21)(\\d{4})(\\d{4,6})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:intlNumberFormats4_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:YES withDomesticCarrierCodeFormattingRule:@"$CC $1"]; - [intlNumberFormats_FormatArray addObject:intlNumberFormats4]; - - NSMutableArray *intlNumberFormats5_patternArray = [[NSMutableArray alloc] init]; - [intlNumberFormats5_patternArray addObject:@"10[1-9]|2[02-9]"]; - [intlNumberFormats5_patternArray addObject:@"10[1-9]|2[02-9]"]; - [intlNumberFormats5_patternArray addObject:@"10(?:[1-79]|8(?:[1-9]|0[1-9]))|2[02-9]"]; - NBNumberFormat *intlNumberFormats5 = [[NBNumberFormat alloc] initWithPattern:@"([12]\\d)(\\d{4})(\\d{4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:intlNumberFormats5_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:YES withDomesticCarrierCodeFormattingRule:@"$CC $1"]; - [intlNumberFormats_FormatArray addObject:intlNumberFormats5]; - - NSMutableArray *intlNumberFormats6_patternArray = [[NSMutableArray alloc] init]; - [intlNumberFormats6_patternArray addObject:@"3(?:1[02-9]|35|49|5|7[02-68]|9[1-68])|4(?:1[02-9]|2[179]|[35][2-9]|6[4789]|7\\d|8[23])|5(?:3[03-9]|4[36]|5[02-9]|6[1-46]|7[028]|80|9[2-46-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]|2[248]|3[04-9]|4[3-6]|6[2368])|8(?:1[236-8]|2[5-7]|3|5[1-9]|7[02-9]|8[3678]|9[1-7])|9(?:0[1-3689]|1[1-79]|[379]|4[13]|5[1-5])"]; - NBNumberFormat *intlNumberFormats6 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{3})(\\d{3})(\\d{4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:intlNumberFormats6_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:YES withDomesticCarrierCodeFormattingRule:@"$CC $1"]; - [intlNumberFormats_FormatArray addObject:intlNumberFormats6]; - - NSMutableArray *intlNumberFormats7_patternArray = [[NSMutableArray alloc] init]; - [intlNumberFormats7_patternArray addObject:@"3(?:11|7[179])|4(?:[15]1|3[1-35])|5(?:1|2[37]|3[12]|51|7[13-79]|9[15])|7(?:31|5[457]|6[09]|91)|8(?:[57]1|98)"]; - NBNumberFormat *intlNumberFormats7 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{3})(\\d{4})(\\d{4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:intlNumberFormats7_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:YES withDomesticCarrierCodeFormattingRule:@"$CC $1"]; - [intlNumberFormats_FormatArray addObject:intlNumberFormats7]; - - NSMutableArray *intlNumberFormats8_patternArray = [[NSMutableArray alloc] init]; - [intlNumberFormats8_patternArray addObject:@"807"]; - [intlNumberFormats8_patternArray addObject:@"8078"]; - NBNumberFormat *intlNumberFormats8 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{4})(\\d{3})(\\d{4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:intlNumberFormats8_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:YES withDomesticCarrierCodeFormattingRule:@"$CC $1"]; - [intlNumberFormats_FormatArray addObject:intlNumberFormats8]; - - NSMutableArray *intlNumberFormats9_patternArray = [[NSMutableArray alloc] init]; - [intlNumberFormats9_patternArray addObject:@"1[3-578]"]; - NBNumberFormat *intlNumberFormats9 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{3})(\\d{4})(\\d{4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:intlNumberFormats9_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:@"$CC $1"]; - [intlNumberFormats_FormatArray addObject:intlNumberFormats9]; - - NSMutableArray *intlNumberFormats10_patternArray = [[NSMutableArray alloc] init]; - [intlNumberFormats10_patternArray addObject:@"108"]; - [intlNumberFormats10_patternArray addObject:@"1080"]; - [intlNumberFormats10_patternArray addObject:@"10800"]; - NBNumberFormat *intlNumberFormats10 = [[NBNumberFormat alloc] initWithPattern:@"(10800)(\\d{3})(\\d{4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:intlNumberFormats10_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [intlNumberFormats_FormatArray addObject:intlNumberFormats10]; - - NSMutableArray *intlNumberFormats11_patternArray = [[NSMutableArray alloc] init]; - [intlNumberFormats11_patternArray addObject:@"950"]; - NBNumberFormat *intlNumberFormats11 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{3})(\\d{7,8})" withFormat:@"$1 $2" withLeadingDigitsPatterns:intlNumberFormats11_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [intlNumberFormats_FormatArray addObject:intlNumberFormats11]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataEE -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:4]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:5]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:7]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:8]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:10]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"1\\d{3,4}|[3-9]\\d{6,7}|800\\d{6,7}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *fixedLine_descArrayPL = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:7]]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:3[23589]|4[3-8]|6\\d|7[1-9]|88)\\d{5}" withPossibleNumberPattern:nil withPossibleLength:fixedLine_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"3212345" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *mobile_descArrayPL = [[NSMutableArray alloc] init]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:7]]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:8]]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:5\\d|8[1-5])\\d{6}|5(?:[02]\\d{2}|1(?:[0-8]\\d|95)|5[0-478]\\d|64[0-4]|65[1-589])\\d{3}" withPossibleNumberPattern:nil withPossibleLength:mobile_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"51234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:7]]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:8]]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:10]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"800(?:0\\d{3}|1\\d|[2-9])\\d{3}" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"80012345" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:7]]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:8]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:40\\d{2}|900)\\d{4}" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"9001234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:8]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"70[0-2]\\d{5}" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"70012345" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:4]]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:5]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"1(?:2[01245]|3[0-6]|4[1-489]|5[0-59]|6[1-46-9]|7[0-27-9]|8[189]|9[012])\\d{1,2}" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"12123" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:4]]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:5]]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:7]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"1\\d{3,4}|800[2-9]\\d{3}" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"8002123" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"EE"; - self.countryCode = [NSNumber numberWithInteger:372]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = nil; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = nil; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - [numberFormats0_patternArray addObject:@"[369]|4[3-8]|5(?:[0-2]|5[0-478]|6[45])|7[1-9]"]; - [numberFormats0_patternArray addObject:@"[369]|4[3-8]|5(?:[02]|1(?:[0-8]|95)|5[0-478]|6(?:4[0-4]|5[1-589]))|7[1-9]"]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"([3-79]\\d{2})(\\d{4})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - - NSMutableArray *numberFormats1_patternArray = [[NSMutableArray alloc] init]; - [numberFormats1_patternArray addObject:@"70"]; - NBNumberFormat *numberFormats1 = [[NBNumberFormat alloc] initWithPattern:@"(70)(\\d{2})(\\d{4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats1_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats1]; - - NSMutableArray *numberFormats2_patternArray = [[NSMutableArray alloc] init]; - [numberFormats2_patternArray addObject:@"800"]; - [numberFormats2_patternArray addObject:@"8000"]; - NBNumberFormat *numberFormats2 = [[NBNumberFormat alloc] initWithPattern:@"(8000)(\\d{3})(\\d{3})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats2_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats2]; - - NSMutableArray *numberFormats3_patternArray = [[NSMutableArray alloc] init]; - [numberFormats3_patternArray addObject:@"40|5|8(?:00|[1-5])"]; - [numberFormats3_patternArray addObject:@"40|5|8(?:00[1-9]|[1-5])"]; - NBNumberFormat *numberFormats3 = [[NBNumberFormat alloc] initWithPattern:@"([458]\\d{3})(\\d{3,4})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats3_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats3]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataBS -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:10]]; - - NSMutableArray *generalDesc_descArrayPLLO = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPLLO addObject: [NSNumber numberWithInt:7]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[2589]\\d{9}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:generalDesc_descArrayPLLO withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *fixedLine_descArrayPLLO = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPLLO addObject: [NSNumber numberWithInt:7]]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"242(?:3(?:02|[236][1-9]|4[0-24-9]|5[0-68]|7[3467]|8[0-4]|9[2-467])|461|502|6(?:0[1-3]|12|7[67]|8[78]|9[89])|7(?:02|88))\\d{4}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:fixedLine_descArrayPLLO withExample:@"2423456789" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *mobile_descArrayPLLO = [[NSMutableArray alloc] init]; - [mobile_descArrayPLLO addObject: [NSNumber numberWithInt:7]]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"242(?:3(?:5[79]|[79]5)|4(?:[2-4][1-9]|5[1-8]|6[2-8]|7\\d|81)|5(?:2[45]|3[35]|44|5[1-9]|65|77)|6[34]6|7(?:27|38)|8(?:0[1-9]|1[02-9]|2\\d|99))\\d{4}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:mobile_descArrayPLLO withExample:@"2423591234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPLLO = [[NSMutableArray alloc] init]; - [tollFree_descArrayPLLO addObject: [NSNumber numberWithInt:7]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"242300\\d{4}|8(?:00|33|44|55|66|77|88)[2-9]\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:tollFree_descArrayPLLO withExample:@"8002123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"900[2-9]\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"9002123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"5(?:00|22|33|44|66|77|88)[2-9]\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"5002345678" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"BS"; - self.countryCode = [NSNumber numberWithInteger:1]; - self.internationalPrefix = @"011"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = @"1"; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = @"1"; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = @"242"; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataDJ -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:8]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[27]\\d{7}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"2(?:1[2-5]|7[45])\\d{5}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"21360003" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"77\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"77831001" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"DJ"; - self.countryCode = [NSNumber numberWithInteger:253]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = nil; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = nil; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{2})(\\d{2})(\\d{2})(\\d{2})" withFormat:@"$1 $2 $3 $4" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataAX -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:5]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:6]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:7]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:8]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:9]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:10]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:11]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:12]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"1\\d{5,11}|[35]\\d{5,9}|[27]\\d{4,9}|4\\d{5,10}|6\\d{7,9}|8\\d{6,9}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *fixedLine_descArrayPL = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:6]]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:7]]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:8]]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:9]]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:10]]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:11]]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:12]]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"18[1-8]\\d{3,9}" withPossibleNumberPattern:nil withPossibleLength:fixedLine_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"1812345678" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *mobile_descArrayPL = [[NSMutableArray alloc] init]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:6]]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:7]]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:8]]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:9]]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:10]]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:11]]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"4\\d{5,10}|50\\d{4,8}" withPossibleNumberPattern:nil withPossibleLength:mobile_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"412345678" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:7]]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:8]]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:9]]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:10]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"800\\d{4,7}" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"8001234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:8]]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[67]00\\d{5,6}" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"600123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:5]]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:6]]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:7]]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:8]]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:9]]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:10]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[13]0\\d{4,8}|2(?:0(?:[016-8]\\d{3,7}|[2-59]\\d{2,7})|9\\d{4,8})|60(?:[12]\\d{5,6}|6\\d{7})|7(?:1\\d{7}|3\\d{8}|5[03-9]\\d{2,7})" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"10112345" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:5]]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:6]]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:7]]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:8]]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:9]]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:10]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[13]00\\d{3,7}|2(?:0(?:0\\d{3,7}|2[023]\\d{1,6}|9[89]\\d{1,6}))|60(?:[12]\\d{5,6}|6\\d{7})|7(?:1\\d{7}|3\\d{8}|5[03-9]\\d{2,7})" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"100123" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"AX"; - self.countryCode = [NSNumber numberWithInteger:358]; - self.internationalPrefix = @"00|99(?:[02469]|5(?:11|33|5[59]|88|9[09]))"; - self.preferredInternationalPrefix = @"00"; - self.nationalPrefix = @"0"; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = @"0"; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataCO -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:8]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:10]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:11]]; - - NSMutableArray *generalDesc_descArrayPLLO = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPLLO addObject: [NSNumber numberWithInt:7]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:[13]\\d{0,3}|[24-8])\\d{7}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:generalDesc_descArrayPLLO withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *fixedLine_descArrayPL = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:8]]; - - NSMutableArray *fixedLine_descArrayPLLO = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPLLO addObject: [NSNumber numberWithInt:7]]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[124-8][2-9]\\d{6}" withPossibleNumberPattern:nil withPossibleLength:fixedLine_descArrayPL withPossibleLengthLocalOnly:fixedLine_descArrayPLLO withExample:@"12345678" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *mobile_descArrayPL = [[NSMutableArray alloc] init]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:10]]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"3(?:0[0-5]|1\\d|2[0-3]|5[01])\\d{7}" withPossibleNumberPattern:nil withPossibleLength:mobile_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"3211234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:11]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"1800\\d{7}" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"18001234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:11]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"19(?:0[01]|4[78])\\d{7}" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"19001234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"CO"; - self.countryCode = [NSNumber numberWithInteger:57]; - self.internationalPrefix = @"00(?:4(?:[14]4|56)|[579])"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = @"0"; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = @"0([3579]|4(?:44|56))?"; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - [numberFormats0_patternArray addObject:@"1(?:8[2-9]|9[0-3]|[2-7])|[24-8]"]; - [numberFormats0_patternArray addObject:@"1(?:8[2-9]|9(?:09|[1-3])|[2-7])|[24-8]"]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(\\d)(\\d{7})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:@"($1)" whenFormatting:NO withDomesticCarrierCodeFormattingRule:@"0$CC $1"]; - [numberFormats_FormatArray addObject:numberFormats0]; - - NSMutableArray *numberFormats1_patternArray = [[NSMutableArray alloc] init]; - [numberFormats1_patternArray addObject:@"3"]; - NBNumberFormat *numberFormats1 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{3})(\\d{7})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats1_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:@"0$CC $1"]; - [numberFormats_FormatArray addObject:numberFormats1]; - - NSMutableArray *numberFormats2_patternArray = [[NSMutableArray alloc] init]; - [numberFormats2_patternArray addObject:@"1(?:80|9[04])"]; - [numberFormats2_patternArray addObject:@"1(?:800|9(?:0[01]|4[78]))"]; - NBNumberFormat *numberFormats2 = [[NBNumberFormat alloc] initWithPattern:@"(1)(\\d{3})(\\d{7})" withFormat:@"$1-$2-$3" withLeadingDigitsPatterns:numberFormats2_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats2]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *intlNumberFormats0_patternArray = [[NSMutableArray alloc] init]; - [intlNumberFormats0_patternArray addObject:@"1(?:8[2-9]|9[0-3]|[2-7])|[24-8]"]; - [intlNumberFormats0_patternArray addObject:@"1(?:8[2-9]|9(?:09|[1-3])|[2-7])|[24-8]"]; - NBNumberFormat *intlNumberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(\\d)(\\d{7})" withFormat:@"$1 $2" withLeadingDigitsPatterns:intlNumberFormats0_patternArray withNationalPrefixFormattingRule:@"($1)" whenFormatting:NO withDomesticCarrierCodeFormattingRule:@"0$CC $1"]; - [intlNumberFormats_FormatArray addObject:intlNumberFormats0]; - - NSMutableArray *intlNumberFormats1_patternArray = [[NSMutableArray alloc] init]; - [intlNumberFormats1_patternArray addObject:@"3"]; - NBNumberFormat *intlNumberFormats1 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{3})(\\d{7})" withFormat:@"$1 $2" withLeadingDigitsPatterns:intlNumberFormats1_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:@"0$CC $1"]; - [intlNumberFormats_FormatArray addObject:intlNumberFormats1]; - - NSMutableArray *intlNumberFormats2_patternArray = [[NSMutableArray alloc] init]; - [intlNumberFormats2_patternArray addObject:@"1(?:80|9[04])"]; - [intlNumberFormats2_patternArray addObject:@"1(?:800|9(?:0[01]|4[78]))"]; - NBNumberFormat *intlNumberFormats2 = [[NBNumberFormat alloc] initWithPattern:@"(1)(\\d{3})(\\d{7})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:intlNumberFormats2_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [intlNumberFormats_FormatArray addObject:intlNumberFormats2]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataBT -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:7]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:8]]; - - NSMutableArray *generalDesc_descArrayPLLO = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPLLO addObject: [NSNumber numberWithInt:6]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[1-8]\\d{6,7}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:generalDesc_descArrayPLLO withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *fixedLine_descArrayPL = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:7]]; - - NSMutableArray *fixedLine_descArrayPLLO = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPLLO addObject: [NSNumber numberWithInt:6]]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:2[3-6]|[34][5-7]|5[236]|6[2-46]|7[246]|8[2-4])\\d{5}" withPossibleNumberPattern:nil withPossibleLength:fixedLine_descArrayPL withPossibleLengthLocalOnly:fixedLine_descArrayPLLO withExample:@"2345678" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *mobile_descArrayPL = [[NSMutableArray alloc] init]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:8]]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:1[67]|77)\\d{6}" withPossibleNumberPattern:nil withPossibleLength:mobile_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"17123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"BT"; - self.countryCode = [NSNumber numberWithInteger:975]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = nil; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = nil; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - [numberFormats0_patternArray addObject:@"1|77"]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{2})(\\d{2})(\\d{2})(\\d{2})" withFormat:@"$1 $2 $3 $4" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - - NSMutableArray *numberFormats1_patternArray = [[NSMutableArray alloc] init]; - [numberFormats1_patternArray addObject:@"[2-68]|7[246]"]; - NBNumberFormat *numberFormats1 = [[NBNumberFormat alloc] initWithPattern:@"([2-8])(\\d{3})(\\d{3})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats1_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats1]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataDK -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:8]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[2-9]\\d{7}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:[2-7]\\d|8[126-9]|9[1-36-9])\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"32123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:[2-7]\\d|8[126-9]|9[1-36-9])\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"20123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"80\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"80123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"90\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"90123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"DK"; - self.countryCode = [NSNumber numberWithInteger:45]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = nil; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = nil; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = YES; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{2})(\\d{2})(\\d{2})(\\d{2})" withFormat:@"$1 $2 $3 $4" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataEG -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:5]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:8]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:9]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:10]]; - - NSMutableArray *generalDesc_descArrayPLLO = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPLLO addObject: [NSNumber numberWithInt:7]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"1\\d{4,9}|[2456]\\d{8}|3\\d{7}|[89]\\d{8,9}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:generalDesc_descArrayPLLO withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *fixedLine_descArrayPL = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:5]]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:8]]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:9]]; - - NSMutableArray *fixedLine_descArrayPLLO = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPLLO addObject: [NSNumber numberWithInt:7]]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:1(?:3[23]\\d|5(?:[23]|9\\d))|2[2-4]\\d{2}|3\\d{2}|4(?:0[2-5]|[578][23]|64)\\d|5(?:0[2-7]|[57][23])\\d|6[24-689]3\\d|8(?:2[2-57]|4[26]|6[237]|8[2-4])\\d|9(?:2[27]|3[24]|52|6[2356]|7[2-4])\\d)\\d{5}|1[69]\\d{3}" withPossibleNumberPattern:nil withPossibleLength:fixedLine_descArrayPL withPossibleLengthLocalOnly:fixedLine_descArrayPLLO withExample:@"234567890" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *mobile_descArrayPL = [[NSMutableArray alloc] init]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:10]]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"1(?:0[0-269]|1[0-245]|2[0-278])\\d{7}" withPossibleNumberPattern:nil withPossibleLength:mobile_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"1001234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:10]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"800\\d{7}" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"8001234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:10]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"900\\d{7}" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"9001234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"EG"; - self.countryCode = [NSNumber numberWithInteger:20]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = @"0"; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = @"0"; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - [numberFormats0_patternArray addObject:@"[23]"]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(\\d)(\\d{7,8})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - - NSMutableArray *numberFormats1_patternArray = [[NSMutableArray alloc] init]; - [numberFormats1_patternArray addObject:@"1[012]|[89]00"]; - NBNumberFormat *numberFormats1 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{3})(\\d{3})(\\d{4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats1_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats1]; - - NSMutableArray *numberFormats2_patternArray = [[NSMutableArray alloc] init]; - [numberFormats2_patternArray addObject:@"1[35]|[4-6]|[89][2-9]"]; - NBNumberFormat *numberFormats2 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{2})(\\d{6,7})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats2_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats2]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataAZ -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:9]]; - - NSMutableArray *generalDesc_descArrayPLLO = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPLLO addObject: [NSNumber numberWithInt:7]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[1-9]\\d{8}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:generalDesc_descArrayPLLO withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *fixedLine_descArrayPLLO = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPLLO addObject: [NSNumber numberWithInt:7]]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:1[28]\\d{3}|2(?:02|1[24]|2[2-4]|33|[45]2|6[23])\\d{2}|365(?:[0-46-9]\\d|5[0-35-9]))\\d{4}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:fixedLine_descArrayPLLO withExample:@"123123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:36554|(?:4[04]|5[015]|60|7[07])\\d{3})\\d{4}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"401234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"88\\d{7}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"881234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"900200\\d{3}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"900200123" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"AZ"; - self.countryCode = [NSNumber numberWithInteger:994]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = @"0"; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = @"0"; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - [numberFormats0_patternArray addObject:@"(?:1[28]|2(?:[45]2|[0-36])|365)"]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{2})(\\d{3})(\\d{2})(\\d{2})" withFormat:@"$1 $2 $3 $4" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:@"(0$1)" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - - NSMutableArray *numberFormats1_patternArray = [[NSMutableArray alloc] init]; - [numberFormats1_patternArray addObject:@"[4-8]"]; - NBNumberFormat *numberFormats1 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{2})(\\d{3})(\\d{2})(\\d{2})" withFormat:@"$1 $2 $3 $4" withLeadingDigitsPatterns:numberFormats1_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats1]; - - NSMutableArray *numberFormats2_patternArray = [[NSMutableArray alloc] init]; - [numberFormats2_patternArray addObject:@"9"]; - NBNumberFormat *numberFormats2 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{3})(\\d{2})(\\d{2})(\\d{2})" withFormat:@"$1 $2 $3 $4" withLeadingDigitsPatterns:numberFormats2_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats2]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataEH -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[5-9]\\d{8}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"528[89]\\d{5}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"528812345" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:6(?:[0-79]\\d|8[0-247-9])|7(?:[07][07]|6[12]))\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"650123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"80\\d{7}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"801234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"89\\d{7}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"891234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"5924[01]\\d{4}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"592401234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"EH"; - self.countryCode = [NSNumber numberWithInteger:212]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = @"0"; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = @"0"; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = @"528[89]"; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataDM -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:10]]; - - NSMutableArray *generalDesc_descArrayPLLO = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPLLO addObject: [NSNumber numberWithInt:7]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[57-9]\\d{9}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:generalDesc_descArrayPLLO withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *fixedLine_descArrayPLLO = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPLLO addObject: [NSNumber numberWithInt:7]]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"767(?:2(?:55|66)|4(?:2[01]|4[0-25-9])|50[0-4]|70[1-3])\\d{4}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:fixedLine_descArrayPLLO withExample:@"7674201234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *mobile_descArrayPLLO = [[NSMutableArray alloc] init]; - [mobile_descArrayPLLO addObject: [NSNumber numberWithInt:7]]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"767(?:2(?:[234689]5|7[5-7])|31[5-7]|61[2-7])\\d{4}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:mobile_descArrayPLLO withExample:@"7672251234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"8(?:00|33|44|55|66|77|88)[2-9]\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"8002123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"900[2-9]\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"9002123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"5(?:00|22|33|44|66|77|88)[2-9]\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"5002345678" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"DM"; - self.countryCode = [NSNumber numberWithInteger:1]; - self.internationalPrefix = @"011"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = @"1"; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = @"1"; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = @"767"; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataCR -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:8]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:10]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[24-9]\\d{7,9}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *fixedLine_descArrayPL = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:8]]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"2[0-24-7]\\d{6}" withPossibleNumberPattern:nil withPossibleLength:fixedLine_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"22123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *mobile_descArrayPL = [[NSMutableArray alloc] init]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:8]]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"5(?:0[01]|7[0-3])\\d{5}|6(?:[0-4]\\d{3}|500[01])\\d{3}|(?:7[0-3]|8[3-9])\\d{6}" withPossibleNumberPattern:nil withPossibleLength:mobile_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"83123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:10]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"800\\d{7}" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"8001234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:10]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"90[059]\\d{7}" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"9001234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:8]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"210[0-6]\\d{4}|4\\d{7}|5100\\d{4}" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"40001234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"CR"; - self.countryCode = [NSNumber numberWithInteger:506]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = nil; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = @"(19(?:0[012468]|1[09]|20|66|77|99))"; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - [numberFormats0_patternArray addObject:@"[24-7]|8[3-9]"]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{4})(\\d{4})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:@"$CC $1"]; - [numberFormats_FormatArray addObject:numberFormats0]; - - NSMutableArray *numberFormats1_patternArray = [[NSMutableArray alloc] init]; - [numberFormats1_patternArray addObject:@"[89]0"]; - NBNumberFormat *numberFormats1 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{3})(\\d{3})(\\d{4})" withFormat:@"$1-$2-$3" withLeadingDigitsPatterns:numberFormats1_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:@"$CC $1"]; - [numberFormats_FormatArray addObject:numberFormats1]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataBW -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:7]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:8]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[2-79]\\d{6,7}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *fixedLine_descArrayPL = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:7]]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:2(?:4[0-48]|6[0-24]|9[0578])|3(?:1[0-35-9]|55|[69]\\d|7[01])|4(?:6[03]|7[1267]|9[0-5])|5(?:3[0389]|4[0489]|7[1-47]|88|9[0-49])|6(?:2[1-35]|5[149]|8[067]))\\d{4}" withPossibleNumberPattern:nil withPossibleLength:fixedLine_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"2401234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *mobile_descArrayPL = [[NSMutableArray alloc] init]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:8]]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"7(?:[1-6]\\d|7[014-8])\\d{5}" withPossibleNumberPattern:nil withPossibleLength:mobile_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"71123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:7]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"90\\d{5}" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"9012345" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:8]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"79[12][01]\\d{4}" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"79101234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"BW"; - self.countryCode = [NSNumber numberWithInteger:267]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = nil; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = nil; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - [numberFormats0_patternArray addObject:@"[2-6]"]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{3})(\\d{4})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - - NSMutableArray *numberFormats1_patternArray = [[NSMutableArray alloc] init]; - [numberFormats1_patternArray addObject:@"7"]; - NBNumberFormat *numberFormats1 = [[NBNumberFormat alloc] initWithPattern:@"(7\\d)(\\d{3})(\\d{3})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats1_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats1]; - - NSMutableArray *numberFormats2_patternArray = [[NSMutableArray alloc] init]; - [numberFormats2_patternArray addObject:@"9"]; - NBNumberFormat *numberFormats2 = [[NBNumberFormat alloc] initWithPattern:@"(90)(\\d{5})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats2_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats2]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataGA -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:7]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:8]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"0?\\d{7}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *fixedLine_descArrayPL = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:8]]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"01\\d{6}" withPossibleNumberPattern:nil withPossibleLength:fixedLine_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"01441234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"0?[2-7]\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"06031234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"GA"; - self.countryCode = [NSNumber numberWithInteger:241]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = nil; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = nil; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - [numberFormats0_patternArray addObject:@"[2-7]"]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(\\d)(\\d{2})(\\d{2})(\\d{2})" withFormat:@"$1 $2 $3 $4" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - - NSMutableArray *numberFormats1_patternArray = [[NSMutableArray alloc] init]; - [numberFormats1_patternArray addObject:@"0"]; - NBNumberFormat *numberFormats1 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{2})(\\d{2})(\\d{2})(\\d{2})" withFormat:@"$1 $2 $3 $4" withLeadingDigitsPatterns:numberFormats1_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats1]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = YES; - } - return self; -} -@end - -@implementation NBPhoneMetadataDO -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:10]]; - - NSMutableArray *generalDesc_descArrayPLLO = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPLLO addObject: [NSNumber numberWithInt:7]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[589]\\d{9}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:generalDesc_descArrayPLLO withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *fixedLine_descArrayPLLO = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPLLO addObject: [NSNumber numberWithInt:7]]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"8(?:[04]9[2-9]\\d{6}|29(?:2(?:[0-59]\\d|6[04-9]|7[0-27]|8[0237-9])|3(?:[0-35-9]\\d|4[7-9])|[45]\\d{2}|6(?:[0-27-9]\\d|[3-5][1-9]|6[0135-8])|7(?:0[013-9]|[1-37]\\d|4[1-35689]|5[1-4689]|6[1-57-9]|8[1-79]|9[1-8])|8(?:0[146-9]|1[0-48]|[248]\\d|3[1-79]|5[01589]|6[013-68]|7[124-8]|9[0-8])|9(?:[0-24]\\d|3[02-46-9]|5[0-79]|60|7[0169]|8[57-9]|9[02-9]))\\d{4})" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:fixedLine_descArrayPLLO withExample:@"8092345678" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *mobile_descArrayPLLO = [[NSMutableArray alloc] init]; - [mobile_descArrayPLLO addObject: [NSNumber numberWithInt:7]]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"8[024]9[2-9]\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:mobile_descArrayPLLO withExample:@"8092345678" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"8(?:00|33|44|55|66|77|88)[2-9]\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"8002123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"900[2-9]\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"9002123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"5(?:00|22|33|44|66|77|88)[2-9]\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"5002345678" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"DO"; - self.countryCode = [NSNumber numberWithInteger:1]; - self.internationalPrefix = @"011"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = @"1"; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = @"1"; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = @"8[024]9"; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataBY -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:6]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:7]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:8]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:9]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:10]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:11]]; - - NSMutableArray *generalDesc_descArrayPLLO = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPLLO addObject: [NSNumber numberWithInt:5]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[1-4]\\d{8}|800\\d{3,7}|[89]\\d{9,10}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:generalDesc_descArrayPLLO withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *fixedLine_descArrayPL = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:9]]; - - NSMutableArray *fixedLine_descArrayPLLO = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPLLO addObject: [NSNumber numberWithInt:5]]; - [fixedLine_descArrayPLLO addObject: [NSNumber numberWithInt:6]]; - [fixedLine_descArrayPLLO addObject: [NSNumber numberWithInt:7]]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:1(?:5(?:1[1-5]|[24]\\d|6[2-4]|9[1-7])|6(?:[235]\\d|4[1-7])|7\\d{2})|2(?:1(?:[246]\\d|3[0-35-9]|5[1-9])|2(?:[235]\\d|4[0-8])|3(?:[26]\\d|3[02-79]|4[024-7]|5[03-7])))\\d{5}" withPossibleNumberPattern:nil withPossibleLength:fixedLine_descArrayPL withPossibleLengthLocalOnly:fixedLine_descArrayPLLO withExample:@"152450911" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *mobile_descArrayPL = [[NSMutableArray alloc] init]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:2(?:5[5679]|9[1-9])|33\\d|44\\d)\\d{6}" withPossibleNumberPattern:nil withPossibleLength:mobile_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"294911911" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"8(?:0[13]|20\\d)\\d{7}|800\\d{3,7}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"8011234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:10]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:810|902)\\d{7}" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"9021234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"249\\d{6}" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"249123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"8(?:0[13]|10|20\\d)\\d{7}|800\\d{3,7}|902\\d{7}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"82012345678" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"BY"; - self.countryCode = [NSNumber numberWithInteger:375]; - self.internationalPrefix = @"810"; - self.preferredInternationalPrefix = @"8~10"; - self.nationalPrefix = @"8"; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = @"8?0?"; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - [numberFormats0_patternArray addObject:@"17[0-3589]|2[4-9]|[34]"]; - [numberFormats0_patternArray addObject:@"17(?:[02358]|1[0-2]|9[0189])|2[4-9]|[34]"]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{2})(\\d{3})(\\d{2})(\\d{2})" withFormat:@"$1 $2-$3-$4" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:@"8 0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - - NSMutableArray *numberFormats1_patternArray = [[NSMutableArray alloc] init]; - [numberFormats1_patternArray addObject:@"1(?:5[24]|6[235]|7[467])|2(?:1[246]|2[25]|3[26])"]; - [numberFormats1_patternArray addObject:@"1(?:5[24]|6(?:2|3[04-9]|5[0346-9])|7(?:[46]|7[37-9]))|2(?:1[246]|2[25]|3[26])"]; - NBNumberFormat *numberFormats1 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{3})(\\d{2})(\\d{2})(\\d{2})" withFormat:@"$1 $2-$3-$4" withLeadingDigitsPatterns:numberFormats1_patternArray withNationalPrefixFormattingRule:@"8 0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats1]; - - NSMutableArray *numberFormats2_patternArray = [[NSMutableArray alloc] init]; - [numberFormats2_patternArray addObject:@"1(?:5[169]|6[3-5]|7[179])|2(?:1[35]|2[34]|3[3-5])"]; - [numberFormats2_patternArray addObject:@"1(?:5[169]|6(?:3[1-3]|4|5[125])|7(?:1[3-9]|7[0-24-6]|9[2-7]))|2(?:1[35]|2[34]|3[3-5])"]; - NBNumberFormat *numberFormats2 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{4})(\\d{2})(\\d{3})" withFormat:@"$1 $2-$3" withLeadingDigitsPatterns:numberFormats2_patternArray withNationalPrefixFormattingRule:@"8 0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats2]; - - NSMutableArray *numberFormats3_patternArray = [[NSMutableArray alloc] init]; - [numberFormats3_patternArray addObject:@"8[01]|9"]; - NBNumberFormat *numberFormats3 = [[NBNumberFormat alloc] initWithPattern:@"([89]\\d{2})(\\d{3})(\\d{4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats3_patternArray withNationalPrefixFormattingRule:@"8 $1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats3]; - - NSMutableArray *numberFormats4_patternArray = [[NSMutableArray alloc] init]; - [numberFormats4_patternArray addObject:@"82"]; - NBNumberFormat *numberFormats4 = [[NBNumberFormat alloc] initWithPattern:@"(82\\d)(\\d{4})(\\d{4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats4_patternArray withNationalPrefixFormattingRule:@"8 $1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats4]; - - NSMutableArray *numberFormats5_patternArray = [[NSMutableArray alloc] init]; - [numberFormats5_patternArray addObject:@"800"]; - NBNumberFormat *numberFormats5 = [[NBNumberFormat alloc] initWithPattern:@"(800)(\\d{3})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats5_patternArray withNationalPrefixFormattingRule:@"8 $1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats5]; - - NSMutableArray *numberFormats6_patternArray = [[NSMutableArray alloc] init]; - [numberFormats6_patternArray addObject:@"800"]; - NBNumberFormat *numberFormats6 = [[NBNumberFormat alloc] initWithPattern:@"(800)(\\d{2})(\\d{2,4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats6_patternArray withNationalPrefixFormattingRule:@"8 $1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats6]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataGB -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:7]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:9]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:10]]; - - NSMutableArray *generalDesc_descArrayPLLO = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPLLO addObject: [NSNumber numberWithInt:4]]; - [generalDesc_descArrayPLLO addObject: [NSNumber numberWithInt:5]]; - [generalDesc_descArrayPLLO addObject: [NSNumber numberWithInt:6]]; - [generalDesc_descArrayPLLO addObject: [NSNumber numberWithInt:8]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"\\d{7,10}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:generalDesc_descArrayPLLO withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *fixedLine_descArrayPL = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:9]]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:10]]; - - NSMutableArray *fixedLine_descArrayPLLO = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPLLO addObject: [NSNumber numberWithInt:4]]; - [fixedLine_descArrayPLLO addObject: [NSNumber numberWithInt:5]]; - [fixedLine_descArrayPLLO addObject: [NSNumber numberWithInt:6]]; - [fixedLine_descArrayPLLO addObject: [NSNumber numberWithInt:7]]; - [fixedLine_descArrayPLLO addObject: [NSNumber numberWithInt:8]]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"2(?:0[01378]|3[0189]|4[017]|8[0-46-9]|9[0-2])\\d{7}|1(?:(?:1(?:3[0-48]|[46][0-4]|5[0-26-9]|[78][0-49])|21[0-7]|31[0-8]|[4-69]1\\d))\\d{6}|1(?:2(?:0[024-9]|2[3-9]|3[3-79]|4[1-689]|[58][02-9]|6[0-47-9]|7[013-9]|9\\d)|3(?:0\\d|[25][02-9]|3[02-579]|[468][0-46-9]|7[1-35-79]|9[2-578])|4(?:0[03-9]|[28][02-57-9]|[37]\\d|4[02-69]|5[0-8]|[69][0-79])|5(?:0[1-35-9]|2[024-9]|3[015689]|4[02-9]|5[03-9]|6\\d|7[0-35-9]|8[0-468]|9[0-57-9])|6(?:0[034689]|2[0-35689]|[38][013-9]|4[1-467]|5[0-69]|6[13-9]|7[0-8]|9[0124578])|7(?:0[0246-9]|2\\d|3[0236-8]|4[03-9]|5[0-46-9]|6[013-9]|7[0-35-9]|8[024-9]|9[02-9])|8(?:0[35-9]|2[1-57-9]|3[02-578]|4[0-578]|5[124-9]|6[2-69]|7\\d|8[02-9]|9[02569])|9(?:0[02-589]|2[02-689]|3[1-57-9]|4[2-9]|5[0-579]|6[2-47-9]|7[0-24578]|8\\d|9[2-57]))\\d{6}|1(?:2(?:0(?:46[1-4]|87[2-9])|545[1-79]|76(?:2\\d|3[1-8]|6[1-6])|9(?:7(?:2[0-4]|3[2-5])|8(?:2[2-8]|7[0-47-9]|8[345])))|3(?:638[2-5]|647[23]|8(?:47[04-9]|64[0157-9]))|4(?:044[1-7]|20(?:2[23]|8\\d)|6(?:0(?:30|5[2-57]|6[1-8]|7[2-8])|140)|8(?:052|87[123]))|5(?:24(?:3[2-79]|6\\d)|276\\d|6(?:26[06-9]|686))|6(?:06(?:4\\d|7[4-79])|295[567]|35[34]\\d|47(?:24|61)|59(?:5[08]|6[67]|74)|955[0-4])|7(?:26(?:6[13-9]|7[0-7])|442\\d|50(?:2[0-3]|[3-68]2|76))|8(?:27[56]\\d|37(?:5[2-5]|8[239])|84(?:3[2-58]))|9(?:0(?:0(?:6[1-8]|85)|52\\d)|3583|4(?:66[1-8]|9(?:2[01]|81))|63(?:23|3[1-4])|9561))\\d{3}|176888[2-46-8]\\d{2}|16977[23]\\d{3}" withPossibleNumberPattern:nil withPossibleLength:fixedLine_descArrayPL withPossibleLengthLocalOnly:fixedLine_descArrayPLLO withExample:@"1212345678" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *mobile_descArrayPL = [[NSMutableArray alloc] init]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:10]]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"7(?:[1-3]\\d{3}|4(?:[0-46-9]\\d{2}|5(?:[0-689]\\d|7[0-57-9]))|5(?:0[0-8]|[13-9]\\d|2[0-35-9])\\d|7(?:0(?:0[01]|[1-9]\\d)|[1-7]\\d{2}|8[02-9]\\d|9[0-689]\\d)|8(?:[014-9]\\d|[23][0-8])\\d|9(?:[024-9]\\d{2}|1(?:[02-9]\\d|1[028])|3[0-689]\\d))\\d{5}" withPossibleNumberPattern:nil withPossibleLength:mobile_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"7400123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"80(?:0(?:1111|\\d{6,7})|8\\d{7})|500\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"8001234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:10]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:87[123]|9(?:[01]\\d|8[2349]))\\d{7}" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"9012345678" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:7]]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:10]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"8(?:4(?:5464\\d|[2-5]\\d{7})|70\\d{7})" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"8431234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:10]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"70\\d{8}" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"7012345678" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:10]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"56\\d{8}" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"5612345678" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:10]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"76(?:0[012]\\d|2(?:[356]\\d|4[013-9])|4[0134]\\d|5[49]\\d|6[0-369]\\d|77\\d|81\\d|9[39]\\d)\\d{5}" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"7640123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:10]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:3[0347]|55)\\d{8}" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"5512345678" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"GB"; - self.countryCode = [NSNumber numberWithInteger:44]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = @"0"; - self.preferredExtnPrefix = @" x"; - self.nationalPrefixForParsing = @"0"; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - [numberFormats0_patternArray addObject:@"7(?:[1-5789]|62)"]; - [numberFormats0_patternArray addObject:@"7(?:[1-5789]|624)"]; - [numberFormats0_patternArray addObject:@"7(?:[1-5789]|6242)"]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(7\\d{3})(\\d{6})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - - NSMutableArray *numberFormats1_patternArray = [[NSMutableArray alloc] init]; - [numberFormats1_patternArray addObject:@"2|5[56]|7[06]"]; - NBNumberFormat *numberFormats1 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{2})(\\d{4})(\\d{4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats1_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats1]; - - NSMutableArray *numberFormats2_patternArray = [[NSMutableArray alloc] init]; - [numberFormats2_patternArray addObject:@"1(?:1|\\d1)|3|9[018]"]; - NBNumberFormat *numberFormats2 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{3})(\\d{3})(\\d{4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats2_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats2]; - - NSMutableArray *numberFormats3_patternArray = [[NSMutableArray alloc] init]; - [numberFormats3_patternArray addObject:@"1(?:38|5[23]|69|76|94)"]; - [numberFormats3_patternArray addObject:@"1(?:387|5(?:24|39)|697|768|946)"]; - [numberFormats3_patternArray addObject:@"1(?:3873|5(?:242|39[456])|697[347]|768[347]|9467)"]; - NBNumberFormat *numberFormats3 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{5})(\\d{4,5})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats3_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats3]; - - NSMutableArray *numberFormats4_patternArray = [[NSMutableArray alloc] init]; - [numberFormats4_patternArray addObject:@"1"]; - NBNumberFormat *numberFormats4 = [[NBNumberFormat alloc] initWithPattern:@"(1\\d{3})(\\d{5,6})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats4_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats4]; - - NSMutableArray *numberFormats5_patternArray = [[NSMutableArray alloc] init]; - [numberFormats5_patternArray addObject:@"800"]; - [numberFormats5_patternArray addObject:@"8001"]; - [numberFormats5_patternArray addObject:@"80011"]; - [numberFormats5_patternArray addObject:@"800111"]; - [numberFormats5_patternArray addObject:@"8001111"]; - NBNumberFormat *numberFormats5 = [[NBNumberFormat alloc] initWithPattern:@"(800)(\\d{4})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats5_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats5]; - - NSMutableArray *numberFormats6_patternArray = [[NSMutableArray alloc] init]; - [numberFormats6_patternArray addObject:@"845"]; - [numberFormats6_patternArray addObject:@"8454"]; - [numberFormats6_patternArray addObject:@"84546"]; - [numberFormats6_patternArray addObject:@"845464"]; - NBNumberFormat *numberFormats6 = [[NBNumberFormat alloc] initWithPattern:@"(845)(46)(4\\d)" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats6_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats6]; - - NSMutableArray *numberFormats7_patternArray = [[NSMutableArray alloc] init]; - [numberFormats7_patternArray addObject:@"8(?:4[2-5]|7[0-3])"]; - NBNumberFormat *numberFormats7 = [[NBNumberFormat alloc] initWithPattern:@"(8\\d{2})(\\d{3})(\\d{4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats7_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats7]; - - NSMutableArray *numberFormats8_patternArray = [[NSMutableArray alloc] init]; - [numberFormats8_patternArray addObject:@"80"]; - NBNumberFormat *numberFormats8 = [[NBNumberFormat alloc] initWithPattern:@"(80\\d)(\\d{3})(\\d{4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats8_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats8]; - - NSMutableArray *numberFormats9_patternArray = [[NSMutableArray alloc] init]; - [numberFormats9_patternArray addObject:@"[58]00"]; - NBNumberFormat *numberFormats9 = [[NBNumberFormat alloc] initWithPattern:@"([58]00)(\\d{6})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats9_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats9]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = YES; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataCU -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:6]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:7]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:8]]; - - NSMutableArray *generalDesc_descArrayPLLO = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPLLO addObject: [NSNumber numberWithInt:4]]; - [generalDesc_descArrayPLLO addObject: [NSNumber numberWithInt:5]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[2-57]\\d{5,7}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:generalDesc_descArrayPLLO withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *fixedLine_descArrayPLLO = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPLLO addObject: [NSNumber numberWithInt:4]]; - [fixedLine_descArrayPLLO addObject: [NSNumber numberWithInt:5]]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"2[1-4]\\d{5,6}|3(?:1\\d{6}|[23]\\d{4,6})|4(?:[125]\\d{5,6}|[36]\\d{6}|[78]\\d{4,6})|7\\d{6,7}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:fixedLine_descArrayPLLO withExample:@"71234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *mobile_descArrayPL = [[NSMutableArray alloc] init]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:8]]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"5\\d{7}" withPossibleNumberPattern:nil withPossibleLength:mobile_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"51234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"CU"; - self.countryCode = [NSNumber numberWithInteger:53]; - self.internationalPrefix = @"119"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = @"0"; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = @"0"; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - [numberFormats0_patternArray addObject:@"7"]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(\\d)(\\d{6,7})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:@"(0$1)" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - - NSMutableArray *numberFormats1_patternArray = [[NSMutableArray alloc] init]; - [numberFormats1_patternArray addObject:@"[2-4]"]; - NBNumberFormat *numberFormats1 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{2})(\\d{4,6})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats1_patternArray withNationalPrefixFormattingRule:@"(0$1)" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats1]; - - NSMutableArray *numberFormats2_patternArray = [[NSMutableArray alloc] init]; - [numberFormats2_patternArray addObject:@"5"]; - NBNumberFormat *numberFormats2 = [[NBNumberFormat alloc] initWithPattern:@"(\\d)(\\d{7})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats2_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats2]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataBZ -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:7]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:11]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[2-8]\\d{6}|0\\d{10}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *fixedLine_descArrayPL = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:7]]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:2(?:[02]\\d|36)|[3-58][02]\\d|7(?:[02]\\d|32))\\d{4}" withPossibleNumberPattern:nil withPossibleLength:fixedLine_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"2221234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *mobile_descArrayPL = [[NSMutableArray alloc] init]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:7]]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"6[0-35-7]\\d{5}" withPossibleNumberPattern:nil withPossibleLength:mobile_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"6221234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:11]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"0800\\d{7}" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"08001234123" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"BZ"; - self.countryCode = [NSNumber numberWithInteger:501]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = nil; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = nil; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - [numberFormats0_patternArray addObject:@"[2-8]"]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{3})(\\d{4})" withFormat:@"$1-$2" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - - NSMutableArray *numberFormats1_patternArray = [[NSMutableArray alloc] init]; - [numberFormats1_patternArray addObject:@"0"]; - NBNumberFormat *numberFormats1 = [[NBNumberFormat alloc] initWithPattern:@"(0)(800)(\\d{4})(\\d{3})" withFormat:@"$1-$2-$3-$4" withLeadingDigitsPatterns:numberFormats1_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats1]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = YES; - } - return self; -} -@end - -@implementation NBPhoneMetadataCV -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:7]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[259]\\d{6}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"2(?:2[1-7]|3[0-8]|4[12]|5[1256]|6\\d|7[1-3]|8[1-5])\\d{4}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"2211234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:9\\d|59)\\d{5}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"9911234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"CV"; - self.countryCode = [NSNumber numberWithInteger:238]; - self.internationalPrefix = @"0"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = nil; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = nil; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{3})(\\d{2})(\\d{2})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadata808 -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:8]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"\\d{8}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *fixedLine_descArrayPL = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:fixedLine_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *mobile_descArrayPL = [[NSMutableArray alloc] init]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:mobile_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"\\d{8}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"12345678" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"001"; - self.countryCode = [NSNumber numberWithInteger:808]; - self.internationalPrefix = nil; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = nil; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = nil; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = YES; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{4})(\\d{4})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = YES; - } - return self; -} -@end - -@implementation NBPhoneMetadataGD -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:10]]; - - NSMutableArray *generalDesc_descArrayPLLO = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPLLO addObject: [NSNumber numberWithInt:7]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[4589]\\d{9}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:generalDesc_descArrayPLLO withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *fixedLine_descArrayPLLO = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPLLO addObject: [NSNumber numberWithInt:7]]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"473(?:2(?:3[0-2]|69)|3(?:2[89]|86)|4(?:[06]8|3[5-9]|4[0-49]|5[5-79]|68|73|90)|63[68]|7(?:58|84)|800|938)\\d{4}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:fixedLine_descArrayPLLO withExample:@"4732691234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *mobile_descArrayPLLO = [[NSMutableArray alloc] init]; - [mobile_descArrayPLLO addObject: [NSNumber numberWithInt:7]]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"473(?:4(?:0[2-79]|1[04-9]|20|58)|5(?:2[01]|3[3-8])|901)\\d{4}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:mobile_descArrayPLLO withExample:@"4734031234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"8(?:00|33|44|55|66|77|88)[2-9]\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"8002123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"900[2-9]\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"9002123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"5(?:00|22|33|44|66|77|88)[2-9]\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"5002345678" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"GD"; - self.countryCode = [NSNumber numberWithInteger:1]; - self.internationalPrefix = @"011"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = @"1"; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = @"1"; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = @"473"; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataFI -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:5]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:6]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:7]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:8]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:9]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:10]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:11]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:12]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"1\\d{4,11}|[2-9]\\d{4,10}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"1(?:[3569][1-8]\\d{3,9}|[47]\\d{5,10})|2[1-8]\\d{3,9}|3(?:[1-8]\\d{3,9}|9\\d{4,8})|[5689][1-8]\\d{3,9}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"1312345678" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *mobile_descArrayPL = [[NSMutableArray alloc] init]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:6]]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:7]]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:8]]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:9]]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:10]]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:11]]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"4\\d{5,10}|50\\d{4,8}" withPossibleNumberPattern:nil withPossibleLength:mobile_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"412345678" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:7]]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:8]]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:9]]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:10]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"800\\d{4,7}" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"8001234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:8]]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[67]00\\d{5,6}" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"600123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:5]]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:6]]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:7]]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:8]]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:9]]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:10]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[13]0\\d{4,8}|2(?:0(?:[016-8]\\d{3,7}|[2-59]\\d{2,7})|9\\d{4,8})|60(?:[12]\\d{5,6}|6\\d{7})|7(?:1\\d{7}|3\\d{8}|5[03-9]\\d{2,7})" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"10112345" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:5]]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:6]]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:7]]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:8]]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:9]]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:10]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[13]00\\d{3,7}|2(?:0(?:0\\d{3,7}|2[023]\\d{1,6}|9[89]\\d{1,6}))|60(?:[12]\\d{5,6}|6\\d{7})|7(?:1\\d{7}|3\\d{8}|5[03-9]\\d{2,7})" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"100123" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"FI"; - self.countryCode = [NSNumber numberWithInteger:358]; - self.internationalPrefix = @"00|99(?:[02469]|5(?:11|33|5[59]|88|9[09]))"; - self.preferredInternationalPrefix = @"00"; - self.nationalPrefix = @"0"; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = @"0"; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - [numberFormats0_patternArray addObject:@"(?:[1-3]00|[6-8]0)"]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{3})(\\d{3,7})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - - NSMutableArray *numberFormats1_patternArray = [[NSMutableArray alloc] init]; - [numberFormats1_patternArray addObject:@"116"]; - NBNumberFormat *numberFormats1 = [[NBNumberFormat alloc] initWithPattern:@"(116\\d{3})" withFormat:@"$1" withLeadingDigitsPatterns:numberFormats1_patternArray withNationalPrefixFormattingRule:@"$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats1]; - - NSMutableArray *numberFormats2_patternArray = [[NSMutableArray alloc] init]; - [numberFormats2_patternArray addObject:@"[14]|2[09]|50|7[135]"]; - NBNumberFormat *numberFormats2 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{2})(\\d{4,10})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats2_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats2]; - - NSMutableArray *numberFormats3_patternArray = [[NSMutableArray alloc] init]; - [numberFormats3_patternArray addObject:@"[25689][1-8]|3"]; - NBNumberFormat *numberFormats3 = [[NBNumberFormat alloc] initWithPattern:@"(\\d)(\\d{4,11})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats3_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats3]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = YES; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataCW -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:7]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:8]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[169]\\d{6,7}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *fixedLine_descArrayPL = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:8]]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"9(?:[48]\\d{2}|50\\d|7(?:2[0-24]|[34]\\d|6[35-7]|77|8[7-9]))\\d{4}" withPossibleNumberPattern:nil withPossibleLength:fixedLine_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"94151234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *mobile_descArrayPL = [[NSMutableArray alloc] init]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:8]]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"9(?:5(?:[12467]\\d|3[01])|6(?:[15-9]\\d|3[01]))\\d{4}" withPossibleNumberPattern:nil withPossibleLength:mobile_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"95181234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:7]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"60[0-2]\\d{4}" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"6001234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:8]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"955\\d{5}" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"95581234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"CW"; - self.countryCode = [NSNumber numberWithInteger:599]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = nil; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = nil; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - [numberFormats0_patternArray addObject:@"[13-7]"]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{3})(\\d{4})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - - NSMutableArray *numberFormats1_patternArray = [[NSMutableArray alloc] init]; - [numberFormats1_patternArray addObject:@"9"]; - NBNumberFormat *numberFormats1 = [[NBNumberFormat alloc] initWithPattern:@"(9)(\\d{3})(\\d{4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats1_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats1]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = YES; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataGE -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:9]]; - - NSMutableArray *generalDesc_descArrayPLLO = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPLLO addObject: [NSNumber numberWithInt:6]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[34578]\\d{8}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:generalDesc_descArrayPLLO withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *fixedLine_descArrayPLLO = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPLLO addObject: [NSNumber numberWithInt:6]]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:3(?:[256]\\d|4[124-9]|7[0-4])|4(?:1\\d|2[2-7]|3[1-79]|4[2-8]|7[239]|9[1-7]))\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:fixedLine_descArrayPLLO withExample:@"322123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"5(?:14|5[01578]|68|7[0147-9]|9[0-35-9])\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"555123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"800\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"800123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"706\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"706123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"706\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"706123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"GE"; - self.countryCode = [NSNumber numberWithInteger:995]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = @"0"; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = @"0"; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - [numberFormats0_patternArray addObject:@"[348]"]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{3})(\\d{2})(\\d{2})(\\d{2})" withFormat:@"$1 $2 $3 $4" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - - NSMutableArray *numberFormats1_patternArray = [[NSMutableArray alloc] init]; - [numberFormats1_patternArray addObject:@"7"]; - NBNumberFormat *numberFormats1 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{3})(\\d{3})(\\d{3})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats1_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats1]; - - NSMutableArray *numberFormats2_patternArray = [[NSMutableArray alloc] init]; - [numberFormats2_patternArray addObject:@"5"]; - NBNumberFormat *numberFormats2 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{3})(\\d{2})(\\d{2})(\\d{2})" withFormat:@"$1 $2 $3 $4" withLeadingDigitsPatterns:numberFormats2_patternArray withNationalPrefixFormattingRule:@"$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats2]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataFJ -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:7]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:11]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[35-9]\\d{6}|0\\d{10}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *fixedLine_descArrayPL = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:7]]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:3[0-5]|6[25-7]|8[58])\\d{5}" withPossibleNumberPattern:nil withPossibleLength:fixedLine_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"3212345" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *mobile_descArrayPL = [[NSMutableArray alloc] init]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:7]]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:5[018]|[79]\\d|8[034679])\\d{5}" withPossibleNumberPattern:nil withPossibleLength:mobile_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"7012345" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:11]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"0800\\d{7}" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"08001234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"FJ"; - self.countryCode = [NSNumber numberWithInteger:679]; - self.internationalPrefix = @"0(?:0|52)"; - self.preferredInternationalPrefix = @"00"; - self.nationalPrefix = nil; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = nil; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - [numberFormats0_patternArray addObject:@"[35-9]"]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{3})(\\d{4})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - - NSMutableArray *numberFormats1_patternArray = [[NSMutableArray alloc] init]; - [numberFormats1_patternArray addObject:@"0"]; - NBNumberFormat *numberFormats1 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{4})(\\d{3})(\\d{4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats1_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats1]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = YES; - } - return self; -} -@end - -@implementation NBPhoneMetadataCX -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:6]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:7]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:8]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:9]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:10]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[1458]\\d{5,9}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *fixedLine_descArrayPL = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:9]]; - - NSMutableArray *fixedLine_descArrayPLLO = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPLLO addObject: [NSNumber numberWithInt:8]]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"89164\\d{4}" withPossibleNumberPattern:nil withPossibleLength:fixedLine_descArrayPL withPossibleLengthLocalOnly:fixedLine_descArrayPLLO withExample:@"891641234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *mobile_descArrayPL = [[NSMutableArray alloc] init]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"14(?:5\\d|71)\\d{5}|4(?:[0-2]\\d|3[0-57-9]|4[47-9]|5[0-25-9]|6[6-9]|7[02-9]|8[147-9]|9[017-9])\\d{6}" withPossibleNumberPattern:nil withPossibleLength:mobile_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"412345678" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:7]]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:10]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"180(?:0\\d{3}|2)\\d{3}" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"1800123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:10]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"190[0126]\\d{6}" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"1900123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:6]]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:8]]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:10]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"13(?:00\\d{2})?\\d{4}" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"1300123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"500\\d{6}" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"500123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"550\\d{6}" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"550123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"CX"; - self.countryCode = [NSNumber numberWithInteger:61]; - self.internationalPrefix = @"(?:14(?:1[14]|34|4[17]|[56]6|7[47]|88))?001[14-689]"; - self.preferredInternationalPrefix = @"0011"; - self.nationalPrefix = @"0"; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = @"0"; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataGF -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[56]\\d{8}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"594(?:10|2[012457-9]|3[0-57-9]|4[3-9]|5[7-9]|6[0-3]|9[014])\\d{4}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"594101234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"694(?:[04][0-7]|1[0-5]|3[018]|[29]\\d)\\d{4}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"694201234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"GF"; - self.countryCode = [NSNumber numberWithInteger:594]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = @"0"; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = @"0"; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{3})(\\d{2})(\\d{2})(\\d{2})" withFormat:@"$1 $2 $3 $4" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataFK -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:5]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[2-7]\\d{4}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[2-47]\\d{4}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"31234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[56]\\d{4}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"51234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"FK"; - self.countryCode = [NSNumber numberWithInteger:500]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = nil; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = nil; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataCY -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:8]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[257-9]\\d{7}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"2[2-6]\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"22345678" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"9[4-79]\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"96123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"800\\d{5}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"80001234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"90[09]\\d{5}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"90012345" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"80[1-9]\\d{5}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"80112345" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"700\\d{5}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"70012345" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:50|77)\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"77123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"CY"; - self.countryCode = [NSNumber numberWithInteger:357]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = nil; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = nil; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{2})(\\d{6})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataGG -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:7]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:9]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:10]]; - - NSMutableArray *generalDesc_descArrayPLLO = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPLLO addObject: [NSNumber numberWithInt:6]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[135789]\\d{6,9}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:generalDesc_descArrayPLLO withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *fixedLine_descArrayPL = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:10]]; - - NSMutableArray *fixedLine_descArrayPLLO = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPLLO addObject: [NSNumber numberWithInt:6]]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"1481\\d{6}" withPossibleNumberPattern:nil withPossibleLength:fixedLine_descArrayPL withPossibleLengthLocalOnly:fixedLine_descArrayPLLO withExample:@"1481456789" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *mobile_descArrayPL = [[NSMutableArray alloc] init]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:10]]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"7(?:781\\d|839\\d|911[17])\\d{5}" withPossibleNumberPattern:nil withPossibleLength:mobile_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"7781123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"80(?:0(?:1111|\\d{6,7})|8\\d{7})|500\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"8001234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:10]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:87[123]|9(?:[01]\\d|8[0-3]))\\d{7}" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"9012345678" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:7]]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:10]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"8(?:4(?:5464\\d|[2-5]\\d{7})|70\\d{7})" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"8431234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:10]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"70\\d{8}" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"7012345678" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:10]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"56\\d{8}" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"5612345678" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:10]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"76(?:0[012]|2[356]|4[0134]|5[49]|6[0-369]|77|81|9[39])\\d{6}" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"7640123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:10]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:3[0347]|55)\\d{8}" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"5512345678" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"GG"; - self.countryCode = [NSNumber numberWithInteger:44]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = @"0"; - self.preferredExtnPrefix = @" x"; - self.nationalPrefixForParsing = @"0"; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataCZ -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:9]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:10]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:11]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:12]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[2-8]\\d{8}|9\\d{8,11}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *fixedLine_descArrayPL = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"2\\d{8}|(?:3[1257-9]|4[16-9]|5[13-9])\\d{7}" withPossibleNumberPattern:nil withPossibleLength:fixedLine_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"212345678" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *mobile_descArrayPL = [[NSMutableArray alloc] init]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:60[1-8]|7(?:0[2-5]|[2379]\\d))\\d{6}" withPossibleNumberPattern:nil withPossibleLength:mobile_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"601123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"800\\d{6}" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"800123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"9(?:0[05689]|76)\\d{6}" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"900123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"8[134]\\d{7}" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"811234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"70[01]\\d{6}" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"700123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"9[17]0\\d{6}" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"910123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"9(?:5\\d|7[234])\\d{6}" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"972123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"9(?:3\\d{9}|6\\d{7,10})" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"93123456789" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"CZ"; - self.countryCode = [NSNumber numberWithInteger:420]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = nil; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = nil; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - [numberFormats0_patternArray addObject:@"[2-8]|9[015-7]"]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"([2-9]\\d{2})(\\d{3})(\\d{3})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - - NSMutableArray *numberFormats1_patternArray = [[NSMutableArray alloc] init]; - [numberFormats1_patternArray addObject:@"96"]; - NBNumberFormat *numberFormats1 = [[NBNumberFormat alloc] initWithPattern:@"(96\\d)(\\d{3})(\\d{3})(\\d{3})" withFormat:@"$1 $2 $3 $4" withLeadingDigitsPatterns:numberFormats1_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats1]; - - NSMutableArray *numberFormats2_patternArray = [[NSMutableArray alloc] init]; - [numberFormats2_patternArray addObject:@"9[36]"]; - NBNumberFormat *numberFormats2 = [[NBNumberFormat alloc] initWithPattern:@"(9\\d)(\\d{3})(\\d{3})(\\d{3})" withFormat:@"$1 $2 $3 $4" withLeadingDigitsPatterns:numberFormats2_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats2]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataGH -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:8]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:9]]; - - NSMutableArray *generalDesc_descArrayPLLO = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPLLO addObject: [NSNumber numberWithInt:7]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[235]\\d{8}|8\\d{7}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:generalDesc_descArrayPLLO withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *fixedLine_descArrayPL = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:9]]; - - NSMutableArray *fixedLine_descArrayPLLO = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPLLO addObject: [NSNumber numberWithInt:7]]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"3(?:0[237]\\d|[167](?:2[0-6]|7\\d)|2(?:2[0-5]|7\\d)|3(?:2[0-3]|7\\d)|4(?:2[013-9]|3[01]|7\\d)|5(?:2[0-7]|7\\d)|8(?:2[0-2]|7\\d)|9(?:20|7\\d))\\d{5}" withPossibleNumberPattern:nil withPossibleLength:fixedLine_descArrayPL withPossibleLengthLocalOnly:fixedLine_descArrayPLLO withExample:@"302345678" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *mobile_descArrayPL = [[NSMutableArray alloc] init]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:2[034678]\\d|5(?:[0457]\\d|6[01]))\\d{6}" withPossibleNumberPattern:nil withPossibleLength:mobile_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"231234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:8]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"800\\d{5}" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"80012345" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:8]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"800\\d{5}" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"80012345" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"GH"; - self.countryCode = [NSNumber numberWithInteger:233]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = @"0"; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = @"0"; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - [numberFormats0_patternArray addObject:@"[235]"]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{2})(\\d{3})(\\d{4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - - NSMutableArray *numberFormats1_patternArray = [[NSMutableArray alloc] init]; - [numberFormats1_patternArray addObject:@"8"]; - NBNumberFormat *numberFormats1 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{3})(\\d{5})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats1_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats1]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataFM -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:7]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[39]\\d{6}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"3[2357]0[1-9]\\d{3}|9[2-6]\\d{5}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"3201234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"3[2357]0[1-9]\\d{3}|9[2-7]\\d{5}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"3501234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"FM"; - self.countryCode = [NSNumber numberWithInteger:691]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = nil; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = nil; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{3})(\\d{4})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataER -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:7]]; - - NSMutableArray *generalDesc_descArrayPLLO = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPLLO addObject: [NSNumber numberWithInt:6]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[178]\\d{6}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:generalDesc_descArrayPLLO withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *fixedLine_descArrayPLLO = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPLLO addObject: [NSNumber numberWithInt:6]]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"1(?:1[12568]|20|40|55|6[146])\\d{4}|8\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:fixedLine_descArrayPLLO withExample:@"8370362" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"17[1-3]\\d{4}|7\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"7123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"ER"; - self.countryCode = [NSNumber numberWithInteger:291]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = @"0"; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = @"0"; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(\\d)(\\d{3})(\\d{3})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataGI -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:8]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[2568]\\d{7}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"2(?:00\\d|1(?:6[24-7]|9\\d)|2(?:00|2[2457]))\\d{4}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"20012345" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:5[46-8]|62)\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"57123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"80\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"80123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"8[1-689]\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"88123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"87\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"87123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"GI"; - self.countryCode = [NSNumber numberWithInteger:350]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = nil; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = nil; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - [numberFormats0_patternArray addObject:@"2"]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{3})(\\d{5})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataES -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[5-9]\\d{8}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"8(?:[1356]\\d|[28][0-8]|[47][1-9])\\d{6}|9(?:[135]\\d{7}|[28][0-8]\\d{6}|4[1-9]\\d{6}|6(?:[0-8]\\d{6}|9(?:0(?:[0-57-9]\\d{4}|6(?:0[0-8]|1[1-9]|[2-9]\\d)\\d{2})|[1-9]\\d{5}))|7(?:[124-9]\\d{2}|3(?:[0-8]\\d|9[1-9]))\\d{4})" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"810123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:6\\d{6}|7[1-48]\\d{5}|9(?:6906(?:09|10)|7390\\d{2}))\\d{2}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"612345678" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[89]00\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"800123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"80[367]\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"803123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"90[12]\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"901123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"70\\d{7}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"701234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"51\\d{7}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"511234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"ES"; - self.countryCode = [NSNumber numberWithInteger:34]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = nil; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = nil; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - [numberFormats0_patternArray addObject:@"[89]00"]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"([89]00)(\\d{3})(\\d{3})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - - NSMutableArray *numberFormats1_patternArray = [[NSMutableArray alloc] init]; - [numberFormats1_patternArray addObject:@"[568]|[79][0-8]"]; - NBNumberFormat *numberFormats1 = [[NBNumberFormat alloc] initWithPattern:@"([5-9]\\d{2})(\\d{2})(\\d{2})(\\d{2})" withFormat:@"$1 $2 $3 $4" withLeadingDigitsPatterns:numberFormats1_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats1]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataFO -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:6]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[2-9]\\d{5}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:20|[3-4]\\d|8[19])\\d{4}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"201234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:[27][1-9]|5\\d)\\d{4}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"211234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"80[257-9]\\d{3}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"802123" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"90(?:[1345][15-7]|2[125-7]|99)\\d{2}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"901123" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:6[0-36]|88)\\d{4}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"601234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"FO"; - self.countryCode = [NSNumber numberWithInteger:298]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = nil; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = @"(10(?:01|[12]0|88))"; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{6})" withFormat:@"$1" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:@"$CC $1"]; - [numberFormats_FormatArray addObject:numberFormats0]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataET -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:9]]; - - NSMutableArray *generalDesc_descArrayPLLO = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPLLO addObject: [NSNumber numberWithInt:7]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[1-59]\\d{8}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:generalDesc_descArrayPLLO withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *fixedLine_descArrayPLLO = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPLLO addObject: [NSNumber numberWithInt:7]]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:11(?:1(?:1[124]|2[2-57]|3[1-5]|5[5-8]|8[6-8])|2(?:13|3[6-8]|5[89]|7[05-9]|8[2-6])|3(?:2[01]|3[0-289]|4[1289]|7[1-4]|87)|4(?:1[69]|3[2-49]|4[0-3]|6[5-8])|5(?:1[578]|44|5[0-4])|6(?:18|2[69]|39|4[5-7]|5[1-5]|6[0-59]|8[015-8]))|2(?:2(?:11[1-9]|22[0-7]|33\\d|44[1467]|66[1-68])|5(?:11[124-6]|33[2-8]|44[1467]|55[14]|66[1-3679]|77[124-79]|880))|3(?:3(?:11[0-46-8]|22[0-6]|33[0134689]|44[04]|55[0-6]|66[01467])|4(?:44[0-8]|55[0-69]|66[0-3]|77[1-5]))|4(?:6(?:22[0-24-7]|33[1-5]|44[13-69]|55[14-689]|660|88[1-4])|7(?:11[1-9]|22[1-9]|33[13-7]|44[13-6]|55[1-689]))|5(?:7(?:227|55[05]|(?:66|77)[14-8])|8(?:11[149]|22[013-79]|33[0-68]|44[013-8]|550|66[1-5]|77\\d)))\\d{4}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:fixedLine_descArrayPLLO withExample:@"111112345" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"9(?:[1-46-8]\\d|5[89])\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"911234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"ET"; - self.countryCode = [NSNumber numberWithInteger:251]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = @"0"; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = @"0"; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"([1-59]\\d)(\\d{3})(\\d{4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataGL -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:6]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[1-689]\\d{5}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:19|3[1-6]|6[14689]|8[14-79]|9\\d)\\d{4}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"321000" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[245][2-9]\\d{4}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"221234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"80\\d{4}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"801234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"3[89]\\d{4}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"381234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"GL"; - self.countryCode = [NSNumber numberWithInteger:299]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = nil; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = nil; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{2})(\\d{2})(\\d{2})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataDZ -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:8]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:[1-4]|[5-9]\\d)\\d{7}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:1\\d|2[013-79]|3[0-8]|4[0135689])\\d{6}|9619\\d{5}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"12345678" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *mobile_descArrayPL = [[NSMutableArray alloc] init]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:5[4-6]|7[7-9])\\d{7}|6(?:[569]\\d|7[0-6])\\d{6}" withPossibleNumberPattern:nil withPossibleLength:mobile_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"551234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"800\\d{6}" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"800123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"80[3-689]1\\d{5}" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"808123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"80[12]1\\d{5}" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"801123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"98[23]\\d{6}" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"983123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"DZ"; - self.countryCode = [NSNumber numberWithInteger:213]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = @"0"; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = @"0"; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - [numberFormats0_patternArray addObject:@"[1-4]"]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"([1-4]\\d)(\\d{2})(\\d{2})(\\d{2})" withFormat:@"$1 $2 $3 $4" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - - NSMutableArray *numberFormats1_patternArray = [[NSMutableArray alloc] init]; - [numberFormats1_patternArray addObject:@"[5-8]"]; - NBNumberFormat *numberFormats1 = [[NBNumberFormat alloc] initWithPattern:@"([5-8]\\d{2})(\\d{2})(\\d{2})(\\d{2})" withFormat:@"$1 $2 $3 $4" withLeadingDigitsPatterns:numberFormats1_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats1]; - - NSMutableArray *numberFormats2_patternArray = [[NSMutableArray alloc] init]; - [numberFormats2_patternArray addObject:@"9"]; - NBNumberFormat *numberFormats2 = [[NBNumberFormat alloc] initWithPattern:@"(9\\d)(\\d{3})(\\d{2})(\\d{2})" withFormat:@"$1 $2 $3 $4" withLeadingDigitsPatterns:numberFormats2_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats2]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataGM -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:7]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[2-9]\\d{6}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:4(?:[23]\\d{2}|4(?:1[024679]|[6-9]\\d))|5(?:54[0-7]|6(?:[67]\\d)|7(?:1[04]|2[035]|3[58]|48))|8\\d{3})\\d{3}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"5661234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[23679]\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"3012345" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"GM"; - self.countryCode = [NSNumber numberWithInteger:220]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = nil; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = nil; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{3})(\\d{4})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataID -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:7]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:8]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:9]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:10]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:11]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:12]]; - - NSMutableArray *generalDesc_descArrayPLLO = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPLLO addObject: [NSNumber numberWithInt:5]]; - [generalDesc_descArrayPLLO addObject: [NSNumber numberWithInt:6]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:[1-79]\\d{6,10}|8\\d{7,11})" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:generalDesc_descArrayPLLO withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *fixedLine_descArrayPL = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:7]]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:8]]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:9]]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:10]]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:11]]; - - NSMutableArray *fixedLine_descArrayPLLO = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPLLO addObject: [NSNumber numberWithInt:5]]; - [fixedLine_descArrayPLLO addObject: [NSNumber numberWithInt:6]]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"2(?:1(?:14\\d{3}|[0-8]\\d{6,7}|500\\d{3}|9\\d{6})|2\\d{6,8}|4\\d{7,8})|(?:2(?:[35][1-4]|6[0-8]|7[1-6]|8\\d|9[1-8])|3(?:1|[25][1-8]|3[1-68]|4[1-3]|6[1-3568]|7[0-469]|8\\d)|4(?:0[1-589]|1[01347-9]|2[0-36-8]|3[0-24-68]|43|5[1-378]|6[1-5]|7[134]|8[1245])|5(?:1[1-35-9]|2[25-8]|3[124-9]|4[1-3589]|5[1-46]|6[1-8])|6(?:19?|[25]\\d|3[1-69]|4[1-6])|7(?:02|[125][1-9]|[36]\\d|4[1-8]|7[0-36-9])|9(?:0[12]|1[013-8]|2[0-479]|5[125-8]|6[23679]|7[159]|8[01346]))\\d{5,8}" withPossibleNumberPattern:nil withPossibleLength:fixedLine_descArrayPL withPossibleLengthLocalOnly:fixedLine_descArrayPLLO withExample:@"612345678" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *mobile_descArrayPL = [[NSMutableArray alloc] init]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:9]]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:10]]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:11]]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:12]]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:2(?:1(?:3[145]|4[01]|5[1-469]|60|8[0359]|9\\d)|2(?:88|9[1256])|3[1-4]9|4(?:36|91)|5(?:1[349]|[2-4]9)|6[0-7]9|7(?:[1-36]9|4[39])|8[1-5]9|9[1-48]9)|3(?:19[1-3]|2[12]9|3[13]9|4(?:1[69]|39)|5[14]9|6(?:1[69]|2[89])|709)|4[13]19|5(?:1(?:19|8[39])|4[129]9|6[12]9)|6(?:19[12]|2(?:[23]9|77))|7(?:1[13]9|2[15]9|419|5(?:1[89]|29)|6[15]9|7[178]9))\\d{5,6}|8[1-35-9]\\d{7,10}" withPossibleNumberPattern:nil withPossibleLength:mobile_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"812345678" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:8]]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:9]]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:10]]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:11]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"177\\d{6,8}|800\\d{5,7}" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"8001234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:10]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"809\\d{7}" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"8091234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:10]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"804\\d{7}" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"8041234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:7]]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:10]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"1500\\d{3}|8071\\d{6}" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"8071123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:10]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"8071\\d{6}" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"8071123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"ID"; - self.countryCode = [NSNumber numberWithInteger:62]; - self.internationalPrefix = @"0(?:0[1789]|10(?:00|1[67]))"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = @"0"; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = @"0"; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - [numberFormats0_patternArray addObject:@"2[124]|[36]1"]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{2})(\\d{5,8})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:@"(0$1)" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - - NSMutableArray *numberFormats1_patternArray = [[NSMutableArray alloc] init]; - [numberFormats1_patternArray addObject:@"[4579]|2[035-9]|[36][02-9]"]; - NBNumberFormat *numberFormats1 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{3})(\\d{5,8})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats1_patternArray withNationalPrefixFormattingRule:@"(0$1)" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats1]; - - NSMutableArray *numberFormats2_patternArray = [[NSMutableArray alloc] init]; - [numberFormats2_patternArray addObject:@"8[1-35-9]"]; - NBNumberFormat *numberFormats2 = [[NBNumberFormat alloc] initWithPattern:@"(8\\d{2})(\\d{3,4})(\\d{3})" withFormat:@"$1-$2-$3" withLeadingDigitsPatterns:numberFormats2_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats2]; - - NSMutableArray *numberFormats3_patternArray = [[NSMutableArray alloc] init]; - [numberFormats3_patternArray addObject:@"8[1-35-9]"]; - NBNumberFormat *numberFormats3 = [[NBNumberFormat alloc] initWithPattern:@"(8\\d{2})(\\d{4})(\\d{4,5})" withFormat:@"$1-$2-$3" withLeadingDigitsPatterns:numberFormats3_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats3]; - - NSMutableArray *numberFormats4_patternArray = [[NSMutableArray alloc] init]; - [numberFormats4_patternArray addObject:@"15"]; - NBNumberFormat *numberFormats4 = [[NBNumberFormat alloc] initWithPattern:@"(1)(500)(\\d{3})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats4_patternArray withNationalPrefixFormattingRule:@"$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats4]; - - NSMutableArray *numberFormats5_patternArray = [[NSMutableArray alloc] init]; - [numberFormats5_patternArray addObject:@"17"]; - NBNumberFormat *numberFormats5 = [[NBNumberFormat alloc] initWithPattern:@"(177)(\\d{6,8})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats5_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats5]; - - NSMutableArray *numberFormats6_patternArray = [[NSMutableArray alloc] init]; - [numberFormats6_patternArray addObject:@"800"]; - NBNumberFormat *numberFormats6 = [[NBNumberFormat alloc] initWithPattern:@"(800)(\\d{5,7})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats6_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats6]; - - NSMutableArray *numberFormats7_patternArray = [[NSMutableArray alloc] init]; - [numberFormats7_patternArray addObject:@"804"]; - NBNumberFormat *numberFormats7 = [[NBNumberFormat alloc] initWithPattern:@"(804)(\\d{3})(\\d{4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats7_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats7]; - - NSMutableArray *numberFormats8_patternArray = [[NSMutableArray alloc] init]; - [numberFormats8_patternArray addObject:@"80[79]"]; - NBNumberFormat *numberFormats8 = [[NBNumberFormat alloc] initWithPattern:@"(80\\d)(\\d)(\\d{3})(\\d{3})" withFormat:@"$1 $2 $3 $4" withLeadingDigitsPatterns:numberFormats8_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats8]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataFR -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[1-9]\\d{8}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[1-5]\\d{8}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"123456789" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:6\\d|7[3-9])\\d{7}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"612345678" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"80[0-5]\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"801234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"89[1-37-9]\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"891123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"8(?:1[0-29]|2[0156]|84|90)\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"810123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"9\\d{8}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"912345678" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"80[6-9]\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"806123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"FR"; - self.countryCode = [NSNumber numberWithInteger:33]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = @"0"; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = @"0"; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - [numberFormats0_patternArray addObject:@"[1-79]"]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"([1-79])(\\d{2})(\\d{2})(\\d{2})(\\d{2})" withFormat:@"$1 $2 $3 $4 $5" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - - NSMutableArray *numberFormats1_patternArray = [[NSMutableArray alloc] init]; - [numberFormats1_patternArray addObject:@"11"]; - NBNumberFormat *numberFormats1 = [[NBNumberFormat alloc] initWithPattern:@"(1\\d{2})(\\d{3})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats1_patternArray withNationalPrefixFormattingRule:@"$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats1]; - - NSMutableArray *numberFormats2_patternArray = [[NSMutableArray alloc] init]; - [numberFormats2_patternArray addObject:@"8"]; - NBNumberFormat *numberFormats2 = [[NBNumberFormat alloc] initWithPattern:@"(8\\d{2})(\\d{2})(\\d{2})(\\d{2})" withFormat:@"$1 $2 $3 $4" withLeadingDigitsPatterns:numberFormats2_patternArray withNationalPrefixFormattingRule:@"0 $1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats2]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *intlNumberFormats0_patternArray = [[NSMutableArray alloc] init]; - [intlNumberFormats0_patternArray addObject:@"[1-79]"]; - NBNumberFormat *intlNumberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"([1-79])(\\d{2})(\\d{2})(\\d{2})(\\d{2})" withFormat:@"$1 $2 $3 $4 $5" withLeadingDigitsPatterns:intlNumberFormats0_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [intlNumberFormats_FormatArray addObject:intlNumberFormats0]; - - NSMutableArray *intlNumberFormats1_patternArray = [[NSMutableArray alloc] init]; - [intlNumberFormats1_patternArray addObject:@"8"]; - NBNumberFormat *intlNumberFormats1 = [[NBNumberFormat alloc] initWithPattern:@"(8\\d{2})(\\d{2})(\\d{2})(\\d{2})" withFormat:@"$1 $2 $3 $4" withLeadingDigitsPatterns:intlNumberFormats1_patternArray withNationalPrefixFormattingRule:@"0 $1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [intlNumberFormats_FormatArray addObject:intlNumberFormats1]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataGN -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:8]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[367]\\d{7,8}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *fixedLine_descArrayPL = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:8]]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"30(?:24|3[12]|4[1-35-7]|5[13]|6[189]|[78]1|9[1478])\\d{4}" withPossibleNumberPattern:nil withPossibleLength:fixedLine_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"30241234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *mobile_descArrayPL = [[NSMutableArray alloc] init]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"6[02356]\\d{7}" withPossibleNumberPattern:nil withPossibleLength:mobile_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"601123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"722\\d{6}" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"722123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"GN"; - self.countryCode = [NSNumber numberWithInteger:224]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = nil; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = nil; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - [numberFormats0_patternArray addObject:@"3"]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{2})(\\d{2})(\\d{2})(\\d{2})" withFormat:@"$1 $2 $3 $4" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - - NSMutableArray *numberFormats1_patternArray = [[NSMutableArray alloc] init]; - [numberFormats1_patternArray addObject:@"[67]"]; - NBNumberFormat *numberFormats1 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{3})(\\d{2})(\\d{2})(\\d{2})" withFormat:@"$1 $2 $3 $4" withLeadingDigitsPatterns:numberFormats1_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats1]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataIE -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:7]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:8]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:9]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:10]]; - - NSMutableArray *generalDesc_descArrayPLLO = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPLLO addObject: [NSNumber numberWithInt:5]]; - [generalDesc_descArrayPLLO addObject: [NSNumber numberWithInt:6]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[124-9]\\d{6,9}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:generalDesc_descArrayPLLO withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *fixedLine_descArrayPLLO = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPLLO addObject: [NSNumber numberWithInt:5]]; - [fixedLine_descArrayPLLO addObject: [NSNumber numberWithInt:6]]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"1\\d{7,8}|2(?:1\\d{6,7}|3\\d{7}|[24-9]\\d{5})|4(?:0[24]\\d{5}|[1-469]\\d{7}|5\\d{6}|7\\d{5}|8[0-46-9]\\d{7})|5(?:0[45]\\d{5}|1\\d{6}|[23679]\\d{7}|8\\d{5})|6(?:1\\d{6}|[237-9]\\d{5}|[4-6]\\d{7})|7[14]\\d{7}|9(?:1\\d{6}|[04]\\d{7}|[35-9]\\d{5})" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:fixedLine_descArrayPLLO withExample:@"2212345" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *mobile_descArrayPL = [[NSMutableArray alloc] init]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"8(?:22\\d{6}|[35-9]\\d{7})" withPossibleNumberPattern:nil withPossibleLength:mobile_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"850123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:10]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"1800\\d{6}" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"1800123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:10]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"15(?:1[2-8]|[2-8]0|9[089])\\d{6}" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"1520123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:10]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"18[59]0\\d{6}" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"1850123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"700\\d{6}" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"700123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"76\\d{7}" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"761234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"818\\d{6}" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"818123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:10]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"8[35-9]\\d{8}" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"8501234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:10]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"18[59]0\\d{6}" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"1850123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"IE"; - self.countryCode = [NSNumber numberWithInteger:353]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = @"0"; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = @"0"; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - [numberFormats0_patternArray addObject:@"1"]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(1)(\\d{3,4})(\\d{4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:@"(0$1)" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - - NSMutableArray *numberFormats1_patternArray = [[NSMutableArray alloc] init]; - [numberFormats1_patternArray addObject:@"2[24-9]|47|58|6[237-9]|9[35-9]"]; - NBNumberFormat *numberFormats1 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{2})(\\d{5})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats1_patternArray withNationalPrefixFormattingRule:@"(0$1)" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats1]; - - NSMutableArray *numberFormats2_patternArray = [[NSMutableArray alloc] init]; - [numberFormats2_patternArray addObject:@"40[24]|50[45]"]; - NBNumberFormat *numberFormats2 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{3})(\\d{5})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats2_patternArray withNationalPrefixFormattingRule:@"(0$1)" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats2]; - - NSMutableArray *numberFormats3_patternArray = [[NSMutableArray alloc] init]; - [numberFormats3_patternArray addObject:@"48"]; - NBNumberFormat *numberFormats3 = [[NBNumberFormat alloc] initWithPattern:@"(48)(\\d{4})(\\d{4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats3_patternArray withNationalPrefixFormattingRule:@"(0$1)" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats3]; - - NSMutableArray *numberFormats4_patternArray = [[NSMutableArray alloc] init]; - [numberFormats4_patternArray addObject:@"81"]; - NBNumberFormat *numberFormats4 = [[NBNumberFormat alloc] initWithPattern:@"(818)(\\d{3})(\\d{3})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats4_patternArray withNationalPrefixFormattingRule:@"(0$1)" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats4]; - - NSMutableArray *numberFormats5_patternArray = [[NSMutableArray alloc] init]; - [numberFormats5_patternArray addObject:@"[24-69]|7[14]"]; - NBNumberFormat *numberFormats5 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{2})(\\d{3})(\\d{3,4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats5_patternArray withNationalPrefixFormattingRule:@"(0$1)" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats5]; - - NSMutableArray *numberFormats6_patternArray = [[NSMutableArray alloc] init]; - [numberFormats6_patternArray addObject:@"76|8[35-9]"]; - NBNumberFormat *numberFormats6 = [[NBNumberFormat alloc] initWithPattern:@"([78]\\d)(\\d{3,4})(\\d{4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats6_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats6]; - - NSMutableArray *numberFormats7_patternArray = [[NSMutableArray alloc] init]; - [numberFormats7_patternArray addObject:@"70"]; - NBNumberFormat *numberFormats7 = [[NBNumberFormat alloc] initWithPattern:@"(700)(\\d{3})(\\d{3})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats7_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats7]; - - NSMutableArray *numberFormats8_patternArray = [[NSMutableArray alloc] init]; - [numberFormats8_patternArray addObject:@"1(?:8[059]|5)"]; - [numberFormats8_patternArray addObject:@"1(?:8[059]0|5)"]; - NBNumberFormat *numberFormats8 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{4})(\\d{3})(\\d{3})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats8_patternArray withNationalPrefixFormattingRule:@"$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats8]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataHK -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:5]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:6]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:7]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:8]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:9]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:11]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[235-7]\\d{7}|8\\d{7,8}|9\\d{4,10}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *fixedLine_descArrayPL = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:8]]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:2(?:[13-8]\\d|2[013-9]|9[0-24-9])|3(?:[1569][0-24-9]|4[0-246-9]|7[0-24-69]|89)|58[01])\\d{5}" withPossibleNumberPattern:nil withPossibleLength:fixedLine_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"21234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *mobile_descArrayPL = [[NSMutableArray alloc] init]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:8]]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:5(?:[1-59][0-46-9]|6[0-4689]|7[0-2469])|6(?:0[1-9]|[1459]\\d|[2368][0-57-9]|7[0-79])|9(?:0[1-9]|1[02-9]|[2358][0-8]|[467]\\d))\\d{5}" withPossibleNumberPattern:nil withPossibleLength:mobile_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"51234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"800\\d{6}" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"800123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:5]]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:6]]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:7]]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:8]]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:11]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"900(?:[0-24-9]\\d{7}|3\\d{1,4})" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"90012345678" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:8]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"8(?:1[1-4679]|2[0-367]|3[02-47])\\d{5}" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"81123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:8]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"7(?:1[0-369]|[23][0-37-9]|47|5[1578]|6[0235]|7[278]|8[236-9]|9[025-9])\\d{5}" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"71234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"HK"; - self.countryCode = [NSNumber numberWithInteger:852]; - self.internationalPrefix = @"00(?:[126-9]|30|5[09])?"; - self.preferredInternationalPrefix = @"00"; - self.nationalPrefix = nil; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = nil; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - [numberFormats0_patternArray addObject:@"[235-7]|[89](?:0[1-9]|[1-9])"]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{4})(\\d{4})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - - NSMutableArray *numberFormats1_patternArray = [[NSMutableArray alloc] init]; - [numberFormats1_patternArray addObject:@"800"]; - NBNumberFormat *numberFormats1 = [[NBNumberFormat alloc] initWithPattern:@"(800)(\\d{3})(\\d{3})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats1_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats1]; - - NSMutableArray *numberFormats2_patternArray = [[NSMutableArray alloc] init]; - [numberFormats2_patternArray addObject:@"900"]; - NBNumberFormat *numberFormats2 = [[NBNumberFormat alloc] initWithPattern:@"(900)(\\d{2})(\\d{3})(\\d{3})" withFormat:@"$1 $2 $3 $4" withLeadingDigitsPatterns:numberFormats2_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats2]; - - NSMutableArray *numberFormats3_patternArray = [[NSMutableArray alloc] init]; - [numberFormats3_patternArray addObject:@"900"]; - NBNumberFormat *numberFormats3 = [[NBNumberFormat alloc] initWithPattern:@"(900)(\\d{2,5})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats3_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats3]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataGP -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[56]\\d{8}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"590(?:0[13468]|1[012]|2[0-68]|3[28]|4[0-8]|5[579]|6[0189]|70|8[0-689]|9\\d)\\d{4}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"590201234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"690(?:0[0-7]|[1-9]\\d)\\d{4}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"690301234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"GP"; - self.countryCode = [NSNumber numberWithInteger:590]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = @"0"; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = @"0"; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"([56]90)(\\d{2})(\\d{4})" withFormat:@"$1 $2-$3" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = YES; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataGQ -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[23589]\\d{8}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"3(?:3(?:3\\d[7-9]|[0-24-9]\\d[46])|5\\d{2}[7-9])\\d{4}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"333091234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:222|55[15])\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"222123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"80\\d[1-9]\\d{5}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"800123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"90\\d[1-9]\\d{5}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"900123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"GQ"; - self.countryCode = [NSNumber numberWithInteger:240]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = nil; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = nil; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - [numberFormats0_patternArray addObject:@"[235]"]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{3})(\\d{3})(\\d{3})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - - NSMutableArray *numberFormats1_patternArray = [[NSMutableArray alloc] init]; - [numberFormats1_patternArray addObject:@"[89]"]; - NBNumberFormat *numberFormats1 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{3})(\\d{6})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats1_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats1]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataGR -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:10]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[26-9]\\d{9}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"2(?:1\\d{2}|2(?:2[1-46-9]|3[1-8]|4[1-7]|5[1-4]|6[1-8]|7[1-5]|[89][1-9])|3(?:1\\d|2[1-57]|[35][1-3]|4[13]|7[1-7]|8[124-6]|9[1-79])|4(?:1\\d|2[1-8]|3[1-4]|4[13-5]|6[1-578]|9[1-5])|5(?:1\\d|[29][1-4]|3[1-5]|4[124]|5[1-6])|6(?:1\\d|3[1245]|4[1-7]|5[13-9]|[269][1-6]|7[14]|8[1-5])|7(?:1\\d|2[1-5]|3[1-6]|4[1-7]|5[1-57]|6[135]|9[125-7])|8(?:1\\d|2[1-5]|[34][1-4]|9[1-57]))\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"2123456789" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"69\\d{8}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"6912345678" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"800\\d{7}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"8001234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"90[19]\\d{7}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"9091234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"8(?:0[16]|12|25)\\d{7}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"8011234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"70\\d{8}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"7012345678" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"GR"; - self.countryCode = [NSNumber numberWithInteger:30]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = nil; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = nil; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - [numberFormats0_patternArray addObject:@"21|7"]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"([27]\\d)(\\d{4})(\\d{4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - - NSMutableArray *numberFormats1_patternArray = [[NSMutableArray alloc] init]; - [numberFormats1_patternArray addObject:@"2[2-9]1|[689]"]; - NBNumberFormat *numberFormats1 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{3})(\\d{3})(\\d{4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats1_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats1]; - - NSMutableArray *numberFormats2_patternArray = [[NSMutableArray alloc] init]; - [numberFormats2_patternArray addObject:@"2[2-9][02-9]"]; - NBNumberFormat *numberFormats2 = [[NBNumberFormat alloc] initWithPattern:@"(2\\d{3})(\\d{6})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats2_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats2]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataHN -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:8]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[237-9]\\d{7}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"2(?:2(?:0[019]|1[1-36]|[23]\\d|4[04-6]|5[57]|7[01389]|8[0146-9]|9[012])|4(?:07|2[3-59]|3[13-689]|4[0-68]|5[1-35])|5(?:16|4[03-5]|5\\d|6[4-6]|74)|6(?:[056]\\d|17|3[04]|4[0-378]|[78][0-8]|9[01])|7(?:6[46-9]|7[02-9]|8[034])|8(?:79|8[0-35789]|9[1-57-9]))\\d{4}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"22123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[37-9]\\d{7}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"91234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"HN"; - self.countryCode = [NSNumber numberWithInteger:504]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = nil; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = nil; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{4})(\\d{4})" withFormat:@"$1-$2" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataJE -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:10]]; - - NSMutableArray *generalDesc_descArrayPLLO = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPLLO addObject: [NSNumber numberWithInt:6]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[135789]\\d{6,9}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:generalDesc_descArrayPLLO withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *fixedLine_descArrayPLLO = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPLLO addObject: [NSNumber numberWithInt:6]]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"1534\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:fixedLine_descArrayPLLO withExample:@"1534456789" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"7(?:509\\d|7(?:00[378]|97[7-9])|829\\d|937\\d)\\d{5}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"7797712345" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"80(?:07(?:35|81)|8901)\\d{4}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"8007354567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:871206|90(?:066[59]|1810|71(?:07|55)))\\d{4}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"9018105678" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"8(?:4(?:4(?:4(?:05|42|69)|703)|5(?:041|800))|70002)\\d{4}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"8447034567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"701511\\d{4}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"7015115678" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"56\\d{8}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"5612345678" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"76(?:0[012]|2[356]|4[0134]|5[49]|6[0-369]|77|81|9[39])\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"7640123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"3(?:0(?:07(?:35|81)|8901)|3\\d{4}|4(?:4(?:4(?:05|42|69)|703)|5(?:041|800))|7(?:0002|1206))\\d{4}|55\\d{8}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"5512345678" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"JE"; - self.countryCode = [NSNumber numberWithInteger:44]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = @"0"; - self.preferredExtnPrefix = @" x"; - self.nationalPrefixForParsing = @"0"; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataGT -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:8]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:11]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[2-7]\\d{7}|1[89]\\d{9}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *fixedLine_descArrayPL = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:8]]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[267][2-9]\\d{6}" withPossibleNumberPattern:nil withPossibleLength:fixedLine_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"22456789" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *mobile_descArrayPL = [[NSMutableArray alloc] init]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:8]]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[345]\\d{7}" withPossibleNumberPattern:nil withPossibleLength:mobile_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"51234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:11]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"18[01]\\d{8}" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"18001112222" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:11]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"19\\d{9}" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"19001112222" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"GT"; - self.countryCode = [NSNumber numberWithInteger:502]; - self.internationalPrefix = @"00"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = nil; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = nil; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - [numberFormats0_patternArray addObject:@"[2-7]"]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{4})(\\d{4})" withFormat:@"$1 $2" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - - NSMutableArray *numberFormats1_patternArray = [[NSMutableArray alloc] init]; - [numberFormats1_patternArray addObject:@"1"]; - NBNumberFormat *numberFormats1 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{4})(\\d{3})(\\d{4})" withFormat:@"$1 $2 $3" withLeadingDigitsPatterns:numberFormats1_patternArray withNationalPrefixFormattingRule:nil whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats1]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataGU -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:10]]; - - NSMutableArray *generalDesc_descArrayPLLO = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPLLO addObject: [NSNumber numberWithInt:7]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[5689]\\d{9}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:generalDesc_descArrayPLLO withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *fixedLine_descArrayPLLO = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPLLO addObject: [NSNumber numberWithInt:7]]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"671(?:3(?:00|3[39]|4[349]|55|6[26])|4(?:56|7[1-9]|8[236-9])|5(?:55|6[2-5]|88)|6(?:3[2-578]|4[24-9]|5[34]|78|8[5-9])|7(?:[079]7|2[0167]|3[45]|47|8[789])|8(?:[2-5789]8|6[48])|9(?:2[29]|6[79]|7[179]|8[789]|9[78]))\\d{4}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:fixedLine_descArrayPLLO withExample:@"6713001234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *mobile_descArrayPLLO = [[NSMutableArray alloc] init]; - [mobile_descArrayPLLO addObject: [NSNumber numberWithInt:7]]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"671(?:3(?:00|3[39]|4[349]|55|6[26])|4(?:56|7[1-9]|8[236-9])|5(?:55|6[2-5]|88)|6(?:3[2-578]|4[24-9]|5[34]|78|8[5-9])|7(?:[079]7|2[0167]|3[45]|47|8[789])|8(?:[2-5789]8|6[48])|9(?:2[29]|6[79]|7[179]|8[789]|9[78]))\\d{4}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:mobile_descArrayPLLO withExample:@"6713001234" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"8(?:00|33|44|55|66|77|88)[2-9]\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"8002123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"900[2-9]\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"9002123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"5(?:00|22|33|44|66|77|88)[2-9]\\d{6}" withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:@"5002345678" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"GU"; - self.countryCode = [NSNumber numberWithInteger:1]; - self.internationalPrefix = @"011"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = @"1"; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = @"1"; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = YES; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = @"671"; - self.leadingZeroPossible = NO; - } - return self; -} -@end - -@implementation NBPhoneMetadataIL -- (id)init -{ - self = [super init]; - if (self) { - - NSMutableArray *generalDesc_descArrayPL = [[NSMutableArray alloc] init]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:4]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:7]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:8]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:9]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:10]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:11]]; - [generalDesc_descArrayPL addObject: [NSNumber numberWithInt:12]]; - self.generalDesc = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"1\\d{6,11}|[2-589]\\d{3}(?:\\d{3,6})?|6\\d{3}|7\\d{6,9}" withPossibleNumberPattern:nil withPossibleLength:generalDesc_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *fixedLine_descArrayPL = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:8]]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:11]]; - [fixedLine_descArrayPL addObject: [NSNumber numberWithInt:12]]; - - NSMutableArray *fixedLine_descArrayPLLO = [[NSMutableArray alloc] init]; - [fixedLine_descArrayPLLO addObject: [NSNumber numberWithInt:7]]; - self.fixedLine = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"(?:153\\d{1,2}|[2-489])\\d{7}" withPossibleNumberPattern:nil withPossibleLength:fixedLine_descArrayPL withPossibleLengthLocalOnly:fixedLine_descArrayPLLO withExample:@"21234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *mobile_descArrayPL = [[NSMutableArray alloc] init]; - [mobile_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.mobile = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"5(?:[02-47-9]\\d{2}|5(?:01|2[23]|3[2-4]|4[45]|5[5689]|6[67]|7[0178]|8[6-9]|9[2-9])|6[2-9]\\d)\\d{5}" withPossibleNumberPattern:nil withPossibleLength:mobile_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"501234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *tollFree_descArrayPL = [[NSMutableArray alloc] init]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:7]]; - [tollFree_descArrayPL addObject: [NSNumber numberWithInt:10]]; - self.tollFree = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"1(?:80[019]\\d{3}|255)\\d{3}" withPossibleNumberPattern:nil withPossibleLength:tollFree_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"1800123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *premiumRate_descArrayPL = [[NSMutableArray alloc] init]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:8]]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:9]]; - [premiumRate_descArrayPL addObject: [NSNumber numberWithInt:10]]; - self.premiumRate = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"1(?:212|(?:9(?:0[01]|19)|200)\\d{2})\\d{4}" withPossibleNumberPattern:nil withPossibleLength:premiumRate_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"1919123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *sharedCost_descArrayPL = [[NSMutableArray alloc] init]; - [sharedCost_descArrayPL addObject: [NSNumber numberWithInt:10]]; - self.sharedCost = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"1700\\d{6}" withPossibleNumberPattern:nil withPossibleLength:sharedCost_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"1700123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *personalNumber_descArrayPL = [[NSMutableArray alloc] init]; - [personalNumber_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.personalNumber = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:personalNumber_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voip_descArrayPL = [[NSMutableArray alloc] init]; - [voip_descArrayPL addObject: [NSNumber numberWithInt:9]]; - self.voip = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"7(?:18\\d|2[23]\\d|3[237]\\d|47\\d|6[58]\\d|7\\d{2}|8(?:2\\d|33|55|77|81)|9[2579]\\d)\\d{5}" withPossibleNumberPattern:nil withPossibleLength:voip_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"771234567" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *pager_descArrayPL = [[NSMutableArray alloc] init]; - [pager_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.pager = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:pager_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *uan_descArrayPL = [[NSMutableArray alloc] init]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:4]]; - [uan_descArrayPL addObject: [NSNumber numberWithInt:10]]; - self.uan = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"[2-689]\\d{3}|1599\\d{6}" withPossibleNumberPattern:nil withPossibleLength:uan_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"1599123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.emergency = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:nil withPossibleNumberPattern:nil withPossibleLength:nil withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *voicemail_descArrayPL = [[NSMutableArray alloc] init]; - [voicemail_descArrayPL addObject: [NSNumber numberWithInt:-1]]; - self.voicemail = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"NA" withPossibleNumberPattern:nil withPossibleLength:voicemail_descArrayPL withPossibleLengthLocalOnly:nil withExample:nil withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - - NSMutableArray *noInternationalDialling_descArrayPL = [[NSMutableArray alloc] init]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:4]]; - [noInternationalDialling_descArrayPL addObject: [NSNumber numberWithInt:10]]; - self.noInternationalDialling = [[NBPhoneNumberDesc alloc] initWithNationalNumberPattern:@"1700\\d{6}|[2-689]\\d{3}" withPossibleNumberPattern:nil withPossibleLength:noInternationalDialling_descArrayPL withPossibleLengthLocalOnly:nil withExample:@"1700123456" withNationalNumberMatcherData:nil withPossibleNumberMatcherData:nil]; - self.codeID = @"IL"; - self.countryCode = [NSNumber numberWithInteger:972]; - self.internationalPrefix = @"0(?:0|1[2-9])"; - self.preferredInternationalPrefix = nil; - self.nationalPrefix = @"0"; - self.preferredExtnPrefix = nil; - self.nationalPrefixForParsing = @"0"; - self.nationalPrefixTransformRule = nil; - self.sameMobileAndFixedLinePattern = NO; - - NSMutableArray *numberFormats_FormatArray = [[NSMutableArray alloc] init]; - - NSMutableArray *numberFormats0_patternArray = [[NSMutableArray alloc] init]; - [numberFormats0_patternArray addObject:@"[2-489]"]; - NBNumberFormat *numberFormats0 = [[NBNumberFormat alloc] initWithPattern:@"([2-489])(\\d{3})(\\d{4})" withFormat:@"$1-$2-$3" withLeadingDigitsPatterns:numberFormats0_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats0]; - - NSMutableArray *numberFormats1_patternArray = [[NSMutableArray alloc] init]; - [numberFormats1_patternArray addObject:@"[57]"]; - NBNumberFormat *numberFormats1 = [[NBNumberFormat alloc] initWithPattern:@"([57]\\d)(\\d{3})(\\d{4})" withFormat:@"$1-$2-$3" withLeadingDigitsPatterns:numberFormats1_patternArray withNationalPrefixFormattingRule:@"0$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats1]; - - NSMutableArray *numberFormats2_patternArray = [[NSMutableArray alloc] init]; - [numberFormats2_patternArray addObject:@"153"]; - NBNumberFormat *numberFormats2 = [[NBNumberFormat alloc] initWithPattern:@"(153)(\\d{1,2})(\\d{3})(\\d{4})" withFormat:@"$1 $2 $3 $4" withLeadingDigitsPatterns:numberFormats2_patternArray withNationalPrefixFormattingRule:@"$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats2]; - - NSMutableArray *numberFormats3_patternArray = [[NSMutableArray alloc] init]; - [numberFormats3_patternArray addObject:@"1[7-9]"]; - NBNumberFormat *numberFormats3 = [[NBNumberFormat alloc] initWithPattern:@"(1)([7-9]\\d{2})(\\d{3})(\\d{3})" withFormat:@"$1-$2-$3-$4" withLeadingDigitsPatterns:numberFormats3_patternArray withNationalPrefixFormattingRule:@"$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats3]; - - NSMutableArray *numberFormats4_patternArray = [[NSMutableArray alloc] init]; - [numberFormats4_patternArray addObject:@"125"]; - NBNumberFormat *numberFormats4 = [[NBNumberFormat alloc] initWithPattern:@"(1255)(\\d{3})" withFormat:@"$1-$2" withLeadingDigitsPatterns:numberFormats4_patternArray withNationalPrefixFormattingRule:@"$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats4]; - - NSMutableArray *numberFormats5_patternArray = [[NSMutableArray alloc] init]; - [numberFormats5_patternArray addObject:@"120"]; - NBNumberFormat *numberFormats5 = [[NBNumberFormat alloc] initWithPattern:@"(1200)(\\d{3})(\\d{3})" withFormat:@"$1-$2-$3" withLeadingDigitsPatterns:numberFormats5_patternArray withNationalPrefixFormattingRule:@"$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats5]; - - NSMutableArray *numberFormats6_patternArray = [[NSMutableArray alloc] init]; - [numberFormats6_patternArray addObject:@"121"]; - NBNumberFormat *numberFormats6 = [[NBNumberFormat alloc] initWithPattern:@"(1212)(\\d{2})(\\d{2})" withFormat:@"$1-$2-$3" withLeadingDigitsPatterns:numberFormats6_patternArray withNationalPrefixFormattingRule:@"$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats6]; - - NSMutableArray *numberFormats7_patternArray = [[NSMutableArray alloc] init]; - [numberFormats7_patternArray addObject:@"15"]; - NBNumberFormat *numberFormats7 = [[NBNumberFormat alloc] initWithPattern:@"(1599)(\\d{6})" withFormat:@"$1-$2" withLeadingDigitsPatterns:numberFormats7_patternArray withNationalPrefixFormattingRule:@"$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats7]; - - NSMutableArray *numberFormats8_patternArray = [[NSMutableArray alloc] init]; - [numberFormats8_patternArray addObject:@"[2-689]"]; - NBNumberFormat *numberFormats8 = [[NBNumberFormat alloc] initWithPattern:@"(\\d{4})" withFormat:@"*$1" withLeadingDigitsPatterns:numberFormats8_patternArray withNationalPrefixFormattingRule:@"$1" whenFormatting:NO withDomesticCarrierCodeFormattingRule:nil]; - [numberFormats_FormatArray addObject:numberFormats8]; - self.numberFormats = numberFormats_FormatArray; - - NSMutableArray *intlNumberFormats_FormatArray = [[NSMutableArray alloc] init]; - self.intlNumberFormats = intlNumberFormats_FormatArray; - self.mainCountryForCode = NO; - self.leadingDigits = nil; - self.leadingZeroPossible = NO; - } - return self; -} -@end -