ire-preview 2.0.2 → 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
  ];
@@ -413,7 +416,10 @@ const _hoisted_1$f = {
413
416
  }, 8, ["hoverdData", "type"]);
414
417
  };
415
418
  }
416
- }), _hoisted_1$c = { class: "ire-w-full ire-min-w-[150px] ire-max-w-[200px] ire-border ire-border-slate-200 lg:ire-min-w-[250px]" }, _hoisted_2$5 = { class: "label" }, _hoisted_3$4 = { class: "ire-relative" }, _hoisted_4$4 = ["value", "disabled"], _sfc_main$d = /* @__PURE__ */ defineComponent({
419
+ }), _hoisted_1$c = { class: "ire-w-full ire-min-w-[150px] ire-max-w-[200px] ire-border ire-border-slate-200 lg:ire-min-w-[250px]" }, _hoisted_2$5 = {
420
+ key: 0,
421
+ class: "label"
422
+ }, _hoisted_3$4 = { class: "ire-relative" }, _hoisted_4$4 = ["value", "disabled"], _sfc_main$d = /* @__PURE__ */ defineComponent({
417
423
  __name: "PreviewSelect",
418
424
  props: /* @__PURE__ */ mergeModels({
419
425
  data: {},
@@ -429,16 +435,19 @@ const _hoisted_1$f = {
429
435
  setup(o) {
430
436
  const e = useModel(o, "modelValue");
431
437
  return (t, r) => (openBlock(), createElementBlock("div", _hoisted_1$c, [
432
- createElementVNode("p", _hoisted_2$5, toDisplayString(t.label), 1),
438
+ t.label ? (openBlock(), createElementBlock("p", _hoisted_2$5, toDisplayString(t.label), 1)) : createCommentVNode("", !0),
433
439
  createElementVNode("div", _hoisted_3$4, [
434
440
  withDirectives(createElementVNode("select", {
435
- "onUpdate:modelValue": r[0] || (r[0] = (n) => e.value = n),
441
+ "onUpdate:modelValue": r[0] || (r[0] = (p) => e.value = p),
436
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"
437
443
  }, [
438
- (openBlock(!0), createElementBlock(Fragment, null, renderList(t.data, (n) => (openBlock(), createElementBlock("option", {
439
- value: n.value,
440
- disabled: n.title.includes("reserved") || n.title.includes("sold")
441
- }, 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))
442
451
  ], 512), [
443
452
  [vModelSelect, e.value]
444
453
  ]),
@@ -461,8 +470,8 @@ const _hoisted_1$f = {
461
470
  }
462
471
  }), _export_sfc = (o, e) => {
463
472
  const t = o.__vccOpts || o;
464
- for (const [r, n] of e)
465
- t[r] = n;
473
+ for (const [r, p] of e)
474
+ t[r] = p;
466
475
  return t;
467
476
  }, _sfc_main$c = {}, _hoisted_1$b = {
468
477
  xmlns: "http://www.w3.org/2000/svg",
@@ -493,137 +502,154 @@ const ArrowRight = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["render", _sfc_ren
493
502
  flats: {},
494
503
  floor: {},
495
504
  floors: {},
496
- blocks: {}
505
+ blocks: {},
506
+ actions: {}
497
507
  },
498
508
  emits: ["changeComponent"],
499
509
  setup(o, { emit: e }) {
500
- const t = e, r = o, n = ref(), p = ref(), d = ref(), a = ref(), i = ref(), l = ref(), h = computed$1(() => {
501
- var s;
502
- 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)
503
513
  return r.floor.svg;
504
- }), c = computed$1(() => r.floors.filter(
505
- (s) => (
506
- // floorItem.conf !== "reserved" &&
507
- // floorItem.conf !== "sold" &&
508
- r.floor.block_id ? s.block_id === r.floor.block_id : !s.block_id
509
- )
510
- ).map((s) => {
511
- var k, _;
512
- const f = (k = r.blocks) == null ? void 0 : k.find(
513
- (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) => {
514
527
  var y;
515
- 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());
516
529
  }
517
530
  );
518
531
  return {
519
- 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 : ""),
520
- 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
521
534
  };
522
- }).sort((s, f) => +s.title - +f.title) || []), u = (s) => {
523
- const f = s.target;
524
- f && (p.value = f);
525
- }, g = (s) => {
526
- var k, _, v;
527
- 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));
528
- }, m = () => {
529
- n.value && n.value.querySelectorAll("g").forEach((f) => {
530
- var v, y, w;
531
- const k = f.getAttribute("id"), _ = r.floor.polygon_data.find(
532
- ($) => $.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
533
548
  );
534
549
  if (r.flats)
535
- if (r.floor.conf)
536
- 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) || "");
537
552
  else {
538
- const $ = (y = r.flats) == null ? void 0 : y.find(
539
- (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)
540
555
  );
541
- 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()) || "");
542
557
  }
543
558
  });
544
- }, b = () => {
545
- 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);
546
562
  };
547
563
  return watch(
548
- () => p.value,
549
- (s) => {
550
- var k, _, v;
551
- if (!s) return;
552
- const f = s.parentElement;
553
- if (f && f.nodeName === "g") {
554
- const y = f.getAttribute("id");
555
- if (!y || (d.value = ((k = r.floor) == null ? void 0 : k.polygon_data.find((w) => w.key === y)) || null, !d.value)) return;
556
- if (((_ = d.value) == null ? void 0 : _.type) === "flat") {
557
- 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(
558
574
  ($) => {
559
- var C;
560
- 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);
561
577
  }
562
578
  );
563
- a.value = w;
564
- }
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;
565
590
  } else
566
- d.value = null;
591
+ a.value = null;
567
592
  }
568
593
  ), watch(
569
594
  () => i.value,
570
595
  () => {
571
- const s = r.floors.find(
572
- (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)
573
599
  );
574
- s != null && s.conf || (s && t("changeComponent", "floor", s), setTimeout(() => {
575
- m();
600
+ l != null && l.conf || (l && t("changeComponent", "floor", l), setTimeout(() => {
601
+ h();
576
602
  }, 0));
577
603
  }
578
604
  ), onMounted(() => {
579
- var s, f, k;
580
- l.value = (s = r.blocks) == null ? void 0 : s.find(
581
- (_) => {
582
- var v;
583
- 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());
584
610
  }
585
- ), i.value = (k = (f = c.value) == null ? void 0 : f.find(
586
- (_) => {
587
- var v;
588
- 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);
589
615
  }
590
- )) == null ? void 0 : k.value, m();
591
- }), (s, f) => {
592
- var k;
616
+ )) == null ? void 0 : f.value, h();
617
+ }), (l, u) => {
618
+ var f;
593
619
  return openBlock(), createBlock(_sfc_main$f, {
594
- hoverdData: a.value,
595
- type: (k = d.value) == null ? void 0 : k.type
620
+ hoverdData: c.value,
621
+ type: (f = a.value) == null ? void 0 : f.type
596
622
  }, {
597
623
  header: withCtx(() => [
598
- createVNode(_sfc_main$b, { onClick: b }),
624
+ createVNode(_sfc_main$b, { onClick: k }),
599
625
  createElementVNode("div", _hoisted_1$9, [
600
626
  createVNode(_sfc_main$d, {
601
627
  modelValue: i.value,
602
- "onUpdate:modelValue": f[0] || (f[0] = (_) => i.value = _),
603
- data: c.value
628
+ "onUpdate:modelValue": u[0] || (u[0] = (m) => i.value = m),
629
+ data: d.value
604
630
  }, null, 8, ["modelValue", "data"])
605
631
  ])
606
632
  ]),
607
633
  default: withCtx(() => {
608
- var _, v;
634
+ var m, g, y, w, x;
609
635
  return [
610
636
  createElementVNode("div", _hoisted_2$4, [
611
637
  createElementVNode("img", {
612
- 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) || "",
613
639
  alt: "",
614
640
  class: normalizeClass(["ire-absolute ire-left-0 ire-top-0 ire-h-full ire-w-full", {
615
- "ire-object-contain": s.floor.img_contain,
616
- "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)
617
643
  }])
618
644
  }, null, 10, _hoisted_3$3),
619
645
  (openBlock(), createElementBlock("div", {
620
646
  ref_key: "svgRef",
621
- ref: n,
647
+ ref: p,
622
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)]",
623
- innerHTML: h.value,
624
- key: h.value,
625
- onMouseover: u,
626
- onClick: g
649
+ innerHTML: b.value,
650
+ key: b.value,
651
+ onMouseover: n,
652
+ onClick: _
627
653
  }, null, 40, _hoisted_4$3))
628
654
  ])
629
655
  ];
@@ -699,35 +725,35 @@ const Cube = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["render", _sfc_render$1]
699
725
  },
700
726
  emits: ["changeComponent"],
701
727
  setup(o, { emit: e }) {
702
- const t = e, r = o, n = ref(!0), p = ref(0), d = computed$1(() => {
703
- var l, h, c, u, g, m;
704
- 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;
705
731
  return ["I", "II", "III"].slice(0, i);
706
- }), a = () => {
707
- var l;
708
- const i = (l = r.floors) == null ? void 0 : l.find(
709
- (h) => {
710
- var c, u, g, m;
711
- 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));
712
738
  }
713
739
  );
714
740
  i ? t("changeComponent", "floor", i) : t("changeComponent", "project", null);
715
741
  };
716
742
  return watch(
717
- () => n.value,
743
+ () => p.value,
718
744
  () => {
719
- p.value = 0;
745
+ v.value = 0;
720
746
  }
721
747
  ), onMounted(() => {
722
- var i, l;
723
- (l = (i = r.flat) == null ? void 0 : i.type) != null && l.image_2d || (n.value = !1);
724
- }), (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, [
725
751
  createVNode(_sfc_main$f, { "hoverd-data": null }, {
726
752
  header: withCtx(() => [
727
- createVNode(_sfc_main$b, { onClick: a })
753
+ createVNode(_sfc_main$b, { onClick: c })
728
754
  ]),
729
755
  default: withCtx(() => {
730
- var h, c, u, g, m, b, s, f, k, _, v, y, w, $, C, D, x, B, 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;
731
757
  return [
732
758
  createElementVNode("div", _hoisted_1$6, [
733
759
  createElementVNode("div", _hoisted_2$3, [
@@ -736,15 +762,15 @@ const Cube = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["render", _sfc_render$1]
736
762
  mode: "out-in"
737
763
  }, {
738
764
  default: withCtx(() => {
739
- var E, V, N, 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;
740
766
  return [
741
- n.value && ((R = (N = (V = (E = i.flat) == null ? void 0 : E.type) == null ? void 0 : V.image_2d) == null ? void 0 : N[p.value]) != null && R.url) ? (openBlock(), createElementBlock("img", {
742
- 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,
743
- 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,
744
770
  class: "ire-h-full ire-w-full ire-object-contain ire-object-top lg:ire-h-96 lg:ire-w-96"
745
- }, 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", {
746
- 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,
747
- 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,
748
774
  class: "ire-h-full ire-w-full ire-object-contain ire-object-top lg:ire-h-96 lg:ire-w-96"
749
775
  }, null, 8, _hoisted_4$2)) : createCommentVNode("", !0)
750
776
  ];
@@ -753,83 +779,83 @@ const Cube = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["render", _sfc_render$1]
753
779
  }),
754
780
  createElementVNode("div", _hoisted_5, [
755
781
  createElementVNode("div", _hoisted_6, [
756
- (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", {
757
783
  key: 0,
758
- 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 }]),
759
- 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)
760
786
  }, [
761
787
  createVNode(FlatIcon, {
762
- 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 }])
763
789
  }, null, 8, ["class"]),
764
- l[2] || (l[2] = createElementVNode("p", null, "2D plan", -1))
790
+ s[2] || (s[2] = createElementVNode("p", null, "2D plan", -1))
765
791
  ], 2)) : createCommentVNode("", !0),
766
- (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", {
767
793
  key: 1,
768
- 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 }]),
769
- 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)
770
796
  }, [
771
797
  createElementVNode("div", null, [
772
798
  createVNode(Cube, {
773
- 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 }])
774
800
  }, null, 8, ["class"])
775
801
  ]),
