ire-preview 2.0.3 → 2.0.4

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/lib.es.js CHANGED
@@ -54,8 +54,8 @@ function prepareDeps(o) {
54
54
  function cleanupDeps(o) {
55
55
  let e, t = o.depsTail, r = t;
56
56
  for (; r; ) {
57
- const n = r.prevDep;
58
- r.version === -1 ? (r === t && (t = n), removeSub(r), removeDep(r)) : e = r, r.dep.activeLink = r.prevActiveLink, r.prevActiveLink = void 0, r = n;
57
+ const p = r.prevDep;
58
+ r.version === -1 ? (r === t && (t = p), removeSub(r), removeDep(r)) : e = r, r.dep.activeLink = r.prevActiveLink, r.prevActiveLink = void 0, r = p;
59
59
  }
60
60
  o.deps = e, o.depsTail = t;
61
61
  }
@@ -78,20 +78,20 @@ function refreshComputed(o) {
78
78
  activeSub = o, shouldTrack = !0;
79
79
  try {
80
80
  prepareDeps(o);
81
- const n = o.fn(o._value);
82
- (e.version === 0 || hasChanged(n, o._value)) && (o._value = n, e.version++);
83
- } catch (n) {
84
- throw e.version++, n;
81
+ const p = o.fn(o._value);
82
+ (e.version === 0 || hasChanged(p, o._value)) && (o._value = p, e.version++);
83
+ } catch (p) {
84
+ throw e.version++, p;
85
85
  } finally {
86
86
  activeSub = t, shouldTrack = r, cleanupDeps(o), o.flags &= -3;
87
87
  }
88
88
  }
89
89
  function removeSub(o, e = !1) {
90
- const { dep: t, prevSub: r, nextSub: n } = o;
91
- if (r && (r.nextSub = n, o.prevSub = void 0), n && (n.prevSub = r, o.nextSub = void 0), t.subs === o && (t.subs = r, !r && t.computed)) {
90
+ const { dep: t, prevSub: r, nextSub: p } = o;
91
+ if (r && (r.nextSub = p, o.prevSub = void 0), p && (p.prevSub = r, o.nextSub = void 0), t.subs === o && (t.subs = r, !r && t.computed)) {
92
92
  t.computed.flags &= -5;
93
- for (let p = t.computed.deps; p; p = p.nextDep)
94
- removeSub(p, !0);
93
+ for (let v = t.computed.deps; v; v = v.nextDep)
94
+ removeSub(v, !0);
95
95
  }
96
96
  !e && !--t.sc && t.map && t.map.delete(t.key);
97
97
  }
@@ -170,8 +170,8 @@ class ComputedRefImpl {
170
170
  }
171
171
  }
172
172
  function computed(o, e, t = !1) {
173
- let r, n;
174
- return isFunction(o) ? r = o : (r = o.get, n = o.set), new ComputedRefImpl(r, n, t);
173
+ let r, p;
174
+ return isFunction(o) ? r = o : (r = o.get, p = o.set), new ComputedRefImpl(r, p, t);
175
175
  }
176
176
  const _hoisted_1$f = {
177
177
  key: 0,
@@ -219,48 +219,48 @@ const _hoisted_1$f = {
219
219
  return (e, t) => (openBlock(), createElementBlock("div", null, [
220
220
  createVNode(Transition, { name: "ire-fade-in-out" }, {
221
221
  default: withCtx(() => {
222
- var r, n, p, d, a, i, l, h, c, u, g, m, b, s, f, k, _, v, y, w;
222
+ var r, p, v, a, c, i, s, b, d, n, _, h, k, l, u, f, m, g, y, w, x, C, V, $, E, B, N;
223
223
  return [
224
224
  e.type && e.hoveredData && e.type !== "tooltip" ? (openBlock(), createElementBlock("div", _hoisted_1$f, [
225
225
  e.type === "floor" ? (openBlock(), createElementBlock("div", _hoisted_2$8, [
226
226
  createElementVNode("div", _hoisted_3$6, [
227
- createElementVNode("p", _hoisted_4$5, toDisplayString(e.hoveredData.floor_number), 1),
227
+ createElementVNode("p", _hoisted_4$5, toDisplayString((r = e.hoveredData) == null ? void 0 : r.floor_number), 1),
228
228
  t[0] || (t[0] = createElementVNode("p", { class: "!ire-text-sm ire-uppercase" }, "Floor", -1))
229
229
  ]),
230
- (r = e.hoveredData) != null && r.conf || (p = (n = e.hoveredData) == null ? void 0 : n.flats) != null && p.length ? (openBlock(), createElementBlock("div", _hoisted_5$1, [
231
- (d = e.hoveredData) != null && d.conf ? (openBlock(), createElementBlock("div", _hoisted_6$1, toDisplayString(e.hoveredData.conf), 1)) : (openBlock(), createElementBlock("div", _hoisted_7$1, [
232
- (i = (a = e.hoveredData) == null ? void 0 : a.counts) != null && i.available ? (openBlock(), createElementBlock("div", _hoisted_8$1, [
233
- createElementVNode("p", _hoisted_9$1, toDisplayString(((h = (l = e.hoveredData) == null ? void 0 : l.counts) == null ? void 0 : h.available) || 0), 1),
230
+ (p = e.hoveredData) != null && p.conf || (a = (v = e.hoveredData) == null ? void 0 : v.flats) != null && a.length ? (openBlock(), createElementBlock("div", _hoisted_5$1, [
231
+ (c = e.hoveredData) != null && c.conf ? (openBlock(), createElementBlock("div", _hoisted_6$1, toDisplayString((i = e.hoveredData) == null ? void 0 : i.conf), 1)) : (openBlock(), createElementBlock("div", _hoisted_7$1, [
232
+ (b = (s = e.hoveredData) == null ? void 0 : s.counts) != null && b.available ? (openBlock(), createElementBlock("div", _hoisted_8$1, [
233
+ createElementVNode("p", _hoisted_9$1, toDisplayString(((n = (d = e.hoveredData) == null ? void 0 : d.counts) == null ? void 0 : n.available) || 0), 1),
234
234
  t[1] || (t[1] = createElementVNode("p", { class: "!ire-text-sm ire-uppercase" }, "Available", -1))
235
235
  ])) : createCommentVNode("", !0),
236
- (u = (c = e.hoveredData) == null ? void 0 : c.counts) != null && u.reserved ? (openBlock(), createElementBlock("div", _hoisted_10$1, [
237
- createElementVNode("p", _hoisted_11$1, toDisplayString(e.hoveredData.counts.reserved), 1),
236
+ (h = (_ = e.hoveredData) == null ? void 0 : _.counts) != null && h.reserved ? (openBlock(), createElementBlock("div", _hoisted_10$1, [
237
+ createElementVNode("p", _hoisted_11$1, toDisplayString((l = (k = e.hoveredData) == null ? void 0 : k.counts) == null ? void 0 : l.reserved), 1),
238
238
  t[2] || (t[2] = createElementVNode("p", { class: "!ire-text-sm ire-uppercase" }, "Reserved", -1))
239
239
  ])) : createCommentVNode("", !0),
240
- (m = (g = e.hoveredData) == null ? void 0 : g.counts) != null && m.sold ? (openBlock(), createElementBlock("div", _hoisted_12$1, [
241
- createElementVNode("p", _hoisted_13$1, toDisplayString(e.hoveredData.counts.sold), 1),
240
+ (f = (u = e.hoveredData) == null ? void 0 : u.counts) != null && f.sold ? (openBlock(), createElementBlock("div", _hoisted_12$1, [
241
+ createElementVNode("p", _hoisted_13$1, toDisplayString((g = (m = e.hoveredData) == null ? void 0 : m.counts) == null ? void 0 : g.sold), 1),
242
242
  t[3] || (t[3] = createElementVNode("p", { class: "!ire-text-sm ire-uppercase" }, "Sold", -1))
243
243
  ])) : createCommentVNode("", !0)
244
244
  ]))
245
245
  ])) : createCommentVNode("", !0)
246
246
  ])) : e.type === "block" ? (openBlock(), createElementBlock("div", _hoisted_14$1, [
247
247
  createElementVNode("div", _hoisted_15$1, [
248
- createElementVNode("p", _hoisted_16$1, toDisplayString(e.hoveredData.title), 1)
248
+ createElementVNode("p", _hoisted_16$1, toDisplayString((y = e.hoveredData) == null ? void 0 : y.title), 1)
249
249
  ])
250
250
  ])) : e.type === "flat" ? (openBlock(), createElementBlock("div", _hoisted_17$1, [
251
251
  createElementVNode("div", _hoisted_18$1, [
252
- createElementVNode("p", _hoisted_19$1, toDisplayString((b = e.hoveredData) == null ? void 0 : b.flat_number), 1),
252
+ createElementVNode("p", _hoisted_19$1, toDisplayString((w = e.hoveredData) == null ? void 0 : w.flat_number), 1),
253
253
  t[4] || (t[4] = createElementVNode("p", { class: "!ire-mt-2 !ire-text-xs ire-uppercase" }, "Apartment", -1))
254
254
  ]),
255
255
  createElementVNode("div", _hoisted_20$1, [
256
- (s = e.hoveredData) != null && s.conf ? (openBlock(), createElementBlock("p", _hoisted_21$1, toDisplayString(e.hoveredData.conf), 1)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
256
+ (x = e.hoveredData) != null && x.conf ? (openBlock(), createElementBlock("p", _hoisted_21$1, toDisplayString(e.hoveredData.conf), 1)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
257
257
  t[7] || (t[7] = createElementVNode("p", { class: "!ire-text-xs ire-uppercase ire-text-gray-500" }, "Price", -1)),
258
- (f = e.hoveredData) != null && f.price ? (openBlock(), createElementBlock("div", _hoisted_22$1, [
258
+ (C = e.hoveredData) != null && C.price ? (openBlock(), createElementBlock("div", _hoisted_22$1, [
259
259
  createElementVNode("div", null, [
260
- (k = e.hoveredData) != null && k.offer_price ? (openBlock(), createElementBlock("div", _hoisted_24$1, [
261
- createElementVNode("p", _hoisted_25$1, toDisplayString(Number((_ = e.hoveredData) == null ? void 0 : _.price).toLocaleString()), 1),
260
+ (V = e.hoveredData) != null && V.offer_price ? (openBlock(), createElementBlock("div", _hoisted_24$1, [
261
+ createElementVNode("p", _hoisted_25$1, toDisplayString(Number(($ = e.hoveredData) == null ? void 0 : $.price).toLocaleString()), 1),
262
262
  createElementVNode("p", _hoisted_26$1, [
263
- createTextVNode(toDisplayString(Number((v = e.hoveredData) == null ? void 0 : v.offer_price).toLocaleString()), 1),
263
+ createTextVNode(toDisplayString(Number((E = e.hoveredData) == null ? void 0 : E.offer_price).toLocaleString()), 1),
264
264
  t[6] || (t[6] = createElementVNode("sup", { class: "!ire-text-sm" }, "$", -1))
265
265
  ])
266
266
  ])) : (openBlock(), createElementBlock("p", _hoisted_23$1, [
@@ -273,7 +273,7 @@ const _hoisted_1$f = {
273
273
  ]),
274
274
  createElementVNode("div", _hoisted_27, [
275
275
  createElementVNode("p", _hoisted_28, [
276
- createTextVNode(toDisplayString((w = (y = e.hoveredData) == null ? void 0 : y.type) == null ? void 0 : w.area_m2) + " M", 1),
276
+ createTextVNode(toDisplayString((N = (B = e.hoveredData) == null ? void 0 : B.type) == null ? void 0 : N.area_m2) + " M", 1),
277
277
  t[8] || (t[8] = createElementVNode("sup", { class: "ire-bg-white !ire-text-xs" }, " 2 ", -1))
278
278
  ])
279
279
  ])
@@ -319,74 +319,77 @@ const _hoisted_1$f = {
319
319
  },
320
320
  emits: ["changeComponent"],
321
321
  setup(o, { emit: e }) {
322
- const t = e, r = o, n = ref(), p = ref(), d = ref(null), a = computed(() => {
322
+ const t = e, r = o, p = ref(), v = ref(), a = ref(null), c = computed(() => {
323
323
  if (r.project)
324
324
  return r.project.svg;
325
325
  }), i = computed(() => {
326
- var u, g;
327
- const c = (g = (u = r.projectMeta) == null ? void 0 : u.find(
328
- (m) => m.meta_key === "project_img_contain"
329
- )) == null ? void 0 : g.meta_value;
330
- return JSON.parse((c == null ? void 0 : c.toString()) || "false");
331
- }), l = (c) => {
332
- const u = c.target;
333
- u && (n.value = u);
334
- }, h = (c) => {
335
- var g, m, b;
336
- c.target.nodeName === "path" && (((g = p.value) == null ? void 0 : g.conf) === "sold" || ((m = p.value) == null ? void 0 : m.conf) === "reserved" || t("changeComponent", ((b = d.value) == null ? void 0 : b.type) || "", p.value));
326
+ var n, _;
327
+ const d = (_ = (n = r.projectMeta) == null ? void 0 : n.find(
328
+ (h) => (h == null ? void 0 : h.meta_key) === "project_img_contain"
329
+ )) == null ? void 0 : _.meta_value;
330
+ return JSON.parse((d == null ? void 0 : d.toString()) || "false");
331
+ }), s = (d) => {
332
+ const n = d.target;
333
+ n && (p.value = n);
334
+ }, b = (d) => {
335
+ var _, h, k;
336
+ const n = d.target;
337
+ (n == null ? void 0 : n.nodeName) === "path" && (((_ = v.value) == null ? void 0 : _.conf) === "sold" || ((h = v.value) == null ? void 0 : h.conf) === "reserved" || t("changeComponent", ((k = a.value) == null ? void 0 : k.type) || "", v == null ? void 0 : v.value));
337
338
  };
338
339
  return watch(
339
- () => n.value,
340
- (c) => {
341
- var g, m, b, s, f, k, _;
342
- if (!c) return;
343
- const u = c.parentElement;
344
- if (u && u.nodeName === "g") {
345
- const v = u.getAttribute("id");
346
- if (!v || (d.value = ((g = r.project) == null ? void 0 : g.polygon_data.find((w) => w.key === v)) || null, !d.value)) return;
347
- const y = (m = d.value) == null ? void 0 : m.id;
348
- switch ((b = d.value) == null ? void 0 : b.type) {
340
+ () => p.value,
341
+ (d) => {
342
+ var _, h, k, l, u, f, m;
343
+ if (!d) return;
344
+ const n = d.parentElement;
345
+ if (n && (n == null ? void 0 : n.nodeName) === "g") {
346
+ const g = n == null ? void 0 : n.getAttribute("id");
347
+ if (!g || (a.value = ((_ = r.project) == null ? void 0 : _.polygon_data.find((w) => (w == null ? void 0 : w.key) === g)) || null, !a.value)) return;
348
+ const y = (h = a.value) == null ? void 0 : h.id;
349
+ switch ((k = a.value) == null ? void 0 : k.type) {
349
350
  case "floor":
350
- const w = (s = r.floors) == null ? void 0 : s.find(
351
- (x) => x.id === y
351
+ const w = (l = r.floors) == null ? void 0 : l.find(
352
+ ($) => $.id === y
352
353
  );
353
- p.value = w;
354
+ v.value = w;
354
355
  break;
355
356
  case "block":
356
- const $ = (f = r.blocks) == null ? void 0 : f.find(
357
- (x) => x.id === y
357
+ const x = (u = r.blocks) == null ? void 0 : u.find(
358
+ ($) => ($ == null ? void 0 : $.id) === y
358
359
  );
359
- p.value = $;
360
+ v.value = x;
360
361
  break;
361
362
  case "flat":
362
- const C = (k = r.flats) == null ? void 0 : k.find((x) => x.id === y);
363
- p.value = C;
363
+ const C = (f = r.flats) == null ? void 0 : f.find(
364
+ ($) => ($ == null ? void 0 : $.id) === y
365
+ );
366
+ v.value = C;
364
367
  break;
365
368
  case "tooltip":
366
- const D = (_ = r.actions) == null ? void 0 : _.find(
367
- (x) => x.id === y
369
+ const V = (m = r.actions) == null ? void 0 : m.find(
370
+ ($) => ($ == null ? void 0 : $.id) === y
368
371
  );
369
- p.value = D;
372
+ v.value = V;
370
373
  break;
371
374
  default:
372
- p.value = null;
375
+ v.value = null;
373
376
  break;
374
377
  }
375
378
  } else
376
- d.value = null, p.value = null;
379
+ a.value = null, v.value = null;
377
380
  }
378
- ), (c, u) => {
379
- var g;
381
+ ), (d, n) => {
382
+ var _;
380
383
  return openBlock(), createBlock(_sfc_main$f, {
381
- hoverdData: p.value,
382
- type: (g = d.value) == null ? void 0 : g.type
384
+ hoverdData: v.value,
385
+ type: (_ = a.value) == null ? void 0 : _.type
383
386
  }, {
384
387
  default: withCtx(() => {
385
- var m, b, s, f;
388
+ var h, k, l, u, f, m;
386
389
  return [
387
390
  createElementVNode("div", _hoisted_1$d, [
388
391
  createElementVNode("img", {
389
- src: (m = c.project) == null ? void 0 : m.project_image[0].url,
392
+ src: (l = (k = (h = d.project) == null ? void 0 : h.project_image) == null ? void 0 : k[0]) == null ? void 0 : l.url,
390
393
  alt: "",
391
394
  class: normalizeClass(["ire-absolute ire-left-0 ire-top-0 ire-h-full ire-w-full", {
392
395
  "ire-object-contain": unref(i),
@@ -396,15 +399,15 @@ const _hoisted_1$f = {
396
399
  (openBlock(), createElementBlock("div", {
397
400
  class: normalizeClass(["canvas ire-absolute ire-left-0 ire-top-0 ire-h-full ire-w-full [&_path]:ire-cursor-pointer [&_path]:ire-fill-[var(--path-color)] [&_path]:ire-transition-all", [
398
401
  {
399
- "hover:[&_path]:ire-fill-[var(--reserved-color)]": p.value && ((b = p.value) == null ? void 0 : b.conf) === "reserved",
400
- "hover:[&_path]:ire-fill-[var(--sold-color)]": p.value && ((s = p.value) == null ? void 0 : s.conf) === "sold",
401
- "hover:[&_path]:ire-fill-[var(--path-hover-color)]": !((f = p.value) != null && f.conf)
402
+ "hover:[&_path]:ire-fill-[var(--reserved-color)]": v.value && ((u = v.value) == null ? void 0 : u.conf) === "reserved",
403
+ "hover:[&_path]:ire-fill-[var(--sold-color)]": v.value && ((f = v.value) == null ? void 0 : f.conf) === "sold",
404
+ "hover:[&_path]:ire-fill-[var(--path-hover-color)]": !((m = v.value) != null && m.conf)
402
405
  }
403
406
  ]]),
404
- innerHTML: unref(a),
405
- key: unref(a),
406
- onMouseover: l,
407
- onClick: h
407
+ innerHTML: unref(c),
408
+ key: unref(c),
409
+ onMouseover: s,
410
+ onClick: b
408
411
  }, null, 42, _hoisted_3$5))
409
412
  ])
410
413
  ];
@@ -435,13 +438,16 @@ const _hoisted_1$f = {
435
438
  t.label ? (openBlock(), createElementBlock("p", _hoisted_2$5, toDisplayString(t.label), 1)) : createCommentVNode("", !0),
436
439
  createElementVNode("div", _hoisted_3$4, [
437
440
  withDirectives(createElementVNode("select", {
438
- "onUpdate:modelValue": r[0] || (r[0] = (n) => e.value = n),
441
+ "onUpdate:modelValue": r[0] || (r[0] = (p) => e.value = p),
439
442
  class: "ire-w-full ire-cursor-pointer ire-appearance-none ire-rounded-none ire-bg-transparent ire-py-2 ire-pl-3 ire-pr-8 ire-text-sm ire-text-slate-700 ire-shadow-sm ire-transition ire-duration-300 ire-ease-linear placeholder:ire-text-slate-400 hover:ire-border-slate-400 focus:ire-border-slate-400 focus:ire-shadow-md focus:ire-outline-none"
440
443
  }, [
441
- (openBlock(!0), createElementBlock(Fragment, null, renderList(t.data, (n) => (openBlock(), createElementBlock("option", {
442
- value: n.value,
443
- disabled: n.title.includes("reserved") || n.title.includes("sold")
444
- }, toDisplayString(n.title), 9, _hoisted_4$4))), 256))
444
+ (openBlock(!0), createElementBlock(Fragment, null, renderList(t.data, (p) => {
445
+ var v, a;
446
+ return openBlock(), createElementBlock("option", {
447
+ value: p.value,
448
+ disabled: ((v = p == null ? void 0 : p.title) == null ? void 0 : v.includes("reserved")) || ((a = p == null ? void 0 : p.title) == null ? void 0 : a.includes("sold"))
449
+ }, toDisplayString(p.title), 9, _hoisted_4$4);
450
+ }), 256))
445
451
  ], 512), [
446
452
  [vModelSelect, e.value]
447
453
  ]),
@@ -464,8 +470,8 @@ const _hoisted_1$f = {
464
470
  }
465
471
  }), _export_sfc = (o, e) => {
466
472
  const t = o.__vccOpts || o;
467
- for (const [r, n] of e)
468
- t[r] = n;
473
+ for (const [r, p] of e)
474
+ t[r] = p;
469
475
  return t;
470
476
  }, _sfc_main$c = {}, _hoisted_1$b = {
471
477
  xmlns: "http://www.w3.org/2000/svg",
@@ -496,137 +502,154 @@ const ArrowRight = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["render", _sfc_ren
496
502
  flats: {},
497
503
  floor: {},
498
504
  floors: {},
499
- blocks: {}
505
+ blocks: {},
506
+ actions: {}
500
507
  },
501
508
  emits: ["changeComponent"],
502
509
  setup(o, { emit: e }) {
503
- const t = e, r = o, n = ref(), p = ref(), d = ref(), a = ref(), i = ref(), l = ref(), h = computed$1(() => {
504
- var s;
505
- if ((s = r.floor) != null && s.svg)
510
+ const t = e, r = o, p = ref(), v = ref(), a = ref(), c = ref(null), i = ref(), s = ref(), b = computed$1(() => {
511
+ var l;
512
+ if ((l = r.floor) != null && l.svg)
506
513
  return r.floor.svg;
507
- }), c = computed$1(() => r.floors.filter(
508
- (s) => (
509
- // floorItem.conf !== "reserved" &&
510
- // floorItem.conf !== "sold" &&
511
- r.floor.block_id ? s.block_id === r.floor.block_id : !s.block_id
512
- )
513
- ).map((s) => {
514
- var k, _;
515
- const f = (k = r.blocks) == null ? void 0 : k.find(
516
- (v) => {
514
+ }), d = computed$1(() => r.floors.filter(
515
+ (l) => {
516
+ var u, f;
517
+ return (
518
+ // floorItem.conf !== "reserved" &&
519
+ // floorItem.conf !== "sold" &&
520
+ (u = r.floor) != null && u.block_id ? (l == null ? void 0 : l.block_id) === ((f = r.floor) == null ? void 0 : f.block_id) : !(l != null && l.block_id)
521
+ );
522
+ }
523
+ ).map((l) => {
524
+ var f, m;
525
+ const u = (f = r.blocks) == null ? void 0 : f.find(
526
+ (g) => {
517
527
  var y;
518
- return (v == null ? void 0 : v.id) === ((y = s.block_id) == null ? void 0 : y.toString());
528
+ return (g == null ? void 0 : g.id) === ((y = l == null ? void 0 : l.block_id) == null ? void 0 : y.toString());
519
529
  }
520
530
  );
521
531
  return {
522
- title: ((_ = s == null ? void 0 : s.floor_number) == null ? void 0 : _.toString()) + " Floor" + (f != null && f.id ? ` - ${f == null ? void 0 : f.title}` : "") + (s != null && s.conf ? " " + s.conf : ""),
523
- value: s.id
532
+ title: ((m = l == null ? void 0 : l.floor_number) == null ? void 0 : m.toString()) + " Floor" + (u != null && u.id ? ` - ${u == null ? void 0 : u.title}` : "") + (l != null && l.conf ? " " + l.conf : ""),
533
+ value: l == null ? void 0 : l.id
524
534
  };
525
- }).sort((s, f) => +s.title - +f.title) || []), u = (s) => {
526
- const f = s.target;
527
- f && (p.value = f);
528
- }, g = (s) => {
529
- var k, _, v;
530
- s.target.nodeName === "path" && (((k = a.value) == null ? void 0 : k.conf) === "sold" || ((_ = a.value) == null ? void 0 : _.conf) === "reserved" || t("changeComponent", ((v = d.value) == null ? void 0 : v.type) || "", a.value));
531
- }, m = () => {
532
- n.value && n.value.querySelectorAll("g").forEach((f) => {
533
- var v, y, w;
534
- const k = f.getAttribute("id"), _ = r.floor.polygon_data.find(
535
- ($) => $.key === k
535
+ }).sort((l, u) => +(l == null ? void 0 : l.title) - +(u == null ? void 0 : u.title)) || []), n = (l) => {
536
+ const u = l.target;
537
+ u && (v.value = u);
538
+ }, _ = (l) => {
539
+ var f, m, g;
540
+ const u = l.target;
541
+ (u == null ? void 0 : u.nodeName) === "path" && (c.value && "conf" in c.value && (((f = c.value) == null ? void 0 : f.conf) === "sold" || ((m = c.value) == null ? void 0 : m.conf) === "reserved") || t("changeComponent", ((g = a.value) == null ? void 0 : g.type) || "", c.value));
542
+ }, h = () => {
543
+ var l;
544
+ p.value && ((l = p.value) == null ? void 0 : l.querySelectorAll("g")).forEach((f) => {
545
+ var y, w, x, C, V, $;
546
+ const m = f == null ? void 0 : f.getAttribute("id"), g = (w = (y = r.floor) == null ? void 0 : y.polygon_data) == null ? void 0 : w.find(
547
+ (E) => (E == null ? void 0 : E.key) === m
536
548
  );
537
549
  if (r.flats)
538
- if (r.floor.conf)
539
- f.setAttribute("conf", ((v = r.floor) == null ? void 0 : v.conf) || "");
550
+ if ((x = r.floor) != null && x.conf)
551
+ f.setAttribute("conf", ((C = r.floor) == null ? void 0 : C.conf) || "");
540
552
  else {
541
- const $ = (y = r.flats) == null ? void 0 : y.find(
542
- (C) => C.id === (_ == null ? void 0 : _.id)
553
+ const E = (V = r.flats) == null ? void 0 : V.find(
554
+ (B) => (B == null ? void 0 : B.id) === (g == null ? void 0 : g.id)
543
555
  );
544
- f.setAttribute("conf", ((w = $ == null ? void 0 : $.conf) == null ? void 0 : w.toString()) || "");
556
+ f == null || f.setAttribute("conf", (($ = E == null ? void 0 : E.conf) == null ? void 0 : $.toString()) || "");
545
557
  }
546
558
  });
547
- }, b = () => {
548
- r.floor.block_id ? t("changeComponent", "block", l.value) : t("changeComponent", "project", null);
559
+ }, k = () => {
560
+ var l;
561
+ (l = r.floor) != null && l.block_id ? t("changeComponent", "block", s.value) : t("changeComponent", "project", null);
549
562
  };
550
563
  return watch(
551
- () => p.value,
552
- (s) => {
553
- var k, _, v;
554
- if (!s) return;
555
- const f = s.parentElement;
556
- if (f && f.nodeName === "g") {
557
- const y = f.getAttribute("id");
558
- if (!y || (d.value = ((k = r.floor) == null ? void 0 : k.polygon_data.find((w) => w.key === y)) || null, !d.value)) return;
559
- if (((_ = d.value) == null ? void 0 : _.type) === "flat") {
560
- const w = (v = r.flats) == null ? void 0 : v.find(
564
+ () => v.value,
565
+ (l) => {
566
+ var f, m, g, y, w, x;
567
+ if (!l) return;
568
+ const u = l == null ? void 0 : l.parentElement;
569
+ if (u && (u == null ? void 0 : u.nodeName) === "g") {
570
+ const C = u.getAttribute("id");
571
+ if (!C || (a.value = ((m = (f = r.floor) == null ? void 0 : f.polygon_data) == null ? void 0 : m.find((V) => (V == null ? void 0 : V.key) === C)) || null, !a.value)) return;
572
+ if (((g = a.value) == null ? void 0 : g.type) === "flat") {
573
+ const V = (y = r.flats) == null ? void 0 : y.find(
561
574
  ($) => {
562
- var C;
563
- return ($ == null ? void 0 : $.id) === ((C = d.value) == null ? void 0 : C.id);
575
+ var E;
576
+ return ($ == null ? void 0 : $.id) === ((E = a.value) == null ? void 0 : E.id);
564
577
  }
565
578
  );
566
- a.value = w;
567
- }
579
+ c.value = V ?? null;
580
+ } else if (((w = a.value) == null ? void 0 : w.type) === "tooltip") {
581
+ const V = (x = r.actions) == null ? void 0 : x.find(
582
+ ($) => {
583
+ var E;
584
+ return ($ == null ? void 0 : $.id) === ((E = a.value) == null ? void 0 : E.id);
585
+ }
586
+ );
587
+ c.value = V ?? null;
588
+ } else
589
+ c.value = null;
568
590
  } else
569
- d.value = null;
591
+ a.value = null;
570
592
  }
571
593
  ), watch(
572
594
  () => i.value,
573
595
  () => {
574
- const s = r.floors.find(
575
- (f) => f.id === i.value
596
+ var u;
597
+ const l = (u = r.floors) == null ? void 0 : u.find(
598
+ (f) => (f == null ? void 0 : f.id) === (i == null ? void 0 : i.value)
576
599
  );
577
- s != null && s.conf || (s && t("changeComponent", "floor", s), setTimeout(() => {
578
- m();
600
+ l != null && l.conf || (l && t("changeComponent", "floor", l), setTimeout(() => {
601
+ h();
579
602
  }, 0));
580
603
  }
581
604
  ), onMounted(() => {
582
- var s, f, k;
583
- l.value = (s = r.blocks) == null ? void 0 : s.find(
584
- (_) => {
585
- var v;
586
- return _.id === ((v = r.floor.block_id) == null ? void 0 : v.toString());
605
+ var l, u, f;
606
+ s.value = (l = r.blocks) == null ? void 0 : l.find(
607
+ (m) => {
608
+ var g, y;
609
+ return (m == null ? void 0 : m.id) === ((y = (g = r.floor) == null ? void 0 : g.block_id) == null ? void 0 : y.toString());
587
610
  }
588
- ), i.value = (k = (f = c.value) == null ? void 0 : f.find(
589
- (_) => {
590
- var v;
591
- return (_ == null ? void 0 : _.value) == ((v = r.floor) == null ? void 0 : v.id);
611
+ ), i.value = (f = (u = d.value) == null ? void 0 : u.find(
612
+ (m) => {
613
+ var g;
614
+ return (m == null ? void 0 : m.value) == ((g = r.floor) == null ? void 0 : g.id);
592
615
  }
593
- )) == null ? void 0 : k.value, m();
594
- }), (s, f) => {
595
- var k;
616
+ )) == null ? void 0 : f.value, h();
617
+ }), (l, u) => {
618
+ var f;
596
619
  return openBlock(), createBlock(_sfc_main$f, {
597
- hoverdData: a.value,
598
- type: (k = d.value) == null ? void 0 : k.type
620
+ hoverdData: c.value,
621
+ type: (f = a.value) == null ? void 0 : f.type
599
622
  }, {
600
623
  header: withCtx(() => [
601
- createVNode(_sfc_main$b, { onClick: b }),
624
+ createVNode(_sfc_main$b, { onClick: k }),
602
625
  createElementVNode("div", _hoisted_1$9, [
603
626
  createVNode(_sfc_main$d, {
604
627
  modelValue: i.value,
605
- "onUpdate:modelValue": f[0] || (f[0] = (_) => i.value = _),
606
- data: c.value
628
+ "onUpdate:modelValue": u[0] || (u[0] = (m) => i.value = m),
629
+ data: d.value
607
630
  }, null, 8, ["modelValue", "data"])
608
631
  ])
609
632
  ]),
610
633
  default: withCtx(() => {
611
- var _, v;
634
+ var m, g, y, w, x;
612
635
  return [
613
636
  createElementVNode("div", _hoisted_2$4, [
614
637
  createElementVNode("img", {
615
- src: ((v = (_ = s.floor.floor_image) == null ? void 0 : _[0]) == null ? void 0 : v.url) || "",
638
+ src: ((y = (g = (m = l.floor) == null ? void 0 : m.floor_image) == null ? void 0 : g[0]) == null ? void 0 : y.url) || "",
616
639
  alt: "",
617
640
  class: normalizeClass(["ire-absolute ire-left-0 ire-top-0 ire-h-full ire-w-full", {
618
- "ire-object-contain": s.floor.img_contain,
619
- "ire-object-cover": !s.floor.img_contain
641
+ "ire-object-contain": (w = l.floor) == null ? void 0 : w.img_contain,
642
+ "ire-object-cover": !((x = l.floor) != null && x.img_contain)
620
643
  }])
621
644
  }, null, 10, _hoisted_3$3),
622
645
  (openBlock(), createElementBlock("div", {
623
646
  ref_key: "svgRef",
624
- ref: n,
647
+ ref: p,
625
648
  class: "canvas ire-absolute ire-left-0 ire-top-0 ire-h-full ire-w-full [&_g[conf=reserved]_path]:ire-fill-[var(--reserved-color)] [&_g[conf=sold]_path]:ire-fill-[var(--sold-color)] [&_path]:ire-cursor-pointer [&_path]:ire-fill-[var(--path-color)] [&_path]:!ire-transition-all hover:[&_path]:ire-fill-[var(--path-hover-color)]",
626
- innerHTML: h.value,
627
- key: h.value,
628
- onMouseover: u,
629
- onClick: g
649
+ innerHTML: b.value,
650
+ key: b.value,
651
+ onMouseover: n,
652
+ onClick: _
630
653
  }, null, 40, _hoisted_4$3))
631
654
  ])
632
655
  ];
@@ -702,35 +725,35 @@ const Cube = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["render", _sfc_render$1]
702
725
  },
703
726
  emits: ["changeComponent"],
704
727
  setup(o, { emit: e }) {
705
- const t = e, r = o, n = ref(!0), p = ref(0), d = computed$1(() => {
706
- var l, h, c, u, g, m;
707
- const i = n.value ? (c = (h = (l = r.flat) == null ? void 0 : l.type) == null ? void 0 : h.image_2d) == null ? void 0 : c.length : (m = (g = (u = r.flat) == null ? void 0 : u.type) == null ? void 0 : g.image_3d) == null ? void 0 : m.length;
728
+ const t = e, r = o, p = ref(!0), v = ref(0), a = computed$1(() => {
729
+ var s, b, d, n, _, h;
730
+ const i = p.value ? (d = (b = (s = r.flat) == null ? void 0 : s.type) == null ? void 0 : b.image_2d) == null ? void 0 : d.length : (h = (_ = (n = r.flat) == null ? void 0 : n.type) == null ? void 0 : _.image_3d) == null ? void 0 : h.length;
708
731
  return ["I", "II", "III"].slice(0, i);
709
- }), a = () => {
710
- var l;
711
- const i = (l = r.floors) == null ? void 0 : l.find(
712
- (h) => {
713
- var c, u, g, m;
714
- return ((c = h.floor_number) == null ? void 0 : c.toString()) === ((g = (u = r.flat) == null ? void 0 : u.floor_number) == null ? void 0 : g.toString()) && (r.flat.block_id ? ((m = h == null ? void 0 : h.block_id) == null ? void 0 : m.toString()) === r.flat.block_id : !h.block_id);
732
+ }), c = () => {
733
+ var s;
734
+ const i = (s = r.floors) == null ? void 0 : s.find(
735
+ (b) => {
736
+ var d, n, _, h, k, l;
737
+ return ((d = b.floor_number) == null ? void 0 : d.toString()) === ((_ = (n = r.flat) == null ? void 0 : n.floor_number) == null ? void 0 : _.toString()) && ((h = r.flat) != null && h.block_id ? ((k = b == null ? void 0 : b.block_id) == null ? void 0 : k.toString()) === ((l = r.flat) == null ? void 0 : l.block_id) : !(b != null && b.block_id));
715
738
  }
716
739
  );
717
740
  i ? t("changeComponent", "floor", i) : t("changeComponent", "project", null);
718
741
  };
719
742
  return watch(
720
- () => n.value,
743
+ () => p.value,
721
744
  () => {
722
- p.value = 0;
745
+ v.value = 0;
723
746
  }
724
747
  ), onMounted(() => {
725
- var i, l;
726
- (l = (i = r.flat) == null ? void 0 : i.type) != null && l.image_2d || (n.value = !1);
727
- }), (i, l) => (openBlock(), createElementBlock("div", null, [
748
+ var i, s;
749
+ (s = (i = r.flat) == null ? void 0 : i.type) != null && s.image_2d || (p.value = !1);
750
+ }), (i, s) => (openBlock(), createElementBlock("div", null, [
728
751
  createVNode(_sfc_main$f, { "hoverd-data": null }, {
729
752
  header: withCtx(() => [
730
- createVNode(_sfc_main$b, { onClick: a })
753
+ createVNode(_sfc_main$b, { onClick: c })
731
754
  ]),
732
755
  default: withCtx(() => {
733
- var h, c, u, g, m, b, s, f, k, _, v, y, w, $, C, D, x, N, S, M, j, L, T;
756
+ var b, d, n, _, h, k, l, u, f, m, g, y, w, x, C, V, $, E, B, N, j, L, T, R, P, O, F;
734
757
  return [
735
758
  createElementVNode("div", _hoisted_1$6, [
736
759
  createElementVNode("div", _hoisted_2$3, [
@@ -739,15 +762,15 @@ const Cube = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["render", _sfc_render$1]
739
762
  mode: "out-in"
740
763
  }, {
741
764
  default: withCtx(() => {
742
- var E, V, B, R, P, O, I, F, A, H, z, W, K, G, Z, q, U, J, Q, X, Y, ee, te, oe;
765
+ var D, S, M, I, A, H, z, W, K, Z, q, U, J, Q, X, Y, G, ee, te, oe, re, ie, le, se;
743
766
  return [
744
- n.value && ((R = (B = (V = (E = i.flat) == null ? void 0 : E.type) == null ? void 0 : V.image_2d) == null ? void 0 : B[p.value]) != null && R.url) ? (openBlock(), createElementBlock("img", {
745
- key: (F = (I = (O = (P = i.flat) == null ? void 0 : P.type) == null ? void 0 : O.image_2d) == null ? void 0 : I[p.value]) == null ? void 0 : F.url,
746
- src: (W = (z = (H = (A = i.flat) == null ? void 0 : A.type) == null ? void 0 : H.image_2d) == null ? void 0 : z[p.value]) == null ? void 0 : W.url,
767
+ p.value && ((I = (M = (S = (D = i.flat) == null ? void 0 : D.type) == null ? void 0 : S.image_2d) == null ? void 0 : M[v.value]) != null && I.url) ? (openBlock(), createElementBlock("img", {
768
+ key: (W = (z = (H = (A = i.flat) == null ? void 0 : A.type) == null ? void 0 : H.image_2d) == null ? void 0 : z[v.value]) == null ? void 0 : W.url,
769
+ src: (U = (q = (Z = (K = i.flat) == null ? void 0 : K.type) == null ? void 0 : Z.image_2d) == null ? void 0 : q[v.value]) == null ? void 0 : U.url,
747
770
  class: "ire-h-full ire-w-full ire-object-contain ire-object-top lg:ire-h-96 lg:ire-w-96"
748
- }, null, 8, _hoisted_3$2)) : (q = (Z = (G = (K = i.flat) == null ? void 0 : K.type) == null ? void 0 : G.image_3d) == null ? void 0 : Z[p.value]) != null && q.url ? (openBlock(), createElementBlock("img", {
749
- src: (X = (Q = (J = (U = i.flat) == null ? void 0 : U.type) == null ? void 0 : J.image_3d) == null ? void 0 : Q[p.value]) == null ? void 0 : X.url,
750
- key: (oe = (te = (ee = (Y = i.flat) == null ? void 0 : Y.type) == null ? void 0 : ee.image_3d) == null ? void 0 : te[p.value]) == null ? void 0 : oe.url,
771
+ }, null, 8, _hoisted_3$2)) : (Y = (X = (Q = (J = i.flat) == null ? void 0 : J.type) == null ? void 0 : Q.image_3d) == null ? void 0 : X[v.value]) != null && Y.url ? (openBlock(), createElementBlock("img", {
772
+ src: (oe = (te = (ee = (G = i.flat) == null ? void 0 : G.type) == null ? void 0 : ee.image_3d) == null ? void 0 : te[v.value]) == null ? void 0 : oe.url,
773
+ key: (se = (le = (ie = (re = i.flat) == null ? void 0 : re.type) == null ? void 0 : ie.image_3d) == null ? void 0 : le[v.value]) == null ? void 0 : se.url,
751
774
  class: "ire-h-full ire-w-full ire-object-contain ire-object-top lg:ire-h-96 lg:ire-w-96"
752
775
  }, null, 8, _hoisted_4$2)) : createCommentVNode("", !0)
753
776
  ];
@@ -756,83 +779,83 @@ const Cube = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["render", _sfc_render$1]
756
779
  }),
757
780
  createElementVNode("div", _hoisted_5, [
758
781
  createElementVNode("div", _hoisted_6, [
759
- (g = (u = (c = (h = i.flat) == null ? void 0 : h.type) == null ? void 0 : c.image_2d) == null ? void 0 : u[0]) != null && g.url ? (openBlock(), createElementBlock("div", {
782
+ (_ = (n = (d = (b = i.flat) == null ? void 0 : b.type) == null ? void 0 : d.image_2d) == null ? void 0 : n[0]) != null && _.url ? (openBlock(), createElementBlock("div", {
760
783
  key: 0,
761
- class: normalizeClass(["ire-group ire-flex ire-cursor-pointer ire-items-center ire-gap-2 ire-rounded-lg ire-p-3 !ire-text-xs ire-transition-all hover:ire-bg-primary hover:ire-text-white", { "ire-bg-primary ire-text-white": n.value }]),
762
- onClick: l[0] || (l[0] = (E) => n.value = !0)
784
+ class: normalizeClass(["ire-group ire-flex ire-cursor-pointer ire-items-center ire-gap-2 ire-rounded-lg ire-p-3 !ire-text-xs ire-transition-all hover:ire-bg-primary hover:ire-text-white", { "ire-bg-primary ire-text-white": p.value }]),
785
+ onClick: s[0] || (s[0] = (D) => p.value = !0)
763
786
  }, [
764
787
  createVNode(FlatIcon, {
765
- class: normalizeClass(["[&_path]:ire-stroke-black group-hover:[&_path]:ire-stroke-white", { "[&_path]:!ire-stroke-white": n.value }])
788
+ class: normalizeClass(["[&_path]:ire-stroke-black group-hover:[&_path]:ire-stroke-white", { "[&_path]:!ire-stroke-white": p.value }])
766
789
  }, null, 8, ["class"]),
767
- l[2] || (l[2] = createElementVNode("p", null, "2D plan", -1))
790
+ s[2] || (s[2] = createElementVNode("p", null, "2D plan", -1))
768
791
  ], 2)) : createCommentVNode("", !0),
769
- (f = (s = (b = (m = i.flat) == null ? void 0 : m.type) == null ? void 0 : b.image_3d) == null ? void 0 : s[0]) != null && f.url ? (openBlock(), createElementBlock("div", {
792
+ (u = (l = (k = (h = i.flat) == null ? void 0 : h.type) == null ? void 0 : k.image_3d) == null ? void 0 : l[0]) != null && u.url ? (openBlock(), createElementBlock("div", {
770
793
  key: 1,
771
- class: normalizeClass(["ire-group ire-flex ire-cursor-pointer ire-items-center ire-gap-2 ire-rounded-lg ire-p-3 !ire-text-xs ire-transition-all hover:ire-bg-primary hover:ire-text-white", { "ire-bg-primary ire-text-white": !n.value }]),
772
- onClick: l[1] || (l[1] = (E) => n.value = !1)
794
+ class: normalizeClass(["ire-group ire-flex ire-cursor-pointer ire-items-center ire-gap-2 ire-rounded-lg ire-p-3 !ire-text-xs ire-transition-all hover:ire-bg-primary hover:ire-text-white", { "ire-bg-primary ire-text-white": !p.value }]),
795
+ onClick: s[1] || (s[1] = (D) => p.value = !1)
773
796
  }, [
774
797
  createElementVNode("div", null, [
775
798
  createVNode(Cube, {
776
- class: normalizeClass(["group-hover:[&_path]:ire-stroke-white", { "[&_path]:!ire-stroke-white": !n.value }])
799
+ class: normalizeClass(["group-hover:[&_path]:ire-stroke-white", { "[&_path]:!ire-stroke-white": !p.value }])
777
800
  }, null, 8, ["class"])
778
801
  ]),
779
- l[3] || (l[3] = createElementVNode("p", null, "3D plan", -1))
802
+ s[3] || (s[3] = createElementVNode("p", null, "3D plan", -1))
780
803
  ], 2)) : createCommentVNode("", !0)
781
804
  ]),
782
- ((k = d.value) == null ? void 0 : k.length) > 1 ? (openBlock(), createElementBlock("div", _hoisted_7, [
783
- (openBlock(!0), createElementBlock(Fragment, null, renderList(d.value, (E, V) => (openBlock(), createElementBlock("div", {
784
- key: E,
805
+ ((f = a.value) == null ? void 0 : f.length) > 1 ? (openBlock(), createElementBlock("div", _hoisted_7, [
806
+ (openBlock(!0), createElementBlock(Fragment, null, renderList(a.value, (D, S) => (openBlock(), createElementBlock("div", {
807
+ key: D,
785
808
  class: normalizeClass(["ire-flex ire-h-10 ire-w-10 ire-cursor-pointer ire-items-center ire-justify-center ire-rounded-lg ire-p-2 ire-transition-all hover:ire-bg-black hover:ire-text-white", {
786
- "ire-bg-black ire-text-white": p.value === V
809
+ "ire-bg-black ire-text-white": v.value === S
787
810
  }]),
788
- onClick: (B) => p.value = V
789
- }, toDisplayString(E), 11, _hoisted_8))), 128))
811
+ onClick: (M) => v.value = S
812
+ }, toDisplayString(D), 11, _hoisted_8))), 128))
790
813
  ])) : createCommentVNode("", !0)
791
814
  ])
792
815
  ]),
793
816
  createElementVNode("div", _hoisted_9, [
794
817
  createElementVNode("div", _hoisted_10, [
795
- createElementVNode("p", _hoisted_11, toDisplayString((_ = i.flat) == null ? void 0 : _.flat_number), 1),
796
- l[4] || (l[4] = createElementVNode("p", { class: "!ire-text-xs ire-text-gray-600" }, "Apartment", -1))
818
+ createElementVNode("p", _hoisted_11, toDisplayString((m = i.flat) == null ? void 0 : m.flat_number), 1),
819
+ s[4] || (s[4] = createElementVNode("p", { class: "!ire-text-xs ire-text-gray-600" }, "Apartment", -1))
797
820
  ]),
798
821
  createElementVNode("div", _hoisted_12, [
799
- createElementVNode("p", _hoisted_13, toDisplayString((y = (v = i.flat) == null ? void 0 : v.type) == null ? void 0 : y.title), 1),
800
- createElementVNode("p", _hoisted_14, toDisplayString(($ = (w = i.flat) == null ? void 0 : w.type) == null ? void 0 : $.teaser), 1)
822
+ createElementVNode("p", _hoisted_13, toDisplayString((y = (g = i.flat) == null ? void 0 : g.type) == null ? void 0 : y.title), 1),
823
+ createElementVNode("p", _hoisted_14, toDisplayString((x = (w = i.flat) == null ? void 0 : w.type) == null ? void 0 : x.teaser), 1)
801
824
  ]),
802
825
  createElementVNode("div", _hoisted_15, [
803
826
  (C = i.flat) != null && C.floor_number ? (openBlock(), createElementBlock("div", _hoisted_16, [
804
- createElementVNode("p", _hoisted_17, toDisplayString(i.flat.floor_number), 1),
805
- l[5] || (l[5] = createElementVNode("p", { class: "!ire-text-xs ire-text-gray-600" }, "Floor", -1))
827
+ createElementVNode("p", _hoisted_17, toDisplayString((V = i.flat) == null ? void 0 : V.floor_number), 1),
828
+ s[5] || (s[5] = createElementVNode("p", { class: "!ire-text-xs ire-text-gray-600" }, "Floor", -1))
806
829
  ])) : createCommentVNode("", !0),
807
- (x = (D = i.flat) == null ? void 0 : D.type) != null && x.rooms_count ? (openBlock(), createElementBlock("div", _hoisted_18, [
808
- createElementVNode("p", _hoisted_19, toDisplayString(i.flat.type.rooms_count), 1),
809
- l[6] || (l[6] = createElementVNode("p", { class: "!ire-text-xs ire-text-gray-600" }, "Room", -1))
830
+ (E = ($ = i.flat) == null ? void 0 : $.type) != null && E.rooms_count ? (openBlock(), createElementBlock("div", _hoisted_18, [
831
+ createElementVNode("p", _hoisted_19, toDisplayString((B = i.flat) == null ? void 0 : B.type.rooms_count), 1),
832
+ s[6] || (s[6] = createElementVNode("p", { class: "!ire-text-xs ire-text-gray-600" }, "Room", -1))
810
833
  ])) : createCommentVNode("", !0)
811
834
  ]),
812
- (S = (N = i.flat) == null ? void 0 : N.type) != null && S.area_m2 ? (openBlock(), createElementBlock("div", _hoisted_20, [
835
+ (j = (N = i.flat) == null ? void 0 : N.type) != null && j.area_m2 ? (openBlock(), createElementBlock("div", _hoisted_20, [
813
836
  createElementVNode("p", _hoisted_21, [
814
- createTextVNode(toDisplayString(i.flat.type.area_m2) + " ", 1),
815
- l[7] || (l[7] = createElementVNode("span", { class: "ire-font-light" }, [
837
+ createTextVNode(toDisplayString((L = i.flat) == null ? void 0 : L.type.area_m2) + " ", 1),
838
+ s[7] || (s[7] = createElementVNode("span", { class: "ire-font-light" }, [
816
839
  createTextVNode(" M "),
817
840
  createElementVNode("sup", { class: "ire-inline-block -ire-translate-x-1 !ire-text-sm" }, " 2 ")
818
841
  ], -1))
819
842
  ]),
820
- l[8] || (l[8] = createElementVNode("p", { class: "!ire-text-xs ire-text-gray-600" }, "Area", -1))
843
+ s[8] || (s[8] = createElementVNode("p", { class: "!ire-text-xs ire-text-gray-600" }, "Area", -1))
821
844
  ])) : createCommentVNode("", !0),
822
- (M = i.flat) != null && M.price ? (openBlock(), createElementBlock("div", _hoisted_22, [
845
+ (T = i.flat) != null && T.price ? (openBlock(), createElementBlock("div", _hoisted_22, [
823
846
  createElementVNode("div", null, [
824
- (j = i.flat) != null && j.offer_price ? (openBlock(), createElementBlock("div", _hoisted_24, [
825
- createElementVNode("p", _hoisted_25, toDisplayString(Number((L = i.flat) == null ? void 0 : L.price).toLocaleString()), 1),
847
+ (R = i.flat) != null && R.offer_price ? (openBlock(), createElementBlock("div", _hoisted_24, [
848
+ createElementVNode("p", _hoisted_25, toDisplayString(Number((O = i.flat) == null ? void 0 : O.price).toLocaleString()), 1),
826
849
  createElementVNode("p", _hoisted_26, [
827
- createTextVNode(toDisplayString(Number((T = i.flat) == null ? void 0 : T.offer_price).toLocaleString()), 1),
828
- l[10] || (l[10] = createElementVNode("sup", { class: "!ire-text-sm" }, "$", -1))
850
+ createTextVNode(toDisplayString(Number((F = i.flat) == null ? void 0 : F.offer_price).toLocaleString()), 1),
851
+ s[10] || (s[10] = createElementVNode("sup", { class: "!ire-text-sm" }, "$", -1))
829
852
  ])
830
853
  ])) : (openBlock(), createElementBlock("p", _hoisted_23, [
831
- createTextVNode(toDisplayString(Number(i.flat.price).toLocaleString()), 1),
832
- l[9] || (l[9] = createElementVNode("sup", { class: "!ire-text-sm" }, "$", -1))
854
+ createTextVNode(toDisplayString(Number((P = i.flat) == null ? void 0 : P.price).toLocaleString()), 1),
855
+ s[9] || (s[9] = createElementVNode("sup", { class: "!ire-text-sm" }, "$", -1))
833
856
  ]))
834
857
  ]),
835
- l[11] || (l[11] = createElementVNode("p", { class: "!ire-text-xs ire-text-gray-600" }, "Price", -1))
858
+ s[11] || (s[11] = createElementVNode("p", { class: "!ire-text-xs ire-text-gray-600" }, "Price", -1))
836
859
  ])) : createCommentVNode("", !0)
837
860
  ])
838
861
  ])
@@ -897,15 +920,15 @@ const Close = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_render]]
897
920
  },
898
921
  setup(o) {
899
922
  return (e, t) => {
900
- var r, n, p, d, a, i, l, h;
923
+ var r, p, v, a, c, i, s, b, d, n, _, h;
901
924
  return openBlock(), createElementBlock("div", null, [
902
- createElementVNode("p", _hoisted_1$2, toDisplayString((n = (r = e.modalData) == null ? void 0 : r.modalObject) == null ? void 0 : n.title), 1),
925
+ createElementVNode("p", _hoisted_1$2, toDisplayString((p = (r = e.modalData) == null ? void 0 : r.modalObject) == null ? void 0 : p.title), 1),
903
926
  createVNode(_sfc_main$4, {
904
- editor: (d = (p = e.modalData) == null ? void 0 : p.modalObject) == null ? void 0 : d.description
927
+ editor: (a = (v = e.modalData) == null ? void 0 : v.modalObject) == null ? void 0 : a.description
905
928
  }, null, 8, ["editor"]),
906
- (i = (a = e.modalData.modalObject.modalImage) == null ? void 0 : a[0]) != null && i.url ? (openBlock(), createElementBlock("img", {
929
+ (b = (s = (i = (c = e.modalData) == null ? void 0 : c.modalObject) == null ? void 0 : i.modalImage) == null ? void 0 : s[0]) != null && b.url ? (openBlock(), createElementBlock("img", {
907
930
  key: 0,
908
- src: (h = (l = e.modalData.modalObject.modalImage) == null ? void 0 : l[0]) == null ? void 0 : h.url,
931
+ src: (h = (_ = (n = (d = e.modalData) == null ? void 0 : d.modalObject) == null ? void 0 : n.modalImage) == null ? void 0 : _[0]) == null ? void 0 : h.url,
909
932
  alt: "",
910
933
  class: "ire-mt-5 ire-h-[400px] ire-w-full ire-object-contain"
911
934
  }, null, 8, _hoisted_2$1)) : createCommentVNode("", !0)
@@ -917,96 +940,106 @@ const Close = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_render]]
917
940
  props: {
918
941
  block: {},
919
942
  flats: {},
920
- floors: {}
943
+ floors: {},
944
+ actions: {}
921
945
  },
922
946
  emits: ["changeComponent"],
923
947
  setup(o, { emit: e }) {
924
- const t = e, r = o, n = ref(), p = ref(), d = ref(), a = ref(), i = computed$1(() => {
925
- var c, u;
926
- if ((c = r.block) != null && c.svg)
927
- return (u = r.block) == null ? void 0 : u.svg;
928
- }), l = (c) => {
929
- const u = c.target;
930
- u && (p.value = u);
931
- }, h = (c) => {
932
- var g, m, b;
933
- c.target.nodeName === "path" && (((g = a.value) == null ? void 0 : g.conf) === "sold" || ((m = a.value) == null ? void 0 : m.conf) === "reserved" || t(
948
+ const t = e, r = o, p = ref(), v = ref(), a = ref(), c = ref(), i = computed$1(() => {
949
+ var d, n;
950
+ if ((d = r.block) != null && d.svg)
951
+ return (n = r.block) == null ? void 0 : n.svg;
952
+ }), s = (d) => {
953
+ const n = d.target;
954
+ n && (v.value = n);
955
+ }, b = (d) => {
956
+ var _, h, k;
957
+ const n = d.target;
958
+ (n == null ? void 0 : n.nodeName) === "path" && (((_ = c.value) == null ? void 0 : _.conf) === "sold" || ((h = c.value) == null ? void 0 : h.conf) === "reserved" || t(
934
959
  "changeComponent",
935
- ((b = d.value) == null ? void 0 : b.type) || "",
936
- a.value
960
+ ((k = a.value) == null ? void 0 : k.type) || "",
961
+ c.value
937
962
  ));
938
963
  };
939
964
  return watch(
940
- () => p.value,
941
- (c) => {
942
- var g, m, b, s, f;
943
- if (!c) return;
944
- const u = c.parentElement;
945
- if (u && u.nodeName === "g") {
946
- const k = u.getAttribute("id");
947
- if (!k || (d.value = ((g = r.block) == null ? void 0 : g.polygon_data.find((_) => _.key === k)) || null, !d.value)) return;
948
- if (((m = d.value) == null ? void 0 : m.type) === "floor") {
949
- const _ = (b = r.floors) == null ? void 0 : b.find(
950
- (v) => {
951
- var y;
952
- return (v == null ? void 0 : v.id) === ((y = d.value) == null ? void 0 : y.id);
965
+ () => v.value,
966
+ (d) => {
967
+ var _, h, k, l, u, f, m, g;
968
+ if (!d) return;
969
+ const n = d == null ? void 0 : d.parentElement;
970
+ if (n && (n == null ? void 0 : n.nodeName) === "g") {
971
+ const y = n == null ? void 0 : n.getAttribute("id");
972
+ if (!y || (a.value = ((h = (_ = r.block) == null ? void 0 : _.polygon_data) == null ? void 0 : h.find((w) => (w == null ? void 0 : w.key) === y)) || null, !a.value)) return;
973
+ if (((k = a.value) == null ? void 0 : k.type) === "floor") {
974
+ const w = (l = r.floors) == null ? void 0 : l.find(
975
+ (x) => {
976
+ var C;
977
+ return (x == null ? void 0 : x.id) === ((C = a.value) == null ? void 0 : C.id);
953
978
  }
954
979
  );
955
- a.value = _;
956
- } else if (((s = d.value) == null ? void 0 : s.type) === "flat") {
957
- const _ = (f = r.flats) == null ? void 0 : f.find(
958
- (v) => {
959
- var y;
960
- return (v == null ? void 0 : v.id) === ((y = d.value) == null ? void 0 : y.id);
980
+ c.value = w;
981
+ } else if (((u = a.value) == null ? void 0 : u.type) === "flat") {
982
+ const w = (f = r.flats) == null ? void 0 : f.find(
983
+ (x) => {
984
+ var C;
985
+ return (x == null ? void 0 : x.id) === ((C = a.value) == null ? void 0 : C.id);
986
+ }
987
+ );
988
+ c.value = w;
989
+ } else if (((m = a.value) == null ? void 0 : m.type) === "tooltip") {
990
+ const w = (g = r.actions) == null ? void 0 : g.find(
991
+ (x) => {
992
+ var C;
993
+ return (x == null ? void 0 : x.id) === ((C = a.value) == null ? void 0 : C.id);
961
994
  }
962
995
  );
963
- a.value = _;
996
+ c.value = w;
964
997
  } else
965
- a.value = null;
998
+ c.value = null;
966
999
  } else
967
- d.value = null, a.value = null;
1000
+ a.value = null, c.value = null;
968
1001
  }
969
- ), (c, u) => {
970
- var g;
1002
+ ), (d, n) => {
1003
+ var _;
971
1004
  return openBlock(), createBlock(_sfc_main$f, {
972
- hoverdData: a.value,
973
- type: (g = d.value) == null ? void 0 : g.type
1005
+ hoverdData: c.value,
1006
+ type: (_ = a.value) == null ? void 0 : _.type
974
1007
  }, {
975
1008
  header: withCtx(() => {
976
- var m;
1009
+ var h;
977
1010
  return [
978
1011
  createVNode(_sfc_main$b, {
979
- onClick: u[0] || (u[0] = (b) => c.$emit("changeComponent", "project", null))
1012
+ onClick: n[0] || (n[0] = (k) => d.$emit("changeComponent", "project", null))
980
1013
  }),
981
- createElementVNode("p", _hoisted_1$1, toDisplayString((m = c.block) == null ? void 0 : m.title), 1)
1014
+ createElementVNode("p", _hoisted_1$1, toDisplayString((h = d.block) == null ? void 0 : h.title), 1)
982
1015
  ];
983
1016
  }),
984
1017
  default: withCtx(() => {
985
- var m, b, s, f, k, _;
1018
+ var h, k, l, u, f, m, g, y;
986
1019
  return [
987
1020
  createElementVNode("div", _hoisted_2, [
988
1021
  createElementVNode("img", {
989
- src: ((s = (b = (m = c.block) == null ? void 0 : m.block_image) == null ? void 0 : b[0]) == null ? void 0 : s.url) || "",
1022
+ src: ((l = (k = (h = d.block) == null ? void 0 : h.block_image) == null ? void 0 : k[0]) == null ? void 0 : l.url) || "",
990
1023
  alt: "",
991
1024
  class: normalizeClass(["ire-absolute ire-left-0 ire-top-0 ire-h-full ire-w-full", {
992
- "ire-object-contain": c.block.img_contain,
993
- "ire-object-cover": !c.block.img_contain
1025
+ "ire-object-contain": (u = d.block) == null ? void 0 : u.img_contain,
1026
+ "ire-object-cover": !((f = d.block) != null && f.img_contain)
994
1027
  }])
995
1028
  }, null, 10, _hoisted_3),
996
1029
  (openBlock(), createElementBlock("div", {
997
1030
  ref_key: "svgRef",
998
- ref: n,
1031
+ ref: p,
999
1032
  class: normalizeClass(["canvas ire-absolute ire-left-0 ire-top-0 ire-h-full ire-w-full [&_path]:ire-cursor-pointer [&_path]:ire-fill-[var(--path-color)] [&_path]:ire-transition-all", [
1000
1033
  {
1001
- "hover:[&_path]:ire-fill-[var(--reserved-color)]": ((f = a.value) == null ? void 0 : f.conf) === "reserved",
1002
- "hover:[&_path]:ire-fill-[var(--sold-color)]": ((k = a.value) == null ? void 0 : k.conf) === "sold",
1003
- "hover:[&_path]:ire-fill-[var(--path-hover-color)]": !((_ = a.value) != null && _.conf)
1034
+ "hover:[&_path]:ire-fill-[var(--reserved-color)]": ((m = c.value) == null ? void 0 : m.conf) === "reserved",
1035
+ "hover:[&_path]:ire-fill-[var(--sold-color)]": ((g = c.value) == null ? void 0 : g.conf) === "sold",
1036
+ "hover:[&_path]:ire-fill-[var(--path-hover-color)]": !((y = c.value) != null && y.conf)
1004
1037
  }
1005
1038
  ]]),
1006
1039
  innerHTML: i.value,
1007
1040
  key: i.value,
1008
- onMouseover: l,
1009
- onClick: h
1041
+ onMouseover: s,
1042
+ onClick: b
1010
1043
  }, null, 42, _hoisted_4))
1011
1044
  ])
1012
1045
  ];
@@ -1021,9 +1054,9 @@ const Close = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_render]]
1021
1054
  shortcodeDataProps: {}
1022
1055
  },
1023
1056
  setup(__props) {
1024
- var o, e, t, r, n, p;
1025
- const props = __props, getMeta = (d) => props.shortcodeDataProps.meta.find(
1026
- (a) => a.meta_key === d
1057
+ var o, e, t, r, p, v;
1058
+ const props = __props, getMeta = (a) => props.shortcodeDataProps.meta.find(
1059
+ (c) => c.meta_key === a
1027
1060
  ), constants = ref({
1028
1061
  PREVIEW_PATH_COLOR: getMeta("path_color").meta_value || "rgba(255, 255, 255, 0.3)",
1029
1062
  PREVIEW_PATH_HOVER_COLOR: getMeta("path_hover_color").meta_value || "rgba(250, 250, 250, 0.54)",
@@ -1036,8 +1069,8 @@ const Close = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_render]]
1036
1069
  path_hover: (e = constants.value) == null ? void 0 : e.PREVIEW_PATH_HOVER_COLOR,
1037
1070
  reserved: (t = constants.value) == null ? void 0 : t.PREVIEW_RESERVED_COLOR,
1038
1071
  sold: (r = constants.value) == null ? void 0 : r.PREVIEW_SOLD_COLOR,
1039
- stroke_color: (n = constants.value) == null ? void 0 : n.PREVIEW_STROKE_COLOR,
1040
- stroke_width: (p = constants.value) == null ? void 0 : p.PREVIEW_STROKE_WIDTH
1072
+ stroke_color: (p = constants.value) == null ? void 0 : p.PREVIEW_STROKE_COLOR,
1073
+ stroke_width: (v = constants.value) == null ? void 0 : v.PREVIEW_STROKE_WIDTH
1041
1074
  }), cssVariables = computed$1(() => ({
1042
1075
  "--reserved-color": colors.reserved,
1043
1076
  "--sold-color": colors.sold,
@@ -1047,23 +1080,31 @@ const Close = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_render]]
1047
1080
  "--stroke-width": colors.stroke_width + "px"
1048
1081
  })), shortcodeData = ref(props.shortcodeDataProps), flow = ref(
1049
1082
  "projectFlow"
1050
- ), hoveredData = ref(), showModal = ref(!1), project = computed$1(() => {
1083
+ ), hoveredData = ref(), showModal = ref(!1), activeBlock = ref(), activeFloor = ref(), project = computed$1(() => {
1084
+ var a;
1051
1085
  if (shortcodeData.value)
1052
- return shortcodeData.value.project;
1086
+ return (a = shortcodeData.value) == null ? void 0 : a.project;
1053
1087
  }), floors = computed$1(() => {
1054
- var d;
1088
+ var a, c;
1055
1089
  if (shortcodeData.value)
1056
- return (d = shortcodeData.value.floors) == null || d.forEach((a) => {
1057
- const i = shortcodeData.value.flats.filter((h) => h.floor_number !== a.floor_number.toString() ? !1 : Object.values(a.polygon_data).some(
1058
- (u) => u.type && u.type === "flat" && u.id === h.id ? a.block_id ? h.block_id === a.block_id.toString() : !h.block_id : !1
1059
- ));
1060
- a.flats = i;
1061
- const { conf: l } = a || {};
1062
- if (i != null && i.length && !l) {
1063
- const h = i.every((u) => u.conf === "reserved"), c = i.every((u) => u.conf === "sold");
1064
- h ? a.conf = "reserved" : c && (a.conf = "sold");
1090
+ return (a = shortcodeData.value.floors) == null || a.forEach((i) => {
1091
+ var d, n;
1092
+ const s = (n = (d = shortcodeData.value) == null ? void 0 : d.flats) == null ? void 0 : n.filter((_) => {
1093
+ var h;
1094
+ return (_ == null ? void 0 : _.floor_number) !== ((h = i == null ? void 0 : i.floor_number) == null ? void 0 : h.toString()) ? !1 : i != null && i.polygon_data ? Object == null ? void 0 : Object.values(i == null ? void 0 : i.polygon_data).some(
1095
+ (l) => {
1096
+ var u;
1097
+ return l != null && l.type && (l == null ? void 0 : l.type) === "flat" && (l == null ? void 0 : l.id) === (_ == null ? void 0 : _.id) ? i != null && i.block_id ? (_ == null ? void 0 : _.block_id) === ((u = i == null ? void 0 : i.block_id) == null ? void 0 : u.toString()) : !(_ != null && _.block_id) : !1;
1098
+ }
1099
+ ) : !1;
1100
+ });
1101
+ i.flats = s;
1102
+ const { conf: b } = i || {};
1103
+ if (s != null && s.length && !b) {
1104
+ const _ = s == null ? void 0 : s.every((k) => (k == null ? void 0 : k.conf) === "reserved"), h = s == null ? void 0 : s.every((k) => (k == null ? void 0 : k.conf) === "sold");
1105
+ _ ? i.conf = "reserved" : h && (i.conf = "sold");
1065
1106
  }
1066
- }), shortcodeData.value.floors;
1107
+ }), (c = shortcodeData.value) == null ? void 0 : c.floors;
1067
1108
  }), blocks = computed$1(() => {
1068
1109
  if (shortcodeData.value)
1069
1110
  return shortcodeData.value.blocks;
@@ -1071,53 +1112,55 @@ const Close = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_render]]
1071
1112
  if (shortcodeData.value)
1072
1113
  return shortcodeData.value.types;
1073
1114
  }), flats = computed$1(() => {
1074
- var d, a;
1115
+ var a, c;
1075
1116
  if (shortcodeData.value)
1076
- return (a = (d = shortcodeData.value) == null ? void 0 : d.flats) == null ? void 0 : a.map((i) => {
1077
- var l;
1117
+ return (c = (a = shortcodeData.value) == null ? void 0 : a.flats) == null ? void 0 : c.map((i) => {
1118
+ var s;
1078
1119
  if (i != null && i.use_type || !(i != null && i.type)) {
1079
- const h = (l = types.value) == null ? void 0 : l.find((c) => c.id === i.type_id);
1080
- h && (i.type = h);
1120
+ const b = (s = types.value) == null ? void 0 : s.find((d) => (d == null ? void 0 : d.id) === (i == null ? void 0 : i.type_id));
1121
+ b && (i.type = b);
1081
1122
  }
1082
1123
  return i;
1083
1124
  });
1084
1125
  }), actions = computed$1(() => {
1126
+ var a;
1085
1127
  if (shortcodeData.value)
1086
- return shortcodeData.value.actions;
1128
+ return (a = shortcodeData.value) == null ? void 0 : a.actions;
1087
1129
  }), projectMeta = computed$1(() => {
1130
+ var a;
1088
1131
  if (shortcodeData.value)
1089
- return shortcodeData.value.meta;
1090
- }), getColorMeta = (d) => {
1091
- var a, i;
1092
- return (i = (a = projectMeta.value) == null ? void 0 : a.find((l) => l.meta_key === d)) == null ? void 0 : i.meta_value;
1132
+ return (a = shortcodeData.value) == null ? void 0 : a.meta;
1133
+ }), getColorMeta = (a) => {
1134
+ var c, i;
1135
+ return (i = (c = projectMeta.value) == null ? void 0 : c.find((s) => (s == null ? void 0 : s.meta_key) === a)) == null ? void 0 : i.meta_value;
1093
1136
  }, changeRoute = (flowType, polygonItem) => {
1094
1137
  switch (flowType) {
1095
1138
  case "project":
1096
1139
  flow.value = "projectFlow";
1097
1140
  break;
1098
1141
  case "floor":
1099
- flow.value = "floorFlow", hoveredData.value = polygonItem;
1142
+ flow.value = "floorFlow", hoveredData.value = polygonItem, activeFloor.value = polygonItem;
1100
1143
  break;
1101
1144
  case "block":
1102
- flow.value = "blockFlow", hoveredData.value = polygonItem;
1145
+ flow.value = "blockFlow", hoveredData.value = polygonItem, activeBlock.value = polygonItem;
1103
1146
  break;
1104
1147
  case "flat":
1105
1148
  flow.value = "flatFlow", hoveredData.value = polygonItem;
1106
1149
  break;
1107
1150
  case "tooltip":
1108
1151
  const actionData = polygonItem == null ? void 0 : polygonItem.data;
1109
- if (hoveredData.value = actionData, actionData.actionType === "url")
1152
+ if (hoveredData.value = actionData, (actionData == null ? void 0 : actionData.actionType) === "url")
1110
1153
  window.open(
1111
- actionData.url,
1112
- actionData.targetBlank ? "_blank" : "_self"
1154
+ actionData == null ? void 0 : actionData.url,
1155
+ actionData != null && actionData.targetBlank ? "_blank" : "_self"
1113
1156
  );
1114
- else if (actionData.actionType === "modal")
1157
+ else if ((actionData == null ? void 0 : actionData.actionType) === "modal")
1115
1158
  showModal.value = !0;
1116
- else if (actionData.actionType === "script")
1159
+ else if ((actionData == null ? void 0 : actionData.actionType) === "script")
1117
1160
  try {
1118
1161
  eval(actionData == null ? void 0 : actionData.script);
1119
- } catch (d) {
1120
- console.error("Error executing script:", d);
1162
+ } catch (a) {
1163
+ console.error("Error executing script:", a);
1121
1164
  }
1122
1165
  break;
1123
1166
  }
@@ -1125,10 +1168,10 @@ const Close = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_render]]
1125
1168
  return watch(
1126
1169
  () => projectMeta.value,
1127
1170
  () => {
1128
- const d = getColorMeta("path_color"), a = getColorMeta("path_hover_color"), i = getColorMeta("reserved_color"), l = getColorMeta("sold_color"), h = getColorMeta("stroke_color"), c = getColorMeta("stroke_width");
1129
- d && (colors.path = d.toString()), a && (colors.path_hover = a.toString()), i && (colors.reserved = i.toString()), l && (colors.sold = l.toString()), h && (colors.stroke_color = h.toString()), c && (colors.stroke_width = Number(c));
1171
+ const a = getColorMeta("path_color"), c = getColorMeta("path_hover_color"), i = getColorMeta("reserved_color"), s = getColorMeta("sold_color"), b = getColorMeta("stroke_color"), d = getColorMeta("stroke_width");
1172
+ a && (colors.path = a.toString()), c && (colors.path_hover = c.toString()), i && (colors.reserved = i.toString()), s && (colors.sold = s.toString()), b && (colors.stroke_color = b.toString()), d && (colors.stroke_width = Number(d));
1130
1173
  }
1131
- ), (d, a) => (openBlock(), createElementBlock("div", _hoisted_1, [
1174
+ ), (a, c) => (openBlock(), createElementBlock("div", _hoisted_1, [
1132
1175
  createVNode(Transition, {
1133
1176
  name: "ire-fade-in-out",
1134
1177
  mode: "out-in",
@@ -1144,25 +1187,27 @@ const Close = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_render]]
1144
1187
  projectMeta: projectMeta.value,
1145
1188
  blocks: blocks.value,
1146
1189
  actions: actions.value,
1147
- onChangeComponent: a[0] || (a[0] = (i, l) => changeRoute(i, l))
1148
- }, null, 8, ["project", "floors", "flats", "projectMeta", "blocks", "actions"])) : flow.value === "blockFlow" && flats.value && floors.value && blocks.value ? (openBlock(), createBlock(_sfc_main$2, {
1190
+ onChangeComponent: c[0] || (c[0] = (i, s) => changeRoute(i, s))
1191
+ }, null, 8, ["project", "floors", "flats", "projectMeta", "blocks", "actions"])) : flow.value === "blockFlow" && flats.value && floors.value && blocks.value && activeBlock.value ? (openBlock(), createBlock(_sfc_main$2, {
1149
1192
  key: 1,
1150
- block: hoveredData.value,
1193
+ block: activeBlock.value,
1151
1194
  flats: flats.value,
1152
1195
  floors: floors.value,
1153
- onChangeComponent: a[1] || (a[1] = (i, l) => changeRoute(i, l))
1154
- }, null, 8, ["block", "flats", "floors"])) : flow.value === "floorFlow" && floors.value ? (openBlock(), createBlock(_sfc_main$a, {
1196
+ actions: actions.value,
1197
+ onChangeComponent: c[1] || (c[1] = (i, s) => changeRoute(i, s))
1198
+ }, null, 8, ["block", "flats", "floors", "actions"])) : flow.value === "floorFlow" && floors.value && activeFloor.value ? (openBlock(), createBlock(_sfc_main$a, {
1155
1199
  key: 2,
1156
1200
  flats: flats.value,
1157
- floor: hoveredData.value,
1201
+ floor: activeFloor.value,
1158
1202
  floors: floors.value,
1159
1203
  blocks: blocks.value,
1160
- onChangeComponent: a[2] || (a[2] = (i, l) => changeRoute(i, l))
1161
- }, null, 8, ["flats", "floor", "floors", "blocks"])) : flow.value === "flatFlow" ? (openBlock(), createBlock(_sfc_main$7, {
1204
+ actions: actions.value,
1205
+ onChangeComponent: c[2] || (c[2] = (i, s) => changeRoute(i, s))
1206
+ }, null, 8, ["flats", "floor", "floors", "blocks", "actions"])) : flow.value === "flatFlow" ? (openBlock(), createBlock(_sfc_main$7, {
1162
1207
  key: 3,
1163
1208
  flat: hoveredData.value,
1164
1209
  floors: floors.value,
1165
- onChangeComponent: a[3] || (a[3] = (i, l) => changeRoute(i, l))
1210
+ onChangeComponent: c[3] || (c[3] = (i, s) => changeRoute(i, s))
1166
1211
  }, null, 8, ["flat", "floors"])) : createCommentVNode("", !0)
1167
1212
  ])) : createCommentVNode("", !0)
1168
1213
  ]),
@@ -1176,7 +1221,7 @@ const Close = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_render]]
1176
1221
  default: withCtx(() => [
1177
1222
  showModal.value ? (openBlock(), createBlock(_sfc_main$5, {
1178
1223
  key: 0,
1179
- onClose: a[4] || (a[4] = (i) => showModal.value = !1)
1224
+ onClose: c[4] || (c[4] = (i) => showModal.value = !1)
1180
1225
  }, {
1181
1226
  default: withCtx(() => [
1182
1227
  createVNode(_sfc_main$3, { modalData: hoveredData.value }, null, 8, ["modalData"])
@@ -14,8 +14,8 @@ declare const _default: import('vue').DefineComponent<__VLS_PublicProps, {}, {},
14
14
  }, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
15
15
  "onUpdate:modelValue"?: ((modelValue: any) => any) | undefined;
16
16
  }>, {
17
- placeholder: string;
18
17
  label: string;
18
+ placeholder: string;
19
19
  clearable: boolean;
20
20
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
21
21
  export default _default;
@@ -1,14 +1,16 @@
1
- import { BlockItem, FlatItem, FloorItem } from '../../../types/DemoTypes';
1
+ import { ActionItem, BlockItem, FlatItem, FloorItem } from '../../../types/DemoTypes';
2
2
  declare const _default: import('vue').DefineComponent<{
3
3
  block: BlockItem;
4
4
  flats: FlatItem[];
5
5
  floors: FloorItem[];
6
+ actions: ActionItem[] | undefined;
6
7
  }, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
7
8
  changeComponent: (flow: "" | "flat" | "floor" | "block" | "project", hoveredData: any) => any;
8
9
  }, string, import('vue').PublicProps, Readonly<{
9
10
  block: BlockItem;
10
11
  flats: FlatItem[];
11
12
  floors: FloorItem[];
13
+ actions: ActionItem[] | undefined;
12
14
  }> & Readonly<{
13
15
  onChangeComponent?: ((flow: "" | "flat" | "floor" | "block" | "project", hoveredData: any) => any) | undefined;
14
16
  }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
@@ -1,9 +1,10 @@
1
- import { BlockItem, FlatItem, FloorItem } from '../../../types/DemoTypes';
1
+ import { ActionItem, BlockItem, FlatItem, FloorItem } from '../../../types/DemoTypes';
2
2
  declare const _default: import('vue').DefineComponent<{
3
3
  flats: FlatItem[] | undefined;
4
4
  floor: FloorItem;
5
5
  floors: FloorItem[];
6
6
  blocks?: BlockItem[];
7
+ actions: ActionItem[] | undefined;
7
8
  }, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
8
9
  changeComponent: (flow: "" | "flat" | "floor" | "block" | "project", hoveredData: any) => any;
9
10
  }, string, import('vue').PublicProps, Readonly<{
@@ -11,6 +12,7 @@ declare const _default: import('vue').DefineComponent<{
11
12
  floor: FloorItem;
12
13
  floors: FloorItem[];
13
14
  blocks?: BlockItem[];
15
+ actions: ActionItem[] | undefined;
14
16
  }> & Readonly<{
15
17
  onChangeComponent?: ((flow: "" | "flat" | "floor" | "block" | "project", hoveredData: any) => any) | undefined;
16
18
  }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ire-preview",
3
- "version": "2.0.3",
3
+ "version": "2.0.4",
4
4
  "type": "module",
5
5
  "emitDeclarationOnly": true,
6
6
  "declaration": true,