@singi-labs/sifa-sdk 0.1.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.cjs ADDED
@@ -0,0 +1,957 @@
1
+ 'use strict';
2
+
3
+ // src/taxonomy/continents.ts
4
+ var CONTINENTS = [
5
+ { code: "AF", name: "Africa" },
6
+ { code: "AN", name: "Antarctica" },
7
+ { code: "AS", name: "Asia" },
8
+ { code: "EU", name: "Europe" },
9
+ { code: "NA", name: "North America" },
10
+ { code: "OC", name: "Oceania" },
11
+ { code: "SA", name: "South America" }
12
+ ];
13
+ var COUNTRY_TO_CONTINENT = {
14
+ AD: "EU",
15
+ AE: "AS",
16
+ AF: "AS",
17
+ AG: "NA",
18
+ AL: "EU",
19
+ AM: "AS",
20
+ AO: "AF",
21
+ AR: "SA",
22
+ AT: "EU",
23
+ AU: "OC",
24
+ AZ: "AS",
25
+ BA: "EU",
26
+ BB: "NA",
27
+ BD: "AS",
28
+ BE: "EU",
29
+ BF: "AF",
30
+ BG: "EU",
31
+ BH: "AS",
32
+ BI: "AF",
33
+ BJ: "AF",
34
+ BN: "AS",
35
+ BO: "SA",
36
+ BR: "SA",
37
+ BS: "NA",
38
+ BT: "AS",
39
+ BW: "AF",
40
+ BY: "EU",
41
+ BZ: "NA",
42
+ CA: "NA",
43
+ CD: "AF",
44
+ CF: "AF",
45
+ CG: "AF",
46
+ CH: "EU",
47
+ CI: "AF",
48
+ CL: "SA",
49
+ CM: "AF",
50
+ CN: "AS",
51
+ CO: "SA",
52
+ CR: "NA",
53
+ CU: "NA",
54
+ CV: "AF",
55
+ CY: "AS",
56
+ CZ: "EU",
57
+ DE: "EU",
58
+ DJ: "AF",
59
+ DK: "EU",
60
+ DM: "NA",
61
+ DO: "NA",
62
+ DZ: "AF",
63
+ EC: "SA",
64
+ EE: "EU",
65
+ EG: "AF",
66
+ ER: "AF",
67
+ ES: "EU",
68
+ ET: "AF",
69
+ FI: "EU",
70
+ FJ: "OC",
71
+ FR: "EU",
72
+ GA: "AF",
73
+ GB: "EU",
74
+ GD: "NA",
75
+ GE: "AS",
76
+ GH: "AF",
77
+ GM: "AF",
78
+ GN: "AF",
79
+ GQ: "AF",
80
+ GR: "EU",
81
+ GT: "NA",
82
+ GW: "AF",
83
+ GY: "SA",
84
+ HK: "AS",
85
+ HN: "NA",
86
+ HR: "EU",
87
+ HT: "NA",
88
+ HU: "EU",
89
+ ID: "AS",
90
+ IE: "EU",
91
+ IL: "AS",
92
+ IN: "AS",
93
+ IQ: "AS",
94
+ IR: "AS",
95
+ IS: "EU",
96
+ IT: "EU",
97
+ JM: "NA",
98
+ JO: "AS",
99
+ JP: "AS",
100
+ KE: "AF",
101
+ KG: "AS",
102
+ KH: "AS",
103
+ KM: "AF",
104
+ KN: "NA",
105
+ KP: "AS",
106
+ KR: "AS",
107
+ KW: "AS",
108
+ KZ: "AS",
109
+ LA: "AS",
110
+ LB: "AS",
111
+ LC: "NA",
112
+ LI: "EU",
113
+ LK: "AS",
114
+ LR: "AF",
115
+ LS: "AF",
116
+ LT: "EU",
117
+ LU: "EU",
118
+ LV: "EU",
119
+ LY: "AF",
120
+ MA: "AF",
121
+ MC: "EU",
122
+ MD: "EU",
123
+ ME: "EU",
124
+ MG: "AF",
125
+ MK: "EU",
126
+ ML: "AF",
127
+ MM: "AS",
128
+ MN: "AS",
129
+ MO: "AS",
130
+ MR: "AF",
131
+ MT: "EU",
132
+ MU: "AF",
133
+ MV: "AS",
134
+ MW: "AF",
135
+ MX: "NA",
136
+ MY: "AS",
137
+ MZ: "AF",
138
+ NA: "AF",
139
+ NE: "AF",
140
+ NG: "AF",
141
+ NI: "NA",
142
+ NL: "EU",
143
+ NO: "EU",
144
+ NP: "AS",
145
+ NZ: "OC",
146
+ OM: "AS",
147
+ PA: "NA",
148
+ PE: "SA",
149
+ PG: "OC",
150
+ PH: "AS",
151
+ PK: "AS",
152
+ PL: "EU",
153
+ PR: "NA",
154
+ PS: "AS",
155
+ PT: "EU",
156
+ PY: "SA",
157
+ QA: "AS",
158
+ RO: "EU",
159
+ RS: "EU",
160
+ RU: "EU",
161
+ RW: "AF",
162
+ SA: "AS",
163
+ SB: "OC",
164
+ SC: "AF",
165
+ SD: "AF",
166
+ SE: "EU",
167
+ SG: "AS",
168
+ SI: "EU",
169
+ SK: "EU",
170
+ SL: "AF",
171
+ SM: "EU",
172
+ SN: "AF",
173
+ SO: "AF",
174
+ SR: "SA",
175
+ SS: "AF",
176
+ ST: "AF",
177
+ SV: "NA",
178
+ SY: "AS",
179
+ SZ: "AF",
180
+ TD: "AF",
181
+ TG: "AF",
182
+ TH: "AS",
183
+ TJ: "AS",
184
+ TL: "AS",
185
+ TM: "AS",
186
+ TN: "AF",
187
+ TO: "OC",
188
+ TR: "AS",
189
+ TT: "NA",
190
+ TW: "AS",
191
+ TZ: "AF",
192
+ UA: "EU",
193
+ UG: "AF",
194
+ US: "NA",
195
+ UY: "SA",
196
+ UZ: "AS",
197
+ VA: "EU",
198
+ VC: "NA",
199
+ VE: "SA",
200
+ VN: "AS",
201
+ VU: "OC",
202
+ WS: "OC",
203
+ XK: "EU",
204
+ YE: "AS",
205
+ ZA: "AF",
206
+ ZM: "AF",
207
+ ZW: "AF"
208
+ };
209
+ function getContinent(countryCode) {
210
+ if (!countryCode) return null;
211
+ return COUNTRY_TO_CONTINENT[countryCode.toUpperCase()] ?? null;
212
+ }
213
+
214
+ // src/taxonomy/countries.ts
215
+ var COUNTRIES = [
216
+ { code: "AF", name: "Afghanistan" },
217
+ { code: "AL", name: "Albania" },
218
+ { code: "DZ", name: "Algeria" },
219
+ { code: "AD", name: "Andorra" },
220
+ { code: "AO", name: "Angola" },
221
+ { code: "AG", name: "Antigua and Barbuda" },
222
+ { code: "AR", name: "Argentina" },
223
+ { code: "AM", name: "Armenia" },
224
+ { code: "AU", name: "Australia" },
225
+ { code: "AT", name: "Austria" },
226
+ { code: "AZ", name: "Azerbaijan" },
227
+ { code: "BS", name: "Bahamas" },
228
+ { code: "BH", name: "Bahrain" },
229
+ { code: "BD", name: "Bangladesh" },
230
+ { code: "BB", name: "Barbados" },
231
+ { code: "BY", name: "Belarus" },
232
+ { code: "BE", name: "Belgium" },
233
+ { code: "BZ", name: "Belize" },
234
+ { code: "BJ", name: "Benin" },
235
+ { code: "BT", name: "Bhutan" },
236
+ { code: "BO", name: "Bolivia" },
237
+ { code: "BA", name: "Bosnia and Herzegovina" },
238
+ { code: "BW", name: "Botswana" },
239
+ { code: "BR", name: "Brazil" },
240
+ { code: "BN", name: "Brunei" },
241
+ { code: "BG", name: "Bulgaria" },
242
+ { code: "BF", name: "Burkina Faso" },
243
+ { code: "BI", name: "Burundi" },
244
+ { code: "CV", name: "Cabo Verde" },
245
+ { code: "KH", name: "Cambodia" },
246
+ { code: "CM", name: "Cameroon" },
247
+ { code: "CA", name: "Canada" },
248
+ { code: "CF", name: "Central African Republic" },
249
+ { code: "TD", name: "Chad" },
250
+ { code: "CL", name: "Chile" },
251
+ { code: "CN", name: "China" },
252
+ { code: "CO", name: "Colombia" },
253
+ { code: "KM", name: "Comoros" },
254
+ { code: "CG", name: "Congo" },
255
+ { code: "CD", name: "Congo (DRC)" },
256
+ { code: "CR", name: "Costa Rica" },
257
+ { code: "CI", name: "Cote d'Ivoire" },
258
+ { code: "HR", name: "Croatia" },
259
+ { code: "CU", name: "Cuba" },
260
+ { code: "CY", name: "Cyprus" },
261
+ { code: "CZ", name: "Czechia" },
262
+ { code: "DK", name: "Denmark" },
263
+ { code: "DJ", name: "Djibouti" },
264
+ { code: "DM", name: "Dominica" },
265
+ { code: "DO", name: "Dominican Republic" },
266
+ { code: "EC", name: "Ecuador" },
267
+ { code: "EG", name: "Egypt" },
268
+ { code: "SV", name: "El Salvador" },
269
+ { code: "GQ", name: "Equatorial Guinea" },
270
+ { code: "ER", name: "Eritrea" },
271
+ { code: "EE", name: "Estonia" },
272
+ { code: "SZ", name: "Eswatini" },
273
+ { code: "ET", name: "Ethiopia" },
274
+ { code: "FJ", name: "Fiji" },
275
+ { code: "FI", name: "Finland" },
276
+ { code: "FR", name: "France" },
277
+ { code: "GA", name: "Gabon" },
278
+ { code: "GM", name: "Gambia" },
279
+ { code: "GE", name: "Georgia" },
280
+ { code: "DE", name: "Germany" },
281
+ { code: "GH", name: "Ghana" },
282
+ { code: "GR", name: "Greece" },
283
+ { code: "GD", name: "Grenada" },
284
+ { code: "GT", name: "Guatemala" },
285
+ { code: "GN", name: "Guinea" },
286
+ { code: "GW", name: "Guinea-Bissau" },
287
+ { code: "GY", name: "Guyana" },
288
+ { code: "HT", name: "Haiti" },
289
+ { code: "HN", name: "Honduras" },
290
+ { code: "HU", name: "Hungary" },
291
+ { code: "IS", name: "Iceland" },
292
+ { code: "IN", name: "India" },
293
+ { code: "ID", name: "Indonesia" },
294
+ { code: "IR", name: "Iran" },
295
+ { code: "IQ", name: "Iraq" },
296
+ { code: "IE", name: "Ireland" },
297
+ { code: "IL", name: "Israel" },
298
+ { code: "IT", name: "Italy" },
299
+ { code: "JM", name: "Jamaica" },
300
+ { code: "JP", name: "Japan" },
301
+ { code: "JO", name: "Jordan" },
302
+ { code: "KZ", name: "Kazakhstan" },
303
+ { code: "KE", name: "Kenya" },
304
+ { code: "KI", name: "Kiribati" },
305
+ { code: "KP", name: "North Korea" },
306
+ { code: "KR", name: "South Korea" },
307
+ { code: "KW", name: "Kuwait" },
308
+ { code: "KG", name: "Kyrgyzstan" },
309
+ { code: "LA", name: "Laos" },
310
+ { code: "LV", name: "Latvia" },
311
+ { code: "LB", name: "Lebanon" },
312
+ { code: "LS", name: "Lesotho" },
313
+ { code: "LR", name: "Liberia" },
314
+ { code: "LY", name: "Libya" },
315
+ { code: "LI", name: "Liechtenstein" },
316
+ { code: "LT", name: "Lithuania" },
317
+ { code: "LU", name: "Luxembourg" },
318
+ { code: "MG", name: "Madagascar" },
319
+ { code: "MW", name: "Malawi" },
320
+ { code: "MY", name: "Malaysia" },
321
+ { code: "MV", name: "Maldives" },
322
+ { code: "ML", name: "Mali" },
323
+ { code: "MT", name: "Malta" },
324
+ { code: "MH", name: "Marshall Islands" },
325
+ { code: "MR", name: "Mauritania" },
326
+ { code: "MU", name: "Mauritius" },
327
+ { code: "MX", name: "Mexico" },
328
+ { code: "FM", name: "Micronesia" },
329
+ { code: "MD", name: "Moldova" },
330
+ { code: "MC", name: "Monaco" },
331
+ { code: "MN", name: "Mongolia" },
332
+ { code: "ME", name: "Montenegro" },
333
+ { code: "MA", name: "Morocco" },
334
+ { code: "MZ", name: "Mozambique" },
335
+ { code: "MM", name: "Myanmar" },
336
+ { code: "NA", name: "Namibia" },
337
+ { code: "NR", name: "Nauru" },
338
+ { code: "NP", name: "Nepal" },
339
+ { code: "NL", name: "Netherlands" },
340
+ { code: "NZ", name: "New Zealand" },
341
+ { code: "NI", name: "Nicaragua" },
342
+ { code: "NE", name: "Niger" },
343
+ { code: "NG", name: "Nigeria" },
344
+ { code: "MK", name: "North Macedonia" },
345
+ { code: "NO", name: "Norway" },
346
+ { code: "OM", name: "Oman" },
347
+ { code: "PK", name: "Pakistan" },
348
+ { code: "PW", name: "Palau" },
349
+ { code: "PS", name: "Palestine" },
350
+ { code: "PA", name: "Panama" },
351
+ { code: "PG", name: "Papua New Guinea" },
352
+ { code: "PY", name: "Paraguay" },
353
+ { code: "PE", name: "Peru" },
354
+ { code: "PH", name: "Philippines" },
355
+ { code: "PL", name: "Poland" },
356
+ { code: "PT", name: "Portugal" },
357
+ { code: "QA", name: "Qatar" },
358
+ { code: "RO", name: "Romania" },
359
+ { code: "RU", name: "Russia" },
360
+ { code: "RW", name: "Rwanda" },
361
+ { code: "KN", name: "Saint Kitts and Nevis" },
362
+ { code: "LC", name: "Saint Lucia" },
363
+ { code: "VC", name: "Saint Vincent and the Grenadines" },
364
+ { code: "WS", name: "Samoa" },
365
+ { code: "SM", name: "San Marino" },
366
+ { code: "ST", name: "Sao Tome and Principe" },
367
+ { code: "SA", name: "Saudi Arabia" },
368
+ { code: "SN", name: "Senegal" },
369
+ { code: "RS", name: "Serbia" },
370
+ { code: "SC", name: "Seychelles" },
371
+ { code: "SL", name: "Sierra Leone" },
372
+ { code: "SG", name: "Singapore" },
373
+ { code: "SK", name: "Slovakia" },
374
+ { code: "SI", name: "Slovenia" },
375
+ { code: "SB", name: "Solomon Islands" },
376
+ { code: "SO", name: "Somalia" },
377
+ { code: "ZA", name: "South Africa" },
378
+ { code: "SS", name: "South Sudan" },
379
+ { code: "ES", name: "Spain" },
380
+ { code: "LK", name: "Sri Lanka" },
381
+ { code: "SD", name: "Sudan" },
382
+ { code: "SR", name: "Suriname" },
383
+ { code: "SE", name: "Sweden" },
384
+ { code: "CH", name: "Switzerland" },
385
+ { code: "SY", name: "Syria" },
386
+ { code: "TW", name: "Taiwan" },
387
+ { code: "TJ", name: "Tajikistan" },
388
+ { code: "TZ", name: "Tanzania" },
389
+ { code: "TH", name: "Thailand" },
390
+ { code: "TL", name: "Timor-Leste" },
391
+ { code: "TG", name: "Togo" },
392
+ { code: "TO", name: "Tonga" },
393
+ { code: "TT", name: "Trinidad and Tobago" },
394
+ { code: "TN", name: "Tunisia" },
395
+ { code: "TR", name: "Turkey" },
396
+ { code: "TM", name: "Turkmenistan" },
397
+ { code: "TV", name: "Tuvalu" },
398
+ { code: "UG", name: "Uganda" },
399
+ { code: "UA", name: "Ukraine" },
400
+ { code: "AE", name: "United Arab Emirates" },
401
+ { code: "GB", name: "United Kingdom" },
402
+ { code: "US", name: "United States" },
403
+ { code: "UY", name: "Uruguay" },
404
+ { code: "UZ", name: "Uzbekistan" },
405
+ { code: "VU", name: "Vanuatu" },
406
+ { code: "VA", name: "Vatican City" },
407
+ { code: "VE", name: "Venezuela" },
408
+ { code: "VN", name: "Vietnam" },
409
+ { code: "YE", name: "Yemen" },
410
+ { code: "ZM", name: "Zambia" },
411
+ { code: "ZW", name: "Zimbabwe" }
412
+ ];
413
+
414
+ // src/taxonomy/industry-taxonomy.ts
415
+ var INDUSTRY_OPTIONS = [
416
+ {
417
+ value: "id.sifa.defs#industryTechnology",
418
+ labelKey: "industryTechnology",
419
+ domains: [
420
+ { value: "id.sifa.defs#domainSoftwareEngineering", labelKey: "domainSoftwareEngineering" },
421
+ { value: "id.sifa.defs#domainDataScience", labelKey: "domainDataScience" },
422
+ { value: "id.sifa.defs#domainCybersecurity", labelKey: "domainCybersecurity" },
423
+ { value: "id.sifa.defs#domainDevops", labelKey: "domainDevops" },
424
+ { value: "id.sifa.defs#domainProductDesign", labelKey: "domainProductDesign" },
425
+ { value: "id.sifa.defs#domainGameDev", labelKey: "domainGameDev" }
426
+ ]
427
+ },
428
+ {
429
+ value: "id.sifa.defs#industryFinance",
430
+ labelKey: "industryFinance",
431
+ domains: [
432
+ { value: "id.sifa.defs#domainBanking", labelKey: "domainBanking" },
433
+ { value: "id.sifa.defs#domainFintech", labelKey: "domainFintech" },
434
+ { value: "id.sifa.defs#domainInsurance", labelKey: "domainInsurance" },
435
+ { value: "id.sifa.defs#domainInvestmentMgmt", labelKey: "domainInvestmentMgmt" }
436
+ ]
437
+ },
438
+ {
439
+ value: "id.sifa.defs#industryHealthcare",
440
+ labelKey: "industryHealthcare",
441
+ domains: [
442
+ { value: "id.sifa.defs#domainClinicalResearch", labelKey: "domainClinicalResearch" },
443
+ { value: "id.sifa.defs#domainHealthtech", labelKey: "domainHealthtech" },
444
+ { value: "id.sifa.defs#domainPharma", labelKey: "domainPharma" }
445
+ ]
446
+ },
447
+ {
448
+ value: "id.sifa.defs#industryEducation",
449
+ labelKey: "industryEducation",
450
+ domains: [
451
+ { value: "id.sifa.defs#domainHigherEd", labelKey: "domainHigherEd" },
452
+ { value: "id.sifa.defs#domainEdtech", labelKey: "domainEdtech" },
453
+ { value: "id.sifa.defs#domainPrimarySecondary", labelKey: "domainPrimarySecondary" }
454
+ ]
455
+ },
456
+ {
457
+ value: "id.sifa.defs#industryMedia",
458
+ labelKey: "industryMedia",
459
+ domains: [
460
+ { value: "id.sifa.defs#domainJournalism", labelKey: "domainJournalism" },
461
+ { value: "id.sifa.defs#domainFilmVideo", labelKey: "domainFilmVideo" },
462
+ { value: "id.sifa.defs#domainGaming", labelKey: "domainGaming" },
463
+ { value: "id.sifa.defs#domainAdvertising", labelKey: "domainAdvertising" }
464
+ ]
465
+ },
466
+ {
467
+ value: "id.sifa.defs#industryRetail",
468
+ labelKey: "industryRetail",
469
+ domains: [
470
+ { value: "id.sifa.defs#domainEcommerce", labelKey: "domainEcommerce" },
471
+ { value: "id.sifa.defs#domainSupplyChain", labelKey: "domainSupplyChain" }
472
+ ]
473
+ },
474
+ {
475
+ value: "id.sifa.defs#industryManufacturing",
476
+ labelKey: "industryManufacturing",
477
+ domains: [
478
+ { value: "id.sifa.defs#domainAutomotive", labelKey: "domainAutomotive" },
479
+ { value: "id.sifa.defs#domainAerospace", labelKey: "domainAerospace" },
480
+ { value: "id.sifa.defs#domainHardware", labelKey: "domainHardware" }
481
+ ]
482
+ },
483
+ {
484
+ value: "id.sifa.defs#industryEnergy",
485
+ labelKey: "industryEnergy",
486
+ domains: [
487
+ { value: "id.sifa.defs#domainRenewables", labelKey: "domainRenewables" },
488
+ { value: "id.sifa.defs#domainOilGas", labelKey: "domainOilGas" },
489
+ { value: "id.sifa.defs#domainClimateTech", labelKey: "domainClimateTech" }
490
+ ]
491
+ },
492
+ {
493
+ value: "id.sifa.defs#industryGovernment",
494
+ labelKey: "industryGovernment",
495
+ domains: [
496
+ { value: "id.sifa.defs#domainPublicPolicy", labelKey: "domainPublicPolicy" },
497
+ { value: "id.sifa.defs#domainDefense", labelKey: "domainDefense" }
498
+ ]
499
+ },
500
+ {
501
+ value: "id.sifa.defs#industryLegal",
502
+ labelKey: "industryLegal",
503
+ domains: [
504
+ { value: "id.sifa.defs#domainIpLaw", labelKey: "domainIpLaw" },
505
+ { value: "id.sifa.defs#domainCompliance", labelKey: "domainCompliance" }
506
+ ]
507
+ },
508
+ {
509
+ value: "id.sifa.defs#industryConsulting",
510
+ labelKey: "industryConsulting",
511
+ domains: [
512
+ { value: "id.sifa.defs#domainManagementConsulting", labelKey: "domainManagementConsulting" },
513
+ { value: "id.sifa.defs#domainDevrel", labelKey: "domainDevrel" },
514
+ { value: "id.sifa.defs#domainHrRecruitment", labelKey: "domainHrRecruitment" }
515
+ ]
516
+ },
517
+ {
518
+ value: "id.sifa.defs#industryNonprofit",
519
+ labelKey: "industryNonprofit",
520
+ domains: [
521
+ { value: "id.sifa.defs#domainHumanRights", labelKey: "domainHumanRights" },
522
+ { value: "id.sifa.defs#domainOpenSource", labelKey: "domainOpenSource" }
523
+ ]
524
+ },
525
+ {
526
+ value: "id.sifa.defs#industryRealEstate",
527
+ labelKey: "industryRealEstate",
528
+ domains: [{ value: "id.sifa.defs#domainProptech", labelKey: "domainProptech" }]
529
+ },
530
+ {
531
+ value: "id.sifa.defs#industryTransport",
532
+ labelKey: "industryTransport",
533
+ domains: [
534
+ { value: "id.sifa.defs#domainAutonomousVehicles", labelKey: "domainAutonomousVehicles" },
535
+ { value: "id.sifa.defs#domainLogistics", labelKey: "domainLogistics" }
536
+ ]
537
+ },
538
+ {
539
+ value: "id.sifa.defs#industryAgriculture",
540
+ labelKey: "industryAgriculture",
541
+ domains: [
542
+ { value: "id.sifa.defs#domainAgritech", labelKey: "domainAgritech" },
543
+ { value: "id.sifa.defs#domainFoodTech", labelKey: "domainFoodTech" }
544
+ ]
545
+ },
546
+ {
547
+ value: "id.sifa.defs#industryHospitality",
548
+ labelKey: "industryHospitality",
549
+ domains: [
550
+ { value: "id.sifa.defs#domainHotels", labelKey: "domainHotels" },
551
+ { value: "id.sifa.defs#domainTravelTourism", labelKey: "domainTravelTourism" },
552
+ { value: "id.sifa.defs#domainFoodBeverage", labelKey: "domainFoodBeverage" }
553
+ ]
554
+ },
555
+ {
556
+ value: "id.sifa.defs#industryTelecom",
557
+ labelKey: "industryTelecom",
558
+ domains: [
559
+ { value: "id.sifa.defs#domainNetworkInfra", labelKey: "domainNetworkInfra" },
560
+ { value: "id.sifa.defs#domainMobileServices", labelKey: "domainMobileServices" }
561
+ ]
562
+ },
563
+ {
564
+ value: "id.sifa.defs#industryMining",
565
+ labelKey: "industryMining",
566
+ domains: [
567
+ { value: "id.sifa.defs#domainExtraction", labelKey: "domainExtraction" },
568
+ { value: "id.sifa.defs#domainGeological", labelKey: "domainGeological" }
569
+ ]
570
+ },
571
+ {
572
+ value: "id.sifa.defs#industryFashion",
573
+ labelKey: "industryFashion",
574
+ domains: [
575
+ { value: "id.sifa.defs#domainFashionDesign", labelKey: "domainFashionDesign" },
576
+ { value: "id.sifa.defs#domainTextileManufacturing", labelKey: "domainTextileManufacturing" }
577
+ ]
578
+ },
579
+ {
580
+ value: "id.sifa.defs#industryMaritime",
581
+ labelKey: "industryMaritime",
582
+ domains: [
583
+ { value: "id.sifa.defs#domainShipping", labelKey: "domainShipping" },
584
+ { value: "id.sifa.defs#domainPortOperations", labelKey: "domainPortOperations" },
585
+ { value: "id.sifa.defs#domainNavalArchitecture", labelKey: "domainNavalArchitecture" }
586
+ ]
587
+ },
588
+ {
589
+ value: "id.sifa.defs#industryOther",
590
+ labelKey: "industryOther",
591
+ domains: []
592
+ }
593
+ ];
594
+
595
+ // src/taxonomy/platforms.ts
596
+ var PLATFORM_LABELS = {
597
+ bluesky: "Bluesky",
598
+ github: "GitHub",
599
+ linkedin: "LinkedIn",
600
+ youtube: "YouTube",
601
+ twitter: "X (Twitter)",
602
+ instagram: "Instagram",
603
+ substack: "Substack",
604
+ tangled: "Tangled",
605
+ dns: "Domain",
606
+ website: "Website",
607
+ rss: "RSS",
608
+ fediverse: "Fediverse",
609
+ orcid: "ORCID",
610
+ keyoxide: "Keyoxide"
611
+ };
612
+ function isKnownPlatform(platform) {
613
+ return platform in PLATFORM_LABELS;
614
+ }
615
+ function getPlatformLabel(platform) {
616
+ return isKnownPlatform(platform) ? PLATFORM_LABELS[platform] : PLATFORM_LABELS.website;
617
+ }
618
+ var EXCLUDED_FROM_DROPDOWN = /* @__PURE__ */ new Set(["bluesky", "dns", "tangled"]);
619
+ var PLATFORM_OPTIONS = Object.entries(PLATFORM_LABELS).filter(([value]) => !EXCLUDED_FROM_DROPDOWN.has(value)).map(([value, label]) => ({ value, label }));
620
+ function getFaviconUrl(siteUrl) {
621
+ try {
622
+ const { hostname } = new URL(siteUrl);
623
+ return `https://www.google.com/s2/favicons?domain=${encodeURIComponent(hostname)}&sz=32`;
624
+ } catch {
625
+ return null;
626
+ }
627
+ }
628
+
629
+ // src/taxonomy/skill-categories.ts
630
+ var SKILL_CATEGORIES = [
631
+ { value: "technical", label: "Technical" },
632
+ { value: "business", label: "Business" },
633
+ { value: "creative", label: "Creative" },
634
+ { value: "interpersonal", label: "Interpersonal" },
635
+ { value: "industry", label: "Industry" },
636
+ { value: "community", label: "Community" },
637
+ { value: "security", label: "Security" }
638
+ ];
639
+ var CATEGORY_ORDER = SKILL_CATEGORIES.map((c) => c.value);
640
+ var CATEGORY_LABELS = {
641
+ ...Object.fromEntries(SKILL_CATEGORIES.map((c) => [c.value, c.label])),
642
+ other: "Other"
643
+ };
644
+
645
+ // src/taxonomy/skill-grouping.ts
646
+ function dedupeSkills(skills) {
647
+ const groups = /* @__PURE__ */ new Map();
648
+ for (const skill of skills) {
649
+ const key = skill.name.trim().toLowerCase();
650
+ const existing = groups.get(key);
651
+ const positions = skill.positionRkeys ?? [];
652
+ if (!existing) {
653
+ groups.set(key, {
654
+ ...skill,
655
+ mergedRkeys: [skill.rkey],
656
+ positionRkeys: [...positions]
657
+ });
658
+ continue;
659
+ }
660
+ existing.mergedRkeys.push(skill.rkey);
661
+ if (!existing.category && skill.category) existing.category = skill.category;
662
+ if ((skill.endorsementCount ?? 0) > (existing.endorsementCount ?? 0)) {
663
+ existing.endorsementCount = skill.endorsementCount;
664
+ }
665
+ if (skill.endorsed) existing.endorsed = true;
666
+ if (skill.activityBacked) existing.activityBacked = true;
667
+ const merged = /* @__PURE__ */ new Set([...existing.positionRkeys ?? [], ...positions]);
668
+ existing.positionRkeys = Array.from(merged);
669
+ }
670
+ return Array.from(groups.values());
671
+ }
672
+ function groupSkillsByCategory(skills) {
673
+ const grouped = /* @__PURE__ */ new Map();
674
+ for (const skill of skills) {
675
+ const normalised = skill.category?.toLowerCase().trim() ?? "";
676
+ const key = CATEGORY_ORDER.includes(normalised) ? normalised : "other";
677
+ const bucket = grouped.get(key) ?? [];
678
+ bucket.push(skill);
679
+ grouped.set(key, bucket);
680
+ }
681
+ for (const [, groupSkills] of grouped) {
682
+ groupSkills.sort((a, b) => {
683
+ const countDiff = (b.endorsementCount ?? 0) - (a.endorsementCount ?? 0);
684
+ if (countDiff !== 0) return countDiff;
685
+ return a.name.localeCompare(b.name);
686
+ });
687
+ }
688
+ const ordered = [];
689
+ for (const cat of CATEGORY_ORDER) {
690
+ const group = grouped.get(cat);
691
+ if (group?.length) ordered.push([cat, group]);
692
+ }
693
+ const otherGroup = grouped.get("other");
694
+ if (otherGroup?.length) ordered.push(["other", otherGroup]);
695
+ return ordered;
696
+ }
697
+
698
+ // src/format/format-time.ts
699
+ function formatRelativeTime(dateString) {
700
+ const date = new Date(dateString);
701
+ if (isNaN(date.getTime())) return "";
702
+ const now = Date.now();
703
+ const diffMs = now - date.getTime();
704
+ if (diffMs < 0) return "";
705
+ const seconds = Math.floor(diffMs / 1e3);
706
+ if (seconds < 60) return `${seconds}s ago`;
707
+ const minutes = Math.floor(seconds / 60);
708
+ if (minutes < 60) return `${minutes}m ago`;
709
+ const hours = Math.floor(minutes / 60);
710
+ if (hours < 24) return `${hours}h ago`;
711
+ const days = Math.floor(hours / 24);
712
+ if (days < 30) return `${days}d ago`;
713
+ const months = Math.floor(days / 30);
714
+ if (months < 12) return `${months}mo ago`;
715
+ const years = Math.floor(months / 12);
716
+ return `${years}y ago`;
717
+ }
718
+
719
+ // src/format/sort-by-date.ts
720
+ var FAR_FUTURE = "9999-12-31";
721
+ var FAR_PAST = "0000-01-01";
722
+ function sortByDateDesc(items, extract) {
723
+ return [...items].sort((a, b) => {
724
+ const da = extract(a);
725
+ const db = extract(b);
726
+ const endA = da.current ? FAR_FUTURE : da.endDate ?? "";
727
+ const endB = db.current ? FAR_FUTURE : db.endDate ?? "";
728
+ const hasDateA = endA || da.startDate;
729
+ const hasDateB = endB || db.startDate;
730
+ if (hasDateA && !hasDateB) return -1;
731
+ if (!hasDateA && hasDateB) return 1;
732
+ if (endA !== endB) return endB.localeCompare(endA);
733
+ const startA = da.startDate ?? FAR_PAST;
734
+ const startB = db.startDate ?? FAR_PAST;
735
+ return startB.localeCompare(startA);
736
+ });
737
+ }
738
+ function dateRangeExtractor(item) {
739
+ return { startDate: item.startDate, endDate: item.endDate, current: item.current };
740
+ }
741
+ function lexiconDateExtractor(item) {
742
+ return { startDate: item.startedAt, endDate: item.endedAt, current: !item.endedAt };
743
+ }
744
+ function singleDateExtractor(item) {
745
+ return { endDate: item.date };
746
+ }
747
+ function certDateExtractor(item) {
748
+ return { startDate: item.issueDate, endDate: item.expiryDate ?? item.issueDate };
749
+ }
750
+
751
+ // src/format/handle-utils.ts
752
+ function sanitizeHandleInput(raw) {
753
+ let identifier = raw.trim().replace(/^https?:\/\/bsky\.app\/profile\//i, "").replace(/^at:\/\//i, "").replace(/^@/, "").replace(/^https?:\/\//i, "");
754
+ if (!identifier.startsWith("did:")) {
755
+ identifier = identifier.split("/")[0] ?? identifier;
756
+ }
757
+ identifier = identifier.replace(/\.$/, "");
758
+ if (!identifier.startsWith("did:")) {
759
+ identifier = identifier.toLowerCase();
760
+ }
761
+ if (identifier && !identifier.startsWith("did:") && !identifier.includes(".")) {
762
+ identifier = `${identifier}.bsky.social`;
763
+ }
764
+ return identifier;
765
+ }
766
+
767
+ // src/format/location-utils.ts
768
+ function formatLocation(loc) {
769
+ if (!loc) return "";
770
+ const parts = [loc.city, loc.region, loc.country].filter(Boolean);
771
+ if (loc.postalCode && !loc.city) {
772
+ return `${loc.postalCode}, ${loc.country}`;
773
+ }
774
+ return parts.join(", ");
775
+ }
776
+ function parseLocationString(str) {
777
+ if (!str.trim()) return null;
778
+ const parts = str.split(",").map((p) => p.trim()).filter(Boolean);
779
+ if (parts.length >= 3) {
780
+ return {
781
+ city: parts[0],
782
+ region: parts[1],
783
+ country: parts[parts.length - 1]
784
+ };
785
+ }
786
+ if (parts.length === 2) {
787
+ return {
788
+ city: parts[0],
789
+ country: parts[1]
790
+ };
791
+ }
792
+ return { country: parts[0] };
793
+ }
794
+ function countryCodeToFlag(code) {
795
+ if (!code || code.length !== 2) return "";
796
+ const upper = code.toUpperCase();
797
+ const a = upper.codePointAt(0);
798
+ const b = upper.codePointAt(1);
799
+ if (a === void 0 || b === void 0) return "";
800
+ return String.fromCodePoint(a - 65 + 127462, b - 65 + 127462);
801
+ }
802
+
803
+ // src/format/pds-utils.ts
804
+ var BSKY_PROFILE_BASE = "https://bsky.app/profile/";
805
+ var PDS_PROVIDERS = [
806
+ { suffix: ".bsky.social", name: "bluesky" },
807
+ { suffix: ".blacksky.app", name: "blacksky" },
808
+ { suffix: ".eurosky.social", name: "eurosky" },
809
+ { suffix: ".northsky.social", name: "northsky" }
810
+ ];
811
+ var KNOWN_PROVIDER_NAMES = new Set(PDS_PROVIDERS.map((p) => p.name));
812
+ var ICON_ONLY_PROVIDERS = /* @__PURE__ */ new Set(["selfhosted-social", "selfhosted"]);
813
+ function pdsProviderFromApi(apiProvider, handle) {
814
+ if (!apiProvider) return null;
815
+ if (ICON_ONLY_PROVIDERS.has(apiProvider.name)) {
816
+ return { name: apiProvider.name, profileUrl: "", host: apiProvider.host };
817
+ }
818
+ if (!KNOWN_PROVIDER_NAMES.has(apiProvider.name)) return null;
819
+ return {
820
+ name: apiProvider.name,
821
+ profileUrl: `${BSKY_PROFILE_BASE}${handle}`,
822
+ host: apiProvider.host
823
+ };
824
+ }
825
+ function getHandleStem(handle) {
826
+ const lower = handle.toLowerCase();
827
+ for (const provider of PDS_PROVIDERS) {
828
+ if (lower.endsWith(provider.suffix) && lower.length > provider.suffix.length) {
829
+ return handle.slice(0, -provider.suffix.length);
830
+ }
831
+ }
832
+ return handle;
833
+ }
834
+ function getDisplayLabel(displayName, handle) {
835
+ if (displayName) return displayName;
836
+ return getHandleStem(handle);
837
+ }
838
+ var PDS_DISPLAY_NAMES = {
839
+ bluesky: "Bluesky",
840
+ blacksky: "BlackSky",
841
+ eurosky: "EuroSky",
842
+ northsky: "NorthSky",
843
+ "selfhosted-social": "Self-hosted",
844
+ selfhosted: "Self-hosted"
845
+ };
846
+ function getPdsDisplayName(providerName) {
847
+ return PDS_DISPLAY_NAMES[providerName] ?? providerName;
848
+ }
849
+ function detectPdsProvider(handle) {
850
+ const lower = handle.toLowerCase();
851
+ for (const provider of PDS_PROVIDERS) {
852
+ if (lower.endsWith(provider.suffix)) {
853
+ return {
854
+ name: provider.name,
855
+ profileUrl: `${BSKY_PROFILE_BASE}${handle}`
856
+ };
857
+ }
858
+ }
859
+ return null;
860
+ }
861
+
862
+ // src/format/text-truncate.ts
863
+ var ELLIPSIS = "\u2026";
864
+ function truncateGraphemes(value, maxLen) {
865
+ if (maxLen <= 0) return "";
866
+ const segmenter = new Intl.Segmenter(void 0, { granularity: "grapheme" });
867
+ const graphemes = Array.from(segmenter.segment(value), (s) => s.segment);
868
+ if (graphemes.length <= maxLen) return value;
869
+ if (maxLen === 1) return ELLIPSIS;
870
+ return graphemes.slice(0, maxLen - 1).join("") + ELLIPSIS;
871
+ }
872
+
873
+ // src/format/time-utils.ts
874
+ function formatDistanceToNow(date) {
875
+ const seconds = Math.floor((Date.now() - date.getTime()) / 1e3);
876
+ if (seconds < 60) return "just now";
877
+ const minutes = Math.floor(seconds / 60);
878
+ if (minutes < 60) return `${minutes}m ago`;
879
+ const hours = Math.floor(minutes / 60);
880
+ if (hours < 24) return `${hours}h ago`;
881
+ const days = Math.floor(hours / 24);
882
+ if (days < 7) return `${days}d ago`;
883
+ const weeks = Math.floor(days / 7);
884
+ if (weeks < 5) return `${weeks}w ago`;
885
+ const months = Math.floor(days / 30);
886
+ return `${months}mo ago`;
887
+ }
888
+
889
+ // src/format/wcag-contrast.ts
890
+ function isValidRgbColor(value) {
891
+ if (value == null || typeof value !== "object") return false;
892
+ const { r, g, b } = value;
893
+ return typeof r === "number" && typeof g === "number" && typeof b === "number" && Number.isFinite(r) && Number.isFinite(g) && Number.isFinite(b) && r >= 0 && r <= 255 && g >= 0 && g <= 255 && b >= 0 && b <= 255;
894
+ }
895
+ function rgbToString(color) {
896
+ return `rgb(${Math.floor(color.r)}, ${Math.floor(color.g)}, ${Math.floor(color.b)})`;
897
+ }
898
+ function relativeLuminance(color) {
899
+ const [rs, gs, bs] = [color.r / 255, color.g / 255, color.b / 255];
900
+ const r = rs <= 0.04045 ? rs / 12.92 : Math.pow((rs + 0.055) / 1.055, 2.4);
901
+ const g = gs <= 0.04045 ? gs / 12.92 : Math.pow((gs + 0.055) / 1.055, 2.4);
902
+ const b = bs <= 0.04045 ? bs / 12.92 : Math.pow((bs + 0.055) / 1.055, 2.4);
903
+ return 0.2126 * r + 0.7152 * g + 0.0722 * b;
904
+ }
905
+ function contrastRatio(color1, color2) {
906
+ const l1 = relativeLuminance(color1);
907
+ const l2 = relativeLuminance(color2);
908
+ const lighter = Math.max(l1, l2);
909
+ const darker = Math.min(l1, l2);
910
+ return (lighter + 0.05) / (darker + 0.05);
911
+ }
912
+ function meetsContrastAA(foreground, background) {
913
+ return contrastRatio(foreground, background) >= 4.5;
914
+ }
915
+
916
+ // src/index.ts
917
+ var SIFA_SDK_VERSION = "0.1.0";
918
+
919
+ exports.CATEGORY_LABELS = CATEGORY_LABELS;
920
+ exports.CATEGORY_ORDER = CATEGORY_ORDER;
921
+ exports.CONTINENTS = CONTINENTS;
922
+ exports.COUNTRIES = COUNTRIES;
923
+ exports.INDUSTRY_OPTIONS = INDUSTRY_OPTIONS;
924
+ exports.PLATFORM_LABELS = PLATFORM_LABELS;
925
+ exports.PLATFORM_OPTIONS = PLATFORM_OPTIONS;
926
+ exports.SIFA_SDK_VERSION = SIFA_SDK_VERSION;
927
+ exports.SKILL_CATEGORIES = SKILL_CATEGORIES;
928
+ exports.certDateExtractor = certDateExtractor;
929
+ exports.contrastRatio = contrastRatio;
930
+ exports.countryCodeToFlag = countryCodeToFlag;
931
+ exports.dateRangeExtractor = dateRangeExtractor;
932
+ exports.dedupeSkills = dedupeSkills;
933
+ exports.detectPdsProvider = detectPdsProvider;
934
+ exports.formatDistanceToNow = formatDistanceToNow;
935
+ exports.formatLocation = formatLocation;
936
+ exports.formatRelativeTime = formatRelativeTime;
937
+ exports.getContinent = getContinent;
938
+ exports.getDisplayLabel = getDisplayLabel;
939
+ exports.getFaviconUrl = getFaviconUrl;
940
+ exports.getHandleStem = getHandleStem;
941
+ exports.getPdsDisplayName = getPdsDisplayName;
942
+ exports.getPlatformLabel = getPlatformLabel;
943
+ exports.groupSkillsByCategory = groupSkillsByCategory;
944
+ exports.isKnownPlatform = isKnownPlatform;
945
+ exports.isValidRgbColor = isValidRgbColor;
946
+ exports.lexiconDateExtractor = lexiconDateExtractor;
947
+ exports.meetsContrastAA = meetsContrastAA;
948
+ exports.parseLocationString = parseLocationString;
949
+ exports.pdsProviderFromApi = pdsProviderFromApi;
950
+ exports.relativeLuminance = relativeLuminance;
951
+ exports.rgbToString = rgbToString;
952
+ exports.sanitizeHandleInput = sanitizeHandleInput;
953
+ exports.singleDateExtractor = singleDateExtractor;
954
+ exports.sortByDateDesc = sortByDateDesc;
955
+ exports.truncateGraphemes = truncateGraphemes;
956
+ //# sourceMappingURL=index.cjs.map
957
+ //# sourceMappingURL=index.cjs.map