@v-office/website-sdk 1.2.1 → 2.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.
Files changed (46) hide show
  1. package/README.md +91 -232
  2. package/dist/cli.mjs +102 -83
  3. package/dist/client-BSUd3vuc.mjs +5111 -0
  4. package/dist/index.d.mts +2463 -11751
  5. package/dist/index.mjs +16 -4
  6. package/dist/instructions/CHANGELOG.md +9 -0
  7. package/dist/instructions/MIGRATION.md +9 -0
  8. package/dist/instructions/README.md +62 -0
  9. package/dist/instructions/availability.md +157 -0
  10. package/dist/instructions/booking.md +165 -0
  11. package/dist/instructions/contact.md +92 -0
  12. package/dist/instructions/creation.md +223 -0
  13. package/dist/instructions/filter.md +156 -0
  14. package/dist/instructions/quote.md +318 -0
  15. package/dist/instructions/rentals.md +152 -0
  16. package/dist/instructions/search.md +233 -0
  17. package/dist/instructions/versions/2.0.0/CHANGELOG.md +69 -0
  18. package/dist/instructions/versions/2.0.0/MIGRATION.md +223 -0
  19. package/dist/{quote-DQGps4dy.mjs → quote-1uEIO44v.mjs} +15 -16
  20. package/dist/{rentals-plxPVx83.mjs → rentals-Quwc78o2.mjs} +22 -16
  21. package/dist/{search-BuR5apFw.mjs → search-GRQeXDvo.mjs} +40 -23
  22. package/dist/to-rental-highlights-FNZBR4aD.mjs +5905 -0
  23. package/instructions/CHANGELOG.md +9 -0
  24. package/instructions/MIGRATION.md +9 -0
  25. package/instructions/README.md +62 -0
  26. package/instructions/availability.md +157 -0
  27. package/instructions/booking.md +165 -0
  28. package/instructions/contact.md +92 -0
  29. package/instructions/creation.md +223 -0
  30. package/instructions/filter.md +156 -0
  31. package/instructions/quote.md +318 -0
  32. package/instructions/rentals.md +152 -0
  33. package/instructions/search.md +233 -0
  34. package/instructions/versions/2.0.0/CHANGELOG.md +69 -0
  35. package/instructions/versions/2.0.0/MIGRATION.md +223 -0
  36. package/package.json +41 -56
  37. package/dist/client-DeEUMMOh.mjs +0 -33237
  38. package/dist/custom-attribute-D5Kb1YHA.mjs +0 -54
  39. package/dist/errors-2cuUGSvi.mjs +0 -5
  40. package/dist/operations-B4IgNB3E.mjs +0 -12618
  41. package/dist/operations-DcU1qt7g.mjs +0 -1158
  42. package/dist/quote-BVx3TAHE.mjs +0 -513
  43. package/dist/quote-CRjV_lf-.mjs +0 -609
  44. package/dist/rentals-H3RYtMqT.mjs +0 -323
  45. package/dist/search-filter-metadata-DZP0-Udc.mjs +0 -4294
  46. package/dist/to-rental-highlights-CAATPqan.mjs +0 -524
