floor-editor-ts 1.2.6 → 1.2.8

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.
@@ -5967,8 +5967,8 @@ if (typeof window !== "undefined") {
5967
5967
  //#region src/lib/stores/onboarding.svelte.ts
5968
5968
  var onboarding_svelte_exports = /* @__PURE__ */ __exportAll({
5969
5969
  TIP_MESSAGES: () => TIP_MESSAGES,
5970
+ activeTipState: () => activeTipState,
5970
5971
  dismissTip: () => dismissTip,
5971
- getActiveTip: () => getActiveTip,
5972
5972
  markTipSeen: () => markTipSeen,
5973
5973
  showTip: () => showTip,
5974
5974
  triggerTip: () => triggerTip
@@ -5994,26 +5994,23 @@ function markTipSeen(tipId) {
5994
5994
  seen.add(tipId);
5995
5995
  persist(seen);
5996
5996
  }
5997
- function getActiveTip() {
5998
- return get(_activeTip);
5999
- }
6000
5997
  /** Trigger a tip at a screen position. No-ops if already seen. */
6001
5998
  function triggerTip(tipId, x, y) {
6002
5999
  if (!showTip(tipId)) return;
6003
- set(_activeTip, {
6000
+ activeTipState.current = {
6004
6001
  id: tipId,
6005
6002
  x,
6006
6003
  y
6007
- }, true);
6004
+ };
6008
6005
  }
6009
6006
  /** Dismiss the current tip */
6010
6007
  function dismissTip() {
6011
- if (get(_activeTip)) {
6012
- markTipSeen(get(_activeTip).id);
6013
- set(_activeTip, null);
6008
+ if (activeTipState.current) {
6009
+ markTipSeen(activeTipState.current.id);
6010
+ activeTipState.current = null;
6014
6011
  }
6015
6012
  }
6016
- var STORAGE_KEY, TIP_MESSAGES, _activeTip;
6013
+ var STORAGE_KEY, TIP_MESSAGES, activeTipState;
6017
6014
  var init_onboarding_svelte = __esmMin((() => {
6018
6015
  init_client();
6019
6016
  STORAGE_KEY = "o3d_tips_seen";
@@ -6024,7 +6021,7 @@ var init_onboarding_svelte = __esmMin((() => {
6024
6021
  "first-export": "Your plan is ready! Try SVG for vector graphics or PDF for printing.",
6025
6022
  "first-door": "Click on a wall to place doors and windows."
6026
6023
  };
6027
- _activeTip = /* @__PURE__ */ state(null);
6024
+ activeTipState = proxy({ current: null });
6028
6025
  }));
6029
6026
  //#endregion
6030
6027
  //#region src/lib/stores/project.ts
@@ -59793,7 +59790,7 @@ function PropertiesPanel($$anchor, $$props) {
59793
59790
  updateDetectedRoom(get(selectedRoom).id, { name: rt.label });
59794
59791
  }
59795
59792
  }
59796
- let selectedRoomType = /* @__PURE__ */ user_derived(() => () => {
59793
+ let selectedRoomType = /* @__PURE__ */ user_derived(() => {
59797
59794
  if (!get(selectedRoom)) return "custom";
59798
59795
  const match = roomTypes.find((t) => t.label === get(selectedRoom).name);
59799
59796
  return match ? match.id : "custom";
@@ -60651,20 +60648,20 @@ function PropertiesPanel($$anchor, $$props) {
60651
60648
  reset(div_27);
60652
60649
  reset(div_26);
60653
60650
  reset(div_21);
60654
- template_effect(($0, $1) => {
60651
+ template_effect(($0) => {
60655
60652
  var _$$get$roomType, _$$get$color6;
60656
- if (select_4_value !== (select_4_value = $0)) {
60653
+ if (select_4_value !== (select_4_value = get(selectedRoomType))) {
60657
60654
  var _select_4$__value;
60658
- select_4.value = (_select_4$__value = select_4.__value = $0) !== null && _select_4$__value !== void 0 ? _select_4$__value : "", select_option(select_4, $0);
60655
+ select_4.value = (_select_4$__value = select_4.__value = get(selectedRoomType)) !== null && _select_4$__value !== void 0 ? _select_4$__value : "", select_option(select_4, get(selectedRoomType));
60659
60656
  }
60660
60657
  set_value(input_21, get(selectedRoom).name);
60661
60658
  if (select_5_value !== (select_5_value = (_$$get$roomType = get(selectedRoom).roomType) !== null && _$$get$roomType !== void 0 ? _$$get$roomType : "indoor")) {
60662
60659
  var _select_5$__value, _$$get$roomType2, _$$get$roomType3;
60663
60660
  select_5.value = (_select_5$__value = select_5.__value = (_$$get$roomType2 = get(selectedRoom).roomType) !== null && _$$get$roomType2 !== void 0 ? _$$get$roomType2 : "indoor") !== null && _select_5$__value !== void 0 ? _select_5$__value : "", select_option(select_5, (_$$get$roomType3 = get(selectedRoom).roomType) !== null && _$$get$roomType3 !== void 0 ? _$$get$roomType3 : "indoor");
60664
60661
  }
60665
- set_text(text_24, $1);
60662
+ set_text(text_24, $0);
60666
60663
  set_value(input_22, (_$$get$color6 = get(selectedRoom).color) !== null && _$$get$color6 !== void 0 ? _$$get$color6 : "#ffffff");
60667
- }, [() => get(selectedRoomType)(), () => formatArea(get(selectedRoom).area, get(settings).units)]);
60664
+ }, [() => formatArea(get(selectedRoom).area, get(settings).units)]);
60668
60665
  delegated("change", select_4, onRoomType);
60669
60666
  delegated("input", input_21, onRoomName);
60670
60667
  delegated("change", select_5, (e) => {
@@ -62029,34 +62026,25 @@ function getHeatmapColor(t, alpha = 1) {
62029
62026
  }
62030
62027
  return `rgba(${r}, ${g}, ${b}, ${alpha})`;
62031
62028
  }
62032
- var drawCamera = (ctx, w, d, color, heatmapMatrix, hasPerson = false, showHeatmap = false, showCameraCones = false, highlighted = false) => {
62029
+ var MAX_CONE_RANGE_PX = 220;
62030
+ var drawCamera = (ctx, w, d, color, heatmapMatrix, hasPerson = false, showHeatmap = false, drawCone = false, highlighted = false) => {
62033
62031
  const bodyRadius = 4;
62034
62032
  const lensR = Math.min(w, d) * .25;
62035
- const range = Math.max(w, d) * 6;
62036
62033
  const fov = Math.PI / 2;
62037
- if (showHeatmap || showCameraCones) {
62034
+ if (drawCone) {
62038
62035
  ctx.save();
62039
- const coneGradient = ctx.createRadialGradient(0, 0, 0, 0, 0, range);
62040
- const innerAlpha = highlighted ? "88" : showHeatmap ? "55" : "22";
62041
- const midAlpha = highlighted ? "55" : showHeatmap ? "22" : "11";
62042
- coneGradient.addColorStop(0, color + innerAlpha);
62043
- coneGradient.addColorStop(.45, color + midAlpha);
62044
- coneGradient.addColorStop(1, color + "00");
62045
- ctx.fillStyle = coneGradient;
62046
- ctx.globalCompositeOperation = "lighter";
62036
+ const range = Math.min(Math.max(w, d) * 6, MAX_CONE_RANGE_PX);
62037
+ ctx.globalAlpha = highlighted ? .28 : showHeatmap ? .22 : .14;
62038
+ ctx.fillStyle = highlighted ? "#fbbf24" : color;
62047
62039
  ctx.beginPath();
62048
62040
  ctx.moveTo(0, 0);
62049
62041
  ctx.arc(0, 0, range, -fov / 2, fov / 2);
62050
62042
  ctx.closePath();
62051
62043
  ctx.fill();
62052
62044
  if (highlighted) {
62045
+ ctx.globalAlpha = .85;
62053
62046
  ctx.strokeStyle = "#fbbf24";
62054
- ctx.lineWidth = 2.5;
62055
- ctx.globalCompositeOperation = "source-over";
62056
- ctx.beginPath();
62057
- ctx.moveTo(0, 0);
62058
- ctx.arc(0, 0, range, -fov / 2, fov / 2);
62059
- ctx.closePath();
62047
+ ctx.lineWidth = 2;
62060
62048
  ctx.stroke();
62061
62049
  }
62062
62050
  ctx.restore();
@@ -62155,12 +62143,12 @@ var iconDrawers = {
62155
62143
  * @param w - pixel width (catalogWidth * zoom)
62156
62144
  * @param d - pixel depth (catalogDepth * zoom)
62157
62145
  */
62158
- function drawFurnitureIcon(ctx, catalogId, w, d, color, strokeColor, heatmapMatrix, hasPerson = false, showHeatmap = false, showCameraCones = false, highlighted = false) {
62146
+ function drawFurnitureIcon(ctx, catalogId, w, d, color, strokeColor, heatmapMatrix, hasPerson = false, showHeatmap = false, drawCone = false, highlighted = false) {
62159
62147
  ctx.fillStyle = color + "60";
62160
62148
  ctx.strokeStyle = strokeColor;
62161
62149
  ctx.lineWidth = 1;
62162
62150
  const drawer = iconDrawers[catalogId];
62163
- if (drawer) drawer(ctx, w, d, color, heatmapMatrix, hasPerson, showHeatmap, showCameraCones, highlighted);
62151
+ if (drawer) drawer(ctx, w, d, color, heatmapMatrix, hasPerson, showHeatmap, drawCone, highlighted);
62164
62152
  else {
62165
62153
  roundRect(ctx, -w / 2, -d / 2, w, d, 2);
62166
62154
  ctx.fill();
@@ -63508,6 +63496,7 @@ function drawFurnitureItem(cs, item, selected, options) {
63508
63496
  const useConfigHeatmap = isCamera && highlighted && !!(options === null || options === void 0 || (_options$cameraHeatma = options.cameraHeatmapMatrix) === null || _options$cameraHeatma === void 0 ? void 0 : _options$cameraHeatma.length);
63509
63497
  const drawHeatmapMatrix = useConfigHeatmap ? options.cameraHeatmapMatrix : item.heatmapMatrix;
63510
63498
  const drawShowHeatmap = item.showHeatmap || useConfigHeatmap;
63499
+ const drawCone = isCamera && (drawShowHeatmap || highlighted || showCameraCones && selected);
63511
63500
  ctx.save();
63512
63501
  ctx.translate(s.x, s.y);
63513
63502
  ctx.rotate(angle);
@@ -63515,7 +63504,7 @@ function drawFurnitureItem(cs, item, selected, options) {
63515
63504
  const itemColor = (_item$color = item.color) !== null && _item$color !== void 0 ? _item$color : cat.color;
63516
63505
  const strokeColor = selected ? "#3b82f6" : itemColor;
63517
63506
  ctx.lineWidth = selected ? 2 : 1;
63518
- drawFurnitureIcon(ctx, item.catalogId, w, d, itemColor, strokeColor, drawHeatmapMatrix, item.hasPerson, drawShowHeatmap, isCamera ? showCameraCones : false, isCamera ? highlighted : false);
63507
+ drawFurnitureIcon(ctx, item.catalogId, w, d, itemColor, strokeColor, drawHeatmapMatrix, item.hasPerson, drawShowHeatmap, drawCone, highlighted);
63519
63508
  const fontSize = Math.max(8, Math.min(12, Math.min(w, d) * .2));
63520
63509
  if (showCameraLabels && Math.min(w, d) > 20) {
63521
63510
  var _item$name;
@@ -64751,17 +64740,30 @@ function FloorPlanCanvas($$anchor, $$props) {
64751
64740
  camY: get(camY)
64752
64741
  };
64753
64742
  }
64754
- canvasZoom.subscribe((v) => {
64755
- set(zoom, v, true);
64743
+ user_effect(() => {
64744
+ const unsubZoom = canvasZoom.subscribe((v) => {
64745
+ if (v !== get(zoom)) set(zoom, v, true);
64746
+ });
64747
+ const unsubX = canvasCamX.subscribe((v) => {
64748
+ if (v !== get(camX)) set(camX, v, true);
64749
+ });
64750
+ const unsubY = canvasCamY.subscribe((v) => {
64751
+ if (v !== get(camY)) set(camY, v, true);
64752
+ });
64753
+ return () => {
64754
+ unsubZoom();
64755
+ unsubX();
64756
+ unsubY();
64757
+ };
64756
64758
  });
64757
64759
  user_effect(() => {
64758
- canvasZoom.set(get(zoom));
64760
+ if (get$1(canvasZoom) !== get(zoom)) canvasZoom.set(get(zoom));
64759
64761
  });
64760
64762
  user_effect(() => {
64761
- canvasCamX.set(get(camX));
64763
+ if (get$1(canvasCamX) !== get(camX)) canvasCamX.set(get(camX));
64762
64764
  });
64763
64765
  user_effect(() => {
64764
- canvasCamY.set(get(camY));
64766
+ if (get$1(canvasCamY) !== get(camY)) canvasCamY.set(get(camY));
64765
64767
  });
64766
64768
  let wallStart = /* @__PURE__ */ state(null);
64767
64769
  let wallSequenceFirst = /* @__PURE__ */ state(null);
@@ -66492,1112 +66494,6 @@ function FloorPlanCanvas($$anchor, $$props) {
66492
66494
  document.removeEventListener("paste", handlePaste);
66493
66495
  };
66494
66496
  });
66495
- user_effect(() => {
66496
- if (!get(currentFloor)) return;
66497
- setInterval(() => {
66498
- markDirty();
66499
- const heatmapMatrix = [
66500
- [
66501
- 0,
66502
- 0,
66503
- 0,
66504
- 0,
66505
- 0,
66506
- 0,
66507
- 0,
66508
- 0,
66509
- 0,
66510
- 0,
66511
- 0,
66512
- 0,
66513
- 0,
66514
- 0,
66515
- 0,
66516
- 0,
66517
- 0,
66518
- 0,
66519
- 0,
66520
- 0,
66521
- 0,
66522
- 0,
66523
- 0,
66524
- 0,
66525
- 0,
66526
- 0,
66527
- 0,
66528
- 0,
66529
- 0,
66530
- 0,
66531
- 0,
66532
- 0
66533
- ],
66534
- [
66535
- 0,
66536
- 0,
66537
- 0,
66538
- 0,
66539
- 0,
66540
- 0,
66541
- 0,
66542
- 0,
66543
- 0,
66544
- 0,
66545
- 0,
66546
- 0,
66547
- 0,
66548
- 0,
66549
- 0,
66550
- 0,
66551
- 0,
66552
- 0,
66553
- 0,
66554
- 0,
66555
- 0,
66556
- 0,
66557
- 0,
66558
- 0,
66559
- 0,
66560
- 0,
66561
- 0,
66562
- 0,
66563
- 0,
66564
- 0,
66565
- 0,
66566
- 0
66567
- ],
66568
- [
66569
- 0,
66570
- 0,
66571
- 0,
66572
- 0,
66573
- 0,
66574
- 0,
66575
- 0,
66576
- 0,
66577
- 0,
66578
- 0,
66579
- 0,
66580
- 0,
66581
- 0,
66582
- 0,
66583
- 0,
66584
- 0,
66585
- 0,
66586
- 0,
66587
- 0,
66588
- 0,
66589
- 0,
66590
- 0,
66591
- 0,
66592
- 0,
66593
- 0,
66594
- 0,
66595
- 0,
66596
- 0,
66597
- 0,
66598
- 0,
66599
- 0,
66600
- 0
66601
- ],
66602
- [
66603
- 0,
66604
- 0,
66605
- 0,
66606
- 0,
66607
- 0,
66608
- 0,
66609
- 0,
66610
- 0,
66611
- 0,
66612
- 0,
66613
- 0,
66614
- 0,
66615
- 0,
66616
- 0,
66617
- 0,
66618
- 0,
66619
- 0,
66620
- 0,
66621
- 0,
66622
- 0,
66623
- 0,
66624
- 0,
66625
- 0,
66626
- 0,
66627
- 0,
66628
- 0,
66629
- 0,
66630
- 0,
66631
- 0,
66632
- 0,
66633
- 0,
66634
- 0
66635
- ],
66636
- [
66637
- 0,
66638
- 0,
66639
- 0,
66640
- 0,
66641
- 0,
66642
- 0,
66643
- 0,
66644
- 0,
66645
- 0,
66646
- 0,
66647
- 0,
66648
- 0,
66649
- 0,
66650
- 0,
66651
- 0,
66652
- 0,
66653
- 0,
66654
- 0,
66655
- 0,
66656
- 0,
66657
- 0,
66658
- 0,
66659
- 0,
66660
- 0,
66661
- 0,
66662
- 0,
66663
- 0,
66664
- 0,
66665
- 0,
66666
- 0,
66667
- 0,
66668
- 0
66669
- ],
66670
- [
66671
- 0,
66672
- 0,
66673
- 0,
66674
- 0,
66675
- 0,
66676
- 0,
66677
- 0,
66678
- 0,
66679
- 0,
66680
- 0,
66681
- 0,
66682
- 0,
66683
- 0,
66684
- 0,
66685
- 0,
66686
- 0,
66687
- 0,
66688
- 0,
66689
- 0,
66690
- 0,
66691
- 0,
66692
- 0,
66693
- 0,
66694
- 0,
66695
- 0,
66696
- 0,
66697
- 0,
66698
- 0,
66699
- 0,
66700
- 0,
66701
- 0,
66702
- 0
66703
- ],
66704
- [
66705
- 0,
66706
- 0,
66707
- 0,
66708
- 0,
66709
- 0,
66710
- 0,
66711
- 0,
66712
- 0,
66713
- 0,
66714
- 0,
66715
- 0,
66716
- 0,
66717
- 0,
66718
- 0,
66719
- 0,
66720
- 0,
66721
- 0,
66722
- 0,
66723
- 0,
66724
- 0,
66725
- 0,
66726
- 0,
66727
- 0,
66728
- 0,
66729
- 0,
66730
- 0,
66731
- 0,
66732
- 0,
66733
- 0,
66734
- 0,
66735
- 0,
66736
- 0
66737
- ],
66738
- [
66739
- 0,
66740
- 0,
66741
- 0,
66742
- 0,
66743
- 0,
66744
- 0,
66745
- 0,
66746
- 0,
66747
- 0,
66748
- 0,
66749
- 0,
66750
- 0,
66751
- .3159328774204405,
66752
- 1.4656853131421907,
66753
- 2.2380465832282233,
66754
- 1.4656853131421907,
66755
- .3159328774204405,
66756
- 0,
66757
- 0,
66758
- 0,
66759
- 0,
66760
- 0,
66761
- 0,
66762
- 0,
66763
- 0,
66764
- 0,
66765
- 0,
66766
- 0,
66767
- 0,
66768
- 0,
66769
- 0,
66770
- 0
66771
- ],
66772
- [
66773
- 0,
66774
- 0,
66775
- 0,
66776
- 0,
66777
- 0,
66778
- 0,
66779
- 0,
66780
- 0,
66781
- 0,
66782
- 0,
66783
- 0,
66784
- 0,
66785
- 1.7489495878144512,
66786
- 7.010252524548629,
66787
- 10.597011258282999,
66788
- 7.010252524548629,
66789
- 1.7489495878144512,
66790
- 0,
66791
- 0,
66792
- 0,
66793
- 0,
66794
- 0,
66795
- 0,
66796
- 0,
66797
- 0,
66798
- 0,
66799
- 0,
66800
- 0,
66801
- 0,
66802
- 0,
66803
- 0,
66804
- 0
66805
- ],
66806
- [
66807
- 0,
66808
- 0,
66809
- 0,
66810
- 0,
66811
- 0,
66812
- 0,
66813
- 0,
66814
- 0,
66815
- 0,
66816
- 0,
66817
- 0,
66818
- 0,
66819
- 3.3289241086779624,
66820
- 13.46177725998435,
66821
- 20.235236701064228,
66822
- 13.590541779525635,
66823
- 3.4380594435639265,
66824
- .00915612667564332,
66825
- 0,
66826
- 0,
66827
- 0,
66828
- 0,
66829
- 0,
66830
- 0,
66831
- 0,
66832
- 0,
66833
- 0,
66834
- 0,
66835
- 0,
66836
- 0,
66837
- 0,
66838
- 0
66839
- ],
66840
- [
66841
- 0,
66842
- 0,
66843
- 0,
66844
- 0,
66845
- 0,
66846
- 0,
66847
- 0,
66848
- 0,
66849
- 0,
66850
- 0,
66851
- 0,
66852
- 0,
66853
- 3.2148496888753932,
66854
- 13.320879325153319,
66855
- 21.57578250930066,
66856
- 16.342286624307704,
66857
- 5.569414220457003,
66858
- .6079740421039851,
66859
- 0,
66860
- 0,
66861
- 0,
66862
- 0,
66863
- 0,
66864
- 0,
66865
- 0,
66866
- 0,
66867
- 0,
66868
- 0,
66869
- 0,
66870
- 0,
66871
- 0,
66872
- 0
66873
- ],
66874
- [
66875
- 0,
66876
- 0,
66877
- 0,
66878
- 0,
66879
- 0,
66880
- 0,
66881
- 0,
66882
- 0,
66883
- 0,
66884
- 0,
66885
- 0,
66886
- 0,
66887
- 1.471089931923573,
66888
- 8.2191207324426,
66889
- 17.838951126796992,
66890
- 19.032501579269645,
66891
- 10.168729572784246,
66892
- 2.183833478003975,
66893
- 0,
66894
- 0,
66895
- 0,
66896
- 0,
66897
- 0,
66898
- 0,
66899
- 0,
66900
- 0,
66901
- 0,
66902
- 0,
66903
- 0,
66904
- 0,
66905
- 0,
66906
- 0
66907
- ],
66908
- [
66909
- 0,
66910
- 0,
66911
- 0,
66912
- 0,
66913
- 0,
66914
- 0,
66915
- 0,
66916
- 0,
66917
- 0,
66918
- 0,
66919
- 0,
66920
- 0,
66921
- .30224323366570666,
66922
- 4.469359740497559,
66923
- 14.670431219686673,
66924
- 20.333387296969498,
66925
- 13.054592947321611,
66926
- 3.1902302512972374,
66927
- 0,
66928
- 0,
66929
- 0,
66930
- 0,
66931
- 0,
66932
- 0,
66933
- 0,
66934
- 0,
66935
- 0,
66936
- 0,
66937
- 0,
66938
- 0,
66939
- 0,
66940
- 0
66941
- ],
66942
- [
66943
- 0,
66944
- 0,
66945
- 0,
66946
- 0,
66947
- 0,
66948
- 0,
66949
- 0,
66950
- .8712958885928778,
66951
- 4.101109796621668,
66952
- 7.049595450791787,
66953
- 6.013717307819157,
66954
- 2.4950259463993585,
66955
- .44436828921160365,
66956
- 2.3964385376201838,
66957
- 8.995383597734405,
66958
- 13.185675552510842,
66959
- 8.716708041551543,
66960
- 2.1623510704265803,
66961
- 0,
66962
- 0,
66963
- 0,
66964
- 0,
66965
- 0,
66966
- 0,
66967
- 0,
66968
- 0,
66969
- 0,
66970
- 0,
66971
- 0,
66972
- 0,
66973
- 0,
66974
- 0
66975
- ],
66976
- [
66977
- 0,
66978
- 0,
66979
- 0,
66980
- 0,
66981
- 0,
66982
- 0,
66983
- 0,
66984
- 3.62130425013895,
66985
- 16.246445581668944,
66986
- 28.185625524032776,
66987
- 24.0135529219635,
66988
- 9.834207494427838,
66989
- 1.5755845092412992,
66990
- .7273170478700652,
66991
- 2.61589141718046,
66992
- 3.749571783336128,
66993
- 2.426392038976114,
66994
- .5824057586549773,
66995
- 0,
66996
- 0,
66997
- 0,
66998
- 0,
66999
- 0,
67000
- 0,
67001
- 0,
67002
- 0,
67003
- .5421635625869271,
67004
- 2.2065200861983407,
67005
- 3.342547381956746,
67006
- 2.2065200861983407,
67007
- .5421635625869271,
67008
- 0
67009
- ],
67010
- [
67011
- 0,
67012
- 0,
67013
- 0,
67014
- 0,
67015
- 0,
67016
- 0,
67017
- 0,
67018
- 5.549901318362378,
67019
- 24.32853931235515,
67020
- 42.36138150541803,
67021
- 35.94102328030143,
67022
- 14.818839539693103,
67023
- 2.3194161353148814,
67024
- .05101033364693949,
67025
- .16491621404182252,
67026
- .1777607033571859,
67027
- .12032812505256472,
67028
- .017569266904996134,
67029
- 0,
67030
- 0,
67031
- 0,
67032
- 0,
67033
- 0,
67034
- 0,
67035
- 0,
67036
- 0,
67037
- 2.9576258950346093,
67038
- 11.84562175292669,
67039
- 17.787556061594508,
67040
- 11.84562175292669,
67041
- 2.9576258950346093,
67042
- 0
67043
- ],
67044
- [
67045
- 0,
67046
- 0,
67047
- 0,
67048
- 0,
67049
- 0,
67050
- 0,
67051
- 0,
67052
- 3.62130425013895,
67053
- 16.246445581668944,
67054
- 28.185625524032776,
67055
- 24.0135529219635,
67056
- 9.834207494427838,
67057
- 1.5309964202520414,
67058
- 0,
67059
- 0,
67060
- 0,
67061
- 0,
67062
- 0,
67063
- 0,
67064
- 0,
67065
- 0,
67066
- 0,
67067
- 0,
67068
- 0,
67069
- 0,
67070
- 0,
67071
- 6.348491293238841,
67072
- 25.309150516517526,
67073
- 37.96250650263207,
67074
- 25.309150516517526,
67075
- 6.348491293238841,
67076
- 0
67077
- ],
67078
- [
67079
- 0,
67080
- 0,
67081
- 0,
67082
- 0,
67083
- .32082320386030533,
67084
- 1.2199857338206974,
67085
- 1.8460462046420483,
67086
- 2.1325554284523793,
67087
- 4.379383234527166,
67088
- 7.049595450791787,
67089
- 6.013717307819157,
67090
- 2.4950259463993585,
67091
- .3886331779750314,
67092
- 0,
67093
- 0,
67094
- 0,
67095
- 0,
67096
- 0,
67097
- 0,
67098
- 0,
67099
- 0,
67100
- 0,
67101
- 0,
67102
- 0,
67103
- 0,
67104
- 0,
67105
- 6.723278406098134,
67106
- 26.889274492038524,
67107
- 40.34693760289919,
67108
- 26.889274492038524,
67109
- 6.723278406098134,
67110
- 0
67111
- ],
67112
- [
67113
- 0,
67114
- 0,
67115
- 0,
67116
- 0,
67117
- 2.2804956914871695,
67118
- 8.96059158937199,
67119
- 13.408676109914708,
67120
- 8.96059158937199,
67121
- 2.2804956914871695,
67122
- 0,
67123
- 0,
67124
- 0,
67125
- 0,
67126
- 0,
67127
- 0,
67128
- 0,
67129
- 0,
67130
- 0,
67131
- 0,
67132
- 0,
67133
- 0,
67134
- 0,
67135
- 0,
67136
- 0,
67137
- 0,
67138
- 0,
67139
- 3.610311889272976,
67140
- 14.18903058720386,
67141
- 21.35656319734618,
67142
- 15.52310871608614,
67143
- 8.830853849884093,
67144
- 7.821632516665724
67145
- ],
67146
- [
67147
- 0,
67148
- 0,
67149
- 0,
67150
- 0,
67151
- 5.861518314504249,
67152
- 23.379493778146163,
67153
- 35.09863018520233,
67154
- 23.379493778146163,
67155
- 5.861518314504249,
67156
- 0,
67157
- 0,
67158
- 0,
67159
- 0,
67160
- 0,
67161
- 0,
67162
- 0,
67163
- 0,
67164
- 0,
67165
- 0,
67166
- 0,
67167
- 0,
67168
- 0,
67169
- 0,
67170
- 0,
67171
- 0,
67172
- 0,
67173
- .7400359281404749,
67174
- 3.0082191313345596,
67175
- 4.511243556428142,
67176
- 8.25225708991524,
67177
- 21.61113659978852,
67178
- 31.371979438413785
67179
- ],
67180
- [
67181
- 0,
67182
- 0,
67183
- 0,
67184
- 0,
67185
- 7.243115248642567,
67186
- 28.906850697487346,
67187
- 43.39219038599119,
67188
- 28.906850697487346,
67189
- 7.243115248642567,
67190
- 0,
67191
- 0,
67192
- 0,
67193
- 0,
67194
- 0,
67195
- 0,
67196
- 0,
67197
- 0,
67198
- 0,
67199
- 0,
67200
- 0,
67201
- 0,
67202
- 0,
67203
- 0,
67204
- 0,
67205
- 0,
67206
- 0,
67207
- 0,
67208
- 0,
67209
- 0,
67210
- 7.821632516665724,
67211
- 31.371979438413785,
67212
- 46.96473075085739
67213
- ],
67214
- [
67215
- 0,
67216
- 0,
67217
- 0,
67218
- 0,
67219
- 4.32482477999109,
67220
- 17.186780480887943,
67221
- 25.8249366255257,
67222
- 17.186780480887943,
67223
- 4.32482477999109,
67224
- 0,
67225
- 0,
67226
- 0,
67227
- 0,
67228
- 0,
67229
- 0,
67230
- 0,
67231
- 0,
67232
- 0,
67233
- 0,
67234
- 0,
67235
- 0,
67236
- 0,
67237
- 0,
67238
- 0,
67239
- 0,
67240
- 0,
67241
- 0,
67242
- 0,
67243
- 0,
67244
- 5.226011941752098,
67245
- 20.827286571029607,
67246
- 31.371979438413785
67247
- ],
67248
- [
67249
- 0,
67250
- 0,
67251
- 0,
67252
- 0,
67253
- 1.0111655316014927,
67254
- 3.9864631299897444,
67255
- 5.981469083020068,
67256
- 3.9864631299897444,
67257
- 1.0111655316014927,
67258
- 0,
67259
- 0,
67260
- 0,
67261
- 0,
67262
- 0,
67263
- 0,
67264
- 0,
67265
- 0,
67266
- 0,
67267
- 0,
67268
- 0,
67269
- 0,
67270
- 0,
67271
- 0,
67272
- 0,
67273
- 0,
67274
- 0,
67275
- 0,
67276
- 0,
67277
- 0,
67278
- 1.386066255607005,
67279
- 5.226011941752098,
67280
- 7.821632516665724
67281
- ],
67282
- [
67283
- 0,
67284
- 0,
67285
- 0,
67286
- 0,
67287
- 0,
67288
- 0,
67289
- 0,
67290
- 0,
67291
- 0,
67292
- 0,
67293
- 0,
67294
- 0,
67295
- 0,
67296
- 0,
67297
- 0,
67298
- 0,
67299
- 0,
67300
- 0,
67301
- 0,
67302
- 0,
67303
- 0,
67304
- 0,
67305
- 0,
67306
- 0,
67307
- 0,
67308
- 0,
67309
- 0,
67310
- 0,
67311
- 0,
67312
- 0,
67313
- 0,
67314
- 0
67315
- ],
67316
- [
67317
- 0,
67318
- 0,
67319
- 0,
67320
- 0,
67321
- 0,
67322
- 0,
67323
- 0,
67324
- 0,
67325
- 0,
67326
- .05458070912699062,
67327
- .15528137571229708,
67328
- .15187574183847025,
67329
- .06974200470241036,
67330
- 0,
67331
- 0,
67332
- 0,
67333
- 0,
67334
- 0,
67335
- 0,
67336
- 0,
67337
- 0,
67338
- 0,
67339
- 0,
67340
- 0,
67341
- 0,
67342
- 0,
67343
- 0,
67344
- 0,
67345
- 0,
67346
- 0,
67347
- 0,
67348
- 0
67349
- ],
67350
- [
67351
- 0,
67352
- 0,
67353
- 0,
67354
- 0,
67355
- 0,
67356
- 0,
67357
- 0,
67358
- 0,
67359
- .05458070912699062,
67360
- .2755754209878876,
67361
- .5707063337010662,
67362
- .5838714443792508,
67363
- .31029220828859827,
67364
- .06974200470241036,
67365
- 0,
67366
- 0,
67367
- 0,
67368
- 0,
67369
- .02805561155784787,
67370
- .8189018232615914,
67371
- 2.5324966794862513,
67372
- 3.4377154290206784,
67373
- 2.1308395665461624,
67374
- .4650594240098488,
67375
- 0,
67376
- 0,
67377
- 0,
67378
- 0,
67379
- 0,
67380
- 0,
67381
- 0,
67382
- 0
67383
- ],
67384
- [
67385
- 0,
67386
- 0,
67387
- 0,
67388
- 0,
67389
- 0,
67390
- 0,
67391
- 0,
67392
- 0,
67393
- .08553937100988673,
67394
- .41228986725093814,
67395
- .8529789776313961,
67396
- .8882858218170526,
67397
- .46357739910366025,
67398
- .0972950327114796,
67399
- 0,
67400
- 0,
67401
- 0,
67402
- 0,
67403
- .3532485267308754,
67404
- 3.499619222062779,
67405
- 10.427637306724009,
67406
- 13.795863309244472,
67407
- 8.56406987933662,
67408
- 2.084587966363261,
67409
- 0,
67410
- 0,
67411
- 0,
67412
- 0,
67413
- 0,
67414
- 0,
67415
- 0,
67416
- 0
67417
- ],
67418
- [
67419
- 0,
67420
- 0,
67421
- 0,
67422
- 0,
67423
- 0,
67424
- 0,
67425
- 0,
67426
- 0,
67427
- .05458070912699062,
67428
- .2755754209878876,
67429
- .5707063337010662,
67430
- .5838714443792508,
67431
- .31029220828859827,
67432
- .06974200470241036,
67433
- 0,
67434
- 0,
67435
- 0,
67436
- .049318035756509136,
67437
- 1.0607933641418696,
67438
- 6.758563725967109,
67439
- 17.660755342385897,
67440
- 21.973928874871856,
67441
- 13.201476985075344,
67442
- 3.101022144002237,
67443
- 0,
67444
- 0,
67445
- 0,
67446
- 0,
67447
- 0,
67448
- 0,
67449
- 0,
67450
- 0
67451
- ],
67452
- [
67453
- 0,
67454
- 0,
67455
- 0,
67456
- 0,
67457
- 0,
67458
- 0,
67459
- 0,
67460
- 0,
67461
- 0,
67462
- .05458070912699062,
67463
- .15528137571229708,
67464
- .15187574183847025,
67465
- .06974200470241036,
67466
- 0,
67467
- 0,
67468
- 0,
67469
- .08786109582645688,
67470
- .7046356886390628,
67471
- 3.0107989977663894,
67472
- 9.51274060076616,
67473
- 17.749511390220455,
67474
- 18.26171939391789,
67475
- 9.630263523792657,
67476
- 2.084587966363261,
67477
- 0,
67478
- 0,
67479
- 0,
67480
- 0,
67481
- 0,
67482
- 0,
67483
- 0,
67484
- 0
67485
- ],
67486
- [
67487
- 0,
67488
- 0,
67489
- 0,
67490
- 0,
67491
- 0,
67492
- 0,
67493
- 0,
67494
- 0,
67495
- 0,
67496
- 0,
67497
- 0,
67498
- 0,
67499
- 1.7382367811803743,
67500
- 6.78625235876699,
67501
- 10.215056932817292,
67502
- 7.28439193353878,
67503
- 3.243933616660711,
67504
- 3.1636969367350174,
67505
- 6.726890242944553,
67506
- 11.793933219797037,
67507
- 14.018480108478876,
67508
- 9.836469200652415,
67509
- 3.565238303086889,
67510
- .4650594240098488,
67511
- 0,
67512
- 0,
67513
- 0,
67514
- 0,
67515
- 0,
67516
- 0,
67517
- 0,
67518
- 0
67519
- ],
67520
- [
67521
- 0,
67522
- 0,
67523
- 0,
67524
- 0,
67525
- 0,
67526
- 0,
67527
- 0,
67528
- 0,
67529
- 0,
67530
- 0,
67531
- 0,
67532
- 0,
67533
- 6.6983617356443,
67534
- 26.99436500222664,
67535
- 41.353519873356255,
67536
- 29.282163948524662,
67537
- 11.3741195154941,
67538
- 7.413346519620399,
67539
- 10.283468040894338,
67540
- 11.90128859290927,
67541
- 9.570529949946668,
67542
- 4.526681935693334,
67543
- .8914940911015187,
67544
- 0,
67545
- 0,
67546
- 0,
67547
- 0,
67548
- 0,
67549
- 0,
67550
- 0,
67551
- 0,
67552
- 0
67553
- ],
67554
- [
67555
- 0,
67556
- 0,
67557
- 0,
67558
- 0,
67559
- 0,
67560
- 0,
67561
- 0,
67562
- 0,
67563
- 0,
67564
- 0,
67565
- 0,
67566
- 0,
67567
- 10.047028886051624,
67568
- 40.69152763227778,
67569
- 61.87097958316954,
67570
- 44.034938408633856,
67571
- 16.762310030892145,
67572
- 9.760527430556891,
67573
- 11.69769115898553,
67574
- 11.007073791008297,
67575
- 7.176097387403954,
67576
- 2.7361326724525514,
67577
- .505476251361877,
67578
- 0,
67579
- 0,
67580
- 0,
67581
- 0,
67582
- 0,
67583
- 0,
67584
- 0,
67585
- 0,
67586
- 0
67587
- ]
67588
- ];
67589
- set(currentFloor, {
67590
- ...get(currentFloor),
67591
- furniture: get(currentFloor).furniture.map((item) => {
67592
- if (item.catalogId === "camera") return {
67593
- ...item,
67594
- heatmapMatrix
67595
- };
67596
- return item;
67597
- })
67598
- }, true);
67599
- }, 5e3);
67600
- });
67601
66497
  /** Compute world bounding box of all elements */
67602
66498
  function getWorldBBox() {
67603
66499
  if (!get(currentFloor)) return null;
@@ -70681,11 +69577,10 @@ init_onboarding_svelte();
70681
69577
  var root_1 = /* @__PURE__ */ from_html(`<div class="fixed z-[9999] pointer-events-auto"><div><p class="mb-2"> </p> <button class="text-xs font-medium px-3 py-1 rounded-lg bg-blue-500 hover:bg-blue-400 transition-colors">Got it</button></div></div>`);
70682
69578
  function OnboardingTooltip($$anchor, $$props) {
70683
69579
  push($$props, true);
70684
- let tip = /* @__PURE__ */ user_derived(getActiveTip);
70685
69580
  let visible = /* @__PURE__ */ state(false);
70686
69581
  let autoTimer = null;
70687
69582
  user_effect(() => {
70688
- if (get(tip)) {
69583
+ if (activeTipState.current) {
70689
69584
  set(visible, false);
70690
69585
  requestAnimationFrame(() => {
70691
69586
  set(visible, true);
@@ -70705,6 +69600,7 @@ function OnboardingTooltip($$anchor, $$props) {
70705
69600
  var fragment = comment();
70706
69601
  var node = first_child(fragment);
70707
69602
  var consequent = ($$anchor) => {
69603
+ const tip = /* @__PURE__ */ user_derived(() => activeTipState.current);
70708
69604
  const msg = /* @__PURE__ */ user_derived(() => TIP_MESSAGES[get(tip).id]);
70709
69605
  const clampedX = /* @__PURE__ */ user_derived(() => Math.min(get(tip).x, (typeof window !== "undefined" ? window.innerWidth : 1200) - 320));
70710
69606
  const clampedY = /* @__PURE__ */ user_derived(() => Math.min(get(tip).y, (typeof window !== "undefined" ? window.innerHeight : 800) - 100));
@@ -70734,7 +69630,7 @@ function OnboardingTooltip($$anchor, $$props) {
70734
69630
  append($$anchor, div);
70735
69631
  };
70736
69632
  if_block(node, ($$render) => {
70737
- if (get(tip)) $$render(consequent);
69633
+ if (activeTipState.current) $$render(consequent);
70738
69634
  });
70739
69635
  append($$anchor, fragment);
70740
69636
  pop();