UNPKG

@realsee/dnalogel

Version:
389 lines (388 loc) 10.8 kB
import { SvelteComponent as B, init as M, safe_not_equal as S, append_styles as j, empty as y, insert as U, transition_in as g, transition_out as u, check_outros as V, detach as q, element as z, attr as G, group_outros as w, add_render_callback as H, create_in_transition as J, identity as K, destroy_each as O, assign as Q, create_component as W, mount_component as X, get_spread_update as Y, destroy_component as Z } from "../../vendor/svelte/internal/index.js"; import { fade as x } from "../../vendor/svelte/transition/index.js"; import { CurrentFloor as p } from "./CurrentFloor.js"; function $(n) { j(n, "svelte-86bqav", ".floorplan-main.svelte-86bqav{width:100%;height:100%;pointer-events:none}"); } function F(n, l, o) { const t = n.slice(); return t[22] = l[o], t; } function N(n) { let l, o, t, i = ( /*floorplanData*/ n[13].floorDatas ), e = []; for (let r = 0; r < i.length; r += 1) e[r] = P(F(n, i, r)); const b = (r) => u(e[r], 1, 1, () => { e[r] = null; }); return { c() { l = z("div"); for (let r = 0; r < e.length; r += 1) e[r].c(); G(l, "class", "floorplan-main svelte-86bqav"); }, m(r, f) { U(r, l, f); for (let m = 0; m < e.length; m += 1) e[m] && e[m].m(l, null); t = !0; }, p(r, f) { if (n = r, f & /*hoverEnable, highlightEnable, floorplanData, getRoomAreaText, getLabelElement, getRuleDistanceText, roomLabelsEnable, roomAreaEnable, roomNameEnable, ruleLabelsEnable, adaptiveRoomLabelVisibleEnable, highlightData, missingFloorConfig, panoIndex, cameraEnable, cameraImageUrl, lastPanoramaLongitude, compassEnable, northDesc, floorIndex*/ 4194300) { i = /*floorplanData*/ n[13].floorDatas; let m; for (m = 0; m < i.length; m += 1) { const h = F(n, i, m); e[m] ? (e[m].p(h, f), g(e[m], 1)) : (e[m] = P(h), e[m].c(), g(e[m], 1), e[m].m(l, null)); } for (w(), m = i.length; m < e.length; m += 1) b(m); V(); } }, i(r) { if (!t) { for (let f = 0; f < i.length; f += 1) g(e[f]); o || H(() => { o = J(l, x, { duration: ( /*duration*/ n[0] ), easing: K }), o.start(); }), t = !0; } }, o(r) { e = e.filter(Boolean); for (let f = 0; f < e.length; f += 1) u(e[f]); t = !1; }, d(r) { r && q(l), O(e, r); } }; } function P(n) { let l, o; const t = [ { hoverEnable: ( /*hoverEnable*/ n[6] ), highlightEnable: ( /*highlightEnable*/ n[7] ), floorplanData: ( /*floorplanData*/ n[13] ), getRoomAreaText: ( /*getRoomAreaText*/ n[16] ), getLabelElement: ( /*getLabelElement*/ n[17] ), getRuleDistanceText: ( /*getRuleDistanceText*/ n[18] ), roomLabelsEnable: ( /*roomLabelsEnable*/ n[9] ), roomAreaEnable: ( /*roomAreaEnable*/ n[10] ), roomNameEnable: ( /*roomNameEnable*/ n[11] ), ruleLabelsEnable: ( /*ruleLabelsEnable*/ n[12] ), adaptiveRoomLabelVisibleEnable: ( /*adaptiveRoomLabelVisibleEnable*/ n[19] ), highlightData: ( /*highlightData*/ n[20] ), missingFloorConfig: ( /*missingFloorConfig*/ n[21] ), panoIndex: ( /*panoIndex*/ n[3] ), cameraEnable: ( /*cameraEnable*/ n[5] ), cameraImageUrl: ( /*cameraImageUrl*/ n[15] ), lastPanoramaLongitude: ( /*lastPanoramaLongitude*/ n[14] ), compassEnable: ( /*compassEnable*/ n[8] ), northDesc: ( /*northDesc*/ n[2] ) }, { floorIndex: ( /*floorData*/ n[22].floorIndex ) }, { isCurrent: ( /*floorData*/ n[22].floorIndex === /*floorIndex*/ n[4] ) } ]; let i = {}; for (let e = 0; e < t.length; e += 1) i = Q(i, t[e]); return l = new p({ props: i }), { c() { W(l.$$.fragment); }, m(e, b) { X(l, e, b), o = !0; }, p(e, b) { const r = b & /*hoverEnable, highlightEnable, floorplanData, getRoomAreaText, getLabelElement, getRuleDistanceText, roomLabelsEnable, roomAreaEnable, roomNameEnable, ruleLabelsEnable, adaptiveRoomLabelVisibleEnable, highlightData, missingFloorConfig, panoIndex, cameraEnable, cameraImageUrl, lastPanoramaLongitude, compassEnable, northDesc, floorIndex*/ 4194300 ? Y(t, [ b & /*hoverEnable, highlightEnable, floorplanData, getRoomAreaText, getLabelElement, getRuleDistanceText, roomLabelsEnable, roomAreaEnable, roomNameEnable, ruleLabelsEnable, adaptiveRoomLabelVisibleEnable, highlightData, missingFloorConfig, panoIndex, cameraEnable, cameraImageUrl, lastPanoramaLongitude, compassEnable, northDesc*/ 4194284 && { hoverEnable: ( /*hoverEnable*/ e[6] ), highlightEnable: ( /*highlightEnable*/ e[7] ), floorplanData: ( /*floorplanData*/ e[13] ), getRoomAreaText: ( /*getRoomAreaText*/ e[16] ), getLabelElement: ( /*getLabelElement*/ e[17] ), getRuleDistanceText: ( /*getRuleDistanceText*/ e[18] ), roomLabelsEnable: ( /*roomLabelsEnable*/ e[9] ), roomAreaEnable: ( /*roomAreaEnable*/ e[10] ), roomNameEnable: ( /*roomNameEnable*/ e[11] ), ruleLabelsEnable: ( /*ruleLabelsEnable*/ e[12] ), adaptiveRoomLabelVisibleEnable: ( /*adaptiveRoomLabelVisibleEnable*/ e[19] ), highlightData: ( /*highlightData*/ e[20] ), missingFloorConfig: ( /*missingFloorConfig*/ e[21] ), panoIndex: ( /*panoIndex*/ e[3] ), cameraEnable: ( /*cameraEnable*/ e[5] ), cameraImageUrl: ( /*cameraImageUrl*/ e[15] ), lastPanoramaLongitude: ( /*lastPanoramaLongitude*/ e[14] ), compassEnable: ( /*compassEnable*/ e[8] ), northDesc: ( /*northDesc*/ e[2] ) }, b & /*floorplanData*/ 8192 && { floorIndex: ( /*floorData*/ e[22].floorIndex ) }, b & /*floorplanData, floorIndex*/ 8208 && { isCurrent: ( /*floorData*/ e[22].floorIndex === /*floorIndex*/ e[4] ) } ]) : {}; l.$set(r); }, i(e) { o || (g(l.$$.fragment, e), o = !0); }, o(e) { u(l.$$.fragment, e), o = !1; }, d(e) { Z(l, e); } }; } function ee(n) { let l, o, t = ( /*visible*/ n[1] && N(n) ); return { c() { t && t.c(), l = y(); }, m(i, e) { t && t.m(i, e), U(i, l, e), o = !0; }, p(i, [e]) { /*visible*/ i[1] ? t ? (t.p(i, e), e & /*visible*/ 2 && g(t, 1)) : (t = N(i), t.c(), g(t, 1), t.m(l.parentNode, l)) : t && (w(), u(t, 1, 1, () => { t = null; }), V()); }, i(i) { o || (g(t), o = !0); }, o(i) { u(t), o = !1; }, d(i) { t && t.d(i), i && q(l); } }; } function le(n, l, o) { let { duration: t = 0 } = l, { visible: i } = l, { northDesc: e } = l, { panoIndex: b } = l, { floorIndex: r } = l, { cameraEnable: f } = l, { hoverEnable: m } = l, { highlightEnable: h } = l, { compassEnable: E } = l, { roomLabelsEnable: s } = l, { roomAreaEnable: c } = l, { roomNameEnable: _ } = l, { ruleLabelsEnable: d } = l, { floorplanData: L } = l, { lastPanoramaLongitude: D } = l, { cameraImageUrl: I } = l, { getRoomAreaText: R } = l, { getLabelElement: A } = l, { getRuleDistanceText: T } = l, { adaptiveRoomLabelVisibleEnable: C } = l, { highlightData: v } = l, { missingFloorConfig: k } = l; return n.$$set = (a) => { "duration" in a && o(0, t = a.duration), "visible" in a && o(1, i = a.visible), "northDesc" in a && o(2, e = a.northDesc), "panoIndex" in a && o(3, b = a.panoIndex), "floorIndex" in a && o(4, r = a.floorIndex), "cameraEnable" in a && o(5, f = a.cameraEnable), "hoverEnable" in a && o(6, m = a.hoverEnable), "highlightEnable" in a && o(7, h = a.highlightEnable), "compassEnable" in a && o(8, E = a.compassEnable), "roomLabelsEnable" in a && o(9, s = a.roomLabelsEnable), "roomAreaEnable" in a && o(10, c = a.roomAreaEnable), "roomNameEnable" in a && o(11, _ = a.roomNameEnable), "ruleLabelsEnable" in a && o(12, d = a.ruleLabelsEnable), "floorplanData" in a && o(13, L = a.floorplanData), "lastPanoramaLongitude" in a && o(14, D = a.lastPanoramaLongitude), "cameraImageUrl" in a && o(15, I = a.cameraImageUrl), "getRoomAreaText" in a && o(16, R = a.getRoomAreaText), "getLabelElement" in a && o(17, A = a.getLabelElement), "getRuleDistanceText" in a && o(18, T = a.getRuleDistanceText), "adaptiveRoomLabelVisibleEnable" in a && o(19, C = a.adaptiveRoomLabelVisibleEnable), "highlightData" in a && o(20, v = a.highlightData), "missingFloorConfig" in a && o(21, k = a.missingFloorConfig); }, [ t, i, e, b, r, f, m, h, E, s, c, _, d, L, D, I, R, A, T, C, v, k ]; } class te extends B { constructor(l) { super(), M( this, l, le, ee, S, { duration: 0, visible: 1, northDesc: 2, panoIndex: 3, floorIndex: 4, cameraEnable: 5, hoverEnable: 6, highlightEnable: 7, compassEnable: 8, roomLabelsEnable: 9, roomAreaEnable: 10, roomNameEnable: 11, ruleLabelsEnable: 12, floorplanData: 13, lastPanoramaLongitude: 14, cameraImageUrl: 15, getRoomAreaText: 16, getLabelElement: 17, getRuleDistanceText: 18, adaptiveRoomLabelVisibleEnable: 19, highlightData: 20, missingFloorConfig: 21 }, $ ); } } export { te as Main };