ire-preview 2.0.7 → 2.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/lib.es.js +227 -234
  2. package/package.json +1 -1
package/dist/lib.es.js CHANGED
@@ -90,8 +90,8 @@ function removeSub(o, e = !1) {
90
90
  const { dep: t, prevSub: r, nextSub: c } = o;
91
91
  if (r && (r.nextSub = c, o.prevSub = void 0), c && (c.prevSub = r, o.nextSub = void 0), t.subs === o && (t.subs = r, !r && t.computed)) {
92
92
  t.computed.flags &= -5;
93
- for (let _ = t.computed.deps; _; _ = _.nextDep)
94
- removeSub(_, !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
  }
@@ -219,7 +219,7 @@ 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, c, _, m, y, p, f, x, v, s, n, i, d, l, a, h, u, k, g, b, w, C, V, $, E, D, N, S;
222
+ var r, c, v, m, y, _, f, g, d, s, n, i, u, l, a, h, p, k, b, w, x, C, $, V, E, D, N, S;
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, [
@@ -227,38 +227,38 @@ const _hoisted_1$f = {
227
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
- (c = e.hoveredData) != null && c.conf || (m = (_ = e.hoveredData) == null ? void 0 : _.flats) != null && m.length ? (openBlock(), createElementBlock("div", _hoisted_5$1, [
231
- (y = e.hoveredData) != null && y.conf ? (openBlock(), createElementBlock("div", _hoisted_6$1, toDisplayString((p = e.hoveredData) == null ? void 0 : p.conf), 1)) : (openBlock(), createElementBlock("div", _hoisted_7$1, [
232
- (x = (f = e.hoveredData) == null ? void 0 : f.counts) != null && x.available ? (openBlock(), createElementBlock("div", _hoisted_8$1, [
233
- createElementVNode("p", _hoisted_9$1, toDisplayString(((s = (v = e.hoveredData) == null ? void 0 : v.counts) == null ? void 0 : s.available) || 0), 1),
230
+ (c = e.hoveredData) != null && c.conf || (m = (v = e.hoveredData) == null ? void 0 : v.flats) != null && m.length ? (openBlock(), createElementBlock("div", _hoisted_5$1, [
231
+ (y = e.hoveredData) != null && y.conf ? (openBlock(), createElementBlock("div", _hoisted_6$1, toDisplayString((_ = e.hoveredData) == null ? void 0 : _.conf), 1)) : (openBlock(), createElementBlock("div", _hoisted_7$1, [
232
+ (g = (f = e.hoveredData) == null ? void 0 : f.counts) != null && g.available ? (openBlock(), createElementBlock("div", _hoisted_8$1, [
233
+ createElementVNode("p", _hoisted_9$1, toDisplayString(((s = (d = e.hoveredData) == null ? void 0 : d.counts) == null ? void 0 : s.available) || 0), 1),
234
234
  t[1] || (t[1] = createElementVNode("p", { class: "!ire-text-sm ire-uppercase" }, "Available", -1))
235
235
  ])) : createCommentVNode("", !0),
236
236
  (i = (n = e.hoveredData) == null ? void 0 : n.counts) != null && i.reserved ? (openBlock(), createElementBlock("div", _hoisted_10$1, [
237
- createElementVNode("p", _hoisted_11$1, toDisplayString((l = (d = e.hoveredData) == null ? void 0 : d.counts) == null ? void 0 : l.reserved), 1),
237
+ createElementVNode("p", _hoisted_11$1, toDisplayString((l = (u = e.hoveredData) == null ? void 0 : u.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
240
  (h = (a = e.hoveredData) == null ? void 0 : a.counts) != null && h.sold ? (openBlock(), createElementBlock("div", _hoisted_12$1, [
241
- createElementVNode("p", _hoisted_13$1, toDisplayString((k = (u = e.hoveredData) == null ? void 0 : u.counts) == null ? void 0 : k.sold), 1),
241
+ createElementVNode("p", _hoisted_13$1, toDisplayString((k = (p = e.hoveredData) == null ? void 0 : p.counts) == null ? void 0 : k.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("span", null, toDisplayString((g = e.hoveredData) == null ? void 0 : g.conf), 1),
249
- createElementVNode("p", _hoisted_16$1, toDisplayString((b = e.hoveredData) == null ? void 0 : b.title), 1)
248
+ createElementVNode("span", null, toDisplayString((b = e.hoveredData) == null ? void 0 : b.conf), 1),
249
+ createElementVNode("p", _hoisted_16$1, toDisplayString((w = e.hoveredData) == null ? void 0 : w.title), 1)
250
250
  ])
251
251
  ])) : e.type === "flat" ? (openBlock(), createElementBlock("div", _hoisted_17$1, [
252
252
  createElementVNode("div", _hoisted_18$1, [
253
- createElementVNode("p", _hoisted_19$1, toDisplayString((w = e.hoveredData) == null ? void 0 : w.flat_number), 1),
253
+ createElementVNode("p", _hoisted_19$1, toDisplayString((x = e.hoveredData) == null ? void 0 : x.flat_number), 1),
254
254
  t[4] || (t[4] = createElementVNode("p", { class: "!ire-mt-2 !ire-text-xs ire-uppercase" }, "Apartment", -1))
255
255
  ]),
256
256
  createElementVNode("div", _hoisted_20$1, [
257
257
  (C = e.hoveredData) != null && C.conf ? (openBlock(), createElementBlock("p", _hoisted_21$1, toDisplayString(e.hoveredData.conf), 1)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
258
258
  t[7] || (t[7] = createElementVNode("p", { class: "!ire-text-xs ire-uppercase ire-text-gray-500" }, "Price", -1)),
259
- (V = e.hoveredData) != null && V.price ? (openBlock(), createElementBlock("div", _hoisted_22$1, [
259
+ ($ = e.hoveredData) != null && $.price ? (openBlock(), createElementBlock("div", _hoisted_22$1, [
260
260
  createElementVNode("div", null, [
261
- ($ = e.hoveredData) != null && $.offer_price ? (openBlock(), createElementBlock("div", _hoisted_24$1, [
261
+ (V = e.hoveredData) != null && V.offer_price ? (openBlock(), createElementBlock("div", _hoisted_24$1, [
262
262
  createElementVNode("p", _hoisted_25$1, toDisplayString(Number((E = e.hoveredData) == null ? void 0 : E.price).toLocaleString()), 1),
263
263
  createElementVNode("p", _hoisted_26$1, [
264
264
  createTextVNode(toDisplayString(Number((D = e.hoveredData) == null ? void 0 : D.offer_price).toLocaleString()), 1),
@@ -308,7 +308,7 @@ const _hoisted_1$f = {
308
308
  }, null, 8, ["hovered-data", "type"])
309
309
  ]));
310
310
  }
311
- }), _hoisted_1$d = { class: "ire-relative ire-h-full ire-select-none ire-overflow-hidden ire-pt-[50%]" }, _hoisted_2$6 = ["src"], _hoisted_3$5 = ["innerHTML"], _sfc_main$e = /* @__PURE__ */ defineComponent({
311
+ }), _hoisted_1$d = { class: "ire-relative ire-h-full ire-select-none ire-overflow-hidden" }, _hoisted_2$6 = ["src"], _hoisted_3$5 = ["innerHTML"], _sfc_main$e = /* @__PURE__ */ defineComponent({
312
312
  __name: "ProjectPreview",
313
313
  props: {
314
314
  project: {},
@@ -320,95 +320,94 @@ const _hoisted_1$f = {
320
320
  },
321
321
  emits: ["changeComponent"],
322
322
  setup(o, { emit: e }) {
323
- const t = e, r = o, c = ref(), _ = ref(), m = ref(null), y = computed(() => {
323
+ const t = e, r = o, c = ref(), v = ref(), m = ref(null), y = computed(() => {
324
324
  if (r.project)
325
325
  return r.project.svg;
326
- }), p = computed(() => {
327
- var s, n;
328
- const v = (n = (s = r.projectMeta) == null ? void 0 : s.find(
329
- (i) => (i == null ? void 0 : i.meta_key) === "project_img_contain"
330
- )) == null ? void 0 : n.meta_value;
331
- return JSON.parse((v == null ? void 0 : v.toString()) || "false");
332
- }), f = (v) => {
333
- const s = v.target;
334
- s && (c.value = s);
335
- }, x = (v) => {
336
- var n, i, d;
337
- const s = v.target;
338
- (s == null ? void 0 : s.nodeName) === "path" && (((n = _.value) == null ? void 0 : n.conf) === "sold" || ((i = _.value) == null ? void 0 : i.conf) === "reserved" || t("changeComponent", ((d = m.value) == null ? void 0 : d.type) || "", _ == null ? void 0 : _.value));
326
+ });
327
+ computed(() => {
328
+ var d, s;
329
+ const g = (s = (d = r.projectMeta) == null ? void 0 : d.find(
330
+ (n) => (n == null ? void 0 : n.meta_key) === "project_img_contain"
331
+ )) == null ? void 0 : s.meta_value;
332
+ return JSON.parse((g == null ? void 0 : g.toString()) || "false");
333
+ });
334
+ const _ = (g) => {
335
+ const d = g.target;
336
+ d && (c.value = d);
337
+ }, f = (g) => {
338
+ var s, n, i;
339
+ const d = g.target;
340
+ (d == null ? void 0 : d.nodeName) === "path" && (((s = v.value) == null ? void 0 : s.conf) === "sold" || ((n = v.value) == null ? void 0 : n.conf) === "reserved" || t("changeComponent", ((i = m.value) == null ? void 0 : i.type) || "", v == null ? void 0 : v.value));
339
341
  };
340
342
  return watch(
341
343
  () => c.value,
342
- (v) => {
343
- var n, i, d, l, a, h, u;
344
- if (!v) return;
345
- const s = v.parentElement;
346
- if (s && (s == null ? void 0 : s.nodeName) === "g") {
347
- const k = s == null ? void 0 : s.getAttribute("id");
348
- if (!k || (m.value = ((n = r.project) == null ? void 0 : n.polygon_data.find((b) => (b == null ? void 0 : b.key) === k)) || null, !m.value)) return;
349
- const g = (i = m.value) == null ? void 0 : i.id;
350
- switch ((d = m.value) == null ? void 0 : d.type) {
344
+ (g) => {
345
+ var s, n, i, u, l, a, h;
346
+ if (!g) return;
347
+ const d = g.parentElement;
348
+ if (d && (d == null ? void 0 : d.nodeName) === "g") {
349
+ const p = d == null ? void 0 : d.getAttribute("id");
350
+ if (!p || (m.value = ((s = r.project) == null ? void 0 : s.polygon_data.find((b) => (b == null ? void 0 : b.key) === p)) || null, !m.value)) return;
351
+ const k = (n = m.value) == null ? void 0 : n.id;
352
+ switch ((i = m.value) == null ? void 0 : i.type) {
351
353
  case "floor":
352
- const b = (l = r.floors) == null ? void 0 : l.find(
353
- ($) => $.id === g
354
+ const b = (u = r.floors) == null ? void 0 : u.find(
355
+ ($) => $.id === k
354
356
  );
355
- _.value = b;
357
+ v.value = b;
356
358
  break;
357
359
  case "block":
358
- const w = (a = r.blocks) == null ? void 0 : a.find(
359
- ($) => ($ == null ? void 0 : $.id) === g
360
+ const w = (l = r.blocks) == null ? void 0 : l.find(
361
+ ($) => ($ == null ? void 0 : $.id) === k
360
362
  );
361
- _.value = w;
363
+ v.value = w;
362
364
  break;
363
365
  case "flat":
364
- const C = (h = r.flats) == null ? void 0 : h.find(
365
- ($) => ($ == null ? void 0 : $.id) === g
366
+ const x = (a = r.flats) == null ? void 0 : a.find(
367
+ ($) => ($ == null ? void 0 : $.id) === k
366
368
  );
367
- _.value = C;
369
+ v.value = x;
368
370
  break;
369
371
  case "tooltip":
370
- const V = (u = r.actions) == null ? void 0 : u.find(
371
- ($) => ($ == null ? void 0 : $.id) === g
372
+ const C = (h = r.actions) == null ? void 0 : h.find(
373
+ ($) => ($ == null ? void 0 : $.id) === k
372
374
  );
373
- _.value = V;
375
+ v.value = C;
374
376
  break;
375
377
  default:
376
- _.value = null;
378
+ v.value = null;
377
379
  break;
378
380
  }
379
381
  } else
380
- m.value = null, _.value = null;
382
+ m.value = null, v.value = null;
381
383
  }
382
- ), (v, s) => {
383
- var n;
384
+ ), (g, d) => {
385
+ var s;
384
386
  return openBlock(), createBlock(_sfc_main$f, {
385
- hoverdData: _.value,
386
- type: (n = m.value) == null ? void 0 : n.type
387
+ hoverdData: v.value,
388
+ type: (s = m.value) == null ? void 0 : s.type
387
389
  }, {
388
390
  default: withCtx(() => {
389
- var i, d, l, a, h, u;
391
+ var n, i, u, l, a, h;
390
392
  return [
391
393
  createElementVNode("div", _hoisted_1$d, [
392
394
  createElementVNode("img", {
393
- src: (l = (d = (i = v.project) == null ? void 0 : i.project_image) == null ? void 0 : d[0]) == null ? void 0 : l.url,
395
+ src: (u = (i = (n = g.project) == null ? void 0 : n.project_image) == null ? void 0 : i[0]) == null ? void 0 : u.url,
394
396
  alt: "",
395
- class: normalizeClass(["ire-absolute ire-left-0 ire-top-0 ire-h-full ire-w-full", {
396
- "ire-object-contain": unref(p),
397
- "ire-object-cover": !unref(p)
398
- }])
399
- }, null, 10, _hoisted_2$6),
397
+ class: "ire-left-0 ire-top-0 ire-h-full ire-w-full"
398
+ }, null, 8, _hoisted_2$6),
400
399
  (openBlock(), createElementBlock("div", {
401
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", [
402
401
  {
403
- "hover:[&_path]:ire-fill-[var(--reserved-color)]": _.value && ((a = _.value) == null ? void 0 : a.conf) === "reserved",
404
- "hover:[&_path]:ire-fill-[var(--sold-color)]": _.value && ((h = _.value) == null ? void 0 : h.conf) === "sold",
405
- "hover:[&_path]:ire-fill-[var(--path-hover-color)]": !((u = _.value) != null && u.conf)
402
+ "hover:[&_path]:ire-fill-[var(--reserved-color)]": v.value && ((l = v.value) == null ? void 0 : l.conf) === "reserved",
403
+ "hover:[&_path]:ire-fill-[var(--sold-color)]": v.value && ((a = v.value) == null ? void 0 : a.conf) === "sold",
404
+ "hover:[&_path]:ire-fill-[var(--path-hover-color)]": !((h = v.value) != null && h.conf)
406
405
  }
407
406
  ]]),
408
407
  innerHTML: unref(y),
409
408
  key: unref(y),
410
- onMouseover: f,
411
- onClick: x
409
+ onMouseover: _,
410
+ onClick: f
412
411
  }, null, 42, _hoisted_3$5))
413
412
  ])
414
413
  ];
@@ -443,10 +442,10 @@ const _hoisted_1$f = {
443
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"
444
443
  }, [
445
444
  (openBlock(!0), createElementBlock(Fragment, null, renderList(t.data, (c) => {
446
- var _, m;
445
+ var v, m;
447
446
  return openBlock(), createElementBlock("option", {
448
447
  value: c.value,
449
- disabled: ((_ = c == null ? void 0 : c.title) == null ? void 0 : _.includes("reserved")) || ((m = c == null ? void 0 : c.title) == null ? void 0 : m.includes("sold"))
448
+ disabled: ((v = c == null ? void 0 : c.title) == null ? void 0 : v.includes("reserved")) || ((m = c == null ? void 0 : c.title) == null ? void 0 : m.includes("sold"))
450
449
  }, toDisplayString(c.title), 9, _hoisted_4$4);
451
450
  }), 256))
452
451
  ], 512), [
@@ -497,7 +496,7 @@ const ArrowRight = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["render", _sfc_ren
497
496
  t[0] || (t[0] = createElementVNode("p", { class: "!ire-text-sm group-hover:!ire-text-white lg:!ire-text-balance" }, " Back ", -1))
498
497
  ]));
499
498
  }
500
- }), _hoisted_1$9 = { class: "ire-w-fit ire-bg-white" }, _hoisted_2$4 = { class: "ire-relative ire-h-full ire-select-none ire-overflow-hidden ire-pt-[50%]" }, _hoisted_3$3 = ["src"], _hoisted_4$3 = ["innerHTML"], _sfc_main$a = /* @__PURE__ */ defineComponent({
499
+ }), _hoisted_1$9 = { class: "ire-w-fit ire-bg-white" }, _hoisted_2$4 = { class: "ire-relative ire-h-full ire-select-none ire-overflow-hidden" }, _hoisted_3$3 = ["src"], _hoisted_4$3 = ["innerHTML"], _sfc_main$a = /* @__PURE__ */ defineComponent({
501
500
  __name: "FloorPreview",
502
501
  props: {
503
502
  flats: {},
@@ -508,11 +507,11 @@ const ArrowRight = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["render", _sfc_ren
508
507
  },
509
508
  emits: ["changeComponent"],
510
509
  setup(o, { emit: e }) {
511
- const t = e, r = o, c = ref(), _ = ref(), m = ref(), y = ref(null), p = ref(), f = ref(), x = computed$1(() => {
510
+ const t = e, r = o, c = ref(), v = ref(), m = ref(), y = ref(null), _ = ref(), f = ref(), g = computed$1(() => {
512
511
  var l;
513
512
  if ((l = r.floor) != null && l.svg)
514
513
  return r.floor.svg;
515
- }), v = computed$1(() => r.floors.filter(
514
+ }), d = computed$1(() => r.floors.filter(
516
515
  (l) => {
517
516
  var a, h;
518
517
  return (
@@ -522,81 +521,81 @@ const ArrowRight = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["render", _sfc_ren
522
521
  );
523
522
  }
524
523
  ).map((l) => {
525
- var h, u;
524
+ var h, p;
526
525
  const a = (h = r.blocks) == null ? void 0 : h.find(
527
526
  (k) => {
528
- var g;
529
- return (k == null ? void 0 : k.id) === ((g = l == null ? void 0 : l.block_id) == null ? void 0 : g.toString());
527
+ var b;
528
+ return (k == null ? void 0 : k.id) === ((b = l == null ? void 0 : l.block_id) == null ? void 0 : b.toString());
530
529
  }
531
530
  );
532
531
  return {
533
- title: ((u = l == null ? void 0 : l.floor_number) == null ? void 0 : u.toString()) + " Floor" + (a != null && a.id ? ` - ${a == null ? void 0 : a.title}` : "") + (l != null && l.conf ? " " + l.conf : ""),
532
+ title: ((p = l == null ? void 0 : l.floor_number) == null ? void 0 : p.toString()) + " Floor" + (a != null && a.id ? ` - ${a == null ? void 0 : a.title}` : "") + (l != null && l.conf ? " " + l.conf : ""),
534
533
  value: l == null ? void 0 : l.id
535
534
  };
536
535
  }).sort((l, a) => +(l == null ? void 0 : l.title) - +(a == null ? void 0 : a.title)) || []), s = (l) => {
537
536
  const a = l.target;
538
- a && (_.value = a);
537
+ a && (v.value = a);
539
538
  }, n = (l) => {
540
- var h, u, k;
539
+ var h, p, k;
541
540
  const a = l.target;
542
- (a == null ? void 0 : a.nodeName) === "path" && (y.value && "conf" in y.value && (((h = y.value) == null ? void 0 : h.conf) === "sold" || ((u = y.value) == null ? void 0 : u.conf) === "reserved") || t("changeComponent", ((k = m.value) == null ? void 0 : k.type) || "", y.value));
541
+ (a == null ? void 0 : a.nodeName) === "path" && (y.value && "conf" in y.value && (((h = y.value) == null ? void 0 : h.conf) === "sold" || ((p = y.value) == null ? void 0 : p.conf) === "reserved") || t("changeComponent", ((k = m.value) == null ? void 0 : k.type) || "", y.value));
543
542
  }, i = () => {
544
543
  var l;
545
544
  c.value && ((l = c.value) == null ? void 0 : l.querySelectorAll("g")).forEach((h) => {
546
- var g, b, w, C, V, $;
547
- const u = h == null ? void 0 : h.getAttribute("id"), k = (b = (g = r.floor) == null ? void 0 : g.polygon_data) == null ? void 0 : b.find(
548
- (E) => (E == null ? void 0 : E.key) === u
545
+ var b, w, x, C, $, V;
546
+ const p = h == null ? void 0 : h.getAttribute("id"), k = (w = (b = r.floor) == null ? void 0 : b.polygon_data) == null ? void 0 : w.find(
547
+ (E) => (E == null ? void 0 : E.key) === p
549
548
  );
550
549
  if (r.flats)
551
- if ((w = r.floor) != null && w.conf)
550
+ if ((x = r.floor) != null && x.conf)
552
551
  h.setAttribute("conf", ((C = r.floor) == null ? void 0 : C.conf) || "");
553
552
  else {
554
- const E = (V = r.flats) == null ? void 0 : V.find(
553
+ const E = ($ = r.flats) == null ? void 0 : $.find(
555
554
  (D) => (D == null ? void 0 : D.id) === (k == null ? void 0 : k.id)
556
555
  );
557
- h == null || h.setAttribute("conf", (($ = E == null ? void 0 : E.conf) == null ? void 0 : $.toString()) || "");
556
+ h == null || h.setAttribute("conf", ((V = E == null ? void 0 : E.conf) == null ? void 0 : V.toString()) || "");
558
557
  }
559
558
  });
560
- }, d = () => {
559
+ }, u = () => {
561
560
  var l;
562
561
  (l = r.floor) != null && l.block_id ? t("changeComponent", "block", f.value) : t("changeComponent", "project", null);
563
562
  };
564
563
  return watch(
565
- () => _.value,
564
+ () => v.value,
566
565
  (l) => {
567
- var h, u, k, g, b, w;
566
+ var h, p, k, b, w, x;
568
567
  if (!l) return;
569
568
  const a = l == null ? void 0 : l.parentElement;
570
569
  if (a && (a == null ? void 0 : a.nodeName) === "g") {
571
570
  const C = a.getAttribute("id");
572
- if (!C || (m.value = ((u = (h = r.floor) == null ? void 0 : h.polygon_data) == null ? void 0 : u.find((V) => (V == null ? void 0 : V.key) === C)) || null, !m.value)) return;
571
+ if (!C || (m.value = ((p = (h = r.floor) == null ? void 0 : h.polygon_data) == null ? void 0 : p.find(($) => ($ == null ? void 0 : $.key) === C)) || null, !m.value)) return;
573
572
  if (((k = m.value) == null ? void 0 : k.type) === "flat") {
574
- const V = (g = r.flats) == null ? void 0 : g.find(
575
- ($) => {
573
+ const $ = (b = r.flats) == null ? void 0 : b.find(
574
+ (V) => {
576
575
  var E;
577
- return ($ == null ? void 0 : $.id) === ((E = m.value) == null ? void 0 : E.id);
576
+ return (V == null ? void 0 : V.id) === ((E = m.value) == null ? void 0 : E.id);
578
577
  }
579
578
  );
580
- y.value = V ?? null;
581
- } else if (((b = m.value) == null ? void 0 : b.type) === "tooltip") {
582
- const V = (w = r.actions) == null ? void 0 : w.find(
583
- ($) => {
579
+ y.value = $ ?? null;
580
+ } else if (((w = m.value) == null ? void 0 : w.type) === "tooltip") {
581
+ const $ = (x = r.actions) == null ? void 0 : x.find(
582
+ (V) => {
584
583
  var E;
585
- return ($ == null ? void 0 : $.id) === ((E = m.value) == null ? void 0 : E.id);
584
+ return (V == null ? void 0 : V.id) === ((E = m.value) == null ? void 0 : E.id);
586
585
  }
587
586
  );
588
- y.value = V ?? null;
587
+ y.value = $ ?? null;
589
588
  } else
590
589
  y.value = null;
591
590
  } else
592
591
  m.value = null;
593
592
  }
594
593
  ), watch(
595
- () => p.value,
594
+ () => _.value,
596
595
  () => {
597
596
  var a;
598
597
  const l = (a = r.floors) == null ? void 0 : a.find(
599
- (h) => (h == null ? void 0 : h.id) === (p == null ? void 0 : p.value)
598
+ (h) => (h == null ? void 0 : h.id) === (_ == null ? void 0 : _.value)
600
599
  );
601
600
  l != null && l.conf || (l && t("changeComponent", "floor", l), setTimeout(() => {
602
601
  i();
@@ -605,14 +604,14 @@ const ArrowRight = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["render", _sfc_ren
605
604
  ), onMounted(() => {
606
605
  var l, a, h;
607
606
  f.value = (l = r.blocks) == null ? void 0 : l.find(
608
- (u) => {
609
- var k, g;
610
- return (u == null ? void 0 : u.id) === ((g = (k = r.floor) == null ? void 0 : k.block_id) == null ? void 0 : g.toString());
607
+ (p) => {
608
+ var k, b;
609
+ return (p == null ? void 0 : p.id) === ((b = (k = r.floor) == null ? void 0 : k.block_id) == null ? void 0 : b.toString());
611
610
  }
612
- ), p.value = (h = (a = v.value) == null ? void 0 : a.find(
613
- (u) => {
611
+ ), _.value = (h = (a = d.value) == null ? void 0 : a.find(
612
+ (p) => {
614
613
  var k;
615
- return (u == null ? void 0 : u.value) == ((k = r.floor) == null ? void 0 : k.id);
614
+ return (p == null ? void 0 : p.value) == ((k = r.floor) == null ? void 0 : k.id);
616
615
  }
617
616
  )) == null ? void 0 : h.value, i();
618
617
  }), (l, a) => {
@@ -622,33 +621,30 @@ const ArrowRight = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["render", _sfc_ren
622
621
  type: (h = m.value) == null ? void 0 : h.type
623
622
  }, {
624
623
  header: withCtx(() => [
625
- createVNode(_sfc_main$b, { onClick: d }),
624
+ createVNode(_sfc_main$b, { onClick: u }),
626
625
  createElementVNode("div", _hoisted_1$9, [
627
626
  createVNode(_sfc_main$d, {
628
- modelValue: p.value,
629
- "onUpdate:modelValue": a[0] || (a[0] = (u) => p.value = u),
630
- data: v.value
627
+ modelValue: _.value,
628
+ "onUpdate:modelValue": a[0] || (a[0] = (p) => _.value = p),
629
+ data: d.value
631
630
  }, null, 8, ["modelValue", "data"])
632
631
  ])
633
632
  ]),
634
633
  default: withCtx(() => {
635
- var u, k, g, b, w;
634
+ var p, k, b;
636
635
  return [
637
636
  createElementVNode("div", _hoisted_2$4, [
638
637
  createElementVNode("img", {
639
- src: ((g = (k = (u = l.floor) == null ? void 0 : u.floor_image) == null ? void 0 : k[0]) == null ? void 0 : g.url) || "",
638
+ src: ((b = (k = (p = l.floor) == null ? void 0 : p.floor_image) == null ? void 0 : k[0]) == null ? void 0 : b.url) || "",
640
639
  alt: "",
641
- class: normalizeClass(["ire-absolute ire-left-0 ire-top-0 ire-h-full ire-w-full", {
642
- "ire-object-contain": (b = l.floor) == null ? void 0 : b.img_contain,
643
- "ire-object-cover": !((w = l.floor) != null && w.img_contain)
644
- }])
645
- }, null, 10, _hoisted_3$3),
640
+ class: "ire-left-0 ire-top-0 ire-h-full ire-w-full"
641
+ }, null, 8, _hoisted_3$3),
646
642
  (openBlock(), createElementBlock("div", {
647
643
  ref_key: "svgRef",
648
644
  ref: c,
649
645
  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)]",
650
- innerHTML: x.value,
651
- key: x.value,
646
+ innerHTML: g.value,
647
+ key: g.value,
652
648
  onMouseover: s,
653
649
  onClick: n
654
650
  }, null, 40, _hoisted_4$3))
@@ -726,35 +722,35 @@ const Cube = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["render", _sfc_render$1]
726
722
  },
727
723
  emits: ["changeComponent"],
728
724
  setup(o, { emit: e }) {
729
- const t = e, r = o, c = ref(!0), _ = ref(0), m = computed$1(() => {
730
- var f, x, v, s, n, i;
731
- const p = c.value ? (v = (x = (f = r.flat) == null ? void 0 : f.type) == null ? void 0 : x.image_2d) == null ? void 0 : v.length : (i = (n = (s = r.flat) == null ? void 0 : s.type) == null ? void 0 : n.image_3d) == null ? void 0 : i.length;
732
- return ["I", "II", "III"].slice(0, p);
725
+ const t = e, r = o, c = ref(!0), v = ref(0), m = computed$1(() => {
726
+ var f, g, d, s, n, i;
727
+ const _ = c.value ? (d = (g = (f = r.flat) == null ? void 0 : f.type) == null ? void 0 : g.image_2d) == null ? void 0 : d.length : (i = (n = (s = r.flat) == null ? void 0 : s.type) == null ? void 0 : n.image_3d) == null ? void 0 : i.length;
728
+ return ["I", "II", "III"].slice(0, _);
733
729
  }), y = () => {
734
730
  var f;
735
- const p = (f = r.floors) == null ? void 0 : f.find(
736
- (x) => {
737
- var v, s, n, i, d, l;
738
- return ((v = x.floor_number) == null ? void 0 : v.toString()) === ((n = (s = r.flat) == null ? void 0 : s.floor_number) == null ? void 0 : n.toString()) && ((i = r.flat) != null && i.block_id ? ((d = x == null ? void 0 : x.block_id) == null ? void 0 : d.toString()) === ((l = r.flat) == null ? void 0 : l.block_id) : !(x != null && x.block_id));
731
+ const _ = (f = r.floors) == null ? void 0 : f.find(
732
+ (g) => {
733
+ var d, s, n, i, u, l;
734
+ return ((d = g.floor_number) == null ? void 0 : d.toString()) === ((n = (s = r.flat) == null ? void 0 : s.floor_number) == null ? void 0 : n.toString()) && ((i = r.flat) != null && i.block_id ? ((u = g == null ? void 0 : g.block_id) == null ? void 0 : u.toString()) === ((l = r.flat) == null ? void 0 : l.block_id) : !(g != null && g.block_id));
739
735
  }
740
736
  );
741
- p ? t("changeComponent", "floor", p) : t("changeComponent", "project", null);
737
+ _ ? t("changeComponent", "floor", _) : t("changeComponent", "project", null);
742
738
  };
743
739
  return watch(
744
740
  () => c.value,
745
741
  () => {
746
- _.value = 0;
742
+ v.value = 0;
747
743
  }
748
744
  ), onMounted(() => {
749
- var p, f;
750
- (f = (p = r.flat) == null ? void 0 : p.type) != null && f.image_2d || (c.value = !1);
751
- }), (p, f) => (openBlock(), createElementBlock("div", null, [
745
+ var _, f;
746
+ (f = (_ = r.flat) == null ? void 0 : _.type) != null && f.image_2d || (c.value = !1);
747
+ }), (_, f) => (openBlock(), createElementBlock("div", null, [
752
748
  createVNode(_sfc_main$f, { "hoverd-data": null }, {
753
749
  header: withCtx(() => [
754
750
  createVNode(_sfc_main$b, { onClick: y })
755
751
  ]),
756
752
  default: withCtx(() => {
757
- var x, v, s, n, i, d, l, a, h, u, k, g, b, w, C, V, $, E, D, N, S, L, T, R, P, O, F;
753
+ var g, d, s, n, i, u, l, a, h, p, k, b, w, x, C, $, V, E, D, N, S, j, T, R, P, O, F;
758
754
  return [
759
755
  createElementVNode("div", _hoisted_1$6, [
760
756
  createElementVNode("div", _hoisted_2$3, [
@@ -763,15 +759,15 @@ const Cube = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["render", _sfc_render$1]
763
759
  mode: "out-in"
764
760
  }, {
765
761
  default: withCtx(() => {
766
- var B, M, j, I, A, H, z, W, K, Z, q, U, J, Q, X, Y, G, ee, te, oe, re, ie, le, se;
762
+ var B, M, L, I, A, H, z, W, K, Z, q, U, J, Q, X, Y, G, ee, te, oe, re, ie, le, se;
767
763
  return [
768
- c.value && ((I = (j = (M = (B = p.flat) == null ? void 0 : B.type) == null ? void 0 : M.image_2d) == null ? void 0 : j[_.value]) != null && I.url) ? (openBlock(), createElementBlock("img", {
769
- key: (W = (z = (H = (A = p.flat) == null ? void 0 : A.type) == null ? void 0 : H.image_2d) == null ? void 0 : z[_.value]) == null ? void 0 : W.url,
770
- src: (U = (q = (Z = (K = p.flat) == null ? void 0 : K.type) == null ? void 0 : Z.image_2d) == null ? void 0 : q[_.value]) == null ? void 0 : U.url,
764
+ c.value && ((I = (L = (M = (B = _.flat) == null ? void 0 : B.type) == null ? void 0 : M.image_2d) == null ? void 0 : L[v.value]) != null && I.url) ? (openBlock(), createElementBlock("img", {
765
+ key: (W = (z = (H = (A = _.flat) == null ? void 0 : A.type) == null ? void 0 : H.image_2d) == null ? void 0 : z[v.value]) == null ? void 0 : W.url,
766
+ src: (U = (q = (Z = (K = _.flat) == null ? void 0 : K.type) == null ? void 0 : Z.image_2d) == null ? void 0 : q[v.value]) == null ? void 0 : U.url,
771
767
  class: "ire-h-full ire-w-full ire-object-contain ire-object-top lg:ire-h-96 lg:ire-w-96"
772
- }, null, 8, _hoisted_3$2)) : (Y = (X = (Q = (J = p.flat) == null ? void 0 : J.type) == null ? void 0 : Q.image_3d) == null ? void 0 : X[_.value]) != null && Y.url ? (openBlock(), createElementBlock("img", {
773
- src: (oe = (te = (ee = (G = p.flat) == null ? void 0 : G.type) == null ? void 0 : ee.image_3d) == null ? void 0 : te[_.value]) == null ? void 0 : oe.url,
774
- key: (se = (le = (ie = (re = p.flat) == null ? void 0 : re.type) == null ? void 0 : ie.image_3d) == null ? void 0 : le[_.value]) == null ? void 0 : se.url,
768
+ }, null, 8, _hoisted_3$2)) : (Y = (X = (Q = (J = _.flat) == null ? void 0 : J.type) == null ? void 0 : Q.image_3d) == null ? void 0 : X[v.value]) != null && Y.url ? (openBlock(), createElementBlock("img", {
769
+ src: (oe = (te = (ee = (G = _.flat) == null ? void 0 : G.type) == null ? void 0 : ee.image_3d) == null ? void 0 : te[v.value]) == null ? void 0 : oe.url,
770
+ key: (se = (le = (ie = (re = _.flat) == null ? void 0 : re.type) == null ? void 0 : ie.image_3d) == null ? void 0 : le[v.value]) == null ? void 0 : se.url,
775
771
  class: "ire-h-full ire-w-full ire-object-contain ire-object-top lg:ire-h-96 lg:ire-w-96"
776
772
  }, null, 8, _hoisted_4$2)) : createCommentVNode("", !0)
777
773
  ];
@@ -780,7 +776,7 @@ const Cube = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["render", _sfc_render$1]
780
776
  }),
781
777
  createElementVNode("div", _hoisted_5, [
782
778
  createElementVNode("div", _hoisted_6, [
783
- (n = (s = (v = (x = p.flat) == null ? void 0 : x.type) == null ? void 0 : v.image_2d) == null ? void 0 : s[0]) != null && n.url ? (openBlock(), createElementBlock("div", {
779
+ (n = (s = (d = (g = _.flat) == null ? void 0 : g.type) == null ? void 0 : d.image_2d) == null ? void 0 : s[0]) != null && n.url ? (openBlock(), createElementBlock("div", {
784
780
  key: 0,
785
781
  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", { "!ire-bg-primary !ire-text-white": c.value }]),
786
782
  onClick: f[0] || (f[0] = (B) => c.value = !0)
@@ -795,7 +791,7 @@ const Cube = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["render", _sfc_render$1]
795
791
  }])
796
792
  }, " 2D plan ", 2)
797
793
  ], 2)) : createCommentVNode("", !0),
798
- (a = (l = (d = (i = p.flat) == null ? void 0 : i.type) == null ? void 0 : d.image_3d) == null ? void 0 : l[0]) != null && a.url ? (openBlock(), createElementBlock("div", {
794
+ (a = (l = (u = (i = _.flat) == null ? void 0 : i.type) == null ? void 0 : u.image_3d) == null ? void 0 : l[0]) != null && a.url ? (openBlock(), createElementBlock("div", {
799
795
  key: 1,
800
796
  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", { "!ire-bg-primary !ire-text-white": !c.value }]),
801
797
  onClick: f[1] || (f[1] = (B) => c.value = !1)
@@ -817,35 +813,35 @@ const Cube = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["render", _sfc_render$1]
817
813
  (openBlock(!0), createElementBlock(Fragment, null, renderList(m.value, (B, M) => (openBlock(), createElementBlock("div", {
818
814
  key: B,
819
815
  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", {
820
- "ire-bg-black ire-text-white": _.value === M
816
+ "ire-bg-black ire-text-white": v.value === M
821
817
  }]),
822
- onClick: (j) => _.value = M
818
+ onClick: (L) => v.value = M
823
819
  }, toDisplayString(B), 11, _hoisted_8))), 128))
824
820
  ])) : createCommentVNode("", !0)
825
821
  ])
826
822
  ]),
827
823
  createElementVNode("div", _hoisted_9, [
828
824
  createElementVNode("div", _hoisted_10, [
829
- createElementVNode("p", _hoisted_11, toDisplayString((u = p.flat) == null ? void 0 : u.flat_number), 1),
825
+ createElementVNode("p", _hoisted_11, toDisplayString((p = _.flat) == null ? void 0 : p.flat_number), 1),
830
826
  f[2] || (f[2] = createElementVNode("p", { class: "!ire-text-xs ire-text-gray-600" }, "Apartment", -1))
831
827
  ]),
832
828
  createElementVNode("div", _hoisted_12, [
833
- createElementVNode("p", _hoisted_13, toDisplayString((g = (k = p.flat) == null ? void 0 : k.type) == null ? void 0 : g.title), 1),
834
- createElementVNode("p", _hoisted_14, toDisplayString((w = (b = p.flat) == null ? void 0 : b.type) == null ? void 0 : w.teaser), 1)
829
+ createElementVNode("p", _hoisted_13, toDisplayString((b = (k = _.flat) == null ? void 0 : k.type) == null ? void 0 : b.title), 1),
830
+ createElementVNode("p", _hoisted_14, toDisplayString((x = (w = _.flat) == null ? void 0 : w.type) == null ? void 0 : x.teaser), 1)
835
831
  ]),
836
832
  createElementVNode("div", _hoisted_15, [
837
- (C = p.flat) != null && C.floor_number ? (openBlock(), createElementBlock("div", _hoisted_16, [
838
- createElementVNode("p", _hoisted_17, toDisplayString((V = p.flat) == null ? void 0 : V.floor_number), 1),
833
+ (C = _.flat) != null && C.floor_number ? (openBlock(), createElementBlock("div", _hoisted_16, [
834
+ createElementVNode("p", _hoisted_17, toDisplayString(($ = _.flat) == null ? void 0 : $.floor_number), 1),
839
835
  f[3] || (f[3] = createElementVNode("p", { class: "!ire-text-xs ire-text-gray-600" }, "Floor", -1))
840
836
  ])) : createCommentVNode("", !0),
841
- (E = ($ = p.flat) == null ? void 0 : $.type) != null && E.rooms_count ? (openBlock(), createElementBlock("div", _hoisted_18, [
842
- createElementVNode("p", _hoisted_19, toDisplayString((D = p.flat) == null ? void 0 : D.type.rooms_count), 1),
837
+ (E = (V = _.flat) == null ? void 0 : V.type) != null && E.rooms_count ? (openBlock(), createElementBlock("div", _hoisted_18, [
838
+ createElementVNode("p", _hoisted_19, toDisplayString((D = _.flat) == null ? void 0 : D.type.rooms_count), 1),
843
839
  f[4] || (f[4] = createElementVNode("p", { class: "!ire-text-xs ire-text-gray-600" }, "Room", -1))
844
840
  ])) : createCommentVNode("", !0)
845
841
  ]),
846
- (S = (N = p.flat) == null ? void 0 : N.type) != null && S.area_m2 ? (openBlock(), createElementBlock("div", _hoisted_20, [
842
+ (S = (N = _.flat) == null ? void 0 : N.type) != null && S.area_m2 ? (openBlock(), createElementBlock("div", _hoisted_20, [
847
843
  createElementVNode("p", _hoisted_21, [
848
- createTextVNode(toDisplayString((L = p.flat) == null ? void 0 : L.type.area_m2) + " ", 1),
844
+ createTextVNode(toDisplayString((j = _.flat) == null ? void 0 : j.type.area_m2) + " ", 1),
849
845
  f[5] || (f[5] = createElementVNode("span", { class: "ire-font-light" }, [
850
846
  createTextVNode(" M "),
851
847
  createElementVNode("sup", { class: "ire-inline-block -ire-translate-x-1 !ire-text-sm" }, " 2 ")
@@ -853,16 +849,16 @@ const Cube = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["render", _sfc_render$1]
853
849
  ]),
854
850
  f[6] || (f[6] = createElementVNode("p", { class: "!ire-text-xs ire-text-gray-600" }, "Area", -1))
855
851
  ])) : createCommentVNode("", !0),
856
- (T = p.flat) != null && T.price ? (openBlock(), createElementBlock("div", _hoisted_22, [
852
+ (T = _.flat) != null && T.price ? (openBlock(), createElementBlock("div", _hoisted_22, [
857
853
  createElementVNode("div", null, [
858
- (R = p.flat) != null && R.offer_price ? (openBlock(), createElementBlock("div", _hoisted_24, [
859
- createElementVNode("p", _hoisted_25, toDisplayString(Number((O = p.flat) == null ? void 0 : O.price).toLocaleString()), 1),
854
+ (R = _.flat) != null && R.offer_price ? (openBlock(), createElementBlock("div", _hoisted_24, [
855
+ createElementVNode("p", _hoisted_25, toDisplayString(Number((O = _.flat) == null ? void 0 : O.price).toLocaleString()), 1),
860
856
  createElementVNode("p", _hoisted_26, [
861
- createTextVNode(toDisplayString(Number((F = p.flat) == null ? void 0 : F.offer_price).toLocaleString()), 1),
857
+ createTextVNode(toDisplayString(Number((F = _.flat) == null ? void 0 : F.offer_price).toLocaleString()), 1),
862
858
  f[8] || (f[8] = createElementVNode("sup", { class: "!ire-text-sm" }, "$", -1))
863
859
  ])
864
860
  ])) : (openBlock(), createElementBlock("p", _hoisted_23, [
865
- createTextVNode(toDisplayString(Number((P = p.flat) == null ? void 0 : P.price).toLocaleString()), 1),
861
+ createTextVNode(toDisplayString(Number((P = _.flat) == null ? void 0 : P.price).toLocaleString()), 1),
866
862
  f[7] || (f[7] = createElementVNode("sup", { class: "!ire-text-sm" }, "$", -1))
867
863
  ]))
868
864
  ]),
@@ -931,22 +927,22 @@ const Close = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_render]]
931
927
  },
932
928
  setup(o) {
933
929
  return (e, t) => {
934
- var r, c, _, m, y, p, f, x, v, s, n, i;
930
+ var r, c, v, m, y, _, f, g, d, s, n, i;
935
931
  return openBlock(), createElementBlock("div", null, [
936
932
  createElementVNode("p", _hoisted_1$2, toDisplayString((c = (r = e.modalData) == null ? void 0 : r.modalObject) == null ? void 0 : c.title), 1),
937
933
  createVNode(_sfc_main$4, {
938
- editor: (m = (_ = e.modalData) == null ? void 0 : _.modalObject) == null ? void 0 : m.description
934
+ editor: (m = (v = e.modalData) == null ? void 0 : v.modalObject) == null ? void 0 : m.description
939
935
  }, null, 8, ["editor"]),
940
- (x = (f = (p = (y = e.modalData) == null ? void 0 : y.modalObject) == null ? void 0 : p.modalImage) == null ? void 0 : f[0]) != null && x.url ? (openBlock(), createElementBlock("img", {
936
+ (g = (f = (_ = (y = e.modalData) == null ? void 0 : y.modalObject) == null ? void 0 : _.modalImage) == null ? void 0 : f[0]) != null && g.url ? (openBlock(), createElementBlock("img", {
941
937
  key: 0,
942
- src: (i = (n = (s = (v = e.modalData) == null ? void 0 : v.modalObject) == null ? void 0 : s.modalImage) == null ? void 0 : n[0]) == null ? void 0 : i.url,
938
+ src: (i = (n = (s = (d = e.modalData) == null ? void 0 : d.modalObject) == null ? void 0 : s.modalImage) == null ? void 0 : n[0]) == null ? void 0 : i.url,
943
939
  alt: "",
944
940
  class: "ire-mt-5 ire-h-[400px] ire-w-full ire-object-contain"
945
941
  }, null, 8, _hoisted_2$1)) : createCommentVNode("", !0)
946
942
  ]);
947
943
  };
948
944
  }
949
- }), _hoisted_1$1 = { class: "lg:!ire-text-xl" }, _hoisted_2 = { class: "ire-relative ire-h-full ire-select-none ire-overflow-hidden ire-pt-[50%]" }, _hoisted_3 = ["src"], _hoisted_4 = ["innerHTML"], _sfc_main$2 = /* @__PURE__ */ defineComponent({
945
+ }), _hoisted_1$1 = { class: "lg:!ire-text-xl" }, _hoisted_2 = { class: "ire-relative ire-h-full ire-select-none ire-overflow-hidden" }, _hoisted_3 = ["src"], _hoisted_4 = ["innerHTML"], _sfc_main$2 = /* @__PURE__ */ defineComponent({
950
946
  __name: "BlockPreview",
951
947
  props: {
952
948
  block: {},
@@ -956,61 +952,61 @@ const Close = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_render]]
956
952
  },
957
953
  emits: ["changeComponent"],
958
954
  setup(o, { emit: e }) {
959
- const t = e, r = o, c = ref(), _ = ref(), m = ref(), y = ref(), p = computed$1(() => {
960
- var v, s;
961
- if ((v = r.block) != null && v.svg)
955
+ const t = e, r = o, c = ref(), v = ref(), m = ref(), y = ref(), _ = computed$1(() => {
956
+ var d, s;
957
+ if ((d = r.block) != null && d.svg)
962
958
  return (s = r.block) == null ? void 0 : s.svg;
963
- }), f = (v) => {
964
- const s = v.target;
965
- s && (_.value = s);
966
- }, x = (v) => {
967
- var n, i, d;
968
- const s = v.target;
959
+ }), f = (d) => {
960
+ const s = d.target;
961
+ s && (v.value = s);
962
+ }, g = (d) => {
963
+ var n, i, u;
964
+ const s = d.target;
969
965
  (s == null ? void 0 : s.nodeName) === "path" && (((n = y.value) == null ? void 0 : n.conf) === "sold" || ((i = y.value) == null ? void 0 : i.conf) === "reserved" || t(
970
966
  "changeComponent",
971
- ((d = m.value) == null ? void 0 : d.type) || "",
967
+ ((u = m.value) == null ? void 0 : u.type) || "",
972
968
  y.value
973
969
  ));
974
970
  };
975
971
  return watch(
976
- () => _.value,
977
- (v) => {
978
- var n, i, d, l, a, h, u, k;
979
- if (!v) return;
980
- const s = v == null ? void 0 : v.parentElement;
972
+ () => v.value,
973
+ (d) => {
974
+ var n, i, u, l, a, h, p, k;
975
+ if (!d) return;
976
+ const s = d == null ? void 0 : d.parentElement;
981
977
  if (s && (s == null ? void 0 : s.nodeName) === "g") {
982
- const g = s == null ? void 0 : s.getAttribute("id");
983
- if (!g || (m.value = ((i = (n = r.block) == null ? void 0 : n.polygon_data) == null ? void 0 : i.find((b) => (b == null ? void 0 : b.key) === g)) || null, !m.value)) return;
984
- if (((d = m.value) == null ? void 0 : d.type) === "floor") {
985
- const b = (l = r.floors) == null ? void 0 : l.find(
986
- (w) => {
978
+ const b = s == null ? void 0 : s.getAttribute("id");
979
+ if (!b || (m.value = ((i = (n = r.block) == null ? void 0 : n.polygon_data) == null ? void 0 : i.find((w) => (w == null ? void 0 : w.key) === b)) || null, !m.value)) return;
980
+ if (((u = m.value) == null ? void 0 : u.type) === "floor") {
981
+ const w = (l = r.floors) == null ? void 0 : l.find(
982
+ (x) => {
987
983
  var C;
988
- return (w == null ? void 0 : w.id) === ((C = m.value) == null ? void 0 : C.id);
984
+ return (x == null ? void 0 : x.id) === ((C = m.value) == null ? void 0 : C.id);
989
985
  }
990
986
  );
991
- y.value = b;
987
+ y.value = w;
992
988
  } else if (((a = m.value) == null ? void 0 : a.type) === "flat") {
993
- const b = (h = r.flats) == null ? void 0 : h.find(
994
- (w) => {
989
+ const w = (h = r.flats) == null ? void 0 : h.find(
990
+ (x) => {
995
991
  var C;
996
- return (w == null ? void 0 : w.id) === ((C = m.value) == null ? void 0 : C.id);
992
+ return (x == null ? void 0 : x.id) === ((C = m.value) == null ? void 0 : C.id);
997
993
  }
998
994
  );
999
- y.value = b;
1000
- } else if (((u = m.value) == null ? void 0 : u.type) === "tooltip") {
1001
- const b = (k = r.actions) == null ? void 0 : k.find(
1002
- (w) => {
995
+ y.value = w;
996
+ } else if (((p = m.value) == null ? void 0 : p.type) === "tooltip") {
997
+ const w = (k = r.actions) == null ? void 0 : k.find(
998
+ (x) => {
1003
999
  var C;
1004
- return (w == null ? void 0 : w.id) === ((C = m.value) == null ? void 0 : C.id);
1000
+ return (x == null ? void 0 : x.id) === ((C = m.value) == null ? void 0 : C.id);
1005
1001
  }
1006
1002
  );
1007
- y.value = b;
1003
+ y.value = w;
1008
1004
  } else
1009
1005
  y.value = null;
1010
1006
  } else
1011
1007
  m.value = null, y.value = null;
1012
1008
  }
1013
- ), (v, s) => {
1009
+ ), (d, s) => {
1014
1010
  var n;
1015
1011
  return openBlock(), createBlock(_sfc_main$f, {
1016
1012
  hoverdData: y.value,
@@ -1020,37 +1016,34 @@ const Close = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_render]]
1020
1016
  var i;
1021
1017
  return [
1022
1018
  createVNode(_sfc_main$b, {
1023
- onClick: s[0] || (s[0] = (d) => v.$emit("changeComponent", "project", null))
1019
+ onClick: s[0] || (s[0] = (u) => d.$emit("changeComponent", "project", null))
1024
1020
  }),
1025
- createElementVNode("p", _hoisted_1$1, toDisplayString((i = v.block) == null ? void 0 : i.title), 1)
1021
+ createElementVNode("p", _hoisted_1$1, toDisplayString((i = d.block) == null ? void 0 : i.title), 1)
1026
1022
  ];
1027
1023
  }),
1028
1024
  default: withCtx(() => {
1029
- var i, d, l, a, h, u, k, g;
1025
+ var i, u, l, a, h, p;
1030
1026
  return [
1031
1027
  createElementVNode("div", _hoisted_2, [
1032
1028
  createElementVNode("img", {
1033
- src: ((l = (d = (i = v.block) == null ? void 0 : i.block_image) == null ? void 0 : d[0]) == null ? void 0 : l.url) || "",
1029
+ src: ((l = (u = (i = d.block) == null ? void 0 : i.block_image) == null ? void 0 : u[0]) == null ? void 0 : l.url) || "",
1034
1030
  alt: "",
1035
- class: normalizeClass(["ire-absolute ire-left-0 ire-top-0 ire-h-full ire-w-full", {
1036
- "ire-object-contain": (a = v.block) == null ? void 0 : a.img_contain,
1037
- "ire-object-cover": !((h = v.block) != null && h.img_contain)
1038
- }])
1039
- }, null, 10, _hoisted_3),
1031
+ class: "ire-left-0 ire-top-0 ire-h-full ire-w-full"
1032
+ }, null, 8, _hoisted_3),
1040
1033
  (openBlock(), createElementBlock("div", {
1041
1034
  ref_key: "svgRef",
1042
1035
  ref: c,
1043
1036
  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", [
1044
1037
  {
1045
- "hover:[&_path]:ire-fill-[var(--reserved-color)]": ((u = y.value) == null ? void 0 : u.conf) === "reserved",
1046
- "hover:[&_path]:ire-fill-[var(--sold-color)]": ((k = y.value) == null ? void 0 : k.conf) === "sold",
1047
- "hover:[&_path]:ire-fill-[var(--path-hover-color)]": !((g = y.value) != null && g.conf)
1038
+ "hover:[&_path]:ire-fill-[var(--reserved-color)]": ((a = y.value) == null ? void 0 : a.conf) === "reserved",
1039
+ "hover:[&_path]:ire-fill-[var(--sold-color)]": ((h = y.value) == null ? void 0 : h.conf) === "sold",
1040
+ "hover:[&_path]:ire-fill-[var(--path-hover-color)]": !((p = y.value) != null && p.conf)
1048
1041
  }
1049
1042
  ]]),
1050
- innerHTML: p.value,
1051
- key: p.value,
1043
+ innerHTML: _.value,
1044
+ key: _.value,
1052
1045
  onMouseover: f,
1053
- onClick: x
1046
+ onClick: g
1054
1047
  }, null, 42, _hoisted_4))
1055
1048
  ])
1056
1049
  ];
@@ -1065,7 +1058,7 @@ const Close = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_render]]
1065
1058
  shortcodeDataProps: {}
1066
1059
  },
1067
1060
  setup(__props) {
1068
- var o, e, t, r, c, _, m, y, p, f, x, v;
1061
+ var o, e, t, r, c, v, m, y, _, f, g, d;
1069
1062
  const props = __props, getMeta = (s) => props.shortcodeDataProps.meta.find(
1070
1063
  (n) => n.meta_key === s
1071
1064
  ), constants = ref({
@@ -1074,14 +1067,14 @@ const Close = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_render]]
1074
1067
  PREVIEW_RESERVED_COLOR: ((t = getMeta("reserved_color")) == null ? void 0 : t.meta_value) || "rgba(255, 247, 89, 0.53)",
1075
1068
  PREVIEW_SOLD_COLOR: ((r = getMeta("sold_color")) == null ? void 0 : r.meta_value) || "rgba(219, 64, 64, 0.45)",
1076
1069
  PREVIEW_STROKE_COLOR: ((c = getMeta("stroke_color")) == null ? void 0 : c.meta_value) || "rgba(0, 0, 0, 1)",
1077
- PREVIEW_STROKE_WIDTH: +((_ = getMeta("stroke_width")) == null ? void 0 : _.meta_value) || 0
1070
+ PREVIEW_STROKE_WIDTH: +((v = getMeta("stroke_width")) == null ? void 0 : v.meta_value) || 0
1078
1071
  }), colors = reactive({
1079
1072
  path: (m = constants.value) == null ? void 0 : m.PREVIEW_PATH_COLOR,
1080
1073
  path_hover: (y = constants.value) == null ? void 0 : y.PREVIEW_PATH_HOVER_COLOR,
1081
- reserved: (p = constants.value) == null ? void 0 : p.PREVIEW_RESERVED_COLOR,
1074
+ reserved: (_ = constants.value) == null ? void 0 : _.PREVIEW_RESERVED_COLOR,
1082
1075
  sold: (f = constants.value) == null ? void 0 : f.PREVIEW_SOLD_COLOR,
1083
- stroke_color: (x = constants.value) == null ? void 0 : x.PREVIEW_STROKE_COLOR,
1084
- stroke_width: (v = constants.value) == null ? void 0 : v.PREVIEW_STROKE_WIDTH
1076
+ stroke_color: (g = constants.value) == null ? void 0 : g.PREVIEW_STROKE_COLOR,
1077
+ stroke_width: (d = constants.value) == null ? void 0 : d.PREVIEW_STROKE_WIDTH
1085
1078
  }), cssVariables = computed$1(() => ({
1086
1079
  "--reserved-color": colors.reserved,
1087
1080
  "--sold-color": colors.sold,
@@ -1100,20 +1093,20 @@ const Close = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_render]]
1100
1093
  if (shortcodeData.value)
1101
1094
  return (s = shortcodeData.value.floors) == null || s.forEach((i) => {
1102
1095
  var a, h;
1103
- const d = (h = (a = shortcodeData.value) == null ? void 0 : a.flats) == null ? void 0 : h.filter((u) => {
1096
+ const u = (h = (a = shortcodeData.value) == null ? void 0 : a.flats) == null ? void 0 : h.filter((p) => {
1104
1097
  var k;
1105
- return (u == null ? void 0 : u.floor_number) !== ((k = i == null ? void 0 : i.floor_number) == null ? void 0 : k.toString()) ? !1 : i != null && i.polygon_data ? Object == null ? void 0 : Object.values(i == null ? void 0 : i.polygon_data).some(
1106
- (b) => {
1107
- var w;
1108
- return b != null && b.type && (b == null ? void 0 : b.type) === "flat" && (b == null ? void 0 : b.id) === (u == null ? void 0 : u.id) ? i != null && i.block_id ? (u == null ? void 0 : u.block_id) === ((w = i == null ? void 0 : i.block_id) == null ? void 0 : w.toString()) : !(u != null && u.block_id) : !1;
1098
+ return (p == null ? void 0 : p.floor_number) !== ((k = i == null ? void 0 : i.floor_number) == null ? void 0 : k.toString()) ? !1 : i != null && i.polygon_data ? Object == null ? void 0 : Object.values(i == null ? void 0 : i.polygon_data).some(
1099
+ (w) => {
1100
+ var x;
1101
+ return w != null && w.type && (w == null ? void 0 : w.type) === "flat" && (w == null ? void 0 : w.id) === (p == null ? void 0 : p.id) ? i != null && i.block_id ? (p == null ? void 0 : p.block_id) === ((x = i == null ? void 0 : i.block_id) == null ? void 0 : x.toString()) : !(p != null && p.block_id) : !1;
1109
1102
  }
1110
1103
  ) : !1;
1111
1104
  });
1112
- i.flats = d;
1105
+ i.flats = u;
1113
1106
  const { conf: l } = i || {};
1114
- if (d != null && d.length && !l) {
1115
- const u = d == null ? void 0 : d.every((g) => (g == null ? void 0 : g.conf) === "reserved"), k = d == null ? void 0 : d.every((g) => (g == null ? void 0 : g.conf) === "sold");
1116
- u ? i.conf = "reserved" : k && (i.conf = "sold");
1107
+ if (u != null && u.length && !l) {
1108
+ const p = u == null ? void 0 : u.every((b) => (b == null ? void 0 : b.conf) === "reserved"), k = u == null ? void 0 : u.every((b) => (b == null ? void 0 : b.conf) === "sold");
1109
+ p ? i.conf = "reserved" : k && (i.conf = "sold");
1117
1110
  }
1118
1111
  }), (n = shortcodeData.value) == null ? void 0 : n.floors;
1119
1112
  }), blocks = computed$1(() => {
@@ -1126,9 +1119,9 @@ const Close = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_render]]
1126
1119
  var s, n;
1127
1120
  if (shortcodeData.value)
1128
1121
  return (n = (s = shortcodeData.value) == null ? void 0 : s.flats) == null ? void 0 : n.map((i) => {
1129
- var d;
1122
+ var u;
1130
1123
  if (i != null && i.use_type || !(i != null && i.type)) {
1131
- const l = (d = types.value) == null ? void 0 : d.find((a) => (a == null ? void 0 : a.id) === (i == null ? void 0 : i.type_id));
1124
+ const l = (u = types.value) == null ? void 0 : u.find((a) => (a == null ? void 0 : a.id) === (i == null ? void 0 : i.type_id));
1132
1125
  l && (i.type = l);
1133
1126
  }
1134
1127
  return i;
@@ -1143,7 +1136,7 @@ const Close = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_render]]
1143
1136
  return (s = shortcodeData.value) == null ? void 0 : s.meta;
1144
1137
  }), getColorMeta = (s) => {
1145
1138
  var n, i;
1146
- return (i = (n = projectMeta.value) == null ? void 0 : n.find((d) => (d == null ? void 0 : d.meta_key) === s)) == null ? void 0 : i.meta_value;
1139
+ return (i = (n = projectMeta.value) == null ? void 0 : n.find((u) => (u == null ? void 0 : u.meta_key) === s)) == null ? void 0 : i.meta_value;
1147
1140
  }, changeRoute = (flowType, polygonItem) => {
1148
1141
  switch (flowType) {
1149
1142
  case "project":
@@ -1179,8 +1172,8 @@ const Close = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_render]]
1179
1172
  return watch(
1180
1173
  () => projectMeta.value,
1181
1174
  () => {
1182
- const s = getColorMeta("path_color"), n = getColorMeta("path_hover_color"), i = getColorMeta("reserved_color"), d = getColorMeta("sold_color"), l = getColorMeta("stroke_color"), a = getColorMeta("stroke_width");
1183
- s && (colors.path = s.toString()), n && (colors.path_hover = n.toString()), i && (colors.reserved = i.toString()), d && (colors.sold = d.toString()), l && (colors.stroke_color = l.toString()), a && (colors.stroke_width = Number(a));
1175
+ const s = getColorMeta("path_color"), n = getColorMeta("path_hover_color"), i = getColorMeta("reserved_color"), u = getColorMeta("sold_color"), l = getColorMeta("stroke_color"), a = getColorMeta("stroke_width");
1176
+ s && (colors.path = s.toString()), n && (colors.path_hover = n.toString()), i && (colors.reserved = i.toString()), u && (colors.sold = u.toString()), l && (colors.stroke_color = l.toString()), a && (colors.stroke_width = Number(a));
1184
1177
  }
1185
1178
  ), (s, n) => (openBlock(), createElementBlock("div", _hoisted_1, [
1186
1179
  createVNode(Transition, {
@@ -1198,14 +1191,14 @@ const Close = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_render]]
1198
1191
  projectMeta: projectMeta.value,
1199
1192
  blocks: blocks.value,
1200
1193
  actions: actions.value,
1201
- onChangeComponent: n[0] || (n[0] = (i, d) => changeRoute(i, d))
1194
+ onChangeComponent: n[0] || (n[0] = (i, u) => changeRoute(i, u))
1202
1195
  }, null, 8, ["project", "floors", "flats", "projectMeta", "blocks", "actions"])) : flow.value === "blockFlow" && flats.value && floors.value && blocks.value && activeBlock.value ? (openBlock(), createBlock(_sfc_main$2, {
1203
1196
  key: 1,
1204
1197
  block: activeBlock.value,
1205
1198
  flats: flats.value,
1206
1199
  floors: floors.value,
1207
1200
  actions: actions.value,
1208
- onChangeComponent: n[1] || (n[1] = (i, d) => changeRoute(i, d))
1201
+ onChangeComponent: n[1] || (n[1] = (i, u) => changeRoute(i, u))
1209
1202
  }, null, 8, ["block", "flats", "floors", "actions"])) : flow.value === "floorFlow" && floors.value && activeFloor.value ? (openBlock(), createBlock(_sfc_main$a, {
1210
1203
  key: 2,
1211
1204
  flats: flats.value,
@@ -1213,12 +1206,12 @@ const Close = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_render]]
1213
1206
  floors: floors.value,
1214
1207
  blocks: blocks.value,
1215
1208
  actions: actions.value,
1216
- onChangeComponent: n[2] || (n[2] = (i, d) => changeRoute(i, d))
1209
+ onChangeComponent: n[2] || (n[2] = (i, u) => changeRoute(i, u))
1217
1210
  }, null, 8, ["flats", "floor", "floors", "blocks", "actions"])) : flow.value === "flatFlow" ? (openBlock(), createBlock(_sfc_main$7, {
1218
1211
  key: 3,
1219
1212
  flat: hoveredData.value,
1220
1213
  floors: floors.value,
1221
- onChangeComponent: n[3] || (n[3] = (i, d) => changeRoute(i, d))
1214
+ onChangeComponent: n[3] || (n[3] = (i, u) => changeRoute(i, u))
1222
1215
  }, null, 8, ["flat", "floors"])) : createCommentVNode("", !0)
1223
1216
  ])) : createCommentVNode("", !0)
1224
1217
  ]),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ire-preview",
3
- "version": "2.0.7",
3
+ "version": "2.0.8",
4
4
  "type": "module",
5
5
  "emitDeclarationOnly": true,
6
6
  "declaration": true,