Server IP : 80.87.202.40 / Your IP : 216.73.216.169 Web Server : Apache System : Linux rospirotorg.ru 5.14.0-539.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Dec 5 22:26:13 UTC 2024 x86_64 User : bitrix ( 600) PHP Version : 8.2.27 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /home/bitrix/ext_www/cvetdv.ru/bitrix/templates/landing24/assets/js/helpers/ |
Upload File : |
(function(){"use strict";BX.addCustomEvent(window,"BX.Landing.Block:init",(function(e){t([].slice.call(e.block.querySelectorAll("[data-source]")),e.block)}));BX.addCustomEvent("BX.Landing.Block:Node:update",(function(e){if(e.node&&e.node.hasAttribute("data-source")){t([].slice.call(e.block.querySelectorAll("[data-source]")),e.block)}}));function t(t,a){const o=a.getAttribute("data-id");if(t.length){t.forEach((function(t){t=s(t);const a=t.dataset.source;const d=t.src||t.dataset.src;if(BX.Landing.Utils.Matchers.youtube.test(a)||BX.Landing.Utils.Matchers.youtube.test(d)){if(d.indexOf("autoplay=1")!==-1&&BX.Landing.getMode()!=="edit"){i(t,{autoplay:1,mute:1})}else if(t.tagName!=="IFRAME"){BX.bind(t,"click",n)}else{i(t)}}else if(BX.Landing.Utils.Matchers.vk.test(a)&&t.dataset.preview){if(d.indexOf("autoplay=1")!==-1&&BX.Landing.getMode()!=="edit"){c(t)}BX.bind(t,"click",(()=>{c(t)}))}else if(BX.Landing.Utils.Matchers.vimeo.test(a)||BX.Landing.Utils.Matchers.vine.test(a)||BX.Landing.Utils.Matchers.facebookVideos.test(a)||BX.Landing.Utils.Matchers.rutube.test(a)){r(t)}else{e(t,o)}}))}}function e(t,e){t.classList.remove("g-video-preview");t.classList.add("g-video-preview-error");let s=`\n\t\t\t<div class="g-landing-alert-v2">\n\t\t\t\t<div class="g-landing-alert-title">\n\t\t\t\t\t${BX.message("LANDING_VIDEO_ALERT_WRONG_SOURCE")}\n\t\t\t\t</div>\n\t\t\t\t<div class="g-landing-alert-text">\n\t\t\t\t\t${BX.message("LANDING_VIDEO_ALERT_WRONG_SOURCE_TEXT_3")}\n\t\t\t\t</div>\n\t\t\t\t<br>\n \t`;if(a(e)){s+=`\n\t\t\t\t<div class="ui-btn" onclick="BX.Landing.PageObject?.getBlocks()?.get(${e})?.onShowContentPanel();">\n\t\t\t\t\t${BX.message("LANDING_VIDEO_ALERT_WRONG_SOURCE_BUTTON")}\n\t\t\t\t</div>\n \t\t `}s+=`</div>`;t.innerHTML=s}function a(t){const e=BX.Landing.PageObject?.getBlocks()?.get(t);if(!e){return false}const a=e.manifest?.code;const s=["46.6.cover_with_bg_image_and_bottom_title","49.5.big_with_text_3","54.1.cover_with_slider_bgvideo"];return!s.includes(a)}function s(t){if(t.tagName==="IFRAME"){const e=BX.create("div",{props:{className:t.className},style:{backgroundImage:"url("+t.dataset.preview+")"},dataset:{src:t.src||t.dataset.src,source:t.dataset.source}});BX.insertBefore(e,t);BX.remove(t);return e}BX.unbind(t,"click",n);t.classList.add("g-video-preview");t.classList.remove("g-video-preview-error");t.innerHTML="";return t}function n(t){const e=t.target;i(e,{autoplay:1})}function i(t,e){const a=new BX.Loader({target:t});a.show();const s=o(t);const n=typeof e!=="undefined"&&Object.keys(e).length?e:{};n.onPlayerReadyHandler=()=>{a.hide();BX.remove(t)};BX.insertBefore(s,t);BX.Landing.MediaPlayer.Factory.create(s,n)}function c(t){const e=new BX.Loader({target:t});e.show();t.dataset.src=BX.Landing.Utils.addQueryParams(t.dataset.src,{autoplay:1});const a=o(t);a.addEventListener("load",(()=>{e.hide();BX.remove(t)}));BX.insertBefore(a,t)}function r(t){const e=new BX.Loader({target:t});e.show();const a=o(t);a.addEventListener("load",(()=>{e.hide();BX.remove(t)}));BX.insertBefore(a,t)}function o(t){if(t.tagName==="IFRAME"){return t}const e=t.className;t.classList.add("--loader");return BX.create("iframe",{props:{className:e},attrs:{src:BX.util.htmlspecialcharsback(t.dataset.src),frameborder:"0",allowfullscreen:"allowfullscreen",allow:"accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture"},dataset:{src:BX.util.htmlspecialcharsback(t.dataset.src),source:BX.util.htmlspecialcharsback(t.dataset.source)}})}})(); //# sourceMappingURL=inline-video.map.js