776
- l[3] || (l[3] = createElementVNode("p", null, "3D plan", -1))
802
+ s[3] || (s[3] = createElementVNode("p", null, "3D plan", -1))
777
803
  ], 2)) : createCommentVNode("", !0)
778
804
  ]),
779
- ((k = d.value) == null ? void 0 : k.length) > 1 ? (openBlock(), createElementBlock("div", _hoisted_7, [
780
- (openBlock(!0), createElementBlock(Fragment, null, renderList(d.value, (E, V) => (openBlock(), createElementBlock("div", {
781
- 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,
782
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", {
783
- "ire-bg-black ire-text-white": p.value === V
809
+ "ire-bg-black ire-text-white": v.value === S
784
810
  }]),
785
- onClick: (N) => p.value = V
786
- }, toDisplayString(E), 11, _hoisted_8))), 128))
811
+ onClick: (M) => v.value = S
812
+ }, toDisplayString(D), 11, _hoisted_8))), 128))
787
813
  ])) : createCommentVNode("", !0)
788
814
  ])
789
815
  ]),
790
816
  createElementVNode("div", _hoisted_9, [
791
817
  createElementVNode("div", _hoisted_10, [
792
- createElementVNode("p", _hoisted_11, toDisplayString((_ = i.flat) == null ? void 0 : _.flat_number), 1),
793
- 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))
794
820
  ]),
