PageSourceSearch

https://www.autobla.se/_empori-static/core/React/dist/image-gallery.ec16db33d0eb92c075c7.js

js autobla.se collected 2026-10-08 22:41:18 UTC 4,038 bytes, 3 lines download raw bytes

1/*! For license information please see image-gallery.ec16db33d0eb92c075c7.js.LICENSE.txt */
2export const __webpack_esm_id__=935;export const __webpack_esm_ids__=[935];export const __webpack_esm_modules__={3886(e,n,l){l.d(n,{default:()=>d});var s=l(4848),t=l(7234),i=l(2276),o=l(8221),r=l(961);function a(e){return window.innerWidth<=800?0===e.staticHeightMobile:0===e.staticHeightDesktop}function d(e,n){var l;if(!e)return;const d=n.imageGalleryEditorModel.slides,c={modules:[t.Vx,t.dK,t.Ij,t.dF],autoplay:!!n.autoplay&&{delay:n.delay},lazy:!0,loop:d.length>1,autoHeight:a(n),navigation:{nextEl:`#${e.id} .swiper-button-next`,prevEl:`#${e.id} .swiper-button-prev`},pagination:{el:`#${e.id} .swiper-pagination`,clickable:!0,dynamicBullets:!1},spaceBetween:0};(null!==(l=window.requestIdleCallback)&&void 0!==l?l:e=>requestAnimationFrame(e))(()=>{const l=new t.RC(e,c);if(n.fullscreenEnabled){const n=d.map(e=>e.image);if(!n)return;const t=e.querySelector(".empori-image-gallery-fullscreen-trigger");if(!t)return;const a=document.createElement("div");a.classList.add("empori-fullscreen-image-gallery"),document.body.appendChild(a);const c=e=>{l.slideToLoop(e),a.classList.remove("visible"),r.unmountComponentAtNode(a)};t.addEventListener("click",e=>{a.classList.add("visible"),(0,o.X)((0,s.jsx)(i.iQ,{slideImgUrls:n,onClose:c,activeIndex:l.realIndex}),a)})}})}},2276(e,n,l){l.d(n,{N:()=>c,iQ:()=>u});var s=l(4848),t=l(6540),i=l(3707),o=l(961),r=l(4631);function a(e){const n=/\.(jpg|jpeg|png|webp|avif|gif|svg)$/.test(e);return(0,s.jsx)("div",{className:"empori-fullscreen-image-gallery-item",style:n?{backgroundImage:`url(${e})`}:{backgroundColor:"black"},children:!n&&(0,s.jsxs)("video",{controls:!0,children:[(0,s.jsx)("source",{src:e,type:"video/mp4"}),(0,s.jsx)("source",{src:e,type:"video/ogg"}),"Your browser does not support the video tag."]})})}const d=t.forwardRef((e,n)=>{const[l,o]=t.useState(!1),a=(0,i.Mn)(),d=0!==e.currentSlideIndex,c=e.currentSlideIndex+1<e.totalSlides;t.useEffect(()=>{setTimeout(()=>{o(!0)},500)},[]);const u=e=>{"Enter"===e.key&&(e.stopPropagation(),e.preventDefault(),d?a.slidePrev():c&&a.slideNext())};return(0,s.jsxs)("div",{ref:n,className:(0,r.className)("empori-fullscreen-toolbar element-flex",{"is-ready":l}),tabIndex:0,children:[(0,s.jsx)("button",{className:d?"enabled":"disabled",disabled:!d,onClick:e=>{e.stopPropagation(),e.preventDefault(),d&&a.slidePrev()},onKeyDown:u,children:(0,s.jsx)("i",{className:"fa-regular fa-chevron-left"})}),(0,s.jsx)("span",{children:`${e.currentSlideIndex+1}/${e.totalSlides}`}),(0,s.jsx)("button",{onClick:()=>e.onClose(),onKeyDown:n=>{13!==n.keyCode&&"Enter"!==n.key||e.onClose()},children:(0,s.jsx)("i",{className:"fa-regular fa-times"})}),(0,s.jsx)("button",{className:c?"enabled":"disabled",disabled:!c,onClick:e=>{e.stopPropagation(),e.preventDefault(),c&&a.slideNext()},onKeyDown:u,children:(0,s.jsx)("i",{className:"fa-regular fa-chevron-right"})})]})});function c(e){const{toggled:n,slideImgUrls:l}=e,r=t.useRef(null);return t.useEffect(()=>{n&&setTimeout(()=>{var e;null===(e=r.current)||void 0===e||e.focus()},100)},[n]),n&&l?o.createPortal((0,s.jsx)("div",{className:"empori-fullscreen-image-gallery visible",children:(0,s.jsxs)(i.RC,{onSlideChange:n=>e.setIndex(n.realIndex),initialSlide:e.viewingIndex,children:[l.map((e,n)=>(0,s.jsx)(i.qr,{children:a(e)},n)),(0,s.jsx)(d,{ref:r,onClose:e.close,totalSlides:l.length,currentSlideIndex:e.viewingIndex})]})}),document.body):(0,s.jsx)("div",{className:"empori-image-gallery-fullscreen-trigger",onClick:()=>e.open(),onKeyDown:n=>{13!==n.keyCode&&"Enter"!==n.key||e.open()},tabIndex:0,children:(0,s.jsx)("i",{className:"fa-regular fa-expand"})})}function u(e){const[n,l]=t.useState(e.activeIndex);return(0,s.jsxs)(i.RC,{onSlideChange:e=>l(e.realIndex),initialSlide:n,children:[e.slideImgUrls.map((e,n)=>(0,s.jsx)(i.qr,{children:a(e)},n)),(0,s.jsx)(d,{onClose:()=>e.onClose(n),totalSlides:e.slideImgUrls.length,currentSlideIndex:n})]})}}};
3//# sourceMappingURL=image-gallery.ec16db33d0eb92c075c7.js.map

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.