@osm-editor-kit/street-imagery-react 0.1.0-alpha.12 → 0.1.0-alpha.13

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.
@@ -1,5 +1,6 @@
1
- import { useViewerActions } from './chunk-25UGGXIE.js';
2
- import { getStreetImageryConfig, providerExternalLink } from '@osm-editor-kit/street-imagery';
1
+ import { useViewerActions } from './chunk-GYUS2JVV.js';
2
+ import { c } from 'react/compiler-runtime';
3
+ import { providerExternalLink, getStreetImageryConfig } from '@osm-editor-kit/street-imagery';
3
4
  import 'mapillary-js/dist/mapillary.css';
4
5
  import { DataProviderBase, S2GeometryProvider, Viewer } from 'mapillary-js';
5
6
  import { useRef, useState, useEffectEvent, useEffect } from 'react';
@@ -17,7 +18,11 @@ var panoramaxItemSize = (item) => orientation(item)?.sensor_array_dimensions ??
17
18
  var panoramaxItemNeighbour = (item, rel) => item.links?.find((link) => link.rel === rel)?.id ?? null;
18
19
  var SD_WIDTH = 2048;
19
20
  var panoramaxItemImageUrl = (item) => {
20
- const { hd, sd, thumb } = item.assets ?? {};
21
+ const {
22
+ hd,
23
+ sd,
24
+ thumb
25
+ } = item.assets ?? {};
21
26
  return sd?.href ?? hd?.href ?? thumb?.href ?? "";
22
27
  };
23
28
  var TILE_SIZE = 1024;