795
821
  createElementVNode("div", _hoisted_12, [
796
- createElementVNode("p", _hoisted_13, toDisplayString((y = (v = i.flat) == null ? void 0 : v.type) == null ? void 0 : y.title), 1),
797
- 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)
798
824
  ]),
799
825
  createElementVNode("div", _hoisted_15, [
800
826
  (C = i.flat) != null && C.floor_number ? (openBlock(), createElementBlock("div", _hoisted_16, [
801
- createElementVNode("p", _hoisted_17, toDisplayString(i.flat.floor_number), 1),
802
- 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))
803
829
  ])) : createCommentVNode("", !0),
804
- (x = (D = i.flat) == null ? void 0 : D.type) != null && x.rooms_count ? (openBlock(), createElementBlock("div", _hoisted_18, [
805
- createElementVNode("p", _hoisted_19, toDisplayString(i.flat.type.rooms_count), 1),
806
- 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))
807
833
  ])) : createCommentVNode("", !0)
808
834
  ]),
809
- (S = (B = i.flat) == null ? void 0 : B.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, [
810
836
  createElementVNode("p", _hoisted_21, [
811
- createTextVNode(toDisplayString(i.flat.type.area_m2) + " ", 1),
812
- 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" }, [
813
839
  createTextVNode(" M "),
814
840
  createElementVNode("sup", { class: "ire-inline-block -ire-translate-x-1 !ire-text-sm" }, " 2 ")
815
841
  ], -1))
816
842
  ]),
