@ikas/storefront 1.0.15-alpha.1 → 1.0.15-alpha.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/build/index.js CHANGED
@@ -12018,1153 +12018,6 @@ function forEach$1(collection, iteratee) {
12018
12018
 
12019
12019
  var forEach_1 = forEach$1;
12020
12020
 
12021
- // Country list source: https://www.dhl.com/en/country_profile.html#.XwODEJNKjOQ
12022
- // Country abbreviation source: https://planetarynames.wr.usgs.gov/Abbreviations
12023
- // Postal code: https://gist.githubusercontent.com/jamesbar2/1c677c22df8f21e869cca7e439fc3f5b/raw/21662445653ac861f8ab81caa8cfaee3185aed15/postal-codes.json
12024
- // Postal code: https://en.wikipedia.org/wiki/List_of_postal_codes
12025
- // Country/territory items with no postal code regexes or ranges either do not require postal codes
12026
- // or there may not be enough information for that country/territory
12027
- var COUNTRY_ADDRESS_POSTALS = [
12028
- {
12029
- abbrev: "AF",
12030
- name: "Afghanistan",
12031
- postal: /[0-9]{4}/g,
12032
- },
12033
- {
12034
- abbrev: "AL",
12035
- name: "Albania",
12036
- postal: /(120|122)[0-9]{2}/g,
12037
- },
12038
- {
12039
- abbrev: "DZ",
12040
- name: "Algeria",
12041
- postal: /[0-9]{5}/g,
12042
- },
12043
- {
12044
- abbrev: "AS",
12045
- name: "American Samoa",
12046
- postal: /[0-9]{5}/g,
12047
- },
12048
- {
12049
- abbrev: "AD",
12050
- name: "Andorra",
12051
- postal: /[0-9]{5}/g,
12052
- },
12053
- {
12054
- abbrev: "AO",
12055
- name: "Angola",
12056
- },
12057
- {
12058
- abbrev: "AI",
12059
- name: "Anguilla",
12060
- postal: /AI-2640/g,
12061
- },
12062
- {
12063
- abbrev: "AG",
12064
- name: "Antigua and Barbuda",
12065
- },
12066
- {
12067
- abbrev: "AR",
12068
- name: "Argentina",
12069
- postal: /[A-Z]{1}[0-9]{4}[A-Z]{3}/g,
12070
- },
12071
- {
12072
- abbrev: "AM",
12073
- name: "Armenia",
12074
- postal: /[0-9]{4}/g,
12075
- },
12076
- {
12077
- abbrev: "AW",
12078
- name: "Aruba",
12079
- },
12080
- {
12081
- abbrev: "AU",
12082
- name: "Australia",
12083
- postal: /[0-9]{4}/g,
12084
- },
12085
- {
12086
- abbrev: "AT",
12087
- name: "Austria",
12088
- postal: /[0-9]{4}/g,
12089
- },
12090
- {
12091
- abbrev: "AZ",
12092
- name: "Azerbaijan",
12093
- postal: /[0-9]{4}/g,
12094
- },
12095
- {
12096
- abbrev: "BS",
12097
- name: "Bahamas",
12098
- },
12099
- {
12100
- abbrev: "BH",
12101
- name: "Bahrain",
12102
- },
12103
- {
12104
- abbrev: "BD",
12105
- name: "Bangladesh",
12106
- postal: /[0-9]{4}/g,
12107
- },
12108
- {
12109
- abbrev: "BB",
12110
- name: "Barbados",
12111
- postal: /BB[0-9]{5}/g,
12112
- },
12113
- {
12114
- abbrev: "BY",
12115
- name: "Belarus",
12116
- postal: /[0-9]{6}/g,
12117
- },
12118
- {
12119
- abbrev: "BE",
12120
- name: "Belgium",
12121
- postal: /[0-9]{4}/g,
12122
- },
12123
- {
12124
- abbrev: "BZ",
12125
- name: "Belize",
12126
- },
12127
- {
12128
- abbrev: "BJ",
12129
- name: "Benin",
12130
- },
12131
- {
12132
- abbrev: "BM",
12133
- name: "Bermuda",
12134
- postal: /[A-Z]{2}[0-9]{2}/g,
12135
- },
12136
- {
12137
- abbrev: "BT",
12138
- name: "Bhutan",
12139
- postal: /[0-9]{5}/g,
12140
- },
12141
- {
12142
- abbrev: "BO",
12143
- name: "Bolivia",
12144
- },
12145
- {
12146
- abbrev: "BQ",
12147
- name: "Bonaire",
12148
- },
12149
- {
12150
- abbrev: "BA",
12151
- name: "Bosnia and Herzegovina",
12152
- postal: /[0-9]{5}/g,
12153
- },
12154
- {
12155
- abbrev: "BW",
12156
- name: "Botswana",
12157
- },
12158
- {
12159
- abbrev: "BR",
12160
- name: "Brazil",
12161
- postal: /[0-9]{5}-[0-9]{3}/g,
12162
- },
12163
- {
12164
- abbrev: "BN",
12165
- name: "Brunei",
12166
- postal: /[A-Z]{2}[0-9]{4}/g,
12167
- },
12168
- {
12169
- abbrev: "BG",
12170
- name: "Bulgaria",
12171
- postal: /[0-9]{4}/g,
12172
- },
12173
- {
12174
- abbrev: "BF",
12175
- name: "Burkina Faso",
12176
- },
12177
- {
12178
- abbrev: "BI",
12179
- name: "Burundi",
12180
- },
12181
- {
12182
- abbrev: "KH",
12183
- name: "Cambodia",
12184
- postal: /[0-9]{5}/g,
12185
- },
12186
- {
12187
- abbrev: "CM",
12188
- name: "Cameroon",
12189
- },
12190
- {
12191
- abbrev: "CA",
12192
- name: "Canada",
12193
- postal: /[A-Z][0-9][A-Z] ?[0-9][A-Z][0-9]/g,
12194
- },
12195
- {
12196
- abbrev: "CI",
12197
- name: "Canary Islands",
12198
- postal: /[0-9]{5}/g,
12199
- },
12200
- {
12201
- abbrev: "CV",
12202
- name: "Cape Verde",
12203
- postal: /[0-9]{4}/g,
12204
- },
12205
- {
12206
- abbrev: "KY",
12207
- name: "Cayman Islands",
12208
- postal: /[A-Z]{2}[0-9]-[0-9]{4}/g,
12209
- },
12210
- {
12211
- abbrev: "CF",
12212
- name: "Central African Republic",
12213
- },
12214
- {
12215
- abbrev: "TD",
12216
- name: "Chad",
12217
- },
12218
- {
12219
- abbrev: "CI",
12220
- name: "Channel Islands",
12221
- postal: /[A-Z]{2}[0-9]{2}/g,
12222
- },
12223
- {
12224
- abbrev: "CL",
12225
- name: "Chile",
12226
- postal: /[0-9]{7}/g,
12227
- },
12228
- {
12229
- abbrev: "CN",
12230
- name: "China, People's Republic",
12231
- postal: /[0-9]{5}/g,
12232
- },
12233
- {
12234
- abbrev: "CO",
12235
- name: "Colombia",
12236
- postal: /[0-9]{6}/g,
12237
- },
12238
- {
12239
- abbrev: "KM",
12240
- name: "Comoros",
12241
- },
12242
- {
12243
- abbrev: "CG",
12244
- name: "Congo",
12245
- },
12246
- {
12247
- abbrev: "CD",
12248
- name: "Congo, The Democratic Republic of",
12249
- },
12250
- {
12251
- abbrev: "CK",
12252
- name: "Cook Islands",
12253
- },
12254
- {
12255
- abbrev: "CR",
12256
- name: "Costa Rica",
12257
- postal: /[0-9]{5}/g,
12258
- },
12259
- {
12260
- abbrev: "CI",
12261
- name: "Côte d'Ivoire",
12262
- },
12263
- {
12264
- abbrev: "HR",
12265
- name: "Croatia",
12266
- postal: /[0-9]{5}/g,
12267
- },
12268
- {
12269
- abbrev: "CU",
12270
- name: "Cuba",
12271
- postal: /[0-9]{5}/g,
12272
- },
12273
- {
12274
- abbrev: "CW",
12275
- name: "Curacao",
12276
- },
12277
- {
12278
- abbrev: "CY",
12279
- name: "Cyprus",
12280
- postal: /[0-9]{4}/g,
12281
- },
12282
- {
12283
- abbrev: "CZ",
12284
- name: "Czech Republic",
12285
- postal: /[0-9]{3} [0-9]{2}/g,
12286
- },
12287
- {
12288
- abbrev: "DK",
12289
- name: "Denmark",
12290
- postal: /[0-9]{5}/g,
12291
- },
12292
- {
12293
- abbrev: "DJ",
12294
- name: "Djibouti",
12295
- },
12296
- {
12297
- abbrev: "DM",
12298
- name: "Dominica",
12299
- },
12300
- {
12301
- abbrev: "DO",
12302
- name: "Dominican Republic",
12303
- postal: /[0-9]{5}/g,
12304
- },
12305
- {
12306
- abbrev: "TL",
12307
- name: "East Timor",
12308
- },
12309
- {
12310
- abbrev: "EC",
12311
- name: "Ecuador",
12312
- postal: /[0-9]{6}/g,
12313
- },
12314
- {
12315
- abbrev: "EG",
12316
- name: "Egypt",
12317
- postal: /[0-9]{5}/g,
12318
- },
12319
- {
12320
- abbrev: "SV",
12321
- name: "El Salvador",
12322
- postal: /[0-9]{4}/g,
12323
- },
12324
- {
12325
- abbrev: "ER",
12326
- name: "Eritrea",
12327
- },
12328
- {
12329
- abbrev: "EE",
12330
- name: "Estonia",
12331
- postal: /[0-9]{5}/g,
12332
- },
12333
- {
12334
- abbrev: "ET",
12335
- name: "Ethiopia",
12336
- postal: /[0-9]{4}/g,
12337
- },
12338
- {
12339
- abbrev: "FK",
12340
- name: "Falkland Islands",
12341
- postal: /FIQQ 1ZZ/g,
12342
- },
12343
- {
12344
- abbrev: "FO",
12345
- name: "Faroe Islands",
12346
- postal: /[0-9]{3}/g,
12347
- },
12348
- {
12349
- abbrev: "FJ",
12350
- name: "Fiji",
12351
- },
12352
- {
12353
- abbrev: "FI",
12354
- name: "Finland",
12355
- postal: /[0-9]{5}/g,
12356
- },
12357
- {
12358
- abbrev: "FR",
12359
- name: "France",
12360
- postal: /[0-9]{5}/g,
12361
- },
12362
- {
12363
- abbrev: "PF",
12364
- name: "French Polynesia",
12365
- postal: /987[0-9]{2}/g,
12366
- range: ["98700", "98790"],
12367
- },
12368
- {
12369
- abbrev: "GA",
12370
- name: "Gabon",
12371
- },
12372
- {
12373
- abbrev: "GM",
12374
- name: "Gambia",
12375
- },
12376
- {
12377
- abbrev: "GE",
12378
- name: "Georgia",
12379
- },
12380
- {
12381
- abbrev: "DE",
12382
- name: "Germany",
12383
- postal: /[0-9]{5}/g,
12384
- },
12385
- {
12386
- abbrev: "GH",
12387
- name: "Ghana",
12388
- },
12389
- {
12390
- abbrev: "GI",
12391
- name: "Gibraltar",
12392
- postal: /GX11 1AA/g,
12393
- },
12394
- {
12395
- abbrev: "GR",
12396
- name: "Greece",
12397
- postal: /[0-9]{3} [0-9]{2}/g,
12398
- },
12399
- {
12400
- abbrev: "GL",
12401
- name: "Greenland",
12402
- postal: /[0-9]{4}/g,
12403
- },
12404
- {
12405
- abbrev: "GD",
12406
- name: "Grenada",
12407
- },
12408
- {
12409
- abbrev: "GP",
12410
- name: "Guadeloupe",
12411
- postal: /971[0-9]{2}/g,
12412
- range: ["97100", "97190"],
12413
- },
12414
- {
12415
- abbrev: "GU",
12416
- name: "Guam",
12417
- // US postal code
12418
- // https://stackoverflow.com/questions/2577236/regex-for-zip-code
12419
- postal: /^\d{5}(?:[-\s]\d{4})?$/g,
12420
- range: ["96910", "96932"],
12421
- },
12422
- {
12423
- abbrev: "GT",
12424
- name: "Guatemala",
12425
- postal: /[0-9]{5}/g,
12426
- },
12427
- {
12428
- abbrev: "GG",
12429
- name: "Guernsey",
12430
- // UK postal code
12431
- // https://stackoverflow.com/questions/164979/regex-for-matching-uk-postcodes
12432
- postal: /([Gg][Ii][Rr] 0[Aa]{2})|((([A-Za-z][0-9]{1,2})|(([A-Za-z][A-Ha-hJ-Yj-y][0-9]{1,2})|(([A-Za-z][0-9][A-Za-z])|([A-Za-z][A-Ha-hJ-Yj-y][0-9][A-Za-z]?))))\s?[0-9][A-Za-z]{2})/g,
12433
- },
12434
- {
12435
- abbrev: "GW",
12436
- name: "Guinea-Bissau",
12437
- postal: /[0-9]{4}/g,
12438
- },
12439
- {
12440
- abbrev: "GQ",
12441
- name: "Guinea-Equatorial",
12442
- },
12443
- {
12444
- abbrev: "GN",
12445
- name: "Guinea Republic",
12446
- postal: /[0-9]{3}/g,
12447
- },
12448
- {
12449
- abbrev: "GY",
12450
- name: "Guyana (British)",
12451
- },
12452
- {
12453
- abbrev: "GF",
12454
- name: "Guyana (French)",
12455
- postal: /973[0-9]{2}/g,
12456
- range: ["97300", "97390"],
12457
- },
12458
- {
12459
- abbrev: "HT",
12460
- name: "Haiti",
12461
- postal: /[0-9]{4}/g,
12462
- },
12463
- {
12464
- abbrev: "HN",
12465
- name: "Honduras",
12466
- postal: /[0-9]{5}/g,
12467
- },
12468
- {
12469
- abbrev: "HK",
12470
- name: "Hong Kong",
12471
- },
12472
- {
12473
- abbrev: "HU",
12474
- name: "Hungary",
12475
- postal: /[0-9]{4}/g,
12476
- },
12477
- {
12478
- abbrev: "IS",
12479
- name: "Iceland",
12480
- postal: /[0-9]{3}/g,
12481
- },
12482
- {
12483
- abbrev: "IN",
12484
- name: "India",
12485
- // https://stackoverflow.com/questions/33865525/indian-pincode-validation-regex-only-six-digits-shouldnt-start-with-0
12486
- postal: /^[1-9][0-9]{5}$/g,
12487
- },
12488
- {
12489
- abbrev: "ID",
12490
- name: "Indonesia",
12491
- postal: /[0-9]{5}/g,
12492
- },
12493
- {
12494
- abbrev: "IR",
12495
- name: "Iran",
12496
- postal: /[0-9]{5}/g,
12497
- },
12498
- {
12499
- abbrev: "IQ",
12500
- name: "Iraq",
12501
- postal: /[0-9]{5}/g,
12502
- },
12503
- {
12504
- abbrev: "IE",
12505
- name: "Ireland, Republic of",
12506
- // https://stackoverflow.com/questions/33391412/validation-for-irish-eircode
12507
- postal: /(?:^[AC-FHKNPRTV-Y][0-9]{2}|D6W)[ -]?[0-9AC-FHKNPRTV-Y]{4}$/g,
12508
- },
12509
- {
12510
- abbrev: "FK",
12511
- name: "Islas Malvinas",
12512
- postal: /FIQQ 1ZZ/g,
12513
- },
12514
- {
12515
- abbrev: "IL",
12516
- name: "Israel",
12517
- postal: /[0-9]{5}|[0-9]{7}/g,
12518
- },
12519
- {
12520
- abbrev: "IT",
12521
- name: "Italy",
12522
- postal: /[0-9]{5}/g,
12523
- },
12524
- {
12525
- abbrev: "CI",
12526
- name: "Ivory Coast",
12527
- },
12528
- {
12529
- abbrev: "JM",
12530
- name: "Jamaica",
12531
- },
12532
- {
12533
- abbrev: "JP",
12534
- name: "Japan",
12535
- postal: /[0-9]{3}-[0-9]{4}/g,
12536
- },
12537
- {
12538
- abbrev: "JE",
12539
- name: "Jersey",
12540
- postal: /([Gg][Ii][Rr] 0[Aa]{2})|((([A-Za-z][0-9]{1,2})|(([A-Za-z][A-Ha-hJ-Yj-y][0-9]{1,2})|(([A-Za-z][0-9][A-Za-z])|([A-Za-z][A-Ha-hJ-Yj-y][0-9][A-Za-z]?))))\s?[0-9][A-Za-z]{2})/g,
12541
- },
12542
- {
12543
- abbrev: "JO",
12544
- name: "Jordan",
12545
- postal: /[0-9]{5}/g,
12546
- },
12547
- {
12548
- abbrev: "KZ",
12549
- name: "Kazakhstan",
12550
- postal: /[0-9]{6}/g,
12551
- },
12552
- {
12553
- abbrev: "KE",
12554
- name: "Kenya",
12555
- postal: /[0-9]{5}/g,
12556
- },
12557
- {
12558
- abbrev: "KI",
12559
- name: "Kiribati",
12560
- },
12561
- {
12562
- abbrev: "KR",
12563
- name: "Korea, Republic of",
12564
- postal: /[0-9]{5}/g,
12565
- },
12566
- {
12567
- abbrev: "KP",
12568
- name: "Korea, The D.P.R of",
12569
- },
12570
- {
12571
- abbrev: "XK",
12572
- name: "Kosovo",
12573
- postal: /[0-9]{5}/g,
12574
- },
12575
- {
12576
- abbrev: "KW",
12577
- name: "Kuwait",
12578
- postal: /[0-9]{5}/g,
12579
- },
12580
- {
12581
- abbrev: "KG",
12582
- name: "Kyrgyzstan",
12583
- postal: /[0-9]{6}/g,
12584
- },
12585
- {
12586
- abbrev: "LA",
12587
- name: "Laos",
12588
- postal: /[0-9]{5}/g,
12589
- },
12590
- {
12591
- abbrev: "LV",
12592
- name: "Latvia",
12593
- postal: /LV-[0-9]{4}/g,
12594
- },
12595
- {
12596
- abbrev: "LB",
12597
- name: "Lebanon",
12598
- postal: /[0-9]{4} [0-9]{4}/g,
12599
- },
12600
- {
12601
- abbrev: "LS",
12602
- name: "Lesotho",
12603
- postal: /[0-9]{3}/g,
12604
- },
12605
- {
12606
- abbrev: "LR",
12607
- name: "Liberia",
12608
- postal: /[0-9]{4}/g,
12609
- },
12610
- {
12611
- abbrev: "LY",
12612
- name: "Libya",
12613
- },
12614
- {
12615
- abbrev: "LI",
12616
- name: "Liechtenstein",
12617
- postal: /[0-9]{4}/g,
12618
- range: ["9485", "9498"],
12619
- },
12620
- {
12621
- abbrev: "LT",
12622
- name: "Lithuania",
12623
- postal: /LT-[0-9]{5}/g,
12624
- },
12625
- {
12626
- abbrev: "LU",
12627
- name: "Luxembourg",
12628
- postal: /[0-9]{4}/g,
12629
- },
12630
- {
12631
- abbrev: "MO",
12632
- name: "Macau",
12633
- },
12634
- {
12635
- abbrev: "MK",
12636
- name: "Macedonia, Republic of",
12637
- postal: /[0-9]{4}/g,
12638
- },
12639
- {
12640
- abbrev: "MG",
12641
- name: "Madagascar",
12642
- postal: /[0-9]{3}/g,
12643
- },
12644
- {
12645
- abbrev: "MW",
12646
- name: "Malawi",
12647
- },
12648
- {
12649
- abbrev: "MY",
12650
- name: "Malaysia",
12651
- postal: /[0-9]{5}/g,
12652
- },
12653
- {
12654
- abbrev: "MV",
12655
- name: "Maldives",
12656
- postal: /[0-9]{5}/g,
12657
- },
12658
- {
12659
- abbrev: "ML",
12660
- name: "Mali",
12661
- },
12662
- {
12663
- abbrev: "MT",
12664
- name: "Malta",
12665
- postal: /[A-Z]{3} [0-9]{4}/g,
12666
- },
12667
- {
12668
- abbrev: "MH",
12669
- name: "Marshall Islands",
12670
- postal: /^\d{5}(?:[-\s]\d{4})?$/g,
12671
- range: ["96960", "96970"],
12672
- },
12673
- {
12674
- abbrev: "MQ",
12675
- name: "Martinique",
12676
- postal: /972[0-9]{2}/g,
12677
- range: ["97200", "97290"],
12678
- },
12679
- {
12680
- abbrev: "MR",
12681
- name: "Mauritania",
12682
- },
12683
- {
12684
- abbrev: "MU",
12685
- name: "Mauritius",
12686
- postal: /[0-9]{5}/g,
12687
- },
12688
- {
12689
- abbrev: "YT",
12690
- name: "Mayotte",
12691
- postal: /976[0-9]{2}/g,
12692
- range: ["97600", "97690"],
12693
- },
12694
- {
12695
- abbrev: "MX",
12696
- name: "Mexico",
12697
- postal: /[0-9]{5}/g,
12698
- },
12699
- {
12700
- abbrev: "MD",
12701
- name: "Moldova, Republic of",
12702
- postal: /MD-?[0-9]{4}/g,
12703
- },
12704
- {
12705
- abbrev: "MC",
12706
- name: "Monaco",
12707
- postal: /980[0-9]{2}/g,
12708
- },
12709
- {
12710
- abbrev: "MN",
12711
- name: "Mongolia",
12712
- postal: /[0-9]{5}/g,
12713
- },
12714
- {
12715
- abbrev: "ME",
12716
- name: "Montenegro",
12717
- postal: /[0-9]{5}/g,
12718
- },
12719
- {
12720
- abbrev: "MS",
12721
- name: "Montserrat",
12722
- postal: /MSR [0-9]{4}/g,
12723
- range: ["MSR 1110", "MSR 1350"],
12724
- },
12725
- {
12726
- abbrev: "MA",
12727
- name: "Morocco",
12728
- postal: /[0-9]{5}/g,
12729
- },
12730
- {
12731
- abbrev: "MZ",
12732
- name: "Mozambique",
12733
- postal: /[0-9]{4}/g,
12734
- },
12735
- {
12736
- abbrev: "MM",
12737
- name: "Myanmar",
12738
- postal: /[0-9]{5}/g,
12739
- },
12740
- {
12741
- abbrev: "NA",
12742
- name: "Namibia",
12743
- },
12744
- {
12745
- abbrev: "NR",
12746
- name: "Nauru",
12747
- },
12748
- {
12749
- abbrev: "NP",
12750
- name: "Nepal",
12751
- postal: /[0-9]{5}/g,
12752
- },
12753
- {
12754
- abbrev: "NL",
12755
- name: "Netherlands",
12756
- // https://rgxdb.com/r/4W9GV8AC
12757
- postal: /^(?:NL-)?(\d{4})\s*([A-Z]{2})$/i,
12758
- },
12759
- {
12760
- abbrev: "NC",
12761
- name: "New Caledonia",
12762
- postal: /988[0-9]{2}/g,
12763
- range: ["96950", "96952"],
12764
- },
12765
- {
12766
- abbrev: "NZ",
12767
- name: "New Zealand",
12768
- postal: /[0-9]{4}/g,
12769
- },
12770
- {
12771
- abbrev: "NI",
12772
- name: "Nicaragua",
12773
- },
12774
- {
12775
- abbrev: "NE",
12776
- name: "Niger",
12777
- postal: /[0-9]{4}/g,
12778
- },
12779
- {
12780
- abbrev: "NG",
12781
- name: "Nigeria",
12782
- postal: /[0-9]{6}/g,
12783
- },
12784
- {
12785
- abbrev: "NU",
12786
- name: "Niue",
12787
- },
12788
- {
12789
- abbrev: "MP",
12790
- name: "Northern Mariana Islands",
12791
- postal: /^\d{5}(?:[-\s]\d{4})?$/g,
12792
- },
12793
- {
12794
- abbrev: "NO",
12795
- name: "Norway",
12796
- postal: /[0-9]{4}/g,
12797
- },
12798
- {
12799
- abbrev: "OM",
12800
- name: "Oman",
12801
- postal: /[0-9]{3}/g,
12802
- },
12803
- {
12804
- abbrev: "PK",
12805
- name: "Pakistan",
12806
- postal: /[0-9]{5}/g,
12807
- },
12808
- {
12809
- abbrev: "PW",
12810
- name: "Palau",
12811
- postal: /^\d{5}(?:[-\s]\d{4})?$/g,
12812
- },
12813
- {
12814
- abbrev: "PA",
12815
- name: "Panama",
12816
- postal: /[0-9]{4}/g,
12817
- },
12818
- {
12819
- abbrev: "PG",
12820
- name: "Papua New Guinea",
12821
- postal: /[0-9]{3}/g,
12822
- },
12823
- {
12824
- abbrev: "PY",
12825
- name: "Paraguay",
12826
- postal: /[0-9]{4}/g,
12827
- },
12828
- {
12829
- abbrev: "PE",
12830
- name: "Peru",
12831
- postal: /[0-9]{5}/g,
12832
- },
12833
- {
12834
- abbrev: "PH",
12835
- name: "Philippines",
12836
- postal: /[0-9]{4}/g,
12837
- },
12838
- {
12839
- abbrev: "PL",
12840
- name: "Poland",
12841
- postal: /[0-9]{2}-[0-9]{3}/g,
12842
- },
12843
- {
12844
- abbrev: "PT",
12845
- name: "Portugal",
12846
- postal: /[0-9]{4}-[0-9]{3}/g,
12847
- },
12848
- {
12849
- abbrev: "PR",
12850
- name: "Puerto Rico",
12851
- postal: /^\d{5}(?:[-\s]\d{4})?$/g,
12852
- },
12853
- {
12854
- abbrev: "QA",
12855
- name: "Qatar",
12856
- },
12857
- {
12858
- abbrev: "RE",
12859
- name: "Réunion",
12860
- postal: /974[0-9]{2}/g,
12861
- range: ["97400", "97490"],
12862
- },
12863
- {
12864
- abbrev: "RO",
12865
- name: "Romania",
12866
- postal: /[0-9]{6}/g,
12867
- },
12868
- {
12869
- abbrev: "RU",
12870
- name: "Russian Federation",
12871
- postal: /[0-9]{6}/g,
12872
- },
12873
- {
12874
- abbrev: "RW",
12875
- name: "Rwanda",
12876
- },
12877
- {
12878
- abbrev: "MP",
12879
- name: "Saipan",
12880
- postal: /96950/g,
12881
- },
12882
- {
12883
- abbrev: "WS",
12884
- name: "Samoa",
12885
- postal: /WS[0-9]{4}/g,
12886
- },
12887
- {
12888
- abbrev: "ST",
12889
- name: "Sao Tome and Principe",
12890
- },
12891
- {
12892
- abbrev: "SA",
12893
- name: "Saudi Arabia",
12894
- postal: /[0-9]{5}(-[0-9]{4})?/g,
12895
- },
12896
- {
12897
- abbrev: "SN",
12898
- name: "Senegal",
12899
- postal: /[0-9]{5}/g,
12900
- },
12901
- {
12902
- abbrev: "RS",
12903
- name: "Serbia",
12904
- postal: /[0-9]{5}/g,
12905
- },
12906
- {
12907
- abbrev: "SC",
12908
- name: "Seychelles",
12909
- },
12910
- {
12911
- abbrev: "SL",
12912
- name: "Sierra Leone",
12913
- },
12914
- {
12915
- abbrev: "SG",
12916
- name: "Singapore",
12917
- postal: /[0-9]{6}/g,
12918
- },
12919
- {
12920
- abbrev: "SK",
12921
- name: "Slovakia",
12922
- postal: /[0-9]{3} [0-9]{2}/g,
12923
- },
12924
- {
12925
- abbrev: "SI",
12926
- name: "Slovenia",
12927
- postal: /[0-9]{4}/g,
12928
- },
12929
- {
12930
- abbrev: "SB",
12931
- name: "Solomon Islands",
12932
- },
12933
- {
12934
- abbrev: "SO",
12935
- name: "Somalia",
12936
- postal: /[A-Z]{2} [0-9]{5}/g,
12937
- },
12938
- {
12939
- abbrev: "ZA",
12940
- name: "South Africa",
12941
- postal: /[0-9]{4}/g,
12942
- },
12943
- {
12944
- abbrev: "SS",
12945
- name: "South Sudan",
12946
- },
12947
- {
12948
- abbrev: "ES",
12949
- name: "Spain",
12950
- postal: /[0-9]{5}/g,
12951
- },
12952
- {
12953
- abbrev: "LK",
12954
- name: "Sri Lanka",
12955
- postal: /[0-9]{4}/g,
12956
- },
12957
- {
12958
- abbrev: "BL",
12959
- name: "St. Barthélemy",
12960
- postal: /[0-9]{5}/g,
12961
- range: ["97100", "97190"],
12962
- },
12963
- {
12964
- abbrev: "VI",
12965
- name: "St. Croix",
12966
- postal: /[0-9]{5}/g,
12967
- },
12968
- {
12969
- abbrev: "SE",
12970
- name: "St. Eustatius",
12971
- },
12972
- {
12973
- abbrev: "SH",
12974
- name: "St. Helena",
12975
- postal: /STHL 1ZZ/g,
12976
- },
12977
- {
12978
- abbrev: "AG",
12979
- name: "St. John",
12980
- postal: /^\d{5}(?:[-\s]\d{4})?$/g,
12981
- },
12982
- {
12983
- abbrev: "KN",
12984
- name: "St. Kitts and Nevis",
12985
- postal: /[A-Z]{2}[0-9]{4}/g,
12986
- },
12987
- {
12988
- abbrev: "LC",
12989
- name: "St. Lucia",
12990
- postal: /[A-Z]{2}[0-9]{2} [0-9]{3}/g,
12991
- },
12992
- {
12993
- abbrev: "SX",
12994
- name: "St. Maarten",
12995
- },
12996
- {
12997
- abbrev: "VI",
12998
- name: "St. Thomas",
12999
- },
13000
- {
13001
- abbrev: "VC",
13002
- name: "St. Vincent and the Grenadines",
13003
- postal: /VC[0-9]{4}/g,
13004
- },
13005
- {
13006
- abbrev: "SD",
13007
- name: "Sudan",
13008
- postal: /[0-9]{5}/g,
13009
- },
13010
- {
13011
- abbrev: "SR",
13012
- name: "Suriname",
13013
- },
13014
- {
13015
- abbrev: "SZ",
13016
- name: "Swaziland",
13017
- postal: /[A-Z]{1}[0-9]{3}/g,
13018
- },
13019
- {
13020
- abbrev: "SE",
13021
- name: "Sweden",
13022
- postal: /[0-9]{3} [0-9]{2}/g,
13023
- },
13024
- {
13025
- abbrev: "CH",
13026
- name: "Switzerland",
13027
- postal: /[0-9]{4}/g,
13028
- },
13029
- {
13030
- abbrev: "SY",
13031
- name: "Syria",
13032
- },
13033
- {
13034
- abbrev: "PF",
13035
- name: "Tahiti",
13036
- postal: /[0-9]{5}/g,
13037
- },
13038
- {
13039
- abbrev: "TW",
13040
- name: "Taiwan",
13041
- postal: /[0-9]{3}(-[0-9]{2})?/g,
13042
- },
13043
- {
13044
- abbrev: "TZ",
13045
- name: "Tanzania",
13046
- postal: /[0-9]{5}/g,
13047
- },
13048
- {
13049
- abbrev: "TH",
13050
- name: "Thailand",
13051
- postal: /[0-9]{5}/g,
13052
- },
13053
- {
13054
- abbrev: "TG",
13055
- name: "Togo",
13056
- },
13057
- {
13058
- abbrev: "TO",
13059
- name: "Tonga",
13060
- },
13061
- {
13062
- abbrev: "VG",
13063
- name: "Tortola",
13064
- postal: /VG[0-9]{4}/g,
13065
- },
13066
- {
13067
- abbrev: "TT",
13068
- name: "Trinidad and Tobago",
13069
- postal: /[0-9]{6}/g,
13070
- },
13071
- {
13072
- abbrev: "TN",
13073
- name: "Tunisia",
13074
- postal: /[0-9]{4}/g,
13075
- },
13076
- {
13077
- abbrev: "TR",
13078
- name: "Turkey",
13079
- postal: /[0-9]{5}/g,
13080
- },
13081
- {
13082
- abbrev: "TM",
13083
- name: "Turkmenistan",
13084
- postal: /[0-9]{6}/g,
13085
- },
13086
- {
13087
- abbrev: "TC",
13088
- name: "Turks and Caicos Islands",
13089
- postal: /TKCA 1ZZ/g,
13090
- },
13091
- {
13092
- abbrev: "TV",
13093
- name: "Tuvalu",
13094
- },
13095
- {
13096
- abbrev: "UG",
13097
- name: "Uganda",
13098
- },
13099
- {
13100
- abbrev: "UA",
13101
- name: "Ukraine",
13102
- postal: /[0-9]{5}/g,
13103
- },
13104
- {
13105
- abbrev: "AE",
13106
- name: "United Arab Emirates",
13107
- },
13108
- {
13109
- abbrev: "GB",
13110
- name: "United Kingdom",
13111
- postal: /([Gg][Ii][Rr] 0[Aa]{2})|((([A-Za-z][0-9]{1,2})|(([A-Za-z][A-Ha-hJ-Yj-y][0-9]{1,2})|(([A-Za-z][0-9][A-Za-z])|([A-Za-z][A-Ha-hJ-Yj-y][0-9][A-Za-z]?))))\s?[0-9][A-Za-z]{2})/g,
13112
- },
13113
- {
13114
- abbrev: "US",
13115
- name: "United States of America",
13116
- postal: /^\d{5}(?:[-\s]\d{4})?$/g,
13117
- },
13118
- {
13119
- abbrev: "UY",
13120
- name: "Uruguay",
13121
- postal: /[0-9]{5}/g,
13122
- },
13123
- {
13124
- abbrev: "UZ",
13125
- name: "Uzbekistan",
13126
- postal: /[0-9]{6}/g,
13127
- },
13128
- {
13129
- abbrev: "VU",
13130
- name: "Vanuatu",
13131
- },
13132
- {
13133
- abbrev: "VE",
13134
- name: "Venezuela",
13135
- postal: /[0-9]{4}(-[A-Z]{1})?/g,
13136
- },
13137
- {
13138
- abbrev: "VN",
13139
- name: "Vietnam",
13140
- postal: /[0-9]{6}/g,
13141
- },
13142
- {
13143
- abbrev: "VG",
13144
- name: "Virgin Islands (British)",
13145
- postal: /VG[0-9]{4}/g,
13146
- },
13147
- {
13148
- abbrev: "VI",
13149
- name: "Virgin Islands (US)",
13150
- range: ["00801", "00851"],
13151
- postal: /^\d{5}(?:[-\s]\d{4})?$/g,
13152
- },
13153
- {
13154
- abbrev: "YE",
13155
- name: "Yemen",
13156
- },
13157
- {
13158
- abbrev: "ZM",
13159
- name: "Zambia",
13160
- postal: /[0-9]{5}/g,
13161
- },
13162
- {
13163
- abbrev: "ZW",
13164
- name: "Zimbabwe",
13165
- },
13166
- ];
13167
-
13168
12021
  var stringToSlug = function (str) {
13169
12022
  str = str.replace(/^\s+|\s+$/g, ""); // trim
13170
12023
  str = str.toLocaleLowerCase("tr-TR");
@@ -13256,16 +12109,6 @@ function tryForEach(items, callback, printErrors) {
13256
12109
  console.error(err);
13257
12110
  }
13258
12111
  });
