1; 2! function ($) { 3 4 /* ======================================== 5 * å é¨å¤æ°å®ç¾© 6 * ========================================*/ 7 8 // ãã¬ã¤ã¯ãã¤ã³ãå®ç¾© 9 const mediaQueryList = window.matchMedia('(max-width: 767px)'); 10 11 // ããããã®ååã¹ã©ã¤ãã¼è¨å® 12 let swiperRecommendCount = 0; 13 let swiperRecommend = null; 14 let swiperRecommendDestroy = true; 15 let swiperRecommendOptions = null; 16 17 // ã¹ãã·ã£ã«æ å ±ã¹ã©ã¤ãã¼è¨å® 18 let swiperSpecialCount = 0; 19 let swiperSpecial = null; 20 let swiperSpecialDestroy = true; 21 let swiperSpecialOptions = null; 22 23 // ãã£ã³ãã¼ã³ã¹ã©ã¤ãã¼è¨å® 24 let swiperCampaignCount = 0; 25 let swiperCampaign = null; 26 let swiperCampaignDestroy = true; 27 let swiperCampaignOptions = null; 28 29 /* ======================================== 30 * ã»ããã¢ãã: ãã¼ã¸ãã¼ãå¾1åã ãå®è¡ 31 * ========================================*/ 32 function setup() { 33 34 // ã«ã«ã¼ã»ã«ã®ã£ã©ãªã¼ï¼ããããã®åå 35 swiperRecommendCount = $('#recommend .swiper-slide').length; 36 swiperRecommendOptions = { 37 slidesPerView: 2.3, 38 spaceBetween: 20, 39 navigation: { 40 nextEl: '#recommend .carousel-gallery .cg-button-next', 41 prevEl: '#recommend .carousel-gallery .cg-button-prev', 42 }, 43 scrollbar: { 44 el: '#recommend .carousel-gallery .swiper-scrollbar', 45 draggable: true, 46 }, 47 breakpoints: { 48 768: { 49 slidesPerView: 5, 50 spaceBetween: 20, 51 } 52 } 53 }; 54 55 // ã«ã«ã¼ã»ã«ã®ã£ã©ãªã¼ï¼ã¹ãã·ã£ã«æ å ± 56 swiperSpecialCount = $('#special .swiper-slide').length; 57 swiperSpecialOptions = { 58 slidesPerView: 1.2, 59 spaceBetween: 20, 60 navigation: { 61 nextEl: '#special .carousel-gallery .cg-button-next', 62 prevEl: '#special .carousel-gallery .cg-button-prev', 63 }, 64 scrollbar: { 65 el: '#special .carousel-gallery .swiper-scrollbar', 66 draggable: true, 67 }, 68 breakpoints: { 69 768: { 70 slidesPerView: 3, 71 spaceBetween: 30, 72 } 73 } 74 }; 75 76 // ã«ã«ã¼ã»ã«ã®ã£ã©ãªã¼ï¼ãã£ã³ãã¼ã³ 77 swiperCampaignCount = $('#campaign .swiper-slide').length; 78 swiperCampaignOptions = { 79 slidesPerView: 1.2, 80 spaceBetween: 20, 81 navigation: { 82 nextEl: '#campaign .carousel-gallery .cg-button-next', 83 prevEl: '#campaign .carousel-gallery .cg-button-prev', 84 }, 85 scrollbar: { 86 el: '#campaign .carousel-gallery .swiper-scrollbar', 87 draggable: true, 88 }, 89 breakpoints: { 90 768: { 91 slidesPerView: 3, 92 spaceBetween: 30, 93 } 94 } 95 }; 96 } 97 98 /* ======================================== 99 * å é¨é¢æ°å®ç¾© 100 * ========================================*/ 101 102 103 /* ======================================== 104 * åæå: setupå¾ãã¾ãã¯ç»é¢ãªãµã¤ãºæã«å®è¡ 105 * ========================================*/ 106 function init() { 107 108 if (mediaQueryList.matches) { 109 // SPæã®å¦ç 110 111 // ããããã®ååã¹ã©ã¤ãã¼è¨å® 112 if (swiperRecommendCount > 2) { 113 swiperRecommendDestroy = false; 114 } else { 115 swiperRecommendDestroy = true; 116 } 117 118 // ã¹ãã·ã£ã«æ å ±ã¹ã©ã¤ãã¼è¨å® 119 if (swiperSpecialCount > 1) { 120 swiperSpecialDestroy = false; 121 } else { 122 swiperSpecialDestroy = true; 123 } 124 125 // ãã£ã³ãã¼ã³æ å ±ã¹ã©ã¤ãã¼è¨å® 126 if (swiperCampaignCount > 1) { 127 swiperCampaignDestroy = false; 128 } else { 129 swiperCampaignDestroy = true; 130 } 131 } else { 132 // PCæã®å¦ç 133 134 // ããããã®ååã¹ã©ã¤ãã¼è¨å® 135 if (swiperRecommendCount > 5) { 136 swiperRecommendDestroy = false; 137 } else { 138 swiperRecommendDestroy = true; 139 } 140 141 // ã¹ãã·ã£ã«æ å ±ã¹ã©ã¤ãã¼è¨å® 142 if (swiperSpecialCount > 3) { 143 swiperSpecialDestroy = false; 144 } else { 145 swiperSpecialDestroy = true; 146 } 147 148 // ãã£ã³ãã¼ã³æ å ±ã¹ã©ã¤ãã¼è¨å® 149 if (swiperCampaignCount > 3) { 150 swiperCampaignDestroy = false; 151 } else { 152 swiperCampaignDestroy = true; 153 } 154 } 155 156 // æ°çããããåååæå 157 $('#recommend .carousel-gallery').removeClass('destroy'); 158 if (swiperRecommendDestroy) { 159 // ã¹ã©ã¤ãã¼ç ´æ£æã®å¦ç 160 if (swiperRecommend !== null) { 161 swiperRecommend.destroy(); 162 swiperRecommend = null; 163 } 164 $('#recommend .carousel-gallery').addClass('destroy'); 165 } else { 166 // ã¹ã©ã¤ãã¼çææã®å¦ç 167 if (swiperRecommend == null) { 168 swiperRecommend = new Swiper('#recommend .carousel-gallery .swiper', swiperRecommendOptions); 169 } 170 } 171 172 // ã¹ãã·ã£ã«æ å ±ã¹ã©ã¤ãã¼åæå 173 $('#special .carousel-gallery').removeClass('destroy'); 174 if (swiperSpecialDestroy) { 175 // ã¹ã©ã¤ãã¼ç ´æ£æã®å¦ç 176 if (swiperSpecial !== null) { 177 swiperSpecial.destroy(); 178 swiperSpecial = null; 179 } 180 $('#special .carousel-gallery').addClass('destroy'); 181 } else { 182 // ã¹ã©ã¤ãã¼çææã®å¦ç 183 if (swiperSpecial == null) { 184 swiperSpecial = new Swiper('#special .carousel-gallery .swiper', swiperSpecialOptions); 185 } 186 } 187 188 // ãã£ã³ãã¼ã³æ å ±ã¹ã©ã¤ãã¼åæå 189 $('#campaign .carousel-gallery').removeClass('destroy'); 190 if (swiperCampaignDestroy) { 191 // ã¹ã©ã¤ãã¼ç ´æ£æã®å¦ç 192 if (swiperCampaign !== null) { 193 swiperCampaign.destroy(); 194 swiperCampaign = null; 195 } 196 $('#campaign .carousel-gallery').addClass('destroy'); 197 } else { 198 // ã¹ã©ã¤ãã¼çææã®å¦ç 199 if (swiperCampaign == null) { 200 swiperCampaign = new Swiper('#campaign .carousel-gallery .swiper', swiperCampaignOptions); 201 } 202 } 203 } 204 205 /* ======================================== 206 * DOMãã¼ãæå¦ç 207 * ========================================*/ 208 $(function () { 209 210 // ã»ããã¢ããå®è¡ 211 setup(); 212 213 // åæåå®è¡ 214 mediaQueryList.addEventListener('change', init); 215 init(); 216 217 // ã¢ã¼ãã«ã¦ã£ã³ãã¦åæå 218 const scrollBarWidth = window.innerWidth - document.body.clientWidth; 219 220 MicroModal.init({ 221 onShow: function () { 222 // ã¹ã¯ãã¼ã«ãã¼è¡¨ç¤ºã«ããã¬ã¿ãã対ç 223 $('html').css('padding-right', scrollBarWidth);
224 }, 225 onClose: function () { 226 $('html').css('padding-right', ''); 227 }, 228 disableScroll: true, 229 disableFocus: true, 230 awaitOpenAnimation: true, 231 awaitCloseAnimation: true, 232 }); 233 234 // ã¡ã¤ã³ã¹ã©ã¤ãã¼ 235 let mainSlider = new Swiper('#mainVisual .swiper', { 236 loop: true, 237 speed: 800, 238 autoplay: { 239 delay: 5000, 240 disableOnInteraction: false, 241 }, 242 pagination: { 243 bulletActiveClass: 'mv-bullet-active', 244 bulletClass: 'mv-bullet', 245 bulletElement: 'button', 246 el: '#mainVisual .mv-pagination', 247 clickable: true, 248 }, 249 }); 250 251 // ã¡ã¤ã³ãã¸ã¥ã¢ã«ã»ä¸æåæ¢æ©è½ 252 $('.btn-swiper-control').on('click', function () { 253 if ($('#mainVisual .swiper').hasClass('is-play')) { 254 // èªååçä¸ã®å ´åã¯åæ¢ 255 mainSlider.autoplay.stop(); 256 $('#mainVisual .swiper').removeClass('is-play'); 257 $(this).attr('aria-label', 'ã¹ã©ã¤ãã·ã§ã¼ãåçãã'); 258 $('.icon-swiper-pause').removeClass('is-active'); 259 $('.icon-swiper-play').addClass('is-active'); 260 } else { 261 // 忢ä¸ã®å ´åã¯èªååçéå§ 262 mainSlider.autoplay.start(); 263 $('#mainVisual .swiper').addClass('is-play'); 264 $(this).attr('aria-label', 'ã¹ã©ã¤ãã·ã§ã¼ã䏿忢ãã'); 265 $('.icon-swiper-play').removeClass('is-active'); 266 $('.icon-swiper-pause').addClass('is-active'); 267 } 268 }); 269 270 // ã«ã«ã¼ã»ã«ã®ã£ã©ãªã¼ï¼è£½åãé¸ã¶ãã³ã 271 let swiperHint = new Swiper('#pickup .carousel-gallery .swiper', { 272 slidesPerView: 2.3, 273 spaceBetween: 20, 274 navigation: { 275 nextEl: '#pickup .carousel-gallery .cg-button-next', 276 prevEl: '#pickup .carousel-gallery .cg-button-prev', 277 }, 278 scrollbar: { 279 el: '#pickup .carousel-gallery .swiper-scrollbar', 280 draggable: true, 281 }, 282 breakpoints: { 283 768: { 284 slidesPerView: 3, 285 spaceBetween: 30, 286 } 287 } 288 }); 289 290 }); 291}(jQuery);
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.