@@ -1,524 +0,0 @@
1
- import { P as VofficeUnitDataPropertyMetadata } from "./client-DeEUMMOh.mjs";
2
- import "./errors-2cuUGSvi.mjs";
3
- import { b as localeToLanguage, v as toCountry, y as makeTranslate } from "./quote-CRjV_lf-.mjs";
4
- import { i as renderLabeledAttributeValue, t as renderCustomAttributeHighlight } from "./custom-attribute-D5Kb1YHA.mjs";
5
- import { Effect } from "effect";
6
- //#region src/adapters/v9/parser/rentals/to-localized-string.ts
7
- const isNonEmptyString$1 = (value) => typeof value === "string" && value.length > 0;
8
- const isRecord = (value) => typeof value === "object" && value !== null;
9
- const toLocalizedString = (value, locale) => {
10
- if (isNonEmptyString$1(value)) return value;
11
- if (!isRecord(value)) return void 0;
12
- const preferredKeys = [
13
- locale,
14
- localeToLanguage(locale),
15
- "en"
16
- ];
17
- for (const key of preferredKeys) {
18
- const localizedValue = value[key];
19
- if (isNonEmptyString$1(localizedValue)) return localizedValue;
20
- }
21
- return Object.values(value).find(isNonEmptyString$1);
22
- };
23
- //#endregion
24
- //#region src/adapters/v9/parser/rentals/to-address.ts
25
- const toProvince = (data, locale) => {
26
- return toLocalizedString(data.known.regionName, locale);
27
- };
28
- const toAddress = (data, locale) => {
29
- const source = data.known.address;
30
- const address = {};
31
- if (source == null) return address;
32
- if (source.street != null) address.street = [source.street, source.housenumber].filter((part) => part != null && part.length > 0).join(" ");
33
- if (source.postalcode != null) address.postalcode = source.postalcode;
34
- if (source.city != null) address.city = source.city;
35
- if (source.country != null) address.country = toCountry(source.country, locale);
36
- const province = toProvince(data, locale);
37
- if (province != null) address.province = province;
38
- return address;
39
- };
40
- //#endregion
41
- //#region src/adapters/v9/parser/rentals/to-image.ts
42
- const IMAGE_ASPECT_RATIO = 3 / 2;
43
- const IMAGE_SRCSET_WIDTHS = [
44
- 320,
45
- 480,
46
- 640,
47
- 960,
48
- 1280,
49
- 1920,
50
- 2560
51
- ];
52
- const IMAGE_DEFAULT_WIDTH = 960;
53
- const buildImageUrl = (imageProxyBaseUrl, path, width) => {
54
- const base = imageProxyBaseUrl.replace(/\/$/, "");
55
- const normalizedPath = path.replace(/^\/+/, "");
56
- return `${base}/_/rs:fill:${width}:${Math.round(width / IMAGE_ASPECT_RATIO)}:0/plain/${normalizedPath}`;
57
- };
58
- const buildSrcset = (imageProxyBaseUrl, path) => IMAGE_SRCSET_WIDTHS.map((width) => `${buildImageUrl(imageProxyBaseUrl, path, width)} ${width}w`).join(", ");
59
- const isNonEmptyString = (value) => typeof value === "string" && value.length > 0;
60
- const toDataImageId = (dataImage) => dataImage?.id?.toString();
61
- const getImagePath = (entry) => entry.image?.path ?? entry.normalizedPath;
62
- const getFileName = (path) => path?.split("/").at(-1);
63
- const getDirectoryName = (path) => {
64
- const lastSlashIndex = path.lastIndexOf("/");
65
- return lastSlashIndex === -1 ? void 0 : path.slice(0, lastSlashIndex);
66
- };
67
- const stripDataImageFilePrefix = (fileName) => fileName.replace(/^mf(?=\d)/i, "");
68
- const getDataImageFileName = (dataImage) => {
69
- const name = dataImage.name != null ? stripDataImageFilePrefix(dataImage.name) : void 0;
70
- if (name != null) return name;
71
- return dataImage.id != null ? `${dataImage.id}.jpg` : void 0;
72
- };
73
- const normalizeDataImagePath = (dataImage, vofficeImages) => {
74
- const fileName = getDataImageFileName(dataImage);
75
- if (fileName == null) return void 0;
76
- const matchingPath = vofficeImages.find((image) => getFileName(image.path ?? void 0) === fileName)?.path;
77
- if (matchingPath != null) return matchingPath;
78
- const directoryName = vofficeImages.map((image) => image.path != null ? getDirectoryName(image.path) : void 0).find((path) => path != null);
79
- return directoryName != null ? `${directoryName}/${fileName}` : void 0;
80
- };
81
- const pathMatchesName = (path, name) => path != null && name != null && (path === name || path.endsWith(`/${name}`));
82
- const entriesShareId = (left, right) => {
83
- const leftIds = [left.image?.id, toDataImageId(left.dataImage)].filter(isNonEmptyString);
84
- const rightIds = [right.image?.id, toDataImageId(right.dataImage)].filter(isNonEmptyString);
85
- return leftIds.some((leftId) => rightIds.includes(leftId));
86
- };
87
- const entriesSharePathOrName = (left, right) => {
88
- const leftPath = getImagePath(left);
89
- const rightPath = getImagePath(right);
90
- const leftName = left.dataImage != null ? getDataImageFileName(left.dataImage) : getFileName(left.image?.path ?? void 0);
91
- const rightName = right.dataImage != null ? getDataImageFileName(right.dataImage) : getFileName(right.image?.path ?? void 0);
92
- return leftPath != null && rightPath != null && leftPath === rightPath || pathMatchesName(leftPath, rightName) || pathMatchesName(rightPath, leftName);
93
- };
94
- const entriesMatch = (left, right) => entriesShareId(left, right) || entriesSharePathOrName(left, right);
95
- const mergeEntry = (existing, next) => {
96
- const image = existing.image ?? next.image;
97
- const dataImage = existing.dataImage ?? next.dataImage;
98
- const normalizedPath = existing.normalizedPath ?? next.normalizedPath;
99
- const entry = { source: existing.source };
100
- if (image != null) entry.image = image;
101
- if (dataImage != null) entry.dataImage = dataImage;
102
- if (normalizedPath != null) entry.normalizedPath = normalizedPath;
103
- return entry;
104
- };
105
- const mergeImageEntries = (entries) => {
106
- const merged = [];
107
- for (const entry of entries) {
108
- const index = merged.findIndex((existing) => entriesMatch(existing, entry));
109
- if (index === -1) {
110
- merged.push(entry);
111
- continue;
112
- }
113
- merged[index] = mergeEntry(merged[index], entry);
114
- }
115
- return merged;
116
- };
117
- const getImageEntries = (rental, data) => {
118
- const vofficeImages = rental.voffice_images ?? [];
119
- return [
120
- ...vofficeImages.map((image) => ({
121
- source: "voffice_images",
122
- image
123
- })),
124
- ...(rental.voffice_room_images ?? []).map((image) => ({
125
- source: "voffice_room_images",
126
- image
127
- })),
128
- ...(data.known.images ?? []).flatMap((dataImage) => {
129
- const normalizedPath = normalizeDataImagePath(dataImage, vofficeImages);
130
- if (normalizedPath == null) return [];
131
- return [{
132
- source: "data_images",
133
- dataImage,
134
- normalizedPath
135
- }];
136
- })
137
- ];
138
- };
139
- const toImage = (imageProxyBaseUrl, entry, locale) => {
140
- const path = getImagePath(entry);
141
- const src = path != null ? buildImageUrl(imageProxyBaseUrl, path, IMAGE_DEFAULT_WIDTH) : "";
142
- const srcset = path != null ? buildSrcset(imageProxyBaseUrl, path) : "";
143
- const title = toLocalizedString(entry.dataImage?.titles, locale) ?? entry.image?.title;
144
- const alt = title ?? entry.image?.description ?? "";
145
- const metadata = { source: entry.source };
146
- if (entry.dataImage != null) metadata.dataImage = entry.dataImage;
147
- const image = {
148
- idOrPath: path ?? toDataImageId(entry.dataImage) ?? entry.dataImage?.name ?? "",
149
- src,
150
- srcset,
151
- alt,
152
- metadata
153
- };
154
- if (title != null) image.title = title;
155
- if (entry.dataImage?.tag != null) image.category = entry.dataImage.tag;
156
- return image;
157
- };
158
- const toImages = (imageProxyBaseUrl, rental, locale, data) => {
159
- if (rental.voffice_images == null || rental.voffice_images.length === 0) return [];
160
- return mergeImageEntries(getImageEntries(rental, data)).map((entry) => toImage(imageProxyBaseUrl, entry, locale));
161
- };
162
- //#endregion
163
- //#region scripts/v9/heuristic-generation/rental-highlight-key-map.ts
164
- const V9_RENTAL_HIGHLIGHT_KEYS = new Set(Object.keys(VofficeUnitDataPropertyMetadata));
165
- const V9_RENTAL_HIGHLIGHT_KEY_LOOKUP = {
166
- ac: "ac",
167
- acCoverage: "acCoverage",
168
- accessToPrivateBeach: "privateBeach",
169
- accessibleByLift: "lift",
170
- adaptedBath: "handicappedAccessible",
171
- adventure: "adventure",
172
- airportdistance: "airportdistance",
173
- alarmClock: "alarmClock",
174
- alarmSystem: "alarmSystem",
175
- allergic: "allergic",
176
- archery: "archery",
177
- awayFromItAll: "away_from_it_all",
178
- babygate: "babygate",
179
- balcony: "balcony",
180
- balloonTrips: "balloon_trips",
181
- basketball: "basketball",
182
- bathroomEmergencyPullCord: "handicappedAccessible",
183
- bbq: "bbq",
184
- bbqArea: "bbqArea",
185
- bbqType: "bbqType",
186
- beach: "beach",
187
- beachChair: "beachChair",
188
- beachChairAtBeach: "beachChairAtBeach",
189
- beachaccess: "loc_beach",
190
- beachdistance: "beachdistance",
191
- beachfront: "beachfront",
192
- beachtype: "beachtype",
193
- beachview: "beachview",
194
- beachvolleyball: "beachvolleyball",
195
- beamer: "beamer",
196
- bicycles: "bicycles",
197
- billiards: "billiards",
198
- birdWatching: "birdWatching",
199
- bathrooms: "bathrooms",
200
- bedrooms: "bedrooms",
201
- blinds: "blinds",
202
- bluray: "bluray",
203
- boatBerth: "boatBerth",
204
- boatRental: "boat_rental",
205
- boatTrip: "boat_trip",
206
- boccie: "boccie",
207
- bodySoap: "toiletries",
208
- bookDvdMusicLibraryForChildren: "books",
209
- books: "books",
210
- botanicalGarden: "botanicalGarden",
211
- bowling: "bowling",
212
- budget: "budget",
213
- bungeeJumping: "bungee_jumping",
214
- canoeing: "canoeing",
215
- carNecessity: "carNecessity",
216
- carbonMonoxideDetector: "carbonMonoxideDetector",
217
- carport: "carport",
218
- carriageRides: "carriage_rides",
219
- cd: "cd",
220
- cds: "cds",
221
- childSafetySocketCovers: "socketSafetyCovers",
222
- childrenWelcome: "childrenWelcome",
223
- church: "church",
224
- cinema: "cinema",
225
- citydistance: "citydistance",
226
- climbing: "climbing",
227
- closedPlot: "closedPlot",
228
- closedTerrace: "closedTerrace",
229
- coffeemaker: "coffeemaker",
230
- conditioner: "toiletries",
231
- cookingUtensils: "cookingUtensils",
232
- cosmeticTreatments: "cosmetic_treatments",
233
- countrysideView: "countrysideView",
234
- countrysideViewType: "countrysideViewType",
235
- coveredTerrace: "coveredTerrace",
236
- crossCountrySkiing: "cross-country_skiing",
237
- culture: "culture",
238
- cycling: "cycling",
239
- danceCourses: "dance_courses",
240
- daySpa: "day_spa",
241
- deepseaFisching: "deepseaFisching",
242
- detached: "detached",
243
- diningSeating: "diningSeating",
244
- dishcloth: "dishcloth",
245
- dishes: "dishes",
246
- dishwasher: "dishwasher",
247
- disco: "disco",
248
- diving: "diving",
249
- dryer: "dryer",
250
- dutyfree: "dutyfree",
251
- dvd: "dvd",
252
- dvds: "dvds",
253
- eggboiler: "eggboiler",
254
- electricKettle: "electricKettle",
255
- elevation: "elevation",
256
- entireUnitWheelchairAccessible: "wheelchairFriendly",
257
- espressomachine: "espressomachine",
258
- espressomachineType: "espressomachineType",
259
- fan: "fan",
260
- family: "family",
261
- farmHolidays: "farm_holidays",
262
- ferrydistance: "ferrydistance",
263
- festivals: "festivals",
264
- fireAlarms: "firealarm",
265
- fireExtinguisher: "fireExtinguisher",
266
- fireplace: "fireplace",
267
- fireside: "fireside",
268
- firesideType: "firesideType",
269
- firstAidKit: "firstAidKit",
270
- fishguttingPlace: "fishguttingPlace",
271
- fitnessTraining: "fitness-training",
272
- floor: "floor",
273
- floorCount: "floorCount",
274
- flyscreen: "flyscreen",
275
- football: "football",
276
- freezer: "freezer",
277
- freezerType: "freezerType",
278
- fridge: "fridge",
279
- fullLengthMirror: "fullLengthMirror",
280
- gambling: "gambling",
281
- games: "games",
282
- garage: "garage",
283
- garden: "garden",
284
- gardenShed: "gardenShed",
285
- gardenView: "gardenView",
286
- golf: "golf",
287
- golfdistance: "golfdistance",
288
- guestwc: "guestwc",
289
- gym: "fitnessroom",
290
- gymnastics: "gymnastics",
291
- hammock: "hammock",
292
- handcart: "handcart",
293
- handicappedAccessible: "handicappedAccessible",
294
- heating: "heating",
295
- heatingSystem: "heatingSystem",
296
- helicopterTours: "helicopter_tours",
297
- hifi: "hifi",
298
- hiking: "hiking",
299
- historic: "historic",
300
- holidayComplex: "holiday_complex",
301
- homecinema: "homecinema",
302
- horsebackRiding: "horseback_riding",
303
- iceSkating: "iceSkating",
304
- individualAirConditioning: "ac",
305
- indoorGrill: "indoorGrill",
306
- indoorPool: "indoorPool",
307
- infraredCabin: "infraredCabin",
308
- internet: "internet",
309
- internetSpeed: "internetSpeed",
310
- iron: "iron",
311
- ironingBoard: "ironingBoard",
312
- jetSkiing: "jetSkiing",
313
- jogging: "jogging",
314
- kayaking: "kayaking",
315
- kitchen: "kitchen",
316
- kitchenDescription: "kitchenDescription",
317
- kitchenType: "kitchenType",
318
- kitchenmachine: "kitchenmachine",
319
- lakedistance: "lakedistance",
320
- lakeview: "lakeview",
321
- lakeviewType: "lakeviewType",
322
- landingStage: "landingStage",
323
- laundryRack: "laundryRack",
324
- library: "library",
325
- lift: "lift",
326
- locAtm: "loc_atm",
327
- locBay: "loc_bay",
328
- locBeach: "loc_beach",
329
- locCity: "loc_city",
330
- locDowntown: "loc_downtown",
331
- locForest: "loc_forest",
332
- locGroceries: "loc_groceries",
333
- locHospital: "loc_hospital",
334
- locLake: "loc_lake",
335
- locMedicalServices: "loc_medical_services",
336
- locMountain: "loc_mountain",
337
- locOcean: "loc_ocean",
338
- locRiver: "loc_river",
339
- locRural: "loc_rural",
340
- locVillage: "loc_village",
341
- locWaterfalls: "loc_waterfalls",
342
- loungeSeating: "loungeSeating",
343
- livingrooms: "living_room",
344
- lowBathroomSink: "handicappedAccessible",
345
- luxury: "luxury",
346
- marquee: "marquee",
347
- massages: "massages",
348
- maxAdults: "beds",
349
- maxPersons: "beds",
350
- microwave: "microwave",
351
- minigolf: "minigolf",
352
- minibar: "minibar",
353
- minpersons: "minpersons",
354
- mixer: "mixer",
355
- mountainbiking: "mountainbiking",
356
- mountainview: "mountainview",
357
- mountainviewType: "mountainviewType",
358
- museums: "museums",
359
- nordicWalking: "nordic-walking",
360
- nonsmoking: "nonsmoking",
361
- nudeBeach: "nudeBeach",
362
- outdoorDiningArea: "gardenFurniture",
363
- outdoorFurniture: "gardenFurniture",
364
- outdoorKitchen: "outdoorKitchen",
365
- outdoorPool: "pool",
366
- outdoorPoolDetails: "pool",
367
- outdoorShower: "outdoorShower",
368
- oven: "oven",
369
- ovenConnection: "ovenConnection",
370
- paragliding: "paragliding",
371
- parasailing: "parasailing",
372
- parasol: "parasol",
373
- parkingCount: "parkingCount",
374
- pavilion: "pavilion",
375
- penthouse: "penthouse",
376
- pilates: "pilates",
377
- playground: "playground",
378
- playgroundActivity: "playgroundActivity",
379
- plotSize: "plotSize",
380
- pond: "pond",
381
- pool4kids: "pool4kids",
382
- pooltable: "pooltable",
383
- poolView: "poolView",
384
- privateOpenAirBath: "outdoorShower",
385
- privateparking: "privateparking",
386
- publictransportdistance: "publictransportdistance",
387
- qiGong: "qi_gong",
388
- raclette: "raclette",
389
- radio: "radio",
390
- rafting: "rafting",
391
- restaurantdistance: "restaurantdistance",
392
- restaurants: "restaurants",
393
- riverView: "riverView",
394
- rollInShower: "handicappedAccessible",
395
- romantic: "romantic",
396
- rooms: "rooms",
397
- rowing: "rowing",
398
- ruins: "ruins",
399
- safe: "safe",
400
- sailing: "sailing",
401
- sandbox: "sandbox",
402
- sandwichToaster: "sandwichToaster",
403
- sauna: "sauna",
404
- seadistance: "seadistance",
405
- seaview: "seaview",
406
- seaviewType: "seaviewType",
407
- shampoo: "toiletries",
408
- shoeCabinet: "shoeCabinet",
409
- shopping: "shopping",
410
- shoppingdistance: "shoppingdistance",
411
- showerChair: "handicappedAccessible",
412
- sightSeeing: "sight_seeing",
413
- skiBootWarmer: "skiBootWarmer",
414
- skidistance: "skidistance",
415
- skialpine: "skialpine",
416
- sledding: "sledding",
417
- slide: "slide",
418
- smokeDetector: "smokeDetector",
419
- snorkeling: "snorkeling",
420
- snowboarding: "snowboarding",
421
- solarium: "solarium",
422
- spa: "wellness",
423
- spices: "spices",
424
- spelunking: "spelunking",
425
- sportsActivities: "sports_activities",
426
- squash: "squash",
427
- stars: "stars",
428
- steambath: "steambath",
429
- stove: "stove",
430
- stoveType: "stoveType",
431
- sunbathingArea: "sunbathingArea",
432
- sunlounger: "sunlounger",
433
- surfing: "surfing",
434
- swimming: "swimming",
435
- swing: "swing",
436
- synagogues: "synagogues",
437
- tableTennis: "table_tennis",
438
- tableTennisTable: "tableTennisTable",
439
- tennis: "tennis",
440
- tennisCourt: "tennisCourt",
441
- terrace: "terrace",
442
- theater: "theater",
443
- themeParks: "themeParks",
444
- toaster: "toaster",
445
- toiletPaper: "toiletries",
446
- toiletWithGrabRails: "handicappedAccessible",
447
- toothbrush: "toiletries",
448
- touristAttractions: "tourist_attractions",
449
- toys: "toys",
450
- trainstationdistance: "trainstationdistance",
451
- trampoline: "trampoline",
452
- trashCans: "trashcan",
453
- trashcan: "trashcan",
454
- trekking: "trekking",
455
- tv: "tv",
456
- tvConnection: "tvConnection",
457
- tvCount: "tvCount",
458
- tvInternationalChannels: "tvInternationalChannels",
459
- tvSize: "tvSize",
460
- upperFloorReachableByLift: "lift",
461
- vacuum: "vacuum",
462
- valleyView: "valleyView",
463
- valleyViewType: "valleyViewType",
464
- vod: "vod",
465
- walking: "walking",
466
- warmwater: "warmwater",
467
- washer: "washer",
468
- waterParks: "waterParks",
469
- waterSki: "water_ski",
470
- waterSport: "water_sport",
471
- wellness: "wellness",
472
- wellnessActivity: "wellnessActivity",
473
- whaleWatching: "whale_watching",
474
- wheelchairFriendly: "wheelchairFriendly",
475
- whirlpool: "whirlpool",
476
- wifi: "wifi",
477
- windScreen: "windScreen",
478
- windSurfing: "windSurfing",
479
- yearOfConstruction: "yearOfConstruction",
480
- yearOfLastRenovation: "yearOfLastRenovation",
481
- yoga: "yoga",
482
- youthgroups: "youthgroups",
483
- zoo: "zoo"
484
- };
485
- const toV9RentalHighlightKey = (key) => {
486
- const mappedKey = V9_RENTAL_HIGHLIGHT_KEY_LOOKUP[key] ?? key;
487
- return V9_RENTAL_HIGHLIGHT_KEYS.has(mappedKey) ? mappedKey : void 0;
488
- };
489
- //#endregion
490
- //#region src/adapters/v9/parser/rentals/to-rental-highlights.ts
491
- const toRentalHighlights = ({ locale, translations, highlightPrioritization, customAttributeFilterDefinitions, attributes }) => Effect.gen(function* () {
492
- const highlights = [];
493
- const seenKeys = /* @__PURE__ */ new Set();
494
- const knownAttributes = attributes.known;
495
- const translate = makeTranslate(translations, locale);
496
- for (const highlightKey of highlightPrioritization) {
497
- const v9Key = toV9RentalHighlightKey(highlightKey);
498
- if (v9Key == null) {
499
- if (seenKeys.has(highlightKey)) continue;
500
- seenKeys.add(highlightKey);
501
- const highlight = renderCustomAttributeHighlight({
502
- definitions: customAttributeFilterDefinitions,
503
- key: highlightKey,
504
- locale,
505
- value: knownAttributes[highlightKey] ?? attributes.unknown[highlightKey]
506
- });
507
- if (highlight != null) highlights.push(highlight);
508
- continue;
509
- }
510
- if (seenKeys.has(v9Key)) continue;
511
- seenKeys.add(v9Key);
512
- const metadata = VofficeUnitDataPropertyMetadata[v9Key];
513
- const highlight = renderLabeledAttributeValue({
514
- key: v9Key,
515
- label: yield* translate(metadata.labelKey, v9Key),
516
- locale,
517
- value: knownAttributes[v9Key]
518
- });
519
- if (highlight != null) highlights.push(highlight);
520
- }
521
- return highlights;
522
- });
523
- //#endregion
524
- export { toLocalizedString as i, toImages as n, toAddress as r, toRentalHighlights as t };