13259
- }
13260
- function isValidPostalCode(postalCode, iso2) {
13261
- if (!iso2)
13262
- return !!postalCode;
13263
- var postalCodeEntry = COUNTRY_ADDRESS_POSTALS.find(function (a) { return a.abbrev === iso2; });
13264
- if (postalCodeEntry && postalCodeEntry.postal && postalCode) {
13265
- var regex = new RegExp(postalCodeEntry.postal);
13266
- return regex.test(postalCode);
13267
- }
13268
- return !!postalCode;
13269
12112
  }
13270
12113
 
13271
12114
  var format = function (p, n, x, s, c) {
@@ -15257,13 +14100,10 @@ var IkasOrderAddress = /** @class */ (function () {
15257
14100
  });
15258
14101
  Object.defineProperty(IkasOrderAddress.prototype, "validationResult", {
15259
14102
  get: function () {
15260
- var _a, _b, _c, _d, _e, _f;
14103
+ var _a, _b, _c, _d, _e;
15261
14104
  var isValidPhone = !!this.phone &&
15262
14105
  this.phone.length >= 10 &&
15263
14106
  validatePhoneNumber(this.phone);
15264
- var _isValidPostalCode = !!this.postalCode &&
15265
- !!this.country &&
15266
- isValidPostalCode(this.postalCode, this.country.iso2);
15267
14107
  var results = {
15268
14108
  firstName: !!this.firstName,
15269
14109
  lastName: !!this.lastName,
@@ -15280,13 +14120,10 @@ var IkasOrderAddress = /** @class */ (function () {
15280
14120
  ? isValidPhone
15281
14121
  : true,
15282
14122
  postalCode: ((_d = this.checkoutSettings) === null || _d === void 0 ? void 0 : _d.postalCodeRequirement) ===
15283
- IkasCheckoutRequirementEnum.MANDATORY ||
15284
- (((_e = this.checkoutSettings) === null || _e === void 0 ? void 0 : _e.postalCodeRequirement) ===
15285
- IkasCheckoutRequirementEnum.OPTIONAL &&
15286
- this.postalCode)
15287
- ? _isValidPostalCode
14123
+ IkasCheckoutRequirementEnum.MANDATORY
14124
+ ? !!this.postalCode
15288
14125
  : true,
15289
- identityNumber: ((_f = this.checkoutSettings) === null || _f === void 0 ? void 0 : _f.identityNumberRequirement) ===
14126
+ identityNumber: ((_e = this.checkoutSettings) === null || _e === void 0 ? void 0 : _e.identityNumberRequirement) ===
15290
14127
  IkasCheckoutRequirementEnum.MANDATORY
15291
14128
  ? !!this.identityNumber
15292
14129
  : true,
@@ -21595,13 +20432,10 @@ var IkasCustomerAddress = /** @class */ (function () {
21595
20432
  });
21596
20433
  Object.defineProperty(IkasCustomerAddress.prototype, "validationResult", {
21597
20434
  get: function () {
21598
- var _a, _b, _c, _d, _e, _f;
20435
+ var _a, _b, _c, _d, _e;
21599
20436
  var isValidPhone = !!this.phone &&
21600
20437
  this.phone.length >= 10 &&
21601
20438
  validatePhoneNumber(this.phone);
21602
- var _isValidPostalCode = !!this.postalCode &&
21603
- !!this.country &&
21604
- isValidPostalCode(this.postalCode, this.country.iso2);
21605
20439
  var results = {
21606
20440
  firstName: !!this.firstName,
21607
20441
  lastName: !!this.lastName,
@@ -21618,13 +20452,10 @@ var IkasCustomerAddress = /** @class */ (function () {
21618
20452
  ? isValidPhone
21619
20453
  : true,
21620
20454
  postalCode: ((_d = this.checkoutSettings) === null || _d === void 0 ? void 0 : _d.postalCodeRequirement) ===
21621
- IkasCheckoutRequirementEnum.MANDATORY ||
21622
- (((_e = this.checkoutSettings) === null || _e === void 0 ? void 0 : _e.postalCodeRequirement) ===
21623
- IkasCheckoutRequirementEnum.OPTIONAL &&
21624
- this.postalCode)
21625
- ? _isValidPostalCode
20455
+ IkasCheckoutRequirementEnum.MANDATORY
20456
+ ? !!this.postalCode
21626
20457
  : true,
21627
- identityNumber: ((_f = this.checkoutSettings) === null || _f === void 0 ? void 0 : _f.identityNumberRequirement) ===
20458
+ identityNumber: ((_e = this.checkoutSettings) === null || _e === void 0 ? void 0 : _e.identityNumberRequirement) ===
21628
20459
  IkasCheckoutRequirementEnum.MANDATORY
21629
20460
  ? !!this.identityNumber
21630
20461
  : true,
@@ -75590,7 +74421,6 @@ exports.findAllIndexes = findAllIndexes;
75590
74421
  exports.formatDate = formatDate;
75591
74422
  exports.formatMoney = formatMoney;
75592
74423
  exports.getCurrencySymbol = getCurrencySymbol;
75593
- exports.isValidPostalCode = isValidPostalCode;
75594
74424
  exports.parseRangeStr = parseRangeStr;
75595
74425
  exports.pascalCase = pascalCase;
75596
74426
  exports.stringSorter = stringSorter;