817
- 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))
818
844
  ])) : createCommentVNode("", !0),
819
- (M = i.flat) != null && M.price ? (openBlock(), createElementBlock("div", _hoisted_22, [
845
+ (T = i.flat) != null && T.price ? (openBlock(), createElementBlock("div", _hoisted_22, [
820
846
  createElementVNode("div", null, [
821
- (j = i.flat) != null && j.offer_price ? (openBlock(), createElementBlock("div", _hoisted_24, [
822
- 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),
823
849
  createElementVNode("p", _hoisted_26, [
824
- createTextVNode(toDisplayString(Number((T = i.flat) == null ? void 0 : T.offer_price).toLocaleString()), 1),
825
- 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))
826
852
  ])
827
853
  ])) : (openBlock(), createElementBlock("p", _hoisted_23, [
828
- createTextVNode(toDisplayString(Number(i.flat.price).toLocaleString()), 1),
829
- 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))
830
856
  ]))
831
857
  ]),
832
- 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))
833
859
  ])) : createCommentVNode("", !0)
834
860
  ])
835
861
  ])
@@ -894,15 +920,15 @@ const Close = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_render]]
894
920
  },
895
921
  setup(o) {
896
922
  return (e, t) => {
897
- var r, n, p, d, a, i, l, h;
923
+ var r, p, v, a, c, i, s, b, d, n, _, h;
898
924
  return openBlock(), createElementBlock("div", null, [
899
- 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),
900
926
  createVNode(_sfc_main$4, {
901
- 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
902
928
  }, null, 8, ["editor"]),
903
- (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", {
904
930
  key: 0,
905
- 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,
906
932
  alt: "",
907
933
  class: "ire-mt-5 ire-h-[400px] ire-w-full ire-object-contain"
908
934
  }, null, 8, _hoisted_2$1)) : createCommentVNode("", !0)
@@ -914,96 +940,106 @@ const Close = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_render]]
914
940
  props: {
915
941
  block: {},
916
942
  flats: {},
917
- floors: {}
943
+ floors: {},
944
+ actions: {}
918
945
  },
