floor-editor-ts 1.4.5 → 1.4.7
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/floor-editor.es.js +520 -360
- package/dist/floor-editor.es.js.map +1 -1
- package/package.json +1 -1
package/dist/floor-editor.es.js
CHANGED
|
@@ -10706,7 +10706,7 @@ function drawWindowDistanceDimensions(cs, wall, window, dimSettings) {
|
|
|
10706
10706
|
}
|
|
10707
10707
|
}
|
|
10708
10708
|
function drawFurnitureItem(cs, item, selected, options) {
|
|
10709
|
-
var _item$scale$x, _item$scale, _item$scale$y, _item$scale2, _item$width, _item$depth, _options$
|
|
10709
|
+
var _item$scale$x, _item$scale, _item$scale$y, _item$scale2, _item$width, _item$depth, _options$showCameraLa, _options$cameraHeatma, _item$color;
|
|
10710
10710
|
const { ctx, zoom } = cs;
|
|
10711
10711
|
const cat = getCatalogItem(item.catalogId);
|
|
10712
10712
|
if (!cat) return;
|
|
@@ -10717,13 +10717,13 @@ function drawFurnitureItem(cs, item, selected, options) {
|
|
|
10717
10717
|
const d = ((_item$depth = item.depth) !== null && _item$depth !== void 0 ? _item$depth : cat.depth) * Math.abs(sy) * zoom;
|
|
10718
10718
|
const angle = item.rotation * Math.PI / 180;
|
|
10719
10719
|
const highlighted = !!((options === null || options === void 0 ? void 0 : options.selectedCameraSerial) && item.serial && item.serial === options.selectedCameraSerial);
|
|
10720
|
-
|
|
10720
|
+
options === null || options === void 0 || options.showCameraCones;
|
|
10721
10721
|
const showCameraLabels = (_options$showCameraLa = options === null || options === void 0 ? void 0 : options.showCameraLabels) !== null && _options$showCameraLa !== void 0 ? _options$showCameraLa : true;
|
|
10722
10722
|
const isCamera = item.catalogId === "camera";
|
|
10723
10723
|
const useConfigHeatmap = isCamera && highlighted && !!(options === null || options === void 0 || (_options$cameraHeatma = options.cameraHeatmapMatrix) === null || _options$cameraHeatma === void 0 ? void 0 : _options$cameraHeatma.length);
|
|
10724
10724
|
const drawHeatmapMatrix = useConfigHeatmap ? options.cameraHeatmapMatrix : item.heatmapMatrix;
|
|
10725
10725
|
const drawShowHeatmap = item.showHeatmap || useConfigHeatmap;
|
|
10726
|
-
const drawCone = isCamera &&
|
|
10726
|
+
const drawCone = isCamera && selected;
|
|
10727
10727
|
ctx.save();
|
|
10728
10728
|
ctx.translate(s.x, s.y);
|
|
10729
10729
|
ctx.rotate(angle);
|
|
@@ -11325,20 +11325,19 @@ function drawZones(cs, floor, selectedZoneId) {
|
|
|
11325
11325
|
function drawZoneDraft(cs, points, color, closed, cursor) {
|
|
11326
11326
|
if (!points.length && !cursor) return;
|
|
11327
11327
|
const { ctx, zoom } = cs;
|
|
11328
|
-
const pts = [...points];
|
|
11329
|
-
if (cursor) pts.push(cursor);
|
|
11330
11328
|
ctx.save();
|
|
11331
11329
|
ctx.strokeStyle = color;
|
|
11332
11330
|
ctx.fillStyle = hexToRgba(color, .12);
|
|
11333
|
-
ctx.lineWidth = 2;
|
|
11331
|
+
ctx.lineWidth = 2.5;
|
|
11334
11332
|
ctx.lineJoin = "round";
|
|
11335
|
-
ctx.
|
|
11336
|
-
if (
|
|
11333
|
+
ctx.lineCap = "round";
|
|
11334
|
+
if (points.length >= 2) {
|
|
11335
|
+
ctx.setLineDash([]);
|
|
11337
11336
|
ctx.beginPath();
|
|
11338
|
-
const first = wts(cs,
|
|
11337
|
+
const first = wts(cs, points[0].x, points[0].y);
|
|
11339
11338
|
ctx.moveTo(first.x, first.y);
|
|
11340
|
-
for (let i = 1; i <
|
|
11341
|
-
const s = wts(cs,
|
|
11339
|
+
for (let i = 1; i < points.length; i++) {
|
|
11340
|
+
const s = wts(cs, points[i].x, points[i].y);
|
|
11342
11341
|
ctx.lineTo(s.x, s.y);
|
|
11343
11342
|
}
|
|
11344
11343
|
if (closed && points.length >= 3) {
|
|
@@ -11347,17 +11346,19 @@ function drawZoneDraft(cs, points, color, closed, cursor) {
|
|
|
11347
11346
|
}
|
|
11348
11347
|
ctx.stroke();
|
|
11349
11348
|
}
|
|
11350
|
-
if (!closed && cursor && points.length >=
|
|
11351
|
-
const
|
|
11352
|
-
const
|
|
11353
|
-
|
|
11349
|
+
if (!closed && cursor && points.length >= 1) {
|
|
11350
|
+
const last = points[points.length - 1];
|
|
11351
|
+
const a = wts(cs, last.x, last.y);
|
|
11352
|
+
const b = wts(cs, cursor.x, cursor.y);
|
|
11353
|
+
ctx.setLineDash([6 * Math.max(.6, zoom), 4 * Math.max(.6, zoom)]);
|
|
11354
|
+
ctx.globalAlpha = .85;
|
|
11354
11355
|
ctx.beginPath();
|
|
11355
11356
|
ctx.moveTo(a.x, a.y);
|
|
11356
11357
|
ctx.lineTo(b.x, b.y);
|
|
11357
11358
|
ctx.stroke();
|
|
11358
11359
|
ctx.globalAlpha = 1;
|
|
11360
|
+
ctx.setLineDash([]);
|
|
11359
11361
|
}
|
|
11360
|
-
ctx.setLineDash([]);
|
|
11361
11362
|
for (let i = 0; i < points.length; i++) {
|
|
11362
11363
|
const s = wts(cs, points[i].x, points[i].y);
|
|
11363
11364
|
drawVertexIndexBadge(ctx, s.x, s.y, i, color, 9);
|
|
@@ -60152,9 +60153,9 @@ var themePreference = createThemeStore();
|
|
|
60152
60153
|
init_client();
|
|
60153
60154
|
var root_2$13 = /* @__PURE__ */ from_html(`<div class="absolute bottom-0 left-0 right-0 h-0.5 bg-slate-700 dark:bg-slate-300 rounded-t"></div>`);
|
|
60154
60155
|
var root_3$12 = /* @__PURE__ */ from_html(`<div class="absolute bottom-0 left-0 right-0 h-0.5 bg-slate-700 dark:bg-slate-300 rounded-t"></div>`);
|
|
60155
|
-
var root_4$
|
|
60156
|
+
var root_4$10 = /* @__PURE__ */ from_html(`<div class="absolute bottom-0 left-0 right-0 h-0.5 bg-slate-700 dark:bg-slate-300 rounded-t"></div>`);
|
|
60156
60157
|
var root_5$8 = /* @__PURE__ */ from_html(`<div class="absolute bottom-0 left-0 right-0 h-0.5 bg-slate-700 dark:bg-slate-300 rounded-t"></div>`);
|
|
60157
|
-
var root_6$
|
|
60158
|
+
var root_6$5 = /* @__PURE__ */ from_html(`<div class="space-y-4"><label class="block"><span class="text-sm font-medium text-gray-700 dark:text-gray-300">Project Name</span> <input type="text" class="mt-1 w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-lg text-sm focus:ring-2 focus:ring-slate-500 focus:border-slate-500 outline-none bg-white dark:bg-gray-700 dark:text-gray-100" placeholder="Untitled Project"/></label> <label class="block"><span class="text-sm font-medium text-gray-700 dark:text-gray-300">Description</span> <textarea rows="3" class="mt-1 w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-lg text-sm focus:ring-2 focus:ring-slate-500 focus:border-slate-500 outline-none resize-none bg-white dark:bg-gray-700 dark:text-gray-100" placeholder="Add a description for this project..."></textarea></label></div>`);
|
|
60158
60159
|
var root_7$7 = /* @__PURE__ */ from_html(`<div class="flex items-center justify-between mb-5"><span class="text-sm font-medium text-gray-700 dark:text-gray-300">Metrics unit</span> <div class="flex rounded-lg border border-gray-300 dark:border-gray-600 overflow-hidden"><button>m, cm</button> <button>ft, inch</button></div></div> <div class="bg-gray-50 dark:bg-gray-700/50 rounded-xl divide-y divide-gray-200 dark:divide-gray-600"><label class="flex items-center justify-between px-4 py-3.5 cursor-pointer"><span class="text-sm text-gray-700">Dimensions</span> <input type="checkbox" class="w-10 h-5 rounded-full appearance-none cursor-pointer bg-gray-300 checked:bg-slate-700 relative transition-colors
|
|
60159
60160
|
before:content-[''] before:absolute before:w-4 before:h-4 before:rounded-full before:bg-white before:top-0.5 before:left-0.5 before:transition-transform checked:before:translate-x-5"/></label> <label class="flex items-center justify-between px-4 py-3.5 cursor-pointer"><span class="text-sm text-gray-700">External Dimensions</span> <input type="checkbox" class="w-10 h-5 rounded-full appearance-none cursor-pointer bg-gray-300 checked:bg-slate-700 relative transition-colors
|
|
60160
60161
|
before:content-[''] before:absolute before:w-4 before:h-4 before:rounded-full before:bg-white before:top-0.5 before:left-0.5 before:transition-transform checked:before:translate-x-5"/></label> <label class="flex items-center justify-between px-4 py-3.5 cursor-pointer"><span class="text-sm text-gray-700">Internal Dimensions</span> <input type="checkbox" class="w-10 h-5 rounded-full appearance-none cursor-pointer bg-gray-300 checked:bg-slate-700 relative transition-colors
|
|
@@ -60296,7 +60297,7 @@ function SettingsDialog($$anchor, $$props) {
|
|
|
60296
60297
|
var button_3 = sibling(button_2, 2);
|
|
60297
60298
|
var node_3 = sibling(child(button_3));
|
|
60298
60299
|
var consequent_2 = ($$anchor) => {
|
|
60299
|
-
append($$anchor, root_4$
|
|
60300
|
+
append($$anchor, root_4$10());
|
|
60300
60301
|
};
|
|
60301
60302
|
if_block(node_3, ($$render) => {
|
|
60302
60303
|
if (get(activeTab) === "appearance") $$render(consequent_2);
|
|
@@ -60315,7 +60316,7 @@ function SettingsDialog($$anchor, $$props) {
|
|
|
60315
60316
|
var div_8 = sibling(div_3, 2);
|
|
60316
60317
|
var node_5 = child(div_8);
|
|
60317
60318
|
var consequent_4 = ($$anchor) => {
|
|
60318
|
-
var div_9 = root_6$
|
|
60319
|
+
var div_9 = root_6$5();
|
|
60319
60320
|
var label_1 = child(div_9);
|
|
60320
60321
|
var input = sibling(child(label_1), 2);
|
|
60321
60322
|
remove_input_defaults(input);
|
|
@@ -60560,7 +60561,7 @@ delegate([
|
|
|
60560
60561
|
init_client();
|
|
60561
60562
|
var root_2$12 = /* @__PURE__ */ from_html(`<div class="flex items-center justify-between text-xs bg-gray-50 rounded px-2 py-1.5"><span class="text-gray-700"> <span class="text-gray-400"> </span></span> <span class="font-medium text-gray-800"> </span></div>`);
|
|
60562
60563
|
var root_1$13 = /* @__PURE__ */ from_html(`<div><h4 class="text-xs font-semibold text-gray-500 uppercase mb-1.5">By Category</h4> <div class="space-y-1"></div></div>`);
|
|
60563
|
-
var root_4$
|
|
60564
|
+
var root_4$9 = /* @__PURE__ */ from_html(`<div class="flex items-center gap-1.5 text-xs px-1 py-1"><div class="flex-1 min-w-0"><div class="flex items-center justify-between"><span class="text-gray-700 truncate"> </span> <span class="text-gray-500 ml-1 shrink-0"> </span></div> <div class="w-full bg-gray-200 rounded-full h-1 mt-0.5"><div class="bg-blue-400 h-1 rounded-full"></div></div></div> <span class="text-[10px] text-gray-400 w-8 text-right shrink-0"> </span></div>`);
|
|
60564
60565
|
var root_3$11 = /* @__PURE__ */ from_html(`<div><h4 class="text-xs font-semibold text-gray-500 uppercase mb-1.5">Room Breakdown</h4> <div class="space-y-0.5"></div></div>`);
|
|
60565
60566
|
var root_5$7 = /* @__PURE__ */ from_html(`<p class="text-xs text-gray-400 text-center py-4">No rooms detected yet.<br/>Draw walls to create rooms.</p>`);
|
|
60566
60567
|
var root$6 = /* @__PURE__ */ from_html(`<div class="space-y-3"><div class="grid grid-cols-2 gap-2"><div class="bg-blue-50 rounded-lg p-2 text-center"><div class="text-lg font-bold text-blue-700"> </div> <div class="text-[10px] text-blue-500">Rooms</div></div> <div class="bg-green-50 rounded-lg p-2 text-center"><div class="text-lg font-bold text-green-700"> </div> <div class="text-[10px] text-green-500">Total Area</div></div> <div class="bg-amber-50 rounded-lg p-2 text-center"><div class="text-sm font-bold text-amber-700"> </div> <div class="text-[10px] text-amber-500">Doors / Windows</div></div> <div class="bg-purple-50 rounded-lg p-2 text-center"><div class="text-sm font-bold text-purple-700"> </div> <div class="text-[10px] text-purple-500">Wall Length</div></div></div> <!> <!></div>`);
|
|
@@ -60711,7 +60712,7 @@ function AreaSummaryPanel($$anchor, $$props) {
|
|
|
60711
60712
|
var div_14 = sibling(child(div_13), 2);
|
|
60712
60713
|
each(div_14, 21, () => get(allRooms), index$1, ($$anchor, room) => {
|
|
60713
60714
|
const pct = /* @__PURE__ */ user_derived(() => get(totalArea) > 0 ? get(room).area / get(totalArea) * 100 : 0);
|
|
60714
|
-
var div_15 = root_4$
|
|
60715
|
+
var div_15 = root_4$9();
|
|
60715
60716
|
var div_16 = child(div_15);
|
|
60716
60717
|
var div_17 = child(div_16);
|
|
60717
60718
|
var span_3 = child(div_17);
|
|
@@ -60915,7 +60916,7 @@ function markClean() {
|
|
|
60915
60916
|
//#region src/lib/components/toolbar/VersionHistoryPanel.svelte
|
|
60916
60917
|
init_client();
|
|
60917
60918
|
var root_2$11 = /* @__PURE__ */ from_html(`<p class="text-sm text-gray-400 text-center py-8">No snapshots yet.<br/>Versions are saved automatically every 5 minutes.</p>`);
|
|
60918
|
-
var root_4$
|
|
60919
|
+
var root_4$8 = /* @__PURE__ */ from_html(`<div class="flex items-center justify-between py-2 px-2 rounded-lg hover:bg-gray-50 group transition-colors"><div class="flex-1 min-w-0"><div class="text-sm font-medium text-gray-700 truncate"> </div> <div class="text-xs text-gray-400"> </div></div> <button class="text-xs px-2.5 py-1 bg-blue-50 text-blue-600 rounded-md hover:bg-blue-100 transition-colors opacity-0 group-hover:opacity-100 font-medium shrink-0 ml-2">Restore</button></div>`);
|
|
60919
60920
|
var root_3$10 = /* @__PURE__ */ from_html(`<div class="space-y-1"></div>`);
|
|
60920
60921
|
var root_5$6 = /* @__PURE__ */ from_html(`<div class="px-4 py-2 border-t border-gray-100"><button class="text-xs text-red-400 hover:text-red-600 transition-colors">Clear all versions</button></div>`);
|
|
60921
60922
|
var root_1$12 = /* @__PURE__ */ from_html(`<div class="fixed inset-0 bg-black/40 z-50 flex items-center justify-center"><div class="bg-white rounded-xl shadow-2xl w-96 max-h-[70vh] flex flex-col"><div class="flex items-center justify-between px-4 py-3 border-b border-gray-100"><h2 class="text-sm font-semibold text-gray-800 flex items-center gap-2"><svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"></circle><polyline points="12 6 12 12 16 14"></polyline></svg> Version History</h2> <button class="text-gray-400 hover:text-gray-600 transition-colors" aria-label="Close"><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg></button></div> <div class="flex-1 overflow-y-auto px-4 py-2"><!></div> <!></div></div>`);
|
|
@@ -60970,7 +60971,7 @@ function VersionHistoryPanel($$anchor, $$props) {
|
|
|
60970
60971
|
var div_4 = root_3$10();
|
|
60971
60972
|
each(div_4, 21, () => [...get(snapshots)].reverse(), index$1, ($$anchor, snap, i) => {
|
|
60972
60973
|
const realIndex = /* @__PURE__ */ user_derived(() => get(snapshots).length - 1 - i);
|
|
60973
|
-
var div_5 = root_4$
|
|
60974
|
+
var div_5 = root_4$8();
|
|
60974
60975
|
var div_6 = child(div_5);
|
|
60975
60976
|
var div_7 = child(div_6);
|
|
60976
60977
|
var text = child(div_7, true);
|
|
@@ -61031,9 +61032,9 @@ init_client();
|
|
|
61031
61032
|
init_index_client();
|
|
61032
61033
|
init_onboarding_svelte();
|
|
61033
61034
|
var root_3$9 = /* @__PURE__ */ from_svg(`<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M8 3v3a2 2 0 0 1-2 2H3"></path><path d="M21 8h-3a2 2 0 0 1-2-2V3"></path><path d="M3 16h3a2 2 0 0 1 2 2v3"></path><path d="M16 21v-3a2 2 0 0 1 2-2h3"></path></svg>`);
|
|
61034
|
-
var root_4$
|
|
61035
|
+
var root_4$7 = /* @__PURE__ */ from_svg(`<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M8 3H5a2 2 0 0 0-2 2v3"></path><path d="M21 8V5a2 2 0 0 0-2-2h-3"></path><path d="M3 16v3a2 2 0 0 0 2 2h3"></path><path d="M16 21h3a2 2 0 0 0 2-2v-3"></path></svg>`);
|
|
61035
61036
|
var root_5$5 = /* @__PURE__ */ from_html(`<input type="text" class="bg-white/20 text-white font-semibold px-2 py-0.5 rounded border border-white/30 outline-none text-sm w-40"/>`);
|
|
61036
|
-
var root_6$
|
|
61037
|
+
var root_6$4 = /* @__PURE__ */ from_html(`<button class="font-semibold text-white text-sm hover:bg-white/10 px-2 py-0.5 rounded transition-colors" title="Click to rename"> </button>`);
|
|
61037
61038
|
var root_7$6 = /* @__PURE__ */ from_html(`<button> </button>`);
|
|
61038
61039
|
var root_8$3 = /* @__PURE__ */ from_html(`<button aria-label="Snap to Grid"><svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="3" width="7" height="7"></rect><rect x="14" y="3" width="7" height="7"></rect><rect x="14" y="14" width="7" height="7"></rect><rect x="3" y="14" width="7" height="7"></rect></svg></button>`);
|
|
61039
61040
|
var root_9$3 = /* @__PURE__ */ from_html(`<div class="flex bg-white/15 rounded-full p-0.5 shrink-0"><button title="Select mode (V)" aria-label="Select mode"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M3 3l7.07 16.97 2.51-7.39 7.39-2.51L3 3z"></path><path d="M13 13l6 6"></path></svg></button> <button title="Pan mode (H)" aria-label="Pan mode"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M18 11V6a2 2 0 0 0-4 0v1"></path><path d="M14 10V4a2 2 0 0 0-4 0v2"></path><path d="M10 10.5V6a2 2 0 0 0-4 0v8"></path><path d="M18 8a2 2 0 1 1 4 0v6a8 8 0 0 1-8 8h-2c-2.8 0-4.5-.86-5.99-2.34l-3.6-3.6a2 2 0 0 1 2.83-2.82L7 15"></path></svg></button></div>`);
|
|
@@ -61312,7 +61313,7 @@ function TopBar($$anchor, $$props) {
|
|
|
61312
61313
|
append($$anchor, root_3$9());
|
|
61313
61314
|
};
|
|
61314
61315
|
var alternate = ($$anchor) => {
|
|
61315
|
-
append($$anchor, root_4$
|
|
61316
|
+
append($$anchor, root_4$7());
|
|
61316
61317
|
};
|
|
61317
61318
|
if_block(node_1, ($$render) => {
|
|
61318
61319
|
if (get(isFullscreen)) $$render(consequent);
|
|
@@ -61329,7 +61330,7 @@ function TopBar($$anchor, $$props) {
|
|
|
61329
61330
|
append($$anchor, input_1);
|
|
61330
61331
|
};
|
|
61331
61332
|
var alternate_1 = ($$anchor) => {
|
|
61332
|
-
var button_2 = root_6$
|
|
61333
|
+
var button_2 = root_6$4();
|
|
61333
61334
|
var text_1 = child(button_2, true);
|
|
61334
61335
|
reset(button_2);
|
|
61335
61336
|
template_effect(() => set_text(text_1, get(projectName)));
|
|
@@ -62226,7 +62227,7 @@ function placeRoomTemplate(preset, origin, template, w = 400, h = 300) {
|
|
|
62226
62227
|
//#region src/lib/components/editor/UndoHistoryPanel.svelte
|
|
62227
62228
|
init_client();
|
|
62228
62229
|
var root_2$9 = /* @__PURE__ */ from_html(`<div class="px-3 py-6 text-center text-xs text-gray-400">No history yet</div>`);
|
|
62229
|
-
var root_4$
|
|
62230
|
+
var root_4$6 = /* @__PURE__ */ from_html(`<button><span class="w-5 text-[10px] text-gray-400 text-right shrink-0"></span> <span class="truncate flex-1"> </span> <span class="text-[10px] text-gray-300 shrink-0"> </span></button>`);
|
|
62230
62231
|
var root_3$8 = /* @__PURE__ */ from_html(`<div class="py-1"><!> <div><span class="w-5 text-[10px] text-gray-400 text-right shrink-0">●</span> <span class="truncate flex-1 font-medium">Current state</span></div></div>`);
|
|
62231
62232
|
var root_1$10 = /* @__PURE__ */ from_html(`<div class="fixed bottom-12 left-4 w-64 max-h-80 bg-white rounded-xl shadow-2xl border border-gray-200 z-50 flex flex-col overflow-hidden"><div class="flex items-center justify-between px-3 py-2 border-b border-gray-100 bg-gray-50"><div class="flex items-center gap-1.5"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" class="text-slate-500"><polyline points="1 4 1 10 7 10"></polyline><path d="M3.51 15a9 9 0 1 0 2.13-9.36L1 10"></path></svg> <span class="text-xs font-semibold text-slate-700">Undo History</span></div> <div class="flex items-center gap-2"><span class="text-[10px] text-slate-400"> </span> <button class="text-gray-400 hover:text-gray-600 text-sm leading-none" aria-label="Close history">✕</button></div></div> <div class="flex-1 overflow-y-auto"><!></div></div>`);
|
|
62232
62233
|
function UndoHistoryPanel($$anchor, $$props) {
|
|
@@ -62270,7 +62271,7 @@ function UndoHistoryPanel($$anchor, $$props) {
|
|
|
62270
62271
|
var div_5 = root_3$8();
|
|
62271
62272
|
var node_2 = child(div_5);
|
|
62272
62273
|
each(node_2, 17, () => get(history).entries, index$1, ($$anchor, entry, i) => {
|
|
62273
|
-
var button_1 = root_4$
|
|
62274
|
+
var button_1 = root_4$6();
|
|
62274
62275
|
let classes;
|
|
62275
62276
|
var span_1 = child(button_1);
|
|
62276
62277
|
span_1.textContent = i + 1;
|
|
@@ -62328,12 +62329,10 @@ delegate(["click"]);
|
|
|
62328
62329
|
//#region src/lib/components/sidebar/BuildPanel.svelte
|
|
62329
62330
|
init_client();
|
|
62330
62331
|
init_index_client();
|
|
62331
|
-
var root_4$6 = /* @__PURE__ */ from_html(`Click path · nhấn <strong>✓</strong> trên toolbar để đóng · 🗑 xoá`, 1);
|
|
62332
62332
|
var root_7$5 = /* @__PURE__ */ from_html(`<button draggable="true"><div class="w-9 h-9 rounded-lg bg-amber-50 flex items-center justify-center"><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="#92400e" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path></path></svg></div> <span class="text-xs font-medium text-gray-600"> </span> <span class="text-[10px] text-gray-400"> </span></button>`);
|
|
62333
62333
|
var root_8$2 = /* @__PURE__ */ from_html(`<button draggable="true"><div class="w-9 h-9 rounded-lg bg-cyan-50 flex items-center justify-center"><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="#0e7490" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="4" width="18" height="16" rx="1"></rect><line x1="12" y1="4" x2="12" y2="20"></line><line x1="3" y1="12" x2="21" y2="12"></line></svg></div> <span class="text-xs font-medium text-gray-600"> </span> <span class="text-[10px] text-gray-400"> </span></button>`);
|
|
62334
|
-
var root_6$
|
|
62335
|
-
var root_1$9 = /* @__PURE__ */ from_html(`<div class="space-y-1"><h3 class="text-xs font-semibold text-gray-400 uppercase mb-2">Tools</h3> <button><div><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M3 3l7.07 16.97 2.51-7.39 7.39-2.51L3 3z"></path><path d="M13 13l6 6"></path></svg></div> <div class="text-left"><div class="font-medium">Select <span class="text-gray-400 text-xs ml-1">V</span></div> <div class="text-xs text-gray-400">Click to select elements</div></div></button> <button><div><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="8" width="18" height="8" rx="1"></rect><line x1="7" y1="8" x2="7" y2="16"></line><line x1="12" y1="8" x2="12" y2="16"></line><line x1="17" y1="8" x2="17" y2="16"></line></svg></div> <div class="text-left"><div class="font-medium">Draw Wall <span class="text-gray-400 text-xs ml-1">W</span></div> <div class="text-xs text-gray-400">Click to draw, dbl-click to finish</div></div></button> <h3 class="text-xs font-semibold text-gray-400 uppercase mb-2 mt-3">Camera FOV</h3> <button type="button"><div><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-dasharray="3 2"><path d="M7 4 L17 6 L20 14 L12 20 L4 12 Z"></path></svg></div> <div class="text-left"><div class="font-medium">Draw
|
|
62336
|
-
Nhấn ✓ đóng polygon · 🗑 xoá. Click polygon để hiện lại toolbar.</p> <h3 class="text-xs font-semibold text-gray-400 uppercase mb-2 mt-3">Zone</h3> <div class="grid grid-cols-3 gap-1.5 mb-1"><button type="button" title="Drag to create rectangle area"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-dasharray="3 2"><rect x="4" y="6" width="16" height="12" rx="1"></rect></svg> Rect</button> <button type="button" title="Click to place triangle area"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-dasharray="3 2"><path d="M12 4 L20 19 L4 19 Z"></path></svg> Triangle</button> <button type="button" title="Click vertices; double-click or Enter to finish"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-dasharray="3 2"><path d="M7 4 L17 6 L20 14 L12 20 L4 12 Z"></path></svg> Polygon</button></div> <p class="text-[10px] text-gray-400 mb-2 px-0.5"><!></p> <h3 class="text-xs font-semibold text-gray-400 uppercase mb-2 mt-3">Structure</h3> <button><div><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M22 5h-5V2h-3v6h-4V5H7v6H2v3h5v3h3v-3h4v3h3v-6h5z"></path></svg></div> <div class="text-left"><div class="font-medium">Add Stairs</div> <div class="text-xs text-gray-400">Click to place stairs</div></div></button> <div class="flex gap-2"><button><div><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="12" cy="12" r="6"></circle><line x1="6" y1="6" x2="18" y2="18"></line><line x1="18" y1="6" x2="6" y2="18"></line></svg></div> <div class="text-left"><div class="font-medium text-xs">Round Column</div></div></button> <button><div><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><rect x="6" y="6" width="12" height="12"></rect><line x1="6" y1="6" x2="18" y2="18"></line><line x1="18" y1="6" x2="6" y2="18"></line></svg></div> <div class="text-left"><div class="font-medium text-xs">Square Column</div></div></button></div> <h3 class="text-xs font-semibold text-gray-400 uppercase mb-2 mt-3">Annotate</h3> <button><div><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M4 7V4h16v3"></path><line x1="12" y1="4" x2="12" y2="20"></line><line x1="8" y1="20" x2="16" y2="20"></line></svg></div> <div class="text-left"><div class="font-medium">Text Label</div> <div class="text-xs text-gray-400">Add text annotations (T)</div></div></button> <button><div><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"></path><line x1="16" y1="5" x2="22" y2="5"></line><line x1="19" y1="2" x2="19" y2="8"></line><line x1="3" y1="12" x2="12" y2="12"></line></svg></div> <div class="text-left"><div class="font-medium">Dimension</div> <div class="text-xs text-gray-400">Add dimension annotations (N)</div></div></button> <button><div><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M2 12h5l2-7 4 14 2-7h7"></path></svg></div> <div class="text-left"><div class="font-medium">Measure</div> <div class="text-xs text-gray-400">Measure distances (M)</div></div></button> <h3 class="text-xs font-semibold text-gray-400 uppercase mb-2 mt-3">Import</h3> <button class="w-full flex items-center gap-3 px-3 py-2.5 rounded-lg text-sm transition-colors hover:bg-gray-50 text-gray-700"><div class="w-9 h-9 rounded-lg bg-gray-100 flex items-center justify-center"><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect><circle cx="9" cy="9" r="2"></circle><path d="m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21"></path></svg></div> <div class="text-left"><div class="font-medium">Import Image</div> <div class="text-xs text-gray-400">Floor plan background</div></div></button> <button class="w-full flex items-center gap-3 px-3 py-2.5 rounded-lg text-sm transition-colors hover:bg-gray-50 text-gray-700"><div class="w-9 h-9 rounded-lg bg-gray-100 flex items-center justify-center"><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"></path><polyline points="9 22 9 12 15 12 15 22"></polyline></svg></div> <div class="text-left"><div class="font-medium">Import RoomPlan</div> <div class="text-xs text-gray-400">iOS LiDAR scan (.json/.zip)</div></div></button> <button class="w-full flex items-center justify-between px-1 py-2 mt-3"><h3 class="text-xs font-semibold text-gray-400 uppercase">Doors</h3> <span class="text-gray-400 text-xs"> </span></button> <!></div>`);
|
|
62334
|
+
var root_6$3 = /* @__PURE__ */ from_html(`<div class="grid grid-cols-2 gap-2 mb-3"></div> <h3 class="text-xs font-semibold text-gray-400 uppercase mb-2">Windows</h3> <div class="grid grid-cols-2 gap-2"></div>`, 1);
|
|
62335
|
+
var root_1$9 = /* @__PURE__ */ from_html(`<div class="space-y-1"><h3 class="text-xs font-semibold text-gray-400 uppercase mb-2">Tools</h3> <button><div><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M3 3l7.07 16.97 2.51-7.39 7.39-2.51L3 3z"></path><path d="M13 13l6 6"></path></svg></div> <div class="text-left"><div class="font-medium">Select <span class="text-gray-400 text-xs ml-1">V</span></div> <div class="text-xs text-gray-400">Click to select elements</div></div></button> <button><div><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="8" width="18" height="8" rx="1"></rect><line x1="7" y1="8" x2="7" y2="16"></line><line x1="12" y1="8" x2="12" y2="16"></line><line x1="17" y1="8" x2="17" y2="16"></line></svg></div> <div class="text-left"><div class="font-medium">Draw Wall <span class="text-gray-400 text-xs ml-1">W</span></div> <div class="text-xs text-gray-400">Click to draw, dbl-click to finish</div></div></button> <h3 class="text-xs font-semibold text-gray-400 uppercase mb-2 mt-3">Camera FOV</h3> <button type="button"><div><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-dasharray="3 2"><path d="M7 4 L17 6 L20 14 L12 20 L4 12 Z"></path></svg></div> <div class="text-left min-w-0"><div class="font-medium truncate whitespace-nowrap">Draw FOV · ✓ finish · 🗑 delete</div></div></button> <p class="text-[10px] text-gray-400 mb-3 px-0.5 whitespace-nowrap overflow-hidden text-ellipsis">Select camera, draw on floor → <code class="font-mono">mapCoordinates</code></p> <h3 class="text-xs font-semibold text-gray-400 uppercase mb-2 mt-3">Zone</h3> <div class="grid grid-cols-3 gap-1.5 mb-1"><button type="button" title="Drag to create rectangle area"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-dasharray="3 2"><rect x="4" y="6" width="16" height="12" rx="1"></rect></svg> Rect</button> <button type="button" title="Click to place triangle area"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-dasharray="3 2"><path d="M12 4 L20 19 L4 19 Z"></path></svg> Triangle</button> <button type="button" title="Click vertices; double-click or Enter to finish"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-dasharray="3 2"><path d="M7 4 L17 6 L20 14 L12 20 L4 12 Z"></path></svg> Polygon</button></div> <p class="text-[10px] text-gray-400 mb-2 px-0.5"><!></p> <h3 class="text-xs font-semibold text-gray-400 uppercase mb-2 mt-3">Structure</h3> <button><div><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M22 5h-5V2h-3v6h-4V5H7v6H2v3h5v3h3v-3h4v3h3v-6h5z"></path></svg></div> <div class="text-left"><div class="font-medium">Add Stairs</div> <div class="text-xs text-gray-400">Click to place stairs</div></div></button> <div class="flex gap-2"><button><div><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="12" cy="12" r="6"></circle><line x1="6" y1="6" x2="18" y2="18"></line><line x1="18" y1="6" x2="6" y2="18"></line></svg></div> <div class="text-left"><div class="font-medium text-xs">Round Column</div></div></button> <button><div><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><rect x="6" y="6" width="12" height="12"></rect><line x1="6" y1="6" x2="18" y2="18"></line><line x1="18" y1="6" x2="6" y2="18"></line></svg></div> <div class="text-left"><div class="font-medium text-xs">Square Column</div></div></button></div> <h3 class="text-xs font-semibold text-gray-400 uppercase mb-2 mt-3">Annotate</h3> <button><div><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M4 7V4h16v3"></path><line x1="12" y1="4" x2="12" y2="20"></line><line x1="8" y1="20" x2="16" y2="20"></line></svg></div> <div class="text-left"><div class="font-medium">Text Label</div> <div class="text-xs text-gray-400">Add text annotations (T)</div></div></button> <button><div><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"></path><line x1="16" y1="5" x2="22" y2="5"></line><line x1="19" y1="2" x2="19" y2="8"></line><line x1="3" y1="12" x2="12" y2="12"></line></svg></div> <div class="text-left"><div class="font-medium">Dimension</div> <div class="text-xs text-gray-400">Add dimension annotations (N)</div></div></button> <button><div><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M2 12h5l2-7 4 14 2-7h7"></path></svg></div> <div class="text-left"><div class="font-medium">Measure</div> <div class="text-xs text-gray-400">Measure distances (M)</div></div></button> <h3 class="text-xs font-semibold text-gray-400 uppercase mb-2 mt-3">Import</h3> <button class="w-full flex items-center gap-3 px-3 py-2.5 rounded-lg text-sm transition-colors hover:bg-gray-50 text-gray-700"><div class="w-9 h-9 rounded-lg bg-gray-100 flex items-center justify-center"><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect><circle cx="9" cy="9" r="2"></circle><path d="m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21"></path></svg></div> <div class="text-left"><div class="font-medium">Import Image</div> <div class="text-xs text-gray-400">Floor plan background</div></div></button> <button class="w-full flex items-center gap-3 px-3 py-2.5 rounded-lg text-sm transition-colors hover:bg-gray-50 text-gray-700"><div class="w-9 h-9 rounded-lg bg-gray-100 flex items-center justify-center"><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"></path><polyline points="9 22 9 12 15 12 15 22"></polyline></svg></div> <div class="text-left"><div class="font-medium">Import RoomPlan</div> <div class="text-xs text-gray-400">iOS LiDAR scan (.json/.zip)</div></div></button> <button class="w-full flex items-center justify-between px-1 py-2 mt-3"><h3 class="text-xs font-semibold text-gray-400 uppercase">Doors</h3> <span class="text-gray-400 text-xs"> </span></button> <!></div>`);
|
|
62337
62336
|
var root_10$3 = /* @__PURE__ */ from_html(`<button class="flex flex-col items-center gap-1.5 p-3 rounded-lg border-2 border-gray-100 hover:border-blue-300 hover:bg-blue-50 transition-colors cursor-grab active:cursor-grabbing" draggable="true"><div class="w-12 h-12 rounded-lg bg-gray-50 flex items-center justify-center text-2xl font-mono"> </div> <span class="text-xs font-medium text-gray-600"> </span></button>`);
|
|
62338
62337
|
var root_11$3 = /* @__PURE__ */ from_html(`<button class="flex flex-col items-center gap-1.5 p-3 rounded-lg border-2 border-gray-100 hover:border-green-300 hover:bg-green-50 transition-colors cursor-grab active:cursor-grabbing" draggable="true"><div class="w-12 h-12 rounded-lg bg-green-50 flex items-center justify-center text-lg"><!></div> <span class="text-xs font-medium text-gray-600"> </span> <span class="text-[10px] text-gray-400"> </span></button>`);
|
|
62339
62338
|
var root_9$2 = /* @__PURE__ */ from_html(`<div class="space-y-2"><h3 class="text-xs font-semibold text-gray-400 uppercase mb-2">Room Presets</h3> <p class="text-xs text-gray-400 mb-3">Click to add a room shape to the canvas</p> <div class="grid grid-cols-2 gap-2"></div> <hr class="my-3 border-gray-200"/> <h3 class="text-xs font-semibold text-gray-400 uppercase mb-2">Room Templates</h3> <p class="text-xs text-gray-400 mb-3">Pre-furnished rooms — walls + furniture in one click</p> <div class="grid grid-cols-2 gap-2"></div></div>`);
|
|
@@ -62706,9 +62705,7 @@ function BuildPanel($$anchor, $$props) {
|
|
|
62706
62705
|
append($$anchor, text$1("Click to place · then drag vertices"));
|
|
62707
62706
|
};
|
|
62708
62707
|
var consequent_2 = ($$anchor) => {
|
|
62709
|
-
|
|
62710
|
-
next(2);
|
|
62711
|
-
append($$anchor, fragment_1);
|
|
62708
|
+
append($$anchor, text$1("Click path · ✓ to finish · 🗑 to delete"));
|
|
62712
62709
|
};
|
|
62713
62710
|
var alternate = ($$anchor) => {
|
|
62714
62711
|
append($$anchor, text$1("Select a camera first, then draw its Zone"));
|
|
@@ -62750,13 +62747,13 @@ function BuildPanel($$anchor, $$props) {
|
|
|
62750
62747
|
var button_16 = sibling(button_15, 2);
|
|
62751
62748
|
var button_17 = sibling(button_16, 2);
|
|
62752
62749
|
var span = sibling(child(button_17), 2);
|
|
62753
|
-
var
|
|
62750
|
+
var text_5 = child(span, true);
|
|
62754
62751
|
reset(span);
|
|
62755
62752
|
reset(button_17);
|
|
62756
62753
|
var node_2 = sibling(button_17, 2);
|
|
62757
62754
|
var consequent_3 = ($$anchor) => {
|
|
62758
|
-
var
|
|
62759
|
-
var div_15 = first_child(
|
|
62755
|
+
var fragment_1 = root_6$3();
|
|
62756
|
+
var div_15 = first_child(fragment_1);
|
|
62760
62757
|
each(div_15, 21, () => doorCatalog, index$1, ($$anchor, dc) => {
|
|
62761
62758
|
var button_18 = root_7$5();
|
|
62762
62759
|
var div_16 = child(button_18);
|
|
@@ -62765,17 +62762,17 @@ function BuildPanel($$anchor, $$props) {
|
|
|
62765
62762
|
reset(svg);
|
|
62766
62763
|
reset(div_16);
|
|
62767
62764
|
var span_1 = sibling(div_16, 2);
|
|
62768
|
-
var
|
|
62765
|
+
var text_6 = child(span_1, true);
|
|
62769
62766
|
reset(span_1);
|
|
62770
62767
|
var span_2 = sibling(span_1, 2);
|
|
62771
|
-
var
|
|
62768
|
+
var text_7 = child(span_2, true);
|
|
62772
62769
|
reset(span_2);
|
|
62773
62770
|
reset(button_18);
|
|
62774
62771
|
template_effect(() => {
|
|
62775
62772
|
set_class(button_18, 1, `flex flex-col items-center gap-1 p-2.5 rounded-lg border-2 transition-colors cursor-grab active:cursor-grabbing ${get(currentTool) === "door" && get(selectedDoorType) === get(dc).type ? "border-blue-400 bg-blue-50" : "border-gray-100 hover:border-gray-200"}`);
|
|
62776
62773
|
set_attribute(path, "d", get(dc).icon);
|
|
62777
|
-
set_text(
|
|
62778
|
-
set_text(
|
|
62774
|
+
set_text(text_6, get(dc).name);
|
|
62775
|
+
set_text(text_7, get(dc).desc);
|
|
62779
62776
|
});
|
|
62780
62777
|
delegated("click", button_18, () => setDoorType(get(dc).type));
|
|
62781
62778
|
event("dragstart", button_18, (e) => {
|
|
@@ -62790,16 +62787,16 @@ function BuildPanel($$anchor, $$props) {
|
|
|
62790
62787
|
each(div_17, 21, () => windowCatalog, index$1, ($$anchor, wc) => {
|
|
62791
62788
|
var button_19 = root_8$2();
|
|
62792
62789
|
var span_3 = sibling(child(button_19), 2);
|
|
62793
|
-
var
|
|
62790
|
+
var text_8 = child(span_3, true);
|
|
62794
62791
|
reset(span_3);
|
|
62795
62792
|
var span_4 = sibling(span_3, 2);
|
|
62796
|
-
var
|
|
62793
|
+
var text_9 = child(span_4, true);
|
|
62797
62794
|
reset(span_4);
|
|
62798
62795
|
reset(button_19);
|
|
62799
62796
|
template_effect(() => {
|
|
62800
62797
|
set_class(button_19, 1, `flex flex-col items-center gap-1 p-2.5 rounded-lg border-2 transition-colors cursor-grab active:cursor-grabbing ${get(currentTool) === "window" && get(selectedWindowType) === get(wc).type ? "border-blue-400 bg-blue-50" : "border-gray-100 hover:border-gray-200"}`);
|
|
62801
|
-
set_text(
|
|
62802
|
-
set_text(
|
|
62798
|
+
set_text(text_8, get(wc).name);
|
|
62799
|
+
set_text(text_9, get(wc).desc);
|
|
62803
62800
|
});
|
|
62804
62801
|
delegated("click", button_19, () => setWindowType(get(wc).type));
|
|
62805
62802
|
event("dragstart", button_19, (e) => {
|
|
@@ -62810,7 +62807,7 @@ function BuildPanel($$anchor, $$props) {
|
|
|
62810
62807
|
append($$anchor, button_19);
|
|
62811
62808
|
});
|
|
62812
62809
|
reset(div_17);
|
|
62813
|
-
append($$anchor,
|
|
62810
|
+
append($$anchor, fragment_1);
|
|
62814
62811
|
};
|
|
62815
62812
|
if_block(node_2, ($$render) => {
|
|
62816
62813
|
if (get(constructionOpen)) $$render(consequent_3);
|
|
@@ -62838,7 +62835,7 @@ function BuildPanel($$anchor, $$props) {
|
|
|
62838
62835
|
set_class(div_13, 1, `w-9 h-9 rounded-lg bg-gray-100 flex items-center justify-center ${get(currentTool) === "annotate" ? "bg-blue-100" : ""}`);
|
|
62839
62836
|
set_class(button_14, 1, `w-full flex items-center gap-3 px-3 py-2.5 rounded-lg text-sm transition-colors ${get(currentTool) === "measure" ? "bg-blue-50 text-slate-800 ring-1 ring-blue-200" : "hover:bg-gray-50 text-gray-700"}`);
|
|
62840
62837
|
set_class(div_14, 1, `w-9 h-9 rounded-lg bg-gray-100 flex items-center justify-center ${get(currentTool) === "measure" ? "bg-blue-100" : ""}`);
|
|
62841
|
-
set_text(
|
|
62838
|
+
set_text(text_5, get(constructionOpen) ? "▼" : "▶");
|
|
62842
62839
|
});
|
|
62843
62840
|
delegated("click", button_3, () => setTool("select"));
|
|
62844
62841
|
delegated("click", button_4, () => setTool("wall"));
|
|
@@ -62863,15 +62860,15 @@ function BuildPanel($$anchor, $$props) {
|
|
|
62863
62860
|
each(div_19, 21, () => roomPresets, index$1, ($$anchor, preset) => {
|
|
62864
62861
|
var button_20 = root_10$3();
|
|
62865
62862
|
var div_20 = child(button_20);
|
|
62866
|
-
var
|
|
62863
|
+
var text_10 = child(div_20, true);
|
|
62867
62864
|
reset(div_20);
|
|
62868
62865
|
var span_5 = sibling(div_20, 2);
|
|
62869
|
-
var
|
|
62866
|
+
var text_11 = child(span_5, true);
|
|
62870
62867
|
reset(span_5);
|
|
62871
62868
|
reset(button_20);
|
|
62872
62869
|
template_effect(() => {
|
|
62873
|
-
set_text(
|
|
62874
|
-
set_text(
|
|
62870
|
+
set_text(text_10, get(preset).icon);
|
|
62871
|
+
set_text(text_11, get(preset).name);
|
|
62875
62872
|
});
|
|
62876
62873
|
delegated("click", button_20, () => onPresetClick(get(preset).id));
|
|
62877
62874
|
event("dragstart", button_20, (e) => {
|
|
@@ -62919,16 +62916,16 @@ function BuildPanel($$anchor, $$props) {
|
|
|
62919
62916
|
});
|
|
62920
62917
|
reset(div_22);
|
|
62921
62918
|
var span_6 = sibling(div_22, 2);
|
|
62922
|
-
var
|
|
62919
|
+
var text_19 = child(span_6, true);
|
|
62923
62920
|
reset(span_6);
|
|
62924
62921
|
var span_7 = sibling(span_6, 2);
|
|
62925
|
-
var
|
|
62922
|
+
var text_20 = child(span_7);
|
|
62926
62923
|
reset(span_7);
|
|
62927
62924
|
reset(button_21);
|
|
62928
62925
|
template_effect(() => {
|
|
62929
62926
|
var _$$get$furniture$leng;
|
|
62930
|
-
set_text(
|
|
62931
|
-
set_text(
|
|
62927
|
+
set_text(text_19, get(tmpl).name);
|
|
62928
|
+
set_text(text_20, `${(_$$get$furniture$leng = get(tmpl).furniture.length) !== null && _$$get$furniture$leng !== void 0 ? _$$get$furniture$leng : ""} items`);
|
|
62932
62929
|
});
|
|
62933
62930
|
delegated("click", button_21, () => onPresetClick(get(tmpl).presetId, get(tmpl).name));
|
|
62934
62931
|
event("dragstart", button_21, (e) => {
|
|
@@ -62960,11 +62957,11 @@ function BuildPanel($$anchor, $$props) {
|
|
|
62960
62957
|
var node_5 = sibling(div_24, 2);
|
|
62961
62958
|
var consequent_13 = ($$anchor) => {
|
|
62962
62959
|
var div_25 = root_21$2();
|
|
62963
|
-
var
|
|
62960
|
+
var text_21 = child(div_25);
|
|
62964
62961
|
reset(div_25);
|
|
62965
62962
|
template_effect(() => {
|
|
62966
62963
|
var _$$get$length, _$$get;
|
|
62967
|
-
return set_text(
|
|
62964
|
+
return set_text(text_21, `${(_$$get$length = get(filtered).length) !== null && _$$get$length !== void 0 ? _$$get$length : ""} result${get(filtered).length !== 1 ? "s" : ""} for "${(_$$get = get(search)) !== null && _$$get !== void 0 ? _$$get : ""}"`);
|
|
62968
62965
|
});
|
|
62969
62966
|
append($$anchor, div_25);
|
|
62970
62967
|
};
|
|
@@ -62974,17 +62971,17 @@ function BuildPanel($$anchor, $$props) {
|
|
|
62974
62971
|
var div_26 = sibling(node_5, 2);
|
|
62975
62972
|
var button_23 = child(div_26);
|
|
62976
62973
|
var button_24 = sibling(button_23, 2);
|
|
62977
|
-
var
|
|
62974
|
+
var text_22 = child(button_24);
|
|
62978
62975
|
reset(button_24);
|
|
62979
62976
|
each(sibling(button_24, 2), 17, () => furnitureCategories, index$1, ($$anchor, cat) => {
|
|
62980
62977
|
var button_25 = root_22$2();
|
|
62981
|
-
var
|
|
62978
|
+
var text_23 = child(button_25, true);
|
|
62982
62979
|
reset(button_25);
|
|
62983
62980
|
template_effect(() => {
|
|
62984
62981
|
var _categoryColors$$$get;
|
|
62985
62982
|
set_class(button_25, 1, `px-2 py-0.5 rounded-full text-[10px] font-medium ${get(selectedCategory) === get(cat) ? "text-white" : "text-gray-600 hover:bg-gray-200"}`);
|
|
62986
62983
|
set_style(button_25, get(selectedCategory) === get(cat) ? `background-color: ${(_categoryColors$$$get = categoryColors[get(cat)]) !== null && _categoryColors$$$get !== void 0 ? _categoryColors$$$get : "#6b7280"}` : "background-color: #f3f4f6");
|
|
62987
|
-
set_text(
|
|
62984
|
+
set_text(text_23, get(cat));
|
|
62988
62985
|
});
|
|
62989
62986
|
delegated("click", button_25, () => set(selectedCategory, get(cat), true));
|
|
62990
62987
|
append($$anchor, button_25);
|
|
@@ -62992,19 +62989,19 @@ function BuildPanel($$anchor, $$props) {
|
|
|
62992
62989
|
reset(div_26);
|
|
62993
62990
|
var node_7 = sibling(div_26, 2);
|
|
62994
62991
|
var consequent_14 = ($$anchor) => {
|
|
62995
|
-
var
|
|
62996
|
-
var div_27 = first_child(
|
|
62992
|
+
var fragment_2 = root_23$1();
|
|
62993
|
+
var div_27 = first_child(fragment_2);
|
|
62997
62994
|
var div_28 = sibling(child(div_27), 2);
|
|
62998
62995
|
each(div_28, 21, () => get(recentItems), index$1, ($$anchor, item) => {
|
|
62999
62996
|
var button_26 = root_24$2();
|
|
63000
62997
|
var span_8 = child(button_26);
|
|
63001
|
-
var
|
|
62998
|
+
var text_24 = child(span_8, true);
|
|
63002
62999
|
reset(span_8);
|
|
63003
63000
|
var div_29 = sibling(span_8, 2);
|
|
63004
63001
|
var div_30 = child(div_29);
|
|
63005
63002
|
reset(div_29);
|
|
63006
63003
|
var span_9 = sibling(div_29, 2);
|
|
63007
|
-
var
|
|
63004
|
+
var text_25 = child(span_9, true);
|
|
63008
63005
|
reset(span_9);
|
|
63009
63006
|
reset(button_26);
|
|
63010
63007
|
template_effect(($0, $1, $2) => {
|
|
@@ -63012,10 +63009,10 @@ function BuildPanel($$anchor, $$props) {
|
|
|
63012
63009
|
set_class(button_26, 1, `relative flex flex-col items-center gap-1 p-2.5 rounded-lg border-2 transition-colors cursor-grab active:cursor-grabbing ${get(currentPlacing) === get(item).id ? "border-blue-400 bg-blue-50 ring-1 ring-blue-300" : "border-gray-100 hover:border-blue-300 hover:bg-blue-50"}`);
|
|
63013
63010
|
set_class(span_8, 1, `absolute top-1 right-1 text-[12px] leading-none cursor-pointer ${$0 !== null && $0 !== void 0 ? $0 : ""}`);
|
|
63014
63011
|
set_attribute(span_8, "title", $1);
|
|
63015
|
-
set_text(
|
|
63012
|
+
set_text(text_24, $2);
|
|
63016
63013
|
set_style(div_29, `background-color: ${(_$$get$color = get(item).color) !== null && _$$get$color !== void 0 ? _$$get$color : ""}20`);
|
|
63017
63014
|
set_style(div_30, `background-color: ${(_$$get$color2 = get(item).color) !== null && _$$get$color2 !== void 0 ? _$$get$color2 : ""}; opacity: 0.7`);
|
|
63018
|
-
set_text(
|
|
63015
|
+
set_text(text_25, get(item).name);
|
|
63019
63016
|
}, [
|
|
63020
63017
|
() => get(favoriteIds).includes(get(item).id) ? "text-pink-500" : "text-gray-300 hover:text-pink-400",
|
|
63021
63018
|
() => get(favoriteIds).includes(get(item).id) ? "Remove from favorites" : "Add to favorites",
|
|
@@ -63046,7 +63043,7 @@ function BuildPanel($$anchor, $$props) {
|
|
|
63046
63043
|
reset(div_28);
|
|
63047
63044
|
reset(div_27);
|
|
63048
63045
|
next(2);
|
|
63049
|
-
append($$anchor,
|
|
63046
|
+
append($$anchor, fragment_2);
|
|
63050
63047
|
};
|
|
63051
63048
|
if_block(node_7, ($$render) => {
|
|
63052
63049
|
if (!get(search) && get(selectedCategory) === "All" && get(recentItems).length > 0) $$render(consequent_14);
|
|
@@ -63056,7 +63053,7 @@ function BuildPanel($$anchor, $$props) {
|
|
|
63056
63053
|
const s = /* @__PURE__ */ user_derived(() => get(search).toLowerCase());
|
|
63057
63054
|
var button_27 = root_25$1();
|
|
63058
63055
|
var span_10 = child(button_27);
|
|
63059
|
-
var
|
|
63056
|
+
var text_26 = child(span_10, true);
|
|
63060
63057
|
reset(span_10);
|
|
63061
63058
|
var div_32 = sibling(span_10, 2);
|
|
63062
63059
|
var div_33 = child(div_32);
|
|
@@ -63065,16 +63062,16 @@ function BuildPanel($$anchor, $$props) {
|
|
|
63065
63062
|
var consequent_15 = ($$anchor) => {
|
|
63066
63063
|
const idx = /* @__PURE__ */ user_derived(() => get(item).name.toLowerCase().indexOf(get(s)));
|
|
63067
63064
|
var span_11 = root_26$1();
|
|
63068
|
-
var
|
|
63069
|
-
var mark = sibling(
|
|
63070
|
-
var
|
|
63065
|
+
var text_27 = child(span_11, true);
|
|
63066
|
+
var mark = sibling(text_27);
|
|
63067
|
+
var text_28 = child(mark, true);
|
|
63071
63068
|
reset(mark);
|
|
63072
|
-
var
|
|
63069
|
+
var text_29 = sibling(mark, 1, true);
|
|
63073
63070
|
reset(span_11);
|
|
63074
63071
|
template_effect(($0, $1, $2) => {
|
|
63075
|
-
set_text(
|
|
63076
|
-
set_text(
|
|
63077
|
-
set_text(
|
|
63072
|
+
set_text(text_27, $0);
|
|
63073
|
+
set_text(text_28, $1);
|
|
63074
|
+
set_text(text_29, $2);
|
|
63078
63075
|
}, [
|
|
63079
63076
|
() => get(item).name.slice(0, get(idx)),
|
|
63080
63077
|
() => get(item).name.slice(get(idx), get(idx) + get(s).length),
|
|
@@ -63085,9 +63082,9 @@ function BuildPanel($$anchor, $$props) {
|
|
|
63085
63082
|
var d = /* @__PURE__ */ user_derived(() => get(s) && get(item).name.toLowerCase().includes(get(s)));
|
|
63086
63083
|
var alternate_2 = ($$anchor) => {
|
|
63087
63084
|
var span_12 = root_27$1();
|
|
63088
|
-
var
|
|
63085
|
+
var text_30 = child(span_12, true);
|
|
63089
63086
|
reset(span_12);
|
|
63090
|
-
template_effect(() => set_text(
|
|
63087
|
+
template_effect(() => set_text(text_30, get(item).name));
|
|
63091
63088
|
append($$anchor, span_12);
|
|
63092
63089
|
};
|
|
63093
63090
|
if_block(node_8, ($$render) => {
|
|
@@ -63095,7 +63092,7 @@ function BuildPanel($$anchor, $$props) {
|
|
|
63095
63092
|
else $$render(alternate_2, -1);
|
|
63096
63093
|
});
|
|
63097
63094
|
var span_13 = sibling(node_8, 2);
|
|
63098
|
-
var
|
|
63095
|
+
var text_31 = child(span_13);
|
|
63099
63096
|
reset(span_13);
|
|
63100
63097
|
reset(button_27);
|
|
63101
63098
|
template_effect(($0, $1, $2) => {
|
|
@@ -63103,10 +63100,10 @@ function BuildPanel($$anchor, $$props) {
|
|
|
63103
63100
|
set_class(button_27, 1, `relative flex flex-col items-center gap-1 p-3 rounded-lg border-2 transition-colors cursor-grab active:cursor-grabbing ${get(currentPlacing) === get(item).id ? "border-blue-400 bg-blue-50 ring-1 ring-blue-300" : "border-gray-100 hover:border-blue-300 hover:bg-blue-50"}`);
|
|
63104
63101
|
set_class(span_10, 1, `absolute top-1 right-1 text-[12px] leading-none cursor-pointer ${$0 !== null && $0 !== void 0 ? $0 : ""}`);
|
|
63105
63102
|
set_attribute(span_10, "title", $1);
|
|
63106
|
-
set_text(
|
|
63103
|
+
set_text(text_26, $2);
|
|
63107
63104
|
set_style(div_32, `background-color: ${(_$$get$color3 = get(item).color) !== null && _$$get$color3 !== void 0 ? _$$get$color3 : ""}20`);
|
|
63108
63105
|
set_style(div_33, `background-color: ${(_$$get$color4 = get(item).color) !== null && _$$get$color4 !== void 0 ? _$$get$color4 : ""}; opacity: 0.7`);
|
|
63109
|
-
set_text(
|
|
63106
|
+
set_text(text_31, `${(_$$get$width = get(item).width) !== null && _$$get$width !== void 0 ? _$$get$width : ""}×${(_$$get$depth = get(item).depth) !== null && _$$get$depth !== void 0 ? _$$get$depth : ""}cm`);
|
|
63110
63107
|
}, [
|
|
63111
63108
|
() => get(favoriteIds).includes(get(item).id) ? "text-pink-500" : "text-gray-300 hover:text-pink-400",
|
|
63112
63109
|
() => get(favoriteIds).includes(get(item).id) ? "Remove from favorites" : "Add to favorites",
|
|
@@ -63139,7 +63136,7 @@ function BuildPanel($$anchor, $$props) {
|
|
|
63139
63136
|
template_effect(() => {
|
|
63140
63137
|
set_class(button_23, 1, `px-2 py-0.5 rounded-full text-[10px] font-medium ${get(selectedCategory) === "All" ? "bg-blue-600 text-white" : "bg-gray-100 text-gray-600 hover:bg-gray-200"}`);
|
|
63141
63138
|
set_class(button_24, 1, `px-2 py-0.5 rounded-full text-[10px] font-medium ${get(selectedCategory) === "Favorites" ? "bg-pink-500 text-white" : "bg-gray-100 text-gray-600 hover:bg-gray-200"}`);
|
|
63142
|
-
set_text(
|
|
63139
|
+
set_text(text_22, `♥ Favorites${get(favoriteIds).length ? ` (${get(favoriteIds).length})` : ""}`);
|
|
63143
63140
|
});
|
|
63144
63141
|
bind_value(input_1, () => get(search), ($$value) => set(search, $$value));
|
|
63145
63142
|
delegated("click", button_23, () => set(selectedCategory, "All"));
|
|
@@ -63171,14 +63168,14 @@ function BuildPanel($$anchor, $$props) {
|
|
|
63171
63168
|
var div_39 = sibling(div_36, 2);
|
|
63172
63169
|
var div_40 = child(div_39);
|
|
63173
63170
|
var span_14 = child(div_40);
|
|
63174
|
-
var
|
|
63171
|
+
var text_32 = child(span_14, true);
|
|
63175
63172
|
reset(span_14);
|
|
63176
63173
|
var span_15 = sibling(span_14, 2);
|
|
63177
|
-
var
|
|
63174
|
+
var text_33 = child(span_15, true);
|
|
63178
63175
|
reset(span_15);
|
|
63179
63176
|
reset(div_40);
|
|
63180
63177
|
var div_41 = sibling(div_40, 2);
|
|
63181
|
-
var
|
|
63178
|
+
var text_34 = child(div_41);
|
|
63182
63179
|
reset(div_41);
|
|
63183
63180
|
reset(div_39);
|
|
63184
63181
|
reset(div_35);
|
|
@@ -63188,10 +63185,10 @@ function BuildPanel($$anchor, $$props) {
|
|
|
63188
63185
|
set_style(div_34, `left: ${(_$$get$x = get(hoverPos).x) !== null && _$$get$x !== void 0 ? _$$get$x : ""}px; top: ${(_$$get$y = get(hoverPos).y) !== null && _$$get$y !== void 0 ? _$$get$y : ""}px;`);
|
|
63189
63186
|
set_style(div_37, `background-color: ${(_$$get$color5 = get(item).color) !== null && _$$get$color5 !== void 0 ? _$$get$color5 : ""}20`);
|
|
63190
63187
|
set_style(div_38, `background-color: ${(_$$get$color6 = get(item).color) !== null && _$$get$color6 !== void 0 ? _$$get$color6 : ""}; opacity: 0.7`);
|
|
63191
|
-
set_text(
|
|
63188
|
+
set_text(text_32, get(item).name);
|
|
63192
63189
|
set_style(span_15, `background-color: ${(_ref = (_categoryColors$$$get2 = categoryColors[get(item).category]) !== null && _categoryColors$$$get2 !== void 0 ? _categoryColors$$$get2 : "#6b7280") !== null && _ref !== void 0 ? _ref : ""}`);
|
|
63193
|
-
set_text(
|
|
63194
|
-
set_text(
|
|
63190
|
+
set_text(text_33, get(item).category);
|
|
63191
|
+
set_text(text_34, `${(_$$get$width2 = get(item).width) !== null && _$$get$width2 !== void 0 ? _$$get$width2 : ""} × ${(_$$get$depth2 = get(item).depth) !== null && _$$get$depth2 !== void 0 ? _$$get$depth2 : ""} × ${(_$$get$height = get(item).height) !== null && _$$get$height !== void 0 ? _$$get$height : ""} cm`);
|
|
63195
63192
|
});
|
|
63196
63193
|
append($$anchor, div_34);
|
|
63197
63194
|
};
|
|
@@ -63203,7 +63200,7 @@ function BuildPanel($$anchor, $$props) {
|
|
|
63203
63200
|
var div_42 = root_29$1();
|
|
63204
63201
|
var div_43 = child(div_42);
|
|
63205
63202
|
var p_2 = sibling(child(div_43), 2);
|
|
63206
|
-
var
|
|
63203
|
+
var text_35 = child(p_2, true);
|
|
63207
63204
|
reset(p_2);
|
|
63208
63205
|
var div_44 = sibling(p_2, 2);
|
|
63209
63206
|
var label = child(div_44);
|
|
@@ -63217,7 +63214,7 @@ function BuildPanel($$anchor, $$props) {
|
|
|
63217
63214
|
var div_45 = sibling(input_3, 2);
|
|
63218
63215
|
var div_46 = child(div_45);
|
|
63219
63216
|
var span_16 = sibling(child(div_46));
|
|
63220
|
-
var
|
|
63217
|
+
var text_36 = child(span_16, true);
|
|
63221
63218
|
reset(span_16);
|
|
63222
63219
|
reset(div_46);
|
|
63223
63220
|
next(2);
|
|
@@ -63235,8 +63232,8 @@ function BuildPanel($$anchor, $$props) {
|
|
|
63235
63232
|
reset(div_43);
|
|
63236
63233
|
reset(div_42);
|
|
63237
63234
|
template_effect(() => {
|
|
63238
|
-
set_text(
|
|
63239
|
-
set_text(
|
|
63235
|
+
set_text(text_35, get(importFileName));
|
|
63236
|
+
set_text(text_36, "v5");
|
|
63240
63237
|
});
|
|
63241
63238
|
delegated("click", div_42, cancelImport);
|
|
63242
63239
|
delegated("click", div_43, (e) => e.stopPropagation());
|
|
@@ -63659,15 +63656,15 @@ init_client();
|
|
|
63659
63656
|
init_index_client();
|
|
63660
63657
|
var root_3$7 = /* @__PURE__ */ from_html(`<button type="button" class="text-[10px] px-1.5 py-0.5 rounded border border-blue-300 text-blue-700 bg-blue-50 hover:bg-blue-100"> </button>`);
|
|
63661
63658
|
var root_2$8 = /* @__PURE__ */ from_html(`<div class="flex items-center justify-between gap-2"><span class="text-xs font-medium text-gray-600">Camera FOV (image)</span> <!></div>`);
|
|
63662
|
-
var root_6$3 = /* @__PURE__ */ from_html(`Click vertices · nhấn <strong>✓</strong> `, 1);
|
|
63663
63659
|
var root_7$4 = /* @__PURE__ */ from_html(` <!>`, 1);
|
|
63664
63660
|
var root_10$2 = /* @__PURE__ */ from_html(`<p class="text-[10px] text-amber-700 bg-amber-50 border border-amber-200 rounded px-1.5 py-1"> </p>`);
|
|
63665
63661
|
var root_5$4 = /* @__PURE__ */ from_html(`<p class="text-[10px] text-gray-500 leading-snug"><!></p> <!>`, 1);
|
|
63666
|
-
var root_1$7 = /* @__PURE__ */ from_html(`<div class="border border-gray-200 rounded-lg p-2 bg-gray-50 space-y-2"><!> <div class="relative
|
|
63662
|
+
var root_1$7 = /* @__PURE__ */ from_html(`<div class="border border-gray-200 rounded-lg p-2 bg-gray-50 space-y-2"><!> <div class="relative w-full"><canvas style="height: auto;"></canvas> <!></div> <!></div>`);
|
|
63667
63663
|
var root_11$2 = /* @__PURE__ */ from_html(`<p class="text-xs text-gray-400">No thumbnail URL from host.</p>`);
|
|
63668
63664
|
function CameraFovEditor($$anchor, $$props) {
|
|
63669
63665
|
push($$props, true);
|
|
63670
|
-
let coordinates = prop($$props, "coordinates", 3, ""), mapCoordinates = prop($$props, "mapCoordinates", 3, ""), readOnly = prop($$props, "readOnly", 3, false);
|
|
63666
|
+
let coordinates = prop($$props, "coordinates", 3, ""), mapCoordinates = prop($$props, "mapCoordinates", 3, ""), readOnly = prop($$props, "readOnly", 3, false), strokeColor = prop($$props, "strokeColor", 3, "#22c55e");
|
|
63667
|
+
/** Match floor FOV / zoneColor */
|
|
63671
63668
|
let canvasEl = /* @__PURE__ */ state(void 0);
|
|
63672
63669
|
let imgEl = /* @__PURE__ */ state(null);
|
|
63673
63670
|
let imgSize = /* @__PURE__ */ state(null);
|
|
@@ -63675,9 +63672,39 @@ function CameraFovEditor($$anchor, $$props) {
|
|
|
63675
63672
|
let cursor = /* @__PURE__ */ state(null);
|
|
63676
63673
|
let draggingIdx = /* @__PURE__ */ state(null);
|
|
63677
63674
|
let editing = /* @__PURE__ */ state(false);
|
|
63678
|
-
/**
|
|
63679
|
-
|
|
63680
|
-
|
|
63675
|
+
/** Track panel width so thumbnail scales when Properties is resized. */
|
|
63676
|
+
let wrapEl = /* @__PURE__ */ state(void 0);
|
|
63677
|
+
let displayW = /* @__PURE__ */ state(380);
|
|
63678
|
+
user_effect(() => {
|
|
63679
|
+
const el = get(wrapEl);
|
|
63680
|
+
if (!el || typeof ResizeObserver === "undefined") return;
|
|
63681
|
+
const ro = new ResizeObserver((entries) => {
|
|
63682
|
+
var _entries$0$contentRec, _entries$;
|
|
63683
|
+
const w = (_entries$0$contentRec = (_entries$ = entries[0]) === null || _entries$ === void 0 || (_entries$ = _entries$.contentRect) === null || _entries$ === void 0 ? void 0 : _entries$.width) !== null && _entries$0$contentRec !== void 0 ? _entries$0$contentRec : 0;
|
|
63684
|
+
const next = Math.max(160, Math.floor(w));
|
|
63685
|
+
if (next !== get(displayW)) set(displayW, next, true);
|
|
63686
|
+
});
|
|
63687
|
+
ro.observe(el);
|
|
63688
|
+
set(displayW, Math.max(160, Math.floor(el.clientWidth) || 380), true);
|
|
63689
|
+
return () => ro.disconnect();
|
|
63690
|
+
});
|
|
63691
|
+
let FOV_COLOR = /* @__PURE__ */ user_derived(() => {
|
|
63692
|
+
var _strokeColor;
|
|
63693
|
+
return ((_strokeColor = strokeColor()) === null || _strokeColor === void 0 ? void 0 : _strokeColor.trim()) || "#22c55e";
|
|
63694
|
+
});
|
|
63695
|
+
function hexToRgba(hex, alpha) {
|
|
63696
|
+
const c = hex.trim();
|
|
63697
|
+
const short = c.match(/^#([0-9a-f]{3})$/i);
|
|
63698
|
+
let h = c;
|
|
63699
|
+
if (short) {
|
|
63700
|
+
const s = short[1];
|
|
63701
|
+
h = `#${s[0]}${s[0]}${s[1]}${s[1]}${s[2]}${s[2]}`;
|
|
63702
|
+
}
|
|
63703
|
+
const m = h.match(/^#([0-9a-f]{6})$/i);
|
|
63704
|
+
if (!m) return `rgba(34,197,94,${alpha})`;
|
|
63705
|
+
const n = parseInt(m[1], 16);
|
|
63706
|
+
return `rgba(${n >> 16 & 255},${n >> 8 & 255},${n & 255},${alpha})`;
|
|
63707
|
+
}
|
|
63681
63708
|
let matchOk = /* @__PURE__ */ user_derived(() => fovPointCountsMatch(coordinates(), mapCoordinates()));
|
|
63682
63709
|
let mapN = /* @__PURE__ */ user_derived(() => countCoordinatePoints(mapCoordinates()));
|
|
63683
63710
|
let imgN = /* @__PURE__ */ user_derived(() => countCoordinatePoints(coordinates()));
|
|
@@ -63732,6 +63759,7 @@ function CameraFovEditor($$anchor, $$props) {
|
|
|
63732
63759
|
const size = get(imgSize);
|
|
63733
63760
|
const el = get(canvasEl);
|
|
63734
63761
|
const isEditing = get(editing);
|
|
63762
|
+
get(FOV_COLOR);
|
|
63735
63763
|
if (!size || !el) return;
|
|
63736
63764
|
untrack(() => {
|
|
63737
63765
|
if (!isEditing) {
|
|
@@ -63743,7 +63771,7 @@ function CameraFovEditor($$anchor, $$props) {
|
|
|
63743
63771
|
});
|
|
63744
63772
|
function scale() {
|
|
63745
63773
|
if (!get(imgSize)) return 1;
|
|
63746
|
-
return displayW / get(imgSize).w;
|
|
63774
|
+
return get(displayW) / get(imgSize).w;
|
|
63747
63775
|
}
|
|
63748
63776
|
function canvasH() {
|
|
63749
63777
|
if (!get(imgSize)) return 135;
|
|
@@ -63761,7 +63789,7 @@ function CameraFovEditor($$anchor, $$props) {
|
|
|
63761
63789
|
function redraw() {
|
|
63762
63790
|
if (!get(canvasEl) || !get(imgEl) || !get(imgSize)) return;
|
|
63763
63791
|
const s = scale();
|
|
63764
|
-
const w = displayW;
|
|
63792
|
+
const w = get(displayW);
|
|
63765
63793
|
const h = canvasH();
|
|
63766
63794
|
if (get(canvasEl).width !== w || get(canvasEl).height !== h) {
|
|
63767
63795
|
get(canvasEl).width = w;
|
|
@@ -63772,36 +63800,37 @@ function CameraFovEditor($$anchor, $$props) {
|
|
|
63772
63800
|
ctx.clearRect(0, 0, w, h);
|
|
63773
63801
|
ctx.drawImage(get(imgEl), 0, 0, w, h);
|
|
63774
63802
|
const placed = get(draft);
|
|
63775
|
-
const
|
|
63776
|
-
if (
|
|
63777
|
-
if (pts.length >= 1) {
|
|
63803
|
+
const color = get(FOV_COLOR);
|
|
63804
|
+
if (placed.length >= 1) {
|
|
63778
63805
|
ctx.save();
|
|
63779
|
-
ctx.strokeStyle =
|
|
63780
|
-
ctx.fillStyle =
|
|
63781
|
-
ctx.lineWidth = 2;
|
|
63806
|
+
ctx.strokeStyle = color;
|
|
63807
|
+
ctx.fillStyle = hexToRgba(color, .28);
|
|
63808
|
+
ctx.lineWidth = 2.5;
|
|
63782
63809
|
ctx.lineJoin = "round";
|
|
63783
|
-
|
|
63810
|
+
ctx.lineCap = "round";
|
|
63811
|
+
if (placed.length >= 2) {
|
|
63812
|
+
ctx.setLineDash([]);
|
|
63784
63813
|
ctx.beginPath();
|
|
63785
|
-
ctx.moveTo(
|
|
63786
|
-
for (let i = 1; i <
|
|
63814
|
+
ctx.moveTo(placed[0].x * s, placed[0].y * s);
|
|
63815
|
+
for (let i = 1; i < placed.length; i++) ctx.lineTo(placed[i].x * s, placed[i].y * s);
|
|
63787
63816
|
if (!get(editing) && placed.length >= 3) {
|
|
63788
63817
|
ctx.closePath();
|
|
63789
63818
|
ctx.fill();
|
|
63790
|
-
}
|
|
63819
|
+
}
|
|
63791
63820
|
ctx.stroke();
|
|
63792
|
-
ctx.setLineDash([]);
|
|
63793
63821
|
}
|
|
63794
|
-
if (get(editing) && get(cursor) && placed.length >=
|
|
63795
|
-
|
|
63796
|
-
ctx.setLineDash([
|
|
63822
|
+
if (get(editing) && get(cursor) && placed.length >= 1) {
|
|
63823
|
+
const last = placed[placed.length - 1];
|
|
63824
|
+
ctx.setLineDash([6, 4]);
|
|
63825
|
+
ctx.globalAlpha = .85;
|
|
63797
63826
|
ctx.beginPath();
|
|
63798
|
-
ctx.moveTo(
|
|
63799
|
-
ctx.lineTo(
|
|
63827
|
+
ctx.moveTo(last.x * s, last.y * s);
|
|
63828
|
+
ctx.lineTo(get(cursor).x * s, get(cursor).y * s);
|
|
63800
63829
|
ctx.stroke();
|
|
63801
63830
|
ctx.setLineDash([]);
|
|
63802
63831
|
ctx.globalAlpha = 1;
|
|
63803
63832
|
}
|
|
63804
|
-
for (let i = 0; i < placed.length; i++) drawVertexIndexBadge(ctx, placed[i].x * s, placed[i].y * s, i,
|
|
63833
|
+
for (let i = 0; i < placed.length; i++) drawVertexIndexBadge(ctx, placed[i].x * s, placed[i].y * s, i, color, 10);
|
|
63805
63834
|
ctx.restore();
|
|
63806
63835
|
}
|
|
63807
63836
|
}
|
|
@@ -63950,7 +63979,6 @@ function CameraFovEditor($$anchor, $$props) {
|
|
|
63950
63979
|
});
|
|
63951
63980
|
var div_2 = sibling(node_1, 2);
|
|
63952
63981
|
var canvas = child(div_2);
|
|
63953
|
-
set_style(canvas, "max-width: 380px; height: auto;");
|
|
63954
63982
|
bind_this(canvas, ($$value) => set(canvasEl, $$value), () => get(canvasEl));
|
|
63955
63983
|
var node_3 = sibling(canvas, 2);
|
|
63956
63984
|
var consequent_2 = ($$anchor) => {
|
|
@@ -63978,16 +64006,16 @@ function CameraFovEditor($$anchor, $$props) {
|
|
|
63978
64006
|
if (get(showFloatTb) && get(floatTbPos)) $$render(consequent_2);
|
|
63979
64007
|
});
|
|
63980
64008
|
reset(div_2);
|
|
64009
|
+
bind_this(div_2, ($$value) => set(wrapEl, $$value), () => get(wrapEl));
|
|
63981
64010
|
var node_4 = sibling(div_2, 2);
|
|
63982
64011
|
var consequent_7 = ($$anchor) => {
|
|
63983
64012
|
var fragment_2 = root_5$4();
|
|
63984
64013
|
var p_1 = first_child(fragment_2);
|
|
63985
64014
|
var node_5 = child(p_1);
|
|
63986
64015
|
var consequent_3 = ($$anchor) => {
|
|
63987
|
-
var
|
|
63988
|
-
|
|
63989
|
-
|
|
63990
|
-
append($$anchor, fragment_3);
|
|
64016
|
+
var text_1 = text$1();
|
|
64017
|
+
template_effect(() => set_text(text_1, `Click vertices · ✓ finish (≥3) · 🗑 delete`));
|
|
64018
|
+
append($$anchor, text_1);
|
|
63991
64019
|
};
|
|
63992
64020
|
var consequent_5 = ($$anchor) => {
|
|
63993
64021
|
var fragment_4 = root_7$4();
|
|
@@ -64006,7 +64034,7 @@ function CameraFovEditor($$anchor, $$props) {
|
|
|
64006
64034
|
});
|
|
64007
64035
|
template_effect(() => {
|
|
64008
64036
|
var _$$get2;
|
|
64009
|
-
return set_text(text_2, `${(_$$get2 = get(imgN)) !== null && _$$get2 !== void 0 ? _$$get2 : ""} points — click polygon
|
|
64037
|
+
return set_text(text_2, `${(_$$get2 = get(imgN)) !== null && _$$get2 !== void 0 ? _$$get2 : ""} points — click polygon for toolbar `);
|
|
64010
64038
|
});
|
|
64011
64039
|
append($$anchor, fragment_4);
|
|
64012
64040
|
};
|
|
@@ -64041,7 +64069,7 @@ function CameraFovEditor($$anchor, $$props) {
|
|
|
64041
64069
|
if (!readOnly()) $$render(consequent_7);
|
|
64042
64070
|
});
|
|
64043
64071
|
reset(div);
|
|
64044
|
-
template_effect(() => set_class(canvas, 1, `w-full rounded border border-gray-200 bg-black/5 touch-none ${readOnly() ? "cursor-default" : "cursor-crosshair"}`));
|
|
64072
|
+
template_effect(() => set_class(canvas, 1, `w-full rounded border border-gray-200 bg-black/5 touch-none ${readOnly() || !get(editing) ? "cursor-default" : "cursor-crosshair"}`));
|
|
64045
64073
|
delegated("mousedown", canvas, function(...$$args) {
|
|
64046
64074
|
var _ref;
|
|
64047
64075
|
(_ref = readOnly() ? void 0 : onDown) === null || _ref === void 0 || _ref.apply(this, $$args);
|
|
@@ -64100,8 +64128,8 @@ var root_9$1 = /* @__PURE__ */ from_html(`<h3 class="text-sm font-semibold text-
|
|
|
64100
64128
|
var root_13$1 = /* @__PURE__ */ from_html(`<option> </option>`);
|
|
64101
64129
|
var root_12$1 = /* @__PURE__ */ from_html(`<label class="block"><span class="text-xs text-gray-500">Camera</span> <select class="w-full px-2 py-1 border border-gray-200 rounded text-sm bg-white"><option>Select camera...</option><!></select></label>`);
|
|
64102
64130
|
var root_14$1 = /* @__PURE__ */ from_html(`<label class="block"><span class="text-xs text-gray-500"> </span> <input type="text"/></label>`);
|
|
64103
|
-
var root_15$1 = /* @__PURE__ */ from_html(`<p class="text-[10px] text-gray-400 mt-2 leading-snug">FOV
|
|
64104
|
-
FOV
|
|
64131
|
+
var root_15$1 = /* @__PURE__ */ from_html(`<p class="text-[10px] text-gray-400 mt-2 leading-snug">Floor FOV: <strong>Camera FOV</strong> tool → <code class="font-mono">mapCoordinates</code>.
|
|
64132
|
+
Image FOV: draw on thumbnail (vertices 0…n) · ✓ to finish.</p>`);
|
|
64105
64133
|
var root_16 = /* @__PURE__ */ from_html(`<div class="pt-1 space-y-1.5"><div class="text-xs font-semibold text-gray-700">Camera thumbnail</div> <!></div>`);
|
|
64106
64134
|
var root_17$1 = /* @__PURE__ */ from_html(`<p class="text-[10px] text-amber-700 bg-amber-50 border border-amber-100 rounded px-1.5 py-1">Host chưa gửi <code class="font-mono">cameraThumbnail</code> cho cam này.</p>`);
|
|
64107
64135
|
var root_11$1 = /* @__PURE__ */ from_html(`<!> <!> <!> <!>`, 1);
|
|
@@ -64121,7 +64149,7 @@ var root_31 = /* @__PURE__ */ from_html(`<button type="button"></button>`);
|
|
|
64121
64149
|
var root_29 = /* @__PURE__ */ from_html(`<div class="space-y-3"><h3 class="text-sm font-semibold text-gray-700 mb-3 flex items-center gap-2"><span class="w-6 h-6 rounded flex items-center justify-center text-xs">⬡</span> Zone</h3> <label class="block"><span class="text-xs text-gray-500">Name</span> <input type="text" class="w-full px-2 py-1 border border-gray-200 rounded text-sm" title="From assignedCameras.zone when linked"/></label> <!> <div class="text-xs text-gray-500">Shape: <span class="text-gray-700 capitalize"> </span></div> <label class="block"><span class="text-xs text-gray-500">Color</span> <div class="flex flex-wrap gap-1.5 mt-1"><!> <input type="color" class="w-8 h-6 rounded border border-gray-200 cursor-pointer"/></div></label> <label class="block"><span class="text-xs text-gray-500">Fill opacity</span> <input type="range" min="0" max="0.4" step="0.02" class="w-full"/></label></div>`);
|
|
64122
64150
|
var root_32 = /* @__PURE__ */ from_html(`<div class="space-y-3"><h3 class="text-sm font-semibold text-gray-700 mb-3 flex items-center gap-2"><span class="w-6 h-6 bg-emerald-100 rounded flex items-center justify-center text-xs">🏷️</span> Text Annotation</h3> <label class="block"><span class="text-xs text-gray-500">Text</span> <input type="text" class="w-full px-2 py-1 border border-gray-200 rounded text-sm"/></label> <label class="block"><span class="text-xs text-gray-500">Font Size</span> <input type="number" min="8" max="72" class="w-full px-2 py-1 border border-gray-200 rounded text-sm"/></label> <label class="block"><span class="text-xs text-gray-500">Color</span> <div class="flex items-center gap-2"><input type="color" class="w-8 h-6 rounded border border-gray-200 cursor-pointer"/> <span class="text-xs text-gray-400"> </span></div></label> <label class="block"><span class="text-xs text-gray-500">Rotation (°)</span> <input type="number" class="w-full px-2 py-1 border border-gray-200 rounded text-sm"/></label> <label class="block"><span class="text-xs text-gray-500">X</span> <input type="number" class="w-full px-2 py-1 border border-gray-200 rounded text-sm"/></label> <label class="block"><span class="text-xs text-gray-500">Y</span> <input type="number" class="w-full px-2 py-1 border border-gray-200 rounded text-sm"/></label></div>`);
|
|
64123
64151
|
var root_33 = /* @__PURE__ */ from_html(`<div class="mt-4 pt-3 border-t border-gray-200"><h3 class="text-sm font-semibold text-gray-700 mb-3 flex items-center gap-2"><span class="w-6 h-6 bg-blue-100 rounded flex items-center justify-center text-xs">🖼️</span> Background Image</h3> <div class="space-y-3"><label class="block"><span class="text-xs text-gray-500">Opacity</span> <input type="range" min="0.05" max="1" step="0.05" class="w-full"/></label> <label class="block"><span class="text-xs text-gray-500">Scale</span> <input type="range" min="0.1" max="5" step="0.05" class="w-full"/></label> <label class="block"><span class="text-xs text-gray-500">Rotation</span> <input type="number" class="w-full px-2 py-1 border border-gray-200 rounded text-sm"/></label> <div class="flex gap-2"><button> </button> <button class="flex-1 px-2 py-1.5 border rounded text-sm border-gray-200 hover:bg-gray-50">📏 Set Scale</button></div> <button class="w-full px-2 py-1.5 border border-red-300 rounded text-sm text-red-600 hover:bg-red-50">Remove Image</button></div></div>`);
|
|
64124
|
-
var root$3 = /* @__PURE__ */ from_html(`<div data-properties-panel="" style="
|
|
64152
|
+
var root$3 = /* @__PURE__ */ from_html(`<div data-properties-panel=""><div role="separator" aria-orientation="vertical" aria-label="Resize properties panel" tabindex="0" class="absolute top-0 bottom-0 z-[60] group touch-none flex items-center justify-center" style="left: -6px; width: 12px; cursor: col-resize;" title="Drag to resize"><div></div> <div aria-hidden="true"></div></div> <div class="flex-1 min-h-0 overflow-y-auto p-3"><!> <!></div></div>`);
|
|
64125
64153
|
function PropertiesPanel($$anchor, $$props) {
|
|
64126
64154
|
push($$props, true);
|
|
64127
64155
|
const $projectSettings = () => store_get(projectSettings, "$projectSettings", $$stores);
|
|
@@ -64159,54 +64187,118 @@ function PropertiesPanel($$anchor, $$props) {
|
|
|
64159
64187
|
return get(settings).units === "imperial" ? "in" : "cm";
|
|
64160
64188
|
}
|
|
64161
64189
|
let is3D = prop($$props, "is3D", 3, false), siteCameras = prop($$props, "siteCameras", 19, () => []), cameraThumbnail = prop($$props, "cameraThumbnail", 3, "");
|
|
64190
|
+
const PANEL_MIN_W = 420;
|
|
64191
|
+
const PANEL_WIDTH_KEY = "floor-editor-properties-width";
|
|
64192
|
+
let panelEl = /* @__PURE__ */ state(void 0);
|
|
64193
|
+
let panelWidth = /* @__PURE__ */ state(PANEL_MIN_W);
|
|
64194
|
+
let resizing = /* @__PURE__ */ state(false);
|
|
64162
64195
|
let wallSideTab = /* @__PURE__ */ state("interior");
|
|
64196
|
+
function clampPanelWidth(w) {
|
|
64197
|
+
var _$$get;
|
|
64198
|
+
const parentW = ((_$$get = get(panelEl)) === null || _$$get === void 0 || (_$$get = _$$get.parentElement) === null || _$$get === void 0 ? void 0 : _$$get.clientWidth) || (typeof window !== "undefined" ? window.innerWidth : PANEL_MIN_W * 2);
|
|
64199
|
+
const maxW = Math.max(PANEL_MIN_W, Math.floor(parentW * .5));
|
|
64200
|
+
return Math.min(maxW, Math.max(PANEL_MIN_W, Math.round(w)));
|
|
64201
|
+
}
|
|
64202
|
+
function loadSavedWidth() {
|
|
64203
|
+
try {
|
|
64204
|
+
const raw = localStorage.getItem(PANEL_WIDTH_KEY);
|
|
64205
|
+
const n = raw ? Number(raw) : NaN;
|
|
64206
|
+
if (Number.isFinite(n)) set(panelWidth, clampPanelWidth(n), true);
|
|
64207
|
+
} catch (_unused) {}
|
|
64208
|
+
}
|
|
64209
|
+
function persistWidth(w) {
|
|
64210
|
+
try {
|
|
64211
|
+
localStorage.setItem(PANEL_WIDTH_KEY, String(w));
|
|
64212
|
+
} catch (_unused2) {}
|
|
64213
|
+
}
|
|
64214
|
+
user_effect(() => {
|
|
64215
|
+
loadSavedWidth();
|
|
64216
|
+
});
|
|
64217
|
+
function onResizePointerDown(e) {
|
|
64218
|
+
if (e.button !== 0) return;
|
|
64219
|
+
e.preventDefault();
|
|
64220
|
+
e.stopPropagation();
|
|
64221
|
+
const handle = e.currentTarget;
|
|
64222
|
+
handle.setPointerCapture(e.pointerId);
|
|
64223
|
+
set(resizing, true);
|
|
64224
|
+
document.body.style.cursor = "col-resize";
|
|
64225
|
+
document.body.style.userSelect = "none";
|
|
64226
|
+
let raf = 0;
|
|
64227
|
+
let latestX = e.clientX;
|
|
64228
|
+
const apply = () => {
|
|
64229
|
+
raf = 0;
|
|
64230
|
+
if (!get(panelEl)) return;
|
|
64231
|
+
const right = get(panelEl).getBoundingClientRect().right;
|
|
64232
|
+
set(panelWidth, clampPanelWidth(right - latestX), true);
|
|
64233
|
+
};
|
|
64234
|
+
const onMove = (ev) => {
|
|
64235
|
+
latestX = ev.clientX;
|
|
64236
|
+
if (raf) return;
|
|
64237
|
+
raf = requestAnimationFrame(apply);
|
|
64238
|
+
};
|
|
64239
|
+
const onUp = (ev) => {
|
|
64240
|
+
handle.releasePointerCapture(ev.pointerId);
|
|
64241
|
+
handle.removeEventListener("pointermove", onMove);
|
|
64242
|
+
handle.removeEventListener("pointerup", onUp);
|
|
64243
|
+
handle.removeEventListener("pointercancel", onUp);
|
|
64244
|
+
if (raf) cancelAnimationFrame(raf);
|
|
64245
|
+
apply();
|
|
64246
|
+
set(resizing, false);
|
|
64247
|
+
document.body.style.cursor = "";
|
|
64248
|
+
document.body.style.userSelect = "";
|
|
64249
|
+
persistWidth(get(panelWidth));
|
|
64250
|
+
};
|
|
64251
|
+
handle.addEventListener("pointermove", onMove);
|
|
64252
|
+
handle.addEventListener("pointerup", onUp);
|
|
64253
|
+
handle.addEventListener("pointercancel", onUp);
|
|
64254
|
+
}
|
|
64163
64255
|
let selectedWall = /* @__PURE__ */ user_derived(() => {
|
|
64164
|
-
var _$$get$walls$find, _$$
|
|
64165
|
-
return (_$$get$walls$find = (_$$
|
|
64256
|
+
var _$$get$walls$find, _$$get2;
|
|
64257
|
+
return (_$$get$walls$find = (_$$get2 = get(floor)) === null || _$$get2 === void 0 || (_$$get2 = _$$get2.walls) === null || _$$get2 === void 0 ? void 0 : _$$get2.find((w) => w.id === get(selId))) !== null && _$$get$walls$find !== void 0 ? _$$get$walls$find : null;
|
|
64166
64258
|
});
|
|
64167
64259
|
let selectedDoor = /* @__PURE__ */ user_derived(() => {
|
|
64168
|
-
var _$$get$doors$find, _$$
|
|
64169
|
-
return (_$$get$doors$find = (_$$
|
|
64260
|
+
var _$$get$doors$find, _$$get3;
|
|
64261
|
+
return (_$$get$doors$find = (_$$get3 = get(floor)) === null || _$$get3 === void 0 || (_$$get3 = _$$get3.doors) === null || _$$get3 === void 0 ? void 0 : _$$get3.find((d) => d.id === get(selId))) !== null && _$$get$doors$find !== void 0 ? _$$get$doors$find : null;
|
|
64170
64262
|
});
|
|
64171
64263
|
let selectedWindow = /* @__PURE__ */ user_derived(() => {
|
|
64172
|
-
var _$$get$windows$find, _$$
|
|
64173
|
-
return (_$$get$windows$find = (_$$
|
|
64264
|
+
var _$$get$windows$find, _$$get4;
|
|
64265
|
+
return (_$$get$windows$find = (_$$get4 = get(floor)) === null || _$$get4 === void 0 || (_$$get4 = _$$get4.windows) === null || _$$get4 === void 0 ? void 0 : _$$get4.find((w) => w.id === get(selId))) !== null && _$$get$windows$find !== void 0 ? _$$get$windows$find : null;
|
|
64174
64266
|
});
|
|
64175
64267
|
let selectedFurniture = /* @__PURE__ */ user_derived(() => {
|
|
64176
|
-
var _$$get$furniture$find, _$$
|
|
64177
|
-
return (_$$get$furniture$find = (_$$
|
|
64268
|
+
var _$$get$furniture$find, _$$get5;
|
|
64269
|
+
return (_$$get$furniture$find = (_$$get5 = get(floor)) === null || _$$get5 === void 0 || (_$$get5 = _$$get5.furniture) === null || _$$get5 === void 0 ? void 0 : _$$get5.find((f) => f.id === get(selId))) !== null && _$$get$furniture$find !== void 0 ? _$$get$furniture$find : null;
|
|
64178
64270
|
});
|
|
64179
64271
|
let selectedStair = /* @__PURE__ */ user_derived(() => {
|
|
64180
|
-
var _$$get$stairs$find, _$$
|
|
64181
|
-
return (_$$get$stairs$find = (_$$
|
|
64272
|
+
var _$$get$stairs$find, _$$get6;
|
|
64273
|
+
return (_$$get$stairs$find = (_$$get6 = get(floor)) === null || _$$get6 === void 0 || (_$$get6 = _$$get6.stairs) === null || _$$get6 === void 0 ? void 0 : _$$get6.find((s) => s.id === get(selId))) !== null && _$$get$stairs$find !== void 0 ? _$$get$stairs$find : null;
|
|
64182
64274
|
});
|
|
64183
64275
|
let selectedColumn = /* @__PURE__ */ user_derived(() => {
|
|
64184
|
-
var _$$get$columns$find, _$$
|
|
64185
|
-
return (_$$get$columns$find = (_$$
|
|
64276
|
+
var _$$get$columns$find, _$$get7;
|
|
64277
|
+
return (_$$get$columns$find = (_$$get7 = get(floor)) === null || _$$get7 === void 0 || (_$$get7 = _$$get7.columns) === null || _$$get7 === void 0 ? void 0 : _$$get7.find((c) => c.id === get(selId))) !== null && _$$get$columns$find !== void 0 ? _$$get$columns$find : null;
|
|
64186
64278
|
});
|
|
64187
64279
|
let selectedTextAnnotation = /* @__PURE__ */ user_derived(() => {
|
|
64188
|
-
var _$$get$textAnnotation, _$$
|
|
64189
|
-
return (_$$get$textAnnotation = (_$$
|
|
64280
|
+
var _$$get$textAnnotation, _$$get8;
|
|
64281
|
+
return (_$$get$textAnnotation = (_$$get8 = get(floor)) === null || _$$get8 === void 0 || (_$$get8 = _$$get8.textAnnotations) === null || _$$get8 === void 0 ? void 0 : _$$get8.find((t) => t.id === get(selId))) !== null && _$$get$textAnnotation !== void 0 ? _$$get$textAnnotation : null;
|
|
64190
64282
|
});
|
|
64191
64283
|
let selectedZone = /* @__PURE__ */ user_derived(() => {
|
|
64192
|
-
var _$$get$zones$find, _$$
|
|
64193
|
-
return (_$$get$zones$find = (_$$
|
|
64284
|
+
var _$$get$zones$find, _$$get9;
|
|
64285
|
+
return (_$$get$zones$find = (_$$get9 = get(floor)) === null || _$$get9 === void 0 || (_$$get9 = _$$get9.zones) === null || _$$get9 === void 0 ? void 0 : _$$get9.find((z) => z.id === get(selId))) !== null && _$$get$zones$find !== void 0 ? _$$get$zones$find : null;
|
|
64194
64286
|
});
|
|
64195
64287
|
let hasBgImage = /* @__PURE__ */ user_derived(() => {
|
|
64196
|
-
var _$$
|
|
64197
|
-
return !!((_$$
|
|
64288
|
+
var _$$get10;
|
|
64289
|
+
return !!((_$$get10 = get(floor)) === null || _$$get10 === void 0 ? void 0 : _$$get10.backgroundImage);
|
|
64198
64290
|
});
|
|
64199
64291
|
let selectedRoom = /* @__PURE__ */ user_derived(() => {
|
|
64200
|
-
var _ref, _$$get$rooms$find, _$$
|
|
64201
|
-
return (_ref = (_$$get$rooms$find = (_$$
|
|
64292
|
+
var _ref, _$$get$rooms$find, _$$get11;
|
|
64293
|
+
return (_ref = (_$$get$rooms$find = (_$$get11 = get(floor)) === null || _$$get11 === void 0 || (_$$get11 = _$$get11.rooms) === null || _$$get11 === void 0 ? void 0 : _$$get11.find((r) => r.id === get(selRoomId))) !== null && _$$get$rooms$find !== void 0 ? _$$get$rooms$find : get(detectedRooms).find((r) => r.id === get(selRoomId))) !== null && _ref !== void 0 ? _ref : null;
|
|
64202
64294
|
});
|
|
64203
64295
|
let selectedDoorWall = /* @__PURE__ */ user_derived(() => {
|
|
64204
|
-
var _ref2, _$$
|
|
64205
|
-
return (_ref2 = get(selectedDoor) && ((_$$
|
|
64296
|
+
var _ref2, _$$get12;
|
|
64297
|
+
return (_ref2 = get(selectedDoor) && ((_$$get12 = get(floor)) === null || _$$get12 === void 0 || (_$$get12 = _$$get12.walls) === null || _$$get12 === void 0 ? void 0 : _$$get12.find((w) => w.id === get(selectedDoor).wallId))) !== null && _ref2 !== void 0 ? _ref2 : null;
|
|
64206
64298
|
});
|
|
64207
64299
|
let selectedWindowWall = /* @__PURE__ */ user_derived(() => {
|
|
64208
|
-
var _ref3, _$$
|
|
64209
|
-
return (_ref3 = get(selectedWindow) && ((_$$
|
|
64300
|
+
var _ref3, _$$get13;
|
|
64301
|
+
return (_ref3 = get(selectedWindow) && ((_$$get13 = get(floor)) === null || _$$get13 === void 0 || (_$$get13 = _$$get13.walls) === null || _$$get13 === void 0 ? void 0 : _$$get13.find((w) => w.id === get(selectedWindow).wallId))) !== null && _ref3 !== void 0 ? _ref3 : null;
|
|
64210
64302
|
});
|
|
64211
64303
|
function calcWallLength(wall) {
|
|
64212
64304
|
if (wall.curvePoint) {
|
|
@@ -64323,14 +64415,14 @@ function PropertiesPanel($$anchor, $$props) {
|
|
|
64323
64415
|
});
|
|
64324
64416
|
/** Host-assigned camera fields are read-only; package fields (color/size/…) stay editable. */
|
|
64325
64417
|
const cameraPropsLocked = /* @__PURE__ */ user_derived(() => {
|
|
64326
|
-
var _$$
|
|
64327
|
-
return !!(((_$$
|
|
64418
|
+
var _$$get14;
|
|
64419
|
+
return !!(((_$$get14 = get(selectedFurniture)) === null || _$$get14 === void 0 ? void 0 : _$$get14.catalogId) === "camera" && get(selectedFurniture).props && Object.keys(get(selectedFurniture).props).length > 0);
|
|
64328
64420
|
});
|
|
64329
64421
|
const useSiteCameraSelect = /* @__PURE__ */ user_derived(() => siteCameras().length > 0);
|
|
64330
64422
|
const usedCameraSerials = /* @__PURE__ */ user_derived(() => {
|
|
64331
|
-
var _$$
|
|
64423
|
+
var _$$get15;
|
|
64332
64424
|
const used = /* @__PURE__ */ new Set();
|
|
64333
|
-
if (!((_$$
|
|
64425
|
+
if (!((_$$get15 = get(floor)) === null || _$$get15 === void 0 ? void 0 : _$$get15.furniture) || !get(selectedFurniture)) return used;
|
|
64334
64426
|
for (const item of get(floor).furniture) {
|
|
64335
64427
|
if (item.catalogId !== "camera" || item.id === get(selectedFurniture).id) continue;
|
|
64336
64428
|
if (item.serial) used.add(item.serial);
|
|
@@ -64640,16 +64732,22 @@ function PropertiesPanel($$anchor, $$props) {
|
|
|
64640
64732
|
];
|
|
64641
64733
|
let hasSelection = /* @__PURE__ */ user_derived(() => !!get(selectedWall) || !!get(selectedDoor) || !!get(selectedWindow) || !!get(selectedFurniture) || !!get(selectedRoom) || !!get(selectedStair) || !!get(selectedColumn) || !!get(selectedTextAnnotation) || !!get(selectedZone) || !is3D() && get(hasBgImage));
|
|
64642
64734
|
let showCameraThumbnail = /* @__PURE__ */ user_derived(() => {
|
|
64643
|
-
var _$$
|
|
64644
|
-
return ((_$$
|
|
64735
|
+
var _$$get16, _cameraThumbnail;
|
|
64736
|
+
return ((_$$get16 = get(selectedFurniture)) === null || _$$get16 === void 0 ? void 0 : _$$get16.catalogId) === "camera" && !!((_cameraThumbnail = cameraThumbnail()) === null || _cameraThumbnail === void 0 ? void 0 : _cameraThumbnail.trim());
|
|
64645
64737
|
});
|
|
64646
64738
|
var div = root$3();
|
|
64647
64739
|
let classes;
|
|
64648
|
-
var
|
|
64740
|
+
var div_1 = child(div);
|
|
64741
|
+
set_attribute(div_1, "aria-valuemin", PANEL_MIN_W);
|
|
64742
|
+
var div_2 = child(div_1);
|
|
64743
|
+
var div_3 = sibling(div_2, 2);
|
|
64744
|
+
reset(div_1);
|
|
64745
|
+
var div_4 = sibling(div_1, 2);
|
|
64746
|
+
var node = child(div_4);
|
|
64649
64747
|
var consequent_1 = ($$anchor) => {
|
|
64650
64748
|
var fragment = root_1$6();
|
|
64651
|
-
var
|
|
64652
|
-
var label = child(
|
|
64749
|
+
var div_5 = sibling(first_child(fragment), 2);
|
|
64750
|
+
var label = child(div_5);
|
|
64653
64751
|
var span = child(label);
|
|
64654
64752
|
var text = child(span);
|
|
64655
64753
|
reset(span);
|
|
@@ -64670,23 +64768,23 @@ function PropertiesPanel($$anchor, $$props) {
|
|
|
64670
64768
|
var input_2 = sibling(span_2, 2);
|
|
64671
64769
|
remove_input_defaults(input_2);
|
|
64672
64770
|
reset(label_2);
|
|
64673
|
-
var
|
|
64674
|
-
var button = sibling(child(
|
|
64771
|
+
var div_6 = sibling(label_2, 2);
|
|
64772
|
+
var button = sibling(child(div_6), 2);
|
|
64675
64773
|
var text_3 = child(button, true);
|
|
64676
64774
|
reset(button);
|
|
64677
|
-
reset(
|
|
64678
|
-
var
|
|
64679
|
-
var
|
|
64680
|
-
var button_1 = child(
|
|
64775
|
+
reset(div_6);
|
|
64776
|
+
var div_7 = sibling(div_6, 2);
|
|
64777
|
+
var div_8 = child(div_7);
|
|
64778
|
+
var button_1 = child(div_8);
|
|
64681
64779
|
var button_2 = sibling(button_1, 2);
|
|
64682
|
-
reset(
|
|
64683
|
-
var node_1 = sibling(
|
|
64780
|
+
reset(div_8);
|
|
64781
|
+
var node_1 = sibling(div_8, 2);
|
|
64684
64782
|
var consequent = ($$anchor) => {
|
|
64685
64783
|
const sideColor = /* @__PURE__ */ user_derived(() => get(selectedWall).interiorColor || get(selectedWall).color);
|
|
64686
64784
|
const sideTex = /* @__PURE__ */ user_derived(() => get(selectedWall).interiorTexture === "none" ? void 0 : get(selectedWall).interiorTexture || get(selectedWall).texture);
|
|
64687
|
-
var
|
|
64688
|
-
var
|
|
64689
|
-
each(
|
|
64785
|
+
var div_9 = root_2$7();
|
|
64786
|
+
var div_10 = sibling(child(div_9), 2);
|
|
64787
|
+
each(div_10, 21, () => wallColors, index$1, ($$anchor, wc) => {
|
|
64690
64788
|
var button_3 = root_3$6();
|
|
64691
64789
|
template_effect(() => {
|
|
64692
64790
|
var _$$get$color;
|
|
@@ -64699,13 +64797,13 @@ function PropertiesPanel($$anchor, $$props) {
|
|
|
64699
64797
|
});
|
|
64700
64798
|
append($$anchor, button_3);
|
|
64701
64799
|
});
|
|
64702
|
-
reset(
|
|
64703
|
-
var label_3 = sibling(
|
|
64800
|
+
reset(div_10);
|
|
64801
|
+
var label_3 = sibling(div_10, 2);
|
|
64704
64802
|
var input_3 = sibling(child(label_3), 2);
|
|
64705
64803
|
remove_input_defaults(input_3);
|
|
64706
64804
|
reset(label_3);
|
|
64707
|
-
var
|
|
64708
|
-
var button_4 = child(
|
|
64805
|
+
var div_11 = sibling(label_3, 4);
|
|
64806
|
+
var button_4 = child(div_11);
|
|
64709
64807
|
each(sibling(button_4, 2), 17, () => wallColors.filter((wc) => wc.texture), index$1, ($$anchor, wc) => {
|
|
64710
64808
|
const texPath = /* @__PURE__ */ user_derived(() => {
|
|
64711
64809
|
var _redBrick$exposedBr;
|
|
@@ -64736,8 +64834,8 @@ function PropertiesPanel($$anchor, $$props) {
|
|
|
64736
64834
|
});
|
|
64737
64835
|
append($$anchor, button_5);
|
|
64738
64836
|
});
|
|
64739
|
-
reset(
|
|
64740
|
-
reset(
|
|
64837
|
+
reset(div_11);
|
|
64838
|
+
reset(div_9);
|
|
64741
64839
|
template_effect(() => {
|
|
64742
64840
|
set_value(input_3, get(sideColor));
|
|
64743
64841
|
set_class(button_4, 1, `p-1.5 rounded-md border-2 text-[10px] text-center h-14 ${!get(sideTex) ? "border-blue-500 ring-1 ring-blue-200" : "border-gray-200 hover:border-gray-300"}`);
|
|
@@ -64748,14 +64846,14 @@ function PropertiesPanel($$anchor, $$props) {
|
|
|
64748
64846
|
delegated("click", button_4, () => {
|
|
64749
64847
|
if (get(selectedWall)) updateWall(get(selectedWall).id, { interiorTexture: "none" });
|
|
64750
64848
|
});
|
|
64751
|
-
append($$anchor,
|
|
64849
|
+
append($$anchor, div_9);
|
|
64752
64850
|
};
|
|
64753
64851
|
var alternate = ($$anchor) => {
|
|
64754
64852
|
const sideColor = /* @__PURE__ */ user_derived(() => get(selectedWall).exteriorColor || get(selectedWall).color);
|
|
64755
64853
|
const sideTex = /* @__PURE__ */ user_derived(() => get(selectedWall).exteriorTexture === "none" ? void 0 : get(selectedWall).exteriorTexture || get(selectedWall).texture);
|
|
64756
|
-
var
|
|
64757
|
-
var
|
|
64758
|
-
each(
|
|
64854
|
+
var div_12 = root_5$3();
|
|
64855
|
+
var div_13 = sibling(child(div_12), 2);
|
|
64856
|
+
each(div_13, 21, () => wallColors, index$1, ($$anchor, wc) => {
|
|
64759
64857
|
var button_6 = root_6$2();
|
|
64760
64858
|
template_effect(() => {
|
|
64761
64859
|
var _$$get$color2;
|
|
@@ -64768,13 +64866,13 @@ function PropertiesPanel($$anchor, $$props) {
|
|
|
64768
64866
|
});
|
|
64769
64867
|
append($$anchor, button_6);
|
|
64770
64868
|
});
|
|
64771
|
-
reset(
|
|
64772
|
-
var label_4 = sibling(
|
|
64869
|
+
reset(div_13);
|
|
64870
|
+
var label_4 = sibling(div_13, 2);
|
|
64773
64871
|
var input_4 = sibling(child(label_4), 2);
|
|
64774
64872
|
remove_input_defaults(input_4);
|
|
64775
64873
|
reset(label_4);
|
|
64776
|
-
var
|
|
64777
|
-
var button_7 = child(
|
|
64874
|
+
var div_14 = sibling(label_4, 4);
|
|
64875
|
+
var button_7 = child(div_14);
|
|
64778
64876
|
each(sibling(button_7, 2), 17, () => wallColors.filter((wc) => wc.texture), index$1, ($$anchor, wc) => {
|
|
64779
64877
|
const texPath = /* @__PURE__ */ user_derived(() => {
|
|
64780
64878
|
var _redBrick$exposedBr2;
|
|
@@ -64805,8 +64903,8 @@ function PropertiesPanel($$anchor, $$props) {
|
|
|
64805
64903
|
});
|
|
64806
64904
|
append($$anchor, button_8);
|
|
64807
64905
|
});
|
|
64808
|
-
reset(
|
|
64809
|
-
reset(
|
|
64906
|
+
reset(div_14);
|
|
64907
|
+
reset(div_12);
|
|
64810
64908
|
template_effect(() => {
|
|
64811
64909
|
set_value(input_4, get(sideColor));
|
|
64812
64910
|
set_class(button_7, 1, `p-1.5 rounded-md border-2 text-[10px] text-center h-14 ${!get(sideTex) ? "border-blue-500 ring-1 ring-blue-200" : "border-gray-200 hover:border-gray-300"}`);
|
|
@@ -64817,14 +64915,14 @@ function PropertiesPanel($$anchor, $$props) {
|
|
|
64817
64915
|
delegated("click", button_7, () => {
|
|
64818
64916
|
if (get(selectedWall)) updateWall(get(selectedWall).id, { exteriorTexture: "none" });
|
|
64819
64917
|
});
|
|
64820
|
-
append($$anchor,
|
|
64918
|
+
append($$anchor, div_12);
|
|
64821
64919
|
};
|
|
64822
64920
|
if_block(node_1, ($$render) => {
|
|
64823
64921
|
if (get(wallSideTab) === "interior") $$render(consequent);
|
|
64824
64922
|
else $$render(alternate, -1);
|
|
64825
64923
|
});
|
|
64826
|
-
reset(
|
|
64827
|
-
reset(
|
|
64924
|
+
reset(div_7);
|
|
64925
|
+
reset(div_5);
|
|
64828
64926
|
template_effect(($0, $1, $2, $3, $4, $5) => {
|
|
64829
64927
|
set_text(text, `Length (${$0 !== null && $0 !== void 0 ? $0 : ""})`);
|
|
64830
64928
|
set_value(input, $1);
|
|
@@ -64866,8 +64964,8 @@ function PropertiesPanel($$anchor, $$props) {
|
|
|
64866
64964
|
};
|
|
64867
64965
|
var consequent_2 = ($$anchor) => {
|
|
64868
64966
|
var fragment_1 = root_8$1();
|
|
64869
|
-
var
|
|
64870
|
-
var label_5 = child(
|
|
64967
|
+
var div_15 = sibling(first_child(fragment_1), 2);
|
|
64968
|
+
var label_5 = child(div_15);
|
|
64871
64969
|
var span_5 = child(label_5);
|
|
64872
64970
|
var text_6 = child(span_5);
|
|
64873
64971
|
reset(span_5);
|
|
@@ -64914,20 +65012,20 @@ function PropertiesPanel($$anchor, $$props) {
|
|
|
64914
65012
|
init_select(select);
|
|
64915
65013
|
reset(label_9);
|
|
64916
65014
|
var label_10 = sibling(label_9, 2);
|
|
64917
|
-
var
|
|
64918
|
-
var button_9 = child(
|
|
65015
|
+
var div_16 = sibling(child(label_10), 2);
|
|
65016
|
+
var button_9 = child(div_16);
|
|
64919
65017
|
var button_10 = sibling(button_9, 2);
|
|
64920
|
-
reset(
|
|
65018
|
+
reset(div_16);
|
|
64921
65019
|
reset(label_10);
|
|
64922
65020
|
var label_11 = sibling(label_10, 2);
|
|
64923
|
-
var
|
|
64924
|
-
var button_11 = child(
|
|
65021
|
+
var div_17 = sibling(child(label_11), 2);
|
|
65022
|
+
var button_11 = child(div_17);
|
|
64925
65023
|
var button_12 = sibling(button_11, 2);
|
|
64926
|
-
reset(
|
|
65024
|
+
reset(div_17);
|
|
64927
65025
|
reset(label_11);
|
|
64928
|
-
reset(
|
|
65026
|
+
reset(div_15);
|
|
64929
65027
|
template_effect(($0, $1, $2, $3, $4, $5, $6, $7) => {
|
|
64930
|
-
var _$$
|
|
65028
|
+
var _$$get17, _$$get18, _$$get19, _$$get20;
|
|
64931
65029
|
set_text(text_6, `Width (${$0 !== null && $0 !== void 0 ? $0 : ""})`);
|
|
64932
65030
|
set_value(input_5, $1);
|
|
64933
65031
|
set_text(text_7, `Distance from A (${$2 !== null && $2 !== void 0 ? $2 : ""})`);
|
|
@@ -64940,10 +65038,10 @@ function PropertiesPanel($$anchor, $$props) {
|
|
|
64940
65038
|
var _select$__value;
|
|
64941
65039
|
select.value = (_select$__value = select.__value = get(selectedDoor).type) !== null && _select$__value !== void 0 ? _select$__value : "", select_option(select, get(selectedDoor).type);
|
|
64942
65040
|
}
|
|
64943
|
-
set_class(button_9, 1, `flex-1 px-2 py-1.5 border rounded text-sm transition-colors ${((_$$
|
|
64944
|
-
set_class(button_10, 1, `flex-1 px-2 py-1.5 border rounded text-sm transition-colors ${((_$$
|
|
64945
|
-
set_class(button_11, 1, `flex-1 px-2 py-1.5 border rounded text-sm transition-colors ${!((_$$
|
|
64946
|
-
set_class(button_12, 1, `flex-1 px-2 py-1.5 border rounded text-sm transition-colors ${((_$$
|
|
65041
|
+
set_class(button_9, 1, `flex-1 px-2 py-1.5 border rounded text-sm transition-colors ${((_$$get17 = get(selectedDoor)) === null || _$$get17 === void 0 ? void 0 : _$$get17.swingDirection) === "left" ? "bg-blue-100 border-blue-400 text-blue-700" : "border-gray-200 hover:bg-gray-50"}`);
|
|
65042
|
+
set_class(button_10, 1, `flex-1 px-2 py-1.5 border rounded text-sm transition-colors ${((_$$get18 = get(selectedDoor)) === null || _$$get18 === void 0 ? void 0 : _$$get18.swingDirection) === "right" ? "bg-blue-100 border-blue-400 text-blue-700" : "border-gray-200 hover:bg-gray-50"}`);
|
|
65043
|
+
set_class(button_11, 1, `flex-1 px-2 py-1.5 border rounded text-sm transition-colors ${!((_$$get19 = get(selectedDoor)) === null || _$$get19 === void 0 ? void 0 : _$$get19.flipSide) ? "bg-blue-100 border-blue-400 text-blue-700" : "border-gray-200 hover:bg-gray-50"}`);
|
|
65044
|
+
set_class(button_12, 1, `flex-1 px-2 py-1.5 border rounded text-sm transition-colors ${((_$$get20 = get(selectedDoor)) === null || _$$get20 === void 0 ? void 0 : _$$get20.flipSide) ? "bg-blue-100 border-blue-400 text-blue-700" : "border-gray-200 hover:bg-gray-50"}`);
|
|
64947
65045
|
}, [
|
|
64948
65046
|
() => unitLabel(),
|
|
64949
65047
|
() => displayValue(get(selectedDoor).width),
|
|
@@ -64978,8 +65076,8 @@ function PropertiesPanel($$anchor, $$props) {
|
|
|
64978
65076
|
};
|
|
64979
65077
|
var consequent_3 = ($$anchor) => {
|
|
64980
65078
|
var fragment_2 = root_9$1();
|
|
64981
|
-
var
|
|
64982
|
-
var label_12 = child(
|
|
65079
|
+
var div_18 = sibling(first_child(fragment_2), 2);
|
|
65080
|
+
var label_12 = child(div_18);
|
|
64983
65081
|
var select_1 = sibling(child(label_12), 2);
|
|
64984
65082
|
var option_6 = child(select_1);
|
|
64985
65083
|
option_6.value = option_6.__value = "standard";
|
|
@@ -65030,7 +65128,7 @@ function PropertiesPanel($$anchor, $$props) {
|
|
|
65030
65128
|
var input_13 = sibling(span_13, 2);
|
|
65031
65129
|
remove_input_defaults(input_13);
|
|
65032
65130
|
reset(label_17);
|
|
65033
|
-
reset(
|
|
65131
|
+
reset(div_18);
|
|
65034
65132
|
template_effect(($0, $1, $2, $3, $4, $5, $6, $7, $8, $9) => {
|
|
65035
65133
|
var _$$get$type;
|
|
65036
65134
|
if (select_1_value !== (select_1_value = (_$$get$type = get(selectedWindow).type) !== null && _$$get$type !== void 0 ? _$$get$type : "standard")) {
|
|
@@ -65078,8 +65176,8 @@ function PropertiesPanel($$anchor, $$props) {
|
|
|
65078
65176
|
var text_17 = child(button_13, true);
|
|
65079
65177
|
reset(button_13);
|
|
65080
65178
|
reset(h3);
|
|
65081
|
-
var
|
|
65082
|
-
var node_4 = child(
|
|
65179
|
+
var div_19 = sibling(h3, 2);
|
|
65180
|
+
var node_4 = child(div_19);
|
|
65083
65181
|
var consequent_8 = ($$anchor) => {
|
|
65084
65182
|
var fragment_4 = root_11$1();
|
|
65085
65183
|
var node_5 = first_child(fragment_4);
|
|
@@ -65139,8 +65237,8 @@ function PropertiesPanel($$anchor, $$props) {
|
|
|
65139
65237
|
});
|
|
65140
65238
|
var node_9 = sibling(node_8, 2);
|
|
65141
65239
|
var consequent_6 = ($$anchor) => {
|
|
65142
|
-
var
|
|
65143
|
-
var node_10 = sibling(child(
|
|
65240
|
+
var div_20 = root_16();
|
|
65241
|
+
var node_10 = sibling(child(div_20), 2);
|
|
65144
65242
|
{
|
|
65145
65243
|
let $0 = /* @__PURE__ */ user_derived(() => {
|
|
65146
65244
|
var _$$get$props$coordina, _$$get$props2;
|
|
@@ -65150,6 +65248,10 @@ function PropertiesPanel($$anchor, $$props) {
|
|
|
65150
65248
|
var _$$get$props$mapCoord, _$$get$props3;
|
|
65151
65249
|
return (_$$get$props$mapCoord = (_$$get$props3 = get(selectedFurniture).props) === null || _$$get$props3 === void 0 ? void 0 : _$$get$props3.mapCoordinates) !== null && _$$get$props$mapCoord !== void 0 ? _$$get$props$mapCoord : "";
|
|
65152
65250
|
});
|
|
65251
|
+
let $2 = /* @__PURE__ */ user_derived(() => {
|
|
65252
|
+
var _$$get$props4;
|
|
65253
|
+
return ((_$$get$props4 = get(selectedFurniture).props) === null || _$$get$props4 === void 0 ? void 0 : _$$get$props4.zoneColor) || get(selectedFurniture).color || "#22c55e";
|
|
65254
|
+
});
|
|
65153
65255
|
CameraFovEditor(node_10, {
|
|
65154
65256
|
get serial() {
|
|
65155
65257
|
return get(selectedFurniture).serial;
|
|
@@ -65162,11 +65264,14 @@ function PropertiesPanel($$anchor, $$props) {
|
|
|
65162
65264
|
},
|
|
65163
65265
|
get mapCoordinates() {
|
|
65164
65266
|
return get($1);
|
|
65267
|
+
},
|
|
65268
|
+
get strokeColor() {
|
|
65269
|
+
return get($2);
|
|
65165
65270
|
}
|
|
65166
65271
|
});
|
|
65167
65272
|
}
|
|
65168
|
-
reset(
|
|
65169
|
-
append($$anchor,
|
|
65273
|
+
reset(div_20);
|
|
65274
|
+
append($$anchor, div_20);
|
|
65170
65275
|
};
|
|
65171
65276
|
var consequent_7 = ($$anchor) => {
|
|
65172
65277
|
append($$anchor, root_17$1());
|
|
@@ -65184,9 +65289,9 @@ function PropertiesPanel($$anchor, $$props) {
|
|
|
65184
65289
|
if_block(node_4, ($$render) => {
|
|
65185
65290
|
if (get(selectedFurniture).catalogId === "camera") $$render(consequent_8);
|
|
65186
65291
|
});
|
|
65187
|
-
var
|
|
65188
|
-
var
|
|
65189
|
-
each(
|
|
65292
|
+
var div_21 = sibling(node_4, 2);
|
|
65293
|
+
var div_22 = sibling(child(div_21), 2);
|
|
65294
|
+
each(div_22, 20, () => [
|
|
65190
65295
|
"#ffffff",
|
|
65191
65296
|
"#f5f5dc",
|
|
65192
65297
|
"#d2b48c",
|
|
@@ -65210,13 +65315,13 @@ function PropertiesPanel($$anchor, $$props) {
|
|
|
65210
65315
|
delegated("click", button_14, () => onFurnitureColor(color));
|
|
65211
65316
|
append($$anchor, button_14);
|
|
65212
65317
|
});
|
|
65213
|
-
reset(
|
|
65214
|
-
var
|
|
65215
|
-
var input_15 = sibling(child(
|
|
65318
|
+
reset(div_22);
|
|
65319
|
+
var div_23 = sibling(div_22, 2);
|
|
65320
|
+
var input_15 = sibling(child(div_23), 2);
|
|
65216
65321
|
remove_input_defaults(input_15);
|
|
65217
|
-
reset(
|
|
65218
|
-
reset(
|
|
65219
|
-
var label_20 = sibling(
|
|
65322
|
+
reset(div_23);
|
|
65323
|
+
reset(div_21);
|
|
65324
|
+
var label_20 = sibling(div_21, 2);
|
|
65220
65325
|
var span_16 = child(label_20);
|
|
65221
65326
|
var text_20 = child(span_16);
|
|
65222
65327
|
reset(span_16);
|
|
@@ -65263,16 +65368,16 @@ function PropertiesPanel($$anchor, $$props) {
|
|
|
65263
65368
|
var input_19 = sibling(child(label_24), 2);
|
|
65264
65369
|
remove_input_defaults(input_19);
|
|
65265
65370
|
reset(label_24);
|
|
65266
|
-
var
|
|
65267
|
-
var button_15 = child(
|
|
65371
|
+
var div_24 = sibling(label_24, 2);
|
|
65372
|
+
var button_15 = child(div_24);
|
|
65268
65373
|
var button_16 = sibling(button_15, 2);
|
|
65269
|
-
reset(
|
|
65270
|
-
var
|
|
65271
|
-
var button_17 = child(
|
|
65374
|
+
reset(div_24);
|
|
65375
|
+
var div_25 = sibling(div_24, 2);
|
|
65376
|
+
var button_17 = child(div_25);
|
|
65272
65377
|
var button_18 = sibling(button_17, 2);
|
|
65273
|
-
reset(
|
|
65274
|
-
var button_19 = sibling(
|
|
65275
|
-
reset(
|
|
65378
|
+
reset(div_25);
|
|
65379
|
+
var button_19 = sibling(div_25, 2);
|
|
65380
|
+
reset(div_19);
|
|
65276
65381
|
template_effect(($0, $1, $2, $3, $4, $5, $6, $7, $8, $9) => {
|
|
65277
65382
|
var _$$get$material;
|
|
65278
65383
|
set_text(text_15, $0);
|
|
@@ -65362,8 +65467,8 @@ function PropertiesPanel($$anchor, $$props) {
|
|
|
65362
65467
|
};
|
|
65363
65468
|
var consequent_11 = ($$anchor) => {
|
|
65364
65469
|
var fragment_5 = root_19$1();
|
|
65365
|
-
var
|
|
65366
|
-
var label_25 = child(
|
|
65470
|
+
var div_26 = sibling(first_child(fragment_5), 2);
|
|
65471
|
+
var label_25 = child(div_26);
|
|
65367
65472
|
var select_4 = sibling(child(label_25), 2);
|
|
65368
65473
|
each(select_4, 21, () => roomTypes, index$1, ($$anchor, rt) => {
|
|
65369
65474
|
var option_21 = root_20$1();
|
|
@@ -65402,14 +65507,14 @@ function PropertiesPanel($$anchor, $$props) {
|
|
|
65402
65507
|
var select_5_value;
|
|
65403
65508
|
init_select(select_5);
|
|
65404
65509
|
reset(label_27);
|
|
65405
|
-
var
|
|
65406
|
-
var p_2 = sibling(child(
|
|
65510
|
+
var div_27 = sibling(label_27, 2);
|
|
65511
|
+
var p_2 = sibling(child(div_27), 2);
|
|
65407
65512
|
var text_24 = child(p_2, true);
|
|
65408
65513
|
reset(p_2);
|
|
65409
|
-
reset(
|
|
65410
|
-
var
|
|
65411
|
-
var
|
|
65412
|
-
each(
|
|
65514
|
+
reset(div_27);
|
|
65515
|
+
var div_28 = sibling(div_27, 2);
|
|
65516
|
+
var div_29 = sibling(child(div_28), 2);
|
|
65517
|
+
each(div_29, 21, () => roomColorPresets, index$1, ($$anchor, preset) => {
|
|
65413
65518
|
var button_20 = root_21$1();
|
|
65414
65519
|
template_effect(() => {
|
|
65415
65520
|
var _$$get$color5;
|
|
@@ -65420,21 +65525,21 @@ function PropertiesPanel($$anchor, $$props) {
|
|
|
65420
65525
|
delegated("click", button_20, () => onRoomColor(get(preset).color));
|
|
65421
65526
|
append($$anchor, button_20);
|
|
65422
65527
|
});
|
|
65423
|
-
reset(
|
|
65424
|
-
var
|
|
65425
|
-
var input_21 = sibling(child(
|
|
65528
|
+
reset(div_29);
|
|
65529
|
+
var div_30 = sibling(div_29, 2);
|
|
65530
|
+
var input_21 = sibling(child(div_30), 2);
|
|
65426
65531
|
remove_input_defaults(input_21);
|
|
65427
|
-
reset(
|
|
65428
|
-
reset(
|
|
65429
|
-
var
|
|
65430
|
-
var
|
|
65431
|
-
each(
|
|
65432
|
-
var
|
|
65433
|
-
var span_19 = child(
|
|
65532
|
+
reset(div_30);
|
|
65533
|
+
reset(div_28);
|
|
65534
|
+
var div_31 = sibling(div_28, 2);
|
|
65535
|
+
var div_32 = sibling(child(div_31), 2);
|
|
65536
|
+
each(div_32, 21, () => textureGroups, index$1, ($$anchor, group) => {
|
|
65537
|
+
var div_33 = root_22$1();
|
|
65538
|
+
var span_19 = child(div_33);
|
|
65434
65539
|
var text_25 = child(span_19, true);
|
|
65435
65540
|
reset(span_19);
|
|
65436
|
-
var
|
|
65437
|
-
each(
|
|
65541
|
+
var div_34 = sibling(span_19, 2);
|
|
65542
|
+
each(div_34, 21, () => get(group).ids, index$1, ($$anchor, matId) => {
|
|
65438
65543
|
const mat = /* @__PURE__ */ user_derived(() => floorMaterials.find((m) => m.id === get(matId)));
|
|
65439
65544
|
var fragment_6 = comment();
|
|
65440
65545
|
var node_11 = first_child(fragment_6);
|
|
@@ -65444,15 +65549,15 @@ function PropertiesPanel($$anchor, $$props) {
|
|
|
65444
65549
|
return (_floorTexPaths$$$get$ = floorTexPaths[get(mat).id]) !== null && _floorTexPaths$$$get$ !== void 0 ? _floorTexPaths$$$get$ : "";
|
|
65445
65550
|
});
|
|
65446
65551
|
var button_21 = root_24$1();
|
|
65447
|
-
var
|
|
65448
|
-
var
|
|
65449
|
-
var text_26 = child(
|
|
65450
|
-
reset(
|
|
65552
|
+
var div_35 = child(button_21);
|
|
65553
|
+
var div_36 = sibling(div_35, 2);
|
|
65554
|
+
var text_26 = child(div_36, true);
|
|
65555
|
+
reset(div_36);
|
|
65451
65556
|
reset(button_21);
|
|
65452
65557
|
template_effect(() => {
|
|
65453
65558
|
set_class(button_21, 1, `p-1 rounded-lg border-2 hover:border-gray-300 transition-all text-xs ${get(selectedRoom).floorTexture === get(mat).id ? "border-blue-500 ring-2 ring-blue-200 shadow-sm" : "border-gray-200"}`);
|
|
65454
65559
|
set_attribute(button_21, "title", get(mat).name);
|
|
65455
|
-
set_style(
|
|
65560
|
+
set_style(div_35, get(texPath) ? `background-image: url(${get(texPath)}); background-size: cover; background-position: center;` : `background-color: ${get(mat).color}`);
|
|
65456
65561
|
set_text(text_26, get(mat).name);
|
|
65457
65562
|
});
|
|
65458
65563
|
delegated("click", button_21, () => onRoomFloor(get(mat).id));
|
|
@@ -65463,14 +65568,14 @@ function PropertiesPanel($$anchor, $$props) {
|
|
|
65463
65568
|
});
|
|
65464
65569
|
append($$anchor, fragment_6);
|
|
65465
65570
|
});
|
|
65466
|
-
reset(
|
|
65467
|
-
reset(
|
|
65571
|
+
reset(div_34);
|
|
65572
|
+
reset(div_33);
|
|
65468
65573
|
template_effect(() => set_text(text_25, get(group).label));
|
|
65469
|
-
append($$anchor,
|
|
65574
|
+
append($$anchor, div_33);
|
|
65470
65575
|
});
|
|
65471
|
-
reset(
|
|
65472
|
-
reset(
|
|
65473
|
-
reset(
|
|
65576
|
+
reset(div_32);
|
|
65577
|
+
reset(div_31);
|
|
65578
|
+
reset(div_26);
|
|
65474
65579
|
template_effect(($0) => {
|
|
65475
65580
|
var _$$get$roomType, _$$get$color6;
|
|
65476
65581
|
if (select_4_value !== (select_4_value = get(selectedRoomType))) {
|
|
@@ -65499,8 +65604,8 @@ function PropertiesPanel($$anchor, $$props) {
|
|
|
65499
65604
|
};
|
|
65500
65605
|
var consequent_12 = ($$anchor) => {
|
|
65501
65606
|
var fragment_7 = root_25();
|
|
65502
|
-
var
|
|
65503
|
-
var label_28 = child(
|
|
65607
|
+
var div_37 = sibling(first_child(fragment_7), 2);
|
|
65608
|
+
var label_28 = child(div_37);
|
|
65504
65609
|
var select_6 = sibling(child(label_28), 2);
|
|
65505
65610
|
var option_26 = child(select_6);
|
|
65506
65611
|
option_26.value = option_26.__value = "straight";
|
|
@@ -65533,16 +65638,16 @@ function PropertiesPanel($$anchor, $$props) {
|
|
|
65533
65638
|
remove_input_defaults(input_24);
|
|
65534
65639
|
reset(label_31);
|
|
65535
65640
|
var label_32 = sibling(label_31, 2);
|
|
65536
|
-
var
|
|
65537
|
-
var button_22 = child(
|
|
65641
|
+
var div_38 = sibling(child(label_32), 2);
|
|
65642
|
+
var button_22 = child(div_38);
|
|
65538
65643
|
var button_23 = sibling(button_22, 2);
|
|
65539
|
-
reset(
|
|
65644
|
+
reset(div_38);
|
|
65540
65645
|
reset(label_32);
|
|
65541
65646
|
var label_33 = sibling(label_32, 2);
|
|
65542
65647
|
var input_25 = sibling(child(label_33), 2);
|
|
65543
65648
|
remove_input_defaults(input_25);
|
|
65544
65649
|
reset(label_33);
|
|
65545
|
-
reset(
|
|
65650
|
+
reset(div_37);
|
|
65546
65651
|
template_effect(($0, $1, $2, $3) => {
|
|
65547
65652
|
if (select_6_value !== (select_6_value = get(selectedStair).stairType || "straight")) {
|
|
65548
65653
|
var _select_6$__value;
|
|
@@ -65573,12 +65678,12 @@ function PropertiesPanel($$anchor, $$props) {
|
|
|
65573
65678
|
};
|
|
65574
65679
|
var consequent_14 = ($$anchor) => {
|
|
65575
65680
|
var fragment_8 = root_26();
|
|
65576
|
-
var
|
|
65577
|
-
var label_34 = child(
|
|
65578
|
-
var
|
|
65579
|
-
var button_24 = child(
|
|
65681
|
+
var div_39 = sibling(first_child(fragment_8), 2);
|
|
65682
|
+
var label_34 = child(div_39);
|
|
65683
|
+
var div_40 = sibling(child(label_34), 2);
|
|
65684
|
+
var button_24 = child(div_40);
|
|
65580
65685
|
var button_25 = sibling(button_24, 2);
|
|
65581
|
-
reset(
|
|
65686
|
+
reset(div_40);
|
|
65582
65687
|
reset(label_34);
|
|
65583
65688
|
var label_35 = sibling(label_34, 2);
|
|
65584
65689
|
var span_22 = child(label_35);
|
|
@@ -65594,9 +65699,9 @@ function PropertiesPanel($$anchor, $$props) {
|
|
|
65594
65699
|
var input_27 = sibling(span_23, 2);
|
|
65595
65700
|
remove_input_defaults(input_27);
|
|
65596
65701
|
reset(label_36);
|
|
65597
|
-
var
|
|
65598
|
-
var
|
|
65599
|
-
each(
|
|
65702
|
+
var div_41 = sibling(label_36, 2);
|
|
65703
|
+
var div_42 = sibling(child(div_41), 2);
|
|
65704
|
+
each(div_42, 21, () => columnColorPresets, index$1, ($$anchor, preset) => {
|
|
65600
65705
|
var button_26 = root_27();
|
|
65601
65706
|
template_effect(() => {
|
|
65602
65707
|
var _$$get$color7;
|
|
@@ -65607,13 +65712,13 @@ function PropertiesPanel($$anchor, $$props) {
|
|
|
65607
65712
|
delegated("click", button_26, () => updateColumn(get(selectedColumn).id, { color: get(preset).color }));
|
|
65608
65713
|
append($$anchor, button_26);
|
|
65609
65714
|
});
|
|
65610
|
-
reset(
|
|
65611
|
-
var
|
|
65612
|
-
var input_28 = sibling(child(
|
|
65715
|
+
reset(div_42);
|
|
65716
|
+
var div_43 = sibling(div_42, 2);
|
|
65717
|
+
var input_28 = sibling(child(div_43), 2);
|
|
65613
65718
|
remove_input_defaults(input_28);
|
|
65614
|
-
reset(
|
|
65615
|
-
reset(
|
|
65616
|
-
var node_12 = sibling(
|
|
65719
|
+
reset(div_43);
|
|
65720
|
+
reset(div_41);
|
|
65721
|
+
var node_12 = sibling(div_41, 2);
|
|
65617
65722
|
var consequent_13 = ($$anchor) => {
|
|
65618
65723
|
var label_37 = root_28();
|
|
65619
65724
|
var input_29 = sibling(child(label_37), 2);
|
|
@@ -65626,7 +65731,7 @@ function PropertiesPanel($$anchor, $$props) {
|
|
|
65626
65731
|
if_block(node_12, ($$render) => {
|
|
65627
65732
|
if (get(selectedColumn).shape === "square") $$render(consequent_13);
|
|
65628
65733
|
});
|
|
65629
|
-
reset(
|
|
65734
|
+
reset(div_39);
|
|
65630
65735
|
template_effect(($0, $1, $2, $3) => {
|
|
65631
65736
|
set_class(button_24, 1, `flex-1 px-2 py-1.5 border rounded text-sm transition-colors ${get(selectedColumn).shape === "round" ? "bg-blue-100 border-blue-400 text-blue-700" : "border-gray-200 hover:bg-gray-50"}`);
|
|
65632
65737
|
set_class(button_25, 1, `flex-1 px-2 py-1.5 border rounded text-sm transition-colors ${get(selectedColumn).shape === "square" ? "bg-blue-100 border-blue-400 text-blue-700" : "border-gray-200 hover:bg-gray-50"}`);
|
|
@@ -65649,8 +65754,8 @@ function PropertiesPanel($$anchor, $$props) {
|
|
|
65649
65754
|
append($$anchor, fragment_8);
|
|
65650
65755
|
};
|
|
65651
65756
|
var consequent_16 = ($$anchor) => {
|
|
65652
|
-
var
|
|
65653
|
-
var h3_1 = child(
|
|
65757
|
+
var div_44 = root_29();
|
|
65758
|
+
var h3_1 = child(div_44);
|
|
65654
65759
|
var span_24 = child(h3_1);
|
|
65655
65760
|
next();
|
|
65656
65761
|
reset(h3_1);
|
|
@@ -65660,44 +65765,44 @@ function PropertiesPanel($$anchor, $$props) {
|
|
|
65660
65765
|
reset(label_38);
|
|
65661
65766
|
var node_13 = sibling(label_38, 2);
|
|
65662
65767
|
var consequent_15 = ($$anchor) => {
|
|
65663
|
-
var
|
|
65664
|
-
var span_25 = sibling(child(
|
|
65768
|
+
var div_45 = root_30();
|
|
65769
|
+
var span_25 = sibling(child(div_45));
|
|
65665
65770
|
var text_31 = child(span_25, true);
|
|
65666
65771
|
reset(span_25);
|
|
65667
|
-
reset(
|
|
65772
|
+
reset(div_45);
|
|
65668
65773
|
template_effect(() => set_text(text_31, get(selectedZone).cameraSerial));
|
|
65669
|
-
append($$anchor,
|
|
65774
|
+
append($$anchor, div_45);
|
|
65670
65775
|
};
|
|
65671
65776
|
if_block(node_13, ($$render) => {
|
|
65672
65777
|
if (get(selectedZone).cameraSerial) $$render(consequent_15);
|
|
65673
65778
|
});
|
|
65674
|
-
var
|
|
65675
|
-
var span_26 = sibling(child(
|
|
65779
|
+
var div_46 = sibling(node_13, 2);
|
|
65780
|
+
var span_26 = sibling(child(div_46));
|
|
65676
65781
|
var text_32 = child(span_26, true);
|
|
65677
65782
|
reset(span_26);
|
|
65678
|
-
reset(
|
|
65679
|
-
var label_39 = sibling(
|
|
65680
|
-
var
|
|
65681
|
-
var node_14 = child(
|
|
65783
|
+
reset(div_46);
|
|
65784
|
+
var label_39 = sibling(div_46, 2);
|
|
65785
|
+
var div_47 = sibling(child(label_39), 2);
|
|
65786
|
+
var node_14 = child(div_47);
|
|
65682
65787
|
each(node_14, 17, () => ZONE_COLOR_PALETTE, index$1, ($$anchor, c) => {
|
|
65683
65788
|
var button_27 = root_31();
|
|
65684
65789
|
template_effect(() => {
|
|
65685
|
-
var _$$
|
|
65790
|
+
var _$$get21;
|
|
65686
65791
|
set_class(button_27, 1, `w-6 h-6 rounded border-2 ${get(selectedZone).color === get(c) ? "border-slate-800" : "border-transparent"}`);
|
|
65687
|
-
set_style(button_27, `background:${(_$$
|
|
65792
|
+
set_style(button_27, `background:${(_$$get21 = get(c)) !== null && _$$get21 !== void 0 ? _$$get21 : ""}`);
|
|
65688
65793
|
});
|
|
65689
65794
|
delegated("click", button_27, () => updateZone(get(selectedZone).id, { color: get(c) }));
|
|
65690
65795
|
append($$anchor, button_27);
|
|
65691
65796
|
});
|
|
65692
65797
|
var input_31 = sibling(node_14, 2);
|
|
65693
65798
|
remove_input_defaults(input_31);
|
|
65694
|
-
reset(
|
|
65799
|
+
reset(div_47);
|
|
65695
65800
|
reset(label_39);
|
|
65696
65801
|
var label_40 = sibling(label_39, 2);
|
|
65697
65802
|
var input_32 = sibling(child(label_40), 2);
|
|
65698
65803
|
remove_input_defaults(input_32);
|
|
65699
65804
|
reset(label_40);
|
|
65700
|
-
reset(
|
|
65805
|
+
reset(div_44);
|
|
65701
65806
|
template_effect(() => {
|
|
65702
65807
|
var _$$get$color8, _$$get$color9, _$$get$fillOpacity;
|
|
65703
65808
|
set_style(span_24, `background:${(_$$get$color8 = get(selectedZone).color) !== null && _$$get$color8 !== void 0 ? _$$get$color8 : ""}22;color:${(_$$get$color9 = get(selectedZone).color) !== null && _$$get$color9 !== void 0 ? _$$get$color9 : ""}`);
|
|
@@ -65709,11 +65814,11 @@ function PropertiesPanel($$anchor, $$props) {
|
|
|
65709
65814
|
delegated("input", input_30, (e) => updateZone(get(selectedZone).id, { name: e.target.value }));
|
|
65710
65815
|
delegated("input", input_31, (e) => updateZone(get(selectedZone).id, { color: e.target.value }));
|
|
65711
65816
|
delegated("input", input_32, (e) => updateZone(get(selectedZone).id, { fillOpacity: Number(e.target.value) }));
|
|
65712
|
-
append($$anchor,
|
|
65817
|
+
append($$anchor, div_44);
|
|
65713
65818
|
};
|
|
65714
65819
|
var consequent_17 = ($$anchor) => {
|
|
65715
|
-
var
|
|
65716
|
-
var label_41 = sibling(child(
|
|
65820
|
+
var div_48 = root_32();
|
|
65821
|
+
var label_41 = sibling(child(div_48), 2);
|
|
65717
65822
|
var input_33 = sibling(child(label_41), 2);
|
|
65718
65823
|
remove_input_defaults(input_33);
|
|
65719
65824
|
reset(label_41);
|
|
@@ -65722,13 +65827,13 @@ function PropertiesPanel($$anchor, $$props) {
|
|
|
65722
65827
|
remove_input_defaults(input_34);
|
|
65723
65828
|
reset(label_42);
|
|
65724
65829
|
var label_43 = sibling(label_42, 2);
|
|
65725
|
-
var
|
|
65726
|
-
var input_35 = child(
|
|
65830
|
+
var div_49 = sibling(child(label_43), 2);
|
|
65831
|
+
var input_35 = child(div_49);
|
|
65727
65832
|
remove_input_defaults(input_35);
|
|
65728
65833
|
var span_27 = sibling(input_35, 2);
|
|
65729
65834
|
var text_33 = child(span_27, true);
|
|
65730
65835
|
reset(span_27);
|
|
65731
|
-
reset(
|
|
65836
|
+
reset(div_49);
|
|
65732
65837
|
reset(label_43);
|
|
65733
65838
|
var label_44 = sibling(label_43, 2);
|
|
65734
65839
|
var input_36 = sibling(child(label_44), 2);
|
|
@@ -65742,7 +65847,7 @@ function PropertiesPanel($$anchor, $$props) {
|
|
|
65742
65847
|
var input_38 = sibling(child(label_46), 2);
|
|
65743
65848
|
remove_input_defaults(input_38);
|
|
65744
65849
|
reset(label_46);
|
|
65745
|
-
reset(
|
|
65850
|
+
reset(div_48);
|
|
65746
65851
|
template_effect(($0, $1) => {
|
|
65747
65852
|
set_value(input_33, get(selectedTextAnnotation).text);
|
|
65748
65853
|
set_value(input_34, get(selectedTextAnnotation).fontSize);
|
|
@@ -65758,7 +65863,7 @@ function PropertiesPanel($$anchor, $$props) {
|
|
|
65758
65863
|
delegated("input", input_36, (e) => updateTextAnnotation(get(selectedTextAnnotation).id, { rotation: Number(e.target.value) }));
|
|
65759
65864
|
delegated("input", input_37, (e) => updateTextAnnotation(get(selectedTextAnnotation).id, { x: Number(e.target.value) }));
|
|
65760
65865
|
delegated("input", input_38, (e) => updateTextAnnotation(get(selectedTextAnnotation).id, { y: Number(e.target.value) }));
|
|
65761
|
-
append($$anchor,
|
|
65866
|
+
append($$anchor, div_48);
|
|
65762
65867
|
};
|
|
65763
65868
|
if_block(node, ($$render) => {
|
|
65764
65869
|
if (get(selectedWall)) $$render(consequent_1);
|
|
@@ -65773,9 +65878,9 @@ function PropertiesPanel($$anchor, $$props) {
|
|
|
65773
65878
|
});
|
|
65774
65879
|
var node_15 = sibling(node, 2);
|
|
65775
65880
|
var consequent_18 = ($$anchor) => {
|
|
65776
|
-
var
|
|
65777
|
-
var
|
|
65778
|
-
var label_47 = child(
|
|
65881
|
+
var div_50 = root_33();
|
|
65882
|
+
var div_51 = sibling(child(div_50), 2);
|
|
65883
|
+
var label_47 = child(div_51);
|
|
65779
65884
|
var input_39 = sibling(child(label_47), 2);
|
|
65780
65885
|
remove_input_defaults(input_39);
|
|
65781
65886
|
reset(label_47);
|
|
@@ -65787,15 +65892,15 @@ function PropertiesPanel($$anchor, $$props) {
|
|
|
65787
65892
|
var input_41 = sibling(child(label_49), 2);
|
|
65788
65893
|
remove_input_defaults(input_41);
|
|
65789
65894
|
reset(label_49);
|
|
65790
|
-
var
|
|
65791
|
-
var button_28 = child(
|
|
65895
|
+
var div_52 = sibling(label_49, 2);
|
|
65896
|
+
var button_28 = child(div_52);
|
|
65792
65897
|
var text_34 = child(button_28, true);
|
|
65793
65898
|
reset(button_28);
|
|
65794
65899
|
var button_29 = sibling(button_28, 2);
|
|
65795
|
-
reset(
|
|
65796
|
-
var button_30 = sibling(
|
|
65797
|
-
reset(
|
|
65798
|
-
reset(
|
|
65900
|
+
reset(div_52);
|
|
65901
|
+
var button_30 = sibling(div_52, 2);
|
|
65902
|
+
reset(div_51);
|
|
65903
|
+
reset(div_50);
|
|
65799
65904
|
template_effect(() => {
|
|
65800
65905
|
set_value(input_39, get(floor).backgroundImage.opacity);
|
|
65801
65906
|
set_value(input_40, get(floor).backgroundImage.scale);
|
|
@@ -65812,22 +65917,33 @@ function PropertiesPanel($$anchor, $$props) {
|
|
|
65812
65917
|
calibrationMode.set(true);
|
|
65813
65918
|
});
|
|
65814
65919
|
delegated("click", button_30, () => setBackgroundImage(void 0));
|
|
65815
|
-
append($$anchor,
|
|
65920
|
+
append($$anchor, div_50);
|
|
65816
65921
|
};
|
|
65817
65922
|
if_block(node_15, ($$render) => {
|
|
65818
|
-
var _$$
|
|
65819
|
-
if (get(hasBgImage) && ((_$$
|
|
65923
|
+
var _$$get22;
|
|
65924
|
+
if (get(hasBgImage) && ((_$$get22 = get(floor)) === null || _$$get22 === void 0 ? void 0 : _$$get22.backgroundImage)) $$render(consequent_18);
|
|
65820
65925
|
});
|
|
65926
|
+
reset(div_4);
|
|
65821
65927
|
reset(div);
|
|
65822
|
-
|
|
65928
|
+
bind_this(div, ($$value) => set(panelEl, $$value), () => get(panelEl));
|
|
65929
|
+
template_effect(() => {
|
|
65930
|
+
var _$$get23;
|
|
65931
|
+
classes = set_class(div, 1, "shrink-0 bg-white border-l border-gray-200 flex flex-col absolute right-0 z-40 shadow-lg overflow-visible", null, classes, { hidden: !get(hasSelection) });
|
|
65932
|
+
set_style(div, `top: 0; bottom: 0; width: ${(_$$get23 = get(panelWidth)) !== null && _$$get23 !== void 0 ? _$$get23 : ""}px; ${get(resizing) ? "will-change: width;" : ""}`);
|
|
65933
|
+
set_attribute(div_1, "aria-valuenow", get(panelWidth));
|
|
65934
|
+
set_class(div_2, 1, `h-full w-0.5 rounded-full transition-colors ${get(resizing) ? "bg-blue-500" : "bg-transparent group-hover:bg-blue-400"}`);
|
|
65935
|
+
set_class(div_3, 1, `absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-1 h-8 rounded-full transition-opacity ${get(resizing) ? "bg-blue-500 opacity-100" : "bg-gray-300 opacity-0 group-hover:opacity-100"}`);
|
|
65936
|
+
});
|
|
65823
65937
|
delegated("keydown", div, stopShortcutBubble);
|
|
65824
65938
|
event("keydown", div, stopShortcutBubble, true);
|
|
65939
|
+
delegated("pointerdown", div_1, onResizePointerDown);
|
|
65825
65940
|
append($$anchor, div);
|
|
65826
65941
|
pop();
|
|
65827
65942
|
$$cleanup();
|
|
65828
65943
|
}
|
|
65829
65944
|
delegate([
|
|
65830
65945
|
"keydown",
|
|
65946
|
+
"pointerdown",
|
|
65831
65947
|
"input",
|
|
65832
65948
|
"click",
|
|
65833
65949
|
"change"
|
|
@@ -66644,6 +66760,12 @@ function FloorPlanCanvas($$anchor, $$props) {
|
|
|
66644
66760
|
let fovCursor = /* @__PURE__ */ state(null);
|
|
66645
66761
|
/** Selected committed floor FOV (by camera serial) — shows float toolbar */
|
|
66646
66762
|
let selectedFovSerial = /* @__PURE__ */ state(null);
|
|
66763
|
+
/**
|
|
66764
|
+
* true = camera selected via FOV polygon click (toolbar/properties OK,
|
|
66765
|
+
* but no resize/rotate handles / yellow cone).
|
|
66766
|
+
*/
|
|
66767
|
+
let fovSelectionOnly = /* @__PURE__ */ state(false);
|
|
66768
|
+
let draggingFovVertex = /* @__PURE__ */ state(null);
|
|
66647
66769
|
let editingTextAnnotationId = /* @__PURE__ */ state(null);
|
|
66648
66770
|
let editingTextAnnotationPos = /* @__PURE__ */ state(proxy({
|
|
66649
66771
|
x: 0,
|
|
@@ -67106,6 +67228,11 @@ function FloorPlanCanvas($$anchor, $$props) {
|
|
|
67106
67228
|
}
|
|
67107
67229
|
if (tb.mode === "fov") clearSelectedFovMap();
|
|
67108
67230
|
}
|
|
67231
|
+
function findFovVertexAt(wp, pts) {
|
|
67232
|
+
const tol = 12 / get(zoom);
|
|
67233
|
+
for (let i = 0; i < pts.length; i++) if (isNearPoint(wp, pts[i], tol)) return i;
|
|
67234
|
+
return -1;
|
|
67235
|
+
}
|
|
67109
67236
|
function drawCameraFovOverlays() {
|
|
67110
67237
|
if (!ctx || !get(currentFloor)) return;
|
|
67111
67238
|
const bounds = getInteriorFloorBounds(get(currentFloor));
|
|
@@ -67118,7 +67245,7 @@ function FloorPlanCanvas($$anchor, $$props) {
|
|
|
67118
67245
|
if (!mapStr) continue;
|
|
67119
67246
|
const pts = mapCoordinatesToWorldPoints(mapStr, bounds);
|
|
67120
67247
|
if (pts.length < 2) continue;
|
|
67121
|
-
const isActive = (active === null || active === void 0 ? void 0 : active.id) === fi.id;
|
|
67248
|
+
const isActive = get(selectedFovSerial) === fi.serial || (active === null || active === void 0 ? void 0 : active.id) === fi.id;
|
|
67122
67249
|
const color = ((_fi$props3 = fi.props) === null || _fi$props3 === void 0 ? void 0 : _fi$props3.zoneColor) || fi.color || "#22c55e";
|
|
67123
67250
|
ctx.save();
|
|
67124
67251
|
ctx.strokeStyle = color;
|
|
@@ -67146,36 +67273,36 @@ function FloorPlanCanvas($$anchor, $$props) {
|
|
|
67146
67273
|
}
|
|
67147
67274
|
if (get(currentTool) === "cameraFov" && (get(fovPolyDraft).length || get(fovCursor))) {
|
|
67148
67275
|
var _active$props;
|
|
67149
|
-
const
|
|
67150
|
-
if (get(fovCursor)) pts.push(get(fovCursor));
|
|
67151
|
-
const color = (active === null || active === void 0 || (_active$props = active.props) === null || _active$props === void 0 ? void 0 : _active$props.zoneColor) || "#22c55e";
|
|
67276
|
+
const color = (active === null || active === void 0 || (_active$props = active.props) === null || _active$props === void 0 ? void 0 : _active$props.zoneColor) || (active === null || active === void 0 ? void 0 : active.color) || "#22c55e";
|
|
67152
67277
|
ctx.save();
|
|
67153
67278
|
ctx.strokeStyle = color;
|
|
67154
|
-
ctx.
|
|
67155
|
-
ctx.
|
|
67156
|
-
ctx.
|
|
67157
|
-
|
|
67158
|
-
|
|
67279
|
+
ctx.lineWidth = 2.5;
|
|
67280
|
+
ctx.lineJoin = "round";
|
|
67281
|
+
ctx.lineCap = "round";
|
|
67282
|
+
if (get(fovPolyDraft).length >= 2) {
|
|
67283
|
+
ctx.setLineDash([]);
|
|
67159
67284
|
ctx.beginPath();
|
|
67160
|
-
const a = worldToScreen(
|
|
67285
|
+
const a = worldToScreen(get(fovPolyDraft)[0].x, get(fovPolyDraft)[0].y);
|
|
67161
67286
|
ctx.moveTo(a.x, a.y);
|
|
67162
|
-
for (let i = 1; i <
|
|
67163
|
-
const s = worldToScreen(
|
|
67287
|
+
for (let i = 1; i < get(fovPolyDraft).length; i++) {
|
|
67288
|
+
const s = worldToScreen(get(fovPolyDraft)[i].x, get(fovPolyDraft)[i].y);
|
|
67164
67289
|
ctx.lineTo(s.x, s.y);
|
|
67165
67290
|
}
|
|
67166
67291
|
ctx.stroke();
|
|
67167
67292
|
}
|
|
67168
|
-
if (get(fovCursor) && get(fovPolyDraft).length >=
|
|
67169
|
-
const
|
|
67170
|
-
const
|
|
67171
|
-
|
|
67293
|
+
if (get(fovCursor) && get(fovPolyDraft).length >= 1) {
|
|
67294
|
+
const last = get(fovPolyDraft)[get(fovPolyDraft).length - 1];
|
|
67295
|
+
const a = worldToScreen(last.x, last.y);
|
|
67296
|
+
const b = worldToScreen(get(fovCursor).x, get(fovCursor).y);
|
|
67297
|
+
ctx.setLineDash([6, 4]);
|
|
67298
|
+
ctx.globalAlpha = .85;
|
|
67172
67299
|
ctx.beginPath();
|
|
67173
67300
|
ctx.moveTo(a.x, a.y);
|
|
67174
67301
|
ctx.lineTo(b.x, b.y);
|
|
67175
67302
|
ctx.stroke();
|
|
67303
|
+
ctx.globalAlpha = 1;
|
|
67304
|
+
ctx.setLineDash([]);
|
|
67176
67305
|
}
|
|
67177
|
-
ctx.globalAlpha = 1;
|
|
67178
|
-
ctx.setLineDash([]);
|
|
67179
67306
|
for (let i = 0; i < get(fovPolyDraft).length; i++) {
|
|
67180
67307
|
const s = worldToScreen(get(fovPolyDraft)[i].x, get(fovPolyDraft)[i].y);
|
|
67181
67308
|
drawVertexIndexBadge(ctx, s.x, s.y, i, color, 9);
|
|
@@ -67426,7 +67553,8 @@ function FloorPlanCanvas($$anchor, $$props) {
|
|
|
67426
67553
|
drawWindowOnWall(getCS(), wall, win);
|
|
67427
67554
|
}
|
|
67428
67555
|
function drawFurniture(item, selected) {
|
|
67429
|
-
|
|
67556
|
+
const showChrome = selected && !(item.catalogId === "camera" && get(fovSelectionOnly) && item.serial === get(selectedFovSerial));
|
|
67557
|
+
drawFurnitureItem(getCS(), item, showChrome, {
|
|
67430
67558
|
selectedCameraSerial: selectedCameraSerial(),
|
|
67431
67559
|
showCameraCones: showCameraCones(),
|
|
67432
67560
|
showCameraLabels: showCameraLabels(),
|
|
@@ -67858,7 +67986,7 @@ function FloorPlanCanvas($$anchor, $$props) {
|
|
|
67858
67986
|
else zoomToFit();
|
|
67859
67987
|
needsFitToCanvas = false;
|
|
67860
67988
|
}
|
|
67861
|
-
if (get(wallStart) || get(draggingFurnitureId) || get(draggingDoorId) || get(draggingWindowId) || get(draggingStairId) || get(draggingColumnId) || get(draggingWallEndpoint) || get(draggingWallParallel) || get(draggingCurveHandle) || get(draggingHandle) || get(draggingMultiSelect) || get(draggingRoomId) || get(draggingRoomLabelId) || get(draggingTextAnnotationId) || get(draggingGuideId) || get(draggingZoneId) || get(zoneRectDragStart) || get(zonePolyDraft).length > 0 || get(fovPolyDraft).length > 0 || get(measuring) || get(annotating) || get(currentPlacingId) || get(isPlacingStair) || get(isPlacingColumn) || get(marqueeStart) || get(isPanning)) canvasDirty = true;
|
|
67989
|
+
if (get(wallStart) || get(draggingFurnitureId) || get(draggingDoorId) || get(draggingWindowId) || get(draggingStairId) || get(draggingColumnId) || get(draggingWallEndpoint) || get(draggingWallParallel) || get(draggingCurveHandle) || get(draggingHandle) || get(draggingMultiSelect) || get(draggingRoomId) || get(draggingRoomLabelId) || get(draggingTextAnnotationId) || get(draggingGuideId) || get(draggingZoneId) || get(draggingFovVertex) != null || get(zoneRectDragStart) || get(zonePolyDraft).length > 0 || get(fovPolyDraft).length > 0 || get(currentTool) === "cameraFov" || get(measuring) || get(annotating) || get(currentPlacingId) || get(isPlacingStair) || get(isPlacingColumn) || get(marqueeStart) || get(isPanning)) canvasDirty = true;
|
|
67862
67990
|
updateDetectedRooms();
|
|
67863
67991
|
const selId = get(currentSelectedId);
|
|
67864
67992
|
const multiIds = get(currentSelectedIds);
|
|
@@ -68958,11 +69086,8 @@ function FloorPlanCanvas($$anchor, $$props) {
|
|
|
68958
69086
|
x: snap(wp.x),
|
|
68959
69087
|
y: snap(wp.y)
|
|
68960
69088
|
};
|
|
68961
|
-
if (get(fovPolyDraft).length >= 3 && isNearPoint(snapped, get(fovPolyDraft)[0], 15 / get(zoom))) {
|
|
68962
|
-
commitFovFloorPolygon(get(fovPolyDraft));
|
|
68963
|
-
return;
|
|
68964
|
-
}
|
|
68965
69089
|
set(fovPolyDraft, [...get(fovPolyDraft), snapped], true);
|
|
69090
|
+
markDirty();
|
|
68966
69091
|
return;
|
|
68967
69092
|
}
|
|
68968
69093
|
if (tool === "select") {
|
|
@@ -68974,6 +69099,7 @@ function FloorPlanCanvas($$anchor, $$props) {
|
|
|
68974
69099
|
if (zHit) {
|
|
68975
69100
|
set(selectedZoneId, zHit.id, true);
|
|
68976
69101
|
set(selectedFovSerial, null);
|
|
69102
|
+
set(fovSelectionOnly, false);
|
|
68977
69103
|
selectedElementId.set(zHit.id);
|
|
68978
69104
|
set(selectedTextAnnotationId, null);
|
|
68979
69105
|
set(selectedAnnotationId, null);
|
|
@@ -68996,17 +69122,27 @@ function FloorPlanCanvas($$anchor, $$props) {
|
|
|
68996
69122
|
}
|
|
68997
69123
|
const fovHit = findFovCameraAt(wp);
|
|
68998
69124
|
if (fovHit === null || fovHit === void 0 ? void 0 : fovHit.serial) {
|
|
69125
|
+
var _fovHit$props;
|
|
69126
|
+
const bounds = getInteriorFloorBounds(get(currentFloor));
|
|
69127
|
+
const pts = bounds ? mapCoordinatesToWorldPoints((_fovHit$props = fovHit.props) === null || _fovHit$props === void 0 ? void 0 : _fovHit$props.mapCoordinates, bounds) : [];
|
|
69128
|
+
const vIdx = pts.length ? findFovVertexAt(wp, pts) : -1;
|
|
68999
69129
|
set(selectedFovSerial, fovHit.serial, true);
|
|
69130
|
+
set(fovSelectionOnly, true);
|
|
69131
|
+
set(draggingFovVertex, vIdx >= 0 ? vIdx : null, true);
|
|
69000
69132
|
set(selectedZoneId, null);
|
|
69001
69133
|
selectedElementId.set(fovHit.id);
|
|
69002
69134
|
set(selectedTextAnnotationId, null);
|
|
69003
69135
|
set(selectedAnnotationId, null);
|
|
69004
69136
|
set(selectedMeasurementId, null);
|
|
69137
|
+
if (vIdx >= 0) beginUndoGroup();
|
|
69005
69138
|
return;
|
|
69006
69139
|
}
|
|
69007
69140
|
}
|
|
69008
69141
|
set(selectedZoneId, null);
|
|
69009
|
-
if (!objectAboveZone)
|
|
69142
|
+
if (!objectAboveZone) {
|
|
69143
|
+
set(selectedFovSerial, null);
|
|
69144
|
+
set(fovSelectionOnly, false);
|
|
69145
|
+
}
|
|
69010
69146
|
}
|
|
69011
69147
|
if (tool === "select" && ((_$$get10 = get(currentFloor)) === null || _$$get10 === void 0 ? void 0 : _$$get10.guides)) {
|
|
69012
69148
|
const GUIDE_HIT = 6 / get(zoom);
|
|
@@ -69228,20 +69364,22 @@ function FloorPlanCanvas($$anchor, $$props) {
|
|
|
69228
69364
|
}
|
|
69229
69365
|
}
|
|
69230
69366
|
}
|
|
69231
|
-
|
|
69232
|
-
|
|
69233
|
-
|
|
69234
|
-
|
|
69235
|
-
|
|
69236
|
-
|
|
69237
|
-
|
|
69238
|
-
|
|
69239
|
-
|
|
69240
|
-
|
|
69241
|
-
|
|
69242
|
-
|
|
69243
|
-
|
|
69244
|
-
|
|
69367
|
+
if (!get(fovSelectionOnly)) {
|
|
69368
|
+
const handle = findHandleAt$1(wp);
|
|
69369
|
+
if (handle && get(currentSelectedId) && get(currentFloor)) {
|
|
69370
|
+
const fi = get(currentFloor).furniture.find((f) => f.id === get(currentSelectedId));
|
|
69371
|
+
if (fi) {
|
|
69372
|
+
var _fi$scale$x, _fi$scale, _fi$scale$y, _fi$scale2;
|
|
69373
|
+
set(draggingHandle, handle, true);
|
|
69374
|
+
({ ...wp });
|
|
69375
|
+
handleOrigScale = {
|
|
69376
|
+
x: (_fi$scale$x = (_fi$scale = fi.scale) === null || _fi$scale === void 0 ? void 0 : _fi$scale.x) !== null && _fi$scale$x !== void 0 ? _fi$scale$x : 1,
|
|
69377
|
+
y: (_fi$scale$y = (_fi$scale2 = fi.scale) === null || _fi$scale2 === void 0 ? void 0 : _fi$scale2.y) !== null && _fi$scale$y !== void 0 ? _fi$scale$y : 1
|
|
69378
|
+
};
|
|
69379
|
+
fi.rotation;
|
|
69380
|
+
commitFurnitureMove();
|
|
69381
|
+
return;
|
|
69382
|
+
}
|
|
69245
69383
|
}
|
|
69246
69384
|
}
|
|
69247
69385
|
function selectElement(id, isShift, isCtrl = false) {
|
|
@@ -69308,6 +69446,7 @@ function FloorPlanCanvas($$anchor, $$props) {
|
|
|
69308
69446
|
if (fi) {
|
|
69309
69447
|
var _fi$props4;
|
|
69310
69448
|
selectElement(fi.id, e.shiftKey, e.ctrlKey || e.metaKey);
|
|
69449
|
+
set(fovSelectionOnly, false);
|
|
69311
69450
|
if (fi.catalogId === "camera" && fi.serial && ((_fi$props4 = fi.props) === null || _fi$props4 === void 0 ? void 0 : _fi$props4.mapCoordinates)) {
|
|
69312
69451
|
set(selectedFovSerial, fi.serial, true);
|
|
69313
69452
|
set(selectedZoneId, null);
|
|
@@ -69369,6 +69508,7 @@ function FloorPlanCanvas($$anchor, $$props) {
|
|
|
69369
69508
|
selectedElementId.set(null);
|
|
69370
69509
|
selectedElementIds.set(/* @__PURE__ */ new Set());
|
|
69371
69510
|
set(selectedFovSerial, null);
|
|
69511
|
+
set(fovSelectionOnly, false);
|
|
69372
69512
|
set(selectedZoneId, null);
|
|
69373
69513
|
}
|
|
69374
69514
|
selectedRoomId.set(null);
|
|
@@ -69489,6 +69629,22 @@ function FloorPlanCanvas($$anchor, $$props) {
|
|
|
69489
69629
|
x: snap(get(mousePos).x),
|
|
69490
69630
|
y: snap(get(mousePos).y)
|
|
69491
69631
|
}, true);
|
|
69632
|
+
if (get(draggingFovVertex) != null && get(selectedFovSerial) && get(currentFloor)) {
|
|
69633
|
+
const bounds = getInteriorFloorBounds(get(currentFloor));
|
|
69634
|
+
const cam = get(currentFloor).furniture.find((f) => f.catalogId === "camera" && f.serial === get(selectedFovSerial));
|
|
69635
|
+
if (cam && bounds) {
|
|
69636
|
+
var _cam$props2;
|
|
69637
|
+
const pts = mapCoordinatesToWorldPoints((_cam$props2 = cam.props) === null || _cam$props2 === void 0 ? void 0 : _cam$props2.mapCoordinates, bounds);
|
|
69638
|
+
if (pts[get(draggingFovVertex)]) {
|
|
69639
|
+
const next = pts.map((p) => ({ ...p }));
|
|
69640
|
+
next[get(draggingFovVertex)] = {
|
|
69641
|
+
x: snap(get(mousePos).x),
|
|
69642
|
+
y: snap(get(mousePos).y)
|
|
69643
|
+
};
|
|
69644
|
+
setCameraMapCoordinatesFromWorld(get(selectedFovSerial), next);
|
|
69645
|
+
}
|
|
69646
|
+
}
|
|
69647
|
+
}
|
|
69492
69648
|
if (get(draggingZoneId) && ((_$$get12 = get(currentFloor)) === null || _$$get12 === void 0 ? void 0 : _$$get12.zones)) {
|
|
69493
69649
|
const z = get(currentFloor).zones.find((z) => z.id === get(draggingZoneId));
|
|
69494
69650
|
if (z) {
|
|
@@ -69815,6 +69971,10 @@ function FloorPlanCanvas($$anchor, $$props) {
|
|
|
69815
69971
|
set(draggingZoneVertex, null);
|
|
69816
69972
|
set(zoneDragLast, null);
|
|
69817
69973
|
}
|
|
69974
|
+
if (get(draggingFovVertex) != null) {
|
|
69975
|
+
endUndoGroup();
|
|
69976
|
+
set(draggingFovVertex, null);
|
|
69977
|
+
}
|
|
69818
69978
|
if (get(draggingRoomLabelId)) {
|
|
69819
69979
|
const dx = get(mousePos).x - roomLabelDragStart.x;
|
|
69820
69980
|
const dy = get(mousePos).y - roomLabelDragStart.y;
|