regions-config 1.0.0

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/dist/index.mjs ADDED
@@ -0,0 +1,1539 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __defProps = Object.defineProperties;
3
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
4
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
7
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8
+ var __spreadValues = (a, b) => {
9
+ for (var prop in b || (b = {}))
10
+ if (__hasOwnProp.call(b, prop))
11
+ __defNormalProp(a, prop, b[prop]);
12
+ if (__getOwnPropSymbols)
13
+ for (var prop of __getOwnPropSymbols(b)) {
14
+ if (__propIsEnum.call(b, prop))
15
+ __defNormalProp(a, prop, b[prop]);
16
+ }
17
+ return a;
18
+ };
19
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
+ var __export = (target, all) => {
21
+ for (var name in all)
22
+ __defProp(target, name, { get: all[name], enumerable: true });
23
+ };
24
+
25
+ // src/const.ts
26
+ var GROUP_REGIONS = {
27
+ WORLD: 254,
28
+ EUROPE: 259,
29
+ US_CANADA_JAPAN: 272,
30
+ REST_OF_THE_WORLD: 273,
31
+ US_CANADA: 274
32
+ };
33
+ var EUROPE_COUNTRIES = [
34
+ 4,
35
+ 5,
36
+ 6,
37
+ 14,
38
+ 21,
39
+ 22,
40
+ 31,
41
+ 34,
42
+ 38,
43
+ 49,
44
+ 50,
45
+ 60,
46
+ 63,
47
+ 66,
48
+ 70,
49
+ 71,
50
+ 1,
51
+ 73,
52
+ 76,
53
+ 78,
54
+ 82,
55
+ 86,
56
+ 98,
57
+ 104,
58
+ 262,
59
+ 112,
60
+ 108,
61
+ 124,
62
+ 129,
63
+ 130,
64
+ 134,
65
+ 138,
66
+ 139,
67
+ 142,
68
+ 143,
69
+ 144,
70
+ 146,
71
+ 152,
72
+ 154,
73
+ 160,
74
+ 161,
75
+ 163,
76
+ 174,
77
+ 179,
78
+ 189,
79
+ 190,
80
+ 193,
81
+ 195,
82
+ 196,
83
+ 200,
84
+ 202,
85
+ 207,
86
+ 225,
87
+ 226,
88
+ 240,
89
+ 242
90
+ ];
91
+ var US_CANADA_JAPAN_COUNTRIES = [72, 45, 127];
92
+ var US_CANADA_COUNTRIES = [72, 45];
93
+ var WORLD_COUNTRIES = [
94
+ 3,
95
+ 8,
96
+ 10,
97
+ 12,
98
+ 15,
99
+ 16,
100
+ 17,
101
+ 20,
102
+ 23,
103
+ 25,
104
+ 26,
105
+ 24,
106
+ 28,
107
+ 29,
108
+ 30,
109
+ 32,
110
+ 33,
111
+ 270,
112
+ 35,
113
+ 36,
114
+ 37,
115
+ 41,
116
+ 42,
117
+ 43,
118
+ 44,
119
+ 45,
120
+ 47,
121
+ 48,
122
+ 52,
123
+ 253,
124
+ 53,
125
+ 54,
126
+ 57,
127
+ 58,
128
+ 59,
129
+ 61,
130
+ 269,
131
+ 62,
132
+ 64,
133
+ 65,
134
+ 67,
135
+ 68,
136
+ 69,
137
+ 72,
138
+ 74,
139
+ 75,
140
+ 77,
141
+ 79,
142
+ 80,
143
+ 83,
144
+ 84,
145
+ 85,
146
+ 87,
147
+ 265,
148
+ 88,
149
+ 89,
150
+ 266,
151
+ 90,
152
+ 91,
153
+ 92,
154
+ 94,
155
+ 96,
156
+ 97,
157
+ 99,
158
+ 101,
159
+ 105,
160
+ 51,
161
+ 153,
162
+ 168,
163
+ 106,
164
+ 263,
165
+ 107,
166
+ 251,
167
+ 18,
168
+ 109,
169
+ 110,
170
+ 111,
171
+ 113,
172
+ 114,
173
+ 115,
174
+ 116,
175
+ 122,
176
+ 127,
177
+ 180,
178
+ 185,
179
+ 117,
180
+ 118,
181
+ 220,
182
+ 119,
183
+ 264,
184
+ 121,
185
+ 120,
186
+ 125,
187
+ 126,
188
+ 128,
189
+ 131,
190
+ 132,
191
+ 133,
192
+ 135,
193
+ 136,
194
+ 137,
195
+ 145,
196
+ 147,
197
+ 148,
198
+ 149,
199
+ 150,
200
+ 155,
201
+ 157,
202
+ 158,
203
+ 159,
204
+ 162,
205
+ 164,
206
+ 165,
207
+ 166,
208
+ 167,
209
+ 169,
210
+ 170,
211
+ 173,
212
+ 175,
213
+ 176,
214
+ 177,
215
+ 181,
216
+ 183,
217
+ 186,
218
+ 187,
219
+ 188,
220
+ 191,
221
+ 192,
222
+ 197,
223
+ 198,
224
+ 268,
225
+ 199,
226
+ 203,
227
+ 204,
228
+ 205,
229
+ 271,
230
+ 206,
231
+ 208,
232
+ 209,
233
+ 210,
234
+ 211,
235
+ 212,
236
+ 213,
237
+ 214,
238
+ 215,
239
+ 216,
240
+ 221,
241
+ 222,
242
+ 223,
243
+ 224,
244
+ 227,
245
+ 228,
246
+ 229,
247
+ 230,
248
+ 231,
249
+ 232,
250
+ 233,
251
+ 55,
252
+ 234,
253
+ 235,
254
+ 236,
255
+ 237,
256
+ 238,
257
+ 239,
258
+ 241,
259
+ 243,
260
+ 245,
261
+ 246,
262
+ 247,
263
+ 248,
264
+ 249,
265
+ 250,
266
+ 252,
267
+ 256,
268
+ 257,
269
+ 258
270
+ ];
271
+
272
+ // src/domain/RegionConfigSchema.ts
273
+ import { z } from "zod";
274
+ var RegionConfigSchema = z.object({
275
+ id: z.number(),
276
+ gtmId: z.string().regex(/^GTM-[A-Z0-9]+$/, "Invalid GTM ID format"),
277
+ countriesToRedirect: z.record(
278
+ z.string(),
279
+ z.object({
280
+ label: z.string(),
281
+ countries: z.array(
282
+ z.object({
283
+ countryId: z.string(),
284
+ name: z.string().optional()
285
+ })
286
+ )
287
+ })
288
+ ).optional(),
289
+ regionUrls: z.object({
290
+ staging: z.string().url(),
291
+ production: z.string().url()
292
+ }).optional(),
293
+ timeZone: z.string(),
294
+ regionsToGroup: z.array(
295
+ z.object({
296
+ priority: z.enum(["high", "medium", "low"]),
297
+ countries: z.array(z.number()),
298
+ regionId: z.number()
299
+ })
300
+ ).optional(),
301
+ footer: z.array(
302
+ z.object({
303
+ href: z.string().url(),
304
+ label: z.string()
305
+ })
306
+ ),
307
+ documentTypeOptions: z.array(
308
+ z.object({
309
+ label: z.string(),
310
+ value: z.string()
311
+ })
312
+ ),
313
+ documentTypeOptionsByOrigin: z.object({
314
+ local: z.array(z.object({ label: z.string(), value: z.string() })),
315
+ foreign: z.array(z.object({ label: z.string(), value: z.string() }))
316
+ }).optional(),
317
+ dateFormat: z.string(),
318
+ regionCode: z.enum(["es-ES", "es-MX", "en-EU", "en-ROW", "it-IT", "pt-PT", "es-CO", "es-PE"]),
319
+ paymentCardTypes: z.array(
320
+ z.object({
321
+ id: z.number(),
322
+ name: z.string(),
323
+ imagePath: z.string()
324
+ })
325
+ ),
326
+ webSitePath: z.string().optional()
327
+ }).strict();
328
+
329
+ // src/regions/index.ts
330
+ var regions_exports = {};
331
+ __export(regions_exports, {
332
+ comco: () => comco_default,
333
+ comen: () => comen_default,
334
+ comeneu: () => comeneu_default,
335
+ commx: () => commx_default,
336
+ compe: () => compe_default,
337
+ es: () => es_default,
338
+ it: () => it_default,
339
+ pt: () => pt_default
340
+ });
341
+
342
+ // src/regions/comco.json
343
+ var comco_default = {
344
+ id: 9,
345
+ countriesToRedirect: {
346
+ es: {
347
+ label: "Espa\xF1a",
348
+ countries: [
349
+ {
350
+ countryId: "1",
351
+ name: "Espa\xF1a"
352
+ }
353
+ ]
354
+ },
355
+ pt: {
356
+ label: "Portugal",
357
+ countries: [
358
+ {
359
+ countryId: "190",
360
+ name: "Portugal"
361
+ }
362
+ ]
363
+ },
364
+ commx: {
365
+ label: "M\xE9xico",
366
+ countries: [
367
+ {
368
+ countryId: "158",
369
+ name: "M\xE9xico"
370
+ }
371
+ ]
372
+ },
373
+ compe: {
374
+ label: "Per\xFA",
375
+ countries: [
376
+ {
377
+ countryId: "187",
378
+ name: "Per\xFA"
379
+ }
380
+ ]
381
+ },
382
+ it: {
383
+ label: "Italia",
384
+ countries: [
385
+ {
386
+ countryId: "124",
387
+ name: "Italia"
388
+ }
389
+ ]
390
+ }
391
+ },
392
+ regionUrls: {
393
+ staging: "https://iatiglobal.iatidev.link/co/",
394
+ production: "https://www.iatiglobal.com/co/"
395
+ },
396
+ timeZone: "America/Bogota",
397
+ regionsToGroup: [
398
+ {
399
+ priority: "high",
400
+ countries: "US_CANADA_COUNTRIES",
401
+ regionId: "US_CANADA"
402
+ },
403
+ {
404
+ priority: "medium",
405
+ countries: "WORLD_COUNTRIES",
406
+ regionId: "WORLD"
407
+ },
408
+ {
409
+ priority: "low",
410
+ countries: "EUROPE_COUNTRIES",
411
+ regionId: "EUROPE"
412
+ }
413
+ ],
414
+ footer: [
415
+ {
416
+ href: "https://www.iatiglobal.com/co/politica-de-privacidad/",
417
+ label: "footer.privacyPolicy"
418
+ },
419
+ {
420
+ href: "https://www.iatiglobal.com/co/aviso-legal/",
421
+ label: "footer.legalNotice"
422
+ },
423
+ {
424
+ href: "https://www.iatiglobal.com/co/politica-de-cookies/",
425
+ label: "footer.cookiePolicy"
426
+ },
427
+ {
428
+ href: "https://www.iatiglobal.com/co/condiciones-generales/",
429
+ label: "footer.generalTerms"
430
+ },
431
+ {
432
+ href: "https://app.kenjo.io/whistleblower/3ee7e1d5ee59c6fe8b84b8fc9e02ee0284eb54213b4a4dd4c3914fba04c4ae4b",
433
+ label: "footer.ethicsChannel"
434
+ }
435
+ ],
436
+ documentTypeOptions: [
437
+ {
438
+ label: "Pasaporte",
439
+ value: "passport"
440
+ }
441
+ ],
442
+ dateFormat: "dd/MM/yyyy",
443
+ regionCode: "es-CO",
444
+ gtmId: "GTM-MWBFQB27",
445
+ paymentCardTypes: [
446
+ {
447
+ id: 1,
448
+ name: "Visa",
449
+ imagePath: "/assets/images/payments/visa.svg"
450
+ },
451
+ {
452
+ id: 2,
453
+ name: "Mastercard",
454
+ imagePath: "/assets/images/payments/mastercard.svg"
455
+ },
456
+ {
457
+ id: 3,
458
+ name: "Maestro",
459
+ imagePath: "/assets/images/payments/maestro.svg"
460
+ }
461
+ ],
462
+ webSitePath: "/co"
463
+ };
464
+
465
+ // src/regions/comen.json
466
+ var comen_default = {
467
+ id: 5,
468
+ countriesToRedirect: {
469
+ es: {
470
+ label: "Spain",
471
+ countries: [
472
+ {
473
+ countryId: "1",
474
+ name: "Espa\xF1a"
475
+ }
476
+ ]
477
+ },
478
+ comco: {
479
+ label: "Colombia",
480
+ countries: [
481
+ {
482
+ countryId: "52",
483
+ name: "Colombia"
484
+ }
485
+ ]
486
+ },
487
+ commx: {
488
+ label: "Mexico",
489
+ countries: [
490
+ {
491
+ countryId: "158",
492
+ name: "M\xE9xico"
493
+ }
494
+ ]
495
+ },
496
+ compe: {
497
+ label: "Peru",
498
+ countries: [
499
+ {
500
+ countryId: "187",
501
+ name: "Per\xFA"
502
+ }
503
+ ]
504
+ },
505
+ pt: {
506
+ label: "Portugal",
507
+ countries: [
508
+ {
509
+ countryId: "190",
510
+ name: "Portugal"
511
+ },
512
+ {
513
+ countryId: "7",
514
+ name: "Angola"
515
+ },
516
+ {
517
+ countryId: "36",
518
+ name: "Brasil"
519
+ },
520
+ {
521
+ countryId: "42",
522
+ name: "Cabo Verde"
523
+ },
524
+ {
525
+ countryId: "93",
526
+ name: "Guin\xE9-Bissau"
527
+ },
528
+ {
529
+ countryId: "92",
530
+ name: "Guin\xE9 Equatorial"
531
+ },
532
+ {
533
+ countryId: "165",
534
+ name: "Mo\xE7ambique"
535
+ },
536
+ {
537
+ countryId: "212",
538
+ name: "S\xE3o Tom\xE9 e Pr\xEDncipe"
539
+ }
540
+ ]
541
+ },
542
+ it: {
543
+ label: "Italy",
544
+ countries: [
545
+ {
546
+ countryId: "124",
547
+ name: "Italia"
548
+ }
549
+ ]
550
+ }
551
+ },
552
+ regionUrls: {
553
+ staging: "https://stg.iatiglobal.com/co/",
554
+ production: "https://www.iatiglobal.com/co/"
555
+ },
556
+ timeZone: "Europe/Madrid",
557
+ regionsToGroup: [
558
+ {
559
+ priority: "high",
560
+ countries: "US_CANADA_JAPAN_COUNTRIES",
561
+ regionId: "US_CANADA_JAPAN"
562
+ },
563
+ {
564
+ priority: "medium",
565
+ countries: "WORLD_COUNTRIES",
566
+ regionId: "REST_OF_THE_WORLD"
567
+ },
568
+ {
569
+ priority: "low",
570
+ countries: "EUROPE_COUNTRIES",
571
+ regionId: "EUROPE"
572
+ }
573
+ ],
574
+ footer: [
575
+ {
576
+ href: "https://www.iatiglobal.com/en/privacy-policy/",
577
+ label: "footer.privacyPolicy"
578
+ },
579
+ {
580
+ href: "https://www.iatiglobal.com/en/legal-disclaimer/",
581
+ label: "footer.legalNotice"
582
+ },
583
+ {
584
+ href: "https://www.iatiglobal.com/en/cookies-policy/",
585
+ label: "footer.cookiePolicy"
586
+ },
587
+ {
588
+ href: "https://www.iatiglobal.com/en/terms-and-conditons/",
589
+ label: "footer.generalTerms"
590
+ },
591
+ {
592
+ href: "https://app.kenjo.io/whistleblower/3ee7e1d5ee59c6fe8b84b8fc9e02ee0284eb54213b4a4dd4c3914fba04c4ae4b",
593
+ label: "footer.ethicsChannel"
594
+ }
595
+ ],
596
+ documentTypeOptions: [
597
+ {
598
+ label: "Passport",
599
+ value: "passport"
600
+ }
601
+ ],
602
+ dateFormat: "dd/MM/yyyy",
603
+ regionCode: "en-ROW",
604
+ gtmId: "GTM-NZVPZBPD",
605
+ paymentCardTypes: [
606
+ {
607
+ id: 1,
608
+ name: "Visa",
609
+ imagePath: "/assets/images/payments/visa.svg"
610
+ },
611
+ {
612
+ id: 2,
613
+ name: "Mastercard",
614
+ imagePath: "/assets/images/payments/mastercard.svg"
615
+ },
616
+ {
617
+ id: 3,
618
+ name: "Maestro",
619
+ imagePath: "/assets/images/payments/maestro.svg"
620
+ },
621
+ {
622
+ id: 4,
623
+ name: "American Express",
624
+ imagePath: "/assets/images/payments/american-express.svg"
625
+ },
626
+ {
627
+ id: 5,
628
+ name: "JCB",
629
+ imagePath: "/assets/images/payments/jcb.svg"
630
+ },
631
+ {
632
+ id: 6,
633
+ name: "Diners Club",
634
+ imagePath: "/assets/images/payments/diners-club.svg"
635
+ }
636
+ ],
637
+ webSitePath: "/en"
638
+ };
639
+
640
+ // src/regions/comeneu.json
641
+ var comeneu_default = {
642
+ id: 6,
643
+ countriesToRedirect: {
644
+ es: {
645
+ label: "Spain",
646
+ countries: [
647
+ {
648
+ countryId: "1",
649
+ name: "Espa\xF1a"
650
+ }
651
+ ]
652
+ },
653
+ comco: {
654
+ label: "Colombia",
655
+ countries: [
656
+ {
657
+ countryId: "52",
658
+ name: "Colombia"
659
+ }
660
+ ]
661
+ },
662
+ commx: {
663
+ label: "Mexico",
664
+ countries: [
665
+ {
666
+ countryId: "158",
667
+ name: "M\xE9xico"
668
+ }
669
+ ]
670
+ },
671
+ compe: {
672
+ label: "Peru",
673
+ countries: [
674
+ {
675
+ countryId: "187",
676
+ name: "Per\xFA"
677
+ }
678
+ ]
679
+ },
680
+ pt: {
681
+ label: "Portugal",
682
+ countries: [
683
+ {
684
+ countryId: "190",
685
+ name: "Portugal"
686
+ }
687
+ ]
688
+ },
689
+ it: {
690
+ label: "Italy",
691
+ countries: [
692
+ {
693
+ countryId: "124",
694
+ name: "Italia"
695
+ }
696
+ ]
697
+ }
698
+ },
699
+ regionUrls: {
700
+ staging: "https://stg.iatiglobal.com/en-eu/",
701
+ production: "https://www.iatiglobal.com/en-eu/"
702
+ },
703
+ timeZone: "Europe/Madrid",
704
+ regionsToGroup: [
705
+ {
706
+ priority: "high",
707
+ countries: "US_CANADA_JAPAN_COUNTRIES",
708
+ regionId: "US_CANADA_JAPAN"
709
+ },
710
+ {
711
+ priority: "medium",
712
+ countries: "WORLD_COUNTRIES",
713
+ regionId: "REST_OF_THE_WORLD"
714
+ },
715
+ {
716
+ priority: "low",
717
+ countries: "EUROPE_COUNTRIES",
718
+ regionId: "EUROPE"
719
+ }
720
+ ],
721
+ footer: [
722
+ {
723
+ href: "https://www.iatiglobal.com/en-eu/privacy-policy/",
724
+ label: "footer.privacyPolicy"
725
+ },
726
+ {
727
+ href: "https://www.iatiglobal.com/en-eu/legal-disclaimer/",
728
+ label: "footer.legalNotice"
729
+ },
730
+ {
731
+ href: "https://www.iatiglobal.com/en-eu/cookies-policy/",
732
+ label: "footer.cookiePolicy"
733
+ },
734
+ {
735
+ href: "https://www.iatiglobal.com/en-eu/terms-and-conditons/",
736
+ label: "footer.generalTerms"
737
+ },
738
+ {
739
+ href: "https://app.kenjo.io/whistleblower/3ee7e1d5ee59c6fe8b84b8fc9e02ee0284eb54213b4a4dd4c3914fba04c4ae4b",
740
+ label: "footer.ethicsChannel"
741
+ }
742
+ ],
743
+ documentTypeOptions: [
744
+ {
745
+ label: "Passport",
746
+ value: "passport"
747
+ }
748
+ ],
749
+ dateFormat: "dd/MM/yyyy",
750
+ regionCode: "en-EU",
751
+ gtmId: "GTM-WMGW2FPD",
752
+ paymentCardTypes: [
753
+ {
754
+ id: 1,
755
+ name: "Visa",
756
+ imagePath: "/assets/images/payments/visa.svg"
757
+ },
758
+ {
759
+ id: 2,
760
+ name: "Mastercard",
761
+ imagePath: "/assets/images/payments/mastercard.svg"
762
+ },
763
+ {
764
+ id: 3,
765
+ name: "Maestro",
766
+ imagePath: "/assets/images/payments/maestro.svg"
767
+ },
768
+ {
769
+ id: 4,
770
+ name: "American Express",
771
+ imagePath: "/assets/images/payments/american-express.svg"
772
+ },
773
+ {
774
+ id: 5,
775
+ name: "JCB",
776
+ imagePath: "/assets/images/payments/jcb.svg"
777
+ },
778
+ {
779
+ id: 6,
780
+ name: "Diners Club",
781
+ imagePath: "/assets/images/payments/diners-club.svg"
782
+ }
783
+ ],
784
+ webSitePath: "/en-eu"
785
+ };
786
+
787
+ // src/regions/commx.json
788
+ var commx_default = {
789
+ id: 7,
790
+ countriesToRedirect: {
791
+ es: {
792
+ label: "Espa\xF1a",
793
+ countries: [
794
+ {
795
+ countryId: "1",
796
+ name: "Espa\xF1a"
797
+ }
798
+ ]
799
+ },
800
+ pt: {
801
+ label: "Portugal",
802
+ countries: [
803
+ {
804
+ countryId: "190",
805
+ name: "Portugal"
806
+ }
807
+ ]
808
+ },
809
+ comco: {
810
+ label: "Colombia",
811
+ countries: [
812
+ {
813
+ countryId: "52",
814
+ name: "Colombia"
815
+ }
816
+ ]
817
+ },
818
+ compe: {
819
+ label: "Per\xFA",
820
+ countries: [
821
+ {
822
+ countryId: "187",
823
+ name: "Per\xFA"
824
+ }
825
+ ]
826
+ },
827
+ it: {
828
+ label: "Italia",
829
+ countries: [
830
+ {
831
+ countryId: "124",
832
+ name: "Italia"
833
+ }
834
+ ]
835
+ }
836
+ },
837
+ regionUrls: {
838
+ staging: "https://stg.iatiglobal.com/mx/",
839
+ production: "https://www.iatiglobal.com/mx/"
840
+ },
841
+ timeZone: "America/Mexico_City",
842
+ regionsToGroup: [
843
+ {
844
+ priority: "high",
845
+ countries: "US_CANADA_COUNTRIES",
846
+ regionId: "US_CANADA"
847
+ },
848
+ {
849
+ priority: "medium",
850
+ countries: "WORLD_COUNTRIES",
851
+ regionId: "WORLD"
852
+ },
853
+ {
854
+ priority: "low",
855
+ countries: "EUROPE_COUNTRIES",
856
+ regionId: "EUROPE"
857
+ }
858
+ ],
859
+ footer: [
860
+ {
861
+ href: "https://www.iatiglobal.com/mx/politica-de-privacidad",
862
+ label: "footer.privacyPolicy"
863
+ },
864
+ {
865
+ href: "https://www.iatiglobal.com/mx/aviso-legal/",
866
+ label: "footer.legalNotice"
867
+ },
868
+ {
869
+ href: "https://www.iatiglobal.com/mx/politica-de-cookies",
870
+ label: "footer.cookiePolicy"
871
+ },
872
+ {
873
+ href: "https://www.iatiglobal.com/mx/condiciones-generales/",
874
+ label: "footer.generalTerms"
875
+ },
876
+ {
877
+ href: "https://app.kenjo.io/whistleblower/3ee7e1d5ee59c6fe8b84b8fc9e02ee0284eb54213b4a4dd4c3914fba04c4ae4b",
878
+ label: "footer.ethicsChannel"
879
+ }
880
+ ],
881
+ documentTypeOptions: [
882
+ {
883
+ label: "Pasaporte",
884
+ value: "passport"
885
+ }
886
+ ],
887
+ dateFormat: "dd/MM/yyyy",
888
+ regionCode: "es-MX",
889
+ gtmId: "GTM-T2RSHCJ9",
890
+ paymentCardTypes: [
891
+ {
892
+ id: 1,
893
+ name: "Visa",
894
+ imagePath: "/assets/images/payments/visa.svg"
895
+ },
896
+ {
897
+ id: 2,
898
+ name: "Mastercard",
899
+ imagePath: "/assets/images/payments/mastercard.svg"
900
+ },
901
+ {
902
+ id: 3,
903
+ name: "Maestro",
904
+ imagePath: "/assets/images/payments/maestro.svg"
905
+ }
906
+ ],
907
+ webSitePath: "/mx"
908
+ };
909
+
910
+ // src/regions/compe.json
911
+ var compe_default = {
912
+ id: 8,
913
+ countriesToRedirect: {
914
+ es: {
915
+ label: "Espa\xF1a",
916
+ countries: [
917
+ {
918
+ countryId: "1",
919
+ name: "Espa\xF1a"
920
+ }
921
+ ]
922
+ },
923
+ pt: {
924
+ label: "Portugal",
925
+ countries: [
926
+ {
927
+ countryId: "190",
928
+ name: "Portugal"
929
+ }
930
+ ]
931
+ },
932
+ comco: {
933
+ label: "Colombia",
934
+ countries: [
935
+ {
936
+ countryId: "52",
937
+ name: "Colombia"
938
+ }
939
+ ]
940
+ },
941
+ commx: {
942
+ label: "M\xE9xico",
943
+ countries: [
944
+ {
945
+ countryId: "158",
946
+ name: "M\xE9xico"
947
+ }
948
+ ]
949
+ },
950
+ it: {
951
+ label: "Italia",
952
+ countries: [
953
+ {
954
+ countryId: "124",
955
+ name: "Italia"
956
+ }
957
+ ]
958
+ }
959
+ },
960
+ regionUrls: {
961
+ staging: "https://stg.iatiglobal.com/pe/",
962
+ production: "https://www.iatiglobal.com/pe/"
963
+ },
964
+ timeZone: "America/Lima",
965
+ regionsToGroup: [
966
+ {
967
+ priority: "high",
968
+ countries: "US_CANADA_COUNTRIES",
969
+ regionId: "US_CANADA"
970
+ },
971
+ {
972
+ priority: "medium",
973
+ countries: "WORLD_COUNTRIES",
974
+ regionId: "WORLD"
975
+ },
976
+ {
977
+ priority: "low",
978
+ countries: "EUROPE_COUNTRIES",
979
+ regionId: "EUROPE"
980
+ }
981
+ ],
982
+ footer: [
983
+ {
984
+ href: "https://www.iatiglobal.com/pe/politica-de-privacidad",
985
+ label: "footer.privacyPolicy"
986
+ },
987
+ {
988
+ href: "https://www.iatiglobal.com/pe/aviso-legal/",
989
+ label: "footer.legalNotice"
990
+ },
991
+ {
992
+ href: "https://www.iatiglobal.com/pe/politica-de-cookies",
993
+ label: "footer.cookiePolicy"
994
+ },
995
+ {
996
+ href: "https://www.iatiglobal.com/pe/condiciones-generales/",
997
+ label: "footer.generalTerms"
998
+ },
999
+ {
1000
+ href: "https://app.kenjo.io/whistleblower/3ee7e1d5ee59c6fe8b84b8fc9e02ee0284eb54213b4a4dd4c3914fba04c4ae4b",
1001
+ label: "footer.ethicsChannel"
1002
+ }
1003
+ ],
1004
+ documentTypeOptions: [
1005
+ {
1006
+ label: "Pasaporte",
1007
+ value: "passport"
1008
+ }
1009
+ ],
1010
+ dateFormat: "dd/MM/yyyy",
1011
+ regionCode: "es-PE",
1012
+ gtmId: "GTM-KLWFKMS7",
1013
+ paymentCardTypes: [
1014
+ {
1015
+ id: 1,
1016
+ name: "Visa",
1017
+ imagePath: "/assets/images/payments/visa.svg"
1018
+ },
1019
+ {
1020
+ id: 2,
1021
+ name: "Mastercard",
1022
+ imagePath: "/assets/images/payments/mastercard.svg"
1023
+ },
1024
+ {
1025
+ id: 3,
1026
+ name: "Maestro",
1027
+ imagePath: "/assets/images/payments/maestro.svg"
1028
+ }
1029
+ ],
1030
+ webSitePath: "/pe"
1031
+ };
1032
+
1033
+ // src/regions/es.json
1034
+ var es_default = {
1035
+ id: 1,
1036
+ countriesToRedirect: {
1037
+ comco: {
1038
+ label: "Colombia",
1039
+ countries: [
1040
+ {
1041
+ countryId: "52",
1042
+ name: "Colombia"
1043
+ }
1044
+ ]
1045
+ },
1046
+ commx: {
1047
+ label: "M\xE9xico",
1048
+ countries: [
1049
+ {
1050
+ countryId: "158",
1051
+ name: "M\xE9xico"
1052
+ }
1053
+ ]
1054
+ },
1055
+ compe: {
1056
+ label: "Per\xFA",
1057
+ countries: [
1058
+ {
1059
+ countryId: "187",
1060
+ name: "Per\xFA"
1061
+ }
1062
+ ]
1063
+ },
1064
+ pt: {
1065
+ label: "Portugal",
1066
+ countries: [
1067
+ {
1068
+ countryId: "190",
1069
+ name: "Portugal"
1070
+ }
1071
+ ]
1072
+ },
1073
+ it: {
1074
+ label: "Italia",
1075
+ countries: [
1076
+ {
1077
+ countryId: "124",
1078
+ name: "Italia"
1079
+ }
1080
+ ]
1081
+ }
1082
+ },
1083
+ regionUrls: {
1084
+ staging: "https://stg.iatiseguros.com",
1085
+ production: "https://www.iatiseguros.com"
1086
+ },
1087
+ timeZone: "Europe/Madrid",
1088
+ regionsToGroup: [
1089
+ {
1090
+ priority: "high",
1091
+ countries: "US_CANADA_JAPAN_COUNTRIES",
1092
+ regionId: "US_CANADA_JAPAN"
1093
+ },
1094
+ {
1095
+ priority: "medium",
1096
+ countries: "WORLD_COUNTRIES",
1097
+ regionId: "REST_OF_THE_WORLD"
1098
+ },
1099
+ {
1100
+ priority: "low",
1101
+ countries: "EUROPE_COUNTRIES",
1102
+ regionId: "EUROPE"
1103
+ }
1104
+ ],
1105
+ footer: [
1106
+ {
1107
+ href: "https://www.iatiseguros.com/es/politica-de-privacidad",
1108
+ label: "footer.privacyPolicy"
1109
+ },
1110
+ {
1111
+ href: "https://www.iatiseguros.com/es/aviso-legal",
1112
+ label: "footer.legalNotice"
1113
+ },
1114
+ {
1115
+ href: "https://www.iatiseguros.com/es/politica-de-cookies",
1116
+ label: "footer.cookiePolicy"
1117
+ },
1118
+ {
1119
+ href: "https://www.iatiseguros.com/es/condiciones-generales",
1120
+ label: "footer.generalTerms"
1121
+ },
1122
+ {
1123
+ href: "https://www.iatiseguros.com/es/canal-etico",
1124
+ label: "footer.ethicsChannel"
1125
+ }
1126
+ ],
1127
+ documentTypeOptions: [
1128
+ {
1129
+ label: "DNI",
1130
+ value: "nif"
1131
+ },
1132
+ {
1133
+ label: "NIE",
1134
+ value: "nie"
1135
+ },
1136
+ {
1137
+ label: "Pasaporte",
1138
+ value: "passport"
1139
+ }
1140
+ ],
1141
+ dateFormat: "dd/MM/yyyy",
1142
+ regionCode: "es-ES",
1143
+ gtmId: "GTM-TZF83VD",
1144
+ paymentCardTypes: [
1145
+ {
1146
+ id: 1,
1147
+ name: "Visa",
1148
+ imagePath: "/assets/images/payments/visa.svg"
1149
+ },
1150
+ {
1151
+ id: 2,
1152
+ name: "Mastercard",
1153
+ imagePath: "/assets/images/payments/mastercard.svg"
1154
+ },
1155
+ {
1156
+ id: 3,
1157
+ name: "Maestro",
1158
+ imagePath: "/assets/images/payments/maestro.svg"
1159
+ },
1160
+ {
1161
+ id: 4,
1162
+ name: "American Express",
1163
+ imagePath: "/assets/images/payments/american-express.svg"
1164
+ },
1165
+ {
1166
+ id: 5,
1167
+ name: "JCB",
1168
+ imagePath: "/assets/images/payments/jcb.svg"
1169
+ },
1170
+ {
1171
+ id: 6,
1172
+ name: "Diners Club",
1173
+ imagePath: "/assets/images/payments/diners-club.svg"
1174
+ }
1175
+ ]
1176
+ };
1177
+
1178
+ // src/regions/it.json
1179
+ var it_default = {
1180
+ id: 10,
1181
+ countriesToRedirect: {
1182
+ es: {
1183
+ label: "Spagna",
1184
+ countries: [
1185
+ {
1186
+ countryId: "1",
1187
+ name: "Espa\xF1a"
1188
+ }
1189
+ ]
1190
+ },
1191
+ pt: {
1192
+ label: "Portogallo",
1193
+ countries: [
1194
+ {
1195
+ countryId: "190",
1196
+ name: "Portugal"
1197
+ }
1198
+ ]
1199
+ },
1200
+ commx: {
1201
+ label: "Messico",
1202
+ countries: [
1203
+ {
1204
+ countryId: "158",
1205
+ name: "M\xE9xico"
1206
+ }
1207
+ ]
1208
+ },
1209
+ compe: {
1210
+ label: "Per\xF9",
1211
+ countries: [
1212
+ {
1213
+ countryId: "187",
1214
+ name: "Per\xFA"
1215
+ }
1216
+ ]
1217
+ },
1218
+ comco: {
1219
+ label: "Colombia",
1220
+ countries: [
1221
+ {
1222
+ countryId: "52",
1223
+ name: "Colombia"
1224
+ }
1225
+ ]
1226
+ }
1227
+ },
1228
+ regionUrls: {
1229
+ staging: "https://stg.iatiassicurazioni.it",
1230
+ production: "https://www.iatiassicurazioni.it"
1231
+ },
1232
+ timeZone: "Europe/Rome",
1233
+ regionsToGroup: [
1234
+ {
1235
+ priority: "high",
1236
+ countries: "US_CANADA_JAPAN_COUNTRIES",
1237
+ regionId: "US_CANADA_JAPAN"
1238
+ },
1239
+ {
1240
+ priority: "medium",
1241
+ countries: "WORLD_COUNTRIES",
1242
+ regionId: "REST_OF_THE_WORLD"
1243
+ },
1244
+ {
1245
+ priority: "low",
1246
+ countries: "EUROPE_COUNTRIES",
1247
+ regionId: "EUROPE"
1248
+ }
1249
+ ],
1250
+ footer: [
1251
+ {
1252
+ href: "https://www.iatiassicurazioni.it/privacy-sul-trattamento-di-dati-personali/",
1253
+ label: "footer.privacyPolicy"
1254
+ },
1255
+ {
1256
+ href: "https://www.iatiassicurazioni.it/note-legali/",
1257
+ label: "footer.legalNotice"
1258
+ },
1259
+ {
1260
+ href: "https://www.iatiassicurazioni.it/politica-sui-cookie/",
1261
+ label: "footer.cookiePolicy"
1262
+ },
1263
+ {
1264
+ href: "https://www.iatiassicurazioni.it/CONDIZIONI-GENERALI/",
1265
+ label: "footer.generalTerms"
1266
+ }
1267
+ ],
1268
+ documentTypeOptions: [
1269
+ {
1270
+ label: "Codice Fiscale",
1271
+ value: "fiscal_code"
1272
+ }
1273
+ ],
1274
+ dateFormat: "dd/MM/yyyy",
1275
+ regionCode: "it-IT",
1276
+ gtmId: "GTM-WL7HZFZF",
1277
+ paymentCardTypes: [
1278
+ {
1279
+ id: 1,
1280
+ name: "Visa",
1281
+ imagePath: "/assets/images/payments/visa.svg"
1282
+ },
1283
+ {
1284
+ id: 2,
1285
+ name: "Mastercard",
1286
+ imagePath: "/assets/images/payments/mastercard.svg"
1287
+ },
1288
+ {
1289
+ id: 3,
1290
+ name: "Maestro",
1291
+ imagePath: "/assets/images/payments/maestro.svg"
1292
+ },
1293
+ {
1294
+ id: 4,
1295
+ name: "American Express",
1296
+ imagePath: "/assets/images/payments/american-express.svg"
1297
+ },
1298
+ {
1299
+ id: 5,
1300
+ name: "JCB",
1301
+ imagePath: "/assets/images/payments/jcb.svg"
1302
+ },
1303
+ {
1304
+ id: 6,
1305
+ name: "Diners Club",
1306
+ imagePath: "/assets/images/payments/diners-club.svg"
1307
+ }
1308
+ ]
1309
+ };
1310
+
1311
+ // src/regions/pt.json
1312
+ var pt_default = {
1313
+ id: 2,
1314
+ countriesToRedirect: {
1315
+ es: {
1316
+ label: "Espanha",
1317
+ countries: [
1318
+ {
1319
+ countryId: "1",
1320
+ name: "Espa\xF1a"
1321
+ }
1322
+ ]
1323
+ },
1324
+ comco: {
1325
+ label: "Col\xF4mbia",
1326
+ countries: [
1327
+ {
1328
+ countryId: "52",
1329
+ name: "Colombia"
1330
+ }
1331
+ ]
1332
+ },
1333
+ commx: {
1334
+ label: "M\xE9xico",
1335
+ countries: [
1336
+ {
1337
+ countryId: "158",
1338
+ name: "M\xE9xico"
1339
+ }
1340
+ ]
1341
+ },
1342
+ compe: {
1343
+ label: "Peru",
1344
+ countries: [
1345
+ {
1346
+ countryId: "187",
1347
+ name: "Per\xFA"
1348
+ }
1349
+ ]
1350
+ },
1351
+ it: {
1352
+ label: "It\xE1lia",
1353
+ countries: [
1354
+ {
1355
+ countryId: "124",
1356
+ name: "Italia"
1357
+ }
1358
+ ]
1359
+ }
1360
+ },
1361
+ regionUrls: {
1362
+ staging: "https://stg.iatiseguros.pt",
1363
+ production: "https://www.iatiseguros.pt"
1364
+ },
1365
+ timeZone: "Europe/Lisbon",
1366
+ regionsToGroup: [
1367
+ {
1368
+ priority: "high",
1369
+ countries: "US_CANADA_JAPAN_COUNTRIES",
1370
+ regionId: "US_CANADA_JAPAN"
1371
+ },
1372
+ {
1373
+ priority: "medium",
1374
+ countries: "WORLD_COUNTRIES",
1375
+ regionId: "REST_OF_THE_WORLD"
1376
+ },
1377
+ {
1378
+ priority: "low",
1379
+ countries: "EUROPE_COUNTRIES",
1380
+ regionId: "EUROPE"
1381
+ }
1382
+ ],
1383
+ footer: [
1384
+ {
1385
+ href: "https://static.iatiseguros.pt/pt/documentos/politica-de-privacidade-PT.pdf?_gl=1*152nifg*_gcl_au*MTMxNDE5MDAxNC4xNzcwNzE5MjY5LjQyMjM3NC4xNzcwNzIzMzg2LjE3NzA3MjM0NDE",
1386
+ label: "footer.privacyPolicy"
1387
+ },
1388
+ {
1389
+ href: "https://www.iatiseguros.pt/aviso-legal/",
1390
+ label: "footer.legalNotice"
1391
+ },
1392
+ {
1393
+ href: "https://www.iatiseguros.pt/politica-de-cookies/",
1394
+ label: "footer.cookiePolicy"
1395
+ },
1396
+ {
1397
+ href: "https://static.iatiseguros.pt/pt/documentos/Condic\u0327o\u0303es+Gerais.pdf",
1398
+ label: "footer.generalTerms"
1399
+ },
1400
+ {
1401
+ href: "https://app.kenjo.io/whistleblower/3ee7e1d5ee59c6fe8b84b8fc9e02ee0284eb54213b4a4dd4c3914fba04c4ae4b?lang=en",
1402
+ label: "footer.ethicsChannel"
1403
+ }
1404
+ ],
1405
+ documentTypeOptions: [
1406
+ {
1407
+ label: "NIF",
1408
+ value: "nif"
1409
+ }
1410
+ ],
1411
+ documentTypeOptionsByOrigin: {
1412
+ local: [
1413
+ {
1414
+ label: "NIF",
1415
+ value: "nif"
1416
+ }
1417
+ ],
1418
+ foreign: [
1419
+ {
1420
+ label: "Passaporte",
1421
+ value: "passport"
1422
+ }
1423
+ ]
1424
+ },
1425
+ dateFormat: "dd/MM/yyyy",
1426
+ regionCode: "pt-PT",
1427
+ gtmId: "GTM-MWBFX7X",
1428
+ paymentCardTypes: [
1429
+ {
1430
+ id: 1,
1431
+ name: "Visa",
1432
+ imagePath: "/assets/images/payments/visa.svg"
1433
+ },
1434
+ {
1435
+ id: 2,
1436
+ name: "Mastercard",
1437
+ imagePath: "/assets/images/payments/mastercard.svg"
1438
+ },
1439
+ {
1440
+ id: 3,
1441
+ name: "Maestro",
1442
+ imagePath: "/assets/images/payments/maestro.svg"
1443
+ },
1444
+ {
1445
+ id: 4,
1446
+ name: "American Express",
1447
+ imagePath: "/assets/images/payments/american-express.svg"
1448
+ },
1449
+ {
1450
+ id: 5,
1451
+ name: "JCB",
1452
+ imagePath: "/assets/images/payments/jcb.svg"
1453
+ },
1454
+ {
1455
+ id: 6,
1456
+ name: "Diners Club",
1457
+ imagePath: "/assets/images/payments/diners-club.svg"
1458
+ }
1459
+ ]
1460
+ };
1461
+
1462
+ // src/regionsConfig.ts
1463
+ var resolveRegion = (region) => {
1464
+ var _a;
1465
+ const resolved = __spreadProps(__spreadValues({}, region), {
1466
+ regionsToGroup: (_a = region.regionsToGroup) == null ? void 0 : _a.map((group) => __spreadProps(__spreadValues({}, group), {
1467
+ countries: (() => {
1468
+ switch (group.countries) {
1469
+ case "US_CANADA_JAPAN_COUNTRIES":
1470
+ return US_CANADA_JAPAN_COUNTRIES;
1471
+ case "WORLD_COUNTRIES":
1472
+ return WORLD_COUNTRIES;
1473
+ case "EUROPE_COUNTRIES":
1474
+ return EUROPE_COUNTRIES;
1475
+ case "US_CANADA_COUNTRIES":
1476
+ return US_CANADA_COUNTRIES;
1477
+ default:
1478
+ return [];
1479
+ }
1480
+ })(),
1481
+ regionId: GROUP_REGIONS[group.regionId]
1482
+ }))
1483
+ });
1484
+ return RegionConfigSchema.parse(resolved);
1485
+ };
1486
+ var regionsConfig = Object.entries(regions_exports).reduce((acc, [key, value]) => {
1487
+ acc[key] = resolveRegion(value);
1488
+ return acc;
1489
+ }, {});
1490
+ var regionsConfig_default = regionsConfig;
1491
+
1492
+ // src/utils/getRegionConfig.ts
1493
+ var getRegionConfig = (name) => {
1494
+ const key = name.replace(/[/-]/g, "").toLowerCase();
1495
+ return regionsConfig_default[key];
1496
+ };
1497
+
1498
+ // src/utils/getRegionConfigById.ts
1499
+ var getRegionConfigById = (id) => {
1500
+ const region = Object.values(regionsConfig_default).find((region2) => region2.id === id);
1501
+ if (!region) throw new Error(`Region with id ${id} not found`);
1502
+ return region;
1503
+ };
1504
+
1505
+ // src/utils/getRegionConfigByRegionCode.ts
1506
+ var getRegionConfigByRegionCode = (regionCode) => {
1507
+ const region = Object.values(regionsConfig_default).find((region2) => region2.regionCode === regionCode);
1508
+ if (!region) throw new Error(`Region with code ${regionCode} not found`);
1509
+ return region;
1510
+ };
1511
+
1512
+ // src/utils/resolveDocumentTypeOptions.ts
1513
+ var resolveDocumentTypeOptions = (documentTypeOptions, documentTypeOptionsByOrigin, originCountryId, siteCountryId) => {
1514
+ if (!documentTypeOptionsByOrigin) return documentTypeOptions;
1515
+ if (!originCountryId || !siteCountryId) return documentTypeOptions;
1516
+ const isLocal = String(originCountryId) === String(siteCountryId);
1517
+ return isLocal ? documentTypeOptionsByOrigin.local : documentTypeOptionsByOrigin.foreign;
1518
+ };
1519
+
1520
+ // src/validators/validateRegion.ts
1521
+ var validateRegion = (region) => {
1522
+ if (!Object.values(regionsConfig_default).some((regionConfig) => regionConfig.regionCode === region)) {
1523
+ throw new Error(`Invalid region: ${region}`);
1524
+ }
1525
+ };
1526
+ export {
1527
+ EUROPE_COUNTRIES,
1528
+ GROUP_REGIONS,
1529
+ RegionConfigSchema,
1530
+ US_CANADA_COUNTRIES,
1531
+ US_CANADA_JAPAN_COUNTRIES,
1532
+ WORLD_COUNTRIES,
1533
+ getRegionConfig,
1534
+ getRegionConfigById,
1535
+ getRegionConfigByRegionCode,
1536
+ regionsConfig_default as regionsConfig,
1537
+ resolveDocumentTypeOptions,
1538
+ validateRegion
1539
+ };