@davi-ai/retorik-framework 3.0.4 → 3.2.1
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/AttachmentDetail.1e06c2a5.js +1757 -0
- package/dist/AttachmentDetail.1e06c2a5.js.map +1 -0
- package/dist/AttachmentDetail.c6c297df.js +1732 -0
- package/dist/AttachmentDetail.c6c297df.js.map +1 -0
- package/dist/CustomView.080c8028.js +143 -0
- package/dist/CustomView.080c8028.js.map +1 -0
- package/dist/CustomView.90d2a13d.js +134 -0
- package/dist/CustomView.90d2a13d.js.map +1 -0
- package/dist/Emergency.423214ad.js +301 -0
- package/dist/Emergency.423214ad.js.map +1 -0
- package/dist/Emergency.a21f837c.js +292 -0
- package/dist/Emergency.a21f837c.js.map +1 -0
- package/dist/FullScreenImage.1fe27198.js +70 -0
- package/dist/FullScreenImage.1fe27198.js.map +1 -0
- package/dist/FullScreenImage.9a9b978e.js +83 -0
- package/dist/FullScreenImage.9a9b978e.js.map +1 -0
- package/dist/HistoryList.50ff0fd9.js +242 -0
- package/dist/HistoryList.50ff0fd9.js.map +1 -0
- package/dist/HistoryList.5fd6aa12.js +228 -0
- package/dist/HistoryList.5fd6aa12.js.map +1 -0
- package/dist/LanguageChoice.1579b654.js +125 -0
- package/dist/LanguageChoice.1579b654.js.map +1 -0
- package/dist/LanguageChoice.61e36c1d.js +116 -0
- package/dist/LanguageChoice.61e36c1d.js.map +1 -0
- package/dist/LittleWeatherContainer.07937cf3.js +57 -0
- package/dist/LittleWeatherContainer.07937cf3.js.map +1 -0
- package/dist/LittleWeatherContainer.d27a6b8a.js +44 -0
- package/dist/LittleWeatherContainer.d27a6b8a.js.map +1 -0
- package/dist/NewsContainer.67f04b19.js +730 -0
- package/dist/NewsContainer.67f04b19.js.map +1 -0
- package/dist/NewsContainer.932174e9.js +755 -0
- package/dist/NewsContainer.932174e9.js.map +1 -0
- package/dist/SpiritEngineWrapper.1d8db53d.js +82 -0
- package/dist/SpiritEngineWrapper.1d8db53d.js.map +1 -0
- package/dist/SpiritEngineWrapper.27e9c120.js +96 -0
- package/dist/SpiritEngineWrapper.27e9c120.js.map +1 -0
- package/dist/ThreeJsWrapper.09c689b8.js +141 -0
- package/dist/ThreeJsWrapper.09c689b8.js.map +1 -0
- package/dist/ThreeJsWrapper.7918143f.js +128 -0
- package/dist/ThreeJsWrapper.7918143f.js.map +1 -0
- package/dist/Weather.661c2cac.js +282 -0
- package/dist/Weather.661c2cac.js.map +1 -0
- package/dist/Weather.fb22fba3.js +268 -0
- package/dist/Weather.fb22fba3.js.map +1 -0
- package/dist/index.d.ts +75 -52
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +22964 -23014
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +22548 -22528
- package/dist/index.modern.js.map +1 -1
- package/package.json +4 -36
|
@@ -0,0 +1,1757 @@
|
|
|
1
|
+
var $ajtMF$reactjsxruntime = require("react/jsx-runtime");
|
|
2
|
+
var $ajtMF$react = require("react");
|
|
3
|
+
var $ajtMF$reactspringweb = require("@react-spring/web");
|
|
4
|
+
var $ajtMF$qrcode = require("qrcode");
|
|
5
|
+
var $ajtMF$reactleaflet = require("react-leaflet");
|
|
6
|
+
var $ajtMF$leaflet = require("leaflet");
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
function $parcel$interopDefault(a) {
|
|
10
|
+
return a && a.__esModule ? a.default : a;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
function $parcel$defineInteropFlag(a) {
|
|
14
|
+
Object.defineProperty(a, '__esModule', {value: true, configurable: true});
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
function $parcel$export(e, n, v, s) {
|
|
18
|
+
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
var $parcel$global =
|
|
22
|
+
typeof globalThis !== 'undefined'
|
|
23
|
+
? globalThis
|
|
24
|
+
: typeof self !== 'undefined'
|
|
25
|
+
? self
|
|
26
|
+
: typeof window !== 'undefined'
|
|
27
|
+
? window
|
|
28
|
+
: typeof global !== 'undefined'
|
|
29
|
+
? global
|
|
30
|
+
: {};
|
|
31
|
+
var parcelRequire = $parcel$global["parcelRequirea39d"];
|
|
32
|
+
var parcelRegister = parcelRequire.register;
|
|
33
|
+
parcelRegister("27nhc", function(module, exports) {
|
|
34
|
+
|
|
35
|
+
$parcel$defineInteropFlag(module.exports);
|
|
36
|
+
|
|
37
|
+
$parcel$export(module.exports, "default", () => $d796192f79db347a$export$2e2bcd8739ae039);
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
var $7eio0 = parcelRequire("7eio0");
|
|
43
|
+
|
|
44
|
+
var $jgaO0 = parcelRequire("jgaO0");
|
|
45
|
+
|
|
46
|
+
var $6EkQS = parcelRequire("6EkQS");
|
|
47
|
+
|
|
48
|
+
var $6Q0mk = parcelRequire("6Q0mk");
|
|
49
|
+
|
|
50
|
+
var $kUiCn = parcelRequire("kUiCn");
|
|
51
|
+
|
|
52
|
+
var $6QoTL = parcelRequire("6QoTL");
|
|
53
|
+
|
|
54
|
+
var $tR7No = parcelRequire("tR7No");
|
|
55
|
+
|
|
56
|
+
var $iUeqp = parcelRequire("iUeqp");
|
|
57
|
+
|
|
58
|
+
var $7WHA7 = parcelRequire("7WHA7");
|
|
59
|
+
|
|
60
|
+
var $1XMvi = parcelRequire("1XMvi");
|
|
61
|
+
|
|
62
|
+
var $j2phc = parcelRequire("j2phc");
|
|
63
|
+
|
|
64
|
+
var $jlxKS = parcelRequire("jlxKS");
|
|
65
|
+
|
|
66
|
+
var $a9etD = parcelRequire("a9etD");
|
|
67
|
+
|
|
68
|
+
var $jHRS8 = parcelRequire("jHRS8");
|
|
69
|
+
|
|
70
|
+
var $9Jn5s = parcelRequire("9Jn5s");
|
|
71
|
+
|
|
72
|
+
var $42rvc = parcelRequire("42rvc");
|
|
73
|
+
const $d796192f79db347a$var$springEnterDuration = 1500;
|
|
74
|
+
const $d796192f79db347a$var$springLeaveDuration = 2500;
|
|
75
|
+
const $d796192f79db347a$var$AttachmentDetails = ()=>{
|
|
76
|
+
var _content_media;
|
|
77
|
+
const detailedItemContent = (0, $tR7No.default)();
|
|
78
|
+
const isRTL = (0, $6Q0mk.useLocaleStore)((state)=>state.isRTL);
|
|
79
|
+
const locale = (0, $6Q0mk.useLocaleStore)((state)=>state.locale);
|
|
80
|
+
const isUsedOnBorne = (0, $6EkQS.useRetorikStore)((state)=>state.configuration.isUsedOnBorne);
|
|
81
|
+
const baseAddress = (0, $6EkQS.useRetorikStore)((state)=>state.baseAddress);
|
|
82
|
+
const mode = (0, $jgaO0.useSpeechStore)((state)=>state.mode);
|
|
83
|
+
const useOldRemote = (0, $6EkQS.useRetorikStore)((state)=>state.configuration.useOldRemote);
|
|
84
|
+
const isMobile = (0, $kUiCn.useViewStore)((state)=>state.isMobile);
|
|
85
|
+
const isWidget = (0, $kUiCn.useViewStore)((state)=>state.isWidget);
|
|
86
|
+
const currentDeviceType = (0, $kUiCn.useViewStore)((state)=>state.currentDeviceType);
|
|
87
|
+
const themeColors = (0, $kUiCn.useViewStore)((state)=>state.themeColors);
|
|
88
|
+
const closeDetailedPOI = (0, $7eio0.useUtilsStore)((state)=>state.closeDetailedPOI);
|
|
89
|
+
const { setRetorikEvent: setRetorikEvent, setCloseDetailedPOI: setCloseDetailedPOI } = (0, $7eio0.useUtilsStore)((state)=>state.actions);
|
|
90
|
+
const { sendMessage: sendMessage, sendEvent: sendEvent } = (0, $6QoTL.useDirectlineStore)((state)=>state.actions);
|
|
91
|
+
const [content, setContent] = (0, $ajtMF$react.useState)(undefined);
|
|
92
|
+
const [color, setColor] = (0, $ajtMF$react.useState)(themeColors.secondary);
|
|
93
|
+
const [titleHeight, setTitleHeight] = (0, $ajtMF$react.useState)(0);
|
|
94
|
+
const [spring, api] = (0, $ajtMF$reactspringweb.useSpring)(()=>({
|
|
95
|
+
from: {
|
|
96
|
+
transform: 'translateX(0%)'
|
|
97
|
+
}
|
|
98
|
+
}));
|
|
99
|
+
const timerRef = (0, $ajtMF$react.useRef)(null);
|
|
100
|
+
const divRef = (0, $ajtMF$react.useRef)(null);
|
|
101
|
+
(0, $ajtMF$react.useEffect)(()=>{
|
|
102
|
+
setContent(detailedItemContent);
|
|
103
|
+
if (detailedItemContent) setRetorikEvent((0, $7WHA7.RetorikEvent).DetailViewOpen);
|
|
104
|
+
}, [
|
|
105
|
+
detailedItemContent
|
|
106
|
+
]);
|
|
107
|
+
(0, $ajtMF$react.useEffect)(()=>{
|
|
108
|
+
closeDetailedPOI && handleClose();
|
|
109
|
+
}, [
|
|
110
|
+
closeDetailedPOI
|
|
111
|
+
]);
|
|
112
|
+
(0, $ajtMF$react.useLayoutEffect)(()=>{
|
|
113
|
+
if (divRef === null || divRef === void 0 ? void 0 : divRef.current) isWidget && (0, $1XMvi.default)(null, divRef);
|
|
114
|
+
});
|
|
115
|
+
(0, $ajtMF$react.useEffect)(()=>{
|
|
116
|
+
if (content) {
|
|
117
|
+
var _content_category;
|
|
118
|
+
if (timerRef.current) {
|
|
119
|
+
clearTimeout(timerRef.current);
|
|
120
|
+
timerRef.current = null;
|
|
121
|
+
}
|
|
122
|
+
((_content_category = content.category) === null || _content_category === void 0 ? void 0 : _content_category.id) && setColor((0, $iUeqp.getColorFromCategoryId)(content.category.id, themeColors));
|
|
123
|
+
api.start({
|
|
124
|
+
from: {
|
|
125
|
+
transform: isRTL ? 'translateX(100%)' : 'translateX(-100%)'
|
|
126
|
+
},
|
|
127
|
+
to: {
|
|
128
|
+
transform: 'translateX(0%)'
|
|
129
|
+
},
|
|
130
|
+
config: {
|
|
131
|
+
duration: $d796192f79db347a$var$springEnterDuration,
|
|
132
|
+
easing: (0, $ajtMF$reactspringweb.easings).easeInBack
|
|
133
|
+
}
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
}, [
|
|
137
|
+
content
|
|
138
|
+
]);
|
|
139
|
+
const handleClose = ()=>{
|
|
140
|
+
if (!timerRef.current) {
|
|
141
|
+
api.start({
|
|
142
|
+
from: {
|
|
143
|
+
transform: 'translateX(0%)'
|
|
144
|
+
},
|
|
145
|
+
to: {
|
|
146
|
+
transform: isRTL ? 'translateX(100%)' : 'translateX(-100%)'
|
|
147
|
+
},
|
|
148
|
+
config: {
|
|
149
|
+
duration: $d796192f79db347a$var$springLeaveDuration,
|
|
150
|
+
easing: (0, $ajtMF$reactspringweb.easings).easeOutExpo
|
|
151
|
+
}
|
|
152
|
+
});
|
|
153
|
+
setCloseDetailedPOI(false);
|
|
154
|
+
setRetorikEvent((0, $7WHA7.RetorikEvent).DetailViewClose);
|
|
155
|
+
timerRef.current = setTimeout(()=>{
|
|
156
|
+
sendEvent('Davi.CloseWindow', null);
|
|
157
|
+
sendEvent('Davi.CloseWindowDetailed', null);
|
|
158
|
+
setContent(undefined);
|
|
159
|
+
timerRef.current = null;
|
|
160
|
+
}, $d796192f79db347a$var$springLeaveDuration);
|
|
161
|
+
}
|
|
162
|
+
};
|
|
163
|
+
const sendPostBack = (value)=>{
|
|
164
|
+
sendMessage(undefined, value);
|
|
165
|
+
};
|
|
166
|
+
return content ? /*#__PURE__*/ (0, $ajtMF$reactjsxruntime.jsx)((0, $j2phc.default), {
|
|
167
|
+
handleClose: handleClose,
|
|
168
|
+
className: useOldRemote ? 'rf-z-detailedPOI' : 'rf-z-[25]',
|
|
169
|
+
closeButtonClassName: "rf-z-util",
|
|
170
|
+
remoteCloseButtonZIndex: "rf-z-detailedPOI",
|
|
171
|
+
animation: spring,
|
|
172
|
+
children: /*#__PURE__*/ (0, $ajtMF$reactjsxruntime.jsx)("div", {
|
|
173
|
+
ref: divRef,
|
|
174
|
+
className: "rf-relative rf-flex rf-flex-row vertical:rf-flex-col rf-h-full rf-overflow-y-scroll rf-scrollbar-hidden",
|
|
175
|
+
children: (detailedItemContent === null || detailedItemContent === void 0 ? void 0 : detailedItemContent.template) ? /*#__PURE__*/ (0, $ajtMF$reactjsxruntime.jsx)((0, ($parcel$interopDefault($ajtMF$react))).Fragment, {
|
|
176
|
+
children: /*#__PURE__*/ (0, $ajtMF$reactjsxruntime.jsx)(detailedItemContent.template, {
|
|
177
|
+
props: {
|
|
178
|
+
...content,
|
|
179
|
+
locale: locale,
|
|
180
|
+
isUsedOnBorne: isUsedOnBorne,
|
|
181
|
+
baseAddress: baseAddress,
|
|
182
|
+
sendPostBack: sendPostBack
|
|
183
|
+
},
|
|
184
|
+
currentDeviceType: currentDeviceType,
|
|
185
|
+
handleClose: handleClose
|
|
186
|
+
})
|
|
187
|
+
}) : /*#__PURE__*/ (0, $ajtMF$reactjsxruntime.jsxs)((0, ($parcel$interopDefault($ajtMF$react))).Fragment, {
|
|
188
|
+
children: [
|
|
189
|
+
/*#__PURE__*/ (0, $ajtMF$reactjsxruntime.jsxs)("div", {
|
|
190
|
+
className: "rf-px-6 large:rf-px-8 rf-w-2/3 vertical:rf-w-full rf-mb-4 large:rf-mb-0 rf-flex rf-flex-col rf-border-r rf-border-r-silver vertical:rf-border-r-0",
|
|
191
|
+
children: [
|
|
192
|
+
/*#__PURE__*/ (0, $ajtMF$reactjsxruntime.jsx)((0, $jlxKS.default), {
|
|
193
|
+
category: content.category,
|
|
194
|
+
title: content.title,
|
|
195
|
+
infoBanner: content.infoBanner,
|
|
196
|
+
color: color,
|
|
197
|
+
customerReviews: content.customerReviews,
|
|
198
|
+
favorite: content.favorite,
|
|
199
|
+
handleClose: handleClose,
|
|
200
|
+
setTitleHeight: setTitleHeight
|
|
201
|
+
}),
|
|
202
|
+
/*#__PURE__*/ (0, $ajtMF$reactjsxruntime.jsxs)("div", {
|
|
203
|
+
className: "rf-flex rf-flex-col large:rf-flex-row landscape-retorik:rf-h-full",
|
|
204
|
+
children: [
|
|
205
|
+
/*#__PURE__*/ (0, $ajtMF$reactjsxruntime.jsx)((0, $a9etD.default), {
|
|
206
|
+
text: content.text,
|
|
207
|
+
otherInformations: content.otherInformations,
|
|
208
|
+
color: color,
|
|
209
|
+
url: content.downloadUri,
|
|
210
|
+
titleHeight: titleHeight
|
|
211
|
+
}),
|
|
212
|
+
(((_content_media = content.media) === null || _content_media === void 0 ? void 0 : _content_media.length) || content.review) && /*#__PURE__*/ (0, $ajtMF$reactjsxruntime.jsx)((0, $jHRS8.default), {
|
|
213
|
+
media: content.media,
|
|
214
|
+
review: content.review,
|
|
215
|
+
color: color
|
|
216
|
+
})
|
|
217
|
+
]
|
|
218
|
+
})
|
|
219
|
+
]
|
|
220
|
+
}),
|
|
221
|
+
/*#__PURE__*/ (0, $ajtMF$reactjsxruntime.jsx)((0, $9Jn5s.default), {
|
|
222
|
+
address: content.addressStructured,
|
|
223
|
+
phoneNumber: content.phoneNumber,
|
|
224
|
+
coordinates: content.coordinates,
|
|
225
|
+
color: color,
|
|
226
|
+
customerReviews: content.customerReviews,
|
|
227
|
+
url: content.downloadUri
|
|
228
|
+
}),
|
|
229
|
+
isMobile && /*#__PURE__*/ (0, $ajtMF$reactjsxruntime.jsx)("div", {
|
|
230
|
+
className: mode === (0, $7WHA7.Mode).text ? 'rf-mb-28' : 'rf-mb-16',
|
|
231
|
+
children: content.downloadUri && /*#__PURE__*/ (0, $ajtMF$reactjsxruntime.jsx)((0, $42rvc.default), {
|
|
232
|
+
className: "rf-justify-center",
|
|
233
|
+
url: content.downloadUri
|
|
234
|
+
})
|
|
235
|
+
})
|
|
236
|
+
]
|
|
237
|
+
})
|
|
238
|
+
})
|
|
239
|
+
}) : /*#__PURE__*/ (0, $ajtMF$reactjsxruntime.jsx)((0, ($parcel$interopDefault($ajtMF$react))).Fragment, {});
|
|
240
|
+
};
|
|
241
|
+
var $d796192f79db347a$export$2e2bcd8739ae039 = $d796192f79db347a$var$AttachmentDetails;
|
|
242
|
+
|
|
243
|
+
});
|
|
244
|
+
parcelRegister("tR7No", function(module, exports) {
|
|
245
|
+
|
|
246
|
+
$parcel$export(module.exports, "default", () => $725ea0cac166169b$export$2e2bcd8739ae039);
|
|
247
|
+
|
|
248
|
+
|
|
249
|
+
var $e53vj = parcelRequire("e53vj");
|
|
250
|
+
|
|
251
|
+
var $7eio0 = parcelRequire("7eio0");
|
|
252
|
+
|
|
253
|
+
var $6Q0mk = parcelRequire("6Q0mk");
|
|
254
|
+
|
|
255
|
+
var $6EkQS = parcelRequire("6EkQS");
|
|
256
|
+
|
|
257
|
+
var $ka0U3 = parcelRequire("ka0U3");
|
|
258
|
+
const $725ea0cac166169b$var$useShowPOI = ()=>{
|
|
259
|
+
const locale = (0, $6Q0mk.useLocaleStore)((state)=>state.locale);
|
|
260
|
+
const translation = (0, $6Q0mk.useLocaleStore)((state)=>state.currentTranslations);
|
|
261
|
+
const lastBotActivity = (0, $e53vj.useActivityStore)((state)=>state.lastBotActivity);
|
|
262
|
+
const triggers = (0, $7eio0.useUtilsStore)((state)=>state.detailedAttachmentTriggers);
|
|
263
|
+
const baseAddress = (0, $6EkQS.useRetorikStore)((state)=>state.baseAddress);
|
|
264
|
+
const [result, setResult] = (0, $ajtMF$react.useState)(undefined);
|
|
265
|
+
(0, $ajtMF$react.useEffect)(()=>{
|
|
266
|
+
let result = undefined;
|
|
267
|
+
if ((lastBotActivity === null || lastBotActivity === void 0 ? void 0 : lastBotActivity.value) && triggers.length) triggers.forEach((trigger)=>{
|
|
268
|
+
if (lastBotActivity.type === trigger.type) {
|
|
269
|
+
if (trigger.name && trigger.name === lastBotActivity.name) {
|
|
270
|
+
var _lastBotActivity_value;
|
|
271
|
+
if (trigger.contentType) {
|
|
272
|
+
if (trigger.contentType === ((_lastBotActivity_value = lastBotActivity.value) === null || _lastBotActivity_value === void 0 ? void 0 : _lastBotActivity_value.contentType)) {
|
|
273
|
+
lastBotActivity.value.content.template = trigger.linkedComponent;
|
|
274
|
+
result = lastBotActivity.value.content;
|
|
275
|
+
}
|
|
276
|
+
} else {
|
|
277
|
+
var _lastBotActivity_value1, _lastBotActivity_value2, _lastBotActivity_value3;
|
|
278
|
+
const data = {
|
|
279
|
+
id: (_lastBotActivity_value1 = lastBotActivity.value) === null || _lastBotActivity_value1 === void 0 ? void 0 : _lastBotActivity_value1.contentItemId,
|
|
280
|
+
content: (_lastBotActivity_value2 = lastBotActivity.value) === null || _lastBotActivity_value2 === void 0 ? void 0 : _lastBotActivity_value2.content,
|
|
281
|
+
contentType: (_lastBotActivity_value3 = lastBotActivity.value) === null || _lastBotActivity_value3 === void 0 ? void 0 : _lastBotActivity_value3.contentType,
|
|
282
|
+
baseAddress: baseAddress,
|
|
283
|
+
locale: locale
|
|
284
|
+
};
|
|
285
|
+
const checkData = (0, $ka0U3.mapDetailedDataFromContentItem)(data, translation);
|
|
286
|
+
if (checkData) result = {
|
|
287
|
+
...checkData,
|
|
288
|
+
template: trigger.linkedComponent
|
|
289
|
+
};
|
|
290
|
+
else {
|
|
291
|
+
lastBotActivity.value.template = trigger.linkedComponent;
|
|
292
|
+
result = lastBotActivity.value;
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
} else if (trigger.label && trigger.label === lastBotActivity.label) {
|
|
296
|
+
var _lastBotActivity_value4;
|
|
297
|
+
if (trigger.contentType) {
|
|
298
|
+
if (trigger.contentType === ((_lastBotActivity_value4 = lastBotActivity.value) === null || _lastBotActivity_value4 === void 0 ? void 0 : _lastBotActivity_value4.contentType)) {
|
|
299
|
+
lastBotActivity.value.content.template = trigger.linkedComponent;
|
|
300
|
+
result = lastBotActivity.value.content;
|
|
301
|
+
}
|
|
302
|
+
} else {
|
|
303
|
+
lastBotActivity.value.template = trigger.linkedComponent;
|
|
304
|
+
result = lastBotActivity.value;
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
});
|
|
309
|
+
setResult(result);
|
|
310
|
+
}, [
|
|
311
|
+
lastBotActivity
|
|
312
|
+
]);
|
|
313
|
+
return result;
|
|
314
|
+
};
|
|
315
|
+
var $725ea0cac166169b$export$2e2bcd8739ae039 = $725ea0cac166169b$var$useShowPOI;
|
|
316
|
+
|
|
317
|
+
});
|
|
318
|
+
parcelRegister("ka0U3", function(module, exports) {
|
|
319
|
+
|
|
320
|
+
$parcel$export(module.exports, "mapDetailedDataFromContentItem", () => $64ba6b047f397610$export$af5c868343ae916a);
|
|
321
|
+
const $64ba6b047f397610$var$infoBannerContenTypes = [
|
|
322
|
+
'foodestablishment',
|
|
323
|
+
'event'
|
|
324
|
+
];
|
|
325
|
+
const $64ba6b047f397610$var$categoryConversion = {
|
|
326
|
+
FoodEstablishment: 'Where to eat',
|
|
327
|
+
LodgingBusiness: 'Where to sleep',
|
|
328
|
+
TouristDestination: 'What to see',
|
|
329
|
+
TouristAttraction: 'What to do',
|
|
330
|
+
Product: 'Local products',
|
|
331
|
+
Service: 'Services',
|
|
332
|
+
Event: 'Events',
|
|
333
|
+
City: 'Cities',
|
|
334
|
+
Wine: 'Wines'
|
|
335
|
+
};
|
|
336
|
+
const $64ba6b047f397610$var$getCategoryFromContentType = (contentType, translation)=>{
|
|
337
|
+
if (contentType) {
|
|
338
|
+
if (Object.keys($64ba6b047f397610$var$categoryConversion).includes(contentType)) return {
|
|
339
|
+
id: $64ba6b047f397610$var$categoryConversion[contentType],
|
|
340
|
+
label: translation.poi[contentType]
|
|
341
|
+
};
|
|
342
|
+
return {
|
|
343
|
+
id: 'default',
|
|
344
|
+
label: contentType
|
|
345
|
+
};
|
|
346
|
+
}
|
|
347
|
+
return undefined;
|
|
348
|
+
};
|
|
349
|
+
const $64ba6b047f397610$export$af5c868343ae916a = (data, translation)=>{
|
|
350
|
+
if (data.id && data.content) try {
|
|
351
|
+
var _content_Thing_Image, _content_Thing, _content_Thing_Image_Paths, _content_Thing_Image1, _content_Thing1, _content_Place_AddressLocality, _content_Place, _content_Place_PostalCode, _content_Place1, _content_Place_StreetAddress, _content_Place2, _content_Place_Latitude, _content_Place3, _content_Place_Longitude, _content_Place4, _content_Review, _content_Review1, _content_Review2, _content_Review3, _content_Review4, _content_Review5, // Opening hours
|
|
352
|
+
_content_LocalBusiness_OpeningHours, _content_LocalBusiness, // Prices
|
|
353
|
+
_content_LocalBusiness_PriceRange, _content_LocalBusiness1, // Payment methods
|
|
354
|
+
_content_LocalBusiness_PaymentAccepted, _content_LocalBusiness2, _content_Thing_Categories, _content_Thing2, _content_Thing_Name_Text, _content_Thing_Name, _content_Thing3, _content_Thing_Description_Text, _content_Thing_Description, _content_Thing4, _content_PointOfInterest_Contact_Text, _content_PointOfInterest_Contact, _content_PointOfInterest, _content_Place_Telephone, _content_Place5, _content_Place_AggregateRating, _content_Place6, _content_Thing_Favorite, _content_Thing5;
|
|
355
|
+
const content = data.content;
|
|
356
|
+
// Process medias
|
|
357
|
+
const medias = [];
|
|
358
|
+
((_content_Thing = content.Thing) === null || _content_Thing === void 0 ? void 0 : (_content_Thing_Image = _content_Thing.Image) === null || _content_Thing_Image === void 0 ? void 0 : _content_Thing_Image.Paths) && content.Thing.Image.Paths.length && ((_content_Thing1 = content.Thing) === null || _content_Thing1 === void 0 ? void 0 : (_content_Thing_Image1 = _content_Thing1.Image) === null || _content_Thing_Image1 === void 0 ? void 0 : (_content_Thing_Image_Paths = _content_Thing_Image1.Paths) === null || _content_Thing_Image_Paths === void 0 ? void 0 : _content_Thing_Image_Paths.forEach((path)=>{
|
|
359
|
+
medias.push({
|
|
360
|
+
url: `${data.baseAddress}media/${path}`
|
|
361
|
+
});
|
|
362
|
+
}));
|
|
363
|
+
// Processed address
|
|
364
|
+
const address = {
|
|
365
|
+
addressLocality: ((_content_Place = content.Place) === null || _content_Place === void 0 ? void 0 : (_content_Place_AddressLocality = _content_Place.AddressLocality) === null || _content_Place_AddressLocality === void 0 ? void 0 : _content_Place_AddressLocality.Text) || '',
|
|
366
|
+
postalCode: ((_content_Place1 = content.Place) === null || _content_Place1 === void 0 ? void 0 : (_content_Place_PostalCode = _content_Place1.PostalCode) === null || _content_Place_PostalCode === void 0 ? void 0 : _content_Place_PostalCode.Text) || '',
|
|
367
|
+
street: ((_content_Place2 = content.Place) === null || _content_Place2 === void 0 ? void 0 : (_content_Place_StreetAddress = _content_Place2.StreetAddress) === null || _content_Place_StreetAddress === void 0 ? void 0 : _content_Place_StreetAddress.Text) || ''
|
|
368
|
+
};
|
|
369
|
+
// Processed coordinates
|
|
370
|
+
const coordinates = ((_content_Place3 = content.Place) === null || _content_Place3 === void 0 ? void 0 : (_content_Place_Latitude = _content_Place3.Latitude) === null || _content_Place_Latitude === void 0 ? void 0 : _content_Place_Latitude.Value) && ((_content_Place4 = content.Place) === null || _content_Place4 === void 0 ? void 0 : (_content_Place_Longitude = _content_Place4.Longitude) === null || _content_Place_Longitude === void 0 ? void 0 : _content_Place_Longitude.Value) ? {
|
|
371
|
+
latitude: content.Place.Latitude.Value,
|
|
372
|
+
longitude: content.Place.Longitude.Value
|
|
373
|
+
} : undefined;
|
|
374
|
+
// Processed review
|
|
375
|
+
const review = {
|
|
376
|
+
author: ((_content_Review = content.Review) === null || _content_Review === void 0 ? void 0 : _content_Review.Author) || ((_content_Review1 = content.Review) === null || _content_Review1 === void 0 ? void 0 : _content_Review1.AuthorCapacity) ? {
|
|
377
|
+
name: (_content_Review2 = content.Review) === null || _content_Review2 === void 0 ? void 0 : _content_Review2.Author,
|
|
378
|
+
capacity: (_content_Review3 = content.Review) === null || _content_Review3 === void 0 ? void 0 : _content_Review3.AuthorCapacity
|
|
379
|
+
} : undefined,
|
|
380
|
+
comment: ((_content_Review4 = content.Review) === null || _content_Review4 === void 0 ? void 0 : _content_Review4.ReviewBody) || '',
|
|
381
|
+
picture: ((_content_Review5 = content.Review) === null || _content_Review5 === void 0 ? void 0 : _content_Review5.Picture) ? {
|
|
382
|
+
url: content.Review.Picture,
|
|
383
|
+
description: content.Review.PictureDescription || ''
|
|
384
|
+
} : undefined
|
|
385
|
+
};
|
|
386
|
+
// Process other informations
|
|
387
|
+
const otherInformations = [];
|
|
388
|
+
((_content_LocalBusiness = content.LocalBusiness) === null || _content_LocalBusiness === void 0 ? void 0 : (_content_LocalBusiness_OpeningHours = _content_LocalBusiness.OpeningHours) === null || _content_LocalBusiness_OpeningHours === void 0 ? void 0 : _content_LocalBusiness_OpeningHours.Text) && otherInformations.push({
|
|
389
|
+
title: translation.poi.openinghours,
|
|
390
|
+
content: content.LocalBusiness.OpeningHours.Text
|
|
391
|
+
});
|
|
392
|
+
((_content_LocalBusiness1 = content.LocalBusiness) === null || _content_LocalBusiness1 === void 0 ? void 0 : (_content_LocalBusiness_PriceRange = _content_LocalBusiness1.PriceRange) === null || _content_LocalBusiness_PriceRange === void 0 ? void 0 : _content_LocalBusiness_PriceRange.Text) && otherInformations.push({
|
|
393
|
+
title: translation.poi.prices,
|
|
394
|
+
content: content.LocalBusiness.PriceRange.Text
|
|
395
|
+
});
|
|
396
|
+
((_content_LocalBusiness2 = content.LocalBusiness) === null || _content_LocalBusiness2 === void 0 ? void 0 : (_content_LocalBusiness_PaymentAccepted = _content_LocalBusiness2.PaymentAccepted) === null || _content_LocalBusiness_PaymentAccepted === void 0 ? void 0 : _content_LocalBusiness_PaymentAccepted.Values) && content.LocalBusiness.PaymentAccepted.Values.length && otherInformations.push({
|
|
397
|
+
title: translation.poi.paymentmethods,
|
|
398
|
+
content: content.LocalBusiness.PaymentAccepted.Values
|
|
399
|
+
});
|
|
400
|
+
// Process information banner
|
|
401
|
+
let infoBanner;
|
|
402
|
+
if (data.contentType && $64ba6b047f397610$var$infoBannerContenTypes.includes(data.contentType.toLowerCase())) switch(data.contentType.toLowerCase()){
|
|
403
|
+
case 'foodestablishment':
|
|
404
|
+
var _content_Place_MaximumAttendeeCapacity, _content_Place7, _content_Place_MaximumAttendeeCapacity1, _content_Place8, _content_Place_MaximumAttendeeCapacity2, _content_Place9;
|
|
405
|
+
((_content_Place7 = content.Place) === null || _content_Place7 === void 0 ? void 0 : (_content_Place_MaximumAttendeeCapacity = _content_Place7.MaximumAttendeeCapacity) === null || _content_Place_MaximumAttendeeCapacity === void 0 ? void 0 : _content_Place_MaximumAttendeeCapacity.Value) && !isNaN(parseInt((_content_Place8 = content.Place) === null || _content_Place8 === void 0 ? void 0 : (_content_Place_MaximumAttendeeCapacity1 = _content_Place8.MaximumAttendeeCapacity) === null || _content_Place_MaximumAttendeeCapacity1 === void 0 ? void 0 : _content_Place_MaximumAttendeeCapacity1.Value)) && (infoBanner = `${translation.poi.numberofplaces} ${parseInt((_content_Place9 = content.Place) === null || _content_Place9 === void 0 ? void 0 : (_content_Place_MaximumAttendeeCapacity2 = _content_Place9.MaximumAttendeeCapacity) === null || _content_Place_MaximumAttendeeCapacity2 === void 0 ? void 0 : _content_Place_MaximumAttendeeCapacity2.Value)}`);
|
|
406
|
+
break;
|
|
407
|
+
case 'event':
|
|
408
|
+
var _content_Event_StartDate, _content_Event_EndDate;
|
|
409
|
+
if (content.Event && ((_content_Event_StartDate = content.Event.StartDate) === null || _content_Event_StartDate === void 0 ? void 0 : _content_Event_StartDate.Value) && ((_content_Event_EndDate = content.Event.EndDate) === null || _content_Event_EndDate === void 0 ? void 0 : _content_Event_EndDate.value)) {
|
|
410
|
+
const startDate = new Date(content.Event.StartDate.Value);
|
|
411
|
+
const endDate = new Date(content.Event.StartDate.Value);
|
|
412
|
+
if (content.Event.StartDate.Value === content.Event.EndDate.value) infoBanner = `Le ${startDate.toLocaleDateString(data.locale)}`;
|
|
413
|
+
else infoBanner = `Du ${startDate.toLocaleDateString(data.locale)} au ${endDate.toLocaleDateString(data.locale)}`;
|
|
414
|
+
}
|
|
415
|
+
break;
|
|
416
|
+
}
|
|
417
|
+
// Hack for Wines category -> TODO : remove it !
|
|
418
|
+
let categoryWineTest = false;
|
|
419
|
+
const categories = (_content_Thing2 = content.Thing) === null || _content_Thing2 === void 0 ? void 0 : (_content_Thing_Categories = _content_Thing2.Categories) === null || _content_Thing_Categories === void 0 ? void 0 : _content_Thing_Categories.Values;
|
|
420
|
+
const wineFilters = [
|
|
421
|
+
'Blanc de blanc',
|
|
422
|
+
"Ros\xe9 Champagne",
|
|
423
|
+
'Vintages',
|
|
424
|
+
'Cocktail Collection',
|
|
425
|
+
'AUTHIGENE Collection'
|
|
426
|
+
];
|
|
427
|
+
if (categories && categories.length) categories.forEach((category)=>wineFilters.includes(category) && (categoryWineTest = true));
|
|
428
|
+
const mappedData = {
|
|
429
|
+
identifier: data.id,
|
|
430
|
+
title: ((_content_Thing3 = content.Thing) === null || _content_Thing3 === void 0 ? void 0 : (_content_Thing_Name = _content_Thing3.Name) === null || _content_Thing_Name === void 0 ? void 0 : (_content_Thing_Name_Text = _content_Thing_Name.Text) === null || _content_Thing_Name_Text === void 0 ? void 0 : _content_Thing_Name_Text.toString()) || '',
|
|
431
|
+
text: ((_content_Thing4 = content.Thing) === null || _content_Thing4 === void 0 ? void 0 : (_content_Thing_Description = _content_Thing4.Description) === null || _content_Thing_Description === void 0 ? void 0 : (_content_Thing_Description_Text = _content_Thing_Description.Text) === null || _content_Thing_Description_Text === void 0 ? void 0 : _content_Thing_Description_Text.toString()) || '',
|
|
432
|
+
addressStructured: address,
|
|
433
|
+
contact: ((_content_PointOfInterest = content.PointOfInterest) === null || _content_PointOfInterest === void 0 ? void 0 : (_content_PointOfInterest_Contact = _content_PointOfInterest.Contact) === null || _content_PointOfInterest_Contact === void 0 ? void 0 : (_content_PointOfInterest_Contact_Text = _content_PointOfInterest_Contact.Text) === null || _content_PointOfInterest_Contact_Text === void 0 ? void 0 : _content_PointOfInterest_Contact_Text.toString()) || '',
|
|
434
|
+
phoneNumber: ((_content_Place5 = content.Place) === null || _content_Place5 === void 0 ? void 0 : (_content_Place_Telephone = _content_Place5.Telephone) === null || _content_Place_Telephone === void 0 ? void 0 : _content_Place_Telephone.Text) ? content.Place.Telephone.Text.toString() : '',
|
|
435
|
+
category: categoryWineTest ? {
|
|
436
|
+
id: $64ba6b047f397610$var$categoryConversion.Wine,
|
|
437
|
+
label: translation.poi.Wine
|
|
438
|
+
} : $64ba6b047f397610$var$getCategoryFromContentType(content.contentType || data.contentType, translation),
|
|
439
|
+
media: medias.length ? medias : undefined,
|
|
440
|
+
customerReviews: (_content_Place6 = content.Place) === null || _content_Place6 === void 0 ? void 0 : (_content_Place_AggregateRating = _content_Place6.AggregateRating) === null || _content_Place_AggregateRating === void 0 ? void 0 : _content_Place_AggregateRating.Value,
|
|
441
|
+
coordinates: coordinates,
|
|
442
|
+
downloadUri: `${data.baseAddress}api/hospitality/${data.id}/pdf`,
|
|
443
|
+
favorite: !!((_content_Thing5 = content.Thing) === null || _content_Thing5 === void 0 ? void 0 : (_content_Thing_Favorite = _content_Thing5.Favorite) === null || _content_Thing_Favorite === void 0 ? void 0 : _content_Thing_Favorite.Value),
|
|
444
|
+
review: review,
|
|
445
|
+
infoBanner: infoBanner,
|
|
446
|
+
otherInformations: otherInformations
|
|
447
|
+
};
|
|
448
|
+
return mappedData;
|
|
449
|
+
} catch (e) {
|
|
450
|
+
console.log(e);
|
|
451
|
+
return null;
|
|
452
|
+
}
|
|
453
|
+
return null;
|
|
454
|
+
};
|
|
455
|
+
|
|
456
|
+
});
|
|
457
|
+
|
|
458
|
+
|
|
459
|
+
parcelRegister("jlxKS", function(module, exports) {
|
|
460
|
+
|
|
461
|
+
$parcel$export(module.exports, "default", () => $f18ad223fcd061b7$export$2e2bcd8739ae039);
|
|
462
|
+
|
|
463
|
+
|
|
464
|
+
|
|
465
|
+
var $6Q0mk = parcelRequire("6Q0mk");
|
|
466
|
+
|
|
467
|
+
var $kUiCn = parcelRequire("kUiCn");
|
|
468
|
+
|
|
469
|
+
var $WeQpM = parcelRequire("WeQpM");
|
|
470
|
+
|
|
471
|
+
var $7VgIE = parcelRequire("7VgIE");
|
|
472
|
+
|
|
473
|
+
var $7v7LH = parcelRequire("7v7LH");
|
|
474
|
+
const $f18ad223fcd061b7$var$DetailedTitle = ({ category: category, title: title, infoBanner: infoBanner, color: color, customerReviews: customerReviews, favorite: favorite, handleClose: handleClose, setTitleHeight: setTitleHeight })=>{
|
|
475
|
+
const translation = (0, $6Q0mk.useLocaleStore)((state)=>state.currentTranslations);
|
|
476
|
+
const isMobile = (0, $kUiCn.useViewStore)((state)=>state.isMobile);
|
|
477
|
+
const titleRef = (0, $ajtMF$react.useRef)(null);
|
|
478
|
+
(0, $ajtMF$react.useEffect)(()=>{
|
|
479
|
+
(titleRef === null || titleRef === void 0 ? void 0 : titleRef.current) && setTitleHeight(titleRef.current.clientHeight);
|
|
480
|
+
}, [
|
|
481
|
+
titleRef === null || titleRef === void 0 ? void 0 : titleRef.current
|
|
482
|
+
]);
|
|
483
|
+
return /*#__PURE__*/ (0, $ajtMF$reactjsxruntime.jsxs)("div", {
|
|
484
|
+
ref: titleRef,
|
|
485
|
+
className: "rf-relative rf-pb-4 rf-flex-col rf-items-start rf-justify-center",
|
|
486
|
+
children: [
|
|
487
|
+
customerReviews && /*#__PURE__*/ (0, $ajtMF$reactjsxruntime.jsx)((0, $WeQpM.default), {
|
|
488
|
+
className: "rf-absolute rf-hidden large-vertical:rf-block rf-top-0 ltr:rf-right-0 rtl:rf-left-0",
|
|
489
|
+
color: color,
|
|
490
|
+
customerReviews: customerReviews
|
|
491
|
+
}),
|
|
492
|
+
/*#__PURE__*/ (0, $ajtMF$reactjsxruntime.jsxs)("div", {
|
|
493
|
+
className: "rf-w-full rf-flex rf-flex-row rf-justify-between ltr:rf-items-start rtl:rf-items-end",
|
|
494
|
+
children: [
|
|
495
|
+
isMobile && /*#__PURE__*/ (0, $ajtMF$reactjsxruntime.jsx)((0, $7v7LH.BackButton), {
|
|
496
|
+
title: translation.common.back,
|
|
497
|
+
handleBack: handleClose,
|
|
498
|
+
className: "rf-relative rf-mt-4 rf-text-size-auto"
|
|
499
|
+
}),
|
|
500
|
+
/*#__PURE__*/ (0, $ajtMF$reactjsxruntime.jsx)("div", {
|
|
501
|
+
className: "rf-uppercase rf-w-fit rf-py-2 large:rf-py-3 rf-px-4 rf-bg-black rf-text-primary",
|
|
502
|
+
style: {
|
|
503
|
+
color: color
|
|
504
|
+
},
|
|
505
|
+
children: (category === null || category === void 0 ? void 0 : category.label) || 'category'
|
|
506
|
+
})
|
|
507
|
+
]
|
|
508
|
+
}),
|
|
509
|
+
/*#__PURE__*/ (0, $ajtMF$reactjsxruntime.jsxs)("div", {
|
|
510
|
+
className: "rf-py-6 rf-title-large-bold-size-auto large-vertical:rf-pt-[16.67%] rf-flex rf-flex-row rf-items-center rf-font-bold",
|
|
511
|
+
children: [
|
|
512
|
+
favorite && /*#__PURE__*/ (0, $ajtMF$reactjsxruntime.jsx)((0, $7VgIE.FavoriteIcon), {
|
|
513
|
+
className: "rf-h-16 rf-w-20 ltr:rf-pr-4 rtl:rf-pl-4"
|
|
514
|
+
}),
|
|
515
|
+
title || ''
|
|
516
|
+
]
|
|
517
|
+
}),
|
|
518
|
+
infoBanner && /*#__PURE__*/ (0, $ajtMF$reactjsxruntime.jsx)("div", {
|
|
519
|
+
className: "rf-py-1 rf-px-4 rf-subtitle-size-auto rf-bg-primary rf-text-truewhite",
|
|
520
|
+
style: {
|
|
521
|
+
backgroundColor: color
|
|
522
|
+
},
|
|
523
|
+
children: infoBanner
|
|
524
|
+
})
|
|
525
|
+
]
|
|
526
|
+
});
|
|
527
|
+
};
|
|
528
|
+
var $f18ad223fcd061b7$export$2e2bcd8739ae039 = $f18ad223fcd061b7$var$DetailedTitle;
|
|
529
|
+
|
|
530
|
+
});
|
|
531
|
+
parcelRegister("WeQpM", function(module, exports) {
|
|
532
|
+
|
|
533
|
+
$parcel$export(module.exports, "default", () => $5503336bdce4ac5d$export$2e2bcd8739ae039);
|
|
534
|
+
|
|
535
|
+
|
|
536
|
+
|
|
537
|
+
var $7VgIE = parcelRequire("7VgIE");
|
|
538
|
+
|
|
539
|
+
var $6Q0mk = parcelRequire("6Q0mk");
|
|
540
|
+
const $5503336bdce4ac5d$var$CommentsPennant = ({ className: className, color: color, customerReviews: customerReviews })=>{
|
|
541
|
+
const translation = (0, $6Q0mk.useLocaleStore)((state)=>state.currentTranslations);
|
|
542
|
+
const [widthInPx, setWidthInPx] = (0, $ajtMF$react.useState)(0);
|
|
543
|
+
const pennantRef = (0, $ajtMF$react.useRef)(null);
|
|
544
|
+
(0, $ajtMF$react.useEffect)(()=>{
|
|
545
|
+
if (pennantRef.current) setWidthInPx(Math.ceil(pennantRef.current.offsetWidth / 2));
|
|
546
|
+
}, [
|
|
547
|
+
pennantRef
|
|
548
|
+
]);
|
|
549
|
+
return /*#__PURE__*/ (0, $ajtMF$reactjsxruntime.jsxs)("div", {
|
|
550
|
+
className: `${className} rf-flex rf-flex-col rf-justify-center rf-text-white`,
|
|
551
|
+
ref: pennantRef,
|
|
552
|
+
children: [
|
|
553
|
+
/*#__PURE__*/ (0, $ajtMF$reactjsxruntime.jsxs)("div", {
|
|
554
|
+
className: "rf-flex rf-flex-col rf-items-center rf-p-2 rf-bg-primary",
|
|
555
|
+
style: {
|
|
556
|
+
backgroundColor: color
|
|
557
|
+
},
|
|
558
|
+
children: [
|
|
559
|
+
/*#__PURE__*/ (0, $ajtMF$reactjsxruntime.jsx)((0, $7VgIE.CommentsPennantIcon), {
|
|
560
|
+
className: "rf-w-12 large:rf-w-14 large-vertical:rf-w-16 rf-pb-2"
|
|
561
|
+
}),
|
|
562
|
+
/*#__PURE__*/ (0, $ajtMF$reactjsxruntime.jsx)("div", {
|
|
563
|
+
className: "rf-flex-col rf-text-center rf-text-size-auto rf-uppercase",
|
|
564
|
+
children: translation.poi.comment.split(' ').map((word, index)=>{
|
|
565
|
+
return /*#__PURE__*/ (0, $ajtMF$reactjsxruntime.jsx)("div", {
|
|
566
|
+
children: word
|
|
567
|
+
}, index);
|
|
568
|
+
})
|
|
569
|
+
}),
|
|
570
|
+
/*#__PURE__*/ (0, $ajtMF$reactjsxruntime.jsxs)("div", {
|
|
571
|
+
className: "rf-font-bold rf-subtitle-size-auto",
|
|
572
|
+
children: [
|
|
573
|
+
customerReviews,
|
|
574
|
+
"/10"
|
|
575
|
+
]
|
|
576
|
+
})
|
|
577
|
+
]
|
|
578
|
+
}),
|
|
579
|
+
/*#__PURE__*/ (0, $ajtMF$reactjsxruntime.jsx)("div", {
|
|
580
|
+
className: "rf-w-0 rf-h-0 rf-border-t-0 rf-border-x-primary rf-border-b-transparent",
|
|
581
|
+
style: {
|
|
582
|
+
borderLeftColor: color,
|
|
583
|
+
borderRightColor: color,
|
|
584
|
+
borderBottomWidth: widthInPx * 2 / 3,
|
|
585
|
+
borderLeftWidth: widthInPx,
|
|
586
|
+
borderRightWidth: widthInPx
|
|
587
|
+
}
|
|
588
|
+
})
|
|
589
|
+
]
|
|
590
|
+
});
|
|
591
|
+
};
|
|
592
|
+
var $5503336bdce4ac5d$export$2e2bcd8739ae039 = $5503336bdce4ac5d$var$CommentsPennant;
|
|
593
|
+
|
|
594
|
+
});
|
|
595
|
+
|
|
596
|
+
|
|
597
|
+
parcelRegister("a9etD", function(module, exports) {
|
|
598
|
+
|
|
599
|
+
$parcel$export(module.exports, "default", () => $fe50c85aaca30261$export$2e2bcd8739ae039);
|
|
600
|
+
|
|
601
|
+
|
|
602
|
+
|
|
603
|
+
var $6EkQS = parcelRequire("6EkQS");
|
|
604
|
+
|
|
605
|
+
var $kUiCn = parcelRequire("kUiCn");
|
|
606
|
+
|
|
607
|
+
var $42rvc = parcelRequire("42rvc");
|
|
608
|
+
|
|
609
|
+
var $kplpt = parcelRequire("kplpt");
|
|
610
|
+
const $fe50c85aaca30261$var$DownloadQRHeight = 200;
|
|
611
|
+
const $fe50c85aaca30261$var$DownloadSheetHeight = 100;
|
|
612
|
+
const $fe50c85aaca30261$var$DetailedText = ({ text: text, otherInformations: otherInformations, color: color, url: url, titleHeight: titleHeight })=>{
|
|
613
|
+
const isUsedOnBorne = (0, $6EkQS.useRetorikStore)((state)=>state.configuration.isUsedOnBorne);
|
|
614
|
+
const isMobile = (0, $kUiCn.useViewStore)((state)=>state.isMobile);
|
|
615
|
+
const isLandscape = (0, $kUiCn.useViewStore)((state)=>state.isLandscape);
|
|
616
|
+
const currentHeight = (0, $kUiCn.useViewStore)((state)=>state.currentHeight);
|
|
617
|
+
const textRef = (0, $ajtMF$react.useRef)(null);
|
|
618
|
+
const otherInformationsRef = (0, $ajtMF$react.useRef)(null);
|
|
619
|
+
const [opacityStyle, setOpacityStyle] = (0, $ajtMF$react.useState)('');
|
|
620
|
+
const [otherOpacityStyle, setOtherOpacityStyle] = (0, $ajtMF$react.useState)('');
|
|
621
|
+
const processedText = (0, $ajtMF$react.useMemo)(()=>{
|
|
622
|
+
if (text) return text.replaceAll('\n', '<br>');
|
|
623
|
+
return '';
|
|
624
|
+
}, [
|
|
625
|
+
text
|
|
626
|
+
]);
|
|
627
|
+
const textContainerMaxHeight = (0, $ajtMF$react.useMemo)(()=>{
|
|
628
|
+
return currentHeight - titleHeight - (isUsedOnBorne ? $fe50c85aaca30261$var$DownloadQRHeight : $fe50c85aaca30261$var$DownloadSheetHeight);
|
|
629
|
+
}, [
|
|
630
|
+
titleHeight
|
|
631
|
+
]);
|
|
632
|
+
const [textMaxHeight, setTextMaxHeight] = (0, $ajtMF$react.useState)(0);
|
|
633
|
+
const [otherInformationsMaxHeight, setOtherInformationsMaxHeight] = (0, $ajtMF$react.useState)(0);
|
|
634
|
+
(0, $ajtMF$react.useEffect)(()=>{
|
|
635
|
+
if ((textRef === null || textRef === void 0 ? void 0 : textRef.current) && (otherInformationsRef === null || otherInformationsRef === void 0 ? void 0 : otherInformationsRef.current) && textContainerMaxHeight && !isMobile) {
|
|
636
|
+
const textHeight = isLandscape ? textContainerMaxHeight * 58 / 100 : currentHeight * 30 / 100;
|
|
637
|
+
const otherInformationsHeight = isLandscape ? textContainerMaxHeight * 40 / 100 : currentHeight * 18 / 100;
|
|
638
|
+
if (textRef.current.scrollHeight > textHeight) {
|
|
639
|
+
if (otherInformationsRef.current.scrollHeight > otherInformationsHeight) {
|
|
640
|
+
setTextMaxHeight(textHeight);
|
|
641
|
+
setOtherInformationsMaxHeight(otherInformationsHeight);
|
|
642
|
+
} else {
|
|
643
|
+
setTextMaxHeight(textContainerMaxHeight - otherInformationsRef.current.scrollHeight);
|
|
644
|
+
setOtherInformationsMaxHeight(otherInformationsHeight);
|
|
645
|
+
}
|
|
646
|
+
} else if (otherInformationsRef.current.scrollHeight > otherInformationsHeight) {
|
|
647
|
+
setTextMaxHeight(textHeight);
|
|
648
|
+
setOtherInformationsMaxHeight(textContainerMaxHeight - textRef.current.scrollHeight);
|
|
649
|
+
} else {
|
|
650
|
+
setTextMaxHeight(textHeight);
|
|
651
|
+
setOtherInformationsMaxHeight(otherInformationsHeight);
|
|
652
|
+
}
|
|
653
|
+
}
|
|
654
|
+
}, [
|
|
655
|
+
textRef === null || textRef === void 0 ? void 0 : textRef.current,
|
|
656
|
+
otherInformationsRef === null || otherInformationsRef === void 0 ? void 0 : otherInformationsRef.current,
|
|
657
|
+
textContainerMaxHeight
|
|
658
|
+
]);
|
|
659
|
+
(0, $ajtMF$react.useEffect)(()=>{
|
|
660
|
+
if ((textRef === null || textRef === void 0 ? void 0 : textRef.current) && textMaxHeight) {
|
|
661
|
+
if (!isMobile && textRef.current.scrollHeight > textMaxHeight && textRef.current.scrollHeight > textRef.current.clientHeight) handleScroll();
|
|
662
|
+
else setOpacityStyle(undefined);
|
|
663
|
+
}
|
|
664
|
+
}, [
|
|
665
|
+
textRef === null || textRef === void 0 ? void 0 : textRef.current,
|
|
666
|
+
textMaxHeight
|
|
667
|
+
]);
|
|
668
|
+
(0, $ajtMF$react.useEffect)(()=>{
|
|
669
|
+
if ((otherInformationsRef === null || otherInformationsRef === void 0 ? void 0 : otherInformationsRef.current) && otherInformationsMaxHeight) {
|
|
670
|
+
if (!isMobile && otherInformationsRef.current.scrollHeight > otherInformationsMaxHeight && otherInformationsRef.current.scrollHeight > otherInformationsRef.current.clientHeight) handleOtherScroll();
|
|
671
|
+
else setOtherOpacityStyle(undefined);
|
|
672
|
+
}
|
|
673
|
+
}, [
|
|
674
|
+
otherInformationsRef === null || otherInformationsRef === void 0 ? void 0 : otherInformationsRef.current,
|
|
675
|
+
otherInformationsMaxHeight
|
|
676
|
+
]);
|
|
677
|
+
/**
|
|
678
|
+
* On call :
|
|
679
|
+
* - check if textRef.current is defined
|
|
680
|
+
* - set opacityStyle state depending on scroll height and current scrolling
|
|
681
|
+
*/ const handleScroll = ()=>{
|
|
682
|
+
if (textRef.current) {
|
|
683
|
+
const maxScroll = textRef.current.scrollHeight - textRef.current.offsetHeight;
|
|
684
|
+
const percentage = Math.ceil(textRef.current.scrollTop / maxScroll * 40);
|
|
685
|
+
setOpacityStyle(`linear-gradient(to bottom, black ${60 + percentage}%, transparent 100%)`);
|
|
686
|
+
}
|
|
687
|
+
};
|
|
688
|
+
const handleOtherScroll = ()=>{
|
|
689
|
+
if (otherInformationsRef.current) {
|
|
690
|
+
const maxScroll = otherInformationsRef.current.scrollHeight - otherInformationsRef.current.offsetHeight;
|
|
691
|
+
const percentage = Math.ceil(otherInformationsRef.current.scrollTop / maxScroll * 30);
|
|
692
|
+
setOtherOpacityStyle(`linear-gradient(to bottom, black ${70 + percentage}%, transparent 100%)`);
|
|
693
|
+
}
|
|
694
|
+
};
|
|
695
|
+
return /*#__PURE__*/ (0, $ajtMF$reactjsxruntime.jsxs)("div", {
|
|
696
|
+
className: "rf-flex rf-flex-col large:rf-pr-4 large:rf-min-w-1/2 rf-gap-4",
|
|
697
|
+
children: [
|
|
698
|
+
/*#__PURE__*/ (0, $ajtMF$reactjsxruntime.jsxs)("div", {
|
|
699
|
+
className: "rf-w-full rf-flex rf-flex-col rf-items-start",
|
|
700
|
+
style: {
|
|
701
|
+
maxHeight: isLandscape ? textContainerMaxHeight : undefined
|
|
702
|
+
},
|
|
703
|
+
children: [
|
|
704
|
+
processedText && /*#__PURE__*/ (0, $ajtMF$reactjsxruntime.jsx)("div", {
|
|
705
|
+
ref: textRef,
|
|
706
|
+
className: "large-vertical:rf-max-h-[30vh] rf-font-medium rf-overflow-y-scroll rf-pb-4 rf-scroll-pb-4 rf-scrollbar-hidden",
|
|
707
|
+
style: {
|
|
708
|
+
WebkitMaskImage: opacityStyle,
|
|
709
|
+
maxHeight: textMaxHeight || undefined
|
|
710
|
+
},
|
|
711
|
+
onScroll: handleScroll,
|
|
712
|
+
dangerouslySetInnerHTML: {
|
|
713
|
+
__html: processedText
|
|
714
|
+
}
|
|
715
|
+
}),
|
|
716
|
+
otherInformations && otherInformations.length > 0 && /*#__PURE__*/ (0, $ajtMF$reactjsxruntime.jsx)("div", {
|
|
717
|
+
ref: otherInformationsRef,
|
|
718
|
+
className: "large-vertical:rf-max-h-[18vh] rf-flex rf-flex-col rf-justify-start rf-text-lightgray rf-overflow-y-scroll rf-pb-4 rf-scroll-pb-4 rf-scrollbar-hidden",
|
|
719
|
+
style: {
|
|
720
|
+
WebkitMaskImage: otherOpacityStyle,
|
|
721
|
+
maxHeight: otherInformationsMaxHeight || undefined
|
|
722
|
+
},
|
|
723
|
+
onScroll: handleOtherScroll,
|
|
724
|
+
children: otherInformations.map((information, key)=>{
|
|
725
|
+
const tempContent = Array.isArray(information.content) ? information.content.join(' | ') : information.content;
|
|
726
|
+
const htmlContent = tempContent.replaceAll('\n', '<br>');
|
|
727
|
+
return /*#__PURE__*/ (0, $ajtMF$reactjsxruntime.jsxs)((0, ($parcel$interopDefault($ajtMF$react))).Fragment, {
|
|
728
|
+
children: [
|
|
729
|
+
/*#__PURE__*/ (0, $ajtMF$reactjsxruntime.jsx)("div", {
|
|
730
|
+
className: "rf-mt-4",
|
|
731
|
+
style: {
|
|
732
|
+
color: color || 'rgb(25, 153, 177)'
|
|
733
|
+
},
|
|
734
|
+
children: information.title
|
|
735
|
+
}),
|
|
736
|
+
/*#__PURE__*/ (0, $ajtMF$reactjsxruntime.jsx)("div", {
|
|
737
|
+
dangerouslySetInnerHTML: {
|
|
738
|
+
__html: htmlContent
|
|
739
|
+
}
|
|
740
|
+
})
|
|
741
|
+
]
|
|
742
|
+
}, key);
|
|
743
|
+
})
|
|
744
|
+
})
|
|
745
|
+
]
|
|
746
|
+
}),
|
|
747
|
+
isLandscape && url && (isUsedOnBorne ? /*#__PURE__*/ (0, $ajtMF$reactjsxruntime.jsx)((0, $kplpt.default), {
|
|
748
|
+
url: url
|
|
749
|
+
}) : /*#__PURE__*/ (0, $ajtMF$reactjsxruntime.jsx)((0, $42rvc.default), {
|
|
750
|
+
url: url
|
|
751
|
+
}))
|
|
752
|
+
]
|
|
753
|
+
});
|
|
754
|
+
};
|
|
755
|
+
var $fe50c85aaca30261$export$2e2bcd8739ae039 = $fe50c85aaca30261$var$DetailedText;
|
|
756
|
+
|
|
757
|
+
});
|
|
758
|
+
parcelRegister("42rvc", function(module, exports) {
|
|
759
|
+
|
|
760
|
+
$parcel$export(module.exports, "default", () => $9982aaf71fbd3e1f$export$2e2bcd8739ae039);
|
|
761
|
+
|
|
762
|
+
|
|
763
|
+
|
|
764
|
+
var $6Q0mk = parcelRequire("6Q0mk");
|
|
765
|
+
|
|
766
|
+
var $60kUR = parcelRequire("60kUR");
|
|
767
|
+
|
|
768
|
+
var $9JtA7 = parcelRequire("9JtA7");
|
|
769
|
+
const $9982aaf71fbd3e1f$var$DownloadSheet = ({ className: className, url: url })=>{
|
|
770
|
+
const translation = (0, $6Q0mk.useLocaleStore)((state)=>state.currentTranslations);
|
|
771
|
+
const locale = (0, $6Q0mk.useLocaleStore)((state)=>state.locale);
|
|
772
|
+
return /*#__PURE__*/ (0, $ajtMF$reactjsxruntime.jsx)("div", {
|
|
773
|
+
className: `${className} rf-w-full rf-flex`,
|
|
774
|
+
children: /*#__PURE__*/ (0, $ajtMF$reactjsxruntime.jsxs)("a", {
|
|
775
|
+
href: url,
|
|
776
|
+
className: "rf-px-5 rf-py-3 rf-h-fit rf-flex rf-flex-row rf-items-center rf-mt-8 rf-mb-16 large:rf-my-0 rf-border-2 rf-border-black rf-rounded-lg hover:rf-bg-truewhite rf-cursor-pointer rf-font-bold",
|
|
777
|
+
children: [
|
|
778
|
+
/*#__PURE__*/ (0, $ajtMF$reactjsxruntime.jsx)((0, $60kUR.DownloadIcon), {
|
|
779
|
+
className: "rf-h-6 rf-w-6 ltr:rf-mr-1 rtl:rf-ml-1"
|
|
780
|
+
}),
|
|
781
|
+
(0, $9JtA7.capitalizeFirstLetter)(translation.common.downloadsheet, locale)
|
|
782
|
+
]
|
|
783
|
+
})
|
|
784
|
+
});
|
|
785
|
+
};
|
|
786
|
+
var $9982aaf71fbd3e1f$export$2e2bcd8739ae039 = $9982aaf71fbd3e1f$var$DownloadSheet;
|
|
787
|
+
|
|
788
|
+
});
|
|
789
|
+
|
|
790
|
+
parcelRegister("kplpt", function(module, exports) {
|
|
791
|
+
|
|
792
|
+
$parcel$export(module.exports, "default", () => $5565d7860328960f$export$2e2bcd8739ae039);
|
|
793
|
+
|
|
794
|
+
|
|
795
|
+
|
|
796
|
+
|
|
797
|
+
var $6Q0mk = parcelRequire("6Q0mk");
|
|
798
|
+
|
|
799
|
+
var $6EkQS = parcelRequire("6EkQS");
|
|
800
|
+
|
|
801
|
+
var $9JtA7 = parcelRequire("9JtA7");
|
|
802
|
+
|
|
803
|
+
var $hQSgy = parcelRequire("hQSgy");
|
|
804
|
+
|
|
805
|
+
var $dlF1K = parcelRequire("dlF1K");
|
|
806
|
+
|
|
807
|
+
var $7VgIE = parcelRequire("7VgIE");
|
|
808
|
+
const $5565d7860328960f$var$DownloadQR = ({ url: url })=>{
|
|
809
|
+
const translation = (0, $6Q0mk.useLocaleStore)((state)=>state.currentTranslations);
|
|
810
|
+
const locale = (0, $6Q0mk.useLocaleStore)((state)=>state.locale);
|
|
811
|
+
const enableDocumentPrinting = (0, $6EkQS.useRetorikStore)((state)=>state.configuration.enableDocumentPrinting);
|
|
812
|
+
const [qrCodeData, setQrCodeData] = (0, $ajtMF$react.useState)(undefined);
|
|
813
|
+
const imageRef = (0, $ajtMF$react.useRef)(null);
|
|
814
|
+
(0, $ajtMF$react.useEffect)(()=>{
|
|
815
|
+
setQrCodeDataAsync();
|
|
816
|
+
}, []);
|
|
817
|
+
const setQrCodeDataAsync = async ()=>{
|
|
818
|
+
const qrCodeString = await (0, ($parcel$interopDefault($ajtMF$qrcode))).toDataURL(url);
|
|
819
|
+
setQrCodeData(qrCodeString);
|
|
820
|
+
};
|
|
821
|
+
return /*#__PURE__*/ (0, $ajtMF$reactjsxruntime.jsxs)("div", {
|
|
822
|
+
className: "rf-w-full rf-flex rf-flex-row rf-items-start",
|
|
823
|
+
children: [
|
|
824
|
+
enableDocumentPrinting && /*#__PURE__*/ (0, $ajtMF$reactjsxruntime.jsx)("div", {
|
|
825
|
+
className: "rf-w-1/2 rf-flex rf-justify-start",
|
|
826
|
+
children: /*#__PURE__*/ (0, $ajtMF$reactjsxruntime.jsx)((0, $dlF1K.default), {
|
|
827
|
+
url: url
|
|
828
|
+
})
|
|
829
|
+
}),
|
|
830
|
+
/*#__PURE__*/ (0, $ajtMF$reactjsxruntime.jsxs)("div", {
|
|
831
|
+
className: "rf-flex rf-flex-col rf-items-center rf-text-center rf-gap-2 rf-font-bold rf-text-sm",
|
|
832
|
+
style: {
|
|
833
|
+
width: enableDocumentPrinting ? '50%' : '100%'
|
|
834
|
+
},
|
|
835
|
+
children: [
|
|
836
|
+
/*#__PURE__*/ (0, $ajtMF$reactjsxruntime.jsxs)("div", {
|
|
837
|
+
className: "rf-flex rf-flex-row rf-items-start rf-gap-1 rf-italic",
|
|
838
|
+
children: [
|
|
839
|
+
/*#__PURE__*/ (0, $ajtMF$reactjsxruntime.jsx)((0, $7VgIE.RoundIcon), {}),
|
|
840
|
+
/*#__PURE__*/ (0, $ajtMF$reactjsxruntime.jsx)("div", {
|
|
841
|
+
className: "rf-w-fit",
|
|
842
|
+
children: `${(0, $9JtA7.capitalizeFirstLetter)(translation.common.downloadsheetmobile, locale)} ${translation.link.scanQR}`
|
|
843
|
+
})
|
|
844
|
+
]
|
|
845
|
+
}),
|
|
846
|
+
qrCodeData && /*#__PURE__*/ (0, $ajtMF$reactjsxruntime.jsx)("div", {
|
|
847
|
+
className: "large-vertical:rf-mt-4",
|
|
848
|
+
children: /*#__PURE__*/ (0, $ajtMF$reactjsxruntime.jsx)((0, $hQSgy.default), {
|
|
849
|
+
ref: imageRef,
|
|
850
|
+
src: qrCodeData
|
|
851
|
+
})
|
|
852
|
+
})
|
|
853
|
+
]
|
|
854
|
+
})
|
|
855
|
+
]
|
|
856
|
+
});
|
|
857
|
+
};
|
|
858
|
+
var $5565d7860328960f$export$2e2bcd8739ae039 = $5565d7860328960f$var$DownloadQR;
|
|
859
|
+
|
|
860
|
+
});
|
|
861
|
+
parcelRegister("dlF1K", function(module, exports) {
|
|
862
|
+
|
|
863
|
+
$parcel$export(module.exports, "default", () => $52365ba6a1e9c44e$export$2e2bcd8739ae039);
|
|
864
|
+
|
|
865
|
+
|
|
866
|
+
|
|
867
|
+
var $6Q0mk = parcelRequire("6Q0mk");
|
|
868
|
+
|
|
869
|
+
var $7eio0 = parcelRequire("7eio0");
|
|
870
|
+
|
|
871
|
+
var $7VgIE = parcelRequire("7VgIE");
|
|
872
|
+
|
|
873
|
+
var $eO1En = parcelRequire("eO1En");
|
|
874
|
+
const $52365ba6a1e9c44e$var$PrintingButton = ({ url: url })=>{
|
|
875
|
+
const translation = (0, $6Q0mk.useLocaleStore)((state)=>state.currentTranslations);
|
|
876
|
+
const setModalFullscreenContent = (0, $7eio0.useUtilsStore)((state)=>state.actions.setModalFullscreenContent);
|
|
877
|
+
const handleClick = ()=>{
|
|
878
|
+
setModalFullscreenContent(/*#__PURE__*/ (0, $ajtMF$reactjsxruntime.jsx)((0, $eO1En.default), {
|
|
879
|
+
url: url,
|
|
880
|
+
printingAllowed: true
|
|
881
|
+
}));
|
|
882
|
+
};
|
|
883
|
+
return /*#__PURE__*/ (0, $ajtMF$reactjsxruntime.jsxs)("button", {
|
|
884
|
+
className: "rf-px-4 rf-py-1 rf-flex rf-flex-row rf-items-center rf-gap-2 rf-font-bold rf-text-sm rf-border-2 rf-border-black rf-rounded-lg",
|
|
885
|
+
onClick: handleClick,
|
|
886
|
+
children: [
|
|
887
|
+
/*#__PURE__*/ (0, $ajtMF$reactjsxruntime.jsx)((0, $7VgIE.PrintIcon), {}),
|
|
888
|
+
translation.common.printsheet
|
|
889
|
+
]
|
|
890
|
+
});
|
|
891
|
+
};
|
|
892
|
+
var $52365ba6a1e9c44e$export$2e2bcd8739ae039 = $52365ba6a1e9c44e$var$PrintingButton;
|
|
893
|
+
|
|
894
|
+
});
|
|
895
|
+
|
|
896
|
+
|
|
897
|
+
|
|
898
|
+
parcelRegister("jHRS8", function(module, exports) {
|
|
899
|
+
|
|
900
|
+
$parcel$export(module.exports, "default", () => $91842d87af07aa1e$export$2e2bcd8739ae039);
|
|
901
|
+
|
|
902
|
+
|
|
903
|
+
|
|
904
|
+
var $blhNk = parcelRequire("blhNk");
|
|
905
|
+
|
|
906
|
+
var $9JtA7 = parcelRequire("9JtA7");
|
|
907
|
+
|
|
908
|
+
var $fpnh0 = parcelRequire("fpnh0");
|
|
909
|
+
const $91842d87af07aa1e$var$DetailedMedia = ({ media: media, review: review, color: color })=>{
|
|
910
|
+
const [landscapeImage, setLandscapeImage] = (0, $ajtMF$react.useState)(false);
|
|
911
|
+
const [carouselMedia, setCarouselMedia] = (0, $ajtMF$react.useState)([]);
|
|
912
|
+
(0, $ajtMF$react.useEffect)(()=>{
|
|
913
|
+
if (media && media.length > 0) {
|
|
914
|
+
let tempMedia = [];
|
|
915
|
+
media.forEach((med)=>{
|
|
916
|
+
med.url && (tempMedia = [
|
|
917
|
+
...tempMedia,
|
|
918
|
+
{
|
|
919
|
+
url: med.url,
|
|
920
|
+
alt: med.title || 'media'
|
|
921
|
+
}
|
|
922
|
+
]);
|
|
923
|
+
});
|
|
924
|
+
setCarouselMedia(tempMedia);
|
|
925
|
+
}
|
|
926
|
+
}, [
|
|
927
|
+
media
|
|
928
|
+
]);
|
|
929
|
+
/**
|
|
930
|
+
* On review change :
|
|
931
|
+
* - check if the review contains a picture url
|
|
932
|
+
* - if so, create an Image with this url, and check if its width is larger than its height
|
|
933
|
+
* - set landscapeImage state with the result
|
|
934
|
+
*/ (0, $ajtMF$react.useEffect)(()=>{
|
|
935
|
+
var _review_picture;
|
|
936
|
+
if (review === null || review === void 0 ? void 0 : (_review_picture = review.picture) === null || _review_picture === void 0 ? void 0 : _review_picture.url) {
|
|
937
|
+
const getImageData = async ()=>{
|
|
938
|
+
var _review_picture;
|
|
939
|
+
const image = new Image();
|
|
940
|
+
image.onload = ()=>{
|
|
941
|
+
setLandscapeImage(image.width > image.height);
|
|
942
|
+
};
|
|
943
|
+
image.src = (review === null || review === void 0 ? void 0 : (_review_picture = review.picture) === null || _review_picture === void 0 ? void 0 : _review_picture.url) || '';
|
|
944
|
+
};
|
|
945
|
+
getImageData();
|
|
946
|
+
}
|
|
947
|
+
}, [
|
|
948
|
+
review
|
|
949
|
+
]);
|
|
950
|
+
return /*#__PURE__*/ (0, $ajtMF$reactjsxruntime.jsxs)("div", {
|
|
951
|
+
className: "large:rf-min-w-1/2 large:rf-pl-4 rf-flex rf-flex-col rf-items-center",
|
|
952
|
+
children: [
|
|
953
|
+
carouselMedia && carouselMedia.length > 0 && /*#__PURE__*/ (0, $ajtMF$reactjsxruntime.jsx)("div", {
|
|
954
|
+
className: "rf-relative rf-flex rf-justify-center rf-align-center rf-w-full rf-aspect-[4/3] rf-mb-4 rf-overflow-hidden",
|
|
955
|
+
children: /*#__PURE__*/ (0, $ajtMF$reactjsxruntime.jsx)((0, $fpnh0.Carousel), {
|
|
956
|
+
className: "rf-min-h-full rf-min-w-full rf-object-cover",
|
|
957
|
+
medias: carouselMedia,
|
|
958
|
+
controls: true,
|
|
959
|
+
timer: 3000,
|
|
960
|
+
color: color
|
|
961
|
+
})
|
|
962
|
+
}),
|
|
963
|
+
review && review.comment && /*#__PURE__*/ (0, $ajtMF$reactjsxruntime.jsxs)("div", {
|
|
964
|
+
className: "rf-w-full rf-p-4 large:rf-mb-4 rf-flex rf-flex-col rf-gap-4 rf-bg-truewhite rf-rounded-lg rf-shadow-[0_3px_6px_#00000029]",
|
|
965
|
+
children: [
|
|
966
|
+
/*#__PURE__*/ (0, $ajtMF$reactjsxruntime.jsx)("div", {
|
|
967
|
+
className: "rf-text-lightgray",
|
|
968
|
+
children: review.comment
|
|
969
|
+
}),
|
|
970
|
+
(review.picture || review.author) && /*#__PURE__*/ (0, $ajtMF$reactjsxruntime.jsxs)("div", {
|
|
971
|
+
className: "rf-flex rf-flex-row rf-items-center",
|
|
972
|
+
children: [
|
|
973
|
+
review.picture && /*#__PURE__*/ (0, $ajtMF$reactjsxruntime.jsx)("div", {
|
|
974
|
+
className: "rf-h-12 rf-w-12 rf-min-w-12 large:rf-h-16 large:rf-w-16 large:rf-min-w-16 large-vertical:rf-h-24 large-vertical:rf-w-24 large-vertical:rf-min-w-24 rf-mr-4 rf-flex rf-items-center rf-rounded-half rf-overflow-hidden",
|
|
975
|
+
children: /*#__PURE__*/ (0, $ajtMF$reactjsxruntime.jsx)("img", {
|
|
976
|
+
src: review.picture.url || (0, $blhNk.imageFiles).noimage,
|
|
977
|
+
alt: review.picture.description || 'auteur',
|
|
978
|
+
className: landscapeImage ? 'rf-h-full rf-max-w-none' : 'rf-w-full'
|
|
979
|
+
})
|
|
980
|
+
}),
|
|
981
|
+
review.author && /*#__PURE__*/ (0, $ajtMF$reactjsxruntime.jsxs)("div", {
|
|
982
|
+
className: "rf-flex rf-flex-col rf-items-start",
|
|
983
|
+
children: [
|
|
984
|
+
/*#__PURE__*/ (0, $ajtMF$reactjsxruntime.jsx)("p", {
|
|
985
|
+
className: "rf-font-bold",
|
|
986
|
+
children: (0, $9JtA7.capitalizeFirstLetter)(review.author.name || '')
|
|
987
|
+
}),
|
|
988
|
+
/*#__PURE__*/ (0, $ajtMF$reactjsxruntime.jsx)("p", {
|
|
989
|
+
className: "rf-italic",
|
|
990
|
+
children: (0, $9JtA7.capitalizeFirstLetter)(review.author.capacity || '')
|
|
991
|
+
})
|
|
992
|
+
]
|
|
993
|
+
})
|
|
994
|
+
]
|
|
995
|
+
})
|
|
996
|
+
]
|
|
997
|
+
})
|
|
998
|
+
]
|
|
999
|
+
});
|
|
1000
|
+
};
|
|
1001
|
+
var $91842d87af07aa1e$export$2e2bcd8739ae039 = $91842d87af07aa1e$var$DetailedMedia;
|
|
1002
|
+
|
|
1003
|
+
});
|
|
1004
|
+
|
|
1005
|
+
parcelRegister("9Jn5s", function(module, exports) {
|
|
1006
|
+
|
|
1007
|
+
$parcel$export(module.exports, "default", () => $6cacbade32b06d0d$export$2e2bcd8739ae039);
|
|
1008
|
+
|
|
1009
|
+
|
|
1010
|
+
|
|
1011
|
+
var $6EkQS = parcelRequire("6EkQS");
|
|
1012
|
+
|
|
1013
|
+
var $kUiCn = parcelRequire("kUiCn");
|
|
1014
|
+
|
|
1015
|
+
var $b0HMF = parcelRequire("b0HMF");
|
|
1016
|
+
|
|
1017
|
+
var $WeQpM = parcelRequire("WeQpM");
|
|
1018
|
+
|
|
1019
|
+
var $CaBP6 = parcelRequire("CaBP6");
|
|
1020
|
+
|
|
1021
|
+
var $42rvc = parcelRequire("42rvc");
|
|
1022
|
+
|
|
1023
|
+
var $kplpt = parcelRequire("kplpt");
|
|
1024
|
+
const $6cacbade32b06d0d$var$DetailedAddress = ({ address: address, phoneNumber: phoneNumber, coordinates: coordinates, color: color, customerReviews: customerReviews, url: url })=>{
|
|
1025
|
+
const isMobile = (0, $kUiCn.useViewStore)((state)=>state.isMobile);
|
|
1026
|
+
const isLandscape = (0, $kUiCn.useViewStore)((state)=>state.isLandscape);
|
|
1027
|
+
const isBorne = (0, $kUiCn.useViewStore)((state)=>state.isBorne);
|
|
1028
|
+
const currentWidth = (0, $kUiCn.useViewStore)((state)=>state.currentWidth);
|
|
1029
|
+
const configuration = (0, $6EkQS.useRetorikStore)((state)=>state.configuration);
|
|
1030
|
+
return /*#__PURE__*/ (0, $ajtMF$reactjsxruntime.jsxs)("div", {
|
|
1031
|
+
className: "rf-relative rf-w-1/3 vertical:rf-w-full large:rf-bg-truewhite rf-flex rf-flex-col large-vertical:rf-flex-row",
|
|
1032
|
+
children: [
|
|
1033
|
+
customerReviews && /*#__PURE__*/ (0, $ajtMF$reactjsxruntime.jsx)((0, $WeQpM.default), {
|
|
1034
|
+
className: "rf-absolute large-vertical:rf-hidden rf-top-0 rf-left-1/2 rf--translate-x-1/2",
|
|
1035
|
+
color: color,
|
|
1036
|
+
customerReviews: customerReviews
|
|
1037
|
+
}),
|
|
1038
|
+
/*#__PURE__*/ (0, $ajtMF$reactjsxruntime.jsxs)("div", {
|
|
1039
|
+
className: `rf-px-6 rf-flex rf-flex-col large-vertical:rf-w-1/2 rf-items-center rf-text-center ${customerReviews ? isBorne ? 'rf-bg-truewhite rf-justify-center' : 'rf-bg-truewhite rf-justify-start' : 'rf-justify-center'}`,
|
|
1040
|
+
style: {
|
|
1041
|
+
height: isMobile ? customerReviews ? currentWidth : undefined : isLandscape ? coordinates && coordinates.latitude && coordinates.longitude ? '50%' : '100%' : 'calc(50vw - 3rem)'
|
|
1042
|
+
},
|
|
1043
|
+
children: [
|
|
1044
|
+
/*#__PURE__*/ (0, $ajtMF$reactjsxruntime.jsx)("div", {
|
|
1045
|
+
className: customerReviews && !isBorne ? isLandscape ? 'rf-pt-[26vh] rf-pb-12' : 'rf-pt-11/20 rf-pb-12' : 'rf-py-12',
|
|
1046
|
+
children: address && /*#__PURE__*/ (0, $ajtMF$reactjsxruntime.jsxs)((0, ($parcel$interopDefault($ajtMF$react))).Fragment, {
|
|
1047
|
+
children: [
|
|
1048
|
+
address.street && /*#__PURE__*/ (0, $ajtMF$reactjsxruntime.jsx)("div", {
|
|
1049
|
+
children: address.street
|
|
1050
|
+
}),
|
|
1051
|
+
address.addressLocality && /*#__PURE__*/ (0, $ajtMF$reactjsxruntime.jsx)("div", {
|
|
1052
|
+
children: address.postalCode ? `${address.postalCode} ${address.addressLocality}` : address.addressLocality
|
|
1053
|
+
})
|
|
1054
|
+
]
|
|
1055
|
+
})
|
|
1056
|
+
}),
|
|
1057
|
+
phoneNumber && /*#__PURE__*/ (0, $ajtMF$reactjsxruntime.jsx)((0, $b0HMF.default), {
|
|
1058
|
+
phoneNumber: phoneNumber
|
|
1059
|
+
}),
|
|
1060
|
+
coordinates && coordinates.latitude && coordinates.longitude && isBorne && url && (configuration.isUsedOnBorne ? /*#__PURE__*/ (0, $ajtMF$reactjsxruntime.jsx)((0, $kplpt.default), {
|
|
1061
|
+
url: url
|
|
1062
|
+
}) : /*#__PURE__*/ (0, $ajtMF$reactjsxruntime.jsx)((0, $42rvc.default), {
|
|
1063
|
+
className: "rf-justify-center",
|
|
1064
|
+
url: url
|
|
1065
|
+
}))
|
|
1066
|
+
]
|
|
1067
|
+
}),
|
|
1068
|
+
coordinates && coordinates.latitude && coordinates.longitude ? /*#__PURE__*/ (0, $ajtMF$reactjsxruntime.jsx)("div", {
|
|
1069
|
+
className: "rf-relative large-vertical:rf-w-1/2",
|
|
1070
|
+
style: {
|
|
1071
|
+
height: isMobile ? currentWidth : isLandscape ? '50%' : 'calc(50vw - 3rem)'
|
|
1072
|
+
},
|
|
1073
|
+
children: /*#__PURE__*/ (0, $ajtMF$reactjsxruntime.jsx)((0, $CaBP6.default), {
|
|
1074
|
+
latitude: coordinates.latitude,
|
|
1075
|
+
longitude: coordinates.longitude,
|
|
1076
|
+
color: color
|
|
1077
|
+
})
|
|
1078
|
+
}) : isBorne ? /*#__PURE__*/ (0, $ajtMF$reactjsxruntime.jsx)("div", {
|
|
1079
|
+
className: "rf-flex rf-justify-center rf-items-center rf-h-[calc(50vw-3rem)] rf-w-1/2",
|
|
1080
|
+
children: url && (configuration.isUsedOnBorne ? /*#__PURE__*/ (0, $ajtMF$reactjsxruntime.jsx)((0, $kplpt.default), {
|
|
1081
|
+
url: url
|
|
1082
|
+
}) : /*#__PURE__*/ (0, $ajtMF$reactjsxruntime.jsx)((0, $42rvc.default), {
|
|
1083
|
+
className: "rf-justify-center",
|
|
1084
|
+
url: url
|
|
1085
|
+
}))
|
|
1086
|
+
}) : /*#__PURE__*/ (0, $ajtMF$reactjsxruntime.jsx)((0, ($parcel$interopDefault($ajtMF$react))).Fragment, {})
|
|
1087
|
+
]
|
|
1088
|
+
});
|
|
1089
|
+
};
|
|
1090
|
+
var $6cacbade32b06d0d$export$2e2bcd8739ae039 = $6cacbade32b06d0d$var$DetailedAddress;
|
|
1091
|
+
|
|
1092
|
+
});
|
|
1093
|
+
parcelRegister("b0HMF", function(module, exports) {
|
|
1094
|
+
|
|
1095
|
+
$parcel$export(module.exports, "default", () => $2ed0c554c11c571c$export$2e2bcd8739ae039);
|
|
1096
|
+
|
|
1097
|
+
|
|
1098
|
+
|
|
1099
|
+
var $7VgIE = parcelRequire("7VgIE");
|
|
1100
|
+
const $2ed0c554c11c571c$var$ShowPhoneNumber = ({ phoneNumber: phoneNumber })=>{
|
|
1101
|
+
return /*#__PURE__*/ (0, $ajtMF$reactjsxruntime.jsxs)("div", {
|
|
1102
|
+
className: "rf-px-5 rf-py-3 rf-mb-8 rf-flex rf-flex-row rf-items-center rf-font-bold",
|
|
1103
|
+
children: [
|
|
1104
|
+
/*#__PURE__*/ (0, $ajtMF$reactjsxruntime.jsx)((0, $7VgIE.PhoneIcon), {
|
|
1105
|
+
className: "rf-h-6 rf-w-6 ltr:rf-mr-2 rtl:rf-ml-2"
|
|
1106
|
+
}),
|
|
1107
|
+
phoneNumber
|
|
1108
|
+
]
|
|
1109
|
+
});
|
|
1110
|
+
};
|
|
1111
|
+
var $2ed0c554c11c571c$export$2e2bcd8739ae039 = $2ed0c554c11c571c$var$ShowPhoneNumber;
|
|
1112
|
+
|
|
1113
|
+
});
|
|
1114
|
+
|
|
1115
|
+
parcelRegister("CaBP6", function(module, exports) {
|
|
1116
|
+
|
|
1117
|
+
$parcel$export(module.exports, "default", () => $c9b17a03b9c46905$export$2e2bcd8739ae039);
|
|
1118
|
+
|
|
1119
|
+
|
|
1120
|
+
|
|
1121
|
+
|
|
1122
|
+
|
|
1123
|
+
|
|
1124
|
+
var $5A7mQ = parcelRequire("5A7mQ");
|
|
1125
|
+
|
|
1126
|
+
var $6Q0mk = parcelRequire("6Q0mk");
|
|
1127
|
+
|
|
1128
|
+
var $6EkQS = parcelRequire("6EkQS");
|
|
1129
|
+
|
|
1130
|
+
var $blhNk = parcelRequire("blhNk");
|
|
1131
|
+
|
|
1132
|
+
var $9JtA7 = parcelRequire("9JtA7");
|
|
1133
|
+
|
|
1134
|
+
var $jywlC = parcelRequire("jywlC");
|
|
1135
|
+
|
|
1136
|
+
var $dmawf = parcelRequire("dmawf");
|
|
1137
|
+
|
|
1138
|
+
var $hQSgy = parcelRequire("hQSgy");
|
|
1139
|
+
|
|
1140
|
+
var $7k0ZL = parcelRequire("7k0ZL");
|
|
1141
|
+
|
|
1142
|
+
var $7VgIE = parcelRequire("7VgIE");
|
|
1143
|
+
const $c9b17a03b9c46905$var$userIcon = (0, ($parcel$interopDefault($ajtMF$leaflet))).icon({
|
|
1144
|
+
iconUrl: `${(0, $blhNk.imageFiles).mapDeparture}`,
|
|
1145
|
+
shadowUrl: (0, $5A7mQ.markerShadow),
|
|
1146
|
+
iconSize: [
|
|
1147
|
+
32,
|
|
1148
|
+
41
|
|
1149
|
+
],
|
|
1150
|
+
iconAnchor: [
|
|
1151
|
+
16,
|
|
1152
|
+
41
|
|
1153
|
+
]
|
|
1154
|
+
});
|
|
1155
|
+
const $c9b17a03b9c46905$var$springDuration = 500;
|
|
1156
|
+
const $c9b17a03b9c46905$var$Map = ({ latitude: latitude, longitude: longitude, color: color })=>{
|
|
1157
|
+
var _configuration_position, _configuration_position1, _configuration_position2, _configuration_position3, _configuration_position4, _configuration_position5;
|
|
1158
|
+
const translation = (0, $6Q0mk.useLocaleStore)((state)=>state.currentTranslations);
|
|
1159
|
+
const locale = (0, $6Q0mk.useLocaleStore)((state)=>state.locale);
|
|
1160
|
+
const configuration = (0, $6EkQS.useRetorikStore)((state)=>state.configuration);
|
|
1161
|
+
const [mapLayerData, setMapLayerData] = (0, $ajtMF$react.useState)(undefined);
|
|
1162
|
+
const geoJsonLayer = (0, $ajtMF$react.useRef)(null);
|
|
1163
|
+
const coordinates = ((_configuration_position = configuration.position) === null || _configuration_position === void 0 ? void 0 : _configuration_position.latitude) && ((_configuration_position1 = configuration.position) === null || _configuration_position1 === void 0 ? void 0 : _configuration_position1.longitude) ? [
|
|
1164
|
+
[
|
|
1165
|
+
configuration.position.longitude,
|
|
1166
|
+
configuration.position.latitude
|
|
1167
|
+
],
|
|
1168
|
+
[
|
|
1169
|
+
longitude,
|
|
1170
|
+
latitude
|
|
1171
|
+
]
|
|
1172
|
+
] : undefined;
|
|
1173
|
+
const [qrCodeUrl, setQrCodeUrl] = (0, $ajtMF$react.useState)();
|
|
1174
|
+
const fadeInTimerRef = (0, $ajtMF$react.useRef)(null);
|
|
1175
|
+
const [spring, api] = (0, $ajtMF$reactspringweb.useSpring)(()=>({
|
|
1176
|
+
from: {
|
|
1177
|
+
opacity: 0
|
|
1178
|
+
}
|
|
1179
|
+
}));
|
|
1180
|
+
(0, $ajtMF$react.useEffect)(()=>{
|
|
1181
|
+
if (geoJsonLayer.current) mapLayerData && geoJsonLayer.current.clearLayers().addData(mapLayerData);
|
|
1182
|
+
}, [
|
|
1183
|
+
mapLayerData
|
|
1184
|
+
]);
|
|
1185
|
+
(0, $ajtMF$react.useEffect)(()=>{
|
|
1186
|
+
qrCodeUrl && api.start({
|
|
1187
|
+
from: {
|
|
1188
|
+
opacity: 0
|
|
1189
|
+
},
|
|
1190
|
+
to: {
|
|
1191
|
+
opacity: 1
|
|
1192
|
+
},
|
|
1193
|
+
config: {
|
|
1194
|
+
duration: $c9b17a03b9c46905$var$springDuration
|
|
1195
|
+
}
|
|
1196
|
+
});
|
|
1197
|
+
return ()=>{
|
|
1198
|
+
(fadeInTimerRef === null || fadeInTimerRef === void 0 ? void 0 : fadeInTimerRef.current) && clearTimeout(fadeInTimerRef.current);
|
|
1199
|
+
};
|
|
1200
|
+
}, [
|
|
1201
|
+
qrCodeUrl
|
|
1202
|
+
]);
|
|
1203
|
+
const handleCloseQrCode = ()=>{
|
|
1204
|
+
api.start({
|
|
1205
|
+
from: {
|
|
1206
|
+
opacity: 1
|
|
1207
|
+
},
|
|
1208
|
+
to: {
|
|
1209
|
+
opacity: 0
|
|
1210
|
+
},
|
|
1211
|
+
config: {
|
|
1212
|
+
duration: $c9b17a03b9c46905$var$springDuration
|
|
1213
|
+
}
|
|
1214
|
+
});
|
|
1215
|
+
(fadeInTimerRef === null || fadeInTimerRef === void 0 ? void 0 : fadeInTimerRef.current) && clearTimeout(fadeInTimerRef.current);
|
|
1216
|
+
fadeInTimerRef.current = setTimeout(()=>{
|
|
1217
|
+
setQrCodeUrl(null);
|
|
1218
|
+
}, $c9b17a03b9c46905$var$springDuration);
|
|
1219
|
+
};
|
|
1220
|
+
return /*#__PURE__*/ (0, $ajtMF$reactjsxruntime.jsxs)((0, ($parcel$interopDefault($ajtMF$react))).Fragment, {
|
|
1221
|
+
children: [
|
|
1222
|
+
/*#__PURE__*/ (0, $ajtMF$reactjsxruntime.jsxs)((0, $ajtMF$reactleaflet.MapContainer), {
|
|
1223
|
+
center: [
|
|
1224
|
+
latitude,
|
|
1225
|
+
longitude
|
|
1226
|
+
],
|
|
1227
|
+
zoom: 12,
|
|
1228
|
+
scrollWheelZoom: false,
|
|
1229
|
+
style: {
|
|
1230
|
+
height: '100%',
|
|
1231
|
+
width: '100%',
|
|
1232
|
+
zIndex: 0
|
|
1233
|
+
},
|
|
1234
|
+
attributionControl: false,
|
|
1235
|
+
children: [
|
|
1236
|
+
/*#__PURE__*/ (0, $ajtMF$reactjsxruntime.jsx)((0, $ajtMF$reactleaflet.TileLayer), {
|
|
1237
|
+
url: "https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"
|
|
1238
|
+
}),
|
|
1239
|
+
/*#__PURE__*/ (0, $ajtMF$reactjsxruntime.jsx)((0, $ajtMF$reactleaflet.Marker), {
|
|
1240
|
+
position: [
|
|
1241
|
+
latitude,
|
|
1242
|
+
longitude
|
|
1243
|
+
]
|
|
1244
|
+
}),
|
|
1245
|
+
((_configuration_position2 = configuration.position) === null || _configuration_position2 === void 0 ? void 0 : _configuration_position2.latitude) && ((_configuration_position3 = configuration.position) === null || _configuration_position3 === void 0 ? void 0 : _configuration_position3.longitude) && /*#__PURE__*/ (0, $ajtMF$reactjsxruntime.jsx)((0, $ajtMF$reactleaflet.Marker), {
|
|
1246
|
+
position: [
|
|
1247
|
+
configuration.position.latitude,
|
|
1248
|
+
configuration.position.longitude
|
|
1249
|
+
],
|
|
1250
|
+
icon: $c9b17a03b9c46905$var$userIcon
|
|
1251
|
+
}),
|
|
1252
|
+
mapLayerData && /*#__PURE__*/ (0, $ajtMF$reactjsxruntime.jsx)((0, $ajtMF$reactleaflet.GeoJSON), {
|
|
1253
|
+
ref: geoJsonLayer,
|
|
1254
|
+
data: mapLayerData
|
|
1255
|
+
}),
|
|
1256
|
+
/*#__PURE__*/ (0, $ajtMF$reactjsxruntime.jsx)((0, $dmawf.default), {
|
|
1257
|
+
configurationPosition: [
|
|
1258
|
+
((_configuration_position4 = configuration.position) === null || _configuration_position4 === void 0 ? void 0 : _configuration_position4.latitude) || latitude,
|
|
1259
|
+
((_configuration_position5 = configuration.position) === null || _configuration_position5 === void 0 ? void 0 : _configuration_position5.longitude) || longitude
|
|
1260
|
+
],
|
|
1261
|
+
coordinates: [
|
|
1262
|
+
latitude,
|
|
1263
|
+
longitude
|
|
1264
|
+
],
|
|
1265
|
+
data: mapLayerData
|
|
1266
|
+
})
|
|
1267
|
+
]
|
|
1268
|
+
}),
|
|
1269
|
+
coordinates && /*#__PURE__*/ (0, $ajtMF$reactjsxruntime.jsx)((0, $jywlC.default), {
|
|
1270
|
+
coordinates: coordinates,
|
|
1271
|
+
setMapLayerData: setMapLayerData,
|
|
1272
|
+
color: color,
|
|
1273
|
+
setQrCodeUrl: setQrCodeUrl
|
|
1274
|
+
}),
|
|
1275
|
+
qrCodeUrl && /*#__PURE__*/ (0, $ajtMF$reactjsxruntime.jsxs)((0, $ajtMF$reactspringweb.animated).div, {
|
|
1276
|
+
className: "rf-absolute rf-h-full rf-w-full rf-top-0 rf-left-0 rf-z-ui rf-flex rf-flex-col rf-justify-center rf-items-center rf-gap-4 rf-text-truewhite",
|
|
1277
|
+
style: {
|
|
1278
|
+
background: 'rgba(18,18,18,0.7)',
|
|
1279
|
+
...spring
|
|
1280
|
+
},
|
|
1281
|
+
children: [
|
|
1282
|
+
/*#__PURE__*/ (0, $ajtMF$reactjsxruntime.jsx)((0, $7k0ZL.default), {
|
|
1283
|
+
onClick: handleCloseQrCode,
|
|
1284
|
+
showLabel: false
|
|
1285
|
+
}),
|
|
1286
|
+
/*#__PURE__*/ (0, $ajtMF$reactjsxruntime.jsxs)("div", {
|
|
1287
|
+
className: "rf-flex rf-flex-row rf-items-start rf-gap-1 rf-text-truewhite rf-italic",
|
|
1288
|
+
children: [
|
|
1289
|
+
/*#__PURE__*/ (0, $ajtMF$reactjsxruntime.jsx)((0, $7VgIE.RoundIcon), {
|
|
1290
|
+
className: "rf-h-4 rf-mt-[0.2rem]",
|
|
1291
|
+
color: "#FFF"
|
|
1292
|
+
}),
|
|
1293
|
+
/*#__PURE__*/ (0, $ajtMF$reactjsxruntime.jsxs)("div", {
|
|
1294
|
+
className: "rf-w-fit rf-flex rf-flex-col rf-items-center",
|
|
1295
|
+
children: [
|
|
1296
|
+
/*#__PURE__*/ (0, $ajtMF$reactjsxruntime.jsx)("div", {
|
|
1297
|
+
children: (0, $9JtA7.capitalizeFirstLetter)(translation.poi.openroutemobile, locale)
|
|
1298
|
+
}),
|
|
1299
|
+
/*#__PURE__*/ (0, $ajtMF$reactjsxruntime.jsx)("div", {
|
|
1300
|
+
children: translation.link.scanQR
|
|
1301
|
+
})
|
|
1302
|
+
]
|
|
1303
|
+
})
|
|
1304
|
+
]
|
|
1305
|
+
}),
|
|
1306
|
+
/*#__PURE__*/ (0, $ajtMF$reactjsxruntime.jsx)((0, $hQSgy.default), {
|
|
1307
|
+
src: qrCodeUrl
|
|
1308
|
+
})
|
|
1309
|
+
]
|
|
1310
|
+
})
|
|
1311
|
+
]
|
|
1312
|
+
});
|
|
1313
|
+
};
|
|
1314
|
+
var $c9b17a03b9c46905$export$2e2bcd8739ae039 = $c9b17a03b9c46905$var$Map;
|
|
1315
|
+
|
|
1316
|
+
});
|
|
1317
|
+
parcelRegister("jywlC", function(module, exports) {
|
|
1318
|
+
|
|
1319
|
+
$parcel$export(module.exports, "default", () => $b1852deb3d7d5629$export$2e2bcd8739ae039);
|
|
1320
|
+
|
|
1321
|
+
|
|
1322
|
+
|
|
1323
|
+
|
|
1324
|
+
var $6Q0mk = parcelRequire("6Q0mk");
|
|
1325
|
+
|
|
1326
|
+
var $6EkQS = parcelRequire("6EkQS");
|
|
1327
|
+
|
|
1328
|
+
var $7sZDv = parcelRequire("7sZDv");
|
|
1329
|
+
|
|
1330
|
+
var $9JtA7 = parcelRequire("9JtA7");
|
|
1331
|
+
|
|
1332
|
+
var $8FxIQ = parcelRequire("8FxIQ");
|
|
1333
|
+
parcelRequire("hLAht");
|
|
1334
|
+
var $2IMOe = parcelRequire("2IMOe");
|
|
1335
|
+
const $b1852deb3d7d5629$var$Routes = ({ coordinates: coordinates, setMapLayerData: setMapLayerData, color: color, setQrCodeUrl: setQrCodeUrl })=>{
|
|
1336
|
+
var _drivingCar_features, _drivingCar_features__properties_summary, _drivingCar_features__properties, _drivingCar_features1, _drivingCar_features__properties_summary1, _drivingCar_features__properties1, _cyclingRegular_features, _cyclingRegular_features__properties_summary, _cyclingRegular_features__properties, _cyclingRegular_features1, _cyclingRegular_features__properties_summary1, _cyclingRegular_features__properties1, _footWalking_features, _footWalking_features__properties_summary, _footWalking_features__properties, _footWalking_features1, _footWalking_features__properties_summary1, _footWalking_features__properties1;
|
|
1337
|
+
const translation = (0, $6Q0mk.useLocaleStore)((state)=>state.currentTranslations);
|
|
1338
|
+
const locale = (0, $6Q0mk.useLocaleStore)((state)=>state.locale);
|
|
1339
|
+
const isUsedOnBorne = (0, $6EkQS.useRetorikStore)((state)=>state.configuration.isUsedOnBorne);
|
|
1340
|
+
const [drivingCar, setDrivingCar] = (0, $ajtMF$react.useState)(undefined);
|
|
1341
|
+
const [cyclingRegular, setCyclingRegular] = (0, $ajtMF$react.useState)(undefined);
|
|
1342
|
+
const [footWalking, setFootWalking] = (0, $ajtMF$react.useState)(undefined);
|
|
1343
|
+
const [currentChosen, setCurrentChosen] = (0, $ajtMF$react.useState)(undefined);
|
|
1344
|
+
const travelModeRef = (0, $ajtMF$react.useRef)();
|
|
1345
|
+
/**
|
|
1346
|
+
* On component mount :
|
|
1347
|
+
* - call methods to retrieve data from openroute API
|
|
1348
|
+
*/ (0, $ajtMF$react.useEffect)(()=>{
|
|
1349
|
+
calculateForProfile('driving-car');
|
|
1350
|
+
calculateForProfile('cycling-regular');
|
|
1351
|
+
calculateForProfile('foot-walking');
|
|
1352
|
+
}, []);
|
|
1353
|
+
/**
|
|
1354
|
+
* On currentChosen state change :
|
|
1355
|
+
* - switch on currentChosen value to display the associated data on the map
|
|
1356
|
+
*/ (0, $ajtMF$react.useEffect)(()=>{
|
|
1357
|
+
switch(currentChosen){
|
|
1358
|
+
case 'drivingCar':
|
|
1359
|
+
drivingCar && drivingCar.features && setMapLayerData(drivingCar);
|
|
1360
|
+
travelModeRef.current = 'driving';
|
|
1361
|
+
break;
|
|
1362
|
+
case 'cyclingRegular':
|
|
1363
|
+
cyclingRegular && cyclingRegular.features && setMapLayerData(cyclingRegular);
|
|
1364
|
+
travelModeRef.current = 'bicycling';
|
|
1365
|
+
break;
|
|
1366
|
+
case 'footWalking':
|
|
1367
|
+
footWalking && footWalking.features && setMapLayerData(footWalking);
|
|
1368
|
+
travelModeRef.current = 'walking';
|
|
1369
|
+
break;
|
|
1370
|
+
default:
|
|
1371
|
+
break;
|
|
1372
|
+
}
|
|
1373
|
+
}, [
|
|
1374
|
+
currentChosen
|
|
1375
|
+
]);
|
|
1376
|
+
/**
|
|
1377
|
+
* On drivingCar state change :
|
|
1378
|
+
* - if driving car data were retrieved and no course has been chosen, set currentChosen state to 'driving-car'
|
|
1379
|
+
*/ (0, $ajtMF$react.useEffect)(()=>{
|
|
1380
|
+
drivingCar && !currentChosen && setCurrentChosen('drivingCar');
|
|
1381
|
+
}, [
|
|
1382
|
+
drivingCar
|
|
1383
|
+
]);
|
|
1384
|
+
/**
|
|
1385
|
+
* On call :
|
|
1386
|
+
* - call the openroute API to retrieve data for the current course
|
|
1387
|
+
* @param profile : string
|
|
1388
|
+
*/ const calculateForProfile = async (profile)=>{
|
|
1389
|
+
const url = `${(0, $7sZDv.openRoute)}/${profile}/geojson`;
|
|
1390
|
+
const data = await fetch(url, {
|
|
1391
|
+
method: 'POST',
|
|
1392
|
+
headers: {
|
|
1393
|
+
Authorization: (0, $7sZDv.openRouteAPIKey),
|
|
1394
|
+
'Content-Type': 'application/json'
|
|
1395
|
+
},
|
|
1396
|
+
body: JSON.stringify({
|
|
1397
|
+
coordinates: coordinates
|
|
1398
|
+
})
|
|
1399
|
+
}).then((result)=>{
|
|
1400
|
+
return result.json();
|
|
1401
|
+
}).catch(()=>{
|
|
1402
|
+
return null;
|
|
1403
|
+
});
|
|
1404
|
+
if (data && !data.error) switch(profile){
|
|
1405
|
+
case 'driving-car':
|
|
1406
|
+
setDrivingCar(data);
|
|
1407
|
+
break;
|
|
1408
|
+
case 'cycling-regular':
|
|
1409
|
+
setCyclingRegular(data);
|
|
1410
|
+
break;
|
|
1411
|
+
case 'foot-walking':
|
|
1412
|
+
setFootWalking(data);
|
|
1413
|
+
break;
|
|
1414
|
+
default:
|
|
1415
|
+
break;
|
|
1416
|
+
}
|
|
1417
|
+
};
|
|
1418
|
+
const handleClick = async ()=>{
|
|
1419
|
+
if ((travelModeRef === null || travelModeRef === void 0 ? void 0 : travelModeRef.current) && coordinates.length === 2) {
|
|
1420
|
+
// Create an URL to Google Maps with coordinates and travelling mode
|
|
1421
|
+
const coordinatesInUrl = `origin=${coordinates[0][1]},${coordinates[0][0]}&destination=${coordinates[1][1]},${coordinates[1][0]}`;
|
|
1422
|
+
const fullUrl = `${(0, $7sZDv.googleMapsAddress)}${coordinatesInUrl}&travelmode=${travelModeRef.current}`;
|
|
1423
|
+
if (isUsedOnBorne) {
|
|
1424
|
+
const url = await (0, ($parcel$interopDefault($ajtMF$qrcode))).toDataURL(fullUrl);
|
|
1425
|
+
setQrCodeUrl(url);
|
|
1426
|
+
} else // If we are not on a borne, open a new tab in browser
|
|
1427
|
+
window.open(fullUrl, '_blank');
|
|
1428
|
+
}
|
|
1429
|
+
};
|
|
1430
|
+
return drivingCar || cyclingRegular || footWalking ? /*#__PURE__*/ (0, $ajtMF$reactjsxruntime.jsxs)("div", {
|
|
1431
|
+
className: "rf-absolute rf-bottom-2 rf-w-full rf-flex rf-flex-row rf-gap-4 rf-justify-center",
|
|
1432
|
+
children: [
|
|
1433
|
+
/*#__PURE__*/ (0, $ajtMF$reactjsxruntime.jsxs)("div", {
|
|
1434
|
+
className: "rf-grid rf-grid-cols-routes rf-pl-6 rf-pr-4 rf-py-2 rf-gap-4 rf-rounded-lg rf-bg-truewhite ltr:rf-text-xs rtl:rf-text-arabic large:rf-text-sm rf-shadow-[0_6px_6px_#00000029]",
|
|
1435
|
+
children: [
|
|
1436
|
+
/*#__PURE__*/ (0, $ajtMF$reactjsxruntime.jsx)((0, $8FxIQ.default), {
|
|
1437
|
+
summary: {
|
|
1438
|
+
type: 'drivingCar',
|
|
1439
|
+
distance: (drivingCar === null || drivingCar === void 0 ? void 0 : (_drivingCar_features = drivingCar.features) === null || _drivingCar_features === void 0 ? void 0 : _drivingCar_features.length) ? (_drivingCar_features__properties = drivingCar.features[0].properties) === null || _drivingCar_features__properties === void 0 ? void 0 : (_drivingCar_features__properties_summary = _drivingCar_features__properties.summary) === null || _drivingCar_features__properties_summary === void 0 ? void 0 : _drivingCar_features__properties_summary.distance : undefined,
|
|
1440
|
+
duration: (drivingCar === null || drivingCar === void 0 ? void 0 : (_drivingCar_features1 = drivingCar.features) === null || _drivingCar_features1 === void 0 ? void 0 : _drivingCar_features1.length) ? (_drivingCar_features__properties1 = drivingCar.features[0].properties) === null || _drivingCar_features__properties1 === void 0 ? void 0 : (_drivingCar_features__properties_summary1 = _drivingCar_features__properties1.summary) === null || _drivingCar_features__properties_summary1 === void 0 ? void 0 : _drivingCar_features__properties_summary1.duration : undefined
|
|
1441
|
+
},
|
|
1442
|
+
chosen: currentChosen === 'drivingCar',
|
|
1443
|
+
color: color,
|
|
1444
|
+
onClick: setCurrentChosen
|
|
1445
|
+
}),
|
|
1446
|
+
/*#__PURE__*/ (0, $ajtMF$reactjsxruntime.jsx)((0, $8FxIQ.default), {
|
|
1447
|
+
summary: {
|
|
1448
|
+
type: 'cyclingRegular',
|
|
1449
|
+
distance: (cyclingRegular === null || cyclingRegular === void 0 ? void 0 : (_cyclingRegular_features = cyclingRegular.features) === null || _cyclingRegular_features === void 0 ? void 0 : _cyclingRegular_features.length) ? (_cyclingRegular_features__properties = cyclingRegular.features[0].properties) === null || _cyclingRegular_features__properties === void 0 ? void 0 : (_cyclingRegular_features__properties_summary = _cyclingRegular_features__properties.summary) === null || _cyclingRegular_features__properties_summary === void 0 ? void 0 : _cyclingRegular_features__properties_summary.distance : undefined,
|
|
1450
|
+
duration: (cyclingRegular === null || cyclingRegular === void 0 ? void 0 : (_cyclingRegular_features1 = cyclingRegular.features) === null || _cyclingRegular_features1 === void 0 ? void 0 : _cyclingRegular_features1.length) ? (_cyclingRegular_features__properties1 = cyclingRegular.features[0].properties) === null || _cyclingRegular_features__properties1 === void 0 ? void 0 : (_cyclingRegular_features__properties_summary1 = _cyclingRegular_features__properties1.summary) === null || _cyclingRegular_features__properties_summary1 === void 0 ? void 0 : _cyclingRegular_features__properties_summary1.duration : undefined
|
|
1451
|
+
},
|
|
1452
|
+
chosen: currentChosen === 'cyclingRegular',
|
|
1453
|
+
color: color,
|
|
1454
|
+
onClick: setCurrentChosen
|
|
1455
|
+
}),
|
|
1456
|
+
/*#__PURE__*/ (0, $ajtMF$reactjsxruntime.jsx)((0, $8FxIQ.default), {
|
|
1457
|
+
summary: {
|
|
1458
|
+
type: 'footWalking',
|
|
1459
|
+
distance: (footWalking === null || footWalking === void 0 ? void 0 : (_footWalking_features = footWalking.features) === null || _footWalking_features === void 0 ? void 0 : _footWalking_features.length) ? (_footWalking_features__properties = footWalking.features[0].properties) === null || _footWalking_features__properties === void 0 ? void 0 : (_footWalking_features__properties_summary = _footWalking_features__properties.summary) === null || _footWalking_features__properties_summary === void 0 ? void 0 : _footWalking_features__properties_summary.distance : undefined,
|
|
1460
|
+
duration: (footWalking === null || footWalking === void 0 ? void 0 : (_footWalking_features1 = footWalking.features) === null || _footWalking_features1 === void 0 ? void 0 : _footWalking_features1.length) ? (_footWalking_features__properties1 = footWalking.features[0].properties) === null || _footWalking_features__properties1 === void 0 ? void 0 : (_footWalking_features__properties_summary1 = _footWalking_features__properties1.summary) === null || _footWalking_features__properties_summary1 === void 0 ? void 0 : _footWalking_features__properties_summary1.duration : undefined
|
|
1461
|
+
},
|
|
1462
|
+
chosen: currentChosen === 'footWalking',
|
|
1463
|
+
color: color,
|
|
1464
|
+
onClick: setCurrentChosen
|
|
1465
|
+
})
|
|
1466
|
+
]
|
|
1467
|
+
}),
|
|
1468
|
+
/*#__PURE__*/ (0, $ajtMF$reactjsxruntime.jsxs)("button", {
|
|
1469
|
+
className: "rf-aspect-square rf-w-3/20 rf-min-w-3/20 rf-max-w-3/20 large:rf-w-1/8 large:rf-min-w-1/8 large:rf-max-w-1/8 rf-overflow-y-hidden rf-p-1 rf-flex rf-flex-col rf-justify-evenly rf-items-center rf-border-2 rf-border-trueblack rf-rounded-lg rf-font-bold ltr:rf-text-xs rtl:rf-text-arabic large:rf-text-sm rf-bg-truewhite",
|
|
1470
|
+
onClick: handleClick,
|
|
1471
|
+
children: [
|
|
1472
|
+
/*#__PURE__*/ (0, $ajtMF$reactjsxruntime.jsx)((0, $2IMOe.default), {
|
|
1473
|
+
className: "rf-w-5 rf-h-5"
|
|
1474
|
+
}),
|
|
1475
|
+
(0, $9JtA7.capitalizeFirstLetter)(translation.poi.route, locale)
|
|
1476
|
+
]
|
|
1477
|
+
})
|
|
1478
|
+
]
|
|
1479
|
+
}) : /*#__PURE__*/ (0, $ajtMF$reactjsxruntime.jsx)((0, ($parcel$interopDefault($ajtMF$react))).Fragment, {});
|
|
1480
|
+
};
|
|
1481
|
+
var $b1852deb3d7d5629$export$2e2bcd8739ae039 = $b1852deb3d7d5629$var$Routes;
|
|
1482
|
+
|
|
1483
|
+
});
|
|
1484
|
+
parcelRegister("8FxIQ", function(module, exports) {
|
|
1485
|
+
|
|
1486
|
+
$parcel$export(module.exports, "default", () => $f4247240f036cf0c$export$2e2bcd8739ae039);
|
|
1487
|
+
|
|
1488
|
+
|
|
1489
|
+
|
|
1490
|
+
var $ctCMS = parcelRequire("ctCMS");
|
|
1491
|
+
|
|
1492
|
+
var $9uiuR = parcelRequire("9uiuR");
|
|
1493
|
+
parcelRequire("hLAht");
|
|
1494
|
+
var $5b4Wi = parcelRequire("5b4Wi");
|
|
1495
|
+
var $12z8N = parcelRequire("12z8N");
|
|
1496
|
+
var $8cNXi = parcelRequire("8cNXi");
|
|
1497
|
+
var $kWAiC = parcelRequire("kWAiC");
|
|
1498
|
+
const $f4247240f036cf0c$var$RoutesItem = ({ summary: summary, chosen: chosen, color: color, onClick: onClick })=>{
|
|
1499
|
+
return /*#__PURE__*/ (0, $ajtMF$reactjsxruntime.jsx)("div", {
|
|
1500
|
+
className: "rf-flex rf-flex-col rf-justify-end hover:rf-cursor-pointer",
|
|
1501
|
+
onClick: ()=>onClick(summary.type),
|
|
1502
|
+
children: /*#__PURE__*/ (0, $ajtMF$reactjsxruntime.jsxs)("div", {
|
|
1503
|
+
className: "rf-h-full rf-flex rf-flex-row rf-gap-3 rf-items-center",
|
|
1504
|
+
children: [
|
|
1505
|
+
/*#__PURE__*/ (0, $ajtMF$reactjsxruntime.jsxs)("div", {
|
|
1506
|
+
className: "rf-relative rf-flex rf-justify-center rf-items-center",
|
|
1507
|
+
children: [
|
|
1508
|
+
/*#__PURE__*/ (0, $ajtMF$reactjsxruntime.jsx)("div", {
|
|
1509
|
+
className: "rf-absolute rf-w-9 rf-h-9 rf-rounded-max",
|
|
1510
|
+
style: {
|
|
1511
|
+
backgroundColor: chosen ? color : '#EFEDF0'
|
|
1512
|
+
}
|
|
1513
|
+
}),
|
|
1514
|
+
/*#__PURE__*/ (0, $ajtMF$reactjsxruntime.jsx)("div", {
|
|
1515
|
+
className: "rf-absolute rf-w-full -rf-top-[1.15rem] rf-flex rf-justify-center",
|
|
1516
|
+
children: /*#__PURE__*/ (0, $ajtMF$reactjsxruntime.jsx)($kWAiC.default, {
|
|
1517
|
+
className: "rf-w-2 rf-h-2",
|
|
1518
|
+
color: chosen ? color : 'transparent'
|
|
1519
|
+
})
|
|
1520
|
+
}),
|
|
1521
|
+
summary.type === 'drivingCar' && /*#__PURE__*/ (0, $ajtMF$reactjsxruntime.jsx)($12z8N.default, {
|
|
1522
|
+
className: "rf-w-5 rf-z-util",
|
|
1523
|
+
color: chosen ? '#FFF' : '#535252'
|
|
1524
|
+
}),
|
|
1525
|
+
summary.type === 'cyclingRegular' && /*#__PURE__*/ (0, $ajtMF$reactjsxruntime.jsx)($5b4Wi.default, {
|
|
1526
|
+
className: "rf-w-6 rf-z-util",
|
|
1527
|
+
color: chosen ? '#FFF' : '#535252'
|
|
1528
|
+
}),
|
|
1529
|
+
summary.type === 'footWalking' && /*#__PURE__*/ (0, $ajtMF$reactjsxruntime.jsx)($8cNXi.default, {
|
|
1530
|
+
className: "rf-w-6 rf-z-util",
|
|
1531
|
+
color: chosen ? '#FFF' : '#535252'
|
|
1532
|
+
})
|
|
1533
|
+
]
|
|
1534
|
+
}),
|
|
1535
|
+
/*#__PURE__*/ (0, $ajtMF$reactjsxruntime.jsxs)("div", {
|
|
1536
|
+
className: "rf-flex rf-flex-col rf-justify-center rf-items-start",
|
|
1537
|
+
children: [
|
|
1538
|
+
/*#__PURE__*/ (0, $ajtMF$reactjsxruntime.jsx)("div", {
|
|
1539
|
+
className: "rf-whitespace-nowrap rf-font-bold",
|
|
1540
|
+
children: (0, $9uiuR.default)(summary === null || summary === void 0 ? void 0 : summary.duration)
|
|
1541
|
+
}),
|
|
1542
|
+
/*#__PURE__*/ (0, $ajtMF$reactjsxruntime.jsx)("div", {
|
|
1543
|
+
className: "rf-whitespace-nowrap",
|
|
1544
|
+
children: (0, $ctCMS.default)(summary === null || summary === void 0 ? void 0 : summary.distance)
|
|
1545
|
+
})
|
|
1546
|
+
]
|
|
1547
|
+
})
|
|
1548
|
+
]
|
|
1549
|
+
})
|
|
1550
|
+
});
|
|
1551
|
+
};
|
|
1552
|
+
var $f4247240f036cf0c$export$2e2bcd8739ae039 = $f4247240f036cf0c$var$RoutesItem;
|
|
1553
|
+
|
|
1554
|
+
});
|
|
1555
|
+
parcelRegister("ctCMS", function(module, exports) {
|
|
1556
|
+
|
|
1557
|
+
$parcel$export(module.exports, "default", () => $b1da9b696ff2481e$export$2e2bcd8739ae039);
|
|
1558
|
+
const $b1da9b696ff2481e$var$getDistanceAsString = (distance)=>{
|
|
1559
|
+
if (typeof distance !== 'number') return 'NC';
|
|
1560
|
+
if (distance <= 0) return '0 m';
|
|
1561
|
+
if (distance < 1) return `${distance * 100} cm`;
|
|
1562
|
+
if (distance < 1000) return `${distance} m`;
|
|
1563
|
+
if (distance >= 1000) return `${Math.ceil(distance / 1000) * 10 / 10} km`;
|
|
1564
|
+
return 'NC';
|
|
1565
|
+
};
|
|
1566
|
+
var $b1da9b696ff2481e$export$2e2bcd8739ae039 = $b1da9b696ff2481e$var$getDistanceAsString;
|
|
1567
|
+
|
|
1568
|
+
});
|
|
1569
|
+
|
|
1570
|
+
parcelRegister("9uiuR", function(module, exports) {
|
|
1571
|
+
|
|
1572
|
+
$parcel$export(module.exports, "default", () => $50c924376d4e5dbe$export$2e2bcd8739ae039);
|
|
1573
|
+
const $50c924376d4e5dbe$var$getTimeAsString = (time)=>{
|
|
1574
|
+
if (typeof time !== 'number') return 'NC';
|
|
1575
|
+
if (time < 1) return 'NC';
|
|
1576
|
+
if (time < 60) return `${time} s`;
|
|
1577
|
+
if (time < 3600) return `${Math.ceil(time / 60)} min`;
|
|
1578
|
+
if (time === 3600) return `1 h`;
|
|
1579
|
+
if (time > 3600) {
|
|
1580
|
+
const hours = Math.floor(time / 3600);
|
|
1581
|
+
const minutes = Math.ceil((time - hours * 3600) / 60);
|
|
1582
|
+
return `${hours} h ${minutes === 60 ? 59 : minutes < 10 ? `0${minutes}` : minutes}`;
|
|
1583
|
+
}
|
|
1584
|
+
return 'NC';
|
|
1585
|
+
};
|
|
1586
|
+
var $50c924376d4e5dbe$export$2e2bcd8739ae039 = $50c924376d4e5dbe$var$getTimeAsString;
|
|
1587
|
+
|
|
1588
|
+
});
|
|
1589
|
+
|
|
1590
|
+
parcelRegister("hLAht", function(module, exports) {
|
|
1591
|
+
|
|
1592
|
+
$parcel$export(module.exports, "CyclingRegularIcon", () => (parcelRequire("5b4Wi")).default);
|
|
1593
|
+
$parcel$export(module.exports, "DrivingCarIcon", () => (parcelRequire("12z8N")).default);
|
|
1594
|
+
$parcel$export(module.exports, "FootWalkingIcon", () => (parcelRequire("8cNXi")).default);
|
|
1595
|
+
$parcel$export(module.exports, "OpenLocationIcon", () => (parcelRequire("2IMOe")).default);
|
|
1596
|
+
$parcel$export(module.exports, "TriangleIcon", () => (parcelRequire("kWAiC")).default);
|
|
1597
|
+
|
|
1598
|
+
var $5b4Wi = parcelRequire("5b4Wi");
|
|
1599
|
+
|
|
1600
|
+
var $12z8N = parcelRequire("12z8N");
|
|
1601
|
+
|
|
1602
|
+
var $8cNXi = parcelRequire("8cNXi");
|
|
1603
|
+
|
|
1604
|
+
var $2IMOe = parcelRequire("2IMOe");
|
|
1605
|
+
|
|
1606
|
+
var $kWAiC = parcelRequire("kWAiC");
|
|
1607
|
+
|
|
1608
|
+
});
|
|
1609
|
+
parcelRegister("5b4Wi", function(module, exports) {
|
|
1610
|
+
|
|
1611
|
+
$parcel$export(module.exports, "default", () => $ee813fb8e86f6823$export$2e2bcd8739ae039);
|
|
1612
|
+
|
|
1613
|
+
|
|
1614
|
+
const $ee813fb8e86f6823$var$CyclingRegularIcon = ({ className: className, color: color })=>{
|
|
1615
|
+
return /*#__PURE__*/ (0, $ajtMF$reactjsxruntime.jsx)("svg", {
|
|
1616
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1617
|
+
viewBox: "0 0 34.168 29.135",
|
|
1618
|
+
className: className || 'rf-w-8 rf-h-8',
|
|
1619
|
+
children: /*#__PURE__*/ (0, $ajtMF$reactjsxruntime.jsx)("g", {
|
|
1620
|
+
transform: "translate(0.5 -1.484)",
|
|
1621
|
+
children: /*#__PURE__*/ (0, $ajtMF$reactjsxruntime.jsx)("path", {
|
|
1622
|
+
d: "M20.5,6.789a2.645,2.645,0,1,0-2.645-2.645A2.653,2.653,0,0,0,20.5,6.789Zm-13.885,8.6a6.612,6.612,0,1,0,0,13.224,6.612,6.612,0,1,0,0-13.224Zm0,11.24a4.628,4.628,0,1,1,0-9.257,4.628,4.628,0,1,1,0,9.257ZM14.282,13.4l3.174-3.174,1.058,1.058a9.264,9.264,0,0,0,6.744,2.777V11.418A6.57,6.57,0,0,1,20.5,9.434L17.984,6.922a3.242,3.242,0,0,0-2.116-.793,2.219,2.219,0,0,0-1.851.793l-3.7,3.7a2.611,2.611,0,0,0-.793,1.851,2.219,2.219,0,0,0,.793,1.851l4.232,3.7v6.612h2.645v-8.2Zm10.843,1.984A6.612,6.612,0,1,0,31.737,22,6.548,6.548,0,0,0,25.125,15.385Zm0,11.24A4.628,4.628,0,1,1,29.753,22,4.685,4.685,0,0,1,25.125,26.625Z",
|
|
1623
|
+
transform: "translate(0 0.484)",
|
|
1624
|
+
fill: color || '#fff'
|
|
1625
|
+
})
|
|
1626
|
+
})
|
|
1627
|
+
});
|
|
1628
|
+
};
|
|
1629
|
+
var $ee813fb8e86f6823$export$2e2bcd8739ae039 = $ee813fb8e86f6823$var$CyclingRegularIcon;
|
|
1630
|
+
|
|
1631
|
+
});
|
|
1632
|
+
|
|
1633
|
+
parcelRegister("12z8N", function(module, exports) {
|
|
1634
|
+
|
|
1635
|
+
$parcel$export(module.exports, "default", () => $bd7aeed927950988$export$2e2bcd8739ae039);
|
|
1636
|
+
|
|
1637
|
+
|
|
1638
|
+
const $bd7aeed927950988$var$DrivingCarIcon = ({ className: className, color: color })=>{
|
|
1639
|
+
return /*#__PURE__*/ (0, $ajtMF$reactjsxruntime.jsx)("svg", {
|
|
1640
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1641
|
+
viewBox: "0 0 34.168 29.135",
|
|
1642
|
+
className: className || 'rf-w-8 rf-h-8',
|
|
1643
|
+
children: /*#__PURE__*/ (0, $ajtMF$reactjsxruntime.jsx)("path", {
|
|
1644
|
+
id: "car",
|
|
1645
|
+
d: "M32.385,71.254H28.507L27.43,68.559A7.217,7.217,0,0,0,20.7,64H12.471a7.219,7.219,0,0,0-6.735,4.559L4.658,71.254H.781a.777.777,0,0,0-.754.966l.389,1.554a.777.777,0,0,0,.754.589h1.3a4.116,4.116,0,0,0-1.43,3.109V80.58A4.111,4.111,0,0,0,2.076,83.3v3.5a2.073,2.073,0,0,0,2.072,2.072H6.221A2.073,2.073,0,0,0,8.293,86.8V84.725h16.58V86.8a2.073,2.073,0,0,0,2.072,2.072h2.072A2.073,2.073,0,0,0,31.09,86.8V83.3a4.109,4.109,0,0,0,1.036-2.716V77.471A4.118,4.118,0,0,0,30.7,74.362H32a.777.777,0,0,0,.754-.589l.389-1.554a.778.778,0,0,0-.754-.966ZM9.584,70.1a3.109,3.109,0,0,1,2.887-1.954H20.7A3.109,3.109,0,0,1,23.582,70.1l1.291,3.227H8.293ZM6.221,80.567a2.066,2.066,0,1,1,0-4.132,3.987,3.987,0,0,1,3.109,3.1c0,1.24-1.865,1.033-3.109,1.033Zm20.725,0c-1.243,0-3.109.207-3.109-1.033a3.987,3.987,0,0,1,3.109-3.1,2.066,2.066,0,1,1,0,4.132Z",
|
|
1646
|
+
transform: "translate(0.501 -63.5)",
|
|
1647
|
+
fill: color || '#fff'
|
|
1648
|
+
})
|
|
1649
|
+
});
|
|
1650
|
+
};
|
|
1651
|
+
var $bd7aeed927950988$export$2e2bcd8739ae039 = $bd7aeed927950988$var$DrivingCarIcon;
|
|
1652
|
+
|
|
1653
|
+
});
|
|
1654
|
+
|
|
1655
|
+
parcelRegister("8cNXi", function(module, exports) {
|
|
1656
|
+
|
|
1657
|
+
$parcel$export(module.exports, "default", () => $43b00c1fdfdc5bda$export$2e2bcd8739ae039);
|
|
1658
|
+
|
|
1659
|
+
|
|
1660
|
+
const $43b00c1fdfdc5bda$var$FootWalkingIcon = ({ className: className, color: color })=>{
|
|
1661
|
+
return /*#__PURE__*/ (0, $ajtMF$reactjsxruntime.jsx)("svg", {
|
|
1662
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1663
|
+
viewBox: "-6 0 34.168 29.135",
|
|
1664
|
+
className: className || 'rf-w-8 rf-h-8',
|
|
1665
|
+
children: /*#__PURE__*/ (0, $ajtMF$reactjsxruntime.jsx)("path", {
|
|
1666
|
+
d: "M11.4,5.249A2.625,2.625,0,1,0,8.772,2.625,2.625,2.625,0,0,0,11.4,5.249ZM16.564,13.4l-1.274-.645-.53-1.608A5.962,5.962,0,0,0,9.171,7c-1.968-.005-3.057.552-5.1,1.378A5.216,5.216,0,0,0,1.352,10.9l-.366.744a1.755,1.755,0,0,0,.776,2.346,1.726,1.726,0,0,0,2.324-.782l.366-.744a1.738,1.738,0,0,1,.9-.842l1.465-.591-.831,3.319A3.512,3.512,0,0,0,6.8,17.568l3.275,3.576a3.529,3.529,0,0,1,.815,1.515l1,4.008a1.75,1.75,0,0,0,3.4-.848l-1.214-4.866a3.5,3.5,0,0,0-.815-1.515l-2.488-2.718.94-3.756.3.9a3.487,3.487,0,0,0,1.733,2.023l1.274.645a1.726,1.726,0,0,0,2.324-.782,1.77,1.77,0,0,0-.782-2.351ZM4.048,21.1a3.393,3.393,0,0,1-.776,1.176L.538,25.01a1.75,1.75,0,1,0,2.472,2.477l3.248-3.248a3.554,3.554,0,0,0,.776-1.176l.738-1.848c-3.024-3.3-2.116-2.286-2.592-2.936L4.048,21.1Z",
|
|
1667
|
+
transform: "translate(0.612 0.5)",
|
|
1668
|
+
fill: color || '#fff'
|
|
1669
|
+
})
|
|
1670
|
+
});
|
|
1671
|
+
};
|
|
1672
|
+
var $43b00c1fdfdc5bda$export$2e2bcd8739ae039 = $43b00c1fdfdc5bda$var$FootWalkingIcon;
|
|
1673
|
+
|
|
1674
|
+
});
|
|
1675
|
+
|
|
1676
|
+
parcelRegister("2IMOe", function(module, exports) {
|
|
1677
|
+
|
|
1678
|
+
$parcel$export(module.exports, "default", () => $e1cfcc1749ee313f$export$2e2bcd8739ae039);
|
|
1679
|
+
|
|
1680
|
+
|
|
1681
|
+
const $e1cfcc1749ee313f$var$OpenLocationIcon = ({ className: className })=>{
|
|
1682
|
+
return /*#__PURE__*/ (0, $ajtMF$reactjsxruntime.jsx)("svg", {
|
|
1683
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1684
|
+
viewBox: "0 0 29.771 29.771",
|
|
1685
|
+
className: className || 'rf-w-6 rf-h-6',
|
|
1686
|
+
children: /*#__PURE__*/ (0, $ajtMF$reactjsxruntime.jsx)("path", {
|
|
1687
|
+
d: "M29.771,0,0,14.886l11.164,3.721,3.721,11.164Z"
|
|
1688
|
+
})
|
|
1689
|
+
});
|
|
1690
|
+
};
|
|
1691
|
+
var $e1cfcc1749ee313f$export$2e2bcd8739ae039 = $e1cfcc1749ee313f$var$OpenLocationIcon;
|
|
1692
|
+
|
|
1693
|
+
});
|
|
1694
|
+
|
|
1695
|
+
parcelRegister("kWAiC", function(module, exports) {
|
|
1696
|
+
|
|
1697
|
+
$parcel$export(module.exports, "default", () => $ff33a7cffe6d1304$export$2e2bcd8739ae039);
|
|
1698
|
+
|
|
1699
|
+
|
|
1700
|
+
const $ff33a7cffe6d1304$var$TriangleIcon = ({ className: className, color: color })=>{
|
|
1701
|
+
return /*#__PURE__*/ (0, $ajtMF$reactjsxruntime.jsx)("svg", {
|
|
1702
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1703
|
+
viewBox: "0 0 16 12",
|
|
1704
|
+
className: className || 'rf-w-3 rf-h-3',
|
|
1705
|
+
children: /*#__PURE__*/ (0, $ajtMF$reactjsxruntime.jsx)("path", {
|
|
1706
|
+
d: "M6.336,2.5a2,2,0,0,1,3.328,0l4.263,6.394A2,2,0,0,1,12.263,12H3.737A2,2,0,0,1,2.073,8.891Z",
|
|
1707
|
+
fill: color || 'transparent'
|
|
1708
|
+
})
|
|
1709
|
+
});
|
|
1710
|
+
};
|
|
1711
|
+
var $ff33a7cffe6d1304$export$2e2bcd8739ae039 = $ff33a7cffe6d1304$var$TriangleIcon;
|
|
1712
|
+
|
|
1713
|
+
});
|
|
1714
|
+
|
|
1715
|
+
|
|
1716
|
+
|
|
1717
|
+
|
|
1718
|
+
parcelRegister("dmawf", function(module, exports) {
|
|
1719
|
+
|
|
1720
|
+
$parcel$export(module.exports, "default", () => $bec002e5f7690553$export$2e2bcd8739ae039);
|
|
1721
|
+
|
|
1722
|
+
|
|
1723
|
+
|
|
1724
|
+
const $bec002e5f7690553$var$MapUser = ({ configurationPosition: configurationPosition, coordinates: coordinates, data: data })=>{
|
|
1725
|
+
const map = (0, $ajtMF$reactleaflet.useMap)();
|
|
1726
|
+
(0, $ajtMF$react.useEffect)(()=>{
|
|
1727
|
+
if (configurationPosition !== coordinates) {
|
|
1728
|
+
const coords1 = [
|
|
1729
|
+
...configurationPosition
|
|
1730
|
+
];
|
|
1731
|
+
const coords2 = [
|
|
1732
|
+
...coordinates
|
|
1733
|
+
];
|
|
1734
|
+
if (configurationPosition[0] > coordinates[0]) coords2[0] -= (configurationPosition[0] - coordinates[0]) / 2;
|
|
1735
|
+
else coords1[0] -= (coordinates[0] - configurationPosition[0]) / 2;
|
|
1736
|
+
map.flyToBounds([
|
|
1737
|
+
coords1,
|
|
1738
|
+
coords2
|
|
1739
|
+
]);
|
|
1740
|
+
} else map.flyToBounds([
|
|
1741
|
+
configurationPosition,
|
|
1742
|
+
coordinates
|
|
1743
|
+
]);
|
|
1744
|
+
}, [
|
|
1745
|
+
data
|
|
1746
|
+
]);
|
|
1747
|
+
return /*#__PURE__*/ (0, $ajtMF$reactjsxruntime.jsx)((0, ($parcel$interopDefault($ajtMF$react))).Fragment, {});
|
|
1748
|
+
};
|
|
1749
|
+
var $bec002e5f7690553$export$2e2bcd8739ae039 = $bec002e5f7690553$var$MapUser;
|
|
1750
|
+
|
|
1751
|
+
});
|
|
1752
|
+
|
|
1753
|
+
|
|
1754
|
+
|
|
1755
|
+
|
|
1756
|
+
|
|
1757
|
+
//# sourceMappingURL=AttachmentDetail.1e06c2a5.js.map
|