919
946
  emits: ["changeComponent"],
920
947
  setup(o, { emit: e }) {
921
- const t = e, r = o, n = ref(), p = ref(), d = ref(), a = ref(), i = computed$1(() => {
922
- var c, u;
923
- if ((c = r.block) != null && c.svg)
924
- return (u = r.block) == null ? void 0 : u.svg;
925
- }), l = (c) => {
926
- const u = c.target;
927
- u && (p.value = u);
928
- }, h = (c) => {
929
- var g, m, b;
930
- 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(
931
959
  "changeComponent",
932
- ((b = d.value) == null ? void 0 : b.type) || "",
933
- a.value
960
+ ((k = a.value) == null ? void 0 : k.type) || "",
961
+ c.value
934
962
  ));
935
963
  };
936
964
  return watch(
937
- () => p.value,
938
- (c) => {
939
- var g, m, b, s, f;
940
- if (!c) return;
941
- const u = c.parentElement;
942
- if (u && u.nodeName === "g") {
943
- const k = u.getAttribute("id");
944
- if (!k || (d.value = ((g = r.block) == null ? void 0 : g.polygon_data.find((_) => _.key === k)) || null, !d.value)) return;
945
- if (((m = d.value) == null ? void 0 : m.type) === "floor") {
946
- const _ = (b = r.floors) == null ? void 0 : b.find(
947
- (v) => {
948
- var y;
949
- 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);
950
978
  }
951
979
  );
952
- a.value = _;
953
- } else if (((s = d.value) == null ? void 0 : s.type) === "flat") {
954
- const _ = (f = r.flats) == null ? void 0 : f.find(
955
- (v) => {
956
- var y;
957
- 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);
958
994
  }
959
995
  );
960
- a.value = _;
996
+ c.value = w;
961
997
  } else
962
- a.value = null;
998
+ c.value = null;
963
999
  } else
964
- d.value = null, a.value = null;
1000
+ a.value = null, c.value = null;
965
1001
  }
966
- ), (c, u) => {
967
- var g;
1002
+ ), (d, n) => {
1003
+ var _;
968
1004
  return openBlock(), createBlock(_sfc_main$f, {
969
- hoverdData: a.value,
970
- type: (g = d.value) == null ? void 0 : g.type
1005
+ hoverdData: c.value,
1006
+ type: (_ = a.value) == null ? void 0 : _.type
971
1007
  }, {
972
1008
  header: withCtx(() => {
973
- var m;
1009
+ var h;
974
1010
  return [
975
1011
  createVNode(_sfc_main$b, {
976
- onClick: u[0] || (u[0] = (b) => c.$emit("changeComponent", "project", null))
1012
+ onClick: n[0] || (n[0] = (k) => d.$emit("changeComponent", "project", null))
977
1013
  }),
978
- 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)
979
1015
  ];
980
1016
  }),
981
1017
  default: withCtx(() => {
982
- var m, b, s, f, k, _;
1018
+ var h, k, l, u, f, m, g, y;
983
1019
  return [
984
1020
  createElementVNode("div", _hoisted_2, [
985
1021
  createElementVNode("img", {
986
- 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) || "",
987
1023
  alt: "",
988
1024
  class: normalizeClass(["ire-absolute ire-left-0 ire-top-0 ire-h-full ire-w-full", {
989
- "ire-object-contain": c.block.img_contain,
990
- "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)
991
1027
  }])
992
1028
  }, null, 10, _hoisted_3),
993
1029
  (openBlock(), createElementBlock("div", {
994
1030
  ref_key: "svgRef",
995
- ref: n,
1031
+ ref: p,
996
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", [
997
1033
  {
998
- "hover:[&_path]:ire-fill-[var(--reserved-color)]": ((f = a.value) == null ? void 0 : f.conf) === "reserved",
999
- "hover:[&_path]:ire-fill-[var(--sold-color)]": ((k = a.value) == null ? void 0 : k.conf) === "sold",
1000
- "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)
1001
1037
  }
1002
1038
  ]]),
1003
1039
  innerHTML: i.value,
1004
1040
  key: i.value,
1005
- onMouseover: l,
1006
- onClick: h
1041
+ onMouseover: s,
1042
+ onClick: b
1007
1043
  }, null, 42, _hoisted_4))
1008
1044
  ])
1009
1045
  ];
