{
  "version": 3,
  "sources": ["/cdn/shop/t/213/assets/ibkul-gallery-no-preload.js?nc=4133"],
  "sourcesContent": ["/**\r\n * IBKUL - Product gallery: do not download every gallery image up front.\r\n *\r\n * CW - 20261027\r\n * The product page prints the images of every color in the gallery (Minimog\r\n * shows only the selected color, so color changes need no reload). On mobile\r\n * the gallery is a Swiper slider, and Swiper's default `preloadImages: true`\r\n * downloads every <img> inside the slider when it is created, before the theme\r\n * filters the gallery to the selected color: on PDP 80000 that is 149 photos\r\n * plus 149 thumbnails (about 5 MB), ignoring loading=\"lazy\".\r\n *\r\n * This turns preloading off for sliders inside <media-gallery> only (product\r\n * page and quick view). The browser then loads the visible photo, and the next\r\n * ones as they come close (native lazy loading). Other sliders on the site are\r\n * not changed.\r\n *\r\n * Load with defer right after vendor.js (which defines MinimogLibs.Swiper) and\r\n * before theme-global.js / product-media.js create any slider.\r\n */\r\n(function () {\r\n  'use strict';\r\n\r\n  var libs = window.MinimogLibs;\r\n  var OriginalSwiper = libs && libs.Swiper;\r\n  if (typeof OriginalSwiper !== 'function' || OriginalSwiper.__ibkGalleryNoPreload) return;\r\n\r\n  var GALLERY_SELECTOR = 'media-gallery, media-gallery-mobile';\r\n\r\n  function isGallerySlider(el) {\r\n    return !!(el && typeof el.closest === 'function' && el.closest(GALLERY_SELECTOR));\r\n  }\r\n\r\n  class GallerySwiper extends OriginalSwiper {\r\n    constructor(el, params) {\r\n      if (isGallerySlider(el)) {\r\n        params = Object.assign({}, params, {\r\n          preloadImages: false,\r\n          updateOnImagesReady: false\r\n        });\r\n      }\r\n      super(el, params);\r\n    }\r\n  }\r\n\r\n  GallerySwiper.__ibkGalleryNoPreload = true;\r\n  libs.Swiper = GallerySwiper;\r\n})();\r\n"],
  "mappings": "CAmBC,UAAY,CACX,aAEA,IAAI,KAAO,OAAO,YACd,eAAiB,MAAQ,KAAK,OAClC,GAAI,OAAO,gBAAmB,YAAc,eAAe,sBAAuB,OAElF,IAAI,iBAAmB,sCAEvB,SAAS,gBAAgB,GAAI,CAC3B,MAAO,CAAC,EAAE,IAAM,OAAO,GAAG,SAAY,YAAc,GAAG,QAAQ,gBAAgB,EACjF,CAEA,MAAM,sBAAsB,cAAe,CACzC,YAAY,GAAI,OAAQ,CAClB,gBAAgB,EAAE,IACpB,OAAS,OAAO,OAAO,CAAC,EAAG,OAAQ,CACjC,cAAe,GACf,oBAAqB,EACvB,CAAC,GAEH,MAAM,GAAI,MAAM,CAClB,CACF,CAEA,cAAc,sBAAwB,GACtC,KAAK,OAAS,aAChB,GAAG",
  "names": []
}