@@ -34,7 +39,10 @@ var panoramaxTilesOfLevel = (size, z) => {
34
39
  const tiles = [];
35
40
  for (let y = 0; y < Math.ceil(height / span); y++) {
36
41
  for (let x = 0; x < Math.ceil(width / span); x++) {
37
- tiles.push({ x, y });
42
+ tiles.push({
43
+ x,
44
+ y
45
+ });
38
46
  }
39
47
  }
40
48
  return tiles;
@@ -75,19 +83,45 @@ var panoramaxPhotoFromItem = (item) => {
75
83
  const instance = item.links?.find((link) => link.rel === "via")?.instance_name;
76
84
  const exifEntries = Object.entries(properties.exif ?? {}).filter(([, value]) => typeof value === "string" || typeof value === "number").map(([key, value]) => [key, String(value)]);
77
85
  const details = {
78
- ...properties.license ? { license: properties.license } : {},
79
- ...licenseUrl ? { licenseUrl } : {},
80
- ...properties.datetimetz ? { capturedAtLocal: properties.datetimetz } : {},
81
- ...uploadedAt != null ? { uploadedAt } : {},
82
- ...cameraName ? { camera: cameraName } : {},
83
- ...!isPano && camera?.field_of_view ? { fieldOfViewDeg: camera.field_of_view } : {},
84
- ...properties["quality:horizontal_accuracy"] != null ? { positionAccuracyMeters: properties["quality:horizontal_accuracy"] } : {},
85
- ...instance ? { instance } : {},
86
- ...camera?.focal_length != null ? { focalLengthMm: camera.focal_length } : {},
87
- ...properties["original_file:name"] ? { originalFileName: properties["original_file:name"] } : {},
88
- ...properties["original_file:size"] != null ? { originalFileSizeBytes: properties["original_file:size"] } : {},
89
- ...properties["geovisio:rank_in_collection"] != null ? { rankInSequence: properties["geovisio:rank_in_collection"] } : {},
90
- ...exifEntries.length > 0 ? { exif: Object.fromEntries(exifEntries) } : {}
86
+ ...properties.license ? {
87
+ license: properties.license
88
+ } : {},
89
+ ...licenseUrl ? {
90
+ licenseUrl
91
+ } : {},
92
+ ...properties.datetimetz ? {
93
+ capturedAtLocal: properties.datetimetz
94
+ } : {},
95
+ ...uploadedAt != null ? {
96
+ uploadedAt
97
+ } : {},
98
+ ...cameraName ? {
99
+ camera: cameraName
100
+ } : {},
101
+ ...!isPano && camera?.field_of_view ? {
102
+ fieldOfViewDeg: camera.field_of_view
103
+ } : {},
104
+ ...properties["quality:horizontal_accuracy"] != null ? {
105
+ positionAccuracyMeters: properties["quality:horizontal_accuracy"]
106
+ } : {},
107
+ ...instance ? {
108
+ instance
109
+ } : {},
110
+ ...camera?.focal_length != null ? {
111
+ focalLengthMm: camera.focal_length
112
+ } : {},
113
+ ...properties["original_file:name"] ? {
114
+ originalFileName: properties["original_file:name"]
115
+ } : {},
116
+ ...properties["original_file:size"] != null ? {
117
+ originalFileSizeBytes: properties["original_file:size"]
118
+ } : {},
119
+ ...properties["geovisio:rank_in_collection"] != null ? {
120
+ rankInSequence: properties["geovisio:rank_in_collection"]
121
+ } : {},
122
+ ...exifEntries.length > 0 ? {
123
+ exif: Object.fromEntries(exifEntries)
124
+ } : {}
91
125
  };
92
126
  return {
93
127
  providerId: "panoramax",
@@ -97,7 +131,9 @@ var panoramaxPhotoFromItem = (item) => {
97
131
  isPano,
98
132
  heading: properties["view:azimuth"] ?? null,
99
133
  lngLat: item.geometry.coordinates,
100
- ...creatorName ? { creatorName } : {},
134
+ ...creatorName ? {
135
+ creatorName
136
+ } : {},
101
137
  details
102
138
  };
103
139
  };
@@ -119,7 +155,9 @@ var PanoramaxDataProvider = class extends DataProviderBase {
119
155
  itemRequests = /* @__PURE__ */ new Map();
120
156
  imageBuffers = /* @__PURE__ */ new Map();
121
157
  pictures = /* @__PURE__ */ new Map();
122
- constructor({ endpoint }) {
158
+ constructor({
159
+ endpoint
160
+ }) {
123
161
  super(new S2GeometryProvider());
124
162
  this.endpoint = endpoint.replace(/\/$/, "");
125
163
  }
@@ -129,11 +167,17 @@ var PanoramaxDataProvider = class extends DataProviderBase {
129
167
  }
130
168
  // Only the arrows to pictures nearby need these, and those need a 3D reconstruction.
131
169
  getCoreImages(cellId) {
132
- return Promise.resolve({ cell_id: cellId, images: [] });
170
+ return Promise.resolve({
171
+ cell_id: cellId,
172
+ images: []
173
+ });
133
174
  }
134
175
  async getImages(imageIds) {
135
176
  const items = await this.loadItems(imageIds);
136
- return items.map((item) => ({ node: this.toImageEnt(item), node_id: item.id }));
177
+ return items.map((item) => ({
178
+ node: this.toImageEnt(item),
179
+ node_id: item.id
180
+ }));
137
181
  }
138
182
  getSpatialImages(imageIds) {
139
183
  return this.getImages(imageIds);
@@ -144,12 +188,11 @@ var PanoramaxDataProvider = class extends DataProviderBase {
144
188
  if (!item) {
145
189
  throw new Error(`Panoramax picture ${imageId} not found`);
146
190
  }
147
- const around = [
148
- panoramaxItemNeighbour(item, "prev"),
149
- item.id,
150
- panoramaxItemNeighbour(item, "next")
151
- ];
152
- return { id: sequenceId, image_ids: around.filter((id) => id != null) };
191
+ const around = [panoramaxItemNeighbour(item, "prev"), item.id, panoramaxItemNeighbour(item, "next")];
192
+ return {
193
+ id: sequenceId,
194
+ image_ids: around.filter((id) => id != null)
195
+ };
153
196
  }
154
197
  // The viewer asks for the same file more than once while it starts; one download serves all.
155
198
  getImageBuffer(url) {
@@ -170,7 +213,15 @@ var PanoramaxDataProvider = class extends DataProviderBase {
170
213
  const tiles = item ? panoramaxTilesOfLevel(panoramaxViewerSize(item), z) : [];
171
214
  return {
172
215
  node_id: imageId,
173
- node: tiles.map(({ x, y }) => ({ url: `${TILE_PREFIX}${imageId}/${z}/${x}/${y}`, x, y, z }))
216
+ node: tiles.map(({
217
+ x,
218
+ y
219
+ }) => ({
220
+ url: `${TILE_PREFIX}${imageId}/${z}/${x}/${y}`,
221
+ x,
222
+ y,
223
+ z
224
+ }))
174
225
  };
175
226
  }
176
227
  async cutTile(url) {
@@ -180,27 +231,26 @@ var PanoramaxDataProvider = class extends DataProviderBase {
180
231
  throw new Error(`Panoramax picture ${imageId} not loaded`);
181
232
  }
182
233
  const size = panoramaxViewerSize(item);
183
- const { hd, sd } = item.assets ?? {};
234
+ const {
235
+ hd,
236
+ sd
237
+ } = item.assets ?? {};
184
238
  const file = (panoramaxLevelNeedsOriginal(size, Number(z)) ? hd : sd) ?? hd ?? sd;
185
239
  const original = await this.loadPicture(file?.href ?? "");
186
- const rect = panoramaxTileRect(
187
- size,
188
- { x: Number(x), y: Number(y), z: Number(z) },
189
- { width: original.width, height: original.height }
190
- );
240
+ const rect = panoramaxTileRect(size, {
241
+ x: Number(x),
242
+ y: Number(y),
243
+ z: Number(z)
244
+ }, {
245
+ width: original.width,
246
+ height: original.height
247
+ });
191
248
  const canvas = new OffscreenCanvas(rect.outWidth, rect.outHeight);
192
- canvas.getContext("2d")?.drawImage(
193
- original,
194
- rect.x,
195
- rect.y,
196
- rect.width,
197
- rect.height,
198
- 0,
199
- 0,
200
- rect.outWidth,
201
- rect.outHeight
202
- );
203
- const blob = await canvas.convertToBlob({ type: "image/jpeg", quality: 0.9 });
249
+ canvas.getContext("2d")?.drawImage(original, rect.x, rect.y, rect.width, rect.height, 0, 0, rect.outWidth, rect.outHeight);
250
+ const blob = await canvas.convertToBlob({
251
+ type: "image/jpeg",
252
+ quality: 0.9
253
+ });
204
254
  return blob.arrayBuffer();
205
255
  }
206
256
  loadPicture(url) {
@@ -219,15 +269,24 @@ var PanoramaxDataProvider = class extends DataProviderBase {
219
269
  return picture;
220
270
  }
221
271
  getMesh() {
222
- return Promise.resolve({ faces: [], vertices: [] });
272
+ return Promise.resolve({
273
+ faces: [],
274
+ vertices: []
275
+ });
223
276
  }
224
277
  getCluster(url) {
225
- return Promise.resolve({ id: url, points: {}, reference: { lat: 0, lng: 0, alt: 0 } });
278
+ return Promise.resolve({
279
+ id: url,
280
+ points: {},
281
+ reference: {
282
+ lat: 0,
283
+ lng: 0,
284
+ alt: 0
285
+ }
286
+ });
226
287
  }
227
288
  async loadItems(imageIds) {
228
- const missing = [
229
- ...new Set(imageIds.filter((id) => !this.items.has(id) && !this.itemRequests.has(id)))
230
- ];
289
+ const missing = [...new Set(imageIds.filter((id) => !this.items.has(id) && !this.itemRequests.has(id)))];
231
290
  for (let start = 0; start < missing.length; start += IDS_PER_REQUEST) {
232
291
  const ids = missing.slice(start, start + IDS_PER_REQUEST);
233
292
  const request = fetch(`${this.endpoint}/search?ids=${ids.join(",")}&limit=${ids.length}`).then((response) => {
@@ -256,24 +315,37 @@ var PanoramaxDataProvider = class extends DataProviderBase {
256
315
  const [width, height] = panoramaxViewerSize(item);
257
316
  const spherical = isPanoramaxItemSpherical(item);
258
317
  const properties = item.properties ?? {};
259
- const none = { id: "", url: "" };
318
+ const none = {
319
+ id: "",
320
+ url: ""
321
+ };
260
322
  return {
261
323
  id: item.id,
262
- geometry: { lat, lng },
263
- sequence: { id: `${SEQUENCE_PREFIX}${item.id}` },
324
+ geometry: {
325
+ lat,
326
+ lng
327
+ },
328
+ sequence: {
329
+ id: `${SEQUENCE_PREFIX}${item.id}`
330
+ },
264
331
  altitude: 0,
265
332
  camera_type: spherical ? "spherical" : "perspective",
266
333
  camera_parameters: spherical ? [] : [panoramaxItemFocal(item), 0, 0],
267
334
  captured_at: Date.parse(properties.datetime ?? "") || 0,
268
335
  compass_angle: properties["view:azimuth"] ?? 0,
269
336
  cluster: none,
270
- creator: { id: "", username: properties["geovisio:producer"] ?? "" },
337
+ creator: {
338
+ id: "",
339
+ username: properties["geovisio:producer"] ?? ""
340
+ },
271
341
  // Panoramax serves its pictures upright.
272
342
  exif_orientation: 1,
273
343
  width,
274
344
  height,
275
345
  mesh: none,
276
- owner: { id: "" },
346
+ owner: {
347
+ id: ""
348
+ },
277
349
  thumb: {
278
350
  id: item.id,
279
351
  url: panoramaxItemImageUrl(item)
@@ -281,13 +353,16 @@ var PanoramaxDataProvider = class extends DataProviderBase {
281
353
  };
282
354
  }
283
355
  };
284
- var PanoramaxPanel = ({
285
- photo,
286
- onPhotoSelected,
287
- onEaseMapToPoint,
288
- onViewerPhoto,
289
- hideAttribution = false
290
- }) => {
356
+ var PanoramaxPanel = (t0) => {
357
+ const $ = c(25);
358
+ const {
359
+ photo,
360
+ onPhotoSelected,
361
+ onEaseMapToPoint,
362
+ onViewerPhoto,
363
+ hideAttribution: t1
364
+ } = t0;
365
+ const hideAttribution = t1 === void 0 ? false : t1;
291
366
  const containerRef = useRef(null);
292
367
  const viewerRef = useRef(null);
293
368
  const navigableRef = useRef(false);
@@ -300,19 +375,40 @@ var PanoramaxPanel = ({
300
375
  const [shownPhoto, setShownPhoto] = useState(null);
301
376
  const emitPhotoSelected = useEffectEvent(onPhotoSelected);
302
377
  const emitEaseMapToPoint = useEffectEvent(onEaseMapToPoint);
303
- const emitViewerPhoto = useEffectEvent(
304
- (viewerPhoto) => onViewerPhoto?.(viewerPhoto)
305
- );
306
- useEffect(
307
- function resetViewerStoreOnProviderChange() {
378
+ let t2;
379
+ if ($[0] !== onViewerPhoto) {
380
+ t2 = (viewerPhoto) => onViewerPhoto?.(viewerPhoto);
381
+ $[0] = onViewerPhoto;
382
+ $[1] = t2;
383
+ } else {
384
+ t2 = $[1];
385
+ }
386
+ const emitViewerPhoto = useEffectEvent(t2);
387
+ let t3;
388
+ if ($[2] !== actions) {
389
+ t3 = function resetViewerStoreOnProviderChange() {
308
390
  return () => {
309
391
  actions.reset();
310
392
  };
311
- },
312
- [actions, photo.providerId]
313
- );
314
- useEffect(
315
- function mountViewer() {
393
+ };
394
+ $[2] = actions;
395
+ $[3] = t3;
396
+ } else {
397
+ t3 = $[3];
398
+ }
399
+ let t4;
400
+ if ($[4] !== actions || $[5] !== photo.providerId) {
401
+ t4 = [actions, photo.providerId];
402
+ $[4] = actions;
403
+ $[5] = photo.providerId;
404
+ $[6] = t4;
405
+ } else {
406
+ t4 = $[6];
407
+ }
408
+ useEffect(t3, t4);
409
+ let t5;
410
+ if ($[7] !== actions || $[8] !== emitEaseMapToPoint || $[9] !== emitPhotoSelected || $[10] !== emitViewerPhoto) {
411
+ t5 = function mountViewer() {
316
412
  const container = containerRef.current;
317
413
  if (!container) {
318
414
  return;
@@ -325,12 +421,19 @@ var PanoramaxPanel = ({
325
421
  dataProvider,
326
422
  imageId: initialPhotoIdRef.current,
327
423
  component: {
328
- // The attribution of the viewer links to mapillary.com.
329
424
  attribution: false,
330
- // Load only the direct neighbours ahead.
331
- cache: { depth: { sequence: 1, spherical: 0, step: 0, turn: 0 } },
425
+ cache: {
426
+ depth: {
427
+ sequence: 1,
428
+ spherical: 0,
429
+ step: 0,
430
+ turn: 0
431
+ }
432
+ },
332
433
  cover: false,
333
- sequence: { visible: true }
434
+ sequence: {
435
+ visible: true
436
+ }
334
437
  }
335
438
  });
336
439
  viewerRef.current = viewer;
@@ -341,8 +444,7 @@ var PanoramaxPanel = ({
341
444
  return;
342
445
  }
343
446
  pendingImageIdRef.current = null;
344
- void viewer.moveTo(pendingId).catch(() => {
345
- });
447
+ viewer.moveTo(pendingId).catch(_temp);
346
448
  };
347
449
  const onNavigable = (event) => {
348
450
  navigableRef.current = event.navigable;
@@ -350,40 +452,47 @@ var PanoramaxPanel = ({
350
452
  flushPendingMove();
351
453
  }
352
454
  };
353
- const onImage = (event) => {
354
- const { image } = event;
455
+ const onImage = (event_0) => {
456
+ const {
457
+ image
458
+ } = event_0;
355
459
  lastViewerPhotoIdRef.current = image.id;
356
460
  const item = dataProvider.getItem(image.id);
357
461
  if (!item) {
358
462
  return;
359
463
  }
360
- const viewerPhoto = panoramaxPhotoFromItem(item);
464
+ const viewerPhoto_0 = panoramaxPhotoFromItem(item);
361
465
  emitPhotoSelected({
362
466
  provider: "panoramax",
363
- sequenceId: viewerPhoto.sequenceId ?? `photo:${image.id}`,
467
+ sequenceId: viewerPhoto_0.sequenceId ?? `photo:${image.id}`,
364
468
  photoId: image.id
365
469
  });
366
- setShownPhoto(viewerPhoto);
367
- emitViewerPhoto(viewerPhoto);
470
+ setShownPhoto(viewerPhoto_0);
471
+ emitViewerPhoto(viewerPhoto_0);
368
472
  actions.setPov({
369
- lngLat: viewerPhoto.lngLat,
370
- ...!viewerPhoto.isPano && viewerPhoto.heading != null ? { bearing: viewerPhoto.heading } : {}
473
+ lngLat: viewerPhoto_0.lngLat,
474
+ ...!viewerPhoto_0.isPano && viewerPhoto_0.heading != null ? {
475
+ bearing: viewerPhoto_0.heading
476
+ } : {}
371
477
  });
372
- emitEaseMapToPoint(...viewerPhoto.lngLat);
478
+ emitEaseMapToPoint(...viewerPhoto_0.lngLat);
373
479
  };
374
480
  const flushBearing = () => {
375
481
  bearingRafRef.current = null;
376
482
  if (pendingBearingRef.current != null) {
377
- actions.setPov({ bearing: pendingBearingRef.current });
483
+ actions.setPov({
484
+ bearing: pendingBearingRef.current
485
+ });
378
486
  pendingBearingRef.current = null;
379
487
  }
380
- void viewer.getFieldOfView().then((fov) => {
381
- actions.setPov({ hfov: fov });
382
- }).catch(() => {
383
- });
488
+ viewer.getFieldOfView().then((fov) => {
489
+ actions.setPov({
490
+ hfov: fov
491
+ });
492
+ }).catch(_temp2);
384
493
  };
385
- const onBearing = (event) => {
386
- pendingBearingRef.current = event.bearing;
494
+ const onBearing = (event_1) => {
495
+ pendingBearingRef.current = event_1.bearing;
387
496
  if (bearingRafRef.current == null) {
388
497
  bearingRafRef.current = requestAnimationFrame(flushBearing);
389
498
  }
@@ -407,60 +516,95 @@ var PanoramaxPanel = ({
407
516
  viewer.remove();
408
517
  viewerRef.current = null;
409
518
  };
410
- },
411
- [actions]
412
- );
413
- useEffect(
414
- function syncExternalPhotoSelection() {
415
- const viewer = viewerRef.current;
416
- if (!viewer || photo.photoId === lastViewerPhotoIdRef.current) {
519
+ };
520
+ $[7] = actions;
521
+ $[8] = emitEaseMapToPoint;
522
+ $[9] = emitPhotoSelected;
523
+ $[10] = emitViewerPhoto;
524
+ $[11] = t5;
525
+ } else {
526
+ t5 = $[11];
527
+ }
528
+ let t6;
529
+ if ($[12] !== actions) {
530
+ t6 = [actions];
531
+ $[12] = actions;
532
+ $[13] = t6;
533
+ } else {
534
+ t6 = $[13];
535
+ }
536
+ useEffect(t5, t6);
537
+ let t7;
538
+ let t8;
539
+ if ($[14] !== actions || $[15] !== photo.photoId) {
540
+ t7 = function syncExternalPhotoSelection() {
541
+ const viewer_0 = viewerRef.current;
542
+ if (!viewer_0 || photo.photoId === lastViewerPhotoIdRef.current) {
417
543
  return;
418
544
  }
419
545
  actions.reset();
420
546
  lastViewerPhotoIdRef.current = photo.photoId;
421
547
  if (navigableRef.current) {
422
- void viewer.moveTo(photo.photoId).catch(() => {
423
- });
548
+ viewer_0.moveTo(photo.photoId).catch(_temp3);
424
549
  } else {
425
550
  pendingImageIdRef.current = photo.photoId;
426
551
  }
427
- },
428
- [actions, photo.photoId]
429
- );
552
+ };
553
+ t8 = [actions, photo.photoId];
554
+ $[14] = actions;
555
+ $[15] = photo.photoId;
556
+ $[16] = t7;
557
+ $[17] = t8;
558
+ } else {
559
+ t7 = $[16];
560
+ t8 = $[17];
561
+ }
562
+ useEffect(t7, t8);
430
563
  const attribution = hideAttribution ? null : shownPhoto;
431
564
  const license = attribution?.details?.license;
432
- return /* @__PURE__ */ jsxs(
433
- "div",
434
- {
435
- className: "relative min-h-48 overflow-hidden rounded-lg border border-slate-200 bg-slate-900",
436
- style: { aspectRatio: "4 / 3" },
437
- children: [
438
- /* @__PURE__ */ jsx("div", { ref: containerRef, className: "h-full w-full" }),
439
- attribution ? /* @__PURE__ */ jsxs("div", { className: "absolute right-0 bottom-0 flex gap-1.5 rounded-tl bg-black/50 px-1.5 py-0.5 text-[11px] leading-4 text-white", children: [
440
- /* @__PURE__ */ jsx(
441
- "a",
442
- {
443
- className: "underline-offset-2 hover:underline",
444
- href: providerExternalLink(attribution),
445
- rel: "noreferrer",
446
- target: "_blank",
447
- children: ["Panoramax", attribution.creatorName].filter(Boolean).join(" \xB7 ")
448
- }
449
- ),
450
- license ? attribution.details?.licenseUrl ? /* @__PURE__ */ jsx(
451
- "a",
452
- {
453
- className: "underline-offset-2 hover:underline",
454
- href: attribution.details.licenseUrl,
455
- rel: "noreferrer",
456
- target: "_blank",
457
- children: license
458
- }
459
- ) : /* @__PURE__ */ jsx("span", { children: license }) : null
460
- ] }) : null
461
- ]
462
- }
463
- );
565
+ let t10;
566
+ let t9;
567
+ if ($[18] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
568
+ t9 = {
569
+ aspectRatio: "4 / 3"
570
+ };
571
+ t10 = /* @__PURE__ */ jsx("div", { ref: containerRef, className: "h-full w-full" });
572
+ $[18] = t10;
573
+ $[19] = t9;
574
+ } else {
575
+ t10 = $[18];
576
+ t9 = $[19];
577
+ }
578
+ let t11;
579
+ if ($[20] !== attribution || $[21] !== license) {
580
+ t11 = attribution ? /* @__PURE__ */ jsxs("div", { className: "absolute right-0 bottom-0 flex gap-1.5 rounded-tl bg-black/50 px-1.5 py-0.5 text-[11px] leading-4 text-white", children: [
581
+ /* @__PURE__ */ jsx("a", { className: "underline-offset-2 hover:underline", href: providerExternalLink(attribution), rel: "noreferrer", target: "_blank", children: ["Panoramax", attribution.creatorName].filter(Boolean).join(" \xB7 ") }),
582
+ license ? attribution.details?.licenseUrl ? /* @__PURE__ */ jsx("a", { className: "underline-offset-2 hover:underline", href: attribution.details.licenseUrl, rel: "noreferrer", target: "_blank", children: license }) : /* @__PURE__ */ jsx("span", { children: license }) : null
583
+ ] }) : null;
584
+ $[20] = attribution;
585
+ $[21] = license;
586
+ $[22] = t11;
587
+ } else {
588
+ t11 = $[22];
589
+ }
590
+ let t12;
591
+ if ($[23] !== t11) {
592
+ t12 = /* @__PURE__ */ jsxs("div", { className: "relative min-h-48 overflow-hidden rounded-lg border border-slate-200 bg-slate-900", style: t9, children: [
593
+ t10,
594
+ t11
595
+ ] });
596
+ $[23] = t11;
597
+ $[24] = t12;
598
+ } else {
599
+ t12 = $[24];
600
+ }
601
+ return t12;
464
602
  };
603
+ function _temp() {
604
+ }
605
+ function _temp2() {
606
+ }
607
+ function _temp3() {
608
+ }
465
609
 
466
610
  export { PanoramaxDataProvider, PanoramaxPanel, panoramaxPhotoFromItem };
@@ -17,9 +17,29 @@ var useViewerStore = create()((set) => ({
17
17
  reset: () => set(initialState)
18
18
  }
19
19
  }));
20
- var useViewerBearing = () => useViewerStore((state) => state.bearing);
21
- var useViewerHfov = () => useViewerStore((state) => state.hfov);
22
- var useViewerLngLat = () => useViewerStore((state) => state.lngLat);
23
- var useViewerActions = () => useViewerStore((state) => state.actions);
20
+ var useViewerBearing = () => {
21
+ return useViewerStore(_temp);
22
+ };
23
+ var useViewerHfov = () => {
24
+ return useViewerStore(_temp2);
25
+ };
26
+ var useViewerLngLat = () => {
27
+ return useViewerStore(_temp3);
28
+ };
29
+ var useViewerActions = () => {
30
+ return useViewerStore(_temp4);
31
+ };
32
+ function _temp(state) {
33
+ return state.bearing;
34
+ }
35
+ function _temp2(state) {
36
+ return state.hfov;
37
+ }
38
+ function _temp3(state) {
39
+ return state.lngLat;
40
+ }
41
+ function _temp4(state) {
42
+ return state.actions;
43
+ }
24
44
 
25
45
  export { useViewerActions, useViewerBearing, useViewerHfov, useViewerLngLat };