@@ -1018,9 +1054,9 @@ const Close = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_render]]
1018
1054
  shortcodeDataProps: {}
1019
1055
  },
1020
1056
  setup(__props) {
1021
- var o, e, t, r, n, p;
1022
- const props = __props, getMeta = (d) => props.shortcodeDataProps.meta.find(
1023
- (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
1024
1060
  ), constants = ref({
1025
1061
  PREVIEW_PATH_COLOR: getMeta("path_color").meta_value || "rgba(255, 255, 255, 0.3)",
1026
1062
  PREVIEW_PATH_HOVER_COLOR: getMeta("path_hover_color").meta_value || "rgba(250, 250, 250, 0.54)",
@@ -1033,8 +1069,8 @@ const Close = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_render]]
1033
1069
  path_hover: (e = constants.value) == null ? void 0 : e.PREVIEW_PATH_HOVER_COLOR,
1034
1070
  reserved: (t = constants.value) == null ? void 0 : t.PREVIEW_RESERVED_COLOR,
1035
1071
  sold: (r = constants.value) == null ? void 0 : r.PREVIEW_SOLD_COLOR,
1036
- stroke_color: (n = constants.value) == null ? void 0 : n.PREVIEW_STROKE_COLOR,
1037
- 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
1038
1074
  }), cssVariables = computed$1(() => ({
1039
1075
  "--reserved-color": colors.reserved,
1040
1076
  "--sold-color": colors.sold,
@@ -1044,23 +1080,31 @@ const Close = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_render]]
1044
1080
  "--stroke-width": colors.stroke_width + "px"
1045
1081
  })), shortcodeData = ref(props.shortcodeDataProps), flow = ref(
1046
1082
  "projectFlow"
1047
- ), hoveredData = ref(), showModal = ref(!1), project = computed$1(() => {
1083
+ ), hoveredData = ref(), showModal = ref(!1), activeBlock = ref(), activeFloor = ref(), project = computed$1(() => {
1084
+ var a;
1048
1085
  if (shortcodeData.value)
1049
- return shortcodeData.value.project;
1086
+ return (a = shortcodeData.value) == null ? void 0 : a.project;
1050
1087
  }), floors = computed$1(() => {
1051
- var d;
1088
+ var a, c;
1052
1089
  if (shortcodeData.value)
1053
- return (d = shortcodeData.value.floors) == null || d.forEach((a) => {
1054
- const i = shortcodeData.value.flats.filter((h) => h.floor_number !== a.floor_number.toString() ? !1 : Object.values(a.polygon_data).some(
1055
- (u) => u.type && u.type === "flat" && u.id === h.id ? a.block_id ? h.block_id === a.block_id.toString() : !h.block_id : !1
1056
- ));
1057
- a.flats = i;
1058
- const { conf: l } = a || {};
1059
- if (i != null && i.length && !l) {
1060
- const h = i.every((u) => u.conf === "reserved"), c = i.every((u) => u.conf === "sold");
1061
- 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");
1062
1106
  }
1063
- }), shortcodeData.value.floors;
1107
+ }), (c = shortcodeData.value) == null ? void 0 : c.floors;
1064
1108
  }), blocks = computed$1(() => {
1065
1109
  if (shortcodeData.value)
1066
1110
  return shortcodeData.value.blocks;
@@ -1068,53 +1112,55 @@ const Close = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_render]]
1068
1112
  if (shortcodeData.value)
1069
1113
  return shortcodeData.value.types;
