PageSourceSearch

https://nebo-moscow.ru/assets/js/custom.js?178673401712960

js nebo-moscow.ru collected 2026-10-04 04:01:32 UTC 12,960 bytes, 351 lines download raw bytes

1const formReview = document.querySelector('#form-send-otzyv');
2const catalogTabButtons = document.querySelectorAll(`a.catalog-top__tabs[href*='#tab']`);
3const findTabButton = querySelectorFrom(`a.catalog-top__tabs[href*='${location.hash}']`, catalogTabButtons);
4const linksNeedHash = document.querySelectorAll('a[data-link-with-hash]');
5const slidesOnMain = document.querySelectorAll('.first-sec-swiper__item');
6
7if (formReview) {
8    formReview.addEventListener('submit', (e) => {
9        e.preventDefault();
10        const formData = new FormData(formReview);
11
12        fetch(formReview.getAttribute('action'), {
13            method: 'POST',
14            body: formData
15        })
16            .then(response => response.json())
17            .then((response) => {
18
19                let inputBlocks = document.querySelectorAll(`[data-review-input]`);
20                let errorForm = formReview.querySelector('.error-form');
21
22                if (errorForm)
23                    errorForm.innerHTML = response.message ?? '';
24
25                inputBlocks.forEach((inputBlock) => {
26                    let code = inputBlock.getAttribute('data-review-input');
27                    let errorBlock = inputBlock.querySelector('.error');
28                    if (response.fields && response.fields[code]) {
29                        errorBlock.innerText = response.fields[code];
30                        inputBlock.classList.add('otzyv-field--error');
31                    } else {
32                        errorBlock.innerText = '';
33                        inputBlock.classList.remove('otzyv-field--error');
34                    }
35                });
36
37                if (response.status) {
38                    let buttonShowModal = formReview.querySelector('[data-graph-path="modal-review"]');
39                    let sessidInput = formReview.querySelector('[name="sessid"]');
40                    let fileInput = formReview.querySelector('.form-file p, .form-file span');
41                    let reviewCounter = formReview.querySelector('#otzyv-review-count');
42
43                    buttonShowModal.click();
44                    formReview.reset();
45                    sessidInput.setAttribute('value', BX.bitrix_sessid());
46
47                    if (fileInput)
48                        fileInput.innerText = 'Прикрепить файл';
49
50                    if (reviewCounter)
51                        reviewCounter.textContent = '0';
52                }
53
54                gRecapcha();
55            });
56    });
57}
58
59if (catalogTabButtons.length) {
60    catalogTabButtons.forEach((catalogTabButton) => {
61        catalogTabButton.addEventListener('click', () => {
62            location.hash = catalogTabButton.getAttribute('href').replace('#', '');
63        })
64    });
65
66}
67
68if (findTabButton) {
69    findTabButton.forEach((findTabButtonItem) => {
70        findTabButtonItem.click();
71    })
72}
73
74if (linksNeedHash.length) {
75    linksNeedHash.forEach((linkNeedHash) => {
76        linkNeedHash.addEventListener('click', (e) => {
77            e.preventDefault();
78            redirectWithSaveGetHash(linkNeedHash.getAttribute('href'));
79        });
80    })
81}
82
83function querySelectorFrom(selector, elements) {
84    return [].filter.call(elements, function (element) {
85        return element.matches(selector);
86    });
87}
88
89function redirectWithSaveGetHash(link) {
90    const url = new URL(link, location.origin);
91    const search = url.search ?? location.search;
92    const href = url.pathname + search + location.hash;
93    console.log(search);
94    location.href = href;
95}
96
97/* if (slidesOnMain.length) {
98    let minHeight = 0;
99
100    slidesOnMain.forEach((slideOnMain) => {
101        if (slideOnMain.clientHeight > minHeight) {
102            minHeight = slideOnMain.clientHeight;
103        }
104    });
105
106    slidesOnMain.forEach((slideOnMain) => {
107        slideOnMain.style.minHeight = minHeight + 'px';
108    });
109} */
110
111
112document.addEventListener("DOMContentLoaded", function () {
113    var video_slider = document.querySelectorAll(".swiper-slide-video");
114    video_slider.forEach(function (slider) {
115        slider.querySelector(".play-back").addEventListener("click", function () {
116            if (typeof slider === "string" || slider instanceof String || typeof slider === "number" || slider instanceof Number) {
117                var dupNode = slider;
118
119            } else {
120                var dupNode = slider.cloneNode(true);
121
122            }
123            dupNode.querySelector("video").setAttribute("controls", true);
124            ShowModal(dupNode.querySelector("video"), true, ss);
125
126            function ss() {
127                document.querySelector(".stt-modal").querySelector("video").remove();
128            }
129        });
130    });
131})
132
133
134const depthMenuButtons = document.querySelectorAll('.top_menu__item_with_parent__expand');
135
136
137if (depthMenuButtons.length) {
138    depthMenuButtons.forEach((depthMenuButton) => {
139        depthMenuButton.addEventListener('click', () => {
140            const item = depthMenuButton.closest('.top_menu__item_with_parent');
141
142            if (item) {
143                item.classList.toggle('active');
144            }
145        });
146    })
147}
148
149
150//new map
151
152const angleScale = {
153    scale: 1,
154    x: 0,
155    y: 0,
156}
157const schemeModalCloseButton = document.querySelector('.mobile-window-map__close');
158const schemeModal = document.querySelector('.mobile-window-map');
159const schemeModalInner = document.querySelector('.mobile-window-map__inner');
160const schemeButtonsZoom = document.querySelectorAll('.mapsvg-buttons > div.mapsvg-btn-zoom');
161const schemePopups = document.querySelectorAll('.map_object.popupable')
162const scaleElement = document.querySelector('.map_cont svg');
163
164const initScheme = () => {
165    interact('.map_cont svg')
166        .gesturable({
167            listeners: {
168                move(event) {
169                    var currentScale = event.scale * angleScale.scale;
170
171                    if (currentScale > 5) currentScale = 5;
172
173                    if (currentScale < 0.5) currentScale = 0.5;
174
175                    scaleElement.style.transform = 'scale(' + currentScale + ') translate(' + angleScale.x + 'px, ' + angleScale.y + 'px)';
176
177                    if (window.mapTippy)
178                        window.mapTippy.forEach(t => t.disable())
179
180                },
181                end(event) {
182                    var currentScale = event.scale * angleScale.scale;
183
184                    if (currentScale > 5) currentScale = 5;
185
186                    if (currentScale < 0.5) currentScale = 0.5;
187
188                    angleScale.scale = currentScale;
189
190                    if (!matchMedia('(max-width: 1024px)').matches && window.mapTippy) {
191                        window.mapTippy.forEach(t => t.enable())
192                    }
193                }
194            },
195
196            max: Infinity,
197            maxPerElement: 1,
198        })
199        .draggable({
200            inertia: true,
201            modifiers: [
202                interact.modifiers.restrictRect({
203                    restriction: 'parent',
204                    endOnly: true,
205                })
206            ],
207            autoScroll: true,
208
209            listeners: {
210                move: (event) => {
211                    dragMoveListener(event);
212                    if (window.mapTippy)
213                        window.mapTippy.forEach(t => t.disable())
214                },
215                end: () => {
216                    if (!matchMedia('(max-width: 1024px)').matches && window.mapTippy) {
217                        window.mapTippy.forEach(t => t.enable())
218                    }
219                }
220            }
221        })
222}
223
224const schemeScale = () => {
225    if (angleScale.scale > 5) angleScale.scale = 5;
226    if (angleScale.scale < 0.5) angleScale.scale = 0.5;
227    scaleElement.style.transform = 'scale(' + angleScale.scale + ') translate(' + angleScale.x + 'px, ' + angleScale.y + 'px)'
228}
229
230const dragMoveListener = (event) => {
231    var target = event.target;
232    var x = (angleScale.x * angleScale.scale) + event.dx
233    var y = (angleScale.y * angleScale.scale) + event.dy
234    angleScale.x = (x / angleScale.scale);
235    angleScale.y = (y / angleScale.scale);
236    target.style.transform = 'scale(' + angleScale.scale + ') translate(' + angleScale.x + 'px, ' + angleScale.y + 'px)'
237}
238
239const schemeModalClose = () => {
240    schemeModal.classList.remove('mobile-window-map--show');
241    schemeModalInner.innerHTML = '';
242}
243
244const showPopup = (self) => {
245    let prId = $(self).attr("data-id");
246
247    schemeModal.classList.add('mobile-window-map--show');
248    fetch('/skhema-trts/ajax.php?id=' + prId)
249        .then((response) => response.text())
250        .then((text) => {
251            schemeModalInner.innerHTML = text;
252        })
253        .catch((error) => {
254            schemeModalInner.innerHTML = `Request failed. ${error}`;
255        });
256}
257
258if (schemeModalCloseButton && schemeModal) {
259    schemeModalCloseButton.addEventListener('click', (e) => {
260        schemeModalClose();
261    })
262}
263
264if (schemeModal) {
265    schemeModal.addEventListener('click', (e) => {
266        if (schemeModal === e.target) {
267            schemeModalClose()
268        }
269    })
270}
271
272if (schemeButtonsZoom.length) {
273    schemeButtonsZoom.forEach((schemeButtonZoom) => {
274        schemeButtonZoom.addEventListener('click', (e) => {
275            if (schemeButtonZoom.classList.contains('in')) {
276                angleScale.scale += 0.25;
277            } else {
278                angleScale.scale -= 0.25;
279            }
280
281            schemeScale();
282        });
283    })
284}
285
286if (schemePopups.length) {
287    schemePopups.forEach((schemePopup) => {
288        schemePopup.addEventListener('click', (e) => {
289            if (matchMedia('(max-width: 1024px)').matches) {
290                showPopup(schemePopup);
291            }
292        });
293    })
294}
295
296document.addEventListener("DOMContentLoaded", function() {
297
298$("a[href='/novosti/aktsii/ddx/']").attr("href", "https://www.ddxfitness.ru/clubs/
298ddx-solntsevo-nebo/?utm_source=offline&utm_medium=sayt_solntsevo_nebo&utm_campaign=ddx_sayt_solntsevo_nebo")
299    if (document.querySelector('.map_cont svg')) initScheme();
300	$("#bx_3218110189_35644 .map_image").attr("href", "/upload/delight.webpconverter/upload/iblock/788/v267kyragilmpm40wfk5vaabvb13z14b.png").css("width", "48px").css("height", "23px").css("x","635px").css("y", "207px")
301	$("#bx_3218110189_35642").html('<image class="map_image" xmlns="http://www.w3.org/2000/svg" href="/assets/img/VR1_logo.png" height="23px" width="48px" x="437px" y="210px" style="mix-blend-mode: darken; outline: 1px solid #000 "></image><image class="map_image_hover" xmlns="http://www.w3.org/2000/svg" href="/assets/img/VR1_logo_hover.png" height="23px" width="48px" x="437px" y="210px" style="mix-blend-mode: darken; outline: 1px solid #000 "></image>')
302	$("#bx_3218110189_35642").hover(function(){
303		$("#bx_3218110189_35642 .map_image").css("opacity",0)
304		$("#bx_3218110189_35642 .map_image_hover").css("opacity",1)
305	}, function(){
306		$("#bx_3218110189_35642 .map_image").css("opacity",1)
307		$("#bx_3218110189_35642 .map_image_hover").css("opacity",0)
308	});
309
310
311	$("#bx_3218110189_1945 .map_countour_light, #bx_3218110189_1945 .map_countour_hover").attr("points", "155.59 231.95 155.59 27.55  418.68 27  418.44 180.65 410.03 180.65 410.03 205.7 418.2 205.7 418.2 232.11 2 231.95")
312    $("#bx_3218110189_1945 .map_image, #bx_3218110189_1945 .map_image_hover").css("x", 212).css("y", 104)
313    $("#bx_3218110189_1946 .map_countour_light,#bx_3218110189_1946  .map_countour_hover").attr("points", "417 27 571 27 571 170 417 170")
314	$("#bx_3218110189_1946 .map_image, #bx_3218110189_1946 .map_image_hover").css("width","160px").css("height","52px").css("x", 415).css("y",67)
315
316	$(".telegram").click(function(){
317 		$('#tg-modal-new').css("display", "inline-block");
318		$(".modal").addClass("is-open");
319
320	});
321	if (window.location.href.indexOf("3-etazh") > 0) $(" #escalator").css("transform", "translateY(100px)");
322	$("#tg-modal-new .modal__close").click(function(){
323		$('#tg-modal-new').css("display", "none");
324		$(".modal").removeClass("is-open");
325	})
326	$("#bx_3218110189_46276 .map_image").attr("href", "/assets/img/hover.png").css("width", "11px").css("height","auto").css("x","390px").css("y","113px");
327    $("#bx_3218110189_1989 .map_image, #bx_3218110189_1989 .map_image_hover").css("width", "80px").css("height","auto").css("x","230px").css("y","149px");
328
329	try {
330		const sehrDummModal = document.getElementById('sehrDummModal');
331		const arrChildrenDM = sehrDummModal.querySelectorAll('.modal__container');
332		sehrDummModal.addEventListener('click', e => {
333			if (e.target != sehrDummModal) return false;
334			for (let dumm of [...arrChildrenDM]) {
335				if (dumm.style.display == 'inline-block') dumm.removeAttribute('style');
336			}
337			sehrDummModal.classList.remove('is-open');
338		});
339	} catch(err) {
340		console.log( err );
341	}
342});
343
344
345$(document).on('submit', '#arenda-form', function () {
346    $.post( "/include/ajax/odc_from.php", $(this).serialize(), function( data ) {
347        new GraphModal().open('senk1');
348        gRecapcha();
349    });
350    return false;
351})

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.