1070
1114
  }), flats = computed$1(() => {
1071
- var d, a;
1115
+ var a, c;
1072
1116
  if (shortcodeData.value)
1073
- return (a = (d = shortcodeData.value) == null ? void 0 : d.flats) == null ? void 0 : a.map((i) => {
1074
- var l;
1117
+ return (c = (a = shortcodeData.value) == null ? void 0 : a.flats) == null ? void 0 : c.map((i) => {
1118
+ var s;
1075
1119
  if (i != null && i.use_type || !(i != null && i.type)) {
1076
- const h = (l = types.value) == null ? void 0 : l.find((c) => c.id === i.type_id);
1077
- 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);
1078
1122
  }
1079
1123
  return i;
1080
1124
  });
1081
1125
  }), actions = computed$1(() => {
1126
+ var a;
1082
1127
  if (shortcodeData.value)
1083
- return shortcodeData.value.actions;
1128
+ return (a = shortcodeData.value) == null ? void 0 : a.actions;
1084
1129
  }), projectMeta = computed$1(() => {
1130
+ var a;
1085
1131
  if (shortcodeData.value)
1086
- return shortcodeData.value.meta;
1087
- }), getColorMeta = (d) => {
1088
- var a, i;
1089
- 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;
1090
1136
  }, changeRoute = (flowType, polygonItem) => {
1091
1137
  switch (flowType) {
1092
1138
  case "project":
1093
1139
  flow.value = "projectFlow";
1094
1140
  break;
1095
1141
  case "floor":
1096
- flow.value = "floorFlow", hoveredData.value = polygonItem;
1142
+ flow.value = "floorFlow", hoveredData.value = polygonItem, activeFloor.value = polygonItem;
1097
1143
  break;
1098
1144
  case "block":
1099
- flow.value = "blockFlow", hoveredData.value = polygonItem;
1145
+ flow.value = "blockFlow", hoveredData.value = polygonItem, activeBlock.value = polygonItem;
1100
1146
  break;
1101
1147
  case "flat":
1102
1148
  flow.value = "flatFlow", hoveredData.value = polygonItem;
1103
1149
  break;
1104
1150
  case "tooltip":
1105
1151
  const actionData = polygonItem == null ? void 0 : polygonItem.data;
1106
- if (hoveredData.value = actionData, actionData.actionType === "url")
1152
+ if (hoveredData.value = actionData, (actionData == null ? void 0 : actionData.actionType) === "url")
1107
1153
  window.open(
1108
- actionData.url,
1109
- actionData.targetBlank ? "_blank" : "_self"
1154
+ actionData == null ? void 0 : actionData.url,
1155
+ actionData != null && actionData.targetBlank ? "_blank" : "_self"
1110
1156
  );
1111
- else if (actionData.actionType === "modal")
1157
+ else if ((actionData == null ? void 0 : actionData.actionType) === "modal")
1112
1158
  showModal.value = !0;
1113
- else if (actionData.actionType === "script")
1159
+ else if ((actionData == null ? void 0 : actionData.actionType) === "script")
1114
1160
  try {
1115
1161
  eval(actionData == null ? void 0 : actionData.script);
1116
- } catch (d) {
1117
- console.error("Error executing script:", d);
1162
+ } catch (a) {
1163
+ console.error("Error executing script:", a);
1118
1164
  }
1119
1165
  break;
1120
1166
  }
@@ -1122,10 +1168,10 @@ const Close = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_render]]
1122
1168
  return watch(
1123
1169
  () => projectMeta.value,
1124
1170
  () => {
1125
- 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");
1126
- 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));
1127
1173
  }
1128
- ), (d, a) => (openBlock(), createElementBlock("div", _hoisted_1, [
1174
+ ), (a, c) => (openBlock(), createElementBlock("div", _hoisted_1, [
1129
1175
  createVNode(Transition, {
1130
1176
  name: "ire-fade-in-out",
1131
1177
  mode: "out-in",
@@ -1141,25 +1187,27 @@ const Close = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_render]]
1141
1187
  projectMeta: projectMeta.value,
1142
1188
  blocks: blocks.value,
1143
1189
  actions: actions.value,
1144
- onChangeComponent: a[0] || (a[0] = (i, l) => changeRoute(i, l))
1145
- }, 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, {
1146
1192
  key: 1,
1147
- block: hoveredData.value,
1193
+ block: activeBlock.value,
1148
1194
  flats: flats.value,
1149
1195
  floors: floors.value,
1150
- onChangeComponent: a[1] || (a[1] = (i, l) => changeRoute(i, l))
1151
- }, 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, {
1152
1199
  key: 2,
1153
1200
  flats: flats.value,
1154
- floor: hoveredData.value,
1201
+ floor: activeFloor.value,
1155
1202
  floors: floors.value,
1156
1203
  blocks: blocks.value,
1157
- onChangeComponent: a[2] || (a[2] = (i, l) => changeRoute(i, l))
1158
- }, 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, {
1159
1207
  key: 3,
1160
1208
  flat: hoveredData.value,
1161
1209
  floors: floors.value,
1162
- onChangeComponent: a[3] || (a[3] = (i, l) => changeRoute(i, l))
1210
+ onChangeComponent: c[3] || (c[3] = (i, s) => changeRoute(i, s))
1163
1211
  }, null, 8, ["flat", "floors"])) : createCommentVNode("", !0)
1164
1212
  ])) : createCommentVNode("", !0)
1165
1213
  ]),
@@ -1173,7 +1221,7 @@ const Close = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_render]]
1173
1221
  default: withCtx(() => [
1174
1222
  showModal.value ? (openBlock(), createBlock(_sfc_main$5, {
1175
1223
  key: 0,
1176
- onClose: a[4] || (a[4] = (i) => showModal.value = !1)
1224
+ onClose: c[4] || (c[4] = (i) => showModal.value = !1)
1177
1225
  }, {
1178
1226
  default: withCtx(() => [
1179
1227
  createVNode(_sfc_main$3, { modalData: hoveredData.value }, null, 8, ["modalData"])
@@ -1,15 +1,17 @@
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
- changeComponent: (flow: "" | "project" | "flat" | "floor" | "block", hoveredData: any) => any;
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
- onChangeComponent?: ((flow: "" | "project" | "flat" | "floor" | "block", hoveredData: any) => any) | undefined;
15
+ onChangeComponent?: ((flow: "" | "flat" | "floor" | "block" | "project", hoveredData: any) => any) | undefined;
14
16
  }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
15
17
  export default _default;
@@ -3,11 +3,11 @@ declare const _default: import('vue').DefineComponent<{
3
3
  flat: FlatItem | undefined;
4
4
  floors: FloorItem[] | undefined;
5
5
  }, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
6
- changeComponent: (flow: "" | "project" | "flat" | "floor" | "block", hoveredData: any) => any;
6
+ changeComponent: (flow: "" | "flat" | "floor" | "block" | "project", hoveredData: any) => any;
7
7
  }, string, import('vue').PublicProps, Readonly<{
8
8
  flat: FlatItem | undefined;
9
9
  floors: FloorItem[] | undefined;
10
10
  }> & Readonly<{
11
- onChangeComponent?: ((flow: "" | "project" | "flat" | "floor" | "block", hoveredData: any) => any) | undefined;
11
+ onChangeComponent?: ((flow: "" | "flat" | "floor" | "block" | "project", hoveredData: any) => any) | undefined;
12
12
  }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
13
13
  export default _default;
@@ -1,17 +1,19 @@
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
- changeComponent: (flow: "" | "project" | "flat" | "floor" | "block", hoveredData: any) => any;
9
+ changeComponent: (flow: "" | "flat" | "floor" | "block" | "project", hoveredData: any) => any;
9
10
  }, string, import('vue').PublicProps, Readonly<{
10
11
  flats: FlatItem[] | undefined;
11
12
  floor: FloorItem;
12
13
  floors: FloorItem[];
13
14
  blocks?: BlockItem[];
15
+ actions: ActionItem[] | undefined;
14
16
  }> & Readonly<{
15
- onChangeComponent?: ((flow: "" | "project" | "flat" | "floor" | "block", hoveredData: any) => any) | undefined;
17
+ onChangeComponent?: ((flow: "" | "flat" | "floor" | "block" | "project", hoveredData: any) => any) | undefined;
16
18
  }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
17
19
  export default _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ire-preview",
3
- "version": "2.0.2",
3
+ "version": "2.0.4",
4
4
  "type": "module",
5
5
  "emitDeclarationOnly": true,
6
6
  "declaration": true,